@prosekit/web 0.8.0-beta.3 → 0.8.0-beta.5
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/get-safe-editor-view.js +0 -2
- package/dist/get-safe-editor-view.js.map +1 -1
- package/dist/prosekit-web-autocomplete.d.ts +47 -19
- package/dist/prosekit-web-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-web-autocomplete.js +49 -28
- package/dist/prosekit-web-autocomplete.js.map +1 -1
- package/dist/prosekit-web-block-handle.d.ts +43 -16
- package/dist/prosekit-web-block-handle.d.ts.map +1 -1
- package/dist/prosekit-web-block-handle.js +45 -35
- package/dist/prosekit-web-block-handle.js.map +1 -1
- package/dist/prosekit-web-drop-indicator.d.ts +3 -4
- package/dist/prosekit-web-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-web-drop-indicator.js +3 -3
- package/dist/prosekit-web-drop-indicator.js.map +1 -1
- package/dist/prosekit-web-inline-popover.d.ts +31 -10
- package/dist/prosekit-web-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-web-inline-popover.js +32 -20
- package/dist/prosekit-web-inline-popover.js.map +1 -1
- package/dist/prosekit-web-menu.d.ts +121 -5
- package/dist/prosekit-web-menu.d.ts.map +1 -1
- package/dist/prosekit-web-menu.js +115 -10
- package/dist/prosekit-web-menu.js.map +1 -1
- package/dist/prosekit-web-popover.d.ts +64 -5
- package/dist/prosekit-web-popover.d.ts.map +1 -1
- package/dist/prosekit-web-popover.js +60 -7
- package/dist/prosekit-web-popover.js.map +1 -1
- package/dist/prosekit-web-resizable.d.ts +14 -7
- package/dist/prosekit-web-resizable.d.ts.map +1 -1
- package/dist/prosekit-web-resizable.js +14 -12
- package/dist/prosekit-web-resizable.js.map +1 -1
- package/dist/prosekit-web-table-handle.d.ts +73 -36
- package/dist/prosekit-web-table-handle.d.ts.map +1 -1
- package/dist/prosekit-web-table-handle.js +75 -66
- package/dist/prosekit-web-table-handle.js.map +1 -1
- package/dist/prosekit-web-tooltip.d.ts +61 -5
- package/dist/prosekit-web-tooltip.d.ts.map +1 -1
- package/dist/prosekit-web-tooltip.js +58 -7
- package/dist/prosekit-web-tooltip.js.map +1 -1
- package/dist/prosekit-web.d.ts +0 -3
- package/dist/prosekit-web.d.ts.map +1 -1
- package/dist/prosekit-web.js +0 -2
- package/dist/prosekit-web.js.map +1 -1
- package/dist/use-editor-extension.js +0 -2
- package/dist/use-editor-extension.js.map +1 -1
- package/dist/use-scrolling.js +11 -21
- package/dist/use-scrolling.js.map +1 -1
- package/package.json +8 -8
- package/src/components/autocomplete/autocomplete-empty.ts +3 -4
- package/src/components/autocomplete/autocomplete-item.ts +12 -2
- package/src/components/autocomplete/autocomplete-popup.ts +11 -1
- package/src/components/autocomplete/autocomplete-positioner.ts +17 -1
- package/src/components/autocomplete/autocomplete-root.ts +6 -2
- package/src/components/block-handle/block-handle-add.ts +4 -2
- package/src/components/block-handle/block-handle-draggable.ts +10 -3
- package/src/components/block-handle/block-handle-popup.ts +9 -1
- package/src/components/block-handle/block-handle-positioner.ts +17 -1
- package/src/components/block-handle/block-handle-root.ts +5 -1
- package/src/components/drop-indicator/drop-indicator.ts +3 -1
- package/src/components/inline-popover/inline-popover-popup.ts +9 -1
- package/src/components/inline-popover/inline-popover-positioner.ts +17 -1
- package/src/components/inline-popover/inline-popover-root.ts +5 -1
- package/src/components/menu/index.ts +140 -43
- package/src/components/popover/index.ts +76 -23
- package/src/components/resizable/resizable-handle.ts +3 -1
- package/src/components/resizable/resizable-root.ts +11 -1
- package/src/components/table-handle/table-handle-column-menu-root.ts +3 -1
- package/src/components/table-handle/table-handle-column-menu-trigger.ts +4 -2
- package/src/components/table-handle/table-handle-column-popup.ts +9 -1
- package/src/components/table-handle/table-handle-column-positioner.ts +17 -1
- package/src/components/table-handle/table-handle-drag-preview.ts +3 -1
- package/src/components/table-handle/table-handle-drop-indicator.ts +3 -1
- package/src/components/table-handle/table-handle-root.ts +3 -1
- package/src/components/table-handle/table-handle-row-menu-root.ts +3 -1
- package/src/components/table-handle/table-handle-row-menu-trigger.ts +4 -2
- package/src/components/table-handle/table-handle-row-popup.ts +9 -1
- package/src/components/table-handle/table-handle-row-positioner.ts +17 -1
- package/src/components/tooltip/index.ts +73 -22
- package/src/hooks/use-scrolling.ts +16 -14
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as useEditorExtension } from "./use-editor-extension.js";
|
|
2
2
|
import { t as getSafeEditorView } from "./get-safe-editor-view.js";
|
|
3
3
|
import { n as assignStyles, t as useScrolling } from "./use-scrolling.js";
|
|
4
|
-
import { computed, createContext, createSignal, defineCustomElement, defineProps, onMount, registerCustomElement, useEffect
|
|
4
|
+
import { computed, createContext, createSignal, defineCustomElement, defineProps, onMount, registerCustomElement, useEffect } from "@aria-ui/core";
|
|
5
|
+
import { useEventListener } from "@aria-ui/utils";
|
|
5
6
|
import { OverlayPositionerPropsDeclaration, createOverlayStore, setupOverlayPopup, setupOverlayPositioner } from "@aria-ui/elements/overlay";
|
|
6
7
|
import { defineDOMEventHandler, union } from "@prosekit/core";
|
|
7
8
|
import { getDocument, getId, isHTMLElement, once } from "@ocavue/utils";
|
|
@@ -9,7 +10,6 @@ import { MenuRootPropsDeclaration, setupMenuRoot, setupMenuTrigger } from "@aria
|
|
|
9
10
|
import { moveTableColumn, moveTableRow, selectTableColumn, selectTableRow } from "@prosekit/extensions/table";
|
|
10
11
|
import { computePosition, offset } from "@floating-ui/dom";
|
|
11
12
|
import { TableMap, cellAround } from "prosemirror-tables";
|
|
12
|
-
//#region src/components/table-handle/store.ts
|
|
13
13
|
function noop() {}
|
|
14
14
|
function returnTrue() {
|
|
15
15
|
return true;
|
|
@@ -76,8 +76,6 @@ function createTableHandleStore(getHoveringCellInfo, getCanShow) {
|
|
|
76
76
|
* @internal
|
|
77
77
|
*/
|
|
78
78
|
const tableHandleStoreContext = createContext("prosekit-table-handle-store");
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/components/table-handle/table-handle-column-popup.ts
|
|
81
79
|
/** @internal */
|
|
82
80
|
const TableHandleColumnPopupPropsDeclaration = defineProps({});
|
|
83
81
|
/** @internal */
|
|
@@ -88,15 +86,21 @@ function setupTableHandleColumnPopup(host, _props) {
|
|
|
88
86
|
}
|
|
89
87
|
const TableHandleColumnPopupElementBase = defineCustomElement(setupTableHandleColumnPopup, TableHandleColumnPopupPropsDeclaration);
|
|
90
88
|
/**
|
|
91
|
-
*
|
|
89
|
+
* `<prosekit-table-handle-column-popup>` custom element.
|
|
90
|
+
*
|
|
91
|
+
* Properties: {@link TableHandleColumnPopupProps}
|
|
92
|
+
*
|
|
93
|
+
* Data attributes:
|
|
94
|
+
*
|
|
95
|
+
* | Attribute | Description |
|
|
96
|
+
* | --- | --- |
|
|
97
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
92
98
|
*/
|
|
93
99
|
var TableHandleColumnPopupElement = class extends TableHandleColumnPopupElementBase {};
|
|
94
100
|
/** @internal */
|
|
95
101
|
function registerTableHandleColumnPopupElement() {
|
|
96
102
|
registerCustomElement("prosekit-table-handle-column-popup", TableHandleColumnPopupElement);
|
|
97
103
|
}
|
|
98
|
-
//#endregion
|
|
99
|
-
//#region src/utils/use-html-element-at.ts
|
|
100
104
|
function useHTMLElementAt(getEditor, getPos) {
|
|
101
105
|
return computed(() => {
|
|
102
106
|
const editor = getEditor();
|
|
@@ -106,8 +110,6 @@ function useHTMLElementAt(getEditor, getPos) {
|
|
|
106
110
|
if (element && isHTMLElement(element)) return element;
|
|
107
111
|
});
|
|
108
112
|
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/components/table-handle/shared.ts
|
|
111
113
|
/** @internal */
|
|
112
114
|
const SharedTableHandlePositionerPropsDeclaration = defineProps({
|
|
113
115
|
...OverlayPositionerPropsDeclaration,
|
|
@@ -142,8 +144,6 @@ const SharedTableHandlePositionerPropsDeclaration = defineProps({
|
|
|
142
144
|
type: "json"
|
|
143
145
|
}
|
|
144
146
|
});
|
|
145
|
-
//#endregion
|
|
146
|
-
//#region src/components/table-handle/table-handle-column-positioner.ts
|
|
147
147
|
/** @internal */
|
|
148
148
|
const TableHandleColumnPositionerPropsDeclaration = defineProps({
|
|
149
149
|
...SharedTableHandlePositionerPropsDeclaration,
|
|
@@ -166,15 +166,29 @@ function setupTableHandleColumnPositioner(host, props) {
|
|
|
166
166
|
}
|
|
167
167
|
const TableHandleColumnPositionerElementBase = defineCustomElement(setupTableHandleColumnPositioner, TableHandleColumnPositionerPropsDeclaration);
|
|
168
168
|
/**
|
|
169
|
-
*
|
|
169
|
+
* `<prosekit-table-handle-column-positioner>` custom element.
|
|
170
|
+
*
|
|
171
|
+
* Properties: {@link TableHandleColumnPositionerProps}
|
|
172
|
+
*
|
|
173
|
+
* Data attributes:
|
|
174
|
+
*
|
|
175
|
+
* | Attribute | Description |
|
|
176
|
+
* | --- | --- |
|
|
177
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
178
|
+
* | `data-side` | The side of the anchor element the positioner is on |
|
|
179
|
+
* | `data-align` | The alignment of the positioner relative to the anchor element |
|
|
180
|
+
*
|
|
181
|
+
* CSS variables:
|
|
182
|
+
*
|
|
183
|
+
* | Variable | Description |
|
|
184
|
+
* | --- | --- |
|
|
185
|
+
* | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |
|
|
170
186
|
*/
|
|
171
187
|
var TableHandleColumnPositionerElement = class extends TableHandleColumnPositionerElementBase {};
|
|
172
188
|
/** @internal */
|
|
173
189
|
function registerTableHandleColumnPositionerElement() {
|
|
174
190
|
registerCustomElement("prosekit-table-handle-column-positioner", TableHandleColumnPositionerElement);
|
|
175
191
|
}
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/components/table-handle/table-handle-column-menu-root.ts
|
|
178
192
|
/** @internal */
|
|
179
193
|
const TableHandleColumnMenuRootPropsDeclaration = defineProps(MenuRootPropsDeclaration);
|
|
180
194
|
/** @internal */
|
|
@@ -190,15 +204,15 @@ function setupTableHandleColumnMenuRoot(host, props) {
|
|
|
190
204
|
}
|
|
191
205
|
const TableHandleColumnMenuRootElementBase = defineCustomElement(setupTableHandleColumnMenuRoot, TableHandleColumnMenuRootPropsDeclaration);
|
|
192
206
|
/**
|
|
193
|
-
*
|
|
207
|
+
* `<prosekit-table-handle-column-menu-root>` custom element.
|
|
208
|
+
*
|
|
209
|
+
* Properties: {@link TableHandleColumnMenuRootProps}
|
|
194
210
|
*/
|
|
195
211
|
var TableHandleColumnMenuRootElement = class extends TableHandleColumnMenuRootElementBase {};
|
|
196
212
|
/** @internal */
|
|
197
213
|
function registerTableHandleColumnMenuRootElement() {
|
|
198
214
|
registerCustomElement("prosekit-table-handle-column-menu-root", TableHandleColumnMenuRootElement);
|
|
199
215
|
}
|
|
200
|
-
//#endregion
|
|
201
|
-
//#region src/components/table-handle/use-empty-image.ts
|
|
202
216
|
/**
|
|
203
217
|
* Returns a function that returns a 1x1 transparent image. This is used to
|
|
204
218
|
* prevent the browser from showing the default drag image. An earth icon in
|
|
@@ -221,8 +235,6 @@ function useEmptyImage(host) {
|
|
|
221
235
|
});
|
|
222
236
|
return () => image;
|
|
223
237
|
}
|
|
224
|
-
//#endregion
|
|
225
|
-
//#region src/components/table-handle/table-handle-column-menu-trigger.ts
|
|
226
238
|
/** @internal */
|
|
227
239
|
const TableHandleColumnMenuTriggerPropsDeclaration = defineProps({ editor: {
|
|
228
240
|
default: null,
|
|
@@ -270,7 +282,9 @@ function setupTableHandleColumnMenuTrigger(host, props) {
|
|
|
270
282
|
}
|
|
271
283
|
const TableHandleColumnMenuTriggerElementBase = defineCustomElement(setupTableHandleColumnMenuTrigger, TableHandleColumnMenuTriggerPropsDeclaration);
|
|
272
284
|
/**
|
|
273
|
-
*
|
|
285
|
+
* `<prosekit-table-handle-column-menu-trigger>` custom element.
|
|
286
|
+
*
|
|
287
|
+
* Properties: {@link TableHandleColumnMenuTriggerProps}
|
|
274
288
|
*/
|
|
275
289
|
var TableHandleColumnMenuTriggerElement = class extends TableHandleColumnMenuTriggerElementBase {};
|
|
276
290
|
/**
|
|
@@ -279,8 +293,6 @@ var TableHandleColumnMenuTriggerElement = class extends TableHandleColumnMenuTri
|
|
|
279
293
|
function registerTableHandleColumnMenuTriggerElement() {
|
|
280
294
|
registerCustomElement("prosekit-table-handle-column-menu-trigger", TableHandleColumnMenuTriggerElement);
|
|
281
295
|
}
|
|
282
|
-
//#endregion
|
|
283
|
-
//#region src/components/table-handle/dnd.ts
|
|
284
296
|
function useInitDndPosition(host, getEditor, onInit) {
|
|
285
297
|
const getStore = tableHandleStoreContext.consume(host);
|
|
286
298
|
useEffect(host, () => {
|
|
@@ -345,8 +357,6 @@ function getDndRelatedDOMs(view, cellPos, draggingIndex, direction) {
|
|
|
345
357
|
cell
|
|
346
358
|
};
|
|
347
359
|
}
|
|
348
|
-
//#endregion
|
|
349
|
-
//#region src/utils/clone-element.ts
|
|
350
360
|
/**
|
|
351
361
|
* Creates a deep clone of an Element, including all computed styles so that
|
|
352
362
|
* it looks almost exactly the same as the original element.
|
|
@@ -407,8 +417,6 @@ function copyStyles(source, target, important) {
|
|
|
407
417
|
}
|
|
408
418
|
return styles.join("\n");
|
|
409
419
|
}
|
|
410
|
-
//#endregion
|
|
411
|
-
//#region src/utils/css-feature-detection.ts
|
|
412
420
|
const isColorMixSupported = once(() => {
|
|
413
421
|
try {
|
|
414
422
|
return CSS.supports("background-color", "color-mix(in srgb, red, blue)");
|
|
@@ -416,8 +424,6 @@ const isColorMixSupported = once(() => {
|
|
|
416
424
|
return false;
|
|
417
425
|
}
|
|
418
426
|
});
|
|
419
|
-
//#endregion
|
|
420
|
-
//#region src/utils/fade-color.ts
|
|
421
427
|
/**
|
|
422
428
|
* Convert a color to a color with opacity
|
|
423
429
|
* @param color - The color to convert
|
|
@@ -430,8 +436,6 @@ function fadeColor(color, opacity) {
|
|
|
430
436
|
return `color-mix(in srgb, ${color} ${opacity * 100}%, transparent ${transparentWeight}%)`;
|
|
431
437
|
}
|
|
432
438
|
}
|
|
433
|
-
//#endregion
|
|
434
|
-
//#region src/utils/get-effective-background-color.ts
|
|
435
439
|
function getEffectiveBackgroundColor(element) {
|
|
436
440
|
let current = element;
|
|
437
441
|
while (current) {
|
|
@@ -440,16 +444,12 @@ function getEffectiveBackgroundColor(element) {
|
|
|
440
444
|
current = current.parentElement;
|
|
441
445
|
}
|
|
442
446
|
}
|
|
443
|
-
//#endregion
|
|
444
|
-
//#region src/utils/inject-style.ts
|
|
445
447
|
function injectStyle(container, styleText) {
|
|
446
448
|
if (!styleText) return;
|
|
447
449
|
const style = getDocument(container).createElement("style");
|
|
448
450
|
style.textContent = styleText;
|
|
449
451
|
container.appendChild(style);
|
|
450
452
|
}
|
|
451
|
-
//#endregion
|
|
452
|
-
//#region src/components/table-handle/render-preview.ts
|
|
453
453
|
function clearPreviewDOM(previewRoot) {
|
|
454
454
|
while (previewRoot.firstChild) previewRoot.removeChild(previewRoot.firstChild);
|
|
455
455
|
}
|
|
@@ -498,8 +498,6 @@ function unsetSize(element) {
|
|
|
498
498
|
maxHeight: "unset"
|
|
499
499
|
});
|
|
500
500
|
}
|
|
501
|
-
//#endregion
|
|
502
|
-
//#region src/components/table-handle/table-handle-drag-preview.ts
|
|
503
501
|
/** @internal */
|
|
504
502
|
const TableHandleDragPreviewPropsDeclaration = defineProps({ editor: {
|
|
505
503
|
default: null,
|
|
@@ -591,7 +589,9 @@ function getVirtualElement(cell, x, y) {
|
|
|
591
589
|
}
|
|
592
590
|
const TableHandleDragPreviewElementBase = defineCustomElement(setupTableHandleDragPreview, TableHandleDragPreviewPropsDeclaration);
|
|
593
591
|
/**
|
|
594
|
-
*
|
|
592
|
+
* `<prosekit-table-handle-drag-preview>` custom element.
|
|
593
|
+
*
|
|
594
|
+
* Properties: {@link TableHandleDragPreviewProps}
|
|
595
595
|
*/
|
|
596
596
|
var TableHandleDragPreviewElement = class extends TableHandleDragPreviewElementBase {};
|
|
597
597
|
/**
|
|
@@ -600,8 +600,6 @@ var TableHandleDragPreviewElement = class extends TableHandleDragPreviewElementB
|
|
|
600
600
|
function registerTableHandleDragPreviewElement() {
|
|
601
601
|
registerCustomElement("prosekit-table-handle-drag-preview", TableHandleDragPreviewElement);
|
|
602
602
|
}
|
|
603
|
-
//#endregion
|
|
604
|
-
//#region src/components/table-handle/calc-drag-over.ts
|
|
605
603
|
function findDragOverElement(elements, pointer, axis) {
|
|
606
604
|
const startProp = axis === "x" ? "left" : "top";
|
|
607
605
|
const endProp = axis === "x" ? "right" : "bottom";
|
|
@@ -625,8 +623,6 @@ function getDragOverColumn(table, pointerX) {
|
|
|
625
623
|
function getDragOverRow(table, pointerY) {
|
|
626
624
|
return findDragOverElement(Array.from(table.querySelectorAll("tr")), pointerY, "y");
|
|
627
625
|
}
|
|
628
|
-
//#endregion
|
|
629
|
-
//#region src/components/table-handle/table-handle-drop-indicator.ts
|
|
630
626
|
const HANDLE_WIDTH = 2;
|
|
631
627
|
/** @internal */
|
|
632
628
|
const TableHandleDropIndicatorPropsDeclaration = defineProps({ editor: {
|
|
@@ -716,7 +712,9 @@ function useUpdateIndicatorPosition(host, getEditor, handleWidth) {
|
|
|
716
712
|
}
|
|
717
713
|
const TableHandleDropIndicatorElementBase = defineCustomElement(setupTableHandleDropIndicator, TableHandleDropIndicatorPropsDeclaration);
|
|
718
714
|
/**
|
|
719
|
-
*
|
|
715
|
+
* `<prosekit-table-handle-drop-indicator>` custom element.
|
|
716
|
+
*
|
|
717
|
+
* Properties: {@link TableHandleDropIndicatorProps}
|
|
720
718
|
*/
|
|
721
719
|
var TableHandleDropIndicatorElement = class extends TableHandleDropIndicatorElementBase {};
|
|
722
720
|
/**
|
|
@@ -725,8 +723,6 @@ var TableHandleDropIndicatorElement = class extends TableHandleDropIndicatorElem
|
|
|
725
723
|
function registerTableHandleDropIndicatorElement() {
|
|
726
724
|
registerCustomElement("prosekit-table-handle-drop-indicator", TableHandleDropIndicatorElement);
|
|
727
725
|
}
|
|
728
|
-
//#endregion
|
|
729
|
-
//#region src/hooks/use-editor-typing.ts
|
|
730
726
|
function useEditorTyping(host, getEditor) {
|
|
731
727
|
const typing = createSignal(false);
|
|
732
728
|
useEditorExtension(host, getEditor, union(defineDOMEventHandler("keypress", () => {
|
|
@@ -736,8 +732,6 @@ function useEditorTyping(host, getEditor) {
|
|
|
736
732
|
})));
|
|
737
733
|
return typing.get;
|
|
738
734
|
}
|
|
739
|
-
//#endregion
|
|
740
|
-
//#region src/hooks/use-selecting.ts
|
|
741
735
|
/**
|
|
742
736
|
* Detect if the user is selecting text inside the editor, in which case some
|
|
743
737
|
* components should be disabled or hidden.
|
|
@@ -772,8 +766,6 @@ function useSelecting(host, getEditor, getEnabled) {
|
|
|
772
766
|
});
|
|
773
767
|
return selecting.get;
|
|
774
768
|
}
|
|
775
|
-
//#endregion
|
|
776
|
-
//#region src/components/table-handle/use-drop.ts
|
|
777
769
|
function useDrop(host, getEditor, store) {
|
|
778
770
|
const getDndStore = () => store.dndStore;
|
|
779
771
|
const getDragging = computed(() => getDndStore().dragging.get());
|
|
@@ -834,8 +826,6 @@ function useDrop(host, getEditor, store) {
|
|
|
834
826
|
};
|
|
835
827
|
});
|
|
836
828
|
}
|
|
837
|
-
//#endregion
|
|
838
|
-
//#region src/components/table-handle/utils.ts
|
|
839
829
|
function isHoveringCellInfoEqual(a, b) {
|
|
840
830
|
if (!a && !b) return true;
|
|
841
831
|
if (!a || !b) return false;
|
|
@@ -881,8 +871,6 @@ function getCellPos(map, tableStart, rowIndex, colIndex) {
|
|
|
881
871
|
function getCellIndex(map, rowIndex, colIndex) {
|
|
882
872
|
return map.width * rowIndex + colIndex;
|
|
883
873
|
}
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region src/components/table-handle/table-handle-root.ts
|
|
886
874
|
/** @internal */
|
|
887
875
|
const TableHandleRootPropsDeclaration = defineProps({ editor: {
|
|
888
876
|
default: null,
|
|
@@ -918,7 +906,9 @@ function defineCellHoverHandler(handler) {
|
|
|
918
906
|
}
|
|
919
907
|
const TableHandleRootElementBase = defineCustomElement(setupTableHandleRoot, TableHandleRootPropsDeclaration);
|
|
920
908
|
/**
|
|
921
|
-
*
|
|
909
|
+
* `<prosekit-table-handle-root>` custom element.
|
|
910
|
+
*
|
|
911
|
+
* Properties: {@link TableHandleRootProps}
|
|
922
912
|
*/
|
|
923
913
|
var TableHandleRootElement = class extends TableHandleRootElementBase {};
|
|
924
914
|
/**
|
|
@@ -927,8 +917,6 @@ var TableHandleRootElement = class extends TableHandleRootElementBase {};
|
|
|
927
917
|
function registerTableHandleRootElement() {
|
|
928
918
|
registerCustomElement("prosekit-table-handle-root", TableHandleRootElement);
|
|
929
919
|
}
|
|
930
|
-
//#endregion
|
|
931
|
-
//#region src/components/table-handle/table-handle-row-popup.ts
|
|
932
920
|
/** @internal */
|
|
933
921
|
const TableHandleRowPopupPropsDeclaration = defineProps({});
|
|
934
922
|
/** @internal */
|
|
@@ -939,15 +927,21 @@ function setupTableHandleRowPopup(host, _props) {
|
|
|
939
927
|
}
|
|
940
928
|
const TableHandleRowPopupElementBase = defineCustomElement(setupTableHandleRowPopup, TableHandleRowPopupPropsDeclaration);
|
|
941
929
|
/**
|
|
942
|
-
*
|
|
930
|
+
* `<prosekit-table-handle-row-popup>` custom element.
|
|
931
|
+
*
|
|
932
|
+
* Properties: {@link TableHandleRowPopupProps}
|
|
933
|
+
*
|
|
934
|
+
* Data attributes:
|
|
935
|
+
*
|
|
936
|
+
* | Attribute | Description |
|
|
937
|
+
* | --- | --- |
|
|
938
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
943
939
|
*/
|
|
944
940
|
var TableHandleRowPopupElement = class extends TableHandleRowPopupElementBase {};
|
|
945
941
|
/** @internal */
|
|
946
942
|
function registerTableHandleRowPopupElement() {
|
|
947
943
|
registerCustomElement("prosekit-table-handle-row-popup", TableHandleRowPopupElement);
|
|
948
944
|
}
|
|
949
|
-
//#endregion
|
|
950
|
-
//#region src/components/table-handle/table-handle-row-positioner.ts
|
|
951
945
|
/** @internal */
|
|
952
946
|
const TableHandleRowPositionerPropsDeclaration = defineProps({
|
|
953
947
|
...SharedTableHandlePositionerPropsDeclaration,
|
|
@@ -970,15 +964,29 @@ function setupTableHandleRowPositioner(host, props) {
|
|
|
970
964
|
}
|
|
971
965
|
const TableHandleRowPositionerElementBase = defineCustomElement(setupTableHandleRowPositioner, TableHandleRowPositionerPropsDeclaration);
|
|
972
966
|
/**
|
|
973
|
-
*
|
|
967
|
+
* `<prosekit-table-handle-row-positioner>` custom element.
|
|
968
|
+
*
|
|
969
|
+
* Properties: {@link TableHandleRowPositionerProps}
|
|
970
|
+
*
|
|
971
|
+
* Data attributes:
|
|
972
|
+
*
|
|
973
|
+
* | Attribute | Description |
|
|
974
|
+
* | --- | --- |
|
|
975
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
976
|
+
* | `data-side` | The side of the anchor element the positioner is on |
|
|
977
|
+
* | `data-align` | The alignment of the positioner relative to the anchor element |
|
|
978
|
+
*
|
|
979
|
+
* CSS variables:
|
|
980
|
+
*
|
|
981
|
+
* | Variable | Description |
|
|
982
|
+
* | --- | --- |
|
|
983
|
+
* | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |
|
|
974
984
|
*/
|
|
975
985
|
var TableHandleRowPositionerElement = class extends TableHandleRowPositionerElementBase {};
|
|
976
986
|
/** @internal */
|
|
977
987
|
function registerTableHandleRowPositionerElement() {
|
|
978
988
|
registerCustomElement("prosekit-table-handle-row-positioner", TableHandleRowPositionerElement);
|
|
979
989
|
}
|
|
980
|
-
//#endregion
|
|
981
|
-
//#region src/components/table-handle/table-handle-row-menu-root.ts
|
|
982
990
|
/** @internal */
|
|
983
991
|
const TableHandleRowMenuRootPropsDeclaration = defineProps(MenuRootPropsDeclaration);
|
|
984
992
|
/** @internal */
|
|
@@ -994,15 +1002,15 @@ function setupTableHandleRowMenuRoot(host, props) {
|
|
|
994
1002
|
}
|
|
995
1003
|
const TableHandleRowMenuRootElementBase = defineCustomElement(setupTableHandleRowMenuRoot, TableHandleRowMenuRootPropsDeclaration);
|
|
996
1004
|
/**
|
|
997
|
-
*
|
|
1005
|
+
* `<prosekit-table-handle-row-menu-root>` custom element.
|
|
1006
|
+
*
|
|
1007
|
+
* Properties: {@link TableHandleRowMenuRootProps}
|
|
998
1008
|
*/
|
|
999
1009
|
var TableHandleRowMenuRootElement = class extends TableHandleRowMenuRootElementBase {};
|
|
1000
1010
|
/** @internal */
|
|
1001
1011
|
function registerTableHandleRowMenuRootElement() {
|
|
1002
1012
|
registerCustomElement("prosekit-table-handle-row-menu-root", TableHandleRowMenuRootElement);
|
|
1003
1013
|
}
|
|
1004
|
-
//#endregion
|
|
1005
|
-
//#region src/components/table-handle/table-handle-row-menu-trigger.ts
|
|
1006
1014
|
/** @internal */
|
|
1007
1015
|
const TableHandleRowMenuTriggerPropsDeclaration = defineProps({ editor: {
|
|
1008
1016
|
default: null,
|
|
@@ -1049,7 +1057,9 @@ function setupTableHandleRowMenuTrigger(host, props) {
|
|
|
1049
1057
|
}
|
|
1050
1058
|
const TableHandleRowMenuTriggerElementBase = defineCustomElement(setupTableHandleRowMenuTrigger, TableHandleRowMenuTriggerPropsDeclaration);
|
|
1051
1059
|
/**
|
|
1052
|
-
*
|
|
1060
|
+
* `<prosekit-table-handle-row-menu-trigger>` custom element.
|
|
1061
|
+
*
|
|
1062
|
+
* Properties: {@link TableHandleRowMenuTriggerProps}
|
|
1053
1063
|
*/
|
|
1054
1064
|
var TableHandleRowMenuTriggerElement = class extends TableHandleRowMenuTriggerElementBase {};
|
|
1055
1065
|
/**
|
|
@@ -1058,7 +1068,6 @@ var TableHandleRowMenuTriggerElement = class extends TableHandleRowMenuTriggerEl
|
|
|
1058
1068
|
function registerTableHandleRowMenuTriggerElement() {
|
|
1059
1069
|
registerCustomElement("prosekit-table-handle-row-menu-trigger", TableHandleRowMenuTriggerElement);
|
|
1060
1070
|
}
|
|
1061
|
-
//#endregion
|
|
1062
1071
|
export { TableHandleColumnMenuRootElement, TableHandleColumnMenuRootPropsDeclaration, TableHandleColumnMenuTriggerElement, TableHandleColumnMenuTriggerPropsDeclaration, TableHandleColumnPopupElement, TableHandleColumnPopupPropsDeclaration, TableHandleColumnPositionerElement, TableHandleColumnPositionerPropsDeclaration, TableHandleDragPreviewElement, TableHandleDragPreviewPropsDeclaration, TableHandleDropIndicatorElement, TableHandleDropIndicatorPropsDeclaration, TableHandleRootElement, TableHandleRootPropsDeclaration, TableHandleRowMenuRootElement, TableHandleRowMenuRootPropsDeclaration, TableHandleRowMenuTriggerElement, TableHandleRowMenuTriggerPropsDeclaration, TableHandleRowPopupElement, TableHandleRowPopupPropsDeclaration, TableHandleRowPositionerElement, TableHandleRowPositionerPropsDeclaration, registerTableHandleColumnMenuRootElement, registerTableHandleColumnMenuTriggerElement, registerTableHandleColumnPopupElement, registerTableHandleColumnPositionerElement, registerTableHandleDragPreviewElement, registerTableHandleDropIndicatorElement, registerTableHandleRootElement, registerTableHandleRowMenuRootElement, registerTableHandleRowMenuTriggerElement, registerTableHandleRowPopupElement, registerTableHandleRowPositionerElement, setupTableHandleColumnMenuRoot, setupTableHandleColumnMenuTrigger, setupTableHandleColumnPopup, setupTableHandleColumnPositioner, setupTableHandleDragPreview, setupTableHandleDropIndicator, setupTableHandleRoot, setupTableHandleRowMenuRoot, setupTableHandleRowMenuTrigger, setupTableHandleRowPopup, setupTableHandleRowPositioner };
|
|
1063
1072
|
|
|
1064
1073
|
//# sourceMappingURL=prosekit-web-table-handle.js.map
|