@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.
Files changed (115) hide show
  1. package/dist/prosekit-vue-autocomplete.d.ts +216 -25
  2. package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
  3. package/dist/prosekit-vue-autocomplete.js +270 -9
  4. package/dist/prosekit-vue-autocomplete.js.map +1 -1
  5. package/dist/prosekit-vue-block-handle.d.ts +202 -19
  6. package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
  7. package/dist/prosekit-vue-block-handle.js +211 -7
  8. package/dist/prosekit-vue-block-handle.js.map +1 -1
  9. package/dist/prosekit-vue-drop-indicator.d.ts +24 -8
  10. package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
  11. package/dist/prosekit-vue-drop-indicator.js +36 -3
  12. package/dist/prosekit-vue-drop-indicator.js.map +1 -1
  13. package/dist/prosekit-vue-inline-popover.d.ts +200 -9
  14. package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
  15. package/dist/prosekit-vue-inline-popover.js +171 -5
  16. package/dist/prosekit-vue-inline-popover.js.map +1 -1
  17. package/dist/prosekit-vue-menu.d.ts +287 -0
  18. package/dist/prosekit-vue-menu.d.ts.map +1 -0
  19. package/dist/prosekit-vue-menu.js +313 -0
  20. package/dist/prosekit-vue-menu.js.map +1 -0
  21. package/dist/prosekit-vue-popover.d.ts +219 -19
  22. package/dist/prosekit-vue-popover.d.ts.map +1 -1
  23. package/dist/prosekit-vue-popover.js +222 -7
  24. package/dist/prosekit-vue-popover.js.map +1 -1
  25. package/dist/prosekit-vue-resizable.d.ts +50 -15
  26. package/dist/prosekit-vue-resizable.d.ts.map +1 -1
  27. package/dist/prosekit-vue-resizable.js +92 -7
  28. package/dist/prosekit-vue-resizable.js.map +1 -1
  29. package/dist/prosekit-vue-table-handle.d.ts +427 -55
  30. package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
  31. package/dist/prosekit-vue-table-handle.js +455 -19
  32. package/dist/prosekit-vue-table-handle.js.map +1 -1
  33. package/dist/prosekit-vue-tooltip.d.ts +203 -19
  34. package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
  35. package/dist/prosekit-vue-tooltip.js +202 -7
  36. package/dist/prosekit-vue-tooltip.js.map +1 -1
  37. package/package.json +24 -16
  38. package/src/components/autocomplete/autocomplete-empty.gen.ts +21 -25
  39. package/src/components/autocomplete/autocomplete-item.gen.ts +80 -26
  40. package/src/components/autocomplete/autocomplete-popup.gen.ts +80 -0
  41. package/src/components/autocomplete/autocomplete-positioner.gen.ts +149 -0
  42. package/src/components/autocomplete/autocomplete-root.gen.ts +112 -0
  43. package/src/components/autocomplete/index.gen.ts +12 -4
  44. package/src/components/autocomplete/index.ts +27 -0
  45. package/src/components/block-handle/block-handle-add.gen.ts +51 -26
  46. package/src/components/block-handle/block-handle-draggable.gen.ts +51 -26
  47. package/src/components/block-handle/block-handle-popup.gen.ts +29 -0
  48. package/src/components/block-handle/block-handle-positioner.gen.ts +167 -0
  49. package/src/components/block-handle/block-handle-root.gen.ts +84 -0
  50. package/src/components/block-handle/index.gen.ts +13 -3
  51. package/src/components/block-handle/index.ts +27 -0
  52. package/src/components/drop-indicator/drop-indicator.gen.ts +57 -26
  53. package/src/components/drop-indicator/index.gen.ts +5 -1
  54. package/src/components/drop-indicator/index.ts +14 -0
  55. package/src/components/inline-popover/index.gen.ts +11 -1
  56. package/src/components/inline-popover/index.ts +22 -0
  57. package/src/components/inline-popover/inline-popover-popup.gen.ts +29 -0
  58. package/src/components/inline-popover/inline-popover-positioner.gen.ts +173 -0
  59. package/src/components/inline-popover/inline-popover-root.gen.ts +108 -0
  60. package/src/components/menu/index.gen.ts +19 -0
  61. package/src/components/menu/index.ts +37 -0
  62. package/src/components/menu/menu-item.gen.ts +91 -0
  63. package/src/components/menu/menu-popup.gen.ts +54 -0
  64. package/src/components/menu/menu-positioner.gen.ts +174 -0
  65. package/src/components/menu/menu-root.gen.ts +88 -0
  66. package/src/components/menu/menu-submenu-root.gen.ts +29 -0
  67. package/src/components/menu/menu-submenu-trigger.gen.ts +29 -0
  68. package/src/components/menu/menu-trigger.gen.ts +79 -0
  69. package/src/components/popover/index.gen.ts +11 -3
  70. package/src/components/popover/index.ts +24 -0
  71. package/src/components/popover/popover-popup.gen.ts +29 -0
  72. package/src/components/popover/popover-positioner.gen.ts +174 -0
  73. package/src/components/popover/popover-root.gen.ts +88 -26
  74. package/src/components/popover/popover-trigger.gen.ts +88 -26
  75. package/src/components/resizable/index.gen.ts +8 -2
  76. package/src/components/resizable/index.ts +20 -0
  77. package/src/components/resizable/resizable-handle.gen.ts +46 -26
  78. package/src/components/resizable/resizable-root.gen.ts +87 -26
  79. package/src/components/table-handle/index.gen.ts +17 -9
  80. package/src/components/table-handle/index.ts +58 -0
  81. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +62 -0
  82. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +56 -0
  83. package/src/components/table-handle/table-handle-column-popup.gen.ts +29 -0
  84. package/src/components/table-handle/table-handle-column-positioner.gen.ts +197 -0
  85. package/src/components/table-handle/table-handle-drag-preview.gen.ts +49 -26
  86. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +49 -26
  87. package/src/components/table-handle/table-handle-root.gen.ts +51 -26
  88. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +62 -0
  89. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +56 -0
  90. package/src/components/table-handle/table-handle-row-popup.gen.ts +29 -0
  91. package/src/components/table-handle/table-handle-row-positioner.gen.ts +197 -0
  92. package/src/components/tooltip/index.gen.ts +11 -3
  93. package/src/components/tooltip/index.ts +24 -0
  94. package/src/components/tooltip/tooltip-popup.gen.ts +29 -0
  95. package/src/components/tooltip/tooltip-positioner.gen.ts +174 -0
  96. package/src/components/tooltip/tooltip-root.gen.ts +81 -26
  97. package/src/components/tooltip/tooltip-trigger.gen.ts +55 -26
  98. package/dist/create-component.js +0 -45
  99. package/dist/create-component.js.map +0 -1
  100. package/dist/create-emits.d.ts +0 -5
  101. package/dist/create-emits.d.ts.map +0 -1
  102. package/src/components/autocomplete/autocomplete-list.gen.ts +0 -33
  103. package/src/components/autocomplete/autocomplete-popover.gen.ts +0 -33
  104. package/src/components/block-handle/block-handle-popover.gen.ts +0 -33
  105. package/src/components/create-component.ts +0 -84
  106. package/src/components/create-emits.ts +0 -8
  107. package/src/components/inline-popover/inline-popover.gen.ts +0 -33
  108. package/src/components/popover/popover-content.gen.ts +0 -33
  109. package/src/components/table-handle/table-handle-column-root.gen.ts +0 -33
  110. package/src/components/table-handle/table-handle-column-trigger.gen.ts +0 -33
  111. package/src/components/table-handle/table-handle-popover-content.gen.ts +0 -33
  112. package/src/components/table-handle/table-handle-popover-item.gen.ts +0 -33
  113. package/src/components/table-handle/table-handle-row-root.gen.ts +0 -33
  114. package/src/components/table-handle/table-handle-row-trigger.gen.ts +0 -33
  115. package/src/components/tooltip/tooltip-content.gen.ts +0 -33
@@ -0,0 +1,287 @@
1
+ import { DefineSetupFnComponent, HTMLAttributes } from "vue";
2
+ import { MenuItemEvents, MenuItemProps as MenuItemProps$1, MenuPopupProps as MenuPopupProps$1, MenuPositionerProps as MenuPositionerProps$1, MenuRootEvents, MenuRootProps as MenuRootProps$1, MenuTriggerEvents, MenuTriggerProps as MenuTriggerProps$1, OpenChangeEvent, SelectEvent } from "@prosekit/web/menu";
3
+
4
+ //#region src/components/menu/menu-item.gen.d.ts
5
+ /**
6
+ * Props for the {@link MenuItem} Vue component.
7
+ *
8
+ * @public
9
+ */
10
+ interface MenuItemProps {
11
+ /**
12
+ * The unique value for this menu item.
13
+ *
14
+ * @default ""
15
+ */
16
+ value?: MenuItemProps$1['value'];
17
+ /**
18
+ * Whether this menu item is disabled.
19
+ *
20
+ * @default false
21
+ */
22
+ disabled?: MenuItemProps$1['disabled'];
23
+ /**
24
+ * Whether to close the menu when the item is pressed.
25
+ *
26
+ * @default true
27
+ */
28
+ closeOnSelect?: MenuItemProps$1['closeOnSelect'];
29
+ /** Emitted when the the item is selected. */
30
+ onSelect?: (event: MenuItemEvents['select']) => void;
31
+ }
32
+ /**
33
+ * A Vue component that renders an `prosekit-menu-item` custom element.
34
+ *
35
+ * @public
36
+ */
37
+ declare const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes>;
38
+ //#endregion
39
+ //#region src/components/menu/menu-popup.gen.d.ts
40
+ /**
41
+ * Props for the {@link MenuPopup} Vue component.
42
+ *
43
+ * @public
44
+ */
45
+ interface MenuPopupProps {
46
+ /**
47
+ * By default, the MenuPopup element will listen for keydown events.
48
+ * You can pass a different element to listen for keydown events.
49
+ *
50
+ * @default null
51
+ */
52
+ eventTarget?: MenuPopupProps$1['eventTarget'];
53
+ }
54
+ /**
55
+ * A Vue component that renders an `prosekit-menu-popup` custom element.
56
+ *
57
+ * @public
58
+ */
59
+ declare const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes>;
60
+ //#endregion
61
+ //#region src/components/menu/menu-positioner.gen.d.ts
62
+ /**
63
+ * Props for the {@link MenuPositioner} Vue component.
64
+ *
65
+ * @public
66
+ */
67
+ interface MenuPositionerProps {
68
+ /**
69
+ * The initial placement of the floating element
70
+ *
71
+ * @default "bottom-start"
72
+ */
73
+ placement?: MenuPositionerProps$1['placement'];
74
+ /**
75
+ * The strategy to use for positioning
76
+ *
77
+ * @default "absolute"
78
+ */
79
+ strategy?: MenuPositionerProps$1['strategy'];
80
+ /**
81
+ * Options to activate auto-update listeners
82
+ *
83
+ * @see https://floating-ui.com/docs/autoUpdate
84
+ *
85
+ * @default true
86
+ */
87
+ autoUpdate?: MenuPositionerProps$1['autoUpdate'];
88
+ /**
89
+ * Whether to use the browser Popover API to place the floating element on
90
+ * top of other page content.
91
+ *
92
+ * @default true
93
+ */
94
+ hoist?: MenuPositionerProps$1['hoist'];
95
+ /**
96
+ * The distance between the reference and floating element.
97
+ *
98
+ * @default 6
99
+ */
100
+ offset?: MenuPositionerProps$1['offset'];
101
+ /**
102
+ * Whether to flip the `placement` in order to keep it in view when the
103
+ * preferred placement(s) will overflow the clipping boundary. You can also
104
+ * provide an array of placements to try sequentially if the preferred
105
+ * `placement` does not fit.
106
+ *
107
+ * @default true
108
+ */
109
+ flip?: MenuPositionerProps$1['flip'];
110
+ /**
111
+ * Whether the floating element should shift to keep it in view.
112
+ *
113
+ * @default true
114
+ */
115
+ shift?: MenuPositionerProps$1['shift'];
116
+ /**
117
+ * Whether the floating element can overlap the reference element to keep it
118
+ * in view.
119
+ *
120
+ * @default false
121
+ */
122
+ overlap?: MenuPositionerProps$1['overlap'];
123
+ /**
124
+ * Whether to constrain the floating element's width and height to not exceed
125
+ * the viewport.
126
+ *
127
+ * @default false
128
+ */
129
+ fitViewport?: MenuPositionerProps$1['fitViewport'];
130
+ /**
131
+ * Whether to constrain the floating element's width so that it matches the
132
+ * reference element.
133
+ *
134
+ * @default false
135
+ */
136
+ sameWidth?: MenuPositionerProps$1['sameWidth'];
137
+ /**
138
+ * Whether to constrain the floating element's height so that it matches the
139
+ * reference element.
140
+ *
141
+ * @default false
142
+ */
143
+ sameHeight?: MenuPositionerProps$1['sameHeight'];
144
+ /**
145
+ * Whether to improve positioning for inline reference elements that span over
146
+ * multiple lines.
147
+ *
148
+ * @default false
149
+ */
150
+ inline?: MenuPositionerProps$1['inline'];
151
+ /**
152
+ * Whether to hide the floating element when the reference element or the
153
+ * floating element is fully clipped.
154
+ *
155
+ * @default false
156
+ */
157
+ hide?: MenuPositionerProps$1['hide'];
158
+ /**
159
+ * Describes the clipping element(s) or area that overflow will be checked relative to.
160
+ * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
161
+ *
162
+ * @default 'clippingAncestors'
163
+ */
164
+ boundary?: MenuPositionerProps$1['boundary'];
165
+ /**
166
+ * Describes the root boundary that the element will be checked for overflow relative to.
167
+ * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
168
+ *
169
+ * @default 'viewport'
170
+ */
171
+ rootBoundary?: MenuPositionerProps$1['rootBoundary'];
172
+ /**
173
+ * Describes the virtual padding around the boundary to check for overflow.
174
+ * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.
175
+ *
176
+ * @default 4
177
+ */
178
+ overflowPadding?: MenuPositionerProps$1['overflowPadding'];
179
+ /**
180
+ * The element that will be used to check for overflow. Please see
181
+ * https://floating-ui.com/docs/detectoverflow#elementcontext for more
182
+ * information.
183
+ *
184
+ * @default 'floating'
185
+ */
186
+ elementContext?: MenuPositionerProps$1['elementContext'];
187
+ /**
188
+ * Whether to check the alternate elementContext's boundary. Please see
189
+ * https://floating-ui.com/docs/detectoverflow#altboundary for more
190
+ * information.
191
+ *
192
+ * @default false
193
+ */
194
+ altBoundary?: MenuPositionerProps$1['altBoundary'];
195
+ }
196
+ /**
197
+ * A Vue component that renders an `prosekit-menu-positioner` custom element.
198
+ *
199
+ * @public
200
+ */
201
+ declare const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes>;
202
+ //#endregion
203
+ //#region src/components/menu/menu-root.gen.d.ts
204
+ /**
205
+ * Props for the {@link MenuRoot} Vue component.
206
+ *
207
+ * @public
208
+ */
209
+ interface MenuRootProps {
210
+ /**
211
+ * Whether the overlay is initially open.
212
+ * @default false
213
+ */
214
+ defaultOpen?: MenuRootProps$1['defaultOpen'];
215
+ /**
216
+ * Whether the overlay is currently open.
217
+ * @default null
218
+ */
219
+ open?: MenuRootProps$1['open'];
220
+ /**
221
+ * Whether the component should ignore user interaction.
222
+ * @default false
223
+ */
224
+ disabled?: MenuRootProps$1['disabled'];
225
+ /** Emitted when the menu is opened or closed. */
226
+ onOpenChange?: (event: MenuRootEvents['openChange']) => void;
227
+ }
228
+ /**
229
+ * A Vue component that renders an `prosekit-menu-root` custom element.
230
+ *
231
+ * @public
232
+ */
233
+ declare const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes>;
234
+ //#endregion
235
+ //#region src/components/menu/menu-submenu-root.gen.d.ts
236
+ /**
237
+ * Props for the {@link MenuSubmenuRoot} Vue component.
238
+ *
239
+ * @public
240
+ */
241
+ interface MenuSubmenuRootProps {}
242
+ /**
243
+ * A Vue component that renders an `prosekit-menu-submenu-root` custom element.
244
+ *
245
+ * @public
246
+ */
247
+ declare const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes>;
248
+ //#endregion
249
+ //#region src/components/menu/menu-submenu-trigger.gen.d.ts
250
+ /**
251
+ * Props for the {@link MenuSubmenuTrigger} Vue component.
252
+ *
253
+ * @public
254
+ */
255
+ interface MenuSubmenuTriggerProps {}
256
+ /**
257
+ * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.
258
+ *
259
+ * @public
260
+ */
261
+ declare const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes>;
262
+ //#endregion
263
+ //#region src/components/menu/menu-trigger.gen.d.ts
264
+ /**
265
+ * Props for the {@link MenuTrigger} Vue component.
266
+ *
267
+ * @public
268
+ */
269
+ interface MenuTriggerProps {
270
+ /**
271
+ * Whether the component should ignore user interaction.
272
+ *
273
+ * @default false
274
+ */
275
+ disabled?: MenuTriggerProps$1['disabled'];
276
+ /** Emitted when the menu is opened or closed. */
277
+ onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
278
+ }
279
+ /**
280
+ * A Vue component that renders an `prosekit-menu-trigger` custom element.
281
+ *
282
+ * @public
283
+ */
284
+ declare const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes>;
285
+ //#endregion
286
+ export { MenuItem, type MenuItemEvents, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootEvents, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerEvents, type MenuTriggerProps, OpenChangeEvent, SelectEvent };
287
+ //# sourceMappingURL=prosekit-vue-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosekit-vue-menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;;;;;;;UAYiB,aAAA;EAoBkB;;;;;EAdjC,KAAA,GAAQ,eAAA;EAYR;;;;;EANA,QAAA,GAAW,eAAA;EAQgC;AAQ7C;;;;EAVE,aAAA,GAAgB,eAAA;EAUK;EARrB,QAAA,IAAY,KAAA,EAAO,cAAA;AAAA;;;;;;cAQR,QAAA,EAAU,sBAAA,CAAuB,aAAA,GAAgB,cAAA;;;;;;;;UC5B7C,cAAA;EDoBkB;;;;;;ECbjC,WAAA,GAAc,gBAAA;AAAA;;;;;;cAQH,SAAA,EAAW,sBAAA,CAAuB,cAAA,GAAiB,cAAA;;;;;;;;UCf/C,mBAAA;EFoBkB;;;;;EEdjC,SAAA,GAAY,qBAAA;EFYZ;;;;;EENA,QAAA,GAAW,qBAAA;EFQgC;AAQ7C;;;;;;EERE,UAAA,GAAa,qBAAA;EFQ8B;;;;;;EED3C,KAAA,GAAQ,qBAAA;;;AD3BV;;;ECiCE,MAAA,GAAS,qBAAA;ED1B0B;AAQrC;;;;;;;EC2BE,IAAA,GAAO,qBAAA;ED3Be;;;;;ECiCtB,KAAA,GAAQ,qBAAA;;;AAhDV;;;;EAuDE,OAAA,GAAU,qBAAA;EAnCG;;;;;;EA0Cb,WAAA,GAAc,qBAAA;EAOF;;;;;;EAAZ,SAAA,GAAY,qBAAA;EAkDK;;;;;;EA3CjB,UAAA,GAAa,qBAAA;EAhEF;;;;;;EAuEX,MAAA,GAAS,qBAAA;EAzCT;;;;;;EAgDA,IAAA,GAAO,qBAAA;EA5BO;;;;;;EAmCd,QAAA,GAAW,qBAAA;EAPX;;;;;;EAcA,YAAA,GAAe,qBAAA;EAOG;;;;;;EAAlB,eAAA,GAAkB,qBAAA;EAwBP;;;;;;;EAhBX,cAAA,GAAiB,qBAAA;EAgBU;;;;;;;EAR3B,WAAA,GAAc,qBAAA;AAAA;;;;;;cAQH,cAAA,EAAgB,sBAAA,CAAuB,mBAAA,GAAsB,cAAA;;;;;;;;UCvIzD,aAAA;EHoBkB;;;;EGfjC,WAAA,GAAc,eAAA;EHOH;;;;EGFX,IAAA,GAAO,eAAA;EHUK;;;AAQd;EGbE,QAAA,GAAW,eAAA;;EAEX,YAAA,IAAgB,KAAA,EAAO,cAAA;AAAA;;;;;;cAQZ,QAAA,EAAU,sBAAA,CAAuB,aAAA,GAAgB,cAAA;;;AHzB9D;;;;;AAAA,UIAiB,oBAAA;;;;;;cAOJ,eAAA,EAAiB,sBAAA,CAAuB,oBAAA,GAAuB,cAAA;;;AJP5E;;;;;AAAA,UKAiB,uBAAA;;;;;;cAOJ,kBAAA,EAAoB,sBAAA,CAAuB,uBAAA,GAA0B,cAAA;;;;;;;;UCPjE,gBAAA;ENoBkB;;;;;EMdjC,QAAA,GAAW,kBAAA;ENYX;EMVA,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;;;;ANoBzB;cMZa,WAAA,EAAa,sBAAA,CAAuB,gBAAA,GAAmB,cAAA"}
@@ -0,0 +1,313 @@
1
+ import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
2
+ import { OpenChangeEvent, SelectEvent, registerMenuItemElement, registerMenuPopupElement, registerMenuPositionerElement, registerMenuRootElement, registerMenuSubmenuRootElement, registerMenuSubmenuTriggerElement, registerMenuTriggerElement } from "@prosekit/web/menu";
3
+ //#region src/components/menu/menu-item.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-menu-item` custom element.
9
+ *
10
+ * @public
11
+ */
12
+ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots }) => {
13
+ registerMenuItemElement();
14
+ const elementRef = shallowRef(null);
15
+ const splittedProps = computed(() => {
16
+ const { closeOnSelect: p0, disabled: p1, value: p2, onSelect: e0, ...restProps } = props;
17
+ return [[
18
+ p0,
19
+ p1,
20
+ p2,
21
+ e0
22
+ ], restProps];
23
+ });
24
+ const handlers = [];
25
+ watchEffect(() => {
26
+ const element = elementRef.value;
27
+ if (!element) return;
28
+ const [p0, p1, p2, e0] = splittedProps.value[0];
29
+ Object.assign(element, {
30
+ closeOnSelect: p0,
31
+ disabled: p1,
32
+ value: p2
33
+ });
34
+ handlers.length = 0;
35
+ handlers.push(e0);
36
+ });
37
+ watchEffect(() => {
38
+ const element = elementRef.value;
39
+ if (!element) return;
40
+ const ac = new AbortController();
41
+ for (const [index, eventName] of ["select"].entries()) element.addEventListener(eventName, (event) => {
42
+ handlers[index]?.(event);
43
+ }, { signal: ac.signal });
44
+ return () => ac.abort();
45
+ });
46
+ return () => {
47
+ const restProps = splittedProps.value[1];
48
+ return h("prosekit-menu-item", {
49
+ ...restProps,
50
+ ref: elementRef
51
+ }, slots.default?.());
52
+ };
53
+ }, { props: [
54
+ "closeOnSelect",
55
+ "disabled",
56
+ "value",
57
+ "onSelect"
58
+ ] });
59
+ //#endregion
60
+ //#region src/components/menu/menu-popup.gen.ts
61
+ /**
62
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
63
+ */
64
+ /**
65
+ * A Vue component that renders an `prosekit-menu-popup` custom element.
66
+ *
67
+ * @public
68
+ */
69
+ const MenuPopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
70
+ registerMenuPopupElement();
71
+ const elementRef = shallowRef(null);
72
+ const splittedProps = computed(() => {
73
+ const { eventTarget: p0, ...restProps } = props;
74
+ return [[p0], restProps];
75
+ });
76
+ watchEffect(() => {
77
+ const element = elementRef.value;
78
+ if (!element) return;
79
+ const [p0] = splittedProps.value[0];
80
+ Object.assign(element, { eventTarget: p0 });
81
+ });
82
+ return () => {
83
+ const restProps = splittedProps.value[1];
84
+ return h("prosekit-menu-popup", {
85
+ ...restProps,
86
+ ref: elementRef
87
+ }, slots.default?.());
88
+ };
89
+ }, { props: ["eventTarget"] });
90
+ //#endregion
91
+ //#region src/components/menu/menu-positioner.gen.ts
92
+ /**
93
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
94
+ */
95
+ /**
96
+ * A Vue component that renders an `prosekit-menu-positioner` custom element.
97
+ *
98
+ * @public
99
+ */
100
+ const MenuPositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
101
+ registerMenuPositionerElement();
102
+ const elementRef = shallowRef(null);
103
+ const splittedProps = computed(() => {
104
+ 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;
105
+ return [[
106
+ p0,
107
+ p1,
108
+ p2,
109
+ p3,
110
+ p4,
111
+ p5,
112
+ p6,
113
+ p7,
114
+ p8,
115
+ p9,
116
+ p10,
117
+ p11,
118
+ p12,
119
+ p13,
120
+ p14,
121
+ p15,
122
+ p16,
123
+ p17
124
+ ], restProps];
125
+ });
126
+ watchEffect(() => {
127
+ const element = elementRef.value;
128
+ if (!element) return;
129
+ const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];
130
+ Object.assign(element, {
131
+ altBoundary: p0,
132
+ autoUpdate: p1,
133
+ boundary: p2,
134
+ elementContext: p3,
135
+ fitViewport: p4,
136
+ flip: p5,
137
+ hide: p6,
138
+ hoist: p7,
139
+ inline: p8,
140
+ offset: p9,
141
+ overflowPadding: p10,
142
+ overlap: p11,
143
+ placement: p12,
144
+ rootBoundary: p13,
145
+ sameHeight: p14,
146
+ sameWidth: p15,
147
+ shift: p16,
148
+ strategy: p17
149
+ });
150
+ });
151
+ return () => {
152
+ const restProps = splittedProps.value[1];
153
+ return h("prosekit-menu-positioner", {
154
+ ...restProps,
155
+ ref: elementRef
156
+ }, slots.default?.());
157
+ };
158
+ }, { props: [
159
+ "altBoundary",
160
+ "autoUpdate",
161
+ "boundary",
162
+ "elementContext",
163
+ "fitViewport",
164
+ "flip",
165
+ "hide",
166
+ "hoist",
167
+ "inline",
168
+ "offset",
169
+ "overflowPadding",
170
+ "overlap",
171
+ "placement",
172
+ "rootBoundary",
173
+ "sameHeight",
174
+ "sameWidth",
175
+ "shift",
176
+ "strategy"
177
+ ] });
178
+ //#endregion
179
+ //#region src/components/menu/menu-root.gen.ts
180
+ /**
181
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
182
+ */
183
+ /**
184
+ * A Vue component that renders an `prosekit-menu-root` custom element.
185
+ *
186
+ * @public
187
+ */
188
+ const MenuRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
189
+ registerMenuRootElement();
190
+ const elementRef = shallowRef(null);
191
+ const splittedProps = computed(() => {
192
+ const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;
193
+ return [[
194
+ p0,
195
+ p1,
196
+ p2,
197
+ e0
198
+ ], restProps];
199
+ });
200
+ const handlers = [];
201
+ watchEffect(() => {
202
+ const element = elementRef.value;
203
+ if (!element) return;
204
+ const [p0, p1, p2, e0] = splittedProps.value[0];
205
+ Object.assign(element, {
206
+ defaultOpen: p0,
207
+ disabled: p1,
208
+ open: p2
209
+ });
210
+ handlers.length = 0;
211
+ handlers.push(e0);
212
+ });
213
+ watchEffect(() => {
214
+ const element = elementRef.value;
215
+ if (!element) return;
216
+ const ac = new AbortController();
217
+ for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
218
+ handlers[index]?.(event);
219
+ }, { signal: ac.signal });
220
+ return () => ac.abort();
221
+ });
222
+ return () => {
223
+ const restProps = splittedProps.value[1];
224
+ return h("prosekit-menu-root", {
225
+ ...restProps,
226
+ ref: elementRef
227
+ }, slots.default?.());
228
+ };
229
+ }, { props: [
230
+ "defaultOpen",
231
+ "disabled",
232
+ "open",
233
+ "onOpenChange"
234
+ ] });
235
+ //#endregion
236
+ //#region src/components/menu/menu-submenu-root.gen.ts
237
+ /**
238
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
239
+ */
240
+ /**
241
+ * A Vue component that renders an `prosekit-menu-submenu-root` custom element.
242
+ *
243
+ * @public
244
+ */
245
+ const MenuSubmenuRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
246
+ registerMenuSubmenuRootElement();
247
+ return () => {
248
+ return h("prosekit-menu-submenu-root", props, slots.default?.());
249
+ };
250
+ }, { props: [] });
251
+ //#endregion
252
+ //#region src/components/menu/menu-submenu-trigger.gen.ts
253
+ /**
254
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
255
+ */
256
+ /**
257
+ * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.
258
+ *
259
+ * @public
260
+ */
261
+ const MenuSubmenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
262
+ registerMenuSubmenuTriggerElement();
263
+ return () => {
264
+ return h("prosekit-menu-submenu-trigger", props, slots.default?.());
265
+ };
266
+ }, { props: [] });
267
+ //#endregion
268
+ //#region src/components/menu/menu-trigger.gen.ts
269
+ /**
270
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
271
+ */
272
+ /**
273
+ * A Vue component that renders an `prosekit-menu-trigger` custom element.
274
+ *
275
+ * @public
276
+ */
277
+ const MenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
278
+ registerMenuTriggerElement();
279
+ const elementRef = shallowRef(null);
280
+ const splittedProps = computed(() => {
281
+ const { disabled: p0, onOpenChange: e0, ...restProps } = props;
282
+ return [[p0, e0], restProps];
283
+ });
284
+ const handlers = [];
285
+ watchEffect(() => {
286
+ const element = elementRef.value;
287
+ if (!element) return;
288
+ const [p0, e0] = splittedProps.value[0];
289
+ Object.assign(element, { disabled: p0 });
290
+ handlers.length = 0;
291
+ handlers.push(e0);
292
+ });
293
+ watchEffect(() => {
294
+ const element = elementRef.value;
295
+ if (!element) return;
296
+ const ac = new AbortController();
297
+ for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
298
+ handlers[index]?.(event);
299
+ }, { signal: ac.signal });
300
+ return () => ac.abort();
301
+ });
302
+ return () => {
303
+ const restProps = splittedProps.value[1];
304
+ return h("prosekit-menu-trigger", {
305
+ ...restProps,
306
+ ref: elementRef
307
+ }, slots.default?.());
308
+ };
309
+ }, { props: ["disabled", "onOpenChange"] });
310
+ //#endregion
311
+ export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger, OpenChangeEvent, SelectEvent };
312
+
313
+ //# sourceMappingURL=prosekit-vue-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosekit-vue-menu.js","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-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 { registerMenuItemElement, type MenuItemEvents, type MenuItemProps as MenuItemElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuItem} Vue component.\n *\n * @public\n */\nexport interface MenuItemProps {\n /**\n * The unique value for this menu item.\n *\n * @default \"\"\n */\n value?: MenuItemElementProps['value'];\n /**\n * Whether this menu item is disabled.\n *\n * @default false\n */\n disabled?: MenuItemElementProps['disabled'];\n /**\n * Whether to close the menu when the item is pressed.\n *\n * @default true\n */\n closeOnSelect?: MenuItemElementProps['closeOnSelect'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: MenuItemEvents['select']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-item` custom element.\n *\n * @public\n */\nexport const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { closeOnSelect: p0, disabled: p1, value: p2, onSelect: e0, ...restProps } = props;\n return [[p0, p1, p2, 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, e0] = splittedProps.value[0];\n\n Object.assign(element, { closeOnSelect: p0, disabled: p1, value: p2 });\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 ['select'].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-menu-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['closeOnSelect', 'disabled', 'value', 'onSelect'] },\n);\n\nexport type { MenuItemEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPopup} Vue component.\n *\n * @public\n */\nexport interface MenuPopupProps {\n /**\n * By default, the MenuPopup element will listen for keydown events.\n * You can pass a different element to listen for keydown events.\n *\n * @default null\n */\n eventTarget?: MenuPopupElementProps['eventTarget'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-popup` custom element.\n *\n * @public\n */\nexport const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { eventTarget: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { eventTarget: p0 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['eventTarget'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuPositioner} Vue component.\n *\n * @public\n */\nexport interface MenuPositionerProps {\n /**\n * The initial placement of the floating element\n *\n * @default \"bottom-start\"\n */\n placement?: MenuPositionerElementProps['placement'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: MenuPositionerElementProps['strategy'];\n /**\n * Options to activate auto-update listeners\n *\n * @see https://floating-ui.com/docs/autoUpdate\n *\n * @default true\n */\n autoUpdate?: MenuPositionerElementProps['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?: MenuPositionerElementProps['hoist'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: MenuPositionerElementProps['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?: MenuPositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['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?: MenuPositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-positioner` custom element.\n *\n * @public\n */\nexport const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuPositionerElement();\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-menu-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 { registerMenuRootElement, type MenuRootEvents, type MenuRootProps as MenuRootElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuRootElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuRootEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-root` custom element.\n *\n * @public\n */\nexport const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;\n return [[p0, p1, p2, 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, e0] = splittedProps.value[0];\n\n Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });\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-menu-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n\nexport type { MenuRootEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerMenuSubmenuRootElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuRoot} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuRootProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-root` custom element.\n *\n * @public\n */\nexport const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuRootElement();\n\n return () => {\n return h('prosekit-menu-submenu-root', 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 { registerMenuSubmenuTriggerElement } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link MenuSubmenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuSubmenuTriggerProps {}\n\n/**\n * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.\n *\n * @public\n */\nexport const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuTriggerElement();\n\n return () => {\n return h('prosekit-menu-submenu-trigger', 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 { registerMenuTriggerElement, type MenuTriggerEvents, type MenuTriggerProps as MenuTriggerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link MenuTrigger} Vue component.\n *\n * @public\n */\nexport interface MenuTriggerProps {\n /**\n * Whether the component should ignore user interaction.\n *\n * @default false\n */\n disabled?: MenuTriggerElementProps['disabled'];\n /** Emitted when the menu is opened or closed. */\n onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-menu-trigger` custom element.\n *\n * @public\n */\nexport const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, onOpenChange: e0, ...restProps } = props;\n return [[p0, 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, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0 });\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-menu-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'onOpenChange'] },\n);\n\nexport type { MenuTriggerEvents };\n"],"mappings":";;;;;;;;;;;AAwCA,MAAa,WAAmF,iCAC7F,OAAO,EAAE,YAAY;AACpB,0BAAyB;CAEzB,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,eAAe,IAAI,UAAU,IAAI,OAA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