@threadlabs/looma 0.5.1 → 0.6.0-rc.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/components/shared/overlay.js +3 -0
- package/components/ui-button/ui-button.html +27 -14
- package/components/ui-callout/ui-callout.html +1 -1
- package/components/ui-checkbox/ui-checkbox.html +1 -1
- package/components/ui-cluster/ui-cluster.html +6 -6
- package/components/ui-combobox/ui-combobox.html +35 -27
- package/components/ui-container/ui-container.html +4 -4
- package/components/ui-context-menu/ui-context-menu.html +2 -2
- package/components/ui-dialog/ui-dialog.html +21 -8
- package/components/ui-disclosure/ui-disclosure.html +19 -4
- package/components/ui-editable/ui-editable.html +6 -6
- package/components/ui-editor-insert-table-grid/ui-editor-insert-table-grid.html +21 -21
- package/components/ui-editor-mention-menu/ui-editor-mention-menu.html +26 -26
- package/components/ui-editor-slash-menu/ui-editor-slash-menu.html +39 -39
- package/components/ui-editor-table-context-menu/ui-editor-table-context-menu.html +26 -22
- package/components/ui-editor-table-overlay/ui-editor-table-overlay.html +68 -52
- package/components/ui-editor-table-toolbar/ui-editor-table-toolbar.html +42 -38
- package/components/ui-editor-toolbar/ui-editor-toolbar.html +9 -9
- package/components/ui-floating-action-button/ui-floating-action-button.html +16 -22
- package/components/ui-form-field/ui-form-field.html +18 -7
- package/components/ui-grid/ui-grid.html +6 -6
- package/components/ui-icon/ui-icon.html +5 -1
- package/components/ui-icon-button/ui-icon-button.html +68 -34
- package/components/ui-input/ui-input.html +2 -2
- package/components/ui-menu/ui-menu.html +15 -4
- package/components/ui-menu-item/ui-menu-item.html +5 -5
- package/components/ui-popover/ui-popover.html +3 -3
- package/components/ui-popover/ui-popover.js +10 -2
- package/components/ui-reel/ui-reel.html +6 -6
- package/components/ui-search-result-row/ui-search-result-row.html +9 -9
- package/components/ui-search-shell/ui-search-shell.html +10 -3
- package/components/ui-search-shell/ui-search-shell.js +9 -0
- package/components/ui-select/ui-select.html +2 -2
- package/components/ui-sidebar/ui-sidebar.html +11 -11
- package/components/ui-stack/ui-stack.html +6 -6
- package/components/ui-switcher/ui-switcher.html +6 -6
- package/components/ui-tabs/ui-tabs.html +19 -5
- package/components/ui-textarea/ui-textarea.html +2 -2
- package/components/ui-toast-region/ui-toast-region.html +3 -3
- package/components/ui-tooltip/ui-tooltip.html +1 -1
- package/components/ui-top-bar/ui-top-bar.html +5 -5
- package/components/ui-tree/ui-tree.html +7 -0
- package/components/ui-tree-item/ui-tree-item.html +20 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/styles/ui-affordance-scope.css +1 -1
- package/styles/ui-avatar-group.css +1 -1
- package/styles/ui-avatar.css +1 -1
- package/styles/ui-badge.css +1 -1
- package/styles/ui-button.css +25 -15
- package/styles/ui-callout.css +2 -2
- package/styles/ui-checkbox.css +2 -2
- package/styles/ui-cluster.css +7 -7
- package/styles/ui-combobox.css +24 -24
- package/styles/ui-container.css +5 -5
- package/styles/ui-context-menu.css +3 -3
- package/styles/ui-dialog.css +26 -9
- package/styles/ui-disclosure.css +23 -7
- package/styles/ui-editable.css +7 -7
- package/styles/ui-editor-insert-table-grid.css +21 -21
- package/styles/ui-editor-mention-menu.css +26 -26
- package/styles/ui-editor-slash-menu.css +40 -40
- package/styles/ui-editor-table-context-menu.css +21 -21
- package/styles/ui-editor-table-overlay.css +49 -49
- package/styles/ui-editor-table-toolbar.css +35 -35
- package/styles/ui-editor-toolbar.css +10 -10
- package/styles/ui-floating-action-button.css +17 -23
- package/styles/ui-form-field.css +24 -10
- package/styles/ui-grid.css +7 -7
- package/styles/ui-icon-button.css +74 -35
- package/styles/ui-icon.css +1 -1
- package/styles/ui-input.css +3 -3
- package/styles/ui-menu-item.css +6 -6
- package/styles/ui-menu.css +19 -7
- package/styles/ui-popover.css +4 -4
- package/styles/ui-radio-group.css +1 -1
- package/styles/ui-radio.css +1 -1
- package/styles/ui-reel.css +7 -7
- package/styles/ui-search-result-row.css +10 -10
- package/styles/ui-search-shell.css +14 -5
- package/styles/ui-select.css +3 -3
- package/styles/ui-separator.css +1 -1
- package/styles/ui-sidebar.css +12 -12
- package/styles/ui-stack.css +7 -7
- package/styles/ui-switch.css +1 -1
- package/styles/ui-switcher.css +7 -7
- package/styles/ui-tabs.css +21 -7
- package/styles/ui-textarea.css +3 -3
- package/styles/ui-toast-region.css +3 -3
- package/styles/ui-tooltip.css +2 -2
- package/styles/ui-top-bar.css +6 -6
- package/styles/ui-tree-item.css +30 -9
- package/styles/ui-tree.css +8 -2
- package/theme-dark.css +42 -103
- package/theme-high-contrast.css +18 -22
- package/theme-light.css +15 -41
- package/tokens.css +149 -201
- package/vanilla/UiAffordanceScope.d.ts +1 -1
- package/vanilla/UiAffordanceScope.js +2 -2
- package/vanilla/UiAvatar.d.ts +1 -1
- package/vanilla/UiAvatar.js +2 -2
- package/vanilla/UiAvatarGroup.d.ts +1 -1
- package/vanilla/UiAvatarGroup.js +2 -2
- package/vanilla/UiBadge.d.ts +1 -1
- package/vanilla/UiBadge.js +2 -2
- package/vanilla/UiButton.d.ts +3 -1
- package/vanilla/UiButton.js +3 -3
- package/vanilla/UiCallout.d.ts +1 -1
- package/vanilla/UiCallout.js +2 -2
- package/vanilla/UiCheckbox.d.ts +1 -1
- package/vanilla/UiCheckbox.js +2 -2
- package/vanilla/UiCluster.d.ts +1 -1
- package/vanilla/UiCluster.js +2 -2
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +3 -3
- package/vanilla/UiContainer.d.ts +1 -1
- package/vanilla/UiContainer.js +2 -2
- package/vanilla/UiContextMenu.d.ts +1 -1
- package/vanilla/UiContextMenu.js +2 -2
- package/vanilla/UiDialog.d.ts +1 -1
- package/vanilla/UiDialog.js +2 -2
- package/vanilla/UiDisclosure.d.ts +2 -1
- package/vanilla/UiDisclosure.js +3 -3
- package/vanilla/UiEditable.d.ts +1 -1
- package/vanilla/UiEditable.js +2 -2
- package/vanilla/UiEditorInsertTableGrid.d.ts +1 -1
- package/vanilla/UiEditorInsertTableGrid.js +3 -3
- package/vanilla/UiEditorMentionMenu.d.ts +1 -1
- package/vanilla/UiEditorMentionMenu.js +3 -3
- package/vanilla/UiEditorSlashMenu.d.ts +1 -1
- package/vanilla/UiEditorSlashMenu.js +2 -2
- package/vanilla/UiEditorTableContextMenu.d.ts +1 -1
- package/vanilla/UiEditorTableContextMenu.js +3 -3
- package/vanilla/UiEditorTableOverlay.d.ts +1 -1
- package/vanilla/UiEditorTableOverlay.js +3 -3
- package/vanilla/UiEditorTableToolbar.d.ts +1 -1
- package/vanilla/UiEditorTableToolbar.js +3 -3
- package/vanilla/UiEditorToolbar.d.ts +1 -1
- package/vanilla/UiEditorToolbar.js +2 -2
- package/vanilla/UiFloatingActionButton.d.ts +1 -1
- package/vanilla/UiFloatingActionButton.js +2 -2
- package/vanilla/UiFormField.d.ts +1 -1
- package/vanilla/UiFormField.js +15 -6
- package/vanilla/UiGrid.d.ts +1 -1
- package/vanilla/UiGrid.js +2 -2
- package/vanilla/UiIcon.d.ts +1 -1
- package/vanilla/UiIcon.js +3 -3
- package/vanilla/UiIconButton.d.ts +1 -1
- package/vanilla/UiIconButton.js +2 -2
- package/vanilla/UiInput.d.ts +1 -1
- package/vanilla/UiInput.js +2 -2
- package/vanilla/UiMenu.d.ts +2 -1
- package/vanilla/UiMenu.js +3 -3
- package/vanilla/UiMenuItem.d.ts +1 -1
- package/vanilla/UiMenuItem.js +2 -2
- package/vanilla/UiPopover.d.ts +1 -1
- package/vanilla/UiPopover.js +2 -2
- package/vanilla/UiRadio.d.ts +1 -1
- package/vanilla/UiRadio.js +2 -2
- package/vanilla/UiRadioGroup.d.ts +1 -1
- package/vanilla/UiRadioGroup.js +2 -2
- package/vanilla/UiReel.d.ts +1 -1
- package/vanilla/UiReel.js +2 -2
- package/vanilla/UiSearchResultRow.d.ts +1 -1
- package/vanilla/UiSearchResultRow.js +2 -2
- package/vanilla/UiSearchShell.d.ts +1 -1
- package/vanilla/UiSearchShell.js +2 -2
- package/vanilla/UiSelect.d.ts +1 -1
- package/vanilla/UiSelect.js +2 -2
- package/vanilla/UiSeparator.d.ts +1 -1
- package/vanilla/UiSeparator.js +2 -2
- package/vanilla/UiSidebar.d.ts +1 -1
- package/vanilla/UiSidebar.js +2 -2
- package/vanilla/UiStack.d.ts +1 -1
- package/vanilla/UiStack.js +2 -2
- package/vanilla/UiSwitch.d.ts +1 -1
- package/vanilla/UiSwitch.js +2 -2
- package/vanilla/UiSwitcher.d.ts +1 -1
- package/vanilla/UiSwitcher.js +2 -2
- package/vanilla/UiTabs.d.ts +2 -1
- package/vanilla/UiTabs.js +3 -3
- package/vanilla/UiTextarea.d.ts +1 -1
- package/vanilla/UiTextarea.js +2 -2
- package/vanilla/UiToastRegion.d.ts +1 -1
- package/vanilla/UiToastRegion.js +3 -3
- package/vanilla/UiTooltip.d.ts +1 -1
- package/vanilla/UiTooltip.js +2 -2
- package/vanilla/UiTopBar.d.ts +1 -1
- package/vanilla/UiTopBar.js +1 -1
- package/vanilla/UiTree.d.ts +2 -1
- package/vanilla/UiTree.js +3 -3
- package/vanilla/UiTreeItem.d.ts +1 -1
- package/vanilla/UiTreeItem.js +2 -2
- package/vue/UiAffordanceScope.d.ts +2 -2
- package/vue/UiAffordanceScope.vue +92 -73
- package/vue/UiAvatar.d.ts +7 -7
- package/vue/UiAvatar.vue +145 -105
- package/vue/UiAvatarGroup.d.ts +4 -4
- package/vue/UiAvatarGroup.vue +134 -118
- package/vue/UiBadge.d.ts +4 -4
- package/vue/UiBadge.vue +113 -114
- package/vue/UiButton.d.ts +10 -6
- package/vue/UiButton.vue +295 -248
- package/vue/UiCallout.d.ts +2 -2
- package/vue/UiCallout.vue +154 -87
- package/vue/UiCheckbox.d.ts +14 -10
- package/vue/UiCheckbox.vue +228 -162
- package/vue/UiCluster.d.ts +2 -2
- package/vue/UiCluster.vue +53 -60
- package/vue/UiCombobox.d.ts +36 -32
- package/vue/UiCombobox.vue +1005 -416
- package/vue/UiContainer.d.ts +2 -2
- package/vue/UiContainer.vue +48 -51
- package/vue/UiContextMenu.d.ts +6 -4
- package/vue/UiContextMenu.vue +205 -116
- package/vue/UiDialog.d.ts +11 -9
- package/vue/UiDialog.vue +287 -212
- package/vue/UiDisclosure.d.ts +10 -6
- package/vue/UiDisclosure.vue +265 -159
- package/vue/UiEditable.d.ts +16 -12
- package/vue/UiEditable.vue +325 -205
- package/vue/UiEditorInsertTableGrid.d.ts +8 -8
- package/vue/UiEditorInsertTableGrid.vue +216 -157
- package/vue/UiEditorMentionMenu.d.ts +9 -9
- package/vue/UiEditorMentionMenu.vue +265 -222
- package/vue/UiEditorSlashMenu.d.ts +7 -7
- package/vue/UiEditorSlashMenu.vue +286 -240
- package/vue/UiEditorTableContextMenu.d.ts +5 -5
- package/vue/UiEditorTableContextMenu.vue +306 -193
- package/vue/UiEditorTableOverlay.d.ts +2 -2
- package/vue/UiEditorTableOverlay.vue +600 -369
- package/vue/UiEditorTableToolbar.d.ts +7 -7
- package/vue/UiEditorTableToolbar.vue +443 -268
- package/vue/UiEditorToolbar.d.ts +2 -2
- package/vue/UiEditorToolbar.vue +134 -121
- package/vue/UiFloatingActionButton.d.ts +6 -6
- package/vue/UiFloatingActionButton.vue +95 -99
- package/vue/UiFormField.d.ts +6 -6
- package/vue/UiFormField.vue +112 -80
- package/vue/UiGrid.d.ts +2 -2
- package/vue/UiGrid.vue +51 -57
- package/vue/UiIcon.d.ts +2 -2
- package/vue/UiIcon.vue +118 -89
- package/vue/UiIconButton.d.ts +11 -11
- package/vue/UiIconButton.vue +287 -217
- package/vue/UiInput.d.ts +9 -9
- package/vue/UiInput.vue +153 -127
- package/vue/UiMenu.d.ts +10 -6
- package/vue/UiMenu.vue +227 -143
- package/vue/UiMenuItem.d.ts +4 -4
- package/vue/UiMenuItem.vue +53 -46
- package/vue/UiPopover.d.ts +8 -6
- package/vue/UiPopover.vue +197 -137
- package/vue/UiRadio.d.ts +14 -10
- package/vue/UiRadio.vue +183 -117
- package/vue/UiRadioGroup.d.ts +14 -12
- package/vue/UiRadioGroup.vue +172 -111
- package/vue/UiReel.d.ts +3 -3
- package/vue/UiReel.vue +77 -77
- package/vue/UiSearchResultRow.d.ts +4 -4
- package/vue/UiSearchResultRow.vue +121 -115
- package/vue/UiSearchShell.d.ts +10 -8
- package/vue/UiSearchShell.vue +245 -176
- package/vue/UiSelect.d.ts +9 -9
- package/vue/UiSelect.vue +162 -134
- package/vue/UiSeparator.d.ts +2 -2
- package/vue/UiSeparator.vue +22 -27
- package/vue/UiSidebar.d.ts +20 -18
- package/vue/UiSidebar.vue +307 -224
- package/vue/UiStack.d.ts +3 -3
- package/vue/UiStack.vue +64 -70
- package/vue/UiSwitch.d.ts +12 -8
- package/vue/UiSwitch.vue +218 -150
- package/vue/UiSwitcher.d.ts +3 -3
- package/vue/UiSwitcher.vue +73 -75
- package/vue/UiTabs.d.ts +12 -8
- package/vue/UiTabs.vue +268 -210
- package/vue/UiTextarea.d.ts +11 -11
- package/vue/UiTextarea.vue +155 -128
- package/vue/UiToastRegion.d.ts +10 -8
- package/vue/UiToastRegion.vue +261 -198
- package/vue/UiTooltip.d.ts +14 -12
- package/vue/UiTooltip.vue +241 -177
- package/vue/UiTopBar.vue +51 -42
- package/vue/UiTree.d.ts +10 -6
- package/vue/UiTree.vue +180 -70
- package/vue/UiTreeItem.d.ts +24 -22
- package/vue/UiTreeItem.vue +464 -339
- package/vue/chunks/UiAffordanceScope.js +9 -16
- package/vue/chunks/UiAvatar.js +23 -29
- package/vue/chunks/UiAvatarGroup.js +16 -39
- package/vue/chunks/UiBadge.js +3 -12
- package/vue/chunks/UiButton.js +15 -18
- package/vue/chunks/UiCallout.js +8 -17
- package/vue/chunks/UiCheckbox.js +37 -40
- package/vue/chunks/UiCluster.js +3 -12
- package/vue/chunks/UiCombobox.js +224 -266
- package/vue/chunks/UiContainer.js +3 -12
- package/vue/chunks/UiContextMenu.js +39 -34
- package/vue/chunks/UiDialog.js +36 -39
- package/vue/chunks/UiDisclosure.js +44 -48
- package/vue/chunks/UiEditable.js +55 -57
- package/vue/chunks/UiEditorInsertTableGrid.js +55 -73
- package/vue/chunks/UiEditorMentionMenu.js +40 -81
- package/vue/chunks/UiEditorSlashMenu.js +28 -52
- package/vue/chunks/UiEditorTableContextMenu.js +32 -56
- package/vue/chunks/UiEditorTableOverlay.js +58 -82
- package/vue/chunks/UiEditorTableToolbar.js +61 -85
- package/vue/chunks/UiEditorToolbar.js +4 -13
- package/vue/chunks/UiFloatingActionButton.js +7 -21
- package/vue/chunks/UiFormField.js +15 -12
- package/vue/chunks/UiGrid.js +3 -12
- package/vue/chunks/UiIcon.js +20 -43
- package/vue/chunks/UiIconButton.js +16 -28
- package/vue/chunks/UiInput.js +20 -25
- package/vue/chunks/UiMenu.js +30 -33
- package/vue/chunks/UiMenuItem.js +4 -10
- package/vue/chunks/UiPopover.js +28 -29
- package/vue/chunks/UiRadio.js +36 -39
- package/vue/chunks/UiRadioGroup.js +30 -34
- package/vue/chunks/UiReel.js +6 -15
- package/vue/chunks/UiSearchResultRow.js +6 -19
- package/vue/chunks/UiSearchShell.js +25 -28
- package/vue/chunks/UiSelect.js +20 -23
- package/vue/chunks/UiSeparator.js +2 -8
- package/vue/chunks/UiSidebar.js +39 -44
- package/vue/chunks/UiStack.js +6 -15
- package/vue/chunks/UiSwitch.js +35 -38
- package/vue/chunks/UiSwitcher.js +6 -15
- package/vue/chunks/UiTabs.js +52 -85
- package/vue/chunks/UiTextarea.js +21 -26
- package/vue/chunks/UiToastRegion.js +38 -72
- package/vue/chunks/UiTooltip.js +34 -35
- package/vue/chunks/UiTopBar.js +1 -1
- package/vue/chunks/UiTree.js +27 -16
- package/vue/chunks/UiTreeItem.js +85 -102
- package/vue/components.css +4027 -3800
- package/vue/editor/LoomaEditor.d.ts +11 -0
- package/vue/editor/index.js +9 -0
|
@@ -33,7 +33,7 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
33
33
|
anchorRect: {},
|
|
34
34
|
items: {},
|
|
35
35
|
open: {
|
|
36
|
-
type:
|
|
36
|
+
type: Boolean,
|
|
37
37
|
default: false
|
|
38
38
|
},
|
|
39
39
|
query: { default: "" },
|
|
@@ -41,52 +41,28 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
41
41
|
},
|
|
42
42
|
emits: ["highlight", "select"],
|
|
43
43
|
setup(__props, { emit: __emit }) {
|
|
44
|
-
const hn = {
|
|
45
|
-
t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
|
|
46
|
-
text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
|
|
47
|
-
attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
|
|
48
|
-
enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v),
|
|
49
|
-
shape: (items, where, sort, limit) => {
|
|
50
|
-
let list = Array.isArray(items) ? items.slice() : [];
|
|
51
|
-
if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
|
|
52
|
-
if (sort.length > 0) {
|
|
53
|
-
const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
|
|
54
|
-
const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
|
|
55
|
-
list.sort((a, b) => {
|
|
56
|
-
for (const key of sort) {
|
|
57
|
-
const descending = key.startsWith("-");
|
|
58
|
-
const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
|
|
59
|
-
if (order !== 0) return descending ? -order : order;
|
|
60
|
-
}
|
|
61
|
-
return 0;
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
44
|
const props = __props;
|
|
68
45
|
const emit = __emit;
|
|
69
46
|
const root = ref(null);
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const state_active = ref(0);
|
|
47
|
+
const visible = ref(false);
|
|
48
|
+
const active = ref(0);
|
|
73
49
|
/** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
|
|
74
|
-
|
|
50
|
+
function dispatch(name, detail) {
|
|
75
51
|
const declared = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
52
|
+
highlight: {
|
|
53
|
+
bubbles: true,
|
|
54
|
+
composed: true,
|
|
55
|
+
cancelable: false
|
|
80
56
|
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
57
|
+
select: {
|
|
58
|
+
bubbles: true,
|
|
59
|
+
composed: true,
|
|
60
|
+
cancelable: false
|
|
85
61
|
}
|
|
86
62
|
};
|
|
87
63
|
const checks = {
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
highlight: (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && Number.isInteger(detail["index"]) && Object.keys(detail).every((key) => ["index"].includes(key)),
|
|
65
|
+
select: (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && Number.isInteger(detail["index"]) && Object.keys(detail).every((key) => ["index"].includes(key))
|
|
90
66
|
};
|
|
91
67
|
if (detail !== void 0 && checks[name] !== void 0 && !checks[name](detail)) throw new TypeError(`HR002: Event \`${name}\` detail does not satisfy its declared type.`);
|
|
92
68
|
emit(name, detail);
|
|
@@ -96,19 +72,19 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
96
72
|
...declared[name],
|
|
97
73
|
detail
|
|
98
74
|
})) ?? true;
|
|
99
|
-
}
|
|
75
|
+
}
|
|
100
76
|
function read(name) {
|
|
101
|
-
if (name === "visible") return
|
|
102
|
-
if (name === "active") return
|
|
77
|
+
if (name === "visible") return visible.value;
|
|
78
|
+
if (name === "active") return active.value;
|
|
103
79
|
return props[name];
|
|
104
80
|
}
|
|
105
81
|
function write(name, value) {
|
|
106
82
|
if (name === "visible") {
|
|
107
|
-
|
|
83
|
+
visible.value = value;
|
|
108
84
|
return true;
|
|
109
85
|
}
|
|
110
86
|
if (name === "active") {
|
|
111
|
-
|
|
87
|
+
active.value = value;
|
|
112
88
|
return true;
|
|
113
89
|
}
|
|
114
90
|
throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
|
|
@@ -122,7 +98,7 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
122
98
|
get: (_target, name) => typeof name === "string" ? read(name) : void 0,
|
|
123
99
|
set: (_target, name, value) => typeof name === "string" && write(name, value)
|
|
124
100
|
}),
|
|
125
|
-
refs,
|
|
101
|
+
refs: {},
|
|
126
102
|
elements: new Proxy({}, { get: (_target, name) => {
|
|
127
103
|
if (typeof name !== "string" || root.value === null) return void 0;
|
|
128
104
|
return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
|
|
@@ -177,19 +153,19 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
177
153
|
role: "listbox",
|
|
178
154
|
"aria-label": "Insert block"
|
|
179
155
|
}, _ctx.$attrs, {
|
|
180
|
-
hidden:
|
|
156
|
+
hidden: !visible.value,
|
|
181
157
|
ref_key: "root",
|
|
182
158
|
ref: root
|
|
183
159
|
}), [
|
|
184
|
-
createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "header-label" }, "Insert", -1)),
|
|
185
|
-
createElementVNode("ul", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
160
|
+
createElementVNode("div", _hoisted_2, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "header-label" }, "Insert", -1)), __props.query ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(__props.query), 1)) : createCommentVNode("v-if", true)]),
|
|
161
|
+
createElementVNode("ul", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
186
162
|
return openBlock(), createElementBlock("li", {
|
|
187
163
|
key: index,
|
|
188
|
-
class: normalizeClass(["item", {
|
|
164
|
+
class: normalizeClass(["item", { active: index === active.value }]),
|
|
189
165
|
role: "option",
|
|
190
|
-
"aria-selected":
|
|
191
|
-
"data-index":
|
|
192
|
-
}, [createElementVNode("span", _hoisted_6, [createVNode(UiIcon_default, { name: item
|
|
166
|
+
"aria-selected": index === active.value,
|
|
167
|
+
"data-index": index
|
|
168
|
+
}, [createElementVNode("span", _hoisted_6, [createVNode(UiIcon_default, { name: item.icon }, null, 8, ["name"])]), createElementVNode("span", _hoisted_7, [createElementVNode("span", _hoisted_8, toDisplayString(item.title), 1), createElementVNode("span", _hoisted_9, toDisplayString(item.description), 1)])], 10, _hoisted_5);
|
|
193
169
|
}), 128))]),
|
|
194
170
|
_cache[1] || (_cache[1] = createElementVNode("div", {
|
|
195
171
|
class: "footer",
|
|
@@ -205,6 +181,6 @@ var UiEditorSlashMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
205
181
|
], 16, _hoisted_1);
|
|
206
182
|
};
|
|
207
183
|
}
|
|
208
|
-
}), [["__scopeId", "data-v-
|
|
184
|
+
}), [["__scopeId", "data-v-aeee1d4f"]]);
|
|
209
185
|
//#endregion
|
|
210
186
|
export { UiEditorSlashMenu_default as t };
|
|
@@ -34,49 +34,25 @@ var UiEditorTableContextMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_d
|
|
|
34
34
|
actions: {},
|
|
35
35
|
cellBackground: { default: "" },
|
|
36
36
|
open: {
|
|
37
|
-
type:
|
|
37
|
+
type: Boolean,
|
|
38
38
|
default: false
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
emits: ["action"],
|
|
42
42
|
setup(__props, { emit: __emit }) {
|
|
43
|
-
const hn = {
|
|
44
|
-
t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
|
|
45
|
-
text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
|
|
46
|
-
attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
|
|
47
|
-
enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v),
|
|
48
|
-
shape: (items, where, sort, limit) => {
|
|
49
|
-
let list = Array.isArray(items) ? items.slice() : [];
|
|
50
|
-
if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
|
|
51
|
-
if (sort.length > 0) {
|
|
52
|
-
const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
|
|
53
|
-
const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
|
|
54
|
-
list.sort((a, b) => {
|
|
55
|
-
for (const key of sort) {
|
|
56
|
-
const descending = key.startsWith("-");
|
|
57
|
-
const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
|
|
58
|
-
if (order !== 0) return descending ? -order : order;
|
|
59
|
-
}
|
|
60
|
-
return 0;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
43
|
const props = __props;
|
|
67
44
|
const emit = __emit;
|
|
68
45
|
const root = ref(null);
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
const state_sections = ref([]);
|
|
46
|
+
const swatches = ref([]);
|
|
47
|
+
const sections = ref([]);
|
|
72
48
|
/** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
|
|
73
|
-
|
|
74
|
-
const declared = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
function dispatch(name, detail) {
|
|
50
|
+
const declared = { action: {
|
|
51
|
+
bubbles: true,
|
|
52
|
+
composed: true,
|
|
53
|
+
cancelable: false
|
|
78
54
|
} };
|
|
79
|
-
const checks = {
|
|
55
|
+
const checks = { action: (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && (detail["action"] === "align-left" || detail["action"] === "align-center" || detail["action"] === "align-right" || detail["action"] === "background-none" || detail["action"] === "background-gray" || detail["action"] === "background-yellow" || detail["action"] === "background-blue" || detail["action"] === "background-green" || detail["action"] === "background-red" || detail["action"] === "add-row-before" || detail["action"] === "add-row-after" || detail["action"] === "add-column-before" || detail["action"] === "add-column-after" || detail["action"] === "clear-cells" || detail["action"] === "merge-cells" || detail["action"] === "split-cell" || detail["action"] === "delete-row" || detail["action"] === "delete-column" || detail["action"] === "delete-table") && Object.keys(detail).every((key) => ["action"].includes(key)) };
|
|
80
56
|
if (detail !== void 0 && checks[name] !== void 0 && !checks[name](detail)) throw new TypeError(`HR002: Event \`${name}\` detail does not satisfy its declared type.`);
|
|
81
57
|
emit(name, detail);
|
|
82
58
|
return root.value?.dispatchEvent(new CustomEvent(name, {
|
|
@@ -85,19 +61,19 @@ var UiEditorTableContextMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_d
|
|
|
85
61
|
...declared[name],
|
|
86
62
|
detail
|
|
87
63
|
})) ?? true;
|
|
88
|
-
}
|
|
64
|
+
}
|
|
89
65
|
function read(name) {
|
|
90
|
-
if (name === "swatches") return
|
|
91
|
-
if (name === "sections") return
|
|
66
|
+
if (name === "swatches") return swatches.value;
|
|
67
|
+
if (name === "sections") return sections.value;
|
|
92
68
|
return props[name];
|
|
93
69
|
}
|
|
94
70
|
function write(name, value) {
|
|
95
71
|
if (name === "swatches") {
|
|
96
|
-
|
|
72
|
+
swatches.value = value;
|
|
97
73
|
return true;
|
|
98
74
|
}
|
|
99
75
|
if (name === "sections") {
|
|
100
|
-
|
|
76
|
+
sections.value = value;
|
|
101
77
|
return true;
|
|
102
78
|
}
|
|
103
79
|
throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
|
|
@@ -111,7 +87,7 @@ var UiEditorTableContextMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_d
|
|
|
111
87
|
get: (_target, name) => typeof name === "string" ? read(name) : void 0,
|
|
112
88
|
set: (_target, name, value) => typeof name === "string" && write(name, value)
|
|
113
89
|
}),
|
|
114
|
-
refs,
|
|
90
|
+
refs: {},
|
|
115
91
|
elements: new Proxy({}, { get: (_target, name) => {
|
|
116
92
|
if (typeof name !== "string" || root.value === null) return void 0;
|
|
117
93
|
return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
|
|
@@ -165,37 +141,37 @@ var UiEditorTableContextMenu_default = /*#__PURE__*/ _plugin_vue_export_helper_d
|
|
|
165
141
|
"data-component": "ui-editor-table-context-menu",
|
|
166
142
|
role: "menu"
|
|
167
143
|
}, _ctx.$attrs, {
|
|
168
|
-
hidden:
|
|
144
|
+
hidden: !__props.open,
|
|
169
145
|
ref_key: "root",
|
|
170
146
|
ref: root
|
|
171
|
-
}), [
|
|
147
|
+
}), [swatches.value?.length ? (openBlock(), createElementBlock("div", _hoisted_2, [_cache[0] || (_cache[0] = createElementVNode("div", {
|
|
172
148
|
class: "heading",
|
|
173
149
|
role: "presentation"
|
|
174
|
-
}, "Cell background", -1)), createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
150
|
+
}, "Cell background", -1)), createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(swatches.value, (swatch) => {
|
|
175
151
|
return openBlock(), createElementBlock("button", {
|
|
176
|
-
key: swatch
|
|
152
|
+
key: swatch.action,
|
|
177
153
|
type: "button",
|
|
178
|
-
class: normalizeClass(["swatch-button", {
|
|
154
|
+
class: normalizeClass(["swatch-button", { selected: swatch.selected }]),
|
|
179
155
|
role: "menuitemradio",
|
|
180
|
-
"aria-checked":
|
|
181
|
-
"data-action":
|
|
156
|
+
"aria-checked": swatch.selected,
|
|
157
|
+
"data-action": swatch.action
|
|
182
158
|
}, [createElementVNode("span", {
|
|
183
|
-
class: normalizeClass(["swatch", {
|
|
184
|
-
style: normalizeStyle({ "--ui-editor-table-context-swatch":
|
|
185
|
-
}, null, 6), createElementVNode("span", _hoisted_5, toDisplayString(
|
|
186
|
-
}), 128))])])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
187
|
-
return openBlock(), createElementBlock(Fragment, { key: section
|
|
159
|
+
class: normalizeClass(["swatch", { default: !swatch.color }]),
|
|
160
|
+
style: normalizeStyle({ "--ui-editor-table-context-swatch": swatch.color })
|
|
161
|
+
}, null, 6), createElementVNode("span", _hoisted_5, toDisplayString(swatch.label), 1)], 10, _hoisted_4);
|
|
162
|
+
}), 128))])])) : createCommentVNode("v-if", true), (openBlock(true), createElementBlock(Fragment, null, renderList(sections.value, (section) => {
|
|
163
|
+
return openBlock(), createElementBlock(Fragment, { key: section.heading }, [_cache[1] || (_cache[1] = createElementVNode("div", { class: "sep" }, null, -1)), createElementVNode("div", _hoisted_6, [createElementVNode("div", _hoisted_7, toDisplayString(section.heading), 1), (openBlock(true), createElementBlock(Fragment, null, renderList(section.items, (item) => {
|
|
188
164
|
return openBlock(), createElementBlock("button", {
|
|
189
|
-
key: item
|
|
165
|
+
key: item.action,
|
|
190
166
|
type: "button",
|
|
191
167
|
role: "menuitem",
|
|
192
|
-
"data-action":
|
|
193
|
-
class: normalizeClass({
|
|
194
|
-
}, [createVNode(UiIcon_default, { name: item
|
|
168
|
+
"data-action": item.action,
|
|
169
|
+
class: normalizeClass({ danger: item.danger })
|
|
170
|
+
}, [createVNode(UiIcon_default, { name: item.icon }, null, 8, ["name"]), createElementVNode("span", null, toDisplayString(item.label), 1)], 10, _hoisted_8);
|
|
195
171
|
}), 128))])], 64);
|
|
196
172
|
}), 128))], 16, _hoisted_1);
|
|
197
173
|
};
|
|
198
174
|
}
|
|
199
|
-
}), [["__scopeId", "data-v-
|
|
175
|
+
}), [["__scopeId", "data-v-7c984caf"]]);
|
|
200
176
|
//#endregion
|
|
201
177
|
export { UiEditorTableContextMenu_default as t };
|
|
@@ -41,52 +41,28 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
41
41
|
props: {
|
|
42
42
|
geometry: {},
|
|
43
43
|
open: {
|
|
44
|
-
type:
|
|
44
|
+
type: Boolean,
|
|
45
45
|
default: false
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
emits: ["action"],
|
|
49
49
|
setup(__props, { emit: __emit }) {
|
|
50
|
-
const hn = {
|
|
51
|
-
t: (v) => v === true || (typeof v === "string" ? v.length > 0 : typeof v === "number" ? v !== 0 && v === v : Array.isArray(v) ? v.length > 0 : v !== null && typeof v === "object" ? Object.keys(v).length > 0 : false),
|
|
52
|
-
text: (v) => v === void 0 || v === null ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? "" : String(v),
|
|
53
|
-
attr: (v) => v === void 0 || v === null || v === false ? void 0 : v === true ? "" : Array.isArray(v) ? v.map(hn.text).join(" ") : typeof v === "object" ? void 0 : String(v),
|
|
54
|
-
enumerated: (v) => typeof v === "boolean" ? String(v) : hn.attr(v),
|
|
55
|
-
shape: (items, where, sort, limit) => {
|
|
56
|
-
let list = Array.isArray(items) ? items.slice() : [];
|
|
57
|
-
if (where !== void 0) list = list.filter((item) => hn.t(where(item)));
|
|
58
|
-
if (sort.length > 0) {
|
|
59
|
-
const field = (item, path) => item !== null && typeof item === "object" && !Array.isArray(item) ? path.split(".").reduce((value, key) => value?.[key], item) : item;
|
|
60
|
-
const compare = (a, b) => typeof a === "number" && typeof b === "number" ? a - b : hn.text(a).localeCompare(hn.text(b));
|
|
61
|
-
list.sort((a, b) => {
|
|
62
|
-
for (const key of sort) {
|
|
63
|
-
const descending = key.startsWith("-");
|
|
64
|
-
const order = compare(field(a, descending ? key.slice(1) : key), field(b, descending ? key.slice(1) : key));
|
|
65
|
-
if (order !== 0) return descending ? -order : order;
|
|
66
|
-
}
|
|
67
|
-
return 0;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return typeof limit === "number" ? list.slice(0, Math.max(0, Math.trunc(limit))) : list;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
50
|
const props = __props;
|
|
74
51
|
const emit = __emit;
|
|
75
52
|
const root = ref(null);
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
const state_activeKey = ref("");
|
|
53
|
+
const rows = ref([]);
|
|
54
|
+
const cols = ref([]);
|
|
55
|
+
const hovered = ref(null);
|
|
56
|
+
const active = ref(null);
|
|
57
|
+
const activeKey = ref("");
|
|
82
58
|
/** Dispatches a component event to Vue listeners and, for controllers and page code, on the root. */
|
|
83
|
-
|
|
84
|
-
const declared = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
59
|
+
function dispatch(name, detail) {
|
|
60
|
+
const declared = { action: {
|
|
61
|
+
bubbles: true,
|
|
62
|
+
composed: true,
|
|
63
|
+
cancelable: false
|
|
88
64
|
} };
|
|
89
|
-
const checks = {
|
|
65
|
+
const checks = { action: (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && (detail["action"] === "add-row-before" || detail["action"] === "add-row-after" || detail["action"] === "add-column-before" || detail["action"] === "add-column-after") && Number.isInteger(detail["boundaryIndex"]) && Object.keys(detail).every((key) => ["action", "boundaryIndex"].includes(key)) || detail !== null && typeof detail === "object" && !Array.isArray(detail) && (detail["action"] === "select-row" || detail["action"] === "select-column") && Number.isInteger(detail["rowIndex"]) && Number.isInteger(detail["columnIndex"]) && Object.keys(detail).every((key) => [
|
|
90
66
|
"action",
|
|
91
67
|
"rowIndex",
|
|
92
68
|
"columnIndex"
|
|
@@ -109,34 +85,34 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
109
85
|
...declared[name],
|
|
110
86
|
detail
|
|
111
87
|
})) ?? true;
|
|
112
|
-
}
|
|
88
|
+
}
|
|
113
89
|
function read(name) {
|
|
114
|
-
if (name === "rows") return
|
|
115
|
-
if (name === "cols") return
|
|
116
|
-
if (name === "hovered") return
|
|
117
|
-
if (name === "active") return
|
|
118
|
-
if (name === "activeKey") return
|
|
90
|
+
if (name === "rows") return rows.value;
|
|
91
|
+
if (name === "cols") return cols.value;
|
|
92
|
+
if (name === "hovered") return hovered.value;
|
|
93
|
+
if (name === "active") return active.value;
|
|
94
|
+
if (name === "activeKey") return activeKey.value;
|
|
119
95
|
return props[name];
|
|
120
96
|
}
|
|
121
97
|
function write(name, value) {
|
|
122
98
|
if (name === "rows") {
|
|
123
|
-
|
|
99
|
+
rows.value = value;
|
|
124
100
|
return true;
|
|
125
101
|
}
|
|
126
102
|
if (name === "cols") {
|
|
127
|
-
|
|
103
|
+
cols.value = value;
|
|
128
104
|
return true;
|
|
129
105
|
}
|
|
130
106
|
if (name === "hovered") {
|
|
131
|
-
|
|
107
|
+
hovered.value = value;
|
|
132
108
|
return true;
|
|
133
109
|
}
|
|
134
110
|
if (name === "active") {
|
|
135
|
-
|
|
111
|
+
active.value = value;
|
|
136
112
|
return true;
|
|
137
113
|
}
|
|
138
114
|
if (name === "activeKey") {
|
|
139
|
-
|
|
115
|
+
activeKey.value = value;
|
|
140
116
|
return true;
|
|
141
117
|
}
|
|
142
118
|
throw new TypeError(`Only declared state is writable; \`${name}\` is not.`);
|
|
@@ -150,7 +126,7 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
150
126
|
get: (_target, name) => typeof name === "string" ? read(name) : void 0,
|
|
151
127
|
set: (_target, name, value) => typeof name === "string" && write(name, value)
|
|
152
128
|
}),
|
|
153
|
-
refs,
|
|
129
|
+
refs: {},
|
|
154
130
|
elements: new Proxy({}, { get: (_target, name) => {
|
|
155
131
|
if (typeof name !== "string" || root.value === null) return void 0;
|
|
156
132
|
return (root.value instanceof HTMLFormElement ? root.value : root.value.querySelector("form"))?.elements.namedItem(name) ?? root.value.querySelector(`[name="${CSS.escape(name)}"]`) ?? void 0;
|
|
@@ -204,16 +180,16 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
204
180
|
"data-component": "ui-editor-table-overlay",
|
|
205
181
|
"aria-label": "Table controls"
|
|
206
182
|
}, _ctx.$attrs, {
|
|
207
|
-
hidden:
|
|
183
|
+
hidden: !__props.open,
|
|
208
184
|
ref_key: "root",
|
|
209
185
|
ref: root
|
|
210
186
|
}), [
|
|
211
|
-
createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
187
|
+
createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(rows.value, (control) => {
|
|
212
188
|
return openBlock(), createElementBlock("div", {
|
|
213
|
-
key: control
|
|
214
|
-
class: normalizeClass(["control row", {
|
|
215
|
-
"data-control-key":
|
|
216
|
-
style: normalizeStyle({
|
|
189
|
+
key: control.key,
|
|
190
|
+
class: normalizeClass(["control row", { active: control.key === activeKey.value }]),
|
|
191
|
+
"data-control-key": control.key,
|
|
192
|
+
style: normalizeStyle({ top: control.offset })
|
|
217
193
|
}, [
|
|
218
194
|
_cache[0] || (_cache[0] = createElementVNode("span", {
|
|
219
195
|
class: "line",
|
|
@@ -227,19 +203,19 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
227
203
|
createElementVNode("button", {
|
|
228
204
|
type: "button",
|
|
229
205
|
class: "handle",
|
|
230
|
-
"data-ui-affordance":
|
|
231
|
-
"data-action":
|
|
232
|
-
"data-boundary-index":
|
|
233
|
-
"aria-label":
|
|
234
|
-
}, [createVNode(UiIcon_default, { name: "plus" }), createElementVNode("span", _hoisted_5, toDisplayString(
|
|
206
|
+
"data-ui-affordance": control.affordance,
|
|
207
|
+
"data-action": control.action,
|
|
208
|
+
"data-boundary-index": control.index,
|
|
209
|
+
"aria-label": control.label
|
|
210
|
+
}, [createVNode(UiIcon_default, { name: "plus" }), createElementVNode("span", _hoisted_5, toDisplayString(control.label), 1)], 8, _hoisted_4)
|
|
235
211
|
], 14, _hoisted_3);
|
|
236
212
|
}), 128))]),
|
|
237
|
-
createElementVNode("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
213
|
+
createElementVNode("div", _hoisted_6, [(openBlock(true), createElementBlock(Fragment, null, renderList(cols.value, (control) => {
|
|
238
214
|
return openBlock(), createElementBlock("div", {
|
|
239
|
-
key: control
|
|
240
|
-
class: normalizeClass(["control col", {
|
|
241
|
-
"data-control-key":
|
|
242
|
-
style: normalizeStyle({
|
|
215
|
+
key: control.key,
|
|
216
|
+
class: normalizeClass(["control col", { active: control.key === activeKey.value }]),
|
|
217
|
+
"data-control-key": control.key,
|
|
218
|
+
style: normalizeStyle({ left: control.offset })
|
|
243
219
|
}, [
|
|
244
220
|
_cache[2] || (_cache[2] = createElementVNode("span", {
|
|
245
221
|
class: "line",
|
|
@@ -253,49 +229,49 @@ var UiEditorTableOverlay_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
253
229
|
createElementVNode("button", {
|
|
254
230
|
type: "button",
|
|
255
231
|
class: "handle",
|
|
256
|
-
"data-ui-affordance":
|
|
257
|
-
"data-action":
|
|
258
|
-
"data-boundary-index":
|
|
259
|
-
"aria-label":
|
|
260
|
-
}, [createVNode(UiIcon_default, { name: "plus" }), createElementVNode("span", _hoisted_9, toDisplayString(
|
|
232
|
+
"data-ui-affordance": control.affordance,
|
|
233
|
+
"data-action": control.action,
|
|
234
|
+
"data-boundary-index": control.index,
|
|
235
|
+
"aria-label": control.label
|
|
236
|
+
}, [createVNode(UiIcon_default, { name: "plus" }), createElementVNode("span", _hoisted_9, toDisplayString(control.label), 1)], 8, _hoisted_8)
|
|
261
237
|
], 14, _hoisted_7);
|
|
262
238
|
}), 128))]),
|
|
263
|
-
|
|
239
|
+
hovered.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("button", {
|
|
264
240
|
type: "button",
|
|
265
241
|
class: "selector row",
|
|
266
242
|
"data-action": "select-row",
|
|
267
243
|
title: "Select row",
|
|
268
244
|
"aria-label": "Select row",
|
|
269
|
-
"data-row-index":
|
|
270
|
-
"data-column-index":
|
|
271
|
-
style: normalizeStyle({
|
|
245
|
+
"data-row-index": hovered.value?.rowIndex,
|
|
246
|
+
"data-column-index": hovered.value?.columnIndex,
|
|
247
|
+
style: normalizeStyle({ top: hovered.value?.rowOffset })
|
|
272
248
|
}, [createElementVNode("span", _hoisted_11, [createVNode(UiIcon_default, { name: "grip-vertical" })])], 12, _hoisted_10), createElementVNode("button", {
|
|
273
249
|
type: "button",
|
|
274
250
|
class: "selector column",
|
|
275
251
|
"data-action": "select-column",
|
|
276
252
|
title: "Select column",
|
|
277
253
|
"aria-label": "Select column",
|
|
278
|
-
"data-row-index":
|
|
279
|
-
"data-column-index":
|
|
280
|
-
style: normalizeStyle({
|
|
254
|
+
"data-row-index": hovered.value?.rowIndex,
|
|
255
|
+
"data-column-index": hovered.value?.columnIndex,
|
|
256
|
+
style: normalizeStyle({ left: hovered.value?.columnOffset })
|
|
281
257
|
}, [createElementVNode("span", _hoisted_13, [createVNode(UiIcon_default, { name: "grip-horizontal" })])], 12, _hoisted_12)], 64)) : createCommentVNode("v-if", true),
|
|
282
|
-
|
|
258
|
+
active.value ? (openBlock(), createElementBlock("button", {
|
|
283
259
|
key: 1,
|
|
284
260
|
type: "button",
|
|
285
261
|
class: "cell-menu",
|
|
286
262
|
"data-action": "open-cell-menu",
|
|
287
263
|
title: "Cell actions",
|
|
288
264
|
"aria-label": "Cell actions",
|
|
289
|
-
"data-row-index":
|
|
290
|
-
"data-column-index":
|
|
265
|
+
"data-row-index": active.value?.rowIndex,
|
|
266
|
+
"data-column-index": active.value?.columnIndex,
|
|
291
267
|
style: normalizeStyle({
|
|
292
|
-
|
|
293
|
-
|
|
268
|
+
left: active.value?.menuLeft,
|
|
269
|
+
top: active.value?.menuTop
|
|
294
270
|
})
|
|
295
271
|
}, [createVNode(UiIcon_default, { name: "chevron-down" })], 12, _hoisted_14)) : createCommentVNode("v-if", true)
|
|
296
272
|
], 16, _hoisted_1);
|
|
297
273
|
};
|
|
298
274
|
}
|
|
299
|
-
}), [["__scopeId", "data-v-
|
|
275
|
+
}), [["__scopeId", "data-v-d5963c35"]]);
|
|
300
276
|
//#endregion
|
|
301
277
|
export { UiEditorTableOverlay_default as t };
|