@sveltia/ui 0.90.0 → 0.92.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/dist/components/bottom-navigation/bottom-navigation.svelte +3 -9
- package/dist/components/bottom-navigation/bottom-navigation.svelte.d.ts +4 -39
- package/dist/components/button/button-group.svelte +2 -4
- package/dist/components/button/button-group.svelte.d.ts +3 -19
- package/dist/components/button/select-button-group.svelte +2 -13
- package/dist/components/button/select-button-group.svelte.d.ts +5 -67
- package/dist/components/calendar/calendar.d.ts +9 -0
- package/dist/components/calendar/calendar.js +43 -0
- package/dist/components/calendar/calendar.svelte +26 -27
- package/dist/components/checkbox/checkbox-group.svelte +2 -8
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +4 -39
- package/dist/components/dialog/alert-dialog.svelte.d.ts +2 -3
- package/dist/components/dialog/confirmation-dialog.svelte.d.ts +2 -3
- package/dist/components/dialog/dialog.svelte +6 -7
- package/dist/components/dialog/dialog.svelte.d.ts +2 -3
- package/dist/components/dialog/prompt-dialog.svelte +2 -2
- package/dist/components/dialog/prompt-dialog.svelte.d.ts +2 -3
- package/dist/components/disclosure/disclosure.svelte +14 -16
- package/dist/components/disclosure/disclosure.svelte.d.ts +4 -38
- package/dist/components/drawer/drawer.svelte +22 -39
- package/dist/components/drawer/drawer.svelte.d.ts +3 -24
- package/dist/components/grid/grid-body.svelte +2 -3
- package/dist/components/grid/grid-body.svelte.d.ts +3 -18
- package/dist/components/grid/grid-cell.svelte +2 -8
- package/dist/components/grid/grid-cell.svelte.d.ts +3 -22
- package/dist/components/grid/grid-col-header.svelte +2 -4
- package/dist/components/grid/grid-col-header.svelte.d.ts +3 -19
- package/dist/components/grid/grid-foot.svelte +4 -9
- package/dist/components/grid/grid-foot.svelte.d.ts +3 -22
- package/dist/components/grid/grid-head.svelte +4 -9
- package/dist/components/grid/grid-head.svelte.d.ts +3 -22
- package/dist/components/grid/grid-row-header.svelte +2 -8
- package/dist/components/grid/grid-row-header.svelte.d.ts +3 -22
- package/dist/components/grid/grid-row.svelte +4 -5
- package/dist/components/grid/grid-row.svelte.d.ts +3 -19
- package/dist/components/grid/grid.d.ts +10 -0
- package/dist/components/grid/grid.js +11 -0
- package/dist/components/grid/grid.svelte +6 -7
- package/dist/components/grid/grid.svelte.d.ts +5 -21
- package/dist/components/listbox/listbox.svelte +34 -15
- package/dist/components/listbox/listbox.svelte.d.ts +5 -69
- package/dist/components/listbox/option-group.svelte +2 -8
- package/dist/components/listbox/option-group.svelte.d.ts +4 -39
- package/dist/components/listbox/option.svelte +2 -1
- package/dist/components/menu/menu-item-group.svelte +2 -6
- package/dist/components/menu/menu-item-group.svelte.d.ts +3 -22
- package/dist/components/menu/menu-item.svelte +5 -1
- package/dist/components/menu/menu.svelte +2 -8
- package/dist/components/menu/menu.svelte.d.ts +4 -39
- package/dist/components/radio/radio-group.svelte +2 -17
- package/dist/components/radio/radio-group.svelte.d.ts +5 -67
- package/dist/components/radio/radio.svelte +19 -22
- package/dist/components/radio/radio.svelte.d.ts +10 -40
- package/dist/components/resizable-pane/resizable-handle.svelte +42 -49
- package/dist/components/resizable-pane/resizable-pane-group.svelte +44 -58
- package/dist/components/resizable-pane/resizable-pane-group.svelte.d.ts +3 -19
- package/dist/components/resizable-pane/resizable-pane.svelte +2 -5
- package/dist/components/resizable-pane/resizable-pane.svelte.d.ts +3 -19
- package/dist/components/resizable-pane/sizing.d.ts +24 -0
- package/dist/components/resizable-pane/sizing.js +83 -0
- package/dist/components/select/combobox.svelte +35 -39
- package/dist/components/select/select-tags.svelte +3 -13
- package/dist/components/select/select-tags.svelte.d.ts +5 -67
- package/dist/components/slider/slider.d.ts +5 -4
- package/dist/components/slider/slider.js +28 -23
- package/dist/components/slider/slider.svelte +64 -62
- package/dist/components/slider/slider.svelte.d.ts +4 -37
- package/dist/components/switch/switch.svelte +2 -13
- package/dist/components/switch/switch.svelte.d.ts +5 -67
- package/dist/components/table/table-body.svelte +2 -4
- package/dist/components/table/table-body.svelte.d.ts +3 -19
- package/dist/components/table/table-cell.svelte +2 -8
- package/dist/components/table/table-cell.svelte.d.ts +3 -22
- package/dist/components/table/table-col-header.svelte +2 -8
- package/dist/components/table/table-col-header.svelte.d.ts +3 -22
- package/dist/components/table/table-foot.svelte +2 -8
- package/dist/components/table/table-foot.svelte.d.ts +3 -22
- package/dist/components/table/table-head.svelte +2 -8
- package/dist/components/table/table-head.svelte.d.ts +3 -22
- package/dist/components/table/table-part.svelte +2 -4
- package/dist/components/table/table-part.svelte.d.ts +3 -19
- package/dist/components/table/table-row-header.svelte +2 -8
- package/dist/components/table/table-row-header.svelte.d.ts +3 -22
- package/dist/components/table/table-row.svelte +2 -8
- package/dist/components/table/table-row.svelte.d.ts +3 -22
- package/dist/components/table/table.svelte +2 -4
- package/dist/components/table/table.svelte.d.ts +3 -19
- package/dist/components/tabs/tab-box.svelte +2 -4
- package/dist/components/tabs/tab-box.svelte.d.ts +3 -19
- package/dist/components/tabs/tab-list.svelte +2 -7
- package/dist/components/tabs/tab-list.svelte.d.ts +4 -37
- package/dist/components/tabs/tab-panel.svelte +2 -8
- package/dist/components/tabs/tab-panel.svelte.d.ts +3 -22
- package/dist/components/tabs/tab-panels.svelte +2 -8
- package/dist/components/tabs/tab-panels.svelte.d.ts +3 -22
- package/dist/components/text-editor/code-editor.js +14 -7
- package/dist/components/text-editor/code-editor.svelte +14 -22
- package/dist/components/text-editor/code-editor.svelte.d.ts +5 -103
- package/dist/components/text-editor/config.d.ts +73 -0
- package/dist/components/text-editor/config.js +110 -0
- package/dist/components/text-editor/constants.d.ts +40 -6
- package/dist/components/text-editor/constants.js +81 -7
- package/dist/components/text-editor/conversion/editor-components.js +4 -4
- package/dist/components/text-editor/conversion/html/components.d.ts +16 -0
- package/dist/components/text-editor/conversion/html/components.js +87 -0
- package/dist/components/text-editor/conversion/html/export.d.ts +10 -0
- package/dist/components/text-editor/conversion/html/export.js +360 -0
- package/dist/components/text-editor/conversion/html/import-rules.d.ts +12 -0
- package/dist/components/text-editor/conversion/html/import-rules.js +234 -0
- package/dist/components/text-editor/conversion/html/index.d.ts +10 -0
- package/dist/components/text-editor/conversion/html/index.js +33 -0
- package/dist/components/text-editor/conversion/html/paragraph.d.ts +1 -0
- package/dist/components/text-editor/conversion/html/paragraph.js +123 -0
- package/dist/components/text-editor/conversion/html/task-list.d.ts +13 -0
- package/dist/components/text-editor/conversion/html/task-list.js +82 -0
- package/dist/components/text-editor/conversion/html/unsupported.d.ts +2 -0
- package/dist/components/text-editor/conversion/html/unsupported.js +122 -0
- package/dist/components/text-editor/conversion/html/utils.d.ts +6 -0
- package/dist/components/text-editor/conversion/html/utils.js +34 -0
- package/dist/components/text-editor/conversion/import.js +33 -27
- package/dist/components/text-editor/conversion/markdown/block-conversion.d.ts +4 -0
- package/dist/components/text-editor/conversion/markdown/block-conversion.js +154 -0
- package/dist/components/text-editor/conversion/markdown/block-structure.d.ts +16 -0
- package/dist/components/text-editor/conversion/markdown/block-structure.js +254 -0
- package/dist/components/text-editor/conversion/markdown/code-blocks.d.ts +57 -0
- package/dist/components/text-editor/conversion/markdown/code-blocks.js +279 -0
- package/dist/components/text-editor/conversion/markdown/code-spans.d.ts +19 -0
- package/dist/components/text-editor/conversion/markdown/code-spans.js +71 -0
- package/dist/components/text-editor/conversion/markdown/formatting.d.ts +22 -0
- package/dist/components/text-editor/conversion/markdown/formatting.js +451 -0
- package/dist/components/text-editor/conversion/markdown/index.d.ts +10 -0
- package/dist/components/text-editor/conversion/markdown/index.js +55 -0
- package/dist/components/text-editor/conversion/markdown/placeholders.d.ts +2 -0
- package/dist/components/text-editor/conversion/markdown/placeholders.js +229 -0
- package/dist/components/text-editor/conversion/markdown/syntax.d.ts +99 -0
- package/dist/components/text-editor/conversion/markdown/syntax.js +206 -0
- package/dist/components/text-editor/conversion/placeholder-chars.d.ts +43 -0
- package/dist/components/text-editor/conversion/placeholder-chars.js +51 -0
- package/dist/components/text-editor/conversion/transformers/block-escape.d.ts +1 -0
- package/dist/components/text-editor/conversion/transformers/block-escape.js +53 -26
- package/dist/components/text-editor/conversion/transformers/code.d.ts +3 -14
- package/dist/components/text-editor/conversion/transformers/code.js +78 -16
- package/dist/components/text-editor/conversion/transformers/formatted-code.js +3 -18
- package/dist/components/text-editor/conversion/transformers/inline-code.js +3 -1
- package/dist/components/text-editor/conversion/transformers/link.js +3 -1
- package/dist/components/text-editor/conversion/transformers/raw-syntax.d.ts +0 -19
- package/dist/components/text-editor/conversion/transformers/raw-syntax.js +22 -93
- package/dist/components/text-editor/conversion/transformers/table.js +57 -16
- package/dist/components/text-editor/conversion/transformers/task-list.d.ts +24 -0
- package/dist/components/text-editor/conversion/transformers/task-list.js +53 -0
- package/dist/components/text-editor/conversion/update.d.ts +19 -2
- package/dist/components/text-editor/conversion/update.js +64 -40
- package/dist/components/text-editor/core.d.ts +12 -51
- package/dist/components/text-editor/core.js +47 -77
- package/dist/components/text-editor/editing/commands.js +9 -18
- package/dist/components/text-editor/editing/guards.d.ts +7 -0
- package/dist/components/text-editor/editing/guards.js +123 -0
- package/dist/components/text-editor/editing/raw-markdown.d.ts +7 -2
- package/dist/components/text-editor/editing/raw-markdown.js +68 -8
- package/dist/components/text-editor/editing/selection.js +6 -2
- package/dist/components/text-editor/lexical-root.svelte +89 -47
- package/dist/components/text-editor/lexical-root.svelte.d.ts +4 -67
- package/dist/components/text-editor/shiki/{facade.d.ts → engine.d.ts} +8 -8
- package/dist/components/text-editor/shiki/{facade.js → engine.js} +53 -156
- package/dist/components/text-editor/shiki/highlighter.js +5 -5
- package/dist/components/text-editor/shiki/lexical.d.ts +6 -0
- package/dist/components/text-editor/shiki/lexical.js +165 -0
- package/dist/components/text-editor/shiki/preload.js +1 -1
- package/dist/components/text-editor/shiki/source-highlight.svelte.d.ts +15 -0
- package/dist/components/text-editor/shiki/source-highlight.svelte.js +120 -0
- package/dist/components/text-editor/shiki/version.d.ts +1 -1
- package/dist/components/text-editor/shiki/version.js +1 -1
- package/dist/components/text-editor/store.svelte.js +65 -16
- package/dist/components/text-editor/text-editor.svelte +57 -146
- package/dist/components/text-editor/text-editor.svelte.d.ts +9 -105
- package/dist/components/text-editor/toolbar/actions.d.ts +25 -0
- package/dist/components/text-editor/toolbar/actions.js +107 -0
- package/dist/components/text-editor/toolbar/align-menu-button.svelte +16 -14
- package/dist/components/text-editor/toolbar/format-text-button.svelte +27 -19
- package/dist/components/text-editor/toolbar/insert-horizontal-rule-button.svelte +23 -23
- package/dist/components/text-editor/toolbar/insert-item-button.svelte +1 -1
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +47 -51
- package/dist/components/text-editor/toolbar/insert-menu-button.svelte +1 -1
- package/dist/components/text-editor/toolbar/insert-table-button.svelte +35 -52
- package/dist/components/text-editor/toolbar/table-action-menu.svelte +19 -17
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte +34 -11
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte.d.ts +0 -8
- package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte +35 -41
- package/dist/components/text-editor/widgets/emoji-autocomplete.svelte +7 -6
- package/dist/components/text-editor/widgets/floating-link-editor.svelte +19 -32
- package/dist/components/text-editor/widgets/table-cell-menu-button.svelte +28 -32
- package/dist/components/text-field/date-time-input.svelte +7 -8
- package/dist/components/text-field/date-time-input.svelte.d.ts +3 -32
- package/dist/components/text-field/number-input.d.ts +0 -2
- package/dist/components/text-field/number-input.js +25 -25
- package/dist/components/text-field/number-input.svelte +18 -9
- package/dist/components/text-field/number-input.svelte.d.ts +1 -1
- package/dist/components/text-field/text-area.d.ts +2 -0
- package/dist/components/text-field/text-area.js +31 -0
- package/dist/components/text-field/text-area.svelte +12 -25
- package/dist/components/text-field/text-area.svelte.d.ts +5 -67
- package/dist/components/toast/toast.svelte +31 -8
- package/dist/components/toast/toast.svelte.d.ts +6 -6
- package/dist/components/toolbar/toolbar.svelte +2 -7
- package/dist/components/toolbar/toolbar.svelte.d.ts +4 -37
- package/dist/components/tree/tree-item.svelte +2 -6
- package/dist/components/tree/tree-item.svelte.d.ts +3 -22
- package/dist/components/tree/tree.svelte +3 -10
- package/dist/components/tree/tree.svelte.d.ts +4 -39
- package/dist/components/util/group.svelte +2 -7
- package/dist/components/util/group.svelte.d.ts +4 -37
- package/dist/components/util/modal.d.ts +9 -0
- package/dist/components/util/modal.js +30 -0
- package/dist/components/util/modal.svelte +16 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/ar.yaml +2 -0
- package/dist/locales/bg.yaml +2 -0
- package/dist/locales/ca.yaml +2 -0
- package/dist/locales/cs.yaml +2 -0
- package/dist/locales/da.yaml +2 -0
- package/dist/locales/de.yaml +2 -0
- package/dist/locales/el.yaml +2 -0
- package/dist/locales/en-CA.yaml +2 -0
- package/dist/locales/en-GB.yaml +2 -0
- package/dist/locales/en-US.yaml +2 -0
- package/dist/locales/en-ZA.yaml +2 -0
- package/dist/locales/es-CO.yaml +2 -0
- package/dist/locales/es-ES.yaml +2 -0
- package/dist/locales/fa.yaml +2 -0
- package/dist/locales/fi.yaml +2 -0
- package/dist/locales/fr.yaml +2 -0
- package/dist/locales/he.yaml +2 -0
- package/dist/locales/hr.yaml +2 -0
- package/dist/locales/hu.yaml +176 -0
- package/dist/locales/it.yaml +2 -0
- package/dist/locales/ja.yaml +2 -0
- package/dist/locales/ko.yaml +2 -0
- package/dist/locales/nl.yaml +2 -0
- package/dist/locales/pl.yaml +2 -0
- package/dist/locales/pt-BR.yaml +2 -0
- package/dist/locales/pt-PT.yaml +2 -0
- package/dist/locales/ru.yaml +2 -0
- package/dist/locales/sk.yaml +2 -0
- package/dist/locales/sv.yaml +2 -0
- package/dist/locales/tr.yaml +2 -0
- package/dist/locales/uk.yaml +2 -0
- package/dist/locales/vi.yaml +2 -0
- package/dist/locales/zh-CN.yaml +2 -0
- package/dist/locales/zh-TW.yaml +2 -0
- package/dist/services/composite-widget.svelte.d.ts +76 -0
- package/dist/services/composite-widget.svelte.js +157 -0
- package/dist/services/focus.d.ts +2 -0
- package/dist/services/focus.js +68 -0
- package/dist/services/group.svelte.d.ts +17 -69
- package/dist/services/group.svelte.js +128 -391
- package/dist/services/label.d.ts +9 -0
- package/dist/services/label.js +22 -0
- package/dist/services/menu.d.ts +8 -0
- package/dist/services/menu.js +237 -0
- package/dist/services/navigation.d.ts +9 -0
- package/dist/services/navigation.js +13 -0
- package/dist/services/number.d.ts +2 -0
- package/dist/services/number.js +27 -0
- package/dist/services/pointer-drag.d.ts +14 -0
- package/dist/services/pointer-drag.js +89 -0
- package/dist/services/popup.svelte.js +123 -103
- package/dist/services/text.d.ts +3 -0
- package/dist/services/text.js +17 -0
- package/dist/services/tree.svelte.d.ts +29 -43
- package/dist/services/tree.svelte.js +58 -105
- package/dist/services/type-ahead.d.ts +10 -1
- package/dist/services/type-ahead.js +56 -34
- package/dist/typedefs.d.ts +108 -6
- package/dist/typedefs.js +63 -6
- package/package.json +5 -5
- package/dist/components/text-editor/conversion/html.d.ts +0 -30
- package/dist/components/text-editor/conversion/html.js +0 -857
- package/dist/components/text-editor/conversion/markdown.d.ts +0 -56
- package/dist/components/text-editor/conversion/markdown.js +0 -949
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte +0 -28
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte.d.ts +0 -37
- package/dist/components/text-editor/toolbar/insert-component.d.ts +0 -3
- package/dist/components/text-editor/toolbar/insert-component.js +0 -37
package/dist/typedefs.js
CHANGED
|
@@ -4,6 +4,29 @@
|
|
|
4
4
|
* @import { LexicalEditor, LexicalNode } from 'lexical';
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {object} ContainerProps
|
|
9
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
10
|
+
* @property {Snippet} [children] Primary slot content.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {object} WidgetStateProps
|
|
15
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
16
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
17
|
+
* attribute.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {object} FormFieldStateProps
|
|
22
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
23
|
+
* `aria-readonly` attribute.
|
|
24
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
25
|
+
* `aria-required` attribute.
|
|
26
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the `aria-invalid`
|
|
27
|
+
* attribute.
|
|
28
|
+
*/
|
|
29
|
+
|
|
7
30
|
/**
|
|
8
31
|
* @typedef {object} ButtonProps
|
|
9
32
|
* @property {HTMLButtonElement} [element] Reference to the `<button>` element.
|
|
@@ -82,11 +105,23 @@
|
|
|
82
105
|
*/
|
|
83
106
|
|
|
84
107
|
/**
|
|
85
|
-
*
|
|
86
|
-
* @
|
|
87
|
-
*
|
|
88
|
-
*
|
|
108
|
+
* Props labelling a modal with a header, like `<Dialog>` and `<Drawer>`.
|
|
109
|
+
* @typedef {object} ModalLabelProps
|
|
110
|
+
* @property {string} [title] Text label displayed on the header. Either this or `ariaLabelledby` is
|
|
111
|
+
* required for the modal to have an accessible name. With a custom `header` snippet, it’s used as
|
|
112
|
+
* the modal’s `aria-label` instead.
|
|
113
|
+
* @property {string} [ariaLabelledby] ID of the element that labels the modal, typically a heading
|
|
89
114
|
* inside a custom `header` snippet. Takes precedence over `title` for the accessible name.
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Props of `<Dialog>`, including those labelling it.
|
|
119
|
+
* @typedef {ModalLabelProps & DialogOwnProps} DialogProps
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Props of `<Dialog>` other than those labelling it; see {@link DialogProps}.
|
|
124
|
+
* @typedef {object} DialogOwnProps
|
|
90
125
|
* @property {'dialog' | 'alertdialog'} [role] The `role` attribute on the `<dialog>` element.
|
|
91
126
|
* @property {'x-small' | 'small' | 'medium' | 'large' | 'x-large'} [size] Width of the dialog.
|
|
92
127
|
* @property {string} [class] The `class` attribute on the `<dialog>` element.
|
|
@@ -182,6 +217,9 @@
|
|
|
182
217
|
* @property {PopupPosition} [position] Where to show the dropdown menu.
|
|
183
218
|
* @property {number} [filterThreshold] Number of items to start showing the filter. Default: `5`.
|
|
184
219
|
* Use `-1` to always hide the filter.
|
|
220
|
+
* @property {boolean} [selectOnTypeAhead] Whether typing on the collapsed, non-editable combobox
|
|
221
|
+
* selects the matching option. If `false`, it opens the dropdown and carries the typed characters
|
|
222
|
+
* over to the filter instead. Default: `true`.
|
|
185
223
|
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
186
224
|
* @property {Snippet} [children] Primary slot content.
|
|
187
225
|
* @property {Snippet} [chevronIcon] Chevron icon slot content.
|
|
@@ -302,12 +340,13 @@
|
|
|
302
340
|
|
|
303
341
|
/**
|
|
304
342
|
* @typedef {'paragraph' | 'heading-1' | 'heading-2' | 'heading-3' | 'heading-4' | 'heading-5' |
|
|
305
|
-
* 'heading-6' | 'bulleted-list' | 'numbered-list' | 'blockquote' | 'code-block'}
|
|
343
|
+
* 'heading-6' | 'bulleted-list' | 'numbered-list' | 'task-list' | 'blockquote' | 'code-block'}
|
|
306
344
|
* TextEditorBlockType
|
|
307
345
|
*/
|
|
308
346
|
|
|
309
347
|
/**
|
|
310
|
-
*
|
|
348
|
+
* Inline text format. `underline` is only available for HTML, as Markdown has no syntax for it.
|
|
349
|
+
* @typedef {'bold' | 'italic' | 'underline' | 'strikethrough' | 'code'} TextEditorFormatType
|
|
311
350
|
*/
|
|
312
351
|
|
|
313
352
|
/**
|
|
@@ -366,6 +405,19 @@
|
|
|
366
405
|
* `false`, it’s kept in a single paragraph without line breaks. Default: `true`.
|
|
367
406
|
*/
|
|
368
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Props shared by `<TextEditor>` and `<CodeEditor>`.
|
|
410
|
+
* @typedef {object} EditorCommonProps
|
|
411
|
+
* @property {boolean} [flex] Make the text input container flexible.
|
|
412
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
413
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the editable text box. Either this
|
|
414
|
+
* or `ariaLabelledby` is required for the editor to have an accessible name.
|
|
415
|
+
* @property {string} [ariaLabelledby] The `aria-labelledby` attribute on the editable text box.
|
|
416
|
+
* @property {string} [ariaDescribedby] The `aria-describedby` attribute on the editable text box.
|
|
417
|
+
* @property {Snippet} [children] Primary slot content. Not rendered, as the editor has no room for
|
|
418
|
+
* it; kept for compatibility.
|
|
419
|
+
*/
|
|
420
|
+
|
|
369
421
|
/**
|
|
370
422
|
* @typedef {object} EmojiEntry
|
|
371
423
|
* @property {string} emoji Emoji character, e.g. `🎉`.
|
|
@@ -495,6 +547,11 @@
|
|
|
495
547
|
* @property {(value: string) => string | undefined} getImportedValue Function to get the
|
|
496
548
|
* {@link TextEditorStore.inputValue} last imported if the given value, exported by the editor, is
|
|
497
549
|
* only that value written in the editor’s own Markdown or HTML style, e.g. `_text_` for `*text*`.
|
|
550
|
+
* @property {(value: string) => void} setExportedValue Function to set
|
|
551
|
+
* {@link TextEditorStore.inputValue} to the value exported from the Lexical editor, without
|
|
552
|
+
* importing it back into the editor, which would reset its nodes and selection.
|
|
553
|
+
* @property {() => void} flushExport Function to export the content of the Lexical editor right
|
|
554
|
+
* away, if it’s scheduled to be exported. The editor root sets this while the editor is there.
|
|
498
555
|
*/
|
|
499
556
|
|
|
500
557
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.92.0",
|
|
4
4
|
"description": "A collection of Svelte components and utilities for building user interfaces.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -76,20 +76,20 @@
|
|
|
76
76
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
77
77
|
"@vitest/browser-playwright": "^5.1.0",
|
|
78
78
|
"@vitest/coverage-v8": "^5.1.0",
|
|
79
|
-
"cspell": "^10.
|
|
79
|
+
"cspell": "^10.5.1",
|
|
80
80
|
"eslint": "^9.39.5",
|
|
81
81
|
"eslint-config-airbnb-extended": "^3.3.0",
|
|
82
82
|
"eslint-config-prettier": "^10.1.8",
|
|
83
83
|
"eslint-plugin-import": "^2.32.0",
|
|
84
|
-
"eslint-plugin-jsdoc": "^65.4.
|
|
84
|
+
"eslint-plugin-jsdoc": "^65.4.7",
|
|
85
85
|
"eslint-plugin-package-json": "^1.14.0",
|
|
86
86
|
"eslint-plugin-svelte": "^3.24.1",
|
|
87
87
|
"globals": "^17.14.0",
|
|
88
88
|
"happy-dom": "^21.0.4",
|
|
89
89
|
"jscpd": "^5.4.3",
|
|
90
90
|
"oxlint": "^1.93.0",
|
|
91
|
-
"playwright": "^1.65.
|
|
92
|
-
"postcss": "^8.5.
|
|
91
|
+
"playwright": "^1.65.1",
|
|
92
|
+
"postcss": "^8.5.33",
|
|
93
93
|
"postcss-html": "^2.0.0",
|
|
94
94
|
"prettier": "^3.10.1",
|
|
95
95
|
"prettier-plugin-svelte": "^4.1.1",
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export function getCodeLanguage(code: Element): string | undefined;
|
|
2
|
-
/**
|
|
3
|
-
* Map of Lexical node classes and functions to export them to clean HTML. A class only takes effect
|
|
4
|
-
* if the node is registered with the editor. Other nodes, including the ones of editor components,
|
|
5
|
-
* are exported with their own `exportDOM` method.
|
|
6
|
-
* @type {DOMExportOutputMap}
|
|
7
|
-
*/
|
|
8
|
-
export const HTML_EXPORT_MAP: DOMExportOutputMap;
|
|
9
|
-
/**
|
|
10
|
-
* Editor components of each editor, used to tell the elements they import, which come with their
|
|
11
|
-
* content, when HTML is imported.
|
|
12
|
-
* @type {WeakMap<LexicalEditor, TextEditorComponent[]>}
|
|
13
|
-
*/
|
|
14
|
-
export const editorComponents: WeakMap<LexicalEditor, TextEditorComponent[]>;
|
|
15
|
-
/**
|
|
16
|
-
* Additional DOM conversions to import HTML. They take priority over Lexical’s own conversions.
|
|
17
|
-
* @type {DOMConversionMap}
|
|
18
|
-
*/
|
|
19
|
-
export const HTML_IMPORT_MAP: DOMConversionMap;
|
|
20
|
-
/**
|
|
21
|
-
* Additional DOM conversions to import HTML with code blocks.
|
|
22
|
-
* @type {DOMConversionMap}
|
|
23
|
-
*/
|
|
24
|
-
export const HTML_CODE_IMPORT_MAP: DOMConversionMap;
|
|
25
|
-
export function findUnsupportedNode(editor: LexicalEditor, dom: Document): Element | Comment | undefined;
|
|
26
|
-
export function exportHtml(editor: LexicalEditor): string;
|
|
27
|
-
import type { DOMExportOutputMap } from 'lexical';
|
|
28
|
-
import type { LexicalEditor } from 'lexical';
|
|
29
|
-
import type { TextEditorComponent } from '../../../typedefs.js';
|
|
30
|
-
import type { DOMConversionMap } from 'lexical';
|