@vonage/vivid 5.4.0 → 5.6.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/LICENSE.md +201 -0
- package/accordion/definition.cjs +5 -0
- package/accordion/definition.js +5 -0
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +14 -3
- package/alert/definition.cjs +4 -12
- package/alert/definition.js +5 -13
- package/alert/index.cjs +11 -11
- package/alert/index.js +33 -37
- package/audio-player/definition.cjs +4 -0
- package/audio-player/definition.js +4 -0
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +8 -2
- package/banner/definition.cjs +2 -4
- package/banner/definition.js +2 -4
- package/banner/index.cjs +2 -2
- package/banner/index.js +1 -1
- package/breadcrumb/definition.cjs +1 -0
- package/breadcrumb/definition.js +1 -0
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +1 -0
- package/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +3 -1
- package/bundled/base-color-picker.cjs +18 -13
- package/bundled/base-color-picker.js +107 -84
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +3 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +14 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +4 -2
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/definition10.cjs +7 -7
- package/bundled/definition10.js +29 -19
- package/bundled/definition11.cjs +12 -19
- package/bundled/definition11.js +73 -204
- package/bundled/definition12.cjs +19 -10
- package/bundled/definition12.js +218 -36
- package/bundled/definition13.cjs +10 -1
- package/bundled/definition13.js +38 -14
- package/bundled/definition14.cjs +1 -5
- package/bundled/definition14.js +15 -24
- package/bundled/definition15.cjs +5 -30
- package/bundled/definition15.js +22 -73
- package/bundled/definition16.cjs +30 -19
- package/bundled/definition16.js +74 -97
- package/bundled/definition17.cjs +19 -13
- package/bundled/definition17.js +86 -117
- package/bundled/definition18.cjs +13 -12
- package/bundled/definition18.js +125 -71
- package/bundled/definition19.cjs +16 -16
- package/bundled/definition19.js +132 -94
- package/bundled/definition2.cjs +8 -9
- package/bundled/definition2.js +89 -142
- package/bundled/definition22.cjs +1 -1
- package/bundled/definition22.js +1 -0
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +2 -1
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +9 -3
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -0
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +7 -4
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +1 -0
- package/bundled/definition9.cjs +6 -6
- package/bundled/definition9.js +545 -488
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +3 -1
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +11 -3
- package/bundled/host-semantics.js +4 -4
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +22 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +149 -66
- package/bundled/mixins.cjs +4 -4
- package/bundled/mixins.js +11 -8
- package/bundled/picker-field.template.cjs +14 -14
- package/bundled/picker-field.template.js +36 -56
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +4 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +12 -12
- package/bundled/time-selection-picker.template.js +16 -12
- package/bundled/trapped-focus.cjs +1 -0
- package/bundled/trapped-focus.js +26 -0
- package/bundled/vivid-element.cjs +4 -4
- package/bundled/vivid-element.js +529 -492
- package/calendar/definition.cjs +2 -0
- package/calendar/definition.js +2 -0
- package/calendar/index.cjs +13 -13
- package/calendar/index.js +174 -144
- package/checkbox/definition.cjs +1 -0
- package/checkbox/definition.js +1 -0
- package/color-picker/definition.cjs +213 -112
- package/color-picker/definition.js +213 -112
- package/color-picker/index.cjs +104 -75
- package/color-picker/index.js +417 -326
- package/combobox/definition.cjs +17 -6
- package/combobox/definition.js +17 -6
- package/combobox/index.cjs +14 -9
- package/combobox/index.js +54 -42
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +6976 -484
- package/data-grid/definition.cjs +105 -7
- package/data-grid/definition.js +105 -7
- package/data-grid/index.cjs +52 -38
- package/data-grid/index.js +313 -242
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +2 -0
- package/date-range-picker/definition.js +2 -0
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +7 -3
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +148 -0
- package/dial-pad/definition.js +148 -0
- package/dial-pad/index.cjs +27 -20
- package/dial-pad/index.js +202 -101
- package/dialog/definition.cjs +1 -0
- package/dialog/definition.js +1 -0
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -0
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/fab/definition.cjs +1 -0
- package/fab/definition.js +1 -0
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -0
- package/file-picker/definition.cjs +7 -2
- package/file-picker/definition.js +7 -2
- package/file-picker/index.cjs +6 -6
- package/file-picker/index.js +82 -73
- package/icon/definition.cjs +66 -41
- package/icon/definition.js +67 -42
- package/index.cjs +21 -0
- package/index.js +1 -1
- package/lib/color-picker/color-picker.d.ts +390 -12
- package/lib/color-picker/locale.d.ts +4 -0
- package/lib/data-grid/locale.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +38 -38
- package/lib/date-range-picker/date-range-picker.d.ts +20 -20
- package/lib/date-time-picker/date-time-picker.d.ts +40 -40
- package/lib/dial-pad/dial-pad.d.ts +1 -0
- package/lib/icon/icon.d.ts +1 -1
- package/lib/menu/menu.d.ts +4 -4
- package/lib/rich-text-editor/definition.d.ts +3 -2
- package/lib/rich-text-editor/locale.d.ts +29 -3
- package/lib/rich-text-editor/popover.d.ts +19 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +16 -45
- package/lib/rich-text-editor/rich-text-editor.template.d.ts +2 -2
- package/lib/rich-text-editor/rte/config.d.ts +18 -0
- package/lib/rich-text-editor/rte/document.d.ts +28 -0
- package/lib/rich-text-editor/rte/exports.d.ts +23 -0
- package/lib/rich-text-editor/rte/feature.d.ts +46 -0
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +33 -0
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +11 -0
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +10 -0
- package/lib/rich-text-editor/rte/features/internal/text-style.d.ts +18 -0
- package/lib/rich-text-editor/rte/html-parser.d.ts +24 -0
- package/lib/rich-text-editor/rte/html-serializer.d.ts +30 -0
- package/lib/rich-text-editor/rte/instance.d.ts +57 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/impl.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/textblock-attrs.d.ts +29 -0
- package/lib/rich-text-editor/rte/utils/textblock-marks.d.ts +10 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +109 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +6 -5
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/lib/time-picker/time-picker.d.ts +20 -20
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +4 -4
- package/locales/de-DE.cjs +58 -7
- package/locales/de-DE.js +58 -7
- package/locales/en-GB.cjs +60 -9
- package/locales/en-GB.js +60 -9
- package/locales/en-US.cjs +60 -9
- package/locales/en-US.js +60 -9
- package/locales/ja-JP.cjs +59 -8
- package/locales/ja-JP.js +59 -8
- package/locales/zh-CN.cjs +58 -7
- package/locales/zh-CN.js +58 -7
- package/menu/definition.cjs +1 -0
- package/menu/definition.js +1 -0
- package/number-field/definition.cjs +5 -3
- package/number-field/definition.js +5 -3
- package/number-field/index.cjs +5 -3
- package/number-field/index.js +34 -32
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +76 -62
- package/pagination/definition.cjs +2 -0
- package/pagination/definition.js +2 -0
- package/pagination/index.cjs +1 -1
- package/pagination/index.js +2 -0
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/definition.cjs +4 -0
- package/radio/definition.js +4 -0
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/definition.cjs +2 -1
- package/range-slider/definition.js +2 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +3 -1
- package/rich-text-editor/definition.cjs +17942 -1074
- package/rich-text-editor/definition.js +17926 -1079
- package/rich-text-editor/index.cjs +29 -130
- package/rich-text-editor/index.js +5565 -2474
- package/searchable-select/definition.cjs +6 -2
- package/searchable-select/definition.js +6 -2
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +14 -10
- package/select/definition.cjs +22 -4
- package/select/definition.js +22 -4
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/color-picker/base-color-picker.d.ts +2 -1
- package/shared/patterns/anchored.d.ts +8 -8
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/localized.d.ts +386 -0
- package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
- package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
- package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
- package/shared/utils/promise.d.ts +7 -0
- package/simple-color-picker/definition.cjs +11 -6
- package/simple-color-picker/definition.js +11 -6
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +44 -39
- package/slider/definition.cjs +7 -1
- package/slider/definition.js +7 -1
- package/styles/core/all.css +5 -1
- package/styles/core/theme.css +5 -1
- 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/switch/definition.cjs +1 -0
- package/switch/definition.js +1 -0
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -0
- package/tabs/definition.cjs +2 -0
- package/tabs/definition.js +2 -0
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +2 -0
- package/tag/definition.cjs +34 -14
- package/tag/definition.js +34 -14
- package/tag/index.cjs +25 -12
- package/tag/index.js +64 -47
- package/tag-group/definition.cjs +1 -2
- package/tag-group/definition.js +1 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +11 -12
- package/text-area/definition.cjs +13 -7
- package/text-area/definition.js +13 -7
- package/text-area/index.cjs +6 -6
- package/text-area/index.js +20 -14
- package/text-field/definition.cjs +16 -6
- package/text-field/definition.js +16 -6
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +1 -1
- package/toggletip/definition.cjs +5 -1
- package/toggletip/definition.js +5 -1
- package/toggletip/index.cjs +1 -1
- package/toggletip/index.js +1 -1
- package/tooltip/definition.cjs +6 -3
- package/tooltip/definition.js +6 -3
- package/tooltip/index.cjs +1 -1
- package/tooltip/index.js +1 -1
- package/tree-view/definition.cjs +28 -6
- package/tree-view/definition.js +28 -6
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +28 -6
- package/unbundled/_commonjsHelpers.cjs +0 -26
- package/unbundled/_commonjsHelpers.js +1 -26
- package/unbundled/attribute-binding-behaviour.cjs +1 -0
- package/unbundled/attribute-binding-behaviour.js +1 -0
- package/unbundled/base-color-picker.cjs +45 -21
- package/unbundled/base-color-picker.js +45 -21
- package/unbundled/base-progress.cjs +3 -0
- package/unbundled/base-progress.js +3 -0
- package/unbundled/button.cjs +14 -10
- package/unbundled/button.js +14 -10
- package/unbundled/calendar-picker.template.cjs +3 -1
- package/unbundled/calendar-picker.template.js +3 -1
- package/unbundled/definition.cjs +1 -0
- package/unbundled/definition.js +1 -0
- package/unbundled/definition2.cjs +4 -1
- package/unbundled/definition2.js +4 -1
- package/unbundled/definition3.cjs +1 -0
- package/unbundled/definition3.js +1 -0
- package/unbundled/definition4.cjs +1 -0
- package/unbundled/definition4.js +1 -0
- package/unbundled/definition5.cjs +3 -2
- package/unbundled/definition5.js +4 -3
- package/unbundled/delegates-aria.cjs +1 -0
- package/unbundled/delegates-aria.js +1 -0
- package/unbundled/form-associated.cjs +4 -0
- package/unbundled/form-associated.js +4 -0
- package/unbundled/listbox.cjs +16 -1
- package/unbundled/listbox.js +16 -1
- package/unbundled/localized.cjs +36 -0
- package/unbundled/localized.js +37 -2
- package/unbundled/mixins.cjs +2 -0
- package/unbundled/mixins.js +2 -0
- package/unbundled/picker-field.template.cjs +3 -35
- package/unbundled/picker-field.template.js +3 -34
- package/unbundled/scrollIntoView.cjs +1 -0
- package/unbundled/scrollIntoView.js +1 -0
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +5 -1
- package/unbundled/time-selection-picker.template.js +5 -1
- package/unbundled/trapped-focus.cjs +37 -0
- package/unbundled/trapped-focus.js +34 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +54 -44
- package/video-player/definition.js +50 -40
- package/video-player/index.cjs +28 -28
- package/video-player/index.js +1448 -1442
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +6463 -6099
- package/bundled/_has.cjs +0 -1
- package/bundled/_has.js +0 -34
- package/lib/rich-text-editor/facades/prose-mirror-vivid.schema.d.ts +0 -4
- package/lib/rich-text-editor/facades/vivid-prose-mirror.facade.d.ts +0 -18
- package/lib/rich-text-editor/image-placeholder/definition.d.ts +0 -2
- package/lib/rich-text-editor/image-placeholder/image-placeholder.d.ts +0 -7
- package/lib/rich-text-editor/image-placeholder/image-placeholder.template.d.ts +0 -4
- package/lib/rich-text-editor/menubar/consts.d.ts +0 -18
- package/lib/rich-text-editor/menubar/definition.d.ts +0 -2
- package/lib/rich-text-editor/menubar/menubar.d.ts +0 -386
- package/lib/rich-text-editor/menubar/menubar.template.d.ts +0 -4
|
@@ -11,8 +11,8 @@ declare const DateRangePicker_base: (abstract new (...args: any[]) => {
|
|
|
11
11
|
_currentDate: string;
|
|
12
12
|
_currentMonth: import("../../shared/datetime/month").Month;
|
|
13
13
|
_isDateInValidRange(date: string): boolean;
|
|
14
|
-
"__#
|
|
15
|
-
"__#
|
|
14
|
+
"__#23@#isMonthAfterValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
15
|
+
"__#23@#isMonthBeforeValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
16
16
|
_isMonthInValidRange(month: import("../../shared/datetime/month").Month): boolean;
|
|
17
17
|
_closePopup: ((restoreFocusToTextField?: boolean) => void) & ((restoreFocusToTextField?: boolean) => void);
|
|
18
18
|
_onPickerButtonClick: (() => void) & (() => void);
|
|
@@ -55,20 +55,20 @@ declare const DateRangePicker_base: (abstract new (...args: any[]) => {
|
|
|
55
55
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
56
56
|
connectedCallback(): void;
|
|
57
57
|
disconnectedCallback(): void;
|
|
58
|
-
"__#
|
|
59
|
-
"__#
|
|
58
|
+
"__#22@#onFocusIn": () => void;
|
|
59
|
+
"__#22@#onFocusOut": () => void;
|
|
60
60
|
proxy: HTMLInputElement;
|
|
61
61
|
validate(): void;
|
|
62
62
|
_getCustomValidationError(): string | null;
|
|
63
|
-
"__#
|
|
63
|
+
"__#22@#localeChangeHandler": {
|
|
64
64
|
handleChange: () => void;
|
|
65
65
|
};
|
|
66
|
-
"__#
|
|
67
|
-
"__#
|
|
68
|
-
"__#
|
|
66
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
67
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
68
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
69
69
|
_popupOpen: boolean;
|
|
70
|
-
"__#
|
|
71
|
-
"__#
|
|
70
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
71
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
72
72
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
73
73
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
74
74
|
readonly _dialogLabel: string;
|
|
@@ -901,8 +901,8 @@ declare const DateRangePicker_base: (abstract new (...args: any[]) => {
|
|
|
901
901
|
readonly _resolvedMinDate: string;
|
|
902
902
|
readonly _resolvedMaxDate: string;
|
|
903
903
|
_isDateInValidRange(date: string): boolean;
|
|
904
|
-
"__#
|
|
905
|
-
"__#
|
|
904
|
+
"__#23@#isMonthAfterValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
905
|
+
"__#23@#isMonthBeforeValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
906
906
|
_isMonthInValidRange(month: import("../../shared/datetime/month").Month): boolean;
|
|
907
907
|
_closePopup(restoreFocusToTextField?: boolean): void;
|
|
908
908
|
_onPickerButtonClick(): void;
|
|
@@ -945,20 +945,20 @@ declare const DateRangePicker_base: (abstract new (...args: any[]) => {
|
|
|
945
945
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
946
946
|
connectedCallback(): void;
|
|
947
947
|
disconnectedCallback(): void;
|
|
948
|
-
"__#
|
|
949
|
-
"__#
|
|
948
|
+
"__#22@#onFocusIn": () => void;
|
|
949
|
+
"__#22@#onFocusOut": () => void;
|
|
950
950
|
proxy: HTMLInputElement;
|
|
951
951
|
validate(): void;
|
|
952
952
|
_getCustomValidationError(): string | null;
|
|
953
|
-
"__#
|
|
953
|
+
"__#22@#localeChangeHandler": {
|
|
954
954
|
handleChange: () => void;
|
|
955
955
|
};
|
|
956
|
-
"__#
|
|
957
|
-
"__#
|
|
958
|
-
"__#
|
|
956
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
957
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
958
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
959
959
|
_popupOpen: boolean;
|
|
960
|
-
"__#
|
|
961
|
-
"__#
|
|
960
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
961
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
962
962
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
963
963
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
964
964
|
readonly _dialogLabel: string;
|
|
@@ -11,12 +11,12 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
11
11
|
readonly _displaySeconds: boolean;
|
|
12
12
|
readonly _use12hClock: boolean;
|
|
13
13
|
readonly _timePlaceholder: string;
|
|
14
|
-
"__#
|
|
14
|
+
"__#25@#clockChangeHandler": {
|
|
15
15
|
handleChange: () => void;
|
|
16
16
|
};
|
|
17
|
-
"__#
|
|
18
|
-
"__#
|
|
19
|
-
"__#
|
|
17
|
+
"__#25@#clockChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
18
|
+
"__#25@#startObservingClockChanges"(): void;
|
|
19
|
+
"__#25@#stopObservingClockChanges"(): void;
|
|
20
20
|
connectedCallback(): void;
|
|
21
21
|
disconnectedCallback(): void;
|
|
22
22
|
_onPickerButtonClick(): void;
|
|
@@ -38,20 +38,20 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
38
38
|
_textFieldEl: import("../components").VwcTextFieldElement;
|
|
39
39
|
_dialogEl: HTMLElement;
|
|
40
40
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
41
|
-
"__#
|
|
42
|
-
"__#
|
|
41
|
+
"__#22@#onFocusIn": () => void;
|
|
42
|
+
"__#22@#onFocusOut": () => void;
|
|
43
43
|
proxy: HTMLInputElement;
|
|
44
44
|
validate(): void;
|
|
45
45
|
_getCustomValidationError(): string | null;
|
|
46
|
-
"__#
|
|
46
|
+
"__#22@#localeChangeHandler": {
|
|
47
47
|
handleChange: () => void;
|
|
48
48
|
};
|
|
49
|
-
"__#
|
|
50
|
-
"__#
|
|
51
|
-
"__#
|
|
49
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
50
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
51
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
52
52
|
_popupOpen: boolean;
|
|
53
|
-
"__#
|
|
54
|
-
"__#
|
|
53
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
54
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
55
55
|
_closePopup(restoreFocusToTextField?: boolean): void;
|
|
56
56
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
57
57
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
@@ -887,8 +887,8 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
887
887
|
readonly _resolvedMinDate: string;
|
|
888
888
|
readonly _resolvedMaxDate: string;
|
|
889
889
|
_isDateInValidRange(date: string): boolean;
|
|
890
|
-
"__#
|
|
891
|
-
"__#
|
|
890
|
+
"__#23@#isMonthAfterValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
891
|
+
"__#23@#isMonthBeforeValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
892
892
|
_isMonthInValidRange(month: import("../../shared/datetime/month").Month): boolean;
|
|
893
893
|
_closePopup: ((restoreFocusToTextField?: boolean) => void) & ((restoreFocusToTextField?: boolean) => void);
|
|
894
894
|
_onPickerButtonClick: (() => void) & (() => void);
|
|
@@ -927,20 +927,20 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
927
927
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
928
928
|
connectedCallback(): void;
|
|
929
929
|
disconnectedCallback(): void;
|
|
930
|
-
"__#
|
|
931
|
-
"__#
|
|
930
|
+
"__#22@#onFocusIn": () => void;
|
|
931
|
+
"__#22@#onFocusOut": () => void;
|
|
932
932
|
proxy: HTMLInputElement;
|
|
933
933
|
validate(): void;
|
|
934
934
|
_getCustomValidationError(): string | null;
|
|
935
|
-
"__#
|
|
935
|
+
"__#22@#localeChangeHandler": {
|
|
936
936
|
handleChange: () => void;
|
|
937
937
|
};
|
|
938
|
-
"__#
|
|
939
|
-
"__#
|
|
940
|
-
"__#
|
|
938
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
939
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
940
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
941
941
|
_popupOpen: boolean;
|
|
942
|
-
"__#
|
|
943
|
-
"__#
|
|
942
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
943
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
944
944
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
945
945
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
946
946
|
readonly _dialogLabel: string;
|
|
@@ -1789,20 +1789,20 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
1789
1789
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
1790
1790
|
connectedCallback(): void;
|
|
1791
1791
|
disconnectedCallback(): void;
|
|
1792
|
-
"__#
|
|
1793
|
-
"__#
|
|
1792
|
+
"__#22@#onFocusIn": () => void;
|
|
1793
|
+
"__#22@#onFocusOut": () => void;
|
|
1794
1794
|
proxy: HTMLInputElement;
|
|
1795
1795
|
validate(): void;
|
|
1796
1796
|
_getCustomValidationError(): string | null;
|
|
1797
|
-
"__#
|
|
1797
|
+
"__#22@#localeChangeHandler": {
|
|
1798
1798
|
handleChange: () => void;
|
|
1799
1799
|
};
|
|
1800
|
-
"__#
|
|
1801
|
-
"__#
|
|
1802
|
-
"__#
|
|
1800
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
1801
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
1802
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
1803
1803
|
_popupOpen: boolean;
|
|
1804
|
-
"__#
|
|
1805
|
-
"__#
|
|
1804
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
1805
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
1806
1806
|
_closePopup(restoreFocusToTextField?: boolean): void;
|
|
1807
1807
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
1808
1808
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
@@ -2632,8 +2632,8 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
2632
2632
|
readonly _resolvedMinDate: string;
|
|
2633
2633
|
readonly _resolvedMaxDate: string;
|
|
2634
2634
|
_isDateInValidRange(date: string): boolean;
|
|
2635
|
-
"__#
|
|
2636
|
-
"__#
|
|
2635
|
+
"__#23@#isMonthAfterValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
2636
|
+
"__#23@#isMonthBeforeValidRange"(month: import("../../shared/datetime/month").Month): boolean | "";
|
|
2637
2637
|
_isMonthInValidRange(month: import("../../shared/datetime/month").Month): boolean;
|
|
2638
2638
|
_closePopup(restoreFocusToTextField?: boolean): void;
|
|
2639
2639
|
_onPickerButtonClick(): void;
|
|
@@ -2676,20 +2676,20 @@ declare const DateTimePicker_base: (abstract new (...args: any[]) => {
|
|
|
2676
2676
|
_pickerButtonEl: import("../components").VwcButtonElement;
|
|
2677
2677
|
connectedCallback(): void;
|
|
2678
2678
|
disconnectedCallback(): void;
|
|
2679
|
-
"__#
|
|
2680
|
-
"__#
|
|
2679
|
+
"__#22@#onFocusIn": () => void;
|
|
2680
|
+
"__#22@#onFocusOut": () => void;
|
|
2681
2681
|
proxy: HTMLInputElement;
|
|
2682
2682
|
validate(): void;
|
|
2683
2683
|
_getCustomValidationError(): string | null;
|
|
2684
|
-
"__#
|
|
2684
|
+
"__#22@#localeChangeHandler": {
|
|
2685
2685
|
handleChange: () => void;
|
|
2686
2686
|
};
|
|
2687
|
-
"__#
|
|
2688
|
-
"__#
|
|
2689
|
-
"__#
|
|
2687
|
+
"__#22@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
2688
|
+
"__#22@#startObservingLocaleChanges"(): void;
|
|
2689
|
+
"__#22@#stopObservingLocaleChanges"(): void;
|
|
2690
2690
|
_popupOpen: boolean;
|
|
2691
|
-
"__#
|
|
2692
|
-
"__#
|
|
2691
|
+
"__#22@#dismissOnClickOutside": (event: MouseEvent) => void;
|
|
2692
|
+
"__#22@#openPopupIfPossible"(): void;
|
|
2693
2693
|
_onBaseKeyDown(event: KeyboardEvent): boolean;
|
|
2694
2694
|
_focusableElsWithinDialog(): NodeListOf<HTMLElement>;
|
|
2695
2695
|
readonly _dialogLabel: string;
|
package/lib/icon/icon.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Connotation } from '../enums';
|
|
2
2
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
3
3
|
import type { ExtractFromEnum } from '../../shared/utils/enums';
|
|
4
|
+
export declare const resolveIcon: (iconId: string | undefined, signal: AbortSignal) => Promise<string>;
|
|
4
5
|
export type IconConnotation = ExtractFromEnum<Connotation, Connotation.Accent | Connotation.CTA | Connotation.Success | Connotation.Alert | Connotation.Warning | Connotation.Information | Connotation.Announcement>;
|
|
5
6
|
export declare class Icon extends VividElement {
|
|
6
7
|
#private;
|
|
@@ -9,6 +10,5 @@ export declare class Icon extends VividElement {
|
|
|
9
10
|
iconLoaded: boolean;
|
|
10
11
|
label?: string;
|
|
11
12
|
name?: string;
|
|
12
|
-
get iconUrl(): string | undefined;
|
|
13
13
|
nameChanged(): Promise<void>;
|
|
14
14
|
}
|
package/lib/menu/menu.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ declare const Menu_base: {
|
|
|
7
7
|
_slottedAnchor?: HTMLElement[] | undefined;
|
|
8
8
|
_slottedAnchorChanged(): void;
|
|
9
9
|
_anchorEl?: HTMLElement | undefined;
|
|
10
|
-
"__#
|
|
11
|
-
"__#
|
|
12
|
-
"__#
|
|
13
|
-
"__#
|
|
10
|
+
"__#10@#updateAnchorEl": () => void;
|
|
11
|
+
"__#10@#observer"?: MutationObserver | undefined;
|
|
12
|
+
"__#10@#observeMissingAnchor": (anchorId: string) => void;
|
|
13
|
+
"__#10@#cleanupObserverIfNeeded": () => void;
|
|
14
14
|
connectedCallback(): void;
|
|
15
15
|
disconnectedCallback(): void;
|
|
16
16
|
_vividAriaBehaviour: import("../../shared/aria/aria-mixin").VividAriaBehaviour;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RichTextEditor
|
|
1
|
+
import { RichTextEditor } from './rich-text-editor';
|
|
2
2
|
export declare const richTextEditorDefinition: import("../../shared/design-system/defineVividComponent").VividComponentDefinition;
|
|
3
3
|
export declare const registerRichTextEditor: (prefix?: string) => void;
|
|
4
|
-
export { RichTextEditor as VwcRichTextEditorElement
|
|
4
|
+
export { RichTextEditor as VwcRichTextEditorElement };
|
|
5
|
+
export * from './rte/exports';
|
|
@@ -1,10 +1,36 @@
|
|
|
1
1
|
export interface RichTextEditorLocale {
|
|
2
|
-
|
|
2
|
+
paragraphStyles: string;
|
|
3
3
|
textSize: string;
|
|
4
4
|
bold: string;
|
|
5
|
-
|
|
5
|
+
italic: string;
|
|
6
6
|
underline: string;
|
|
7
7
|
strikethrough: string;
|
|
8
8
|
monospace: string;
|
|
9
|
-
|
|
9
|
+
textColor: string;
|
|
10
|
+
undo: string;
|
|
11
|
+
redo: string;
|
|
12
|
+
bulletList: string;
|
|
13
|
+
numberedList: string;
|
|
14
|
+
alignment: string;
|
|
15
|
+
alignments: {
|
|
16
|
+
left: string;
|
|
17
|
+
center: string;
|
|
18
|
+
right: string;
|
|
19
|
+
};
|
|
20
|
+
hyperlink: string;
|
|
21
|
+
linkText: string;
|
|
22
|
+
linkUrl: string;
|
|
23
|
+
linkTextPlaceholder: string;
|
|
24
|
+
linkUrlPlaceholder: string;
|
|
25
|
+
cancel: string;
|
|
26
|
+
apply: string;
|
|
27
|
+
close: string;
|
|
28
|
+
edit: string;
|
|
29
|
+
delete: string;
|
|
30
|
+
clickHere: string;
|
|
31
|
+
imageSizes: {
|
|
32
|
+
small: string;
|
|
33
|
+
fit: string;
|
|
34
|
+
original: string;
|
|
35
|
+
};
|
|
10
36
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
|
+
export declare class Popover extends VividElement {
|
|
3
|
+
#private;
|
|
4
|
+
static setBlockPopover(onElement: HTMLElement, block: boolean): void;
|
|
5
|
+
offset?: number;
|
|
6
|
+
anchorBlocksPopover: boolean;
|
|
7
|
+
onAnchorBlockPopoverChanged: () => void;
|
|
8
|
+
anchorEl?: HTMLElement;
|
|
9
|
+
anchorElChanged(prev?: HTMLElement, next?: HTMLElement): void;
|
|
10
|
+
anchorId?: string;
|
|
11
|
+
anchorIdChanged(): void;
|
|
12
|
+
updateAnchor(): void;
|
|
13
|
+
requestedOpenState: boolean;
|
|
14
|
+
requestOpenState(open: boolean): void;
|
|
15
|
+
get open(): boolean;
|
|
16
|
+
connectedCallback(): void;
|
|
17
|
+
disconnectedCallback(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const popoverDefinition: import("../../shared/design-system/defineVividComponent").VividComponentDefinition;
|
|
@@ -1,34 +1,20 @@
|
|
|
1
1
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
2
|
-
|
|
3
|
-
export interface SelectionStyles {
|
|
4
|
-
textBlockType?: string;
|
|
5
|
-
textDecoration?: string[];
|
|
6
|
-
textSize?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface RichTextEditorSelection {
|
|
9
|
-
start: number;
|
|
10
|
-
end?: number;
|
|
11
|
-
}
|
|
12
|
-
export interface RichTextEditorInlineImageProps {
|
|
13
|
-
file: File;
|
|
14
|
-
position?: number;
|
|
15
|
-
alt?: string;
|
|
16
|
-
error?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const RichTextEditorTextBlocks: {
|
|
19
|
-
readonly title: "h2";
|
|
20
|
-
readonly subtitle: "h3";
|
|
21
|
-
readonly body: "p";
|
|
22
|
-
};
|
|
23
|
-
export type RichTextEditorTextBlocks = keyof typeof RichTextEditorTextBlocks;
|
|
2
|
+
import { RteInstance } from './rte/instance';
|
|
24
3
|
declare const RichTextEditor_base: {
|
|
25
4
|
new (...args: any[]): {
|
|
26
|
-
|
|
5
|
+
localeChanged(): void;
|
|
27
6
|
connectedCallback(): void;
|
|
7
|
+
disconnectedCallback(): void;
|
|
8
|
+
"__#5@#localeChangeHandler": {
|
|
9
|
+
handleChange: () => void;
|
|
10
|
+
};
|
|
11
|
+
"__#5@#localeChangeObserver": import("@microsoft/fast-element").ExpressionNotifier<any, any, any>;
|
|
12
|
+
"__#5@#startObservingLocaleChanges"(): void;
|
|
13
|
+
"__#5@#stopObservingLocaleChanges"(): void;
|
|
14
|
+
readonly locale: import("../../shared/localization/Locale").Locale;
|
|
28
15
|
_vividAriaBehaviour: import("../../shared/aria/aria-mixin").VividAriaBehaviour;
|
|
29
16
|
readonly $fastController: import("@microsoft/fast-element").ElementController<HTMLElement>;
|
|
30
17
|
$emit(type: string, detail?: any, options?: Omit<CustomEventInit<any>, "detail"> | undefined): boolean | void;
|
|
31
|
-
disconnectedCallback(): void;
|
|
32
18
|
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
33
19
|
accessKey: string;
|
|
34
20
|
readonly accessKeyLabel: string;
|
|
@@ -400,27 +386,12 @@ declare const RichTextEditor_base: {
|
|
|
400
386
|
};
|
|
401
387
|
} & typeof VividElement;
|
|
402
388
|
export declare class RichTextEditor extends RichTextEditor_base {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
selectionStartChanged(): void;
|
|
408
|
-
selectionEnd: number | null;
|
|
409
|
-
selectionEndChanged(): void;
|
|
410
|
-
placeholder?: string;
|
|
411
|
-
placeholderChanged(): void;
|
|
412
|
-
constructor();
|
|
389
|
+
instance?: RteInstance;
|
|
390
|
+
editorViewportElement?: HTMLElement;
|
|
391
|
+
private _initViewIfNeeded;
|
|
392
|
+
private _destroyViewIfNeeded;
|
|
413
393
|
connectedCallback(): void;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
setSelectionTextSize(textSize: RICH_TEXT_EDITOR_MENUBAR_TEXT_SIZES): void;
|
|
417
|
-
get selectionStyles(): SelectionStyles;
|
|
418
|
-
focus(): void;
|
|
419
|
-
scrollToAttachments(additionalPixels?: number): void;
|
|
420
|
-
addInlineImage(imageProps: {
|
|
421
|
-
file: File;
|
|
422
|
-
position?: number;
|
|
423
|
-
alt?: string;
|
|
424
|
-
}): Promise<void>;
|
|
394
|
+
disconnectedCallback(): void;
|
|
395
|
+
private _syncStateIfNeeded;
|
|
425
396
|
}
|
|
426
397
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { VividElementDefinitionContext } from '../../shared/design-system/defineVividComponent';
|
|
3
3
|
import { RichTextEditor } from './rich-text-editor';
|
|
4
|
-
export declare const RichTextEditorTemplate: (
|
|
4
|
+
export declare const RichTextEditorTemplate: (ctx: VividElementDefinitionContext) => ViewTemplate<RichTextEditor>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema } from 'prosemirror-model';
|
|
2
|
+
import type { Constructor } from '../../../shared/utils/mixins';
|
|
3
|
+
import { RteInstance, type RteInstanceOptions } from './instance';
|
|
4
|
+
import { RteFeature, RteFeatureImpl } from './feature';
|
|
5
|
+
import { TextblockAttrs } from './utils/textblock-attrs';
|
|
6
|
+
import { TextblockMarks } from './utils/textblock-marks';
|
|
7
|
+
export declare class RteConfig {
|
|
8
|
+
constructor(features: RteFeature[]);
|
|
9
|
+
instantiateEditor(options?: RteInstanceOptions): RteInstance;
|
|
10
|
+
}
|
|
11
|
+
export declare class RteConfigImpl {
|
|
12
|
+
schema: Schema;
|
|
13
|
+
textblockAttrs: TextblockAttrs;
|
|
14
|
+
textblockMarks: TextblockMarks;
|
|
15
|
+
featureMap: Map<Constructor<RteFeatureImpl>, RteFeatureImpl>;
|
|
16
|
+
features: RteFeatureImpl[];
|
|
17
|
+
constructor(featuresFacades: RteFeature[]);
|
|
18
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type Doc = {
|
|
2
|
+
type: 'doc';
|
|
3
|
+
content: RteFragment;
|
|
4
|
+
};
|
|
5
|
+
type Mark = {
|
|
6
|
+
type: string;
|
|
7
|
+
attrs?: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type TextNode = {
|
|
12
|
+
type: 'text';
|
|
13
|
+
text: string;
|
|
14
|
+
marks?: Mark[];
|
|
15
|
+
};
|
|
16
|
+
type RegularNode = {
|
|
17
|
+
type: Omit<string, 'text'>;
|
|
18
|
+
attrs?: {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
marks?: Mark[];
|
|
22
|
+
content?: Array<RteNode>;
|
|
23
|
+
};
|
|
24
|
+
export type RteNode = TextNode | RegularNode;
|
|
25
|
+
export type RteMark = Mark;
|
|
26
|
+
export type RteDocument = Doc;
|
|
27
|
+
export type RteFragment = Array<RteNode>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { RteConfig } from './config';
|
|
2
|
+
export { RteBase } from './features/base';
|
|
3
|
+
export { RteTextBlockPickerFeature } from './features/text-block-picker';
|
|
4
|
+
export { RteToolbarFeature } from './features/toolbar';
|
|
5
|
+
export { RtePlaceholderFeature } from './features/placeholder';
|
|
6
|
+
export { RteHardBreakFeature } from './features/hard-break';
|
|
7
|
+
export { RteFontSizePickerFeature } from './features/font-size-picker';
|
|
8
|
+
export { RteBoldFeature } from './features/bold';
|
|
9
|
+
export { RteItalicFeature } from './features/italic';
|
|
10
|
+
export { RteUnderlineFeature } from './features/underline';
|
|
11
|
+
export { RteStrikethroughFeature } from './features/strikethrough';
|
|
12
|
+
export { RteMonospaceFeature } from './features/monospace';
|
|
13
|
+
export { RteTextColorPickerFeature } from './features/text-color-picker';
|
|
14
|
+
export { RteListFeature } from './features/list';
|
|
15
|
+
export { RteAlignmentFeature } from './features/alignment';
|
|
16
|
+
export { RteLinkFeature } from './features/link';
|
|
17
|
+
export { RteInlineImageFeature } from './features/inline-image';
|
|
18
|
+
export { RteFileHandlerFeature } from './features/file-handler';
|
|
19
|
+
export { RteDropHandlerFeature } from './features/drop-handler';
|
|
20
|
+
export { RteHtmlParser } from './html-parser';
|
|
21
|
+
export { RteHtmlSerializer } from './html-serializer';
|
|
22
|
+
export type { RteInstance } from './instance';
|
|
23
|
+
export type { RteDocument, RteFragment, RteNode, RteMark } from './document';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { SchemaSpec } from 'prosemirror-model';
|
|
2
|
+
import type { Plugin } from 'prosemirror-state';
|
|
3
|
+
import type { Constructor } from '../../../shared/utils/mixins';
|
|
4
|
+
import type { RteInstanceImpl } from './instance';
|
|
5
|
+
import { TextblockAttrs, type TextblockAttrSpec } from './utils/textblock-attrs';
|
|
6
|
+
import { impl } from './utils/impl';
|
|
7
|
+
import type { ToolbarItemSpec } from './features/toolbar';
|
|
8
|
+
import { TextblockMarks, type TextblockMarkSpec } from './utils/textblock-marks';
|
|
9
|
+
type Contribution<T> = {
|
|
10
|
+
priority: number;
|
|
11
|
+
featureName: string;
|
|
12
|
+
value: T;
|
|
13
|
+
};
|
|
14
|
+
export declare const sortedContributions: <T>(contributions: Contribution<T>[]) => T[];
|
|
15
|
+
export declare const contributionPriority: {
|
|
16
|
+
highest: number;
|
|
17
|
+
high: number;
|
|
18
|
+
default: number;
|
|
19
|
+
low: number;
|
|
20
|
+
lowest: number;
|
|
21
|
+
};
|
|
22
|
+
export type StyleContribution = Contribution<string>;
|
|
23
|
+
export type SchemaContribution = Contribution<Partial<SchemaSpec>>;
|
|
24
|
+
export type TextblockAttrContribution = Contribution<TextblockAttrSpec>;
|
|
25
|
+
export type TextblockMarkContribution = Contribution<TextblockMarkSpec>;
|
|
26
|
+
export type PluginContribution = Contribution<Plugin>;
|
|
27
|
+
export type ToolbarItemContribution = Contribution<ToolbarItemSpec>;
|
|
28
|
+
export declare abstract class RteFeature {
|
|
29
|
+
}
|
|
30
|
+
export declare abstract class RteFeatureImpl {
|
|
31
|
+
protected abstract name: string;
|
|
32
|
+
protected contribution<T>(value: T, order?: number): Contribution<T>;
|
|
33
|
+
getStyles(): StyleContribution[];
|
|
34
|
+
getSchema(textblockAttrs: TextblockAttrs, textblockMarks: TextblockMarks): SchemaContribution[];
|
|
35
|
+
getTextblockAttrs(): TextblockAttrContribution[];
|
|
36
|
+
getTextblockMarks(): TextblockMarkContribution[];
|
|
37
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
38
|
+
getToolbarItems(rte: RteInstanceImpl): ToolbarItemContribution[];
|
|
39
|
+
getFeatures(): RteFeatureImpl[];
|
|
40
|
+
}
|
|
41
|
+
export declare const featureFacade: <T extends RteFeatureImpl, C extends Constructor<T>>(FeatureImpl: C) => {
|
|
42
|
+
new (...args: ConstructorParameters<C>): {
|
|
43
|
+
[impl]: T;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NodeSpec } from 'prosemirror-model';
|
|
2
|
+
import { type Command, EditorState } from 'prosemirror-state';
|
|
3
|
+
import { type PluginContribution, RteFeatureImpl } from '../../feature';
|
|
4
|
+
import type { RteInstanceImpl } from '../../instance';
|
|
5
|
+
import type { TextblockAttrs } from '../../utils/textblock-attrs';
|
|
6
|
+
import type { TextblockMarks } from '../../utils/textblock-marks';
|
|
7
|
+
type EnabledBlocks = {
|
|
8
|
+
heading1: boolean;
|
|
9
|
+
heading2: boolean;
|
|
10
|
+
heading3: boolean;
|
|
11
|
+
paragraph: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare class RteBasicTextBlocksImpl extends RteFeatureImpl {
|
|
14
|
+
protected enabledBlocks: EnabledBlocks;
|
|
15
|
+
protected name: string;
|
|
16
|
+
constructor(enabledBlocks: EnabledBlocks);
|
|
17
|
+
getStyles(): {
|
|
18
|
+
priority: number;
|
|
19
|
+
featureName: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
getSchema(textblockAttrs: TextblockAttrs, textblockMarks: TextblockMarks): {
|
|
23
|
+
priority: number;
|
|
24
|
+
featureName: string;
|
|
25
|
+
value: {
|
|
26
|
+
nodes: Record<string, NodeSpec>;
|
|
27
|
+
};
|
|
28
|
+
}[];
|
|
29
|
+
getPlugins(rte: RteInstanceImpl): PluginContribution[];
|
|
30
|
+
getCurrentBlockType(state: EditorState): string | null;
|
|
31
|
+
setBlockType(rte: RteInstanceImpl, name: string): Command;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Plugin } from 'prosemirror-state';
|
|
2
|
+
import { RteFeatureImpl } from '../../feature';
|
|
3
|
+
import type { RteInstanceImpl } from '../../instance';
|
|
4
|
+
export declare class RteForeignHtmlFeatureImpl extends RteFeatureImpl {
|
|
5
|
+
protected name: string;
|
|
6
|
+
getPlugins(rte: RteInstanceImpl): {
|
|
7
|
+
priority: number;
|
|
8
|
+
featureName: string;
|
|
9
|
+
value: Plugin<any>;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RteFeatureImpl, type ToolbarItemContribution } from '../../feature';
|
|
2
|
+
export declare class RteHistoryFeatureImpl extends RteFeatureImpl {
|
|
3
|
+
protected name: string;
|
|
4
|
+
getPlugins(): {
|
|
5
|
+
priority: number;
|
|
6
|
+
featureName: string;
|
|
7
|
+
value: import("prosemirror-state").Plugin<any>;
|
|
8
|
+
}[];
|
|
9
|
+
getToolbarItems(): ToolbarItemContribution[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RteFeatureImpl } from '../../feature';
|
|
2
|
+
export type RteTextStyleConfig = {
|
|
3
|
+
onBlocks?: Array<{
|
|
4
|
+
node: string;
|
|
5
|
+
}>;
|
|
6
|
+
};
|
|
7
|
+
export declare abstract class RteTextStyleFeatureImpl extends RteFeatureImpl {
|
|
8
|
+
protected config?: RteTextStyleConfig | undefined;
|
|
9
|
+
protected abstract markName: string;
|
|
10
|
+
constructor(config?: RteTextStyleConfig | undefined);
|
|
11
|
+
getTextblockMarks(): {
|
|
12
|
+
priority: number;
|
|
13
|
+
featureName: string;
|
|
14
|
+
value: {
|
|
15
|
+
markName: string;
|
|
16
|
+
};
|
|
17
|
+
}[];
|
|
18
|
+
}
|