@a4ui/core 0.32.0 → 0.33.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/dist/charts/BarList.d.ts +33 -0
- package/dist/charts/CategoryBar.d.ts +23 -0
- package/dist/charts/StatusTracker.d.ts +27 -0
- package/dist/charts/index.d.ts +3 -0
- package/dist/charts.js +446 -316
- package/dist/elements.css +95 -0
- package/dist/full.css +95 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +5107 -4227
- package/dist/ui/Callout.d.ts +27 -0
- package/dist/ui/Confetti.d.ts +46 -0
- package/dist/ui/CursorTrail.d.ts +25 -0
- package/dist/ui/DiffViewer.d.ts +33 -0
- package/dist/ui/Globe.d.ts +44 -0
- package/dist/ui/ModelPicker.d.ts +38 -0
- package/dist/ui/ReasoningTrace.d.ts +28 -0
- package/dist/ui/Snippet.d.ts +19 -0
- package/dist/ui/SuggestionChips.d.ts +25 -0
- package/dist/ui/ToolCallTimeline.d.ts +34 -0
- package/dist/ui/UsageMeter.d.ts +26 -0
- package/dist/ui/WorldMap.d.ts +36 -0
- package/package.json +1 -1
- package/src/charts/BarList.tsx +83 -0
- package/src/charts/CategoryBar.tsx +95 -0
- package/src/charts/StatusTracker.tsx +81 -0
- package/src/charts/index.ts +3 -0
- package/src/index.ts +24 -1
- package/src/ui/Callout.tsx +66 -0
- package/src/ui/Confetti.tsx +131 -0
- package/src/ui/CursorTrail.tsx +88 -0
- package/src/ui/DiffViewer.tsx +166 -0
- package/src/ui/Globe.tsx +317 -0
- package/src/ui/ModelPicker.tsx +119 -0
- package/src/ui/ReasoningTrace.tsx +83 -0
- package/src/ui/Snippet.tsx +64 -0
- package/src/ui/SuggestionChips.tsx +65 -0
- package/src/ui/ToolCallTimeline.tsx +137 -0
- package/src/ui/UsageMeter.tsx +71 -0
- package/src/ui/WorldMap.tsx +191 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface BarListDatum {
|
|
3
|
+
name: string;
|
|
4
|
+
value: number;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BarListProps {
|
|
8
|
+
data: BarListDatum[];
|
|
9
|
+
/** Formats the raw value shown at the row's end. Default `String`. */
|
|
10
|
+
valueFormat?: (n: number) => string;
|
|
11
|
+
/** Fill color token. Default 'primary'. */
|
|
12
|
+
tone?: 'primary' | 'accent';
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ranked horizontal bar list: rows sorted by `value` descending, each a
|
|
17
|
+
* full-width track with a low-opacity fill sized to `value / max` of the
|
|
18
|
+
* tallest row, the `name` overlaid at the left (truncated, rendered as a
|
|
19
|
+
* link when `href` is set) and the formatted value at the right. Compact
|
|
20
|
+
* and reflows with its container.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <BarList
|
|
25
|
+
* data={[
|
|
26
|
+
* { name: '/dashboard', value: 842, href: '/pages/dashboard' },
|
|
27
|
+
* { name: '/settings', value: 231 },
|
|
28
|
+
* ]}
|
|
29
|
+
* tone="accent"
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function BarList(props: BarListProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export type CategoryBarTone = 'primary' | 'accent' | 'success' | 'warning' | 'destructive';
|
|
3
|
+
export interface CategoryBarProps {
|
|
4
|
+
values: number[];
|
|
5
|
+
/** A value along the cumulative total to mark with a caret above the bar. */
|
|
6
|
+
marker?: number;
|
|
7
|
+
/** Per-segment color tokens; cycles the default order below when omitted or shorter than `values`. */
|
|
8
|
+
tones?: CategoryBarTone[];
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Single segmented bar: each `values[i]` sets a segment's flex-grow share of
|
|
13
|
+
* the total, colored by `tones[i]` (cycling a sensible default), joined
|
|
14
|
+
* seamlessly inside one rounded track. An optional `marker` renders a caret
|
|
15
|
+
* above the bar at that value's position along the total, and cumulative
|
|
16
|
+
* boundary labels sit beneath (muted, tabular-nums).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <CategoryBar values={[40, 25, 20, 15]} marker={62} />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function CategoryBar(props: CategoryBarProps): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
export interface StatusSegment {
|
|
3
|
+
status: 'ok' | 'degraded' | 'down';
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface StatusTrackerProps {
|
|
7
|
+
segments: StatusSegment[];
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Status-page style history bar: a row of thin rounded segments colored by
|
|
12
|
+
* `status` (ok/degraded/down), each with a native hover tooltip showing its
|
|
13
|
+
* label and status, plus a summary uptime line above.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <StatusTracker
|
|
18
|
+
* segments={[
|
|
19
|
+
* { status: 'ok', label: 'Jul 1' },
|
|
20
|
+
* { status: 'degraded', label: 'Jul 2' },
|
|
21
|
+
* { status: 'ok', label: 'Jul 3' },
|
|
22
|
+
* { status: 'down', label: 'Jul 4' },
|
|
23
|
+
* ]}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function StatusTracker(props: StatusTrackerProps): JSX.Element;
|
package/dist/charts/index.d.ts
CHANGED
|
@@ -4,3 +4,6 @@ export { DonutChart, type DonutSegment, type DonutChartProps } from './DonutChar
|
|
|
4
4
|
export { LineChart, type LineSeries, type LineChartProps } from './LineChart';
|
|
5
5
|
export { GaugeChart, type GaugeThreshold, type GaugeChartProps } from './GaugeChart';
|
|
6
6
|
export { RadarChart, type RadarSeries, type RadarChartProps } from './RadarChart';
|
|
7
|
+
export { BarList, type BarListDatum, type BarListProps } from './BarList';
|
|
8
|
+
export { StatusTracker, type StatusSegment, type StatusTrackerProps } from './StatusTracker';
|
|
9
|
+
export { CategoryBar, type CategoryBarTone, type CategoryBarProps } from './CategoryBar';
|