@wirecore/wirelayer-vue 0.11.0 → 0.12.1
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/{CopyButton-GmqpUNLf.js → CopyButton-Cv9QfFfS.js} +22 -26
- package/dist/{Tree-B-0NXpUq.js → Tree-3o3OJASC.js} +10 -9
- package/dist/chart/Chart.vue.d.ts.map +1 -1
- package/dist/chart/PieChart.vue.d.ts.map +1 -1
- package/dist/chart/SeriesChartView.vue.d.ts.map +1 -1
- package/dist/chart/Sparkline.vue.d.ts.map +1 -1
- package/dist/chart/WaterfallChart.vue.d.ts.map +1 -1
- package/dist/chart.js +219 -218
- package/dist/code.js +1 -1
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
- package/dist/components/BlockUi/BlockUi.vue.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.vue.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/CopyButton/CopyButton.vue.d.ts.map +1 -1
- package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
- package/dist/components/Fieldset/Fieldset.vue.d.ts +2 -0
- package/dist/components/Fieldset/Fieldset.vue.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.vue.d.ts.map +1 -1
- package/dist/components/JsonViewer/JsonViewer.vue.d.ts +1 -1
- package/dist/components/JsonViewer/JsonViewer.vue.d.ts.map +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +1 -1
- package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +4 -0
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
- package/dist/components/LogViewer/LogViewer.vue.d.ts.map +1 -1
- package/dist/components/MeterGroup/MeterGroup.vue.d.ts.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/OrderList/OrderList.vue.d.ts.map +1 -1
- package/dist/components/OrgChart/OrgChart.vue.d.ts.map +1 -1
- package/dist/components/Panel/Panel.vue.d.ts.map +1 -1
- package/dist/components/PickList/PickList.vue.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts.map +1 -1
- package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
- package/dist/components/ScrollPanel/ScrollPanel.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts.map +1 -1
- package/dist/components/SignaturePad/SignaturePad.vue.d.ts.map +1 -1
- package/dist/components/Sortable/Sortable.vue.d.ts +9 -1
- package/dist/components/Sortable/Sortable.vue.d.ts.map +1 -1
- package/dist/components/SpeedDial/SpeedDial.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/Splitter/Splitter.vue.d.ts.map +1 -1
- package/dist/components/Spoiler/Spoiler.vue.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.vue.d.ts.map +1 -1
- package/dist/components/TableOfContents/TableOfContents.vue.d.ts.map +1 -1
- package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
- package/dist/components/Toolbar/Toolbar.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +12 -0
- package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
- package/dist/components/Tree/Tree.vue.d.ts +1 -1
- package/dist/components/Tree/Tree.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/data-table.js +1 -1
- package/dist/editor/Editor.vue.d.ts.map +1 -1
- package/dist/editor.js +347 -345
- package/dist/index.js +5235 -5187
- package/dist/pdf.js +1 -1
- package/dist/virtual/VirtualList.vue.d.ts.map +1 -1
- package/dist/virtual/VirtualTree.vue.d.ts.map +1 -1
- package/dist/virtual.js +171 -170
- package/llms-full.txt +66 -6
- package/package.json +2 -2
package/dist/editor.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { a as e, n as t } from "./recipes-BlM9aKyt.js";
|
|
2
2
|
import { t as n } from "./Button-BpMOPs8b.js";
|
|
3
3
|
import { t as r } from "./Checkbox-DS2qfQK1.js";
|
|
4
|
-
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f,
|
|
5
|
-
import { Baseline as
|
|
6
|
-
import { announce as
|
|
7
|
-
import { useFieldContext as
|
|
8
|
-
import { Details as
|
|
9
|
-
import
|
|
10
|
-
import { InvisibleCharacters as
|
|
11
|
-
import { TaskItem as
|
|
12
|
-
import { Mention as
|
|
13
|
-
import { Subscript as
|
|
14
|
-
import { Superscript as
|
|
15
|
-
import { TableKit as
|
|
16
|
-
import { TextAlign as
|
|
17
|
-
import { BackgroundColor as
|
|
18
|
-
import { CharacterCount as
|
|
19
|
-
import
|
|
20
|
-
import { EditorContent as
|
|
21
|
-
import { BubbleMenu as
|
|
22
|
-
import { Extension as
|
|
23
|
-
import { Plugin as
|
|
24
|
-
import { Decoration as
|
|
4
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as ee, nextTick as te, normalizeClass as p, normalizeStyle as ne, onBeforeUnmount as re, openBlock as m, ref as h, renderList as g, resolveDynamicComponent as ie, toDisplayString as _, unref as v, useAttrs as ae, useId as oe, useTemplateRef as y, vModelText as b, watch as se, withCtx as x, withDirectives as S, withKeys as ce, withModifiers as C } from "vue";
|
|
5
|
+
import { Baseline as le, Bold as ue, Code as de, CodeXml as fe, Heading2 as pe, Heading3 as me, Highlighter as he, Image as ge, Italic as _e, Link as ve, List as ye, ListChecks as be, ListCollapse as xe, ListOrdered as Se, Minus as Ce, Pilcrow as we, Redo2 as Te, SquareCode as Ee, Strikethrough as De, Subscript as Oe, Superscript as ke, Table as Ae, TextAlignCenter as je, TextAlignEnd as Me, TextAlignJustify as Ne, TextAlignStart as Pe, TextQuote as Fe, Underline as Ie, Undo2 as Le } from "@lucide/vue";
|
|
6
|
+
import { announce as Re, countText as ze, editor as Be, editorColorToken as Ve, editorColorTokens as He, editorColorValue as w, input as Ue, prose as We, sanitizeEditorHtml as Ge, toolbarIndexForKey as Ke } from "@wirecore/wirelayer-recipes";
|
|
7
|
+
import { useFieldContext as qe } from "@ark-ui/vue/field";
|
|
8
|
+
import { Details as Je, DetailsContent as Ye, DetailsSummary as Xe } from "@tiptap/extension-details";
|
|
9
|
+
import Ze from "@tiptap/extension-image";
|
|
10
|
+
import { InvisibleCharacters as Qe } from "@tiptap/extension-invisible-characters";
|
|
11
|
+
import { TaskItem as $e, TaskList as et } from "@tiptap/extension-list";
|
|
12
|
+
import { Mention as tt } from "@tiptap/extension-mention";
|
|
13
|
+
import { Subscript as nt } from "@tiptap/extension-subscript";
|
|
14
|
+
import { Superscript as rt } from "@tiptap/extension-superscript";
|
|
15
|
+
import { TableKit as it } from "@tiptap/extension-table";
|
|
16
|
+
import { TextAlign as at } from "@tiptap/extension-text-align";
|
|
17
|
+
import { BackgroundColor as ot, Color as st, TextStyle as ct } from "@tiptap/extension-text-style";
|
|
18
|
+
import { CharacterCount as lt, Placeholder as ut } from "@tiptap/extensions";
|
|
19
|
+
import dt from "@tiptap/starter-kit";
|
|
20
|
+
import { EditorContent as ft, useEditor as pt } from "@tiptap/vue-3";
|
|
21
|
+
import { BubbleMenu as mt, FloatingMenu as ht } from "@tiptap/vue-3/menus";
|
|
22
|
+
import { Extension as gt } from "@tiptap/core";
|
|
23
|
+
import { Plugin as _t, PluginKey as T } from "@tiptap/pm/state";
|
|
24
|
+
import { Decoration as vt, DecorationSet as yt } from "@tiptap/pm/view";
|
|
25
25
|
//#region src/editor/features.ts
|
|
26
|
-
var E = new T("wcImageUpload"),
|
|
26
|
+
var E = new T("wcImageUpload"), bt = gt.create({
|
|
27
27
|
name: "wcImageUpload",
|
|
28
28
|
addOptions: () => ({ className: "" }),
|
|
29
29
|
addProseMirrorPlugins() {
|
|
30
30
|
let e = this.options.className;
|
|
31
|
-
return [new
|
|
31
|
+
return [new _t({
|
|
32
32
|
key: E,
|
|
33
33
|
state: {
|
|
34
|
-
init: () =>
|
|
34
|
+
init: () => yt.empty,
|
|
35
35
|
apply(t, n) {
|
|
36
36
|
let r = n.map(t.mapping, t.doc), i = t.getMeta(E);
|
|
37
37
|
if (i && "add" in i) {
|
|
38
38
|
let n = document.createElement("img");
|
|
39
|
-
n.src = i.add.src, n.alt = "", n.className = e, r = r.add(t.doc, [
|
|
39
|
+
n.src = i.add.src, n.alt = "", n.className = e, r = r.add(t.doc, [vt.widget(i.add.pos, n, { id: i.add.id })]);
|
|
40
40
|
} else i && "remove" in i && (r = r.remove(r.find(void 0, void 0, (e) => e.id === i.remove)));
|
|
41
41
|
return r;
|
|
42
42
|
}
|
|
@@ -44,11 +44,11 @@ var E = new T("wcImageUpload"), yt = ht.create({
|
|
|
44
44
|
props: { decorations: (e) => E.getState(e) }
|
|
45
45
|
})];
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), D = 0, O = (e) => [...e ?? []].filter((e) => e.type.startsWith("image/"));
|
|
48
48
|
async function xt(e, t, n, r, i) {
|
|
49
49
|
let a = 0, o = 0;
|
|
50
50
|
await Promise.all(t.map(async (t) => {
|
|
51
|
-
let i = `upload-${++
|
|
51
|
+
let i = `upload-${++D}`, s = typeof URL.createObjectURL == "function" ? URL.createObjectURL(t) : "";
|
|
52
52
|
e.dispatch(e.state.tr.setMeta(E, { add: {
|
|
53
53
|
id: i,
|
|
54
54
|
pos: n,
|
|
@@ -73,11 +73,11 @@ async function xt(e, t, n, r, i) {
|
|
|
73
73
|
function St(e, t) {
|
|
74
74
|
return {
|
|
75
75
|
handlePaste(n, r) {
|
|
76
|
-
let i =
|
|
76
|
+
let i = O(r.clipboardData?.files), a = e();
|
|
77
77
|
return !i.length || !a ? !1 : (r.preventDefault(), xt(n, i, n.state.selection.from, a, t), !0);
|
|
78
78
|
},
|
|
79
79
|
handleDrop(n, r, i, a) {
|
|
80
|
-
let o =
|
|
80
|
+
let o = O(r.dataTransfer?.files), s = e();
|
|
81
81
|
return a || !o.length || !s ? !1 : (r.preventDefault(), xt(n, o, n.posAtCoords({
|
|
82
82
|
left: r.clientX,
|
|
83
83
|
top: r.clientY
|
|
@@ -97,7 +97,7 @@ function wt(e, t) {
|
|
|
97
97
|
let n = t.pos + 1 + t.text.length;
|
|
98
98
|
e.chain().focus().setTextSelection(n).scrollIntoView().run();
|
|
99
99
|
}
|
|
100
|
-
var
|
|
100
|
+
var k = {
|
|
101
101
|
open: !1,
|
|
102
102
|
items: [],
|
|
103
103
|
active: 0,
|
|
@@ -109,7 +109,7 @@ function Tt(e, t) {
|
|
|
109
109
|
char: "@",
|
|
110
110
|
items: async ({ query: t }) => await e()?.(t) ?? [],
|
|
111
111
|
render: () => {
|
|
112
|
-
let e =
|
|
112
|
+
let e = k, n, r = (n) => {
|
|
113
113
|
e = {
|
|
114
114
|
...e,
|
|
115
115
|
...n
|
|
@@ -153,7 +153,7 @@ function Tt(e, t) {
|
|
|
153
153
|
return t.key === "Escape" && (r({ open: !1 }), !0);
|
|
154
154
|
},
|
|
155
155
|
onExit: () => {
|
|
156
|
-
n = void 0, e =
|
|
156
|
+
n = void 0, e = k, t(k);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
}
|
|
@@ -161,7 +161,7 @@ function Tt(e, t) {
|
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/editor/tools.ts
|
|
164
|
-
var
|
|
164
|
+
var A = [
|
|
165
165
|
"bold",
|
|
166
166
|
"italic",
|
|
167
167
|
"underline",
|
|
@@ -182,31 +182,31 @@ var k = [
|
|
|
182
182
|
"|",
|
|
183
183
|
"undo",
|
|
184
184
|
"redo"
|
|
185
|
-
],
|
|
185
|
+
], j = (e, t = !1) => ({
|
|
186
186
|
aria: `Control+${t ? "Shift+" : ""}${e}`,
|
|
187
187
|
letter: e,
|
|
188
188
|
shift: t
|
|
189
|
-
}),
|
|
189
|
+
}), M = {
|
|
190
190
|
bold: {
|
|
191
|
-
shortcut:
|
|
191
|
+
shortcut: j("B"),
|
|
192
192
|
isActive: (e) => e.isActive("bold"),
|
|
193
193
|
can: (e) => e.can().toggleBold(),
|
|
194
194
|
run: (e) => e.chain().focus().toggleBold().run()
|
|
195
195
|
},
|
|
196
196
|
italic: {
|
|
197
|
-
shortcut:
|
|
197
|
+
shortcut: j("I"),
|
|
198
198
|
isActive: (e) => e.isActive("italic"),
|
|
199
199
|
can: (e) => e.can().toggleItalic(),
|
|
200
200
|
run: (e) => e.chain().focus().toggleItalic().run()
|
|
201
201
|
},
|
|
202
202
|
underline: {
|
|
203
|
-
shortcut:
|
|
203
|
+
shortcut: j("U"),
|
|
204
204
|
isActive: (e) => e.isActive("underline"),
|
|
205
205
|
can: (e) => e.can().toggleUnderline(),
|
|
206
206
|
run: (e) => e.chain().focus().toggleUnderline().run()
|
|
207
207
|
},
|
|
208
208
|
strike: {
|
|
209
|
-
shortcut:
|
|
209
|
+
shortcut: j("S", !0),
|
|
210
210
|
isActive: (e) => e.isActive("strike"),
|
|
211
211
|
can: (e) => e.can().toggleStrike(),
|
|
212
212
|
run: (e) => e.chain().focus().toggleStrike().run()
|
|
@@ -222,31 +222,31 @@ var k = [
|
|
|
222
222
|
run: (e) => e.chain().focus().toggleHeading({ level: 3 }).run()
|
|
223
223
|
},
|
|
224
224
|
bulletList: {
|
|
225
|
-
shortcut:
|
|
225
|
+
shortcut: j("8", !0),
|
|
226
226
|
isActive: (e) => e.isActive("bulletList"),
|
|
227
227
|
can: (e) => e.can().toggleBulletList(),
|
|
228
228
|
run: (e) => e.chain().focus().toggleBulletList().run()
|
|
229
229
|
},
|
|
230
230
|
orderedList: {
|
|
231
|
-
shortcut:
|
|
231
|
+
shortcut: j("7", !0),
|
|
232
232
|
isActive: (e) => e.isActive("orderedList"),
|
|
233
233
|
can: (e) => e.can().toggleOrderedList(),
|
|
234
234
|
run: (e) => e.chain().focus().toggleOrderedList().run()
|
|
235
235
|
},
|
|
236
236
|
taskList: {
|
|
237
|
-
shortcut:
|
|
237
|
+
shortcut: j("9", !0),
|
|
238
238
|
isActive: (e) => e.isActive("taskList"),
|
|
239
239
|
can: (e) => e.can().toggleTaskList(),
|
|
240
240
|
run: (e) => e.chain().focus().toggleTaskList().run()
|
|
241
241
|
},
|
|
242
242
|
blockquote: {
|
|
243
|
-
shortcut:
|
|
243
|
+
shortcut: j("B", !0),
|
|
244
244
|
isActive: (e) => e.isActive("blockquote"),
|
|
245
245
|
can: (e) => e.can().toggleBlockquote(),
|
|
246
246
|
run: (e) => e.chain().focus().toggleBlockquote().run()
|
|
247
247
|
},
|
|
248
248
|
code: {
|
|
249
|
-
shortcut:
|
|
249
|
+
shortcut: j("E"),
|
|
250
250
|
isActive: (e) => e.isActive("code"),
|
|
251
251
|
can: (e) => e.can().toggleCode(),
|
|
252
252
|
run: (e) => e.chain().focus().toggleCode().run()
|
|
@@ -276,19 +276,19 @@ var k = [
|
|
|
276
276
|
run: () => {}
|
|
277
277
|
},
|
|
278
278
|
undo: {
|
|
279
|
-
shortcut:
|
|
279
|
+
shortcut: j("Z"),
|
|
280
280
|
can: (e) => e.can().undo(),
|
|
281
281
|
run: (e) => e.chain().focus().undo().run()
|
|
282
282
|
},
|
|
283
283
|
redo: {
|
|
284
|
-
shortcut:
|
|
284
|
+
shortcut: j("Y"),
|
|
285
285
|
can: (e) => e.can().redo(),
|
|
286
286
|
run: (e) => e.chain().focus().redo().run()
|
|
287
287
|
},
|
|
288
|
-
alignLeft:
|
|
289
|
-
alignCenter:
|
|
290
|
-
alignRight:
|
|
291
|
-
alignJustify:
|
|
288
|
+
alignLeft: N("left", "L"),
|
|
289
|
+
alignCenter: N("center", "E"),
|
|
290
|
+
alignRight: N("right", "R"),
|
|
291
|
+
alignJustify: N("justify", "J"),
|
|
292
292
|
textColor: {
|
|
293
293
|
isActive: (e) => !!e.getAttributes("textStyle").color,
|
|
294
294
|
can: (e) => e.isEditable,
|
|
@@ -335,9 +335,9 @@ var k = [
|
|
|
335
335
|
run: () => {}
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
|
-
function
|
|
338
|
+
function N(e, t) {
|
|
339
339
|
return {
|
|
340
|
-
shortcut:
|
|
340
|
+
shortcut: j(t, !0),
|
|
341
341
|
isActive: (t) => t.isActive({ textAlign: e }),
|
|
342
342
|
can: (t) => t.can().setTextAlign(e),
|
|
343
343
|
run: (t) => t.chain().focus().setTextAlign(e).run()
|
|
@@ -347,13 +347,13 @@ function Et(e, t) {
|
|
|
347
347
|
let n = e.chain().focus().extendMarkRange("link");
|
|
348
348
|
t.trim() ? n.setLink({ href: t.trim() }).run() : n.unsetLink().run();
|
|
349
349
|
}
|
|
350
|
-
var
|
|
350
|
+
var P = [
|
|
351
351
|
"link",
|
|
352
352
|
"image",
|
|
353
353
|
"table",
|
|
354
354
|
"textColor",
|
|
355
355
|
"backgroundColor"
|
|
356
|
-
],
|
|
356
|
+
], F = (e) => P.includes(e), I = {
|
|
357
357
|
insertTable: {
|
|
358
358
|
can: (e) => !e.isActive("table") && e.can().insertTable({
|
|
359
359
|
rows: 3,
|
|
@@ -483,13 +483,13 @@ var At = [
|
|
|
483
483
|
"aria-selected",
|
|
484
484
|
"data-highlighted",
|
|
485
485
|
"onClick"
|
|
486
|
-
], $t = ["data-over"],
|
|
486
|
+
], $t = ["data-over"], L = /* @__PURE__ */ f({
|
|
487
487
|
inheritAttrs: !1,
|
|
488
488
|
__name: "Editor",
|
|
489
489
|
props: {
|
|
490
490
|
modelValue: { default: void 0 },
|
|
491
491
|
defaultValue: { default: "" },
|
|
492
|
-
toolbar: { default: () =>
|
|
492
|
+
toolbar: { default: () => A },
|
|
493
493
|
disabled: {
|
|
494
494
|
type: Boolean,
|
|
495
495
|
default: void 0
|
|
@@ -523,66 +523,66 @@ var At = [
|
|
|
523
523
|
classes: {}
|
|
524
524
|
},
|
|
525
525
|
emits: ["update:modelValue"],
|
|
526
|
-
setup(f, { emit:
|
|
527
|
-
let
|
|
528
|
-
let t =
|
|
529
|
-
return t ? `${
|
|
526
|
+
setup(f, { emit: gt }) {
|
|
527
|
+
let _t = e(), T = f, vt = t("input", Ue), yt = t("prose", We), E = gt, D = ae(), O = qe(), xt = t("editor", Be, () => T.classes), A = a(() => xt({ sticky: T.stickyToolbar })), j = vt({ size: "sm" }), N = oe(), P = _t.editor, L = (e) => {
|
|
528
|
+
let t = M[e].shortcut;
|
|
529
|
+
return t ? `${P[e]} (${P.shortcut(t.letter, t.shift)})` : P[e];
|
|
530
530
|
}, en = {
|
|
531
|
-
bold:
|
|
532
|
-
italic:
|
|
533
|
-
underline:
|
|
534
|
-
strike:
|
|
535
|
-
heading2:
|
|
536
|
-
heading3:
|
|
537
|
-
bulletList:
|
|
538
|
-
orderedList:
|
|
539
|
-
taskList:
|
|
540
|
-
blockquote:
|
|
541
|
-
code:
|
|
542
|
-
codeBlock:
|
|
543
|
-
horizontalRule:
|
|
544
|
-
link:
|
|
545
|
-
image:
|
|
546
|
-
table:
|
|
547
|
-
undo:
|
|
548
|
-
redo:
|
|
549
|
-
alignLeft:
|
|
550
|
-
alignCenter:
|
|
551
|
-
alignRight:
|
|
552
|
-
alignJustify:
|
|
553
|
-
textColor:
|
|
554
|
-
backgroundColor:
|
|
555
|
-
subscript:
|
|
556
|
-
superscript:
|
|
557
|
-
details:
|
|
558
|
-
invisibleCharacters:
|
|
559
|
-
source:
|
|
560
|
-
},
|
|
531
|
+
bold: ue,
|
|
532
|
+
italic: _e,
|
|
533
|
+
underline: Ie,
|
|
534
|
+
strike: De,
|
|
535
|
+
heading2: pe,
|
|
536
|
+
heading3: me,
|
|
537
|
+
bulletList: ye,
|
|
538
|
+
orderedList: Se,
|
|
539
|
+
taskList: be,
|
|
540
|
+
blockquote: Fe,
|
|
541
|
+
code: de,
|
|
542
|
+
codeBlock: Ee,
|
|
543
|
+
horizontalRule: Ce,
|
|
544
|
+
link: ve,
|
|
545
|
+
image: ge,
|
|
546
|
+
table: Ae,
|
|
547
|
+
undo: Le,
|
|
548
|
+
redo: Te,
|
|
549
|
+
alignLeft: Pe,
|
|
550
|
+
alignCenter: je,
|
|
551
|
+
alignRight: Me,
|
|
552
|
+
alignJustify: Ne,
|
|
553
|
+
textColor: le,
|
|
554
|
+
backgroundColor: he,
|
|
555
|
+
subscript: Oe,
|
|
556
|
+
superscript: ke,
|
|
557
|
+
details: xe,
|
|
558
|
+
invisibleCharacters: we,
|
|
559
|
+
source: fe
|
|
560
|
+
}, R = a(() => T.bubbleMenu === !0 ? At : T.bubbleMenu || []), z = a(() => T.floatingMenu === !0 ? jt : T.floatingMenu || []), tn = a(() => R.value.length > 0 || z.value.length > 0), nn = a(() => [.../* @__PURE__ */ new Set([
|
|
561
561
|
...T.toolbar.filter((e) => e !== "|"),
|
|
562
|
-
...
|
|
563
|
-
...
|
|
564
|
-
])]),
|
|
565
|
-
let e =
|
|
566
|
-
T.placeholder && t.push(
|
|
562
|
+
...R.value,
|
|
563
|
+
...z.value
|
|
564
|
+
])]), B = h(k), V = a(() => !!(T.disabled ?? O?.value.disabled)), rn = a(() => !!(T.invalid ?? O?.value.invalid)), an = a(() => {
|
|
565
|
+
let e = D["aria-label"], t = [A.value.content(), yt()];
|
|
566
|
+
T.placeholder && t.push(A.value.placeholder()), nn.value.includes("invisibleCharacters") && t.push(A.value.invisible());
|
|
567
567
|
let n = {
|
|
568
|
-
id: `${
|
|
568
|
+
id: `${N}content`,
|
|
569
569
|
role: "textbox",
|
|
570
570
|
"aria-multiline": "true",
|
|
571
571
|
class: t.join(" ")
|
|
572
572
|
};
|
|
573
|
-
return
|
|
573
|
+
return O?.value ? n["aria-labelledby"] = O.value.ids.label : e && (n["aria-label"] = e), O?.value.ariaDescribedby && (n["aria-describedby"] = O.value.ariaDescribedby), rn.value && (n["aria-invalid"] = "true"), O?.value.required && (n["aria-required"] = "true"), V.value && (n["aria-disabled"] = "true", n["data-disabled"] = ""), T.readonly && (n["aria-readonly"] = "true", n.tabindex = "0"), tn.value && (n["aria-keyshortcuts"] = "Alt+F10"), T.mentions && (n["aria-autocomplete"] = "list", B.value.open && (n["aria-controls"] = `${N}mentions`, B.value.items.length && (n["aria-activedescendant"] = `${N}mention${B.value.active}`))), n;
|
|
574
574
|
}), on = y("bubble"), sn = y("floating");
|
|
575
575
|
function cn() {
|
|
576
|
-
let e =
|
|
576
|
+
let e = W.value;
|
|
577
577
|
if (!e) return !1;
|
|
578
578
|
let t = e.state.selection.empty ? sn.value : on.value, n = t?.parentElement;
|
|
579
579
|
return !t || !n?.isConnected || n.style.visibility === "hidden" ? !1 : (t.querySelector("button:not(:disabled)")?.focus(), !0);
|
|
580
580
|
}
|
|
581
581
|
function ln(e) {
|
|
582
|
-
e.key === "Escape" ? (e.preventDefault(),
|
|
582
|
+
e.key === "Escape" ? (e.preventDefault(), W.value?.commands.focus()) : mn(e);
|
|
583
583
|
}
|
|
584
|
-
let
|
|
585
|
-
|
|
584
|
+
let H = [
|
|
585
|
+
dt.configure({
|
|
586
586
|
heading: { levels: [2, 3] },
|
|
587
587
|
link: {
|
|
588
588
|
openOnClick: !1,
|
|
@@ -590,123 +590,123 @@ var At = [
|
|
|
590
590
|
},
|
|
591
591
|
trailingNode: !1
|
|
592
592
|
}),
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
et,
|
|
594
|
+
$e.configure({
|
|
595
595
|
nested: !0,
|
|
596
|
-
a11y: { checkboxLabel: (e, t) =>
|
|
596
|
+
a11y: { checkboxLabel: (e, t) => P.taskItem(e.textContent, t) }
|
|
597
597
|
}),
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
598
|
+
it.configure({ table: { resizable: !1 } }),
|
|
599
|
+
Ze,
|
|
600
|
+
at.configure({ types: ["heading", "paragraph"] }),
|
|
601
|
+
ct,
|
|
601
602
|
st,
|
|
602
603
|
ot,
|
|
603
|
-
at,
|
|
604
|
-
tt,
|
|
605
604
|
nt,
|
|
606
|
-
|
|
605
|
+
rt,
|
|
606
|
+
Je.configure({
|
|
607
607
|
persist: !0,
|
|
608
608
|
renderToggleButton: ({ element: e, isOpen: t }) => {
|
|
609
|
-
e.setAttribute("aria-label",
|
|
609
|
+
e.setAttribute("aria-label", P.detailsToggle(t)), e.setAttribute("aria-expanded", String(t));
|
|
610
610
|
}
|
|
611
611
|
}),
|
|
612
|
+
Xe,
|
|
612
613
|
Ye,
|
|
613
|
-
|
|
614
|
-
Ze.configure({
|
|
614
|
+
Qe.configure({
|
|
615
615
|
visible: !1,
|
|
616
616
|
injectCSS: !1
|
|
617
617
|
}),
|
|
618
|
-
|
|
618
|
+
bt.configure({ className: A.value.uploading() })
|
|
619
619
|
];
|
|
620
|
-
T.placeholder &&
|
|
621
|
-
let
|
|
620
|
+
T.placeholder && H.push(ut.configure({ placeholder: () => T.placeholder ?? "" })), (T.counter || T.maxLength) && H.push(lt.configure({ limit: T.maxLength })), T.mentions && H.push(tt.configure({ suggestion: Tt(() => T.mentions, (e) => B.value = e) }));
|
|
621
|
+
let U = h(0), W = pt({
|
|
622
622
|
content: T.modelValue ?? T.defaultValue,
|
|
623
|
-
editable: !
|
|
624
|
-
extensions:
|
|
623
|
+
editable: !V.value && !T.readonly,
|
|
624
|
+
extensions: H,
|
|
625
625
|
editorProps: {
|
|
626
626
|
attributes: an.value,
|
|
627
627
|
handleKeyDown: (e, t) => t.altKey && t.key === "F10" && cn(),
|
|
628
|
-
...St(() => T.uploadImage, ({ inserted: e, failed: t }) =>
|
|
628
|
+
...St(() => T.uploadImage, ({ inserted: e, failed: t }) => Re(t ? P.imageFailed : e ? P.imageUploaded : ""))
|
|
629
629
|
},
|
|
630
630
|
onUpdate: ({ editor: e }) => E("update:modelValue", e.isEmpty ? "" : e.getHTML()),
|
|
631
|
-
onTransaction: () =>
|
|
631
|
+
onTransaction: () => U.value++
|
|
632
632
|
});
|
|
633
|
-
|
|
634
|
-
let t =
|
|
633
|
+
se(an, (e) => W.value?.setOptions({ editorProps: { attributes: e } })), se([V, () => T.readonly], ([e, t]) => W.value?.setEditable(!e && !t)), se(() => T.modelValue, (e) => {
|
|
634
|
+
let t = W.value;
|
|
635
635
|
t && e !== void 0 && e !== (t.isEmpty ? "" : t.getHTML()) && t.commands.setContent(e, { emitUpdate: !1 });
|
|
636
|
-
}),
|
|
637
|
-
let
|
|
636
|
+
}), re(() => W.value?.destroy());
|
|
637
|
+
let G = h(!1), K = h(""), un = y("sourceField");
|
|
638
638
|
function dn() {
|
|
639
|
-
let e =
|
|
640
|
-
e && (
|
|
639
|
+
let e = W.value;
|
|
640
|
+
e && (G.value ? (G.value = !1, e.commands.setContent(Ge(K.value), { emitUpdate: !0 }), e.commands.focus()) : (K.value = e.isEmpty ? "" : e.getHTML(), G.value = !0, te(() => un.value?.focus())));
|
|
641
641
|
}
|
|
642
|
-
let
|
|
643
|
-
|
|
644
|
-
let e =
|
|
642
|
+
let q = a(() => {
|
|
643
|
+
U.value;
|
|
644
|
+
let e = W.value;
|
|
645
645
|
return Object.fromEntries(nn.value.map((t) => [t, {
|
|
646
|
-
active: t === "source" ?
|
|
647
|
-
disabled: !e ||
|
|
646
|
+
active: t === "source" ? G.value : !!e && !!M[t].isActive?.(e),
|
|
647
|
+
disabled: !e || V.value || !!T.readonly || G.value && t !== "source" || !M[t].can(e)
|
|
648
648
|
}]));
|
|
649
|
-
}), fn = a(() => T.toolbar.filter((e) => e !== "|")),
|
|
649
|
+
}), fn = a(() => T.toolbar.filter((e) => e !== "|")), J = h(), pn = a(() => J.value && !q.value[J.value]?.disabled ? J.value : fn.value.find((e) => !q.value[e].disabled));
|
|
650
650
|
function mn(e) {
|
|
651
|
-
let t = [...e.currentTarget.querySelectorAll("button:not(:disabled)")], n =
|
|
651
|
+
let t = [...e.currentTarget.querySelectorAll("button:not(:disabled)")], n = Ke(e.key, t.indexOf(e.target), t.length, e.currentTarget);
|
|
652
652
|
n !== void 0 && (e.preventDefault(), t[n]?.focus());
|
|
653
653
|
}
|
|
654
|
-
let
|
|
655
|
-
async function
|
|
656
|
-
if (hn.value = t,
|
|
657
|
-
|
|
658
|
-
let n =
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
function wn() {
|
|
662
|
-
J.value = null, hn.value?.focus();
|
|
654
|
+
let Y = h(null), hn = h(), X = h(""), gn = y("linkField"), Z = h(""), Q = h(""), $ = h(!1), _n = h(!1), vn = y("imageAltField"), yn = h(!1), bn = y("imageField"), xn = y("fileInput"), Sn = y("tableBar"), Cn = y("colorBar");
|
|
655
|
+
async function wn(e, t) {
|
|
656
|
+
if (hn.value = t, Y.value === e) return Tn();
|
|
657
|
+
X.value = W.value?.getAttributes("link").href ?? "";
|
|
658
|
+
let n = W.value ? Ot(W.value) : null;
|
|
659
|
+
_n.value = !!n, Z.value = n?.src ?? "", Q.value = n?.alt ?? "", $.value = !!n && !n.alt, Y.value = e, await te(), e === "link" ? gn.value?.focus() : e === "image" ? (_n.value ? vn : bn).value?.focus() : e === "table" ? Sn.value?.querySelector("button:not(:disabled)")?.focus() : Cn.value?.querySelector("[aria-pressed=true]")?.focus();
|
|
663
660
|
}
|
|
664
|
-
function Tn(
|
|
665
|
-
|
|
661
|
+
function Tn() {
|
|
662
|
+
Y.value = null, hn.value?.focus();
|
|
666
663
|
}
|
|
667
664
|
function En(e) {
|
|
668
|
-
|
|
665
|
+
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), e.stopPropagation(), Tn());
|
|
666
|
+
}
|
|
667
|
+
function Dn(e) {
|
|
668
|
+
W.value && Et(W.value, e), Y.value = null;
|
|
669
669
|
}
|
|
670
|
-
let
|
|
671
|
-
function
|
|
672
|
-
|
|
670
|
+
let On = a(() => !!Z.value.trim() && (!!Q.value.trim() || $.value));
|
|
671
|
+
function kn() {
|
|
672
|
+
W.value && On.value && ((_n.value ? kt : Dt)(W.value, Z.value, $.value ? "" : Q.value.trim()), Y.value = null);
|
|
673
673
|
}
|
|
674
|
-
async function
|
|
674
|
+
async function An(e) {
|
|
675
675
|
let t = e.target.files?.[0];
|
|
676
676
|
if (t && T.uploadImage) {
|
|
677
|
-
|
|
677
|
+
yn.value = !0;
|
|
678
678
|
try {
|
|
679
|
-
|
|
679
|
+
Z.value = await T.uploadImage(t);
|
|
680
680
|
} finally {
|
|
681
|
-
|
|
681
|
+
yn.value = !1;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
let
|
|
686
|
-
|
|
687
|
-
let e =
|
|
688
|
-
return Object.fromEntries(Object.keys(
|
|
685
|
+
let jn = a(() => {
|
|
686
|
+
U.value;
|
|
687
|
+
let e = W.value;
|
|
688
|
+
return Object.fromEntries(Object.keys(I).map((t) => [t, !e || V.value || !I[t].can(e)]));
|
|
689
689
|
});
|
|
690
|
-
function
|
|
691
|
-
|
|
690
|
+
function Mn(e) {
|
|
691
|
+
W.value && I[e].run(W.value);
|
|
692
692
|
}
|
|
693
|
-
let
|
|
694
|
-
|
|
695
|
-
let e =
|
|
693
|
+
let Nn = a(() => {
|
|
694
|
+
U.value;
|
|
695
|
+
let e = W.value?.getAttributes("textStyle") ?? {};
|
|
696
696
|
return {
|
|
697
|
-
textColor:
|
|
698
|
-
backgroundColor:
|
|
697
|
+
textColor: Ve(e.color),
|
|
698
|
+
backgroundColor: Ve(e.backgroundColor)
|
|
699
699
|
};
|
|
700
700
|
});
|
|
701
|
-
function
|
|
702
|
-
let n =
|
|
701
|
+
function Pn(e, t) {
|
|
702
|
+
let n = W.value;
|
|
703
703
|
if (!n) return;
|
|
704
704
|
let r = n.chain().focus();
|
|
705
|
-
e === "textColor" ? (t ? r.setColor(w(t, "text")) : r.unsetColor()).run() : (t ? r.setBackgroundColor(w(t, "background")) : r.unsetBackgroundColor()).run(),
|
|
705
|
+
e === "textColor" ? (t ? r.setColor(w(t, "text")) : r.unsetColor()).run() : (t ? r.setBackgroundColor(w(t, "background")) : r.unsetBackgroundColor()).run(), Y.value = null;
|
|
706
706
|
}
|
|
707
|
-
let
|
|
708
|
-
|
|
709
|
-
let e =
|
|
707
|
+
let Fn = (e, t) => e === "textColor" ? { color: w(t, "text") } : { backgroundColor: w(t, "background") }, In = a(() => {
|
|
708
|
+
U.value;
|
|
709
|
+
let e = W.value;
|
|
710
710
|
if (!e) return {
|
|
711
711
|
characters: 0,
|
|
712
712
|
words: 0
|
|
@@ -715,348 +715,350 @@ var At = [
|
|
|
715
715
|
return t ? {
|
|
716
716
|
characters: t.characters(),
|
|
717
717
|
words: t.words()
|
|
718
|
-
} :
|
|
719
|
-
}),
|
|
720
|
-
function
|
|
718
|
+
} : ze(e.state.doc.textContent);
|
|
719
|
+
}), Ln = a(() => T.maxLength !== void 0 && In.value.characters >= T.maxLength), Rn = a(() => (U.value, T.tableOfContents && W.value ? Ct(W.value) : []));
|
|
720
|
+
function zn(e, t) {
|
|
721
721
|
if (e === "source") return dn();
|
|
722
|
-
if (
|
|
723
|
-
|
|
722
|
+
if (F(e)) return wn(e, t.currentTarget);
|
|
723
|
+
W.value && M[e].run(W.value);
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
|
|
725
|
+
function Bn(e) {
|
|
726
|
+
B.value.choose?.(e);
|
|
727
727
|
}
|
|
728
|
-
return (e, t) => (m(), c("div", {
|
|
729
|
-
|
|
730
|
-
|
|
728
|
+
return (e, t) => (m(), c("div", ee({
|
|
729
|
+
...v(D),
|
|
730
|
+
"aria-label": void 0,
|
|
731
|
+
class: A.value.base({ class: p(v(D).class) })
|
|
732
|
+
}, {
|
|
731
733
|
"data-invalid": rn.value || void 0,
|
|
732
|
-
"data-disabled":
|
|
733
|
-
}, [
|
|
734
|
+
"data-disabled": V.value || void 0
|
|
735
|
+
}), [
|
|
734
736
|
f.readonly ? s("", !0) : (m(), c("div", {
|
|
735
737
|
key: 0,
|
|
736
738
|
role: "toolbar",
|
|
737
|
-
"aria-label": v(
|
|
738
|
-
class: p(
|
|
739
|
+
"aria-label": v(P).toolbar,
|
|
740
|
+
class: p(A.value.toolbar()),
|
|
739
741
|
onKeydown: mn
|
|
740
742
|
}, [(m(!0), c(i, null, g(f.toolbar, (e, n) => (m(), c(i, { key: n }, [e === "|" ? (m(), c("span", {
|
|
741
743
|
key: 0,
|
|
742
744
|
role: "separator",
|
|
743
745
|
"aria-orientation": "vertical",
|
|
744
|
-
class: p(
|
|
746
|
+
class: p(A.value.separator())
|
|
745
747
|
}, null, 2)) : (m(), c("button", {
|
|
746
748
|
key: 1,
|
|
747
749
|
type: "button",
|
|
748
|
-
class: p(
|
|
749
|
-
"aria-label": v(
|
|
750
|
-
title:
|
|
751
|
-
"aria-keyshortcuts": v(
|
|
752
|
-
"aria-pressed": v(
|
|
753
|
-
"aria-expanded": v(
|
|
754
|
-
"aria-controls": v(
|
|
755
|
-
disabled:
|
|
750
|
+
class: p(A.value.tool()),
|
|
751
|
+
"aria-label": v(P)[e],
|
|
752
|
+
title: L(e),
|
|
753
|
+
"aria-keyshortcuts": v(M)[e].shortcut?.aria,
|
|
754
|
+
"aria-pressed": v(M)[e].isActive && !v(F)(e) ? q.value[e].active : void 0,
|
|
755
|
+
"aria-expanded": v(F)(e) ? Y.value === e : void 0,
|
|
756
|
+
"aria-controls": v(F)(e) && Y.value === e ? `${v(N)}${e}` : void 0,
|
|
757
|
+
disabled: q.value[e].disabled,
|
|
756
758
|
tabindex: e === pn.value ? 0 : -1,
|
|
757
|
-
onFocus: (t) =>
|
|
759
|
+
onFocus: (t) => J.value = e,
|
|
758
760
|
onMousedown: t[0] ||= C(() => {}, ["prevent"]),
|
|
759
|
-
onClick: (t) =>
|
|
760
|
-
}, [(m(), o(
|
|
761
|
-
class: p(
|
|
761
|
+
onClick: (t) => zn(e, t)
|
|
762
|
+
}, [(m(), o(ie(en[e]), {
|
|
763
|
+
class: p(A.value.toolIcon()),
|
|
762
764
|
"aria-hidden": "true"
|
|
763
765
|
}, null, 8, ["class"]))], 42, Pt))], 64))), 128))], 42, Nt)),
|
|
764
|
-
|
|
766
|
+
Y.value === "link" ? (m(), c("div", {
|
|
765
767
|
key: 1,
|
|
766
|
-
id: `${v(
|
|
767
|
-
class: p(
|
|
768
|
-
onKeydown:
|
|
768
|
+
id: `${v(N)}link`,
|
|
769
|
+
class: p(A.value.linkBar()),
|
|
770
|
+
onKeydown: En
|
|
769
771
|
}, [
|
|
770
|
-
l("div", { class: p(v(
|
|
772
|
+
l("div", { class: p(v(j).base({ class: A.value.linkField() })) }, [S(l("input", {
|
|
771
773
|
ref_key: "linkField",
|
|
772
774
|
ref: gn,
|
|
773
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
775
|
+
"onUpdate:modelValue": t[1] ||= (e) => X.value = e,
|
|
774
776
|
type: "url",
|
|
775
777
|
placeholder: "https://",
|
|
776
|
-
"aria-label": v(
|
|
777
|
-
class: p(v(
|
|
778
|
-
onKeydown: t[2] ||=
|
|
779
|
-
}, null, 42, It), [[b,
|
|
778
|
+
"aria-label": v(P).linkUrl,
|
|
779
|
+
class: p(v(j).control()),
|
|
780
|
+
onKeydown: t[2] ||= ce(C((e) => Dn(X.value), ["prevent"]), ["enter"])
|
|
781
|
+
}, null, 42, It), [[b, X.value]])], 2),
|
|
780
782
|
d(n, {
|
|
781
783
|
size: "sm",
|
|
782
|
-
onClick: t[3] ||= (e) =>
|
|
784
|
+
onClick: t[3] ||= (e) => Dn(X.value)
|
|
783
785
|
}, {
|
|
784
|
-
default: x(() => [u(_(v(
|
|
786
|
+
default: x(() => [u(_(v(P).linkApply), 1)]),
|
|
785
787
|
_: 1
|
|
786
788
|
}),
|
|
787
|
-
|
|
789
|
+
q.value.link?.active ? (m(), o(n, {
|
|
788
790
|
key: 0,
|
|
789
791
|
size: "sm",
|
|
790
792
|
variant: "outline",
|
|
791
|
-
onClick: t[4] ||= (e) =>
|
|
793
|
+
onClick: t[4] ||= (e) => Dn("")
|
|
792
794
|
}, {
|
|
793
|
-
default: x(() => [u(_(v(
|
|
795
|
+
default: x(() => [u(_(v(P).linkRemove), 1)]),
|
|
794
796
|
_: 1
|
|
795
797
|
})) : s("", !0),
|
|
796
798
|
d(n, {
|
|
797
799
|
size: "sm",
|
|
798
800
|
variant: "text",
|
|
799
|
-
onClick:
|
|
801
|
+
onClick: Tn
|
|
800
802
|
}, {
|
|
801
|
-
default: x(() => [u(_(v(
|
|
803
|
+
default: x(() => [u(_(v(P).linkCancel), 1)]),
|
|
802
804
|
_: 1
|
|
803
805
|
})
|
|
804
806
|
], 42, Ft)) : s("", !0),
|
|
805
|
-
|
|
807
|
+
Y.value === "image" ? (m(), c("div", {
|
|
806
808
|
key: 2,
|
|
807
|
-
id: `${v(
|
|
808
|
-
class: p(
|
|
809
|
-
onKeydown:
|
|
809
|
+
id: `${v(N)}image`,
|
|
810
|
+
class: p(A.value.linkBar()),
|
|
811
|
+
onKeydown: En
|
|
810
812
|
}, [
|
|
811
|
-
l("div", { class: p(v(
|
|
813
|
+
l("div", { class: p(v(j).base({ class: A.value.linkField() })) }, [S(l("input", {
|
|
812
814
|
ref_key: "imageField",
|
|
813
|
-
ref:
|
|
814
|
-
"onUpdate:modelValue": t[5] ||= (e) =>
|
|
815
|
+
ref: bn,
|
|
816
|
+
"onUpdate:modelValue": t[5] ||= (e) => Z.value = e,
|
|
815
817
|
type: "url",
|
|
816
818
|
placeholder: "https://",
|
|
817
|
-
"aria-label": v(
|
|
818
|
-
class: p(v(
|
|
819
|
-
onKeydown:
|
|
820
|
-
}, null, 42, Rt), [[b,
|
|
821
|
-
l("div", { class: p(v(
|
|
819
|
+
"aria-label": v(P).imageUrl,
|
|
820
|
+
class: p(v(j).control()),
|
|
821
|
+
onKeydown: ce(C(kn, ["prevent"]), ["enter"])
|
|
822
|
+
}, null, 42, Rt), [[b, Z.value]])], 2),
|
|
823
|
+
l("div", { class: p(v(j).base({ class: A.value.imageAlt() })) }, [S(l("input", {
|
|
822
824
|
ref_key: "imageAltField",
|
|
823
|
-
ref:
|
|
824
|
-
"onUpdate:modelValue": t[6] ||= (e) =>
|
|
825
|
+
ref: vn,
|
|
826
|
+
"onUpdate:modelValue": t[6] ||= (e) => Q.value = e,
|
|
825
827
|
type: "text",
|
|
826
|
-
placeholder: v(
|
|
827
|
-
"aria-label": v(
|
|
828
|
-
disabled:
|
|
829
|
-
class: p(v(
|
|
830
|
-
onKeydown:
|
|
831
|
-
}, null, 42, zt), [[b,
|
|
828
|
+
placeholder: v(P).imageAlt,
|
|
829
|
+
"aria-label": v(P).imageAlt,
|
|
830
|
+
disabled: $.value,
|
|
831
|
+
class: p(v(j).control()),
|
|
832
|
+
onKeydown: ce(C(kn, ["prevent"]), ["enter"])
|
|
833
|
+
}, null, 42, zt), [[b, Q.value]])], 2),
|
|
832
834
|
d(r, {
|
|
833
|
-
checked:
|
|
834
|
-
"onUpdate:checked": t[7] ||= (e) =>
|
|
835
|
+
checked: $.value,
|
|
836
|
+
"onUpdate:checked": t[7] ||= (e) => $.value = e === !0
|
|
835
837
|
}, {
|
|
836
|
-
default: x(() => [u(_(v(
|
|
838
|
+
default: x(() => [u(_(v(P).imageDecorative), 1)]),
|
|
837
839
|
_: 1
|
|
838
840
|
}, 8, ["checked"]),
|
|
839
841
|
f.uploadImage ? (m(), c(i, { key: 0 }, [l("input", {
|
|
840
842
|
ref_key: "fileInput",
|
|
841
|
-
ref:
|
|
843
|
+
ref: xn,
|
|
842
844
|
type: "file",
|
|
843
845
|
accept: "image/*",
|
|
844
846
|
tabindex: "-1",
|
|
845
847
|
"aria-hidden": "true",
|
|
846
|
-
class: p(
|
|
847
|
-
onChange:
|
|
848
|
+
class: p(A.value.fileInput()),
|
|
849
|
+
onChange: An
|
|
848
850
|
}, null, 34), d(n, {
|
|
849
851
|
size: "sm",
|
|
850
852
|
variant: "outline",
|
|
851
|
-
loading:
|
|
852
|
-
onClick: t[8] ||= (e) =>
|
|
853
|
+
loading: yn.value,
|
|
854
|
+
onClick: t[8] ||= (e) => xn.value?.click()
|
|
853
855
|
}, {
|
|
854
|
-
default: x(() => [u(_(v(
|
|
856
|
+
default: x(() => [u(_(v(P).imageUpload), 1)]),
|
|
855
857
|
_: 1
|
|
856
858
|
}, 8, ["loading"])], 64)) : s("", !0),
|
|
857
859
|
d(n, {
|
|
858
860
|
size: "sm",
|
|
859
|
-
disabled: !
|
|
860
|
-
onClick:
|
|
861
|
+
disabled: !On.value,
|
|
862
|
+
onClick: kn
|
|
861
863
|
}, {
|
|
862
|
-
default: x(() => [u(_(
|
|
864
|
+
default: x(() => [u(_(_n.value ? v(P).imageUpdate : v(P).imageInsert), 1)]),
|
|
863
865
|
_: 1
|
|
864
866
|
}, 8, ["disabled"]),
|
|
865
867
|
d(n, {
|
|
866
868
|
size: "sm",
|
|
867
869
|
variant: "text",
|
|
868
|
-
onClick:
|
|
870
|
+
onClick: Tn
|
|
869
871
|
}, {
|
|
870
|
-
default: x(() => [u(_(v(
|
|
872
|
+
default: x(() => [u(_(v(P).linkCancel), 1)]),
|
|
871
873
|
_: 1
|
|
872
874
|
})
|
|
873
875
|
], 42, Lt)) : s("", !0),
|
|
874
|
-
|
|
876
|
+
Y.value === "table" ? (m(), c("div", {
|
|
875
877
|
key: 3,
|
|
876
|
-
id: `${v(
|
|
878
|
+
id: `${v(N)}table`,
|
|
877
879
|
ref_key: "tableBar",
|
|
878
|
-
ref:
|
|
880
|
+
ref: Sn,
|
|
879
881
|
role: "group",
|
|
880
|
-
"aria-label": v(
|
|
881
|
-
class: p(
|
|
882
|
-
onKeydown:
|
|
883
|
-
}, [(m(!0), c(i, null, g(Object.keys(v(
|
|
882
|
+
"aria-label": v(P).tableBar,
|
|
883
|
+
class: p(A.value.linkBar()),
|
|
884
|
+
onKeydown: En
|
|
885
|
+
}, [(m(!0), c(i, null, g(Object.keys(v(I)), (e) => (m(), o(n, {
|
|
884
886
|
key: e,
|
|
885
887
|
size: "sm",
|
|
886
888
|
variant: e === "insertTable" ? "primary" : e === "deleteTable" ? "outline" : "text",
|
|
887
|
-
disabled:
|
|
889
|
+
disabled: jn.value[e],
|
|
888
890
|
onMousedown: t[9] ||= C(() => {}, ["prevent"]),
|
|
889
|
-
onClick: (t) =>
|
|
891
|
+
onClick: (t) => Mn(e)
|
|
890
892
|
}, {
|
|
891
|
-
default: x(() => [u(_(v(
|
|
893
|
+
default: x(() => [u(_(v(P).tableActions[e]), 1)]),
|
|
892
894
|
_: 2
|
|
893
895
|
}, 1032, [
|
|
894
896
|
"variant",
|
|
895
897
|
"disabled",
|
|
896
898
|
"onClick"
|
|
897
899
|
]))), 128))], 42, Bt)) : s("", !0),
|
|
898
|
-
|
|
900
|
+
Y.value === "textColor" || Y.value === "backgroundColor" ? (m(), c("div", {
|
|
899
901
|
key: 4,
|
|
900
|
-
id: `${v(
|
|
902
|
+
id: `${v(N)}${Y.value}`,
|
|
901
903
|
ref_key: "colorBar",
|
|
902
|
-
ref:
|
|
904
|
+
ref: Cn,
|
|
903
905
|
role: "group",
|
|
904
|
-
"aria-label": v(
|
|
905
|
-
class: p(
|
|
906
|
-
onKeydown:
|
|
906
|
+
"aria-label": v(P)[Y.value],
|
|
907
|
+
class: p(A.value.palette()),
|
|
908
|
+
onKeydown: En
|
|
907
909
|
}, [
|
|
908
910
|
l("span", {
|
|
909
|
-
class: p(
|
|
911
|
+
class: p(A.value.paletteLabel()),
|
|
910
912
|
"aria-hidden": "true"
|
|
911
|
-
}, _(v(
|
|
913
|
+
}, _(v(P)[Y.value]), 3),
|
|
912
914
|
l("button", {
|
|
913
915
|
type: "button",
|
|
914
|
-
class: p(
|
|
915
|
-
"aria-label": v(
|
|
916
|
-
title: v(
|
|
917
|
-
"aria-pressed": !
|
|
916
|
+
class: p(A.value.swatch()),
|
|
917
|
+
"aria-label": v(P).colorDefault,
|
|
918
|
+
title: v(P).colorDefault,
|
|
919
|
+
"aria-pressed": !Nn.value[Y.value],
|
|
918
920
|
onMousedown: t[10] ||= C(() => {}, ["prevent"]),
|
|
919
|
-
onClick: t[11] ||= (e) =>
|
|
921
|
+
onClick: t[11] ||= (e) => Pn(Y.value, void 0)
|
|
920
922
|
}, " A ", 42, Ht),
|
|
921
|
-
(m(!0), c(i, null, g(v(
|
|
923
|
+
(m(!0), c(i, null, g(v(He), (e) => (m(), c("button", {
|
|
922
924
|
key: e,
|
|
923
925
|
type: "button",
|
|
924
|
-
class: p(
|
|
925
|
-
style:
|
|
926
|
-
"aria-label": v(
|
|
927
|
-
title: v(
|
|
928
|
-
"aria-pressed":
|
|
926
|
+
class: p(A.value.swatch()),
|
|
927
|
+
style: ne(Fn(Y.value, e)),
|
|
928
|
+
"aria-label": v(P).colors[e],
|
|
929
|
+
title: v(P).colors[e],
|
|
930
|
+
"aria-pressed": Nn.value[Y.value] === e,
|
|
929
931
|
onMousedown: t[12] ||= C(() => {}, ["prevent"]),
|
|
930
|
-
onClick: (t) =>
|
|
932
|
+
onClick: (t) => Pn(Y.value, e)
|
|
931
933
|
}, " A ", 46, Ut))), 128))
|
|
932
934
|
], 42, Vt)) : s("", !0),
|
|
933
|
-
f.tableOfContents &&
|
|
935
|
+
f.tableOfContents && Rn.value.length ? (m(), c("nav", {
|
|
934
936
|
key: 5,
|
|
935
|
-
"aria-label": v(
|
|
936
|
-
class: p(
|
|
937
|
+
"aria-label": v(P).tableOfContents,
|
|
938
|
+
class: p(A.value.toc())
|
|
937
939
|
}, [l("span", {
|
|
938
|
-
class: p(
|
|
940
|
+
class: p(A.value.tocTitle()),
|
|
939
941
|
"aria-hidden": "true"
|
|
940
|
-
}, _(v(
|
|
942
|
+
}, _(v(P).tableOfContents), 3), l("ul", { class: p(A.value.tocList()) }, [(m(!0), c(i, null, g(Rn.value, (e) => (m(), c("li", { key: e.pos }, [l("button", {
|
|
941
943
|
type: "button",
|
|
942
|
-
class: p(
|
|
944
|
+
class: p(A.value.tocLink()),
|
|
943
945
|
"data-level": e.level,
|
|
944
|
-
onClick: (t) => v(
|
|
946
|
+
onClick: (t) => v(W) && v(wt)(v(W), e)
|
|
945
947
|
}, _(e.text), 11, Gt)]))), 128))], 2)], 10, Wt)) : s("", !0),
|
|
946
|
-
|
|
948
|
+
G.value ? S((m(), c("textarea", {
|
|
947
949
|
key: 6,
|
|
948
950
|
ref_key: "sourceField",
|
|
949
951
|
ref: un,
|
|
950
|
-
"onUpdate:modelValue": t[13] ||= (e) =>
|
|
951
|
-
class: p(
|
|
952
|
-
"aria-label": v(
|
|
952
|
+
"onUpdate:modelValue": t[13] ||= (e) => K.value = e,
|
|
953
|
+
class: p(A.value.source()),
|
|
954
|
+
"aria-label": v(P).sourceField,
|
|
953
955
|
spellcheck: "false"
|
|
954
|
-
}, null, 10, Kt)), [[b,
|
|
955
|
-
d(v(
|
|
956
|
-
editor: v(
|
|
957
|
-
hidden:
|
|
956
|
+
}, null, 10, Kt)), [[b, K.value]]) : s("", !0),
|
|
957
|
+
d(v(ft), {
|
|
958
|
+
editor: v(W),
|
|
959
|
+
hidden: G.value || void 0
|
|
958
960
|
}, null, 8, ["editor", "hidden"]),
|
|
959
|
-
v(
|
|
961
|
+
v(W) && R.value.length ? (m(), o(v(mt), {
|
|
960
962
|
key: 7,
|
|
961
|
-
editor: v(
|
|
963
|
+
editor: v(W)
|
|
962
964
|
}, {
|
|
963
965
|
default: x(() => [l("div", {
|
|
964
966
|
ref_key: "bubble",
|
|
965
967
|
ref: on,
|
|
966
968
|
role: "toolbar",
|
|
967
|
-
"aria-label": v(
|
|
968
|
-
class: p(
|
|
969
|
+
"aria-label": v(P).bubbleMenu,
|
|
970
|
+
class: p(A.value.menu()),
|
|
969
971
|
onKeydown: ln
|
|
970
|
-
}, [(m(!0), c(i, null, g(
|
|
972
|
+
}, [(m(!0), c(i, null, g(R.value, (e, n) => (m(), c("button", {
|
|
971
973
|
key: e,
|
|
972
974
|
type: "button",
|
|
973
|
-
class: p(
|
|
974
|
-
"aria-label": v(
|
|
975
|
-
title:
|
|
976
|
-
"aria-pressed": v(
|
|
977
|
-
disabled:
|
|
975
|
+
class: p(A.value.tool()),
|
|
976
|
+
"aria-label": v(P)[e],
|
|
977
|
+
title: L(e),
|
|
978
|
+
"aria-pressed": v(M)[e].isActive && !v(F)(e) ? q.value[e].active : void 0,
|
|
979
|
+
disabled: q.value[e].disabled,
|
|
978
980
|
tabindex: n === 0 ? 0 : -1,
|
|
979
981
|
onMousedown: t[14] ||= C(() => {}, ["prevent"]),
|
|
980
|
-
onClick: (t) =>
|
|
981
|
-
}, [(m(), o(
|
|
982
|
-
class: p(
|
|
982
|
+
onClick: (t) => zn(e, t)
|
|
983
|
+
}, [(m(), o(ie(en[e]), {
|
|
984
|
+
class: p(A.value.toolIcon()),
|
|
983
985
|
"aria-hidden": "true"
|
|
984
986
|
}, null, 8, ["class"]))], 42, Jt))), 128))], 42, qt)]),
|
|
985
987
|
_: 1
|
|
986
988
|
}, 8, ["editor"])) : s("", !0),
|
|
987
|
-
v(
|
|
989
|
+
v(W) && z.value.length ? (m(), o(v(ht), {
|
|
988
990
|
key: 8,
|
|
989
|
-
editor: v(
|
|
991
|
+
editor: v(W)
|
|
990
992
|
}, {
|
|
991
993
|
default: x(() => [l("div", {
|
|
992
994
|
ref_key: "floating",
|
|
993
995
|
ref: sn,
|
|
994
996
|
role: "toolbar",
|
|
995
|
-
"aria-label": v(
|
|
996
|
-
class: p(
|
|
997
|
+
"aria-label": v(P).floatingMenu,
|
|
998
|
+
class: p(A.value.menu()),
|
|
997
999
|
onKeydown: ln
|
|
998
|
-
}, [(m(!0), c(i, null, g(
|
|
1000
|
+
}, [(m(!0), c(i, null, g(z.value, (e, n) => (m(), c("button", {
|
|
999
1001
|
key: e,
|
|
1000
1002
|
type: "button",
|
|
1001
|
-
class: p(
|
|
1002
|
-
"aria-label": v(
|
|
1003
|
-
title:
|
|
1004
|
-
"aria-pressed": v(
|
|
1005
|
-
disabled:
|
|
1003
|
+
class: p(A.value.tool()),
|
|
1004
|
+
"aria-label": v(P)[e],
|
|
1005
|
+
title: L(e),
|
|
1006
|
+
"aria-pressed": v(M)[e].isActive && !v(F)(e) ? q.value[e].active : void 0,
|
|
1007
|
+
disabled: q.value[e].disabled,
|
|
1006
1008
|
tabindex: n === 0 ? 0 : -1,
|
|
1007
1009
|
onMousedown: t[15] ||= C(() => {}, ["prevent"]),
|
|
1008
|
-
onClick: (t) =>
|
|
1009
|
-
}, [(m(), o(
|
|
1010
|
-
class: p(
|
|
1010
|
+
onClick: (t) => zn(e, t)
|
|
1011
|
+
}, [(m(), o(ie(en[e]), {
|
|
1012
|
+
class: p(A.value.toolIcon()),
|
|
1011
1013
|
"aria-hidden": "true"
|
|
1012
1014
|
}, null, 8, ["class"]))], 42, Xt))), 128))], 42, Yt)]),
|
|
1013
1015
|
_: 1
|
|
1014
1016
|
}, 8, ["editor"])) : s("", !0),
|
|
1015
|
-
f.mentions ? (m(), c(i, { key: 9 }, [
|
|
1017
|
+
f.mentions ? (m(), c(i, { key: 9 }, [B.value.open ? (m(), c("ul", {
|
|
1016
1018
|
key: 0,
|
|
1017
|
-
id: `${v(
|
|
1019
|
+
id: `${v(N)}mentions`,
|
|
1018
1020
|
role: "listbox",
|
|
1019
|
-
"aria-label": v(
|
|
1020
|
-
class: p(
|
|
1021
|
-
style:
|
|
1022
|
-
left: `${
|
|
1023
|
-
top: `${
|
|
1021
|
+
"aria-label": v(P).suggestions,
|
|
1022
|
+
class: p(A.value.suggestions()),
|
|
1023
|
+
style: ne(B.value.rect ? {
|
|
1024
|
+
left: `${B.value.rect.left}px`,
|
|
1025
|
+
top: `${B.value.rect.top}px`
|
|
1024
1026
|
} : void 0)
|
|
1025
|
-
}, [(m(!0), c(i, null, g(
|
|
1026
|
-
id: `${v(
|
|
1027
|
+
}, [(m(!0), c(i, null, g(B.value.items, (e, n) => (m(), c("li", {
|
|
1028
|
+
id: `${v(N)}mention${n}`,
|
|
1027
1029
|
key: e.id,
|
|
1028
1030
|
role: "option",
|
|
1029
|
-
"aria-selected": n ===
|
|
1030
|
-
"data-highlighted": n ===
|
|
1031
|
-
class: p(
|
|
1031
|
+
"aria-selected": n === B.value.active,
|
|
1032
|
+
"data-highlighted": n === B.value.active || void 0,
|
|
1033
|
+
class: p(A.value.suggestion()),
|
|
1032
1034
|
onMousedown: t[16] ||= C(() => {}, ["prevent"]),
|
|
1033
|
-
onClick: (t) =>
|
|
1034
|
-
}, _(e.label), 43, Qt))), 128)),
|
|
1035
|
+
onClick: (t) => Bn(e)
|
|
1036
|
+
}, _(e.label), 43, Qt))), 128)), B.value.items.length ? s("", !0) : (m(), c("li", {
|
|
1035
1037
|
key: 0,
|
|
1036
1038
|
role: "option",
|
|
1037
1039
|
"aria-disabled": "true",
|
|
1038
|
-
class: p(
|
|
1039
|
-
}, _(v(
|
|
1040
|
+
class: p(A.value.suggestion())
|
|
1041
|
+
}, _(v(P).noSuggestions), 3))], 14, Zt)) : s("", !0), l("span", {
|
|
1040
1042
|
role: "status",
|
|
1041
|
-
class: p(
|
|
1042
|
-
}, _(
|
|
1043
|
+
class: p(A.value.status())
|
|
1044
|
+
}, _(B.value.open ? v(P).suggestionCount(B.value.items.length) : ""), 3)], 64)) : s("", !0),
|
|
1043
1045
|
f.counter || f.maxLength !== void 0 ? (m(), c("div", {
|
|
1044
1046
|
key: 10,
|
|
1045
|
-
class: p(
|
|
1047
|
+
class: p(A.value.footer())
|
|
1046
1048
|
}, [
|
|
1047
1049
|
l("span", {
|
|
1048
|
-
class: p(
|
|
1049
|
-
"data-over":
|
|
1050
|
-
}, _(v(
|
|
1051
|
-
l("span", null, _(v(
|
|
1050
|
+
class: p(A.value.limit()),
|
|
1051
|
+
"data-over": Ln.value
|
|
1052
|
+
}, _(v(P).characters(In.value.characters, f.maxLength)), 11, $t),
|
|
1053
|
+
l("span", null, _(v(P).words(In.value.words)), 1),
|
|
1052
1054
|
f.maxLength === void 0 ? s("", !0) : (m(), c("span", {
|
|
1053
1055
|
key: 0,
|
|
1054
1056
|
role: "status",
|
|
1055
|
-
class: p(
|
|
1056
|
-
}, _(
|
|
1057
|
+
class: p(A.value.status())
|
|
1058
|
+
}, _(Ln.value ? v(P).limitReached : ""), 3))
|
|
1057
1059
|
], 2)) : s("", !0)
|
|
1058
|
-
],
|
|
1060
|
+
], 16, Mt));
|
|
1059
1061
|
}
|
|
1060
1062
|
});
|
|
1061
1063
|
//#endregion
|
|
1062
|
-
export {
|
|
1064
|
+
export { L as Editor, At as defaultBubbleTools, jt as defaultFloatingTools, A as defaultTools };
|