@dskripchenko/ui 1.18.0 → 1.19.0
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.cjs +3 -3
- package/dist/index.mjs +27 -19
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7038,18 +7038,23 @@ function Ml(e, t, n = !1) {
|
|
|
7038
7038
|
}
|
|
7039
7039
|
}
|
|
7040
7040
|
function Nl(e, t = {}) {
|
|
7041
|
-
let n = [], r = (e) => `${n.push(e) - 1}`, i = e.replace(
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
let
|
|
7049
|
-
|
|
7050
|
-
let
|
|
7051
|
-
|
|
7052
|
-
|
|
7041
|
+
let n = [], r = (e) => `${n.push(e) - 1}`, i = e.replace(/(?<![`\\])(`+)(?!`)([\s\S]*?[^`])\1(?!`)/g, (e, t, n) => r(`<code>${(/^ [\s\S]* $/.test(n) && n.trim() !== "" ? n.slice(1, -1) : n).replace(/\n/g, " ")}</code>`));
|
|
7042
|
+
i = i.replace(/(?:\\| {2,})\n/g, () => r("<br>")), i = i.replace(/\\(&(?:lt|gt|amp|quot|#39);|[!-/:-@[-`{-~])/g, (e, t) => r(t));
|
|
7043
|
+
let a = (e) => e ? ` title="${e}"` : "";
|
|
7044
|
+
i = i.replace(/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"([^)]*?)")?\)/g, (e, n, i, o) => {
|
|
7045
|
+
let s = Al(i);
|
|
7046
|
+
return s === null ? e : (t.imageBase && jl(s) && (s = Ml(s, t.imageBase)), r(`<img src="${s}" alt="${n}"${a(o)} loading="lazy">`));
|
|
7047
|
+
}), i = i.replace(/\[([^\]]+)\]\(([^)\s]+)(?:\s+"([^)]*?)")?\)/g, (e, n, i, o) => {
|
|
7048
|
+
let s = Al(i);
|
|
7049
|
+
if (s === null) return e;
|
|
7050
|
+
let c = jl(s);
|
|
7051
|
+
t.linkBase && c && (s = Ml(s, t.linkBase, t.stripMdExtension ?? !1));
|
|
7052
|
+
let l = /^(https?:)?\/\//i.test(s) || /^mailto:/i.test(s);
|
|
7053
|
+
return r(t.internalLinksInPlace === !0 && !l ? `<a href="${s}"${a(o)}>${n}</a>` : `<a href="${s}"${a(o)} target="_blank" rel="noopener noreferrer">${n}</a>`);
|
|
7054
|
+
}), i = i.replace(/\*\*(?=\S)(.+?)(?<=\S)\*\*/g, "<strong>$1</strong>").replace(/(?<!\w)__(?=\S)(.+?)(?<=\S)__(?!\w)/g, "<strong>$1</strong>").replace(/\*(?=\S)(.+?)(?<=\S)\*/g, "<em>$1</em>").replace(/(?<!\w)_(?=\S)(.+?)(?<=\S)_(?!\w)/g, "<em>$1</em>").replace(/~~(?=\S)(.+?)(?<=\S)~~/g, "<del>$1</del>");
|
|
7055
|
+
let o = "";
|
|
7056
|
+
for (; o !== i;) o = i, i = i.replace(/(\d+)/g, (e, t) => n[Number(t)] ?? "");
|
|
7057
|
+
return i;
|
|
7053
7058
|
}
|
|
7054
7059
|
function Pl(e) {
|
|
7055
7060
|
return Dl(e.replace(/<[^>]+>/g, ""));
|
|
@@ -7086,13 +7091,16 @@ function Bl(e, t = {}) {
|
|
|
7086
7091
|
i.length > 0 && (r.push(`<p>${a(i.join("\n"))}</p>`), i = []);
|
|
7087
7092
|
};
|
|
7088
7093
|
for (let e = 0; e < n.length; e++) {
|
|
7089
|
-
let s = n[e] ?? "", c = /^\s*(
|
|
7094
|
+
let s = n[e] ?? "", c = /^\s*(`{3,}|~{3,})\s*([\w+#.-]*)[^`]*$/.exec(s);
|
|
7090
7095
|
if (c) {
|
|
7091
7096
|
o();
|
|
7092
|
-
let t = []
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7097
|
+
let t = [], i = c[1] ?? "```", a = (e) => {
|
|
7098
|
+
let t = e.trim();
|
|
7099
|
+
return t.length >= i.length && t[0] === i[0] && /^(`+|~+)$/.test(t);
|
|
7100
|
+
};
|
|
7101
|
+
for (e++; e < n.length && !a(n[e] ?? "");) t.push(n[e] ?? ""), e++;
|
|
7102
|
+
let s = c[2] ? ` class="language-${c[2]}"` : "";
|
|
7103
|
+
r.push(`<pre><code${s}>${t.join("\n")}</code></pre>`);
|
|
7096
7104
|
continue;
|
|
7097
7105
|
}
|
|
7098
7106
|
if (s.trim() === "") {
|
|
@@ -10990,7 +10998,7 @@ var vd = ["aria-label"], yd = [
|
|
|
10990
10998
|
}
|
|
10991
10999
|
function x(e, t, n, r) {
|
|
10992
11000
|
let i = d.value;
|
|
10993
|
-
i === null || !_(i.card, t, i.from)
|
|
11001
|
+
i !== null && e.stopPropagation(), !(i === null || !_(i.card, t, i.from)) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "move"), f.value = {
|
|
10994
11002
|
column: t.key,
|
|
10995
11003
|
lane: n?.key ?? null,
|
|
10996
11004
|
beforeKey: r
|
|
@@ -10998,7 +11006,7 @@ var vd = ["aria-label"], yd = [
|
|
|
10998
11006
|
}
|
|
10999
11007
|
function S(e, t, n) {
|
|
11000
11008
|
let r = d.value;
|
|
11001
|
-
if (r === null || !_(r.card, t, r.from)) return;
|
|
11009
|
+
if (r !== null && e.stopPropagation(), r === null || !_(r.card, t, r.from)) return;
|
|
11002
11010
|
e.preventDefault();
|
|
11003
11011
|
let i = f.value?.column === t.key ? f.value.beforeKey : null;
|
|
11004
11012
|
C(r.card, r.from, t, n, i), y();
|