@ncino/web-components 8.0.0-preview.35 → 8.0.0-preview.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/axe.js +1 -1
- package/dist/_virtual/index_html.js +1 -1
- package/dist/_virtual/index_react.js +1 -1
- package/dist/components/input/gator/help-text/help-text.gator.js +3 -3
- package/dist/components/input/gator/input-label/input-label.gator.js +4 -4
- package/dist/components/input/gator/input-phone/input-phone.gator.js +1 -1
- package/dist/components/input-rich-text/ckeditor-config.js +1 -1
- package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
- package/dist/components/loading-spinner/gator/loading-spinner.gator.js +2 -2
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@46.1.0 → @ckeditor_ckeditor5-alignment@46.1.1}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@46.1.0 → @ckeditor_ckeditor5-autoformat@46.1.1}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@46.1.0 → @ckeditor_ckeditor5-autosave@46.1.1}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@46.1.0 → @ckeditor_ckeditor5-basic-styles@46.1.1}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@46.1.0 → @ckeditor_ckeditor5-block-quote@46.1.1}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@46.1.0 → @ckeditor_ckeditor5-clipboard@46.1.1}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@46.1.0 → @ckeditor_ckeditor5-cloud-services@46.1.1}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@46.1.0 → @ckeditor_ckeditor5-code-block@46.1.1}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-core@46.1.0 → @ckeditor_ckeditor5-core@46.1.1}/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@46.1.0 → @ckeditor_ckeditor5-editor-classic@46.1.1}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@46.1.0 → @ckeditor_ckeditor5-engine@46.1.1}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@46.1.0 → @ckeditor_ckeditor5-enter@46.1.1}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@46.1.0 → @ckeditor_ckeditor5-essentials@46.1.1}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@46.1.0 → @ckeditor_ckeditor5-find-and-replace@46.1.1}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@46.1.0 → @ckeditor_ckeditor5-font@46.1.1}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@46.1.0 → @ckeditor_ckeditor5-heading@46.1.1}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@46.1.0 → @ckeditor_ckeditor5-highlight@46.1.1}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@46.1.0 → @ckeditor_ckeditor5-horizontal-line@46.1.1}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@46.1.0 → @ckeditor_ckeditor5-html-embed@46.1.1}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-support@46.1.0 → @ckeditor_ckeditor5-html-support@46.1.1}/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-image@46.1.0 → @ckeditor_ckeditor5-image@46.1.1}/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@46.1.0 → @ckeditor_ckeditor5-indent@46.1.1}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@46.1.0 → @ckeditor_ckeditor5-language@46.1.1}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@46.1.0 → @ckeditor_ckeditor5-link@46.1.1}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@46.1.0 → @ckeditor_ckeditor5-list@46.1.1}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@46.1.0 → @ckeditor_ckeditor5-markdown-gfm@46.1.1}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@46.1.0 → @ckeditor_ckeditor5-media-embed@46.1.1}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@46.1.0 → @ckeditor_ckeditor5-mention@46.1.1}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@46.1.0 → @ckeditor_ckeditor5-page-break@46.1.1}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@46.1.0 → @ckeditor_ckeditor5-paragraph@46.1.1}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@46.1.0 → @ckeditor_ckeditor5-paste-from-office@46.1.1}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@46.1.0 → @ckeditor_ckeditor5-remove-format@46.1.1}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@46.1.0 → @ckeditor_ckeditor5-select-all@46.1.1}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@46.1.0 → @ckeditor_ckeditor5-show-blocks@46.1.1}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@46.1.0 → @ckeditor_ckeditor5-source-editing@46.1.1}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@46.1.0 → @ckeditor_ckeditor5-special-characters@46.1.1}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@46.1.0 → @ckeditor_ckeditor5-style@46.1.1}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-table@46.1.0 → @ckeditor_ckeditor5-table@46.1.1}/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-typing@46.1.0 → @ckeditor_ckeditor5-typing@46.1.1}/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-ui@46.1.0 → @ckeditor_ckeditor5-ui@46.1.1}/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@46.1.0 → @ckeditor_ckeditor5-undo@46.1.1}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@46.1.0 → @ckeditor_ckeditor5-upload@46.1.1}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@46.1.0 → @ckeditor_ckeditor5-utils@46.1.1}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@46.1.0 → @ckeditor_ckeditor5-widget@46.1.1}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/dist/connect/helpers.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/dist/html/external.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/dist/html/index_html.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/dist/react/external.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/dist/react/index_react.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.6/node_modules/@figma/code-connect/package.json.js +1 -0
- package/dist/node_modules/.pnpm/axe-core@4.11.0/node_modules/axe-core/axe.js +30 -0
- package/dist/node_modules/.pnpm/color-convert@3.1.0/node_modules/color-convert/conversions.js +1 -1
- package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.js +1 -1
- package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/PhoneNumber.js +1 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/format.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +1 -0
- package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +1 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/isPossible.js +1 -0
- package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/metadata.js +1 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/parse.js +1 -0
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +2 -0
- package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/help-text/help-text.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-label/input-label.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/loading-spinner/gator/loading-spinner.gator.scss.js +1 -1
- package/dist/types/components/input/gator/input-label/input-label.gator.d.ts +1 -0
- package/dist/utils/brand-color-utils.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +14 -14
- package/web-types.json +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/dist/connect/helpers.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/dist/html/external.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/dist/html/index_html.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/dist/react/external.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/dist/react/index_react.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.5/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/axe-core@4.10.3/node_modules/axe-core/axe.js +0 -30
- package/dist/node_modules/.pnpm/color-name@2.0.0/node_modules/color-name/index.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/format.js +0 -2
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/isPossible.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/parse.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.15/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -2
- package/dist/packages/web-components/src/components/input/gator/help-text/help-text.gator.tokens.scss.js +0 -1
- /package/dist/assets/node_modules/.pnpm/{ckeditor5@46.1.0 → ckeditor5@46.1.1}/node_modules/ckeditor5/dist/ckeditor5.css +0 -0
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@46.1.0 → @ckeditor_ckeditor5-icons@46.1.1}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@46.1.0 → @ckeditor_ckeditor5-watchdog@46.1.1}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/client/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/common/fetch.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/common/logging.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/common/updates.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.5 → @figma_code-connect@1.3.6}/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.6.2_typescript@5.9.2__playwright@1.55.0__e423b5c96de6c1c8a0306954de1e5183 → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.7.2_typescript@5.9.3__playwright@1.56.0__7ad78200fd030137af34fe232ff09ad4}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{color@5.0.0 → color@5.0.2}/node_modules/color/index.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/ParseError.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/isValid.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.15 → libphonenumber-js@1.12.24}/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.6.2_typescript@5._c8aa1f927fae70a4e1e4b925dfd1af88 → storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.7.2_typescript@5._5840b52d77463bfbf25f4b960c0b3a83}/node_modules/storybook/dist/client-logger/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.6.2_typescript@5._c8aa1f927fae70a4e1e4b925dfd1af88 → storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.7.2_typescript@5._5840b52d77463bfbf25f4b960c0b3a83}/node_modules/storybook/dist/core-events/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.6.2_typescript@5._c8aa1f927fae70a4e1e4b925dfd1af88 → storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.7.2_typescript@5._5840b52d77463bfbf25f4b960c0b3a83}/node_modules/storybook/dist/instrumenter/index.js +0 -0
- /package/dist/node_modules/.pnpm/{storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.6.2_typescript@5._c8aa1f927fae70a4e1e4b925dfd1af88 → storybook@9.1.10_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.7.2_typescript@5._5840b52d77463bfbf25f4b960c0b3a83}/node_modules/storybook/dist/test/index.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.6.2_@vitest_browser@3.2.4_@vitest_ui@3._a2d9a3453db9fe314f49e01db7c034c4 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.7.2_@vitest_browser@3.2.4_@vitest_ui@3._8fc2fba47a45bae10a0e0e4f0a3c9eee}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.6.2_@vitest_browser@3.2.4_@vitest_ui@3._a2d9a3453db9fe314f49e01db7c034c4 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.7.2_@vitest_browser@3.2.4_@vitest_ui@3._8fc2fba47a45bae10a0e0e4f0a3c9eee}/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.6.2_@vitest_browser@3.2.4_@vitest_ui@3._a2d9a3453db9fe314f49e01db7c034c4 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.7.2_@vitest_browser@3.2.4_@vitest_ui@3._8fc2fba47a45bae10a0e0e4f0a3c9eee}/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.6.2_@vitest_browser@3.2.4_@vitest_ui@3._a2d9a3453db9fe314f49e01db7c034c4 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.7.2_@vitest_browser@3.2.4_@vitest_ui@3._8fc2fba47a45bae10a0e0e4f0a3c9eee}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as p,Command as ee}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as p,Command as ee}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Delete as ue,findAttributeRange as C,TextWatcher as he,getLastTextLine as me,TwoStepCaretMovement as K,Input as fe,inlineHighlight as ke}from"../../../../../@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{ClipboardPipeline as ge}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{env as we,keyCodes as be,Collection as te,first as ie,toMap as A,ObservableMixin as pe,FocusTracker as x,KeystrokeHandler as S,diff as _e}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ClickObserver as Ve,ModelLivePosition as $,Matcher as ve}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{IconUnlink as Le,IconPencil as Ie,IconSettings as ye,IconLink as se,IconPreviousArrow as B,IconNextArrow as Te}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ContextualBalloon as G,ToolbarView as Pe,CssTransitionDisablerMixin as W,ButtonView as w,SwitchButtonView as Ee,MenuBarMenuListItemButtonView as Ce,clickOutsideHandler as Ae,View as L,ViewCollection as F,FocusCycler as H,ListView as R,ListItemView as D,FormHeaderView as U,IconView as xe,submitHandler as Se,LabeledFieldView as X,createLabeledInputText as j,FormRowView as J}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{isWidget as Be}from"../../../../../@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{upperFirst as Fe}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/string/upperFirst.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class He{_definitions=new Set;get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(t=>this._definitions.add(t)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(t,i,s)=>{if(!s.consumable.test(i.item,"attribute:linkHref")||!(i.item.is("selection")||s.schema.isInline(i.item)))return;const n=s.writer,o=n.document.selection;for(const a of this._definitions){const r=n.createAttributeElement("a",a.attributes,{priority:5});a.classes&&n.addClass(a.classes,r);for(const c in a.styles)n.setStyle(c,a.styles[c],r);n.setCustomProperty("link",!0,r),a.callback(i.attributeNewValue)?i.item.is("selection")?n.wrap(o.getFirstRange(),r):n.wrap(s.mapper.toViewRange(i.range),r):n.unwrap(s.mapper.toViewRange(i.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(t,i,{writer:s,mapper:n})=>{const o=n.toViewElement(i.item),a=Array.from(o.getChildren()).find(r=>r.is("element","a"));if(a)for(const r of this._definitions){const c=A(r.attributes);if(r.callback(i.attributeNewValue)){for(const[u,h]of c)u==="class"?s.addClass(h,a):s.setAttribute(u,h,a);r.classes&&s.addClass(r.classes,a);for(const u in r.styles)s.setStyle(u,r.styles[u],a)}else{for(const[u,h]of c)u==="class"?s.removeClass(h,a):s.removeAttribute(u,a);r.classes&&s.removeClass(r.classes,a);for(const u in r.styles)s.removeStyle(u,a)}}})}}}const Re=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,De="^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))",Ue=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Oe=/^((\w+:(\/{2,})?)|(\W))/i,Me=["https?","ftps?","mailto"],v="Ctrl+K";function Ne(l){return l.is("attributeElement")&&!!l.getCustomProperty("link")}function Y(l,{writer:e}){const t=e.createAttributeElement("a",{href:l},{priority:5});return e.setCustomProperty("link",!0,t),t}function ne(l,e=Me){const t=String(l),i=e.join("|"),s=new RegExp(`${De.replace("<protocols>",i)}`,"i");return qe(t,s)?t:"#"}function qe(l,e){return!!l.replace(Re,"").match(e)}function ze(l,e){const t={"Open in a new tab":l("Open in a new tab"),Downloadable:l("Downloadable")};return e.forEach(i=>("label"in i&&t[i.label]&&(i.label=t[i.label]),i)),e}function Ke(l){const e=[];if(l)for(const[t,i]of Object.entries(l)){const s=Object.assign({},i,{id:`link${Fe(t)}`});e.push(s)}return e}function P(l,e){return l?e.checkAttribute(l.name,"linkHref"):!1}function $e(l){return Ue.test(l)}function O(l,e){const t=$e(l)?"mailto:":e,i=!!t&&!oe(l);return l&&i?t+l:l}function oe(l){return Oe.test(l)}function Ge(l){window.open(l,"_blank","noopener")}function E(l){let e="";for(const t of l.getItems()){if(!t.is("$text")&&!t.is("$textProxy"))return;e+=t.data}return e}class We extends ee{manualDecorators=new te;automaticDecorators=new He;restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement()||ie(t.getSelectedBlocks());P(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const s of this.manualDecorators)s.value=this._getDecoratorStateFromModel(s.id)}execute(e,t={},i){const s=this.editor.model,n=s.document.selection,o=[],a=[];for(const r in t)t[r]?o.push(r):a.push(r);s.change(r=>{const c=d=>{r.setAttribute("linkHref",e,d),o.forEach(m=>r.setAttribute(m,!0,d)),a.forEach(m=>r.removeAttribute(m,d))},u=(d,m)=>{const k=E(d);if(!k)return d;let g=i;if(g||(g=m&&m==k?e:k),g!=k){const I=Xe(k,g);let f=0;for(const{offset:V,actual:y,expected:M}of I){const N=V+f,q=r.createRange(d.start.getShiftedBy(N),d.start.getShiftedBy(N+y.length)),ae=je(q,d).getAttributes(),ce=Array.from(ae).filter(([de])=>s.schema.getAttributeProperties(de).isFormatting),z=r.createText(M,ce);c(z),s.insertContent(z,q),f+=M.length}return r.createRange(d.start,d.start.getShiftedBy(g.length))}},h=d=>{const{plugins:m}=this.editor;if(r.setSelection(d.end),m.has("TwoStepCaretMovement"))m.get("TwoStepCaretMovement")._handleForwardMovement();else for(const k of["linkHref",...o,...a])r.removeSelectionAttribute(k)};if(n.isCollapsed){const d=n.getFirstPosition();if(n.hasAttribute("linkHref")){const m=n.getAttribute("linkHref"),k=C(d,"linkHref",m,s),g=u(k,m);c(g||k),g&&h(g)}else if(e!==""){const m=A(n.getAttributes());m.set("linkHref",e),o.forEach(g=>{m.set(g,!0)});const k=s.insertContent(r.createText(i||e,m),d);h(k)}}else{const d=Array.from(n.getRanges()),m=s.schema.getValidRanges(d,"linkHref"),k=[];for(const f of n.getSelectedBlocks())s.schema.checkAttribute(f,"linkHref")&&k.push(r.createRangeOn(f));const g=k.slice();for(const f of m)this._isRangeToUpdate(f,k)&&g.push(f);const I=d.map(f=>({start:$.fromPosition(f.start,"toPrevious"),end:$.fromPosition(f.end,"toNext")}));for(let f of g){const V=(f.start.textNode||f.start.nodeAfter).getAttribute("linkHref");f=u(f,V)||f,c(f)}r.setSelection(I.map(f=>{const V=f.start.toPosition(),y=f.end.toPosition();return f.start.detach(),f.end.detach(),s.createRange(V,y)}))}})}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,s=i.getSelectedElement();return P(s,t.schema)?s.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}function Xe(l,e){const t=_e(l,e),i={equal:0,insert:0,delete:0},s=[];let n="",o="";for(const a of[...t,null])a=="insert"?o+=e[i.equal+i.insert]:a=="delete"?n+=l[i.equal+i.delete]:(n.length||o.length)&&(s.push({offset:i.equal,actual:n,expected:o}),n="",o=""),a&&i[a]++;return s}function je(l,e){if(!l.isCollapsed)return ie(l.getItems());const t=l.start;return t.textNode?t.textNode:!t.nodeBefore||t.isEqual(e.start)?t.nodeAfter:t.nodeBefore}class Je extends ee{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();P(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,s=e.commands.get("link");t.change(n=>{const o=i.isCollapsed?[C(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const a of o)if(n.removeAttribute("linkHref",a),s)for(const r of s.manualDecorators)n.removeAttribute(r.id,a)})}}class Ye extends pe(){id;defaultValue;label;attributes;classes;styles;constructor({id:e,label:t,attributes:i,classes:s,styles:n,defaultValue:o}){super(),this.id=e,this.set("value",void 0),this.defaultValue=o,this.label=t,this.attributes=i,this.classes=s,this.styles=n}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const Qe="ck-link_selected",Q="automatic",Ze="manual",et=/^(https?:)?\/\//;class _ extends p{_linkOpeners=[];static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[K,fe,ge]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1,toolbar:["linkPreview","|","editLink","linkProperties","unlink"]})}init(){const e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Y}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(n,o)=>Y(ne(n,t),o)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:n=>n.getAttribute("href")}}),e.commands.add("link",new We(e)),e.commands.add("unlink",new Je(e));const i=ze(e.t,Ke(e.config.get("link.decorators")));this._enableAutomaticDecorators(i.filter(n=>n.mode===Q)),this._enableManualDecorators(i.filter(n=>n.mode===Ze)),e.plugins.get(K).registerAttribute("linkHref"),ke(e,"linkHref","a",Qe),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_registerLinkOpener(e){this._linkOpeners.push(e)}_enableAutomaticDecorators(e){const t=this.editor,s=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&s.add({id:"linkIsExternal",mode:Q,callback:n=>!!n&&et.test(n),attributes:{target:"_blank",rel:"noopener noreferrer"}}),s.add(e),s.length&&t.conversion.for("downcast").add(s.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,s=t.commands.get("link").manualDecorators;e.forEach(n=>{t.model.schema.extend("$text",{allowAttributes:n.id});const o=new Ye(n);s.add(o),t.conversion.for("downcast").attributeToElement({model:o.id,view:(a,{writer:r,schema:c},{item:u})=>{if((u.is("selection")||c.isInline(u))&&a){const h=r.createAttributeElement("a",o.attributes,{priority:5});o.classes&&r.addClass(o.classes,h);for(const d in o.styles)r.setStyle(d,o.styles[d],h);return r.setCustomProperty("link",!0,h),h}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...o._createPattern()},model:{key:o.id}})})}_enableLinkOpen(){const e=this.editor,i=e.editing.view.document,s=n=>{this._linkOpeners.some(o=>o(n))||Ge(n)};this.listenTo(i,"click",(n,o)=>{if(!(we.isMac?o.domEvent.metaKey:o.domEvent.ctrlKey))return;let r=o.domTarget;if(r.tagName.toLowerCase()!="a"&&(r=r.closest("a")),!r)return;const c=r.getAttribute("href");c&&(n.stop(),o.preventDefault(),s(c))},{context:"$capture"}),this.listenTo(i,"keydown",(n,o)=>{const r=e.commands.get("link").value;r&&o.keyCode===be.enter&&o.altKey&&(n.stop(),s(r))})}_enableSelectionAttributesFixer(){const t=this.editor.model,i=t.document.selection;this.listenTo(i,"change:attribute",(s,{attributeKeys:n})=>{!n.includes("linkHref")||i.hasAttribute("linkHref")||t.change(o=>{tt(o,it(t.schema))})})}_enableClipboardIntegration(){const e=this.editor,t=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(s,n)=>{t.change(o=>{const a=o.createRangeIn(n.content);for(const r of a.getItems())if(r.hasAttribute("linkHref")){const c=O(r.getAttribute("linkHref"),i);o.setAttribute("linkHref",c,r)}})})}}function tt(l,e){l.removeSelectionAttribute("linkHref");for(const t of e)l.removeSelectionAttribute(t)}function it(l){return l.getDefinition("$text").allowAttributes.filter(t=>t.startsWith("link"))}class st extends w{constructor(e){super(e);const t=this.bindTemplate;this.set({href:void 0,withText:!0}),this.extendTemplate({attributes:{class:["ck-link-toolbar__preview"],href:t.to("href"),target:"_blank",rel:"noopener noreferrer"},on:{click:t.to(i=>{if(this.href){const s=()=>i.preventDefault();this.fire("navigate",this.href,s)}})}}),this.template.tag="a"}}class nt extends L{focusTracker=new x;keystrokes=new S;backButtonView;saveButtonView;displayedTextInputView;urlInputView;children;providersListChildren;_validators;_focusables=new F;_focusCycler;constructor(e,t){super(e),this._validators=t,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.displayedTextInputView=this._createDisplayedTextInput(),this.urlInputView=this._createUrlInput(),this.providersListChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView()]),this._createFormChildren(),this.listenTo(this.providersListChildren,"add",()=>{this.stopListening(this.providersListChildren,"add"),this.children.add(this._createProvidersListView())}),this._focusCycler=new H({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-link-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),Se({view:this}),[this.urlInputView,this.saveButtonView,...this.providersListChildren,this.backButtonView,this.displayedTextInputView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createBackButton(){const e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:B,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createSaveButton(){const e=this.locale.t,t=new w(this.locale);return t.set({label:e("Insert"),tooltip:!1,withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),t}_createHeaderView(){const e=this.locale.t,t=new U(this.locale,{label:e("Link")});return t.children.add(this.backButtonView,0),t}_createProvidersListView(){const e=new R(this.locale);return e.extendTemplate({attributes:{class:["ck-link-form__providers-list"]}}),e.items.bindTo(this.providersListChildren).using(t=>{const i=new D(this.locale);return i.children.add(t),i}),e}_createDisplayedTextInput(){const e=this.locale.t,t=new X(this.locale,j);return t.label=e("Displayed text"),t.class="ck-labeled-field-view_full-width",t}_createUrlInput(){const e=this.locale.t,t=new X(this.locale,j);return t.fieldView.inputMode="url",t.label=e("Link URL"),t.class="ck-labeled-field-view_full-width",t}_createFormChildren(){this.children.add(new J(this.locale,{children:[this.displayedTextInputView],class:["ck-form__row_large-top-padding"]})),this.children.add(new J(this.locale,{children:[this.urlInputView,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding","ck-form__row_large-bottom-padding"]}))}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}class ot extends L{focusTracker=new x;keystrokes=new S;backButtonView;listView;listChildren;emptyListInformation;children;_focusables=new F;_focusCycler;constructor(e){super(e),this.listChildren=this.createCollection(),this.backButtonView=this._createBackButton(),this.listView=this._createListView(),this.emptyListInformation=this._createEmptyLinksListItemView(),this.children=this.createCollection([this._createHeaderView(),this.emptyListInformation]),this.set("title",""),this.set("emptyListPlaceholder",""),this.set("hasItems",!1),this.listenTo(this.listChildren,"change",()=>{this.hasItems=this.listChildren.length>0}),this.on("change:hasItems",(t,i,s)=>{s?(this.children.remove(this.emptyListInformation),this.children.add(this.listView)):(this.children.remove(this.listView),this.children.add(this.emptyListInformation))}),this.keystrokes.set("Esc",(t,i)=>{this.fire("cancel"),i()}),this._focusCycler=new H({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-providers"],tabindex:"-1"},children:this.children})}render(){super.render(),[this.listView,this.backButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createListView(){const e=new R(this.locale);return e.extendTemplate({attributes:{class:["ck-link-providers__list"]}}),e.items.bindTo(this.listChildren).using(t=>{const i=new D(this.locale);return i.children.add(t),i}),e}_createBackButton(){const e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:B,tooltip:!0}),t.delegate("execute").to(this,"cancel"),t}_createHeaderView(){const e=new U(this.locale);return e.bind("label").to(this,"title"),e.children.add(this.backButtonView,0),e}_createEmptyLinksListItemView(){const e=new L(this.locale);return e.setTemplate({tag:"p",attributes:{class:["ck","ck-link__empty-list-info"]},children:[{text:this.bindTemplate.to("emptyListPlaceholder")}]}),e}}class rt extends L{focusTracker=new x;keystrokes=new S;backButtonView;children;listChildren;_focusables=new F;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.listChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView(),this._createListView()]),this._focusCycler=new H({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-properties"],tabindex:"-1"},children:this.children}),this.keystrokes.set("Esc",(t,i)=>{this.fire("back"),i()})}render(){super.render(),[...this.listChildren,this.backButtonView].forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){const e=this.locale.t,t=new w(this.locale);return t.set({class:"ck-button-back",label:e("Back"),icon:B,tooltip:!0}),t.delegate("execute").to(this,"back"),t}_createHeaderView(){const e=this.locale.t,t=new U(this.locale,{label:e("Link properties")});return t.children.add(this.backButtonView,0),t}_createListView(){const e=new R(this.locale);return e.extendTemplate({attributes:{class:["ck-link__list"]}}),e.items.bindTo(this.listChildren).using(t=>{const i=new D(this.locale);return i.children.add(t),i}),e}}class lt extends w{arrowView;constructor(e){super(e),this.set({withText:!0}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-link__button"]}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new xe;return e.content=Te,e}}const b="link-ui";class re extends p{toolbarView=null;formView=null;linkProviderItemsView=null;propertiesView=null;_balloon;_linksProviders=new te;static get requires(){return[G,_]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=this.editor.t;this.set("selectedLinkableText",void 0),e.editing.view.addObserver(Ve),this._balloon=e.plugins.get(G),this._registerComponents(),this._registerEditingOpeners(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:b,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:b,view:(i,{writer:s})=>{if(!i.markerRange.isCollapsed)return null;const n=s.createUIElement("span");return s.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],n),n}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:v},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.propertiesView&&this.propertiesView.destroy(),this.formView&&this.formView.destroy(),this.toolbarView&&this.toolbarView.destroy(),this.linkProviderItemsView&&this.linkProviderItemsView.destroy()}registerLinksListProvider(e){const t=this._linksProviders.filter(i=>(i.order||0)<=(e.order||0)).length;this._linksProviders.add(e,t)}_createViews(){const e=this.editor.commands.get("link");this.toolbarView=this._createToolbarView(),this.formView=this._createFormView(),e.manualDecorators.length&&(this.propertiesView=this._createPropertiesView()),this._enableUserBalloonInteractions()}_createToolbarView(){const e=this.editor,t=new Pe(e.locale),i=e.commands.get("link");t.class="ck-link-toolbar";let s=e.config.get("link.toolbar");return i.manualDecorators.length||(s=s.filter(n=>n!=="linkProperties")),t.fillFromConfig(s,e.ui.componentFactory),t.keystrokes.set("Esc",(n,o)=>{this._hideUI(),o()}),t.keystrokes.set(v,(n,o)=>{this._addFormView(),o()}),e.ui.addToolbar(t,{isContextual:!0,beforeFocus:()=>{this._getSelectedLinkElement()&&!this._isToolbarVisible&&this._showUI(!0)},afterBlur:()=>{this._hideUI(!1)}}),t}_createFormView(){const e=this.editor,t=e.locale.t,i=e.commands.get("link"),s=e.config.get("link.defaultProtocol"),n=new(W(nt))(e.locale,at(e));return n.displayedTextInputView.bind("isEnabled").to(this,"selectedLinkableText",o=>o!==void 0),n.urlInputView.bind("isEnabled").to(i,"isEnabled"),n.saveButtonView.bind("isEnabled").to(i,"isEnabled"),n.saveButtonView.bind("label").to(i,"value",o=>t(o?"Update":"Insert")),this.listenTo(n,"submit",()=>{if(n.isValid()){const o=n.urlInputView.fieldView.element.value,a=O(o,s),r=n.displayedTextInputView.fieldView.element.value;e.execute("link",a,this._getDecoratorSwitchesState(),r!==this.selectedLinkableText?r:void 0),this._closeFormView()}}),this.listenTo(n.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(n,"cancel",()=>{this._closeFormView()}),n.keystrokes.set("Esc",(o,a)=>{this._closeFormView(),a()}),n.providersListChildren.bindTo(this._linksProviders).using(o=>this._createLinksListProviderButton(o)),n}_createLinkProviderListView(e){return e.getListItems().map(({href:t,label:i,icon:s})=>{const n=new w;return n.set({label:i,icon:s,tooltip:!1,withText:!0}),n.on("execute",()=>{this.formView.resetFormStatus(),this.formView.urlInputView.fieldView.value=t,this.editor.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),n})}_createLinkProviderItemsView(e){const t=this.editor,i=t.locale.t,s=new ot(t.locale),{emptyListPlaceholder:n,label:o}=e;return s.emptyListPlaceholder=n||i("No links available"),s.title=o,this.listenTo(s,"cancel",()=>{t.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),s}_createPropertiesView(){const e=this.editor,t=this.editor.commands.get("link"),i=new(W(rt))(e.locale);return this.listenTo(i,"back",()=>{e.editing.view.focus(),this._removePropertiesView()}),i.listChildren.bindTo(t.manualDecorators).using(s=>{const n=new Ee(e.locale);return n.set({label:s.label,withText:!0}),n.bind("isOn").toMany([s,t],"value",(o,a)=>a===void 0&&o===void 0?!!s.defaultValue:!!o),n.on("execute",()=>{s.set("value",!n.isOn),e.execute("link",t.value,this._getDecoratorSwitchesState())}),n}),i}_getDecoratorSwitchesState(){const e=this.editor.commands.get("link");return Array.from(e.manualDecorators).reduce((t,i)=>{const s=e.value===void 0&&i.value===void 0?i.defaultValue:i.value;return{...t,[i.id]:!!s}},{})}_registerEditingOpeners(){this.editor.plugins.get(_)._registerLinkOpener(t=>{const i=this._getLinkProviderLinkByHref(t);if(!i)return!1;const{item:s,provider:n}=i;return n.navigate?n.navigate(s):!1})}_registerComponents(){const e=this.editor;e.ui.componentFactory.add("link",()=>{const t=this._createButton(w);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:link",()=>{const t=this._createButton(Ce);return t.set({role:"menuitemcheckbox"}),t}),e.ui.componentFactory.add("linkPreview",t=>{const i=new st(t),s=e.config.get("link.allowedProtocols"),n=e.commands.get("link"),o=t.t;i.bind("isEnabled").to(n,"value",r=>!!r),i.bind("href").to(n,"value",r=>r&&ne(r,s));const a=r=>{if(!r){i.label=void 0,i.icon=void 0,i.tooltip=o("Open link in new tab");return}const c=this._getLinkProviderLinkByHref(r);if(c){const{label:u,tooltip:h,icon:d}=c.item;i.label=u,i.tooltip=h||!1,i.icon=d}else i.label=r,i.icon=void 0,i.tooltip=o("Open link in new tab")};return a(n.value),this.listenTo(n,"change:value",(r,c,u)=>{a(u)}),this.listenTo(i,"navigate",(r,c,u)=>{const h=this._getLinkProviderLinkByHref(c);if(!h)return;const{provider:d,item:m}=h,{navigate:k}=d;k&&k(m)&&(r.stop(),u())}),i}),e.ui.componentFactory.add("unlink",t=>{const i=e.commands.get("unlink"),s=new w(t),n=t.t;return s.set({label:n("Unlink"),icon:Le,tooltip:!0}),s.bind("isEnabled").to(i),this.listenTo(s,"execute",()=>{e.execute("unlink"),this._hideUI()}),s}),e.ui.componentFactory.add("editLink",t=>{const i=e.commands.get("link"),s=new w(t),n=t.t;return s.set({label:n("Edit link"),icon:Ie,tooltip:!0}),s.bind("isEnabled").to(i),this.listenTo(s,"execute",()=>{this._addFormView()}),s}),e.ui.componentFactory.add("linkProperties",t=>{const i=e.commands.get("link"),s=new w(t),n=t.t;return s.set({label:n("Link properties"),icon:ye,tooltip:!0}),s.bind("isEnabled").to(i,"isEnabled",i,"value",i,"manualDecorators",(o,a,r)=>o&&!!a&&r.length>0),this.listenTo(s,"execute",()=>{this._addPropertiesView()}),s})}_createLinksListProviderButton(e){const t=this.editor.locale,i=new lt(t);return i.set({label:e.label}),this.listenTo(i,"execute",()=>{this._showLinksProviderView(e)}),i}_createButton(e){const t=this.editor,i=t.locale,s=t.commands.get("link"),n=new e(t.locale),o=i.t;return n.set({label:o("Link"),icon:se,keystroke:v,isToggleable:!0}),n.bind("isEnabled").to(s,"isEnabled"),n.bind("isOn").to(s,"value",a=>!!a),this.listenTo(n,"execute",()=>{t.editing.view.scrollToTheSelection(),this._showUI(!0),this._getSelectedLinkElement()&&this._addFormView()}),n}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(v,(i,s)=>{s(),e.commands.get("link").isEnabled&&(e.editing.view.scrollToTheSelection(),this._showUI(!0))})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,t)=>{this._isToolbarVisible&&!this.toolbarView.focusTracker.isFocused&&(this.toolbarView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),Ae({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>{this._hideUI(!1)}})}_addToolbarView(){this.toolbarView||this._createViews(),!this._isToolbarInPanel&&this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this.formView.backButtonView.isVisible=e.isEnabled&&!!e.value,this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.selectedLinkableText=this._getSelectedLinkableText(),this.formView.displayedTextInputView.fieldView.value=this.selectedLinkableText||"",this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_addPropertiesView(){this.propertiesView||this._createViews(),!this._arePropertiesInPanel&&(this.propertiesView.disableCssTransitions(),this._balloon.add({view:this.propertiesView,position:this._getBalloonPositionData()}),this.propertiesView.enableCssTransitions(),this.propertiesView.focus())}_showLinksProviderView(e){this.linkProviderItemsView&&this._removeLinksProviderView(),this.linkProviderItemsView=this._createLinkProviderItemsView(e),this._addLinkProviderItemsView(e)}_addLinkProviderItemsView(e){this.linkProviderItemsView.listChildren.clear(),this.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(e)),this._balloon.add({view:this.linkProviderItemsView,position:this._getBalloonPositionData()}),this.linkProviderItemsView.focus()}_closeFormView(){const e=this.editor.commands.get("link");this.selectedLinkableText=void 0,e.value!==void 0?this._removeFormView():this._hideUI()}_removePropertiesView(){this._arePropertiesInPanel&&this._balloon.remove(this.propertiesView)}_removeLinksProviderView(){this._isLinksListInPanel&&this._balloon.remove(this.linkProviderItemsView)}_removeFormView(e=!0){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.displayedTextInputView.fieldView.reset(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._isToolbarVisible?this._addFormView():this._addToolbarView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addToolbarView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(e=!0){const t=this.editor;this._isUIInPanel&&(this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e&&t.editing.view.focus(),this._removeLinksProviderView(),this._removePropertiesView(),this._removeFormView(e),this._isToolbarInPanel&&this._balloon.remove(this.toolbarView),this._hideFakeVisualSelection())}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),s=o();const n=()=>{const a=this._getSelectedLinkElement(),r=o();i&&!a||!i&&r!==s?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=a,s=r};function o(){return t.selection.focus.getAncestors().reverse().find(a=>a.is("element"))}this.listenTo(e.ui,"update",n),this.listenTo(this._balloon,"change:visibleView",n)}get _arePropertiesInPanel(){return!!this.propertiesView&&this._balloon.hasView(this.propertiesView)}get _isLinksListInPanel(){return!!this.linkProviderItemsView&&this._balloon.hasView(this.linkProviderItemsView)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _isToolbarInPanel(){return!!this.toolbarView&&this._balloon.hasView(this.toolbarView)}get _isPropertiesVisible(){return!!this.propertiesView&&this._balloon.visibleView===this.propertiesView}get _isFormVisible(){return!!this.formView&&this._balloon.visibleView==this.formView}get _isToolbarVisible(){return!!this.toolbarView&&this._balloon.visibleView===this.toolbarView}get _isUIInPanel(){return this._arePropertiesInPanel||this._isLinksListInPanel||this._isFormInPanel||this._isToolbarInPanel}get _isUIVisible(){return this._isPropertiesVisible||this._isLinksListInPanel||this._isFormVisible||this._isToolbarVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;if(this.editor.model.markers.has(b)){const s=this.editor.editing.mapper.markerNameToElements(b);if(s){const n=Array.from(s),o=e.createRange(e.createPositionBefore(n[0]),e.createPositionAfter(n[n.length-1]));return{target:e.domConverter.viewRangeToDom(o)}}}return{target:()=>{const s=this._getSelectedLinkElement();return s?e.domConverter.mapViewToDom(s):e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&Be(i))return T(t.getFirstPosition());{const s=t.getFirstRange().getTrimmed(),n=T(s.start),o=T(s.end);return!n||n!=o?null:e.createRangeIn(n).getTrimmed().isEqual(s)?n:null}}_getSelectedLinkableText(){const e=this.editor.model,t=this.editor.editing,i=this._getSelectedLinkElement();if(!i)return E(e.document.selection.getFirstRange());const s=t.view.createRangeOn(i),n=t.mapper.toModelRange(s);return E(n)}_getLinkProviderLinkByHref(e){if(!e)return null;for(const t of this._linksProviders){const i=t.getItem?t.getItem(e):t.getListItems().find(s=>s.href===e);if(i)return{provider:t,item:i}}return null}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(b))t.updateMarker(b,{range:i});else if(i.start.isAtEnd){const s=i.start.getLastMatchingPosition(({item:n})=>!e.schema.isContent(n),{boundaries:i});t.addMarker(b,{usingOperation:!1,affectsData:!1,range:t.createRange(s,i.end)})}else t.addMarker(b,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(b)&&e.change(t=>{t.removeMarker(b)})}}function T(l){return l.getAncestors().find(e=>Ne(e))||null}function at(l){const e=l.t,t=l.config.get("link.allowCreatingEmptyLinks");return[i=>{if(!t&&!i.url.length)return e("Link URL must not be empty.")}]}const ct=4,le=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63}))|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i"),dt=2;class ut extends p{static get requires(){return[ue,_]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){const t=this.editor.model.document.selection;t.on("change:range",()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?C(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const s=this.editor.model,n=s.document.selection,o=n.getFirstPosition(),a=n.getLastPosition();let r=t.getJoined(this._expandLinkRange(s,o)||t);r&&(r=r.getJoined(this._expandLinkRange(s,a)||t)),r&&(r.start.isBefore(o)||r.end.isAfter(a))&&e.setSelection(r)}_enablePasteLinking(){const e=this.editor,t=e.model,i=t.document.selection,s=e.plugins.get("ClipboardPipeline"),n=e.commands.get("link");s.on("inputTransformation",(o,a)=>{if(!this.isEnabled||!n.isEnabled||i.isCollapsed||a.method!=="paste"||i.rangeCount>1)return;const r=i.getFirstRange(),c=a.dataTransfer.getData("text/plain");if(!c)return;const u=c.match(le);u&&u[2]===c&&(t.change(h=>{this._selectEntireLinks(h,r),n.execute(c)}),o.stop())},{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new he(e.model,i=>{let s=i;if(!ht(s))return;s=s.slice(0,-1),"!.:,;?".includes(s[s.length-1])&&(s=s.slice(0,-1));const n=Z(s);if(n)return{url:n,removedTrailingCharacters:i.length-s.length}});t.on("matched:data",(i,s)=>{const{batch:n,range:o,url:a,removedTrailingCharacters:r}=s;if(!n.isTyping)return;const c=o.end.getShiftedBy(-r),u=c.getShiftedBy(-a.length),h=e.model.createRange(u,c);this._applyAutoLink(a,h)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const s=t.document.selection.getFirstPosition();let n;s.parent.previousSibling?.is("element")?n=t.createRangeIn(s.parent.previousSibling):n=t.createRange(t.createPositionAt(s.parent,0),s),this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const s=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(s.parent,0),s.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:s}=me(e,t),n=Z(i);if(n){const o=t.createRange(s.end.getShiftedBy(-n.length),s.end);this._applyAutoLink(n,o)}}_applyAutoLink(e,t){const i=this.editor.model,s=this.editor.config.get("link.defaultProtocol"),n=O(e,s);!this.isEnabled||!mt(t,i)||!oe(n)||ft(t)||this._persistAutoLink(n,t)}_persistAutoLink(e,t){const i=this.editor.model,s=this.editor.plugins.get("Delete");i.enqueueChange(n=>{n.setAttribute("linkHref",e,t),i.enqueueChange(()=>{s.requestUndoOnBackspace()})})}}function ht(l){return l.length>ct&&l[l.length-1]===" "&&l[l.length-2]!==" "}function Z(l){const e=le.exec(l);return e?e[dt]:null}function mt(l,e){return e.schema.checkAttributeInSelection(e.createSelection(l),"linkHref")}function ft(l){const e=l.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}class xt extends p{static get requires(){return[_,re,ut]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}}class kt extends p{static get requires(){return["ImageEditing","ImageUtils",_]}static get pluginName(){return"LinkImageEditing"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(gt(e)),e.conversion.for("downcast").add(wt(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,i=e.commands.get("link").automaticDecorators;i.length&&e.conversion.for("downcast").add(i.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(bt(i)),e.conversion.for("upcast").add(pt(e,i))}}function gt(l){const e=l.plugins.has("ImageInlineEditing"),t=l.plugins.get("ImageUtils");return i=>{i.on("element:a",(s,n,o)=>{const a=n.viewItem,r=t.findViewImgElement(a);if(!r)return;const c=r.findAncestor(m=>t.isBlockImageView(m));if(e&&!c)return;const u={attributes:["href"]};if(!o.consumable.consume(a,u))return;const h=a.getAttribute("href");if(!h)return;let d=n.modelCursor.parent;if(!d.is("element","imageBlock")){const m=o.convertItem(r,n.modelCursor);n.modelRange=m.modelRange,n.modelCursor=m.modelCursor,d=n.modelCursor.nodeBefore}d&&d.is("element","imageBlock")&&o.writer.setAttribute("linkHref",h,d)},{priority:"high"})}}function wt(l){const e=l.plugins.get("ImageUtils");return t=>{t.on("attribute:linkHref:imageBlock",(i,s,n)=>{if(!n.consumable.consume(s.item,i.name))return;const o=n.mapper.toViewElement(s.item),a=n.writer,r=Array.from(o.getChildren()).find(h=>h.is("element","a")),c=e.findViewImgElement(o),u=c.parent.is("element","picture")?c.parent:c;if(r)s.attributeNewValue?a.setAttribute("href",s.attributeNewValue,r):(a.move(a.createRangeOn(u),a.createPositionAt(o,0)),a.remove(r));else{const h=a.createContainerElement("a",{href:s.attributeNewValue});a.insert(a.createPositionAt(o,0),h),a.move(a.createRangeOn(u),a.createPositionAt(h,0))}},{priority:"high"})}}function bt(l){return e=>{e.on(`attribute:${l.id}:imageBlock`,(t,i,s)=>{const n=s.mapper.toViewElement(i.item),o=Array.from(n.getChildren()).find(a=>a.is("element","a"));if(o){if(l.value===void 0){for(const a in l.attributes)s.writer.removeAttribute(a,o);l.classes&&s.writer.removeClass(l.classes,o);for(const a in l.styles)s.writer.removeStyle(a,o);return}for(const[a,r]of A(l.attributes))s.writer.setAttribute(a,r,o);l.classes&&s.writer.addClass(l.classes,o);for(const a in l.styles)s.writer.setStyle(a,l.styles[a],o)}})}}function pt(l,e){const t=l.plugins.has("ImageInlineEditing"),i=l.plugins.get("ImageUtils");return s=>{s.on("element:a",(n,o,a)=>{const r=o.viewItem,c=i.findViewImgElement(r);if(!c)return;const u=c.findAncestor(k=>i.isBlockImageView(k));if(t&&!u)return;const d=new ve(e._createPattern()).match(r);if(!d||!a.consumable.consume(r,d.match))return;const m=o.modelCursor.nodeBefore||o.modelCursor.parent;a.writer.setAttribute(e.id,!0,m)},{priority:"high"})}}class _t extends p{static get requires(){return[_,re,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(i,s)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(s.preventDefault(),i.stop())},{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",i=>{const s=new w(i),n=e.plugins.get("LinkUI"),o=e.commands.get("link");return s.set({isEnabled:!0,label:t("Link image"),icon:se,keystroke:v,tooltip:!0,isToggleable:!0}),s.bind("isEnabled").to(o,"isEnabled"),s.bind("isOn").to(o,"value",a=>!!a),this.listenTo(s,"execute",()=>{this._isSelectedLinkedImage(e.model.document.selection)?n._addToolbarView():n._showUI(!0)}),s})}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}class St extends p{static get requires(){return[kt,_t]}static get pluginName(){return"LinkImage"}static get isOfficialPlugin(){return!0}}export{ut as AutoLink,He as AutomaticLinkDecorators,xt as Link,We as LinkCommand,_ as LinkEditing,nt as LinkFormView,St as LinkImage,kt as LinkImageEditing,_t as LinkImageUI,Ye as LinkManualDecorator,rt as LinkPropertiesView,ot as LinkProviderItemsView,re as LinkUI,Je as UnlinkCommand,v as _LINK_KEYSTROKE,lt as _LinkButtonView,st as _LinkPreviewButtonView,Y as _createLinkElement,ne as _ensureSafeLinkUrl,E as _extractTextFromLinkRange,ze as _getLocalizedLinkDecorators,oe as _hasLinkProtocol,$e as _isEmailLink,Ke as _normalizeLinkDecorators,Ge as _openLink,O as addLinkProtocolIfApplicable,ne as ensureSafeUrl,Ne as isLinkElement,P as isLinkableElement};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as g,Command as _}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as g,Command as _}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Delete as Rt}from"../../../../../@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{Enter as Mt}from"../../../../../@ckeditor_ckeditor5-enter@46.1.1/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{CKEditorError as Dt,getCode as zt,toArray as T,first as D,parseKeystroke as $t,getLocalizedArrowKeyCodeDirection as Ut,env as G,uid as jt,FocusTracker as et,KeystrokeHandler as it,global as Wt}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{_normalizeFontSizeOptions as st}from"../../../../../@ckeditor_ckeditor5-font@46.1.1/node_modules/@ckeditor/ckeditor5-font/dist/index.js";import{ClipboardPipeline as qt}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{createDropdown as Kt,SplitButtonView as Ht,MenuBarMenuView as Yt,ButtonView as Z,MenuBarMenuListItemButtonView as Gt,focusChildOnDropdownOpen as Zt,View as nt,ViewCollection as Jt,FocusCycler as Qt,addKeyboardHandlingForGrid as Xt,CollapsibleView as te,LabeledFieldView as ee,createLabeledInputNumber as ie,SwitchButtonView as se}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconListStyleDisc as ne,IconListStyleCircle as re,IconListStyleSquare as oe,IconListStyleDecimal as le,IconListStyleDecimalLeadingZero as ae,IconListStyleLowerRoman as ce,IconListStyleUpperRoman as ue,IconListStyleLowerLatin as de,IconListStyleUpperLatin as me,IconBulletedList as J,IconNumberedList as Q,IconTodoList as fe}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{DomEventObserver as pe,Matcher as kt}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class y{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward=e.direction=="forward",this._includeSelf=!!e.includeSelf,this._sameAttributes=T(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){const s=new this(t,e)[Symbol.iterator]();return D(s)}*[Symbol.iterator](){const t=[];for(const{node:e}of new P(this._getStartNode(),this._isForward?"forward":"backward")){const i=e.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some(s=>e.getAttribute(s)!==this._startElement.getAttribute(s)))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class P{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(t,e="forward"){this._node=t,this._isForward=e==="forward"}[Symbol.iterator](){return this}next(){if(!p(this._node))return{done:!0,value:void 0};const t=this._node.getAttribute("listIndent");let e=null;if(this._previous){const s=this._previousNodeIndent;t>s?this._previousNodesByIndent[s]=this._previous:t<s?(e=this._previousNodesByIndent[t]||null,this._previousNodesByIndent.length=t):e=this._previous}const i={node:this._node,previous:this._previous,previousNodeInList:e};return this._previous=this._node,this._previousNodeIndent=t,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class ge{_listHead;constructor(t){this._listHead=t}[Symbol.iterator](){return new P(this._listHead)}}class C{static next(){return jt()}}function p(n){return!!n&&n.is("element")&&n.hasAttribute("listItemId")}function w(n,t={}){return[...S(n,{...t,direction:"backward"}),...S(n,{...t,direction:"forward"})]}function S(n,t={}){const e=t.direction=="forward",i=Array.from(new y(n,{...t,includeSelf:e,sameIndent:!0,sameAttributes:"listItemId"}));return e?i:i.reverse()}function he(n){return Array.from(new y(n,{direction:"forward",higherIndent:!0}))}function At(n,t){const e=new y(n,{sameIndent:!0,sameAttributes:"listType",...t}),i=new y(n,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...t});return[...Array.from(e).reverse(),...i]}function A(n){return!y.first(n,{sameIndent:!0,sameAttributes:"listItemId"})}function rt(n){return!y.first(n,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function V(n,t={}){n=T(n);const e=t.withNested!==!1,i=new Set;for(const s of n)for(const r of w(s,{higherIndent:e}))i.add(r);return v(i)}function z(n){n=T(n);const t=new Set;for(const e of n)for(const i of At(e))t.add(i);return v(t)}function X(n,t){const e=S(n,{direction:"forward"}),i=C.next();for(const s of e)t.setAttribute("listItemId",i,s);return e}function W(n,t,e){const i={};for(const[r,o]of t.getAttributes())r.startsWith("list")&&(i[r]=o);const s=S(n,{direction:"forward"});for(const r of s)e.setAttributes(i,r);return s}function q(n,t,{expand:e,indentBy:i=1}={}){n=T(n);const s=e?V(n):n;for(const r of s){const o=r.getAttribute("listIndent")+i;o<0?$(r,t):t.setAttribute("listIndent",o,r)}return s}function be(n,t){n=T(n);const e=V(n),i=new Set,s=Math.min(...e.map(o=>o.getAttribute("listIndent"))),r=new Map;for(const o of e)r.set(o,y.first(o,{lowerIndent:!0}));for(const o of e){if(i.has(o))continue;i.add(o);const l=o.getAttribute("listIndent")-1;if(l<0){$(o,t);continue}if(o.getAttribute("listIndent")==s){const a=ye(o,r.get(o),t);for(const c of a)i.add(c);if(a.length)continue}t.setAttribute("listIndent",l,o)}return v(i)}function $(n,t){n=T(n);for(const e of n)e.is("element","listItem")&&t.rename(e,"paragraph");for(const e of n)for(const i of e.getAttributeKeys())i.startsWith("list")&&t.removeAttribute(i,e);return n}function E(n){if(!n.length)return!1;const t=n[0].getAttribute("listItemId");return t?!n.some(e=>e.getAttribute("listItemId")!=t):!1}function Ie(n,t){const e=[];let i=Number.POSITIVE_INFINITY;for(const{node:s}of new P(n.nextSibling)){const r=s.getAttribute("listIndent");if(r==0)break;r<i&&(i=r);const o=r-i;t.setAttribute("listIndent",o,s),e.push(s)}return e}function v(n){return Array.from(n).filter(t=>t.root.rootName!=="$graveyard").sort((t,e)=>t.index-e.index)}function F(n){const t=n.document.selection.getSelectedElement();return t&&n.schema.isObject(t)&&n.schema.isBlock(t)?t:null}function U(n,t){return t.checkChild(n.parent,"listItem")&&t.checkChild(n,"$text")&&!t.isObject(n)}function M(n){return n=="numbered"||n=="customNumbered"}function ye(n,t,e){return S(t,{direction:"forward"}).pop().index>n.index?W(n,t,e):[]}class ot extends _{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=lt(t.document.selection);t.change(i=>{const s=[];E(e)&&!A(e[0])?(this._direction=="forward"&&s.push(...q(e,i)),s.push(...X(e[0],i))):this._direction=="forward"?s.push(...q(e,i,{expand:!0})):s.push(...be(e,i));for(const r of s){if(!r.hasAttribute("listType"))continue;const o=y.first(r,{sameIndent:!0});o&&i.setAttribute("listType",o.getAttribute("listType"),r)}this._fireAfterExecute(s)})}_fireAfterExecute(t){this.fire("afterExecute",v(new Set(t)))}_checkEnabled(){let t=lt(this.editor.model.document.selection),e=t[0];if(!e)return!1;if(this._direction=="backward"||E(t)&&!A(t[0]))return!0;t=V(t),e=t[0];const i=y.first(e,{sameIndent:!0});return i?i.getAttribute("listType")==e.getAttribute("listType"):!1}}function lt(n){const t=Array.from(n.getSelectedBlocks()),e=t.findIndex(i=>!p(i));return e!=-1&&(t.length=e),t}class B extends _{type;_listWalkerOptions;constructor(t,e,i={}){super(t),this.type=e,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,s=F(e),r=Array.from(i.selection.getSelectedBlocks()).filter(l=>e.schema.checkAttribute(l,"listType")||U(l,e.schema)),o=t.forceValue!==void 0?!t.forceValue:this.value;e.change(l=>{if(o){const a=r[r.length-1],c=S(a,{direction:"forward"}),u=[];c.length>1&&u.push(...X(c[1],l)),u.push(...$(r,l)),u.push(...Ie(a,l)),this._fireAfterExecute(u)}else if((s||i.selection.isCollapsed)&&p(r[0])){const a=At(s||r[0],this._listWalkerOptions);for(const c of a)l.setAttributes({...t.additionalAttributes,listType:this.type},c);this._fireAfterExecute(a)}else{const a=[];for(const c of r)if(!c.hasAttribute("listType"))!c.is("element","listItem")&&U(c,e.schema)&&l.rename(c,"listItem"),l.setAttributes({...t.additionalAttributes,listIndent:0,listItemId:C.next(),listType:this.type},c),a.push(c);else for(const u of V(c,{withNested:!1}))u.getAttribute("listType")!=this.type&&(l.setAttributes({...t.additionalAttributes,listType:this.type},u),a.push(u));this._fireAfterExecute(a)}})}_fireAfterExecute(t){this.fire("afterExecute",v(new Set(t)))}_getValue(){const t=this.editor.model.document.selection,e=Array.from(t.getSelectedBlocks());if(!e.length)return!1;for(const i of e)if(i.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const t=this.editor.model,e=t.schema,i=t.document.selection,s=Array.from(i.getSelectedBlocks());if(!s.length)return!1;if(this.value)return!0;for(const r of s)if(e.checkAttribute(r,"listType")||U(r,e))return!0;return!1}}class at extends _{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:t=!1}={}){const e=this.editor.model,i=e.document.selection,s=[];e.change(r=>{const{firstElement:o,lastElement:l}=this._getMergeSubjectElements(i,t),a=o.getAttribute("listIndent")||0,c=l.getAttribute("listIndent"),u=l.getAttribute("listItemId");if(a!=c){const d=he(l);s.push(...q([l,...d],r,{indentBy:a-c,expand:a<c}))}if(t){let d=i;i.isCollapsed&&(d=r.createSelection(r.createRange(r.createPositionAt(o,"end"),r.createPositionAt(l,0)))),e.deleteContent(d,{doNotResetEntireContent:i.isCollapsed});const m=d.getLastPosition().parent,f=m.nextSibling;s.push(m),f&&f!==l&&f.getAttribute("listItemId")==u&&s.push(...W(f,m,r))}else s.push(...W(l,o,r));this._fireAfterExecute(s)})}_fireAfterExecute(t){this.fire("afterExecute",v(new Set(t)))}_checkEnabled(){const t=this.editor.model,e=t.document.selection,i=F(t);if(e.isCollapsed||i){const s=i||e.getFirstPosition().parent;if(!p(s))return!1;const r=this._direction=="backward"?s.previousSibling:s.nextSibling;if(!r||E([s,r]))return!1}else{const s=e.getLastPosition(),r=e.getFirstPosition();if(s.parent===r.parent||!p(s.parent))return!1}return!0}_getMergeSubjectElements(t,e){const i=this.editor.model,s=F(i);let r,o;if(t.isCollapsed||s){const l=s||t.getFirstPosition().parent,a=A(l);this._direction=="backward"?(o=l,a&&!e?r=y.first(l,{sameIndent:!0,lowerIndent:!0}):r=l.previousSibling):(r=l,o=l.nextSibling)}else r=t.getFirstPosition().parent,o=t.getLastPosition().parent;return{firstElement:r,lastElement:o}}}class ct extends _{_direction;constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(e=>{const i=X(this._getStartBlock(),e);this._fireAfterExecute(i)})}_fireAfterExecute(t){this.fire("afterExecute",v(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&p(e)&&!A(e)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return this._direction=="before"?e:e.nextSibling}}class ke extends g{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[b]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(b);!t.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.registerFormatAttribute("bold","listItemBold"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(s,r,o,l){r&&(s.addClass("ck-list-marker-bold",o),G.isSafari&&!(l&&l.dataPipeline)&&s.setStyle("--ck-content-list-marker-dummy-bold","0",o))}}))}afterInit(){const t=this.editor,e=t.model;!t.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.schema.extend("$listItem",{allowAttributes:"listItemBold"}),e.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),e.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemBold"),t.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class Ae extends g{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[b]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(b);!t.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.registerFormatAttribute("italic","listItemItalic"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(s,r,o,l){r&&(s.addClass("ck-list-marker-italic",o),G.isSafari&&!(l&&l.dataPipeline)&&s.setStyle("--ck-content-list-marker-dummy-italic","0",o))}}))}afterInit(){const t=this.editor,e=t.model;!t.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),e.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),e.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemItalic"),t.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}class Le extends g{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[b]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(b);if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;const s=st(t.config.get("fontSize.options"));e.registerFormatAttribute("fontSize","listItemFontSize"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(r,o,l,a){if(o){const c=s.find(u=>u.model==o);c&&c.view&&typeof c.view!="string"?c.view.styles?(r.addClass("ck-list-marker-font-size",l),r.setStyle("--ck-content-list-marker-font-size",c.view.styles["font-size"],l)):c.view.classes&&(r.addClass(`ck-list-marker-font-size-${o}`,l),G.isSafari&&!(a&&a.dataPipeline)&&r.setStyle("--ck-content-list-marker-dummy-font-size","0",l)):(r.addClass("ck-list-marker-font-size",l),r.setStyle("--ck-content-list-marker-font-size",o,l))}}})}afterInit(){const t=this.editor,e=t.model;if(!t.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;e.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),e.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),e.schema.addAttributeCheck(s=>{if(!s.last.getAttribute("listItemId"))return!1},"listItemFontSize"),t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:s=>s.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}});const i=st(t.config.get("fontSize.options"));for(const s of i)s.model&&s.view&&t.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:s.model},view:{name:"li",classes:`ck-list-marker-font-size-${s.model}`}})}}class we extends g{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[b]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(b);!t.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.registerFormatAttribute("fontColor","listItemFontColor"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(s,r,o){r&&(s.addClass("ck-list-marker-color",o),s.setStyle("--ck-content-list-marker-color",r,o))}}))}afterInit(){const t=this.editor,e=t.model;!t.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),e.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),e.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemFontColor"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:i=>i.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class Te extends g{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[b]}init(){const t=this.editor,e=t.plugins.get("ListFormatting"),i=t.plugins.get(b);!t.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.registerFormatAttribute("fontFamily","listItemFontFamily"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(s,r,o){r&&(s.addClass("ck-list-marker-font-family",o),s.setStyle("--ck-content-list-marker-font-family",r,o))}}))}afterInit(){const t=this.editor,e=t.model;!t.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(e.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),e.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),e.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),t.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:i=>i.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}class Se extends g{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[ke,Ae,Le,we,Te]}constructor(t){super(t),t.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){const t=this.editor.model;t.document.registerPostFixer(e=>{const i=t.document.differ.getChanges(),s=new Set;let r=!1;for(const o of i)if(o.type==="attribute")(o.attributeKey=="listItemId"||o.attributeKey=="listType"||this._isInlineOrSelectionFormatting(o.attributeKey)||Object.values(this._loadedFormatting).includes(o.attributeKey))&&(p(o.range.start.nodeAfter)?s.add(o.range.start.nodeAfter):p(o.range.start.parent)&&s.add(o.range.start.parent));else if(p(o.position.nodeAfter)&&s.add(o.position.nodeAfter),p(o.position.nodeBefore)&&s.add(o.position.nodeBefore),p(o.position.parent)&&s.add(o.position.parent),o.type=="insert"&&o.name!="$text"){const l=e.createRangeIn(o.position.nodeAfter);for(const a of l.getItems())p(a)&&s.add(a)}for(const o of s){const l=_e(t,o,Object.keys(this._loadedFormatting));for(const[a,c]of Object.entries(l)){const u=this._loadedFormatting[a];(c&&ve(e,o,u,c)||!c&&Ce(e,o,u))&&(r=!0)}}return r})}registerFormatAttribute(t,e){this._loadedFormatting[t]=e}_isInlineOrSelectionFormatting(t){return t.replace(/^selection:/,"")in this._loadedFormatting}}function _e(n,t,e){if(A(t))return ut(n,t,e);const i=w(t);return ut(n,i[0],e)}function ut(n,t,e){if(!xe(t)||n.schema.isLimit(t))return Object.fromEntries(e.map(l=>[l]));if(t.isEmpty)return Object.fromEntries(e.map(l=>[l,t.getAttribute(`selection:${l}`)]));const i=new Set(e),s={},o=n.createRangeIn(t).getWalker({ignoreElementEnd:!0});for(const{item:l}of o){for(const a of i)if(n.schema.checkAttribute(l,a)){const c=l.getAttribute(a);c===void 0?(i.delete(a),s[a]=void 0):s[a]===void 0?s[a]=c:s[a]!==c&&(i.delete(a),s[a]=void 0)}else a in s||(s[a]=void 0);if(!i.size)break;n.schema.isLimit(l)&&o.jumpTo(n.createPositionAfter(l))}return s}function ve(n,t,e,i){const s=w(t);let r=!1;for(const o of s)(!o.hasAttribute(e)||o.getAttribute(e)!==i)&&(n.setAttribute(e,i,o),r=!0);return r}function Ce(n,t,e){const i=w(t);let s=!1;for(const r of i)r.hasAttribute(e)&&(n.removeAttribute(e,r),s=!0);return s}function xe(n){return["numbered","bulleted","customNumbered","customBulleted"].includes(n.getAttribute("listType"))}class Be extends g{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(t){return z(t)}isFirstBlockOfListItem(t){return A(t)}isListItemBlock(t){return p(t)}expandListBlocksToCompleteItems(t,e={}){return V(t,e)}isNumberedListType(t){return M(t)}}/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as p}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as p}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{HtmlDataProcessor as _}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{ClipboardPipeline as T}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{unified as u}from"../../../../../unified@11.0.5/node_modules/unified/lib/index.js";import k from"../../../../../remark-parse@11.0.0/node_modules/remark-parse/lib/index.js";import h from"../../../../../remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js";import g from"../../../../../remark-breaks@4.0.0/node_modules/remark-breaks/lib/index.js";import y from"../../../../../remark-rehype@11.1.2/node_modules/remark-rehype/lib/index.js";import D from"../../../../../rehype-dom-stringify@4.0.2/node_modules/rehype-dom-stringify/lib/index.js";import{toHtml as f}from"../../../../../hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js";import{h as P}from"../../../../../hastscript@9.0.1/node_modules/hastscript/lib/index.js";import v from"../../../../../rehype-dom-parse@5.0.2/node_modules/rehype-dom-parse/lib/index.js";import H from"../../../../../rehype-remark@10.0.1/node_modules/rehype-remark/lib/index.js";import M from"../../../../../remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.js";import{visit as m}from"../../../../../unist-util-visit@5.0.0/node_modules/unist-util-visit/lib/index.js";import{fromDom as b}from"../../../../../hast-util-from-dom@5.0.1/node_modules/hast-util-from-dom/lib/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class R{_processor;constructor(){this._processor=u().use(k).use(h,{singleTilde:!0}).use(g).use(y,{allowDangerousHtml:!0}).use(A).use(N).use(D)}parse(e){return this._processor.processSync(e).toString().replaceAll(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as h,Command as M}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as h,Command as M}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as T,toWidget as P,findOptimalInsertionRange as k}from"../../../../../@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{global as w,first as x,logWarning as R,toArray as D,FocusTracker as C,KeystrokeHandler as F}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Dialog as U,ButtonView as S,MenuBarMenuListItemButtonView as L,CssTransitionDisablerMixin as B,IconView as A,Template as N,View as O,submitHandler as $,LabeledFieldView as W,createLabeledInputText as H}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconMedia as q,IconMediaPlaceholder as j}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ModelLivePosition as f,ModelLiveRange as z}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Clipboard as G}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{Delete as b}from"../../../../../@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{Undo as K}from"../../../../../@ckeditor_ckeditor5-undo@46.1.1/node_modules/@ckeditor/ckeditor5-undo/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*//**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{keyCodes as r}from"../../../../../@ckeditor_ckeditor5-utils@46.1.
|
|
1
|
+
import{keyCodes as r}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/r.arrowup,r.arrowdown,r.esc;r.enter,r.tab;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as l,Command as d}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as l,Command as d}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as m,toWidget as p,findOptimalInsertionRange as k}from"../../../../../@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{IconPageBreak as B}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as f,MenuBarMenuListItemButtonView as b}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class h extends d{refresh(){const e=this.editor.model,t=e.schema,a=e.document.selection;this.isEnabled=P(a,t,e)}execute(){const e=this.editor.model;e.change(t=>{const a=t.createElement("pageBreak");e.insertObject(a,null,null,{setSelection:"after"})})}}function P(o,e,t){const a=E(o,t);return e.checkChild(a,"pageBreak")}function E(o,e){const a=k(o,e).start.parent;return a.isEmpty&&!a.is("element","$root")?a.parent:a}class y extends l{static get pluginName(){return"PageBreakEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.model.schema,a=e.t,i=e.conversion;t.register("pageBreak",{inheritAllFrom:"$blockObject"}),i.for("dataDowncast").elementToStructure({model:"pageBreak",view:(r,{writer:n})=>n.createContainerElement("div",{class:"page-break",style:"page-break-after: always"},n.createContainerElement("span",{style:"display: none"}))}),i.for("editingDowncast").elementToStructure({model:"pageBreak",view:(r,{writer:n})=>{const c=a("Page break"),s=n.createContainerElement("div"),g=n.createRawElement("span",{class:"page-break__label"},function(u){u.innerText=a("Page break")});return n.addClass("page-break",s),n.insert(n.createPositionAt(s,0),g),v(s,n,c)}}),i.for("upcast").elementToElement({view:r=>{const n=r.getStyle("page-break-before")=="always",c=r.getStyle("page-break-after")=="always";if(!n&&!c)return null;if(r.childCount==1){const s=r.getChild(0);if(!s.is("element","span")||s.getStyle("display")!="none")return null}else if(r.childCount>1)return null;return{name:!0,styles:[...n?["page-break-before"]:[],...c?["page-break-after"]:[]],...r.hasClass("page-break")&&{classes:["page-break"]}}},model:"pageBreak",converterPriority:"high"}),e.commands.add("pageBreak",new h(e))}}function v(o,e,t){return e.setCustomProperty("pageBreak",!0,o),p(o,e,{label:t})}class w extends l{static get pluginName(){return"PageBreakUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("pageBreak",()=>{const t=this._createButton(f);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:pageBreak",()=>this._createButton(b))}_createButton(e){const t=this.editor,a=t.locale,i=t.commands.get("pageBreak"),r=new e(t.locale),n=a.t;return r.set({label:n("Page break"),icon:B}),r.bind("isEnabled").to(i,"isEnabled"),this.listenTo(r,"execute",()=>{t.execute("pageBreak"),t.editing.view.focus()}),r}}class O extends l{static get requires(){return[y,w,m]}static get pluginName(){return"PageBreak"}static get isOfficialPlugin(){return!0}}export{O as PageBreak,h as PageBreakCommand,y as PageBreakEditing,w as PageBreakUI};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as h,Command as l}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as h,Command as l}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{first as m}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class p extends l{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,r=e.document,t=m(r.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&c(t,e.schema)}execute(e={}){const r=this.editor.model,t=r.document,a=e.selection||t.selection;r.canEditAt(a)&&r.change(n=>{const s=a.getSelectedBlocks();for(const i of s)!i.is("element","paragraph")&&c(i,r.schema)&&n.rename(i,"paragraph")})}}function c(o,e){return e.checkChild(o.parent,"paragraph")&&!e.isObject(o)}class u extends l{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const r=this.editor.model,t=e.attributes;let a=e.position;return r.canEditAt(a)?r.change(n=>{if(a=this._findPositionToInsertParagraph(a,n),!a)return null;const s=n.createElement("paragraph");return t&&r.schema.setAllowedAttributes(s,t,n),r.insertContent(s,a),n.setSelection(s,"in"),n.createPositionAt(s,0)}):null}_findPositionToInsertParagraph(e,r){const t=this.editor.model;if(t.schema.checkChild(e,"paragraph"))return e;const a=t.schema.findAllowedParent(e,"paragraph");if(!a)return null;const n=e.parent,s=t.schema.checkChild(n,"$text");return n.isEmpty||s&&e.isAtEnd?t.createPositionAfter(n):!n.isEmpty&&s&&e.isAtStart?t.createPositionBefore(n):r.split(e,a).position}}class d extends h{static get pluginName(){return"Paragraph"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,r=e.model;e.commands.add("paragraph",new p(e)),e.commands.add("insertParagraph",new u(e)),r.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(t,{writer:a})=>!d.paragraphLikeElements.has(t.name)||t.isEmpty?null:a.createElement("paragraph"),view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}export{u as InsertParagraphCommand,d as Paragraph,p as ParagraphCommand};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as E}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as E}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ClipboardPipeline as M}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{UpcastWriter as y,ViewDocument as C,ViewDomConverter as P,Matcher as b}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*//**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as a,Command as d}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as a,Command as d}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconRemoveFormat as l}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as g,MenuBarMenuListItemButtonView as f}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{first as c}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/const n="removeFormat";class F extends a{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add(n,()=>{const e=this._createButton(g);return e.set({tooltip:!0}),e}),t.ui.componentFactory.add(`menuBar:${n}`,()=>this._createButton(f))}_createButton(t){const e=this.editor,i=e.locale,s=e.commands.get(n),o=new t(e.locale),r=i.t;return o.set({label:r("Remove Format"),icon:l}),o.bind("isEnabled").to(s,"isEnabled"),this.listenTo(o,"execute",()=>{e.execute(n),e.editing.view.focus()}),o}}class h extends d{_customAttributesHandlers=[];refresh(){const t=this.editor.model;this.isEnabled=!!c(this._getFormattingItems(t.document.selection))}execute(){const t=this.editor.model;t.change(e=>{for(const i of this._getFormattingItems(t.document.selection))if(i.is("selection"))for(const s of this._getFormattingAttributes(i))e.removeSelectionAttribute(s);else{const s=e.createRangeOn(i);for(const o of this._getFormattingAttributes(i))this._removeFormatting(o,i,s,e)}})}registerCustomAttribute(t,e){this._customAttributesHandlers.push({isFormatting:t,removeFormatting:e})}_removeFormatting(t,e,i,s){let o=!1;for(const{isFormatting:r,removeFormatting:u}of this._customAttributesHandlers)r(t,e)&&(u(t,i,s),o=!0);o||s.removeAttribute(t,i)}*_getFormattingItems(t){const e=this.editor.model,i=e.schema,s=o=>!!c(this._getFormattingAttributes(o));for(const o of t.getRanges())for(const r of o.getItems())i.isBlock(r)&&o.end.isTouching(e.createPositionAt(r,0))||s(r)&&(yield r);for(const o of t.getSelectedBlocks())s(o)&&(yield o);s(t)&&(yield t)}*_getFormattingAttributes(t){const e=this.editor.model.schema;for(const[i]of t.getAttributes()){for(const{isFormatting:o}of this._customAttributesHandlers)o(i,t)&&(yield i);const s=e.getAttributeProperties(i);s&&s.isFormatting&&(yield i)}}}class b extends a{static get pluginName(){return"RemoveFormatEditing"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.commands.add("removeFormat",new h(t))}}class p extends a{static get requires(){return[b,F]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}}export{p as RemoveFormat,h as RemoveFormatCommand,b as RemoveFormatEditing,F as RemoveFormatUI};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as o,Command as a}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as o,Command as a}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{getCode as u,parseKeystroke as d}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconSelectAll as m}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as g,MenuBarMenuListItemButtonView as f}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class A extends a{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let i=e.schema.getLimitElement(t);if(t.containsEntireContent(i)||!r(e.schema,i))do if(i=i.parent,!i)return;while(!r(e.schema,i));e.change(n=>{n.setSelection(i,"in")})}}function r(l,e){return l.isLimit(e)&&(l.checkChild(e,"$text")||l.checkChild(e,"paragraph"))}const p=d("Ctrl+A");class h extends o{static get pluginName(){return"SelectAllEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t,n=e.editing.view.document;e.commands.add("selectAll",new A(e)),this.listenTo(n,"keydown",(c,s)=>{u(s)===p&&(e.execute("selectAll"),s.preventDefault())}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}class S extends o{static get pluginName(){return"SelectAllUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",()=>{const t=this._createButton(g);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:selectAll",()=>this._createButton(f))}_createButton(e){const t=this.editor,i=t.locale,n=t.commands.get("selectAll"),c=new e(t.locale),s=i.t;return c.set({label:s("Select all"),icon:m,keystroke:"Ctrl+A"}),c.bind("isEnabled").to(n,"isEnabled"),this.listenTo(c,"execute",()=>{t.execute("selectAll"),t.editing.view.focus()}),c}}class E extends o{static get requires(){return[h,S]}static get pluginName(){return"SelectAll"}static get isOfficialPlugin(){return!0}}export{E as SelectAll,A as SelectAllCommand,h as SelectAllEditing,S as SelectAllUI};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as c,Command as u}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as c,Command as u}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconShowBlocks as d}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as h,MenuBarMenuListItemButtonView as m}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class w extends u{constructor(t){super(t),this.affectsData=!1,this.value=!1}execute(){const t="ck-show-blocks",e=this.editor.editing.view;e.change(s=>{for(const o of e.document.roots)o.hasClass(t)?(s.removeClass(t,o),this.value=!1):(s.addClass(t,o),this.value=!0)})}}class g extends c{static get pluginName(){return"ShowBlocksEditing"}static get isOfficialPlugin(){return!0}init(){const{editor:t}=this;t.commands.add("showBlocks",new w(t))}}class B extends c{static get pluginName(){return"ShowBlocksUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add("showBlocks",()=>{const e=this._createButton(h);return e.set({tooltip:!0,icon:d}),e}),t.ui.componentFactory.add("menuBar:showBlocks",()=>this._createButton(m))}_createButton(t){const e=this.editor,s=e.locale,o=e.commands.get("showBlocks"),i=new t(s),a=s.t;return i.set({label:a("Show blocks"),isToggleable:!0,role:"menuitemcheckbox"}),i.bind("isEnabled").to(o),i.bind("isOn").to(o,"value",o,"isEnabled",(l,r)=>l&&r),this.listenTo(i,"execute",()=>{e.execute("showBlocks"),e.editing.view.focus()}),i}}class S extends c{static get pluginName(){return"ShowBlocks"}static get isOfficialPlugin(){return!0}static get requires(){return[g,B]}}export{S as ShowBlocks,w as ShowBlocksCommand,g as ShowBlocksEditing,B as ShowBlocksUI};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as g,PendingActions as l}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as g,PendingActions as l}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconSource as f}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as p,MenuBarMenuListItemButtonView as E}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{ElementReplacer as b,CKEditorError as _,createElement as u,formatHtml as w}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/const d="SourceEditingMode";class M extends g{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[l]}_elementReplacer;_replacedRoots;_dataFromRoots;constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new b,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const i=this._createButton(p);return i.set({label:t("Source"),icon:f,tooltip:!0,class:"ck-source-editing-button"}),i}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const i=this._createButton(E);return i.set({label:t("Show source"),role:"menuitemcheckbox"}),i}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(i,o,n)=>{n?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(i,o,n)=>this._handleReadOnlyMode(!n)),this.listenTo(e,"change:isReadOnly",(i,o,n)=>this._handleReadOnlyMode(n))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,t={};for(const[i,o]of this._replacedRoots){const n=this._dataFromRoots.get(i),s=o.dataset.value;n!==s&&(t[i]=s,this._dataFromRoots.set(i,s))}Object.keys(t).length&&e.data.set(t,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,t=e.config.get("sourceEditing.allowCollaborationFeatures");if(!t&&e.plugins.has("RealTimeCollaborativeEditing"))throw new _("source-editing-incompatible-with-real-time-collaboration",null);!t&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(o=>e.plugins.has(o))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,t=e.editing.view,i=e.model;i.change(o=>{o.setSelection(null),o.removeSelectionAttribute(i.document.selection.getAttributeKeys())});for(const[o,n]of t.domRoots){const s=R(e.data.get({rootName:o})),r=u(n.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),c=u(n.ownerDocument,"div",{class:"ck-source-editing-area","data-value":s},[r]);r.value=s,r.setSelectionRange(0,0),r.addEventListener("input",()=>{c.dataset.value=r.value,e.ui.update()}),t.change(h=>{const m=t.document.getRoot(o);h.addClass("ck-hidden",m)}),e.ui.setEditableElement("sourceEditing:"+o,r),this._replacedRoots.set(o,c),this._elementReplacer.replace(n,c),this._dataFromRoots.set(o,s)}this._hideDocumentOutline(),this._refreshAnnotationsVisibility(),this._focusSourceEditing()}_hideSourceEditing(){const t=this.editor.editing.view;this.updateEditorData(),t.change(i=>{for(const[o]of this._replacedRoots)i.removeClass("ck-hidden",t.document.getRoot(o))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),this._showDocumentOutline(),this._refreshAnnotationsVisibility(),t.focus()}_hideDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="none")}_showDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="")}_refreshAnnotationsVisibility(){this.editor.plugins.has("Annotations")&&this.editor.plugins.get("Annotations").refreshVisibility()}_focusSourceEditing(){const e=this.editor,[t]=this._replacedRoots.values(),i=t.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const t of e.commands.commands())t.forceDisabled(d);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(d)}_enableCommands(){const e=this.editor;for(const t of e.commands.commands())t.clearForceDisabled(d);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(d)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,t]of this._replacedRoots)t.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const t=this.editor.ui.view.editable;return t&&!t.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(e){const t=this.editor,i=new e(t.locale);return i.set({withText:!0,isToggleable:!0}),i.bind("isOn").to(this,"isSourceEditingMode"),i.bind("isEnabled").to(this,"isEnabled",t,"isReadOnly",t.plugins.get(l),"hasAny",(o,n,s)=>!(!o||n||s)),this.listenTo(i,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),i}}function R(a){return S(a)?w(a):a}function S(a){return a.startsWith("<")}export{M as SourceEditing};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as o}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as o}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Typing as f}from"../../../../../@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{IconSpecialCharacters as b}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{Dialog as k,ButtonView as g,MenuBarMenuListItemButtonView as C,DialogViewPosition as _,View as h,LabeledFieldView as y,createLabeledDropdown as x,UIModel as v,addListToDropdown as V,addKeyboardHandlingForGrid as T,FocusCycler as S}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{CKEditorError as w,Collection as D,FocusTracker as p,KeystrokeHandler as m,global as G}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class P extends h{tiles;focusTracker;keystrokes;constructor(e){super(e),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new p,this.keystrokes=new m,T({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>G.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}createTile(e,t){const a=new g(this.locale);return a.set({label:e,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:t},on:{mouseover:a.bindTemplate.to("mouseover"),focus:a.bindTemplate.to("focus")}}),a.on("mouseover",()=>{this.fire("tileHover",{name:t,character:e})}),a.on("focus",()=>{this.fire("tileFocus",{name:t,character:e})}),a.on("execute",()=>{this.fire("execute",{name:t,character:e})}),a}render(){super.render();for(const e of this.tiles)this.focusTracker.add(e.element);this.tiles.on("change",(e,{added:t,removed:a})=>{if(t.length>0)for(const r of t)this.focusTracker.add(r.element);if(a.length>0)for(const r of a)this.focusTracker.remove(r.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.first.focus()}}class q extends h{constructor(e){super(e);const t=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",I),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:t.to("name",a=>a||"")}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:t.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function I(c){return c===null?"":"U+"+("0000"+c.codePointAt(0).toString(16)).slice(-4)}class N extends h{items;focusTracker;keystrokes;_focusCycler;categoriesView;gridView;infoView;constructor(e,t,a,r){super(e),this.categoriesView=t,this.gridView=a,this.infoView=r,this.items=this.createCollection(),this.focusTracker=new p,this.keystrokes=new m,this._focusCycler=new S({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[this.categoriesView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.categoriesView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class A extends h{_groupNames;_dropdownView;constructor(e,t){super(e),this.set("currentGroupName",Array.from(t.entries())[0][0]),this._groupNames=t,this._dropdownView=new y(e,x),this.setTemplate({tag:"div",attributes:{class:["ck","ck-character-categories"]},children:[this._dropdownView]})}render(){super.render(),this._setupDropdown()}focus(){this._dropdownView.focus()}_setupDropdown(){const e=new D;for(const[r,i]of this._groupNames){const s={type:"button",model:new v({name:r,label:i,role:"menuitemradio",withText:!0})};s.model.bind("isOn").to(this,"currentGroupName",l=>l===r),e.add(s)}const t=this.locale.t,a=t("Category");this._dropdownView.set({label:a,isEmpty:!1}),this._dropdownView.fieldView.panelPosition=this.locale.uiLanguageDirection==="rtl"?"se":"sw",this._dropdownView.fieldView.buttonView.set({withText:!0,tooltip:a,ariaLabel:a,ariaLabelledBy:void 0,isOn:!1}),this._dropdownView.fieldView.buttonView.bind("label").to(this,"currentGroupName",r=>this._groupNames.get(r)),this._dropdownView.fieldView.on("execute",({source:r})=>{this.currentGroupName=r.name}),V(this._dropdownView.fieldView,e,{ariaLabel:a,role:"menu"})}}const u="All";class K extends o{_characters;_groups;_allSpecialCharactersGroupLabel;static get requires(){return[f,k]}static get pluginName(){return"SpecialCharacters"}static get isOfficialPlugin(){return!0}constructor(e){super(e);const t=e.t;this._characters=new Map,this._groups=new Map,this._allSpecialCharactersGroupLabel=t("All")}init(){const e=this.editor;e.ui.componentFactory.add("specialCharacters",()=>{const t=this._createDialogButton(g);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:specialCharacters",()=>this._createDialogButton(C))}addItems(e,t,a={label:e}){if(e===u)throw new w("special-character-invalid-group-name",null);const r=this._getGroup(e,a.label);for(const i of t)r.items.add(i.title),this._characters.set(i.title,i.character)}getGroups(){const e=Array.from(this._groups.keys()),t=this.editor.config.get("specialCharacters.order")||[],a=t.find(r=>!e.includes(r));if(a)throw new w("special-character-invalid-order-group-name",null,{invalidGroup:a});return new Set([...t,...e])}getCharactersForGroup(e){if(e===u)return new Set(this._characters.keys());const t=this._groups.get(e);if(t)return t.items}getCharacter(e){return this._characters.get(e)}_getGroup(e,t){return this._groups.has(e)||this._groups.set(e,{items:new Set,label:t}),this._groups.get(e)}_updateGrid(e,t){t.tiles.clear();const a=this.getCharactersForGroup(e);for(const r of a){const i=this.getCharacter(r);t.tiles.add(t.createTile(i,r))}}_createDropdownPanelContent(e){const t=Array.from(this.getGroups()).map(l=>[l,this._groups.get(l).label]),a=new Map([[u,this._allSpecialCharactersGroupLabel],...t]),r=new A(e,a),i=new P(e),s=new q(e);return i.on("tileHover",(l,n)=>{s.set(n)}),i.on("tileFocus",(l,n)=>{s.set(n)}),r.on("change:currentGroupName",(l,n,d)=>{this._updateGrid(d,i)}),this._updateGrid(r.currentGroupName,i),{categoriesView:r,gridView:i,infoView:s}}_createDialogButton(e){const t=this.editor,a=t.locale,r=new e(t.locale),i=t.commands.get("insertText"),s=a.t,l=this.editor.plugins.get("Dialog");return r.set({label:s("Special characters"),icon:b,isToggleable:!0}),r.bind("isOn").to(l,"id",n=>n==="specialCharacters"),r.bind("isEnabled").to(i,"isEnabled"),r.on("execute",()=>{if(l.id==="specialCharacters"){l.hide();return}this._showDialog()}),r}_showDialog(){const e=this.editor,t=e.plugins.get("Dialog"),a=e.locale,r=a.t,{categoriesView:i,gridView:s,infoView:l}=this._createDropdownPanelContent(a),n=new N(a,i,s,l);s.on("execute",(d,L)=>{e.execute("insertText",{text:L.character})}),t.show({id:"specialCharacters",title:r("Special characters"),className:"ck-special-characters",content:n,position:_.EDITOR_TOP_SIDE})}}class E extends o{static get pluginName(){return"SpecialCharactersArrows"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Arrows",[{title:t("leftwards simple arrow"),character:"←"},{title:t("rightwards simple arrow"),character:"→"},{title:t("upwards simple arrow"),character:"↑"},{title:t("downwards simple arrow"),character:"↓"},{title:t("leftwards double arrow"),character:"⇐"},{title:t("rightwards double arrow"),character:"⇒"},{title:t("upwards double arrow"),character:"⇑"},{title:t("downwards double arrow"),character:"⇓"},{title:t("leftwards dashed arrow"),character:"⇠"},{title:t("rightwards dashed arrow"),character:"⇢"},{title:t("upwards dashed arrow"),character:"⇡"},{title:t("downwards dashed arrow"),character:"⇣"},{title:t("leftwards arrow to bar"),character:"⇤"},{title:t("rightwards arrow to bar"),character:"⇥"},{title:t("upwards arrow to bar"),character:"⤒"},{title:t("downwards arrow to bar"),character:"⤓"},{title:t("up down arrow with base"),character:"↨"},{title:t("back with leftwards arrow above"),character:"🔙"},{title:t("end with leftwards arrow above"),character:"🔚"},{title:t("on with exclamation mark with left right arrow above"),character:"🔛"},{title:t("soon with rightwards arrow above"),character:"🔜"},{title:t("top with upwards arrow above"),character:"🔝"}],{label:t("Arrows")})}}class M extends o{static get pluginName(){return"SpecialCharactersText"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:t("Single left-pointing angle quotation mark")},{character:"›",title:t("Single right-pointing angle quotation mark")},{character:"«",title:t("Left-pointing double angle quotation mark")},{character:"»",title:t("Right-pointing double angle quotation mark")},{character:"‘",title:t("Left single quotation mark")},{character:"’",title:t("Right single quotation mark")},{character:"“",title:t("Left double quotation mark")},{character:"”",title:t("Right double quotation mark")},{character:"‚",title:t("Single low-9 quotation mark")},{character:"„",title:t("Double low-9 quotation mark")},{character:"¡",title:t("Inverted exclamation mark")},{character:"¿",title:t("Inverted question mark")},{character:"‥",title:t("Two dot leader")},{character:"…",title:t("Horizontal ellipsis")},{character:"‡",title:t("Double dagger")},{character:"‰",title:t("Per mille sign")},{character:"‱",title:t("Per ten thousand sign")},{character:"‼",title:t("Double exclamation mark")},{character:"⁈",title:t("Question exclamation mark")},{character:"⁉",title:t("Exclamation question mark")},{character:"⁇",title:t("Double question mark")},{character:"©",title:t("Copyright sign")},{character:"®",title:t("Registered sign")},{character:"™",title:t("Trade mark sign")},{character:"§",title:t("Section sign")},{character:"¶",title:t("Paragraph sign")},{character:"⁋",title:t("Reversed paragraph sign")}],{label:t("Text")})}}class O extends o{static get pluginName(){return"SpecialCharactersMathematical"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:t("Less-than sign")},{character:">",title:t("Greater-than sign")},{character:"≤",title:t("Less-than or equal to")},{character:"≥",title:t("Greater-than or equal to")},{character:"–",title:t("En dash")},{character:"—",title:t("Em dash")},{character:"¯",title:t("Macron")},{character:"‾",title:t("Overline")},{character:"°",title:t("Degree sign")},{character:"−",title:t("Minus sign")},{character:"±",title:t("Plus-minus sign")},{character:"÷",title:t("Division sign")},{character:"⁄",title:t("Fraction slash")},{character:"×",title:t("Multiplication sign")},{character:"ƒ",title:t("Latin small letter f with hook")},{character:"∫",title:t("Integral")},{character:"∑",title:t("N-ary summation")},{character:"∞",title:t("Infinity")},{character:"√",title:t("Square root")},{character:"∼",title:t("Tilde operator")},{character:"≅",title:t("Approximately equal to")},{character:"≈",title:t("Almost equal to")},{character:"≠",title:t("Not equal to")},{character:"≡",title:t("Identical to")},{character:"∈",title:t("Element of")},{character:"∉",title:t("Not an element of")},{character:"∋",title:t("Contains as member")},{character:"∏",title:t("N-ary product")},{character:"∧",title:t("Logical and")},{character:"∨",title:t("Logical or")},{character:"¬",title:t("Not sign")},{character:"∩",title:t("Intersection")},{character:"∪",title:t("Union")},{character:"∂",title:t("Partial differential")},{character:"∀",title:t("For all")},{character:"∃",title:t("There exists")},{character:"∅",title:t("Empty set")},{character:"∇",title:t("Nabla")},{character:"∗",title:t("Asterisk operator")},{character:"∝",title:t("Proportional to")},{character:"∠",title:t("Angle")},{character:"¼",title:t("Vulgar fraction one quarter")},{character:"½",title:t("Vulgar fraction one half")},{character:"¾",title:t("Vulgar fraction three quarters")}],{label:t("Mathematical")})}}class F extends o{static get pluginName(){return"SpecialCharactersLatin"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:t("Latin capital letter a with macron")},{character:"ā",title:t("Latin small letter a with macron")},{character:"Ă",title:t("Latin capital letter a with breve")},{character:"ă",title:t("Latin small letter a with breve")},{character:"Ą",title:t("Latin capital letter a with ogonek")},{character:"ą",title:t("Latin small letter a with ogonek")},{character:"Ć",title:t("Latin capital letter c with acute")},{character:"ć",title:t("Latin small letter c with acute")},{character:"Ĉ",title:t("Latin capital letter c with circumflex")},{character:"ĉ",title:t("Latin small letter c with circumflex")},{character:"Ċ",title:t("Latin capital letter c with dot above")},{character:"ċ",title:t("Latin small letter c with dot above")},{character:"Č",title:t("Latin capital letter c with caron")},{character:"č",title:t("Latin small letter c with caron")},{character:"Ď",title:t("Latin capital letter d with caron")},{character:"ď",title:t("Latin small letter d with caron")},{character:"Đ",title:t("Latin capital letter d with stroke")},{character:"đ",title:t("Latin small letter d with stroke")},{character:"Ē",title:t("Latin capital letter e with macron")},{character:"ē",title:t("Latin small letter e with macron")},{character:"Ĕ",title:t("Latin capital letter e with breve")},{character:"ĕ",title:t("Latin small letter e with breve")},{character:"Ė",title:t("Latin capital letter e with dot above")},{character:"ė",title:t("Latin small letter e with dot above")},{character:"Ę",title:t("Latin capital letter e with ogonek")},{character:"ę",title:t("Latin small letter e with ogonek")},{character:"Ě",title:t("Latin capital letter e with caron")},{character:"ě",title:t("Latin small letter e with caron")},{character:"Ĝ",title:t("Latin capital letter g with circumflex")},{character:"ĝ",title:t("Latin small letter g with circumflex")},{character:"Ğ",title:t("Latin capital letter g with breve")},{character:"ğ",title:t("Latin small letter g with breve")},{character:"Ġ",title:t("Latin capital letter g with dot above")},{character:"ġ",title:t("Latin small letter g with dot above")},{character:"Ģ",title:t("Latin capital letter g with cedilla")},{character:"ģ",title:t("Latin small letter g with cedilla")},{character:"Ĥ",title:t("Latin capital letter h with circumflex")},{character:"ĥ",title:t("Latin small letter h with circumflex")},{character:"Ħ",title:t("Latin capital letter h with stroke")},{character:"ħ",title:t("Latin small letter h with stroke")},{character:"Ĩ",title:t("Latin capital letter i with tilde")},{character:"ĩ",title:t("Latin small letter i with tilde")},{character:"Ī",title:t("Latin capital letter i with macron")},{character:"ī",title:t("Latin small letter i with macron")},{character:"Ĭ",title:t("Latin capital letter i with breve")},{character:"ĭ",title:t("Latin small letter i with breve")},{character:"Į",title:t("Latin capital letter i with ogonek")},{character:"į",title:t("Latin small letter i with ogonek")},{character:"İ",title:t("Latin capital letter i with dot above")},{character:"ı",title:t("Latin small letter dotless i")},{character:"IJ",title:t("Latin capital ligature ij")},{character:"ij",title:t("Latin small ligature ij")},{character:"Ĵ",title:t("Latin capital letter j with circumflex")},{character:"ĵ",title:t("Latin small letter j with circumflex")},{character:"Ķ",title:t("Latin capital letter k with cedilla")},{character:"ķ",title:t("Latin small letter k with cedilla")},{character:"ĸ",title:t("Latin small letter kra")},{character:"Ĺ",title:t("Latin capital letter l with acute")},{character:"ĺ",title:t("Latin small letter l with acute")},{character:"Ļ",title:t("Latin capital letter l with cedilla")},{character:"ļ",title:t("Latin small letter l with cedilla")},{character:"Ľ",title:t("Latin capital letter l with caron")},{character:"ľ",title:t("Latin small letter l with caron")},{character:"Ŀ",title:t("Latin capital letter l with middle dot")},{character:"ŀ",title:t("Latin small letter l with middle dot")},{character:"Ł",title:t("Latin capital letter l with stroke")},{character:"ł",title:t("Latin small letter l with stroke")},{character:"Ń",title:t("Latin capital letter n with acute")},{character:"ń",title:t("Latin small letter n with acute")},{character:"Ņ",title:t("Latin capital letter n with cedilla")},{character:"ņ",title:t("Latin small letter n with cedilla")},{character:"Ň",title:t("Latin capital letter n with caron")},{character:"ň",title:t("Latin small letter n with caron")},{character:"ʼn",title:t("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:t("Latin capital letter eng")},{character:"ŋ",title:t("Latin small letter eng")},{character:"Ō",title:t("Latin capital letter o with macron")},{character:"ō",title:t("Latin small letter o with macron")},{character:"Ŏ",title:t("Latin capital letter o with breve")},{character:"ŏ",title:t("Latin small letter o with breve")},{character:"Ő",title:t("Latin capital letter o with double acute")},{character:"ő",title:t("Latin small letter o with double acute")},{character:"Œ",title:t("Latin capital ligature oe")},{character:"œ",title:t("Latin small ligature oe")},{character:"Ŕ",title:t("Latin capital letter r with acute")},{character:"ŕ",title:t("Latin small letter r with acute")},{character:"Ŗ",title:t("Latin capital letter r with cedilla")},{character:"ŗ",title:t("Latin small letter r with cedilla")},{character:"Ř",title:t("Latin capital letter r with caron")},{character:"ř",title:t("Latin small letter r with caron")},{character:"Ś",title:t("Latin capital letter s with acute")},{character:"ś",title:t("Latin small letter s with acute")},{character:"Ŝ",title:t("Latin capital letter s with circumflex")},{character:"ŝ",title:t("Latin small letter s with circumflex")},{character:"Ş",title:t("Latin capital letter s with cedilla")},{character:"ş",title:t("Latin small letter s with cedilla")},{character:"Š",title:t("Latin capital letter s with caron")},{character:"š",title:t("Latin small letter s with caron")},{character:"Ţ",title:t("Latin capital letter t with cedilla")},{character:"ţ",title:t("Latin small letter t with cedilla")},{character:"Ť",title:t("Latin capital letter t with caron")},{character:"ť",title:t("Latin small letter t with caron")},{character:"Ŧ",title:t("Latin capital letter t with stroke")},{character:"ŧ",title:t("Latin small letter t with stroke")},{character:"Ũ",title:t("Latin capital letter u with tilde")},{character:"ũ",title:t("Latin small letter u with tilde")},{character:"Ū",title:t("Latin capital letter u with macron")},{character:"ū",title:t("Latin small letter u with macron")},{character:"Ŭ",title:t("Latin capital letter u with breve")},{character:"ŭ",title:t("Latin small letter u with breve")},{character:"Ů",title:t("Latin capital letter u with ring above")},{character:"ů",title:t("Latin small letter u with ring above")},{character:"Ű",title:t("Latin capital letter u with double acute")},{character:"ű",title:t("Latin small letter u with double acute")},{character:"Ų",title:t("Latin capital letter u with ogonek")},{character:"ų",title:t("Latin small letter u with ogonek")},{character:"Ŵ",title:t("Latin capital letter w with circumflex")},{character:"ŵ",title:t("Latin small letter w with circumflex")},{character:"Ŷ",title:t("Latin capital letter y with circumflex")},{character:"ŷ",title:t("Latin small letter y with circumflex")},{character:"Ÿ",title:t("Latin capital letter y with diaeresis")},{character:"Ź",title:t("Latin capital letter z with acute")},{character:"ź",title:t("Latin small letter z with acute")},{character:"Ż",title:t("Latin capital letter z with dot above")},{character:"ż",title:t("Latin small letter z with dot above")},{character:"Ž",title:t("Latin capital letter z with caron")},{character:"ž",title:t("Latin small letter z with caron")},{character:"ſ",title:t("Latin small letter long s")}],{label:t("Latin")})}}class R extends o{static get pluginName(){return"SpecialCharactersCurrency"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.t;e.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:t("Dollar sign")},{character:"€",title:t("Euro sign")},{character:"¥",title:t("Yen sign")},{character:"£",title:t("Pound sign")},{character:"¢",title:t("Cent sign")},{character:"₠",title:t("Euro-currency sign")},{character:"₡",title:t("Colon sign")},{character:"₢",title:t("Cruzeiro sign")},{character:"₣",title:t("French franc sign")},{character:"₤",title:t("Lira sign")},{character:"¤",title:t("Currency sign")},{character:"₿",title:t("Bitcoin sign")},{character:"₥",title:t("Mill sign")},{character:"₦",title:t("Naira sign")},{character:"₧",title:t("Peseta sign")},{character:"₨",title:t("Rupee sign")},{character:"₩",title:t("Won sign")},{character:"₪",title:t("New sheqel sign")},{character:"₫",title:t("Dong sign")},{character:"₭",title:t("Kip sign")},{character:"₮",title:t("Tugrik sign")},{character:"₯",title:t("Drachma sign")},{character:"₰",title:t("German penny sign")},{character:"₱",title:t("Peso sign")},{character:"₲",title:t("Guarani sign")},{character:"₳",title:t("Austral sign")},{character:"₴",title:t("Hryvnia sign")},{character:"₵",title:t("Cedi sign")},{character:"₶",title:t("Livre tournois sign")},{character:"₷",title:t("Spesmilo sign")},{character:"₸",title:t("Tenge sign")},{character:"₹",title:t("Indian rupee sign")},{character:"₺",title:t("Turkish lira sign")},{character:"₻",title:t("Nordic mark sign")},{character:"₼",title:t("Manat sign")},{character:"₽",title:t("Ruble sign")}],{label:t("Currency")})}}class Q extends o{static get pluginName(){return"SpecialCharactersEssentials"}static get isOfficialPlugin(){return!0}static get requires(){return[R,M,O,E,F]}}export{K as SpecialCharacters,E as SpecialCharactersArrows,R as SpecialCharactersCurrency,Q as SpecialCharactersEssentials,F as SpecialCharactersLatin,O as SpecialCharactersMathematical,M as SpecialCharactersText,A as _SpecialCharactersCategoriesView,P as _SpecialCharactersGridView,q as _SpecialCharactersInfoView,N as _SpecialCharactersView};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as h,Command as k}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as h,Command as k}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{createDropdown as _,View as g,ViewCollection as w,FocusCycler as A,LabelView as V,addKeyboardHandlingForGrid as B,ButtonView as F}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{first as T,logWarning as v,FocusTracker as S,KeystrokeHandler as b}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{findAttributeRange as U,findAttributeRangeBound as E}from"../../../../../@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{isObject as x}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class C extends F{styleDefinition;previewView;constructor(e,t){super(e),this.styleDefinition=t,this.previewView=this._createPreview(),this.set({label:t.name,class:"ck-style-grid__button",withText:!0}),this.extendTemplate({attributes:{role:"option"}}),this.children.add(this.previewView,0)}_createPreview(){const e=new g(this.locale);return e.setTemplate({tag:"div",attributes:{class:["ck","ck-reset_all-excluded","ck-style-grid__button__preview","ck-content"],"aria-hidden":"true"},children:[this.styleDefinition.previewTemplate]}),e}}class G extends g{focusTracker;keystrokes;children;constructor(e,t){super(e),this.focusTracker=new S,this.keystrokes=new b,this.set("activeStyles",[]),this.set("enabledStyles",[]),this.children=this.createCollection(),this.children.delegate("execute").to(this);for(const s of t){const i=new C(e,s);this.children.add(i)}this.on("change:activeStyles",()=>{for(const s of this.children)s.isOn=this.activeStyles.includes(s.styleDefinition.name)}),this.on("change:enabledStyles",()=>{for(const s of this.children)s.isEnabled=this.enabledStyles.includes(s.styleDefinition.name)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-grid"],role:"listbox"},children:this.children})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element);B({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.children,numberOfColumns:3,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection}),this.keystrokes.listenTo(this.element)}focus(){this.children.first.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}class y extends g{gridView;labelView;constructor(e,t,s){super(e),this.labelView=new V(e),this.labelView.text=t,this.gridView=new G(e,s),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel__style-group"],role:"group","aria-labelledby":this.labelView.id},children:[this.labelView,this.gridView]})}}class D extends g{focusTracker;keystrokes;children;blockStylesGroupView;inlineStylesGroupView;_focusables;_focusCycler;constructor(e,t){super(e);const s=e.t;this.focusTracker=new S,this.keystrokes=new b,this.children=this.createCollection(),this.blockStylesGroupView=new y(e,s("Block styles"),t.block),this.inlineStylesGroupView=new y(e,s("Text styles"),t.inline),this.set("activeStyles",[]),this.set("enabledStyles",[]),this._focusables=new w,this._focusCycler=new A({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["shift + tab"],focusNext:["tab"]}}),t.block.length&&this.children.add(this.blockStylesGroupView),t.inline.length&&this.children.add(this.inlineStylesGroupView),this.blockStylesGroupView.gridView.delegate("execute").to(this),this.inlineStylesGroupView.gridView.delegate("execute").to(this),this.blockStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this,"activeStyles","enabledStyles"),this.inlineStylesGroupView.gridView.bind("activeStyles","enabledStyles").to(this,"activeStyles","enabledStyles"),this.setTemplate({tag:"div",attributes:{class:["ck","ck-style-panel"]},children:this.children})}render(){super.render(),this._focusables.add(this.blockStylesGroupView.gridView),this._focusables.add(this.inlineStylesGroupView.gridView),this.focusTracker.add(this.blockStylesGroupView.gridView.element),this.focusTracker.add(this.inlineStylesGroupView.gridView.element),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}const P=["caption","colgroup","dd","dt","figcaption","legend","li","optgroup","option","rp","rt","summary","tbody","td","tfoot","th","thead","tr"];class d extends h{_htmlSupport;static get pluginName(){return"StyleUtils"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.decorate("isStyleEnabledForBlock"),this.decorate("isStyleActiveForBlock"),this.decorate("getAffectedBlocks"),this.decorate("isStyleEnabledForInlineSelection"),this.decorate("isStyleActiveForInlineSelection"),this.decorate("getAffectedInlineSelectable"),this.decorate("getStylePreview"),this.decorate("configureGHSDataFilter")}init(){this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport")}normalizeConfig(e,t=[]){const s={block:[],inline:[]};for(const i of t){const l=[],o=[];for(const n of e.getDefinitionsForView(i.element)){const u="appliesToBlock"in n?n.appliesToBlock:!1;if(n.isBlock||u){if(typeof u=="string")l.push(u);else if(n.isBlock){const a=n;l.push(n.model),a.paragraphLikeModel&&l.push(a.paragraphLikeModel)}}else o.push(n.model)}const c=this.getStylePreview(i,[{text:"AaBbCcDdEeFfGgHhIiJj"}]);l.length?s.block.push({...i,previewTemplate:c,modelElements:l,isBlock:!0}):s.inline.push({...i,previewTemplate:c,ghsAttributes:o})}return s}isStyleEnabledForBlock(e,t){const s=this.editor.model,i=this._htmlSupport.getGhsAttributeNameForElement(e.element);return s.schema.checkAttribute(t,i)?e.modelElements.includes(t.name):!1}isStyleActiveForBlock(e,t){const s=this._htmlSupport.getGhsAttributeNameForElement(e.element),i=t.getAttribute(s);return this.hasAllClasses(i,e.classes)}getAffectedBlocks(e,t){return e.modelElements.includes(t.name)?[t]:null}isStyleEnabledForInlineSelection(e,t){const s=this.editor.model;for(const i of e.ghsAttributes)if(s.schema.checkAttributeInSelection(t,i))return!0;return!1}isStyleActiveForInlineSelection(e,t){for(const s of e.ghsAttributes){const i=this._getValueFromFirstAllowedNode(t,s);if(this.hasAllClasses(i,e.classes))return!0}return!1}getAffectedInlineSelectable(e,t){return t}getStylePreview(e,t){const{element:s,classes:i}=e;return{tag:N(s)?s:"div",attributes:{class:i},children:t}}hasAllClasses(e,t){return x(e)&&H(e)&&t.every(s=>e.classes.includes(s))}configureGHSDataFilter({block:e,inline:t}){const s=this.editor.plugins.get("DataFilter");s.loadAllowedConfig(e.map(m)),s.loadAllowedConfig(t.map(m))}_getValueFromFirstAllowedNode(e,t){const i=this.editor.model.schema;if(e.isCollapsed)return e.getAttribute(t);for(const l of e.getRanges())for(const o of l.getItems())if(i.checkAttribute(o,t))return o.getAttribute(t);return null}}function H(r){return!!r.classes&&Array.isArray(r.classes)}function N(r){return!P.includes(r)}function m({element:r,classes:e}){return{name:r,classes:e}}class I extends h{static get pluginName(){return"StyleUI"}static get isOfficialPlugin(){return!0}static get requires(){return[d]}init(){const e=this.editor,t=e.plugins.get("DataSchema"),s=e.plugins.get("StyleUtils"),i=e.config.get("style.definitions"),l=s.normalizeConfig(t,i);e.ui.componentFactory.add("style",o=>{const c=o.t,n=_(o),u=e.commands.get("style");return n.once("change:isOpen",()=>{const a=new D(o,l);n.panelView.children.add(a),a.delegate("execute").to(n),a.bind("activeStyles").to(u,"value"),a.bind("enabledStyles").to(u,"enabledStyles")}),n.bind("isEnabled").to(u),n.buttonView.withText=!0,n.buttonView.bind("label").to(u,"value",a=>a.length>1?c("Multiple styles"):a.length===1?a[0]:c("Styles")),n.bind("class").to(u,"value",a=>{const f=["ck-style-dropdown"];return a.length>1&&f.push("ck-style-dropdown_multiple-active"),f.join(" ")}),n.on("execute",a=>{e.execute("style",{styleName:a.source.styleDefinition.name}),e.editing.view.focus()}),n})}}class L extends k{_styleDefinitions;_styleUtils;constructor(e,t){super(e),this.set("value",[]),this.set("enabledStyles",[]),this._styleDefinitions=t,this._styleUtils=this.editor.plugins.get(d)}refresh(){const e=this.editor.model,t=e.document.selection,s=new Set,i=new Set;for(const o of this._styleDefinitions.inline)this._styleUtils.isStyleEnabledForInlineSelection(o,t)&&i.add(o.name),this._styleUtils.isStyleActiveForInlineSelection(o,t)&&s.add(o.name);const l=T(t.getSelectedBlocks())||t.getFirstPosition().parent;if(l){const o=l.getAncestors({includeSelf:!0,parentFirst:!0});for(const c of o){if(c.is("rootElement"))break;for(const n of this._styleDefinitions.block)this._styleUtils.isStyleEnabledForBlock(n,c)&&(i.add(n.name),this._styleUtils.isStyleActiveForBlock(n,c)&&s.add(n.name));if(e.schema.isObject(c))break}}this.enabledStyles=Array.from(i).sort(),this.isEnabled=this.enabledStyles.length>0,this.value=this.isEnabled?Array.from(s).sort():[]}execute({styleName:e,forceValue:t}){if(!this.enabledStyles.includes(e)){v("style-command-executed-with-incorrect-style-name");return}const s=this.editor.model,i=s.document.selection,l=this.editor.plugins.get("GeneralHtmlSupport"),o=[...this._styleDefinitions.inline,...this._styleDefinitions.block],c=o.filter(({name:a})=>this.value.includes(a)),n=o.find(({name:a})=>a==e),u=t===void 0?!this.value.includes(n.name):t;s.change(()=>{let a;O(n)?a=this._findAffectedBlocks(z(i),n):a=[this._styleUtils.getAffectedInlineSelectable(n,i)];for(const f of a)u?l.addModelHtmlClass(n.element,n.classes,f):l.removeModelHtmlClass(n.element,R(c,n),f)})}_findAffectedBlocks(e,t){const s=new Set;for(const i of e){const l=i.getAncestors({includeSelf:!0,parentFirst:!0});for(const o of l){if(o.is("rootElement"))break;const c=this._styleUtils.getAffectedBlocks(t,o);if(c){for(const n of c)s.add(n);break}}}return s}}function R(r,e){return r.reduce((t,s)=>s.name===e.name?t:t.filter(i=>!s.classes.includes(i)),e.classes)}function O(r){return"isBlock"in r}function z(r){const e=Array.from(r.getSelectedBlocks());return e.length?e:[r.getFirstPosition().parent]}class M extends h{_listUtils;_styleUtils;_htmlSupport;static get pluginName(){return"ListStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[d,"GeneralHtmlSupport"]}init(){const e=this.editor;e.plugins.has("ListEditing")&&(this._styleUtils=e.plugins.get(d),this._listUtils=this.editor.plugins.get("ListUtils"),this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport"),this.listenTo(this._styleUtils,"isStyleEnabledForBlock",(t,[s,i])=>{this._isStyleEnabledForBlock(s,i)&&(t.return=!0,t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"isStyleActiveForBlock",(t,[s,i])=>{this._isStyleActiveForBlock(s,i)&&(t.return=!0,t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedBlocks",(t,[s,i])=>{const l=this._getAffectedBlocks(s,i);l&&(t.return=l,t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getStylePreview",(t,[s,i])=>{const l=this._getStylePreview(s,i);l&&(t.return=l,t.stop())},{priority:"high"}))}_isStyleEnabledForBlock(e,t){const s=this.editor.model;if(!["ol","ul","li"].includes(e.element)||!this._listUtils.isListItemBlock(t))return!1;const i=this._htmlSupport.getGhsAttributeNameForElement(e.element);if(e.element=="ol"||e.element=="ul"){if(!s.schema.checkAttribute(t,i))return!1;const o=this._listUtils.isNumberedListType(t.getAttribute("listType"))?"ol":"ul";return e.element==o}else return s.schema.checkAttribute(t,i)}_isStyleActiveForBlock(e,t){const s=this._htmlSupport.getGhsAttributeNameForElement(e.element),i=t.getAttribute(s);return this._styleUtils.hasAllClasses(i,e.classes)}_getAffectedBlocks(e,t){return this._isStyleEnabledForBlock(e,t)?e.element=="li"?this._listUtils.expandListBlocksToCompleteItems(t,{withNested:!1}):this._listUtils.expandListBlocksToCompleteList(t):null}_getStylePreview(e,t){const{element:s,classes:i}=e;return s=="ol"||s=="ul"?{tag:s,attributes:{class:i},children:[{tag:"li",children:t}]}:s=="li"?{tag:"ol",children:[{tag:s,attributes:{class:i},children:t}]}:null}}class q extends h{_tableUtils;_styleUtils;static get pluginName(){return"TableStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[d]}init(){const e=this.editor;e.plugins.has("TableEditing")&&(this._styleUtils=e.plugins.get(d),this._tableUtils=this.editor.plugins.get("TableUtils"),this.listenTo(this._styleUtils,"isStyleEnabledForBlock",(t,[s,i])=>{this._isApplicable(s,i)&&(t.return=this._isStyleEnabledForBlock(s,i),t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedBlocks",(t,[s,i])=>{this._isApplicable(s,i)&&(t.return=this._getAffectedBlocks(s,i),t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"configureGHSDataFilter",(t,[{block:s}])=>{this.editor.plugins.get("DataFilter").loadAllowedConfig(s.filter(l=>l.element=="figcaption").map(l=>({name:"caption",classes:l.classes})))}))}_isApplicable(e,t){return["td","th"].includes(e.element)?t.name=="tableCell":["thead","tbody"].includes(e.element)?t.name=="table":!1}_isStyleEnabledForBlock(e,t){if(["td","th"].includes(e.element)){const s=this._tableUtils.getCellLocation(t),l=t.parent.parent,o=l.getAttribute("headingRows")||0,c=l.getAttribute("headingColumns")||0,n=s.row<o||s.column<c;return e.element=="th"?n:!n}if(["thead","tbody"].includes(e.element)){const s=t.getAttribute("headingRows")||0;return e.element=="thead"?s>0:s<this._tableUtils.getRows(t)}/* istanbul ignore next -- @preserve */return!1}_getAffectedBlocks(e,t){return this._isStyleEnabledForBlock(e,t)?[t]:null}}class j extends h{_styleUtils;_htmlSupport;static get pluginName(){return"LinkStyleSupport"}static get isOfficialPlugin(){return!0}static get requires(){return[d,"GeneralHtmlSupport"]}init(){const e=this.editor;e.plugins.has("LinkEditing")&&(this._styleUtils=e.plugins.get(d),this._htmlSupport=this.editor.plugins.get("GeneralHtmlSupport"),this.listenTo(this._styleUtils,"isStyleEnabledForInlineSelection",(t,[s,i])=>{s.element=="a"&&(t.return=this._isStyleEnabled(s,i),t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"isStyleActiveForInlineSelection",(t,[s,i])=>{s.element=="a"&&(t.return=this._isStyleActive(s,i),t.stop())},{priority:"high"}),this.listenTo(this._styleUtils,"getAffectedInlineSelectable",(t,[s,i])=>{if(s.element!="a")return;const l=this._getAffectedSelectable(s,i);l&&(t.return=l,t.stop())},{priority:"high"}))}_isStyleEnabled(e,t){const s=this.editor.model;if(t.isCollapsed)return t.hasAttribute("linkHref");for(const i of t.getRanges())for(const l of i.getItems())if((l.is("$textProxy")||s.schema.isInline(l))&&l.hasAttribute("linkHref"))return!0;return!1}_isStyleActive(e,t){const s=this.editor.model,i=this._htmlSupport.getGhsAttributeNameForElement(e.element);if(t.isCollapsed){if(t.hasAttribute("linkHref")){const l=t.getAttribute(i);if(this._styleUtils.hasAllClasses(l,e.classes))return!0}return!1}for(const l of t.getRanges())for(const o of l.getItems())if((o.is("$textProxy")||s.schema.isInline(o))&&o.hasAttribute("linkHref")){const c=o.getAttribute(i);return this._styleUtils.hasAllClasses(c,e.classes)}return!1}_getAffectedSelectable(e,t){const s=this.editor.model;if(t.isCollapsed){const l=t.getAttribute("linkHref");return U(t.getFirstPosition(),"linkHref",l,s)}const i=[];for(const l of t.getRanges()){const o=s.createRange(p(l.start,"linkHref",!0,s),p(l.end,"linkHref",!1,s));for(const c of o.getItems())(c.is("$textProxy")||s.schema.isInline(c))&&c.hasAttribute("linkHref")&&i.push(this.editor.model.createRangeOn(c))}return $(i)}}function p(r,e,t,s){const i=r.textNode||(t?r.nodeAfter:r.nodeBefore);if(!i||!i.hasAttribute(e))return r;const l=i.getAttribute(e);return E(r,e,l,t,s)}function $(r){for(let e=1;e<r.length;e++){const t=r[e-1].getJoined(r[e]);t&&r.splice(--e,2,t)}return r}class J extends h{static get pluginName(){return"StyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return["GeneralHtmlSupport",d,M,q,j]}init(){const e=this.editor,t=e.plugins.get("DataSchema"),s=e.plugins.get("StyleUtils"),i=e.config.get("style.definitions"),l=s.normalizeConfig(t,i);e.commands.add("style",new L(e,l)),s.configureGHSDataFilter(l)}}class Z extends h{static get pluginName(){return"Style"}static get isOfficialPlugin(){return!0}static get requires(){return[J,I]}}export{j as LinkStyleSupport,M as ListStyleSupport,Z as Style,L as StyleCommand,J as StyleEditing,I as StyleUI,d as StyleUtils,q as TableStyleSupport,C as _StyleGridButtonView,G as _StyleGridView,y as _StyleGroupView,D as _StylePanelView};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as y,Command as v}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as y,Command as v}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Widget as lo,WidgetToolbarRepository as Ue,toWidgetEditable as pt,isWidget as io,toWidget as so}from"../../../../../@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{Collection as Ct,first as Le,getLocalizedArrowKeyCodeDirection as ro,DomEmitterMixin as ao,global as ie,Rect as se,toUnit as co,CKEditorError as je,KeystrokeHandler as ge,FocusTracker as be}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconTable as Ge,IconTableColumn as uo,IconTableRow as ho,IconTableMergeCell as mo,IconCaption as go,IconTableCellProperties as bo,IconTableProperties as fo,IconCheck as wt,IconCancel as Tt,IconObjectInlineRight as po,IconObjectCenter as Co,IconObjectInlineLeft as wo,IconAlignBottom as To,IconAlignMiddle as _o,IconAlignTop as yo,IconAlignJustify as Ao,IconAlignRight as vo,IconAlignCenter as So,IconAlignLeft as Ro}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{createDropdown as te,MenuBarMenuView as Io,SwitchButtonView as xo,addListToDropdown as We,ButtonView as P,ContextualBalloon as re,normalizeColorOptions as ae,getLocalizedColorOptions as ce,clickOutsideHandler as _t,SplitButtonView as Vo,View as F,addKeyboardHandlingForGrid as ko,UIModel as yt,ViewCollection as Be,FocusCycler as Ne,FormHeaderView as At,FormRowView as R,submitHandler as vt,LabelView as L,LabeledFieldView as I,createLabeledDropdown as St,createLabeledInputText as D,ToolbarView as Te,BalloonPanelView as N,InputTextView as Po,ColorSelectorView as Eo}from"../../../../../@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{ClipboardMarkersUtils as Ce,ClipboardPipeline as $e}from"../../../../../@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{enableViewPlaceholder as Lo,ModelElement as Wo,addBorderStylesRules as Rt,addPaddingStylesRules as Bo,addBackgroundStylesRules as It,DomEventObserver as No,isColorStyleValue as Do,isLengthStyleValue as xt,isPercentageStyleValue as Fo}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{debounce as Vt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";import{isEqual as Ke}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/predicate/isEqual.js";import{throttle as Mo}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";import{isObject as Oo}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/function De(i,e){const{modelAttribute:t,styleName:o,attributeName:n,attributeType:l,viewElement:s,defaultValue:r,shouldUpcast:a=()=>!0,reduceBoxSides:c=!1}=e;i.for("upcast").attributeToAttribute({view:{name:s,styles:{[o]:/[\s\S]+/}},model:{key:t,value:(d,u,h)=>{if(!a(d))return;const g=k(r,"",h),m=d.getNormalizedStyle(o),b=c?ne(m):m;if(g!==b)return b;u.consumable.consume(d,{styles:o})}}}),n&&i.for("upcast").attributeToAttribute({view:{name:s,attributes:{[n]:/.+/}},model:{key:t,value:(d,u,h)=>{if(d.name=="figure"||d.hasStyle(o)||d.name=="table"&&d.parent.name=="figure"&&d.parent.hasStyle(o))return;const g=k(r,"",h);let m=d.getAttribute(n);if(m&&l=="length"&&!m.endsWith("px")&&(m+="px"),g!==m)return m;u.consumable.consume(d,{attributes:n})}}})}function _e(i,e,t,o){i.for("upcast").add(n=>n.on("element:"+e,(l,s,r)=>{if(!s.modelRange)return;const a=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(b=>s.viewItem.hasStyle(b));if(!a.length)return;const c={styles:a};if(!r.consumable.test(s.viewItem,c))return;const d=[...s.modelRange.getItems({shallow:!0})].pop(),u=d.findAncestor("table",{includeSelf:!0});let h=o;u&&u.getAttribute("tableType")=="layout"&&(h={style:"none",color:"",width:""}),r.consumable.consume(s.viewItem,c);const g={style:s.viewItem.getNormalizedStyle("border-style"),color:s.viewItem.getNormalizedStyle("border-color"),width:s.viewItem.getNormalizedStyle("border-width")},m={style:ne(g.style),color:ne(g.color),width:ne(g.width)};m.style!==h.style&&r.writer.setAttribute(t.style,m.style,d),m.color!==h.color&&r.writer.setAttribute(t.color,m.color,d),m.width!==h.width&&r.writer.setAttribute(t.width,m.width,d)}))}function $(i,e){const{modelElement:t,modelAttribute:o,styleName:n}=e;i.for("downcast").attributeToAttribute({model:{name:t,key:o},view:l=>({key:"style",value:{[n]:l}})})}function oe(i,e){const{modelAttribute:t,styleName:o}=e;i.for("downcast").add(n=>n.on(`attribute:${t}:table`,(l,s,r)=>{const{item:a,attributeNewValue:c}=s,{mapper:d,writer:u}=r;if(!r.consumable.consume(s.item,l.name))return;const h=[...d.toViewElement(a).getChildren()].find(g=>g.is("element","table"));c?u.setStyle(o,c,h):u.removeStyle(o,h)}))}function k(i,e,t){const o=t.modelRange&&Le(t.modelRange.getItems({shallow:!0})),n=o&&o.is("element")&&o.findAncestor("table",{includeSelf:!0});return n&&n.getAttribute("tableType")==="layout"?e:i}function ne(i){if(!i)return;const e=["top","right","bottom","left"];if(!e.every(l=>i[l]))return i;const o=i.top;return e.every(l=>i[l]===o)?o:i}function _(i,e,t,o,n=1){e!=null&&n!==void 0&&n!==null&&e>n?o.setAttribute(i,e,t):o.removeAttribute(i,t)}function M(i,e,t={}){const o=i.createElement("tableCell",t);return i.insertElement("paragraph",o),i.insert(o,e),o}function ye(i,e){const t=e.parent.parent,o=parseInt(t.getAttribute("headingColumns")||"0"),{column:n}=i.getCellLocation(e);return!!o&&n<o}function le(i,e,t){const{modelAttribute:o}=t;i.extend("tableCell",{allowAttributes:[o]}),i.setAttributeProperties(o,{isFormatting:!0}),De(e,{viewElement:/^(td|th)$/,...t}),$(e,{modelElement:"tableCell",...t})}function W(i){const e=i.getSelectedElement();return e&&e.is("element","table")?e:i.getFirstPosition().findAncestor("table")}function zo(){return i=>{i.on("element:figure",(e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=jo(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const l=o.convertItem(n,t.modelCursor),s=Le(l.modelRange.getItems());if(!s){o.consumable.revert(t.viewItem,{name:!0,classes:"table"});return}o.convertChildren(t.viewItem,o.writer.createPositionAt(s,"end")),o.updateConversionResult(s,t)})}}function Ho(){return i=>{i.on("element:table",(e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:l,headingRows:s,headingColumns:r}=Go(n),a={};r&&(a.headingColumns=r),s&&(a.headingRows=s);const c=o.writer.createElement("table",a);if(o.safeInsert(c,t.modelCursor)){if(o.consumable.consume(n,{name:!0}),l.forEach(d=>o.convertItem(d,o.writer.createPositionAt(c,"end"))),o.convertChildren(n,o.writer.createPositionAt(c,"end")),c.isEmpty){const d=o.writer.createElement("tableRow");o.writer.insert(d,o.writer.createPositionAt(c,"end")),M(o.writer,o.writer.createPositionAt(d,"end"))}o.updateConversionResult(c,t)}})}}function Uo(){return i=>{i.on("element:tr",(e,t)=>{t.viewItem.isEmpty&&t.modelCursor.index==0&&e.stop()},{priority:"high"})}}function qe(i){return e=>{e.on(`element:${i}`,(t,o,{writer:n})=>{if(!o.modelRange)return;const l=o.modelRange.start.nodeAfter,s=n.createPositionAt(l,0);if(o.viewItem.isEmpty){n.insertElement("paragraph",s);return}const r=Array.from(l.getChildren());if(r.every(a=>a.is("element","$marker"))){const a=n.createElement("paragraph");n.insert(a,n.createPositionAt(l,0));for(const c of r)n.move(n.createRangeOn(c),n.createPositionAt(a,"end"))}},{priority:"low"})}}function jo(i){for(const e of i.getChildren())if(e.is("element","table"))return e}function Go(i){let e=0,t;const o=[],n=[];let l;for(const s of Array.from(i.getChildren())){if(s.name!=="tbody"&&s.name!=="thead"&&s.name!=="tfoot")continue;s.name==="thead"&&!l&&(l=s);const r=Array.from(s.getChildren()).filter(c=>c.is("element","tr"));let a=null;for(const c of r){const d=Array.from(c.getChildren()).filter(u=>u.is("element","td")||u.is("element","th"));if(l&&s===l||s.name==="tbody"&&d.length>0&&(a===null||d.length===a)&&d.every(u=>u.is("element","th")))e++,o.push(c);else{n.push(c);const u=$o(c);(!t||u<t)&&(t=u)}a=Math.max(a||0,d.length)}}return{headingRows:e,headingColumns:t||0,rows:[...o,...n]}}function $o(i){let e=0,t=0;const o=Array.from(i.getChildren()).filter(n=>n.name==="th"||n.name==="td");for(;t<o.length&&o[t].name==="th";){const n=o[t],l=parseInt(n.getAttribute("colspan")||"1");e=e+l,t++}return e}/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Plugin as k,Command as z}from"../../../../../@ckeditor_ckeditor5-core@46.1.
|
|
1
|
+
import{Plugin as k,Command as z}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{keyCodes as y,ObservableMixin as V,env as E,count as Y,isInsideSurrogatePair as J,isInsideCombinedSymbol as X,isInsideEmojiSequence as Z,EventInfo as ee}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{_tryFixingModelRange as $,BubblingEventInfo as D,ViewDocumentDomEventData as S,Observer as W,MouseObserver as te,TouchObserver as ne,ModelLiveRange as ie,FocusObserver as se}from"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{escapeRegExp as oe}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js";import{debounce as re}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*//**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{getEnvKeystrokeText as Y,uid as Q,env as A,delay as Lt,createElement as x,KeystrokeHandler as E,FocusTracker as b,toUnit as te,global as d,Rect as T,DomEmitterMixin as ie,ObservableMixin as se,Collection as pe,isIterable as xe,CKEditorError as v,getOptimalPosition as me,logWarning as C,EmitterMixin as Ze,getVisualViewportOffset as K,isVisible as O,isNode as Je,priorities as Ft,isText as At,ResizeObserver as et,toArray as oe,first as Dt,parseBase64EncodedObject as tt,isRange as St}from"../../../../../@ckeditor_ckeditor5-utils@46.1.
|
|
1
|
+
import{getEnvKeystrokeText as Y,uid as Q,env as A,delay as Lt,createElement as x,KeystrokeHandler as E,FocusTracker as b,toUnit as te,global as d,Rect as T,DomEmitterMixin as ie,ObservableMixin as se,Collection as pe,isIterable as xe,CKEditorError as v,getOptimalPosition as me,logWarning as C,EmitterMixin as Ze,getVisualViewportOffset as K,isVisible as O,isNode as Je,priorities as Ft,isText as At,ResizeObserver as et,toArray as oe,first as Dt,parseBase64EncodedObject as tt,isRange as St}from"../../../../../@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Plugin as we,ContextPlugin as Mt}from"../../../../../@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{IconAccessibility as Ee,IconCancel as it,IconDropdownArrow as ne,IconDragIndicator as Nt,IconPilcrow as Wt,IconThreeVerticalDots as be,IconText as Gt,IconPlus as Rt,IconParagraph as Ht,IconImportExport as zt,IconBold as Ut,IconAlignLeft as $t,IconCheck as st,IconPreviousArrow as Kt,IconNextArrow as jt,IconColorPalette as Xt,IconEraser as qt,IconProjectLogo as Yt,IconColorTileCheck as Qt}from"../../../../../@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import Ie from"../../../../../color-parse@2.0.2/node_modules/color-parse/index.js";import ot from"../../../../../color-convert@3.1.0/node_modules/color-convert/index.js";import{HexBase as Zt}from"../../../../../vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js";import"../../../../../@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{assignIn as Jt}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/assignIn.js";import{isObject as Z}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isObject.js";import{cloneDeep as ge}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/cloneDeep.js";import{debounce as fe}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/debounce.js";import{isElement as _e}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/predicate/isElement.js";import{cloneDeepWith as ei}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js";import{throttle as ti}from"../../../../../es-toolkit@1.39.5/node_modules/es-toolkit/dist/compat/function/throttle.js";/**
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/class B extends pe{_parentElement;constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(t,i,o)=>{this._renderViewIntoCollectionParent(i,o)}),this.on("remove",(t,i)=>{i.element&&this._parentElement&&i.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...e){if(!e.length||!ii(e))throw new v("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const i of this)for(const o of e)i.delegate(o).to(t);this.on("add",(i,o)=>{for(const n of e)o.delegate(n).to(t)}),this.on("remove",(i,o)=>{for(const n of e)o.stopDelegating(n,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}function ii(s){return s.every(e=>typeof e=="string")}const si="http://www.w3.org/1999/xhtml";class V extends Ze(){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,Pe(Oe(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Fe(),this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new v("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const i of t.children)J(i)?yield i:ke(i)&&(yield*e(i))}yield*e(this)}static bind(e,t){return{to(i,o){return new oi({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:o})},if(i,o,n){return new nt({observable:e,emitter:t,attribute:i,valueIfTrue:o,callback:n})}}}static extend(e,t){if(e._isRendered)throw new v("template-extend-render",[this,e]);ct(e,Pe(Oe(t)))}_renderNode(e){let t;if(e.node?t=this.tag&&this.text:t=this.tag?this.text:!this.text,t)throw new v("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||si,this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),j(this.text)?this._bindToObservable({schema:this.text,updater:ri(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const o in this.attributes){const n=t.getAttribute(o),r=this.attributes[o];i&&(i.attributes[o]=n);const a=Le(r)?r[0].ns:null;if(j(r)){const l=Le(r)?r[0].value:r;i&&Ae(o)&&l.unshift(n),this._bindToObservable({schema:l,updater:li(t,o,a),data:e})}else if(o=="style"&&typeof r[0]!="string")this._renderStyleAttribute(r[0],e);else{i&&n&&Ae(o)&&r.unshift(n);const l=r.map(c=>c&&(c.value||c)).reduce((c,u)=>c.concat(u),[]).reduce(at,"");M(l)||t.setAttributeNS(a,o,l)}}}_renderStyleAttribute(e,t){const i=t.node;for(const o in e){const n=e[o];j(n)?this._bindToObservable({schema:[n],updater:ai(i,o),data:t}):i.style[o]=n}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let n=0;for(const r of this.children)if(Te(r)){if(!o){r.setParent(t);for(const a of r)i.appendChild(a.element)}}else if(J(r))o||(r.isRendered||r.render(),i.appendChild(r.element));else if(Je(r))i.appendChild(r);else if(o){const a=e.revertData,l=Fe();a.children.push(l),r._renderNode({intoFragment:!1,node:i.childNodes[n++],isApplying:!0,revertData:l})}else i.appendChild(r.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(o=>{const[n,r]=t.split("@");return o.activateDomEventListener(n,r,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const o=i.revertData;rt(e,t,i);const n=e.filter(r=>!M(r)).filter(r=>r.observable).map(r=>r.activateAttributeListener(e,t,i));o&&o.bindings.push(n)}_revertTemplateFromNode(e,t){for(const o of t.bindings)for(const n of o)n();if(t.text){e.textContent=t.text;return}const i=e;for(const o in t.attributes){const n=t.attributes[o];n===null?i.removeAttribute(o):i.setAttribute(o,n)}for(let o=0;o<t.children.length;++o)this._revertTemplateFromNode(i.childNodes[o],t.children[o])}}class H{attribute;observable;emitter;callback;constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const t=this.observable[this.attribute];return this.callback?this.callback(t,e):t}activateAttributeListener(e,t,i){const o=()=>rt(e,t,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,o),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,o)}}}class oi extends H{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const o=(n,r)=>{(!t||r.target.matches(t))&&(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(r):this.observable.fire(this.eventNameOrFunction,r))};return this.emitter.listenTo(i.node,e,o),()=>{this.emitter.stopListening(i.node,e,o)}}}class nt extends H{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){const t=super.getValue(e);return M(t)?!1:this.valueIfTrue||!0}}function j(s){return s?(s.value&&(s=s.value),Array.isArray(s)?s.some(j):s instanceof H):!1}function ni(s,e){return s.map(t=>t instanceof H?t.getValue(e):t)}function rt(s,e,{node:t}){const i=ni(s,t);let o;s.length==1&&s[0]instanceof nt?o=i[0]:o=i.reduce(at,""),M(o)?e.remove():e.set(o)}function ri(s){return{set(e){s.textContent=e},remove(){s.textContent=""}}}function li(s,e,t){return{set(i){s.setAttributeNS(t,e,i)},remove(){s.removeAttributeNS(t,e)}}}function ai(s,e){return{set(t){s.style[e]=t},remove(){s.style[e]=null}}}function Oe(s){return ei(s,t=>{if(t&&(t instanceof H||ke(t)||J(t)||Te(t)))return t})}function Pe(s){if(typeof s=="string"?s=ui(s):s.text&&di(s),s.on&&(s.eventListeners=hi(s.on),delete s.on),!s.text){s.attributes&&ci(s.attributes);const e=[];if(s.children)if(Te(s.children))e.push(s.children);else for(const t of s.children)ke(t)||J(t)||Je(t)?e.push(t):e.push(new V(t));s.children=e}return s}function ci(s){for(const e in s)s[e].value&&(s[e].value=oe(s[e].value)),lt(s,e)}function hi(s){for(const e in s)lt(s,e);return s}function ui(s){return{text:[s]}}function di(s){s.text=oe(s.text)}function lt(s,e){s[e]=oe(s[e])}function at(s,e){return M(e)?s:M(s)?e:`${s} ${e}`}function Be(s,e){for(const t in e)s[t]?s[t].push(...e[t]):s[t]=e[t]}function ct(s,e){if(e.attributes&&(s.attributes||(s.attributes={}),Be(s.attributes,e.attributes)),e.eventListeners&&(s.eventListeners||(s.eventListeners={}),Be(s.eventListeners,e.eventListeners)),e.text&&s.text.push(...e.text),e.children&&e.children.length){if(s.children.length!=e.children.length)throw new v("ui-template-extend-children-mismatch",s);let t=0;for(const i of e.children)ct(s.children[t++],i)}}function M(s){return!s&&s!==0}function J(s){return s instanceof h}function ke(s){return s instanceof V}function Te(s){return s instanceof B}function Le(s){return Z(s[0])&&s[0].ns}function Fe(){return{children:[],bindings:[],attributes:{}}}function Ae(s){return s=="class"||s=="style"}class h extends ie(se()){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new pe,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e,i.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=V.bind(this,this)}createCollection(e){const t=new B(e);return this._viewCollections.add(t),t}registerChild(e){xe(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){xe(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new V(e)}extendTemplate(e){V.extend(this.template,e)}render(){if(this.isRendered)throw new v("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}const De={POLITE:"polite",ASSERTIVE:"assertive"};class fi{editor;view;constructor(e){this.editor=e,e.once("ready",()=>{for(const t of Object.values(De))this.announce("",t)})}announce(e,t=De.POLITE){const i=this.editor;if(!i.ui.view)return;this.view||(this.view=new pi(i.locale),i.ui.view.body.add(this.view));const{politeness:o,isUnsafeHTML:n}=typeof t=="string"?{politeness:t}:t;let r=this.view.regionViews.find(a=>a.politeness===o);r||(r=new mi(i,o),this.view.regionViews.add(r)),r.announce({announcement:e,isUnsafeHTML:n})}}class pi extends h{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class mi extends h{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,t){super(e.locale),this.setTemplate({tag:"div",attributes:{"aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const i=document.createElement("li");t?this._domConverter.setContentOf(i,e):i.innerText=e,this._listElement.appendChild(i)}get _listElement(){return this.element.querySelector("ul")}}/**
|