diff --git a/.eslintrc.js b/.eslintrc.js index cd6e25b14..3554b4b72 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,7 +13,8 @@ module.exports = { 'header', 'mocha', 'eslint-plugin-tsdoc', - 'eslint-plugin-import' + 'simple-import-sort', + 'import' ], extends: [ 'eslint:recommended', @@ -76,7 +77,34 @@ module.exports = { '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'error', - 'no-fallthrough': 'off' + 'no-fallthrough': 'off', + 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], + 'simple-import-sort/exports': 'error', + 'import/first': 'error', + 'import/newline-after-import': 'error', + 'import/no-duplicates': 'error', + 'simple-import-sort/imports': [ + 'error', + { + groups: [ + [ + 'jodit/types.*\\u0000$', + 'jodit/types', + 'jodit/.*\\u0000$', + 'jodit/core', + 'jodit/modules' + ], + // Side effect imports. + ['^\\u0000'], + // Parent imports. Put `..` last. + ['^\\.\\.(?!/?$)', '^\\.\\./?$'], + // Other relative imports. Put same-folder imports and `.` last. + ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], + // Style imports. + ['^.+\\.s?(css|less)$'] + ] + } + ] }, overrides: [ { diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 8eec8f262..0cc41cb69 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,9 +3,9 @@ **Jodit Version:** 3.4.xxxxx -**Browser:** -**OS:** -**Is React App:** +**Browser:** +**OS:** +**Is React App:** **Code** diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 904967b7d..47d2c9d57 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,8 +3,6 @@ name: Generate documentation on: push: branches: [main] - pull_request: - branches: [main] jobs: docs: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 80bd5ca7e..39786af2f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -4,7 +4,6 @@ on: push: branches: - main - pull_request: jobs: build: diff --git a/.github/workflows/xdsoft.yml b/.github/workflows/xdsoft.yml index 696bf48e8..a2067a2d9 100644 --- a/.github/workflows/xdsoft.yml +++ b/.github/workflows/xdsoft.yml @@ -5,10 +5,6 @@ on: branches: [main] tags-ignore: - '*' - pull_request: - branches: [main] - tags-ignore: - - '*' jobs: docs: diff --git a/.gitignore b/.gitignore index ad432bf65..68607eb2d 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ yarn-error.log build/* examples/build/ +.env diff --git a/.nvmrc b/.nvmrc index 4a1f488b6..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.17.1 +18 diff --git a/CHANGELOG.md b/CHANGELOG.md index fb5cb1384..294227648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,69 @@ > - :house: [Internal] > - :nail_care: [Polish] +## 4.1.1 + +- Added plugin AI Assistant. https://github.com/xdan/jodit/pull/1088 Thanks @huizarmx + +#### :house: Internal + +- Update dependencies + +```plain + +@tsconfig/node18 ^18.2.2 → ^18.2.4 +@types/node ^20.11.25 → ^20.12.2 +@typescript-eslint/eslint-plugin ^7.1.1 → ^7.5.0 +@typescript-eslint/parser ^7.1.1 → ^7.5.0 +autoprefixer ^10.4.18 → ^10.4.19 +axios ^1.6.7 → ^1.6.8 +core-js ^3.36.0 → ^3.36.1 +cssnano-preset-advanced ^6.1.0 → ^6.1.2 +eslint-plugin-mocha ^10.4.0 → ^10.4.1 +glob ^10.3.10 → ^10.3.12 +mocha ^10.3.0 → ^10.4.0 +open ^10.0.4 → ^10.1.0 +postcss >=8.4.35 → >=8.4.38 +stylelint ^16.2.1 → ^16.3.1 +typescript ^5.4.2 → ^5.4.3 +webpack 5.90.3 → 5.91.0 +webpack-dev-middleware ^7.0.0 → ^7.2.0 +webpack-dev-server ^5.0.2 → ^5.0.4 +``` + +- Update dependencies + +```plain +@types/node ^20.10.7 → ^20.11.25 +@typescript-eslint/eslint-plugin ^6.18.0 → ^7.1.1 +@typescript-eslint/parser ^6.18.0 → ^7.1.1 +autoprefixer ^10.4.16 → ^10.4.18 +axios ^1.6.5 → ^1.6.7 +core-js ^3.35.0 → ^3.36.0 +css-loader ^6.8.1 → ^6.10.0 +css-minimizer-webpack-plugin ^5.0.1 → ^6.0.0 +cssnano-preset-advanced ^6.0.3 → ^6.1.0 +eslint ^8.56.0 → ^8.57.0 +eslint-plugin-mocha ^10.2.0 → ^10.4.0 +eslint-plugin-prettier ^5.1.2 → ^5.1.3 +karma ^6.4.2 → ^6.4.3 +karma-firefox-launcher ^2.1.2 → ^2.1.3 +less-loader ^11.1.4 → ^12.2.0 +mini-css-extract-plugin ^2.7.6 → ^2.8.1 +mocha ^10.2.0 → ^10.3.0 +node-jq ^4.2.2 → ^4.3.1 +open ^10.0.3 → ^10.0.4 +postcss >=8.4.33 → >=8.4.35 +postcss-loader ^7.3.4 → ^8.1.1 +prettier ^3.1.1 → ^3.2.5 +style-loader ^3.3.3 → ^3.3.4 +stylelint ^16.1.0 → ^16.2.1 +typescript ^5.3.3 → ^5.4.2 +webpack 5.89.0 → 5.90.3 +webpack-dev-server ^4.15.1 → ^5.0.2 +webpack-hot-middleware ^2.26.0 → ^2.26.1 +``` + ## 4.0.15 - Fixed bug in `beforeInit` hook. If the hook returned a promise, and the editor was destroyed after that, @@ -53,7 +116,7 @@ ### :bug: Bug Fix -- [Folder rename not working if "space" is added in folder name #1054](https://github.com/xdan/jodit/issues/1054) +- [Folder renames not working if "space" is added in folder name #1054](https://github.com/xdan/jodit/issues/1054) #### :house: Internal @@ -149,7 +212,7 @@ typescript ^5.2.2 → ^5.3.2 }); ``` -- [copy pasting twitter or istagram or etc not as expected #1032](https://github.com/xdan/jodit/issues/1032) +- [copy pasting twitter or istagram or etc. not as expected #1032](https://github.com/xdan/jodit/issues/1032) ## 4.0.0-beta.97 @@ -318,8 +381,8 @@ webpack 5.88.2 → 5.89.0 #### :boom: Breaking Change - Removed deprecated selection.applyStyle method -- Changed Create.sandbox signature to return body,iframe tuple -- In the plugin system, the requires field has been removed from instances, +- Change Creates. Sandbox signature to return body,iframe tuple +- In the plugin system, the requirement field has been removed from instances, only the field in the constructor has been left ```js class somePlugin extends Jodit.modulules.Plugin { @@ -2470,11 +2533,11 @@ Related with https://github.com/xdan/jodit/issues/574. In some cases need to lim - @property {IUIOption[]} link.selectOptionsClassName=[] The list of the option for the select (to use with modeClassName="select") - ex: [ -- { value: "", text: "" }, -- { value: "val1", text: "text1" }, -- { value: "val2", text: "text2" }, -- { value: "val3", text: "text3" } -- ] +- { value: "", text: "" }, +- { value: "val1", text: "text1" }, +- { value: "val2", text: "text2" }, +- { value: "val3", text: "text3" } +- ] PR: https://github.com/xdan/jodit/pull/577 Thanks @s-renier-taonix-fr ##### New option `statusbar: boolean = true` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df81a6fd8..61bcee0b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ Build min files: make build ``` -Build without some plugins: +Build without any plugins: ```bash make build es=es2021 uglify=true excludePlugins="about,source,bold,image,xpath,stat,class-span,color,clean-html,file,focus,enter,backspace,media,preview,pint,redo-undo,resize-cells,search,spellcheck,table" diff --git a/make.js b/make.js index 6d00bdb93..b7a7efb72 100644 --- a/make.js +++ b/make.js @@ -4,5 +4,9 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ module.exports = { - paths: ['./src/plugins/speech-recognize/', './src/plugins/debug/'] + paths: [ + './src/plugins/speech-recognize/', + './src/plugins/ai-assistent/', + './src/plugins/debug/' + ] }; diff --git a/package-lock.json b/package-lock.json index ddfafd353..7f4d6d838 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,67 +1,69 @@ { "name": "jodit", - "version": "4.0.19", + "version": "4.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "jodit", - "version": "4.0.19", + "version": "4.1.1", "license": "MIT", "dependencies": { "autobind-decorator": "^2.4.0" }, "devDependencies": { - "@tsconfig/node18": "^18.2.2", + "@tsconfig/node18": "^18.2.4", "@types/ace": "^0.0.52", "@types/fs-extra": "^11.0.4", "@types/karma": "^6.3.8", - "@types/node": "^20.10.7", + "@types/node": "^20.12.5", "@types/postcss-css-variables": "^0.18.3", "@types/yargs": "^17.0.32", - "@typescript-eslint/eslint-plugin": "^6.18.0", - "@typescript-eslint/parser": "^6.18.0", - "autoprefixer": "^10.4.16", - "axios": "^1.6.5", - "chai": "^4.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", + "autoprefixer": "^10.4.19", + "axios": "^1.6.8", + "chai": "^4.4.1", "classlist-polyfill": "^1.2.0", "compression": "^1.7.4", - "core-js": "^3.35.0", + "core-js": "^3.36.1", "cross-env": "^7.0.3", - "css-loader": "^6.8.1", - "css-minimizer-webpack-plugin": "^5.0.1", - "cssnano-preset-advanced": "^6.0.3", + "css-loader": "^7.0.0", + "css-minimizer-webpack-plugin": "^6.0.0", + "cssnano-preset-advanced": "^6.1.2", + "dotenv": "^16.4.5", "es6-promise": "^4.2.8", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-mocha": "^10.2.0", - "eslint-plugin-prettier": "^5.1.2", + "eslint-plugin-mocha": "^10.4.1", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-simple-import-sort": "^12.0.0", "eslint-plugin-tsdoc": "^0.2.17", - "glob": "^10.3.10", - "karma": "^6.4.2", + "glob": "^10.3.12", + "karma": "^6.4.3", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^3.2.0", - "karma-firefox-launcher": "^2.1.2", + "karma-firefox-launcher": "^2.1.3", "karma-mocha": "^2.0.1", "karma-sourcemap-loader": "^0.4.0", "less": "^4.2.0", - "less-loader": "^11.1.4", + "less-loader": "^12.2.0", "merge-stream": "^2.0.0", - "mini-css-extract-plugin": "^2.7.6", - "mocha": "^10.2.0", - "node-jq": "^4.2.2", - "open": "^10.0.3", - "postcss": ">=8.4.33", + "mini-css-extract-plugin": "^2.8.1", + "mocha": "^10.4.0", + "node-jq": "^4.3.1", + "open": "^10.1.0", + "postcss": ">=8.4.38", "postcss-css-variables": "^0.19.0", "postcss-less": "^6.0.0", - "postcss-loader": "^7.3.4", - "prettier": "^3.1.1", + "postcss-loader": "^8.1.1", + "prettier": "^3.2.5", "raw-loader": "^4.0.2", "replace": "^1.2.2", - "style-loader": "^3.3.3", - "stylelint": "^16.1.0", + "style-loader": "^3.3.4", + "stylelint": "^16.3.1", "stylelint-config-idiomatic-order": "v10.0.0", "stylelint-config-standard": "^36.0.0", "stylelint-prettier": "^5.0.0", @@ -70,12 +72,12 @@ "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tslib": "^2.6.2", - "typescript": "^5.3.3", - "webpack": "5.89.0", + "typescript": "^5.4.4", + "webpack": "5.91.0", "webpack-cli": "^5.1.4", - "webpack-dev-middleware": "^7.0.0", - "webpack-dev-server": "^4.15.1", - "webpack-hot-middleware": "^2.26.0", + "webpack-dev-middleware": "^7.2.1", + "webpack-dev-server": "^5.0.4", + "webpack-hot-middleware": "^2.26.1", "yargs": "^17.7.2" } }, @@ -89,89 +91,18 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", + "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "@babel/highlight": "^7.24.2", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/helper-validator-identifier": { "version": "7.22.20", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", @@ -182,14 +113,15 @@ } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.2", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.2.tgz", + "integrity": "sha512-Yac1ao4flkTxTteCDZLEvdxg2fZfz1v8M4QpaGypq/WPDqg3ijHYbDfs+LG5hvzSoqaSZ9/Z9lKSP3CjZjv+pA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -298,9 +230,9 @@ } }, "node_modules/@csstools/css-parser-algorithms": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.5.0.tgz", - "integrity": "sha512-abypo6m9re3clXA00eu5syw+oaPHbJTPapu9C4pzNsJ4hdZDzushT50Zhu+iIYXgEe1CxnRMn7ngsbV+MLrlpQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.6.1.tgz", + "integrity": "sha512-ubEkAaTfVZa+WwGhs5jbo5Xfqpeaybr/RvWzvFxRs4jfq16wH8l8Ty/QEEpINxll4xhuGfdMbipRyz5QZh9+FA==", "dev": true, "funding": [ { @@ -316,13 +248,13 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-tokenizer": "^2.2.3" + "@csstools/css-tokenizer": "^2.2.4" } }, "node_modules/@csstools/css-tokenizer": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.3.tgz", - "integrity": "sha512-pp//EvZ9dUmGuGtG1p+n17gTHEOqu9jO+FiCUjNN3BDmyhdA2Jq9QsVeR7K8/2QCK17HSsioPlTW9ZkzoWb3Lg==", + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.2.4.tgz", + "integrity": "sha512-PuWRAewQLbDhGeTvFuq2oClaSCKPIBmHyIobCV39JHRYN0byDcUWJl5baPeNUcqrjtdMNqFooE0FGl31I3JOqw==", "dev": true, "funding": [ { @@ -339,9 +271,9 @@ } }, "node_modules/@csstools/media-query-list-parser": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.7.tgz", - "integrity": "sha512-lHPKJDkPUECsyAvD60joYfDmp8UERYxHGkFfyLJFTVK/ERJe0sVlIFLXU5XFxdjNDTerp5L4KeaKG+Z5S94qxQ==", + "version": "2.1.9", + "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.1.9.tgz", + "integrity": "sha512-qqGuFfbn4rUmyOB0u8CVISIp5FfJ5GAR3mBrZ9/TKndHakdnm6pY0L/fbLcpPnrzwCyyTEZl1nUcXAYHEWneTA==", "dev": true, "funding": [ { @@ -357,14 +289,14 @@ "node": "^14 || ^16 || >=18" }, "peerDependencies": { - "@csstools/css-parser-algorithms": "^2.5.0", - "@csstools/css-tokenizer": "^2.2.3" + "@csstools/css-parser-algorithms": "^2.6.1", + "@csstools/css-tokenizer": "^2.2.4" } }, "node_modules/@csstools/selector-specificity": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.1.tgz", - "integrity": "sha512-NPljRHkq4a14YzZ3YD406uaxh7s0g6eAq3L9aLOWywoqe8PkYamAvtsh7KNX6c++ihDrJ0RiU+/z7rGnhlZ5ww==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.3.tgz", + "integrity": "sha512-KEPNw4+WW5AVEIyzC80rTbWEUatTW2lXpN8+8ILC8PiPeWPjwUzrPZDIOZ2wwqDmeqOYTdSGyL3+vE5GC3FB3Q==", "dev": true, "funding": [ { @@ -392,6 +324,16 @@ "node": ">=10.0.0" } }, + "node_modules/@dual-bundle/import-meta-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@dual-bundle/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-ZKXyJeFAzcpKM2kk8ipoGIPUqx9BX52omTGnfwjJvxOCaZTM2wtDK7zN0aIgPRbT9XYAlha0HtmZ+XKteuh0Gw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -462,9 +404,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -486,13 +428,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -535,9 +477,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "dev": true }, "node_modules/@isaacs/cliui": { @@ -614,45 +556,45 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -662,9 +604,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.20", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", - "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -672,9 +614,9 @@ } }, "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", - "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.5.tgz", + "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==", "dev": true }, "node_modules/@microsoft/tsdoc": { @@ -754,9 +696,9 @@ } }, "node_modules/@pkgr/core": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.0.tgz", - "integrity": "sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", "dev": true, "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" @@ -766,9 +708,9 @@ } }, "node_modules/@sideway/address": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", - "integrity": "sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", "dev": true, "dependencies": { "@hapi/hoek": "^9.0.0" @@ -808,9 +750,9 @@ } }, "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", "dev": true }, "node_modules/@tsconfig/node12": { @@ -832,9 +774,9 @@ "dev": true }, "node_modules/@tsconfig/node18": { - "version": "18.2.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.2.tgz", - "integrity": "sha512-d6McJeGsuoRlwWZmVIeE8CUA27lu6jLjvv1JzqmpsytOYYbVi1tHZEnwCNVOXnj4pyLvneZlFlpXUK+X9wBWyw==", + "version": "18.2.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", + "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", "dev": true }, "node_modules/@types/ace": { @@ -897,9 +839,9 @@ } }, "node_modules/@types/eslint": { - "version": "8.56.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.1.tgz", - "integrity": "sha512-18PLWRzhy9glDQp3+wOgfLYRWlhgX0azxgJ63rdpoUHyrC9z0f5CkFburjQx4uD7ZCruw85ZtMt6K+L+R8fLJQ==", + "version": "8.56.7", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.7.tgz", + "integrity": "sha512-SjDvI/x3zsZnOkYZ3lCt9lOZWZLB2jIlNKz+LBgCtDurK0JZcwucxYHn1w2BJkD34dgX9Tjnak0txtq4WTggEA==", "dev": true, "dependencies": { "@types/estree": "*", @@ -935,9 +877,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.41", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", - "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.0.tgz", + "integrity": "sha512-bGyep3JqPCRry1wq+O5n7oiBgGWmeIJXPjXXCo8EK0u8duZGSYar7cGqd3ML2JUsLGeB7fmc06KYo9fLGWqPvQ==", "dev": true, "dependencies": { "@types/node": "*", @@ -1033,9 +975,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.10.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.7.tgz", - "integrity": "sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==", + "version": "20.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz", + "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -1060,9 +1002,9 @@ } }, "node_modules/@types/qs": { - "version": "6.9.11", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", - "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", + "version": "6.9.14", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", + "integrity": "sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==", "dev": true }, "node_modules/@types/range-parser": { @@ -1072,15 +1014,15 @@ "dev": true }, "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.2.tgz", + "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==", "dev": true }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/send": { @@ -1103,14 +1045,14 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", - "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", + "version": "1.15.7", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.7.tgz", + "integrity": "sha512-W8Ym+h8nhuRwaKPaDw34QUkwsGi6Rc4yYqvKFo5rm2FUEhCFbzVWrxXUxuKK8TASjWsysJY0nsmNCGhCOIsrOw==", "dev": true, "dependencies": { "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" + "@types/node": "*", + "@types/send": "*" } }, "node_modules/@types/sockjs": { @@ -1147,16 +1089,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.0.tgz", - "integrity": "sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz", + "integrity": "sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/type-utils": "6.18.0", - "@typescript-eslint/utils": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/type-utils": "7.5.0", + "@typescript-eslint/utils": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -1165,15 +1107,15 @@ "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1181,39 +1123,27 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.18.0.tgz", - "integrity": "sha512-v6uR68SFvqhNQT41frCMCQpsP+5vySy6IdgjlzUWoo7ALCnpaWYcz/Ij2k4L8cEsL0wkvOviCMpjmtRtHNOKzA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1222,16 +1152,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.0.tgz", - "integrity": "sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", + "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0" + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1239,25 +1169,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.0.tgz", - "integrity": "sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz", + "integrity": "sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.18.0", - "@typescript-eslint/utils": "6.18.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/utils": "7.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1265,25 +1195,13 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, "node_modules/@typescript-eslint/types": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.0.tgz", - "integrity": "sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", + "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", "dev": true, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1291,13 +1209,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.0.tgz", - "integrity": "sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", + "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/visitor-keys": "6.18.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1306,7 +1224,7 @@ "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1318,54 +1236,42 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/ts-api-utils": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.1.tgz", - "integrity": "sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, "node_modules/@typescript-eslint/utils": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.0.tgz", - "integrity": "sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz", + "integrity": "sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.18.0", - "@typescript-eslint/types": "6.18.0", - "@typescript-eslint/typescript-estree": "6.18.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", "semver": "^7.5.4" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.0.tgz", - "integrity": "sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", + "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.18.0", + "@typescript-eslint/types": "7.5.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", @@ -1379,9 +1285,9 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", @@ -1401,9 +1307,9 @@ "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { @@ -1424,15 +1330,15 @@ "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -1460,28 +1366,28 @@ "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -1489,24 +1395,24 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -1515,12 +1421,12 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -1624,9 +1530,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", - "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1767,13 +1673,16 @@ "dev": true }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1786,15 +1695,16 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -1814,16 +1724,17 @@ } }, "node_modules/array.prototype.findlastindex": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", - "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -1869,17 +1780,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -1923,9 +1835,9 @@ } }, "node_modules/autoprefixer": { - "version": "10.4.16", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz", - "integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==", + "version": "10.4.19", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz", + "integrity": "sha512-BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==", "dev": true, "funding": [ { @@ -1942,9 +1854,9 @@ } ], "dependencies": { - "browserslist": "^4.21.10", - "caniuse-lite": "^1.0.30001538", - "fraction.js": "^4.3.6", + "browserslist": "^4.23.0", + "caniuse-lite": "^1.0.30001599", + "fraction.js": "^4.3.7", "normalize-range": "^0.1.2", "picocolors": "^1.0.0", "postcss-value-parser": "^4.2.0" @@ -1960,10 +1872,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -1972,12 +1887,12 @@ } }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", + "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", "dev": true, "dependencies": { - "follow-redirects": "^1.15.4", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" } @@ -2071,12 +1986,15 @@ } }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/bl": { @@ -2138,9 +2056,9 @@ "dev": true }, "node_modules/bonjour-service": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.0.tgz", - "integrity": "sha512-xdzMA6JGckxyJzZByjEWRcfKmDxXaGXZWVftah3FkCqdlePNS9DjHSUN5zkP4oEfz/t0EXXlro88EIhzwMB4zA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", + "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -2181,9 +2099,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz", + "integrity": "sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ==", "dev": true, "funding": [ { @@ -2200,8 +2118,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -2298,14 +2216,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2345,9 +2268,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001589", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", - "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==", + "version": "1.0.30001606", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001606.tgz", + "integrity": "sha512-LPbwnW4vfpJId225pwjZJOgX1m9sGfbw/RKJvw/t0QhYOOaTXHvkjVGFGPpvwEzufrjvTlsULnVTxdy4/6cqkg==", "dev": true, "funding": [ { @@ -2380,9 +2303,9 @@ } }, "node_modules/chai": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.0.tgz", - "integrity": "sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", + "integrity": "sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", @@ -2426,16 +2349,10 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -2448,6 +2365,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -2788,9 +2708,9 @@ } }, "node_modules/core-js": { - "version": "3.35.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.35.0.tgz", - "integrity": "sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg==", + "version": "3.36.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.36.1.tgz", + "integrity": "sha512-BTvUrwxVBezj5SZ3f10ImnX2oRByMxql3EimVqMysepbC9EeMUOpLwdy6Eoili2x6E4kf+ZUB5k/+Jv55alPfA==", "dev": true, "hasInstallScript": true, "funding": { @@ -2817,6 +2737,32 @@ "node": ">= 0.10" } }, + "node_modules/cosmiconfig": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", + "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.1", + "import-fresh": "^3.3.0", + "js-yaml": "^4.1.0", + "parse-json": "^5.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2856,9 +2802,9 @@ } }, "node_modules/css-declaration-sorter": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.1.1.tgz", - "integrity": "sha512-dZ3bVTEEc1vxr3Bek9vGwfB5Z6ESPULhcRvO472mfjVnj8jRcTnKO8/JTczlvxM10Myb+wBM++1MtdO76eWcaQ==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", + "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", "dev": true, "engines": { "node": "^14 || ^16 || >=18" @@ -2877,46 +2823,55 @@ } }, "node_modules/css-loader": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", - "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.0.0.tgz", + "integrity": "sha512-WrO4FVoamxt5zY9CauZjoJgXRi/LZKIk+Ta7YvpSGr5r/eMYPNp5/T9ODlMe4/1rF5DYlycG1avhV4g3A/tiAw==", "dev": true, "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.21", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.3", - "postcss-modules-scope": "^3.0.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/css-minimizer-webpack-plugin": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-5.0.1.tgz", - "integrity": "sha512-3caImjKFQkS+ws1TGcFn0V1HyDJFq1Euy589JlD6/3rV2kj+w7r5G9WDMgSHvpvXHNZ2calVypZWuEDQd9wfLg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-6.0.0.tgz", + "integrity": "sha512-BLpR9CCDkKvhO3i0oZQgad6v9pCxUuhSc5RT6iUEy9M8hBXi4TJb5vqF2GQ2deqYHmRi3O6IR9hgAZQWg0EBwA==", "dev": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.18", - "cssnano": "^6.0.1", - "jest-worker": "^29.4.3", - "postcss": "^8.4.24", - "schema-utils": "^4.0.1", - "serialize-javascript": "^6.0.1" + "@jridgewell/trace-mapping": "^0.3.21", + "cssnano": "^6.0.3", + "jest-worker": "^29.7.0", + "postcss": "^8.4.33", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" }, "engines": { - "node": ">= 14.15.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", @@ -3000,13 +2955,13 @@ } }, "node_modules/cssnano": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.0.3.tgz", - "integrity": "sha512-MRq4CIj8pnyZpcI2qs6wswoYoDD1t0aL28n+41c1Ukcpm56m1h6mCexIHBGjfZfnTqtGSSCP4/fB1ovxgjBOiw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", + "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", "dev": true, "dependencies": { - "cssnano-preset-default": "^6.0.3", - "lilconfig": "^3.0.0" + "cssnano-preset-default": "^6.1.2", + "lilconfig": "^3.1.1" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -3020,17 +2975,18 @@ } }, "node_modules/cssnano-preset-advanced": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-6.0.3.tgz", - "integrity": "sha512-+DIOR5FFId+nb6/JcBkAMiXYDadEx2waDmSDhAA3rL1Q1N1AaZP0N25jiZnqLp3MdWnRg9t9CNaDs/OdB/lpPg==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-6.1.2.tgz", + "integrity": "sha512-Nhao7eD8ph2DoHolEzQs5CfRpiEP0xa1HBdnFZ82kvqdmbwVBUr2r1QuQ4t1pi+D1ZpqpcO4T+wy/7RxzJ/WPQ==", "dev": true, "dependencies": { - "autoprefixer": "^10.4.16", - "cssnano-preset-default": "^6.0.3", - "postcss-discard-unused": "^6.0.2", - "postcss-merge-idents": "^6.0.1", - "postcss-reduce-idents": "^6.0.2", - "postcss-zindex": "^6.0.1" + "autoprefixer": "^10.4.19", + "browserslist": "^4.23.0", + "cssnano-preset-default": "^6.1.2", + "postcss-discard-unused": "^6.0.5", + "postcss-merge-idents": "^6.0.3", + "postcss-reduce-idents": "^6.0.3", + "postcss-zindex": "^6.0.2" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -3040,40 +2996,41 @@ } }, "node_modules/cssnano-preset-default": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.0.3.tgz", - "integrity": "sha512-4y3H370aZCkT9Ev8P4SO4bZbt+AExeKhh8wTbms/X7OLDo5E7AYUUy6YPxa/uF5Grf+AJwNcCnxKhZynJ6luBA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", + "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", "dev": true, "dependencies": { - "css-declaration-sorter": "^7.1.1", - "cssnano-utils": "^4.0.1", + "browserslist": "^4.23.0", + "css-declaration-sorter": "^7.2.0", + "cssnano-utils": "^4.0.2", "postcss-calc": "^9.0.1", - "postcss-colormin": "^6.0.2", - "postcss-convert-values": "^6.0.2", - "postcss-discard-comments": "^6.0.1", - "postcss-discard-duplicates": "^6.0.1", - "postcss-discard-empty": "^6.0.1", - "postcss-discard-overridden": "^6.0.1", - "postcss-merge-longhand": "^6.0.2", - "postcss-merge-rules": "^6.0.3", - "postcss-minify-font-values": "^6.0.1", - "postcss-minify-gradients": "^6.0.1", - "postcss-minify-params": "^6.0.2", - "postcss-minify-selectors": "^6.0.2", - "postcss-normalize-charset": "^6.0.1", - "postcss-normalize-display-values": "^6.0.1", - "postcss-normalize-positions": "^6.0.1", - "postcss-normalize-repeat-style": "^6.0.1", - "postcss-normalize-string": "^6.0.1", - "postcss-normalize-timing-functions": "^6.0.1", - "postcss-normalize-unicode": "^6.0.2", - "postcss-normalize-url": "^6.0.1", - "postcss-normalize-whitespace": "^6.0.1", - "postcss-ordered-values": "^6.0.1", - "postcss-reduce-initial": "^6.0.2", - "postcss-reduce-transforms": "^6.0.1", - "postcss-svgo": "^6.0.2", - "postcss-unique-selectors": "^6.0.2" + "postcss-colormin": "^6.1.0", + "postcss-convert-values": "^6.1.0", + "postcss-discard-comments": "^6.0.2", + "postcss-discard-duplicates": "^6.0.3", + "postcss-discard-empty": "^6.0.3", + "postcss-discard-overridden": "^6.0.2", + "postcss-merge-longhand": "^6.0.5", + "postcss-merge-rules": "^6.1.1", + "postcss-minify-font-values": "^6.1.0", + "postcss-minify-gradients": "^6.0.3", + "postcss-minify-params": "^6.1.0", + "postcss-minify-selectors": "^6.0.4", + "postcss-normalize-charset": "^6.0.2", + "postcss-normalize-display-values": "^6.0.2", + "postcss-normalize-positions": "^6.0.2", + "postcss-normalize-repeat-style": "^6.0.2", + "postcss-normalize-string": "^6.0.2", + "postcss-normalize-timing-functions": "^6.0.2", + "postcss-normalize-unicode": "^6.1.0", + "postcss-normalize-url": "^6.0.2", + "postcss-normalize-whitespace": "^6.0.2", + "postcss-ordered-values": "^6.0.2", + "postcss-reduce-initial": "^6.1.0", + "postcss-reduce-transforms": "^6.0.2", + "postcss-svgo": "^6.0.3", + "postcss-unique-selectors": "^6.0.4" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -3083,9 +3040,9 @@ } }, "node_modules/cssnano-utils": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.1.tgz", - "integrity": "sha512-6qQuYDqsGoiXssZ3zct6dcMxiqfT6epy7x4R0TQJadd4LWO3sPR6JH6ZByOvVLoZ6EdwPGgd7+DR1EmX3tiXQQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", + "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -3133,16 +3090,67 @@ "integrity": "sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg==", "dev": true }, - "node_modules/date-format": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", - "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, "engines": { - "node": ">=4.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/debug": { + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/date-format": { + "version": "4.0.14", + "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz", + "integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", @@ -3159,6 +3167,18 @@ } } }, + "node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/decompress": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/decompress/-/decompress-4.2.1.tgz", @@ -3399,15 +3419,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-gateway/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/default-gateway/node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -3420,15 +3431,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-gateway/node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/default-gateway/node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -3441,21 +3443,6 @@ "node": ">=8" } }, - "node_modules/default-gateway/node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/default-gateway/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", @@ -3463,17 +3450,20 @@ "dev": true }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-lazy-prop": { @@ -3657,6 +3647,18 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/download": { "version": "6.2.5", "resolved": "https://registry.npmjs.org/download/-/download-6.2.5.tgz", @@ -3728,9 +3730,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.623", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.623.tgz", - "integrity": "sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==", + "version": "1.4.729", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.729.tgz", + "integrity": "sha512-bx7+5Saea/qu14kmPTDHQxkp2UnziG3iajUQu3BxFvCOnpAJdDbMV4rSl+EqFDkkpNNVUFlR1kDfpL59xfy1HA==", "dev": true }, "node_modules/emoji-regex": { @@ -3788,18 +3790,18 @@ } }, "node_modules/engine.io-parser": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", - "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.2.tgz", + "integrity": "sha512-RcyUFKA93/CXH20l4SoVvzZfrSDMOTUS3bWVpTt2FuFP+XYrL8i8oonHP7WInRyVHXh0n/ORtoeiE1os+8qkSw==", "dev": true, "engines": { "node": ">=10.0.0" } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz", + "integrity": "sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -3837,9 +3839,9 @@ } }, "node_modules/envinfo": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.0.tgz", - "integrity": "sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg==", + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.11.1.tgz", + "integrity": "sha512-8PiZgZNIB4q/Lw4AhOvAfB/ityHAd2bli3lESSWmWSzSsl5dKpy5N1d1Rfkd2teq/g9xN90lc6o98DOjMeYHpg==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -3871,50 +3873,57 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dev": true, - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -3923,21 +3932,54 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz", + "integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==", "dev": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -3976,9 +4018,9 @@ "dev": true }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -4003,16 +4045,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -4090,9 +4132,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -4208,12 +4250,13 @@ } }, "node_modules/eslint-plugin-mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.2.0.tgz", - "integrity": "sha512-ZhdxzSZnd1P9LqDPF0DBcFLpRIGdh1zkF2JHnQklKQOvrQtT73kdP5K9V2mzvbLR+cCAO9OI48NXK/Ax9/ciCQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-10.4.1.tgz", + "integrity": "sha512-G85ALUgKaLzuEuHhoW3HVRgPTmia6njQC3qCG6CEvA8/Ja9PDZnRZOuzekMki+HaViEQXINuYsmhp5WR5/4MfA==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", + "globals": "^13.24.0", "rambda": "^7.4.0" }, "engines": { @@ -4224,9 +4267,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz", - "integrity": "sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", @@ -4253,6 +4296,15 @@ } } }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.0.0.tgz", + "integrity": "sha512-8o0dVEdAkYap0Cn5kNeklaKcT1nUsa3LITWEuFk3nJifOoD+5JQGoyDUW2W/iPWwBsNBJpyJS9y4je/BgxLcyQ==", + "dev": true, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-plugin-tsdoc": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/eslint-plugin-tsdoc/-/eslint-plugin-tsdoc-0.2.17.tgz", @@ -4716,9 +4768,9 @@ } }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -4886,9 +4938,9 @@ } }, "node_modules/flatted": { - "version": "3.2.9", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", - "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/follow-redirects": { @@ -5001,12 +5053,6 @@ "node": ">=6 <7 || >=8" } }, - "node_modules/fs-monkey": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz", - "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==", - "dev": true - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -5082,16 +5128,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5122,13 +5172,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -5138,16 +5189,16 @@ } }, "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", + "jackspeak": "^2.3.6", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -5354,21 +5405,21 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -5411,12 +5462,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -5426,9 +5477,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -5459,9 +5510,9 @@ } }, "node_modules/html-entities": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz", - "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", + "integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", "dev": true, "funding": [ { @@ -5573,13 +5624,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/hyperdyperid": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", - "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "engines": { - "node": ">=10.18" + "node": ">=10.17.0" } }, "node_modules/iconv-lite": { @@ -5627,9 +5678,9 @@ ] }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -5715,12 +5766,12 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -5747,14 +5798,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5830,6 +5883,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -5963,9 +6031,9 @@ "dev": true }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -5974,6 +6042,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-network-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", + "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6060,12 +6140,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6111,12 +6194,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -6306,14 +6389,14 @@ "dev": true }, "node_modules/joi": { - "version": "17.11.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.11.0.tgz", - "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==", + "version": "17.12.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.12.3.tgz", + "integrity": "sha512-2RRziagf555owrm9IRVtdKynOBeITiDpuZqIpgwqXShPncPKNiRQoiGsl/T8SQdq+8ugRzH2LqY67irr2y/d+g==", "dev": true, "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.3", + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } @@ -6342,43 +6425,6 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, - "node_modules/json-joy": { - "version": "9.9.1", - "resolved": "https://registry.npmjs.org/json-joy/-/json-joy-9.9.1.tgz", - "integrity": "sha512-/d7th2nbQRBQ/nqTkBe6KjjvDciSwn9UICmndwk3Ed/Bk9AqkTRm4PnLVfXG4DKbT0rEY0nKnwE7NqZlqKE6kg==", - "dev": true, - "dependencies": { - "arg": "^5.0.2", - "hyperdyperid": "^1.2.0" - }, - "bin": { - "jj": "bin/jj.js", - "json-pack": "bin/json-pack.js", - "json-pack-test": "bin/json-pack-test.js", - "json-patch": "bin/json-patch.js", - "json-patch-test": "bin/json-patch-test.js", - "json-pointer": "bin/json-pointer.js", - "json-pointer-test": "bin/json-pointer-test.js", - "json-unpack": "bin/json-unpack.js" - }, - "engines": { - "node": ">=10.0" - }, - "funding": { - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "quill-delta": "^5", - "rxjs": "7", - "tslib": "2" - } - }, - "node_modules/json-joy/node_modules/arg": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", - "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", - "dev": true - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -6419,9 +6465,9 @@ } }, "node_modules/karma": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.2.tgz", - "integrity": "sha512-C6SU/53LB31BEgRg+omznBEMY4SjHU3ricV6zBcAe1EeILKkeScr+fZXtaI5WyDbkVowJxxAI6h73NcFPmXolQ==", + "version": "6.4.3", + "resolved": "https://registry.npmjs.org/karma/-/karma-6.4.3.tgz", + "integrity": "sha512-LuucC/RE92tJ8mlCwqEoRWXP38UMAqpnq98vktmS9SznSoUPPUJQbc91dHcxcunROvfQjdORVA/YFviH+Xci9Q==", "dev": true, "dependencies": { "@colors/colors": "1.5.0", @@ -6443,7 +6489,7 @@ "qjobs": "^1.2.0", "range-parser": "^1.2.1", "rimraf": "^3.0.2", - "socket.io": "^4.4.1", + "socket.io": "^4.7.2", "source-map": "^0.6.1", "tmp": "^0.2.1", "ua-parser-js": "^0.7.30", @@ -6488,13 +6534,28 @@ } }, "node_modules/karma-firefox-launcher": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-2.1.2.tgz", - "integrity": "sha512-VV9xDQU1QIboTrjtGVD4NCfzIH7n01ZXqy/qpBhnOeGVOkG5JYPEm8kuSd7psHE6WouZaQ9Ool92g8LFweSNMA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-2.1.3.tgz", + "integrity": "sha512-LMM2bseebLbYjODBOVt7TCPP9OI2vZIXCavIXhkO9m+10Uj5l7u/SKoeRmYx8FYHTVGZSpk6peX+3BMHC1WwNw==", "dev": true, "dependencies": { "is-wsl": "^2.2.0", - "which": "^2.0.1" + "which": "^3.0.0" + } + }, + "node_modules/karma-firefox-launcher/node_modules/which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/karma-mocha": { @@ -6642,9 +6703,9 @@ } }, "node_modules/known-css-properties": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz", - "integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==", + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.30.0.tgz", + "integrity": "sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==", "dev": true }, "node_modules/launch-editor": { @@ -6684,20 +6745,29 @@ } }, "node_modules/less-loader": { - "version": "11.1.4", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.4.tgz", - "integrity": "sha512-6/GrYaB6QcW6Vj+/9ZPgKKs6G10YZai/l/eJ4SLwbzqNTBsAqt5hSLVF47TgsiBxV1P6eAU0GYRH3YRuQU9V3A==", + "version": "12.2.0", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-12.2.0.tgz", + "integrity": "sha512-MYUxjSQSBUQmowc0l5nPieOYwMzGPUaTzB6inNW/bdPEG9zOL3eAAD1Qw5ZxSPk7we5dMojHwNODYMV1hq4EVg==", "dev": true, "engines": { - "node": ">= 14.15.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { + "@rspack/core": "0.x || 1.x", "less": "^3.5.0 || ^4.0.0", "webpack": "^5.0.0" + }, + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/less/node_modules/mime": { @@ -6727,12 +6797,15 @@ } }, "node_modules/lilconfig": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", - "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.1.tgz", + "integrity": "sha512-O18pf7nyvHTckunPWCV1XUNXU1piu01y2b7ATJ0ppkUkk8ocqVWBrYjJBCwHDjD/ZWcfyrA0P4gKhzWGi5EINQ==", "dev": true, "engines": { "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" } }, "node_modules/lines-and-columns": { @@ -6785,20 +6858,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true, - "peer": true - }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "dev": true, - "peer": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -6874,9 +6933,9 @@ } }, "node_modules/lru-cache": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", - "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -6938,21 +6997,25 @@ } }, "node_modules/memfs": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", - "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.8.1.tgz", + "integrity": "sha512-7q/AdPzf2WpwPlPL4v1kE2KsJsHl7EF4+hAeVzlyanr2+YnR21NVn9mDqo+7DEaKDRsQy8nvxPlKH4WqMtiO0w==", "dev": true, "dependencies": { - "fs-monkey": "^1.0.4" + "tslib": "^2.0.0" }, "engines": { "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" } }, "node_modules/meow": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-13.1.0.tgz", - "integrity": "sha512-o5R/R3Tzxq0PJ3v3qcQJtSvSE9nKOLSAaDuuoMzDVuGTwHdccMWcYomh9Xolng2tjT6O/Y83d+0coVGof6tqmA==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", "dev": true, "engines": { "node": ">=18" @@ -7037,6 +7100,15 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/mimic-response": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", @@ -7047,12 +7119,13 @@ } }, "node_modules/mini-css-extract-plugin": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", - "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.8.1.tgz", + "integrity": "sha512-/1HDlyFRxWIZPI1ZpgqlZ8jMw/1Dp/dl3P0L1jtZ+zVcHqwPhGwaJwKL00WVgfnBy6PWCde9W65or7IIETImuA==", "dev": true, "dependencies": { - "schema-utils": "^4.0.0" + "schema-utils": "^4.0.0", + "tapable": "^2.2.1" }, "engines": { "node": ">= 12.13.0" @@ -7117,9 +7190,9 @@ } }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.4.0.tgz", + "integrity": "sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -7129,13 +7202,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -7150,10 +7222,33 @@ }, "engines": { "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, "node_modules/mocha/node_modules/cliui": { @@ -7174,45 +7269,34 @@ "dev": true }, "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "is-glob": "^4.0.1" }, "engines": { - "node": "*" + "node": ">= 6" } }, "node_modules/mocha/node_modules/minimatch": { @@ -7326,10 +7410,16 @@ } }, "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -7410,9 +7500,9 @@ } }, "node_modules/node-jq": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/node-jq/-/node-jq-4.2.2.tgz", - "integrity": "sha512-eFYWkKyDrl5c2L2ZvD0iecIvCYyyXkFelbvIn2peL8V58vz75Wrp8y0NKN8yiaBO7jL//koB2/n3ZOVStH9tbA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/node-jq/-/node-jq-4.3.1.tgz", + "integrity": "sha512-5iU9L/7j8ZNHwhxDRJXgyza6JnEKqdkNcJ9+ul5HZnhConhg/v9JdvA9agJ8XA+qBgGr1MK/MeHDrdK1tL2QAA==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -7555,14 +7645,15 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -7572,26 +7663,28 @@ } }, "node_modules/object.groupby": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", - "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/object.values": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", - "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -7636,10 +7729,25 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/open": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/open/-/open-10.0.3.tgz", - "integrity": "sha512-dtbI5oW7987hwC9qjJTyABldTaa19SuyJse1QboWv3b0qCcrrLNVDqBx1XgELAjh9QTVQaP/C5b1nhQebd1H2A==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.1.0.tgz", + "integrity": "sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==", "dev": true, "dependencies": { "default-browser": "^5.2.1", @@ -7768,16 +7876,20 @@ } }, "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.0.tgz", + "integrity": "sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==", "dev": true, "dependencies": { - "@types/retry": "0.12.0", + "@types/retry": "0.12.2", + "is-network-error": "^1.0.0", "retry": "^0.13.1" }, "engines": { - "node": ">=8" + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-timeout": { @@ -7883,12 +7995,12 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { @@ -8041,10 +8153,19 @@ "node": ">=8" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { - "version": "8.4.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", - "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "funding": [ { @@ -8063,7 +8184,7 @@ "dependencies": { "nanoid": "^3.3.7", "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" @@ -8086,14 +8207,14 @@ } }, "node_modules/postcss-colormin": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.0.2.tgz", - "integrity": "sha512-TXKOxs9LWcdYo5cgmcSHPkyrLAh86hX1ijmyy6J8SbOhyv6ua053M3ZAM/0j44UsnQNIWdl8gb5L7xX2htKeLw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.1.0.tgz", + "integrity": "sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0", - "colord": "^2.9.1", + "colord": "^2.9.3", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8104,12 +8225,12 @@ } }, "node_modules/postcss-convert-values": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.0.2.tgz", - "integrity": "sha512-aeBmaTnGQ+NUSVQT8aY0sKyAD/BaLJenEKZ03YK0JnDE1w1Rr8XShoxdal2V2H26xTJKr3v5haByOhJuyT4UYw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.1.0.tgz", + "integrity": "sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", + "browserslist": "^4.23.0", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8143,9 +8264,9 @@ } }, "node_modules/postcss-discard-comments": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.1.tgz", - "integrity": "sha512-f1KYNPtqYLUeZGCHQPKzzFtsHaRuECe6jLakf/RjSRqvF5XHLZnM2+fXLhb8Qh/HBFHs3M4cSLb1k3B899RYIg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", + "integrity": "sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8155,9 +8276,9 @@ } }, "node_modules/postcss-discard-duplicates": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.1.tgz", - "integrity": "sha512-1hvUs76HLYR8zkScbwyJ8oJEugfPV+WchpnA+26fpJ7Smzs51CzGBHC32RS03psuX/2l0l0UKh2StzNxOrKCYg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.3.tgz", + "integrity": "sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8167,9 +8288,9 @@ } }, "node_modules/postcss-discard-empty": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.1.tgz", - "integrity": "sha512-yitcmKwmVWtNsrrRqGJ7/C0YRy53i0mjexBDQ9zYxDwTWVBgbU4+C9jIZLmQlTDT9zhml+u0OMFJh8+31krmOg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.3.tgz", + "integrity": "sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8179,9 +8300,9 @@ } }, "node_modules/postcss-discard-overridden": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.1.tgz", - "integrity": "sha512-qs0ehZMMZpSESbRkw1+inkf51kak6OOzNRaoLd/U7Fatp0aN2HQ1rxGOrJvYcRAN9VpX8kUF13R2ofn8OlvFVA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.2.tgz", + "integrity": "sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8191,12 +8312,12 @@ } }, "node_modules/postcss-discard-unused": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-6.0.2.tgz", - "integrity": "sha512-wr3lRPahxARmjow5BWML+9bD9D1u6FpfxlWg4lZqCIwvQLBZQD/S0Rq6A/juQwVFVXvMeRGa9TX1vpXuQ6FhTQ==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-6.0.5.tgz", + "integrity": "sha512-wHalBlRHkaNnNwfC8z+ppX57VhvS+HWgjW508esjdaEYr3Mx7Gnn2xA4R/CKf5+Z9S5qsqC+Uzh4ueENWwCVUA==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.15" + "postcss-selector-parser": "^6.0.16" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8218,60 +8339,43 @@ } }, "node_modules/postcss-loader": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.3.4.tgz", - "integrity": "sha512-iW5WTTBSC5BfsBJ9daFMPVrLT36MrNiC6fqOZTTaHjBNX6Pfd5p+hSBqe/fEeNd7pc13QiAyGt7VdGMw4eRC4A==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-8.1.1.tgz", + "integrity": "sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==", "dev": true, "dependencies": { - "cosmiconfig": "^8.3.5", + "cosmiconfig": "^9.0.0", "jiti": "^1.20.0", "semver": "^7.5.4" }, "engines": { - "node": ">= 14.15.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { + "@rspack/core": "0.x || 1.x", "postcss": "^7.0.0 || ^8.0.1", "webpack": "^5.0.0" - } - }, - "node_modules/postcss-loader/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" }, "peerDependenciesMeta": { - "typescript": { + "@rspack/core": { + "optional": true + }, + "webpack": { "optional": true } } }, "node_modules/postcss-merge-idents": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-6.0.1.tgz", - "integrity": "sha512-ApqNUkzl3MJP+43DIIvoer98t7tcDVAcnLeAKjuTIM7HkMk8NXB6eqscMIjwQISwoSeE0WrEyIqVy+HoHAVcZw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-6.0.3.tgz", + "integrity": "sha512-1oIoAsODUs6IHQZkLQGO15uGEbK3EAl5wi9SS8hs45VgsxQfMnxvt+L+zIr7ifZFIH14cfAeVe2uCTa+SPRa3g==", "dev": true, "dependencies": { - "cssnano-utils": "^4.0.1", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8282,13 +8386,13 @@ } }, "node_modules/postcss-merge-longhand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.2.tgz", - "integrity": "sha512-+yfVB7gEM8SrCo9w2lCApKIEzrTKl5yS1F4yGhV3kSim6JzbfLGJyhR1B6X+6vOT0U33Mgx7iv4X9MVWuaSAfw==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.5.tgz", + "integrity": "sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0", - "stylehacks": "^6.0.2" + "stylehacks": "^6.1.1" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8298,15 +8402,15 @@ } }, "node_modules/postcss-merge-rules": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.0.3.tgz", - "integrity": "sha512-yfkDqSHGohy8sGYIJwBmIGDv4K4/WrJPX355XrxQb/CSsT4Kc/RxDi6akqn5s9bap85AWgv21ArcUWwWdGNSHA==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.1.1.tgz", + "integrity": "sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0", - "cssnano-utils": "^4.0.1", - "postcss-selector-parser": "^6.0.15" + "cssnano-utils": "^4.0.2", + "postcss-selector-parser": "^6.0.16" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8316,9 +8420,9 @@ } }, "node_modules/postcss-minify-font-values": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.0.1.tgz", - "integrity": "sha512-tIwmF1zUPoN6xOtA/2FgVk1ZKrLcCvE0dpZLtzyyte0j9zUeB8RTbCqrHZGjJlxOvNWKMYtunLrrl7HPOiR46w==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.1.0.tgz", + "integrity": "sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8331,13 +8435,13 @@ } }, "node_modules/postcss-minify-gradients": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.1.tgz", - "integrity": "sha512-M1RJWVjd6IOLPl1hYiOd5HQHgpp6cvJVLrieQYS9y07Yo8itAr6jaekzJphaJFR0tcg4kRewCk3kna9uHBxn/w==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.3.tgz", + "integrity": "sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==", "dev": true, "dependencies": { - "colord": "^2.9.1", - "cssnano-utils": "^4.0.1", + "colord": "^2.9.3", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8348,13 +8452,13 @@ } }, "node_modules/postcss-minify-params": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.0.2.tgz", - "integrity": "sha512-zwQtbrPEBDj+ApELZ6QylLf2/c5zmASoOuA4DzolyVGdV38iR2I5QRMsZcHkcdkZzxpN8RS4cN7LPskOkTwTZw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.1.0.tgz", + "integrity": "sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", - "cssnano-utils": "^4.0.1", + "browserslist": "^4.23.0", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8365,12 +8469,12 @@ } }, "node_modules/postcss-minify-selectors": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.2.tgz", - "integrity": "sha512-0b+m+w7OAvZejPQdN2GjsXLv5o0jqYHX3aoV0e7RBKPCsB7TYG5KKWBFhGnB/iP3213Ts8c5H4wLPLMm7z28Sg==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.4.tgz", + "integrity": "sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.15" + "postcss-selector-parser": "^6.0.16" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8380,9 +8484,9 @@ } }, "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", "dev": true, "engines": { "node": "^10 || ^12 || >= 14" @@ -8392,9 +8496,9 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", - "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.5.tgz", + "integrity": "sha512-6MieY7sIfTK0hYfafw1OMEG+2bg8Q1ocHCpoWLqOKj3JXlKu4G7btkmM/B7lFubYkYWmRSPLZi5chid63ZaZYw==", "dev": true, "dependencies": { "icss-utils": "^5.0.0", @@ -8409,9 +8513,9 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz", - "integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.0.tgz", + "integrity": "sha512-oq+g1ssrsZOsx9M96c5w8laRmvEu9C3adDSjI8oTcbfkrTE8hx/zfyobUoWIxaKPO8bt6S62kxpw5GqypEw1QQ==", "dev": true, "dependencies": { "postcss-selector-parser": "^6.0.4" @@ -8439,9 +8543,9 @@ } }, "node_modules/postcss-normalize-charset": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.1.tgz", - "integrity": "sha512-aW5LbMNRZ+oDV57PF9K+WI1Z8MPnF+A8qbajg/T8PP126YrGX1f9IQx21GI2OlGz7XFJi/fNi0GTbY948XJtXg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", + "integrity": "sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8451,9 +8555,9 @@ } }, "node_modules/postcss-normalize-display-values": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.1.tgz", - "integrity": "sha512-mc3vxp2bEuCb4LgCcmG1y6lKJu1Co8T+rKHrcbShJwUmKJiEl761qb/QQCfFwlrvSeET3jksolCR/RZuMURudw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.2.tgz", + "integrity": "sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8466,9 +8570,9 @@ } }, "node_modules/postcss-normalize-positions": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.1.tgz", - "integrity": "sha512-HRsq8u/0unKNvm0cvwxcOUEcakFXqZ41fv3FOdPn916XFUrympjr+03oaLkuZENz3HE9RrQE9yU0Xv43ThWjQg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.2.tgz", + "integrity": "sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8481,9 +8585,9 @@ } }, "node_modules/postcss-normalize-repeat-style": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.1.tgz", - "integrity": "sha512-Gbb2nmCy6tTiA7Sh2MBs3fj9W8swonk6lw+dFFeQT68B0Pzwp1kvisJQkdV6rbbMSd9brMlS8I8ts52tAGWmGQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.2.tgz", + "integrity": "sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8496,9 +8600,9 @@ } }, "node_modules/postcss-normalize-string": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.1.tgz", - "integrity": "sha512-5Fhx/+xzALJD9EI26Aq23hXwmv97Zfy2VFrt5PLT8lAhnBIZvmaT5pQk+NuJ/GWj/QWaKSKbnoKDGLbV6qnhXg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.2.tgz", + "integrity": "sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8511,9 +8615,9 @@ } }, "node_modules/postcss-normalize-timing-functions": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.1.tgz", - "integrity": "sha512-4zcczzHqmCU7L5dqTB9rzeqPWRMc0K2HoR+Bfl+FSMbqGBUcP5LRfgcH4BdRtLuzVQK1/FHdFoGT3F7rkEnY+g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.2.tgz", + "integrity": "sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8526,12 +8630,12 @@ } }, "node_modules/postcss-normalize-unicode": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.0.2.tgz", - "integrity": "sha512-Ff2VdAYCTGyMUwpevTZPZ4w0+mPjbZzLLyoLh/RMpqUqeQKZ+xMm31hkxBavDcGKcxm6ACzGk0nBfZ8LZkStKA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.1.0.tgz", + "integrity": "sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", + "browserslist": "^4.23.0", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8542,9 +8646,9 @@ } }, "node_modules/postcss-normalize-url": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.1.tgz", - "integrity": "sha512-jEXL15tXSvbjm0yzUV7FBiEXwhIa9H88JOXDGQzmcWoB4mSjZIsmtto066s2iW9FYuIrIF4k04HA2BKAOpbsaQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.2.tgz", + "integrity": "sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8557,9 +8661,9 @@ } }, "node_modules/postcss-normalize-whitespace": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.1.tgz", - "integrity": "sha512-76i3NpWf6bB8UHlVuLRxG4zW2YykF9CTEcq/9LGAiz2qBuX5cBStadkk0jSkg9a9TCIXbMQz7yzrygKoCW9JuA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.2.tgz", + "integrity": "sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8572,12 +8676,12 @@ } }, "node_modules/postcss-ordered-values": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.1.tgz", - "integrity": "sha512-XXbb1O/MW9HdEhnBxitZpPFbIvDgbo9NK4c/5bOfiKpnIGZDoL2xd7/e6jW5DYLsWxBbs+1nZEnVgnjnlFViaA==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.2.tgz", + "integrity": "sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==", "dev": true, "dependencies": { - "cssnano-utils": "^4.0.1", + "cssnano-utils": "^4.0.2", "postcss-value-parser": "^4.2.0" }, "engines": { @@ -8588,9 +8692,9 @@ } }, "node_modules/postcss-reduce-idents": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-6.0.2.tgz", - "integrity": "sha512-GKgyBLS5hMCJC8T36h4IH9u0XhmRHRwLwlxP6xVYbAuxKqn3LezEDDIxnb1/Cu2DXGc20jvWK9VZdCVtYAoTyg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-6.0.3.tgz", + "integrity": "sha512-G3yCqZDpsNPoQgbDUy3T0E6hqOQ5xigUtBQyrmq3tn2GxlyiL0yyl7H+T8ulQR6kOcHJ9t7/9H4/R2tv8tJbMA==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8603,12 +8707,12 @@ } }, "node_modules/postcss-reduce-initial": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.0.2.tgz", - "integrity": "sha512-YGKalhNlCLcjcLvjU5nF8FyeCTkCO5UtvJEt0hrPZVCTtRLSOH4z00T1UntQPj4dUmIYZgMj8qK77JbSX95hSw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.1.0.tgz", + "integrity": "sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", + "browserslist": "^4.23.0", "caniuse-api": "^3.0.0" }, "engines": { @@ -8619,9 +8723,9 @@ } }, "node_modules/postcss-reduce-transforms": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.1.tgz", - "integrity": "sha512-fUbV81OkUe75JM+VYO1gr/IoA2b/dRiH6HvMwhrIBSUrxq3jNZQZitSnugcTLDi1KkQh1eR/zi+iyxviUNBkcQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.2.tgz", + "integrity": "sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -8666,9 +8770,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.15", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz", - "integrity": "sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==", + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.16.tgz", + "integrity": "sha512-A0RVJrX+IUkVZbW3ClroRWurercFhieevHB38sr2+l9eUClMqome3LmEmnhlNy+5Mr2EYN6B2Kaw9wYdd+VHiw==", "dev": true, "dependencies": { "cssesc": "^3.0.0", @@ -8688,9 +8792,9 @@ } }, "node_modules/postcss-svgo": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.2.tgz", - "integrity": "sha512-IH5R9SjkTkh0kfFOQDImyy1+mTCb+E830+9SV1O+AaDcoHTvfsvt6WwJeo7KwcHbFnevZVCsXhDmjFiGVuwqFQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.3.tgz", + "integrity": "sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0", @@ -8704,12 +8808,12 @@ } }, "node_modules/postcss-unique-selectors": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.2.tgz", - "integrity": "sha512-8IZGQ94nechdG7Y9Sh9FlIY2b4uS8/k8kdKRX040XHsS3B6d1HrJAkXrBSsSu4SuARruSsUjW3nlSw8BHkaAYQ==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.4.tgz", + "integrity": "sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==", "dev": true, "dependencies": { - "postcss-selector-parser": "^6.0.15" + "postcss-selector-parser": "^6.0.16" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8725,9 +8829,9 @@ "dev": true }, "node_modules/postcss-zindex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-6.0.1.tgz", - "integrity": "sha512-wQF95TIerYvPlsjwldO7iGP3Z3arhuYRK/gndq4NAdZaEsdUkmQYtRqkrEPMzJOQFBk06wFtzkHZKJoQlqFgXQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-6.0.2.tgz", + "integrity": "sha512-5BxW9l1evPB/4ZIc+2GobEBoKC+h8gPGCMi+jxsYvd2x0mjq7wazk6DrP71pStqxE9Foxh5TVnonbWpFZzXaYg==", "dev": true, "engines": { "node": "^14 || ^16 || >=18.0" @@ -8736,24 +8840,6 @@ "postcss": "^8.4.31" } }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -8773,9 +8859,9 @@ } }, "node_modules/prettier": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", - "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -8905,21 +8991,6 @@ } ] }, - "node_modules/quill-delta": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", - "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", - "dev": true, - "peer": true, - "dependencies": { - "fast-diff": "^1.3.0", - "lodash.clonedeep": "^4.5.0", - "lodash.isequal": "^4.5.0" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/rambda": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/rambda/-/rambda-7.5.0.tgz", @@ -9052,14 +9123,15 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -9465,9 +9537,9 @@ } }, "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", "dev": true }, "node_modules/rimraf": { @@ -9562,24 +9634,14 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "peer": true, - "dependencies": { - "tslib": "^2.1.0" - } - }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -9597,15 +9659,18 @@ "dev": true }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -9709,9 +9774,9 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -9808,9 +9873,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "dependencies": { "randombytes": "^2.1.0" @@ -9907,29 +9972,32 @@ "dev": true }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" } }, "node_modules/set-function-name": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", - "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", "dev": true, "dependencies": { - "define-data-property": "^1.0.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -9984,14 +10052,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10036,9 +10108,9 @@ } }, "node_modules/socket.io": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.3.tgz", - "integrity": "sha512-SE+UIQXBQE+GPG2oszWMlsEmWtHVqw/h1VrYJGK5/MC7CH5p58N448HwIrtREcvR4jfdOJAY4ieQfxMr55qbbw==", + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", + "integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==", "dev": true, "dependencies": { "accepts": "~1.3.4", @@ -10054,11 +10126,12 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.2.tgz", - "integrity": "sha512-87C3LO/NOMc+eMcpcxUBebGjkpMDkNBS9tf7KJqcDsmL936EChtVva71Dw2q4tQcuVC+hAUy4an2NO/sYXmwRA==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.4.tgz", + "integrity": "sha512-wDNHGXGewWAjQPt3pyeYBtpWSq9cLE5UW1ZUPL/2eGK9jtse/FpXib7epSTsz0Q0m+6sg6Y4KtcFTlah1bdOVg==", "dev": true, "dependencies": { + "debug": "~4.3.4", "ws": "~8.11.0" } }, @@ -10129,9 +10202,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -10289,14 +10362,15 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -10306,28 +10380,31 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -10428,9 +10505,9 @@ } }, "node_modules/style-loader": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz", - "integrity": "sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.4.tgz", + "integrity": "sha512-0WqXzrsMTyb8yjZJHDqwmnwRJvhALK9LfRtRc6B4UTWe8AijYLZYZ9thuJTZc2VfQWINADW/j+LiJnfy2RoC1w==", "dev": true, "engines": { "node": ">= 12.13.0" @@ -10444,13 +10521,13 @@ } }, "node_modules/stylehacks": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.0.2.tgz", - "integrity": "sha512-00zvJGnCu64EpMjX8b5iCZ3us2Ptyw8+toEkb92VdmkEaRaSGBNKAoK6aWZckhXxmQP8zWiTaFaiMGIU8Ve8sg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.1.1.tgz", + "integrity": "sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==", "dev": true, "dependencies": { - "browserslist": "^4.22.2", - "postcss-selector-parser": "^6.0.15" + "browserslist": "^4.23.0", + "postcss-selector-parser": "^6.0.16" }, "engines": { "node": "^14 || ^16 || >=18.0" @@ -10460,15 +10537,16 @@ } }, "node_modules/stylelint": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.1.0.tgz", - "integrity": "sha512-Sh1rRV0lN1qxz/QsuuooLWsIZ/ona7NKw/fRZd6y6PyXYdD2W0EAzJ8yJcwSx4Iw/muz0CF09VZ+z4EiTAcKmg==", + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.3.1.tgz", + "integrity": "sha512-/JOwQnBvxEKOT2RtNgGpBVXnCSMBgKOL2k7w0K52htwCyJls4+cHvc4YZgXlVoAZS9QJd2DgYAiRnja96pTgxw==", "dev": true, "dependencies": { - "@csstools/css-parser-algorithms": "^2.4.0", - "@csstools/css-tokenizer": "^2.2.2", - "@csstools/media-query-list-parser": "^2.1.6", - "@csstools/selector-specificity": "^3.0.1", + "@csstools/css-parser-algorithms": "^2.6.1", + "@csstools/css-tokenizer": "^2.2.4", + "@csstools/media-query-list-parser": "^2.1.9", + "@csstools/selector-specificity": "^3.0.2", + "@dual-bundle/import-meta-resolve": "^4.0.0", "balanced-match": "^2.0.0", "colord": "^2.9.3", "cosmiconfig": "^9.0.0", @@ -10482,19 +10560,19 @@ "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", - "ignore": "^5.3.0", + "ignore": "^5.3.1", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", - "known-css-properties": "^0.29.0", + "known-css-properties": "^0.30.0", "mathml-tag-names": "^2.1.3", - "meow": "^13.0.0", + "meow": "^13.2.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "picocolors": "^1.0.0", - "postcss": "^8.4.32", + "postcss": "^8.4.38", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^7.0.0", - "postcss-selector-parser": "^6.0.13", + "postcss-selector-parser": "^6.0.16", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "string-width": "^4.2.3", @@ -10592,32 +10670,6 @@ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", "dev": true }, - "node_modules/stylelint/node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", - "dev": true, - "dependencies": { - "env-paths": "^2.2.1", - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/stylelint/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -10637,14 +10689,13 @@ } }, "node_modules/stylelint/node_modules/flat-cache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.0.tgz", - "integrity": "sha512-EryKbCE/wxpxKniQlyas6PY1I9vwtF3uCBweX+N8KYTCn3Y12RTGtQAJ/bd5pl7kxUAc8v/R3Ake/N17OZiFqA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.4", - "rimraf": "^5.0.5" + "keyv": "^4.5.4" }, "engines": { "node": ">=16" @@ -10659,24 +10710,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dev": true, - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/stylelint/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -10830,9 +10863,9 @@ } }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "dev": true, "dependencies": { "ajv": "^8.0.1", @@ -10937,9 +10970,9 @@ } }, "node_modules/terser": { - "version": "5.26.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz", - "integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==", + "version": "5.30.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz", + "integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -11041,18 +11074,6 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/thingies": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.15.0.tgz", - "integrity": "sha512-ZSJlvEpD8QllYim0VSGlbAoob/iPrTWNlV/m8ltizMvMmzzU2gVJvHfH9ijLstyciWF70ZiQXqz+BCXWJq+ZQw==", - "dev": true, - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "tslib": "^2" - } - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -11075,15 +11096,12 @@ } }, "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, "engines": { - "node": ">=8.17.0" + "node": ">=14.14" } }, "node_modules/to-buffer": { @@ -11134,6 +11152,18 @@ "node": ">=0.8.0" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-loader": { "version": "9.5.1", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", @@ -11304,29 +11334,30 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -11336,16 +11367,17 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -11355,23 +11387,29 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -11563,9 +11601,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -11585,34 +11623,34 @@ } }, "node_modules/webpack": { - "version": "5.89.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.89.0.tgz", - "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "version": "5.91.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", + "integrity": "sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw==", "dev": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.16.0", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -11714,75 +11752,55 @@ } } }, - "node_modules/webpack-dev-middleware/node_modules/memfs": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.6.0.tgz", - "integrity": "sha512-I6mhA1//KEZfKRQT9LujyW6lRbX7RkC24xKododIDO3AGShcaFAMKElv1yFGWX8fD4UaSiwasr3NeQ5TdtHY1A==", - "dev": true, - "dependencies": { - "json-joy": "^9.2.0", - "thingies": "^1.11.1" - }, - "engines": { - "node": ">= 4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, "node_modules/webpack-dev-server": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", - "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", - "dev": true, - "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/serve-static": "^1.13.10", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.5", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-5.0.4.tgz", + "integrity": "sha512-dljXhUgx3HqKP2d8J/fUMvhxGhzjeNVarDLcbO/EWMSgRizDkxHQDZQaLFL5VJY9tRBj2Gz+rvCEYYvhbqPHNA==", + "dev": true, + "dependencies": { + "@types/bonjour": "^3.5.13", + "@types/connect-history-api-fallback": "^1.5.4", + "@types/express": "^4.17.21", + "@types/serve-index": "^1.9.4", + "@types/serve-static": "^1.15.5", + "@types/sockjs": "^0.3.36", + "@types/ws": "^8.5.10", "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.0.11", - "chokidar": "^3.5.3", + "bonjour-service": "^1.2.1", + "chokidar": "^3.6.0", "colorette": "^2.0.10", "compression": "^1.7.4", "connect-history-api-fallback": "^2.0.0", "default-gateway": "^6.0.3", "express": "^4.17.3", "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", + "html-entities": "^2.4.0", "http-proxy-middleware": "^2.0.3", - "ipaddr.js": "^2.0.1", - "launch-editor": "^2.6.0", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "rimraf": "^3.0.2", - "schema-utils": "^4.0.0", - "selfsigned": "^2.1.1", + "ipaddr.js": "^2.1.0", + "launch-editor": "^2.6.1", + "open": "^10.0.3", + "p-retry": "^6.2.0", + "rimraf": "^5.0.5", + "schema-utils": "^4.2.0", + "selfsigned": "^2.4.1", "serve-index": "^1.9.1", "sockjs": "^0.3.24", "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.1", - "ws": "^8.13.0" + "webpack-dev-middleware": "^7.1.0", + "ws": "^8.16.0" }, "bin": { "webpack-dev-server": "bin/webpack-dev-server.js" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" + "webpack": "^5.0.0" }, "peerDependenciesMeta": { "webpack": { @@ -11793,53 +11811,22 @@ } } }, - "node_modules/webpack-dev-server/node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-dev-server/node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "node_modules/webpack-dev-server/node_modules/rimraf": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", "dev": true, "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" + "glob": "^10.3.7" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/webpack-dev-server/node_modules/webpack-dev-middleware": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz", - "integrity": "sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==", - "dev": true, - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.3", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" + "bin": { + "rimraf": "dist/esm/bin.mjs" }, "engines": { - "node": ">= 12.13.0" + "node": ">=14" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/webpack-dev-server/node_modules/ws": { @@ -11864,9 +11851,9 @@ } }, "node_modules/webpack-hot-middleware": { - "version": "2.26.0", - "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.26.0.tgz", - "integrity": "sha512-okzjec5sAEy4t+7rzdT8eRyxsk0FDSmBPN2KwX4Qd+6+oQCfe5Ve07+u7cJvofgB+B4w5/4dO4Pz0jhhHyyPLQ==", + "version": "2.26.1", + "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.26.1.tgz", + "integrity": "sha512-khZGfAeJx6I8K9zKohEWWYN6KDlVw2DHownoe+6Vtwj1LP9WFgegXnVMSkZ/dBEBtXFwrkkydsaPFlB7f8wU2A==", "dev": true, "dependencies": { "ansi-html-community": "0.0.8", @@ -11998,16 +11985,16 @@ "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -12228,18 +12215,6 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yargs-unparser/node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", diff --git a/package.json b/package.json index 43cedb098..286bcc5c2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jodit", - "version": "4.0.19", - "description": "Jodit is awesome and usefully wysiwyg editor with filebrowser", + "version": "4.1.1", + "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser", "main": "build/jodit.min.js", "types": "./types/index.d.ts", "scripts": { @@ -50,56 +50,58 @@ "autobind-decorator": "^2.4.0" }, "devDependencies": { - "@tsconfig/node18": "^18.2.2", + "@tsconfig/node18": "^18.2.4", "@types/ace": "^0.0.52", "@types/fs-extra": "^11.0.4", "@types/karma": "^6.3.8", - "@types/node": "^20.10.7", + "@types/node": "^20.12.5", "@types/postcss-css-variables": "^0.18.3", "@types/yargs": "^17.0.32", - "@typescript-eslint/eslint-plugin": "^6.18.0", - "@typescript-eslint/parser": "^6.18.0", - "autoprefixer": "^10.4.16", - "axios": "^1.6.5", - "chai": "^4.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", + "autoprefixer": "^10.4.19", + "axios": "^1.6.8", + "chai": "^4.4.1", "classlist-polyfill": "^1.2.0", "compression": "^1.7.4", - "core-js": "^3.35.0", + "core-js": "^3.36.1", "cross-env": "^7.0.3", - "css-loader": "^6.8.1", - "css-minimizer-webpack-plugin": "^5.0.1", - "cssnano-preset-advanced": "^6.0.3", + "css-loader": "^7.0.0", + "css-minimizer-webpack-plugin": "^6.0.0", + "cssnano-preset-advanced": "^6.1.2", + "dotenv": "^16.4.5", "es6-promise": "^4.2.8", - "eslint": "^8.56.0", + "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-mocha": "^10.2.0", - "eslint-plugin-prettier": "^5.1.2", + "eslint-plugin-mocha": "^10.4.1", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-simple-import-sort": "^12.0.0", "eslint-plugin-tsdoc": "^0.2.17", - "glob": "^10.3.10", - "karma": "^6.4.2", + "glob": "^10.3.12", + "karma": "^6.4.3", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^3.2.0", - "karma-firefox-launcher": "^2.1.2", + "karma-firefox-launcher": "^2.1.3", "karma-mocha": "^2.0.1", "karma-sourcemap-loader": "^0.4.0", "less": "^4.2.0", - "less-loader": "^11.1.4", + "less-loader": "^12.2.0", "merge-stream": "^2.0.0", - "mini-css-extract-plugin": "^2.7.6", - "mocha": "^10.2.0", - "node-jq": "^4.2.2", - "open": "^10.0.3", - "postcss": ">=8.4.33", + "mini-css-extract-plugin": "^2.8.1", + "mocha": "^10.4.0", + "node-jq": "^4.3.1", + "open": "^10.1.0", + "postcss": ">=8.4.38", "postcss-css-variables": "^0.19.0", "postcss-less": "^6.0.0", - "postcss-loader": "^7.3.4", - "prettier": "^3.1.1", + "postcss-loader": "^8.1.1", + "prettier": "^3.2.5", "raw-loader": "^4.0.2", "replace": "^1.2.2", - "style-loader": "^3.3.3", - "stylelint": "^16.1.0", + "style-loader": "^3.3.4", + "stylelint": "^16.3.1", "stylelint-config-idiomatic-order": "v10.0.0", "stylelint-config-standard": "^36.0.0", "stylelint-prettier": "^5.0.0", @@ -108,12 +110,12 @@ "ts-loader": "^9.5.1", "ts-node": "^10.9.2", "tslib": "^2.6.2", - "typescript": "^5.3.3", - "webpack": "5.89.0", + "typescript": "^5.4.4", + "webpack": "5.91.0", "webpack-cli": "^5.1.4", - "webpack-dev-middleware": "^7.0.0", - "webpack-dev-server": "^4.15.1", - "webpack-hot-middleware": "^2.26.0", + "webpack-dev-middleware": "^7.2.1", + "webpack-dev-server": "^5.0.4", + "webpack-hot-middleware": "^2.26.1", "yargs": "^17.7.2" } } diff --git a/public/stand.html b/public/stand.html index 187686dcd..906bda30d 100644 --- a/public/stand.html +++ b/public/stand.html @@ -75,57 +75,39 @@

Jodit Test Document

uploader: { url: 'https://xdsoft.net/jodit/finder/?action=fileUpload' }, - language: 'es', - aiAssistantCallback: (prompt, htmlContents) => { - return new Promise((resolve, reject) => { - fetch('http://localhost:7071/api/ExecuteAICompletion', { - method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify({ - htmlContent: htmlContents, - userRequest: prompt - }) - }).then(response => { - if (response.ok) { - return response.json(); + aiAssistant: { + aiAssistantCallback(prompt, htmlFragment) { + // Make API call to OpenAI + return fetch( + 'https://api.openai.com/v1/chat/completions', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ' + Jodit.constants.TOKENS.TOKEN_GPT + }, + body: JSON.stringify({ + model: "gpt-3.5-turbo", + messages: [{ + role: "system", + content: prompt + }, { + role: "user", + content: htmlFragment + }] + }) } - throw new Error('Network response was not ok.'); - }).then(data => { - resolve(data.result); - }).catch(error => { - reject(error); - }); - }); - }, - aiImproveWritingPrompt: 'Necesita ser refinado para mejorar la claridad, coherencia y calidad general. Por favor, mejora el estilo de escritura manteniendo el significado original y el idioma intacto.', - aiMakeShorterPrompt: 'Por favor, condensa este contenido para hacerlo más conciso, preservando los mensajes clave, el idioma y la información.', - aiMakeLongerPrompt: 'Amplía este contenido para proporcionar más detalle, profundidad y riqueza, sin desviarte del mensaje original y el idioma.', - aiSimplifyLanguagePrompt: 'El lenguaje utilizado aquí necesita ser simplificado para una comprensión más fácil, sin alterar la información central y el idioma original.', - aiSummarizePrompt: 'Proporciona un breve resumen de este contenido, capturando los puntos esenciales de manera concisa. Preserva el idioma original y el significado.', - aiContinuePrompt: 'Continúa la narrativa o discusión de este contenido de manera fluida, manteniendo el mismo idioma, tono y estilo.', - aiChangeToneProfessionalPrompt: 'Ajusta el tono para que sea profesional, adecuado para un entorno empresarial o académico formal, mientras se retiene el mensaje original y el idioma.', - aiChangeToneFriendlyPrompt: 'Necesita ser reescrito en un tono amistoso manteniendo el mensaje original y el idioma. Por favor, modifica este contenido para que sea cálido, accesible y atractivo.', - aiChangeToneFormalPrompt: 'Transforma este contenido para que tenga un tono formal, apropiado para contextos oficiales o serios, sin cambiar los puntos principales y el idioma.', - aiChangeToneCasualPrompt: 'Revisa este contenido para que tenga un tono casual y relajado, haciéndolo sentir más personal y menos formal, sin cambiar el significado original y el idioma.', - aiChangeToneDirectPrompt: 'Haz que el tono sea más directo, con un lenguaje claro y un enfoque asertivo, sin cambiar el significado original y el idioma.', - aiChangeToneConfidentPrompt: 'Infunde este contenido con un tono confiado, mostrando seguridad y decisión, sin cambiar el significado original y el idioma.', - aiChangeStyleBusinessPrompt: 'Reescribe este contenido con un estilo orientado al negocio, enfocándose en la claridad, eficiencia y profesionalismo, sin cambiar el significado original y el idioma.', - aiChangeStyleLegalPrompt: 'Adapta este contenido a un estilo legal, incorporando la terminología apropiada y la formalidad típica de los documentos legales, sin cambiar el significado original y el idioma.', - aiChangeStyleJournalismPrompt: 'Convierte este contenido en un estilo periodístico, enfatizando la precisión factual, la objetividad y la información informativa, sin cambiar el significado original y el idioma.', - aiChangeStylePoeticPrompt: 'Recrea este contenido con un estilo poético, utilizando un lenguaje expresivo, ritmo e imágenes para transmitir el mensaje, sin cambiar el significado original y el idioma.', - aiTranslateToSpanishPrompt: 'Traduce este contenido al español, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToFrenchPrompt: 'Traduce este contenido al francés, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToGermanPrompt: 'Traduce este contenido al alemán, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToItalianPrompt: 'Traduce este contenido al italiano, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToPortuguesePrompt: 'Traduce este contenido al portugués, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToEnglishPrompt: 'Traduce este contenido al inglés, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToChinesePrompt: 'Traduce este contenido al chino, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToJapanesePrompt: 'Traduce este contenido al japonés, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToKoreanPrompt: 'Traduce este contenido al coreano, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToRussianPrompt: 'Traduce este contenido al ruso, asegurando que la traducción sea precisa y mantenga el significado original.', - aiTranslateToArabicPrompt: 'Traduce este contenido al árabe, asegurando que la traducción sea precisa y mantenga el significado original.', + ) + .then(response => response.json()) + .then(data => { + if (data.error) { + throw new Error(data.error.message); + } + + return Jodit.modules.Helpers.get('choices.0.message.content', data) ?? ''; + }); + } + } }); editor.value = ''; @@ -142,6 +124,10 @@

Jodit Test Document

) ); }; + + editor.value = '

Your secret API keys are listed below. Please note that we do not display your secret API keys again after you generate them.\n' + + '\n' + + 'Do not share your API key with others, or expose it in the browser or other client-side code. In order to protect the security of your account, OpenAI may also automatically disable any API key that we\'ve found has leaked publicly.

'; // delete editor; // const box = new UIBox(editor1); // alert(box.container.outerHTML); @@ -155,4 +141,4 @@

Jodit Test Document

- \ No newline at end of file + diff --git a/src/config.ts b/src/config.ts index bd64ab0c5..52a5c7d1b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,7 +5,7 @@ */ /** - * Options for the editor. You can set them when creating the editor. + * Editor options. These can be configured upon the creation of the editor. * ```javascript * const editor = Jodit.make('#editor', { * toolbar: true, @@ -18,21 +18,22 @@ * @module config */ +import * as consts from 'jodit/core/constants'; +import { INSERT_AS_HTML } from 'jodit/core/constants'; + import type { - IExtraPlugin, - IDictionary, - IViewOptions, - NodeFunction, Attributes, ButtonsOption, Controls, IControlType, - IUIButtonState, + IDictionary, + IExtraPlugin, InsertMode, + IUIButtonState, + IViewOptions, + NodeFunction, Nullable } from './types'; -import * as consts from 'jodit/core/constants'; -import { INSERT_AS_HTML } from 'jodit/core/constants'; /** * Default Editor's Configuration @@ -189,7 +190,7 @@ class Config implements IViewOptions { disabled: boolean = false; /** - * In readOnly mode, some buttons can still be useful, for example the button to view source code or print + * In readOnly mode, some buttons can still be useful, for example, the button to view source code or print */ activeButtonsInReadOnly: string[] = [ 'source', @@ -247,7 +248,7 @@ class Config implements IViewOptions { theme: string = 'default'; /** - * if set true then the current mode is saved in a cookie , and is restored after a reload of the page + * if set true, then the current mode is saved in a cookie, and is restored after a reload of the page */ saveModeInStorage: boolean = false; @@ -341,7 +342,7 @@ class Config implements IViewOptions { styleValues: IDictionary = {}; /** - * After all changes in editors for textarea will call change trigger + * After all, changes in editors for textarea will call change trigger * * @example * ```javascript @@ -502,7 +503,7 @@ class Config implements IViewOptions { editHTMLDocumentMode: boolean = false; /** - * Use when you need insert new block element + * Use when you need to insert new block element * use enter option if not set */ enterBlock: 'p' | 'div' = @@ -684,7 +685,7 @@ class Config implements IViewOptions { basePath?: string; /** - * These buttons list will be added to option.buttons + * These buttons list will be added to the option. Buttons */ extraButtons: Array = []; diff --git a/src/core/async/async.test.js b/src/core/async/async.test.js index 20c218c46..ec93c15e7 100644 --- a/src/core/async/async.test.js +++ b/src/core/async/async.test.js @@ -30,7 +30,7 @@ describe('Test Async module', () => { expect(callCount).equals(3); }); - describe('After View was destroyed', () => { + describe('After the View was destroyed', () => { it('Should not be called', async () => { asyncM.setTimeout(callSpy, 100); asyncM @@ -44,7 +44,7 @@ describe('Test Async module', () => { }); describe('Jodit instance', () => { - it('Should work same way', async () => { + it('Should work the same way', async () => { const editor = getJodit(); editor.async.setTimeout(callSpy, 100); editor.async @@ -61,7 +61,7 @@ describe('Test Async module', () => { }); describe('Promise', () => { - it('Should has method for rejection in the outside', async () => { + it('Should have method for rejection on the outside', async () => { const promise = asyncM.promise(r => Promise.resolve().then(r)); promise.then(callSpy).catch(e => null); @@ -73,27 +73,27 @@ describe('Test Async module', () => { }); describe('setTimeout', () => { - it('Should can be called with number timeout', async () => { + it('Should be called with number timeout', async () => { asyncM.setTimeout(callSpy, 100); await delay(200); expect(callCount).equals(1); }); - it('Should can be called with options', async () => { + it('Should be called with options', async () => { asyncM.setTimeout(callSpy, { timeout: 100 }); await delay(200); expect(callCount).equals(1); }); describe('Clear', () => { - it('Should can be cleared with timeout id', async () => { + it('Should be cleared with timeout id', async () => { const id = asyncM.setTimeout(callSpy, { timeout: 100 }); asyncM.clearTimeout(id); await delay(200); expect(callCount).equals(0); }); - it('Should can be cleared with timeout id', async () => { + it('Should be cleared with timeout id', async () => { const id = asyncM.setTimeout(callSpy, { timeout: 100 }); asyncM.clearTimeout(id); await delay(200); @@ -101,7 +101,7 @@ describe('Test Async module', () => { }); describe('With label', () => { - it('Should can be cleared with label', async () => { + it('Should be cleared with label', async () => { asyncM.setTimeout(callSpy, { timeout: 100, label: 'test' }); asyncM.clearTimeout('test'); await delay(200); diff --git a/src/core/async/async.ts b/src/core/async/async.ts index 2d0f06bb8..c0716e016 100644 --- a/src/core/async/async.ts +++ b/src/core/async/async.ts @@ -18,16 +18,15 @@ import type { Nullable, RejectablePromise } from 'jodit/types'; -import { setTimeout, clearTimeout } from 'jodit/core/helpers/async'; - +import { IS_ES_NEXT } from 'jodit/core/constants'; +import { clearTimeout, setTimeout } from 'jodit/core/helpers/async'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; +import { isNumber } from 'jodit/core/helpers/checker/is-number'; import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; import { isPromise } from 'jodit/core/helpers/checker/is-promise'; import { isString } from 'jodit/core/helpers/checker/is-string'; -import { isNumber } from 'jodit/core/helpers/checker/is-number'; -import { assert } from 'jodit/core/helpers/utils/assert'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; -import { IS_ES_NEXT } from 'jodit/core/constants'; +import { assert } from 'jodit/core/helpers/utils/assert'; type Callback = (...args: any[]) => void; @@ -352,16 +351,12 @@ export class Async implements IAsync { ): number => { const start = Date.now(); - return this.setTimeout( - () => { - callback({ - didTimeout: false, - timeRemaining: () => - Math.max(0, 50 - (Date.now() - start)) - }); - }, - options?.timeout ?? 1 - ); + return this.setTimeout(() => { + callback({ + didTimeout: false, + timeRemaining: () => Math.max(0, 50 - (Date.now() - start)) + }); + }, options?.timeout ?? 1); }); private __cancelIdleCallbackNative = diff --git a/src/core/component/component.ts b/src/core/component/component.ts index e65c0db6c..f7bf889f6 100644 --- a/src/core/component/component.ts +++ b/src/core/component/component.ts @@ -17,17 +17,16 @@ import type { IDictionary, Nullable } from 'jodit/types'; - +import { Async } from 'jodit/core/async'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { uniqueUid } from 'jodit/core/global'; import { - kebabCase, get, getClassName, isFunction, - isVoid + isVoid, + kebabCase } from 'jodit/core/helpers'; -import { uniqueUid } from 'jodit/core/global'; -import { STATUSES } from 'jodit/core/component/statuses'; -import { Async } from 'jodit/core/async'; const StatusListHandlers: Map< Component, @@ -156,7 +155,7 @@ export abstract class Component implements IComponent { /** * The component is currently undergoing destructuring or has already been destroyed. - * Those. you should not hang new events on him now or do anything else with him. + * Those. you should not the app froze new events on him now or do anything else with him. */ get isInDestruct(): boolean { return ( @@ -179,7 +178,7 @@ export abstract class Component implements IComponent { abstract className(): string; - constructor() { + protected constructor() { this.uid = 'jodit-uid-' + uniqueUid(); } diff --git a/src/core/component/index.ts b/src/core/component/index.ts index a84592149..e88e8ae5a 100644 --- a/src/core/component/index.ts +++ b/src/core/component/index.ts @@ -8,6 +8,6 @@ * @module component */ -export * from './statuses'; export * from './component'; +export * from './statuses'; export * from './view-component'; diff --git a/src/core/component/view-component.ts b/src/core/component/view-component.ts index 7cfb79847..112d1a062 100644 --- a/src/core/component/view-component.ts +++ b/src/core/component/view-component.ts @@ -9,6 +9,7 @@ */ import type { IViewBased, IViewComponent } from 'jodit/types'; + import { Component } from './component'; export abstract class ViewComponent diff --git a/src/core/constants.ts b/src/core/constants.ts index 003bbe4d6..3a6fb553e 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -27,6 +27,7 @@ export let IS_TEST = process.env.IS_TEST as unknown as boolean; export const FAT_MODE = process.env.FAT_MODE as unknown as boolean; export const HOMEPAGE = process.env.HOMEPAGE as string; export const SET_TEST = (): boolean => (IS_TEST = true); +export const TOKENS = process.env.TOKENS as unknown as Record; export const INVISIBLE_SPACE = '\uFEFF'; export const NBSP_SPACE = '\u00A0'; diff --git a/src/core/create/README.md b/src/core/create/README.md index 442c18ad2..ecf3b5480 100644 --- a/src/core/create/README.md +++ b/src/core/create/README.md @@ -1,7 +1,7 @@ # Create DOM Every internal DOM node of both the editor interface and the editor content itself must be created through this module. -This is due to the fact that the interface can be shown in an iframe, or another window. +This is because the interface can be shown in an iframe, or another window. And in this case, you need to create its elements using the document from this window. In order not to worry about it yourself, this module was created. diff --git a/src/core/create/create.test.js b/src/core/create/create.test.js index 2ccde6f34..cdf901961 100644 --- a/src/core/create/create.test.js +++ b/src/core/create/create.test.js @@ -4,7 +4,7 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ describe('Test Creator module', function () { - describe('Create inside element', function () { + describe('Create an inside element', function () { it('Should be different in iframe mode', function () { const editor1 = getJodit(); const editor2 = Jodit.make(appendTestArea(), { iframe: true }); @@ -22,7 +22,7 @@ describe('Test Creator module', function () { }); describe('createAttributes', function () { - it('Should add to every nodes some attributes', function () { + it('Should add to all nodes some attributes', function () { const editor = getJodit(); const div = editor.createInside.div(); expect(div.className).equals(''); diff --git a/src/core/create/create.ts b/src/core/create/create.ts index 530c3a1f7..b76202a4a 100644 --- a/src/core/create/create.ts +++ b/src/core/create/create.ts @@ -11,27 +11,25 @@ */ import type { - IDictionary, Attributes, + CanUndef, Children, ICreate, - CanUndef, + IDictionary, NodeFunction } from 'jodit/types'; - +import { INVISIBLE_SPACE } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; import { - isPlainObject, asArray, + attr, isFunction, - refs, + isPlainObject, isString, - attr + refs } from 'jodit/core/helpers'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { Dom } from 'jodit/core/dom/dom'; -import { INVISIBLE_SPACE } from 'jodit/core/constants'; - export class Create implements ICreate { private get doc(): Document { // @ts-ignore - TODO it's a function @@ -182,8 +180,9 @@ export class Create implements ICreate { } /** - * Create DOM element from HTML text + * Create a DOM element from HTML text * + // eslint-disable-next-line tsdoc/syntax * @param refsToggleElement - State dictionary in which you can set the visibility of some of the elements * ```js * const editor = Jodit.make('#editor'); diff --git a/src/core/decorators/autobind/autobind.ts b/src/core/decorators/autobind/autobind.ts new file mode 100644 index 000000000..bcaa890ee --- /dev/null +++ b/src/core/decorators/autobind/autobind.ts @@ -0,0 +1,7 @@ +/*! + * Jodit Editor (https://xdsoft.net/jodit/) + * Released under MIT see LICENSE.txt in the project root for license information. + * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net + */ + +export { default as autobind } from 'autobind-decorator'; diff --git a/src/core/decorators/cache/cache.ts b/src/core/decorators/cache/cache.ts index a51aa1504..ad23d2cab 100644 --- a/src/core/decorators/cache/cache.ts +++ b/src/core/decorators/cache/cache.ts @@ -11,17 +11,17 @@ */ import type { IDictionary, IViewBased, IViewComponent } from 'jodit/types'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { Dom } from 'jodit/core/dom/dom'; import { isFunction, isViewObject } from 'jodit/core/helpers/checker'; import { error } from 'jodit/core/helpers/utils/error/error'; -import { Dom } from 'jodit/core/dom/dom'; -import { STATUSES } from 'jodit/core/component/statuses'; export interface CachePropertyDescriptor extends PropertyDescriptor { get?: (this: T) => R; } export function cache( - target: object, + _: object, name: PropertyKey, descriptor: CachePropertyDescriptor ): void { @@ -51,7 +51,7 @@ export function cache( export function cacheHTML( target: IDictionary, - name: string, + _: string, descriptor: CachePropertyDescriptor ): void { const fn = descriptor.value; diff --git a/src/core/decorators/debounce/debounce.ts b/src/core/decorators/debounce/debounce.ts index f006a1447..11bdc1b67 100644 --- a/src/core/decorators/debounce/debounce.ts +++ b/src/core/decorators/debounce/debounce.ts @@ -11,19 +11,19 @@ */ import type { - IDictionary, - IViewComponent, + DecoratorHandler, IAsyncParams, - DecoratorHandler + IDictionary, + IViewComponent } from 'jodit/types'; +import { Component, STATUSES } from 'jodit/core/component'; import { isFunction, isNumber, isPlainObject } from 'jodit/core/helpers/checker'; -import { Component, STATUSES } from 'jodit/core/component'; -import { error } from 'jodit/core/helpers/utils/error'; import { assert } from 'jodit/core/helpers/utils/assert'; +import { error } from 'jodit/core/helpers/utils/error'; export function debounce( timeout?: number | ((ctx: V) => number | IAsyncParams) | IAsyncParams, diff --git a/src/core/decorators/derive/README.md b/src/core/decorators/derive/README.md index 21a7b96cd..58b6245c8 100644 --- a/src/core/decorators/derive/README.md +++ b/src/core/decorators/derive/README.md @@ -33,7 +33,7 @@ export abstract class SomeFuntionality { In classical OOP, we would use inheritance. But if we want to add this functionality to a class, which has nothing to do with it, there will be problems. -Therefore, the traits mechanism was proposed in V4Fire, and Jodit borrowed it. +Therefore, the trait mechanism was proposed in V4Fire, and Jodit borrowed it. ```typescript import type { IComponent, IDictionary } from 'jodit/types'; diff --git a/src/core/decorators/idle/idle.ts b/src/core/decorators/idle/idle.ts index 150dba8ad..7a47f7fa5 100644 --- a/src/core/decorators/idle/idle.ts +++ b/src/core/decorators/idle/idle.ts @@ -10,7 +10,7 @@ * @module decorators/idle */ -import type { DecoratorHandler, IDictionary, IComponent } from 'jodit/types'; +import type { DecoratorHandler, IComponent, IDictionary } from 'jodit/types'; import { Component, STATUSES } from 'jodit/core/component'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { error } from 'jodit/core/helpers/utils/error'; diff --git a/src/core/decorators/index.ts b/src/core/decorators/index.ts index 8a207bd64..1ec7ea21c 100644 --- a/src/core/decorators/index.ts +++ b/src/core/decorators/index.ts @@ -10,14 +10,14 @@ * @module decorators */ +export * from './autobind/autobind'; export * from './cache/cache'; export * from './component/component'; export * from './debounce/debounce'; -export * from './idle/idle'; +export * from './derive/derive'; export * from './hook/hook'; +export * from './idle/idle'; export * from './nonenumerable/nonenumerable'; export * from './persistent/persistent'; export * from './wait/wait'; export * from './watch/watch'; -export * from './derive/derive'; -export { default as autobind } from 'autobind-decorator'; diff --git a/src/core/decorators/spy/spy.ts b/src/core/decorators/spy/spy.ts index a7cf981fe..789bd4e07 100644 --- a/src/core/decorators/spy/spy.ts +++ b/src/core/decorators/spy/spy.ts @@ -43,7 +43,7 @@ export function spy(target: Function): void { this: typeof target, ...args: any[] ): any { - console.log( + console.warn( `Class: ${getClassName(target.prototype)} call: ${String( key )}(${args.map(a => diff --git a/src/core/decorators/wait/wait.ts b/src/core/decorators/wait/wait.ts index b242e8784..175c88b1e 100644 --- a/src/core/decorators/wait/wait.ts +++ b/src/core/decorators/wait/wait.ts @@ -11,9 +11,9 @@ */ import type { IViewBased, IViewComponent } from 'jodit/types'; +import { STATUSES } from 'jodit/core/component/statuses'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { error } from 'jodit/core/helpers/utils/error'; -import { STATUSES } from 'jodit/core/component/statuses'; export function wait( condition: (ctx: T) => boolean diff --git a/src/core/decorators/watch/watch.ts b/src/core/decorators/watch/watch.ts index 0858ac8b7..9f1d9ad2a 100644 --- a/src/core/decorators/watch/watch.ts +++ b/src/core/decorators/watch/watch.ts @@ -17,12 +17,12 @@ import type { IDictionary, IViewBased } from 'jodit/types'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { observable } from 'jodit/core/event-emitter/observable'; +import { splitArray } from 'jodit/core/helpers/array/split-array'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; import { isViewObject } from 'jodit/core/helpers/checker/is-view-object'; -import { observable } from 'jodit/core/event-emitter/observable'; -import { STATUSES } from 'jodit/core/component/statuses'; -import { splitArray } from 'jodit/core/helpers/array/split-array'; import { error } from 'jodit/core/helpers/utils/error'; export function getPropertyDescriptor( diff --git a/src/core/dom/dom.test.js b/src/core/dom/dom.test.js index a11017738..732591705 100644 --- a/src/core/dom/dom.test.js +++ b/src/core/dom/dom.test.js @@ -495,7 +495,6 @@ describe('Test Dom module', function () { .on('end', () => { for (let i = 0; i < 8000; i += 1) { if (names[i] !== ls[i % 16]) { - console.log(i, ls[i % 16], names[i]); break; } } diff --git a/src/core/dom/dom.ts b/src/core/dom/dom.ts index 0ed86f479..d5905a07f 100644 --- a/src/core/dom/dom.ts +++ b/src/core/dom/dom.ts @@ -20,24 +20,24 @@ import type { Nullable } from 'jodit/types'; import * as consts from 'jodit/core/constants'; +import { + INSEPARABLE_TAGS, + LIST_TAGS, + NO_EMPTY_TAGS, + TEMP_ATTR +} from 'jodit/core/constants'; +import { toArray } from 'jodit/core/helpers/array/to-array'; import { isArray, isFunction, isHTML, - isString, - isVoid, + isMarker, isSet, - isMarker + isString, + isVoid } from 'jodit/core/helpers/checker'; -import { toArray } from 'jodit/core/helpers/array/to-array'; import { trim } from 'jodit/core/helpers/string/trim'; import { $$, attr, call, css, dataBind, error } from 'jodit/core/helpers/utils'; -import { - INSEPARABLE_TAGS, - LIST_TAGS, - NO_EMPTY_TAGS, - TEMP_ATTR -} from 'jodit/core/constants'; /** * Module for working with DOM diff --git a/src/core/dom/lazy-walker.ts b/src/core/dom/lazy-walker.ts index 6cf1612d6..867b153d6 100644 --- a/src/core/dom/lazy-walker.ts +++ b/src/core/dom/lazy-walker.ts @@ -8,11 +8,10 @@ * @module dom */ -import type { IAsync, IDestructible } from 'jodit/types'; -import type { Nullable, CanUndef } from 'jodit/types'; -import { Eventify } from 'jodit/core/event-emitter/eventify'; +import type { CanUndef, IAsync, IDestructible, Nullable } from 'jodit/types'; import { autobind } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; +import { Eventify } from 'jodit/core/event-emitter/eventify'; export class LazyWalker extends Eventify<{ diff --git a/src/core/event-emitter/event-emitter.ts b/src/core/event-emitter/event-emitter.ts index ff105b932..8c840af88 100644 --- a/src/core/event-emitter/event-emitter.ts +++ b/src/core/event-emitter/event-emitter.ts @@ -18,12 +18,12 @@ import type { IEventEmitter, IEventEmitterOnOptions } from 'jodit/types'; -import { isString, isStringArray } from 'jodit/core/helpers/checker/is-string'; -import { isFunction } from 'jodit/core/helpers/checker/is-function'; +import { PASSIVE_EVENTS } from 'jodit/core/constants'; +import { splitArray } from 'jodit/core/helpers/array/split-array'; import { isArray } from 'jodit/core/helpers/checker/is-array'; +import { isFunction } from 'jodit/core/helpers/checker/is-function'; +import { isString, isStringArray } from 'jodit/core/helpers/checker/is-string'; import { error } from 'jodit/core/helpers/utils/error'; -import { splitArray } from 'jodit/core/helpers/array/split-array'; -import { PASSIVE_EVENTS } from 'jodit/core/constants'; import { defaultNameSpace, EventHandlersStore } from './store'; diff --git a/src/core/event-emitter/observable.ts b/src/core/event-emitter/observable.ts index 8ae6da9a0..0792675b9 100644 --- a/src/core/event-emitter/observable.ts +++ b/src/core/event-emitter/observable.ts @@ -9,15 +9,15 @@ */ import type { - CanUndef, - IObservable, CallbackFunction, - IDictionary + CanUndef, + IDictionary, + IObservable } from 'jodit/types'; +import { getPropertyDescriptor } from 'jodit/core/decorators/watch/watch'; import { isArray } from 'jodit/core/helpers/checker/is-array'; import { isFastEqual } from 'jodit/core/helpers/checker/is-equal'; import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; -import { getPropertyDescriptor } from 'jodit/core/decorators/watch/watch'; const OBSERVABLE_OBJECT = Symbol('observable-object'); diff --git a/src/core/event-emitter/store.ts b/src/core/event-emitter/store.ts index bb0f42830..d931be6fd 100644 --- a/src/core/event-emitter/store.ts +++ b/src/core/event-emitter/store.ts @@ -13,8 +13,8 @@ import type { EventHandlerBlock, IDictionary } from 'jodit/types'; -import { assert } from 'jodit/core/helpers/utils/assert'; import { toArray } from 'jodit/core/helpers/array/to-array'; +import { assert } from 'jodit/core/helpers/utils/assert'; export const defaultNameSpace = 'JoditEventDefaultNamespace'; diff --git a/src/core/global.ts b/src/core/global.ts index 62213a9e6..a20c6b7e3 100644 --- a/src/core/global.ts +++ b/src/core/global.ts @@ -16,18 +16,16 @@ import type { IViewBased, IViewComponent } from 'jodit/types'; +import { isJoditObject } from 'jodit/core/helpers/checker/is-jodit-object'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { isViewObject } from 'jodit/core/helpers/checker/is-view-object'; +import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; +import { getClassName } from 'jodit/core/helpers/utils/get-class-name'; +import { PluginSystem } from 'jodit/core/plugin/plugin-system'; -import { PluginSystem } from './plugin/plugin-system'; - +import { lang } from './constants'; import { Dom } from './dom'; - import { EventEmitter } from './event-emitter'; -import { isJoditObject } from './helpers/checker/is-jodit-object'; -import { isViewObject } from './helpers/checker/is-view-object'; -import { getClassName } from './helpers/utils/get-class-name'; -import { kebabCase } from './helpers/string/kebab-case'; -import { lang } from './constants'; -import { isString } from 'jodit/core/helpers/checker/is-string'; export const instances: IDictionary = {}; diff --git a/src/core/helpers/array/array.helpers.test.js b/src/core/helpers/array/array.helpers.test.js index 256c63e03..b42164c14 100644 --- a/src/core/helpers/array/array.helpers.test.js +++ b/src/core/helpers/array/array.helpers.test.js @@ -5,7 +5,7 @@ */ describe('Test array helpers', () => { describe('asArray', () => { - it('Should return array', () => { + it('Should return an array', () => { expect(Jodit.modules.Helpers.asArray(1)).to.be.an('array'); expect(Jodit.modules.Helpers.asArray(1)).deep.eq([1]); expect(Jodit.modules.Helpers.asArray([1])).deep.eq([1]); @@ -14,7 +14,7 @@ describe('Test array helpers', () => { }); describe('splitArray', () => { - it('Should return array', () => { + it('Should return an array', () => { expect(Jodit.modules.Helpers.splitArray('1,3')).deep.eq(['1', '3']); expect(Jodit.modules.Helpers.splitArray(['1', '3'])).deep.eq([ '1', @@ -24,7 +24,7 @@ describe('Test array helpers', () => { }); describe('toArray', () => { - it('Should return array', () => { + it('Should return an array', () => { expect(Jodit.modules.Helpers.toArray('13')).deep.eq(['1', '3']); expect(Jodit.modules.Helpers.toArray(['1', '3'])).deep.eq([ '1', diff --git a/src/core/helpers/array/to-array.ts b/src/core/helpers/array/to-array.ts index dd4d7b0f5..650b0ecd7 100644 --- a/src/core/helpers/array/to-array.ts +++ b/src/core/helpers/array/to-array.ts @@ -8,8 +8,8 @@ * @module helpers/array */ -import { reset } from 'jodit/core/helpers/utils/reset'; import { isNativeFunction } from 'jodit/core/helpers/checker/is-native-function'; +import { reset } from 'jodit/core/helpers/utils/reset'; /** * Always return Array. It's a safe polyfill for [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from) method diff --git a/src/core/helpers/checker/index.ts b/src/core/helpers/checker/index.ts index 808a88d0b..625a27d01 100644 --- a/src/core/helpers/checker/index.ts +++ b/src/core/helpers/checker/index.ts @@ -10,7 +10,6 @@ export * from './has-browser-color-picker'; export * from './is-array'; -export * from './is-set'; export * from './is-boolean'; export * from './is-equal'; export * from './is-function'; @@ -19,16 +18,17 @@ export * from './is-html-from-word'; export * from './is-imp-interface'; export * from './is-int'; export * from './is-jodit-object'; -export * from './is-view-object'; export * from './is-license'; +export * from './is-marker'; export * from './is-native-function'; export * from './is-number'; export * from './is-numeric'; export * from './is-plain-object'; export * from './is-promise'; +export * from './is-set'; export * from './is-string'; export * from './is-url'; export * from './is-valid-name'; +export * from './is-view-object'; export * from './is-void'; export * from './is-window'; -export * from './is-marker'; diff --git a/src/core/helpers/checker/is-imp-interface.ts b/src/core/helpers/checker/is-imp-interface.ts index a4cc479d7..167da2c41 100644 --- a/src/core/helpers/checker/is-imp-interface.ts +++ b/src/core/helpers/checker/is-imp-interface.ts @@ -9,8 +9,9 @@ */ import type { IContainer, IDestructible, IInitable } from 'jodit/types'; -import { isFunction } from './is-function'; import { Dom } from 'jodit/core/dom/dom'; + +import { isFunction } from './is-function'; import { isVoid } from './is-void'; /** diff --git a/src/core/helpers/checker/is-jodit-object.ts b/src/core/helpers/checker/is-jodit-object.ts index 48e1dc361..8b74905e6 100644 --- a/src/core/helpers/checker/is-jodit-object.ts +++ b/src/core/helpers/checker/is-jodit-object.ts @@ -9,6 +9,7 @@ */ import type { IJodit } from 'jodit/types'; + import { isFunction } from './is-function'; /** diff --git a/src/core/helpers/checker/is-marker.ts b/src/core/helpers/checker/is-marker.ts index 186d0b0fa..3f2ee58dd 100644 --- a/src/core/helpers/checker/is-marker.ts +++ b/src/core/helpers/checker/is-marker.ts @@ -9,8 +9,8 @@ */ import type { Nullable } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { MARKER_CLASS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; /** * Define element is selection helper diff --git a/src/core/helpers/checker/is-plain-object.ts b/src/core/helpers/checker/is-plain-object.ts index 97a88d31e..b071e8561 100644 --- a/src/core/helpers/checker/is-plain-object.ts +++ b/src/core/helpers/checker/is-plain-object.ts @@ -9,6 +9,7 @@ */ import type { IDictionary } from 'jodit/types'; + import { isWindow } from './is-window'; /** diff --git a/src/core/helpers/checker/is-url.ts b/src/core/helpers/checker/is-url.ts index 2093a65ae..91b38147c 100644 --- a/src/core/helpers/checker/is-url.ts +++ b/src/core/helpers/checker/is-url.ts @@ -9,7 +9,7 @@ */ /** - * Check if a string is a url + * Check if a string is an url */ export function isURL(str: string): boolean { if (str.includes(' ')) { diff --git a/src/core/helpers/checker/is-view-object.ts b/src/core/helpers/checker/is-view-object.ts index eb652cc7a..98ebd39d8 100644 --- a/src/core/helpers/checker/is-view-object.ts +++ b/src/core/helpers/checker/is-view-object.ts @@ -9,10 +9,11 @@ */ import type { IViewBased } from 'jodit/types'; + import { isFunction } from './is-function'; /** - * Check if element is instance of View + * Check if an element is instance of View */ export function isViewObject(jodit: unknown): jodit is IViewBased { return Boolean( diff --git a/src/core/helpers/html/apply-styles.ts b/src/core/helpers/html/apply-styles.ts index f74f1157c..c3745180e 100644 --- a/src/core/helpers/html/apply-styles.ts +++ b/src/core/helpers/html/apply-styles.ts @@ -8,10 +8,10 @@ * @module helpers/html */ +import { IS_PROD } from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom/dom'; -import { $$ } from 'jodit/core/helpers/utils/selector'; import { trim } from 'jodit/core/helpers/string/trim'; -import { IS_PROD } from 'jodit/core/constants'; +import { $$ } from 'jodit/core/helpers/utils/selector'; function normalizeCSS(s: string): string { return s diff --git a/src/core/helpers/html/clean-from-word.ts b/src/core/helpers/html/clean-from-word.ts index 0f21ae56a..b53f47f48 100644 --- a/src/core/helpers/html/clean-from-word.ts +++ b/src/core/helpers/html/clean-from-word.ts @@ -9,8 +9,8 @@ */ import { Dom } from 'jodit/core/dom/dom'; -import { trim } from 'jodit/core/helpers/string/trim'; import { toArray } from 'jodit/core/helpers/array/to-array'; +import { trim } from 'jodit/core/helpers/string/trim'; /** * The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant diff --git a/src/core/helpers/html/index.ts b/src/core/helpers/html/index.ts index 5d6c13be6..6fb2f04bb 100644 --- a/src/core/helpers/html/index.ts +++ b/src/core/helpers/html/index.ts @@ -11,6 +11,6 @@ export * from './apply-styles'; export * from './clean-from-word'; export * from './htmlspecialchars'; -export * from './strip-tags'; -export * from './safe-html'; export * from './nl2br'; +export * from './safe-html'; +export * from './strip-tags'; diff --git a/src/core/helpers/html/safe-html.ts b/src/core/helpers/html/safe-html.ts index 74d1d577e..dceb99c70 100644 --- a/src/core/helpers/html/safe-html.ts +++ b/src/core/helpers/html/safe-html.ts @@ -8,8 +8,8 @@ * @module helpers/html */ -import { $$, attr } from 'jodit/core/helpers/utils'; import { Dom } from 'jodit/core/dom/dom'; +import { $$, attr } from 'jodit/core/helpers/utils'; type safeOptions = { removeOnError: boolean; diff --git a/src/core/helpers/html/strip-tags.ts b/src/core/helpers/html/strip-tags.ts index 9bd7afc5b..9a8c37a51 100644 --- a/src/core/helpers/html/strip-tags.ts +++ b/src/core/helpers/html/strip-tags.ts @@ -8,11 +8,11 @@ * @module helpers/html */ -import type { Nullable, HTMLTagNames } from 'jodit/types'; +import type { HTMLTagNames, Nullable } from 'jodit/types'; +import { Dom } from 'jodit/core/dom/dom'; import { isString } from 'jodit/core/helpers/checker/is-string'; -import { $$ } from 'jodit/core/helpers/utils'; import { trim } from 'jodit/core/helpers/string/trim'; -import { Dom } from 'jodit/core/dom/dom'; +import { $$ } from 'jodit/core/helpers/utils'; const NEW_LINE_TAGS: Set = new Set([ 'div', diff --git a/src/core/helpers/index.ts b/src/core/helpers/index.ts index 7f1d64c74..1d89924bb 100644 --- a/src/core/helpers/index.ts +++ b/src/core/helpers/index.ts @@ -10,7 +10,6 @@ * @module helpers */ -export * from './utils'; export * from './array'; export * from './async'; export * from './checker'; @@ -19,3 +18,4 @@ export * from './html'; export * from './normalize'; export * from './size'; export * from './string'; +export * from './utils'; diff --git a/src/core/helpers/normalize/index.ts b/src/core/helpers/normalize/index.ts index 537e07440..139761f4c 100644 --- a/src/core/helpers/normalize/index.ts +++ b/src/core/helpers/normalize/index.ts @@ -8,11 +8,11 @@ * @module helpers/normalize */ +export * from './normalize-color'; +export * from './normalize-css-value'; export * from './normalize-key-aliases'; export * from './normalize-license'; export * from './normalize-path'; export * from './normalize-relative-path'; export * from './normalize-size'; export * from './normalize-url'; -export * from './normalize-css-value'; -export * from './normalize-color'; diff --git a/src/core/helpers/normalize/normalize-css-value.ts b/src/core/helpers/normalize/normalize-css-value.ts index 10bc5f24e..f83d42073 100644 --- a/src/core/helpers/normalize/normalize-css-value.ts +++ b/src/core/helpers/normalize/normalize-css-value.ts @@ -9,9 +9,9 @@ */ import { isNumeric } from 'jodit/core/helpers/checker/is-numeric'; -import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; -import { colorToHex } from 'jodit/core/helpers/color/color-to-hex'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; +import { colorToHex } from 'jodit/core/helpers/color/color-to-hex'; +import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; export const NUMBER_FIELDS_REG = /^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i; diff --git a/src/core/helpers/normalize/normalize-key-aliases.ts b/src/core/helpers/normalize/normalize-key-aliases.ts index 51d236df3..5222a5d0d 100644 --- a/src/core/helpers/normalize/normalize-key-aliases.ts +++ b/src/core/helpers/normalize/normalize-key-aliases.ts @@ -9,8 +9,8 @@ */ import type { IDictionary } from 'jodit/types'; -import { trim } from 'jodit/core/helpers/string/trim'; import { KEY_ALIASES } from 'jodit/core/constants'; +import { trim } from 'jodit/core/helpers/string/trim'; /** * Normalize keys to some standard name diff --git a/src/core/helpers/size/get-scroll-parent.ts b/src/core/helpers/size/get-scroll-parent.ts index 9ca33ccaf..73b125ab7 100644 --- a/src/core/helpers/size/get-scroll-parent.ts +++ b/src/core/helpers/size/get-scroll-parent.ts @@ -9,8 +9,8 @@ */ import type { Nullable } from 'jodit/types'; -import { css } from 'jodit/core/helpers/utils'; import { Dom } from 'jodit/core/dom/dom'; +import { css } from 'jodit/core/helpers/utils'; export function getScrollParent(node: Nullable): Nullable { if (!node) { diff --git a/src/core/helpers/size/index.ts b/src/core/helpers/size/index.ts index d10967cde..c5f4bc49f 100644 --- a/src/core/helpers/size/index.ts +++ b/src/core/helpers/size/index.ts @@ -11,6 +11,6 @@ export * from './get-content-width'; export * from './get-scroll-parent'; export * from './inner-width'; +export * from './object-size'; export * from './offset'; export * from './position'; -export * from './object-size'; diff --git a/src/core/helpers/string/i18n.ts b/src/core/helpers/string/i18n.ts index df3b3f88d..635a3a313 100644 --- a/src/core/helpers/string/i18n.ts +++ b/src/core/helpers/string/i18n.ts @@ -9,14 +9,15 @@ */ import type { IDictionary, ILanguageOptions } from 'jodit/types'; -import { Config } from 'jodit/config'; +import { IS_PROD, lang } from 'jodit/core/constants'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { ucfirst } from 'jodit/core/helpers/string/ucfirst'; import { defaultLanguage as defineLanguage, error } from 'jodit/core/helpers/utils'; -import { isString } from 'jodit/core/helpers/checker/is-string'; -import { ucfirst } from 'jodit/core/helpers/string/ucfirst'; -import { IS_PROD, lang } from 'jodit/core/constants'; + +import { Config } from 'jodit/config'; /** * Simple variant sprintf function diff --git a/src/core/helpers/string/trim.ts b/src/core/helpers/string/trim.ts index 48f279207..f69e7fafd 100644 --- a/src/core/helpers/string/trim.ts +++ b/src/core/helpers/string/trim.ts @@ -9,10 +9,10 @@ */ import { - SPACE_REG_EXP_END, - SPACE_REG_EXP_START, INVISIBLE_SPACE_REG_EXP_END, - INVISIBLE_SPACE_REG_EXP_START + INVISIBLE_SPACE_REG_EXP_START, + SPACE_REG_EXP_END, + SPACE_REG_EXP_START } from 'jodit/core/constants'; /** diff --git a/src/core/helpers/utils/append-script.ts b/src/core/helpers/utils/append-script.ts index 95f3b9d75..9f220047b 100644 --- a/src/core/helpers/utils/append-script.ts +++ b/src/core/helpers/utils/append-script.ts @@ -9,9 +9,10 @@ */ import type { IViewBased } from 'jodit/types'; -import { completeUrl } from './complete-url'; import { isString } from 'jodit/core/helpers/checker/is-string'; +import { completeUrl } from './complete-url'; + export type Loader = (jodit: IViewBased, url: string) => Promise; export interface CallbackAndElement { diff --git a/src/core/helpers/utils/attr.ts b/src/core/helpers/utils/attr.ts index cf89920dd..8b2ee2481 100644 --- a/src/core/helpers/utils/attr.ts +++ b/src/core/helpers/utils/attr.ts @@ -15,6 +15,7 @@ import { isString } from 'jodit/core/helpers/checker'; import { CamelCaseToKebabCase } from 'jodit/core/helpers/string/kebab-case'; + import { css } from './css'; /** @@ -47,7 +48,7 @@ export function attr( /** * Alias for `elm.getAttribute` but if set second argument `-{key}` * it will also check `data-{key}` attribute - * if set `value` it is alias for setAttribute with same logic + * if set `value` it is alias for setAttribute with the same logic */ export function attr( elm: Element, diff --git a/src/core/helpers/utils/config-proto.ts b/src/core/helpers/utils/config-proto.ts index 57f7be9f3..042da6ff8 100644 --- a/src/core/helpers/utils/config-proto.ts +++ b/src/core/helpers/utils/config-proto.ts @@ -9,14 +9,16 @@ */ import type { IDictionary } from 'jodit/types'; -import { isAtom } from './extend'; import { isArray } from 'jodit/core/helpers/checker/is-array'; import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; import { isString } from 'jodit/core/helpers/checker/is-string'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; -import { Config } from 'jodit/config'; + +import { isAtom } from './extend'; import { keys } from './utils'; +import { Config } from 'jodit/config'; + /** * @example * ```js @@ -84,7 +86,7 @@ export function ConfigProto( return; } - // On the first level all array are atomic + // On the first level all arrays are atomic if (deep !== 0 && isArray(opt) && !isAtom(opt) && isArray(protoKey)) { newOpt[key] = [...opt, ...protoKey.slice(opt.length)]; return; diff --git a/src/core/helpers/utils/convert-media-url-to-video-embed.ts b/src/core/helpers/utils/convert-media-url-to-video-embed.ts index e6f012d37..c93f2ba70 100644 --- a/src/core/helpers/utils/convert-media-url-to-video-embed.ts +++ b/src/core/helpers/utils/convert-media-url-to-video-embed.ts @@ -9,6 +9,7 @@ */ import { isURL } from 'jodit/core/helpers/checker/is-url'; + import { parseQuery } from './parse-query'; /** diff --git a/src/core/helpers/utils/css.ts b/src/core/helpers/utils/css.ts index 1f1946fb9..5fbc34f13 100644 --- a/src/core/helpers/utils/css.ts +++ b/src/core/helpers/utils/css.ts @@ -9,11 +9,11 @@ */ import type { IStyle, StyleValue } from 'jodit/types'; -import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; import { isBoolean } from 'jodit/core/helpers/checker/is-boolean'; +import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; import { - normalizeCssValue, normalizeCssNumericValue, + normalizeCssValue, NUMBER_FIELDS_REG } from 'jodit/core/helpers/normalize/normalize-css-value'; import { camelCase } from 'jodit/core/helpers/string/camel-case'; diff --git a/src/core/helpers/utils/index.ts b/src/core/helpers/utils/index.ts index 72f1c38f2..31dbe952e 100644 --- a/src/core/helpers/utils/index.ts +++ b/src/core/helpers/utils/index.ts @@ -9,9 +9,9 @@ */ export * from './align'; -export * from './attr'; export * from './append-script'; export * from './assert'; +export * from './attr'; export * from './browser'; export * from './build-query'; export * from './complete-url'; diff --git a/src/core/helpers/utils/print.ts b/src/core/helpers/utils/print.ts index eb22a4a00..a95e41fcb 100644 --- a/src/core/helpers/utils/print.ts +++ b/src/core/helpers/utils/print.ts @@ -9,11 +9,11 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { isString } from 'jodit/core/helpers/checker/is-string'; import { Dom } from 'jodit/core/dom/dom'; +import { isString } from 'jodit/core/helpers/checker/is-string'; -import { css } from './css'; import { attr } from './attr'; +import { css } from './css'; import { $$ } from './selector'; /** diff --git a/src/core/helpers/utils/reset.ts b/src/core/helpers/utils/reset.ts index 08c58a9af..801fccb89 100644 --- a/src/core/helpers/utils/reset.ts +++ b/src/core/helpers/utils/reset.ts @@ -9,9 +9,10 @@ */ import type { IDictionary, Nullable } from 'jodit/types'; -import { get } from './get'; -import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { IS_PROD } from 'jodit/core/constants'; +import { isFunction } from 'jodit/core/helpers/checker/is-function'; + +import { get } from './get'; const map: IDictionary = {}; diff --git a/src/core/helpers/utils/selector.ts b/src/core/helpers/utils/selector.ts index b8e25528a..927013322 100644 --- a/src/core/helpers/utils/selector.ts +++ b/src/core/helpers/utils/selector.ts @@ -8,20 +8,13 @@ * @module helpers/utils */ -import type { - HTMLTagNames, - IDictionary, - IUIElement, - Nullable -} from 'jodit/types/'; +import type { HTMLTagNames, IDictionary, Nullable } from 'jodit/types/'; import { IS_ES_NEXT, IS_IE } from 'jodit/core/constants'; -import { isString } from 'jodit/core/helpers/checker/is-string'; -import { attr, error } from 'jodit/core/helpers/utils'; import { Dom } from 'jodit/core/dom/dom'; -import { camelCase } from 'jodit/core/helpers/string/camel-case'; import { toArray } from 'jodit/core/helpers/array/to-array'; -import { UIElement } from 'jodit/core/ui/element'; -import { Component } from 'jodit/core/component/component'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { camelCase } from 'jodit/core/helpers/string/camel-case'; +import { attr, error } from 'jodit/core/helpers/utils'; let temp = 1; @@ -31,7 +24,8 @@ const $$temp = (): number => { }; /** - * Find all elements by selector and return Array. If it did not find any element it return empty array + * Find all elements by selector and return Array. If it did not find any element, it is return empty array + * @internal * * @example * ```javascript @@ -42,21 +36,21 @@ const $$temp = (): number => { * }) * ``` * @param selector - CSS like selector - * + * @param root - where to search */ export function $$( selector: K, - root: HTMLElement | HTMLDocument | DocumentFragment + root: HTMLElement | DocumentFragment ): Array; export function $$( selector: string, - root: HTMLElement | HTMLDocument | DocumentFragment + root: HTMLElement | DocumentFragment ): T[]; export function $$( selector: string | HTMLTagNames, - root: HTMLElement | HTMLDocument | DocumentFragment + root: HTMLElement | DocumentFragment ): T[] { let result: NodeList; @@ -125,11 +119,11 @@ export const getXPathByElement = ( * Find all `ref` or `data-ref` elements inside HTMLElement */ export const refs = ( - root: HTMLElement | IUIElement + root: HTMLElement ): IDictionary => { - if (Component.isInstanceOf(root, UIElement)) { - root = root.container; - } + // if (Component.isInstanceOf(root, UIElement)) { + // root = root.container; + // } return $$('[ref],[data-ref]', root).reduce((def, child) => { const key = attr(child, '-ref'); diff --git a/src/core/helpers/utils/set.ts b/src/core/helpers/utils/set.ts index 64034c438..369e1abed 100644 --- a/src/core/helpers/utils/set.ts +++ b/src/core/helpers/utils/set.ts @@ -9,10 +9,10 @@ */ import type { IDictionary } from 'jodit/types'; -import { isString } from 'jodit/core/helpers/checker/is-string'; -import { isNumeric } from 'jodit/core/helpers/checker/is-numeric'; import { isArray } from 'jodit/core/helpers/checker/is-array'; +import { isNumeric } from 'jodit/core/helpers/checker/is-numeric'; import { isPlainObject } from 'jodit/core/helpers/checker/is-plain-object'; +import { isString } from 'jodit/core/helpers/checker/is-string'; /** * Safe access in tree object diff --git a/src/core/helpers/utils/utils.ts b/src/core/helpers/utils/utils.ts index 3025424b0..9e734d921 100644 --- a/src/core/helpers/utils/utils.ts +++ b/src/core/helpers/utils/utils.ts @@ -11,15 +11,16 @@ import type { CanPromise, IControlType, - IViewBased, IJodit, - RejectablePromise, - Nullable + IViewBased, + Nullable, + RejectablePromise } from 'jodit/types'; import { isPromise } from 'jodit/core/helpers/checker/is-promise'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; -import { dataBind } from './data-bind'; + import { attr } from './attr'; +import { dataBind } from './data-bind'; /** * Call function with parameters @@ -52,7 +53,7 @@ export function markOwner(jodit: IViewBased, elm: HTMLElement): void { export function callPromise( condition: CanPromise, - callback: () => CanPromise + callback?: () => CanPromise ): CanPromise { if (isPromise(condition)) { return condition @@ -63,7 +64,7 @@ export function callPromise( .finally(callback); } - return callback(); + return callback?.(); } /** diff --git a/src/core/plugin/README.md b/src/core/plugin/README.md index 51720f5b2..24c15e1ac 100644 --- a/src/core/plugin/README.md +++ b/src/core/plugin/README.md @@ -104,7 +104,7 @@ export type ButtonGroup = ``` Buttons to be automatically added to the editor's button groups. -Those. if the plugin is connected, the button will appear in the list, if not connected, it will disappear. +Those. If the plugin is connected, the button will appear in the list, if not connected, it will disappear. ```js Jodit.defaultOptions.controls.insertTime = { diff --git a/src/core/plugin/helpers/init-instance.ts b/src/core/plugin/helpers/init-instance.ts index a6cc41347..b8d0afe3d 100644 --- a/src/core/plugin/helpers/init-instance.ts +++ b/src/core/plugin/helpers/init-instance.ts @@ -15,13 +15,14 @@ import type { PluginInstance, PluginType } from 'jodit/types'; -import { isInitable } from 'jodit/core/helpers/checker'; -import { loadStyle } from './load'; import { IS_PROD } from 'jodit/core/constants'; import { getContainer } from 'jodit/core/global'; +import { isInitable } from 'jodit/core/helpers/checker'; + +import { loadStyle } from './load'; /** - * Init plugin if it has not dependencies in another case wait requires plugins will be init + * Init plugin if it has no dependencies, in another case wait requires plugins will be init * @private */ export function init( diff --git a/src/core/plugin/helpers/load.ts b/src/core/plugin/helpers/load.ts index 70ec8db14..4ed7edb32 100644 --- a/src/core/plugin/helpers/load.ts +++ b/src/core/plugin/helpers/load.ts @@ -9,13 +9,13 @@ */ import type { IExtraPlugin, IJodit, PluginType } from 'jodit/types'; +import { IS_PROD } from 'jodit/core/constants'; +import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; import { appendScriptAsync, appendStyleAsync } from 'jodit/core/helpers/utils/append-script'; -import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; import { normalizeName } from 'jodit/core/plugin/helpers/utils'; -import { IS_PROD } from 'jodit/core/constants'; const styles: Set = new Set(); diff --git a/src/core/plugin/helpers/make-instance.ts b/src/core/plugin/helpers/make-instance.ts index a84a31561..9a3b1fb76 100644 --- a/src/core/plugin/helpers/make-instance.ts +++ b/src/core/plugin/helpers/make-instance.ts @@ -9,8 +9,8 @@ */ import type { IJodit, Nullable, PluginInstance, PluginType } from 'jodit/types'; -import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { IS_PROD } from 'jodit/core/constants'; +import { isFunction } from 'jodit/core/helpers/checker/is-function'; /** * Create instance of plugin diff --git a/src/core/plugin/index.ts b/src/core/plugin/index.ts index bb896575b..09cde68c6 100644 --- a/src/core/plugin/index.ts +++ b/src/core/plugin/index.ts @@ -8,5 +8,5 @@ * @module plugin */ -export * from './plugin-system'; export * from './plugin'; +export * from './plugin-system'; diff --git a/src/core/plugin/plugin-system.ts b/src/core/plugin/plugin-system.ts index 5ae66792c..9564a423b 100644 --- a/src/core/plugin/plugin-system.ts +++ b/src/core/plugin/plugin-system.ts @@ -9,25 +9,23 @@ */ import type { - IExtraPlugin, + CanUndef, IDictionary, + IExtraPlugin, IJodit, IPluginSystem, + Nullable, PluginInstance, - PluginType, - CanUndef, - Nullable + PluginType } from 'jodit/types'; - -import { isDestructable, isString, isArray } from 'jodit/core/helpers/checker'; - -import { splitArray } from 'jodit/core/helpers/array'; +import { IS_PROD } from 'jodit/core/constants'; import { eventEmitter } from 'jodit/core/global'; +import { splitArray } from 'jodit/core/helpers/array'; +import { isArray, isDestructable, isString } from 'jodit/core/helpers/checker'; +import { init } from 'jodit/core/plugin/helpers/init-instance'; import { loadExtras } from 'jodit/core/plugin/helpers/load'; -import { normalizeName } from 'jodit/core/plugin/helpers/utils'; import { makeInstance } from 'jodit/core/plugin/helpers/make-instance'; -import { init } from 'jodit/core/plugin/helpers/init-instance'; -import { IS_PROD } from 'jodit/core/constants'; +import { normalizeName } from 'jodit/core/plugin/helpers/utils'; import './interface'; diff --git a/src/core/plugin/plugin.test.js b/src/core/plugin/plugin.test.js index 90971311c..a985c3d02 100644 --- a/src/core/plugin/plugin.test.js +++ b/src/core/plugin/plugin.test.js @@ -120,7 +120,7 @@ describe('Plugin system test', () => { }); describe('Disable plugins', () => { - it('should not init plugin', () => { + it('should not init plug in', () => { const editor = getJodit({ disablePlugins: ['test'] }); @@ -199,7 +199,7 @@ describe('Plugin system test', () => { }); describe('Disable required plugin', () => { - it('should not init plugin', () => { + it('should not init plug in', () => { getJodit({ disablePlugins: ['second'] }); @@ -303,7 +303,7 @@ describe('Plugin system test', () => { expect(pleaseInited).is.true; }); - it('should not influence on readiness of the editor', async () => { + it('should not influence on the readiness of the editor', async () => { const editor = getJodit({ extraPlugins: ['please'], buttons: [ diff --git a/src/core/plugin/plugin.ts b/src/core/plugin/plugin.ts index f67b901b1..61461559a 100644 --- a/src/core/plugin/plugin.ts +++ b/src/core/plugin/plugin.ts @@ -11,7 +11,7 @@ */ import type { CanUndef, IJodit, IPlugin, IViewBased } from 'jodit/types'; -import { ViewComponent, STATUSES } from 'jodit/core/component'; +import { STATUSES, ViewComponent } from 'jodit/core/component'; import { autobind } from 'jodit/core/decorators'; import { isJoditObject } from 'jodit/core/helpers/checker/is-jodit-object'; diff --git a/src/core/request/ajax.ts b/src/core/request/ajax.ts index 32e926b7f..f531ccace 100644 --- a/src/core/request/ajax.ts +++ b/src/core/request/ajax.ts @@ -11,32 +11,32 @@ */ import type { - IDictionary, - IRequest, AjaxOptions, IAjax, - RejectablePromise, + IAsync, + IDictionary, + IRequest, IResponse, - IAsync + RejectablePromise } from 'jodit/types'; - -import { Config } from 'jodit/config'; - +import { Async } from 'jodit/core/async'; +import { autobind } from 'jodit/core/decorators/autobind/autobind'; import { - isPlainObject, - parseQuery, buildQuery, - isString, + ConfigProto, isFunction, - ConfigProto + isPlainObject, + isString, + parseQuery } from 'jodit/core/helpers'; import * as error from 'jodit/core/helpers/utils/error'; -import { Async } from 'jodit/core/async'; -import { autobind } from 'jodit/core/decorators'; -import { Response } from './response'; import './config'; +import { Response } from './response'; + +import { Config } from 'jodit/config'; + export class Ajax implements IAjax { className(): string { return 'Ajax'; diff --git a/src/core/request/config.ts b/src/core/request/config.ts index 8bb594ad6..c647a2367 100644 --- a/src/core/request/config.ts +++ b/src/core/request/config.ts @@ -9,6 +9,7 @@ */ import type { AjaxOptions } from 'jodit/types'; + import { Config } from 'jodit/config'; declare module 'jodit/config' { diff --git a/src/core/selection/README.md b/src/core/selection/README.md index 86ddbbe6e..da04c2579 100644 --- a/src/core/selection/README.md +++ b/src/core/selection/README.md @@ -1,7 +1,7 @@ # Selection A module for working with the cursor, text selections, processing selections, inserting html in place of the cursor. -most obvious use case +Most obvious use case ## How to insert HTML into Jodit diff --git a/src/core/selection/helpers/move-node-inside-start.ts b/src/core/selection/helpers/move-node-inside-start.ts index c011ab5f4..eb6699aaf 100644 --- a/src/core/selection/helpers/move-node-inside-start.ts +++ b/src/core/selection/helpers/move-node-inside-start.ts @@ -9,8 +9,8 @@ */ import type { IJodit } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; /** * Moves the fake node inside the adjacent element if it lies next to it but not inside. diff --git a/src/core/selection/index.ts b/src/core/selection/index.ts index ce0985836..8f446fcfd 100644 --- a/src/core/selection/index.ts +++ b/src/core/selection/index.ts @@ -8,5 +8,5 @@ * @module selection */ -export * from './style/commit-style'; export * from './selection'; +export * from './style/commit-style'; diff --git a/src/core/selection/selection.ts b/src/core/selection/selection.ts index 7030a180a..deb3c9f3c 100644 --- a/src/core/selection/selection.ts +++ b/src/core/selection/selection.ts @@ -19,9 +19,7 @@ import type { MarkerInfo, Nullable } from 'jodit/types'; - import * as consts from 'jodit/core/constants'; - import { INSEPARABLE_TAGS, INVISIBLE_SPACE, @@ -29,28 +27,27 @@ import { INVISIBLE_SPACE_REG_EXP_START as INV_START, IS_PROD } from 'jodit/core/constants'; +import { autobind } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; - import { - size, - attr, - error, $$, - css, + attr, call, - toArray, + css, + error, getScrollParent, - scrollIntoViewIfNeeded + scrollIntoViewIfNeeded, + size, + toArray } from 'jodit/core/helpers'; -import { autobind } from 'jodit/core/decorators'; -import { moveTheNodeAlongTheEdgeOutward } from 'jodit/core/selection/helpers/move-the-node-along-the-edge-outward'; +import { isFunction, isMarker, isString } from 'jodit/core/helpers/checker'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { isMarker, isFunction, isString } from 'jodit/core/helpers/checker'; - -import { CommitStyle } from './style/commit-style'; +import { moveTheNodeAlongTheEdgeOutward } from 'jodit/core/selection/helpers/move-the-node-along-the-edge-outward'; import './interface'; +import { CommitStyle } from './style/commit-style'; + export class Selection implements ISelect { constructor(readonly jodit: IJodit) { jodit.e.on('removeMarkers', () => { diff --git a/src/core/selection/style/api/extract.ts b/src/core/selection/style/api/extract.ts index 37fd22b15..f84b175ee 100644 --- a/src/core/selection/style/api/extract.ts +++ b/src/core/selection/style/api/extract.ts @@ -5,10 +5,10 @@ */ import type { IJodit } from 'jodit/types'; -import { call } from 'jodit/core/helpers/utils/utils'; -import { trim } from 'jodit/core/helpers/string/trim'; import { Dom } from 'jodit/core/dom/dom'; import { isMarker } from 'jodit/core/helpers/checker/is-marker'; +import { trim } from 'jodit/core/helpers/string/trim'; +import { call } from 'jodit/core/helpers/utils/utils'; /** * If the selection area is inside an element that matches the commit (suitable relative), diff --git a/src/core/selection/style/api/finite-state-machine.ts b/src/core/selection/style/api/finite-state-machine.ts index 546ad61ce..33cd3f7d4 100644 --- a/src/core/selection/style/api/finite-state-machine.ts +++ b/src/core/selection/style/api/finite-state-machine.ts @@ -5,9 +5,9 @@ */ import type { IDictionary } from 'jodit/types'; +import { IS_PROD } from 'jodit/core/constants'; import { isString } from 'jodit/core/helpers/checker/is-string'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { IS_PROD } from 'jodit/core/constants'; /** * A state machine implementation for applying styles. @@ -53,7 +53,7 @@ export class FiniteStateMachine< const res = action.call(this, value); assert(res && res !== value, 'Action should return new value'); - assert(isString(res.next), 'Value should contains next state'); + assert(isString(res.next), 'Value should contain the next state'); assert( res.next !== this.getState(), 'The new state should not be equal to the old one.' @@ -62,6 +62,7 @@ export class FiniteStateMachine< this.setState(res.next); if (!IS_PROD && !this.silent) { + // eslint-disable-next-line no-console console.log(`State: ${this.getState()}`); } diff --git a/src/core/selection/style/api/get-suit-child.ts b/src/core/selection/style/api/get-suit-child.ts index cb8a39eb9..3f9851768 100644 --- a/src/core/selection/style/api/get-suit-child.ts +++ b/src/core/selection/style/api/get-suit-child.ts @@ -4,8 +4,9 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Nullable, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, Nullable } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; + import { isNormalNode } from './is-normal-node'; import { isSuitElement } from './is-suit-element'; diff --git a/src/core/selection/style/api/get-suit-parent.ts b/src/core/selection/style/api/get-suit-parent.ts index 4c16d71bf..f2ac32262 100644 --- a/src/core/selection/style/api/get-suit-parent.ts +++ b/src/core/selection/style/api/get-suit-parent.ts @@ -4,8 +4,9 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Nullable, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, Nullable } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; + import { isNormalNode } from './is-normal-node'; import { isSuitElement } from './is-suit-element'; diff --git a/src/core/selection/style/api/has-same-style.ts b/src/core/selection/style/api/has-same-style.ts index 5a10d8745..5e0ca2d8e 100644 --- a/src/core/selection/style/api/has-same-style.ts +++ b/src/core/selection/style/api/has-same-style.ts @@ -5,11 +5,11 @@ */ import type { IStyle } from 'jodit/types'; -import { css } from 'jodit/core/helpers/utils/css'; +import { Dom } from 'jodit/core/dom/dom'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; import { normalizeCssValue } from 'jodit/core/helpers/normalize/normalize-css-value'; -import { Dom } from 'jodit/core/dom/dom'; import { assert } from 'jodit/core/helpers/utils/assert'; +import { css } from 'jodit/core/helpers/utils/css'; /** * Element has the same styles as in the commit diff --git a/src/core/selection/style/api/index.ts b/src/core/selection/style/api/index.ts index 22a1482b0..ae833cf67 100644 --- a/src/core/selection/style/api/index.ts +++ b/src/core/selection/style/api/index.ts @@ -4,18 +4,18 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -export * from './toggle-attributes'; -export * from './list/toggle-ordered-list'; -export * from './list/wrap-list'; -export * from './has-same-style'; export * from './extract'; export * from './finite-state-machine'; export * from './get-suit-child'; export * from './get-suit-parent'; +export * from './has-same-style'; export * from './is-inside-invisible-element'; -export * from './is-same-attributes'; export * from './is-normal-node'; +export * from './is-same-attributes'; export * from './is-suit-element'; +export * from './list/toggle-ordered-list'; +export * from './list/wrap-list'; +export * from './toggle-attributes'; export * from './unwrap-children'; export * from './wrap'; export * from './wrap-unwrapped-text'; diff --git a/src/core/selection/style/api/is-same-attributes.ts b/src/core/selection/style/api/is-same-attributes.ts index 462a50f22..235e18b4b 100644 --- a/src/core/selection/style/api/is-same-attributes.ts +++ b/src/core/selection/style/api/is-same-attributes.ts @@ -5,8 +5,8 @@ */ import type { IDictionary, IStyle } from 'jodit/types'; -import { attr } from 'jodit/core/helpers/utils'; import { size } from 'jodit/core/helpers/size/object-size'; +import { attr } from 'jodit/core/helpers/utils'; import { assert } from 'jodit/core/helpers/utils/assert'; import { hasSameStyle } from './has-same-style'; diff --git a/src/core/selection/style/api/is-suit-element.ts b/src/core/selection/style/api/is-suit-element.ts index 5775e8716..ce6d074e9 100644 --- a/src/core/selection/style/api/is-suit-element.ts +++ b/src/core/selection/style/api/is-suit-element.ts @@ -3,11 +3,11 @@ * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IStyle, Nullable, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, IStyle, Nullable } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; -import { isNormalNode } from './is-normal-node'; import { hasSameStyle, hasSameStyleKeys } from './has-same-style'; +import { isNormalNode } from './is-normal-node'; /** * Checks if an item is suitable for applying a commit. The element suits us if it diff --git a/src/core/selection/style/api/list/toggle-ordered-list.ts b/src/core/selection/style/api/list/toggle-ordered-list.ts index ed6e870b1..d0cb3be05 100644 --- a/src/core/selection/style/api/list/toggle-ordered-list.ts +++ b/src/core/selection/style/api/list/toggle-ordered-list.ts @@ -4,19 +4,19 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IJodit, CommitMode, ICommitStyle } from 'jodit/types'; +import type { CommitMode, ICommitStyle, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { assert } from 'jodit/core/helpers/utils/assert'; - import { extractSelectedPart } from 'jodit/core/selection/style/api/extract'; +import { toggleAttributes } from 'jodit/core/selection/style/api/toggle-attributes'; import { _PREFIX, CHANGE, INITIAL, - UNWRAP, - REPLACE + REPLACE, + UNWRAP } from 'jodit/core/selection/style/commit-style'; -import { toggleAttributes } from 'jodit/core/selection/style/api/toggle-attributes'; + import { wrapList } from './wrap-list'; /** diff --git a/src/core/selection/style/api/list/wrap-list.ts b/src/core/selection/style/api/list/wrap-list.ts index d09044466..1326f210a 100644 --- a/src/core/selection/style/api/list/wrap-list.ts +++ b/src/core/selection/style/api/list/wrap-list.ts @@ -4,19 +4,19 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IJodit, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom'; -import { - _PREFIX, - REPLACE, - WRAP, - INITIAL -} from 'jodit/core/selection/style/commit-style'; import { elementsEqualAttributes, isSameAttributes, toggleAttributes } from 'jodit/core/selection/style/api'; +import { + _PREFIX, + INITIAL, + REPLACE, + WRAP +} from 'jodit/core/selection/style/commit-style'; /** * Replaces non-leaf items with leaf items and either creates a new list or diff --git a/src/core/selection/style/api/toggle-attributes.ts b/src/core/selection/style/api/toggle-attributes.ts index 767046eae..197d6320b 100644 --- a/src/core/selection/style/api/toggle-attributes.ts +++ b/src/core/selection/style/api/toggle-attributes.ts @@ -4,27 +4,27 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { CommitMode, IJodit, IStyle, ICommitStyle } from 'jodit/types'; +import type { CommitMode, ICommitStyle, IJodit, IStyle } from 'jodit/types'; +import { Dom } from 'jodit/core/dom/dom'; +import { getContainer } from 'jodit/core/global'; +import { + isBoolean, + isNumber, + isPlainObject, + isString +} from 'jodit/core/helpers/checker'; +import { normalizeCssValue } from 'jodit/core/helpers/normalize/normalize-css-value'; +import { size } from 'jodit/core/helpers/size/object-size'; +import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; import { assert, attr } from 'jodit/core/helpers/utils'; import { css } from 'jodit/core/helpers/utils/css'; import { dataBind } from 'jodit/core/helpers/utils/data-bind'; -import { kebabCase } from 'jodit/core/helpers/string/kebab-case'; -import { normalizeCssValue } from 'jodit/core/helpers/normalize/normalize-css-value'; -import { size } from 'jodit/core/helpers/size/object-size'; -import { Dom } from 'jodit/core/dom/dom'; import { _PREFIX, CHANGE, UNSET, UNWRAP } from 'jodit/core/selection/style/commit-style'; -import { getContainer } from 'jodit/core/global'; -import { - isBoolean, - isNumber, - isPlainObject, - isString -} from 'jodit/core/helpers/checker'; const tak = 'toggleAttributes'; diff --git a/src/core/selection/style/api/unwrap-children.ts b/src/core/selection/style/api/unwrap-children.ts index b06d448bd..0a2e5d7cb 100644 --- a/src/core/selection/style/api/unwrap-children.ts +++ b/src/core/selection/style/api/unwrap-children.ts @@ -4,7 +4,7 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IDictionary, IStyle, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, IDictionary, IStyle } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { attr, css } from 'jodit/core/helpers/utils'; import { hasSameStyleKeys } from 'jodit/core/selection/style/api/has-same-style'; diff --git a/src/core/selection/style/api/wrap-unwrapped-text.ts b/src/core/selection/style/api/wrap-unwrapped-text.ts index 985be483e..44250dba6 100644 --- a/src/core/selection/style/api/wrap-unwrapped-text.ts +++ b/src/core/selection/style/api/wrap-unwrapped-text.ts @@ -4,7 +4,7 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IJodit, Nullable, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, IJodit, Nullable } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { isMarker } from 'jodit/core/helpers/checker/is-marker'; diff --git a/src/core/selection/style/api/wrap.ts b/src/core/selection/style/api/wrap.ts index be02fcf3e..fbcd3107a 100644 --- a/src/core/selection/style/api/wrap.ts +++ b/src/core/selection/style/api/wrap.ts @@ -4,12 +4,12 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { IJodit, ICommitStyle, HTMLTagNames } from 'jodit/types'; +import type { HTMLTagNames, ICommitStyle, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom'; import { attr } from 'jodit/core/helpers/utils/attr'; -import { wrapUnwrappedText } from './wrap-unwrapped-text'; import { wrapList } from './list/wrap-list'; +import { wrapUnwrappedText } from './wrap-unwrapped-text'; /** * Replaces the parent tag with the applicable one, or wraps the text and also replaces the tag diff --git a/src/core/selection/style/apply-style.ts b/src/core/selection/style/apply-style.ts index e9747470f..73586b624 100644 --- a/src/core/selection/style/apply-style.ts +++ b/src/core/selection/style/apply-style.ts @@ -8,15 +8,15 @@ * @module selection */ -import type { IJodit, ICommitStyle } from 'jodit/types'; +import type { ICommitStyle, IJodit } from 'jodit/types'; import { FiniteStateMachine } from './api'; +import { INITIAL } from './commit-style'; import { type IStyleTransactionValue, states, transactions } from './transactions'; -import { INITIAL } from './commit-style'; /** @internal */ export function ApplyStyle(jodit: IJodit, cs: ICommitStyle): void { diff --git a/src/core/selection/style/commit-style.ts b/src/core/selection/style/commit-style.ts index 3cfdd4938..ba218d7f8 100644 --- a/src/core/selection/style/commit-style.ts +++ b/src/core/selection/style/commit-style.ts @@ -10,9 +10,9 @@ import type { HTMLTagNames, + ICommitStyle, IJodit, - IStyleOptions, - ICommitStyle + IStyleOptions } from 'jodit/types'; import { IS_BLOCK, LIST_TAGS } from 'jodit/core/constants'; import { camelCase } from 'jodit/core/helpers/string/camel-case'; @@ -64,7 +64,7 @@ export class CommitStyle implements ICommitStyle { } /** - * New element is block + * New element is blocked */ get elementIsBlock(): boolean { return Boolean( diff --git a/src/core/selection/style/transactions.ts b/src/core/selection/style/transactions.ts index 4b617b1d4..32ec42d7b 100644 --- a/src/core/selection/style/transactions.ts +++ b/src/core/selection/style/transactions.ts @@ -9,27 +9,26 @@ */ import type { - IJodit, - IDictionary, CommitMode, - ICommitStyle + ICommitStyle, + IDictionary, + IJodit } from 'jodit/types'; -import { REPLACE } from 'jodit/core/selection'; +import { LIST_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; +import { assert } from 'jodit/core/helpers/utils/assert'; +import { INITIAL, REPLACE, UNSET, UNWRAP, WRAP } from 'jodit/core/selection'; import { extractSelectedPart, getSuitChild, getSuitParent, + isInsideInvisibleElement, suitableClosest, toggleAttributes, + toggleOrderedList, unwrapChildren, - isInsideInvisibleElement, - wrap, - toggleOrderedList + wrap } from 'jodit/core/selection/style/api'; -import { Dom } from 'jodit/core/dom/dom'; -import { INITIAL, UNSET, UNWRAP, WRAP } from 'jodit/core/selection'; -import { assert } from 'jodit/core/helpers/utils/assert'; -import { LIST_TAGS } from 'jodit/core/constants'; export const states = { START: 'START', diff --git a/src/core/storage/index.ts b/src/core/storage/index.ts index 9f8b52180..89bb288c0 100644 --- a/src/core/storage/index.ts +++ b/src/core/storage/index.ts @@ -8,6 +8,6 @@ * @module storage */ -export * from './engines/memory-storage-provider'; export * from './engines/local-storage-provider'; +export * from './engines/memory-storage-provider'; export * from './storage'; diff --git a/src/core/traits/dlgs.ts b/src/core/traits/dlgs.ts index 49c3684cb..304c36119 100644 --- a/src/core/traits/dlgs.ts +++ b/src/core/traits/dlgs.ts @@ -8,10 +8,10 @@ * @module traits */ -import type { IDialog, IDialogOptions, IViewBased, IDlgs } from 'jodit/types'; -import { Alert, Confirm, Dialog, Prompt } from 'jodit/modules/dialog'; +import type { IDialog, IDialogOptions, IDlgs, IViewBased } from 'jodit/types'; import { isHTML, isString } from 'jodit/core/helpers/checker'; import { markOwner } from 'jodit/core/helpers/utils/utils'; +import { Alert, Confirm, Dialog, Prompt } from 'jodit/modules/dialog'; export abstract class Dlgs implements IDlgs { dlg(this: IViewBased & IDlgs, options?: IDialogOptions): IDialog { diff --git a/src/core/traits/index.ts b/src/core/traits/index.ts index 0ace9c0b4..d507ccb0f 100644 --- a/src/core/traits/index.ts +++ b/src/core/traits/index.ts @@ -8,6 +8,6 @@ * @module traits */ +export * from './dlgs'; export * from './elms'; export * from './mods'; -export * from './dlgs'; diff --git a/src/core/traits/mods.ts b/src/core/traits/mods.ts index 911c5e733..4c67e7149 100644 --- a/src/core/traits/mods.ts +++ b/src/core/traits/mods.ts @@ -9,10 +9,10 @@ */ import type { + IComponent, IContainer, IDictionary, IMods, - IComponent, ModType } from 'jodit/types'; import { isVoid } from 'jodit/core/helpers/checker/is-void'; diff --git a/src/core/ui/button/button/button.ts b/src/core/ui/button/button/button.ts index 2ae450ac8..f61dd44bf 100644 --- a/src/core/ui/button/button/button.ts +++ b/src/core/ui/button/button/button.ts @@ -8,24 +8,24 @@ * @module ui/button */ -import './button.less'; - import type { + ButtonVariant, IUIButton, IUIButtonState, IUIButtonStatePartial, - IViewBased, - ButtonVariant + IViewBased } from 'jodit/types'; -import { UIElement } from 'jodit/core/ui/element'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { cache, cacheHTML, component, watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; -import { assert, attr } from 'jodit/core/helpers/utils'; -import { isString } from 'jodit/core/helpers/checker/is-string'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; -import { Icon } from 'jodit/core/ui/icon'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { assert, attr } from 'jodit/core/helpers/utils'; +import { UIElement } from 'jodit/core/ui/element'; import { UIList } from 'jodit/core/ui/group/list'; -import { cache, cacheHTML, component, watch } from 'jodit/core/decorators'; -import { STATUSES } from 'jodit/core/component/statuses'; +import { Icon } from 'jodit/core/ui/icon'; + +import './button.less'; export const UIButtonState = (): IUIButtonState => ({ size: 'middle', @@ -105,7 +105,7 @@ export class UIButton extends UIElement implements IUIButton { } /** - * Set size from parent list + * Set size from a parent list */ @watch('parentElement') protected updateSize(): void { @@ -186,7 +186,7 @@ export class UIButton extends UIElement implements IUIButton { } /** - * Set focus on element + * Set focus on an element */ focus(): void { this.container.focus(); diff --git a/src/core/ui/button/group/group.ts b/src/core/ui/button/group/group.ts index ddfe7a227..b7264737e 100644 --- a/src/core/ui/button/group/group.ts +++ b/src/core/ui/button/group/group.ts @@ -8,18 +8,18 @@ * @module ui/button */ -import './group.less'; - import type { IDictionary, IUIButton, IUIOption, IViewBased } from 'jodit/types'; -import { UIGroup } from 'jodit/core/ui/group/group'; import { component } from 'jodit/core/decorators/component/component'; -import { UIButton } from 'jodit/core/ui/button/button/button'; import { assert } from 'jodit/core/helpers/utils/assert'; +import { UIButton } from 'jodit/core/ui/button/button/button'; +import { UIGroup } from 'jodit/core/ui/group/group'; + +import './group.less'; @component export class UIButtonGroup extends UIGroup { diff --git a/src/core/ui/button/tooltip/tooltip.ts b/src/core/ui/button/tooltip/tooltip.ts index cf32d6ac1..39be7c44d 100644 --- a/src/core/ui/button/tooltip/tooltip.ts +++ b/src/core/ui/button/tooltip/tooltip.ts @@ -10,16 +10,16 @@ * @module ui/button */ -import './tooltip.less'; - import type { IPoint, IViewBased } from 'jodit/types'; -import { attr, css } from 'jodit/core/helpers/utils'; -import { getContainer } from 'jodit/core/global'; +import { STATUSES } from 'jodit/core/component'; import { autobind, component } from 'jodit/core/decorators'; -import { UIElement } from 'jodit/core/ui/element'; import { Dom } from 'jodit/core/dom'; +import { getContainer } from 'jodit/core/global'; import { position } from 'jodit/core/helpers/size/position'; -import { STATUSES } from 'jodit/core/component'; +import { attr, css } from 'jodit/core/helpers/utils'; +import { UIElement } from 'jodit/core/ui/element'; + +import './tooltip.less'; @component export class UITooltip extends UIElement { diff --git a/src/core/ui/element.ts b/src/core/ui/element.ts index 7843314fa..5cb3aff2c 100644 --- a/src/core/ui/element.ts +++ b/src/core/ui/element.ts @@ -15,12 +15,12 @@ import type { Nullable } from 'jodit/types'; import { Component, ViewComponent } from 'jodit/core/component'; +import { derive } from 'jodit/core/decorators/derive/derive'; import { Dom } from 'jodit/core/dom/dom'; -import { Mods } from 'jodit/core/traits/mods'; -import { Elms } from 'jodit/core/traits/elms'; import { isString } from 'jodit/core/helpers/checker/is-string'; +import { Elms } from 'jodit/core/traits/elms'; +import { Mods } from 'jodit/core/traits/mods'; import { Icon } from 'jodit/core/ui/icon'; -import { derive } from 'jodit/core/decorators/derive/derive'; export interface UIElement extends Mods, Elms {} @@ -166,7 +166,7 @@ export abstract class UIElement return this.j.c.fromHTML( result .replace(/\*([^*]+?)\*/g, (_, name) => Icon.get(name) || '') - .replace(/&__/g, this.componentName + '__') + .replace(/&_/g, this.componentName + '_') .replace(/~([^~]+?)~/g, (_, s) => this.i18n(s)) ); } diff --git a/src/core/ui/form/block/block.ts b/src/core/ui/form/block/block.ts index 59b28099b..b4a6eff04 100644 --- a/src/core/ui/form/block/block.ts +++ b/src/core/ui/form/block/block.ts @@ -8,12 +8,12 @@ * @module ui/form */ -import './block.less'; - import type { IUIElement, IViewBased } from 'jodit/types'; -import { UIGroup } from 'jodit/core/ui/group/group'; -import { attr } from 'jodit/core/helpers/utils'; import { component } from 'jodit/core/decorators/component/component'; +import { attr } from 'jodit/core/helpers/utils'; +import { UIGroup } from 'jodit/core/ui/group/group'; + +import './block.less'; @component export class UIBlock extends UIGroup { diff --git a/src/core/ui/form/form.ts b/src/core/ui/form/form.ts index 836ac4686..041e285ba 100644 --- a/src/core/ui/form/form.ts +++ b/src/core/ui/form/form.ts @@ -11,12 +11,12 @@ */ import type { IDictionary, IUIForm, IUIInput, IUISelect } from 'jodit/types'; -import { UIGroup } from 'jodit/core/ui/group/group'; +import { Component } from 'jodit/core/component/component'; +import { component } from 'jodit/core/decorators/component/component'; +import { attr } from 'jodit/core/helpers/utils'; import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; import { UISelect } from 'jodit/core/ui/form/inputs/select/select'; -import { attr } from 'jodit/core/helpers/utils'; -import { component } from 'jodit/core/decorators/component/component'; -import { Component } from 'jodit/core/component/component'; +import { UIGroup } from 'jodit/core/ui/group/group'; @component export class UIForm extends UIGroup implements IUIForm { @@ -55,7 +55,7 @@ export class UIForm extends UIGroup implements IUIForm { return true; } - onSubmit(handler: (data: IDictionary) => false | void): void { + onSubmit(handler: (data: IDictionary) => false | void): this { this.j.e.on(this.container, 'submit', (): false => { const inputs = this.allChildren.filter(elm => Component.isInstanceOf(elm, UIInput) @@ -74,6 +74,8 @@ export class UIForm extends UIGroup implements IUIForm { return false; }); + + return this; } /** @override */ diff --git a/src/core/ui/form/index.ts b/src/core/ui/form/index.ts index 9f24261a0..c57e7be48 100644 --- a/src/core/ui/form/index.ts +++ b/src/core/ui/form/index.ts @@ -8,6 +8,6 @@ * @module ui/form */ +export * from './block/block'; export * from './form'; export * from './inputs'; -export * from './block/block'; diff --git a/src/core/ui/form/inputs/area/area.less b/src/core/ui/form/inputs/area/area.less index cdedbd894..b066b1223 100644 --- a/src/core/ui/form/inputs/area/area.less +++ b/src/core/ui/form/inputs/area/area.less @@ -12,5 +12,6 @@ &__input { height: 100%; min-height: 60px; + padding: var(--padding-default); } } diff --git a/src/core/ui/form/inputs/area/area.ts b/src/core/ui/form/inputs/area/area.ts index f65e359ee..a6b46aadf 100644 --- a/src/core/ui/form/inputs/area/area.ts +++ b/src/core/ui/form/inputs/area/area.ts @@ -8,12 +8,12 @@ * @module ui/form */ -import './area.less'; - -import type { IUITextArea, IViewBased, IUIInput } from 'jodit/types'; -import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; -import { component } from 'jodit/core/decorators/component/component'; +import type { IUIInput, IUITextArea, IViewBased } from 'jodit/types'; import { watch } from 'jodit/core/decorators'; +import { component } from 'jodit/core/decorators/component/component'; +import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; + +import './area.less'; @component export class UITextArea extends UIInput implements IUITextArea { diff --git a/src/core/ui/form/inputs/checkbox/checkbox.ts b/src/core/ui/form/inputs/checkbox/checkbox.ts index 135fbb940..a8d8c771f 100644 --- a/src/core/ui/form/inputs/checkbox/checkbox.ts +++ b/src/core/ui/form/inputs/checkbox/checkbox.ts @@ -8,12 +8,12 @@ * @module ui/form */ -import './checkbox.less'; - -import type { IViewBased, IUICheckBox } from 'jodit/types'; -import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; -import { component, watch, hook } from 'jodit/core/decorators'; +import type { IUICheckBox, IViewBased } from 'jodit/types'; +import { component, hook, watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; +import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; + +import './checkbox.less'; @component export class UICheckbox extends UIInput implements IUICheckBox { diff --git a/src/core/ui/form/inputs/file/file.ts b/src/core/ui/form/inputs/file/file.ts index c068562c1..68165a63d 100644 --- a/src/core/ui/form/inputs/file/file.ts +++ b/src/core/ui/form/inputs/file/file.ts @@ -8,12 +8,12 @@ * @module ui/form */ -import './file.less'; - import type { IUIButton, IUIInput, IViewBased } from 'jodit/types'; -import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; import { component } from 'jodit/core/decorators/component/component'; import { UIButton } from 'jodit/core/ui/button/button/button'; +import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; + +import './file.less'; @component export class UIFileInput extends UIInput { diff --git a/src/core/ui/form/inputs/index.ts b/src/core/ui/form/inputs/index.ts index b9cb407cb..fcee9c5d0 100644 --- a/src/core/ui/form/inputs/index.ts +++ b/src/core/ui/form/inputs/index.ts @@ -8,8 +8,8 @@ * @module ui/form */ -export * from './input/input'; export * from './area/area'; export * from './checkbox/checkbox'; -export * from './select/select'; export * from './file/file'; +export * from './input/input'; +export * from './select/select'; diff --git a/src/core/ui/form/inputs/input/input.ts b/src/core/ui/form/inputs/input/input.ts index f547c8ad6..fd3ec199b 100644 --- a/src/core/ui/form/inputs/input/input.ts +++ b/src/core/ui/form/inputs/input/input.ts @@ -8,21 +8,21 @@ * @module ui/form */ -import './input.less'; - import type { IDictionary, IUIInput, IUIInputValidator, IViewBased } from 'jodit/types'; -import { UIElement } from 'jodit/core/ui/element'; -import { attr } from 'jodit/core/helpers/utils'; -import { toArray } from 'jodit/core/helpers/array/to-array'; -import { Dom } from 'jodit/core/dom/dom'; import { autobind, component, debounce, watch } from 'jodit/core/decorators'; -import { Icon } from 'jodit/core/ui/icon'; +import { Dom } from 'jodit/core/dom/dom'; +import { toArray } from 'jodit/core/helpers/array/to-array'; +import { attr } from 'jodit/core/helpers/utils'; +import { UIElement } from 'jodit/core/ui/element'; import { inputValidators } from 'jodit/core/ui/form/validators'; +import { Icon } from 'jodit/core/ui/icon'; + +import './input.less'; @component export class UIInput extends UIElement implements IUIInput { diff --git a/src/core/ui/form/inputs/select/select.ts b/src/core/ui/form/inputs/select/select.ts index 53379d01d..f8b5e3573 100644 --- a/src/core/ui/form/inputs/select/select.ts +++ b/src/core/ui/form/inputs/select/select.ts @@ -8,17 +8,17 @@ * @module ui/form */ -import './select.less'; - import type { IUISelect, IViewBased } from 'jodit/types'; -import { attr } from 'jodit/core/helpers/utils/attr'; import { component } from 'jodit/core/decorators/component/component'; +import { attr } from 'jodit/core/helpers/utils/attr'; import { UIInput } from 'jodit/core/ui/form/inputs/input/input'; import { inputValidators, selectValidators } from 'jodit/core/ui/form/validators'; +import './select.less'; + @component export class UISelect extends UIInput implements IUISelect { /** @override */ diff --git a/src/core/ui/group/group.ts b/src/core/ui/group/group.ts index b8935628e..d78dacbe9 100644 --- a/src/core/ui/group/group.ts +++ b/src/core/ui/group/group.ts @@ -10,22 +10,22 @@ * @module ui/group */ -import './group.less'; - import type { + IDictionary, IUIButtonState, IUIElement, IUIGroup, IViewBased, ModType } from 'jodit/types'; -import type { IDictionary } from 'jodit/types'; -import { UIElement } from 'jodit/core/ui/element'; +import { Component } from 'jodit/core/component/component'; import { component, watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { isArray } from 'jodit/core/helpers'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { Dom } from 'jodit/core/dom/dom'; -import { Component } from 'jodit/core/component/component'; +import { UIElement } from 'jodit/core/ui/element'; + +import './group.less'; @component export class UIGroup diff --git a/src/core/ui/group/list.ts b/src/core/ui/group/list.ts index 8a6dc6c16..0cfd9750c 100644 --- a/src/core/ui/group/list.ts +++ b/src/core/ui/group/list.ts @@ -8,28 +8,28 @@ * @module ui/group */ -import './list.less'; - import type { + ButtonsOption, IControlTypeStrong, IUIButton, IUIElement, IUIGroup, IUIList, IViewBased, - Nullable, - ButtonsOption + Nullable } from 'jodit/types'; -import { getStrongControlTypes } from 'jodit/core/ui/helpers/get-strong-control-types'; +import { Component } from 'jodit/core/component/component'; import { component, hook, watch } from 'jodit/core/decorators'; +import { splitArray } from 'jodit/core/helpers/array/split-array'; +import { UIButton } from 'jodit/core/ui/button/button/button'; import { UIGroup } from 'jodit/core/ui/group/group'; import { UISeparator } from 'jodit/core/ui/group/separator'; import { UISpacer } from 'jodit/core/ui/group/spacer'; -import { UIButton } from 'jodit/core/ui/button/button/button'; import { isButtonGroup } from 'jodit/core/ui/helpers/buttons'; import { getControlType } from 'jodit/core/ui/helpers/get-control-type'; -import { splitArray } from 'jodit/core/helpers/array/split-array'; -import { Component } from 'jodit/core/component/component'; +import { getStrongControlTypes } from 'jodit/core/ui/helpers/get-strong-control-types'; + +import './list.less'; @component export class UIList diff --git a/src/core/ui/group/separator.ts b/src/core/ui/group/separator.ts index bb73b95b3..02ea0099c 100644 --- a/src/core/ui/group/separator.ts +++ b/src/core/ui/group/separator.ts @@ -8,8 +8,8 @@ * @module ui/group */ -import { UIElement } from 'jodit/core/ui/element'; import { component } from 'jodit/core/decorators/component/component'; +import { UIElement } from 'jodit/core/ui/element'; @component export class UISeparator extends UIElement { diff --git a/src/core/ui/group/spacer.ts b/src/core/ui/group/spacer.ts index ed08ebc1e..267b33994 100644 --- a/src/core/ui/group/spacer.ts +++ b/src/core/ui/group/spacer.ts @@ -8,8 +8,8 @@ * @module ui/group */ -import { UIElement } from 'jodit/core/ui/element'; import { component } from 'jodit/core/decorators/component/component'; +import { UIElement } from 'jodit/core/ui/element'; @component export class UISpacer extends UIElement { diff --git a/src/core/ui/helpers/get-control-type.ts b/src/core/ui/helpers/get-control-type.ts index d855a7607..dec287076 100644 --- a/src/core/ui/helpers/get-control-type.ts +++ b/src/core/ui/helpers/get-control-type.ts @@ -16,6 +16,7 @@ import type { IDictionary } from 'jodit/types'; import { ConfigFlatten, isArray, isString } from 'jodit/core/helpers'; + import { Config } from 'jodit/config'; /** diff --git a/src/core/ui/helpers/get-strong-control-types.ts b/src/core/ui/helpers/get-strong-control-types.ts index 1ae7de594..feb6d7271 100644 --- a/src/core/ui/helpers/get-strong-control-types.ts +++ b/src/core/ui/helpers/get-strong-control-types.ts @@ -14,11 +14,13 @@ import type { IControlTypeStrong, IDictionary } from 'jodit/types'; -import { getControlType } from './get-control-type'; -import { Config } from 'jodit/config'; import { isArray } from 'jodit/core/helpers/checker/is-array'; import { ConfigProto, keys } from 'jodit/core/helpers/utils'; +import { getControlType } from './get-control-type'; + +import { Config } from 'jodit/config'; + /** * @private */ diff --git a/src/core/ui/icon.ts b/src/core/ui/icon.ts index 86e78d021..d09dcffd2 100644 --- a/src/core/ui/icon.ts +++ b/src/core/ui/icon.ts @@ -14,9 +14,9 @@ import type { IUIIconState, IViewBased } from 'jodit/types'; -import { css } from 'jodit/core/helpers/utils/css'; -import { camelCase, kebabCase } from 'jodit/core/helpers'; import { IS_PROD } from 'jodit/core/constants'; +import { camelCase, kebabCase } from 'jodit/core/helpers'; +import { css } from 'jodit/core/helpers/utils/css'; export class Icon { private static icons: IDictionary = {}; @@ -35,7 +35,7 @@ export class Icon { Icon.icons[name.toLowerCase()]; if (!IS_PROD && !icon) { - console.log(`Icon "${name}" not found`); + console.warn(`Icon "${name}" not found`); } return icon; diff --git a/src/core/ui/index.ts b/src/core/ui/index.ts index 30444fe48..b261ff01e 100644 --- a/src/core/ui/index.ts +++ b/src/core/ui/index.ts @@ -10,10 +10,10 @@ * @module ui */ -export * from './element'; export * from './button'; -export * from './popup'; -export * from './group'; +export * from './element'; export * from './form'; +export * from './group'; export * from './icon'; +export * from './popup'; export * from './progress-bar/progress-bar'; diff --git a/src/core/ui/popup/popup.ts b/src/core/ui/popup/popup.ts index 6f1e5d090..a5b6bbf7b 100644 --- a/src/core/ui/popup/popup.ts +++ b/src/core/ui/popup/popup.ts @@ -10,8 +10,6 @@ * @module ui/popup */ -import './popup.less'; - import type { CanUndef, IBound, @@ -23,7 +21,10 @@ import type { Nullable, PopupStrategy } from 'jodit/types'; +import { Component } from 'jodit/core/component/component'; +import { autobind, throttle } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; +import { eventEmitter, getContainer } from 'jodit/core/global'; import { attr, css, @@ -34,12 +35,10 @@ import { ucfirst } from 'jodit/core/helpers'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { UIGroup } from 'jodit/core/ui/group/group'; import { UIElement } from 'jodit/core/ui/element'; +import { UIGroup } from 'jodit/core/ui/group/group'; -import { autobind, throttle } from 'jodit/core/decorators'; -import { Component } from 'jodit/core/component/component'; -import { eventEmitter, getContainer } from 'jodit/core/global'; +import './popup.less'; type getBoundFunc = () => IBound; diff --git a/src/core/ui/progress-bar/progress-bar.ts b/src/core/ui/progress-bar/progress-bar.ts index 6536f9dff..3b720e307 100644 --- a/src/core/ui/progress-bar/progress-bar.ts +++ b/src/core/ui/progress-bar/progress-bar.ts @@ -10,12 +10,12 @@ * @module ui/progress-bar */ -import './progress-bar.less'; - import type { IJodit, IProgressBar } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { UIElement } from 'jodit/core/ui/element'; +import './progress-bar.less'; + export class ProgressBar extends UIElement implements IProgressBar { /** @override */ override className(): string { diff --git a/src/core/view/view-with-toolbar.ts b/src/core/view/view-with-toolbar.ts index 569feb028..91f824089 100644 --- a/src/core/view/view-with-toolbar.ts +++ b/src/core/view/view-with-toolbar.ts @@ -8,26 +8,27 @@ * @module view */ -import './view-with-toolbar.less'; - import type { - IViewWithToolbar, - IToolbarCollection, Buttons, + ButtonsGroups, IDictionary, IPluginButton, + IToolbarCollection, IViewOptions, - ButtonsGroups + IViewWithToolbar } from 'jodit/types'; -import { View } from 'jodit/core/view/view'; -import { isString } from 'jodit/core/helpers/checker'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { autobind } from 'jodit/core/decorators/autobind/autobind'; +import { watch } from 'jodit/core/decorators/watch/watch'; +import { Dom } from 'jodit/core/dom/dom'; import { splitArray } from 'jodit/core/helpers/array'; -import { resolveElement } from 'jodit/core/helpers/utils'; -import { Dom } from 'jodit/core/dom'; -import { makeCollection } from 'jodit/modules/toolbar/factory'; -import { STATUSES } from 'jodit/core/component'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { resolveElement } from 'jodit/core/helpers/utils/selector'; import { isButtonGroup } from 'jodit/core/ui/helpers/buttons'; -import { autobind, watch } from 'jodit/core/decorators'; +import { View } from 'jodit/core/view/view'; +import { makeCollection } from 'jodit/modules/toolbar/factory'; + +import './view-with-toolbar.less'; export abstract class ViewWithToolbar extends View implements IViewWithToolbar { TOOLBAR!: IToolbarCollection; @@ -65,7 +66,7 @@ export abstract class ViewWithToolbar extends View implements IViewWithToolbar { } /** - * Helper for append toolbar in its place + * Helper for appended toolbar in its place */ @watch(':rebuildToolbar') protected buildToolbar(): void { @@ -91,7 +92,7 @@ export abstract class ViewWithToolbar extends View implements IViewWithToolbar { } /** - * Register button for group + * Register button for a group */ registerButton(btn: IPluginButton): this { this.registeredButtons.add(btn); @@ -111,7 +112,7 @@ export abstract class ViewWithToolbar extends View implements IViewWithToolbar { } /** - * Remove button from group + * Remove button from a group */ unregisterButton(btn: IPluginButton): this { this.registeredButtons.delete(btn); diff --git a/src/core/view/view.ts b/src/core/view/view.ts index 874a14f55..185e126f6 100644 --- a/src/core/view/view.ts +++ b/src/core/view/view.ts @@ -13,16 +13,32 @@ import type { IComponent, ICreate, + IDictionary, + IEventEmitter, + IMessages, IProgressBar, IStorage, IViewBased, IViewOptions, - Nullable, - IDictionary, - IEventEmitter, - IMessages + Nullable } from 'jodit/types'; -import { Storage } from 'jodit/core/storage'; +import { ViewComponent } from 'jodit/core/component'; +import { Component } from 'jodit/core/component/component'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { + APP_VERSION, + BASE_PATH, + ES, + IS_ES_MODERN, + IS_ES_NEXT +} from 'jodit/core/constants'; +import { Create } from 'jodit/core/create/create'; +import { cache } from 'jodit/core/decorators/cache/cache'; +import { derive } from 'jodit/core/decorators/derive/derive'; +import { hook } from 'jodit/core/decorators/hook/hook'; +import { Dom } from 'jodit/core/dom'; +import { EventEmitter } from 'jodit/core/event-emitter'; +import { modules } from 'jodit/core/global'; import { camelCase, ConfigProto, @@ -32,26 +48,10 @@ import { isFunction, isVoid } from 'jodit/core/helpers'; -import { - APP_VERSION, - BASE_PATH, - ES, - IS_ES_MODERN, - IS_ES_NEXT -} from 'jodit/core/constants'; -import { - Component, - STATUSES, - ProgressBar, - Create, - Dom, - ViewComponent -} from 'jodit/modules'; -import { modules } from 'jodit/core/global'; -import { hook, derive, cache } from 'jodit/core/decorators'; -import { Mods } from 'jodit/core/traits/mods'; +import { Storage } from 'jodit/core/storage/storage'; import { Elms } from 'jodit/core/traits/elms'; -import { EventEmitter } from 'jodit/core/event-emitter'; +import { Mods } from 'jodit/core/traits/mods'; +import { ProgressBar } from 'jodit/core/ui/progress-bar/progress-bar'; import { UIMessages } from 'jodit/modules/messages/messages'; export interface View extends Mods, Elms {} @@ -64,7 +64,7 @@ export abstract class View extends Component implements IViewBased, Mods, Elms { readonly mods: IDictionary = {}; /** - * ID attribute for source element, id add `{id}_editor` it's editor's id + * ID attribute for a source element, id add `{id}_editor` it's editor's id */ id!: string; @@ -74,7 +74,7 @@ export abstract class View extends Component implements IViewBased, Mods, Elms { readonly components: Set = new Set(); /** - * Get path for loading extra staff + * Get a path for loading extra staff */ get basePath(): string { if (this.o.basePath) { @@ -91,7 +91,7 @@ export abstract class View extends Component implements IViewBased, Mods, Elms { static readonly esModern: boolean = IS_ES_MODERN; // from webpack.config.js /** - * Return default timeout period in milliseconds for some debounce or throttle functions. + * Return a default timeout period in milliseconds for some debounce or throttle functions. * By default, `{history.timeout}` options */ get defaultTimeout(): number { diff --git a/src/index.ts b/src/index.ts index 04edca684..cb29f2043 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,9 +10,20 @@ * @module jodit */ -import './styles/index.less'; +import { isFunction, isString } from 'jodit/core/helpers/checker'; + +import 'jodit/plugins/index'; import * as constants from './core/constants'; +import * as decorators from './core/decorators'; +import * as Modules from './modules/'; +import * as Icons from './styles/icons/'; +// JODIT-SECTION-END:POLYFILLS +import { Jodit as DefaultJodit } from './jodit'; +import Languages from './languages'; + +import './styles/index.less'; +import './styles/themes/dark.less'; // JODIT-SECTION-START:POLYFILLS @@ -24,21 +35,6 @@ if ( require('./polyfills'); } -// JODIT-SECTION-END:POLYFILLS - -import { Jodit as DefaultJodit } from './jodit'; - -import Languages from './languages'; - -import { isFunction, isString } from 'jodit/core/helpers/checker'; -import * as decorators from './core/decorators'; -import * as Modules from './modules/'; -import * as Icons from './styles/icons/'; - -import 'jodit/plugins/index'; - -import './styles/themes/dark.less'; - // copy constants in Jodit Object.keys(constants).forEach((key: string) => { (DefaultJodit as any)[key] = (constants as any)[key]; diff --git a/src/jodit.ts b/src/jodit.ts index de2ad02f9..a632fcb5b 100644 --- a/src/jodit.ts +++ b/src/jodit.ts @@ -11,32 +11,64 @@ */ import type { + AjaxOptions, + CanPromise, CustomCommand, ExecCommandCallback, + ICreate, IDictionary, + IFileBrowser, + IFileBrowserCallBackData, + IHistory, + IJodit, + IMessages, IPluginSystem, + IResponse, IStatusBar, + IUploader, IViewOptions, IWorkPlace, MarkerInfo, - Modes, - IFileBrowser, - IJodit, - IUploader, - ICreate, - IFileBrowserCallBackData, - CanPromise, - IHistory, - AjaxOptions, - IResponse, - IMessages + Modes } from 'jodit/types'; - import type * as Modules from 'jodit/modules'; - -import { Config } from 'jodit/config'; import * as constants from 'jodit/core/constants'; - +import { FAT_MODE, IS_PROD, lang } from 'jodit/core/constants'; +import { + autobind, + cache, + derive, + throttle, + watch +} from 'jodit/core/decorators'; +import { + eventEmitter, + instances, + modules, + pluginSystem +} from 'jodit/core/global'; +import { + asArray, + attr, + callPromise, + ConfigProto, + css, + error, + isFunction, + isJoditObject, + isNumber, + isPromise, + isString, + isVoid, + kebabCase, + markAsAtomic, + normalizeKeyAliases, + resolveElement, + toArray, + ucfirst +} from 'jodit/core/helpers'; +import { Ajax } from 'jodit/core/request'; +import { Dlgs } from 'jodit/core/traits/dlgs'; import { Create, Dom, @@ -48,43 +80,8 @@ import { ViewWithToolbar } from 'jodit/modules'; -import { - asArray, - css, - isPromise, - normalizeKeyAliases, - error, - isString, - attr, - isFunction, - resolveElement, - isVoid, - callPromise, - toArray, - markAsAtomic, - ConfigProto, - kebabCase, - isJoditObject, - isNumber, - ucfirst -} from 'jodit/core/helpers'; +import { Config } from 'jodit/config'; -import { FAT_MODE, IS_PROD, lang } from 'jodit/core/constants'; -import { - instances, - pluginSystem, - modules, - eventEmitter -} from 'jodit/core/global'; -import { - autobind, - cache, - throttle, - watch, - derive -} from 'jodit/core/decorators'; -import { Dlgs } from 'jodit/core/traits/dlgs'; -import { Ajax } from 'jodit/core/request'; const __defaultStyleDisplayKey = 'data-jodit-default-style-display'; const __defaultClassesKey = 'data-jodit-default-classes'; @@ -147,7 +144,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { } /** - * Return default timeout period in milliseconds for some debounce or throttle functions. + * Return a default timeout period in milliseconds for some debounce or throttle functions. * By default, `{history.timeout}` options */ override get defaultTimeout(): number { @@ -481,7 +478,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { ): string { /** * Triggered before getEditorValue executed. - * If returned not undefined getEditorValue will return this value + * If returned not undefined, getEditorValue will return this value * @example * ```javascript * var editor = Jodit.make("#redactor"); @@ -537,7 +534,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { /** * Set editor html value and if set sync fill source element value - * When method was called without arguments - it is simple way to synchronize editor to element + * When method was called without arguments - it is a simple way to synchronize editor to element */ setEditorValue(value?: string): void { /** @@ -673,7 +670,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { * * jodit.execCommand('replaceString', 'test', 'stop'); * - * console.log(jodit.value); // stop test test + * console.log(jodit.value); // stop test * * // and you can add hotkeys for command * jodit.registerCommand('replaceString', { @@ -792,7 +789,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { * parent.s.insertNode(p) * parent.s.setCursorIn(p); * p.style.textAlign = 'justyfy'; - * return false; // break execute native command + * return false; // break executes native command * } * }) * ``` @@ -1070,7 +1067,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { /** * Switch on/off the editor into the disabled state. - * When in disabled, the user is not able to change the editor content + * When disabled, the user is not able to change the editor content * This function firing the `disabled` event. */ setDisabled(isDisabled: boolean): void { @@ -1158,7 +1155,7 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { /** @override **/ protected override initOwners(): void { - // in iframe it can be changed + // in iframe, it can be changed this.editorWindow = this.o.ownerWindow; this.ownerWindow = this.o.ownerWindow; } @@ -1238,10 +1235,10 @@ export class Jodit extends ViewWithToolbar implements IJodit, Dlgs { this.e.fire('afterInit', this); } - callPromise(this.afterInitHook(), () => { - this.setStatus(STATUSES.ready); - this.e.fire('afterConstructor', this); - }); + callPromise(this.afterInitHook()); + + this.setStatus(STATUSES.ready); + this.e.fire('afterConstructor', this); }; callPromise(addPlaceResult, init); diff --git a/src/languages.ts b/src/languages.ts index 67adecf88..4c9e364fa 100644 --- a/src/languages.ts +++ b/src/languages.ts @@ -15,10 +15,10 @@ import type { IDictionary } from 'jodit/types'; import { isArray } from 'jodit/core/helpers/checker/is-array'; -import en from 'jodit/langs/en'; import ar from 'jodit/langs/ar'; import cs_cz from 'jodit/langs/cs_cz'; import de from 'jodit/langs/de'; +import en from 'jodit/langs/en'; import es from 'jodit/langs/es'; import fi from 'jodit/langs/fi'; import fr from 'jodit/langs/fr'; @@ -27,6 +27,7 @@ import hu from 'jodit/langs/hu'; import id from 'jodit/langs/id'; import it from 'jodit/langs/it'; import ja from 'jodit/langs/ja'; +import keys from 'jodit/langs/keys'; import ko from 'jodit/langs/ko'; import mn from 'jodit/langs/mn'; import nl from 'jodit/langs/nl'; @@ -36,7 +37,6 @@ import ru from 'jodit/langs/ru'; import tr from 'jodit/langs/tr'; import zh_cn from 'jodit/langs/zh_cn'; import zh_tw from 'jodit/langs/zh_tw'; -import keys from 'jodit/langs/keys'; let exp: IDictionary> = {}; diff --git a/src/modules/context-menu/context-menu.ts b/src/modules/context-menu/context-menu.ts index 43e1a3655..c7c63d943 100644 --- a/src/modules/context-menu/context-menu.ts +++ b/src/modules/context-menu/context-menu.ts @@ -10,13 +10,13 @@ * @module modules/context-menu */ -import './context-menu.less'; - import type { IContextMenu, IContextMenuAction } from 'jodit/types'; -import { Popup } from 'jodit/core/ui/popup'; -import { Button } from 'jodit/core/ui/button'; -import { isArray } from 'jodit/core/helpers/checker'; import { component } from 'jodit/core/decorators/component/component'; +import { isArray } from 'jodit/core/helpers/checker/is-array'; +import { Button } from 'jodit/core/ui/button/button/button'; +import { Popup } from 'jodit/core/ui/popup/popup'; + +import './context-menu.less'; /** * Module to generate context menu @@ -36,7 +36,7 @@ export class ContextMenu extends Popup implements IContextMenu { * @param actions - Array with plain objects `{icon: 'bin', title: 'Delete', exec: function () {}}` * @example * ```javascript - * parent.show(e.clientX, e.clientY, [{icon: 'bin', title: 'Delete', exec: function () { alert(1) }]); + * parent.show(e.clientX, e.clientY, [{icon: 'bin', title: 'Delete', exec: function () { alert(1) }}]); * ``` */ show( diff --git a/src/modules/dialog/__image_snapshots__/dialog-test-screenshot-js-dialog-screenshot-testing-open-prompt-dialog-works-1-snap.png b/src/modules/dialog/__image_snapshots__/dialog-test-screenshot-js-dialog-screenshot-testing-open-prompt-dialog-works-1-snap.png index af4d0ba76..3f5dcdf44 100644 Binary files a/src/modules/dialog/__image_snapshots__/dialog-test-screenshot-js-dialog-screenshot-testing-open-prompt-dialog-works-1-snap.png and b/src/modules/dialog/__image_snapshots__/dialog-test-screenshot-js-dialog-screenshot-testing-open-prompt-dialog-works-1-snap.png differ diff --git a/src/modules/dialog/alert.ts b/src/modules/dialog/alert.ts index 63ddb0ed3..64d1c051b 100644 --- a/src/modules/dialog/alert.ts +++ b/src/modules/dialog/alert.ts @@ -9,9 +9,9 @@ */ import type { IDialog } from 'jodit/types'; -import { isFunction } from 'jodit/core/helpers/checker/is-function'; -import { asArray } from 'jodit/core/helpers/array/as-array'; import { Dom } from 'jodit/core/dom/dom'; +import { asArray } from 'jodit/core/helpers/array/as-array'; +import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { Button } from 'jodit/core/ui/button/button/button'; import { Dialog } from './dialog'; diff --git a/src/modules/dialog/confirm.ts b/src/modules/dialog/confirm.ts index d83af5d4f..195e04f3b 100644 --- a/src/modules/dialog/confirm.ts +++ b/src/modules/dialog/confirm.ts @@ -9,9 +9,9 @@ */ import type { IDialog } from 'jodit/types'; -import { Dialog } from 'jodit/modules/dialog/dialog'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { Button } from 'jodit/core/ui/button/button/button'; +import { Dialog } from 'jodit/modules/dialog/dialog'; /** * Show `confirm` dialog. Work without Jodit object diff --git a/src/modules/dialog/dialog.ts b/src/modules/dialog/dialog.ts index 7bc7ec479..a9428bcf6 100644 --- a/src/modules/dialog/dialog.ts +++ b/src/modules/dialog/dialog.ts @@ -8,38 +8,39 @@ * @module modules/dialog */ -import './dialog.less'; - import type { - IControlType, - IDictionary, - IToolbarCollection, + Content, + ContentItem, IContainer, + IControlType, IDialog, - ContentItem, - Content, - IDialogOptions + IDialogOptions, + IDictionary, + IToolbarCollection } from 'jodit/types'; -import { Config } from 'jodit/config'; +import { STATUSES } from 'jodit/core/component'; import { KEY_ESC } from 'jodit/core/constants'; +import { autobind, component, hook } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; +import { eventEmitter, pluginSystem } from 'jodit/core/global'; +import { asArray, splitArray, toArray } from 'jodit/core/helpers/array'; import { + hasContainer, isArray, isBoolean, isFunction, isString, - isVoid, - hasContainer + isVoid } from 'jodit/core/helpers/checker'; -import { asArray, splitArray, toArray } from 'jodit/core/helpers/array'; import { $$, attr, ConfigProto, css } from 'jodit/core/helpers/utils'; import { assert } from 'jodit/core/helpers/utils/assert'; -import { ViewWithToolbar } from 'jodit/core/view/view-with-toolbar'; -import { Dom } from 'jodit/core/dom/dom'; -import { STATUSES } from 'jodit/core/component'; -import { eventEmitter, pluginSystem } from 'jodit/core/global'; -import { component, autobind, hook } from 'jodit/core/decorators'; -import { View } from 'jodit/core/view/view'; import { Icon } from 'jodit/core/ui'; +import { View } from 'jodit/core/view/view'; +import { ViewWithToolbar } from 'jodit/core/view/view-with-toolbar'; + +import './dialog.less'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { @@ -165,7 +166,7 @@ export class Dialog extends ViewWithToolbar implements IDialog { this.removeGlobalResizeListeners(); /** - * Fired when dialog box is finished to resizing + * Fired when the dialog box is finished to resizing */ this.e.fire(this, 'endResize endMove'); } diff --git a/src/modules/dialog/index.ts b/src/modules/dialog/index.ts index 1b556d281..9c9b81c0c 100644 --- a/src/modules/dialog/index.ts +++ b/src/modules/dialog/index.ts @@ -10,7 +10,7 @@ * @module modules/dialog */ -export { Dialog } from './dialog'; export { Alert } from './alert'; -export { Prompt } from './prompt'; export { Confirm } from './confirm'; +export { Dialog } from './dialog'; +export { Prompt } from './prompt'; diff --git a/src/modules/dialog/prompt.ts b/src/modules/dialog/prompt.ts index 13dc4033b..299104919 100644 --- a/src/modules/dialog/prompt.ts +++ b/src/modules/dialog/prompt.ts @@ -9,9 +9,9 @@ */ import type { IDialog } from 'jodit/types'; -import { Button } from 'jodit/core/ui/button/button/button'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { attr } from 'jodit/core/helpers/utils/attr'; +import { Button } from 'jodit/core/ui/button/button/button'; import { Dialog } from './dialog'; diff --git a/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-hide-edit-buttons-works-1-snap.png b/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-hide-edit-buttons-works-1-snap.png index c5fe44921..98a083fd5 100644 Binary files a/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-hide-edit-buttons-works-1-snap.png and b/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-hide-edit-buttons-works-1-snap.png differ diff --git a/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png b/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png index 4ee6e5b43..60ee5da2f 100644 Binary files a/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png and b/src/modules/file-browser/__image_snapshots__/file-browser-test-screenshot-js-filebrowser-screenshot-testing-open-filebrowser-works-1-snap.png differ diff --git a/src/modules/file-browser/builders/context-menu.ts b/src/modules/file-browser/builders/context-menu.ts index 1339df65d..7a10f18e0 100644 --- a/src/modules/file-browser/builders/context-menu.ts +++ b/src/modules/file-browser/builders/context-menu.ts @@ -9,20 +9,18 @@ */ import type { IDialog, IFileBrowser } from 'jodit/types'; - import { Dom } from 'jodit/core/dom'; import { attr, error } from 'jodit/core/helpers/utils'; import { Icon } from 'jodit/core/ui/icon'; -import { openImageEditor } from 'jodit/modules/image-editor/image-editor'; - -import { makeContextMenu } from 'jodit/modules/file-browser/factories'; import { elementsMap } from 'jodit/modules/file-browser/builders/elements-map'; -import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; +import { makeContextMenu } from 'jodit/modules/file-browser/factories'; import { deleteFile } from 'jodit/modules/file-browser/fetch/delete-file'; +import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; import { elementToItem, getItem } from 'jodit/modules/file-browser/listeners/native-listeners'; +import { openImageEditor } from 'jodit/modules/image-editor/image-editor'; const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = 'next', right = 'right'): string => diff --git a/src/modules/file-browser/config.ts b/src/modules/file-browser/config.ts index 5024918f6..2118defc4 100644 --- a/src/modules/file-browser/config.ts +++ b/src/modules/file-browser/config.ts @@ -8,24 +8,23 @@ * @module modules/file-browser */ -import { Config } from 'jodit/config'; - import type { + IControlType, + IDictionary, IFileBrowser, IFileBrowserAnswer, IFileBrowserItem, IFileBrowserOptions, ISource, ISourceFile, - IControlType, - IDictionary, IUploader, IViewBased } from 'jodit/types'; - import { isArray, isString } from 'jodit/core/helpers/checker'; -import { UIFileInput } from 'jodit/core/ui/form/inputs/file/file'; import { humanSizeToBytes } from 'jodit/core/helpers/utils/human-size-to-bytes'; +import { UIFileInput } from 'jodit/core/ui/form/inputs/file/file'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/modules/file-browser/data-provider.ts b/src/modules/file-browser/data-provider.ts index cb4364f9e..f1996e837 100644 --- a/src/modules/file-browser/data-provider.ts +++ b/src/modules/file-browser/data-provider.ts @@ -9,23 +9,24 @@ */ import type { + IAjax, + IDictionary, IFileBrowserAjaxOptions, IFileBrowserAnswer, - IFileBrowserOptions, - IViewBased, - IPermissions, IFileBrowserDataProvider, - ImageBox, - IDictionary, - IAjax, - Nullable, - IFileBrowserProcessor, IFileBrowserDataProviderItemsMods, IFileBrowserItem, + IFileBrowserOptions, + IFileBrowserProcessor, + ImageBox, + IPermissions, ISourceFile, - ISourcesFiles + ISourcesFiles, + IViewBased, + Nullable } from 'jodit/types'; - +import { IS_PROD } from 'jodit/core/constants'; +import { autobind } from 'jodit/core/decorators'; import { ConfigProto, error, @@ -34,9 +35,7 @@ import { set } from 'jodit/core/helpers'; import { Ajax } from 'jodit/core/request'; -import { autobind } from 'jodit/core/decorators'; import { FileBrowserItem } from 'jodit/modules/file-browser/builders/item'; -import { IS_PROD } from 'jodit/core/constants'; export const DEFAULT_SOURCE_NAME = 'default'; diff --git a/src/modules/file-browser/file-browser.ts b/src/modules/file-browser/file-browser.ts index 619e69b0c..ce5172263 100644 --- a/src/modules/file-browser/file-browser.ts +++ b/src/modules/file-browser/file-browser.ts @@ -8,55 +8,55 @@ * @module modules/file-browser */ -import './styles/index.less'; - -import { Config } from 'jodit/config'; -import * as consts from 'jodit/core/constants'; - import type { + ButtonsOption, + CallbackFunction, + CanUndef, + IDialog, + IDictionary, IFileBrowser, IFileBrowserAnswer, IFileBrowserCallBackData, + IFileBrowserDataProvider, IFileBrowserOptions, IFileBrowserState, - IFileBrowserDataProvider, IJodit, IStorage, - IDictionary, IUploader, IUploaderOptions, - IDialog, - CanUndef, - IViewOptions, - CallbackFunction, - ButtonsOption + IViewOptions } from 'jodit/types'; - -import { Storage } from 'jodit/core/storage'; +import { STATUSES } from 'jodit/core/component'; +import * as consts from 'jodit/core/constants'; +import { IS_PROD } from 'jodit/core/constants'; +import { autobind, cache, derive } from 'jodit/core/decorators'; +import { observable } from 'jodit/core/event-emitter'; import { + ConfigProto, error, + isAbort, isFunction, isString, - ConfigProto, - trim, - isAbort + trim } from 'jodit/core/helpers'; -import { makeDataProvider } from './factories'; -import { stateListeners } from './listeners/state-listeners'; +import { Storage } from 'jodit/core/storage'; +import { Dlgs } from 'jodit/core/traits/dlgs'; +import { ViewWithToolbar } from 'jodit/core/view/view-with-toolbar'; + +import './config'; + +import { loadItems } from './fetch/load-items'; +import { loadTree } from './fetch/load-tree'; import { nativeListeners } from './listeners/native-listeners'; import { selfListeners } from './listeners/self-listeners'; +import { stateListeners } from './listeners/state-listeners'; import { DEFAULT_SOURCE_NAME } from './data-provider'; -import { autobind, cache, derive } from 'jodit/core/decorators'; +import { makeDataProvider } from './factories'; import { FileBrowserFiles, FileBrowserTree } from './ui'; -import { observable } from 'jodit/core/event-emitter'; -import { loadTree } from './fetch/load-tree'; -import { loadItems } from './fetch/load-items'; -import { STATUSES } from 'jodit/core/component'; -import { Dlgs } from 'jodit/core/traits/dlgs'; -import { ViewWithToolbar } from 'jodit/core/view/view-with-toolbar'; -import './config'; -import { IS_PROD } from 'jodit/core/constants'; +import './styles/index.less'; + +import { Config } from 'jodit/config'; export interface FileBrowser extends Dlgs {} diff --git a/src/modules/file-browser/listeners/native-listeners.ts b/src/modules/file-browser/listeners/native-listeners.ts index 561d8e18a..2b99fd012 100644 --- a/src/modules/file-browser/listeners/native-listeners.ts +++ b/src/modules/file-browser/listeners/native-listeners.ts @@ -10,14 +10,13 @@ import type { HTMLTagNames, - IFileBrowserItem, - Nullable, IDictionary, - IFileBrowser + IFileBrowser, + IFileBrowserItem, + Nullable } from 'jodit/types'; -import { ctrlKey, attr } from 'jodit/core/helpers'; import { Dom } from 'jodit/core/dom'; - +import { attr, ctrlKey } from 'jodit/core/helpers'; import contextMenu from 'jodit/modules/file-browser/builders/context-menu'; import { elementsMap } from 'jodit/modules/file-browser/builders/elements-map'; import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; diff --git a/src/modules/file-browser/listeners/self-listeners.ts b/src/modules/file-browser/listeners/self-listeners.ts index 3ec971d47..767cbcdac 100644 --- a/src/modules/file-browser/listeners/self-listeners.ts +++ b/src/modules/file-browser/listeners/self-listeners.ts @@ -9,14 +9,13 @@ */ import type { IDictionary, IFileBrowser } from 'jodit/types'; -import { isValidName } from 'jodit/core/helpers/checker'; import { normalizePath } from 'jodit/core/helpers'; -import { openImageEditor } from 'jodit/modules/image-editor/image-editor'; - +import { isValidName } from 'jodit/core/helpers/checker'; import { DEFAULT_SOURCE_NAME } from 'jodit/modules/file-browser/data-provider'; -import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; -import { loadItems } from 'jodit/modules/file-browser/fetch/load-items'; import { deleteFile } from 'jodit/modules/file-browser/fetch/delete-file'; +import { loadItems } from 'jodit/modules/file-browser/fetch/load-items'; +import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; +import { openImageEditor } from 'jodit/modules/image-editor/image-editor'; /** * @private diff --git a/src/modules/file-browser/listeners/state-listeners.ts b/src/modules/file-browser/listeners/state-listeners.ts index dde8b9075..7148abcdc 100644 --- a/src/modules/file-browser/listeners/state-listeners.ts +++ b/src/modules/file-browser/listeners/state-listeners.ts @@ -12,7 +12,6 @@ import type { IFileBrowser, IFileBrowserItem } from 'jodit/types'; import { Dom } from 'jodit/core/dom'; import { normalizePath } from 'jodit/core/helpers/normalize'; import { Button } from 'jodit/core/ui/button/button/button'; - import { elementsMap } from 'jodit/modules/file-browser/builders/elements-map'; import { loadTree } from 'jodit/modules/file-browser/fetch/load-tree'; diff --git a/src/modules/file-browser/ui/files/files.ts b/src/modules/file-browser/ui/files/files.ts index c1b6c3489..7f44d381f 100644 --- a/src/modules/file-browser/ui/files/files.ts +++ b/src/modules/file-browser/ui/files/files.ts @@ -4,9 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import './files.less'; import { UIGroup } from 'jodit/core/ui'; +import './files.less'; + export class FileBrowserFiles extends UIGroup { override className(): string { return 'FileBrowserFiles'; diff --git a/src/modules/file-browser/ui/tree/tree.ts b/src/modules/file-browser/ui/tree/tree.ts index 4ea4d1a4c..90f9ecad0 100644 --- a/src/modules/file-browser/ui/tree/tree.ts +++ b/src/modules/file-browser/ui/tree/tree.ts @@ -4,9 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import './tree.less'; import { UIGroup } from 'jodit/core/ui'; +import './tree.less'; + export class FileBrowserTree extends UIGroup { override className(): string { return 'FileBrowserTree'; diff --git a/src/modules/history/command.ts b/src/modules/history/command.ts index 56e6e5e33..d885911c2 100644 --- a/src/modules/history/command.ts +++ b/src/modules/history/command.ts @@ -9,6 +9,7 @@ */ import type { SnapshotType } from 'jodit/types'; + import type { History } from './history'; export class Command { diff --git a/src/modules/history/history.ts b/src/modules/history/history.ts index b0734c183..5d00c8290 100644 --- a/src/modules/history/history.ts +++ b/src/modules/history/history.ts @@ -11,19 +11,21 @@ */ import type { - IJodit, - SnapshotType, + IDestructible, IHistory, + IJodit, ISnapshot, IStack, - IDestructible + SnapshotType } from 'jodit/types'; -import { Config } from 'jodit/config'; import { ViewComponent } from 'jodit/core/component'; +import { debounce } from 'jodit/core/decorators'; + +import { Command } from './command'; import { Snapshot } from './snapshot'; import { Stack } from './stack'; -import { Command } from './command'; -import { debounce } from 'jodit/core/decorators'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/modules/history/snapshot.ts b/src/modules/history/snapshot.ts index 4d830b855..1d8bf589e 100644 --- a/src/modules/history/snapshot.ts +++ b/src/modules/history/snapshot.ts @@ -10,8 +10,8 @@ import type { IJodit, ISnapshot, Nullable, SnapshotType } from 'jodit/types'; import { ViewComponent } from 'jodit/core/component'; -import { Dom } from 'jodit/core/dom'; import { IS_PROD, TEMP_ATTR } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom'; /** * Module for creating snapshot of editor which includes html content and the current selection diff --git a/src/modules/history/stack.ts b/src/modules/history/stack.ts index 481b1dab7..b1d1af527 100644 --- a/src/modules/history/stack.ts +++ b/src/modules/history/stack.ts @@ -9,6 +9,7 @@ */ import type { CanUndef, IStack } from 'jodit/types'; + import type { Command } from './command'; export class Stack implements IStack { diff --git a/src/modules/image-editor/config.ts b/src/modules/image-editor/config.ts index 07d108c06..06dd4a521 100644 --- a/src/modules/image-editor/config.ts +++ b/src/modules/image-editor/config.ts @@ -9,11 +9,13 @@ */ import type { ImageEditorOptions } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; + import cropIcon from './icons/crop.svg'; import resizeIcon from './icons/resize.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { imageeditor: ImageEditorOptions; diff --git a/src/modules/image-editor/image-editor.ts b/src/modules/image-editor/image-editor.ts index 0d30070d8..cc0cfed98 100644 --- a/src/modules/image-editor/image-editor.ts +++ b/src/modules/image-editor/image-editor.ts @@ -10,29 +10,32 @@ * @module modules/image-editor */ -import './image-editor.less'; - import type { - ImageEditorActionBox, + IDialog, + IDictionary, + IDlgs, + IFileBrowserDataProvider, IJodit, - ImageEditorOptions, ImageAction, + ImageEditorActionBox, + ImageEditorOptions, IUIButton, - IDictionary, - IFileBrowserDataProvider, - IDialog, - IViewWithToolbar, - IDlgs + IViewWithToolbar } from 'jodit/types'; -import { Config } from 'jodit/config'; import { ViewComponent } from 'jodit/core/component'; -import { $$, attr, call, css, refs, toArray, trim } from 'jodit/core/helpers'; +import { autobind, component, debounce, throttle } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; +import { $$, attr, call, css, refs, toArray, trim } from 'jodit/core/helpers'; import { Button } from 'jodit/core/ui/button'; -import { form } from './templates/form'; -import { component, debounce, throttle, autobind } from 'jodit/core/decorators'; + import './config'; +import { form } from './templates/form'; + +import './image-editor.less'; + +import { Config } from 'jodit/config'; + interface onSave { ( /** diff --git a/src/modules/index.ts b/src/modules/index.ts index 3c4303269..b2250fd0b 100644 --- a/src/modules/index.ts +++ b/src/modules/index.ts @@ -10,30 +10,33 @@ * @module modules */ -export * from 'jodit/core/event-emitter'; -export { Async } from 'jodit/core/async'; -export * from 'jodit/core/request'; -export { Component, ViewComponent, STATUSES } from 'jodit/core/component'; +import { Component, STATUSES, ViewComponent } from 'jodit/core/component'; +import * as Helpers from 'jodit/core/helpers'; + +export { Component, STATUSES, ViewComponent }; + export { ContextMenu } from './context-menu/context-menu'; export * from './dialog/'; +export * from './file-browser'; +export { Async } from 'jodit/core/async'; +export { Create } from 'jodit/core/create'; export { Dom, LazyWalker } from 'jodit/core/dom'; +export * from 'jodit/core/event-emitter'; export { Plugin } from 'jodit/core/plugin'; -export { Create } from 'jodit/core/create'; +export * from 'jodit/core/request'; export * from 'jodit/core/ui'; export { View } from 'jodit/core/view/view'; export { ViewWithToolbar } from 'jodit/core/view/view-with-toolbar'; -export * from './file-browser'; -import * as Helpers from 'jodit/core/helpers/'; export { Helpers }; -export { ImageEditor } from './image-editor/image-editor'; export { History } from './history/history'; export { Snapshot } from './history/snapshot'; -export { Selection, CommitStyle } from 'jodit/core/selection'; +export { ImageEditor } from './image-editor/image-editor'; +export { UIMessages } from './messages/messages'; export { StatusBar } from './status-bar/status-bar'; export { Table } from './table/table'; -export { ToolbarEditorCollection } from './toolbar/collection/editor-collection'; -export { ToolbarCollection } from './toolbar/collection/collection'; export * from './toolbar/button'; +export { ToolbarCollection } from './toolbar/collection/collection'; +export { ToolbarEditorCollection } from './toolbar/collection/editor-collection'; export { Uploader } from './uploader/uploader'; -export { UIMessages } from './messages/messages'; export { PluginSystem } from 'jodit/core/plugin/plugin-system'; +export { CommitStyle, Selection } from 'jodit/core/selection'; diff --git a/src/modules/messages/__image_snapshots__/messages-test-screenshot-js-messages-screenshot-testing-works-1-snap.png b/src/modules/messages/__image_snapshots__/messages-test-screenshot-js-messages-screenshot-testing-works-1-snap.png index c18b10c23..72e862fd4 100644 Binary files a/src/modules/messages/__image_snapshots__/messages-test-screenshot-js-messages-screenshot-testing-works-1-snap.png and b/src/modules/messages/__image_snapshots__/messages-test-screenshot-js-messages-screenshot-testing-works-1-snap.png differ diff --git a/src/modules/messages/message.ts b/src/modules/messages/message.ts index bc03c91af..1a17d5341 100644 --- a/src/modules/messages/message.ts +++ b/src/modules/messages/message.ts @@ -9,8 +9,8 @@ */ import type { IViewBased, MessageVariant } from 'jodit/types'; -import { UIElement } from 'jodit/core/ui'; import { component } from 'jodit/core/decorators/component/component'; +import { UIElement } from 'jodit/core/ui'; @component export class UIMessage extends UIElement { diff --git a/src/modules/messages/messages.ts b/src/modules/messages/messages.ts index 8883b7adc..a71f49223 100644 --- a/src/modules/messages/messages.ts +++ b/src/modules/messages/messages.ts @@ -10,19 +10,19 @@ * @module modules/messages */ -import './messages.less'; - import type { IMessages, IUIElement, IViewBased, MessageVariant } from 'jodit/types'; +import { component } from 'jodit/core/decorators/component/component'; import { css } from 'jodit/core/helpers/utils/css'; import { UIGroup } from 'jodit/core/ui/group/group'; -import { component } from 'jodit/core/decorators/component/component'; import { UIMessage } from 'jodit/modules/messages/message'; +import './messages.less'; + /** * Plugin display pop-up messages in the lower right corner of the editor */ diff --git a/src/modules/status-bar/status-bar.ts b/src/modules/status-bar/status-bar.ts index eb35764ba..d33b62b25 100644 --- a/src/modules/status-bar/status-bar.ts +++ b/src/modules/status-bar/status-bar.ts @@ -10,20 +10,20 @@ * @module modules/status-bar */ -import './status-bar.less'; - import type { + CanUndef, + IDictionary, IJodit, IStatusBar, - IDictionary, - ModType, - CanUndef + ModType } from 'jodit/types'; -import { ViewComponent, STATUSES } from 'jodit/core/component'; +import { STATUSES, ViewComponent } from 'jodit/core/component'; +import { component, derive } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; -import { Mods } from 'jodit/core/traits/mods'; import { Elms } from 'jodit/core/traits/elms'; -import { derive, component } from 'jodit/core/decorators'; +import { Mods } from 'jodit/core/traits/mods'; + +import './status-bar.less'; export interface StatusBar extends Mods, Elms {} diff --git a/src/modules/table/table.ts b/src/modules/table/table.ts index 48c61b573..09bd05a84 100644 --- a/src/modules/table/table.ts +++ b/src/modules/table/table.ts @@ -11,8 +11,11 @@ */ import type { ICreate, IDictionary, IJodit, Prettify } from 'jodit/types'; +import { ViewComponent } from 'jodit/core/component'; import * as consts from 'jodit/core/constants'; +import { debounce } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; +import { getContainer } from 'jodit/core/global'; import { $$, attr, @@ -21,9 +24,6 @@ import { toArray, trim } from 'jodit/core/helpers/'; -import { ViewComponent } from 'jodit/core/component'; -import { getContainer } from 'jodit/core/global'; -import { debounce } from 'jodit/core/decorators'; const markedValue = new WeakMap< HTMLElement, diff --git a/src/modules/toolbar/button/button.ts b/src/modules/toolbar/button/button.ts index b46d40747..73dd18d0b 100644 --- a/src/modules/toolbar/button/button.ts +++ b/src/modules/toolbar/button/button.ts @@ -10,12 +10,10 @@ * @module modules/toolbar/button */ -import './button.less'; - import type { Controls, - IControlType, IControlListItem, + IControlType, IControlTypeStrong, IControlTypeStrongList, IPopup, @@ -24,28 +22,30 @@ import type { IViewBased, Nullable } from 'jodit/types'; -import { UIButton, UIButtonState } from 'jodit/core/ui/button'; -import { autobind, component, watch, cacheHTML } from 'jodit/core/decorators'; +import { STATUSES } from 'jodit/core/component/statuses'; +import { autobind, cacheHTML, component, watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; -import { Popup } from 'jodit/core/ui/popup/popup'; -import { makeCollection } from 'jodit/modules/toolbar/factory'; import { - isFunction, - isString, - position, - camelCase, + assert, attr, - isJoditObject, call, + camelCase, isArray, - keys, + isFunction, + isJoditObject, isPlainObject, - assert + isString, + keys, + position } from 'jodit/core/helpers'; +import { UIButton, UIButtonState } from 'jodit/core/ui/button'; +import { findControlType } from 'jodit/core/ui/helpers/get-control-type'; import { Icon } from 'jodit/core/ui/icon'; +import { Popup } from 'jodit/core/ui/popup/popup'; import { ToolbarCollection } from 'jodit/modules/toolbar/collection/collection'; -import { STATUSES } from 'jodit/core/component/statuses'; -import { findControlType } from 'jodit/core/ui/helpers/get-control-type'; +import { makeCollection } from 'jodit/modules/toolbar/factory'; + +import './button.less'; @component export class ToolbarButton @@ -349,7 +349,7 @@ export class ToolbarButton } /** - * Fired after popup was opened for some control button + * Fired after the popup was opened for some control button */ /** @@ -365,7 +365,7 @@ export class ToolbarButton private openedPopup: Nullable = null; /** - * Create and open popup list + * Create an open popup list */ private __openControlList(control: IControlTypeStrongList): void { const controls: Controls = this.jodit.options.controls ?? {}, diff --git a/src/modules/toolbar/button/content.ts b/src/modules/toolbar/button/content.ts index 5274cfab5..2dc725e95 100644 --- a/src/modules/toolbar/button/content.ts +++ b/src/modules/toolbar/button/content.ts @@ -8,18 +8,18 @@ * @module modules/toolbar/button */ -import './content.less'; - import type { IControlTypeContent, IToolbarButton, IViewBased, Nullable } from 'jodit/types'; -import { UIButton } from 'jodit/core/ui/button'; -import { Dom } from 'jodit/core/dom'; -import { isString, attr } from 'jodit/core/helpers'; import { component } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom'; +import { attr, isString } from 'jodit/core/helpers'; +import { UIButton } from 'jodit/core/ui/button'; + +import './content.less'; @component export class ToolbarContent diff --git a/src/modules/toolbar/button/select/select.ts b/src/modules/toolbar/button/select/select.ts index b7a1b0658..fc4fdbf1d 100644 --- a/src/modules/toolbar/button/select/select.ts +++ b/src/modules/toolbar/button/select/select.ts @@ -8,14 +8,14 @@ * @module modules/toolbar/button */ -import './select.less'; - import type { IViewBased } from 'jodit/types'; import { component } from 'jodit/core/decorators'; import { isString } from 'jodit/core/helpers/checker/is-string'; import { ToolbarButton } from '../button'; +import './select.less'; + @component export class ToolbarSelect< T extends IViewBased = IViewBased diff --git a/src/modules/toolbar/collection/collection.ts b/src/modules/toolbar/collection/collection.ts index 45afe5f1c..14a9c7380 100644 --- a/src/modules/toolbar/collection/collection.ts +++ b/src/modules/toolbar/collection/collection.ts @@ -10,28 +10,25 @@ * @module modules/toolbar/collection */ -import './collection.less'; - import type { + ButtonsGroups, + CanUndef, + IBound, + IControlTypeStrong, IToolbarButton, IToolbarCollection, IUIButton, - Nullable, - IControlTypeStrong, IViewBased, - ButtonsGroups, - CanUndef, IViewWithToolbar, - IBound + Nullable } from 'jodit/types'; - +import { autobind, component, debounce, hook } from 'jodit/core/decorators'; import { error } from 'jodit/core/helpers/utils/error/error'; - import { UIList, UITooltip } from 'jodit/core/ui'; -import { component, autobind, debounce, hook } from 'jodit/core/decorators'; - import { makeButton, makeSelect } from 'jodit/modules/toolbar/factory'; +import './collection.less'; + @component export class ToolbarCollection extends UIList @@ -47,7 +44,7 @@ export class ToolbarCollection 'selectionchange changeSelection focus afterSetMode touchstart focus blur'; /** - * First button in list + * First button in a list */ get firstButton(): Nullable { const [button] = this.buttons as IToolbarButton[]; @@ -76,7 +73,7 @@ export class ToolbarCollection } /** - * Button should be disabled + * The Button should be disabled */ shouldBeDisabled(button: IToolbarButton): boolean | undefined { return undefined; diff --git a/src/modules/toolbar/collection/editor-collection.ts b/src/modules/toolbar/collection/editor-collection.ts index 225ca3e04..ee0341fd5 100644 --- a/src/modules/toolbar/collection/editor-collection.ts +++ b/src/modules/toolbar/collection/editor-collection.ts @@ -8,18 +8,19 @@ * @module modules/toolbar/collection */ -import { ToolbarCollection } from './collection'; -import * as consts from 'jodit/core/constants'; -import { Dom } from 'jodit/core/dom'; import type { + IBound, IDictionary, - IToolbarButton, - IViewBased, IJodit, - IBound + IToolbarButton, + IViewBased } from 'jodit/types'; -import { css, isFunction } from 'jodit/core/helpers'; +import * as consts from 'jodit/core/constants'; import { component } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom'; +import { css, isFunction } from 'jodit/core/helpers'; + +import { ToolbarCollection } from './collection'; @component export class ToolbarEditorCollection extends ToolbarCollection { diff --git a/src/modules/toolbar/factory.ts b/src/modules/toolbar/factory.ts index 51afd590b..0d596194c 100644 --- a/src/modules/toolbar/factory.ts +++ b/src/modules/toolbar/factory.ts @@ -20,11 +20,12 @@ import type { Nullable } from 'jodit/types'; import { isFunction, isJoditObject } from 'jodit/core/helpers'; -import { ToolbarCollection } from './collection/collection'; -import { ToolbarEditorCollection } from './collection/editor-collection'; + import { ToolbarButton } from './button/button'; import { ToolbarContent } from './button/content'; import { ToolbarSelect } from './button/select/select'; +import { ToolbarCollection } from './collection/collection'; +import { ToolbarEditorCollection } from './collection/editor-collection'; /** * Collection factory diff --git a/src/modules/uploader/config.ts b/src/modules/uploader/config.ts index 87dc90cb6..a5c032703 100644 --- a/src/modules/uploader/config.ts +++ b/src/modules/uploader/config.ts @@ -14,10 +14,11 @@ import type { IUploaderData, IUploaderOptions } from 'jodit/types'; -import { Config } from 'jodit/config'; import { isArray } from 'jodit/core/helpers/checker/is-array'; import { isJoditObject } from 'jodit/core/helpers/checker/is-jodit-object'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/modules/uploader/helpers/index.ts b/src/modules/uploader/helpers/index.ts index 92c6cb2fb..58f21e0b9 100644 --- a/src/modules/uploader/helpers/index.ts +++ b/src/modules/uploader/helpers/index.ts @@ -10,9 +10,9 @@ import type { Nullable } from 'jodit/types'; -export * from './process-old-browser-drag'; -export * from './data-uri-to-blob'; export * from './build-data'; +export * from './data-uri-to-blob'; +export * from './process-old-browser-drag'; export * from './send'; export * from './send-files'; diff --git a/src/modules/uploader/helpers/process-old-browser-drag.ts b/src/modules/uploader/helpers/process-old-browser-drag.ts index b2b8b5894..e9d0247b0 100644 --- a/src/modules/uploader/helpers/process-old-browser-drag.ts +++ b/src/modules/uploader/helpers/process-old-browser-drag.ts @@ -10,9 +10,10 @@ import type { HandlerError, HandlerSuccess, IUploader } from 'jodit/types'; import { TEXT_PLAIN } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom'; import { getContainer } from 'jodit/core/global'; import { attr, isJoditObject } from 'jodit/core/helpers'; -import { Dom } from 'jodit/core/dom'; + import { dataURItoBlob, sendFiles } from './index'; export function processOldBrowserDrag( diff --git a/src/modules/uploader/helpers/send.ts b/src/modules/uploader/helpers/send.ts index ffd2acdf6..4ce9e76c9 100644 --- a/src/modules/uploader/helpers/send.ts +++ b/src/modules/uploader/helpers/send.ts @@ -9,8 +9,8 @@ */ import type { IDictionary, IUploader, IUploaderAnswer } from 'jodit/types'; -import { Ajax } from 'jodit/core/request'; import { isFunction, isPromise } from 'jodit/core/helpers'; +import { Ajax } from 'jodit/core/request'; import { buildData } from 'jodit/modules/uploader/helpers/build-data'; export const ajaxInstances: WeakMap> = new WeakMap(); @@ -42,8 +42,6 @@ export function send( percentComplete *= 100; - console.log('progress', percentComplete); - uploader.j.progressbar .show() .progress(percentComplete); diff --git a/src/modules/uploader/uploader.ts b/src/modules/uploader/uploader.ts index 7f76de15e..a6c84121c 100644 --- a/src/modules/uploader/uploader.ts +++ b/src/modules/uploader/uploader.ts @@ -10,8 +10,6 @@ * @module modules/uploader */ -import './uploader.less'; - import type { HandlerError, HandlerSuccess, @@ -20,15 +18,14 @@ import type { IUploaderOptions, IViewBased } from 'jodit/types'; -import { Config } from 'jodit/config'; +import { STATUSES, ViewComponent } from 'jodit/core/component/'; import { IS_ES_NEXT, IS_IE } from 'jodit/core/constants'; import { + ConfigProto, error, - isJoditObject, isFunction, - ConfigProto + isJoditObject } from 'jodit/core/helpers'; -import { ViewComponent, STATUSES } from 'jodit/core/component/'; import { ajaxInstances, hasFiles, @@ -40,6 +37,10 @@ import { import './config'; +import './uploader.less'; + +import { Config } from 'jodit/config'; + export class Uploader extends ViewComponent implements IUploader { declare readonly jodit: IViewBased; diff --git a/src/modules/widget/color-picker/color-picker.ts b/src/modules/widget/color-picker/color-picker.ts index 3071812fe..54cd45a13 100644 --- a/src/modules/widget/color-picker/color-picker.ts +++ b/src/modules/widget/color-picker/color-picker.ts @@ -10,22 +10,23 @@ * @module modules/widget/color-picker */ -import './color-picker.less'; - import type { IDictionary, IJodit } from 'jodit/types'; +import { Dom } from 'jodit/core/dom'; import { - normalizeColor, - hasBrowserColorPicker, - isPlainObject, attr, - isFunction, + hasBrowserColorPicker, isArray, + isFunction, + isPlainObject, + normalizeColor, refs } from 'jodit/core/helpers/'; import { Icon } from 'jodit/core/ui'; -import { Dom } from 'jodit/core/dom'; + import paletteIcon from './palette.svg'; +import './color-picker.less'; + Icon.set('palette', paletteIcon); /** @@ -36,10 +37,10 @@ Icon.set('palette', paletteIcon); * @example * ```javascript * const tabs = TabsWidget(editor, { - * 'Text' : ColorPickerWidget(editor, function (color) { + * 'Text': ColorPickerWidget(editor, function (color) { * box.style.color = color; * }, box.style.color), - * 'Background' : ColorPickerWidget(editor, function (color) { + * 'Background': ColorPickerWidget(editor, function (color) { * box.style.backgroundColor = color; * }, box.style.backgroundColor), * }); diff --git a/src/modules/widget/file-selector/file-selector.ts b/src/modules/widget/file-selector/file-selector.ts index 276001fe6..aa7a170d3 100644 --- a/src/modules/widget/file-selector/file-selector.ts +++ b/src/modules/widget/file-selector/file-selector.ts @@ -11,10 +11,9 @@ */ import type { IFileBrowserCallBackData, IJodit } from 'jodit/types'; -import { isFunction, $$, attr } from 'jodit/core/helpers'; import { Dom } from 'jodit/core/dom/dom'; -import { UIBlock, UIForm, UIInput, UIButton } from 'jodit/core/ui'; - +import { $$, attr, isFunction } from 'jodit/core/helpers'; +import { UIBlock, UIButton, UIForm, UIInput } from 'jodit/core/ui'; import { type TabOption, TabsWidget } from 'jodit/modules/widget/tabs/tabs'; interface ImageSelectorCallbacks { diff --git a/src/modules/widget/index.ts b/src/modules/widget/index.ts index ff2dee9a0..63b543b10 100644 --- a/src/modules/widget/index.ts +++ b/src/modules/widget/index.ts @@ -11,5 +11,5 @@ */ export * from './color-picker/color-picker'; -export * from './tabs/tabs'; export * from './file-selector/file-selector'; +export * from './tabs/tabs'; diff --git a/src/modules/widget/tabs/tabs.ts b/src/modules/widget/tabs/tabs.ts index a933b036d..820cc9f22 100644 --- a/src/modules/widget/tabs/tabs.ts +++ b/src/modules/widget/tabs/tabs.ts @@ -10,14 +10,14 @@ * @module modules/widget/tabs */ -import './tabs.less'; - import type { IDictionary, IJodit, IUIButton } from 'jodit/types'; +import { Component } from 'jodit/core/component'; +import { Dom } from 'jodit/core/dom/dom'; import { $$ } from 'jodit/core/helpers'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; import { Button, UIElement } from 'jodit/core/ui'; -import { Component } from 'jodit/core/component'; -import { Dom } from 'jodit/core/dom/dom'; + +import './tabs.less'; export interface TabOption { icon?: string; diff --git a/src/plugins/about/about.ts b/src/plugins/about/about.ts index 56d59361f..eb189148a 100644 --- a/src/plugins/about/about.ts +++ b/src/plugins/about/about.ts @@ -10,18 +10,19 @@ * @module plugins/about */ -import './about.less'; - import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; -import { css, isLicense, normalizeLicense } from 'jodit/core/helpers/'; import * as constants from 'jodit/core/constants'; +import { HOMEPAGE } from 'jodit/core/constants'; import { pluginSystem } from 'jodit/core/global'; +import { css, isLicense, normalizeLicense } from 'jodit/core/helpers/'; import { Icon } from 'jodit/core/ui/icon'; -import { HOMEPAGE } from 'jodit/core/constants'; import aboutIcon from './about.svg'; +import './about.less'; + +import { Config } from 'jodit/config'; + Config.prototype.controls.about = { exec: (editor: IJodit) => { const dialog = editor.dlg({ closeOnClickOverlay: true }), diff --git a/src/plugins/add-new-line/add-new-line.test.js b/src/plugins/add-new-line/add-new-line.test.js index 47e2e3326..9de0e5ba7 100644 --- a/src/plugins/add-new-line/add-new-line.test.js +++ b/src/plugins/add-new-line/add-new-line.test.js @@ -5,7 +5,7 @@ */ describe('Add new Line plugin', function () { - it('Should not add new line element in container before first use', function () { + it('Should not add a new line element in container before first use', function () { const editor = getJodit(); expect( editor.container.querySelectorAll('.jodit-add-new-line').length @@ -21,7 +21,7 @@ describe('Add new Line plugin', function () { }); }; - it('Should show .jodit-add-new-line after user move mouse under Table,Ifrmae or IMG ', function () { + it('Should show .jodit-add-new-line after user moves mouse under Table, Ifrmae or IMG ', function () { const editor = getJodit(); editor.value = '' + @@ -52,7 +52,7 @@ describe('Add new Line plugin', function () { ); }); - it('Should add new paragraph after user clicked on newline ', function () { + it('Should add a new paragraph after user clicked on newline ', function () { const editor = getJodit(); editor.value = '
' + @@ -134,7 +134,7 @@ describe('Add new Line plugin', function () { ); }); - it('Should add new paragraph after user clicked on newline below table in IFRAME mode', function () { + it('Should add a new paragraph after user clicked on newline below table in IFRAME mode', function () { const editor = getJodit({ ifarme: true }); @@ -179,8 +179,8 @@ describe('Add new Line plugin', function () { ); }); - describe('Insert line on top of IMG element that was inside P element', function () { - it('Should insert new P before parent P element', function () { + describe('Insert line on top of an IMG element that was inside a P element', function () { + it('Should insert new P before a parent P element', function () { const editor = getJodit(); editor.value = '

'; diff --git a/src/plugins/add-new-line/add-new-line.ts b/src/plugins/add-new-line/add-new-line.ts index 0755210a6..8f304dc79 100644 --- a/src/plugins/add-new-line/add-new-line.ts +++ b/src/plugins/add-new-line/add-new-line.ts @@ -10,21 +10,21 @@ * @module plugins/add-new-line */ -import './add-new-line.less'; - -import type { IJodit, HTMLTagNames, Nullable } from 'jodit/types'; -import { Dom, Icon, Plugin } from 'jodit/modules'; +import type { HTMLTagNames, IJodit, Nullable } from 'jodit/types'; +import { autobind, throttle, watch } from 'jodit/core/decorators'; +import { pluginSystem } from 'jodit/core/global'; import { + call, offset, position, - call, scrollIntoViewIfNeeded } from 'jodit/core/helpers'; -import { autobind, throttle, watch } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; +import { Dom, Icon, Plugin } from 'jodit/modules'; import './config'; +import './add-new-line.less'; + const ns = 'addnewline'; /** diff --git a/src/plugins/add-new-line/config.ts b/src/plugins/add-new-line/config.ts index 8962854bb..606b614ce 100644 --- a/src/plugins/add-new-line/config.ts +++ b/src/plugins/add-new-line/config.ts @@ -9,11 +9,12 @@ */ import type { HTMLTagNames } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; import enterIcon from './enter.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/plugins/ai-assistant/README.md b/src/plugins/ai-assistant/README.md index 25692a70b..ff351d47d 100644 --- a/src/plugins/ai-assistant/README.md +++ b/src/plugins/ai-assistant/README.md @@ -1,3 +1,188 @@ -# JODIT AI Assistant +# Jodit AI Assistant Plugin -Initial UX trials \ No newline at end of file +The Jodit AI Assistant plugin is a powerful tool that enhances your text editing capabilities with the help of AI. It provides various features like improving writing quality, making text shorter or longer, simplifying language, summarizing text, changing tone and style, and translating text to different languages. + +## Installation + +To use the AI Assistant plugin, you need to include it in your Jodit editor configuration: + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiAssistantCallback() {} + } +}); +``` + +In the `aiAssistantCallback` function, you can define how the AI assistant processes and returns the result. + +## Usage + +The AI Assistant plugin provides many prompts for different operations. +Each prompt is a string that instructs the AI on what to do. +Here is an example of how to use the `aiImproveWritingPrompt`: + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiImproveWritingPrompt: 'Improve this text' + } +}); +``` + +You can set similar prompts for other operations as per your requirements. + +## OpenAI API Example + +To use the OpenAI API with the AI Assistant plugin, you need to make API calls within the `aiAssistantCallback` function. Here is an example: + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiAssistantCallback(prompt, htmlFragment) { + // Make API call to OpenAI + return fetch('https://api.openai.com/v1/chat/completions', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer ' + Jodit.constants.TOKENS.TOKEN_GPT + }, + body: JSON.stringify({ + model: 'gpt-3.5-turbo', + messages: [ + { + role: 'system', + content: prompt + }, + { + role: 'user', + content: htmlFragment + } + ] + }) + }) + .then(response => response.json()) + .then(data => { + if (data.error) { + throw new Error(data.error.message); + } + + return ( + Jodit.modules.Helpers.get( + 'choices.0.message.content', + data + ) ?? '' + ); + }); + } + } +}); +``` + +In this example, replace `Bearer YOUR_OPENAI_API_KEY` with your actual OpenAI API key. + +Please note that you need to handle errors and edge cases as per your application's requirements. + +Here are some examples of using different prompts: + +### Making Text Shorter + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiShortenTextPrompt: 'Shorten this text' + } +}); +``` + +### Simplifying Language + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiSimplifyLanguagePrompt: 'Simplify this text' + } +}); +``` + +### Summarizing Text + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiSummarizePrompt: 'Summarize this text' + } +}); +``` + +### Changing Tone to Professional + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiChangeToneProfessionalPrompt: 'Change tone to professional' + } +}); +``` + +### Translating Text to Spanish + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiTranslateToSpanishPrompt: 'Translate to Spanish' + } +}); +``` + +Remember to replace the string values with your own prompts as per your requirements. + +Here is the table with all the prompts and their default values: + +| Prompt | Default Value | +| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| aiCommonPrefixPrompt | '' | +| aiCommonSuffixPrompt | '' | +| aiImproveWritingPrompt | 'It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.' | +| aiMakeShorterPrompt | 'Please condense this content to make it more concise, while preserving the key messages, language and information.' | +| aiMakeLongerPrompt | 'Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.' | +| aiSimplifyLanguagePrompt | 'The language used here needs to be simplified for easier understanding, without altering the core information and the original language.' | +| aiSummarizePrompt | 'Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.' | +| aiContinuePrompt | 'Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.' | +| aiChangeToneProfessionalPrompt | 'Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.' | +| aiChangeToneFriendlyPrompt | 'It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.' | +| aiChangeToneFormalPrompt | 'Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.' | +| aiChangeToneCasualPrompt | 'Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.' | +| aiChangeToneDirectPrompt | 'Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.' | +| aiChangeToneConfidentPrompt | 'Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.' | +| aiChangeStyleBusinessPrompt | 'Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.' | +| aiChangeStyleLegalPrompt | 'Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.' | +| aiChangeStyleJournalismPrompt | 'Convert this content into a journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.' | +| aiChangeStylePoeticPrompt | 'Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.' | +| aiTranslateToSpanishPrompt | 'Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToFrenchPrompt | 'Translate this content into French, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToGermanPrompt | 'Translate this content into German, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToItalianPrompt | 'Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToPortuguesePrompt | 'Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToEnglishPrompt | 'Translate this content into English, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToChinesePrompt | 'Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToJapanesePrompt | 'Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToKoreanPrompt | 'Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToRussianPrompt | 'Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.' | +| aiTranslateToArabicPrompt | 'Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning.' | + +You can customize these prompts as per your requirements. + +## Common prefixes and suffixes + +The AI Assistant plugin also provides common prefixes and suffixes that can be used to enhance the AI's understanding of the text. You can set these values in the configuration: + +```javascript +const editor = Jodit.make('#editor', { + aiAssistant: { + aiCommonPrefixPrompt: 'Result should be on Spanish', + aiCommonSuffixPrompt: + 'Please make the necessary changes to enhance the quality of the content. Text should be clear, concise, and engaging.' + } +}); +``` diff --git a/src/plugins/ai-assistant/ai-assistant.less b/src/plugins/ai-assistant/ai-assistant.less deleted file mode 100644 index fda921477..000000000 --- a/src/plugins/ai-assistant/ai-assistant.less +++ /dev/null @@ -1,94 +0,0 @@ -@import (reference) '../../styles/variables'; - -.jodit-ai-assistant { - width: 100%; - padding: var(--padding-default); - - &__container { - &__body { - margin-bottom: 10px; - &__prompt-row { - display: flex; - align-items: flex-start; - margin-bottom: 10px; - - &__label { - margin-right: 10px; - } - - &__input { - flex: 1; - margin-right: 10px; - } - - .jodit-icon_ai_assistant { - cursor: pointer; - width: 22px; - height: 22px; - } - - .jodit-ui-button { - margin-right: 10px; - } - - .jodit-ui-button_ai_assistant { - margin-top: 20px; - margin-right: 0px; - } - - } - } - &__results { - padding: 7px; - position: relative; - border-color: var(--color-label); - border-style: solid; - border-width: 1px; - min-height: 300px; - height: 300px; - min-width: 100%; - overflow: auto; - } - } - - &__close { - position: absolute; - top: 0; - right: 0; - padding: 10px; - cursor: pointer; - } - -} - -.jodit-icon_ai_assistant { - cursor: pointer; - width: 18px !important; - height: 18px !important; -} - -.ai-assistant-hide { - display: none; -} - -@keyframes spinner { - to { - transform: rotate(360deg); - } -} - -.spinner:before { - content: ''; - box-sizing: border-box; - position: absolute; - top: 50%; - left: 50%; - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - border-radius: 50%; - border: 1px solid #ccc; - border-top-color: #8817c3ff; - animation: spinner .6s linear infinite; -} \ No newline at end of file diff --git a/src/plugins/ai-assistant/ai-assistant.svg b/src/plugins/ai-assistant/ai-assistant.svg index 7165bca19..df6a6b541 100644 --- a/src/plugins/ai-assistant/ai-assistant.svg +++ b/src/plugins/ai-assistant/ai-assistant.svg @@ -1,38 +1,14 @@ - - + style="stroke-width:2.8964;stroke-opacity:1" /> + style="stroke-width:2.8964;fill-opacity:1;stroke-opacity:1" /> + style="stroke-width:2.8964;fill-opacity:1" /> + style="stroke-width:2.8964;stroke-opacity:1" /> diff --git a/src/plugins/ai-assistant/ai-assistant.test.js b/src/plugins/ai-assistant/ai-assistant.test.js new file mode 100644 index 000000000..6035fbde2 --- /dev/null +++ b/src/plugins/ai-assistant/ai-assistant.test.js @@ -0,0 +1,21 @@ +/*! + * Jodit Editor (https://xdsoft.net/jodit/) + * Released under MIT see LICENSE.txt in the project root for license information. + * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net + */ + +describe('AI Assistant', () => { + it('Should have an ai-assistant button', () => { + const editor = getJodit(); + const button = getButton('ai_assistant', editor); + expect(button).to.be.not.null; + }); + + it('Should have an ai-commands button', () => { + const editor = getJodit(); + const button = getButton('ai_commands', editor); + expect(button).to.be.not.null; + }); + + // TODO: add more tests +}); diff --git a/src/plugins/ai-assistant/ai-assistant.ts b/src/plugins/ai-assistant/ai-assistant.ts index 32060967f..bc12933ca 100644 --- a/src/plugins/ai-assistant/ai-assistant.ts +++ b/src/plugins/ai-assistant/ai-assistant.ts @@ -10,16 +10,16 @@ * @module plugins/joditai */ -import './ai-assistant.less'; - -import { Button } from 'jodit/core/ui/button'; -import { UIBlock, UIForm, UITextArea } from 'jodit/modules'; -import type { IJodit, IUIButton, IUIForm } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin/plugin'; +import type { IJodit } from 'jodit/types'; +import watch from 'jodit/core/decorators/watch/watch'; import { extendLang, pluginSystem } from 'jodit/core/global'; -import * as langs from './langs'; +import { Plugin } from 'jodit/core/plugin/plugin'; + import './config'; +import { UiAiAssistant } from './ui/ui-ai-assistant'; +import * as langs from './langs'; + /** * The plugin inserts content generated by AI into the editor. */ @@ -42,274 +42,71 @@ export class aiAssistant extends Plugin { } /** @override */ - override afterInit(jodit: IJodit): void { - jodit.e.on( - 'invokeAiAssistant.ai-assistant', - ( - prompt: string, - aiAssistantCallback: ( - prompt: string, - htmlFragment: string - ) => Promise - ) => { - jodit.s.focus(); - const selectedText = jodit.s.html; - aiAssistantCallback(prompt, selectedText).then( - (htmlFragment: string) => { - if ( - htmlFragment != null && - htmlFragment !== undefined - ) { - const htmlResponse = jodit.c.fromHTML(htmlFragment); - jodit.e.fire('ai-assistant-response', htmlResponse); - } else { - jodit.e.fire('ai-assistant-response', ''); - } - } - ); - } - ); - - jodit.e.on('generateAiAssistantForm.ai-assistant', (prompt: string) => { - const container = jodit.c.fromHTML(` -
-
-
-
-
-
-
-
-
-
-
`); - - const dialog = jodit.dlg({ - buttons: ['fullsize', 'dialog.close'], - closeOnClickOverlay: true, - closeOnEsc: true, - resizable: false, - draggable: true, - minWidth: 460, - maxWidth: 460 - }); - dialog.bindDestruct(jodit); - - const body = container.querySelector( - '.jodit-ai-assistant__container__body' - ); - const results = container.querySelector( - '.jodit-ai-assistant__container__results' - ); - const containerButtons = container.querySelector( - '.jodit-ai-assistant__container__buttons' - ); + override afterInit(jodit: IJodit): void {} + + @watch(':generateAiAssistantForm.ai-assistant') + protected onGenerateAiAssistantForm(prompt: string): void { + const { jodit } = this; + + const dialog = jodit.dlg({ + buttons: ['fullsize', 'dialog.close'], + closeOnClickOverlay: true, + closeOnEsc: true, + resizable: false, + draggable: true, + minWidth: 460, + maxWidth: 460 + }); + dialog.bindDestruct(jodit); - const insertAfterButton = Button( - jodit, - '', - 'Insert After', - 'initial' - ).onAction(() => { - if (results!.firstChild != null) { - const currentSelection = jodit.s.current(); - if ( - currentSelection != null && - currentSelection.parentElement != null - ) { - jodit.s.setCursorIn( - currentSelection.parentElement, - false - ); - jodit.s.insertHTML(results!.innerHTML); - } - } + const container = new UiAiAssistant(jodit, { + onInsertAfter(html: string): void { + jodit.s.focus(); + jodit.s.setCursorAfter(jodit.s.current()!); + jodit.s.insertHTML(html); dialog.close(); - }); - let tryAgainButton: IUIButton = {} as IUIButton; - const submitButton = Button(jodit, 'ai-assistant', '').onAction( - () => { - if (formAiAssistant.validate()) { - formAiAssistant.submit(); - submitButton.setState({ disabled: true }); - tryAgainButton.setState({ disabled: true }); - } - } - ); - tryAgainButton = Button(jodit, '', 'Try Again', 'initial').onAction( - () => { - if (formAiAssistant.validate()) { - formAiAssistant.submit(); - submitButton.setState({ disabled: true }); - tryAgainButton.setState({ disabled: true }); - } - } - ); - const promptInput = new UITextArea(jodit, { - name: 'prompt', - required: true, - - label: 'Prompt', - placeholder: 'Ask AI to improve generated text', - className: - 'jodit-ai-assistant__container__body__prompt-row__input' - }); - const insertButton = Button( - jodit, - '', - 'Insert', - 'primary' - ).onAction(() => { - if (results!.firstChild != null) { - jodit.s.focus(); - jodit.s.insertHTML(results!.innerHTML); - } + }, + onInsert(html: string): void { + jodit.s.focus(); + jodit.s.insertHTML(html); dialog.close(); - }); - const buttonsBLock = new UIBlock( - jodit, - [insertButton, insertAfterButton, tryAgainButton], - { - className: 'jodit-ai-assistant__container__body__prompt-row' - } - ); - const formAiAssistant: IUIForm = new UIForm(jodit, [ - new UIBlock(jodit, [promptInput, submitButton], { - className: 'jodit-ai-assistant__container__body__prompt-row' - }) - ]); + } + }); - results!.classList.add('ai-assistant-hide'); - containerButtons!.classList.add('ai-assistant-hide'); - containerButtons!.appendChild(buttonsBLock.container); - body!.appendChild(formAiAssistant.container); + container.bindDestruct(dialog); + dialog.open(container, 'AI Assistant', true, false); - formAiAssistant.onSubmit((data: Record) => { - jodit.e.fire( - 'invokeAiAssistant', - data.prompt, - jodit.o.aiAssistantCallback - ); - results!.classList.remove('ai-assistant-hide'); - containerButtons!.classList.remove('ai-assistant-hide'); - results!.innerHTML = '
'; - insertButton.focus(); - }); + container.setPrompt(prompt); + } - jodit.e.on('ai-assistant-response', (htmlFragment: HTMLElement) => { - if (htmlFragment != null && htmlFragment !== undefined) { - results!.innerHTML = ''; - results!.appendChild(htmlFragment); + @watch(':invokeAiAssistant') + protected onInvokeAiAssistant(prompt: string): void { + const { jodit } = this; + + jodit.s.focus(); + const selectedText = jodit.s.html; + + jodit.async + .promise(async (resolve, reject) => { + try { + const result = await jodit.o.aiAssistant + .aiAssistantCallback!(prompt, selectedText); + resolve(result); + } catch (error) { + reject(error); } - submitButton.setState({ disabled: false }); - tryAgainButton.setState({ disabled: false }); + }) + .then((htmlFragment: string) => { + jodit.e.fire('ai-assistant-response', htmlFragment); + }) + .catch(error => { + jodit.message.error(error.message); + jodit.e.fire('ai-assistant-error', error.message); }); - - if (prompt != null && prompt !== undefined && prompt !== '') { - let promptToUse: string = ''; - switch (prompt) { - case 'aiImproveWritingPrompt': - promptToUse = jodit.o.aiImproveWritingPrompt; - break; - case 'aiMakeShorterPrompt': - promptToUse = jodit.o.aiMakeShorterPrompt; - break; - case 'aiMakeLongerPrompt': - promptToUse = jodit.o.aiMakeLongerPrompt; - break; - case 'aiSimplifyLanguagePrompt': - promptToUse = jodit.o.aiSimplifyLanguagePrompt; - break; - case 'aiSummarizePrompt': - promptToUse = jodit.o.aiSummarizePrompt; - break; - case 'aiContinuePrompt': - promptToUse = jodit.o.aiContinuePrompt; - break; - case 'aiChangeToneProfessionalPrompt': - promptToUse = jodit.o.aiChangeToneProfessionalPrompt; - break; - case 'aiChangeToneFriendlyPrompt': - promptToUse = jodit.o.aiChangeToneFriendlyPrompt; - break; - case 'aiChangeToneFormalPrompt': - promptToUse = jodit.o.aiChangeToneFormalPrompt; - break; - case 'aiChangeToneCasualPrompt': - promptToUse = jodit.o.aiChangeToneCasualPrompt; - break; - case 'aiChangeToneDirectPrompt': - promptToUse = jodit.o.aiChangeToneDirectPrompt; - break; - case 'aiChangeToneConfidentPrompt': - promptToUse = jodit.o.aiChangeToneConfidentPrompt; - break; - case 'aiChangeStyleBusinessPrompt': - promptToUse = jodit.o.aiChangeStyleBusinessPrompt; - break; - case 'aiChangeStyleLegalPrompt': - promptToUse = jodit.o.aiChangeStyleLegalPrompt; - break; - case 'aiChangeStyleJournalismPrompt': - promptToUse = jodit.o.aiChangeStyleJournalismPrompt; - break; - case 'aiChangeStylePoeticPrompt': - promptToUse = jodit.o.aiChangeStylePoeticPrompt; - break; - case 'aiTranslateToSpanishPrompt': - promptToUse = jodit.o.aiTranslateToSpanishPrompt; - break; - case 'aiTranslateToFrenchPrompt': - promptToUse = jodit.o.aiTranslateToFrenchPrompt; - break; - case 'aiTranslateToGermanPrompt': - promptToUse = jodit.o.aiTranslateToGermanPrompt; - break; - case 'aiTranslateToItalianPrompt': - promptToUse = jodit.o.aiTranslateToItalianPrompt; - break; - case 'aiTranslateToPortuguesePrompt': - promptToUse = jodit.o.aiTranslateToPortuguesePrompt; - break; - case 'aiTranslateToEnglishPrompt': - promptToUse = jodit.o.aiTranslateToEnglishPrompt; - break; - case 'aiTranslateToChinesePrompt': - promptToUse = jodit.o.aiTranslateToChinesePrompt; - break; - case 'aiTranslateToJapanesePrompt': - promptToUse = jodit.o.aiTranslateToJapanesePrompt; - break; - case 'aiTranslateToKoreanPrompt': - promptToUse = jodit.o.aiTranslateToKoreanPrompt; - break; - case 'aiTranslateToRussianPrompt': - promptToUse = jodit.o.aiTranslateToRussianPrompt; - break; - case 'aiTranslateToArabicPrompt': - promptToUse = jodit.o.aiTranslateToArabicPrompt; - break; - } - if ( - promptToUse != null && - promptToUse !== undefined && - promptToUse !== '' - ) { - promptInput.value = promptToUse; - formAiAssistant.submit(); - submitButton.setState({ disabled: true }); - tryAgainButton.setState({ disabled: true }); - } - } - - dialog.open(container, 'AI Assistant', true, false); - promptInput.focus(); - return dialog; - }); } /** @override */ - protected beforeDestruct(jodit: IJodit): void {} + protected beforeDestruct(_: IJodit): void {} } pluginSystem.add('ai-assistant', aiAssistant); diff --git a/src/plugins/ai-assistant/chat-bot.svg b/src/plugins/ai-assistant/chat-bot.svg index a2f2e9279..ab09c4f07 100644 --- a/src/plugins/ai-assistant/chat-bot.svg +++ b/src/plugins/ai-assistant/chat-bot.svg @@ -1,11 +1,7 @@ - - - - + + + diff --git a/src/plugins/ai-assistant/config.ts b/src/plugins/ai-assistant/config.ts index 849e30714..9b33e9c63 100644 --- a/src/plugins/ai-assistant/config.ts +++ b/src/plugins/ai-assistant/config.ts @@ -9,108 +9,185 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; import magicWandIcon from './ai-assistant.svg'; import chatBotIcon from './chat-bot.svg'; -import './ai-assistant.less'; + +import { Config } from 'jodit/config'; + +export interface AiAssistantSettings { + /** Callback function for AI assistant to process and return the result */ + aiAssistantCallback?: ( + prompt: string, + htmlFragment: string + ) => Promise; + + /** Prompt for common prefix */ + aiCommonPrefixPrompt: string; + + /** Prompt for common suffix */ + aiCommonSuffixPrompt: string; + + /** Prompt for improving writing quality */ + aiImproveWritingPrompt: string; + + /** Prompt for making text shorter */ + aiMakeShorterPrompt: string; + + /** Prompt for making text longer */ + aiMakeLongerPrompt: string; + + /** Prompt for simplifying language */ + aiSimplifyLanguagePrompt: string; + + /** Prompt for summarizing text */ + aiSummarizePrompt: string; + + /** Prompt for continuing text */ + aiContinuePrompt: string; + + /** Prompt for changing tone to professional */ + aiChangeToneProfessionalPrompt: string; + + /** Prompt for changing tone to friendly */ + aiChangeToneFriendlyPrompt: string; + + /** Prompt for changing tone to formal */ + aiChangeToneFormalPrompt: string; + + /** Prompt for changing tone to casual */ + aiChangeToneCasualPrompt: string; + + /** Prompt for changing tone to direct */ + aiChangeToneDirectPrompt: string; + + /** Prompt for changing tone to confident */ + aiChangeToneConfidentPrompt: string; + + /** Prompt for changing style to business */ + aiChangeStyleBusinessPrompt: string; + + /** Prompt for changing style to legal */ + aiChangeStyleLegalPrompt: string; + + /** Prompt for changing style to journalism */ + aiChangeStyleJournalismPrompt: string; + + /** Prompt for changing style to poetic */ + aiChangeStylePoeticPrompt: string; + + /** Prompt for translating text to Spanish */ + aiTranslateToSpanishPrompt: string; + + /** Prompt for translating text to French */ + aiTranslateToFrenchPrompt: string; + + /** Prompt for translating text to German */ + aiTranslateToGermanPrompt: string; + + /** Prompt for translating text to Italian */ + aiTranslateToItalianPrompt: string; + + /** Prompt for translating text to Portuguese */ + aiTranslateToPortuguesePrompt: string; + + /** Prompt for translating text to English */ + aiTranslateToEnglishPrompt: string; + + /** Prompt for translating text to Chinese */ + aiTranslateToChinesePrompt: string; + + /** Prompt for translating text to Japanese */ + aiTranslateToJapanesePrompt: string; + + /** Prompt for translating text to Korean */ + aiTranslateToKoreanPrompt: string; + + /** Prompt for translating text to Russian */ + aiTranslateToRussianPrompt: string; + + /** Prompt for translating text to Arabic */ + aiTranslateToArabicPrompt: string; +} declare module 'jodit/config' { interface Config { - aiAssistantCallback: ( - prompt: string, - htmlFragment: string - ) => Promise; - aiImproveWritingPrompt: string; - aiMakeShorterPrompt: string; - aiMakeLongerPrompt: string; - aiSimplifyLanguagePrompt: string; - aiSummarizePrompt: string; - aiContinuePrompt: string; - aiChangeToneProfessionalPrompt: string; - aiChangeToneFriendlyPrompt: string; - aiChangeToneFormalPrompt: string; - aiChangeToneCasualPrompt: string; - aiChangeToneDirectPrompt: string; - aiChangeToneConfidentPrompt: string; - aiChangeStyleBusinessPrompt: string; - aiChangeStyleLegalPrompt: string; - aiChangeStyleJournalismPrompt: string; - aiChangeStylePoeticPrompt: string; - aiTranslateToSpanishPrompt: string; - aiTranslateToFrenchPrompt: string; - aiTranslateToGermanPrompt: string; - aiTranslateToItalianPrompt: string; - aiTranslateToPortuguesePrompt: string; - aiTranslateToEnglishPrompt: string; - aiTranslateToChinesePrompt: string; - aiTranslateToJapanesePrompt: string; - aiTranslateToKoreanPrompt: string; - aiTranslateToRussianPrompt: string; - aiTranslateToArabicPrompt: string; + aiAssistant: AiAssistantSettings; } } -Config.prototype.aiImproveWritingPrompt = - 'It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.'; -Config.prototype.aiMakeShorterPrompt = - 'Please condense this content to make it more concise, while preserving the key messages, language and information.'; -Config.prototype.aiMakeLongerPrompt = - 'Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.'; -Config.prototype.aiSimplifyLanguagePrompt = - 'The language used here needs to be simplified for easier understanding, without altering the core information and the original language.'; -Config.prototype.aiSummarizePrompt = - 'Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.'; -Config.prototype.aiContinuePrompt = - 'Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.'; -Config.prototype.aiChangeToneProfessionalPrompt = - 'Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.'; -Config.prototype.aiChangeToneFriendlyPrompt = - 'It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.'; -Config.prototype.aiChangeToneFormalPrompt = - 'Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.'; -Config.prototype.aiChangeToneCasualPrompt = - 'Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.'; -Config.prototype.aiChangeToneDirectPrompt = - 'Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.'; -Config.prototype.aiChangeToneConfidentPrompt = - 'Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.'; -Config.prototype.aiChangeStyleBusinessPrompt = - 'Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.'; -Config.prototype.aiChangeStyleLegalPrompt = - 'Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.'; -Config.prototype.aiChangeStyleJournalismPrompt = - 'Convert this content into a journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.'; -Config.prototype.aiChangeStylePoeticPrompt = - 'Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.'; -Config.prototype.aiTranslateToSpanishPrompt = - 'Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToFrenchPrompt = - 'Translate this content into French, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToGermanPrompt = - 'Translate this content into German, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToItalianPrompt = - 'Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToPortuguesePrompt = - 'Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToEnglishPrompt = - 'Translate this content into English, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToChinesePrompt = - 'Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToJapanesePrompt = - 'Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToKoreanPrompt = - 'Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToRussianPrompt = - 'Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.'; -Config.prototype.aiTranslateToArabicPrompt = - 'Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning.'; +const aiAssistantDefaults: AiAssistantSettings = { + aiAssistantCallback(prompt: string, htmlFragment: string): Promise { + return Promise.resolve('hi'); + }, + aiCommonPrefixPrompt: '', + aiCommonSuffixPrompt: '', + aiImproveWritingPrompt: + 'It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.', + aiMakeShorterPrompt: + 'Please condense this content to make it more concise, while preserving the key messages, language and information.', + aiMakeLongerPrompt: + 'Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.', + aiSimplifyLanguagePrompt: + 'The language used here needs to be simplified for easier understanding, without altering the core information and the original language.', + aiSummarizePrompt: + 'Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.', + aiContinuePrompt: + 'Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.', + aiChangeToneProfessionalPrompt: + 'Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.', + aiChangeToneFriendlyPrompt: + 'It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.', + aiChangeToneFormalPrompt: + 'Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.', + aiChangeToneCasualPrompt: + 'Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.', + aiChangeToneDirectPrompt: + 'Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.', + aiChangeToneConfidentPrompt: + 'Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.', + aiChangeStyleBusinessPrompt: + 'Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.', + aiChangeStyleLegalPrompt: + 'Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.', + aiChangeStyleJournalismPrompt: + 'Convert this content into a journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.', + aiChangeStylePoeticPrompt: + 'Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.', + aiTranslateToSpanishPrompt: + 'Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToFrenchPrompt: + 'Translate this content into French, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToGermanPrompt: + 'Translate this content into German, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToItalianPrompt: + 'Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToPortuguesePrompt: + 'Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToEnglishPrompt: + 'Translate this content into English, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToChinesePrompt: + 'Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToJapanesePrompt: + 'Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToKoreanPrompt: + 'Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToRussianPrompt: + 'Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.', + aiTranslateToArabicPrompt: + 'Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning.' +}; + +Config.prototype.aiAssistant = aiAssistantDefaults; Icon.set('ai-assistant', chatBotIcon); Icon.set('ai-commands', magicWandIcon); Config.prototype.controls['ai-commands'] = { + isDisabled(editor: IJodit): boolean { + return !editor.o.aiAssistant.aiAssistantCallback; + }, tooltip: 'AI Commands', list: { aiImproveWritingPrompt: 'Improve writing', @@ -127,7 +204,7 @@ Config.prototype.controls['ai-commands'] = { aiChangeToneConfidentPrompt: 'Change tone to confident', aiChangeStyleBusinessPrompt: 'Change style to business', aiChangeStyleLegalPrompt: 'Change style to legal', - aiChangeStyleJournalismPrompt: 'Change style to journalism', + aiChangeStyleJournalismPrompt: 'Change style of journalism', aiChangeStylePoeticPrompt: 'Change style to poetic', aiTranslateToSpanishPrompt: 'Translate to Spanish', aiTranslateToFrenchPrompt: 'Translate to French', @@ -147,9 +224,12 @@ Config.prototype.controls['ai-commands'] = { } as IControlType as IControlType; Config.prototype.controls['ai-assistant'] = { + isDisabled(editor: IJodit): boolean { + return !editor.o.aiAssistant.aiAssistantCallback; + }, hotkeys: ['ctrl+a+i', 'cmd+a+i'], tooltip: 'AI Assistant', - popup: (editor: IJodit, current, close): any => { + exec: (editor: IJodit, current, close): any => { editor.e.fire('generateAiAssistantForm.ai-assistant'); } } as IControlType; diff --git a/src/plugins/ai-assistant/langs/index.ts b/src/plugins/ai-assistant/langs/index.ts index bb2a602f5..f58492286 100644 --- a/src/plugins/ai-assistant/langs/index.ts +++ b/src/plugins/ai-assistant/langs/index.ts @@ -4,7 +4,7 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import * as es from './es.js'; import * as en from './en.js'; +import * as es from './es.js'; -export { es, en }; +export { en, es }; diff --git a/src/plugins/ai-assistant/ui/ui-ai-assistant.less b/src/plugins/ai-assistant/ui/ui-ai-assistant.less new file mode 100644 index 000000000..65f155e56 --- /dev/null +++ b/src/plugins/ai-assistant/ui/ui-ai-assistant.less @@ -0,0 +1,91 @@ +@import (reference) '../../../styles/variables'; + +.jodit-ui-ai-assistant { + width: 100%; + padding: var(--padding-default); + + &__body { + margin-bottom: 10px; + } + + &__prompt-row { + display: flex; + align-items: flex-start; + margin-bottom: 10px; + + &-label { + margin-right: 10px; + } + + &-input { + flex: 1; + margin-right: 10px; + } + + .jodit-icon_ai_assistant { + cursor: pointer; + width: 22px; + height: 22px; + } + + .jodit-ui-button { + margin-right: 10px; + } + + .jodit-ui-button_ai_assistant { + margin-top: 20px; + margin-right: 0; + } + } + + &__results { + padding: 7px; + position: relative; + border-color: var(--color-label); + border-style: solid; + border-width: 1px; + min-height: 300px; + height: 300px; + min-width: 100%; + overflow: auto; + line-height: 1.5; + } + + &__close { + position: absolute; + top: 0; + right: 0; + padding: 10px; + cursor: pointer; + } + + &_hide_true { + display: none; + } + + &__spinner:before { + content: ''; + box-sizing: border-box; + position: absolute; + top: 50%; + left: 50%; + width: 30px; + height: 30px; + margin-top: -15px; + margin-left: -15px; + border-radius: 50%; + border: 1px solid #ccc; + border-top-color: #8817c3ff; + animation: spinner 0.6s linear infinite; + } + + &__error { + color: var(--color-error); + } +} + +@keyframes spinner { + to { + transform: rotate(360deg); + } +} diff --git a/src/plugins/ai-assistant/ui/ui-ai-assistant.ts b/src/plugins/ai-assistant/ui/ui-ai-assistant.ts new file mode 100644 index 000000000..8d275b9fe --- /dev/null +++ b/src/plugins/ai-assistant/ui/ui-ai-assistant.ts @@ -0,0 +1,199 @@ +/*! + * Jodit Editor (https://xdsoft.net/jodit/) + * Released under MIT see LICENSE.txt in the project root for license information. + * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net + */ + +import type { IJodit, IUIButton } from 'jodit/types'; +import { component } from 'jodit/core/decorators/component/component'; +import watch from 'jodit/core/decorators/watch/watch'; +import { Dom } from 'jodit/core/dom/dom'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { Button, UIBlock, UIForm, UITextArea } from 'jodit/core/ui'; +import { UIElement } from 'jodit/core/ui/element'; + +import './ui-ai-assistant.less'; + +@component +export class UiAiAssistant extends UIElement { + private __body: HTMLElement; + private __buttons: HTMLElement; + private __results: HTMLElement; + private __spinner: HTMLElement; + private __error: HTMLElement; + + promptInput: UITextArea; + + private __insertAfterButton: IUIButton; + private __submitButton: IUIButton; + private __tryAgainButton: IUIButton; + private __insertButton: IUIButton; + private __formAiAssistant: UIForm; + + className(): string { + return 'UIAiAssistant'; + } + + constructor( + jodit: IJodit, + { + onInsert, + onInsertAfter + }: { + onInsert: (html: string) => void; + onInsertAfter: (html: string) => void; + } + ) { + super(jodit); + + this.__error = this.getElm('error')!; + this.__body = this.getElm('body')!; + this.__buttons = this.getElm('buttons')!; + this.__results = this.getElm('results')!; + this.__spinner = this.getElm('spinner')!; + + this.__insertButton = Button(jodit, '', 'Insert', 'primary').onAction( + () => onInsert(this.__aiResult) + ); + + this.__insertAfterButton = Button( + jodit, + '', + 'Insert After', + 'initial' + ).onAction(() => onInsertAfter(this.__aiResult)); + + const onSubmit = (): void => { + if (this.__formAiAssistant.validate()) { + this.__formAiAssistant.submit(); + this.__toogleSubmitButton(true); + } + }; + + this.__submitButton = Button(jodit, 'ai-assistant', '').onAction( + onSubmit + ); + + this.__tryAgainButton = Button( + jodit, + '', + 'Try Again', + 'initial' + ).onAction(onSubmit); + + this.promptInput = new UITextArea(jodit, { + name: 'prompt', + required: true, + label: 'Prompt', + placeholder: 'Ask AI to improve generated text', + className: this.getFullElName('prompt-row-input') + }); + + const buttonsBLock = new UIBlock( + jodit, + [ + this.__insertButton, + this.__insertAfterButton, + this.__tryAgainButton + ], + { + className: this.getFullElName('prompt-row') + } + ); + + this.__formAiAssistant = new UIForm(jodit, [ + new UIBlock(jodit, [this.promptInput, this.__submitButton], { + className: this.getFullElName('prompt-row') + }) + ]).onSubmit((data: Record) => { + this.__error.textContent = ''; + this.setMod('loading', true); + + jodit.e.fire('invokeAiAssistant', data.prompt); + + const hideMod = this.getFullElName('', 'hide', 'true'); + this.__results.classList.remove(hideMod); + this.__buttons.classList.remove(hideMod); + + Dom.detach(this.__results); + this.__results.appendChild(this.__spinner); + this.__insertButton.focus(); + }); + + this.__buttons.appendChild(buttonsBLock.container); + this.__body.appendChild(this.__formAiAssistant.container); + + this.onChangePromptValue(); + } + + protected override render(): string { + return `
+
+
+
+
+
+
+
+
+
`; + } + + setPrompt(prompt: string): void { + if (prompt) { + const { jodit } = this; + const promptOpt = + jodit.o.aiAssistant[prompt as keyof typeof jodit.o.aiAssistant]; + + const { aiCommonPrefixPrompt, aiCommonSuffixPrompt } = + jodit.o.aiAssistant; + + this.promptInput.value = [ + aiCommonPrefixPrompt, + isString(promptOpt) ? promptOpt : '', + aiCommonSuffixPrompt + ] + .filter(Boolean) + .join(' '); + + if (this.promptInput.value) { + this.__formAiAssistant.submit(); + + this.__toogleSubmitButton(true); + } + } + + this.promptInput.focus(); + } + + private __aiResult: string = ''; + + @watch(':ai-assistant-response') + protected onAiAssistentResponse(result: string): void { + this.setMod('loading', false); + Dom.detach(this.__results); + this.__aiResult = result; + this.__results.appendChild(this.jodit.c.fromHTML(result)); + + this.__toogleSubmitButton(false); + } + + @watch(':ai-assistant-error') + protected onAiAssistentError(error: string): void { + this.__aiResult = ''; + this.setMod('loading', false); + this.__error.textContent = error; + + this.__toogleSubmitButton(false); + } + + @watch('promptInput.nativeInput:input') + protected onChangePromptValue(): void { + this.__toogleSubmitButton(!this.promptInput.value); + } + + private __toogleSubmitButton(value: boolean): void { + this.__submitButton.state.disabled = value; + this.__tryAgainButton.state.disabled = value; + } +} diff --git a/src/plugins/backspace/backspace.test.js b/src/plugins/backspace/backspace.test.js index e321601c1..aa7b38297 100644 --- a/src/plugins/backspace/backspace.test.js +++ b/src/plugins/backspace/backspace.test.js @@ -152,7 +152,7 @@ describe('Backspace/Delete key', function () { }); }); - describe('Select whole text inside element', function () { + describe('Select whole text inside an element', function () { describe('Inside P', function () { it('Should remove selected range and remove this P', function () { range.selectNodeContents(editor.editor.firstChild); @@ -256,7 +256,7 @@ describe('Backspace/Delete key', function () { }); }); - describe('Text after SPAN and cursor in the left edge of text', function () { + describe('Text after SPAN and cursor on the left edge of a text', function () { it('Should remove char inside span', function () { editor.value = '

AAAtest

'; @@ -418,7 +418,7 @@ describe('Backspace/Delete key', function () { describe('After BackSpace/Delete left empty node', function () { describe('BackSpace', function () { - it('Should remove whole node', function () { + it('Should remove the whole node', function () { editor.value = '

' + Jodit.INVISIBLE_SPACE + 's

'; range.setStart(editor.editor.firstChild.firstChild, 2); @@ -437,7 +437,7 @@ describe('Backspace/Delete key', function () { }); describe('Delete', function () { - it('Should remove whole node', function () { + it('Should remove the whole node', function () { editor.value = '

d' + Jodit.INVISIBLE_SPACE + '

'; range.setStart(editor.editor.firstChild.firstChild, 0); @@ -459,7 +459,7 @@ describe('Backspace/Delete key', function () { describe('Cursor after empty text node', function () { describe('BackSpace', function () { - it('Should remove this empty text node and first normal char in previous node', function () { + it('Should remove this empty text node and first normal char in the previous node', function () { const p = editor.editor.firstChild; p.appendChild( @@ -493,7 +493,7 @@ describe('Backspace/Delete key', function () { }); describe('Delete', function () { - it('Should remove this empty text node and first normal char in next node', function () { + it('Should remove this empty text node and first normal char in the next node', function () { const p = editor.editor.firstChild; p.appendChild( @@ -603,8 +603,8 @@ describe('Backspace/Delete key', function () { expect(editor.value).equals('

2

'); }); - describe('Near has element', function () { - it('Should remove empty tag and set cursor in previous element', function () { + describe('Near has an element', function () { + it('Should remove empty tag and set cursor in a previous element', function () { editor.value = '
' + '' + @@ -653,7 +653,7 @@ describe('Backspace/Delete key', function () { }); describe('Inside this element and this element empty', function () { - it('Should remove empty this empty element', function () { + it('Should remove this empty element', function () { editor.value = '

|

'; setCursorToChar(editor); // editor.s.focus(); @@ -759,7 +759,7 @@ describe('Backspace/Delete key', function () { }); describe('HR before P', function () { - it('Should simple remove HR but cursor should leave inside P', function () { + it('Should simply remove HR but the cursor should leave inside P', function () { editor.value = '

lets


|test

'; setCursorToChar(editor); @@ -770,7 +770,7 @@ describe('Backspace/Delete key', function () { }); describe('HR has different display style', function () { - it('Should also remove HR but cursor should leave inside P', function () { + it('Should also remove HR but the cursor should leave inside P', function () { editor.destruct(); const jodit = getJodit( { @@ -786,7 +786,7 @@ describe('Backspace/Delete key', function () { const range = jodit.s.createRange(); - // set cursor in start of element + // set cursor in start of an element range.selectNodeContents(jodit.editor.lastChild); range.collapse(true); @@ -802,7 +802,7 @@ describe('Backspace/Delete key', function () { describe('The neighbor is empty H1', function () { describe('Backspace', function () { - it('Should simple remove this H1', function () { + it('Should simply remove this H1', function () { editor.value = '

test

'; range.setStartBefore(editor.editor.lastChild.firstChild); @@ -818,7 +818,7 @@ describe('Backspace/Delete key', function () { }); describe('H1 with BR', function () { - it('Should simple remove this H1', function () { + it('Should simply remove this H1', function () { editor.value = '


|test

'; setCursorToChar(editor); @@ -834,7 +834,7 @@ describe('Backspace/Delete key', function () { }); describe('Delete', function () { - it('Should simple remove this H1', function () { + it('Should simply remove this H1', function () { editor.value = '

test|

'; setCursorToChar(editor); @@ -844,7 +844,7 @@ describe('Backspace/Delete key', function () { }); describe('H1 with BR', function () { - it('Should simple remove this H1', function () { + it('Should simply remove this H1', function () { editor.value = '

test|


'; setCursorToChar(editor); simulateEvent( @@ -861,7 +861,7 @@ describe('Backspace/Delete key', function () { }); describe('inside empty TD', function () { - it('Should doing nothing', function () { + it('Should do nothing', function () { editor.value = '
1
' + '' + '
'; @@ -883,7 +883,7 @@ describe('Backspace/Delete key', function () { describe('after last char inside tag', function () { describe('inside A', function () { - it('Should remove empty tag and set cursor in previous element', function () { + it('Should remove empty tag and set cursor in a previous element', function () { editor.value = '

t|

'; setCursorToChar(editor); @@ -976,7 +976,7 @@ describe('Backspace/Delete key', function () { }); }); - describe('On the edge of two tag', function () { + describe('On the edge of two tags', function () { describe('Backspace', function () { it('Should connect both elements in one element', function () { editor.value = '

Test

Test

'; @@ -993,7 +993,7 @@ describe('Backspace/Delete key', function () { }); describe('inline elements', function () { - it('Should move cursor inside first element', function () { + it('Should move the cursor inside a first element', function () { editor.value = '
This is
\n' + '
my line
'; @@ -1061,7 +1061,7 @@ describe('Backspace/Delete key', function () { }); }); - describe('P after UL and cursor in the left edge of P', function () { + describe('P after UL and cursor on the left edge of P', function () { it('Should remove P and move all this content inside last LI', function () { editor.value = '

AAA

\n' + @@ -1100,7 +1100,7 @@ describe('Backspace/Delete key', function () { }); }); - describe('H1 after P and cursor in the left edge of H1', function () { + describe('H1 after P and cursor on the left edge of H1', function () { it('Should remove H1 and move all this content inside last P', function () { editor.value = '

AAA

CCC

'; @@ -1161,7 +1161,7 @@ describe('Backspace/Delete key', function () { describe('In the middle of two UL elements', function () { describe('Backspace', function () { describe('In first LI of second UL', function () { - it('Should move content of this LI and put it inside new P', function () { + it('Should move the content of this LI and put it inside new P', function () { editor.value = '
  • Test
  • |Some text
'; @@ -1269,7 +1269,7 @@ describe('Backspace/Delete key', function () { describe('Enter backspace/delete in the start of some LI', function () { describe('in first LI', function () { describe('Enter backspace', function () { - it('Should remove this LI and move all conntent in P', function () { + it('Should remove this LI and move all content in P', function () { editor.value = '
  • Test
  • Some text
'; range.setStart( @@ -1356,8 +1356,8 @@ describe('Backspace/Delete key', function () { expect(editor.value).equals('
  • Test a Some text
'); }); - describe('And enter Enter', function () { - it('Should split this LI on two again', function () { + describe('And enter', function () { + it('Should split this LI in two again', function () { editor.value = '
  • Test
  • Some text
'; range.setStart( diff --git a/src/plugins/backspace/backspace.ts b/src/plugins/backspace/backspace.ts index 680af52fe..658c9c677 100644 --- a/src/plugins/backspace/backspace.ts +++ b/src/plugins/backspace/backspace.ts @@ -11,19 +11,19 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { Dom } from 'jodit/core/dom'; import { INVISIBLE_SPACE, IS_PROD } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom'; +import { pluginSystem } from 'jodit/core/global'; import { isFunction } from 'jodit/core/helpers/checker/is-function'; +import { Plugin } from 'jodit/core/plugin'; import { moveNodeInsideStart } from 'jodit/core/selection/helpers'; -import { pluginSystem } from 'jodit/core/global'; - -import type { DeleteMode } from './interface'; -import { cases } from './cases'; -import { checkNotCollapsed } from './cases/check-not-collapsed'; import './config'; +import { checkNotCollapsed } from './cases/check-not-collapsed'; +import { cases } from './cases'; +import type { DeleteMode } from './interface'; + export class backspace extends Plugin { static override requires = ['hotkeys']; diff --git a/src/plugins/backspace/cases/check-join-neighbors.ts b/src/plugins/backspace/cases/check-join-neighbors.ts index f01f04856..7f44a3dec 100644 --- a/src/plugins/backspace/cases/check-join-neighbors.ts +++ b/src/plugins/backspace/cases/check-join-neighbors.ts @@ -9,9 +9,10 @@ */ import type { IJodit, Nullable } from 'jodit/types'; +import { LIST_TAGS } from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom/dom'; + import { getMoveFilter } from 'jodit/plugins/backspace/helpers'; -import { LIST_TAGS } from 'jodit/core/constants'; /** * Check if two separate elements can be connected @@ -25,7 +26,7 @@ export function checkJoinNeighbors( let nextBox: Nullable = fakeNode, mainClosestBox: Nullable = nextBox; - // Find main big closest element + // Find the main big closest element while ( nextBox && !Dom.findNotEmptySibling(nextBox, backspace) && diff --git a/src/plugins/backspace/cases/check-join-two-lists.ts b/src/plugins/backspace/cases/check-join-two-lists.ts index 8dc2a9d99..974ab1ecd 100644 --- a/src/plugins/backspace/cases/check-join-two-lists.ts +++ b/src/plugins/backspace/cases/check-join-two-lists.ts @@ -11,6 +11,7 @@ import type { IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { call } from 'jodit/core/helpers/utils/utils'; + import { getMoveFilter } from 'jodit/plugins/backspace/helpers'; /** diff --git a/src/plugins/backspace/cases/check-remove-char.ts b/src/plugins/backspace/cases/check-remove-char.ts index 82436e000..5770c6083 100644 --- a/src/plugins/backspace/cases/check-remove-char.ts +++ b/src/plugins/backspace/cases/check-remove-char.ts @@ -8,12 +8,12 @@ * @module plugins/backspace */ -import type { CanUndef, IJodit, Nullable, HTMLTagNames } from 'jodit/types'; +import type { CanUndef, HTMLTagNames, IJodit, Nullable } from 'jodit/types'; +import type { DeleteMode } from 'jodit/plugins/backspace/interface'; +import { INVISIBLE_SPACE, NBSP_SPACE } from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom'; import { call, isVoid, toArray, trimInv } from 'jodit/core/helpers'; -import { INVISIBLE_SPACE, NBSP_SPACE } from 'jodit/core/constants'; -import type { DeleteMode } from 'jodit/plugins/backspace/interface'; import { findMostNestedNeighbor } from 'jodit/plugins/backspace/helpers'; /** @@ -188,7 +188,7 @@ export function checkRemoveChar( } /** - * Helper remove all empty inline parents + * Helper removes all empty inline parents */ function removeEmptyForParent(node: Node, tags: HTMLTagNames): void { let parent = node.parentElement; diff --git a/src/plugins/backspace/cases/check-remove-empty-parent.ts b/src/plugins/backspace/cases/check-remove-empty-parent.ts index 5cf707ece..d94372ee3 100644 --- a/src/plugins/backspace/cases/check-remove-empty-parent.ts +++ b/src/plugins/backspace/cases/check-remove-empty-parent.ts @@ -9,8 +9,8 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { Dom } from 'jodit/core/dom'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom'; import { checkJoinTwoLists } from './check-join-two-lists'; diff --git a/src/plugins/backspace/cases/check-remove-unbreakable-element.ts b/src/plugins/backspace/cases/check-remove-unbreakable-element.ts index 12f39121b..307528181 100644 --- a/src/plugins/backspace/cases/check-remove-unbreakable-element.ts +++ b/src/plugins/backspace/cases/check-remove-unbreakable-element.ts @@ -9,8 +9,8 @@ */ import type { IJodit } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; import { checkRemoveEmptyParent } from './check-remove-empty-parent'; diff --git a/src/plugins/backspace/cases/check-unwrap-first-list-item.ts b/src/plugins/backspace/cases/check-unwrap-first-list-item.ts index 72e0d44e8..5ebb6c5f1 100644 --- a/src/plugins/backspace/cases/check-unwrap-first-list-item.ts +++ b/src/plugins/backspace/cases/check-unwrap-first-list-item.ts @@ -13,7 +13,7 @@ import { Dom } from 'jodit/core/dom/dom'; import { call } from 'jodit/core/helpers/utils'; /** - * For first item in list on backspace try move his content in new P + * For the first item in a list on backspace, try to move his content in new P * * @example * ```html diff --git a/src/plugins/backspace/cases/index.ts b/src/plugins/backspace/cases/index.ts index 2591013f2..e064bcf65 100644 --- a/src/plugins/backspace/cases/index.ts +++ b/src/plugins/backspace/cases/index.ts @@ -8,14 +8,14 @@ * @module plugins/backspace */ -import { checkRemoveUnbreakableElement } from './check-remove-unbreakable-element'; -import { checkRemoveContentNotEditable } from './check-remove-content-not-editable'; +import { checkJoinNeighbors } from './check-join-neighbors'; +import { checkJoinTwoLists } from './check-join-two-lists'; import { checkRemoveChar } from './check-remove-char'; -import { checkTableCell } from './check-table-cell'; -import { checkRemoveEmptyParent } from './check-remove-empty-parent'; +import { checkRemoveContentNotEditable } from './check-remove-content-not-editable'; import { checkRemoveEmptyNeighbor } from './check-remove-empty-neighbor'; -import { checkJoinTwoLists } from './check-join-two-lists'; -import { checkJoinNeighbors } from './check-join-neighbors'; +import { checkRemoveEmptyParent } from './check-remove-empty-parent'; +import { checkRemoveUnbreakableElement } from './check-remove-unbreakable-element'; +import { checkTableCell } from './check-table-cell'; import { checkUnwrapFirstListItem } from './check-unwrap-first-list-item'; /** diff --git a/src/plugins/bold/bold.test.js b/src/plugins/bold/bold.test.js index 6a6ff3a29..7ec7888a3 100644 --- a/src/plugins/bold/bold.test.js +++ b/src/plugins/bold/bold.test.js @@ -17,8 +17,8 @@ describe('Bold plugin', () => { jodit.destruct(); }); - describe('Click bold button', () => { - it('Should add empty STRONG element', async () => { + describe('Click the bold button', () => { + it('Should add an empty STRONG element', async () => { clickButton('bold', jodit); await jodit.async.requestIdlePromise(); replaceCursorToChar(jodit); @@ -69,8 +69,8 @@ describe('Bold plugin', () => { }); }); - describe('Click subscript button', () => { - it('Should add empty SUB element', async () => { + describe('Click the subscript button', () => { + it('Should add empty Subelement', async () => { clickButton('subscript', jodit); await jodit.async.requestIdlePromise(); replaceCursorToChar(jodit); @@ -78,7 +78,7 @@ describe('Bold plugin', () => { }); describe('Inside sub tag', () => { - it('Should move cursor in the outside from the tag', async () => { + it('Should move the cursor on the outside from the tag', async () => { jodit.value = '

test|

'; setCursorToChar(jodit); clickButton('superscript', jodit); @@ -91,7 +91,7 @@ describe('Bold plugin', () => { }); describe('Click superscript button', () => { - it('Should add empty SUP element', async () => { + it('Should add an empty SUP element', async () => { clickButton('superscript', jodit); await jodit.async.requestIdlePromise(); replaceCursorToChar(jodit); diff --git a/src/plugins/bold/bold.ts b/src/plugins/bold/bold.ts index 3c2540ef6..5e1eb0045 100644 --- a/src/plugins/bold/bold.ts +++ b/src/plugins/bold/bold.ts @@ -11,17 +11,19 @@ */ import type { + CanUndef, + IControlType, IDictionary, IJodit, - IControlType, - CanUndef, IStyle } from 'jodit/types'; -import { Config } from 'jodit/config'; -import { isArray } from 'jodit/core/helpers'; import { pluginSystem } from 'jodit/core/global'; +import { isArray } from 'jodit/core/helpers'; import { Icon } from 'jodit/core/ui/icon'; +import './interface'; +import './config'; + import boldIcon from './icons/bold.svg'; import italicIcon from './icons/italic.svg'; import strikethroughIcon from './icons/strikethrough.svg'; @@ -29,8 +31,7 @@ import subscriptIcon from './icons/subscript.svg'; import superscriptIcon from './icons/superscript.svg'; import underlineIcon from './icons/underline.svg'; -import './interface'; -import './config'; +import { Config } from 'jodit/config'; /** * Adds `bold`,` strikethrough`, `underline` and` italic` buttons to Jodit diff --git a/src/plugins/bold/config.ts b/src/plugins/bold/config.ts index 006a19113..b50614f0f 100644 --- a/src/plugins/bold/config.ts +++ b/src/plugins/bold/config.ts @@ -9,6 +9,7 @@ */ import type { IControlType } from 'jodit/types'; + import { Config } from 'jodit/config'; Config.prototype.controls.subscript = { diff --git a/src/plugins/class-span/class-span.test.js b/src/plugins/class-span/class-span.test.js index 0775a1a15..6667a2f35 100644 --- a/src/plugins/class-span/class-span.test.js +++ b/src/plugins/class-span/class-span.test.js @@ -171,7 +171,7 @@ describe('classSpan test', () => { describe('Active', function () { describe('In list', function () { describe('ClassSpan button', function () { - it('Should be activated then element has some className', function () { + it('Should be activated then an element has some className', function () { const editor = getJodit({ toolbarAdaptive: false, history: { diff --git a/src/plugins/class-span/class-span.ts b/src/plugins/class-span/class-span.ts index 15e1f28c0..297b6371f 100644 --- a/src/plugins/class-span/class-span.ts +++ b/src/plugins/class-span/class-span.ts @@ -11,15 +11,16 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom/dom'; -import { memorizeExec } from 'jodit/core/helpers/utils/utils'; import { pluginSystem } from 'jodit/core/global'; +import { memorizeExec } from 'jodit/core/helpers/utils/utils'; +import { Plugin } from 'jodit/core/plugin'; import { Icon } from 'jodit/core/ui/icon'; import classSpanIcon from './class-span.svg'; +import { Config } from 'jodit/config'; + Config.prototype.controls.classSpan = { command: 'applyClassName', diff --git a/src/plugins/clean-html/clean-html.ts b/src/plugins/clean-html/clean-html.ts index 3a6e9d4be..5b84f48a9 100644 --- a/src/plugins/clean-html/clean-html.ts +++ b/src/plugins/clean-html/clean-html.ts @@ -11,12 +11,14 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { safeHTML } from 'jodit/core/helpers/html/safe-html'; -import { Plugin } from 'jodit/core/plugin/plugin'; -import { watch, hook } from 'jodit/core/decorators'; +import { hook, watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { LazyWalker } from 'jodit/core/dom/lazy-walker'; import { pluginSystem } from 'jodit/core/global'; -import { Dom } from 'jodit/core/dom/dom'; +import { safeHTML } from 'jodit/core/helpers/html/safe-html'; +import { Plugin } from 'jodit/core/plugin/plugin'; + +import './config'; import { getHash, @@ -25,8 +27,6 @@ import { visitNodeWalker } from './helpers'; -import './config'; - /** * Clean HTML after removeFormat and insertHorizontalRule command */ diff --git a/src/plugins/clean-html/config.ts b/src/plugins/clean-html/config.ts index 9fea0e56f..0a75e58a2 100644 --- a/src/plugins/clean-html/config.ts +++ b/src/plugins/clean-html/config.ts @@ -9,11 +9,12 @@ */ import type { HTMLTagNames, IDictionary, Nullable } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; import eraserIcon from './eraser.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { cleanHTML: { diff --git a/src/plugins/clean-html/helpers/get-hash.ts b/src/plugins/clean-html/helpers/get-hash.ts index 9cfba3957..a6aa37674 100644 --- a/src/plugins/clean-html/helpers/get-hash.ts +++ b/src/plugins/clean-html/helpers/get-hash.ts @@ -9,8 +9,8 @@ */ import type { IDictionary } from 'jodit/types'; -import { trim } from 'jodit/core/helpers/string/trim'; import { isString } from 'jodit/core/helpers/checker/is-string'; +import { trim } from 'jodit/core/helpers/string/trim'; /** * @private diff --git a/src/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.ts b/src/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.ts index 40e4216f5..9ca24bd1b 100644 --- a/src/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.ts +++ b/src/plugins/clean-html/helpers/remove-format/remove-format-for-collapsed-selection.ts @@ -9,8 +9,8 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; /** * For collapsed selection move cursor outside or split inline block diff --git a/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts b/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts index 297ecc77f..72339c63e 100644 --- a/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts +++ b/src/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.ts @@ -9,8 +9,8 @@ */ import type { IJodit } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; /** * @private diff --git a/src/plugins/clean-html/helpers/visitor/filters/index.ts b/src/plugins/clean-html/helpers/visitor/filters/index.ts index 98fff2bad..c075aef75 100644 --- a/src/plugins/clean-html/helpers/visitor/filters/index.ts +++ b/src/plugins/clean-html/helpers/visitor/filters/index.ts @@ -12,10 +12,10 @@ * @private */ -export * from './replace-old-tags'; export * from './allow-attributes'; export * from './fill-empty-paragraph'; -export * from './try-remove-node'; export * from './remove-empty-text-node'; export * from './remove-inv-text-nodes'; +export * from './replace-old-tags'; export * from './sanitize-attributes'; +export * from './try-remove-node'; diff --git a/src/plugins/clean-html/helpers/visitor/filters/try-remove-node.ts b/src/plugins/clean-html/helpers/visitor/filters/try-remove-node.ts index f1bf92256..e5a506cb3 100644 --- a/src/plugins/clean-html/helpers/visitor/filters/try-remove-node.ts +++ b/src/plugins/clean-html/helpers/visitor/filters/try-remove-node.ts @@ -9,8 +9,8 @@ */ import type { IDictionary, IJodit, Nullable } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; import { IS_INLINE } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; import { trim } from 'jodit/core/helpers/string/trim'; /** diff --git a/src/plugins/clean-html/helpers/visitor/visit-node-walker.ts b/src/plugins/clean-html/helpers/visitor/visit-node-walker.ts index 165e90d30..77ab07c89 100644 --- a/src/plugins/clean-html/helpers/visitor/visit-node-walker.ts +++ b/src/plugins/clean-html/helpers/visitor/visit-node-walker.ts @@ -8,10 +8,10 @@ * @module plugins/clean-html */ -import type { IJodit, Nullable, IDictionary } from 'jodit/types'; +import type { IDictionary, IJodit, Nullable } from 'jodit/types'; +import { IS_PROD } from 'jodit/core/constants'; import * as filters from './filters'; -import { IS_PROD } from 'jodit/core/constants'; type Filter = keyof typeof filters; const keys = Object.keys(filters) as Filter[]; diff --git a/src/plugins/clipboard/clipboard.ts b/src/plugins/clipboard/clipboard.ts index 4fde2d794..5d1ecb632 100644 --- a/src/plugins/clipboard/clipboard.ts +++ b/src/plugins/clipboard/clipboard.ts @@ -18,8 +18,8 @@ import { TEXT_HTML, TEXT_PLAIN } from 'jodit/core/constants'; -import { getDataTransfer, stripTags } from 'jodit/core/helpers'; import { pluginSystem } from 'jodit/core/global'; +import { getDataTransfer, stripTags } from 'jodit/core/helpers'; import './config'; diff --git a/src/plugins/clipboard/config.ts b/src/plugins/clipboard/config.ts index 560fd4721..768971049 100644 --- a/src/plugins/clipboard/config.ts +++ b/src/plugins/clipboard/config.ts @@ -9,7 +9,6 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; import copyIcon from './icons/copy.svg'; @@ -17,6 +16,8 @@ import cutIcon from './icons/cut.svg'; import pasteIcon from './icons/paste.svg'; import selectAllIcon from './icons/select-all.svg'; +import { Config } from 'jodit/config'; + Config.prototype.controls.cut = { command: 'cut', isDisabled: (editor: IJodit) => editor.s.isCollapsed(), diff --git a/src/plugins/color/color.test.js b/src/plugins/color/color.test.js index d699f356e..7f1117592 100644 --- a/src/plugins/color/color.test.js +++ b/src/plugins/color/color.test.js @@ -6,7 +6,7 @@ ('colorPlugin' in window.skipTest ? describe.skip : describe)( 'Color plugin', function () { - it('Open colorpicker set background and color. After this click in another any place. White when popap will be closed. Open again and remove all styles.', function () { + it('Open colorpicker set background and color. After this, click in another any place. White when popap will be closed. Open again and remove all styles.', function () { const editor = getJodit(); editor.value = 'text2text'; @@ -96,7 +96,7 @@ }); describe('Disable', function () { - it('should open color picker without button - native color picker', function () { + it('should open color picker without a button - native color picker', function () { const editor = getJodit({ showBrowserColorPicker: false }); diff --git a/src/plugins/color/color.ts b/src/plugins/color/color.ts index 64aafcb13..45ceefe2c 100644 --- a/src/plugins/color/color.ts +++ b/src/plugins/color/color.ts @@ -11,8 +11,8 @@ */ import type { IJodit } from 'jodit/types'; -import { normalizeColor } from 'jodit/core/helpers/'; import { pluginSystem } from 'jodit/core/global'; +import { normalizeColor } from 'jodit/core/helpers/'; import './config'; diff --git a/src/plugins/color/config.ts b/src/plugins/color/config.ts index 9540634ab..d965377c1 100644 --- a/src/plugins/color/config.ts +++ b/src/plugins/color/config.ts @@ -9,18 +9,19 @@ */ import type { HTMLTagNames, IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; +import { Dom } from 'jodit/core/dom/dom'; import { css, dataBind } from 'jodit/core/helpers/'; +import { Icon } from 'jodit/core/ui/icon'; import { - type TabOption, ColorPickerWidget, + type TabOption, TabsWidget } from 'jodit/modules/widget'; -import { Icon } from 'jodit/core/ui/icon'; -import { Dom } from 'jodit/core/dom/dom'; import brushIcon from './brush.svg'; +import { Config } from 'jodit/config'; + Icon.set('brush', brushIcon); Config.prototype.controls.brush = { diff --git a/src/plugins/copy-format/copy-format.ts b/src/plugins/copy-format/copy-format.ts index 01c7902f8..a04d9d653 100644 --- a/src/plugins/copy-format/copy-format.ts +++ b/src/plugins/copy-format/copy-format.ts @@ -10,16 +10,17 @@ * @module plugins/clipboard */ -import type { IDictionary, IJodit, IControlType } from 'jodit/types'; -import { Config } from 'jodit/config'; +import type { IControlType, IDictionary, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; -import { css } from 'jodit/core/helpers/utils/css'; import { extendLang, pluginSystem } from 'jodit/core/global'; +import { css } from 'jodit/core/helpers/utils/css'; import { Icon } from 'jodit/core/ui/icon'; import copyFormatIcon from './copy-format.svg'; import * as langs from './langs'; +import { Config } from 'jodit/config'; + const pluginKey = 'copy-format'; /** diff --git a/src/plugins/debug/debug.ts b/src/plugins/debug/debug.ts index 7c1275501..e438dd8da 100644 --- a/src/plugins/debug/debug.ts +++ b/src/plugins/debug/debug.ts @@ -11,12 +11,12 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin/plugin'; +import { INVISIBLE_SPACE_REG_EXP } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; // @ts-ignore import { pluginSystem } from 'jodit/core/global'; -import { Dom } from 'jodit/core/dom/dom'; import { stripTags } from 'jodit/core/helpers/html/strip-tags'; -import { INVISIBLE_SPACE_REG_EXP } from 'jodit/core/constants'; +import { Plugin } from 'jodit/core/plugin/plugin'; export class Debug extends Plugin { protected afterInit(jodit: IJodit): void { diff --git a/src/plugins/delete/delete.ts b/src/plugins/delete/delete.ts index 4267b84b7..bd0b9ab38 100644 --- a/src/plugins/delete/delete.ts +++ b/src/plugins/delete/delete.ts @@ -11,11 +11,11 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; import { Dom } from 'jodit/core/dom'; -import { trim } from 'jodit/core/helpers/string/trim'; import { pluginSystem } from 'jodit/core/global'; import { $$ } from 'jodit/core/helpers'; +import { trim } from 'jodit/core/helpers/string/trim'; +import { Plugin } from 'jodit/core/plugin'; import './interface'; diff --git a/src/plugins/drag-and-drop-element/drag-and-drop-element.ts b/src/plugins/drag-and-drop-element/drag-and-drop-element.ts index 30c82a915..498b4379b 100644 --- a/src/plugins/drag-and-drop-element/drag-and-drop-element.ts +++ b/src/plugins/drag-and-drop-element/drag-and-drop-element.ts @@ -11,11 +11,11 @@ */ import type { IViewComponent, Nullable } from 'jodit/types'; -import { css, ctrlKey, dataBind, splitArray } from 'jodit/core/helpers'; -import { Plugin } from 'jodit/core/plugin'; +import { autobind, throttle } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; import { getContainer, pluginSystem } from 'jodit/core/global'; -import { autobind, throttle } from 'jodit/core/decorators'; +import { css, ctrlKey, dataBind, splitArray } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/drag-and-drop/drag-and-drop.ts b/src/plugins/drag-and-drop/drag-and-drop.ts index eb09254f0..f4aba6f0e 100644 --- a/src/plugins/drag-and-drop/drag-and-drop.ts +++ b/src/plugins/drag-and-drop/drag-and-drop.ts @@ -16,11 +16,11 @@ import type { IPoint, IViewComponent } from 'jodit/types'; import { TEXT_HTML, TEXT_PLAIN } from 'jodit/core/constants'; +import { autobind, throttle } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; +import { pluginSystem } from 'jodit/core/global'; import { attr, ctrlKey, dataBind, getDataTransfer } from 'jodit/core/helpers'; import { Plugin } from 'jodit/core/plugin'; -import { autobind, throttle } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; import { FileBrowserFiles } from 'jodit/modules/file-browser/ui'; /** diff --git a/src/plugins/dtd/config.ts b/src/plugins/dtd/config.ts index 515601b16..50699b53e 100644 --- a/src/plugins/dtd/config.ts +++ b/src/plugins/dtd/config.ts @@ -9,6 +9,7 @@ */ import type { IDictionary } from 'jodit/types'; + import { Config } from 'jodit/config'; declare module 'jodit/config' { diff --git a/src/plugins/dtd/dtd.ts b/src/plugins/dtd/dtd.ts index cf4434d73..5c9527dc0 100644 --- a/src/plugins/dtd/dtd.ts +++ b/src/plugins/dtd/dtd.ts @@ -11,13 +11,14 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { pluginSystem } from 'jodit/core/global'; import { watch } from 'jodit/core/decorators/watch/watch'; +import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; import './config'; -import * as beforeInsertCases from './before-insert'; + import * as afterInsertCases from './after-insert'; +import * as beforeInsertCases from './before-insert'; class dtd extends Plugin { protected afterInit(jodit: IJodit): void {} diff --git a/src/plugins/enter/enter.ts b/src/plugins/enter/enter.ts index 428dcd95b..f4388690d 100644 --- a/src/plugins/enter/enter.ts +++ b/src/plugins/enter/enter.ts @@ -11,25 +11,26 @@ */ import type { IJodit } from 'jodit/types'; -import { Dom } from 'jodit/core/dom/dom'; -import { Plugin } from 'jodit/core/plugin/plugin'; -import { BR, PARAGRAPH, KEY_ENTER } from 'jodit/core/constants'; +import { BR, KEY_ENTER, PARAGRAPH } from 'jodit/core/constants'; import { watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; +import { pluginSystem } from 'jodit/core/global'; import { isBoolean } from 'jodit/core/helpers/checker/is-boolean'; +import { Plugin } from 'jodit/core/plugin/plugin'; + +import './interface'; import { checkBR, checkUnsplittableBox, - processEmptyLILeaf, getBlockWrapper, hasPreviousBlock, insertParagraph, + moveCursorOutFromSpecialTags, + processEmptyLILeaf, splitFragment, - wrapText, - moveCursorOutFromSpecialTags + wrapText } from './helpers'; -import { pluginSystem } from 'jodit/core/global'; -import './interface'; /** * One of most important core plugins. It is responsible for all the browsers to have the same effect when the Enter diff --git a/src/plugins/enter/helpers/check-br.ts b/src/plugins/enter/helpers/check-br.ts index e76abe4bd..b07f845b4 100644 --- a/src/plugins/enter/helpers/check-br.ts +++ b/src/plugins/enter/helpers/check-br.ts @@ -9,9 +9,9 @@ */ import type { IJodit } from 'jodit/types'; +import { BR } from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom/dom'; import { scrollIntoViewIfNeeded } from 'jodit/core/helpers/utils/scroll-into-view'; -import { BR } from 'jodit/core/constants'; /** * Checks the possibility and necessity of inserting a BR instead of a block @@ -28,7 +28,7 @@ export function checkBR( const isBRMode = jodit.o.enter.toLowerCase() === BR.toLowerCase(); - // if use
defaultTag for break line or when was entered SHIFt key or in or or
+ // if you use
defaultTag for break line or when was entered SHIFt key or in or or
if ( isBRMode || (shiftKeyPressed && !isMultiLineBlock) || diff --git a/src/plugins/enter/helpers/index.ts b/src/plugins/enter/helpers/index.ts index ec8f94d19..69a351400 100644 --- a/src/plugins/enter/helpers/index.ts +++ b/src/plugins/enter/helpers/index.ts @@ -10,10 +10,10 @@ export * from './check-br'; export * from './check-unsplittable-box'; -export * from './process-empty-li-leaf'; export * from './get-block-wrapper'; export * from './has-previous-block'; export * from './insert-paragraph'; +export * from './move-cursor-out-from-specal-tags'; +export * from './process-empty-li-leaf'; export * from './split-fragment'; export * from './wrap-text'; -export * from './move-cursor-out-from-specal-tags'; diff --git a/src/plugins/enter/helpers/move-cursor-out-from-specal-tags.ts b/src/plugins/enter/helpers/move-cursor-out-from-specal-tags.ts index eaca78e8b..12ac64719 100644 --- a/src/plugins/enter/helpers/move-cursor-out-from-specal-tags.ts +++ b/src/plugins/enter/helpers/move-cursor-out-from-specal-tags.ts @@ -8,7 +8,7 @@ * @module plugins/enter */ -import type { IJodit, HTMLTagNames } from 'jodit/types'; +import type { HTMLTagNames, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; /** diff --git a/src/plugins/enter/helpers/split-fragment.ts b/src/plugins/enter/helpers/split-fragment.ts index 16dbad830..4dde331d0 100644 --- a/src/plugins/enter/helpers/split-fragment.ts +++ b/src/plugins/enter/helpers/split-fragment.ts @@ -9,8 +9,8 @@ */ import type { IJodit } from 'jodit/types'; -import { scrollIntoViewIfNeeded } from 'jodit/core/helpers/utils/scroll-into-view'; import { Dom } from 'jodit/core/dom/dom'; +import { scrollIntoViewIfNeeded } from 'jodit/core/helpers/utils/scroll-into-view'; import { insertParagraph } from './insert-paragraph'; diff --git a/src/plugins/file/file.ts b/src/plugins/file/file.ts index 9a67971ed..82652155e 100644 --- a/src/plugins/file/file.ts +++ b/src/plugins/file/file.ts @@ -15,10 +15,11 @@ import type { IFileBrowserCallBackData, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom/dom'; -import { FileSelectorWidget } from 'jodit/modules/widget'; import { pluginSystem } from 'jodit/core/global'; +import { FileSelectorWidget } from 'jodit/modules/widget'; + +import { Config } from 'jodit/config'; Config.prototype.controls.file = { popup: (editor: IJodit, current: Node | false, close) => { diff --git a/src/plugins/focus/focus.ts b/src/plugins/focus/focus.ts index 65e592833..b281a1d63 100644 --- a/src/plugins/focus/focus.ts +++ b/src/plugins/focus/focus.ts @@ -11,10 +11,11 @@ */ import type { IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom'; import { pluginSystem } from 'jodit/core/global'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { autofocus: boolean; diff --git a/src/plugins/font/config.ts b/src/plugins/font/config.ts index dd76d47f9..3f64c498f 100644 --- a/src/plugins/font/config.ts +++ b/src/plugins/font/config.ts @@ -9,14 +9,15 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; +import { Dom } from 'jodit/core/dom'; +import { trimChars } from 'jodit/core/helpers/string/trim'; import { css } from 'jodit/core/helpers/utils/css'; import { Icon } from 'jodit/core/ui/icon'; -import fontsizeIcon from './icons/fontsize.svg'; import fontIcon from './icons/font.svg'; -import { Dom } from 'jodit/core/dom'; -import { trimChars } from 'jodit/core/helpers/string/trim'; +import fontsizeIcon from './icons/fontsize.svg'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/plugins/font/font.ts b/src/plugins/font/font.ts index b85cae997..96d62c603 100644 --- a/src/plugins/font/font.ts +++ b/src/plugins/font/font.ts @@ -11,8 +11,8 @@ */ import type { IJodit } from 'jodit/types'; -import { normalizeSize } from 'jodit/core/helpers/'; import { pluginSystem } from 'jodit/core/global'; +import { normalizeSize } from 'jodit/core/helpers/'; import './config'; diff --git a/src/plugins/format-block/CHANGELOG.md b/src/plugins/format-block/CHANGELOG.md index 5cb44c83e..2355eba10 100644 --- a/src/plugins/format-block/CHANGELOG.md +++ b/src/plugins/format-block/CHANGELOG.md @@ -13,4 +13,4 @@ #### :rocket: New Feature -Added PRE tag to the list of items +Added PREtag to the list of items diff --git a/src/plugins/format-block/config.ts b/src/plugins/format-block/config.ts index 3053ae7f4..9fa7912e9 100644 --- a/src/plugins/format-block/config.ts +++ b/src/plugins/format-block/config.ts @@ -9,12 +9,13 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Icon } from 'jodit/core/ui/icon'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom'; +import { Icon } from 'jodit/core/ui/icon'; import paragraphIcon from './paragraph.svg'; +import { Config } from 'jodit/config'; + Icon.set('paragraph', paragraphIcon); Config.prototype.controls.paragraph = { diff --git a/src/plugins/fullsize/config.ts b/src/plugins/fullsize/config.ts index 77d76719b..8a3fcdd83 100644 --- a/src/plugins/fullsize/config.ts +++ b/src/plugins/fullsize/config.ts @@ -8,16 +8,17 @@ * @module plugins/fullsize */ -import './fullsize.less'; - import type { IControlType, IViewBased } from 'jodit/types'; -import { Config } from 'jodit/config'; import * as consts from 'jodit/core/constants'; import { Icon } from 'jodit/core/ui/icon'; import fullsizeIcon from './icons/fullsize.svg'; import shrinkIcon from './icons/shrink.svg'; +import './fullsize.less'; + +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/plugins/fullsize/fullsize.ts b/src/plugins/fullsize/fullsize.ts index f636c9b91..0eed9aef2 100644 --- a/src/plugins/fullsize/fullsize.ts +++ b/src/plugins/fullsize/fullsize.ts @@ -10,15 +10,15 @@ * @module plugins/fullsize */ -import './fullsize.less'; - import type { IViewWithToolbar } from 'jodit/types'; -import { css } from 'jodit/core/helpers/utils/css'; -import { isJoditObject } from 'jodit/core/helpers/checker/is-jodit-object'; import { pluginSystem } from 'jodit/core/global'; +import { isJoditObject } from 'jodit/core/helpers/checker/is-jodit-object'; +import { css } from 'jodit/core/helpers/utils/css'; import './config'; +import './fullsize.less'; + const fullsizeStack = new Set(); /** diff --git a/src/plugins/hotkeys/config.ts b/src/plugins/hotkeys/config.ts index 99879731c..b49de893f 100644 --- a/src/plugins/hotkeys/config.ts +++ b/src/plugins/hotkeys/config.ts @@ -9,6 +9,7 @@ */ import type { IDictionary } from 'jodit/types'; + import { Config } from 'jodit/config'; declare module 'jodit/config' { diff --git a/src/plugins/hotkeys/hotkeys.ts b/src/plugins/hotkeys/hotkeys.ts index eaf266c26..5c6c6572e 100644 --- a/src/plugins/hotkeys/hotkeys.ts +++ b/src/plugins/hotkeys/hotkeys.ts @@ -11,15 +11,15 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; +import { KEY_ESC } from 'jodit/core/constants'; +import { pluginSystem } from 'jodit/core/global'; import { isArray, isString, keys, normalizeKeyAliases } from 'jodit/core/helpers'; -import { KEY_ESC } from 'jodit/core/constants'; -import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/hr/hr.ts b/src/plugins/hr/hr.ts index ddd5e9fdf..f20112f28 100644 --- a/src/plugins/hr/hr.ts +++ b/src/plugins/hr/hr.ts @@ -11,13 +11,14 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom'; import { pluginSystem } from 'jodit/core/global'; import { Icon } from 'jodit/core/ui/icon'; import hrIcon from './hr.svg'; +import { Config } from 'jodit/config'; + Icon.set('hr', hrIcon); Config.prototype.controls.hr = { diff --git a/src/plugins/iframe/iframe.ts b/src/plugins/iframe/iframe.ts index 187d17ca8..77165c759 100644 --- a/src/plugins/iframe/iframe.ts +++ b/src/plugins/iframe/iframe.ts @@ -11,10 +11,10 @@ */ import type { IJodit } from 'jodit/types'; -import { css, defaultLanguage, attr, callPromise } from 'jodit/core/helpers/'; -import { error } from 'jodit/core/helpers'; import { MODE_SOURCE } from 'jodit/core/constants'; import { pluginSystem } from 'jodit/core/global'; +import { error } from 'jodit/core/helpers'; +import { attr, callPromise, css, defaultLanguage } from 'jodit/core/helpers/'; import './config'; diff --git a/src/plugins/image-processor/image-processor.ts b/src/plugins/image-processor/image-processor.ts index 4a758884d..429dda194 100644 --- a/src/plugins/image-processor/image-processor.ts +++ b/src/plugins/image-processor/image-processor.ts @@ -11,11 +11,11 @@ */ import type { IDictionary, IJodit } from 'jodit/types'; -import { $$, dataBind } from 'jodit/core/helpers'; -import { Plugin } from 'jodit/core/plugin'; -import { debounce, watch } from 'jodit/core/decorators'; import { SOURCE_CONSUMER } from 'jodit/core/constants'; +import { debounce, watch } from 'jodit/core/decorators'; import { pluginSystem } from 'jodit/core/global'; +import { $$, dataBind } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/image-properties/image-properties.ts b/src/plugins/image-properties/image-properties.ts index 9a2a5ee85..38598e76c 100644 --- a/src/plugins/image-properties/image-properties.ts +++ b/src/plugins/image-properties/image-properties.ts @@ -10,41 +10,39 @@ * @module plugins/image-properties */ -import './image-properties.less'; - import type { IDialog, IFileBrowserCallBackData, IJodit, ImageHAlign } from 'jodit/types'; - -import { Dom, Popup, Icon, Plugin } from 'jodit/modules'; - +import { autobind, watch } from 'jodit/core/decorators'; +import { pluginSystem } from 'jodit/core/global'; import { - css, - trim, attr, - position, + css, + hAlignElement, isArray, - markOwner, + isNumeric, isString, - refs, kebabCase, - isNumeric, - hAlignElement + markOwner, + position, + refs, + trim } from 'jodit/core/helpers'; -import { FileSelectorWidget, TabsWidget } from 'jodit/modules/widget'; import { Button } from 'jodit/core/ui/button'; -import { watch, autobind } from 'jodit/core/decorators'; +import { Dom, Icon, Plugin, Popup } from 'jodit/modules'; import { openImageEditor } from 'jodit/modules/image-editor/image-editor'; -import { pluginSystem } from 'jodit/core/global'; +import { FileSelectorWidget, TabsWidget } from 'jodit/modules/widget'; + +import './config'; import { form } from './templates/form'; import { mainTab } from './templates/main-tab'; import { positionTab } from './templates/position-tab'; -import './config'; +import './image-properties.less'; /** * Plug-in for image editing window diff --git a/src/plugins/image/image.ts b/src/plugins/image/image.ts index f08939f01..f6867b516 100644 --- a/src/plugins/image/image.ts +++ b/src/plugins/image/image.ts @@ -16,14 +16,15 @@ import type { IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom'; -import { $$ } from 'jodit/core/helpers'; -import { FileSelectorWidget } from 'jodit/modules/widget'; -import { Config } from 'jodit/config'; import { pluginSystem } from 'jodit/core/global'; +import { $$ } from 'jodit/core/helpers'; import { Icon } from 'jodit/core/ui/icon'; +import { FileSelectorWidget } from 'jodit/modules/widget'; import imageIcon from './image.svg'; +import { Config } from 'jodit/config'; + Icon.set('image', imageIcon); Config.prototype.controls.image = { diff --git a/src/plugins/indent/config.ts b/src/plugins/indent/config.ts index 35da32f5a..42e990650 100644 --- a/src/plugins/indent/config.ts +++ b/src/plugins/indent/config.ts @@ -9,14 +9,14 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom'; import { Icon } from 'jodit/core/ui/icon'; -import { getKey } from './helpers'; - import indentIcon from './icons/indent.svg'; import outdentIcon from './icons/outdent.svg'; +import { getKey } from './helpers'; + +import { Config } from 'jodit/config'; Icon.set('indent', indentIcon).set('outdent', outdentIcon); diff --git a/src/plugins/indent/indent.ts b/src/plugins/indent/indent.ts index f3b4cc9d8..73aeed2b8 100644 --- a/src/plugins/indent/indent.ts +++ b/src/plugins/indent/indent.ts @@ -13,10 +13,11 @@ import type { IJodit } from 'jodit/types'; import { BR, PARAGRAPH } from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom'; -import { attr } from 'jodit/core/helpers'; import { pluginSystem } from 'jodit/core/global'; +import { attr } from 'jodit/core/helpers'; import './config'; + import { getKey } from './helpers'; /** diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 74f97ad95..0237b7c5e 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -72,7 +72,6 @@ import 'jodit/plugins/video/video'; import 'jodit/plugins/wrap-nodes/wrap-nodes'; import 'jodit/plugins/dtd/dtd'; import 'jodit/plugins/xpath/xpath'; - // JODIT-SECTION-START:FAT import 'jodit/plugins/speech-recognize/speech-recognize'; // JODIT-SECTION-END:FAT diff --git a/src/plugins/inline-popup/config/config.ts b/src/plugins/inline-popup/config/config.ts index f0cb17df4..197cfbc17 100644 --- a/src/plugins/inline-popup/config/config.ts +++ b/src/plugins/inline-popup/config/config.ts @@ -9,25 +9,23 @@ */ import type { IControlType, IDictionary, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; +import a from './items/a'; +import cells from './items/cells'; +import jodit from './items/iframe'; +import img from './items/img'; +import toolbar from './items/toolbar'; + +import { Config } from 'jodit/config'; import * as addcolumn from 'jodit/plugins/inline-popup/icons/addcolumn.svg'; import * as addrow from 'jodit/plugins/inline-popup/icons/addrow.svg'; import * as merge from 'jodit/plugins/inline-popup/icons/merge.svg'; -import * as th from 'jodit/plugins/inline-popup/icons/th.svg'; import * as splitg from 'jodit/plugins/inline-popup/icons/splitg.svg'; import * as splitv from 'jodit/plugins/inline-popup/icons/splitv.svg'; +import * as th from 'jodit/plugins/inline-popup/icons/th.svg'; import * as thList from 'jodit/plugins/inline-popup/icons/th-list.svg'; -import a from './items/a'; -import img from './items/img'; -import cells from './items/cells'; -import toolbar from './items/toolbar'; -import jodit from './items/iframe'; -import iframe from './items/iframe'; -import joditMedia from './items/iframe'; - declare module 'jodit/config' { interface Config { popup: IDictionary< @@ -65,8 +63,8 @@ Config.prototype.popup = { cells, toolbar, jodit, - iframe, - 'jodit-media': joditMedia, + iframe: jodit, + 'jodit-media': jodit, selection: [ 'bold', 'underline', diff --git a/src/plugins/inline-popup/config/items/iframe.ts b/src/plugins/inline-popup/config/items/iframe.ts index 4e826fccd..d33af985a 100644 --- a/src/plugins/inline-popup/config/items/iframe.ts +++ b/src/plugins/inline-popup/config/items/iframe.ts @@ -8,6 +8,7 @@ * @module plugins/inline-popup */ import type { IJodit } from 'jodit/types'; + import { align } from './img'; export default [ diff --git a/src/plugins/inline-popup/config/items/img.ts b/src/plugins/inline-popup/config/items/img.ts index 6775b46d9..dcba5f3b4 100644 --- a/src/plugins/inline-popup/config/items/img.ts +++ b/src/plugins/inline-popup/config/items/img.ts @@ -16,8 +16,8 @@ import type { } from 'jodit/types'; import { Dom } from 'jodit/core/dom'; import { isString } from 'jodit/core/helpers/checker/is-string'; -import { css } from 'jodit/core/helpers/utils/css'; import { hAlignElement } from 'jodit/core/helpers/utils/align'; +import { css } from 'jodit/core/helpers/utils/css'; export const align: IControlType = { name: 'left', diff --git a/src/plugins/inline-popup/inline-popup.ts b/src/plugins/inline-popup/inline-popup.ts index e6c2ae863..60d3b18d0 100644 --- a/src/plugins/inline-popup/inline-popup.ts +++ b/src/plugins/inline-popup/inline-popup.ts @@ -10,8 +10,6 @@ * @module plugins/inline-popup */ -import './inline-popup.less'; - import type { Buttons, HTMLTagNames, @@ -22,27 +20,29 @@ import type { IViewComponent, Nullable } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { makeCollection } from 'jodit/modules/toolbar/factory'; -import { Popup } from 'jodit/core/ui/popup'; +import type { Table } from 'jodit/modules/table/table'; +import { autobind, cache, debounce, wait, watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom'; +import { pluginSystem } from 'jodit/core/global'; import { - splitArray, - isString, - position, + camelCase, isArray, isFunction, - toArray, + isString, keys, - camelCase + position, + splitArray, + toArray } from 'jodit/core/helpers'; -import { Dom } from 'jodit/core/dom'; +import { Plugin } from 'jodit/core/plugin'; import { UIElement } from 'jodit/core/ui'; -import type { Table } from 'jodit/modules/table/table'; -import { debounce, wait, autobind, watch, cache } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; +import { Popup } from 'jodit/core/ui/popup'; +import { makeCollection } from 'jodit/modules/toolbar/factory'; import './config/config'; +import './inline-popup.less'; + /** * Plugin for show inline popup dialog */ diff --git a/src/plugins/justify/justify.ts b/src/plugins/justify/justify.ts index 3152c98b0..464aedde3 100644 --- a/src/plugins/justify/justify.ts +++ b/src/plugins/justify/justify.ts @@ -10,16 +10,17 @@ * @module plugins/justify */ -import type { IJodit, IControlType } from 'jodit/types'; -import { Config } from 'jodit/config'; +import type { IControlType, IJodit } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; -import { css } from 'jodit/core/helpers/utils/css'; -import { alignElement } from 'jodit/core/helpers/utils/align'; import { pluginSystem } from 'jodit/core/global'; +import { alignElement } from 'jodit/core/helpers/utils/align'; +import { css } from 'jodit/core/helpers/utils/css'; import { Icon } from 'jodit/core/ui/icon'; import justifyIcon from './justify.svg'; +import { Config } from 'jodit/config'; + Icon.set('justify', justifyIcon); Config.prototype.controls.align = { diff --git a/src/plugins/key-arrow-outside/key-arrow-outside.ts b/src/plugins/key-arrow-outside/key-arrow-outside.ts index b7d37f29f..6bfc4abc8 100644 --- a/src/plugins/key-arrow-outside/key-arrow-outside.ts +++ b/src/plugins/key-arrow-outside/key-arrow-outside.ts @@ -11,11 +11,11 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { watch } from 'jodit/core/decorators'; import { KEY_RIGHT, NBSP_SPACE } from 'jodit/core/constants'; +import { watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; /** * Allowing to go outside of an inline element if there is no other element after that. diff --git a/src/plugins/limit/limit.test.js b/src/plugins/limit/limit.test.js index 6b89bfa8e..2422ad8a2 100644 --- a/src/plugins/limit/limit.test.js +++ b/src/plugins/limit/limit.test.js @@ -59,7 +59,7 @@ describe('Limit plugin', function () { }); }); - it('should allow press them', done => { + it('should allow to press them', done => { const editor = getJodit({ limitChars: 5 }); @@ -148,7 +148,7 @@ describe('Limit plugin', function () { }); describe('Paste', function () { - describe('When editor already full', function () { + describe('When editor already fulls', function () { it('should deny insert any chars', function (done) { const editor = getJodit({ limitChars: 5, @@ -204,7 +204,7 @@ describe('Limit plugin', function () { describe('Limit words', function () { describe('Paste', function () { - describe('When editor already full', function () { + describe('When editor already fulls', function () { it('should deny insert any chars', function (done) { const editor = getJodit({ limitWords: 3, diff --git a/src/plugins/limit/limit.ts b/src/plugins/limit/limit.ts index 9609aac2a..b5a1cefac 100644 --- a/src/plugins/limit/limit.ts +++ b/src/plugins/limit/limit.ts @@ -11,7 +11,6 @@ */ import type { IJodit, SnapshotType } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; import { COMMAND_KEYS, INVISIBLE_SPACE_REG_EXP, @@ -19,6 +18,7 @@ import { } from 'jodit/core/constants'; import { autobind } from 'jodit/core/decorators'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/line-height/config.ts b/src/plugins/line-height/config.ts index e9f4519b9..83d7966bf 100644 --- a/src/plugins/line-height/config.ts +++ b/src/plugins/line-height/config.ts @@ -9,12 +9,13 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { memorizeExec } from 'jodit/core/helpers'; import { Icon } from 'jodit/core/ui/icon'; import lineHeightIcon from './line-height.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/plugins/line-height/line-height.ts b/src/plugins/line-height/line-height.ts index 43d6f1774..73c693181 100644 --- a/src/plugins/line-height/line-height.ts +++ b/src/plugins/line-height/line-height.ts @@ -11,16 +11,16 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; - -import { css } from 'jodit/core/helpers'; import { autobind } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; import { extendLang, pluginSystem } from 'jodit/core/global'; +import { css } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; -import * as langs from './langs'; import './config'; +import * as langs from './langs'; + export class lineHeight extends Plugin { override buttons: Plugin['buttons'] = [ { diff --git a/src/plugins/link/config.ts b/src/plugins/link/config.ts index 8541228ab..5f6e0421a 100644 --- a/src/plugins/link/config.ts +++ b/src/plugins/link/config.ts @@ -8,14 +8,15 @@ * @module plugins/link */ -import type { IControlType, IJodit, IUIOption, IUIForm } from 'jodit/types'; -import { Config } from 'jodit/config'; -import { formTemplate } from './template'; +import type { IControlType, IJodit, IUIForm, IUIOption } from 'jodit/types'; import { Dom } from 'jodit/core/dom/dom'; import { Icon } from 'jodit/core/ui/icon'; import linkIcon from './icons/link.svg'; import unlinkIcon from './icons/unlink.svg'; +import { formTemplate } from './template'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/plugins/link/link.ts b/src/plugins/link/link.ts index 8e473ec5f..349003ff9 100644 --- a/src/plugins/link/link.ts +++ b/src/plugins/link/link.ts @@ -12,7 +12,9 @@ import type { IDictionary, IJodit, IUIForm, Nullable } from 'jodit/types'; import type { UIForm } from 'jodit/core/ui/form/form'; +import { autobind } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; +import { pluginSystem } from 'jodit/core/global'; import { attr, convertMediaUrlToVideoEmbed, @@ -22,8 +24,6 @@ import { stripTags } from 'jodit/core/helpers'; import { Plugin } from 'jodit/core/plugin'; -import { autobind } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; import './config'; diff --git a/src/plugins/link/template.ts b/src/plugins/link/template.ts index 2c93ac666..a11439c1a 100644 --- a/src/plugins/link/template.ts +++ b/src/plugins/link/template.ts @@ -9,6 +9,7 @@ */ import type { IJodit, IUIElement, IUIForm, Nullable } from 'jodit/types'; +import { UIButton } from 'jodit/core/ui/button'; import { UIBlock, UICheckbox, @@ -16,7 +17,6 @@ import { UIInput, UISelect } from 'jodit/core/ui/form'; -import { UIButton } from 'jodit/core/ui/button'; export const formTemplate = (editor: IJodit): IUIForm => { const { diff --git a/src/plugins/media/media.ts b/src/plugins/media/media.ts index ff5209624..13d5607c0 100644 --- a/src/plugins/media/media.ts +++ b/src/plugins/media/media.ts @@ -12,8 +12,8 @@ import type { IJodit } from 'jodit/types'; import * as consts from 'jodit/core/constants'; -import { $$, attr, dataBind } from 'jodit/core/helpers/utils'; import { pluginSystem } from 'jodit/core/global'; +import { $$, attr, dataBind } from 'jodit/core/helpers/utils'; import './config'; diff --git a/src/plugins/mobile/config.ts b/src/plugins/mobile/config.ts index 168337107..1ad7278df 100644 --- a/src/plugins/mobile/config.ts +++ b/src/plugins/mobile/config.ts @@ -8,8 +8,6 @@ * @module plugins/mobile */ -import { Config } from 'jodit/config'; -import * as consts from 'jodit/core/constants'; import type { ButtonsOption, CanUndef, @@ -17,9 +15,12 @@ import type { IJodit, IToolbarCollection } from 'jodit/types'; -import { makeCollection } from 'jodit/modules/toolbar/factory'; +import * as consts from 'jodit/core/constants'; import { splitArray } from 'jodit/core/helpers'; import { ToolbarCollection } from 'jodit/modules/toolbar/collection/collection'; +import { makeCollection } from 'jodit/modules/toolbar/factory'; + +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/plugins/mobile/mobile.ts b/src/plugins/mobile/mobile.ts index b1b823b94..6ac601eb8 100644 --- a/src/plugins/mobile/mobile.ts +++ b/src/plugins/mobile/mobile.ts @@ -10,10 +10,10 @@ * @module plugins/mobile */ -import type { IToolbarCollection, IJodit, ButtonsGroups } from 'jodit/types'; +import type { ButtonsGroups, IJodit, IToolbarCollection } from 'jodit/types'; +import { pluginSystem } from 'jodit/core/global'; import { splitArray, toArray } from 'jodit/core/helpers/'; import { flatButtonsSet } from 'jodit/core/ui/helpers/buttons'; -import { pluginSystem } from 'jodit/core/global'; import './config'; diff --git a/src/plugins/ordered-list/config.ts b/src/plugins/ordered-list/config.ts index 925c7d325..18572a637 100644 --- a/src/plugins/ordered-list/config.ts +++ b/src/plugins/ordered-list/config.ts @@ -9,13 +9,14 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { dataBind } from 'jodit/core/helpers/utils/data-bind'; import { Icon } from 'jodit/core/ui/icon'; import olIcon from './icons/ol.svg'; import ulIcon from './icons/ul.svg'; +import { Config } from 'jodit/config'; + const memoExec: IControlType['exec'] = ( jodit, _, diff --git a/src/plugins/ordered-list/ordered-list.ts b/src/plugins/ordered-list/ordered-list.ts index 230ea9931..8d6ea9292 100644 --- a/src/plugins/ordered-list/ordered-list.ts +++ b/src/plugins/ordered-list/ordered-list.ts @@ -11,9 +11,9 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; import { autobind } from 'jodit/core/decorators'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/paste-from-word/config.ts b/src/plugins/paste-from-word/config.ts index 56d5fd72c..996a14862 100644 --- a/src/plugins/paste-from-word/config.ts +++ b/src/plugins/paste-from-word/config.ts @@ -9,13 +9,14 @@ */ import type { InsertMode, IUIOption } from 'jodit/types'; -import { Config } from 'jodit/config'; import { INSERT_AS_HTML, INSERT_AS_TEXT, INSERT_ONLY_TEXT } from 'jodit/core/constants'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/plugins/paste-from-word/paste-from-word.ts b/src/plugins/paste-from-word/paste-from-word.ts index 81cfa3ea3..1a6a843cb 100644 --- a/src/plugins/paste-from-word/paste-from-word.ts +++ b/src/plugins/paste-from-word/paste-from-word.ts @@ -11,7 +11,14 @@ */ import type { IJodit, InsertMode } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; +import type { PastedData, PasteEvent } from 'jodit/plugins/paste/interface'; +import { + INSERT_AS_HTML, + INSERT_AS_TEXT, + INSERT_ONLY_TEXT +} from 'jodit/core/constants'; +import { watch } from 'jodit/core/decorators'; +import { pluginSystem } from 'jodit/core/global'; import { applyStyles, cleanFromWord, @@ -19,21 +26,14 @@ import { isString, stripTags } from 'jodit/core/helpers'; -import { - INSERT_AS_HTML, - INSERT_AS_TEXT, - INSERT_ONLY_TEXT -} from 'jodit/core/constants'; -import { watch } from 'jodit/core/decorators'; +import { Plugin } from 'jodit/core/plugin'; + +import './config'; -import type { PastedData, PasteEvent } from 'jodit/plugins/paste/interface'; import { askInsertTypeDialog, pasteInsertHtml } from 'jodit/plugins/paste/helpers'; -import { pluginSystem } from 'jodit/core/global'; - -import './config'; export class pasteFromWord extends Plugin { static override requires = ['paste']; diff --git a/src/plugins/paste-storage/paste-storage.ts b/src/plugins/paste-storage/paste-storage.ts index 8a4bd9988..594295672 100644 --- a/src/plugins/paste-storage/paste-storage.ts +++ b/src/plugins/paste-storage/paste-storage.ts @@ -10,8 +10,6 @@ * @module plugins/paste-storage */ -import './paste-storage.less'; - import type { IDialog } from 'jodit/types'; import { KEY_DOWN, @@ -19,11 +17,13 @@ import { KEY_UP, SPACE_REG_EXP } from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin/plugin'; import { Dom } from 'jodit/core/dom/dom'; +import { pluginSystem } from 'jodit/core/global'; import { attr, toArray } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin/plugin'; import { Button } from 'jodit/core/ui/button/button/button'; -import { pluginSystem } from 'jodit/core/global'; + +import './paste-storage.less'; /** * Show dialog choose content to paste diff --git a/src/plugins/paste/config.ts b/src/plugins/paste/config.ts index 771175b6f..c9baf5fd7 100644 --- a/src/plugins/paste/config.ts +++ b/src/plugins/paste/config.ts @@ -22,10 +22,11 @@ import { IS_PROD, TEXT_PLAIN } from 'jodit/core/constants'; -import { Config } from 'jodit/config'; import { pasteInsertHtml } from './helpers'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** @@ -109,6 +110,7 @@ Config.prototype.controls.paste = { error = false; } catch (e) { if (!IS_PROD) { + // eslint-disable-next-line no-console console.log(e); } } @@ -119,6 +121,7 @@ Config.prototype.controls.paste = { error = false; } catch (e) { if (!IS_PROD) { + // eslint-disable-next-line no-console console.log(e); } } diff --git a/src/plugins/paste/helpers.ts b/src/plugins/paste/helpers.ts index 08ad27ef6..82c3f1276 100644 --- a/src/plugins/paste/helpers.ts +++ b/src/plugins/paste/helpers.ts @@ -15,15 +15,14 @@ import type { IUIOption, Nullable } from 'jodit/types'; +import { TEXT_PLAIN } from 'jodit/core/constants'; +import { Dom } from 'jodit/core/dom/dom'; import { isArray, isNumber, isString, isVoid } from 'jodit/core/helpers/checker'; -import { Dom } from 'jodit/core/dom/dom'; - -import { TEXT_PLAIN } from 'jodit/core/constants'; import { Button } from 'jodit/core/ui/button/button/button'; import type { PasteEvent } from './interface'; diff --git a/src/plugins/paste/paste.ts b/src/plugins/paste/paste.ts index 56585548d..f9490d2c3 100644 --- a/src/plugins/paste/paste.ts +++ b/src/plugins/paste/paste.ts @@ -11,8 +11,6 @@ */ import type { IJodit, InsertMode } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin/plugin'; - import { CLIPBOARD_ID, INSERT_AS_TEXT, @@ -22,28 +20,27 @@ import { TEXT_PLAIN, TEXT_RTF } from 'jodit/core/constants'; -import { Dom } from 'jodit/core/dom/dom'; import { autobind } from 'jodit/core/decorators'; - +import { Dom } from 'jodit/core/dom/dom'; +import { pluginSystem } from 'jodit/core/global'; import { - isHTML, - isString, - trim, cleanFromWord, + getDataTransfer, htmlspecialchars, + isHTML, + isString, LimitedStack, nl2br, stripTags, - getDataTransfer + trim } from 'jodit/core/helpers'; -import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin/plugin'; -import { askInsertTypeDialog, getAllTypes, pasteInsertHtml } from './helpers'; +import './config'; +import { askInsertTypeDialog, getAllTypes, pasteInsertHtml } from './helpers'; import type { PastedValue, PasteEvent } from './interface'; -import './config'; - /** * Ask before paste HTML source */ diff --git a/src/plugins/placeholder/placeholder.ts b/src/plugins/placeholder/placeholder.ts index 52543e5be..88053e5a2 100644 --- a/src/plugins/placeholder/placeholder.ts +++ b/src/plugins/placeholder/placeholder.ts @@ -10,21 +10,21 @@ * @module plugins/placeholder */ -import './placeholder.less'; - -import type { IJodit, HTMLTagNames } from 'jodit/types'; +import type { HTMLTagNames, IJodit } from 'jodit/types'; import * as consts from 'jodit/core/constants'; -import { attr } from 'jodit/core/helpers/utils/attr'; -import { css } from 'jodit/core/helpers/utils/css'; -import { isMarker } from 'jodit/core/helpers/checker/is-marker'; -import { Dom } from 'jodit/core/dom/dom'; -import { Plugin } from 'jodit/core/plugin/plugin'; import { INSEPARABLE_TAGS } from 'jodit/core/constants'; import { debounce } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { isMarker } from 'jodit/core/helpers/checker/is-marker'; +import { attr } from 'jodit/core/helpers/utils/attr'; +import { css } from 'jodit/core/helpers/utils/css'; +import { Plugin } from 'jodit/core/plugin/plugin'; import './config'; +import './placeholder.less'; + /** * Check if root node is empty * @private diff --git a/src/plugins/preview/preview.ts b/src/plugins/preview/preview.ts index d46c266a9..456865ffe 100644 --- a/src/plugins/preview/preview.ts +++ b/src/plugins/preview/preview.ts @@ -10,12 +10,13 @@ * @module plugins/preview */ -import './preview.less'; - import type { IControlType, IJodit } from 'jodit/types'; import { MODE_SOURCE, MODE_WYSIWYG } from 'jodit/core/constants'; -import { previewBox } from 'jodit/core/helpers/utils/print'; import { pluginSystem } from 'jodit/core/global'; +import { previewBox } from 'jodit/core/helpers/utils/print'; + +import './preview.less'; + import { Config } from 'jodit/config'; Config.prototype.controls.preview = { diff --git a/src/plugins/print/lib/generate-critical-css.ts b/src/plugins/print/lib/generate-critical-css.ts index 3274bc2fe..d6593ee3c 100644 --- a/src/plugins/print/lib/generate-critical-css.ts +++ b/src/plugins/print/lib/generate-critical-css.ts @@ -8,7 +8,7 @@ * @module plugins/print */ -import type { IJodit, IDictionary } from 'jodit/types'; +import type { IDictionary, IJodit } from 'jodit/types'; import { toArray } from 'jodit/core/helpers/array/to-array'; /** diff --git a/src/plugins/print/print.ts b/src/plugins/print/print.ts index 97976a757..078299fe7 100644 --- a/src/plugins/print/print.ts +++ b/src/plugins/print/print.ts @@ -11,18 +11,18 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; -import { getContainer } from 'jodit/core/global'; +import * as consts from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom'; +import { getContainer, pluginSystem } from 'jodit/core/global'; import { defaultLanguage } from 'jodit/core/helpers/utils/default-language'; -import * as consts from 'jodit/core/constants'; -import { pluginSystem } from 'jodit/core/global'; -import { Icon } from 'jodit/core/ui/icon'; import { previewBox } from 'jodit/core/helpers/utils/print'; +import { Icon } from 'jodit/core/ui/icon'; import { generateCriticalCSS } from './lib/generate-critical-css'; import printIcon from './print.svg'; +import { Config } from 'jodit/config'; + Icon.set('print', printIcon); Config.prototype.controls.print = { diff --git a/src/plugins/redo-undo/redo-undo.ts b/src/plugins/redo-undo/redo-undo.ts index 8ef3eb657..3ef3a1150 100644 --- a/src/plugins/redo-undo/redo-undo.ts +++ b/src/plugins/redo-undo/redo-undo.ts @@ -11,15 +11,16 @@ */ import type { IControlType, IJodit, IPlugin } from 'jodit/types'; -import { Config } from 'jodit/config'; import * as consts from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin/plugin'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin/plugin'; import { Icon } from 'jodit/core/ui/icon'; import redoIcon from './icons/redo.svg'; import undoIcon from './icons/undo.svg'; +import { Config } from 'jodit/config'; + Icon.set('redo', redoIcon).set('undo', undoIcon); Config.prototype.controls.redo = { diff --git a/src/plugins/resize-cells/resize-cells.ts b/src/plugins/resize-cells/resize-cells.ts index a1d487e4b..ca4b8b9a4 100644 --- a/src/plugins/resize-cells/resize-cells.ts +++ b/src/plugins/resize-cells/resize-cells.ts @@ -10,11 +10,11 @@ * @module plugins/resize-cells */ -import './resize-cells.less'; - import type { IBound, IJodit } from 'jodit/types'; import * as consts from 'jodit/core/constants'; -import { Plugin, Table } from 'jodit/modules'; +import { autobind } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; +import { pluginSystem } from 'jodit/core/global'; import { $$, call, @@ -22,12 +22,12 @@ import { getContentWidth, offset } from 'jodit/core/helpers'; -import { autobind } from 'jodit/core/decorators'; -import { Dom } from 'jodit/core/dom/dom'; -import { pluginSystem } from 'jodit/core/global'; +import { Plugin, Table } from 'jodit/modules'; import './config'; +import './resize-cells.less'; + const key = 'table_processor_observer-resize'; /** diff --git a/src/plugins/resize-handler/README.md b/src/plugins/resize-handler/README.md index 461676f35..0a34de953 100644 --- a/src/plugins/resize-handler/README.md +++ b/src/plugins/resize-handler/README.md @@ -1,6 +1,6 @@ # Resize editor handle -If editor has a fixed height, it adds a special button in right-bottom corner to resize the editor itself. +If the editor has a fixed height, it adds a special button in a right-bottom corner to resize the editor itself. ```js Jodit.make('#editor', { diff --git a/src/plugins/resize-handler/resize-handler.ts b/src/plugins/resize-handler/resize-handler.ts index 5dc4a33b5..ddad3b29a 100644 --- a/src/plugins/resize-handler/resize-handler.ts +++ b/src/plugins/resize-handler/resize-handler.ts @@ -11,11 +11,11 @@ */ import type { IJodit, IPointBound } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { Dom } from 'jodit/core/dom'; import { autobind } from 'jodit/core/decorators'; -import { Icon } from 'jodit/core/ui'; +import { Dom } from 'jodit/core/dom'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; +import { Icon } from 'jodit/core/ui'; import './config'; diff --git a/src/plugins/resizer/config.ts b/src/plugins/resizer/config.ts index ef90d26f9..d16da474a 100644 --- a/src/plugins/resizer/config.ts +++ b/src/plugins/resizer/config.ts @@ -9,6 +9,7 @@ */ import type { HTMLTagNames } from 'jodit/types'; + import { Config } from 'jodit/config'; declare module 'jodit/config' { diff --git a/src/plugins/resizer/resizer.ts b/src/plugins/resizer/resizer.ts index 618cb530a..ec270a3c8 100644 --- a/src/plugins/resizer/resizer.ts +++ b/src/plugins/resizer/resizer.ts @@ -10,29 +10,27 @@ * @module plugins/resizer */ -import './resizer.less'; - -import type { HTMLTagNames, IBound, Nullable } from 'jodit/types'; -import type { IJodit } from 'jodit/types'; +import type { HTMLTagNames, IBound, IJodit, Nullable } from 'jodit/types'; import * as consts from 'jodit/core/constants'; import { IS_ES_NEXT, IS_IE, KEY_ALT } from 'jodit/core/constants'; +import { autobind, watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom/dom'; +import { eventEmitter, pluginSystem } from 'jodit/core/global'; import { $$, attr, css, - offset, + dataBind, innerWidth, markOwner, - dataBind + offset } from 'jodit/core/helpers'; import { Plugin } from 'jodit/core/plugin/plugin'; -import { eventEmitter } from 'jodit/core/global'; -import { autobind, watch } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; import './config'; +import './resizer.less'; + const keyBInd = '__jodit-resizer_binded'; /** diff --git a/src/plugins/search/config.ts b/src/plugins/search/config.ts index 2da177588..8f9a85abd 100644 --- a/src/plugins/search/config.ts +++ b/src/plugins/search/config.ts @@ -9,12 +9,13 @@ */ import type { FuzzySearch, IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; +import './interface'; + import searchIcon from './search.svg'; -import './interface'; +import { Config } from 'jodit/config'; declare module 'jodit/config' { interface Config { diff --git a/src/plugins/search/helpers/index.ts b/src/plugins/search/helpers/index.ts index 0415499bf..e785b34d0 100644 --- a/src/plugins/search/helpers/index.ts +++ b/src/plugins/search/helpers/index.ts @@ -8,5 +8,5 @@ * @module plugins/search */ -export * from './sentence-finder'; export * from './highlight-text-ranges'; +export * from './sentence-finder'; diff --git a/src/plugins/search/search.ts b/src/plugins/search/search.ts index c72248d92..bd29d71da 100644 --- a/src/plugins/search/search.ts +++ b/src/plugins/search/search.ts @@ -11,31 +11,32 @@ */ import type { - ISelectionRange, + CanUndef, + IDictionary, IJodit, - Nullable, IPlugin, - IDictionary, - CanUndef, + ISelectionRange, + Nullable, RejectablePromise } from 'jodit/types'; -import { Dom, LazyWalker } from 'jodit/core/dom'; -import { Plugin } from 'jodit/core/plugin'; +import { IS_PROD } from 'jodit/core/constants'; import { autobind, cache, watch } from 'jodit/core/decorators'; -import { UISearch } from 'jodit/plugins/search/ui/search'; -import { scrollIntoViewIfNeeded } from 'jodit/core/helpers'; +import { Dom, LazyWalker } from 'jodit/core/dom'; import { pluginSystem } from 'jodit/core/global'; +import { scrollIntoViewIfNeeded } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; + +import './config'; import { clearSelectionWrappers, clearSelectionWrappersFromHTML, getSelectionWrappers, - SentenceFinder, - highlightTextRanges + highlightTextRanges, + SentenceFinder } from './helpers'; -import './config'; -import { IS_PROD } from 'jodit/core/constants'; +import { UISearch } from 'jodit/plugins/search/ui/search'; /** * Search plugin. it is used for custom search in text diff --git a/src/plugins/search/ui/search.less b/src/plugins/search/ui/search.less index 368d9c76a..e111be3a6 100644 --- a/src/plugins/search/ui/search.less +++ b/src/plugins/search/ui/search.less @@ -151,7 +151,8 @@ } } - ::highlight(jodit-search-result), [jd-tmp-selection] { +::highlight(jodit-search-result), +[jd-tmp-selection] { background-color: var(--color-background-selection); color: var(--color-text-selection); } diff --git a/src/plugins/search/ui/search.ts b/src/plugins/search/ui/search.ts index e262c1618..76d5ad93a 100644 --- a/src/plugins/search/ui/search.ts +++ b/src/plugins/search/ui/search.ts @@ -8,15 +8,15 @@ * @module plugins/search */ -import './search.less'; - import type { IJodit, MarkerInfo, Nullable } from 'jodit/types'; -import { Icon, UIElement } from 'jodit/core/ui'; -import { css, position, refs, trim } from 'jodit/core/helpers'; import { MODE_WYSIWYG } from 'jodit/core/constants'; import * as consts from 'jodit/core/constants'; import { autobind, component, watch } from 'jodit/core/decorators'; import { Dom } from 'jodit/core/dom'; +import { css, position, refs, trim } from 'jodit/core/helpers'; +import { Icon, UIElement } from 'jodit/core/ui'; + +import './search.less'; @component export class UISearch extends UIElement { diff --git a/src/plugins/select-cells/select-cells.ts b/src/plugins/select-cells/select-cells.ts index 46f7650d1..de51a02d2 100644 --- a/src/plugins/select-cells/select-cells.ts +++ b/src/plugins/select-cells/select-cells.ts @@ -11,13 +11,13 @@ */ import type { IBound, IJodit, Nullable } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { Table } from 'jodit/modules/table/table'; -import { Dom } from 'jodit/core/dom/dom'; -import { $$, alignElement, position } from 'jodit/core/helpers'; import { KEY_TAB } from 'jodit/core/constants'; import { autobind, watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { $$, alignElement, position } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; +import { Table } from 'jodit/modules/table/table'; import './config'; diff --git a/src/plugins/select/select.ts b/src/plugins/select/select.ts index e88177db3..fd9ee2bf7 100644 --- a/src/plugins/select/select.ts +++ b/src/plugins/select/select.ts @@ -11,12 +11,12 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; import { autobind, watch } from 'jodit/core/decorators'; -import { camelCase } from 'jodit/core/helpers/string/camel-case'; import { Dom } from 'jodit/core/dom/dom'; -import { Popup, UIElement } from 'jodit/core/ui'; import { pluginSystem } from 'jodit/core/global'; +import { camelCase } from 'jodit/core/helpers/string/camel-case'; +import { Plugin } from 'jodit/core/plugin'; +import { Popup, UIElement } from 'jodit/core/ui'; import './config'; diff --git a/src/plugins/size/config.ts b/src/plugins/size/config.ts index e5e26a22e..93f5a1317 100644 --- a/src/plugins/size/config.ts +++ b/src/plugins/size/config.ts @@ -44,6 +44,6 @@ Config.prototype.minHeight = 200; Config.prototype.maxHeight = 'auto'; /** - * if set true and height !== auto then after reload editor will be have latest height + * if set true and height !== auto then after reload editor will have the latest height */ Config.prototype.saveHeightInStorage = false; diff --git a/src/plugins/size/size.ts b/src/plugins/size/size.ts index 7f989accb..7910a1507 100644 --- a/src/plugins/size/size.ts +++ b/src/plugins/size/size.ts @@ -10,17 +10,17 @@ * @module plugins/size */ -import './size.less'; - import type { IJodit } from 'jodit/types'; +import { autobind, throttle } from 'jodit/core/decorators'; +import { pluginSystem } from 'jodit/core/global'; import { isNumber } from 'jodit/core/helpers/checker/is-number'; import { css } from 'jodit/core/helpers/utils/css'; import { Plugin } from 'jodit/core/plugin/plugin'; -import { autobind, throttle } from 'jodit/core/decorators'; -import { pluginSystem } from 'jodit/core/global'; import './config'; +import './size.less'; + /** * Calculate sizes for editor workspace and handle setHeight and setWidth events */ diff --git a/src/plugins/source/config.ts b/src/plugins/source/config.ts index 2560c2ed0..8d51d3387 100644 --- a/src/plugins/source/config.ts +++ b/src/plugins/source/config.ts @@ -9,12 +9,13 @@ */ import type { IControlType, IJodit, ISourceEditor } from 'jodit/types'; -import { Config } from 'jodit/config'; import { IS_IE, MODE_SOURCE, MODE_SPLIT } from 'jodit/core/constants'; import { Icon } from 'jodit/core/ui/icon'; import sourceIcon from './source.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { sourceEditor: 'area' | 'ace' | ((jodit: IJodit) => ISourceEditor); diff --git a/src/plugins/source/editor/engines/area.ts b/src/plugins/source/editor/engines/area.ts index e661e17d3..274341129 100644 --- a/src/plugins/source/editor/engines/area.ts +++ b/src/plugins/source/editor/engines/area.ts @@ -9,8 +9,8 @@ */ import type { IJodit, ISourceEditor } from 'jodit/types'; -import { css } from 'jodit/core/helpers/utils/css'; import { Dom } from 'jodit/core/dom/dom'; +import { css } from 'jodit/core/helpers/utils/css'; import { SourceEditor } from 'jodit/plugins/source/editor/sourceEditor'; diff --git a/src/plugins/source/editor/engines/index.ts b/src/plugins/source/editor/engines/index.ts index 393a072e6..44a0ade7d 100644 --- a/src/plugins/source/editor/engines/index.ts +++ b/src/plugins/source/editor/engines/index.ts @@ -8,6 +8,6 @@ * @module plugins/source */ -export * from './area'; export * from './ace'; +export * from './area'; // export * from "./custom"; // You can add here another source editor diff --git a/src/plugins/source/source.ts b/src/plugins/source/source.ts index df1f42819..e85a63c1b 100644 --- a/src/plugins/source/source.ts +++ b/src/plugins/source/source.ts @@ -10,8 +10,6 @@ * @module plugins/source */ -import './source.less'; - import type { IJodit, ISourceEditor } from 'jodit/types'; import * as consts from 'jodit/core/constants'; import { @@ -21,15 +19,18 @@ import { MODE_SPLIT, SOURCE_CONSUMER } from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin'; -import { Dom } from 'jodit/core/dom/dom'; -import { isString, loadNext } from 'jodit/core/helpers'; import { autobind, watch } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { isString, loadNext } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin'; -import { createSourceEditor } from './editor/factory'; import './config'; +import { createSourceEditor } from './editor/factory'; + +import './source.less'; + /** * Plug-in change simple textarea on CodeMirror editor in Source code mode */ diff --git a/src/plugins/speech-recognize/config.ts b/src/plugins/speech-recognize/config.ts index 985e34c7d..f659dde41 100644 --- a/src/plugins/speech-recognize/config.ts +++ b/src/plugins/speech-recognize/config.ts @@ -8,19 +8,18 @@ * @module plugins/speech-recognize */ -import type { IControlType, IJodit, IDictionary } from 'jodit/types'; - -import { Config } from 'jodit/config'; -import { dataBind } from 'jodit/core/helpers/utils/data-bind'; +import type { IControlType, IDictionary, IJodit } from 'jodit/types'; import { isBoolean } from 'jodit/core/helpers/checker/is-boolean'; +import { dataBind } from 'jodit/core/helpers/utils/data-bind'; import { Icon } from 'jodit/core/ui/icon'; -import type { ISpeechRecognizeConstructor } from './interface'; -import { RecognizeManager } from './helpers/recognize-manager'; import { SpeechRecognition } from './helpers/api'; - +import { RecognizeManager } from './helpers/recognize-manager'; +import type { ISpeechRecognizeConstructor } from './interface'; import speechRecognizeIcon from './speech-recognize.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { speechRecognize: { diff --git a/src/plugins/speech-recognize/helpers/recognize-manager.ts b/src/plugins/speech-recognize/helpers/recognize-manager.ts index 49b7fba99..02347758e 100644 --- a/src/plugins/speech-recognize/helpers/recognize-manager.ts +++ b/src/plugins/speech-recognize/helpers/recognize-manager.ts @@ -9,17 +9,17 @@ */ import type { CanUndef, IAsync, IDestructible } from 'jodit/types'; -import { Eventify } from 'jodit/core/event-emitter/eventify'; -import { autobind } from 'jodit/core/decorators'; - import type { ISpeechRecognize, ISpeechRecognizeResult } from 'jodit/plugins/speech-recognize/interface'; -import { PII, WARN } from 'jodit/plugins/speech-recognize/constants'; +import { autobind } from 'jodit/core/decorators'; +import { Eventify } from 'jodit/core/event-emitter/eventify'; import { sound } from './sound'; +import { PII, WARN } from 'jodit/plugins/speech-recognize/constants'; + @autobind export class RecognizeManager extends Eventify<{ diff --git a/src/plugins/speech-recognize/speech-recognize.ts b/src/plugins/speech-recognize/speech-recognize.ts index 784bb91d7..9f74b9746 100644 --- a/src/plugins/speech-recognize/speech-recognize.ts +++ b/src/plugins/speech-recognize/speech-recognize.ts @@ -10,20 +10,22 @@ * @module plugins/speech-recognize */ -import './speech-recognize.less'; - import type { IDictionary, IJodit, IPlugin } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; +import { debounce } from 'jodit/core/decorators/debounce/debounce'; import { watch } from 'jodit/core/decorators/watch/watch'; -import { keys } from 'jodit/core/helpers/utils/utils'; -import { extendLang } from 'jodit/core/global'; import { Dom } from 'jodit/core/dom/dom'; -import { debounce } from 'jodit/core/decorators/debounce/debounce'; +import { extendLang } from 'jodit/core/global'; +import { keys } from 'jodit/core/helpers/utils/utils'; +import { Plugin } from 'jodit/core/plugin'; + +import './config'; + import { Jodit } from '../../jodit'; import { execSpellCommand } from './helpers/exec-spell-command'; import * as langs from './langs'; -import './config'; + +import './speech-recognize.less'; export class SpeechRecognizeNative extends Plugin implements IPlugin { constructor(j: IJodit) { diff --git a/src/plugins/spellcheck/config.ts b/src/plugins/spellcheck/config.ts index ed1dc0250..0add03f61 100644 --- a/src/plugins/spellcheck/config.ts +++ b/src/plugins/spellcheck/config.ts @@ -9,11 +9,12 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; import spellcheckIcon from './spellcheck.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { /** diff --git a/src/plugins/spellcheck/spellcheck.ts b/src/plugins/spellcheck/spellcheck.ts index 961de7482..c196bb756 100644 --- a/src/plugins/spellcheck/spellcheck.ts +++ b/src/plugins/spellcheck/spellcheck.ts @@ -11,14 +11,15 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { attr } from 'jodit/core/helpers/utils/attr'; import { autobind } from 'jodit/core/decorators'; import { extendLang, pluginSystem } from 'jodit/core/global'; +import { attr } from 'jodit/core/helpers/utils/attr'; +import { Plugin } from 'jodit/core/plugin'; -import * as langs from './langs'; import './config'; +import * as langs from './langs'; + export class spellcheck extends Plugin { override buttons: Plugin['buttons'] = [ { diff --git a/src/plugins/stat/stat.ts b/src/plugins/stat/stat.ts index 5bfc3e9c0..1d17af952 100644 --- a/src/plugins/stat/stat.ts +++ b/src/plugins/stat/stat.ts @@ -12,9 +12,9 @@ import type { Nullable } from 'jodit/types'; import { INVISIBLE_SPACE_REG_EXP, SPACE_REG_EXP } from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin/plugin'; import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin/plugin'; import './config'; diff --git a/src/plugins/sticky/sticky.ts b/src/plugins/sticky/sticky.ts index ca1f47086..4b0ad47d1 100644 --- a/src/plugins/sticky/sticky.ts +++ b/src/plugins/sticky/sticky.ts @@ -10,18 +10,18 @@ * @module plugins/sticky */ -import './sticky.less'; - import type { IJodit } from 'jodit/types'; import { IS_ES_NEXT, IS_IE, MODE_WYSIWYG } from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin/plugin'; -import { Dom } from 'jodit/core/dom/dom'; -import { css, offset } from 'jodit/core/helpers'; import { throttle } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom/dom'; import { pluginSystem } from 'jodit/core/global'; +import { css, offset } from 'jodit/core/helpers'; +import { Plugin } from 'jodit/core/plugin/plugin'; import './config'; +import './sticky.less'; + const NEED_DUMMY_BOX = !IS_ES_NEXT && IS_IE; export class sticky extends Plugin { diff --git a/src/plugins/symbols/__image_snapshots__/symbols-test-screenshot-js-symbols-screenshot-testing-open-symbols-dialog-works-1-snap.png b/src/plugins/symbols/__image_snapshots__/symbols-test-screenshot-js-symbols-screenshot-testing-open-symbols-dialog-works-1-snap.png index 468f77f9c..b0df1f2b5 100644 Binary files a/src/plugins/symbols/__image_snapshots__/symbols-test-screenshot-js-symbols-screenshot-testing-open-symbols-dialog-works-1-snap.png and b/src/plugins/symbols/__image_snapshots__/symbols-test-screenshot-js-symbols-screenshot-testing-open-symbols-dialog-works-1-snap.png differ diff --git a/src/plugins/symbols/config.ts b/src/plugins/symbols/config.ts index 091ca5d82..f86c14f58 100644 --- a/src/plugins/symbols/config.ts +++ b/src/plugins/symbols/config.ts @@ -9,10 +9,12 @@ */ import type { IControlType, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Icon } from 'jodit/core/ui/icon'; + import symbolsIcon from './symbols.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { specialCharacters: string[]; diff --git a/src/plugins/symbols/symbols.ts b/src/plugins/symbols/symbols.ts index cf5a4dbe7..acd13b11e 100644 --- a/src/plugins/symbols/symbols.ts +++ b/src/plugins/symbols/symbols.ts @@ -10,8 +10,6 @@ * @module plugins/symbols */ -import './symbols.less'; - import type { IJodit } from 'jodit/types'; import { KEY_DOWN, @@ -20,14 +18,17 @@ import { KEY_RIGHT, KEY_UP } from 'jodit/core/constants'; -import { Plugin } from 'jodit/core/plugin/plugin'; import { Dom } from 'jodit/core/dom/dom'; -import { attr } from 'jodit/core/helpers/utils'; import { extendLang, pluginSystem } from 'jodit/core/global'; +import { attr } from 'jodit/core/helpers/utils'; +import { Plugin } from 'jodit/core/plugin/plugin'; -import * as langs from './langs'; import './config'; +import * as langs from './langs'; + +import './symbols.less'; + /** * The plugin inserts characters that are not part of the standard keyboard. */ diff --git a/src/plugins/tab/tab.ts b/src/plugins/tab/tab.ts index 541e725ed..e7ec7476b 100644 --- a/src/plugins/tab/tab.ts +++ b/src/plugins/tab/tab.ts @@ -11,14 +11,15 @@ */ import type { IJodit } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { watch } from 'jodit/core/decorators'; import { KEY_TAB } from 'jodit/core/constants'; +import { watch } from 'jodit/core/decorators'; import { pluginSystem } from 'jodit/core/global'; +import { Plugin } from 'jodit/core/plugin'; -import { onTabInsideLi } from './cases'; import './config'; +import { onTabInsideLi } from './cases'; + class tab extends Plugin { protected afterInit(jodit: IJodit): void {} diff --git a/src/plugins/table-keyboard-navigation/table-keyboard-navigation.ts b/src/plugins/table-keyboard-navigation/table-keyboard-navigation.ts index 50fa389bc..d1004c9bd 100644 --- a/src/plugins/table-keyboard-navigation/table-keyboard-navigation.ts +++ b/src/plugins/table-keyboard-navigation/table-keyboard-navigation.ts @@ -13,9 +13,9 @@ import type { IJodit, Nullable } from 'jodit/types'; import * as consts from 'jodit/core/constants'; import { Dom } from 'jodit/core/dom/dom'; -import { Table } from 'jodit/modules/table/table'; import { pluginSystem } from 'jodit/core/global'; import { call } from 'jodit/core/helpers'; +import { Table } from 'jodit/modules/table/table'; const WORK_KEYS = new Set([ consts.KEY_TAB, diff --git a/src/plugins/table/config.ts b/src/plugins/table/config.ts index 912b4a4dd..1b269c4af 100644 --- a/src/plugins/table/config.ts +++ b/src/plugins/table/config.ts @@ -9,14 +9,15 @@ */ import type { IControlType, IDictionary, IJodit } from 'jodit/types'; -import { Config } from 'jodit/config'; import { Dom } from 'jodit/core/dom'; -import { attr } from 'jodit/core/helpers/utils'; import { $$, css, scrollIntoViewIfNeeded } from 'jodit/core/helpers'; +import { attr } from 'jodit/core/helpers/utils'; import { Icon } from 'jodit/core/ui/icon'; import tableIcon from './table.svg'; +import { Config } from 'jodit/config'; + declare module 'jodit/config' { interface Config { table: { diff --git a/src/plugins/table/table.ts b/src/plugins/table/table.ts index 9fe18c30d..61f8e4203 100644 --- a/src/plugins/table/table.ts +++ b/src/plugins/table/table.ts @@ -10,13 +10,13 @@ * @module plugins/table */ -import './table.less'; - import type { IJodit } from 'jodit/types'; import { pluginSystem } from 'jodit/core/global'; import './config'; +import './table.less'; + export function table(editor: IJodit): void { editor.registerButton({ name: 'table', diff --git a/src/plugins/video/config.ts b/src/plugins/video/config.ts index dde32c212..c6dd4ca8d 100644 --- a/src/plugins/video/config.ts +++ b/src/plugins/video/config.ts @@ -9,14 +9,16 @@ */ import type { IControlType, IJodit, IUIForm } from 'jodit/types'; -import { Config } from 'jodit/config'; -import { type TabOption, TabsWidget } from 'jodit/modules/widget'; import { convertMediaUrlToVideoEmbed } from 'jodit/core/helpers'; -import { UIForm, UIInput, UITextArea, UIBlock } from 'jodit/core/ui/form'; import { Button } from 'jodit/core/ui/button'; +import { UIBlock, UIForm, UIInput, UITextArea } from 'jodit/core/ui/form'; import { Icon } from 'jodit/core/ui/icon'; +import { type TabOption, TabsWidget } from 'jodit/modules/widget'; + import videoIcon from './video.svg'; +import { Config } from 'jodit/config'; + Icon.set('video', videoIcon); Config.prototype.controls.video = { diff --git a/src/plugins/wrap-nodes/config.ts b/src/plugins/wrap-nodes/config.ts index c19987673..770786631 100644 --- a/src/plugins/wrap-nodes/config.ts +++ b/src/plugins/wrap-nodes/config.ts @@ -9,6 +9,7 @@ */ import type { HTMLTagNames } from 'jodit/types'; + import { Config } from 'jodit/config'; declare module 'jodit/config' { @@ -17,7 +18,7 @@ declare module 'jodit/config' { exclude: Set; /** - * If the editor is empty then insert an empty paragraph into it + * If the editor is empty, then insert an empty paragraph into it * @example * ```javascript * Jodit.make('#editor', { diff --git a/src/plugins/wrap-nodes/wrap-nodes.test.js b/src/plugins/wrap-nodes/wrap-nodes.test.js index 8c8e7f077..3c8e40964 100644 --- a/src/plugins/wrap-nodes/wrap-nodes.test.js +++ b/src/plugins/wrap-nodes/wrap-nodes.test.js @@ -165,7 +165,7 @@ describe('WrapNodes plugin test', function () { describe( 'Default tags ' + Jodit.defaultOptions.wrapNodes.exclude, function () { - it('Should not wrap this tags', function () { + it('Should not wrap these tags', function () { const editor = getJodit(); editor.value = 'test

'; @@ -176,7 +176,7 @@ describe('WrapNodes plugin test', function () { } ); - it('Should not wrap this tags', function () { + it('Should not wrap these tags', function () { const editor = getJodit({ wrapNodes: { exclude: new Set(['img']) diff --git a/src/plugins/wrap-nodes/wrap-nodes.ts b/src/plugins/wrap-nodes/wrap-nodes.ts index de75eb924..19f0f03ce 100644 --- a/src/plugins/wrap-nodes/wrap-nodes.ts +++ b/src/plugins/wrap-nodes/wrap-nodes.ts @@ -11,11 +11,11 @@ */ import type { IJodit, Nullable } from 'jodit/types'; -import { Plugin } from 'jodit/core/plugin'; -import { Dom } from 'jodit/core/dom'; -import { isString } from 'jodit/core/helpers/checker/is-string'; import { autobind } from 'jodit/core/decorators'; +import { Dom } from 'jodit/core/dom'; import { pluginSystem } from 'jodit/core/global'; +import { isString } from 'jodit/core/helpers/checker/is-string'; +import { Plugin } from 'jodit/core/plugin'; import './config'; diff --git a/src/plugins/xpath/xpath.test.js b/src/plugins/xpath/xpath.test.js index cf518f347..73e975875 100644 --- a/src/plugins/xpath/xpath.test.js +++ b/src/plugins/xpath/xpath.test.js @@ -28,7 +28,7 @@ describe('Path plugin', function () { ).equals('flex'); }); - it('Should show path to selection element', function () { + it('Should show a path to a selection element', function () { const editor = getJodit({ language: 'en', showXPathInStatusbar: true, @@ -51,7 +51,7 @@ describe('Path plugin', function () { }); describe('After change selection', function () { - it('Should change path to selection element', function () { + it('Should change a path to a selection element', function () { const editor = getJodit({ language: 'en', showXPathInStatusbar: true, @@ -81,7 +81,7 @@ describe('Path plugin', function () { }); }); - describe('After click on element of path', function () { + describe('After click on an element of path', function () { it('Should select this element', function () { const editor = getJodit({ language: 'en', @@ -128,7 +128,7 @@ describe('Path plugin', function () { }); }); - describe('Context menu on element of path', function () { + describe('Context menu on an element of path', function () { it('Should open context menu', function () { const editor = getJodit({ language: 'en', diff --git a/src/plugins/xpath/xpath.ts b/src/plugins/xpath/xpath.ts index fffd00563..1b5cb8e22 100644 --- a/src/plugins/xpath/xpath.ts +++ b/src/plugins/xpath/xpath.ts @@ -10,21 +10,21 @@ * @module plugins/xpath */ -import './xpath.less'; - import type { IControlTypeStrong, IToolbarButton } from 'jodit/types'; import { INVISIBLE_SPACE, MODE_WYSIWYG } from 'jodit/core/constants'; -import { ContextMenu } from 'jodit/modules/context-menu/context-menu'; import { Dom } from 'jodit/core/dom'; -import { getXPathByElement, trim, attr } from 'jodit/core/helpers'; +import { pluginSystem } from 'jodit/core/global'; +import { attr, getXPathByElement, trim } from 'jodit/core/helpers'; import { Plugin } from 'jodit/core/plugin'; +import { ContextMenu } from 'jodit/modules/context-menu/context-menu'; import { makeButton } from 'jodit/modules/toolbar/factory'; -import { pluginSystem } from 'jodit/core/global'; import './config'; +import './xpath.less'; + /** - * Show path to current element in status bar + * Show a path to a current element in status bar */ class xpath extends Plugin { private onContext = (bindElement: Node, event: MouseEvent): boolean => { diff --git a/src/styles/form.less b/src/styles/form.less index 685e0d3d2..cb424260b 100644 --- a/src/styles/form.less +++ b/src/styles/form.less @@ -84,7 +84,7 @@ border-radius: 0; appearance: none; background-color: var(--color-white); - line-height: var(--input-height); + line-height: 1.2; outline: none; &[disabled] { diff --git a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-dialog-theme-should-render-with-same-theme-1-snap.png b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-dialog-theme-should-render-with-same-theme-1-snap.png index bfc77e20c..a0d929dd9 100644 Binary files a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-dialog-theme-should-render-with-same-theme-1-snap.png and b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-dialog-theme-should-render-with-same-theme-1-snap.png differ diff --git a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-should-render-dark-theme-1-snap.png b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-should-render-dark-theme-1-snap.png index 6a56d75a6..925122c54 100644 Binary files a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-should-render-dark-theme-1-snap.png and b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-dark-theme-should-render-dark-theme-1-snap.png differ diff --git a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-should-render-usual-theme-1-snap.png b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-should-render-usual-theme-1-snap.png index 6239bca42..366d0625b 100644 Binary files a/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-should-render-usual-theme-1-snap.png and b/src/styles/themes/__image_snapshots__/theme-test-screenshot-js-theme-screenshot-testing-should-render-usual-theme-1-snap.png differ diff --git a/src/types/create.d.ts b/src/types/create.d.ts index 22dc4d923..35f4bc917 100644 --- a/src/types/create.d.ts +++ b/src/types/create.d.ts @@ -91,7 +91,10 @@ interface ICreate { /** * Create DOM element from HTML text */ - fromHTML(html: string, refs?: IDictionary): T; + fromHTML( + html: string, + refs?: IDictionary + ): T; /** * Apply to element `createAttributes` options diff --git a/src/types/view.d.ts b/src/types/view.d.ts index 4d2bb0bd8..ca784f5ce 100644 --- a/src/types/view.d.ts +++ b/src/types/view.d.ts @@ -109,7 +109,7 @@ interface IViewBased readonly parent: Nullable; /** - * ID attribute for source element, id add \{id\}_editor it's editor's id + * ID attribute for a source element, id add \{id\}_editor it's editor's id */ readonly id: string; diff --git a/test/bootstrap.js b/test/bootstrap.js index 375a6d5a8..b62bcf940 100644 --- a/test/bootstrap.js +++ b/test/bootstrap.js @@ -10,6 +10,10 @@ const box = document.createElement('div'); document.body.appendChild(box); +if (typeof chai === 'undefined') { + console.error('Please include chai.js'); +} + const expect = typeof chai !== 'undefined' ? chai.expect : function () {}, stuff = []; @@ -41,8 +45,8 @@ if (typeof window.skipTest === 'undefined') { } if (typeof window.toolbarButtonsCount !== 'number') { - window.toolbarButtonsCount = 39; - window.toolbarButtonsCountMD = 29; + window.toolbarButtonsCount = 41; + window.toolbarButtonsCountMD = 31; window.toolbarButtonsCountSM = 19; window.toolbarButtonsCountXS = 13; } @@ -293,7 +297,7 @@ function mockAjax() { time: '2018-03-15 12:08:54', data: { messages: [ - 'File does not exist or is above the root of the connector' + 'The File does not exist or is above the root of the connector' ], code: 424 } @@ -335,6 +339,10 @@ if (typeof window.chai !== 'undefined') { const i18nkeys = new Set(); const excludeI18nKeys = new Set([ + 'AI Assistant', + 'AI Commands', + 'ai-commands', + 'ai-assistant', 'test', 'speechRecognize', 'quote', @@ -352,7 +360,7 @@ const excludeI18nKeys = new Set([ 'remove word', 'delete word', 'enter', - 'File does not exist or is above the root of the connector', + 'The File does not exist or is above the root of the connector', 'bar', 'Classe 1', 'Classe 2', @@ -530,7 +538,7 @@ function getJodit(options, element) { } /** - * Create empty DIV block and but it inside Box + * Create empty DIV block and it inside Box * * @param [id] * @param [noput] @@ -928,7 +936,7 @@ function selectCells(editor, indexes) { } /** - * Set listener and remove it after first call + * Set listener and remove it after the first call * * @param {string} event * @param {HTMLElement} element @@ -989,7 +997,7 @@ function setCursor(elm, inEnd) { } /** - * Set cursor inside editor by some char + * Set cursor inside the editor by some char * * @param {Jodit} editor * @param {string} [char] @@ -1033,7 +1041,7 @@ function setCursorToChar(editor, char = '|') { } /** - * Set cursor inside editor by some char + * Set cursor inside the editor by some char * * @param {Jodit} editor * @param {string} [char] @@ -1093,9 +1101,9 @@ function fillXY(data, editor) { * * Licensed under the Apache License, Version 2 * - * Works in a SVG document in Chrome 6+, Safari 5+, Firefox 4+ and IE9+. - * Works in a HTML5 document in Chrome 7+, Firefox 4+ and IE9+. - * Does not work in Opera since it doesn't support the SVGElement interface yet. + * Works in an SVG document in Chrome 6+, Safari 5+, Firefox 4+ and IE9+. + * Works in an HTML5 document in Chrome 7+, Firefox 4+ and IE9+. + * It Does not work in Opera since it doesn't support the SVGElement interface yet. * * I haven't decided on the best name for this property - thus the duplication. */ @@ -1138,7 +1146,7 @@ function fillXY(data, editor) { output.push(''); } else { throw new Error( - 'Error serializing XML. Unhandled node of type: ' + nodeType + 'Error serializing XML. Unhandled node of a type: ' + nodeType ); } }; @@ -1167,7 +1175,7 @@ function fillXY(data, editor) { const dXML = new DOMParser(); dXML.async = false; - // Wrap the markup into a SVG node to ensure parsing works. + // Wrap the markup into an SVG node to ensure parsing works. const sXML = "" + markupText + @@ -1250,7 +1258,9 @@ Object.defineProperty(navigator, 'userAgent', { function strCompare(result, real, len = 30) { for (let i = 0; i < Math.max(result.length, real.length); i += 1) { if (result[i] !== real[i]) { + // eslint-disable-next-line no-console console.log('result', result.substring(i - len, i + len)); + // eslint-disable-next-line no-console console.log('real', real.substring(i - len, i + len)); return false; diff --git a/test/loader.js b/test/loader.js index 2c1d58269..57a5bf275 100644 --- a/test/loader.js +++ b/test/loader.js @@ -1,2 +1,2 @@ // prettier-ignore -window.fileCasesJodit = ["./tests/acceptance/states.test.js","./tests/acceptance/security.test.js","./tests/acceptance/interface.test.js","./tests/acceptance/inline-mode.test.js","./tests/acceptance/image.test.js","./tests/acceptance/editor.test.js","./tests/acceptance/commands.test.js","../src/plugins/plugins.test.js","../src/plugins/xpath/xpath.test.js","../src/plugins/wrap-nodes/wrap-nodes.test.js","../src/plugins/table/table.test.js","../src/plugins/tab/tab.test.js","../src/plugins/symbols/symbols.test.js","../src/plugins/sticky/sticky.test.js","../src/plugins/stat/stat.test.js","../src/plugins/source/source.test.js","../src/plugins/size/size.test.js","../src/plugins/search/search.test.js","../src/plugins/resizer/resizer.test.js","../src/plugins/resize-cells/resize-cells.test.js","../src/plugins/preview/preview.test.js","../src/plugins/placeholder/placeholder.test.js","../src/plugins/paste-storage/paste-storage.test.js","../src/plugins/paste/paste.test.js","../src/plugins/ordered-list/ordered-list.test.js","../src/plugins/mobile/mobile.test.js","../src/plugins/link/link.test.js","../src/plugins/line-height/line-height.test.js","../src/plugins/limit/limit.test.js","../src/plugins/inline-popup/inline-popup.test.js","../src/plugins/indent/indent.test.js","../src/plugins/image-properties/image-properties.test.js","../src/plugins/image/image.test.js","../src/plugins/iframe/iframe.test.js","../src/plugins/hr/hr.test.js","../src/plugins/hotkeys/hotkeys.test.js","../src/plugins/fullsize/fullsize.test.js","../src/plugins/font/font.test.js","../src/plugins/focus/focus.test.js","../src/plugins/enter/enter.test.js","../src/plugins/dtd/dtd.test.js","../src/plugins/drag-and-drop-element/drag-and-drop-element.test.js","../src/plugins/delete/delete.test.js","../src/plugins/copy-format/copy-format.test.js","../src/plugins/color/color.test.js","../src/plugins/clipboard/clipboard.test.js","../src/plugins/clean-html/clean-html.test.js","../src/plugins/class-span/class-span.test.js","../src/plugins/bold/bold.test.js","../src/plugins/backspace/backspace.test.js","../src/plugins/add-new-line/add-new-line.test.js","../src/modules/uploader/uploader.test.js","../src/modules/toolbar/toolbar.test.js","../src/modules/table/table.test.js","../src/modules/messages/messages.test.js","../src/modules/history/history.test.js","../src/modules/file-browser/file-browser.test.js","../src/modules/dialog/dialog.test.js","../src/langs/i18n.test.js","../src/core/ui/popup/popup.test.js","../src/core/ui/group/group.test.js","../src/core/ui/form/ui.form.test.js","../src/core/ui/button/tooltip/tooltip.test.js","../src/core/selection/selection.test.js","../src/core/selection/style/style.test.js","../src/core/plugin/plugin.test.js","../src/core/helpers/helpers.test.js","../src/core/helpers/size/position.test.js","../src/core/helpers/array/array.helpers.test.js","../src/core/event-emitter/object-observer.test.js","../src/core/event-emitter/event-emitter.test.js","../src/core/dom/dom.test.js","../src/core/decorators/decorators.test.js","../src/core/create/create.test.js","../src/core/async/async.test.js"]; \ No newline at end of file +window.fileCasesJodit = ["./tests/acceptance/states.test.js","./tests/acceptance/security.test.js","./tests/acceptance/interface.test.js","./tests/acceptance/inline-mode.test.js","./tests/acceptance/image.test.js","./tests/acceptance/editor.test.js","./tests/acceptance/commands.test.js","../src/plugins/plugins.test.js","../src/plugins/xpath/xpath.test.js","../src/plugins/wrap-nodes/wrap-nodes.test.js","../src/plugins/table/table.test.js","../src/plugins/tab/tab.test.js","../src/plugins/symbols/symbols.test.js","../src/plugins/sticky/sticky.test.js","../src/plugins/stat/stat.test.js","../src/plugins/source/source.test.js","../src/plugins/size/size.test.js","../src/plugins/search/search.test.js","../src/plugins/resizer/resizer.test.js","../src/plugins/resize-cells/resize-cells.test.js","../src/plugins/preview/preview.test.js","../src/plugins/placeholder/placeholder.test.js","../src/plugins/paste-storage/paste-storage.test.js","../src/plugins/paste/paste.test.js","../src/plugins/ordered-list/ordered-list.test.js","../src/plugins/mobile/mobile.test.js","../src/plugins/link/link.test.js","../src/plugins/line-height/line-height.test.js","../src/plugins/limit/limit.test.js","../src/plugins/inline-popup/inline-popup.test.js","../src/plugins/indent/indent.test.js","../src/plugins/image-properties/image-properties.test.js","../src/plugins/image/image.test.js","../src/plugins/iframe/iframe.test.js","../src/plugins/hr/hr.test.js","../src/plugins/hotkeys/hotkeys.test.js","../src/plugins/fullsize/fullsize.test.js","../src/plugins/font/font.test.js","../src/plugins/focus/focus.test.js","../src/plugins/enter/enter.test.js","../src/plugins/dtd/dtd.test.js","../src/plugins/drag-and-drop-element/drag-and-drop-element.test.js","../src/plugins/delete/delete.test.js","../src/plugins/copy-format/copy-format.test.js","../src/plugins/color/color.test.js","../src/plugins/clipboard/clipboard.test.js","../src/plugins/clean-html/clean-html.test.js","../src/plugins/class-span/class-span.test.js","../src/plugins/bold/bold.test.js","../src/plugins/backspace/backspace.test.js","../src/plugins/ai-assistant/ai-assistant.test.js","../src/plugins/add-new-line/add-new-line.test.js","../src/modules/uploader/uploader.test.js","../src/modules/toolbar/toolbar.test.js","../src/modules/table/table.test.js","../src/modules/messages/messages.test.js","../src/modules/history/history.test.js","../src/modules/file-browser/file-browser.test.js","../src/modules/dialog/dialog.test.js","../src/langs/i18n.test.js","../src/core/ui/popup/popup.test.js","../src/core/ui/group/group.test.js","../src/core/ui/form/ui.form.test.js","../src/core/ui/button/tooltip/tooltip.test.js","../src/core/selection/selection.test.js","../src/core/selection/style/style.test.js","../src/core/plugin/plugin.test.js","../src/core/helpers/helpers.test.js","../src/core/helpers/size/position.test.js","../src/core/helpers/array/array.helpers.test.js","../src/core/event-emitter/object-observer.test.js","../src/core/event-emitter/event-emitter.test.js","../src/core/dom/dom.test.js","../src/core/decorators/decorators.test.js","../src/core/create/create.test.js","../src/core/async/async.test.js"]; \ No newline at end of file diff --git a/test/screenshots/bootstrap.screenshot.js b/test/screenshots/bootstrap.screenshot.js index e801acf36..712e98f33 100644 --- a/test/screenshots/bootstrap.screenshot.js +++ b/test/screenshots/bootstrap.screenshot.js @@ -41,9 +41,11 @@ console.info('Min:', args.min); const fs = require('fs'); const expect = require('expect'); const path = require('path'); + const toMatchImageSnapshot = import('expect-mocha-image-snapshot'); const puppeteer = require('puppeteer'); const express = require('express'); + const app = express(); toMatchImageSnapshot.then(res => { @@ -117,6 +119,7 @@ if (typeof before !== 'undefined') { if (!args.debug) { after(function () { + // eslint-disable-next-line no-console console.log('Closing browser'); browser.close(); listen.close(); diff --git a/test/test.html b/test/test.html index 1c6986dc6..ab47b82f2 100644 --- a/test/test.html +++ b/test/test.html @@ -33,7 +33,7 @@ 'script src="../node_modules/mocha/mocha.js"><' + '/script>' + '<' + - 'script src="../node_modules/chai/chai.js"><' + + 'script src="../node_modules/chai/chai.js" ><' + '/script>' + '<' + 'script src="../node_modules/synchronous-promise/index.js"><' + @@ -58,7 +58,7 @@ 'ace' ], // retries: 2, - bail: true, + bail: false, checkLeaks: true, allowUncaught: true, fullTrace: true, diff --git a/test/tests/acceptance/commands.test.js b/test/tests/acceptance/commands.test.js index 0d681b14f..40da6d500 100644 --- a/test/tests/acceptance/commands.test.js +++ b/test/tests/acceptance/commands.test.js @@ -24,7 +24,7 @@ describe('Commands Jodit Editor Tests', function () { }); describe('Exec formatBlock for one inline element', function () { - it('Should wrap this element and all nearest inline element in block', function () { + it('Should wrap this element and all nearest inline elements in block', function () { const jodit = getJodit(); jodit.value = 'stop post ice'; const range = jodit.ed.createRange(); @@ -383,7 +383,7 @@ describe('Commands Jodit Editor Tests', function () { ).equals(editor.value); }); - it('Set colour to collapsed position should create empty span and insert inward cursor', function () { + it('Set color to collapsed position should create empty span and insert inward cursor', function () { const editor = getJodit({ disablePlugins: ['WrapNodes'] }); diff --git a/tools/dev-server/index.ts b/tools/dev-server/index.ts index ecd18530a..d66e1a761 100644 --- a/tools/dev-server/index.ts +++ b/tools/dev-server/index.ts @@ -4,9 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Configuration, Middleware } from 'webpack-dev-server'; import type { Variables } from '../variables'; + import * as path from 'path'; +import type { Configuration, Middleware } from 'webpack-dev-server'; export const devServer = ({ port, dirname }: Variables): Configuration => ({ open: '/stand.html', diff --git a/tools/external/exclude-languages.ts b/tools/external/exclude-languages.ts index f5983c2d2..089839d20 100644 --- a/tools/external/exclude-languages.ts +++ b/tools/external/exclude-languages.ts @@ -5,6 +5,7 @@ */ import type { Variables } from '../variables'; + import * as fs from 'fs'; import * as path from 'path'; diff --git a/tools/external/exclude-plugins.ts b/tools/external/exclude-plugins.ts index b8aeb5df6..6797e1699 100644 --- a/tools/external/exclude-plugins.ts +++ b/tools/external/exclude-plugins.ts @@ -5,6 +5,7 @@ */ import type { Variables } from '../variables'; + import * as fs from 'fs'; import * as path from 'path'; diff --git a/tools/external/index.ts b/tools/external/index.ts index 9f14a2ec3..84a690fa6 100644 --- a/tools/external/index.ts +++ b/tools/external/index.ts @@ -5,9 +5,10 @@ */ import type { Variables } from '../variables'; -import excludeUtils from './exclude-utils'; -import excludePlugins from './exclude-plugins'; + import excludeLanguages from './exclude-languages'; +import excludePlugins from './exclude-plugins'; +import excludeUtils from './exclude-utils'; export const externals = (vars: Variables): { [key in string]: string } => ({ ...excludeUtils(vars), diff --git a/tools/karma.conf.ts b/tools/karma.conf.ts index 756447040..cbc537041 100644 --- a/tools/karma.conf.ts +++ b/tools/karma.conf.ts @@ -4,10 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Config } from 'karma'; -import * as yargs from 'yargs'; import * as fs from 'fs'; +import type { Config } from 'karma'; import path from 'path'; +import * as yargs from 'yargs'; const argv = yargs .option('cwd', { @@ -23,12 +23,12 @@ const argv = yargs .option('fat', { type: 'boolean', demandOption: true, - description: 'Use fat version of js files' + description: 'Use a fat version of js files' }) .option('min', { type: 'boolean', demandOption: true, - description: 'Use minified version of js files' + description: 'Use a minified version of js files' }) .parseSync(); diff --git a/tools/loaders/lang-loader.ts b/tools/loaders/lang-loader.ts index cfd42196e..58f756df0 100644 --- a/tools/loaders/lang-loader.ts +++ b/tools/loaders/lang-loader.ts @@ -4,12 +4,11 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { LoaderContext } from 'webpack'; - +import * as fs from 'fs'; +import * as path from 'path'; import * as ts from 'typescript'; import * as vm from 'vm'; -import * as path from 'path'; -import * as fs from 'fs'; +import type { LoaderContext } from 'webpack'; let keys: string[] = []; type Lang = { [key in string]: string }; diff --git a/tools/loaders/style.ts b/tools/loaders/style.ts index 344cf77ae..011c28ec4 100644 --- a/tools/loaders/style.ts +++ b/tools/loaders/style.ts @@ -5,10 +5,10 @@ */ import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; import * as MiniCssExtractPlugin from 'mini-css-extract-plugin'; import * as path from 'path'; +import type { RuleSetRule } from 'webpack'; export default ({ debug, diff --git a/tools/minimizer/index.ts b/tools/minimizer/index.ts index e5a82f247..89da24a5b 100644 --- a/tools/minimizer/index.ts +++ b/tools/minimizer/index.ts @@ -4,7 +4,7 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import js from './js'; import css from './css'; +import js from './js'; export const minimizer = [js, css]; diff --git a/tools/minimizer/js.ts b/tools/minimizer/js.ts index 3706a9745..4260d7dac 100644 --- a/tools/minimizer/js.ts +++ b/tools/minimizer/js.ts @@ -5,8 +5,9 @@ */ import type { Variables } from '../variables'; -import MinimizeJSPlugin from 'terser-webpack-plugin'; + import * as os from 'os'; +import MinimizeJSPlugin from 'terser-webpack-plugin'; export default ({ ESNext, isTest, banner }: Variables): MinimizeJSPlugin => new MinimizeJSPlugin({ diff --git a/tools/plugins/banner.ts b/tools/plugins/banner.ts index b71a029ef..b9b99afba 100644 --- a/tools/plugins/banner.ts +++ b/tools/plugins/banner.ts @@ -5,6 +5,7 @@ */ import type { Variables } from '../variables'; + import * as webpack from 'webpack'; export default ({ banner }: Variables): webpack.BannerPlugin => { diff --git a/tools/plugins/define.ts b/tools/plugins/define.ts index e1d723bf1..3f8db31f2 100644 --- a/tools/plugins/define.ts +++ b/tools/plugins/define.ts @@ -5,6 +5,7 @@ */ import type { Variables } from '../variables'; + import * as webpack from 'webpack'; export default ({ @@ -27,7 +28,18 @@ export default ({ IS_ES_MODERN: ESModern, HOMEPAGE: JSON.stringify(pkg.homepage), TARGET_ES: JSON.stringify(ES), - NODE_ENV: JSON.stringify(mode) + NODE_ENV: JSON.stringify(mode), + TOKENS: JSON.stringify( + Object.keys(process.env) + .filter(key => key.startsWith('TOKEN_')) + .reduce( + (acc, key) => { + acc[key] = process.env[key]!; + return acc; + }, + {} as Record + ) + ) } }); }; diff --git a/tools/plugins/extract-css.ts b/tools/plugins/extract-css.ts index 5bc82496a..f8d04e650 100644 --- a/tools/plugins/extract-css.ts +++ b/tools/plugins/extract-css.ts @@ -4,9 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ +import { fileName } from '../utils/filename'; import type { Variables } from '../variables'; + import MiniCssExtractPlugin from 'mini-css-extract-plugin'; -import { fileName } from '../utils/filename'; export default (vars: Variables): MiniCssExtractPlugin => { return new MiniCssExtractPlugin({ diff --git a/tools/plugins/index.ts b/tools/plugins/index.ts index eff4038cf..3e7759d43 100644 --- a/tools/plugins/index.ts +++ b/tools/plugins/index.ts @@ -5,13 +5,15 @@ */ import type { Variables } from '../variables'; -import type { WebpackConfiguration } from 'webpack-cli'; -import * as webpack from 'webpack'; + +import banner from './banner'; import define from './define'; import extractCSS from './extract-css'; -import banner from './banner'; import postBuild from './post-build'; +import * as webpack from 'webpack'; +import type { WebpackConfiguration } from 'webpack-cli'; + export const plugins = (vars: Variables): WebpackConfiguration['plugins'] => { const { isProd, @@ -59,6 +61,7 @@ export const plugins = (vars: Variables): WebpackConfiguration['plugins'] => { if (exclude.length) { for (const p of exclude) { if (p.length && resource.includes(p)) { + // eslint-disable-next-line no-console console.log('\nExclude:', resource, ' rule: ', p); return true; } diff --git a/tools/plugins/post-build.ts b/tools/plugins/post-build.ts index f421f975a..364a2c21b 100644 --- a/tools/plugins/post-build.ts +++ b/tools/plugins/post-build.ts @@ -4,13 +4,14 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Variables } from '../variables'; -import { PostBuild } from '../utils/post-build'; import { fileName } from '../utils/filename'; -import postcss from 'postcss'; -import * as path from 'path'; -import * as fs from 'fs'; +import { PostBuild } from '../utils/post-build'; +import type { Variables } from '../variables'; + import autoprefixer from 'autoprefixer'; +import * as fs from 'fs'; +import * as path from 'path'; +import postcss from 'postcss'; import postcssCssVariables from 'postcss-css-variables'; export default ({ diff --git a/tools/rules/css.ts b/tools/rules/css.ts index e26f7c2bc..cece1ab39 100644 --- a/tools/rules/css.ts +++ b/tools/rules/css.ts @@ -4,9 +4,10 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ +import style from '../loaders/style'; import type { Variables } from '../variables'; + import type { RuleSetRule } from 'webpack'; -import style from '../loaders/style'; export default (vars: Variables): RuleSetRule => { return { diff --git a/tools/rules/extra-typescript.ts b/tools/rules/extra-typescript.ts index ba01162e7..38c69154d 100644 --- a/tools/rules/extra-typescript.ts +++ b/tools/rules/extra-typescript.ts @@ -5,8 +5,9 @@ */ import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; + import * as path from 'path'; +import type { RuleSetRule } from 'webpack'; export default ({ ESModern, diff --git a/tools/rules/index.ts b/tools/rules/index.ts index 07b56f80a..a72b3fad3 100644 --- a/tools/rules/index.ts +++ b/tools/rules/index.ts @@ -5,13 +5,15 @@ */ import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; + import css from './css'; import extraTypescript from './extra-typescript'; -import langs from './langs'; import internalTypescript from './internal-typescript'; +import langs from './langs'; import svg from './svg'; +import type { RuleSetRule } from 'webpack'; + export const rules = (variables: Variables): RuleSetRule[] => { return [ css(variables), diff --git a/tools/rules/internal-typescript.ts b/tools/rules/internal-typescript.ts index ef77fe5ff..26c23ea8f 100644 --- a/tools/rules/internal-typescript.ts +++ b/tools/rules/internal-typescript.ts @@ -4,11 +4,12 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; import { removeAsserts } from '../utils/transformers/remove-asserts'; +import type { Variables } from '../variables'; + import * as path from 'path'; import * as ts from 'typescript'; +import type { RuleSetRule } from 'webpack'; export default ( { diff --git a/tools/rules/langs.ts b/tools/rules/langs.ts index d048bff02..e1e075ddc 100644 --- a/tools/rules/langs.ts +++ b/tools/rules/langs.ts @@ -5,8 +5,9 @@ */ import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; + import * as path from 'path'; +import type { RuleSetRule } from 'webpack'; export default ({ superDirname }: Variables): RuleSetRule => { return { diff --git a/tools/rules/svg.ts b/tools/rules/svg.ts index 227f58c46..6a7ca518c 100644 --- a/tools/rules/svg.ts +++ b/tools/rules/svg.ts @@ -5,8 +5,9 @@ */ import type { Variables } from '../variables'; -import type { RuleSetRule } from 'webpack'; + import * as path from 'path'; +import type { RuleSetRule } from 'webpack'; export default ({ superDirname }: Variables): RuleSetRule => { return { diff --git a/tools/utils/find-tests.ts b/tools/utils/find-tests.ts index 11eb3bc5e..d48c7e105 100644 --- a/tools/utils/find-tests.ts +++ b/tools/utils/find-tests.ts @@ -4,9 +4,9 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import * as path from 'path'; import * as fs from 'fs'; import * as glob from 'glob'; +import * as path from 'path'; const dir = path.resolve(process.cwd()) + '/'; console.log('Find directory:', dir); diff --git a/tools/utils/lang/helpers.ts b/tools/utils/lang/helpers.ts index 4226ee417..964d71a70 100644 --- a/tools/utils/lang/helpers.ts +++ b/tools/utils/lang/helpers.ts @@ -4,9 +4,9 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ +import { exec } from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -import { exec } from 'child_process'; const header = fs.readFileSync( path.resolve(__dirname, '../../../src/header.js'), diff --git a/tools/utils/lang/move.ts b/tools/utils/lang/move.ts index 922505bf5..3c62b4934 100644 --- a/tools/utils/lang/move.ts +++ b/tools/utils/lang/move.ts @@ -4,10 +4,11 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ +import { makeIndexFile, readLangs, saveJson } from './helpers'; + +import * as fs from 'fs'; import * as path from 'path'; import * as yargs from 'yargs'; -import * as fs from 'fs'; -import { saveJson, readLangs, makeIndexFile } from './helpers'; const argv = yargs .option('key', { diff --git a/tools/utils/lang/translate.ts b/tools/utils/lang/translate.ts index c0800eda8..1f97c0c92 100644 --- a/tools/utils/lang/translate.ts +++ b/tools/utils/lang/translate.ts @@ -4,13 +4,13 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ +import { makeIndexFile, readLangs, saveJson } from './helpers'; + import request from 'axios'; import * as fs from 'fs'; import * as path from 'path'; import * as yargs from 'yargs'; -import { saveJson, readLangs, makeIndexFile } from './helpers'; - const argv = yargs .option('str', { type: 'string', diff --git a/tools/utils/prepare-publish.ts b/tools/utils/prepare-publish.ts index ee7e8ddaf..d80c73d58 100644 --- a/tools/utils/prepare-publish.ts +++ b/tools/utils/prepare-publish.ts @@ -5,9 +5,9 @@ */ import * as fs from 'fs'; +import * as path from 'path'; // @ts-ignore import replace from 'replace'; -import * as path from 'path'; const cwd = path.resolve(process.argv[2]); if (!fs.existsSync(cwd) || !fs.statSync(cwd).isDirectory()) { diff --git a/tools/utils/resolve-alias-imports.ts b/tools/utils/resolve-alias-imports.ts index 9e39104bb..4c0ae421b 100755 --- a/tools/utils/resolve-alias-imports.ts +++ b/tools/utils/resolve-alias-imports.ts @@ -4,12 +4,13 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import * as path from 'path'; +import { checkSections } from '../loaders/process-sections'; + import * as fs from 'fs'; +import * as path from 'path'; import * as ts from 'typescript'; -import yargs from 'yargs/yargs'; import { hideBin } from 'yargs/helpers'; -import { checkSections } from '../loaders/process-sections'; +import yargs from 'yargs/yargs'; const argv = yargs(hideBin(process.argv)) .option('cwd', { diff --git a/tools/utils/sync.ts b/tools/utils/sync.ts index d34a6c895..2e4dd48fc 100644 --- a/tools/utils/sync.ts +++ b/tools/utils/sync.ts @@ -9,9 +9,9 @@ */ import fs from 'fs'; -import yargs from 'yargs/yargs'; -import { hideBin } from 'yargs/helpers'; import path from 'path'; +import { hideBin } from 'yargs/helpers'; +import yargs from 'yargs/yargs'; const argv = yargs(hideBin(process.argv)) .option('source', { diff --git a/tools/webpack.config.ts b/tools/webpack.config.ts index f4375d17e..a8aeda0ff 100644 --- a/tools/webpack.config.ts +++ b/tools/webpack.config.ts @@ -4,18 +4,19 @@ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ -import * as path from 'path'; +import 'dotenv/config'; -import type { Configuration } from 'webpack'; -import { type Argv, variables } from './variables'; +import { externals } from './external/index'; +import { plugins } from './plugins/index'; +import { rules } from './rules/index'; import { fileName } from './utils/filename'; import { includePlugins } from './utils/include-plugins'; - -import { minimizer } from './minimizer'; -import { rules } from './rules/index'; -import { plugins } from './plugins/index'; -import { externals } from './external/index'; import { devServer } from './dev-server'; +import { minimizer } from './minimizer'; +import { type Argv, variables } from './variables'; + +import * as path from 'path'; +import type { Configuration } from 'webpack'; export default ( env: object,