@toolr/ui-design 0.1.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 (112) hide show
  1. package/README.md +63 -0
  2. package/components/content/info-panel-primitives.tsx +297 -0
  3. package/components/diagrams/diagram-utils.tsx +908 -0
  4. package/components/hooks/use-click-outside.ts +27 -0
  5. package/components/hooks/use-dropdown-max-height.ts +20 -0
  6. package/components/hooks/use-navigation-history.ts +94 -0
  7. package/components/lib/ai-tools.tsx +44 -0
  8. package/components/lib/cn.ts +6 -0
  9. package/components/lib/form-colors.ts +32 -0
  10. package/components/lib/theme-engine.ts +97 -0
  11. package/components/lib/toolr-brand.tsx +31 -0
  12. package/components/sections/ai-tools-paths/index.ts +37 -0
  13. package/components/sections/ai-tools-paths/tools-paths-panel.tsx +212 -0
  14. package/components/sections/ai-tools-paths/types.ts +111 -0
  15. package/components/sections/ai-tools-paths/use-tools-paths.ts +159 -0
  16. package/components/sections/captured-issues/captured-issues-panel.tsx +214 -0
  17. package/components/sections/captured-issues/index.ts +38 -0
  18. package/components/sections/captured-issues/types.ts +113 -0
  19. package/components/sections/captured-issues/use-captured-issues.ts +111 -0
  20. package/components/sections/golden-snapshots/file-diff-viewer.tsx +420 -0
  21. package/components/sections/golden-snapshots/golden-sync-panel.tsx +223 -0
  22. package/components/sections/golden-snapshots/index.ts +145 -0
  23. package/components/sections/golden-snapshots/snapshot-manager.tsx +200 -0
  24. package/components/sections/golden-snapshots/status-overview.tsx +305 -0
  25. package/components/sections/golden-snapshots/types.ts +288 -0
  26. package/components/sections/golden-snapshots/use-golden-sync.ts +477 -0
  27. package/components/sections/golden-snapshots/version-manager.tsx +186 -0
  28. package/components/sections/prompt-editor/file-type-tabbed-prompt-editor.tsx +210 -0
  29. package/components/sections/prompt-editor/index.ts +121 -0
  30. package/components/sections/prompt-editor/simulator-prompt-editor.tsx +276 -0
  31. package/components/sections/prompt-editor/tabbed-prompt-editor.tsx +514 -0
  32. package/components/sections/prompt-editor/types.ts +101 -0
  33. package/components/sections/prompt-editor/use-prompt-editor.ts +131 -0
  34. package/components/sections/report-bug/error-logger.ts +392 -0
  35. package/components/sections/report-bug/index.ts +59 -0
  36. package/components/sections/report-bug/issue-reporter-api.ts +83 -0
  37. package/components/sections/report-bug/report-bug-form.tsx +282 -0
  38. package/components/sections/report-bug/screenshot-uploader.tsx +228 -0
  39. package/components/sections/report-bug/use-report-bug.ts +170 -0
  40. package/components/sections/snapshot-browser/index.ts +53 -0
  41. package/components/sections/snapshot-browser/snapshot-browser-panel.tsx +147 -0
  42. package/components/sections/snapshot-browser/snapshot-tree.tsx +451 -0
  43. package/components/sections/snapshot-browser/types.ts +106 -0
  44. package/components/sections/snapshot-browser/use-snapshot-browser.ts +125 -0
  45. package/components/sections/snippets-editor/index.ts +31 -0
  46. package/components/sections/snippets-editor/snippets-editor.tsx +381 -0
  47. package/components/sections/snippets-editor/types.ts +48 -0
  48. package/components/sections/snippets-editor/use-snippets-editor.ts +217 -0
  49. package/components/ui/action-dialog.tsx +309 -0
  50. package/components/ui/ai-action-button.tsx +137 -0
  51. package/components/ui/ai-execution-action-buttons.tsx +106 -0
  52. package/components/ui/badge.tsx +67 -0
  53. package/components/ui/bottom-panel-header.tsx +240 -0
  54. package/components/ui/breadcrumb.tsx +168 -0
  55. package/components/ui/checkbox.tsx +102 -0
  56. package/components/ui/collapsible-section.tsx +100 -0
  57. package/components/ui/confirm-badge.tsx +71 -0
  58. package/components/ui/detail-section.tsx +67 -0
  59. package/components/ui/detail-view-wrapper.tsx +55 -0
  60. package/components/ui/editor-placeholder-card.tsx +197 -0
  61. package/components/ui/editor-toolbar.tsx +123 -0
  62. package/components/ui/execution-details-panel.tsx +93 -0
  63. package/components/ui/extension-list-card.tsx +105 -0
  64. package/components/ui/file-structure-section.tsx +373 -0
  65. package/components/ui/file-tree.tsx +171 -0
  66. package/components/ui/files-panel.tsx +251 -0
  67. package/components/ui/filter-dropdown.tsx +173 -0
  68. package/components/ui/form-actions.tsx +127 -0
  69. package/components/ui/frontmatter-form-header.tsx +80 -0
  70. package/components/ui/icon-button.tsx +388 -0
  71. package/components/ui/input.tsx +211 -0
  72. package/components/ui/label.tsx +159 -0
  73. package/components/ui/layout-tab-bar.tsx +289 -0
  74. package/components/ui/modal.tsx +194 -0
  75. package/components/ui/nav-card.tsx +81 -0
  76. package/components/ui/navigation-bar.tsx +285 -0
  77. package/components/ui/number-input.tsx +165 -0
  78. package/components/ui/registry-browser.tsx +261 -0
  79. package/components/ui/registry-card.tsx +710 -0
  80. package/components/ui/registry-detail.tsx +224 -0
  81. package/components/ui/resizable-textarea.tsx +290 -0
  82. package/components/ui/scope-badge.tsx +67 -0
  83. package/components/ui/segmented-toggle.tsx +133 -0
  84. package/components/ui/select.tsx +172 -0
  85. package/components/ui/selection-grid.tsx +313 -0
  86. package/components/ui/setting-row.tsx +97 -0
  87. package/components/ui/snapshot-card.tsx +107 -0
  88. package/components/ui/snippets-panel.tsx +161 -0
  89. package/components/ui/sort-dropdown.tsx +109 -0
  90. package/components/ui/status-card.tsx +96 -0
  91. package/components/ui/tab-bar.tsx +340 -0
  92. package/components/ui/toggle.tsx +142 -0
  93. package/components/ui/tooltip.tsx +326 -0
  94. package/dist/content.d.ts +110 -0
  95. package/dist/content.js +195 -0
  96. package/dist/diagrams.d.ts +371 -0
  97. package/dist/diagrams.js +702 -0
  98. package/dist/index.d.ts +2714 -0
  99. package/dist/index.js +11220 -0
  100. package/dist/preset.d.ts +24 -0
  101. package/dist/preset.js +17 -0
  102. package/dist/tokens/tokens/primitives.css +45 -0
  103. package/dist/tokens/tokens/semantic.css +46 -0
  104. package/dist/tokens/tokens/theme.css +11 -0
  105. package/dist/tokens/tokens/tokens.json +65 -0
  106. package/index.ts +123 -0
  107. package/package.json +63 -0
  108. package/tailwind-preset.ts +22 -0
  109. package/tokens/primitives.css +45 -0
  110. package/tokens/semantic.css +46 -0
  111. package/tokens/theme.css +11 -0
  112. package/tokens/tokens.json +65 -0
@@ -0,0 +1,702 @@
1
+ // components/diagrams/diagram-utils.tsx
2
+ import { motion } from "motion/react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ var VB_W = 420;
5
+ var VB_H = { compact: 200, standard: 240, tall: 280, extended: 340, large: 420, xlarge: 520, xxlarge: 580 };
6
+ var viewBox = {
7
+ compact: `0 0 ${VB_W} ${VB_H.compact}`,
8
+ standard: `0 0 ${VB_W} ${VB_H.standard}`,
9
+ tall: `0 0 ${VB_W} ${VB_H.tall}`,
10
+ extended: `0 0 ${VB_W} ${VB_H.extended}`,
11
+ large: `0 0 ${VB_W} ${VB_H.large}`,
12
+ xlarge: `0 0 ${VB_W} ${VB_H.xlarge}`,
13
+ xxlarge: `0 0 ${VB_W} ${VB_H.xxlarge}`
14
+ };
15
+ var font = {
16
+ icon: 10,
17
+ // 30px at 3× scale – decorative icon-text inside circles
18
+ primary: 5.33,
19
+ // 16px at 3× scale
20
+ secondary: 4.67,
21
+ // 14px at 3× scale
22
+ small: 4,
23
+ // 12px at 3× scale
24
+ micro: 3
25
+ // 9px at 3× scale – constrained layouts (multi-line in tiny boxes)
26
+ };
27
+ var box = {
28
+ nodeMain: { w: 120, h: 55 },
29
+ nodeCard: { w: 95, h: 50 },
30
+ nodeSmall: { w: 80, h: 32 },
31
+ infoBox: { w: 360, h: 28 },
32
+ codeBlock: { w: 360, h: 28 }
33
+ };
34
+ var spacing = {
35
+ margin: 20,
36
+ gapSm: 10,
37
+ gapMd: 20,
38
+ gapLg: 35,
39
+ centerX: 210,
40
+ titleY: 18
41
+ };
42
+ var radius = { lg: 8, md: 6, sm: 4 };
43
+ var stroke = {
44
+ bold: 2,
45
+ normal: 1.5,
46
+ thin: 1,
47
+ hairline: 0.5
48
+ };
49
+ var color = {
50
+ textBright: "#e5e7eb",
51
+ textMedium: "#9ca3af",
52
+ textDim: "#6b7280",
53
+ bgDark: "#1f2937",
54
+ bgDarker: "#0f172a",
55
+ border: "#374151"
56
+ };
57
+ var tint = {
58
+ red: "#7f1d1d",
59
+ emerald: "#064e3b",
60
+ blue: "#1e3a5f"
61
+ };
62
+ var accent = {
63
+ cyan: "#22d3ee",
64
+ teal: "#2dd4bf",
65
+ blue: "#60a5fa",
66
+ purple: "#a78bfa",
67
+ violet: "#c084fc",
68
+ green: "#34d399",
69
+ lime: "#4ade80",
70
+ yellow: "#fbbf24",
71
+ orange: "#fb923c",
72
+ red: "#ef4444",
73
+ redLight: "#f87171",
74
+ pink: "#f472b6",
75
+ pinkLight: "#fda4af",
76
+ indigo: "#a5b4fc",
77
+ emerald: "#10b981",
78
+ amber: "#f59e0b",
79
+ fuchsia: "#d946ef",
80
+ rose: "#fb7185",
81
+ sky: "#38bdf8"
82
+ };
83
+ var D = {
84
+ viewBox,
85
+ font,
86
+ box,
87
+ spacing,
88
+ radius,
89
+ stroke,
90
+ color,
91
+ tint,
92
+ accent
93
+ };
94
+ function DiagramWrapper({ children }) {
95
+ return /* @__PURE__ */ jsx(
96
+ motion.div,
97
+ {
98
+ className: "relative flex flex-col h-full",
99
+ initial: { opacity: 0 },
100
+ animate: { opacity: 1 },
101
+ transition: { duration: 0.3, ease: "easeOut" },
102
+ children: /* @__PURE__ */ jsx("div", { className: "flex-1 max-w-[1260px] mx-auto w-full", children })
103
+ }
104
+ );
105
+ }
106
+ function stagger(staggerDelay = 0.05, delayStart = 0) {
107
+ return {
108
+ hidden: {},
109
+ visible: {
110
+ transition: {
111
+ delayChildren: delayStart,
112
+ staggerChildren: staggerDelay
113
+ }
114
+ }
115
+ };
116
+ }
117
+ var item = {
118
+ hidden: { opacity: 0, y: 8 },
119
+ visible: {
120
+ opacity: 1,
121
+ y: 0,
122
+ transition: { duration: 0.35, ease: "easeOut" }
123
+ }
124
+ };
125
+ var slideInItem = {
126
+ hidden: { opacity: 0, x: -10 },
127
+ visible: {
128
+ opacity: 1,
129
+ x: 0,
130
+ transition: { duration: 0.35, ease: "easeOut" }
131
+ }
132
+ };
133
+ var scaleItem = {
134
+ hidden: { opacity: 0, scale: 0.85 },
135
+ visible: {
136
+ opacity: 1,
137
+ scale: 1,
138
+ transition: { duration: 0.3, ease: "easeOut" }
139
+ }
140
+ };
141
+ function AnimatedDashPath({
142
+ d,
143
+ stroke: stroke2,
144
+ strokeWidth = 1.5,
145
+ dashArray = "4 3",
146
+ opacity = 0.6,
147
+ duration = 1.2,
148
+ delay = 0
149
+ }) {
150
+ return /* @__PURE__ */ jsx(
151
+ motion.path,
152
+ {
153
+ d,
154
+ stroke: stroke2,
155
+ strokeWidth,
156
+ strokeDasharray: dashArray,
157
+ opacity,
158
+ fill: "none",
159
+ initial: { strokeDashoffset: 0 },
160
+ animate: { strokeDashoffset: -14 },
161
+ transition: {
162
+ duration,
163
+ delay,
164
+ ease: "linear",
165
+ repeat: Infinity
166
+ }
167
+ }
168
+ );
169
+ }
170
+ function DiagramTitle({ children, y = spacing.titleY }) {
171
+ return /* @__PURE__ */ jsx(
172
+ "text",
173
+ {
174
+ x: spacing.centerX,
175
+ y,
176
+ fill: color.textDim,
177
+ fontSize: font.primary,
178
+ textAnchor: "middle",
179
+ fontWeight: "600",
180
+ letterSpacing: "0.5",
181
+ children
182
+ }
183
+ );
184
+ }
185
+ function DiagramNode({
186
+ x,
187
+ y,
188
+ width,
189
+ height,
190
+ heading,
191
+ body,
192
+ body2,
193
+ accentColor,
194
+ rx = radius.md,
195
+ fill: bgFill = color.bgDark,
196
+ strokeWidth: sw = stroke.normal,
197
+ headingWeight = "600",
198
+ headingColor,
199
+ bodyColor = color.textDim,
200
+ headingY: explicitHeadingY,
201
+ bodyY: explicitBodyY,
202
+ body2Y: explicitBody2Y
203
+ }) {
204
+ const cx = x + width / 2;
205
+ const hasBody2 = body2 != null;
206
+ const hasBody = body != null;
207
+ const headingY = explicitHeadingY ?? (hasBody ? y + height * 0.38 : y + height / 2 + font.primary / 3);
208
+ const bodyY = explicitBodyY ?? (hasBody2 ? y + height * 0.6 : y + height * 0.7);
209
+ const body2Y = explicitBody2Y ?? y + height * 0.82;
210
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
211
+ /* @__PURE__ */ jsx(
212
+ "rect",
213
+ {
214
+ x,
215
+ y,
216
+ width,
217
+ height,
218
+ rx,
219
+ fill: bgFill,
220
+ stroke: accentColor,
221
+ strokeWidth: sw
222
+ }
223
+ ),
224
+ /* @__PURE__ */ jsx(
225
+ "text",
226
+ {
227
+ x: cx,
228
+ y: headingY,
229
+ fill: headingColor ?? accentColor,
230
+ fontSize: font.primary,
231
+ textAnchor: "middle",
232
+ fontWeight: headingWeight,
233
+ children: heading
234
+ }
235
+ ),
236
+ hasBody && /* @__PURE__ */ jsx("text", { x: cx, y: bodyY, fill: bodyColor, fontSize: font.secondary, textAnchor: "middle", children: body }),
237
+ hasBody2 && /* @__PURE__ */ jsx("text", { x: cx, y: body2Y, fill: bodyColor, fontSize: font.small, textAnchor: "middle", children: body2 })
238
+ ] });
239
+ }
240
+ function DiagramInfoBox({
241
+ y,
242
+ height = box.infoBox.h,
243
+ children,
244
+ borderColor = color.border,
245
+ fill: bgFill = color.bgDark,
246
+ rx = radius.md
247
+ }) {
248
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
249
+ /* @__PURE__ */ jsx(
250
+ "rect",
251
+ {
252
+ x: "30",
253
+ y,
254
+ width: box.infoBox.w,
255
+ height,
256
+ rx,
257
+ fill: bgFill,
258
+ stroke: borderColor,
259
+ strokeWidth: stroke.thin
260
+ }
261
+ ),
262
+ children
263
+ ] });
264
+ }
265
+ function DiagramCodeBlock({
266
+ x = 30,
267
+ y,
268
+ width = box.codeBlock.w,
269
+ height = box.codeBlock.h,
270
+ children,
271
+ borderColor = color.border,
272
+ rx = radius.sm
273
+ }) {
274
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
275
+ /* @__PURE__ */ jsx(
276
+ "rect",
277
+ {
278
+ x,
279
+ y,
280
+ width,
281
+ height,
282
+ rx,
283
+ fill: color.bgDarker,
284
+ stroke: borderColor,
285
+ strokeWidth: stroke.thin
286
+ }
287
+ ),
288
+ children
289
+ ] });
290
+ }
291
+ function DiagramBadge({
292
+ x,
293
+ y,
294
+ width,
295
+ height = 14,
296
+ label,
297
+ accentColor,
298
+ fillOpacity = 0.1,
299
+ rx = radius.sm
300
+ }) {
301
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
302
+ /* @__PURE__ */ jsx(
303
+ "rect",
304
+ {
305
+ x,
306
+ y,
307
+ width,
308
+ height,
309
+ rx,
310
+ fill: accentColor,
311
+ fillOpacity,
312
+ stroke: accentColor,
313
+ strokeWidth: stroke.hairline
314
+ }
315
+ ),
316
+ /* @__PURE__ */ jsx(
317
+ "text",
318
+ {
319
+ x: x + width / 2,
320
+ y: y + height / 2 + font.small / 3,
321
+ fill: accentColor,
322
+ fontSize: font.small,
323
+ textAnchor: "middle",
324
+ children: label
325
+ }
326
+ )
327
+ ] });
328
+ }
329
+ function StepMarker({
330
+ cx,
331
+ cy,
332
+ n,
333
+ accentColor,
334
+ connectorToY,
335
+ r = 10
336
+ }) {
337
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
338
+ /* @__PURE__ */ jsx(
339
+ "circle",
340
+ {
341
+ cx,
342
+ cy,
343
+ r,
344
+ fill: accentColor,
345
+ fillOpacity: 0.15,
346
+ stroke: accentColor,
347
+ strokeWidth: stroke.thin
348
+ }
349
+ ),
350
+ /* @__PURE__ */ jsx(
351
+ "text",
352
+ {
353
+ x: cx,
354
+ y: cy + font.primary / 3,
355
+ fill: accentColor,
356
+ fontSize: font.primary,
357
+ textAnchor: "middle",
358
+ fontWeight: "600",
359
+ children: n
360
+ }
361
+ ),
362
+ connectorToY != null && /* @__PURE__ */ jsx(
363
+ "line",
364
+ {
365
+ x1: cx,
366
+ y1: cy + r + 2,
367
+ x2: cx,
368
+ y2: connectorToY,
369
+ stroke: color.border,
370
+ strokeWidth: stroke.thin,
371
+ strokeDasharray: "3 3"
372
+ }
373
+ )
374
+ ] });
375
+ }
376
+ function ArrowMarker({
377
+ id,
378
+ color: fill,
379
+ opacity = 0.7
380
+ }) {
381
+ return /* @__PURE__ */ jsx(
382
+ "marker",
383
+ {
384
+ id,
385
+ markerWidth: "5",
386
+ markerHeight: "4",
387
+ refX: "4",
388
+ refY: "2",
389
+ orient: "auto",
390
+ children: /* @__PURE__ */ jsx("path", { d: "M 0 0 L 5 2 L 0 4 Z", fill, fillOpacity: opacity })
391
+ }
392
+ );
393
+ }
394
+ function ArrowPath({
395
+ d,
396
+ color: strokeColor,
397
+ dashed = false,
398
+ strokeWidth: sw = stroke.normal,
399
+ markerEnd,
400
+ opacity: op = 1
401
+ }) {
402
+ return /* @__PURE__ */ jsx(
403
+ "path",
404
+ {
405
+ d,
406
+ stroke: strokeColor,
407
+ strokeWidth: sw,
408
+ fill: "none",
409
+ opacity: op,
410
+ ...dashed ? { strokeDasharray: "4 3" } : {},
411
+ ...markerEnd ? { markerEnd: `url(#${markerEnd})` } : {}
412
+ }
413
+ );
414
+ }
415
+ function LayerBar({
416
+ x,
417
+ y,
418
+ width,
419
+ label,
420
+ detail,
421
+ accentColor,
422
+ opacity: op = 1,
423
+ height = 30
424
+ }) {
425
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
426
+ /* @__PURE__ */ jsx(
427
+ "rect",
428
+ {
429
+ x,
430
+ y,
431
+ width,
432
+ height,
433
+ rx: radius.md,
434
+ fill: color.bgDark,
435
+ stroke: accentColor,
436
+ strokeWidth: stroke.normal,
437
+ opacity: op
438
+ }
439
+ ),
440
+ /* @__PURE__ */ jsx(
441
+ "rect",
442
+ {
443
+ x,
444
+ y,
445
+ width: 5,
446
+ height,
447
+ rx: 2,
448
+ fill: accentColor,
449
+ opacity: op
450
+ }
451
+ ),
452
+ /* @__PURE__ */ jsx(
453
+ "text",
454
+ {
455
+ x: x + 15,
456
+ y: y + (detail ? height * 0.42 : height / 2 + font.primary / 3),
457
+ fill: accentColor,
458
+ fontSize: font.primary,
459
+ fontWeight: "600",
460
+ opacity: op,
461
+ children: label
462
+ }
463
+ ),
464
+ detail && /* @__PURE__ */ jsx(
465
+ "text",
466
+ {
467
+ x: x + 15,
468
+ y: y + height * 0.78,
469
+ fill: color.textDim,
470
+ fontSize: font.small,
471
+ opacity: op,
472
+ children: detail
473
+ }
474
+ )
475
+ ] });
476
+ }
477
+ function GridCard({
478
+ x,
479
+ y,
480
+ width,
481
+ icon,
482
+ label,
483
+ desc,
484
+ codeHint,
485
+ accentColor
486
+ }) {
487
+ const height = codeHint ? 48 : 38;
488
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
489
+ /* @__PURE__ */ jsx(
490
+ "rect",
491
+ {
492
+ x,
493
+ y,
494
+ width,
495
+ height,
496
+ rx: radius.md,
497
+ fill: color.bgDark,
498
+ stroke: accentColor,
499
+ strokeWidth: stroke.normal
500
+ }
501
+ ),
502
+ /* @__PURE__ */ jsx(
503
+ "circle",
504
+ {
505
+ cx: x + 22,
506
+ cy: y + 18,
507
+ r: 10,
508
+ fill: accentColor,
509
+ fillOpacity: 0.15,
510
+ stroke: accentColor,
511
+ strokeWidth: stroke.hairline
512
+ }
513
+ ),
514
+ /* @__PURE__ */ jsx(
515
+ "text",
516
+ {
517
+ x: x + 22,
518
+ y: y + 22,
519
+ fill: accentColor,
520
+ fontSize: font.primary,
521
+ textAnchor: "middle",
522
+ fontWeight: "600",
523
+ children: icon
524
+ }
525
+ ),
526
+ /* @__PURE__ */ jsx(
527
+ "text",
528
+ {
529
+ x: x + 42,
530
+ y: y + 16,
531
+ fill: color.textBright,
532
+ fontSize: font.primary,
533
+ fontWeight: "500",
534
+ children: label
535
+ }
536
+ ),
537
+ desc && /* @__PURE__ */ jsx("text", { x: x + 42, y: y + 28, fill: color.textDim, fontSize: font.small, children: desc }),
538
+ codeHint && /* @__PURE__ */ jsxs(Fragment, { children: [
539
+ /* @__PURE__ */ jsx(
540
+ "rect",
541
+ {
542
+ x: x + 8,
543
+ y: y + 34,
544
+ width: width - 16,
545
+ height: 10,
546
+ rx: 2,
547
+ fill: color.bgDarker
548
+ }
549
+ ),
550
+ /* @__PURE__ */ jsx(
551
+ "text",
552
+ {
553
+ x: x + width / 2,
554
+ y: y + 42,
555
+ fill: accentColor,
556
+ fontSize: font.small,
557
+ textAnchor: "middle",
558
+ fontFamily: "monospace",
559
+ opacity: 0.7,
560
+ children: codeHint
561
+ }
562
+ )
563
+ ] })
564
+ ] });
565
+ }
566
+ function ActorNode({
567
+ cx,
568
+ cy,
569
+ r = 12,
570
+ label,
571
+ labelPos = "below",
572
+ accentColor
573
+ }) {
574
+ const labelOffset = r + 8;
575
+ const labelProps = {
576
+ above: { x: cx, y: cy - labelOffset, textAnchor: "middle" },
577
+ below: { x: cx, y: cy + labelOffset, textAnchor: "middle" },
578
+ left: { x: cx - labelOffset, y: cy + font.small / 3, textAnchor: "end" },
579
+ right: { x: cx + labelOffset, y: cy + font.small / 3, textAnchor: "start" }
580
+ }[labelPos];
581
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
582
+ /* @__PURE__ */ jsx(
583
+ "circle",
584
+ {
585
+ cx,
586
+ cy,
587
+ r,
588
+ fill: accentColor,
589
+ fillOpacity: 0.15,
590
+ stroke: accentColor,
591
+ strokeWidth: stroke.normal
592
+ }
593
+ ),
594
+ /* @__PURE__ */ jsx(
595
+ "text",
596
+ {
597
+ ...labelProps,
598
+ fill: accentColor,
599
+ fontSize: font.small,
600
+ fontWeight: "500",
601
+ children: label
602
+ }
603
+ )
604
+ ] });
605
+ }
606
+ function KeyValueRow({
607
+ x,
608
+ y,
609
+ field,
610
+ value,
611
+ fieldColor
612
+ }) {
613
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
614
+ /* @__PURE__ */ jsx(
615
+ "text",
616
+ {
617
+ x,
618
+ y,
619
+ fill: fieldColor,
620
+ fontSize: font.secondary,
621
+ fontFamily: "monospace",
622
+ children: field
623
+ }
624
+ ),
625
+ /* @__PURE__ */ jsx(
626
+ "text",
627
+ {
628
+ x: x + field.length * 4.2,
629
+ y,
630
+ fill: color.textDim,
631
+ fontSize: font.secondary,
632
+ fontFamily: "monospace",
633
+ children: value
634
+ }
635
+ )
636
+ ] });
637
+ }
638
+ function WarningIndicator({
639
+ cx,
640
+ cy,
641
+ color: fillColor,
642
+ size = 10
643
+ }) {
644
+ const half = size / 2;
645
+ const top = cy - half;
646
+ const bottom = cy + half;
647
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
648
+ /* @__PURE__ */ jsx(
649
+ "path",
650
+ {
651
+ d: `M ${cx} ${top} L ${cx + half} ${bottom} L ${cx - half} ${bottom} Z`,
652
+ fill: "none",
653
+ stroke: fillColor,
654
+ strokeWidth: stroke.normal
655
+ }
656
+ ),
657
+ /* @__PURE__ */ jsx(
658
+ "text",
659
+ {
660
+ x: cx,
661
+ y: bottom - 2,
662
+ fill: fillColor,
663
+ fontSize: font.primary,
664
+ textAnchor: "middle",
665
+ fontWeight: "700",
666
+ children: "!"
667
+ }
668
+ )
669
+ ] });
670
+ }
671
+ export {
672
+ ActorNode,
673
+ AnimatedDashPath,
674
+ ArrowMarker,
675
+ ArrowPath,
676
+ D,
677
+ DiagramBadge,
678
+ DiagramCodeBlock,
679
+ DiagramInfoBox,
680
+ DiagramNode,
681
+ DiagramTitle,
682
+ DiagramWrapper,
683
+ GridCard,
684
+ KeyValueRow,
685
+ LayerBar,
686
+ StepMarker,
687
+ WarningIndicator,
688
+ accent,
689
+ box,
690
+ color,
691
+ font,
692
+ item,
693
+ motion,
694
+ radius,
695
+ scaleItem,
696
+ slideInItem,
697
+ spacing,
698
+ stagger,
699
+ stroke,
700
+ tint,
701
+ viewBox
702
+ };