@umami/shiso 1.12.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/chunks/App.js +76 -49
  2. package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
  3. package/dist/chunks/arc.js +130 -0
  4. package/dist/chunks/architecture-7GRP2DOG.js +4 -0
  5. package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
  6. package/dist/chunks/array.js +8 -0
  7. package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
  8. package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
  9. package/dist/chunks/channel.js +9 -0
  10. package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
  11. package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
  12. package/dist/chunks/chunk-5VM5RSS4.js +21 -0
  13. package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
  14. package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
  15. package/dist/chunks/chunk-F27PBJKO.js +95 -0
  16. package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
  17. package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
  18. package/dist/chunks/chunk-GVQU2GXP.js +58 -0
  19. package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
  20. package/dist/chunks/chunk-JWPE2WC7.js +12 -0
  21. package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
  22. package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
  23. package/dist/chunks/chunk-P2QGCYS3.js +95 -0
  24. package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
  25. package/dist/chunks/chunk-PWAF6VOD.js +467 -0
  26. package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
  27. package/dist/chunks/chunk-SVP7TREG.js +686 -0
  28. package/dist/chunks/chunk-TICWLB2K.js +3800 -0
  29. package/dist/chunks/chunk-XXDRQBXY.js +12 -0
  30. package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
  31. package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
  32. package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
  33. package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
  34. package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
  35. package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
  36. package/dist/chunks/cytoscape.esm.js +28282 -0
  37. package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
  38. package/dist/chunks/dagre.js +4235 -0
  39. package/dist/chunks/defaultLocale.js +246 -0
  40. package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
  41. package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
  42. package/dist/chunks/diagram-VSXAHHWV.js +553 -0
  43. package/dist/chunks/diagram-VX7I27RA.js +798 -0
  44. package/dist/chunks/diagram-Z3DM3KII.js +186 -0
  45. package/dist/chunks/dist.js +92 -0
  46. package/dist/chunks/docs.js +987 -91
  47. package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
  48. package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
  49. package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
  50. package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
  51. package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
  52. package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
  53. package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
  54. package/dist/chunks/graphlib.js +4194 -0
  55. package/dist/chunks/info-A6RAGUB7.js +4 -0
  56. package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
  57. package/dist/chunks/init.js +14 -0
  58. package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
  59. package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
  60. package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
  61. package/dist/chunks/katex.js +26463 -0
  62. package/dist/chunks/line.js +48 -0
  63. package/dist/chunks/linear.js +391 -0
  64. package/dist/chunks/mermaid-parser.core.js +754 -0
  65. package/dist/chunks/mermaid.core.js +4898 -0
  66. package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
  67. package/dist/chunks/ordinal.js +84 -0
  68. package/dist/chunks/packet-AYTQ26CC.js +4 -0
  69. package/dist/chunks/path.js +106 -0
  70. package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
  71. package/dist/chunks/pie-WAS4IAKB.js +4 -0
  72. package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
  73. package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
  74. package/dist/chunks/radar-RG4KPBEZ.js +4 -0
  75. package/dist/chunks/railroad-74A4TZTK.js +4 -0
  76. package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
  77. package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
  78. package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
  79. package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
  80. package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
  81. package/dist/chunks/rough.esm.js +1396 -0
  82. package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
  83. package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
  84. package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
  85. package/dist/chunks/src.js +2653 -0
  86. package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
  87. package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
  88. package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
  89. package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
  90. package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
  91. package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
  92. package/dist/chunks/treemap-WGGIJYW6.js +4 -0
  93. package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
  94. package/dist/chunks/wardley-WFR3VGLG.js +4 -0
  95. package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
  96. package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
  97. package/dist/components.js +2 -2
  98. package/dist/entry-client.js +1 -1
  99. package/dist/entry-server.js +1 -1
  100. package/docs.schema.json +1 -1
  101. package/package.json +2 -1
  102. package/scripts/expand-navigation-globs.mjs +77 -8
  103. package/src/components/CodeBlock.tsx +36 -0
  104. package/src/components/Docs.tsx +44 -21
  105. package/src/components/OpenApiOperation.tsx +28 -20
  106. package/src/components/SideNav.tsx +8 -3
  107. package/src/components/docs/Changelog.tsx +163 -0
  108. package/src/components/docs/Mermaid.tsx +164 -0
  109. package/src/components/docs/Panel.tsx +23 -0
  110. package/src/components/docs/ParamField.tsx +17 -5
  111. package/src/components/docs/PropertiesTable.tsx +2 -2
  112. package/src/components/docs/ResponseField.tsx +17 -5
  113. package/src/components/docs/Tiles.tsx +59 -0
  114. package/src/components/docs/Tree.tsx +359 -0
  115. package/src/components/docs/Update.tsx +72 -0
  116. package/src/components/docs/index.ts +7 -0
  117. package/src/components/docs/panel-context.tsx +25 -0
  118. package/src/components/docs/styles.ts +49 -0
  119. package/src/components/icons/index.ts +4 -0
  120. package/src/lib/rehype-shiki.ts +18 -1
  121. package/types/components.d.ts +79 -0
@@ -0,0 +1,291 @@
1
+ import { n as parse } from "./mermaid-parser.core.js";
2
+ import { n as __name } from "./chunk-Y2CYZVJY.js";
3
+ import { m as log } from "./src.js";
4
+ import { D as getThemeVariables3, H as setAccDescription, K as setDiagramTitle, U as setAccTitle, a as clear, b as getConfig, c as configureSvgSize, f as defaultConfig_default, v as getAccDescription, w as getDiagramTitle, y as getAccTitle } from "./chunk-DU6HZSFF.js";
5
+ import { i as cleanAndMerge } from "./chunk-75Z2AOVW.js";
6
+ import { t as populateCommonDb } from "./chunk-JWPE2WC7.js";
7
+ import { f as selectSvgElement } from "./mermaid.core.js";
8
+
9
+ //#region ../../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/diagram-UQ7AKVKN.mjs
10
+ var defaultOptions = {
11
+ showLegend: true,
12
+ ticks: 5,
13
+ max: null,
14
+ min: 0,
15
+ graticule: "circle"
16
+ };
17
+ var MAX_TICKS = 32;
18
+ var defaultRadarData = {
19
+ axes: [],
20
+ curves: [],
21
+ options: defaultOptions
22
+ };
23
+ var data = structuredClone(defaultRadarData);
24
+ var DEFAULT_RADAR_CONFIG = defaultConfig_default.radar;
25
+ var getConfig2 = /* @__PURE__ */ __name(() => {
26
+ return cleanAndMerge({
27
+ ...DEFAULT_RADAR_CONFIG,
28
+ ...getConfig().radar
29
+ });
30
+ }, "getConfig");
31
+ var getAxes = /* @__PURE__ */ __name(() => data.axes, "getAxes");
32
+ var getCurves = /* @__PURE__ */ __name(() => data.curves, "getCurves");
33
+ var getOptions = /* @__PURE__ */ __name(() => data.options, "getOptions");
34
+ var setAxes = /* @__PURE__ */ __name((axes) => {
35
+ data.axes = axes.map((axis) => {
36
+ return {
37
+ name: axis.name,
38
+ label: axis.label ?? axis.name
39
+ };
40
+ });
41
+ }, "setAxes");
42
+ var setCurves = /* @__PURE__ */ __name((curves) => {
43
+ data.curves = curves.map((curve) => {
44
+ return {
45
+ name: curve.name,
46
+ label: curve.label ?? curve.name,
47
+ entries: computeCurveEntries(curve.entries)
48
+ };
49
+ });
50
+ }, "setCurves");
51
+ var computeCurveEntries = /* @__PURE__ */ __name((entries) => {
52
+ if (entries[0].axis == void 0) return entries.map((entry) => entry.value);
53
+ const axes = getAxes();
54
+ if (axes.length === 0) throw new Error("Axes must be populated before curves for reference entries");
55
+ return axes.map((axis) => {
56
+ const entry = entries.find((entry2) => entry2.axis?.$refText === axis.name);
57
+ if (entry === void 0) throw new Error("Missing entry for axis " + axis.label);
58
+ return entry.value;
59
+ });
60
+ }, "computeCurveEntries");
61
+ var db = {
62
+ getAxes,
63
+ getCurves,
64
+ getOptions,
65
+ setAxes,
66
+ setCurves,
67
+ setOptions: /* @__PURE__ */ __name((options) => {
68
+ const optionMap = options.reduce((acc, option) => {
69
+ acc[option.name] = option;
70
+ return acc;
71
+ }, {});
72
+ data.options = {
73
+ showLegend: optionMap.showLegend?.value ?? defaultOptions.showLegend,
74
+ ticks: optionMap.ticks?.value ?? defaultOptions.ticks,
75
+ max: optionMap.max?.value ?? defaultOptions.max,
76
+ min: optionMap.min?.value ?? defaultOptions.min,
77
+ graticule: optionMap.graticule?.value ?? defaultOptions.graticule
78
+ };
79
+ if (data.options.ticks > MAX_TICKS) {
80
+ log.warn(`Radar diagram ticks (${data.options.ticks}) exceeds maximum allowed (${MAX_TICKS}). Using ${MAX_TICKS} instead.`);
81
+ data.options.ticks = MAX_TICKS;
82
+ }
83
+ }, "setOptions"),
84
+ getConfig: getConfig2,
85
+ clear: /* @__PURE__ */ __name(() => {
86
+ clear();
87
+ data = structuredClone(defaultRadarData);
88
+ }, "clear"),
89
+ setAccTitle,
90
+ getAccTitle,
91
+ setDiagramTitle,
92
+ getDiagramTitle,
93
+ getAccDescription,
94
+ setAccDescription
95
+ };
96
+ var populate = /* @__PURE__ */ __name((ast) => {
97
+ populateCommonDb(ast, db);
98
+ const { axes, curves, options } = ast;
99
+ db.setAxes(axes);
100
+ db.setCurves(curves);
101
+ db.setOptions(options);
102
+ }, "populate");
103
+ var parser = { parse: /* @__PURE__ */ __name(async (input) => {
104
+ const ast = await parse("radar", input);
105
+ log.debug(ast);
106
+ populate(ast);
107
+ }, "parse") };
108
+ var draw = /* @__PURE__ */ __name((_text, id, _version, diagram2) => {
109
+ const db2 = diagram2.db;
110
+ const axes = db2.getAxes();
111
+ const curves = db2.getCurves();
112
+ const options = db2.getOptions();
113
+ const config = db2.getConfig();
114
+ const title = db2.getDiagramTitle();
115
+ const g = drawFrame(selectSvgElement(id), config);
116
+ const maxValue = options.max ?? Math.max(...curves.map((curve) => Math.max(...curve.entries)));
117
+ const minValue = options.min;
118
+ const radius = Math.min(config.width, config.height) / 2;
119
+ drawGraticule(g, axes, radius, options.ticks, options.graticule);
120
+ drawAxes(g, axes, radius, config);
121
+ drawCurves(g, axes, curves, minValue, maxValue, options.graticule, config);
122
+ drawLegend(g, curves, options.showLegend, config);
123
+ g.append("text").attr("class", "radarTitle").text(title).attr("x", 0).attr("y", -config.height / 2 - config.marginTop);
124
+ }, "draw");
125
+ var drawFrame = /* @__PURE__ */ __name((svg, config) => {
126
+ const totalWidth = config.width + config.marginLeft + config.marginRight;
127
+ const totalHeight = config.height + config.marginTop + config.marginBottom;
128
+ const center = {
129
+ x: config.marginLeft + config.width / 2,
130
+ y: config.marginTop + config.height / 2
131
+ };
132
+ configureSvgSize(svg, totalHeight, totalWidth, config.useMaxWidth ?? true);
133
+ svg.attr("viewBox", `0 0 ${totalWidth} ${totalHeight}`).attr("overflow", "visible");
134
+ return svg.append("g").attr("transform", `translate(${center.x}, ${center.y})`);
135
+ }, "drawFrame");
136
+ var drawGraticule = /* @__PURE__ */ __name((g, axes, radius, ticks, graticule) => {
137
+ if (graticule === "circle") for (let i = 0; i < ticks; i++) {
138
+ const r = radius * (i + 1) / ticks;
139
+ g.append("circle").attr("r", r).attr("class", "radarGraticule");
140
+ }
141
+ else if (graticule === "polygon") {
142
+ const numAxes = axes.length;
143
+ for (let i = 0; i < ticks; i++) {
144
+ const r = radius * (i + 1) / ticks;
145
+ const points = axes.map((_, j) => {
146
+ const angle = 2 * j * Math.PI / numAxes - Math.PI / 2;
147
+ return `${r * Math.cos(angle)},${r * Math.sin(angle)}`;
148
+ }).join(" ");
149
+ g.append("polygon").attr("points", points).attr("class", "radarGraticule");
150
+ }
151
+ }
152
+ }, "drawGraticule");
153
+ var drawAxes = /* @__PURE__ */ __name((g, axes, radius, config) => {
154
+ const numAxes = axes.length;
155
+ for (let i = 0; i < numAxes; i++) {
156
+ const label = axes[i].label;
157
+ const angle = 2 * i * Math.PI / numAxes - Math.PI / 2;
158
+ const cosA = Math.cos(angle);
159
+ const sinA = Math.sin(angle);
160
+ g.append("line").attr("x1", 0).attr("y1", 0).attr("x2", radius * config.axisScaleFactor * cosA).attr("y2", radius * config.axisScaleFactor * sinA).attr("class", "radarAxisLine");
161
+ const textAnchor = cosA > .01 ? "start" : cosA < -.01 ? "end" : "middle";
162
+ const dominantBaseline = sinA > .01 ? "hanging" : sinA < -.01 ? "auto" : "central";
163
+ const labelPad = 4;
164
+ g.append("text").text(label).attr("x", radius * config.axisLabelFactor * cosA + labelPad * cosA).attr("y", radius * config.axisLabelFactor * sinA + labelPad * sinA).attr("text-anchor", textAnchor).attr("dominant-baseline", dominantBaseline).attr("class", "radarAxisLabel");
165
+ }
166
+ }, "drawAxes");
167
+ function drawCurves(g, axes, curves, minValue, maxValue, graticule, config) {
168
+ const numAxes = axes.length;
169
+ const radius = Math.min(config.width, config.height) / 2;
170
+ curves.forEach((curve, index) => {
171
+ if (curve.entries.length !== numAxes) return;
172
+ const points = curve.entries.map((entry, i) => {
173
+ const angle = 2 * Math.PI * i / numAxes - Math.PI / 2;
174
+ const r = relativeRadius(entry, minValue, maxValue, radius);
175
+ return {
176
+ x: r * Math.cos(angle),
177
+ y: r * Math.sin(angle)
178
+ };
179
+ });
180
+ if (graticule === "circle") g.append("path").attr("d", closedRoundCurve(points, config.curveTension)).attr("class", `radarCurve-${index}`);
181
+ else if (graticule === "polygon") g.append("polygon").attr("points", points.map((p) => `${p.x},${p.y}`).join(" ")).attr("class", `radarCurve-${index}`);
182
+ });
183
+ }
184
+ __name(drawCurves, "drawCurves");
185
+ function relativeRadius(value, minValue, maxValue, radius) {
186
+ return radius * (Math.min(Math.max(value, minValue), maxValue) - minValue) / (maxValue - minValue);
187
+ }
188
+ __name(relativeRadius, "relativeRadius");
189
+ function closedRoundCurve(points, tension) {
190
+ const numPoints = points.length;
191
+ let d = `M${points[0].x},${points[0].y}`;
192
+ for (let i = 0; i < numPoints; i++) {
193
+ const p0 = points[(i - 1 + numPoints) % numPoints];
194
+ const p1 = points[i];
195
+ const p2 = points[(i + 1) % numPoints];
196
+ const p3 = points[(i + 2) % numPoints];
197
+ const cp1 = {
198
+ x: p1.x + (p2.x - p0.x) * tension,
199
+ y: p1.y + (p2.y - p0.y) * tension
200
+ };
201
+ const cp2 = {
202
+ x: p2.x - (p3.x - p1.x) * tension,
203
+ y: p2.y - (p3.y - p1.y) * tension
204
+ };
205
+ d += ` C${cp1.x},${cp1.y} ${cp2.x},${cp2.y} ${p2.x},${p2.y}`;
206
+ }
207
+ return `${d} Z`;
208
+ }
209
+ __name(closedRoundCurve, "closedRoundCurve");
210
+ function drawLegend(g, curves, showLegend, config) {
211
+ if (!showLegend) return;
212
+ const legendX = (config.width / 2 + config.marginRight) * 3 / 4;
213
+ const legendY = -(config.height / 2 + config.marginTop) * 3 / 4;
214
+ const lineHeight = 20;
215
+ curves.forEach((curve, index) => {
216
+ const itemGroup = g.append("g").attr("transform", `translate(${legendX}, ${legendY + index * lineHeight})`);
217
+ itemGroup.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${index}`);
218
+ itemGroup.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(curve.label);
219
+ });
220
+ }
221
+ __name(drawLegend, "drawLegend");
222
+ var renderer = { draw };
223
+ var genIndexStyles = /* @__PURE__ */ __name((themeVariables, radarOptions) => {
224
+ let sections = "";
225
+ for (let i = 0; i < themeVariables.THEME_COLOR_LIMIT; i++) {
226
+ const indexColor = themeVariables[`cScale${i}`];
227
+ sections += `
228
+ .radarCurve-${i} {
229
+ color: ${indexColor};
230
+ fill: ${indexColor};
231
+ fill-opacity: ${radarOptions.curveOpacity};
232
+ stroke: ${indexColor};
233
+ stroke-width: ${radarOptions.curveStrokeWidth};
234
+ }
235
+ .radarLegendBox-${i} {
236
+ fill: ${indexColor};
237
+ fill-opacity: ${radarOptions.curveOpacity};
238
+ stroke: ${indexColor};
239
+ }
240
+ `;
241
+ }
242
+ return sections;
243
+ }, "genIndexStyles");
244
+ var buildRadarStyleOptions = /* @__PURE__ */ __name((radar) => {
245
+ const defaultThemeVariables = getThemeVariables3();
246
+ const currentConfig = getConfig();
247
+ const themeVariables = cleanAndMerge(defaultThemeVariables, currentConfig.themeVariables);
248
+ return {
249
+ themeVariables,
250
+ radarOptions: cleanAndMerge(themeVariables.radar, radar)
251
+ };
252
+ }, "buildRadarStyleOptions");
253
+ var diagram = {
254
+ parser,
255
+ db,
256
+ renderer,
257
+ styles: /* @__PURE__ */ __name(({ radar } = {}) => {
258
+ const { themeVariables, radarOptions } = buildRadarStyleOptions(radar);
259
+ return `
260
+ .radarTitle {
261
+ font-size: ${themeVariables.fontSize};
262
+ color: ${themeVariables.titleColor};
263
+ dominant-baseline: hanging;
264
+ text-anchor: middle;
265
+ }
266
+ .radarAxisLine {
267
+ stroke: ${radarOptions.axisColor};
268
+ stroke-width: ${radarOptions.axisStrokeWidth};
269
+ }
270
+ .radarAxisLabel {
271
+ font-size: ${radarOptions.axisLabelFontSize}px;
272
+ color: ${radarOptions.axisColor};
273
+ }
274
+ .radarGraticule {
275
+ fill: ${radarOptions.graticuleColor};
276
+ fill-opacity: ${radarOptions.graticuleOpacity};
277
+ stroke: ${radarOptions.graticuleColor};
278
+ stroke-width: ${radarOptions.graticuleStrokeWidth};
279
+ }
280
+ .radarLegendText {
281
+ text-anchor: start;
282
+ font-size: ${radarOptions.legendFontSize}px;
283
+ dominant-baseline: hanging;
284
+ }
285
+ ${genIndexStyles(themeVariables, radarOptions)}
286
+ `;
287
+ }, "styles")
288
+ };
289
+
290
+ //#endregion
291
+ export { diagram };