@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.
- package/dist/prosekit-vue-autocomplete.d.ts +216 -25
- package/dist/prosekit-vue-autocomplete.d.ts.map +1 -1
- package/dist/prosekit-vue-autocomplete.js +270 -9
- package/dist/prosekit-vue-autocomplete.js.map +1 -1
- package/dist/prosekit-vue-block-handle.d.ts +202 -19
- package/dist/prosekit-vue-block-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-block-handle.js +211 -7
- package/dist/prosekit-vue-block-handle.js.map +1 -1
- package/dist/prosekit-vue-drop-indicator.d.ts +24 -8
- package/dist/prosekit-vue-drop-indicator.d.ts.map +1 -1
- package/dist/prosekit-vue-drop-indicator.js +36 -3
- package/dist/prosekit-vue-drop-indicator.js.map +1 -1
- package/dist/prosekit-vue-inline-popover.d.ts +200 -9
- package/dist/prosekit-vue-inline-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-inline-popover.js +171 -5
- package/dist/prosekit-vue-inline-popover.js.map +1 -1
- package/dist/prosekit-vue-menu.d.ts +287 -0
- package/dist/prosekit-vue-menu.d.ts.map +1 -0
- package/dist/prosekit-vue-menu.js +313 -0
- package/dist/prosekit-vue-menu.js.map +1 -0
- package/dist/prosekit-vue-popover.d.ts +219 -19
- package/dist/prosekit-vue-popover.d.ts.map +1 -1
- package/dist/prosekit-vue-popover.js +222 -7
- package/dist/prosekit-vue-popover.js.map +1 -1
- package/dist/prosekit-vue-resizable.d.ts +50 -15
- package/dist/prosekit-vue-resizable.d.ts.map +1 -1
- package/dist/prosekit-vue-resizable.js +92 -7
- package/dist/prosekit-vue-resizable.js.map +1 -1
- package/dist/prosekit-vue-table-handle.d.ts +427 -55
- package/dist/prosekit-vue-table-handle.d.ts.map +1 -1
- package/dist/prosekit-vue-table-handle.js +455 -19
- package/dist/prosekit-vue-table-handle.js.map +1 -1
- package/dist/prosekit-vue-tooltip.d.ts +203 -19
- package/dist/prosekit-vue-tooltip.d.ts.map +1 -1
- package/dist/prosekit-vue-tooltip.js +202 -7
- package/dist/prosekit-vue-tooltip.js.map +1 -1
- package/package.json +23 -15
- package/src/components/autocomplete/autocomplete-empty.gen.ts +21 -25
- package/src/components/autocomplete/autocomplete-item.gen.ts +80 -26
- package/src/components/autocomplete/autocomplete-popup.gen.ts +80 -0
- package/src/components/autocomplete/autocomplete-positioner.gen.ts +149 -0
- package/src/components/autocomplete/autocomplete-root.gen.ts +112 -0
- package/src/components/autocomplete/index.gen.ts +12 -4
- package/src/components/autocomplete/index.ts +27 -0
- package/src/components/block-handle/block-handle-add.gen.ts +51 -26
- package/src/components/block-handle/block-handle-draggable.gen.ts +51 -26
- package/src/components/block-handle/block-handle-popup.gen.ts +29 -0
- package/src/components/block-handle/block-handle-positioner.gen.ts +167 -0
- package/src/components/block-handle/block-handle-root.gen.ts +84 -0
- package/src/components/block-handle/index.gen.ts +13 -3
- package/src/components/block-handle/index.ts +27 -0
- package/src/components/drop-indicator/drop-indicator.gen.ts +57 -26
- package/src/components/drop-indicator/index.gen.ts +5 -1
- package/src/components/drop-indicator/index.ts +14 -0
- package/src/components/inline-popover/index.gen.ts +11 -1
- package/src/components/inline-popover/index.ts +22 -0
- package/src/components/inline-popover/inline-popover-popup.gen.ts +29 -0
- package/src/components/inline-popover/inline-popover-positioner.gen.ts +173 -0
- package/src/components/inline-popover/inline-popover-root.gen.ts +108 -0
- package/src/components/menu/index.gen.ts +19 -0
- package/src/components/menu/index.ts +37 -0
- package/src/components/menu/menu-item.gen.ts +91 -0
- package/src/components/menu/menu-popup.gen.ts +54 -0
- package/src/components/menu/menu-positioner.gen.ts +174 -0
- package/src/components/menu/menu-root.gen.ts +88 -0
- package/src/components/menu/menu-submenu-root.gen.ts +29 -0
- package/src/components/menu/menu-submenu-trigger.gen.ts +29 -0
- package/src/components/menu/menu-trigger.gen.ts +79 -0
- package/src/components/popover/index.gen.ts +11 -3
- package/src/components/popover/index.ts +24 -0
- package/src/components/popover/popover-popup.gen.ts +29 -0
- package/src/components/popover/popover-positioner.gen.ts +174 -0
- package/src/components/popover/popover-root.gen.ts +88 -26
- package/src/components/popover/popover-trigger.gen.ts +88 -26
- package/src/components/resizable/index.gen.ts +8 -2
- package/src/components/resizable/index.ts +20 -0
- package/src/components/resizable/resizable-handle.gen.ts +46 -26
- package/src/components/resizable/resizable-root.gen.ts +87 -26
- package/src/components/table-handle/index.gen.ts +17 -9
- package/src/components/table-handle/index.ts +58 -0
- package/src/components/table-handle/table-handle-column-menu-root.gen.ts +62 -0
- package/src/components/table-handle/table-handle-column-menu-trigger.gen.ts +56 -0
- package/src/components/table-handle/table-handle-column-popup.gen.ts +29 -0
- package/src/components/table-handle/table-handle-column-positioner.gen.ts +197 -0
- package/src/components/table-handle/table-handle-drag-preview.gen.ts +49 -26
- package/src/components/table-handle/table-handle-drop-indicator.gen.ts +49 -26
- package/src/components/table-handle/table-handle-root.gen.ts +51 -26
- package/src/components/table-handle/table-handle-row-menu-root.gen.ts +62 -0
- package/src/components/table-handle/table-handle-row-menu-trigger.gen.ts +56 -0
- package/src/components/table-handle/table-handle-row-popup.gen.ts +29 -0
- package/src/components/table-handle/table-handle-row-positioner.gen.ts +197 -0
- package/src/components/tooltip/index.gen.ts +11 -3
- package/src/components/tooltip/index.ts +24 -0
- package/src/components/tooltip/tooltip-popup.gen.ts +29 -0
- package/src/components/tooltip/tooltip-positioner.gen.ts +174 -0
- package/src/components/tooltip/tooltip-root.gen.ts +81 -26
- package/src/components/tooltip/tooltip-trigger.gen.ts +55 -26
- package/dist/create-component.js +0 -45
- package/dist/create-component.js.map +0 -1
- package/dist/create-emits.d.ts +0 -5
- package/dist/create-emits.d.ts.map +0 -1
- package/src/components/autocomplete/autocomplete-list.gen.ts +0 -33
- package/src/components/autocomplete/autocomplete-popover.gen.ts +0 -33
- package/src/components/block-handle/block-handle-popover.gen.ts +0 -33
- package/src/components/create-component.ts +0 -84
- package/src/components/create-emits.ts +0 -8
- package/src/components/inline-popover/inline-popover.gen.ts +0 -33
- package/src/components/popover/popover-content.gen.ts +0 -33
- package/src/components/table-handle/table-handle-column-root.gen.ts +0 -33
- package/src/components/table-handle/table-handle-column-trigger.gen.ts +0 -33
- package/src/components/table-handle/table-handle-popover-content.gen.ts +0 -33
- package/src/components/table-handle/table-handle-popover-item.gen.ts +0 -33
- package/src/components/table-handle/table-handle-row-root.gen.ts +0 -33
- package/src/components/table-handle/table-handle-row-trigger.gen.ts +0 -33
- package/src/components/tooltip/tooltip-content.gen.ts +0 -33
|
@@ -1,50 +1,241 @@
|
|
|
1
|
-
import { t as CreateEmits } from "./create-emits.js";
|
|
2
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$1, AutocompletePopupEvents, AutocompletePositionerProps as AutocompletePositionerProps$1, AutocompleteRootEvents, AutocompleteRootProps as AutocompleteRootProps$1, OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent } from "@prosekit/web/autocomplete";
|
|
4
3
|
|
|
5
4
|
//#region src/components/autocomplete/autocomplete-empty.gen.d.ts
|
|
6
5
|
/**
|
|
7
|
-
* Props for the {@link AutocompleteEmpty} component.
|
|
6
|
+
* Props for the {@link AutocompleteEmpty} Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
8
9
|
*/
|
|
9
|
-
interface AutocompleteEmptyProps
|
|
10
|
+
interface AutocompleteEmptyProps {}
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* A Vue component that renders an `prosekit-autocomplete-empty` custom element.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
12
15
|
*/
|
|
13
|
-
|
|
14
|
-
declare const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes, AutocompleteEmptyEmits>;
|
|
16
|
+
declare const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes>;
|
|
15
17
|
//#endregion
|
|
16
18
|
//#region src/components/autocomplete/autocomplete-item.gen.d.ts
|
|
17
19
|
/**
|
|
18
|
-
* Props for the {@link AutocompleteItem} component.
|
|
20
|
+
* Props for the {@link AutocompleteItem} Vue component.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
19
23
|
*/
|
|
20
|
-
interface AutocompleteItemProps
|
|
24
|
+
interface AutocompleteItemProps {
|
|
25
|
+
/**
|
|
26
|
+
* The value of the item, which will be matched against the query.
|
|
27
|
+
*
|
|
28
|
+
* If not provided, the value is the item's text content.
|
|
29
|
+
*
|
|
30
|
+
* @default ""
|
|
31
|
+
*/
|
|
32
|
+
value?: AutocompleteItemProps$1['value'];
|
|
33
|
+
/**
|
|
34
|
+
* Whether this option is disabled.
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
disabled?: AutocompleteItemProps$1['disabled'];
|
|
39
|
+
/** Emitted when the the item is selected. */
|
|
40
|
+
onSelect?: (event: AutocompleteItemEvents['select']) => void;
|
|
41
|
+
}
|
|
21
42
|
/**
|
|
22
|
-
*
|
|
43
|
+
* A Vue component that renders an `prosekit-autocomplete-item` custom element.
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
23
46
|
*/
|
|
24
|
-
|
|
25
|
-
declare const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes, AutocompleteItemEmits>;
|
|
47
|
+
declare const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes>;
|
|
26
48
|
//#endregion
|
|
27
|
-
//#region src/components/autocomplete/autocomplete-
|
|
49
|
+
//#region src/components/autocomplete/autocomplete-popup.gen.d.ts
|
|
28
50
|
/**
|
|
29
|
-
* Props for the {@link
|
|
51
|
+
* Props for the {@link AutocompletePopup} Vue component.
|
|
52
|
+
*
|
|
53
|
+
* @public
|
|
30
54
|
*/
|
|
31
|
-
interface
|
|
55
|
+
interface AutocompletePopupProps {
|
|
56
|
+
/**
|
|
57
|
+
* Emitted when the selected value changes. Only available when multiple is
|
|
58
|
+
* false.
|
|
59
|
+
*/
|
|
60
|
+
onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Emitted when the selected values change. Only available when multiple is
|
|
63
|
+
* true.
|
|
64
|
+
*/
|
|
65
|
+
onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;
|
|
66
|
+
}
|
|
32
67
|
/**
|
|
33
|
-
*
|
|
68
|
+
* A Vue component that renders an `prosekit-autocomplete-popup` custom element.
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
34
71
|
*/
|
|
35
|
-
|
|
36
|
-
declare const AutocompleteList: DefineSetupFnComponent<AutocompleteListProps & HTMLAttributes, AutocompleteListEmits>;
|
|
72
|
+
declare const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes>;
|
|
37
73
|
//#endregion
|
|
38
|
-
//#region src/components/autocomplete/autocomplete-
|
|
74
|
+
//#region src/components/autocomplete/autocomplete-positioner.gen.d.ts
|
|
39
75
|
/**
|
|
40
|
-
* Props for the {@link
|
|
76
|
+
* Props for the {@link AutocompletePositioner} Vue component.
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
41
79
|
*/
|
|
42
|
-
interface
|
|
80
|
+
interface AutocompletePositionerProps {
|
|
81
|
+
/**
|
|
82
|
+
* The placement of the popover, relative to the text cursor.
|
|
83
|
+
*
|
|
84
|
+
* @default "bottom-start"
|
|
85
|
+
*/
|
|
86
|
+
placement?: AutocompletePositionerProps$1['placement'];
|
|
87
|
+
/**
|
|
88
|
+
* The distance between the popover and the hovered block.
|
|
89
|
+
*
|
|
90
|
+
* @default 4
|
|
91
|
+
*/
|
|
92
|
+
offset?: AutocompletePositionerProps$1['offset'];
|
|
93
|
+
/** @default true */
|
|
94
|
+
inline?: AutocompletePositionerProps$1['inline'];
|
|
95
|
+
/** @default true */
|
|
96
|
+
hoist?: AutocompletePositionerProps$1['hoist'];
|
|
97
|
+
/** @default true */
|
|
98
|
+
fitViewport?: AutocompletePositionerProps$1['fitViewport'];
|
|
99
|
+
/** @default "The body element" */
|
|
100
|
+
boundary?: AutocompletePositionerProps$1['boundary'];
|
|
101
|
+
/** @default 8 */
|
|
102
|
+
overflowPadding?: AutocompletePositionerProps$1['overflowPadding'];
|
|
103
|
+
/**
|
|
104
|
+
* The strategy to use for positioning
|
|
105
|
+
*
|
|
106
|
+
* @default "absolute"
|
|
107
|
+
*/
|
|
108
|
+
strategy?: AutocompletePositionerProps$1['strategy'];
|
|
109
|
+
/**
|
|
110
|
+
* Options to activate auto-update listeners
|
|
111
|
+
*
|
|
112
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
113
|
+
*
|
|
114
|
+
* @default true
|
|
115
|
+
*/
|
|
116
|
+
autoUpdate?: AutocompletePositionerProps$1['autoUpdate'];
|
|
117
|
+
/**
|
|
118
|
+
* Whether to flip the `placement` in order to keep it in view when the
|
|
119
|
+
* preferred placement(s) will overflow the clipping boundary. You can also
|
|
120
|
+
* provide an array of placements to try sequentially if the preferred
|
|
121
|
+
* `placement` does not fit.
|
|
122
|
+
*
|
|
123
|
+
* @default true
|
|
124
|
+
*/
|
|
125
|
+
flip?: AutocompletePositionerProps$1['flip'];
|
|
126
|
+
/**
|
|
127
|
+
* Whether the floating element should shift to keep it in view.
|
|
128
|
+
*
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
shift?: AutocompletePositionerProps$1['shift'];
|
|
132
|
+
/**
|
|
133
|
+
* Whether the floating element can overlap the reference element to keep it
|
|
134
|
+
* in view.
|
|
135
|
+
*
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
overlap?: AutocompletePositionerProps$1['overlap'];
|
|
139
|
+
/**
|
|
140
|
+
* Whether to constrain the floating element's width so that it matches the
|
|
141
|
+
* reference element.
|
|
142
|
+
*
|
|
143
|
+
* @default false
|
|
144
|
+
*/
|
|
145
|
+
sameWidth?: AutocompletePositionerProps$1['sameWidth'];
|
|
146
|
+
/**
|
|
147
|
+
* Whether to constrain the floating element's height so that it matches the
|
|
148
|
+
* reference element.
|
|
149
|
+
*
|
|
150
|
+
* @default false
|
|
151
|
+
*/
|
|
152
|
+
sameHeight?: AutocompletePositionerProps$1['sameHeight'];
|
|
153
|
+
/**
|
|
154
|
+
* Whether to hide the floating element when the reference element or the
|
|
155
|
+
* floating element is fully clipped.
|
|
156
|
+
*
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
hide?: AutocompletePositionerProps$1['hide'];
|
|
160
|
+
/**
|
|
161
|
+
* Describes the root boundary that the element will be checked for overflow relative to.
|
|
162
|
+
* Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
|
|
163
|
+
*
|
|
164
|
+
* @default 'viewport'
|
|
165
|
+
*/
|
|
166
|
+
rootBoundary?: AutocompletePositionerProps$1['rootBoundary'];
|
|
167
|
+
/**
|
|
168
|
+
* The element that will be used to check for overflow. Please see
|
|
169
|
+
* https://floating-ui.com/docs/detectoverflow#elementcontext for more
|
|
170
|
+
* information.
|
|
171
|
+
*
|
|
172
|
+
* @default 'floating'
|
|
173
|
+
*/
|
|
174
|
+
elementContext?: AutocompletePositionerProps$1['elementContext'];
|
|
175
|
+
/**
|
|
176
|
+
* Whether to check the alternate elementContext's boundary. Please see
|
|
177
|
+
* https://floating-ui.com/docs/detectoverflow#altboundary for more
|
|
178
|
+
* information.
|
|
179
|
+
*
|
|
180
|
+
* @default false
|
|
181
|
+
*/
|
|
182
|
+
altBoundary?: AutocompletePositionerProps$1['altBoundary'];
|
|
183
|
+
}
|
|
43
184
|
/**
|
|
44
|
-
*
|
|
185
|
+
* A Vue component that renders an `prosekit-autocomplete-positioner` custom element.
|
|
186
|
+
*
|
|
187
|
+
* @public
|
|
45
188
|
*/
|
|
46
|
-
|
|
47
|
-
declare const AutocompletePopover: DefineSetupFnComponent<AutocompletePopoverProps & HTMLAttributes, AutocompletePopoverEmits>;
|
|
189
|
+
declare const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes>;
|
|
48
190
|
//#endregion
|
|
49
|
-
|
|
191
|
+
//#region src/components/autocomplete/autocomplete-root.gen.d.ts
|
|
192
|
+
/**
|
|
193
|
+
* Props for the {@link AutocompleteRoot} Vue component.
|
|
194
|
+
*
|
|
195
|
+
* @public
|
|
196
|
+
*/
|
|
197
|
+
interface AutocompleteRootProps {
|
|
198
|
+
/**
|
|
199
|
+
* The ProseKit editor instance.
|
|
200
|
+
*
|
|
201
|
+
* @default null
|
|
202
|
+
* @hidden
|
|
203
|
+
*/
|
|
204
|
+
editor?: AutocompleteRootProps$1['editor'];
|
|
205
|
+
/**
|
|
206
|
+
* The regular expression to match the query text to autocomplete.
|
|
207
|
+
*
|
|
208
|
+
* @default null
|
|
209
|
+
*/
|
|
210
|
+
regex?: AutocompleteRootProps$1['regex'];
|
|
211
|
+
/**
|
|
212
|
+
* The filter function to determine if an item should be shown in the
|
|
213
|
+
* listbox.
|
|
214
|
+
*
|
|
215
|
+
* @default defaultItemFilter
|
|
216
|
+
*/
|
|
217
|
+
filter?: AutocompleteRootProps$1['filter'];
|
|
218
|
+
/** Fired when the open state changes. */
|
|
219
|
+
onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;
|
|
220
|
+
/** Fired when the query changes. */
|
|
221
|
+
onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;
|
|
222
|
+
/**
|
|
223
|
+
* Emitted when the selected value changes. Only available when multiple is
|
|
224
|
+
* false.
|
|
225
|
+
*/
|
|
226
|
+
onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;
|
|
227
|
+
/**
|
|
228
|
+
* Emitted when the selected values change. Only available when multiple is
|
|
229
|
+
* true.
|
|
230
|
+
*/
|
|
231
|
+
onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* A Vue component that renders an `prosekit-autocomplete-root` custom element.
|
|
235
|
+
*
|
|
236
|
+
* @public
|
|
237
|
+
*/
|
|
238
|
+
declare const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes>;
|
|
239
|
+
//#endregion
|
|
240
|
+
export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemEvents, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupEvents, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootEvents, type AutocompleteRootProps, OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent };
|
|
50
241
|
//# sourceMappingURL=prosekit-vue-autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-
|
|
1
|
+
{"version":3,"file":"prosekit-vue-autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;;AAYA;;;;;AAAA,UAAiB,sBAAA;;;;;;cAOJ,iBAAA,EAAmB,sBAAA,CAAuB,sBAAA,GAAyB,cAAA;;;;;;;AAAhF;UCPiB,qBAAA;;;;;;;;EAQf,KAAA,GAAQ,uBAAA;EDDsE;;;;;ECO9E,QAAA,GAAW,uBAAA;EAdI;EAgBf,QAAA,IAAY,KAAA,EAAO,sBAAA;AAAA;;;;;;cAQR,gBAAA,EAAkB,sBAAA,CAAuB,qBAAA,GAAwB,cAAA;;;;;;;ADjB9E;UEPiB,sBAAA;;;;;EA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D;;EGYE,cAAA,IAAkB,KAAA,EAAO,sBAAA;AAAA;;;;;;cAQd,gBAAA,EAAkB,sBAAA,CAAuB,qBAAA,GAAwB,cAAA"}
|
|
@@ -1,17 +1,278 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useEditorContext } from "./editor-context.js";
|
|
2
|
+
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
+
import { OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent, registerAutocompleteEmptyElement, registerAutocompleteItemElement, registerAutocompletePopupElement, registerAutocompletePositionerElement, registerAutocompleteRootElement } from "@prosekit/web/autocomplete";
|
|
3
4
|
//#region src/components/autocomplete/autocomplete-empty.gen.ts
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* A Vue component that renders an `prosekit-autocomplete-empty` custom element.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
const AutocompleteEmpty = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
14
|
+
registerAutocompleteEmptyElement();
|
|
15
|
+
return () => {
|
|
16
|
+
return h("prosekit-autocomplete-empty", props, slots.default?.());
|
|
17
|
+
};
|
|
18
|
+
}, { props: [] });
|
|
5
19
|
//#endregion
|
|
6
20
|
//#region src/components/autocomplete/autocomplete-item.gen.ts
|
|
7
|
-
|
|
21
|
+
/**
|
|
22
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* A Vue component that renders an `prosekit-autocomplete-item` custom element.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
const AutocompleteItem = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
30
|
+
registerAutocompleteItemElement();
|
|
31
|
+
const elementRef = shallowRef(null);
|
|
32
|
+
const splittedProps = computed(() => {
|
|
33
|
+
const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;
|
|
34
|
+
return [[
|
|
35
|
+
p0,
|
|
36
|
+
p1,
|
|
37
|
+
e0
|
|
38
|
+
], restProps];
|
|
39
|
+
});
|
|
40
|
+
const handlers = [];
|
|
41
|
+
watchEffect(() => {
|
|
42
|
+
const element = elementRef.value;
|
|
43
|
+
if (!element) return;
|
|
44
|
+
const [p0, p1, e0] = splittedProps.value[0];
|
|
45
|
+
Object.assign(element, {
|
|
46
|
+
disabled: p0,
|
|
47
|
+
value: p1
|
|
48
|
+
});
|
|
49
|
+
handlers.length = 0;
|
|
50
|
+
handlers.push(e0);
|
|
51
|
+
});
|
|
52
|
+
watchEffect(() => {
|
|
53
|
+
const element = elementRef.value;
|
|
54
|
+
if (!element) return;
|
|
55
|
+
const ac = new AbortController();
|
|
56
|
+
for (const [index, eventName] of ["select"].entries()) element.addEventListener(eventName, (event) => {
|
|
57
|
+
handlers[index]?.(event);
|
|
58
|
+
}, { signal: ac.signal });
|
|
59
|
+
return () => ac.abort();
|
|
60
|
+
});
|
|
61
|
+
return () => {
|
|
62
|
+
const restProps = splittedProps.value[1];
|
|
63
|
+
return h("prosekit-autocomplete-item", {
|
|
64
|
+
...restProps,
|
|
65
|
+
ref: elementRef
|
|
66
|
+
}, slots.default?.());
|
|
67
|
+
};
|
|
68
|
+
}, { props: [
|
|
69
|
+
"disabled",
|
|
70
|
+
"value",
|
|
71
|
+
"onSelect"
|
|
72
|
+
] });
|
|
8
73
|
//#endregion
|
|
9
|
-
//#region src/components/autocomplete/autocomplete-
|
|
10
|
-
|
|
74
|
+
//#region src/components/autocomplete/autocomplete-popup.gen.ts
|
|
75
|
+
/**
|
|
76
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* A Vue component that renders an `prosekit-autocomplete-popup` custom element.
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
const AutocompletePopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
84
|
+
registerAutocompletePopupElement();
|
|
85
|
+
const elementRef = shallowRef(null);
|
|
86
|
+
const splittedProps = computed(() => {
|
|
87
|
+
const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;
|
|
88
|
+
return [[e0, e1], restProps];
|
|
89
|
+
});
|
|
90
|
+
const handlers = [];
|
|
91
|
+
watchEffect(() => {
|
|
92
|
+
if (!elementRef.value) return;
|
|
93
|
+
const [e0, e1] = splittedProps.value[0];
|
|
94
|
+
handlers.length = 0;
|
|
95
|
+
handlers.push(e0);
|
|
96
|
+
handlers.push(e1);
|
|
97
|
+
});
|
|
98
|
+
watchEffect(() => {
|
|
99
|
+
const element = elementRef.value;
|
|
100
|
+
if (!element) return;
|
|
101
|
+
const ac = new AbortController();
|
|
102
|
+
for (const [index, eventName] of ["valueChange", "valuesChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
103
|
+
handlers[index]?.(event);
|
|
104
|
+
}, { signal: ac.signal });
|
|
105
|
+
return () => ac.abort();
|
|
106
|
+
});
|
|
107
|
+
return () => {
|
|
108
|
+
const restProps = splittedProps.value[1];
|
|
109
|
+
return h("prosekit-autocomplete-popup", {
|
|
110
|
+
...restProps,
|
|
111
|
+
ref: elementRef
|
|
112
|
+
}, slots.default?.());
|
|
113
|
+
};
|
|
114
|
+
}, { props: ["onValueChange", "onValuesChange"] });
|
|
11
115
|
//#endregion
|
|
12
|
-
//#region src/components/autocomplete/autocomplete-
|
|
13
|
-
|
|
116
|
+
//#region src/components/autocomplete/autocomplete-positioner.gen.ts
|
|
117
|
+
/**
|
|
118
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
119
|
+
*/
|
|
120
|
+
/**
|
|
121
|
+
* A Vue component that renders an `prosekit-autocomplete-positioner` custom element.
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
const AutocompletePositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
126
|
+
registerAutocompletePositionerElement();
|
|
127
|
+
const elementRef = shallowRef(null);
|
|
128
|
+
const splittedProps = computed(() => {
|
|
129
|
+
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;
|
|
130
|
+
return [[
|
|
131
|
+
p0,
|
|
132
|
+
p1,
|
|
133
|
+
p2,
|
|
134
|
+
p3,
|
|
135
|
+
p4,
|
|
136
|
+
p5,
|
|
137
|
+
p6,
|
|
138
|
+
p7,
|
|
139
|
+
p8,
|
|
140
|
+
p9,
|
|
141
|
+
p10,
|
|
142
|
+
p11,
|
|
143
|
+
p12,
|
|
144
|
+
p13,
|
|
145
|
+
p14,
|
|
146
|
+
p15,
|
|
147
|
+
p16,
|
|
148
|
+
p17
|
|
149
|
+
], restProps];
|
|
150
|
+
});
|
|
151
|
+
watchEffect(() => {
|
|
152
|
+
const element = elementRef.value;
|
|
153
|
+
if (!element) return;
|
|
154
|
+
const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];
|
|
155
|
+
Object.assign(element, {
|
|
156
|
+
altBoundary: p0,
|
|
157
|
+
autoUpdate: p1,
|
|
158
|
+
boundary: p2,
|
|
159
|
+
elementContext: p3,
|
|
160
|
+
fitViewport: p4,
|
|
161
|
+
flip: p5,
|
|
162
|
+
hide: p6,
|
|
163
|
+
hoist: p7,
|
|
164
|
+
inline: p8,
|
|
165
|
+
offset: p9,
|
|
166
|
+
overflowPadding: p10,
|
|
167
|
+
overlap: p11,
|
|
168
|
+
placement: p12,
|
|
169
|
+
rootBoundary: p13,
|
|
170
|
+
sameHeight: p14,
|
|
171
|
+
sameWidth: p15,
|
|
172
|
+
shift: p16,
|
|
173
|
+
strategy: p17
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
return () => {
|
|
177
|
+
const restProps = splittedProps.value[1];
|
|
178
|
+
return h("prosekit-autocomplete-positioner", {
|
|
179
|
+
...restProps,
|
|
180
|
+
ref: elementRef
|
|
181
|
+
}, slots.default?.());
|
|
182
|
+
};
|
|
183
|
+
}, { props: [
|
|
184
|
+
"altBoundary",
|
|
185
|
+
"autoUpdate",
|
|
186
|
+
"boundary",
|
|
187
|
+
"elementContext",
|
|
188
|
+
"fitViewport",
|
|
189
|
+
"flip",
|
|
190
|
+
"hide",
|
|
191
|
+
"hoist",
|
|
192
|
+
"inline",
|
|
193
|
+
"offset",
|
|
194
|
+
"overflowPadding",
|
|
195
|
+
"overlap",
|
|
196
|
+
"placement",
|
|
197
|
+
"rootBoundary",
|
|
198
|
+
"sameHeight",
|
|
199
|
+
"sameWidth",
|
|
200
|
+
"shift",
|
|
201
|
+
"strategy"
|
|
202
|
+
] });
|
|
14
203
|
//#endregion
|
|
15
|
-
|
|
204
|
+
//#region src/components/autocomplete/autocomplete-root.gen.ts
|
|
205
|
+
/**
|
|
206
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* A Vue component that renders an `prosekit-autocomplete-root` custom element.
|
|
210
|
+
*
|
|
211
|
+
* @public
|
|
212
|
+
*/
|
|
213
|
+
const AutocompleteRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
214
|
+
registerAutocompleteRootElement();
|
|
215
|
+
const elementRef = shallowRef(null);
|
|
216
|
+
const p0Fallback = useEditorContext();
|
|
217
|
+
const splittedProps = computed(() => {
|
|
218
|
+
const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;
|
|
219
|
+
return [[
|
|
220
|
+
p0,
|
|
221
|
+
p1,
|
|
222
|
+
p2,
|
|
223
|
+
e0,
|
|
224
|
+
e1,
|
|
225
|
+
e2,
|
|
226
|
+
e3
|
|
227
|
+
], restProps];
|
|
228
|
+
});
|
|
229
|
+
const handlers = [];
|
|
230
|
+
watchEffect(() => {
|
|
231
|
+
const element = elementRef.value;
|
|
232
|
+
if (!element) return;
|
|
233
|
+
const [p0, p1, p2, e0, e1, e2, e3] = splittedProps.value[0];
|
|
234
|
+
Object.assign(element, {
|
|
235
|
+
editor: p0 ?? p0Fallback,
|
|
236
|
+
filter: p1,
|
|
237
|
+
regex: p2
|
|
238
|
+
});
|
|
239
|
+
handlers.length = 0;
|
|
240
|
+
handlers.push(e0);
|
|
241
|
+
handlers.push(e1);
|
|
242
|
+
handlers.push(e2);
|
|
243
|
+
handlers.push(e3);
|
|
244
|
+
});
|
|
245
|
+
watchEffect(() => {
|
|
246
|
+
const element = elementRef.value;
|
|
247
|
+
if (!element) return;
|
|
248
|
+
const ac = new AbortController();
|
|
249
|
+
for (const [index, eventName] of [
|
|
250
|
+
"openChange",
|
|
251
|
+
"queryChange",
|
|
252
|
+
"valueChange",
|
|
253
|
+
"valuesChange"
|
|
254
|
+
].entries()) element.addEventListener(eventName, (event) => {
|
|
255
|
+
handlers[index]?.(event);
|
|
256
|
+
}, { signal: ac.signal });
|
|
257
|
+
return () => ac.abort();
|
|
258
|
+
});
|
|
259
|
+
return () => {
|
|
260
|
+
const restProps = splittedProps.value[1];
|
|
261
|
+
return h("prosekit-autocomplete-root", {
|
|
262
|
+
...restProps,
|
|
263
|
+
ref: elementRef
|
|
264
|
+
}, slots.default?.());
|
|
265
|
+
};
|
|
266
|
+
}, { props: [
|
|
267
|
+
"editor",
|
|
268
|
+
"filter",
|
|
269
|
+
"regex",
|
|
270
|
+
"onOpenChange",
|
|
271
|
+
"onQueryChange",
|
|
272
|
+
"onValueChange",
|
|
273
|
+
"onValuesChange"
|
|
274
|
+
] });
|
|
275
|
+
//#endregion
|
|
276
|
+
export { AutocompleteEmpty, AutocompleteItem, AutocompletePopup, AutocompletePositioner, AutocompleteRoot, OpenChangeEvent, QueryChangeEvent, SelectEvent, ValueChangeEvent, ValuesChangeEvent };
|
|
16
277
|
|
|
17
278
|
//# sourceMappingURL=prosekit-vue-autocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-list.gen.ts","../src/components/autocomplete/autocomplete-popover.gen.ts"],"sourcesContent":["import {\n autocompleteEmptyProps,\n autocompleteEmptyEvents,\n type AutocompleteEmptyProps as Props,\n type AutocompleteEmptyEvents as Events,\n} from '@prosekit/web/autocomplete'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link AutocompleteEmpty} component.\n */\nexport interface AutocompleteEmptyProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link AutocompleteEmpty} component.\n */\nexport interface AutocompleteEmptyEmits extends CreateEmits<Events> {}\n\nexport const AutocompleteEmpty: DefineSetupFnComponent<\n AutocompleteEmptyProps & HTMLAttributes,\n AutocompleteEmptyEmits\n> = createComponent<\n AutocompleteEmptyProps,\n AutocompleteEmptyEmits\n>(\n 'prosekit-autocomplete-empty',\n 'AutocompleteEmpty',\n Object.keys(autocompleteEmptyProps),\n Object.keys(autocompleteEmptyEvents),\n)\n","import {\n autocompleteItemProps,\n autocompleteItemEvents,\n type AutocompleteItemProps as Props,\n type AutocompleteItemEvents as Events,\n} from '@prosekit/web/autocomplete'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link AutocompleteItem} component.\n */\nexport interface AutocompleteItemProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link AutocompleteItem} component.\n */\nexport interface AutocompleteItemEmits extends CreateEmits<Events> {}\n\nexport const AutocompleteItem: DefineSetupFnComponent<\n AutocompleteItemProps & HTMLAttributes,\n AutocompleteItemEmits\n> = createComponent<\n AutocompleteItemProps,\n AutocompleteItemEmits\n>(\n 'prosekit-autocomplete-item',\n 'AutocompleteItem',\n Object.keys(autocompleteItemProps),\n Object.keys(autocompleteItemEvents),\n)\n","import {\n autocompleteListProps,\n autocompleteListEvents,\n type AutocompleteListProps as Props,\n type AutocompleteListEvents as Events,\n} from '@prosekit/web/autocomplete'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link AutocompleteList} component.\n */\nexport interface AutocompleteListProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link AutocompleteList} component.\n */\nexport interface AutocompleteListEmits extends CreateEmits<Events> {}\n\nexport const AutocompleteList: DefineSetupFnComponent<\n AutocompleteListProps & HTMLAttributes,\n AutocompleteListEmits\n> = createComponent<\n AutocompleteListProps,\n AutocompleteListEmits\n>(\n 'prosekit-autocomplete-list',\n 'AutocompleteList',\n Object.keys(autocompleteListProps),\n Object.keys(autocompleteListEvents),\n)\n","import {\n autocompletePopoverProps,\n autocompletePopoverEvents,\n type AutocompletePopoverProps as Props,\n type AutocompletePopoverEvents as Events,\n} from '@prosekit/web/autocomplete'\nimport type { DefineSetupFnComponent, HTMLAttributes } from 'vue'\n\nimport { createComponent } from '../create-component.ts'\nimport type { CreateEmits } from '../create-emits.ts'\n\n/**\n * Props for the {@link AutocompletePopover} component.\n */\nexport interface AutocompletePopoverProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link AutocompletePopover} component.\n */\nexport interface AutocompletePopoverEmits extends CreateEmits<Events> {}\n\nexport const AutocompletePopover: DefineSetupFnComponent<\n AutocompletePopoverProps & HTMLAttributes,\n AutocompletePopoverEmits\n> = createComponent<\n AutocompletePopoverProps,\n AutocompletePopoverEmits\n>(\n 'prosekit-autocomplete-popover',\n 'AutocompletePopover',\n Object.keys(autocompletePopoverProps),\n Object.keys(autocompletePopoverEvents),\n)\n"],"mappings":";;;AAqBA,MAAa,oBAGT,gBAIF,+BACA,qBACA,OAAO,KAAK,uBAAuB,EACnC,OAAO,KAAK,wBAAwB,CACrC;;;ACXD,MAAa,mBAGT,gBAIF,8BACA,oBACA,OAAO,KAAK,sBAAsB,EAClC,OAAO,KAAK,uBAAuB,CACpC;;;ACXD,MAAa,mBAGT,gBAIF,8BACA,oBACA,OAAO,KAAK,sBAAsB,EAClC,OAAO,KAAK,uBAAuB,CACpC;;;ACXD,MAAa,sBAGT,gBAIF,iCACA,uBACA,OAAO,KAAK,yBAAyB,EACrC,OAAO,KAAK,0BAA0B,CACvC"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-autocomplete.js","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompleteEmptyElement } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link AutocompleteEmpty} Vue component.\n *\n * @public\n */\nexport interface AutocompleteEmptyProps {}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-empty` custom element.\n *\n * @public\n */\nexport const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteEmptyProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteEmptyElement();\n\n return () => {\n return h('prosekit-autocomplete-empty', 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 { registerAutocompleteItemElement, type AutocompleteItemEvents, type AutocompleteItemProps as AutocompleteItemElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompleteItem} Vue component.\n *\n * @public\n */\nexport interface AutocompleteItemProps {\n /**\n * The value of the item, which will be matched against the query.\n *\n * If not provided, the value is the item's text content.\n *\n * @default \"\"\n */\n value?: AutocompleteItemElementProps['value'];\n /**\n * Whether this option is disabled.\n *\n * @default false\n */\n disabled?: AutocompleteItemElementProps['disabled'];\n /** Emitted when the the item is selected. */\n onSelect?: (event: AutocompleteItemEvents['select']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-item` custom element.\n *\n * @public\n */\nexport const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteItemProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteItemElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { disabled: p0, value: p1, onSelect: e0, ...restProps } = props;\n return [[p0, p1, 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, e0] = splittedProps.value[0];\n\n Object.assign(element, { disabled: p0, value: p1 });\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-autocomplete-item', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['disabled', 'value', 'onSelect'] },\n);\n\nexport type { AutocompleteItemEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePopupElement, type AutocompletePopupEvents } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePopup} Vue component.\n *\n * @public\n */\nexport interface AutocompletePopupProps {\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompletePopupEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-popup` custom element.\n *\n * @public\n */\nexport const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePopupElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const splittedProps = computed(() => {\n const { onValueChange: e0, onValuesChange: e1, ...restProps } = props;\n return [[e0, e1], 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 [e0, e1] = splittedProps.value[0];\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\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 ['valueChange', 'valuesChange'].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-autocomplete-popup', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['onValueChange', 'onValuesChange'] },\n);\n\nexport type { AutocompletePopupEvents };\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerAutocompletePositionerElement, type AutocompletePositionerProps as AutocompletePositionerElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link AutocompletePositioner} Vue component.\n *\n * @public\n */\nexport interface AutocompletePositionerProps {\n /**\n * The placement of the popover, relative to the text cursor.\n *\n * @default \"bottom-start\"\n */\n placement?: AutocompletePositionerElementProps['placement'];\n /**\n * The distance between the popover and the hovered block.\n *\n * @default 4\n */\n offset?: AutocompletePositionerElementProps['offset'];\n /** @default true */\n inline?: AutocompletePositionerElementProps['inline'];\n /** @default true */\n hoist?: AutocompletePositionerElementProps['hoist'];\n /** @default true */\n fitViewport?: AutocompletePositionerElementProps['fitViewport'];\n /** @default \"The body element\" */\n boundary?: AutocompletePositionerElementProps['boundary'];\n /** @default 8 */\n overflowPadding?: AutocompletePositionerElementProps['overflowPadding'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['autoUpdate'];\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?: AutocompletePositionerElementProps['flip'];\n /**\n * Whether the floating element should shift to keep it in view.\n *\n * @default true\n */\n shift?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['overlap'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['sameHeight'];\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?: AutocompletePositionerElementProps['hide'];\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?: AutocompletePositionerElementProps['rootBoundary'];\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?: AutocompletePositionerElementProps['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?: AutocompletePositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-positioner` custom element.\n *\n * @public\n */\nexport const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompletePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompletePositionerElement();\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-autocomplete-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 { registerAutocompleteRootElement, type AutocompleteRootEvents, type AutocompleteRootProps as AutocompleteRootElementProps } from '@prosekit/web/autocomplete';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\nimport { useEditorContext } from '../../injection/editor-context.ts';\n\n/**\n * Props for the {@link AutocompleteRoot} Vue component.\n *\n * @public\n */\nexport interface AutocompleteRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: AutocompleteRootElementProps['editor'];\n /**\n * The regular expression to match the query text to autocomplete.\n *\n * @default null\n */\n regex?: AutocompleteRootElementProps['regex'];\n /**\n * The filter function to determine if an item should be shown in the\n * listbox.\n *\n * @default defaultItemFilter\n */\n filter?: AutocompleteRootElementProps['filter'];\n /** Fired when the open state changes. */\n onOpenChange?: (event: AutocompleteRootEvents['openChange']) => void;\n /** Fired when the query changes. */\n onQueryChange?: (event: AutocompleteRootEvents['queryChange']) => void;\n /**\n * Emitted when the selected value changes. Only available when multiple is\n * false.\n */\n onValueChange?: (event: AutocompleteRootEvents['valueChange']) => void;\n /**\n * Emitted when the selected values change. Only available when multiple is\n * true.\n */\n onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-autocomplete-root` custom element.\n *\n * @public\n */\nexport const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<AutocompleteRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerAutocompleteRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, filter: p1, regex: p2, onOpenChange: e0, onQueryChange: e1, onValueChange: e2, onValuesChange: e3, ...restProps } = props;\n return [[p0, p1, p2, e0, e1, e2, e3], 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, e1, e2, e3] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback, filter: p1, regex: p2 });\n\n handlers.length = 0;\n handlers.push(e0);\n handlers.push(e1);\n handlers.push(e2);\n handlers.push(e3);\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', 'queryChange', 'valueChange', 'valuesChange'].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-autocomplete-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'filter', 'regex', 'onOpenChange', 'onQueryChange', 'onValueChange', 'onValuesChange'] },\n);\n\nexport type { AutocompleteRootEvents };\n"],"mappings":";;;;;;;;;;;;AAmBA,MAAa,oBAAqG,iCAC/G,OAAO,EAAE,YAAY;AACpB,mCAAkC;AAElC,cAA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