docmedown 0.1.0 → 0.1.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/README.md +69 -20
- package/dist/abnfDiagram-VCTEODGH-CtQBp0Qv.mjs +89 -0
- package/dist/abnfDiagram-VCTEODGH-mccrzlD_.js +1 -0
- package/dist/arc-DgPKXEdT.mjs +82 -0
- package/dist/arc-n7TW7Bis.js +1 -0
- package/dist/architecture-7GRP2DOG-B7myQ46f.js +1 -0
- package/dist/architecture-7GRP2DOG-Cxj1ussQ.mjs +3 -0
- package/dist/architectureDiagram-5GKGNRK7-BdTCu5T3.js +36 -0
- package/dist/architectureDiagram-5GKGNRK7-CkgZa-G1.mjs +4154 -0
- package/dist/array-CApNbSU9.mjs +6 -0
- package/dist/array-DZSRzHA_.js +1 -0
- package/dist/blockDiagram-I7D4REHJ-CSYvpxQw.js +129 -0
- package/dist/blockDiagram-I7D4REHJ-CYngfPD9.mjs +1922 -0
- package/dist/c4Diagram-7LVT6UL2-B-sz5MUK.js +38 -0
- package/dist/c4Diagram-7LVT6UL2-DEzxFf2b.mjs +3010 -0
- package/dist/channel-LgHproiI.mjs +5 -0
- package/dist/channel-yqu0m4cl.js +1 -0
- package/dist/chunk-2E4U76K2-BOyeRQsI.js +1 -0
- package/dist/chunk-2E4U76K2-CoTrgtfg.mjs +348 -0
- package/dist/chunk-2Q5K7J3B-D4EgYPOq.mjs +15 -0
- package/dist/chunk-2Q5K7J3B-DhjCNjaM.js +1 -0
- package/dist/chunk-4HAMMTFA-GFyfmcSO.js +62 -0
- package/dist/chunk-4HAMMTFA-VgWPe1ng.mjs +4188 -0
- package/dist/chunk-5VM5RSS4-GINalzIv.js +15 -0
- package/dist/chunk-5VM5RSS4-TqxtqrwE.mjs +5 -0
- package/dist/chunk-75Z2AOVW-DYouz5MZ.js +2 -0
- package/dist/chunk-75Z2AOVW-Dz0Sko9Y.mjs +1330 -0
- package/dist/chunk-CLGD4ZFX-C5J-e2io.js +1 -0
- package/dist/chunk-CLGD4ZFX-DBkwyMMv.mjs +14 -0
- package/dist/chunk-DU6HZSFF-BEQZSmUu.mjs +3836 -0
- package/dist/chunk-DU6HZSFF-CWc5ewtb.js +127 -0
- package/dist/chunk-F27PBJKO-8jvY_jJK.js +1 -0
- package/dist/chunk-F27PBJKO-DFH3sRZG.mjs +61 -0
- package/dist/chunk-FOHPRMQF-LRqOLsSw.mjs +21456 -0
- package/dist/chunk-FOHPRMQF-tmTlwTeH.js +161 -0
- package/dist/chunk-GMAD6QVW-BZeZ4fdb.mjs +1863 -0
- package/dist/chunk-GMAD6QVW-DEQiTa0c.js +72 -0
- package/dist/chunk-GVQU2GXP-B1D3J05J.mjs +37 -0
- package/dist/chunk-GVQU2GXP-CdJIWN41.js +1 -0
- package/dist/chunk-IMKFNOWR-BmZb9U1f.mjs +2042 -0
- package/dist/chunk-IMKFNOWR-CPJsszGN.js +231 -0
- package/dist/chunk-JWPE2WC7-DIKiF5cm.mjs +8 -0
- package/dist/chunk-JWPE2WC7-p1fYVdYc.js +1 -0
- package/dist/chunk-L3NEJ4N5-TzDiVs78.js +1 -0
- package/dist/chunk-L3NEJ4N5-lal8wUID.mjs +245 -0
- package/dist/chunk-LNGE3PJU-BQX75wkM.js +34 -0
- package/dist/chunk-LNGE3PJU-DJ9JuXV6.mjs +1521 -0
- package/dist/chunk-OSK3NFVY-9AWK88m1.mjs +672 -0
- package/dist/chunk-OSK3NFVY-CHzvVe8m.js +10 -0
- package/dist/chunk-P2QGCYS3-6q3AXPt5.mjs +67 -0
- package/dist/chunk-P2QGCYS3-DKZzpRQW.js +1 -0
- package/dist/chunk-POPQ4Y6H-Dd7J9tx3.mjs +26 -0
- package/dist/chunk-POPQ4Y6H-T5C7wpjf.js +1 -0
- package/dist/chunk-PWAF6VOD-BYG76tEe.mjs +275 -0
- package/dist/chunk-PWAF6VOD-DxZLuCEw.js +1 -0
- package/dist/chunk-SHT3W25Y-B2Wes8jn.mjs +4183 -0
- package/dist/chunk-SHT3W25Y-BQjHSn5K.js +168 -0
- package/dist/chunk-SVP7TREG-BFMd615E.js +88 -0
- package/dist/chunk-SVP7TREG-CynckzeF.mjs +490 -0
- package/dist/chunk-TICWLB2K-BfCuoR1V.mjs +3357 -0
- package/dist/chunk-TICWLB2K-agcyBfUp.js +206 -0
- package/dist/chunk-TLUHSLCS-CUrWaKDG.mjs +59 -0
- package/dist/chunk-TLUHSLCS-Drx_a7am.js +1 -0
- package/dist/chunk-XXDRQBXY-AAk1-Cyg.js +1 -0
- package/dist/chunk-XXDRQBXY-DpR8eYzz.mjs +9 -0
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.js +1 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.mjs +12 -0
- package/dist/classDiagram-ZZMXUADV-B7IN9zcX.js +1 -0
- package/dist/classDiagram-ZZMXUADV-tcy6gxSB.mjs +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-B7IN9zcX.js +1 -0
- package/dist/classDiagram-v2-VYDZK3BY-D5wM6Acp.mjs +30 -0
- package/dist/cli.js +719 -532
- package/dist/cose-bilkent-JH36ORCC-DBUPO3qJ.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-Slpx4WIt.mjs +2253 -0
- package/dist/cynefin-OW5HDTMX--QVnfGi1.mjs +3 -0
- package/dist/cynefin-OW5HDTMX-lNKysi7S.js +1 -0
- package/dist/cynefinDiagram-5FMLGOSQ-CsFONYqx.js +62 -0
- package/dist/cynefinDiagram-5FMLGOSQ-DsrxYBcg.mjs +355 -0
- package/dist/cytoscape.esm-C5TvPYYm.mjs +18148 -0
- package/dist/cytoscape.esm-CBmWJr5M.js +321 -0
- package/dist/dagre-CZ6P9L_h.js +1 -0
- package/dist/dagre-GXQ25YYZ-CQszk-7P.js +4 -0
- package/dist/dagre-GXQ25YYZ-ecYByRSn.mjs +425 -0
- package/dist/dagre-J_1oH0eY.mjs +1934 -0
- package/dist/defaultLocale-N-0uLSyg.mjs +198 -0
- package/dist/defaultLocale-ybN1Vtvg.js +1 -0
- package/dist/diagram-S7CK7UJ4-CTMvxX__.js +30 -0
- package/dist/diagram-S7CK7UJ4-DxCghfa-.mjs +301 -0
- package/dist/diagram-UQ7AKVKN-1viEkqlG.js +41 -0
- package/dist/diagram-UQ7AKVKN-BA7Z_oB7.mjs +214 -0
- package/dist/diagram-VSXAHHWV-DgVT19mq.js +3 -0
- package/dist/diagram-VSXAHHWV-Dtqo03M5.mjs +432 -0
- package/dist/diagram-VX7I27RA-CNw0pOX_.js +24 -0
- package/dist/diagram-VX7I27RA-GMPRt8Zh.mjs +527 -0
- package/dist/diagram-Z3DM3KII-C6XdQK_Q.mjs +134 -0
- package/dist/diagram-Z3DM3KII-CPkBr3FT.js +24 -0
- package/dist/dist-CXWJafG_.js +1 -0
- package/dist/dist-DNdLIC8h.mjs +59 -0
- package/dist/docmedown.cjs +125 -44
- package/dist/docmedown.iife.js +3477 -72
- package/dist/docmedown.mjs +10003 -4807
- package/dist/ebnfDiagram-PWID7BFC-CseVsyL3.js +1 -0
- package/dist/ebnfDiagram-PWID7BFC-D_dBDXWC.mjs +100 -0
- package/dist/erDiagram-RLTQ6QDP-DFwfQTRS.js +99 -0
- package/dist/erDiagram-RLTQ6QDP-DP7ddGMH.mjs +1966 -0
- package/dist/eventmodeling-NTZA5JFV-CzxVg0l5.js +1 -0
- package/dist/eventmodeling-NTZA5JFV-Djsy__5n.mjs +3 -0
- package/dist/flowDiagram-HODETNUW-7hSJfI3W.js +1 -0
- package/dist/flowDiagram-HODETNUW-Dqu5Lr19.mjs +17 -0
- package/dist/ganttDiagram-EL5Y4UJY-KNL3tzTD.mjs +3072 -0
- package/dist/ganttDiagram-EL5Y4UJY-aiLqNWgi.js +292 -0
- package/dist/gitGraph-4MIJSDKK-DnElfqX7.js +1 -0
- package/dist/gitGraph-4MIJSDKK-xuKJBT2e.mjs +3 -0
- package/dist/gitGraphDiagram-WWUBYQGX-D4gSo_-e.js +106 -0
- package/dist/gitGraphDiagram-WWUBYQGX-Dooss5fG.mjs +733 -0
- package/dist/graphlib-BaETKKSa.js +1 -0
- package/dist/graphlib-XW-Jr8pF.mjs +1267 -0
- package/dist/info-A6RAGUB7-ClYskpn6.mjs +3 -0
- package/dist/info-A6RAGUB7-DDvvt-fW.js +1 -0
- package/dist/infoDiagram-27XIBGKW-B2-y2mdQ.mjs +20 -0
- package/dist/infoDiagram-27XIBGKW-DYQ9NzfL.js +2 -0
- package/dist/init-BJdqMO10.js +1 -0
- package/dist/init-CsQUQz36.mjs +13 -0
- package/dist/ishikawaDiagram-5VMMS53U-ULIhoYO5.js +70 -0
- package/dist/ishikawaDiagram-5VMMS53U-xAArNh-1.mjs +719 -0
- package/dist/journeyDiagram-3NMN7TZE-BBMYNZRL.js +139 -0
- package/dist/journeyDiagram-3NMN7TZE-BH-uKqP7.mjs +884 -0
- package/dist/kanban-definition-UXKFOSKX-Be49llXr.mjs +976 -0
- package/dist/kanban-definition-UXKFOSKX-CDL5yJkq.js +89 -0
- package/dist/line-BEwhHSLl.js +1 -0
- package/dist/line-CiXRog8O.mjs +34 -0
- package/dist/linear-75tfjrny.js +1 -0
- package/dist/linear-Ncx_RuON.mjs +288 -0
- package/dist/mermaid-parser.core-BBApyu_y.js +6 -0
- package/dist/mermaid-parser.core-BRHibdUE.mjs +638 -0
- package/dist/mindmap-definition-YA3MSWOX-Chy7XP_5.mjs +1006 -0
- package/dist/mindmap-definition-YA3MSWOX-DOda-fkL.js +96 -0
- package/dist/ordinal-B1BNQwUR.mjs +65 -0
- package/dist/ordinal-B9aFWmF9.js +1 -0
- package/dist/packet-AYTQ26CC-CorIy9Ul.js +1 -0
- package/dist/packet-AYTQ26CC-DWH8gXJK.mjs +3 -0
- package/dist/path-CnWkkRiY.mjs +84 -0
- package/dist/path-DIS6ck99.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-Cdw6MeON.js +1 -0
- package/dist/pegDiagram-XKGWAZYB-uNfxRaq1.mjs +94 -0
- package/dist/pie-WAS4IAKB-Cn5eK-5P.mjs +3 -0
- package/dist/pie-WAS4IAKB-D84xrSoY.js +1 -0
- package/dist/pieDiagram-E7YTZNPT-Bd6mvpJw.js +39 -0
- package/dist/pieDiagram-E7YTZNPT-Cczo96a2.mjs +203 -0
- package/dist/quadrantDiagram-AXDQQJYC-BPfgvMsS.js +7 -0
- package/dist/quadrantDiagram-AXDQQJYC-eqRNtVRl.mjs +2001 -0
- package/dist/radar-RG4KPBEZ-DvkxGdO6.mjs +3 -0
- package/dist/radar-RG4KPBEZ-R2sQOLL9.js +1 -0
- package/dist/railroad-74A4TZTK-BOZIf6ts.js +1 -0
- package/dist/railroad-74A4TZTK-CrQzn8Nm.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-BZYetxLz.mjs +3 -0
- package/dist/railroad-abnf-HS5TGJTU-CXU1aC4B.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-D29kI3YW.js +1 -0
- package/dist/railroad-ebnf-LZEXJU2U-qgzTOmN6.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-Bjs9Ws3P.mjs +3 -0
- package/dist/railroad-peg-WCYAUIDC-CXviP0hz.js +1 -0
- package/dist/railroadDiagram-O6MQD6OU-58kvwt7H.mjs +76 -0
- package/dist/railroadDiagram-O6MQD6OU-CKY3uzTc.js +1 -0
- package/dist/requirementDiagram-BXWQKSXE-0hZ04Q6h.js +84 -0
- package/dist/requirementDiagram-BXWQKSXE-CS673B5n.mjs +2224 -0
- package/dist/rough.esm-ChRLLRha.js +1 -0
- package/dist/rough.esm-DXYGHN3m.mjs +1361 -0
- package/dist/sankeyDiagram-P5KCCOFB-D1D6HfAM.mjs +972 -0
- package/dist/sankeyDiagram-P5KCCOFB-ciJb9Zr8.js +40 -0
- package/dist/sequenceDiagram-WJ2MYXX4-BXEznuI6.js +162 -0
- package/dist/sequenceDiagram-WJ2MYXX4-CI1VT8AG.mjs +4156 -0
- package/dist/sizeCapture-INFHLROL-BihkCH-7.js +1 -0
- package/dist/sizeCapture-INFHLROL-BmxqyOLj.mjs +46 -0
- package/dist/src-B4mN2BMl.js +1 -0
- package/dist/src-D_hsMyeP.mjs +2154 -0
- package/dist/stateDiagram-D77RDMKH-BQrSs72W.mjs +220 -0
- package/dist/stateDiagram-D77RDMKH-D2PtkW2U.js +1 -0
- package/dist/stateDiagram-v2-MP3YSRHH-CCbvNfk-.mjs +30 -0
- package/dist/stateDiagram-v2-MP3YSRHH-Dq1QuPeN.js +1 -0
- package/dist/swimlanes-42K2YHIH-CA316NPm.mjs +4979 -0
- package/dist/swimlanes-42K2YHIH-DlggBCTy.js +1 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BV9PEIoG.js +8 -0
- package/dist/swimlanesDiagram-VR7AAH4N-BfrOCfdf.mjs +31 -0
- package/dist/timeline-definition-24CTP7MA-Bkd8rWNJ.js +120 -0
- package/dist/timeline-definition-24CTP7MA-BvkqNYt1.mjs +1069 -0
- package/dist/treeView-Q6P3EWNA-Aof3Cp1M.mjs +3 -0
- package/dist/treeView-Q6P3EWNA-BTzvdwbb.js +1 -0
- package/dist/treemap-WGGIJYW6-BNXGg99p.mjs +3 -0
- package/dist/treemap-WGGIJYW6-DfR4P2Hh.js +1 -0
- package/dist/types/runtime/app.d.ts +3 -3
- package/dist/types/runtime/components/AppearanceMenu.d.ts +2 -0
- package/dist/types/runtime/components/Builtins.d.ts +3 -3
- package/dist/types/runtime/components/Content.d.ts +1 -1
- package/dist/types/runtime/components/DmdRegistry.d.ts +4 -2
- package/dist/types/runtime/components/Layout.d.ts +1 -1
- package/dist/types/runtime/components/MermaidDiagram.d.ts +16 -0
- package/dist/types/runtime/components/Navbar.d.ts +1 -1
- package/dist/types/runtime/components/OfflineDownloadButton.d.ts +2 -0
- package/dist/types/runtime/components/Sidebar.d.ts +1 -1
- package/dist/types/runtime/components/TableOfContents.d.ts +2 -2
- package/dist/types/runtime/config-schema.d.ts +386 -0
- package/dist/types/runtime/config.d.ts +10 -3
- package/dist/types/runtime/index.d.ts +7 -5
- package/dist/types/runtime/loader/auto-indexer.d.ts +1 -1
- package/dist/types/runtime/loader/local-loader.d.ts +1 -1
- package/dist/types/runtime/loader/remote-github.d.ts +2 -2
- package/dist/types/runtime/loader/remote-gitlab.d.ts +2 -2
- package/dist/types/runtime/markdown/callouts.d.ts +1 -1
- package/dist/types/runtime/markdown/highlighter.d.ts +16 -16
- package/dist/types/runtime/markdown/mermaid.d.ts +82 -1
- package/dist/types/runtime/markdown/parser.d.ts +1 -1
- package/dist/types/runtime/markdown/renderer.d.ts +1 -1
- package/dist/types/runtime/offline-export.d.ts +26 -0
- package/dist/types/runtime/provider/DocProvider.d.ts +5 -5
- package/dist/types/runtime/provider/ThemeProvider.d.ts +13 -6
- package/dist/types/runtime/search/SearchModal.d.ts +2 -2
- package/dist/types/runtime/search/search-index.d.ts +1 -1
- package/dist/types/runtime/types.d.ts +28 -99
- package/dist/vennDiagram-4TSXK5OY-BOUFXjso.js +34 -0
- package/dist/vennDiagram-4TSXK5OY-CeOg3-hU.mjs +1880 -0
- package/dist/wardley-WFR3VGLG-BOYcSLd1.mjs +3 -0
- package/dist/wardley-WFR3VGLG-DWDqJSgm.js +1 -0
- package/dist/wardleyDiagram-VM6X3IG4-BhWgMjFr.js +78 -0
- package/dist/wardleyDiagram-VM6X3IG4-C31KoRmF.mjs +645 -0
- package/dist/xychartDiagram-S5SC5T6Z-1yU8zz6I.js +7 -0
- package/dist/xychartDiagram-S5SC5T6Z-BK7upFom.mjs +2210 -0
- package/package.json +15 -4
- package/schemas/docs.schema.json +166 -0
- package/templates/README.md +4 -4
- package/templates/docs.json +5 -2
- package/templates/getting-started.md +1 -1
- package/templates/guides/custom-components.md +2 -0
- package/templates/index.html +2 -4
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { m as e } from "./src-D_hsMyeP.mjs";
|
|
2
|
+
import { n as t } from "./chunk-Y2CYZVJY-i11wjrBe.mjs";
|
|
3
|
+
import { H as n, K as r, U as i, a, b as o, c as s, f as c, v as l, w as u, y as d } from "./chunk-DU6HZSFF-BEQZSmUu.mjs";
|
|
4
|
+
import { i as f } from "./chunk-75Z2AOVW-Dz0Sko9Y.mjs";
|
|
5
|
+
import { t as p } from "./chunk-CLGD4ZFX-DBkwyMMv.mjs";
|
|
6
|
+
import { n as m } from "./mermaid-parser.core-BRHibdUE.mjs";
|
|
7
|
+
import { t as h } from "./chunk-JWPE2WC7-DIKiF5cm.mjs";
|
|
8
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/diagram-Z3DM3KII.mjs
|
|
9
|
+
var g = c.packet, _ = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.packet = [], this.setAccTitle = i, this.getAccTitle = d, this.setDiagramTitle = r, this.getDiagramTitle = u, this.getAccDescription = l, this.setAccDescription = n;
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
t(this, "PacketDB");
|
|
15
|
+
}
|
|
16
|
+
getConfig() {
|
|
17
|
+
let e = f({
|
|
18
|
+
...g,
|
|
19
|
+
...o().packet
|
|
20
|
+
});
|
|
21
|
+
return e.showBits && (e.paddingY += 10), e;
|
|
22
|
+
}
|
|
23
|
+
getPacket() {
|
|
24
|
+
return this.packet;
|
|
25
|
+
}
|
|
26
|
+
pushWord(e) {
|
|
27
|
+
e.length > 0 && this.packet.push(e);
|
|
28
|
+
}
|
|
29
|
+
clear() {
|
|
30
|
+
a(), this.packet = [];
|
|
31
|
+
}
|
|
32
|
+
}, v = 1e4, y = /* @__PURE__ */ t((t, n) => {
|
|
33
|
+
h(t, n);
|
|
34
|
+
let r = -1, i = [], a = 1, { bitsPerRow: o } = n.getConfig();
|
|
35
|
+
for (let { start: s, end: c, bits: l, label: u } of t.blocks) {
|
|
36
|
+
if (s !== void 0 && c !== void 0 && c < s) throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);
|
|
37
|
+
if (s ??= r + 1, s !== r + 1) throw Error(`Packet block ${s} - ${c ?? s} is not contiguous. It should start from ${r + 1}.`);
|
|
38
|
+
if (l === 0) throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);
|
|
39
|
+
for (c ??= s + (l ?? 1) - 1, l ??= c - s + 1, r = c, e.debug(`Packet block ${s} - ${r} with label ${u}`); i.length <= o + 1 && n.getPacket().length < v;) {
|
|
40
|
+
let [e, t] = b({
|
|
41
|
+
start: s,
|
|
42
|
+
end: c,
|
|
43
|
+
bits: l,
|
|
44
|
+
label: u
|
|
45
|
+
}, a, o);
|
|
46
|
+
if (i.push(e), e.end + 1 === a * o && (n.pushWord(i), i = [], a++), !t) break;
|
|
47
|
+
({start: s, end: c, bits: l, label: u} = t);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
n.pushWord(i);
|
|
51
|
+
}, "populate"), b = /* @__PURE__ */ t((e, t, n) => {
|
|
52
|
+
if (e.start === void 0) throw Error("start should have been set during first phase");
|
|
53
|
+
if (e.end === void 0) throw Error("end should have been set during first phase");
|
|
54
|
+
if (e.start > e.end) throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);
|
|
55
|
+
if (e.end + 1 <= t * n) return [e, void 0];
|
|
56
|
+
let r = t * n - 1, i = t * n;
|
|
57
|
+
return [{
|
|
58
|
+
start: e.start,
|
|
59
|
+
end: r,
|
|
60
|
+
label: e.label,
|
|
61
|
+
bits: r - e.start
|
|
62
|
+
}, {
|
|
63
|
+
start: i,
|
|
64
|
+
end: e.end,
|
|
65
|
+
label: e.label,
|
|
66
|
+
bits: e.end - i
|
|
67
|
+
}];
|
|
68
|
+
}, "getNextFittingBlock"), x = {
|
|
69
|
+
parser: { yy: void 0 },
|
|
70
|
+
parse: /* @__PURE__ */ t(async (t) => {
|
|
71
|
+
let n = await m("packet", t), r = x.parser?.yy;
|
|
72
|
+
if (!(r instanceof _)) throw Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
|
|
73
|
+
e.debug(n), y(n, r);
|
|
74
|
+
}, "parse")
|
|
75
|
+
}, S = /* @__PURE__ */ t((e, t, n, r) => {
|
|
76
|
+
let i = r.db, a = i.getConfig(), { rowHeight: o, paddingY: c, bitWidth: l, bitsPerRow: u } = a, d = i.getPacket(), f = i.getDiagramTitle(), m = o + c, h = m * (d.length + 1) - (f ? 0 : o), g = l * u + 2, _ = p(t);
|
|
77
|
+
_.attr("viewBox", `0 0 ${g} ${h}`), s(_, h, g, a.useMaxWidth);
|
|
78
|
+
for (let [e, t] of d.entries()) C(_, t, e, a);
|
|
79
|
+
_.append("text").text(f).attr("x", g / 2).attr("y", h - m / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
80
|
+
}, "draw"), C = /* @__PURE__ */ t((e, t, n, { rowHeight: r, paddingX: i, paddingY: a, bitWidth: o, bitsPerRow: s, showBits: c }) => {
|
|
81
|
+
let l = e.append("g"), u = n * (r + a) + a;
|
|
82
|
+
for (let e of t) {
|
|
83
|
+
let t = e.start % s * o + 1, n = (e.end - e.start + 1) * o - i;
|
|
84
|
+
if (l.append("rect").attr("x", t).attr("y", u).attr("width", n).attr("height", r).attr("class", "packetBlock"), l.append("text").attr("x", t + n / 2).attr("y", u + r / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(e.label), !c) continue;
|
|
85
|
+
let a = e.end === e.start, d = u - 2;
|
|
86
|
+
l.append("text").attr("x", t + (a ? n / 2 : 0)).attr("y", d).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", a ? "middle" : "start").text(e.start), a || l.append("text").attr("x", t + n).attr("y", d).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(e.end);
|
|
87
|
+
}
|
|
88
|
+
}, "drawWord"), w = { draw: S }, T = {
|
|
89
|
+
byteFontSize: "10px",
|
|
90
|
+
startByteColor: "black",
|
|
91
|
+
endByteColor: "black",
|
|
92
|
+
labelColor: "black",
|
|
93
|
+
labelFontSize: "12px",
|
|
94
|
+
titleColor: "black",
|
|
95
|
+
titleFontSize: "14px",
|
|
96
|
+
blockStrokeColor: "black",
|
|
97
|
+
blockStrokeWidth: "1",
|
|
98
|
+
blockFillColor: "#efefef"
|
|
99
|
+
}, E = {
|
|
100
|
+
parser: x,
|
|
101
|
+
get db() {
|
|
102
|
+
return new _();
|
|
103
|
+
},
|
|
104
|
+
renderer: w,
|
|
105
|
+
styles: /* @__PURE__ */ t(({ packet: e } = {}) => {
|
|
106
|
+
let t = f(T, e);
|
|
107
|
+
return `
|
|
108
|
+
.packetByte {
|
|
109
|
+
font-size: ${t.byteFontSize};
|
|
110
|
+
}
|
|
111
|
+
.packetByte.start {
|
|
112
|
+
fill: ${t.startByteColor};
|
|
113
|
+
}
|
|
114
|
+
.packetByte.end {
|
|
115
|
+
fill: ${t.endByteColor};
|
|
116
|
+
}
|
|
117
|
+
.packetLabel {
|
|
118
|
+
fill: ${t.labelColor};
|
|
119
|
+
font-size: ${t.labelFontSize};
|
|
120
|
+
}
|
|
121
|
+
.packetTitle {
|
|
122
|
+
fill: ${t.titleColor};
|
|
123
|
+
font-size: ${t.titleFontSize};
|
|
124
|
+
}
|
|
125
|
+
.packetBlock {
|
|
126
|
+
stroke: ${t.blockStrokeColor};
|
|
127
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
128
|
+
fill: ${t.blockFillColor};
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
}, "styles")
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
export { E as diagram };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const e=require("./src-B4mN2BMl.js"),t=require("./chunk-Y2CYZVJY-CnmLqFtv.js"),n=require("./chunk-DU6HZSFF-CWc5ewtb.js"),r=require("./chunk-75Z2AOVW-DYouz5MZ.js"),i=require("./chunk-CLGD4ZFX-C5J-e2io.js"),a=require("./mermaid-parser.core-BBApyu_y.js"),o=require("./chunk-JWPE2WC7-p1fYVdYc.js");var s=n.f.packet,c=class{constructor(){this.packet=[],this.setAccTitle=n.U,this.getAccTitle=n.y,this.setDiagramTitle=n.K,this.getDiagramTitle=n.w,this.getAccDescription=n.v,this.setAccDescription=n.H}static{t.n(this,`PacketDB`)}getConfig(){let e=r.i({...s,...n.b().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){n.a(),this.packet=[]}},l=1e4,u=t.n((t,n)=>{o.t(t,n);let r=-1,i=[],a=1,{bitsPerRow:s}=n.getConfig();for(let{start:o,end:c,bits:u,label:f}of t.blocks){if(o!==void 0&&c!==void 0&&c<o)throw Error(`Packet block ${o} - ${c} is invalid. End must be greater than start.`);if(o??=r+1,o!==r+1)throw Error(`Packet block ${o} - ${c??o} is not contiguous. It should start from ${r+1}.`);if(u===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);for(c??=o+(u??1)-1,u??=c-o+1,r=c,e.m.debug(`Packet block ${o} - ${r} with label ${f}`);i.length<=s+1&&n.getPacket().length<l;){let[e,t]=d({start:o,end:c,bits:u,label:f},a,s);if(i.push(e),e.end+1===a*s&&(n.pushWord(i),i=[],a++),!t)break;({start:o,end:c,bits:u,label:f}=t)}}n.pushWord(i)},`populate`),d=t.n((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),f={parser:{yy:void 0},parse:t.n(async t=>{let n=await a.n(`packet`,t),r=f.parser?.yy;if(!(r instanceof c))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);e.m.debug(n),u(n,r)},`parse`)},p=t.n((e,t,r,a)=>{let o=a.db,s=o.getConfig(),{rowHeight:c,paddingY:l,bitWidth:u,bitsPerRow:d}=s,f=o.getPacket(),p=o.getDiagramTitle(),h=c+l,g=h*(f.length+1)-(p?0:c),_=u*d+2,v=i.t(t);v.attr(`viewBox`,`0 0 ${_} ${g}`),n.c(v,g,_,s.useMaxWidth);for(let[e,t]of f.entries())m(v,t,e,s);v.append(`text`).text(p).attr(`x`,_/2).attr(`y`,g-h/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),m=t.n((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),h={draw:p},g={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},_={parser:f,get db(){return new c},renderer:h,styles:t.n(({packet:e}={})=>{let t=r.i(g,e);return`
|
|
2
|
+
.packetByte {
|
|
3
|
+
font-size: ${t.byteFontSize};
|
|
4
|
+
}
|
|
5
|
+
.packetByte.start {
|
|
6
|
+
fill: ${t.startByteColor};
|
|
7
|
+
}
|
|
8
|
+
.packetByte.end {
|
|
9
|
+
fill: ${t.endByteColor};
|
|
10
|
+
}
|
|
11
|
+
.packetLabel {
|
|
12
|
+
fill: ${t.labelColor};
|
|
13
|
+
font-size: ${t.labelFontSize};
|
|
14
|
+
}
|
|
15
|
+
.packetTitle {
|
|
16
|
+
fill: ${t.titleColor};
|
|
17
|
+
font-size: ${t.titleFontSize};
|
|
18
|
+
}
|
|
19
|
+
.packetBlock {
|
|
20
|
+
stroke: ${t.blockStrokeColor};
|
|
21
|
+
stroke-width: ${t.blockStrokeWidth};
|
|
22
|
+
fill: ${t.blockFillColor};
|
|
23
|
+
}
|
|
24
|
+
`},`styles`)};exports.diagram=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./src-B4mN2BMl.js");var t=Math.abs,n=Math.atan2,r=Math.cos,i=Math.max,a=Math.min,o=Math.sin,s=Math.sqrt,c=1e-12,l=Math.PI,u=l/2,d=2*l;function f(e){return e>1?0:e<-1?l:Math.acos(e)}function p(e){return e>=1?u:e<=-1?-u:Math.asin(e)}var m=e._((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),h=e._((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=m();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}}));Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return a}});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { _ as e } from "./src-D_hsMyeP.mjs";
|
|
2
|
+
//#region node_modules/d3-shape/src/math.js
|
|
3
|
+
var t = Math.abs, n = Math.atan2, r = Math.cos, i = Math.max, a = Math.min, o = Math.sin, s = Math.sqrt, c = 1e-12, l = Math.PI, u = l / 2, d = 2 * l;
|
|
4
|
+
function f(e) {
|
|
5
|
+
return e > 1 ? 0 : e < -1 ? l : Math.acos(e);
|
|
6
|
+
}
|
|
7
|
+
function p(e) {
|
|
8
|
+
return e >= 1 ? u : e <= -1 ? -u : Math.asin(e);
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region node_modules/@braintree/sanitize-url/dist/constants.js
|
|
12
|
+
var m = /* @__PURE__ */ e(((e) => {
|
|
13
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.BLANK_URL = e.relativeFirstCharacters = e.whitespaceEscapeCharsRegex = e.urlSchemeRegex = e.ctrlCharactersRegex = e.htmlCtrlEntityRegex = e.htmlEntitiesRegex = e.invalidProtocolRegex = void 0, e.invalidProtocolRegex = /^([^\w]*)(javascript|data|vbscript)/im, e.htmlEntitiesRegex = /&#(\w+)(^\w|;)?/g, e.htmlCtrlEntityRegex = /&(newline|tab);/gi, e.ctrlCharactersRegex = /[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim, e.urlSchemeRegex = /^.+(:|:)/gim, e.whitespaceEscapeCharsRegex = /(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g, e.relativeFirstCharacters = [".", "/"], e.BLANK_URL = "about:blank";
|
|
14
|
+
})), h = /* @__PURE__ */ e(((e) => {
|
|
15
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.sanitizeUrl = o;
|
|
16
|
+
var t = m();
|
|
17
|
+
function n(e) {
|
|
18
|
+
return t.relativeFirstCharacters.indexOf(e[0]) > -1;
|
|
19
|
+
}
|
|
20
|
+
function r(e) {
|
|
21
|
+
return e.replace(t.ctrlCharactersRegex, "").replace(t.htmlEntitiesRegex, function(e, t) {
|
|
22
|
+
return String.fromCharCode(t);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function i(e) {
|
|
26
|
+
return URL.canParse(e);
|
|
27
|
+
}
|
|
28
|
+
function a(e) {
|
|
29
|
+
try {
|
|
30
|
+
return decodeURIComponent(e);
|
|
31
|
+
} catch {
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function o(e) {
|
|
36
|
+
if (!e) return t.BLANK_URL;
|
|
37
|
+
var o, s = a(e.trim());
|
|
38
|
+
do
|
|
39
|
+
s = r(s).replace(t.htmlCtrlEntityRegex, "").replace(t.ctrlCharactersRegex, "").replace(t.whitespaceEscapeCharsRegex, "").trim(), s = a(s), o = s.match(t.ctrlCharactersRegex) || s.match(t.htmlEntitiesRegex) || s.match(t.htmlCtrlEntityRegex) || s.match(t.whitespaceEscapeCharsRegex);
|
|
40
|
+
while (o && o.length > 0);
|
|
41
|
+
var c = s;
|
|
42
|
+
if (!c) return t.BLANK_URL;
|
|
43
|
+
if (n(c)) return c;
|
|
44
|
+
var l = c.trimStart(), u = l.match(t.urlSchemeRegex);
|
|
45
|
+
if (!u) return c;
|
|
46
|
+
var d = u[0].toLowerCase().trim();
|
|
47
|
+
if (t.invalidProtocolRegex.test(d)) return t.BLANK_URL;
|
|
48
|
+
var f = l.replace(/\\/g, "/");
|
|
49
|
+
if (d === "mailto:" || d.includes("://")) return f;
|
|
50
|
+
if (d === "http:" || d === "https:") {
|
|
51
|
+
if (!i(f)) return t.BLANK_URL;
|
|
52
|
+
var p = new URL(f);
|
|
53
|
+
return p.protocol = p.protocol.toLowerCase(), p.hostname = p.hostname.toLowerCase(), p.toString();
|
|
54
|
+
}
|
|
55
|
+
return f;
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
//#endregion
|
|
59
|
+
export { n as a, u as c, l as d, o as f, p as i, i as l, d as m, t as n, r as o, s as p, f as r, c as s, h as t, a as u };
|