@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.
- package/README.md +63 -0
- package/components/content/info-panel-primitives.tsx +297 -0
- package/components/diagrams/diagram-utils.tsx +908 -0
- package/components/hooks/use-click-outside.ts +27 -0
- package/components/hooks/use-dropdown-max-height.ts +20 -0
- package/components/hooks/use-navigation-history.ts +94 -0
- package/components/lib/ai-tools.tsx +44 -0
- package/components/lib/cn.ts +6 -0
- package/components/lib/form-colors.ts +32 -0
- package/components/lib/theme-engine.ts +97 -0
- package/components/lib/toolr-brand.tsx +31 -0
- package/components/sections/ai-tools-paths/index.ts +37 -0
- package/components/sections/ai-tools-paths/tools-paths-panel.tsx +212 -0
- package/components/sections/ai-tools-paths/types.ts +111 -0
- package/components/sections/ai-tools-paths/use-tools-paths.ts +159 -0
- package/components/sections/captured-issues/captured-issues-panel.tsx +214 -0
- package/components/sections/captured-issues/index.ts +38 -0
- package/components/sections/captured-issues/types.ts +113 -0
- package/components/sections/captured-issues/use-captured-issues.ts +111 -0
- package/components/sections/golden-snapshots/file-diff-viewer.tsx +420 -0
- package/components/sections/golden-snapshots/golden-sync-panel.tsx +223 -0
- package/components/sections/golden-snapshots/index.ts +145 -0
- package/components/sections/golden-snapshots/snapshot-manager.tsx +200 -0
- package/components/sections/golden-snapshots/status-overview.tsx +305 -0
- package/components/sections/golden-snapshots/types.ts +288 -0
- package/components/sections/golden-snapshots/use-golden-sync.ts +477 -0
- package/components/sections/golden-snapshots/version-manager.tsx +186 -0
- package/components/sections/prompt-editor/file-type-tabbed-prompt-editor.tsx +210 -0
- package/components/sections/prompt-editor/index.ts +121 -0
- package/components/sections/prompt-editor/simulator-prompt-editor.tsx +276 -0
- package/components/sections/prompt-editor/tabbed-prompt-editor.tsx +514 -0
- package/components/sections/prompt-editor/types.ts +101 -0
- package/components/sections/prompt-editor/use-prompt-editor.ts +131 -0
- package/components/sections/report-bug/error-logger.ts +392 -0
- package/components/sections/report-bug/index.ts +59 -0
- package/components/sections/report-bug/issue-reporter-api.ts +83 -0
- package/components/sections/report-bug/report-bug-form.tsx +282 -0
- package/components/sections/report-bug/screenshot-uploader.tsx +228 -0
- package/components/sections/report-bug/use-report-bug.ts +170 -0
- package/components/sections/snapshot-browser/index.ts +53 -0
- package/components/sections/snapshot-browser/snapshot-browser-panel.tsx +147 -0
- package/components/sections/snapshot-browser/snapshot-tree.tsx +451 -0
- package/components/sections/snapshot-browser/types.ts +106 -0
- package/components/sections/snapshot-browser/use-snapshot-browser.ts +125 -0
- package/components/sections/snippets-editor/index.ts +31 -0
- package/components/sections/snippets-editor/snippets-editor.tsx +381 -0
- package/components/sections/snippets-editor/types.ts +48 -0
- package/components/sections/snippets-editor/use-snippets-editor.ts +217 -0
- package/components/ui/action-dialog.tsx +309 -0
- package/components/ui/ai-action-button.tsx +137 -0
- package/components/ui/ai-execution-action-buttons.tsx +106 -0
- package/components/ui/badge.tsx +67 -0
- package/components/ui/bottom-panel-header.tsx +240 -0
- package/components/ui/breadcrumb.tsx +168 -0
- package/components/ui/checkbox.tsx +102 -0
- package/components/ui/collapsible-section.tsx +100 -0
- package/components/ui/confirm-badge.tsx +71 -0
- package/components/ui/detail-section.tsx +67 -0
- package/components/ui/detail-view-wrapper.tsx +55 -0
- package/components/ui/editor-placeholder-card.tsx +197 -0
- package/components/ui/editor-toolbar.tsx +123 -0
- package/components/ui/execution-details-panel.tsx +93 -0
- package/components/ui/extension-list-card.tsx +105 -0
- package/components/ui/file-structure-section.tsx +373 -0
- package/components/ui/file-tree.tsx +171 -0
- package/components/ui/files-panel.tsx +251 -0
- package/components/ui/filter-dropdown.tsx +173 -0
- package/components/ui/form-actions.tsx +127 -0
- package/components/ui/frontmatter-form-header.tsx +80 -0
- package/components/ui/icon-button.tsx +388 -0
- package/components/ui/input.tsx +211 -0
- package/components/ui/label.tsx +159 -0
- package/components/ui/layout-tab-bar.tsx +289 -0
- package/components/ui/modal.tsx +194 -0
- package/components/ui/nav-card.tsx +81 -0
- package/components/ui/navigation-bar.tsx +285 -0
- package/components/ui/number-input.tsx +165 -0
- package/components/ui/registry-browser.tsx +261 -0
- package/components/ui/registry-card.tsx +710 -0
- package/components/ui/registry-detail.tsx +224 -0
- package/components/ui/resizable-textarea.tsx +290 -0
- package/components/ui/scope-badge.tsx +67 -0
- package/components/ui/segmented-toggle.tsx +133 -0
- package/components/ui/select.tsx +172 -0
- package/components/ui/selection-grid.tsx +313 -0
- package/components/ui/setting-row.tsx +97 -0
- package/components/ui/snapshot-card.tsx +107 -0
- package/components/ui/snippets-panel.tsx +161 -0
- package/components/ui/sort-dropdown.tsx +109 -0
- package/components/ui/status-card.tsx +96 -0
- package/components/ui/tab-bar.tsx +340 -0
- package/components/ui/toggle.tsx +142 -0
- package/components/ui/tooltip.tsx +326 -0
- package/dist/content.d.ts +110 -0
- package/dist/content.js +195 -0
- package/dist/diagrams.d.ts +371 -0
- package/dist/diagrams.js +702 -0
- package/dist/index.d.ts +2714 -0
- package/dist/index.js +11220 -0
- package/dist/preset.d.ts +24 -0
- package/dist/preset.js +17 -0
- package/dist/tokens/tokens/primitives.css +45 -0
- package/dist/tokens/tokens/semantic.css +46 -0
- package/dist/tokens/tokens/theme.css +11 -0
- package/dist/tokens/tokens/tokens.json +65 -0
- package/index.ts +123 -0
- package/package.json +63 -0
- package/tailwind-preset.ts +22 -0
- package/tokens/primitives.css +45 -0
- package/tokens/semantic.css +46 -0
- package/tokens/theme.css +11 -0
- package/tokens/tokens.json +65 -0
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Tailwind 4 preset for toolr apps.
|
|
3
|
+
*
|
|
4
|
+
* Consuming apps import the token CSS via:
|
|
5
|
+
* @import "@toolr/ui-design/tokens";
|
|
6
|
+
*
|
|
7
|
+
* This preset provides shared theme extensions (breakpoints, etc.)
|
|
8
|
+
* that all apps should use.
|
|
9
|
+
*/
|
|
10
|
+
declare const toolrPreset: {
|
|
11
|
+
theme: {
|
|
12
|
+
extend: {
|
|
13
|
+
screens: {
|
|
14
|
+
'3xl': string;
|
|
15
|
+
'4xl': string;
|
|
16
|
+
};
|
|
17
|
+
fontFamily: {
|
|
18
|
+
sans: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { toolrPreset };
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// tailwind-preset.ts
|
|
2
|
+
var toolrPreset = {
|
|
3
|
+
theme: {
|
|
4
|
+
extend: {
|
|
5
|
+
screens: {
|
|
6
|
+
"3xl": "100rem",
|
|
7
|
+
"4xl": "156.25rem"
|
|
8
|
+
},
|
|
9
|
+
fontFamily: {
|
|
10
|
+
sans: ["Inter", "system-ui", "Avenir", "Helvetica", "Arial", "sans-serif"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
toolrPreset
|
|
17
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Primitive Design Tokens — OLED Pure Neutral Scale
|
|
3
|
+
Pure achromatic scale with progressive surface lift from true black.
|
|
4
|
+
|
|
5
|
+
These are raw color values. Use semantic tokens (semantic.css) in components.
|
|
6
|
+
============================================================================= */
|
|
7
|
+
|
|
8
|
+
@theme {
|
|
9
|
+
/* Neutral scale (OLED Pure) */
|
|
10
|
+
--color-neutral-950: #000000;
|
|
11
|
+
--color-neutral-900: #050505;
|
|
12
|
+
--color-neutral-800: #0a0a0a;
|
|
13
|
+
--color-neutral-700: #1a1a1a;
|
|
14
|
+
--color-neutral-600: #333333;
|
|
15
|
+
--color-neutral-500: #666666;
|
|
16
|
+
--color-neutral-400: #999999;
|
|
17
|
+
--color-neutral-300: #cccccc;
|
|
18
|
+
--color-neutral-200: #e0e0e0;
|
|
19
|
+
--color-neutral-100: #f0f0f0;
|
|
20
|
+
--color-neutral-50: #fafafa;
|
|
21
|
+
|
|
22
|
+
/* Disable Tailwind default gray to prevent accidental usage */
|
|
23
|
+
--color-gray-*: initial;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:root {
|
|
27
|
+
--color-black: #000000;
|
|
28
|
+
--color-white: #ffffff;
|
|
29
|
+
|
|
30
|
+
/* Accent colors (Tailwind 500 values — used via Tailwind classes, listed for reference) */
|
|
31
|
+
--color-blue-500: #3b82f6;
|
|
32
|
+
--color-blue-400: #60a5fa;
|
|
33
|
+
--color-green-500: #22c55e;
|
|
34
|
+
--color-red-500: #ef4444;
|
|
35
|
+
--color-purple-500: #a855f7;
|
|
36
|
+
--color-orange-500: #f97316;
|
|
37
|
+
--color-amber-500: #f59e0b;
|
|
38
|
+
--color-yellow-500: #eab308;
|
|
39
|
+
--color-pink-500: #ec4899;
|
|
40
|
+
--color-emerald-500: #10b981;
|
|
41
|
+
--color-teal-500: #14b8a6;
|
|
42
|
+
--color-cyan-500: #06b6d4;
|
|
43
|
+
--color-indigo-500: #6366f1;
|
|
44
|
+
--color-violet-500: #8b5cf6;
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Semantic Design Tokens — Purpose-Based Names
|
|
3
|
+
References primitives from primitives.css
|
|
4
|
+
|
|
5
|
+
These tokens describe intent, not appearance.
|
|
6
|
+
Accent colors (blue-500/20, text-blue-400, etc.) stay Tailwind-native.
|
|
7
|
+
============================================================================= */
|
|
8
|
+
|
|
9
|
+
@import './primitives.css';
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Page-level backgrounds */
|
|
13
|
+
--background: var(--color-black);
|
|
14
|
+
--foreground: var(--color-neutral-300);
|
|
15
|
+
|
|
16
|
+
/* Surface: cards, panels, popups */
|
|
17
|
+
--surface: var(--color-neutral-800);
|
|
18
|
+
--surface-foreground: var(--color-neutral-300);
|
|
19
|
+
--surface-secondary: var(--color-neutral-900);
|
|
20
|
+
--surface-overlay: var(--color-neutral-700);
|
|
21
|
+
|
|
22
|
+
/* Muted: subdued elements, disabled states */
|
|
23
|
+
--muted: var(--color-neutral-800);
|
|
24
|
+
--muted-foreground: var(--color-neutral-500);
|
|
25
|
+
|
|
26
|
+
/* Text hierarchy */
|
|
27
|
+
--text-primary: var(--color-neutral-300);
|
|
28
|
+
--text-secondary: var(--color-neutral-500);
|
|
29
|
+
--text-tertiary: var(--color-neutral-400);
|
|
30
|
+
--text-emphasis: var(--color-white);
|
|
31
|
+
|
|
32
|
+
/* Borders */
|
|
33
|
+
--border: var(--color-neutral-700);
|
|
34
|
+
--border-subtle: var(--color-neutral-800);
|
|
35
|
+
|
|
36
|
+
/* Interactive: primary action color */
|
|
37
|
+
--primary: var(--color-blue-500);
|
|
38
|
+
--primary-foreground: var(--color-white);
|
|
39
|
+
|
|
40
|
+
/* Destructive actions */
|
|
41
|
+
--destructive: var(--color-red-500);
|
|
42
|
+
--destructive-foreground: var(--color-white);
|
|
43
|
+
|
|
44
|
+
/* Focus ring */
|
|
45
|
+
--ring: var(--color-blue-400);
|
|
46
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Tailwind 4 Theme Integration
|
|
3
|
+
Import this file in consuming apps: @import "@toolr/ui-design/tokens"
|
|
4
|
+
============================================================================= */
|
|
5
|
+
|
|
6
|
+
@import './semantic.css';
|
|
7
|
+
|
|
8
|
+
@keyframes debounce-border-drain {
|
|
9
|
+
from { stroke-dashoffset: 0; }
|
|
10
|
+
to { stroke-dashoffset: -100; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://tr.designtokens.org/format/",
|
|
3
|
+
"primitive": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"black": { "$value": "#000000" },
|
|
6
|
+
"gray-950": { "$value": "#030712" },
|
|
7
|
+
"gray-900": { "$value": "#111827" },
|
|
8
|
+
"gray-800": { "$value": "#1f2937" },
|
|
9
|
+
"gray-700": { "$value": "#374151" },
|
|
10
|
+
"gray-600": { "$value": "#4b5563" },
|
|
11
|
+
"gray-500": { "$value": "#6b7280" },
|
|
12
|
+
"gray-400": { "$value": "#9ca3af" },
|
|
13
|
+
"gray-300": { "$value": "#d1d5db" },
|
|
14
|
+
"gray-200": { "$value": "#e5e7eb" },
|
|
15
|
+
"gray-100": { "$value": "#f3f4f6" },
|
|
16
|
+
"white": { "$value": "#ffffff" }
|
|
17
|
+
},
|
|
18
|
+
"semantic": {
|
|
19
|
+
"background": { "$type": "color", "$value": "{primitive.black}" },
|
|
20
|
+
"foreground": { "$type": "color", "$value": "{primitive.gray-300}" },
|
|
21
|
+
"surface": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
22
|
+
"surface-secondary": { "$type": "color", "$value": "{primitive.gray-900}" },
|
|
23
|
+
"surface-overlay": { "$type": "color", "$value": "{primitive.gray-700}" },
|
|
24
|
+
"muted": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
25
|
+
"muted-foreground": { "$type": "color", "$value": "{primitive.gray-500}" },
|
|
26
|
+
"text-primary": { "$type": "color", "$value": "{primitive.gray-300}" },
|
|
27
|
+
"text-secondary": { "$type": "color", "$value": "{primitive.gray-500}" },
|
|
28
|
+
"text-tertiary": { "$type": "color", "$value": "{primitive.gray-400}" },
|
|
29
|
+
"text-emphasis": { "$type": "color", "$value": "{primitive.white}" },
|
|
30
|
+
"border": { "$type": "color", "$value": "{primitive.gray-700}" },
|
|
31
|
+
"border-subtle": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
32
|
+
"primary": { "$type": "color", "$value": "#3b82f6" },
|
|
33
|
+
"destructive": { "$type": "color", "$value": "#ef4444" }
|
|
34
|
+
},
|
|
35
|
+
"typography": {
|
|
36
|
+
"$type": "dimension",
|
|
37
|
+
"body": { "$value": "14px", "$description": "text-sm — body text, descriptions" },
|
|
38
|
+
"small": { "$value": "12px", "$description": "text-xs — dominant size, labels, badges, helper text" },
|
|
39
|
+
"heading": { "$value": "18px", "$description": "text-lg — section headers (rare)" }
|
|
40
|
+
},
|
|
41
|
+
"font-weight": {
|
|
42
|
+
"$type": "dimension",
|
|
43
|
+
"default": { "$value": "500", "$description": "font-medium — dominant weight for text" },
|
|
44
|
+
"emphasis": { "$value": "600", "$description": "font-semibold — emphasis, important text" },
|
|
45
|
+
"strong": { "$value": "700", "$description": "font-bold — rare, special emphasis only" }
|
|
46
|
+
},
|
|
47
|
+
"spacing": {
|
|
48
|
+
"$type": "dimension",
|
|
49
|
+
"component-padding-sm": { "$value": "4px", "$description": "p-1 — tight spacing" },
|
|
50
|
+
"component-padding-md": { "$value": "8px", "$description": "p-2 — standard padding (dominant)" },
|
|
51
|
+
"component-padding-lg": { "$value": "12px", "$description": "p-3 — moderate padding" },
|
|
52
|
+
"component-padding-xl": { "$value": "16px", "$description": "p-4 — generous padding" },
|
|
53
|
+
"gap-tight": { "$value": "4px", "$description": "gap-1" },
|
|
54
|
+
"gap-normal": { "$value": "8px", "$description": "gap-2 — standard element spacing (dominant)" },
|
|
55
|
+
"gap-moderate": { "$value": "12px", "$description": "gap-3" },
|
|
56
|
+
"gap-section": { "$value": "16px", "$description": "gap-4" },
|
|
57
|
+
"gap-region": { "$value": "24px", "$description": "gap-6 — rare" }
|
|
58
|
+
},
|
|
59
|
+
"border-radius": {
|
|
60
|
+
"$type": "dimension",
|
|
61
|
+
"sm": { "$value": "4px", "$description": "rounded — standard rounding (dominant)" },
|
|
62
|
+
"lg": { "$value": "8px", "$description": "rounded-lg — modals, panels, cards" },
|
|
63
|
+
"full": { "$value": "9999px", "$description": "rounded-full — pills, badges" }
|
|
64
|
+
}
|
|
65
|
+
}
|
package/index.ts
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Shared types
|
|
2
|
+
export { type FormColor } from './components/lib/form-colors.ts'
|
|
3
|
+
export {
|
|
4
|
+
SCALE_KEYS, type ScaleKey, type ThemeId,
|
|
5
|
+
DARK_THEMES, LIGHT_THEMES, BASE_THEMES,
|
|
6
|
+
type AccentDef, ACCENT_DEFS,
|
|
7
|
+
satCurve, hslToHex, generateScale,
|
|
8
|
+
isLightTheme, applyTheme,
|
|
9
|
+
} from './components/lib/theme-engine.ts'
|
|
10
|
+
export { ToolrAppLogo, TOOLR_APPS, type ToolrAppId } from './components/lib/toolr-brand.tsx'
|
|
11
|
+
export { AI_TOOL_LOGOS, AiToolIcon, AI_TOOL_NAMES, type AiToolKey } from './components/lib/ai-tools.tsx'
|
|
12
|
+
|
|
13
|
+
// UI Components
|
|
14
|
+
export { IconButton, CollapseButton, iconMap, type IconButtonProps, type CollapseButtonProps, type IconButtonColor, type IconButtonVariant, type IconButtonStatus, type IconName, type ActionItem } from './components/ui/icon-button.tsx'
|
|
15
|
+
export { Label, type LabelProps, type LabelColor } from './components/ui/label.tsx'
|
|
16
|
+
export { Badge, type BadgeProps, type BadgeColor } from './components/ui/badge.tsx'
|
|
17
|
+
export { ConfirmBadge, type ConfirmBadgeProps, type ConfirmBadgeColor } from './components/ui/confirm-badge.tsx'
|
|
18
|
+
export { Checkbox, type CheckboxProps, type CheckboxSize, type CheckboxColor, type CheckboxVariant } from './components/ui/checkbox.tsx'
|
|
19
|
+
export { Toggle, type ToggleProps, type ToggleColor, type ToggleSize, type ToggleVariant } from './components/ui/toggle.tsx'
|
|
20
|
+
export { Input, type InputProps } from './components/ui/input.tsx'
|
|
21
|
+
export { NumberInput, type NumberInputProps } from './components/ui/number-input.tsx'
|
|
22
|
+
export { Tooltip, TooltipButton, type TooltipContent, type TooltipPosition, type TooltipAlign } from './components/ui/tooltip.tsx'
|
|
23
|
+
export { ScopeBadge, type ScopeType } from './components/ui/scope-badge.tsx'
|
|
24
|
+
export { SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps } from './components/ui/segmented-toggle.tsx'
|
|
25
|
+
export { ResizableTextarea, type ResizableTextareaProps } from './components/ui/resizable-textarea.tsx'
|
|
26
|
+
export { Select, type SelectProps, type SelectOption } from './components/ui/select.tsx'
|
|
27
|
+
export { FilterDropdown, type FilterDropdownProps } from './components/ui/filter-dropdown.tsx'
|
|
28
|
+
export { SortDropdown, type SortDropdownProps, type SortField } from './components/ui/sort-dropdown.tsx'
|
|
29
|
+
export { FormActions, type FormActionsProps } from './components/ui/form-actions.tsx'
|
|
30
|
+
export { ConfirmModal, AlertModal, type ConfirmModalProps, type AlertModalProps, type ModalKind, type ModalSize } from './components/ui/modal.tsx'
|
|
31
|
+
export { ActionDialog, type ActionDialogProps } from './components/ui/action-dialog.tsx'
|
|
32
|
+
export { ExecutionDetailsPanel, type ExecutionDetailsPanelProps, type ExecutionDetailRow } from './components/ui/execution-details-panel.tsx'
|
|
33
|
+
export { SettingRow, type SettingRowProps } from './components/ui/setting-row.tsx'
|
|
34
|
+
export { FileTree, collectDirPaths, type FileTreeProps, type FileTreeNode } from './components/ui/file-tree.tsx'
|
|
35
|
+
export { EditorToolbar, type EditorToolbarProps } from './components/ui/editor-toolbar.tsx'
|
|
36
|
+
export { BottomPanelHeader, type BottomPanelHeaderProps, type PanelTab, type StatusBanner } from './components/ui/bottom-panel-header.tsx'
|
|
37
|
+
export { FrontmatterFormHeader, type FrontmatterFormHeaderProps } from './components/ui/frontmatter-form-header.tsx'
|
|
38
|
+
export { EditorPlaceholderCard, type EditorPlaceholderCardProps } from './components/ui/editor-placeholder-card.tsx'
|
|
39
|
+
export { DetailViewWrapper, type DetailViewWrapperProps } from './components/ui/detail-view-wrapper.tsx'
|
|
40
|
+
export { RegistryCard, type RegistryCardProps, type RegistryItemType, type ExtensionSource, type SeedrItemStatus, formatCategory } from './components/ui/registry-card.tsx'
|
|
41
|
+
export { RegistryDetail, type RegistryDetailProps } from './components/ui/registry-detail.tsx'
|
|
42
|
+
export { FileStructureSection, getLanguageFromPath, type FileStructureSectionProps, type PreviewMode, type AccentColor } from './components/ui/file-structure-section.tsx'
|
|
43
|
+
export { RegistryBrowser, type RegistryBrowserProps } from './components/ui/registry-browser.tsx'
|
|
44
|
+
export { AiActionButton, type AiActionButtonProps, type AiActionStatus, type AiCompletionResult } from './components/ui/ai-action-button.tsx'
|
|
45
|
+
export { AiExecutionActionButtons, type AiExecutionActionButtonsProps, type ExecutionStatus } from './components/ui/ai-execution-action-buttons.tsx'
|
|
46
|
+
// Sections > Report a Bug
|
|
47
|
+
export {
|
|
48
|
+
ReportBugForm, type ReportBugFormProps,
|
|
49
|
+
ScreenshotUploader, type ScreenshotUploaderProps, type Screenshot,
|
|
50
|
+
useReportBug, type UseReportBugOptions, type UseReportBugReturn,
|
|
51
|
+
submitIssueReport, ISSUE_TYPES,
|
|
52
|
+
type IssueType, type IssueReport, type IssueReportResult, type SystemInfo, type ScreenshotAttachment,
|
|
53
|
+
createErrorLogger, type ErrorLogger, type TrackedError,
|
|
54
|
+
} from './components/sections/report-bug/index.ts'
|
|
55
|
+
// Sections > Golden Snapshots
|
|
56
|
+
export {
|
|
57
|
+
GoldenSyncPanel, type GoldenSyncPanelProps,
|
|
58
|
+
StatusOverview, type StatusOverviewProps,
|
|
59
|
+
FileDiffViewer, type FileDiffViewerProps,
|
|
60
|
+
SnapshotManager, type SnapshotManagerProps,
|
|
61
|
+
VersionManager, type VersionManagerProps,
|
|
62
|
+
useGoldenSync, formatDate, formatBytes, getLanguage,
|
|
63
|
+
type UseGoldenSyncOptions, type UseGoldenSyncReturn, type DiffTreeNode,
|
|
64
|
+
type ComponentVersion, type GoldenMeta, type DirectoryStatus, type SeedInfo, type GoldenStatus,
|
|
65
|
+
type FileDiffStatus, type FileDiffInfo, type DiffSummary, type ChangedComponents, type GoldenLiveDiff,
|
|
66
|
+
type SnapshotInfo, type SnapshotsManifest, type CreateSnapshotResult, type ResetResult,
|
|
67
|
+
type GoldenSnapshotsApi,
|
|
68
|
+
} from './components/sections/golden-snapshots/index.ts'
|
|
69
|
+
// Sections > AI Tools Paths
|
|
70
|
+
export {
|
|
71
|
+
ToolsPathsPanel, type ToolsPathsPanelProps,
|
|
72
|
+
useToolsPaths, type UseToolsPathsOptions, type UseToolsPathsReturn,
|
|
73
|
+
type AiToolConfig, type ToolDetectionResult, type ToolsPathsApi,
|
|
74
|
+
} from './components/sections/ai-tools-paths/index.ts'
|
|
75
|
+
// Sections > Captured Issues
|
|
76
|
+
export {
|
|
77
|
+
CapturedIssuesPanel, type CapturedIssuesPanelProps,
|
|
78
|
+
useCapturedIssues, type UseCapturedIssuesOptions, type UseCapturedIssuesReturn,
|
|
79
|
+
type CapturedError, type SubmittedError, type CapturedIssuesApi,
|
|
80
|
+
} from './components/sections/captured-issues/index.ts'
|
|
81
|
+
// Sections > Snapshot Browser
|
|
82
|
+
export {
|
|
83
|
+
SnapshotBrowserPanel, type SnapshotBrowserPanelProps,
|
|
84
|
+
SnapshotTree, type SnapshotTreeProps,
|
|
85
|
+
useSnapshotBrowser, type UseSnapshotBrowserOptions, type UseSnapshotBrowserReturn,
|
|
86
|
+
type SnapshotEntry, type SnapshotItem, type SnapshotCategory, type SnapshotScope, type SnapshotBrowserApi,
|
|
87
|
+
} from './components/sections/snapshot-browser/index.ts'
|
|
88
|
+
// Sections > Snippets Editor
|
|
89
|
+
export {
|
|
90
|
+
SnippetsEditor, type SnippetsEditorProps,
|
|
91
|
+
useSnippetsEditor, type UseSnippetsEditorOptions, type UseSnippetsEditorReturn,
|
|
92
|
+
SNIPPET_NAME_REGEX, type SnippetData, type SnippetsEditorApi,
|
|
93
|
+
} from './components/sections/snippets-editor/index.ts'
|
|
94
|
+
// Sections > Prompt Editor
|
|
95
|
+
export {
|
|
96
|
+
TabbedPromptEditor, type TabbedPromptEditorProps,
|
|
97
|
+
FileTypeTabbedPromptEditor, type FileTypeTabbedPromptEditorProps,
|
|
98
|
+
SimulatorPromptEditor, type SimulatorPromptEditorProps,
|
|
99
|
+
usePromptEditor, type UsePromptEditorOptions, type UsePromptEditorReturn,
|
|
100
|
+
type ToolTab, type PromptPlaceholder, type PromptSnapshot, type PromptEditorApi,
|
|
101
|
+
type FileTypeOption, type ScenarioOption,
|
|
102
|
+
} from './components/sections/prompt-editor/index.ts'
|
|
103
|
+
export { CollapsibleSection, type CollapsibleSectionProps } from './components/ui/collapsible-section.tsx'
|
|
104
|
+
export { FilesPanel, type FilesPanelProps, type FileEntry } from './components/ui/files-panel.tsx'
|
|
105
|
+
export { SnippetsPanel, type SnippetsPanelProps, type Snippet } from './components/ui/snippets-panel.tsx'
|
|
106
|
+
export { Breadcrumb, type BreadcrumbProps, type BreadcrumbSegment } from './components/ui/breadcrumb.tsx'
|
|
107
|
+
export { NavigationBar, type NavigationBarProps } from './components/ui/navigation-bar.tsx'
|
|
108
|
+
export { TabBar, type TabBarProps, type Tab } from './components/ui/tab-bar.tsx'
|
|
109
|
+
export { LayoutTabBar, type LayoutTabBarProps, type LayoutTab } from './components/ui/layout-tab-bar.tsx'
|
|
110
|
+
export { NavCard, type NavCardProps } from './components/ui/nav-card.tsx'
|
|
111
|
+
export { ExtensionListCard, type ExtensionListCardProps } from './components/ui/extension-list-card.tsx'
|
|
112
|
+
export { StatusCard, type StatusCardProps, type StatusItem } from './components/ui/status-card.tsx'
|
|
113
|
+
export { SnapshotCard, type SnapshotCardProps } from './components/ui/snapshot-card.tsx'
|
|
114
|
+
export { DetailSection, type DetailSectionProps, type DetailRow } from './components/ui/detail-section.tsx'
|
|
115
|
+
export { SelectionGrid, type SelectionGridProps, type SelectionCardItem, type CodingToolId, type CodingToolPresetConfig } from './components/ui/selection-grid.tsx'
|
|
116
|
+
|
|
117
|
+
// Hooks
|
|
118
|
+
export { useClickOutside } from './components/hooks/use-click-outside.ts'
|
|
119
|
+
export { useDropdownMaxHeight } from './components/hooks/use-dropdown-max-height.ts'
|
|
120
|
+
export { useNavigationHistory, type UseNavigationHistoryReturn } from './components/hooks/use-navigation-history.ts'
|
|
121
|
+
|
|
122
|
+
// Utilities
|
|
123
|
+
export { cn } from './components/lib/cn.ts'
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@toolr/ui-design",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./index.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./tokens": {
|
|
15
|
+
"source": "./tokens/theme.css",
|
|
16
|
+
"default": "./dist/tokens/theme.css"
|
|
17
|
+
},
|
|
18
|
+
"./preset": {
|
|
19
|
+
"source": "./tailwind-preset.ts",
|
|
20
|
+
"import": "./dist/preset.js",
|
|
21
|
+
"types": "./dist/preset.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./content": {
|
|
24
|
+
"source": "./components/content/info-panel-primitives.tsx",
|
|
25
|
+
"import": "./dist/content.js",
|
|
26
|
+
"types": "./dist/content.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./diagrams": {
|
|
29
|
+
"source": "./components/diagrams/diagram-utils.tsx",
|
|
30
|
+
"import": "./dist/diagrams.js",
|
|
31
|
+
"types": "./dist/diagrams.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"index.ts",
|
|
37
|
+
"tailwind-preset.ts",
|
|
38
|
+
"components",
|
|
39
|
+
"tokens"
|
|
40
|
+
],
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "tsup",
|
|
43
|
+
"postbuild": "cp -r tokens dist/tokens"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^18 || ^19",
|
|
47
|
+
"react-dom": "^18 || ^19"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@monaco-editor/react": "^4.7.0",
|
|
51
|
+
"clsx": "^2.1.1",
|
|
52
|
+
"lucide-react": "^0.559.0",
|
|
53
|
+
"monaco-editor": "^0.55.1",
|
|
54
|
+
"motion": "^12.33.0",
|
|
55
|
+
"tailwind-merge": "^3.3.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/react": "^19.2.14",
|
|
59
|
+
"@types/react-dom": "^19.2.3",
|
|
60
|
+
"tsup": "^8.5.1",
|
|
61
|
+
"typescript": "^5.9.3"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Tailwind 4 preset for toolr apps.
|
|
3
|
+
*
|
|
4
|
+
* Consuming apps import the token CSS via:
|
|
5
|
+
* @import "@toolr/ui-design/tokens";
|
|
6
|
+
*
|
|
7
|
+
* This preset provides shared theme extensions (breakpoints, etc.)
|
|
8
|
+
* that all apps should use.
|
|
9
|
+
*/
|
|
10
|
+
export const toolrPreset = {
|
|
11
|
+
theme: {
|
|
12
|
+
extend: {
|
|
13
|
+
screens: {
|
|
14
|
+
'3xl': '100rem',
|
|
15
|
+
'4xl': '156.25rem',
|
|
16
|
+
},
|
|
17
|
+
fontFamily: {
|
|
18
|
+
sans: ['Inter', 'system-ui', 'Avenir', 'Helvetica', 'Arial', 'sans-serif'],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Primitive Design Tokens — OLED Pure Neutral Scale
|
|
3
|
+
Pure achromatic scale with progressive surface lift from true black.
|
|
4
|
+
|
|
5
|
+
These are raw color values. Use semantic tokens (semantic.css) in components.
|
|
6
|
+
============================================================================= */
|
|
7
|
+
|
|
8
|
+
@theme {
|
|
9
|
+
/* Neutral scale (OLED Pure) */
|
|
10
|
+
--color-neutral-950: #000000;
|
|
11
|
+
--color-neutral-900: #050505;
|
|
12
|
+
--color-neutral-800: #0a0a0a;
|
|
13
|
+
--color-neutral-700: #1a1a1a;
|
|
14
|
+
--color-neutral-600: #333333;
|
|
15
|
+
--color-neutral-500: #666666;
|
|
16
|
+
--color-neutral-400: #999999;
|
|
17
|
+
--color-neutral-300: #cccccc;
|
|
18
|
+
--color-neutral-200: #e0e0e0;
|
|
19
|
+
--color-neutral-100: #f0f0f0;
|
|
20
|
+
--color-neutral-50: #fafafa;
|
|
21
|
+
|
|
22
|
+
/* Disable Tailwind default gray to prevent accidental usage */
|
|
23
|
+
--color-gray-*: initial;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:root {
|
|
27
|
+
--color-black: #000000;
|
|
28
|
+
--color-white: #ffffff;
|
|
29
|
+
|
|
30
|
+
/* Accent colors (Tailwind 500 values — used via Tailwind classes, listed for reference) */
|
|
31
|
+
--color-blue-500: #3b82f6;
|
|
32
|
+
--color-blue-400: #60a5fa;
|
|
33
|
+
--color-green-500: #22c55e;
|
|
34
|
+
--color-red-500: #ef4444;
|
|
35
|
+
--color-purple-500: #a855f7;
|
|
36
|
+
--color-orange-500: #f97316;
|
|
37
|
+
--color-amber-500: #f59e0b;
|
|
38
|
+
--color-yellow-500: #eab308;
|
|
39
|
+
--color-pink-500: #ec4899;
|
|
40
|
+
--color-emerald-500: #10b981;
|
|
41
|
+
--color-teal-500: #14b8a6;
|
|
42
|
+
--color-cyan-500: #06b6d4;
|
|
43
|
+
--color-indigo-500: #6366f1;
|
|
44
|
+
--color-violet-500: #8b5cf6;
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Semantic Design Tokens — Purpose-Based Names
|
|
3
|
+
References primitives from primitives.css
|
|
4
|
+
|
|
5
|
+
These tokens describe intent, not appearance.
|
|
6
|
+
Accent colors (blue-500/20, text-blue-400, etc.) stay Tailwind-native.
|
|
7
|
+
============================================================================= */
|
|
8
|
+
|
|
9
|
+
@import './primitives.css';
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
/* Page-level backgrounds */
|
|
13
|
+
--background: var(--color-black);
|
|
14
|
+
--foreground: var(--color-neutral-300);
|
|
15
|
+
|
|
16
|
+
/* Surface: cards, panels, popups */
|
|
17
|
+
--surface: var(--color-neutral-800);
|
|
18
|
+
--surface-foreground: var(--color-neutral-300);
|
|
19
|
+
--surface-secondary: var(--color-neutral-900);
|
|
20
|
+
--surface-overlay: var(--color-neutral-700);
|
|
21
|
+
|
|
22
|
+
/* Muted: subdued elements, disabled states */
|
|
23
|
+
--muted: var(--color-neutral-800);
|
|
24
|
+
--muted-foreground: var(--color-neutral-500);
|
|
25
|
+
|
|
26
|
+
/* Text hierarchy */
|
|
27
|
+
--text-primary: var(--color-neutral-300);
|
|
28
|
+
--text-secondary: var(--color-neutral-500);
|
|
29
|
+
--text-tertiary: var(--color-neutral-400);
|
|
30
|
+
--text-emphasis: var(--color-white);
|
|
31
|
+
|
|
32
|
+
/* Borders */
|
|
33
|
+
--border: var(--color-neutral-700);
|
|
34
|
+
--border-subtle: var(--color-neutral-800);
|
|
35
|
+
|
|
36
|
+
/* Interactive: primary action color */
|
|
37
|
+
--primary: var(--color-blue-500);
|
|
38
|
+
--primary-foreground: var(--color-white);
|
|
39
|
+
|
|
40
|
+
/* Destructive actions */
|
|
41
|
+
--destructive: var(--color-red-500);
|
|
42
|
+
--destructive-foreground: var(--color-white);
|
|
43
|
+
|
|
44
|
+
/* Focus ring */
|
|
45
|
+
--ring: var(--color-blue-400);
|
|
46
|
+
}
|
package/tokens/theme.css
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
Tailwind 4 Theme Integration
|
|
3
|
+
Import this file in consuming apps: @import "@toolr/ui-design/tokens"
|
|
4
|
+
============================================================================= */
|
|
5
|
+
|
|
6
|
+
@import './semantic.css';
|
|
7
|
+
|
|
8
|
+
@keyframes debounce-border-drain {
|
|
9
|
+
from { stroke-dashoffset: 0; }
|
|
10
|
+
to { stroke-dashoffset: -100; }
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://tr.designtokens.org/format/",
|
|
3
|
+
"primitive": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"black": { "$value": "#000000" },
|
|
6
|
+
"gray-950": { "$value": "#030712" },
|
|
7
|
+
"gray-900": { "$value": "#111827" },
|
|
8
|
+
"gray-800": { "$value": "#1f2937" },
|
|
9
|
+
"gray-700": { "$value": "#374151" },
|
|
10
|
+
"gray-600": { "$value": "#4b5563" },
|
|
11
|
+
"gray-500": { "$value": "#6b7280" },
|
|
12
|
+
"gray-400": { "$value": "#9ca3af" },
|
|
13
|
+
"gray-300": { "$value": "#d1d5db" },
|
|
14
|
+
"gray-200": { "$value": "#e5e7eb" },
|
|
15
|
+
"gray-100": { "$value": "#f3f4f6" },
|
|
16
|
+
"white": { "$value": "#ffffff" }
|
|
17
|
+
},
|
|
18
|
+
"semantic": {
|
|
19
|
+
"background": { "$type": "color", "$value": "{primitive.black}" },
|
|
20
|
+
"foreground": { "$type": "color", "$value": "{primitive.gray-300}" },
|
|
21
|
+
"surface": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
22
|
+
"surface-secondary": { "$type": "color", "$value": "{primitive.gray-900}" },
|
|
23
|
+
"surface-overlay": { "$type": "color", "$value": "{primitive.gray-700}" },
|
|
24
|
+
"muted": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
25
|
+
"muted-foreground": { "$type": "color", "$value": "{primitive.gray-500}" },
|
|
26
|
+
"text-primary": { "$type": "color", "$value": "{primitive.gray-300}" },
|
|
27
|
+
"text-secondary": { "$type": "color", "$value": "{primitive.gray-500}" },
|
|
28
|
+
"text-tertiary": { "$type": "color", "$value": "{primitive.gray-400}" },
|
|
29
|
+
"text-emphasis": { "$type": "color", "$value": "{primitive.white}" },
|
|
30
|
+
"border": { "$type": "color", "$value": "{primitive.gray-700}" },
|
|
31
|
+
"border-subtle": { "$type": "color", "$value": "{primitive.gray-800}" },
|
|
32
|
+
"primary": { "$type": "color", "$value": "#3b82f6" },
|
|
33
|
+
"destructive": { "$type": "color", "$value": "#ef4444" }
|
|
34
|
+
},
|
|
35
|
+
"typography": {
|
|
36
|
+
"$type": "dimension",
|
|
37
|
+
"body": { "$value": "14px", "$description": "text-sm — body text, descriptions" },
|
|
38
|
+
"small": { "$value": "12px", "$description": "text-xs — dominant size, labels, badges, helper text" },
|
|
39
|
+
"heading": { "$value": "18px", "$description": "text-lg — section headers (rare)" }
|
|
40
|
+
},
|
|
41
|
+
"font-weight": {
|
|
42
|
+
"$type": "dimension",
|
|
43
|
+
"default": { "$value": "500", "$description": "font-medium — dominant weight for text" },
|
|
44
|
+
"emphasis": { "$value": "600", "$description": "font-semibold — emphasis, important text" },
|
|
45
|
+
"strong": { "$value": "700", "$description": "font-bold — rare, special emphasis only" }
|
|
46
|
+
},
|
|
47
|
+
"spacing": {
|
|
48
|
+
"$type": "dimension",
|
|
49
|
+
"component-padding-sm": { "$value": "4px", "$description": "p-1 — tight spacing" },
|
|
50
|
+
"component-padding-md": { "$value": "8px", "$description": "p-2 — standard padding (dominant)" },
|
|
51
|
+
"component-padding-lg": { "$value": "12px", "$description": "p-3 — moderate padding" },
|
|
52
|
+
"component-padding-xl": { "$value": "16px", "$description": "p-4 — generous padding" },
|
|
53
|
+
"gap-tight": { "$value": "4px", "$description": "gap-1" },
|
|
54
|
+
"gap-normal": { "$value": "8px", "$description": "gap-2 — standard element spacing (dominant)" },
|
|
55
|
+
"gap-moderate": { "$value": "12px", "$description": "gap-3" },
|
|
56
|
+
"gap-section": { "$value": "16px", "$description": "gap-4" },
|
|
57
|
+
"gap-region": { "$value": "24px", "$description": "gap-6 — rare" }
|
|
58
|
+
},
|
|
59
|
+
"border-radius": {
|
|
60
|
+
"$type": "dimension",
|
|
61
|
+
"sm": { "$value": "4px", "$description": "rounded — standard rounding (dominant)" },
|
|
62
|
+
"lg": { "$value": "8px", "$description": "rounded-lg — modals, panels, cards" },
|
|
63
|
+
"full": { "$value": "9999px", "$description": "rounded-full — pills, badges" }
|
|
64
|
+
}
|
|
65
|
+
}
|