@prosekit/vue 0.7.0-beta.1 → 0.7.0-beta.2
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/prosekit-vue-autocomplete.d.ts +216 -25
- package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-vue-autocomplete.js +270 -9
- package/dist/prosekit-vue-autocomplete.js.map +1 -1
- package/dist/prosekit-vue-block-handle.d.ts +202 -19
- package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-block-handle.js +211 -7
- package/dist/prosekit-vue-block-handle.js.map +1 -1
- package/dist/prosekit-vue-drop-indicator.d.ts +24 -8
- package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-vue-drop-indicator.js +36 -3
- package/dist/prosekit-vue-drop-indicator.js.map +1 -1
- package/dist/prosekit-vue-inline-popover.d.ts +200 -9
- package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-inline-popover.js +171 -5
- package/dist/prosekit-vue-inline-popover.js.map +1 -1
- package/dist/prosekit-vue-menu.d.ts +287 -0
- package/dist/prosekit-vue-menu.d.ts.map +1 -0
- package/dist/prosekit-vue-menu.js +313 -0
- package/dist/prosekit-vue-menu.js.map +1 -0
- package/dist/prosekit-vue-popover.d.ts +219 -19
- package/dist/prosekit-vue-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-popover.js +222 -7
- package/dist/prosekit-vue-popover.js.map +1 -1
- package/dist/prosekit-vue-resizable.d.ts +50 -15
- package/dist/prosekit-vue-resizable.d.ts.map +1 -1
- package/dist/prosekit-vue-resizable.js +92 -7
- package/dist/prosekit-vue-resizable.js.map +1 -1
- package/dist/prosekit-vue-table-handle.d.ts +427 -55
- package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-table-handle.js +455 -19
- package/dist/prosekit-vue-table-handle.js.map +1 -1
- package/dist/prosekit-vue-tooltip.d.ts +203 -19
- package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
- package/dist/prosekit-vue-tooltip.js +202 -7
- package/dist/prosekit-vue-tooltip.js.map +1 -1
- package/package.json +24 -16
- package/src/components/autocomplete/autocomplete-empty.gen.ts +21 -25
- package/src/components/autocomplete/autocomplete-item.gen.ts +80 -26
- package/src/components/autocomplete/autocomplete-popup.gen.ts +80 -0
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +149 -0
- package/src/components/autocomplete/autocomplete-root.gen.ts +112 -0
- package/src/components/autocomplete/index.gen.ts +12 -4
- package/src/components/autocomplete/index.ts +27 -0
- package/src/components/block-handle/block-handle-add.gen.ts +51 -26
- package/src/components/block-handle/block-handle-draggable.gen.ts +51 -26
- package/src/components/block-handle/block-handle-popup.gen.ts +29 -0
- package/src/components/block-handle/block-handle-positioner.gen.ts +167 -0
- package/src/components/block-handle/block-handle-root.gen.ts +84 -0
- package/src/components/block-handle/index.gen.ts +13 -3
- package/src/components/block-handle/index.ts +27 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +57 -26
- package/src/components/drop-indicator/index.gen.ts +5 -1
- package/src/components/drop-indicator/index.ts +14 -0
- package/src/components/inline-popover/index.gen.ts +11 -1
- package/src/components/inline-popover/index.ts +22 -0
- package/src/components/inline-popover/inline-popover-popup.gen.ts +29 -0
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +173 -0
- package/src/components/inline-popover/inline-popover-root.gen.ts +108 -0
- package/src/components/menu/index.gen.ts +19 -0
- package/src/components/menu/index.ts +37 -0
- package/src/components/menu/menu-item.gen.ts +91 -0
- package/src/components/menu/menu-popup.gen.ts +54 -0
- package/src/components/menu/menu-positioner.gen.ts +174 -0
- package/src/components/menu/menu-root.gen.ts +88 -0
- package/src/components/menu/menu-submenu-root.gen.ts +29 -0
- package/src/components/menu/menu-submenu-trigger.gen.ts +29 -0
- package/src/components/menu/menu-trigger.gen.ts +79 -0
- package/src/components/popover/index.gen.ts +11 -3
- package/src/components/popover/index.ts +24 -0
- package/src/components/popover/popover-popup.gen.ts +29 -0
- package/src/components/popover/popover-positioner.gen.ts +174 -0
- package/src/components/popover/popover-root.gen.ts +88 -26
- package/src/components/popover/popover-trigger.gen.ts +88 -26
- package/src/components/resizable/index.gen.ts +8 -2
- package/src/components/resizable/index.ts +20 -0
- package/src/components/resizable/resizable-handle.gen.ts +46 -26
- package/src/components/resizable/resizable-root.gen.ts +87 -26
- package/src/components/table-handle/index.gen.ts +17 -9
- package/src/components/table-handle/index.ts +58 -0
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +62 -0
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +56 -0
- package/src/components/table-handle/table-handle-column-popup.gen.ts +29 -0
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +197 -0
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +49 -26
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +49 -26
- package/src/components/table-handle/table-handle-root.gen.ts +51 -26
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +62 -0
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +56 -0
- package/src/components/table-handle/table-handle-row-popup.gen.ts +29 -0
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +197 -0
- package/src/components/tooltip/index.gen.ts +11 -3
- package/src/components/tooltip/index.ts +24 -0
- package/src/components/tooltip/tooltip-popup.gen.ts +29 -0
- package/src/components/tooltip/tooltip-positioner.gen.ts +174 -0
- package/src/components/tooltip/tooltip-root.gen.ts +81 -26
- package/src/components/tooltip/tooltip-trigger.gen.ts +55 -26
- package/dist/create-component.js +0 -45
- package/dist/create-component.js.map +0 -1
- package/dist/create-emits.d.ts +0 -5
- package/dist/create-emits.d.ts.map +0 -1
- package/src/components/autocomplete/autocomplete-list.gen.ts +0 -33
- package/src/components/autocomplete/autocomplete-popover.gen.ts +0 -33
- package/src/components/block-handle/block-handle-popover.gen.ts +0 -33
- package/src/components/create-component.ts +0 -84
- package/src/components/create-emits.ts +0 -8
- package/src/components/inline-popover/inline-popover.gen.ts +0 -33
- package/src/components/popover/popover-content.gen.ts +0 -33
- package/src/components/table-handle/table-handle-column-root.gen.ts +0 -33
- package/src/components/table-handle/table-handle-column-trigger.gen.ts +0 -33
- package/src/components/table-handle/table-handle-popover-content.gen.ts +0 -33
- package/src/components/table-handle/table-handle-popover-item.gen.ts +0 -33
- package/src/components/table-handle/table-handle-row-root.gen.ts +0 -33
- package/src/components/table-handle/table-handle-row-trigger.gen.ts +0 -33
- package/src/components/tooltip/tooltip-content.gen.ts +0 -33
|
@@ -1,39 +1,239 @@
|
|
|
1
|
-
import { t as CreateEmits } from "./create-emits.js";
|
|
2
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { OpenChangeEvent, PopoverPositionerProps as PopoverPositionerProps$1, PopoverRootEvents, PopoverRootProps as PopoverRootProps$1, PopoverTriggerEvents, PopoverTriggerProps as PopoverTriggerProps$1 } from "@prosekit/web/popover";
|
|
4
3
|
|
|
5
|
-
//#region src/components/popover/popover-
|
|
4
|
+
//#region src/components/popover/popover-popup.gen.d.ts
|
|
6
5
|
/**
|
|
7
|
-
* Props for the {@link
|
|
6
|
+
* Props for the {@link PopoverPopup} Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
8
9
|
*/
|
|
9
|
-
interface
|
|
10
|
+
interface PopoverPopupProps {}
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* A Vue component that renders an `prosekit-popover-popup` custom element.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
12
15
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
declare const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/components/popover/popover-positioner.gen.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Props for the {@link PopoverPositioner} Vue component.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
interface PopoverPositionerProps {
|
|
25
|
+
/**
|
|
26
|
+
* The strategy to use for positioning
|
|
27
|
+
*
|
|
28
|
+
* @default "absolute"
|
|
29
|
+
*/
|
|
30
|
+
strategy?: PopoverPositionerProps$1['strategy'];
|
|
31
|
+
/**
|
|
32
|
+
* The initial placement of the floating element
|
|
33
|
+
*
|
|
34
|
+
* @default "top"
|
|
35
|
+
*/
|
|
36
|
+
placement?: PopoverPositionerProps$1['placement'];
|
|
37
|
+
/**
|
|
38
|
+
* Options to activate auto-update listeners
|
|
39
|
+
*
|
|
40
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
41
|
+
*
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
autoUpdate?: PopoverPositionerProps$1['autoUpdate'];
|
|
45
|
+
/**
|
|
46
|
+
* Whether to use the browser Popover API to place the floating element on
|
|
47
|
+
* top of other page content.
|
|
48
|
+
*
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
hoist?: PopoverPositionerProps$1['hoist'];
|
|
52
|
+
/**
|
|
53
|
+
* The distance between the reference and floating element.
|
|
54
|
+
*
|
|
55
|
+
* @default 6
|
|
56
|
+
*/
|
|
57
|
+
offset?: PopoverPositionerProps$1['offset'];
|
|
58
|
+
/**
|
|
59
|
+
* Whether to flip the `placement` in order to keep it in view when the
|
|
60
|
+
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
61
|
+
* provide an array of placements to try sequentially if the preferred
|
|
62
|
+
* `placement` does not fit.
|
|
63
|
+
*
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
flip?: PopoverPositionerProps$1['flip'];
|
|
67
|
+
/**
|
|
68
|
+
* Whether the floating element should shift to keep it in view.
|
|
69
|
+
*
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
shift?: PopoverPositionerProps$1['shift'];
|
|
73
|
+
/**
|
|
74
|
+
* Whether the floating element can overlap the reference element to keep it
|
|
75
|
+
* in view.
|
|
76
|
+
*
|
|
77
|
+
* @default false
|
|
78
|
+
*/
|
|
79
|
+
overlap?: PopoverPositionerProps$1['overlap'];
|
|
80
|
+
/**
|
|
81
|
+
* Whether to constrain the floating element's width and height to not exceed
|
|
82
|
+
* the viewport.
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
fitViewport?: PopoverPositionerProps$1['fitViewport'];
|
|
87
|
+
/**
|
|
88
|
+
* Whether to constrain the floating element's width so that it matches the
|
|
89
|
+
* reference element.
|
|
90
|
+
*
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
sameWidth?: PopoverPositionerProps$1['sameWidth'];
|
|
94
|
+
/**
|
|
95
|
+
* Whether to constrain the floating element's height so that it matches the
|
|
96
|
+
* reference element.
|
|
97
|
+
*
|
|
98
|
+
* @default false
|
|
99
|
+
*/
|
|
100
|
+
sameHeight?: PopoverPositionerProps$1['sameHeight'];
|
|
101
|
+
/**
|
|
102
|
+
* Whether to improve positioning for inline reference elements that span over
|
|
103
|
+
* multiple lines.
|
|
104
|
+
*
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
inline?: PopoverPositionerProps$1['inline'];
|
|
108
|
+
/**
|
|
109
|
+
* Whether to hide the floating element when the reference element or the
|
|
110
|
+
* floating element is fully clipped.
|
|
111
|
+
*
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
hide?: PopoverPositionerProps$1['hide'];
|
|
115
|
+
/**
|
|
116
|
+
* Describes the clipping element(s) or area that overflow will be checked relative to.
|
|
117
|
+
* Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
|
|
118
|
+
*
|
|
119
|
+
* @default 'clippingAncestors'
|
|
120
|
+
*/
|
|
121
|
+
boundary?: PopoverPositionerProps$1['boundary'];
|
|
122
|
+
/**
|
|
123
|
+
* Describes the root boundary that the element will be checked for overflow relative to.
|
|
124
|
+
* Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
|
|
125
|
+
*
|
|
126
|
+
* @default 'viewport'
|
|
127
|
+
*/
|
|
128
|
+
rootBoundary?: PopoverPositionerProps$1['rootBoundary'];
|
|
129
|
+
/**
|
|
130
|
+
* Describes the virtual padding around the boundary to check for overflow.
|
|
131
|
+
* Please see https://floating-ui.com/docs/detectoverflow#padding for more information.
|
|
132
|
+
*
|
|
133
|
+
* @default 4
|
|
134
|
+
*/
|
|
135
|
+
overflowPadding?: PopoverPositionerProps$1['overflowPadding'];
|
|
136
|
+
/**
|
|
137
|
+
* The element that will be used to check for overflow. Please see
|
|
138
|
+
* https://floating-ui.com/docs/detectoverflow#elementcontext for more
|
|
139
|
+
* information.
|
|
140
|
+
*
|
|
141
|
+
* @default 'floating'
|
|
142
|
+
*/
|
|
143
|
+
elementContext?: PopoverPositionerProps$1['elementContext'];
|
|
144
|
+
/**
|
|
145
|
+
* Whether to check the alternate elementContext's boundary. Please see
|
|
146
|
+
* https://floating-ui.com/docs/detectoverflow#altboundary for more
|
|
147
|
+
* information.
|
|
148
|
+
*
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
altBoundary?: PopoverPositionerProps$1['altBoundary'];
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* A Vue component that renders an `prosekit-popover-positioner` custom element.
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
declare const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes>;
|
|
15
159
|
//#endregion
|
|
16
160
|
//#region src/components/popover/popover-root.gen.d.ts
|
|
17
161
|
/**
|
|
18
|
-
* Props for the {@link PopoverRoot} component.
|
|
162
|
+
* Props for the {@link PopoverRoot} Vue component.
|
|
163
|
+
*
|
|
164
|
+
* @public
|
|
19
165
|
*/
|
|
20
|
-
interface PopoverRootProps
|
|
166
|
+
interface PopoverRootProps {
|
|
167
|
+
/**
|
|
168
|
+
* Whether the popover should be modal.
|
|
169
|
+
* When true, the popover will trap focus and prevent interaction with the rest of the page.
|
|
170
|
+
*
|
|
171
|
+
* @default false
|
|
172
|
+
*/
|
|
173
|
+
modal?: PopoverRootProps$1['modal'];
|
|
174
|
+
/**
|
|
175
|
+
* Whether the overlay is initially open.
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
defaultOpen?: PopoverRootProps$1['defaultOpen'];
|
|
179
|
+
/**
|
|
180
|
+
* Whether the overlay is currently open.
|
|
181
|
+
* @default null
|
|
182
|
+
*/
|
|
183
|
+
open?: PopoverRootProps$1['open'];
|
|
184
|
+
/**
|
|
185
|
+
* Whether the component should ignore user interaction.
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
disabled?: PopoverRootProps$1['disabled'];
|
|
189
|
+
/** Emitted when the popover is opened or closed. */
|
|
190
|
+
onOpenChange?: (event: PopoverRootEvents['openChange']) => void;
|
|
191
|
+
}
|
|
21
192
|
/**
|
|
22
|
-
*
|
|
193
|
+
* A Vue component that renders an `prosekit-popover-root` custom element.
|
|
194
|
+
*
|
|
195
|
+
* @public
|
|
23
196
|
*/
|
|
24
|
-
|
|
25
|
-
declare const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes, PopoverRootEmits>;
|
|
197
|
+
declare const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes>;
|
|
26
198
|
//#endregion
|
|
27
199
|
//#region src/components/popover/popover-trigger.gen.d.ts
|
|
28
200
|
/**
|
|
29
|
-
* Props for the {@link PopoverTrigger} component.
|
|
201
|
+
* Props for the {@link PopoverTrigger} Vue component.
|
|
202
|
+
*
|
|
203
|
+
* @public
|
|
30
204
|
*/
|
|
31
|
-
interface PopoverTriggerProps
|
|
205
|
+
interface PopoverTriggerProps {
|
|
206
|
+
/**
|
|
207
|
+
* Whether the component should ignore user interaction.
|
|
208
|
+
* @default false
|
|
209
|
+
*/
|
|
210
|
+
disabled?: PopoverTriggerProps$1['disabled'];
|
|
211
|
+
/**
|
|
212
|
+
* Whether the popover should also open when the trigger is hovered.
|
|
213
|
+
* @default false
|
|
214
|
+
*/
|
|
215
|
+
openOnHover?: PopoverTriggerProps$1['openOnHover'];
|
|
216
|
+
/**
|
|
217
|
+
* The delay in milliseconds before opening the popover when hovering.
|
|
218
|
+
* Only applies when `openOnHover` is true.
|
|
219
|
+
* @default 300
|
|
220
|
+
*/
|
|
221
|
+
delay?: PopoverTriggerProps$1['delay'];
|
|
222
|
+
/**
|
|
223
|
+
* The delay in milliseconds before closing the popover when hover ends.
|
|
224
|
+
* Only applies when `openOnHover` is true.
|
|
225
|
+
* @default 0
|
|
226
|
+
*/
|
|
227
|
+
closeDelay?: PopoverTriggerProps$1['closeDelay'];
|
|
228
|
+
/** Emitted when the popover is opened or closed. */
|
|
229
|
+
onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;
|
|
230
|
+
}
|
|
32
231
|
/**
|
|
33
|
-
*
|
|
232
|
+
* A Vue component that renders an `prosekit-popover-trigger` custom element.
|
|
233
|
+
*
|
|
234
|
+
* @public
|
|
34
235
|
*/
|
|
35
|
-
|
|
36
|
-
declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes, PopoverTriggerEmits>;
|
|
236
|
+
declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes>;
|
|
37
237
|
//#endregion
|
|
38
|
-
export {
|
|
238
|
+
export { OpenChangeEvent, PopoverPopup, type PopoverPopupProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootEvents, type PopoverRootProps, PopoverTrigger, type PopoverTriggerEvents, type PopoverTriggerProps };
|
|
39
239
|
//# sourceMappingURL=prosekit-vue-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-popover.d.ts","names":[],"sources":["../src/components/popover/popover-
|
|
1
|
+
{"version":3,"file":"prosekit-vue-popover.d.ts","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"mappings":";;;;AAYA;;;;;AAAA,UAAiB,iBAAA;;;;;;cAOJ,YAAA,EAAc,sBAAA,CAAuB,iBAAA,GAAoB,cAAA;;;;;;;AAAtE;UCPiB,sBAAA;;;;;;EAMf,QAAA,GAAW,wBAAA;EDCc;;;;;ECKzB,SAAA,GAAY,wBAAA;;;AAZd;;;;;EAoBE,UAAA,GAAa,wBAAA;EAOL;;;;;;EAAR,KAAA,GAAQ,wBAAA;EAiDK;;;;;EA3Cb,MAAA,GAAS,wBAAA;EAsFQ;;;;;;;;EA7EjB,IAAA,GAAO,wBAAA;EAtBM;;;;;EA4Bb,KAAA,GAAQ,wBAAA;EAND;;;;;;EAaP,OAAA,GAAU,wBAAA;EAcV;;;;;;EAPA,WAAA,GAAc,wBAAA;EA4BP;;;;;;EArBP,SAAA,GAAY,wBAAA;EAkDZ;;;;;;EA3CA,UAAA,GAAa,wBAAA;EAqFd;;;;;;EA9EC,MAAA,GAAS,wBAAA;EAoDqB;;;;;;EA7C9B,IAAA,GAAO,wBAAA;;AC1FT;;;;;EDiGE,QAAA,GAAW,wBAAA;EC3EA;;;;;;EDkFX,YAAA,GAAe,wBAAA;EC5FD;;;;;;EDmGd,eAAA,GAAkB,wBAAA;ECvFF;;;AAQlB;;;;EDuFE,cAAA,GAAiB,wBAAA;ECvFO;;;;;;;ED+FxB,WAAA,GAAc,wBAAA;AAAA;;;AE/HhB;;;cFuIa,iBAAA,EAAmB,sBAAA,CAAuB,sBAAA,GAAyB,cAAA;;;;;;;ADhIhF;UEPiB,gBAAA;;;;;;;EAOf,KAAA,GAAQ,kBAAA;EFAwC;;;;EEKhD,WAAA,GAAc,kBAAA;;;ADZhB;;ECiBE,IAAA,GAAO,kBAAA;EDXI;;;;ECgBX,QAAA,GAAW,kBAAA;EDoBJ;EClBP,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;;;;;cAQZ,WAAA,EAAa,sBAAA,CAAuB,gBAAA,GAAmB,cAAA;;;;;;;AFzBpE;UGPiB,mBAAA;;;;;EAKf,QAAA,GAAW,qBAAA;EHEoC;;;;EGG/C,WAAA,GAAc,qBAAA;EHHoE;;;;ACPpF;EEgBE,KAAA,GAAQ,qBAAA;;;;;;EAMR,UAAA,GAAa,qBAAA;EFoBN;EElBP,YAAA,IAAgB,KAAA,EAAO,oBAAA;AAAA;;;;;;cAQZ,cAAA,EAAgB,sBAAA,CAAuB,mBAAA,GAAsB,cAAA"}
|
|
@@ -1,14 +1,229 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
//#region src/components/popover/popover-
|
|
4
|
-
|
|
1
|
+
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
|
+
import { OpenChangeEvent, registerPopoverPopupElement, registerPopoverPositionerElement, registerPopoverRootElement, registerPopoverTriggerElement } from "@prosekit/web/popover";
|
|
3
|
+
//#region src/components/popover/popover-popup.gen.ts
|
|
4
|
+
/**
|
|
5
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* A Vue component that renders an `prosekit-popover-popup` custom element.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
const PopoverPopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
13
|
+
registerPopoverPopupElement();
|
|
14
|
+
return () => {
|
|
15
|
+
return h("prosekit-popover-popup", props, slots.default?.());
|
|
16
|
+
};
|
|
17
|
+
}, { props: [] });
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/components/popover/popover-positioner.gen.ts
|
|
20
|
+
/**
|
|
21
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* A Vue component that renders an `prosekit-popover-positioner` custom element.
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
const PopoverPositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
29
|
+
registerPopoverPositionerElement();
|
|
30
|
+
const elementRef = shallowRef(null);
|
|
31
|
+
const splittedProps = computed(() => {
|
|
32
|
+
const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;
|
|
33
|
+
return [[
|
|
34
|
+
p0,
|
|
35
|
+
p1,
|
|
36
|
+
p2,
|
|
37
|
+
p3,
|
|
38
|
+
p4,
|
|
39
|
+
p5,
|
|
40
|
+
p6,
|
|
41
|
+
p7,
|
|
42
|
+
p8,
|
|
43
|
+
p9,
|
|
44
|
+
p10,
|
|
45
|
+
p11,
|
|
46
|
+
p12,
|
|
47
|
+
p13,
|
|
48
|
+
p14,
|
|
49
|
+
p15,
|
|
50
|
+
p16,
|
|
51
|
+
p17
|
|
52
|
+
], restProps];
|
|
53
|
+
});
|
|
54
|
+
watchEffect(() => {
|
|
55
|
+
const element = elementRef.value;
|
|
56
|
+
if (!element) return;
|
|
57
|
+
const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];
|
|
58
|
+
Object.assign(element, {
|
|
59
|
+
altBoundary: p0,
|
|
60
|
+
autoUpdate: p1,
|
|
61
|
+
boundary: p2,
|
|
62
|
+
elementContext: p3,
|
|
63
|
+
fitViewport: p4,
|
|
64
|
+
flip: p5,
|
|
65
|
+
hide: p6,
|
|
66
|
+
hoist: p7,
|
|
67
|
+
inline: p8,
|
|
68
|
+
offset: p9,
|
|
69
|
+
overflowPadding: p10,
|
|
70
|
+
overlap: p11,
|
|
71
|
+
placement: p12,
|
|
72
|
+
rootBoundary: p13,
|
|
73
|
+
sameHeight: p14,
|
|
74
|
+
sameWidth: p15,
|
|
75
|
+
shift: p16,
|
|
76
|
+
strategy: p17
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
return () => {
|
|
80
|
+
const restProps = splittedProps.value[1];
|
|
81
|
+
return h("prosekit-popover-positioner", {
|
|
82
|
+
...restProps,
|
|
83
|
+
ref: elementRef
|
|
84
|
+
}, slots.default?.());
|
|
85
|
+
};
|
|
86
|
+
}, { props: [
|
|
87
|
+
"altBoundary",
|
|
88
|
+
"autoUpdate",
|
|
89
|
+
"boundary",
|
|
90
|
+
"elementContext",
|
|
91
|
+
"fitViewport",
|
|
92
|
+
"flip",
|
|
93
|
+
"hide",
|
|
94
|
+
"hoist",
|
|
95
|
+
"inline",
|
|
96
|
+
"offset",
|
|
97
|
+
"overflowPadding",
|
|
98
|
+
"overlap",
|
|
99
|
+
"placement",
|
|
100
|
+
"rootBoundary",
|
|
101
|
+
"sameHeight",
|
|
102
|
+
"sameWidth",
|
|
103
|
+
"shift",
|
|
104
|
+
"strategy"
|
|
105
|
+
] });
|
|
5
106
|
//#endregion
|
|
6
107
|
//#region src/components/popover/popover-root.gen.ts
|
|
7
|
-
|
|
108
|
+
/**
|
|
109
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
110
|
+
*/
|
|
111
|
+
/**
|
|
112
|
+
* A Vue component that renders an `prosekit-popover-root` custom element.
|
|
113
|
+
*
|
|
114
|
+
* @public
|
|
115
|
+
*/
|
|
116
|
+
const PopoverRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
117
|
+
registerPopoverRootElement();
|
|
118
|
+
const elementRef = shallowRef(null);
|
|
119
|
+
const splittedProps = computed(() => {
|
|
120
|
+
const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;
|
|
121
|
+
return [[
|
|
122
|
+
p0,
|
|
123
|
+
p1,
|
|
124
|
+
p2,
|
|
125
|
+
p3,
|
|
126
|
+
e0
|
|
127
|
+
], restProps];
|
|
128
|
+
});
|
|
129
|
+
const handlers = [];
|
|
130
|
+
watchEffect(() => {
|
|
131
|
+
const element = elementRef.value;
|
|
132
|
+
if (!element) return;
|
|
133
|
+
const [p0, p1, p2, p3, e0] = splittedProps.value[0];
|
|
134
|
+
Object.assign(element, {
|
|
135
|
+
defaultOpen: p0,
|
|
136
|
+
disabled: p1,
|
|
137
|
+
modal: p2,
|
|
138
|
+
open: p3
|
|
139
|
+
});
|
|
140
|
+
handlers.length = 0;
|
|
141
|
+
handlers.push(e0);
|
|
142
|
+
});
|
|
143
|
+
watchEffect(() => {
|
|
144
|
+
const element = elementRef.value;
|
|
145
|
+
if (!element) return;
|
|
146
|
+
const ac = new AbortController();
|
|
147
|
+
for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
148
|
+
handlers[index]?.(event);
|
|
149
|
+
}, { signal: ac.signal });
|
|
150
|
+
return () => ac.abort();
|
|
151
|
+
});
|
|
152
|
+
return () => {
|
|
153
|
+
const restProps = splittedProps.value[1];
|
|
154
|
+
return h("prosekit-popover-root", {
|
|
155
|
+
...restProps,
|
|
156
|
+
ref: elementRef
|
|
157
|
+
}, slots.default?.());
|
|
158
|
+
};
|
|
159
|
+
}, { props: [
|
|
160
|
+
"defaultOpen",
|
|
161
|
+
"disabled",
|
|
162
|
+
"modal",
|
|
163
|
+
"open",
|
|
164
|
+
"onOpenChange"
|
|
165
|
+
] });
|
|
8
166
|
//#endregion
|
|
9
167
|
//#region src/components/popover/popover-trigger.gen.ts
|
|
10
|
-
|
|
168
|
+
/**
|
|
169
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* A Vue component that renders an `prosekit-popover-trigger` custom element.
|
|
173
|
+
*
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
const PopoverTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
177
|
+
registerPopoverTriggerElement();
|
|
178
|
+
const elementRef = shallowRef(null);
|
|
179
|
+
const splittedProps = computed(() => {
|
|
180
|
+
const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;
|
|
181
|
+
return [[
|
|
182
|
+
p0,
|
|
183
|
+
p1,
|
|
184
|
+
p2,
|
|
185
|
+
p3,
|
|
186
|
+
e0
|
|
187
|
+
], restProps];
|
|
188
|
+
});
|
|
189
|
+
const handlers = [];
|
|
190
|
+
watchEffect(() => {
|
|
191
|
+
const element = elementRef.value;
|
|
192
|
+
if (!element) return;
|
|
193
|
+
const [p0, p1, p2, p3, e0] = splittedProps.value[0];
|
|
194
|
+
Object.assign(element, {
|
|
195
|
+
closeDelay: p0,
|
|
196
|
+
delay: p1,
|
|
197
|
+
disabled: p2,
|
|
198
|
+
openOnHover: p3
|
|
199
|
+
});
|
|
200
|
+
handlers.length = 0;
|
|
201
|
+
handlers.push(e0);
|
|
202
|
+
});
|
|
203
|
+
watchEffect(() => {
|
|
204
|
+
const element = elementRef.value;
|
|
205
|
+
if (!element) return;
|
|
206
|
+
const ac = new AbortController();
|
|
207
|
+
for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
208
|
+
handlers[index]?.(event);
|
|
209
|
+
}, { signal: ac.signal });
|
|
210
|
+
return () => ac.abort();
|
|
211
|
+
});
|
|
212
|
+
return () => {
|
|
213
|
+
const restProps = splittedProps.value[1];
|
|
214
|
+
return h("prosekit-popover-trigger", {
|
|
215
|
+
...restProps,
|
|
216
|
+
ref: elementRef
|
|
217
|
+
}, slots.default?.());
|
|
218
|
+
};
|
|
219
|
+
}, { props: [
|
|
220
|
+
"closeDelay",
|
|
221
|
+
"delay",
|
|
222
|
+
"disabled",
|
|
223
|
+
"openOnHover",
|
|
224
|
+
"onOpenChange"
|
|
225
|
+
] });
|
|
11
226
|
//#endregion
|
|
12
|
-
export {
|
|
227
|
+
export { OpenChangeEvent, PopoverPopup, PopoverPositioner, PopoverRoot, PopoverTrigger };
|
|
13
228
|
|
|
14
229
|
//# sourceMappingURL=prosekit-vue-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-popover.js","names":[],"sources":["../src/components/popover/popover-content.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"sourcesContent":["import {\n popoverContentProps,\n popoverContentEvents,\n type PopoverContentProps as Props,\n type PopoverContentEvents as Events,\n} from '@prosekit/web/popover'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link PopoverContent} component.\n */\nexport interface PopoverContentProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link PopoverContent} component.\n */\nexport interface PopoverContentEmits extends CreateEmits<Events> {}\n\nexport const PopoverContent: DefineSetupFnComponent<\n PopoverContentProps & HTMLAttributes,\n PopoverContentEmits\n> = createComponent<\n PopoverContentProps,\n PopoverContentEmits\n>(\n 'prosekit-popover-content',\n 'PopoverContent',\n Object.keys(popoverContentProps),\n Object.keys(popoverContentEvents),\n)\n","import {\n popoverRootProps,\n popoverRootEvents,\n type PopoverRootProps as Props,\n type PopoverRootEvents as Events,\n} from '@prosekit/web/popover'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link PopoverRoot} component.\n */\nexport interface PopoverRootProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link PopoverRoot} component.\n */\nexport interface PopoverRootEmits extends CreateEmits<Events> {}\n\nexport const PopoverRoot: DefineSetupFnComponent<\n PopoverRootProps & HTMLAttributes,\n PopoverRootEmits\n> = createComponent<\n PopoverRootProps,\n PopoverRootEmits\n>(\n 'prosekit-popover-root',\n 'PopoverRoot',\n Object.keys(popoverRootProps),\n Object.keys(popoverRootEvents),\n)\n","import {\n popoverTriggerProps,\n popoverTriggerEvents,\n type PopoverTriggerProps as Props,\n type PopoverTriggerEvents as Events,\n} from '@prosekit/web/popover'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link PopoverTrigger} component.\n */\nexport interface PopoverTriggerProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link PopoverTrigger} component.\n */\nexport interface PopoverTriggerEmits extends CreateEmits<Events> {}\n\nexport const PopoverTrigger: DefineSetupFnComponent<\n PopoverTriggerProps & HTMLAttributes,\n PopoverTriggerEmits\n> = createComponent<\n PopoverTriggerProps,\n PopoverTriggerEmits\n>(\n 'prosekit-popover-trigger',\n 'PopoverTrigger',\n Object.keys(popoverTriggerProps),\n Object.keys(popoverTriggerEvents),\n)\n"],"mappings":";;;AAqBA,MAAa,iBAGT,gBAIF,4BACA,kBACA,OAAO,KAAK,oBAAoB,EAChC,OAAO,KAAK,qBAAqB,CAClC;;;ACXD,MAAa,cAGT,gBAIF,yBACA,eACA,OAAO,KAAK,iBAAiB,EAC7B,OAAO,KAAK,kBAAkB,CAC/B;;;ACXD,MAAa,iBAGT,gBAIF,4BACA,kBACA,OAAO,KAAK,oBAAoB,EAChC,OAAO,KAAK,qBAAqB,CAClC"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-popover.js","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPopupElement } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link PopoverPopup} Vue component.\n *\n * @public\n */\nexport interface PopoverPopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-popover-popup` custom element.\n *\n * @public\n */\nexport const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPopupElement();\n\n return () => {\n return h('prosekit-popover-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverPositioner} Vue component.\n *\n * @public\n */\nexport interface PopoverPositionerProps {\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: PopoverPositionerElementProps['strategy'];\n /**\n * The initial placement of the floating element\n *\n * @default \"top\"\n */\n placement?: PopoverPositionerElementProps['placement'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: PopoverPositionerElementProps['autoUpdate'];\n /**\n * Whether to use the browser Popover API to place the floating element on\n * top of other page content.\n *\n * @default true\n */\n hoist?: PopoverPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: PopoverPositionerElementProps['offset'];\n /**\n * Whether to flip the `placement` in order to keep it in view when the\n * preferred placement(s) will overflow the clipping boundary. You can also\n * provide an array of placements to try sequentially if the preferred\n * `placement` does not fit.\n *\n * @default true\n */\n flip?: PopoverPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: PopoverPositionerElementProps['shift'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: PopoverPositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: PopoverPositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: PopoverPositionerElementProps['sameWidth'];\n /**\n * Whether to constrain the floating element's height so that it matches the\n * reference element.\n *\n * @default false\n */\n sameHeight?: PopoverPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: PopoverPositionerElementProps['inline'];\n /**\n * Whether to hide the floating element when the reference element or the\n * floating element is fully clipped.\n *\n * @default false\n */\n hide?: PopoverPositionerElementProps['hide'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: PopoverPositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: PopoverPositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: PopoverPositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: PopoverPositionerElementProps['elementContext'];\n /**\n * Whether to check the alternate elementContext's boundary. Please see\n * https://floating-ui.com/docs/detectoverflow#altboundary for more\n * information.\n *\n * @default false\n */\n altBoundary?: PopoverPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-positioner` custom element.\n *\n * @public\n */\nexport const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverPositionerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17, ...restProps } = props;\n return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];\n\n Object.assign(element, { altBoundary: p0, autoUpdate: p1, boundary: p2, elementContext: p3, fitViewport: p4, flip: p5, hide: p6, hoist: p7, inline: p8, offset: p9, overflowPadding: p10, overlap: p11, placement: p12, rootBoundary: p13, sameHeight: p14, sameWidth: p15, shift: p16, strategy: p17 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-positioner', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['altBoundary', 'autoUpdate', 'boundary', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverRootElement, type PopoverRootEvents, type PopoverRootProps as PopoverRootElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverRoot} Vue component.\n *\n * @public\n */\nexport interface PopoverRootProps {\n /**\n * Whether the popover should be modal.\n * When true, the popover will trap focus and prevent interaction with the rest of the page.\n *\n * @default false\n */\n modal?: PopoverRootElementProps['modal'];\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: PopoverRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: PopoverRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverRootElementProps['disabled'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-root` custom element.\n *\n * @public\n */\nexport const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, modal: p2, open: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, modal: p2, open: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'modal', 'open', 'onOpenChange'] },\n);\n\nexport type { PopoverRootEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerPopoverTriggerElement, type PopoverTriggerEvents, type PopoverTriggerProps as PopoverTriggerElementProps } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link PopoverTrigger} Vue component.\n *\n * @public\n */\nexport interface PopoverTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: PopoverTriggerElementProps['disabled'];\n /**\n * Whether the popover should also open when the trigger is hovered.\n * @default false\n */\n openOnHover?: PopoverTriggerElementProps['openOnHover'];\n /**\n * The delay in milliseconds before opening the popover when hovering.\n * Only applies when `openOnHover` is true.\n * @default 300\n */\n delay?: PopoverTriggerElementProps['delay'];\n /**\n * The delay in milliseconds before closing the popover when hover ends.\n * Only applies when `openOnHover` is true.\n * @default 0\n */\n closeDelay?: PopoverTriggerElementProps['closeDelay'];\n /** Emitted when the popover is opened or closed. */\n onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-popover-trigger` custom element.\n *\n * @public\n */\nexport const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerPopoverTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, p3, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1, p2, p3, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeDelay: p0, delay: p1, disabled: p2, openOnHover: p3 });\n\n handlers.length = 0;\n handlers.push(e0);\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const ac = new AbortController();\n for (const [index, eventName] of ['openChange'].entries()) {\n element.addEventListener(\n eventName,\n (event: Event) => {\n handlers[index]?.(event);\n },\n { signal: ac.signal },\n );\n }\n return () => ac.abort();\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-popover-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeDelay', 'delay', 'disabled', 'openOnHover', 'onOpenChange'] },\n);\n\nexport type { PopoverTriggerEvents };\n"],"mappings":"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"}
|
|
@@ -1,28 +1,63 @@
|
|
|
1
|
-
import { t as CreateEmits } from "./create-emits.js";
|
|
2
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { ResizableHandleProps as ResizableHandleProps$1, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1, ResizeEndEvent, ResizeStartEvent } from "@prosekit/web/resizable";
|
|
4
3
|
|
|
5
|
-
//#region src/components/resizable/resizable-
|
|
4
|
+
//#region src/components/resizable/resizable-root.gen.d.ts
|
|
6
5
|
/**
|
|
7
|
-
* Props for the {@link
|
|
6
|
+
* Props for the {@link ResizableRoot} Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
8
9
|
*/
|
|
9
|
-
interface
|
|
10
|
+
interface ResizableRootProps {
|
|
11
|
+
/**
|
|
12
|
+
* The width of the resizable element.
|
|
13
|
+
*
|
|
14
|
+
* @default null
|
|
15
|
+
*/
|
|
16
|
+
width?: ResizableRootProps$1['width'];
|
|
17
|
+
/**
|
|
18
|
+
* The height of the resizable element.
|
|
19
|
+
*
|
|
20
|
+
* @default null
|
|
21
|
+
*/
|
|
22
|
+
height?: ResizableRootProps$1['height'];
|
|
23
|
+
/**
|
|
24
|
+
* The aspect ratio of the resizable element.
|
|
25
|
+
*
|
|
26
|
+
* @default null
|
|
27
|
+
*/
|
|
28
|
+
aspectRatio?: ResizableRootProps$1['aspectRatio'];
|
|
29
|
+
/** Emitted when a resize operation starts. */
|
|
30
|
+
onResizeStart?: (event: ResizableRootEvents['resizeStart']) => void;
|
|
31
|
+
/** Emitted when a resize operation ends. */
|
|
32
|
+
onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;
|
|
33
|
+
}
|
|
10
34
|
/**
|
|
11
|
-
*
|
|
35
|
+
* A Vue component that renders an `prosekit-resizable-root` custom element.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
12
38
|
*/
|
|
13
|
-
|
|
14
|
-
declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes, ResizableHandleEmits>;
|
|
39
|
+
declare const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes>;
|
|
15
40
|
//#endregion
|
|
16
|
-
//#region src/components/resizable/resizable-
|
|
41
|
+
//#region src/components/resizable/resizable-handle.gen.d.ts
|
|
17
42
|
/**
|
|
18
|
-
* Props for the {@link
|
|
43
|
+
* Props for the {@link ResizableHandle} Vue component.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
19
46
|
*/
|
|
20
|
-
interface
|
|
47
|
+
interface ResizableHandleProps {
|
|
48
|
+
/**
|
|
49
|
+
* The position of the handle.
|
|
50
|
+
*
|
|
51
|
+
* @default "bottom-right"
|
|
52
|
+
*/
|
|
53
|
+
position?: ResizableHandleProps$1['position'];
|
|
54
|
+
}
|
|
21
55
|
/**
|
|
22
|
-
*
|
|
56
|
+
* A Vue component that renders an `prosekit-resizable-handle` custom element.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
23
59
|
*/
|
|
24
|
-
|
|
25
|
-
declare const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes, ResizableRootEmits>;
|
|
60
|
+
declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes>;
|
|
26
61
|
//#endregion
|
|
27
|
-
export { ResizableHandle, type
|
|
62
|
+
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootEvents, type ResizableRootProps, ResizeEndEvent, ResizeStartEvent };
|
|
28
63
|
//# sourceMappingURL=prosekit-vue-resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-
|
|
1
|
+
{"version":3,"file":"prosekit-vue-resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;;;;;;;UAYiB,kBAAA;EAsBO;;;;;EAhBtB,KAAA,GAAQ,oBAAA;EAMC;;;;;EAAT,MAAA,GAAS,oBAAA;EAUT;;;;;EAJA,WAAA,GAAc,oBAAA;EA6Df;EA3DC,aAAA,IAAiB,KAAA,EAAO,mBAAA;EAUyB;EARjD,WAAA,IAAe,KAAA,EAAO,mBAAA;AAAA;;;;;;cAQX,aAAA,EAAe,sBAAA,CAAuB,kBAAA,GAAqB,cAAA;;;;;;;;UC9BvD,oBAAA;EDsBO;;;;;EChBtB,QAAA,GAAW,sBAAA;AAAA;;;;;;cAQA,eAAA,EAAiB,sBAAA,CAAuB,oBAAA,GAAuB,cAAA"}
|