@kungal/editor-vue 0.13.0 → 0.15.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 +53 -0
- package/dist/components/EditorToolbar.vue.d.ts.map +1 -1
- package/dist/components/KunEditor.vue.d.ts +12 -2
- package/dist/components/KunEditor.vue.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -124
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @kungal/editor-vue
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a7273bb: Toolbar: headings become one "text size" dropdown; remove the formula button.
|
|
8
|
+
|
|
9
|
+
- **Headings → a single "text size" control** (Paragraph / H1–H6) instead of
|
|
10
|
+
three H1/H2/H3 buttons — the modern standard, and it can set Paragraph (reset),
|
|
11
|
+
which the old toggle buttons couldn't. The headless `EditorToolbar` uses a
|
|
12
|
+
native `<select>` (new `.kun-editor__heading-select` class hook); the KunUI
|
|
13
|
+
`<KunEditorToolbar>` uses a `<KunPopover>` with each level shown at its own size
|
|
14
|
+
(like the forum). Both drive `setHeadingCommand`.
|
|
15
|
+
- **Remove the math/formula button.** With no selection it inserted an empty
|
|
16
|
+
inline-math node (a broken formula box). Math is entered via the existing
|
|
17
|
+
`$…$` / `$$` input rules instead — the ecosystem norm (prosemirror-math). The
|
|
18
|
+
spoiler button stays.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [a7273bb]
|
|
23
|
+
- @kungal/editor-core@0.15.0
|
|
24
|
+
|
|
25
|
+
## 0.14.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- 506813b: Add a `#view-switch` slot and a KunUI view switch — the Preview/Markdown tabs are
|
|
30
|
+
now a swappable layer too.
|
|
31
|
+
|
|
32
|
+
`<KunEditor>` exposes a `#view-switch` scoped slot whose props are
|
|
33
|
+
`KunEditorViewSwitchApi` (`mode` / `setMode` / `labels`). The hand-rolled tabs
|
|
34
|
+
are the slot's fallback — omit the slot and nothing changes. This lets a host
|
|
35
|
+
render a real component (or anything) for the view switch and drive the editor
|
|
36
|
+
via `setMode`, without reaching into internals.
|
|
37
|
+
|
|
38
|
+
`@kungal/editor-nuxt` ships `<KunEditorViewSwitch>` (auto-imported): the tabs as a
|
|
39
|
+
real `<KunTab variant="underlined">` (keyboard nav, sliding indicator, a11y):
|
|
40
|
+
|
|
41
|
+
```vue
|
|
42
|
+
<KunEditor v-model="md">
|
|
43
|
+
<template #view-switch="s"><KunEditorViewSwitch v-bind="s" /></template>
|
|
44
|
+
<template #toolbar="api"><KunEditorToolbar v-bind="api" /></template>
|
|
45
|
+
</KunEditor>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Same "headless core + optional KunUI layer" pattern as `#toolbar` /
|
|
49
|
+
`<KunEditorToolbar>`: `@kungal/editor-vue` stays UI-kit-free (default tabs), the
|
|
50
|
+
KunUI ecosystem gets native chrome. Exports `KunEditorViewSwitchApi`.
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- @kungal/editor-core@0.14.0
|
|
55
|
+
|
|
3
56
|
## 0.13.0
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../src/components/EditorToolbar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../src/components/EditorToolbar.vue"],"names":[],"mappings":"AAmcA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -12,7 +12,15 @@ type __VLS_Props = {
|
|
|
12
12
|
/** Read-only render (no editing). */
|
|
13
13
|
readonly?: boolean;
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type ViewMode = 'wysiwyg' | 'source';
|
|
16
|
+
declare var __VLS_1: {
|
|
17
|
+
mode: ViewMode;
|
|
18
|
+
setMode: (m: ViewMode) => void;
|
|
19
|
+
labels: {
|
|
20
|
+
wysiwyg: string;
|
|
21
|
+
source: string;
|
|
22
|
+
};
|
|
23
|
+
}, __VLS_22: {
|
|
16
24
|
run: <T>(key: import("@milkdown/kit/core").CmdKey<T>, payload?: T) => void;
|
|
17
25
|
insertText: (text: string) => void;
|
|
18
26
|
insertQuote: (payload: {
|
|
@@ -29,7 +37,9 @@ declare var __VLS_20: {
|
|
|
29
37
|
locale: KunEditorLocale;
|
|
30
38
|
};
|
|
31
39
|
type __VLS_Slots = {} & {
|
|
32
|
-
|
|
40
|
+
'view-switch'?: (props: typeof __VLS_1) => any;
|
|
41
|
+
} & {
|
|
42
|
+
toolbar?: (props: typeof __VLS_22) => any;
|
|
33
43
|
};
|
|
34
44
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, KunEditorExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
45
|
"update:modelValue": (markdown: string) => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KunEditor.vue.d.ts","sourceRoot":"","sources":["../../src/components/KunEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KunEditor.vue.d.ts","sourceRoot":"","sources":["../../src/components/KunEditor.vue"],"names":[],"mappings":"AAkLA,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EAChB,MAAM,qBAAqB,CAAA;AAM5B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,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;CACnB,CAAC;AAoCJ,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;AA2MpC,QAAA,IAAI,OAAO;;iBAzMS,QAAQ;;;;;CAyMP,EAAE,QAAQ;iEAzQ/B,CArKwB;;;;;;;;;;;;;;CA8awC,CAAE;AAClE,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAClD;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAOhD,QAAA,MAAM,UAAU;;;;;cAhQD,iBAAiB;cAEjB,iBAAiB;YAEnB,eAAe;cAEb,OAAO;6EA+PpB,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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import KunEditor from './components/KunEditor.vue';
|
|
|
3
3
|
export { KunEditor };
|
|
4
4
|
export type { KunEditorExpose } from './types';
|
|
5
5
|
export type { KunEditorToolbarApi } from './types';
|
|
6
|
+
export type { KunEditorViewSwitchApi } from './types';
|
|
6
7
|
export { EMOJI } from './emoji';
|
|
7
8
|
export type { KunEditorAdapters, KunEditorFeatures, KunEditorLocale, UploadImage, SearchMentionUsers, StickerSource, Notify, NotifyLevel, MentionUser, StickerItem, StickerPack } from '@kungal/editor-core';
|
|
8
9
|
/** Vue plugin: `app.use(KunEditorPlugin)` to register <KunEditor> globally. */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,CAAA;AAGpB,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B,+EAA+E;AAC/E,eAAO,MAAM,eAAe,EAAE,MAI7B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAO,MAAM,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,SAAS,EAAE,CAAA;AAGpB,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAG9C,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAGlD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAGrD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAE5B,+EAA+E;AAC/E,eAAO,MAAM,eAAe,EAAE,MAI7B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,32 +5,32 @@ import { Editor as M, defaultValueCtx as N, editorViewCtx as P, editorViewOption
|
|
|
5
5
|
import { listenerCtx as L } from "@milkdown/kit/plugin/listener";
|
|
6
6
|
import { SlashProvider as ee, slashFactory as te } from "@milkdown/kit/plugin/slash";
|
|
7
7
|
import { callCommand as R, replaceAll as z } from "@milkdown/kit/utils";
|
|
8
|
-
import { createKunEditorPlugins as ne, insertKunSpoilerCommand as re, insertMentionCommand as B, insertQuoteCommand as V, kunCM as ie, mentionId as ae,
|
|
8
|
+
import { createKunEditorPlugins as ne, insertKunSpoilerCommand as re, insertMentionCommand as B, insertQuoteCommand as V, kunCM as ie, mentionId as ae, setHeadingCommand as oe } from "@kungal/editor-core/preset";
|
|
9
9
|
import { TextSelection as se } from "@milkdown/kit/prose/state";
|
|
10
|
-
import { createCodeBlockCommand as ce, insertHrCommand as
|
|
11
|
-
import { toggleStrikethroughCommand as
|
|
12
|
-
import { EditorState as
|
|
10
|
+
import { createCodeBlockCommand as ce, insertHrCommand as H, insertImageCommand as U, toggleEmphasisCommand as W, toggleInlineCodeCommand as G, toggleStrongCommand as le, wrapInBlockquoteCommand as ue, wrapInBulletListCommand as de, wrapInOrderedListCommand as fe } from "@milkdown/kit/preset/commonmark";
|
|
11
|
+
import { toggleStrikethroughCommand as pe } from "@milkdown/kit/preset/gfm";
|
|
12
|
+
import { EditorState as me } from "@codemirror/state";
|
|
13
13
|
import { EditorView as K } from "@codemirror/view";
|
|
14
|
-
import { markdown as
|
|
15
|
-
import { basicSetup as
|
|
14
|
+
import { markdown as he } from "@codemirror/lang-markdown";
|
|
15
|
+
import { basicSetup as ge } from "codemirror";
|
|
16
16
|
//#region src/context.ts
|
|
17
|
-
var q = Symbol("kun-editor-context"),
|
|
17
|
+
var q = Symbol("kun-editor-context"), _e = [
|
|
18
18
|
"data-active",
|
|
19
19
|
"onMousedown",
|
|
20
20
|
"onMouseenter"
|
|
21
|
-
],
|
|
21
|
+
], ve = ["src", "alt"], ye = {
|
|
22
22
|
key: 1,
|
|
23
23
|
class: "kun-mention-dropdown__avatar kun-mention-dropdown__avatar--fallback"
|
|
24
|
-
},
|
|
24
|
+
}, be = { class: "kun-mention-dropdown__name" }, xe = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "kun-mention-dropdown__hint"
|
|
27
|
-
},
|
|
27
|
+
}, Se = {
|
|
28
28
|
key: 2,
|
|
29
29
|
class: "kun-mention-dropdown__hint"
|
|
30
|
-
},
|
|
30
|
+
}, Ce = {
|
|
31
31
|
key: 3,
|
|
32
32
|
class: "kun-mention-dropdown__hint"
|
|
33
|
-
},
|
|
33
|
+
}, we = /* @__PURE__ */ s({
|
|
34
34
|
__name: "MentionDropdown",
|
|
35
35
|
setup(n) {
|
|
36
36
|
let r = /(?:^|\s)@([^\s@]{0,30})$/, o = l(q), s = o?.adapters.searchMentionUsers, c = t(() => (o?.locale ?? "zh-cn").toLowerCase().startsWith("en")), u = t(() => c.value ? {
|
|
@@ -136,9 +136,9 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
136
136
|
src: e.avatar,
|
|
137
137
|
alt: e.name,
|
|
138
138
|
class: "kun-mention-dropdown__avatar"
|
|
139
|
-
}, null, 8,
|
|
139
|
+
}, null, 8, ve)) : (p(), i("span", ye, v(e.name.charAt(0)), 1)), a("span", be, v(e.name), 1)], 40, _e))), 128)) : D.value ? (p(), i("div", xe, v(u.value.searching), 1)) : C.value ? (p(), i("div", Se, v(u.value.empty), 1)) : (p(), i("div", Ce, v(u.value.prompt), 1))], 512));
|
|
140
140
|
}
|
|
141
|
-
}),
|
|
141
|
+
}), Te = /* @__PURE__ */ s({
|
|
142
142
|
__name: "MilkdownEditor",
|
|
143
143
|
props: {
|
|
144
144
|
modelValue: {},
|
|
@@ -156,7 +156,7 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
156
156
|
}), t.update(F, (e) => ({
|
|
157
157
|
...e,
|
|
158
158
|
editable: () => !i.readonly
|
|
159
|
-
})), l && t.set(c.key, { view: s({ component:
|
|
159
|
+
})), l && t.set(c.key, { view: s({ component: we }) });
|
|
160
160
|
}).use(ne(i.adapters, i.features, { locale: i.locale }));
|
|
161
161
|
return l && t.use(c), t;
|
|
162
162
|
});
|
|
@@ -193,21 +193,21 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
193
193
|
spoiler: J("<path d=\"M9.9 4.24A9.1 9.1 0 0 1 12 4c7 0 10 8 10 8a13.2 13.2 0 0 1-1.67 2.68\"/><path d=\"M6.6 6.6A13.5 13.5 0 0 0 2 12s3 8 10 8a9.7 9.7 0 0 0 5.4-1.6\"/><line x1=\"2\" y1=\"2\" x2=\"22\" y2=\"22\"/>"),
|
|
194
194
|
latex: Y("Σ", 15),
|
|
195
195
|
smile: J("<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\"/>")
|
|
196
|
-
}, Z = /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.😉.😊.😇.🥰.😍.🤩.😘.😗.😚.😋.😛.😜.🤪.😝.🤗.🤭.🤔.🤐.😐.😑.😶.😏.😒.🙄.😬.😌.😔.😪.🤤.😴.😷.🤒.🤕.🥵.🥶.🥴.😵.🤯.🤠.🥳.😎.🤓.🧐.😕.😟.🙁.😮.😯.😲.😳.🥺.😦.😧.😨.😰.😥.😢.😭.😱.😖.😣.😞.😓.😩.😫.🥱.😤.😡.😠.🤬.😈.👿.💀.💩.🤡.👻.👽.🤖.😺.😸.👍.👎.👌.🤌.🤏.✌️.🤞.🤟.🤘.👋.🤚.🖐️.✋.👏.🙌.🤝.🙏.💪.👀.👁️.❤️.🧡.💛.💚.💙.💜.🖤.🤍.💔.💕.💞.💓.💗.💖.💘.💝.💯.✨.⭐.🌟.🔥.💥.💫.⚡.☀️.🌈.🎉.🎊.🎁.🏆.🐶.🐱.🐭.🦊.🐻.🐼.🐨.🦄.🐢.🐳.🍎.🍑.🍓.🍉.🍰.🍺.🍵.☕.🍜.🍙.✅.❌.❓.❗.💤.👑.🎮.🎵.📌.🔖".split("."),
|
|
196
|
+
}, Z = /* @__PURE__ */ "😀.😃.😄.😁.😆.😅.🤣.😂.🙂.🙃.😉.😊.😇.🥰.😍.🤩.😘.😗.😚.😋.😛.😜.🤪.😝.🤗.🤭.🤔.🤐.😐.😑.😶.😏.😒.🙄.😬.😌.😔.😪.🤤.😴.😷.🤒.🤕.🥵.🥶.🥴.😵.🤯.🤠.🥳.😎.🤓.🧐.😕.😟.🙁.😮.😯.😲.😳.🥺.😦.😧.😨.😰.😥.😢.😭.😱.😖.😣.😞.😓.😩.😫.🥱.😤.😡.😠.🤬.😈.👿.💀.💩.🤡.👻.👽.🤖.😺.😸.👍.👎.👌.🤌.🤏.✌️.🤞.🤟.🤘.👋.🤚.🖐️.✋.👏.🙌.🤝.🙏.💪.👀.👁️.❤️.🧡.💛.💚.💙.💜.🖤.🤍.💔.💕.💞.💓.💗.💖.💘.💝.💯.✨.⭐.🌟.🔥.💥.💫.⚡.☀️.🌈.🎉.🎊.🎁.🏆.🐶.🐱.🐭.🦊.🐻.🐼.🐨.🦄.🐢.🐳.🍎.🍑.🍓.🍉.🍰.🍺.🍵.☕.🍜.🍙.✅.❌.❓.❗.💤.👑.🎮.🎵.📌.🔖".split("."), Ee = [
|
|
197
197
|
"title",
|
|
198
198
|
"aria-label",
|
|
199
199
|
"aria-expanded"
|
|
200
|
-
],
|
|
200
|
+
], De = ["innerHTML"], Oe = { class: "kun-editor__picker-panel" }, ke = {
|
|
201
201
|
key: 0,
|
|
202
202
|
class: "kun-editor__picker-tabs",
|
|
203
203
|
role: "tablist"
|
|
204
|
-
},
|
|
204
|
+
}, Ae = ["data-active"], je = ["data-active"], Me = { class: "kun-editor__emoji-grid" }, Ne = ["onClick"], Pe = {
|
|
205
205
|
key: 1,
|
|
206
206
|
class: "kun-editor__sticker-body"
|
|
207
|
-
},
|
|
207
|
+
}, Fe = { class: "kun-editor__pack-name" }, Ie = { class: "kun-editor__sticker-grid" }, Le = ["title", "onClick"], Re = ["src", "alt"], ze = {
|
|
208
208
|
key: 1,
|
|
209
209
|
class: "kun-editor__picker-hint"
|
|
210
|
-
},
|
|
210
|
+
}, Be = /* @__PURE__ */ s({
|
|
211
211
|
__name: "StickerPicker",
|
|
212
212
|
setup(n) {
|
|
213
213
|
let [, o] = O(), s = l(q), c = s?.adapters.stickerSource, u = !!c, m = t(() => (s?.locale ?? "zh-cn").toLowerCase().startsWith("en")), _ = t(() => m.value ? {
|
|
@@ -243,7 +243,7 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
243
243
|
n.dispatch(r.tr.insertText(e, r.selection.from));
|
|
244
244
|
});
|
|
245
245
|
}, N = (e, t) => {
|
|
246
|
-
o()?.action(R(
|
|
246
|
+
o()?.action(R(U.key, {
|
|
247
247
|
src: e,
|
|
248
248
|
title: t,
|
|
249
249
|
alt: t
|
|
@@ -263,28 +263,28 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
263
263
|
}, [a("span", {
|
|
264
264
|
class: "kun-editor__icon",
|
|
265
265
|
innerHTML: y(X).smile
|
|
266
|
-
}, null, 8,
|
|
267
|
-
u ? (p(), i("div",
|
|
266
|
+
}, null, 8, De)], 8, Ee), C(a("div", Oe, [
|
|
267
|
+
u ? (p(), i("div", ke, [a("button", {
|
|
268
268
|
type: "button",
|
|
269
269
|
class: "kun-editor__picker-tab",
|
|
270
270
|
"data-active": w.value === "emoji",
|
|
271
271
|
onClick: n[0] ||= (e) => w.value = "emoji"
|
|
272
|
-
}, v(_.value.emoji), 9,
|
|
272
|
+
}, v(_.value.emoji), 9, Ae), a("button", {
|
|
273
273
|
type: "button",
|
|
274
274
|
class: "kun-editor__picker-tab",
|
|
275
275
|
"data-active": w.value === "sticker",
|
|
276
276
|
onClick: n[1] ||= (e) => w.value = "sticker"
|
|
277
|
-
}, v(_.value.sticker), 9,
|
|
278
|
-
C(a("div",
|
|
277
|
+
}, v(_.value.sticker), 9, je)])) : r("", !0),
|
|
278
|
+
C(a("div", Me, [(p(!0), i(e, null, g(y(Z), (e, t) => (p(), i("button", {
|
|
279
279
|
key: t,
|
|
280
280
|
type: "button",
|
|
281
281
|
class: "kun-editor__emoji",
|
|
282
282
|
onClick: (t) => M(e)
|
|
283
|
-
}, v(e), 9,
|
|
284
|
-
u ? C((p(), i("div",
|
|
283
|
+
}, v(e), 9, Ne))), 128))], 512), [[b, !u || w.value === "emoji"]]),
|
|
284
|
+
u ? C((p(), i("div", Pe, [T.value.length ? (p(!0), i(e, { key: 0 }, g(T.value, (t) => (p(), i("div", {
|
|
285
285
|
key: t.name,
|
|
286
286
|
class: "kun-editor__pack"
|
|
287
|
-
}, [a("div",
|
|
287
|
+
}, [a("div", Fe, v(t.name), 1), a("div", Ie, [(p(!0), i(e, null, g(t.stickers, (e, t) => (p(), i("button", {
|
|
288
288
|
key: t,
|
|
289
289
|
type: "button",
|
|
290
290
|
class: "kun-editor__sticker",
|
|
@@ -294,127 +294,120 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
294
294
|
src: e.src,
|
|
295
295
|
alt: e.name,
|
|
296
296
|
loading: "lazy"
|
|
297
|
-
}, null, 8,
|
|
297
|
+
}, null, 8, Re)], 8, Le))), 128))])]))), 128)) : (p(), i("div", ze, v(D.value ? _.value.failed : _.value.empty), 1))], 512)), [[b, w.value === "sticker"]]) : r("", !0)
|
|
298
298
|
], 512), [[b, x.value]])], 512));
|
|
299
299
|
}
|
|
300
|
-
}),
|
|
300
|
+
}), Ve = {
|
|
301
301
|
class: "kun-editor__format-toolbar",
|
|
302
302
|
role: "toolbar"
|
|
303
|
-
}, Q = {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
}, Ue = [
|
|
303
|
+
}, He = ["aria-label"], Q = {
|
|
304
|
+
value: "",
|
|
305
|
+
disabled: "",
|
|
306
|
+
selected: ""
|
|
307
|
+
}, Ue = ["value"], We = [
|
|
308
308
|
"title",
|
|
309
309
|
"aria-label",
|
|
310
310
|
"onClick"
|
|
311
|
-
],
|
|
311
|
+
], Ge = ["innerHTML"], Ke = ["title", "aria-label"], qe = ["innerHTML"], Je = /* @__PURE__ */ s({
|
|
312
312
|
__name: "EditorToolbar",
|
|
313
313
|
setup(n) {
|
|
314
314
|
let [, s] = O(), c = l(q), u = t(() => c?.adapters.uploadImage), d = () => c?.adapters.notify, f = t(() => c?.features.sticker !== !1), m = t(() => (c?.locale ?? "zh-cn").toLowerCase().startsWith("en")), _ = (e, t) => {
|
|
315
315
|
s()?.action(R(e, t));
|
|
316
|
-
},
|
|
316
|
+
}, b = t(() => {
|
|
317
317
|
let e = m.value;
|
|
318
318
|
return {
|
|
319
|
+
textSize: e ? "Text size" : "文本大小",
|
|
319
320
|
bold: e ? "Bold" : "加粗",
|
|
320
321
|
italic: e ? "Italic" : "斜体",
|
|
321
322
|
strike: e ? "Strikethrough" : "删除线",
|
|
322
323
|
code: e ? "Inline code" : "行内代码",
|
|
323
|
-
h1: e ? "Heading 1" : "一级标题",
|
|
324
|
-
h2: e ? "Heading 2" : "二级标题",
|
|
325
|
-
h3: e ? "Heading 3" : "三级标题",
|
|
326
324
|
bulletList: e ? "Bullet list" : "无序列表",
|
|
327
325
|
orderedList: e ? "Ordered list" : "有序列表",
|
|
328
326
|
quote: e ? "Blockquote" : "引用块",
|
|
329
327
|
codeBlock: e ? "Code block" : "代码块",
|
|
330
328
|
hr: e ? "Divider" : "分隔线",
|
|
331
329
|
spoiler: e ? "Spoiler" : "隐藏文本",
|
|
332
|
-
latex: e ? "Math (LaTeX)" : "公式",
|
|
333
330
|
image: e ? "Upload image" : "上传图片"
|
|
334
331
|
};
|
|
335
|
-
}),
|
|
332
|
+
}), x = t(() => {
|
|
333
|
+
let e = m.value;
|
|
334
|
+
return [
|
|
335
|
+
"正文",
|
|
336
|
+
"一级标题",
|
|
337
|
+
"二级标题",
|
|
338
|
+
"三级标题",
|
|
339
|
+
"四级标题",
|
|
340
|
+
"五级标题",
|
|
341
|
+
"六级标题"
|
|
342
|
+
].map((t, n) => ({
|
|
343
|
+
level: n,
|
|
344
|
+
label: e ? n === 0 ? "Paragraph" : `Heading ${n}` : t
|
|
345
|
+
}));
|
|
346
|
+
}), S = (e) => {
|
|
347
|
+
let t = e.target;
|
|
348
|
+
_(oe.key, Number(t.value)), t.selectedIndex = 0;
|
|
349
|
+
}, C = t(() => [
|
|
336
350
|
[
|
|
337
351
|
{
|
|
338
352
|
svg: X.bold,
|
|
339
|
-
title:
|
|
340
|
-
run: () => _(
|
|
353
|
+
title: b.value.bold,
|
|
354
|
+
run: () => _(le.key)
|
|
341
355
|
},
|
|
342
356
|
{
|
|
343
357
|
svg: X.italic,
|
|
344
|
-
title:
|
|
345
|
-
run: () => _(
|
|
358
|
+
title: b.value.italic,
|
|
359
|
+
run: () => _(W.key)
|
|
346
360
|
},
|
|
347
361
|
{
|
|
348
362
|
svg: X.strike,
|
|
349
|
-
title:
|
|
350
|
-
run: () => _(
|
|
363
|
+
title: b.value.strike,
|
|
364
|
+
run: () => _(pe.key)
|
|
351
365
|
},
|
|
352
366
|
{
|
|
353
367
|
svg: X.code,
|
|
354
|
-
title:
|
|
355
|
-
run: () => _(
|
|
356
|
-
}
|
|
357
|
-
],
|
|
358
|
-
[
|
|
359
|
-
{
|
|
360
|
-
svg: X.h1,
|
|
361
|
-
title: v.value.h1,
|
|
362
|
-
run: () => _(G.key, 1)
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
svg: X.h2,
|
|
366
|
-
title: v.value.h2,
|
|
367
|
-
run: () => _(G.key, 2)
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
svg: X.h3,
|
|
371
|
-
title: v.value.h3,
|
|
372
|
-
run: () => _(G.key, 3)
|
|
368
|
+
title: b.value.code,
|
|
369
|
+
run: () => _(G.key)
|
|
373
370
|
}
|
|
374
371
|
],
|
|
375
372
|
[
|
|
376
373
|
{
|
|
377
374
|
svg: X.bulletList,
|
|
378
|
-
title:
|
|
379
|
-
run: () => _(
|
|
375
|
+
title: b.value.bulletList,
|
|
376
|
+
run: () => _(de.key)
|
|
380
377
|
},
|
|
381
378
|
{
|
|
382
379
|
svg: X.orderedList,
|
|
383
|
-
title:
|
|
384
|
-
run: () => _(
|
|
380
|
+
title: b.value.orderedList,
|
|
381
|
+
run: () => _(fe.key)
|
|
385
382
|
},
|
|
386
383
|
{
|
|
387
384
|
svg: X.quote,
|
|
388
|
-
title:
|
|
389
|
-
run: () => _(
|
|
385
|
+
title: b.value.quote,
|
|
386
|
+
run: () => _(ue.key)
|
|
390
387
|
},
|
|
391
388
|
{
|
|
392
389
|
svg: X.codeBlock,
|
|
393
|
-
title:
|
|
390
|
+
title: b.value.codeBlock,
|
|
394
391
|
run: () => _(ce.key, "")
|
|
395
392
|
},
|
|
396
393
|
{
|
|
397
394
|
svg: X.hr,
|
|
398
|
-
title:
|
|
399
|
-
run: () => _(
|
|
395
|
+
title: b.value.hr,
|
|
396
|
+
run: () => _(H.key)
|
|
400
397
|
}
|
|
401
398
|
],
|
|
402
399
|
[{
|
|
403
400
|
svg: X.spoiler,
|
|
404
|
-
title:
|
|
401
|
+
title: b.value.spoiler,
|
|
405
402
|
run: () => _(re.key)
|
|
406
|
-
}, {
|
|
407
|
-
svg: X.latex,
|
|
408
|
-
title: v.value.latex,
|
|
409
|
-
run: () => _(oe.key)
|
|
410
403
|
}]
|
|
411
|
-
]),
|
|
404
|
+
]), w = h(null), T = () => w.value?.click(), E = async (e) => {
|
|
412
405
|
let t = e.target, n = t.files?.[0];
|
|
413
406
|
t.value = "";
|
|
414
407
|
let r = u.value;
|
|
415
408
|
if (!(!n || !r)) try {
|
|
416
409
|
let e = await r(n);
|
|
417
|
-
_(
|
|
410
|
+
_(U.key, {
|
|
418
411
|
src: e,
|
|
419
412
|
title: n.name,
|
|
420
413
|
alt: n.name
|
|
@@ -423,8 +416,19 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
423
416
|
d()?.(m.value ? "Image upload failed" : "图片上传失败", "error");
|
|
424
417
|
}
|
|
425
418
|
};
|
|
426
|
-
return (t, n) => (p(), i("div",
|
|
427
|
-
(
|
|
419
|
+
return (t, n) => (p(), i("div", Ve, [
|
|
420
|
+
a("select", {
|
|
421
|
+
class: "kun-editor__heading-select",
|
|
422
|
+
"aria-label": b.value.textSize,
|
|
423
|
+
onChange: S
|
|
424
|
+
}, [a("option", Q, v(b.value.textSize), 1), (p(!0), i(e, null, g(x.value, (e) => (p(), i("option", {
|
|
425
|
+
key: e.level,
|
|
426
|
+
value: e.level
|
|
427
|
+
}, v(e.label), 9, Ue))), 128))], 40, He),
|
|
428
|
+
(p(!0), i(e, null, g(C.value, (t, r) => (p(), i(e, { key: r }, [n[0] ||= a("span", {
|
|
429
|
+
class: "kun-editor__toolbar-divider",
|
|
430
|
+
"aria-hidden": "true"
|
|
431
|
+
}, null, -1), (p(!0), i(e, null, g(t, (e, t) => (p(), i("button", {
|
|
428
432
|
key: t,
|
|
429
433
|
type: "button",
|
|
430
434
|
class: "kun-editor__tool",
|
|
@@ -434,38 +438,38 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
434
438
|
}, [a("span", {
|
|
435
439
|
class: "kun-editor__icon",
|
|
436
440
|
innerHTML: e.svg
|
|
437
|
-
}, null, 8,
|
|
441
|
+
}, null, 8, Ge)], 8, We))), 128))], 64))), 128)),
|
|
438
442
|
u.value ? (p(), i(e, { key: 0 }, [
|
|
439
|
-
n[
|
|
443
|
+
n[1] ||= a("span", {
|
|
440
444
|
class: "kun-editor__toolbar-divider",
|
|
441
445
|
"aria-hidden": "true"
|
|
442
446
|
}, null, -1),
|
|
443
447
|
a("button", {
|
|
444
448
|
type: "button",
|
|
445
449
|
class: "kun-editor__tool",
|
|
446
|
-
title:
|
|
447
|
-
"aria-label":
|
|
448
|
-
onClick:
|
|
450
|
+
title: b.value.image,
|
|
451
|
+
"aria-label": b.value.image,
|
|
452
|
+
onClick: T
|
|
449
453
|
}, [a("span", {
|
|
450
454
|
class: "kun-editor__icon",
|
|
451
455
|
innerHTML: y(X).image
|
|
452
|
-
}, null, 8,
|
|
456
|
+
}, null, 8, qe)], 8, Ke),
|
|
453
457
|
a("input", {
|
|
454
458
|
ref_key: "fileInput",
|
|
455
|
-
ref:
|
|
459
|
+
ref: w,
|
|
456
460
|
type: "file",
|
|
457
461
|
accept: ".jpg,.jpeg,.png,.webp,.gif",
|
|
458
462
|
hidden: "",
|
|
459
|
-
onChange:
|
|
463
|
+
onChange: E
|
|
460
464
|
}, null, 544)
|
|
461
465
|
], 64)) : r("", !0),
|
|
462
|
-
f.value ? (p(), i(e, { key: 1 }, [n[
|
|
466
|
+
f.value ? (p(), i(e, { key: 1 }, [n[2] ||= a("span", {
|
|
463
467
|
class: "kun-editor__toolbar-divider",
|
|
464
468
|
"aria-hidden": "true"
|
|
465
|
-
}, null, -1), o(
|
|
469
|
+
}, null, -1), o(Be)], 64)) : r("", !0)
|
|
466
470
|
]));
|
|
467
471
|
}
|
|
468
|
-
}),
|
|
472
|
+
}), Ye = /* @__PURE__ */ s({
|
|
469
473
|
__name: "ToolbarHost",
|
|
470
474
|
setup(e) {
|
|
471
475
|
let [, t] = O(), n = l(q, void 0), r = (e, n) => {
|
|
@@ -499,7 +503,7 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
499
503
|
};
|
|
500
504
|
return (e, t) => _(e.$slots, "default", u(c(a)));
|
|
501
505
|
}
|
|
502
|
-
}),
|
|
506
|
+
}), Xe = /* @__PURE__ */ s({
|
|
503
507
|
__name: "MarkdownSource",
|
|
504
508
|
props: {
|
|
505
509
|
modelValue: {},
|
|
@@ -507,13 +511,13 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
507
511
|
},
|
|
508
512
|
emits: ["update:modelValue"],
|
|
509
513
|
setup(e, { emit: t }) {
|
|
510
|
-
let n = e, r = t, a = h(null), o = null, s = (e) =>
|
|
514
|
+
let n = e, r = t, a = h(null), o = null, s = (e) => me.create({
|
|
511
515
|
doc: e,
|
|
512
516
|
extensions: [
|
|
513
517
|
ie(),
|
|
514
518
|
K.lineWrapping,
|
|
515
|
-
|
|
516
|
-
|
|
519
|
+
ge,
|
|
520
|
+
he(),
|
|
517
521
|
K.editable.of(!n.readonly),
|
|
518
522
|
K.updateListener.of((e) => {
|
|
519
523
|
e.docChanged && r("update:modelValue", e.state.doc.toString());
|
|
@@ -535,13 +539,13 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
535
539
|
class: "kun-editor__source"
|
|
536
540
|
}, null, 512));
|
|
537
541
|
}
|
|
538
|
-
}),
|
|
542
|
+
}), Ze = {
|
|
539
543
|
class: "kun-editor",
|
|
540
544
|
"data-kun-editor": ""
|
|
541
|
-
},
|
|
545
|
+
}, Qe = {
|
|
542
546
|
class: "kun-editor__toolbar",
|
|
543
547
|
role: "tablist"
|
|
544
|
-
},
|
|
548
|
+
}, $e = ["aria-selected", "data-active"], et = ["aria-selected", "data-active"], tt = { class: "kun-editor__wysiwyg" }, $ = /* @__PURE__ */ s({
|
|
545
549
|
__name: "KunEditor",
|
|
546
550
|
props: {
|
|
547
551
|
modelValue: {},
|
|
@@ -567,45 +571,51 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
567
571
|
return d.locale;
|
|
568
572
|
}
|
|
569
573
|
});
|
|
570
|
-
let g = h("wysiwyg"), x =
|
|
574
|
+
let g = h("wysiwyg"), x = (e) => {
|
|
575
|
+
g.value = e;
|
|
576
|
+
}, w = t(() => d.locale.toLowerCase().startsWith("en")), T = t(() => w.value ? {
|
|
571
577
|
wysiwyg: "Preview",
|
|
572
578
|
source: "Markdown"
|
|
573
579
|
} : {
|
|
574
580
|
wysiwyg: "预览",
|
|
575
581
|
source: "Markdown"
|
|
576
|
-
}),
|
|
582
|
+
}), D = (e) => f("update:modelValue", e), O = h(null);
|
|
577
583
|
return s({
|
|
578
|
-
insertQuote: (e) =>
|
|
579
|
-
insertMention: (e) =>
|
|
580
|
-
focus: () =>
|
|
581
|
-
}), (t, s) => (p(), i("div",
|
|
582
|
-
|
|
584
|
+
insertQuote: (e) => O.value?.insertQuote(e),
|
|
585
|
+
insertMention: (e) => O.value?.insertMention(e),
|
|
586
|
+
focus: () => O.value?.focus()
|
|
587
|
+
}), (t, s) => (p(), i("div", Ze, [
|
|
588
|
+
_(t.$slots, "view-switch", {
|
|
589
|
+
mode: g.value,
|
|
590
|
+
setMode: x,
|
|
591
|
+
labels: T.value
|
|
592
|
+
}, () => [a("div", Qe, [a("button", {
|
|
583
593
|
type: "button",
|
|
584
594
|
class: "kun-editor__tab",
|
|
585
595
|
"aria-selected": g.value === "wysiwyg",
|
|
586
596
|
"data-active": g.value === "wysiwyg",
|
|
587
|
-
onClick: s[0] ||= (e) =>
|
|
588
|
-
}, v(
|
|
597
|
+
onClick: s[0] ||= (e) => x("wysiwyg")
|
|
598
|
+
}, v(T.value.wysiwyg), 9, $e), a("button", {
|
|
589
599
|
type: "button",
|
|
590
600
|
class: "kun-editor__tab",
|
|
591
601
|
"aria-selected": g.value === "source",
|
|
592
602
|
"data-active": g.value === "source",
|
|
593
|
-
onClick: s[1] ||= (e) =>
|
|
594
|
-
}, v(
|
|
603
|
+
onClick: s[1] ||= (e) => x("source")
|
|
604
|
+
}, v(T.value.source), 9, et)])]),
|
|
595
605
|
o(y(E), null, {
|
|
596
606
|
default: S(() => [o(y(k), null, {
|
|
597
|
-
default: S(() => [C(a("div", null, [o(
|
|
598
|
-
default: S((e) => [_(t.$slots, "toolbar", u(c(e)), () => [o(
|
|
607
|
+
default: S(() => [C(a("div", null, [o(Ye, null, {
|
|
608
|
+
default: S((e) => [_(t.$slots, "toolbar", u(c(e)), () => [o(Je)])]),
|
|
599
609
|
_: 3
|
|
600
|
-
})], 512), [[b, g.value === "wysiwyg" && !e.readonly]]), C(a("div",
|
|
610
|
+
})], 512), [[b, g.value === "wysiwyg" && !e.readonly]]), C(a("div", tt, [o(Te, {
|
|
601
611
|
ref_key: "inner",
|
|
602
|
-
ref:
|
|
612
|
+
ref: O,
|
|
603
613
|
"model-value": e.modelValue,
|
|
604
614
|
adapters: e.adapters,
|
|
605
615
|
features: e.features,
|
|
606
616
|
locale: e.locale,
|
|
607
617
|
readonly: e.readonly,
|
|
608
|
-
"onUpdate:modelValue":
|
|
618
|
+
"onUpdate:modelValue": D
|
|
609
619
|
}, null, 8, [
|
|
610
620
|
"model-value",
|
|
611
621
|
"adapters",
|
|
@@ -617,16 +627,16 @@ var q = Symbol("kun-editor-context"), ve = [
|
|
|
617
627
|
})]),
|
|
618
628
|
_: 3
|
|
619
629
|
}),
|
|
620
|
-
g.value === "source" ? (p(), n(
|
|
630
|
+
g.value === "source" ? (p(), n(Xe, {
|
|
621
631
|
key: 0,
|
|
622
632
|
"model-value": e.modelValue,
|
|
623
633
|
readonly: e.readonly,
|
|
624
|
-
"onUpdate:modelValue":
|
|
634
|
+
"onUpdate:modelValue": D
|
|
625
635
|
}, null, 8, ["model-value", "readonly"])) : r("", !0)
|
|
626
636
|
]));
|
|
627
637
|
}
|
|
628
|
-
}),
|
|
638
|
+
}), nt = { install(e) {
|
|
629
639
|
e.component("KunEditor", $);
|
|
630
640
|
} };
|
|
631
641
|
//#endregion
|
|
632
|
-
export { Z as EMOJI, $ as KunEditor,
|
|
642
|
+
export { Z as EMOJI, $ as KunEditor, nt as KunEditorPlugin };
|
package/dist/types.d.ts
CHANGED
|
@@ -24,6 +24,17 @@ export interface KunEditorToolbarApi {
|
|
|
24
24
|
/** UI language, for localized labels. */
|
|
25
25
|
readonly locale: KunEditorLocale;
|
|
26
26
|
}
|
|
27
|
+
export interface KunEditorViewSwitchApi {
|
|
28
|
+
/** The active view. */
|
|
29
|
+
mode: 'wysiwyg' | 'source';
|
|
30
|
+
/** Switch the active view. */
|
|
31
|
+
setMode: (mode: 'wysiwyg' | 'source') => void;
|
|
32
|
+
/** Localized labels for the two views (respects the `locale` prop). */
|
|
33
|
+
labels: {
|
|
34
|
+
wysiwyg: string;
|
|
35
|
+
source: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
27
38
|
export interface KunEditorExpose {
|
|
28
39
|
/**
|
|
29
40
|
* Insert a reference atom at the cursor (`[label](kungal-reply:refId)`), then
|
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;AAM5B,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;IAC7C,uDAAuD;IACvD,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,0EAA0E;IAC1E,WAAW,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAChE,6CAA6C;IAC7C,aAAa,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAClE,gCAAgC;IAChC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;IACpC,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;CACjC;AASD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC5D;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC9D,gCAAgC;IAChC,KAAK,IAAI,IAAI,CAAA;CACd"}
|
|
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;AAM5B,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,IAAI,CAAA;IAC7C,uDAAuD;IACvD,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,0EAA0E;IAC1E,WAAW,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAChE,6CAA6C;IAC7C,aAAa,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAClE,gCAAgC;IAChC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;IACpC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAA;IACpC,yCAAyC;IACzC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;CACjC;AAMD,MAAM,WAAW,sBAAsB;IACrC,uBAAuB;IACvB,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAA;IAC1B,8BAA8B;IAC9B,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,QAAQ,KAAK,IAAI,CAAA;IAC7C,uEAAuE;IACvE,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5C;AASD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC5D;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC9D,gCAAgC;IAChC,KAAK,IAAI,IAAI,CAAA;CACd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/editor-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "KunEditor Vue 3 layer — the <KunEditor> component (dual WYSIWYG / markdown-source), toolbar and plugin views. Consumes @kungal/editor-core; pairs with @kungal/ui-vue.",
|
|
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.15.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.15.0"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "vite build && vue-tsc -p tsconfig.build.json",
|