@sero-ai/ui 0.4.2 → 0.5.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.
@@ -1039,44 +1039,17 @@ function DataBoundary({
1039
1039
  }
1040
1040
  }
1041
1041
 
1042
- // src/components/ui/empty.tsx
1043
- var import_class_variance_authority5 = require("class-variance-authority");
1044
- var import_jsx_runtime15 = require("react/jsx-runtime");
1045
- var emptyMediaVariants = (0, import_class_variance_authority5.cva)(
1046
- "flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1047
- {
1048
- variants: {
1049
- variant: {
1050
- default: "bg-transparent",
1051
- icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
1052
- }
1053
- },
1054
- defaultVariants: {
1055
- variant: "default"
1056
- }
1057
- }
1058
- );
1059
-
1060
- // src/components/dashboard/empty-state.tsx
1061
- var import_jsx_runtime16 = require("react/jsx-runtime");
1062
-
1063
- // src/components/ui/skeleton.tsx
1064
- var import_jsx_runtime17 = require("react/jsx-runtime");
1065
-
1066
- // src/components/dashboard/skeletons.tsx
1067
- var import_jsx_runtime18 = require("react/jsx-runtime");
1068
-
1069
1042
  // src/components/reference/StarterExample.tsx
1070
- var import_jsx_runtime19 = require("react/jsx-runtime");
1043
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1071
1044
  var RECENT = [
1072
1045
  { id: "a", label: "Nightly build", timestamp: "12m", tone: "success" },
1073
1046
  { id: "b", label: "Deploy to staging", timestamp: "1h", tone: "info" },
1074
1047
  { id: "c", label: "Dependency audit", timestamp: "3h", tone: "neutral" }
1075
1048
  ];
1076
1049
  function StarterExample() {
1077
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Stack, { gap: "sm", children: [
1078
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Metric, { label: "Tasks done", value: 12, icon: import_lucide_react3.CheckCircle2, tone: "success" }),
1079
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Section, { heading: "Recent", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1050
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Stack, { gap: "sm", children: [
1051
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Metric, { label: "Tasks done", value: 12, icon: import_lucide_react3.CheckCircle2, tone: "success" }),
1052
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Section, { heading: "Recent", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1080
1053
  ActivityListItem,
1081
1054
  {
1082
1055
  tone: e.tone,
@@ -1090,21 +1063,21 @@ function StarterExample() {
1090
1063
 
1091
1064
  // src/components/reference/SchedulerExample.tsx
1092
1065
  var import_lucide_react4 = require("lucide-react");
1093
- var import_jsx_runtime20 = require("react/jsx-runtime");
1066
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1094
1067
  var UPCOMING = [
1095
1068
  { id: "a", label: "Daily backup", timestamp: "08:00", tone: "success" },
1096
1069
  { id: "b", label: "Publish report", timestamp: "in 2h", tone: "info" },
1097
1070
  { id: "c", label: "Rotate API keys", timestamp: "tomorrow", tone: "warning" }
1098
1071
  ];
1099
1072
  function SchedulerExample() {
1100
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Stack, { gap: "sm", children: [
1101
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Inline, { justify: "between", align: "center", children: [
1102
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Status, { tone: "success", pulse: true, children: "Scheduler active" }),
1103
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Stack, { gap: "sm", children: [
1074
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Inline, { justify: "between", align: "center", children: [
1075
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Status, { tone: "success", pulse: true, children: "Scheduler active" }),
1076
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
1104
1077
  ] }),
1105
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Section, { heading: "Summary", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Inline, { gap: "sm", wrap: true, children: [
1106
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MetricCard, { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Metric, { label: "Jobs", value: 6 }) }),
1107
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MetricCard, { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1078
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Section, { heading: "Summary", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Inline, { gap: "sm", wrap: true, children: [
1079
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MetricCard, { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Metric, { label: "Jobs", value: 6 }) }),
1080
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(MetricCard, { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1108
1081
  Metric,
1109
1082
  {
1110
1083
  label: "Runs today",
@@ -1113,16 +1086,16 @@ function SchedulerExample() {
1113
1086
  }
1114
1087
  ) })
1115
1088
  ] }) }),
1116
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Divider, {}),
1117
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1089
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Divider, {}),
1090
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1118
1091
  Section,
1119
1092
  {
1120
1093
  heading: "Next up",
1121
- action: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Button, { size: "xs", variant: "ghost", children: [
1122
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react4.ExternalLink, { className: "size-3" }),
1094
+ action: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Button, { size: "xs", variant: "ghost", children: [
1095
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react4.ExternalLink, { className: "size-3" }),
1123
1096
  "All"
1124
1097
  ] }),
1125
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DataBoundary, { state: "ready", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1098
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DataBoundary, { state: "ready", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1126
1099
  ActivityListItem,
1127
1100
  {
1128
1101
  tone: e.tone,
@@ -1133,42 +1106,42 @@ function SchedulerExample() {
1133
1106
  )) }) })
1134
1107
  }
1135
1108
  ),
1136
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StaleIndicator, { lastUpdated: "Updated 2m ago" })
1109
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(StaleIndicator, { lastUpdated: "Updated 2m ago" })
1137
1110
  ] }) });
1138
1111
  }
1139
1112
 
1140
1113
  // src/components/reference/ResourceExample.tsx
1141
- var import_jsx_runtime21 = require("react/jsx-runtime");
1114
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1142
1115
  function Ring({
1143
1116
  value,
1144
1117
  label,
1145
1118
  tone
1146
1119
  }) {
1147
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { gap: "xs", align: "center", children: [
1148
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ProgressRing, { value, label, tone }),
1149
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { variant: "muted", children: label })
1120
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Stack, { gap: "xs", align: "center", children: [
1121
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ProgressRing, { value, label, tone }),
1122
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text, { variant: "muted", children: label })
1150
1123
  ] });
1151
1124
  }
1152
1125
  function ResourceExample() {
1153
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WidgetContent, { scroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Stack, { gap: "sm", children: [
1154
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Heading, { level: 2, size: "md", children: "Resources" }),
1155
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(MetricGroup, { children: [
1156
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Metric, { label: "CPU", value: "42%", tone: "success" }),
1157
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Metric, { label: "Memory", value: "6.1 GB" }),
1158
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Metric, { label: "Disk", value: "71%", tone: "warning" })
1126
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(WidgetContent, { scroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Stack, { gap: "sm", children: [
1127
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Heading, { level: 2, size: "md", children: "Resources" }),
1128
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(MetricGroup, { children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Metric, { label: "CPU", value: "42%", tone: "success" }),
1130
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Metric, { label: "Memory", value: "6.1 GB" }),
1131
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Metric, { label: "Disk", value: "71%", tone: "warning" })
1159
1132
  ] }),
1160
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Divider, {}),
1161
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Section, { heading: "Usage", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Grid, { columns: 3, gap: "sm", children: [
1162
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Ring, { value: 42, label: "CPU", tone: "success" }),
1163
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Ring, { value: 61, label: "Memory", tone: "info" }),
1164
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Ring, { value: 71, label: "Disk", tone: "warning" })
1133
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Divider, {}),
1134
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Section, { heading: "Usage", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Grid, { columns: 3, gap: "sm", children: [
1135
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Ring, { value: 42, label: "CPU", tone: "success" }),
1136
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Ring, { value: 61, label: "Memory", tone: "info" }),
1137
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Ring, { value: 71, label: "Disk", tone: "warning" })
1165
1138
  ] }) }),
1166
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Divider, {}),
1167
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Section, { heading: "Host", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(KeyValueList, { children: [
1168
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(KeyValue, { label: "Region", value: "eu-west-1", mono: true }),
1169
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(KeyValue, { label: "Instance", value: "c7g.xlarge", mono: true }),
1170
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(KeyValue, { label: "Uptime", value: "14d 6h", mono: true }),
1171
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(KeyValue, { label: "Status", value: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Status, { tone: "success", children: "Healthy" }) })
1139
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Divider, {}),
1140
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Section, { heading: "Host", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(KeyValueList, { children: [
1141
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(KeyValue, { label: "Region", value: "eu-west-1", mono: true }),
1142
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(KeyValue, { label: "Instance", value: "c7g.xlarge", mono: true }),
1143
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(KeyValue, { label: "Uptime", value: "14d 6h", mono: true }),
1144
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(KeyValue, { label: "Status", value: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Status, { tone: "success", children: "Healthy" }) })
1172
1145
  ] }) })
1173
1146
  ] }) });
1174
1147
  }
@@ -1177,10 +1150,10 @@ function ResourceExample() {
1177
1150
  var import_lucide_react5 = require("lucide-react");
1178
1151
 
1179
1152
  // src/components/ui/badge.tsx
1180
- var import_class_variance_authority6 = require("class-variance-authority");
1153
+ var import_class_variance_authority5 = require("class-variance-authority");
1181
1154
  var import_radix_ui4 = require("radix-ui");
1182
- var import_jsx_runtime22 = require("react/jsx-runtime");
1183
- var badgeVariants = (0, import_class_variance_authority6.cva)(
1155
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1156
+ var badgeVariants = (0, import_class_variance_authority5.cva)(
1184
1157
  "inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
1185
1158
  {
1186
1159
  variants: {
@@ -1209,7 +1182,7 @@ function Badge({
1209
1182
  ...props
1210
1183
  }) {
1211
1184
  const Comp = asChild ? import_radix_ui4.Slot.Root : "span";
1212
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1185
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1213
1186
  Comp,
1214
1187
  {
1215
1188
  "data-slot": "badge",
@@ -1221,33 +1194,33 @@ function Badge({
1221
1194
  }
1222
1195
 
1223
1196
  // src/components/reference/ActivityExample.tsx
1224
- var import_jsx_runtime23 = require("react/jsx-runtime");
1197
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1225
1198
  var ITEMS = [
1226
1199
  { id: "1", title: "quarterly-report.pdf", meta: "2h", badge: "PDF" },
1227
1200
  { id: "2", title: "design-tokens.json", meta: "5h", badge: "JSON" },
1228
1201
  { id: "3", title: "release-notes.md", meta: "1d", badge: "MD" }
1229
1202
  ];
1230
1203
  function ActivityExample() {
1231
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Stack, { gap: "sm", fill: true, children: [
1232
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Inline, { justify: "between", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Inline, { gap: "xs", align: "center", children: [
1233
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Text, { variant: "label", children: "Recent files" }),
1234
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Badge, { variant: "info", children: ITEMS.length })
1204
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(WidgetContent, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Stack, { gap: "sm", fill: true, children: [
1205
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Inline, { justify: "between", align: "center", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Inline, { gap: "xs", align: "center", children: [
1206
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { variant: "label", children: "Recent files" }),
1207
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { variant: "info", children: ITEMS.length })
1235
1208
  ] }) }),
1236
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Stack, { gap: "none", scroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ItemList, { children: ITEMS.map((f) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1209
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Stack, { gap: "none", scroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ItemList, { children: ITEMS.map((f) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1237
1210
  ItemListItem,
1238
1211
  {
1239
- leading: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react5.FileText, { className: "size-4 text-[var(--text-muted)]" }),
1212
+ leading: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.FileText, { className: "size-4 text-[var(--text-muted)]" }),
1240
1213
  primary: f.title,
1241
- trailing: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Inline, { gap: "xs", align: "center", children: [
1242
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Badge, { variant: "secondary", children: f.badge }),
1243
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children: f.meta })
1214
+ trailing: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Inline, { gap: "xs", align: "center", children: [
1215
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Badge, { variant: "secondary", children: f.badge }),
1216
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: f.meta })
1244
1217
  ] })
1245
1218
  },
1246
1219
  f.id
1247
1220
  )) }) }),
1248
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Inline, { justify: "between", align: "center", children: [
1249
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Status, { tone: "info", variant: "pill", children: "Synced" }),
1250
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(StaleIndicator, { lastUpdated: "Synced 30s ago" })
1221
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Inline, { justify: "between", align: "center", children: [
1222
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Status, { tone: "info", variant: "pill", children: "Synced" }),
1223
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StaleIndicator, { lastUpdated: "Synced 30s ago" })
1251
1224
  ] })
1252
1225
  ] }) });
1253
1226
  }
package/dist/reference.js CHANGED
@@ -1010,44 +1010,17 @@ function DataBoundary({
1010
1010
  }
1011
1011
  }
1012
1012
 
1013
- // src/components/ui/empty.tsx
1014
- import { cva as cva5 } from "class-variance-authority";
1015
- import { jsx as jsx15 } from "react/jsx-runtime";
1016
- var emptyMediaVariants = cva5(
1017
- "flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0",
1018
- {
1019
- variants: {
1020
- variant: {
1021
- default: "bg-transparent",
1022
- icon: "bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-6"
1023
- }
1024
- },
1025
- defaultVariants: {
1026
- variant: "default"
1027
- }
1028
- }
1029
- );
1030
-
1031
- // src/components/dashboard/empty-state.tsx
1032
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
1033
-
1034
- // src/components/ui/skeleton.tsx
1035
- import { jsx as jsx17 } from "react/jsx-runtime";
1036
-
1037
- // src/components/dashboard/skeletons.tsx
1038
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
1039
-
1040
1013
  // src/components/reference/StarterExample.tsx
1041
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
1014
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
1042
1015
  var RECENT = [
1043
1016
  { id: "a", label: "Nightly build", timestamp: "12m", tone: "success" },
1044
1017
  { id: "b", label: "Deploy to staging", timestamp: "1h", tone: "info" },
1045
1018
  { id: "c", label: "Dependency audit", timestamp: "3h", tone: "neutral" }
1046
1019
  ];
1047
1020
  function StarterExample() {
1048
- return /* @__PURE__ */ jsx19(WidgetContent, { children: /* @__PURE__ */ jsxs12(Stack, { gap: "sm", children: [
1049
- /* @__PURE__ */ jsx19(Metric, { label: "Tasks done", value: 12, icon: CheckCircle2, tone: "success" }),
1050
- /* @__PURE__ */ jsx19(Section, { heading: "Recent", children: /* @__PURE__ */ jsx19(ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ jsx19(
1021
+ return /* @__PURE__ */ jsx15(WidgetContent, { children: /* @__PURE__ */ jsxs10(Stack, { gap: "sm", children: [
1022
+ /* @__PURE__ */ jsx15(Metric, { label: "Tasks done", value: 12, icon: CheckCircle2, tone: "success" }),
1023
+ /* @__PURE__ */ jsx15(Section, { heading: "Recent", children: /* @__PURE__ */ jsx15(ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ jsx15(
1051
1024
  ActivityListItem,
1052
1025
  {
1053
1026
  tone: e.tone,
@@ -1061,21 +1034,21 @@ function StarterExample() {
1061
1034
 
1062
1035
  // src/components/reference/SchedulerExample.tsx
1063
1036
  import { ExternalLink } from "lucide-react";
1064
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
1037
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
1065
1038
  var UPCOMING = [
1066
1039
  { id: "a", label: "Daily backup", timestamp: "08:00", tone: "success" },
1067
1040
  { id: "b", label: "Publish report", timestamp: "in 2h", tone: "info" },
1068
1041
  { id: "c", label: "Rotate API keys", timestamp: "tomorrow", tone: "warning" }
1069
1042
  ];
1070
1043
  function SchedulerExample() {
1071
- return /* @__PURE__ */ jsx20(WidgetContent, { children: /* @__PURE__ */ jsxs13(Stack, { gap: "sm", children: [
1072
- /* @__PURE__ */ jsxs13(Inline, { justify: "between", align: "center", children: [
1073
- /* @__PURE__ */ jsx20(Status, { tone: "success", pulse: true, children: "Scheduler active" }),
1074
- /* @__PURE__ */ jsx20(ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
1044
+ return /* @__PURE__ */ jsx16(WidgetContent, { children: /* @__PURE__ */ jsxs11(Stack, { gap: "sm", children: [
1045
+ /* @__PURE__ */ jsxs11(Inline, { justify: "between", align: "center", children: [
1046
+ /* @__PURE__ */ jsx16(Status, { tone: "success", pulse: true, children: "Scheduler active" }),
1047
+ /* @__PURE__ */ jsx16(ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
1075
1048
  ] }),
1076
- /* @__PURE__ */ jsx20(Section, { heading: "Summary", children: /* @__PURE__ */ jsxs13(Inline, { gap: "sm", wrap: true, children: [
1077
- /* @__PURE__ */ jsx20(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx20(Metric, { label: "Jobs", value: 6 }) }),
1078
- /* @__PURE__ */ jsx20(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx20(
1049
+ /* @__PURE__ */ jsx16(Section, { heading: "Summary", children: /* @__PURE__ */ jsxs11(Inline, { gap: "sm", wrap: true, children: [
1050
+ /* @__PURE__ */ jsx16(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx16(Metric, { label: "Jobs", value: 6 }) }),
1051
+ /* @__PURE__ */ jsx16(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx16(
1079
1052
  Metric,
1080
1053
  {
1081
1054
  label: "Runs today",
@@ -1084,16 +1057,16 @@ function SchedulerExample() {
1084
1057
  }
1085
1058
  ) })
1086
1059
  ] }) }),
1087
- /* @__PURE__ */ jsx20(Divider, {}),
1088
- /* @__PURE__ */ jsx20(
1060
+ /* @__PURE__ */ jsx16(Divider, {}),
1061
+ /* @__PURE__ */ jsx16(
1089
1062
  Section,
1090
1063
  {
1091
1064
  heading: "Next up",
1092
- action: /* @__PURE__ */ jsxs13(Button, { size: "xs", variant: "ghost", children: [
1093
- /* @__PURE__ */ jsx20(ExternalLink, { className: "size-3" }),
1065
+ action: /* @__PURE__ */ jsxs11(Button, { size: "xs", variant: "ghost", children: [
1066
+ /* @__PURE__ */ jsx16(ExternalLink, { className: "size-3" }),
1094
1067
  "All"
1095
1068
  ] }),
1096
- children: /* @__PURE__ */ jsx20(DataBoundary, { state: "ready", children: /* @__PURE__ */ jsx20(ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ jsx20(
1069
+ children: /* @__PURE__ */ jsx16(DataBoundary, { state: "ready", children: /* @__PURE__ */ jsx16(ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ jsx16(
1097
1070
  ActivityListItem,
1098
1071
  {
1099
1072
  tone: e.tone,
@@ -1104,42 +1077,42 @@ function SchedulerExample() {
1104
1077
  )) }) })
1105
1078
  }
1106
1079
  ),
1107
- /* @__PURE__ */ jsx20(StaleIndicator, { lastUpdated: "Updated 2m ago" })
1080
+ /* @__PURE__ */ jsx16(StaleIndicator, { lastUpdated: "Updated 2m ago" })
1108
1081
  ] }) });
1109
1082
  }
1110
1083
 
1111
1084
  // src/components/reference/ResourceExample.tsx
1112
- import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1085
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
1113
1086
  function Ring({
1114
1087
  value,
1115
1088
  label,
1116
1089
  tone
1117
1090
  }) {
1118
- return /* @__PURE__ */ jsxs14(Stack, { gap: "xs", align: "center", children: [
1119
- /* @__PURE__ */ jsx21(ProgressRing, { value, label, tone }),
1120
- /* @__PURE__ */ jsx21(Text, { variant: "muted", children: label })
1091
+ return /* @__PURE__ */ jsxs12(Stack, { gap: "xs", align: "center", children: [
1092
+ /* @__PURE__ */ jsx17(ProgressRing, { value, label, tone }),
1093
+ /* @__PURE__ */ jsx17(Text, { variant: "muted", children: label })
1121
1094
  ] });
1122
1095
  }
1123
1096
  function ResourceExample() {
1124
- return /* @__PURE__ */ jsx21(WidgetContent, { scroll: true, children: /* @__PURE__ */ jsxs14(Stack, { gap: "sm", children: [
1125
- /* @__PURE__ */ jsx21(Heading, { level: 2, size: "md", children: "Resources" }),
1126
- /* @__PURE__ */ jsxs14(MetricGroup, { children: [
1127
- /* @__PURE__ */ jsx21(Metric, { label: "CPU", value: "42%", tone: "success" }),
1128
- /* @__PURE__ */ jsx21(Metric, { label: "Memory", value: "6.1 GB" }),
1129
- /* @__PURE__ */ jsx21(Metric, { label: "Disk", value: "71%", tone: "warning" })
1097
+ return /* @__PURE__ */ jsx17(WidgetContent, { scroll: true, children: /* @__PURE__ */ jsxs12(Stack, { gap: "sm", children: [
1098
+ /* @__PURE__ */ jsx17(Heading, { level: 2, size: "md", children: "Resources" }),
1099
+ /* @__PURE__ */ jsxs12(MetricGroup, { children: [
1100
+ /* @__PURE__ */ jsx17(Metric, { label: "CPU", value: "42%", tone: "success" }),
1101
+ /* @__PURE__ */ jsx17(Metric, { label: "Memory", value: "6.1 GB" }),
1102
+ /* @__PURE__ */ jsx17(Metric, { label: "Disk", value: "71%", tone: "warning" })
1130
1103
  ] }),
1131
- /* @__PURE__ */ jsx21(Divider, {}),
1132
- /* @__PURE__ */ jsx21(Section, { heading: "Usage", children: /* @__PURE__ */ jsxs14(Grid, { columns: 3, gap: "sm", children: [
1133
- /* @__PURE__ */ jsx21(Ring, { value: 42, label: "CPU", tone: "success" }),
1134
- /* @__PURE__ */ jsx21(Ring, { value: 61, label: "Memory", tone: "info" }),
1135
- /* @__PURE__ */ jsx21(Ring, { value: 71, label: "Disk", tone: "warning" })
1104
+ /* @__PURE__ */ jsx17(Divider, {}),
1105
+ /* @__PURE__ */ jsx17(Section, { heading: "Usage", children: /* @__PURE__ */ jsxs12(Grid, { columns: 3, gap: "sm", children: [
1106
+ /* @__PURE__ */ jsx17(Ring, { value: 42, label: "CPU", tone: "success" }),
1107
+ /* @__PURE__ */ jsx17(Ring, { value: 61, label: "Memory", tone: "info" }),
1108
+ /* @__PURE__ */ jsx17(Ring, { value: 71, label: "Disk", tone: "warning" })
1136
1109
  ] }) }),
1137
- /* @__PURE__ */ jsx21(Divider, {}),
1138
- /* @__PURE__ */ jsx21(Section, { heading: "Host", children: /* @__PURE__ */ jsxs14(KeyValueList, { children: [
1139
- /* @__PURE__ */ jsx21(KeyValue, { label: "Region", value: "eu-west-1", mono: true }),
1140
- /* @__PURE__ */ jsx21(KeyValue, { label: "Instance", value: "c7g.xlarge", mono: true }),
1141
- /* @__PURE__ */ jsx21(KeyValue, { label: "Uptime", value: "14d 6h", mono: true }),
1142
- /* @__PURE__ */ jsx21(KeyValue, { label: "Status", value: /* @__PURE__ */ jsx21(Status, { tone: "success", children: "Healthy" }) })
1110
+ /* @__PURE__ */ jsx17(Divider, {}),
1111
+ /* @__PURE__ */ jsx17(Section, { heading: "Host", children: /* @__PURE__ */ jsxs12(KeyValueList, { children: [
1112
+ /* @__PURE__ */ jsx17(KeyValue, { label: "Region", value: "eu-west-1", mono: true }),
1113
+ /* @__PURE__ */ jsx17(KeyValue, { label: "Instance", value: "c7g.xlarge", mono: true }),
1114
+ /* @__PURE__ */ jsx17(KeyValue, { label: "Uptime", value: "14d 6h", mono: true }),
1115
+ /* @__PURE__ */ jsx17(KeyValue, { label: "Status", value: /* @__PURE__ */ jsx17(Status, { tone: "success", children: "Healthy" }) })
1143
1116
  ] }) })
1144
1117
  ] }) });
1145
1118
  }
@@ -1148,10 +1121,10 @@ function ResourceExample() {
1148
1121
  import { FileText } from "lucide-react";
1149
1122
 
1150
1123
  // src/components/ui/badge.tsx
1151
- import { cva as cva6 } from "class-variance-authority";
1124
+ import { cva as cva5 } from "class-variance-authority";
1152
1125
  import { Slot as Slot3 } from "radix-ui";
1153
- import { jsx as jsx22 } from "react/jsx-runtime";
1154
- var badgeVariants = cva6(
1126
+ import { jsx as jsx18 } from "react/jsx-runtime";
1127
+ var badgeVariants = cva5(
1155
1128
  "inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
1156
1129
  {
1157
1130
  variants: {
@@ -1180,7 +1153,7 @@ function Badge({
1180
1153
  ...props
1181
1154
  }) {
1182
1155
  const Comp = asChild ? Slot3.Root : "span";
1183
- return /* @__PURE__ */ jsx22(
1156
+ return /* @__PURE__ */ jsx18(
1184
1157
  Comp,
1185
1158
  {
1186
1159
  "data-slot": "badge",
@@ -1192,33 +1165,33 @@ function Badge({
1192
1165
  }
1193
1166
 
1194
1167
  // src/components/reference/ActivityExample.tsx
1195
- import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
1168
+ import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1196
1169
  var ITEMS = [
1197
1170
  { id: "1", title: "quarterly-report.pdf", meta: "2h", badge: "PDF" },
1198
1171
  { id: "2", title: "design-tokens.json", meta: "5h", badge: "JSON" },
1199
1172
  { id: "3", title: "release-notes.md", meta: "1d", badge: "MD" }
1200
1173
  ];
1201
1174
  function ActivityExample() {
1202
- return /* @__PURE__ */ jsx23(WidgetContent, { children: /* @__PURE__ */ jsxs15(Stack, { gap: "sm", fill: true, children: [
1203
- /* @__PURE__ */ jsx23(Inline, { justify: "between", align: "center", children: /* @__PURE__ */ jsxs15(Inline, { gap: "xs", align: "center", children: [
1204
- /* @__PURE__ */ jsx23(Text, { variant: "label", children: "Recent files" }),
1205
- /* @__PURE__ */ jsx23(Badge, { variant: "info", children: ITEMS.length })
1175
+ return /* @__PURE__ */ jsx19(WidgetContent, { children: /* @__PURE__ */ jsxs13(Stack, { gap: "sm", fill: true, children: [
1176
+ /* @__PURE__ */ jsx19(Inline, { justify: "between", align: "center", children: /* @__PURE__ */ jsxs13(Inline, { gap: "xs", align: "center", children: [
1177
+ /* @__PURE__ */ jsx19(Text, { variant: "label", children: "Recent files" }),
1178
+ /* @__PURE__ */ jsx19(Badge, { variant: "info", children: ITEMS.length })
1206
1179
  ] }) }),
1207
- /* @__PURE__ */ jsx23(Stack, { gap: "none", scroll: true, children: /* @__PURE__ */ jsx23(ItemList, { children: ITEMS.map((f) => /* @__PURE__ */ jsx23(
1180
+ /* @__PURE__ */ jsx19(Stack, { gap: "none", scroll: true, children: /* @__PURE__ */ jsx19(ItemList, { children: ITEMS.map((f) => /* @__PURE__ */ jsx19(
1208
1181
  ItemListItem,
1209
1182
  {
1210
- leading: /* @__PURE__ */ jsx23(FileText, { className: "size-4 text-[var(--text-muted)]" }),
1183
+ leading: /* @__PURE__ */ jsx19(FileText, { className: "size-4 text-[var(--text-muted)]" }),
1211
1184
  primary: f.title,
1212
- trailing: /* @__PURE__ */ jsxs15(Inline, { gap: "xs", align: "center", children: [
1213
- /* @__PURE__ */ jsx23(Badge, { variant: "secondary", children: f.badge }),
1214
- /* @__PURE__ */ jsx23("span", { children: f.meta })
1185
+ trailing: /* @__PURE__ */ jsxs13(Inline, { gap: "xs", align: "center", children: [
1186
+ /* @__PURE__ */ jsx19(Badge, { variant: "secondary", children: f.badge }),
1187
+ /* @__PURE__ */ jsx19("span", { children: f.meta })
1215
1188
  ] })
1216
1189
  },
1217
1190
  f.id
1218
1191
  )) }) }),
1219
- /* @__PURE__ */ jsxs15(Inline, { justify: "between", align: "center", children: [
1220
- /* @__PURE__ */ jsx23(Status, { tone: "info", variant: "pill", children: "Synced" }),
1221
- /* @__PURE__ */ jsx23(StaleIndicator, { lastUpdated: "Synced 30s ago" })
1192
+ /* @__PURE__ */ jsxs13(Inline, { justify: "between", align: "center", children: [
1193
+ /* @__PURE__ */ jsx19(Status, { tone: "info", variant: "pill", children: "Synced" }),
1194
+ /* @__PURE__ */ jsx19(StaleIndicator, { lastUpdated: "Synced 30s ago" })
1222
1195
  ] })
1223
1196
  ] }) });
1224
1197
  }
@@ -0,0 +1,2 @@
1
+ /* Import after plugin.css when a federated plugin uses @sero-ai/ui/ai-elements/*. */
2
+ @source "../components/ai-elements";
@@ -0,0 +1,2 @@
1
+ /* Import after plugin.css when a federated plugin uses components/context-editor/*. */
2
+ @source "../components/context-editor";
@@ -0,0 +1,2 @@
1
+ /* Import after plugin.css when a federated plugin uses @sero-ai/ui/model-selection/*. */
2
+ @source "../components/model-selection";
@@ -3,7 +3,10 @@
3
3
  @import "shadcn/tailwind.css";
4
4
  @import "./plugin-theme.css";
5
5
 
6
- @source "../components";
6
+ /* Match the lightweight package root. Specialized components opt into their
7
+ own source files through a matching stylesheet under styles/. */
8
+ @source "../components/ui";
9
+ @source "../components/dashboard";
7
10
 
8
11
  @custom-variant dark (&:is(.dark *));
9
12
 
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@sero-ai/ui",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Shared UI components, AI elements, and design tokens for the Sero platform",
5
5
  "type": "module",
6
+ "sideEffects": [
7
+ "**/*.css"
8
+ ],
6
9
  "main": "./dist/index.js",
7
10
  "types": "./dist/index.d.ts",
8
11
  "exports": {
@@ -11,6 +14,16 @@
11
14
  "import": "./dist/index.js",
12
15
  "require": "./dist/index.cjs"
13
16
  },
17
+ "./ai-elements/*": {
18
+ "types": "./dist/components/ai-elements/*.d.ts",
19
+ "import": "./dist/components/ai-elements/*.js",
20
+ "require": "./dist/components/ai-elements/*.cjs"
21
+ },
22
+ "./model-selection/*": {
23
+ "types": "./dist/components/model-selection/*.d.ts",
24
+ "import": "./dist/components/model-selection/*.js",
25
+ "require": "./dist/components/model-selection/*.cjs"
26
+ },
14
27
  "./dashboard-catalog.json": "./dist/components/dashboard/catalog.json",
15
28
  "./reference": {
16
29
  "types": "./dist/reference.d.ts",
@@ -40,48 +53,48 @@
40
53
  "react-dom": "^19.2.4"
41
54
  },
42
55
  "dependencies": {
43
- "@base-ui/react": "^1.3.0",
44
- "@headless-tree/core": "^1.6.3",
45
- "@headless-tree/react": "^1.6.3",
46
- "@radix-ui/react-use-controllable-state": "^1.2.2",
56
+ "@base-ui/react": "^1.6.0",
57
+ "@headless-tree/core": "^1.7.0",
58
+ "@headless-tree/react": "^1.7.0",
59
+ "@radix-ui/react-use-controllable-state": "^1.2.5",
47
60
  "@remixicon/react": "^4.9.0",
48
- "@rive-app/react-webgl2": "^4.27.1",
61
+ "@rive-app/react-webgl2": "^4.29.5",
49
62
  "@streamdown/cjk": "^1.0.2",
50
63
  "@streamdown/code": "^1.1.0",
51
64
  "@streamdown/math": "^1.0.2",
52
65
  "@streamdown/mermaid": "^1.0.2",
53
- "@xyflow/react": "^12.10.2",
66
+ "@xyflow/react": "^12.11.2",
54
67
  "ai": "^6.0.116",
55
68
  "ansi-to-react": "^6.2.6",
56
69
  "class-variance-authority": "^0.7.1",
57
70
  "clsx": "^2.1.1",
58
71
  "cmdk": "^1.1.1",
59
- "date-fns": "^4.1.0",
72
+ "date-fns": "^4.4.0",
60
73
  "embla-carousel-react": "^8.6.0",
61
74
  "input-otp": "^1.4.2",
62
- "lucide-react": "^0.563.0",
63
- "media-chrome": "^4.18.0",
75
+ "lucide-react": "^1.26.0",
76
+ "media-chrome": "^4.19.2",
64
77
  "motion": "^12.34.0",
65
78
  "nanoid": "^5.1.11",
66
79
  "next-themes": "^0.4.6",
67
- "radix-ui": "^1.4.3",
80
+ "radix-ui": "^1.6.5",
68
81
  "react-day-picker": "^9.14.0",
69
- "react-hook-form": "^7.71.2",
82
+ "react-hook-form": "^7.82.0",
70
83
  "react-jsx-parser": "^2.4.1",
71
- "react-resizable-panels": "^4.7.2",
84
+ "react-resizable-panels": "^4.12.2",
72
85
  "react-syntax-highlighter": "^16.1.1",
73
- "recharts": "3.9.2",
86
+ "recharts": "3.10.0",
74
87
  "shiki": "^3.23.0",
75
88
  "sonner": "^2.0.7",
76
89
  "streamdown": "^2.5.0",
77
- "tailwind-merge": "^3.5.0",
90
+ "tailwind-merge": "^3.6.0",
78
91
  "tokenlens": "^1.3.1",
79
- "use-stick-to-bottom": "^1.1.4",
92
+ "use-stick-to-bottom": "^1.1.6",
80
93
  "vaul": "^1.1.2",
81
- "@sero-ai/common": "0.3.1"
94
+ "@sero-ai/common": "0.8.0"
82
95
  },
83
96
  "devDependencies": {
84
- "@hookform/resolvers": "^5.2.2",
97
+ "@hookform/resolvers": "^5.4.0",
85
98
  "@types/react": "^19.2.13",
86
99
  "@types/react-dom": "^19.2.3",
87
100
  "@types/react-syntax-highlighter": "^15.5.13",
@@ -96,7 +109,7 @@
96
109
  "vitest": "^4.1.7"
97
110
  },
98
111
  "scripts": {
99
- "build": "tsup && tsup --config tsup.reference.config.ts",
112
+ "build": "tsup && tsup --config tsup.reference.config.ts && node scripts/smoke-dist.mjs",
100
113
  "typecheck": "tsc --noEmit",
101
114
  "test": "vitest run",
102
115
  "smoke": "node scripts/smoke-dist.mjs"