@zjlab-frontier/markdown 1.0.19 → 1.0.20
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/{arc-C0V0Xas2.mjs → arc-Bmi5t8KK.mjs} +1 -1
- package/dist/{blockDiagram-c4efeb88-C7qAjeEm.mjs → blockDiagram-c4efeb88-Dd0x6JTg.mjs} +5 -5
- package/dist/{c4Diagram-c83219d4-BTYNJnbj.mjs → c4Diagram-c83219d4-D3D4s9q1.mjs} +2 -2
- package/dist/{channel-CbALsbn_.mjs → channel-wqHDK2Vk.mjs} +1 -1
- package/dist/{classDiagram-beda092f-Dr7n-UEJ.mjs → classDiagram-beda092f-ZzL6ZuZg.mjs} +5 -5
- package/dist/{classDiagram-v2-2358418a-DGSuh8gV.mjs → classDiagram-v2-2358418a-BFf1C0SA.mjs} +5 -5
- package/dist/{clone-DRTgEhMR.mjs → clone-CtyKi4pv.mjs} +1 -1
- package/dist/createText-1719965b-CZfUO5kz.mjs +2955 -0
- package/dist/{edges-96097737-DYBAZ7Cf.mjs → edges-96097737-Dusc1b_j.mjs} +3 -3
- package/dist/{erDiagram-0228fc6a-C7YU6eC6.mjs → erDiagram-0228fc6a-DutRPDlF.mjs} +4 -4
- package/dist/{flowDb-c6c81e3f-DtLMxFh-.mjs → flowDb-c6c81e3f-BjYaNdgw.mjs} +1 -1
- package/dist/{flowDiagram-50d868cf-D5SrQJfF.mjs → flowDiagram-50d868cf-DA1fybVO.mjs} +6 -6
- package/dist/{flowDiagram-v2-4f6560a1-BJZ53woc.mjs → flowDiagram-v2-4f6560a1-B8E2EFyO.mjs} +5 -5
- package/dist/{flowchart-elk-definition-6af322e1-CbHdgrdV.mjs → flowchart-elk-definition-6af322e1-BUHRnUOc.mjs} +4 -4
- package/dist/{ganttDiagram-a2739b55-Be2zS4kl.mjs → ganttDiagram-a2739b55-DTBniGMY.mjs} +2 -2
- package/dist/{gitGraphDiagram-82fe8481-Cm6I7l1-.mjs → gitGraphDiagram-82fe8481-dtMfCAcI.mjs} +1 -1
- package/dist/{graph-5UQmUuwL.mjs → graph-YqjZta1-.mjs} +1 -1
- package/dist/{index-UdoG6ua5.mjs → index-1CNW5FsF.mjs} +19010 -17390
- package/dist/{index-5325376f-CpO81XCH.mjs → index-5325376f-BvIGCGnK.mjs} +6 -6
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +385 -381
- package/dist/{infoDiagram-8eee0895-CUXb23yj.mjs → infoDiagram-8eee0895-BoorTk5E.mjs} +1 -1
- package/dist/{journeyDiagram-c64418c1-BN7sSab2.mjs → journeyDiagram-c64418c1-bfy7opJJ.mjs} +3 -3
- package/dist/{layout-DZN9LbJA.mjs → layout-gqtC3BaP.mjs} +2 -2
- package/dist/{line-CO7XQme0.mjs → line-BQrGRLem.mjs} +1 -1
- package/dist/{linear-BtSivjwd.mjs → linear-BlnO0k7G.mjs} +1 -1
- package/dist/{mindmap-definition-8da855dc-BY-BPQtz.mjs → mindmap-definition-8da855dc-CY83fkM3.mjs} +2 -2
- package/dist/{pieDiagram-a8764435-BXwr3988.mjs → pieDiagram-a8764435-D-4PvRHe.mjs} +2 -2
- package/dist/{quadrantDiagram-1e28029f-Ra05Yya9.mjs → quadrantDiagram-1e28029f-pzlP9p9m.mjs} +2 -2
- package/dist/{requirementDiagram-08caed73-jv7fzKIu.mjs → requirementDiagram-08caed73-C4hpIgzM.mjs} +4 -4
- package/dist/{sankeyDiagram-a04cb91d-sF3N87GW.mjs → sankeyDiagram-a04cb91d-D-RVjLag.mjs} +1 -1
- package/dist/{sequenceDiagram-c5b8d532-D038V64U.mjs → sequenceDiagram-c5b8d532-CqUH37-4.mjs} +2 -2
- package/dist/{stateDiagram-1ecb1508-CaqSum8G.mjs → stateDiagram-1ecb1508-DToPpofg.mjs} +5 -5
- package/dist/{stateDiagram-v2-c2b004d7-CviojMby.mjs → stateDiagram-v2-c2b004d7-DtoBK6eZ.mjs} +5 -5
- package/dist/{styles-b4e223ce-_KiXw4ze.mjs → styles-b4e223ce-yS3By_tE.mjs} +1 -1
- package/dist/{styles-ca3715f6-krUd-PYA.mjs → styles-ca3715f6-CFUyt9WC.mjs} +1 -1
- package/dist/{styles-d45a18b0-WogXz50D.mjs → styles-d45a18b0-DbqSLl-5.mjs} +4 -4
- package/dist/{svgDrawCommon-b86b1483-Bc1SgPf5.mjs → svgDrawCommon-b86b1483-vSp9aK34.mjs} +1 -1
- package/dist/{timeline-definition-faaaa080-CCog6qKe.mjs → timeline-definition-faaaa080-DekReGSM.mjs} +2 -2
- package/dist/{xychartDiagram-f5964ef8-goxkOq6_.mjs → xychartDiagram-f5964ef8-BW3WJ8FQ.mjs} +4 -4
- package/package.json +10 -10
- package/dist/createText-1719965b-BZlvdmzh.mjs +0 -155
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as yt, s as ft, b as dt, c as pt, C as gt, D as mt, g as C, d as H, e as xt, E as kt } from "./index-
|
|
2
|
-
import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-b86b1483-
|
|
3
|
-
import { a as Q } from "./arc-
|
|
1
|
+
import { a as yt, s as ft, b as dt, c as pt, C as gt, D as mt, g as C, d as H, e as xt, E as kt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-b86b1483-vSp9aK34.mjs";
|
|
3
|
+
import { a as Q } from "./arc-Bmi5t8KK.mjs";
|
|
4
4
|
var X = (function() {
|
|
5
5
|
var t = function(p, s, r, a) {
|
|
6
6
|
for (r = r || {}, a = p.length; a--; r[p[a]] = s)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as S, b as be, c as qe, d as O, k as We, e as ze, f as Xe, g as T, h as me, j as ge, l as He, m as ye, t as Ue, n as xe, o as Je, p as Ke, G as g, q as s, i as m, r as I, v as E, s as G } from "./graph-
|
|
2
|
-
import { a7 as F, a8 as Ze, a9 as Qe, aa as Ee, ab as A, ac as ke, ad as en, ae as Oe, af as U, ag as nn, ah as rn, ai as J, aj as tn, ak as Ne, al as an, am as on, an as X } from "./index-
|
|
1
|
+
import { a as S, b as be, c as qe, d as O, k as We, e as ze, f as Xe, g as T, h as me, j as ge, l as He, m as ye, t as Ue, n as xe, o as Je, p as Ke, G as g, q as s, i as m, r as I, v as E, s as G } from "./graph-YqjZta1-.mjs";
|
|
2
|
+
import { a7 as F, a8 as Ze, a9 as Qe, aa as Ee, ab as A, ac as ke, ad as en, ae as Oe, af as U, ag as nn, ah as rn, ai as J, aj as tn, ak as Ne, al as an, am as on, an as X } from "./index-1CNW5FsF.mjs";
|
|
3
3
|
var un = /\s/;
|
|
4
4
|
function dn(e) {
|
|
5
5
|
for (var n = e.length; n-- && un.test(e.charAt(n)); )
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as un, $ as I, a0 as U, a1 as fn, a2 as Y } from "./index-
|
|
1
|
+
import { _ as un, $ as I, a0 as U, a1 as fn, a2 as Y } from "./index-1CNW5FsF.mjs";
|
|
2
2
|
import { i as cn } from "./init-DjUOC4st.mjs";
|
|
3
3
|
function F(n, t) {
|
|
4
4
|
return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
|
package/dist/{mindmap-definition-8da855dc-BY-BPQtz.mjs → mindmap-definition-8da855dc-CY83fkM3.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as yv, l as Nr, ar as mv, as as bv, at as wv, g as ao, T as Ev, o as xv, X as Cn, i as Dn, d as Tv, W as Cv } from "./index-
|
|
2
|
-
import { a as Dv } from "./createText-1719965b-
|
|
1
|
+
import { P as yv, l as Nr, ar as mv, as as bv, at as wv, g as ao, T as Ev, o as xv, X as Cn, i as Dn, d as Tv, W as Cv } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { a as Dv } from "./createText-1719965b-CZfUO5kz.mjs";
|
|
3
3
|
function Bs(t, e) {
|
|
4
4
|
(e == null || e > t.length) && (e = t.length);
|
|
5
5
|
for (var r = 0, a = Array(e); r < e; r++) a[r] = t[r];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { U as H, a as rt, s as at, b as lt, c as ot, C as ct, D as ht, l as et, g as it, V as ut, T as yt, W as ft, e as pt, i as gt, E as dt, X as mt } from "./index-
|
|
2
|
-
import { a as tt } from "./arc-
|
|
1
|
+
import { U as H, a as rt, s as at, b as lt, c as ot, C as ct, D as ht, l as et, g as it, V as ut, T as yt, W as ft, e as pt, i as gt, E as dt, X as mt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { a as tt } from "./arc-Bmi5t8KK.mjs";
|
|
3
3
|
import { o as _t } from "./ordinal-C0oynhte.mjs";
|
|
4
4
|
import { a as xt } from "./array-CqVTtuYm.mjs";
|
|
5
5
|
import { c as F } from "./path-DLwuMfdd.mjs";
|
package/dist/{quadrantDiagram-1e28029f-Ra05Yya9.mjs → quadrantDiagram-1e28029f-pzlP9p9m.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as vt, a as Lt, C as bt, D as Ct, b as zt, c as Et, g as yt, l as ot, d as gt, e as Dt, E as It, X as D, Y as Bt, i as wt } from "./index-
|
|
2
|
-
import { l as mt } from "./linear-
|
|
1
|
+
import { s as vt, a as Lt, C as bt, D as Ct, b as zt, c as Et, g as yt, l as ot, d as gt, e as Dt, E as It, X as D, Y as Bt, i as wt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { l as mt } from "./linear-BlnO0k7G.mjs";
|
|
3
3
|
var pt = (function() {
|
|
4
4
|
var e = function(K, n, r, l) {
|
|
5
5
|
for (r = r || {}, l = K.length; l--; r[K[l]] = n)
|
package/dist/{requirementDiagram-08caed73-jv7fzKIu.mjs → requirementDiagram-08caed73-C4hpIgzM.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Ce, s as Fe, b as Me, c as De, g as Te, d as oe, e as Pe, E as Ye, l as Ne, k as ke } from "./index-
|
|
2
|
-
import { G as Ue } from "./graph-
|
|
3
|
-
import { l as Be } from "./layout-
|
|
4
|
-
import { l as Qe } from "./line-
|
|
1
|
+
import { a as Ce, s as Fe, b as Me, c as De, g as Te, d as oe, e as Pe, E as Ye, l as Ne, k as ke } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { G as Ue } from "./graph-YqjZta1-.mjs";
|
|
3
|
+
import { l as Be } from "./layout-gqtC3BaP.mjs";
|
|
4
|
+
import { l as Qe } from "./line-BQrGRLem.mjs";
|
|
5
5
|
var ce = (function() {
|
|
6
6
|
var e = function(V, i, r, a) {
|
|
7
7
|
for (r = r || {}, a = V.length; a--; r[V[a]] = i)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as mt, C as kt, s as _t, a as xt, c as vt, b as bt, g as rt, aq as wt, d as G, o as St, E as Lt, k as Et } from "./index-
|
|
1
|
+
import { D as mt, C as kt, s as _t, a as xt, c as vt, b as bt, g as rt, aq as wt, d as G, o as St, E as Lt, k as Et } from "./index-1CNW5FsF.mjs";
|
|
2
2
|
import { o as At } from "./ordinal-C0oynhte.mjs";
|
|
3
3
|
import { s as Tt } from "./Tableau10-D7jGxypv.mjs";
|
|
4
4
|
function ot(t, n) {
|
package/dist/{sequenceDiagram-c5b8d532-D038V64U.mjs → sequenceDiagram-c5b8d532-CqUH37-4.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as we, s as ve, c as $t, g as st, D as _e, C as ke, b as Pe, d as Lt, l as X, j as te, e as Le, f as Ie, k as v, i as At, E as Ae, B, a3 as nt, a4 as wt, W as ee, a5 as Ne, t as se, Z as Bt } from "./index-
|
|
2
|
-
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./svgDrawCommon-b86b1483-
|
|
1
|
+
import { a as we, s as ve, c as $t, g as st, D as _e, C as ke, b as Pe, d as Lt, l as X, j as te, e as Le, f as Ie, k as v, i as At, E as Ae, B, a3 as nt, a4 as wt, W as ee, a5 as Ne, t as se, Z as Bt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { a as Se, b as zt, d as Me, g as Nt, c as Re, e as Ce } from "./svgDrawCommon-b86b1483-vSp9aK34.mjs";
|
|
3
3
|
var Yt = (function() {
|
|
4
4
|
var t = function(dt, w, k, L) {
|
|
5
5
|
for (k = k || {}, L = dt.length; L--; k[dt[L]] = w)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as P, d as N, p as W } from "./styles-ca3715f6-
|
|
2
|
-
import { g as t, d as H, l as b, e as R, k as T, F as v, B as U } from "./index-
|
|
3
|
-
import { G as C } from "./graph-
|
|
4
|
-
import { l as F } from "./layout-
|
|
5
|
-
import { l as $ } from "./line-
|
|
1
|
+
import { s as P, d as N, p as W } from "./styles-ca3715f6-CFUyt9WC.mjs";
|
|
2
|
+
import { g as t, d as H, l as b, e as R, k as T, F as v, B as U } from "./index-1CNW5FsF.mjs";
|
|
3
|
+
import { G as C } from "./graph-YqjZta1-.mjs";
|
|
4
|
+
import { l as F } from "./layout-gqtC3BaP.mjs";
|
|
5
|
+
import { l as $ } from "./line-BQrGRLem.mjs";
|
|
6
6
|
const O = (e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), X = (e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), J = (e, i) => {
|
|
7
7
|
const o = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = o.node().getBBox();
|
|
8
8
|
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), o;
|
package/dist/{stateDiagram-v2-c2b004d7-CviojMby.mjs → stateDiagram-v2-c2b004d7-DtoBK6eZ.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as Q, d as B, p as X, D as Z, a as H, b as F, S as m, c as I } from "./styles-ca3715f6-
|
|
2
|
-
import { G as tt } from "./graph-
|
|
3
|
-
import { l as E, g, d as x, B as et, e as ot, k as w } from "./index-
|
|
4
|
-
import { r as st } from "./index-5325376f-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { s as Q, d as B, p as X, D as Z, a as H, b as F, S as m, c as I } from "./styles-ca3715f6-CFUyt9WC.mjs";
|
|
2
|
+
import { G as tt } from "./graph-YqjZta1-.mjs";
|
|
3
|
+
import { l as E, g, d as x, B as et, e as ot, k as w } from "./index-1CNW5FsF.mjs";
|
|
4
|
+
import { r as st } from "./index-5325376f-BvIGCGnK.mjs";
|
|
5
|
+
import "./layout-gqtC3BaP.mjs";
|
|
6
6
|
const h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", p = "statediagram", dt = "state", Et = `${p}-${dt}`, U = "transition", St = "note", Tt = "note-edge", _t = `${U} ${Tt}`, pt = `${p}-${St}`, ut = "cluster", Dt = `${p}-${ut}`, bt = "cluster-alt", ft = `${p}-${bt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, M = `${N}${V}`, W = "fill:none", z = "fill: #333", q = "c", K = "text", j = "normal";
|
|
7
7
|
let y = {}, d = 0;
|
|
8
8
|
const yt = function(t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ut, D as rt, g as F, s as at, a as lt, b as ct, c as ot, k as v, B as We, l as ht, E as At, i as pt, G as Re, d as z } from "./index-
|
|
1
|
+
import { C as ut, D as rt, g as F, s as at, a as lt, b as ct, c as ot, k as v, B as We, l as ht, E as At, i as pt, G as Re, d as z } from "./index-1CNW5FsF.mjs";
|
|
2
2
|
var Ve = (function() {
|
|
3
3
|
var e = function(x, u, a, h) {
|
|
4
4
|
for (a = a || {}, h = x.length; h--; a[x[h]] = u)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Ut, D as zt, s as Mt, a as Ht, c as Xt, b as Kt, g as Y, k as ot, l as D, E as Wt, a6 as Jt } from "./index-
|
|
1
|
+
import { C as Ut, D as zt, s as Mt, a as Ht, c as Xt, b as Kt, g as Y, k as ot, l as D, E as Wt, a6 as Jt } from "./index-1CNW5FsF.mjs";
|
|
2
2
|
var gt = (function() {
|
|
3
3
|
var t = function(C, r, n, i) {
|
|
4
4
|
for (n = n || {}, i = C.length; i--; n[C[i]] = r)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as z, v as R, x as F, y as U, z as j, A as H, l as g, g as S, d as C, B as K, o as W, p as N, q as E, n as L, t as G, k as q, r as X } from "./index-
|
|
2
|
-
import { G as J } from "./graph-
|
|
3
|
-
import { r as Q } from "./index-5325376f-
|
|
4
|
-
import { c as Y } from "./channel-
|
|
1
|
+
import { S as z, v as R, x as F, y as U, z as j, A as H, l as g, g as S, d as C, B as K, o as W, p as N, q as E, n as L, t as G, k as q, r as X } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { G as J } from "./graph-YqjZta1-.mjs";
|
|
3
|
+
import { r as Q } from "./index-5325376f-BvIGCGnK.mjs";
|
|
4
|
+
import { c as Y } from "./channel-wqHDK2Vk.mjs";
|
|
5
5
|
function Z(e) {
|
|
6
6
|
return typeof e == "string" ? new z([document.querySelectorAll(e)], [document.documentElement]) : new z([F(e)], R);
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ao as o, j as i } from "./index-
|
|
1
|
+
import { ao as o, j as i } from "./index-1CNW5FsF.mjs";
|
|
2
2
|
const l = (s, t) => {
|
|
3
3
|
const e = s.append("rect");
|
|
4
4
|
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
|
package/dist/{timeline-definition-faaaa080-CCog6qKe.mjs → timeline-definition-faaaa080-DekReGSM.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ar as gt, as as ft, at as mt, g as xt, l as E, d as G, o as _t, au as bt, E as kt } from "./index-
|
|
2
|
-
import { a as D } from "./arc-
|
|
1
|
+
import { ar as gt, as as ft, at as mt, g as xt, l as E, d as G, o as _t, au as bt, E as kt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { a as D } from "./arc-Bmi5t8KK.mjs";
|
|
3
3
|
var K = (function() {
|
|
4
4
|
var n = function(f, i, r, c) {
|
|
5
5
|
for (r = r || {}, c = f.length; c--; r[f[c]] = i)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as zt, a as Ft, C as wt, D as Nt, b as Xt, c as Yt, l as St, T as Ht, e as $t, E as Ut, Z as ot, V as Ct, X as qt, Y as jt, i as Gt } from "./index-
|
|
2
|
-
import { c as Qt } from "./createText-1719965b-
|
|
1
|
+
import { s as zt, a as Ft, C as wt, D as Nt, b as Xt, c as Yt, l as St, T as Ht, e as $t, E as Ut, Z as ot, V as Ct, X as qt, Y as jt, i as Gt } from "./index-1CNW5FsF.mjs";
|
|
2
|
+
import { c as Qt } from "./createText-1719965b-CZfUO5kz.mjs";
|
|
3
3
|
import { i as Kt } from "./init-DjUOC4st.mjs";
|
|
4
4
|
import { o as Zt } from "./ordinal-C0oynhte.mjs";
|
|
5
|
-
import { l as ft } from "./linear-
|
|
6
|
-
import { l as pt } from "./line-
|
|
5
|
+
import { l as ft } from "./linear-BlnO0k7G.mjs";
|
|
6
|
+
import { l as pt } from "./line-BQrGRLem.mjs";
|
|
7
7
|
function Jt(e, t, i) {
|
|
8
8
|
e = +e, t = +t, i = (n = arguments.length) < 2 ? (t = e, e = 0, 1) : n < 3 ? 1 : +i;
|
|
9
9
|
for (var s = -1, n = Math.max(0, Math.ceil((t - e) / i)) | 0, o = new Array(n); ++s < n; )
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zjlab-frontier/markdown",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Framework-agnostic Markdown component with support for Mermaid, KaTeX, and code highlighting. Core library is React-free; React adapter available optionally.",
|
|
5
5
|
"main": "dist/index.umd.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"react": "^
|
|
28
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
29
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
29
30
|
},
|
|
30
31
|
"peerDependenciesMeta": {
|
|
31
32
|
"react": {
|
|
@@ -34,15 +35,14 @@
|
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"clsx": "^1.2.1",
|
|
37
|
-
"katex": "^0.16.0",
|
|
38
38
|
"mermaid": "^10.0.0",
|
|
39
|
-
"react-markdown": "^
|
|
40
|
-
"rehype-highlight": "^
|
|
41
|
-
"rehype-katex": "^
|
|
42
|
-
"rehype-raw": "^
|
|
43
|
-
"remark-breaks": "^
|
|
44
|
-
"remark-gfm": "^
|
|
45
|
-
"remark-math": "^
|
|
39
|
+
"react-markdown": "^9.1.0",
|
|
40
|
+
"rehype-highlight": "^7.0.2",
|
|
41
|
+
"rehype-katex": "^7.0.1",
|
|
42
|
+
"rehype-raw": "^7.0.0",
|
|
43
|
+
"remark-breaks": "^4.0.0",
|
|
44
|
+
"remark-gfm": "^4.0.0",
|
|
45
|
+
"remark-math": "^6.0.0",
|
|
46
46
|
"use-debounce": "^9.0.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { l as b, b6 as T, b7 as m, i as W, Z as E, b8 as w } from "./index-UdoG6ua5.mjs";
|
|
2
|
-
function S(n) {
|
|
3
|
-
const t = n.replace(/\n{2,}/g, `
|
|
4
|
-
`);
|
|
5
|
-
return w(t);
|
|
6
|
-
}
|
|
7
|
-
function j(n) {
|
|
8
|
-
const t = S(n), { children: e } = m(t), o = [[]];
|
|
9
|
-
let s = 0;
|
|
10
|
-
function i(r, a = "normal") {
|
|
11
|
-
r.type === "text" ? r.value.split(`
|
|
12
|
-
`).forEach((l, p) => {
|
|
13
|
-
p !== 0 && (s++, o.push([])), l.split(" ").forEach((f) => {
|
|
14
|
-
f && o[s].push({ content: f, type: a });
|
|
15
|
-
});
|
|
16
|
-
}) : (r.type === "strong" || r.type === "emphasis") && r.children.forEach((c) => {
|
|
17
|
-
i(c, r.type);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return e.forEach((r) => {
|
|
21
|
-
r.type === "paragraph" && r.children.forEach((a) => {
|
|
22
|
-
i(a);
|
|
23
|
-
});
|
|
24
|
-
}), o;
|
|
25
|
-
}
|
|
26
|
-
function v(n) {
|
|
27
|
-
const { children: t } = m(n);
|
|
28
|
-
function e(o) {
|
|
29
|
-
return o.type === "text" ? o.value.replace(/\n/g, "<br/>") : o.type === "strong" ? `<strong>${o.children.map(e).join("")}</strong>` : o.type === "emphasis" ? `<em>${o.children.map(e).join("")}</em>` : o.type === "paragraph" ? `<p>${o.children.map(e).join("")}</p>` : `Unsupported markdown: ${o.type}`;
|
|
30
|
-
}
|
|
31
|
-
return t.map(e).join("");
|
|
32
|
-
}
|
|
33
|
-
function L(n) {
|
|
34
|
-
return Intl.Segmenter ? [...new Intl.Segmenter().segment(n)].map((t) => t.segment) : [...n];
|
|
35
|
-
}
|
|
36
|
-
function $(n, t) {
|
|
37
|
-
const e = L(t.content);
|
|
38
|
-
return x(n, [], e, t.type);
|
|
39
|
-
}
|
|
40
|
-
function x(n, t, e, o) {
|
|
41
|
-
if (e.length === 0)
|
|
42
|
-
return [
|
|
43
|
-
{ content: t.join(""), type: o },
|
|
44
|
-
{ content: "", type: o }
|
|
45
|
-
];
|
|
46
|
-
const [s, ...i] = e, r = [...t, s];
|
|
47
|
-
return n([{ content: r.join(""), type: o }]) ? x(n, r, i, o) : (t.length === 0 && s && (t.push(s), e.shift()), [
|
|
48
|
-
{ content: t.join(""), type: o },
|
|
49
|
-
{ content: e.join(""), type: o }
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
function k(n, t) {
|
|
53
|
-
if (n.some(({ content: e }) => e.includes(`
|
|
54
|
-
`)))
|
|
55
|
-
throw new Error("splitLineToFitWidth does not support newlines in the line");
|
|
56
|
-
return h(n, t);
|
|
57
|
-
}
|
|
58
|
-
function h(n, t, e = [], o = []) {
|
|
59
|
-
if (n.length === 0)
|
|
60
|
-
return o.length > 0 && e.push(o), e.length > 0 ? e : [];
|
|
61
|
-
let s = "";
|
|
62
|
-
n[0].content === " " && (s = " ", n.shift());
|
|
63
|
-
const i = n.shift() ?? { content: " ", type: "normal" }, r = [...o];
|
|
64
|
-
if (s !== "" && r.push({ content: s, type: "normal" }), r.push(i), t(r))
|
|
65
|
-
return h(n, t, e, r);
|
|
66
|
-
if (o.length > 0)
|
|
67
|
-
e.push(o), n.unshift(i);
|
|
68
|
-
else if (i.content) {
|
|
69
|
-
const [a, c] = $(t, i);
|
|
70
|
-
e.push([a]), c.content && n.unshift(c);
|
|
71
|
-
}
|
|
72
|
-
return h(n, t, e);
|
|
73
|
-
}
|
|
74
|
-
function M(n, t) {
|
|
75
|
-
t && n.attr("style", t);
|
|
76
|
-
}
|
|
77
|
-
function R(n, t, e, o, s = !1) {
|
|
78
|
-
const i = n.append("foreignObject"), r = i.append("xhtml:div"), a = t.label, c = t.isNode ? "nodeLabel" : "edgeLabel";
|
|
79
|
-
r.html(
|
|
80
|
-
W(
|
|
81
|
-
`
|
|
82
|
-
<span class="${c} ${o}" ` + (t.labelStyle ? 'style="' + t.labelStyle + '"' : "") + ">" + a + "</span>",
|
|
83
|
-
E()
|
|
84
|
-
)
|
|
85
|
-
), M(r, t.labelStyle), r.style("display", "table-cell"), r.style("white-space", "nowrap"), r.style("max-width", e + "px"), r.attr("xmlns", "http://www.w3.org/1999/xhtml"), s && r.attr("class", "labelBkg");
|
|
86
|
-
let l = r.node().getBoundingClientRect();
|
|
87
|
-
return l.width === e && (r.style("display", "table"), r.style("white-space", "break-spaces"), r.style("width", e + "px"), l = r.node().getBoundingClientRect()), i.style("width", l.width), i.style("height", l.height), i.node();
|
|
88
|
-
}
|
|
89
|
-
function d(n, t, e) {
|
|
90
|
-
return n.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", t * e - 0.1 + "em").attr("dy", e + "em");
|
|
91
|
-
}
|
|
92
|
-
function B(n, t, e) {
|
|
93
|
-
const o = n.append("text"), s = d(o, 1, t);
|
|
94
|
-
g(s, e);
|
|
95
|
-
const i = s.node().getComputedTextLength();
|
|
96
|
-
return o.remove(), i;
|
|
97
|
-
}
|
|
98
|
-
function I(n, t, e) {
|
|
99
|
-
var o;
|
|
100
|
-
const s = n.append("text"), i = d(s, 1, t);
|
|
101
|
-
g(i, [{ content: e, type: "normal" }]);
|
|
102
|
-
const r = (o = i.node()) == null ? void 0 : o.getBoundingClientRect();
|
|
103
|
-
return r && s.remove(), r;
|
|
104
|
-
}
|
|
105
|
-
function N(n, t, e, o = !1) {
|
|
106
|
-
const i = t.append("g"), r = i.insert("rect").attr("class", "background"), a = i.append("text").attr("y", "-10.1");
|
|
107
|
-
let c = 0;
|
|
108
|
-
for (const l of e) {
|
|
109
|
-
const p = (u) => B(i, 1.1, u) <= n, f = p(l) ? [l] : k(l, p);
|
|
110
|
-
for (const u of f) {
|
|
111
|
-
const y = d(a, c, 1.1);
|
|
112
|
-
g(y, u), c++;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
if (o) {
|
|
116
|
-
const l = a.node().getBBox(), p = 2;
|
|
117
|
-
return r.attr("x", -p).attr("y", -p).attr("width", l.width + 2 * p).attr("height", l.height + 2 * p), i.node();
|
|
118
|
-
} else
|
|
119
|
-
return a.node();
|
|
120
|
-
}
|
|
121
|
-
function g(n, t) {
|
|
122
|
-
n.text(""), t.forEach((e, o) => {
|
|
123
|
-
const s = n.append("tspan").attr("font-style", e.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", e.type === "strong" ? "bold" : "normal");
|
|
124
|
-
o === 0 ? s.text(e.content) : s.text(" " + e.content);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
const O = (n, t = "", {
|
|
128
|
-
style: e = "",
|
|
129
|
-
isTitle: o = !1,
|
|
130
|
-
classes: s = "",
|
|
131
|
-
useHtmlLabels: i = !0,
|
|
132
|
-
isNode: r = !0,
|
|
133
|
-
width: a = 200,
|
|
134
|
-
addSvgBackground: c = !1
|
|
135
|
-
} = {}) => {
|
|
136
|
-
if (b.info("createText", t, e, o, s, i, r, c), i) {
|
|
137
|
-
const l = v(t), p = {
|
|
138
|
-
isNode: r,
|
|
139
|
-
label: T(l).replace(
|
|
140
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
141
|
-
// cspell: disable-line
|
|
142
|
-
(u) => `<i class='${u.replace(":", " ")}'></i>`
|
|
143
|
-
),
|
|
144
|
-
labelStyle: e.replace("fill:", "color:")
|
|
145
|
-
};
|
|
146
|
-
return R(n, p, a, s, c);
|
|
147
|
-
} else {
|
|
148
|
-
const l = j(t);
|
|
149
|
-
return N(a, n, l, c);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
export {
|
|
153
|
-
O as a,
|
|
154
|
-
I as c
|
|
155
|
-
};
|