@vonage/vivid 5.14.0 → 5.15.1
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/README.md +1 -1
- package/accordion/definition.cjs +0 -5
- package/accordion/definition.js +0 -5
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +3 -14
- package/accordion-item/definition.cjs +1 -1
- package/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +2 -2
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +2 -6
- package/audio-player/definition.js +2 -6
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +2 -8
- package/banner/definition.cjs +1 -1
- package/banner/definition.js +1 -1
- package/breadcrumb/definition.cjs +0 -1
- package/breadcrumb/definition.js +0 -1
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +0 -1
- package/breadcrumb-item/definition.cjs +1 -1
- package/breadcrumb-item/definition.js +1 -1
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +1 -3
- package/bundled/base-color-picker.cjs +1 -1
- package/bundled/base-color-picker.js +4 -9
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +0 -3
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +1 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +90 -42
- package/bundled/children.js +1 -1
- package/bundled/definition.cjs +1 -1
- package/bundled/definition.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +0 -10
- package/bundled/definition11.cjs +1 -1
- package/bundled/definition11.js +0 -1
- package/bundled/definition12.cjs +2 -2
- package/bundled/definition12.js +1 -2
- package/bundled/definition13.cjs +1 -1
- package/bundled/definition13.js +1 -1
- package/bundled/definition17.cjs +1 -1
- package/bundled/definition17.js +1 -4
- package/bundled/definition18.cjs +1 -1
- package/bundled/definition18.js +6 -18
- package/bundled/definition19.cjs +2 -2
- package/bundled/definition19.js +8 -24
- package/bundled/definition2.cjs +5 -5
- package/bundled/definition2.js +26 -27
- package/bundled/definition20.cjs +1 -1
- package/bundled/definition20.js +1 -1
- package/bundled/definition22.cjs +5 -5
- package/bundled/definition22.js +2 -3
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -2
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +1 -6
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -2
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +2 -5
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +2 -13
- package/bundled/definition9.js +9 -9
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +1 -3
- package/bundled/floating-ui.dom.cjs +1 -1
- package/bundled/floating-ui.dom.js +491 -487
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +9 -18
- package/bundled/key-codes.cjs +1 -1
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +10 -27
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +49 -48
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +1 -4
- package/bundled/normalize.js +2 -2
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +0 -1
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +1 -4
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +1 -1
- package/bundled/slottable-request.js +2 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +2 -2
- package/bundled/time-selection-picker.template.js +3 -6
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +302 -293
- package/button/definition.cjs +1 -1
- package/button/definition.js +1 -1
- package/calendar/definition.cjs +0 -2
- package/calendar/definition.js +1 -3
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -8
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/definition.cjs +1 -2
- package/checkbox/definition.js +1 -2
- package/color-picker/definition.cjs +1 -6
- package/color-picker/definition.js +1 -6
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +2 -7
- package/combobox/definition.cjs +2 -8
- package/combobox/definition.js +2 -8
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +2 -9
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +636 -1045
- package/data-grid/definition.cjs +72 -85
- package/data-grid/definition.js +75 -88
- package/data-grid/index.cjs +2 -2
- package/data-grid/index.js +7 -39
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-range-picker/definition.cjs +1 -3
- package/date-range-picker/definition.js +1 -3
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -5
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/dial-pad/definition.cjs +2 -11
- package/dial-pad/definition.js +3 -12
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +14 -38
- package/dialog/definition.cjs +2 -3
- package/dialog/definition.js +2 -3
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -2
- package/empty-state/definition.js +1 -1
- package/fab/definition.cjs +1 -2
- package/fab/definition.js +1 -2
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -2
- package/file-picker/definition.cjs +2 -5
- package/file-picker/definition.js +3 -6
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -4
- package/icon/definition.cjs +7 -5
- package/icon/definition.js +7 -5
- package/index.cjs +95 -94
- package/index.js +18 -18
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/card/card.d.ts +0 -2
- package/lib/combobox/combobox.d.ts +1 -1
- package/lib/icon/icon.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/menu-item/menu-item.d.ts +0 -1
- package/lib/pagination/pagination.d.ts +0 -3
- package/lib/rich-text-editor/rte/exports.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/keyboard-shortcuts.d.ts +16 -0
- package/lib/rich-text-editor/rte/instance.d.ts +2 -1
- package/lib/select/select.d.ts +2 -2
- package/lib/table/table-head.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +0 -1
- package/lib/text-field/text-field.d.ts +0 -1
- package/locales/de-DE.cjs +95 -95
- package/locales/de-DE.js +95 -95
- package/locales/en-GB.cjs +1 -1
- package/locales/en-GB.js +1 -1
- package/locales/en-US.cjs +95 -95
- package/locales/en-US.js +95 -95
- package/locales/ja-JP.cjs +94 -94
- package/locales/ja-JP.js +94 -94
- package/locales/zh-CN.cjs +94 -94
- package/locales/zh-CN.js +94 -94
- package/menu/definition.cjs +2 -3
- package/menu/definition.js +2 -3
- package/menu-item/definition.cjs +1 -1
- package/menu-item/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/number-field/definition.cjs +2 -2
- package/number-field/definition.js +2 -2
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/package.json +19 -17
- package/pagination/definition.cjs +1 -3
- package/pagination/definition.js +3 -5
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +4 -6
- package/popover/definition.cjs +1 -8
- package/popover/definition.js +1 -8
- package/popover/index.cjs +1 -1
- package/popover/index.js +6 -17
- package/popup/definition.cjs +1 -1
- package/popup/definition.js +1 -1
- package/radio/definition.cjs +1 -5
- package/radio/definition.js +1 -5
- package/radio-group/definition.js +2 -2
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +2 -2
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +177 -63
- package/rich-text-editor/definition.js +177 -64
- package/rich-text-editor/index.cjs +12 -12
- package/rich-text-editor/index.js +1651 -1586
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +2 -5
- package/searchable-select/definition.js +2 -5
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +2 -6
- package/select/definition.cjs +4 -14
- package/select/definition.js +5 -15
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +2 -2
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +2 -2
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +2 -5
- package/simple-color-picker/definition.cjs +18 -9
- package/simple-color-picker/definition.js +19 -10
- package/simple-color-picker/index.cjs +5 -5
- package/simple-color-picker/index.js +23 -23
- package/slider/definition.cjs +1 -6
- package/slider/definition.js +3 -8
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +2 -2
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/status/definition.cjs +9 -3
- package/status/definition.js +11 -5
- package/status/index.cjs +10 -7
- package/status/index.js +46 -39
- package/styles/core/all.css +6 -5
- package/styles/core/theme.css +6 -5
- package/styles/core/typography.css +1 -2
- package/styles/tokens/theme-dark.css +17 -21
- package/styles/tokens/theme-light.css +17 -21
- package/styles/tokens/vivid-2-compat.css +1 -2
- package/switch/definition.cjs +1 -2
- package/switch/definition.js +2 -3
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -2
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +2 -2
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +17 -11
- package/table/definition.js +19 -13
- package/table/index.cjs +18 -14
- package/table/index.js +55 -48
- package/tabs/definition.cjs +0 -2
- package/tabs/definition.js +2 -4
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +0 -2
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +2 -2
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -7
- package/text-area/definition.js +2 -8
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -7
- package/text-field/definition.cjs +0 -10
- package/text-field/definition.js +1 -11
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +2 -2
- package/toggletip/definition.cjs +0 -2
- package/toggletip/definition.js +1 -3
- package/tooltip/definition.cjs +0 -1
- package/tooltip/definition.js +1 -2
- package/tree-view/definition.cjs +0 -16
- package/tree-view/definition.js +1 -17
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +0 -16
- package/unbundled/_commonjsHelpers.cjs +6 -2
- package/unbundled/_commonjsHelpers.js +6 -2
- package/unbundled/anchored.js +1 -1
- package/unbundled/attribute-binding-behaviour.cjs +0 -1
- package/unbundled/attribute-binding-behaviour.js +0 -1
- package/unbundled/base-color-picker.cjs +2 -5
- package/unbundled/base-color-picker.js +2 -5
- package/unbundled/base-progress.cjs +0 -3
- package/unbundled/base-progress.js +0 -3
- package/unbundled/button.cjs +1 -10
- package/unbundled/button.js +1 -10
- package/unbundled/calendar-picker.template.cjs +2 -4
- package/unbundled/calendar-picker.template.js +2 -4
- package/unbundled/data-grid.options.js +1 -1
- package/unbundled/definition.cjs +349 -170
- package/unbundled/definition.js +348 -170
- package/unbundled/definition2.cjs +169 -351
- package/unbundled/definition2.js +169 -350
- package/unbundled/definition3.cjs +1 -2
- package/unbundled/definition3.js +1 -2
- package/unbundled/definition4.cjs +1 -2
- package/unbundled/definition4.js +3 -4
- package/unbundled/definition5.cjs +1 -1
- package/unbundled/definition5.js +2 -2
- package/unbundled/delegates-aria.cjs +1 -1
- package/unbundled/delegates-aria.js +1 -1
- package/unbundled/enums.js +1 -1
- package/unbundled/form-associated.cjs +4 -5
- package/unbundled/form-associated.js +4 -5
- package/unbundled/host-semantics.cjs +1 -0
- package/unbundled/host-semantics.js +2 -1
- package/unbundled/key-codes.js +1 -1
- package/unbundled/listbox.cjs +6 -14
- package/unbundled/listbox.js +6 -14
- package/unbundled/localized.cjs +1 -0
- package/unbundled/localized.js +1 -0
- package/unbundled/mixins.cjs +0 -2
- package/unbundled/mixins.js +2 -4
- package/unbundled/picker-field.template.cjs +1 -2
- package/unbundled/picker-field.template.js +1 -2
- package/unbundled/scrollIntoView.cjs +0 -1
- package/unbundled/scrollIntoView.js +0 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/slottable-request.cjs +3 -2
- package/unbundled/slottable-request.js +3 -2
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +1 -4
- package/unbundled/time-selection-picker.template.js +1 -4
- package/unbundled/vivid-element.cjs +2 -1
- package/unbundled/vivid-element.js +2 -1
- package/video-player/definition.cjs +7953 -7720
- package/video-player/definition.js +7955 -7722
- package/video-player/index.cjs +38 -54
- package/video-player/index.js +12785 -12735
- package/visually-hidden/definition.js +1 -1
- package/vivid.api.json +48 -341
|
@@ -7,16 +7,16 @@ import { dividerDefinition } from '../divider/definition.js';
|
|
|
7
7
|
import { VwcSelectElement as Select, selectDefinition } from '../select/definition.js';
|
|
8
8
|
import { L as ListboxOption, l as listboxOptionDefinition } from '../unbundled/definition3.js';
|
|
9
9
|
import { VwcMenuElement as Menu, menuDefinition } from '../menu/definition.js';
|
|
10
|
-
import {
|
|
10
|
+
import { a as MenuItem, m as menuItemDefinition } from '../unbundled/definition.js';
|
|
11
11
|
import { VwcProgressRingElement as ProgressRing, progressRingDefinition } from '../progress-ring/definition.js';
|
|
12
|
-
import { B as Button, b as buttonDefinition } from '../unbundled/
|
|
12
|
+
import { B as Button, b as buttonDefinition } from '../unbundled/definition2.js';
|
|
13
13
|
import { VwcTooltipElement as Tooltip, tooltipDefinition } from '../tooltip/definition.js';
|
|
14
14
|
import { VwcTextFieldElement as TextField, textFieldDefinition } from '../text-field/definition.js';
|
|
15
15
|
import { D as Divider } from '../unbundled/divider.js';
|
|
16
16
|
import DOMPurify from 'dompurify';
|
|
17
17
|
import { g as generateRandomId } from '../unbundled/mixins.js';
|
|
18
18
|
|
|
19
|
-
const styles = ":host{display:
|
|
19
|
+
const styles = ":host{display:flex;flex-direction:column}.rte{display:flex;flex-direction:column;block-size:100%;min-block-size:0}.editor{display:contents}.editor-viewport{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;contain:layout;min-block-size:0}.editor-scroll-area{--editor-padding-inline: var( --rich-text-editor-padding-inline, 16px );--editor-padding-block: var( --rich-text-editor-padding-block, 8px );display:flex;flex:1;flex-direction:column;background-color:var(--vvd-color-canvas);color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);min-block-size:0;overflow-y:auto;--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}.editor-scroll-area{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}.editor-scroll-area ::-webkit-scrollbar{width:4px}.editor-scroll-area ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}.editor-scroll-area ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-fallback-track-color, var(--scrollbar-thumb-color))}.popovers--disabled>*{display:none!important}";
|
|
20
20
|
|
|
21
21
|
// Recovery values encode a range index and an offset. They are
|
|
22
22
|
// represented as numbers, because tons of them will be created when
|
|
@@ -1895,6 +1895,27 @@ class Transform {
|
|
|
1895
1895
|
return this.steps.length > 0;
|
|
1896
1896
|
}
|
|
1897
1897
|
/**
|
|
1898
|
+
Return a single range, in post-transform document positions,
|
|
1899
|
+
that covers all content changed by this transform. Returns null
|
|
1900
|
+
if no replacements are made. Note that this will ignore changes
|
|
1901
|
+
that add/remove marks without replacing the underlying content.
|
|
1902
|
+
*/
|
|
1903
|
+
changedRange() {
|
|
1904
|
+
let from = 1e9, to = -1e9;
|
|
1905
|
+
for (let i = 0; i < this.mapping.maps.length; i++) {
|
|
1906
|
+
let map = this.mapping.maps[i];
|
|
1907
|
+
if (i) {
|
|
1908
|
+
from = map.map(from, 1);
|
|
1909
|
+
to = map.map(to, -1);
|
|
1910
|
+
}
|
|
1911
|
+
map.forEach((_f, _t, fromB, toB) => {
|
|
1912
|
+
from = Math.min(from, fromB);
|
|
1913
|
+
to = Math.max(to, toB);
|
|
1914
|
+
});
|
|
1915
|
+
}
|
|
1916
|
+
return from == 1e9 ? null : { from, to };
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1898
1919
|
@internal
|
|
1899
1920
|
*/
|
|
1900
1921
|
addStep(step, doc) {
|
|
@@ -3469,17 +3490,20 @@ function findOffsetInNode(node, coords) {
|
|
|
3469
3490
|
}
|
|
3470
3491
|
function findOffsetInText(node, coords) {
|
|
3471
3492
|
let len = node.nodeValue.length;
|
|
3472
|
-
let range = document.createRange();
|
|
3493
|
+
let range = document.createRange(), result;
|
|
3473
3494
|
for (let i = 0; i < len; i++) {
|
|
3474
3495
|
range.setEnd(node, i + 1);
|
|
3475
3496
|
range.setStart(node, i);
|
|
3476
3497
|
let rect = singleRect(range, 1);
|
|
3477
3498
|
if (rect.top == rect.bottom)
|
|
3478
3499
|
continue;
|
|
3479
|
-
if (inRect(coords, rect))
|
|
3480
|
-
|
|
3500
|
+
if (inRect(coords, rect)) {
|
|
3501
|
+
result = { node, offset: i + (coords.left >= (rect.left + rect.right) / 2 ? 1 : 0) };
|
|
3502
|
+
break;
|
|
3503
|
+
}
|
|
3481
3504
|
}
|
|
3482
|
-
|
|
3505
|
+
range.detach();
|
|
3506
|
+
return result || { node, offset: 0 };
|
|
3483
3507
|
}
|
|
3484
3508
|
function inRect(coords, rect) {
|
|
3485
3509
|
return coords.left >= rect.left - 1 && coords.left <= rect.right + 1 &&
|
|
@@ -4475,15 +4499,15 @@ class NodeViewDesc extends ViewDesc {
|
|
|
4475
4499
|
let updater = new ViewTreeUpdater(this, localComposition && localComposition.node, view);
|
|
4476
4500
|
iterDeco(this.node, this.innerDeco, (widget, i, insideNode) => {
|
|
4477
4501
|
if (widget.spec.marks)
|
|
4478
|
-
updater.syncToMarks(widget.spec.marks, inline, view);
|
|
4502
|
+
updater.syncToMarks(widget.spec.marks, inline, view, i);
|
|
4479
4503
|
else if (widget.type.side >= 0 && !insideNode)
|
|
4480
|
-
updater.syncToMarks(i == this.node.childCount ? Mark.none : this.node.child(i).marks, inline, view);
|
|
4504
|
+
updater.syncToMarks(i == this.node.childCount ? Mark.none : this.node.child(i).marks, inline, view, i);
|
|
4481
4505
|
// If the next node is a desc matching this widget, reuse it,
|
|
4482
4506
|
// otherwise insert the widget as a new view desc.
|
|
4483
4507
|
updater.placeWidget(widget, view, off);
|
|
4484
4508
|
}, (child, outerDeco, innerDeco, i) => {
|
|
4485
4509
|
// Make sure the wrapping mark descs match the node's marks.
|
|
4486
|
-
updater.syncToMarks(child.marks, inline, view);
|
|
4510
|
+
updater.syncToMarks(child.marks, inline, view, i);
|
|
4487
4511
|
// Try several strategies for drawing this node
|
|
4488
4512
|
let compIndex;
|
|
4489
4513
|
if (updater.findNodeMatch(child, outerDeco, innerDeco, i)) ;
|
|
@@ -4499,7 +4523,7 @@ class NodeViewDesc extends ViewDesc {
|
|
|
4499
4523
|
off += child.nodeSize;
|
|
4500
4524
|
});
|
|
4501
4525
|
// Drop all remaining descs after the current position.
|
|
4502
|
-
updater.syncToMarks([], inline, view);
|
|
4526
|
+
updater.syncToMarks([], inline, view, 0);
|
|
4503
4527
|
if (this.node.isTextblock)
|
|
4504
4528
|
updater.addTextblockHacks();
|
|
4505
4529
|
updater.destroyRest();
|
|
@@ -4889,7 +4913,7 @@ class ViewTreeUpdater {
|
|
|
4889
4913
|
}
|
|
4890
4914
|
// Sync the current stack of mark descs with the given array of
|
|
4891
4915
|
// marks, reusing existing mark descs when possible.
|
|
4892
|
-
syncToMarks(marks, inline, view) {
|
|
4916
|
+
syncToMarks(marks, inline, view, parentIndex) {
|
|
4893
4917
|
let keep = 0, depth = this.stack.length >> 1;
|
|
4894
4918
|
let maxKeep = Math.min(depth, marks.length);
|
|
4895
4919
|
while (keep < maxKeep &&
|
|
@@ -4905,8 +4929,10 @@ class ViewTreeUpdater {
|
|
|
4905
4929
|
}
|
|
4906
4930
|
while (depth < marks.length) {
|
|
4907
4931
|
this.stack.push(this.top, this.index + 1);
|
|
4908
|
-
let found = -1;
|
|
4909
|
-
|
|
4932
|
+
let found = -1, scanTo = this.top.children.length;
|
|
4933
|
+
if (parentIndex < this.preMatch.index)
|
|
4934
|
+
scanTo = Math.min(this.index + 3, scanTo);
|
|
4935
|
+
for (let i = this.index; i < scanTo; i++) {
|
|
4910
4936
|
let next = this.top.children[i];
|
|
4911
4937
|
if (next.matchesMark(marks[depth]) && !this.isLocked(next.dom)) {
|
|
4912
4938
|
found = i;
|
|
@@ -5102,9 +5128,7 @@ class ViewTreeUpdater {
|
|
|
5102
5128
|
}
|
|
5103
5129
|
// Iterate from the end of the fragment and array of descs to find
|
|
5104
5130
|
// directly matching ones, in order to avoid overeagerly reusing those
|
|
5105
|
-
// for other nodes.
|
|
5106
|
-
// is part of the sequence of matched nodes at the end of the
|
|
5107
|
-
// fragment.
|
|
5131
|
+
// for other nodes.
|
|
5108
5132
|
function preMatch(frag, parentDesc) {
|
|
5109
5133
|
let curDesc = parentDesc, descI = curDesc.children.length;
|
|
5110
5134
|
let fI = frag.childCount, matched = new Map, matches = [];
|
|
@@ -5127,7 +5151,6 @@ function preMatch(frag, parentDesc) {
|
|
|
5127
5151
|
break outer;
|
|
5128
5152
|
}
|
|
5129
5153
|
else {
|
|
5130
|
-
// FIXME
|
|
5131
5154
|
descI = curDesc.parent.children.indexOf(curDesc);
|
|
5132
5155
|
curDesc = curDesc.parent;
|
|
5133
5156
|
}
|
|
@@ -6174,6 +6197,7 @@ class InputState {
|
|
|
6174
6197
|
this.compositionNodes = [];
|
|
6175
6198
|
this.compositionEndedAt = -2e8;
|
|
6176
6199
|
this.compositionID = 1;
|
|
6200
|
+
this.badSafariComposition = false;
|
|
6177
6201
|
// Set to a composition ID when there are pending changes at compositionend
|
|
6178
6202
|
this.compositionPendingChanges = 0;
|
|
6179
6203
|
this.domChangeCount = 0;
|
|
@@ -6572,7 +6596,8 @@ editHandlers.compositionstart = editHandlers.compositionupdate = view => {
|
|
|
6572
6596
|
let { state } = view, $pos = state.selection.$to;
|
|
6573
6597
|
if (state.selection instanceof TextSelection &&
|
|
6574
6598
|
(state.storedMarks ||
|
|
6575
|
-
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false))
|
|
6599
|
+
(!$pos.textOffset && $pos.parentOffset && $pos.nodeBefore.marks.some(m => m.type.spec.inclusive === false)) ||
|
|
6600
|
+
chrome && windows$1 && selectionBeforeUneditable(view))) { // Issue #1500
|
|
6576
6601
|
// Need to wrap the cursor in mark nodes different from the ones in the DOM context
|
|
6577
6602
|
view.markCursor = view.state.storedMarks || $pos.marks();
|
|
6578
6603
|
endComposition(view, true);
|
|
@@ -6606,13 +6631,22 @@ editHandlers.compositionstart = editHandlers.compositionupdate = view => {
|
|
|
6606
6631
|
}
|
|
6607
6632
|
scheduleComposeEnd(view, timeoutComposition);
|
|
6608
6633
|
};
|
|
6634
|
+
function selectionBeforeUneditable(view) {
|
|
6635
|
+
let { focusNode, focusOffset } = view.domSelectionRange();
|
|
6636
|
+
if (!focusNode || focusNode.nodeType != 1 || focusOffset >= focusNode.childNodes.length)
|
|
6637
|
+
return false;
|
|
6638
|
+
let next = focusNode.childNodes[focusOffset];
|
|
6639
|
+
return next.nodeType == 1 && next.contentEditable == "false";
|
|
6640
|
+
}
|
|
6609
6641
|
editHandlers.compositionend = (view, event) => {
|
|
6610
6642
|
if (view.composing) {
|
|
6611
6643
|
view.input.composing = false;
|
|
6612
6644
|
view.input.compositionEndedAt = event.timeStamp;
|
|
6613
6645
|
view.input.compositionPendingChanges = view.domObserver.pendingRecords().length ? view.input.compositionID : 0;
|
|
6614
6646
|
view.input.compositionNode = null;
|
|
6615
|
-
if (view.input.
|
|
6647
|
+
if (view.input.badSafariComposition)
|
|
6648
|
+
view.domObserver.forceFlush();
|
|
6649
|
+
else if (view.input.compositionPendingChanges)
|
|
6616
6650
|
Promise.resolve().then(() => view.domObserver.flush());
|
|
6617
6651
|
view.input.compositionID++;
|
|
6618
6652
|
scheduleComposeEnd(view, 20);
|
|
@@ -6833,10 +6867,15 @@ handlers.dragend = view => {
|
|
|
6833
6867
|
}, 50);
|
|
6834
6868
|
};
|
|
6835
6869
|
editHandlers.dragover = editHandlers.dragenter = (_, e) => e.preventDefault();
|
|
6836
|
-
editHandlers.drop = (view,
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6870
|
+
editHandlers.drop = (view, event) => {
|
|
6871
|
+
try {
|
|
6872
|
+
handleDrop(view, event, view.dragging);
|
|
6873
|
+
}
|
|
6874
|
+
finally {
|
|
6875
|
+
view.dragging = null;
|
|
6876
|
+
}
|
|
6877
|
+
};
|
|
6878
|
+
function handleDrop(view, event, dragging) {
|
|
6840
6879
|
if (!event.dataTransfer)
|
|
6841
6880
|
return;
|
|
6842
6881
|
let eventPos = view.posAtCoords(eventCoords(event));
|
|
@@ -6890,7 +6929,7 @@ editHandlers.drop = (view, _event) => {
|
|
|
6890
6929
|
}
|
|
6891
6930
|
view.focus();
|
|
6892
6931
|
view.dispatch(tr.setMeta("uiEvent", "drop"));
|
|
6893
|
-
}
|
|
6932
|
+
}
|
|
6894
6933
|
handlers.focus = view => {
|
|
6895
6934
|
view.input.lastFocus = Date.now();
|
|
6896
6935
|
if (!view.focused) {
|
|
@@ -7670,15 +7709,24 @@ class DOMObserver {
|
|
|
7670
7709
|
new window.MutationObserver(mutations => {
|
|
7671
7710
|
for (let i = 0; i < mutations.length; i++)
|
|
7672
7711
|
this.queue.push(mutations[i]);
|
|
7673
|
-
// IE11 will sometimes (on backspacing out a single character
|
|
7674
|
-
// text node after a BR node) call the observer callback
|
|
7675
|
-
// before actually updating the DOM, which will cause
|
|
7676
|
-
// ProseMirror to miss the change (see #930)
|
|
7677
7712
|
if (ie$1 && ie_version <= 11 && mutations.some(m => m.type == "childList" && m.removedNodes.length ||
|
|
7678
|
-
m.type == "characterData" && m.oldValue.length > m.target.nodeValue.length))
|
|
7713
|
+
m.type == "characterData" && m.oldValue.length > m.target.nodeValue.length)) {
|
|
7714
|
+
// IE11 will sometimes (on backspacing out a single character
|
|
7715
|
+
// text node after a BR node) call the observer callback
|
|
7716
|
+
// before actually updating the DOM, which will cause
|
|
7717
|
+
// ProseMirror to miss the change (see #930)
|
|
7679
7718
|
this.flushSoon();
|
|
7680
|
-
|
|
7719
|
+
}
|
|
7720
|
+
else if (safari && view.composing && mutations.some(m => m.type == "childList" && m.target.nodeName == "TR")) {
|
|
7721
|
+
// Safari does weird stuff when finishing a composition in a
|
|
7722
|
+
// table cell, which tends to involve inserting inappropriate
|
|
7723
|
+
// nodes in the table row.
|
|
7724
|
+
view.input.badSafariComposition = true;
|
|
7725
|
+
this.flushSoon();
|
|
7726
|
+
}
|
|
7727
|
+
else {
|
|
7681
7728
|
this.flush();
|
|
7729
|
+
}
|
|
7682
7730
|
});
|
|
7683
7731
|
if (useCharData) {
|
|
7684
7732
|
this.onCharData = e => {
|
|
@@ -7798,7 +7846,17 @@ class DOMObserver {
|
|
|
7798
7846
|
}
|
|
7799
7847
|
}
|
|
7800
7848
|
}
|
|
7801
|
-
if (
|
|
7849
|
+
if (added.some(n => n.nodeName == "BR") && (view.input.lastKeyCode == 8 || view.input.lastKeyCode == 46)) {
|
|
7850
|
+
// Browsers sometimes insert a bogus break node if you
|
|
7851
|
+
// backspace out the last bit of text before an inline-flex node (#1552)
|
|
7852
|
+
for (let node of added)
|
|
7853
|
+
if (node.nodeName == "BR" && node.parentNode) {
|
|
7854
|
+
let after = node.nextSibling;
|
|
7855
|
+
if (after && after.nodeType == 1 && after.contentEditable == "false")
|
|
7856
|
+
node.parentNode.removeChild(node);
|
|
7857
|
+
}
|
|
7858
|
+
}
|
|
7859
|
+
else if (gecko && added.length) {
|
|
7802
7860
|
let brs = added.filter(n => n.nodeName == "BR");
|
|
7803
7861
|
if (brs.length == 2) {
|
|
7804
7862
|
let [a, b] = brs;
|
|
@@ -7834,6 +7892,10 @@ class DOMObserver {
|
|
|
7834
7892
|
view.docView.markDirty(from, to);
|
|
7835
7893
|
checkCSS(view);
|
|
7836
7894
|
}
|
|
7895
|
+
if (view.input.badSafariComposition) {
|
|
7896
|
+
view.input.badSafariComposition = false;
|
|
7897
|
+
fixUpBadSafariComposition(view, added);
|
|
7898
|
+
}
|
|
7837
7899
|
this.handleDOMChange(from, to, typeOver, added);
|
|
7838
7900
|
if (view.docView && view.docView.dirty)
|
|
7839
7901
|
view.updateState(view.state);
|
|
@@ -7957,6 +8019,37 @@ function blockParent(view, node) {
|
|
|
7957
8019
|
}
|
|
7958
8020
|
return null;
|
|
7959
8021
|
}
|
|
8022
|
+
// Kludge for a Safari bug where, on ending a composition in an
|
|
8023
|
+
// otherwise empty table cell, it randomly moves the composed text
|
|
8024
|
+
// into the table row around that cell, greatly confusing everything
|
|
8025
|
+
// (#188).
|
|
8026
|
+
function fixUpBadSafariComposition(view, addedNodes) {
|
|
8027
|
+
var _a;
|
|
8028
|
+
let { focusNode, focusOffset } = view.domSelectionRange();
|
|
8029
|
+
for (let node of addedNodes) {
|
|
8030
|
+
if (((_a = node.parentNode) === null || _a === void 0 ? void 0 : _a.nodeName) == "TR") {
|
|
8031
|
+
let nextCell = node.nextSibling;
|
|
8032
|
+
while (nextCell && (nextCell.nodeName != "TD" && nextCell.nodeName != "TH"))
|
|
8033
|
+
nextCell = nextCell.nextSibling;
|
|
8034
|
+
if (nextCell) {
|
|
8035
|
+
let parent = nextCell;
|
|
8036
|
+
for (;;) {
|
|
8037
|
+
let first = parent.firstChild;
|
|
8038
|
+
if (!first || first.nodeType != 1 || first.contentEditable == "false" ||
|
|
8039
|
+
/^(BR|IMG)$/.test(first.nodeName))
|
|
8040
|
+
break;
|
|
8041
|
+
parent = first;
|
|
8042
|
+
}
|
|
8043
|
+
parent.insertBefore(node, parent.firstChild);
|
|
8044
|
+
if (focusNode == node)
|
|
8045
|
+
view.domSelection().collapse(node, focusOffset);
|
|
8046
|
+
}
|
|
8047
|
+
else {
|
|
8048
|
+
node.parentNode.removeChild(node);
|
|
8049
|
+
}
|
|
8050
|
+
}
|
|
8051
|
+
}
|
|
8052
|
+
}
|
|
7960
8053
|
|
|
7961
8054
|
// Note that all referencing and parsing is done with the
|
|
7962
8055
|
// start-of-operation selection and document, since that's the one
|
|
@@ -8520,7 +8613,7 @@ class EditorView {
|
|
|
8520
8613
|
this.docView.destroy();
|
|
8521
8614
|
this.docView = docViewDesc(state.doc, outerDeco, innerDeco, this.dom, this);
|
|
8522
8615
|
}
|
|
8523
|
-
if (chromeKludge && !this.trackWrites)
|
|
8616
|
+
if (chromeKludge && (!this.trackWrites || !this.dom.contains(this.trackWrites)))
|
|
8524
8617
|
forceSelUpdate = true;
|
|
8525
8618
|
}
|
|
8526
8619
|
// Work around for an issue where an update arriving right between
|
|
@@ -8971,11 +9064,9 @@ const convertToView = (doc, ctx) => {
|
|
|
8971
9064
|
const attrsA = a.attrs;
|
|
8972
9065
|
const attrsB = b.attrs;
|
|
8973
9066
|
if (attrsA === attrsB) return true;
|
|
8974
|
-
/* v8 ignore next -- not currently reachable since all attrs are required @preserve */
|
|
8975
9067
|
if (!attrsA || !attrsB) return false;
|
|
8976
9068
|
const keysA = Object.keys(attrsA);
|
|
8977
9069
|
const keysB = Object.keys(attrsB);
|
|
8978
|
-
/* v8 ignore next -- not currently reachable since all attrs are required @preserve */
|
|
8979
9070
|
if (keysA.length !== keysB.length) return false;
|
|
8980
9071
|
for (const key of keysA) {
|
|
8981
9072
|
if (attrsA[key] !== attrsB[key]) return false;
|
|
@@ -10347,10 +10438,8 @@ function drawGapCursor(state) {
|
|
|
10347
10438
|
function defaultTextblockForMatch(match) {
|
|
10348
10439
|
for (let i = 0; i < match.edgeCount; i++) {
|
|
10349
10440
|
const { type } = match.edge(i);
|
|
10350
|
-
/* v8 ignore if -- @preserve It's currently not possible to exercise this code in our RTE */
|
|
10351
10441
|
if (type.isTextblock && !type.hasRequiredAttrs()) return type;
|
|
10352
10442
|
}
|
|
10353
|
-
/* v8 ignore next 1 -- @preserve*/
|
|
10354
10443
|
throw new Error("No default textblock found.");
|
|
10355
10444
|
}
|
|
10356
10445
|
|
|
@@ -11500,6 +11589,22 @@ class RteCoreImpl extends RteFeatureImpl {
|
|
|
11500
11589
|
];
|
|
11501
11590
|
}
|
|
11502
11591
|
getPlugins(rte) {
|
|
11592
|
+
const enterKeyChainCommands = chainCommands(
|
|
11593
|
+
newlineInCode,
|
|
11594
|
+
createParagraphNear,
|
|
11595
|
+
liftEmptyBlock,
|
|
11596
|
+
splitBlockAs((node, atEnd, $from) => {
|
|
11597
|
+
if (!atEnd) {
|
|
11598
|
+
return { type: node.type, attrs: node.attrs };
|
|
11599
|
+
}
|
|
11600
|
+
return {
|
|
11601
|
+
type: defaultTextblockForMatch(
|
|
11602
|
+
$from.node($from.depth - 1).contentMatchAt($from.indexAfter($from.depth - 1))
|
|
11603
|
+
),
|
|
11604
|
+
attrs: rte.textblockAttrs.extractFromNode(node)
|
|
11605
|
+
};
|
|
11606
|
+
})
|
|
11607
|
+
);
|
|
11503
11608
|
return [
|
|
11504
11609
|
this.contribution(this.disabled.plugin),
|
|
11505
11610
|
this.contribution(
|
|
@@ -11536,22 +11641,8 @@ class RteCoreImpl extends RteFeatureImpl {
|
|
|
11536
11641
|
this.contribution(
|
|
11537
11642
|
keymap({
|
|
11538
11643
|
...baseKeymap,
|
|
11539
|
-
Enter:
|
|
11540
|
-
|
|
11541
|
-
createParagraphNear,
|
|
11542
|
-
liftEmptyBlock,
|
|
11543
|
-
splitBlockAs((node, atEnd, $from) => {
|
|
11544
|
-
if (!atEnd) {
|
|
11545
|
-
return { type: node.type, attrs: node.attrs };
|
|
11546
|
-
}
|
|
11547
|
-
return {
|
|
11548
|
-
type: defaultTextblockForMatch(
|
|
11549
|
-
$from.node($from.depth - 1).contentMatchAt($from.indexAfter($from.depth - 1))
|
|
11550
|
-
),
|
|
11551
|
-
attrs: rte.textblockAttrs.extractFromNode(node)
|
|
11552
|
-
};
|
|
11553
|
-
})
|
|
11554
|
-
)
|
|
11644
|
+
Enter: enterKeyChainCommands,
|
|
11645
|
+
"Shift-Enter": enterKeyChainCommands
|
|
11555
11646
|
})
|
|
11556
11647
|
),
|
|
11557
11648
|
this.contribution(dropCursor()),
|
|
@@ -11586,7 +11677,6 @@ const sanitizeLinkHref = (url) => {
|
|
|
11586
11677
|
RETURN_DOM: true,
|
|
11587
11678
|
...domPurifyConfig
|
|
11588
11679
|
}).querySelector("a");
|
|
11589
|
-
/* v8 ignore next -- since href is already validated it's probably always present @preserve */
|
|
11590
11680
|
return sanitizedAnchor.getAttribute("href") ?? "";
|
|
11591
11681
|
};
|
|
11592
11682
|
const sanitizeImageSrc = (url) => {
|
|
@@ -11765,7 +11855,7 @@ class RteInstance {
|
|
|
11765
11855
|
this.feature = (Feature, featureId) => {
|
|
11766
11856
|
return this[impl].getPublicInterface(Feature, featureId);
|
|
11767
11857
|
};
|
|
11768
|
-
this[impl] = new RteInstanceImpl(config, options);
|
|
11858
|
+
this[impl] = new RteInstanceImpl(this, config, options);
|
|
11769
11859
|
}
|
|
11770
11860
|
/**
|
|
11771
11861
|
* Returns the current document state.
|
|
@@ -11821,7 +11911,7 @@ class RteInstance {
|
|
|
11821
11911
|
}
|
|
11822
11912
|
}
|
|
11823
11913
|
class RteInstanceImpl {
|
|
11824
|
-
constructor(configFacade, options) {
|
|
11914
|
+
constructor(instanceFacade, configFacade, options) {
|
|
11825
11915
|
this.options = options;
|
|
11826
11916
|
this.view = null;
|
|
11827
11917
|
this.dispatchTransaction = (tr) => {
|
|
@@ -11833,6 +11923,7 @@ class RteInstanceImpl {
|
|
|
11833
11923
|
}
|
|
11834
11924
|
return this.state;
|
|
11835
11925
|
};
|
|
11926
|
+
this.facade = instanceFacade;
|
|
11836
11927
|
const config = configFacade[impl];
|
|
11837
11928
|
this.config = config;
|
|
11838
11929
|
this.schema = config.schema;
|
|
@@ -12748,12 +12839,12 @@ class RteHardBreakFeatureImpl extends RteFeatureImpl {
|
|
|
12748
12839
|
const keyBindings = {
|
|
12749
12840
|
"Shift-Enter": forceBreak
|
|
12750
12841
|
};
|
|
12751
|
-
return [this.contribution(keymap(keyBindings))];
|
|
12842
|
+
return [this.contribution(keymap(keyBindings), contributionPriority.high)];
|
|
12752
12843
|
}
|
|
12753
12844
|
}
|
|
12754
12845
|
const RteHardBreakFeature = featureFacade(RteHardBreakFeatureImpl);
|
|
12755
12846
|
|
|
12756
|
-
const mixedFontSize = Symbol("mixedFontSize");
|
|
12847
|
+
const mixedFontSize = /* @__PURE__ */ Symbol("mixedFontSize");
|
|
12757
12848
|
class RteFontSizePickerFeatureImpl extends RteFeatureImpl {
|
|
12758
12849
|
constructor(config) {
|
|
12759
12850
|
super();
|
|
@@ -13413,7 +13504,7 @@ function markApplies(doc, ranges, type) {
|
|
|
13413
13504
|
}
|
|
13414
13505
|
return false;
|
|
13415
13506
|
}
|
|
13416
|
-
const mixedColor = Symbol("mixedColor");
|
|
13507
|
+
const mixedColor = /* @__PURE__ */ Symbol("mixedColor");
|
|
13417
13508
|
class RteTextColorPickerFeatureImpl extends RteFeatureImpl {
|
|
13418
13509
|
constructor(config) {
|
|
13419
13510
|
super();
|
|
@@ -14309,7 +14400,7 @@ class RteLinkFeatureImpl extends RteFeatureImpl {
|
|
|
14309
14400
|
try {
|
|
14310
14401
|
new URL(url);
|
|
14311
14402
|
return true;
|
|
14312
|
-
} catch
|
|
14403
|
+
} catch {
|
|
14313
14404
|
return false;
|
|
14314
14405
|
}
|
|
14315
14406
|
};
|
|
@@ -14648,7 +14739,6 @@ class RteInlineImageFeatureImpl extends RteFeatureImpl {
|
|
|
14648
14739
|
new Plugin({
|
|
14649
14740
|
props: {
|
|
14650
14741
|
nodeViews: {
|
|
14651
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
14652
14742
|
inlineImage: (node, view, getPos) => new InlineImageView(node, view, getPos, this.config)
|
|
14653
14743
|
}
|
|
14654
14744
|
},
|
|
@@ -15175,6 +15265,31 @@ class RteInputRuleFeatureImpl extends RteFeatureImpl {
|
|
|
15175
15265
|
}
|
|
15176
15266
|
const RteInputRuleFeature = featureFacade(RteInputRuleFeatureImpl);
|
|
15177
15267
|
|
|
15268
|
+
function toCommand(handler, rteInstance) {
|
|
15269
|
+
if (handler.length === 0) {
|
|
15270
|
+
return (_state, _dispatch) => handler();
|
|
15271
|
+
}
|
|
15272
|
+
return (_state, _dispatch) => handler(rteInstance);
|
|
15273
|
+
}
|
|
15274
|
+
class RteKeyboardShortcutsFeatureImpl extends RteFeatureImpl {
|
|
15275
|
+
constructor(featureId, options) {
|
|
15276
|
+
super();
|
|
15277
|
+
this.featureId = featureId;
|
|
15278
|
+
this.options = options;
|
|
15279
|
+
this.name = `RteKeyboardShortcutsFeature[${featureId}]`;
|
|
15280
|
+
}
|
|
15281
|
+
getPlugins(rte) {
|
|
15282
|
+
const bindings = {};
|
|
15283
|
+
for (const [key, handler] of Object.entries(this.options.shortcuts)) {
|
|
15284
|
+
bindings[key] = toCommand(handler, rte.facade);
|
|
15285
|
+
}
|
|
15286
|
+
return [this.contribution(keymap(bindings), contributionPriority.high)];
|
|
15287
|
+
}
|
|
15288
|
+
}
|
|
15289
|
+
const RteKeyboardShortcutsFeature = featureFacade(
|
|
15290
|
+
RteKeyboardShortcutsFeatureImpl
|
|
15291
|
+
);
|
|
15292
|
+
|
|
15178
15293
|
const suggestCss = ".suggest-popover{display:flex;flex-direction:column;padding:4px;gap:2px;max-block-size:408px;max-inline-size:248px;min-inline-size:128px}.suggest-loading-widget{display:inline-flex;align-items:center;margin-inline-start:2px;vertical-align:middle;white-space:normal}.suggest-empty-message{display:flex;align-items:center;justify-content:center;color:var(--vvd-color-neutral-300);font:var(--vvd-typography-base);min-block-size:40px;text-align:center}.suggest-item--visible-focus{box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent}";
|
|
15179
15294
|
|
|
15180
15295
|
const isPopoverOpen = (state) => Boolean(state?.suggestions && !state.dismissed);
|
|
@@ -15294,7 +15409,6 @@ class RteSuggestFeatureImpl extends RteFeatureImpl {
|
|
|
15294
15409
|
loadingDecoration: loadingDecoration(false)
|
|
15295
15410
|
};
|
|
15296
15411
|
case "navigate": {
|
|
15297
|
-
/* v8 ignore next 3 -- defensive: navigate is only dispatched after results are loaded @preserve */
|
|
15298
15412
|
if (!prevState.suggestions?.items.length) {
|
|
15299
15413
|
return prevState;
|
|
15300
15414
|
}
|
|
@@ -15492,7 +15606,6 @@ class RteSuggestFeatureImpl extends RteFeatureImpl {
|
|
|
15492
15606
|
return false;
|
|
15493
15607
|
}
|
|
15494
15608
|
const suggestion = suggestState.suggestions.items[suggestState.suggestions.selectedIndex];
|
|
15495
|
-
/* v8 ignore next 3 -- defensive: view is always passed by keymap @preserve */
|
|
15496
15609
|
if (view) {
|
|
15497
15610
|
this.selectSuggestion(view, suggestState, suggestion);
|
|
15498
15611
|
}
|
|
@@ -15546,4 +15659,4 @@ const registerRichTextEditor = createRegisterFunction(
|
|
|
15546
15659
|
richTextEditorDefinition
|
|
15547
15660
|
);
|
|
15548
15661
|
|
|
15549
|
-
export { RteAlignmentFeature, RteAtomFeature, RteBase, RteBoldFeature, RteConfig, RteDropHandlerFeature, RteFileHandlerFeature, RteFontSizePickerFeature, RteHardBreakFeature, RteHtmlParser, RteHtmlSerializer, RteInlineImageFeature, RteInputRuleFeature, RteItalicFeature, RteLinkFeature, RteListFeature, RteMonospaceFeature, RtePlaceholderFeature, RteStrikethroughFeature, RteSuggestFeature, RteTextBlockPickerFeature, RteTextColorPickerFeature, RteToolbarButtonFeature, RteToolbarFeature, RteUnderlineFeature, RichTextEditor as VwcRichTextEditorElement, registerRichTextEditor, richTextEditorDefinition };
|
|
15662
|
+
export { RteAlignmentFeature, RteAtomFeature, RteBase, RteBoldFeature, RteConfig, RteDropHandlerFeature, RteFileHandlerFeature, RteFontSizePickerFeature, RteHardBreakFeature, RteHtmlParser, RteHtmlSerializer, RteInlineImageFeature, RteInputRuleFeature, RteItalicFeature, RteKeyboardShortcutsFeature, RteLinkFeature, RteListFeature, RteMonospaceFeature, RtePlaceholderFeature, RteStrikethroughFeature, RteSuggestFeature, RteTextBlockPickerFeature, RteTextColorPickerFeature, RteToolbarButtonFeature, RteToolbarFeature, RteUnderlineFeature, RichTextEditor as VwcRichTextEditorElement, registerRichTextEditor, richTextEditorDefinition };
|