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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/_tsup-dts-rollup.d.ts +159 -0
  2. package/dist/prosekit-vue-autocomplete-empty.d.ts +2 -0
  3. package/dist/prosekit-vue-autocomplete-empty.js +19 -0
  4. package/dist/prosekit-vue-autocomplete-item.d.ts +2 -0
  5. package/dist/prosekit-vue-autocomplete-item.js +19 -0
  6. package/dist/prosekit-vue-autocomplete-list.d.ts +2 -0
  7. package/dist/prosekit-vue-autocomplete-list.js +19 -0
  8. package/dist/prosekit-vue-autocomplete-popover.d.ts +3 -0
  9. package/dist/prosekit-vue-autocomplete-popover.js +19 -0
  10. package/dist/prosekit-vue-combo-box-input.d.ts +2 -0
  11. package/dist/prosekit-vue-combo-box-input.js +19 -0
  12. package/dist/prosekit-vue-combo-box-item.d.ts +2 -0
  13. package/dist/prosekit-vue-combo-box-item.js +19 -0
  14. package/dist/prosekit-vue-combo-box-list.d.ts +2 -0
  15. package/dist/prosekit-vue-combo-box-list.js +19 -0
  16. package/dist/prosekit-vue-combo-box.d.ts +2 -0
  17. package/dist/prosekit-vue-combo-box.js +19 -0
  18. package/dist/prosekit-vue-inline-popover.d.ts +3 -0
  19. package/dist/prosekit-vue-inline-popover.js +19 -0
  20. package/dist/prosekit-vue-popover.d.ts +2 -0
  21. package/dist/prosekit-vue-popover.js +19 -0
  22. package/dist/prosekit-vue.d.ts +4 -14
  23. package/dist/prosekit-vue.js +32 -10
  24. package/package.json +79 -31
  25. package/src/index.ts +0 -4
  26. package/dist/prosekit-vue-components-menu-item.d.ts +0 -9
  27. package/dist/prosekit-vue-components-menu-item.js +0 -14
  28. package/dist/prosekit-vue-components-menu.d.ts +0 -9
  29. package/dist/prosekit-vue-components-menu.js +0 -14
  30. package/dist/prosekit-vue-components-popover-suggestion.d.ts +0 -18
  31. package/dist/prosekit-vue-components-popover-suggestion.js +0 -42
  32. package/dist/prosekit-vue-components-popover.d.ts +0 -9
  33. package/dist/prosekit-vue-components-popover.js +0 -14
@@ -0,0 +1,159 @@
1
+ import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/lit/autocomplete-empty';
2
+ import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/lit/autocomplete-item';
3
+ import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/lit/autocomplete-list';
4
+ import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/lit/autocomplete-popover';
5
+ import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
6
+ import { ComboBoxItemProps as ComboBoxItemProps_2 } from '@prosekit/lit/combo-box-item';
7
+ import { ComboBoxListProps as ComboBoxListProps_2 } from '@prosekit/lit/combo-box-list';
8
+ import { ComboBoxProps as ComboBoxProps_2 } from '@prosekit/lit/combo-box';
9
+ import { Editor } from '@prosekit/core';
10
+ import { Extension } from '@prosekit/core';
11
+ import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/lit/inline-popover';
12
+ import { Keymap } from '@prosekit/core';
13
+ import { Options } from 'tsup';
14
+ import { PopoverOptions } from '@prosekit/lit/autocomplete-popover';
15
+ import { PopoverOptions as PopoverOptions_alias_1 } from '@prosekit/lit/inline-popover';
16
+ import { PopoverProps as PopoverProps_2 } from '@prosekit/lit/popover';
17
+ import { Ref } from 'vue';
18
+ import { ShallowRef } from 'vue';
19
+ import { UserProjectConfigExport } from 'vitest/dist/config.js';
20
+
21
+ declare const AutocompleteEmpty: (props: {
22
+ class?: string | undefined;
23
+ } & AutocompleteEmptyProps_2 & {}) => any;
24
+ export { AutocompleteEmpty }
25
+ export { AutocompleteEmpty as AutocompleteEmpty_alias_1 }
26
+
27
+ declare type AutocompleteEmptyProps = {
28
+ class?: string;
29
+ } & AutocompleteEmptyProps_2;
30
+ export { AutocompleteEmptyProps }
31
+ export { AutocompleteEmptyProps as AutocompleteEmptyProps_alias_1 }
32
+
33
+ declare const AutocompleteItem: (props: {
34
+ class?: string | undefined;
35
+ } & AutocompleteItemProps_2 & {}) => any;
36
+ export { AutocompleteItem }
37
+ export { AutocompleteItem as AutocompleteItem_alias_1 }
38
+
39
+ declare type AutocompleteItemProps = {
40
+ class?: string;
41
+ } & AutocompleteItemProps_2;
42
+ export { AutocompleteItemProps }
43
+ export { AutocompleteItemProps as AutocompleteItemProps_alias_1 }
44
+
45
+ declare const AutocompleteList: (props: {
46
+ class?: string | undefined;
47
+ } & AutocompleteListProps_2 & {}) => any;
48
+ export { AutocompleteList }
49
+ export { AutocompleteList as AutocompleteList_alias_1 }
50
+
51
+ declare type AutocompleteListProps = {
52
+ class?: string;
53
+ } & AutocompleteListProps_2;
54
+ export { AutocompleteListProps }
55
+ export { AutocompleteListProps as AutocompleteListProps_alias_1 }
56
+
57
+ declare const AutocompletePopover: (props: {
58
+ class?: string | undefined;
59
+ } & AutocompletePopoverProps_2 & {}) => any;
60
+ export { AutocompletePopover }
61
+ export { AutocompletePopover as AutocompletePopover_alias_1 }
62
+
63
+ declare type AutocompletePopoverProps = {
64
+ class?: string;
65
+ } & AutocompletePopoverProps_2;
66
+ export { AutocompletePopoverProps }
67
+ export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
68
+
69
+ export declare const ComboBox: (props: {
70
+ class?: string | undefined;
71
+ } & ComboBoxProps_2 & {}) => any;
72
+
73
+ export declare const ComboBoxInput: (props: {
74
+ class?: string | undefined;
75
+ } & ComboBoxInputProps_2 & {}) => any;
76
+
77
+ export declare type ComboBoxInputProps = {
78
+ class?: string;
79
+ } & ComboBoxInputProps_2;
80
+
81
+ export declare const ComboBoxItem: (props: {
82
+ class?: string | undefined;
83
+ } & ComboBoxItemProps_2 & {}) => any;
84
+
85
+ export declare type ComboBoxItemProps = {
86
+ class?: string;
87
+ } & ComboBoxItemProps_2;
88
+
89
+ export declare const ComboBoxList: (props: {
90
+ class?: string | undefined;
91
+ } & ComboBoxListProps_2 & {}) => any;
92
+
93
+ export declare type ComboBoxListProps = {
94
+ class?: string;
95
+ } & ComboBoxListProps_2;
96
+
97
+ export declare type ComboBoxProps = {
98
+ class?: string;
99
+ } & ComboBoxProps_2;
100
+
101
+ export declare const default_alias: Options | Options[] | ((overrideOptions: Options) => Options | Options[] | Promise<Options | Options[]>);
102
+
103
+ export declare const default_alias_1: UserProjectConfigExport;
104
+
105
+ export declare function injectEditor(): Editor;
106
+
107
+ declare const InlinePopover: (props: {
108
+ class?: string | undefined;
109
+ } & InlinePopoverProps_2 & {}) => any;
110
+ export { InlinePopover }
111
+ export { InlinePopover as InlinePopover_alias_1 }
112
+
113
+ declare type InlinePopoverProps = {
114
+ class?: string;
115
+ } & InlinePopoverProps_2;
116
+ export { InlinePopoverProps }
117
+ export { InlinePopoverProps as InlinePopoverProps_alias_1 }
118
+
119
+ export declare const Popover: (props: {
120
+ class?: string | undefined;
121
+ } & PopoverProps_2 & {}) => any;
122
+
123
+ export { PopoverOptions }
124
+
125
+ export { PopoverOptions_alias_1 }
126
+
127
+ export declare type PopoverProps = {
128
+ class?: string;
129
+ } & PopoverProps_2;
130
+
131
+ declare const ProseKit: (props: ProseKitProps & {}) => any;
132
+ export { ProseKit }
133
+ export { ProseKit as ProseKit_alias_1 }
134
+
135
+ declare interface ProseKitProps {
136
+ editor: Editor;
137
+ }
138
+ export { ProseKitProps }
139
+ export { ProseKitProps as ProseKitProps_alias_1 }
140
+
141
+ export declare function provideEditor(editor: Editor): void;
142
+
143
+ /**
144
+ * Returns a shallow ref to the editor. If `update` is `true`, any editor update
145
+ * will trigger an effect.
146
+ */
147
+ declare function useEditor<E extends Extension = any>(options?: {
148
+ update?: boolean;
149
+ }): ShallowRef<Editor<E>>;
150
+ export { useEditor }
151
+ export { useEditor as useEditor_alias_1 }
152
+
153
+ export declare function useExtension<T extends Extension = Extension>(extension: Ref<T>): void;
154
+
155
+ declare function useKeymap(keymap: Ref<Keymap>): void;
156
+ export { useKeymap }
157
+ export { useKeymap as useKeymap_alias_1 }
158
+
159
+ export { }
@@ -0,0 +1,2 @@
1
+ export { AutocompleteEmpty_alias_1 as AutocompleteEmpty } from './_tsup-dts-rollup';
2
+ export { AutocompleteEmptyProps_alias_1 as AutocompleteEmptyProps } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/autocomplete-empty.gen.ts
2
+ import "@prosekit/lit/autocomplete-empty";
3
+ import { propNames } from "@prosekit/lit/autocomplete-empty";
4
+ import { defineComponent, h } from "vue";
5
+ var AutocompleteEmpty = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-autocomplete-empty", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ AutocompleteEmpty
19
+ };
@@ -0,0 +1,2 @@
1
+ export { AutocompleteItem_alias_1 as AutocompleteItem } from './_tsup-dts-rollup';
2
+ export { AutocompleteItemProps_alias_1 as AutocompleteItemProps } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/autocomplete-item.gen.ts
2
+ import "@prosekit/lit/autocomplete-item";
3
+ import { propNames } from "@prosekit/lit/autocomplete-item";
4
+ import { defineComponent, h } from "vue";
5
+ var AutocompleteItem = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-autocomplete-item", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ AutocompleteItem
19
+ };
@@ -0,0 +1,2 @@
1
+ export { AutocompleteList_alias_1 as AutocompleteList } from './_tsup-dts-rollup';
2
+ export { AutocompleteListProps_alias_1 as AutocompleteListProps } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/autocomplete-list.gen.ts
2
+ import "@prosekit/lit/autocomplete-list";
3
+ import { propNames } from "@prosekit/lit/autocomplete-list";
4
+ import { defineComponent, h } from "vue";
5
+ var AutocompleteList = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-autocomplete-list", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ AutocompleteList
19
+ };
@@ -0,0 +1,3 @@
1
+ export { PopoverOptions } from './_tsup-dts-rollup';
2
+ export { AutocompletePopover_alias_1 as AutocompletePopover } from './_tsup-dts-rollup';
3
+ export { AutocompletePopoverProps_alias_1 as AutocompletePopoverProps } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/autocomplete-popover.gen.ts
2
+ import "@prosekit/lit/autocomplete-popover";
3
+ import { propNames } from "@prosekit/lit/autocomplete-popover";
4
+ import { defineComponent, h } from "vue";
5
+ var AutocompletePopover = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-autocomplete-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ AutocompletePopover
19
+ };
@@ -0,0 +1,2 @@
1
+ export { ComboBoxInputProps } from './_tsup-dts-rollup';
2
+ export { ComboBoxInput } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/combo-box-input.gen.ts
2
+ import "@prosekit/lit/combo-box-input";
3
+ import { propNames } from "@prosekit/lit/combo-box-input";
4
+ import { defineComponent, h } from "vue";
5
+ var ComboBoxInput = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-combo-box-input", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ ComboBoxInput
19
+ };
@@ -0,0 +1,2 @@
1
+ export { ComboBoxItemProps } from './_tsup-dts-rollup';
2
+ export { ComboBoxItem } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/combo-box-item.gen.ts
2
+ import "@prosekit/lit/combo-box-item";
3
+ import { propNames } from "@prosekit/lit/combo-box-item";
4
+ import { defineComponent, h } from "vue";
5
+ var ComboBoxItem = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-combo-box-item", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ ComboBoxItem
19
+ };
@@ -0,0 +1,2 @@
1
+ export { ComboBoxListProps } from './_tsup-dts-rollup';
2
+ export { ComboBoxList } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/combo-box-list.gen.ts
2
+ import "@prosekit/lit/combo-box-list";
3
+ import { propNames } from "@prosekit/lit/combo-box-list";
4
+ import { defineComponent, h } from "vue";
5
+ var ComboBoxList = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-combo-box-list", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ ComboBoxList
19
+ };
@@ -0,0 +1,2 @@
1
+ export { ComboBoxProps } from './_tsup-dts-rollup';
2
+ export { ComboBox } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/combo-box.gen.ts
2
+ import "@prosekit/lit/combo-box";
3
+ import { propNames } from "@prosekit/lit/combo-box";
4
+ import { defineComponent, h } from "vue";
5
+ var ComboBox = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-combo-box", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ ComboBox
19
+ };
@@ -0,0 +1,3 @@
1
+ export { PopoverOptions_alias_1 as PopoverOptions } from './_tsup-dts-rollup';
2
+ export { InlinePopover_alias_1 as InlinePopover } from './_tsup-dts-rollup';
3
+ export { InlinePopoverProps_alias_1 as InlinePopoverProps } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/inline-popover.gen.ts
2
+ import "@prosekit/lit/inline-popover";
3
+ import { propNames } from "@prosekit/lit/inline-popover";
4
+ import { defineComponent, h } from "vue";
5
+ var InlinePopover = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-inline-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ InlinePopover
19
+ };
@@ -0,0 +1,2 @@
1
+ export { PopoverProps } from './_tsup-dts-rollup';
2
+ export { Popover } from './_tsup-dts-rollup';
@@ -0,0 +1,19 @@
1
+ // src/components/popover.gen.ts
2
+ import "@prosekit/lit/popover";
3
+ import { propNames } from "@prosekit/lit/popover";
4
+ import { defineComponent, h } from "vue";
5
+ var Popover = defineComponent(
6
+ (props, { slots }) => {
7
+ return () => {
8
+ var _a;
9
+ const webComponentProps = Object.fromEntries(
10
+ Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
11
+ );
12
+ return h("prosekit-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
13
+ };
14
+ },
15
+ { props: ["class", ...propNames] }
16
+ );
17
+ export {
18
+ Popover
19
+ };
@@ -1,14 +1,4 @@
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 { useKeymap } from './_tsup-dts-rollup';
4
+ export { useEditor } from './_tsup-dts-rollup';
@@ -1,4 +1,5 @@
1
1
  // src/components/prosekit.ts
2
+ import "@prosekit/core";
2
3
  import { defineComponent } from "vue";
3
4
 
4
5
  // src/injection/editor-injection.ts
@@ -29,27 +30,48 @@ var ProseKit = defineComponent(
29
30
  );
30
31
 
31
32
  // src/hooks/use-keymap.ts
32
- import { addKeymap } from "@prosekit/core";
33
- import { computed } from "vue";
33
+ import { defineKeymap } from "@prosekit/core";
34
+ import { computed, unref as unref2 } from "vue";
34
35
 
35
36
  // src/hooks/use-extension.ts
36
- import { effect } from "vue";
37
+ import "@prosekit/core";
38
+ import { unref, watchPostEffect } from "vue";
37
39
 
38
40
  // src/hooks/use-editor.ts
39
- function useEditor() {
40
- return injectEditor();
41
+ import { defineUpdateHandler } from "@prosekit/core";
42
+ import {
43
+ onMounted,
44
+ onUnmounted,
45
+ shallowRef,
46
+ triggerRef
47
+ } from "vue";
48
+ function useEditor(options) {
49
+ var _a;
50
+ const update = (_a = options == null ? void 0 : options.update) != null ? _a : false;
51
+ const editor = injectEditor();
52
+ const editorRef = shallowRef(editor);
53
+ if (update) {
54
+ onMounted(() => {
55
+ const forceUpdate = () => triggerRef(editorRef);
56
+ const dispose = editor.use(defineUpdateHandler(forceUpdate));
57
+ onUnmounted(dispose);
58
+ });
59
+ }
60
+ return editorRef;
41
61
  }
42
62
 
43
63
  // src/hooks/use-extension.ts
44
- function useExtension({ extension }) {
64
+ function useExtension(extension) {
45
65
  const editor = useEditor();
46
- effect(() => editor.use(extension));
66
+ watchPostEffect((onCleanup) => {
67
+ onCleanup(editor.value.use(unref(extension)));
68
+ });
47
69
  }
48
70
 
49
71
  // src/hooks/use-keymap.ts
50
- function useKeymap({ keymap }) {
51
- const extension = computed(() => addKeymap(keymap));
52
- useExtension({ extension: extension.value });
72
+ function useKeymap(keymap) {
73
+ const extension = computed(() => defineKeymap(unref2(keymap)));
74
+ useExtension(extension);
53
75
  }
54
76
  export {
55
77
  ProseKit,
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-20231120040948",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "ocavue",
@@ -30,33 +30,63 @@
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-empty": {
34
+ "types": "./dist/prosekit-vue-autocomplete-empty.d.ts",
35
+ "import": "./dist/prosekit-vue-autocomplete-empty.js",
36
+ "default": "./dist/prosekit-vue-autocomplete-empty.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
+ "./autocomplete-item": {
39
+ "types": "./dist/prosekit-vue-autocomplete-item.d.ts",
40
+ "import": "./dist/prosekit-vue-autocomplete-item.js",
41
+ "default": "./dist/prosekit-vue-autocomplete-item.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
+ "./autocomplete-list": {
44
+ "types": "./dist/prosekit-vue-autocomplete-list.d.ts",
45
+ "import": "./dist/prosekit-vue-autocomplete-list.js",
46
+ "default": "./dist/prosekit-vue-autocomplete-list.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
+ "./autocomplete-popover": {
49
+ "types": "./dist/prosekit-vue-autocomplete-popover.d.ts",
50
+ "import": "./dist/prosekit-vue-autocomplete-popover.js",
51
+ "default": "./dist/prosekit-vue-autocomplete-popover.js"
52
+ },
53
+ "./combo-box": {
54
+ "types": "./dist/prosekit-vue-combo-box.d.ts",
55
+ "import": "./dist/prosekit-vue-combo-box.js",
56
+ "default": "./dist/prosekit-vue-combo-box.js"
57
+ },
58
+ "./combo-box-input": {
59
+ "types": "./dist/prosekit-vue-combo-box-input.d.ts",
60
+ "import": "./dist/prosekit-vue-combo-box-input.js",
61
+ "default": "./dist/prosekit-vue-combo-box-input.js"
62
+ },
63
+ "./combo-box-item": {
64
+ "types": "./dist/prosekit-vue-combo-box-item.d.ts",
65
+ "import": "./dist/prosekit-vue-combo-box-item.js",
66
+ "default": "./dist/prosekit-vue-combo-box-item.js"
67
+ },
68
+ "./combo-box-list": {
69
+ "types": "./dist/prosekit-vue-combo-box-list.d.ts",
70
+ "import": "./dist/prosekit-vue-combo-box-list.js",
71
+ "default": "./dist/prosekit-vue-combo-box-list.js"
72
+ },
73
+ "./inline-popover": {
74
+ "types": "./dist/prosekit-vue-inline-popover.d.ts",
75
+ "import": "./dist/prosekit-vue-inline-popover.js",
76
+ "default": "./dist/prosekit-vue-inline-popover.js"
77
+ },
78
+ "./popover": {
79
+ "types": "./dist/prosekit-vue-popover.d.ts",
80
+ "import": "./dist/prosekit-vue-popover.js",
81
+ "default": "./dist/prosekit-vue-popover.js"
52
82
  }
53
83
  },
54
84
  "files": [
55
85
  "dist"
56
86
  ],
57
87
  "dependencies": {
58
- "@prosekit/core": "0.0.0-next-20230709094459",
59
- "@prosekit/lit": "0.0.0-next-20230709094459"
88
+ "@prosekit/core": "0.0.0-next-20231120040948",
89
+ "@prosekit/lit": "0.0.0-next-20231120040948"
60
90
  },
61
91
  "peerDependencies": {
62
92
  "vue": ">= 3.0.0"
@@ -68,10 +98,10 @@
68
98
  },
69
99
  "devDependencies": {
70
100
  "@prosekit/dev": "*",
71
- "tsup": "^7.1.0",
72
- "typescript": "^5.1.6",
73
- "vitest": "^0.33.0",
74
- "vue": "^3.3.4"
101
+ "tsup": "^8.0.0",
102
+ "typescript": "^5.2.2",
103
+ "vitest": "^0.34.6",
104
+ "vue": "^3.3.8"
75
105
  },
76
106
  "scripts": {
77
107
  "build:tsup": "tsup",
@@ -83,17 +113,35 @@
83
113
  ".": [
84
114
  "./dist/prosekit-vue.d.ts"
85
115
  ],
86
- "components/menu": [
87
- "./dist/prosekit-vue-components-menu.d.ts"
116
+ "autocomplete-empty": [
117
+ "./dist/prosekit-vue-autocomplete-empty.d.ts"
118
+ ],
119
+ "autocomplete-item": [
120
+ "./dist/prosekit-vue-autocomplete-item.d.ts"
121
+ ],
122
+ "autocomplete-list": [
123
+ "./dist/prosekit-vue-autocomplete-list.d.ts"
124
+ ],
125
+ "autocomplete-popover": [
126
+ "./dist/prosekit-vue-autocomplete-popover.d.ts"
127
+ ],
128
+ "combo-box": [
129
+ "./dist/prosekit-vue-combo-box.d.ts"
130
+ ],
131
+ "combo-box-input": [
132
+ "./dist/prosekit-vue-combo-box-input.d.ts"
133
+ ],
134
+ "combo-box-item": [
135
+ "./dist/prosekit-vue-combo-box-item.d.ts"
88
136
  ],
89
- "components/menu-item": [
90
- "./dist/prosekit-vue-components-menu-item.d.ts"
137
+ "combo-box-list": [
138
+ "./dist/prosekit-vue-combo-box-list.d.ts"
91
139
  ],
92
- "components/popover": [
93
- "./dist/prosekit-vue-components-popover.d.ts"
140
+ "inline-popover": [
141
+ "./dist/prosekit-vue-inline-popover.d.ts"
94
142
  ],
95
- "components/popover-suggestion": [
96
- "./dist/prosekit-vue-components-popover-suggestion.d.ts"
143
+ "popover": [
144
+ "./dist/prosekit-vue-popover.d.ts"
97
145
  ]
98
146
  }
99
147
  }
package/src/index.ts CHANGED
@@ -1,7 +1,3 @@
1
- /**
2
- * @module @prosekit/vue
3
- */
4
-
5
1
  export { ProseKit, type ProseKitProps } from './components/prosekit'
6
2
  export { useKeymap } from './hooks/use-keymap'
7
3
  export { useEditor } from './hooks/use-editor'
@@ -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
- };