@kungal/editor-vue 0.35.0 → 0.36.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @kungal/editor-vue
|
|
2
2
|
|
|
3
|
+
## 0.36.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f7c65c2: fix(editor): the spoiler toolbar button hides the selection instead of deleting it
|
|
8
|
+
|
|
9
|
+
`insertKunSpoilerCommand` built an EMPTY `kun-spoiler` node and dropped it over
|
|
10
|
+
the selection with `replaceSelectionWith`, so clicking 隐藏文本 with text selected
|
|
11
|
+
deleted the text and left a bare `||||` — and the next thing typed landed
|
|
12
|
+
outside the node, so nothing was hidden either. The JSDoc said "wraps the
|
|
13
|
+
current selection"; the code never wrapped anything.
|
|
14
|
+
|
|
15
|
+
The command now covers the three cases the `||…||` syntax does:
|
|
16
|
+
|
|
17
|
+
- **a selection** → its text moves inside the node. The schema is `marks: ''`
|
|
18
|
+
(inline formatting cannot round-trip through `||…||`), so bold is what's
|
|
19
|
+
dropped, never the words. Selections spanning paragraphs collapse into one
|
|
20
|
+
spoiler; select-all (an `AllSelection`) works too.
|
|
21
|
+
- **an empty selection** → a new spoiler with the caret INSIDE it: type and it
|
|
22
|
+
is hidden. It holds a zero-width caret anchor, because a caret cannot sit in
|
|
23
|
+
an inline node with no text node in it — the serializer strips anchors, and a
|
|
24
|
+
spoiler holding nothing else serializes to nothing, so a stray click cannot
|
|
25
|
+
leave `||||` behind.
|
|
26
|
+
- **the caret already inside a spoiler** → reveal it, leaving the text selected.
|
|
27
|
+
Nesting would have produced `||||text||||`, which reads back as nothing.
|
|
28
|
+
|
|
29
|
+
The button is therefore a toggle, and both toolbars (the headless one and the
|
|
30
|
+
KunUI one in `@kungal/editor-nuxt`) now show it pressed while the caret is
|
|
31
|
+
inside a spoiler — `KunToggleMark` gains a `'spoiler'` member for that, so
|
|
32
|
+
`activeMarks` carries one more key.
|
|
33
|
+
|
|
34
|
+
It returns `false` — no document change — inside a code block and with a node
|
|
35
|
+
selected (an image is not text; replacing it would delete it).
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [f7c65c2]
|
|
40
|
+
- @kungal/editor-core@0.36.0
|
|
41
|
+
|
|
3
42
|
## 0.35.0
|
|
4
43
|
|
|
5
44
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active-marks.d.ts","sourceRoot":"","sources":["../src/active-marks.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAO5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,YAAY,+CAAgD,CAAA;AASzE,eAAO,MAAM,sBAAsB,QAAO,MAAM,CAAC,aAAa,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"active-marks.d.ts","sourceRoot":"","sources":["../src/active-marks.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAO5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,eAAO,MAAM,YAAY,+CAAgD,CAAA;AASzE,eAAO,MAAM,sBAAsB,QAAO,MAAM,CAAC,aAAa,EAAE,OAAO,CAMrE,CAAA;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAC/B,CAAA;AAoBzC;8CAC8C;AAC9C,eAAO,MAAM,eAAe,GAC1B,OAAO,WAAW,EAClB,KAAK,GAAG,KACP,MAAM,CAAC,aAAa,EAAE,OAAO,CAW/B,CAAA;AAiBD,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,GAClC,QAAQ,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,yCAerC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KunEditor.vue.d.ts","sourceRoot":"","sources":["../../src/components/KunEditor.vue"],"names":[],"mappings":"AA8bA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,UAAU,EACX,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAUjE,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE9C,KAAK,WAAW,GAAG;IACf,gCAAgC;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,iBAAiB,CAAA;IAC5B,qDAAqD;IACrD,MAAM,CAAC,EAAE,eAAe,CAAA;IACxB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,GAAG,OAAO,CAAA;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;IAClB;oEACgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAAA;CAChD,CAAC;AAqfJ,QAAA,IAAI,OAAO;;iBAzZS,QAAQ;;;;;;;;;;;;;CAyZP,EAAE,QAAQ;iEA7jB/B,
|
|
1
|
+
{"version":3,"file":"KunEditor.vue.d.ts","sourceRoot":"","sources":["../../src/components/K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AK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAShD,QAAA,MAAM,UAAU;;;;;;;;;iBAzhBE,MAAM;cART,iBAAiB;cAEjB,iBAAiB;YAEnB,eAAe;cAEb,OAAO;qBAQA,KAAK,GAAG,OAAO;sBAgBd,OAAO,GAAG,gBAAgB,EAAE;WAVvC,QAAQ,EAAE;gBAGL,OAAO;6EA+gBtB,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarHost.vue.d.ts","sourceRoot":"","sources":["../../src/components/ToolbarHost.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AA2GhD,QAAA,IAAI,OAAO;oCA5GX,
|
|
1
|
+
{"version":3,"file":"ToolbarHost.vue.d.ts","sourceRoot":"","sources":["../../src/components/ToolbarHost.vue"],"names":[],"mappings":"AA6GA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AA2GhD,QAAA,IAAI,OAAO;oCA5GX,CA9DI;;;;;;WA8DJ,CATK;aACG,CAAC;;;;YAC+E,CAAC;;;;;;;;;;;;;;CAmHnE,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -30,39 +30,46 @@ var Ne = [
|
|
|
30
30
|
bold: !1,
|
|
31
31
|
italic: !1,
|
|
32
32
|
strike: !1,
|
|
33
|
-
code: !1
|
|
34
|
-
|
|
33
|
+
code: !1,
|
|
34
|
+
spoiler: !1
|
|
35
|
+
}), Ie = Object.freeze(Fe()), Le = (e) => {
|
|
36
|
+
let t = e.schema.nodes["kun-spoiler"];
|
|
37
|
+
if (!t) return !1;
|
|
38
|
+
let { $from: n } = e.selection;
|
|
39
|
+
for (let e = n.depth; e > 0; e--) if (n.node(e).type === t) return !0;
|
|
40
|
+
return !1;
|
|
41
|
+
}, Re = (e, t) => {
|
|
35
42
|
let { from: n, $from: r, to: i, empty: a } = e.selection, o = Fe();
|
|
36
43
|
for (let s of Ne) {
|
|
37
44
|
let c = Pe[s].type(t);
|
|
38
45
|
o[s] = a ? !!c.isInSet(e.storedMarks ?? r.marks()) : e.doc.rangeHasMark(n, i, c);
|
|
39
46
|
}
|
|
40
|
-
return o;
|
|
41
|
-
},
|
|
42
|
-
let r =
|
|
43
|
-
for (let e of
|
|
44
|
-
},
|
|
45
|
-
key:
|
|
46
|
-
view: (n) => (
|
|
47
|
-
|
|
47
|
+
return o.spoiler = Le(e), o;
|
|
48
|
+
}, ze = (e, t, n) => {
|
|
49
|
+
let r = Re(e, t);
|
|
50
|
+
for (let e of Object.keys(r)) n[e] !== r[e] && (n[e] = r[e]);
|
|
51
|
+
}, Be = new oe("KUN_ACTIVE_MARKS"), Ve = (e) => U((t) => new ae({
|
|
52
|
+
key: Be,
|
|
53
|
+
view: (n) => (ze(n.state, t, e), { update(n) {
|
|
54
|
+
ze(n.state, t, e);
|
|
48
55
|
} })
|
|
49
|
-
})), X = Symbol("kun-editor-context"),
|
|
56
|
+
})), X = Symbol("kun-editor-context"), He = [
|
|
50
57
|
"data-active",
|
|
51
58
|
"onMousedown",
|
|
52
59
|
"onMouseenter"
|
|
53
|
-
],
|
|
60
|
+
], Ue = ["src", "alt"], We = {
|
|
54
61
|
key: 1,
|
|
55
62
|
class: "kun-mention-dropdown__avatar kun-mention-dropdown__avatar--fallback"
|
|
56
|
-
},
|
|
63
|
+
}, Ge = { class: "kun-mention-dropdown__name" }, Ke = {
|
|
57
64
|
key: 1,
|
|
58
65
|
class: "kun-mention-dropdown__hint"
|
|
59
|
-
},
|
|
66
|
+
}, qe = {
|
|
60
67
|
key: 2,
|
|
61
68
|
class: "kun-mention-dropdown__hint"
|
|
62
|
-
},
|
|
69
|
+
}, Je = {
|
|
63
70
|
key: 3,
|
|
64
71
|
class: "kun-mention-dropdown__hint"
|
|
65
|
-
},
|
|
72
|
+
}, Ye = /* @__PURE__ */ s({
|
|
66
73
|
__name: "MentionDropdown",
|
|
67
74
|
setup(n) {
|
|
68
75
|
let r = /(?:^|\s)@([^\s@]{0,30})$/, o = l(X), s = o?.adapters.searchMentionUsers, c = t(() => (o?.locale ?? "zh-cn").toLowerCase().startsWith("en")), u = t(() => c.value ? {
|
|
@@ -168,9 +175,9 @@ var Ne = [
|
|
|
168
175
|
src: e.avatar,
|
|
169
176
|
alt: e.name,
|
|
170
177
|
class: "kun-mention-dropdown__avatar"
|
|
171
|
-
}, null, 8,
|
|
178
|
+
}, null, 8, Ue)) : (m(), i("span", We, b(e.name.charAt(0)), 1)), a("span", Ge, b(e.name), 1)], 40, He))), 128)) : E.value ? (m(), i("div", Ke, b(u.value.searching), 1)) : S.value ? (m(), i("div", qe, b(u.value.empty), 1)) : (m(), i("div", Je, b(u.value.prompt), 1))], 512));
|
|
172
179
|
}
|
|
173
|
-
}),
|
|
180
|
+
}), Xe = (e, t) => {
|
|
174
181
|
let n = de.type(t), { from: r, to: i } = e.selection, a = "";
|
|
175
182
|
return e.doc.nodesBetween(r, i, (e) => {
|
|
176
183
|
if (a) return !1;
|
|
@@ -197,17 +204,17 @@ var Ne = [
|
|
|
197
204
|
check: Z("<path d=\"m5 13 4 4L19 7\"/>"),
|
|
198
205
|
close: Z("<line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"/><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"/>"),
|
|
199
206
|
smile: Z("<circle cx=\"12\" cy=\"12\" r=\"9\"/><path d=\"M8 14s1.5 2 4 2 4-2 4-2\"/><line x1=\"9\" y1=\"9\" x2=\"9.01\" y2=\"9\"/><line x1=\"15\" y1=\"9\" x2=\"15.01\" y2=\"9\"/>")
|
|
200
|
-
},
|
|
207
|
+
}, Ze = ["data-mode"], Qe = ["placeholder", "aria-label"], $e = ["title", "aria-label"], et = ["innerHTML"], tt = ["title", "aria-label"], nt = ["innerHTML"], rt = {
|
|
201
208
|
key: 0,
|
|
202
209
|
class: "kun-editor__toolbar-divider",
|
|
203
210
|
"aria-hidden": "true"
|
|
204
|
-
},
|
|
211
|
+
}, it = [
|
|
205
212
|
"title",
|
|
206
213
|
"aria-label",
|
|
207
214
|
"aria-pressed",
|
|
208
215
|
"data-active",
|
|
209
216
|
"onMousedown"
|
|
210
|
-
],
|
|
217
|
+
], at = ["innerHTML"], ot = /* @__PURE__ */ s({
|
|
211
218
|
__name: "SelectionTooltip",
|
|
212
219
|
setup(n) {
|
|
213
220
|
let { view: r, prevState: o } = ee(), [, s] = M(), c = l(X), d = c?.activeMarks ?? Ie, h = t(() => (c?.locale ?? "zh-cn").toLowerCase().startsWith("en")), g = t(() => {
|
|
@@ -228,7 +235,7 @@ var Ne = [
|
|
|
228
235
|
let e = "";
|
|
229
236
|
return s()?.action((t) => {
|
|
230
237
|
let n = r.value?.state;
|
|
231
|
-
n && (e =
|
|
238
|
+
n && (e = Xe(n, t));
|
|
232
239
|
}), e;
|
|
233
240
|
}, N = () => {
|
|
234
241
|
T.value = !1, k.value = "", r.value?.focus();
|
|
@@ -321,7 +328,7 @@ var Ne = [
|
|
|
321
328
|
spellcheck: "false",
|
|
322
329
|
autocomplete: "off",
|
|
323
330
|
onKeydown: [n[1] ||= D(O((e) => P(), ["prevent"]), ["enter"]), n[2] ||= D(O((e) => N(), ["stop", "prevent"]), ["esc"])]
|
|
324
|
-
}, null, 40,
|
|
331
|
+
}, null, 40, Qe), [[S, k.value]]),
|
|
325
332
|
a("button", {
|
|
326
333
|
type: "button",
|
|
327
334
|
class: "kun-editor__bubble-btn",
|
|
@@ -331,7 +338,7 @@ var Ne = [
|
|
|
331
338
|
}, [a("span", {
|
|
332
339
|
class: "kun-editor__icon",
|
|
333
340
|
innerHTML: x($).check
|
|
334
|
-
}, null, 8,
|
|
341
|
+
}, null, 8, et)], 40, $e),
|
|
335
342
|
a("button", {
|
|
336
343
|
type: "button",
|
|
337
344
|
class: "kun-editor__bubble-btn",
|
|
@@ -341,8 +348,8 @@ var Ne = [
|
|
|
341
348
|
}, [a("span", {
|
|
342
349
|
class: "kun-editor__icon",
|
|
343
350
|
innerHTML: x($).close
|
|
344
|
-
}, null, 8,
|
|
345
|
-
], 64)) : (m(!0), i(e, { key: 1 }, v(L.value, (t, n) => (m(), i(e, { key: n }, [t.divider ? (m(), i("span",
|
|
351
|
+
}, null, 8, nt)], 40, tt)
|
|
352
|
+
], 64)) : (m(!0), i(e, { key: 1 }, v(L.value, (t, n) => (m(), i(e, { key: n }, [t.divider ? (m(), i("span", rt)) : (m(), i("button", {
|
|
346
353
|
key: 1,
|
|
347
354
|
type: "button",
|
|
348
355
|
class: "kun-editor__bubble-btn",
|
|
@@ -354,9 +361,9 @@ var Ne = [
|
|
|
354
361
|
}, [a("span", {
|
|
355
362
|
class: "kun-editor__icon",
|
|
356
363
|
innerHTML: t.svg
|
|
357
|
-
}, null, 8,
|
|
364
|
+
}, null, 8, at)], 40, it))], 64))), 128))], 8, Ze));
|
|
358
365
|
}
|
|
359
|
-
}),
|
|
366
|
+
}), st = /* @__PURE__ */ s({
|
|
360
367
|
__name: "MilkdownEditor",
|
|
361
368
|
props: {
|
|
362
369
|
modelValue: {},
|
|
@@ -378,13 +385,13 @@ var Ne = [
|
|
|
378
385
|
}), t.update(z, (e) => ({
|
|
379
386
|
...e,
|
|
380
387
|
editable: () => !i.readonly
|
|
381
|
-
})), f && t.set(d.key, { view: u({ component:
|
|
388
|
+
})), f && t.set(d.key, { view: u({ component: Ye }) }), h && t.set(p.key, { view: u({ component: ot }) });
|
|
382
389
|
}).use(ye(i.adapters, i.features, {
|
|
383
390
|
locale: i.locale,
|
|
384
391
|
placeholder: i.placeholder,
|
|
385
392
|
placeholderMode: i.placeholderMode
|
|
386
393
|
}));
|
|
387
|
-
return f && t.use(d), h && t.use(p), c && t.use(
|
|
394
|
+
return f && t.use(d), h && t.use(p), c && t.use(Ve(c.activeMarks)), t;
|
|
388
395
|
});
|
|
389
396
|
w(g.loading, (e) => a("update:loading", e), { immediate: !0 }), w(() => i.modelValue, (e) => {
|
|
390
397
|
if (e === o) return;
|
|
@@ -441,11 +448,11 @@ var Ne = [
|
|
|
441
448
|
}
|
|
442
449
|
}), (e, t) => (m(), n(x(k)));
|
|
443
450
|
}
|
|
444
|
-
}),
|
|
451
|
+
}), ct = [
|
|
445
452
|
"title",
|
|
446
453
|
"aria-label",
|
|
447
454
|
"aria-expanded"
|
|
448
|
-
],
|
|
455
|
+
], lt = ["innerHTML"], ut = { class: "kun-editor__link-panel" }, dt = ["placeholder", "aria-label"], ft = ["title", "aria-label"], pt = ["innerHTML"], mt = /* @__PURE__ */ s({
|
|
449
456
|
__name: "LinkInput",
|
|
450
457
|
setup(e) {
|
|
451
458
|
let [, n] = M(), r = l(X), o = t(() => (r?.locale ?? "zh-cn").toLowerCase().startsWith("en")), s = t(() => {
|
|
@@ -478,7 +485,7 @@ var Ne = [
|
|
|
478
485
|
return;
|
|
479
486
|
}
|
|
480
487
|
n()?.action((e) => {
|
|
481
|
-
d.value =
|
|
488
|
+
d.value = Xe(e.get(R).state, e);
|
|
482
489
|
}), c.value = !0, await u(), g.value?.focus(), g.value?.select();
|
|
483
490
|
}, k = (e) => {
|
|
484
491
|
c.value && h.value && !h.value.contains(e.target) && y();
|
|
@@ -497,7 +504,7 @@ var Ne = [
|
|
|
497
504
|
}, [a("span", {
|
|
498
505
|
class: "kun-editor__icon",
|
|
499
506
|
innerHTML: x($).link
|
|
500
|
-
}, null, 8,
|
|
507
|
+
}, null, 8, lt)], 8, ct), E(a("div", ut, [E(a("input", {
|
|
501
508
|
ref_key: "inputRef",
|
|
502
509
|
ref: g,
|
|
503
510
|
"onUpdate:modelValue": t[0] ||= (e) => d.value = e,
|
|
@@ -509,7 +516,7 @@ var Ne = [
|
|
|
509
516
|
spellcheck: "false",
|
|
510
517
|
autocomplete: "off",
|
|
511
518
|
onKeydown: [t[1] ||= D(O((e) => w(), ["prevent"]), ["enter"]), t[2] ||= D(O((e) => b(), ["stop", "prevent"]), ["esc"])]
|
|
512
|
-
}, null, 40,
|
|
519
|
+
}, null, 40, dt), [[S, d.value]]), a("button", {
|
|
513
520
|
type: "button",
|
|
514
521
|
class: "kun-editor__tool",
|
|
515
522
|
title: s.value.apply,
|
|
@@ -518,23 +525,23 @@ var Ne = [
|
|
|
518
525
|
}, [a("span", {
|
|
519
526
|
class: "kun-editor__icon",
|
|
520
527
|
innerHTML: x($).check
|
|
521
|
-
}, null, 8,
|
|
528
|
+
}, null, 8, pt)], 8, ft)], 512), [[C, c.value]])], 512));
|
|
522
529
|
}
|
|
523
|
-
}),
|
|
530
|
+
}), ht = /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.😉.😊.😇.🥰.😍.🤩.😘.😗.😚.😋.😛.😜.🤪.😝.🤗.🤭.🤔.🤐.😐.😑.😶.😏.😒.🙄.😬.😌.😔.😪.🤤.😴.😷.🤒.🤕.🥵.🥶.🥴.😵.🤯.🤠.🥳.😎.🤓.🧐.😕.😟.🙁.😮.😯.😲.😳.🥺.😦.😧.😨.😰.😥.😢.😭.😱.😖.😣.😞.😓.😩.😫.🥱.😤.😡.😠.🤬.😈.👿.💀.💩.🤡.👻.👽.🤖.😺.😸.👍.👎.👌.🤌.🤏.✌️.🤞.🤟.🤘.👋.🤚.🖐️.✋.👏.🙌.🤝.🙏.💪.👀.👁️.❤️.🧡.💛.💚.💙.💜.🖤.🤍.💔.💕.💞.💓.💗.💖.💘.💝.💯.✨.⭐.🌟.🔥.💥.💫.⚡.☀️.🌈.🎉.🎊.🎁.🏆.🐶.🐱.🐭.🦊.🐻.🐼.🐨.🦄.🐢.🐳.🍎.🍑.🍓.🍉.🍰.🍺.🍵.☕.🍜.🍙.✅.❌.❓.❗.💤.👑.🎮.🎵.📌.🔖".split("."), gt = [
|
|
524
531
|
"title",
|
|
525
532
|
"aria-label",
|
|
526
533
|
"aria-expanded"
|
|
527
|
-
],
|
|
534
|
+
], _t = ["innerHTML"], vt = { class: "kun-editor__picker-panel" }, yt = {
|
|
528
535
|
key: 0,
|
|
529
536
|
class: "kun-editor__picker-tabs",
|
|
530
537
|
role: "tablist"
|
|
531
|
-
},
|
|
538
|
+
}, bt = ["data-active"], xt = ["data-active"], St = { class: "kun-editor__emoji-grid" }, Ct = ["onClick"], wt = {
|
|
532
539
|
key: 1,
|
|
533
540
|
class: "kun-editor__sticker-body"
|
|
534
|
-
},
|
|
541
|
+
}, Tt = { class: "kun-editor__pack-name" }, Et = { class: "kun-editor__sticker-grid" }, Dt = ["title", "onClick"], Ot = ["src", "alt"], kt = {
|
|
535
542
|
key: 1,
|
|
536
543
|
class: "kun-editor__picker-hint"
|
|
537
|
-
},
|
|
544
|
+
}, At = /* @__PURE__ */ s({
|
|
538
545
|
__name: "StickerPicker",
|
|
539
546
|
setup(n) {
|
|
540
547
|
let [, o] = M(), s = l(X), c = s?.adapters.stickerSource, u = !!c, d = t(() => (s?.locale ?? "zh-cn").toLowerCase().startsWith("en")), h = t(() => d.value ? {
|
|
@@ -590,28 +597,28 @@ var Ne = [
|
|
|
590
597
|
}, [a("span", {
|
|
591
598
|
class: "kun-editor__icon",
|
|
592
599
|
innerHTML: x($).smile
|
|
593
|
-
}, null, 8,
|
|
594
|
-
u ? (m(), i("div",
|
|
600
|
+
}, null, 8, _t)], 8, gt), E(a("div", vt, [
|
|
601
|
+
u ? (m(), i("div", yt, [a("button", {
|
|
595
602
|
type: "button",
|
|
596
603
|
class: "kun-editor__picker-tab",
|
|
597
604
|
"data-active": S.value === "emoji",
|
|
598
605
|
onClick: n[0] ||= (e) => S.value = "emoji"
|
|
599
|
-
}, b(h.value.emoji), 9,
|
|
606
|
+
}, b(h.value.emoji), 9, bt), a("button", {
|
|
600
607
|
type: "button",
|
|
601
608
|
class: "kun-editor__picker-tab",
|
|
602
609
|
"data-active": S.value === "sticker",
|
|
603
610
|
onClick: n[1] ||= (e) => S.value = "sticker"
|
|
604
|
-
}, b(h.value.sticker), 9,
|
|
605
|
-
E(a("div",
|
|
611
|
+
}, b(h.value.sticker), 9, xt)])) : r("", !0),
|
|
612
|
+
E(a("div", St, [(m(!0), i(e, null, v(x(ht), (e, t) => (m(), i("button", {
|
|
606
613
|
key: t,
|
|
607
614
|
type: "button",
|
|
608
615
|
class: "kun-editor__emoji",
|
|
609
616
|
onClick: (t) => j(e)
|
|
610
|
-
}, b(e), 9,
|
|
611
|
-
u ? E((m(), i("div",
|
|
617
|
+
}, b(e), 9, Ct))), 128))], 512), [[C, !u || S.value === "emoji"]]),
|
|
618
|
+
u ? E((m(), i("div", wt, [w.value.length ? (m(!0), i(e, { key: 0 }, v(w.value, (t) => (m(), i("div", {
|
|
612
619
|
key: t.name,
|
|
613
620
|
class: "kun-editor__pack"
|
|
614
|
-
}, [a("div",
|
|
621
|
+
}, [a("div", Tt, b(t.name), 1), a("div", Et, [(m(!0), i(e, null, v(t.stickers, (e, t) => (m(), i("button", {
|
|
615
622
|
key: t,
|
|
616
623
|
type: "button",
|
|
617
624
|
class: "kun-editor__sticker",
|
|
@@ -621,23 +628,23 @@ var Ne = [
|
|
|
621
628
|
src: e.src,
|
|
622
629
|
alt: e.name,
|
|
623
630
|
loading: "lazy"
|
|
624
|
-
}, null, 8,
|
|
631
|
+
}, null, 8, Ot)], 8, Dt))), 128))])]))), 128)) : (m(), i("div", kt, b(D.value ? h.value.failed : h.value.empty), 1))], 512)), [[C, S.value === "sticker"]]) : r("", !0)
|
|
625
632
|
], 512), [[C, g.value]])], 512));
|
|
626
633
|
}
|
|
627
|
-
}),
|
|
634
|
+
}), jt = {
|
|
628
635
|
class: "kun-editor__format-toolbar",
|
|
629
636
|
role: "toolbar"
|
|
630
|
-
},
|
|
637
|
+
}, Mt = ["aria-label"], Nt = {
|
|
631
638
|
value: "",
|
|
632
639
|
disabled: "",
|
|
633
640
|
selected: ""
|
|
634
|
-
},
|
|
641
|
+
}, Pt = ["value"], Ft = [
|
|
635
642
|
"title",
|
|
636
643
|
"aria-label",
|
|
637
644
|
"aria-pressed",
|
|
638
645
|
"data-active",
|
|
639
646
|
"onClick"
|
|
640
|
-
],
|
|
647
|
+
], It = ["innerHTML"], Lt = ["title", "aria-label"], Rt = ["innerHTML"], zt = /* @__PURE__ */ s({
|
|
641
648
|
__name: "EditorToolbar",
|
|
642
649
|
setup(s) {
|
|
643
650
|
let [, c] = M(), u = l(X), d = u?.activeMarks ?? Ie, f = t(() => u?.adapters.uploadImage), p = t(() => u?.features.sticker !== !1), h = t(() => (u?.locale ?? "zh-cn").toLowerCase().startsWith("en")), g = (e, t) => {
|
|
@@ -733,7 +740,8 @@ var Ne = [
|
|
|
733
740
|
[{
|
|
734
741
|
svg: $.spoiler,
|
|
735
742
|
title: y.value.spoiler,
|
|
736
|
-
run: () => g(be.key)
|
|
743
|
+
run: () => g(be.key),
|
|
744
|
+
mark: "spoiler"
|
|
737
745
|
}]
|
|
738
746
|
]), T = _(null), E = () => T.value?.click(), D = (e) => {
|
|
739
747
|
let t = e.target, n = t.files?.[0];
|
|
@@ -747,19 +755,19 @@ var Ne = [
|
|
|
747
755
|
});
|
|
748
756
|
});
|
|
749
757
|
};
|
|
750
|
-
return (t, s) => (m(), i("div",
|
|
758
|
+
return (t, s) => (m(), i("div", jt, [
|
|
751
759
|
a("select", {
|
|
752
760
|
class: "kun-editor__heading-select",
|
|
753
761
|
"aria-label": y.value.textSize,
|
|
754
762
|
onChange: C
|
|
755
|
-
}, [a("option",
|
|
763
|
+
}, [a("option", Nt, b(y.value.textSize), 1), (m(!0), i(e, null, v(S.value, (e) => (m(), i("option", {
|
|
756
764
|
key: e.level,
|
|
757
765
|
value: e.level
|
|
758
|
-
}, b(e.label), 9,
|
|
766
|
+
}, b(e.label), 9, Pt))), 128))], 40, Mt),
|
|
759
767
|
(m(!0), i(e, null, v(w.value, (t, r) => (m(), i(e, { key: r }, [s[0] ||= a("span", {
|
|
760
768
|
class: "kun-editor__toolbar-divider",
|
|
761
769
|
"aria-hidden": "true"
|
|
762
|
-
}, null, -1), (m(!0), i(e, null, v(t, (t, r) => (m(), i(e, { key: r }, ["link" in t ? (m(), n(
|
|
770
|
+
}, null, -1), (m(!0), i(e, null, v(t, (t, r) => (m(), i(e, { key: r }, ["link" in t ? (m(), n(mt, { key: 0 })) : (m(), i("button", {
|
|
763
771
|
key: 1,
|
|
764
772
|
type: "button",
|
|
765
773
|
class: "kun-editor__tool",
|
|
@@ -771,7 +779,7 @@ var Ne = [
|
|
|
771
779
|
}, [a("span", {
|
|
772
780
|
class: "kun-editor__icon",
|
|
773
781
|
innerHTML: t.svg
|
|
774
|
-
}, null, 8,
|
|
782
|
+
}, null, 8, It)], 8, Ft))], 64))), 128))], 64))), 128)),
|
|
775
783
|
f.value ? (m(), i(e, { key: 0 }, [
|
|
776
784
|
s[1] ||= a("span", {
|
|
777
785
|
class: "kun-editor__toolbar-divider",
|
|
@@ -786,7 +794,7 @@ var Ne = [
|
|
|
786
794
|
}, [a("span", {
|
|
787
795
|
class: "kun-editor__icon",
|
|
788
796
|
innerHTML: x($).image
|
|
789
|
-
}, null, 8,
|
|
797
|
+
}, null, 8, Rt)], 8, Lt),
|
|
790
798
|
a("input", {
|
|
791
799
|
ref_key: "fileInput",
|
|
792
800
|
ref: T,
|
|
@@ -799,10 +807,10 @@ var Ne = [
|
|
|
799
807
|
p.value ? (m(), i(e, { key: 1 }, [s[2] ||= a("span", {
|
|
800
808
|
class: "kun-editor__toolbar-divider",
|
|
801
809
|
"aria-hidden": "true"
|
|
802
|
-
}, null, -1), o(
|
|
810
|
+
}, null, -1), o(At)], 64)) : r("", !0)
|
|
803
811
|
]));
|
|
804
812
|
}
|
|
805
|
-
}),
|
|
813
|
+
}), Bt = /* @__PURE__ */ s({
|
|
806
814
|
__name: "ToolbarHost",
|
|
807
815
|
setup(e) {
|
|
808
816
|
let [, t] = M(), n = l(X, void 0), r = (e, n) => {
|
|
@@ -859,7 +867,7 @@ var Ne = [
|
|
|
859
867
|
};
|
|
860
868
|
return (e, t) => y(e.$slots, "default", d(c(a)));
|
|
861
869
|
}
|
|
862
|
-
}),
|
|
870
|
+
}), Vt = /* @__PURE__ */ s({
|
|
863
871
|
__name: "MarkdownSource",
|
|
864
872
|
props: {
|
|
865
873
|
modelValue: {},
|
|
@@ -931,23 +939,23 @@ var Ne = [
|
|
|
931
939
|
class: "kun-editor__source"
|
|
932
940
|
}, null, 512));
|
|
933
941
|
}
|
|
934
|
-
}),
|
|
942
|
+
}), Ht = ["data-mode"], Ut = {
|
|
935
943
|
key: 0,
|
|
936
944
|
class: "kun-editor__toolbar",
|
|
937
945
|
role: "tablist"
|
|
938
|
-
},
|
|
946
|
+
}, Wt = [
|
|
939
947
|
"aria-selected",
|
|
940
948
|
"data-active",
|
|
941
949
|
"onClick"
|
|
942
|
-
],
|
|
950
|
+
], Gt = ["title", "aria-label"], Kt = [
|
|
943
951
|
"data-active",
|
|
944
952
|
"title",
|
|
945
953
|
"aria-pressed"
|
|
946
|
-
],
|
|
954
|
+
], qt = ["data-swap"], Jt = { class: "kun-editor__wysiwyg kun-editor__pane" }, Yt = {
|
|
947
955
|
key: 1,
|
|
948
956
|
class: "kun-editor__loading",
|
|
949
957
|
"aria-hidden": "true"
|
|
950
|
-
},
|
|
958
|
+
}, Xt = /* @__PURE__ */ s({
|
|
951
959
|
__name: "KunEditor",
|
|
952
960
|
props: {
|
|
953
961
|
modelValue: {},
|
|
@@ -1086,35 +1094,35 @@ var Ne = [
|
|
|
1086
1094
|
swap: z,
|
|
1087
1095
|
scrollSync: B.value,
|
|
1088
1096
|
toggleScrollSync: ne
|
|
1089
|
-
}, () => [s.views.length > 1 ? (m(), i("div",
|
|
1097
|
+
}, () => [s.views.length > 1 ? (m(), i("div", Ut, [(m(!0), i(e, null, v(s.views, (e) => (m(), i("button", {
|
|
1090
1098
|
key: e,
|
|
1091
1099
|
type: "button",
|
|
1092
1100
|
class: "kun-editor__tab",
|
|
1093
1101
|
"aria-selected": L.value === e,
|
|
1094
1102
|
"data-active": L.value === e,
|
|
1095
1103
|
onClick: (t) => te(e)
|
|
1096
|
-
}, b(V.value[e]), 9,
|
|
1104
|
+
}, b(V.value[e]), 9, Wt))), 128)), L.value === "split" ? (m(), i(e, { key: 0 }, [a("button", {
|
|
1097
1105
|
type: "button",
|
|
1098
1106
|
class: "kun-editor__tab kun-editor__swap",
|
|
1099
1107
|
title: V.value.swap,
|
|
1100
1108
|
"aria-label": V.value.swap,
|
|
1101
1109
|
onClick: l[0] ||= (e) => z()
|
|
1102
|
-
}, " ⇄ ", 8,
|
|
1110
|
+
}, " ⇄ ", 8, Gt), a("button", {
|
|
1103
1111
|
type: "button",
|
|
1104
1112
|
class: "kun-editor__tab",
|
|
1105
1113
|
"data-active": B.value,
|
|
1106
1114
|
title: V.value.scrollSync,
|
|
1107
1115
|
"aria-pressed": B.value,
|
|
1108
1116
|
onClick: l[1] ||= (e) => ne()
|
|
1109
|
-
}, b(V.value.scrollSync), 9,
|
|
1117
|
+
}, b(V.value.scrollSync), 9, Kt)], 64)) : r("", !0)])) : r("", !0)]), o(x(A), null, {
|
|
1110
1118
|
default: T(() => [o(x(N), null, {
|
|
1111
|
-
default: T(() => [E(a("div", null, [o(
|
|
1112
|
-
default: T((e) => [y(t.$slots, "toolbar", d(c(e)), () => [o(
|
|
1119
|
+
default: T(() => [E(a("div", null, [o(Bt, null, {
|
|
1120
|
+
default: T((e) => [y(t.$slots, "toolbar", d(c(e)), () => [o(zt)])]),
|
|
1113
1121
|
_: 3
|
|
1114
1122
|
})], 512), [[C, L.value === "wysiwyg" && !s.readonly]]), a("div", {
|
|
1115
1123
|
class: "kun-editor__panes",
|
|
1116
1124
|
"data-swap": R.value
|
|
1117
|
-
}, [L.value === "source" || L.value === "split" ? (m(), n(
|
|
1125
|
+
}, [L.value === "source" || L.value === "split" ? (m(), n(Vt, {
|
|
1118
1126
|
key: 0,
|
|
1119
1127
|
ref_key: "source",
|
|
1120
1128
|
ref: se,
|
|
@@ -1122,7 +1130,7 @@ var Ne = [
|
|
|
1122
1130
|
"model-value": s.modelValue,
|
|
1123
1131
|
readonly: s.readonly,
|
|
1124
1132
|
"onUpdate:modelValue": K
|
|
1125
|
-
}, null, 8, ["model-value", "readonly"])) : r("", !0), E(a("div",
|
|
1133
|
+
}, null, 8, ["model-value", "readonly"])) : r("", !0), E(a("div", Jt, [o(st, {
|
|
1126
1134
|
ref_key: "inner",
|
|
1127
1135
|
ref: q,
|
|
1128
1136
|
"model-value": s.modelValue,
|
|
@@ -1146,18 +1154,18 @@ var Ne = [
|
|
|
1146
1154
|
"placeholder-mode",
|
|
1147
1155
|
"active",
|
|
1148
1156
|
"selection-toolbar"
|
|
1149
|
-
])], 512), [[C, L.value === "wysiwyg" || L.value === "split"]])], 8,
|
|
1157
|
+
])], 512), [[C, L.value === "wysiwyg" || L.value === "split"]])], 8, qt)]),
|
|
1150
1158
|
_: 3
|
|
1151
1159
|
})]),
|
|
1152
1160
|
_: 3
|
|
1153
|
-
})], 64)) : r("", !0), !j.value || M.value ? (m(), i("div",
|
|
1161
|
+
})], 64)) : r("", !0), !j.value || M.value ? (m(), i("div", Yt, [y(t.$slots, "loading", {}, () => [
|
|
1154
1162
|
l[2] ||= a("div", { class: "kun-editor__skeleton" }, null, -1),
|
|
1155
1163
|
l[3] ||= a("div", { class: "kun-editor__skeleton" }, null, -1),
|
|
1156
1164
|
l[4] ||= a("div", { class: "kun-editor__skeleton" }, null, -1)
|
|
1157
|
-
])])) : r("", !0)], 8,
|
|
1165
|
+
])])) : r("", !0)], 8, Ht));
|
|
1158
1166
|
}
|
|
1159
|
-
}),
|
|
1160
|
-
e.component("KunEditor",
|
|
1167
|
+
}), Zt = { install(e) {
|
|
1168
|
+
e.component("KunEditor", Xt);
|
|
1161
1169
|
} };
|
|
1162
1170
|
//#endregion
|
|
1163
|
-
export {
|
|
1171
|
+
export { ht as EMOJI, Xt as KunEditor, Zt as KunEditorPlugin, F as parseHeadings };
|
package/dist/types.d.ts
CHANGED
|
@@ -2,13 +2,14 @@ import type { CmdKey } from '@milkdown/kit/core';
|
|
|
2
2
|
import type { KunEditorAdapters, KunEditorFeatures, KunEditorLocale } from '@kungal/editor-core';
|
|
3
3
|
export type KunToolbarItem = 'heading' | 'bold' | 'italic' | 'strike' | 'code' | 'bulletList' | 'orderedList' | 'quote' | 'codeBlock' | 'hr' | 'spoiler' | 'link' | 'image' | 'picker' | '|';
|
|
4
4
|
export type KunSelectionItem = 'bold' | 'italic' | 'strike' | 'code' | 'link' | '|';
|
|
5
|
-
export type KunToggleMark = 'bold' | 'italic' | 'strike' | 'code';
|
|
5
|
+
export type KunToggleMark = 'bold' | 'italic' | 'strike' | 'code' | 'spoiler';
|
|
6
6
|
export interface KunEditorToolbarApi {
|
|
7
7
|
/** Run a Milkdown command (import its key from the preset/commonmark/gfm). */
|
|
8
8
|
run: <T>(key: CmdKey<T>, payload?: T) => void;
|
|
9
9
|
/**
|
|
10
|
-
* Live toggle
|
|
11
|
-
*
|
|
10
|
+
* Live toggle state at the caret / selection (bold / italic / strike / code,
|
|
11
|
+
* and `spoiler` when the caret is inside one — its button toggles too). The
|
|
12
|
+
* same record drives the default toolbar and the selection
|
|
12
13
|
* bubble; a custom `#toolbar` reads it here. Updated on every editor view
|
|
13
14
|
* tick, including stored-mark-only toggles.
|
|
14
15
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAK5B,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,OAAO,GACP,WAAW,GACX,IAAI,GACJ,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,GAAG,CAAA;AAIP,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,GAAG,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAK5B,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,YAAY,GACZ,aAAa,GACb,OAAO,GACP,WAAW,GACX,IAAI,GACJ,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,GAAG,CAAA;AAIP,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,GAAG,C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;;;OAGG;IACH,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;IAC7B,gCAAgC;IAChC,KAAK,IAAI,IAAI,CAAA;IACb;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/editor-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "KunEditor Vue 3 layer — the headless <KunEditor> component (dual WYSIWYG / markdown-source), toolbar and plugin views. Ships zero CSS and no UI-kit dependency; consumes @kungal/editor-core, and pairs with @kungal/editor-nuxt for optional KunUI chrome.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@prosemirror-adapter/vue": "^0.4.6",
|
|
43
|
-
"@kungal/editor-core": "0.
|
|
43
|
+
"@kungal/editor-core": "0.36.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"@codemirror/lang-markdown": "^6.0.0",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vite": "^8.0.16",
|
|
81
81
|
"vue": "^3.5.35",
|
|
82
82
|
"vue-tsc": "^3.3.3",
|
|
83
|
-
"@kungal/editor-core": "0.
|
|
83
|
+
"@kungal/editor-core": "0.36.0"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "vite build && vue-tsc -p tsconfig.build.json",
|