@prosekit/vue 0.0.0-next-20230709094459 → 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.
@@ -0,0 +1,356 @@
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';
19
+ import { Editor } from '@prosekit/core';
20
+ import type { EditorState } from '@prosekit/pm/state';
21
+ import type { EditorView } from '@prosekit/pm/view';
22
+ import { Extension } from '@prosekit/core';
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';
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';
31
+ import { Options } from 'tsup';
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';
43
+ import { ShallowRef } from 'vue';
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
+ }>;
53
+ export { AutocompleteEmpty }
54
+ export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
55
+
56
+ declare const AutocompleteItem: DefineSetupFnComponent<Partial<AutocompleteItemProps> & {
57
+ class?: string | undefined;
58
+ }>;
59
+ export { AutocompleteItem }
60
+ export { AutocompleteItem as AutocompleteItem_alias_1 }
61
+
62
+ declare const AutocompleteList: DefineSetupFnComponent<Partial<AutocompleteListProps> & {
63
+ class?: string | undefined;
64
+ }>;
65
+ export { AutocompleteList }
66
+ export { AutocompleteList as AutocompleteList_alias_1 }
67
+
68
+ declare const AutocompletePopover: DefineSetupFnComponent<Partial<AutocompletePopoverProps> & {
69
+ class?: string | undefined;
70
+ }>;
71
+ export { AutocompletePopover }
72
+ export { AutocompletePopover as AutocompletePopover_alias_1 }
73
+
74
+ declare const BlockDragHandle: DefineSetupFnComponent<Partial<BlockDragHandleProps> & {
75
+ class?: string | undefined;
76
+ }>;
77
+ export { BlockDragHandle }
78
+ export { BlockDragHandle as BlockDragHandle_alias_1 }
79
+
80
+ declare const BlockPopover: DefineSetupFnComponent<Partial<BlockPopoverProps> & {
81
+ class?: string | undefined;
82
+ }>;
83
+ export { BlockPopover }
84
+ export { BlockPopover as BlockPopover_alias_1 }
85
+
86
+ export declare function createComponent<Props extends object>(tagName: string, displayName: string, defaultProps: Props): DefineSetupFnComponent<Partial<Props> & {
87
+ class?: string;
88
+ }>;
89
+
90
+ export declare type CreateVueNodeView = ReturnType<typeof useVueNodeViewCreator>;
91
+
92
+ export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
93
+
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 }
108
+
109
+ /**
110
+ * @internal
111
+ */
112
+ export declare function defineVueNodeViewFactory(nodeViewFactory: NodeViewFactory): Extension<ExtensionTyping<string, string, CommandArgs>>;
113
+
114
+ declare const InlinePopover: DefineSetupFnComponent<Partial<InlinePopoverProps> & {
115
+ class?: string | undefined;
116
+ }>;
117
+ export { InlinePopover }
118
+ export { InlinePopover as InlinePopover_alias_1 }
119
+
120
+ export declare type NodeViewFactory = (options: VueNodeViewUserOptions) => NodeViewConstructor;
121
+
122
+ export declare const nodeViewFactoryKey: InjectionKey<NodeViewFactory>;
123
+
124
+ declare const PopoverContent: DefineSetupFnComponent<Partial<PopoverContentProps> & {
125
+ class?: string | undefined;
126
+ }>;
127
+ export { PopoverContent }
128
+ export { PopoverContent as PopoverContent_alias_1 }
129
+
130
+ declare const PopoverRoot: DefineSetupFnComponent<Partial<PopoverRootProps> & {
131
+ class?: string | undefined;
132
+ }>;
133
+ export { PopoverRoot }
134
+ export { PopoverRoot as PopoverRoot_alias_1 }
135
+
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
+ };
148
+
149
+ /**
150
+ * The root component for a ProseKit editor.
151
+ *
152
+ * @public
153
+ */
154
+ declare const ProseKit: DefineSetupFnComponent<ProseKitProps, {}, {}, ProseKitProps & {}, PublicProps>;
155
+ export { ProseKit }
156
+ export { ProseKit as ProseKit_alias_1 }
157
+
158
+ declare interface ProseKitProps {
159
+ editor: Editor;
160
+ }
161
+ export { ProseKitProps }
162
+ export { ProseKitProps as ProseKitProps_alias_1 }
163
+
164
+ /**
165
+ * @internal
166
+ */
167
+ export declare function provideEditor(editor: Editor): void;
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
+
208
+ /**
209
+ * Retrieves the editor instance from the nearest ProseKit component.
210
+ *
211
+ * @public
212
+ */
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
+ */
220
+ update?: boolean;
221
+ }): ShallowRef<Editor<E>>;
222
+ export { useEditor }
223
+ export { useEditor as useEditor_alias_1 }
224
+
225
+ /**
226
+ * @internal
227
+ */
228
+ export declare function useEditorContext<E extends Extension>(): Editor<E> | undefined;
229
+
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;
264
+ export { useKeymap }
265
+ export { useKeymap as useKeymap_alias_1 }
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
+
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
+ };
@@ -0,0 +1 @@
1
+ export { InlinePopover } from './_tsup-dts-rollup';
@@ -0,0 +1,11 @@
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);
9
+ export {
10
+ InlinePopover
11
+ };
@@ -0,0 +1,3 @@
1
+ export { PopoverContent } from './_tsup-dts-rollup';
2
+ export { PopoverRoot } from './_tsup-dts-rollup';
3
+ export { PopoverTrigger } from './_tsup-dts-rollup';
@@ -0,0 +1,21 @@
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
+ export {
18
+ PopoverContent,
19
+ PopoverRoot,
20
+ PopoverTrigger
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
+ };
@@ -0,0 +1,3 @@
1
+ export { TooltipContent } from './_tsup-dts-rollup';
2
+ export { TooltipRoot } from './_tsup-dts-rollup';
3
+ export { TooltipTrigger } from './_tsup-dts-rollup';
@@ -0,0 +1,21 @@
1
+ import {
2
+ createComponent
3
+ } from "./chunk-64DHEPDA.js";
4
+ import "./chunk-X5DTEZPX.js";
5
+
6
+ // src/components/tooltip/tooltip-content.gen.ts
7
+ import { defaultTooltipContentProps } from "@prosekit/web/tooltip";
8
+ var TooltipContent = createComponent("prosekit-tooltip-content", "TooltipContent", defaultTooltipContentProps);
9
+
10
+ // src/components/tooltip/tooltip-root.gen.ts
11
+ import { defaultTooltipRootProps } from "@prosekit/web/tooltip";
12
+ var TooltipRoot = createComponent("prosekit-tooltip-root", "TooltipRoot", defaultTooltipRootProps);
13
+
14
+ // src/components/tooltip/tooltip-trigger.gen.ts
15
+ import { defaultTooltipTriggerProps } from "@prosekit/web/tooltip";
16
+ var TooltipTrigger = createComponent("prosekit-tooltip-trigger", "TooltipTrigger", defaultTooltipTriggerProps);
17
+ export {
18
+ TooltipContent,
19
+ TooltipRoot,
20
+ TooltipTrigger
21
+ };
@@ -1,14 +1,12 @@
1
- import { Editor, Keymap, Extension } from '@prosekit/core';
2
-
3
- interface ProseKitProps {
4
- editor: Editor;
5
- }
6
- declare const ProseKit: (props: ProseKitProps & {}) => any;
7
-
8
- declare function useKeymap({ keymap }: {
9
- keymap: Keymap;
10
- }): void;
11
-
12
- declare function useEditor<E extends Extension = any>(): Editor<E>;
13
-
14
- export { ProseKit, ProseKitProps, useEditor, useKeymap };
1
+ export { ProseKit } from './_tsup-dts-rollup';
2
+ export { ProseKitProps } from './_tsup-dts-rollup';
3
+ export { defineVueNodeView } from './_tsup-dts-rollup';
4
+ export { VueNodeViewOptions } from './_tsup-dts-rollup';
5
+ export { useEditor } from './_tsup-dts-rollup';
6
+ export { useExtension } from './_tsup-dts-rollup';
7
+ export { UseExtensionOptions } from './_tsup-dts-rollup';
8
+ export { useKeymap } from './_tsup-dts-rollup';
9
+ export { useStateUpdate } from './_tsup-dts-rollup';
10
+ export { useDocChange } from './_tsup-dts-rollup';
11
+ export { VueNodeViewComponent } from './_tsup-dts-rollup';
12
+ export { VueNodeViewProps } from './_tsup-dts-rollup';
@@ -1,58 +1,332 @@
1
+ import {
2
+ provideEditor,
3
+ useEditorContext
4
+ } from "./chunk-X5DTEZPX.js";
5
+
1
6
  // src/components/prosekit.ts
2
- import { defineComponent } from "vue";
7
+ import "@prosekit/core";
8
+ import { defineComponent as defineComponent4, h as h3 } from "vue";
9
+
10
+ // src/views/vue-views-provider.ts
11
+ import { Fragment, defineComponent as defineComponent2, h as h2, provide } from "vue";
3
12
 
4
- // src/injection/editor-injection.ts
13
+ // src/views/node-view/node-view-context.ts
5
14
  import { ProseKitError } from "@prosekit/core";
6
- import { inject, provide } from "vue";
7
- var symbol = Symbol("ProseKitContext");
8
- function provideEditor(editor) {
9
- provide(symbol, editor);
15
+ import { inject } from "vue";
16
+ var nodeViewFactoryKey = Symbol(
17
+ "[ProseKit]useNodeViewFactory"
18
+ );
19
+ function useNodeViewFactory() {
20
+ const nodeViewFactory = inject(nodeViewFactoryKey);
21
+ if (!nodeViewFactory) {
22
+ throw new ProseKitError("Cannot find node view factory context.");
23
+ }
24
+ return nodeViewFactory;
10
25
  }
11
- function injectEditor() {
12
- const editor = inject(symbol);
13
- if (!editor) {
14
- throw new ProseKitError("Can't inject editor");
26
+
27
+ // src/views/node-view/vue-node-view.ts
28
+ import { _getId } from "@prosekit/core";
29
+ import { CoreNodeView } from "@prosemirror-adapter/core";
30
+ import { Teleport, defineComponent, h, markRaw, shallowRef } from "vue";
31
+ var VueNodeView = class extends CoreNodeView {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.key = _getId();
35
+ this.context = {
36
+ contentRef: (element) => {
37
+ if (element && element instanceof HTMLElement && this.contentDOM && element.firstChild !== this.contentDOM)
38
+ element.appendChild(this.contentDOM);
39
+ },
40
+ view: this.view,
41
+ getPos: this.getPos,
42
+ setAttrs: this.setAttrs,
43
+ node: shallowRef(this.node),
44
+ selected: shallowRef(this.selected),
45
+ decorations: shallowRef(this.decorations),
46
+ innerDecorations: shallowRef(this.innerDecorations)
47
+ };
48
+ this.updateContext = () => {
49
+ Object.entries({
50
+ node: this.node,
51
+ selected: this.selected,
52
+ decorations: this.decorations,
53
+ innerDecorations: this.innerDecorations
54
+ }).forEach(([key, value]) => {
55
+ const prev = this.context[key];
56
+ if (prev.value !== value)
57
+ prev.value = value;
58
+ });
59
+ };
60
+ this.render = () => {
61
+ const UserComponent = this.component;
62
+ return markRaw(
63
+ defineComponent({
64
+ name: "ProsemirrorNodeView",
65
+ setup: () => {
66
+ return () => h(
67
+ Teleport,
68
+ {
69
+ key: this.key,
70
+ to: this.dom
71
+ },
72
+ h(UserComponent, this.context)
73
+ );
74
+ }
75
+ })
76
+ );
77
+ };
78
+ }
79
+ };
80
+
81
+ // src/views/node-view/use-vue-node-view-creator.ts
82
+ function useVueNodeViewCreator(renderVueRenderer, removeVueRenderer) {
83
+ const createVueNodeView = (options) => (node, view, getPos, decorations, innerDecorations) => {
84
+ const nodeView = new VueNodeView({
85
+ node,
86
+ view,
87
+ getPos,
88
+ decorations,
89
+ innerDecorations,
90
+ options: {
91
+ ...options,
92
+ onUpdate() {
93
+ var _a;
94
+ (_a = options.onUpdate) == null ? void 0 : _a.call(options);
95
+ nodeView.updateContext();
96
+ },
97
+ selectNode() {
98
+ var _a;
99
+ (_a = options.selectNode) == null ? void 0 : _a.call(options);
100
+ nodeView.updateContext();
101
+ },
102
+ deselectNode() {
103
+ var _a;
104
+ (_a = options.deselectNode) == null ? void 0 : _a.call(options);
105
+ nodeView.updateContext();
106
+ },
107
+ destroy() {
108
+ var _a;
109
+ (_a = options.destroy) == null ? void 0 : _a.call(options);
110
+ removeVueRenderer(nodeView);
111
+ }
112
+ }
113
+ });
114
+ renderVueRenderer(nodeView);
115
+ return nodeView;
116
+ };
117
+ return createVueNodeView;
118
+ }
119
+
120
+ // src/views/vue-renderer.ts
121
+ import {
122
+ getCurrentInstance,
123
+ markRaw as markRaw2,
124
+ onBeforeMount,
125
+ onUnmounted,
126
+ ref
127
+ } from "vue";
128
+ function useVueRenderer() {
129
+ const portals = ref({});
130
+ const instance = getCurrentInstance();
131
+ const update = markRaw2({});
132
+ onBeforeMount(() => {
133
+ update.updater = () => {
134
+ instance == null ? void 0 : instance.update();
135
+ };
136
+ });
137
+ onUnmounted(() => {
138
+ update.updater = void 0;
139
+ });
140
+ const renderVueRenderer = (renderer) => {
141
+ var _a;
142
+ portals.value[renderer.key] = renderer.render();
143
+ (_a = update.updater) == null ? void 0 : _a.call(update);
144
+ };
145
+ const removeVueRenderer = (renderer) => {
146
+ delete portals.value[renderer.key];
147
+ };
148
+ return {
149
+ portals,
150
+ renderVueRenderer,
151
+ removeVueRenderer
152
+ };
153
+ }
154
+
155
+ // src/views/vue-views-provider.ts
156
+ var VueViewsProvider = defineComponent2({
157
+ name: "VueViewsProvider",
158
+ setup: (_, { slots }) => {
159
+ const { portals, renderVueRenderer, removeVueRenderer } = useVueRenderer();
160
+ const createVueNodeView = useVueNodeViewCreator(
161
+ renderVueRenderer,
162
+ removeVueRenderer
163
+ );
164
+ provide(nodeViewFactoryKey, createVueNodeView);
165
+ return () => {
166
+ var _a;
167
+ return h2(Fragment, null, [
168
+ (_a = slots.default) == null ? void 0 : _a.call(slots),
169
+ Object.values(portals.value).map((x) => h2(x))
170
+ ]);
171
+ };
15
172
  }
16
- return editor;
173
+ });
174
+
175
+ // src/views/vue-views-comsumer.ts
176
+ import { computed as computed2, defineComponent as defineComponent3 } from "vue";
177
+
178
+ // src/extensions/vue-node-view.ts
179
+ import {
180
+ defineNodeViewFactory
181
+ } from "@prosekit/core";
182
+ function defineVueNodeView(options) {
183
+ const { name, ...userOptions } = options;
184
+ return defineNodeViewFactory({
185
+ group: "vue",
186
+ name,
187
+ args: userOptions
188
+ });
189
+ }
190
+ function defineVueNodeViewFactory(nodeViewFactory) {
191
+ return defineNodeViewFactory({
192
+ group: "vue",
193
+ factory: nodeViewFactory
194
+ });
17
195
  }
18
196
 
197
+ // src/hooks/use-extension.ts
198
+ import "@prosekit/core";
199
+ import "vue";
200
+
201
+ // src/hooks/use-editor-extension.ts
202
+ import { EditorNotFoundError } from "@prosekit/core";
203
+ import { toValue, watchPostEffect } from "vue";
204
+ function useEditorExtension(editorRef, extensionRef) {
205
+ const editorContext = useEditorContext();
206
+ watchPostEffect((onCleanup) => {
207
+ const editor = toValue(editorRef) || toValue(editorContext);
208
+ const extension = toValue(extensionRef);
209
+ if (!editor) {
210
+ throw new EditorNotFoundError();
211
+ }
212
+ if (extension) {
213
+ onCleanup(editor.use(extension));
214
+ }
215
+ });
216
+ }
217
+
218
+ // src/hooks/use-priority-extension.ts
219
+ import { withPriority } from "@prosekit/core";
220
+ import { computed, toValue as toValue2 } from "vue";
221
+ function usePriorityExtension(extension, priority) {
222
+ return computed(() => {
223
+ const ext = toValue2(extension);
224
+ return ext && priority ? withPriority(ext, priority) : ext;
225
+ });
226
+ }
227
+
228
+ // src/hooks/use-extension.ts
229
+ function useExtension(extension, options) {
230
+ useEditorExtension(
231
+ options == null ? void 0 : options.editor,
232
+ usePriorityExtension(extension, options == null ? void 0 : options.priority)
233
+ );
234
+ }
235
+
236
+ // src/views/vue-views-comsumer.ts
237
+ var VueViewsConsumer = defineComponent3({
238
+ name: "VueViewsConsumer",
239
+ setup: () => {
240
+ const nodeViewFactory = useNodeViewFactory();
241
+ const extension = computed2(() => {
242
+ return defineVueNodeViewFactory(nodeViewFactory);
243
+ });
244
+ useExtension(extension);
245
+ return () => null;
246
+ }
247
+ });
248
+
19
249
  // src/components/prosekit.ts
20
- var ProseKit = defineComponent(
250
+ var ProseKit = defineComponent4(
21
251
  (props, { slots }) => {
22
252
  provideEditor(props.editor);
23
253
  return () => {
24
- var _a;
25
- return (_a = slots.default) == null ? void 0 : _a.call(slots);
254
+ return h3(VueViewsProvider, null, () => {
255
+ var _a;
256
+ return [
257
+ h3(VueViewsConsumer),
258
+ (_a = slots.default) == null ? void 0 : _a.call(slots)
259
+ ];
260
+ });
26
261
  };
27
262
  },
28
263
  { props: ["editor"] }
29
264
  );
30
265
 
31
- // src/hooks/use-keymap.ts
32
- import { addKeymap } from "@prosekit/core";
33
- import { computed } from "vue";
34
-
35
- // src/hooks/use-extension.ts
36
- import { effect } from "vue";
37
-
38
266
  // src/hooks/use-editor.ts
39
- function useEditor() {
40
- return injectEditor();
267
+ import {
268
+ ProseKitError as ProseKitError2,
269
+ defineMountHandler,
270
+ defineUpdateHandler,
271
+ union
272
+ } from "@prosekit/core";
273
+ import {
274
+ onMounted,
275
+ onUnmounted as onUnmounted2,
276
+ shallowRef as shallowRef2,
277
+ triggerRef
278
+ } from "vue";
279
+ function useEditor(options) {
280
+ var _a;
281
+ const update = (_a = options == null ? void 0 : options.update) != null ? _a : false;
282
+ const editor = useEditorContext();
283
+ if (!editor) {
284
+ throw new ProseKitError2(
285
+ "useEditor must be used within the ProseKit component"
286
+ );
287
+ }
288
+ const editorRef = shallowRef2(editor);
289
+ if (update) {
290
+ onMounted(() => {
291
+ const forceUpdate = () => triggerRef(editorRef);
292
+ const extension = union([
293
+ defineMountHandler(forceUpdate),
294
+ defineUpdateHandler(forceUpdate)
295
+ ]);
296
+ const dispose = editor.use(extension);
297
+ onUnmounted2(dispose);
298
+ });
299
+ }
300
+ return editorRef;
41
301
  }
42
302
 
43
- // src/hooks/use-extension.ts
44
- function useExtension({ extension }) {
45
- const editor = useEditor();
46
- effect(() => editor.use(extension));
303
+ // src/hooks/use-keymap.ts
304
+ import { defineKeymap } from "@prosekit/core";
305
+ import { computed as computed3, toValue as toValue3 } from "vue";
306
+ function useKeymap(keymap, options) {
307
+ const extension = computed3(() => defineKeymap(toValue3(keymap)));
308
+ return useExtension(extension, options);
47
309
  }
48
310
 
49
- // src/hooks/use-keymap.ts
50
- function useKeymap({ keymap }) {
51
- const extension = computed(() => addKeymap(keymap));
52
- useExtension({ extension: extension.value });
311
+ // src/hooks/use-state-update.ts
312
+ import { defineUpdateHandler as defineUpdateHandler2 } from "@prosekit/core";
313
+ function useStateUpdate(handler, options) {
314
+ const extension = defineUpdateHandler2((view) => handler(view.state));
315
+ return useExtension(extension, options);
316
+ }
317
+
318
+ // src/hooks/use-doc-change.ts
319
+ import { defineDocChangeHandler } from "@prosekit/core";
320
+ function useDocChange(handler, options) {
321
+ const extension = defineDocChangeHandler((view) => handler(view.state.doc));
322
+ return useExtension(extension, options);
53
323
  }
54
324
  export {
55
325
  ProseKit,
326
+ defineVueNodeView,
327
+ useDocChange,
56
328
  useEditor,
57
- useKeymap
329
+ useExtension,
330
+ useKeymap,
331
+ useStateUpdate
58
332
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/vue",
3
3
  "type": "module",
4
- "version": "0.0.0-next-20230709094459",
4
+ "version": "0.0.0-next-20240421132240",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -30,33 +30,45 @@
30
30
  "import": "./dist/prosekit-vue.js",
31
31
  "default": "./dist/prosekit-vue.js"
32
32
  },
33
- "./components/menu": {
34
- "types": "./dist/prosekit-vue-components-menu.d.ts",
35
- "import": "./dist/prosekit-vue-components-menu.js",
36
- "default": "./dist/prosekit-vue-components-menu.js"
33
+ "./autocomplete": {
34
+ "types": "./dist/prosekit-vue-autocomplete.d.ts",
35
+ "import": "./dist/prosekit-vue-autocomplete.js",
36
+ "default": "./dist/prosekit-vue-autocomplete.js"
37
37
  },
38
- "./components/menu-item": {
39
- "types": "./dist/prosekit-vue-components-menu-item.d.ts",
40
- "import": "./dist/prosekit-vue-components-menu-item.js",
41
- "default": "./dist/prosekit-vue-components-menu-item.js"
38
+ "./block-handle": {
39
+ "types": "./dist/prosekit-vue-block-handle.d.ts",
40
+ "import": "./dist/prosekit-vue-block-handle.js",
41
+ "default": "./dist/prosekit-vue-block-handle.js"
42
42
  },
43
- "./components/popover": {
44
- "types": "./dist/prosekit-vue-components-popover.d.ts",
45
- "import": "./dist/prosekit-vue-components-popover.js",
46
- "default": "./dist/prosekit-vue-components-popover.js"
43
+ "./inline-popover": {
44
+ "types": "./dist/prosekit-vue-inline-popover.d.ts",
45
+ "import": "./dist/prosekit-vue-inline-popover.js",
46
+ "default": "./dist/prosekit-vue-inline-popover.js"
47
47
  },
48
- "./components/popover-suggestion": {
49
- "types": "./dist/prosekit-vue-components-popover-suggestion.d.ts",
50
- "import": "./dist/prosekit-vue-components-popover-suggestion.js",
51
- "default": "./dist/prosekit-vue-components-popover-suggestion.js"
48
+ "./popover": {
49
+ "types": "./dist/prosekit-vue-popover.d.ts",
50
+ "import": "./dist/prosekit-vue-popover.js",
51
+ "default": "./dist/prosekit-vue-popover.js"
52
+ },
53
+ "./resizable": {
54
+ "types": "./dist/prosekit-vue-resizable.d.ts",
55
+ "import": "./dist/prosekit-vue-resizable.js",
56
+ "default": "./dist/prosekit-vue-resizable.js"
57
+ },
58
+ "./tooltip": {
59
+ "types": "./dist/prosekit-vue-tooltip.d.ts",
60
+ "import": "./dist/prosekit-vue-tooltip.js",
61
+ "default": "./dist/prosekit-vue-tooltip.js"
52
62
  }
53
63
  },
54
64
  "files": [
55
65
  "dist"
56
66
  ],
57
67
  "dependencies": {
58
- "@prosekit/core": "0.0.0-next-20230709094459",
59
- "@prosekit/lit": "0.0.0-next-20230709094459"
68
+ "@prosekit/core": "0.0.0-next-20240421132240",
69
+ "@prosekit/pm": "0.0.0-next-20240421132240",
70
+ "@prosekit/web": "0.0.0-next-20240421132240",
71
+ "@prosemirror-adapter/core": "^0.2.6"
60
72
  },
61
73
  "peerDependencies": {
62
74
  "vue": ">= 3.0.0"
@@ -68,10 +80,10 @@
68
80
  },
69
81
  "devDependencies": {
70
82
  "@prosekit/dev": "*",
71
- "tsup": "^7.1.0",
72
- "typescript": "^5.1.6",
73
- "vitest": "^0.33.0",
74
- "vue": "^3.3.4"
83
+ "tsup": "^8.0.2",
84
+ "typescript": "^5.4.5",
85
+ "vitest": "^1.5.0",
86
+ "vue": "^3.4.23"
75
87
  },
76
88
  "scripts": {
77
89
  "build:tsup": "tsup",
@@ -83,17 +95,23 @@
83
95
  ".": [
84
96
  "./dist/prosekit-vue.d.ts"
85
97
  ],
86
- "components/menu": [
87
- "./dist/prosekit-vue-components-menu.d.ts"
98
+ "autocomplete": [
99
+ "./dist/prosekit-vue-autocomplete.d.ts"
100
+ ],
101
+ "block-handle": [
102
+ "./dist/prosekit-vue-block-handle.d.ts"
103
+ ],
104
+ "inline-popover": [
105
+ "./dist/prosekit-vue-inline-popover.d.ts"
88
106
  ],
89
- "components/menu-item": [
90
- "./dist/prosekit-vue-components-menu-item.d.ts"
107
+ "popover": [
108
+ "./dist/prosekit-vue-popover.d.ts"
91
109
  ],
92
- "components/popover": [
93
- "./dist/prosekit-vue-components-popover.d.ts"
110
+ "resizable": [
111
+ "./dist/prosekit-vue-resizable.d.ts"
94
112
  ],
95
- "components/popover-suggestion": [
96
- "./dist/prosekit-vue-components-popover-suggestion.d.ts"
113
+ "tooltip": [
114
+ "./dist/prosekit-vue-tooltip.d.ts"
97
115
  ]
98
116
  }
99
117
  }
@@ -1,9 +0,0 @@
1
- import { MenuItem as MenuItem$1 } from '@prosekit/lit/elements/menu-item';
2
-
3
- /**
4
- * @module @prosekit/vue/components/menu-item
5
- */
6
-
7
- declare const MenuItem: (props: Partial<MenuItem$1> & {}) => any;
8
-
9
- export { MenuItem };
@@ -1,14 +0,0 @@
1
- // src/components/menu-item.gen.ts
2
- import "@prosekit/lit/elements/menu-item";
3
- import { defineComponent, h } from "vue";
4
- var MenuItem = defineComponent(
5
- (props, { slots }) => {
6
- return () => {
7
- var _a;
8
- return h("prosekit-menu-item", props, (_a = slots.default) == null ? void 0 : _a.call(slots));
9
- };
10
- }
11
- );
12
- export {
13
- MenuItem
14
- };
@@ -1,9 +0,0 @@
1
- import { Menu as Menu$1 } from '@prosekit/lit/elements/menu';
2
-
3
- /**
4
- * @module @prosekit/vue/components/menu
5
- */
6
-
7
- declare const Menu: (props: Partial<Menu$1> & {}) => any;
8
-
9
- export { Menu };
@@ -1,14 +0,0 @@
1
- // src/components/menu.gen.ts
2
- import "@prosekit/lit/elements/menu";
3
- import { defineComponent, h } from "vue";
4
- var Menu = defineComponent(
5
- (props, { slots }) => {
6
- return () => {
7
- var _a;
8
- return h("prosekit-menu", props, (_a = slots.default) == null ? void 0 : _a.call(slots));
9
- };
10
- }
11
- );
12
- export {
13
- Menu
14
- };
@@ -1,18 +0,0 @@
1
- import { Editor } from '@prosekit/core';
2
- import { PredictionRule, PopoverSuggestionContext } from '@prosekit/lit/elements/popover-suggestion';
3
- export { PopoverSuggestionContext, PredictionRule } from '@prosekit/lit/elements/popover-suggestion';
4
-
5
- /**
6
- * @module @prosekit/vue/components/popover-suggestion
7
- */
8
-
9
- interface PopoverSuggestionProps {
10
- editor: Editor;
11
- rules: PredictionRule[];
12
- }
13
- interface PopoverSuggestionSlots {
14
- default: PopoverSuggestionContext;
15
- }
16
- declare const PopoverSuggestion: (props: PopoverSuggestionProps & {}) => any;
17
-
18
- export { PopoverSuggestion, PopoverSuggestionProps, PopoverSuggestionSlots };
@@ -1,42 +0,0 @@
1
- // src/components/popover-suggestion.ts
2
- import { defineComponent as defineComponent2, h as h2, ref } from "vue";
3
-
4
- // src/components/popover-suggestion.gen.ts
5
- import "@prosekit/lit/elements/popover-suggestion";
6
- import { defineComponent, h } from "vue";
7
- var PopoverSuggestion = defineComponent(
8
- (props, { slots }) => {
9
- return () => {
10
- var _a;
11
- return h("prosekit-popover-suggestion", props, (_a = slots.default) == null ? void 0 : _a.call(slots));
12
- };
13
- }
14
- );
15
-
16
- // src/components/popover-suggestion.ts
17
- var PopoverSuggestion2 = defineComponent2(
18
- ({ editor, rules }, { slots }) => {
19
- const contextRef = ref(null);
20
- const onContext = (context) => {
21
- contextRef.value = context;
22
- };
23
- return () => {
24
- const context = contextRef.value;
25
- return h2(
26
- PopoverSuggestion,
27
- {
28
- ".editor": editor,
29
- ".rules": rules,
30
- ".onContext": onContext
31
- },
32
- () => {
33
- var _a;
34
- return (_a = slots.default) == null ? void 0 : _a.call(slots, context);
35
- }
36
- );
37
- };
38
- }
39
- );
40
- export {
41
- PopoverSuggestion2 as PopoverSuggestion
42
- };
@@ -1,9 +0,0 @@
1
- import { Popover as Popover$1 } from '@prosekit/lit/elements/popover';
2
-
3
- /**
4
- * @module @prosekit/vue/components/popover
5
- */
6
-
7
- declare const Popover: (props: Partial<Popover$1> & {}) => any;
8
-
9
- export { Popover };
@@ -1,14 +0,0 @@
1
- // src/components/popover.gen.ts
2
- import "@prosekit/lit/elements/popover";
3
- import { defineComponent, h } from "vue";
4
- var Popover = defineComponent(
5
- (props, { slots }) => {
6
- return () => {
7
- var _a;
8
- return h("prosekit-popover", props, (_a = slots.default) == null ? void 0 : _a.call(slots));
9
- };
10
- }
11
- );
12
- export {
13
- Popover
14
- };
package/src/index.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * @module @prosekit/vue
3
- */
4
-
5
- export { ProseKit, type ProseKitProps } from './components/prosekit'
6
- export { useKeymap } from './hooks/use-keymap'
7
- export { useEditor } from './hooks/use-editor'