@kong-ui-public/documentation 1.8.13 → 1.8.14-pr.4048.7a10d83bb.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/package.json +2 -2
- package/dist/abnfDiagram-VCTEODGH-Bzbg7AHk-DFERbIEu.js +0 -92
- package/dist/arc-CKhg5DVn-BIpMje7c.js +0 -80
- package/dist/architectureDiagram-5GKGNRK7-CqHVyBRI-CLWcRmoG.js +0 -4149
- package/dist/astro-DdQ3Kp7Q-BDE5qFXd.js +0 -18
- package/dist/blockDiagram-I7D4REHJ-DWFqHR0L-D8v5LhXM.js +0 -2029
- package/dist/c-lfOsiBpu-DMPKLUI8.js +0 -4
- package/dist/c4Diagram-7LVT6UL2-DXHigzTJ-BR9440iK.js +0 -3067
- package/dist/catppuccin-latte-D9NPLB7Y-sAlQrrP2.js +0 -4
- package/dist/channel-DUDXYB-g-BsX3Acdu.js +0 -5
- package/dist/chunk-2Q5K7J3B-CQFXhYzi-C3CTUgHo.js +0 -12
- package/dist/chunk-5VM5RSS4-DF_fkndM-uFSHkP_V.js +0 -19
- package/dist/chunk-F27PBJKO-Bf2CKIqN-CUI4z39H.js +0 -65
- package/dist/chunk-IMKFNOWR-DIsz_YLV-B6u2fLNJ.js +0 -2116
- package/dist/chunk-JWPE2WC7-DI69CthA-D_FsPQj-.js +0 -8
- package/dist/chunk-POPQ4Y6H-DycI9Jzm-BWixWzlU.js +0 -24
- package/dist/chunk-SHT3W25Y-CKxDgOBI-OOdqZuVE.js +0 -4307
- package/dist/chunk-SVP7TREG-tW_qYlvV-vP5bsK2H.js +0 -500
- package/dist/chunk-TICWLB2K-CuiDrX3P-WR-FPNea.js +0 -3451
- package/dist/chunk-XXDRQBXY-CSrEKR2C-C6SaSSCC.js +0 -8
- package/dist/classDiagram-ZZMXUADV-WzcguFxl-CKKn1Tfx.js +0 -17
- package/dist/classDiagram-v2-VYDZK3BY-jdAXYY7W-CKKn1Tfx.js +0 -17
- package/dist/cose-bilkent-JH36ORCC-DbS7GVMv-bbQOsy5Y.js +0 -2256
- package/dist/csharp-RRkgh3c4-lim_vKPd.js +0 -4
- package/dist/css-BbwcBM_4-B_2PRTA_.js +0 -4
- package/dist/csv-DFU5sVkH-BPWcOTV4.js +0 -4
- package/dist/cynefin-OW5HDTMX-CmxQwqmf-D_GdoNIu.js +0 -21781
- package/dist/cynefinDiagram-5FMLGOSQ-BNb88xpJ-DfS9O7P4.js +0 -351
- package/dist/cytoscape.esm-YSf_2rtb-CoO8mT3p.js +0 -18279
- package/dist/dagre-C9xJrfGe-Di-1Ikh0.js +0 -1667
- package/dist/dagre-GXQ25YYZ-uiXfyLw2-PU-qeT6_.js +0 -429
- package/dist/defaultLocale-TbxLDlcU-BrdwcF9K.js +0 -180
- package/dist/diagram-S7CK7UJ4-g67BXvGR-Cp9bzjGj.js +0 -303
- package/dist/diagram-UQ7AKVKN-DfJJIsVs-CC7ekguS.js +0 -210
- package/dist/diagram-VSXAHHWV-DmtFfqWN-C9ZLHKzj.js +0 -439
- package/dist/diagram-VX7I27RA--gfQ90BY-QNtwG6Ck.js +0 -477
- package/dist/diagram-Z3DM3KII-Cu_rSHu0-CCCsIuz4.js +0 -127
- package/dist/diff-D_LJiFgV-DenOJuyV.js +0 -4
- package/dist/docker-DMpUQ2UE-xX8PDoIv.js +0 -4
- package/dist/documentation.es.js +0 -7
- package/dist/documentation.umd.js +0 -3715
- package/dist/ebnfDiagram-PWID7BFC-B_qfACMJ-D_Xjruh2.js +0 -109
- package/dist/erDiagram-RLTQ6QDP-Dt9efGmz-BPS1Iwl5.js +0 -2042
- package/dist/flowDiagram-HODETNUW-sAcaB3rt-Ci8x-zG0.js +0 -6
- package/dist/ganttDiagram-EL5Y4UJY-CtWGP-hX-qar4oLEq.js +0 -3098
- package/dist/git-commit--2NDNcyW-Dw9_h8sQ.js +0 -5
- package/dist/git-rebase-CbNvxADk-DAgBrkyL.js +0 -5
- package/dist/gitGraphDiagram-WWUBYQGX-B7B7IG_5-x8UcOce8.js +0 -737
- package/dist/go-BEdBk4fh-DqSXHrGo.js +0 -4
- package/dist/graphql-BMuT9GwB-BP9pcQru.js +0 -14
- package/dist/haml-D3QmTYiV-BTaBXoPr.js +0 -10
- package/dist/handlebars-C_aYHp26-CWcrQHYv.js +0 -14
- package/dist/haskell-DSSJ-2AO-BlmVjKNy.js +0 -4
- package/dist/html-derivative-DgZQ_xNe-BAs__2u-.js +0 -5
- package/dist/html-zcQqUZxh-Dg8OkMBp.js +0 -10
- package/dist/http-BGkfDG8i-lqXytFlH.js +0 -14
- package/dist/index-BaAWoj3P.js +0 -43522
- package/dist/infoDiagram-27XIBGKW-DAx9hub5-CDUrF89O.js +0 -18
- package/dist/ini-CmgEGOBJ-70PBzbbb.js +0 -4
- package/dist/init-Cgg2UTSf-BsHkAom2.js +0 -15
- package/dist/ishikawaDiagram-5VMMS53U-CnBB9iXH-2YyZ3Nxy.js +0 -729
- package/dist/java-CaG1IqbK-D6YBp1XX.js +0 -4
- package/dist/javascript--0qAxhnA-BRPKgr3C.js +0 -4
- package/dist/journeyDiagram-3NMN7TZE-B0a4pOJX-CgtsuE-Y.js +0 -909
- package/dist/json-DVwBUiza-D8uacQj0.js +0 -4
- package/dist/json5-D2Eltym1-Biib5ALh.js +0 -4
- package/dist/jsonc-BPIJyZ7u-BZEKkMok.js +0 -4
- package/dist/jsonl-BGkjXns2-BG2V-IA2.js +0 -4
- package/dist/jsx-cVAJ0Z2c-Cl0AMtmu.js +0 -4
- package/dist/kanban-definition-UXKFOSKX-BGnOZMUl-CHT2EG_7.js +0 -1029
- package/dist/katex-Be3DWdAP-BWcdC2Xb.js +0 -22287
- package/dist/kotlin-CQsNEM2o-Dy_91eL4.js +0 -4
- package/dist/latex-g3NZbvcl-tKQf8TuW.js +0 -5
- package/dist/less-9LYkHheD-tcNg8M2_.js +0 -4
- package/dist/linear-Cf872ac2-BjGvLlX5.js +0 -254
- package/dist/liquid-CG3ph2-5-wZo8nDay.js +0 -14
- package/dist/lua-BdA7_iyX-Fg4s9W4F.js +0 -5
- package/dist/make-CE9Hryyp-CrUl7LOH.js +0 -4
- package/dist/markdown-Gqx6-FHJ-Bcqt-5kX.js +0 -4
- package/dist/material-theme-darker-DL4lHZSa-DMHCIvq5.js +0 -4
- package/dist/mdc-C-RLGlI2-DzcUIqJQ.js +0 -12
- package/dist/mdx-DswfiFg4-CK6jOqmu.js +0 -4
- package/dist/mermaid-CAl3BhSL-CpQh0Vft.js +0 -4
- package/dist/mindmap-definition-YA3MSWOX-D0iYuN9C-B3uI77eT.js +0 -1026
- package/dist/nginx-CokYOiS8-DjML3dpY.js +0 -5
- package/dist/objective-c-DK-EKgyd-C809HPrX.js +0 -4
- package/dist/ordinal-CNzaYghg-B_JXdapq.js +0 -63
- package/dist/pascal-CRtegPzh-a8whuidZ.js +0 -4
- package/dist/pegDiagram-XKGWAZYB-6oG4KeYC-CG27veJ_.js +0 -104
- package/dist/perl-C45KUBhP-Q6opd9qO.js +0 -16
- package/dist/php-COzTb61D-DW91EkjY.js +0 -18
- package/dist/pieDiagram-E7YTZNPT-DsNO0m7t-CMKObJlC.js +0 -191
- package/dist/plsql-Bx7tup_v-BJoF2Vrf.js +0 -4
- package/dist/postcss-DjDdOEzv-DaHMm3XW.js +0 -4
- package/dist/powershell-BeUvHe6o-BC3uPZPS.js +0 -4
- package/dist/proto-DGLklcji-w0B_itsp.js +0 -4
- package/dist/pug-BQ5MM2xz-DMZvJUHt.js +0 -12
- package/dist/python-C_6ySqsv-D_5pfY__.js +0 -4
- package/dist/quadrantDiagram-AXDQQJYC-B6Dc7fje-C23uvcHP.js +0 -2046
- package/dist/r-CNL4a0Qi-pixge7f9.js +0 -4
- package/dist/railroadDiagram-O6MQD6OU-D8qLcD4O-B_Hr3s-n.js +0 -80
- package/dist/reg-D6txjqBF-bHAwx9Pm.js +0 -4
- package/dist/requirementDiagram-BXWQKSXE-Cx28BZaS-Bu-h1fa9.js +0 -2283
- package/dist/rst-xmthoFSf-BdN-iqJu.js +0 -20
- package/dist/ruby-CmwqiOyg-B5qGUHPy.js +0 -44
- package/dist/rust-BrRMzTsN-CaZtBt24.js +0 -4
- package/dist/sankeyDiagram-P5KCCOFB-CqEXebJJ-BrChTi-e.js +0 -948
- package/dist/sass-CL6GLiPQ-pslLeRRb.js +0 -4
- package/dist/scss-CiLZCexj-CladYQkr.js +0 -5
- package/dist/sequenceDiagram-WJ2MYXX4-Bs_1V5D1-Da6JW3KG.js +0 -4263
- package/dist/shellscript-Dfpezy65-BtH46UX7.js +0 -4
- package/dist/shellsession-CRcAC04a-BFLTslz7.js +0 -5
- package/dist/sizeCapture-INFHLROL-Bc4fS2u3-DMniWWy4.js +0 -46
- package/dist/splunk-MGILMmew-BP8P7eWt.js +0 -4
- package/dist/sql-D_W5grEC-Dcn2WLbD.js +0 -4
- package/dist/ssh-config-CFmUyPR7-BB1rrGb9.js +0 -4
- package/dist/stateDiagram-D77RDMKH-oTiwIYVV-BphZk0uR.js +0 -210
- package/dist/stateDiagram-v2-MP3YSRHH-gbAY2cmo-D78HyGx1.js +0 -17
- package/dist/style.css +0 -1
- package/dist/stylus-Kh83dApl-DAu5PNZ9.js +0 -4
- package/dist/svelte-HVIHTyhe-BdPJXyv7.js +0 -14
- package/dist/swift-B7Z-rXzN-CQtmhAMw.js +0 -4
- package/dist/swimlanes-42K2YHIH-BSXAPn2j-C7pTnVuk.js +0 -4983
- package/dist/swimlanesDiagram-VR7AAH4N-Ror_0lre-Di8OVgei.js +0 -17
- package/dist/timeline-definition-24CTP7MA-gOHmAY1H-aIgAzo7s.js +0 -1096
- package/dist/toml-CIQJnU5u-DjT9Bjqu.js +0 -4
- package/dist/tsx-DiMnnori-B-5hSr15.js +0 -4
- package/dist/twig-BXXOiPVV-CmgmU-L-.js +0 -18
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts +0 -35
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationContent.vue.d.ts +0 -186
- package/dist/types/components/DocumentationContent.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationDisplay.vue.d.ts +0 -105
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +0 -31
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +0 -1
- package/dist/types/components/ProductDocumentModal.vue.d.ts +0 -72
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +0 -1
- package/dist/types/composables/index.d.ts +0 -6
- package/dist/types/composables/index.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/external-links.d.ts +0 -5
- package/dist/types/external-links.d.ts.map +0 -1
- package/dist/types/helpers.d.ts +0 -8
- package/dist/types/helpers.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/types/document-list.d.ts +0 -28
- package/dist/types/types/document-list.d.ts.map +0 -1
- package/dist/types/types/document-modal.d.ts +0 -8
- package/dist/types/types/document-modal.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -3
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/typescript-DFf19o_s-B0ag8pir.js +0 -4
- package/dist/v-DbYZLS97-CAPuTPjr.js +0 -4
- package/dist/vb-DRaXf86R-Bx9Rwnco.js +0 -4
- package/dist/vennDiagram-4TSXK5OY-Cr4BWMuk-BjBvyxCC.js +0 -1911
- package/dist/viml-DgaHry3T-BeYQ8dZh.js +0 -4
- package/dist/vue-DPI5F0qT-D-Ahkoja.js +0 -22
- package/dist/vue-html-D7FCsiW2-DLSUNIPr.js +0 -5
- package/dist/wardleyDiagram-VM6X3IG4-a6H91k9Q-CsH4gQQ0.js +0 -639
- package/dist/wasm-DXa1gtBd-CfuK9YWP.js +0 -4
- package/dist/wgsl-Vcm3Lg52-C2IZ7ENh.js +0 -4
- package/dist/xml-DnOpIvRK-C-akVYiK.js +0 -5
- package/dist/xsl-K_2BlT3G-D3eRZGNO.js +0 -5
- package/dist/xychartDiagram-S5SC5T6Z-7mX_nPmO-CoM4SG9q.js +0 -2218
- package/dist/yaml-BswqmnDe-X78l_Ibz.js +0 -4
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
import { a as h, m as w, a2 as P, X as q, $ as X, aj as _, V as G, Q as H, c as Q } from "./index-BaAWoj3P.js";
|
|
2
|
-
var B = "", N = "", M = "", A = [], v = /* @__PURE__ */ new Map(), F = /* @__PURE__ */ h((e) => H(e, Q()), "sanitizeText"), y = /* @__PURE__ */ h((e) => {
|
|
3
|
-
switch (e.type) {
|
|
4
|
-
case "terminal":
|
|
5
|
-
return {
|
|
6
|
-
...e,
|
|
7
|
-
value: F(e.value)
|
|
8
|
-
};
|
|
9
|
-
case "nonterminal":
|
|
10
|
-
return {
|
|
11
|
-
...e,
|
|
12
|
-
name: F(e.name)
|
|
13
|
-
};
|
|
14
|
-
case "sequence":
|
|
15
|
-
return {
|
|
16
|
-
...e,
|
|
17
|
-
elements: e.elements.map(y)
|
|
18
|
-
};
|
|
19
|
-
case "choice":
|
|
20
|
-
return {
|
|
21
|
-
...e,
|
|
22
|
-
alternatives: e.alternatives.map(y)
|
|
23
|
-
};
|
|
24
|
-
case "optional":
|
|
25
|
-
return {
|
|
26
|
-
...e,
|
|
27
|
-
element: y(e.element)
|
|
28
|
-
};
|
|
29
|
-
case "repetition":
|
|
30
|
-
return {
|
|
31
|
-
...e,
|
|
32
|
-
element: y(e.element),
|
|
33
|
-
separator: e.separator ? y(e.separator) : void 0
|
|
34
|
-
};
|
|
35
|
-
case "special":
|
|
36
|
-
return {
|
|
37
|
-
...e,
|
|
38
|
-
text: F(e.text)
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
}, "sanitizeAstNode"), U = /* @__PURE__ */ h(() => {
|
|
42
|
-
B = "", N = "", M = "", A.length = 0, v.clear(), X(), w.debug("[Railroad] Database cleared");
|
|
43
|
-
}, "clear"), O = /* @__PURE__ */ h((e) => {
|
|
44
|
-
B = F(e), w.debug("[Railroad] Title set:", e);
|
|
45
|
-
}, "setTitle"), V = /* @__PURE__ */ h(() => B, "getTitle"), J = {
|
|
46
|
-
clear: U,
|
|
47
|
-
setTitle: O,
|
|
48
|
-
getTitle: V,
|
|
49
|
-
addRule: /* @__PURE__ */ h((e) => {
|
|
50
|
-
let i = {
|
|
51
|
-
...e,
|
|
52
|
-
name: F(e.name),
|
|
53
|
-
definition: y(e.definition),
|
|
54
|
-
comment: e.comment ? F(e.comment) : void 0
|
|
55
|
-
};
|
|
56
|
-
w.debug("[Railroad] Adding rule:", i.name), v.has(i.name) && w.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`), A.push(i), v.set(i.name, i);
|
|
57
|
-
}, "addRule"),
|
|
58
|
-
getRules: /* @__PURE__ */ h(() => A, "getRules"),
|
|
59
|
-
getRule: /* @__PURE__ */ h((e) => v.get(e), "getRule"),
|
|
60
|
-
setAccTitle: /* @__PURE__ */ h((e) => {
|
|
61
|
-
N = F(e).replace(/^\s+/g, ""), w.debug("[Railroad] Accessibility title set:", e);
|
|
62
|
-
}, "setAccTitle"),
|
|
63
|
-
getAccTitle: /* @__PURE__ */ h(() => N, "getAccTitle"),
|
|
64
|
-
setAccDescription: /* @__PURE__ */ h((e) => {
|
|
65
|
-
M = F(e).replace(/\n\s+/g, `
|
|
66
|
-
`), w.debug("[Railroad] Accessibility description set:", e);
|
|
67
|
-
}, "setAccDescription"),
|
|
68
|
-
getAccDescription: /* @__PURE__ */ h(() => M, "getAccDescription"),
|
|
69
|
-
setDiagramTitle: O,
|
|
70
|
-
getDiagramTitle: V
|
|
71
|
-
}, T = {
|
|
72
|
-
compactMode: !1,
|
|
73
|
-
padding: 10,
|
|
74
|
-
verticalSeparation: 8,
|
|
75
|
-
horizontalSeparation: 10,
|
|
76
|
-
arcRadius: 10,
|
|
77
|
-
fontSize: 14,
|
|
78
|
-
fontFamily: "monospace",
|
|
79
|
-
terminalFill: "#FFFFC0",
|
|
80
|
-
terminalStroke: "#000000",
|
|
81
|
-
terminalTextColor: "#000000",
|
|
82
|
-
nonTerminalFill: "#FFFFFF",
|
|
83
|
-
nonTerminalStroke: "#000000",
|
|
84
|
-
nonTerminalTextColor: "#000000",
|
|
85
|
-
lineColor: "#000000",
|
|
86
|
-
strokeWidth: 2,
|
|
87
|
-
markerFill: "#000000",
|
|
88
|
-
commentFill: "#E8E8E8",
|
|
89
|
-
commentStroke: "#888888",
|
|
90
|
-
commentTextColor: "#666666",
|
|
91
|
-
specialFill: "#F0E0FF",
|
|
92
|
-
specialStroke: "#8800CC",
|
|
93
|
-
ruleNameColor: "#000066",
|
|
94
|
-
showMarkers: !0,
|
|
95
|
-
markerRadius: 5
|
|
96
|
-
}, K = /^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i, Y = /^[\w "',.-]+$/, Z = /* @__PURE__ */ new Set([
|
|
97
|
-
"compactMode",
|
|
98
|
-
"padding",
|
|
99
|
-
"verticalSeparation",
|
|
100
|
-
"horizontalSeparation",
|
|
101
|
-
"arcRadius",
|
|
102
|
-
"fontSize",
|
|
103
|
-
"fontFamily",
|
|
104
|
-
"terminalFill",
|
|
105
|
-
"terminalStroke",
|
|
106
|
-
"terminalTextColor",
|
|
107
|
-
"nonTerminalFill",
|
|
108
|
-
"nonTerminalStroke",
|
|
109
|
-
"nonTerminalTextColor",
|
|
110
|
-
"lineColor",
|
|
111
|
-
"strokeWidth",
|
|
112
|
-
"markerFill",
|
|
113
|
-
"commentFill",
|
|
114
|
-
"commentStroke",
|
|
115
|
-
"commentTextColor",
|
|
116
|
-
"specialFill",
|
|
117
|
-
"specialStroke",
|
|
118
|
-
"ruleNameColor",
|
|
119
|
-
"showMarkers",
|
|
120
|
-
"markerRadius"
|
|
121
|
-
]), j = /* @__PURE__ */ h((e) => e ? Object.keys(e).every((i) => i === "railroad" || Z.has(i)) : !1, "isRailroadStyleOptions"), ee = /* @__PURE__ */ h((e) => e ? "railroad" in e && e.railroad ? e.railroad : j(e) ? e : {} : {}, "extractRailroadOverrides"), te = /* @__PURE__ */ h((e) => {
|
|
122
|
-
if (!e || j(e)) return {};
|
|
123
|
-
let { railroad: i, svgId: t, theme: a, look: n, ...r } = e;
|
|
124
|
-
return r;
|
|
125
|
-
}, "extractThemeOverrides"), m = /* @__PURE__ */ h((e, i) => {
|
|
126
|
-
if (typeof e != "string") return i;
|
|
127
|
-
let t = e.trim();
|
|
128
|
-
return K.test(t) ? t : i;
|
|
129
|
-
}, "sanitizeColorValue"), I = /* @__PURE__ */ h((e, i) => {
|
|
130
|
-
if (typeof e != "string") return i;
|
|
131
|
-
let t = e.trim();
|
|
132
|
-
return Y.test(t) ? t : i;
|
|
133
|
-
}, "sanitizeFontFamilyValue"), $ = /* @__PURE__ */ h((e, i) => {
|
|
134
|
-
let t = typeof e == "number" ? e : typeof e == "string" ? Number.parseFloat(e) : NaN;
|
|
135
|
-
return Number.isFinite(t) && t >= 0 ? t : i;
|
|
136
|
-
}, "sanitizeNumberValue"), re = /* @__PURE__ */ h((e) => {
|
|
137
|
-
let i = typeof e == "number" ? e : typeof e == "string" ? Number.parseFloat(e) : NaN;
|
|
138
|
-
return Number.isFinite(i) && i > 0 ? i : void 0;
|
|
139
|
-
}, "parseThemeFontSize"), ie = /* @__PURE__ */ h((e) => {
|
|
140
|
-
let i = I(e.fontFamily, T.fontFamily), t = re(e.fontSize) ?? T.fontSize;
|
|
141
|
-
return {
|
|
142
|
-
...T,
|
|
143
|
-
fontFamily: i,
|
|
144
|
-
fontSize: t,
|
|
145
|
-
terminalFill: m(e.secondBkg ?? e.secondaryColor, T.terminalFill),
|
|
146
|
-
terminalStroke: m(e.secondaryBorderColor ?? e.lineColor, T.terminalStroke),
|
|
147
|
-
terminalTextColor: m(e.secondaryTextColor ?? e.textColor, T.terminalTextColor),
|
|
148
|
-
nonTerminalFill: m(e.mainBkg ?? e.background, T.nonTerminalFill),
|
|
149
|
-
nonTerminalStroke: m(e.primaryBorderColor ?? e.lineColor, T.nonTerminalStroke),
|
|
150
|
-
nonTerminalTextColor: m(e.primaryTextColor ?? e.textColor, T.nonTerminalTextColor),
|
|
151
|
-
lineColor: m(e.lineColor, T.lineColor),
|
|
152
|
-
markerFill: m(e.lineColor, T.markerFill),
|
|
153
|
-
commentFill: m(e.labelBackground ?? e.tertiaryColor, T.commentFill),
|
|
154
|
-
commentStroke: m(e.tertiaryBorderColor ?? e.lineColor, T.commentStroke),
|
|
155
|
-
commentTextColor: m(e.tertiaryTextColor ?? e.textColor, T.commentTextColor),
|
|
156
|
-
specialFill: m(e.tertiaryColor ?? e.secondaryColor, T.specialFill),
|
|
157
|
-
specialStroke: m(e.tertiaryBorderColor ?? e.secondaryBorderColor, T.specialStroke),
|
|
158
|
-
ruleNameColor: m(e.titleColor ?? e.textColor, T.ruleNameColor)
|
|
159
|
-
};
|
|
160
|
-
}, "buildThemeDefaults"), E = /* @__PURE__ */ h((e) => {
|
|
161
|
-
let i = q(), t = ie({
|
|
162
|
-
..._(),
|
|
163
|
-
...i.themeVariables ?? {},
|
|
164
|
-
...te(e)
|
|
165
|
-
}), a = {
|
|
166
|
-
...i.railroad ?? {},
|
|
167
|
-
...ee(e)
|
|
168
|
-
};
|
|
169
|
-
return {
|
|
170
|
-
compactMode: a.compactMode ?? t.compactMode,
|
|
171
|
-
padding: $(a.padding, t.padding),
|
|
172
|
-
verticalSeparation: $(a.verticalSeparation, t.verticalSeparation),
|
|
173
|
-
horizontalSeparation: $(a.horizontalSeparation, t.horizontalSeparation),
|
|
174
|
-
arcRadius: $(a.arcRadius, t.arcRadius),
|
|
175
|
-
fontSize: $(a.fontSize, t.fontSize),
|
|
176
|
-
fontFamily: I(a.fontFamily, t.fontFamily),
|
|
177
|
-
terminalFill: m(a.terminalFill, t.terminalFill),
|
|
178
|
-
terminalStroke: m(a.terminalStroke, t.terminalStroke),
|
|
179
|
-
terminalTextColor: m(a.terminalTextColor, t.terminalTextColor),
|
|
180
|
-
nonTerminalFill: m(a.nonTerminalFill, t.nonTerminalFill),
|
|
181
|
-
nonTerminalStroke: m(a.nonTerminalStroke, t.nonTerminalStroke),
|
|
182
|
-
nonTerminalTextColor: m(a.nonTerminalTextColor, t.nonTerminalTextColor),
|
|
183
|
-
lineColor: m(a.lineColor, t.lineColor),
|
|
184
|
-
strokeWidth: $(a.strokeWidth, t.strokeWidth),
|
|
185
|
-
markerFill: m(a.markerFill, t.markerFill),
|
|
186
|
-
commentFill: m(a.commentFill, t.commentFill),
|
|
187
|
-
commentStroke: m(a.commentStroke, t.commentStroke),
|
|
188
|
-
commentTextColor: m(a.commentTextColor, t.commentTextColor),
|
|
189
|
-
specialFill: m(a.specialFill, t.specialFill),
|
|
190
|
-
specialStroke: m(a.specialStroke, t.specialStroke),
|
|
191
|
-
ruleNameColor: m(a.ruleNameColor, t.ruleNameColor),
|
|
192
|
-
showMarkers: a.showMarkers ?? t.showMarkers,
|
|
193
|
-
markerRadius: $(a.markerRadius, t.markerRadius)
|
|
194
|
-
};
|
|
195
|
-
}, "buildRailroadStyleOptions"), oe = /* @__PURE__ */ h((e) => {
|
|
196
|
-
let { fontFamily: i, fontSize: t, terminalFill: a, terminalStroke: n, terminalTextColor: r, nonTerminalFill: o, nonTerminalStroke: f, nonTerminalTextColor: d, lineColor: s, strokeWidth: c, markerFill: l, commentFill: g, commentStroke: p, commentTextColor: u, specialFill: C, specialStroke: S, ruleNameColor: k } = E(e);
|
|
197
|
-
return `
|
|
198
|
-
.railroad-diagram {
|
|
199
|
-
font-family: ${i};
|
|
200
|
-
font-size: ${t}px;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.railroad-terminal rect {
|
|
204
|
-
fill: ${a};
|
|
205
|
-
stroke: ${n};
|
|
206
|
-
stroke-width: ${c}px;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.railroad-terminal text {
|
|
210
|
-
fill: ${r};
|
|
211
|
-
font-family: ${i};
|
|
212
|
-
font-size: ${t}px;
|
|
213
|
-
text-anchor: middle;
|
|
214
|
-
dominant-baseline: middle;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.railroad-nonterminal rect {
|
|
218
|
-
fill: ${o};
|
|
219
|
-
stroke: ${f};
|
|
220
|
-
stroke-width: ${c}px;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.railroad-nonterminal text {
|
|
224
|
-
fill: ${d};
|
|
225
|
-
font-family: ${i};
|
|
226
|
-
font-size: ${t}px;
|
|
227
|
-
text-anchor: middle;
|
|
228
|
-
dominant-baseline: middle;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.railroad-line {
|
|
232
|
-
stroke: ${s};
|
|
233
|
-
stroke-width: ${c}px;
|
|
234
|
-
fill: none;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.railroad-start circle,
|
|
238
|
-
.railroad-end circle {
|
|
239
|
-
fill: ${l};
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.railroad-comment ellipse {
|
|
243
|
-
fill: ${g};
|
|
244
|
-
stroke: ${p};
|
|
245
|
-
stroke-width: ${c}px;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.railroad-comment text {
|
|
249
|
-
fill: ${u};
|
|
250
|
-
font-style: italic;
|
|
251
|
-
font-family: ${i};
|
|
252
|
-
font-size: ${t}px;
|
|
253
|
-
text-anchor: middle;
|
|
254
|
-
dominant-baseline: middle;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.railroad-special rect {
|
|
258
|
-
fill: ${C};
|
|
259
|
-
stroke: ${S};
|
|
260
|
-
stroke-width: ${c}px;
|
|
261
|
-
stroke-dasharray: 5,3;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.railroad-special text {
|
|
265
|
-
fill: ${d};
|
|
266
|
-
font-family: ${i};
|
|
267
|
-
font-size: ${t}px;
|
|
268
|
-
text-anchor: middle;
|
|
269
|
-
dominant-baseline: middle;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.railroad-rule-name {
|
|
273
|
-
font-weight: bold;
|
|
274
|
-
fill: ${k};
|
|
275
|
-
font-family: ${i};
|
|
276
|
-
font-size: ${t}px;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.railroad-group {
|
|
280
|
-
/* Grouping container, no specific styles */
|
|
281
|
-
}
|
|
282
|
-
`;
|
|
283
|
-
}, "getStyles"), b, x = (b = class {
|
|
284
|
-
constructor() {
|
|
285
|
-
this.d = "";
|
|
286
|
-
}
|
|
287
|
-
moveTo(i, t) {
|
|
288
|
-
return this.d += `M ${i} ${t} `, this;
|
|
289
|
-
}
|
|
290
|
-
lineTo(i, t) {
|
|
291
|
-
return this.d += `L ${i} ${t} `, this;
|
|
292
|
-
}
|
|
293
|
-
horizontalTo(i) {
|
|
294
|
-
return this.d += `H ${i} `, this;
|
|
295
|
-
}
|
|
296
|
-
verticalTo(i) {
|
|
297
|
-
return this.d += `V ${i} `, this;
|
|
298
|
-
}
|
|
299
|
-
arcTo(i, t, a, n, r, o, f) {
|
|
300
|
-
return this.d += `A ${i} ${t} ${a} ${+!!n} ${+!!r} ${o} ${f} `, this;
|
|
301
|
-
}
|
|
302
|
-
build() {
|
|
303
|
-
return this.d.trim();
|
|
304
|
-
}
|
|
305
|
-
}, h(b, "PathBuilder"), b), R, ae = (R = class {
|
|
306
|
-
constructor(i, t = E()) {
|
|
307
|
-
this.textCache = /* @__PURE__ */ new Map(), this.svg = i, this.config = t;
|
|
308
|
-
}
|
|
309
|
-
measureText(i) {
|
|
310
|
-
if (this.textCache.has(i)) return this.textCache.get(i);
|
|
311
|
-
let t = this.svg.append("text").attr("font-family", this.config.fontFamily).attr("font-size", this.config.fontSize).text(i), a = t.node().getBBox(), n = {
|
|
312
|
-
width: a.width,
|
|
313
|
-
height: a.height
|
|
314
|
-
};
|
|
315
|
-
return t.remove(), this.textCache.set(i, n), n;
|
|
316
|
-
}
|
|
317
|
-
renderTerminal(i, t) {
|
|
318
|
-
let a = this.measureText(t), n = a.width + this.config.padding * 2, r = a.height + this.config.padding * 2, o = i.append("g").attr("class", "railroad-terminal");
|
|
319
|
-
return o.append("rect").attr("x", 0).attr("y", 0).attr("width", n).attr("height", r).attr("rx", 10).attr("ry", 10), o.append("text").attr("x", n / 2).attr("y", r / 2).text(t), {
|
|
320
|
-
element: o.node(),
|
|
321
|
-
dimensions: {
|
|
322
|
-
width: n,
|
|
323
|
-
height: r,
|
|
324
|
-
up: r / 2,
|
|
325
|
-
down: r / 2
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
renderNonTerminal(i, t) {
|
|
330
|
-
let a = this.measureText(t), n = a.width + this.config.padding * 2, r = a.height + this.config.padding * 2, o = i.append("g").attr("class", "railroad-nonterminal");
|
|
331
|
-
return o.append("rect").attr("x", 0).attr("y", 0).attr("width", n).attr("height", r), o.append("text").attr("x", n / 2).attr("y", r / 2).text(t), {
|
|
332
|
-
element: o.node(),
|
|
333
|
-
dimensions: {
|
|
334
|
-
width: n,
|
|
335
|
-
height: r,
|
|
336
|
-
up: r / 2,
|
|
337
|
-
down: r / 2
|
|
338
|
-
}
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
renderSequence(i, t) {
|
|
342
|
-
let a = t.map((s) => this.renderExpression(i, s)), n = 0, r = 0, o = 0;
|
|
343
|
-
for (let s of a) n += s.dimensions.width, r = Math.max(r, s.dimensions.up), o = Math.max(o, s.dimensions.down);
|
|
344
|
-
n += (a.length - 1) * this.config.horizontalSeparation;
|
|
345
|
-
let f = i.append("g").attr("class", "railroad-sequence"), d = 0;
|
|
346
|
-
for (let s = 0; s < a.length; s++) {
|
|
347
|
-
let c = a[s], l = r - c.dimensions.up;
|
|
348
|
-
if (f.node().appendChild(c.element).setAttribute("transform", `translate(${d}, ${l})`), s < a.length - 1) {
|
|
349
|
-
let g = d + c.dimensions.width, p = g + this.config.horizontalSeparation, u = r;
|
|
350
|
-
f.append("path").attr("class", "railroad-line").attr("d", new x().moveTo(g, u).lineTo(p, u).build());
|
|
351
|
-
}
|
|
352
|
-
d += c.dimensions.width + this.config.horizontalSeparation;
|
|
353
|
-
}
|
|
354
|
-
return {
|
|
355
|
-
element: f.node(),
|
|
356
|
-
dimensions: {
|
|
357
|
-
width: n,
|
|
358
|
-
height: r + o,
|
|
359
|
-
up: r,
|
|
360
|
-
down: o
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
renderChoice(i, t) {
|
|
365
|
-
let a = t.map((g) => this.renderExpression(i, g)), n = 0, r = 0;
|
|
366
|
-
for (let g of a) n = Math.max(n, g.dimensions.width), r += g.dimensions.height;
|
|
367
|
-
r += (a.length - 1) * this.config.verticalSeparation;
|
|
368
|
-
let o = this.config.arcRadius, f = o * 4, d = n + f, s = i.append("g").attr("class", "railroad-choice"), c = 0, l = r / 2;
|
|
369
|
-
for (let g of a) {
|
|
370
|
-
let p = c, u = p + g.dimensions.up, C = o * 2 + (n - g.dimensions.width) / 2;
|
|
371
|
-
s.node().appendChild(g.element).setAttribute("transform", `translate(${C}, ${p})`);
|
|
372
|
-
let S = new x(), k = u > l;
|
|
373
|
-
u === l ? S.moveTo(0, l).lineTo(C, u) : S.moveTo(0, l).arcTo(o, o, 0, !1, k, o, l + (k ? o : -o)).lineTo(o, u - (k ? o : -o)).arcTo(o, o, 0, !1, !k, o * 2, u).lineTo(C, u), s.append("path").attr("class", "railroad-line").attr("d", S.build());
|
|
374
|
-
let z = new x(), D = C + g.dimensions.width, L = d - o * 2;
|
|
375
|
-
u === l ? z.moveTo(D, u).lineTo(d, l) : z.moveTo(D, u).lineTo(L, u).arcTo(o, o, 0, !1, !k, d - o, u + (k ? -o : o)).lineTo(d - o, l + (k ? o : -o)).arcTo(o, o, 0, !1, k, d, l), s.append("path").attr("class", "railroad-line").attr("d", z.build()), c += g.dimensions.height + this.config.verticalSeparation;
|
|
376
|
-
}
|
|
377
|
-
return {
|
|
378
|
-
element: s.node(),
|
|
379
|
-
dimensions: {
|
|
380
|
-
width: d,
|
|
381
|
-
height: r,
|
|
382
|
-
up: l,
|
|
383
|
-
down: r - l
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
renderOptional(i, t) {
|
|
388
|
-
let a = this.renderExpression(i, t), n = this.config.arcRadius, r = n * 2, o = a.dimensions.width + n * 4, f = a.dimensions.height + r, d = i.append("g").attr("class", "railroad-optional"), s = n * 2, c = r;
|
|
389
|
-
d.node().appendChild(a.element).setAttribute("transform", `translate(${s}, ${c})`);
|
|
390
|
-
let l = c + a.dimensions.up, g = new x().moveTo(0, l).lineTo(n * 2, l);
|
|
391
|
-
d.append("path").attr("class", "railroad-line").attr("d", g.build());
|
|
392
|
-
let p = new x().moveTo(s + a.dimensions.width, l).lineTo(o, l);
|
|
393
|
-
d.append("path").attr("class", "railroad-line").attr("d", p.build());
|
|
394
|
-
let u = new x().moveTo(0, l).arcTo(n, n, 0, !1, !1, n, l - n).lineTo(n, n).arcTo(n, n, 0, !1, !0, n * 2, 0).lineTo(o - n * 2, 0).arcTo(n, n, 0, !1, !0, o - n, n).lineTo(o - n, l - n).arcTo(n, n, 0, !1, !1, o, l);
|
|
395
|
-
return d.append("path").attr("class", "railroad-line").attr("d", u.build()), {
|
|
396
|
-
element: d.node(),
|
|
397
|
-
dimensions: {
|
|
398
|
-
width: o,
|
|
399
|
-
height: f,
|
|
400
|
-
up: l,
|
|
401
|
-
down: f - l
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
}
|
|
405
|
-
renderRepetition(i, t, a) {
|
|
406
|
-
let n = this.renderExpression(i, t), r = this.config.arcRadius, o = r * 2, f = n.dimensions.width + r * 4, d = a === 0, s = n.dimensions.height + o + (d ? o : 0), c = i.append("g").attr("class", "railroad-repetition"), l = r * 2, g = d ? o : 0;
|
|
407
|
-
c.node().appendChild(n.element).setAttribute("transform", `translate(${l}, ${g})`);
|
|
408
|
-
let p = g + n.dimensions.up;
|
|
409
|
-
c.append("path").attr("class", "railroad-line").attr("d", new x().moveTo(0, p).lineTo(r * 2, p).build()), c.append("path").attr("class", "railroad-line").attr("d", new x().moveTo(l + n.dimensions.width, p).lineTo(f, p).build());
|
|
410
|
-
let u = g + n.dimensions.height + r, C = new x().moveTo(l + n.dimensions.width, p).arcTo(r, r, 0, !1, !0, l + n.dimensions.width + r, p + r).lineTo(l + n.dimensions.width + r, u).arcTo(r, r, 0, !1, !0, l + n.dimensions.width, u + r).lineTo(r * 2, u + r).arcTo(r, r, 0, !1, !0, r, u).lineTo(r, p + r).arcTo(r, r, 0, !1, !0, r * 2, p);
|
|
411
|
-
if (c.append("path").attr("class", "railroad-line").attr("d", C.build()), d) {
|
|
412
|
-
let S = new x().moveTo(0, p).arcTo(r, r, 0, !1, !1, r, p - r).lineTo(r, r).arcTo(r, r, 0, !1, !0, r * 2, 0).lineTo(f - r * 2, 0).arcTo(r, r, 0, !1, !0, f - r, r).lineTo(f - r, p - r).arcTo(r, r, 0, !1, !1, f, p);
|
|
413
|
-
c.append("path").attr("class", "railroad-line").attr("d", S.build());
|
|
414
|
-
}
|
|
415
|
-
return {
|
|
416
|
-
element: c.node(),
|
|
417
|
-
dimensions: {
|
|
418
|
-
width: f,
|
|
419
|
-
height: s,
|
|
420
|
-
up: p,
|
|
421
|
-
down: s - p
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
renderSpecial(i, t) {
|
|
426
|
-
let a = this.measureText("? " + t + " ?"), n = a.width + this.config.padding * 2, r = a.height + this.config.padding * 2, o = i.append("g").attr("class", "railroad-special");
|
|
427
|
-
return o.append("rect").attr("x", 0).attr("y", 0).attr("width", n).attr("height", r), o.append("text").attr("x", n / 2).attr("y", r / 2).text("? " + t + " ?"), {
|
|
428
|
-
element: o.node(),
|
|
429
|
-
dimensions: {
|
|
430
|
-
width: n,
|
|
431
|
-
height: r,
|
|
432
|
-
up: r / 2,
|
|
433
|
-
down: r / 2
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
renderExpression(i, t) {
|
|
438
|
-
switch (t.type) {
|
|
439
|
-
case "terminal":
|
|
440
|
-
return this.renderTerminal(i, t.value);
|
|
441
|
-
case "nonterminal":
|
|
442
|
-
return this.renderNonTerminal(i, t.name);
|
|
443
|
-
case "sequence":
|
|
444
|
-
return this.renderSequence(i, t.elements);
|
|
445
|
-
case "choice":
|
|
446
|
-
return this.renderChoice(i, t.alternatives);
|
|
447
|
-
case "optional":
|
|
448
|
-
return this.renderOptional(i, t.element);
|
|
449
|
-
case "repetition":
|
|
450
|
-
return this.renderRepetition(i, t.element, t.min);
|
|
451
|
-
case "special":
|
|
452
|
-
return this.renderSpecial(i, t.text);
|
|
453
|
-
default:
|
|
454
|
-
throw Error(`Unknown node type: ${t.type}`);
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
renderRule(i, t) {
|
|
458
|
-
let a = this.svg.append("g").attr("class", "railroad-rule").attr("transform", `translate(0, ${t})`), n = i.name + " =", r = this.measureText(n).width + 20, o = r + 20, f = a.append("g"), d = this.renderExpression(f, i.definition), s = Math.max(20, d.dimensions.up), c = s - d.dimensions.up;
|
|
459
|
-
return f.attr("transform", `translate(${o}, ${c})`), a.append("g").attr("class", "railroad-rule-name-group").append("text").attr("class", "railroad-rule-name").attr("x", 0).attr("y", s).text(n), a.append("g").attr("class", "railroad-start").append("circle").attr("cx", r).attr("cy", s).attr("r", this.config.markerRadius), a.append("g").attr("class", "railroad-end").append("circle").attr("cx", o + d.dimensions.width + 10).attr("cy", s).attr("r", this.config.markerRadius), a.append("path").attr("class", "railroad-line").attr("d", new x().moveTo(r + this.config.markerRadius, s).lineTo(o, s).build()), a.append("path").attr("class", "railroad-line").attr("d", new x().moveTo(o + d.dimensions.width, s).lineTo(o + d.dimensions.width + 10 - this.config.markerRadius, s).build()), {
|
|
460
|
-
height: Math.max(40, c + d.dimensions.height + this.config.padding * 2),
|
|
461
|
-
width: o + d.dimensions.width + 10 + this.config.markerRadius
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
renderDiagram(i) {
|
|
465
|
-
let t = this.config.padding, a = 0;
|
|
466
|
-
for (let n of i) {
|
|
467
|
-
let r = this.renderRule(n, t);
|
|
468
|
-
t += r.height + this.config.verticalSeparation, a = Math.max(a, r.width);
|
|
469
|
-
}
|
|
470
|
-
return {
|
|
471
|
-
width: a + this.config.padding * 2,
|
|
472
|
-
height: t + this.config.padding
|
|
473
|
-
};
|
|
474
|
-
}
|
|
475
|
-
}, h(R, "RailroadRenderer"), R), W = /* @__PURE__ */ h((e, i, t) => {
|
|
476
|
-
G(e, i.height, i.width, t), e.attr("viewBox", `0 0 ${i.width} ${i.height}`);
|
|
477
|
-
}, "configureRailroadSvgSize"), le = { draw: /* @__PURE__ */ h((e, i, t) => {
|
|
478
|
-
w.debug(`[Railroad] Rendering diagram
|
|
479
|
-
` + e);
|
|
480
|
-
try {
|
|
481
|
-
let a = P(i);
|
|
482
|
-
a.attr("class", "railroad-diagram");
|
|
483
|
-
let n = q().railroad?.useMaxWidth ?? !0, r = J.getRules();
|
|
484
|
-
if (w.debug(`[Railroad] Rendering ${r.length} rules`), r.length === 0) {
|
|
485
|
-
w.warn("[Railroad] No rules to render"), W(a, {
|
|
486
|
-
height: 100,
|
|
487
|
-
width: 200
|
|
488
|
-
}, n);
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
W(a, new ae(a, E()).renderDiagram(r), n), w.debug("[Railroad] Render complete");
|
|
492
|
-
} catch (a) {
|
|
493
|
-
throw w.error("[Railroad] Render error:", a), a;
|
|
494
|
-
}
|
|
495
|
-
}, "draw") };
|
|
496
|
-
export {
|
|
497
|
-
le as L,
|
|
498
|
-
oe as N,
|
|
499
|
-
J as y
|
|
500
|
-
};
|