hexagon-editor 0.1.8 → 0.1.9
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/MarkdownEditor.vue.d.ts +22 -10
- package/dist/MarkdownEditor.vue.d.ts.map +1 -1
- package/dist/background-color-DJ1tENTK.js +80 -0
- package/dist/{color-7y9Yd6c7.js → color-DYgeN76h.js} +268 -267
- package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts +7 -3
- package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts.map +1 -1
- package/dist/components/MarkdownEditorToolbar.vue.d.ts +5 -2
- package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
- package/dist/core/basic-editor-command-helpers.d.ts +2 -0
- package/dist/core/basic-editor-command-helpers.d.ts.map +1 -1
- package/dist/core/basic-editor-markdown.d.ts.map +1 -1
- package/dist/core/basic-editor-types.d.ts +2 -0
- package/dist/core/basic-editor-types.d.ts.map +1 -1
- package/dist/core/basic-editor.d.ts.map +1 -1
- package/dist/core.js +1 -1
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/markdown/background-color.d.ts +16 -0
- package/dist/extensions/markdown/background-color.d.ts.map +1 -0
- package/dist/extensions/markdown/color.d.ts +3 -2
- package/dist/extensions/markdown/color.d.ts.map +1 -1
- package/dist/extensions.js +121 -111
- package/dist/i18n/index.d.ts +10 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n.js +24 -4
- package/dist/index.css +1 -1
- package/dist/index.js +886 -831
- package/dist/{markup-commands-uq7LBcNQ.js → markup-commands-DW5NFQUO.js} +1095 -1076
- package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/renderer/markdown.d.ts.map +1 -1
- package/dist/renderer.css +1 -1
- package/dist/renderer.js +588 -541
- package/dist/toolbar/config.d.ts +1 -1
- package/dist/toolbar/config.d.ts.map +1 -1
- package/dist/toolbar.js +21 -20
- package/package.json +1 -1
|
@@ -46,6 +46,7 @@ declare function __VLS_template(): {
|
|
|
46
46
|
refs: {
|
|
47
47
|
floatingMenus: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
48
48
|
codeVisible: boolean;
|
|
49
|
+
backgroundColorVisible: boolean;
|
|
49
50
|
colorVisible: boolean;
|
|
50
51
|
formulaVisible: boolean;
|
|
51
52
|
headingVisible: boolean;
|
|
@@ -58,7 +59,8 @@ declare function __VLS_template(): {
|
|
|
58
59
|
translate: (key: MarkdownEditorMessageKey) => string;
|
|
59
60
|
}> & Readonly<{
|
|
60
61
|
"onCode-block"?: (() => any) | undefined;
|
|
61
|
-
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any) | undefined;
|
|
62
|
+
"onSelect-background-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
63
|
+
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
62
64
|
"onInline-code"?: (() => any) | undefined;
|
|
63
65
|
"onInline-formula"?: (() => any) | undefined;
|
|
64
66
|
"onMath-block"?: (() => any) | undefined;
|
|
@@ -69,10 +71,11 @@ declare function __VLS_template(): {
|
|
|
69
71
|
"onIndent-list"?: (() => any) | undefined;
|
|
70
72
|
"onOutdent-list"?: (() => any) | undefined;
|
|
71
73
|
}>, {
|
|
72
|
-
getElement(name: "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
74
|
+
getElement(name: "background-color" | "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
73
75
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
74
76
|
"code-block": () => any;
|
|
75
|
-
"select-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any;
|
|
77
|
+
"select-background-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any;
|
|
78
|
+
"select-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any;
|
|
76
79
|
"inline-code": () => any;
|
|
77
80
|
"inline-formula": () => any;
|
|
78
81
|
"math-block": () => any;
|
|
@@ -83,6 +86,7 @@ declare function __VLS_template(): {
|
|
|
83
86
|
"indent-list": () => any;
|
|
84
87
|
"outdent-list": () => any;
|
|
85
88
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
89
|
+
backgroundColor: HTMLDivElement;
|
|
86
90
|
color: HTMLDivElement;
|
|
87
91
|
code: HTMLDivElement;
|
|
88
92
|
heading: HTMLDivElement;
|
|
@@ -98,6 +102,7 @@ declare function __VLS_template(): {
|
|
|
98
102
|
Defaults: {};
|
|
99
103
|
}, Readonly<{
|
|
100
104
|
codeVisible: boolean;
|
|
105
|
+
backgroundColorVisible: boolean;
|
|
101
106
|
colorVisible: boolean;
|
|
102
107
|
formulaVisible: boolean;
|
|
103
108
|
headingVisible: boolean;
|
|
@@ -110,7 +115,8 @@ declare function __VLS_template(): {
|
|
|
110
115
|
translate: (key: MarkdownEditorMessageKey) => string;
|
|
111
116
|
}> & Readonly<{
|
|
112
117
|
"onCode-block"?: (() => any) | undefined;
|
|
113
|
-
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any) | undefined;
|
|
118
|
+
"onSelect-background-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
119
|
+
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
114
120
|
"onInline-code"?: (() => any) | undefined;
|
|
115
121
|
"onInline-formula"?: (() => any) | undefined;
|
|
116
122
|
"onMath-block"?: (() => any) | undefined;
|
|
@@ -121,7 +127,7 @@ declare function __VLS_template(): {
|
|
|
121
127
|
"onIndent-list"?: (() => any) | undefined;
|
|
122
128
|
"onOutdent-list"?: (() => any) | undefined;
|
|
123
129
|
}>, {
|
|
124
|
-
getElement(name: "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
130
|
+
getElement(name: "background-color" | "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
125
131
|
}, {}, {}, {}, {}> | null;
|
|
126
132
|
linkForm: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
127
133
|
autofocus?: boolean;
|
|
@@ -511,6 +517,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
511
517
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
512
518
|
floatingMenus: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
513
519
|
codeVisible: boolean;
|
|
520
|
+
backgroundColorVisible: boolean;
|
|
514
521
|
colorVisible: boolean;
|
|
515
522
|
formulaVisible: boolean;
|
|
516
523
|
headingVisible: boolean;
|
|
@@ -523,7 +530,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
523
530
|
translate: (key: MarkdownEditorMessageKey) => string;
|
|
524
531
|
}> & Readonly<{
|
|
525
532
|
"onCode-block"?: (() => any) | undefined;
|
|
526
|
-
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any) | undefined;
|
|
533
|
+
"onSelect-background-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
534
|
+
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
527
535
|
"onInline-code"?: (() => any) | undefined;
|
|
528
536
|
"onInline-formula"?: (() => any) | undefined;
|
|
529
537
|
"onMath-block"?: (() => any) | undefined;
|
|
@@ -534,10 +542,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
534
542
|
"onIndent-list"?: (() => any) | undefined;
|
|
535
543
|
"onOutdent-list"?: (() => any) | undefined;
|
|
536
544
|
}>, {
|
|
537
|
-
getElement(name: "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
545
|
+
getElement(name: "background-color" | "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
538
546
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
539
547
|
"code-block": () => any;
|
|
540
|
-
"select-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any;
|
|
548
|
+
"select-background-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any;
|
|
549
|
+
"select-color": (color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any;
|
|
541
550
|
"inline-code": () => any;
|
|
542
551
|
"inline-formula": () => any;
|
|
543
552
|
"math-block": () => any;
|
|
@@ -548,6 +557,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
548
557
|
"indent-list": () => any;
|
|
549
558
|
"outdent-list": () => any;
|
|
550
559
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
560
|
+
backgroundColor: HTMLDivElement;
|
|
551
561
|
color: HTMLDivElement;
|
|
552
562
|
code: HTMLDivElement;
|
|
553
563
|
heading: HTMLDivElement;
|
|
@@ -563,6 +573,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
563
573
|
Defaults: {};
|
|
564
574
|
}, Readonly<{
|
|
565
575
|
codeVisible: boolean;
|
|
576
|
+
backgroundColorVisible: boolean;
|
|
566
577
|
colorVisible: boolean;
|
|
567
578
|
formulaVisible: boolean;
|
|
568
579
|
headingVisible: boolean;
|
|
@@ -575,7 +586,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
575
586
|
translate: (key: MarkdownEditorMessageKey) => string;
|
|
576
587
|
}> & Readonly<{
|
|
577
588
|
"onCode-block"?: (() => any) | undefined;
|
|
578
|
-
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet") => any) | undefined;
|
|
589
|
+
"onSelect-background-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
590
|
+
"onSelect-color"?: ((color: "gray" | "yellow" | "orange" | "red" | "green" | "blue" | "violet" | "default") => any) | undefined;
|
|
579
591
|
"onInline-code"?: (() => any) | undefined;
|
|
580
592
|
"onInline-formula"?: (() => any) | undefined;
|
|
581
593
|
"onMath-block"?: (() => any) | undefined;
|
|
@@ -586,7 +598,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
586
598
|
"onIndent-list"?: (() => any) | undefined;
|
|
587
599
|
"onOutdent-list"?: (() => any) | undefined;
|
|
588
600
|
}>, {
|
|
589
|
-
getElement(name: "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
601
|
+
getElement(name: "background-color" | "code" | "color" | "formula" | "heading" | "list" | "mode"): HTMLElement | undefined;
|
|
590
602
|
}, {}, {}, {}, {}> | null;
|
|
591
603
|
linkForm: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
592
604
|
autofocus?: boolean;
|
|
@@ -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":"AAywBA,OAAO,EAAgC,QAAQ,EAA0C,MAAM,KAAK,CAAC;AAQrG,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAGrF,OAAO,KAAK,EA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GAAG,OAAO,CAAC,IAAI,CAAC;oBAChC,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;UAQrB,kBAAkB;;cASd,gBAAgB;cANhB,OAAO;iBADJ,MAAM;WAMZ,mBAAmB;mBAJX,2BAA2B;mBAG3B,2BAA2B;gBAT9B,MAAM;YAGV,oBAAoB;iBAIf,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAyDxC,GAAG,8CAEH,GAAC,yBACG,GAAG,6DACQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAJlB,GAAG,8CAEH,GAAC,yBACG,GAAG,6DACQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAyhCjB,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"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const t = ["gray", "yellow", "orange", "red", "green", "blue", "violet"], p = ["default", ...t], C = {
|
|
2
|
+
default: "backgroundColorDefault",
|
|
3
|
+
gray: "backgroundColorGray",
|
|
4
|
+
yellow: "backgroundColorYellow",
|
|
5
|
+
orange: "backgroundColorOrange",
|
|
6
|
+
red: "backgroundColorRed",
|
|
7
|
+
green: "backgroundColorGreen",
|
|
8
|
+
blue: "backgroundColorBlue",
|
|
9
|
+
violet: "backgroundColorViolet"
|
|
10
|
+
}, b = {
|
|
11
|
+
gray: "--markdown-editor-background-color-gray",
|
|
12
|
+
yellow: "--markdown-editor-background-color-yellow",
|
|
13
|
+
orange: "--markdown-editor-background-color-orange",
|
|
14
|
+
red: "--markdown-editor-background-color-red",
|
|
15
|
+
green: "--markdown-editor-background-color-green",
|
|
16
|
+
blue: "--markdown-editor-background-color-blue",
|
|
17
|
+
violet: "--markdown-editor-background-color-violet"
|
|
18
|
+
};
|
|
19
|
+
function s(r) {
|
|
20
|
+
return t.includes(r);
|
|
21
|
+
}
|
|
22
|
+
function g(r) {
|
|
23
|
+
const o = s(r) ? r : "gray";
|
|
24
|
+
return `var(${b[o]})`;
|
|
25
|
+
}
|
|
26
|
+
const m = {
|
|
27
|
+
attrs: {
|
|
28
|
+
color: { default: "gray" }
|
|
29
|
+
},
|
|
30
|
+
toDOM: (r) => [
|
|
31
|
+
"span",
|
|
32
|
+
{ style: `background-color: ${g(String(r.attrs.color))}` },
|
|
33
|
+
0
|
|
34
|
+
]
|
|
35
|
+
}, x = {
|
|
36
|
+
mark: "background_color",
|
|
37
|
+
getAttrs: (r) => ({ color: String(r.meta?.color ?? "gray") })
|
|
38
|
+
};
|
|
39
|
+
function y(r) {
|
|
40
|
+
return r.inline.ruler.before("emphasis", "background_color", (o, c) => {
|
|
41
|
+
const n = o.pos;
|
|
42
|
+
if (o.src[n] !== "{" || i(o.src, n)) return !1;
|
|
43
|
+
const e = o.src.indexOf("}", n + 1);
|
|
44
|
+
if (e < 0 || o.src[e + 1] !== "(") return !1;
|
|
45
|
+
const a = o.src.slice(n + 4, e);
|
|
46
|
+
if (!o.src.startsWith("{bg-", n) || !s(a)) return !1;
|
|
47
|
+
const u = e + 2, l = f(o.src, u, o.posMax);
|
|
48
|
+
if (l < 0) return !1;
|
|
49
|
+
if (!c) {
|
|
50
|
+
const d = o.push("background_color_open", "span", 1);
|
|
51
|
+
d.attrSet("style", `background-color: ${g(a)}`), d.meta = { color: a };
|
|
52
|
+
const k = o.posMax;
|
|
53
|
+
o.pos = u, o.posMax = l, o.md.inline.tokenize(o), o.posMax = k, o.push("background_color_close", "span", -1);
|
|
54
|
+
}
|
|
55
|
+
return o.pos = l + 1, !0;
|
|
56
|
+
}), r;
|
|
57
|
+
}
|
|
58
|
+
function f(r, o, c) {
|
|
59
|
+
let n = 1;
|
|
60
|
+
for (let e = o; e < c; e += 1)
|
|
61
|
+
if (!i(r, e) && (r[e] === "(" && (n += 1), r[e] === ")" && (n -= 1), n === 0))
|
|
62
|
+
return e;
|
|
63
|
+
return -1;
|
|
64
|
+
}
|
|
65
|
+
function i(r, o) {
|
|
66
|
+
let c = 0;
|
|
67
|
+
for (let n = o - 1; n >= 0 && r[n] === "\\"; n -= 1) c += 1;
|
|
68
|
+
return c % 2 === 1;
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
x as a,
|
|
72
|
+
m as b,
|
|
73
|
+
y as c,
|
|
74
|
+
p as d,
|
|
75
|
+
C as e,
|
|
76
|
+
t as f,
|
|
77
|
+
g,
|
|
78
|
+
s as i,
|
|
79
|
+
b as t
|
|
80
|
+
};
|