@prosekit/vue 0.8.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { AutocompleteItemEvents, AutocompleteItemProps as AutocompleteItemProps$
3
3
  /** Props for the {@link AutocompleteEmpty} Vue component. */
4
4
  interface AutocompleteEmptyProps {}
5
5
  /** A Vue component that renders an `prosekit-autocomplete-empty` custom element. */
6
- declare const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes>;
6
+ export declare const AutocompleteEmpty: DefineSetupFnComponent<AutocompleteEmptyProps & HTMLAttributes>;
7
7
  /** Props for the {@link AutocompleteItem} Vue component. */
8
8
  interface AutocompleteItemProps {
9
9
  /**
@@ -24,7 +24,7 @@ interface AutocompleteItemProps {
24
24
  onSelect?: (event: AutocompleteItemEvents['select']) => void;
25
25
  }
26
26
  /** A Vue component that renders an `prosekit-autocomplete-item` custom element. */
27
- declare const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes>;
27
+ export declare const AutocompleteItem: DefineSetupFnComponent<AutocompleteItemProps & HTMLAttributes>;
28
28
  /** Props for the {@link AutocompletePopup} Vue component. */
29
29
  interface AutocompletePopupProps {
30
30
  /**
@@ -39,7 +39,7 @@ interface AutocompletePopupProps {
39
39
  onValuesChange?: (event: AutocompletePopupEvents['valuesChange']) => void;
40
40
  }
41
41
  /** A Vue component that renders an `prosekit-autocomplete-popup` custom element. */
42
- declare const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes>;
42
+ export declare const AutocompletePopup: DefineSetupFnComponent<AutocompletePopupProps & HTMLAttributes>;
43
43
  /** Props for the {@link AutocompletePositioner} Vue component. */
44
44
  interface AutocompletePositionerProps {
45
45
  /**
@@ -146,7 +146,7 @@ interface AutocompletePositionerProps {
146
146
  altBoundary?: AutocompletePositionerProps$1['altBoundary'];
147
147
  }
148
148
  /** A Vue component that renders an `prosekit-autocomplete-positioner` custom element. */
149
- declare const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes>;
149
+ export declare const AutocompletePositioner: DefineSetupFnComponent<AutocompletePositionerProps & HTMLAttributes>;
150
150
  /** Props for the {@link AutocompleteRoot} Vue component. */
151
151
  interface AutocompleteRootProps {
152
152
  /**
@@ -212,6 +212,6 @@ interface AutocompleteRootProps {
212
212
  onValuesChange?: (event: AutocompleteRootEvents['valuesChange']) => void;
213
213
  }
214
214
  /** A Vue component that renders an `prosekit-autocomplete-root` custom element. */
215
- declare const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes>;
216
- export { AutocompleteEmpty, type AutocompleteEmptyProps, AutocompleteItem, type AutocompleteItemProps, AutocompletePopup, type AutocompletePopupProps, AutocompletePositioner, type AutocompletePositionerProps, AutocompleteRoot, type AutocompleteRootProps };
215
+ export declare const AutocompleteRoot: DefineSetupFnComponent<AutocompleteRootProps & HTMLAttributes>;
216
+ export type { AutocompleteEmptyProps, AutocompleteItemProps, AutocompletePopupProps, AutocompletePositionerProps, AutocompleteRootProps };
217
217
  //# sourceMappingURL=autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAMiB;;cAGJ,mBAAmB,uBAAuB,yBAAyB;;UCH/D;;;;;;;;EAQf,QAAQ;;;;;;EAMR,WAAW;;EAEX,YAAY,OAAO;;;cAIR,kBAAkB,uBAAuB,wBAAwB;;UCpB7D;;;;;EAKf,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;cAId,mBAAmB,uBAAuB,yBAAyB;;UCd/D;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;EAEP,SAAS;;EAET,QAAQ;;EAER,cAAc;;EAEd,WAAW;;EAEX,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,wBAAwB,uBAAuB,8BAA8B;;UCxGzE;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;;;;;EAOR,SAAS;;;;;;;;;;EAUT,eAAe;;;;;;;;;EASf,SAAS;;;;;;;;EAQT,eAAe;;EAEf,gBAAgB,OAAO;;EAEvB,iBAAiB,OAAO;;;;;EAKxB,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;cAId,kBAAkB,uBAAuB,wBAAwB"}
1
+ {"version":3,"file":"autocomplete.d.ts","names":[],"sources":["../src/components/autocomplete/autocomplete-empty.gen.ts","../src/components/autocomplete/autocomplete-item.gen.ts","../src/components/autocomplete/autocomplete-popup.gen.ts","../src/components/autocomplete/autocomplete-positioner.gen.ts","../src/components/autocomplete/autocomplete-root.gen.ts"],"mappings":";;;UAMiB;;qBAGJ,mBAAmB,uBAAuB,yBAAyB;;UCH/D;;;;;;;;EAQf,QAAQ;;;;;;EAMR,WAAW;;EAEX,YAAY,OAAO;;;qBAIR,kBAAkB,uBAAuB,wBAAwB;;UCpB7D;;;;;EAKf,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;qBAId,mBAAmB,uBAAuB,yBAAyB;;UCd/D;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;EAEP,SAAS;;EAET,QAAQ;;EAER,cAAc;;EAEd,WAAW;;EAEX,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,wBAAwB,uBAAuB,8BAA8B;;UCxGzE;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;;;;;EAOR,SAAS;;;;;;;;;;EAUT,eAAe;;;;;;;;;EASf,SAAS;;;;;;;;EAQT,eAAe;;EAEf,gBAAgB,OAAO;;EAEvB,iBAAiB,OAAO;;;;;EAKxB,iBAAiB,OAAO;;;;;EAKxB,kBAAkB,OAAO;;;qBAId,kBAAkB,uBAAuB,wBAAwB"}
@@ -11,7 +11,7 @@ interface BlockHandleAddProps {
11
11
  editor?: BlockHandleAddProps$1['editor'];
12
12
  }
13
13
  /** A Vue component that renders an `prosekit-block-handle-add` custom element. */
14
- declare const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes>;
14
+ export declare const BlockHandleAdd: DefineSetupFnComponent<BlockHandleAddProps & HTMLAttributes>;
15
15
  /** Props for the {@link BlockHandleDraggable} Vue component. */
16
16
  interface BlockHandleDraggableProps {
17
17
  /**
@@ -23,11 +23,11 @@ interface BlockHandleDraggableProps {
23
23
  editor?: BlockHandleDraggableProps$1['editor'];
24
24
  }
25
25
  /** A Vue component that renders an `prosekit-block-handle-draggable` custom element. */
26
- declare const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes>;
26
+ export declare const BlockHandleDraggable: DefineSetupFnComponent<BlockHandleDraggableProps & HTMLAttributes>;
27
27
  /** Props for the {@link BlockHandlePopup} Vue component. */
28
28
  interface BlockHandlePopupProps {}
29
29
  /** A Vue component that renders an `prosekit-block-handle-popup` custom element. */
30
- declare const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes>;
30
+ export declare const BlockHandlePopup: DefineSetupFnComponent<BlockHandlePopupProps & HTMLAttributes>;
31
31
  /** Props for the {@link BlockHandlePositioner} Vue component. */
32
32
  interface BlockHandlePositionerProps {
33
33
  /**
@@ -152,7 +152,7 @@ interface BlockHandlePositionerProps {
152
152
  altBoundary?: BlockHandlePositionerProps$1['altBoundary'];
153
153
  }
154
154
  /** A Vue component that renders an `prosekit-block-handle-positioner` custom element. */
155
- declare const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes>;
155
+ export declare const BlockHandlePositioner: DefineSetupFnComponent<BlockHandlePositionerProps & HTMLAttributes>;
156
156
  /** Props for the {@link BlockHandleRoot} Vue component. */
157
157
  interface BlockHandleRootProps {
158
158
  /**
@@ -166,6 +166,6 @@ interface BlockHandleRootProps {
166
166
  onStateChange?: (event: BlockHandleRootEvents['stateChange']) => void;
167
167
  }
168
168
  /** A Vue component that renders an `prosekit-block-handle-root` custom element. */
169
- declare const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes>;
170
- export { BlockHandleAdd, type BlockHandleAddProps, BlockHandleDraggable, type BlockHandleDraggableProps, BlockHandlePopup, type BlockHandlePopupProps, BlockHandlePositioner, type BlockHandlePositionerProps, BlockHandleRoot, type BlockHandleRootProps };
169
+ export declare const BlockHandleRoot: DefineSetupFnComponent<BlockHandleRootProps & HTMLAttributes>;
170
+ export type { BlockHandleAddProps, BlockHandleDraggableProps, BlockHandlePopupProps, BlockHandlePositionerProps, BlockHandleRootProps };
171
171
  //# sourceMappingURL=block-handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"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":";;;UAQiB;;;;;;;EAOf,SAAS;;;cAIE,gBAAgB,uBAAuB,sBAAsB;;UCXzD;;;;;;;EAOf,SAAS;;;cAIE,sBAAsB,uBAAuB,4BAA4B;;UCbrE;;cAGJ,kBAAkB,uBAAuB,wBAAwB;;UCH7D;;;;;;EAMf,YAAY;;;;;;;EAOZ,QAAQ;;;;;EAKR,OAAO;;;;;EAKP,QAAQ;;;;;EAKR,OAAO;;;;;;EAMP,WAAW;;;;;;;;EAQX,aAAa;;;;;;EAMb,SAAS;;;;;;;EAOT,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,uBAAuB,uBAAuB,6BAA6B;;UC1HvE;;;;;;;EAOf,SAAS;;EAET,iBAAiB,OAAO;;;cAIb,iBAAiB,uBAAuB,uBAAuB"}
1
+ {"version":3,"file":"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":";;;UAQiB;;;;;;;EAOf,SAAS;;;qBAIE,gBAAgB,uBAAuB,sBAAsB;;UCXzD;;;;;;;EAOf,SAAS;;;qBAIE,sBAAsB,uBAAuB,4BAA4B;;UCbrE;;qBAGJ,kBAAkB,uBAAuB,wBAAwB;;UCH7D;;;;;;EAMf,YAAY;;;;;;;EAOZ,QAAQ;;;;;EAKR,OAAO;;;;;EAKP,QAAQ;;;;;EAKR,OAAO;;;;;;EAMP,WAAW;;;;;;;;EAQX,aAAa;;;;;;EAMb,SAAS;;;;;;;EAOT,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,uBAAuB,uBAAuB,6BAA6B;;UC1HvE;;;;;;;EAOf,SAAS;;EAET,iBAAiB,OAAO;;;qBAIb,iBAAiB,uBAAuB,uBAAuB"}
@@ -17,6 +17,6 @@ interface DropIndicatorProps {
17
17
  width?: DropIndicatorProps$1['width'];
18
18
  }
19
19
  /** A Vue component that renders an `prosekit-drop-indicator` custom element. */
20
- declare const DropIndicator: DefineSetupFnComponent<DropIndicatorProps & HTMLAttributes>;
21
- export { DropIndicator, type DropIndicatorProps };
20
+ export declare const DropIndicator: DefineSetupFnComponent<DropIndicatorProps & HTMLAttributes>;
21
+ export type { DropIndicatorProps };
22
22
  //# sourceMappingURL=drop-indicator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAQiB;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;cAIG,eAAe,uBAAuB,qBAAqB"}
1
+ {"version":3,"file":"drop-indicator.d.ts","names":[],"sources":["../src/components/drop-indicator/drop-indicator.gen.ts"],"mappings":";;;UAQiB;;;;;;;EAOf,SAAS;;;;;;EAMT,QAAQ;;;qBAIG,eAAe,uBAAuB,qBAAqB"}
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ interface ProseKitProps {
10
10
  /**
11
11
  * The root component for a ProseKit editor.
12
12
  */
13
- declare const ProseKit: DefineSetupFnComponent<ProseKitProps>;
13
+ export declare const ProseKit: DefineSetupFnComponent<ProseKitProps>;
14
14
  interface VueMarkViewProps extends MarkViewContext {}
15
15
  type VueMarkViewComponent = DefineComponent<VueMarkViewProps, any, any>;
16
16
  /**
@@ -25,7 +25,7 @@ interface VueMarkViewOptions extends CoreMarkViewUserOptions<VueMarkViewComponen
25
25
  /**
26
26
  * Defines a mark view using a Vue component.
27
27
  */
28
- declare function defineVueMarkView(options: VueMarkViewOptions): Extension;
28
+ export declare function defineVueMarkView(options: VueMarkViewOptions): Extension;
29
29
  interface VueNodeViewProps extends NodeViewContext {}
30
30
  type VueNodeViewComponent = DefineComponent<VueNodeViewProps, any, any>;
31
31
  /**
@@ -40,7 +40,7 @@ interface VueNodeViewOptions extends CoreNodeViewUserOptions<VueNodeViewComponen
40
40
  /**
41
41
  * Defines a node view using a Vue component.
42
42
  */
43
- declare function defineVueNodeView(options: VueNodeViewOptions): Extension;
43
+ export declare function defineVueNodeView(options: VueNodeViewOptions): Extension;
44
44
  interface UseExtensionOptions {
45
45
  /**
46
46
  * The editor to add the extension to. If not provided, it will use the
@@ -55,7 +55,7 @@ interface UseExtensionOptions {
55
55
  /**
56
56
  * Add an extension to the editor.
57
57
  */
58
- declare function useExtension(
58
+ export declare function useExtension(
59
59
  /**
60
60
  * The ref to an extension to add to the editor. If it changes, the previous
61
61
  * extension will be removed and the new one (if not null) will be added.
@@ -64,7 +64,7 @@ extension: MaybeRefOrGetter<Extension | null>, options?: UseExtensionOptions): v
64
64
  /**
65
65
  * Calls the given handler whenever the editor document changes.
66
66
  */
67
- declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
67
+ export declare function useDocChange(handler: (doc: ProseMirrorNode) => void, options?: UseExtensionOptions): void;
68
68
  interface UseEditorDerivedOptions<E extends Extension = any> {
69
69
  /**
70
70
  * The editor to add the extension to. If not provided, it will use the
@@ -82,7 +82,7 @@ interface UseEditorDerivedOptions<E extends Extension = any> {
82
82
  * It returns a shallow ref of the derived value that updates whenever the editor
83
83
  * state changes.
84
84
  */
85
- declare function useEditorDerivedValue<E extends Extension, Derived>(
85
+ export declare function useEditorDerivedValue<E extends Extension, Derived>(
86
86
  /**
87
87
  * A function that receives the editor instance and returns a derived value.
88
88
  *
@@ -93,7 +93,7 @@ derive: (editor: Editor<E>) => Derived, options?: UseEditorDerivedOptions<E>): S
93
93
  /**
94
94
  * Retrieves the editor instance from the nearest ProseKit component.
95
95
  */
96
- declare function useEditor<E extends Extension = any>(options?: {
96
+ export declare function useEditor<E extends Extension = any>(options?: {
97
97
  /**
98
98
  * Whether to update the component when the editor is mounted or editor state
99
99
  * is updated.
@@ -102,10 +102,10 @@ declare function useEditor<E extends Extension = any>(options?: {
102
102
  */
103
103
  update?: boolean;
104
104
  }): ShallowRef<Editor<E>>;
105
- declare function useKeymap(keymap: MaybeRefOrGetter<Keymap>, options?: UseExtensionOptions): void;
105
+ export declare function useKeymap(keymap: MaybeRefOrGetter<Keymap>, options?: UseExtensionOptions): void;
106
106
  /**
107
107
  * Calls the given handler whenever the editor state changes.
108
108
  */
109
- declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
110
- export { ProseKit, type ProseKitProps, type UseEditorDerivedOptions, type UseExtensionOptions, type VueMarkViewComponent, type VueMarkViewOptions, type VueMarkViewProps, type VueNodeViewComponent, type VueNodeViewOptions, type VueNodeViewProps, defineVueMarkView, defineVueNodeView, useDocChange, useEditor, useEditorDerivedValue, useExtension, useKeymap, useStateUpdate };
109
+ export declare function useStateUpdate(handler: (state: EditorState) => void, options?: UseExtensionOptions): void;
110
+ export type { ProseKitProps, UseEditorDerivedOptions, UseExtensionOptions, VueMarkViewComponent, VueMarkViewOptions, VueMarkViewProps, VueNodeViewComponent, VueNodeViewOptions, VueNodeViewProps };
111
111
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"mappings":";;;;;;UAOiB;EACf,QAAQ;;;;;cAMG,UAAU,uBAAuB;UCH7B,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;iBAqCc,kBAAkB,SAAS,qBAAqB;UChD/C,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;iBAqCc,kBAAkB,SAAS,qBAAqB;UCrD/C;;;;;EAKf,SAAS,iBAAiB;;;;EAK1B,WAAW;;;;;iBAMG,aAKd;;;;;AAAA,WAAW,iBAAiB,mBAC5B,UAAU;;;;iBCpBI,aACd,UAAU,KAAK,0BACf,UAAU;UCLK,wBAAwB,UAAU;;;;;EAKjD,SAAS,iBAAiB,OAAO;;;;;;;;;;;;iBAanB,sBAAsB,UAAU,WAAW,SAOzD;;;;;;;AAAA,SAAS,QAAQ,OAAO,OAAO,SAC/B,UAAU,wBAAwB,KACjC,WAAW;;;;iBCxBE,UAAU,UAAU,iBAAiB;;;;;;;EAOnD;IACE,WAAW,OAAO;iBCXN,UACd,QAAQ,iBAAiB,SACzB,UAAU;;;;iBCCI,eACd,UAAU,OAAO,sBACjB,UAAU"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/prosekit.ts","../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-editor.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"mappings":";;;;;;UAOiB;EACf,QAAQ;;;;;qBAMG,UAAU,uBAAuB;UCH7B,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;wBAqCc,kBAAkB,SAAS,qBAAqB;UChD/C,yBAAyB;KAE9B,uBAAuB,gBAAgB;;;;UAKlC,2BAA2B,wBAAwB;;;;EAIlE;;;;;wBAqCc,kBAAkB,SAAS,qBAAqB;UCrD/C;;;;;EAKf,SAAS,iBAAiB;;;;EAK1B,WAAW;;;;;wBAMG,aAKd;;;;;AAAA,WAAW,iBAAiB,mBAC5B,UAAU;;;;wBCpBI,aACd,UAAU,KAAK,0BACf,UAAU;UCLK,wBAAwB,UAAU;;;;;EAKjD,SAAS,iBAAiB,OAAO;;;;;;;;;;;;wBAanB,sBAAsB,UAAU,WAAW,SAOzD;;;;;;;AAAA,SAAS,QAAQ,OAAO,OAAO,SAC/B,UAAU,wBAAwB,KACjC,WAAW;;;;wBCxBE,UAAU,UAAU,iBAAiB;;;;;;;EAOnD;IACE,WAAW,OAAO;wBCXN,UACd,QAAQ,iBAAiB,SACzB,UAAU;;;;wBCCI,eACd,UAAU,OAAO,sBACjB,UAAU"}
package/dist/index.js CHANGED
@@ -124,7 +124,9 @@ const ProseKit = defineComponent({
124
124
  } },
125
125
  setup: (props, { slots }) => {
126
126
  provideEditor(props.editor);
127
- return () => h(ViewRenderer, { editor: props.editor }, () => slots.default?.());
127
+ return () => {
128
+ return h(ViewRenderer, { editor: props.editor }, () => slots.default?.());
129
+ };
128
130
  }
129
131
  });
130
132
  /**
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-editor-extension.ts","../src/components/view-renderer.ts","../src/components/prosekit.ts","../src/hooks/use-priority-extension.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"sourcesContent":["import { defineMarkViewComponent, defineMarkViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractVueMarkView,\n buildVueMarkViewCreator,\n type MarkViewContext,\n type VueRendererComponent,\n type VueRendererResult,\n} from '@prosemirror-adapter/vue'\nimport { defineComponent, h, markRaw, Teleport, type DefineComponent } from 'vue'\n\nexport interface VueMarkViewProps extends MarkViewContext {}\n\nexport type VueMarkViewComponent = DefineComponent<VueMarkViewProps, any, any>\n\n/**\n * Options for {@link defineVueMarkView}.\n */\nexport interface VueMarkViewOptions extends CoreMarkViewUserOptions<VueMarkViewComponent> {\n /**\n * The name of the mark type.\n */\n name: string\n}\n\nclass ProseKitVueMarkView extends AbstractVueMarkView<VueMarkViewComponent> {\n render = (): VueRendererComponent => {\n const UserComponent = this.component\n const render = () => {\n const props = this.context\n return h(Teleport, { key: this.key, to: this.dom }, [h(UserComponent, props)])\n }\n const RendererComponent: VueRendererComponent = defineComponent({\n name: 'ProsemirrorMarkView',\n setup: () => {\n return render\n },\n })\n return markRaw(RendererComponent)\n }\n}\n\n/**\n * @internal\n */\nexport function defineVueMarkViewFactory(\n renderVueRenderer: VueRendererResult['renderVueRenderer'],\n removeVueRenderer: VueRendererResult['removeVueRenderer'],\n): Extension {\n const factory = buildVueMarkViewCreator(renderVueRenderer, removeVueRenderer, ProseKitVueMarkView)\n return defineMarkViewFactory<VueMarkViewOptions>({\n group: 'vue',\n factory,\n })\n}\n\n/**\n * Defines a mark view using a Vue component.\n */\nexport function defineVueMarkView(options: VueMarkViewOptions): Extension {\n return defineMarkViewComponent<VueMarkViewOptions>({\n group: 'vue',\n name: options.name,\n args: options,\n })\n}\n","import { defineNodeViewComponent, defineNodeViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractVueNodeView,\n buildVueNodeViewCreator,\n type NodeViewContext,\n type VueRendererComponent,\n type VueRendererResult,\n} from '@prosemirror-adapter/vue'\nimport { defineComponent, h, markRaw, Teleport, type DefineComponent } from 'vue'\n\nexport interface VueNodeViewProps extends NodeViewContext {}\n\nexport type VueNodeViewComponent = DefineComponent<VueNodeViewProps, any, any>\n\n/**\n * Options for {@link defineVueNodeView}.\n */\nexport interface VueNodeViewOptions extends CoreNodeViewUserOptions<VueNodeViewComponent> {\n /**\n * The name of the node type.\n */\n name: string\n}\n\nclass ProseKitVueNodeView extends AbstractVueNodeView<VueNodeViewComponent> {\n render = (): VueRendererComponent => {\n const UserComponent = this.component\n const render = () => {\n const props = this.context\n return h(Teleport, { key: this.key, to: this.dom }, [h(UserComponent, props)])\n }\n const RendererComponent: VueRendererComponent = defineComponent({\n name: 'ProsemirrorNodeView',\n setup: () => {\n return render\n },\n })\n return markRaw(RendererComponent)\n }\n}\n\n/**\n * @internal\n */\nexport function defineVueNodeViewFactory(\n renderVueRenderer: VueRendererResult['renderVueRenderer'],\n removeVueRenderer: VueRendererResult['removeVueRenderer'],\n): Extension {\n const factory = buildVueNodeViewCreator(renderVueRenderer, removeVueRenderer, ProseKitVueNodeView)\n return defineNodeViewFactory<VueNodeViewOptions>({\n group: 'vue',\n factory,\n })\n}\n\n/**\n * Defines a node view using a Vue component.\n */\nexport function defineVueNodeView(options: VueNodeViewOptions): Extension {\n return defineNodeViewComponent<VueNodeViewOptions>({\n group: 'vue',\n name: options.name,\n args: options,\n })\n}\n","import { EditorNotFoundError, type Editor, type Extension } from '@prosekit/core'\nimport { toValue, watchPostEffect, type MaybeRefOrGetter } from 'vue'\n\nimport { useEditorContext } from '../injection/editor-context.ts'\n\n/**\n * @internal\n */\nexport function useEditorExtension(\n editorRef: MaybeRefOrGetter<Editor> | null | undefined,\n extensionRef: MaybeRefOrGetter<Extension | null> | null,\n): void {\n const editorContext = useEditorContext()\n\n watchPostEffect((onCleanup) => {\n const editor = toValue(editorRef) || toValue(editorContext)\n const extension = toValue(extensionRef)\n\n if (!editor) {\n throw new EditorNotFoundError()\n }\n if (extension) {\n onCleanup(editor.use(extension))\n }\n })\n}\n","import { union, type Editor } from '@prosekit/core'\nimport { useVueRenderer } from '@prosemirror-adapter/vue'\nimport { defineComponent, type DefineSetupFnComponent, type PropType } from 'vue'\n\nimport { defineVueMarkViewFactory } from '../extensions/vue-mark-view.ts'\nimport { defineVueNodeViewFactory } from '../extensions/vue-node-view.ts'\nimport { useEditorExtension } from '../hooks/use-editor-extension.ts'\n\n/**\n * @internal\n */\ninterface ViewRendererProps {\n editor: Editor\n}\n\n/**\n * @internal\n */\nexport const ViewRenderer: DefineSetupFnComponent<ViewRendererProps> = defineComponent<ViewRendererProps>({\n name: 'ViewRenderer',\n props: { editor: { type: Object as PropType<Editor>, required: true } },\n setup: (props, { slots }) => {\n const { renderVueRenderer, removeVueRenderer, render } = useVueRenderer()\n\n const extension = union([\n defineVueMarkViewFactory(renderVueRenderer, removeVueRenderer),\n defineVueNodeViewFactory(renderVueRenderer, removeVueRenderer),\n ])\n\n useEditorExtension(() => props.editor, extension)\n\n return () => [slots.default?.(), render()]\n },\n})\n","import type { Editor } from '@prosekit/core'\nimport { defineComponent, h, type DefineSetupFnComponent, type PropType } from 'vue'\n\nimport { provideEditor } from '../injection/editor-context.ts'\n\nimport { ViewRenderer } from './view-renderer.ts'\n\nexport interface ProseKitProps {\n editor: Editor\n}\n\n/**\n * The root component for a ProseKit editor.\n */\nexport const ProseKit: DefineSetupFnComponent<ProseKitProps> = defineComponent<ProseKitProps>({\n name: 'ProseKit',\n props: { editor: { type: Object as PropType<Editor>, required: true } },\n setup: (props, { slots }) => {\n provideEditor(props.editor)\n return () =>\n h(\n ViewRenderer,\n { editor: props.editor },\n () => slots.default?.(),\n )\n },\n})\n","import { withPriority, type Extension, type Priority } from '@prosekit/core'\nimport { computed, toValue, type ComputedRef, type MaybeRefOrGetter } from 'vue'\n\n/**\n * @internal\n */\nexport function usePriorityExtension<T extends Extension = Extension>(\n extension: MaybeRefOrGetter<T | null>,\n priority: Priority | null | undefined,\n): ComputedRef<T | null> {\n return computed(() => {\n const ext = toValue(extension)\n return ext && priority ? withPriority(ext, priority) : ext\n })\n}\n","import type { Editor, Extension, Priority } from '@prosekit/core'\nimport type { MaybeRefOrGetter } from 'vue'\n\nimport { useEditorExtension } from './use-editor-extension.ts'\nimport { usePriorityExtension } from './use-priority-extension.ts'\n\nexport interface UseExtensionOptions {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeRefOrGetter<Editor>\n\n /**\n * Optional priority to add the extension with.\n */\n priority?: Priority\n}\n\n/**\n * Add an extension to the editor.\n */\nexport function useExtension(\n /**\n * The ref to an extension to add to the editor. If it changes, the previous\n * extension will be removed and the new one (if not null) will be added.\n */\n extension: MaybeRefOrGetter<Extension | null>,\n options?: UseExtensionOptions,\n): void {\n useEditorExtension(\n options?.editor,\n usePriorityExtension(extension, options?.priority),\n )\n}\n","import { defineDocChangeHandler } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor document changes.\n */\nexport function useDocChange(\n handler: (doc: ProseMirrorNode) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineDocChangeHandler((view) => handler(view.state.doc))\n useExtension(extension, options)\n}\n","import { defineMountHandler, defineUpdateHandler, ProseKitError, union, type Editor, type Extension } from '@prosekit/core'\nimport { onMounted, onUnmounted, shallowRef, triggerRef, type ShallowRef } from 'vue'\n\nimport { useEditorContext } from '../injection/editor-context.ts'\n\n/**\n * Retrieves the editor instance from the nearest ProseKit component.\n */\nexport function useEditor<E extends Extension = any>(options?: {\n /**\n * Whether to update the component when the editor is mounted or editor state\n * is updated.\n *\n * @default false\n */\n update?: boolean\n}): ShallowRef<Editor<E>> {\n const update = options?.update ?? false\n\n const editor = useEditorContext<E>()\n if (!editor) {\n throw new ProseKitError(\n 'useEditor must be used within the ProseKit component',\n )\n }\n\n const editorRef = shallowRef<Editor<E>>(editor)\n\n if (update) {\n const forceUpdate = () => triggerRef(editorRef)\n onMounted(() => {\n const extension = union(\n defineMountHandler(forceUpdate),\n defineUpdateHandler(forceUpdate),\n )\n const dispose = editor.use(extension)\n onUnmounted(dispose)\n })\n }\n\n return editorRef\n}\n","import type { Editor, Extension } from '@prosekit/core'\nimport { computed, toValue, type MaybeRefOrGetter, type Ref, type ShallowRef } from 'vue'\n\nimport { useEditor } from './use-editor.ts'\n\nexport interface UseEditorDerivedOptions<E extends Extension = any> {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeRefOrGetter<Editor<E>>\n}\n\n/**\n * Runs a function to derive a value from the editor instance after editor state\n * changes.\n *\n * This is useful when you need to render something based on the editor state,\n * for example, whether the selected text is wrapped in an italic mark.\n *\n * It returns a shallow ref of the derived value that updates whenever the editor\n * state changes.\n */\nexport function useEditorDerivedValue<E extends Extension, Derived>(\n /**\n * A function that receives the editor instance and returns a derived value.\n *\n * It will be called whenever the editor's document state changes, or when it\n * mounts.\n */\n derive: (editor: Editor<E>) => Derived,\n options?: UseEditorDerivedOptions<E>,\n): ShallowRef<Derived> {\n const initialEditor = options?.editor\n const editorAccessor: Ref<Editor<E>> = initialEditor\n ? computed(() => toValue(initialEditor))\n : useEditor<E>({ update: true })\n\n return computed(() => derive(toValue(editorAccessor)))\n}\n","import { defineKeymap, type Keymap } from '@prosekit/core'\nimport { computed, toValue, type MaybeRefOrGetter } from 'vue'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\nexport function useKeymap(\n keymap: MaybeRefOrGetter<Keymap>,\n options?: UseExtensionOptions,\n): void {\n const extension = computed(() => defineKeymap(toValue(keymap)))\n useExtension(extension, options)\n}\n","import { defineUpdateHandler } from '@prosekit/core'\nimport type { EditorState } from '@prosekit/pm/state'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor state changes.\n */\nexport function useStateUpdate(\n handler: (state: EditorState) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineUpdateHandler((view) => handler(view.state))\n useExtension(extension, options)\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/extensions/vue-mark-view.ts","../src/extensions/vue-node-view.ts","../src/hooks/use-editor-extension.ts","../src/components/view-renderer.ts","../src/components/prosekit.ts","../src/hooks/use-priority-extension.ts","../src/hooks/use-extension.ts","../src/hooks/use-doc-change.ts","../src/hooks/use-editor.ts","../src/hooks/use-editor-derived-value.ts","../src/hooks/use-keymap.ts","../src/hooks/use-state-update.ts"],"sourcesContent":["import { defineMarkViewComponent, defineMarkViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreMarkViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractVueMarkView,\n buildVueMarkViewCreator,\n type MarkViewContext,\n type VueRendererComponent,\n type VueRendererResult,\n} from '@prosemirror-adapter/vue'\nimport { defineComponent, h, markRaw, Teleport, type DefineComponent } from 'vue'\n\nexport interface VueMarkViewProps extends MarkViewContext {}\n\nexport type VueMarkViewComponent = DefineComponent<VueMarkViewProps, any, any>\n\n/**\n * Options for {@link defineVueMarkView}.\n */\nexport interface VueMarkViewOptions extends CoreMarkViewUserOptions<VueMarkViewComponent> {\n /**\n * The name of the mark type.\n */\n name: string\n}\n\nclass ProseKitVueMarkView extends AbstractVueMarkView<VueMarkViewComponent> {\n render = (): VueRendererComponent => {\n const UserComponent = this.component\n const render = () => {\n const props = this.context\n return h(Teleport, { key: this.key, to: this.dom }, [h(UserComponent, props)])\n }\n const RendererComponent: VueRendererComponent = defineComponent({\n name: 'ProsemirrorMarkView',\n setup: () => {\n return render\n },\n })\n return markRaw(RendererComponent)\n }\n}\n\n/**\n * @internal\n */\nexport function defineVueMarkViewFactory(\n renderVueRenderer: VueRendererResult['renderVueRenderer'],\n removeVueRenderer: VueRendererResult['removeVueRenderer'],\n): Extension {\n const factory = buildVueMarkViewCreator(renderVueRenderer, removeVueRenderer, ProseKitVueMarkView)\n return defineMarkViewFactory<VueMarkViewOptions>({\n group: 'vue',\n factory,\n })\n}\n\n/**\n * Defines a mark view using a Vue component.\n */\nexport function defineVueMarkView(options: VueMarkViewOptions): Extension {\n return defineMarkViewComponent<VueMarkViewOptions>({\n group: 'vue',\n name: options.name,\n args: options,\n })\n}\n","import { defineNodeViewComponent, defineNodeViewFactory, type Extension } from '@prosekit/core'\nimport type { CoreNodeViewUserOptions } from '@prosemirror-adapter/core'\nimport {\n AbstractVueNodeView,\n buildVueNodeViewCreator,\n type NodeViewContext,\n type VueRendererComponent,\n type VueRendererResult,\n} from '@prosemirror-adapter/vue'\nimport { defineComponent, h, markRaw, Teleport, type DefineComponent } from 'vue'\n\nexport interface VueNodeViewProps extends NodeViewContext {}\n\nexport type VueNodeViewComponent = DefineComponent<VueNodeViewProps, any, any>\n\n/**\n * Options for {@link defineVueNodeView}.\n */\nexport interface VueNodeViewOptions extends CoreNodeViewUserOptions<VueNodeViewComponent> {\n /**\n * The name of the node type.\n */\n name: string\n}\n\nclass ProseKitVueNodeView extends AbstractVueNodeView<VueNodeViewComponent> {\n render = (): VueRendererComponent => {\n const UserComponent = this.component\n const render = () => {\n const props = this.context\n return h(Teleport, { key: this.key, to: this.dom }, [h(UserComponent, props)])\n }\n const RendererComponent: VueRendererComponent = defineComponent({\n name: 'ProsemirrorNodeView',\n setup: () => {\n return render\n },\n })\n return markRaw(RendererComponent)\n }\n}\n\n/**\n * @internal\n */\nexport function defineVueNodeViewFactory(\n renderVueRenderer: VueRendererResult['renderVueRenderer'],\n removeVueRenderer: VueRendererResult['removeVueRenderer'],\n): Extension {\n const factory = buildVueNodeViewCreator(renderVueRenderer, removeVueRenderer, ProseKitVueNodeView)\n return defineNodeViewFactory<VueNodeViewOptions>({\n group: 'vue',\n factory,\n })\n}\n\n/**\n * Defines a node view using a Vue component.\n */\nexport function defineVueNodeView(options: VueNodeViewOptions): Extension {\n return defineNodeViewComponent<VueNodeViewOptions>({\n group: 'vue',\n name: options.name,\n args: options,\n })\n}\n","import { EditorNotFoundError, type Editor, type Extension } from '@prosekit/core'\nimport { toValue, watchPostEffect, type MaybeRefOrGetter } from 'vue'\n\nimport { useEditorContext } from '../injection/editor-context.ts'\n\n/**\n * @internal\n */\nexport function useEditorExtension(\n editorRef: MaybeRefOrGetter<Editor> | null | undefined,\n extensionRef: MaybeRefOrGetter<Extension | null> | null,\n): void {\n const editorContext = useEditorContext()\n\n watchPostEffect((onCleanup) => {\n const editor = toValue(editorRef) || toValue(editorContext)\n const extension = toValue(extensionRef)\n\n if (!editor) {\n throw new EditorNotFoundError()\n }\n if (extension) {\n onCleanup(editor.use(extension))\n }\n })\n}\n","import { union, type Editor } from '@prosekit/core'\nimport { useVueRenderer } from '@prosemirror-adapter/vue'\nimport { defineComponent, type DefineSetupFnComponent, type PropType } from 'vue'\n\nimport { defineVueMarkViewFactory } from '../extensions/vue-mark-view.ts'\nimport { defineVueNodeViewFactory } from '../extensions/vue-node-view.ts'\nimport { useEditorExtension } from '../hooks/use-editor-extension.ts'\n\n/**\n * @internal\n */\ninterface ViewRendererProps {\n editor: Editor\n}\n\n/**\n * @internal\n */\nexport const ViewRenderer: DefineSetupFnComponent<ViewRendererProps> = defineComponent<ViewRendererProps>({\n name: 'ViewRenderer',\n props: { editor: { type: Object as PropType<Editor>, required: true } },\n setup: (props, { slots }) => {\n const { renderVueRenderer, removeVueRenderer, render } = useVueRenderer()\n\n const extension = union([\n defineVueMarkViewFactory(renderVueRenderer, removeVueRenderer),\n defineVueNodeViewFactory(renderVueRenderer, removeVueRenderer),\n ])\n\n useEditorExtension(() => props.editor, extension)\n\n return () => [slots.default?.(), render()]\n },\n})\n","import type { Editor } from '@prosekit/core'\nimport { defineComponent, h, type DefineSetupFnComponent, type PropType } from 'vue'\n\nimport { provideEditor } from '../injection/editor-context.ts'\n\nimport { ViewRenderer } from './view-renderer.ts'\n\nexport interface ProseKitProps {\n editor: Editor\n}\n\n/**\n * The root component for a ProseKit editor.\n */\nexport const ProseKit: DefineSetupFnComponent<ProseKitProps> = defineComponent<ProseKitProps>({\n name: 'ProseKit',\n props: { editor: { type: Object as PropType<Editor>, required: true } },\n setup: (props, { slots }) => {\n provideEditor(props.editor)\n return () => {\n return h(\n ViewRenderer,\n { editor: props.editor },\n () => slots.default?.(),\n )\n }\n },\n})\n","import { withPriority, type Extension, type Priority } from '@prosekit/core'\nimport { computed, toValue, type ComputedRef, type MaybeRefOrGetter } from 'vue'\n\n/**\n * @internal\n */\nexport function usePriorityExtension<T extends Extension = Extension>(\n extension: MaybeRefOrGetter<T | null>,\n priority: Priority | null | undefined,\n): ComputedRef<T | null> {\n return computed(() => {\n const ext = toValue(extension)\n return ext && priority ? withPriority(ext, priority) : ext\n })\n}\n","import type { Editor, Extension, Priority } from '@prosekit/core'\nimport type { MaybeRefOrGetter } from 'vue'\n\nimport { useEditorExtension } from './use-editor-extension.ts'\nimport { usePriorityExtension } from './use-priority-extension.ts'\n\nexport interface UseExtensionOptions {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeRefOrGetter<Editor>\n\n /**\n * Optional priority to add the extension with.\n */\n priority?: Priority\n}\n\n/**\n * Add an extension to the editor.\n */\nexport function useExtension(\n /**\n * The ref to an extension to add to the editor. If it changes, the previous\n * extension will be removed and the new one (if not null) will be added.\n */\n extension: MaybeRefOrGetter<Extension | null>,\n options?: UseExtensionOptions,\n): void {\n useEditorExtension(\n options?.editor,\n usePriorityExtension(extension, options?.priority),\n )\n}\n","import { defineDocChangeHandler } from '@prosekit/core'\nimport type { ProseMirrorNode } from '@prosekit/pm/model'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor document changes.\n */\nexport function useDocChange(\n handler: (doc: ProseMirrorNode) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineDocChangeHandler((view) => handler(view.state.doc))\n useExtension(extension, options)\n}\n","import { defineMountHandler, defineUpdateHandler, ProseKitError, union, type Editor, type Extension } from '@prosekit/core'\nimport { onMounted, onUnmounted, shallowRef, triggerRef, type ShallowRef } from 'vue'\n\nimport { useEditorContext } from '../injection/editor-context.ts'\n\n/**\n * Retrieves the editor instance from the nearest ProseKit component.\n */\nexport function useEditor<E extends Extension = any>(options?: {\n /**\n * Whether to update the component when the editor is mounted or editor state\n * is updated.\n *\n * @default false\n */\n update?: boolean\n}): ShallowRef<Editor<E>> {\n const update = options?.update ?? false\n\n const editor = useEditorContext<E>()\n if (!editor) {\n throw new ProseKitError(\n 'useEditor must be used within the ProseKit component',\n )\n }\n\n const editorRef = shallowRef<Editor<E>>(editor)\n\n if (update) {\n const forceUpdate = () => triggerRef(editorRef)\n onMounted(() => {\n const extension = union(\n defineMountHandler(forceUpdate),\n defineUpdateHandler(forceUpdate),\n )\n const dispose = editor.use(extension)\n onUnmounted(dispose)\n })\n }\n\n return editorRef\n}\n","import type { Editor, Extension } from '@prosekit/core'\nimport { computed, toValue, type MaybeRefOrGetter, type Ref, type ShallowRef } from 'vue'\n\nimport { useEditor } from './use-editor.ts'\n\nexport interface UseEditorDerivedOptions<E extends Extension = any> {\n /**\n * The editor to add the extension to. If not provided, it will use the\n * editor from the nearest `<ProseKit>` component.\n */\n editor?: MaybeRefOrGetter<Editor<E>>\n}\n\n/**\n * Runs a function to derive a value from the editor instance after editor state\n * changes.\n *\n * This is useful when you need to render something based on the editor state,\n * for example, whether the selected text is wrapped in an italic mark.\n *\n * It returns a shallow ref of the derived value that updates whenever the editor\n * state changes.\n */\nexport function useEditorDerivedValue<E extends Extension, Derived>(\n /**\n * A function that receives the editor instance and returns a derived value.\n *\n * It will be called whenever the editor's document state changes, or when it\n * mounts.\n */\n derive: (editor: Editor<E>) => Derived,\n options?: UseEditorDerivedOptions<E>,\n): ShallowRef<Derived> {\n const initialEditor = options?.editor\n const editorAccessor: Ref<Editor<E>> = initialEditor\n ? computed(() => toValue(initialEditor))\n : useEditor<E>({ update: true })\n\n return computed(() => derive(toValue(editorAccessor)))\n}\n","import { defineKeymap, type Keymap } from '@prosekit/core'\nimport { computed, toValue, type MaybeRefOrGetter } from 'vue'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\nexport function useKeymap(\n keymap: MaybeRefOrGetter<Keymap>,\n options?: UseExtensionOptions,\n): void {\n const extension = computed(() => defineKeymap(toValue(keymap)))\n useExtension(extension, options)\n}\n","import { defineUpdateHandler } from '@prosekit/core'\nimport type { EditorState } from '@prosekit/pm/state'\n\nimport { useExtension, type UseExtensionOptions } from './use-extension.ts'\n\n/**\n * Calls the given handler whenever the editor state changes.\n */\nexport function useStateUpdate(\n handler: (state: EditorState) => void,\n options?: UseExtensionOptions,\n): void {\n const extension = defineUpdateHandler((view) => handler(view.state))\n useExtension(extension, options)\n}\n"],"mappings":"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"}
@@ -3,7 +3,7 @@ import { InlinePopoverPositionerProps as InlinePopoverPositionerProps$1, InlineP
3
3
  /** Props for the {@link InlinePopoverPopup} Vue component. */
4
4
  interface InlinePopoverPopupProps {}
5
5
  /** A Vue component that renders an `prosekit-inline-popover-popup` custom element. */
6
- declare const InlinePopoverPopup: DefineSetupFnComponent<InlinePopoverPopupProps & HTMLAttributes>;
6
+ export declare const InlinePopoverPopup: DefineSetupFnComponent<InlinePopoverPopupProps & HTMLAttributes>;
7
7
  /** Props for the {@link InlinePopoverPositioner} Vue component. */
8
8
  interface InlinePopoverPositionerProps {
9
9
  /**
@@ -134,7 +134,7 @@ interface InlinePopoverPositionerProps {
134
134
  altBoundary?: InlinePopoverPositionerProps$1['altBoundary'];
135
135
  }
136
136
  /** A Vue component that renders an `prosekit-inline-popover-positioner` custom element. */
137
- declare const InlinePopoverPositioner: DefineSetupFnComponent<InlinePopoverPositionerProps & HTMLAttributes>;
137
+ export declare const InlinePopoverPositioner: DefineSetupFnComponent<InlinePopoverPositionerProps & HTMLAttributes>;
138
138
  /** Props for the {@link InlinePopoverRoot} Vue component. */
139
139
  interface InlinePopoverRootProps {
140
140
  /**
@@ -183,6 +183,6 @@ interface InlinePopoverRootProps {
183
183
  onOpenChange?: (event: InlinePopoverRootEvents['openChange']) => void;
184
184
  }
185
185
  /** A Vue component that renders an `prosekit-inline-popover-root` custom element. */
186
- declare const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes>;
187
- export { InlinePopoverPopup, type InlinePopoverPopupProps, InlinePopoverPositioner, type InlinePopoverPositionerProps, InlinePopoverRoot, type InlinePopoverRootProps };
186
+ export declare const InlinePopoverRoot: DefineSetupFnComponent<InlinePopoverRootProps & HTMLAttributes>;
187
+ export type { InlinePopoverPopupProps, InlinePopoverPositionerProps, InlinePopoverRootProps };
188
188
  //# sourceMappingURL=inline-popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAMiB;;cAGJ,oBAAoB,uBAAuB,0BAA0B;;UCHjE;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,SAAS;;;;;;EAMT,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,WAAW;;;;;;;EAOX,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,yBAAyB,uBAAuB,+BAA+B;;UChI3E;;;;;;;EAOf,SAAS;;;;;;;EAOT,cAAc;;;;;;;EAOd,kBAAkB;;;;;;;;;;;EAWlB,SAAS;;;;;EAKT,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,mBAAmB,uBAAuB,yBAAyB"}
1
+ {"version":3,"file":"inline-popover.d.ts","names":[],"sources":["../src/components/inline-popover/inline-popover-popup.gen.ts","../src/components/inline-popover/inline-popover-positioner.gen.ts","../src/components/inline-popover/inline-popover-root.gen.ts"],"mappings":";;;UAMiB;;qBAGJ,oBAAoB,uBAAuB,0BAA0B;;UCHjE;;;;;;EAMf,YAAY;;;;;;EAMZ,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,SAAS;;;;;;EAMT,kBAAkB;;;;;;EAMlB,WAAW;;;;;;;;EAQX,aAAa;;;;;;;;;EASb,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,WAAW;;;;;;;EAOX,eAAe;;;;;;;;EAQf,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,yBAAyB,uBAAuB,+BAA+B;;UChI3E;;;;;;;EAOf,SAAS;;;;;;;EAOT,cAAc;;;;;;;EAOd,kBAAkB;;;;;;;;;;;EAWlB,SAAS;;;;;EAKT,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,mBAAmB,uBAAuB,yBAAyB"}
package/dist/menu.d.ts CHANGED
@@ -24,7 +24,7 @@ interface MenuItemProps {
24
24
  onSelect?: (event: MenuItemEvents['select']) => void;
25
25
  }
26
26
  /** A Vue component that renders an `prosekit-menu-item` custom element. */
27
- declare const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes>;
27
+ export declare const MenuItem: DefineSetupFnComponent<MenuItemProps & HTMLAttributes>;
28
28
  /** Props for the {@link MenuPopup} Vue component. */
29
29
  interface MenuPopupProps {
30
30
  /**
@@ -36,7 +36,7 @@ interface MenuPopupProps {
36
36
  eventTarget?: MenuPopupProps$1['eventTarget'];
37
37
  }
38
38
  /** A Vue component that renders an `prosekit-menu-popup` custom element. */
39
- declare const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes>;
39
+ export declare const MenuPopup: DefineSetupFnComponent<MenuPopupProps & HTMLAttributes>;
40
40
  /** Props for the {@link MenuPositioner} Vue component. */
41
41
  interface MenuPositionerProps {
42
42
  /**
@@ -168,7 +168,7 @@ interface MenuPositionerProps {
168
168
  altBoundary?: MenuPositionerProps$1['altBoundary'];
169
169
  }
170
170
  /** A Vue component that renders an `prosekit-menu-positioner` custom element. */
171
- declare const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes>;
171
+ export declare const MenuPositioner: DefineSetupFnComponent<MenuPositionerProps & HTMLAttributes>;
172
172
  /** Props for the {@link MenuRoot} Vue component. */
173
173
  interface MenuRootProps {
174
174
  /**
@@ -190,7 +190,7 @@ interface MenuRootProps {
190
190
  onOpenChange?: (event: MenuRootEvents['openChange']) => void;
191
191
  }
192
192
  /** A Vue component that renders an `prosekit-menu-root` custom element. */
193
- declare const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes>;
193
+ export declare const MenuRoot: DefineSetupFnComponent<MenuRootProps & HTMLAttributes>;
194
194
  /** Props for the {@link MenuSubmenuRoot} Vue component. */
195
195
  interface MenuSubmenuRootProps {
196
196
  /**
@@ -212,7 +212,7 @@ interface MenuSubmenuRootProps {
212
212
  onOpenChange?: (event: MenuSubmenuRootEvents['openChange']) => void;
213
213
  }
214
214
  /** A Vue component that renders an `prosekit-menu-submenu-root` custom element. */
215
- declare const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes>;
215
+ export declare const MenuSubmenuRoot: DefineSetupFnComponent<MenuSubmenuRootProps & HTMLAttributes>;
216
216
  /** Props for the {@link MenuSubmenuTrigger} Vue component. */
217
217
  interface MenuSubmenuTriggerProps {
218
218
  /**
@@ -229,7 +229,7 @@ interface MenuSubmenuTriggerProps {
229
229
  disabled?: MenuSubmenuTriggerProps$1['disabled'];
230
230
  }
231
231
  /** A Vue component that renders an `prosekit-menu-submenu-trigger` custom element. */
232
- declare const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes>;
232
+ export declare const MenuSubmenuTrigger: DefineSetupFnComponent<MenuSubmenuTriggerProps & HTMLAttributes>;
233
233
  /** Props for the {@link MenuTrigger} Vue component. */
234
234
  interface MenuTriggerProps {
235
235
  /**
@@ -242,6 +242,6 @@ interface MenuTriggerProps {
242
242
  onOpenChange?: (event: MenuTriggerEvents['openChange']) => void;
243
243
  }
244
244
  /** A Vue component that renders an `prosekit-menu-trigger` custom element. */
245
- declare const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes>;
246
- export { MenuItem, type MenuItemProps, MenuPopup, type MenuPopupProps, MenuPositioner, type MenuPositionerProps, MenuRoot, type MenuRootProps, MenuSubmenuRoot, type MenuSubmenuRootProps, MenuSubmenuTrigger, type MenuSubmenuTriggerProps, MenuTrigger, type MenuTriggerProps };
245
+ export declare const MenuTrigger: DefineSetupFnComponent<MenuTriggerProps & HTMLAttributes>;
246
+ export type { MenuItemProps, MenuPopupProps, MenuPositionerProps, MenuRootProps, MenuSubmenuRootProps, MenuSubmenuTriggerProps, MenuTriggerProps };
247
247
  //# sourceMappingURL=menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;;;;EAMX,gBAAgB;;EAEhB,YAAY,OAAO;;;cAIR,UAAU,uBAAuB,gBAAgB;;UCxB7C;;;;;;;EAOf,cAAc;;;cAIH,WAAW,uBAAuB,iBAAiB;;UCX/C;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,gBAAgB,uBAAuB,sBAAsB;;UCnIzD;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,UAAU,uBAAuB,gBAAgB;;UCrB7C;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,iBAAiB,uBAAuB,uBAAuB;;UCrB3D;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;cAIA,oBAAoB,uBAAuB,0BAA0B;;UChBjE;;;;;;EAMf,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB"}
1
+ {"version":3,"file":"menu.d.ts","names":[],"sources":["../src/components/menu/menu-item.gen.ts","../src/components/menu/menu-popup.gen.ts","../src/components/menu/menu-positioner.gen.ts","../src/components/menu/menu-root.gen.ts","../src/components/menu/menu-submenu-root.gen.ts","../src/components/menu/menu-submenu-trigger.gen.ts","../src/components/menu/menu-trigger.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;;;;EAMX,gBAAgB;;EAEhB,YAAY,OAAO;;;qBAIR,UAAU,uBAAuB,gBAAgB;;UCxB7C;;;;;;;EAOf,cAAc;;;qBAIH,WAAW,uBAAuB,iBAAiB;;UCX/C;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,gBAAgB,uBAAuB,sBAAsB;;UCnIzD;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,UAAU,uBAAuB,gBAAgB;;UCrB7C;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,iBAAiB,uBAAuB,uBAAuB;;UCrB3D;;;;;;EAMf,QAAQ;;;;;;EAMR,WAAW;;;qBAIA,oBAAoB,uBAAuB,0BAA0B;;UChBjE;;;;;;EAMf,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,aAAa,uBAAuB,mBAAmB"}
package/dist/popover.d.ts CHANGED
@@ -3,7 +3,7 @@ import { PopoverPositionerProps as PopoverPositionerProps$1, PopoverRootEvents,
3
3
  /** Props for the {@link PopoverPopup} Vue component. */
4
4
  interface PopoverPopupProps {}
5
5
  /** A Vue component that renders an `prosekit-popover-popup` custom element. */
6
- declare const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes>;
6
+ export declare const PopoverPopup: DefineSetupFnComponent<PopoverPopupProps & HTMLAttributes>;
7
7
  /** Props for the {@link PopoverPositioner} Vue component. */
8
8
  interface PopoverPositionerProps {
9
9
  /**
@@ -135,7 +135,7 @@ interface PopoverPositionerProps {
135
135
  altBoundary?: PopoverPositionerProps$1['altBoundary'];
136
136
  }
137
137
  /** A Vue component that renders an `prosekit-popover-positioner` custom element. */
138
- declare const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes>;
138
+ export declare const PopoverPositioner: DefineSetupFnComponent<PopoverPositionerProps & HTMLAttributes>;
139
139
  /** Props for the {@link PopoverRoot} Vue component. */
140
140
  interface PopoverRootProps {
141
141
  /**
@@ -164,7 +164,7 @@ interface PopoverRootProps {
164
164
  onOpenChange?: (event: PopoverRootEvents['openChange']) => void;
165
165
  }
166
166
  /** A Vue component that renders an `prosekit-popover-root` custom element. */
167
- declare const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes>;
167
+ export declare const PopoverRoot: DefineSetupFnComponent<PopoverRootProps & HTMLAttributes>;
168
168
  /** Props for the {@link PopoverTrigger} Vue component. */
169
169
  interface PopoverTriggerProps {
170
170
  /**
@@ -193,6 +193,6 @@ interface PopoverTriggerProps {
193
193
  onOpenChange?: (event: PopoverTriggerEvents['openChange']) => void;
194
194
  }
195
195
  /** A Vue component that renders an `prosekit-popover-trigger` custom element. */
196
- declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes>;
197
- export { PopoverPopup, type PopoverPopupProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootProps, PopoverTrigger, type PopoverTriggerProps };
196
+ export declare const PopoverTrigger: DefineSetupFnComponent<PopoverTriggerProps & HTMLAttributes>;
197
+ export type { PopoverPopupProps, PopoverPositionerProps, PopoverRootProps, PopoverTriggerProps };
198
198
  //# sourceMappingURL=popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"mappings":";;;UAMiB;;cAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;;;EAOf,QAAQ;;;;;EAKR,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB;;UC5BnD;;;;;EAKf,WAAW;;;;;EAKX,cAAc;;;;;;EAMd,QAAQ;;;;;;EAMR,aAAa;;EAEb,gBAAgB,OAAO;;;cAIZ,gBAAgB,uBAAuB,sBAAsB"}
1
+ {"version":3,"file":"popover.d.ts","names":[],"sources":["../src/components/popover/popover-popup.gen.ts","../src/components/popover/popover-positioner.gen.ts","../src/components/popover/popover-root.gen.ts","../src/components/popover/popover-trigger.gen.ts"],"mappings":";;;UAMiB;;qBAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;;;EAOf,QAAQ;;;;;EAKR,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,aAAa,uBAAuB,mBAAmB;;UC5BnD;;;;;EAKf,WAAW;;;;;EAKX,cAAc;;;;;;EAMd,QAAQ;;;;;;EAMR,aAAa;;EAEb,gBAAgB,OAAO;;;qBAIZ,gBAAgB,uBAAuB,sBAAsB"}
@@ -26,7 +26,7 @@ interface ResizableRootProps {
26
26
  onResizeEnd?: (event: ResizableRootEvents['resizeEnd']) => void;
27
27
  }
28
28
  /** A Vue component that renders an `prosekit-resizable-root` custom element. */
29
- declare const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes>;
29
+ export declare const ResizableRoot: DefineSetupFnComponent<ResizableRootProps & HTMLAttributes>;
30
30
  /** Props for the {@link ResizableHandle} Vue component. */
31
31
  interface ResizableHandleProps {
32
32
  /**
@@ -37,6 +37,6 @@ interface ResizableHandleProps {
37
37
  position?: ResizableHandleProps$1['position'];
38
38
  }
39
39
  /** A Vue component that renders an `prosekit-resizable-handle` custom element. */
40
- declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes>;
41
- export { ResizableHandle, type ResizableHandleProps, ResizableRoot, type ResizableRootProps };
40
+ export declare const ResizableHandle: DefineSetupFnComponent<ResizableHandleProps & HTMLAttributes>;
41
+ export type { ResizableHandleProps, ResizableRootProps };
42
42
  //# sourceMappingURL=resizable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,SAAS;;;;;;EAMT,cAAc;;EAEd,iBAAiB,OAAO;;EAExB,eAAe,OAAO;;;cAIX,eAAe,uBAAuB,qBAAqB;;UC1BvD;;;;;;EAMf,WAAW;;;cAIA,iBAAiB,uBAAuB,uBAAuB"}
1
+ {"version":3,"file":"resizable.d.ts","names":[],"sources":["../src/components/resizable/resizable-root.gen.ts","../src/components/resizable/resizable-handle.gen.ts"],"mappings":";;;UAMiB;;;;;;EAMf,QAAQ;;;;;;EAMR,SAAS;;;;;;EAMT,cAAc;;EAEd,iBAAiB,OAAO;;EAExB,eAAe,OAAO;;;qBAIX,eAAe,uBAAuB,qBAAqB;;UC1BvD;;;;;;EAMf,WAAW;;;qBAIA,iBAAiB,uBAAuB,uBAAuB"}
@@ -3,7 +3,7 @@ import { TableHandleColumnMenuRootProps as TableHandleColumnMenuRootProps$1, Tab
3
3
  /** Props for the {@link TableHandleColumnPopup} Vue component. */
4
4
  interface TableHandleColumnPopupProps {}
5
5
  /** A Vue component that renders an `prosekit-table-handle-column-popup` custom element. */
6
- declare const TableHandleColumnPopup: DefineSetupFnComponent<TableHandleColumnPopupProps & HTMLAttributes>;
6
+ export declare const TableHandleColumnPopup: DefineSetupFnComponent<TableHandleColumnPopupProps & HTMLAttributes>;
7
7
  /** Props for the {@link TableHandleColumnPositioner} Vue component. */
8
8
  interface TableHandleColumnPositionerProps {
9
9
  /**
@@ -134,7 +134,7 @@ interface TableHandleColumnPositionerProps {
134
134
  editor?: TableHandleColumnPositionerProps$1['editor'];
135
135
  }
136
136
  /** A Vue component that renders an `prosekit-table-handle-column-positioner` custom element. */
137
- declare const TableHandleColumnPositioner: DefineSetupFnComponent<TableHandleColumnPositionerProps & HTMLAttributes>;
137
+ export declare const TableHandleColumnPositioner: DefineSetupFnComponent<TableHandleColumnPositionerProps & HTMLAttributes>;
138
138
  /** Props for the {@link TableHandleColumnMenuRoot} Vue component. */
139
139
  interface TableHandleColumnMenuRootProps {
140
140
  /**
@@ -154,7 +154,7 @@ interface TableHandleColumnMenuRootProps {
154
154
  disabled?: TableHandleColumnMenuRootProps$1['disabled'];
155
155
  }
156
156
  /** A Vue component that renders an `prosekit-table-handle-column-menu-root` custom element. */
157
- declare const TableHandleColumnMenuRoot: DefineSetupFnComponent<TableHandleColumnMenuRootProps & HTMLAttributes>;
157
+ export declare const TableHandleColumnMenuRoot: DefineSetupFnComponent<TableHandleColumnMenuRootProps & HTMLAttributes>;
158
158
  /** Props for the {@link TableHandleColumnMenuTrigger} Vue component. */
159
159
  interface TableHandleColumnMenuTriggerProps {
160
160
  /**
@@ -164,7 +164,7 @@ interface TableHandleColumnMenuTriggerProps {
164
164
  editor?: TableHandleColumnMenuTriggerProps$1['editor'];
165
165
  }
166
166
  /** A Vue component that renders an `prosekit-table-handle-column-menu-trigger` custom element. */
167
- declare const TableHandleColumnMenuTrigger: DefineSetupFnComponent<TableHandleColumnMenuTriggerProps & HTMLAttributes>;
167
+ export declare const TableHandleColumnMenuTrigger: DefineSetupFnComponent<TableHandleColumnMenuTriggerProps & HTMLAttributes>;
168
168
  /** Props for the {@link TableHandleDragPreview} Vue component. */
169
169
  interface TableHandleDragPreviewProps {
170
170
  /**
@@ -174,7 +174,7 @@ interface TableHandleDragPreviewProps {
174
174
  editor?: TableHandleDragPreviewProps$1['editor'];
175
175
  }
176
176
  /** A Vue component that renders an `prosekit-table-handle-drag-preview` custom element. */
177
- declare const TableHandleDragPreview: DefineSetupFnComponent<TableHandleDragPreviewProps & HTMLAttributes>;
177
+ export declare const TableHandleDragPreview: DefineSetupFnComponent<TableHandleDragPreviewProps & HTMLAttributes>;
178
178
  /** Props for the {@link TableHandleDropIndicator} Vue component. */
179
179
  interface TableHandleDropIndicatorProps {
180
180
  /**
@@ -184,7 +184,7 @@ interface TableHandleDropIndicatorProps {
184
184
  editor?: TableHandleDropIndicatorProps$1['editor'];
185
185
  }
186
186
  /** A Vue component that renders an `prosekit-table-handle-drop-indicator` custom element. */
187
- declare const TableHandleDropIndicator: DefineSetupFnComponent<TableHandleDropIndicatorProps & HTMLAttributes>;
187
+ export declare const TableHandleDropIndicator: DefineSetupFnComponent<TableHandleDropIndicatorProps & HTMLAttributes>;
188
188
  /** Props for the {@link TableHandleRoot} Vue component. */
189
189
  interface TableHandleRootProps {
190
190
  /**
@@ -196,11 +196,11 @@ interface TableHandleRootProps {
196
196
  editor?: TableHandleRootProps$1['editor'];
197
197
  }
198
198
  /** A Vue component that renders an `prosekit-table-handle-root` custom element. */
199
- declare const TableHandleRoot: DefineSetupFnComponent<TableHandleRootProps & HTMLAttributes>;
199
+ export declare const TableHandleRoot: DefineSetupFnComponent<TableHandleRootProps & HTMLAttributes>;
200
200
  /** Props for the {@link TableHandleRowPopup} Vue component. */
201
201
  interface TableHandleRowPopupProps {}
202
202
  /** A Vue component that renders an `prosekit-table-handle-row-popup` custom element. */
203
- declare const TableHandleRowPopup: DefineSetupFnComponent<TableHandleRowPopupProps & HTMLAttributes>;
203
+ export declare const TableHandleRowPopup: DefineSetupFnComponent<TableHandleRowPopupProps & HTMLAttributes>;
204
204
  /** Props for the {@link TableHandleRowPositioner} Vue component. */
205
205
  interface TableHandleRowPositionerProps {
206
206
  /**
@@ -331,7 +331,7 @@ interface TableHandleRowPositionerProps {
331
331
  editor?: TableHandleRowPositionerProps$1['editor'];
332
332
  }
333
333
  /** A Vue component that renders an `prosekit-table-handle-row-positioner` custom element. */
334
- declare const TableHandleRowPositioner: DefineSetupFnComponent<TableHandleRowPositionerProps & HTMLAttributes>;
334
+ export declare const TableHandleRowPositioner: DefineSetupFnComponent<TableHandleRowPositionerProps & HTMLAttributes>;
335
335
  /** Props for the {@link TableHandleRowMenuRoot} Vue component. */
336
336
  interface TableHandleRowMenuRootProps {
337
337
  /**
@@ -351,7 +351,7 @@ interface TableHandleRowMenuRootProps {
351
351
  disabled?: TableHandleRowMenuRootProps$1['disabled'];
352
352
  }
353
353
  /** A Vue component that renders an `prosekit-table-handle-row-menu-root` custom element. */
354
- declare const TableHandleRowMenuRoot: DefineSetupFnComponent<TableHandleRowMenuRootProps & HTMLAttributes>;
354
+ export declare const TableHandleRowMenuRoot: DefineSetupFnComponent<TableHandleRowMenuRootProps & HTMLAttributes>;
355
355
  /** Props for the {@link TableHandleRowMenuTrigger} Vue component. */
356
356
  interface TableHandleRowMenuTriggerProps {
357
357
  /**
@@ -361,6 +361,6 @@ interface TableHandleRowMenuTriggerProps {
361
361
  editor?: TableHandleRowMenuTriggerProps$1['editor'];
362
362
  }
363
363
  /** A Vue component that renders an `prosekit-table-handle-row-menu-trigger` custom element. */
364
- declare const TableHandleRowMenuTrigger: DefineSetupFnComponent<TableHandleRowMenuTriggerProps & HTMLAttributes>;
365
- export { TableHandleColumnMenuRoot, type TableHandleColumnMenuRootProps, TableHandleColumnMenuTrigger, type TableHandleColumnMenuTriggerProps, TableHandleColumnPopup, type TableHandleColumnPopupProps, TableHandleColumnPositioner, type TableHandleColumnPositionerProps, TableHandleDragPreview, type TableHandleDragPreviewProps, TableHandleDropIndicator, type TableHandleDropIndicatorProps, TableHandleRoot, type TableHandleRootProps, TableHandleRowMenuRoot, type TableHandleRowMenuRootProps, TableHandleRowMenuTrigger, type TableHandleRowMenuTriggerProps, TableHandleRowPopup, type TableHandleRowPopupProps, TableHandleRowPositioner, type TableHandleRowPositionerProps };
364
+ export declare const TableHandleRowMenuTrigger: DefineSetupFnComponent<TableHandleRowMenuTriggerProps & HTMLAttributes>;
365
+ export type { TableHandleColumnMenuRootProps, TableHandleColumnMenuTriggerProps, TableHandleColumnPopupProps, TableHandleColumnPositionerProps, TableHandleDragPreviewProps, TableHandleDropIndicatorProps, TableHandleRootProps, TableHandleRowMenuRootProps, TableHandleRowMenuTriggerProps, TableHandleRowPopupProps, TableHandleRowPositionerProps };
366
366
  //# sourceMappingURL=table-handle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":";;;UAMiB;;cAGJ,wBAAwB,uBAAuB,8BAA8B;;UCDzE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;cAIE,6BAA6B,uBAAuB,mCAAmC;;UCpInF;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;cAIA,2BAA2B,uBAAuB,iCAAiC;;UCjB/E;;;;;EAKf,SAAS;;;cAIE,8BAA8B,uBAAuB,oCAAoC;;UCTrF;;;;;EAKf,SAAS;;;cAIE,wBAAwB,uBAAuB,8BAA8B;;UCTzE;;;;;EAKf,SAAS;;;cAIE,0BAA0B,uBAAuB,gCAAgC;;UCT7E;;;;;;;EAOf,SAAS;;;cAIE,iBAAiB,uBAAuB,uBAAuB;;UCb3D;;cAGJ,qBAAqB,uBAAuB,2BAA2B;;UCDnE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;cAIE,0BAA0B,uBAAuB,gCAAgC;;UCpI7E;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;cAIA,wBAAwB,uBAAuB,8BAA8B;;UCjBzE;;;;;EAKf,SAAS;;;cAIE,2BAA2B,uBAAuB,iCAAiC"}
1
+ {"version":3,"file":"table-handle.d.ts","names":[],"sources":["../src/components/table-handle/table-handle-column-popup.gen.ts","../src/components/table-handle/table-handle-column-positioner.gen.ts","../src/components/table-handle/table-handle-column-menu-root.gen.ts","../src/components/table-handle/table-handle-column-menu-trigger.gen.ts","../src/components/table-handle/table-handle-drag-preview.gen.ts","../src/components/table-handle/table-handle-drop-indicator.gen.ts","../src/components/table-handle/table-handle-root.gen.ts","../src/components/table-handle/table-handle-row-popup.gen.ts","../src/components/table-handle/table-handle-row-positioner.gen.ts","../src/components/table-handle/table-handle-row-menu-root.gen.ts","../src/components/table-handle/table-handle-row-menu-trigger.gen.ts"],"mappings":";;;UAMiB;;qBAGJ,wBAAwB,uBAAuB,8BAA8B;;UCDzE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;qBAIE,6BAA6B,uBAAuB,mCAAmC;;UCpInF;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;qBAIA,2BAA2B,uBAAuB,iCAAiC;;UCjB/E;;;;;EAKf,SAAS;;;qBAIE,8BAA8B,uBAAuB,oCAAoC;;UCTrF;;;;;EAKf,SAAS;;;qBAIE,wBAAwB,uBAAuB,8BAA8B;;UCTzE;;;;;EAKf,SAAS;;;qBAIE,0BAA0B,uBAAuB,gCAAgC;;UCT7E;;;;;;;EAOf,SAAS;;;qBAIE,iBAAiB,uBAAuB,uBAAuB;;UCb3D;;qBAGJ,qBAAqB,uBAAuB,2BAA2B;;UCDnE;;;;;;EAMf,YAAY;;;;;;EAMZ,WAAW;;;;;;;;EAQX,aAAa;;;;;;;EAOb,QAAQ;;;;;EAKR,SAAS;;;;;EAKT,OAAO;;;;;EAKP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;EAKT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;;;;;EAOd,SAAS;;;qBAIE,0BAA0B,uBAAuB,gCAAgC;;UCpI7E;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;;qBAIA,wBAAwB,uBAAuB,8BAA8B;;UCjBzE;;;;;EAKf,SAAS;;;qBAIE,2BAA2B,uBAAuB,iCAAiC"}
package/dist/tooltip.d.ts CHANGED
@@ -3,7 +3,7 @@ import { TooltipPositionerProps as TooltipPositionerProps$1, TooltipRootEvents,
3
3
  /** Props for the {@link TooltipPopup} Vue component. */
4
4
  interface TooltipPopupProps {}
5
5
  /** A Vue component that renders an `prosekit-tooltip-popup` custom element. */
6
- declare const TooltipPopup: DefineSetupFnComponent<TooltipPopupProps & HTMLAttributes>;
6
+ export declare const TooltipPopup: DefineSetupFnComponent<TooltipPopupProps & HTMLAttributes>;
7
7
  /** Props for the {@link TooltipPositioner} Vue component. */
8
8
  interface TooltipPositionerProps {
9
9
  /**
@@ -135,7 +135,7 @@ interface TooltipPositionerProps {
135
135
  altBoundary?: TooltipPositionerProps$1['altBoundary'];
136
136
  }
137
137
  /** A Vue component that renders an `prosekit-tooltip-positioner` custom element. */
138
- declare const TooltipPositioner: DefineSetupFnComponent<TooltipPositionerProps & HTMLAttributes>;
138
+ export declare const TooltipPositioner: DefineSetupFnComponent<TooltipPositionerProps & HTMLAttributes>;
139
139
  /** Props for the {@link TooltipRoot} Vue component. */
140
140
  interface TooltipRootProps {
141
141
  /**
@@ -157,7 +157,7 @@ interface TooltipRootProps {
157
157
  onOpenChange?: (event: TooltipRootEvents['openChange']) => void;
158
158
  }
159
159
  /** A Vue component that renders an `prosekit-tooltip-root` custom element. */
160
- declare const TooltipRoot: DefineSetupFnComponent<TooltipRootProps & HTMLAttributes>;
160
+ export declare const TooltipRoot: DefineSetupFnComponent<TooltipRootProps & HTMLAttributes>;
161
161
  /** Props for the {@link TooltipTrigger} Vue component. */
162
162
  interface TooltipTriggerProps {
163
163
  /**
@@ -177,6 +177,6 @@ interface TooltipTriggerProps {
177
177
  closeDelay?: TooltipTriggerProps$1['closeDelay'];
178
178
  }
179
179
  /** A Vue component that renders an `prosekit-tooltip-trigger` custom element. */
180
- declare const TooltipTrigger: DefineSetupFnComponent<TooltipTriggerProps & HTMLAttributes>;
181
- export { TooltipPopup, type TooltipPopupProps, TooltipPositioner, type TooltipPositionerProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps };
180
+ export declare const TooltipTrigger: DefineSetupFnComponent<TooltipTriggerProps & HTMLAttributes>;
181
+ export type { TooltipPopupProps, TooltipPositionerProps, TooltipRootProps, TooltipTriggerProps };
182
182
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"mappings":";;;UAMiB;;cAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;cAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;cAIZ,aAAa,uBAAuB,mBAAmB;;UCrBnD;;;;;EAKf,WAAW;;;;;EAKX,YAAY;;;;;EAKZ,aAAa;;;cAIF,gBAAgB,uBAAuB,sBAAsB"}
1
+ {"version":3,"file":"tooltip.d.ts","names":[],"sources":["../src/components/tooltip/tooltip-popup.gen.ts","../src/components/tooltip/tooltip-positioner.gen.ts","../src/components/tooltip/tooltip-root.gen.ts","../src/components/tooltip/tooltip-trigger.gen.ts"],"mappings":";;;UAMiB;;qBAGJ,cAAc,uBAAuB,oBAAoB;;UCHrD;;;;;;EAMf,WAAW;;;;;;EAMX,YAAY;;;;;;;;EAQZ,aAAa;;;;;;;EAOb,QAAQ;;;;;;EAMR,SAAS;;;;;;;;;EAST,OAAO;;;;;;EAMP,QAAQ;;;;;;;EAOR,UAAU;;;;;;;EAOV,cAAc;;;;;;;EAOd,YAAY;;;;;;;EAOZ,aAAa;;;;;;;EAOb,SAAS;;;;;;;EAOT,OAAO;;;;;;;EAOP,WAAW;;;;;;;EAOX,eAAe;;;;;;;EAOf,kBAAkB;;;;;;;;EAQlB,iBAAiB;;;;;;;;EAQjB,cAAc;;;qBAIH,mBAAmB,uBAAuB,yBAAyB;;UCnI/D;;;;;EAKf,cAAc;;;;;EAKd,OAAO;;;;;EAKP,WAAW;;EAEX,gBAAgB,OAAO;;;qBAIZ,aAAa,uBAAuB,mBAAmB;;UCrBnD;;;;;EAKf,WAAW;;;;;EAKX,YAAY;;;;;EAKZ,aAAa;;;qBAIF,gBAAgB,uBAAuB,sBAAsB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prosekit/vue",
3
3
  "type": "module",
4
- "version": "0.8.1",
4
+ "version": "0.8.3",
5
5
  "private": false,
6
6
  "description": "Vue components and utilities for ProseKit",
7
7
  "author": {
@@ -72,9 +72,9 @@
72
72
  "src"
73
73
  ],
74
74
  "dependencies": {
75
- "@prosekit/core": "^0.13.1",
76
- "@prosekit/pm": "^0.1.19",
77
- "@prosekit/web": "^0.9.1",
75
+ "@prosekit/core": "^0.13.3",
76
+ "@prosekit/pm": "^0.1.20",
77
+ "@prosekit/web": "^0.9.3",
78
78
  "@prosemirror-adapter/core": "^0.5.5",
79
79
  "@prosemirror-adapter/vue": "^0.5.5"
80
80
  },
@@ -92,11 +92,11 @@
92
92
  "@prosekit/config-vitest": "0.0.1",
93
93
  "@prosekit/testing": "0.0.0",
94
94
  "@vitejs/plugin-vue": "^6.0.8",
95
- "@vue/test-utils": "^2.4.11",
96
- "tsdown": "^0.22.14",
95
+ "@vue/test-utils": "^2.5.0",
96
+ "tsdown": "^0.23.0",
97
97
  "typescript": "~6.0.3",
98
- "vitest": "^4.1.11",
99
- "vitest-browser-vue": "^2.1.0",
98
+ "vitest": "^5.0.0",
99
+ "vitest-browser-vue": "^3.1.0",
100
100
  "vue": "^3.5.42"
101
101
  },
102
102
  "scripts": {
@@ -17,11 +17,12 @@ export const ProseKit: DefineSetupFnComponent<ProseKitProps> = defineComponent<P
17
17
  props: { editor: { type: Object as PropType<Editor>, required: true } },
18
18
  setup: (props, { slots }) => {
19
19
  provideEditor(props.editor)
20
- return () =>
21
- h(
20
+ return () => {
21
+ return h(
22
22
  ViewRenderer,
23
23
  { editor: props.editor },
24
24
  () => slots.default?.(),
25
25
  )
26
+ }
26
27
  },
27
28
  })
@@ -52,11 +52,12 @@ describe('VueNodeView', () => {
52
52
  clearInterval(id)
53
53
  })
54
54
  })
55
- return () =>
56
- h('div', {
55
+ return () => {
56
+ return h('div', {
57
57
  'data-testid': 'image-refresh-view',
58
58
  'data-url': url.value,
59
59
  })
60
+ }
60
61
  },
61
62
  },
62
63
  )
@@ -71,14 +72,16 @@ describe('VueNodeView', () => {
71
72
  defaultContent: props.initialContent,
72
73
  })
73
74
 
74
- return () =>
75
- h(ProseKit, { editor }, () =>
76
- h('div', {
75
+ return () => {
76
+ return h(ProseKit, { editor }, () => {
77
+ return h('div', {
77
78
  'data-testid': 'editor',
78
79
  'ref': (el) => {
79
80
  editor.mount(el as HTMLElement | null)
80
81
  },
81
- }))
82
+ })
83
+ })
84
+ }
82
85
  },
83
86
  })
84
87