@prosekit/vue 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_tsup-dts-rollup.d.ts +19 -17
- package/dist/prosekit-vue-inline-popover.d.ts +3 -0
- package/dist/{prosekit-vue-code-block-popover.js → prosekit-vue-inline-popover.js} +6 -6
- package/dist/prosekit-vue.js +10 -11
- package/package.json +12 -12
- package/dist/prosekit-vue-code-block-popover.d.ts +0 -2
@@ -2,17 +2,19 @@ import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/li
|
|
2
2
|
import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/lit/autocomplete-item';
|
3
3
|
import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/lit/autocomplete-list';
|
4
4
|
import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/lit/autocomplete-popover';
|
5
|
-
import { CodeBlockPopoverProps as CodeBlockPopoverProps_2 } from '@prosekit/lit/code-block-popover';
|
6
5
|
import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
|
7
6
|
import { ComboBoxItemProps as ComboBoxItemProps_2 } from '@prosekit/lit/combo-box-item';
|
8
7
|
import { ComboBoxListProps as ComboBoxListProps_2 } from '@prosekit/lit/combo-box-list';
|
9
8
|
import { ComboBoxProps as ComboBoxProps_2 } from '@prosekit/lit/combo-box';
|
10
9
|
import { Editor } from '@prosekit/core';
|
11
10
|
import { Extension } from '@prosekit/core';
|
11
|
+
import { InlinePopoverProps as InlinePopoverProps_2 } from '@prosekit/lit/inline-popover';
|
12
12
|
import { Keymap } from '@prosekit/core';
|
13
13
|
import { Options } from 'tsup';
|
14
14
|
import { PopoverOptions } from '@prosekit/lit/autocomplete-popover';
|
15
|
+
import { PopoverOptions as PopoverOptions_alias_1 } from '@prosekit/lit/inline-popover';
|
15
16
|
import { PopoverProps as PopoverProps_2 } from '@prosekit/lit/popover';
|
17
|
+
import { Ref } from 'vue';
|
16
18
|
import { ShallowRef } from 'vue';
|
17
19
|
import { UserProjectConfigExport } from 'vitest/dist/config.js';
|
18
20
|
|
@@ -64,14 +66,6 @@ declare type AutocompletePopoverProps = {
|
|
64
66
|
export { AutocompletePopoverProps }
|
65
67
|
export { AutocompletePopoverProps as AutocompletePopoverProps_alias_1 }
|
66
68
|
|
67
|
-
export declare const CodeBlockPopover: (props: {
|
68
|
-
class?: string | undefined;
|
69
|
-
} & CodeBlockPopoverProps_2 & {}) => any;
|
70
|
-
|
71
|
-
export declare type CodeBlockPopoverProps = {
|
72
|
-
class?: string;
|
73
|
-
} & CodeBlockPopoverProps_2;
|
74
|
-
|
75
69
|
export declare const ComboBox: (props: {
|
76
70
|
class?: string | undefined;
|
77
71
|
} & ComboBoxProps_2 & {}) => any;
|
@@ -110,12 +104,26 @@ export declare const default_alias_1: UserProjectConfigExport;
|
|
110
104
|
|
111
105
|
export declare function injectEditor(): Editor;
|
112
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
|
+
|
113
119
|
export declare const Popover: (props: {
|
114
120
|
class?: string | undefined;
|
115
121
|
} & PopoverProps_2 & {}) => any;
|
116
122
|
|
117
123
|
export { PopoverOptions }
|
118
124
|
|
125
|
+
export { PopoverOptions_alias_1 }
|
126
|
+
|
119
127
|
export declare type PopoverProps = {
|
120
128
|
class?: string;
|
121
129
|
} & PopoverProps_2;
|
@@ -142,15 +150,9 @@ declare function useEditor<E extends Extension = any>(options?: {
|
|
142
150
|
export { useEditor }
|
143
151
|
export { useEditor as useEditor_alias_1 }
|
144
152
|
|
145
|
-
export declare function useExtension(
|
146
|
-
|
147
|
-
declare interface UseExtensionProps<T extends Extension = Extension> {
|
148
|
-
extension: T;
|
149
|
-
}
|
153
|
+
export declare function useExtension<T extends Extension = Extension>(extension: Ref<T>): void;
|
150
154
|
|
151
|
-
declare function useKeymap(
|
152
|
-
keymap: Keymap;
|
153
|
-
}): void;
|
155
|
+
declare function useKeymap(keymap: Ref<Keymap>): void;
|
154
156
|
export { useKeymap }
|
155
157
|
export { useKeymap as useKeymap_alias_1 }
|
156
158
|
|
@@ -1,19 +1,19 @@
|
|
1
|
-
// src/components/
|
2
|
-
import "@prosekit/lit/
|
3
|
-
import { propNames } from "@prosekit/lit/
|
1
|
+
// src/components/inline-popover.gen.ts
|
2
|
+
import "@prosekit/lit/inline-popover";
|
3
|
+
import { propNames } from "@prosekit/lit/inline-popover";
|
4
4
|
import { defineComponent, h } from "vue";
|
5
|
-
var
|
5
|
+
var InlinePopover = defineComponent(
|
6
6
|
(props, { slots }) => {
|
7
7
|
return () => {
|
8
8
|
var _a;
|
9
9
|
const webComponentProps = Object.fromEntries(
|
10
10
|
Object.entries(props).filter((entry) => entry[1] !== void 0).map(([key, value]) => [(key === "class" ? "" : ".") + key, value])
|
11
11
|
);
|
12
|
-
return h("prosekit-
|
12
|
+
return h("prosekit-inline-popover", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
13
13
|
};
|
14
14
|
},
|
15
15
|
{ props: ["class", ...propNames] }
|
16
16
|
);
|
17
17
|
export {
|
18
|
-
|
18
|
+
InlinePopover
|
19
19
|
};
|
package/dist/prosekit-vue.js
CHANGED
@@ -31,14 +31,14 @@ var ProseKit = defineComponent(
|
|
31
31
|
|
32
32
|
// src/hooks/use-keymap.ts
|
33
33
|
import { defineKeymap } from "@prosekit/core";
|
34
|
-
import { computed } from "vue";
|
34
|
+
import { computed, unref as unref2 } from "vue";
|
35
35
|
|
36
36
|
// src/hooks/use-extension.ts
|
37
37
|
import "@prosekit/core";
|
38
|
-
import {
|
38
|
+
import { unref, watchPostEffect } from "vue";
|
39
39
|
|
40
40
|
// src/hooks/use-editor.ts
|
41
|
-
import {
|
41
|
+
import { defineUpdateHandler } from "@prosekit/core";
|
42
42
|
import {
|
43
43
|
onMounted,
|
44
44
|
onUnmounted,
|
@@ -53,7 +53,7 @@ function useEditor(options) {
|
|
53
53
|
if (update) {
|
54
54
|
onMounted(() => {
|
55
55
|
const forceUpdate = () => triggerRef(editorRef);
|
56
|
-
const dispose = editor.use(
|
56
|
+
const dispose = editor.use(defineUpdateHandler(forceUpdate));
|
57
57
|
onUnmounted(dispose);
|
58
58
|
});
|
59
59
|
}
|
@@ -61,18 +61,17 @@ function useEditor(options) {
|
|
61
61
|
}
|
62
62
|
|
63
63
|
// src/hooks/use-extension.ts
|
64
|
-
function useExtension(
|
64
|
+
function useExtension(extension) {
|
65
65
|
const editor = useEditor();
|
66
|
-
|
67
|
-
|
68
|
-
onUnmounted2(dispose);
|
66
|
+
watchPostEffect((onCleanup) => {
|
67
|
+
onCleanup(editor.value.use(unref(extension)));
|
69
68
|
});
|
70
69
|
}
|
71
70
|
|
72
71
|
// src/hooks/use-keymap.ts
|
73
|
-
function useKeymap(
|
74
|
-
const extension = computed(() => defineKeymap(keymap));
|
75
|
-
useExtension(
|
72
|
+
function useKeymap(keymap) {
|
73
|
+
const extension = computed(() => defineKeymap(unref2(keymap)));
|
74
|
+
useExtension(extension);
|
76
75
|
}
|
77
76
|
export {
|
78
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.
|
4
|
+
"version": "0.0.25",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -50,11 +50,6 @@
|
|
50
50
|
"import": "./dist/prosekit-vue-autocomplete-popover.js",
|
51
51
|
"default": "./dist/prosekit-vue-autocomplete-popover.js"
|
52
52
|
},
|
53
|
-
"./code-block-popover": {
|
54
|
-
"types": "./dist/prosekit-vue-code-block-popover.d.ts",
|
55
|
-
"import": "./dist/prosekit-vue-code-block-popover.js",
|
56
|
-
"default": "./dist/prosekit-vue-code-block-popover.js"
|
57
|
-
},
|
58
53
|
"./combo-box": {
|
59
54
|
"types": "./dist/prosekit-vue-combo-box.d.ts",
|
60
55
|
"import": "./dist/prosekit-vue-combo-box.js",
|
@@ -75,6 +70,11 @@
|
|
75
70
|
"import": "./dist/prosekit-vue-combo-box-list.js",
|
76
71
|
"default": "./dist/prosekit-vue-combo-box-list.js"
|
77
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
78
|
"./popover": {
|
79
79
|
"types": "./dist/prosekit-vue-popover.d.ts",
|
80
80
|
"import": "./dist/prosekit-vue-popover.js",
|
@@ -85,8 +85,8 @@
|
|
85
85
|
"dist"
|
86
86
|
],
|
87
87
|
"dependencies": {
|
88
|
-
"@prosekit/core": "^0.0.
|
89
|
-
"@prosekit/lit": "^0.0.
|
88
|
+
"@prosekit/core": "^0.0.20",
|
89
|
+
"@prosekit/lit": "^0.0.24"
|
90
90
|
},
|
91
91
|
"peerDependencies": {
|
92
92
|
"vue": ">= 3.0.0"
|
@@ -101,7 +101,7 @@
|
|
101
101
|
"tsup": "^7.2.0",
|
102
102
|
"typescript": "^5.2.2",
|
103
103
|
"vitest": "^0.34.6",
|
104
|
-
"vue": "^3.3.
|
104
|
+
"vue": "^3.3.8"
|
105
105
|
},
|
106
106
|
"scripts": {
|
107
107
|
"build:tsup": "tsup",
|
@@ -125,9 +125,6 @@
|
|
125
125
|
"autocomplete-popover": [
|
126
126
|
"./dist/prosekit-vue-autocomplete-popover.d.ts"
|
127
127
|
],
|
128
|
-
"code-block-popover": [
|
129
|
-
"./dist/prosekit-vue-code-block-popover.d.ts"
|
130
|
-
],
|
131
128
|
"combo-box": [
|
132
129
|
"./dist/prosekit-vue-combo-box.d.ts"
|
133
130
|
],
|
@@ -140,6 +137,9 @@
|
|
140
137
|
"combo-box-list": [
|
141
138
|
"./dist/prosekit-vue-combo-box-list.d.ts"
|
142
139
|
],
|
140
|
+
"inline-popover": [
|
141
|
+
"./dist/prosekit-vue-inline-popover.d.ts"
|
142
|
+
],
|
143
143
|
"popover": [
|
144
144
|
"./dist/prosekit-vue-popover.d.ts"
|
145
145
|
]
|