@getloopscale/ui 0.0.0-stage → 0.38.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/LICENSE +201 -0
- package/README.md +91 -2
- package/dist/base.css +110 -0
- package/dist/components/composites/account-menu/account-menu.d.ts +43 -0
- package/dist/components/composites/account-menu/index.d.ts +1 -0
- package/dist/components/composites/annotation-input/annotation-input.d.ts +38 -0
- package/dist/components/composites/annotation-input/index.d.ts +4 -0
- package/dist/components/composites/annotation-input/types.d.ts +31 -0
- package/dist/components/composites/annotation-summary-group/annotation-summary-group.d.ts +28 -0
- package/dist/components/composites/annotation-summary-group/index.d.ts +1 -0
- package/dist/components/composites/attributes-table/attributes-table.d.ts +20 -0
- package/dist/components/composites/attributes-table/index.d.ts +1 -0
- package/dist/components/composites/chat-message-card/chat-message-card.d.ts +14 -0
- package/dist/components/composites/chat-message-card/index.d.ts +1 -0
- package/dist/components/composites/code-block/code-block.d.ts +29 -0
- package/dist/components/composites/code-block/index.d.ts +1 -0
- package/dist/components/composites/command-palette/command-palette.d.ts +41 -0
- package/dist/components/composites/command-palette/index.d.ts +1 -0
- package/dist/components/composites/comment-thread/comment-thread.d.ts +24 -0
- package/dist/components/composites/comment-thread/index.d.ts +2 -0
- package/dist/components/composites/confirm-dialog/confirm-dialog.d.ts +41 -0
- package/dist/components/composites/confirm-dialog/index.d.ts +1 -0
- package/dist/components/composites/data-table/compare-values.d.ts +2 -0
- package/dist/components/composites/data-table/data-table-loading.d.ts +10 -0
- package/dist/components/composites/data-table/data-table-parts.d.ts +16 -0
- package/dist/components/composites/data-table/data-table-virtualized.d.ts +32 -0
- package/dist/components/composites/data-table/data-table.d.ts +82 -0
- package/dist/components/composites/data-table/index.d.ts +2 -0
- package/dist/components/composites/data-table/use-data-table-sort.d.ts +19 -0
- package/dist/components/composites/dataset-item-diff/dataset-item-diff.d.ts +19 -0
- package/dist/components/composites/dataset-item-diff/index.d.ts +4 -0
- package/dist/components/composites/dataset-item-diff/to-diff-text.d.ts +22 -0
- package/dist/components/composites/deployment-row/deployment-row.d.ts +28 -0
- package/dist/components/composites/deployment-row/index.d.ts +1 -0
- package/dist/components/composites/diff-view/diff-section.d.ts +19 -0
- package/dist/components/composites/diff-view/diff-view.d.ts +39 -0
- package/dist/components/composites/diff-view/index.d.ts +2 -0
- package/dist/components/composites/domain-config/domain-config.d.ts +34 -0
- package/dist/components/composites/domain-config/index.d.ts +1 -0
- package/dist/components/composites/env-var-editor/env-var-editor.d.ts +35 -0
- package/dist/components/composites/env-var-editor/index.d.ts +1 -0
- package/dist/components/composites/evaluator-form/evaluator-form.d.ts +25 -0
- package/dist/components/composites/evaluator-form/index.d.ts +3 -0
- package/dist/components/composites/evaluator-form/types.d.ts +41 -0
- package/dist/components/composites/histogram/histogram.d.ts +19 -0
- package/dist/components/composites/histogram/index.d.ts +2 -0
- package/dist/components/composites/io-cards/index.d.ts +2 -0
- package/dist/components/composites/io-cards/io-cards.d.ts +17 -0
- package/dist/components/composites/io-cards/message-card.d.ts +21 -0
- package/dist/components/composites/message-branch-selector/index.d.ts +1 -0
- package/dist/components/composites/message-branch-selector/message-branch-selector.d.ts +27 -0
- package/dist/components/composites/metric-card/index.d.ts +2 -0
- package/dist/components/composites/metric-card/metric-card.d.ts +46 -0
- package/dist/components/composites/page-shell/index.d.ts +1 -0
- package/dist/components/composites/page-shell/page-shell.d.ts +68 -0
- package/dist/components/composites/percentile-chart/index.d.ts +2 -0
- package/dist/components/composites/percentile-chart/percentile-chart.d.ts +37 -0
- package/dist/components/composites/preview-env-card/index.d.ts +1 -0
- package/dist/components/composites/preview-env-card/preview-env-card.d.ts +36 -0
- package/dist/components/composites/price-breakdown/index.d.ts +2 -0
- package/dist/components/composites/price-breakdown/price-breakdown.d.ts +21 -0
- package/dist/components/composites/project-card/index.d.ts +1 -0
- package/dist/components/composites/project-card/project-card.d.ts +32 -0
- package/dist/components/composites/prompt-template-editor/extract-vars.d.ts +1 -0
- package/dist/components/composites/prompt-template-editor/index.d.ts +2 -0
- package/dist/components/composites/prompt-template-editor/prompt-template-editor.d.ts +24 -0
- package/dist/components/composites/prompt-version-diff/index.d.ts +4 -0
- package/dist/components/composites/prompt-version-diff/prompt-version-diff.d.ts +20 -0
- package/dist/components/composites/prompt-version-diff/to-diff-text.d.ts +26 -0
- package/dist/components/composites/rollback-ui/index.d.ts +1 -0
- package/dist/components/composites/rollback-ui/rollback-ui.d.ts +32 -0
- package/dist/components/composites/session-summary/index.d.ts +1 -0
- package/dist/components/composites/session-summary/session-summary.d.ts +18 -0
- package/dist/components/composites/session-timeline/index.d.ts +1 -0
- package/dist/components/composites/session-timeline/session-timeline.d.ts +22 -0
- package/dist/components/composites/severity-badge/index.d.ts +2 -0
- package/dist/components/composites/severity-badge/severity-badge.d.ts +33 -0
- package/dist/components/composites/span-graph/index.d.ts +1 -0
- package/dist/components/composites/span-graph/span-graph.d.ts +19 -0
- package/dist/components/composites/span-tree/index.d.ts +2 -0
- package/dist/components/composites/span-tree/span-tree-row.d.ts +22 -0
- package/dist/components/composites/span-tree/span-tree-virtual.d.ts +7 -0
- package/dist/components/composites/span-tree/span-tree.d.ts +34 -0
- package/dist/components/composites/span-waterfall/index.d.ts +1 -0
- package/dist/components/composites/span-waterfall/span-waterfall.d.ts +28 -0
- package/dist/components/composites/status-indicator/index.d.ts +2 -0
- package/dist/components/composites/status-indicator/status-indicator.d.ts +31 -0
- package/dist/components/composites/stepper/index.d.ts +1 -0
- package/dist/components/composites/stepper/stepper.d.ts +53 -0
- package/dist/components/composites/tag-input/index.d.ts +2 -0
- package/dist/components/composites/tag-input/tag-input.d.ts +32 -0
- package/dist/components/composites/task-header/index.d.ts +1 -0
- package/dist/components/composites/task-header/task-header.d.ts +20 -0
- package/dist/components/composites/token-cost-breakdown/index.d.ts +2 -0
- package/dist/components/composites/token-cost-breakdown/token-cost-breakdown.d.ts +26 -0
- package/dist/components/composites/trace-compare/index.d.ts +1 -0
- package/dist/components/composites/trace-compare/trace-compare.d.ts +27 -0
- package/dist/components/composites/trace-transcript/index.d.ts +1 -0
- package/dist/components/composites/trace-transcript/trace-transcript.d.ts +26 -0
- package/dist/components/composites/trend-chart/index.d.ts +1 -0
- package/dist/components/composites/trend-chart/trend-chart.d.ts +117 -0
- package/dist/components/primitives/action-bar/action-bar.d.ts +36 -0
- package/dist/components/primitives/action-bar/index.d.ts +1 -0
- package/dist/components/primitives/alert/alert.d.ts +31 -0
- package/dist/components/primitives/alert/index.d.ts +1 -0
- package/dist/components/primitives/avatar/avatar.d.ts +26 -0
- package/dist/components/primitives/avatar/index.d.ts +1 -0
- package/dist/components/primitives/badge/badge.d.ts +33 -0
- package/dist/components/primitives/badge/index.d.ts +1 -0
- package/dist/components/primitives/breadcrumb/breadcrumb.d.ts +15 -0
- package/dist/components/primitives/breadcrumb/index.d.ts +1 -0
- package/dist/components/primitives/button/button.d.ts +26 -0
- package/dist/components/primitives/button/index.d.ts +1 -0
- package/dist/components/primitives/card/card.d.ts +59 -0
- package/dist/components/primitives/card/index.d.ts +1 -0
- package/dist/components/primitives/checkbox/checkbox.d.ts +20 -0
- package/dist/components/primitives/checkbox/index.d.ts +1 -0
- package/dist/components/primitives/combobox/combobox.d.ts +53 -0
- package/dist/components/primitives/combobox/index.d.ts +1 -0
- package/dist/components/primitives/copy-button/copy-button.d.ts +17 -0
- package/dist/components/primitives/copy-button/index.d.ts +1 -0
- package/dist/components/primitives/danger-zone/danger-zone.d.ts +40 -0
- package/dist/components/primitives/danger-zone/index.d.ts +1 -0
- package/dist/components/primitives/description-list/description-list.d.ts +33 -0
- package/dist/components/primitives/description-list/index.d.ts +1 -0
- package/dist/components/primitives/dialog/dialog.d.ts +31 -0
- package/dist/components/primitives/dialog/index.d.ts +1 -0
- package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +68 -0
- package/dist/components/primitives/dropdown-menu/index.d.ts +1 -0
- package/dist/components/primitives/empty-state/empty-state.d.ts +22 -0
- package/dist/components/primitives/empty-state/index.d.ts +1 -0
- package/dist/components/primitives/file-dropzone/file-dropzone.d.ts +26 -0
- package/dist/components/primitives/file-dropzone/index.d.ts +1 -0
- package/dist/components/primitives/file-dropzone/validate.d.ts +40 -0
- package/dist/components/primitives/form-field/form-field.d.ts +44 -0
- package/dist/components/primitives/form-field/index.d.ts +1 -0
- package/dist/components/primitives/input/index.d.ts +1 -0
- package/dist/components/primitives/input/input.d.ts +24 -0
- package/dist/components/primitives/json-viewer/index.d.ts +1 -0
- package/dist/components/primitives/json-viewer/json-viewer.d.ts +32 -0
- package/dist/components/primitives/label/index.d.ts +1 -0
- package/dist/components/primitives/label/label.d.ts +15 -0
- package/dist/components/primitives/login-split/index.d.ts +1 -0
- package/dist/components/primitives/login-split/login-split.d.ts +24 -0
- package/dist/components/primitives/metrics-panel/index.d.ts +1 -0
- package/dist/components/primitives/metrics-panel/metrics-panel.d.ts +62 -0
- package/dist/components/primitives/pagination/index.d.ts +1 -0
- package/dist/components/primitives/pagination/pagination.d.ts +44 -0
- package/dist/components/primitives/pin-input/index.d.ts +1 -0
- package/dist/components/primitives/pin-input/pin-input.d.ts +41 -0
- package/dist/components/primitives/plan-badge/index.d.ts +1 -0
- package/dist/components/primitives/plan-badge/plan-badge.d.ts +35 -0
- package/dist/components/primitives/progress/index.d.ts +1 -0
- package/dist/components/primitives/progress/progress.d.ts +44 -0
- package/dist/components/primitives/radio-group/index.d.ts +1 -0
- package/dist/components/primitives/radio-group/radio-group.d.ts +5 -0
- package/dist/components/primitives/scroll-area/index.d.ts +2 -0
- package/dist/components/primitives/scroll-area/scroll-area.d.ts +40 -0
- package/dist/components/primitives/scroll-area/use-stick-to-bottom.d.ts +20 -0
- package/dist/components/primitives/select/index.d.ts +1 -0
- package/dist/components/primitives/select/select.d.ts +50 -0
- package/dist/components/primitives/sheet/index.d.ts +1 -0
- package/dist/components/primitives/sheet/sheet.d.ts +33 -0
- package/dist/components/primitives/sidebar/index.d.ts +1 -0
- package/dist/components/primitives/sidebar/sidebar.d.ts +76 -0
- package/dist/components/primitives/skeleton/index.d.ts +1 -0
- package/dist/components/primitives/skeleton/skeleton.d.ts +21 -0
- package/dist/components/primitives/slider/index.d.ts +1 -0
- package/dist/components/primitives/slider/slider.d.ts +24 -0
- package/dist/components/primitives/social-auth-row/index.d.ts +1 -0
- package/dist/components/primitives/social-auth-row/social-auth-row.d.ts +24 -0
- package/dist/components/primitives/stat-tile/index.d.ts +1 -0
- package/dist/components/primitives/stat-tile/stat-tile.d.ts +28 -0
- package/dist/components/primitives/status-dot/index.d.ts +1 -0
- package/dist/components/primitives/status-dot/status-dot.d.ts +31 -0
- package/dist/components/primitives/switch/index.d.ts +1 -0
- package/dist/components/primitives/switch/switch.d.ts +20 -0
- package/dist/components/primitives/table/index.d.ts +1 -0
- package/dist/components/primitives/table/table.d.ts +61 -0
- package/dist/components/primitives/tabs/index.d.ts +1 -0
- package/dist/components/primitives/tabs/tabs.d.ts +7 -0
- package/dist/components/primitives/textarea/index.d.ts +1 -0
- package/dist/components/primitives/textarea/textarea.d.ts +20 -0
- package/dist/components/primitives/timestamp/index.d.ts +1 -0
- package/dist/components/primitives/timestamp/timestamp.d.ts +34 -0
- package/dist/components/primitives/toast/index.d.ts +2 -0
- package/dist/components/primitives/toast/toast.d.ts +34 -0
- package/dist/components/primitives/toast/toaster.d.ts +38 -0
- package/dist/components/primitives/tooltip/index.d.ts +1 -0
- package/dist/components/primitives/tooltip/tooltip.d.ts +33 -0
- package/dist/components/primitives/topnav/index.d.ts +1 -0
- package/dist/components/primitives/topnav/topnav.d.ts +29 -0
- package/dist/components/primitives/update-banner/index.d.ts +1 -0
- package/dist/components/primitives/update-banner/update-banner.d.ts +16 -0
- package/dist/components.css +2 -0
- package/dist/fonts/LICENSE-hanken-grotesk.txt +93 -0
- package/dist/fonts/LICENSE-jetbrains-mono.txt +93 -0
- package/dist/fonts/hanken-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/hanken-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-wght-normal.woff2 +0 -0
- package/dist/fonts-cdn.css +16 -0
- package/dist/fonts.css +59 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +9271 -0
- package/dist/lib/chart/histogram.d.ts +21 -0
- package/dist/lib/chart/index.d.ts +1 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/diff/diff-lines.d.ts +23 -0
- package/dist/lib/diff/index.d.ts +1 -0
- package/dist/lib/env.d.ts +55 -0
- package/dist/lib/live-region-context.d.ts +2 -0
- package/dist/lib/safe-href.d.ts +27 -0
- package/dist/lib/session/aggregate.d.ts +18 -0
- package/dist/lib/session/index.d.ts +2 -0
- package/dist/lib/session/types.d.ts +30 -0
- package/dist/lib/trace/align.d.ts +41 -0
- package/dist/lib/trace/attributes.d.ts +11 -0
- package/dist/lib/trace/bar-layout.d.ts +52 -0
- package/dist/lib/trace/chat.d.ts +14 -0
- package/dist/lib/trace/cost.d.ts +24 -0
- package/dist/lib/trace/duration.d.ts +18 -0
- package/dist/lib/trace/flatten.d.ts +28 -0
- package/dist/lib/trace/graph-layout.d.ts +52 -0
- package/dist/lib/trace/index.d.ts +9 -0
- package/dist/lib/trace/types.d.ts +85 -0
- package/dist/lib/types.d.ts +10 -0
- package/dist/preset.css +13 -0
- package/dist/styles/tailwind-preset.d.ts +29 -0
- package/dist/styles-v3-legacy.css +85 -0
- package/dist/styles.css +23 -0
- package/dist/tailwind-preset.js +166 -0
- package/dist/test/a11y.d.ts +13 -0
- package/dist/test/fixtures/trace.d.ts +19 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/tokens-v4.css +222 -0
- package/dist/tokens.css +288 -0
- package/dist/types/task.d.ts +9 -0
- package/package.json +127 -4
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@import "./fonts.css";
|
|
2
|
+
@import "./tokens.css";
|
|
3
|
+
|
|
4
|
+
@tailwind base;
|
|
5
|
+
@tailwind components;
|
|
6
|
+
@tailwind utilities;
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
* {
|
|
10
|
+
border-color: var(--border);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html {
|
|
14
|
+
font-family: var(--font-body);
|
|
15
|
+
-webkit-font-smoothing: antialiased;
|
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
|
17
|
+
text-rendering: optimizeLegibility;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
background-color: var(--background);
|
|
22
|
+
color: var(--foreground);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Display headings inherit theme display font (Hanken Grotesk by default).
|
|
26
|
+
* Per-size tracking is set in tailwind.config.ts; this is the safety net. */
|
|
27
|
+
h1,
|
|
28
|
+
h2,
|
|
29
|
+
h3,
|
|
30
|
+
h4 {
|
|
31
|
+
font-family: var(--font-display);
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Code surfaces: use the mono token + tabular numerals so columns of
|
|
36
|
+
* numbers line up in tables/logs/metrics. */
|
|
37
|
+
code,
|
|
38
|
+
pre,
|
|
39
|
+
kbd,
|
|
40
|
+
samp {
|
|
41
|
+
font-family: var(--font-mono);
|
|
42
|
+
font-feature-settings: "tnum" 1, "liga" 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Focus ring: the brand color. */
|
|
46
|
+
:focus-visible {
|
|
47
|
+
outline: 2px solid var(--ring);
|
|
48
|
+
outline-offset: 2px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Selection: a soft wash of the brand color. */
|
|
52
|
+
::selection {
|
|
53
|
+
background-color: color-mix(in oklch, var(--primary) 25%, transparent);
|
|
54
|
+
color: var(--foreground);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Native scrollbar fallback .
|
|
58
|
+
* Used for native browser scroll on elements that don't wrap in <ScrollArea>.
|
|
59
|
+
* Components that DO use <ScrollArea> hide the native scrollbar via Radix.
|
|
60
|
+
*/
|
|
61
|
+
*::-webkit-scrollbar {
|
|
62
|
+
width: 10px;
|
|
63
|
+
height: 10px;
|
|
64
|
+
}
|
|
65
|
+
*::-webkit-scrollbar-track {
|
|
66
|
+
background: transparent;
|
|
67
|
+
}
|
|
68
|
+
*::-webkit-scrollbar-thumb {
|
|
69
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 25%, transparent);
|
|
70
|
+
border: 2px solid transparent;
|
|
71
|
+
background-clip: content-box;
|
|
72
|
+
border-radius: 9999px;
|
|
73
|
+
transition: background-color var(--duration-fast) var(--ease-out-soft);
|
|
74
|
+
}
|
|
75
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
76
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 50%, transparent);
|
|
77
|
+
}
|
|
78
|
+
*::-webkit-scrollbar-thumb:active {
|
|
79
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 75%, transparent);
|
|
80
|
+
}
|
|
81
|
+
* {
|
|
82
|
+
scrollbar-width: thin;
|
|
83
|
+
scrollbar-color: color-mix(in oklch, var(--muted-foreground) 30%, transparent) transparent;
|
|
84
|
+
}
|
|
85
|
+
}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* LoopScale UI — Tailwind v4 entry stylesheet.
|
|
2
|
+
*
|
|
3
|
+
* Import this once from the app's own CSS. It brings, in order:
|
|
4
|
+
* - `tailwindcss`: Tailwind v4 core (preflight and utilities)
|
|
5
|
+
* - `fonts.css`: self-hosted Hanken Grotesk and JetBrains Mono
|
|
6
|
+
* - `tokens.css`: the `--*` variables, light by default and dark under `.dark`
|
|
7
|
+
* - `tokens-v4.css`: the `@theme` namespace Tailwind v4 reads to emit utilities
|
|
8
|
+
* - `base.css`: element defaults that depend on the tokens
|
|
9
|
+
* - `components.css`: the utilities this package's own components use
|
|
10
|
+
*
|
|
11
|
+
* Tailwind 3 consumers load `@getloopscale/ui/styles-v3-legacy.css` instead.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@import "tailwindcss";
|
|
15
|
+
@import "./fonts.css";
|
|
16
|
+
@import "./tokens.css";
|
|
17
|
+
@import "./tokens-v4.css";
|
|
18
|
+
@import "./base.css";
|
|
19
|
+
|
|
20
|
+
/* Compiled at build time by `scripts/build-css.ts`, so consumers do not depend on Tailwind's
|
|
21
|
+
* `@source` scanning this package inside `node_modules`, which finds nothing under pnpm symlinks.
|
|
22
|
+
*/
|
|
23
|
+
@import "./components.css";
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import animate from 'tailwindcss-animate';
|
|
2
|
+
|
|
3
|
+
// src/styles/tailwind-preset.ts
|
|
4
|
+
var hsl = (token) => `oklch(from var(${token}) l c h / <alpha-value>)`;
|
|
5
|
+
var loopscaleUIPreset = {
|
|
6
|
+
theme: {
|
|
7
|
+
container: {
|
|
8
|
+
center: true,
|
|
9
|
+
padding: "1rem",
|
|
10
|
+
screens: {
|
|
11
|
+
"2xl": "1280px"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
extend: {
|
|
15
|
+
colors: {
|
|
16
|
+
background: hsl("--background"),
|
|
17
|
+
foreground: hsl("--foreground"),
|
|
18
|
+
card: {
|
|
19
|
+
DEFAULT: hsl("--card"),
|
|
20
|
+
foreground: hsl("--card-foreground")
|
|
21
|
+
},
|
|
22
|
+
popover: {
|
|
23
|
+
DEFAULT: hsl("--popover"),
|
|
24
|
+
foreground: hsl("--popover-foreground")
|
|
25
|
+
},
|
|
26
|
+
primary: {
|
|
27
|
+
DEFAULT: hsl("--primary"),
|
|
28
|
+
deep: hsl("--primary-deep"),
|
|
29
|
+
glow: hsl("--primary-glow"),
|
|
30
|
+
foreground: hsl("--primary-foreground")
|
|
31
|
+
},
|
|
32
|
+
secondary: {
|
|
33
|
+
DEFAULT: hsl("--secondary"),
|
|
34
|
+
foreground: hsl("--secondary-foreground")
|
|
35
|
+
},
|
|
36
|
+
accent: {
|
|
37
|
+
DEFAULT: hsl("--accent"),
|
|
38
|
+
deep: hsl("--accent-deep"),
|
|
39
|
+
foreground: hsl("--accent-foreground")
|
|
40
|
+
},
|
|
41
|
+
muted: {
|
|
42
|
+
DEFAULT: hsl("--muted"),
|
|
43
|
+
foreground: hsl("--muted-foreground")
|
|
44
|
+
},
|
|
45
|
+
success: {
|
|
46
|
+
DEFAULT: hsl("--success"),
|
|
47
|
+
foreground: hsl("--success-foreground")
|
|
48
|
+
},
|
|
49
|
+
warning: {
|
|
50
|
+
DEFAULT: hsl("--warning"),
|
|
51
|
+
foreground: hsl("--warning-foreground")
|
|
52
|
+
},
|
|
53
|
+
destructive: {
|
|
54
|
+
DEFAULT: hsl("--destructive"),
|
|
55
|
+
foreground: hsl("--destructive-foreground")
|
|
56
|
+
},
|
|
57
|
+
info: {
|
|
58
|
+
DEFAULT: hsl("--info"),
|
|
59
|
+
foreground: hsl("--info-foreground")
|
|
60
|
+
},
|
|
61
|
+
// Status palette (online/offline/degraded/info) consumed by
|
|
62
|
+
// StatusIndicator via `bg-status-*`. The `--status-*` tokens already
|
|
63
|
+
// live in tokens.css; this block was missing from the v3 preset (only
|
|
64
|
+
// the v4 `@theme` declared `--color-status-*`), so `bg-status-online`
|
|
65
|
+
// resolved to nothing in the v3/Ladle build — transparent dots.
|
|
66
|
+
status: {
|
|
67
|
+
online: {
|
|
68
|
+
DEFAULT: hsl("--status-online"),
|
|
69
|
+
foreground: hsl("--status-online-foreground")
|
|
70
|
+
},
|
|
71
|
+
offline: {
|
|
72
|
+
DEFAULT: hsl("--status-offline"),
|
|
73
|
+
foreground: hsl("--status-offline-foreground")
|
|
74
|
+
},
|
|
75
|
+
degraded: {
|
|
76
|
+
DEFAULT: hsl("--status-degraded"),
|
|
77
|
+
foreground: hsl("--status-degraded-foreground")
|
|
78
|
+
},
|
|
79
|
+
info: { DEFAULT: hsl("--status-info"), foreground: hsl("--status-info-foreground") }
|
|
80
|
+
},
|
|
81
|
+
border: hsl("--border"),
|
|
82
|
+
input: hsl("--input"),
|
|
83
|
+
ring: hsl("--ring")
|
|
84
|
+
},
|
|
85
|
+
fontFamily: {
|
|
86
|
+
display: "var(--font-display)",
|
|
87
|
+
sans: "var(--font-body)",
|
|
88
|
+
mono: "var(--font-mono)"
|
|
89
|
+
},
|
|
90
|
+
/* Typescale.
|
|
91
|
+
*
|
|
92
|
+
* Three strict weights: 400 (body), 500 (UI), 600 (display/headings).
|
|
93
|
+
* Letter-spacing scales with size — aggressive negative on display.
|
|
94
|
+
* Kept in step with the `@theme` typescale in tokens-v4.css.
|
|
95
|
+
*/
|
|
96
|
+
fontSize: {
|
|
97
|
+
// Display tier — aggressive compression, content-led headlines
|
|
98
|
+
"display-2xl": ["64px", { lineHeight: "1", letterSpacing: "-0.0464em", fontWeight: "600" }],
|
|
99
|
+
"display-xl": ["48px", { lineHeight: "1.05", letterSpacing: "-0.05em", fontWeight: "600" }],
|
|
100
|
+
"display-lg": ["40px", { lineHeight: "1.1", letterSpacing: "-0.05em", fontWeight: "600" }],
|
|
101
|
+
"display-md": ["32px", { lineHeight: "1.2", letterSpacing: "-0.04em", fontWeight: "600" }],
|
|
102
|
+
headline: ["28px", { lineHeight: "1.25", letterSpacing: "-0.035em", fontWeight: "600" }],
|
|
103
|
+
// Title tier — section / card heads
|
|
104
|
+
"title-lg": ["24px", { lineHeight: "1.33", letterSpacing: "-0.04em", fontWeight: "600" }],
|
|
105
|
+
"title-md": ["20px", { lineHeight: "1.4", letterSpacing: "-0.03em", fontWeight: "600" }],
|
|
106
|
+
// Body tier — FAANG-density realignment 2026-05-22: body-md is the
|
|
107
|
+
// industry-standard 14px (shadcn / Vercel / Linear / Stripe /
|
|
108
|
+
// Mantine). The previous 15px was idiosyncratic. body-sm is 13px (its
|
|
109
|
+
// own line-height / weight signature), kept in lockstep with tokens-v4.css
|
|
110
|
+
// and this preset's own tokens-v4.css so menu items / secondary text
|
|
111
|
+
// render at the same size across both scopes.
|
|
112
|
+
"body-lg": ["18px", { lineHeight: "1.56", letterSpacing: "-0.01em", fontWeight: "400" }],
|
|
113
|
+
"body-md": ["14px", { lineHeight: "1.43", letterSpacing: "0", fontWeight: "400" }],
|
|
114
|
+
"body-sm": ["13px", { lineHeight: "1.46", fontWeight: "400" }],
|
|
115
|
+
// Label tier — used on buttons, nav, secondary actions
|
|
116
|
+
label: ["14px", { lineHeight: "1.43", fontWeight: "500" }],
|
|
117
|
+
"label-caps": ["12px", { lineHeight: "1.33", letterSpacing: "0.04em", fontWeight: "500" }],
|
|
118
|
+
// Mono — code surfaces, technical labels
|
|
119
|
+
"code-md": ["14px", { lineHeight: "1.5", fontWeight: "400" }],
|
|
120
|
+
"code-sm": ["13px", { lineHeight: "1.54", fontWeight: "500" }]
|
|
121
|
+
},
|
|
122
|
+
borderRadius: {
|
|
123
|
+
none: "var(--radius-none)",
|
|
124
|
+
sm: "var(--radius-sm)",
|
|
125
|
+
md: "var(--radius-md)",
|
|
126
|
+
lg: "var(--radius-lg)",
|
|
127
|
+
xl: "var(--radius-xl)",
|
|
128
|
+
"2xl": "var(--radius-2xl)",
|
|
129
|
+
full: "var(--radius-full)"
|
|
130
|
+
},
|
|
131
|
+
boxShadow: {
|
|
132
|
+
sm: "var(--shadow-sm)",
|
|
133
|
+
md: "var(--shadow-md)",
|
|
134
|
+
lg: "var(--shadow-lg)",
|
|
135
|
+
glow: "var(--shadow-glow)",
|
|
136
|
+
"glow-strong": "var(--shadow-glow-strong)"
|
|
137
|
+
},
|
|
138
|
+
transitionTimingFunction: {
|
|
139
|
+
"out-soft": "var(--ease-out-soft)",
|
|
140
|
+
snap: "var(--ease-snap)"
|
|
141
|
+
},
|
|
142
|
+
transitionDuration: {
|
|
143
|
+
fast: "var(--duration-fast)",
|
|
144
|
+
base: "var(--duration-base)",
|
|
145
|
+
slow: "var(--duration-slow)"
|
|
146
|
+
},
|
|
147
|
+
keyframes: {
|
|
148
|
+
"fade-in-up": {
|
|
149
|
+
"0%": { opacity: "0", transform: "translateY(8px)" },
|
|
150
|
+
"100%": { opacity: "1", transform: "translateY(0)" }
|
|
151
|
+
},
|
|
152
|
+
"pulse-glow": {
|
|
153
|
+
"0%, 100%": { boxShadow: "0 0 0 0 color-mix(in oklch, var(--primary) 50%, transparent)" },
|
|
154
|
+
"50%": { boxShadow: "0 0 0 8px transparent" }
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
animation: {
|
|
158
|
+
"fade-in-up": "fade-in-up var(--duration-base) var(--ease-out-soft) both",
|
|
159
|
+
"pulse-glow": "pulse-glow 1.5s var(--ease-in-out) infinite"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
plugins: [animate]
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export { loopscaleUIPreset };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Render `ui` and assert `axe` reports zero violations against the resulting
|
|
4
|
+
* subtree. Use inside `it("has no a11y violations", async () => { ... })`.
|
|
5
|
+
*
|
|
6
|
+
* The default ruleset is axe-core's WCAG 2.1 AA + best-practice tags.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
* it("has no a11y violations", async () => {
|
|
10
|
+
* await expectNoA11yViolations(<Button>Deploy</Button>);
|
|
11
|
+
* });
|
|
12
|
+
*/
|
|
13
|
+
export declare function expectNoA11yViolations(ui: JSX.Element): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared trace fixtures for the trace-native component family (M8 T1.1).
|
|
3
|
+
* Modeled after real agent traces from the looptrace suite: branching,
|
|
4
|
+
* a retried tool call, an errored span, an orphan (malformed parent) and a
|
|
5
|
+
* clock-skewed span. Deterministic — no Date.now(), no randomness.
|
|
6
|
+
*/
|
|
7
|
+
import type { TraceSpan } from "../../lib/trace/types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Nested agent trace: root agent → llm plan → 2 tool branches (one retried,
|
|
10
|
+
* one errored) → final llm answer. 7 spans, depth 3.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NESTED_TRACE: TraceSpan;
|
|
13
|
+
/** Trace with an orphan (parent missing from the tree) and a clock-skewed span. */
|
|
14
|
+
export declare const MALFORMED_TRACE: TraceSpan;
|
|
15
|
+
/**
|
|
16
|
+
* Deterministic wide trace generator for virtualization paths: `n` children
|
|
17
|
+
* under one root, timings derived from the index (no randomness).
|
|
18
|
+
*/
|
|
19
|
+
export declare function makeTrace(n: number): TraceSpan;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/vitest";
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/* LoopScale UI — Tailwind v4 theme aliases.
|
|
2
|
+
*
|
|
3
|
+
* Companion to `tokens.css`. The base file declares the v3-style runtime
|
|
4
|
+
* variables (`--primary`, `--background`, …) that `<ThemeProvider>` and
|
|
5
|
+
* `[data-theme]` cascades mutate at runtime. This file declares the
|
|
6
|
+
* Tailwind v4 `@theme` namespace (`--color-primary`, `--color-background`,
|
|
7
|
+
* …) by aliasing back to those runtime vars via `hsl(var(--*))`.
|
|
8
|
+
*
|
|
9
|
+
* Why two layers:
|
|
10
|
+
* - `<ThemeProvider>` (and the 10 built-in themes) sets `--primary`
|
|
11
|
+
* etc. at runtime — that's the theme switch surface.
|
|
12
|
+
* - Tailwind v4 resolves color utilities exclusively through
|
|
13
|
+
* `--color-*` tokens declared in `@theme`. Without these aliases
|
|
14
|
+
* `bg-primary`, `text-muted-foreground`, `border-border`, etc. emit
|
|
15
|
+
* a className with no matching CSS rule.
|
|
16
|
+
*
|
|
17
|
+
* The indirection (`--color-primary: var(--primary)`) preserves the
|
|
18
|
+
* runtime theme cascade — browsers resolve `var(--color-primary)` →
|
|
19
|
+
* `var(--primary)` → current `[data-theme]` value at paint time.
|
|
20
|
+
*
|
|
21
|
+
* See RFC 0008 follow-up.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/* `@theme inline` (Tailwind v4 keyword) preserves the var() reference at
|
|
25
|
+
* runtime instead of inlining the value at build time. Without `inline`,
|
|
26
|
+
* `--color-primary: var(--primary)` would resolve to whatever `--primary`
|
|
27
|
+
* was when Tailwind compiled the CSS — breaking the theme cascade.
|
|
28
|
+
* See https://tailwindcss.com/docs/theme#using-your-theme-variables-in-arbitrary-values
|
|
29
|
+
*/
|
|
30
|
+
@theme inline {
|
|
31
|
+
/* Color tokens ------------------------------------------------------ */
|
|
32
|
+
--color-background: var(--background);
|
|
33
|
+
--color-foreground: var(--foreground);
|
|
34
|
+
|
|
35
|
+
--color-card: var(--card);
|
|
36
|
+
--color-card-foreground: var(--card-foreground);
|
|
37
|
+
|
|
38
|
+
--color-popover: var(--popover);
|
|
39
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
40
|
+
|
|
41
|
+
--color-primary: var(--primary);
|
|
42
|
+
--color-primary-deep: var(--primary-deep);
|
|
43
|
+
--color-primary-glow: var(--primary-glow);
|
|
44
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
45
|
+
|
|
46
|
+
--color-secondary: var(--secondary);
|
|
47
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
48
|
+
|
|
49
|
+
--color-accent: var(--accent);
|
|
50
|
+
--color-accent-deep: var(--accent-deep);
|
|
51
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
52
|
+
|
|
53
|
+
--color-muted: var(--muted);
|
|
54
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
55
|
+
|
|
56
|
+
--color-border: var(--border);
|
|
57
|
+
--color-input: var(--input);
|
|
58
|
+
--color-ring: var(--ring);
|
|
59
|
+
|
|
60
|
+
--color-success: var(--success);
|
|
61
|
+
--color-success-foreground: var(--success-foreground);
|
|
62
|
+
--color-warning: var(--warning);
|
|
63
|
+
--color-warning-foreground: var(--warning-foreground);
|
|
64
|
+
--color-destructive: var(--destructive);
|
|
65
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
66
|
+
--color-info: var(--info);
|
|
67
|
+
--color-info-foreground: var(--info-foreground);
|
|
68
|
+
|
|
69
|
+
/* Status group (D4) ------------------------------------------------- */
|
|
70
|
+
--color-status-online: var(--status-online);
|
|
71
|
+
--color-status-online-foreground: var(--status-online-foreground);
|
|
72
|
+
--color-status-offline: var(--status-offline);
|
|
73
|
+
--color-status-offline-foreground: var(--status-offline-foreground);
|
|
74
|
+
--color-status-degraded: var(--status-degraded);
|
|
75
|
+
--color-status-degraded-foreground: var(--status-degraded-foreground);
|
|
76
|
+
--color-status-info: var(--status-info);
|
|
77
|
+
--color-status-info-foreground: var(--status-info-foreground);
|
|
78
|
+
|
|
79
|
+
/* Fonts ------------------------------------------------------------- */
|
|
80
|
+
--font-display: var(--font-display);
|
|
81
|
+
--font-sans: var(--font-body);
|
|
82
|
+
--font-mono: var(--font-mono);
|
|
83
|
+
|
|
84
|
+
/* Typescale. Tracking is tuned for Hanken Grotesk: tight on display, open on body. *
|
|
85
|
+
* Compound text utilities: each `--text-{name}` declares the size,
|
|
86
|
+
* with companion `--*--line-height`, `--*--letter-spacing`, and
|
|
87
|
+
* `--*--font-weight` properties Tailwind v4 picks up automatically.
|
|
88
|
+
*/
|
|
89
|
+
--text-display-2xl: 64px;
|
|
90
|
+
--text-display-2xl--line-height: 1;
|
|
91
|
+
--text-display-2xl--letter-spacing: -0.03em;
|
|
92
|
+
--text-display-2xl--font-weight: 600;
|
|
93
|
+
|
|
94
|
+
--text-display-xl: 48px;
|
|
95
|
+
--text-display-xl--line-height: 1.05;
|
|
96
|
+
--text-display-xl--letter-spacing: -0.03em;
|
|
97
|
+
--text-display-xl--font-weight: 600;
|
|
98
|
+
|
|
99
|
+
--text-display-lg: 40px;
|
|
100
|
+
--text-display-lg--line-height: 1.1;
|
|
101
|
+
--text-display-lg--letter-spacing: -0.025em;
|
|
102
|
+
--text-display-lg--font-weight: 600;
|
|
103
|
+
|
|
104
|
+
--text-display-md: 32px;
|
|
105
|
+
--text-display-md--line-height: 1.2;
|
|
106
|
+
--text-display-md--letter-spacing: -0.025em;
|
|
107
|
+
--text-display-md--font-weight: 600;
|
|
108
|
+
|
|
109
|
+
--text-headline: 28px;
|
|
110
|
+
--text-headline--line-height: 1.25;
|
|
111
|
+
--text-headline--letter-spacing: -0.02em;
|
|
112
|
+
--text-headline--font-weight: 600;
|
|
113
|
+
|
|
114
|
+
--text-title-lg: 24px;
|
|
115
|
+
--text-title-lg--line-height: 1.33;
|
|
116
|
+
--text-title-lg--letter-spacing: -0.02em;
|
|
117
|
+
--text-title-lg--font-weight: 600;
|
|
118
|
+
|
|
119
|
+
--text-title-md: 20px;
|
|
120
|
+
--text-title-md--line-height: 1.4;
|
|
121
|
+
--text-title-md--letter-spacing: -0.015em;
|
|
122
|
+
--text-title-md--font-weight: 600;
|
|
123
|
+
|
|
124
|
+
--text-body-lg: 18px;
|
|
125
|
+
--text-body-lg--line-height: 1.56;
|
|
126
|
+
--text-body-lg--letter-spacing: 0;
|
|
127
|
+
--text-body-lg--font-weight: 400;
|
|
128
|
+
|
|
129
|
+
--text-body-md: 14px;
|
|
130
|
+
--text-body-md--line-height: 1.43;
|
|
131
|
+
--text-body-md--letter-spacing: 0;
|
|
132
|
+
--text-body-md--font-weight: 400;
|
|
133
|
+
|
|
134
|
+
--text-body-sm: 13px;
|
|
135
|
+
--text-body-sm--line-height: 1.46;
|
|
136
|
+
--text-body-sm--font-weight: 400;
|
|
137
|
+
|
|
138
|
+
--text-label: 14px;
|
|
139
|
+
--text-label--line-height: 1.43;
|
|
140
|
+
--text-label--font-weight: 500;
|
|
141
|
+
|
|
142
|
+
--text-label-caps: 12px;
|
|
143
|
+
--text-label-caps--line-height: 1.33;
|
|
144
|
+
--text-label-caps--letter-spacing: 0.04em;
|
|
145
|
+
--text-label-caps--font-weight: 500;
|
|
146
|
+
|
|
147
|
+
--text-code-md: 14px;
|
|
148
|
+
--text-code-md--line-height: 1.5;
|
|
149
|
+
--text-code-md--font-weight: 400;
|
|
150
|
+
|
|
151
|
+
--text-code-sm: 13px;
|
|
152
|
+
--text-code-sm--line-height: 1.54;
|
|
153
|
+
--text-code-sm--font-weight: 500;
|
|
154
|
+
|
|
155
|
+
/* Radii — Tailwind v4 reads the value directly (no var indirection). */
|
|
156
|
+
--radius-none: 0px;
|
|
157
|
+
--radius-sm: 4px;
|
|
158
|
+
--radius-md: 6px;
|
|
159
|
+
--radius-lg: 10px;
|
|
160
|
+
--radius-xl: 14px;
|
|
161
|
+
--radius-2xl: 20px;
|
|
162
|
+
--radius-full: 9999px;
|
|
163
|
+
|
|
164
|
+
/* Shadows: aliases of the values computed in tokens.css. */
|
|
165
|
+
--shadow-sm: var(--shadow-sm);
|
|
166
|
+
--shadow-md: var(--shadow-md);
|
|
167
|
+
--shadow-lg: var(--shadow-lg);
|
|
168
|
+
--shadow-glow: var(--shadow-glow);
|
|
169
|
+
--shadow-glow-strong: var(--shadow-glow-strong);
|
|
170
|
+
|
|
171
|
+
/* Motion ------------------------------------------------------------ */
|
|
172
|
+
--ease-out-soft: var(--ease-out-soft);
|
|
173
|
+
--ease-snap: var(--ease-snap);
|
|
174
|
+
|
|
175
|
+
/* Container queries (T5.5) — Tailwind v4 native @container support.
|
|
176
|
+
* Sizes drive `@<size>:<utility>` variants for container-relative responsive
|
|
177
|
+
* design (components that adapt to their parent's width, not the viewport).
|
|
178
|
+
* Default sizes mirror Tailwind v4 defaults; declared explicitly so the
|
|
179
|
+
* preset ships consistent values.
|
|
180
|
+
*/
|
|
181
|
+
--container-3xs: 16rem;
|
|
182
|
+
--container-2xs: 18rem;
|
|
183
|
+
--container-xs: 20rem;
|
|
184
|
+
--container-sm: 24rem;
|
|
185
|
+
--container-md: 28rem;
|
|
186
|
+
--container-lg: 32rem;
|
|
187
|
+
--container-xl: 36rem;
|
|
188
|
+
--container-2xl: 42rem;
|
|
189
|
+
--container-3xl: 48rem;
|
|
190
|
+
--container-4xl: 56rem;
|
|
191
|
+
--container-5xl: 64rem;
|
|
192
|
+
--container-6xl: 72rem;
|
|
193
|
+
--container-7xl: 80rem;
|
|
194
|
+
|
|
195
|
+
/* Animations — declare so `animate-fade-in-up` and `animate-pulse-glow`
|
|
196
|
+
* resolve. Keyframes are declared below (outside @theme — Tailwind v4
|
|
197
|
+
* picks them up via the @keyframes namespace).
|
|
198
|
+
*/
|
|
199
|
+
--animate-fade-in-up: fade-in-up var(--duration-base) var(--ease-out-soft) both;
|
|
200
|
+
--animate-pulse-glow: pulse-glow 1.5s var(--ease-in-out) infinite;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@keyframes fade-in-up {
|
|
204
|
+
0% {
|
|
205
|
+
opacity: 0;
|
|
206
|
+
transform: translateY(8px);
|
|
207
|
+
}
|
|
208
|
+
100% {
|
|
209
|
+
opacity: 1;
|
|
210
|
+
transform: translateY(0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
@keyframes pulse-glow {
|
|
215
|
+
0%,
|
|
216
|
+
100% {
|
|
217
|
+
box-shadow: 0 0 0 0 color-mix(in oklch, var(--primary) 50%, transparent);
|
|
218
|
+
}
|
|
219
|
+
50% {
|
|
220
|
+
box-shadow: 0 0 0 8px transparent;
|
|
221
|
+
}
|
|
222
|
+
}
|