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