@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,28 @@
|
|
|
1
|
+
import type { TraceSpan } from "../../../lib/trace/types.js";
|
|
2
|
+
type Bounds = {
|
|
3
|
+
startNs: bigint;
|
|
4
|
+
endNs: bigint;
|
|
5
|
+
};
|
|
6
|
+
export interface SpanWaterfallProps {
|
|
7
|
+
root: TraceSpan;
|
|
8
|
+
/** Trace window; defaults to the honest min-start/max-end envelope of the whole tree. */
|
|
9
|
+
bounds?: Bounds;
|
|
10
|
+
selectedId: string | null;
|
|
11
|
+
onSelect: (id: string) => void;
|
|
12
|
+
collapsed: Set<string>;
|
|
13
|
+
/** ns → label for the hover-needle. Default ISO datetime. */
|
|
14
|
+
formatTimestamp?: (ns: bigint) => string;
|
|
15
|
+
/** USD cost formatter for the ∑ rollup badge. Default `$0.0000`. */
|
|
16
|
+
formatCostUsd?: (usd: number) => string;
|
|
17
|
+
className?: string;
|
|
18
|
+
"aria-label"?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* SpanWaterfall — a nice-interval time axis over row-packed span bars, a
|
|
22
|
+
* hover-needle reading the absolute wall-clock time under the pointer, and a
|
|
23
|
+
* `∑` rollup-cost badge on parent rows. Bars are percentage-positioned via
|
|
24
|
+
* `computeBarLayout` (clock-skew / in-flight → dashed unbounded). Controlled:
|
|
25
|
+
* selection lives in the consumer. Escaped text only — no HTML injection.
|
|
26
|
+
*/
|
|
27
|
+
export declare function SpanWaterfall({ root, bounds, selectedId, onSelect, collapsed, formatTimestamp, formatCostUsd, className, "aria-label": ariaLabel, }: SpanWaterfallProps): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* StatusIndicator — semantic operational-state indicator (composite).
|
|
4
|
+
*
|
|
5
|
+
* Consumes the `--status-online` / `--status-offline` / `--status-degraded`
|
|
6
|
+
* / `--status-info` token group (ADR-0007). Statuses describe component
|
|
7
|
+
* liveness (alive/dead/slow/info-flag), distinct from action-result
|
|
8
|
+
* semantics (success/destructive/warning/info — see `StatusDot` primitive).
|
|
9
|
+
*
|
|
10
|
+
* Hierarchy invariant (T4.1): this composite consumes primitives via
|
|
11
|
+
* Tailwind tokens (`bg-status-*`), never imports another composite. The
|
|
12
|
+
* `StatusDot` primitive remains as a separate, more generic API.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <StatusIndicator status="online" />
|
|
16
|
+
* <StatusIndicator status="degraded" label="Slow" />
|
|
17
|
+
* <StatusIndicator status="offline" label="Disconnected" size="md" />
|
|
18
|
+
*/
|
|
19
|
+
export type StatusIndicatorKind = "online" | "offline" | "degraded" | "info";
|
|
20
|
+
export type StatusIndicatorSize = "sm" | "md";
|
|
21
|
+
export interface StatusIndicatorProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
22
|
+
/** Operational state to convey. Maps to `--status-{kind}`. */
|
|
23
|
+
status: StatusIndicatorKind;
|
|
24
|
+
/** Optional inline label to the right of the dot. */
|
|
25
|
+
label?: string;
|
|
26
|
+
/** Size of the dot. Default `sm` (8px). */
|
|
27
|
+
size?: StatusIndicatorSize;
|
|
28
|
+
/** When true, pulses the dot to draw attention (e.g., live state). */
|
|
29
|
+
pulse?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare const StatusIndicator: import("react").ForwardRefExoticComponent<StatusIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stepper, deriveSteps, type StepStatus, type StepperProps, type StepperStepData, } from "./stepper.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Stepper — multi-step pipeline progress, promoted from the loopzero-cloud
|
|
4
|
+
* dashboard build-timeline (production). Read-only by design: steps are NOT
|
|
5
|
+
* clickable (pipeline visualization, not a wizard). 100% controlled — live
|
|
6
|
+
* updates (SSE/polling) belong to the consumer.
|
|
7
|
+
*
|
|
8
|
+
* Contract: step `id`s MUST be unique (React keys); at most ONE step should
|
|
9
|
+
* be `active` (`aria-current="step"` is emitted per active step as-is).
|
|
10
|
+
* A `label` is required — it names the pipeline for screen readers.
|
|
11
|
+
*
|
|
12
|
+
* <Stepper label="Build pipeline" steps={[
|
|
13
|
+
* { id: "queued", label: "Queued", status: "done" },
|
|
14
|
+
* { id: "build", label: "Building", status: "active" },
|
|
15
|
+
* ]} />
|
|
16
|
+
*
|
|
17
|
+
* For the simple "wizard position" case, derive the array from an index:
|
|
18
|
+
* <Stepper label="Onboarding" steps={deriveSteps(defs, activeIndex)} />
|
|
19
|
+
*/
|
|
20
|
+
export type StepStatus = "pending" | "active" | "done" | "failed";
|
|
21
|
+
export interface StepperStepData {
|
|
22
|
+
/** Unique key for the step (consumer contract: no duplicates). */
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
/** For failed steps, pass the failure cause here — it is read by screen readers inside the same item (F-dom-3). */
|
|
26
|
+
description?: string;
|
|
27
|
+
status: StepStatus;
|
|
28
|
+
/** Optional slot — prefer `<Timestamp value={...} />` from this library. */
|
|
29
|
+
timestamp?: ReactNode;
|
|
30
|
+
/** Optional slot rendered ONLY when status === "failed" (the action belongs to the consumer). */
|
|
31
|
+
retry?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export interface StepperProps extends HTMLAttributes<HTMLOListElement> {
|
|
34
|
+
/** Accessible name for the pipeline (aria-label of the list). */
|
|
35
|
+
label: string;
|
|
36
|
+
steps: StepperStepData[];
|
|
37
|
+
/** @default "vertical" — both production cases (build/ingest) are vertical. */
|
|
38
|
+
orientation?: "vertical" | "horizontal";
|
|
39
|
+
/**
|
|
40
|
+
* The state a screen reader hears after a step's label, for an app that is not in English. A state left
|
|
41
|
+
* out keeps its English text ("completed", "failed", "not started"). The active step has none: it is
|
|
42
|
+
* announced by `aria-current="step"`.
|
|
43
|
+
*/
|
|
44
|
+
stateLabels?: Partial<Record<Exclude<StepStatus, "active">, string>>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Pure helper for the simple index-driven case: steps before `activeIndex`
|
|
48
|
+
* are done, the step at it is active, later ones are pending. Out-of-range
|
|
49
|
+
* indexes are safe: past the end → all done; negative → all pending.
|
|
50
|
+
*/
|
|
51
|
+
export declare function deriveSteps(defs: Array<Pick<StepperStepData, "id" | "label" | "description">>, activeIndex: number): StepperStepData[];
|
|
52
|
+
declare const Stepper: import("react").ForwardRefExoticComponent<StepperProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
53
|
+
export { Stepper };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TagInput — controlled multi-value tag editor (M17).
|
|
3
|
+
*
|
|
4
|
+
* Renders one removable chip per tag (`Badge` + a per-tag "×" button) plus a
|
|
5
|
+
* text input to add a new tag on Enter. Fully controlled: the consumer owns
|
|
6
|
+
* `value: string[]` and handles `onChange`. Adding calls
|
|
7
|
+
* `onChange([...value, tag])`; removing calls `onChange` without that tag.
|
|
8
|
+
* Dedup is built-in — adding an existing (trimmed) tag is a no-op, and so is
|
|
9
|
+
* an empty/whitespace tag. `disabled` blocks both add and remove.
|
|
10
|
+
*
|
|
11
|
+
* Design (ADR D2 + parsimony ladder rung 5): composes `Input` + `Badge` with
|
|
12
|
+
* Enter-to-add rather than the single-select `Combobox`. `Combobox` is a
|
|
13
|
+
* typeahead that selects ONE value from a fixed list and closes its own
|
|
14
|
+
* listbox on select — it has no "create arbitrary tag" affordance, so a plain
|
|
15
|
+
* input is both simpler and a better fit for free-text multi-value tags.
|
|
16
|
+
* `suggestions` power a native `<datalist>` (zero-dep autocomplete).
|
|
17
|
+
*
|
|
18
|
+
* <TagInput value={tags} onChange={setTags} suggestions={["bug", "feat"]} />
|
|
19
|
+
*/
|
|
20
|
+
export interface TagInputProps {
|
|
21
|
+
/** Current tags (controlled). */
|
|
22
|
+
value: string[];
|
|
23
|
+
/** Called with the next tag list on add/remove. */
|
|
24
|
+
onChange: (value: string[]) => void;
|
|
25
|
+
/** Optional autocomplete suggestions surfaced via a native datalist. */
|
|
26
|
+
suggestions?: string[];
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const TagInput: import("react").ForwardRefExoticComponent<TagInputProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export { TagInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TaskHeader } from "./task-header.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { TaskStatus } from "../../../types/task.js";
|
|
3
|
+
interface TaskHeaderProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
status?: TaskStatus;
|
|
6
|
+
/**
|
|
7
|
+
* If provided, a chevron is shown next to the title and clicking it fires this callback.
|
|
8
|
+
* Used as the "expand task metadata" affordance in the Infra shell.
|
|
9
|
+
*/
|
|
10
|
+
onToggle?: () => void;
|
|
11
|
+
/** Right-side actions (e.g. cancel task, close panel). */
|
|
12
|
+
actions?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* TaskHeader — title bar for a task pane.
|
|
16
|
+
*
|
|
17
|
+
* Visual: display-md title with chevron + optional status badge with pulse + actions slot.
|
|
18
|
+
*/
|
|
19
|
+
declare const TaskHeader: import("react").ForwardRefExoticComponent<TaskHeaderProps & import("react").RefAttributes<HTMLElement>>;
|
|
20
|
+
export { TaskHeader };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* TokenCostBreakdown — a `<dl>` breakdown of a request's/span's/trace's token
|
|
4
|
+
* usage and USD cost: input, output, cache tokens, total, and cost. Controlled
|
|
5
|
+
* and pure — the consumer supplies the numbers; nothing is fetched.
|
|
6
|
+
*
|
|
7
|
+
* Honest zeros (M9 SessionSummary convention): a real `0` renders `0` /
|
|
8
|
+
* `$0.0000`; an ABSENT (undefined) field renders `—` (em-dash) — it is never
|
|
9
|
+
* fabricated as a zero. When EVERY field is absent, an honest empty state
|
|
10
|
+
* renders instead of a table of em-dashes.
|
|
11
|
+
*
|
|
12
|
+
* <TokenCostBreakdown inputTokens={1200} outputTokens={340}
|
|
13
|
+
* cacheTokens={80} totalTokens={1620} costUsd={0.0234} />
|
|
14
|
+
*/
|
|
15
|
+
export interface TokenCostBreakdownProps extends HTMLAttributes<HTMLDListElement> {
|
|
16
|
+
inputTokens?: number;
|
|
17
|
+
outputTokens?: number;
|
|
18
|
+
cacheTokens?: number;
|
|
19
|
+
totalTokens?: number;
|
|
20
|
+
costUsd?: number;
|
|
21
|
+
/** USD cost formatter. Default `$0.0000`. */
|
|
22
|
+
formatCostUsd?: (usd: number) => string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
declare const TokenCostBreakdown: import("react").ForwardRefExoticComponent<TokenCostBreakdownProps & import("react").RefAttributes<HTMLDListElement>>;
|
|
26
|
+
export { TokenCostBreakdown };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TraceCompare, type TraceCompareProps, type CompareLane } from "./trace-compare.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type AlignRow } from "../../../lib/trace/align.js";
|
|
2
|
+
import type { TraceSpan } from "../../../lib/trace/types.js";
|
|
3
|
+
export interface CompareLane {
|
|
4
|
+
/** Display label (e.g. a trace id). */
|
|
5
|
+
id: string;
|
|
6
|
+
root: TraceSpan;
|
|
7
|
+
/** Data still loading — the lane renders a skeleton and no deltas compute. */
|
|
8
|
+
pending?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TraceCompareProps {
|
|
11
|
+
/** Baseline lane. */
|
|
12
|
+
laneA: CompareLane;
|
|
13
|
+
/** Compared lane (B vs A). */
|
|
14
|
+
laneB: CompareLane;
|
|
15
|
+
/** Custom aligner (default: structural `alignSpanTrees`). */
|
|
16
|
+
align?: (a: TraceSpan, b: TraceSpan) => AlignRow[];
|
|
17
|
+
/** USD cost formatter. Default `$0.0000`. */
|
|
18
|
+
formatCostUsd?: (usd: number) => string;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* TraceCompare — two traces side by side (B vs A baseline): a metrics header
|
|
23
|
+
* per lane and a structural diff table. Deltas are honest — a span present in
|
|
24
|
+
* only one trace is marked `only in A/B` with no fabricated delta. The
|
|
25
|
+
* component receives DATA (lanes); fetching/URL live in the consumer.
|
|
26
|
+
*/
|
|
27
|
+
export declare function TraceCompare({ laneA, laneB, align, formatCostUsd, className, }: TraceCompareProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TraceTranscript, type TraceTranscriptProps } from "./trace-transcript.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TraceSpan, TranscriptRow } from "../../../lib/trace/types.js";
|
|
2
|
+
export interface TraceTranscriptProps {
|
|
3
|
+
/** Trace root — the row model is derived via `toTranscriptRows`. */
|
|
4
|
+
root: TraceSpan;
|
|
5
|
+
/** Pre-computed rows (overrides `root` derivation — mainly for tests / custom row models). */
|
|
6
|
+
rows?: TranscriptRow[];
|
|
7
|
+
selectedId: string | null;
|
|
8
|
+
onSelect: (id: string) => void;
|
|
9
|
+
/** Collapsed group ids (subagent subtrees). Uncontrolled-friendly: omit to keep all expanded. */
|
|
10
|
+
collapsedGroups?: Set<string>;
|
|
11
|
+
onToggleGroup?: (groupId: string) => void;
|
|
12
|
+
/** USD cost formatter for per-row stats. Default `$0.0000`. */
|
|
13
|
+
formatCostUsd?: (usd: number) => string;
|
|
14
|
+
/** Row count at/above which the virtualized path engages. Default 200. */
|
|
15
|
+
virtualizeThreshold?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
"aria-label"?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* TraceTranscript — a reader-mode feed of a trace: one card per span (role
|
|
21
|
+
* badge + name + output preview + micro-stats), with collapsible group
|
|
22
|
+
* headers for subagent subtrees. Virtualizes at/above `virtualizeThreshold`.
|
|
23
|
+
* Controlled selection; group collapse is controlled when `collapsedGroups`
|
|
24
|
+
* is supplied. Escaped text only.
|
|
25
|
+
*/
|
|
26
|
+
export declare function TraceTranscript({ root, rows: rowsProp, selectedId, onSelect, collapsedGroups, onToggleGroup, formatCostUsd, virtualizeThreshold, className, "aria-label": ariaLabel, }: TraceTranscriptProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { linScale, markedPoints, niceMax, seriesPath, TrendChart, type TrendChartProps, type TrendPoint, type TrendSeries, } from "./trend-chart.js";
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* TrendChart — multi-series time-trend chart in pure SVG (no chart lib —
|
|
4
|
+
* keeps the registry copy-pasteable). Promoted from the loopzero-cloud dashboard
|
|
5
|
+
* (production since M51, with the M76 sparse-marker and M90 ragged-series
|
|
6
|
+
* lessons pinned by tests).
|
|
7
|
+
*
|
|
8
|
+
* Input contract: `y` values are expected finite and >= 0 (latency, counts);
|
|
9
|
+
* non-finite points are skipped in the line and read as "—" in the table;
|
|
10
|
+
* gaps are modeled by OMITTING the point (the a11y table reads each value
|
|
11
|
+
* under its own period — never positionally). Points are connected in the
|
|
12
|
+
* order given; sort by `x` upstream. Series `color` is any CSS color — prefer
|
|
13
|
+
* theme tokens (e.g. `var(--primary)`).
|
|
14
|
+
*
|
|
15
|
+
* <TrendChart title="Latency" valueFormatter={(v) => `${v}ms`}
|
|
16
|
+
* series={[{ name: "p50", color: "var(--primary)", points }]} />
|
|
17
|
+
*/
|
|
18
|
+
export interface TrendPoint {
|
|
19
|
+
/** X in the series' own units (bucket index or epoch-ms); scaled linearly. */
|
|
20
|
+
x: number;
|
|
21
|
+
/** Y value for this point. */
|
|
22
|
+
y: number;
|
|
23
|
+
}
|
|
24
|
+
export interface TrendSeries {
|
|
25
|
+
name: string;
|
|
26
|
+
/** CSS color for the line + legend swatch (prefer theme tokens). */
|
|
27
|
+
color: string;
|
|
28
|
+
points: TrendPoint[];
|
|
29
|
+
}
|
|
30
|
+
/** Linear scale mapping a value in `domain` to `range`. A zero-width domain maps everything to r0. */
|
|
31
|
+
export declare function linScale(domain: [number, number], range: [number, number]): (v: number) => number;
|
|
32
|
+
/** A clean upper Y bound ≥ max(values). Returns 0 when there is no positive value. */
|
|
33
|
+
export declare function niceMax(values: number[]): number;
|
|
34
|
+
/**
|
|
35
|
+
* SVG path `d` for a polyline over the given scales. A non-finite point is a GAP: the path BREAKS
|
|
36
|
+
* there and resumes with a new `M` subpath.
|
|
37
|
+
*
|
|
38
|
+
* M144 — this used to `filter(Number.isFinite)` and then join everything with `L`, which drew a
|
|
39
|
+
* continuous line straight over the hole. The filter is what made it wrong: it erased the
|
|
40
|
+
* information of WHERE the gap was, so the line could not break even in principle.
|
|
41
|
+
*
|
|
42
|
+
* Breaking is what every serious charting library does by default — `spanGaps` (Chart.js),
|
|
43
|
+
* `connectNulls` (Highcharts, ECharts, Recharts) and `connectgaps` (Plotly) all default to `false`,
|
|
44
|
+
* and Grafana ships "Connect null values: Never". It is also the only honest reading: connecting
|
|
45
|
+
* asserts continuity the data does not have, and the rest of THIS file already treats a non-finite
|
|
46
|
+
* `y` as absent (`niceMax` filters it, `hasData` filters it, and the accessible table renders `—`
|
|
47
|
+
* for a period a series has no point for).
|
|
48
|
+
*
|
|
49
|
+
* A run of one point emits a lone `M` and no `L` — a one-point line has no length, and the sparse
|
|
50
|
+
* marker is what makes it visible.
|
|
51
|
+
*/
|
|
52
|
+
export declare function seriesPath(points: TrendPoint[], xScale: (x: number) => number, yScale: (y: number) => number): string;
|
|
53
|
+
/**
|
|
54
|
+
* Which axis positions receive a label.
|
|
55
|
+
*
|
|
56
|
+
* Labelling 31 points in ~450px is illegible; labelling only the edges does not answer "when was
|
|
57
|
+
* the spike". The density comes from the REAL width (`viewW`, which the ResizeObserver already
|
|
58
|
+
* tracks), with the first and the last ALWAYS present: they are the window's edges, and without
|
|
59
|
+
* them the reader does not know from when to when the chart speaks.
|
|
60
|
+
*
|
|
61
|
+
* Outside the JSX because it is arithmetic, and isolated arithmetic is arithmetic mutation reaches.
|
|
62
|
+
*/
|
|
63
|
+
export declare function xTicks(axisXs: number[], viewW: number): number[];
|
|
64
|
+
/**
|
|
65
|
+
* Which points receive a marker.
|
|
66
|
+
*
|
|
67
|
+
* Two distinct reasons to mark, and the second only appeared once series with gaps came to exist
|
|
68
|
+
* (M144):
|
|
69
|
+
*
|
|
70
|
+
* 1. **Sparse series** (< `SPARSE_MARKER_MAX` FINITE points) — 1-4 points read as a dramatic
|
|
71
|
+
* cliff; the marker anchors the reader on the real data. M76's rule — which now counts data,
|
|
72
|
+
* not slots, because M144's densification broke the equivalence between the two.
|
|
73
|
+
* 2. **Isolated point** — a finite point surrounded by gaps on both sides becomes a lone `M` in
|
|
74
|
+
* the `path`, and a lone `M` **draws nothing**: zero bounding box, invisible. The data exists,
|
|
75
|
+
* it is correct, and the operator does not see it. Measured in M144's e2e
|
|
76
|
+
* (`d="M419.86,92.00 M448.00,36.00"`).
|
|
77
|
+
*
|
|
78
|
+
* The old rule covered only (1), keying on the TOTAL number of points instead of asking whether
|
|
79
|
+
* the point is actually drawn — even though its own comment already stated the intent *"a dot
|
|
80
|
+
* keeps real data from rendering as an invisible line"*. After the densification, a 30-day series
|
|
81
|
+
* with two finite days separated by a gap falls outside (1) and disappears. Chart.js and Plotly
|
|
82
|
+
* mark the isolated point for exactly this reason.
|
|
83
|
+
*
|
|
84
|
+
* Outside the JSX on purpose: it is the decision's arithmetic, and isolated arithmetic is the kind
|
|
85
|
+
* a mutation reaches.
|
|
86
|
+
*/
|
|
87
|
+
export declare function markedPoints(points: TrendPoint[]): TrendPoint[];
|
|
88
|
+
export interface TrendChartProps extends HTMLAttributes<HTMLElement> {
|
|
89
|
+
title: string;
|
|
90
|
+
series: TrendSeries[];
|
|
91
|
+
height?: number;
|
|
92
|
+
/** Formats y-axis labels and table cells (tremor vocabulary). */
|
|
93
|
+
valueFormatter?: (v: number) => string;
|
|
94
|
+
/**
|
|
95
|
+
* Pin the top of the y-axis. Pass a fixed bound (e.g. `1` for a 0–1 score) so the
|
|
96
|
+
* scale is stable and comparable across renders instead of auto-fitting to the data
|
|
97
|
+
* max via {@link niceMax} (which makes 0.68 look near the top of a [0, 0.7] axis).
|
|
98
|
+
* Ignored when ≤ 0. Default: auto (`niceMax`).
|
|
99
|
+
*/
|
|
100
|
+
yMax?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Formats the `x` for the axis and for the accessible table. **Optional on purpose.**
|
|
103
|
+
*
|
|
104
|
+
* The `x` contract is ambiguous — "bucket index or epoch-ms" — and in practice nearly unanimous:
|
|
105
|
+
* of the consumer's six series factories, five pass an INDEX and one passes epoch-ms. Inferring by
|
|
106
|
+
* magnitude would work, and would be the exact shape of the defect this component has already paid
|
|
107
|
+
* for (M76's marker rule keyed on `points.length` instead of asking what it wanted to know, and
|
|
108
|
+
* M144's densification switched it off silently). The one who knows what `x` means is the caller.
|
|
109
|
+
*
|
|
110
|
+
* Without this prop nothing changes: no X-axis label is drawn and the table keeps numbering.
|
|
111
|
+
*/
|
|
112
|
+
xFormatter?: (x: number) => string;
|
|
113
|
+
/** Header of the accessible table's first column. "Point" over dates would be dishonest. */
|
|
114
|
+
xLabel?: string;
|
|
115
|
+
}
|
|
116
|
+
declare const TrendChart: import("react").ForwardRefExoticComponent<TrendChartProps & import("react").RefAttributes<HTMLElement>>;
|
|
117
|
+
export { TrendChart };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ElementType, HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* ActionBar — page-top action strip primitive.
|
|
4
|
+
*
|
|
5
|
+
* A horizontal flexbox row with three optional slots:
|
|
6
|
+
* - Search input (flex-1, grows to fill)
|
|
7
|
+
* - Filter icon button (next to search)
|
|
8
|
+
* - Primary action button (right-aligned)
|
|
9
|
+
*
|
|
10
|
+
* Returns `null` when no props are provided — don't render an empty
|
|
11
|
+
* bar. Used standalone or composed inside `<PageShell>` (Brief #5).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <ActionBar
|
|
15
|
+
* search={{ placeholder: "Search projects…", value: q, onChange: setQ }}
|
|
16
|
+
* primaryAction={{ label: "New project", icon: Plus, onClick: openModal }}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
export interface ActionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
20
|
+
search?: {
|
|
21
|
+
placeholder: string;
|
|
22
|
+
/** Accessible name; defaults to the placeholder with trailing ellipsis stripped (issue #8). */
|
|
23
|
+
"aria-label"?: string;
|
|
24
|
+
value: string;
|
|
25
|
+
onChange: (value: string) => void;
|
|
26
|
+
};
|
|
27
|
+
primaryAction?: {
|
|
28
|
+
label: ReactNode;
|
|
29
|
+
icon?: ElementType;
|
|
30
|
+
onClick: () => void;
|
|
31
|
+
loading?: boolean;
|
|
32
|
+
};
|
|
33
|
+
onFilterClick?: () => void;
|
|
34
|
+
}
|
|
35
|
+
declare const ActionBar: import("react").ForwardRefExoticComponent<ActionBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export { ActionBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActionBar, type ActionBarProps } from "./action-bar.js";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Alert — persistent inline notice. Distinct from `Toast` (transient,
|
|
4
|
+
* corner-positioned, multiple stackable) and `EmptyState` (centered card
|
|
5
|
+
* for no-data affordances). Full-width-of-section banner that stays
|
|
6
|
+
* visible until the user acts.
|
|
7
|
+
*
|
|
8
|
+
* `intent` drives icon + color tokens. `destructive` intent renders
|
|
9
|
+
* `role="alert"` for assertive screen-reader announcement; the other
|
|
10
|
+
* three intents render `role="status"` (polite). `onDismiss`, when
|
|
11
|
+
* provided, renders a trailing `X` button. `action` slot accepts any
|
|
12
|
+
* ReactNode (typically a `<Button>` or anchor).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <Alert
|
|
16
|
+
* intent="warning"
|
|
17
|
+
* title="Verify your email"
|
|
18
|
+
* description="We sent a link to your email."
|
|
19
|
+
* action={<Button size="sm" onClick={resend}>Resend</Button>}
|
|
20
|
+
* />
|
|
21
|
+
*/
|
|
22
|
+
export type AlertIntent = "info" | "success" | "warning" | "destructive";
|
|
23
|
+
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "role" | "children"> {
|
|
24
|
+
intent?: AlertIntent;
|
|
25
|
+
title?: ReactNode;
|
|
26
|
+
description?: ReactNode;
|
|
27
|
+
action?: ReactNode;
|
|
28
|
+
onDismiss?: () => void;
|
|
29
|
+
}
|
|
30
|
+
declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { Alert };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, type AlertProps, type AlertIntent } from "./alert.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import type { ComponentPropsWithoutRef } from "react";
|
|
4
|
+
/**
|
|
5
|
+
* Avatar — user/team avatar with safe fallback to initials.
|
|
6
|
+
*
|
|
7
|
+
* Composition:
|
|
8
|
+
* <Avatar size="md">
|
|
9
|
+
* <Avatar.Image src="…" alt="…" />
|
|
10
|
+
* <Avatar.Fallback>AA</Avatar.Fallback>
|
|
11
|
+
* </Avatar>
|
|
12
|
+
*
|
|
13
|
+
* Built on Radix Avatar (handles image load failures → fallback automatically).
|
|
14
|
+
* Sizes scale on the root; fallback inherits the size's text scale.
|
|
15
|
+
*/
|
|
16
|
+
declare const avatarVariants: (props?: ({
|
|
17
|
+
size?: "sm" | "md" | "lg" | "xs" | "xl" | null | undefined;
|
|
18
|
+
tone?: "accent" | "primary" | "muted" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
interface AvatarProps extends ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>, VariantProps<typeof avatarVariants> {
|
|
21
|
+
}
|
|
22
|
+
declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
23
|
+
Image: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
24
|
+
Fallback: import("react").ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
};
|
|
26
|
+
export { Avatar, avatarVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar, avatarVariants } from "./avatar.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Badge — small status / tag indicator.
|
|
5
|
+
*
|
|
6
|
+
* Variants:
|
|
7
|
+
* - default muted surface, hairline border
|
|
8
|
+
* - primary brand-colored outline and a soft wash of it
|
|
9
|
+
* - accent lime fill with ink text (pro / beta / new)
|
|
10
|
+
* - success deploy succeeded
|
|
11
|
+
* - warning attention needed
|
|
12
|
+
* - destructive failed
|
|
13
|
+
* - outline transparent, just border
|
|
14
|
+
*
|
|
15
|
+
* Status dots are inlined via `<Badge.Dot />` for things like "Building…",
|
|
16
|
+
* "Running", "Failed" rows in deployment lists.
|
|
17
|
+
*/
|
|
18
|
+
declare const badgeVariants: (props?: ({
|
|
19
|
+
variant?: "accent" | "primary" | "destructive" | "default" | "success" | "warning" | "outline" | null | undefined;
|
|
20
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
23
|
+
}
|
|
24
|
+
declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
interface BadgeDotProps extends HTMLAttributes<HTMLSpanElement> {
|
|
26
|
+
pulse?: boolean;
|
|
27
|
+
tone?: "primary" | "accent" | "success" | "warning" | "destructive" | "muted";
|
|
28
|
+
}
|
|
29
|
+
declare const Dot: import("react").ForwardRefExoticComponent<BadgeDotProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
30
|
+
declare const BadgeWithDot: typeof Badge & {
|
|
31
|
+
Dot: typeof Dot;
|
|
32
|
+
};
|
|
33
|
+
export { BadgeWithDot as Badge, badgeVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, badgeVariants, type BadgeProps } from "./badge.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, HTMLAttributes } from "react";
|
|
2
|
+
interface BreadcrumbLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
3
|
+
/** Render the consumer's element (e.g. a router <Link>) instead of a native anchor. */
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Breadcrumb: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>> & {
|
|
7
|
+
List: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLOListElement> & import("react").RefAttributes<HTMLOListElement>>;
|
|
8
|
+
Item: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
|
|
9
|
+
Link: import("react").ForwardRefExoticComponent<BreadcrumbLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
Page: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
Separator: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & import("react").RefAttributes<HTMLLIElement>>;
|
|
12
|
+
Ellipsis: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
13
|
+
};
|
|
14
|
+
export { Breadcrumb };
|
|
15
|
+
export type { BreadcrumbLinkProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Breadcrumb, type BreadcrumbLinkProps } from "./breadcrumb.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ButtonHTMLAttributes } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Button — primitive action element.
|
|
5
|
+
*
|
|
6
|
+
* Variants:
|
|
7
|
+
* - primary neutral fill (ink on paper, bone on ink): the default action
|
|
8
|
+
* - secondary surface with hairline border
|
|
9
|
+
* - accent lime fill: the one highlighted action on a screen
|
|
10
|
+
* - ghost transparent, hover lifts surface
|
|
11
|
+
* - link text-only, brand color, underline on hover
|
|
12
|
+
* - destructive for irreversible actions
|
|
13
|
+
*
|
|
14
|
+
* Sizes: sm (32px) · md (40px, default) · lg (48px) · icon (square 40px)
|
|
15
|
+
*
|
|
16
|
+
* `asChild` swaps the root for the consumer's element (Radix Slot pattern).
|
|
17
|
+
*/
|
|
18
|
+
declare const buttonVariants: (props?: ({
|
|
19
|
+
variant?: "accent" | "link" | "primary" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
20
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
21
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
22
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
23
|
+
asChild?: boolean;
|
|
24
|
+
}
|
|
25
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
26
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button, buttonVariants, type ButtonProps } from "./button.js";
|