@prosekit/vue 0.7.0-beta.1 → 0.7.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/prosekit-vue-autocomplete.d.ts +216 -25
  2. package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
  3. package/dist/prosekit-vue-autocomplete.js +270 -9
  4. package/dist/prosekit-vue-autocomplete.js.map +1 -1
  5. package/dist/prosekit-vue-block-handle.d.ts +202 -19
  6. package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
  7. package/dist/prosekit-vue-block-handle.js +211 -7
  8. package/dist/prosekit-vue-block-handle.js.map +1 -1
  9. package/dist/prosekit-vue-drop-indicator.d.ts +24 -8
  10. package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
  11. package/dist/prosekit-vue-drop-indicator.js +36 -3
  12. package/dist/prosekit-vue-drop-indicator.js.map +1 -1
  13. package/dist/prosekit-vue-inline-popover.d.ts +200 -9
  14. package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
  15. package/dist/prosekit-vue-inline-popover.js +171 -5
  16. package/dist/prosekit-vue-inline-popover.js.map +1 -1
  17. package/dist/prosekit-vue-menu.d.ts +287 -0
  18. package/dist/prosekit-vue-menu.d.ts.map +1 -0
  19. package/dist/prosekit-vue-menu.js +313 -0
  20. package/dist/prosekit-vue-menu.js.map +1 -0
  21. package/dist/prosekit-vue-popover.d.ts +219 -19
  22. package/dist/prosekit-vue-popover.d.ts.map +1 -1
  23. package/dist/prosekit-vue-popover.js +222 -7
  24. package/dist/prosekit-vue-popover.js.map +1 -1
  25. package/dist/prosekit-vue-resizable.d.ts +50 -15
  26. package/dist/prosekit-vue-resizable.d.ts.map +1 -1
  27. package/dist/prosekit-vue-resizable.js +92 -7
  28. package/dist/prosekit-vue-resizable.js.map +1 -1
  29. package/dist/prosekit-vue-table-handle.d.ts +427 -55
  30. package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
  31. package/dist/prosekit-vue-table-handle.js +455 -19
  32. package/dist/prosekit-vue-table-handle.js.map +1 -1
  33. package/dist/prosekit-vue-tooltip.d.ts +203 -19
  34. package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
  35. package/dist/prosekit-vue-tooltip.js +202 -7
  36. package/dist/prosekit-vue-tooltip.js.map +1 -1
  37. package/package.json +23 -15
  38. package/src/components/autocomplete/autocomplete-empty.gen.ts +21 -25
  39. package/src/components/autocomplete/autocomplete-item.gen.ts +80 -26
  40. package/src/components/autocomplete/autocomplete-popup.gen.ts +80 -0
  41. package/src/components/autocomplete/autocomplete-positioner.gen.ts +149 -0
  42. package/src/components/autocomplete/autocomplete-root.gen.ts +112 -0
  43. package/src/components/autocomplete/index.gen.ts +12 -4
  44. package/src/components/autocomplete/index.ts +27 -0
  45. package/src/components/block-handle/block-handle-add.gen.ts +51 -26
  46. package/src/components/block-handle/block-handle-draggable.gen.ts +51 -26
  47. package/src/components/block-handle/block-handle-popup.gen.ts +29 -0
  48. package/src/components/block-handle/block-handle-positioner.gen.ts +167 -0
  49. package/src/components/block-handle/block-handle-root.gen.ts +84 -0
  50. package/src/components/block-handle/index.gen.ts +13 -3
  51. package/src/components/block-handle/index.ts +27 -0
  52. package/src/components/drop-indicator/drop-indicator.gen.ts +57 -26
  53. package/src/components/drop-indicator/index.gen.ts +5 -1
  54. package/src/components/drop-indicator/index.ts +14 -0
  55. package/src/components/inline-popover/index.gen.ts +11 -1
  56. package/src/components/inline-popover/index.ts +22 -0
  57. package/src/components/inline-popover/inline-popover-popup.gen.ts +29 -0
  58. package/src/components/inline-popover/inline-popover-positioner.gen.ts +173 -0
  59. package/src/components/inline-popover/inline-popover-root.gen.ts +108 -0
  60. package/src/components/menu/index.gen.ts +19 -0
  61. package/src/components/menu/index.ts +37 -0
  62. package/src/components/menu/menu-item.gen.ts +91 -0
  63. package/src/components/menu/menu-popup.gen.ts +54 -0
  64. package/src/components/menu/menu-positioner.gen.ts +174 -0
  65. package/src/components/menu/menu-root.gen.ts +88 -0
  66. package/src/components/menu/menu-submenu-root.gen.ts +29 -0
  67. package/src/components/menu/menu-submenu-trigger.gen.ts +29 -0
  68. package/src/components/menu/menu-trigger.gen.ts +79 -0
  69. package/src/components/popover/index.gen.ts +11 -3
  70. package/src/components/popover/index.ts +24 -0
  71. package/src/components/popover/popover-popup.gen.ts +29 -0
  72. package/src/components/popover/popover-positioner.gen.ts +174 -0
  73. package/src/components/popover/popover-root.gen.ts +88 -26
  74. package/src/components/popover/popover-trigger.gen.ts +88 -26
  75. package/src/components/resizable/index.gen.ts +8 -2
  76. package/src/components/resizable/index.ts +20 -0
  77. package/src/components/resizable/resizable-handle.gen.ts +46 -26
  78. package/src/components/resizable/resizable-root.gen.ts +87 -26
  79. package/src/components/table-handle/index.gen.ts +17 -9
  80. package/src/components/table-handle/index.ts +58 -0
  81. package/src/components/table-handle/table-handle-column-menu-root.gen.ts +62 -0
  82. package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +56 -0
  83. package/src/components/table-handle/table-handle-column-popup.gen.ts +29 -0
  84. package/src/components/table-handle/table-handle-column-positioner.gen.ts +197 -0
  85. package/src/components/table-handle/table-handle-drag-preview.gen.ts +49 -26
  86. package/src/components/table-handle/table-handle-drop-indicator.gen.ts +49 -26
  87. package/src/components/table-handle/table-handle-root.gen.ts +51 -26
  88. package/src/components/table-handle/table-handle-row-menu-root.gen.ts +62 -0
  89. package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +56 -0
  90. package/src/components/table-handle/table-handle-row-popup.gen.ts +29 -0
  91. package/src/components/table-handle/table-handle-row-positioner.gen.ts +197 -0
  92. package/src/components/tooltip/index.gen.ts +11 -3
  93. package/src/components/tooltip/index.ts +24 -0
  94. package/src/components/tooltip/tooltip-popup.gen.ts +29 -0
  95. package/src/components/tooltip/tooltip-positioner.gen.ts +174 -0
  96. package/src/components/tooltip/tooltip-root.gen.ts +81 -26
  97. package/src/components/tooltip/tooltip-trigger.gen.ts +55 -26
  98. package/dist/create-component.js +0 -45
  99. package/dist/create-component.js.map +0 -1
  100. package/dist/create-emits.d.ts +0 -5
  101. package/dist/create-emits.d.ts.map +0 -1
  102. package/src/components/autocomplete/autocomplete-list.gen.ts +0 -33
  103. package/src/components/autocomplete/autocomplete-popover.gen.ts +0 -33
  104. package/src/components/block-handle/block-handle-popover.gen.ts +0 -33
  105. package/src/components/create-component.ts +0 -84
  106. package/src/components/create-emits.ts +0 -8
  107. package/src/components/inline-popover/inline-popover.gen.ts +0 -33
  108. package/src/components/popover/popover-content.gen.ts +0 -33
  109. package/src/components/table-handle/table-handle-column-root.gen.ts +0 -33
  110. package/src/components/table-handle/table-handle-column-trigger.gen.ts +0 -33
  111. package/src/components/table-handle/table-handle-popover-content.gen.ts +0 -33
  112. package/src/components/table-handle/table-handle-popover-item.gen.ts +0 -33
  113. package/src/components/table-handle/table-handle-row-root.gen.ts +0 -33
  114. package/src/components/table-handle/table-handle-row-trigger.gen.ts +0 -33
  115. package/src/components/tooltip/tooltip-content.gen.ts +0 -33
@@ -1,33 +1,56 @@
1
- import {
2
- tableHandleDropIndicatorProps,
3
- tableHandleDropIndicatorEvents,
4
- type TableHandleDropIndicatorProps as Props,
5
- type TableHandleDropIndicatorEvents as Events,
6
- } from '@prosekit/web/table-handle'
7
- import type { DefineSetupFnComponent, HTMLAttributes } from 'vue'
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleDropIndicatorElement, type TableHandleDropIndicatorProps as TableHandleDropIndicatorElementProps } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
8
7
 
9
- import { createComponent } from '../create-component.ts'
10
- import type { CreateEmits } from '../create-emits.ts'
8
+ import { useEditorContext } from '../../injection/editor-context.ts';
11
9
 
12
10
  /**
13
- * Props for the {@link TableHandleDropIndicator} component.
11
+ * Props for the {@link TableHandleDropIndicator} Vue component.
12
+ *
13
+ * @public
14
14
  */
15
- export interface TableHandleDropIndicatorProps extends Partial<Props> {}
15
+ export interface TableHandleDropIndicatorProps {
16
+ /**
17
+ * @default null
18
+ * @hidden
19
+ */
20
+ editor?: TableHandleDropIndicatorElementProps['editor'];
21
+ }
16
22
 
17
23
  /**
18
- * Emits for the {@link TableHandleDropIndicator} component.
24
+ * A Vue component that renders an `prosekit-table-handle-drop-indicator` custom element.
25
+ *
26
+ * @public
19
27
  */
20
- export interface TableHandleDropIndicatorEmits extends CreateEmits<Events> {}
21
-
22
- export const TableHandleDropIndicator: DefineSetupFnComponent<
23
- TableHandleDropIndicatorProps & HTMLAttributes,
24
- TableHandleDropIndicatorEmits
25
- > = createComponent<
26
- TableHandleDropIndicatorProps,
27
- TableHandleDropIndicatorEmits
28
- >(
29
- 'prosekit-table-handle-drop-indicator',
30
- 'TableHandleDropIndicator',
31
- Object.keys(tableHandleDropIndicatorProps),
32
- Object.keys(tableHandleDropIndicatorEvents),
33
- )
28
+ export const TableHandleDropIndicator: DefineSetupFnComponent<TableHandleDropIndicatorProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleDropIndicatorProps & HTMLAttributes>(
29
+ (props, { slots }) => {
30
+ registerTableHandleDropIndicatorElement();
31
+
32
+ const elementRef = shallowRef<HTMLElement | null>(null);
33
+
34
+ const p0Fallback = useEditorContext();
35
+
36
+ const splittedProps = computed(() => {
37
+ const { editor: p0, ...restProps } = props;
38
+ return [[p0], restProps] as const;
39
+ });
40
+
41
+ watchEffect(() => {
42
+ const element = elementRef.value;
43
+ if (!element) return;
44
+
45
+ const [p0] = splittedProps.value[0];
46
+
47
+ Object.assign(element, { editor: p0 ?? p0Fallback });
48
+ });
49
+
50
+ return () => {
51
+ const restProps = splittedProps.value[1];
52
+ return h('prosekit-table-handle-drop-indicator', { ...restProps, ref: elementRef }, slots.default?.());
53
+ };
54
+ },
55
+ { props: ['editor'] },
56
+ );
@@ -1,33 +1,58 @@
1
- import {
2
- tableHandleRootProps,
3
- tableHandleRootEvents,
4
- type TableHandleRootProps as Props,
5
- type TableHandleRootEvents as Events,
6
- } from '@prosekit/web/table-handle'
7
- import type { DefineSetupFnComponent, HTMLAttributes } from 'vue'
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleRootElement, type TableHandleRootProps as TableHandleRootElementProps } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
8
7
 
9
- import { createComponent } from '../create-component.ts'
10
- import type { CreateEmits } from '../create-emits.ts'
8
+ import { useEditorContext } from '../../injection/editor-context.ts';
11
9
 
12
10
  /**
13
- * Props for the {@link TableHandleRoot} component.
11
+ * Props for the {@link TableHandleRoot} Vue component.
12
+ *
13
+ * @public
14
14
  */
15
- export interface TableHandleRootProps extends Partial<Props> {}
15
+ export interface TableHandleRootProps {
16
+ /**
17
+ * The ProseKit editor instance.
18
+ *
19
+ * @default null
20
+ * @hidden
21
+ */
22
+ editor?: TableHandleRootElementProps['editor'];
23
+ }
16
24
 
17
25
  /**
18
- * Emits for the {@link TableHandleRoot} component.
26
+ * A Vue component that renders an `prosekit-table-handle-root` custom element.
27
+ *
28
+ * @public
19
29
  */
20
- export interface TableHandleRootEmits extends CreateEmits<Events> {}
21
-
22
- export const TableHandleRoot: DefineSetupFnComponent<
23
- TableHandleRootProps & HTMLAttributes,
24
- TableHandleRootEmits
25
- > = createComponent<
26
- TableHandleRootProps,
27
- TableHandleRootEmits
28
- >(
29
- 'prosekit-table-handle-root',
30
- 'TableHandleRoot',
31
- Object.keys(tableHandleRootProps),
32
- Object.keys(tableHandleRootEvents),
33
- )
30
+ export const TableHandleRoot: DefineSetupFnComponent<TableHandleRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleRootProps & HTMLAttributes>(
31
+ (props, { slots }) => {
32
+ registerTableHandleRootElement();
33
+
34
+ const elementRef = shallowRef<HTMLElement | null>(null);
35
+
36
+ const p0Fallback = useEditorContext();
37
+
38
+ const splittedProps = computed(() => {
39
+ const { editor: p0, ...restProps } = props;
40
+ return [[p0], restProps] as const;
41
+ });
42
+
43
+ watchEffect(() => {
44
+ const element = elementRef.value;
45
+ if (!element) return;
46
+
47
+ const [p0] = splittedProps.value[0];
48
+
49
+ Object.assign(element, { editor: p0 ?? p0Fallback });
50
+ });
51
+
52
+ return () => {
53
+ const restProps = splittedProps.value[1];
54
+ return h('prosekit-table-handle-root', { ...restProps, ref: elementRef }, slots.default?.());
55
+ };
56
+ },
57
+ { props: ['editor'] },
58
+ );
@@ -0,0 +1,62 @@
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleRowMenuRootElement, type TableHandleRowMenuRootProps as TableHandleRowMenuRootElementProps } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
+
8
+ /**
9
+ * Props for the {@link TableHandleRowMenuRoot} Vue component.
10
+ *
11
+ * @public
12
+ */
13
+ export interface TableHandleRowMenuRootProps {
14
+ /**
15
+ * Whether the overlay is initially open.
16
+ * @default false
17
+ */
18
+ defaultOpen?: TableHandleRowMenuRootElementProps['defaultOpen'];
19
+ /**
20
+ * Whether the overlay is currently open.
21
+ * @default null
22
+ */
23
+ open?: TableHandleRowMenuRootElementProps['open'];
24
+ /**
25
+ * Whether the component should ignore user interaction.
26
+ * @default false
27
+ */
28
+ disabled?: TableHandleRowMenuRootElementProps['disabled'];
29
+ }
30
+
31
+ /**
32
+ * A Vue component that renders an `prosekit-table-handle-row-menu-root` custom element.
33
+ *
34
+ * @public
35
+ */
36
+ export const TableHandleRowMenuRoot: DefineSetupFnComponent<TableHandleRowMenuRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleRowMenuRootProps & HTMLAttributes>(
37
+ (props, { slots }) => {
38
+ registerTableHandleRowMenuRootElement();
39
+
40
+ const elementRef = shallowRef<HTMLElement | null>(null);
41
+
42
+ const splittedProps = computed(() => {
43
+ const { defaultOpen: p0, disabled: p1, open: p2, ...restProps } = props;
44
+ return [[p0, p1, p2], restProps] as const;
45
+ });
46
+
47
+ watchEffect(() => {
48
+ const element = elementRef.value;
49
+ if (!element) return;
50
+
51
+ const [p0, p1, p2] = splittedProps.value[0];
52
+
53
+ Object.assign(element, { defaultOpen: p0, disabled: p1, open: p2 });
54
+ });
55
+
56
+ return () => {
57
+ const restProps = splittedProps.value[1];
58
+ return h('prosekit-table-handle-row-menu-root', { ...restProps, ref: elementRef }, slots.default?.());
59
+ };
60
+ },
61
+ { props: ['defaultOpen', 'disabled', 'open'] },
62
+ );
@@ -0,0 +1,56 @@
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleRowMenuTriggerElement, type TableHandleRowMenuTriggerProps as TableHandleRowMenuTriggerElementProps } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
+
8
+ import { useEditorContext } from '../../injection/editor-context.ts';
9
+
10
+ /**
11
+ * Props for the {@link TableHandleRowMenuTrigger} Vue component.
12
+ *
13
+ * @public
14
+ */
15
+ export interface TableHandleRowMenuTriggerProps {
16
+ /**
17
+ * @default null
18
+ * @hidden
19
+ */
20
+ editor?: TableHandleRowMenuTriggerElementProps['editor'];
21
+ }
22
+
23
+ /**
24
+ * A Vue component that renders an `prosekit-table-handle-row-menu-trigger` custom element.
25
+ *
26
+ * @public
27
+ */
28
+ export const TableHandleRowMenuTrigger: DefineSetupFnComponent<TableHandleRowMenuTriggerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleRowMenuTriggerProps & HTMLAttributes>(
29
+ (props, { slots }) => {
30
+ registerTableHandleRowMenuTriggerElement();
31
+
32
+ const elementRef = shallowRef<HTMLElement | null>(null);
33
+
34
+ const p0Fallback = useEditorContext();
35
+
36
+ const splittedProps = computed(() => {
37
+ const { editor: p0, ...restProps } = props;
38
+ return [[p0], restProps] as const;
39
+ });
40
+
41
+ watchEffect(() => {
42
+ const element = elementRef.value;
43
+ if (!element) return;
44
+
45
+ const [p0] = splittedProps.value[0];
46
+
47
+ Object.assign(element, { editor: p0 ?? p0Fallback });
48
+ });
49
+
50
+ return () => {
51
+ const restProps = splittedProps.value[1];
52
+ return h('prosekit-table-handle-row-menu-trigger', { ...restProps, ref: elementRef }, slots.default?.());
53
+ };
54
+ },
55
+ { props: ['editor'] },
56
+ );
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleRowPopupElement } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
+
8
+ /**
9
+ * Props for the {@link TableHandleRowPopup} Vue component.
10
+ *
11
+ * @public
12
+ */
13
+ export interface TableHandleRowPopupProps {}
14
+
15
+ /**
16
+ * A Vue component that renders an `prosekit-table-handle-row-popup` custom element.
17
+ *
18
+ * @public
19
+ */
20
+ export const TableHandleRowPopup: DefineSetupFnComponent<TableHandleRowPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleRowPopupProps & HTMLAttributes>(
21
+ (props, { slots }) => {
22
+ registerTableHandleRowPopupElement();
23
+
24
+ return () => {
25
+ return h('prosekit-table-handle-row-popup', props, slots.default?.());
26
+ };
27
+ },
28
+ { props: [] },
29
+ );
@@ -0,0 +1,197 @@
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTableHandleRowPositionerElement, type TableHandleRowPositionerProps as TableHandleRowPositionerElementProps } from '@prosekit/web/table-handle';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';
7
+
8
+ import { useEditorContext } from '../../injection/editor-context.ts';
9
+
10
+ /**
11
+ * Props for the {@link TableHandleRowPositioner} Vue component.
12
+ *
13
+ * @public
14
+ */
15
+ export interface TableHandleRowPositionerProps {
16
+ /**
17
+ * The placement of the popover, relative to the hovered table cell.
18
+ *
19
+ * @default "left"
20
+ */
21
+ placement?: TableHandleRowPositionerElementProps['placement'];
22
+ /**
23
+ * The strategy to use for positioning
24
+ *
25
+ * @default "absolute"
26
+ */
27
+ strategy?: TableHandleRowPositionerElementProps['strategy'];
28
+ /**
29
+ * Options to activate auto-update listeners
30
+ *
31
+ * @see https://floating-ui.com/docs/autoUpdate
32
+ *
33
+ * @default true
34
+ */
35
+ autoUpdate?: TableHandleRowPositionerElementProps['autoUpdate'];
36
+ /**
37
+ * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
38
+ * to place the floating element on top of other page content.
39
+ *
40
+ * @default false
41
+ */
42
+ hoist?: TableHandleRowPositionerElementProps['hoist'];
43
+ /**
44
+ * @default 0
45
+ * @hidden
46
+ */
47
+ offset?: TableHandleRowPositionerElementProps['offset'];
48
+ /**
49
+ * @default false
50
+ * @hidden
51
+ */
52
+ flip?: TableHandleRowPositionerElementProps['flip'];
53
+ /**
54
+ * @default false
55
+ * @hidden
56
+ */
57
+ shift?: TableHandleRowPositionerElementProps['shift'];
58
+ /**
59
+ * Whether the floating element can overlap the reference element to keep it
60
+ * in view.
61
+ *
62
+ * @default false
63
+ */
64
+ overlap?: TableHandleRowPositionerElementProps['overlap'];
65
+ /**
66
+ * Whether to constrain the floating element's width and height to not exceed
67
+ * the viewport.
68
+ *
69
+ * @default false
70
+ */
71
+ fitViewport?: TableHandleRowPositionerElementProps['fitViewport'];
72
+ /**
73
+ * Whether to constrain the floating element's width so that it matches the
74
+ * reference element.
75
+ *
76
+ * @default false
77
+ */
78
+ sameWidth?: TableHandleRowPositionerElementProps['sameWidth'];
79
+ /**
80
+ * Whether to constrain the floating element's height so that it matches the
81
+ * reference element.
82
+ *
83
+ * @default false
84
+ */
85
+ sameHeight?: TableHandleRowPositionerElementProps['sameHeight'];
86
+ /**
87
+ * Whether to improve positioning for inline reference elements that span over
88
+ * multiple lines.
89
+ *
90
+ * @default false
91
+ */
92
+ inline?: TableHandleRowPositionerElementProps['inline'];
93
+ /**
94
+ * @default true
95
+ * @hidden
96
+ */
97
+ hide?: TableHandleRowPositionerElementProps['hide'];
98
+ /**
99
+ * Describes the clipping element(s) or area that overflow will be checked relative to.
100
+ * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
101
+ *
102
+ * @default 'clippingAncestors'
103
+ */
104
+ boundary?: TableHandleRowPositionerElementProps['boundary'];
105
+ /**
106
+ * Describes the root boundary that the element will be checked for overflow relative to.
107
+ * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
108
+ *
109
+ * @default 'viewport'
110
+ */
111
+ rootBoundary?: TableHandleRowPositionerElementProps['rootBoundary'];
112
+ /**
113
+ * Describes the virtual padding around the boundary to check for overflow.
114
+ * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.
115
+ *
116
+ * @default 4
117
+ */
118
+ overflowPadding?: TableHandleRowPositionerElementProps['overflowPadding'];
119
+ /**
120
+ * The element that will be used to check for overflow. Please see
121
+ * https://floating-ui.com/docs/detectoverflow#elementcontext for more
122
+ * information.
123
+ *
124
+ * @default 'floating'
125
+ */
126
+ elementContext?: TableHandleRowPositionerElementProps['elementContext'];
127
+ /**
128
+ * Whether to check the alternate elementContext's boundary. Please see
129
+ * https://floating-ui.com/docs/detectoverflow#altboundary for more
130
+ * information.
131
+ *
132
+ * @default false
133
+ */
134
+ altBoundary?: TableHandleRowPositionerElementProps['altBoundary'];
135
+ /**
136
+ * The ProseKit editor instance.
137
+ *
138
+ * @default null
139
+ * @hidden
140
+ */
141
+ editor?: TableHandleRowPositionerElementProps['editor'];
142
+ }
143
+
144
+ /**
145
+ * A Vue component that renders an `prosekit-table-handle-row-positioner` custom element.
146
+ *
147
+ * @public
148
+ */
149
+ export const TableHandleRowPositioner: DefineSetupFnComponent<TableHandleRowPositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TableHandleRowPositionerProps & HTMLAttributes>(
150
+ (props, { slots }) => {
151
+ registerTableHandleRowPositionerElement();
152
+
153
+ const elementRef = shallowRef<HTMLElement | null>(null);
154
+
155
+ const p3Fallback = useEditorContext();
156
+
157
+ const splittedProps = computed(() => {
158
+ const { altBoundary: p0, autoUpdate: p1, boundary: p2, editor: p3, elementContext: p4, fitViewport: p5, flip: p6, hide: p7, hoist: p8, inline: p9, offset: p10, overflowPadding: p11, overlap: p12, placement: p13, rootBoundary: p14, sameHeight: p15, sameWidth: p16, shift: p17, strategy: p18, ...restProps } = props;
159
+ return [[p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18], restProps] as const;
160
+ });
161
+
162
+ watchEffect(() => {
163
+ const element = elementRef.value;
164
+ if (!element) return;
165
+
166
+ const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18] = splittedProps.value[0];
167
+
168
+ Object.assign(element, {
169
+ altBoundary: p0,
170
+ autoUpdate: p1,
171
+ boundary: p2,
172
+ editor: p3 ?? p3Fallback,
173
+ elementContext: p4,
174
+ fitViewport: p5,
175
+ flip: p6,
176
+ hide: p7,
177
+ hoist: p8,
178
+ inline: p9,
179
+ offset: p10,
180
+ overflowPadding: p11,
181
+ overlap: p12,
182
+ placement: p13,
183
+ rootBoundary: p14,
184
+ sameHeight: p15,
185
+ sameWidth: p16,
186
+ shift: p17,
187
+ strategy: p18,
188
+ });
189
+ });
190
+
191
+ return () => {
192
+ const restProps = splittedProps.value[1];
193
+ return h('prosekit-table-handle-row-positioner', { ...restProps, ref: elementRef }, slots.default?.());
194
+ };
195
+ },
196
+ { props: ['altBoundary', 'autoUpdate', 'boundary', 'editor', 'elementContext', 'fitViewport', 'flip', 'hide', 'hoist', 'inline', 'offset', 'overflowPadding', 'overlap', 'placement', 'rootBoundary', 'sameHeight', 'sameWidth', 'shift', 'strategy'] },
197
+ );
@@ -1,5 +1,13 @@
1
- export { TooltipContent, type TooltipContentProps, type TooltipContentEmits } from './tooltip-content.gen.ts'
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
2
4
 
3
- export { TooltipRoot, type TooltipRootProps, type TooltipRootEmits } from './tooltip-root.gen.ts'
5
+ export { TooltipPopup, type TooltipPopupProps } from './tooltip-popup.gen.ts';
4
6
 
5
- export { TooltipTrigger, type TooltipTriggerProps, type TooltipTriggerEmits } from './tooltip-trigger.gen.ts'
7
+ export { TooltipPositioner, type TooltipPositionerProps } from './tooltip-positioner.gen.ts';
8
+
9
+ export { TooltipRoot, type TooltipRootProps, type TooltipRootEvents } from './tooltip-root.gen.ts';
10
+
11
+ export { TooltipTrigger, type TooltipTriggerProps } from './tooltip-trigger.gen.ts';
12
+
13
+ export { OpenChangeEvent } from '@prosekit/web/tooltip';
@@ -0,0 +1,24 @@
1
+ /**
2
+
3
+ @module
4
+
5
+ ## Anatomy
6
+
7
+ ```jsx
8
+ import {
9
+ TooltipPopup,
10
+ TooltipPositioner,
11
+ TooltipRoot,
12
+ TooltipTrigger,
13
+ } from 'prosekit/vue/tooltip'
14
+
15
+ <TooltipRoot>
16
+ <TooltipTrigger>...</TooltipTrigger>
17
+ <TooltipPositioner>
18
+ <TooltipPopup>...</TooltipPopup>
19
+ </TooltipPositioner>
20
+ </TooltipRoot>
21
+ ```
22
+ */
23
+
24
+ export * from './index.gen.ts'
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
3
+ */
4
+
5
+ import { registerTooltipPopupElement } from '@prosekit/web/tooltip';
6
+ import { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';
7
+
8
+ /**
9
+ * Props for the {@link TooltipPopup} Vue component.
10
+ *
11
+ * @public
12
+ */
13
+ export interface TooltipPopupProps {}
14
+
15
+ /**
16
+ * A Vue component that renders an `prosekit-tooltip-popup` custom element.
17
+ *
18
+ * @public
19
+ */
20
+ export const TooltipPopup: DefineSetupFnComponent<TooltipPopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<TooltipPopupProps & HTMLAttributes>(
21
+ (props, { slots }) => {
22
+ registerTooltipPopupElement();
23
+
24
+ return () => {
25
+ return h('prosekit-tooltip-popup', props, slots.default?.());
26
+ };
27
+ },
28
+ { props: [] },
29
+ );