@xplor-education/core-stencil-components 3.1.2 → 3.1.4
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/components/index.js +28 -3
- package/components/index.js.map +1 -1
- package/components/{p-B49oUO_9.js → p-AzuDJugb.js} +3 -3
- package/components/{p-B49oUO_9.js.map → p-AzuDJugb.js.map} +1 -1
- package/components/{p-D4jVa8dE.js → p-BQ6aLuGP.js} +4 -4
- package/components/{p-D4jVa8dE.js.map → p-BQ6aLuGP.js.map} +1 -1
- package/components/{p-VIJbFoA4.js → p-BZQ63ULK.js} +3 -3
- package/components/{p-VIJbFoA4.js.map → p-BZQ63ULK.js.map} +1 -1
- package/components/{p-BRWe4TXp.js → p-C-gHaxf1.js} +3 -3
- package/components/p-C-gHaxf1.js.map +1 -0
- package/components/{p-Bs_ocvfe.js → p-CyGsSa4H.js} +7 -4
- package/components/p-CyGsSa4H.js.map +1 -0
- package/components/{p-B3zR7peH.js → p-oanCZPh6.js} +4 -4
- package/components/{p-B3zR7peH.js.map → p-oanCZPh6.js.map} +1 -1
- package/components/xplor-alert-message.js +2 -2
- package/components/xplor-avatar-and-name.js +2 -2
- package/components/xplor-avatar.js +1 -1
- package/components/xplor-badge-active.js +1 -1
- package/components/xplor-badge-archived.js +1 -1
- package/components/xplor-badge-deleted.js +1 -1
- package/components/xplor-badge-expired.js +1 -1
- package/components/xplor-badge-inactive.js +1 -1
- package/components/xplor-badge-recalled.js +1 -1
- package/components/xplor-badge-upcoming.js +1 -1
- package/components/xplor-badge-waitlist.js +1 -1
- package/components/xplor-badge.js +1 -1
- package/components/xplor-btn-back-to-parent.js +1 -1
- package/components/xplor-btn-back.js +1 -1
- package/components/xplor-btn-icon.js +1 -1
- package/components/xplor-btn-toggle-group.js +1 -1
- package/components/xplor-btn-toggle-secondary.js +1 -1
- package/components/xplor-btn-toggle.js +1 -1
- package/components/xplor-btn-tooltip.js +3 -3
- package/components/xplor-button.js +1 -1
- package/components/xplor-canvas-editor.d.ts +11 -0
- package/components/xplor-canvas-editor.js +369 -0
- package/components/xplor-canvas-editor.js.map +1 -0
- package/components/xplor-chat-widget.js +3 -3
- package/components/xplor-checkbox.js +1 -1
- package/components/xplor-combobox.js +5 -5
- package/components/xplor-datatable.js +2 -2
- package/components/xplor-date-picker.js +5 -5
- package/components/xplor-drag-and-drop-input.js +26 -5
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-file-upload.js +2 -2
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +1 -1
- package/components/xplor-input-search.js +2 -2
- package/components/xplor-input-select.js +2 -2
- package/components/xplor-input-send.js +3 -3
- package/components/xplor-input-text-area.js +2 -2
- package/components/xplor-input-text-secondary.js +2 -2
- package/components/xplor-input-text.js +2 -2
- package/components/xplor-input-title.js +1 -1
- package/components/xplor-links.js +1 -1
- package/components/xplor-modal-persistent.js +2 -2
- package/components/xplor-modal.js +1 -1
- package/components/xplor-nav-tabs.js +2 -2
- package/components/xplor-radio-btn.js +2 -2
- package/components/xplor-rich-text-editor.d.ts +11 -0
- package/components/xplor-rich-text-editor.js +23754 -0
- package/components/xplor-rich-text-editor.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-heading.js +2 -2
- package/components/xplor-table.js +5 -5
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/components/xplor-tooltip.js +1 -1
- package/dist/cjs/{index-BjAapk2n.js → index--_m3aUsf.js} +32 -7
- package/dist/cjs/index--_m3aUsf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js +29457 -0
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/xplor-alert-message/xplor-alert-message.js +2 -2
- package/dist/collection/components/xplor-avatar/xplor-avatar.js +2 -2
- package/dist/collection/components/xplor-avatar-and-name/xplor-avatar-and-name.js +1 -1
- package/dist/collection/components/xplor-badge/xplor-badge.js +1 -1
- package/dist/collection/components/xplor-badge-active/xplor-badge-active.js +1 -1
- package/dist/collection/components/xplor-badge-archived/xplor-badge-archived.js +1 -1
- package/dist/collection/components/xplor-badge-deleted/xplor-badge-deleted.js +1 -1
- package/dist/collection/components/xplor-badge-expired/xplor-badge-expired.js +1 -1
- package/dist/collection/components/xplor-badge-inactive/xplor-badge-inactive.js +1 -1
- package/dist/collection/components/xplor-badge-recalled/xplor-badge-recalled.js +1 -1
- package/dist/collection/components/xplor-badge-upcoming/xplor-badge-upcoming.js +1 -1
- package/dist/collection/components/xplor-badge-waitlist/xplor-badge-waitlist.js +1 -1
- package/dist/collection/components/xplor-btn-back/xplor-btn-back.js +1 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js +1 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js +1 -1
- package/dist/collection/components/xplor-btn-toggle/xplor-btn-toggle.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-group/xplor-btn-toggle-group.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-secondary/xplor-btn-toggle-secondary.js +1 -1
- package/dist/collection/components/xplor-btn-tooltip/xplor-btn-tooltip.js +1 -1
- package/dist/collection/components/xplor-button/xplor-button.css +8 -3
- package/dist/collection/components/xplor-button/xplor-button.js +23 -1
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.css +1224 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js +520 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js.map +1 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js +280 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-chat-widget/xplor-chat-widget.js +1 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js +1 -1
- package/dist/collection/components/xplor-combobox/xplor-combobox.js +5 -5
- package/dist/collection/components/xplor-datatable/xplor-datatable.js +2 -2
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js +4 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +62 -29
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +25 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js +2 -2
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +2 -2
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +2 -2
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +2 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +2 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +2 -2
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +1 -1
- package/dist/collection/components/xplor-modal/xplor-modal.css +10 -10
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js +2 -2
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +2 -2
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.css +1445 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js +800 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js.map +1 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js +260 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +2 -2
- package/dist/collection/components/xplor-table/xplor-table.js +5 -5
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js +2 -2
- package/dist/collection/utils/slate-legacy-converter.js +223 -0
- package/dist/collection/utils/slate-legacy-converter.js.map +1 -0
- package/dist/components/index.js +28 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-04oMLTZR.js → p-B7FEf2_x.js} +3 -3
- package/dist/components/p-B7FEf2_x.js.map +1 -0
- package/dist/components/{p--zhT6rvJ.js → p-DGaHlr-k.js} +4 -4
- package/dist/components/{p--zhT6rvJ.js.map → p-DGaHlr-k.js.map} +1 -1
- package/dist/components/{p-B5rS_jjI.js → p-DWaTb2EJ.js} +7 -4
- package/dist/components/p-DWaTb2EJ.js.map +1 -0
- package/dist/components/{p-J41B2nOt.js → p-DroQBoSo.js} +3 -3
- package/dist/components/{p-J41B2nOt.js.map → p-DroQBoSo.js.map} +1 -1
- package/dist/components/{p-DQ8MCJFX.js → p-TfYzqGwr.js} +3 -3
- package/dist/components/{p-DQ8MCJFX.js.map → p-TfYzqGwr.js.map} +1 -1
- package/dist/components/{p-DbQ6ZNvh.js → p-vl-J3tKJ.js} +4 -4
- package/dist/components/{p-DbQ6ZNvh.js.map → p-vl-J3tKJ.js.map} +1 -1
- package/dist/components/xplor-alert-message.js +2 -2
- package/dist/components/xplor-avatar-and-name.js +2 -2
- package/dist/components/xplor-avatar.js +1 -1
- package/dist/components/xplor-badge-active.js +1 -1
- package/dist/components/xplor-badge-archived.js +1 -1
- package/dist/components/xplor-badge-deleted.js +1 -1
- package/dist/components/xplor-badge-expired.js +1 -1
- package/dist/components/xplor-badge-inactive.js +1 -1
- package/dist/components/xplor-badge-recalled.js +1 -1
- package/dist/components/xplor-badge-upcoming.js +1 -1
- package/dist/components/xplor-badge-waitlist.js +1 -1
- package/dist/components/xplor-badge.js +1 -1
- package/dist/components/xplor-btn-back-to-parent.js +1 -1
- package/dist/components/xplor-btn-back.js +1 -1
- package/dist/components/xplor-btn-icon.js +1 -1
- package/dist/components/xplor-btn-toggle-group.js +1 -1
- package/dist/components/xplor-btn-toggle-secondary.js +1 -1
- package/dist/components/xplor-btn-toggle.js +1 -1
- package/dist/components/xplor-btn-tooltip.js +3 -3
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-canvas-editor.d.ts +11 -0
- package/dist/components/xplor-canvas-editor.js +370 -0
- package/dist/components/xplor-canvas-editor.js.map +1 -0
- package/dist/components/xplor-chat-widget.js +3 -3
- package/dist/components/xplor-checkbox.js +1 -1
- package/dist/components/xplor-combobox.js +5 -5
- package/dist/components/xplor-datatable.js +2 -2
- package/dist/components/xplor-date-picker.js +5 -5
- package/dist/components/xplor-drag-and-drop-input.js +26 -5
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-file-upload.js +2 -2
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +1 -1
- package/dist/components/xplor-input-search.js +2 -2
- package/dist/components/xplor-input-select.js +2 -2
- package/dist/components/xplor-input-send.js +3 -3
- package/dist/components/xplor-input-text-area.js +2 -2
- package/dist/components/xplor-input-text-secondary.js +2 -2
- package/dist/components/xplor-input-text.js +2 -2
- package/dist/components/xplor-input-title.js +1 -1
- package/dist/components/xplor-links.js +1 -1
- package/dist/components/xplor-modal-persistent.js +2 -2
- package/dist/components/xplor-modal.js +1 -1
- package/dist/components/xplor-nav-tabs.js +2 -2
- package/dist/components/xplor-radio-btn.js +2 -2
- package/dist/components/xplor-rich-text-editor.d.ts +11 -0
- package/dist/components/xplor-rich-text-editor.js +23755 -0
- package/dist/components/xplor-rich-text-editor.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-heading.js +2 -2
- package/dist/components/xplor-table.js +5 -5
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/components/xplor-tooltip.js +1 -1
- package/dist/esm/{index-KRfMjDC2.js → index-QwDfQUbw.js} +32 -7
- package/dist/esm/index-QwDfQUbw.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xplor-alert-dialog_60.entry.js +29396 -0
- package/dist/esm/xplor-alert-dialog_60.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +3 -3
- package/dist/hydrate/index.js +24231 -96
- package/dist/hydrate/index.mjs +24231 -96
- package/dist/types/components/xplor-button/xplor-button.d.ts +2 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.d.ts +63 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.stories.d.ts +84 -0
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +6 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.d.ts +129 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.d.ts +105 -0
- package/dist/types/components.d.ts +286 -0
- package/dist/types/utils/slate-legacy-converter.d.ts +83 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js +2 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js.map +1 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js +3 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.css +1 -1
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +7 -1
- package/components/p-BRWe4TXp.js.map +0 -1
- package/components/p-Bs_ocvfe.js.map +0 -1
- package/dist/cjs/index-BjAapk2n.js.map +0 -1
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js +0 -5395
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +0 -1
- package/dist/components/p-04oMLTZR.js.map +0 -1
- package/dist/components/p-B5rS_jjI.js.map +0 -1
- package/dist/esm/index-KRfMjDC2.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_58.entry.js +0 -5336
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +0 -1
- package/dist/xplor-component-library/p-7ecb45dd.entry.js +0 -2
- package/dist/xplor-component-library/p-7ecb45dd.entry.js.map +0 -1
- package/dist/xplor-component-library/p-KRfMjDC2.js +0 -3
- package/dist/xplor-component-library/p-KRfMjDC2.js.map +0 -1
|
@@ -9,21 +9,25 @@ import { AssistantErrorEvent, AssistantMessageReceivedEvent, AssistantMessageSen
|
|
|
9
9
|
import { AutocompleteItem } from "./components/xplor-autocomplete/xplor-autocomplete";
|
|
10
10
|
import { Booking, BookingItem } from "./components/xplor-badge-session-booking/xplor-badge-session-booking";
|
|
11
11
|
import { MenuOption } from "./components/xplor-btn-menu/xplor-btn-menu";
|
|
12
|
+
import { Shape } from "./components/xplor-canvas-editor/xplor-canvas-editor";
|
|
12
13
|
import { ComboboxItem } from "./components/xplor-combobox/xplor-combobox";
|
|
13
14
|
import { DatatableColumn, DatatablePagination } from "./components/xplor-datatable/xplor-datatable";
|
|
14
15
|
import { UploadedFile } from "./components/xplor-file-upload/xplor-file-upload";
|
|
15
16
|
import { SelectOption } from "./components/xplor-input-select/xplor-input-select";
|
|
16
17
|
import { NavTabItem } from "./components/xplor-nav-tabs/xplor-nav-tabs";
|
|
18
|
+
import { RteChangePayload } from "./components/xplor-rich-text-editor/xplor-rich-text-editor";
|
|
17
19
|
import { TooltipPosition, TooltipTrigger } from "./components/xplor-tooltip/xplor-tooltip";
|
|
18
20
|
export { AssistantErrorEvent, AssistantMessageReceivedEvent, AssistantMessageSentEvent, AssistantSessionEvent } from "./components/xplor-assistant/internal/types";
|
|
19
21
|
export { AutocompleteItem } from "./components/xplor-autocomplete/xplor-autocomplete";
|
|
20
22
|
export { Booking, BookingItem } from "./components/xplor-badge-session-booking/xplor-badge-session-booking";
|
|
21
23
|
export { MenuOption } from "./components/xplor-btn-menu/xplor-btn-menu";
|
|
24
|
+
export { Shape } from "./components/xplor-canvas-editor/xplor-canvas-editor";
|
|
22
25
|
export { ComboboxItem } from "./components/xplor-combobox/xplor-combobox";
|
|
23
26
|
export { DatatableColumn, DatatablePagination } from "./components/xplor-datatable/xplor-datatable";
|
|
24
27
|
export { UploadedFile } from "./components/xplor-file-upload/xplor-file-upload";
|
|
25
28
|
export { SelectOption } from "./components/xplor-input-select/xplor-input-select";
|
|
26
29
|
export { NavTabItem } from "./components/xplor-nav-tabs/xplor-nav-tabs";
|
|
30
|
+
export { RteChangePayload } from "./components/xplor-rich-text-editor/xplor-rich-text-editor";
|
|
27
31
|
export { TooltipPosition, TooltipTrigger } from "./components/xplor-tooltip/xplor-tooltip";
|
|
28
32
|
export namespace Components {
|
|
29
33
|
interface XplorAlertDialog {
|
|
@@ -480,6 +484,11 @@ export namespace Components {
|
|
|
480
484
|
* @default false
|
|
481
485
|
*/
|
|
482
486
|
"disabled": boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Whether the button stretches to full width of its container
|
|
489
|
+
* @default false
|
|
490
|
+
*/
|
|
491
|
+
"fullWidth": boolean;
|
|
483
492
|
/**
|
|
484
493
|
* Icon to display (defaults to plus sign)
|
|
485
494
|
* @default '+'
|
|
@@ -502,6 +511,31 @@ export namespace Components {
|
|
|
502
511
|
*/
|
|
503
512
|
"type": 'minimal' | 'primary' | 'secondary' | 'ghost' | 'disabled' | 'success' | 'text';
|
|
504
513
|
}
|
|
514
|
+
interface XplorCanvasEditor {
|
|
515
|
+
/**
|
|
516
|
+
* Removes all shapes and clears the selection
|
|
517
|
+
*/
|
|
518
|
+
"clearAll": () => Promise<void>;
|
|
519
|
+
/**
|
|
520
|
+
* Returns a shallow copy of all current shapes
|
|
521
|
+
*/
|
|
522
|
+
"getShapes": () => Promise<Shape[]>;
|
|
523
|
+
/**
|
|
524
|
+
* Height of the SVG canvas in pixels
|
|
525
|
+
* @default 500
|
|
526
|
+
*/
|
|
527
|
+
"height": number;
|
|
528
|
+
/**
|
|
529
|
+
* Initially active tool. The consumer can switch tool programmatically by updating this prop; the internal `activeTool` state takes over once the component mounts.
|
|
530
|
+
* @default 'select'
|
|
531
|
+
*/
|
|
532
|
+
"tool": 'select' | 'rect' | 'circle' | 'line';
|
|
533
|
+
/**
|
|
534
|
+
* Width of the SVG canvas in pixels
|
|
535
|
+
* @default 800
|
|
536
|
+
*/
|
|
537
|
+
"width": number;
|
|
538
|
+
}
|
|
505
539
|
interface XplorChatWidget {
|
|
506
540
|
"apiKey": string;
|
|
507
541
|
/**
|
|
@@ -1435,6 +1469,93 @@ export namespace Components {
|
|
|
1435
1469
|
*/
|
|
1436
1470
|
"value": string;
|
|
1437
1471
|
}
|
|
1472
|
+
interface XplorRichTextEditor {
|
|
1473
|
+
/**
|
|
1474
|
+
* Accessible label for the editor region. Used when no `label` prop or `ariaLabelledBy` is provided.
|
|
1475
|
+
* @default ''
|
|
1476
|
+
*/
|
|
1477
|
+
"ariaLabel": string;
|
|
1478
|
+
/**
|
|
1479
|
+
* ID of an external element that labels this editor (aria-labelledby).
|
|
1480
|
+
* @default ''
|
|
1481
|
+
*/
|
|
1482
|
+
"ariaLabelledBy": string;
|
|
1483
|
+
/**
|
|
1484
|
+
* Clears all content from the editor.
|
|
1485
|
+
*/
|
|
1486
|
+
"clearContent": () => Promise<void>;
|
|
1487
|
+
/**
|
|
1488
|
+
* Whether the editor is disabled. Content cannot be edited or interacted with.
|
|
1489
|
+
* @default false
|
|
1490
|
+
*/
|
|
1491
|
+
"disabled": boolean;
|
|
1492
|
+
/**
|
|
1493
|
+
* Validation error message. Turns the editor border red and shows the message below.
|
|
1494
|
+
* @default ''
|
|
1495
|
+
*/
|
|
1496
|
+
"error": string;
|
|
1497
|
+
/**
|
|
1498
|
+
* Programmatically focuses the editor.
|
|
1499
|
+
*/
|
|
1500
|
+
"focusEditor": () => Promise<void>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Returns the current content as an HTML string.
|
|
1503
|
+
*/
|
|
1504
|
+
"getHTMLContent": () => Promise<string>;
|
|
1505
|
+
/**
|
|
1506
|
+
* Returns the current content as plain text (all markup stripped).
|
|
1507
|
+
*/
|
|
1508
|
+
"getText": () => Promise<string>;
|
|
1509
|
+
/**
|
|
1510
|
+
* Helper text shown below the editor when there is no error.
|
|
1511
|
+
* @default ''
|
|
1512
|
+
*/
|
|
1513
|
+
"helperText": string;
|
|
1514
|
+
/**
|
|
1515
|
+
* Visible label above the editor.
|
|
1516
|
+
* @default ''
|
|
1517
|
+
*/
|
|
1518
|
+
"label": string;
|
|
1519
|
+
/**
|
|
1520
|
+
* Stringified Slate 0.42.x document JSON for backwards compatibility. When supplied, this takes precedence over `value` as the initial content.
|
|
1521
|
+
* @default ''
|
|
1522
|
+
*/
|
|
1523
|
+
"legacySlateDocument": string;
|
|
1524
|
+
/**
|
|
1525
|
+
* Maximum character count. When set, a character counter is shown below the editor.
|
|
1526
|
+
* @default undefined
|
|
1527
|
+
*/
|
|
1528
|
+
"maxLength": number | undefined;
|
|
1529
|
+
/**
|
|
1530
|
+
* Placeholder text shown when the editor is empty.
|
|
1531
|
+
* @default 'Start typing…'
|
|
1532
|
+
*/
|
|
1533
|
+
"placeholder": string;
|
|
1534
|
+
/**
|
|
1535
|
+
* Whether the editor is in read-only mode. Content is visible but not editable. The toolbar is hidden in this mode.
|
|
1536
|
+
* @default false
|
|
1537
|
+
*/
|
|
1538
|
+
"readonly": boolean;
|
|
1539
|
+
/**
|
|
1540
|
+
* Marks the field as required. Adds an asterisk to the label.
|
|
1541
|
+
* @default false
|
|
1542
|
+
*/
|
|
1543
|
+
"required": boolean;
|
|
1544
|
+
/**
|
|
1545
|
+
* Replaces the editor content with the provided HTML string.
|
|
1546
|
+
*/
|
|
1547
|
+
"setContent": (html: string) => Promise<void>;
|
|
1548
|
+
/**
|
|
1549
|
+
* Controls which toolbar buttons are rendered. - `full` — All formatting options (default) - `minimal` — Text style buttons only (bold, italic, underline, strike, code) - `none` — No toolbar; editor acts as a plain rich-text input
|
|
1550
|
+
* @default 'full'
|
|
1551
|
+
*/
|
|
1552
|
+
"toolbar": 'full' | 'minimal' | 'none';
|
|
1553
|
+
/**
|
|
1554
|
+
* HTML string content of the editor. Supports two-way binding via xplorChange.
|
|
1555
|
+
* @default ''
|
|
1556
|
+
*/
|
|
1557
|
+
"value": string;
|
|
1558
|
+
}
|
|
1438
1559
|
interface XplorSectionCard {
|
|
1439
1560
|
/**
|
|
1440
1561
|
* @default true
|
|
@@ -1709,6 +1830,10 @@ export interface XplorBtnToggleSecondaryCustomEvent<T> extends CustomEvent<T> {
|
|
|
1709
1830
|
detail: T;
|
|
1710
1831
|
target: HTMLXplorBtnToggleSecondaryElement;
|
|
1711
1832
|
}
|
|
1833
|
+
export interface XplorCanvasEditorCustomEvent<T> extends CustomEvent<T> {
|
|
1834
|
+
detail: T;
|
|
1835
|
+
target: HTMLXplorCanvasEditorElement;
|
|
1836
|
+
}
|
|
1712
1837
|
export interface XplorCheckboxCustomEvent<T> extends CustomEvent<T> {
|
|
1713
1838
|
detail: T;
|
|
1714
1839
|
target: HTMLXplorCheckboxElement;
|
|
@@ -1797,6 +1922,10 @@ export interface XplorRadioBtnCustomEvent<T> extends CustomEvent<T> {
|
|
|
1797
1922
|
detail: T;
|
|
1798
1923
|
target: HTMLXplorRadioBtnElement;
|
|
1799
1924
|
}
|
|
1925
|
+
export interface XplorRichTextEditorCustomEvent<T> extends CustomEvent<T> {
|
|
1926
|
+
detail: T;
|
|
1927
|
+
target: HTMLXplorRichTextEditorElement;
|
|
1928
|
+
}
|
|
1800
1929
|
export interface XplorTableCustomEvent<T> extends CustomEvent<T> {
|
|
1801
1930
|
detail: T;
|
|
1802
1931
|
target: HTMLXplorTableElement;
|
|
@@ -2077,6 +2206,25 @@ declare global {
|
|
|
2077
2206
|
prototype: HTMLXplorButtonElement;
|
|
2078
2207
|
new (): HTMLXplorButtonElement;
|
|
2079
2208
|
};
|
|
2209
|
+
interface HTMLXplorCanvasEditorElementEventMap {
|
|
2210
|
+
"xplorShapeAdd": Shape;
|
|
2211
|
+
"xplorShapeRemove": string;
|
|
2212
|
+
"xplorShapeChange": Shape;
|
|
2213
|
+
}
|
|
2214
|
+
interface HTMLXplorCanvasEditorElement extends Components.XplorCanvasEditor, HTMLStencilElement {
|
|
2215
|
+
addEventListener<K extends keyof HTMLXplorCanvasEditorElementEventMap>(type: K, listener: (this: HTMLXplorCanvasEditorElement, ev: XplorCanvasEditorCustomEvent<HTMLXplorCanvasEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2216
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2217
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2218
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2219
|
+
removeEventListener<K extends keyof HTMLXplorCanvasEditorElementEventMap>(type: K, listener: (this: HTMLXplorCanvasEditorElement, ev: XplorCanvasEditorCustomEvent<HTMLXplorCanvasEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2220
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2221
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2222
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2223
|
+
}
|
|
2224
|
+
var HTMLXplorCanvasEditorElement: {
|
|
2225
|
+
prototype: HTMLXplorCanvasEditorElement;
|
|
2226
|
+
new (): HTMLXplorCanvasEditorElement;
|
|
2227
|
+
};
|
|
2080
2228
|
interface HTMLXplorChatWidgetElement extends Components.XplorChatWidget, HTMLStencilElement {
|
|
2081
2229
|
}
|
|
2082
2230
|
var HTMLXplorChatWidgetElement: {
|
|
@@ -2500,6 +2648,25 @@ declare global {
|
|
|
2500
2648
|
prototype: HTMLXplorRadioBtnElement;
|
|
2501
2649
|
new (): HTMLXplorRadioBtnElement;
|
|
2502
2650
|
};
|
|
2651
|
+
interface HTMLXplorRichTextEditorElementEventMap {
|
|
2652
|
+
"xplorChange": RteChangePayload;
|
|
2653
|
+
"xplorFocus": void;
|
|
2654
|
+
"xplorBlur": void;
|
|
2655
|
+
}
|
|
2656
|
+
interface HTMLXplorRichTextEditorElement extends Components.XplorRichTextEditor, HTMLStencilElement {
|
|
2657
|
+
addEventListener<K extends keyof HTMLXplorRichTextEditorElementEventMap>(type: K, listener: (this: HTMLXplorRichTextEditorElement, ev: XplorRichTextEditorCustomEvent<HTMLXplorRichTextEditorElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2658
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2659
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2660
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2661
|
+
removeEventListener<K extends keyof HTMLXplorRichTextEditorElementEventMap>(type: K, listener: (this: HTMLXplorRichTextEditorElement, ev: XplorRichTextEditorCustomEvent<HTMLXplorRichTextEditorElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2662
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2663
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2664
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2665
|
+
}
|
|
2666
|
+
var HTMLXplorRichTextEditorElement: {
|
|
2667
|
+
prototype: HTMLXplorRichTextEditorElement;
|
|
2668
|
+
new (): HTMLXplorRichTextEditorElement;
|
|
2669
|
+
};
|
|
2503
2670
|
interface HTMLXplorSectionCardElement extends Components.XplorSectionCard, HTMLStencilElement {
|
|
2504
2671
|
}
|
|
2505
2672
|
var HTMLXplorSectionCardElement: {
|
|
@@ -2607,6 +2774,7 @@ declare global {
|
|
|
2607
2774
|
"xplor-btn-toggle-secondary": HTMLXplorBtnToggleSecondaryElement;
|
|
2608
2775
|
"xplor-btn-tooltip": HTMLXplorBtnTooltipElement;
|
|
2609
2776
|
"xplor-button": HTMLXplorButtonElement;
|
|
2777
|
+
"xplor-canvas-editor": HTMLXplorCanvasEditorElement;
|
|
2610
2778
|
"xplor-chat-widget": HTMLXplorChatWidgetElement;
|
|
2611
2779
|
"xplor-checkbox": HTMLXplorCheckboxElement;
|
|
2612
2780
|
"xplor-combobox": HTMLXplorComboboxElement;
|
|
@@ -2633,6 +2801,7 @@ declare global {
|
|
|
2633
2801
|
"xplor-modal-persistent": HTMLXplorModalPersistentElement;
|
|
2634
2802
|
"xplor-nav-tabs": HTMLXplorNavTabsElement;
|
|
2635
2803
|
"xplor-radio-btn": HTMLXplorRadioBtnElement;
|
|
2804
|
+
"xplor-rich-text-editor": HTMLXplorRichTextEditorElement;
|
|
2636
2805
|
"xplor-section-card": HTMLXplorSectionCardElement;
|
|
2637
2806
|
"xplor-section-heading": HTMLXplorSectionHeadingElement;
|
|
2638
2807
|
"xplor-table": HTMLXplorTableElement;
|
|
@@ -3134,6 +3303,11 @@ declare namespace LocalJSX {
|
|
|
3134
3303
|
* @default false
|
|
3135
3304
|
*/
|
|
3136
3305
|
"disabled"?: boolean;
|
|
3306
|
+
/**
|
|
3307
|
+
* Whether the button stretches to full width of its container
|
|
3308
|
+
* @default false
|
|
3309
|
+
*/
|
|
3310
|
+
"fullWidth"?: boolean;
|
|
3137
3311
|
/**
|
|
3138
3312
|
* Icon to display (defaults to plus sign)
|
|
3139
3313
|
* @default '+'
|
|
@@ -3156,6 +3330,35 @@ declare namespace LocalJSX {
|
|
|
3156
3330
|
*/
|
|
3157
3331
|
"type"?: 'minimal' | 'primary' | 'secondary' | 'ghost' | 'disabled' | 'success' | 'text';
|
|
3158
3332
|
}
|
|
3333
|
+
interface XplorCanvasEditor {
|
|
3334
|
+
/**
|
|
3335
|
+
* Height of the SVG canvas in pixels
|
|
3336
|
+
* @default 500
|
|
3337
|
+
*/
|
|
3338
|
+
"height"?: number;
|
|
3339
|
+
/**
|
|
3340
|
+
* Emitted when a new shape is committed to the canvas
|
|
3341
|
+
*/
|
|
3342
|
+
"onXplorShapeAdd"?: (event: XplorCanvasEditorCustomEvent<Shape>) => void;
|
|
3343
|
+
/**
|
|
3344
|
+
* Emitted when a shape's bounds are updated via resize
|
|
3345
|
+
*/
|
|
3346
|
+
"onXplorShapeChange"?: (event: XplorCanvasEditorCustomEvent<Shape>) => void;
|
|
3347
|
+
/**
|
|
3348
|
+
* Emitted when a shape is removed; payload is the shape id
|
|
3349
|
+
*/
|
|
3350
|
+
"onXplorShapeRemove"?: (event: XplorCanvasEditorCustomEvent<string>) => void;
|
|
3351
|
+
/**
|
|
3352
|
+
* Initially active tool. The consumer can switch tool programmatically by updating this prop; the internal `activeTool` state takes over once the component mounts.
|
|
3353
|
+
* @default 'select'
|
|
3354
|
+
*/
|
|
3355
|
+
"tool"?: 'select' | 'rect' | 'circle' | 'line';
|
|
3356
|
+
/**
|
|
3357
|
+
* Width of the SVG canvas in pixels
|
|
3358
|
+
* @default 800
|
|
3359
|
+
*/
|
|
3360
|
+
"width"?: number;
|
|
3361
|
+
}
|
|
3159
3362
|
interface XplorChatWidget {
|
|
3160
3363
|
"apiKey"?: string;
|
|
3161
3364
|
/**
|
|
@@ -4206,6 +4409,85 @@ declare namespace LocalJSX {
|
|
|
4206
4409
|
*/
|
|
4207
4410
|
"value"?: string;
|
|
4208
4411
|
}
|
|
4412
|
+
interface XplorRichTextEditor {
|
|
4413
|
+
/**
|
|
4414
|
+
* Accessible label for the editor region. Used when no `label` prop or `ariaLabelledBy` is provided.
|
|
4415
|
+
* @default ''
|
|
4416
|
+
*/
|
|
4417
|
+
"ariaLabel"?: string;
|
|
4418
|
+
/**
|
|
4419
|
+
* ID of an external element that labels this editor (aria-labelledby).
|
|
4420
|
+
* @default ''
|
|
4421
|
+
*/
|
|
4422
|
+
"ariaLabelledBy"?: string;
|
|
4423
|
+
/**
|
|
4424
|
+
* Whether the editor is disabled. Content cannot be edited or interacted with.
|
|
4425
|
+
* @default false
|
|
4426
|
+
*/
|
|
4427
|
+
"disabled"?: boolean;
|
|
4428
|
+
/**
|
|
4429
|
+
* Validation error message. Turns the editor border red and shows the message below.
|
|
4430
|
+
* @default ''
|
|
4431
|
+
*/
|
|
4432
|
+
"error"?: string;
|
|
4433
|
+
/**
|
|
4434
|
+
* Helper text shown below the editor when there is no error.
|
|
4435
|
+
* @default ''
|
|
4436
|
+
*/
|
|
4437
|
+
"helperText"?: string;
|
|
4438
|
+
/**
|
|
4439
|
+
* Visible label above the editor.
|
|
4440
|
+
* @default ''
|
|
4441
|
+
*/
|
|
4442
|
+
"label"?: string;
|
|
4443
|
+
/**
|
|
4444
|
+
* Stringified Slate 0.42.x document JSON for backwards compatibility. When supplied, this takes precedence over `value` as the initial content.
|
|
4445
|
+
* @default ''
|
|
4446
|
+
*/
|
|
4447
|
+
"legacySlateDocument"?: string;
|
|
4448
|
+
/**
|
|
4449
|
+
* Maximum character count. When set, a character counter is shown below the editor.
|
|
4450
|
+
* @default undefined
|
|
4451
|
+
*/
|
|
4452
|
+
"maxLength"?: number | undefined;
|
|
4453
|
+
/**
|
|
4454
|
+
* Emitted when the editor loses focus.
|
|
4455
|
+
*/
|
|
4456
|
+
"onXplorBlur"?: (event: XplorRichTextEditorCustomEvent<void>) => void;
|
|
4457
|
+
/**
|
|
4458
|
+
* Emitted whenever the content changes. Payload: `{ html: string; text: string; isEmpty: boolean }`
|
|
4459
|
+
*/
|
|
4460
|
+
"onXplorChange"?: (event: XplorRichTextEditorCustomEvent<RteChangePayload>) => void;
|
|
4461
|
+
/**
|
|
4462
|
+
* Emitted when the editor gains focus.
|
|
4463
|
+
*/
|
|
4464
|
+
"onXplorFocus"?: (event: XplorRichTextEditorCustomEvent<void>) => void;
|
|
4465
|
+
/**
|
|
4466
|
+
* Placeholder text shown when the editor is empty.
|
|
4467
|
+
* @default 'Start typing…'
|
|
4468
|
+
*/
|
|
4469
|
+
"placeholder"?: string;
|
|
4470
|
+
/**
|
|
4471
|
+
* Whether the editor is in read-only mode. Content is visible but not editable. The toolbar is hidden in this mode.
|
|
4472
|
+
* @default false
|
|
4473
|
+
*/
|
|
4474
|
+
"readonly"?: boolean;
|
|
4475
|
+
/**
|
|
4476
|
+
* Marks the field as required. Adds an asterisk to the label.
|
|
4477
|
+
* @default false
|
|
4478
|
+
*/
|
|
4479
|
+
"required"?: boolean;
|
|
4480
|
+
/**
|
|
4481
|
+
* Controls which toolbar buttons are rendered. - `full` — All formatting options (default) - `minimal` — Text style buttons only (bold, italic, underline, strike, code) - `none` — No toolbar; editor acts as a plain rich-text input
|
|
4482
|
+
* @default 'full'
|
|
4483
|
+
*/
|
|
4484
|
+
"toolbar"?: 'full' | 'minimal' | 'none';
|
|
4485
|
+
/**
|
|
4486
|
+
* HTML string content of the editor. Supports two-way binding via xplorChange.
|
|
4487
|
+
* @default ''
|
|
4488
|
+
*/
|
|
4489
|
+
"value"?: string;
|
|
4490
|
+
}
|
|
4209
4491
|
interface XplorSectionCard {
|
|
4210
4492
|
/**
|
|
4211
4493
|
* @default true
|
|
@@ -4486,6 +4768,7 @@ declare namespace LocalJSX {
|
|
|
4486
4768
|
"xplor-btn-toggle-secondary": XplorBtnToggleSecondary;
|
|
4487
4769
|
"xplor-btn-tooltip": XplorBtnTooltip;
|
|
4488
4770
|
"xplor-button": XplorButton;
|
|
4771
|
+
"xplor-canvas-editor": XplorCanvasEditor;
|
|
4489
4772
|
"xplor-chat-widget": XplorChatWidget;
|
|
4490
4773
|
"xplor-checkbox": XplorCheckbox;
|
|
4491
4774
|
"xplor-combobox": XplorCombobox;
|
|
@@ -4512,6 +4795,7 @@ declare namespace LocalJSX {
|
|
|
4512
4795
|
"xplor-modal-persistent": XplorModalPersistent;
|
|
4513
4796
|
"xplor-nav-tabs": XplorNavTabs;
|
|
4514
4797
|
"xplor-radio-btn": XplorRadioBtn;
|
|
4798
|
+
"xplor-rich-text-editor": XplorRichTextEditor;
|
|
4515
4799
|
"xplor-section-card": XplorSectionCard;
|
|
4516
4800
|
"xplor-section-heading": XplorSectionHeading;
|
|
4517
4801
|
"xplor-table": XplorTable;
|
|
@@ -4550,6 +4834,7 @@ declare module "@stencil/core" {
|
|
|
4550
4834
|
"xplor-btn-toggle-secondary": LocalJSX.XplorBtnToggleSecondary & JSXBase.HTMLAttributes<HTMLXplorBtnToggleSecondaryElement>;
|
|
4551
4835
|
"xplor-btn-tooltip": LocalJSX.XplorBtnTooltip & JSXBase.HTMLAttributes<HTMLXplorBtnTooltipElement>;
|
|
4552
4836
|
"xplor-button": LocalJSX.XplorButton & JSXBase.HTMLAttributes<HTMLXplorButtonElement>;
|
|
4837
|
+
"xplor-canvas-editor": LocalJSX.XplorCanvasEditor & JSXBase.HTMLAttributes<HTMLXplorCanvasEditorElement>;
|
|
4553
4838
|
"xplor-chat-widget": LocalJSX.XplorChatWidget & JSXBase.HTMLAttributes<HTMLXplorChatWidgetElement>;
|
|
4554
4839
|
"xplor-checkbox": LocalJSX.XplorCheckbox & JSXBase.HTMLAttributes<HTMLXplorCheckboxElement>;
|
|
4555
4840
|
"xplor-combobox": LocalJSX.XplorCombobox & JSXBase.HTMLAttributes<HTMLXplorComboboxElement>;
|
|
@@ -4576,6 +4861,7 @@ declare module "@stencil/core" {
|
|
|
4576
4861
|
"xplor-modal-persistent": LocalJSX.XplorModalPersistent & JSXBase.HTMLAttributes<HTMLXplorModalPersistentElement>;
|
|
4577
4862
|
"xplor-nav-tabs": LocalJSX.XplorNavTabs & JSXBase.HTMLAttributes<HTMLXplorNavTabsElement>;
|
|
4578
4863
|
"xplor-radio-btn": LocalJSX.XplorRadioBtn & JSXBase.HTMLAttributes<HTMLXplorRadioBtnElement>;
|
|
4864
|
+
"xplor-rich-text-editor": LocalJSX.XplorRichTextEditor & JSXBase.HTMLAttributes<HTMLXplorRichTextEditorElement>;
|
|
4579
4865
|
"xplor-section-card": LocalJSX.XplorSectionCard & JSXBase.HTMLAttributes<HTMLXplorSectionCardElement>;
|
|
4580
4866
|
"xplor-section-heading": LocalJSX.XplorSectionHeading & JSXBase.HTMLAttributes<HTMLXplorSectionHeadingElement>;
|
|
4581
4867
|
"xplor-table": LocalJSX.XplorTable & JSXBase.HTMLAttributes<HTMLXplorTableElement>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* slate-legacy-converter.ts
|
|
3
|
+
*
|
|
4
|
+
* Converts old Slate 0.42.x document JSON format into an HTML string.
|
|
5
|
+
* This is the backwards-compatibility layer for the xplor-rich-text-editor component.
|
|
6
|
+
*
|
|
7
|
+
* Old Slate 0.42.x document shape:
|
|
8
|
+
* {
|
|
9
|
+
* document: {
|
|
10
|
+
* nodes: [
|
|
11
|
+
* {
|
|
12
|
+
* object: 'block',
|
|
13
|
+
* type: 'paragraph',
|
|
14
|
+
* nodes: [
|
|
15
|
+
* {
|
|
16
|
+
* object: 'text',
|
|
17
|
+
* text: 'Hello world',
|
|
18
|
+
* marks: [{ type: 'bold' }]
|
|
19
|
+
* }
|
|
20
|
+
* ]
|
|
21
|
+
* }
|
|
22
|
+
* ]
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* No Slate runtime dependency required — this is a pure transformation function.
|
|
27
|
+
*/
|
|
28
|
+
export interface LegacySlateMark {
|
|
29
|
+
type: string;
|
|
30
|
+
data?: Record<string, unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface LegacySlateTextNode {
|
|
33
|
+
object: 'text';
|
|
34
|
+
text: string;
|
|
35
|
+
marks?: LegacySlateMark[];
|
|
36
|
+
leaves?: LegacySlateLeaf[];
|
|
37
|
+
}
|
|
38
|
+
/** Older Slate versions used "leaves" inside text nodes */
|
|
39
|
+
export interface LegacySlateLeaf {
|
|
40
|
+
object?: 'leaf';
|
|
41
|
+
text: string;
|
|
42
|
+
marks?: LegacySlateMark[];
|
|
43
|
+
}
|
|
44
|
+
export interface LegacySlateInlineNode {
|
|
45
|
+
object: 'inline';
|
|
46
|
+
type: string;
|
|
47
|
+
data?: Record<string, unknown>;
|
|
48
|
+
nodes?: LegacySlateChildNode[];
|
|
49
|
+
}
|
|
50
|
+
export interface LegacySlateBlockNode {
|
|
51
|
+
object: 'block';
|
|
52
|
+
type: string;
|
|
53
|
+
data?: Record<string, unknown>;
|
|
54
|
+
nodes?: LegacySlateChildNode[];
|
|
55
|
+
}
|
|
56
|
+
export type LegacySlateChildNode = LegacySlateBlockNode | LegacySlateInlineNode | LegacySlateTextNode;
|
|
57
|
+
export interface LegacySlateDocument {
|
|
58
|
+
object?: 'document';
|
|
59
|
+
nodes?: LegacySlateChildNode[];
|
|
60
|
+
}
|
|
61
|
+
export interface LegacySlateValue {
|
|
62
|
+
document: LegacySlateDocument;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Converts a Slate 0.42.x document value to an HTML string.
|
|
66
|
+
*
|
|
67
|
+
* @param value - The full Slate value object `{ document: { nodes: [...] } }`
|
|
68
|
+
* or just the document object `{ nodes: [...] }` — both are accepted.
|
|
69
|
+
* @returns An HTML string, or an empty string if the input is null / invalid.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* const html = convertLegacySlateToHtml(JSON.parse(savedSlateJson));
|
|
73
|
+
* // '<p>Hello <strong>world</strong></p>'
|
|
74
|
+
*/
|
|
75
|
+
export declare function convertLegacySlateToHtml(value: LegacySlateValue | LegacySlateDocument | null | undefined): string;
|
|
76
|
+
/**
|
|
77
|
+
* Safely parses a JSON string and converts it to HTML.
|
|
78
|
+
* Catches any parse errors and returns an empty string rather than throwing.
|
|
79
|
+
*
|
|
80
|
+
* @param json - A JSON string representing a Slate 0.42.x document
|
|
81
|
+
* @returns An HTML string, or an empty string if parsing fails.
|
|
82
|
+
*/
|
|
83
|
+
export declare function convertLegacySlateJsonToHtml(json: string): string;
|