@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,371 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+ import { Variants } from 'motion/react';
4
+ export { Variants, motion } from 'motion/react';
5
+
6
+ /** Pre-built viewBox strings: `"0 0 420 <height>"` */
7
+ declare const viewBox: {
8
+ readonly compact: "0 0 420 200";
9
+ readonly standard: "0 0 420 240";
10
+ readonly tall: "0 0 420 280";
11
+ readonly extended: "0 0 420 340";
12
+ readonly large: "0 0 420 420";
13
+ readonly xlarge: "0 0 420 520";
14
+ readonly xxlarge: "0 0 420 580";
15
+ };
16
+ /** Font size tiers (SVG units). 1 SVG unit ≈ 3px at max-width 1260px (3×420). */
17
+ declare const font: {
18
+ readonly icon: 10;
19
+ readonly primary: 5.33;
20
+ readonly secondary: 4.67;
21
+ readonly small: 4;
22
+ readonly micro: 3;
23
+ };
24
+ /** Standard box dimensions [width, height] by role. */
25
+ declare const box: {
26
+ readonly nodeMain: {
27
+ readonly w: 120;
28
+ readonly h: 55;
29
+ };
30
+ readonly nodeCard: {
31
+ readonly w: 95;
32
+ readonly h: 50;
33
+ };
34
+ readonly nodeSmall: {
35
+ readonly w: 80;
36
+ readonly h: 32;
37
+ };
38
+ readonly infoBox: {
39
+ readonly w: 360;
40
+ readonly h: 28;
41
+ };
42
+ readonly codeBlock: {
43
+ readonly w: 360;
44
+ readonly h: 28;
45
+ };
46
+ };
47
+ /** Spacing constants (SVG units). */
48
+ declare const spacing: {
49
+ readonly margin: 20;
50
+ readonly gapSm: 10;
51
+ readonly gapMd: 20;
52
+ readonly gapLg: 35;
53
+ readonly centerX: 210;
54
+ readonly titleY: 18;
55
+ };
56
+ /** Border radius tiers. */
57
+ declare const radius: {
58
+ readonly lg: 8;
59
+ readonly md: 6;
60
+ readonly sm: 4;
61
+ };
62
+ /** Stroke width tiers. */
63
+ declare const stroke: {
64
+ readonly bold: 2;
65
+ readonly normal: 1.5;
66
+ readonly thin: 1;
67
+ readonly hairline: 0.5;
68
+ };
69
+ /** Semantic text colors. */
70
+ declare const color: {
71
+ readonly textBright: "#e5e7eb";
72
+ readonly textMedium: "#9ca3af";
73
+ readonly textDim: "#6b7280";
74
+ readonly bgDark: "#1f2937";
75
+ readonly bgDarker: "#0f172a";
76
+ readonly border: "#374151";
77
+ };
78
+ /** Dark tint backgrounds for colored overlays (use with fillOpacity). */
79
+ declare const tint: {
80
+ readonly red: "#7f1d1d";
81
+ readonly emerald: "#064e3b";
82
+ readonly blue: "#1e3a5f";
83
+ };
84
+ /** Accent palette – pick by semantic intent, not by hue. */
85
+ declare const accent: {
86
+ readonly cyan: "#22d3ee";
87
+ readonly teal: "#2dd4bf";
88
+ readonly blue: "#60a5fa";
89
+ readonly purple: "#a78bfa";
90
+ readonly violet: "#c084fc";
91
+ readonly green: "#34d399";
92
+ readonly lime: "#4ade80";
93
+ readonly yellow: "#fbbf24";
94
+ readonly orange: "#fb923c";
95
+ readonly red: "#ef4444";
96
+ readonly redLight: "#f87171";
97
+ readonly pink: "#f472b6";
98
+ readonly pinkLight: "#fda4af";
99
+ readonly indigo: "#a5b4fc";
100
+ readonly emerald: "#10b981";
101
+ readonly amber: "#f59e0b";
102
+ readonly fuchsia: "#d946ef";
103
+ readonly rose: "#fb7185";
104
+ readonly sky: "#38bdf8";
105
+ };
106
+ /**
107
+ * Convenience bundle for imports:
108
+ * import { D } from './diagram-utils'
109
+ * <rect rx={D.radius.md} strokeWidth={D.stroke.normal} />
110
+ */
111
+ declare const D: {
112
+ readonly viewBox: {
113
+ readonly compact: "0 0 420 200";
114
+ readonly standard: "0 0 420 240";
115
+ readonly tall: "0 0 420 280";
116
+ readonly extended: "0 0 420 340";
117
+ readonly large: "0 0 420 420";
118
+ readonly xlarge: "0 0 420 520";
119
+ readonly xxlarge: "0 0 420 580";
120
+ };
121
+ readonly font: {
122
+ readonly icon: 10;
123
+ readonly primary: 5.33;
124
+ readonly secondary: 4.67;
125
+ readonly small: 4;
126
+ readonly micro: 3;
127
+ };
128
+ readonly box: {
129
+ readonly nodeMain: {
130
+ readonly w: 120;
131
+ readonly h: 55;
132
+ };
133
+ readonly nodeCard: {
134
+ readonly w: 95;
135
+ readonly h: 50;
136
+ };
137
+ readonly nodeSmall: {
138
+ readonly w: 80;
139
+ readonly h: 32;
140
+ };
141
+ readonly infoBox: {
142
+ readonly w: 360;
143
+ readonly h: 28;
144
+ };
145
+ readonly codeBlock: {
146
+ readonly w: 360;
147
+ readonly h: 28;
148
+ };
149
+ };
150
+ readonly spacing: {
151
+ readonly margin: 20;
152
+ readonly gapSm: 10;
153
+ readonly gapMd: 20;
154
+ readonly gapLg: 35;
155
+ readonly centerX: 210;
156
+ readonly titleY: 18;
157
+ };
158
+ readonly radius: {
159
+ readonly lg: 8;
160
+ readonly md: 6;
161
+ readonly sm: 4;
162
+ };
163
+ readonly stroke: {
164
+ readonly bold: 2;
165
+ readonly normal: 1.5;
166
+ readonly thin: 1;
167
+ readonly hairline: 0.5;
168
+ };
169
+ readonly color: {
170
+ readonly textBright: "#e5e7eb";
171
+ readonly textMedium: "#9ca3af";
172
+ readonly textDim: "#6b7280";
173
+ readonly bgDark: "#1f2937";
174
+ readonly bgDarker: "#0f172a";
175
+ readonly border: "#374151";
176
+ };
177
+ readonly tint: {
178
+ readonly red: "#7f1d1d";
179
+ readonly emerald: "#064e3b";
180
+ readonly blue: "#1e3a5f";
181
+ };
182
+ readonly accent: {
183
+ readonly cyan: "#22d3ee";
184
+ readonly teal: "#2dd4bf";
185
+ readonly blue: "#60a5fa";
186
+ readonly purple: "#a78bfa";
187
+ readonly violet: "#c084fc";
188
+ readonly green: "#34d399";
189
+ readonly lime: "#4ade80";
190
+ readonly yellow: "#fbbf24";
191
+ readonly orange: "#fb923c";
192
+ readonly red: "#ef4444";
193
+ readonly redLight: "#f87171";
194
+ readonly pink: "#f472b6";
195
+ readonly pinkLight: "#fda4af";
196
+ readonly indigo: "#a5b4fc";
197
+ readonly emerald: "#10b981";
198
+ readonly amber: "#f59e0b";
199
+ readonly fuchsia: "#d946ef";
200
+ readonly rose: "#fb7185";
201
+ readonly sky: "#38bdf8";
202
+ };
203
+ };
204
+ declare function DiagramWrapper({ children }: {
205
+ children: ReactNode;
206
+ sourceUrl?: string;
207
+ }): react_jsx_runtime.JSX.Element;
208
+ /**
209
+ * Container variant that staggers children.
210
+ * @param staggerDelay – seconds between each child (default 0.05)
211
+ * @param delayStart – initial delay before first child (default 0)
212
+ */
213
+ declare function stagger(staggerDelay?: number, delayStart?: number): Variants;
214
+ /** Standard fade-in-up item variant (replaces all FADE_IN_UP_* constants). */
215
+ declare const item: Variants;
216
+ /** Slide-in from left variant. */
217
+ declare const slideInItem: Variants;
218
+ /** Scale-in item variant (good for circles / icons). */
219
+ declare const scaleItem: Variants;
220
+ /**
221
+ * An SVG <path> with an infinite animated dash offset.
222
+ * Replaces:
223
+ * <path strokeDasharray="4 3">
224
+ * <animate attributeName="stroke-dashoffset" values="0;-14" dur="1.2s" ... />
225
+ * </path>
226
+ */
227
+ declare function AnimatedDashPath({ d, stroke, strokeWidth, dashArray, opacity, duration, delay, }: {
228
+ d: string;
229
+ stroke: string;
230
+ strokeWidth?: number;
231
+ dashArray?: string;
232
+ opacity?: number;
233
+ duration?: number;
234
+ delay?: number;
235
+ }): react_jsx_runtime.JSX.Element;
236
+ /**
237
+ * Standard diagram title text rendered at top center.
238
+ * Every diagram should have exactly one of these.
239
+ */
240
+ declare function DiagramTitle({ children, y }: {
241
+ children: string;
242
+ y?: number;
243
+ }): react_jsx_runtime.JSX.Element;
244
+ /**
245
+ * A rounded rectangle node with a heading and optional body text.
246
+ * Renders a filled rect with border, centered heading, and up to two body lines.
247
+ *
248
+ * Use explicit `headingY` / `bodyY` / `body2Y` to match hand-positioned layouts.
249
+ * When omitted, text positions are calculated from the box dimensions.
250
+ */
251
+ declare function DiagramNode({ x, y, width, height, heading, body, body2, accentColor, rx, fill: bgFill, strokeWidth: sw, headingWeight, headingColor, bodyColor, headingY: explicitHeadingY, bodyY: explicitBodyY, body2Y: explicitBody2Y, }: {
252
+ x: number;
253
+ y: number;
254
+ width: number;
255
+ height: number;
256
+ heading: string;
257
+ body?: string;
258
+ body2?: string;
259
+ accentColor: string;
260
+ rx?: number;
261
+ fill?: string;
262
+ strokeWidth?: number;
263
+ headingWeight?: string;
264
+ headingColor?: string;
265
+ bodyColor?: string;
266
+ headingY?: number;
267
+ bodyY?: number;
268
+ body2Y?: number;
269
+ }): react_jsx_runtime.JSX.Element;
270
+ /**
271
+ * Full-width info strip at the bottom of a diagram.
272
+ * Renders a rect with one or more centered text lines inside.
273
+ */
274
+ declare function DiagramInfoBox({ y, height, children, borderColor, fill: bgFill, rx, }: {
275
+ y: number;
276
+ height?: number;
277
+ children: ReactNode;
278
+ borderColor?: string;
279
+ fill?: string;
280
+ rx?: number;
281
+ }): react_jsx_runtime.JSX.Element;
282
+ /**
283
+ * Full-width code display box with a dark background.
284
+ * Children should be <text> elements with monospace font.
285
+ */
286
+ declare function DiagramCodeBlock({ x, y, width, height, children, borderColor, rx, }: {
287
+ x?: number;
288
+ y: number;
289
+ width?: number;
290
+ height?: number;
291
+ children?: ReactNode;
292
+ borderColor?: string;
293
+ rx?: number;
294
+ }): react_jsx_runtime.JSX.Element;
295
+ /**
296
+ * Small text badge/pill with tinted background.
297
+ */
298
+ declare function DiagramBadge({ x, y, width, height, label, accentColor, fillOpacity, rx, }: {
299
+ x: number;
300
+ y: number;
301
+ width: number;
302
+ height?: number;
303
+ label: string;
304
+ accentColor: string;
305
+ fillOpacity?: number;
306
+ rx?: number;
307
+ }): react_jsx_runtime.JSX.Element;
308
+ declare function StepMarker({ cx, cy, n, accentColor, connectorToY, r, }: {
309
+ cx: number;
310
+ cy: number;
311
+ n: number;
312
+ accentColor: string;
313
+ connectorToY?: number;
314
+ r?: number;
315
+ }): react_jsx_runtime.JSX.Element;
316
+ declare function ArrowMarker({ id, color: fill, opacity, }: {
317
+ id: string;
318
+ color: string;
319
+ opacity?: number;
320
+ }): react_jsx_runtime.JSX.Element;
321
+ declare function ArrowPath({ d, color: strokeColor, dashed, strokeWidth: sw, markerEnd, opacity: op, }: {
322
+ d: string;
323
+ color: string;
324
+ dashed?: boolean;
325
+ strokeWidth?: number;
326
+ markerEnd?: string;
327
+ opacity?: number;
328
+ }): react_jsx_runtime.JSX.Element;
329
+ declare function LayerBar({ x, y, width, label, detail, accentColor, opacity: op, height, }: {
330
+ x: number;
331
+ y: number;
332
+ width: number;
333
+ label: string;
334
+ detail?: string;
335
+ accentColor: string;
336
+ opacity?: number;
337
+ height?: number;
338
+ }): react_jsx_runtime.JSX.Element;
339
+ declare function GridCard({ x, y, width, icon, label, desc, codeHint, accentColor, }: {
340
+ x: number;
341
+ y: number;
342
+ width: number;
343
+ icon: string;
344
+ label: string;
345
+ desc?: string;
346
+ codeHint?: string;
347
+ accentColor: string;
348
+ }): react_jsx_runtime.JSX.Element;
349
+ declare function ActorNode({ cx, cy, r, label, labelPos, accentColor, }: {
350
+ cx: number;
351
+ cy: number;
352
+ r?: number;
353
+ label: string;
354
+ labelPos?: 'above' | 'below' | 'left' | 'right';
355
+ accentColor: string;
356
+ }): react_jsx_runtime.JSX.Element;
357
+ declare function KeyValueRow({ x, y, field, value, fieldColor, }: {
358
+ x: number;
359
+ y: number;
360
+ field: string;
361
+ value: string;
362
+ fieldColor: string;
363
+ }): react_jsx_runtime.JSX.Element;
364
+ declare function WarningIndicator({ cx, cy, color: fillColor, size, }: {
365
+ cx: number;
366
+ cy: number;
367
+ color: string;
368
+ size?: number;
369
+ }): react_jsx_runtime.JSX.Element;
370
+
371
+ export { ActorNode, AnimatedDashPath, ArrowMarker, ArrowPath, D, DiagramBadge, DiagramCodeBlock, DiagramInfoBox, DiagramNode, DiagramTitle, DiagramWrapper, GridCard, KeyValueRow, LayerBar, StepMarker, WarningIndicator, accent, box, color, font, item, radius, scaleItem, slideInItem, spacing, stagger, stroke, tint, viewBox };