@prosekit/vue 0.7.0-beta.4 → 0.7.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-context.js +0 -2
- package/dist/editor-context.js.map +1 -1
- package/dist/prosekit-vue-autocomplete.d.ts +10 -61
- package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-vue-autocomplete.js +5 -50
- package/dist/prosekit-vue-autocomplete.js.map +1 -1
- package/dist/prosekit-vue-block-handle.d.ts +10 -61
- package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-block-handle.js +5 -50
- package/dist/prosekit-vue-block-handle.js.map +1 -1
- package/dist/prosekit-vue-drop-indicator.d.ts +2 -13
- package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-vue-drop-indicator.js +1 -10
- package/dist/prosekit-vue-drop-indicator.js.map +1 -1
- package/dist/prosekit-vue-inline-popover.d.ts +6 -37
- package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-inline-popover.js +3 -30
- package/dist/prosekit-vue-inline-popover.js.map +1 -1
- package/dist/prosekit-vue-menu.d.ts +48 -88
- package/dist/prosekit-vue-menu.d.ts.map +1 -1
- package/dist/prosekit-vue-menu.js +70 -74
- package/dist/prosekit-vue-menu.js.map +1 -1
- package/dist/prosekit-vue-popover.d.ts +8 -49
- package/dist/prosekit-vue-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-popover.js +4 -40
- package/dist/prosekit-vue-popover.js.map +1 -1
- package/dist/prosekit-vue-resizable.d.ts +4 -25
- package/dist/prosekit-vue-resizable.d.ts.map +1 -1
- package/dist/prosekit-vue-resizable.js +2 -20
- package/dist/prosekit-vue-resizable.js.map +1 -1
- package/dist/prosekit-vue-table-handle.d.ts +22 -133
- package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-table-handle.js +11 -110
- package/dist/prosekit-vue-table-handle.js.map +1 -1
- package/dist/prosekit-vue-tooltip.d.ts +8 -49
- package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
- package/dist/prosekit-vue-tooltip.js +4 -40
- package/dist/prosekit-vue-tooltip.js.map +1 -1
- package/dist/prosekit-vue.d.ts +0 -19
- package/dist/prosekit-vue.d.ts.map +1 -1
- package/dist/prosekit-vue.js +0 -24
- package/dist/prosekit-vue.js.map +1 -1
- package/package.json +3 -3
- package/src/components/autocomplete/autocomplete-empty.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-item.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
- package/src/components/autocomplete/autocomplete-root.gen.ts +3 -13
- package/src/components/autocomplete/index.gen.ts +1 -3
- package/src/components/block-handle/block-handle-add.gen.ts +3 -13
- package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
- package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
- package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
- package/src/components/block-handle/block-handle-root.gen.ts +3 -13
- package/src/components/block-handle/index.gen.ts +1 -3
- package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
- package/src/components/drop-indicator/index.gen.ts +1 -3
- package/src/components/inline-popover/index.gen.ts +1 -3
- package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
- package/src/components/inline-popover/inline-popover-root.gen.ts +3 -13
- package/src/components/menu/index.gen.ts +1 -3
- package/src/components/menu/menu-item.gen.ts +3 -13
- package/src/components/menu/menu-popup.gen.ts +3 -13
- package/src/components/menu/menu-positioner.gen.ts +3 -13
- package/src/components/menu/menu-root.gen.ts +3 -13
- package/src/components/menu/menu-submenu-root.gen.ts +68 -21
- package/src/components/menu/menu-submenu-trigger.gen.ts +41 -21
- package/src/components/menu/menu-trigger.gen.ts +3 -13
- package/src/components/popover/index.gen.ts +1 -3
- package/src/components/popover/popover-popup.gen.ts +3 -13
- package/src/components/popover/popover-positioner.gen.ts +3 -13
- package/src/components/popover/popover-root.gen.ts +3 -13
- package/src/components/popover/popover-trigger.gen.ts +3 -13
- package/src/components/resizable/index.gen.ts +1 -3
- package/src/components/resizable/resizable-handle.gen.ts +3 -13
- package/src/components/resizable/resizable-root.gen.ts +3 -13
- package/src/components/table-handle/index.gen.ts +1 -3
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
- package/src/components/table-handle/table-handle-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
- package/src/components/tooltip/index.gen.ts +1 -3
- package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
- package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
- package/src/components/tooltip/tooltip-root.gen.ts +3 -13
- package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
2
|
import { registerMenuItemElement, registerMenuPopupElement, registerMenuPositionerElement, registerMenuRootElement, registerMenuSubmenuRootElement, registerMenuSubmenuTriggerElement, registerMenuTriggerElement } from "@prosekit/web/menu";
|
|
3
|
-
|
|
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
|
-
*/
|
|
3
|
+
/** A Vue component that renders an `prosekit-menu-item` custom element. */
|
|
12
4
|
const MenuItem = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
13
5
|
registerMenuItemElement();
|
|
14
6
|
const elementRef = shallowRef(null);
|
|
@@ -56,16 +48,7 @@ const MenuItem = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
56
48
|
"value",
|
|
57
49
|
"onSelect"
|
|
58
50
|
] });
|
|
59
|
-
|
|
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
|
-
*/
|
|
51
|
+
/** A Vue component that renders an `prosekit-menu-popup` custom element. */
|
|
69
52
|
const MenuPopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
70
53
|
registerMenuPopupElement();
|
|
71
54
|
const elementRef = shallowRef(null);
|
|
@@ -87,16 +70,7 @@ const MenuPopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
87
70
|
}, slots.default?.());
|
|
88
71
|
};
|
|
89
72
|
}, { props: ["eventTarget"] });
|
|
90
|
-
|
|
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
|
-
*/
|
|
73
|
+
/** A Vue component that renders an `prosekit-menu-positioner` custom element. */
|
|
100
74
|
const MenuPositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
101
75
|
registerMenuPositionerElement();
|
|
102
76
|
const elementRef = shallowRef(null);
|
|
@@ -175,16 +149,7 @@ const MenuPositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
175
149
|
"shift",
|
|
176
150
|
"strategy"
|
|
177
151
|
] });
|
|
178
|
-
|
|
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
|
-
*/
|
|
152
|
+
/** A Vue component that renders an `prosekit-menu-root` custom element. */
|
|
188
153
|
const MenuRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
189
154
|
registerMenuRootElement();
|
|
190
155
|
const elementRef = shallowRef(null);
|
|
@@ -232,48 +197,80 @@ const MenuRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
232
197
|
"open",
|
|
233
198
|
"onOpenChange"
|
|
234
199
|
] });
|
|
235
|
-
|
|
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
|
-
*/
|
|
200
|
+
/** A Vue component that renders an `prosekit-menu-submenu-root` custom element. */
|
|
245
201
|
const MenuSubmenuRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
246
202
|
registerMenuSubmenuRootElement();
|
|
203
|
+
const elementRef = shallowRef(null);
|
|
204
|
+
const splittedProps = computed(() => {
|
|
205
|
+
const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;
|
|
206
|
+
return [[
|
|
207
|
+
p0,
|
|
208
|
+
p1,
|
|
209
|
+
p2,
|
|
210
|
+
e0
|
|
211
|
+
], restProps];
|
|
212
|
+
});
|
|
213
|
+
const handlers = [];
|
|
214
|
+
watchEffect(() => {
|
|
215
|
+
const element = elementRef.value;
|
|
216
|
+
if (!element) return;
|
|
217
|
+
const [p0, p1, p2, e0] = splittedProps.value[0];
|
|
218
|
+
Object.assign(element, {
|
|
219
|
+
defaultOpen: p0,
|
|
220
|
+
disabled: p1,
|
|
221
|
+
open: p2
|
|
222
|
+
});
|
|
223
|
+
handlers.length = 0;
|
|
224
|
+
handlers.push(e0);
|
|
225
|
+
});
|
|
226
|
+
watchEffect(() => {
|
|
227
|
+
const element = elementRef.value;
|
|
228
|
+
if (!element) return;
|
|
229
|
+
const ac = new AbortController();
|
|
230
|
+
for (const [index, eventName] of ["openChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
231
|
+
handlers[index]?.(event);
|
|
232
|
+
}, { signal: ac.signal });
|
|
233
|
+
return () => ac.abort();
|
|
234
|
+
});
|
|
247
235
|
return () => {
|
|
248
|
-
|
|
236
|
+
const restProps = splittedProps.value[1];
|
|
237
|
+
return h("prosekit-menu-submenu-root", {
|
|
238
|
+
...restProps,
|
|
239
|
+
ref: elementRef
|
|
240
|
+
}, slots.default?.());
|
|
249
241
|
};
|
|
250
|
-
}, { props: [
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.
|
|
258
|
-
*
|
|
259
|
-
* @public
|
|
260
|
-
*/
|
|
242
|
+
}, { props: [
|
|
243
|
+
"defaultOpen",
|
|
244
|
+
"disabled",
|
|
245
|
+
"open",
|
|
246
|
+
"onOpenChange"
|
|
247
|
+
] });
|
|
248
|
+
/** A Vue component that renders an `prosekit-menu-submenu-trigger` custom element. */
|
|
261
249
|
const MenuSubmenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
262
250
|
registerMenuSubmenuTriggerElement();
|
|
251
|
+
const elementRef = shallowRef(null);
|
|
252
|
+
const splittedProps = computed(() => {
|
|
253
|
+
const { disabled: p0, value: p1, ...restProps } = props;
|
|
254
|
+
return [[p0, p1], restProps];
|
|
255
|
+
});
|
|
256
|
+
watchEffect(() => {
|
|
257
|
+
const element = elementRef.value;
|
|
258
|
+
if (!element) return;
|
|
259
|
+
const [p0, p1] = splittedProps.value[0];
|
|
260
|
+
Object.assign(element, {
|
|
261
|
+
disabled: p0,
|
|
262
|
+
value: p1
|
|
263
|
+
});
|
|
264
|
+
});
|
|
263
265
|
return () => {
|
|
264
|
-
|
|
266
|
+
const restProps = splittedProps.value[1];
|
|
267
|
+
return h("prosekit-menu-submenu-trigger", {
|
|
268
|
+
...restProps,
|
|
269
|
+
ref: elementRef
|
|
270
|
+
}, slots.default?.());
|
|
265
271
|
};
|
|
266
|
-
}, { props: [] });
|
|
267
|
-
|
|
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
|
-
*/
|
|
272
|
+
}, { props: ["disabled", "value"] });
|
|
273
|
+
/** A Vue component that renders an `prosekit-menu-trigger` custom element. */
|
|
277
274
|
const MenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
278
275
|
registerMenuTriggerElement();
|
|
279
276
|
const elementRef = shallowRef(null);
|
|
@@ -307,7 +304,6 @@ const MenuTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
307
304
|
}, slots.default?.());
|
|
308
305
|
};
|
|
309
306
|
}, { props: ["disabled", "onOpenChange"] });
|
|
310
|
-
//#endregion
|
|
311
307
|
export { MenuItem, MenuPopup, MenuPositioner, MenuRoot, MenuSubmenuRoot, MenuSubmenuTrigger, MenuTrigger };
|
|
312
308
|
|
|
313
309
|
//# sourceMappingURL=prosekit-vue-menu.js.map
|
|
@@ -1 +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","/**\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","/**\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"],"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,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AACnF,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GACpC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAE7C,SAAO,OAAO,SAAS;GAAE,eAAe;GAAI,UAAU;GAAI,OAAO;GAAI,CAAC;AAEtE,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,SAAS,CACnD,SAA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C,IAAI,GAAG,EAAE,UAAU;GAC5B;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,MAAM,cAAc,MAAM;AAErC,SAAO,OAAO,SAAS,EAAE,UAAU,IAAI,CAAC;AAExC,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,yBAAyB;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG3F,EAAE,OAAO,CAAC,YAAY,eAAe,EAAE,CACxC"}
|
|
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":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link MenuItem} Vue component. */\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/** A Vue component that renders an `prosekit-menu-item` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link MenuPopup} Vue component. */\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/** A Vue component that renders an `prosekit-menu-popup` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link MenuPositioner} Vue component. */\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/** A Vue component that renders an `prosekit-menu-positioner` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link MenuRoot} Vue component. */\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/** A Vue component that renders an `prosekit-menu-root` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuSubmenuRootElement, type MenuSubmenuRootEvents, type MenuSubmenuRootProps as MenuSubmenuRootElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/** Props for the {@link MenuSubmenuRoot} Vue component. */\nexport interface MenuSubmenuRootProps {\n /**\n * Whether the overlay is initially open.\n * @default false\n */\n defaultOpen?: MenuSubmenuRootElementProps['defaultOpen'];\n /**\n * Whether the overlay is currently open.\n * @default null\n */\n open?: MenuSubmenuRootElementProps['open'];\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: MenuSubmenuRootElementProps['disabled'];\n /** Emitted when the submenu is opened or closed. */\n onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;\n}\n\n/** A Vue component that renders an `prosekit-menu-submenu-root` custom element. */\nexport const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuRootElement();\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-submenu-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },\n);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerMenuSubmenuTriggerElement, type MenuSubmenuTriggerProps as MenuSubmenuTriggerElementProps } from '@prosekit/web/menu';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/** Props for the {@link MenuSubmenuTrigger} Vue component. */\nexport interface MenuSubmenuTriggerProps {\n /**\n * The unique value for this submenu trigger in the parent menu.\n *\n * @default \"\"\n */\n value?: MenuSubmenuTriggerElementProps['value'];\n /**\n * Whether this submenu trigger is disabled.\n *\n * @default false\n */\n disabled?: MenuSubmenuTriggerElementProps['disabled'];\n}\n\n/** A Vue component that renders an `prosekit-menu-submenu-trigger` custom element. */\nexport const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuTriggerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerMenuSubmenuTriggerElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, value: p1, ...restProps } = props;\n return [[p0, p1], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0, value: p1 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-menu-submenu-trigger', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'value'] },\n);\n","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link MenuTrigger} Vue component. */\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/** A Vue component that renders an `prosekit-menu-trigger` custom element. */\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"],"mappings":";;;AA8BA,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,OAAO,IAAI,UAAU,IAAI,GAAG,cAAc;AACnF,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GACpC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EACh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M,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,iCAAiC;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGnG,EAAE,OAAO,CAAC,YAAY,QAAQ,EAAE,CACjC;;AC9BD,MAAa,cAAyF,iCACnG,OAAO,EAAE,YAAY;AACpB,6BAA4B;CAE5B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,UAAU,IAAI,cAAc,IAAI,GAAG,cAAc;AACzD,SAAO,CAAC,CAAC,IAAI,GAAG,EAAE,UAAU;GAC5B;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,MAAM,cAAc,MAAM;AAErC,SAAO,OAAO,SAAS,EAAE,UAAU,IAAI,CAAC;AAExC,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,yBAAyB;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG3F,EAAE,OAAO,CAAC,YAAY,eAAe,EAAE,CACxC"}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
2
|
import { PopoverPositionerProps as PopoverPositionerProps$1, PopoverRootEvents, PopoverRootProps as PopoverRootProps$1, PopoverTriggerEvents, PopoverTriggerProps as PopoverTriggerProps$1 } from "@prosekit/web/popover";
|
|
3
|
-
|
|
4
|
-
//#region src/components/popover/popover-popup.gen.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Props for the {@link PopoverPopup} Vue component.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
3
|
+
/** Props for the {@link PopoverPopup} Vue component. */
|
|
10
4
|
interface PopoverPopupProps {}
|
|
11
|
-
/**
|
|
12
|
-
* A Vue component that renders an `prosekit-popover-popup` custom element.
|
|
13
|
-
*
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
5
|
+
/** A Vue component that renders an `prosekit-popover-popup` custom element. */
|
|
16
6
|
declare const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes>;
|
|
17
|
-
|
|
18
|
-
//#region src/components/popover/popover-positioner.gen.d.ts
|
|
19
|
-
/**
|
|
20
|
-
* Props for the {@link PopoverPositioner} Vue component.
|
|
21
|
-
*
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
7
|
+
/** Props for the {@link PopoverPositioner} Vue component. */
|
|
24
8
|
interface PopoverPositionerProps {
|
|
25
9
|
/**
|
|
26
10
|
* The strategy to use for positioning
|
|
@@ -150,19 +134,9 @@ interface PopoverPositionerProps {
|
|
|
150
134
|
*/
|
|
151
135
|
altBoundary?: PopoverPositionerProps$1['altBoundary'];
|
|
152
136
|
}
|
|
153
|
-
/**
|
|
154
|
-
* A Vue component that renders an `prosekit-popover-positioner` custom element.
|
|
155
|
-
*
|
|
156
|
-
* @public
|
|
157
|
-
*/
|
|
137
|
+
/** A Vue component that renders an `prosekit-popover-positioner` custom element. */
|
|
158
138
|
declare const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes>;
|
|
159
|
-
|
|
160
|
-
//#region src/components/popover/popover-root.gen.d.ts
|
|
161
|
-
/**
|
|
162
|
-
* Props for the {@link PopoverRoot} Vue component.
|
|
163
|
-
*
|
|
164
|
-
* @public
|
|
165
|
-
*/
|
|
139
|
+
/** Props for the {@link PopoverRoot} Vue component. */
|
|
166
140
|
interface PopoverRootProps {
|
|
167
141
|
/**
|
|
168
142
|
* Whether the popover should be modal.
|
|
@@ -189,19 +163,9 @@ interface PopoverRootProps {
|
|
|
189
163
|
/** Emitted when the popover is opened or closed. */
|
|
190
164
|
onOpenChange?: (event: PopoverRootEvents['openChange']) => void;
|
|
191
165
|
}
|
|
192
|
-
/**
|
|
193
|
-
* A Vue component that renders an `prosekit-popover-root` custom element.
|
|
194
|
-
*
|
|
195
|
-
* @public
|
|
196
|
-
*/
|
|
166
|
+
/** A Vue component that renders an `prosekit-popover-root` custom element. */
|
|
197
167
|
declare const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes>;
|
|
198
|
-
|
|
199
|
-
//#region src/components/popover/popover-trigger.gen.d.ts
|
|
200
|
-
/**
|
|
201
|
-
* Props for the {@link PopoverTrigger} Vue component.
|
|
202
|
-
*
|
|
203
|
-
* @public
|
|
204
|
-
*/
|
|
168
|
+
/** Props for the {@link PopoverTrigger} Vue component. */
|
|
205
169
|
interface PopoverTriggerProps {
|
|
206
170
|
/**
|
|
207
171
|
* Whether the component should ignore user interaction.
|
|
@@ -228,12 +192,7 @@ interface PopoverTriggerProps {
|
|
|
228
192
|
/** Emitted when the popover is opened or closed. */
|
|
229
193
|
onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;
|
|
230
194
|
}
|
|
231
|
-
/**
|
|
232
|
-
* A Vue component that renders an `prosekit-popover-trigger` custom element.
|
|
233
|
-
*
|
|
234
|
-
* @public
|
|
235
|
-
*/
|
|
195
|
+
/** A Vue component that renders an `prosekit-popover-trigger` custom element. */
|
|
236
196
|
declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes>;
|
|
237
|
-
//#endregion
|
|
238
197
|
export { PopoverPopup, type PopoverPopupProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps };
|
|
239
198
|
//# sourceMappingURL=prosekit-vue-popover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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":";;;UAMiB,iBAAA;;cAGJ,YAAA,EAAc,sBAAA,CAAuB,iBAAA,GAAoB,cAAA;;UCHrD,sBAAA;EDAiB;;;;AAGlC;ECGE,QAAA,GAAW,wBAAA;;;;;;EAMX,SAAA,GAAY,wBAAA;EDTa;;;;;;ACH3B;EAoBE,UAAA,GAAa,wBAAA;;;;;;;EAOb,KAAA,GAAQ,wBAAA;EAqBA;;;;;EAfR,MAAA,GAAS,wBAAA;EAyDF;;;;;;;;EAhDP,IAAA,GAAO,wBAAA;EApCI;;;;;EA0CX,KAAA,GAAQ,wBAAA;EArBA;;;;;;EA4BR,OAAA,GAAU,wBAAA;EAAV;;;;;;EAOA,WAAA,GAAc,wBAAA;EAcD;;;;;;EAPb,SAAA,GAAY,wBAAA;EAmCZ;;;;;;EA5BA,UAAA,GAAa,wBAAA;EAmDC;;;AAIhB;;;EAhDE,MAAA,GAAS,wBAAA;EAgDqE;;;;;;EAzC9E,IAAA,GAAO,wBAAA;EAyCqF;;;ACnI9F;;;EDiGE,QAAA,GAAW,wBAAA;ECrFG;;;;;;ED4Fd,YAAA,GAAe,wBAAA;ECjGP;;;;;;EDwGR,eAAA,GAAkB,wBAAA;ECvFlB;;;;;AAIF;;ED2FE,cAAA,GAAiB,wBAAA;EC3F8B;;;;;;;EDmG/C,WAAA,GAAc,wBAAA;AAAA;;cAIH,iBAAA,EAAmB,sBAAA,CAAuB,sBAAA,GAAyB,cAAA;;UCnI/D,gBAAA;EFAiB;;;;AAGlC;;EEIE,KAAA,GAAQ,kBAAA;EFJwC;;;;EEShD,WAAA,GAAc,kBAAA;EFTW;;;;EEczB,IAAA,GAAO,kBAAA;;ADjBT;;;ECsBE,QAAA,GAAW,kBAAA;EDVC;ECYZ,YAAA,IAAgB,KAAA,EAAO,iBAAA;AAAA;;cAIZ,WAAA,EAAa,sBAAA,CAAuB,gBAAA,GAAmB,cAAA;;UC5BnD,mBAAA;EHAiB;;;;EGKhC,QAAA,GAAW,qBAAA;EHOZ;;;;EGFC,WAAA,GAAc,qBAAA;EHPiC;;;;;EGa/C,KAAA,GAAQ,qBAAA;EHb0E;;ACHpF;;;EEsBE,UAAA,GAAa,qBAAA;EFVD;EEYZ,YAAA,IAAgB,KAAA,EAAO,oBAAA;AAAA;;cAIZ,cAAA,EAAgB,sBAAA,CAAuB,mBAAA,GAAsB,cAAA"}
|
|
@@ -1,30 +1,13 @@
|
|
|
1
1
|
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
2
2
|
import { registerPopoverPopupElement, registerPopoverPositionerElement, registerPopoverRootElement, registerPopoverTriggerElement } from "@prosekit/web/popover";
|
|
3
|
-
|
|
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
|
-
*/
|
|
3
|
+
/** A Vue component that renders an `prosekit-popover-popup` custom element. */
|
|
12
4
|
const PopoverPopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
13
5
|
registerPopoverPopupElement();
|
|
14
6
|
return () => {
|
|
15
7
|
return h("prosekit-popover-popup", props, slots.default?.());
|
|
16
8
|
};
|
|
17
9
|
}, { props: [] });
|
|
18
|
-
|
|
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
|
-
*/
|
|
10
|
+
/** A Vue component that renders an `prosekit-popover-positioner` custom element. */
|
|
28
11
|
const PopoverPositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
29
12
|
registerPopoverPositionerElement();
|
|
30
13
|
const elementRef = shallowRef(null);
|
|
@@ -103,16 +86,7 @@ const PopoverPositioner = /* @__PURE__ */ defineComponent((props, { slots }) =>
|
|
|
103
86
|
"shift",
|
|
104
87
|
"strategy"
|
|
105
88
|
] });
|
|
106
|
-
|
|
107
|
-
//#region src/components/popover/popover-root.gen.ts
|
|
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
|
-
*/
|
|
89
|
+
/** A Vue component that renders an `prosekit-popover-root` custom element. */
|
|
116
90
|
const PopoverRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
117
91
|
registerPopoverRootElement();
|
|
118
92
|
const elementRef = shallowRef(null);
|
|
@@ -163,16 +137,7 @@ const PopoverRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
163
137
|
"open",
|
|
164
138
|
"onOpenChange"
|
|
165
139
|
] });
|
|
166
|
-
|
|
167
|
-
//#region src/components/popover/popover-trigger.gen.ts
|
|
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
|
-
*/
|
|
140
|
+
/** A Vue component that renders an `prosekit-popover-trigger` custom element. */
|
|
176
141
|
const PopoverTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
177
142
|
registerPopoverTriggerElement();
|
|
178
143
|
const elementRef = shallowRef(null);
|
|
@@ -223,7 +188,6 @@ const PopoverTrigger = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
223
188
|
"openOnHover",
|
|
224
189
|
"onOpenChange"
|
|
225
190
|
] });
|
|
226
|
-
//#endregion
|
|
227
191
|
export { PopoverPopup, PopoverPositioner, PopoverRoot, PopoverTrigger };
|
|
228
192
|
|
|
229
193
|
//# sourceMappingURL=prosekit-vue-popover.js.map
|
|
@@ -1 +1 @@
|
|
|
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","/**\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"],"mappings":";;;;;;;;;;;AAmBA,MAAa,eAA2F,iCACrG,OAAO,EAAE,YAAY;AACpB,8BAA6B;AAE7B,cAAa;AACX,SAAO,EAAE,0BAA0B,OAAO,MAAM,W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AAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,YAAY,IAAI,OAAO,IAAI,UAAU,IAAI,aAAa,IAAI,cAAc,IAAI,GAAG,cAAc;AACrG,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAG,EAAE,UAAU;GACxC;CAEF,MAAM,WAAsD,EAAE;AAE9D,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,MAAM,cAAc,MAAM;AAEjD,SAAO,OAAO,SAAS;GAAE,YAAY;GAAI,OAAO;GAAI,UAAU;GAAI,aAAa;GAAI,CAAC;AAEpF,WAAS,SAAS;AAClB,WAAS,KAAK,GAAG;GACjB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,KAAK,IAAI,iBAAiB;AAChC,OAAK,MAAM,CAAC,OAAO,cAAc,CAAC,aAAa,CAAC,SAAS,CACvD,SAAQ,iBACN,YACC,UAAiB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,4BAA4B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG9F,EAAE,OAAO;CAAC;CAAc;CAAS;CAAY;CAAe;CAAe,EAAE,CAC9E"}
|
|
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":["// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\n\nimport { registerPopoverPopupElement } from '@prosekit/web/popover';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/** Props for the {@link PopoverPopup} Vue component. */\nexport interface PopoverPopupProps {}\n\n/** A Vue component that renders an `prosekit-popover-popup` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverPositioner} Vue component. */\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/** A Vue component that renders an `prosekit-popover-positioner` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverRoot} Vue component. */\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/** A Vue component that renders an `prosekit-popover-root` custom element. */\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","// This file is auto-generated by \"@aria-ui/cli\". Do not edit this file directly.\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/** Props for the {@link PopoverTrigger} Vue component. */\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/** A Vue component that renders an `prosekit-popover-trigger` custom element. */\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"],"mappings":";;;AASA,MAAa,eAA2F,iCACrG,OAAO,EAAE,YAAY;AACpB,8BAA6B;AAE7B,cAAa;AACX,SAAO,EAAE,0BAA0B,OAAO,MAAM,WAAW,CAAC;;GAGhE,EAAE,OAAO,EAAE,EAAE,CACd;;ACuHD,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;AACpB,mCAAkC;CAElC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,aAAa,IAAI,YAAY,IAAI,UAAU,IAAI,gBAAgB,IAAI,aAAa,IAAI,MAAM,IAAI,MAAM,IAAI,OAAO,IAAI,QAAQ,IAAI,QAAQ,IAAI,iBAAiB,KAAK,SAAS,KAAK,WAAW,KAAK,cAAc,KAAK,YAAY,KAAK,WAAW,KAAK,OAAO,KAAK,UAAU,KAAK,GAAG,cAAc;AACvS,SAAO,CAAC;GAAC;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAK;GAAI,EAAE,UAAU;GACpG;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,OAAO,cAAc,MAAM;AAE7G,SAAO,OAAO,SAAS;GAAE,aAAa;GAAI,YAAY;GAAI,UAAU;GAAI,gBAAgB;GAAI,aAAa;GAAI,MAAM;GAAI,MAAM;GAAI,OAAO;GAAI,QAAQ;GAAI,QAAQ;GAAI,iBAAiB;GAAK,SAAS;GAAK,WAAW;GAAK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|
1
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
2
2
|
import { ResizableHandleProps as ResizableHandleProps$1, ResizableRootEvents, ResizableRootProps as ResizableRootProps$1 } from "@prosekit/web/resizable";
|
|
3
|
-
|
|
4
|
-
//#region src/components/resizable/resizable-root.gen.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Props for the {@link ResizableRoot} Vue component.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
3
|
+
/** Props for the {@link ResizableRoot} Vue component. */
|
|
10
4
|
interface ResizableRootProps {
|
|
11
5
|
/**
|
|
12
6
|
* The width of the resizable element.
|
|
@@ -31,19 +25,9 @@ interface ResizableRootProps {
|
|
|
31
25
|
/** Emitted when a resize operation ends. */
|
|
32
26
|
onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;
|
|
33
27
|
}
|
|
34
|
-
/**
|
|
35
|
-
* A Vue component that renders an `prosekit-resizable-root` custom element.
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
28
|
+
/** A Vue component that renders an `prosekit-resizable-root` custom element. */
|
|
39
29
|
declare const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes>;
|
|
40
|
-
|
|
41
|
-
//#region src/components/resizable/resizable-handle.gen.d.ts
|
|
42
|
-
/**
|
|
43
|
-
* Props for the {@link ResizableHandle} Vue component.
|
|
44
|
-
*
|
|
45
|
-
* @public
|
|
46
|
-
*/
|
|
30
|
+
/** Props for the {@link ResizableHandle} Vue component. */
|
|
47
31
|
interface ResizableHandleProps {
|
|
48
32
|
/**
|
|
49
33
|
* The position of the handle.
|
|
@@ -52,12 +36,7 @@ interface ResizableHandleProps {
|
|
|
52
36
|
*/
|
|
53
37
|
position?: ResizableHandleProps$1['position'];
|
|
54
38
|
}
|
|
55
|
-
/**
|
|
56
|
-
* A Vue component that renders an `prosekit-resizable-handle` custom element.
|
|
57
|
-
*
|
|
58
|
-
* @public
|
|
59
|
-
*/
|
|
39
|
+
/** A Vue component that renders an `prosekit-resizable-handle` custom element. */
|
|
60
40
|
declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes>;
|
|
61
|
-
//#endregion
|
|
62
41
|
export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootProps };
|
|
63
42
|
//# sourceMappingURL=prosekit-vue-resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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":"
|
|
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":";;;UAMiB,kBAAA;EAAkB;;;;;EAMjC,KAAA,GAAQ,oBAAA;EAgBc;;;;;EAVtB,MAAA,GAAS,oBAAA;EAAA;;;;;EAMT,WAAA,GAAc,oBAAA;EAId;EAFA,aAAA,IAAiB,KAAA,EAAO,mBAAA;EAET;EAAf,WAAA,IAAe,KAAA,EAAO,mBAAA;AAAA;AAIxB;AAAA,cAAa,aAAA,EAAe,sBAAA,CAAuB,kBAAA,GAAqB,cAAA;;UC1BvD,oBAAA;EDAkB;;;;;ECMjC,QAAA,GAAW,sBAAA;AAAA;;cAIA,eAAA,EAAiB,sBAAA,CAAuB,oBAAA,GAAuB,cAAA"}
|