@vonage/vivid 5.12.0 → 5.14.0
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/bundled/definition19.cjs +63 -44
- package/bundled/definition19.js +322 -246
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +16 -13
- package/bundled/slottable-request.cjs +4 -4
- package/bundled/slottable-request.js +70 -70
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/custom-elements.json +2640 -2580
- package/data-grid/definition.cjs +37 -13
- package/data-grid/definition.js +37 -13
- package/data-grid/index.cjs +38 -32
- package/data-grid/index.js +201 -178
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/lib/accordion/accordion.template.d.ts +2 -2
- package/lib/accordion/index.d.ts +1 -0
- package/lib/accordion-item/accordion-item.d.ts +98 -67
- package/lib/accordion-item/accordion-item.template.d.ts +3 -3
- package/lib/accordion-item/index.d.ts +1 -0
- package/lib/action-group/action-group.d.ts +95 -64
- package/lib/action-group/action-group.template.d.ts +2 -2
- package/lib/action-group/index.d.ts +1 -0
- package/lib/alert/alert.d.ts +192 -130
- package/lib/alert/alert.template.d.ts +3 -3
- package/lib/alert/index.d.ts +1 -0
- package/lib/audio-player/audio-player.d.ts +97 -67
- package/lib/audio-player/audio-player.template.d.ts +2 -2
- package/lib/audio-player/index.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +105 -117
- package/lib/avatar/avatar.template.d.ts +1 -1
- package/lib/avatar/index.d.ts +1 -0
- package/lib/badge/badge.d.ts +98 -67
- package/lib/badge/badge.template.d.ts +3 -3
- package/lib/badge/index.d.ts +1 -0
- package/lib/banner/banner.d.ts +286 -193
- package/lib/banner/banner.template.d.ts +3 -3
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.d.ts +93 -62
- package/lib/breadcrumb/breadcrumb.template.d.ts +2 -2
- package/lib/breadcrumb/index.d.ts +1 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +103 -115
- package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +3 -3
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +297 -247
- package/lib/button/button.template.d.ts +3 -3
- package/lib/button/index.d.ts +1 -0
- package/lib/calendar/calendar.d.ts +2 -2
- package/lib/calendar/calendar.template.d.ts +2 -2
- package/lib/calendar/helpers/calendar.event-context.d.ts +1 -1
- package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +1 -1
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar-event/calendar-event.d.ts +95 -64
- package/lib/calendar-event/calendar-event.template.d.ts +2 -2
- package/lib/calendar-event/index.d.ts +1 -0
- package/lib/card/card.d.ts +105 -117
- package/lib/card/card.template.d.ts +2 -2
- package/lib/card/index.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +628 -437
- package/lib/checkbox/checkbox.template.d.ts +3 -3
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/color-picker/color-picker.d.ts +726 -506
- package/lib/color-picker/color-picker.template.d.ts +2 -2
- package/lib/color-picker/definition.d.ts +1 -1
- package/lib/color-picker/index.d.ts +1 -0
- package/lib/combobox/combobox.d.ts +741 -520
- package/lib/combobox/combobox.template.d.ts +3 -3
- package/lib/combobox/index.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +1 -1
- package/lib/contextual-help/contextual-help.template.d.ts +3 -3
- package/lib/contextual-help/index.d.ts +1 -0
- package/lib/country/country-code-to-flag-icon.d.ts +1 -1
- package/lib/country/country.template.d.ts +3 -3
- package/lib/country/index.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +190 -128
- package/lib/data-grid/data-grid-cell.template.d.ts +3 -3
- package/lib/data-grid/data-grid-row.d.ts +95 -64
- package/lib/data-grid/data-grid-row.template.d.ts +3 -3
- package/lib/data-grid/data-grid.d.ts +1 -1
- package/lib/data-grid/data-grid.template.d.ts +3 -3
- package/lib/data-grid/index.d.ts +1 -0
- package/lib/data-grid/locale.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +1045 -792
- package/lib/date-picker/date-picker.template.d.ts +2 -2
- package/lib/date-picker/index.d.ts +1 -0
- package/lib/date-range-picker/date-range-picker.d.ts +538 -411
- package/lib/date-range-picker/date-range-picker.template.d.ts +2 -2
- package/lib/date-range-picker/index.d.ts +1 -0
- package/lib/date-time-picker/date-time-picker.d.ts +1026 -772
- package/lib/date-time-picker/date-time-picker.template.d.ts +2 -2
- package/lib/date-time-picker/index.d.ts +1 -0
- package/lib/dial-pad/dial-pad.d.ts +95 -64
- package/lib/dial-pad/dial-pad.template.d.ts +2 -2
- package/lib/dial-pad/index.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +189 -127
- package/lib/dialog/dialog.template.d.ts +3 -3
- package/lib/dialog/index.d.ts +1 -0
- package/lib/divider/divider.d.ts +94 -63
- package/lib/divider/divider.template.d.ts +2 -2
- package/lib/divider/index.d.ts +1 -0
- package/lib/elevation/elevation.template.d.ts +2 -2
- package/lib/elevation/index.d.ts +1 -0
- package/lib/empty-state/empty-state.d.ts +2 -2
- package/lib/empty-state/empty-state.template.d.ts +3 -3
- package/lib/empty-state/index.d.ts +1 -0
- package/lib/fab/fab.d.ts +98 -67
- package/lib/fab/fab.template.d.ts +3 -3
- package/lib/fab/index.d.ts +1 -0
- package/lib/file-picker/__mocks__/data-transfer.d.ts +21 -0
- package/lib/file-picker/file-picker.d.ts +736 -515
- package/lib/file-picker/file-picker.template.d.ts +3 -3
- package/lib/file-picker/index.d.ts +1 -0
- package/lib/header/header.d.ts +93 -62
- package/lib/header/header.template.d.ts +3 -3
- package/lib/header/index.d.ts +1 -0
- package/lib/icon/icon.d.ts +2 -2
- package/lib/icon/icon.template.d.ts +3 -3
- package/lib/icon/index.d.ts +1 -0
- package/lib/layout/index.d.ts +1 -0
- package/lib/layout/layout.d.ts +2 -2
- package/lib/layout/layout.template.d.ts +2 -2
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +195 -133
- package/lib/menu/menu.template.d.ts +3 -3
- package/lib/menu-item/index.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +191 -129
- package/lib/menu-item/menu-item.template.d.ts +2 -2
- package/lib/nav/index.d.ts +1 -0
- package/lib/nav/nav.d.ts +93 -62
- package/lib/nav/nav.template.d.ts +2 -2
- package/lib/nav-disclosure/index.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +191 -129
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +3 -3
- package/lib/nav-item/index.d.ts +1 -0
- package/lib/nav-item/nav-item.d.ts +200 -181
- package/lib/nav-item/nav-item.template.d.ts +3 -3
- package/lib/note/index.d.ts +1 -0
- package/lib/note/note.d.ts +97 -66
- package/lib/note/note.template.d.ts +3 -3
- package/lib/number-field/index.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +929 -646
- package/lib/number-field/number-field.template.d.ts +3 -3
- package/lib/option/index.d.ts +1 -0
- package/lib/option/option.d.ts +191 -129
- package/lib/option/option.template.d.ts +3 -3
- package/lib/pagination/index.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +98 -67
- package/lib/pagination/pagination.template.d.ts +3 -3
- package/lib/popover/definition.d.ts +1 -1
- package/lib/popover/index.d.ts +1 -0
- package/lib/popover/popover.d.ts +190 -128
- package/lib/popover/popover.template.d.ts +2 -2
- package/lib/popup/index.d.ts +1 -0
- package/lib/popup/popup.d.ts +1 -1
- package/lib/popup/popup.template.d.ts +3 -3
- package/lib/progress/index.d.ts +1 -0
- package/lib/progress/progress.d.ts +94 -63
- package/lib/progress/progress.template.d.ts +2 -2
- package/lib/progress-ring/index.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +94 -63
- package/lib/progress-ring/progress-ring.template.d.ts +2 -2
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/radio.d.ts +340 -242
- package/lib/radio/radio.template.d.ts +2 -2
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +99 -68
- package/lib/radio-group/radio-group.template.d.ts +3 -3
- package/lib/range-slider/index.d.ts +1 -0
- package/lib/range-slider/range-slider.d.ts +313 -218
- package/lib/range-slider/range-slider.template.d.ts +3 -3
- package/lib/rich-text-editor/definition.d.ts +1 -1
- package/lib/rich-text-editor/index.d.ts +1 -0
- package/lib/rich-text-editor/popover.d.ts +1 -1
- package/lib/rich-text-editor/rich-text-editor.d.ts +99 -68
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/__tests__/async-generator.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/doc-factories.d.ts +106 -0
- package/lib/rich-text-editor/rte/__tests__/font-sizes.d.ts +2 -0
- package/lib/rich-text-editor/rte/__tests__/promise.d.ts +5 -0
- package/lib/rich-text-editor/rte/__tests__/test-utils.d.ts +68 -0
- package/lib/rich-text-editor/rte/config.d.ts +4 -4
- package/lib/rich-text-editor/rte/feature.d.ts +10 -12
- package/lib/rich-text-editor/rte/features/alignment.d.ts +19 -0
- package/lib/rich-text-editor/rte/features/atom.d.ts +9 -0
- package/lib/rich-text-editor/rte/features/base.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/bold.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/drop-handler.d.ts +21 -0
- package/lib/rich-text-editor/rte/features/file-handler.d.ts +25 -0
- package/lib/rich-text-editor/rte/features/font-size-picker.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/hard-break.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/inline-image.d.ts +43 -0
- package/lib/rich-text-editor/rte/features/input-rule.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +6 -6
- package/lib/rich-text-editor/rte/features/internal/core.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +16 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +2 -2
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +4 -4
- package/lib/rich-text-editor/rte/features/italic.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/link.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/list.d.ts +24 -0
- package/lib/rich-text-editor/rte/features/monospace.d.ts +22 -0
- package/lib/rich-text-editor/rte/features/placeholder.d.ts +23 -0
- package/lib/rich-text-editor/rte/features/strikethrough.d.ts +17 -0
- package/lib/rich-text-editor/rte/features/suggest.d.ts +14 -0
- package/lib/rich-text-editor/rte/features/text-block-picker.d.ts +18 -0
- package/lib/rich-text-editor/rte/features/text-color-picker.d.ts +31 -0
- package/lib/rich-text-editor/rte/features/toolbar-button.d.ts +13 -0
- package/lib/rich-text-editor/rte/features/toolbar.d.ts +37 -0
- package/lib/rich-text-editor/rte/features/underline.d.ts +17 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +3 -3
- package/lib/rich-text-editor/rte/html-serializer.d.ts +3 -3
- package/lib/rich-text-editor/rte/instance.d.ts +8 -7
- package/lib/rich-text-editor/rte/public-interface.d.ts +13 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +1 -1
- package/lib/rich-text-editor/rte/utils/ui.d.ts +8 -8
- package/lib/rich-text-editor/rte/view.d.ts +3 -6
- package/lib/rich-text-view/definition.d.ts +1 -1
- package/lib/rich-text-view/index.d.ts +2 -0
- package/lib/rich-text-view/rich-text-view.d.ts +1 -1
- package/lib/rich-text-view/rich-text-view.template.d.ts +2 -2
- package/lib/searchable-select/index.d.ts +1 -0
- package/lib/searchable-select/option-tag.d.ts +96 -65
- package/lib/searchable-select/option-tag.template.d.ts +3 -3
- package/lib/searchable-select/searchable-select.d.ts +929 -646
- package/lib/searchable-select/searchable-select.template.d.ts +3 -3
- package/lib/select/index.d.ts +1 -0
- package/lib/select/locale.d.ts +3 -0
- package/lib/select/select.d.ts +1240 -579
- package/lib/select/select.template.d.ts +3 -3
- package/lib/selectable-box/index.d.ts +1 -0
- package/lib/selectable-box/selectable-box.d.ts +94 -63
- package/lib/selectable-box/selectable-box.template.d.ts +2 -2
- package/lib/side-drawer/index.d.ts +1 -0
- package/lib/side-drawer/side-drawer.template.d.ts +2 -2
- package/lib/simple-color-picker/definition.d.ts +1 -1
- package/lib/simple-color-picker/index.d.ts +1 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +216 -153
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +2 -2
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/slider.d.ts +299 -205
- package/lib/slider/slider.template.d.ts +4 -4
- package/lib/split-button/index.d.ts +1 -0
- package/lib/split-button/split-button.d.ts +288 -195
- package/lib/split-button/split-button.template.d.ts +3 -3
- package/lib/status/index.d.ts +1 -0
- package/lib/status/status.d.ts +98 -67
- package/lib/status/status.template.d.ts +3 -3
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/switch.d.ts +207 -142
- package/lib/switch/switch.template.d.ts +2 -2
- package/lib/tab/index.d.ts +1 -0
- package/lib/tab/tab.d.ts +288 -195
- package/lib/tab/tab.template.d.ts +3 -3
- package/lib/tab-panel/index.d.ts +1 -0
- package/lib/tab-panel/tab-panel.d.ts +93 -62
- package/lib/tab-panel/tab-panel.template.d.ts +2 -2
- package/lib/table/index.d.ts +1 -0
- package/lib/table/table-body.template.d.ts +3 -3
- package/lib/table/table-cell.d.ts +93 -62
- package/lib/table/table-cell.template.d.ts +3 -3
- package/lib/table/table-head.template.d.ts +3 -3
- package/lib/table/table-header-cell.d.ts +93 -62
- package/lib/table/table-header-cell.template.d.ts +3 -3
- package/lib/table/table-row.d.ts +93 -62
- package/lib/table/table-row.template.d.ts +3 -3
- package/lib/table/table.template.d.ts +3 -3
- package/lib/tabs/index.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tabs/tabs.template.d.ts +2 -2
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/tag.d.ts +288 -195
- package/lib/tag/tag.template.d.ts +3 -3
- package/lib/tag-group/index.d.ts +1 -0
- package/lib/tag-group/tag-group.d.ts +93 -62
- package/lib/tag-group/tag-group.template.d.ts +2 -2
- package/lib/tag-name-map.d.ts +1 -1
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +832 -581
- package/lib/text-area/text-area.template.d.ts +3 -3
- package/lib/text-field/index.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +931 -649
- package/lib/text-field/text-field.template.d.ts +3 -3
- package/lib/time-picker/index.d.ts +1 -0
- package/lib/time-picker/time-picker.d.ts +486 -359
- package/lib/time-picker/time-picker.template.d.ts +3 -3
- package/lib/toggletip/index.d.ts +1 -0
- package/lib/toggletip/toggletip.d.ts +197 -135
- package/lib/toggletip/toggletip.template.d.ts +3 -3
- package/lib/tooltip/index.d.ts +1 -0
- package/lib/tooltip/tooltip.d.ts +101 -70
- package/lib/tooltip/tooltip.template.d.ts +3 -3
- package/lib/tree-item/index.d.ts +1 -0
- package/lib/tree-item/tree-item.d.ts +190 -128
- package/lib/tree-item/tree-item.template.d.ts +3 -3
- package/lib/tree-view/index.d.ts +1 -0
- package/lib/tree-view/tree-view.d.ts +93 -62
- package/lib/tree-view/tree-view.template.d.ts +2 -2
- package/lib/video-player/index.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +96 -65
- package/lib/video-player/video-player.template.d.ts +1 -1
- package/lib/video-player/vivid-video-svg.d.ts +1 -1
- package/lib/visually-hidden/definition.d.ts +1 -1
- package/lib/visually-hidden/index.d.ts +1 -0
- package/lib/visually-hidden/visually-hidden.template.d.ts +1 -1
- package/locales/de-DE.cjs +3 -0
- package/locales/de-DE.d.ts +1 -1
- package/locales/de-DE.js +3 -0
- package/locales/en-GB.cjs +3 -0
- package/locales/en-GB.d.ts +1 -1
- package/locales/en-GB.js +3 -0
- package/locales/en-US.cjs +3 -0
- package/locales/en-US.d.ts +1 -1
- package/locales/en-US.js +3 -0
- package/locales/ja-JP.cjs +3 -0
- package/locales/ja-JP.d.ts +1 -1
- package/locales/ja-JP.js +3 -0
- package/locales/zh-CN.cjs +3 -0
- package/locales/zh-CN.d.ts +1 -1
- package/locales/zh-CN.js +3 -0
- package/package.json +6 -6
- package/rich-text-editor/definition.cjs +2 -4
- package/rich-text-editor/definition.js +3 -5
- package/rich-text-editor/index.cjs +7 -7
- package/rich-text-editor/index.js +975 -977
- package/rich-text-view/index.js +1 -1
- package/select/definition.cjs +104 -5
- package/select/definition.js +104 -5
- package/shared/aria/aria-change-subscription.d.ts +1 -1
- package/shared/aria/aria-mixin.d.ts +94 -63
- package/shared/aria/attribute-removal.d.ts +1 -1
- package/shared/aria/delegate-aria-behavior.d.ts +2 -2
- package/shared/aria/delegates-aria.d.ts +96 -65
- package/shared/aria/host-semantics-behavior.d.ts +2 -2
- package/shared/aria/host-semantics.d.ts +97 -66
- package/shared/color-picker/base-color-picker.d.ts +114 -82
- package/shared/datetime/dateRange.d.ts +1 -1
- package/shared/datetime/dateTimeStr.d.ts +4 -4
- package/shared/datetime/month.d.ts +1 -1
- package/shared/datetime/presentationDate.d.ts +2 -2
- package/shared/datetime/presentationDateRange.d.ts +2 -2
- package/shared/datetime/presentationDateTime.d.ts +2 -2
- package/shared/datetime/presentationTime.d.ts +1 -1
- package/shared/datetime/year.d.ts +1 -1
- package/shared/deprecation/replaced-props.d.ts +95 -60
- package/shared/design-system/createRegisterFunction.d.ts +1 -1
- package/shared/design-system/defineVividComponent.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +96 -65
- package/shared/feedback/mixins.d.ts +200 -138
- package/shared/foundation/button/button.d.ts +202 -139
- package/shared/foundation/button/button.template.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +213 -147
- package/shared/foundation/listbox/listbox.d.ts +1 -1
- package/shared/foundation/test-utilities/fixture.d.ts +18 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +194 -131
- package/shared/localization/Locale.d.ts +31 -29
- package/shared/localization/index.d.ts +1 -1
- package/shared/patterns/affix.d.ts +195 -133
- package/shared/patterns/anchored.d.ts +202 -140
- package/shared/patterns/char-count/char-count.d.ts +99 -68
- package/shared/patterns/chevron.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +114 -488
- package/shared/patterns/form-elements/with-contextual-help.d.ts +117 -903
- package/shared/patterns/form-elements/with-error-text.d.ts +120 -906
- package/shared/patterns/form-elements/with-success-text.d.ts +97 -66
- package/shared/patterns/linkable.d.ts +106 -117
- package/shared/patterns/localized.d.ts +197 -135
- package/shared/patterns/trapped-focus.d.ts +95 -64
- package/shared/picker-field/mixins/calendar-picker.d.ts +251 -188
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +271 -208
- package/shared/picker-field/mixins/calendar-segments/calendarGrid.d.ts +3 -3
- package/shared/picker-field/mixins/calendar-segments/monthPickerGrid.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-segments/segment.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/columns.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/index.d.ts +1 -0
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +95 -64
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.template.d.ts +3 -3
- package/shared/picker-field/mixins/inline-time-picker/picker-option.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +277 -1102
- package/shared/picker-field/mixins/single-date-picker.d.ts +274 -1953
- package/shared/picker-field/mixins/single-value-picker.d.ts +236 -173
- package/shared/picker-field/mixins/time-selection-picker.d.ts +257 -1046
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +486 -360
- package/shared/picker-field/picker-field.d.ts +735 -514
- package/shared/picker-field/picker-field.template.d.ts +2 -2
- package/shared/templating/attribute-binding-behaviour.d.ts +1 -1
- package/shared/templating/render-in-light-dom.d.ts +2 -2
- package/shared/utils/closest-of-type.d.ts +2 -0
- package/shared/utils/direct-children-of-type.d.ts +2 -0
- package/shared/utils/dom-traversal-types.d.ts +3 -0
- package/shared/utils/first-of-type.d.ts +2 -0
- package/shared/utils/last-of-type.d.ts +2 -0
- package/shared/utils/nested-children-of-type.d.ts +2 -0
- package/shared/utils/next-of-type.d.ts +2 -0
- package/shared/utils/numberConverter.d.ts +1 -1
- package/shared/utils/prev-of-type.d.ts +2 -0
- package/shared/utils/promise.d.ts +2 -2
- package/shared/utils/siblings-of-type.d.ts +2 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/unbundled/slottable-request.cjs +7 -5
- package/unbundled/slottable-request.js +7 -6
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/vivid.api.json +727 -38
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl, TextblockAttrContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
type Alignment = 'left' | 'center' | 'right';
|
|
4
|
+
export declare class RteAlignmentFeatureImpl extends RteFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
getTextblockAttrs(): TextblockAttrContribution[];
|
|
7
|
+
getPlugins(): {
|
|
8
|
+
priority: number;
|
|
9
|
+
featureName: string;
|
|
10
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
11
|
+
}[];
|
|
12
|
+
getToolbarItems(): ToolbarItemContribution[];
|
|
13
|
+
getAlignmentFromSelection(state: EditorState): Alignment | 'mixed' | null;
|
|
14
|
+
setAlignment(align: Alignment): Command;
|
|
15
|
+
}
|
|
16
|
+
export declare const RteAlignmentFeature: {
|
|
17
|
+
new (): {};
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ResolvedAtomValue = string | null;
|
|
2
|
+
export type ResolvedAtomValueGenerator = AsyncGenerator<ResolvedAtomValue, ResolvedAtomValue>;
|
|
3
|
+
export interface RteAtomConfig {
|
|
4
|
+
resolveValue?: (value: string) => ResolvedAtomValue | ResolvedAtomValueGenerator;
|
|
5
|
+
serializeValueToHtml?: (value: string) => string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const RteAtomFeature: {
|
|
8
|
+
new (atomName: string, config?: RteAtomConfig | undefined): {};
|
|
9
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { RteFeatureImpl } from '../feature';
|
|
2
|
+
import { RteInstanceImpl } from '../instance';
|
|
3
|
+
import { RteBasePublicInterface } from '../public-interface';
|
|
4
|
+
export type RteBaseConfig = {
|
|
5
|
+
heading1?: boolean;
|
|
6
|
+
heading2?: boolean;
|
|
7
|
+
heading3?: boolean;
|
|
8
|
+
paragraph?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare class RteBaseImpl extends RteFeatureImpl {
|
|
11
|
+
protected config?: RteBaseConfig | undefined;
|
|
12
|
+
name: string;
|
|
13
|
+
constructor(config?: RteBaseConfig | undefined);
|
|
14
|
+
getSchema(): {
|
|
15
|
+
priority: number;
|
|
16
|
+
featureName: string;
|
|
17
|
+
value: {
|
|
18
|
+
nodes: {
|
|
19
|
+
doc: {
|
|
20
|
+
content: string;
|
|
21
|
+
};
|
|
22
|
+
text: {
|
|
23
|
+
group: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}[];
|
|
28
|
+
getFeatures(): RteFeatureImpl[];
|
|
29
|
+
getPublicInterface(rte: RteInstanceImpl): RteBasePublicInterface;
|
|
30
|
+
}
|
|
31
|
+
export declare const RteBase: {
|
|
32
|
+
new (config?: RteBaseConfig | undefined): {};
|
|
33
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RteInstanceImpl } from '../instance';
|
|
2
|
+
import { SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
import { RteTextStyleFeatureImpl } from './internal/text-style';
|
|
4
|
+
export declare class RteBoldFeatureImpl extends RteTextStyleFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
protected markName: string;
|
|
7
|
+
getSchema(): SchemaContribution[];
|
|
8
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
9
|
+
priority: number;
|
|
10
|
+
featureName: string;
|
|
11
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
12
|
+
}[];
|
|
13
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
14
|
+
}
|
|
15
|
+
export declare const RteBoldFeature: {
|
|
16
|
+
new (config?: import('./internal/text-style').RteTextStyleConfig | undefined): {};
|
|
17
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl } from '../feature';
|
|
3
|
+
import { RteInstanceImpl } from '../instance';
|
|
4
|
+
export interface RteDropHandlerConfig {
|
|
5
|
+
onViewportDragOver?: (event: DragEvent) => boolean;
|
|
6
|
+
onViewportDrop?: (event: DragEvent) => void;
|
|
7
|
+
onViewportDragFinish?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class RteDropHandlerFeatureImpl extends RteFeatureImpl {
|
|
10
|
+
readonly config: RteDropHandlerConfig;
|
|
11
|
+
name: string;
|
|
12
|
+
constructor(config: RteDropHandlerConfig);
|
|
13
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
14
|
+
priority: number;
|
|
15
|
+
featureName: string;
|
|
16
|
+
value: Plugin<any>;
|
|
17
|
+
}[];
|
|
18
|
+
}
|
|
19
|
+
export declare const RteDropHandlerFeature: {
|
|
20
|
+
new (config: RteDropHandlerConfig): {};
|
|
21
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { DecorationSet } from 'prosemirror-view';
|
|
3
|
+
import { RteFeatureImpl } from '../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../instance';
|
|
5
|
+
import { RteFragment } from '../document';
|
|
6
|
+
export interface RteFileHandlerConfig {
|
|
7
|
+
handleFiles: (files: File[]) => RteFragment | Promise<RteFragment> | null;
|
|
8
|
+
}
|
|
9
|
+
export declare class RteFileHandlerFeatureImpl extends RteFeatureImpl {
|
|
10
|
+
readonly config: RteFileHandlerConfig;
|
|
11
|
+
name: string;
|
|
12
|
+
constructor(config: RteFileHandlerConfig);
|
|
13
|
+
getPlugins(rte: RteInstanceImpl): ({
|
|
14
|
+
priority: number;
|
|
15
|
+
featureName: string;
|
|
16
|
+
value: Plugin<any>;
|
|
17
|
+
} | {
|
|
18
|
+
priority: number;
|
|
19
|
+
featureName: string;
|
|
20
|
+
value: Plugin<DecorationSet>;
|
|
21
|
+
})[];
|
|
22
|
+
}
|
|
23
|
+
export declare const RteFileHandlerFeature: {
|
|
24
|
+
new (config: RteFileHandlerConfig): {};
|
|
25
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
2
|
+
import { RteInstanceImpl } from '../instance';
|
|
3
|
+
import { RteFeatureImpl, SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
4
|
+
export interface FontSizeOption {
|
|
5
|
+
size: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FontSizeOnBlock {
|
|
9
|
+
node: string;
|
|
10
|
+
defaultSize?: string;
|
|
11
|
+
}
|
|
12
|
+
export type RteFontSizePickerConfig = {
|
|
13
|
+
options: FontSizeOption[];
|
|
14
|
+
onBlocks?: FontSizeOnBlock[];
|
|
15
|
+
};
|
|
16
|
+
declare const mixedFontSize: unique symbol;
|
|
17
|
+
type MixedFontSize = typeof mixedFontSize;
|
|
18
|
+
type SelectionFontSize = string | MixedFontSize | null;
|
|
19
|
+
export declare class RteFontSizePickerFeatureImpl extends RteFeatureImpl {
|
|
20
|
+
protected config: RteFontSizePickerConfig;
|
|
21
|
+
name: string;
|
|
22
|
+
fontSizes: FontSizeOption[];
|
|
23
|
+
defaultFontSizeForNode?: Record<string, string | null>;
|
|
24
|
+
constructor(config: RteFontSizePickerConfig);
|
|
25
|
+
getTextblockMarks(): {
|
|
26
|
+
priority: number;
|
|
27
|
+
featureName: string;
|
|
28
|
+
value: {
|
|
29
|
+
markName: string;
|
|
30
|
+
};
|
|
31
|
+
}[];
|
|
32
|
+
getSchema(): SchemaContribution[];
|
|
33
|
+
getPlugins(): {
|
|
34
|
+
priority: number;
|
|
35
|
+
featureName: string;
|
|
36
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
37
|
+
}[];
|
|
38
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
39
|
+
getFontSizeFromSelection(state: EditorState): SelectionFontSize;
|
|
40
|
+
setFontSize(size: string): Command;
|
|
41
|
+
adjustFontSize(adjustment: -1 | 1): Command;
|
|
42
|
+
}
|
|
43
|
+
export declare const RteFontSizePickerFeature: {
|
|
44
|
+
new (config: RteFontSizePickerConfig): {};
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PluginContribution, RteFeatureImpl, SchemaContribution } from '../feature';
|
|
2
|
+
import { RteInstanceImpl } from '../instance';
|
|
3
|
+
export declare class RteHardBreakFeatureImpl extends RteFeatureImpl {
|
|
4
|
+
name: string;
|
|
5
|
+
getSchema(): SchemaContribution[];
|
|
6
|
+
getPlugins(_rte: RteInstanceImpl): PluginContribution[];
|
|
7
|
+
}
|
|
8
|
+
export declare const RteHardBreakFeature: {
|
|
9
|
+
new (): {};
|
|
10
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Node } from 'prosemirror-model';
|
|
2
|
+
import { Command, EditorState, Plugin } from 'prosemirror-state';
|
|
3
|
+
import { RteFeatureImpl, SchemaContribution } from '../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../instance';
|
|
5
|
+
type SizeOption = 'small' | 'fit' | 'original';
|
|
6
|
+
type ContentDestroyedHandler = () => unknown;
|
|
7
|
+
export type ResolvedUrl = string | null | {
|
|
8
|
+
type: 'placeholder';
|
|
9
|
+
create?: (slotName: string) => ContentDestroyedHandler | undefined;
|
|
10
|
+
};
|
|
11
|
+
type ResolvedUrlGenerator = AsyncGenerator<ResolvedUrl, ResolvedUrl>;
|
|
12
|
+
export interface RteInlineImageConfig {
|
|
13
|
+
resolveUrl?: (imageUrl: string) => ResolvedUrl | ResolvedUrlGenerator;
|
|
14
|
+
serializeUrlToHtml?: (imageUrl: string) => string | null;
|
|
15
|
+
parseUrlFromHtml?: (src: string) => string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare class RteInlineImageFeatureImpl extends RteFeatureImpl {
|
|
18
|
+
protected readonly config: RteInlineImageConfig;
|
|
19
|
+
name: string;
|
|
20
|
+
constructor(config?: RteInlineImageConfig);
|
|
21
|
+
getStyles(): {
|
|
22
|
+
priority: number;
|
|
23
|
+
featureName: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
getSchema(): SchemaContribution[];
|
|
27
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
28
|
+
priority: number;
|
|
29
|
+
featureName: string;
|
|
30
|
+
value: Plugin<any>;
|
|
31
|
+
}[];
|
|
32
|
+
calculateSmallWidth(naturalWidth: number): string;
|
|
33
|
+
getSelectedInlineImage(state: EditorState): {
|
|
34
|
+
pos: number;
|
|
35
|
+
node: Node;
|
|
36
|
+
} | null;
|
|
37
|
+
setSelectedImageSize(size: SizeOption): Command;
|
|
38
|
+
getSelectedImageSize(state: EditorState): SizeOption | null;
|
|
39
|
+
}
|
|
40
|
+
export declare const RteInlineImageFeature: {
|
|
41
|
+
new (config?: RteInlineImageConfig | undefined): {};
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RteFragment } from '../document';
|
|
2
|
+
export type InputRuleHandler = (match: RegExpMatchArray) => RteFragment | null;
|
|
3
|
+
export interface RteInputRuleFeatureOptions {
|
|
4
|
+
pattern: RegExp;
|
|
5
|
+
handler: InputRuleHandler;
|
|
6
|
+
matchAfterWhitespace?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const RteInputRuleFeature: {
|
|
9
|
+
new (featureId: string, options: RteInputRuleFeatureOptions): {};
|
|
10
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
3
|
+
import { PluginContribution, RteFeatureImpl } from '../../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../../instance';
|
|
5
|
+
import { TextblockAttrs } from '../../utils/textblock-attrs';
|
|
6
|
+
import { TextblockMarks } from '../../utils/textblock-marks';
|
|
7
7
|
type EnabledBlocks = {
|
|
8
8
|
heading1: boolean;
|
|
9
9
|
heading2: boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl } from '../../feature';
|
|
3
|
+
import { Locale } from '../../../../../shared/localization/Locale';
|
|
4
|
+
import { VividElementDefinitionContext } from '../../../../../shared/design-system/defineVividComponent';
|
|
5
|
+
import { RteInstanceImpl } from '../../instance';
|
|
6
|
+
import { FeatureState } from '../../utils/feature-state';
|
|
7
|
+
export interface HostState {
|
|
8
|
+
ctx: VividElementDefinitionContext;
|
|
9
|
+
locale: Locale;
|
|
10
|
+
}
|
|
11
|
+
export declare const hostBridgePlugin: Plugin<HostState | null>;
|
|
12
|
+
export declare class RteCoreImpl extends RteFeatureImpl {
|
|
13
|
+
name: string;
|
|
14
|
+
disabled: FeatureState<boolean>;
|
|
15
|
+
getStyles(): {
|
|
16
|
+
priority: number;
|
|
17
|
+
featureName: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}[];
|
|
20
|
+
getPlugins(rte: RteInstanceImpl): ({
|
|
21
|
+
priority: number;
|
|
22
|
+
featureName: string;
|
|
23
|
+
value: Plugin<any>;
|
|
24
|
+
} | {
|
|
25
|
+
priority: number;
|
|
26
|
+
featureName: string;
|
|
27
|
+
value: Plugin<boolean>;
|
|
28
|
+
} | {
|
|
29
|
+
priority: number;
|
|
30
|
+
featureName: string;
|
|
31
|
+
value: Plugin<HostState | null>;
|
|
32
|
+
})[];
|
|
33
|
+
getFeatures(): RteFeatureImpl[];
|
|
34
|
+
}
|
|
35
|
+
export declare const RteCore: {
|
|
36
|
+
new (): {};
|
|
37
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MarkSpec, ResolvedPos } from 'prosemirror-model';
|
|
2
|
+
import { EditorState } from 'prosemirror-state';
|
|
3
|
+
import { PluginContribution, RteFeatureImpl } from '../../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../../instance';
|
|
5
|
+
export type CursorFix = Record<string, string>;
|
|
6
|
+
export type CursorFixFn = ($cursor: ResolvedPos, state: EditorState) => CursorFix | null;
|
|
7
|
+
export interface CursorFixMarkSpec extends MarkSpec {
|
|
8
|
+
cursorFix?: CursorFixFn;
|
|
9
|
+
}
|
|
10
|
+
export declare class RteCursorFixFeatureImpl extends RteFeatureImpl {
|
|
11
|
+
name: string;
|
|
12
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
13
|
+
}
|
|
14
|
+
export declare const RteCursorFixFeature: {
|
|
15
|
+
new (): {};
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'prosemirror-state';
|
|
2
2
|
import { RteFeatureImpl } from '../../feature';
|
|
3
|
-
import
|
|
3
|
+
import { RteInstanceImpl } from '../../instance';
|
|
4
4
|
export declare class RteForeignHtmlFeatureImpl extends RteFeatureImpl {
|
|
5
5
|
name: string;
|
|
6
6
|
getPlugins(rte: RteInstanceImpl): {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RteFeatureImpl,
|
|
1
|
+
import { RteFeatureImpl, ToolbarItemContribution } from '../../feature';
|
|
2
2
|
export declare class RteHistoryFeatureImpl extends RteFeatureImpl {
|
|
3
3
|
name: string;
|
|
4
4
|
getPlugins(): {
|
|
5
5
|
priority: number;
|
|
6
6
|
featureName: string;
|
|
7
|
-
value: import(
|
|
7
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
8
8
|
}[];
|
|
9
9
|
getToolbarItems(): ToolbarItemContribution[];
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { InputRule } from 'prosemirror-inputrules';
|
|
2
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
|
3
|
+
import { PluginContribution, RteFeatureImpl } from '../../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../../instance';
|
|
5
5
|
export interface InputRuleSpec {
|
|
6
6
|
rule: InputRule;
|
|
7
7
|
enterHandler?: {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RteInstanceImpl } from '../instance';
|
|
2
|
+
import { SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
import { RteTextStyleFeatureImpl } from './internal/text-style';
|
|
4
|
+
export declare class RteItalicFeatureImpl extends RteTextStyleFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
protected markName: string;
|
|
7
|
+
getSchema(): SchemaContribution[];
|
|
8
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
9
|
+
priority: number;
|
|
10
|
+
featureName: string;
|
|
11
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
12
|
+
}[];
|
|
13
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
14
|
+
}
|
|
15
|
+
export declare const RteItalicFeature: {
|
|
16
|
+
new (config?: import('./internal/text-style').RteTextStyleConfig | undefined): {};
|
|
17
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
2
|
+
import { RteInstanceImpl } from '../instance';
|
|
3
|
+
import { InputRuleContribution, PluginContribution, RteFeatureImpl, SchemaContribution, StyleContribution, ToolbarItemContribution } from '../feature';
|
|
4
|
+
import { Menu } from '../../../menu/menu';
|
|
5
|
+
type Link = {
|
|
6
|
+
text: string;
|
|
7
|
+
href: string;
|
|
8
|
+
start: number;
|
|
9
|
+
end: number;
|
|
10
|
+
};
|
|
11
|
+
export declare class RteLinkFeatureImpl extends RteFeatureImpl {
|
|
12
|
+
name: string;
|
|
13
|
+
getStyles(): StyleContribution[];
|
|
14
|
+
getSchema(): SchemaContribution[];
|
|
15
|
+
getTextblockMarks(): {
|
|
16
|
+
priority: number;
|
|
17
|
+
featureName: string;
|
|
18
|
+
value: {
|
|
19
|
+
markName: string;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
getInputRules(): InputRuleContribution[];
|
|
23
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
24
|
+
protected toolbarMenu?: Menu;
|
|
25
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
26
|
+
getCurrentLink(state: EditorState): Link | null;
|
|
27
|
+
removeLink: Command;
|
|
28
|
+
insertLink(rte: RteInstanceImpl, href: string, text: string): Command;
|
|
29
|
+
}
|
|
30
|
+
export declare const RteLinkFeature: {
|
|
31
|
+
new (): {};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NodeType } from 'prosemirror-model';
|
|
2
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
3
|
+
import { PluginContribution, RteFeatureImpl, SchemaContribution, StyleContribution, ToolbarItemContribution } from '../feature';
|
|
4
|
+
import { RteInstanceImpl } from '../instance';
|
|
5
|
+
import { TextblockAttrs } from '../utils/textblock-attrs';
|
|
6
|
+
export type RteListConfig = {
|
|
7
|
+
bulletList?: boolean;
|
|
8
|
+
numberedList?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare class RteListFeatureImpl extends RteFeatureImpl {
|
|
11
|
+
protected config: RteListConfig;
|
|
12
|
+
name: string;
|
|
13
|
+
constructor(config: RteListConfig);
|
|
14
|
+
getStyles(): StyleContribution[];
|
|
15
|
+
getSchema(textblockAttrs: TextblockAttrs): SchemaContribution[];
|
|
16
|
+
protected rte: RteInstanceImpl;
|
|
17
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
18
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
19
|
+
toggleList(type: NodeType): Command;
|
|
20
|
+
isSelectionInList(type: NodeType, state: EditorState): boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare const RteListFeature: {
|
|
23
|
+
new (config: RteListConfig): {};
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RteInstanceImpl } from '../instance';
|
|
2
|
+
import { SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
import { RteTextStyleFeatureImpl } from './internal/text-style';
|
|
4
|
+
export declare class RteMonospaceFeatureImpl extends RteTextStyleFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
protected markName: string;
|
|
7
|
+
getStyles(): {
|
|
8
|
+
priority: number;
|
|
9
|
+
featureName: string;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
getSchema(): SchemaContribution[];
|
|
13
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
14
|
+
priority: number;
|
|
15
|
+
featureName: string;
|
|
16
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
17
|
+
}[];
|
|
18
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
19
|
+
}
|
|
20
|
+
export declare const RteMonospaceFeature: {
|
|
21
|
+
new (config?: import('./internal/text-style').RteTextStyleConfig | undefined): {};
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl } from '../feature';
|
|
3
|
+
export type RtePlaceholderConfig = {
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class RtePlaceholderFeatureImpl extends RteFeatureImpl {
|
|
7
|
+
protected config: RtePlaceholderConfig;
|
|
8
|
+
name: string;
|
|
9
|
+
constructor(config: RtePlaceholderConfig);
|
|
10
|
+
getStyles(): {
|
|
11
|
+
priority: number;
|
|
12
|
+
featureName: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}[];
|
|
15
|
+
getPlugins(): {
|
|
16
|
+
priority: number;
|
|
17
|
+
featureName: string;
|
|
18
|
+
value: Plugin<any>;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
export declare const RtePlaceholderFeature: {
|
|
22
|
+
new (config: RtePlaceholderConfig): {};
|
|
23
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RteInstanceImpl } from '../instance';
|
|
2
|
+
import { SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
import { RteTextStyleFeatureImpl } from './internal/text-style';
|
|
4
|
+
export declare class RteStrikethroughFeatureImpl extends RteTextStyleFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
protected markName: string;
|
|
7
|
+
getSchema(): SchemaContribution[];
|
|
8
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
9
|
+
priority: number;
|
|
10
|
+
featureName: string;
|
|
11
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
12
|
+
}[];
|
|
13
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
14
|
+
}
|
|
15
|
+
export declare const RteStrikethroughFeature: {
|
|
16
|
+
new (config?: import('./internal/text-style').RteTextStyleConfig | undefined): {};
|
|
17
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RteFragment } from '../document';
|
|
2
|
+
export interface Suggestion {
|
|
3
|
+
text: string;
|
|
4
|
+
textSecondary?: string;
|
|
5
|
+
data?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface RteSuggestFeatureOptions {
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
load: (match: string[]) => Suggestion[] | Promise<Suggestion[]>;
|
|
10
|
+
select: (suggestion: Suggestion) => RteFragment;
|
|
11
|
+
}
|
|
12
|
+
export declare const RteSuggestFeature: {
|
|
13
|
+
new (featureId: string, options: RteSuggestFeatureOptions): {};
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RteFeatureImpl, ToolbarItemContribution } from '../feature';
|
|
2
|
+
import { RteInstanceImpl } from '../instance';
|
|
3
|
+
export interface TextBlockOption {
|
|
4
|
+
node: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export type RteTextBlockPickerConfig = {
|
|
8
|
+
options: TextBlockOption[];
|
|
9
|
+
};
|
|
10
|
+
export declare class RteTextBlockPickerFeatureImpl extends RteFeatureImpl {
|
|
11
|
+
protected config: RteTextBlockPickerConfig;
|
|
12
|
+
name: string;
|
|
13
|
+
constructor(config: RteTextBlockPickerConfig);
|
|
14
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
15
|
+
}
|
|
16
|
+
export declare const RteTextBlockPickerFeature: {
|
|
17
|
+
new (config: RteTextBlockPickerConfig): {};
|
|
18
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl, SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
export interface TextColorOnBlock {
|
|
4
|
+
node: string;
|
|
5
|
+
defaultColor?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RteTextColorPickerConfig {
|
|
8
|
+
onBlocks?: TextColorOnBlock[];
|
|
9
|
+
}
|
|
10
|
+
type SelectionColor = string | null;
|
|
11
|
+
export declare class RteTextColorPickerFeatureImpl extends RteFeatureImpl {
|
|
12
|
+
protected readonly config?: RteTextColorPickerConfig | undefined;
|
|
13
|
+
name: string;
|
|
14
|
+
defaultColorForNode?: Record<string, string | null>;
|
|
15
|
+
constructor(config?: RteTextColorPickerConfig | undefined);
|
|
16
|
+
getTextblockMarks(): {
|
|
17
|
+
priority: number;
|
|
18
|
+
featureName: string;
|
|
19
|
+
value: {
|
|
20
|
+
markName: string;
|
|
21
|
+
};
|
|
22
|
+
}[];
|
|
23
|
+
getSchema(): SchemaContribution[];
|
|
24
|
+
getToolbarItems(): ToolbarItemContribution[];
|
|
25
|
+
getSelectionColor(state: EditorState): SelectionColor;
|
|
26
|
+
setColor(color: string): Command;
|
|
27
|
+
}
|
|
28
|
+
export declare const RteTextColorPickerFeature: {
|
|
29
|
+
new (config?: RteTextColorPickerConfig | undefined): {};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RteToolbarButtonAction = {
|
|
2
|
+
type: 'insert-text';
|
|
3
|
+
text: string;
|
|
4
|
+
};
|
|
5
|
+
export interface RteToolbarButtonFeatureOptions {
|
|
6
|
+
label: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
action: RteToolbarButtonAction;
|
|
9
|
+
order?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const RteToolbarButtonFeature: {
|
|
12
|
+
new (featureId: string, options: RteToolbarButtonFeatureOptions): {};
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { UiCtx } from '../utils/ui';
|
|
3
|
+
import { RteInstanceImpl } from '../instance';
|
|
4
|
+
import { RteFeatureImpl } from '../feature';
|
|
5
|
+
import { FeatureState } from '../utils/feature-state';
|
|
6
|
+
import { RteToolbarPublicInterface } from '../public-interface';
|
|
7
|
+
export interface ToolbarItemSpec {
|
|
8
|
+
section: 'history' | 'font' | 'text-style' | 'textblock' | 'insert';
|
|
9
|
+
render(ctx: UiCtx): HTMLElement | DocumentFragment;
|
|
10
|
+
}
|
|
11
|
+
export interface RteToolbarConfig {
|
|
12
|
+
popupDirection?: 'inward' | 'outward';
|
|
13
|
+
}
|
|
14
|
+
export declare class RteToolbarFeatureImpl extends RteFeatureImpl {
|
|
15
|
+
protected config?: RteToolbarConfig | undefined;
|
|
16
|
+
name: string;
|
|
17
|
+
hidden: FeatureState<boolean>;
|
|
18
|
+
constructor(config?: RteToolbarConfig | undefined);
|
|
19
|
+
getStyles(): {
|
|
20
|
+
priority: number;
|
|
21
|
+
featureName: string;
|
|
22
|
+
value: string;
|
|
23
|
+
}[];
|
|
24
|
+
getPlugins(rte: RteInstanceImpl): ({
|
|
25
|
+
priority: number;
|
|
26
|
+
featureName: string;
|
|
27
|
+
value: Plugin<any>;
|
|
28
|
+
} | {
|
|
29
|
+
priority: number;
|
|
30
|
+
featureName: string;
|
|
31
|
+
value: Plugin<boolean>;
|
|
32
|
+
})[];
|
|
33
|
+
getPublicInterface(rte: RteInstanceImpl): RteToolbarPublicInterface;
|
|
34
|
+
}
|
|
35
|
+
export declare const RteToolbarFeature: {
|
|
36
|
+
new (config?: RteToolbarConfig | undefined): {};
|
|
37
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RteInstanceImpl } from '../instance';
|
|
2
|
+
import { SchemaContribution, ToolbarItemContribution } from '../feature';
|
|
3
|
+
import { RteTextStyleFeatureImpl } from './internal/text-style';
|
|
4
|
+
export declare class RteUnderlineFeatureImpl extends RteTextStyleFeatureImpl {
|
|
5
|
+
name: string;
|
|
6
|
+
protected markName: string;
|
|
7
|
+
getSchema(): SchemaContribution[];
|
|
8
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
9
|
+
priority: number;
|
|
10
|
+
featureName: string;
|
|
11
|
+
value: import('prosemirror-state').Plugin<any>;
|
|
12
|
+
}[];
|
|
13
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
14
|
+
}
|
|
15
|
+
export declare const RteUnderlineFeature: {
|
|
16
|
+
new (config?: import('./internal/text-style').RteTextStyleConfig | undefined): {};
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { ParseRule, TagParseRule } from 'prosemirror-model';
|
|
2
|
+
import { RteConfig } from './config';
|
|
3
|
+
import { RteDocument, RteFragment } from './document';
|
|
4
4
|
type ParseRules = {
|
|
5
5
|
nodes: {
|
|
6
6
|
[name: string]: TagParseRule[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { DOMOutputSpec, DOMSerializer, Mark, Node, Schema } from 'prosemirror-model';
|
|
2
|
+
import { RteConfig, RteConfigImpl } from './config';
|
|
3
|
+
import { RteDocument, RteFragment } from './document';
|
|
4
4
|
type DomSerializers = {
|
|
5
5
|
nodes: {
|
|
6
6
|
[name: string]: (node: Node) => DOMOutputSpec;
|