diff --git a/package-lock.json b/package-lock.json index db1c269..8084fcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,23 +8,30 @@ "name": "contexted-v3", "version": "0.0.0", "dependencies": { + "@ckeditor/ckeditor5-basic-styles": "^37.1.0", + "@ckeditor/ckeditor5-editor-balloon": "^37.1.0", + "@ckeditor/ckeditor5-essentials": "^37.1.0", + "@ckeditor/ckeditor5-link": "^37.1.0", + "@ckeditor/ckeditor5-paragraph": "^37.1.0", + "@ckeditor/ckeditor5-theme-lark": "^37.1.0", + "@ckeditor/vite-plugin-ckeditor5": "^0.1.1", "@fortawesome/fontawesome-free": "^6.4.0", - "@popperjs/core": "^2.11.7", "@types/marked": "^4.0.8", "@vueuse/components": "^10.1.0", "@vueuse/core": "^10.1.0", - "bootstrap-icons": "^1.10.5", "daisyui": "^2.51.6", "date-fns": "^2.29.3", "dompurify": "^3.0.2", "firebase": "^9.20.0", "hamburgers": "^1.2.1", + "lodash-es": "^4.17.21", "marked": "^4.3.0", "shortid": "^2.2.16", "vue": "^3.2.47" }, "devDependencies": { "@types/dompurify": "^3.0.2", + "@types/lodash-es": "^4.17.7", "@types/shortid": "^0.0.29", "@vitejs/plugin-vue": "^4.1.0", "autoprefixer": "^10.4.14", @@ -60,6 +67,299 @@ "node": ">=6.0.0" } }, + "node_modules/@ckeditor/ckeditor5-basic-styles": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-37.1.0.tgz", + "integrity": "sha512-AwCiVsq5Wh0tBOPLOV0NADnZRNw210h1/xTzsO2U8TGBcbVJ4ukU07OMSvkOhi7jrA4wLZI7R+XmhZR0vsUGkA==", + "dependencies": { + "ckeditor5": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-clipboard": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-37.1.0.tgz", + "integrity": "sha512-0L1driXKRl1IUZ9amo+DVBGJuNjuVQ4nmuurIDqR1U8pRFt34wBzaIHivUbsKeZYe74RC4m4tE2DcUrltXwLAQ==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "@ckeditor/ckeditor5-widget": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-core": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-37.1.0.tgz", + "integrity": "sha512-edewiWlMCK5BPN9Can0A9skob9dNDMrv09khiKaUYK5PEobZZQSyUBck52vXpt255u2rnlmhF5phTqsQo5EiOw==", + "dependencies": { + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-editor-balloon": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-editor-balloon/-/ckeditor5-editor-balloon-37.1.0.tgz", + "integrity": "sha512-n2FktR7e2kS1nKJJS3NV2XcqDfY5LvGxrqu5Qkx+26TlSlIwr0Bs+apvlTqWWQw4maYHOb3JvKHNur4xBKl1eQ==", + "dependencies": { + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-engine": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-37.1.0.tgz", + "integrity": "sha512-D/xWNOgqk3G1qtv8P2UCmpHcIONjJE0NRJeJuJ8jppIgOYpbVG/7KSuzJYV7G1M9oGSBAeNb7U+lz7y/eg38Hw==", + "dependencies": { + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-enter": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-37.1.0.tgz", + "integrity": "sha512-m8e+yInNi4Hi5YWN0+Jj5ZFZjFvUi6VKPGsCSRyAmOiB3J9AO1/P4pYhhAXXpD7RzJQ0hmNiwZgRDZWeq/ZZNA==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-essentials": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-37.1.0.tgz", + "integrity": "sha512-LJl/3XHQpVvoFq22Z2JtNCog+0Z646MwEIZ70YyGyltA1fxXRpC0PrUg6NYND4AbDTHvWLUVTbQhhXzfSHw2KQ==", + "dependencies": { + "ckeditor5": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-link": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-link/-/ckeditor5-link-37.1.0.tgz", + "integrity": "sha512-ImVcYYfz5oR/zqHGYdvgSvfHU/7ia/psAqjL+T/5OaqMRunALdUzdtuAsMkWGEH/oF8vKRsdGeWwsyrEvTF4XA==", + "dependencies": { + "@ckeditor/ckeditor5-ui": "^37.1.0", + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-paragraph": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-37.1.0.tgz", + "integrity": "sha512-64G9VU8xVYzJrOjngtw2Zg58mXTkf4fiBhR4lUT9yZNLpVJ/8DXtphGtuXEPrlfL4DVrthHUeNfEdQXA2DGGZQ==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-select-all": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-37.1.0.tgz", + "integrity": "sha512-E5f+TQuOsrhxj/8b8/5Lhym7hF8upeL61hHJpViBhf047F2qLcRBs8SXSm9PO0xS0nzg+RxigmkiYWI5inm74g==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-theme-lark": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-37.1.0.tgz", + "integrity": "sha512-BbiudXFoZeLFKNTx3H9Zbr4yLn696IfFnokflMsTJMCeEjT33RhbSNxTbr6m19bobBcs3wkJaSfh0/3L4daRzQ==", + "dependencies": { + "@ckeditor/ckeditor5-ui": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-typing": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-37.1.0.tgz", + "integrity": "sha512-dloH29SGgDu3torPKC6TDkaYvD1ic80m8WCk9xXaOUXzIYf73m+F5TQ/QcfONxb0++Sj1Pq1IQuIpqBOn82aXA==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-ui": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-37.1.0.tgz", + "integrity": "sha512-7qpA8yS2cSDJsTh+uaxFuvfprxmw0Kd1UWDqrLNv23jUHt+25cT+46/7VLP3hPdS/bwkXWxIXV6nAlrw3gTIjQ==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-undo": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-37.1.0.tgz", + "integrity": "sha512-BJMmi4mXCIZj0lO4AVL8+Fzoj6+fXx3yZxUl0i68wf+ogf36pclyiHlunIV9EKRv8OW/eY3WezRI0O2mVcKzJA==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-upload": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-37.1.0.tgz", + "integrity": "sha512-P0srTN1+gz8V4cOk+coY2HY7Gm8MkQAHPFEYCms1G1Kk7G32z4cyGWp9UqCPI0nX5GGM0qYd/Kd78BN/cNyJJw==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-utils": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-37.1.0.tgz", + "integrity": "sha512-r4rSbzMy0WFSuP0IRd+yYUMjzb279eiICksOEiHViiqoKQ8RqcGDlh+zOaACkgw6xvLxj96C5MwG2wsZsGJqcA==", + "dependencies": { + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-watchdog": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-37.1.0.tgz", + "integrity": "sha512-0d4WU2BO5n0tNzJl9iamnrFK+XEaK7gVEMIXcduznbupfFGVYFdrOXfDTdW0Yr59kpKEG8JbaWOF3aILjBRRWA==", + "dependencies": { + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/ckeditor5-widget": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-37.1.0.tgz", + "integrity": "sha512-7tWZLQrokqU28SK/gFoLgGhNshesiCC2nD+MtYie3PyXZ0nVhFDzCQxq94A02G1IpHdDW4WFKSmp2ix2z9lMNQ==", + "dependencies": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-enter": "^37.1.0", + "@ckeditor/ckeditor5-typing": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, + "node_modules/@ckeditor/vite-plugin-ckeditor5": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@ckeditor/vite-plugin-ckeditor5/-/vite-plugin-ckeditor5-0.1.1.tgz", + "integrity": "sha512-QCwah3HRCHXbQqywSdtrNX6zAlkyDxdNtPCrRRqIPZhTQauJ1Bu83JKQjEr4BuvIWIO+JhXVoj2qwLmWo4Jn7g==", + "hasInstallScript": true, + "dependencies": { + "postcss": "^8.4.12", + "postcss-import": "^14.1.0", + "postcss-mixins": "^9.0.2", + "postcss-nesting": "^10.1.4" + }, + "engines": { + "node": "^14.18.0 || >= 16" + } + }, + "node_modules/@ckeditor/vite-plugin-ckeditor5/node_modules/postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "dependencies": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/@csstools/selector-specificity": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", + "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", + "engines": { + "node": "^14 || ^16 || >=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "postcss-selector-parser": "^6.0.10" + } + }, "node_modules/@esbuild/android-arm": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", @@ -1055,15 +1355,6 @@ "node": ">= 8" } }, - "node_modules/@popperjs/core": { - "version": "2.11.7", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz", - "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1127,6 +1418,21 @@ "@types/trusted-types": "*" } }, + "node_modules/@types/lodash": { + "version": "4.14.194", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", + "integrity": "sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==", + "dev": true + }, + "node_modules/@types/lodash-es": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.7.tgz", + "integrity": "sha512-z0ptr6UI10VlU6l5MYhGwS4mC8DZyYer2mCoyysZtSF7p26zOX8UpbrV0YpNYLGS8K4PUFIyEr62IMFFjveSiQ==", + "dev": true, + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -1541,21 +1847,6 @@ "node": ">=8" } }, - "node_modules/bootstrap-icons": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", - "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ] - }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -1656,6 +1947,30 @@ "fsevents": "~2.3.2" } }, + "node_modules/ckeditor5": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/ckeditor5/-/ckeditor5-37.1.0.tgz", + "integrity": "sha512-sT/w0+pZ/p8ANrNaFI+LtUYRSUECFC1lvhQqGczGWEYD+pdYQTQxYVDy8QEYE5V9E5I7uvt4Dbcq9w6TjlLC/w==", + "dependencies": { + "@ckeditor/ckeditor5-clipboard": "^37.1.0", + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-enter": "^37.1.0", + "@ckeditor/ckeditor5-paragraph": "^37.1.0", + "@ckeditor/ckeditor5-select-all": "^37.1.0", + "@ckeditor/ckeditor5-typing": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-undo": "^37.1.0", + "@ckeditor/ckeditor5-upload": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "@ckeditor/ckeditor5-watchdog": "^37.1.0", + "@ckeditor/ckeditor5-widget": "^37.1.0" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=5.7.1" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2167,6 +2482,11 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -2474,6 +2794,27 @@ } } }, + "node_modules/postcss-mixins": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/postcss-mixins/-/postcss-mixins-9.0.4.tgz", + "integrity": "sha512-XVq5jwQJDRu5M1XGkdpgASqLk37OqkH4JCFDXl/Dn7janOJjCTEKL+36cnRVy7bMtoBzALfO7bV7nTIsFnUWLA==", + "dependencies": { + "fast-glob": "^3.2.11", + "postcss-js": "^4.0.0", + "postcss-simple-vars": "^7.0.0", + "sugarss": "^4.0.1" + }, + "engines": { + "node": ">=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, "node_modules/postcss-nested": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", @@ -2492,6 +2833,25 @@ "postcss": "^8.2.14" } }, + "node_modules/postcss-nesting": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-10.2.0.tgz", + "integrity": "sha512-EwMkYchxiDiKUhlJGzWsD9b2zvq/r2SSubcRrgP+jujMXFzqvANLt16lJANC+5uZ6hjI7lpRmI6O8JIl+8l1KA==", + "dependencies": { + "@csstools/selector-specificity": "^2.0.0", + "postcss-selector-parser": "^6.0.10" + }, + "engines": { + "node": "^12 || ^14 || >=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + }, + "peerDependencies": { + "postcss": "^8.2" + } + }, "node_modules/postcss-selector-parser": { "version": "6.0.11", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", @@ -2504,6 +2864,21 @@ "node": ">=4" } }, + "node_modules/postcss-simple-vars": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-7.0.1.tgz", + "integrity": "sha512-5GLLXaS8qmzHMOjVxqkk1TZPf1jMqesiI7qLhnlyERalG0sMbHIbJqrcnrpmZdKCLglHnRHoEBB61RtGTsj++A==", + "engines": { + "node": ">=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.1" + } + }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -2867,6 +3242,21 @@ "node": ">=8" } }, + "node_modules/sugarss": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", + "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.3.3" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -3220,6 +3610,210 @@ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==" }, + "@ckeditor/ckeditor5-basic-styles": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-37.1.0.tgz", + "integrity": "sha512-AwCiVsq5Wh0tBOPLOV0NADnZRNw210h1/xTzsO2U8TGBcbVJ4ukU07OMSvkOhi7jrA4wLZI7R+XmhZR0vsUGkA==", + "requires": { + "ckeditor5": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-clipboard": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-37.1.0.tgz", + "integrity": "sha512-0L1driXKRl1IUZ9amo+DVBGJuNjuVQ4nmuurIDqR1U8pRFt34wBzaIHivUbsKeZYe74RC4m4tE2DcUrltXwLAQ==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "@ckeditor/ckeditor5-widget": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-core": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-37.1.0.tgz", + "integrity": "sha512-edewiWlMCK5BPN9Can0A9skob9dNDMrv09khiKaUYK5PEobZZQSyUBck52vXpt255u2rnlmhF5phTqsQo5EiOw==", + "requires": { + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-editor-balloon": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-editor-balloon/-/ckeditor5-editor-balloon-37.1.0.tgz", + "integrity": "sha512-n2FktR7e2kS1nKJJS3NV2XcqDfY5LvGxrqu5Qkx+26TlSlIwr0Bs+apvlTqWWQw4maYHOb3JvKHNur4xBKl1eQ==", + "requires": { + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-engine": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-37.1.0.tgz", + "integrity": "sha512-D/xWNOgqk3G1qtv8P2UCmpHcIONjJE0NRJeJuJ8jppIgOYpbVG/7KSuzJYV7G1M9oGSBAeNb7U+lz7y/eg38Hw==", + "requires": { + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-enter": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-37.1.0.tgz", + "integrity": "sha512-m8e+yInNi4Hi5YWN0+Jj5ZFZjFvUi6VKPGsCSRyAmOiB3J9AO1/P4pYhhAXXpD7RzJQ0hmNiwZgRDZWeq/ZZNA==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-essentials": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-37.1.0.tgz", + "integrity": "sha512-LJl/3XHQpVvoFq22Z2JtNCog+0Z646MwEIZ70YyGyltA1fxXRpC0PrUg6NYND4AbDTHvWLUVTbQhhXzfSHw2KQ==", + "requires": { + "ckeditor5": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-link": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-link/-/ckeditor5-link-37.1.0.tgz", + "integrity": "sha512-ImVcYYfz5oR/zqHGYdvgSvfHU/7ia/psAqjL+T/5OaqMRunALdUzdtuAsMkWGEH/oF8vKRsdGeWwsyrEvTF4XA==", + "requires": { + "@ckeditor/ckeditor5-ui": "^37.1.0", + "ckeditor5": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-paragraph": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-37.1.0.tgz", + "integrity": "sha512-64G9VU8xVYzJrOjngtw2Zg58mXTkf4fiBhR4lUT9yZNLpVJ/8DXtphGtuXEPrlfL4DVrthHUeNfEdQXA2DGGZQ==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-select-all": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-37.1.0.tgz", + "integrity": "sha512-E5f+TQuOsrhxj/8b8/5Lhym7hF8upeL61hHJpViBhf047F2qLcRBs8SXSm9PO0xS0nzg+RxigmkiYWI5inm74g==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-theme-lark": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-37.1.0.tgz", + "integrity": "sha512-BbiudXFoZeLFKNTx3H9Zbr4yLn696IfFnokflMsTJMCeEjT33RhbSNxTbr6m19bobBcs3wkJaSfh0/3L4daRzQ==", + "requires": { + "@ckeditor/ckeditor5-ui": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-typing": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-37.1.0.tgz", + "integrity": "sha512-dloH29SGgDu3torPKC6TDkaYvD1ic80m8WCk9xXaOUXzIYf73m+F5TQ/QcfONxb0++Sj1Pq1IQuIpqBOn82aXA==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-ui": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-37.1.0.tgz", + "integrity": "sha512-7qpA8yS2cSDJsTh+uaxFuvfprxmw0Kd1UWDqrLNv23jUHt+25cT+46/7VLP3hPdS/bwkXWxIXV6nAlrw3gTIjQ==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-undo": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-37.1.0.tgz", + "integrity": "sha512-BJMmi4mXCIZj0lO4AVL8+Fzoj6+fXx3yZxUl0i68wf+ogf36pclyiHlunIV9EKRv8OW/eY3WezRI0O2mVcKzJA==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-upload": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-37.1.0.tgz", + "integrity": "sha512-P0srTN1+gz8V4cOk+coY2HY7Gm8MkQAHPFEYCms1G1Kk7G32z4cyGWp9UqCPI0nX5GGM0qYd/Kd78BN/cNyJJw==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0" + } + }, + "@ckeditor/ckeditor5-utils": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-37.1.0.tgz", + "integrity": "sha512-r4rSbzMy0WFSuP0IRd+yYUMjzb279eiICksOEiHViiqoKQ8RqcGDlh+zOaACkgw6xvLxj96C5MwG2wsZsGJqcA==", + "requires": { + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-watchdog": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-watchdog/-/ckeditor5-watchdog-37.1.0.tgz", + "integrity": "sha512-0d4WU2BO5n0tNzJl9iamnrFK+XEaK7gVEMIXcduznbupfFGVYFdrOXfDTdW0Yr59kpKEG8JbaWOF3aILjBRRWA==", + "requires": { + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/ckeditor5-widget": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-37.1.0.tgz", + "integrity": "sha512-7tWZLQrokqU28SK/gFoLgGhNshesiCC2nD+MtYie3PyXZ0nVhFDzCQxq94A02G1IpHdDW4WFKSmp2ix2z9lMNQ==", + "requires": { + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-enter": "^37.1.0", + "@ckeditor/ckeditor5-typing": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "lodash-es": "^4.17.15" + } + }, + "@ckeditor/vite-plugin-ckeditor5": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@ckeditor/vite-plugin-ckeditor5/-/vite-plugin-ckeditor5-0.1.1.tgz", + "integrity": "sha512-QCwah3HRCHXbQqywSdtrNX6zAlkyDxdNtPCrRRqIPZhTQauJ1Bu83JKQjEr4BuvIWIO+JhXVoj2qwLmWo4Jn7g==", + "requires": { + "postcss": "^8.4.12", + "postcss-import": "^14.1.0", + "postcss-mixins": "^9.0.2", + "postcss-nesting": "^10.1.4" + }, + "dependencies": { + "postcss-import": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-14.1.0.tgz", + "integrity": "sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==", + "requires": { + "postcss-value-parser": "^4.0.0", + "read-cache": "^1.0.0", + "resolve": "^1.1.7" + } + } + } + }, + "@csstools/selector-specificity": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", + "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", + "requires": {} + }, "@esbuild/android-arm": { "version": "0.17.18", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.18.tgz", @@ -3908,11 +4502,6 @@ "fastq": "^1.6.0" } }, - "@popperjs/core": { - "version": "2.11.7", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz", - "integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==" - }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -3976,6 +4565,21 @@ "@types/trusted-types": "*" } }, + "@types/lodash": { + "version": "4.14.194", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.194.tgz", + "integrity": "sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==", + "dev": true + }, + "@types/lodash-es": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.7.tgz", + "integrity": "sha512-z0ptr6UI10VlU6l5MYhGwS4mC8DZyYer2mCoyysZtSF7p26zOX8UpbrV0YpNYLGS8K4PUFIyEr62IMFFjveSiQ==", + "dev": true, + "requires": { + "@types/lodash": "*" + } + }, "@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -4281,11 +4885,6 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, - "bootstrap-icons": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", - "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==" - }, "brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -4339,6 +4938,26 @@ "readdirp": "~3.6.0" } }, + "ckeditor5": { + "version": "37.1.0", + "resolved": "https://registry.npmjs.org/ckeditor5/-/ckeditor5-37.1.0.tgz", + "integrity": "sha512-sT/w0+pZ/p8ANrNaFI+LtUYRSUECFC1lvhQqGczGWEYD+pdYQTQxYVDy8QEYE5V9E5I7uvt4Dbcq9w6TjlLC/w==", + "requires": { + "@ckeditor/ckeditor5-clipboard": "^37.1.0", + "@ckeditor/ckeditor5-core": "^37.1.0", + "@ckeditor/ckeditor5-engine": "^37.1.0", + "@ckeditor/ckeditor5-enter": "^37.1.0", + "@ckeditor/ckeditor5-paragraph": "^37.1.0", + "@ckeditor/ckeditor5-select-all": "^37.1.0", + "@ckeditor/ckeditor5-typing": "^37.1.0", + "@ckeditor/ckeditor5-ui": "^37.1.0", + "@ckeditor/ckeditor5-undo": "^37.1.0", + "@ckeditor/ckeditor5-upload": "^37.1.0", + "@ckeditor/ckeditor5-utils": "^37.1.0", + "@ckeditor/ckeditor5-watchdog": "^37.1.0", + "@ckeditor/ckeditor5-widget": "^37.1.0" + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -4744,6 +5363,11 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "lodash-es": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", + "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" + }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", @@ -4928,6 +5552,17 @@ "yaml": "^2.1.1" } }, + "postcss-mixins": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/postcss-mixins/-/postcss-mixins-9.0.4.tgz", + "integrity": "sha512-XVq5jwQJDRu5M1XGkdpgASqLk37OqkH4JCFDXl/Dn7janOJjCTEKL+36cnRVy7bMtoBzALfO7bV7nTIsFnUWLA==", + "requires": { + "fast-glob": "^3.2.11", + "postcss-js": "^4.0.0", + "postcss-simple-vars": "^7.0.0", + "sugarss": "^4.0.1" + } + }, "postcss-nested": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz", @@ -4936,6 +5571,15 @@ "postcss-selector-parser": "^6.0.11" } }, + "postcss-nesting": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-10.2.0.tgz", + "integrity": "sha512-EwMkYchxiDiKUhlJGzWsD9b2zvq/r2SSubcRrgP+jujMXFzqvANLt16lJANC+5uZ6hjI7lpRmI6O8JIl+8l1KA==", + "requires": { + "@csstools/selector-specificity": "^2.0.0", + "postcss-selector-parser": "^6.0.10" + } + }, "postcss-selector-parser": { "version": "6.0.11", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", @@ -4945,6 +5589,12 @@ "util-deprecate": "^1.0.2" } }, + "postcss-simple-vars": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/postcss-simple-vars/-/postcss-simple-vars-7.0.1.tgz", + "integrity": "sha512-5GLLXaS8qmzHMOjVxqkk1TZPf1jMqesiI7qLhnlyERalG0sMbHIbJqrcnrpmZdKCLglHnRHoEBB61RtGTsj++A==", + "requires": {} + }, "postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", @@ -5136,6 +5786,12 @@ "ts-interface-checker": "^0.1.9" } }, + "sugarss": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-4.0.1.tgz", + "integrity": "sha512-WCjS5NfuVJjkQzK10s8WOBY+hhDxxNt/N6ZaGwxFZ+wN3/lKKFSaaKUNecULcTTvE4urLcKaZFQD8vO0mOZujw==", + "requires": {} + }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", diff --git a/package.json b/package.json index bc0f8eb..260952e 100644 --- a/package.json +++ b/package.json @@ -9,23 +9,30 @@ "preview": "vite preview" }, "dependencies": { + "@ckeditor/ckeditor5-basic-styles": "^37.1.0", + "@ckeditor/ckeditor5-editor-balloon": "^37.1.0", + "@ckeditor/ckeditor5-essentials": "^37.1.0", + "@ckeditor/ckeditor5-link": "^37.1.0", + "@ckeditor/ckeditor5-paragraph": "^37.1.0", + "@ckeditor/ckeditor5-theme-lark": "^37.1.0", + "@ckeditor/vite-plugin-ckeditor5": "^0.1.1", "@fortawesome/fontawesome-free": "^6.4.0", - "@popperjs/core": "^2.11.7", "@types/marked": "^4.0.8", "@vueuse/components": "^10.1.0", "@vueuse/core": "^10.1.0", - "bootstrap-icons": "^1.10.5", "daisyui": "^2.51.6", "date-fns": "^2.29.3", "dompurify": "^3.0.2", "firebase": "^9.20.0", "hamburgers": "^1.2.1", + "lodash-es": "^4.17.21", "marked": "^4.3.0", "shortid": "^2.2.16", "vue": "^3.2.47" }, "devDependencies": { "@types/dompurify": "^3.0.2", + "@types/lodash-es": "^4.17.7", "@types/shortid": "^0.0.29", "@vitejs/plugin-vue": "^4.1.0", "autoprefixer": "^10.4.14", diff --git a/src/App.vue b/src/App.vue index 88cbd6e..80200b7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -28,7 +28,7 @@ const activeViewMode = ref(viewModes[0]) class="mt-[50px] px-3 py-6" />
+ }>, + required: true, + }, + config: { + type: Object as PropType, + default: () => ({}), + }, + modelValue: { + type: String, + default: '', + }, + tagName: { + type: String, + default: 'div', + }, + disabled: { + type: Boolean, + default: false, + }, + disableTwoWayDataBinding: { + type: Boolean, + default: false, + }, + }, + + emits: ['ready', 'destroy', 'blur', 'focus', 'input', 'update:modelValue'], + + data(): CKEditorComponentData { + return { + // Don't define it in #props because it produces a warning. + // https://v3.vuejs.org/guide/component-props.html#one-way-data-flow + instance: null, + lastEditorData: null, + } + }, + + watch: { + modelValue(value) { + // Synchronize changes of #modelValue. There are two sources of changes: + // + // External modelValue change ──────╮ + // ╰─────> ┏━━━━━━━━━━━┓ + // ┃ Component ┃ + // ╭─────> ┗━━━━━━━━━━━┛ + // Internal data change ──────╯ + // (typing, commands, collaboration) + // + // Case 1: If the change was external (via props), the editor data must be synced with + // the component using instance#setData() and it is OK to destroy the selection. + // + // Case 2: If the change is the result of internal data change, the #modelValue is the + // same as this.lastEditorData, which has been cached on #change:data. If we called + // instance#setData() at this point, that would demolish the selection. + // + // To limit the number of instance#setData() which is time-consuming when there is a + // lot of data we make sure: + // * the new modelValue is at least different than the old modelValue (Case 1.) + // * the new modelValue is different than the last internal instance state (Case 2.) + // + // See: https://github.com/ckeditor/ckeditor5-vue/issues/42. + if (this.instance && value !== this.lastEditorData) { + this.instance.data.set(value) + } + }, + + // Synchronize changes of #disabled. + disabled(readOnlyMode) { + if (readOnlyMode) { + this.instance!.enableReadOnlyMode(SAMPLE_READ_ONLY_LOCK_ID) + } else { + this.instance!.disableReadOnlyMode(SAMPLE_READ_ONLY_LOCK_ID) + } + }, + }, + + created() { + const { CKEDITOR_VERSION } = window + + if (CKEDITOR_VERSION) { + const [major] = CKEDITOR_VERSION.split('.').map(Number) + + if (major < 37) { + console.warn( + 'The component requires using CKEditor 5 in version 37 or higher.' + ) + } + } else { + console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.') + } + }, + + mounted() { + // Clone the config first so it never gets mutated (across multiple editor instances). + // https://github.com/ckeditor/ckeditor5-vue/issues/101 + const editorConfig: EditorConfig = Object.assign({}, this.config) + + if (this.modelValue) { + editorConfig.initialData = this.modelValue + } + + this.editor + .create(this.$el, editorConfig) + .then((editor) => { + // Save the reference to the instance for further use. + this.instance = markRaw(editor) + + this.setUpEditorEvents() + + // Synchronize the editor content. The #modelValue may change while the editor is being created, so the editor content has + // to be synchronized with these potential changes as soon as it is ready. + if (this.modelValue !== editorConfig.initialData) { + editor.data.set(this.modelValue) + } + + // Set initial disabled state. + if (this.disabled) { + editor.enableReadOnlyMode(SAMPLE_READ_ONLY_LOCK_ID) + } + + // Let the world know the editor is ready. + this.$emit('ready', editor) + }) + .catch((error) => { + console.error(error) + }) + }, + + beforeUnmount() { + if (this.instance) { + this.instance.destroy() + this.instance = null + } + + // Note: By the time the editor is destroyed (promise resolved, editor#destroy fired) + // the Vue component will not be able to emit any longer. So emitting #destroy a bit earlier. + this.$emit('destroy', this.instance) + }, + + methods: { + setUpEditorEvents() { + const editor = this.instance! + + // Use the leading edge so the first event in the series is emitted immediately. + // Failing to do so leads to race conditions, for instance, when the component modelValue + // is set twice in a time span shorter than the debounce time. + // See https://github.com/ckeditor/ckeditor5-vue/issues/149. + const emitDebouncedInputEvent = debounce( + (evt) => { + if (this.disableTwoWayDataBinding) { + return + } + + // Cache the last editor data. This kind of data is a result of typing, + // editor command execution, collaborative changes to the document, etc. + // This data is compared when the component modelValue changes in a 2-way binding. + const data = (this.lastEditorData = editor.data.get()) + + // The compatibility with the v-model and general Vue.js concept of input–like components. + this.$emit('update:modelValue', data, evt, editor) + this.$emit('input', data, evt, editor) + }, + INPUT_EVENT_DEBOUNCE_WAIT, + { leading: true } + ) + + // Debounce emitting the #input event. When data is huge, instance#getData() + // takes a lot of time to execute on every single key press and ruins the UX. + // + // See: https://github.com/ckeditor/ckeditor5-vue/issues/42 + editor.model.document.on('change:data', emitDebouncedInputEvent) + + editor.editing.view.document.on('focus', (evt) => { + this.$emit('focus', evt, editor) + }) + + editor.editing.view.document.on('blur', (evt) => { + this.$emit('blur', evt, editor) + }) + }, + }, + + render() { + return h(this.tagName) + }, +}) diff --git a/src/components/Note.vue b/src/components/Note.vue index 8215273..120d4e8 100644 --- a/src/components/Note.vue +++ b/src/components/Note.vue @@ -1,5 +1,6 @@ + + diff --git a/src/main.ts b/src/main.ts index e134d79..3914ee0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,8 +1,6 @@ import { createApp } from 'vue' -// import './assets/style.scss' import '@/style.css' import '@fortawesome/fontawesome-free/css/all.min.css' -import 'bootstrap-icons/font/bootstrap-icons.css' import App from './App.vue' import { setDefaultNotes } from '@/composables/useNotes' import { defaultNotes } from '@/utils/defaultNotes' diff --git a/src/style.css b/src/style.css index eddb46c..db6f84d 100644 --- a/src/style.css +++ b/src/style.css @@ -11,3 +11,7 @@ html { body { overflow-y: auto; } + +.ck-body-wrapper { + height: 0; +} diff --git a/vite.config.ts b/vite.config.ts index cf60ce1..b5d1612 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -2,9 +2,17 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import path from 'path' +// CKEditor +import { createRequire } from 'node:module'; +import ckeditor5 from '@ckeditor/vite-plugin-ckeditor5' +const require = createRequire( import.meta.url ); + // https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], + plugins: [ + vue(), + ckeditor5({ theme: require.resolve('@ckeditor/ckeditor5-theme-lark') }), + ], resolve: { alias: { '@': path.resolve(__dirname, './src'),