@prosekit/vue 0.7.0-beta.3 → 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.
Files changed (94) hide show
  1. package/dist/editor-context.js +0 -2
  2. package/dist/editor-context.js.map +1 -1
  3. package/dist/prosekit-vue-autocomplete.d.ts +12 -63
  4. package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
  5. package/dist/prosekit-vue-autocomplete.js +7 -52
  6. package/dist/prosekit-vue-autocomplete.js.map +1 -1
  7. package/dist/prosekit-vue-block-handle.d.ts +12 -63
  8. package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
  9. package/dist/prosekit-vue-block-handle.js +7 -52
  10. package/dist/prosekit-vue-block-handle.js.map +1 -1
  11. package/dist/prosekit-vue-drop-indicator.d.ts +2 -13
  12. package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
  13. package/dist/prosekit-vue-drop-indicator.js +1 -10
  14. package/dist/prosekit-vue-drop-indicator.js.map +1 -1
  15. package/dist/prosekit-vue-inline-popover.d.ts +9 -40
  16. package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
  17. package/dist/prosekit-vue-inline-popover.js +5 -32
  18. package/dist/prosekit-vue-inline-popover.js.map +1 -1
  19. package/dist/prosekit-vue-menu.d.ts +49 -89
  20. package/dist/prosekit-vue-menu.d.ts.map +1 -1
  21. package/dist/prosekit-vue-menu.js +72 -76
  22. package/dist/prosekit-vue-menu.js.map +1 -1
  23. package/dist/prosekit-vue-popover.d.ts +10 -51
  24. package/dist/prosekit-vue-popover.d.ts.map +1 -1
  25. package/dist/prosekit-vue-popover.js +6 -42
  26. package/dist/prosekit-vue-popover.js.map +1 -1
  27. package/dist/prosekit-vue-resizable.d.ts +6 -27
  28. package/dist/prosekit-vue-resizable.d.ts.map +1 -1
  29. package/dist/prosekit-vue-resizable.js +4 -22
  30. package/dist/prosekit-vue-resizable.js.map +1 -1
  31. package/dist/prosekit-vue-table-handle.d.ts +22 -133
  32. package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
  33. package/dist/prosekit-vue-table-handle.js +11 -110
  34. package/dist/prosekit-vue-table-handle.js.map +1 -1
  35. package/dist/prosekit-vue-tooltip.d.ts +10 -51
  36. package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
  37. package/dist/prosekit-vue-tooltip.js +6 -42
  38. package/dist/prosekit-vue-tooltip.js.map +1 -1
  39. package/dist/prosekit-vue.d.ts +0 -19
  40. package/dist/prosekit-vue.d.ts.map +1 -1
  41. package/dist/prosekit-vue.js +0 -24
  42. package/dist/prosekit-vue.js.map +1 -1
  43. package/package.json +3 -3
  44. package/src/components/autocomplete/autocomplete-empty.gen.ts +3 -13
  45. package/src/components/autocomplete/autocomplete-item.gen.ts +3 -15
  46. package/src/components/autocomplete/autocomplete-popup.gen.ts +3 -15
  47. package/src/components/autocomplete/autocomplete-positioner.gen.ts +3 -13
  48. package/src/components/autocomplete/autocomplete-root.gen.ts +3 -15
  49. package/src/components/autocomplete/index.gen.ts +4 -8
  50. package/src/components/block-handle/block-handle-add.gen.ts +3 -13
  51. package/src/components/block-handle/block-handle-draggable.gen.ts +3 -13
  52. package/src/components/block-handle/block-handle-popup.gen.ts +3 -13
  53. package/src/components/block-handle/block-handle-positioner.gen.ts +3 -13
  54. package/src/components/block-handle/block-handle-root.gen.ts +3 -15
  55. package/src/components/block-handle/index.gen.ts +2 -6
  56. package/src/components/drop-indicator/drop-indicator.gen.ts +3 -13
  57. package/src/components/drop-indicator/index.gen.ts +1 -3
  58. package/src/components/inline-popover/index.gen.ts +2 -6
  59. package/src/components/inline-popover/inline-popover-popup.gen.ts +3 -13
  60. package/src/components/inline-popover/inline-popover-positioner.gen.ts +3 -13
  61. package/src/components/inline-popover/inline-popover-root.gen.ts +4 -16
  62. package/src/components/menu/index.gen.ts +4 -8
  63. package/src/components/menu/menu-item.gen.ts +3 -15
  64. package/src/components/menu/menu-popup.gen.ts +3 -13
  65. package/src/components/menu/menu-positioner.gen.ts +3 -13
  66. package/src/components/menu/menu-root.gen.ts +3 -15
  67. package/src/components/menu/menu-submenu-root.gen.ts +68 -21
  68. package/src/components/menu/menu-submenu-trigger.gen.ts +41 -21
  69. package/src/components/menu/menu-trigger.gen.ts +3 -15
  70. package/src/components/popover/index.gen.ts +3 -7
  71. package/src/components/popover/popover-popup.gen.ts +3 -13
  72. package/src/components/popover/popover-positioner.gen.ts +3 -13
  73. package/src/components/popover/popover-root.gen.ts +3 -15
  74. package/src/components/popover/popover-trigger.gen.ts +3 -15
  75. package/src/components/resizable/index.gen.ts +2 -6
  76. package/src/components/resizable/resizable-handle.gen.ts +3 -13
  77. package/src/components/resizable/resizable-root.gen.ts +3 -15
  78. package/src/components/table-handle/index.gen.ts +1 -3
  79. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +3 -13
  80. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +3 -13
  81. package/src/components/table-handle/table-handle-column-popup.gen.ts +3 -13
  82. package/src/components/table-handle/table-handle-column-positioner.gen.ts +3 -13
  83. package/src/components/table-handle/table-handle-drag-preview.gen.ts +3 -13
  84. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +3 -13
  85. package/src/components/table-handle/table-handle-root.gen.ts +3 -13
  86. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +3 -13
  87. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +3 -13
  88. package/src/components/table-handle/table-handle-row-popup.gen.ts +3 -13
  89. package/src/components/table-handle/table-handle-row-positioner.gen.ts +3 -13
  90. package/src/components/tooltip/index.gen.ts +2 -6
  91. package/src/components/tooltip/tooltip-popup.gen.ts +3 -13
  92. package/src/components/tooltip/tooltip-positioner.gen.ts +3 -13
  93. package/src/components/tooltip/tooltip-root.gen.ts +3 -15
  94. package/src/components/tooltip/tooltip-trigger.gen.ts +3 -13
@@ -1,22 +1,12 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerInlinePopoverPopupElement } from '@prosekit/web/inline-popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link InlinePopoverPopup} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link InlinePopoverPopup} Vue component. */
13
7
  export interface InlinePopoverPopupProps {}
14
8
 
15
- /**
16
- * A Vue component that renders an `prosekit-inline-popover-popup` custom element.
17
- *
18
- * @public
19
- */
9
+ /** A Vue component that renders an `prosekit-inline-popover-popup` custom element. */
20
10
  export const InlinePopoverPopup: DefineSetupFnComponent<InlinePopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPopupProps & HTMLAttributes>(
21
11
  (props, { slots }) => {
22
12
  registerInlinePopoverPopupElement();
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerInlinePopoverPositionerElement, type InlinePopoverPositionerProps as InlinePopoverPositionerElementProps } from '@prosekit/web/inline-popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link InlinePopoverPositioner} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link InlinePopoverPositioner} Vue component. */
13
7
  export interface InlinePopoverPositionerProps {
14
8
  /**
15
9
  * The initial placement of the floating element
@@ -139,11 +133,7 @@ export interface InlinePopoverPositionerProps {
139
133
  altBoundary?: InlinePopoverPositionerElementProps['altBoundary'];
140
134
  }
141
135
 
142
- /**
143
- * A Vue component that renders an `prosekit-inline-popover-positioner` custom element.
144
- *
145
- * @public
146
- */
136
+ /** A Vue component that renders an `prosekit-inline-popover-positioner` custom element. */
147
137
  export const InlinePopoverPositioner: DefineSetupFnComponent<InlinePopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverPositionerProps & HTMLAttributes>(
148
138
  (props, { slots }) => {
149
139
  registerInlinePopoverPositionerElement();
@@ -1,17 +1,11 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerInlinePopoverRootElement, type InlinePopoverRootEvents, type InlinePopoverRootProps as InlinePopoverRootElementProps } from '@prosekit/web/inline-popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
6
  import { useEditorContext } from '../../injection/editor-context.ts';
9
7
 
10
- /**
11
- * Props for the {@link InlinePopoverRoot} Vue component.
12
- *
13
- * @public
14
- */
8
+ /** Props for the {@link InlinePopoverRoot} Vue component. */
15
9
  export interface InlinePopoverRootProps {
16
10
  /**
17
11
  * The ProseKit editor instance.
@@ -44,15 +38,11 @@ export interface InlinePopoverRootProps {
44
38
  * @default false
45
39
  */
46
40
  disabled?: InlinePopoverRootElementProps['disabled'];
47
- /** */
41
+ /** Emitted when the open state of the popover changes. */
48
42
  onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
49
43
  }
50
44
 
51
- /**
52
- * A Vue component that renders an `prosekit-inline-popover-root` custom element.
53
- *
54
- * @public
55
- */
45
+ /** A Vue component that renders an `prosekit-inline-popover-root` custom element. */
56
46
  export const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<InlinePopoverRootProps & HTMLAttributes>(
57
47
  (props, { slots }) => {
58
48
  registerInlinePopoverRootElement();
@@ -104,5 +94,3 @@ export const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps &
104
94
  },
105
95
  { props: ['defaultOpen', 'disabled', 'dismissOnEscape', 'editor', 'open', 'onOpenChange'] },
106
96
  );
107
-
108
- export type { InlinePopoverRootEvents };
@@ -1,19 +1,15 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
- export { MenuItem, type MenuItemProps, type MenuItemEvents } from './menu-item.gen.ts';
3
+ export { MenuItem, type MenuItemProps } from './menu-item.gen.ts';
6
4
 
7
5
  export { MenuPopup, type MenuPopupProps } from './menu-popup.gen.ts';
8
6
 
9
7
  export { MenuPositioner, type MenuPositionerProps } from './menu-positioner.gen.ts';
10
8
 
11
- export { MenuRoot, type MenuRootProps, type MenuRootEvents } from './menu-root.gen.ts';
9
+ export { MenuRoot, type MenuRootProps } from './menu-root.gen.ts';
12
10
 
13
11
  export { MenuSubmenuRoot, type MenuSubmenuRootProps } from './menu-submenu-root.gen.ts';
14
12
 
15
13
  export { MenuSubmenuTrigger, type MenuSubmenuTriggerProps } from './menu-submenu-trigger.gen.ts';
16
14
 
17
- export { MenuTrigger, type MenuTriggerProps, type MenuTriggerEvents } from './menu-trigger.gen.ts';
18
-
19
- export { OpenChangeEvent, SelectEvent } from '@prosekit/web/menu';
15
+ export { MenuTrigger, type MenuTriggerProps } from './menu-trigger.gen.ts';
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerMenuItemElement, type MenuItemEvents, type MenuItemProps as MenuItemElementProps } from '@prosekit/web/menu';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link MenuItem} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link MenuItem} Vue component. */
13
7
  export interface MenuItemProps {
14
8
  /**
15
9
  * The unique value for this menu item.
@@ -33,11 +27,7 @@ export interface MenuItemProps {
33
27
  onSelect?: (event: MenuItemEvents['select']) => void;
34
28
  }
35
29
 
36
- /**
37
- * A Vue component that renders an `prosekit-menu-item` custom element.
38
- *
39
- * @public
40
- */
30
+ /** A Vue component that renders an `prosekit-menu-item` custom element. */
41
31
  export const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuItemProps & HTMLAttributes>(
42
32
  (props, { slots }) => {
43
33
  registerMenuItemElement();
@@ -87,5 +77,3 @@ export const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes> =
87
77
  },
88
78
  { props: ['closeOnSelect', 'disabled', 'value', 'onSelect'] },
89
79
  );
90
-
91
- export type { MenuItemEvents };
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerMenuPopupElement, type MenuPopupProps as MenuPopupElementProps } from '@prosekit/web/menu';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link MenuPopup} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link MenuPopup} Vue component. */
13
7
  export interface MenuPopupProps {
14
8
  /**
15
9
  * By default, the MenuPopup element will listen for keydown events.
@@ -20,11 +14,7 @@ export interface MenuPopupProps {
20
14
  eventTarget?: MenuPopupElementProps['eventTarget'];
21
15
  }
22
16
 
23
- /**
24
- * A Vue component that renders an `prosekit-menu-popup` custom element.
25
- *
26
- * @public
27
- */
17
+ /** A Vue component that renders an `prosekit-menu-popup` custom element. */
28
18
  export const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPopupProps & HTMLAttributes>(
29
19
  (props, { slots }) => {
30
20
  registerMenuPopupElement();
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerMenuPositionerElement, type MenuPositionerProps as MenuPositionerElementProps } from '@prosekit/web/menu';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link MenuPositioner} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link MenuPositioner} Vue component. */
13
7
  export interface MenuPositionerProps {
14
8
  /**
15
9
  * The initial placement of the floating element
@@ -140,11 +134,7 @@ export interface MenuPositionerProps {
140
134
  altBoundary?: MenuPositionerElementProps['altBoundary'];
141
135
  }
142
136
 
143
- /**
144
- * A Vue component that renders an `prosekit-menu-positioner` custom element.
145
- *
146
- * @public
147
- */
137
+ /** A Vue component that renders an `prosekit-menu-positioner` custom element. */
148
138
  export const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuPositionerProps & HTMLAttributes>(
149
139
  (props, { slots }) => {
150
140
  registerMenuPositionerElement();
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerMenuRootElement, type MenuRootEvents, type MenuRootProps as MenuRootElementProps } from '@prosekit/web/menu';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link MenuRoot} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link MenuRoot} Vue component. */
13
7
  export interface MenuRootProps {
14
8
  /**
15
9
  * Whether the overlay is initially open.
@@ -30,11 +24,7 @@ export interface MenuRootProps {
30
24
  onOpenChange?: (event: MenuRootEvents['openChange']) => void;
31
25
  }
32
26
 
33
- /**
34
- * A Vue component that renders an `prosekit-menu-root` custom element.
35
- *
36
- * @public
37
- */
27
+ /** A Vue component that renders an `prosekit-menu-root` custom element. */
38
28
  export const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuRootProps & HTMLAttributes>(
39
29
  (props, { slots }) => {
40
30
  registerMenuRootElement();
@@ -84,5 +74,3 @@ export const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes> =
84
74
  },
85
75
  { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },
86
76
  );
87
-
88
- export type { MenuRootEvents };
@@ -1,29 +1,76 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
4
-
5
- import { registerMenuSubmenuRootElement } from '@prosekit/web/menu';
6
- import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
-
8
- /**
9
- * Props for the {@link MenuSubmenuRoot} Vue component.
10
- *
11
- * @public
12
- */
13
- export interface MenuSubmenuRootProps {}
14
-
15
- /**
16
- * A Vue component that renders an `prosekit-menu-submenu-root` custom element.
17
- *
18
- * @public
19
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
2
+
3
+ import { registerMenuSubmenuRootElement, type MenuSubmenuRootEvents, type MenuSubmenuRootProps as MenuSubmenuRootElementProps } from '@prosekit/web/menu';
4
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
5
+
6
+ /** Props for the {@link MenuSubmenuRoot} Vue component. */
7
+ export interface MenuSubmenuRootProps {
8
+ /**
9
+ * Whether the overlay is initially open.
10
+ * @default false
11
+ */
12
+ defaultOpen?: MenuSubmenuRootElementProps['defaultOpen'];
13
+ /**
14
+ * Whether the overlay is currently open.
15
+ * @default null
16
+ */
17
+ open?: MenuSubmenuRootElementProps['open'];
18
+ /**
19
+ * Whether the component should ignore user interaction.
20
+ * @default false
21
+ */
22
+ disabled?: MenuSubmenuRootElementProps['disabled'];
23
+ /** Emitted when the submenu is opened or closed. */
24
+ onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
25
+ }
26
+
27
+ /** A Vue component that renders an `prosekit-menu-submenu-root` custom element. */
20
28
  export const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuRootProps & HTMLAttributes>(
21
29
  (props, { slots }) => {
22
30
  registerMenuSubmenuRootElement();
23
31
 
32
+ const elementRef = shallowRef<HTMLElement | null>(null);
33
+
34
+ const splittedProps = computed(() => {
35
+ const { defaultOpen: p0, disabled: p1, open: p2, onOpenChange: e0, ...restProps } = props;
36
+ return [[p0, p1, p2, e0], restProps] as const;
37
+ });
38
+
39
+ const handlers: Array<((event: any) => void) | undefined> = [];
40
+
41
+ watchEffect(() => {
42
+ const element = elementRef.value;
43
+ if (!element) return;
44
+
45
+ const [p0, p1, p2, e0] = splittedProps.value[0];
46
+
47
+ Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });
48
+
49
+ handlers.length = 0;
50
+ handlers.push(e0);
51
+ });
52
+
53
+ watchEffect(() => {
54
+ const element = elementRef.value;
55
+ if (!element) return;
56
+
57
+ const ac = new AbortController();
58
+ for (const [index, eventName] of ['openChange'].entries()) {
59
+ element.addEventListener(
60
+ eventName,
61
+ (event: Event) => {
62
+ handlers[index]?.(event);
63
+ },
64
+ { signal: ac.signal },
65
+ );
66
+ }
67
+ return () => ac.abort();
68
+ });
69
+
24
70
  return () => {
25
- return h('prosekit-menu-submenu-root', props, slots.default?.());
71
+ const restProps = splittedProps.value[1];
72
+ return h('prosekit-menu-submenu-root', { ...restProps, ref: elementRef }, slots.default?.());
26
73
  };
27
74
  },
28
- { props: [] },
75
+ { props: ['defaultOpen', 'disabled', 'open', 'onOpenChange'] },
29
76
  );
@@ -1,29 +1,49 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
4
-
5
- import { registerMenuSubmenuTriggerElement } from '@prosekit/web/menu';
6
- import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
-
8
- /**
9
- * Props for the {@link MenuSubmenuTrigger} Vue component.
10
- *
11
- * @public
12
- */
13
- export interface MenuSubmenuTriggerProps {}
14
-
15
- /**
16
- * A Vue component that renders an `prosekit-menu-submenu-trigger` custom element.
17
- *
18
- * @public
19
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
2
+
3
+ import { registerMenuSubmenuTriggerElement, type MenuSubmenuTriggerProps as MenuSubmenuTriggerElementProps } from '@prosekit/web/menu';
4
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
5
+
6
+ /** Props for the {@link MenuSubmenuTrigger} Vue component. */
7
+ export interface MenuSubmenuTriggerProps {
8
+ /**
9
+ * The unique value for this submenu trigger in the parent menu.
10
+ *
11
+ * @default ""
12
+ */
13
+ value?: MenuSubmenuTriggerElementProps['value'];
14
+ /**
15
+ * Whether this submenu trigger is disabled.
16
+ *
17
+ * @default false
18
+ */
19
+ disabled?: MenuSubmenuTriggerElementProps['disabled'];
20
+ }
21
+
22
+ /** A Vue component that renders an `prosekit-menu-submenu-trigger` custom element. */
20
23
  export const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuSubmenuTriggerProps & HTMLAttributes>(
21
24
  (props, { slots }) => {
22
25
  registerMenuSubmenuTriggerElement();
23
26
 
27
+ const elementRef = shallowRef<HTMLElement | null>(null);
28
+
29
+ const splittedProps = computed(() => {
30
+ const { disabled: p0, value: p1, ...restProps } = props;
31
+ return [[p0, p1], restProps] as const;
32
+ });
33
+
34
+ watchEffect(() => {
35
+ const element = elementRef.value;
36
+ if (!element) return;
37
+
38
+ const [p0, p1] = splittedProps.value[0];
39
+
40
+ Object.assign(element, { disabled: p0, value: p1 });
41
+ });
42
+
24
43
  return () => {
25
- return h('prosekit-menu-submenu-trigger', props, slots.default?.());
44
+ const restProps = splittedProps.value[1];
45
+ return h('prosekit-menu-submenu-trigger', { ...restProps, ref: elementRef }, slots.default?.());
26
46
  };
27
47
  },
28
- { props: [] },
48
+ { props: ['disabled', 'value'] },
29
49
  );
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerMenuTriggerElement, type MenuTriggerEvents, type MenuTriggerProps as MenuTriggerElementProps } from '@prosekit/web/menu';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link MenuTrigger} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link MenuTrigger} Vue component. */
13
7
  export interface MenuTriggerProps {
14
8
  /**
15
9
  * Whether the component should ignore user interaction.
@@ -21,11 +15,7 @@ export interface MenuTriggerProps {
21
15
  onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
22
16
  }
23
17
 
24
- /**
25
- * A Vue component that renders an `prosekit-menu-trigger` custom element.
26
- *
27
- * @public
28
- */
18
+ /** A Vue component that renders an `prosekit-menu-trigger` custom element. */
29
19
  export const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<MenuTriggerProps & HTMLAttributes>(
30
20
  (props, { slots }) => {
31
21
  registerMenuTriggerElement();
@@ -75,5 +65,3 @@ export const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttribut
75
65
  },
76
66
  { props: ['disabled', 'onOpenChange'] },
77
67
  );
78
-
79
- export type { MenuTriggerEvents };
@@ -1,13 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  export { PopoverPopup, type PopoverPopupProps } from './popover-popup.gen.ts';
6
4
 
7
5
  export { PopoverPositioner, type PopoverPositionerProps } from './popover-positioner.gen.ts';
8
6
 
9
- export { PopoverRoot, type PopoverRootProps, type PopoverRootEvents } from './popover-root.gen.ts';
7
+ export { PopoverRoot, type PopoverRootProps } from './popover-root.gen.ts';
10
8
 
11
- export { PopoverTrigger, type PopoverTriggerProps, type PopoverTriggerEvents } from './popover-trigger.gen.ts';
12
-
13
- export { OpenChangeEvent } from '@prosekit/web/popover';
9
+ export { PopoverTrigger, type PopoverTriggerProps } from './popover-trigger.gen.ts';
@@ -1,22 +1,12 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerPopoverPopupElement } from '@prosekit/web/popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link PopoverPopup} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link PopoverPopup} Vue component. */
13
7
  export interface PopoverPopupProps {}
14
8
 
15
- /**
16
- * A Vue component that renders an `prosekit-popover-popup` custom element.
17
- *
18
- * @public
19
- */
9
+ /** A Vue component that renders an `prosekit-popover-popup` custom element. */
20
10
  export const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPopupProps & HTMLAttributes>(
21
11
  (props, { slots }) => {
22
12
  registerPopoverPopupElement();
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerPopoverPositionerElement, type PopoverPositionerProps as PopoverPositionerElementProps } from '@prosekit/web/popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link PopoverPositioner} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link PopoverPositioner} Vue component. */
13
7
  export interface PopoverPositionerProps {
14
8
  /**
15
9
  * The strategy to use for positioning
@@ -140,11 +134,7 @@ export interface PopoverPositionerProps {
140
134
  altBoundary?: PopoverPositionerElementProps['altBoundary'];
141
135
  }
142
136
 
143
- /**
144
- * A Vue component that renders an `prosekit-popover-positioner` custom element.
145
- *
146
- * @public
147
- */
137
+ /** A Vue component that renders an `prosekit-popover-positioner` custom element. */
148
138
  export const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverPositionerProps & HTMLAttributes>(
149
139
  (props, { slots }) => {
150
140
  registerPopoverPositionerElement();
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerPopoverRootElement, type PopoverRootEvents, type PopoverRootProps as PopoverRootElementProps } from '@prosekit/web/popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link PopoverRoot} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link PopoverRoot} Vue component. */
13
7
  export interface PopoverRootProps {
14
8
  /**
15
9
  * Whether the popover should be modal.
@@ -37,11 +31,7 @@ export interface PopoverRootProps {
37
31
  onOpenChange?: (event: PopoverRootEvents['openChange']) => void;
38
32
  }
39
33
 
40
- /**
41
- * A Vue component that renders an `prosekit-popover-root` custom element.
42
- *
43
- * @public
44
- */
34
+ /** A Vue component that renders an `prosekit-popover-root` custom element. */
45
35
  export const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverRootProps & HTMLAttributes>(
46
36
  (props, { slots }) => {
47
37
  registerPopoverRootElement();
@@ -91,5 +81,3 @@ export const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttribut
91
81
  },
92
82
  { props: ['defaultOpen', 'disabled', 'modal', 'open', 'onOpenChange'] },
93
83
  );
94
-
95
- export type { PopoverRootEvents };
@@ -1,15 +1,9 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
3
  import { registerPopoverTriggerElement, type PopoverTriggerEvents, type PopoverTriggerProps as PopoverTriggerElementProps } from '@prosekit/web/popover';
6
4
  import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
5
 
8
- /**
9
- * Props for the {@link PopoverTrigger} Vue component.
10
- *
11
- * @public
12
- */
6
+ /** Props for the {@link PopoverTrigger} Vue component. */
13
7
  export interface PopoverTriggerProps {
14
8
  /**
15
9
  * Whether the component should ignore user interaction.
@@ -37,11 +31,7 @@ export interface PopoverTriggerProps {
37
31
  onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;
38
32
  }
39
33
 
40
- /**
41
- * A Vue component that renders an `prosekit-popover-trigger` custom element.
42
- *
43
- * @public
44
- */
34
+ /** A Vue component that renders an `prosekit-popover-trigger` custom element. */
45
35
  export const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<PopoverTriggerProps & HTMLAttributes>(
46
36
  (props, { slots }) => {
47
37
  registerPopoverTriggerElement();
@@ -91,5 +81,3 @@ export const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAt
91
81
  },
92
82
  { props: ['closeDelay', 'delay', 'disabled', 'openOnHover', 'onOpenChange'] },
93
83
  );
94
-
95
- export type { PopoverTriggerEvents };
@@ -1,9 +1,5 @@
1
- /**
2
- * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
- */
1
+ // This file is auto-generated by "@aria-ui/cli". Do not edit this file directly.
4
2
 
5
- export { ResizableRoot, type ResizableRootProps, type ResizableRootEvents } from './resizable-root.gen.ts';
3
+ export { ResizableRoot, type ResizableRootProps } from './resizable-root.gen.ts';
6
4
 
7
5
  export { ResizableHandle, type ResizableHandleProps } from './resizable-handle.gen.ts';
8
-
9
- export { ResizeEndEvent, ResizeStartEvent } from '@prosekit/web/resizable';