hexagon-editor 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/MarkdownEditor.vue.d.ts.map +1 -1
- package/dist/{MarkdownEditorLinkForm-mq-BVYM_.js → MarkdownEditorLinkForm-C7CGgA83.js} +74 -79
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/components/MarkdownEditorToolbar.vue.d.ts +2 -2
- package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/markup-commands.d.ts +31 -0
- package/dist/core/markup-commands.d.ts.map +1 -0
- package/dist/core/markup-editor.d.ts +2 -0
- package/dist/core/markup-editor.d.ts.map +1 -1
- package/dist/core.js +27 -26
- package/dist/forms.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +780 -751
- package/dist/{schema-dynamic-modifier-Dhf0m6tE.js → markup-commands-BckOOKIe.js} +3156 -2922
- package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/renderer.css +1 -0
- package/dist/renderer.js +115 -114
- package/package.json +1 -1
- /package/dist/{schema-dynamic-modifier.css → markup-commands.css} +0 -0
package/README.md
CHANGED
|
@@ -8,11 +8,9 @@ Vue 3 editor for Markdown and YFM with visual, markup and split modes.
|
|
|
8
8
|
pnpm add hexagon-editor
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import 'hexagon-editor/style.css';
|
|
15
|
-
```
|
|
11
|
+
Component styles are included automatically when importing the editor or renderer. The
|
|
12
|
+
`hexagon-editor/style.css` export is available only for integrations that need to load
|
|
13
|
+
the complete stylesheet explicitly.
|
|
16
14
|
|
|
17
15
|
## Read-only rendering
|
|
18
16
|
|
|
@@ -32,7 +30,7 @@ defineProps<{content: string}>();
|
|
|
32
30
|
|
|
33
31
|
`MarkdownRenderer` supports server rendering. Mermaid source is emitted as a stable fallback during SSR and is replaced with an SVG after hydration. The Mermaid runtime is loaded lazily only when a document contains a diagram.
|
|
34
32
|
|
|
35
|
-
The renderer
|
|
33
|
+
The renderer includes basic typography for headings, links, and inline code. Override its `.markdown-renderer` root, semantic descendants, or the `--markdown-renderer-link` and `--markdown-renderer-code-background` custom properties to match the consuming site. KaTeX output requires host-provided styles if the site wants the standard KaTeX appearance.
|
|
36
34
|
|
|
37
35
|
Raw Markdown HTML and the contents of `:::html ... :::` are displayed as source text. Only the spaced `::: html ... :::` directive is rendered as HTML. Pass trusted content to that directive; the renderer does not sanitize it.
|
|
38
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditor.vue.d.ts","sourceRoot":"","sources":["../src/MarkdownEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownEditor.vue.d.ts","sourceRoot":"","sources":["../src/MarkdownEditor.vue"],"names":[],"mappings":"AA6pBA,OAAO,EAA+B,QAAQ,EAAyC,MAAM,KAAK,CAAC;AAQnG,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,qCAAqC,CAAC;AAGnF,OAAO,KAAK,EAAC,wBAAwB,EAAC,MAAM,QAAQ,CAAC;AAQrD,OAAO,KAAK,EAAwC,0BAA0B,EAAgB,MAAM,QAAQ,CAAC;AAC7G,OAAO,KAAK,EACR,kBAAkB,EAClB,4BAA4B,EAC5B,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAC,2BAA2B,EAA8B,MAAM,WAAW,CAAC;AACxF,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,cAAc,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IAClC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,IAAI,IAAI,CAAC;IACd,KAAK,IA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAJL,GAAG,8CAEP,GAAA,yBAAyB,GAC7B,6DACU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAm7BX,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as V, ref as
|
|
1
|
+
import { defineComponent as V, ref as k, openBlock as c, createElementBlock as x, withModifiers as W, createElementVNode as u, renderSlot as N, onMounted as S, toDisplayString as v, createCommentVNode as $, normalizeClass as M, computed as E, createBlock as C, withCtx as I, createVNode as p, createTextVNode as q } from "vue";
|
|
2
2
|
import { getMarkdownEditorMessages as F } from "./i18n.js";
|
|
3
|
-
import
|
|
3
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"], H = { class: "markdown-editor-form__layout" }, R = { class: "markdown-editor-form__footer" }, T = /* @__PURE__ */ V({
|
|
4
5
|
name: "MarkdownEditorForm",
|
|
5
6
|
__name: "MarkdownEditorForm",
|
|
6
7
|
props: {
|
|
@@ -8,11 +9,11 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
8
9
|
theme: { default: "auto" }
|
|
9
10
|
},
|
|
10
11
|
emits: ["submit"],
|
|
11
|
-
setup(e, { expose:
|
|
12
|
-
const o =
|
|
13
|
-
return
|
|
12
|
+
setup(e, { expose: w, emit: g }) {
|
|
13
|
+
const o = g, l = k();
|
|
14
|
+
return w({ element: l }), (n, t) => (c(), x("form", {
|
|
14
15
|
ref_key: "element",
|
|
15
|
-
ref:
|
|
16
|
+
ref: l,
|
|
16
17
|
class: "markdown-editor-form",
|
|
17
18
|
"aria-disabled": e.disabled || void 0,
|
|
18
19
|
"data-theme": e.theme,
|
|
@@ -27,10 +28,10 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
27
28
|
])
|
|
28
29
|
], 40, A));
|
|
29
30
|
}
|
|
30
|
-
}), z = { class: "markdown-editor-form__row" },
|
|
31
|
+
}), z = { class: "markdown-editor-form__row" }, D = {
|
|
31
32
|
key: 0,
|
|
32
33
|
class: "markdown-editor-form__label"
|
|
33
|
-
},
|
|
34
|
+
}, O = ["value", "aria-describedby", "aria-invalid", "aria-label", "disabled", "min", "placeholder", "readonly", "required", "type"], y = /* @__PURE__ */ V({
|
|
34
35
|
name: "MarkdownEditorTextInput",
|
|
35
36
|
__name: "MarkdownEditorTextInput",
|
|
36
37
|
props: {
|
|
@@ -48,12 +49,12 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
48
49
|
type: { default: "text" }
|
|
49
50
|
},
|
|
50
51
|
emits: ["update:modelValue"],
|
|
51
|
-
setup(e, { expose:
|
|
52
|
-
const o = e,
|
|
52
|
+
setup(e, { expose: w, emit: g }) {
|
|
53
|
+
const o = e, l = g, n = k(), t = `markdown-editor-input-${Math.random().toString(36).slice(2)}`;
|
|
53
54
|
return S(() => {
|
|
54
55
|
o.autofocus && n.value?.focus();
|
|
55
|
-
}),
|
|
56
|
-
e.label ? (
|
|
56
|
+
}), w({ focus: () => n.value?.focus(), input: n }), (r, b) => (c(), x("label", z, [
|
|
57
|
+
e.label ? (c(), x("span", D, v(e.label), 1)) : $("", !0),
|
|
57
58
|
u("input", {
|
|
58
59
|
ref_key: "input",
|
|
59
60
|
ref: n,
|
|
@@ -68,9 +69,9 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
68
69
|
readonly: e.readonly,
|
|
69
70
|
required: e.required,
|
|
70
71
|
type: e.type,
|
|
71
|
-
onInput: b[0] || (b[0] = (d) =>
|
|
72
|
-
}, null, 42,
|
|
73
|
-
e.error || e.help ? (
|
|
72
|
+
onInput: b[0] || (b[0] = (d) => l("update:modelValue", d.target.value))
|
|
73
|
+
}, null, 42, O),
|
|
74
|
+
e.error || e.help ? (c(), x("span", {
|
|
74
75
|
key: 1,
|
|
75
76
|
id: t,
|
|
76
77
|
class: M(["markdown-editor-form__help", { "markdown-editor-form__help--error": e.error }])
|
|
@@ -98,18 +99,18 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
98
99
|
width: { default: "" }
|
|
99
100
|
},
|
|
100
101
|
emits: ["apply", "cancel", "invalid", "update:alt", "update:height", "update:name", "update:title", "update:url", "update:width"],
|
|
101
|
-
setup(e, { expose:
|
|
102
|
-
const o = e,
|
|
103
|
-
async function
|
|
104
|
-
const
|
|
105
|
-
if (
|
|
102
|
+
setup(e, { expose: w, emit: g }) {
|
|
103
|
+
const o = e, l = g, n = k(), t = k(""), r = k(""), b = k(!1), d = E(() => F(o.locale));
|
|
104
|
+
async function h(s) {
|
|
105
|
+
const a = s.target, i = a.files?.[0];
|
|
106
|
+
if (a.value = "", !(i === void 0 || o.uploadImage === void 0)) {
|
|
106
107
|
r.value = "", b.value = !0;
|
|
107
108
|
try {
|
|
108
109
|
const U = await o.uploadImage(i);
|
|
109
|
-
if (!
|
|
110
|
-
t.value = "",
|
|
110
|
+
if (!f(U)) throw new Error("Invalid image URL");
|
|
111
|
+
t.value = "", l("update:url", U), o.alt.trim() === "" && l("update:alt", i.name);
|
|
111
112
|
} catch {
|
|
112
|
-
r.value = d.value.imageUploadError,
|
|
113
|
+
r.value = d.value.imageUploadError, l("invalid", r.value);
|
|
113
114
|
} finally {
|
|
114
115
|
b.value = !1;
|
|
115
116
|
}
|
|
@@ -117,15 +118,15 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
117
118
|
}
|
|
118
119
|
function m() {
|
|
119
120
|
const s = o.url.trim();
|
|
120
|
-
if (!
|
|
121
|
-
t.value = d.value.imageUrlError,
|
|
121
|
+
if (!f(s)) {
|
|
122
|
+
t.value = d.value.imageUrlError, l("invalid", t.value);
|
|
122
123
|
return;
|
|
123
124
|
}
|
|
124
125
|
t.value = "";
|
|
125
|
-
const
|
|
126
|
-
i !== void 0 && (
|
|
126
|
+
const a = { alt: o.alt.trim(), name: o.name.trim(), title: o.title.trim(), url: s }, i = B(o.width), U = B(o.height);
|
|
127
|
+
i !== void 0 && (a.width = i), U !== void 0 && (a.height = U), l("apply", a);
|
|
127
128
|
}
|
|
128
|
-
function
|
|
129
|
+
function f(s) {
|
|
129
130
|
if (s.startsWith("data:image/")) return !0;
|
|
130
131
|
try {
|
|
131
132
|
return s.length > 0 && new URL(s).protocol.match(/^https?:$/) !== null;
|
|
@@ -134,10 +135,10 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
function B(s) {
|
|
137
|
-
const
|
|
138
|
-
return s === "" || !Number.isFinite(
|
|
138
|
+
const a = Number(s);
|
|
139
|
+
return s === "" || !Number.isFinite(a) || a < 0 ? void 0 : a;
|
|
139
140
|
}
|
|
140
|
-
return
|
|
141
|
+
return w({ element: E(() => n.value?.element) }), (s, a) => (c(), C(T, {
|
|
141
142
|
ref_key: "form",
|
|
142
143
|
ref: n,
|
|
143
144
|
disabled: e.disabled,
|
|
@@ -147,7 +148,7 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
147
148
|
footer: I(() => [
|
|
148
149
|
u("button", {
|
|
149
150
|
type: "button",
|
|
150
|
-
onClick:
|
|
151
|
+
onClick: a[6] || (a[6] = (i) => l("cancel"))
|
|
151
152
|
}, v(d.value.cancel), 1),
|
|
152
153
|
u("button", {
|
|
153
154
|
disabled: e.disabled || b.value || !e.url.trim(),
|
|
@@ -155,7 +156,7 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
155
156
|
}, v(d.value.apply), 9, K)
|
|
156
157
|
]),
|
|
157
158
|
default: I(() => [
|
|
158
|
-
e.uploadImage ? (
|
|
159
|
+
e.uploadImage ? (c(), x("label", {
|
|
159
160
|
key: 0,
|
|
160
161
|
class: M(["markdown-editor-image-upload", { "markdown-editor-image-upload--disabled": e.disabled || b.value }])
|
|
161
162
|
}, [
|
|
@@ -163,12 +164,12 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
163
164
|
accept: "image/*",
|
|
164
165
|
disabled: e.disabled || b.value,
|
|
165
166
|
type: "file",
|
|
166
|
-
onChange:
|
|
167
|
+
onChange: h
|
|
167
168
|
}, null, 40, j),
|
|
168
169
|
u("span", null, v(b.value ? d.value.imageUploading : d.value.imageUpload), 1)
|
|
169
170
|
], 2)) : $("", !0),
|
|
170
|
-
r.value ? (
|
|
171
|
-
|
|
171
|
+
r.value ? (c(), x("p", G, v(r.value), 1)) : $("", !0),
|
|
172
|
+
p(y, {
|
|
172
173
|
"model-value": e.url,
|
|
173
174
|
"aria-label": d.value.imageUrlAria,
|
|
174
175
|
autofocus: e.autofocus,
|
|
@@ -178,65 +179,60 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
178
179
|
placeholder: "https://example.com/image.jpg",
|
|
179
180
|
required: "",
|
|
180
181
|
type: "url",
|
|
181
|
-
"onUpdate:modelValue":
|
|
182
|
-
t.value = "",
|
|
182
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => {
|
|
183
|
+
t.value = "", l("update:url", i);
|
|
183
184
|
})
|
|
184
185
|
}, null, 8, ["model-value", "aria-label", "autofocus", "disabled", "error", "label"]),
|
|
185
|
-
|
|
186
|
+
p(y, {
|
|
186
187
|
"model-value": e.name,
|
|
187
188
|
disabled: e.disabled,
|
|
188
189
|
label: d.value.imageName,
|
|
189
|
-
"onUpdate:modelValue":
|
|
190
|
+
"onUpdate:modelValue": a[1] || (a[1] = (i) => l("update:name", i))
|
|
190
191
|
}, null, 8, ["model-value", "disabled", "label"]),
|
|
191
|
-
|
|
192
|
+
p(y, {
|
|
192
193
|
"model-value": e.alt,
|
|
193
194
|
"aria-label": d.value.imageAltAria,
|
|
194
195
|
disabled: e.disabled,
|
|
195
196
|
help: d.value.imageAltHelp,
|
|
196
197
|
label: d.value.imageAlt,
|
|
197
|
-
"onUpdate:modelValue":
|
|
198
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => l("update:alt", i))
|
|
198
199
|
}, null, 8, ["model-value", "aria-label", "disabled", "help", "label"]),
|
|
199
|
-
|
|
200
|
+
p(y, {
|
|
200
201
|
"model-value": e.title,
|
|
201
202
|
"aria-label": d.value.imageTitle,
|
|
202
203
|
disabled: e.disabled,
|
|
203
204
|
label: d.value.imageTitle,
|
|
204
|
-
"onUpdate:modelValue":
|
|
205
|
+
"onUpdate:modelValue": a[3] || (a[3] = (i) => l("update:title", i))
|
|
205
206
|
}, null, 8, ["model-value", "aria-label", "disabled", "label"]),
|
|
206
207
|
u("div", {
|
|
207
208
|
class: "markdown-editor-form__sizes",
|
|
208
209
|
"aria-label": d.value.imageSizes
|
|
209
210
|
}, [
|
|
210
|
-
|
|
211
|
+
p(y, {
|
|
211
212
|
"model-value": e.width,
|
|
212
213
|
"aria-label": d.value.imageWidth,
|
|
213
214
|
disabled: e.disabled,
|
|
214
215
|
min: 0,
|
|
215
216
|
placeholder: d.value.imageWidth,
|
|
216
217
|
type: "number",
|
|
217
|
-
"onUpdate:modelValue":
|
|
218
|
+
"onUpdate:modelValue": a[4] || (a[4] = (i) => l("update:width", i))
|
|
218
219
|
}, null, 8, ["model-value", "aria-label", "disabled", "placeholder"]),
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
a[7] || (a[7] = u("span", { "aria-hidden": "true" }, "×", -1)),
|
|
221
|
+
p(y, {
|
|
221
222
|
"model-value": e.height,
|
|
222
223
|
"aria-label": d.value.imageHeight,
|
|
223
224
|
disabled: e.disabled,
|
|
224
225
|
min: 0,
|
|
225
226
|
placeholder: d.value.imageHeight,
|
|
226
227
|
type: "number",
|
|
227
|
-
"onUpdate:modelValue":
|
|
228
|
+
"onUpdate:modelValue": a[5] || (a[5] = (i) => l("update:height", i))
|
|
228
229
|
}, null, 8, ["model-value", "aria-label", "disabled", "placeholder"])
|
|
229
230
|
], 8, J)
|
|
230
231
|
]),
|
|
231
232
|
_: 1
|
|
232
233
|
}, 8, ["disabled", "theme"]));
|
|
233
234
|
}
|
|
234
|
-
}),
|
|
235
|
-
const f = e.__vccOpts || e;
|
|
236
|
-
for (const [o, a] of h)
|
|
237
|
-
f[o] = a;
|
|
238
|
-
return f;
|
|
239
|
-
}, le = /* @__PURE__ */ T(P, [["__scopeId", "data-v-396f2d6a"]]), Q = { class: "markdown-editor__form-checkbox" }, X = ["checked", "disabled"], Y = ["disabled"], Z = ["disabled"], _ = /* @__PURE__ */ V({
|
|
235
|
+
}), te = /* @__PURE__ */ L(P, [["__scopeId", "data-v-396f2d6a"]]), Q = { class: "markdown-editor__form-checkbox" }, X = ["checked", "disabled"], Y = ["disabled"], Z = ["disabled"], _ = /* @__PURE__ */ V({
|
|
240
236
|
name: "MarkdownEditorLinkForm",
|
|
241
237
|
__name: "MarkdownEditorLinkForm",
|
|
242
238
|
props: {
|
|
@@ -251,24 +247,24 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
251
247
|
url: { default: "" }
|
|
252
248
|
},
|
|
253
249
|
emits: ["apply", "cancel", "invalid", "remove", "update:text", "update:url", "update:openInNewWindow"],
|
|
254
|
-
setup(e, { expose:
|
|
255
|
-
const o = e,
|
|
250
|
+
setup(e, { expose: w, emit: g }) {
|
|
251
|
+
const o = e, l = g, n = k(), t = E(() => F(o.locale)), r = k("");
|
|
256
252
|
function b() {
|
|
257
|
-
const
|
|
258
|
-
if (!d(
|
|
259
|
-
r.value = t.value.linkUrlError,
|
|
253
|
+
const h = o.url.trim();
|
|
254
|
+
if (!d(h)) {
|
|
255
|
+
r.value = t.value.linkUrlError, l("invalid", r.value);
|
|
260
256
|
return;
|
|
261
257
|
}
|
|
262
|
-
r.value = "",
|
|
258
|
+
r.value = "", l("apply", { openInNewWindow: o.openInNewWindow, text: o.text.trim(), url: h });
|
|
263
259
|
}
|
|
264
|
-
function d(
|
|
260
|
+
function d(h) {
|
|
265
261
|
try {
|
|
266
|
-
return
|
|
262
|
+
return h.length > 0 && new URL(h).protocol.match(/^https?:$/) !== null;
|
|
267
263
|
} catch {
|
|
268
264
|
return !1;
|
|
269
265
|
}
|
|
270
266
|
}
|
|
271
|
-
return
|
|
267
|
+
return w({ element: E(() => n.value?.element) }), (h, m) => (c(), C(T, {
|
|
272
268
|
ref_key: "form",
|
|
273
269
|
ref: n,
|
|
274
270
|
disabled: e.disabled,
|
|
@@ -276,15 +272,15 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
276
272
|
onSubmit: b
|
|
277
273
|
}, {
|
|
278
274
|
footer: I(() => [
|
|
279
|
-
e.hasCurrentLink ? (
|
|
275
|
+
e.hasCurrentLink ? (c(), x("button", {
|
|
280
276
|
key: 0,
|
|
281
277
|
disabled: e.disabled,
|
|
282
278
|
type: "button",
|
|
283
|
-
onClick: m[3] || (m[3] = (
|
|
279
|
+
onClick: m[3] || (m[3] = (f) => l("remove"))
|
|
284
280
|
}, v(t.value.linkRemove), 9, Y)) : $("", !0),
|
|
285
281
|
u("button", {
|
|
286
282
|
type: "button",
|
|
287
|
-
onClick: m[4] || (m[4] = (
|
|
283
|
+
onClick: m[4] || (m[4] = (f) => l("cancel"))
|
|
288
284
|
}, v(t.value.cancel), 1),
|
|
289
285
|
u("button", {
|
|
290
286
|
disabled: e.disabled || !e.url.trim(),
|
|
@@ -292,7 +288,7 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
292
288
|
}, v(t.value.apply), 9, Z)
|
|
293
289
|
]),
|
|
294
290
|
default: I(() => [
|
|
295
|
-
|
|
291
|
+
p(y, {
|
|
296
292
|
"model-value": e.url,
|
|
297
293
|
"aria-label": t.value.linkUrl,
|
|
298
294
|
autofocus: e.autofocus,
|
|
@@ -302,25 +298,25 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
302
298
|
placeholder: "https://example.com",
|
|
303
299
|
required: "",
|
|
304
300
|
type: "url",
|
|
305
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
306
|
-
r.value = "",
|
|
301
|
+
"onUpdate:modelValue": m[0] || (m[0] = (f) => {
|
|
302
|
+
r.value = "", l("update:url", f);
|
|
307
303
|
})
|
|
308
304
|
}, null, 8, ["model-value", "aria-label", "autofocus", "disabled", "error", "label"]),
|
|
309
|
-
|
|
305
|
+
p(y, {
|
|
310
306
|
"model-value": e.text,
|
|
311
307
|
"aria-label": t.value.linkText,
|
|
312
308
|
disabled: e.disabled,
|
|
313
309
|
help: t.value.linkTextHelp,
|
|
314
310
|
label: t.value.linkText,
|
|
315
311
|
readonly: e.readOnlyText,
|
|
316
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
312
|
+
"onUpdate:modelValue": m[1] || (m[1] = (f) => l("update:text", f))
|
|
317
313
|
}, null, 8, ["model-value", "aria-label", "disabled", "help", "label", "readonly"]),
|
|
318
314
|
u("label", Q, [
|
|
319
315
|
u("input", {
|
|
320
316
|
checked: e.openInNewWindow,
|
|
321
317
|
disabled: e.disabled,
|
|
322
318
|
type: "checkbox",
|
|
323
|
-
onChange: m[2] || (m[2] = (
|
|
319
|
+
onChange: m[2] || (m[2] = (f) => l("update:openInNewWindow", f.target.checked))
|
|
324
320
|
}, null, 40, X),
|
|
325
321
|
q(v(t.value.linkNewWindow), 1)
|
|
326
322
|
])
|
|
@@ -328,11 +324,10 @@ import './MarkdownEditorLinkForm.css';const A = ["aria-disabled", "data-theme"],
|
|
|
328
324
|
_: 1
|
|
329
325
|
}, 8, ["disabled", "theme"]));
|
|
330
326
|
}
|
|
331
|
-
}),
|
|
327
|
+
}), de = /* @__PURE__ */ L(_, [["__scopeId", "data-v-127342b7"]]);
|
|
332
328
|
export {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
T as c
|
|
329
|
+
te as M,
|
|
330
|
+
T as _,
|
|
331
|
+
de as a,
|
|
332
|
+
y as b
|
|
338
333
|
};
|
|
@@ -32,7 +32,7 @@ declare function __VLS_template(): {
|
|
|
32
32
|
};
|
|
33
33
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
34
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
|
-
execute: (command: import('prosemirror-state').Command) => any;
|
|
35
|
+
execute: (id: "mark" | "code" | "mermaid" | "html" | "link" | "table" | "image" | "italic" | "strike" | "heading" | "bold" | "color" | "formula" | "quote" | "redo" | "underline" | "undo" | "code-block" | "bullet-list" | "ordered-list" | "fold-heading" | "code-language" | "horizontal-rule" | undefined, command: import('prosemirror-state').Command) => any;
|
|
36
36
|
"insert-html": () => any;
|
|
37
37
|
"toggle-formula-menu": (reference: HTMLElement) => any;
|
|
38
38
|
"toggle-code-menu": (reference: HTMLElement) => any;
|
|
@@ -42,7 +42,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
42
42
|
"toggle-list-menu": (reference: HTMLElement) => any;
|
|
43
43
|
"toggle-mode-menu": (reference: HTMLElement) => any;
|
|
44
44
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
45
|
-
onExecute?: ((command: import('prosemirror-state').Command) => any) | undefined;
|
|
45
|
+
onExecute?: ((id: "mark" | "code" | "mermaid" | "html" | "link" | "table" | "image" | "italic" | "strike" | "heading" | "bold" | "color" | "formula" | "quote" | "redo" | "underline" | "undo" | "code-block" | "bullet-list" | "ordered-list" | "fold-heading" | "code-language" | "horizontal-rule" | undefined, command: import('prosemirror-state').Command) => any) | undefined;
|
|
46
46
|
"onInsert-html"?: (() => any) | undefined;
|
|
47
47
|
"onToggle-formula-menu"?: ((reference: HTMLElement) => any) | undefined;
|
|
48
48
|
"onToggle-code-menu"?: ((reference: HTMLElement) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownEditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditorToolbar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownEditorToolbar.vue.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownEditorToolbar.vue"],"names":[],"mappings":"AA+cC,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAQ1D,OAAO,KAAK,EAAE,2BAA2B,EAA0D,MAAM,YAAY,CAAC;AAEtH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,KAAK,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/D,KAAK,WAAW,GAAG;IAClB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,IAAI,EAAE,kBAAkB,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,KAAK,EAAE,0BAA0B,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,2BAA2B,CAAC;IAC3C,aAAa,CAAC,EAAE,2BAA2B,CAAC;IAC5C,SAAS,EAAE,CAAC,GAAG,EAAE,wBAAwB,KAAK,MAAM,CAAC;CACrD,CAAC;AAuCH,iBAAS,cAAc;WA8uBT,OAAO,IAA6B;;;;+BAd7B,cAAc;YAIJ,GAAG;;;;EAejC;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;6FAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ export { configureAdvancedMarkdownRenderers, getAdvancedMarkdownRenderers } from
|
|
|
25
25
|
export type { AdvancedMarkdownRenderers } from './optional-renderers';
|
|
26
26
|
export { ParserTokenRegistry, ParserTokensRegistry, SchemaSpecRegistry, SerializerTokenRegistry, SerializerTokensRegistry, } from './registries';
|
|
27
27
|
export type { SchemaSpecModifier } from './registries';
|
|
28
|
-
export { createVueContextPanelPlugin, createVueNodeView, createVueWidgetDecoration
|
|
28
|
+
export { createVueContextPanelPlugin, createVueNodeView, createVueWidgetDecoration } from './vue-renderer';
|
|
29
29
|
export type { VueContextPanelOptions, VueContextPanelProps, VueNodeViewOptions, VueNodeViewProps, VueWidgetDecorationOptions, } from './vue-renderer';
|
|
30
|
+
export { createBasicMarkupCommands } from './markup-commands';
|
|
31
|
+
export type { BasicMarkupCommands, MarkupCommand } from './markup-commands';
|
|
30
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACN,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,YAAY,EACX,SAAS,EACT,eAAe,EACf,aAAa,EACb,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,E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AAkB,EAClB,gBAAgB,EAChB,0BAA0B,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
export type MarkupCommand = (view: EditorView) => boolean;
|
|
3
|
+
export interface BasicMarkupCommands {
|
|
4
|
+
bold: MarkupCommand;
|
|
5
|
+
bulletList: MarkupCommand;
|
|
6
|
+
code: MarkupCommand;
|
|
7
|
+
codeBlock: MarkupCommand;
|
|
8
|
+
heading(level: number): MarkupCommand;
|
|
9
|
+
horizontalRule: MarkupCommand;
|
|
10
|
+
indentList: MarkupCommand;
|
|
11
|
+
insertHtml: MarkupCommand;
|
|
12
|
+
insertImage(src: string, alt: string, title?: string): MarkupCommand;
|
|
13
|
+
insertInlineMath: MarkupCommand;
|
|
14
|
+
insertMathBlock: MarkupCommand;
|
|
15
|
+
insertMermaid: MarkupCommand;
|
|
16
|
+
insertTable(rows?: number, columns?: number): MarkupCommand;
|
|
17
|
+
italic: MarkupCommand;
|
|
18
|
+
mark: MarkupCommand;
|
|
19
|
+
orderedList: MarkupCommand;
|
|
20
|
+
outdentList: MarkupCommand;
|
|
21
|
+
paragraph: MarkupCommand;
|
|
22
|
+
quote: MarkupCommand;
|
|
23
|
+
redo: MarkupCommand;
|
|
24
|
+
setLink(href: string, title?: string, text?: string, openInNewWindow?: boolean): MarkupCommand;
|
|
25
|
+
strikethrough: MarkupCommand;
|
|
26
|
+
toggleHeadingFolding: MarkupCommand;
|
|
27
|
+
underline: MarkupCommand;
|
|
28
|
+
undo: MarkupCommand;
|
|
29
|
+
}
|
|
30
|
+
export declare function createBasicMarkupCommands(): BasicMarkupCommands;
|
|
31
|
+
//# sourceMappingURL=markup-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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SAAS,EAAE,aAAa,CAAC;IACzB,IAAI,EAAE,aAAa,CAAC;CACpB;AAuWD,wBAAgB,yBAAyB,IAAI,mBAAmB,CAgD/D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MarkupCommand } from './markup-commands';
|
|
1
2
|
export interface BasicMarkupEditor {
|
|
2
3
|
destroy(): void;
|
|
3
4
|
focus(): void;
|
|
@@ -10,6 +11,7 @@ export interface BasicMarkupEditor {
|
|
|
10
11
|
redo(): void;
|
|
11
12
|
setValue(value: string): void;
|
|
12
13
|
undo(): void;
|
|
14
|
+
run(command: MarkupCommand): boolean;
|
|
13
15
|
}
|
|
14
16
|
export interface MountBasicMarkupEditorOptions {
|
|
15
17
|
editable?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markup-editor.d.ts","sourceRoot":"","sources":["../../src/core/markup-editor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markup-editor.d.ts","sourceRoot":"","sources":["../../src/core/markup-editor.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IACjC,OAAO,IAAI,IAAI,CAAC;IAChB,KAAK,IAAI,IAAI,CAAC;IACd,QAAQ,IAAI,MAAM,CAAC;IACnB,QAAQ,IAAI,OAAO,CAAC;IACpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC/D,IAAI,IAAI,IAAI,CAAC;IACb,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,IAAI,IAAI,CAAC;IACb,GAAG,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC;CACrC;AAED,MAAM,WAAW,6BAA6B;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,WAAW,CAAC;CACpB;AAED,qFAAqF;AACrF,wBAAgB,sBAAsB,CAAC,EACtC,QAAe,EACf,YAAiB,EACjB,QAAQ,EACR,MAAM,GACN,EAAE,6BAA6B,GAAG,iBAAiB,CAqFnD"}
|
package/dist/core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as s, E as r, a as t, b as i, c as n, L as o, L as d, M as c, d as g, e as m, f as k, P as l, g as
|
|
2
|
-
import { c as
|
|
3
|
-
import { c as
|
|
1
|
+
import { A as s, E as r, a as t, b as i, c as n, L as o, L as d, M as c, d as g, e as m, f as k, P as l, g as M, S as y, h as u, i as w, j as E, k as L, W as P, l as S, m as f, n as p, o as R, p as x, s as v, q as B, r as C, t as h, u as W } from "./markup-commands-BckOOKIe.js";
|
|
2
|
+
import { c as A, a as T, b as V, d as j, e as D, f as I, j as z, l as q, m as H, s as K, t as N } from "./base-Bnv2-Te4.js";
|
|
3
|
+
import { c as F, g as G } from "./optional-renderers-BalvqqvY.js";
|
|
4
4
|
export {
|
|
5
5
|
s as ActionsManager,
|
|
6
6
|
r as EventEmitter,
|
|
@@ -14,33 +14,34 @@ export {
|
|
|
14
14
|
m as MarkdownParser,
|
|
15
15
|
k as MarkdownParserDynamicModifier,
|
|
16
16
|
l as ParserTokenRegistry,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
M as ParserTokensRegistry,
|
|
18
|
+
y as SafeEventEmitter,
|
|
19
|
+
u as SchemaDynamicModifier,
|
|
20
|
+
w as SchemaSpecRegistry,
|
|
21
21
|
E as SerializerTokenRegistry,
|
|
22
22
|
L as SerializerTokensRegistry,
|
|
23
23
|
P as WysiwygContentHandler,
|
|
24
24
|
S as basicMarkdownCodec,
|
|
25
25
|
f as basicMarkdownSchema,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
A as collapseListsPlugin,
|
|
27
|
+
F as configureAdvancedMarkdownRenderers,
|
|
28
28
|
p as createBasicEditorCommands,
|
|
29
|
-
|
|
30
|
-
T as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
j as
|
|
34
|
-
D as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
z as
|
|
40
|
-
q as
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
K as
|
|
29
|
+
R as createBasicMarkupCommands,
|
|
30
|
+
T as createListsInputRules,
|
|
31
|
+
V as createListsKeymap,
|
|
32
|
+
x as createMarkdownEditor,
|
|
33
|
+
j as createVueContextPanelPlugin,
|
|
34
|
+
D as createVueNodeView,
|
|
35
|
+
I as createVueWidgetDecoration,
|
|
36
|
+
v as defaultMarkdownSchema,
|
|
37
|
+
G as getAdvancedMarkdownRenderers,
|
|
38
|
+
B as getBasicWysiwygSelectionState,
|
|
39
|
+
z as joinPrevList,
|
|
40
|
+
q as liftEmptyListItem,
|
|
41
|
+
H as mergeListsPlugin,
|
|
42
|
+
C as mountBasicMarkupEditor,
|
|
43
|
+
h as mountBasicWysiwygEditor,
|
|
44
|
+
W as renderMarkdownPreview,
|
|
45
|
+
K as sinkOnlySelectedListItem,
|
|
46
|
+
N as toList
|
|
46
47
|
};
|
package/dist/forms.js
CHANGED