@prosekit/vue 0.7.0-beta.1 → 0.7.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +24 -16
- 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,39 +1,222 @@
|
|
|
1
|
-
import { t as CreateEmits } from "./create-emits.js";
|
|
2
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { BlockHandleAddProps as BlockHandleAddProps$1, BlockHandleDraggableProps as BlockHandleDraggableProps$1, BlockHandlePositionerProps as BlockHandlePositionerProps$1, BlockHandleRootEvents, BlockHandleRootProps as BlockHandleRootProps$1, BlockHandleStateChangeEvent } from "@prosekit/web/block-handle";
|
|
4
3
|
|
|
5
4
|
//#region src/components/block-handle/block-handle-add.gen.d.ts
|
|
6
5
|
/**
|
|
7
|
-
* Props for the {@link BlockHandleAdd} component.
|
|
6
|
+
* Props for the {@link BlockHandleAdd} Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
8
9
|
*/
|
|
9
|
-
interface BlockHandleAddProps
|
|
10
|
+
interface BlockHandleAddProps {
|
|
11
|
+
/**
|
|
12
|
+
* The ProseKit editor instance.
|
|
13
|
+
*
|
|
14
|
+
* @default null
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
editor?: BlockHandleAddProps$1['editor'];
|
|
18
|
+
}
|
|
10
19
|
/**
|
|
11
|
-
*
|
|
20
|
+
* A Vue component that renders an `prosekit-block-handle-add` custom element.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
12
23
|
*/
|
|
13
|
-
|
|
14
|
-
declare const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes, BlockHandleAddEmits>;
|
|
24
|
+
declare const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes>;
|
|
15
25
|
//#endregion
|
|
16
26
|
//#region src/components/block-handle/block-handle-draggable.gen.d.ts
|
|
17
27
|
/**
|
|
18
|
-
* Props for the {@link BlockHandleDraggable} component.
|
|
28
|
+
* Props for the {@link BlockHandleDraggable} Vue component.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
19
31
|
*/
|
|
20
|
-
interface BlockHandleDraggableProps
|
|
32
|
+
interface BlockHandleDraggableProps {
|
|
33
|
+
/**
|
|
34
|
+
* The ProseKit editor instance.
|
|
35
|
+
*
|
|
36
|
+
* @default null
|
|
37
|
+
* @hidden
|
|
38
|
+
*/
|
|
39
|
+
editor?: BlockHandleDraggableProps$1['editor'];
|
|
40
|
+
}
|
|
21
41
|
/**
|
|
22
|
-
*
|
|
42
|
+
* A Vue component that renders an `prosekit-block-handle-draggable` custom element.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
23
45
|
*/
|
|
24
|
-
|
|
25
|
-
declare const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes, BlockHandleDraggableEmits>;
|
|
46
|
+
declare const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes>;
|
|
26
47
|
//#endregion
|
|
27
|
-
//#region src/components/block-handle/block-handle-
|
|
48
|
+
//#region src/components/block-handle/block-handle-popup.gen.d.ts
|
|
28
49
|
/**
|
|
29
|
-
* Props for the {@link
|
|
50
|
+
* Props for the {@link BlockHandlePopup} Vue component.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
30
53
|
*/
|
|
31
|
-
interface
|
|
54
|
+
interface BlockHandlePopupProps {}
|
|
32
55
|
/**
|
|
33
|
-
*
|
|
56
|
+
* A Vue component that renders an `prosekit-block-handle-popup` custom element.
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
34
59
|
*/
|
|
35
|
-
|
|
36
|
-
declare const BlockHandlePopover: DefineSetupFnComponent<BlockHandlePopoverProps & HTMLAttributes, BlockHandlePopoverEmits>;
|
|
60
|
+
declare const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes>;
|
|
37
61
|
//#endregion
|
|
38
|
-
|
|
62
|
+
//#region src/components/block-handle/block-handle-positioner.gen.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* Props for the {@link BlockHandlePositioner} Vue component.
|
|
65
|
+
*
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
interface BlockHandlePositionerProps {
|
|
69
|
+
/**
|
|
70
|
+
* The placement of the popover, relative to the hovered block.
|
|
71
|
+
*
|
|
72
|
+
* @default "left"
|
|
73
|
+
*/
|
|
74
|
+
placement?: BlockHandlePositionerProps$1['placement'];
|
|
75
|
+
/**
|
|
76
|
+
* Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)
|
|
77
|
+
* to place the floating element on top of other page content.
|
|
78
|
+
*
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
hoist?: BlockHandlePositionerProps$1['hoist'];
|
|
82
|
+
/**
|
|
83
|
+
* @default false
|
|
84
|
+
* @hidden
|
|
85
|
+
*/
|
|
86
|
+
flip?: BlockHandlePositionerProps$1['flip'];
|
|
87
|
+
/**
|
|
88
|
+
* @default false
|
|
89
|
+
* @hidden
|
|
90
|
+
*/
|
|
91
|
+
shift?: BlockHandlePositionerProps$1['shift'];
|
|
92
|
+
/**
|
|
93
|
+
* @default true
|
|
94
|
+
* @hidden
|
|
95
|
+
*/
|
|
96
|
+
hide?: BlockHandlePositionerProps$1['hide'];
|
|
97
|
+
/**
|
|
98
|
+
* The strategy to use for positioning
|
|
99
|
+
*
|
|
100
|
+
* @default "absolute"
|
|
101
|
+
*/
|
|
102
|
+
strategy?: BlockHandlePositionerProps$1['strategy'];
|
|
103
|
+
/**
|
|
104
|
+
* Options to activate auto-update listeners
|
|
105
|
+
*
|
|
106
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
107
|
+
*
|
|
108
|
+
* @default true
|
|
109
|
+
*/
|
|
110
|
+
autoUpdate?: BlockHandlePositionerProps$1['autoUpdate'];
|
|
111
|
+
/**
|
|
112
|
+
* The distance between the reference and floating element.
|
|
113
|
+
*
|
|
114
|
+
* @default 6
|
|
115
|
+
*/
|
|
116
|
+
offset?: BlockHandlePositionerProps$1['offset'];
|
|
117
|
+
/**
|
|
118
|
+
* Whether the floating element can overlap the reference element to keep it
|
|
119
|
+
* in view.
|
|
120
|
+
*
|
|
121
|
+
* @default false
|
|
122
|
+
*/
|
|
123
|
+
overlap?: BlockHandlePositionerProps$1['overlap'];
|
|
124
|
+
/**
|
|
125
|
+
* Whether to constrain the floating element's width and height to not exceed
|
|
126
|
+
* the viewport.
|
|
127
|
+
*
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
fitViewport?: BlockHandlePositionerProps$1['fitViewport'];
|
|
131
|
+
/**
|
|
132
|
+
* Whether to constrain the floating element's width so that it matches the
|
|
133
|
+
* reference element.
|
|
134
|
+
*
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
sameWidth?: BlockHandlePositionerProps$1['sameWidth'];
|
|
138
|
+
/**
|
|
139
|
+
* Whether to constrain the floating element's height so that it matches the
|
|
140
|
+
* reference element.
|
|
141
|
+
*
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
sameHeight?: BlockHandlePositionerProps$1['sameHeight'];
|
|
145
|
+
/**
|
|
146
|
+
* Whether to improve positioning for inline reference elements that span over
|
|
147
|
+
* multiple lines.
|
|
148
|
+
*
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
inline?: BlockHandlePositionerProps$1['inline'];
|
|
152
|
+
/**
|
|
153
|
+
* Describes the clipping element(s) or area that overflow will be checked relative to.
|
|
154
|
+
* Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.
|
|
155
|
+
*
|
|
156
|
+
* @default 'clippingAncestors'
|
|
157
|
+
*/
|
|
158
|
+
boundary?: BlockHandlePositionerProps$1['boundary'];
|
|
159
|
+
/**
|
|
160
|
+
* Describes the root boundary that the element will be checked for overflow relative to.
|
|
161
|
+
* Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.
|
|
162
|
+
*
|
|
163
|
+
* @default 'viewport'
|
|
164
|
+
*/
|
|
165
|
+
rootBoundary?: BlockHandlePositionerProps$1['rootBoundary'];
|
|
166
|
+
/**
|
|
167
|
+
* Describes the virtual padding around the boundary to check for overflow.
|
|
168
|
+
* Please see https://floating-ui.com/docs/detectoverflow#padding for more information.
|
|
169
|
+
*
|
|
170
|
+
* @default 4
|
|
171
|
+
*/
|
|
172
|
+
overflowPadding?: BlockHandlePositionerProps$1['overflowPadding'];
|
|
173
|
+
/**
|
|
174
|
+
* The element that will be used to check for overflow. Please see
|
|
175
|
+
* https://floating-ui.com/docs/detectoverflow#elementcontext for more
|
|
176
|
+
* information.
|
|
177
|
+
*
|
|
178
|
+
* @default 'floating'
|
|
179
|
+
*/
|
|
180
|
+
elementContext?: BlockHandlePositionerProps$1['elementContext'];
|
|
181
|
+
/**
|
|
182
|
+
* Whether to check the alternate elementContext's boundary. Please see
|
|
183
|
+
* https://floating-ui.com/docs/detectoverflow#altboundary for more
|
|
184
|
+
* information.
|
|
185
|
+
*
|
|
186
|
+
* @default false
|
|
187
|
+
*/
|
|
188
|
+
altBoundary?: BlockHandlePositionerProps$1['altBoundary'];
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* A Vue component that renders an `prosekit-block-handle-positioner` custom element.
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
*/
|
|
195
|
+
declare const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes>;
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/components/block-handle/block-handle-root.gen.d.ts
|
|
198
|
+
/**
|
|
199
|
+
* Props for the {@link BlockHandleRoot} Vue component.
|
|
200
|
+
*
|
|
201
|
+
* @public
|
|
202
|
+
*/
|
|
203
|
+
interface BlockHandleRootProps {
|
|
204
|
+
/**
|
|
205
|
+
* The ProseKit editor instance.
|
|
206
|
+
*
|
|
207
|
+
* @default null
|
|
208
|
+
* @hidden
|
|
209
|
+
*/
|
|
210
|
+
editor?: BlockHandleRootProps$1['editor'];
|
|
211
|
+
/** Fired when the hovered block changes. */
|
|
212
|
+
onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* A Vue component that renders an `prosekit-block-handle-root` custom element.
|
|
216
|
+
*
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
declare const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes>;
|
|
220
|
+
//#endregion
|
|
221
|
+
export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootEvents, type BlockHandleRootProps, BlockHandleStateChangeEvent };
|
|
39
222
|
//# sourceMappingURL=prosekit-vue-block-handle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-
|
|
1
|
+
{"version":3,"file":"prosekit-vue-block-handle.d.ts","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-root.gen.ts"],"mappings":";;;;;;;;AA6BA;UAfi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AA,EAAO,qBAAA;AAAA;;;;;AHT1B;cGiBa,eAAA,EAAiB,sBAAA,CAAuB,oBAAA,GAAuB,cAAA"}
|
|
@@ -1,14 +1,218 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useEditorContext } from "./editor-context.js";
|
|
2
|
+
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
+
import { BlockHandleStateChangeEvent, registerBlockHandleAddElement, registerBlockHandleDraggableElement, registerBlockHandlePopupElement, registerBlockHandlePositionerElement, registerBlockHandleRootElement } from "@prosekit/web/block-handle";
|
|
3
4
|
//#region src/components/block-handle/block-handle-add.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-block-handle-add` custom element.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
const BlockHandleAdd = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
14
|
+
registerBlockHandleAddElement();
|
|
15
|
+
const elementRef = shallowRef(null);
|
|
16
|
+
const p0Fallback = useEditorContext();
|
|
17
|
+
const splittedProps = computed(() => {
|
|
18
|
+
const { editor: p0, ...restProps } = props;
|
|
19
|
+
return [[p0], restProps];
|
|
20
|
+
});
|
|
21
|
+
watchEffect(() => {
|
|
22
|
+
const element = elementRef.value;
|
|
23
|
+
if (!element) return;
|
|
24
|
+
const [p0] = splittedProps.value[0];
|
|
25
|
+
Object.assign(element, { editor: p0 ?? p0Fallback });
|
|
26
|
+
});
|
|
27
|
+
return () => {
|
|
28
|
+
const restProps = splittedProps.value[1];
|
|
29
|
+
return h("prosekit-block-handle-add", {
|
|
30
|
+
...restProps,
|
|
31
|
+
ref: elementRef
|
|
32
|
+
}, slots.default?.());
|
|
33
|
+
};
|
|
34
|
+
}, { props: ["editor"] });
|
|
5
35
|
//#endregion
|
|
6
36
|
//#region src/components/block-handle/block-handle-draggable.gen.ts
|
|
7
|
-
|
|
37
|
+
/**
|
|
38
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* A Vue component that renders an `prosekit-block-handle-draggable` custom element.
|
|
42
|
+
*
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
const BlockHandleDraggable = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
46
|
+
registerBlockHandleDraggableElement();
|
|
47
|
+
const elementRef = shallowRef(null);
|
|
48
|
+
const p0Fallback = useEditorContext();
|
|
49
|
+
const splittedProps = computed(() => {
|
|
50
|
+
const { editor: p0, ...restProps } = props;
|
|
51
|
+
return [[p0], restProps];
|
|
52
|
+
});
|
|
53
|
+
watchEffect(() => {
|
|
54
|
+
const element = elementRef.value;
|
|
55
|
+
if (!element) return;
|
|
56
|
+
const [p0] = splittedProps.value[0];
|
|
57
|
+
Object.assign(element, { editor: p0 ?? p0Fallback });
|
|
58
|
+
});
|
|
59
|
+
return () => {
|
|
60
|
+
const restProps = splittedProps.value[1];
|
|
61
|
+
return h("prosekit-block-handle-draggable", {
|
|
62
|
+
...restProps,
|
|
63
|
+
ref: elementRef
|
|
64
|
+
}, slots.default?.());
|
|
65
|
+
};
|
|
66
|
+
}, { props: ["editor"] });
|
|
8
67
|
//#endregion
|
|
9
|
-
//#region src/components/block-handle/block-handle-
|
|
10
|
-
|
|
68
|
+
//#region src/components/block-handle/block-handle-popup.gen.ts
|
|
69
|
+
/**
|
|
70
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
71
|
+
*/
|
|
72
|
+
/**
|
|
73
|
+
* A Vue component that renders an `prosekit-block-handle-popup` custom element.
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
const BlockHandlePopup = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
78
|
+
registerBlockHandlePopupElement();
|
|
79
|
+
return () => {
|
|
80
|
+
return h("prosekit-block-handle-popup", props, slots.default?.());
|
|
81
|
+
};
|
|
82
|
+
}, { props: [] });
|
|
11
83
|
//#endregion
|
|
12
|
-
|
|
84
|
+
//#region src/components/block-handle/block-handle-positioner.gen.ts
|
|
85
|
+
/**
|
|
86
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* A Vue component that renders an `prosekit-block-handle-positioner` custom element.
|
|
90
|
+
*
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
const BlockHandlePositioner = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
94
|
+
registerBlockHandlePositionerElement();
|
|
95
|
+
const elementRef = shallowRef(null);
|
|
96
|
+
const splittedProps = computed(() => {
|
|
97
|
+
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;
|
|
98
|
+
return [[
|
|
99
|
+
p0,
|
|
100
|
+
p1,
|
|
101
|
+
p2,
|
|
102
|
+
p3,
|
|
103
|
+
p4,
|
|
104
|
+
p5,
|
|
105
|
+
p6,
|
|
106
|
+
p7,
|
|
107
|
+
p8,
|
|
108
|
+
p9,
|
|
109
|
+
p10,
|
|
110
|
+
p11,
|
|
111
|
+
p12,
|
|
112
|
+
p13,
|
|
113
|
+
p14,
|
|
114
|
+
p15,
|
|
115
|
+
p16,
|
|
116
|
+
p17
|
|
117
|
+
], restProps];
|
|
118
|
+
});
|
|
119
|
+
watchEffect(() => {
|
|
120
|
+
const element = elementRef.value;
|
|
121
|
+
if (!element) return;
|
|
122
|
+
const [p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17] = splittedProps.value[0];
|
|
123
|
+
Object.assign(element, {
|
|
124
|
+
altBoundary: p0,
|
|
125
|
+
autoUpdate: p1,
|
|
126
|
+
boundary: p2,
|
|
127
|
+
elementContext: p3,
|
|
128
|
+
fitViewport: p4,
|
|
129
|
+
flip: p5,
|
|
130
|
+
hide: p6,
|
|
131
|
+
hoist: p7,
|
|
132
|
+
inline: p8,
|
|
133
|
+
offset: p9,
|
|
134
|
+
overflowPadding: p10,
|
|
135
|
+
overlap: p11,
|
|
136
|
+
placement: p12,
|
|
137
|
+
rootBoundary: p13,
|
|
138
|
+
sameHeight: p14,
|
|
139
|
+
sameWidth: p15,
|
|
140
|
+
shift: p16,
|
|
141
|
+
strategy: p17
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
return () => {
|
|
145
|
+
const restProps = splittedProps.value[1];
|
|
146
|
+
return h("prosekit-block-handle-positioner", {
|
|
147
|
+
...restProps,
|
|
148
|
+
ref: elementRef
|
|
149
|
+
}, slots.default?.());
|
|
150
|
+
};
|
|
151
|
+
}, { props: [
|
|
152
|
+
"altBoundary",
|
|
153
|
+
"autoUpdate",
|
|
154
|
+
"boundary",
|
|
155
|
+
"elementContext",
|
|
156
|
+
"fitViewport",
|
|
157
|
+
"flip",
|
|
158
|
+
"hide",
|
|
159
|
+
"hoist",
|
|
160
|
+
"inline",
|
|
161
|
+
"offset",
|
|
162
|
+
"overflowPadding",
|
|
163
|
+
"overlap",
|
|
164
|
+
"placement",
|
|
165
|
+
"rootBoundary",
|
|
166
|
+
"sameHeight",
|
|
167
|
+
"sameWidth",
|
|
168
|
+
"shift",
|
|
169
|
+
"strategy"
|
|
170
|
+
] });
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/components/block-handle/block-handle-root.gen.ts
|
|
173
|
+
/**
|
|
174
|
+
* This file is auto-generated by the "@aria-ui/cli" tool. Do not edit this file directly.
|
|
175
|
+
*/
|
|
176
|
+
/**
|
|
177
|
+
* A Vue component that renders an `prosekit-block-handle-root` custom element.
|
|
178
|
+
*
|
|
179
|
+
* @public
|
|
180
|
+
*/
|
|
181
|
+
const BlockHandleRoot = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
182
|
+
registerBlockHandleRootElement();
|
|
183
|
+
const elementRef = shallowRef(null);
|
|
184
|
+
const p0Fallback = useEditorContext();
|
|
185
|
+
const splittedProps = computed(() => {
|
|
186
|
+
const { editor: p0, onStateChange: e0, ...restProps } = props;
|
|
187
|
+
return [[p0, e0], restProps];
|
|
188
|
+
});
|
|
189
|
+
const handlers = [];
|
|
190
|
+
watchEffect(() => {
|
|
191
|
+
const element = elementRef.value;
|
|
192
|
+
if (!element) return;
|
|
193
|
+
const [p0, e0] = splittedProps.value[0];
|
|
194
|
+
Object.assign(element, { editor: p0 ?? p0Fallback });
|
|
195
|
+
handlers.length = 0;
|
|
196
|
+
handlers.push(e0);
|
|
197
|
+
});
|
|
198
|
+
watchEffect(() => {
|
|
199
|
+
const element = elementRef.value;
|
|
200
|
+
if (!element) return;
|
|
201
|
+
const ac = new AbortController();
|
|
202
|
+
for (const [index, eventName] of ["stateChange"].entries()) element.addEventListener(eventName, (event) => {
|
|
203
|
+
handlers[index]?.(event);
|
|
204
|
+
}, { signal: ac.signal });
|
|
205
|
+
return () => ac.abort();
|
|
206
|
+
});
|
|
207
|
+
return () => {
|
|
208
|
+
const restProps = splittedProps.value[1];
|
|
209
|
+
return h("prosekit-block-handle-root", {
|
|
210
|
+
...restProps,
|
|
211
|
+
ref: elementRef
|
|
212
|
+
}, slots.default?.());
|
|
213
|
+
};
|
|
214
|
+
}, { props: ["editor", "onStateChange"] });
|
|
215
|
+
//#endregion
|
|
216
|
+
export { BlockHandleAdd, BlockHandleDraggable, BlockHandlePopup, BlockHandlePositioner, BlockHandleRoot, BlockHandleStateChangeEvent };
|
|
13
217
|
|
|
14
218
|
//# sourceMappingURL=prosekit-vue-block-handle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popover.gen.ts"],"sourcesContent":["import {\n blockHandleAddProps,\n blockHandleAddEvents,\n type BlockHandleAddProps as Props,\n type BlockHandleAddEvents as Events,\n} from '@prosekit/web/block-handle'\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 BlockHandleAdd} component.\n */\nexport interface BlockHandleAddProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link BlockHandleAdd} component.\n */\nexport interface BlockHandleAddEmits extends CreateEmits<Events> {}\n\nexport const BlockHandleAdd: DefineSetupFnComponent<\n BlockHandleAddProps & HTMLAttributes,\n BlockHandleAddEmits\n> = createComponent<\n BlockHandleAddProps,\n BlockHandleAddEmits\n>(\n 'prosekit-block-handle-add',\n 'BlockHandleAdd',\n Object.keys(blockHandleAddProps),\n Object.keys(blockHandleAddEvents),\n)\n","import {\n blockHandleDraggableProps,\n blockHandleDraggableEvents,\n type BlockHandleDraggableProps as Props,\n type BlockHandleDraggableEvents as Events,\n} from '@prosekit/web/block-handle'\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 BlockHandleDraggable} component.\n */\nexport interface BlockHandleDraggableProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link BlockHandleDraggable} component.\n */\nexport interface BlockHandleDraggableEmits extends CreateEmits<Events> {}\n\nexport const BlockHandleDraggable: DefineSetupFnComponent<\n BlockHandleDraggableProps & HTMLAttributes,\n BlockHandleDraggableEmits\n> = createComponent<\n BlockHandleDraggableProps,\n BlockHandleDraggableEmits\n>(\n 'prosekit-block-handle-draggable',\n 'BlockHandleDraggable',\n Object.keys(blockHandleDraggableProps),\n Object.keys(blockHandleDraggableEvents),\n)\n","import {\n blockHandlePopoverProps,\n blockHandlePopoverEvents,\n type BlockHandlePopoverProps as Props,\n type BlockHandlePopoverEvents as Events,\n} from '@prosekit/web/block-handle'\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 BlockHandlePopover} component.\n */\nexport interface BlockHandlePopoverProps extends Partial<Props> {}\n\n/**\n * Emits for the {@link BlockHandlePopover} component.\n */\nexport interface BlockHandlePopoverEmits extends CreateEmits<Events> {}\n\nexport const BlockHandlePopover: DefineSetupFnComponent<\n BlockHandlePopoverProps & HTMLAttributes,\n BlockHandlePopoverEmits\n> = createComponent<\n BlockHandlePopoverProps,\n BlockHandlePopoverEmits\n>(\n 'prosekit-block-handle-popover',\n 'BlockHandlePopover',\n Object.keys(blockHandlePopoverProps),\n Object.keys(blockHandlePopoverEvents),\n)\n"],"mappings":";;;AAqBA,MAAa,iBAGT,gBAIF,6BACA,kBACA,OAAO,KAAK,oBAAoB,EAChC,OAAO,KAAK,qBAAqB,CAClC;;;ACXD,MAAa,uBAGT,gBAIF,mCACA,wBACA,OAAO,KAAK,0BAA0B,EACtC,OAAO,KAAK,2BAA2B,CACxC;;;ACXD,MAAa,qBAGT,gBAIF,iCACA,sBACA,OAAO,KAAK,wBAAwB,EACpC,OAAO,KAAK,yBAAyB,CACtC"}
|
|
1
|
+
{"version":3,"file":"prosekit-vue-block-handle.js","names":[],"sources":["../src/components/block-handle/block-handle-add.gen.ts","../src/components/block-handle/block-handle-draggable.gen.ts","../src/components/block-handle/block-handle-popup.gen.ts","../src/components/block-handle/block-handle-positioner.gen.ts","../src/components/block-handle/block-handle-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 { registerBlockHandleAddElement, type BlockHandleAddProps as BlockHandleAddElementProps } from '@prosekit/web/block-handle';\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 BlockHandleAdd} Vue component.\n *\n * @public\n */\nexport interface BlockHandleAddProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleAddElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-add` custom element.\n *\n * @public\n */\nexport const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleAddProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleAddElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-add', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandleDraggableElement, type BlockHandleDraggableProps as BlockHandleDraggableElementProps } from '@prosekit/web/block-handle';\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 BlockHandleDraggable} Vue component.\n *\n * @public\n */\nexport interface BlockHandleDraggableProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleDraggableElementProps['editor'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-draggable` custom element.\n *\n * @public\n */\nexport const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleDraggableProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleDraggableElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, ...restProps } = props;\n return [[p0], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-block-handle-draggable', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor'] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePopupElement } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePopup} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePopupProps {}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-popup` custom element.\n *\n * @public\n */\nexport const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePopupProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePopupElement();\n\n return () => {\n return h('prosekit-block-handle-popup', props, slots.default?.());\n };\n },\n { props: [] },\n);\n","/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerBlockHandlePositionerElement, type BlockHandlePositionerProps as BlockHandlePositionerElementProps } from '@prosekit/web/block-handle';\nimport { defineComponent, h, type DefineSetupFnComponent, type HTMLAttributes, shallowRef, computed, watchEffect } from 'vue';\n\n/**\n * Props for the {@link BlockHandlePositioner} Vue component.\n *\n * @public\n */\nexport interface BlockHandlePositionerProps {\n /**\n * The placement of the popover, relative to the hovered block.\n *\n * @default \"left\"\n */\n placement?: BlockHandlePositionerElementProps['placement'];\n /**\n * Whether to use the browser [Popover API](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API)\n * to place the floating element on top of other page content.\n *\n * @default false\n */\n hoist?: BlockHandlePositionerElementProps['hoist'];\n /**\n * @default false\n * @hidden\n */\n flip?: BlockHandlePositionerElementProps['flip'];\n /**\n * @default false\n * @hidden\n */\n shift?: BlockHandlePositionerElementProps['shift'];\n /**\n * @default true\n * @hidden\n */\n hide?: BlockHandlePositionerElementProps['hide'];\n /**\n * The strategy to use for positioning\n *\n * @default \"absolute\"\n */\n strategy?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['autoUpdate'];\n /**\n * The distance between the reference and floating element.\n *\n * @default 6\n */\n offset?: BlockHandlePositionerElementProps['offset'];\n /**\n * Whether the floating element can overlap the reference element to keep it\n * in view.\n *\n * @default false\n */\n overlap?: BlockHandlePositionerElementProps['overlap'];\n /**\n * Whether to constrain the floating element's width and height to not exceed\n * the viewport.\n *\n * @default false\n */\n fitViewport?: BlockHandlePositionerElementProps['fitViewport'];\n /**\n * Whether to constrain the floating element's width so that it matches the\n * reference element.\n *\n * @default false\n */\n sameWidth?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['sameHeight'];\n /**\n * Whether to improve positioning for inline reference elements that span over\n * multiple lines.\n *\n * @default false\n */\n inline?: BlockHandlePositionerElementProps['inline'];\n /**\n * Describes the clipping element(s) or area that overflow will be checked relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#boundary for more information.\n *\n * @default 'clippingAncestors'\n */\n boundary?: BlockHandlePositionerElementProps['boundary'];\n /**\n * Describes the root boundary that the element will be checked for overflow relative to.\n * Please see https://floating-ui.com/docs/detectoverflow#rootboundary for more information.\n *\n * @default 'viewport'\n */\n rootBoundary?: BlockHandlePositionerElementProps['rootBoundary'];\n /**\n * Describes the virtual padding around the boundary to check for overflow.\n * Please see https://floating-ui.com/docs/detectoverflow#padding for more information.\n *\n * @default 4\n */\n overflowPadding?: BlockHandlePositionerElementProps['overflowPadding'];\n /**\n * The element that will be used to check for overflow. Please see\n * https://floating-ui.com/docs/detectoverflow#elementcontext for more\n * information.\n *\n * @default 'floating'\n */\n elementContext?: BlockHandlePositionerElementProps['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?: BlockHandlePositionerElementProps['altBoundary'];\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-positioner` custom element.\n *\n * @public\n */\nexport const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandlePositionerProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandlePositionerElement();\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-block-handle-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 { registerBlockHandleRootElement, type BlockHandleRootEvents, type BlockHandleRootProps as BlockHandleRootElementProps } from '@prosekit/web/block-handle';\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 BlockHandleRoot} Vue component.\n *\n * @public\n */\nexport interface BlockHandleRootProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: BlockHandleRootElementProps['editor'];\n /** Fired when the hovered block changes. */\n onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;\n}\n\n/**\n * A Vue component that renders an `prosekit-block-handle-root` custom element.\n *\n * @public\n */\nexport const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<BlockHandleRootProps & HTMLAttributes>(\n (props, { slots }) => {\n registerBlockHandleRootElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, onStateChange: e0, ...restProps } = props;\n return [[p0, e0], restProps] as const;\n });\n\n const handlers: Array<((event: any) => void) | undefined> = [];\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, e0] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback });\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 ['stateChange'].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-block-handle-root', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'onStateChange'] },\n);\n\nexport type { BlockHandleRootEvents };\n"],"mappings":";;;;;;;;;;;;AA6BA,MAAa,iBAA+F,iCACzG,OAAO,EAAE,YAAY;AACpB,gCAA+B;CAE/B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AACrC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,MAAM,cAAc,MAAM;AAEjC,SAAO,OAAO,SAAS,EAAE,QAAQ,MAAM,YAAY,CAAC;GACpD;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,6BAA6B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG/F,EAAE,OAAO,CAAC,SAAS,EAAE,CACtB;;;;;;;;;;;AC5BD,MAAa,uBAA2G,iCACrH,OAAO,EAAE,YAAY;AACpB,sCAAqC;CAErC,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,GAAG,cAAc;AACrC,SAAO,CAAC,CAAC,GAAG,EAAE,UAAU;GACxB;AAEF,mBAAkB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iB;AAChB,YAAS,SAAS,MAAM;KAE1B,EAAE,QAAQ,GAAG,QAAQ,CACtB;AAEH,eAAa,GAAG,OAAO;GACvB;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,8BAA8B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAGhG,EAAE,OAAO,CAAC,UAAU,gBAAgB,EAAE,CACvC"}
|
|
@@ -1,17 +1,33 @@
|
|
|
1
|
-
import { t as CreateEmits } from "./create-emits.js";
|
|
2
1
|
import { DefineSetupFnComponent, HTMLAttributes } from "vue";
|
|
3
|
-
import {
|
|
2
|
+
import { DropIndicatorProps as DropIndicatorProps$1 } from "@prosekit/web/drop-indicator";
|
|
4
3
|
|
|
5
4
|
//#region src/components/drop-indicator/drop-indicator.gen.d.ts
|
|
6
5
|
/**
|
|
7
|
-
* Props for the {@link DropIndicator} component.
|
|
6
|
+
* Props for the {@link DropIndicator} Vue component.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
8
9
|
*/
|
|
9
|
-
interface DropIndicatorProps
|
|
10
|
+
interface DropIndicatorProps {
|
|
11
|
+
/**
|
|
12
|
+
* The ProseKit editor instance.
|
|
13
|
+
*
|
|
14
|
+
* @default null
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
editor?: DropIndicatorProps$1['editor'];
|
|
18
|
+
/**
|
|
19
|
+
* The line width in pixels.
|
|
20
|
+
*
|
|
21
|
+
* @default 2
|
|
22
|
+
*/
|
|
23
|
+
width?: DropIndicatorProps$1['width'];
|
|
24
|
+
}
|
|
10
25
|
/**
|
|
11
|
-
*
|
|
26
|
+
* A Vue component that renders an `prosekit-drop-indicator` custom element.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
12
29
|
*/
|
|
13
|
-
|
|
14
|
-
declare const DropIndicator: DefineSetupFnComponent<DropIndicatorProps & HTMLAttributes, DropIndicatorEmits>;
|
|
30
|
+
declare const DropIndicator: DefineSetupFnComponent<DropIndicatorProps & HTMLAttributes>;
|
|
15
31
|
//#endregion
|
|
16
|
-
export { DropIndicator, type
|
|
32
|
+
export { DropIndicator, type DropIndicatorProps };
|
|
17
33
|
//# sourceMappingURL=prosekit-vue-drop-indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"prosekit-vue-drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;;;;;;;UAciB,kBAAA;EAaP;;;AAQV;;;EAdE,MAAA,GAAS,oBAAA;EAc6D;;;;;EARtE,KAAA,GAAQ,oBAAA;AAAA;;;;;;cAQG,aAAA,EAAe,sBAAA,CAAuB,kBAAA,GAAqB,cAAA"}
|
|
@@ -1,7 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as useEditorContext } from "./editor-context.js";
|
|
2
|
+
import { computed, defineComponent, h, shallowRef, watchEffect } from "vue";
|
|
3
|
+
import { registerDropIndicatorElement } from "@prosekit/web/drop-indicator";
|
|
3
4
|
//#region src/components/drop-indicator/drop-indicator.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-drop-indicator` custom element.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
const DropIndicator = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
14
|
+
registerDropIndicatorElement();
|
|
15
|
+
const elementRef = shallowRef(null);
|
|
16
|
+
const p0Fallback = useEditorContext();
|
|
17
|
+
const splittedProps = computed(() => {
|
|
18
|
+
const { editor: p0, width: p1, ...restProps } = props;
|
|
19
|
+
return [[p0, p1], restProps];
|
|
20
|
+
});
|
|
21
|
+
watchEffect(() => {
|
|
22
|
+
const element = elementRef.value;
|
|
23
|
+
if (!element) return;
|
|
24
|
+
const [p0, p1] = splittedProps.value[0];
|
|
25
|
+
Object.assign(element, {
|
|
26
|
+
editor: p0 ?? p0Fallback,
|
|
27
|
+
width: p1
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
return () => {
|
|
31
|
+
const restProps = splittedProps.value[1];
|
|
32
|
+
return h("prosekit-drop-indicator", {
|
|
33
|
+
...restProps,
|
|
34
|
+
ref: elementRef
|
|
35
|
+
}, slots.default?.());
|
|
36
|
+
};
|
|
37
|
+
}, { props: ["editor", "width"] });
|
|
5
38
|
//#endregion
|
|
6
39
|
export { DropIndicator };
|
|
7
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prosekit-vue-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"prosekit-vue-drop-indicator.js","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"sourcesContent":["/**\n * This file is auto-generated by the \"@aria-ui/cli\" tool. Do not edit this file directly.\n */\n\nimport { registerDropIndicatorElement, type DropIndicatorProps as DropIndicatorElementProps } from '@prosekit/web/drop-indicator';\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 DropIndicator} Vue component.\n *\n * @public\n */\nexport interface DropIndicatorProps {\n /**\n * The ProseKit editor instance.\n *\n * @default null\n * @hidden\n */\n editor?: DropIndicatorElementProps['editor'];\n /**\n * The line width in pixels.\n *\n * @default 2\n */\n width?: DropIndicatorElementProps['width'];\n}\n\n/**\n * A Vue component that renders an `prosekit-drop-indicator` custom element.\n *\n * @public\n */\nexport const DropIndicator: DefineSetupFnComponent<DropIndicatorProps & HTMLAttributes> = /* @__PURE__ */ defineComponent<DropIndicatorProps & HTMLAttributes>(\n (props, { slots }) => {\n registerDropIndicatorElement();\n\n const elementRef = shallowRef<HTMLElement | null>(null);\n\n const p0Fallback = useEditorContext();\n\n const splittedProps = computed(() => {\n const { editor: p0, width: p1, ...restProps } = props;\n return [[p0, p1], restProps] as const;\n });\n\n watchEffect(() => {\n const element = elementRef.value;\n if (!element) return;\n\n const [p0, p1] = splittedProps.value[0];\n\n Object.assign(element, { editor: p0 ?? p0Fallback, width: p1 });\n });\n\n return () => {\n const restProps = splittedProps.value[1];\n return h('prosekit-drop-indicator', { ...restProps, ref: elementRef }, slots.default?.());\n };\n },\n { props: ['editor', 'width'] },\n);\n"],"mappings":";;;;;;;;;;;;AAmCA,MAAa,gBAA6F,iCACvG,OAAO,EAAE,YAAY;AACpB,+BAA8B;CAE9B,MAAM,aAAa,WAA+B,KAAK;CAEvD,MAAM,aAAa,kBAAkB;CAErC,MAAM,gBAAgB,eAAe;EACnC,MAAM,EAAE,QAAQ,IAAI,OAAO,IAAI,GAAG,cAAc;AAChD,SAAO,CAAC,CAAC,IAAI,GAAG,EAAE,UAAU;GAC5B;AAEF,mBAAkB;EAChB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;EAEd,MAAM,CAAC,IAAI,MAAM,cAAc,MAAM;AAErC,SAAO,OAAO,SAAS;GAAE,QAAQ,MAAM;GAAY,OAAO;GAAI,CAAC;GAC/D;AAEF,cAAa;EACX,MAAM,YAAY,cAAc,MAAM;AACtC,SAAO,EAAE,2BAA2B;GAAE,GAAG;GAAW,KAAK;GAAY,EAAE,MAAM,WAAW,CAAC;;GAG7F,EAAE,OAAO,CAAC,UAAU,QAAQ,EAAE,CAC/B"}
|