@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.
Files changed (168) hide show
  1. package/package.json +2 -2
  2. package/dist/abnfDiagram-VCTEODGH-Bzbg7AHk-DFERbIEu.js +0 -92
  3. package/dist/arc-CKhg5DVn-BIpMje7c.js +0 -80
  4. package/dist/architectureDiagram-5GKGNRK7-CqHVyBRI-CLWcRmoG.js +0 -4149
  5. package/dist/astro-DdQ3Kp7Q-BDE5qFXd.js +0 -18
  6. package/dist/blockDiagram-I7D4REHJ-DWFqHR0L-D8v5LhXM.js +0 -2029
  7. package/dist/c-lfOsiBpu-DMPKLUI8.js +0 -4
  8. package/dist/c4Diagram-7LVT6UL2-DXHigzTJ-BR9440iK.js +0 -3067
  9. package/dist/catppuccin-latte-D9NPLB7Y-sAlQrrP2.js +0 -4
  10. package/dist/channel-DUDXYB-g-BsX3Acdu.js +0 -5
  11. package/dist/chunk-2Q5K7J3B-CQFXhYzi-C3CTUgHo.js +0 -12
  12. package/dist/chunk-5VM5RSS4-DF_fkndM-uFSHkP_V.js +0 -19
  13. package/dist/chunk-F27PBJKO-Bf2CKIqN-CUI4z39H.js +0 -65
  14. package/dist/chunk-IMKFNOWR-DIsz_YLV-B6u2fLNJ.js +0 -2116
  15. package/dist/chunk-JWPE2WC7-DI69CthA-D_FsPQj-.js +0 -8
  16. package/dist/chunk-POPQ4Y6H-DycI9Jzm-BWixWzlU.js +0 -24
  17. package/dist/chunk-SHT3W25Y-CKxDgOBI-OOdqZuVE.js +0 -4307
  18. package/dist/chunk-SVP7TREG-tW_qYlvV-vP5bsK2H.js +0 -500
  19. package/dist/chunk-TICWLB2K-CuiDrX3P-WR-FPNea.js +0 -3451
  20. package/dist/chunk-XXDRQBXY-CSrEKR2C-C6SaSSCC.js +0 -8
  21. package/dist/classDiagram-ZZMXUADV-WzcguFxl-CKKn1Tfx.js +0 -17
  22. package/dist/classDiagram-v2-VYDZK3BY-jdAXYY7W-CKKn1Tfx.js +0 -17
  23. package/dist/cose-bilkent-JH36ORCC-DbS7GVMv-bbQOsy5Y.js +0 -2256
  24. package/dist/csharp-RRkgh3c4-lim_vKPd.js +0 -4
  25. package/dist/css-BbwcBM_4-B_2PRTA_.js +0 -4
  26. package/dist/csv-DFU5sVkH-BPWcOTV4.js +0 -4
  27. package/dist/cynefin-OW5HDTMX-CmxQwqmf-D_GdoNIu.js +0 -21781
  28. package/dist/cynefinDiagram-5FMLGOSQ-BNb88xpJ-DfS9O7P4.js +0 -351
  29. package/dist/cytoscape.esm-YSf_2rtb-CoO8mT3p.js +0 -18279
  30. package/dist/dagre-C9xJrfGe-Di-1Ikh0.js +0 -1667
  31. package/dist/dagre-GXQ25YYZ-uiXfyLw2-PU-qeT6_.js +0 -429
  32. package/dist/defaultLocale-TbxLDlcU-BrdwcF9K.js +0 -180
  33. package/dist/diagram-S7CK7UJ4-g67BXvGR-Cp9bzjGj.js +0 -303
  34. package/dist/diagram-UQ7AKVKN-DfJJIsVs-CC7ekguS.js +0 -210
  35. package/dist/diagram-VSXAHHWV-DmtFfqWN-C9ZLHKzj.js +0 -439
  36. package/dist/diagram-VX7I27RA--gfQ90BY-QNtwG6Ck.js +0 -477
  37. package/dist/diagram-Z3DM3KII-Cu_rSHu0-CCCsIuz4.js +0 -127
  38. package/dist/diff-D_LJiFgV-DenOJuyV.js +0 -4
  39. package/dist/docker-DMpUQ2UE-xX8PDoIv.js +0 -4
  40. package/dist/documentation.es.js +0 -7
  41. package/dist/documentation.umd.js +0 -3715
  42. package/dist/ebnfDiagram-PWID7BFC-B_qfACMJ-D_Xjruh2.js +0 -109
  43. package/dist/erDiagram-RLTQ6QDP-Dt9efGmz-BPS1Iwl5.js +0 -2042
  44. package/dist/flowDiagram-HODETNUW-sAcaB3rt-Ci8x-zG0.js +0 -6
  45. package/dist/ganttDiagram-EL5Y4UJY-CtWGP-hX-qar4oLEq.js +0 -3098
  46. package/dist/git-commit--2NDNcyW-Dw9_h8sQ.js +0 -5
  47. package/dist/git-rebase-CbNvxADk-DAgBrkyL.js +0 -5
  48. package/dist/gitGraphDiagram-WWUBYQGX-B7B7IG_5-x8UcOce8.js +0 -737
  49. package/dist/go-BEdBk4fh-DqSXHrGo.js +0 -4
  50. package/dist/graphql-BMuT9GwB-BP9pcQru.js +0 -14
  51. package/dist/haml-D3QmTYiV-BTaBXoPr.js +0 -10
  52. package/dist/handlebars-C_aYHp26-CWcrQHYv.js +0 -14
  53. package/dist/haskell-DSSJ-2AO-BlmVjKNy.js +0 -4
  54. package/dist/html-derivative-DgZQ_xNe-BAs__2u-.js +0 -5
  55. package/dist/html-zcQqUZxh-Dg8OkMBp.js +0 -10
  56. package/dist/http-BGkfDG8i-lqXytFlH.js +0 -14
  57. package/dist/index-BaAWoj3P.js +0 -43522
  58. package/dist/infoDiagram-27XIBGKW-DAx9hub5-CDUrF89O.js +0 -18
  59. package/dist/ini-CmgEGOBJ-70PBzbbb.js +0 -4
  60. package/dist/init-Cgg2UTSf-BsHkAom2.js +0 -15
  61. package/dist/ishikawaDiagram-5VMMS53U-CnBB9iXH-2YyZ3Nxy.js +0 -729
  62. package/dist/java-CaG1IqbK-D6YBp1XX.js +0 -4
  63. package/dist/javascript--0qAxhnA-BRPKgr3C.js +0 -4
  64. package/dist/journeyDiagram-3NMN7TZE-B0a4pOJX-CgtsuE-Y.js +0 -909
  65. package/dist/json-DVwBUiza-D8uacQj0.js +0 -4
  66. package/dist/json5-D2Eltym1-Biib5ALh.js +0 -4
  67. package/dist/jsonc-BPIJyZ7u-BZEKkMok.js +0 -4
  68. package/dist/jsonl-BGkjXns2-BG2V-IA2.js +0 -4
  69. package/dist/jsx-cVAJ0Z2c-Cl0AMtmu.js +0 -4
  70. package/dist/kanban-definition-UXKFOSKX-BGnOZMUl-CHT2EG_7.js +0 -1029
  71. package/dist/katex-Be3DWdAP-BWcdC2Xb.js +0 -22287
  72. package/dist/kotlin-CQsNEM2o-Dy_91eL4.js +0 -4
  73. package/dist/latex-g3NZbvcl-tKQf8TuW.js +0 -5
  74. package/dist/less-9LYkHheD-tcNg8M2_.js +0 -4
  75. package/dist/linear-Cf872ac2-BjGvLlX5.js +0 -254
  76. package/dist/liquid-CG3ph2-5-wZo8nDay.js +0 -14
  77. package/dist/lua-BdA7_iyX-Fg4s9W4F.js +0 -5
  78. package/dist/make-CE9Hryyp-CrUl7LOH.js +0 -4
  79. package/dist/markdown-Gqx6-FHJ-Bcqt-5kX.js +0 -4
  80. package/dist/material-theme-darker-DL4lHZSa-DMHCIvq5.js +0 -4
  81. package/dist/mdc-C-RLGlI2-DzcUIqJQ.js +0 -12
  82. package/dist/mdx-DswfiFg4-CK6jOqmu.js +0 -4
  83. package/dist/mermaid-CAl3BhSL-CpQh0Vft.js +0 -4
  84. package/dist/mindmap-definition-YA3MSWOX-D0iYuN9C-B3uI77eT.js +0 -1026
  85. package/dist/nginx-CokYOiS8-DjML3dpY.js +0 -5
  86. package/dist/objective-c-DK-EKgyd-C809HPrX.js +0 -4
  87. package/dist/ordinal-CNzaYghg-B_JXdapq.js +0 -63
  88. package/dist/pascal-CRtegPzh-a8whuidZ.js +0 -4
  89. package/dist/pegDiagram-XKGWAZYB-6oG4KeYC-CG27veJ_.js +0 -104
  90. package/dist/perl-C45KUBhP-Q6opd9qO.js +0 -16
  91. package/dist/php-COzTb61D-DW91EkjY.js +0 -18
  92. package/dist/pieDiagram-E7YTZNPT-DsNO0m7t-CMKObJlC.js +0 -191
  93. package/dist/plsql-Bx7tup_v-BJoF2Vrf.js +0 -4
  94. package/dist/postcss-DjDdOEzv-DaHMm3XW.js +0 -4
  95. package/dist/powershell-BeUvHe6o-BC3uPZPS.js +0 -4
  96. package/dist/proto-DGLklcji-w0B_itsp.js +0 -4
  97. package/dist/pug-BQ5MM2xz-DMZvJUHt.js +0 -12
  98. package/dist/python-C_6ySqsv-D_5pfY__.js +0 -4
  99. package/dist/quadrantDiagram-AXDQQJYC-B6Dc7fje-C23uvcHP.js +0 -2046
  100. package/dist/r-CNL4a0Qi-pixge7f9.js +0 -4
  101. package/dist/railroadDiagram-O6MQD6OU-D8qLcD4O-B_Hr3s-n.js +0 -80
  102. package/dist/reg-D6txjqBF-bHAwx9Pm.js +0 -4
  103. package/dist/requirementDiagram-BXWQKSXE-Cx28BZaS-Bu-h1fa9.js +0 -2283
  104. package/dist/rst-xmthoFSf-BdN-iqJu.js +0 -20
  105. package/dist/ruby-CmwqiOyg-B5qGUHPy.js +0 -44
  106. package/dist/rust-BrRMzTsN-CaZtBt24.js +0 -4
  107. package/dist/sankeyDiagram-P5KCCOFB-CqEXebJJ-BrChTi-e.js +0 -948
  108. package/dist/sass-CL6GLiPQ-pslLeRRb.js +0 -4
  109. package/dist/scss-CiLZCexj-CladYQkr.js +0 -5
  110. package/dist/sequenceDiagram-WJ2MYXX4-Bs_1V5D1-Da6JW3KG.js +0 -4263
  111. package/dist/shellscript-Dfpezy65-BtH46UX7.js +0 -4
  112. package/dist/shellsession-CRcAC04a-BFLTslz7.js +0 -5
  113. package/dist/sizeCapture-INFHLROL-Bc4fS2u3-DMniWWy4.js +0 -46
  114. package/dist/splunk-MGILMmew-BP8P7eWt.js +0 -4
  115. package/dist/sql-D_W5grEC-Dcn2WLbD.js +0 -4
  116. package/dist/ssh-config-CFmUyPR7-BB1rrGb9.js +0 -4
  117. package/dist/stateDiagram-D77RDMKH-oTiwIYVV-BphZk0uR.js +0 -210
  118. package/dist/stateDiagram-v2-MP3YSRHH-gbAY2cmo-D78HyGx1.js +0 -17
  119. package/dist/style.css +0 -1
  120. package/dist/stylus-Kh83dApl-DAu5PNZ9.js +0 -4
  121. package/dist/svelte-HVIHTyhe-BdPJXyv7.js +0 -14
  122. package/dist/swift-B7Z-rXzN-CQtmhAMw.js +0 -4
  123. package/dist/swimlanes-42K2YHIH-BSXAPn2j-C7pTnVuk.js +0 -4983
  124. package/dist/swimlanesDiagram-VR7AAH4N-Ror_0lre-Di8OVgei.js +0 -17
  125. package/dist/timeline-definition-24CTP7MA-gOHmAY1H-aIgAzo7s.js +0 -1096
  126. package/dist/toml-CIQJnU5u-DjT9Bjqu.js +0 -4
  127. package/dist/tsx-DiMnnori-B-5hSr15.js +0 -4
  128. package/dist/twig-BXXOiPVV-CmgmU-L-.js +0 -18
  129. package/dist/types/components/DiscardChangesPrompt.vue.d.ts +0 -35
  130. package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +0 -1
  131. package/dist/types/components/DocumentationContent.vue.d.ts +0 -186
  132. package/dist/types/components/DocumentationContent.vue.d.ts.map +0 -1
  133. package/dist/types/components/DocumentationDisplay.vue.d.ts +0 -105
  134. package/dist/types/components/DocumentationDisplay.vue.d.ts.map +0 -1
  135. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +0 -31
  136. package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +0 -1
  137. package/dist/types/components/ProductDocumentModal.vue.d.ts +0 -72
  138. package/dist/types/components/ProductDocumentModal.vue.d.ts.map +0 -1
  139. package/dist/types/composables/index.d.ts +0 -6
  140. package/dist/types/composables/index.d.ts.map +0 -1
  141. package/dist/types/composables/useI18n.d.ts +0 -9
  142. package/dist/types/composables/useI18n.d.ts.map +0 -1
  143. package/dist/types/external-links.d.ts +0 -5
  144. package/dist/types/external-links.d.ts.map +0 -1
  145. package/dist/types/helpers.d.ts +0 -8
  146. package/dist/types/helpers.d.ts.map +0 -1
  147. package/dist/types/index.d.ts +0 -7
  148. package/dist/types/index.d.ts.map +0 -1
  149. package/dist/types/types/document-list.d.ts +0 -28
  150. package/dist/types/types/document-list.d.ts.map +0 -1
  151. package/dist/types/types/document-modal.d.ts +0 -8
  152. package/dist/types/types/document-modal.d.ts.map +0 -1
  153. package/dist/types/types/index.d.ts +0 -3
  154. package/dist/types/types/index.d.ts.map +0 -1
  155. package/dist/typescript-DFf19o_s-B0ag8pir.js +0 -4
  156. package/dist/v-DbYZLS97-CAPuTPjr.js +0 -4
  157. package/dist/vb-DRaXf86R-Bx9Rwnco.js +0 -4
  158. package/dist/vennDiagram-4TSXK5OY-Cr4BWMuk-BjBvyxCC.js +0 -1911
  159. package/dist/viml-DgaHry3T-BeYQ8dZh.js +0 -4
  160. package/dist/vue-DPI5F0qT-D-Ahkoja.js +0 -22
  161. package/dist/vue-html-D7FCsiW2-DLSUNIPr.js +0 -5
  162. package/dist/wardleyDiagram-VM6X3IG4-a6H91k9Q-CsH4gQQ0.js +0 -639
  163. package/dist/wasm-DXa1gtBd-CfuK9YWP.js +0 -4
  164. package/dist/wgsl-Vcm3Lg52-C2IZ7ENh.js +0 -4
  165. package/dist/xml-DnOpIvRK-C-akVYiK.js +0 -5
  166. package/dist/xsl-K_2BlT3G-D3eRZGNO.js +0 -5
  167. package/dist/xychartDiagram-S5SC5T6Z-7mX_nPmO-CoM4SG9q.js +0 -2218
  168. package/dist/yaml-BswqmnDe-X78l_Ibz.js +0 -4
@@ -1,639 +0,0 @@
1
- import { n as St, r as Mt, k as Ct, j as Pt, t as Nt, e as zt, a as g, aj as Tt, X as It, z as Q, m as J, a2 as At, V as Lt, $ as Et, c as G } from "./index-BaAWoj3P.js";
2
- import { R as Rt } from "./cynefin-OW5HDTMX-CmxQwqmf-D_GdoNIu.js";
3
- import { t as Bt } from "./chunk-JWPE2WC7-DI69CthA-D_FsPQj-.js";
4
- var Y = /* @__PURE__ */ g((o, r) => {
5
- let e = o <= 1 ? o * 100 : o;
6
- if (e < 0 || e > 100) throw Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`);
7
- return e;
8
- }, "toPercent"), T = /* @__PURE__ */ g((o, r, e) => ({
9
- x: Y(r, `${e} evolution`),
10
- y: Y(o, `${e} visibility`)
11
- }), "toCoordinates"), U = /* @__PURE__ */ g((o) => {
12
- if (o) {
13
- if (o === "+<>") return "bidirectional";
14
- if (o === "+<") return "backward";
15
- if (o === "+>") return "forward";
16
- }
17
- }, "getFlowFromPort"), Ft = /* @__PURE__ */ g((o) => {
18
- if (!o?.startsWith("+")) return {};
19
- let r = /^\+'([^']*)'/.exec(o)?.[1];
20
- return o.includes("<>") ? {
21
- flow: "bidirectional",
22
- label: r
23
- } : o.includes("<") ? {
24
- flow: "backward",
25
- label: r
26
- } : o.includes(">") ? {
27
- flow: "forward",
28
- label: r
29
- } : { label: r };
30
- }, "extractFlowFromArrow"), Xt = /* @__PURE__ */ g((o, r) => {
31
- if (Bt(o, r), o.size && r.setSize(o.size.width, o.size.height), o.evolution) {
32
- let e = o.evolution.stages.map((a) => a.secondName ? `${a.name.trim()} / ${a.secondName.trim()}` : a.name.trim()), p = o.evolution.stages.filter((a) => a.boundary !== void 0).map((a) => a.boundary);
33
- r.updateAxes({
34
- stages: e,
35
- stageBoundaries: p
36
- });
37
- }
38
- if (o.anchors.forEach((e) => {
39
- let p = T(e.visibility, e.evolution, `Anchor "${e.name}"`);
40
- r.addNode(e.name, e.name, p.x, p.y, "anchor");
41
- }), o.components.forEach((e) => {
42
- let p = T(e.visibility, e.evolution, `Component "${e.name}"`), a = e.label ? (e.label.negX ? -1 : 1) * e.label.offsetX : void 0, s = e.label ? (e.label.negY ? -1 : 1) * e.label.offsetY : void 0, u = e.decorator?.strategy;
43
- r.addNode(e.name, e.name, p.x, p.y, "component", a, s, e.inertia, u);
44
- }), o.notes.forEach((e) => {
45
- let p = T(e.visibility, e.evolution, `Note "${e.text}"`);
46
- r.addNote(e.text, p.x, p.y);
47
- }), o.pipelines.forEach((e) => {
48
- let p = r.getNode(e.parent);
49
- if (!p || typeof p.y != "number") throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);
50
- let a = p.y;
51
- r.startPipeline(e.parent), e.components.forEach((s) => {
52
- let u = `${e.parent}_${s.name}`, S = s.label ? (s.label.negX ? -1 : 1) * s.label.offsetX : void 0, y = s.label ? (s.label.negY ? -1 : 1) * s.label.offsetY : void 0, F = Y(s.evolution, `Pipeline component "${s.name}" evolution`);
53
- r.addNode(u, s.name, F, a, "pipeline-component", S, y), r.addPipelineComponent(e.parent, u);
54
- });
55
- }), o.links.forEach((e) => {
56
- let p = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-.")), a = U(e.fromPort) ?? U(e.toPort), { flow: s, label: u } = Ft(e.arrow);
57
- !a && s && (a = s);
58
- let S = e.linkLabel, y = u ?? S;
59
- r.addLink(r.resolveNodeId(e.from), r.resolveNodeId(e.to), p, y, a);
60
- }), o.evolves.forEach((e) => {
61
- let p = r.getNode(e.component);
62
- if (p?.y !== void 0) {
63
- let a = Y(e.target, `Evolve target for "${e.component}"`);
64
- r.addTrend(e.component, a, p.y);
65
- }
66
- }), o.annotations.length > 0) {
67
- let e = o.annotations[0], p = T(e.x, e.y, "Annotations box");
68
- r.setAnnotationsBox(p.x, p.y);
69
- }
70
- o.annotation.forEach((e) => {
71
- let p = T(e.x, e.y, `Annotation ${e.number}`);
72
- r.addAnnotation(e.number, [{
73
- x: p.x,
74
- y: p.y
75
- }], e.text);
76
- }), o.accelerators.forEach((e) => {
77
- let p = T(e.x, e.y, `Accelerator "${e.name}"`);
78
- r.addAccelerator(e.name, p.x, p.y);
79
- }), o.deaccelerators.forEach((e) => {
80
- let p = T(e.x, e.y, `Deaccelerator "${e.name}"`);
81
- r.addDeaccelerator(e.name, p.x, p.y);
82
- });
83
- }, "populateDb"), K = {
84
- parser: { yy: void 0 },
85
- parse: /* @__PURE__ */ g(async (o) => {
86
- let r = await Rt("wardley", o);
87
- J.debug(r);
88
- let e = K.parser?.yy;
89
- if (!e || typeof e.addNode != "function") throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
90
- Xt(r, e);
91
- }, "parse")
92
- }, A, w = new (A = class {
93
- constructor() {
94
- this.nodes = /* @__PURE__ */ new Map(), this.links = [], this.trends = /* @__PURE__ */ new Map(), this.pipelines = /* @__PURE__ */ new Map(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.axes = {};
95
- }
96
- addNode(r) {
97
- let e = this.nodes.get(r.id) ?? {
98
- id: r.id,
99
- label: r.label
100
- }, p = {
101
- ...e,
102
- ...r,
103
- className: r.className ?? e.className,
104
- labelOffsetX: r.labelOffsetX ?? e.labelOffsetX,
105
- labelOffsetY: r.labelOffsetY ?? e.labelOffsetY
106
- };
107
- this.nodes.set(r.id, p);
108
- }
109
- addLink(r) {
110
- this.links.push(r);
111
- }
112
- addTrend(r) {
113
- this.trends.set(r.nodeId, r);
114
- }
115
- startPipeline(r) {
116
- this.pipelines.set(r, {
117
- nodeId: r,
118
- componentIds: []
119
- });
120
- let e = this.nodes.get(r);
121
- e && (e.isPipelineParent = !0);
122
- }
123
- addPipelineComponent(r, e) {
124
- let p = this.pipelines.get(r);
125
- p && p.componentIds.push(e);
126
- let a = this.nodes.get(e);
127
- a && (a.inPipeline = !0);
128
- }
129
- addAnnotation(r) {
130
- this.annotations.push(r);
131
- }
132
- addNote(r) {
133
- this.notes.push(r);
134
- }
135
- addAccelerator(r) {
136
- this.accelerators.push(r);
137
- }
138
- addDeaccelerator(r) {
139
- this.deaccelerators.push(r);
140
- }
141
- setAnnotationsBox(r, e) {
142
- this.annotationsBox = {
143
- x: r,
144
- y: e
145
- };
146
- }
147
- setAxes(r) {
148
- this.axes = {
149
- ...this.axes,
150
- ...r
151
- };
152
- }
153
- setSize(r, e) {
154
- this.size = {
155
- width: r,
156
- height: e
157
- };
158
- }
159
- getNode(r) {
160
- return this.nodes.get(r);
161
- }
162
- resolveNodeId(r) {
163
- if (this.nodes.has(r)) return r;
164
- for (let [e, p] of this.nodes) if (p.label === r) return e;
165
- return r;
166
- }
167
- build() {
168
- let r = [];
169
- for (let e of this.nodes.values()) {
170
- if (typeof e.x != "number" || typeof e.y != "number") throw Error(`Node "${e.label}" is missing coordinates`);
171
- r.push(e);
172
- }
173
- return {
174
- nodes: r,
175
- links: [...this.links],
176
- trends: [...this.trends.values()],
177
- pipelines: [...this.pipelines.values()],
178
- annotations: [...this.annotations],
179
- notes: [...this.notes],
180
- accelerators: [...this.accelerators],
181
- deaccelerators: [...this.deaccelerators],
182
- annotationsBox: this.annotationsBox,
183
- axes: { ...this.axes },
184
- size: this.size
185
- };
186
- }
187
- clear() {
188
- this.nodes.clear(), this.links = [], this.trends.clear(), this.pipelines.clear(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.annotationsBox = void 0, this.axes = {}, this.size = void 0;
189
- }
190
- }, g(A, "WardleyBuilder"), A)();
191
- function tt() {
192
- return G()["wardley-beta"];
193
- }
194
- g(tt, "getConfig");
195
- function et(o, r, e, p, a, s, u, S, y) {
196
- w.addNode({
197
- id: o,
198
- label: r,
199
- x: e,
200
- y: p,
201
- className: a,
202
- labelOffsetX: s,
203
- labelOffsetY: u,
204
- inertia: S,
205
- sourceStrategy: y
206
- });
207
- }
208
- g(et, "addNode");
209
- function at(o, r, e = !1, p, a) {
210
- w.addLink({
211
- source: o,
212
- target: r,
213
- dashed: e,
214
- label: p,
215
- flow: a
216
- });
217
- }
218
- g(at, "addLink");
219
- function rt(o, r, e) {
220
- w.addTrend({
221
- nodeId: o,
222
- targetX: r,
223
- targetY: e
224
- });
225
- }
226
- g(rt, "addTrend");
227
- function ot(o, r, e) {
228
- w.addAnnotation({
229
- number: o,
230
- coordinates: r,
231
- text: e
232
- });
233
- }
234
- g(ot, "addAnnotation");
235
- function nt(o, r, e) {
236
- w.addNote({
237
- text: o,
238
- x: r,
239
- y: e
240
- });
241
- }
242
- g(nt, "addNote");
243
- function it(o, r, e) {
244
- w.addAccelerator({
245
- name: o,
246
- x: r,
247
- y: e
248
- });
249
- }
250
- g(it, "addAccelerator");
251
- function lt(o, r, e) {
252
- w.addDeaccelerator({
253
- name: o,
254
- x: r,
255
- y: e
256
- });
257
- }
258
- g(lt, "addDeaccelerator");
259
- function st(o, r) {
260
- w.setAnnotationsBox(o, r);
261
- }
262
- g(st, "setAnnotationsBox");
263
- function dt(o, r) {
264
- w.setSize(o, r);
265
- }
266
- g(dt, "setSize");
267
- function ct(o) {
268
- w.startPipeline(o);
269
- }
270
- g(ct, "startPipeline");
271
- function pt(o, r) {
272
- w.addPipelineComponent(o, r);
273
- }
274
- g(pt, "addPipelineComponent");
275
- function xt(o) {
276
- w.setAxes(o);
277
- }
278
- g(xt, "updateAxes");
279
- function ht(o) {
280
- return w.getNode(o);
281
- }
282
- g(ht, "getNode");
283
- function yt(o) {
284
- return w.resolveNodeId(o);
285
- }
286
- g(yt, "resolveNodeId");
287
- function ft() {
288
- return w.build();
289
- }
290
- g(ft, "getWardleyData");
291
- function gt() {
292
- w.clear(), Et();
293
- }
294
- g(gt, "clear");
295
- var Ot = {
296
- getConfig: tt,
297
- addNode: et,
298
- addLink: at,
299
- addTrend: rt,
300
- addAnnotation: ot,
301
- addNote: nt,
302
- addAccelerator: it,
303
- addDeaccelerator: lt,
304
- setAnnotationsBox: st,
305
- setSize: dt,
306
- startPipeline: ct,
307
- addPipelineComponent: pt,
308
- updateAxes: xt,
309
- getNode: ht,
310
- resolveNodeId: yt,
311
- getWardleyData: ft,
312
- clear: gt,
313
- setAccTitle: zt,
314
- getAccTitle: Nt,
315
- setDiagramTitle: Pt,
316
- getDiagramTitle: Ct,
317
- getAccDescription: Mt,
318
- setAccDescription: St
319
- }, Yt = [
320
- "Genesis",
321
- "Custom Built",
322
- "Product",
323
- "Commodity"
324
- ], Dt = /* @__PURE__ */ g(() => {
325
- let { themeVariables: o } = G();
326
- return {
327
- backgroundColor: o.wardley?.backgroundColor ?? o.background ?? "#fff",
328
- axisColor: o.wardley?.axisColor ?? "#000",
329
- axisTextColor: o.wardley?.axisTextColor ?? o.primaryTextColor ?? "#222",
330
- gridColor: o.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
331
- componentFill: o.wardley?.componentFill ?? "#fff",
332
- componentStroke: o.wardley?.componentStroke ?? "#000",
333
- componentLabelColor: o.wardley?.componentLabelColor ?? o.primaryTextColor ?? "#222",
334
- linkStroke: o.wardley?.linkStroke ?? "#000",
335
- evolutionStroke: o.wardley?.evolutionStroke ?? "#dc3545",
336
- annotationStroke: o.wardley?.annotationStroke ?? "#000",
337
- annotationTextColor: o.wardley?.annotationTextColor ?? o.primaryTextColor ?? "#222",
338
- annotationFill: o.wardley?.annotationFill ?? o.background ?? "#fff"
339
- };
340
- }, "getTheme"), Wt = /* @__PURE__ */ g(() => {
341
- let o = G()["wardley-beta"];
342
- return {
343
- width: o?.width ?? 900,
344
- height: o?.height ?? 600,
345
- padding: o?.padding ?? 48,
346
- nodeRadius: o?.nodeRadius ?? 6,
347
- nodeLabelOffset: o?.nodeLabelOffset ?? 8,
348
- axisFontSize: o?.axisFontSize ?? 12,
349
- labelFontSize: o?.labelFontSize ?? 10,
350
- showGrid: o?.showGrid ?? !1,
351
- useMaxWidth: o?.useMaxWidth ?? !0
352
- };
353
- }, "getConfigValues"), Gt = {
354
- parser: K,
355
- db: Ot,
356
- renderer: { draw: /* @__PURE__ */ g((o, r, e, p) => {
357
- J.debug(`Rendering Wardley map
358
- ` + o);
359
- let a = Wt(), s = Dt(), u = a.nodeRadius * 1.6, S = p.db, y = S.getWardleyData(), F = S.getDiagramTitle(), M = y.size?.width ?? a.width, k = y.size?.height ?? a.height, L = At(r);
360
- L.selectAll("*").remove(), Lt(L, k, M, a.useMaxWidth), L.attr("viewBox", `0 0 ${M} ${k}`);
361
- let $ = L.append("g").attr("class", "wardley-map"), D = L.append("defs");
362
- D.append("marker").attr("id", `arrow-${r}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", s.evolutionStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-end-${r}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", s.linkStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-start-${r}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", s.linkStroke).attr("stroke", "none"), $.append("rect").attr("class", "wardley-background").attr("width", M).attr("height", k).attr("fill", s.backgroundColor);
363
- let E = M - a.padding * 2, R = k - a.padding * 2;
364
- F && $.append("text").attr("class", "wardley-title").attr("x", M / 2).attr("y", a.padding / 2).attr("fill", s.axisTextColor).attr("font-size", a.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(F);
365
- let P = /* @__PURE__ */ g((t) => a.padding + t / 100 * E, "projectX"), N = /* @__PURE__ */ g((t) => k - a.padding - t / 100 * R, "projectY"), X = $.append("g").attr("class", "wardley-axes");
366
- X.append("line").attr("x1", a.padding).attr("x2", M - a.padding).attr("y1", k - a.padding).attr("y2", k - a.padding).attr("stroke", s.axisColor).attr("stroke-width", 1), X.append("line").attr("x1", a.padding).attr("x2", a.padding).attr("y1", a.padding).attr("y2", k - a.padding).attr("stroke", s.axisColor).attr("stroke-width", 1);
367
- let ut = y.axes.xLabel ?? "Evolution", mt = y.axes.yLabel ?? "Visibility";
368
- X.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", a.padding + E / 2).attr("y", k - a.padding / 4).attr("fill", s.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(ut), X.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", a.padding / 3).attr("y", a.padding + R / 2).attr("fill", s.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${a.padding / 3} ${a.padding + R / 2})`).text(mt);
369
- let B = y.axes.stages && y.axes.stages.length > 0 ? y.axes.stages : Yt;
370
- if (B.length > 0) {
371
- let t = $.append("g").attr("class", "wardley-stages"), i = y.axes.stageBoundaries, n = [];
372
- if (i && i.length === B.length) {
373
- let l = 0;
374
- i.forEach((c) => {
375
- n.push({
376
- start: l,
377
- end: c
378
- }), l = c;
379
- });
380
- } else {
381
- let l = 1 / B.length;
382
- B.forEach((c, x) => {
383
- n.push({
384
- start: x * l,
385
- end: (x + 1) * l
386
- });
387
- });
388
- }
389
- B.forEach((l, c) => {
390
- let x = n[c], f = a.padding + x.start * E, h = (f + (a.padding + x.end * E)) / 2;
391
- c > 0 && t.append("line").attr("x1", f).attr("x2", f).attr("y1", a.padding).attr("y2", k - a.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", 0.8), t.append("text").attr("class", "wardley-stage-label").attr("x", h).attr("y", k - a.padding / 1.5).attr("fill", s.axisTextColor).attr("font-size", a.axisFontSize - 2).attr("text-anchor", "middle").text(l);
392
- });
393
- }
394
- if (a.showGrid) {
395
- let t = $.append("g").attr("class", "wardley-grid");
396
- for (let i = 1; i < 4; i++) {
397
- let n = i / 4, l = a.padding + E * n;
398
- t.append("line").attr("x1", l).attr("x2", l).attr("y1", a.padding).attr("y2", k - a.padding).attr("stroke", s.gridColor).attr("stroke-dasharray", "2 6"), t.append("line").attr("x1", a.padding).attr("x2", M - a.padding).attr("y1", k - a.padding - R * n).attr("y2", k - a.padding - R * n).attr("stroke", s.gridColor).attr("stroke-dasharray", "2 6");
399
- }
400
- }
401
- let d = /* @__PURE__ */ new Map();
402
- if (y.nodes.forEach((t) => {
403
- d.set(t.id, {
404
- x: P(t.x),
405
- y: N(t.y),
406
- node: t
407
- });
408
- }), y.pipelines.length > 0) {
409
- let t = $.append("g").attr("class", "wardley-pipelines"), i = $.append("g").attr("class", "wardley-pipeline-links");
410
- y.pipelines.forEach((n) => {
411
- if (n.componentIds.length === 0) return;
412
- let l = n.componentIds.map((h) => ({
413
- id: h,
414
- pos: d.get(h),
415
- node: y.nodes.find((m) => m.id === h)
416
- })).filter((h) => h.pos && h.node).sort((h, m) => h.node.x - m.node.x);
417
- for (let h = 0; h < l.length - 1; h++) {
418
- let m = l[h], v = l[h + 1];
419
- i.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", m.pos.x).attr("y1", m.pos.y).attr("x2", v.pos.x).attr("y2", v.pos.y).attr("stroke", s.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
420
- }
421
- let c = 1 / 0, x = -1 / 0, f = 0;
422
- if (n.componentIds.forEach((h) => {
423
- let m = d.get(h);
424
- m && (c = Math.min(c, m.x), x = Math.max(x, m.x), f = m.y);
425
- }), c !== 1 / 0 && x !== -1 / 0) {
426
- let h = a.nodeRadius * 4, m = f - h / 2, v = d.get(n.nodeId);
427
- v && (v.x = (c + x) / 2, v.y = m - u / 6), t.append("rect").attr("class", "wardley-pipeline-box").attr("x", c - 15).attr("y", m).attr("width", x - c + 30).attr("height", h).attr("fill", "none").attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
428
- }
429
- });
430
- }
431
- let H = $.append("g").attr("class", "wardley-links"), _ = /* @__PURE__ */ new Map();
432
- y.pipelines.forEach((t) => {
433
- _.set(t.nodeId, new Set(t.componentIds));
434
- });
435
- let Z = y.links.filter((t) => !(!d.has(t.source) || !d.has(t.target) || _.get(t.target)?.has(t.source)));
436
- H.selectAll("line").data(Z).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
437
- let i = d.get(t.source), n = d.get(t.target), l = y.nodes.find((h) => h.id === t.source).isPipelineParent ? u / Math.sqrt(2) : a.nodeRadius, c = n.x - i.x, x = n.y - i.y, f = Math.sqrt(c * c + x * x);
438
- return i.x + c / f * l;
439
- }).attr("y1", (t) => {
440
- let i = d.get(t.source), n = d.get(t.target), l = y.nodes.find((h) => h.id === t.source).isPipelineParent ? u / Math.sqrt(2) : a.nodeRadius, c = n.x - i.x, x = n.y - i.y, f = Math.sqrt(c * c + x * x);
441
- return i.y + x / f * l;
442
- }).attr("x2", (t) => {
443
- let i = d.get(t.source), n = d.get(t.target), l = y.nodes.find((h) => h.id === t.target).isPipelineParent ? u / Math.sqrt(2) : a.nodeRadius, c = i.x - n.x, x = i.y - n.y, f = Math.sqrt(c * c + x * x);
444
- return n.x + c / f * l;
445
- }).attr("y2", (t) => {
446
- let i = d.get(t.source), n = d.get(t.target), l = y.nodes.find((h) => h.id === t.target).isPipelineParent ? u / Math.sqrt(2) : a.nodeRadius, c = i.x - n.x, x = i.y - n.y, f = Math.sqrt(c * c + x * x);
447
- return n.y + x / f * l;
448
- }).attr("stroke", s.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (t) => t.dashed ? "6 6" : null).attr("marker-end", (t) => t.flow === "forward" || t.flow === "bidirectional" ? `url(#link-arrow-end-${r})` : null).attr("marker-start", (t) => t.flow === "backward" || t.flow === "bidirectional" ? `url(#link-arrow-start-${r})` : null), H.selectAll("text").data(Z.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
449
- let i = d.get(t.source), n = d.get(t.target), l = (i.x + n.x) / 2, c = n.y - i.y, x = n.x - i.x;
450
- return l + c / Math.sqrt(x * x + c * c) * 8;
451
- }).attr("y", (t) => {
452
- let i = d.get(t.source), n = d.get(t.target), l = (i.y + n.y) / 2, c = n.x - i.x, x = n.y - i.y, f = Math.sqrt(c * c + x * x);
453
- return l + -c / f * 8;
454
- }).attr("fill", s.axisTextColor).attr("font-size", a.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
455
- let i = d.get(t.source), n = d.get(t.target), l = (i.x + n.x) / 2, c = (i.y + n.y) / 2, x = n.x - i.x, f = n.y - i.y, h = Math.sqrt(x * x + f * f), m = f / h, v = -x / h, j = l + m * 8, q = c + v * 8, I = Math.atan2(f, x) * 180 / Math.PI;
456
- return (I > 90 || I < -90) && (I += 180), `rotate(${I} ${j} ${q})`;
457
- }).text((t) => t.label);
458
- let wt = $.append("g").attr("class", "wardley-trends"), kt = y.trends.map((t) => {
459
- let i = d.get(t.nodeId);
460
- if (!i) return null;
461
- let n = P(t.targetX), l = N(t.targetY), c = n - i.x, x = l - i.y, f = Math.sqrt(c * c + x * x), h = a.nodeRadius + 2;
462
- return {
463
- origin: i,
464
- targetX: n,
465
- targetY: l,
466
- adjustedX2: f > h ? n - c / f * h : n,
467
- adjustedY2: f > h ? l - x / f * h : l
468
- };
469
- }).filter((t) => t !== null);
470
- wt.selectAll("line").data(kt).enter().append("line").attr("class", "wardley-trend").attr("x1", (t) => t.origin.x).attr("y1", (t) => t.origin.y).attr("x2", (t) => t.adjustedX2).attr("y2", (t) => t.adjustedY2).attr("stroke", s.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${r})`);
471
- let C = $.append("g").attr("class", "wardley-nodes").selectAll("g").data(y.nodes).enter().append("g").attr("class", (t) => ["wardley-node", t.className ? `wardley-node--${t.className}` : ""].filter(Boolean).join(" "));
472
- C.filter((t) => t.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#666").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
473
- let z = C.filter((t) => t.sourceStrategy === "market");
474
- z.append("circle").attr("class", "wardley-market-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => !t.isPipelineParent && t.sourceStrategy !== "market" && t.className !== "anchor").append("circle").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", a.nodeRadius).attr("fill", s.componentFill).attr("stroke", s.componentStroke).attr("stroke-width", 1);
475
- let W = a.nodeRadius * 0.7, b = a.nodeRadius * 1.2;
476
- if (z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x).attr("y1", (t) => d.get(t.id).y - b).attr("x2", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("y2", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("y1", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("x2", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("y2", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("y1", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("x2", (t) => d.get(t.id).x).attr("y2", (t) => d.get(t.id).y - b).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y - b).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("cy", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("cy", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), C.filter((t) => t.isPipelineParent === !0).append("rect").attr("x", (t) => d.get(t.id).x - u / 2).attr("y", (t) => d.get(t.id).y - u / 2).attr("width", u).attr("height", u).attr("fill", s.componentFill).attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (t) => {
477
- let i = d.get(t.id), n = t.isPipelineParent ? u / 2 + 15 : a.nodeRadius + 15;
478
- return t.sourceStrategy && (n += a.nodeRadius + 10), i.x + n;
479
- }).attr("y1", (t) => {
480
- let i = d.get(t.id), n = t.isPipelineParent ? u : a.nodeRadius * 2;
481
- return i.y - n / 2;
482
- }).attr("x2", (t) => {
483
- let i = d.get(t.id), n = t.isPipelineParent ? u / 2 + 15 : a.nodeRadius + 15;
484
- return t.sourceStrategy && (n += a.nodeRadius + 10), i.x + n;
485
- }).attr("y2", (t) => {
486
- let i = d.get(t.id), n = t.isPipelineParent ? u : a.nodeRadius * 2;
487
- return i.y + n / 2;
488
- }).attr("stroke", s.componentStroke).attr("stroke-width", 6), C.append("text").attr("x", (t) => {
489
- let i = d.get(t.id);
490
- if (t.className === "anchor") return t.labelOffsetX === void 0 ? i.x : i.x + t.labelOffsetX;
491
- let n = a.nodeLabelOffset;
492
- t.sourceStrategy && t.labelOffsetX === void 0 && (n += 10);
493
- let l = t.labelOffsetX ?? n;
494
- return i.x + l;
495
- }).attr("y", (t) => {
496
- let i = d.get(t.id);
497
- if (t.className === "anchor") return t.labelOffsetY === void 0 ? i.y - 3 : i.y + t.labelOffsetY;
498
- let n = -a.nodeLabelOffset;
499
- t.sourceStrategy && t.labelOffsetY === void 0 && (n -= 10);
500
- let l = t.labelOffsetY ?? n;
501
- return i.y + l;
502
- }).attr("class", "wardley-node-label").attr("fill", (t) => t.className === "evolved" ? s.evolutionStroke : t.className === "anchor" ? "#000" : s.componentLabelColor).attr("font-size", a.labelFontSize).attr("font-weight", (t) => t.className === "anchor" ? "bold" : "normal").attr("text-anchor", (t) => t.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (t) => t.className === "anchor" ? "middle" : "auto").text((t) => t.label), y.annotations.length > 0) {
503
- let t = $.append("g").attr("class", "wardley-annotations");
504
- if (y.annotations.forEach((i) => {
505
- let n = i.coordinates.map((l) => ({
506
- x: P(l.x),
507
- y: N(l.y)
508
- }));
509
- if (n.length > 1) for (let l = 0; l < n.length - 1; l++) t.append("line").attr("class", "wardley-annotation-line").attr("x1", n[l].x).attr("y1", n[l].y).attr("x2", n[l + 1].x).attr("y2", n[l + 1].y).attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
510
- n.forEach((l) => {
511
- let c = t.append("g").attr("class", "wardley-annotation");
512
- c.append("circle").attr("cx", l.x).attr("cy", l.y).attr("r", 10).attr("fill", "white").attr("stroke", s.axisColor).attr("stroke-width", 1.5), c.append("text").attr("x", l.x).attr("y", l.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.number);
513
- });
514
- }), y.annotationsBox) {
515
- let i = P(y.annotationsBox.x), n = N(y.annotationsBox.y), l = t.append("g").attr("class", "wardley-annotations-box"), c = [...y.annotations].filter((f) => f.text).sort((f, h) => f.number - h.number), x = [];
516
- if (c.forEach((f, h) => {
517
- let m = l.append("text").attr("x", i + 10).attr("y", n + 10 + (h + 1) * 16).attr("font-size", 11).attr("fill", s.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${f.number}. ${f.text}`);
518
- x.push(m);
519
- }), x.length > 0) {
520
- let f = 0, h = 0;
521
- x.forEach((V) => {
522
- let O = V.node(), $t = O.getComputedTextLength();
523
- f = Math.max(f, $t);
524
- let vt = O.getBBox();
525
- h = Math.max(h, vt.height);
526
- });
527
- let m = f + 20 + 105, v = c.length * 16 + 20 + h / 2, j = a.padding, q = M - a.padding - m, I = a.padding, bt = k - a.padding - v;
528
- i = Math.max(j, Math.min(i, q)), n = Math.max(I, Math.min(n, bt)), x.forEach((V, O) => {
529
- V.attr("x", i + 10).attr("y", n + 10 + (O + 1) * 16);
530
- }), l.insert("rect", "text").attr("x", i).attr("y", n).attr("width", m).attr("height", v).attr("fill", "white").attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
531
- }
532
- }
533
- }
534
- if (y.notes.length > 0) {
535
- let t = $.append("g").attr("class", "wardley-notes");
536
- y.notes.forEach((i) => {
537
- let n = P(i.x), l = N(i.y);
538
- t.append("text").attr("x", n).attr("y", l).attr("text-anchor", "start").attr("font-size", 11).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.text);
539
- });
540
- }
541
- if (y.accelerators.length > 0) {
542
- let t = $.append("g").attr("class", "wardley-accelerators");
543
- y.accelerators.forEach((i) => {
544
- let n = P(i.x), l = N(i.y), c = `
545
- M ${n} ${l - 15}
546
- L ${n + 60 - 20} ${l - 15}
547
- L ${n + 60 - 20} ${l - 15 - 8}
548
- L ${n + 60} ${l}
549
- L ${n + 60 - 20} ${l + 15 + 8}
550
- L ${n + 60 - 20} ${l + 15}
551
- L ${n} ${l + 15}
552
- Z
553
- `;
554
- t.append("path").attr("d", c).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", n + 30).attr("y", l + 15 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.name);
555
- });
556
- }
557
- if (y.deaccelerators.length > 0) {
558
- let t = $.append("g").attr("class", "wardley-deaccelerators");
559
- y.deaccelerators.forEach((i) => {
560
- let n = P(i.x), l = N(i.y), c = `
561
- M ${n + 60} ${l - 15}
562
- L ${n + 20} ${l - 15}
563
- L ${n + 20} ${l - 15 - 8}
564
- L ${n} ${l}
565
- L ${n + 20} ${l + 15 + 8}
566
- L ${n + 20} ${l + 15}
567
- L ${n + 60} ${l + 15}
568
- Z
569
- `;
570
- t.append("path").attr("d", c).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", n + 30).attr("y", l + 15 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.name);
571
- });
572
- }
573
- }, "draw") },
574
- styles: /* @__PURE__ */ g(({ wardley: o } = {}) => {
575
- let r = Tt(), e = It(), p = Q(r, e.themeVariables), a = Q(p.wardley, o);
576
- return `
577
- .wardley-background {
578
- fill: ${a.backgroundColor};
579
- }
580
- .wardley-axes line, .wardley-axes path {
581
- stroke: ${a.axisColor};
582
- }
583
- .wardley-axis-label {
584
- fill: ${a.axisTextColor};
585
- }
586
- .wardley-stage-label {
587
- fill: ${a.axisTextColor};
588
- }
589
- .wardley-grid line {
590
- stroke: ${a.gridColor};
591
- }
592
- .wardley-node circle {
593
- fill: ${a.componentFill};
594
- stroke: ${a.componentStroke};
595
- }
596
- .wardley-node-label {
597
- fill: ${a.componentLabelColor};
598
- }
599
- .wardley-link {
600
- stroke: ${a.linkStroke};
601
- }
602
- .wardley-link--dashed {
603
- stroke-dasharray: 4 4;
604
- }
605
- .wardley-link-label {
606
- fill: ${a.axisTextColor};
607
- }
608
- .wardley-trend line {
609
- stroke: ${a.evolutionStroke};
610
- }
611
- .wardley-annotation-line {
612
- stroke: ${a.annotationStroke};
613
- }
614
- .wardley-annotation circle {
615
- fill: ${a.annotationFill};
616
- stroke: ${a.annotationStroke};
617
- }
618
- .wardley-annotation text {
619
- fill: ${a.annotationTextColor};
620
- }
621
- .wardley-annotations-box rect {
622
- fill: ${a.annotationFill};
623
- stroke: ${a.annotationStroke};
624
- }
625
- .wardley-annotations-box text {
626
- fill: ${a.annotationTextColor};
627
- }
628
- .wardley-pipeline-box {
629
- stroke: ${a.componentStroke};
630
- }
631
- .wardley-notes text {
632
- fill: ${a.axisTextColor};
633
- }
634
- `;
635
- }, "styles")
636
- };
637
- export {
638
- Gt as diagram
639
- };