@sero-ai/ui 0.4.0 → 0.4.1

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 (60) hide show
  1. package/.turbo/turbo-build.log +311 -324
  2. package/CHANGELOG.md +22 -2
  3. package/LICENSE +201 -0
  4. package/dist/components/dashboard/catalog.cjs +1 -322
  5. package/dist/components/dashboard/catalog.d.cts +1 -2
  6. package/dist/components/dashboard/catalog.d.ts +1 -2
  7. package/dist/components/dashboard/catalog.js +0 -322
  8. package/dist/components/dashboard/catalog.json +312 -0
  9. package/dist/components/dashboard/index.d.cts +1 -1
  10. package/dist/components/dashboard/index.d.ts +1 -1
  11. package/dist/components/dashboard/status.cjs +6 -2
  12. package/dist/components/dashboard/status.js +7 -3
  13. package/dist/components/dashboard/tone.cjs +9 -1
  14. package/dist/components/dashboard/tone.d.cts +7 -1
  15. package/dist/components/dashboard/tone.d.ts +7 -1
  16. package/dist/components/dashboard/tone.js +8 -0
  17. package/dist/index.d.cts +2 -1
  18. package/dist/index.d.ts +2 -1
  19. package/dist/reference.cjs +1251 -3
  20. package/dist/reference.d.cts +11 -5
  21. package/dist/reference.d.ts +11 -5
  22. package/dist/reference.js +1224 -6
  23. package/package.json +52 -69
  24. package/scripts/ensure-pnpm-publish.mjs +23 -0
  25. package/scripts/smoke-dist.mjs +68 -0
  26. package/src/components/dashboard/__tests__/catalog.test.ts +7 -2
  27. package/src/components/dashboard/__tests__/state.test.tsx +19 -2
  28. package/src/components/dashboard/catalog.json +312 -0
  29. package/src/components/dashboard/catalog.ts +6 -328
  30. package/src/components/dashboard/index.ts +2 -2
  31. package/src/components/dashboard/status.tsx +15 -2
  32. package/src/components/dashboard/tone.ts +13 -0
  33. package/src/index.ts +3 -1
  34. package/tsup.config.ts +13 -3
  35. package/tsup.reference.config.ts +15 -0
  36. package/dist/components/reference/ActivityExample.cjs +0 -47
  37. package/dist/components/reference/ActivityExample.d.cts +0 -5
  38. package/dist/components/reference/ActivityExample.d.ts +0 -5
  39. package/dist/components/reference/ActivityExample.js +0 -47
  40. package/dist/components/reference/ResourceExample.cjs +0 -54
  41. package/dist/components/reference/ResourceExample.d.cts +0 -5
  42. package/dist/components/reference/ResourceExample.d.ts +0 -5
  43. package/dist/components/reference/ResourceExample.js +0 -54
  44. package/dist/components/reference/SchedulerExample.cjs +0 -68
  45. package/dist/components/reference/SchedulerExample.d.cts +0 -5
  46. package/dist/components/reference/SchedulerExample.d.ts +0 -5
  47. package/dist/components/reference/SchedulerExample.js +0 -68
  48. package/dist/components/reference/StarterExample.cjs +0 -34
  49. package/dist/components/reference/StarterExample.d.cts +0 -5
  50. package/dist/components/reference/StarterExample.d.ts +0 -5
  51. package/dist/components/reference/StarterExample.js +0 -34
  52. package/dist/components/reference/index.cjs +0 -10
  53. package/dist/components/reference/index.d.cts +0 -5
  54. package/dist/components/reference/index.d.ts +0 -5
  55. package/dist/components/reference/index.js +0 -10
  56. package/dist/dashboard-catalog.cjs +0 -8
  57. package/dist/dashboard-catalog.d.cts +0 -1
  58. package/dist/dashboard-catalog.d.ts +0 -1
  59. package/dist/dashboard-catalog.js +0 -8
  60. package/src/dashboard-catalog.ts +0 -13
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function ResourceExample(): react_jsx_runtime.JSX.Element;
4
-
5
- export { ResourceExample, ResourceExample as default };
@@ -1,54 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import {
3
- Divider,
4
- Grid,
5
- Heading,
6
- KeyValue,
7
- KeyValueList,
8
- Metric,
9
- MetricGroup,
10
- ProgressRing,
11
- Section,
12
- Stack,
13
- Status,
14
- Text,
15
- WidgetContent
16
- } from "../dashboard";
17
- function Ring({
18
- value,
19
- label,
20
- tone
21
- }) {
22
- return /* @__PURE__ */ jsxs(Stack, { gap: "xs", align: "center", children: [
23
- /* @__PURE__ */ jsx(ProgressRing, { value, label, tone }),
24
- /* @__PURE__ */ jsx(Text, { variant: "muted", children: label })
25
- ] });
26
- }
27
- function ResourceExample() {
28
- return /* @__PURE__ */ jsx(WidgetContent, { scroll: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
29
- /* @__PURE__ */ jsx(Heading, { level: 2, size: "md", children: "Resources" }),
30
- /* @__PURE__ */ jsxs(MetricGroup, { children: [
31
- /* @__PURE__ */ jsx(Metric, { label: "CPU", value: "42%", tone: "success" }),
32
- /* @__PURE__ */ jsx(Metric, { label: "Memory", value: "6.1 GB" }),
33
- /* @__PURE__ */ jsx(Metric, { label: "Disk", value: "71%", tone: "warning" })
34
- ] }),
35
- /* @__PURE__ */ jsx(Divider, {}),
36
- /* @__PURE__ */ jsx(Section, { heading: "Usage", children: /* @__PURE__ */ jsxs(Grid, { columns: 3, gap: "sm", children: [
37
- /* @__PURE__ */ jsx(Ring, { value: 42, label: "CPU", tone: "success" }),
38
- /* @__PURE__ */ jsx(Ring, { value: 61, label: "Memory", tone: "info" }),
39
- /* @__PURE__ */ jsx(Ring, { value: 71, label: "Disk", tone: "warning" })
40
- ] }) }),
41
- /* @__PURE__ */ jsx(Divider, {}),
42
- /* @__PURE__ */ jsx(Section, { heading: "Host", children: /* @__PURE__ */ jsxs(KeyValueList, { children: [
43
- /* @__PURE__ */ jsx(KeyValue, { label: "Region", value: "eu-west-1", mono: true }),
44
- /* @__PURE__ */ jsx(KeyValue, { label: "Instance", value: "c7g.xlarge", mono: true }),
45
- /* @__PURE__ */ jsx(KeyValue, { label: "Uptime", value: "14d 6h", mono: true }),
46
- /* @__PURE__ */ jsx(KeyValue, { label: "Status", value: /* @__PURE__ */ jsx(Status, { tone: "success", children: "Healthy" }) })
47
- ] }) })
48
- ] }) });
49
- }
50
- var ResourceExample_default = ResourceExample;
51
- export {
52
- ResourceExample,
53
- ResourceExample_default as default
54
- };
@@ -1,68 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
- var _lucidereact = require('lucide-react');
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
- var _dashboard = require('../dashboard');
18
- var _button = require('../ui/button');
19
- const UPCOMING = [
20
- { id: "a", label: "Daily backup", timestamp: "08:00", tone: "success" },
21
- { id: "b", label: "Publish report", timestamp: "in 2h", tone: "info" },
22
- { id: "c", label: "Rotate API keys", timestamp: "tomorrow", tone: "warning" }
23
- ];
24
- function SchedulerExample() {
25
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.WidgetContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dashboard.Stack, { gap: "sm", children: [
26
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dashboard.Inline, { justify: "between", align: "center", children: [
27
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Status, { tone: "success", pulse: true, children: "Scheduler active" }),
28
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
29
- ] }),
30
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Section, { heading: "Summary", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dashboard.Inline, { gap: "sm", wrap: true, children: [
31
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.MetricCard, { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Metric, { label: "Jobs", value: 6 }) }),
32
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.MetricCard, { className: "flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
33
- _dashboard.Metric,
34
- {
35
- label: "Runs today",
36
- value: 18,
37
- trend: { direction: "up", value: "+4", tone: "success" }
38
- }
39
- ) })
40
- ] }) }),
41
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Divider, {}),
42
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
43
- _dashboard.Section,
44
- {
45
- heading: "Next up",
46
- action: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _button.Button, { size: "xs", variant: "ghost", children: [
47
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "size-3" }),
48
- "All"
49
- ] }),
50
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.DataBoundary, { state: "ready", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
51
- _dashboard.ActivityListItem,
52
- {
53
- tone: e.tone,
54
- label: e.label,
55
- timestamp: e.timestamp
56
- },
57
- e.id
58
- )) }) })
59
- }
60
- ),
61
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.StaleIndicator, { lastUpdated: "Updated 2m ago" })
62
- ] }) });
63
- }
64
- var SchedulerExample_default = SchedulerExample;
65
-
66
-
67
-
68
- exports.SchedulerExample = SchedulerExample; exports.default = SchedulerExample_default;
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function SchedulerExample(): react_jsx_runtime.JSX.Element;
4
-
5
- export { SchedulerExample, SchedulerExample as default };
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function SchedulerExample(): react_jsx_runtime.JSX.Element;
4
-
5
- export { SchedulerExample, SchedulerExample as default };
@@ -1,68 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { ExternalLink } from "lucide-react";
3
- import {
4
- ActivityList,
5
- ActivityListItem,
6
- DataBoundary,
7
- Divider,
8
- Inline,
9
- Metric,
10
- MetricCard,
11
- ProgressRing,
12
- Section,
13
- Stack,
14
- StaleIndicator,
15
- Status,
16
- WidgetContent
17
- } from "../dashboard";
18
- import { Button } from "../ui/button";
19
- const UPCOMING = [
20
- { id: "a", label: "Daily backup", timestamp: "08:00", tone: "success" },
21
- { id: "b", label: "Publish report", timestamp: "in 2h", tone: "info" },
22
- { id: "c", label: "Rotate API keys", timestamp: "tomorrow", tone: "warning" }
23
- ];
24
- function SchedulerExample() {
25
- return /* @__PURE__ */ jsx(WidgetContent, { children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
26
- /* @__PURE__ */ jsxs(Inline, { justify: "between", align: "center", children: [
27
- /* @__PURE__ */ jsx(Status, { tone: "success", pulse: true, children: "Scheduler active" }),
28
- /* @__PURE__ */ jsx(ProgressRing, { value: 92, label: "Success rate", tone: "success", size: 40 })
29
- ] }),
30
- /* @__PURE__ */ jsx(Section, { heading: "Summary", children: /* @__PURE__ */ jsxs(Inline, { gap: "sm", wrap: true, children: [
31
- /* @__PURE__ */ jsx(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx(Metric, { label: "Jobs", value: 6 }) }),
32
- /* @__PURE__ */ jsx(MetricCard, { className: "flex-1", children: /* @__PURE__ */ jsx(
33
- Metric,
34
- {
35
- label: "Runs today",
36
- value: 18,
37
- trend: { direction: "up", value: "+4", tone: "success" }
38
- }
39
- ) })
40
- ] }) }),
41
- /* @__PURE__ */ jsx(Divider, {}),
42
- /* @__PURE__ */ jsx(
43
- Section,
44
- {
45
- heading: "Next up",
46
- action: /* @__PURE__ */ jsxs(Button, { size: "xs", variant: "ghost", children: [
47
- /* @__PURE__ */ jsx(ExternalLink, { className: "size-3" }),
48
- "All"
49
- ] }),
50
- children: /* @__PURE__ */ jsx(DataBoundary, { state: "ready", children: /* @__PURE__ */ jsx(ActivityList, { children: UPCOMING.map((e) => /* @__PURE__ */ jsx(
51
- ActivityListItem,
52
- {
53
- tone: e.tone,
54
- label: e.label,
55
- timestamp: e.timestamp
56
- },
57
- e.id
58
- )) }) })
59
- }
60
- ),
61
- /* @__PURE__ */ jsx(StaleIndicator, { lastUpdated: "Updated 2m ago" })
62
- ] }) });
63
- }
64
- var SchedulerExample_default = SchedulerExample;
65
- export {
66
- SchedulerExample,
67
- SchedulerExample_default as default
68
- };
@@ -1,34 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');
2
- var _lucidereact = require('lucide-react');
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
- var _dashboard = require('../dashboard');
11
- const RECENT = [
12
- { id: "a", label: "Nightly build", timestamp: "12m", tone: "success" },
13
- { id: "b", label: "Deploy to staging", timestamp: "1h", tone: "info" },
14
- { id: "c", label: "Dependency audit", timestamp: "3h", tone: "neutral" }
15
- ];
16
- function StarterExample() {
17
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.WidgetContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _dashboard.Stack, { gap: "sm", children: [
18
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Metric, { label: "Tasks done", value: 12, icon: _lucidereact.CheckCircle2, tone: "success" }),
19
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.Section, { heading: "Recent", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _dashboard.ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
20
- _dashboard.ActivityListItem,
21
- {
22
- tone: e.tone,
23
- label: e.label,
24
- timestamp: e.timestamp
25
- },
26
- e.id
27
- )) }) })
28
- ] }) });
29
- }
30
- var StarterExample_default = StarterExample;
31
-
32
-
33
-
34
- exports.StarterExample = StarterExample; exports.default = StarterExample_default;
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function StarterExample(): react_jsx_runtime.JSX.Element;
4
-
5
- export { StarterExample, StarterExample as default };
@@ -1,5 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- declare function StarterExample(): react_jsx_runtime.JSX.Element;
4
-
5
- export { StarterExample, StarterExample as default };
@@ -1,34 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { CheckCircle2 } from "lucide-react";
3
- import {
4
- ActivityList,
5
- ActivityListItem,
6
- Metric,
7
- Section,
8
- Stack,
9
- WidgetContent
10
- } from "../dashboard";
11
- const RECENT = [
12
- { id: "a", label: "Nightly build", timestamp: "12m", tone: "success" },
13
- { id: "b", label: "Deploy to staging", timestamp: "1h", tone: "info" },
14
- { id: "c", label: "Dependency audit", timestamp: "3h", tone: "neutral" }
15
- ];
16
- function StarterExample() {
17
- return /* @__PURE__ */ jsx(WidgetContent, { children: /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
18
- /* @__PURE__ */ jsx(Metric, { label: "Tasks done", value: 12, icon: CheckCircle2, tone: "success" }),
19
- /* @__PURE__ */ jsx(Section, { heading: "Recent", children: /* @__PURE__ */ jsx(ActivityList, { children: RECENT.map((e) => /* @__PURE__ */ jsx(
20
- ActivityListItem,
21
- {
22
- tone: e.tone,
23
- label: e.label,
24
- timestamp: e.timestamp
25
- },
26
- e.id
27
- )) }) })
28
- ] }) });
29
- }
30
- var StarterExample_default = StarterExample;
31
- export {
32
- StarterExample,
33
- StarterExample_default as default
34
- };
@@ -1,10 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _StarterExample = require('./StarterExample');
2
- var _SchedulerExample = require('./SchedulerExample');
3
- var _ResourceExample = require('./ResourceExample');
4
- var _ActivityExample = require('./ActivityExample');
5
-
6
-
7
-
8
-
9
-
10
- exports.ActivityExample = _ActivityExample.ActivityExample; exports.ResourceExample = _ResourceExample.ResourceExample; exports.SchedulerExample = _SchedulerExample.SchedulerExample; exports.StarterExample = _StarterExample.StarterExample;
@@ -1,5 +0,0 @@
1
- export { StarterExample } from './StarterExample.cjs';
2
- export { SchedulerExample } from './SchedulerExample.cjs';
3
- export { ResourceExample } from './ResourceExample.cjs';
4
- export { ActivityExample } from './ActivityExample.cjs';
5
- import 'react/jsx-runtime';
@@ -1,5 +0,0 @@
1
- export { StarterExample } from './StarterExample.js';
2
- export { SchedulerExample } from './SchedulerExample.js';
3
- export { ResourceExample } from './ResourceExample.js';
4
- export { ActivityExample } from './ActivityExample.js';
5
- import 'react/jsx-runtime';
@@ -1,10 +0,0 @@
1
- import { StarterExample } from "./StarterExample";
2
- import { SchedulerExample } from "./SchedulerExample";
3
- import { ResourceExample } from "./ResourceExample";
4
- import { ActivityExample } from "./ActivityExample";
5
- export {
6
- ActivityExample,
7
- ResourceExample,
8
- SchedulerExample,
9
- StarterExample
10
- };
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _catalog = require('./components/dashboard/catalog'); var _catalog2 = _interopRequireDefault(_catalog);
4
-
5
-
6
-
7
-
8
- exports.dashboardComponentCatalog = _catalog.dashboardComponentCatalog; exports.default = _catalog2.default;
@@ -1 +0,0 @@
1
- export { DashboardComponentCatalogEntry, dashboardComponentCatalog, dashboardComponentCatalog as default } from './components/dashboard/catalog.cjs';
@@ -1 +0,0 @@
1
- export { DashboardComponentCatalogEntry, dashboardComponentCatalog, dashboardComponentCatalog as default } from './components/dashboard/catalog.js';
@@ -1,8 +0,0 @@
1
- import {
2
- dashboardComponentCatalog
3
- } from "./components/dashboard/catalog";
4
- import { default as default2 } from "./components/dashboard/catalog";
5
- export {
6
- dashboardComponentCatalog,
7
- default2 as default
8
- };
@@ -1,13 +0,0 @@
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";