schematex 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/dist/ai/ai-sdk.cjs +24 -24
  2. package/dist/ai/ai-sdk.d.cts +2 -2
  3. package/dist/ai/ai-sdk.d.ts +2 -2
  4. package/dist/ai/ai-sdk.js +19 -19
  5. package/dist/ai/index.cjs +33 -33
  6. package/dist/ai/index.js +20 -20
  7. package/dist/browser.cjs +25 -25
  8. package/dist/browser.js +19 -19
  9. package/dist/{chunk-YMFYPB5Y.cjs → chunk-2A5HJFOX.cjs} +4 -4
  10. package/dist/{chunk-YMFYPB5Y.cjs.map → chunk-2A5HJFOX.cjs.map} +1 -1
  11. package/dist/{chunk-6L46VIXI.cjs → chunk-2ASZMLC3.cjs} +20 -28
  12. package/dist/chunk-2ASZMLC3.cjs.map +1 -0
  13. package/dist/{chunk-6NUAGU6O.js → chunk-2RFFCZ3I.js} +3 -3
  14. package/dist/{chunk-6NUAGU6O.js.map → chunk-2RFFCZ3I.js.map} +1 -1
  15. package/dist/{chunk-HKOPXQYU.cjs → chunk-3DSNGR26.cjs} +5 -5
  16. package/dist/{chunk-HKOPXQYU.cjs.map → chunk-3DSNGR26.cjs.map} +1 -1
  17. package/dist/{chunk-D34VGLSE.cjs → chunk-4MGALM2C.cjs} +5 -5
  18. package/dist/{chunk-D34VGLSE.cjs.map → chunk-4MGALM2C.cjs.map} +1 -1
  19. package/dist/{chunk-ABCMTAOZ.js → chunk-56DSMSXK.js} +7 -4
  20. package/dist/chunk-56DSMSXK.js.map +1 -0
  21. package/dist/{chunk-Q2YRJHFB.cjs → chunk-6BJKQULN.cjs} +7 -7
  22. package/dist/chunk-6BJKQULN.cjs.map +1 -0
  23. package/dist/{chunk-NFZMNKOR.cjs → chunk-7JJQEECD.cjs} +15 -15
  24. package/dist/{chunk-NFZMNKOR.cjs.map → chunk-7JJQEECD.cjs.map} +1 -1
  25. package/dist/{chunk-JN6FHUC6.js → chunk-7SVB3XA7.js} +3 -3
  26. package/dist/{chunk-JN6FHUC6.js.map → chunk-7SVB3XA7.js.map} +1 -1
  27. package/dist/{chunk-HPEAE3JM.js → chunk-7Z2GDS4G.js} +58 -8
  28. package/dist/chunk-7Z2GDS4G.js.map +1 -0
  29. package/dist/{chunk-PR6IAGVP.js → chunk-CURAZVOH.js} +3 -3
  30. package/dist/{chunk-PR6IAGVP.js.map → chunk-CURAZVOH.js.map} +1 -1
  31. package/dist/{chunk-KGOZBABH.cjs → chunk-GYTU7L4L.cjs} +12 -12
  32. package/dist/{chunk-KGOZBABH.cjs.map → chunk-GYTU7L4L.cjs.map} +1 -1
  33. package/dist/{chunk-B5AQ3CG3.cjs → chunk-HILYXWGJ.cjs} +16 -13
  34. package/dist/chunk-HILYXWGJ.cjs.map +1 -0
  35. package/dist/{chunk-E3CAJGJM.js → chunk-HJA7MIMV.js} +6 -6
  36. package/dist/chunk-HJA7MIMV.js.map +1 -0
  37. package/dist/{chunk-DX44TBFZ.js → chunk-IQLZUCWI.js} +20 -28
  38. package/dist/chunk-IQLZUCWI.js.map +1 -0
  39. package/dist/{chunk-NXU4XKLY.cjs → chunk-JHJJT5H5.cjs} +9 -7
  40. package/dist/chunk-JHJJT5H5.cjs.map +1 -0
  41. package/dist/{chunk-CDK7KDIW.js → chunk-JR6JNQEZ.js} +4 -4
  42. package/dist/{chunk-CDK7KDIW.js.map → chunk-JR6JNQEZ.js.map} +1 -1
  43. package/dist/{chunk-YTGOLTLJ.js → chunk-KR7PPCC4.js} +4 -4
  44. package/dist/{chunk-YTGOLTLJ.js.map → chunk-KR7PPCC4.js.map} +1 -1
  45. package/dist/{chunk-AJJYWXZB.cjs → chunk-L2NY4XEY.cjs} +4 -4
  46. package/dist/{chunk-AJJYWXZB.cjs.map → chunk-L2NY4XEY.cjs.map} +1 -1
  47. package/dist/{chunk-T3GV7OVF.js → chunk-MERU76LW.js} +21 -4
  48. package/dist/chunk-MERU76LW.js.map +1 -0
  49. package/dist/{chunk-IXRPRMHI.js → chunk-MTIZIHWE.js} +9 -7
  50. package/dist/chunk-MTIZIHWE.js.map +1 -0
  51. package/dist/{chunk-DR3DDDQY.cjs → chunk-MUE45N2A.cjs} +59 -9
  52. package/dist/chunk-MUE45N2A.cjs.map +1 -0
  53. package/dist/{chunk-DHI7YAQJ.cjs → chunk-MYVY55DO.cjs} +15 -15
  54. package/dist/{chunk-DHI7YAQJ.cjs.map → chunk-MYVY55DO.cjs.map} +1 -1
  55. package/dist/{chunk-NZT5P2XZ.cjs → chunk-NT6VVMLW.cjs} +291 -2
  56. package/dist/chunk-NT6VVMLW.cjs.map +1 -0
  57. package/dist/{chunk-UGB42BGK.cjs → chunk-NTQBNBBP.cjs} +486 -437
  58. package/dist/chunk-NTQBNBBP.cjs.map +1 -0
  59. package/dist/{chunk-T5KHNJ67.cjs → chunk-PSQGLE6U.cjs} +6 -6
  60. package/dist/{chunk-T5KHNJ67.cjs.map → chunk-PSQGLE6U.cjs.map} +1 -1
  61. package/dist/{chunk-GDZNTILD.js → chunk-TMAOPJCT.js} +4 -4
  62. package/dist/chunk-TMAOPJCT.js.map +1 -0
  63. package/dist/{chunk-LM5X7ZNR.js → chunk-TP7LQ5PF.js} +312 -263
  64. package/dist/chunk-TP7LQ5PF.js.map +1 -0
  65. package/dist/{chunk-UOM3EDE6.js → chunk-TWTUIUNK.js} +3 -3
  66. package/dist/{chunk-UOM3EDE6.js.map → chunk-TWTUIUNK.js.map} +1 -1
  67. package/dist/{chunk-UK6HF6PE.js → chunk-TYEQC7PV.js} +288 -3
  68. package/dist/chunk-TYEQC7PV.js.map +1 -0
  69. package/dist/{chunk-2SZJQVPN.cjs → chunk-V3JTVTPY.cjs} +87 -30
  70. package/dist/chunk-V3JTVTPY.cjs.map +1 -0
  71. package/dist/{chunk-KF3DFASA.js → chunk-VMUNKEB2.js} +3 -3
  72. package/dist/{chunk-KF3DFASA.js.map → chunk-VMUNKEB2.js.map} +1 -1
  73. package/dist/{chunk-K2D6VFLP.js → chunk-VWIKDJNV.js} +78 -22
  74. package/dist/chunk-VWIKDJNV.js.map +1 -0
  75. package/dist/{chunk-JGCKW5RS.js → chunk-VY4JOTM2.js} +5 -5
  76. package/dist/chunk-VY4JOTM2.js.map +1 -0
  77. package/dist/{chunk-LENRV7ZJ.cjs → chunk-VYAUTNHC.cjs} +5 -5
  78. package/dist/chunk-VYAUTNHC.cjs.map +1 -0
  79. package/dist/{chunk-E7LXMEKX.js → chunk-VZVREOTM.js} +3 -3
  80. package/dist/{chunk-E7LXMEKX.js.map → chunk-VZVREOTM.js.map} +1 -1
  81. package/dist/{chunk-JIUC4DRS.cjs → chunk-WFVRUUJW.cjs} +6 -6
  82. package/dist/chunk-WFVRUUJW.cjs.map +1 -0
  83. package/dist/{chunk-JIJWGHRN.cjs → chunk-XA6XIAMN.cjs} +22 -5
  84. package/dist/chunk-XA6XIAMN.cjs.map +1 -0
  85. package/dist/diagrams/blockdiagram/index.cjs +6 -5
  86. package/dist/diagrams/blockdiagram/index.d.cts +2 -2
  87. package/dist/diagrams/blockdiagram/index.d.ts +2 -2
  88. package/dist/diagrams/blockdiagram/index.js +2 -1
  89. package/dist/diagrams/circuit/index.cjs +9 -9
  90. package/dist/diagrams/circuit/index.js +2 -2
  91. package/dist/diagrams/ecomap/index.cjs +7 -7
  92. package/dist/diagrams/ecomap/index.js +2 -2
  93. package/dist/diagrams/entity/index.cjs +6 -6
  94. package/dist/diagrams/entity/index.js +2 -2
  95. package/dist/diagrams/fishbone/index.cjs +8 -8
  96. package/dist/diagrams/fishbone/index.js +2 -2
  97. package/dist/diagrams/flowchart/index.cjs +8 -8
  98. package/dist/diagrams/flowchart/index.d.cts +1 -1
  99. package/dist/diagrams/flowchart/index.d.ts +1 -1
  100. package/dist/diagrams/flowchart/index.js +2 -2
  101. package/dist/diagrams/genogram/index.cjs +9 -9
  102. package/dist/diagrams/genogram/index.js +2 -2
  103. package/dist/diagrams/ladder/index.cjs +6 -6
  104. package/dist/diagrams/ladder/index.js +2 -2
  105. package/dist/diagrams/logic/index.cjs +8 -8
  106. package/dist/diagrams/logic/index.js +2 -2
  107. package/dist/diagrams/orgchart/index.cjs +8 -8
  108. package/dist/diagrams/orgchart/index.js +2 -2
  109. package/dist/diagrams/pedigree/index.cjs +7 -7
  110. package/dist/diagrams/pedigree/index.js +2 -2
  111. package/dist/diagrams/phylo/index.cjs +7 -7
  112. package/dist/diagrams/phylo/index.js +2 -2
  113. package/dist/diagrams/sld/index.cjs +8 -8
  114. package/dist/diagrams/sld/index.js +2 -2
  115. package/dist/diagrams/sociogram/index.cjs +6 -6
  116. package/dist/diagrams/sociogram/index.js +2 -2
  117. package/dist/diagrams/timing/index.cjs +4 -4
  118. package/dist/diagrams/timing/index.js +1 -1
  119. package/dist/diagrams/venn/index.cjs +9 -9
  120. package/dist/diagrams/venn/index.js +2 -2
  121. package/dist/{index-B0YO7rx8.d.cts → index-BiXWjQht.d.cts} +10 -4
  122. package/dist/{index-u3KZBdas.d.ts → index-Cq8y1aaa.d.ts} +10 -4
  123. package/dist/index.cjs +87 -87
  124. package/dist/index.d.cts +1 -1
  125. package/dist/index.d.ts +1 -1
  126. package/dist/index.js +23 -23
  127. package/dist/react.cjs +19 -19
  128. package/dist/react.js +18 -18
  129. package/package.json +1 -1
  130. package/dist/chunk-2SZJQVPN.cjs.map +0 -1
  131. package/dist/chunk-6L46VIXI.cjs.map +0 -1
  132. package/dist/chunk-ABCMTAOZ.js.map +0 -1
  133. package/dist/chunk-B5AQ3CG3.cjs.map +0 -1
  134. package/dist/chunk-DR3DDDQY.cjs.map +0 -1
  135. package/dist/chunk-DX44TBFZ.js.map +0 -1
  136. package/dist/chunk-E3CAJGJM.js.map +0 -1
  137. package/dist/chunk-GDZNTILD.js.map +0 -1
  138. package/dist/chunk-HPEAE3JM.js.map +0 -1
  139. package/dist/chunk-IXRPRMHI.js.map +0 -1
  140. package/dist/chunk-JGCKW5RS.js.map +0 -1
  141. package/dist/chunk-JIJWGHRN.cjs.map +0 -1
  142. package/dist/chunk-JIUC4DRS.cjs.map +0 -1
  143. package/dist/chunk-K2D6VFLP.js.map +0 -1
  144. package/dist/chunk-LENRV7ZJ.cjs.map +0 -1
  145. package/dist/chunk-LM5X7ZNR.js.map +0 -1
  146. package/dist/chunk-NXU4XKLY.cjs.map +0 -1
  147. package/dist/chunk-NZT5P2XZ.cjs.map +0 -1
  148. package/dist/chunk-Q2YRJHFB.cjs.map +0 -1
  149. package/dist/chunk-T3GV7OVF.js.map +0 -1
  150. package/dist/chunk-UGB42BGK.cjs.map +0 -1
  151. package/dist/chunk-UK6HF6PE.js.map +0 -1
@@ -1,23 +1,23 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ2YRJHFB_cjs = require('./chunk-Q2YRJHFB.cjs');
4
- var chunkJIJWGHRN_cjs = require('./chunk-JIJWGHRN.cjs');
5
- var chunk6L46VIXI_cjs = require('./chunk-6L46VIXI.cjs');
6
- var chunkJIUC4DRS_cjs = require('./chunk-JIUC4DRS.cjs');
7
- var chunkAJJYWXZB_cjs = require('./chunk-AJJYWXZB.cjs');
8
- var chunkLENRV7ZJ_cjs = require('./chunk-LENRV7ZJ.cjs');
9
- var chunkT5KHNJ67_cjs = require('./chunk-T5KHNJ67.cjs');
10
- var chunkYMFYPB5Y_cjs = require('./chunk-YMFYPB5Y.cjs');
11
- var chunkDR3DDDQY_cjs = require('./chunk-DR3DDDQY.cjs');
12
- var chunkNFZMNKOR_cjs = require('./chunk-NFZMNKOR.cjs');
13
- var chunk2SZJQVPN_cjs = require('./chunk-2SZJQVPN.cjs');
14
- var chunkKGOZBABH_cjs = require('./chunk-KGOZBABH.cjs');
3
+ var chunk6BJKQULN_cjs = require('./chunk-6BJKQULN.cjs');
4
+ var chunkXA6XIAMN_cjs = require('./chunk-XA6XIAMN.cjs');
5
+ var chunk2ASZMLC3_cjs = require('./chunk-2ASZMLC3.cjs');
6
+ var chunkWFVRUUJW_cjs = require('./chunk-WFVRUUJW.cjs');
7
+ var chunkL2NY4XEY_cjs = require('./chunk-L2NY4XEY.cjs');
8
+ var chunkVYAUTNHC_cjs = require('./chunk-VYAUTNHC.cjs');
9
+ var chunkPSQGLE6U_cjs = require('./chunk-PSQGLE6U.cjs');
10
+ var chunk2A5HJFOX_cjs = require('./chunk-2A5HJFOX.cjs');
11
+ var chunkMUE45N2A_cjs = require('./chunk-MUE45N2A.cjs');
12
+ var chunk7JJQEECD_cjs = require('./chunk-7JJQEECD.cjs');
13
+ var chunkV3JTVTPY_cjs = require('./chunk-V3JTVTPY.cjs');
14
+ var chunkGYTU7L4L_cjs = require('./chunk-GYTU7L4L.cjs');
15
15
  var chunk3KRL2EGN_cjs = require('./chunk-3KRL2EGN.cjs');
16
- var chunkDHI7YAQJ_cjs = require('./chunk-DHI7YAQJ.cjs');
17
- var chunkB5AQ3CG3_cjs = require('./chunk-B5AQ3CG3.cjs');
18
- var chunkNXU4XKLY_cjs = require('./chunk-NXU4XKLY.cjs');
19
- var chunkD34VGLSE_cjs = require('./chunk-D34VGLSE.cjs');
20
- var chunkNZT5P2XZ_cjs = require('./chunk-NZT5P2XZ.cjs');
16
+ var chunkMYVY55DO_cjs = require('./chunk-MYVY55DO.cjs');
17
+ var chunkHILYXWGJ_cjs = require('./chunk-HILYXWGJ.cjs');
18
+ var chunkJHJJT5H5_cjs = require('./chunk-JHJJT5H5.cjs');
19
+ var chunk4MGALM2C_cjs = require('./chunk-4MGALM2C.cjs');
20
+ var chunkNT6VVMLW_cjs = require('./chunk-NT6VVMLW.cjs');
21
21
  var chunkVHDSPI6A_cjs = require('./chunk-VHDSPI6A.cjs');
22
22
  var chunk3WNW5Y7P_cjs = require('./chunk-3WNW5Y7P.cjs');
23
23
 
@@ -1211,7 +1211,7 @@ function round2(n) {
1211
1211
  return Math.round(n * 100) / 100;
1212
1212
  }
1213
1213
  function renderInfluence(ast, config) {
1214
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
1214
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
1215
1215
  const layout = layoutInfluence(ast);
1216
1216
  const titleOffset = ast.title ? 36 : 10;
1217
1217
  const width = Math.ceil(layout.width);
@@ -1255,7 +1255,7 @@ var CLASS_PALETTE = [
1255
1255
  function buildCss2(t) {
1256
1256
  return `
1257
1257
  .lt-dtree { font-family: system-ui, -apple-system, sans-serif; }
1258
- .lt-dtree-title { font: 500 16px sans-serif; fill: ${t.text}; }
1258
+ .lt-dtree-title { font: 700 16px sans-serif; fill: ${t.text}; }
1259
1259
  .lt-dtree-edge { fill: none; stroke: ${t.stroke}; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
1260
1260
  .lt-dtree-edge-optimal { fill: none; stroke: ${t.positive}; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
1261
1261
  .lt-dtree-edge-leader { fill: none; stroke: ${t.stroke}; stroke-width: 1; stroke-dasharray: 2 2; opacity: 0.55; }
@@ -1577,7 +1577,7 @@ function wrapText(text2, maxChars) {
1577
1577
  }
1578
1578
  function renderDecisionTree(ast, config) {
1579
1579
  if ("arcs" in ast) return renderInfluence(ast, config);
1580
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
1580
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
1581
1581
  const layout = layoutDecisionTree(ast);
1582
1582
  const titleOffset = ast.title ? 36 : 10;
1583
1583
  const width = Math.ceil(layout.width);
@@ -1587,7 +1587,7 @@ function renderDecisionTree(ast, config) {
1587
1587
  children.push(chunk3WNW5Y7P_cjs.desc(`Decision tree (${ast.mode} mode) with ${layout.nodes.length} nodes and ${layout.edges.length} edges`));
1588
1588
  children.push(chunk3WNW5Y7P_cjs.el("style", {}, buildCss2(t)));
1589
1589
  if (ast.title) {
1590
- children.push(chunk3WNW5Y7P_cjs.text({ x: 20, y: 24, class: "lt-dtree-title" }, ast.title));
1590
+ children.push(chunk3WNW5Y7P_cjs.text({ x: width / 2, y: 24, class: "lt-dtree-title", "text-anchor": "middle" }, ast.title));
1591
1591
  }
1592
1592
  const inner = [];
1593
1593
  for (const e of layout.edges) {
@@ -2650,7 +2650,7 @@ var ERA_ROW_GAP = 2;
2650
2650
  function renderTimeline(src, config) {
2651
2651
  const ast = parseTimeline(src);
2652
2652
  const layout = layoutTimeline(ast);
2653
- const theme = chunkNZT5P2XZ_cjs.resolveTimelineTheme(config?.theme ?? "default");
2653
+ const theme = chunkNT6VVMLW_cjs.resolveTimelineTheme(config?.theme ?? "default");
2654
2654
  const styleBlock = styleForTheme(theme, config?.fontFamily);
2655
2655
  const children = [
2656
2656
  chunk3WNW5Y7P_cjs.title(ast.title ? `Timeline \u2014 ${ast.title}` : "Timeline"),
@@ -2695,7 +2695,7 @@ function renderTimeline(src, config) {
2695
2695
  function styleForTheme(theme, fontFamily) {
2696
2696
  const font = fontFamily ?? "system-ui, -apple-system, sans-serif";
2697
2697
  return `
2698
- .st-timeline { ${chunkNZT5P2XZ_cjs.cssCustomProperties(theme)}
2698
+ .st-timeline { ${chunkNT6VVMLW_cjs.cssCustomProperties(theme)}
2699
2699
  --st-axis: ${theme.axis};
2700
2700
  --st-axis-label: ${theme.axisLabel};
2701
2701
  --st-era-label: ${theme.eraLabel};
@@ -3831,7 +3831,7 @@ function layoutStateDiagram(ast) {
3831
3831
  }
3832
3832
  return true;
3833
3833
  });
3834
- const fcResult = chunkDR3DDDQY_cjs.layoutFlowchart(fcAst);
3834
+ const fcResult = chunkMUE45N2A_cjs.layoutFlowchart(fcAst);
3835
3835
  const stateById = /* @__PURE__ */ new Map();
3836
3836
  const collectStates = (s) => {
3837
3837
  stateById.set(s.id, s);
@@ -4126,40 +4126,42 @@ function shiftPathY(d, dy) {
4126
4126
 
4127
4127
  // src/diagrams/state/renderer.ts
4128
4128
  var ARROW_MARKER_ID = "lt-state-arrow";
4129
- var STYLE = `
4130
- .lt-state-body { fill: #ffffff; stroke: #2a2a2a; stroke-width: 1.6; }
4131
- .lt-state-name { font: 600 12px system-ui, sans-serif; fill: #1a1a1a; }
4132
- .lt-state-div { stroke: #2a2a2a; stroke-width: 1; }
4133
- .lt-state-activity { font: 11px ui-monospace, monospace; fill: #444; }
4129
+ function buildStyle(t) {
4130
+ return `
4131
+ .lt-state-body { fill: ${t.stateFill}; stroke: ${t.stateStroke}; stroke-width: 1.6; }
4132
+ .lt-state-name { font: 600 12px system-ui, sans-serif; fill: ${t.stateText}; }
4133
+ .lt-state-div { stroke: ${t.stateStroke}; stroke-width: 1; }
4134
+ .lt-state-activity { font: 11px ui-monospace, monospace; fill: ${t.activityText}; }
4134
4135
 
4135
- .lt-composite-body { fill: #fafafa; stroke: #2a2a2a; stroke-width: 1.6; }
4136
- .lt-composite-title { font: 600 12px system-ui, sans-serif; fill: #1a1a1a; }
4137
- .lt-composite-titlebar { fill: #f0f0f0; stroke: #2a2a2a; stroke-width: 1; }
4138
- .lt-region-div { stroke: #888; stroke-width: 1; stroke-dasharray: 6 4; }
4136
+ .lt-composite-body { fill: ${t.compositeFill}; stroke: ${t.stateStroke}; stroke-width: 1.6; }
4137
+ .lt-composite-title { font: 600 12px system-ui, sans-serif; fill: ${t.stateText}; }
4138
+ .lt-composite-titlebar { fill: ${t.compositeTitlebar}; stroke: ${t.stateStroke}; stroke-width: 1; }
4139
+ .lt-region-div { stroke: ${t.regionDiv}; stroke-width: 1; stroke-dasharray: 6 4; }
4139
4140
 
4140
- .lt-ps-initial { fill: #1a1a1a; }
4141
- .lt-ps-final-outer { fill: #ffffff; stroke: #1a1a1a; stroke-width: 1.6; }
4142
- .lt-ps-final-inner { fill: #1a1a1a; }
4143
- .lt-ps-choice { fill: #ffffff; stroke: #1a1a1a; stroke-width: 1.6; }
4144
- .lt-ps-junction { fill: #1a1a1a; }
4145
- .lt-ps-bar { fill: #1a1a1a; }
4146
- .lt-ps-history-body { fill: #ffffff; stroke: #1a1a1a; stroke-width: 1.6; }
4147
- .lt-ps-history-text { font: 600 11px serif; fill: #1a1a1a; }
4148
- .lt-ps-terminate { stroke: #1a1a1a; stroke-width: 2; }
4149
- .lt-ps-entrypoint { fill: #ffffff; stroke: #1a1a1a; stroke-width: 1.6; }
4150
- .lt-ps-exitpoint { fill: #ffffff; stroke: #1a1a1a; stroke-width: 1.6; }
4141
+ .lt-ps-initial { fill: ${t.psInk}; }
4142
+ .lt-ps-final-outer { fill: ${t.stateFill}; stroke: ${t.psInk}; stroke-width: 1.6; }
4143
+ .lt-ps-final-inner { fill: ${t.psInk}; }
4144
+ .lt-ps-choice { fill: ${t.stateFill}; stroke: ${t.psInk}; stroke-width: 1.6; }
4145
+ .lt-ps-junction { fill: ${t.psInk}; }
4146
+ .lt-ps-bar { fill: ${t.psInk}; }
4147
+ .lt-ps-history-body { fill: ${t.stateFill}; stroke: ${t.psInk}; stroke-width: 1.6; }
4148
+ .lt-ps-history-text { font: 600 11px serif; fill: ${t.psInk}; }
4149
+ .lt-ps-terminate { stroke: ${t.psInk}; stroke-width: 2; }
4150
+ .lt-ps-entrypoint { fill: ${t.stateFill}; stroke: ${t.psInk}; stroke-width: 1.6; }
4151
+ .lt-ps-exitpoint { fill: ${t.stateFill}; stroke: ${t.psInk}; stroke-width: 1.6; }
4151
4152
 
4152
- .lt-transition { stroke: #2a2a2a; stroke-width: 1.4; fill: none; }
4153
- .lt-transition-label { font: 11px system-ui, sans-serif; fill: #1a1a1a; }
4154
- .lt-transition-label-bg { fill: #ffffff; opacity: 0.92; }
4153
+ .lt-transition { stroke: ${t.transitionStroke}; stroke-width: 1.4; fill: none; }
4154
+ .lt-transition-label { font: 11px system-ui, sans-serif; fill: ${t.transitionLabel}; }
4155
+ .lt-transition-label-bg { fill: ${t.labelBg}; opacity: 0.92; }
4155
4156
 
4156
- .lt-note-body { fill: #fff8c5; stroke: #b79400; stroke-width: 1; }
4157
- .lt-note-text { font: 11px system-ui, sans-serif; fill: #2a2a2a; }
4158
- .lt-note-leader { stroke: #b79400; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
4157
+ .lt-note-body { fill: ${t.noteFill}; stroke: ${t.noteStroke}; stroke-width: 1; }
4158
+ .lt-note-text { font: 11px system-ui, sans-serif; fill: ${t.noteText}; }
4159
+ .lt-note-leader { stroke: ${t.noteStroke}; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
4159
4160
 
4160
- .lt-title { font: 600 14px system-ui, sans-serif; fill: #1a1a1a; }
4161
+ .lt-title { font: 700 16px system-ui, sans-serif; fill: ${t.stateText}; }
4161
4162
  `;
4162
- function renderArrowMarker() {
4163
+ }
4164
+ function renderArrowMarker(t) {
4163
4165
  return chunk3WNW5Y7P_cjs.el(
4164
4166
  "marker",
4165
4167
  {
@@ -4171,7 +4173,7 @@ function renderArrowMarker() {
4171
4173
  orient: "auto",
4172
4174
  markerUnits: "strokeWidth"
4173
4175
  },
4174
- [chunk3WNW5Y7P_cjs.polygon({ points: "0,0 10,3 0,6", fill: "#2a2a2a" })]
4176
+ [chunk3WNW5Y7P_cjs.polygon({ points: "0,0 10,3 0,6", fill: t.transitionStroke })]
4175
4177
  );
4176
4178
  }
4177
4179
  function activityText2(a) {
@@ -4402,12 +4404,12 @@ function renderNote(n) {
4402
4404
  }
4403
4405
  return chunk3WNW5Y7P_cjs.group({ class: "lt-note", "data-target": n.note.target }, parts);
4404
4406
  }
4405
- function renderStateDiagram(ast, _config) {
4407
+ function renderStateDiagram(ast, config) {
4406
4408
  const layout = layoutStateDiagram(ast);
4407
- return renderLayout(layout);
4409
+ return renderLayout(layout, chunkNT6VVMLW_cjs.resolveStateTheme(config?.theme ?? "default"));
4408
4410
  }
4409
- function renderLayout(layout) {
4410
- const titleNode = layout.title ? chunk3WNW5Y7P_cjs.text({ x: 16, y: 22, class: "lt-title" }, layout.title) : "";
4411
+ function renderLayout(layout, t) {
4412
+ const titleNode = layout.title ? chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "lt-title", "text-anchor": "middle" }, layout.title) : "";
4411
4413
  return chunk3WNW5Y7P_cjs.svgRoot(
4412
4414
  {
4413
4415
  width: layout.width,
@@ -4419,7 +4421,7 @@ function renderLayout(layout) {
4419
4421
  [
4420
4422
  chunk3WNW5Y7P_cjs.el("title", {}, chunk3WNW5Y7P_cjs.escapeXml(`State Diagram${layout.title ? " \u2014 " + layout.title : ""}`)),
4421
4423
  chunk3WNW5Y7P_cjs.el("desc", {}, "UML 2.5 / Harel statechart rendered by Schematex"),
4422
- chunk3WNW5Y7P_cjs.defs([renderArrowMarker(), chunk3WNW5Y7P_cjs.el("style", {}, STYLE)]),
4424
+ chunk3WNW5Y7P_cjs.defs([renderArrowMarker(t), chunk3WNW5Y7P_cjs.el("style", {}, buildStyle(t))]),
4423
4425
  titleNode,
4424
4426
  // Composite clusters first so simple-state bodies sit on top.
4425
4427
  chunk3WNW5Y7P_cjs.group({ class: "lt-clusters" }, layout.clusters.map(renderComposite)),
@@ -4439,7 +4441,7 @@ var state = {
4439
4441
  parse: parseStateDiagram,
4440
4442
  render(text2, config) {
4441
4443
  const ast = parseStateDiagram(text2);
4442
- return renderStateDiagram(ast);
4444
+ return renderStateDiagram(ast, config);
4443
4445
  }
4444
4446
  };
4445
4447
 
@@ -5789,7 +5791,7 @@ function resolveAnchor(id, port, fallback, equipById, instById) {
5789
5791
  }
5790
5792
 
5791
5793
  // src/diagrams/pid/renderer.ts
5792
- var STYLE2 = `
5794
+ var STYLE = `
5793
5795
  .lt-pid-equip { fill: #ffffff; stroke: #1d1d1d; stroke-width: 1.6; }
5794
5796
  .lt-pid-equip-tag { font: 600 11px system-ui, sans-serif; fill: #1d1d1d; }
5795
5797
  .lt-pid-tray-line { stroke: #555; stroke-width: 1; fill: none; }
@@ -5815,7 +5817,7 @@ var STYLE2 = `
5815
5817
  .lt-pid-line-tag-bg { fill: #ffffff; stroke: #1d1d1d; stroke-width: 0.6; }
5816
5818
  .lt-pid-line-tag-text { font: 9px ui-monospace, monospace; fill: #1d1d1d; }
5817
5819
 
5818
- .lt-pid-title { font: 600 14px system-ui, sans-serif; fill: #1d1d1d; }
5820
+ .lt-pid-title { font: 700 16px system-ui, sans-serif; fill: #1d1d1d; }
5819
5821
 
5820
5822
  .lt-pid-unknown-box { fill: none; stroke: #c0392b; stroke-width: 1.6; stroke-dasharray: 5 3; }
5821
5823
  .lt-pid-unknown-mark { font: 700 18px system-ui, sans-serif; fill: #c0392b; }
@@ -5990,7 +5992,7 @@ function renderLayout2(layout) {
5990
5992
  }
5991
5993
  }
5992
5994
  }
5993
- const titleNode = layout.title ? chunk3WNW5Y7P_cjs.text({ x: 16, y: 22, class: "lt-pid-title" }, layout.title) : "";
5995
+ const titleNode = layout.title ? chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "lt-pid-title", "text-anchor": "middle" }, layout.title) : "";
5994
5996
  return chunk3WNW5Y7P_cjs.svgRoot(
5995
5997
  {
5996
5998
  width: layout.width,
@@ -6016,7 +6018,7 @@ function renderLayout2(layout) {
6016
6018
  },
6017
6019
  [chunk3WNW5Y7P_cjs.polygon({ points: "0,0 10,3 0,6", fill: "#1d1d1d" })]
6018
6020
  ),
6019
- chunk3WNW5Y7P_cjs.el("style", {}, STYLE2)
6021
+ chunk3WNW5Y7P_cjs.el("style", {}, STYLE)
6020
6022
  ]),
6021
6023
  titleNode,
6022
6024
  // Z-order: process pipes behind equipment; signal lines + instruments above.
@@ -7388,7 +7390,7 @@ function headerHeightFor(lineCount) {
7388
7390
  function buildCss3(t) {
7389
7391
  return `
7390
7392
  .prisma { font-family: system-ui, -apple-system, sans-serif; }
7391
- .prisma-title { font: 600 17px sans-serif; fill: ${t.text}; }
7393
+ .prisma-title { font: 700 16px sans-serif; fill: ${t.text}; }
7392
7394
  .prisma-subtitle { font: 400 12px sans-serif; fill: ${t.textMuted}; }
7393
7395
 
7394
7396
  .prisma-stage { stroke-width: 1.1; stroke: #90a4ae; }
@@ -7607,7 +7609,7 @@ function approxLineWidth(line2) {
7607
7609
  return line2.text.length * charW;
7608
7610
  }
7609
7611
  function renderPrismaLayout(layout, config) {
7610
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
7612
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
7611
7613
  const children = [];
7612
7614
  children.push(chunk3WNW5Y7P_cjs.title(layout.title ?? "PRISMA 2020 flow diagram"));
7613
7615
  children.push(
@@ -8271,7 +8273,7 @@ function ellipsePerimeterPoint(cx, cy, rx, ry, tx, ty) {
8271
8273
  function isWideGlyph(cp) {
8272
8274
  return cp >= 12288 && cp <= 40959 || cp >= 44032 && cp <= 55203 || cp >= 65280 && cp <= 65519;
8273
8275
  }
8274
- function estimateTextWidth(s, charW) {
8276
+ function estimateTextWidth2(s, charW) {
8275
8277
  let w = 0;
8276
8278
  for (const ch of s) {
8277
8279
  w += isWideGlyph(ch.codePointAt(0) ?? 0) ? charW * 1.7 : charW;
@@ -8280,10 +8282,10 @@ function estimateTextWidth(s, charW) {
8280
8282
  }
8281
8283
  function sizeEllipse(uc) {
8282
8284
  const C2 = USECASE_CONST;
8283
- const nameW = estimateTextWidth(uc.name, C2.CHAR_W_NAME);
8285
+ const nameW = estimateTextWidth2(uc.name, C2.CHAR_W_NAME);
8284
8286
  let widest = nameW;
8285
8287
  if (uc.stereotype) {
8286
- widest = Math.max(widest, estimateTextWidth(`\xAB${uc.stereotype}\xBB`, C2.CHAR_W_EXT));
8288
+ widest = Math.max(widest, estimateTextWidth2(`\xAB${uc.stereotype}\xBB`, C2.CHAR_W_EXT));
8287
8289
  }
8288
8290
  let stack = 0;
8289
8291
  if (uc.stereotype) stack += C2.STEREO_LH;
@@ -8293,9 +8295,9 @@ function sizeEllipse(uc) {
8293
8295
  stack += 8;
8294
8296
  stack += C2.EXTPOINT_LH;
8295
8297
  stack += uc.extensionPoints.length * C2.EXTPOINT_LH;
8296
- widest = Math.max(widest, estimateTextWidth(C2.EXT_HEADER, C2.CHAR_W_EXT));
8298
+ widest = Math.max(widest, estimateTextWidth2(C2.EXT_HEADER, C2.CHAR_W_EXT));
8297
8299
  for (const ep of uc.extensionPoints) {
8298
- widest = Math.max(widest, estimateTextWidth(ep, C2.CHAR_W_EXT) + 16);
8300
+ widest = Math.max(widest, estimateTextWidth2(ep, C2.CHAR_W_EXT) + 16);
8299
8301
  }
8300
8302
  }
8301
8303
  const rx = Math.max(C2.MIN_RX, widest / 2 * Math.SQRT2 + C2.ELLIPSE_PAD_X);
@@ -8551,7 +8553,7 @@ function layoutUsecase(ast) {
8551
8553
  let right = b.x + b.width;
8552
8554
  const isRect = b.actor.kind === "external" || b.actor.kind === "system";
8553
8555
  if (!isRect) {
8554
- const labelW = estimateTextWidth(b.actor.name, 6.4);
8556
+ const labelW = estimateTextWidth2(b.actor.name, 6.4);
8555
8557
  const cx = b.x + b.width / 2;
8556
8558
  left = Math.min(left, cx - labelW / 2);
8557
8559
  right = Math.max(right, cx + labelW / 2);
@@ -9078,7 +9080,7 @@ function renderTree(tr) {
9078
9080
  );
9079
9081
  }
9080
9082
  function renderUsecaseLayout(layout, config) {
9081
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
9083
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
9082
9084
  const children = [];
9083
9085
  const nInclude = layout.ast.relations.filter((r6) => r6.kind === "include").length;
9084
9086
  const nExtend = layout.ast.relations.filter((r6) => r6.kind === "extend").length;
@@ -10867,7 +10869,7 @@ function summaryText(summary) {
10867
10869
  return { plain, critPath };
10868
10870
  }
10869
10871
  function renderPertLayout(layout, config) {
10870
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
10872
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
10871
10873
  const children = [];
10872
10874
  const cp = layout.summary.criticalPath;
10873
10875
  children.push(chunk3WNW5Y7P_cjs.title(`PERT network${layout.title ? " \u2014 " + layout.title : ""}`));
@@ -12076,7 +12078,7 @@ function renderDestroy(d) {
12076
12078
  ]);
12077
12079
  }
12078
12080
  function renderSequenceLayout(layout, config) {
12079
- const t = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
12081
+ const t = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
12080
12082
  const children = [];
12081
12083
  const nMsg = layout.messages.length;
12082
12084
  const nFrag = layout.fragments.length;
@@ -12931,7 +12933,7 @@ function renderArc2(ag) {
12931
12933
  );
12932
12934
  }
12933
12935
  function renderPetriLayout(layout, config) {
12934
- const t = chunkNZT5P2XZ_cjs.resolvePetriTheme(config?.theme ?? "default");
12936
+ const t = chunkNT6VVMLW_cjs.resolvePetriTheme(config?.theme ?? "default");
12935
12937
  const children = [];
12936
12938
  const marking = layout.places.filter((p) => p.tokens > 0).map((p) => `${p.place.id}:${p.tokens}`).join(", ");
12937
12939
  const descParts = [
@@ -13516,6 +13518,7 @@ var DET = "sx-net-detail";
13516
13518
  var GLY = "sx-net-glyph";
13517
13519
  var GLYL = "sx-net-glyph-line";
13518
13520
  var ITX = "sx-net-icontext";
13521
+ var ITAG = "sx-net-icontag";
13519
13522
  var CLOUD = "sx-net-cloud-body";
13520
13523
  var CTX = "sx-net-cloudtext";
13521
13524
  var r2 = (n) => Math.round(n * 100) / 100;
@@ -13559,7 +13562,7 @@ function switchBox(b, glyph) {
13559
13562
  }
13560
13563
  function poeSwitch(b) {
13561
13564
  const cx = b.x + b.w / 2;
13562
- return chunk3WNW5Y7P_cjs.group({}, [switchBox(b, "straight"), chunk3WNW5Y7P_cjs.text({ class: ITX, x: r2(cx), y: r2(b.y + b.h * 0.78 + 8), "text-anchor": "middle" }, "PoE")]);
13565
+ return chunk3WNW5Y7P_cjs.group({}, [switchBox(b, "straight"), chunk3WNW5Y7P_cjs.text({ class: ITAG, x: r2(cx), y: r2(b.y + b.h * 0.78 + 8), "text-anchor": "middle" }, "PoE")]);
13563
13566
  }
13564
13567
  function firewall(b) {
13565
13568
  const cx = b.x + b.w / 2, cy = b.y + b.h / 2;
@@ -13614,7 +13617,7 @@ function serverFarm(b, d) {
13614
13617
  for (let i = 2; i >= 0; i--) {
13615
13618
  parts.push(server({ x: b.x + i * off, y: b.y - i * off * 0.5, w: b.w - 2 * off, h: b.h - off }));
13616
13619
  }
13617
- if (d.count) parts.push(chunk3WNW5Y7P_cjs.text({ class: ITX, x: r2(b.x + b.w - 6), y: r2(b.y + b.h - 2), "text-anchor": "end" }, `\xD7${d.count}`));
13620
+ if (d.count) parts.push(chunk3WNW5Y7P_cjs.text({ class: ITAG, x: r2(b.x + b.w - 6), y: r2(b.y + b.h - 2), "text-anchor": "end" }, `\xD7${d.count}`));
13618
13621
  return chunk3WNW5Y7P_cjs.group({}, parts);
13619
13622
  }
13620
13623
  function pc(b) {
@@ -13752,9 +13755,9 @@ function drawDeviceIcon(d, b) {
13752
13755
  case "router":
13753
13756
  return router(b);
13754
13757
  case "gateway":
13755
- return chunk3WNW5Y7P_cjs.group({}, [router(b), chunk3WNW5Y7P_cjs.text({ class: ITX, x: r2(b.x + b.w / 2), y: r2(b.y + b.h - 1), "text-anchor": "middle" }, "GW")]);
13758
+ return chunk3WNW5Y7P_cjs.group({}, [router(b), chunk3WNW5Y7P_cjs.text({ class: ITAG, x: r2(b.x + b.w / 2), y: r2(b.y + b.h - 1), "text-anchor": "middle" }, "GW")]);
13756
13759
  case "vpngw":
13757
- return chunk3WNW5Y7P_cjs.group({}, [router(b), chunk3WNW5Y7P_cjs.text({ class: ITX, x: r2(b.x + b.w / 2), y: r2(b.y + b.h - 1), "text-anchor": "middle" }, "VPN")]);
13760
+ return chunk3WNW5Y7P_cjs.group({}, [router(b), chunk3WNW5Y7P_cjs.text({ class: ITAG, x: r2(b.x + b.w / 2), y: r2(b.y + b.h - 1), "text-anchor": "middle" }, "VPN")]);
13758
13761
  case "switch":
13759
13762
  return switchBox(b, "straight");
13760
13763
  case "l3switch":
@@ -14234,16 +14237,54 @@ function layoutNetwork2(ast) {
14234
14237
  depth: gb.depth
14235
14238
  });
14236
14239
  }
14240
+ const labelClearsDevices = (x, y, halfW) => {
14241
+ const margin = 6;
14242
+ for (const b of boxes) {
14243
+ const e = effBox(b);
14244
+ if (x + halfW >= e.left - margin && x - halfW <= e.right + margin && y + 5 >= e.top - margin && y - 5 <= e.bottom + margin) {
14245
+ return false;
14246
+ }
14247
+ }
14248
+ return true;
14249
+ };
14250
+ const placedLabels = [];
14251
+ const labelClearsPlaced = (x, y) => placedLabels.every((p) => Math.abs(p.x - x) > 90 || Math.abs(p.y - y) > 16);
14237
14252
  const linkGeoms = links.map((link) => {
14238
14253
  const a = boxById.get(link.from);
14239
14254
  const b = boxById.get(link.to);
14240
14255
  const p1 = edgePoint(a, b.cx, b.cy);
14241
14256
  const p2 = edgePoint(b, a.cx, a.cy);
14257
+ const hasAnnotation = Boolean(
14258
+ link.label || link.speed || link.mode || link.vlans && link.vlans.length
14259
+ );
14260
+ let labelT = 0.5;
14261
+ if (hasAnnotation) {
14262
+ const annLen = (link.mode ? link.mode.length + 3 : 0) + (link.vlans && link.vlans.length ? 6 + link.vlans.join(",").length + 3 : 0) + (link.speed ? link.speed.length + 3 : 0) + (link.label ? link.label.length : 0);
14263
+ const halfW = annLen * 5.4 / 2;
14264
+ const candidates = [0.5, 0.38, 0.62, 0.28, 0.72, 0.2, 0.8, 0.14, 0.86];
14265
+ const at = (t) => ({
14266
+ x: p1.x + (p2.x - p1.x) * t,
14267
+ y: p1.y + (p2.y - p1.y) * t
14268
+ });
14269
+ const strict = candidates.find((t) => {
14270
+ const p = at(t);
14271
+ return labelClearsDevices(p.x, p.y, halfW) && labelClearsPlaced(p.x, p.y);
14272
+ });
14273
+ const relaxed = strict ?? candidates.find((t) => {
14274
+ const p = at(t);
14275
+ return labelClearsDevices(p.x, p.y, halfW);
14276
+ });
14277
+ labelT = relaxed ?? 0.5;
14278
+ placedLabels.push({
14279
+ x: p1.x + (p2.x - p1.x) * labelT,
14280
+ y: p1.y + (p2.y - p1.y) * labelT
14281
+ });
14282
+ }
14242
14283
  return {
14243
14284
  link,
14244
14285
  points: [p1, p2],
14245
- labelX: (p1.x + p2.x) / 2,
14246
- labelY: (p1.y + p2.y) / 2
14286
+ labelX: p1.x + (p2.x - p1.x) * labelT,
14287
+ labelY: p1.y + (p2.y - p1.y) * labelT
14247
14288
  };
14248
14289
  });
14249
14290
  const width = maxX - minX + 2 * NET_CONST.PAD;
@@ -14271,11 +14312,12 @@ function buildCss8(t) {
14271
14312
  .sx-net-glyph { fill: ${t.deviceAccent}; stroke: none; }
14272
14313
  .sx-net-glyph-line { fill: none; stroke: ${t.deviceAccent}; stroke-width: 1.4; }
14273
14314
  .sx-net-icontext { font: 700 8px sans-serif; fill: ${t.deviceAccent}; }
14315
+ .sx-net-icontag { font: 700 8px sans-serif; fill: ${t.subLabel}; paint-order: stroke; stroke: ${t.bg}; stroke-width: 2.5px; stroke-linejoin: round; }
14274
14316
  .sx-net-cloud-body { fill: ${t.cloudFill}; stroke: ${t.cloudStroke}; stroke-width: 2; }
14275
14317
  .sx-net-cloudtext { font: 600 13px sans-serif; fill: ${t.text}; }
14276
14318
  .sx-net-bus { stroke: ${t.deviceStroke}; stroke-width: 4; stroke-linecap: round; }
14277
- .sx-net-label { font: 12px sans-serif; fill: ${t.label}; }
14278
- .sx-net-sublabel { font: 10px sans-serif; fill: ${t.subLabel}; }
14319
+ .sx-net-label { font: 12px sans-serif; fill: ${t.label}; paint-order: stroke; stroke: ${t.bg}; stroke-width: 3px; stroke-linejoin: round; }
14320
+ .sx-net-sublabel { font: 10px sans-serif; fill: ${t.subLabel}; paint-order: stroke; stroke: ${t.bg}; stroke-width: 3px; stroke-linejoin: round; }
14279
14321
  .sx-net-link { fill: none; stroke-width: 2; }
14280
14322
  .sx-net-link-wireless, .sx-net-link-vpn { stroke-dasharray: 5 4; }
14281
14323
  .sx-net-link-lag { stroke-width: 3; }
@@ -14408,7 +14450,7 @@ function renderDevice(b, t) {
14408
14450
  return chunk3WNW5Y7P_cjs.group(attrs, parts);
14409
14451
  }
14410
14452
  function renderNetworkLayout(layout, config) {
14411
- const t = chunkNZT5P2XZ_cjs.resolveNetworkTheme(config?.theme ?? "default");
14453
+ const t = chunkNT6VVMLW_cjs.resolveNetworkTheme(config?.theme ?? "default");
14412
14454
  const children = [];
14413
14455
  const counts = /* @__PURE__ */ new Map();
14414
14456
  for (const b of layout.devices) counts.set(b.device.kind, (counts.get(b.device.kind) ?? 0) + 1);
@@ -16178,8 +16220,8 @@ function renderUmlClass(text2, config) {
16178
16220
  return renderUmlClassLayout(layout, config);
16179
16221
  }
16180
16222
  function renderUmlClassLayout(layout, config) {
16181
- const theme = chunkNZT5P2XZ_cjs.resolveUmlClassTheme(config?.theme ?? "default");
16182
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
16223
+ const theme = chunkNT6VVMLW_cjs.resolveUmlClassTheme(config?.theme ?? "default");
16224
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
16183
16225
  const pad = config?.padding ?? 0;
16184
16226
  const width = layout.width + pad * 2;
16185
16227
  const height = layout.height + pad * 2;
@@ -16194,25 +16236,25 @@ function renderUmlClassLayout(layout, config) {
16194
16236
  .sx-umlclass-box-stroke { stroke: ${theme.classifierStroke}; stroke-width: ${BOX_STROKE_W}; fill: none; }
16195
16237
  .sx-umlclass-header-fill { fill: ${theme.headerFill}; }
16196
16238
  .sx-umlclass-divider { stroke: ${theme.classifierStroke}; stroke-width: ${DIVIDER_STROKE_W}; }
16197
- .sx-umlclass-classname { fill: ${theme.nameText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label + 1}px; font-weight: 700; letter-spacing: -0.01em; }
16239
+ .sx-umlclass-classname { fill: ${theme.nameText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 1}px; font-weight: 700; letter-spacing: -0.01em; }
16198
16240
  .sx-umlclass-classname[data-abstract="true"] { font-style: italic; }
16199
- .sx-umlclass-stereotype { fill: ${theme.stereotypeText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
16200
- .sx-umlclass-member { fill: ${theme.memberText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 500; }
16241
+ .sx-umlclass-stereotype { fill: ${theme.stereotypeText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
16242
+ .sx-umlclass-member { fill: ${theme.memberText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 500; }
16201
16243
  .sx-umlclass-member[data-static] { text-decoration: underline; }
16202
16244
  .sx-umlclass-member[data-abstract] { font-style: italic; }
16203
- .sx-umlclass-visibility { fill: ${theme.visibilityText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 500; }
16245
+ .sx-umlclass-visibility { fill: ${theme.visibilityText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 500; }
16204
16246
  .sx-umlclass-rel-line { stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; fill: none; }
16205
16247
  .sx-umlclass-rel-line[data-dashed="true"] { stroke-dasharray: 5 4; }
16206
16248
  .sx-umlclass-triangle { fill: ${theme.adornmentHollowFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16207
16249
  .sx-umlclass-diamond-hollow { fill: ${theme.adornmentHollowFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16208
16250
  .sx-umlclass-diamond-filled { fill: ${theme.adornmentFill}; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16209
16251
  .sx-umlclass-arrowhead { fill: none; stroke: ${theme.relationStroke}; stroke-width: ${REL_STROKE_W}; stroke-linejoin: miter; }
16210
- .sx-umlclass-edge-label { fill: ${theme.edgeLabel}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 500; }
16211
- .sx-umlclass-edge-name { fill: ${theme.edgeLabel}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-style: italic; }
16252
+ .sx-umlclass-edge-label { fill: ${theme.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 500; }
16253
+ .sx-umlclass-edge-name { fill: ${theme.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-style: italic; }
16212
16254
  .sx-umlclass-edge-name-halo { fill: ${theme.bg}; stroke: ${theme.bg}; stroke-width: ${UMLCLASS_CONST.EDGE_LABEL_HALO}; stroke-linejoin: round; }
16213
- .sx-umlclass-title { fill: ${theme.nameText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 600; }
16255
+ .sx-umlclass-title { fill: ${theme.nameText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
16214
16256
  .sx-umlclass-package { fill: ${theme.packageFill}; stroke: ${theme.packageStroke}; stroke-width: 1; }
16215
- .sx-umlclass-package-label { fill: ${theme.packageLabel}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
16257
+ .sx-umlclass-package-label { fill: ${theme.packageLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
16216
16258
  `.trim()
16217
16259
  );
16218
16260
  const children = [
@@ -17548,8 +17590,8 @@ function renderFaultTree(text2, config) {
17548
17590
  return renderFaultTreeLayout(layout, config);
17549
17591
  }
17550
17592
  function renderFaultTreeLayout(layout, config) {
17551
- const theme = chunkNZT5P2XZ_cjs.resolveReliabilityTheme(config?.theme ?? "default");
17552
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
17593
+ const theme = chunkNT6VVMLW_cjs.resolveReliabilityTheme(config?.theme ?? "default");
17594
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
17553
17595
  const pad = config?.padding ?? 0;
17554
17596
  const { ast, analysis } = layout;
17555
17597
  const showProb = ast.analysis.probability;
@@ -17561,27 +17603,27 @@ function renderFaultTreeLayout(layout, config) {
17561
17603
  {},
17562
17604
  `
17563
17605
  .sx-ft-bg { fill: ${theme.bg}; }
17564
- .sx-ft-event { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17606
+ .sx-ft-event { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17565
17607
  .sx-ft-event[data-role="top"] { stroke: ${theme.topEventStroke}; stroke-width: 2.25; }
17566
- .sx-ft-basic { fill: ${theme.basicFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17567
- .sx-ft-undeveloped { fill: ${theme.undevelopedFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17568
- .sx-ft-house { fill: ${theme.houseFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17569
- .sx-ft-gate { fill: ${theme.gateFill}; stroke: ${theme.gateStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
17570
- .sx-ft-cond { fill: ${theme.conditionFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
17571
- .sx-ft-pin, .sx-ft-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17572
- .sx-ft-shared-mark { fill: none; stroke: ${theme.basicStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17573
- .sx-ft-label { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
17574
- .sx-ft-id { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
17575
- .sx-ft-cap { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
17576
- .sx-ft-prob { fill: ${theme.probText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 600; }
17577
- .sx-ft-gate-label { fill: ${theme.gateStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
17578
- .sx-ft-cond-text { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
17579
- .sx-ft-cutset { fill: ${theme.cutsetFill}; stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17580
- .sx-ft-cutset[data-spof="true"] { stroke: ${theme.spofStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
17581
- .sx-ft-ptop { fill: ${theme.probText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 700; }
17582
- .sx-ft-transfer { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
17583
- .sx-ft-transfer-label { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 600; }
17584
- .sx-ft-title { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
17608
+ .sx-ft-basic { fill: ${theme.basicFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17609
+ .sx-ft-undeveloped { fill: ${theme.undevelopedFill}; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17610
+ .sx-ft-house { fill: ${theme.houseFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17611
+ .sx-ft-gate { fill: ${theme.gateFill}; stroke: ${theme.gateStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
17612
+ .sx-ft-cond { fill: ${theme.conditionFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
17613
+ .sx-ft-pin, .sx-ft-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17614
+ .sx-ft-shared-mark { fill: none; stroke: ${theme.basicStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17615
+ .sx-ft-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
17616
+ .sx-ft-id { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
17617
+ .sx-ft-cap { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
17618
+ .sx-ft-prob { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
17619
+ .sx-ft-gate-label { fill: ${theme.gateStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
17620
+ .sx-ft-cond-text { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
17621
+ .sx-ft-cutset { fill: ${theme.cutsetFill}; stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17622
+ .sx-ft-cutset[data-spof="true"] { stroke: ${theme.spofStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
17623
+ .sx-ft-ptop { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
17624
+ .sx-ft-transfer { fill: ${theme.eventFill}; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
17625
+ .sx-ft-transfer-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
17626
+ .sx-ft-title { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
17585
17627
  `.trim()
17586
17628
  );
17587
17629
  const instById = new Map(layout.events.map((e) => [e.instanceId, e]));
@@ -17594,7 +17636,7 @@ function renderFaultTreeLayout(layout, config) {
17594
17636
  const inner = [];
17595
17637
  if (ast.title) {
17596
17638
  inner.push(
17597
- chunk3WNW5Y7P_cjs.text({ x: FAULTTREE_CONST.CANVAS_PAD, y: 22, class: "sx-ft-title", "font-family": fontFamily }, ast.title)
17639
+ chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "sx-ft-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title)
17598
17640
  );
17599
17641
  }
17600
17642
  for (const box of layout.cutSetBoxes) {
@@ -18252,8 +18294,8 @@ function renderBowtie(text2, config) {
18252
18294
  }
18253
18295
  function renderBowtieLayout(layout, config) {
18254
18296
  const themeName = config?.theme ?? "default";
18255
- const theme = chunkNZT5P2XZ_cjs.resolveBowtieTheme(themeName);
18256
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
18297
+ const theme = chunkNT6VVMLW_cjs.resolveBowtieTheme(themeName);
18298
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
18257
18299
  const pad = config?.padding ?? 0;
18258
18300
  const { ast, topEvent } = layout;
18259
18301
  const mono = themeName === "monochrome";
@@ -18265,22 +18307,22 @@ function renderBowtieLayout(layout, config) {
18265
18307
  {},
18266
18308
  `
18267
18309
  .sx-bowtie-bg { fill: ${theme.bg}; }
18268
- .sx-bowtie-line { fill: none; stroke: ${theme.lineStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18310
+ .sx-bowtie-line { fill: none; stroke: ${theme.lineStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18269
18311
  .sx-bowtie-arrow { fill: ${theme.lineStroke}; stroke: none; }
18270
- .sx-bowtie-escalation-line { fill: none; stroke: ${theme.escalationLineStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin};${mono ? " stroke-dasharray: 4 3;" : ""} }
18271
- .sx-bowtie-hazard { fill: ${theme.hazardFill}; stroke: ${theme.hazardStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18272
- .sx-bowtie-topevent { fill: ${theme.topEventFill}; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
18273
- .sx-bowtie-topevent-ring { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
18274
- .sx-bowtie-threat { fill: ${theme.threatFill}; stroke: ${theme.threatStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18275
- .sx-bowtie-barrier { fill: ${theme.barrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18276
- .sx-bowtie-consequence { fill: ${theme.consequenceFill}; stroke: ${theme.consequenceStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18277
- .sx-bowtie-escalation { fill: ${theme.escalationFill}; stroke: ${theme.escalationStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal};${mono ? " stroke-dasharray: 5 3;" : ""} }
18278
- .sx-bowtie-ef-barrier { fill: ${theme.efBarrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18279
- .sx-bowtie-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; }
18280
- .sx-bowtie-elabel { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
18312
+ .sx-bowtie-escalation-line { fill: none; stroke: ${theme.escalationLineStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin};${mono ? " stroke-dasharray: 4 3;" : ""} }
18313
+ .sx-bowtie-hazard { fill: ${theme.hazardFill}; stroke: ${theme.hazardStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18314
+ .sx-bowtie-topevent { fill: ${theme.topEventFill}; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18315
+ .sx-bowtie-topevent-ring { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
18316
+ .sx-bowtie-threat { fill: ${theme.threatFill}; stroke: ${theme.threatStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18317
+ .sx-bowtie-barrier { fill: ${theme.barrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18318
+ .sx-bowtie-consequence { fill: ${theme.consequenceFill}; stroke: ${theme.consequenceStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18319
+ .sx-bowtie-escalation { fill: ${theme.escalationFill}; stroke: ${theme.escalationStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal};${mono ? " stroke-dasharray: 5 3;" : ""} }
18320
+ .sx-bowtie-ef-barrier { fill: ${theme.efBarrierFill}; stroke: ${theme.barrierStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18321
+ .sx-bowtie-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; }
18322
+ .sx-bowtie-elabel { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18281
18323
  .sx-bowtie-topevent-label { fill: ${theme.labelText}; stroke: none; font-size: 11px; font-weight: 700; }
18282
- .sx-bowtie-title { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
18283
- .sx-bowtie-legend-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
18324
+ .sx-bowtie-title { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
18325
+ .sx-bowtie-legend-label { fill: ${theme.labelText}; stroke: none; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18284
18326
  `.trim()
18285
18327
  );
18286
18328
  const children = [
@@ -18291,7 +18333,7 @@ function renderBowtieLayout(layout, config) {
18291
18333
  ];
18292
18334
  const inner = [];
18293
18335
  if (ast.title) {
18294
- inner.push(chunk3WNW5Y7P_cjs.text({ x: BOWTIE_CONST.PAGE_PAD, y: BOWTIE_CONST.PAGE_PAD + 6, class: "sx-bowtie-title", "font-family": fontFamily }, ast.title));
18336
+ inner.push(chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: BOWTIE_CONST.PAGE_PAD + 6, class: "sx-bowtie-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title));
18295
18337
  }
18296
18338
  if (layout.hazardTie) {
18297
18339
  inner.push(chunk3WNW5Y7P_cjs.line({ x1: layout.hazardTie.x, y1: layout.hazardTie.y1, x2: layout.hazardTie.x, y2: layout.hazardTie.y2, class: "sx-bowtie-line" }));
@@ -18878,8 +18920,8 @@ function renderEventTree(text2, config) {
18878
18920
  return renderEventTreeLayout(layout, config);
18879
18921
  }
18880
18922
  function renderEventTreeLayout(layout, config) {
18881
- const theme = chunkNZT5P2XZ_cjs.resolveReliabilityTheme(config?.theme ?? "default");
18882
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
18923
+ const theme = chunkNT6VVMLW_cjs.resolveReliabilityTheme(config?.theme ?? "default");
18924
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
18883
18925
  const pad = config?.padding ?? 0;
18884
18926
  const { ast } = layout;
18885
18927
  const width = layout.width + pad * 2;
@@ -18890,22 +18932,22 @@ function renderEventTreeLayout(layout, config) {
18890
18932
  {},
18891
18933
  `
18892
18934
  .sx-et-bg { fill: ${theme.bg}; }
18893
- .sx-et-title { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
18894
- .sx-et-header { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 700; }
18895
- .sx-et-grid { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 4; opacity: 0.5; }
18896
- .sx-et-headrule { fill: none; stroke: ${theme.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
18897
- .sx-et-ie { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
18898
- .sx-et-ie-label { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
18899
- .sx-et-ie-freq { fill: ${theme.probText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 600; }
18900
- .sx-et-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
18935
+ .sx-et-title { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
18936
+ .sx-et-header { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
18937
+ .sx-et-grid { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 4; opacity: 0.5; }
18938
+ .sx-et-headrule { fill: none; stroke: ${theme.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
18939
+ .sx-et-ie { fill: none; stroke: ${theme.topEventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18940
+ .sx-et-ie-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
18941
+ .sx-et-ie-freq { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 600; }
18942
+ .sx-et-edge { fill: none; stroke: ${theme.edgeStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
18901
18943
  .sx-et-edge[data-leg="s"] {}
18902
- .sx-et-leg-label { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
18903
- .sx-et-leg-prob { fill: ${theme.probText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
18904
- .sx-et-outcome { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
18905
- .sx-et-freq { fill: ${theme.probText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
18906
- .sx-et-seqid { fill: ${theme.eventStroke}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; opacity: 0.7; }
18944
+ .sx-et-leg-label { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18945
+ .sx-et-leg-prob { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
18946
+ .sx-et-outcome { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
18947
+ .sx-et-freq { fill: ${theme.probText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
18948
+ .sx-et-seqid { fill: ${theme.eventStroke}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; opacity: 0.7; }
18907
18949
  .sx-et-dot { fill: ${theme.basicStroke}; stroke: none; }
18908
- .sx-et-edge[data-dominant="true"] { stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
18950
+ .sx-et-edge[data-dominant="true"] { stroke: ${theme.cutsetStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
18909
18951
  .sx-et-outcome[data-dominant="true"] { fill: ${theme.spofStroke}; }
18910
18952
  .sx-et-freq[data-dominant="true"] { fill: ${theme.spofStroke}; font-weight: 700; }
18911
18953
  .sx-et-dot[data-dominant="true"] { fill: ${theme.spofStroke}; }
@@ -18919,7 +18961,7 @@ function renderEventTreeLayout(layout, config) {
18919
18961
  ];
18920
18962
  const inner = [];
18921
18963
  if (ast.title) {
18922
- inner.push(chunk3WNW5Y7P_cjs.text({ x: EVENTTREE_CONST.CANVAS_PAD, y: EVENTTREE_CONST.CANVAS_PAD + 4, class: "sx-et-title", "font-family": fontFamily }, ast.title));
18964
+ inner.push(chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: EVENTTREE_CONST.CANVAS_PAD + 4, class: "sx-et-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title));
18923
18965
  }
18924
18966
  for (const h of layout.headers) {
18925
18967
  inner.push(
@@ -19982,7 +20024,7 @@ function renderFmea(text2, config) {
19982
20024
  }
19983
20025
  function renderFmeaLayout(layout, config) {
19984
20026
  const p = resolvePalette(config?.theme ?? "default");
19985
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
20027
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
19986
20028
  const pad = config?.padding ?? 0;
19987
20029
  const { ast, analysis } = layout;
19988
20030
  const width = layout.width + pad * 2;
@@ -20113,7 +20155,7 @@ function renderHeaderBlock(layout) {
20113
20155
  const x0 = FMEA_CONST.CANVAS_PAD;
20114
20156
  let y = FMEA_CONST.CANVAS_PAD + 14;
20115
20157
  if (ast.title) {
20116
- out.push(chunk3WNW5Y7P_cjs.text({ x: x0, y, class: "sx-fmea-title" }, ast.title));
20158
+ out.push(chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y, class: "sx-fmea-title", "text-anchor": "middle" }, ast.title));
20117
20159
  y += FMEA_CONST.TITLE_H - 8;
20118
20160
  }
20119
20161
  const metaEntries = Object.entries(ast.metadata);
@@ -20163,25 +20205,25 @@ function buildCss9(p) {
20163
20205
  const isMono = p === PALETTE_MONO;
20164
20206
  return `
20165
20207
  .sx-fmea-bg { fill: ${p.bg}; }
20166
- .sx-fmea-border { fill: none; stroke: ${p.border}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
20167
- .sx-fmea-cell { fill: ${p.bg}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20208
+ .sx-fmea-border { fill: none; stroke: ${p.border}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20209
+ .sx-fmea-cell { fill: ${p.bg}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20168
20210
  .sx-fmea-cell-alt { fill: ${p.cellAltFill}; }
20169
- .sx-fmea-headcell { fill: ${p.headerFill}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20170
- .sx-fmea-band { fill: ${p.bandFill}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20171
- .sx-fmea-band-text { fill: ${p.bandText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 700; letter-spacing: 0.06em; }
20172
- .sx-fmea-headtext { fill: ${p.headerText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
20173
- .sx-fmea-text { fill: ${p.cellText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; }
20174
- .sx-fmea-risk-text { fill: ${p.riskText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 700; }
20175
- .sx-fmea-title { fill: ${p.cellText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
20176
- .sx-fmea-meta { fill: ${p.metaText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; }
20177
- .sx-fmea-legend { fill: ${p.metaText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
20178
- .sx-fmea-rpn-high { fill: ${p.rpnHigh}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20179
- .sx-fmea-rpn-mid { fill: ${p.rpnMid}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20180
- .sx-fmea-rpn-low { fill: ${p.rpnLow}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20181
- .sx-fmea-ap-high { fill: ${p.apHigh}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20182
- .sx-fmea-ap-mid { fill: ${p.apMid}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20183
- .sx-fmea-ap-low { fill: ${p.apLow}; stroke: ${p.grid}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
20184
- .sx-fmea-flag { fill: none; stroke: ${p.flagStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; ${isMono ? "stroke-dasharray: 4 2;" : ""} }
20211
+ .sx-fmea-headcell { fill: ${p.headerFill}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20212
+ .sx-fmea-band { fill: ${p.bandFill}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20213
+ .sx-fmea-band-text { fill: ${p.bandText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; letter-spacing: 0.06em; }
20214
+ .sx-fmea-headtext { fill: ${p.headerText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
20215
+ .sx-fmea-text { fill: ${p.cellText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
20216
+ .sx-fmea-risk-text { fill: ${p.riskText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
20217
+ .sx-fmea-title { fill: ${p.cellText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
20218
+ .sx-fmea-meta { fill: ${p.metaText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
20219
+ .sx-fmea-legend { fill: ${p.metaText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
20220
+ .sx-fmea-rpn-high { fill: ${p.rpnHigh}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20221
+ .sx-fmea-rpn-mid { fill: ${p.rpnMid}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20222
+ .sx-fmea-rpn-low { fill: ${p.rpnLow}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20223
+ .sx-fmea-ap-high { fill: ${p.apHigh}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20224
+ .sx-fmea-ap-mid { fill: ${p.apMid}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20225
+ .sx-fmea-ap-low { fill: ${p.apLow}; stroke: ${p.grid}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
20226
+ .sx-fmea-flag { fill: none; stroke: ${p.flagStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; ${isMono ? "stroke-dasharray: 4 2;" : ""} }
20185
20227
  `.trim();
20186
20228
  }
20187
20229
 
@@ -20862,7 +20904,7 @@ function renderCausalLoop(text2, config) {
20862
20904
  }
20863
20905
  function renderCausalLoopLayout(layout, config) {
20864
20906
  const theme = resolveTokens(config?.theme ?? "default");
20865
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
20907
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
20866
20908
  const pad = config?.padding ?? 0;
20867
20909
  const { ast } = layout;
20868
20910
  const width = layout.width + pad * 2;
@@ -20873,17 +20915,17 @@ function renderCausalLoopLayout(layout, config) {
20873
20915
  {},
20874
20916
  `
20875
20917
  .sx-cld-bg { fill: ${theme.bg}; }
20876
- .sx-cld-link { fill: none; stroke: ${theme.ink}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
20918
+ .sx-cld-link { fill: none; stroke: ${theme.ink}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20877
20919
  .sx-cld-arrow { fill: ${theme.ink}; stroke: none; }
20878
- .sx-cld-var { fill: ${theme.ink}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label + 1}px; font-weight: 600; }
20879
- .sx-cld-polarity { fill: ${theme.ink}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label + 2}px; font-weight: 700; }
20880
- .sx-cld-link-label { fill: ${theme.ink}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
20881
- .sx-cld-delay { stroke: ${theme.delay}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
20882
- .sx-cld-glyph { fill: none; stroke: ${theme.accent}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
20920
+ .sx-cld-var { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 1}px; font-weight: 600; }
20921
+ .sx-cld-polarity { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label + 2}px; font-weight: 700; }
20922
+ .sx-cld-link-label { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
20923
+ .sx-cld-delay { stroke: ${theme.delay}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20924
+ .sx-cld-glyph { fill: none; stroke: ${theme.accent}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
20883
20925
  .sx-cld-glyph-head { fill: ${theme.accent}; stroke: none; }
20884
- .sx-cld-glyph-label { fill: ${theme.accent}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 700; }
20885
- .sx-cld-glyph-phrase { fill: ${theme.accent}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
20886
- .sx-cld-title { fill: ${theme.ink}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
20926
+ .sx-cld-glyph-label { fill: ${theme.accent}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }
20927
+ .sx-cld-glyph-phrase { fill: ${theme.accent}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-style: italic; }
20928
+ .sx-cld-title { fill: ${theme.ink}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
20887
20929
  `.trim()
20888
20930
  );
20889
20931
  const children = [
@@ -20896,7 +20938,7 @@ function renderCausalLoopLayout(layout, config) {
20896
20938
  if (ast.title) {
20897
20939
  inner.push(
20898
20940
  chunk3WNW5Y7P_cjs.text(
20899
- { x: CAUSALLOOP_CONST.CANVAS_PAD, y: 20, class: "sx-cld-title", "font-family": fontFamily },
20941
+ { x: layout.width / 2, y: 20, class: "sx-cld-title", "font-family": fontFamily, "text-anchor": "middle" },
20900
20942
  ast.title
20901
20943
  )
20902
20944
  );
@@ -21861,7 +21903,7 @@ function selfLoopGeom(tr, c, ringCenter, layout, C2) {
21861
21903
 
21862
21904
  // src/diagrams/markov/renderer.ts
21863
21905
  function palette(name) {
21864
- const b = chunkNZT5P2XZ_cjs.resolveBaseTheme(name);
21906
+ const b = chunkNT6VVMLW_cjs.resolveBaseTheme(name);
21865
21907
  const mono = name === "monochrome";
21866
21908
  return {
21867
21909
  stateFill: b.fillMuted,
@@ -22717,13 +22759,13 @@ function renderGitGraph(text2, config) {
22717
22759
  }
22718
22760
  function renderGitGraphLayout(layout, config) {
22719
22761
  const pal = resolvePalette2(config?.theme);
22720
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
22762
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
22721
22763
  const pad = config?.padding ?? 0;
22722
22764
  const { ast } = layout;
22723
22765
  const width = layout.width + pad * 2;
22724
22766
  const height = layout.height + pad * 2;
22725
22767
  const a11y = ast.title ?? "Git commit graph";
22726
- const styleBlock = buildStyle(pal, ast.showBranches);
22768
+ const styleBlock = buildStyle2(pal, ast.showBranches);
22727
22769
  const children = [
22728
22770
  chunk3WNW5Y7P_cjs.title(a11y),
22729
22771
  chunk3WNW5Y7P_cjs.desc(summarise6(layout)),
@@ -22939,11 +22981,11 @@ function renderCommitLabel(id, x, y, rotate, fontFamily) {
22939
22981
  id
22940
22982
  );
22941
22983
  }
22942
- function buildStyle(pal, showBranches) {
22984
+ function buildStyle2(pal, showBranches) {
22943
22985
  const laneStyle = showBranches ? `
22944
- .sx-gg-lane { stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; stroke-linecap: round; opacity: 0.9; }
22986
+ .sx-gg-lane { stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; stroke-linecap: round; opacity: 0.9; }
22945
22987
  .sx-gg-pill { stroke: none; }
22946
- .sx-gg-pill-text { font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 700; }` : "";
22988
+ .sx-gg-pill-text { font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 700; }` : "";
22947
22989
  const laneRules = pal.lanes.map((col, i) => {
22948
22990
  const ink = pal.laneInk[i] ?? "#ffffff";
22949
22991
  return [
@@ -22958,17 +23000,17 @@ function buildStyle(pal, showBranches) {
22958
23000
  {},
22959
23001
  `
22960
23002
  .sx-gg-bg { fill: ${pal.bg}; }${laneStyle}
22961
- .sx-gg-edge { fill: none; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
23003
+ .sx-gg-edge { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
22962
23004
  .sx-gg-edge-merge { stroke-dasharray: none; }
22963
- .sx-gg-node { stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
23005
+ .sx-gg-node { stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
22964
23006
  .sx-gg-dot { stroke: none; }
22965
- .sx-gg-merge { fill: ${pal.mergeCenter}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
22966
- .sx-gg-highlight { fill: none; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
22967
- .sx-gg-reverse-mark { stroke: ${pal.mergeCenter}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
22968
- .sx-gg-cherry { fill: none; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
22969
- .sx-gg-id { fill: ${pal.labelInk}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
22970
- .sx-gg-tag { fill: ${pal.tagFill}; stroke: ${pal.tagStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
22971
- .sx-gg-tag-text { fill: ${pal.tagInk}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
23007
+ .sx-gg-merge { fill: ${pal.mergeCenter}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23008
+ .sx-gg-highlight { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23009
+ .sx-gg-reverse-mark { stroke: ${pal.mergeCenter}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linecap: round; }
23010
+ .sx-gg-cherry { fill: none; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23011
+ .sx-gg-id { fill: ${pal.labelInk}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 600; }
23012
+ .sx-gg-tag { fill: ${pal.tagFill}; stroke: ${pal.tagStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
23013
+ .sx-gg-tag-text { fill: ${pal.tagInk}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
22972
23014
  ${laneRules}
22973
23015
  `.trim()
22974
23016
  );
@@ -23561,7 +23603,8 @@ function layoutEpc(ast) {
23561
23603
  const shift = (maxCrossExtent - rankWidths[r6]) / 2 + EPC_CONST.CANVAS_PAD;
23562
23604
  for (const id of ranks[r6]) crossPos.set(id, crossPos.get(id) + shift);
23563
23605
  }
23564
- const crossExtent = maxCrossExtent + EPC_CONST.CANVAS_PAD * 2 + EPC_CONST.BACK_MARGIN;
23606
+ const backMargin = backSet.size > 0 ? EPC_CONST.BACK_MARGIN : 0;
23607
+ const crossExtent = maxCrossExtent + EPC_CONST.CANVAS_PAD * 2 + backMargin;
23565
23608
  const flaggedIds = /* @__PURE__ */ new Set();
23566
23609
  for (const v of analysis.violations) {
23567
23610
  if (v.severity === "error") for (const id of v.nodes) flaggedIds.add(id);
@@ -23727,7 +23770,7 @@ function borderPoint(from, to, _isLR) {
23727
23770
 
23728
23771
  // src/diagrams/epc/renderer.ts
23729
23772
  function epcPalette(themeName) {
23730
- const base = chunkNZT5P2XZ_cjs.resolveBaseTheme(themeName);
23773
+ const base = chunkNT6VVMLW_cjs.resolveBaseTheme(themeName);
23731
23774
  if (themeName === "monochrome") {
23732
23775
  return {
23733
23776
  eventFill: "#ffffff",
@@ -23786,7 +23829,7 @@ function renderEpc(text2, config) {
23786
23829
  function renderEpcLayout(layout, config) {
23787
23830
  const themeName = config?.theme ?? "default";
23788
23831
  const pal = epcPalette(themeName);
23789
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
23832
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
23790
23833
  const pad = config?.padding ?? 0;
23791
23834
  const { ast } = layout;
23792
23835
  const width = layout.width + pad * 2;
@@ -23796,22 +23839,22 @@ function renderEpcLayout(layout, config) {
23796
23839
  "style",
23797
23840
  {},
23798
23841
  `
23799
- .sx-epc-bg { fill: ${chunkNZT5P2XZ_cjs.resolveBaseTheme(themeName).bg}; }
23800
- .sx-epc-event { fill: ${pal.eventFill}; stroke: ${pal.eventStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
23801
- .sx-epc-func { fill: ${pal.funcFill}; stroke: ${pal.funcStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
23802
- .sx-epc-conn { fill: ${pal.connFill}; stroke: ${pal.connStroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
23842
+ .sx-epc-bg { fill: ${chunkNT6VVMLW_cjs.resolveBaseTheme(themeName).bg}; }
23843
+ .sx-epc-event { fill: ${pal.eventFill}; stroke: ${pal.eventStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-linejoin: round; }
23844
+ .sx-epc-func { fill: ${pal.funcFill}; stroke: ${pal.funcStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23845
+ .sx-epc-conn { fill: ${pal.connFill}; stroke: ${pal.connStroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23803
23846
  .sx-epc-node[data-flagged="true"] .sx-epc-event,
23804
23847
  .sx-epc-node[data-flagged="true"] .sx-epc-func,
23805
- .sx-epc-node[data-flagged="true"] .sx-epc-conn { stroke: ${pal.flag}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
23806
- .sx-epc-flagring { fill: none; stroke: ${pal.flag}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 3; }
23807
- .sx-epc-label { fill: ${pal.labelText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
23848
+ .sx-epc-node[data-flagged="true"] .sx-epc-conn { stroke: ${pal.flag}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
23849
+ .sx-epc-flagring { fill: none; stroke: ${pal.flag}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; stroke-dasharray: 4 3; }
23850
+ .sx-epc-label { fill: ${pal.labelText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
23808
23851
  .sx-epc-glyph { fill: ${pal.connGlyph}; font-size: 17px; font-weight: 700; }
23809
- .sx-epc-edge { fill: none; stroke: ${pal.edge}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
23852
+ .sx-epc-edge { fill: none; stroke: ${pal.edge}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
23810
23853
  .sx-epc-edge[data-back="true"] { stroke: ${pal.backEdge}; stroke-dasharray: 5 4; }
23811
23854
  .sx-epc-arrow { fill: ${pal.edge}; stroke: none; }
23812
23855
  .sx-epc-arrow-back { fill: ${pal.backEdge}; stroke: none; }
23813
- .sx-epc-edge-label { fill: ${pal.edgeLabel}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
23814
- .sx-epc-title { fill: ${pal.labelText}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
23856
+ .sx-epc-edge-label { fill: ${pal.edgeLabel}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
23857
+ .sx-epc-title { fill: ${pal.labelText}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
23815
23858
  `.trim()
23816
23859
  );
23817
23860
  const children = [
@@ -23842,7 +23885,7 @@ function renderEpcLayout(layout, config) {
23842
23885
  ];
23843
23886
  const inner = [];
23844
23887
  if (ast.title) {
23845
- inner.push(chunk3WNW5Y7P_cjs.text({ x: EPC_CONST.CANVAS_PAD, y: 22, class: "sx-epc-title", "font-family": fontFamily }, ast.title));
23888
+ inner.push(chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "sx-epc-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title));
23846
23889
  }
23847
23890
  for (const e of layout.edges) inner.push(renderEdge6(e));
23848
23891
  for (const n of layout.nodes) inner.push(renderNode3(n));
@@ -24541,8 +24584,8 @@ function renderIdef0(text2, config) {
24541
24584
  return renderIdef0Layout(layout, config);
24542
24585
  }
24543
24586
  function renderIdef0Layout(layout, config) {
24544
- const theme = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
24545
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
24587
+ const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
24588
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
24546
24589
  const pad = config?.padding ?? 0;
24547
24590
  const { ast } = layout;
24548
24591
  const width = layout.width + pad * 2;
@@ -24553,22 +24596,22 @@ function renderIdef0Layout(layout, config) {
24553
24596
  {},
24554
24597
  `
24555
24598
  .sx-idef0-bg { fill: ${theme.bg}; }
24556
- .sx-idef0-frame { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
24557
- .sx-idef0-box { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
24558
- .sx-idef0-box-name { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
24559
- .sx-idef0-box-num { fill: ${theme.textMuted}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
24560
- .sx-idef0-arrow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
24599
+ .sx-idef0-frame { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24600
+ .sx-idef0-box { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24601
+ .sx-idef0-box-name { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
24602
+ .sx-idef0-box-num { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; font-weight: 700; }
24603
+ .sx-idef0-arrow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
24561
24604
  .sx-idef0-arrow[data-margin="true"] { stroke: ${theme.accent}; }
24562
24605
  .sx-idef0-arrow[data-tunneled="true"] { stroke-dasharray: 5 3; }
24563
24606
  .sx-idef0-head { fill: ${theme.stroke}; }
24564
24607
  .sx-idef0-arrow[data-margin="true"] + .sx-idef0-head, .sx-idef0-head[data-margin="true"] { fill: ${theme.accent}; }
24565
- .sx-idef0-label { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; }
24566
- .sx-idef0-icom { fill: ${theme.textMuted}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
24567
- .sx-idef0-title { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
24568
- .sx-idef0-meta { fill: ${theme.textMuted}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; }
24569
- .sx-idef0-tb { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thin}; }
24570
- .sx-idef0-tb-text { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small + 1}px; }
24571
- .sx-idef0-tb-key { fill: ${theme.textMuted}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
24608
+ .sx-idef0-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24609
+ .sx-idef0-icom { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
24610
+ .sx-idef0-title { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
24611
+ .sx-idef0-meta { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24612
+ .sx-idef0-tb { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thin}; }
24613
+ .sx-idef0-tb-text { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small + 1}px; }
24614
+ .sx-idef0-tb-key { fill: ${theme.textMuted}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
24572
24615
  `.trim()
24573
24616
  );
24574
24617
  const children = [
@@ -24580,7 +24623,7 @@ function renderIdef0Layout(layout, config) {
24580
24623
  const inner = [];
24581
24624
  if (ast.title) {
24582
24625
  inner.push(
24583
- chunk3WNW5Y7P_cjs.text({ x: IDEF0_CONST.MARGIN, y: 24, class: "sx-idef0-title", "font-family": fontFamily }, ast.title)
24626
+ chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 24, class: "sx-idef0-title", "font-family": fontFamily, "text-anchor": "middle" }, ast.title)
24584
24627
  );
24585
24628
  }
24586
24629
  for (const a of layout.arrows) {
@@ -25354,8 +25397,8 @@ function renderThreatModel(text2, config) {
25354
25397
  return renderThreatModelLayout(layout, config);
25355
25398
  }
25356
25399
  function renderThreatModelLayout(layout, config) {
25357
- const theme = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
25358
- const fontFamily = config?.fontFamily ?? chunkNZT5P2XZ_cjs.DEFAULT_FONT_FAMILY;
25400
+ const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
25401
+ const fontFamily = config?.fontFamily ?? chunkNT6VVMLW_cjs.DEFAULT_FONT_FAMILY;
25359
25402
  const pad = config?.padding ?? 0;
25360
25403
  const width = layout.width + pad * 2;
25361
25404
  const height = layout.height + pad * 2;
@@ -25366,24 +25409,24 @@ function renderThreatModelLayout(layout, config) {
25366
25409
  {},
25367
25410
  `
25368
25411
  .sx-tm-bg { fill: ${theme.bg}; }
25369
- .sx-tm-title { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.title}px; font-weight: 700; }
25370
- .sx-tm-external { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
25371
- .sx-tm-process { fill: ${theme.fill}; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
25372
- .sx-tm-store-line { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
25412
+ .sx-tm-title { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.title}px; font-weight: 700; }
25413
+ .sx-tm-external { fill: ${theme.fillMuted}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25414
+ .sx-tm-process { fill: ${theme.fill}; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25415
+ .sx-tm-store-line { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25373
25416
  .sx-tm-store-bg { fill: ${theme.bg}; stroke: none; }
25374
- .sx-tm-label { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.label}px; font-weight: 600; }
25375
- .sx-tm-flow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; }
25376
- .sx-tm-flow[data-crossing="true"] { stroke: ${danger}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.thick}; }
25417
+ .sx-tm-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.label}px; font-weight: 600; }
25418
+ .sx-tm-flow { fill: none; stroke: ${theme.stroke}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; }
25419
+ .sx-tm-flow[data-crossing="true"] { stroke: ${danger}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.thick}; }
25377
25420
  .sx-tm-arrow { fill: ${theme.stroke}; stroke: none; }
25378
25421
  .sx-tm-arrow[data-crossing="true"] { fill: ${danger}; }
25379
- .sx-tm-flow-label { fill: ${theme.text}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; }
25422
+ .sx-tm-flow-label { fill: ${theme.text}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; }
25380
25423
  .sx-tm-flow-label[data-crossing="true"] { fill: ${danger}; font-weight: 700; }
25381
25424
  .sx-tm-flow-halo { fill: ${theme.bg}; stroke: none; }
25382
- .sx-tm-boundary { fill: none; stroke: ${danger}; stroke-width: ${chunkNZT5P2XZ_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 6 4; }
25383
- .sx-tm-boundary-label { fill: ${danger}; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
25425
+ .sx-tm-boundary { fill: none; stroke: ${danger}; stroke-width: ${chunkNT6VVMLW_cjs.STROKE_WIDTH.normal}; stroke-dasharray: 6 4; }
25426
+ .sx-tm-boundary-label { fill: ${danger}; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
25384
25427
  .sx-tm-badge { fill: ${theme.accent}; }
25385
25428
  .sx-tm-badge[data-cond-r="true"] { fill: ${danger}; }
25386
- .sx-tm-badge-text { fill: #ffffff; font-size: ${chunkNZT5P2XZ_cjs.FONT_SIZE.small}px; font-weight: 700; }
25429
+ .sx-tm-badge-text { fill: #ffffff; font-size: ${chunkNT6VVMLW_cjs.FONT_SIZE.small}px; font-weight: 700; }
25387
25430
  `.trim()
25388
25431
  );
25389
25432
  const markerDefs = chunk3WNW5Y7P_cjs.defs([
@@ -25401,7 +25444,7 @@ function renderThreatModelLayout(layout, config) {
25401
25444
  if (layout.ast.title) {
25402
25445
  inner.push(
25403
25446
  chunk3WNW5Y7P_cjs.text(
25404
- { x: TM_CONST.PAD, y: 24, class: "sx-tm-title", "font-family": fontFamily },
25447
+ { x: layout.width / 2, y: 24, class: "sx-tm-title", "font-family": fontFamily, "text-anchor": "middle" },
25405
25448
  layout.ast.title
25406
25449
  )
25407
25450
  );
@@ -27260,7 +27303,7 @@ function renderNode5(n, color, theme, fontFamily, orderClass) {
27260
27303
  );
27261
27304
  }
27262
27305
  function renderMindmapAST(ast, themeName = "default", fontFamily = "system-ui, -apple-system, sans-serif") {
27263
- const theme = chunkNZT5P2XZ_cjs.resolveMindmapTheme(ast.themeOverride ?? themeName);
27306
+ const theme = chunkNT6VVMLW_cjs.resolveMindmapTheme(ast.themeOverride ?? themeName);
27264
27307
  const mode = modeOf(ast);
27265
27308
  const isWheel = mode === "futureswheel";
27266
27309
  const layout = layoutMindmap(ast);
@@ -28319,7 +28362,8 @@ function layoutSipoc(ast) {
28319
28362
  var QFD_CELL = 46;
28320
28363
  var QFD_WHAT_LABEL_W = 190;
28321
28364
  var QFD_WEIGHT_W = 46;
28322
- var QFD_HOW_LABEL_H = 130;
28365
+ var QFD_HOW_FONT = 11.5;
28366
+ var QFD_HOW_ANGLE_SIN = Math.sin(60 * Math.PI / 180);
28323
28367
  var QFD_FOOTER_H = 64;
28324
28368
  var QFD_PAD = 24;
28325
28369
  function layoutQfd(ast) {
@@ -28331,7 +28375,11 @@ function layoutQfd(ast) {
28331
28375
  const roofH = Math.ceil(cellW / 2 * cols) + 8;
28332
28376
  const whatLabelW = QFD_WHAT_LABEL_W;
28333
28377
  const weightW = QFD_WEIGHT_W;
28334
- const howLabelH = QFD_HOW_LABEL_H;
28378
+ const maxHowW = Math.max(
28379
+ 0,
28380
+ ...(ast.qfd?.hows ?? []).map((h) => chunkV3JTVTPY_cjs.estimateTextWidth(h.label, QFD_HOW_FONT))
28381
+ );
28382
+ const howLabelH = Math.max(48, Math.min(220, Math.ceil(maxHowW * QFD_HOW_ANGLE_SIN) + 26));
28335
28383
  const footerH = QFD_FOOTER_H;
28336
28384
  const gridX0 = QFD_PAD + whatLabelW + weightW;
28337
28385
  const gridY0 = QFD_PAD + titleH + roofH + howLabelH;
@@ -28468,76 +28516,78 @@ var HEAT_RAMP = [
28468
28516
  "#ef4444",
28469
28517
  "#b91c1c"
28470
28518
  ];
28471
- var CSS2 = `
28519
+ function buildMatrixCss(t) {
28520
+ return `
28472
28521
  .sx-matrix { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
28473
- .sx-matrix-title { font: 600 16px sans-serif; fill: #111; }
28474
- .sx-matrix-grid { stroke: #e5e7eb; stroke-width: 1; fill: none; }
28475
- .sx-matrix-mid { stroke: #9ca3af; stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; }
28476
- .sx-matrix-plot-border { stroke: #374151; stroke-width: 1.2; fill: none; }
28477
- .sx-matrix-axis-label { font: 500 12px sans-serif; fill: #374151; }
28478
- .sx-matrix-axis-end { font: 500 11px sans-serif; fill: #6b7280; }
28479
- .sx-matrix-quad-annot { font: 600 13px sans-serif; fill: #475569; opacity: 0.75; }
28480
- .sx-matrix-quad-desc { font: 400 10.5px sans-serif; fill: #64748b; opacity: 0.85; }
28481
- .sx-matrix-corr-header { font: 600 11.5px sans-serif; fill: #1f2937; text-anchor: middle; }
28482
- .sx-matrix-corr-rowlabel { font: 500 11.5px sans-serif; fill: #1f2937; text-anchor: end; dominant-baseline: central; }
28483
- .sx-matrix-corr-margin { font: 500 11px sans-serif; fill: #374151; text-anchor: middle; dominant-baseline: central; }
28484
- .sx-matrix-corr-margin-best { font: 700 11.5px sans-serif; fill: #111; text-anchor: middle; dominant-baseline: central; }
28485
- .sx-matrix-corr-grid { stroke: #d1d5db; stroke-width: 0.8; fill: none; }
28486
- .sx-matrix-corr-rowbg-a { fill: #f0fdf4; }
28487
- .sx-matrix-corr-rowbg-b { fill: #fff; }
28488
- .sx-matrix-cell-label { font: 500 12px sans-serif; fill: #1f2937; text-anchor: middle; }
28489
- .sx-matrix-cell-title { font: 600 13px sans-serif; fill: #111827; }
28490
- .sx-matrix-cell-subtitle { font: 400 11px sans-serif; fill: #6b7280; }
28491
- .sx-matrix-cell-item { font: 500 12px sans-serif; fill: #1f2937; }
28492
- .sx-matrix-cell-value { font: 600 18px sans-serif; fill: #111; text-anchor: middle; }
28522
+ .sx-matrix-title { font: 700 16px sans-serif; fill: ${t.inkStrong}; }
28523
+ .sx-matrix-grid { stroke: ${t.gridFaint}; stroke-width: 1; fill: none; }
28524
+ .sx-matrix-mid { stroke: ${t.gridStrong}; stroke-width: 1.2; stroke-dasharray: 4 3; fill: none; }
28525
+ .sx-matrix-plot-border { stroke: ${t.inkMuted}; stroke-width: 1.2; fill: none; }
28526
+ .sx-matrix-axis-label { font: 500 12px sans-serif; fill: ${t.inkMuted}; }
28527
+ .sx-matrix-axis-end { font: 500 11px sans-serif; fill: ${t.inkFaint}; }
28528
+ .sx-matrix-quad-annot { font: 600 13px sans-serif; fill: ${t.inkMuted}; opacity: 0.75; }
28529
+ .sx-matrix-quad-desc { font: 400 10.5px sans-serif; fill: ${t.inkFaint}; opacity: 0.85; }
28530
+ .sx-matrix-corr-header { font: 600 11.5px sans-serif; fill: ${t.ink}; text-anchor: middle; }
28531
+ .sx-matrix-corr-rowlabel { font: 500 11.5px sans-serif; fill: ${t.ink}; text-anchor: end; dominant-baseline: central; }
28532
+ .sx-matrix-corr-margin { font: 500 11px sans-serif; fill: ${t.inkMuted}; text-anchor: middle; dominant-baseline: central; }
28533
+ .sx-matrix-corr-margin-best { font: 700 11.5px sans-serif; fill: ${t.inkStrong}; text-anchor: middle; dominant-baseline: central; }
28534
+ .sx-matrix-corr-grid { stroke: ${t.grid}; stroke-width: 0.8; fill: none; }
28535
+ .sx-matrix-corr-rowbg-a { fill: ${t.surfaceTint}; }
28536
+ .sx-matrix-corr-rowbg-b { fill: ${t.surface}; }
28537
+ .sx-matrix-cell-label { font: 500 12px sans-serif; fill: ${t.ink}; text-anchor: middle; }
28538
+ .sx-matrix-cell-title { font: 600 13px sans-serif; fill: ${t.inkStrong}; }
28539
+ .sx-matrix-cell-subtitle { font: 400 11px sans-serif; fill: ${t.inkFaint}; }
28540
+ .sx-matrix-cell-item { font: 500 12px sans-serif; fill: ${t.ink}; }
28541
+ .sx-matrix-cell-value { font: 600 18px sans-serif; fill: ${t.inkStrong}; text-anchor: middle; }
28493
28542
  .sx-matrix-bubble { stroke-width: 1.5; }
28494
- .sx-matrix-label { font: 500 11px sans-serif; fill: #111827; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
28495
- .sx-matrix-leader { stroke: #94a3b8; stroke-width: 0.6; opacity: 0.7; fill: none; }
28496
- .sx-matrix-legend-text { font: 500 11px sans-serif; fill: #374151; }
28497
- .sx-matrix-offchart { fill: #ea580c; }
28498
- .sx-sipoc-header { font: 700 13px sans-serif; fill: #fff; text-anchor: middle; dominant-baseline: central; }
28499
- .sx-sipoc-headbox { stroke: #fff; stroke-width: 1; }
28500
- .sx-sipoc-cell { fill: #fff; stroke: #cbd5e1; stroke-width: 1; }
28501
- .sx-sipoc-cell-alt { fill: #f8fafc; stroke: #cbd5e1; stroke-width: 1; }
28502
- .sx-sipoc-process { fill: #eff6ff; stroke: #cbd5e1; stroke-width: 1; }
28503
- .sx-sipoc-item { font: 500 12px sans-serif; fill: #1f2937; text-anchor: middle; dominant-baseline: central; }
28504
- .sx-sipoc-step { font: 600 12px sans-serif; fill: #1e3a8a; text-anchor: middle; dominant-baseline: central; }
28505
- .sx-qfd-grid { stroke: #cbd5e1; stroke-width: 1; fill: none; }
28506
- .sx-qfd-cellbg { fill: #fff; }
28507
- .sx-qfd-cellbg-alt { fill: #f8fafc; }
28508
- .sx-qfd-what { font: 500 12px sans-serif; fill: #1f2937; text-anchor: end; dominant-baseline: central; }
28509
- .sx-qfd-how { font: 500 11.5px sans-serif; fill: #1f2937; }
28510
- .sx-qfd-weight { font: 600 12px sans-serif; fill: #111; text-anchor: middle; dominant-baseline: central; }
28511
- .sx-qfd-weight-head { font: 600 10px sans-serif; fill: #475569; text-anchor: middle; dominant-baseline: central; }
28512
- .sx-qfd-rel-strong { fill: #2563eb; }
28513
- .sx-qfd-rel-medium { fill: #93c5fd; stroke: #2563eb; stroke-width: 1.4; }
28514
- .sx-qfd-rel-weak { fill: none; stroke: #2563eb; stroke-width: 1.4; }
28515
- .sx-qfd-roof-cell { fill: #f8fafc; stroke: #94a3b8; stroke-width: 0.8; }
28516
- .sx-qfd-roof-cell-filled { fill: #eef2ff; stroke: #64748b; stroke-width: 0.9; }
28543
+ .sx-matrix-label { font: 500 11px sans-serif; fill: ${t.inkStrong}; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
28544
+ .sx-matrix-leader { stroke: ${t.gridStrong}; stroke-width: 0.6; opacity: 0.7; fill: none; }
28545
+ .sx-matrix-legend-text { font: 500 11px sans-serif; fill: ${t.inkMuted}; }
28546
+ .sx-matrix-offchart { fill: ${t.warnDeep}; }
28547
+ .sx-sipoc-header { font: 700 13px sans-serif; fill: ${t.onHeader}; text-anchor: middle; dominant-baseline: central; }
28548
+ .sx-sipoc-headbox { stroke: ${t.surface}; stroke-width: 1; }
28549
+ .sx-sipoc-cell { fill: ${t.surface}; stroke: ${t.gridMid}; stroke-width: 1; }
28550
+ .sx-sipoc-cell-alt { fill: ${t.surfaceAlt}; stroke: ${t.gridMid}; stroke-width: 1; }
28551
+ .sx-sipoc-process { fill: ${t.accentTint}; stroke: ${t.gridMid}; stroke-width: 1; }
28552
+ .sx-sipoc-item { font: 500 12px sans-serif; fill: ${t.ink}; text-anchor: middle; dominant-baseline: central; }
28553
+ .sx-sipoc-step { font: 600 12px sans-serif; fill: ${t.accentDeep}; text-anchor: middle; dominant-baseline: central; }
28554
+ .sx-qfd-grid { stroke: ${t.gridMid}; stroke-width: 1; fill: none; }
28555
+ .sx-qfd-cellbg { fill: ${t.surface}; }
28556
+ .sx-qfd-cellbg-alt { fill: ${t.surfaceAlt}; }
28557
+ .sx-qfd-what { font: 500 12px sans-serif; fill: ${t.ink}; text-anchor: end; dominant-baseline: central; }
28558
+ .sx-qfd-how { font: 500 11.5px sans-serif; fill: ${t.ink}; }
28559
+ .sx-qfd-weight { font: 600 12px sans-serif; fill: ${t.inkStrong}; text-anchor: middle; dominant-baseline: central; }
28560
+ .sx-qfd-weight-head { font: 600 10px sans-serif; fill: ${t.inkMuted}; text-anchor: middle; dominant-baseline: central; }
28561
+ .sx-qfd-rel-strong { fill: ${t.accent}; }
28562
+ .sx-qfd-rel-medium { fill: ${t.accentSoft}; stroke: ${t.accent}; stroke-width: 1.4; }
28563
+ .sx-qfd-rel-weak { fill: none; stroke: ${t.accent}; stroke-width: 1.4; }
28564
+ .sx-qfd-roof-cell { fill: ${t.surfaceAlt}; stroke: ${t.gridStrong}; stroke-width: 0.8; }
28565
+ .sx-qfd-roof-cell-filled { fill: ${t.roofFilled}; stroke: ${t.inkFaint}; stroke-width: 0.9; }
28517
28566
  .sx-qfd-corr { font: 700 13px sans-serif; text-anchor: middle; dominant-baseline: central; }
28518
- .sx-qfd-corr-strong-pos { fill: #15803d; }
28519
- .sx-qfd-corr-pos { fill: #16a34a; }
28520
- .sx-qfd-corr-neg { fill: #dc2626; }
28521
- .sx-qfd-corr-strong-neg { fill: #b91c1c; }
28522
- .sx-qfd-imp-band { fill: #eff6ff; stroke: #cbd5e1; stroke-width: 1; }
28523
- .sx-qfd-imp-head { font: 600 11px sans-serif; fill: #1e3a8a; text-anchor: end; dominant-baseline: central; }
28524
- .sx-qfd-imp-value { font: 700 13px sans-serif; fill: #1e3a8a; text-anchor: middle; dominant-baseline: central; }
28525
- .sx-qfd-imp-value-top { font: 800 14px sans-serif; fill: #dc2626; text-anchor: middle; dominant-baseline: central; }
28526
- .sx-qfd-dir { font: 700 13px sans-serif; fill: #475569; text-anchor: middle; dominant-baseline: central; }
28527
- .sx-punnett-corner { fill: #f1f5f9; stroke: #94a3b8; stroke-width: 1; }
28528
- .sx-punnett-cornerline { stroke: #cbd5e1; stroke-width: 1; }
28529
- .sx-punnett-corner-p1 { font: 600 11px sans-serif; fill: #1e3a8a; dominant-baseline: hanging; }
28530
- .sx-punnett-corner-p2 { font: 600 11px sans-serif; fill: #1e3a8a; }
28531
- .sx-punnett-header { fill: #e2e8f0; stroke: #94a3b8; stroke-width: 1; }
28532
- .sx-punnett-gamete { font: 700 14px ui-monospace, "SF Mono", Menlo, monospace; fill: #0f172a; text-anchor: middle; dominant-baseline: central; }
28533
- .sx-punnett-cell { stroke: #94a3b8; stroke-width: 1; }
28534
- .sx-punnett-genotype { font: 700 15px ui-monospace, "SF Mono", Menlo, monospace; fill: #0f172a; text-anchor: middle; dominant-baseline: central; }
28535
- .sx-punnett-footer-head { font: 700 13px sans-serif; fill: #111; }
28536
- .sx-punnett-legend { font: 500 12.5px sans-serif; fill: #1f2937; dominant-baseline: central; }
28537
- .sx-punnett-geno-ratio { font: 500 12px sans-serif; fill: #475569; }
28538
- .sx-punnett-hint { font: 500 13px sans-serif; fill: #64748b; text-anchor: middle; }
28567
+ .sx-qfd-corr-strong-pos { fill: ${t.positiveDeep}; }
28568
+ .sx-qfd-corr-pos { fill: ${t.positive}; }
28569
+ .sx-qfd-corr-neg { fill: ${t.negative}; }
28570
+ .sx-qfd-corr-strong-neg { fill: ${t.negativeDeep}; }
28571
+ .sx-qfd-imp-band { fill: ${t.accentTint}; stroke: ${t.gridMid}; stroke-width: 1; }
28572
+ .sx-qfd-imp-head { font: 600 11px sans-serif; fill: ${t.accentDeep}; text-anchor: end; dominant-baseline: central; }
28573
+ .sx-qfd-imp-value { font: 700 13px sans-serif; fill: ${t.accentDeep}; text-anchor: middle; dominant-baseline: central; }
28574
+ .sx-qfd-imp-value-top { font: 800 14px sans-serif; fill: ${t.negative}; text-anchor: middle; dominant-baseline: central; }
28575
+ .sx-qfd-dir { font: 700 13px sans-serif; fill: ${t.inkMuted}; text-anchor: middle; dominant-baseline: central; }
28576
+ .sx-punnett-corner { fill: ${t.cornerFill}; stroke: ${t.gridStrong}; stroke-width: 1; }
28577
+ .sx-punnett-cornerline { stroke: ${t.gridMid}; stroke-width: 1; }
28578
+ .sx-punnett-corner-p1 { font: 600 11px sans-serif; fill: ${t.accentDeep}; dominant-baseline: hanging; }
28579
+ .sx-punnett-corner-p2 { font: 600 11px sans-serif; fill: ${t.accentDeep}; }
28580
+ .sx-punnett-header { fill: ${t.headerFill}; stroke: ${t.gridStrong}; stroke-width: 1; }
28581
+ .sx-punnett-gamete { font: 700 14px ui-monospace, "SF Mono", Menlo, monospace; fill: ${t.inkStrong}; text-anchor: middle; dominant-baseline: central; }
28582
+ .sx-punnett-cell { stroke: ${t.gridStrong}; stroke-width: 1; }
28583
+ .sx-punnett-genotype { font: 700 15px ui-monospace, "SF Mono", Menlo, monospace; fill: ${t.inkStrong}; text-anchor: middle; dominant-baseline: central; }
28584
+ .sx-punnett-footer-head { font: 700 13px sans-serif; fill: ${t.inkStrong}; }
28585
+ .sx-punnett-legend { font: 500 12.5px sans-serif; fill: ${t.ink}; dominant-baseline: central; }
28586
+ .sx-punnett-geno-ratio { font: 500 12px sans-serif; fill: ${t.inkMuted}; }
28587
+ .sx-punnett-hint { font: 500 13px sans-serif; fill: ${t.inkFaint}; text-anchor: middle; }
28539
28588
  `.trim();
28540
- function axisArrow() {
28589
+ }
28590
+ function axisArrow(t) {
28541
28591
  return chunk3WNW5Y7P_cjs.el(
28542
28592
  "marker",
28543
28593
  {
@@ -28549,7 +28599,7 @@ function axisArrow() {
28549
28599
  markerHeight: 8,
28550
28600
  orient: "auto-start-reverse"
28551
28601
  },
28552
- [chunk3WNW5Y7P_cjs.el("path", { d: "M0,0 L10,5 L0,10 z", fill: "#374151" })]
28602
+ [chunk3WNW5Y7P_cjs.el("path", { d: "M0,0 L10,5 L0,10 z", fill: t.border })]
28553
28603
  );
28554
28604
  }
28555
28605
  function bubbleFill(p, categories) {
@@ -29336,7 +29386,8 @@ function wrapToLines(textStr, maxChars, maxLines) {
29336
29386
  kept[maxLines - 1] = kept[maxLines - 1].replace(/\s+\S*$/, "") + "\u2026";
29337
29387
  return kept;
29338
29388
  }
29339
- function renderSipocAST(ast) {
29389
+ function renderSipocAST(ast, config) {
29390
+ const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29340
29391
  const sipoc = ast.sipoc ?? { suppliers: [], inputs: [], process: [], outputs: [], customers: [] };
29341
29392
  const lay = layoutSipoc(ast);
29342
29393
  const nodes = [];
@@ -29418,7 +29469,7 @@ function renderSipocAST(ast) {
29418
29469
  chunk3WNW5Y7P_cjs.desc(
29419
29470
  `SIPOC scoping table \u2014 ${sipoc.suppliers.length} supplier(s), ${sipoc.inputs.length} input(s), ${sipoc.process.length} process step(s), ${sipoc.outputs.length} output(s), ${sipoc.customers.length} customer(s)`
29420
29471
  ),
29421
- chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, CSS2)]),
29472
+ chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, buildMatrixCss(t))]),
29422
29473
  ...nodes
29423
29474
  ]
29424
29475
  );
@@ -29457,7 +29508,8 @@ function renderQfdRelationshipSymbol(strength, cx, cy, r6) {
29457
29508
  class: "sx-qfd-rel-weak"
29458
29509
  });
29459
29510
  }
29460
- function renderQfdAST(ast) {
29511
+ function renderQfdAST(ast, config) {
29512
+ const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29461
29513
  const qfd = ast.qfd ?? { whats: [], hows: [], relationships: [], roof: [], normalize: false };
29462
29514
  const lay = layoutQfd(ast);
29463
29515
  const importance = computeQfdImportance(qfd);
@@ -29647,7 +29699,7 @@ function renderQfdAST(ast) {
29647
29699
  chunk3WNW5Y7P_cjs.desc(
29648
29700
  `QFD House of Quality \u2014 ${qfd.whats.length} customer requirement(s), ${qfd.hows.length} engineering characteristic(s), ${qfd.relationships.length} relationship(s); technical importance computed per column`
29649
29701
  ),
29650
- chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, CSS2)]),
29702
+ chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, buildMatrixCss(t))]),
29651
29703
  ...nodes
29652
29704
  ]
29653
29705
  );
@@ -29661,7 +29713,8 @@ function genotypeText(parent, genes) {
29661
29713
  return a === dom ? a + b : b === dom ? b + a : a + b;
29662
29714
  }).join("");
29663
29715
  }
29664
- function renderPunnettAST(ast) {
29716
+ function renderPunnettAST(ast, config) {
29717
+ const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29665
29718
  const pd = ast.punnett;
29666
29719
  const lay = layoutPunnett(ast);
29667
29720
  const svgWrap = (body, descText2) => chunk3WNW5Y7P_cjs.svgRoot(
@@ -29677,7 +29730,7 @@ function renderPunnettAST(ast) {
29677
29730
  [
29678
29731
  chunk3WNW5Y7P_cjs.title(ast.title ? `Punnett square \u2014 ${chunk3WNW5Y7P_cjs.escapeXml(ast.title)}` : "Punnett square"),
29679
29732
  chunk3WNW5Y7P_cjs.desc(descText2),
29680
- chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, CSS2)]),
29733
+ chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, buildMatrixCss(t))]),
29681
29734
  ...body
29682
29735
  ]
29683
29736
  );
@@ -29772,10 +29825,11 @@ function renderPunnettAST(ast) {
29772
29825
  const descText = `Punnett square \u2014 ${pd.genes.length === 1 ? "monohybrid" : pd.genes.length === 2 ? "dihybrid" : `${pd.genes.length}-gene`} cross ${genotypeText(pd.parent1, pd.genes)} \xD7 ${genotypeText(pd.parent2, pd.genes)}; phenotype ratio ${footer.phenotypeRatio}`;
29773
29826
  return svgWrap(nodes, descText);
29774
29827
  }
29775
- function renderMatrixAST(ast) {
29776
- if (ast.mode === "sipoc") return renderSipocAST(ast);
29777
- if (ast.mode === "qfd") return renderQfdAST(ast);
29778
- if (ast.mode === "punnett") return renderPunnettAST(ast);
29828
+ function renderMatrixAST(ast, config) {
29829
+ if (ast.mode === "sipoc") return renderSipocAST(ast, config);
29830
+ if (ast.mode === "qfd") return renderQfdAST(ast, config);
29831
+ if (ast.mode === "punnett") return renderPunnettAST(ast, config);
29832
+ const t = chunkNT6VVMLW_cjs.resolveMatrixTheme(config?.theme ?? "default");
29779
29833
  const lay = layoutMatrix(ast);
29780
29834
  const needsLegendSpace = lay.categories.length > 0 || ast.mode === "correlation";
29781
29835
  const extraWidth = needsLegendSpace && lay.plot.x0 + lay.plot.w + 140 > lay.canvasWidth ? 160 : 0;
@@ -29809,14 +29863,14 @@ function renderMatrixAST(ast) {
29809
29863
  chunk3WNW5Y7P_cjs.desc(
29810
29864
  `Matrix diagram${ast.template ? ` (${ast.template} template)` : ""}, ${ast.mode} mode, ${ast.points.length} point(s)`
29811
29865
  ),
29812
- chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, CSS2), axisArrow()]),
29866
+ chunk3WNW5Y7P_cjs.defs([chunk3WNW5Y7P_cjs.el("style", {}, buildMatrixCss(t)), axisArrow(t)]),
29813
29867
  ...body
29814
29868
  ]
29815
29869
  );
29816
29870
  }
29817
- function renderMatrix(text2) {
29871
+ function renderMatrix(text2, config) {
29818
29872
  const ast = parseMatrix(text2);
29819
- return renderMatrixAST(ast);
29873
+ return renderMatrixAST(ast, config);
29820
29874
  }
29821
29875
 
29822
29876
  // src/diagrams/matrix/index.ts
@@ -29827,8 +29881,8 @@ var matrix = {
29827
29881
  return first.startsWith("matrix");
29828
29882
  },
29829
29883
  parse: parseMatrix,
29830
- render(text2) {
29831
- return renderMatrix(text2);
29884
+ render(text2, config) {
29885
+ return renderMatrix(text2, config);
29832
29886
  }
29833
29887
  };
29834
29888
 
@@ -30953,7 +31007,7 @@ function renderEdge7(edge) {
30953
31007
  return chunk3WNW5Y7P_cjs.group({ class: "lt-erd-edge-group" }, parts);
30954
31008
  }
30955
31009
  function renderErdAst(result, themeName = "default") {
30956
- const theme = chunkNZT5P2XZ_cjs.resolveBaseTheme(themeName);
31010
+ const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(themeName);
30957
31011
  const { entities, edges, width, height, ast } = result;
30958
31012
  const cssBlock = chunk3WNW5Y7P_cjs.el("style", {}, buildCss11(theme));
30959
31013
  const titleNode = chunk3WNW5Y7P_cjs.title(ast.title ?? "Schematex ERD");
@@ -32028,7 +32082,7 @@ var WIRE_COLOR_MAP = {
32028
32082
  function buildCss12(t) {
32029
32083
  return `
32030
32084
  .lt-bb { font-family: system-ui, -apple-system, sans-serif; }
32031
- .lt-bb-title { font: 600 16px sans-serif; fill: ${t.text}; }
32085
+ .lt-bb-title { font: 700 16px sans-serif; fill: ${t.text}; }
32032
32086
  .lt-bb-substrate { fill: #e7d8b6; stroke: #b08c4f; stroke-width: 1.5; }
32033
32087
  .lt-bb-rail-pos { fill: #fde2e2; stroke: #dc2626; stroke-width: 0.6; }
32034
32088
  .lt-bb-rail-neg { fill: #dde7fa; stroke: #2563eb; stroke-width: 0.6; }
@@ -32172,10 +32226,10 @@ function renderWire(lw) {
32172
32226
  return path2 + dot1 + dot2;
32173
32227
  }
32174
32228
  function renderBreadboardLayout(layout, config) {
32175
- const theme = chunkNZT5P2XZ_cjs.resolveBaseTheme(config?.theme ?? "default");
32229
+ const theme = chunkNT6VVMLW_cjs.resolveBaseTheme(config?.theme ?? "default");
32176
32230
  const css = buildCss12(theme);
32177
32231
  const titleStr = layout.ast.title ?? "Breadboard";
32178
- const titleNode = layout.ast.title ? chunk3WNW5Y7P_cjs.text({ x: BB_CONST.MARGIN, y: 22, class: "lt-bb-title" }, layout.ast.title) : "";
32232
+ const titleNode = layout.ast.title ? chunk3WNW5Y7P_cjs.text({ x: layout.width / 2, y: 22, class: "lt-bb-title", "text-anchor": "middle" }, layout.ast.title) : "";
32179
32233
  const substrate = renderSubstrate(layout.substrate);
32180
32234
  const parts = layout.parts.map(renderPart).join("\n");
32181
32235
  const wires = layout.wires.map(renderWire).join("\n");
@@ -33038,26 +33092,19 @@ function routeMessageFlow(f, objCenter, poolByLabel) {
33038
33092
 
33039
33093
  // src/diagrams/bpmn/renderer.ts
33040
33094
  var FONT_FAMILY = "system-ui, -apple-system, 'Segoe UI', sans-serif";
33041
- var STROKE = "#1f2937";
33042
- var STROKE_LIGHT = "#94a3b8";
33043
- var POOL_FILL = "#ffffff";
33044
- var LANE_FILL = "#fafbfc";
33045
- var TASK_FILL = "#ffffff";
33046
- var GATEWAY_FILL = "#fffbeb";
33047
- var EVENT_FILL = "#ffffff";
33048
- var LABEL_BAND_FILL = "#f1f5f9";
33049
33095
  function renderBpmn(textInput, config) {
33050
33096
  const ast = parseBpmn(textInput);
33051
33097
  const layout = layoutBpmn(ast);
33052
- return renderBpmnLayout(layout);
33098
+ return renderBpmnLayout(layout, config);
33053
33099
  }
33054
- function renderBpmnLayout(layout, _config) {
33100
+ function renderBpmnLayout(layout, config) {
33055
33101
  const { width, height, ast } = layout;
33102
+ const t = chunkNT6VVMLW_cjs.resolveBpmnTheme(config?.theme ?? "default");
33056
33103
  const out = [];
33057
33104
  out.push(chunk3WNW5Y7P_cjs.title(ast.title ?? "BPMN diagram"));
33058
33105
  out.push(chunk3WNW5Y7P_cjs.desc(`BPMN ${ast.direction} \u2014 ${ast.pools.length} pool(s), ${layout.objects.length} flow object(s).`));
33059
- out.push(buildDefs());
33060
- for (const pl2 of layout.pools) out.push(renderPool(pl2));
33106
+ out.push(buildDefs(t));
33107
+ for (const pl2 of layout.pools) out.push(renderPool(pl2, t));
33061
33108
  for (const lan of layout.lanes) {
33062
33109
  out.push(
33063
33110
  chunk3WNW5Y7P_cjs.group({ class: "schematex-bpmn-lane" }, [
@@ -33066,8 +33113,8 @@ function renderBpmnLayout(layout, _config) {
33066
33113
  y: lan.y,
33067
33114
  width: lan.width - lan.labelHeight,
33068
33115
  height: lan.height,
33069
- fill: LANE_FILL,
33070
- stroke: STROKE,
33116
+ fill: t.laneFill,
33117
+ stroke: t.bpmnStroke,
33071
33118
  "stroke-width": 1
33072
33119
  }),
33073
33120
  chunk3WNW5Y7P_cjs.rect({
@@ -33075,8 +33122,8 @@ function renderBpmnLayout(layout, _config) {
33075
33122
  y: lan.y,
33076
33123
  width: lan.labelHeight,
33077
33124
  height: lan.height,
33078
- fill: LABEL_BAND_FILL,
33079
- stroke: STROKE,
33125
+ fill: t.labelBandFill,
33126
+ stroke: t.bpmnStroke,
33080
33127
  "stroke-width": 1
33081
33128
  }),
33082
33129
  chunk3WNW5Y7P_cjs.text(
@@ -33088,15 +33135,15 @@ function renderBpmnLayout(layout, _config) {
33088
33135
  "dominant-baseline": "middle",
33089
33136
  "font-family": FONT_FAMILY,
33090
33137
  "font-size": 12,
33091
- fill: STROKE
33138
+ fill: t.bpmnText
33092
33139
  },
33093
33140
  lan.lane.label
33094
33141
  )
33095
33142
  ])
33096
33143
  );
33097
33144
  }
33098
- for (const fl of layout.flows) out.push(renderFlow2(fl));
33099
- for (const ol of layout.objects) out.push(renderObject(ol));
33145
+ for (const fl of layout.flows) out.push(renderFlow2(fl, t));
33146
+ for (const ol of layout.objects) out.push(renderObject(ol, t));
33100
33147
  return chunk3WNW5Y7P_cjs.svgRoot(
33101
33148
  {
33102
33149
  width,
@@ -33107,7 +33154,7 @@ function renderBpmnLayout(layout, _config) {
33107
33154
  out
33108
33155
  );
33109
33156
  }
33110
- function buildDefs() {
33157
+ function buildDefs(t) {
33111
33158
  return chunk3WNW5Y7P_cjs.defs([
33112
33159
  // Sequence flow — filled triangle.
33113
33160
  chunk3WNW5Y7P_cjs.el(
@@ -33124,7 +33171,7 @@ function buildDefs() {
33124
33171
  [
33125
33172
  chunk3WNW5Y7P_cjs.el("path", {
33126
33173
  d: "M 0 0 L 10 5 L 0 10 z",
33127
- fill: STROKE
33174
+ fill: t.flowStroke
33128
33175
  })
33129
33176
  ]
33130
33177
  ),
@@ -33143,8 +33190,8 @@ function buildDefs() {
33143
33190
  [
33144
33191
  chunk3WNW5Y7P_cjs.el("path", {
33145
33192
  d: "M 0 0 L 10 5 L 0 10 z",
33146
- fill: "#ffffff",
33147
- stroke: STROKE,
33193
+ fill: t.poolFill,
33194
+ stroke: t.msgFlowStroke,
33148
33195
  "stroke-width": 1
33149
33196
  })
33150
33197
  ]
@@ -33162,12 +33209,12 @@ function buildDefs() {
33162
33209
  orient: "auto"
33163
33210
  },
33164
33211
  [
33165
- chunk3WNW5Y7P_cjs.el("circle", { cx: 5, cy: 5, r: 3, fill: "#ffffff", stroke: STROKE })
33212
+ chunk3WNW5Y7P_cjs.el("circle", { cx: 5, cy: 5, r: 3, fill: t.poolFill, stroke: t.msgFlowStroke })
33166
33213
  ]
33167
33214
  )
33168
33215
  ]);
33169
33216
  }
33170
- function renderPool(pl2) {
33217
+ function renderPool(pl2, t) {
33171
33218
  const labelCx = pl2.labelX + pl2.labelWidth / 2;
33172
33219
  const labelCy = pl2.labelY + pl2.height / 2;
33173
33220
  if (pl2.pool.blackbox) {
@@ -33177,8 +33224,8 @@ function renderPool(pl2) {
33177
33224
  y: pl2.y,
33178
33225
  width: pl2.width,
33179
33226
  height: pl2.height,
33180
- fill: POOL_FILL,
33181
- stroke: STROKE,
33227
+ fill: t.poolFill,
33228
+ stroke: t.bpmnStroke,
33182
33229
  "stroke-width": 1.5
33183
33230
  }),
33184
33231
  chunk3WNW5Y7P_cjs.rect({
@@ -33186,8 +33233,8 @@ function renderPool(pl2) {
33186
33233
  y: pl2.y,
33187
33234
  width: pl2.labelWidth,
33188
33235
  height: pl2.height,
33189
- fill: LABEL_BAND_FILL,
33190
- stroke: STROKE,
33236
+ fill: t.labelBandFill,
33237
+ stroke: t.bpmnStroke,
33191
33238
  "stroke-width": 1
33192
33239
  }),
33193
33240
  chunk3WNW5Y7P_cjs.text(
@@ -33200,7 +33247,7 @@ function renderPool(pl2) {
33200
33247
  "font-family": FONT_FAMILY,
33201
33248
  "font-size": 13,
33202
33249
  "font-weight": "bold",
33203
- fill: STROKE
33250
+ fill: t.bpmnText
33204
33251
  },
33205
33252
  pl2.pool.label
33206
33253
  )
@@ -33212,8 +33259,8 @@ function renderPool(pl2) {
33212
33259
  y: pl2.y,
33213
33260
  width: pl2.width,
33214
33261
  height: pl2.height,
33215
- fill: POOL_FILL,
33216
- stroke: STROKE,
33262
+ fill: t.poolFill,
33263
+ stroke: t.bpmnStroke,
33217
33264
  "stroke-width": 1.5
33218
33265
  }),
33219
33266
  chunk3WNW5Y7P_cjs.rect({
@@ -33221,8 +33268,8 @@ function renderPool(pl2) {
33221
33268
  y: pl2.y,
33222
33269
  width: pl2.labelWidth,
33223
33270
  height: pl2.height,
33224
- fill: LABEL_BAND_FILL,
33225
- stroke: STROKE,
33271
+ fill: t.labelBandFill,
33272
+ stroke: t.bpmnStroke,
33226
33273
  "stroke-width": 1
33227
33274
  }),
33228
33275
  chunk3WNW5Y7P_cjs.text(
@@ -33235,19 +33282,19 @@ function renderPool(pl2) {
33235
33282
  "font-family": FONT_FAMILY,
33236
33283
  "font-size": 13,
33237
33284
  "font-weight": "bold",
33238
- fill: STROKE
33285
+ fill: t.bpmnText
33239
33286
  },
33240
33287
  pl2.pool.label
33241
33288
  )
33242
33289
  ]);
33243
33290
  }
33244
- function renderObject(ol) {
33291
+ function renderObject(ol, t) {
33245
33292
  const o = ol.obj;
33246
- if ("gatewayKind" in o) return renderGateway(ol);
33247
- if ("marker" in o) return renderActivity(ol);
33248
- return renderEvent2(ol);
33293
+ if ("gatewayKind" in o) return renderGateway(ol, t);
33294
+ if ("marker" in o) return renderActivity(ol, t);
33295
+ return renderEvent2(ol, t);
33249
33296
  }
33250
- function renderActivity(ol) {
33297
+ function renderActivity(ol, t) {
33251
33298
  const a = ol.obj;
33252
33299
  const isSubproc = a.kind === "subprocess-collapsed";
33253
33300
  const cx = ol.x + ol.width / 2;
@@ -33260,8 +33307,8 @@ function renderActivity(ol) {
33260
33307
  height: ol.height,
33261
33308
  rx: 10,
33262
33309
  ry: 10,
33263
- fill: TASK_FILL,
33264
- stroke: STROKE,
33310
+ fill: t.taskFill,
33311
+ stroke: t.taskStroke,
33265
33312
  "stroke-width": 1.5
33266
33313
  }),
33267
33314
  chunk3WNW5Y7P_cjs.multilineText(
@@ -33272,14 +33319,14 @@ function renderActivity(ol) {
33272
33319
  "dominant-baseline": "middle",
33273
33320
  "font-family": FONT_FAMILY,
33274
33321
  "font-size": 12,
33275
- fill: STROKE
33322
+ fill: t.bpmnText
33276
33323
  },
33277
33324
  a.label,
33278
33325
  14
33279
33326
  )
33280
33327
  ];
33281
33328
  if (a.kind === "task" && a.marker !== "abstract") {
33282
- children.push(taskMarker(ol.x + 6, ol.y + 6, a.marker));
33329
+ children.push(taskMarker(ol.x + 6, ol.y + 6, a.marker, t));
33283
33330
  }
33284
33331
  if (isSubproc) {
33285
33332
  const mx = cx;
@@ -33291,53 +33338,53 @@ function renderActivity(ol) {
33291
33338
  width: 12,
33292
33339
  height: 12,
33293
33340
  fill: "none",
33294
- stroke: STROKE,
33341
+ stroke: t.bpmnStroke,
33295
33342
  "stroke-width": 1
33296
33343
  }),
33297
33344
  chunk3WNW5Y7P_cjs.el("path", {
33298
33345
  d: `M ${mx - 4} ${my} L ${mx + 4} ${my} M ${mx} ${my - 4} L ${mx} ${my + 4}`,
33299
- stroke: STROKE,
33346
+ stroke: t.bpmnStroke,
33300
33347
  "stroke-width": 1
33301
33348
  })
33302
33349
  );
33303
33350
  }
33304
33351
  return chunk3WNW5Y7P_cjs.group({ class: `schematex-bpmn-task marker-${a.marker}` }, children);
33305
33352
  }
33306
- function taskMarker(x, y, marker) {
33353
+ function taskMarker(x, y, marker, t) {
33307
33354
  const cx = x + 7;
33308
33355
  const cy = y + 7;
33309
33356
  if (marker === "user") {
33310
33357
  return chunk3WNW5Y7P_cjs.el("g", { class: "marker-user" }, [
33311
- chunk3WNW5Y7P_cjs.el("circle", { cx, cy: cy - 1, r: 2.5, fill: "none", stroke: STROKE, "stroke-width": 1 }),
33358
+ chunk3WNW5Y7P_cjs.el("circle", { cx, cy: cy - 1, r: 2.5, fill: "none", stroke: t.bpmnStroke, "stroke-width": 1 }),
33312
33359
  chunk3WNW5Y7P_cjs.el("path", {
33313
33360
  d: `M ${cx - 5} ${cy + 6} Q ${cx} ${cy + 1} ${cx + 5} ${cy + 6}`,
33314
33361
  fill: "none",
33315
- stroke: STROKE,
33362
+ stroke: t.bpmnStroke,
33316
33363
  "stroke-width": 1
33317
33364
  })
33318
33365
  ]);
33319
33366
  }
33320
33367
  if (marker === "service") {
33321
33368
  return chunk3WNW5Y7P_cjs.el("g", { class: "marker-service" }, [
33322
- chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: 4, fill: "none", stroke: STROKE, "stroke-width": 1 }),
33323
- chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: 1.5, fill: STROKE }),
33369
+ chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: 4, fill: "none", stroke: t.bpmnStroke, "stroke-width": 1 }),
33370
+ chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: 1.5, fill: t.bpmnStroke }),
33324
33371
  chunk3WNW5Y7P_cjs.el("path", {
33325
33372
  d: `M ${cx} ${cy - 6} L ${cx} ${cy - 4} M ${cx} ${cy + 4} L ${cx} ${cy + 6} M ${cx - 6} ${cy} L ${cx - 4} ${cy} M ${cx + 4} ${cy} L ${cx + 6} ${cy}`,
33326
- stroke: STROKE,
33373
+ stroke: t.bpmnStroke,
33327
33374
  "stroke-width": 1
33328
33375
  })
33329
33376
  ]);
33330
33377
  }
33331
33378
  if (marker === "send") {
33332
33379
  return chunk3WNW5Y7P_cjs.el("g", { class: "marker-send" }, [
33333
- chunk3WNW5Y7P_cjs.el("rect", { x: cx - 5, y: cy - 3, width: 10, height: 7, fill: STROKE }),
33334
- chunk3WNW5Y7P_cjs.el("path", { d: `M ${cx - 5} ${cy - 3} L ${cx} ${cy + 1} L ${cx + 5} ${cy - 3}`, stroke: "#ffffff", "stroke-width": 1, fill: "none" })
33380
+ chunk3WNW5Y7P_cjs.el("rect", { x: cx - 5, y: cy - 3, width: 10, height: 7, fill: t.bpmnStroke }),
33381
+ chunk3WNW5Y7P_cjs.el("path", { d: `M ${cx - 5} ${cy - 3} L ${cx} ${cy + 1} L ${cx + 5} ${cy - 3}`, stroke: t.poolFill, "stroke-width": 1, fill: "none" })
33335
33382
  ]);
33336
33383
  }
33337
33384
  if (marker === "receive") {
33338
33385
  return chunk3WNW5Y7P_cjs.el("g", { class: "marker-receive" }, [
33339
- chunk3WNW5Y7P_cjs.el("rect", { x: cx - 5, y: cy - 3, width: 10, height: 7, fill: "none", stroke: STROKE, "stroke-width": 1 }),
33340
- chunk3WNW5Y7P_cjs.el("path", { d: `M ${cx - 5} ${cy - 3} L ${cx} ${cy + 1} L ${cx + 5} ${cy - 3}`, stroke: STROKE, "stroke-width": 1, fill: "none" })
33386
+ chunk3WNW5Y7P_cjs.el("rect", { x: cx - 5, y: cy - 3, width: 10, height: 7, fill: "none", stroke: t.bpmnStroke, "stroke-width": 1 }),
33387
+ chunk3WNW5Y7P_cjs.el("path", { d: `M ${cx - 5} ${cy - 3} L ${cx} ${cy + 1} L ${cx + 5} ${cy - 3}`, stroke: t.bpmnStroke, "stroke-width": 1, fill: "none" })
33341
33388
  ]);
33342
33389
  }
33343
33390
  if (marker === "manual") {
@@ -33345,7 +33392,7 @@ function taskMarker(x, y, marker) {
33345
33392
  chunk3WNW5Y7P_cjs.el("path", {
33346
33393
  d: `M ${cx - 3} ${cy + 4} L ${cx - 3} ${cy} L ${cx - 1.5} ${cy} L ${cx - 1.5} ${cy - 4} L ${cx} ${cy - 4} L ${cx} ${cy} L ${cx + 1.5} ${cy} L ${cx + 1.5} ${cy + 1} L ${cx + 3} ${cy + 1} L ${cx + 3} ${cy + 4} z`,
33347
33394
  fill: "none",
33348
- stroke: STROKE,
33395
+ stroke: t.bpmnStroke,
33349
33396
  "stroke-width": 1
33350
33397
  })
33351
33398
  ]);
@@ -33355,19 +33402,19 @@ function taskMarker(x, y, marker) {
33355
33402
  chunk3WNW5Y7P_cjs.el("path", {
33356
33403
  d: `M ${cx - 4} ${cy - 5} Q ${cx - 6} ${cy} ${cx - 4} ${cy + 5} L ${cx + 4} ${cy + 5} Q ${cx + 2} ${cy} ${cx + 4} ${cy - 5} z`,
33357
33404
  fill: "none",
33358
- stroke: STROKE,
33405
+ stroke: t.bpmnStroke,
33359
33406
  "stroke-width": 1
33360
33407
  }),
33361
33408
  chunk3WNW5Y7P_cjs.el("path", {
33362
33409
  d: `M ${cx - 2} ${cy - 2} L ${cx + 2} ${cy - 2} M ${cx - 2} ${cy} L ${cx + 2} ${cy} M ${cx - 2} ${cy + 2} L ${cx + 2} ${cy + 2}`,
33363
- stroke: STROKE,
33410
+ stroke: t.bpmnStroke,
33364
33411
  "stroke-width": 0.8
33365
33412
  })
33366
33413
  ]);
33367
33414
  }
33368
33415
  return "";
33369
33416
  }
33370
- function renderGateway(ol) {
33417
+ function renderGateway(ol, t) {
33371
33418
  const g = ol.obj;
33372
33419
  const cx = ol.x + ol.width / 2;
33373
33420
  const cy = ol.y + ol.height / 2;
@@ -33379,7 +33426,7 @@ function renderGateway(ol) {
33379
33426
  inner.push(
33380
33427
  chunk3WNW5Y7P_cjs.el("path", {
33381
33428
  d: `M ${cx - a} ${cy - a} L ${cx + a} ${cy + a} M ${cx + a} ${cy - a} L ${cx - a} ${cy + a}`,
33382
- stroke: STROKE,
33429
+ stroke: t.gatewayGlyph,
33383
33430
  "stroke-width": 2.5,
33384
33431
  "stroke-linecap": "round"
33385
33432
  })
@@ -33389,7 +33436,7 @@ function renderGateway(ol) {
33389
33436
  inner.push(
33390
33437
  chunk3WNW5Y7P_cjs.el("path", {
33391
33438
  d: `M ${cx - a} ${cy} L ${cx + a} ${cy} M ${cx} ${cy - a} L ${cx} ${cy + a}`,
33392
- stroke: STROKE,
33439
+ stroke: t.gatewayGlyph,
33393
33440
  "stroke-width": 2.5,
33394
33441
  "stroke-linecap": "round"
33395
33442
  })
@@ -33401,7 +33448,7 @@ function renderGateway(ol) {
33401
33448
  cy,
33402
33449
  r: r6 * 0.45,
33403
33450
  fill: "none",
33404
- stroke: STROKE,
33451
+ stroke: t.gatewayGlyph,
33405
33452
  "stroke-width": 2
33406
33453
  })
33407
33454
  );
@@ -33412,7 +33459,7 @@ function renderGateway(ol) {
33412
33459
  cy,
33413
33460
  r: r6 * 0.55,
33414
33461
  fill: "none",
33415
- stroke: STROKE,
33462
+ stroke: t.gatewayGlyph,
33416
33463
  "stroke-width": 1
33417
33464
  })
33418
33465
  );
@@ -33426,7 +33473,7 @@ function renderGateway(ol) {
33426
33473
  chunk3WNW5Y7P_cjs.el("polygon", {
33427
33474
  points: pts.join(" "),
33428
33475
  fill: "none",
33429
- stroke: STROKE,
33476
+ stroke: t.gatewayGlyph,
33430
33477
  "stroke-width": 1.2
33431
33478
  })
33432
33479
  );
@@ -33439,22 +33486,22 @@ function renderGateway(ol) {
33439
33486
  "text-anchor": "middle",
33440
33487
  "font-family": FONT_FAMILY,
33441
33488
  "font-size": 11,
33442
- fill: STROKE
33489
+ fill: t.bpmnText
33443
33490
  },
33444
33491
  labelStr
33445
33492
  ) : "";
33446
33493
  return chunk3WNW5Y7P_cjs.group({ class: `schematex-bpmn-gateway kind-${g.gatewayKind}` }, [
33447
33494
  chunk3WNW5Y7P_cjs.el("polygon", {
33448
33495
  points,
33449
- fill: GATEWAY_FILL,
33450
- stroke: STROKE,
33496
+ fill: t.gatewayFill,
33497
+ stroke: t.gatewayStroke,
33451
33498
  "stroke-width": 1.5
33452
33499
  }),
33453
33500
  ...inner,
33454
33501
  labelEl
33455
33502
  ]);
33456
33503
  }
33457
- function renderEvent2(ol) {
33504
+ function renderEvent2(ol, t) {
33458
33505
  const e = ol.obj;
33459
33506
  const cx = ol.x + ol.width / 2;
33460
33507
  const cy = ol.y + ol.height / 2;
@@ -33462,14 +33509,16 @@ function renderEvent2(ol) {
33462
33509
  const isEnd = e.kind === "end";
33463
33510
  const isIntermediate = e.kind === "intermediate";
33464
33511
  const strokeW = isEnd ? 3 : 1.2;
33512
+ const fill = isEnd ? t.endFill : isIntermediate ? t.intermediateFill : t.startFill;
33513
+ const ring = isEnd ? t.endStroke : isIntermediate ? t.intermediateStroke : t.startStroke;
33465
33514
  const children = [];
33466
33515
  children.push(
33467
33516
  chunk3WNW5Y7P_cjs.el("circle", {
33468
33517
  cx,
33469
33518
  cy,
33470
33519
  r: r6,
33471
- fill: EVENT_FILL,
33472
- stroke: STROKE,
33520
+ fill,
33521
+ stroke: ring,
33473
33522
  "stroke-width": strokeW
33474
33523
  })
33475
33524
  );
@@ -33480,16 +33529,16 @@ function renderEvent2(ol) {
33480
33529
  cy,
33481
33530
  r: r6 - 3,
33482
33531
  fill: "none",
33483
- stroke: STROKE,
33532
+ stroke: ring,
33484
33533
  "stroke-width": 1.2
33485
33534
  })
33486
33535
  );
33487
33536
  }
33488
33537
  const filled = e.throwCatch === "throw" && (isIntermediate || isEnd);
33489
33538
  if (e.trigger === "message") {
33490
- children.push(messageGlyph(cx, cy, r6 * 0.55, filled));
33539
+ children.push(messageGlyph(cx, cy, r6 * 0.55, filled, t));
33491
33540
  } else if (e.trigger === "timer") {
33492
- children.push(timerGlyph(cx, cy, r6 * 0.55));
33541
+ children.push(timerGlyph(cx, cy, r6 * 0.55, t));
33493
33542
  }
33494
33543
  if (e.label) {
33495
33544
  children.push(
@@ -33500,7 +33549,7 @@ function renderEvent2(ol) {
33500
33549
  "text-anchor": "middle",
33501
33550
  "font-family": FONT_FAMILY,
33502
33551
  "font-size": 11,
33503
- fill: STROKE
33552
+ fill: t.bpmnText
33504
33553
  },
33505
33554
  e.label
33506
33555
  )
@@ -33508,7 +33557,7 @@ function renderEvent2(ol) {
33508
33557
  }
33509
33558
  return chunk3WNW5Y7P_cjs.group({ class: `schematex-bpmn-event kind-${e.kind} trigger-${e.trigger}` }, children);
33510
33559
  }
33511
- function messageGlyph(cx, cy, size, filled) {
33560
+ function messageGlyph(cx, cy, size, filled, t) {
33512
33561
  const w = size;
33513
33562
  const h = size * 0.7;
33514
33563
  const x = cx - w / 2;
@@ -33519,19 +33568,19 @@ function messageGlyph(cx, cy, size, filled) {
33519
33568
  y,
33520
33569
  width: w,
33521
33570
  height: h,
33522
- fill: filled ? STROKE : "#ffffff",
33523
- stroke: STROKE,
33571
+ fill: filled ? t.bpmnStroke : t.poolFill,
33572
+ stroke: t.bpmnStroke,
33524
33573
  "stroke-width": 1
33525
33574
  }),
33526
33575
  chunk3WNW5Y7P_cjs.el("path", {
33527
33576
  d: `M ${x} ${y} L ${cx} ${y + h * 0.55} L ${x + w} ${y}`,
33528
- stroke: filled ? "#ffffff" : STROKE,
33577
+ stroke: filled ? t.poolFill : t.bpmnStroke,
33529
33578
  "stroke-width": 1,
33530
33579
  fill: "none"
33531
33580
  })
33532
33581
  ]);
33533
33582
  }
33534
- function timerGlyph(cx, cy, size) {
33583
+ function timerGlyph(cx, cy, size, t) {
33535
33584
  const r6 = size / 2;
33536
33585
  const ticks = [];
33537
33586
  for (let k = 0; k < 12; k++) {
@@ -33543,18 +33592,18 @@ function timerGlyph(cx, cy, size) {
33543
33592
  ticks.push(`M ${t1x} ${t1y} L ${t2x} ${t2y}`);
33544
33593
  }
33545
33594
  return chunk3WNW5Y7P_cjs.el("g", { class: "trigger-timer" }, [
33546
- chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: r6, fill: "none", stroke: STROKE, "stroke-width": 1 }),
33547
- chunk3WNW5Y7P_cjs.el("path", { d: ticks.join(" "), stroke: STROKE, "stroke-width": 0.8 }),
33595
+ chunk3WNW5Y7P_cjs.el("circle", { cx, cy, r: r6, fill: "none", stroke: t.bpmnStroke, "stroke-width": 1 }),
33596
+ chunk3WNW5Y7P_cjs.el("path", { d: ticks.join(" "), stroke: t.bpmnStroke, "stroke-width": 0.8 }),
33548
33597
  // Hands
33549
33598
  chunk3WNW5Y7P_cjs.el("path", {
33550
33599
  d: `M ${cx} ${cy} L ${cx} ${cy - r6 * 0.7} M ${cx} ${cy} L ${cx + r6 * 0.5} ${cy}`,
33551
- stroke: STROKE,
33600
+ stroke: t.bpmnStroke,
33552
33601
  "stroke-width": 1.2,
33553
33602
  "stroke-linecap": "round"
33554
33603
  })
33555
33604
  ]);
33556
33605
  }
33557
- function renderFlow2(fl) {
33606
+ function renderFlow2(fl, t) {
33558
33607
  const f = fl.flow;
33559
33608
  const isMessage = f.kind === "message";
33560
33609
  const dasharray = isMessage ? "6 4" : void 0;
@@ -33564,7 +33613,7 @@ function renderFlow2(fl) {
33564
33613
  chunk3WNW5Y7P_cjs.path({
33565
33614
  d: fl.path,
33566
33615
  fill: "none",
33567
- stroke: isMessage ? STROKE_LIGHT : STROKE,
33616
+ stroke: isMessage ? t.msgFlowStroke : t.flowStroke,
33568
33617
  "stroke-width": 1.4,
33569
33618
  "stroke-dasharray": dasharray,
33570
33619
  "marker-start": markerStart,
@@ -33577,8 +33626,8 @@ function renderFlow2(fl) {
33577
33626
  children.push(
33578
33627
  chunk3WNW5Y7P_cjs.el("polygon", {
33579
33628
  points: diamondPoints(head.x, head.y, 5),
33580
- fill: "#ffffff",
33581
- stroke: STROKE,
33629
+ fill: t.poolFill,
33630
+ stroke: t.flowStroke,
33582
33631
  "stroke-width": 1
33583
33632
  })
33584
33633
  );
@@ -33590,7 +33639,7 @@ function renderFlow2(fl) {
33590
33639
  children.push(
33591
33640
  chunk3WNW5Y7P_cjs.el("path", {
33592
33641
  d: `M ${head.x - 4} ${head.y + 4} L ${head.x + 4} ${head.y - 4}`,
33593
- stroke: STROKE,
33642
+ stroke: t.flowStroke,
33594
33643
  "stroke-width": 1.5
33595
33644
  })
33596
33645
  );
@@ -33605,7 +33654,7 @@ function renderFlow2(fl) {
33605
33654
  "text-anchor": "middle",
33606
33655
  "font-family": FONT_FAMILY,
33607
33656
  "font-size": 10,
33608
- fill: STROKE
33657
+ fill: t.bpmnText
33609
33658
  },
33610
33659
  f.label
33611
33660
  )
@@ -33637,7 +33686,7 @@ var bpmn = {
33637
33686
  },
33638
33687
  parse: parseBpmn,
33639
33688
  render(text2, config) {
33640
- return renderBpmn(text2);
33689
+ return renderBpmn(text2, config);
33641
33690
  }
33642
33691
  };
33643
33692
 
@@ -35926,24 +35975,24 @@ var sfc = {
35926
35975
 
35927
35976
  // src/core/api.ts
35928
35977
  var plugins = [
35929
- chunkNFZMNKOR_cjs.genogram,
35930
- chunk2SZJQVPN_cjs.ecomap,
35931
- chunkKGOZBABH_cjs.pedigree,
35932
- chunkDHI7YAQJ_cjs.phylo,
35933
- chunkB5AQ3CG3_cjs.sociogram,
35934
- chunkNXU4XKLY_cjs.timing,
35935
- chunkD34VGLSE_cjs.logic,
35936
- chunkJIJWGHRN_cjs.circuit,
35937
- chunk6L46VIXI_cjs.blockdiagram,
35938
- chunkJIUC4DRS_cjs.ladder,
35939
- chunkAJJYWXZB_cjs.sld,
35940
- chunkLENRV7ZJ_cjs.entity,
35941
- chunkT5KHNJ67_cjs.fishbone,
35942
- chunkYMFYPB5Y_cjs.venn,
35943
- chunkDR3DDDQY_cjs.flowchart,
35978
+ chunk7JJQEECD_cjs.genogram,
35979
+ chunkV3JTVTPY_cjs.ecomap,
35980
+ chunkGYTU7L4L_cjs.pedigree,
35981
+ chunkMYVY55DO_cjs.phylo,
35982
+ chunkHILYXWGJ_cjs.sociogram,
35983
+ chunkJHJJT5H5_cjs.timing,
35984
+ chunk4MGALM2C_cjs.logic,
35985
+ chunkXA6XIAMN_cjs.circuit,
35986
+ chunk2ASZMLC3_cjs.blockdiagram,
35987
+ chunkWFVRUUJW_cjs.ladder,
35988
+ chunkL2NY4XEY_cjs.sld,
35989
+ chunkVYAUTNHC_cjs.entity,
35990
+ chunkPSQGLE6U_cjs.fishbone,
35991
+ chunk2A5HJFOX_cjs.venn,
35992
+ chunkMUE45N2A_cjs.flowchart,
35944
35993
  mindmap,
35945
35994
  matrix,
35946
- chunkQ2YRJHFB_cjs.orgchart,
35995
+ chunk6BJKQULN_cjs.orgchart,
35947
35996
  decisiontree,
35948
35997
  timeline,
35949
35998
  state,
@@ -36149,5 +36198,5 @@ exports.timeline = timeline;
36149
36198
  exports.umlclass = umlclass;
36150
36199
  exports.usecase = usecase;
36151
36200
  exports.welding = welding;
36152
- //# sourceMappingURL=chunk-UGB42BGK.cjs.map
36153
- //# sourceMappingURL=chunk-UGB42BGK.cjs.map
36201
+ //# sourceMappingURL=chunk-NTQBNBBP.cjs.map
36202
+ //# sourceMappingURL=chunk-NTQBNBBP.cjs.map