hexagon-editor 0.1.4 → 0.1.6

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 (118) hide show
  1. package/README.md +24 -11
  2. package/dist/MarkdownEditor.vue.d.ts +28 -26
  3. package/dist/MarkdownEditor.vue.d.ts.map +1 -1
  4. package/dist/{MarkdownEditorLinkForm-C7CGgA83.js → MarkdownEditorLinkForm-B9dEX3WT.js} +1 -1
  5. package/dist/{base-Bnv2-Te4.js → base-BPdMUtQo.js} +141 -137
  6. package/dist/components/MarkdownEditorToolbar.vue.d.ts +4 -3
  7. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
  8. package/dist/configure.d.ts +0 -2
  9. package/dist/configure.d.ts.map +1 -1
  10. package/dist/configure.js +11 -12
  11. package/dist/core/basic-editor-markdown.d.ts.map +1 -1
  12. package/dist/core/basic-editor-renderers.d.ts +6 -4
  13. package/dist/core/basic-editor-renderers.d.ts.map +1 -1
  14. package/dist/core/basic-editor-types.d.ts +2 -0
  15. package/dist/core/basic-editor-types.d.ts.map +1 -1
  16. package/dist/core/basic-editor.d.ts +1 -1
  17. package/dist/core/basic-editor.d.ts.map +1 -1
  18. package/dist/core/index.d.ts +0 -2
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core/markup-editor.d.ts.map +1 -1
  21. package/dist/core.js +28 -31
  22. package/dist/extensions.js +1 -1
  23. package/dist/forms/MarkdownEditorImageForm.vue.d.ts +2 -2
  24. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
  25. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +2 -2
  26. package/dist/forms/MarkdownEditorTextInput.vue.d.ts +2 -2
  27. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
  28. package/dist/forms.js +1 -1
  29. package/dist/{full-C-o2lPBX.js → full-Da8esvj2.js} +1 -1
  30. package/dist/{full-specs-Cl-ODShc.js → full-specs-hXKoMF-0.js} +1 -1
  31. package/dist/index-D_CMntQU.js +3173 -0
  32. package/dist/index.css +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +3611 -1284
  36. package/dist/{markup-commands-BckOOKIe.js → markup-commands-BYsx8ADT.js} +1993 -1963
  37. package/dist/presets.js +2 -2
  38. package/dist/public-types.d.ts +22 -0
  39. package/dist/public-types.d.ts.map +1 -1
  40. package/dist/renderer/MarkdownRenderer.vue.d.ts +2 -0
  41. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
  42. package/dist/renderer/markdown.d.ts +2 -1
  43. package/dist/renderer/markdown.d.ts.map +1 -1
  44. package/dist/renderer.css +1 -1
  45. package/dist/renderer.js +142 -146
  46. package/package.json +106 -108
  47. package/dist/MarkdownEditorLinkForm.css +0 -1
  48. package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +0 -87
  49. package/dist/arc-y6UeoJpJ.js +0 -83
  50. package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +0 -4778
  51. package/dist/base.css +0 -1
  52. package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +0 -2419
  53. package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +0 -1577
  54. package/dist/channel-BwXGcavV.js +0 -5
  55. package/dist/chunk-2GRJ4B5K-O75udjPr.js +0 -68
  56. package/dist/chunk-2Q5K7J3B-CySL0lOA.js +0 -15
  57. package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +0 -1408
  58. package/dist/chunk-5VM5RSS4--it1VJIv.js +0 -19
  59. package/dist/chunk-6Q2QTUOP-DNiML-50.js +0 -664
  60. package/dist/chunk-GF5L2VYU-z7A-k0-V.js +0 -1533
  61. package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +0 -8
  62. package/dist/chunk-KBJHAD2P-D4R1VW0r.js +0 -19
  63. package/dist/chunk-RYQCIY6F-DmJAYxq8.js +0 -313
  64. package/dist/chunk-XXDRQBXY-CK913N-t.js +0 -8
  65. package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +0 -16
  66. package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +0 -16
  67. package/dist/core/optional-renderers.d.ts +0 -9
  68. package/dist/core/optional-renderers.d.ts.map +0 -1
  69. package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +0 -2608
  70. package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +0 -23766
  71. package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +0 -299
  72. package/dist/cytoscape.esm-3W4EOjxC.js +0 -18756
  73. package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +0 -340
  74. package/dist/defaultLocale-BgPVtth8.js +0 -171
  75. package/dist/diagram-7IWD3JNH-BrApu1hz.js +0 -350
  76. package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +0 -461
  77. package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +0 -142
  78. package/dist/diagram-Q27KOJAE-DWIltqIH.js +0 -528
  79. package/dist/diagram-UB23O5K3-B7z2Lj3K.js +0 -219
  80. package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +0 -109
  81. package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +0 -910
  82. package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +0 -1638
  83. package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +0 -2711
  84. package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +0 -815
  85. package/dist/graph-DAHC4kPm.js +0 -1545
  86. package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +0 -24
  87. package/dist/init-DjUOC4st.js +0 -16
  88. package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +0 -621
  89. package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +0 -834
  90. package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +0 -724
  91. package/dist/katex-ByXcxnHy.js +0 -14436
  92. package/dist/katex-DoRnZ_sp.js +0 -11682
  93. package/dist/layout-DBbo_M5I.js +0 -1519
  94. package/dist/linear-BEdRfKba.js +0 -259
  95. package/dist/map-DRdzG8Ho.js +0 -224
  96. package/dist/markup-commands.css +0 -1
  97. package/dist/mermaid.core-CR0bA2Wa.js +0 -16496
  98. package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +0 -827
  99. package/dist/optional-renderers-BalvqqvY.js +0 -11
  100. package/dist/ordinal-B6-f3MAq.js +0 -61
  101. package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +0 -95
  102. package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +0 -207
  103. package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +0 -1023
  104. package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +0 -77
  105. package/dist/renderer/mermaid-runtime.d.ts +0 -4
  106. package/dist/renderer/mermaid-runtime.d.ts.map +0 -1
  107. package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +0 -882
  108. package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +0 -847
  109. package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +0 -2888
  110. package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +0 -46
  111. package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +0 -263
  112. package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +0 -16
  113. package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +0 -5332
  114. package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +0 -13
  115. package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +0 -1055
  116. package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +0 -1578
  117. package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +0 -675
  118. package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +0 -1388
@@ -1,675 +0,0 @@
1
- import { p as Mt } from "./chunk-JWPE2WC7-DAjx3Kjr.js";
2
- import { s as Nt, g as zt, o as Lt, n as Tt, a as At, b as Xt, _ as u, E as Et, y as Yt, A as J, l as Q, D as It, e as Bt, p as Ft, c as V } from "./mermaid.core-CR0bA2Wa.js";
3
- import { p as Rt } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
4
- var G = /* @__PURE__ */ u((o, r) => {
5
- const e = o <= 1 ? o * 100 : o;
6
- if (e < 0 || e > 100)
7
- throw new Error(
8
- `${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${o}`
9
- );
10
- return e;
11
- }, "toPercent"), A = /* @__PURE__ */ u((o, r, e) => ({
12
- x: G(r, `${e} evolution`),
13
- y: G(o, `${e} visibility`)
14
- }), "toCoordinates"), K = /* @__PURE__ */ u((o) => {
15
- if (o) {
16
- if (o === "+<>")
17
- return "bidirectional";
18
- if (o === "+<")
19
- return "backward";
20
- if (o === "+>")
21
- return "forward";
22
- }
23
- }, "getFlowFromPort"), Ot = /* @__PURE__ */ u((o) => {
24
- if (!o?.startsWith("+"))
25
- return {};
26
- const e = /^\+'([^']*)'/.exec(o)?.[1];
27
- return o.includes("<>") ? { flow: "bidirectional", label: e } : o.includes("<") ? { flow: "backward", label: e } : o.includes(">") ? { flow: "forward", label: e } : { label: e };
28
- }, "extractFlowFromArrow"), Wt = /* @__PURE__ */ u((o, r) => {
29
- if (Mt(o, r), o.size && r.setSize(o.size.width, o.size.height), o.evolution) {
30
- const e = o.evolution.stages.map((a) => a.secondName ? `${a.name.trim()} / ${a.secondName.trim()}` : a.name.trim()), h = o.evolution.stages.filter((a) => a.boundary !== void 0).map((a) => a.boundary);
31
- r.updateAxes({ stages: e, stageBoundaries: h });
32
- }
33
- if (o.anchors.forEach((e) => {
34
- const h = A(e.visibility, e.evolution, `Anchor "${e.name}"`);
35
- r.addNode(e.name, e.name, h.x, h.y, "anchor");
36
- }), o.components.forEach((e) => {
37
- const h = A(
38
- e.visibility,
39
- e.evolution,
40
- `Component "${e.name}"`
41
- ), a = e.label ? (e.label.negX ? -1 : 1) * e.label.offsetX : void 0, d = e.label ? (e.label.negY ? -1 : 1) * e.label.offsetY : void 0, w = e.decorator?.strategy;
42
- r.addNode(
43
- e.name,
44
- e.name,
45
- h.x,
46
- h.y,
47
- "component",
48
- a,
49
- d,
50
- e.inertia,
51
- w
52
- );
53
- }), o.notes.forEach((e) => {
54
- const h = A(e.visibility, e.evolution, `Note "${e.text}"`);
55
- r.addNote(e.text, h.x, h.y);
56
- }), o.pipelines.forEach((e) => {
57
- const h = r.getNode(e.parent);
58
- if (!h || typeof h.y != "number")
59
- throw new Error(
60
- `Pipeline "${e.parent}" must reference an existing component with coordinates.`
61
- );
62
- const a = h.y;
63
- r.startPipeline(e.parent), e.components.forEach((d) => {
64
- const w = `${e.parent}_${d.name}`, C = d.label ? (d.label.negX ? -1 : 1) * d.label.offsetX : void 0, g = d.label ? (d.label.negY ? -1 : 1) * d.label.offsetY : void 0, R = G(d.evolution, `Pipeline component "${d.name}" evolution`);
65
- r.addNode(
66
- w,
67
- d.name,
68
- R,
69
- a,
70
- "pipeline-component",
71
- C,
72
- g
73
- ), r.addPipelineComponent(e.parent, w);
74
- });
75
- }), o.links.forEach((e) => {
76
- const h = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-."));
77
- let a = K(e.fromPort) ?? K(e.toPort);
78
- const { flow: d, label: w } = Ot(e.arrow);
79
- !a && d && (a = d);
80
- const C = e.linkLabel, g = w ?? C;
81
- r.addLink(r.resolveNodeId(e.from), r.resolveNodeId(e.to), h, g, a);
82
- }), o.evolves.forEach((e) => {
83
- const h = r.getNode(e.component);
84
- if (h?.y !== void 0) {
85
- const a = G(e.target, `Evolve target for "${e.component}"`);
86
- r.addTrend(e.component, a, h.y);
87
- }
88
- }), o.annotations.length > 0) {
89
- const e = o.annotations[0], h = A(e.x, e.y, "Annotations box");
90
- r.setAnnotationsBox(h.x, h.y);
91
- }
92
- o.annotation.forEach((e) => {
93
- const h = A(e.x, e.y, `Annotation ${e.number}`);
94
- r.addAnnotation(e.number, [{ x: h.x, y: h.y }], e.text);
95
- }), o.accelerators.forEach((e) => {
96
- const h = A(e.x, e.y, `Accelerator "${e.name}"`);
97
- r.addAccelerator(e.name, h.x, h.y);
98
- }), o.deaccelerators.forEach((e) => {
99
- const h = A(
100
- e.x,
101
- e.y,
102
- `Deaccelerator "${e.name}"`
103
- );
104
- r.addDeaccelerator(e.name, h.x, h.y);
105
- });
106
- }, "populateDb"), tt = {
107
- parser: {
108
- // @ts-expect-error - WardleyDB is not assignable to DiagramDB
109
- yy: void 0
110
- },
111
- parse: /* @__PURE__ */ u(async (o) => {
112
- const r = await Rt("wardley", o);
113
- Q.debug(r);
114
- const e = tt.parser?.yy;
115
- if (!e || typeof e.addNode != "function")
116
- throw new Error(
117
- "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."
118
- );
119
- Wt(r, e);
120
- }, "parse")
121
- }, E, Dt = (E = class {
122
- constructor() {
123
- 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 = {};
124
- }
125
- addNode(r) {
126
- const e = this.nodes.get(r.id) ?? { id: r.id, label: r.label }, h = {
127
- ...e,
128
- ...r,
129
- className: r.className ?? e.className,
130
- labelOffsetX: r.labelOffsetX ?? e.labelOffsetX,
131
- labelOffsetY: r.labelOffsetY ?? e.labelOffsetY
132
- };
133
- this.nodes.set(r.id, h);
134
- }
135
- addLink(r) {
136
- this.links.push(r);
137
- }
138
- addTrend(r) {
139
- this.trends.set(r.nodeId, r);
140
- }
141
- startPipeline(r) {
142
- this.pipelines.set(r, { nodeId: r, componentIds: [] });
143
- const e = this.nodes.get(r);
144
- e && (e.isPipelineParent = !0);
145
- }
146
- addPipelineComponent(r, e) {
147
- const h = this.pipelines.get(r);
148
- h && h.componentIds.push(e);
149
- const a = this.nodes.get(e);
150
- a && (a.inPipeline = !0);
151
- }
152
- addAnnotation(r) {
153
- this.annotations.push(r);
154
- }
155
- addNote(r) {
156
- this.notes.push(r);
157
- }
158
- addAccelerator(r) {
159
- this.accelerators.push(r);
160
- }
161
- addDeaccelerator(r) {
162
- this.deaccelerators.push(r);
163
- }
164
- setAnnotationsBox(r, e) {
165
- this.annotationsBox = { x: r, y: e };
166
- }
167
- setAxes(r) {
168
- this.axes = {
169
- ...this.axes,
170
- ...r
171
- };
172
- }
173
- setSize(r, e) {
174
- this.size = { width: r, height: e };
175
- }
176
- getNode(r) {
177
- return this.nodes.get(r);
178
- }
179
- /**
180
- * Resolve a name to a node ID. Tries exact ID match first,
181
- * then falls back to finding a node whose label matches the name
182
- * (handles pipeline components which have synthetic IDs like "Parent_Child").
183
- */
184
- resolveNodeId(r) {
185
- if (this.nodes.has(r))
186
- return r;
187
- for (const [e, h] of this.nodes)
188
- if (h.label === r)
189
- return e;
190
- return r;
191
- }
192
- build() {
193
- const r = [];
194
- for (const e of this.nodes.values()) {
195
- if (typeof e.x != "number" || typeof e.y != "number")
196
- throw new Error(`Node "${e.label}" is missing coordinates`);
197
- r.push(e);
198
- }
199
- return {
200
- nodes: r,
201
- links: [...this.links],
202
- trends: [...this.trends.values()],
203
- pipelines: [...this.pipelines.values()],
204
- annotations: [...this.annotations],
205
- notes: [...this.notes],
206
- accelerators: [...this.accelerators],
207
- deaccelerators: [...this.deaccelerators],
208
- annotationsBox: this.annotationsBox,
209
- axes: { ...this.axes },
210
- size: this.size
211
- };
212
- }
213
- clear() {
214
- 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;
215
- }
216
- }, u(E, "WardleyBuilder"), E), k = new Dt();
217
- function et() {
218
- return V()["wardley-beta"];
219
- }
220
- u(et, "getConfig");
221
- function at(o, r, e, h, a, d, w, C, g) {
222
- k.addNode({
223
- id: o,
224
- label: r,
225
- x: e,
226
- y: h,
227
- className: a,
228
- labelOffsetX: d,
229
- labelOffsetY: w,
230
- inertia: C,
231
- sourceStrategy: g
232
- });
233
- }
234
- u(at, "addNode");
235
- function rt(o, r, e = !1, h, a) {
236
- k.addLink({
237
- source: o,
238
- target: r,
239
- dashed: e,
240
- label: h,
241
- flow: a
242
- });
243
- }
244
- u(rt, "addLink");
245
- function ot(o, r, e) {
246
- k.addTrend({ nodeId: o, targetX: r, targetY: e });
247
- }
248
- u(ot, "addTrend");
249
- function nt(o, r, e) {
250
- k.addAnnotation({
251
- number: o,
252
- coordinates: r,
253
- text: e
254
- });
255
- }
256
- u(nt, "addAnnotation");
257
- function st(o, r, e) {
258
- k.addNote({
259
- text: o,
260
- x: r,
261
- y: e
262
- });
263
- }
264
- u(st, "addNote");
265
- function it(o, r, e) {
266
- k.addAccelerator({
267
- name: o,
268
- x: r,
269
- y: e
270
- });
271
- }
272
- u(it, "addAccelerator");
273
- function dt(o, r, e) {
274
- k.addDeaccelerator({
275
- name: o,
276
- x: r,
277
- y: e
278
- });
279
- }
280
- u(dt, "addDeaccelerator");
281
- function lt(o, r) {
282
- k.setAnnotationsBox(o, r);
283
- }
284
- u(lt, "setAnnotationsBox");
285
- function ct(o, r) {
286
- k.setSize(o, r);
287
- }
288
- u(ct, "setSize");
289
- function pt(o) {
290
- k.startPipeline(o);
291
- }
292
- u(pt, "startPipeline");
293
- function ft(o, r) {
294
- k.addPipelineComponent(o, r);
295
- }
296
- u(ft, "addPipelineComponent");
297
- function ht(o) {
298
- k.setAxes(o);
299
- }
300
- u(ht, "updateAxes");
301
- function xt(o) {
302
- return k.getNode(o);
303
- }
304
- u(xt, "getNode");
305
- function gt(o) {
306
- return k.resolveNodeId(o);
307
- }
308
- u(gt, "resolveNodeId");
309
- function yt() {
310
- return k.build();
311
- }
312
- u(yt, "getWardleyData");
313
- function ut() {
314
- k.clear(), Ft();
315
- }
316
- u(ut, "clear");
317
- var Gt = {
318
- getConfig: et,
319
- addNode: at,
320
- addLink: rt,
321
- addTrend: ot,
322
- addAnnotation: nt,
323
- addNote: st,
324
- addAccelerator: it,
325
- addDeaccelerator: dt,
326
- setAnnotationsBox: lt,
327
- setSize: ct,
328
- startPipeline: pt,
329
- addPipelineComponent: ft,
330
- updateAxes: ht,
331
- getNode: xt,
332
- resolveNodeId: gt,
333
- getWardleyData: yt,
334
- clear: ut,
335
- setAccTitle: Xt,
336
- getAccTitle: At,
337
- setDiagramTitle: Tt,
338
- getDiagramTitle: Lt,
339
- getAccDescription: zt,
340
- setAccDescription: Nt
341
- }, qt = ["Genesis", "Custom Built", "Product", "Commodity"], Ht = /* @__PURE__ */ u(() => {
342
- const { themeVariables: o } = V();
343
- return {
344
- backgroundColor: o.wardley?.backgroundColor ?? o.background ?? "#fff",
345
- axisColor: o.wardley?.axisColor ?? "#000",
346
- axisTextColor: o.wardley?.axisTextColor ?? o.primaryTextColor ?? "#222",
347
- gridColor: o.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
348
- componentFill: o.wardley?.componentFill ?? "#fff",
349
- componentStroke: o.wardley?.componentStroke ?? "#000",
350
- componentLabelColor: o.wardley?.componentLabelColor ?? o.primaryTextColor ?? "#222",
351
- linkStroke: o.wardley?.linkStroke ?? "#000",
352
- evolutionStroke: o.wardley?.evolutionStroke ?? "#dc3545",
353
- annotationStroke: o.wardley?.annotationStroke ?? "#000",
354
- annotationTextColor: o.wardley?.annotationTextColor ?? o.primaryTextColor ?? "#222",
355
- annotationFill: o.wardley?.annotationFill ?? o.background ?? "#fff"
356
- };
357
- }, "getTheme"), jt = /* @__PURE__ */ u(() => {
358
- const o = V()["wardley-beta"];
359
- return {
360
- width: o?.width ?? 900,
361
- height: o?.height ?? 600,
362
- padding: o?.padding ?? 48,
363
- nodeRadius: o?.nodeRadius ?? 6,
364
- nodeLabelOffset: o?.nodeLabelOffset ?? 8,
365
- axisFontSize: o?.axisFontSize ?? 12,
366
- labelFontSize: o?.labelFontSize ?? 10,
367
- showGrid: o?.showGrid ?? !1,
368
- useMaxWidth: o?.useMaxWidth ?? !0
369
- };
370
- }, "getConfigValues"), Vt = /* @__PURE__ */ u((o, r, e, h) => {
371
- Q.debug(`Rendering Wardley map
372
- ` + o);
373
- const a = jt(), d = Ht(), w = a.nodeRadius * 1.6, C = h.db, g = C.getWardleyData(), R = C.getDiagramTitle(), S = g.size?.width ?? a.width, b = g.size?.height ?? a.height, Y = It(r);
374
- Y.selectAll("*").remove(), Bt(Y, b, S, a.useMaxWidth), Y.attr("viewBox", `0 0 ${S} ${b}`);
375
- const v = Y.append("g").attr("class", "wardley-map"), q = Y.append("defs");
376
- q.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", d.evolutionStroke).attr("stroke", "none"), q.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", d.linkStroke).attr("stroke", "none"), q.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", d.linkStroke).attr("stroke", "none"), v.append("rect").attr("class", "wardley-background").attr("width", S).attr("height", b).attr("fill", d.backgroundColor);
377
- const I = S - a.padding * 2, B = b - a.padding * 2;
378
- R && v.append("text").attr("class", "wardley-title").attr("x", S / 2).attr("y", a.padding / 2).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(R);
379
- const z = /* @__PURE__ */ u((t) => a.padding + t / 100 * I, "projectX"), L = /* @__PURE__ */ u((t) => b - a.padding - t / 100 * B, "projectY"), O = v.append("g").attr("class", "wardley-axes");
380
- O.append("line").attr("x1", a.padding).attr("x2", S - a.padding).attr("y1", b - a.padding).attr("y2", b - a.padding).attr("stroke", d.axisColor).attr("stroke-width", 1), O.append("line").attr("x1", a.padding).attr("x2", a.padding).attr("y1", a.padding).attr("y2", b - a.padding).attr("stroke", d.axisColor).attr("stroke-width", 1);
381
- const wt = g.axes.xLabel ?? "Evolution", mt = g.axes.yLabel ?? "Visibility";
382
- O.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", a.padding + I / 2).attr("y", b - a.padding / 4).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(wt), O.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", a.padding / 3).attr("y", a.padding + B / 2).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr(
383
- "transform",
384
- `rotate(-90 ${a.padding / 3} ${a.padding + B / 2})`
385
- ).text(mt);
386
- const F = g.axes.stages && g.axes.stages.length > 0 ? g.axes.stages : qt;
387
- if (F.length > 0) {
388
- const t = v.append("g").attr("class", "wardley-stages"), s = g.axes.stageBoundaries, n = [];
389
- if (s && s.length === F.length) {
390
- let i = 0;
391
- s.forEach((p) => {
392
- n.push({ start: i, end: p }), i = p;
393
- });
394
- } else {
395
- const i = 1 / F.length;
396
- F.forEach((p, l) => {
397
- n.push({
398
- start: l * i,
399
- end: (l + 1) * i
400
- });
401
- });
402
- }
403
- F.forEach((i, p) => {
404
- const l = n[p], f = a.padding + l.start * I, x = a.padding + l.end * I, y = (f + x) / 2;
405
- p > 0 && t.append("line").attr("x1", f).attr("x2", f).attr("y1", a.padding).attr("y2", b - 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", y).attr("y", b - a.padding / 1.5).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize - 2).attr("text-anchor", "middle").text(i);
406
- });
407
- }
408
- if (a.showGrid) {
409
- const t = v.append("g").attr("class", "wardley-grid");
410
- for (let s = 1; s < 4; s++) {
411
- const n = s / 4, i = a.padding + I * n;
412
- t.append("line").attr("x1", i).attr("x2", i).attr("y1", a.padding).attr("y2", b - a.padding).attr("stroke", d.gridColor).attr("stroke-dasharray", "2 6"), t.append("line").attr("x1", a.padding).attr("x2", S - a.padding).attr("y1", b - a.padding - B * n).attr("y2", b - a.padding - B * n).attr("stroke", d.gridColor).attr("stroke-dasharray", "2 6");
413
- }
414
- }
415
- const c = /* @__PURE__ */ new Map();
416
- if (g.nodes.forEach((t) => {
417
- c.set(t.id, {
418
- x: z(t.x),
419
- y: L(t.y),
420
- node: t
421
- });
422
- }), g.pipelines.length > 0) {
423
- const t = v.append("g").attr("class", "wardley-pipelines"), s = v.append("g").attr("class", "wardley-pipeline-links");
424
- g.pipelines.forEach((n) => {
425
- if (n.componentIds.length === 0)
426
- return;
427
- const i = n.componentIds.map((x) => ({ id: x, pos: c.get(x), node: g.nodes.find((y) => y.id === x) })).filter((x) => x.pos && x.node).sort((x, y) => x.node.x - y.node.x);
428
- for (let x = 0; x < i.length - 1; x++) {
429
- const y = i[x], m = i[x + 1];
430
- s.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", y.pos.x).attr("y1", y.pos.y).attr("x2", m.pos.x).attr("y2", m.pos.y).attr("stroke", d.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
431
- }
432
- let p = 1 / 0, l = -1 / 0, f = 0;
433
- if (n.componentIds.forEach((x) => {
434
- const y = c.get(x);
435
- y && (p = Math.min(p, y.x), l = Math.max(l, y.x), f = y.y);
436
- }), p !== 1 / 0 && l !== -1 / 0) {
437
- const y = a.nodeRadius * 4, m = f - y / 2, P = c.get(n.nodeId);
438
- if (P) {
439
- const N = (p + l) / 2;
440
- P.x = N, P.y = m - w / 6;
441
- }
442
- t.append("rect").attr("class", "wardley-pipeline-box").attr("x", p - 15).attr("y", m).attr("width", l - p + 30).attr("height", y).attr("fill", "none").attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
443
- }
444
- });
445
- }
446
- const _ = v.append("g").attr("class", "wardley-links"), Z = /* @__PURE__ */ new Map();
447
- g.pipelines.forEach((t) => {
448
- Z.set(t.nodeId, new Set(t.componentIds));
449
- });
450
- const U = g.links.filter((t) => !(!c.has(t.source) || !c.has(t.target) || Z.get(t.target)?.has(t.source)));
451
- _.selectAll("line").data(U).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
452
- const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.source).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = n.x - s.x, f = n.y - s.y, x = Math.sqrt(l * l + f * f);
453
- return s.x + l / x * p;
454
- }).attr("y1", (t) => {
455
- const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.source).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = n.x - s.x, f = n.y - s.y, x = Math.sqrt(l * l + f * f);
456
- return s.y + f / x * p;
457
- }).attr("x2", (t) => {
458
- const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.target).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = s.x - n.x, f = s.y - n.y, x = Math.sqrt(l * l + f * f);
459
- return n.x + l / x * p;
460
- }).attr("y2", (t) => {
461
- const s = c.get(t.source), n = c.get(t.target), p = g.nodes.find((y) => y.id === t.target).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = s.x - n.x, f = s.y - n.y, x = Math.sqrt(l * l + f * f);
462
- return n.y + f / x * p;
463
- }).attr("stroke", d.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), _.selectAll("text").data(U.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
464
- const s = c.get(t.source), n = c.get(t.target), i = (s.x + n.x) / 2, p = n.y - s.y, l = n.x - s.x, f = Math.sqrt(l * l + p * p), x = 8, y = p / f;
465
- return i + y * x;
466
- }).attr("y", (t) => {
467
- const s = c.get(t.source), n = c.get(t.target), i = (s.y + n.y) / 2, p = n.x - s.x, l = n.y - s.y, f = Math.sqrt(p * p + l * l), x = 8, y = -p / f;
468
- return i + y * x;
469
- }).attr("fill", d.axisTextColor).attr("font-size", a.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
470
- const s = c.get(t.source), n = c.get(t.target), i = (s.x + n.x) / 2, p = (s.y + n.y) / 2, l = n.x - s.x, f = n.y - s.y, x = Math.sqrt(l * l + f * f), y = 8, m = f / x, P = -l / x, N = i + m * y, W = p + P * y;
471
- let X = Math.atan2(f, l) * 180 / Math.PI;
472
- return (X > 90 || X < -90) && (X += 180), `rotate(${X} ${N} ${W})`;
473
- }).text((t) => t.label);
474
- const kt = v.append("g").attr("class", "wardley-trends"), bt = g.trends.map((t) => {
475
- const s = c.get(t.nodeId);
476
- if (!s)
477
- return null;
478
- const n = z(t.targetX), i = L(t.targetY), p = n - s.x, l = i - s.y, f = Math.sqrt(p * p + l * l), x = a.nodeRadius + 2, y = f > x ? n - p / f * x : n, m = f > x ? i - l / f * x : i;
479
- return {
480
- origin: s,
481
- targetX: n,
482
- targetY: i,
483
- adjustedX2: y,
484
- adjustedY2: m
485
- };
486
- }).filter((t) => t !== null);
487
- kt.selectAll("line").data(bt).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", d.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${r})`);
488
- const M = v.append("g").attr("class", "wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr(
489
- "class",
490
- (t) => ["wardley-node", t.className ? `wardley-node--${t.className}` : ""].filter(Boolean).join(" ")
491
- );
492
- M.filter((t) => t.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#666").attr("stroke", d.componentStroke).attr("stroke-width", 1), M.filter((t) => t.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", d.componentStroke).attr("stroke-width", 1), M.filter((t) => t.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
493
- const T = M.filter((t) => t.sourceStrategy === "market");
494
- T.append("circle").attr("class", "wardley-market-overlay").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y).attr("r", a.nodeRadius * 2).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 1), M.filter(
495
- (t) => !t.isPipelineParent && t.sourceStrategy !== "market" && t.className !== "anchor"
496
- ).append("circle").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y).attr("r", a.nodeRadius).attr("fill", d.componentFill).attr("stroke", d.componentStroke).attr("stroke-width", 1);
497
- const H = a.nodeRadius * 0.7, $ = a.nodeRadius * 1.2;
498
- if (T.append("line").attr("class", "wardley-market-line").attr("x1", (t) => c.get(t.id).x).attr("y1", (t) => c.get(t.id).y - $).attr("x2", (t) => c.get(t.id).x - $ * Math.cos(Math.PI / 6)).attr("y2", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("stroke", d.componentStroke).attr("stroke-width", 1), T.append("line").attr("class", "wardley-market-line").attr("x1", (t) => c.get(t.id).x - $ * Math.cos(Math.PI / 6)).attr("y1", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("x2", (t) => c.get(t.id).x + $ * Math.cos(Math.PI / 6)).attr("y2", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("stroke", d.componentStroke).attr("stroke-width", 1), T.append("line").attr("class", "wardley-market-line").attr("x1", (t) => c.get(t.id).x + $ * Math.cos(Math.PI / 6)).attr("y1", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("x2", (t) => c.get(t.id).x).attr("y2", (t) => c.get(t.id).y - $).attr("stroke", d.componentStroke).attr("stroke-width", 1), T.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => c.get(t.id).x).attr("cy", (t) => c.get(t.id).y - $).attr("r", H).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 2), T.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => c.get(t.id).x - $ * Math.cos(Math.PI / 6)).attr("cy", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("r", H).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 2), T.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => c.get(t.id).x + $ * Math.cos(Math.PI / 6)).attr("cy", (t) => c.get(t.id).y + $ * Math.sin(Math.PI / 6)).attr("r", H).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 2), M.filter((t) => t.isPipelineParent === !0).append("rect").attr("x", (t) => c.get(t.id).x - w / 2).attr("y", (t) => c.get(t.id).y - w / 2).attr("width", w).attr("height", w).attr("fill", d.componentFill).attr("stroke", d.componentStroke).attr("stroke-width", 1), M.filter((t) => t.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (t) => {
499
- const s = c.get(t.id);
500
- let n = t.isPipelineParent ? w / 2 + 15 : a.nodeRadius + 15;
501
- return t.sourceStrategy && (n += a.nodeRadius + 10), s.x + n;
502
- }).attr("y1", (t) => {
503
- const s = c.get(t.id), n = t.isPipelineParent ? w : a.nodeRadius * 2;
504
- return s.y - n / 2;
505
- }).attr("x2", (t) => {
506
- const s = c.get(t.id);
507
- let n = t.isPipelineParent ? w / 2 + 15 : a.nodeRadius + 15;
508
- return t.sourceStrategy && (n += a.nodeRadius + 10), s.x + n;
509
- }).attr("y2", (t) => {
510
- const s = c.get(t.id), n = t.isPipelineParent ? w : a.nodeRadius * 2;
511
- return s.y + n / 2;
512
- }).attr("stroke", d.componentStroke).attr("stroke-width", 6), M.append("text").attr("x", (t) => {
513
- const s = c.get(t.id);
514
- if (t.className === "anchor")
515
- return t.labelOffsetX !== void 0 ? s.x + t.labelOffsetX : s.x;
516
- let n = a.nodeLabelOffset;
517
- t.sourceStrategy && t.labelOffsetX === void 0 && (n += 10);
518
- const i = t.labelOffsetX ?? n;
519
- return s.x + i;
520
- }).attr("y", (t) => {
521
- const s = c.get(t.id);
522
- if (t.className === "anchor")
523
- return t.labelOffsetY !== void 0 ? s.y + t.labelOffsetY : s.y - 3;
524
- let n = -a.nodeLabelOffset;
525
- t.sourceStrategy && t.labelOffsetY === void 0 && (n -= 10);
526
- const i = t.labelOffsetY ?? n;
527
- return s.y + i;
528
- }).attr("class", "wardley-node-label").attr("fill", (t) => t.className === "evolved" ? d.evolutionStroke : t.className === "anchor" ? "#000" : d.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), g.annotations.length > 0) {
529
- const t = v.append("g").attr("class", "wardley-annotations");
530
- if (g.annotations.forEach((s) => {
531
- const n = s.coordinates.map((i) => ({
532
- x: z(i.x),
533
- y: L(i.y)
534
- }));
535
- if (n.length > 1)
536
- for (let i = 0; i < n.length - 1; i++)
537
- t.append("line").attr("class", "wardley-annotation-line").attr("x1", n[i].x).attr("y1", n[i].y).attr("x2", n[i + 1].x).attr("y2", n[i + 1].y).attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
538
- n.forEach((i) => {
539
- const p = t.append("g").attr("class", "wardley-annotation");
540
- p.append("circle").attr("cx", i.x).attr("cy", i.y).attr("r", 10).attr("fill", "white").attr("stroke", d.axisColor).attr("stroke-width", 1.5), p.append("text").attr("x", i.x).attr("y", i.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", d.axisTextColor).attr("font-weight", "bold").text(s.number);
541
- });
542
- }), g.annotationsBox) {
543
- let s = z(g.annotationsBox.x), n = L(g.annotationsBox.y);
544
- const i = 10, p = 16, l = 11, f = t.append("g").attr("class", "wardley-annotations-box"), x = [...g.annotations].filter((m) => m.text).sort((m, P) => m.number - P.number), y = [];
545
- if (x.forEach((m, P) => {
546
- const N = f.append("text").attr("x", s + i).attr("y", n + i + (P + 1) * p).attr("font-size", l).attr("fill", d.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${m.number}. ${m.text}`);
547
- y.push(N);
548
- }), y.length > 0) {
549
- let m = 0, P = 0;
550
- y.forEach((j) => {
551
- const D = j.node(), Ct = D.getComputedTextLength();
552
- m = Math.max(m, Ct);
553
- const St = D.getBBox();
554
- P = Math.max(P, St.height);
555
- });
556
- const N = m + i * 2 + 105, W = x.length * p + i * 2 + P / 2, X = a.padding, $t = S - a.padding - N, vt = a.padding, Pt = b - a.padding - W;
557
- s = Math.max(X, Math.min(s, $t)), n = Math.max(vt, Math.min(n, Pt)), y.forEach((j, D) => {
558
- j.attr("x", s + i).attr("y", n + i + (D + 1) * p);
559
- }), f.insert("rect", "text").attr("x", s).attr("y", n).attr("width", N).attr("height", W).attr("fill", "white").attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
560
- }
561
- }
562
- }
563
- if (g.notes.length > 0) {
564
- const t = v.append("g").attr("class", "wardley-notes");
565
- g.notes.forEach((s) => {
566
- const n = z(s.x), i = L(s.y);
567
- t.append("text").attr("x", n).attr("y", i).attr("text-anchor", "start").attr("font-size", 11).attr("fill", d.axisTextColor).attr("font-weight", "bold").text(s.text);
568
- });
569
- }
570
- if (g.accelerators.length > 0) {
571
- const t = v.append("g").attr("class", "wardley-accelerators");
572
- g.accelerators.forEach((s) => {
573
- const n = z(s.x), i = L(s.y), p = 60, l = 30, f = 20, x = `
574
- M ${n} ${i - l / 2}
575
- L ${n + p - f} ${i - l / 2}
576
- L ${n + p - f} ${i - l / 2 - 8}
577
- L ${n + p} ${i}
578
- L ${n + p - f} ${i + l / 2 + 8}
579
- L ${n + p - f} ${i + l / 2}
580
- L ${n} ${i + l / 2}
581
- Z
582
- `;
583
- t.append("path").attr("d", x).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", n + p / 2).attr("y", i + l / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", d.axisTextColor).attr("font-weight", "bold").text(s.name);
584
- });
585
- }
586
- if (g.deaccelerators.length > 0) {
587
- const t = v.append("g").attr("class", "wardley-deaccelerators");
588
- g.deaccelerators.forEach((s) => {
589
- const n = z(s.x), i = L(s.y), p = 60, l = 30, f = 20, x = `
590
- M ${n + p} ${i - l / 2}
591
- L ${n + f} ${i - l / 2}
592
- L ${n + f} ${i - l / 2 - 8}
593
- L ${n} ${i}
594
- L ${n + f} ${i + l / 2 + 8}
595
- L ${n + f} ${i + l / 2}
596
- L ${n + p} ${i + l / 2}
597
- Z
598
- `;
599
- t.append("path").attr("d", x).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", n + p / 2).attr("y", i + l / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", d.axisTextColor).attr("font-weight", "bold").text(s.name);
600
- });
601
- }
602
- }, "draw"), _t = {
603
- draw: Vt
604
- }, Zt = /* @__PURE__ */ u(({
605
- wardley: o
606
- } = {}) => {
607
- const r = Et(), e = Yt(), h = J(r, e.themeVariables), a = J(h.wardley, o);
608
- return `
609
- .wardley-background {
610
- fill: ${a.backgroundColor};
611
- }
612
- .wardley-axes line, .wardley-axes path {
613
- stroke: ${a.axisColor};
614
- }
615
- .wardley-axis-label {
616
- fill: ${a.axisTextColor};
617
- }
618
- .wardley-stage-label {
619
- fill: ${a.axisTextColor};
620
- }
621
- .wardley-grid line {
622
- stroke: ${a.gridColor};
623
- }
624
- .wardley-node circle {
625
- fill: ${a.componentFill};
626
- stroke: ${a.componentStroke};
627
- }
628
- .wardley-node-label {
629
- fill: ${a.componentLabelColor};
630
- }
631
- .wardley-link {
632
- stroke: ${a.linkStroke};
633
- }
634
- .wardley-link--dashed {
635
- stroke-dasharray: 4 4;
636
- }
637
- .wardley-link-label {
638
- fill: ${a.axisTextColor};
639
- }
640
- .wardley-trend line {
641
- stroke: ${a.evolutionStroke};
642
- }
643
- .wardley-annotation-line {
644
- stroke: ${a.annotationStroke};
645
- }
646
- .wardley-annotation circle {
647
- fill: ${a.annotationFill};
648
- stroke: ${a.annotationStroke};
649
- }
650
- .wardley-annotation text {
651
- fill: ${a.annotationTextColor};
652
- }
653
- .wardley-annotations-box rect {
654
- fill: ${a.annotationFill};
655
- stroke: ${a.annotationStroke};
656
- }
657
- .wardley-annotations-box text {
658
- fill: ${a.annotationTextColor};
659
- }
660
- .wardley-pipeline-box {
661
- stroke: ${a.componentStroke};
662
- }
663
- .wardley-notes text {
664
- fill: ${a.axisTextColor};
665
- }
666
- `;
667
- }, "styles"), te = {
668
- parser: tt,
669
- db: Gt,
670
- renderer: _t,
671
- styles: Zt
672
- };
673
- export {
674
- te as diagram
675
- };