@prosekit/vue 0.1.3 → 0.1.5
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 +24 -7
- package/dist/prosekit-vue-resizable-handle.d.ts +2 -0
- package/dist/prosekit-vue-resizable-handle.js +19 -0
- package/dist/prosekit-vue-resizable.d.ts +2 -0
- package/dist/prosekit-vue-resizable.js +19 -0
- package/dist/prosekit-vue.js +3 -1
- package/package.json +22 -6
@@ -1,15 +1,14 @@
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
2
1
|
import type { Attrs } from '@prosekit/pm/model';
|
3
2
|
import { AutocompleteEmptyProps as AutocompleteEmptyProps_2 } from '@prosekit/lit/autocomplete-empty';
|
4
3
|
import { AutocompleteItemProps as AutocompleteItemProps_2 } from '@prosekit/lit/autocomplete-item';
|
5
4
|
import { AutocompleteListProps as AutocompleteListProps_2 } from '@prosekit/lit/autocomplete-list';
|
6
5
|
import { AutocompletePopoverProps as AutocompletePopoverProps_2 } from '@prosekit/lit/autocomplete-popover';
|
6
|
+
import { BaseNodeViewOptions } from '@prosekit/core';
|
7
7
|
import { ComboBoxInputProps as ComboBoxInputProps_2 } from '@prosekit/lit/combo-box-input';
|
8
8
|
import { ComboBoxItemProps as ComboBoxItemProps_2 } from '@prosekit/lit/combo-box-item';
|
9
9
|
import { ComboBoxListProps as ComboBoxListProps_2 } from '@prosekit/lit/combo-box-list';
|
10
10
|
import { ComboBoxProps as ComboBoxProps_2 } from '@prosekit/lit/combo-box';
|
11
11
|
import { CommandArgs } from '@prosekit/core';
|
12
|
-
import { ComponentCustomProps } from 'vue';
|
13
12
|
import { ComponentOptionsMixin } from 'vue';
|
14
13
|
import { CoreNodeView } from '@prosemirror-adapter/core';
|
15
14
|
import type { CoreNodeViewSpec } from '@prosemirror-adapter/core';
|
@@ -32,12 +31,14 @@ import { PopoverOptions } from '@prosekit/lit/autocomplete-popover';
|
|
32
31
|
import { PopoverOptions as PopoverOptions_alias_1 } from '@prosekit/lit/inline-popover';
|
33
32
|
import { PopoverProps as PopoverProps_2 } from '@prosekit/lit/popover';
|
34
33
|
import { Priority } from '@prosekit/core';
|
34
|
+
import { PublicProps } from 'vue';
|
35
35
|
import { Ref } from 'vue';
|
36
36
|
import { RendererElement } from 'vue';
|
37
37
|
import { RendererNode } from 'vue';
|
38
|
+
import { ResizableHandleProps as ResizableHandleProps_2 } from '@prosekit/lit/resizable-handle';
|
39
|
+
import { ResizableProps as ResizableProps_2 } from '@prosekit/lit/resizable';
|
38
40
|
import { ShallowRef } from 'vue';
|
39
41
|
import { VNode } from 'vue';
|
40
|
-
import { VNodeProps } from 'vue';
|
41
42
|
import type { VNodeRef } from 'vue';
|
42
43
|
|
43
44
|
declare const AutocompleteEmpty: (props: AutocompleteEmptyProps_2 & {
|
@@ -173,6 +174,18 @@ export { ProseKitProps as ProseKitProps_alias_1 }
|
|
173
174
|
|
174
175
|
export declare function provideEditor(editor: Editor): void;
|
175
176
|
|
177
|
+
export declare const Resizable: (props: ResizableProps_2 & {
|
178
|
+
class?: string | undefined;
|
179
|
+
} & {}) => any;
|
180
|
+
|
181
|
+
export declare const ResizableHandle: (props: ResizableHandleProps_2 & {
|
182
|
+
class?: string | undefined;
|
183
|
+
} & {}) => any;
|
184
|
+
|
185
|
+
export declare type ResizableHandleProps = PropsWithClass<ResizableHandleProps_2>;
|
186
|
+
|
187
|
+
export declare type ResizableProps = PropsWithClass<ResizableProps_2>;
|
188
|
+
|
176
189
|
/**
|
177
190
|
* Returns a shallow ref to the editor. If `update` is `true`, any editor update
|
178
191
|
* will trigger an effect.
|
@@ -224,11 +237,15 @@ export { VueNodeViewComponent as VueNodeViewComponent_alias_1 }
|
|
224
237
|
*
|
225
238
|
* @public
|
226
239
|
*/
|
227
|
-
declare interface VueNodeViewOptions extends
|
240
|
+
declare interface VueNodeViewOptions extends BaseNodeViewOptions {
|
228
241
|
/**
|
229
|
-
* The name of the node.
|
242
|
+
* The name of the node type.
|
230
243
|
*/
|
231
244
|
name: string;
|
245
|
+
/**
|
246
|
+
* The Vue component to render the node.
|
247
|
+
*/
|
248
|
+
component: VueNodeViewComponent;
|
232
249
|
}
|
233
250
|
export { VueNodeViewOptions }
|
234
251
|
export { VueNodeViewOptions as VueNodeViewOptions_alias_1 }
|
@@ -265,11 +282,11 @@ export declare interface VueRendererResult {
|
|
265
282
|
readonly removeVueRenderer: (renderer: VueRenderer<unknown>) => void;
|
266
283
|
}
|
267
284
|
|
268
|
-
export declare const VueViewsConsumer: DefineComponent< {}, () => null, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
285
|
+
export declare const VueViewsConsumer: DefineComponent< {}, () => null, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
269
286
|
|
270
287
|
declare const VueViewsProvider: DefineComponent< {}, () => VNode<RendererNode, RendererElement, {
|
271
288
|
[key: string]: any;
|
272
|
-
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string,
|
289
|
+
}>, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes< {}>>, {}, {}>;
|
273
290
|
export { VueViewsProvider }
|
274
291
|
export { VueViewsProvider as VueViewsProvider_alias_1 }
|
275
292
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// src/components/resizable-handle.gen.ts
|
2
|
+
import "@prosekit/lit/resizable-handle";
|
3
|
+
import { propNames } from "@prosekit/lit/resizable-handle";
|
4
|
+
import { defineComponent, h } from "vue";
|
5
|
+
var ResizableHandle = 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-resizable-handle", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
13
|
+
};
|
14
|
+
},
|
15
|
+
{ props: ["class", ...propNames] }
|
16
|
+
);
|
17
|
+
export {
|
18
|
+
ResizableHandle
|
19
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// src/components/resizable.gen.ts
|
2
|
+
import "@prosekit/lit/resizable";
|
3
|
+
import { propNames } from "@prosekit/lit/resizable";
|
4
|
+
import { defineComponent, h } from "vue";
|
5
|
+
var Resizable = 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-resizable", webComponentProps, (_a = slots.default) == null ? void 0 : _a.call(slots));
|
13
|
+
};
|
14
|
+
},
|
15
|
+
{ props: ["class", ...propNames] }
|
16
|
+
);
|
17
|
+
export {
|
18
|
+
Resizable
|
19
|
+
};
|
package/dist/prosekit-vue.js
CHANGED
@@ -186,7 +186,9 @@ var VueViewsProvider = defineComponent2({
|
|
186
186
|
import { computed, defineComponent as defineComponent3 } from "vue";
|
187
187
|
|
188
188
|
// src/extensions/vue-node-view.ts
|
189
|
-
import {
|
189
|
+
import {
|
190
|
+
defineNodeViewFactory
|
191
|
+
} from "@prosekit/core";
|
190
192
|
function defineVueNodeView(options) {
|
191
193
|
const { name, ...userOptions } = options;
|
192
194
|
return defineNodeViewFactory({
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@prosekit/vue",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.1.
|
4
|
+
"version": "0.1.5",
|
5
5
|
"private": false,
|
6
6
|
"author": {
|
7
7
|
"name": "ocavue",
|
@@ -79,15 +79,25 @@
|
|
79
79
|
"types": "./dist/prosekit-vue-popover.d.ts",
|
80
80
|
"import": "./dist/prosekit-vue-popover.js",
|
81
81
|
"default": "./dist/prosekit-vue-popover.js"
|
82
|
+
},
|
83
|
+
"./resizable": {
|
84
|
+
"types": "./dist/prosekit-vue-resizable.d.ts",
|
85
|
+
"import": "./dist/prosekit-vue-resizable.js",
|
86
|
+
"default": "./dist/prosekit-vue-resizable.js"
|
87
|
+
},
|
88
|
+
"./resizable-handle": {
|
89
|
+
"types": "./dist/prosekit-vue-resizable-handle.d.ts",
|
90
|
+
"import": "./dist/prosekit-vue-resizable-handle.js",
|
91
|
+
"default": "./dist/prosekit-vue-resizable-handle.js"
|
82
92
|
}
|
83
93
|
},
|
84
94
|
"files": [
|
85
95
|
"dist"
|
86
96
|
],
|
87
97
|
"dependencies": {
|
88
|
-
"@prosekit/core": "^0.
|
89
|
-
"@prosekit/lit": "^0.1.
|
90
|
-
"@prosekit/pm": "^0.1.
|
98
|
+
"@prosekit/core": "^0.2.2",
|
99
|
+
"@prosekit/lit": "^0.1.7",
|
100
|
+
"@prosekit/pm": "^0.1.1",
|
91
101
|
"@prosemirror-adapter/core": "^0.2.6"
|
92
102
|
},
|
93
103
|
"peerDependencies": {
|
@@ -102,8 +112,8 @@
|
|
102
112
|
"@prosekit/dev": "*",
|
103
113
|
"tsup": "^8.0.1",
|
104
114
|
"typescript": "^5.3.3",
|
105
|
-
"vitest": "^1.
|
106
|
-
"vue": "^3.
|
115
|
+
"vitest": "^1.1.3",
|
116
|
+
"vue": "^3.4.5"
|
107
117
|
},
|
108
118
|
"scripts": {
|
109
119
|
"build:tsup": "tsup",
|
@@ -144,6 +154,12 @@
|
|
144
154
|
],
|
145
155
|
"popover": [
|
146
156
|
"./dist/prosekit-vue-popover.d.ts"
|
157
|
+
],
|
158
|
+
"resizable": [
|
159
|
+
"./dist/prosekit-vue-resizable.d.ts"
|
160
|
+
],
|
161
|
+
"resizable-handle": [
|
162
|
+
"./dist/prosekit-vue-resizable-handle.d.ts"
|
147
163
|
]
|
148
164
|
}
|
149
165
|
}
|