@prosekit/vue 0.0.0-next-20231120040948 → 0.0.0-next-20240421132240

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +298 -101
  2. package/dist/chunk-64DHEPDA.js +37 -0
  3. package/dist/chunk-X5DTEZPX.js +15 -0
  4. package/dist/prosekit-vue-autocomplete.d.ts +4 -0
  5. package/dist/prosekit-vue-autocomplete.js +26 -0
  6. package/dist/prosekit-vue-block-handle.d.ts +2 -0
  7. package/dist/prosekit-vue-block-handle.js +16 -0
  8. package/dist/prosekit-vue-inline-popover.d.ts +1 -3
  9. package/dist/prosekit-vue-inline-popover.js +8 -16
  10. package/dist/prosekit-vue-popover.d.ts +3 -2
  11. package/dist/prosekit-vue-popover.js +19 -17
  12. package/dist/prosekit-vue-resizable.d.ts +2 -0
  13. package/dist/prosekit-vue-resizable.js +16 -0
  14. package/dist/prosekit-vue-tooltip.d.ts +3 -0
  15. package/dist/prosekit-vue-tooltip.js +21 -0
  16. package/dist/prosekit-vue.d.ts +9 -1
  17. package/dist/prosekit-vue.js +292 -40
  18. package/package.json +37 -67
  19. package/dist/prosekit-vue-autocomplete-empty.d.ts +0 -2
  20. package/dist/prosekit-vue-autocomplete-empty.js +0 -19
  21. package/dist/prosekit-vue-autocomplete-item.d.ts +0 -2
  22. package/dist/prosekit-vue-autocomplete-item.js +0 -19
  23. package/dist/prosekit-vue-autocomplete-list.d.ts +0 -2
  24. package/dist/prosekit-vue-autocomplete-list.js +0 -19
  25. package/dist/prosekit-vue-autocomplete-popover.d.ts +0 -3
  26. package/dist/prosekit-vue-autocomplete-popover.js +0 -19
  27. package/dist/prosekit-vue-combo-box-input.d.ts +0 -2
  28. package/dist/prosekit-vue-combo-box-input.js +0 -19
  29. package/dist/prosekit-vue-combo-box-item.d.ts +0 -2
  30. package/dist/prosekit-vue-combo-box-item.js +0 -19
  31. package/dist/prosekit-vue-combo-box-list.d.ts +0 -2
  32. package/dist/prosekit-vue-combo-box-list.js +0 -19
  33. package/dist/prosekit-vue-combo-box.d.ts +0 -2
  34. package/dist/prosekit-vue-combo-box.js +0 -19
  35. package/src/index.ts +0 -3
@@ -1,134 +1,157 @@
1
- import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/lit/autocomplete-empty';
2
- import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/lit/autocomplete-item';
3
- import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/lit/autocomplete-list';
4
- import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/lit/autocomplete-popover';
5
- import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
6
- import { ComboBoxItemProps as ComboBoxItemProps_2 } from '@prosekit/lit/combo-box-item';
7
- import { ComboBoxListProps as ComboBoxListProps_2 } from '@prosekit/lit/combo-box-list';
8
- import { ComboBoxProps as ComboBoxProps_2 } from '@prosekit/lit/combo-box';
1
+ import type { Attrs } from '@prosekit/pm/model';
2
+ import { AutocompleteEmptyProps } from '@prosekit/web/autocomplete';
3
+ import { AutocompleteItemProps } from '@prosekit/web/autocomplete';
4
+ import { AutocompleteListProps } from '@prosekit/web/autocomplete';
5
+ import { AutocompletePopoverProps } from '@prosekit/web/autocomplete';
6
+ import { BaseNodeViewOptions } from '@prosekit/core';
7
+ import { BlockDragHandleProps } from '@prosekit/web/block-handle';
8
+ import { BlockPopoverProps } from '@prosekit/web/block-handle';
9
+ import { CommandArgs } from '@prosekit/core';
10
+ import { ComponentOptionsMixin } from 'vue';
11
+ import { ComputedRef } from 'vue';
12
+ import { CoreNodeView } from '@prosemirror-adapter/core';
13
+ import type { CoreNodeViewSpec } from '@prosemirror-adapter/core';
14
+ import type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core';
15
+ import type { Decoration } from '@prosekit/pm/view';
16
+ import type { DecorationSource } from '@prosekit/pm/view';
17
+ import { DefineComponent } from 'vue';
18
+ import { DefineSetupFnComponent } from 'vue';
9
19
  import { Editor } from '@prosekit/core';
20
+ import type { EditorState } from '@prosekit/pm/state';
21
+ import type { EditorView } from '@prosekit/pm/view';
10
22
  import { Extension } from '@prosekit/core';
11
- import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/lit/inline-popover';
23
+ import { ExtensionTyping } from '@prosekit/core';
24
+ import { ExtractPropTypes } from 'vue';
25
+ import type { InjectionKey } from 'vue';
26
+ import { InlinePopoverProps } from '@prosekit/web/inline-popover';
12
27
  import { Keymap } from '@prosekit/core';
28
+ import { MaybeRefOrGetter } from 'vue';
29
+ import type { Node as Node_2 } from '@prosekit/pm/model';
30
+ import type { NodeViewConstructor } from '@prosekit/pm/view';
13
31
  import { Options } from 'tsup';
14
- import { PopoverOptions } from '@prosekit/lit/autocomplete-popover';
15
- import { PopoverOptions as PopoverOptions_alias_1 } from '@prosekit/lit/inline-popover';
16
- import { PopoverProps as PopoverProps_2 } from '@prosekit/lit/popover';
17
- import { Ref } from 'vue';
32
+ import { PopoverContentProps } from '@prosekit/web/popover';
33
+ import { PopoverRootProps } from '@prosekit/web/popover';
34
+ import { PopoverTriggerProps } from '@prosekit/web/popover';
35
+ import { Priority } from '@prosekit/core';
36
+ import type { ProseMirrorNode } from '@prosekit/pm/model';
37
+ import { PublicProps } from 'vue';
38
+ import type { Ref } from 'vue';
39
+ import { RendererElement } from 'vue';
40
+ import { RendererNode } from 'vue';
41
+ import { ResizableHandleProps } from '@prosekit/web/resizable';
42
+ import { ResizableRootProps } from '@prosekit/web/resizable';
18
43
  import { ShallowRef } from 'vue';
19
- import { UserProjectConfigExport } from 'vitest/dist/config.js';
20
-
21
- declare const AutocompleteEmpty: (props: {
22
- class?: string | undefined;
23
- } & AutocompleteEmptyProps_2 & {}) => any;
44
+ import { TooltipContentProps } from '@prosekit/web/tooltip';
45
+ import { TooltipRootProps } from '@prosekit/web/tooltip';
46
+ import { TooltipTriggerProps } from '@prosekit/web/tooltip';
47
+ import { VNode } from 'vue';
48
+ import type { VNodeRef } from 'vue';
49
+
50
+ declare const AutocompleteEmpty: DefineSetupFnComponent<Partial<AutocompleteEmptyProps> & {
51
+ class?: string | undefined;
52
+ }>;
24
53
  export { AutocompleteEmpty }
25
54
  export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
26
55
 
27
- declare type AutocompleteEmptyProps = {
28
- class?: string;
29
- } & AutocompleteEmptyProps_2;
30
- export { AutocompleteEmptyProps }
31
- export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
32
-
33
- declare const AutocompleteItem: (props: {
34
- class?: string | undefined;
35
- } & AutocompleteItemProps_2 & {}) => any;
56
+ declare const AutocompleteItem: DefineSetupFnComponent<Partial<AutocompleteItemProps> & {
57
+ class?: string | undefined;
58
+ }>;
36
59
  export { AutocompleteItem }
37
60
  export { AutocompleteItem as AutocompleteItem_alias_1 }
38
61
 
39
- declare type AutocompleteItemProps = {
40
- class?: string;
41
- } & AutocompleteItemProps_2;
42
- export { AutocompleteItemProps }
43
- export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
44
-
45
- declare const AutocompleteList: (props: {
46
- class?: string | undefined;
47
- } & AutocompleteListProps_2 & {}) => any;
62
+ declare const AutocompleteList: DefineSetupFnComponent<Partial<AutocompleteListProps> & {
63
+ class?: string | undefined;
64
+ }>;
48
65
  export { AutocompleteList }
49
66
  export { AutocompleteList as AutocompleteList_alias_1 }
50
67
 
51
- declare type AutocompleteListProps = {
52
- class?: string;
53
- } & AutocompleteListProps_2;
54
- export { AutocompleteListProps }
55
- export { AutocompleteListProps as AutocompleteListProps_alias_1 }
56
-
57
- declare const AutocompletePopover: (props: {
58
- class?: string | undefined;
59
- } & AutocompletePopoverProps_2 & {}) => any;
68
+ declare const AutocompletePopover: DefineSetupFnComponent<Partial<AutocompletePopoverProps> & {
69
+ class?: string | undefined;
70
+ }>;
60
71
  export { AutocompletePopover }
61
72
  export { AutocompletePopover as AutocompletePopover_alias_1 }
62
73
 
63
- declare type AutocompletePopoverProps = {
64
- class?: string;
65
- } & AutocompletePopoverProps_2;
66
- export { AutocompletePopoverProps }
67
- export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
68
-
69
- export declare const ComboBox: (props: {
70
- class?: string | undefined;
71
- } & ComboBoxProps_2 & {}) => any;
72
-
73
- export declare const ComboBoxInput: (props: {
74
- class?: string | undefined;
75
- } & ComboBoxInputProps_2 & {}) => any;
74
+ declare const BlockDragHandle: DefineSetupFnComponent<Partial<BlockDragHandleProps> & {
75
+ class?: string | undefined;
76
+ }>;
77
+ export { BlockDragHandle }
78
+ export { BlockDragHandle as BlockDragHandle_alias_1 }
76
79
 
77
- export declare type ComboBoxInputProps = {
78
- class?: string;
79
- } & ComboBoxInputProps_2;
80
-
81
- export declare const ComboBoxItem: (props: {
82
- class?: string | undefined;
83
- } & ComboBoxItemProps_2 & {}) => any;
80
+ declare const BlockPopover: DefineSetupFnComponent<Partial<BlockPopoverProps> & {
81
+ class?: string | undefined;
82
+ }>;
83
+ export { BlockPopover }
84
+ export { BlockPopover as BlockPopover_alias_1 }
84
85
 
85
- export declare type ComboBoxItemProps = {
86
+ export declare function createComponent<Props extends object>(tagName: string, displayName: string, defaultProps: Props): DefineSetupFnComponent<Partial<Props> & {
86
87
  class?: string;
87
- } & ComboBoxItemProps_2;
88
+ }>;
88
89
 
89
- export declare const ComboBoxList: (props: {
90
- class?: string | undefined;
91
- } & ComboBoxListProps_2 & {}) => any;
92
-
93
- export declare type ComboBoxListProps = {
94
- class?: string;
95
- } & ComboBoxListProps_2;
96
-
97
- export declare type ComboBoxProps = {
98
- class?: string;
99
- } & ComboBoxProps_2;
90
+ export declare type CreateVueNodeView = ReturnType<typeof useVueNodeViewCreator>;
100
91
 
101
92
  export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
102
93
 
103
- export declare const default_alias_1: UserProjectConfigExport;
94
+ export declare const default_alias_1: {
95
+ test: {
96
+ environment: "jsdom";
97
+ };
98
+ };
99
+
100
+ /**
101
+ * Defines a node view using a Vue component.
102
+ *
103
+ * @public
104
+ */
105
+ declare function defineVueNodeView(options: VueNodeViewOptions): Extension;
106
+ export { defineVueNodeView }
107
+ export { defineVueNodeView as defineVueNodeView_alias_1 }
104
108
 
105
- export declare function injectEditor(): Editor;
109
+ /**
110
+ * @internal
111
+ */
112
+ export declare function defineVueNodeViewFactory(nodeViewFactory: NodeViewFactory): Extension<ExtensionTyping<string, string, CommandArgs>>;
106
113
 
107
- declare const InlinePopover: (props: {
108
- class?: string | undefined;
109
- } & InlinePopoverProps_2 & {}) => any;
114
+ declare const InlinePopover: DefineSetupFnComponent<Partial<InlinePopoverProps> & {
115
+ class?: string | undefined;
116
+ }>;
110
117
  export { InlinePopover }
111
118
  export { InlinePopover as InlinePopover_alias_1 }
112
119
 
113
- declare type InlinePopoverProps = {
114
- class?: string;
115
- } & InlinePopoverProps_2;
116
- export { InlinePopoverProps }
117
- export { InlinePopoverProps as InlinePopoverProps_alias_1 }
120
+ export declare type NodeViewFactory = (options: VueNodeViewUserOptions) => NodeViewConstructor;
118
121
 
119
- export declare const Popover: (props: {
120
- class?: string | undefined;
121
- } & PopoverProps_2 & {}) => any;
122
+ export declare const nodeViewFactoryKey: InjectionKey<NodeViewFactory>;
122
123
 
123
- export { PopoverOptions }
124
+ declare const PopoverContent: DefineSetupFnComponent<Partial<PopoverContentProps> & {
125
+ class?: string | undefined;
126
+ }>;
127
+ export { PopoverContent }
128
+ export { PopoverContent as PopoverContent_alias_1 }
124
129
 
125
- export { PopoverOptions_alias_1 }
130
+ declare const PopoverRoot: DefineSetupFnComponent<Partial<PopoverRootProps> & {
131
+ class?: string | undefined;
132
+ }>;
133
+ export { PopoverRoot }
134
+ export { PopoverRoot as PopoverRoot_alias_1 }
126
135
 
127
- export declare type PopoverProps = {
128
- class?: string;
129
- } & PopoverProps_2;
136
+ declare const PopoverTrigger: DefineSetupFnComponent<Partial<PopoverTriggerProps> & {
137
+ class?: string | undefined;
138
+ }>;
139
+ export { PopoverTrigger }
140
+ export { PopoverTrigger as PopoverTrigger_alias_1 }
141
+
142
+ /**
143
+ * @internal
144
+ */
145
+ export declare type PropsWithClass<P = unknown> = P & {
146
+ class?: string | undefined;
147
+ };
130
148
 
131
- declare const ProseKit: (props: ProseKitProps & {}) => any;
149
+ /**
150
+ * The root component for a ProseKit editor.
151
+ *
152
+ * @public
153
+ */
154
+ declare const ProseKit: DefineSetupFnComponent<ProseKitProps, {}, {}, ProseKitProps & {}, PublicProps>;
132
155
  export { ProseKit }
133
156
  export { ProseKit as ProseKit_alias_1 }
134
157
 
@@ -138,22 +161,196 @@ declare interface ProseKitProps {
138
161
  export { ProseKitProps }
139
162
  export { ProseKitProps as ProseKitProps_alias_1 }
140
163
 
164
+ /**
165
+ * @internal
166
+ */
141
167
  export declare function provideEditor(editor: Editor): void;
142
168
 
169
+ declare const ResizableHandle: DefineSetupFnComponent<Partial<ResizableHandleProps> & {
170
+ class?: string | undefined;
171
+ }>;
172
+ export { ResizableHandle }
173
+ export { ResizableHandle as ResizableHandle_alias_1 }
174
+
175
+ declare const ResizableRoot: DefineSetupFnComponent<Partial<ResizableRootProps> & {
176
+ class?: string | undefined;
177
+ }>;
178
+ export { ResizableRoot }
179
+ export { ResizableRoot as ResizableRoot_alias_1 }
180
+
181
+ declare const TooltipContent: DefineSetupFnComponent<Partial<TooltipContentProps> & {
182
+ class?: string | undefined;
183
+ }>;
184
+ export { TooltipContent }
185
+ export { TooltipContent as TooltipContent_alias_1 }
186
+
187
+ declare const TooltipRoot: DefineSetupFnComponent<Partial<TooltipRootProps> & {
188
+ class?: string | undefined;
189
+ }>;
190
+ export { TooltipRoot }
191
+ export { TooltipRoot as TooltipRoot_alias_1 }
192
+
193
+ declare const TooltipTrigger: DefineSetupFnComponent<Partial<TooltipTriggerProps> & {
194
+ class?: string | undefined;
195
+ }>;
196
+ export { TooltipTrigger }
197
+ export { TooltipTrigger as TooltipTrigger_alias_1 }
198
+
199
+ /**
200
+ * Calls the given handler whenever the editor document changes.
201
+ *
202
+ * @public
203
+ */
204
+ declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
205
+ export { useDocChange }
206
+ export { useDocChange as useDocChange_alias_1 }
207
+
143
208
  /**
144
- * Returns a shallow ref to the editor. If `update` is `true`, any editor update
145
- * will trigger an effect.
209
+ * Retrieves the editor instance from the nearest ProseKit component.
210
+ *
211
+ * @public
146
212
  */
147
213
  declare function useEditor<E extends Extension = any>(options?: {
214
+ /**
215
+ * Whether to update the component when the editor is mounted or editor state
216
+ * is updated.
217
+ *
218
+ * @default false
219
+ */
148
220
  update?: boolean;
149
221
  }): ShallowRef<Editor<E>>;
150
222
  export { useEditor }
151
223
  export { useEditor as useEditor_alias_1 }
152
224
 
153
- export declare function useExtension<T extends Extension = Extension>(extension: Ref<T>): void;
225
+ /**
226
+ * @internal
227
+ */
228
+ export declare function useEditorContext<E extends Extension>(): Editor<E> | undefined;
154
229
 
155
- declare function useKeymap(keymap: Ref<Keymap>): void;
230
+ /**
231
+ * @internal
232
+ */
233
+ export declare function useEditorExtension(editorRef: MaybeRefOrGetter<Editor> | null | undefined, extensionRef: MaybeRefOrGetter<Extension | null> | null): void;
234
+
235
+ /**
236
+ * Add an extension to the editor.
237
+ *
238
+ * @public
239
+ */
240
+ declare function useExtension(
241
+ /**
242
+ * The ref to an extension to add to the editor. If it changes, the previous
243
+ * extension will be removed and the new one (if not null) will be added.
244
+ */
245
+ extension: MaybeRefOrGetter<Extension | null>, options?: UseExtensionOptions): void;
246
+ export { useExtension }
247
+ export { useExtension as useExtension_alias_1 }
248
+
249
+ declare interface UseExtensionOptions {
250
+ /**
251
+ * The editor to add the extension to. If not provided, it will use the
252
+ * editor from the nearest `ProseKit` component.
253
+ */
254
+ editor?: MaybeRefOrGetter<Editor>;
255
+ /**
256
+ * Optional priority to add the extension with.
257
+ */
258
+ priority?: Priority;
259
+ }
260
+ export { UseExtensionOptions }
261
+ export { UseExtensionOptions as UseExtensionOptions_alias_1 }
262
+
263
+ declare function useKeymap(keymap: MaybeRefOrGetter<Keymap>, options?: UseExtensionOptions): void;
156
264
  export { useKeymap }
157
265
  export { useKeymap as useKeymap_alias_1 }
158
266
 
267
+ export declare function useNodeViewFactory(): NodeViewFactory;
268
+
269
+ /**
270
+ * @internal
271
+ */
272
+ export declare function usePriorityExtension<T extends Extension = Extension>(extension: MaybeRefOrGetter<T | null>, priority: Priority | null | undefined): ComputedRef<T | null>;
273
+
274
+ /**
275
+ * Calls the given handler whenever the editor state changes.
276
+ *
277
+ * @public
278
+ */
279
+ declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
280
+ export { useStateUpdate }
281
+ export { useStateUpdate as useStateUpdate_alias_1 }
282
+
283
+ export declare function useVueNodeViewCreator(renderVueRenderer: VueRendererResult['renderVueRenderer'], removeVueRenderer: VueRendererResult['removeVueRenderer']): NodeViewFactory;
284
+
285
+ export declare function useVueRenderer(): VueRendererResult;
286
+
287
+ export declare class VueNodeView extends CoreNodeView<VueNodeViewComponent> implements VueRenderer<VueNodeViewProps> {
288
+ key: string;
289
+ context: VueNodeViewProps;
290
+ updateContext: () => void;
291
+ render: () => VueRendererComponent;
292
+ }
293
+
294
+ declare type VueNodeViewComponent = DefineComponent<VueNodeViewProps, any, any>;
295
+ export { VueNodeViewComponent }
296
+ export { VueNodeViewComponent as VueNodeViewComponent_alias_1 }
297
+
298
+ /**
299
+ * Options for {@link defineVueNodeView}.
300
+ *
301
+ * @public
302
+ */
303
+ declare interface VueNodeViewOptions extends BaseNodeViewOptions {
304
+ /**
305
+ * The name of the node type.
306
+ */
307
+ name: string;
308
+ /**
309
+ * The Vue component to render the node.
310
+ */
311
+ component: VueNodeViewComponent;
312
+ }
313
+ export { VueNodeViewOptions }
314
+ export { VueNodeViewOptions as VueNodeViewOptions_alias_1 }
315
+
316
+ declare interface VueNodeViewProps {
317
+ contentRef: VNodeRef;
318
+ view: EditorView;
319
+ getPos: () => number | undefined;
320
+ setAttrs: (attrs: Attrs) => void;
321
+ node: ShallowRef<Node_2>;
322
+ selected: ShallowRef<boolean>;
323
+ decorations: ShallowRef<readonly Decoration[]>;
324
+ innerDecorations: ShallowRef<DecorationSource>;
325
+ }
326
+ export { VueNodeViewProps }
327
+ export { VueNodeViewProps as VueNodeViewProps_alias_1 }
328
+
329
+ export declare type VueNodeViewSpec = CoreNodeViewSpec<VueNodeViewComponent>;
330
+
331
+ export declare type VueNodeViewUserOptions = CoreNodeViewUserOptions<VueNodeViewComponent>;
332
+
333
+ export declare interface VueRenderer<Context> {
334
+ key: string;
335
+ context: Context;
336
+ render: () => VueRendererComponent;
337
+ updateContext: () => void;
338
+ }
339
+
340
+ export declare type VueRendererComponent = DefineComponent<any, any, any>;
341
+
342
+ export declare interface VueRendererResult {
343
+ readonly portals: Ref<Record<string, VueRendererComponent>>;
344
+ readonly renderVueRenderer: (renderer: VueRenderer<unknown>) => void;
345
+ readonly removeVueRenderer: (renderer: VueRenderer<unknown>) => void;
346
+ }
347
+
348
+ export declare const VueViewsConsumer: DefineComponent< {}, () => null, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
349
+
350
+ declare const VueViewsProvider: DefineComponent< {}, () => VNode<RendererNode, RendererElement, {
351
+ [key: string]: any;
352
+ }>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
353
+ export { VueViewsProvider }
354
+ export { VueViewsProvider as VueViewsProvider_alias_1 }
355
+
159
356
  export { }
@@ -0,0 +1,37 @@
1
+ import {
2
+ useEditorContext
3
+ } from "./chunk-X5DTEZPX.js";
4
+
5
+ // src/components/create-component.ts
6
+ import { defineComponent, h } from "vue";
7
+ function createComponent(tagName, displayName, defaultProps) {
8
+ const propertyNames = Object.keys(defaultProps);
9
+ const hasEditor = Object.hasOwn(defaultProps, "editor");
10
+ const Component = defineComponent(
11
+ (props, { slots }) => {
12
+ const editor = useEditorContext();
13
+ return () => {
14
+ var _a;
15
+ const p = {};
16
+ for (const [key, value] of Object.entries(props)) {
17
+ if (value !== void 0) {
18
+ p[propertyNames.includes(key) ? "." + key : key] = value;
19
+ }
20
+ }
21
+ if (hasEditor && editor && !p["editor"]) {
22
+ p.editor = editor;
23
+ }
24
+ return h(tagName, p, (_a = slots.default) == null ? void 0 : _a.call(slots));
25
+ };
26
+ },
27
+ {
28
+ props: propertyNames,
29
+ name: displayName
30
+ }
31
+ );
32
+ return Component;
33
+ }
34
+
35
+ export {
36
+ createComponent
37
+ };
@@ -0,0 +1,15 @@
1
+ // src/injection/editor-context.ts
2
+ import "@prosekit/core";
3
+ import { inject, provide } from "vue";
4
+ var symbol = Symbol("prosekit-vue-editor-context");
5
+ function provideEditor(editor) {
6
+ provide(symbol, editor);
7
+ }
8
+ function useEditorContext() {
9
+ return inject(symbol);
10
+ }
11
+
12
+ export {
13
+ provideEditor,
14
+ useEditorContext
15
+ };
@@ -0,0 +1,4 @@
1
+ export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup';
2
+ export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup';
3
+ export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup';
4
+ export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup';
@@ -0,0 +1,26 @@
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/autocomplete/autocomplete-empty.gen.ts
7
+ import { defaultAutocompleteEmptyProps } from "@prosekit/web/autocomplete";
8
+ var AutocompleteEmpty = createComponent("prosekit-autocomplete-empty", "AutocompleteEmpty", defaultAutocompleteEmptyProps);
9
+
10
+ // src/components/autocomplete/autocomplete-item.gen.ts
11
+ import { defaultAutocompleteItemProps } from "@prosekit/web/autocomplete";
12
+ var AutocompleteItem = createComponent("prosekit-autocomplete-item", "AutocompleteItem", defaultAutocompleteItemProps);
13
+
14
+ // src/components/autocomplete/autocomplete-list.gen.ts
15
+ import { defaultAutocompleteListProps } from "@prosekit/web/autocomplete";
16
+ var AutocompleteList = createComponent("prosekit-autocomplete-list", "AutocompleteList", defaultAutocompleteListProps);
17
+
18
+ // src/components/autocomplete/autocomplete-popover.gen.ts
19
+ import { defaultAutocompletePopoverProps } from "@prosekit/web/autocomplete";
20
+ var AutocompletePopover = createComponent("prosekit-autocomplete-popover", "AutocompletePopover", defaultAutocompletePopoverProps);
21
+ export {
22
+ AutocompleteEmpty,
23
+ AutocompleteItem,
24
+ AutocompleteList,
25
+ AutocompletePopover
26
+ };
@@ -0,0 +1,2 @@
1
+ export { BlockDragHandle_alias_1 as BlockDragHandle } from './_tsup-dts-rollup';
2
+ export { BlockPopover_alias_1 as BlockPopover } from './_tsup-dts-rollup';
@@ -0,0 +1,16 @@
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/block-handle/block-drag-handle.gen.ts
7
+ import { defaultBlockDragHandleProps } from "@prosekit/web/block-handle";
8
+ var BlockDragHandle = createComponent("prosekit-block-drag-handle", "BlockDragHandle", defaultBlockDragHandleProps);
9
+
10
+ // src/components/block-handle/block-popover.gen.ts
11
+ import { defaultBlockPopoverProps } from "@prosekit/web/block-handle";
12
+ var BlockPopover = createComponent("prosekit-block-popover", "BlockPopover", defaultBlockPopoverProps);
13
+ export {
14
+ BlockDragHandle,
15
+ BlockPopover
16
+ };
@@ -1,3 +1 @@
1
- export { PopoverOptions_alias_1 as PopoverOptions } from './_tsup-dts-rollup';
2
- export { InlinePopover_alias_1 as InlinePopover } from './_tsup-dts-rollup';
3
- export { InlinePopoverProps_alias_1 as InlinePopoverProps } from './_tsup-dts-rollup';
1
+ export { InlinePopover } from './_tsup-dts-rollup';
@@ -1,19 +1,11 @@
1
- // src/components/inline-popover.gen.ts
2
- import "@prosekit/lit/inline-popover";
3
- import { propNames } from "@prosekit/lit/inline-popover";
4
- import { defineComponent, h } from "vue";
5
- var InlinePopover = defineComponent(
6
- (props, { slots }) => {
7
- return () => {
8
- var _a;
9
- const webComponentProps = Object.fromEntries(
10
- Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
- );
12
- return h("prosekit-inline-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
- };
14
- },
15
- { props: ["class", ...propNames] }
16
- );
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/inline-popover/inline-popover.gen.ts
7
+ import { defaultInlinePopoverProps } from "@prosekit/web/inline-popover";
8
+ var InlinePopover = createComponent("prosekit-inline-popover", "InlinePopover", defaultInlinePopoverProps);
17
9
  export {
18
10
  InlinePopover
19
11
  };
@@ -1,2 +1,3 @@
1
- export { PopoverProps } from './_tsup-dts-rollup';
2
- export { Popover } from './_tsup-dts-rollup';
1
+ export { PopoverContent } from './_tsup-dts-rollup';
2
+ export { PopoverRoot } from './_tsup-dts-rollup';
3
+ export { PopoverTrigger } from './_tsup-dts-rollup';
@@ -1,19 +1,21 @@
1
- // src/components/popover.gen.ts
2
- import "@prosekit/lit/popover";
3
- import { propNames } from "@prosekit/lit/popover";
4
- import { defineComponent, h } from "vue";
5
- var Popover = defineComponent(
6
- (props, { slots }) => {
7
- return () => {
8
- var _a;
9
- const webComponentProps = Object.fromEntries(
10
- Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
- );
12
- return h("prosekit-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
- };
14
- },
15
- { props: ["class", ...propNames] }
16
- );
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/popover/popover-content.gen.ts
7
+ import { defaultPopoverContentProps } from "@prosekit/web/popover";
8
+ var PopoverContent = createComponent("prosekit-popover-content", "PopoverContent", defaultPopoverContentProps);
9
+
10
+ // src/components/popover/popover-root.gen.ts
11
+ import { defaultPopoverRootProps } from "@prosekit/web/popover";
12
+ var PopoverRoot = createComponent("prosekit-popover-root", "PopoverRoot", defaultPopoverRootProps);
13
+
14
+ // src/components/popover/popover-trigger.gen.ts
15
+ import { defaultPopoverTriggerProps } from "@prosekit/web/popover";
16
+ var PopoverTrigger = createComponent("prosekit-popover-trigger", "PopoverTrigger", defaultPopoverTriggerProps);
17
17
  export {
18
- Popover
18
+ PopoverContent,
19
+ PopoverRoot,
20
+ PopoverTrigger
19
21
  };
@@ -0,0 +1,2 @@
1
+ export { ResizableHandle } from './_tsup-dts-rollup';
2
+ export { ResizableRoot } from './_tsup-dts-rollup';
@@ -0,0 +1,16 @@
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/resizable/resizable-handle.gen.ts
7
+ import { defaultResizableHandleProps } from "@prosekit/web/resizable";
8
+ var ResizableHandle = createComponent("prosekit-resizable-handle", "ResizableHandle", defaultResizableHandleProps);
9
+
10
+ // src/components/resizable/resizable-root.gen.ts
11
+ import { defaultResizableRootProps } from "@prosekit/web/resizable";
12
+ var ResizableRoot = createComponent("prosekit-resizable-root", "ResizableRoot", defaultResizableRootProps);
13
+ export {
14
+ ResizableHandle,
15
+ ResizableRoot
16
+ };