@vizel/vue 0.0.1-alpha.1 → 0.0.1-alpha.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/index.d.ts +7 -7
- package/dist/index.js +69 -61
- package/dist/index10.js +80 -127
- package/dist/index11.js +55 -24
- package/dist/index12.js +28 -8
- package/dist/index13.js +60 -75
- package/dist/index14.js +98 -124
- package/dist/index15.js +9 -31
- package/dist/index16.js +184 -14
- package/dist/index17.js +14 -77
- package/dist/index18.js +28 -113
- package/dist/index19.js +128 -14
- package/dist/index2.js +73 -82
- package/dist/index20.js +24 -46
- package/dist/index21.js +10 -41
- package/dist/index22.js +12 -10
- package/dist/index23.js +89 -14
- package/dist/index24.js +130 -33
- package/dist/index25.js +34 -45
- package/dist/index26.js +19 -22
- package/dist/index27.js +77 -8
- package/dist/index28.js +118 -44
- package/dist/index29.js +18 -20
- package/dist/index3.js +49 -56
- package/dist/index30.js +50 -13
- package/dist/index31.js +41 -2
- package/dist/index32.js +36 -2
- package/dist/index33.js +46 -2
- package/dist/index34.js +22 -2
- package/dist/index35.js +8 -2
- package/dist/index36.js +44 -2
- package/dist/index37.js +21 -2
- package/dist/index38.js +13 -2
- package/dist/index39.js +15 -2
- package/dist/index4.js +236 -30
- package/dist/index40.js +2 -2
- package/dist/index41.js +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.js +1 -1
- 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/index5.js +78 -70
- package/dist/index51.js +1 -1
- package/dist/index52.js +4 -0
- package/dist/index53.js +4 -0
- package/dist/index54.js +4 -0
- package/dist/index55.js +4 -0
- package/dist/index56.js +4 -0
- package/dist/index57.js +4 -0
- package/dist/index58.js +4 -0
- package/dist/index59.js +4 -0
- package/dist/index6.js +72 -103
- package/dist/index60.js +4 -0
- package/dist/index7.js +62 -11
- package/dist/index8.js +57 -186
- package/dist/index9.js +2 -35
- package/package.json +25 -32
package/dist/index6.js
CHANGED
|
@@ -1,108 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
__name: "VizelBubbleMenuDefault",
|
|
10
|
-
props: {
|
|
11
|
-
editor: {},
|
|
12
|
-
class: {},
|
|
13
|
-
enableEmbed: { type: Boolean }
|
|
1
|
+
import { Mark as s, markPasteRule as r, markInputRule as a, mergeAttributes as n } from "@tiptap/core";
|
|
2
|
+
var i = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, d = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, o = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, l = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g;
|
|
3
|
+
s.create({
|
|
4
|
+
name: "italic",
|
|
5
|
+
addOptions() {
|
|
6
|
+
return {
|
|
7
|
+
HTMLAttributes: {}
|
|
8
|
+
};
|
|
14
9
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"is-active": C.value,
|
|
76
|
-
title: "Code (Cmd+E)",
|
|
77
|
-
onClick: t[5] || (t[5] = (n) => e.editor.chain().focus().toggleCode().run())
|
|
78
|
-
}, {
|
|
79
|
-
default: r(() => [
|
|
80
|
-
i(d, { name: "code" })
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
}, 8, ["is-active"]),
|
|
84
|
-
i(a, {
|
|
85
|
-
action: "link",
|
|
86
|
-
"is-active": b.value,
|
|
87
|
-
title: "Link (Cmd+K)",
|
|
88
|
-
onClick: t[6] || (t[6] = (n) => s.value = !0)
|
|
89
|
-
}, {
|
|
90
|
-
default: r(() => [
|
|
91
|
-
i(d, { name: "link" })
|
|
92
|
-
]),
|
|
93
|
-
_: 1
|
|
94
|
-
}, 8, ["is-active"]),
|
|
95
|
-
i(c, {
|
|
96
|
-
editor: e.editor,
|
|
97
|
-
type: "textColor"
|
|
98
|
-
}, null, 8, ["editor"]),
|
|
99
|
-
i(c, {
|
|
100
|
-
editor: e.editor,
|
|
101
|
-
type: "highlight"
|
|
102
|
-
}, null, 8, ["editor"])
|
|
103
|
-
], 2));
|
|
10
|
+
parseHTML() {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
tag: "em"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
tag: "i",
|
|
17
|
+
getAttrs: (t) => t.style.fontStyle !== "normal" && null
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
style: "font-style=normal",
|
|
21
|
+
clearMark: (t) => t.type.name === this.name
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
style: "font-style=italic"
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
},
|
|
28
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
29
|
+
return ["em", n(this.options.HTMLAttributes, t), 0];
|
|
30
|
+
},
|
|
31
|
+
addCommands() {
|
|
32
|
+
return {
|
|
33
|
+
setItalic: () => ({ commands: t }) => t.setMark(this.name),
|
|
34
|
+
toggleItalic: () => ({ commands: t }) => t.toggleMark(this.name),
|
|
35
|
+
unsetItalic: () => ({ commands: t }) => t.unsetMark(this.name)
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
markdownTokenName: "em",
|
|
39
|
+
parseMarkdown: (t, e) => e.applyMark("italic", e.parseInline(t.tokens || [])),
|
|
40
|
+
renderMarkdown: (t, e) => `*${e.renderChildren(t)}*`,
|
|
41
|
+
addKeyboardShortcuts() {
|
|
42
|
+
return {
|
|
43
|
+
"Mod-i": () => this.editor.commands.toggleItalic(),
|
|
44
|
+
"Mod-I": () => this.editor.commands.toggleItalic()
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
addInputRules() {
|
|
48
|
+
return [
|
|
49
|
+
a({
|
|
50
|
+
find: i,
|
|
51
|
+
type: this.type
|
|
52
|
+
}),
|
|
53
|
+
a({
|
|
54
|
+
find: o,
|
|
55
|
+
type: this.type
|
|
56
|
+
})
|
|
57
|
+
];
|
|
58
|
+
},
|
|
59
|
+
addPasteRules() {
|
|
60
|
+
return [
|
|
61
|
+
r({
|
|
62
|
+
find: d,
|
|
63
|
+
type: this.type
|
|
64
|
+
}),
|
|
65
|
+
r({
|
|
66
|
+
find: l,
|
|
67
|
+
type: this.type
|
|
68
|
+
})
|
|
69
|
+
];
|
|
104
70
|
}
|
|
105
71
|
});
|
|
106
72
|
export {
|
|
107
|
-
|
|
73
|
+
i as starInputRegex,
|
|
74
|
+
d as starPasteRegex,
|
|
75
|
+
o as underscoreInputRegex,
|
|
76
|
+
l as underscorePasteRegex
|
|
108
77
|
};
|
package/dist/index60.js
ADDED
package/dist/index7.js
CHANGED
|
@@ -1,15 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { Mark as r, markPasteRule as s, markInputRule as n, mergeAttributes as a } from "@tiptap/core";
|
|
2
|
+
var i = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, d = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g;
|
|
3
|
+
r.create({
|
|
4
|
+
name: "strike",
|
|
5
|
+
addOptions() {
|
|
6
|
+
return {
|
|
7
|
+
HTMLAttributes: {}
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
parseHTML() {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
tag: "s"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
tag: "del"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
tag: "strike"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
style: "text-decoration",
|
|
23
|
+
consuming: !1,
|
|
24
|
+
getAttrs: (e) => e.includes("line-through") ? {} : !1
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
},
|
|
28
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
29
|
+
return ["s", a(this.options.HTMLAttributes, e), 0];
|
|
30
|
+
},
|
|
31
|
+
markdownTokenName: "del",
|
|
32
|
+
parseMarkdown: (e, t) => t.applyMark("strike", t.parseInline(e.tokens || [])),
|
|
33
|
+
renderMarkdown: (e, t) => `~~${t.renderChildren(e)}~~`,
|
|
34
|
+
addCommands() {
|
|
35
|
+
return {
|
|
36
|
+
setStrike: () => ({ commands: e }) => e.setMark(this.name),
|
|
37
|
+
toggleStrike: () => ({ commands: e }) => e.toggleMark(this.name),
|
|
38
|
+
unsetStrike: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
addKeyboardShortcuts() {
|
|
42
|
+
return {
|
|
43
|
+
"Mod-Shift-s": () => this.editor.commands.toggleStrike()
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
addInputRules() {
|
|
47
|
+
return [
|
|
48
|
+
n({
|
|
49
|
+
find: i,
|
|
50
|
+
type: this.type
|
|
51
|
+
})
|
|
52
|
+
];
|
|
53
|
+
},
|
|
54
|
+
addPasteRules() {
|
|
55
|
+
return [
|
|
56
|
+
s({
|
|
57
|
+
find: d,
|
|
58
|
+
type: this.type
|
|
59
|
+
})
|
|
60
|
+
];
|
|
11
61
|
}
|
|
12
62
|
});
|
|
13
63
|
export {
|
|
14
|
-
|
|
64
|
+
i as inputRegex,
|
|
65
|
+
d as pasteRegex
|
|
15
66
|
};
|
package/dist/index8.js
CHANGED
|
@@ -1,191 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "vizel-color-picker-none"
|
|
10
|
-
}, Q = { class: "vizel-color-picker-section" }, T = { class: "vizel-color-picker-grid" }, W = ["aria-selected", "aria-label", "tabindex", "data-color", "onClick", "onKeydown"], X = {
|
|
11
|
-
key: 0,
|
|
12
|
-
class: "vizel-color-picker-none"
|
|
13
|
-
}, Y = {
|
|
14
|
-
key: 1,
|
|
15
|
-
class: "vizel-color-picker-input-row"
|
|
16
|
-
}, Z = ["value"], D = ["disabled"], $ = 4, te = /* @__PURE__ */ U({
|
|
17
|
-
__name: "VizelColorPicker",
|
|
18
|
-
props: {
|
|
19
|
-
colors: {},
|
|
20
|
-
value: {},
|
|
21
|
-
modelValue: {},
|
|
22
|
-
label: { default: "Color palette" },
|
|
23
|
-
class: {},
|
|
24
|
-
allowCustomColor: { type: Boolean, default: !0 },
|
|
25
|
-
recentColors: { default: () => [] },
|
|
26
|
-
showRecentColors: { type: Boolean, default: !0 },
|
|
27
|
-
noneValues: { default: () => ["transparent", "inherit"] }
|
|
1
|
+
import { Mark as s, mergeAttributes as d } from "@tiptap/core";
|
|
2
|
+
s.create({
|
|
3
|
+
name: "underline",
|
|
4
|
+
addOptions() {
|
|
5
|
+
return {
|
|
6
|
+
HTMLAttributes: {}
|
|
7
|
+
};
|
|
28
8
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
p.value.length > e && (p.value.length = e);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
const y = k(() => a.showRecentColors ? a.recentColors.length : 0);
|
|
42
|
-
function h(e) {
|
|
43
|
-
return a.noneValues.includes(e);
|
|
44
|
-
}
|
|
45
|
-
function w(e) {
|
|
46
|
-
f("change", e), f("update:modelValue", e), r.value = "";
|
|
47
|
-
}
|
|
48
|
-
function R() {
|
|
49
|
-
const e = g(r.value);
|
|
50
|
-
S(e) && (f("change", e), f("update:modelValue", e), r.value = "");
|
|
51
|
-
}
|
|
52
|
-
function O(e) {
|
|
53
|
-
e.key === "Enter" && (e.preventDefault(), R());
|
|
54
|
-
}
|
|
55
|
-
function K(e, n) {
|
|
56
|
-
const l = m.value.length;
|
|
57
|
-
if (l === 0) return;
|
|
58
|
-
let t = n, o = !1;
|
|
59
|
-
switch (e.key) {
|
|
60
|
-
case "ArrowRight":
|
|
61
|
-
t = (n + 1) % l, o = !0;
|
|
62
|
-
break;
|
|
63
|
-
case "ArrowLeft":
|
|
64
|
-
t = (n - 1 + l) % l, o = !0;
|
|
65
|
-
break;
|
|
66
|
-
case "ArrowDown":
|
|
67
|
-
t = Math.min(n + $, l - 1), o = !0;
|
|
68
|
-
break;
|
|
69
|
-
case "ArrowUp":
|
|
70
|
-
t = Math.max(n - $, 0), o = !0;
|
|
71
|
-
break;
|
|
72
|
-
case "Home":
|
|
73
|
-
t = 0, o = !0;
|
|
74
|
-
break;
|
|
75
|
-
case "End":
|
|
76
|
-
t = l - 1, o = !0;
|
|
77
|
-
break;
|
|
78
|
-
case "Enter":
|
|
79
|
-
case " ": {
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
const E = m.value[n];
|
|
82
|
-
E && w(E);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
9
|
+
parseHTML() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
tag: "u"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
style: "text-decoration",
|
|
16
|
+
consuming: !1,
|
|
17
|
+
getAttrs: (e) => e.includes("underline") ? {} : !1
|
|
85
18
|
}
|
|
86
|
-
|
|
19
|
+
];
|
|
20
|
+
},
|
|
21
|
+
renderHTML({ HTMLAttributes: e }) {
|
|
22
|
+
return ["u", d(this.options.HTMLAttributes, e), 0];
|
|
23
|
+
},
|
|
24
|
+
parseMarkdown(e, n) {
|
|
25
|
+
return n.applyMark(this.name || "underline", n.parseInline(e.tokens || []));
|
|
26
|
+
},
|
|
27
|
+
renderMarkdown(e, n) {
|
|
28
|
+
return `++${n.renderChildren(e)}++`;
|
|
29
|
+
},
|
|
30
|
+
markdownTokenizer: {
|
|
31
|
+
name: "underline",
|
|
32
|
+
level: "inline",
|
|
33
|
+
start(e) {
|
|
34
|
+
return e.indexOf("++");
|
|
35
|
+
},
|
|
36
|
+
tokenize(e, n, i) {
|
|
37
|
+
const r = /^(\+\+)([\s\S]+?)(\+\+)/.exec(e);
|
|
38
|
+
if (!r)
|
|
39
|
+
return;
|
|
40
|
+
const t = r[2].trim();
|
|
41
|
+
return {
|
|
42
|
+
type: "underline",
|
|
43
|
+
raw: r[0],
|
|
44
|
+
text: t,
|
|
45
|
+
tokens: i.inlineTokens(t)
|
|
46
|
+
};
|
|
87
47
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
() =>
|
|
100
|
-
|
|
101
|
-
return (e, n) => (i(), s("div", {
|
|
102
|
-
class: _(["vizel-color-picker-content", e.$props.class]),
|
|
103
|
-
role: "listbox",
|
|
104
|
-
"aria-label": a.label
|
|
105
|
-
}, [
|
|
106
|
-
d.showRecentColors && a.recentColors && a.recentColors.length > 0 ? (i(), s("div", P, [
|
|
107
|
-
n[1] || (n[1] = u("div", { class: "vizel-color-picker-label" }, "Recent", -1)),
|
|
108
|
-
u("div", j, [
|
|
109
|
-
(i(!0), s(B, null, M(d.recentColors, (l, t) => (i(), s("button", {
|
|
110
|
-
key: l,
|
|
111
|
-
ref_for: !0,
|
|
112
|
-
ref: (o) => {
|
|
113
|
-
p.value[t] = o;
|
|
114
|
-
},
|
|
115
|
-
type: "button",
|
|
116
|
-
role: "option",
|
|
117
|
-
"aria-selected": c.value === l,
|
|
118
|
-
"aria-label": l,
|
|
119
|
-
tabindex: v.value === t ? 0 : -1,
|
|
120
|
-
class: _(["vizel-color-picker-swatch", { "is-active": c.value === l }]),
|
|
121
|
-
style: z({ backgroundColor: h(l) ? "transparent" : l }),
|
|
122
|
-
"data-color": l,
|
|
123
|
-
onClick: (o) => w(l),
|
|
124
|
-
onKeydown: (o) => K(o, t)
|
|
125
|
-
}, [
|
|
126
|
-
h(l) ? (i(), s("span", J, [
|
|
127
|
-
V(x, { name: "x" })
|
|
128
|
-
])) : b("", !0)
|
|
129
|
-
], 46, q))), 128))
|
|
130
|
-
])
|
|
131
|
-
])) : b("", !0),
|
|
132
|
-
u("div", Q, [
|
|
133
|
-
u("div", T, [
|
|
134
|
-
(i(!0), s(B, null, M(d.colors, (l, t) => (i(), s("button", {
|
|
135
|
-
key: l.color,
|
|
136
|
-
ref_for: !0,
|
|
137
|
-
ref: (o) => {
|
|
138
|
-
p.value[y.value + t] = o;
|
|
139
|
-
},
|
|
140
|
-
type: "button",
|
|
141
|
-
role: "option",
|
|
142
|
-
"aria-selected": c.value === l.color,
|
|
143
|
-
"aria-label": l.name,
|
|
144
|
-
tabindex: v.value === y.value + t ? 0 : -1,
|
|
145
|
-
class: _(["vizel-color-picker-swatch", { "is-active": c.value === l.color }]),
|
|
146
|
-
style: z({ backgroundColor: h(l.color) ? "transparent" : l.color }),
|
|
147
|
-
"data-color": l.color,
|
|
148
|
-
onClick: (o) => w(l.color),
|
|
149
|
-
onKeydown: (o) => K(o, y.value + t)
|
|
150
|
-
}, [
|
|
151
|
-
h(l.color) ? (i(), s("span", X, [
|
|
152
|
-
V(x, { name: "x" })
|
|
153
|
-
])) : b("", !0)
|
|
154
|
-
], 46, W))), 128))
|
|
155
|
-
])
|
|
156
|
-
]),
|
|
157
|
-
d.allowCustomColor ? (i(), s("div", Y, [
|
|
158
|
-
u("span", {
|
|
159
|
-
class: "vizel-color-picker-preview",
|
|
160
|
-
style: z({ backgroundColor: L.value || "transparent" }),
|
|
161
|
-
"aria-hidden": "true"
|
|
162
|
-
}, null, 4),
|
|
163
|
-
u("input", {
|
|
164
|
-
ref_key: "inputRef",
|
|
165
|
-
ref: I,
|
|
166
|
-
type: "text",
|
|
167
|
-
class: "vizel-color-picker-input",
|
|
168
|
-
placeholder: "#000000",
|
|
169
|
-
value: r.value,
|
|
170
|
-
maxlength: "7",
|
|
171
|
-
"aria-label": "Custom color hex value",
|
|
172
|
-
onInput: n[0] || (n[0] = (l) => r.value = l.target.value),
|
|
173
|
-
onKeydown: O
|
|
174
|
-
}, null, 40, Z),
|
|
175
|
-
u("button", {
|
|
176
|
-
type: "button",
|
|
177
|
-
class: "vizel-color-picker-apply",
|
|
178
|
-
disabled: !A.value,
|
|
179
|
-
title: "Apply",
|
|
180
|
-
"aria-label": "Apply custom color",
|
|
181
|
-
onClick: R
|
|
182
|
-
}, [
|
|
183
|
-
V(x, { name: "check" })
|
|
184
|
-
], 8, D)
|
|
185
|
-
])) : b("", !0)
|
|
186
|
-
], 10, G));
|
|
48
|
+
},
|
|
49
|
+
addCommands() {
|
|
50
|
+
return {
|
|
51
|
+
setUnderline: () => ({ commands: e }) => e.setMark(this.name),
|
|
52
|
+
toggleUnderline: () => ({ commands: e }) => e.toggleMark(this.name),
|
|
53
|
+
unsetUnderline: () => ({ commands: e }) => e.unsetMark(this.name)
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
addKeyboardShortcuts() {
|
|
57
|
+
return {
|
|
58
|
+
"Mod-u": () => this.editor.commands.toggleUnderline(),
|
|
59
|
+
"Mod-U": () => this.editor.commands.toggleUnderline()
|
|
60
|
+
};
|
|
187
61
|
}
|
|
188
62
|
});
|
|
189
|
-
export {
|
|
190
|
-
te as default
|
|
191
|
-
};
|
package/dist/index9.js
CHANGED
|
@@ -1,35 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
const x = /* @__PURE__ */ d({
|
|
4
|
-
__name: "VizelEditor",
|
|
5
|
-
props: {
|
|
6
|
-
editor: {},
|
|
7
|
-
class: {}
|
|
8
|
-
},
|
|
9
|
-
setup(a, { expose: c }) {
|
|
10
|
-
const l = a, t = m(null), p = E(), i = f(() => l.editor ?? p?.());
|
|
11
|
-
return c({
|
|
12
|
-
get container() {
|
|
13
|
-
return t.value;
|
|
14
|
-
}
|
|
15
|
-
}), v(
|
|
16
|
-
() => [i.value, t.value],
|
|
17
|
-
([e, o], s) => {
|
|
18
|
-
const n = s?.[0], r = s?.[1];
|
|
19
|
-
n && r && n.view.dom.parentNode === r && r.removeChild(n.view.dom), e && o && (o.appendChild(e.view.dom), e.view.setProps({
|
|
20
|
-
editable: () => e?.isEditable ?? !1
|
|
21
|
-
}));
|
|
22
|
-
},
|
|
23
|
-
{ immediate: !0 }
|
|
24
|
-
), (e, o) => i.value ? (_(), u("div", {
|
|
25
|
-
key: 0,
|
|
26
|
-
ref_key: "containerRef",
|
|
27
|
-
ref: t,
|
|
28
|
-
class: w(e.$props.class),
|
|
29
|
-
"data-vizel-content": ""
|
|
30
|
-
}, null, 2)) : C("", !0);
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
x as default
|
|
35
|
-
};
|
|
1
|
+
import { initVizelIconRenderer as e } from "@vizel/core";
|
|
2
|
+
e();
|
package/package.json
CHANGED
|
@@ -1,44 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizel/vue",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"
|
|
5
|
-
"keywords": [
|
|
6
|
-
"vue",
|
|
7
|
-
"vue3",
|
|
8
|
-
"tiptap",
|
|
9
|
-
"editor",
|
|
10
|
-
"markdown",
|
|
11
|
-
"wysiwyg",
|
|
12
|
-
"rich-text",
|
|
13
|
-
"block-editor"
|
|
14
|
-
],
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"author": "Seiji Kohara",
|
|
3
|
+
"version": "0.0.1-alpha.5",
|
|
4
|
+
"type": "module",
|
|
17
5
|
"repository": {
|
|
18
6
|
"type": "git",
|
|
19
|
-
"url": "
|
|
7
|
+
"url": "https://github.com/seijikohara/vizel",
|
|
20
8
|
"directory": "packages/vue"
|
|
21
9
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"type": "module",
|
|
25
|
-
"sideEffects": false,
|
|
26
|
-
"engines": {
|
|
27
|
-
"node": ">=18"
|
|
28
|
-
},
|
|
29
|
-
"main": "./dist/index.js",
|
|
30
|
-
"module": "./dist/index.js",
|
|
31
|
-
"types": "./dist/index.d.ts",
|
|
10
|
+
"main": "./src/index.ts",
|
|
11
|
+
"types": "./src/index.ts",
|
|
32
12
|
"exports": {
|
|
33
13
|
".": {
|
|
34
|
-
"types": "./
|
|
35
|
-
"import": "./
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
"./package.json": "./package.json"
|
|
14
|
+
"types": "./src/index.ts",
|
|
15
|
+
"import": "./src/index.ts"
|
|
16
|
+
}
|
|
39
17
|
},
|
|
40
18
|
"publishConfig": {
|
|
41
|
-
"
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/index.js"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
42
27
|
},
|
|
43
28
|
"files": [
|
|
44
29
|
"dist"
|
|
@@ -49,12 +34,20 @@
|
|
|
49
34
|
},
|
|
50
35
|
"dependencies": {
|
|
51
36
|
"@iconify/vue": "^5",
|
|
52
|
-
"@vizel/core": "^0.0.1-alpha.
|
|
37
|
+
"@vizel/core": "^0.0.1-alpha.5"
|
|
53
38
|
},
|
|
54
39
|
"peerDependencies": {
|
|
55
40
|
"vue": "^3.4"
|
|
56
41
|
},
|
|
57
42
|
"devDependencies": {
|
|
43
|
+
"@tiptap/extension-bold": "^3",
|
|
44
|
+
"@tiptap/extension-code": "^3",
|
|
45
|
+
"@tiptap/extension-color": "^3",
|
|
46
|
+
"@tiptap/extension-highlight": "^3",
|
|
47
|
+
"@tiptap/extension-italic": "^3",
|
|
48
|
+
"@tiptap/extension-strike": "^3",
|
|
49
|
+
"@tiptap/extension-text-style": "^3",
|
|
50
|
+
"@tiptap/extension-underline": "^3",
|
|
58
51
|
"@vitejs/plugin-vue": "^6",
|
|
59
52
|
"vite": "^7",
|
|
60
53
|
"vite-plugin-dts": "^4",
|