@ncino/web-components 8.0.0 → 8.1.0-preview.8
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/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/_virtual/index_html.js +1 -1
- package/dist/_virtual/index_react.js +1 -1
- package/dist/assets/node_modules/.pnpm/ckeditor5@46.1.1/node_modules/ckeditor5/dist/ckeditor5.css +1 -4
- package/dist/components/accordion/gator/base/accordion.gator.js +1 -1
- package/dist/components/accordion/gator/group/accordion-group.gator.js +1 -1
- package/dist/components/alert/gator/base/alert.gator.js +1 -1
- package/dist/components/alert/gator/subtitle/alert-subtitle.gator.js +1 -1
- package/dist/components/alert/gator/title/alert-title.gator.js +1 -1
- package/dist/components/avatar/gator/avatar.gator.js +1 -1
- package/dist/components/badge/gator/badge.gator.js +1 -1
- package/dist/components/banner/gator/banner.gator.js +1 -1
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.js +10 -4
- package/dist/components/button/gator/button.gator.js +1 -1
- package/dist/components/button-card/gator/button-card.gator.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/gator/base/card.gator.js +1 -1
- package/dist/components/card/gator/content/card-content.gator.js +1 -1
- package/dist/components/card/gator/footer/card-footer.gator.js +1 -1
- package/dist/components/card/gator/header/card-header.gator.js +1 -1
- package/dist/components/checkbox/checkbox.gator.js +1 -1
- package/dist/components/chip/gator/chip.gator.js +1 -1
- package/dist/components/date-picker/base/gator/datepicker.gator.js +1 -1
- package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +1 -1
- package/dist/components/display-card/gator/display-card.gator.js +1 -1
- package/dist/components/divider/gator/divider.gator.js +2 -2
- package/dist/components/fab/gator/fab.gator.js +1 -1
- package/dist/components/icon-button/gator/icon-button.gator.js +1 -1
- package/dist/components/illustration/gator/illustration.gator.js +1 -1
- package/dist/components/image-card/gator/image-card.gator.js +23 -19
- package/dist/components/input/base/input-base.gator.js +1 -1
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +15 -15
- package/dist/components/input/gator/help-text/help-text.gator.js +1 -1
- package/dist/components/input/gator/input-date/input-date.gator.js +14 -17
- package/dist/components/input/gator/input-label/input-label.gator.js +3 -3
- package/dist/components/input/gator/input-phone/input-phone.gator.js +1 -1
- package/dist/components/loading-spinner/gator/loading-spinner.gator.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +1 -1
- package/dist/components/modal/gator/modal.gator.js +54 -50
- package/dist/components/page-header/gator/page-header.gator.js +3 -3
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/popover/gator/popover.gator.js +1 -1
- package/dist/components/progress-bar/gator/progress-bar.gator.js +18 -12
- package/dist/components/progress-ring/gator/progress-ring.gator.js +1 -1
- package/dist/components/selection-box/selection-box.gator.js +1 -1
- package/dist/components/selector/gator/selector.gator.js +1 -1
- package/dist/components/skeleton-loader/gator/skeleton-loader.gator.js +1 -1
- package/dist/components/switch/gator/switch.gator.js +1 -1
- package/dist/components/table/gator/table.gator.js +1 -1
- package/dist/components/tabs/gator/tabset/tabset.gator.js +1 -1
- package/dist/components/text-detail/gator/text-detail.gator.js +1 -1
- package/dist/components/text-link/gator/text-link.gator.js +1 -1
- package/dist/components/toast/gator/base/toast.gator.js +1 -1
- package/dist/components/toast/gator/subtitle/toast-subtitle.gator.js +1 -1
- package/dist/components/toast/gator/title/toast-title.gator.js +1 -1
- package/dist/components/toast-container/gator/toast-container.gator.js +1 -1
- package/dist/components/toaster/gator/toaster.gator.js +1 -1
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/design-tokens.source.json +1 -1
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@46.1.1/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-autoformat@46.1.1/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-autosave@46.1.1/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@46.1.1/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-block-quote@46.1.1/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@46.1.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +2 -14
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-cloud-services@46.1.1/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@46.1.1/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@46.1.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@46.1.1/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@46.1.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +2 -29
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-enter@46.1.1/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-essentials@46.1.1/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@46.1.1/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +2 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@46.1.1/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-heading@46.1.1/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@46.1.1/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@46.1.1/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@46.1.1/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@46.1.1/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +1 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-icons@46.1.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@46.1.1/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@46.1.1/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-language@46.1.1/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@46.1.1/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@46.1.1/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -13
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-markdown-gfm@46.1.1/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +2 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@46.1.1/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-mention@46.1.1/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@46.1.1/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paragraph@46.1.1/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@46.1.1/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -31
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@46.1.1/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@46.1.1/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@46.1.1/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@46.1.1/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@46.1.1/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-style@46.1.1/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@46.1.1/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -16
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@46.1.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +1 -13
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@46.1.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -25
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-undo@46.1.1/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-upload@46.1.1/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@46.1.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +3 -108
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-watchdog@46.1.1/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +1 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@46.1.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -4
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.9/node_modules/@figma/code-connect/package.json.js +1 -0
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/default-msg.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/deferred.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/fnv1a64.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/locale-status-event.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-controller.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js +1 -5
- package/dist/node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js +1 -5
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +1 -5
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js +1 -5
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +1 -5
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +1 -5
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +1 -5
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +1 -17
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +1 -7
- package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +1 -1
- package/dist/node_modules/.pnpm/axe-core@4.11.0/node_modules/axe-core/axe.js +1 -11
- package/dist/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js +1 -6
- package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js +1 -217
- package/dist/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/conversions.js +1 -0
- package/dist/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/index.js +1 -0
- package/dist/node_modules/.pnpm/color-convert@3.1.3/node_modules/color-convert/route.js +1 -0
- package/dist/node_modules/.pnpm/color-string@2.1.4/node_modules/color-string/index.js +1 -0
- package/dist/node_modules/.pnpm/{color@5.0.2 → color@5.0.3}/node_modules/color/index.js +1 -1
- package/dist/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +1 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.26/node_modules/libphonenumber-js/metadata.min.json.js +1 -0
- package/dist/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/async-directive.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/ref.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +1 -5
- package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +1 -5
- package/dist/node_modules/.pnpm/react@19.2.0/node_modules/react/cjs/react.production.js +1 -9
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/_browser-chunks/chunk-JVSKG4YS.js +48 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/_browser-chunks/chunk-MM7DTO55.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/_browser-chunks/chunk-OPCDBBL3.js +6 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/_browser-chunks/chunk-SN4J4IQ3.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/_browser-chunks/chunk-VUAFL5XK.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/client-logger/index.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/core-events/index.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/instrumenter/index.js +1 -0
- package/dist/node_modules/.pnpm/storybook@10.0.8_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.10.0_typescript@5_e2791259526ede65857ac65f52302a74/node_modules/storybook/dist/test/index.js +152 -0
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/body.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +1 -1
- package/dist/packages/{web-components/src/tokens/semantic.tokens.scss.js → styles/src/gator/tokens/semantic.tokens.css.js} +1 -1
- package/dist/packages/web-components/src/components/alert/gator/title/alert-title.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/badge/gator/badge.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/button-card/gator/button-card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/card/gator/base/card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/card/gator/content/card-content.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/card/gator/footer/card-footer.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/card/gator/header/card-header.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/date-picker/year-month-selector/year-month-selector.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/display-card/gator/display-card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/divider/gator/divider.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/fab/gator/fab.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/guided-nav/gator/guided-nav-substep/guided-nav-substep.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/headline-card/gator/headline-card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/icon/gator/icon.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/illustration/gator/illustration.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/image-card/gator/image-card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/dropdown/input-dropdown.gator.scss.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-date/input-date.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-file/file-uploaded-preview/file-upload-preview.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/gator/input-file/input-file.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/input/gator/input-search/input-search.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/input/input.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/list/gator/list-item/list-item.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/menu/base/gator/menu.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/modal/gator/modal.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/page-header/gator/page-header.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/panel/gator/panel.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/popover/gator/popover.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/progress-bar/gator/progress-bar.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/selection-box/selection-box.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/skip-link/gator/base/skip-link.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/skip-link/gator/list-item/skip-link-list-item.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table-controls/table-controls.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table-pagination/table-pagination.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/tabs/gator/tabs.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/text-link/gator/text-link.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/time-picker/gator/time-picker.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast/gator/base/toast.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast/gator/title/toast-title.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toaster/gator/toaster.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/tooltip/gator/tooltip.gator.scss.js +1 -1
- package/dist/packages/web-components/src/index.slds.scss.js +1 -1
- package/dist/types/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.d.ts +3 -5
- package/dist/types/components/image-card/gator/image-card.gator.d.ts +5 -1
- package/dist/types/components/input/gator/input-date/input-date.gator.d.ts +7 -0
- package/dist/types/components/modal/gator/modal.gator.d.ts +16 -3
- package/dist/types/components/page-header/gator/page-header.gator.d.ts +0 -1
- package/dist/types/components/progress-bar/gator/progress-bar.gator.d.ts +8 -0
- package/dist/types/generated/locale-codes.d.ts +10 -0
- package/dist/types/generated/locales/es-419.d.ts +6 -1
- package/dist/types/generated/locales/fr-CA.d.ts +6 -1
- package/dist/types/generated/locales/zh-Hans.d.ts +6 -1
- package/dist/utils/brand-color-utils.js +1 -1
- package/dist/utils/components/ngc-component.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +21 -21
- package/web-types.json +15 -5
- package/dist/generated/locale-codes.d.js +0 -1
- package/dist/generated/locales/es-419.d.js +0 -1
- package/dist/generated/locales/fr-CA.d.js +0 -1
- package/dist/generated/locales/zh-Hans.d.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.7/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/color-string@2.0.1/node_modules/color-string/index.js +0 -1
- package/dist/node_modules/.pnpm/libphonenumber-js@1.12.24/node_modules/libphonenumber-js/metadata.min.json.js +0 -1
- package/dist/node_modules/.pnpm/storybook@9.1.13_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.9.1_typescript@5._a0e195139f137e7eecc50e9c6275adcc/node_modules/storybook/dist/client-logger/index.js +0 -1
- package/dist/node_modules/.pnpm/storybook@9.1.13_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.9.1_typescript@5._a0e195139f137e7eecc50e9c6275adcc/node_modules/storybook/dist/core-events/index.js +0 -1
- package/dist/node_modules/.pnpm/storybook@9.1.13_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.9.1_typescript@5._a0e195139f137e7eecc50e9c6275adcc/node_modules/storybook/dist/instrumenter/index.js +0 -48
- package/dist/node_modules/.pnpm/storybook@9.1.13_@testing-library_dom@10.4.0_msw@2.7.3_@types_node@24.9.1_typescript@5._a0e195139f137e7eecc50e9c6275adcc/node_modules/storybook/dist/test/index.js +0 -217
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/client/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/common/fetch.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/common/logging.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/common/updates.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/connect/helpers.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/html/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/html/index_html.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/react/external.js +0 -0
- /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.7 → @figma_code-connect@1.3.9}/node_modules/@figma/code-connect/dist/react/index_react.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.9.1_typescript@5.9.3__playwright@1.56.1__f267599ff27ed4cacb9e62a386256df6 → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.10.0_typescript@5.9.3__playwright@1.56.1_fa5be4b0345b48b65ec4b7072214c2b3}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/ParseError.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/PhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/constants.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/format.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/isObject.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/isPossible.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/isValid.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/metadata.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/normalizeArguments.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/parse.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/es6/tools/semver-compare.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js +0 -0
- /package/dist/node_modules/.pnpm/{libphonenumber-js@1.12.24 → libphonenumber-js@1.12.26}/node_modules/libphonenumber-js/min/exports/withMetadataArgument.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.9.1_@vitest_browser@3.2.4_@vitest_ui@3._1eebb5b0859be5c5eee8a8981f7b0151 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.0_@vitest_browser@3.2.4_@vitest_ui@3_10880c0a9445bba638204ee93166eaed}/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.9.1_@vitest_browser@3.2.4_@vitest_ui@3._1eebb5b0859be5c5eee8a8981f7b0151 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.0_@vitest_browser@3.2.4_@vitest_ui@3_10880c0a9445bba638204ee93166eaed}/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.9.1_@vitest_browser@3.2.4_@vitest_ui@3._1eebb5b0859be5c5eee8a8981f7b0151 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.0_@vitest_browser@3.2.4_@vitest_ui@3_10880c0a9445bba638204ee93166eaed}/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.9.1_@vitest_browser@3.2.4_@vitest_ui@3._1eebb5b0859be5c5eee8a8981f7b0151 → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.10.0_@vitest_browser@3.2.4_@vitest_ui@3_10880c0a9445bba638204ee93166eaed}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -0
- /package/dist/packages/{web-components/src/tokens/primitive.tokens.scss.js → styles/src/gator/tokens/primitive.tokens.css.js} +0 -0
|
@@ -1,4 +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
|
-
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
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
|
+
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";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)}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};
|