@elmethis/core 0.6.1 → 0.6.2
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/components/containments/ElmToggle.vue2.mjs +11 -19
- package/dist/components/containments/ElmToggle.vue3.mjs +18 -14
- package/dist/components/others/ElmJsonComponentRenderer.vue2.mjs +1 -1
- package/dist/components/others/ElmMarkdown.vue.mjs +1 -1
- package/dist/node_modules/.pnpm/{marked@16.2.1 → marked@16.3.0}/node_modules/marked/lib/marked.esm.mjs +28 -23
- package/package.json +3 -3
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
};
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
25
|
return openBlock(), createElementBlock("div", {
|
|
26
|
-
class: normalizeClass(_ctx.$style.toggle),
|
|
26
|
+
class: normalizeClass([_ctx.$style.toggle, { [_ctx.$style.open]: isOpen.value }]),
|
|
27
27
|
style: normalizeStyle({ "--margin-block": _ctx.margin })
|
|
28
28
|
}, [
|
|
29
29
|
createElementVNode("div", {
|
|
@@ -56,24 +56,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
56
|
color: isOpen.value ? "#b36472" : "#59b57c"
|
|
57
57
|
}, null, 8, ["class", "d", "style", "color"])
|
|
58
58
|
], 6),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
default
|
|
68
|
-
|
|
69
|
-
key: 0,
|
|
70
|
-
class: normalizeClass(_ctx.$style.content)
|
|
71
|
-
}, [
|
|
72
|
-
renderSlot(_ctx.$slots, "default")
|
|
73
|
-
], 2)) : createCommentVNode("", true)
|
|
74
|
-
]),
|
|
75
|
-
_: 3
|
|
76
|
-
}, 8, ["enter-from-class", "enter-active-class", "enter-to-class", "leave-from-class", "leave-active-class", "leave-to-class"]),
|
|
59
|
+
createElementVNode("div", {
|
|
60
|
+
class: normalizeClass([
|
|
61
|
+
_ctx.$style.content,
|
|
62
|
+
{
|
|
63
|
+
[_ctx.$style["content-open"]]: isOpen.value
|
|
64
|
+
}
|
|
65
|
+
])
|
|
66
|
+
}, [
|
|
67
|
+
renderSlot(_ctx.$slots, "default")
|
|
68
|
+
], 2),
|
|
77
69
|
createVNode(Transition, {
|
|
78
70
|
"enter-from-class": unref(fadeStyle)["fade-enter-from"],
|
|
79
71
|
"enter-active-class": unref(fadeStyle)["fade-enter-active"],
|
|
@@ -3,38 +3,42 @@
|
|
|
3
3
|
try {
|
|
4
4
|
if (typeof document != "undefined") {
|
|
5
5
|
var elementStyle = document.createElement("style");
|
|
6
|
-
elementStyle.appendChild(document.createTextNode(".
|
|
6
|
+
elementStyle.appendChild(document.createTextNode("._toggle_1khh5_1{margin-block:var(--margin-block);display:grid;grid-template-rows:3rem 0fr;transition:grid .2s}._open_1khh5_8{grid-template-rows:3rem 1fr}._summary_1khh5_12{box-sizing:border-box;padding:1rem;width:100%;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:.5rem;border:1px solid rgba(0,0,0,.125);background-color:#3e434b0d}[data-theme=dark] ._summary_1khh5_12{border:1px solid rgba(255,255,255,.125);background-color:#bec2ca1a}._summary-left_1khh5_30{display:flex;gap:.5rem;align-items:center}._icon_1khh5_36{transform:rotate(0);transform:rotate(var(--rotate, 0deg));transition:transform .2s}._content_1khh5_41{margin:0;padding:.75rem;display:block;overflow:hidden;border-radius:0 0 .25rem .25rem;background-color:#ffffff1a;border-style:solid;border-width:0px;border-color:#00000020;opacity:0;transition:opacity .15s}[data-theme=dark] ._content_1khh5_41{border-style:solid;border-width:0px;border-color:#ffffff20;background-color:#bec2ca0d}._content-open_1khh5_61{border-width:1px;opacity:1}._close_1khh5_66{margin-block:.25rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:.25rem}._close-button_1khh5_75{padding:.25rem;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;gap:.25rem;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;opacity:.7;transition:background-color .1s;border-radius:.25rem}._close-button_1khh5_75:hover{background-color:#c5656526}._v-enter-to_1khh5_92,._v-leave-from_1khh5_93{opacity:1;transform:scaleY(1)}._v-enter-active_1khh5_98,._v-leave-active_1khh5_99{transition:opacity .2s,transform .2s;transform-origin:top}._v-enter-from_1khh5_104,._v-leave-to_1khh5_105{opacity:0;transform:scaleY(0)}"));
|
|
7
7
|
document.head.appendChild(elementStyle);
|
|
8
8
|
}
|
|
9
9
|
} catch (e) {
|
|
10
10
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
|
-
const toggle = "
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
13
|
+
const toggle = "_toggle_1khh5_1";
|
|
14
|
+
const open = "_open_1khh5_8";
|
|
15
|
+
const summary = "_summary_1khh5_12";
|
|
16
|
+
const icon = "_icon_1khh5_36";
|
|
17
|
+
const content = "_content_1khh5_41";
|
|
18
|
+
const close = "_close_1khh5_66";
|
|
18
19
|
const style0 = {
|
|
19
20
|
toggle,
|
|
21
|
+
open,
|
|
20
22
|
summary,
|
|
21
|
-
"summary-left": "_summary-
|
|
23
|
+
"summary-left": "_summary-left_1khh5_30",
|
|
22
24
|
icon,
|
|
23
25
|
content,
|
|
26
|
+
"content-open": "_content-open_1khh5_61",
|
|
24
27
|
close,
|
|
25
|
-
"close-button": "_close-
|
|
26
|
-
"v-enter-to": "_v-enter-
|
|
27
|
-
"v-leave-from": "_v-leave-
|
|
28
|
-
"v-enter-active": "_v-enter-
|
|
29
|
-
"v-leave-active": "_v-leave-
|
|
30
|
-
"v-enter-from": "_v-enter-
|
|
31
|
-
"v-leave-to": "_v-leave-
|
|
28
|
+
"close-button": "_close-button_1khh5_75",
|
|
29
|
+
"v-enter-to": "_v-enter-to_1khh5_92",
|
|
30
|
+
"v-leave-from": "_v-leave-from_1khh5_93",
|
|
31
|
+
"v-enter-active": "_v-enter-active_1khh5_98",
|
|
32
|
+
"v-leave-active": "_v-leave-active_1khh5_99",
|
|
33
|
+
"v-enter-from": "_v-enter-from_1khh5_104",
|
|
34
|
+
"v-leave-to": "_v-leave-to_1khh5_105"
|
|
32
35
|
};
|
|
33
36
|
export {
|
|
34
37
|
close,
|
|
35
38
|
content,
|
|
36
39
|
style0 as default,
|
|
37
40
|
icon,
|
|
41
|
+
open,
|
|
38
42
|
summary,
|
|
39
43
|
toggle
|
|
40
44
|
};
|
|
@@ -22,7 +22,7 @@ import { kebabCase } from "lodash-es";
|
|
|
22
22
|
|
|
23
23
|
import "nanoid";
|
|
24
24
|
|
|
25
|
-
import "../../node_modules/.pnpm/marked@16.
|
|
25
|
+
import "../../node_modules/.pnpm/marked@16.3.0/node_modules/marked/lib/marked.esm.mjs";
|
|
26
26
|
|
|
27
27
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
28
|
__name: "ElmJsonComponentRenderer",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
13
|
import { defineComponent, defineAsyncComponent, ref, watch, createBlock, openBlock, resolveDynamicComponent, h } from "vue";
|
|
14
|
-
import { marked as d } from "../../node_modules/.pnpm/marked@16.
|
|
14
|
+
import { marked as d } from "../../node_modules/.pnpm/marked@16.3.0/node_modules/marked/lib/marked.esm.mjs";
|
|
15
15
|
import "@mdi/js";
|
|
16
16
|
import "polished";
|
|
17
17
|
import "@vueuse/core";
|
|
@@ -2,7 +2,7 @@ function L() {
|
|
|
2
2
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
3
3
|
}
|
|
4
4
|
var O = L();
|
|
5
|
-
function
|
|
5
|
+
function G(l3) {
|
|
6
6
|
O = l3;
|
|
7
7
|
}
|
|
8
8
|
var E = { exec: () => null };
|
|
@@ -14,7 +14,7 @@ function h(l3, e = "") {
|
|
|
14
14
|
return n;
|
|
15
15
|
}
|
|
16
16
|
var m = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l3) => new RegExp(`^( {0,3}${l3})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}#`), htmlBeginRegex: (l3) => new RegExp(`^ {0,${Math.min(3, l3 - 1)}}<(?:[a-z].*>|!--)`, "i") }, xe = /^(?:[ \t]*(?:\n|$))+/, be = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Re = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, j = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Te = h(se).replace(/bull/g, j).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), F = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, we = /^[^\n]+/, Q = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ye = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Q).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Pe = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, j).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Se = h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), $e = h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = { blockquote: $e, code: be, def: ye, fences: Re, heading: Oe, hr: C, html: Se, lheading: ie, list: Pe, newline: xe, paragraph: oe, table: E, text: we }, re = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), _e = { ...K, lheading: Te, table: re, paragraph: h(F).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", re).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex() }, Le = { ...K, html: h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: h(F).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
17
|
-
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(),
|
|
17
|
+
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Me = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ze = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, D = /[\p{P}\p{S}]/u, W = /[\s\p{P}\p{S}]/u, le = /[^\s\p{P}\p{S}]/u, Ee = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, W).getRegex(), ue = /(?!~)[\p{P}\p{S}]/u, Ce = /(?!~)[\s\p{P}\p{S}]/u, Ie = /(?:[^\s\p{P}\p{S}]|~)/u, Be = /\[[^\[\]]*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, pe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, qe = h(pe, "u").replace(/punct/g, D).getRegex(), ve = h(pe, "u").replace(/punct/g, ue).getRegex(), ce = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(ce, "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), He = h(ce, "gu").replace(/notPunctSpace/g, Ie).replace(/punctSpace/g, Ce).replace(/punct/g, ue).getRegex(), Ze = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, le).replace(/punctSpace/g, W).replace(/punct/g, D).getRegex(), Ge = h(/\\(punct)/, "gu").replace(/punct/g, D).getRegex(), Ne = h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), je = h(U).replace("(?:-->|$)", "-->").getRegex(), Fe = h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", je).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/, Qe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), he = h(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", Q).getRegex(), de = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", Q).getRegex(), Ue = h("reflink|nolink(?!\\()", "g").replace("reflink", he).replace("nolink", de).getRegex(), X = { _backpedal: E, anyPunctuation: Ge, autolink: Ne, blockSkip: Be, br: ae, code: ze, del: E, emStrongLDelim: qe, emStrongRDelimAst: De, emStrongRDelimUnd: Ze, escape: Me, link: Qe, nolink: de, punctuation: Ee, reflink: he, reflinkSearch: Ue, tag: Fe, text: Ae, url: E }, Ke = { ...X, link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(), reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex() }, N = { ...X, emStrongRDelimAst: He, emStrongLDelim: ve, url: h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, We = { ...N, br: h(ae).replace("{2,}", "*").getRegex(), text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, I = { normal: K, gfm: _e, pedantic: Le }, M = { normal: X, gfm: N, breaks: We, pedantic: Ke };
|
|
18
18
|
var Xe = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ke = (l3) => Xe[l3];
|
|
19
19
|
function w(l3, e) {
|
|
20
20
|
if (e) {
|
|
@@ -172,15 +172,15 @@ ${c}` : c;
|
|
|
172
172
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
173
173
|
p = t[0], e = e.substring(p.length);
|
|
174
174
|
let f = t[2].split(`
|
|
175
|
-
`, 1)[0].replace(this.rules.other.listReplaceTabs, (
|
|
175
|
+
`, 1)[0].replace(this.rules.other.listReplaceTabs, (H) => " ".repeat(3 * H.length)), k = e.split(`
|
|
176
176
|
`, 1)[0], x = !f.trim(), g = 0;
|
|
177
177
|
if (this.options.pedantic ? (g = 2, c = f.trimStart()) : x ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, c = f.slice(g), g += t[1].length), x && this.rules.other.blankLine.test(k) && (p += k + `
|
|
178
178
|
`, e = e.substring(k.length + 1), u = true), !u) {
|
|
179
|
-
let
|
|
179
|
+
let H = this.rules.other.nextBulletRegex(g), ee = this.rules.other.hrRegex(g), te = this.rules.other.fencesBeginRegex(g), ne = this.rules.other.headingBeginRegex(g), me = this.rules.other.htmlBeginRegex(g);
|
|
180
180
|
for (; e; ) {
|
|
181
|
-
let
|
|
181
|
+
let Z = e.split(`
|
|
182
182
|
`, 1)[0], A;
|
|
183
|
-
if (k =
|
|
183
|
+
if (k = Z, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), A = k) : A = k.replace(this.rules.other.tabCharGlobal, " "), te.test(k) || ne.test(k) || me.test(k) || H.test(k) || ee.test(k)) break;
|
|
184
184
|
if (A.search(this.rules.other.nonSpaceChar) >= g || !k.trim()) c += `
|
|
185
185
|
` + A.slice(g);
|
|
186
186
|
else {
|
|
@@ -188,8 +188,8 @@ ${c}` : c;
|
|
|
188
188
|
c += `
|
|
189
189
|
` + k;
|
|
190
190
|
}
|
|
191
|
-
!x && !k.trim() && (x = true), p +=
|
|
192
|
-
`, e = e.substring(
|
|
191
|
+
!x && !k.trim() && (x = true), p += Z + `
|
|
192
|
+
`, e = e.substring(Z.length + 1), f = A.slice(g);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
i.loose || (o ? i.loose = true : this.rules.other.doubleBlankLine.test(p) && (o = true));
|
|
@@ -496,6 +496,7 @@ var b = class l {
|
|
|
496
496
|
}
|
|
497
497
|
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null; ) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
498
498
|
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null; ) n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
499
|
+
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
499
500
|
let i = false, s = "";
|
|
500
501
|
for (; e; ) {
|
|
501
502
|
i || (s = ""), i = false;
|
|
@@ -690,7 +691,7 @@ ${e}</tr>
|
|
|
690
691
|
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : w(e.text);
|
|
691
692
|
}
|
|
692
693
|
};
|
|
693
|
-
var
|
|
694
|
+
var $ = class {
|
|
694
695
|
strong({ text: e }) {
|
|
695
696
|
return e;
|
|
696
697
|
}
|
|
@@ -724,7 +725,7 @@ var R = class l2 {
|
|
|
724
725
|
renderer;
|
|
725
726
|
textRenderer;
|
|
726
727
|
constructor(e) {
|
|
727
|
-
this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new
|
|
728
|
+
this.options = e || O, this.options.renderer = this.options.renderer || new P(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $();
|
|
728
729
|
}
|
|
729
730
|
static parse(e, t) {
|
|
730
731
|
return new l2(t).parse(e);
|
|
@@ -864,13 +865,14 @@ var R = class l2 {
|
|
|
864
865
|
return n;
|
|
865
866
|
}
|
|
866
867
|
};
|
|
867
|
-
var
|
|
868
|
+
var S = class {
|
|
868
869
|
options;
|
|
869
870
|
block;
|
|
870
871
|
constructor(e) {
|
|
871
872
|
this.options = e || O;
|
|
872
873
|
}
|
|
873
|
-
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
874
|
+
static passThroughHooks = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"]);
|
|
875
|
+
static passThroughHooksRespectAsync = /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"]);
|
|
874
876
|
preprocess(e) {
|
|
875
877
|
return e;
|
|
876
878
|
}
|
|
@@ -880,6 +882,9 @@ var $ = class {
|
|
|
880
882
|
processAllTokens(e) {
|
|
881
883
|
return e;
|
|
882
884
|
}
|
|
885
|
+
emStrongMask(e) {
|
|
886
|
+
return e;
|
|
887
|
+
}
|
|
883
888
|
provideLexer() {
|
|
884
889
|
return this.block ? b.lex : b.lexInline;
|
|
885
890
|
}
|
|
@@ -894,10 +899,10 @@ var B = class {
|
|
|
894
899
|
parseInline = this.parseMarkdown(false);
|
|
895
900
|
Parser = R;
|
|
896
901
|
Renderer = P;
|
|
897
|
-
TextRenderer =
|
|
902
|
+
TextRenderer = $;
|
|
898
903
|
Lexer = b;
|
|
899
904
|
Tokenizer = y;
|
|
900
|
-
Hooks =
|
|
905
|
+
Hooks = S;
|
|
901
906
|
constructor(...e) {
|
|
902
907
|
this.use(...e);
|
|
903
908
|
}
|
|
@@ -971,13 +976,13 @@ var B = class {
|
|
|
971
976
|
r.tokenizer = i;
|
|
972
977
|
}
|
|
973
978
|
if (n.hooks) {
|
|
974
|
-
let i = this.defaults.hooks || new
|
|
979
|
+
let i = this.defaults.hooks || new S();
|
|
975
980
|
for (let s in n.hooks) {
|
|
976
981
|
if (!(s in i)) throw new Error(`hook '${s}' does not exist`);
|
|
977
982
|
if (["options", "block"].includes(s)) continue;
|
|
978
983
|
let o = s, a = n.hooks[o], u = i[o];
|
|
979
|
-
|
|
980
|
-
if (this.defaults.async) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
|
|
984
|
+
S.passThroughHooks.has(s) ? i[o] = (p) => {
|
|
985
|
+
if (this.defaults.async && S.passThroughHooksRespectAsync.has(s)) return Promise.resolve(a.call(i, p)).then((f) => u.call(i, f));
|
|
981
986
|
let c = a.call(i, p);
|
|
982
987
|
return u.call(i, c);
|
|
983
988
|
} : i[o] = (...p) => {
|
|
@@ -1043,12 +1048,12 @@ function d(l3, e) {
|
|
|
1043
1048
|
return _.parse(l3, e);
|
|
1044
1049
|
}
|
|
1045
1050
|
d.options = d.setOptions = function(l3) {
|
|
1046
|
-
return _.setOptions(l3), d.defaults = _.defaults,
|
|
1051
|
+
return _.setOptions(l3), d.defaults = _.defaults, G(d.defaults), d;
|
|
1047
1052
|
};
|
|
1048
1053
|
d.getDefaults = L;
|
|
1049
1054
|
d.defaults = O;
|
|
1050
1055
|
d.use = function(...l3) {
|
|
1051
|
-
return _.use(...l3), d.defaults = _.defaults,
|
|
1056
|
+
return _.use(...l3), d.defaults = _.defaults, G(d.defaults), d;
|
|
1052
1057
|
};
|
|
1053
1058
|
d.walkTokens = function(l3, e) {
|
|
1054
1059
|
return _.walkTokens(l3, e);
|
|
@@ -1057,11 +1062,11 @@ d.parseInline = _.parseInline;
|
|
|
1057
1062
|
d.Parser = R;
|
|
1058
1063
|
d.parser = R.parse;
|
|
1059
1064
|
d.Renderer = P;
|
|
1060
|
-
d.TextRenderer =
|
|
1065
|
+
d.TextRenderer = $;
|
|
1061
1066
|
d.Lexer = b;
|
|
1062
1067
|
d.lexer = b.lex;
|
|
1063
1068
|
d.Tokenizer = y;
|
|
1064
|
-
d.Hooks =
|
|
1069
|
+
d.Hooks = S;
|
|
1065
1070
|
d.parse = d;
|
|
1066
1071
|
d.options;
|
|
1067
1072
|
d.setOptions;
|
|
@@ -1071,12 +1076,12 @@ d.parseInline;
|
|
|
1071
1076
|
R.parse;
|
|
1072
1077
|
b.lex;
|
|
1073
1078
|
export {
|
|
1074
|
-
|
|
1079
|
+
S as Hooks,
|
|
1075
1080
|
b as Lexer,
|
|
1076
1081
|
B as Marked,
|
|
1077
1082
|
R as Parser,
|
|
1078
1083
|
P as Renderer,
|
|
1079
|
-
|
|
1084
|
+
$ as TextRenderer,
|
|
1080
1085
|
y as Tokenizer,
|
|
1081
1086
|
O as defaults,
|
|
1082
1087
|
L as getDefaults,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elmethis/core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"@vueuse/core": "^13.9.0",
|
|
28
28
|
"katex": "^0.16.22",
|
|
29
29
|
"lodash-es": "^4.17.21",
|
|
30
|
-
"marked": "^16.
|
|
30
|
+
"marked": "^16.3.0",
|
|
31
31
|
"nanoid": "^5.1.5",
|
|
32
32
|
"polished": "^4.3.1",
|
|
33
33
|
"shiki": "^3.12.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@notionhq/client": "^5.
|
|
36
|
+
"@notionhq/client": "^5.1.0",
|
|
37
37
|
"@storybook/vue3-vite": "9.1.5",
|
|
38
38
|
"@types/json-schema": "^7.0.15",
|
|
39
39
|
"@types/katex": "^0.16.7",
|