@vizel/vue 0.0.1-alpha.6 → 1.0.0
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/README.md +1 -1
- package/dist/index.d.ts +99 -0
- package/dist/index.js +36 -28
- package/dist/index10.js +57 -43
- package/dist/index14.js +47 -43
- package/dist/index2.js +1 -1
- package/dist/index24.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index32.js +28 -36
- package/dist/index33.js +31 -45
- package/dist/index34.js +43 -22
- package/dist/index35.js +13 -8
- package/dist/index36.js +33 -41
- package/dist/index37.js +43 -18
- package/dist/index38.js +21 -12
- package/dist/index39.js +8 -15
- package/dist/index40.js +44 -2
- package/dist/index41.js +21 -2
- package/dist/index42.js +13 -2
- package/dist/index43.js +15 -2
- package/dist/index44.js +1 -1
- package/dist/index45.js +1 -1
- package/dist/index46.js +1 -1
- package/dist/index47.js +1 -1
- package/dist/index48.js +1 -1
- package/dist/index49.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index51.js +1 -1
- package/dist/index52.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index54.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index57.js +1 -1
- package/dist/index58.js +1 -1
- package/dist/index59.js +1 -1
- package/dist/index60.js +2 -2
- package/dist/index61.js +4 -0
- package/dist/index62.js +4 -0
- package/dist/index63.js +4 -0
- package/dist/index64.js +4 -0
- package/dist/index65.js +4 -0
- package/dist/index66.js +4 -0
- package/dist/index67.js +4 -0
- package/dist/index68.js +4 -0
- package/package.json +34 -14
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { VizelSlashMenuRendererOptions } from '@vizel/core';
|
|
|
26
26
|
import { VizelTheme } from '@vizel/core';
|
|
27
27
|
import { VizelThemeProviderOptions } from '@vizel/core';
|
|
28
28
|
import { VizelThemeState } from '@vizel/core';
|
|
29
|
+
import { VizelToolbarAction } from '@vizel/core';
|
|
29
30
|
|
|
30
31
|
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
|
|
31
32
|
/** The underlying Tiptap editor instance */
|
|
@@ -72,9 +73,20 @@ transformDiagramsOnImport: boolean;
|
|
|
72
73
|
editable: boolean;
|
|
73
74
|
autofocus: boolean | "start" | "end" | "all" | number;
|
|
74
75
|
enableEmbed: boolean;
|
|
76
|
+
showToolbar: boolean;
|
|
75
77
|
showBubbleMenu: boolean;
|
|
76
78
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
77
79
|
|
|
80
|
+
declare const __VLS_component_10: DefineComponent<VizelToolbarProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelToolbarProps> & Readonly<{}>, {
|
|
81
|
+
showDefaultToolbar: boolean;
|
|
82
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
83
|
+
|
|
84
|
+
declare const __VLS_component_11: DefineComponent<VizelToolbarButtonProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
85
|
+
click: () => any;
|
|
86
|
+
}, string, PublicProps, Readonly<VizelToolbarButtonProps> & Readonly<{
|
|
87
|
+
onClick?: () => any;
|
|
88
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
89
|
+
|
|
78
90
|
declare const __VLS_component_2: DefineComponent<VizelBubbleMenuProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelBubbleMenuProps> & Readonly<{}>, {
|
|
79
91
|
pluginKey: string;
|
|
80
92
|
showDefaultMenu: boolean;
|
|
@@ -125,6 +137,9 @@ declare type __VLS_PublicProps = {
|
|
|
125
137
|
declare function __VLS_template(): {
|
|
126
138
|
attrs: Partial<{}>;
|
|
127
139
|
slots: {
|
|
140
|
+
toolbar?(_: {
|
|
141
|
+
editor: Editor;
|
|
142
|
+
}): any;
|
|
128
143
|
'bubble-menu'?(_: {
|
|
129
144
|
editor: Editor;
|
|
130
145
|
}): any;
|
|
@@ -136,6 +151,26 @@ declare function __VLS_template(): {
|
|
|
136
151
|
rootEl: HTMLDivElement;
|
|
137
152
|
};
|
|
138
153
|
|
|
154
|
+
declare function __VLS_template_10(): {
|
|
155
|
+
attrs: Partial<{}>;
|
|
156
|
+
slots: {
|
|
157
|
+
default?(_: {
|
|
158
|
+
editor: Editor;
|
|
159
|
+
}): any;
|
|
160
|
+
};
|
|
161
|
+
refs: {};
|
|
162
|
+
rootEl: any;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
declare function __VLS_template_11(): {
|
|
166
|
+
attrs: Partial<{}>;
|
|
167
|
+
slots: {
|
|
168
|
+
default?(_: {}): any;
|
|
169
|
+
};
|
|
170
|
+
refs: {};
|
|
171
|
+
rootEl: HTMLButtonElement;
|
|
172
|
+
};
|
|
173
|
+
|
|
139
174
|
declare function __VLS_template_2(): {
|
|
140
175
|
attrs: Partial<{}>;
|
|
141
176
|
slots: {
|
|
@@ -223,6 +258,10 @@ declare function __VLS_template_9(): {
|
|
|
223
258
|
|
|
224
259
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
225
260
|
|
|
261
|
+
declare type __VLS_TemplateResult_10 = ReturnType<typeof __VLS_template_10>;
|
|
262
|
+
|
|
263
|
+
declare type __VLS_TemplateResult_11 = ReturnType<typeof __VLS_template_11>;
|
|
264
|
+
|
|
226
265
|
declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
|
|
227
266
|
|
|
228
267
|
declare type __VLS_TemplateResult_3 = ReturnType<typeof __VLS_template_3>;
|
|
@@ -245,6 +284,18 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
245
284
|
};
|
|
246
285
|
};
|
|
247
286
|
|
|
287
|
+
declare type __VLS_WithTemplateSlots_10<T, S> = T & {
|
|
288
|
+
new (): {
|
|
289
|
+
$slots: S;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
declare type __VLS_WithTemplateSlots_11<T, S> = T & {
|
|
294
|
+
new (): {
|
|
295
|
+
$slots: S;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
|
|
248
299
|
declare type __VLS_WithTemplateSlots_2<T, S> = T & {
|
|
249
300
|
new (): {
|
|
250
301
|
$slots: S;
|
|
@@ -884,6 +935,8 @@ export declare interface VizelProps {
|
|
|
884
935
|
features?: VizelFeatureOptions;
|
|
885
936
|
/** Custom class name for the editor container */
|
|
886
937
|
class?: string;
|
|
938
|
+
/** Whether to show the toolbar (default: false) */
|
|
939
|
+
showToolbar?: boolean;
|
|
887
940
|
/** Whether to show the bubble menu (default: true) */
|
|
888
941
|
showBubbleMenu?: boolean;
|
|
889
942
|
/** Enable embed option in bubble menu link editor (requires Embed extension) */
|
|
@@ -978,4 +1031,50 @@ export declare const VizelThemeProvider: __VLS_WithTemplateSlots_9<typeof __VLS_
|
|
|
978
1031
|
export declare interface VizelThemeProviderProps extends VizelThemeProviderOptions {
|
|
979
1032
|
}
|
|
980
1033
|
|
|
1034
|
+
export declare const VizelToolbar: __VLS_WithTemplateSlots_10<typeof __VLS_component_10, __VLS_TemplateResult_10["slots"]>;
|
|
1035
|
+
|
|
1036
|
+
export declare const VizelToolbarButton: __VLS_WithTemplateSlots_11<typeof __VLS_component_11, __VLS_TemplateResult_11["slots"]>;
|
|
1037
|
+
|
|
1038
|
+
export declare interface VizelToolbarButtonProps {
|
|
1039
|
+
/** Whether the button is in active state */
|
|
1040
|
+
isActive?: boolean;
|
|
1041
|
+
/** Whether the button is disabled */
|
|
1042
|
+
disabled?: boolean;
|
|
1043
|
+
/** Tooltip title */
|
|
1044
|
+
title?: string;
|
|
1045
|
+
/** Custom class name */
|
|
1046
|
+
class?: string;
|
|
1047
|
+
/** Action identifier for testing */
|
|
1048
|
+
action?: string;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
export declare const VizelToolbarDefault: DefineComponent<VizelToolbarDefaultProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelToolbarDefaultProps> & Readonly<{}>, {
|
|
1052
|
+
actions: VizelToolbarAction[];
|
|
1053
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1054
|
+
|
|
1055
|
+
export declare interface VizelToolbarDefaultProps {
|
|
1056
|
+
/** The editor instance */
|
|
1057
|
+
editor: Editor;
|
|
1058
|
+
/** Custom class name */
|
|
1059
|
+
class?: string;
|
|
1060
|
+
/** Custom toolbar actions (defaults to vizelDefaultToolbarActions) */
|
|
1061
|
+
actions?: VizelToolbarAction[];
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
export declare const VizelToolbarDivider: DefineComponent<VizelToolbarDividerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<VizelToolbarDividerProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
1065
|
+
|
|
1066
|
+
export declare interface VizelToolbarDividerProps {
|
|
1067
|
+
/** Custom class name */
|
|
1068
|
+
class?: string;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
export declare interface VizelToolbarProps {
|
|
1072
|
+
/** Editor instance. Falls back to context if not provided. */
|
|
1073
|
+
editor?: Editor | null;
|
|
1074
|
+
/** Custom class name */
|
|
1075
|
+
class?: string;
|
|
1076
|
+
/** Whether to show the default toolbar (default: true). Set to false when using custom slot content. */
|
|
1077
|
+
showDefaultToolbar?: boolean;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
981
1080
|
export { }
|
package/dist/index.js
CHANGED
|
@@ -7,16 +7,16 @@ import "./index7.js";
|
|
|
7
7
|
import "./index8.js";
|
|
8
8
|
import "./index9.js";
|
|
9
9
|
import { default as p } from "./index10.js";
|
|
10
|
-
import { default as
|
|
10
|
+
import { default as s } from "./index11.js";
|
|
11
11
|
import { default as x } from "./index12.js";
|
|
12
12
|
import { default as n } from "./index13.js";
|
|
13
13
|
import { default as S } from "./index14.js";
|
|
14
14
|
import { default as c } from "./index15.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { useVizelContext as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
15
|
+
import { default as h } from "./index16.js";
|
|
16
|
+
import { useVizelContext as T, useVizelContextSafe as E } from "./index17.js";
|
|
17
|
+
import { default as P } from "./index18.js";
|
|
18
|
+
import { default as k } from "./index19.js";
|
|
19
|
+
import { default as w } from "./index20.js";
|
|
20
20
|
import { provideVizelIcons as A, useVizelIconContext as L } from "./index21.js";
|
|
21
21
|
import { default as R } from "./index22.js";
|
|
22
22
|
import { default as j } from "./index23.js";
|
|
@@ -28,24 +28,28 @@ import { default as W } from "./index28.js";
|
|
|
28
28
|
import { default as Y } from "./index29.js";
|
|
29
29
|
import { default as _ } from "./index30.js";
|
|
30
30
|
import { default as ee } from "./index31.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
31
|
+
import { default as re } from "./index32.js";
|
|
32
|
+
import { default as le } from "./index33.js";
|
|
33
|
+
import { default as fe } from "./index34.js";
|
|
34
|
+
import { default as ue } from "./index35.js";
|
|
35
|
+
import { createVizelSlashMenuRenderer as pe } from "./index36.js";
|
|
36
|
+
import { useVizelAutoSave as se } from "./index37.js";
|
|
37
|
+
import { useVizelEditor as xe } from "./index38.js";
|
|
38
|
+
import { useVizelEditorState as ne } from "./index39.js";
|
|
39
|
+
import { useVizelMarkdown as Se } from "./index40.js";
|
|
40
|
+
import { useVizelState as ce } from "./index41.js";
|
|
41
|
+
import { useVizelTheme as he, useVizelThemeSafe as Be } from "./index42.js";
|
|
38
42
|
export {
|
|
39
43
|
p as Vizel,
|
|
40
|
-
|
|
44
|
+
s as VizelBubbleMenu,
|
|
41
45
|
x as VizelBubbleMenuButton,
|
|
42
46
|
n as VizelBubbleMenuColorPicker,
|
|
43
47
|
S as VizelBubbleMenuDefault,
|
|
44
48
|
c as VizelBubbleMenuDivider,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
h as VizelColorPicker,
|
|
50
|
+
P as VizelEditor,
|
|
51
|
+
k as VizelEmbedView,
|
|
52
|
+
w as VizelIcon,
|
|
49
53
|
R as VizelIconProvider,
|
|
50
54
|
j as VizelLinkEditor,
|
|
51
55
|
F as VizelNodeSelector,
|
|
@@ -56,16 +60,20 @@ export {
|
|
|
56
60
|
Y as VizelSlashMenuEmpty,
|
|
57
61
|
_ as VizelSlashMenuItem,
|
|
58
62
|
ee as VizelThemeProvider,
|
|
59
|
-
re as
|
|
63
|
+
re as VizelToolbar,
|
|
64
|
+
le as VizelToolbarButton,
|
|
65
|
+
fe as VizelToolbarDefault,
|
|
66
|
+
ue as VizelToolbarDivider,
|
|
67
|
+
pe as createVizelSlashMenuRenderer,
|
|
60
68
|
A as provideVizelIcons,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
se as useVizelAutoSave,
|
|
70
|
+
T as useVizelContext,
|
|
71
|
+
E as useVizelContextSafe,
|
|
72
|
+
xe as useVizelEditor,
|
|
73
|
+
ne as useVizelEditorState,
|
|
66
74
|
L as useVizelIconContext,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
75
|
+
Se as useVizelMarkdown,
|
|
76
|
+
ce as useVizelState,
|
|
77
|
+
he as useVizelTheme,
|
|
78
|
+
Be as useVizelThemeSafe
|
|
71
79
|
};
|
package/dist/index10.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as B, mergeModels as
|
|
2
|
-
import { getVizelMarkdown as
|
|
3
|
-
import { useVizelEditor as E } from "./
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as B, mergeModels as c, useModel as M, useSlots as g, watch as C, createElementBlock as z, openBlock as n, normalizeClass as $, createBlock as i, createCommentVNode as u, renderSlot as m, unref as t, withCtx as p } from "vue";
|
|
2
|
+
import { getVizelMarkdown as k, setVizelMarkdown as D } from "@vizel/core";
|
|
3
|
+
import { useVizelEditor as E } from "./index38.js";
|
|
4
|
+
import w from "./index11.js";
|
|
5
5
|
import U from "./index18.js";
|
|
6
|
-
|
|
6
|
+
import v from "./index32.js";
|
|
7
|
+
const N = /* @__PURE__ */ B({
|
|
7
8
|
__name: "Vizel",
|
|
8
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ c({
|
|
9
10
|
initialContent: {},
|
|
10
11
|
initialMarkdown: {},
|
|
11
12
|
transformDiagramsOnImport: { type: Boolean, default: !0 },
|
|
@@ -14,26 +15,27 @@ const F = /* @__PURE__ */ B({
|
|
|
14
15
|
autofocus: { type: [Boolean, String, Number], default: !1 },
|
|
15
16
|
features: {},
|
|
16
17
|
class: {},
|
|
18
|
+
showToolbar: { type: Boolean, default: !1 },
|
|
17
19
|
showBubbleMenu: { type: Boolean, default: !0 },
|
|
18
20
|
enableEmbed: { type: Boolean, default: !1 }
|
|
19
21
|
}, {
|
|
20
22
|
markdown: {},
|
|
21
23
|
markdownModifiers: {}
|
|
22
24
|
}),
|
|
23
|
-
emits: /* @__PURE__ */
|
|
24
|
-
setup(r, { expose:
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
const
|
|
28
|
-
...
|
|
29
|
-
...
|
|
30
|
-
transformDiagramsOnImport:
|
|
31
|
-
...
|
|
32
|
-
editable:
|
|
33
|
-
autofocus:
|
|
34
|
-
...
|
|
25
|
+
emits: /* @__PURE__ */ c(["update", "create", "destroy", "selectionUpdate", "focus", "blur"], ["update:markdown"]),
|
|
26
|
+
setup(r, { expose: y, emit: h }) {
|
|
27
|
+
const a = r, l = h, d = M(r, "markdown"), f = g();
|
|
28
|
+
let s = !1;
|
|
29
|
+
const o = E({
|
|
30
|
+
...a.initialContent !== void 0 && { initialContent: a.initialContent },
|
|
31
|
+
...a.initialMarkdown !== void 0 && { initialMarkdown: a.initialMarkdown },
|
|
32
|
+
transformDiagramsOnImport: a.transformDiagramsOnImport,
|
|
33
|
+
...a.placeholder !== void 0 && { placeholder: a.placeholder },
|
|
34
|
+
editable: a.editable,
|
|
35
|
+
autofocus: a.autofocus,
|
|
36
|
+
...a.features !== void 0 && { features: a.features },
|
|
35
37
|
onUpdate: (e) => {
|
|
36
|
-
l("update", e), !
|
|
38
|
+
l("update", e), !s && d.value !== void 0 && (d.value = k(e.editor));
|
|
37
39
|
},
|
|
38
40
|
onCreate: (e) => l("create", e),
|
|
39
41
|
onDestroy: () => l("destroy"),
|
|
@@ -41,48 +43,60 @@ const F = /* @__PURE__ */ B({
|
|
|
41
43
|
onFocus: (e) => l("focus", e),
|
|
42
44
|
onBlur: (e) => l("blur", e)
|
|
43
45
|
});
|
|
44
|
-
return
|
|
45
|
-
if (e === void 0 || !
|
|
46
|
-
const
|
|
47
|
-
e !==
|
|
48
|
-
transformDiagrams:
|
|
49
|
-
}),
|
|
50
|
-
}),
|
|
46
|
+
return C(d, (e) => {
|
|
47
|
+
if (e === void 0 || !o.value) return;
|
|
48
|
+
const b = k(o.value);
|
|
49
|
+
e !== b && (s = !0, D(o.value, e, {
|
|
50
|
+
transformDiagrams: a.transformDiagramsOnImport
|
|
51
|
+
}), s = !1);
|
|
52
|
+
}), y({
|
|
51
53
|
/** The underlying Tiptap editor instance */
|
|
52
54
|
get editor() {
|
|
53
|
-
return
|
|
55
|
+
return o.value;
|
|
54
56
|
},
|
|
55
57
|
/**
|
|
56
58
|
* Get the underlying Tiptap editor instance
|
|
57
59
|
* @deprecated Use the `editor` property instead
|
|
58
60
|
*/
|
|
59
|
-
getEditor: () =>
|
|
60
|
-
}), (e,
|
|
61
|
-
class:
|
|
61
|
+
getEditor: () => o.value
|
|
62
|
+
}), (e, b) => (n(), z("div", {
|
|
63
|
+
class: $(["vizel-root", e.$props.class]),
|
|
62
64
|
"data-vizel-root": ""
|
|
63
65
|
}, [
|
|
64
|
-
|
|
66
|
+
r.showToolbar && t(o) && t(f).toolbar ? (n(), i(v, {
|
|
65
67
|
key: 0,
|
|
66
|
-
editor:
|
|
67
|
-
},
|
|
68
|
-
|
|
68
|
+
editor: t(o)
|
|
69
|
+
}, {
|
|
70
|
+
default: p(() => [
|
|
71
|
+
m(e.$slots, "toolbar", { editor: t(o) })
|
|
72
|
+
]),
|
|
73
|
+
_: 3
|
|
74
|
+
}, 8, ["editor"])) : r.showToolbar && t(o) ? (n(), i(v, {
|
|
69
75
|
key: 1,
|
|
70
|
-
editor:
|
|
76
|
+
editor: t(o)
|
|
77
|
+
}, null, 8, ["editor"])) : u("", !0),
|
|
78
|
+
t(o) ? (n(), i(U, {
|
|
79
|
+
key: 2,
|
|
80
|
+
editor: t(o)
|
|
81
|
+
}, null, 8, ["editor"])) : u("", !0),
|
|
82
|
+
r.showBubbleMenu && t(o) && t(f)["bubble-menu"] ? (n(), i(w, {
|
|
83
|
+
key: 3,
|
|
84
|
+
editor: t(o),
|
|
71
85
|
"enable-embed": r.enableEmbed ?? !1
|
|
72
86
|
}, {
|
|
73
|
-
default:
|
|
74
|
-
|
|
87
|
+
default: p(() => [
|
|
88
|
+
m(e.$slots, "bubble-menu", { editor: t(o) })
|
|
75
89
|
]),
|
|
76
90
|
_: 3
|
|
77
|
-
}, 8, ["editor", "enable-embed"])) : r.showBubbleMenu &&
|
|
78
|
-
key:
|
|
79
|
-
editor:
|
|
91
|
+
}, 8, ["editor", "enable-embed"])) : r.showBubbleMenu && t(o) ? (n(), i(w, {
|
|
92
|
+
key: 4,
|
|
93
|
+
editor: t(o),
|
|
80
94
|
"enable-embed": r.enableEmbed ?? !1
|
|
81
|
-
}, null, 8, ["editor", "enable-embed"])) :
|
|
82
|
-
|
|
95
|
+
}, null, 8, ["editor", "enable-embed"])) : u("", !0),
|
|
96
|
+
m(e.$slots, "default", { editor: t(o) })
|
|
83
97
|
], 2));
|
|
84
98
|
}
|
|
85
99
|
});
|
|
86
100
|
export {
|
|
87
|
-
|
|
101
|
+
N as default
|
|
88
102
|
};
|
package/dist/index14.js
CHANGED
|
@@ -1,108 +1,112 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useVizelState as
|
|
1
|
+
import { defineComponent as A, computed as l, ref as B, createBlock as _, createElementBlock as y, openBlock as c, normalizeClass as E, createVNode as e, withCtx as r } from "vue";
|
|
2
|
+
import { useVizelState as S } from "./index41.js";
|
|
3
3
|
import a from "./index12.js";
|
|
4
|
-
import
|
|
4
|
+
import v from "./index13.js";
|
|
5
|
+
import u from "./index15.js";
|
|
5
6
|
import d from "./index20.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import z from "./index23.js";
|
|
8
|
+
import I from "./index24.js";
|
|
9
|
+
const M = /* @__PURE__ */ A({
|
|
9
10
|
__name: "VizelBubbleMenuDefault",
|
|
10
11
|
props: {
|
|
11
12
|
editor: {},
|
|
12
13
|
class: {},
|
|
13
14
|
enableEmbed: { type: Boolean }
|
|
14
15
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
16
|
+
setup(m) {
|
|
17
|
+
const i = m, o = S(() => i.editor), f = l(() => (o.value, i.editor.isActive("bold"))), k = l(() => (o.value, i.editor.isActive("italic"))), p = l(() => (o.value, i.editor.isActive("strike"))), C = l(() => (o.value, i.editor.isActive("underline"))), b = l(() => (o.value, i.editor.isActive("code"))), g = l(() => (o.value, i.editor.isActive("link"))), s = B(!1);
|
|
18
|
+
return ($, t) => s.value ? (c(), _(z, {
|
|
18
19
|
key: 0,
|
|
19
|
-
editor:
|
|
20
|
-
"enable-embed":
|
|
20
|
+
editor: i.editor,
|
|
21
|
+
"enable-embed": i.enableEmbed,
|
|
21
22
|
onClose: t[0] || (t[0] = (n) => s.value = !1)
|
|
22
|
-
}, null, 8, ["editor", "enable-embed"])) : (
|
|
23
|
+
}, null, 8, ["editor", "enable-embed"])) : (c(), y("div", {
|
|
23
24
|
key: 1,
|
|
24
|
-
class:
|
|
25
|
+
class: E(["vizel-bubble-menu-toolbar", $.$props.class])
|
|
25
26
|
}, [
|
|
26
|
-
|
|
27
|
-
editor:
|
|
27
|
+
e(I, {
|
|
28
|
+
editor: i.editor
|
|
28
29
|
}, null, 8, ["editor"]),
|
|
29
|
-
|
|
30
|
+
e(u),
|
|
31
|
+
e(a, {
|
|
30
32
|
action: "bold",
|
|
31
|
-
"is-active":
|
|
33
|
+
"is-active": f.value,
|
|
32
34
|
title: "Bold (Cmd+B)",
|
|
33
|
-
onClick: t[1] || (t[1] = (n) =>
|
|
35
|
+
onClick: t[1] || (t[1] = (n) => i.editor.chain().focus().toggleBold().run())
|
|
34
36
|
}, {
|
|
35
37
|
default: r(() => [
|
|
36
|
-
|
|
38
|
+
e(d, { name: "bold" })
|
|
37
39
|
]),
|
|
38
40
|
_: 1
|
|
39
41
|
}, 8, ["is-active"]),
|
|
40
|
-
|
|
42
|
+
e(a, {
|
|
41
43
|
action: "italic",
|
|
42
|
-
"is-active":
|
|
44
|
+
"is-active": k.value,
|
|
43
45
|
title: "Italic (Cmd+I)",
|
|
44
|
-
onClick: t[2] || (t[2] = (n) =>
|
|
46
|
+
onClick: t[2] || (t[2] = (n) => i.editor.chain().focus().toggleItalic().run())
|
|
45
47
|
}, {
|
|
46
48
|
default: r(() => [
|
|
47
|
-
|
|
49
|
+
e(d, { name: "italic" })
|
|
48
50
|
]),
|
|
49
51
|
_: 1
|
|
50
52
|
}, 8, ["is-active"]),
|
|
51
|
-
|
|
53
|
+
e(a, {
|
|
52
54
|
action: "strike",
|
|
53
|
-
"is-active":
|
|
55
|
+
"is-active": p.value,
|
|
54
56
|
title: "Strikethrough",
|
|
55
|
-
onClick: t[3] || (t[3] = (n) =>
|
|
57
|
+
onClick: t[3] || (t[3] = (n) => i.editor.chain().focus().toggleStrike().run())
|
|
56
58
|
}, {
|
|
57
59
|
default: r(() => [
|
|
58
|
-
|
|
60
|
+
e(d, { name: "strikethrough" })
|
|
59
61
|
]),
|
|
60
62
|
_: 1
|
|
61
63
|
}, 8, ["is-active"]),
|
|
62
|
-
|
|
64
|
+
e(a, {
|
|
63
65
|
action: "underline",
|
|
64
|
-
"is-active":
|
|
66
|
+
"is-active": C.value,
|
|
65
67
|
title: "Underline (Cmd+U)",
|
|
66
|
-
onClick: t[4] || (t[4] = (n) =>
|
|
68
|
+
onClick: t[4] || (t[4] = (n) => i.editor.chain().focus().toggleUnderline().run())
|
|
67
69
|
}, {
|
|
68
70
|
default: r(() => [
|
|
69
|
-
|
|
71
|
+
e(d, { name: "underline" })
|
|
70
72
|
]),
|
|
71
73
|
_: 1
|
|
72
74
|
}, 8, ["is-active"]),
|
|
73
|
-
|
|
75
|
+
e(a, {
|
|
74
76
|
action: "code",
|
|
75
|
-
"is-active":
|
|
77
|
+
"is-active": b.value,
|
|
76
78
|
title: "Code (Cmd+E)",
|
|
77
|
-
onClick: t[5] || (t[5] = (n) =>
|
|
79
|
+
onClick: t[5] || (t[5] = (n) => i.editor.chain().focus().toggleCode().run())
|
|
78
80
|
}, {
|
|
79
81
|
default: r(() => [
|
|
80
|
-
|
|
82
|
+
e(d, { name: "code" })
|
|
81
83
|
]),
|
|
82
84
|
_: 1
|
|
83
85
|
}, 8, ["is-active"]),
|
|
84
|
-
|
|
86
|
+
e(u),
|
|
87
|
+
e(a, {
|
|
85
88
|
action: "link",
|
|
86
|
-
"is-active":
|
|
89
|
+
"is-active": g.value,
|
|
87
90
|
title: "Link (Cmd+K)",
|
|
88
91
|
onClick: t[6] || (t[6] = (n) => s.value = !0)
|
|
89
92
|
}, {
|
|
90
93
|
default: r(() => [
|
|
91
|
-
|
|
94
|
+
e(d, { name: "link" })
|
|
92
95
|
]),
|
|
93
96
|
_: 1
|
|
94
97
|
}, 8, ["is-active"]),
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
e(u),
|
|
99
|
+
e(v, {
|
|
100
|
+
editor: i.editor,
|
|
97
101
|
type: "textColor"
|
|
98
102
|
}, null, 8, ["editor"]),
|
|
99
|
-
|
|
100
|
-
editor:
|
|
103
|
+
e(v, {
|
|
104
|
+
editor: i.editor,
|
|
101
105
|
type: "highlight"
|
|
102
106
|
}, null, 8, ["editor"])
|
|
103
107
|
], 2));
|
|
104
108
|
}
|
|
105
109
|
});
|
|
106
110
|
export {
|
|
107
|
-
|
|
111
|
+
M as default
|
|
108
112
|
};
|
package/dist/index2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Mark as a, markPasteRule as r, markInputRule as s, mergeAttributes as o } from "@tiptap/core";
|
|
2
|
-
import { createElement as n } from "./
|
|
2
|
+
import { createElement as n } from "./index43.js";
|
|
3
3
|
var d = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, i = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, l = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, u = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g;
|
|
4
4
|
a.create({
|
|
5
5
|
name: "bold",
|
package/dist/index24.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as E, ref as i, computed as m, onMounted as V, onUnmounted as A, watch as $, nextTick as S, createElementBlock as r, openBlock as c, normalizeClass as D, createElementVNode as l, createCommentVNode as g, createVNode as d, toDisplayString as N, Fragment as L, renderList as R } from "vue";
|
|
2
2
|
import { vizelDefaultNodeTypes as B, getVizelActiveNodeType as K } from "@vizel/core";
|
|
3
|
-
import { useVizelState as M } from "./
|
|
3
|
+
import { useVizelState as M } from "./index41.js";
|
|
4
4
|
import u from "./index20.js";
|
|
5
5
|
const I = ["aria-expanded", "aria-label"], O = { class: "vizel-node-selector-icon" }, U = { class: "vizel-node-selector-label" }, F = {
|
|
6
6
|
class: "vizel-node-selector-chevron",
|
package/dist/index31.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, ref as n, computed as T, provide as h, onMounted as d, watch as c, onBeforeUnmount as f, renderSlot as p } from "vue";
|
|
2
2
|
import { VIZEL_DEFAULT_THEME_STORAGE_KEY as E, VIZEL_DEFAULT_THEME as g, getStoredVizelTheme as _, getVizelSystemTheme as v, resolveVizelTheme as S, applyVizelTheme as s, createVizelSystemThemeListener as V, storeVizelTheme as y } from "@vizel/core";
|
|
3
|
-
import { VIZEL_THEME_CONTEXT_KEY as z } from "./
|
|
3
|
+
import { VIZEL_THEME_CONTEXT_KEY as z } from "./index68.js";
|
|
4
4
|
const b = /* @__PURE__ */ i({
|
|
5
5
|
__name: "VizelThemeProvider",
|
|
6
6
|
props: {
|
package/dist/index32.js
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
onKeyDown: (e) => m(e.event) ? !0 : r.value?.onKeyDown(e.event) ?? !1,
|
|
29
|
-
onExit: () => {
|
|
30
|
-
t?.unmount(), n?.destroy(), t = null, n = null;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
1
|
+
import { defineComponent as s, computed as i, createElementBlock as u, createCommentVNode as r, openBlock as l, normalizeClass as c, renderSlot as m, createBlock as d } from "vue";
|
|
2
|
+
import { useVizelContextSafe as p } from "./index17.js";
|
|
3
|
+
import f from "./index34.js";
|
|
4
|
+
const z = /* @__PURE__ */ s({
|
|
5
|
+
__name: "VizelToolbar",
|
|
6
|
+
props: {
|
|
7
|
+
editor: {},
|
|
8
|
+
class: {},
|
|
9
|
+
showDefaultToolbar: { type: Boolean, default: !0 }
|
|
10
|
+
},
|
|
11
|
+
setup(o) {
|
|
12
|
+
const a = o, n = p(), e = i(() => a.editor ?? n?.() ?? null);
|
|
13
|
+
return (t, b) => e.value ? (l(), u("div", {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: c(["vizel-toolbar", t.$props.class]),
|
|
16
|
+
role: "toolbar",
|
|
17
|
+
"aria-label": "Formatting"
|
|
18
|
+
}, [
|
|
19
|
+
m(t.$slots, "default", { editor: e.value }, () => [
|
|
20
|
+
o.showDefaultToolbar ? (l(), d(f, {
|
|
21
|
+
key: 0,
|
|
22
|
+
editor: e.value
|
|
23
|
+
}, null, 8, ["editor"])) : r("", !0)
|
|
24
|
+
])
|
|
25
|
+
], 2)) : r("", !0);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
36
28
|
export {
|
|
37
|
-
|
|
29
|
+
z as default
|
|
38
30
|
};
|