@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
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 getloopscale.com
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,92 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @getloopscale/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The LoopScale design system: the brand tokens and the generic React components and primitives
|
|
4
|
+
that form the non-AI foundation of the LoopScale UI stack. Apache-2.0, ESM-only.
|
|
5
|
+
|
|
6
|
+
This is the layer with **no agent in it**: the shell, the tables, the forms, the feedback states,
|
|
7
|
+
the dashboard pieces. [`@theokit/ui`](https://github.com/usetheokit/theokit-ui) builds on top of it
|
|
8
|
+
with the agent surfaces (chat threads, tool calls, approval cards) and shares the same tokens, so
|
|
9
|
+
the two compose without a visual seam.
|
|
10
|
+
|
|
11
|
+
**Rule of thumb:** if the component would exist in an app with no agent in it, it belongs here.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @getloopscale/ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or copy a single component, shadcn-style, from the published registry:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx shadcn@latest add https://getloopscale.github.io/ui/r/data-table.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Catalog
|
|
26
|
+
|
|
27
|
+
<!-- BEGIN:catalog -->
|
|
28
|
+
|
|
29
|
+
**87 components** — 45 primitives + 42 composites.
|
|
30
|
+
|
|
31
|
+
### Primitives (45)
|
|
32
|
+
|
|
33
|
+
`ActionBar` · `Alert` · `Avatar` · `Badge` · `Breadcrumb` · `Button` · `Card` · `Checkbox` · `Combobox` · `CopyButton` · `DangerZone` · `DescriptionList` · `Dialog` · `DropdownMenu` · `EmptyState` · `FileDropzone` · `FormField` · `Input` · `JsonViewer` · `Label` · `LoginSplit` · `MetricsPanel` · `Pagination` · `PinInput` · `PlanBadge` · `Progress` · `RadioGroup` · `ScrollArea` · `Select` · `Sheet` · `Sidebar` · `Skeleton` · `Slider` · `SocialAuthRow` · `StatTile` · `StatusDot` · `Switch` · `Table` · `Tabs` · `Textarea` · `Timestamp` · `Toast` · `Tooltip` · `Topnav` · `UpdateBanner`
|
|
34
|
+
|
|
35
|
+
### Composites (42)
|
|
36
|
+
|
|
37
|
+
`AccountMenu` · `AnnotationInput` · `AnnotationSummaryGroup` · `AttributesTable` · `ChatMessageCard` · `CodeBlock` · `CommandPalette` · `CommentThread` · `ConfirmDialog` · `DataTable` · `DatasetItemDiff` · `DeploymentRow` · `DiffView` · `DomainConfig` · `EnvVarEditor` · `EvaluatorForm` · `Histogram` · `IoCards` · `MessageBranchSelector` · `MetricCard` · `PageShell` · `PercentileChart` · `PreviewEnvCard` · `PriceBreakdown` · `ProjectCard` · `PromptTemplateEditor` · `PromptVersionDiff` · `RollbackUi` · `SessionSummary` · `SessionTimeline` · `SeverityBadge` · `SpanGraph` · `SpanTree` · `SpanWaterfall` · `StatusIndicator` · `Stepper` · `TagInput` · `TaskHeader` · `TokenCostBreakdown` · `TraceCompare` · `TraceTranscript` · `TrendChart`
|
|
38
|
+
|
|
39
|
+
<!-- END:catalog -->
|
|
40
|
+
|
|
41
|
+
Generated from `src/components/` by `pnpm sync:readme` — do not edit the block above by hand.
|
|
42
|
+
|
|
43
|
+
## Theming
|
|
44
|
+
|
|
45
|
+
The default theme is the LoopScale brand. There is nothing to configure: import the stylesheet and
|
|
46
|
+
the components render in it.
|
|
47
|
+
|
|
48
|
+
```css
|
|
49
|
+
@import "@getloopscale/ui/styles.css";
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| | Light | Dark |
|
|
53
|
+
| --- | --- | --- |
|
|
54
|
+
| Background | paper `#F4F3EF` | ink `#111415` |
|
|
55
|
+
| Raised surface | `#FBFAF7` | `#181C1D` |
|
|
56
|
+
| Border | `#DCDAD3` | `#2A3032` |
|
|
57
|
+
| Text | ink `#16191A` | bone `#E7E6E0` |
|
|
58
|
+
| Secondary text | `#5A615F` | `#9BA29F` |
|
|
59
|
+
| Brand color as text, link and focus (`primary`) | `#556B00` | lime `#C4E34F` |
|
|
60
|
+
| Brand color as a fill (`accent`, ink text on top) | lime `#C4E34F` | lime `#C4E34F` |
|
|
61
|
+
|
|
62
|
+
Light is the default. Put `class="dark"` on `<html>`, or on any ancestor, for the dark theme.
|
|
63
|
+
|
|
64
|
+
Three rules come with the palette:
|
|
65
|
+
|
|
66
|
+
- The default button is neutral. Lime is for the logo, links, focus and one highlighted action per
|
|
67
|
+
screen, which is `<Button variant="accent">`.
|
|
68
|
+
- Lime has no contrast on paper, so `accent` is a fill only. Text in the brand color uses `primary`.
|
|
69
|
+
- Lime sits between the warning yellow and the success green. A status always carries a text label
|
|
70
|
+
next to its color.
|
|
71
|
+
|
|
72
|
+
Text is Hanken Grotesk and code is JetBrains Mono. Both ship self-hosted in the package under the
|
|
73
|
+
SIL Open Font License; `@getloopscale/ui/fonts-cdn.css` loads them from Google Fonts instead.
|
|
74
|
+
|
|
75
|
+
`tests/brand-tokens.test.ts` pins these values and checks that every text pair reaches 4.5:1.
|
|
76
|
+
|
|
77
|
+
`@theokit/ui` uses the same token names, so the theme applies to both packages.
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pnpm install
|
|
83
|
+
pnpm dev # Ladle catalog
|
|
84
|
+
pnpm test
|
|
85
|
+
pnpm typecheck
|
|
86
|
+
pnpm lint
|
|
87
|
+
pnpm build
|
|
88
|
+
pnpm sync:readme # regenerate the catalog block above
|
|
89
|
+
pnpm registry:build # rebuild registry/r/*.json for the shadcn path
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
> Seeded from `loopscale-ui` @ `2b46eca` (2026-07-03, AI-exclusive pivot milestone M-B).
|
package/dist/base.css
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* LoopScale UI — base layer.
|
|
2
|
+
*
|
|
3
|
+
* Element defaults that depend on the tokens: border color, body colors and font, headings,
|
|
4
|
+
* code surfaces, focus ring, selection and the native scrollbar. `styles.css` imports this file;
|
|
5
|
+
* import it directly only when you assemble the entry from its pieces.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
* {
|
|
10
|
+
border-color: var(--border);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Tailwind v4 preflight regression compensation —
|
|
14
|
+
* v4 intentionally dropped the `button { cursor: pointer }` rule
|
|
15
|
+
* (https://tailwindcss.com/docs/upgrade-guide#default-button-cursor)
|
|
16
|
+
* so every native <button> renders with the default arrow cursor.
|
|
17
|
+
*
|
|
18
|
+
* Library authors are expected to opt in explicitly per button. The
|
|
19
|
+
* `<Button>` primitive does so (see its CVA). For the
|
|
20
|
+
* dozens of native <button> elements composites render directly,
|
|
21
|
+
* we restore the v3 behavior here — scoped to *interactive* buttons:
|
|
22
|
+
*
|
|
23
|
+
* - `:not(:disabled)` skips the HTML `disabled` attribute path
|
|
24
|
+
* (browser already shows `cursor: default` for disabled, but the
|
|
25
|
+
* rule below stays explicit for clarity).
|
|
26
|
+
* - `:not([aria-disabled="true"])` skips the ARIA-disabled path
|
|
27
|
+
* (where the button stays focusable but acts as no-op).
|
|
28
|
+
*
|
|
29
|
+
* This is an EXPLICIT opt-in by the library author for consumers who
|
|
30
|
+
* imported `@getloopscale/ui/styles.css` — it does NOT alter Tailwind's
|
|
31
|
+
* global preflight, only this stylesheet's @layer base.
|
|
32
|
+
*/
|
|
33
|
+
button:not(:disabled):not([aria-disabled="true"]),
|
|
34
|
+
[role="button"]:not([aria-disabled="true"]) {
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
html {
|
|
39
|
+
font-family: var(--font-body);
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
-moz-osx-font-smoothing: grayscale;
|
|
42
|
+
text-rendering: optimizeLegibility;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
body {
|
|
46
|
+
background-color: var(--background);
|
|
47
|
+
color: var(--foreground);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Display headings inherit theme display font (Hanken Grotesk by default).
|
|
51
|
+
* Per-size tracking is set in tokens-v4.css; this is the safety net. */
|
|
52
|
+
h1,
|
|
53
|
+
h2,
|
|
54
|
+
h3,
|
|
55
|
+
h4 {
|
|
56
|
+
font-family: var(--font-display);
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Code surfaces: use the mono token + tabular numerals so columns of
|
|
61
|
+
* numbers line up in tables/logs/metrics. */
|
|
62
|
+
code,
|
|
63
|
+
pre,
|
|
64
|
+
kbd,
|
|
65
|
+
samp {
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
font-feature-settings: "tnum" 1, "liga" 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Focus ring: the brand color. */
|
|
71
|
+
:focus-visible {
|
|
72
|
+
outline: 2px solid var(--ring);
|
|
73
|
+
outline-offset: 2px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Selection: a soft wash of the brand color. */
|
|
77
|
+
::selection {
|
|
78
|
+
background-color: color-mix(in oklch, var(--primary) 25%, transparent);
|
|
79
|
+
color: var(--foreground);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Native scrollbar fallback .
|
|
83
|
+
* Used for native browser scroll on elements that don't wrap in <ScrollArea>.
|
|
84
|
+
* Components that DO use <ScrollArea> hide the native scrollbar via Radix.
|
|
85
|
+
*/
|
|
86
|
+
*::-webkit-scrollbar {
|
|
87
|
+
width: 10px;
|
|
88
|
+
height: 10px;
|
|
89
|
+
}
|
|
90
|
+
*::-webkit-scrollbar-track {
|
|
91
|
+
background: transparent;
|
|
92
|
+
}
|
|
93
|
+
*::-webkit-scrollbar-thumb {
|
|
94
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 25%, transparent);
|
|
95
|
+
border: 2px solid transparent;
|
|
96
|
+
background-clip: content-box;
|
|
97
|
+
border-radius: 9999px;
|
|
98
|
+
transition: background-color var(--duration-fast) var(--ease-out-soft);
|
|
99
|
+
}
|
|
100
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
101
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 50%, transparent);
|
|
102
|
+
}
|
|
103
|
+
*::-webkit-scrollbar-thumb:active {
|
|
104
|
+
background-color: color-mix(in oklch, var(--muted-foreground) 75%, transparent);
|
|
105
|
+
}
|
|
106
|
+
* {
|
|
107
|
+
scrollbar-width: thin;
|
|
108
|
+
scrollbar-color: color-mix(in oklch, var(--muted-foreground) 30%, transparent) transparent;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { type PlanTier } from "../../primitives/plan-badge/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* AccountMenu — sidebar header for PaaS surfaces.
|
|
5
|
+
*
|
|
6
|
+
* Renders avatar + name + (optional) plan badge + (optional) secondary line.
|
|
7
|
+
* Dual mode: with `onClick`, renders as a `<button>` with a `ChevronsUpDown`
|
|
8
|
+
* trailing icon (account picker affordance); without, renders as a static
|
|
9
|
+
* `<div>` (read-only display, not focusable).
|
|
10
|
+
*
|
|
11
|
+
* Composition:
|
|
12
|
+
*
|
|
13
|
+
* <Sidebar.Header className="p-0">
|
|
14
|
+
* <AccountMenu
|
|
15
|
+
* name="paulohenriquevn"
|
|
16
|
+
* avatar="https://avatars.githubusercontent.com/u/12345"
|
|
17
|
+
* plan="hobby"
|
|
18
|
+
* onClick={openAccountSwitcher}
|
|
19
|
+
* />
|
|
20
|
+
* </Sidebar.Header>
|
|
21
|
+
*
|
|
22
|
+
* Avatar handling:
|
|
23
|
+
* - URL (`http(s)://` or `/`) → `<Avatar.Image>` with `<Avatar.Fallback>` initials
|
|
24
|
+
* - Short string (≤2 chars) → treated as initials directly
|
|
25
|
+
* - Undefined → initials derived from the first character of `name`
|
|
26
|
+
*
|
|
27
|
+
* PaaS-shape sibling of `<ProjectSwitcher>` (workspace + branch + agent-status).
|
|
28
|
+
* Same dual-mode (interactive vs static) pattern; different semantics.
|
|
29
|
+
*/
|
|
30
|
+
export interface AccountMenuProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" | "children" | "name"> {
|
|
31
|
+
/** Display name (username, email, org name). */
|
|
32
|
+
name: ReactNode;
|
|
33
|
+
/** Avatar URL or 1-2-char initials. If undefined, derives initials from `name`. */
|
|
34
|
+
avatar?: string;
|
|
35
|
+
/** Plan tier — renders inline `<PlanBadge size="sm">`. Omit for none. */
|
|
36
|
+
plan?: PlanTier;
|
|
37
|
+
/** Optional secondary line below name (e.g. email). */
|
|
38
|
+
secondary?: ReactNode;
|
|
39
|
+
/** Make the row interactive (button) with a trailing chevron. */
|
|
40
|
+
onClick?: () => void;
|
|
41
|
+
}
|
|
42
|
+
declare const AccountMenu: import("react").ForwardRefExoticComponent<AccountMenuProps & import("react").RefAttributes<HTMLElement>>;
|
|
43
|
+
export { AccountMenu };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AccountMenu, type AccountMenuProps } from "./account-menu.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AnnotationCategoricalConfig, AnnotationContinuousConfig, AnnotationFreeformConfig } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* AnnotationInput — a controlled, config-driven human annotation input (M12).
|
|
4
|
+
* Dispatches on `config.type` (Phoenix's three-type model): categorical →
|
|
5
|
+
* RadioGroup over named options; continuous → number input bounded by the
|
|
6
|
+
* config; freeform → textarea. Fully controlled (`value` + `onValueChange`);
|
|
7
|
+
* the consumer owns the config (fixture or backend store) and the submission.
|
|
8
|
+
* Composes the DS form primitives — zero new dependency (M12 ADR D2).
|
|
9
|
+
*
|
|
10
|
+
* <AnnotationInput name="Quality" config={qualityConfig}
|
|
11
|
+
* value={v} onValueChange={setV} />
|
|
12
|
+
*/
|
|
13
|
+
interface AnnotationInputCommon {
|
|
14
|
+
/** The score name — rendered as the field label / radiogroup accessible name. */
|
|
15
|
+
name: string;
|
|
16
|
+
/** Overrides the generated control id (for external label association). */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Optional helper text, wired via aria-describedby. */
|
|
19
|
+
description?: string;
|
|
20
|
+
required?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export type AnnotationInputProps = (AnnotationInputCommon & {
|
|
25
|
+
config: AnnotationCategoricalConfig;
|
|
26
|
+
value: string | null;
|
|
27
|
+
onValueChange: (value: string | null) => void;
|
|
28
|
+
}) | (AnnotationInputCommon & {
|
|
29
|
+
config: AnnotationContinuousConfig;
|
|
30
|
+
value: number | null;
|
|
31
|
+
onValueChange: (value: number | null) => void;
|
|
32
|
+
}) | (AnnotationInputCommon & {
|
|
33
|
+
config: AnnotationFreeformConfig;
|
|
34
|
+
value: string | null;
|
|
35
|
+
onValueChange: (value: string | null) => void;
|
|
36
|
+
});
|
|
37
|
+
declare function AnnotationInput(props: AnnotationInputProps): import("react").JSX.Element;
|
|
38
|
+
export { AnnotationInput };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AnnotationInput } from "./annotation-input.js";
|
|
2
|
+
export type { AnnotationInputProps } from "./annotation-input.js";
|
|
3
|
+
export type { CategoricalOption, AnnotationCategoricalConfig, AnnotationContinuousConfig, AnnotationFreeformConfig, AnnotationConfig, } from "./types.js";
|
|
4
|
+
export { isCategoricalConfig, isContinuousConfig, isFreeformConfig } from "./types.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Annotation config types — the named-score-type contract for AnnotationInput
|
|
3
|
+
* (M12). Follows Phoenix's three-type model (categorical / continuous /
|
|
4
|
+
* freeform); Langfuse's BOOLEAN is categorical-of-two and CORRECTION is
|
|
5
|
+
* system-only, so neither adds to a controlled human input. The config is a
|
|
6
|
+
* plain descriptor the consumer owns (fixture or backend store) — the DS
|
|
7
|
+
* component is config-driven and stateless.
|
|
8
|
+
*/
|
|
9
|
+
/** One named categorical choice; `score` optionally maps the label to a numeric value on submit. */
|
|
10
|
+
export interface CategoricalOption {
|
|
11
|
+
label: string;
|
|
12
|
+
score?: number | null;
|
|
13
|
+
}
|
|
14
|
+
export interface AnnotationCategoricalConfig {
|
|
15
|
+
type: "categorical";
|
|
16
|
+
options: CategoricalOption[];
|
|
17
|
+
}
|
|
18
|
+
export interface AnnotationContinuousConfig {
|
|
19
|
+
type: "continuous";
|
|
20
|
+
min: number;
|
|
21
|
+
max: number;
|
|
22
|
+
step?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface AnnotationFreeformConfig {
|
|
25
|
+
type: "freeform";
|
|
26
|
+
maxLength?: number;
|
|
27
|
+
}
|
|
28
|
+
export type AnnotationConfig = AnnotationCategoricalConfig | AnnotationContinuousConfig | AnnotationFreeformConfig;
|
|
29
|
+
export declare function isCategoricalConfig(c: AnnotationConfig): c is AnnotationCategoricalConfig;
|
|
30
|
+
export declare function isContinuousConfig(c: AnnotationConfig): c is AnnotationContinuousConfig;
|
|
31
|
+
export declare function isFreeformConfig(c: AnnotationConfig): c is AnnotationFreeformConfig;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AnnotationConfig } from "../annotation-input/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* AnnotationSummaryGroup — a collapsible group showing AGGREGATE stats over a
|
|
4
|
+
* list of annotation values for one `AnnotationConfig` (M18). Reuses the M12
|
|
5
|
+
* `AnnotationConfig` contract (DRY, ADR D2) and dispatches on `config.type`:
|
|
6
|
+
* - continuous → mean of the finite numeric values + count.
|
|
7
|
+
* - categorical → count per option label + total count.
|
|
8
|
+
* - freeform → count of non-empty values.
|
|
9
|
+
*
|
|
10
|
+
* Controlled and pure — the consumer owns `values` (fixture or backend store);
|
|
11
|
+
* this component only summarizes. Uses a native `<details>`/`<summary>` for
|
|
12
|
+
* zero-JS collapsibility; composes `Card`/`Badge`. Zero new dependency.
|
|
13
|
+
*
|
|
14
|
+
* <AnnotationSummaryGroup config={cfg} values={vals} label="Quality" />
|
|
15
|
+
*/
|
|
16
|
+
export interface AnnotationSummaryGroupProps {
|
|
17
|
+
/** The annotation config the values were collected against (reused from M12). */
|
|
18
|
+
config: AnnotationConfig;
|
|
19
|
+
/** The collected annotation values to aggregate. */
|
|
20
|
+
values: (string | number)[];
|
|
21
|
+
/** Group heading; falls back to the config type when omitted. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Whether the group starts expanded. */
|
|
24
|
+
defaultOpen?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
declare const AnnotationSummaryGroup: import("react").ForwardRefExoticComponent<AnnotationSummaryGroupProps & import("react").RefAttributes<HTMLDetailsElement>>;
|
|
28
|
+
export { AnnotationSummaryGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AnnotationSummaryGroup, type AnnotationSummaryGroupProps, } from "./annotation-summary-group.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface AttributesTableProps {
|
|
2
|
+
attrs?: Record<string, unknown>;
|
|
3
|
+
/** Predicate marking a key's value as sensitive (masked fail-closed). Default: nothing masked. */
|
|
4
|
+
maskedKeys?: (key: string) => boolean;
|
|
5
|
+
/** Whether the viewer is authorized to reveal masked values. Default false (fail-closed). */
|
|
6
|
+
canReveal?: boolean;
|
|
7
|
+
/** Keys promoted to a badge header above the namespace cards. */
|
|
8
|
+
promoted?: string[];
|
|
9
|
+
/** Namespace cards start expanded. Default true. */
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* AttributesTable — namespace-grouped OTel span attributes with fail-closed
|
|
14
|
+
* PII masking. A `maskedKeys`-flagged value renders as `•••`; its raw string
|
|
15
|
+
* NEVER enters the DOM (no text node, no title/aria/data) until Reveal is
|
|
16
|
+
* clicked AND `canReveal` is true, and its CopyButton is withheld until then.
|
|
17
|
+
* When `!canReveal` the reveal control is a quiet "masked" hint, not an inert
|
|
18
|
+
* button. Object values fall back to the dependency-free `JsonViewer`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function AttributesTable({ attrs, maskedKeys, canReveal, promoted, defaultOpen, }: AttributesTableProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AttributesTable, type AttributesTableProps } from "./attributes-table.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
import type { ToolCall } from "../../../lib/trace/types.js";
|
|
3
|
+
export interface ChatMessageCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** ChatML role — user / assistant / tool / system (or any string). */
|
|
5
|
+
role: string;
|
|
6
|
+
/** Text body of the message. */
|
|
7
|
+
content?: string;
|
|
8
|
+
/** Structured tool calls attached to the message (assistant turns). */
|
|
9
|
+
toolCalls?: ToolCall[];
|
|
10
|
+
/** Structured tool results (tool turns). Serialized to JSON for display. */
|
|
11
|
+
toolResults?: unknown[];
|
|
12
|
+
}
|
|
13
|
+
declare const ChatMessageCard: import("react").ForwardRefExoticComponent<ChatMessageCardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { ChatMessageCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ChatMessageCard, type ChatMessageCardProps } from "./chat-message-card.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* CodeBlock — terminal command / code snippet surface.
|
|
4
|
+
*
|
|
5
|
+
* Pre-rendered code block with optional terminal "$ " prefix per line,
|
|
6
|
+
* optional caption (file name), and optional CopyButton positioned top-right.
|
|
7
|
+
* The CopyButton receives the RAW `code` (without the visual "$ " prefix),
|
|
8
|
+
* so consumers paste only the executable command.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <CodeBlock code="loopzero deploy" terminal copyable />
|
|
12
|
+
* <CodeBlock code={dotenv} caption=".env.local" copyable />
|
|
13
|
+
*
|
|
14
|
+
* `language` is reserved for future syntax highlighting (v1: ignored).
|
|
15
|
+
*/
|
|
16
|
+
export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
17
|
+
/** Code content. Can be multiline. */
|
|
18
|
+
code: string;
|
|
19
|
+
/** Language hint (forward-compat; v1 ignored). */
|
|
20
|
+
language?: string;
|
|
21
|
+
/** When true, prefix each line with "$ " for shell commands. */
|
|
22
|
+
terminal?: boolean;
|
|
23
|
+
/** Show inline CopyButton in top-right. */
|
|
24
|
+
copyable?: boolean;
|
|
25
|
+
/** Optional caption above block (e.g. ".env.local"). */
|
|
26
|
+
caption?: ReactNode;
|
|
27
|
+
}
|
|
28
|
+
declare const CodeBlock: import("react").ForwardRefExoticComponent<CodeBlockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export { CodeBlock };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeBlock, type CodeBlockProps } from "./code-block.js";
|