@prosekit/web 0.8.0-beta.3 → 0.8.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +47 -27
- 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 +43 -33
- 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 +31 -19
- 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 +73 -65
- 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 +0 -4
- package/dist/use-scrolling.js.map +1 -1
- package/package.json +7 -7
- package/src/components/autocomplete/autocomplete-empty.ts +3 -4
- package/src/components/autocomplete/autocomplete-item.ts +11 -1
- 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 +5 -1
- package/src/components/block-handle/block-handle-add.ts +3 -1
- package/src/components/block-handle/block-handle-draggable.ts +9 -1
- 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 +3 -1
- 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 +3 -1
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerCustomElement } from "@aria-ui/core";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import * as Base from "@aria-ui/elements/popover";
|
|
3
|
+
import { OpenChangeEvent, setupPopoverPopup, setupPopoverPositioner, setupPopoverRoot, setupPopoverTrigger } from "@aria-ui/elements/popover";
|
|
4
4
|
/**
|
|
5
5
|
|
|
6
6
|
@module
|
|
@@ -16,19 +16,72 @@ import { OpenChangeEvent, PopoverPopupElement, PopoverPopupElement as PopoverPop
|
|
|
16
16
|
</prosekit-popover-root>
|
|
17
17
|
```
|
|
18
18
|
*/
|
|
19
|
+
/**
|
|
20
|
+
* `<prosekit-popover-popup>` custom element.
|
|
21
|
+
*
|
|
22
|
+
* Properties: {@link PopoverPopupProps}
|
|
23
|
+
*
|
|
24
|
+
* Data attributes:
|
|
25
|
+
*
|
|
26
|
+
* | Attribute | Description |
|
|
27
|
+
* | --- | --- |
|
|
28
|
+
* | `data-state` | `"open"` when the popover is visible, `"closed"` otherwise |
|
|
29
|
+
*/
|
|
30
|
+
var PopoverPopupElement = class extends Base.PopoverPopupElement {};
|
|
31
|
+
/**
|
|
32
|
+
* `<prosekit-popover-positioner>` custom element.
|
|
33
|
+
*
|
|
34
|
+
* Properties: {@link PopoverPositionerProps}
|
|
35
|
+
*
|
|
36
|
+
* Data attributes:
|
|
37
|
+
*
|
|
38
|
+
* | Attribute | Description |
|
|
39
|
+
* | --- | --- |
|
|
40
|
+
* | `data-state` | `"open"` when the popover is visible, `"closed"` otherwise |
|
|
41
|
+
*
|
|
42
|
+
* CSS variables:
|
|
43
|
+
*
|
|
44
|
+
* | Variable | Description |
|
|
45
|
+
* | --- | --- |
|
|
46
|
+
* | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |
|
|
47
|
+
*/
|
|
48
|
+
var PopoverPositionerElement = class extends Base.PopoverPositionerElement {};
|
|
49
|
+
/**
|
|
50
|
+
* `<prosekit-popover-root>` custom element.
|
|
51
|
+
*
|
|
52
|
+
* Properties: {@link PopoverRootProps}
|
|
53
|
+
*
|
|
54
|
+
* Events: {@link PopoverRootEvents}
|
|
55
|
+
*/
|
|
56
|
+
var PopoverRootElement = class extends Base.PopoverRootElement {};
|
|
57
|
+
/**
|
|
58
|
+
* `<prosekit-popover-trigger>` custom element.
|
|
59
|
+
*
|
|
60
|
+
* Properties: {@link PopoverTriggerProps}
|
|
61
|
+
*
|
|
62
|
+
* Events: {@link PopoverTriggerEvents}
|
|
63
|
+
*/
|
|
64
|
+
var PopoverTriggerElement = class extends Base.PopoverTriggerElement {};
|
|
65
|
+
/** @internal */
|
|
66
|
+
const PopoverPopupPropsDeclaration = Base.PopoverPopupPropsDeclaration;
|
|
67
|
+
/** @internal */
|
|
68
|
+
const PopoverPositionerPropsDeclaration = Base.PopoverPositionerPropsDeclaration;
|
|
69
|
+
/** @internal */
|
|
70
|
+
const PopoverRootPropsDeclaration = Base.PopoverRootPropsDeclaration;
|
|
71
|
+
/** @internal */
|
|
72
|
+
const PopoverTriggerPropsDeclaration = Base.PopoverTriggerPropsDeclaration;
|
|
19
73
|
function registerPopoverRootElement() {
|
|
20
|
-
registerCustomElement("prosekit-popover-root", PopoverRootElement
|
|
74
|
+
registerCustomElement("prosekit-popover-root", PopoverRootElement);
|
|
21
75
|
}
|
|
22
76
|
function registerPopoverTriggerElement() {
|
|
23
|
-
registerCustomElement("prosekit-popover-trigger", PopoverTriggerElement
|
|
77
|
+
registerCustomElement("prosekit-popover-trigger", PopoverTriggerElement);
|
|
24
78
|
}
|
|
25
79
|
function registerPopoverPopupElement() {
|
|
26
|
-
registerCustomElement("prosekit-popover-popup", PopoverPopupElement
|
|
80
|
+
registerCustomElement("prosekit-popover-popup", PopoverPopupElement);
|
|
27
81
|
}
|
|
28
82
|
function registerPopoverPositionerElement() {
|
|
29
|
-
registerCustomElement("prosekit-popover-positioner", PopoverPositionerElement
|
|
83
|
+
registerCustomElement("prosekit-popover-positioner", PopoverPositionerElement);
|
|
30
84
|
}
|
|
31
|
-
//#endregion
|
|
32
85
|
export { OpenChangeEvent, PopoverPopupElement, PopoverPopupPropsDeclaration, PopoverPositionerElement, PopoverPositionerPropsDeclaration, PopoverRootElement, PopoverRootPropsDeclaration, PopoverTriggerElement, PopoverTriggerPropsDeclaration, registerPopoverPopupElement, registerPopoverPositionerElement, registerPopoverRootElement, registerPopoverTriggerElement, setupPopoverPopup, setupPopoverPositioner, setupPopoverRoot, setupPopoverTrigger };
|
|
33
86
|
|
|
34
87
|
//# sourceMappingURL=prosekit-web-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-web-popover.js","names":[
|
|
1
|
+
{"version":3,"file":"prosekit-web-popover.js","names":[],"sources":["../src/components/popover/index.ts"],"sourcesContent":["/**\n\n@module\n\n## Anatomy\n\n```html\n<prosekit-popover-root>\n <prosekit-popover-trigger>...</prosekit-popover-trigger>\n <prosekit-popover-positioner>\n <prosekit-popover-popup>...</prosekit-popover-popup>\n </prosekit-popover-positioner>\n</prosekit-popover-root>\n```\n*/\n\nimport { registerCustomElement, type PropsDeclaration } from '@aria-ui/core'\nimport * as Base from '@aria-ui/elements/popover'\n\n/**\n * `<prosekit-popover-popup>` custom element.\n *\n * Properties: {@link PopoverPopupProps}\n *\n * Data attributes:\n *\n * | Attribute | Description |\n * | --- | --- |\n * | `data-state` | `\"open\"` when the popover is visible, `\"closed\"` otherwise |\n */\nexport class PopoverPopupElement extends Base.PopoverPopupElement {}\n\n/**\n * `<prosekit-popover-positioner>` custom element.\n *\n * Properties: {@link PopoverPositionerProps}\n *\n * Data attributes:\n *\n * | Attribute | Description |\n * | --- | --- |\n * | `data-state` | `\"open\"` when the popover is visible, `\"closed\"` otherwise |\n *\n * CSS variables:\n *\n * | Variable | Description |\n * | --- | --- |\n * | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |\n */\nexport class PopoverPositionerElement extends Base.PopoverPositionerElement {}\n\n/**\n * `<prosekit-popover-root>` custom element.\n *\n * Properties: {@link PopoverRootProps}\n *\n * Events: {@link PopoverRootEvents}\n */\nexport class PopoverRootElement extends Base.PopoverRootElement {}\n\n/**\n * `<prosekit-popover-trigger>` custom element.\n *\n * Properties: {@link PopoverTriggerProps}\n *\n * Events: {@link PopoverTriggerEvents}\n */\nexport class PopoverTriggerElement extends Base.PopoverTriggerElement {}\n\nexport interface PopoverPopupProps extends Base.PopoverPopupProps {}\nexport interface PopoverPositionerProps extends Base.PopoverPositionerProps {}\nexport interface PopoverRootProps extends Base.PopoverRootProps {}\nexport interface PopoverTriggerProps extends Base.PopoverTriggerProps {}\n\nexport interface PopoverRootEvents extends Base.PopoverRootEvents {}\nexport interface PopoverTriggerEvents extends Base.PopoverTriggerEvents {}\n\n/** @internal */\nexport const PopoverPopupPropsDeclaration: PropsDeclaration<PopoverPopupProps> = Base.PopoverPopupPropsDeclaration\n/** @internal */\nexport const PopoverPositionerPropsDeclaration: PropsDeclaration<PopoverPositionerProps> = Base.PopoverPositionerPropsDeclaration\n/** @internal */\nexport const PopoverRootPropsDeclaration: PropsDeclaration<PopoverRootProps> = Base.PopoverRootPropsDeclaration\n/** @internal */\nexport const PopoverTriggerPropsDeclaration: PropsDeclaration<PopoverTriggerProps> = Base.PopoverTriggerPropsDeclaration\n\nexport function registerPopoverRootElement(): void {\n registerCustomElement('prosekit-popover-root', PopoverRootElement)\n}\nexport function registerPopoverTriggerElement(): void {\n registerCustomElement('prosekit-popover-trigger', PopoverTriggerElement)\n}\nexport function registerPopoverPopupElement(): void {\n registerCustomElement('prosekit-popover-popup', PopoverPopupElement)\n}\nexport function registerPopoverPositionerElement(): void {\n registerCustomElement('prosekit-popover-positioner', PopoverPositionerElement)\n}\n\nexport {\n OpenChangeEvent,\n setupPopoverPopup,\n setupPopoverPositioner,\n setupPopoverRoot,\n setupPopoverTrigger,\n} from '@aria-ui/elements/popover'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAa,sBAAb,cAAyC,KAAK,oBAAoB;;;;;;;;;;;;;;;;;;AAmBlE,IAAa,2BAAb,cAA8C,KAAK,yBAAyB;;;;;;;;AAS5E,IAAa,qBAAb,cAAwC,KAAK,mBAAmB;;;;;;;;AAShE,IAAa,wBAAb,cAA2C,KAAK,sBAAsB;;AAWtE,MAAa,+BAAoE,KAAK;;AAEtF,MAAa,oCAA8E,KAAK;;AAEhG,MAAa,8BAAkE,KAAK;;AAEpF,MAAa,iCAAwE,KAAK;AAE1F,SAAgB,6BAAmC;AACjD,uBAAsB,yBAAyB,mBAAmB;;AAEpE,SAAgB,gCAAsC;AACpD,uBAAsB,4BAA4B,sBAAsB;;AAE1E,SAAgB,8BAAoC;AAClD,uBAAsB,0BAA0B,oBAAoB;;AAEtE,SAAgB,mCAAyC;AACvD,uBAAsB,+BAA+B,yBAAyB"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { HostElement, HostElementConstructor, PropsDeclaration, State } from "@aria-ui/core";
|
|
2
|
-
|
|
3
|
-
//#region src/components/resizable/resizable-root.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* @public
|
|
6
4
|
*/
|
|
@@ -67,15 +65,23 @@ declare class ResizeEndEvent extends Event {
|
|
|
67
65
|
declare function setupResizableRoot(host: HostElement, props: State<ResizableRootProps>): void;
|
|
68
66
|
declare const ResizableRootElementBase: HostElementConstructor<ResizableRootProps>;
|
|
69
67
|
/**
|
|
70
|
-
*
|
|
68
|
+
* `<prosekit-resizable-root>` custom element.
|
|
69
|
+
*
|
|
70
|
+
* Properties: {@link ResizableRootProps}
|
|
71
|
+
*
|
|
72
|
+
* Events: {@link ResizableRootEvents}
|
|
73
|
+
*
|
|
74
|
+
* Data attributes:
|
|
75
|
+
*
|
|
76
|
+
* | Attribute | Description |
|
|
77
|
+
* | --- | --- |
|
|
78
|
+
* | `data-resizing` | Present when the element is being resized |
|
|
71
79
|
*/
|
|
72
80
|
declare class ResizableRootElement extends ResizableRootElementBase {}
|
|
73
81
|
/**
|
|
74
82
|
* @internal
|
|
75
83
|
*/
|
|
76
84
|
declare function registerResizableRootElement(): void;
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/components/resizable/resizable-handle.d.ts
|
|
79
85
|
/**
|
|
80
86
|
* @public
|
|
81
87
|
*/
|
|
@@ -97,13 +103,14 @@ declare const ResizableHandlePropsDeclaration: PropsDeclaration<ResizableHandleP
|
|
|
97
103
|
declare function setupResizableHandle(host: HostElement, props: State<ResizableHandleProps>): void;
|
|
98
104
|
declare const ResizableHandleElementBase: HostElementConstructor<ResizableHandleProps>;
|
|
99
105
|
/**
|
|
100
|
-
*
|
|
106
|
+
* `<prosekit-resizable-handle>` custom element.
|
|
107
|
+
*
|
|
108
|
+
* Properties: {@link ResizableHandleProps}
|
|
101
109
|
*/
|
|
102
110
|
declare class ResizableHandleElement extends ResizableHandleElementBase {}
|
|
103
111
|
/**
|
|
104
112
|
* @internal
|
|
105
113
|
*/
|
|
106
114
|
declare function registerResizableHandleElement(): void;
|
|
107
|
-
//#endregion
|
|
108
115
|
export { ResizableHandleElement, type ResizableHandleProps, ResizableHandlePropsDeclaration, ResizableRootElement, type ResizableRootEvents, type ResizableRootProps, ResizableRootPropsDeclaration, ResizeEndEvent, ResizeStartEvent, registerResizableHandleElement, registerResizableRootElement, setupResizableHandle, setupResizableRoot };
|
|
109
116
|
//# sourceMappingURL=prosekit-web-resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-web-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.ts","../src/components/resizable/resizable-handle.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-web-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.ts","../src/components/resizable/resizable-handle.ts"],"mappings":";AAkBA;;;AAAA,UAAiB,kBAAA;EAMf;;;;;EAAA,KAAA;EAwBA;;;;AAKF;EAtBE,MAAA;;;;;;EAOA,WAAA;AAAA;;AA8BF;;cAxBa,6BAAA,EAA+B,gBAAA,CAAiB,kBAAA;;;;UAS5C,mBAAA;EAkBJ;;;EAdX,WAAA,EAAa,gBAAA;EAgB4B;;AAS3C;EApBE,SAAA,EAAW,cAAA;AAAA;;;;cAMA,gBAAA,SAAyB,KAAA;EAAA,SAC3B,MAAA;IAAA,SACE,KAAA;IAAA,SACA,MAAA;EAAA;cAEC,KAAA,UAAe,MAAA;AAAA;AAuB7B;;;AAAA,cAda,cAAA,SAAuB,KAAA;EAAA,SACzB,MAAA;IAAA,SACE,KAAA;IAAA,SACA,MAAA;EAAA;cAEC,KAAA,UAAe,MAAA;AAAA;;;;iBASb,kBAAA,CACd,IAAA,EAAM,WAAA,EACN,KAAA,EAAO,KAAA,CAAM,kBAAA;AAAA,cAkET,wBAAA,EAA0B,sBAAA,CAAuB,kBAAA;AAvBtD;;;;;AAyCD;;;;;AAOA;;;AAhDC,cAyCY,oBAAA,SAA6B,wBAAA;;AC5K1C;;iBDmLgB,4BAAA,CAAA;AA3KhB;;;AAAA,UCRiB,oBAAA;EDcf;;;;;ECRA,QAAA;AAAA;;;;cAcW,+BAAA,EAAiC,gBAAA,CAAiB,oBAAA;;;;iBAO/C,oBAAA,CACd,IAAA,EAAM,WAAA,EACN,KAAA,EAAO,KAAA,CAAM,oBAAA;AAAA,cA2ET,0BAAA,EAA4B,sBAAA,CAAuB,oBAAA;;;;;AD9CzD;cCwDa,sBAAA,SAA+B,0BAAA;;;;iBAO5B,8BAAA,CAAA"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { createContext, createSignal, defineCustomElement, defineProps, registerCustomElement, useEffect } from "@aria-ui/core";
|
|
2
2
|
import { useAttribute } from "@aria-ui/utils";
|
|
3
3
|
import { getWindow } from "@ocavue/utils";
|
|
4
|
-
//#region src/utils/is-finite-positive-number.ts
|
|
5
4
|
function isFinitePositiveNumber(value) {
|
|
6
5
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
7
6
|
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#region src/components/resizable/context.ts
|
|
10
7
|
/**
|
|
11
8
|
* @internal
|
|
12
9
|
*/
|
|
@@ -19,8 +16,6 @@ const onResizeStartContext = createContext("prosekit/resizable/onResizeStart");
|
|
|
19
16
|
* @internal
|
|
20
17
|
*/
|
|
21
18
|
const onResizeEndContext = createContext("prosekit/resizable/onResizeEnd");
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/components/resizable/resizable-root.ts
|
|
24
19
|
/**
|
|
25
20
|
* @internal
|
|
26
21
|
*/
|
|
@@ -110,7 +105,17 @@ function updateResizableRootStyles(host, width, height, aspectRatio) {
|
|
|
110
105
|
}
|
|
111
106
|
const ResizableRootElementBase = defineCustomElement(setupResizableRoot, ResizableRootPropsDeclaration);
|
|
112
107
|
/**
|
|
113
|
-
*
|
|
108
|
+
* `<prosekit-resizable-root>` custom element.
|
|
109
|
+
*
|
|
110
|
+
* Properties: {@link ResizableRootProps}
|
|
111
|
+
*
|
|
112
|
+
* Events: {@link ResizableRootEvents}
|
|
113
|
+
*
|
|
114
|
+
* Data attributes:
|
|
115
|
+
*
|
|
116
|
+
* | Attribute | Description |
|
|
117
|
+
* | --- | --- |
|
|
118
|
+
* | `data-resizing` | Present when the element is being resized |
|
|
114
119
|
*/
|
|
115
120
|
var ResizableRootElement = class extends ResizableRootElementBase {};
|
|
116
121
|
let isResizableRootRegistered = false;
|
|
@@ -122,8 +127,6 @@ function registerResizableRootElement() {
|
|
|
122
127
|
isResizableRootRegistered = true;
|
|
123
128
|
registerCustomElement("prosekit-resizable-root", ResizableRootElement);
|
|
124
129
|
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/components/resizable/calc-resize.ts
|
|
127
130
|
function calcResize(position, w, h, dx, dy, aspectRatio) {
|
|
128
131
|
aspectRatio = aspectRatio ? aspectRatio : w / h;
|
|
129
132
|
aspectRatio = isFinitePositiveNumber(aspectRatio) ? aspectRatio : 1;
|
|
@@ -194,8 +197,6 @@ const calcLeftResize = (w, h, dx, dy, r) => {
|
|
|
194
197
|
function clamp([w, h]) {
|
|
195
198
|
return [Math.max(w, 1), Math.max(h, 1)];
|
|
196
199
|
}
|
|
197
|
-
//#endregion
|
|
198
|
-
//#region src/components/resizable/resizable-handle.ts
|
|
199
200
|
/**
|
|
200
201
|
* @internal
|
|
201
202
|
*/
|
|
@@ -256,7 +257,9 @@ function setupResizableHandle(host, props) {
|
|
|
256
257
|
}
|
|
257
258
|
const ResizableHandleElementBase = defineCustomElement(setupResizableHandle, ResizableHandlePropsDeclaration);
|
|
258
259
|
/**
|
|
259
|
-
*
|
|
260
|
+
* `<prosekit-resizable-handle>` custom element.
|
|
261
|
+
*
|
|
262
|
+
* Properties: {@link ResizableHandleProps}
|
|
260
263
|
*/
|
|
261
264
|
var ResizableHandleElement = class extends ResizableHandleElementBase {};
|
|
262
265
|
let isResizableHandleRegistered = false;
|
|
@@ -268,7 +271,6 @@ function registerResizableHandleElement() {
|
|
|
268
271
|
isResizableHandleRegistered = true;
|
|
269
272
|
registerCustomElement("prosekit-resizable-handle", ResizableHandleElement);
|
|
270
273
|
}
|
|
271
|
-
//#endregion
|
|
272
274
|
export { ResizableHandleElement, ResizableHandlePropsDeclaration, ResizableRootElement, ResizableRootPropsDeclaration, ResizeEndEvent, ResizeStartEvent, registerResizableHandleElement, registerResizableRootElement, setupResizableHandle, setupResizableRoot };
|
|
273
275
|
|
|
274
276
|
//# sourceMappingURL=prosekit-web-resizable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-web-resizable.js","names":[],"sources":["../src/utils/is-finite-positive-number.ts","../src/components/resizable/context.ts","../src/components/resizable/resizable-root.ts","../src/components/resizable/calc-resize.ts","../src/components/resizable/resizable-handle.ts"],"sourcesContent":["export function isFinitePositiveNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0\n}\n","import { createContext, type Context } from '@aria-ui/core'\n\n/**\n * @internal\n */\nexport const onResizeContext: Context<OnResize> = createContext<OnResize>(\n 'prosekit/resizable/onResize',\n)\n\n/**\n * @internal\n */\nexport const onResizeStartContext: Context<OnResizeStart> = createContext<OnResizeStart>(\n 'prosekit/resizable/onResizeStart',\n)\n\n/**\n * @internal\n */\nexport const onResizeEndContext: Context<OnResizeEnd> = createContext<OnResizeEnd>(\n 'prosekit/resizable/onResizeEnd',\n)\n\n/**\n * @internal\n */\nexport type OnResize = ((width: number, height: number) => void) | null\n\n/**\n * @internal\n */\nexport type OnResizeStart =\n | (() => readonly [width: number, height: number, aspectRatio: number])\n | null\n\n/**\n * @internal\n */\nexport type OnResizeEnd = (() => void) | null\n","import type { HostElement, HostElementConstructor, PropsDeclaration } from '@aria-ui/core'\nimport { createSignal, defineCustomElement, defineProps, registerCustomElement, useEffect, type State } from '@aria-ui/core'\nimport { useAttribute } from '@aria-ui/utils'\n\nimport { isFinitePositiveNumber } from '../../utils/is-finite-positive-number.ts'\n\nimport {\n onResizeContext,\n onResizeEndContext,\n onResizeStartContext,\n type OnResize,\n type OnResizeEnd,\n type OnResizeStart,\n} from './context.ts'\n\n/**\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width: number | null\n\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height: number | null\n\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio: number | null\n}\n\n/**\n * @internal\n */\nexport const ResizableRootPropsDeclaration: PropsDeclaration<ResizableRootProps> = defineProps<ResizableRootProps>({\n width: { default: null, attribute: 'data-width', type: 'json' },\n height: { default: null, attribute: 'data-height', type: 'json' },\n aspectRatio: { default: null, attribute: 'data-aspect-ratio', type: 'json' },\n})\n\n/**\n * @public\n */\nexport interface ResizableRootEvents {\n /**\n * Emitted when a resize operation starts.\n */\n resizeStart: ResizeStartEvent\n\n /**\n * Emitted when a resize operation ends.\n */\n resizeEnd: ResizeEndEvent\n}\n\n/**\n * @public\n */\nexport class ResizeStartEvent extends Event {\n readonly detail: {\n readonly width: number\n readonly height: number\n }\n constructor(width: number, height: number) {\n super('resizeStart')\n this.detail = { width, height }\n }\n}\n\n/**\n * @public\n */\nexport class ResizeEndEvent extends Event {\n readonly detail: {\n readonly width: number\n readonly height: number\n }\n constructor(width: number, height: number) {\n super('resizeEnd')\n this.detail = { width, height }\n }\n}\n\n/**\n * @internal\n */\nexport function setupResizableRoot(\n host: HostElement,\n props: State<ResizableRootProps>,\n): void {\n const resizing = createSignal(false)\n\n const onResizeStart: OnResizeStart = () => {\n const { width, height } = host.getBoundingClientRect()\n\n let aspectRatio: number = props.aspectRatio.get() ?? width / height\n\n if (!isFinitePositiveNumber(aspectRatio)) {\n aspectRatio = 0\n }\n\n resizing.set(true)\n host.dispatchEvent(new ResizeStartEvent(width, height))\n return [width, height, aspectRatio]\n }\n\n const onResize: OnResize = (width, height) => {\n props.width.set(width)\n props.height.set(height)\n }\n\n const onResizeEnd: OnResizeEnd = () => {\n const { width, height } = host.getBoundingClientRect()\n resizing.set(false)\n host.dispatchEvent(new ResizeEndEvent(width, height))\n }\n\n onResizeStartContext.provide(host, onResizeStart)\n onResizeContext.provide(host, onResize)\n onResizeEndContext.provide(host, onResizeEnd)\n\n useEffect(host, () => {\n updateResizableRootStyles(\n host,\n Math.max(props.width.get() || 0, 1),\n Math.max(props.height.get() || 0, 1),\n props.aspectRatio.get(),\n )\n })\n\n useAttribute(host, 'data-resizing', () => (resizing.get() ? '' : undefined))\n}\n\nfunction updateResizableRootStyles(\n host: HostElement,\n width: number,\n height: number,\n aspectRatio: number | null,\n) {\n host.style.width = isFinitePositiveNumber(width) ? `${width}px` : ''\n\n host.style.height = isFinitePositiveNumber(height) ? `${height}px` : ''\n\n if (isFinitePositiveNumber(aspectRatio)) {\n host.style.aspectRatio = `${aspectRatio}`\n\n if (width && width > 0 && aspectRatio >= 1) {\n host.style.height = 'auto'\n } else if (height && height > 0 && aspectRatio <= 1) {\n host.style.width = 'min-content'\n }\n }\n}\n\nconst ResizableRootElementBase: HostElementConstructor<ResizableRootProps> = defineCustomElement(\n setupResizableRoot,\n ResizableRootPropsDeclaration,\n)\n\n/**\n * @public\n */\nexport class ResizableRootElement extends ResizableRootElementBase {}\n\nlet isResizableRootRegistered = false\n\n/**\n * @internal\n */\nexport function registerResizableRootElement(): void {\n if (isResizableRootRegistered) return\n isResizableRootRegistered = true\n registerCustomElement('prosekit-resizable-root', ResizableRootElement)\n}\n","import { isFinitePositiveNumber } from '../../utils/is-finite-positive-number.ts'\n\nexport function calcResize(\n position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right',\n w: number,\n h: number,\n dx: number,\n dy: number,\n aspectRatio: number | null | undefined,\n): [w: number, h: number] {\n aspectRatio = aspectRatio ? aspectRatio : w / h\n aspectRatio = isFinitePositiveNumber(aspectRatio) ? aspectRatio : 1\n\n switch (position) {\n case 'bottom-right':\n return clamp(calcBottomRightResize(w, h, dx, dy, aspectRatio))\n case 'bottom-left':\n return clamp(calcBottomLeftResize(w, h, dx, dy, aspectRatio))\n case 'top-right':\n return clamp(calcTopRightResize(w, h, dx, dy, aspectRatio))\n case 'top-left':\n return clamp(calcTopLeftResize(w, h, dx, dy, aspectRatio))\n case 'top':\n return clamp(calcTopResize(w, h, dx, dy, aspectRatio))\n case 'right':\n return clamp(calcRightResize(w, h, dx, dy, aspectRatio))\n case 'bottom':\n return clamp(calcBottomResize(w, h, dx, dy, aspectRatio))\n case 'left':\n return clamp(calcLeftResize(w, h, dx, dy, aspectRatio))\n default:\n throw new RangeError(`Invalid position: ${position}`)\n }\n}\n\ntype CalcResize = (\n w: number,\n h: number,\n dx: number,\n dy: number,\n aspectRatio: number,\n) => [w: number, h: number]\n\nconst calcBottomRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h += dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcBottomLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h += dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h -= dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h -= dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopResize: CalcResize = (w, h, dx, dy, r) => {\n h -= dy\n w = h * r\n return [w, h]\n}\n\nconst calcRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h = w / r\n return [w, h]\n}\n\nconst calcBottomResize: CalcResize = (w, h, dx, dy, r) => {\n h += dy\n w = h * r\n return [w, h]\n}\n\nconst calcLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h = w / r\n return [w, h]\n}\n\nfunction clamp([w, h]: [number, number]): [number, number] {\n return [\n Math.max(w, 1),\n Math.max(h, 1),\n ]\n}\n","import type { HostElement, HostElementConstructor, PropsDeclaration } from '@aria-ui/core'\nimport { createSignal, defineCustomElement, defineProps, registerCustomElement, useEffect, type State } from '@aria-ui/core'\nimport { getWindow } from '@ocavue/utils'\n\nimport { calcResize } from './calc-resize.ts'\nimport { onResizeContext, onResizeEndContext, onResizeStartContext } from './context.ts'\n\n/**\n * @public\n */\nexport interface ResizableHandleProps {\n /**\n * The position of the handle.\n *\n * @default \"bottom-right\"\n */\n position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n}\n\n/**\n * @internal\n */\nexport const ResizableHandlePropsDeclaration: PropsDeclaration<ResizableHandleProps> = defineProps<ResizableHandleProps>({\n position: { default: 'bottom-right', attribute: 'position', type: 'string' },\n})\n\n/**\n * @internal\n */\nexport function setupResizableHandle(\n host: HostElement,\n props: State<ResizableHandleProps>,\n): void {\n const getOnResize = onResizeContext.consume(host)\n const getOnResizeStart = onResizeStartContext.consume(host)\n const getOnResizeEnd = onResizeEndContext.consume(host)\n\n let startX = 0\n let startY = 0\n let width = 0\n let height = 0\n let aspectRatio = 1\n\n const pointerPressing = createSignal(false)\n\n const handlePointerDown = (event: PointerEvent) => {\n event.preventDefault()\n pointerPressing.set(true)\n\n startX = event.x\n startY = event.y\n\n const size = getOnResizeStart()?.()\n if (size) {\n ;[width, height, aspectRatio] = size\n }\n }\n\n const handlePointerMove = (event: PointerEvent) => {\n event.preventDefault()\n\n const dx = event.x - startX\n const dy = event.y - startY\n\n const [w, h] = calcResize(\n props.position.get(),\n width,\n height,\n dx,\n dy,\n aspectRatio,\n )\n\n getOnResize()?.(w, h)\n }\n\n const handlePointerUp = (event: PointerEvent) => {\n event.preventDefault()\n pointerPressing.set(false)\n\n getOnResizeEnd()?.()\n }\n\n useEffect(host, () => {\n host.addEventListener('pointerdown', handlePointerDown)\n return () => {\n host.removeEventListener('pointerdown', handlePointerDown)\n }\n })\n\n useEffect(host, () => {\n if (!pointerPressing.get()) {\n return\n }\n\n const win = getWindow(host)\n\n win.addEventListener('pointermove', handlePointerMove)\n win.addEventListener('pointerup', handlePointerUp)\n return () => {\n win.removeEventListener('pointermove', handlePointerMove)\n win.removeEventListener('pointerup', handlePointerUp)\n }\n })\n}\n\nconst ResizableHandleElementBase: HostElementConstructor<ResizableHandleProps> = defineCustomElement(\n setupResizableHandle,\n ResizableHandlePropsDeclaration,\n)\n\n/**\n * @public\n */\nexport class ResizableHandleElement extends ResizableHandleElementBase {}\n\nlet isResizableHandleRegistered = false\n\n/**\n * @internal\n */\nexport function registerResizableHandleElement(): void {\n if (isResizableHandleRegistered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AAS,KAAK,EACpB,OACA,QACA,IACA,IACA,YACD;AAED,eAAa,GAAG,GAAG,EAAE;;CAGvB,MAAM,mBAAmB,UAAwB;AAC/C,QAAM,gBAAgB;AACtB,kBAAgB,IAAI,MAAM;AAE1B,kBAAgB,IAAI;;AAGtB,WAAU,YAAY;AACpB,OAAK,iBAAiB,eAAe,kBAAkB;AACvD,eAAa;AACX,QAAK,oBAAoB,eAAe,kBAAkB;;GAE5D;AAEF,WAAU,YAAY;AACpB,MAAI,CAAC,gBAAgB,KAAK,CACxB;EAGF,MAAM,MAAM,UAAU,KAAK;AAE3B,MAAI,iBAAiB,eAAe,kBAAkB;AACtD,MAAI,iBAAiB,aAAa,gBAAgB;AAClD,eAAa;AACX,OAAI,oBAAoB,eAAe,kBAAkB;AACzD,OAAI,oBAAoB,aAAa,gBAAgB;;GAEvD;;AAGJ,MAAM,6BAA2E,oBAC/E,sBACA,gCACD;;;;AAKD,IAAa,yBAAb,cAA4C,2BAA2B;AAEvE,IAAI,8BAA8B;;;;AAKlC,SAAgB,iCAAuC;AACrD,KAAI,4BAA6B;AACjC,+BAA8B;AAC9B,uBAAsB,6BAA6B,uBAAuB"}
|
|
1
|
+
{"version":3,"file":"prosekit-web-resizable.js","names":[],"sources":["../src/utils/is-finite-positive-number.ts","../src/components/resizable/context.ts","../src/components/resizable/resizable-root.ts","../src/components/resizable/calc-resize.ts","../src/components/resizable/resizable-handle.ts"],"sourcesContent":["export function isFinitePositiveNumber(value: unknown): value is number {\n return typeof value === 'number' && Number.isFinite(value) && value > 0\n}\n","import { createContext, type Context } from '@aria-ui/core'\n\n/**\n * @internal\n */\nexport const onResizeContext: Context<OnResize> = createContext<OnResize>(\n 'prosekit/resizable/onResize',\n)\n\n/**\n * @internal\n */\nexport const onResizeStartContext: Context<OnResizeStart> = createContext<OnResizeStart>(\n 'prosekit/resizable/onResizeStart',\n)\n\n/**\n * @internal\n */\nexport const onResizeEndContext: Context<OnResizeEnd> = createContext<OnResizeEnd>(\n 'prosekit/resizable/onResizeEnd',\n)\n\n/**\n * @internal\n */\nexport type OnResize = ((width: number, height: number) => void) | null\n\n/**\n * @internal\n */\nexport type OnResizeStart =\n | (() => readonly [width: number, height: number, aspectRatio: number])\n | null\n\n/**\n * @internal\n */\nexport type OnResizeEnd = (() => void) | null\n","import type { HostElement, HostElementConstructor, PropsDeclaration } from '@aria-ui/core'\nimport { createSignal, defineCustomElement, defineProps, registerCustomElement, useEffect, type State } from '@aria-ui/core'\nimport { useAttribute } from '@aria-ui/utils'\n\nimport { isFinitePositiveNumber } from '../../utils/is-finite-positive-number.ts'\n\nimport {\n onResizeContext,\n onResizeEndContext,\n onResizeStartContext,\n type OnResize,\n type OnResizeEnd,\n type OnResizeStart,\n} from './context.ts'\n\n/**\n * @public\n */\nexport interface ResizableRootProps {\n /**\n * The width of the resizable element.\n *\n * @default null\n */\n width: number | null\n\n /**\n * The height of the resizable element.\n *\n * @default null\n */\n height: number | null\n\n /**\n * The aspect ratio of the resizable element.\n *\n * @default null\n */\n aspectRatio: number | null\n}\n\n/**\n * @internal\n */\nexport const ResizableRootPropsDeclaration: PropsDeclaration<ResizableRootProps> = defineProps<ResizableRootProps>({\n width: { default: null, attribute: 'data-width', type: 'json' },\n height: { default: null, attribute: 'data-height', type: 'json' },\n aspectRatio: { default: null, attribute: 'data-aspect-ratio', type: 'json' },\n})\n\n/**\n * @public\n */\nexport interface ResizableRootEvents {\n /**\n * Emitted when a resize operation starts.\n */\n resizeStart: ResizeStartEvent\n\n /**\n * Emitted when a resize operation ends.\n */\n resizeEnd: ResizeEndEvent\n}\n\n/**\n * @public\n */\nexport class ResizeStartEvent extends Event {\n readonly detail: {\n readonly width: number\n readonly height: number\n }\n constructor(width: number, height: number) {\n super('resizeStart')\n this.detail = { width, height }\n }\n}\n\n/**\n * @public\n */\nexport class ResizeEndEvent extends Event {\n readonly detail: {\n readonly width: number\n readonly height: number\n }\n constructor(width: number, height: number) {\n super('resizeEnd')\n this.detail = { width, height }\n }\n}\n\n/**\n * @internal\n */\nexport function setupResizableRoot(\n host: HostElement,\n props: State<ResizableRootProps>,\n): void {\n const resizing = createSignal(false)\n\n const onResizeStart: OnResizeStart = () => {\n const { width, height } = host.getBoundingClientRect()\n\n let aspectRatio: number = props.aspectRatio.get() ?? width / height\n\n if (!isFinitePositiveNumber(aspectRatio)) {\n aspectRatio = 0\n }\n\n resizing.set(true)\n host.dispatchEvent(new ResizeStartEvent(width, height))\n return [width, height, aspectRatio]\n }\n\n const onResize: OnResize = (width, height) => {\n props.width.set(width)\n props.height.set(height)\n }\n\n const onResizeEnd: OnResizeEnd = () => {\n const { width, height } = host.getBoundingClientRect()\n resizing.set(false)\n host.dispatchEvent(new ResizeEndEvent(width, height))\n }\n\n onResizeStartContext.provide(host, onResizeStart)\n onResizeContext.provide(host, onResize)\n onResizeEndContext.provide(host, onResizeEnd)\n\n useEffect(host, () => {\n updateResizableRootStyles(\n host,\n Math.max(props.width.get() || 0, 1),\n Math.max(props.height.get() || 0, 1),\n props.aspectRatio.get(),\n )\n })\n\n useAttribute(host, 'data-resizing', () => (resizing.get() ? '' : undefined))\n}\n\nfunction updateResizableRootStyles(\n host: HostElement,\n width: number,\n height: number,\n aspectRatio: number | null,\n) {\n host.style.width = isFinitePositiveNumber(width) ? `${width}px` : ''\n\n host.style.height = isFinitePositiveNumber(height) ? `${height}px` : ''\n\n if (isFinitePositiveNumber(aspectRatio)) {\n host.style.aspectRatio = `${aspectRatio}`\n\n if (width && width > 0 && aspectRatio >= 1) {\n host.style.height = 'auto'\n } else if (height && height > 0 && aspectRatio <= 1) {\n host.style.width = 'min-content'\n }\n }\n}\n\nconst ResizableRootElementBase: HostElementConstructor<ResizableRootProps> = defineCustomElement(\n setupResizableRoot,\n ResizableRootPropsDeclaration,\n)\n\n/**\n * `<prosekit-resizable-root>` custom element.\n *\n * Properties: {@link ResizableRootProps}\n *\n * Events: {@link ResizableRootEvents}\n *\n * Data attributes:\n *\n * | Attribute | Description |\n * | --- | --- |\n * | `data-resizing` | Present when the element is being resized |\n */\nexport class ResizableRootElement extends ResizableRootElementBase {}\n\nlet isResizableRootRegistered = false\n\n/**\n * @internal\n */\nexport function registerResizableRootElement(): void {\n if (isResizableRootRegistered) return\n isResizableRootRegistered = true\n registerCustomElement('prosekit-resizable-root', ResizableRootElement)\n}\n","import { isFinitePositiveNumber } from '../../utils/is-finite-positive-number.ts'\n\nexport function calcResize(\n position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right',\n w: number,\n h: number,\n dx: number,\n dy: number,\n aspectRatio: number | null | undefined,\n): [w: number, h: number] {\n aspectRatio = aspectRatio ? aspectRatio : w / h\n aspectRatio = isFinitePositiveNumber(aspectRatio) ? aspectRatio : 1\n\n switch (position) {\n case 'bottom-right':\n return clamp(calcBottomRightResize(w, h, dx, dy, aspectRatio))\n case 'bottom-left':\n return clamp(calcBottomLeftResize(w, h, dx, dy, aspectRatio))\n case 'top-right':\n return clamp(calcTopRightResize(w, h, dx, dy, aspectRatio))\n case 'top-left':\n return clamp(calcTopLeftResize(w, h, dx, dy, aspectRatio))\n case 'top':\n return clamp(calcTopResize(w, h, dx, dy, aspectRatio))\n case 'right':\n return clamp(calcRightResize(w, h, dx, dy, aspectRatio))\n case 'bottom':\n return clamp(calcBottomResize(w, h, dx, dy, aspectRatio))\n case 'left':\n return clamp(calcLeftResize(w, h, dx, dy, aspectRatio))\n default:\n throw new RangeError(`Invalid position: ${position}`)\n }\n}\n\ntype CalcResize = (\n w: number,\n h: number,\n dx: number,\n dy: number,\n aspectRatio: number,\n) => [w: number, h: number]\n\nconst calcBottomRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h += dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcBottomLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h += dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h -= dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h -= dy\n\n const sum = w + h\n h = sum / (r + 1)\n w = sum - h\n return [w, h]\n}\n\nconst calcTopResize: CalcResize = (w, h, dx, dy, r) => {\n h -= dy\n w = h * r\n return [w, h]\n}\n\nconst calcRightResize: CalcResize = (w, h, dx, dy, r) => {\n w += dx\n h = w / r\n return [w, h]\n}\n\nconst calcBottomResize: CalcResize = (w, h, dx, dy, r) => {\n h += dy\n w = h * r\n return [w, h]\n}\n\nconst calcLeftResize: CalcResize = (w, h, dx, dy, r) => {\n w -= dx\n h = w / r\n return [w, h]\n}\n\nfunction clamp([w, h]: [number, number]): [number, number] {\n return [\n Math.max(w, 1),\n Math.max(h, 1),\n ]\n}\n","import type { HostElement, HostElementConstructor, PropsDeclaration } from '@aria-ui/core'\nimport { createSignal, defineCustomElement, defineProps, registerCustomElement, useEffect, type State } from '@aria-ui/core'\nimport { getWindow } from '@ocavue/utils'\n\nimport { calcResize } from './calc-resize.ts'\nimport { onResizeContext, onResizeEndContext, onResizeStartContext } from './context.ts'\n\n/**\n * @public\n */\nexport interface ResizableHandleProps {\n /**\n * The position of the handle.\n *\n * @default \"bottom-right\"\n */\n position:\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n}\n\n/**\n * @internal\n */\nexport const ResizableHandlePropsDeclaration: PropsDeclaration<ResizableHandleProps> = defineProps<ResizableHandleProps>({\n position: { default: 'bottom-right', attribute: 'position', type: 'string' },\n})\n\n/**\n * @internal\n */\nexport function setupResizableHandle(\n host: HostElement,\n props: State<ResizableHandleProps>,\n): void {\n const getOnResize = onResizeContext.consume(host)\n const getOnResizeStart = onResizeStartContext.consume(host)\n const getOnResizeEnd = onResizeEndContext.consume(host)\n\n let startX = 0\n let startY = 0\n let width = 0\n let height = 0\n let aspectRatio = 1\n\n const pointerPressing = createSignal(false)\n\n const handlePointerDown = (event: PointerEvent) => {\n event.preventDefault()\n pointerPressing.set(true)\n\n startX = event.x\n startY = event.y\n\n const size = getOnResizeStart()?.()\n if (size) {\n ;[width, height, aspectRatio] = size\n }\n }\n\n const handlePointerMove = (event: PointerEvent) => {\n event.preventDefault()\n\n const dx = event.x - startX\n const dy = event.y - startY\n\n const [w, h] = calcResize(\n props.position.get(),\n width,\n height,\n dx,\n dy,\n aspectRatio,\n )\n\n getOnResize()?.(w, h)\n }\n\n const handlePointerUp = (event: PointerEvent) => {\n event.preventDefault()\n pointerPressing.set(false)\n\n getOnResizeEnd()?.()\n }\n\n useEffect(host, () => {\n host.addEventListener('pointerdown', handlePointerDown)\n return () => {\n host.removeEventListener('pointerdown', handlePointerDown)\n }\n })\n\n useEffect(host, () => {\n if (!pointerPressing.get()) {\n return\n }\n\n const win = getWindow(host)\n\n win.addEventListener('pointermove', handlePointerMove)\n win.addEventListener('pointerup', handlePointerUp)\n return () => {\n win.removeEventListener('pointermove', handlePointerMove)\n win.removeEventListener('pointerup', handlePointerUp)\n }\n })\n}\n\nconst ResizableHandleElementBase: HostElementConstructor<ResizableHandleProps> = defineCustomElement(\n setupResizableHandle,\n ResizableHandlePropsDeclaration,\n)\n\n/**\n * `<prosekit-resizable-handle>` custom element.\n *\n * Properties: {@link ResizableHandleProps}\n */\nexport class ResizableHandleElement extends ResizableHandleElementBase {}\n\nlet isResizableHandleRegistered = false\n\n/**\n * @internal\n */\nexport function registerResizableHandleElement(): void {\n if (isResizableHandleRegistered) return\n isResizableHandleRegistered = true\n registerCustomElement('prosekit-resizable-handle', ResizableHandleElement)\n}\n"],"mappings":";;;AAAA,SAAgB,uBAAuB,OAAiC;AACtE,QAAO,OAAO,UAAU,YAAY,OAAO,SAAS,MAAM,IAAI,QAAQ;;;;;ACIxE,MAAa,kB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AY;AACpB,OAAK,iBAAiB,eAAe,kBAAkB;AACvD,eAAa;AACX,QAAK,oBAAoB,eAAe,kBAAkB;;GAE5D;AAEF,WAAU,YAAY;AACpB,MAAI,CAAC,gBAAgB,KAAK,CACxB;EAGF,MAAM,MAAM,UAAU,KAAK;AAE3B,MAAI,iBAAiB,eAAe,kBAAkB;AACtD,MAAI,iBAAiB,aAAa,gBAAgB;AAClD,eAAa;AACX,OAAI,oBAAoB,eAAe,kBAAkB;AACzD,OAAI,oBAAoB,aAAa,gBAAgB;;GAEvD;;AAGJ,MAAM,6BAA2E,oBAC/E,sBACA,gCACD;;;;;;AAOD,IAAa,yBAAb,cAA4C,2BAA2B;AAEvE,IAAI,8BAA8B;;;;AAKlC,SAAgB,iCAAuC;AACrD,KAAI,4BAA6B;AACjC,+BAA8B;AAC9B,uBAAsB,6BAA6B,uBAAuB"}
|
|
@@ -4,8 +4,6 @@ import { Editor } from "@prosekit/core";
|
|
|
4
4
|
import { MenuRootProps } from "@aria-ui/elements/menu";
|
|
5
5
|
import { defineTableCommands } from "@prosekit/extensions/table";
|
|
6
6
|
import { Placement } from "@floating-ui/dom";
|
|
7
|
-
|
|
8
|
-
//#region src/components/table-handle/table-handle-column-popup.d.ts
|
|
9
7
|
interface TableHandleColumnPopupProps {}
|
|
10
8
|
/** @internal */
|
|
11
9
|
declare const TableHandleColumnPopupPropsDeclaration: PropsDeclaration<TableHandleColumnPopupProps>;
|
|
@@ -13,13 +11,19 @@ declare const TableHandleColumnPopupPropsDeclaration: PropsDeclaration<TableHand
|
|
|
13
11
|
declare function setupTableHandleColumnPopup(host: HostElement, _props: State<TableHandleColumnPopupProps>): void;
|
|
14
12
|
declare const TableHandleColumnPopupElementBase: HostElementConstructor<TableHandleColumnPopupProps>;
|
|
15
13
|
/**
|
|
16
|
-
*
|
|
14
|
+
* `<prosekit-table-handle-column-popup>` custom element.
|
|
15
|
+
*
|
|
16
|
+
* Properties: {@link TableHandleColumnPopupProps}
|
|
17
|
+
*
|
|
18
|
+
* Data attributes:
|
|
19
|
+
*
|
|
20
|
+
* | Attribute | Description |
|
|
21
|
+
* | --- | --- |
|
|
22
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
17
23
|
*/
|
|
18
24
|
declare class TableHandleColumnPopupElement extends TableHandleColumnPopupElementBase {}
|
|
19
25
|
/** @internal */
|
|
20
26
|
declare function registerTableHandleColumnPopupElement(): void;
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/components/table-handle/shared.d.ts
|
|
23
27
|
/**
|
|
24
28
|
* @internal
|
|
25
29
|
*/
|
|
@@ -59,8 +63,6 @@ interface SharedTableHandlePositionerProps extends Omit<OverlayPositionerProps,
|
|
|
59
63
|
*/
|
|
60
64
|
offset: OverlayPositionerProps['offset'];
|
|
61
65
|
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/components/table-handle/table-handle-column-positioner.d.ts
|
|
64
66
|
interface TableHandleColumnPositionerProps extends Omit<SharedTableHandlePositionerProps, 'placement'> {
|
|
65
67
|
/**
|
|
66
68
|
* The placement of the popover, relative to the hovered table cell.
|
|
@@ -75,13 +77,27 @@ declare const TableHandleColumnPositionerPropsDeclaration: PropsDeclaration<Tabl
|
|
|
75
77
|
declare function setupTableHandleColumnPositioner(host: HostElement, props: State<TableHandleColumnPositionerProps>): void;
|
|
76
78
|
declare const TableHandleColumnPositionerElementBase: HostElementConstructor<TableHandleColumnPositionerProps>;
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
80
|
+
* `<prosekit-table-handle-column-positioner>` custom element.
|
|
81
|
+
*
|
|
82
|
+
* Properties: {@link TableHandleColumnPositionerProps}
|
|
83
|
+
*
|
|
84
|
+
* Data attributes:
|
|
85
|
+
*
|
|
86
|
+
* | Attribute | Description |
|
|
87
|
+
* | --- | --- |
|
|
88
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
89
|
+
* | `data-side` | The side of the anchor element the positioner is on |
|
|
90
|
+
* | `data-align` | The alignment of the positioner relative to the anchor element |
|
|
91
|
+
*
|
|
92
|
+
* CSS variables:
|
|
93
|
+
*
|
|
94
|
+
* | Variable | Description |
|
|
95
|
+
* | --- | --- |
|
|
96
|
+
* | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |
|
|
79
97
|
*/
|
|
80
98
|
declare class TableHandleColumnPositionerElement extends TableHandleColumnPositionerElementBase {}
|
|
81
99
|
/** @internal */
|
|
82
100
|
declare function registerTableHandleColumnPositionerElement(): void;
|
|
83
|
-
//#endregion
|
|
84
|
-
//#region src/components/table-handle/table-handle-column-menu-root.d.ts
|
|
85
101
|
interface TableHandleColumnMenuRootProps extends MenuRootProps {}
|
|
86
102
|
/** @internal */
|
|
87
103
|
declare const TableHandleColumnMenuRootPropsDeclaration: PropsDeclaration<TableHandleColumnMenuRootProps>;
|
|
@@ -89,13 +105,13 @@ declare const TableHandleColumnMenuRootPropsDeclaration: PropsDeclaration<TableH
|
|
|
89
105
|
declare function setupTableHandleColumnMenuRoot(host: HostElement, props: State<TableHandleColumnMenuRootProps>): void;
|
|
90
106
|
declare const TableHandleColumnMenuRootElementBase: HostElementConstructor<TableHandleColumnMenuRootProps>;
|
|
91
107
|
/**
|
|
92
|
-
*
|
|
108
|
+
* `<prosekit-table-handle-column-menu-root>` custom element.
|
|
109
|
+
*
|
|
110
|
+
* Properties: {@link TableHandleColumnMenuRootProps}
|
|
93
111
|
*/
|
|
94
112
|
declare class TableHandleColumnMenuRootElement extends TableHandleColumnMenuRootElementBase {}
|
|
95
113
|
/** @internal */
|
|
96
114
|
declare function registerTableHandleColumnMenuRootElement(): void;
|
|
97
|
-
//#endregion
|
|
98
|
-
//#region src/components/table-handle/table-handle-column-menu-trigger.d.ts
|
|
99
115
|
type TableCommandsExtension$2 = ReturnType<typeof defineTableCommands>;
|
|
100
116
|
interface TableHandleColumnMenuTriggerProps {
|
|
101
117
|
/**
|
|
@@ -110,15 +126,15 @@ declare const TableHandleColumnMenuTriggerPropsDeclaration: PropsDeclaration<Tab
|
|
|
110
126
|
declare function setupTableHandleColumnMenuTrigger(host: HostElement, props: State<TableHandleColumnMenuTriggerProps>): void;
|
|
111
127
|
declare const TableHandleColumnMenuTriggerElementBase: HostElementConstructor<TableHandleColumnMenuTriggerProps>;
|
|
112
128
|
/**
|
|
113
|
-
*
|
|
129
|
+
* `<prosekit-table-handle-column-menu-trigger>` custom element.
|
|
130
|
+
*
|
|
131
|
+
* Properties: {@link TableHandleColumnMenuTriggerProps}
|
|
114
132
|
*/
|
|
115
133
|
declare class TableHandleColumnMenuTriggerElement extends TableHandleColumnMenuTriggerElementBase {}
|
|
116
134
|
/**
|
|
117
135
|
* @internal
|
|
118
136
|
*/
|
|
119
137
|
declare function registerTableHandleColumnMenuTriggerElement(): void;
|
|
120
|
-
//#endregion
|
|
121
|
-
//#region src/components/table-handle/table-handle-drag-preview.d.ts
|
|
122
138
|
interface TableHandleDragPreviewProps {
|
|
123
139
|
/**
|
|
124
140
|
* @default null
|
|
@@ -134,15 +150,15 @@ declare const TableHandleDragPreviewPropsDeclaration: PropsDeclaration<TableHand
|
|
|
134
150
|
declare function setupTableHandleDragPreview(host: HostElement, props: State<TableHandleDragPreviewProps>): void;
|
|
135
151
|
declare const TableHandleDragPreviewElementBase: HostElementConstructor<TableHandleDragPreviewProps>;
|
|
136
152
|
/**
|
|
137
|
-
*
|
|
153
|
+
* `<prosekit-table-handle-drag-preview>` custom element.
|
|
154
|
+
*
|
|
155
|
+
* Properties: {@link TableHandleDragPreviewProps}
|
|
138
156
|
*/
|
|
139
157
|
declare class TableHandleDragPreviewElement extends TableHandleDragPreviewElementBase {}
|
|
140
158
|
/**
|
|
141
159
|
* @internal
|
|
142
160
|
*/
|
|
143
161
|
declare function registerTableHandleDragPreviewElement(): void;
|
|
144
|
-
//#endregion
|
|
145
|
-
//#region src/components/table-handle/table-handle-drop-indicator.d.ts
|
|
146
162
|
type TableCommandsExtension$1 = ReturnType<typeof defineTableCommands>;
|
|
147
163
|
interface TableHandleDropIndicatorProps {
|
|
148
164
|
/**
|
|
@@ -159,15 +175,15 @@ declare const TableHandleDropIndicatorPropsDeclaration: PropsDeclaration<TableHa
|
|
|
159
175
|
declare function setupTableHandleDropIndicator(host: HostElement, props: State<TableHandleDropIndicatorProps>): void;
|
|
160
176
|
declare const TableHandleDropIndicatorElementBase: HostElementConstructor<TableHandleDropIndicatorProps>;
|
|
161
177
|
/**
|
|
162
|
-
*
|
|
178
|
+
* `<prosekit-table-handle-drop-indicator>` custom element.
|
|
179
|
+
*
|
|
180
|
+
* Properties: {@link TableHandleDropIndicatorProps}
|
|
163
181
|
*/
|
|
164
182
|
declare class TableHandleDropIndicatorElement extends TableHandleDropIndicatorElementBase {}
|
|
165
183
|
/**
|
|
166
184
|
* @internal
|
|
167
185
|
*/
|
|
168
186
|
declare function registerTableHandleDropIndicatorElement(): void;
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region src/components/table-handle/table-handle-root.d.ts
|
|
171
187
|
interface TableHandleRootProps {
|
|
172
188
|
/**
|
|
173
189
|
* The ProseKit editor instance.
|
|
@@ -185,15 +201,15 @@ declare const TableHandleRootPropsDeclaration: PropsDeclaration<TableHandleRootP
|
|
|
185
201
|
declare function setupTableHandleRoot(host: HostElement, props: State<TableHandleRootProps>): void;
|
|
186
202
|
declare const TableHandleRootElementBase: HostElementConstructor<TableHandleRootProps>;
|
|
187
203
|
/**
|
|
188
|
-
*
|
|
204
|
+
* `<prosekit-table-handle-root>` custom element.
|
|
205
|
+
*
|
|
206
|
+
* Properties: {@link TableHandleRootProps}
|
|
189
207
|
*/
|
|
190
208
|
declare class TableHandleRootElement extends TableHandleRootElementBase {}
|
|
191
209
|
/**
|
|
192
210
|
* @internal
|
|
193
211
|
*/
|
|
194
212
|
declare function registerTableHandleRootElement(): void;
|
|
195
|
-
//#endregion
|
|
196
|
-
//#region src/components/table-handle/table-handle-row-popup.d.ts
|
|
197
213
|
interface TableHandleRowPopupProps {}
|
|
198
214
|
/** @internal */
|
|
199
215
|
declare const TableHandleRowPopupPropsDeclaration: PropsDeclaration<TableHandleRowPopupProps>;
|
|
@@ -201,13 +217,19 @@ declare const TableHandleRowPopupPropsDeclaration: PropsDeclaration<TableHandleR
|
|
|
201
217
|
declare function setupTableHandleRowPopup(host: HostElement, _props: State<TableHandleRowPopupProps>): void;
|
|
202
218
|
declare const TableHandleRowPopupElementBase: HostElementConstructor<TableHandleRowPopupProps>;
|
|
203
219
|
/**
|
|
204
|
-
*
|
|
220
|
+
* `<prosekit-table-handle-row-popup>` custom element.
|
|
221
|
+
*
|
|
222
|
+
* Properties: {@link TableHandleRowPopupProps}
|
|
223
|
+
*
|
|
224
|
+
* Data attributes:
|
|
225
|
+
*
|
|
226
|
+
* | Attribute | Description |
|
|
227
|
+
* | --- | --- |
|
|
228
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
205
229
|
*/
|
|
206
230
|
declare class TableHandleRowPopupElement extends TableHandleRowPopupElementBase {}
|
|
207
231
|
/** @internal */
|
|
208
232
|
declare function registerTableHandleRowPopupElement(): void;
|
|
209
|
-
//#endregion
|
|
210
|
-
//#region src/components/table-handle/table-handle-row-positioner.d.ts
|
|
211
233
|
interface TableHandleRowPositionerProps extends Omit<SharedTableHandlePositionerProps, 'placement'> {
|
|
212
234
|
/**
|
|
213
235
|
* The placement of the popover, relative to the hovered table cell.
|
|
@@ -222,13 +244,27 @@ declare const TableHandleRowPositionerPropsDeclaration: PropsDeclaration<TableHa
|
|
|
222
244
|
declare function setupTableHandleRowPositioner(host: HostElement, props: State<TableHandleRowPositionerProps>): void;
|
|
223
245
|
declare const TableHandleRowPositionerElementBase: HostElementConstructor<TableHandleRowPositionerProps>;
|
|
224
246
|
/**
|
|
225
|
-
*
|
|
247
|
+
* `<prosekit-table-handle-row-positioner>` custom element.
|
|
248
|
+
*
|
|
249
|
+
* Properties: {@link TableHandleRowPositionerProps}
|
|
250
|
+
*
|
|
251
|
+
* Data attributes:
|
|
252
|
+
*
|
|
253
|
+
* | Attribute | Description |
|
|
254
|
+
* | --- | --- |
|
|
255
|
+
* | `data-state` | `"open"` when visible, `"closed"` otherwise |
|
|
256
|
+
* | `data-side` | The side of the anchor element the positioner is on |
|
|
257
|
+
* | `data-align` | The alignment of the positioner relative to the anchor element |
|
|
258
|
+
*
|
|
259
|
+
* CSS variables:
|
|
260
|
+
*
|
|
261
|
+
* | Variable | Description |
|
|
262
|
+
* | --- | --- |
|
|
263
|
+
* | `--transform-origin` | The coordinates that this element is anchored to. Useful for scale animations. |
|
|
226
264
|
*/
|
|
227
265
|
declare class TableHandleRowPositionerElement extends TableHandleRowPositionerElementBase {}
|
|
228
266
|
/** @internal */
|
|
229
267
|
declare function registerTableHandleRowPositionerElement(): void;
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/components/table-handle/table-handle-row-menu-root.d.ts
|
|
232
268
|
interface TableHandleRowMenuRootProps extends MenuRootProps {}
|
|
233
269
|
/** @internal */
|
|
234
270
|
declare const TableHandleRowMenuRootPropsDeclaration: PropsDeclaration<TableHandleRowMenuRootProps>;
|
|
@@ -236,13 +272,13 @@ declare const TableHandleRowMenuRootPropsDeclaration: PropsDeclaration<TableHand
|
|
|
236
272
|
declare function setupTableHandleRowMenuRoot(host: HostElement, props: State<TableHandleRowMenuRootProps>): void;
|
|
237
273
|
declare const TableHandleRowMenuRootElementBase: HostElementConstructor<TableHandleRowMenuRootProps>;
|
|
238
274
|
/**
|
|
239
|
-
*
|
|
275
|
+
* `<prosekit-table-handle-row-menu-root>` custom element.
|
|
276
|
+
*
|
|
277
|
+
* Properties: {@link TableHandleRowMenuRootProps}
|
|
240
278
|
*/
|
|
241
279
|
declare class TableHandleRowMenuRootElement extends TableHandleRowMenuRootElementBase {}
|
|
242
280
|
/** @internal */
|
|
243
281
|
declare function registerTableHandleRowMenuRootElement(): void;
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/components/table-handle/table-handle-row-menu-trigger.d.ts
|
|
246
282
|
type TableCommandsExtension = ReturnType<typeof defineTableCommands>;
|
|
247
283
|
interface TableHandleRowMenuTriggerProps {
|
|
248
284
|
/**
|
|
@@ -257,13 +293,14 @@ declare const TableHandleRowMenuTriggerPropsDeclaration: PropsDeclaration<TableH
|
|
|
257
293
|
declare function setupTableHandleRowMenuTrigger(host: HostElement, props: State<TableHandleRowMenuTriggerProps>): void;
|
|
258
294
|
declare const TableHandleRowMenuTriggerElementBase: HostElementConstructor<TableHandleRowMenuTriggerProps>;
|
|
259
295
|
/**
|
|
260
|
-
*
|
|
296
|
+
* `<prosekit-table-handle-row-menu-trigger>` custom element.
|
|
297
|
+
*
|
|
298
|
+
* Properties: {@link TableHandleRowMenuTriggerProps}
|
|
261
299
|
*/
|
|
262
300
|
declare class TableHandleRowMenuTriggerElement extends TableHandleRowMenuTriggerElementBase {}
|
|
263
301
|
/**
|
|
264
302
|
* @internal
|
|
265
303
|
*/
|
|
266
304
|
declare function registerTableHandleRowMenuTriggerElement(): void;
|
|
267
|
-
//#endregion
|
|
268
305
|
export { TableHandleColumnMenuRootElement, type TableHandleColumnMenuRootProps, TableHandleColumnMenuRootPropsDeclaration, TableHandleColumnMenuTriggerElement, type TableHandleColumnMenuTriggerProps, TableHandleColumnMenuTriggerPropsDeclaration, TableHandleColumnPopupElement, type TableHandleColumnPopupProps, TableHandleColumnPopupPropsDeclaration, TableHandleColumnPositionerElement, type TableHandleColumnPositionerProps, TableHandleColumnPositionerPropsDeclaration, TableHandleDragPreviewElement, type TableHandleDragPreviewProps, TableHandleDragPreviewPropsDeclaration, TableHandleDropIndicatorElement, type TableHandleDropIndicatorProps, TableHandleDropIndicatorPropsDeclaration, TableHandleRootElement, type TableHandleRootProps, TableHandleRootPropsDeclaration, TableHandleRowMenuRootElement, type TableHandleRowMenuRootProps, TableHandleRowMenuRootPropsDeclaration, TableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerProps, TableHandleRowMenuTriggerPropsDeclaration, TableHandleRowPopupElement, type TableHandleRowPopupProps, TableHandleRowPopupPropsDeclaration, TableHandleRowPositionerElement, type TableHandleRowPositionerProps, TableHandleRowPositionerPropsDeclaration, registerTableHandleColumnMenuRootElement, registerTableHandleColumnMenuTriggerElement, registerTableHandleColumnPopupElement, registerTableHandleColumnPositionerElement, registerTableHandleDragPreviewElement, registerTableHandleDropIndicatorElement, registerTableHandleRootElement, registerTableHandleRowMenuRootElement, registerTableHandleRowMenuTriggerElement, registerTableHandleRowPopupElement, registerTableHandleRowPositionerElement, setupTableHandleColumnMenuRoot, setupTableHandleColumnMenuTrigger, setupTableHandleColumnPopup, setupTableHandleColumnPositioner, setupTableHandleDragPreview, setupTableHandleDropIndicator, setupTableHandleRoot, setupTableHandleRowMenuRoot, setupTableHandleRowMenuTrigger, setupTableHandleRowPopup, setupTableHandleRowPositioner };
|
|
269
306
|
//# sourceMappingURL=prosekit-web-table-handle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-web-table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.ts","../src/components/table-handle/shared.ts","../src/components/table-handle/table-handle-column-positioner.ts","../src/components/table-handle/table-handle-column-menu-root.ts","../src/components/table-handle/table-handle-column-menu-trigger.ts","../src/components/table-handle/table-handle-drag-preview.ts","../src/components/table-handle/table-handle-drop-indicator.ts","../src/components/table-handle/table-handle-root.ts","../src/components/table-handle/table-handle-row-popup.ts","../src/components/table-handle/table-handle-row-positioner.ts","../src/components/table-handle/table-handle-row-menu-root.ts","../src/components/table-handle/table-handle-row-menu-trigger.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-web-table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.ts","../src/components/table-handle/shared.ts","../src/components/table-handle/table-handle-column-positioner.ts","../src/components/table-handle/table-handle-column-menu-root.ts","../src/components/table-handle/table-handle-column-menu-trigger.ts","../src/components/table-handle/table-handle-drag-preview.ts","../src/components/table-handle/table-handle-drop-indicator.ts","../src/components/table-handle/table-handle-root.ts","../src/components/table-handle/table-handle-row-popup.ts","../src/components/table-handle/table-handle-row-positioner.ts","../src/components/table-handle/table-handle-row-menu-root.ts","../src/components/table-handle/table-handle-row-menu-trigger.ts"],"mappings":";;;;;;UAaiB,2BAAA;;cAGJ,sCAAA,EAAwC,gBAAA,CAAiB,2BAAA;;iBAKtD,2BAAA,CACd,IAAA,EAAM,WAAA,EACN,MAAA,EAAQ,KAAA,CAAM,2BAAA;AAAA,cAOV,iCAAA,EAAmC,sBAAA,CAAuB,2BAAA;;;;;AAdhE;;;;;AAKA;;cAyBa,6BAAA,SAAsC,iCAAA;;iBAGnC,qCAAA,CAAA;;;;UC1CC,gCAAA,SAAyC,IAAA,CAAK,sBAAA;EDM9C;;;;;AAGjB;ECFE,MAAA,EAAQ,MAAA;;;;ADOV;;;ECCE,KAAA,EAAO,sBAAA;EDCO;;;;ECKd,IAAA,EAAM,sBAAA;EDNN;;;;ECYA,KAAA,EAAO,sBAAA;EDXmC;AAK3C;;;ECYC,IAAA,EAAM,sBAAA;EDVmF;AAgB3F;;;ECAE,MAAA,EAAQ,sBAAA;AAAA;AAAA,UC3BO,gCAAA,SAAyC,IAAA,CAAK,gCAAA;;;;AFN/D;;EEYE,SAAA,EAAW,SAAA;AAAA;;cAIA,2CAAA,EAA6C,gBAAA,CAAiB,gCAAA;;iBAQ3D,gCAAA,CACd,IAAA,EAAM,WAAA,EACN,KAAA,EAAO,KAAA,CAAM,gCAAA;AAAA,cAcT,sCAAA,EAAwC,sBAAA,CAAuB,gCAAA;;AFhCrE;;;;;;;;;;;;;;;AAOC;;;cEiDY,kCAAA,SAA2C,sCAAA;AF/BxD;AAAA,iBEkCgB,0CAAA,CAAA;AAAA,UClEC,8BAAA,SAAuC,aAAA;;cAG3C,yCAAA,EAA2C,gBAAA,CAAiB,8BAAA;;iBAKzD,8BAAA,CACd,IAAA,EAAM,WAAA,EACN,KAAA,EAAO,KAAA,CAAM,8BAAA;AAAA,cAaT,oCAAA,EAAsC,sBAA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