@sero-ai/ui 0.3.2 → 0.4.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.
Files changed (190) hide show
  1. package/.turbo/turbo-build.log +628 -0
  2. package/.turbo/turbo-typecheck.log +1 -1
  3. package/CHANGELOG.md +38 -0
  4. package/dist/components/context-editor/CapabilitySection.cjs +57 -0
  5. package/dist/components/context-editor/CapabilitySection.d.cts +20 -0
  6. package/dist/components/context-editor/CapabilitySection.d.ts +20 -0
  7. package/dist/components/context-editor/CapabilitySection.js +57 -0
  8. package/dist/components/context-editor/ContextEditor.cjs +108 -0
  9. package/dist/components/context-editor/ContextEditor.d.cts +26 -0
  10. package/dist/components/context-editor/ContextEditor.d.ts +26 -0
  11. package/dist/components/context-editor/ContextEditor.js +108 -0
  12. package/dist/components/context-editor/PresetBar.cjs +71 -0
  13. package/dist/components/context-editor/PresetBar.d.cts +19 -0
  14. package/dist/components/context-editor/PresetBar.d.ts +19 -0
  15. package/dist/components/context-editor/PresetBar.js +71 -0
  16. package/dist/components/context-editor/SkillsSection.cjs +31 -0
  17. package/dist/components/context-editor/SkillsSection.d.cts +14 -0
  18. package/dist/components/context-editor/SkillsSection.d.ts +14 -0
  19. package/dist/components/context-editor/SkillsSection.js +31 -0
  20. package/dist/components/context-editor/SystemPromptSection.cjs +58 -0
  21. package/dist/components/context-editor/SystemPromptSection.d.cts +25 -0
  22. package/dist/components/context-editor/SystemPromptSection.d.ts +25 -0
  23. package/dist/components/context-editor/SystemPromptSection.js +58 -0
  24. package/dist/components/context-editor/ToolsSection.cjs +31 -0
  25. package/dist/components/context-editor/ToolsSection.d.cts +14 -0
  26. package/dist/components/context-editor/ToolsSection.d.ts +14 -0
  27. package/dist/components/context-editor/ToolsSection.js +31 -0
  28. package/dist/components/context-editor/index.cjs +8 -0
  29. package/dist/components/context-editor/index.d.cts +5 -0
  30. package/dist/components/context-editor/index.d.ts +5 -0
  31. package/dist/components/context-editor/index.js +8 -0
  32. package/dist/components/context-editor/parts.cjs +184 -0
  33. package/dist/components/context-editor/parts.d.cts +32 -0
  34. package/dist/components/context-editor/parts.d.ts +32 -0
  35. package/dist/components/context-editor/parts.js +184 -0
  36. package/dist/components/context-editor/use-context-editor-model.cjs +194 -0
  37. package/dist/components/context-editor/use-context-editor-model.d.cts +57 -0
  38. package/dist/components/context-editor/use-context-editor-model.d.ts +57 -0
  39. package/dist/components/context-editor/use-context-editor-model.js +194 -0
  40. package/dist/components/dashboard/activity-list.cjs +59 -0
  41. package/dist/components/dashboard/activity-list.d.cts +27 -0
  42. package/dist/components/dashboard/activity-list.d.ts +27 -0
  43. package/dist/components/dashboard/activity-list.js +59 -0
  44. package/dist/components/dashboard/catalog.cjs +322 -0
  45. package/dist/components/dashboard/catalog.d.cts +14 -0
  46. package/dist/components/dashboard/catalog.d.ts +14 -0
  47. package/dist/components/dashboard/catalog.js +322 -0
  48. package/dist/components/dashboard/data-boundary.cjs +29 -0
  49. package/dist/components/dashboard/data-boundary.d.cts +21 -0
  50. package/dist/components/dashboard/data-boundary.d.ts +21 -0
  51. package/dist/components/dashboard/data-boundary.js +29 -0
  52. package/dist/components/dashboard/empty-state.cjs +49 -0
  53. package/dist/components/dashboard/empty-state.d.cts +20 -0
  54. package/dist/components/dashboard/empty-state.d.ts +20 -0
  55. package/dist/components/dashboard/empty-state.js +49 -0
  56. package/dist/components/dashboard/icon-button.cjs +40 -0
  57. package/dist/components/dashboard/icon-button.d.cts +24 -0
  58. package/dist/components/dashboard/icon-button.d.ts +24 -0
  59. package/dist/components/dashboard/icon-button.js +40 -0
  60. package/dist/components/dashboard/index.cjs +15 -0
  61. package/dist/components/dashboard/index.d.cts +24 -0
  62. package/dist/components/dashboard/index.d.ts +24 -0
  63. package/dist/components/dashboard/index.js +15 -0
  64. package/dist/components/dashboard/item-list.cjs +71 -0
  65. package/dist/components/dashboard/item-list.d.cts +28 -0
  66. package/dist/components/dashboard/item-list.d.ts +28 -0
  67. package/dist/components/dashboard/item-list.js +71 -0
  68. package/dist/components/dashboard/key-value.cjs +39 -0
  69. package/dist/components/dashboard/key-value.d.cts +17 -0
  70. package/dist/components/dashboard/key-value.d.ts +17 -0
  71. package/dist/components/dashboard/key-value.js +39 -0
  72. package/dist/components/dashboard/layout.cjs +193 -0
  73. package/dist/components/dashboard/layout.d.cts +91 -0
  74. package/dist/components/dashboard/layout.d.ts +91 -0
  75. package/dist/components/dashboard/layout.js +193 -0
  76. package/dist/components/dashboard/metric.cjs +98 -0
  77. package/dist/components/dashboard/metric.d.cts +44 -0
  78. package/dist/components/dashboard/metric.d.ts +44 -0
  79. package/dist/components/dashboard/metric.js +98 -0
  80. package/dist/components/dashboard/progress-ring.cjs +77 -0
  81. package/dist/components/dashboard/progress-ring.d.cts +25 -0
  82. package/dist/components/dashboard/progress-ring.d.ts +25 -0
  83. package/dist/components/dashboard/progress-ring.js +77 -0
  84. package/dist/components/dashboard/skeletons.cjs +54 -0
  85. package/dist/components/dashboard/skeletons.d.cts +15 -0
  86. package/dist/components/dashboard/skeletons.d.ts +15 -0
  87. package/dist/components/dashboard/skeletons.js +54 -0
  88. package/dist/components/dashboard/spacing.cjs +10 -0
  89. package/dist/components/dashboard/spacing.d.cts +4 -0
  90. package/dist/components/dashboard/spacing.d.ts +4 -0
  91. package/dist/components/dashboard/spacing.js +10 -0
  92. package/dist/components/dashboard/stale-indicator.cjs +42 -0
  93. package/dist/components/dashboard/stale-indicator.d.cts +15 -0
  94. package/dist/components/dashboard/stale-indicator.d.ts +15 -0
  95. package/dist/components/dashboard/stale-indicator.js +42 -0
  96. package/dist/components/dashboard/status.cjs +62 -0
  97. package/dist/components/dashboard/status.d.cts +15 -0
  98. package/dist/components/dashboard/status.d.ts +15 -0
  99. package/dist/components/dashboard/status.js +62 -0
  100. package/dist/components/dashboard/tone.cjs +26 -0
  101. package/dist/components/dashboard/tone.d.cts +9 -0
  102. package/dist/components/dashboard/tone.d.ts +9 -0
  103. package/dist/components/dashboard/tone.js +26 -0
  104. package/dist/components/dashboard/typography.cjs +99 -0
  105. package/dist/components/dashboard/typography.d.cts +57 -0
  106. package/dist/components/dashboard/typography.d.ts +57 -0
  107. package/dist/components/dashboard/typography.js +99 -0
  108. package/dist/components/reference/ActivityExample.cjs +47 -0
  109. package/dist/components/reference/ActivityExample.d.cts +5 -0
  110. package/dist/components/reference/ActivityExample.d.ts +5 -0
  111. package/dist/components/reference/ActivityExample.js +47 -0
  112. package/dist/components/reference/ResourceExample.cjs +54 -0
  113. package/dist/components/reference/ResourceExample.d.cts +5 -0
  114. package/dist/components/reference/ResourceExample.d.ts +5 -0
  115. package/dist/components/reference/ResourceExample.js +54 -0
  116. package/dist/components/reference/SchedulerExample.cjs +68 -0
  117. package/dist/components/reference/SchedulerExample.d.cts +5 -0
  118. package/dist/components/reference/SchedulerExample.d.ts +5 -0
  119. package/dist/components/reference/SchedulerExample.js +68 -0
  120. package/dist/components/reference/StarterExample.cjs +34 -0
  121. package/dist/components/reference/StarterExample.d.cts +5 -0
  122. package/dist/components/reference/StarterExample.d.ts +5 -0
  123. package/dist/components/reference/StarterExample.js +34 -0
  124. package/dist/components/reference/index.cjs +10 -0
  125. package/dist/components/reference/index.d.cts +5 -0
  126. package/dist/components/reference/index.d.ts +5 -0
  127. package/dist/components/reference/index.js +10 -0
  128. package/dist/components/ui/badge.cjs +5 -1
  129. package/dist/components/ui/badge.d.cts +1 -1
  130. package/dist/components/ui/badge.d.ts +1 -1
  131. package/dist/components/ui/badge.js +5 -1
  132. package/dist/dashboard-catalog.cjs +8 -0
  133. package/dist/dashboard-catalog.d.cts +1 -0
  134. package/dist/dashboard-catalog.d.ts +1 -0
  135. package/dist/dashboard-catalog.js +8 -0
  136. package/dist/index.cjs +1 -0
  137. package/dist/index.d.cts +15 -0
  138. package/dist/index.d.ts +15 -0
  139. package/dist/index.js +1 -0
  140. package/dist/reference.cjs +12 -0
  141. package/dist/reference.d.cts +5 -0
  142. package/dist/reference.d.ts +5 -0
  143. package/dist/reference.js +12 -0
  144. package/dist/styles/glass-board.css +43 -0
  145. package/dist/styles/globals.css +59 -0
  146. package/package.json +70 -41
  147. package/src/components/context-editor/CapabilitySection.tsx +85 -0
  148. package/src/components/context-editor/ContextEditor.tsx +138 -0
  149. package/src/components/context-editor/PresetBar.tsx +94 -0
  150. package/src/components/context-editor/SkillsSection.tsx +37 -0
  151. package/src/components/context-editor/SystemPromptSection.tsx +88 -0
  152. package/src/components/context-editor/ToolsSection.tsx +37 -0
  153. package/src/components/context-editor/index.ts +7 -0
  154. package/src/components/context-editor/parts.tsx +217 -0
  155. package/src/components/context-editor/use-context-editor-model.ts +296 -0
  156. package/src/components/dashboard/__tests__/catalog.test.ts +57 -0
  157. package/src/components/dashboard/__tests__/glass.test.tsx +42 -0
  158. package/src/components/dashboard/__tests__/state.test.tsx +110 -0
  159. package/src/components/dashboard/__tests__/variants.test.tsx +95 -0
  160. package/src/components/dashboard/activity-list.tsx +99 -0
  161. package/src/components/dashboard/catalog.ts +351 -0
  162. package/src/components/dashboard/data-boundary.tsx +54 -0
  163. package/src/components/dashboard/empty-state.tsx +70 -0
  164. package/src/components/dashboard/icon-button.tsx +58 -0
  165. package/src/components/dashboard/index.ts +21 -0
  166. package/src/components/dashboard/item-list.tsx +106 -0
  167. package/src/components/dashboard/key-value.tsx +54 -0
  168. package/src/components/dashboard/layout.tsx +286 -0
  169. package/src/components/dashboard/metric.tsx +139 -0
  170. package/src/components/dashboard/progress-ring.tsx +100 -0
  171. package/src/components/dashboard/skeletons.tsx +73 -0
  172. package/src/components/dashboard/spacing.ts +14 -0
  173. package/src/components/dashboard/stale-indicator.tsx +55 -0
  174. package/src/components/dashboard/status.tsx +75 -0
  175. package/src/components/dashboard/tone.ts +35 -0
  176. package/src/components/dashboard/typography.tsx +151 -0
  177. package/src/components/reference/ActivityExample.tsx +68 -0
  178. package/src/components/reference/ResourceExample.tsx +78 -0
  179. package/src/components/reference/SchedulerExample.tsx +88 -0
  180. package/src/components/reference/StarterExample.tsx +48 -0
  181. package/src/components/reference/index.ts +10 -0
  182. package/src/components/ui/badge.tsx +6 -0
  183. package/src/dashboard-catalog.ts +13 -0
  184. package/src/index.ts +5 -0
  185. package/src/reference.ts +15 -0
  186. package/src/styles/glass-board.css +43 -0
  187. package/src/styles/globals.css +59 -0
  188. package/tsup.config.ts +6 -2
  189. package/vitest.config.ts +8 -0
  190. package/LICENSE +0 -201
@@ -0,0 +1,68 @@
1
+ // ActivityExample — a scrollable item list with a header count and a
2
+ // footer status row.
3
+ //
4
+ // Pure static presentation; a real feed would wire its rows through a
5
+ // DataBoundary (loading / empty / error) driven by plugin state. See the
6
+ // runtime-state components in the catalogue for those slots.
7
+
8
+ import { FileText } from "lucide-react";
9
+
10
+ import {
11
+ Inline,
12
+ ItemList,
13
+ ItemListItem,
14
+ Stack,
15
+ StaleIndicator,
16
+ Status,
17
+ Text,
18
+ WidgetContent,
19
+ } from "../dashboard";
20
+ import { Badge } from "../ui/badge";
21
+
22
+ const ITEMS = [
23
+ { id: "1", title: "quarterly-report.pdf", meta: "2h", badge: "PDF" },
24
+ { id: "2", title: "design-tokens.json", meta: "5h", badge: "JSON" },
25
+ { id: "3", title: "release-notes.md", meta: "1d", badge: "MD" },
26
+ ];
27
+
28
+ export function ActivityExample() {
29
+ return (
30
+ <WidgetContent>
31
+ <Stack gap="sm" fill>
32
+ <Inline justify="between" align="center">
33
+ <Inline gap="xs" align="center">
34
+ <Text variant="label">Recent files</Text>
35
+ <Badge variant="info">{ITEMS.length}</Badge>
36
+ </Inline>
37
+ </Inline>
38
+
39
+ <Stack gap="none" scroll>
40
+ <ItemList>
41
+ {ITEMS.map((f) => (
42
+ <ItemListItem
43
+ key={f.id}
44
+ leading={<FileText className="size-4 text-[var(--text-muted)]" />}
45
+ primary={f.title}
46
+ trailing={
47
+ <Inline gap="xs" align="center">
48
+ <Badge variant="secondary">{f.badge}</Badge>
49
+ <span>{f.meta}</span>
50
+ </Inline>
51
+ }
52
+ />
53
+ ))}
54
+ </ItemList>
55
+ </Stack>
56
+
57
+ <Inline justify="between" align="center">
58
+ <Status tone="info" variant="pill">
59
+ Synced
60
+ </Status>
61
+ <StaleIndicator lastUpdated="Synced 30s ago" />
62
+ </Inline>
63
+ </Stack>
64
+ </WidgetContent>
65
+ );
66
+ }
67
+
68
+ export default ActivityExample;
@@ -0,0 +1,78 @@
1
+ // ResourceExample — a grid, gauges, key/value metadata and headings.
2
+ //
3
+ // Pure static presentation; a real resource monitor would read live host
4
+ // metrics from its plugin.
5
+
6
+ import {
7
+ Divider,
8
+ Grid,
9
+ Heading,
10
+ KeyValue,
11
+ KeyValueList,
12
+ Metric,
13
+ MetricGroup,
14
+ ProgressRing,
15
+ Section,
16
+ Stack,
17
+ Status,
18
+ Text,
19
+ WidgetContent,
20
+ } from "../dashboard";
21
+
22
+ function Ring({
23
+ value,
24
+ label,
25
+ tone,
26
+ }: {
27
+ value: number;
28
+ label: string;
29
+ tone: "success" | "info" | "warning";
30
+ }) {
31
+ return (
32
+ <Stack gap="xs" align="center">
33
+ <ProgressRing value={value} label={label} tone={tone} />
34
+ <Text variant="muted">{label}</Text>
35
+ </Stack>
36
+ );
37
+ }
38
+
39
+ export function ResourceExample() {
40
+ return (
41
+ <WidgetContent scroll>
42
+ <Stack gap="sm">
43
+ <Heading level={2} size="md">
44
+ Resources
45
+ </Heading>
46
+
47
+ <MetricGroup>
48
+ <Metric label="CPU" value="42%" tone="success" />
49
+ <Metric label="Memory" value="6.1 GB" />
50
+ <Metric label="Disk" value="71%" tone="warning" />
51
+ </MetricGroup>
52
+
53
+ <Divider />
54
+
55
+ <Section heading="Usage">
56
+ <Grid columns={3} gap="sm">
57
+ <Ring value={42} label="CPU" tone="success" />
58
+ <Ring value={61} label="Memory" tone="info" />
59
+ <Ring value={71} label="Disk" tone="warning" />
60
+ </Grid>
61
+ </Section>
62
+
63
+ <Divider />
64
+
65
+ <Section heading="Host">
66
+ <KeyValueList>
67
+ <KeyValue label="Region" value="eu-west-1" mono />
68
+ <KeyValue label="Instance" value="c7g.xlarge" mono />
69
+ <KeyValue label="Uptime" value="14d 6h" mono />
70
+ <KeyValue label="Status" value={<Status tone="success">Healthy</Status>} />
71
+ </KeyValueList>
72
+ </Section>
73
+ </Stack>
74
+ </WidgetContent>
75
+ );
76
+ }
77
+
78
+ export default ResourceExample;
@@ -0,0 +1,88 @@
1
+ // SchedulerExample — layout, metric cards, a gauge and an activity group.
2
+ //
3
+ // Pure static presentation (fixed sample data, no state or controls); a real
4
+ // scheduler widget would read jobs and run stats from its plugin.
5
+
6
+ import { ExternalLink } from "lucide-react";
7
+
8
+ import {
9
+ ActivityList,
10
+ ActivityListItem,
11
+ DataBoundary,
12
+ Divider,
13
+ Inline,
14
+ Metric,
15
+ MetricCard,
16
+ ProgressRing,
17
+ Section,
18
+ Stack,
19
+ StaleIndicator,
20
+ Status,
21
+ WidgetContent,
22
+ } from "../dashboard";
23
+ import { Button } from "../ui/button";
24
+
25
+ const UPCOMING = [
26
+ { id: "a", label: "Daily backup", timestamp: "08:00", tone: "success" as const },
27
+ { id: "b", label: "Publish report", timestamp: "in 2h", tone: "info" as const },
28
+ { id: "c", label: "Rotate API keys", timestamp: "tomorrow", tone: "warning" as const },
29
+ ];
30
+
31
+ export function SchedulerExample() {
32
+ return (
33
+ <WidgetContent>
34
+ <Stack gap="sm">
35
+ <Inline justify="between" align="center">
36
+ <Status tone="success" pulse>
37
+ Scheduler active
38
+ </Status>
39
+ <ProgressRing value={92} label="Success rate" tone="success" size={40} />
40
+ </Inline>
41
+
42
+ <Section heading="Summary">
43
+ <Inline gap="sm" wrap>
44
+ <MetricCard className="flex-1">
45
+ <Metric label="Jobs" value={6} />
46
+ </MetricCard>
47
+ <MetricCard className="flex-1">
48
+ <Metric
49
+ label="Runs today"
50
+ value={18}
51
+ trend={{ direction: "up", value: "+4", tone: "success" }}
52
+ />
53
+ </MetricCard>
54
+ </Inline>
55
+ </Section>
56
+
57
+ <Divider />
58
+
59
+ <Section
60
+ heading="Next up"
61
+ action={
62
+ <Button size="xs" variant="ghost">
63
+ <ExternalLink className="size-3" />
64
+ All
65
+ </Button>
66
+ }
67
+ >
68
+ <DataBoundary state="ready">
69
+ <ActivityList>
70
+ {UPCOMING.map((e) => (
71
+ <ActivityListItem
72
+ key={e.id}
73
+ tone={e.tone}
74
+ label={e.label}
75
+ timestamp={e.timestamp}
76
+ />
77
+ ))}
78
+ </ActivityList>
79
+ </DataBoundary>
80
+ </Section>
81
+
82
+ <StaleIndicator lastUpdated="Updated 2m ago" />
83
+ </Stack>
84
+ </WidgetContent>
85
+ );
86
+ }
87
+
88
+ export default SchedulerExample;
@@ -0,0 +1,48 @@
1
+ // StarterExample — the smallest useful widget: a headline metric and a
2
+ // short list. Copy this as the starting point for a new dashboard widget.
3
+ //
4
+ // Reference widgets are pure static presentation (fixed sample data, no
5
+ // state or controls) so they render identically anywhere. A real widget
6
+ // swaps the sample data for state read from its plugin.
7
+
8
+ import { CheckCircle2 } from "lucide-react";
9
+
10
+ import {
11
+ ActivityList,
12
+ ActivityListItem,
13
+ Metric,
14
+ Section,
15
+ Stack,
16
+ WidgetContent,
17
+ } from "../dashboard";
18
+
19
+ const RECENT = [
20
+ { id: "a", label: "Nightly build", timestamp: "12m", tone: "success" as const },
21
+ { id: "b", label: "Deploy to staging", timestamp: "1h", tone: "info" as const },
22
+ { id: "c", label: "Dependency audit", timestamp: "3h", tone: "neutral" as const },
23
+ ];
24
+
25
+ export function StarterExample() {
26
+ return (
27
+ <WidgetContent>
28
+ <Stack gap="sm">
29
+ <Metric label="Tasks done" value={12} icon={CheckCircle2} tone="success" />
30
+
31
+ <Section heading="Recent">
32
+ <ActivityList>
33
+ {RECENT.map((e) => (
34
+ <ActivityListItem
35
+ key={e.id}
36
+ tone={e.tone}
37
+ label={e.label}
38
+ timestamp={e.timestamp}
39
+ />
40
+ ))}
41
+ </ActivityList>
42
+ </Section>
43
+ </Stack>
44
+ </WidgetContent>
45
+ );
46
+ }
47
+
48
+ export default StarterExample;
@@ -0,0 +1,10 @@
1
+ // Reference dashboard widgets — worked examples of the @sero-ai/ui dashboard
2
+ // components, glass-styled and ready to copy. Pure static presentation.
3
+ //
4
+ // Exposed to widget authors via the `@sero-ai/ui/reference` subpath, not the
5
+ // main barrel.
6
+
7
+ export { StarterExample } from "./StarterExample";
8
+ export { SchedulerExample } from "./SchedulerExample";
9
+ export { ResourceExample } from "./ResourceExample";
10
+ export { ActivityExample } from "./ActivityExample";
@@ -18,6 +18,12 @@ const badgeVariants = cva(
18
18
  "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
19
19
  ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
20
20
  link: "text-primary underline-offset-4 [a&]:hover:underline",
21
+ // Semantic status tones (error is covered by `destructive`).
22
+ success:
23
+ "bg-[var(--status-success-muted)] text-[var(--status-success)]",
24
+ warning:
25
+ "bg-[var(--status-warning-muted)] text-[var(--status-warning)]",
26
+ info: "bg-[var(--status-info-muted)] text-[var(--status-info)]",
21
27
  },
22
28
  },
23
29
  defaultVariants: {
@@ -0,0 +1,13 @@
1
+ // Stable subpath for the dashboard component catalogue metadata.
2
+ //
3
+ // import { dashboardComponentCatalog } from "@sero-ai/ui/dashboard-catalog";
4
+ //
5
+ // The metadata is for discovery tools, documentation and agent workflows; it is
6
+ // not involved in rendering. Normal widget code imports React components from
7
+ // the package root instead.
8
+
9
+ export {
10
+ dashboardComponentCatalog,
11
+ type DashboardComponentCatalogEntry,
12
+ } from "./components/dashboard/catalog";
13
+ export { default } from "./components/dashboard/catalog";
package/src/index.ts CHANGED
@@ -131,6 +131,11 @@ export * from "./components/ai-elements/voice-selector-accent";
131
131
  export * from "./components/ai-elements/voice-selector";
132
132
  export * from "./components/ai-elements/web-preview";
133
133
 
134
+ // ── Dashboard Components ──
135
+ // Compact presentation components for dashboard widgets and full plugin views.
136
+ // The discovery catalogue is exported separately from "@sero-ai/ui/dashboard-catalog".
137
+ export * from "./components/dashboard";
138
+
134
139
  // ── Model Selection Components ──
135
140
  export * from "./components/model-selection/available-model-picker";
136
141
  export * from "./components/model-selection/model-warning-list";
@@ -0,0 +1,15 @@
1
+ // Stable subpath for the reference dashboard widgets.
2
+ //
3
+ // import { SchedulerExample } from "@sero-ai/ui/reference";
4
+ //
5
+ // These are worked, glass-styled examples of the dashboard components —
6
+ // importable to preview, or copy-pasteable as a starting point for a real
7
+ // widget. Kept out of the main barrel so they don't ship with app bundles
8
+ // that only need the components.
9
+
10
+ export {
11
+ StarterExample,
12
+ SchedulerExample,
13
+ ResourceExample,
14
+ ActivityExample,
15
+ } from "./components/reference";
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Shared glass board — the frosted-board look, framework-agnostic.
3
+ *
4
+ * `.glass-canvas` paints the ambient accent-glow backdrop; `.glass-tile`
5
+ * is a translucent, backdrop-blurred surface with a luminous hairline rim.
6
+ * The desktop dashboard and the styleguide preview both consume this file
7
+ * so widgets render on an identical board.
8
+ *
9
+ * Depends on the canonical `--glass-*` tokens in globals.css. Dark is the
10
+ * primary target; light mirrors the same relationships (frosted white
11
+ * glass over a soft tinted canvas).
12
+ */
13
+
14
+ /* ── Canvas ──────────────────────────────────────────────────────
15
+ Ambient accent glow the glass tiles pick up. */
16
+ .glass-canvas {
17
+ --glass-canvas-base: #e9eaef;
18
+ --glass-glow-a: color-mix(in srgb, var(--accent-primary) 16%, transparent);
19
+ --glass-glow-b: color-mix(in srgb, var(--brand-primary) 12%, transparent);
20
+ background:
21
+ radial-gradient(90% 70% at 85% -10%, var(--glass-glow-a), transparent 60%),
22
+ radial-gradient(80% 60% at -10% 110%, var(--glass-glow-b), transparent 60%),
23
+ var(--glass-canvas-base);
24
+ }
25
+
26
+ .dark .glass-canvas {
27
+ --glass-canvas-base: #060608;
28
+ --glass-glow-a: color-mix(in srgb, var(--accent-primary) 48%, transparent);
29
+ --glass-glow-b: color-mix(in srgb, var(--brand-primary) 30%, transparent);
30
+ }
31
+
32
+ /* ── Glass tile surface ──────────────────────────────────────────
33
+ Translucent, blurred surface floating over the canvas. The surface is
34
+ static on hover — the tile is content, not a button, so pointing at it
35
+ must not change it. (`--glass-hover` is still used for row hover *inside*
36
+ widgets.) The transition covers the drag/resize state changes only. */
37
+ .glass-tile {
38
+ background: var(--glass-tile);
39
+ border: 1px solid var(--glass-border);
40
+ backdrop-filter: blur(24px) saturate(140%);
41
+ box-shadow: inset 0 1px 0 var(--glass-rim);
42
+ transition: background-color 150ms ease, border-color 150ms ease;
43
+ }
@@ -179,6 +179,27 @@
179
179
  --sidebar-accent-foreground: var(--text-primary);
180
180
  --sidebar-border: var(--border-subtle);
181
181
  --sidebar-ring: var(--border-focus);
182
+
183
+ /* ── Glass (dashboard) ────────────────────────────────────
184
+ Canonical translucent surface language for the glass
185
+ dashboard. The host `dashboard.css` derives its `--dash-*`
186
+ tokens from these, and the `.glass` scope below remaps the
187
+ component-facing `--surface-*` tokens to them. Light =
188
+ frosted white; dark values live in the `.dark` block. */
189
+ --glass-tile: rgba(255, 255, 255, 0.52); /* base tile (host) */
190
+ --glass-surface: rgba(255, 255, 255, 0.62); /* raised card */
191
+ --glass-surface-flat: rgba(255, 255, 255, 0.40); /* flat row */
192
+ --glass-border: rgba(15, 17, 23, 0.10);
193
+ --glass-rim: rgba(255, 255, 255, 0.60);
194
+ --glass-hover: rgba(255, 255, 255, 0.72);
195
+
196
+ /* Component-facing surface tokens. Default to the solid design
197
+ tokens so components look unchanged outside the `.glass`
198
+ scope; the scope flips them to the glass values above. */
199
+ --surface-raised: var(--bg-surface);
200
+ --surface-flat: var(--bg-elevated);
201
+ --surface-line: var(--border-subtle);
202
+ --surface-rim: transparent;
182
203
  }
183
204
 
184
205
  /* ── Scrollbars ─────────────────────────────────────────────── */
@@ -421,6 +442,44 @@
421
442
  --sidebar-accent-foreground: var(--text-primary);
422
443
  --sidebar-border: var(--border-subtle);
423
444
  --sidebar-ring: var(--border-focus);
445
+
446
+ /* ── Glass (dashboard) — dark: low-opacity white over the dark
447
+ canvas glow. `--surface-*` defaults stay solid; the `.glass`
448
+ scope flips them (values shared across themes via the vars). */
449
+ --glass-tile: rgba(255, 255, 255, 0.06);
450
+ --glass-surface: rgba(255, 255, 255, 0.09);
451
+ --glass-surface-flat: rgba(255, 255, 255, 0.05);
452
+ --glass-border: rgba(255, 255, 255, 0.12);
453
+ --glass-rim: rgba(255, 255, 255, 0.08);
454
+ --glass-hover: rgba(255, 255, 255, 0.13);
455
+ }
456
+
457
+ /* ── Glass scope ─────────────────────────────────────────────────
458
+ Subtree-local class applied by `WidgetContent` (default on). It
459
+ remaps the component-facing surface tokens and the container/border
460
+ shadcn bridge tokens to the translucent glass values, so dashboard
461
+ components read as part of the frosted tile. Interactive controls
462
+ (`--input`) and portalled surfaces (`--popover`, rendered at
463
+ document.body outside this scope) stay solid for legibility. No
464
+ `backdrop-filter` here — the host tile provides the single blur. */
465
+ .glass {
466
+ /* component surface tokens */
467
+ --surface-raised: var(--glass-surface);
468
+ --surface-flat: var(--glass-surface-flat);
469
+ --surface-line: var(--glass-border);
470
+ --surface-rim: var(--glass-rim);
471
+
472
+ /* containers + borders for primitives used inside widgets */
473
+ --card: var(--glass-surface);
474
+ --secondary: var(--glass-surface-flat);
475
+ --muted: var(--glass-surface-flat);
476
+ --accent: var(--glass-surface-flat);
477
+ --border: var(--glass-border);
478
+
479
+ /* keep interactive controls + portalled surfaces solid */
480
+ --input: var(--border-subtle);
481
+ --popover: var(--bg-elevated);
482
+ --ring: var(--border-focus);
424
483
  }
425
484
 
426
485
  html {
package/tsup.config.ts CHANGED
@@ -2,8 +2,12 @@ import { defineConfig } from "tsup";
2
2
  import { cpSync } from "node:fs";
3
3
 
4
4
  export default defineConfig({
5
- // Tells tsup to grab everything in your src directory
6
- entry: ["src/**/*.{ts,tsx}"],
5
+ // Tells tsup to grab everything in your src directory, except tests.
6
+ entry: [
7
+ "src/**/*.{ts,tsx}",
8
+ "!src/**/*.test.{ts,tsx}",
9
+ "!src/**/__tests__/**",
10
+ ],
7
11
  format: ["esm", "cjs"],
8
12
  dts: true,
9
13
  clean: true,
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from "vitest/config";
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ include: ["src/**/*.test.ts", "src/**/*.test.tsx"],
6
+ environment: "jsdom",
7
+ },
8
+ });