artifactuse 0.1.2 → 0.1.4
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/{index-_nD5FZzs.js → index-84VxwPLd.js} +56 -33
- package/dist/index.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/vue/index.js +1 -1
- package/dist/vue2/index.js +39 -7
- package/package.json +1 -1
- package/dist/styles/artifactuse.backup.css +0 -4674
|
@@ -528,14 +528,14 @@ function _r(e) {
|
|
|
528
528
|
type: "artifactuse",
|
|
529
529
|
action: p,
|
|
530
530
|
data: v,
|
|
531
|
-
requestId: m ||
|
|
531
|
+
requestId: m || Be(),
|
|
532
532
|
timestamp: Date.now()
|
|
533
533
|
};
|
|
534
534
|
return a ? (n(x), x.requestId) : (s.push(x), x.requestId);
|
|
535
535
|
}
|
|
536
536
|
function c(p, v, m = 3e4) {
|
|
537
537
|
return new Promise((x, k) => {
|
|
538
|
-
const A =
|
|
538
|
+
const A = Be(), z = setTimeout(() => {
|
|
539
539
|
f(`${p}:response`, M), k(new Error(`Artifactuse bridge request timeout: ${p}`));
|
|
540
540
|
}, m), M = (P, $) => {
|
|
541
541
|
$ === A && (clearTimeout(z), f(`${p}:response`, M), x(P));
|
|
@@ -592,7 +592,7 @@ function _r(e) {
|
|
|
592
592
|
}
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Be() {
|
|
596
596
|
return `req-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
597
597
|
}
|
|
598
598
|
function Cr(e) {
|
|
@@ -807,7 +807,7 @@ var Er = (() => {
|
|
|
807
807
|
} catch {
|
|
808
808
|
return !1;
|
|
809
809
|
}
|
|
810
|
-
})(), T = { 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]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ 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: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, Pr = /^(?:[ \t]*(?:\n|$))+/, Ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Zr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, te = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, qr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pe = /(?:[*+-]|\d{1,9}[.)])/, Wt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Qt = S(Wt).replace(/bull/g, Pe).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(), Hr = S(Wt).replace(/bull/g, Pe).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(), Ie = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, jr = /^[^\n]+/, Ze = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Dr = S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ze).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Vr = S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pe).getRegex(), fe = "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", qe = /<!--(?:-?>|[\s\S]*?(?:-->|$))/,
|
|
810
|
+
})(), T = { 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]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ 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: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, Pr = /^(?:[ \t]*(?:\n|$))+/, Ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Zr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, te = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, qr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pe = /(?:[*+-]|\d{1,9}[.)])/, Wt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Qt = S(Wt).replace(/bull/g, Pe).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(), Hr = S(Wt).replace(/bull/g, Pe).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(), Ie = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, jr = /^[^\n]+/, Ze = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Dr = S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ze).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Vr = S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pe).getRegex(), fe = "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", qe = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Or = S("^ {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", qe).replace("tag", fe).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Kt = S(Ie).replace("hr", te).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", fe).getRegex(), Br = S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Kt).getRegex(), He = { blockquote: Br, code: Ir, def: Dr, fences: Zr, heading: qr, hr: te, html: Or, lheading: Qt, list: Vr, newline: Pr, paragraph: Kt, table: ee, text: jr }, Ne = S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", te).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", fe).getRegex(), Fr = { ...He, lheading: Hr, table: Ne, paragraph: S(Ie).replace("hr", te).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ne).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", fe).getRegex() }, Nr = { ...He, html: S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qe).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: ee, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: S(Ie).replace("hr", te).replace("heading", ` *#{1,6} *[^
|
|
811
811
|
]`).replace("lheading", Qt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ur = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Gr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Jt = /^( {2,}|\\)\n(?!\s*$)/, Xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, he = /[\p{P}\p{S}]/u, je = /[\s\p{P}\p{S}]/u, Yt = /[^\s\p{P}\p{S}]/u, Wr = S(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, je).getRegex(), er = /(?!~)[\p{P}\p{S}]/u, Qr = /(?!~)[\s\p{P}\p{S}]/u, Kr = /(?:[^\s\p{P}\p{S}]|~)/u, Jr = S(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Er ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), tr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Yr = S(tr, "u").replace(/punct/g, he).getRegex(), ea = S(tr, "u").replace(/punct/g, er).getRegex(), rr = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ta = S(rr, "gu").replace(/notPunctSpace/g, Yt).replace(/punctSpace/g, je).replace(/punct/g, he).getRegex(), ra = S(rr, "gu").replace(/notPunctSpace/g, Kr).replace(/punctSpace/g, Qr).replace(/punct/g, er).getRegex(), aa = S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Yt).replace(/punctSpace/g, je).replace(/punct/g, he).getRegex(), sa = S(/\\(punct)/, "gu").replace(/punct/g, he).getRegex(), ia = S(/^<(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(), na = S(qe).replace("(?:-->|$)", "-->").getRegex(), oa = S("^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", na).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), oe = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, ca = S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", oe).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ar = S(/^!?\[(label)\]\[(ref)\]/).replace("label", oe).replace("ref", Ze).getRegex(), sr = S(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ze).getRegex(), la = S("reflink|nolink(?!\\()", "g").replace("reflink", ar).replace("nolink", sr).getRegex(), Ue = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, De = { _backpedal: ee, anyPunctuation: sa, autolink: ia, blockSkip: Jr, br: Jt, code: Gr, del: ee, emStrongLDelim: Yr, emStrongRDelimAst: ta, emStrongRDelimUnd: aa, escape: Ur, link: ca, nolink: sr, punctuation: Wr, reflink: ar, reflinkSearch: la, tag: oa, text: Xr, url: ee }, ua = { ...De, link: S(/^!?\[(label)\]\((.*?)\)/).replace("label", oe).getRegex(), reflink: S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", oe).getRegex() }, ke = { ...De, emStrongRDelimAst: ra, emStrongLDelim: ea, url: S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ue).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: S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ue).getRegex() }, pa = { ...ke, br: S(Jt).replace("{2,}", "*").getRegex(), text: S(ke.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, se = { normal: He, gfm: Fr, pedantic: Nr }, W = { normal: De, gfm: ke, breaks: pa, pedantic: ua }, da = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Ge = (e) => da[e];
|
|
812
812
|
function j(e, t) {
|
|
813
813
|
if (t) {
|
|
@@ -2919,10 +2919,10 @@ function bt(e) {
|
|
|
2919
2919
|
</div>
|
|
2920
2920
|
`;
|
|
2921
2921
|
}
|
|
2922
|
-
function
|
|
2922
|
+
function Oa(e) {
|
|
2923
2923
|
return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2924
2924
|
}
|
|
2925
|
-
function
|
|
2925
|
+
function Ba(e, t = {}) {
|
|
2926
2926
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/gist\.github\.com\/([a-zA-Z0-9_-]+)\/([a-f0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
2927
2927
|
e = e.replace(a, (h, w, g, p) => vt(g, p));
|
|
2928
2928
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/gist\\.github\\.com\\/([a-zA-Z0-9_-]+)\\/([a-f0-9]+))(?!["'])`, "gi");
|
|
@@ -2950,7 +2950,7 @@ function Oa(e, t = {}) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
function vt(e, t) {
|
|
2952
2952
|
return `
|
|
2953
|
-
<div class="artifactuse-gist-wrapper" id="${
|
|
2953
|
+
<div class="artifactuse-gist-wrapper" id="${Oa("gist")}">
|
|
2954
2954
|
<script src="https://gist.github.com/${e}/${t}.js"><\/script>
|
|
2955
2955
|
</div>
|
|
2956
2956
|
`;
|
|
@@ -3311,7 +3311,7 @@ function Vt(e) {
|
|
|
3311
3311
|
</div>
|
|
3312
3312
|
`;
|
|
3313
3313
|
}
|
|
3314
|
-
let
|
|
3314
|
+
let O = null, ue = !1, Oe = !1;
|
|
3315
3315
|
function nr(e) {
|
|
3316
3316
|
const t = /<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/gi;
|
|
3317
3317
|
return e = e.replace(t, (r, a) => {
|
|
@@ -3337,11 +3337,11 @@ function cr(e) {
|
|
|
3337
3337
|
return e.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
3338
3338
|
}
|
|
3339
3339
|
function lr(e = {}) {
|
|
3340
|
-
return typeof mermaid > "u" ? ue ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), Qa().then(() => (console.log("Mermaid loaded, rendering diagrams..."),
|
|
3340
|
+
return typeof mermaid > "u" ? ue ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), Qa().then(() => (console.log("Mermaid loaded, rendering diagrams..."), Ot(e), pe())).catch((t) => {
|
|
3341
3341
|
console.error("Failed to load Mermaid library:", t), ue = !0, Wa();
|
|
3342
|
-
})) : (
|
|
3342
|
+
})) : (Oe || Ot(e), pe());
|
|
3343
3343
|
}
|
|
3344
|
-
function
|
|
3344
|
+
function Ot(e = {}) {
|
|
3345
3345
|
if (typeof mermaid > "u") return;
|
|
3346
3346
|
const r = {
|
|
3347
3347
|
dark: "dark",
|
|
@@ -3369,7 +3369,7 @@ function Bt(e = {}) {
|
|
|
3369
3369
|
theme: r
|
|
3370
3370
|
// Ensure theme is not overridden by spread
|
|
3371
3371
|
};
|
|
3372
|
-
mermaid.initialize(a),
|
|
3372
|
+
mermaid.initialize(a), Oe = !0;
|
|
3373
3373
|
}
|
|
3374
3374
|
async function pe() {
|
|
3375
3375
|
if (typeof mermaid > "u") {
|
|
@@ -3415,19 +3415,19 @@ function Me(e) {
|
|
|
3415
3415
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3416
3416
|
}
|
|
3417
3417
|
function Qa() {
|
|
3418
|
-
return
|
|
3418
|
+
return O || (typeof mermaid < "u" ? Promise.resolve() : (O = new Promise((e, t) => {
|
|
3419
3419
|
const r = setTimeout(() => {
|
|
3420
|
-
|
|
3420
|
+
O = null, t(new Error("Mermaid loading timed out after 15 seconds"));
|
|
3421
3421
|
}, 15e3), a = document.createElement("script");
|
|
3422
3422
|
a.src = "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js", a.crossOrigin = "anonymous", a.onload = () => {
|
|
3423
3423
|
clearTimeout(r), console.log("Mermaid script loaded successfully"), e();
|
|
3424
3424
|
}, a.onerror = (s) => {
|
|
3425
|
-
clearTimeout(r),
|
|
3425
|
+
clearTimeout(r), O = null, console.error("Mermaid script failed to load:", s), t(new Error("Failed to load Mermaid script from CDN"));
|
|
3426
3426
|
}, document.head.appendChild(a);
|
|
3427
|
-
}),
|
|
3427
|
+
}), O));
|
|
3428
3428
|
}
|
|
3429
3429
|
function ks() {
|
|
3430
|
-
|
|
3430
|
+
O = null, ue = !1, Oe = !1;
|
|
3431
3431
|
}
|
|
3432
3432
|
function xs() {
|
|
3433
3433
|
return typeof mermaid < "u";
|
|
@@ -3616,7 +3616,7 @@ function is() {
|
|
|
3616
3616
|
});
|
|
3617
3617
|
});
|
|
3618
3618
|
}
|
|
3619
|
-
let
|
|
3619
|
+
let B = null, de = !1;
|
|
3620
3620
|
function ur(e) {
|
|
3621
3621
|
return e = ns(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => Y(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => Y(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => Y(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => Y(r.trim(), !1)), e;
|
|
3622
3622
|
}
|
|
@@ -3642,10 +3642,10 @@ function pr(e) {
|
|
|
3642
3642
|
}
|
|
3643
3643
|
function dr() {
|
|
3644
3644
|
return typeof katex > "u" ? de ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), us().then(() => {
|
|
3645
|
-
console.log("KaTeX loaded, rendering math..."),
|
|
3645
|
+
console.log("KaTeX loaded, rendering math..."), Bt();
|
|
3646
3646
|
}).catch((e) => {
|
|
3647
3647
|
console.error("Failed to load KaTeX library:", e), de = !0, ls();
|
|
3648
|
-
})) : (
|
|
3648
|
+
})) : (Bt(), Promise.resolve());
|
|
3649
3649
|
}
|
|
3650
3650
|
function ls() {
|
|
3651
3651
|
document.querySelectorAll(".artifactuse-math-container").forEach((e) => {
|
|
@@ -3654,7 +3654,7 @@ function ls() {
|
|
|
3654
3654
|
e.innerHTML = `<code class="artifactuse-math-fallback" title="Math rendering unavailable">${Te(t)}</code>`, e.dataset.rendered = "true", e.classList.add("artifactuse-math-fallback-container");
|
|
3655
3655
|
});
|
|
3656
3656
|
}
|
|
3657
|
-
function
|
|
3657
|
+
function Bt() {
|
|
3658
3658
|
if (typeof katex > "u") {
|
|
3659
3659
|
console.warn("renderAllMath called but KaTeX is not available");
|
|
3660
3660
|
return;
|
|
@@ -3690,9 +3690,9 @@ function Te(e) {
|
|
|
3690
3690
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3691
3691
|
}
|
|
3692
3692
|
function us() {
|
|
3693
|
-
return
|
|
3693
|
+
return B || (typeof katex < "u" ? Promise.resolve() : (B = new Promise((e, t) => {
|
|
3694
3694
|
const r = setTimeout(() => {
|
|
3695
|
-
|
|
3695
|
+
B = null, t(new Error("KaTeX loading timed out after 10 seconds"));
|
|
3696
3696
|
}, 1e4), a = document.createElement("link");
|
|
3697
3697
|
a.rel = "stylesheet", a.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css", a.crossOrigin = "anonymous", a.onerror = () => {
|
|
3698
3698
|
console.warn("KaTeX CSS failed to load, math may not render correctly");
|
|
@@ -3701,12 +3701,12 @@ function us() {
|
|
|
3701
3701
|
s.src = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js", s.crossOrigin = "anonymous", s.onload = () => {
|
|
3702
3702
|
clearTimeout(r), console.log("KaTeX script loaded successfully"), e();
|
|
3703
3703
|
}, s.onerror = (i) => {
|
|
3704
|
-
clearTimeout(r),
|
|
3704
|
+
clearTimeout(r), B = null, console.error("KaTeX script failed to load:", i), t(new Error("Failed to load KaTeX script from CDN"));
|
|
3705
3705
|
}, document.head.appendChild(s);
|
|
3706
|
-
}),
|
|
3706
|
+
}), B));
|
|
3707
3707
|
}
|
|
3708
3708
|
function Ss() {
|
|
3709
|
-
|
|
3709
|
+
B = null, de = !1;
|
|
3710
3710
|
}
|
|
3711
3711
|
function Ls() {
|
|
3712
3712
|
return typeof katex < "u";
|
|
@@ -4044,7 +4044,7 @@ function Zs(e = {}) {
|
|
|
4044
4044
|
const H = Sr(R, C, t.codeExtraction);
|
|
4045
4045
|
R = H.html, D.push(...H.artifacts);
|
|
4046
4046
|
}
|
|
4047
|
-
return t.processors.images && (R = wa(R)), t.processors.imageGalleries && (R = ba(R)), t.processors.videos && (R = xa(R)), t.processors.videoGalleries && (R = za(R)), t.processors.audio && (R = _a(R, I)), t.processors.maps && (R = qa(R)), t.processors.social && (R = Ha(R, I)), t.processors.documents && (R = ja(R), R = Da(R), R = Va(R)), t.processors.codeEmbeds && (R =
|
|
4047
|
+
return t.processors.images && (R = wa(R)), t.processors.imageGalleries && (R = ba(R)), t.processors.videos && (R = xa(R)), t.processors.videoGalleries && (R = za(R)), t.processors.audio && (R = _a(R, I)), t.processors.maps && (R = qa(R)), t.processors.social && (R = Ha(R, I)), t.processors.documents && (R = ja(R), R = Da(R), R = Va(R)), t.processors.codeEmbeds && (R = Ba(R, I)), t.processors.dataViz && (R = Fa(R)), t.processors.design && (R = Na(R, I)), t.processors.interactive && (R = Ua(R, I)), t.processors.tables && (R = Ka(R)), t.processors.math && (R = ur(R)), t.processors.mermaid && (R = nr(R)), D.forEach((H) => {
|
|
4048
4048
|
r.addArtifact(H);
|
|
4049
4049
|
}), {
|
|
4050
4050
|
html: R,
|
|
@@ -4174,11 +4174,34 @@ function Zs(e = {}) {
|
|
|
4174
4174
|
destroy: P
|
|
4175
4175
|
};
|
|
4176
4176
|
}
|
|
4177
|
-
function hr(e, t) {
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4177
|
+
function hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
4178
|
+
if (!t) return e;
|
|
4179
|
+
if (!e) return t;
|
|
4180
|
+
if (typeof t == "object" && t !== null) {
|
|
4181
|
+
if (r.has(t))
|
|
4182
|
+
return t;
|
|
4183
|
+
r.add(t);
|
|
4184
|
+
}
|
|
4185
|
+
const a = { ...e };
|
|
4186
|
+
for (const s in t) {
|
|
4187
|
+
const i = t[s];
|
|
4188
|
+
if (i !== void 0) {
|
|
4189
|
+
if (i === null) {
|
|
4190
|
+
a[s] = null;
|
|
4191
|
+
continue;
|
|
4192
|
+
}
|
|
4193
|
+
if (Array.isArray(i)) {
|
|
4194
|
+
a[s] = [...i];
|
|
4195
|
+
continue;
|
|
4196
|
+
}
|
|
4197
|
+
if (typeof i == "object" && i.constructor === Object) {
|
|
4198
|
+
a[s] = hr(e[s] || {}, i, r);
|
|
4199
|
+
continue;
|
|
4200
|
+
}
|
|
4201
|
+
a[s] = i;
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
4204
|
+
return a;
|
|
4182
4205
|
}
|
|
4183
4206
|
export {
|
|
4184
4207
|
wt as $,
|
|
@@ -4212,7 +4235,7 @@ export {
|
|
|
4212
4235
|
bs as a,
|
|
4213
4236
|
Va as a0,
|
|
4214
4237
|
bt as a1,
|
|
4215
|
-
|
|
4238
|
+
Ba as a2,
|
|
4216
4239
|
vt as a3,
|
|
4217
4240
|
yt as a4,
|
|
4218
4241
|
kt as a5,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s, aH as r, ar as t, H as d, c, E as o, aY as i, ak as m, j as l, ap as b, an as E, ai as n, a4 as p, a5 as g, B as h, ac as M, aj as T, aE as u, V as A, ag as f, ah as S, ab as C, a3 as y, ao as P, _ as I, $ as G, L, M as V, o as D, ad as k, Q as F, R as z, a6 as v, T as B, A as w, aM as K, au as X, as as x, aq as H, N as O, a1 as R, Y as N, W as U, U as J, a8 as W, af as Y, F as j, G as q, a7 as Q, h as Z, aa as _, k as $, S as aa, P as ea, am as sa, w as ra, u as ta, x as da, z as ca, y as oa, J as ia, aX as ma, aG as la, e as ba, aJ as Ea, aZ as na, aR as pa, az as ga, aU as ha, aW as Ma, aV as Ta, I as ua, aN as Aa, av as fa, aK as Sa, d as Ca, aQ as ya, ay as Pa, i as Ia, s as Ga, aO as La, aw as Va, aT as Da, n as ka, p as Fa, ae as za, C as va, a2 as Ba, a9 as wa, Z as Ka, m as Xa, l as xa, al as Ha, K as Oa, aL as Ra, aS as Na, at as Ua, aA as Ja, a0 as Wa, X as Ya, O as ja, aD as qa, v as Qa, q as Za, r as _a, t as $a, aB as ae, aP as ee, ax as se, aI as re, aF as te, aC as de } from "./index-
|
|
1
|
+
import { D as s, aH as r, ar as t, H as d, c, E as o, aY as i, ak as m, j as l, ap as b, an as E, ai as n, a4 as p, a5 as g, B as h, ac as M, aj as T, aE as u, V as A, ag as f, ah as S, ab as C, a3 as y, ao as P, _ as I, $ as G, L, M as V, o as D, ad as k, Q as F, R as z, a6 as v, T as B, A as w, aM as K, au as X, as as x, aq as H, N as O, a1 as R, Y as N, W as U, U as J, a8 as W, af as Y, F as j, G as q, a7 as Q, h as Z, aa as _, k as $, S as aa, P as ea, am as sa, w as ra, u as ta, x as da, z as ca, y as oa, J as ia, aX as ma, aG as la, e as ba, aJ as Ea, aZ as na, aR as pa, az as ga, aU as ha, aW as Ma, aV as Ta, I as ua, aN as Aa, av as fa, aK as Sa, d as Ca, aQ as ya, ay as Pa, i as Ia, s as Ga, aO as La, aw as Va, aT as Da, n as ka, p as Fa, ae as za, C as va, a2 as Ba, a9 as wa, Z as Ka, m as Xa, l as xa, al as Ha, K as Oa, aL as Ra, aS as Na, at as Ua, aA as Ja, a0 as Wa, X as Ya, O as ja, aD as qa, v as Qa, q as Za, r as _a, t as $a, aB as ae, aP as ee, ax as se, aI as re, aF as te, aC as de } from "./index-84VxwPLd.js";
|
|
2
2
|
export {
|
|
3
3
|
s as DEFAULT_PANELS,
|
|
4
4
|
r as copyTableToClipboard,
|
package/dist/react/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e, { useState as C, useMemo as $, useCallback as d, useRef as W, useEffect as z, createContext as Ze, useContext as Ke } from "react";
|
|
2
|
-
import { g as we, f as je, a as qe, b as Re, n as Ye, i as Ge, D as Oe, c as Qe } from "../index-
|
|
2
|
+
import { g as we, f as je, a as qe, b as Re, n as Ye, i as Ge, D as Oe, c as Qe } from "../index-84VxwPLd.js";
|
|
3
3
|
import { J as et } from "../jszip.min-CdmYyw5L.js";
|
|
4
4
|
import { createPortal as tt } from "react-dom";
|
|
5
5
|
function at({
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writable as wt, derived as Rt } from "svelte/store";
|
|
2
2
|
import { createEventDispatcher as Ct, onMount as $t, onDestroy as St, tick as Dt, setContext as za, getContext as Ma } from "svelte";
|
|
3
|
-
import { g as ht, f as Yt, a as Ft, b as Gt, n as ua, i as qa, D as Ia, c as Ha } from "../index-
|
|
3
|
+
import { g as ht, f as Yt, a as Ft, b as Gt, n as ua, i as qa, D as Ia, c as Ha } from "../index-84VxwPLd.js";
|
|
4
4
|
import "svelte/internal/disclose-version";
|
|
5
5
|
import "svelte/internal/flags/legacy";
|
|
6
6
|
import * as e from "svelte/internal/client";
|
package/dist/vue/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as A, computed as C, createElementBlock as a, openBlock as t, normalizeClass as j, createElementVNode as e, toDisplayString as i, withModifiers as fe, onMounted as ge, watch as ue, Fragment as I, createCommentVNode as p, renderList as ce, createTextVNode as J, h as ae, normalizeStyle as $e, createStaticVNode as at, createBlock as ye, resolveDynamicComponent as st, nextTick as he, onUnmounted as Fe, Teleport as Ue, createVNode as be, Transition as Me, withCtx as Le, withKeys as it, onBeforeUnmount as lt, unref as k, reactive as Ne, provide as nt, inject as ot } from "vue";
|
|
2
|
-
import { g as Te, f as je, a as Ie, b as qe, n as rt, i as ct, D as ut, c as Je } from "../index-
|
|
2
|
+
import { g as Te, f as je, a as Ie, b as qe, n as rt, i as ct, D as ut, c as Je } from "../index-84VxwPLd.js";
|
|
3
3
|
import { J as dt } from "../jszip.min-CdmYyw5L.js";
|
|
4
4
|
const vt = { class: "artifactuse-card__icon" }, ft = ["innerHTML"], pt = { class: "artifactuse-card__content" }, mt = { class: "artifactuse-card__title" }, _t = { class: "artifactuse-card__meta" }, ht = { class: "artifactuse-card__type" }, yt = { class: "artifactuse-card__size" }, gt = { class: "artifactuse-card__actions" }, kt = ["title"], wt = {
|
|
5
5
|
key: 0,
|
package/dist/vue2/index.js
CHANGED
|
@@ -6078,20 +6078,52 @@ function createArtifactuse(userConfig = {}) {
|
|
|
6078
6078
|
};
|
|
6079
6079
|
}
|
|
6080
6080
|
|
|
6081
|
+
|
|
6081
6082
|
/**
|
|
6082
6083
|
* Deep merge configuration
|
|
6084
|
+
* Handles circular references and special objects
|
|
6083
6085
|
*/
|
|
6084
|
-
function mergeConfig(defaults, overrides) {
|
|
6086
|
+
function mergeConfig(defaults, overrides, seen = new WeakSet()) {
|
|
6087
|
+
// Handle null/undefined
|
|
6088
|
+
if (!overrides) return defaults;
|
|
6089
|
+
if (!defaults) return overrides;
|
|
6090
|
+
|
|
6091
|
+
// Prevent circular references
|
|
6092
|
+
if (typeof overrides === 'object' && overrides !== null) {
|
|
6093
|
+
if (seen.has(overrides)) {
|
|
6094
|
+
return overrides; // Return as-is to prevent infinite loop
|
|
6095
|
+
}
|
|
6096
|
+
seen.add(overrides);
|
|
6097
|
+
}
|
|
6098
|
+
|
|
6085
6099
|
const result = { ...defaults };
|
|
6086
6100
|
|
|
6087
6101
|
for (const key in overrides) {
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6102
|
+
const value = overrides[key];
|
|
6103
|
+
|
|
6104
|
+
// Skip undefined
|
|
6105
|
+
if (value === undefined) continue;
|
|
6106
|
+
|
|
6107
|
+
// Handle null - explicit null means "unset"
|
|
6108
|
+
if (value === null) {
|
|
6109
|
+
result[key] = null;
|
|
6110
|
+
continue;
|
|
6111
|
+
}
|
|
6112
|
+
|
|
6113
|
+
// Handle arrays - replace, don't merge
|
|
6114
|
+
if (Array.isArray(value)) {
|
|
6115
|
+
result[key] = [...value];
|
|
6116
|
+
continue;
|
|
6094
6117
|
}
|
|
6118
|
+
|
|
6119
|
+
// Handle plain objects - recurse
|
|
6120
|
+
if (typeof value === 'object' && value.constructor === Object) {
|
|
6121
|
+
result[key] = mergeConfig(defaults[key] || {}, value, seen);
|
|
6122
|
+
continue;
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
// Handle primitives and special objects (Date, RegExp, Vue refs, etc.)
|
|
6126
|
+
result[key] = value;
|
|
6095
6127
|
}
|
|
6096
6128
|
|
|
6097
6129
|
return result;
|