@draftably/editor 0.1.0 → 0.2.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 (97) hide show
  1. package/README.md +4 -5
  2. package/dist/assets/{engine.worker-DmHew5f6.js → engine.worker-DwN9io_m.js} +2765 -2722
  3. package/dist/element.js +1 -1
  4. package/dist/index.js +19553 -2
  5. package/dist/types/src/components/controls.d.ts +8 -5
  6. package/dist/types/src/state/canvas-commands.d.ts +169 -0
  7. package/dist/types/src/state/canvas-keyboard.d.ts +15 -0
  8. package/dist/types/src/state/links.d.ts +4 -1
  9. package/dist/types/src/state/workspace.d.ts +3 -0
  10. package/package.json +1 -1
  11. package/dist/assets/import-d2.worker-CnXfFXoa.js +0 -5395
  12. package/dist/chunks/abnfDiagram-WEYOIA3C-llcpthp5.js +0 -87
  13. package/dist/chunks/arc-rJj0TtXf.js +0 -83
  14. package/dist/chunks/architectureDiagram-ZHVYKT53-CfiXg0Lk.js +0 -4781
  15. package/dist/chunks/blockDiagram-RJAE7QA3-CO-14jWz.js +0 -1440
  16. package/dist/chunks/browser-iNhbPsGc.js +0 -40
  17. package/dist/chunks/c4Diagram-XDPPPE54-DYKuxA4n.js +0 -1524
  18. package/dist/chunks/channel-qMvPU6eH.js +0 -5
  19. package/dist/chunks/chunk-2E7WHVMD-BEZwsFS3.js +0 -670
  20. package/dist/chunks/chunk-2Q5K7J3B-gqtzQ8ux.js +0 -18
  21. package/dist/chunks/chunk-4EMNKR2T-MC54CXVe.js +0 -262
  22. package/dist/chunks/chunk-55XCU76K-DkZUAaqC.js +0 -68
  23. package/dist/chunks/chunk-5VM5RSS4-CaKe4sjM.js +0 -19
  24. package/dist/chunks/chunk-JWPE2WC7-CnAFS2xF.js +0 -8
  25. package/dist/chunks/chunk-VQ5W62QI-CXRv7FiX.js +0 -19
  26. package/dist/chunks/chunk-XXDRQBXY-B-AMQgD2.js +0 -8
  27. package/dist/chunks/chunk-ZCHMQSOR-BALpdc3g.js +0 -451
  28. package/dist/chunks/classDiagram-v2-4MYWR3UA-wPjgJTg4.js +0 -1570
  29. package/dist/chunks/cose-bilkent-JH36ORCC-Bbh5ggBc.js +0 -2608
  30. package/dist/chunks/cynefin-EF2NZ3EQ-Bt6b88hY.js +0 -22361
  31. package/dist/chunks/cynefinDiagram-WF24UDRP-BHWZvxoF.js +0 -299
  32. package/dist/chunks/cytoscape.esm-CRsF_JA3.js +0 -18791
  33. package/dist/chunks/dagre-NK4GIZVX-Cz37yPrT.js +0 -2157
  34. package/dist/chunks/defaultLocale-BgPVtth8.js +0 -171
  35. package/dist/chunks/diagram-CBK3MWTC-Q2R6FJ0B.js +0 -531
  36. package/dist/chunks/diagram-I5XIIV2D-a2Kdu_wA.js +0 -153
  37. package/dist/chunks/diagram-ODIL2UCW-DTWXxcOn.js +0 -346
  38. package/dist/chunks/diagram-PFBEJUXE-DIAQQ5KX.js +0 -480
  39. package/dist/chunks/diagram-RJA3I4VV-BPD0GghS.js +0 -219
  40. package/dist/chunks/diagram-TYUNFSNR-BmdkONfG.js +0 -2586
  41. package/dist/chunks/dot-importer-B23jwEkx.js +0 -1547
  42. package/dist/chunks/ebnfDiagram-V4P3TTPT-C5IKvYlb.js +0 -109
  43. package/dist/chunks/elk-QONTBCTQ-CtdQFvh2.js +0 -49229
  44. package/dist/chunks/erDiagram-KYQIGQAA-5wguK9Dx.js +0 -1064
  45. package/dist/chunks/flowDiagram-IUGLLWBU-BijvFPku.js +0 -1771
  46. package/dist/chunks/ganttDiagram-R7GPNTJY-BaqGPz-O.js +0 -2729
  47. package/dist/chunks/gitGraphDiagram-PDYL7XHY-DZfMGyHE.js +0 -815
  48. package/dist/chunks/graph-CKJmgLki.js +0 -1541
  49. package/dist/chunks/import-core-C-I1wGfw.js +0 -145
  50. package/dist/chunks/infoDiagram-MVDRKAX5-C2vH_59e.js +0 -24
  51. package/dist/chunks/init-DjUOC4st.js +0 -16
  52. package/dist/chunks/ishikawaDiagram-HPEHV2GE-q149MFlV.js +0 -624
  53. package/dist/chunks/journeyDiagram-BOSHW7O7-D-2Z3VtR.js +0 -834
  54. package/dist/chunks/kanban-definition-FNSA4HC5-wvAjV5ub.js +0 -724
  55. package/dist/chunks/katex-BsrBVQKd.js +0 -11314
  56. package/dist/chunks/linear-4t7D_ros.js +0 -259
  57. package/dist/chunks/mermaid-facade-BoLWBerE.js +0 -289
  58. package/dist/chunks/mermaid-importer-Cgx1IhmR.js +0 -478
  59. package/dist/chunks/mermaid.core-DXv6D2Sm.js +0 -19244
  60. package/dist/chunks/mindmap-definition-6OY57UG3-r9wTKul_.js +0 -837
  61. package/dist/chunks/mount-C1Xk_GQz.js +0 -22131
  62. package/dist/chunks/ordinal-DfAQgscy.js +0 -61
  63. package/dist/chunks/pegDiagram-ECIUJNBX-CmKlFWiP.js +0 -95
  64. package/dist/chunks/pieDiagram-GNMPY74T-DNTw_qan.js +0 -208
  65. package/dist/chunks/quadrantDiagram-D57K4MC3-CT_tvVub.js +0 -1029
  66. package/dist/chunks/railroadDiagram-Y72NRBL7-C5TUvZBe.js +0 -77
  67. package/dist/chunks/requirementDiagram-EQYSW5RA-C_c65aCa.js +0 -889
  68. package/dist/chunks/sankeyDiagram-SY24JHO5-CKcbizM1.js +0 -859
  69. package/dist/chunks/sequenceDiagram-BLEHNHQU-GpVnHOjf.js +0 -2972
  70. package/dist/chunks/sizeCapture-INFHLROL-CToN3JSu.js +0 -46
  71. package/dist/chunks/stateDiagram-v2-A6IESKWZ-rJYd2FfM.js +0 -1520
  72. package/dist/chunks/swimlanes-B3ENRKFQ-C7w5pfxG.js +0 -4991
  73. package/dist/chunks/swimlanesDiagram-AYQRV4AK-BpGY_bvE.js +0 -13
  74. package/dist/chunks/timeline-definition-JXYKGLGB-ChKFPBKc.js +0 -1058
  75. package/dist/chunks/usecaseDiagram-WPOLBNNX-skXH8Dcu.js +0 -7945
  76. package/dist/chunks/vennDiagram-Q3Y3IDCW-C5KknmJf.js +0 -1578
  77. package/dist/chunks/wardleyDiagram-IVAIDKWA-DY4Lkfpu.js +0 -678
  78. package/dist/chunks/xychartDiagram-4URNHDU4-BHScsL7h.js +0 -1536
  79. package/dist/types/src/import/browser.d.ts +0 -3
  80. package/dist/types/src/import/detect.d.ts +0 -31
  81. package/dist/types/src/import/dot-importer.d.ts +0 -3
  82. package/dist/types/src/import/import-core.d.ts +0 -105
  83. package/dist/types/src/import/mermaid-facade.d.ts +0 -120
  84. package/dist/types/src/import/mermaid-importer.d.ts +0 -4
  85. package/dist/types/src/import/mermaid-sequence.d.ts +0 -8
  86. package/dist/types/src/import/scratch.d.ts +0 -3
  87. package/dist/types/src/lib/source-hash.d.ts +0 -7
  88. package/dist/types/src/model/candidates.d.ts +0 -53
  89. package/dist/types/src/model/examples.d.ts +0 -15
  90. package/dist/types/src/model/label-hits.d.ts +0 -27
  91. package/dist/types/src/model/static-scene.d.ts +0 -15
  92. package/dist/types/src/state/commands.d.ts +0 -529
  93. package/dist/types/src/state/comparison.d.ts +0 -151
  94. package/dist/types/src/state/files.d.ts +0 -61
  95. package/dist/types/src/state/keyboard.d.ts +0 -6
  96. package/dist/types/src/state/launch.d.ts +0 -61
  97. package/dist/types/src/state/ui.d.ts +0 -39
@@ -1,678 +0,0 @@
1
- import { p as St } from "./chunk-JWPE2WC7-CnAFS2xF.js";
2
- import { s as Mt, g as Nt, t as Lt, q as zt, a as Tt, b as At, _ as u, R as Xt, L as Et, N as Q, l as J, Q as Yt, d as It, A as Bt, c as j } from "./mermaid.core-DXv6D2Sm.js";
3
- import { p as Ft } from "./cynefin-EF2NZ3EQ-Bt6b88hY.js";
4
- var D = /* @__PURE__ */ u((e, n) => {
5
- const r = e <= 1 ? e * 100 : e;
6
- if (r < 0 || r > 100)
7
- throw new Error(
8
- `${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`
9
- );
10
- return r;
11
- }, "toPercent"), A = /* @__PURE__ */ u((e, n, r) => ({
12
- x: D(n, `${r} evolution`),
13
- y: D(e, `${r} visibility`)
14
- }), "toCoordinates"), U = /* @__PURE__ */ u((e) => {
15
- if (e) {
16
- if (e === "+<>")
17
- return "bidirectional";
18
- if (e === "+<")
19
- return "backward";
20
- if (e === "+>")
21
- return "forward";
22
- }
23
- }, "getFlowFromPort"), Rt = /* @__PURE__ */ u((e) => {
24
- if (!e?.startsWith("+"))
25
- return {};
26
- const r = /^\+'([^']*)'/.exec(e)?.[1];
27
- return e.includes("<>") ? { flow: "bidirectional", label: r } : e.includes("<") ? { flow: "backward", label: r } : e.includes(">") ? { flow: "forward", label: r } : { label: r };
28
- }, "extractFlowFromArrow"), Ot = /* @__PURE__ */ u((e, n) => {
29
- if (St(e, n), e.size && n.setSize(e.size.width, e.size.height), e.evolution) {
30
- const r = e.evolution.stages.map((a) => a.secondName ? `${a.name.trim()} / ${a.secondName.trim()}` : a.name.trim()), x = e.evolution.stages.filter((a) => a.boundary !== void 0).map((a) => a.boundary);
31
- n.updateAxes({ stages: r, stageBoundaries: x });
32
- }
33
- if (e.anchors.forEach((r) => {
34
- const x = A(r.visibility, r.evolution, `Anchor "${r.name}"`);
35
- n.addNode(r.name, r.name, x.x, x.y, "anchor");
36
- }), e.components.forEach((r) => {
37
- const x = A(
38
- r.visibility,
39
- r.evolution,
40
- `Component "${r.name}"`
41
- ), a = r.label ? (r.label.negX ? -1 : 1) * r.label.offsetX : void 0, d = r.label ? (r.label.negY ? -1 : 1) * r.label.offsetY : void 0, w = r.decorator?.strategy;
42
- n.addNode(
43
- r.name,
44
- r.name,
45
- x.x,
46
- x.y,
47
- "component",
48
- a,
49
- d,
50
- r.inertia,
51
- w
52
- );
53
- }), e.notes.forEach((r) => {
54
- const x = A(r.visibility, r.evolution, `Note "${r.text}"`);
55
- n.addNote(r.text, x.x, x.y);
56
- }), e.pipelines.forEach((r) => {
57
- const x = n.getNode(r.parent);
58
- if (!x || typeof x.y != "number")
59
- throw new Error(
60
- `Pipeline "${r.parent}" must reference an existing component with coordinates.`
61
- );
62
- const a = x.y;
63
- n.startPipeline(r.parent), r.components.forEach((d) => {
64
- const w = `${r.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, F = D(d.evolution, `Pipeline component "${d.name}" evolution`);
65
- n.addNode(
66
- w,
67
- d.name,
68
- F,
69
- a,
70
- "pipeline-component",
71
- C,
72
- g
73
- ), n.addPipelineComponent(r.parent, w);
74
- });
75
- }), e.links.forEach((r) => {
76
- const x = !!r.arrow && (r.arrow.includes("-.->") || r.arrow.includes(".-."));
77
- let a = U(r.fromPort) ?? U(r.toPort);
78
- const { flow: d, label: w } = Rt(r.arrow);
79
- !a && d && (a = d);
80
- const C = r.linkLabel, g = w ?? C;
81
- n.addLink(n.resolveNodeId(r.from), n.resolveNodeId(r.to), x, g, a);
82
- }), e.evolves.forEach((r) => {
83
- const x = n.getNode(r.component);
84
- if (x?.y !== void 0) {
85
- const a = D(r.target, `Evolve target for "${r.component}"`);
86
- n.addTrend(r.component, a, x.y);
87
- }
88
- }), e.annotations.length > 0) {
89
- const r = e.annotations[0], x = A(r.x, r.y, "Annotations box");
90
- n.setAnnotationsBox(x.x, x.y);
91
- }
92
- e.annotation.forEach((r) => {
93
- const x = A(r.x, r.y, `Annotation ${r.number}`);
94
- n.addAnnotation(r.number, [{ x: x.x, y: x.y }], r.text);
95
- }), e.accelerators.forEach((r) => {
96
- const x = A(r.x, r.y, `Accelerator "${r.name}"`);
97
- n.addAccelerator(r.name, x.x, x.y);
98
- }), e.deaccelerators.forEach((r) => {
99
- const x = A(
100
- r.x,
101
- r.y,
102
- `Deaccelerator "${r.name}"`
103
- );
104
- n.addDeaccelerator(r.name, x.x, x.y);
105
- });
106
- }, "populateDb"), K = {
107
- parser: {
108
- // @ts-expect-error - WardleyDB is not assignable to DiagramDB
109
- yy: void 0
110
- },
111
- parse: /* @__PURE__ */ u(async (e) => {
112
- const n = await Ft("wardley", e);
113
- J.debug(n);
114
- const r = K.parser?.yy;
115
- if (!r || typeof r.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
- Ot(n, r);
120
- }, "parse")
121
- }, Wt = 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
- static {
126
- u(this, "WardleyBuilder");
127
- }
128
- addNode(e) {
129
- const n = this.nodes.get(e.id) ?? { id: e.id, label: e.label }, r = {
130
- ...n,
131
- ...e,
132
- className: e.className ?? n.className,
133
- labelOffsetX: e.labelOffsetX ?? n.labelOffsetX,
134
- labelOffsetY: e.labelOffsetY ?? n.labelOffsetY
135
- };
136
- this.nodes.set(e.id, r);
137
- }
138
- addLink(e) {
139
- this.links.push(e);
140
- }
141
- addTrend(e) {
142
- this.trends.set(e.nodeId, e);
143
- }
144
- startPipeline(e) {
145
- this.pipelines.set(e, { nodeId: e, componentIds: [] });
146
- const n = this.nodes.get(e);
147
- n && (n.isPipelineParent = !0);
148
- }
149
- addPipelineComponent(e, n) {
150
- const r = this.pipelines.get(e);
151
- r && r.componentIds.push(n);
152
- const x = this.nodes.get(n);
153
- x && (x.inPipeline = !0);
154
- }
155
- addAnnotation(e) {
156
- this.annotations.push(e);
157
- }
158
- addNote(e) {
159
- this.notes.push(e);
160
- }
161
- addAccelerator(e) {
162
- this.accelerators.push(e);
163
- }
164
- addDeaccelerator(e) {
165
- this.deaccelerators.push(e);
166
- }
167
- setAnnotationsBox(e, n) {
168
- this.annotationsBox = { x: e, y: n };
169
- }
170
- setAxes(e) {
171
- this.axes = {
172
- ...this.axes,
173
- ...e
174
- };
175
- }
176
- setSize(e, n) {
177
- this.size = { width: e, height: n };
178
- }
179
- getNode(e) {
180
- return this.nodes.get(e);
181
- }
182
- /**
183
- * Resolve a name to a node ID. Tries exact ID match first,
184
- * then falls back to finding a node whose label matches the name
185
- * (handles pipeline components which have synthetic IDs like "Parent_Child").
186
- */
187
- resolveNodeId(e) {
188
- if (this.nodes.has(e))
189
- return e;
190
- for (const [n, r] of this.nodes)
191
- if (r.label === e)
192
- return n;
193
- return e;
194
- }
195
- build() {
196
- const e = [];
197
- for (const n of this.nodes.values()) {
198
- if (typeof n.x != "number" || typeof n.y != "number")
199
- throw new Error(`Node "${n.label}" is missing coordinates`);
200
- e.push(n);
201
- }
202
- return {
203
- nodes: e,
204
- links: [...this.links],
205
- trends: [...this.trends.values()],
206
- pipelines: [...this.pipelines.values()],
207
- annotations: [...this.annotations],
208
- notes: [...this.notes],
209
- accelerators: [...this.accelerators],
210
- deaccelerators: [...this.deaccelerators],
211
- annotationsBox: this.annotationsBox,
212
- axes: { ...this.axes },
213
- size: this.size
214
- };
215
- }
216
- clear() {
217
- 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;
218
- }
219
- }, k = new Wt();
220
- function tt() {
221
- return j()["wardley-beta"];
222
- }
223
- u(tt, "getConfig");
224
- function et(e, n, r, x, a, d, w, C, g) {
225
- k.addNode({
226
- id: e,
227
- label: n,
228
- x: r,
229
- y: x,
230
- className: a,
231
- labelOffsetX: d,
232
- labelOffsetY: w,
233
- inertia: C,
234
- sourceStrategy: g
235
- });
236
- }
237
- u(et, "addNode");
238
- function at(e, n, r = !1, x, a) {
239
- k.addLink({
240
- source: e,
241
- target: n,
242
- dashed: r,
243
- label: x,
244
- flow: a
245
- });
246
- }
247
- u(at, "addLink");
248
- function rt(e, n, r) {
249
- k.addTrend({ nodeId: e, targetX: n, targetY: r });
250
- }
251
- u(rt, "addTrend");
252
- function ot(e, n, r) {
253
- k.addAnnotation({
254
- number: e,
255
- coordinates: n,
256
- text: r
257
- });
258
- }
259
- u(ot, "addAnnotation");
260
- function nt(e, n, r) {
261
- k.addNote({
262
- text: e,
263
- x: n,
264
- y: r
265
- });
266
- }
267
- u(nt, "addNote");
268
- function st(e, n, r) {
269
- k.addAccelerator({
270
- name: e,
271
- x: n,
272
- y: r
273
- });
274
- }
275
- u(st, "addAccelerator");
276
- function it(e, n, r) {
277
- k.addDeaccelerator({
278
- name: e,
279
- x: n,
280
- y: r
281
- });
282
- }
283
- u(it, "addDeaccelerator");
284
- function dt(e, n) {
285
- k.setAnnotationsBox(e, n);
286
- }
287
- u(dt, "setAnnotationsBox");
288
- function lt(e, n) {
289
- k.setSize(e, n);
290
- }
291
- u(lt, "setSize");
292
- function ct(e) {
293
- k.startPipeline(e);
294
- }
295
- u(ct, "startPipeline");
296
- function pt(e, n) {
297
- k.addPipelineComponent(e, n);
298
- }
299
- u(pt, "addPipelineComponent");
300
- function ft(e) {
301
- k.setAxes(e);
302
- }
303
- u(ft, "updateAxes");
304
- function ht(e) {
305
- return k.getNode(e);
306
- }
307
- u(ht, "getNode");
308
- function xt(e) {
309
- return k.resolveNodeId(e);
310
- }
311
- u(xt, "resolveNodeId");
312
- function gt() {
313
- return k.build();
314
- }
315
- u(gt, "getWardleyData");
316
- function yt() {
317
- k.clear(), Bt();
318
- }
319
- u(yt, "clear");
320
- var Dt = {
321
- getConfig: tt,
322
- addNode: et,
323
- addLink: at,
324
- addTrend: rt,
325
- addAnnotation: ot,
326
- addNote: nt,
327
- addAccelerator: st,
328
- addDeaccelerator: it,
329
- setAnnotationsBox: dt,
330
- setSize: lt,
331
- startPipeline: ct,
332
- addPipelineComponent: pt,
333
- updateAxes: ft,
334
- getNode: ht,
335
- resolveNodeId: xt,
336
- getWardleyData: gt,
337
- clear: yt,
338
- setAccTitle: At,
339
- getAccTitle: Tt,
340
- setDiagramTitle: zt,
341
- getDiagramTitle: Lt,
342
- getAccDescription: Nt,
343
- setAccDescription: Mt
344
- }, Gt = ["Genesis", "Custom Built", "Product", "Commodity"], qt = /* @__PURE__ */ u(() => {
345
- const { themeVariables: e } = j();
346
- return {
347
- backgroundColor: e.wardley?.backgroundColor ?? e.background ?? "#fff",
348
- axisColor: e.wardley?.axisColor ?? "#000",
349
- axisTextColor: e.wardley?.axisTextColor ?? e.primaryTextColor ?? "#222",
350
- gridColor: e.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
351
- componentFill: e.wardley?.componentFill ?? "#fff",
352
- componentStroke: e.wardley?.componentStroke ?? "#000",
353
- componentLabelColor: e.wardley?.componentLabelColor ?? e.primaryTextColor ?? "#222",
354
- linkStroke: e.wardley?.linkStroke ?? "#000",
355
- evolutionStroke: e.wardley?.evolutionStroke ?? "#dc3545",
356
- annotationStroke: e.wardley?.annotationStroke ?? "#000",
357
- annotationTextColor: e.wardley?.annotationTextColor ?? e.primaryTextColor ?? "#222",
358
- annotationFill: e.wardley?.annotationFill ?? e.background ?? "#fff"
359
- };
360
- }, "getTheme"), Ht = /* @__PURE__ */ u(() => {
361
- const e = j()["wardley-beta"];
362
- return {
363
- width: e?.width ?? 900,
364
- height: e?.height ?? 600,
365
- padding: e?.padding ?? 48,
366
- nodeRadius: e?.nodeRadius ?? 6,
367
- nodeLabelOffset: e?.nodeLabelOffset ?? 8,
368
- axisFontSize: e?.axisFontSize ?? 12,
369
- labelFontSize: e?.labelFontSize ?? 10,
370
- showGrid: e?.showGrid ?? !1,
371
- useMaxWidth: e?.useMaxWidth ?? !0
372
- };
373
- }, "getConfigValues"), jt = /* @__PURE__ */ u((e, n, r, x) => {
374
- J.debug(`Rendering Wardley map
375
- ` + e);
376
- const a = Ht(), d = qt(), w = a.nodeRadius * 1.6, C = x.db, g = C.getWardleyData(), F = C.getDiagramTitle(), S = g.size?.width ?? a.width, b = g.size?.height ?? a.height, E = Yt(n);
377
- E.selectAll("*").remove(), It(E, b, S, a.useMaxWidth), E.attr("viewBox", `0 0 ${S} ${b}`);
378
- const v = E.append("g").attr("class", "wardley-map"), G = E.append("defs");
379
- G.append("marker").attr("id", `arrow-${n}`).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"), G.append("marker").attr("id", `link-arrow-end-${n}`).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"), G.append("marker").attr("id", `link-arrow-start-${n}`).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);
380
- const Y = S - a.padding * 2, I = b - a.padding * 2;
381
- F && 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(F);
382
- const L = /* @__PURE__ */ u((t) => a.padding + t / 100 * Y, "projectX"), z = /* @__PURE__ */ u((t) => b - a.padding - t / 100 * I, "projectY"), R = v.append("g").attr("class", "wardley-axes");
383
- R.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), R.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);
384
- const ut = g.axes.xLabel ?? "Evolution", wt = g.axes.yLabel ?? "Visibility";
385
- R.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", a.padding + Y / 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(ut), R.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", a.padding / 3).attr("y", a.padding + I / 2).attr("fill", d.axisTextColor).attr("font-size", a.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr(
386
- "transform",
387
- `rotate(-90 ${a.padding / 3} ${a.padding + I / 2})`
388
- ).text(wt);
389
- const B = g.axes.stages && g.axes.stages.length > 0 ? g.axes.stages : Gt;
390
- if (B.length > 0) {
391
- const t = v.append("g").attr("class", "wardley-stages"), s = g.axes.stageBoundaries, o = [];
392
- if (s && s.length === B.length) {
393
- let i = 0;
394
- s.forEach((p) => {
395
- o.push({ start: i, end: p }), i = p;
396
- });
397
- } else {
398
- const i = 1 / B.length;
399
- B.forEach((p, l) => {
400
- o.push({
401
- start: l * i,
402
- end: (l + 1) * i
403
- });
404
- });
405
- }
406
- B.forEach((i, p) => {
407
- const l = o[p], f = a.padding + l.start * Y, h = a.padding + l.end * Y, y = (f + h) / 2;
408
- 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);
409
- });
410
- }
411
- if (a.showGrid) {
412
- const t = v.append("g").attr("class", "wardley-grid");
413
- for (let s = 1; s < 4; s++) {
414
- const o = s / 4, i = a.padding + Y * o;
415
- 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 - I * o).attr("y2", b - a.padding - I * o).attr("stroke", d.gridColor).attr("stroke-dasharray", "2 6");
416
- }
417
- }
418
- const c = /* @__PURE__ */ new Map();
419
- if (g.nodes.forEach((t) => {
420
- c.set(t.id, {
421
- x: L(t.x),
422
- y: z(t.y),
423
- node: t
424
- });
425
- }), g.pipelines.length > 0) {
426
- const t = v.append("g").attr("class", "wardley-pipelines"), s = v.append("g").attr("class", "wardley-pipeline-links");
427
- g.pipelines.forEach((o) => {
428
- if (o.componentIds.length === 0)
429
- return;
430
- const i = o.componentIds.map((h) => ({ id: h, pos: c.get(h), node: g.nodes.find((y) => y.id === h) })).filter((h) => h.pos && h.node).sort((h, y) => h.node.x - y.node.x);
431
- for (let h = 0; h < i.length - 1; h++) {
432
- const y = i[h], m = i[h + 1];
433
- 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");
434
- }
435
- let p = 1 / 0, l = -1 / 0, f = 0;
436
- if (o.componentIds.forEach((h) => {
437
- const y = c.get(h);
438
- y && (p = Math.min(p, y.x), l = Math.max(l, y.x), f = y.y);
439
- }), p !== 1 / 0 && l !== -1 / 0) {
440
- const y = a.nodeRadius * 4, m = f - y / 2, P = c.get(o.nodeId);
441
- if (P) {
442
- const N = (p + l) / 2;
443
- P.x = N, P.y = m - w / 6;
444
- }
445
- 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);
446
- }
447
- });
448
- }
449
- const V = v.append("g").attr("class", "wardley-links"), _ = /* @__PURE__ */ new Map();
450
- g.pipelines.forEach((t) => {
451
- _.set(t.nodeId, new Set(t.componentIds));
452
- });
453
- const Z = g.links.filter((t) => !(!c.has(t.source) || !c.has(t.target) || _.get(t.target)?.has(t.source)));
454
- V.selectAll("line").data(Z).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
455
- const s = c.get(t.source), o = c.get(t.target), p = g.nodes.find((y) => y.id === t.source).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = o.x - s.x, f = o.y - s.y, h = Math.sqrt(l * l + f * f);
456
- return s.x + l / h * p;
457
- }).attr("y1", (t) => {
458
- const s = c.get(t.source), o = c.get(t.target), p = g.nodes.find((y) => y.id === t.source).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = o.x - s.x, f = o.y - s.y, h = Math.sqrt(l * l + f * f);
459
- return s.y + f / h * p;
460
- }).attr("x2", (t) => {
461
- const s = c.get(t.source), o = c.get(t.target), p = g.nodes.find((y) => y.id === t.target).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = s.x - o.x, f = s.y - o.y, h = Math.sqrt(l * l + f * f);
462
- return o.x + l / h * p;
463
- }).attr("y2", (t) => {
464
- const s = c.get(t.source), o = c.get(t.target), p = g.nodes.find((y) => y.id === t.target).isPipelineParent ? w / Math.sqrt(2) : a.nodeRadius, l = s.x - o.x, f = s.y - o.y, h = Math.sqrt(l * l + f * f);
465
- return o.y + f / h * p;
466
- }).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-${n})` : null).attr("marker-start", (t) => t.flow === "backward" || t.flow === "bidirectional" ? `url(#link-arrow-start-${n})` : null), V.selectAll("text").data(Z.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
467
- const s = c.get(t.source), o = c.get(t.target), i = (s.x + o.x) / 2, p = o.y - s.y, l = o.x - s.x, f = Math.sqrt(l * l + p * p), h = 8, y = p / f;
468
- return i + y * h;
469
- }).attr("y", (t) => {
470
- const s = c.get(t.source), o = c.get(t.target), i = (s.y + o.y) / 2, p = o.x - s.x, l = o.y - s.y, f = Math.sqrt(p * p + l * l), h = 8, y = -p / f;
471
- return i + y * h;
472
- }).attr("fill", d.axisTextColor).attr("font-size", a.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
473
- const s = c.get(t.source), o = c.get(t.target), i = (s.x + o.x) / 2, p = (s.y + o.y) / 2, l = o.x - s.x, f = o.y - s.y, h = Math.sqrt(l * l + f * f), y = 8, m = f / h, P = -l / h, N = i + m * y, O = p + P * y;
474
- let X = Math.atan2(f, l) * 180 / Math.PI;
475
- return (X > 90 || X < -90) && (X += 180), `rotate(${X} ${N} ${O})`;
476
- }).text((t) => t.label);
477
- const mt = v.append("g").attr("class", "wardley-trends"), kt = g.trends.map((t) => {
478
- const s = c.get(t.nodeId);
479
- if (!s)
480
- return null;
481
- const o = L(t.targetX), i = z(t.targetY), p = o - s.x, l = i - s.y, f = Math.sqrt(p * p + l * l), h = a.nodeRadius + 2, y = f > h ? o - p / f * h : o, m = f > h ? i - l / f * h : i;
482
- return {
483
- origin: s,
484
- targetX: o,
485
- targetY: i,
486
- adjustedX2: y,
487
- adjustedY2: m
488
- };
489
- }).filter((t) => t !== null);
490
- mt.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", d.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${n})`);
491
- const M = v.append("g").attr("class", "wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr(
492
- "class",
493
- (t) => ["wardley-node", t.className ? `wardley-node--${t.className}` : ""].filter(Boolean).join(" ")
494
- );
495
- 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);
496
- const T = M.filter((t) => t.sourceStrategy === "market");
497
- 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(
498
- (t) => !t.isPipelineParent && t.sourceStrategy !== "market" && t.className !== "anchor"
499
- ).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);
500
- const q = a.nodeRadius * 0.7, $ = a.nodeRadius * 1.2;
501
- 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", q).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", q).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", q).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) => {
502
- const s = c.get(t.id);
503
- let o = t.isPipelineParent ? w / 2 + 15 : a.nodeRadius + 15;
504
- return t.sourceStrategy && (o += a.nodeRadius + 10), s.x + o;
505
- }).attr("y1", (t) => {
506
- const s = c.get(t.id), o = t.isPipelineParent ? w : a.nodeRadius * 2;
507
- return s.y - o / 2;
508
- }).attr("x2", (t) => {
509
- const s = c.get(t.id);
510
- let o = t.isPipelineParent ? w / 2 + 15 : a.nodeRadius + 15;
511
- return t.sourceStrategy && (o += a.nodeRadius + 10), s.x + o;
512
- }).attr("y2", (t) => {
513
- const s = c.get(t.id), o = t.isPipelineParent ? w : a.nodeRadius * 2;
514
- return s.y + o / 2;
515
- }).attr("stroke", d.componentStroke).attr("stroke-width", 6), M.append("text").attr("x", (t) => {
516
- const s = c.get(t.id);
517
- if (t.className === "anchor")
518
- return t.labelOffsetX !== void 0 ? s.x + t.labelOffsetX : s.x;
519
- let o = a.nodeLabelOffset;
520
- t.sourceStrategy && t.labelOffsetX === void 0 && (o += 10);
521
- const i = t.labelOffsetX ?? o;
522
- return s.x + i;
523
- }).attr("y", (t) => {
524
- const s = c.get(t.id);
525
- if (t.className === "anchor")
526
- return t.labelOffsetY !== void 0 ? s.y + t.labelOffsetY : s.y - 3;
527
- let o = -a.nodeLabelOffset;
528
- t.sourceStrategy && t.labelOffsetY === void 0 && (o -= 10);
529
- const i = t.labelOffsetY ?? o;
530
- return s.y + i;
531
- }).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) {
532
- const t = v.append("g").attr("class", "wardley-annotations");
533
- if (g.annotations.forEach((s) => {
534
- const o = s.coordinates.map((i) => ({
535
- x: L(i.x),
536
- y: z(i.y)
537
- }));
538
- if (o.length > 1)
539
- for (let i = 0; i < o.length - 1; i++)
540
- t.append("line").attr("class", "wardley-annotation-line").attr("x1", o[i].x).attr("y1", o[i].y).attr("x2", o[i + 1].x).attr("y2", o[i + 1].y).attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
541
- o.forEach((i) => {
542
- const p = t.append("g").attr("class", "wardley-annotation");
543
- 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);
544
- });
545
- }), g.annotationsBox) {
546
- let s = L(g.annotationsBox.x), o = z(g.annotationsBox.y);
547
- const i = 10, p = 16, l = 11, f = t.append("g").attr("class", "wardley-annotations-box"), h = [...g.annotations].filter((m) => m.text).sort((m, P) => m.number - P.number), y = [];
548
- if (h.forEach((m, P) => {
549
- const N = f.append("text").attr("x", s + i).attr("y", o + 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}`);
550
- y.push(N);
551
- }), y.length > 0) {
552
- let m = 0, P = 0;
553
- y.forEach((H) => {
554
- const W = H.node(), Pt = W.getComputedTextLength();
555
- m = Math.max(m, Pt);
556
- const Ct = W.getBBox();
557
- P = Math.max(P, Ct.height);
558
- });
559
- const N = m + i * 2 + 105, O = h.length * p + i * 2 + P / 2, X = a.padding, bt = S - a.padding - N, $t = a.padding, vt = b - a.padding - O;
560
- s = Math.max(X, Math.min(s, bt)), o = Math.max($t, Math.min(o, vt)), y.forEach((H, W) => {
561
- H.attr("x", s + i).attr("y", o + i + (W + 1) * p);
562
- }), f.insert("rect", "text").attr("x", s).attr("y", o).attr("width", N).attr("height", O).attr("fill", "white").attr("stroke", d.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
563
- }
564
- }
565
- }
566
- if (g.notes.length > 0) {
567
- const t = v.append("g").attr("class", "wardley-notes");
568
- g.notes.forEach((s) => {
569
- const o = L(s.x), i = z(s.y);
570
- t.append("text").attr("x", o).attr("y", i).attr("text-anchor", "start").attr("font-size", 11).attr("fill", d.axisTextColor).attr("font-weight", "bold").text(s.text);
571
- });
572
- }
573
- if (g.accelerators.length > 0) {
574
- const t = v.append("g").attr("class", "wardley-accelerators");
575
- g.accelerators.forEach((s) => {
576
- const o = L(s.x), i = z(s.y), p = 60, l = 30, f = 20, h = `
577
- M ${o} ${i - l / 2}
578
- L ${o + p - f} ${i - l / 2}
579
- L ${o + p - f} ${i - l / 2 - 8}
580
- L ${o + p} ${i}
581
- L ${o + p - f} ${i + l / 2 + 8}
582
- L ${o + p - f} ${i + l / 2}
583
- L ${o} ${i + l / 2}
584
- Z
585
- `;
586
- t.append("path").attr("d", h).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", o + 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);
587
- });
588
- }
589
- if (g.deaccelerators.length > 0) {
590
- const t = v.append("g").attr("class", "wardley-deaccelerators");
591
- g.deaccelerators.forEach((s) => {
592
- const o = L(s.x), i = z(s.y), p = 60, l = 30, f = 20, h = `
593
- M ${o + p} ${i - l / 2}
594
- L ${o + f} ${i - l / 2}
595
- L ${o + f} ${i - l / 2 - 8}
596
- L ${o} ${i}
597
- L ${o + f} ${i + l / 2 + 8}
598
- L ${o + f} ${i + l / 2}
599
- L ${o + p} ${i + l / 2}
600
- Z
601
- `;
602
- t.append("path").attr("d", h).attr("fill", "white").attr("stroke", d.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", o + 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);
603
- });
604
- }
605
- }, "draw"), Vt = {
606
- draw: jt
607
- }, _t = /* @__PURE__ */ u(({
608
- wardley: e
609
- } = {}) => {
610
- const n = Xt(), r = Et(), x = Q(n, r.themeVariables), a = Q(x.wardley, e);
611
- return `
612
- .wardley-background {
613
- fill: ${a.backgroundColor};
614
- }
615
- .wardley-axes line, .wardley-axes path {
616
- stroke: ${a.axisColor};
617
- }
618
- .wardley-axis-label {
619
- fill: ${a.axisTextColor};
620
- }
621
- .wardley-stage-label {
622
- fill: ${a.axisTextColor};
623
- }
624
- .wardley-grid line {
625
- stroke: ${a.gridColor};
626
- }
627
- .wardley-node circle {
628
- fill: ${a.componentFill};
629
- stroke: ${a.componentStroke};
630
- }
631
- .wardley-node-label {
632
- fill: ${a.componentLabelColor};
633
- }
634
- .wardley-link {
635
- stroke: ${a.linkStroke};
636
- }
637
- .wardley-link--dashed {
638
- stroke-dasharray: 4 4;
639
- }
640
- .wardley-link-label {
641
- fill: ${a.axisTextColor};
642
- }
643
- .wardley-trend line {
644
- stroke: ${a.evolutionStroke};
645
- }
646
- .wardley-annotation-line {
647
- stroke: ${a.annotationStroke};
648
- }
649
- .wardley-annotation circle {
650
- fill: ${a.annotationFill};
651
- stroke: ${a.annotationStroke};
652
- }
653
- .wardley-annotation text {
654
- fill: ${a.annotationTextColor};
655
- }
656
- .wardley-annotations-box rect {
657
- fill: ${a.annotationFill};
658
- stroke: ${a.annotationStroke};
659
- }
660
- .wardley-annotations-box text {
661
- fill: ${a.annotationTextColor};
662
- }
663
- .wardley-pipeline-box {
664
- stroke: ${a.componentStroke};
665
- }
666
- .wardley-notes text {
667
- fill: ${a.axisTextColor};
668
- }
669
- `;
670
- }, "styles"), Kt = {
671
- parser: K,
672
- db: Dt,
673
- renderer: Vt,
674
- styles: _t
675
- };
676
- export {
677
- Kt as diagram
678
- };