@momoi-labs/kiso-react 0.13.0 → 0.14.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/README.md CHANGED
@@ -83,6 +83,9 @@ Data and structure
83
83
  arrangement. Pass `layout="topbar"` for a single-surface frame with brand and
84
84
  primary action in the top bar and no sidebar rail.
85
85
  - Split, Pane, and Splitter, a list-detail layout with a resizable divider.
86
+ - PaneGrid and GridPane, summary panes on twelve columns that the reader
87
+ resizes at the end edge and moves by the title. `onLayoutChange` reports
88
+ the rows and sizes for the product to persist.
86
89
  - LogView, LogViewLine, LogViewTime, and LogViewLevel.
87
90
  - StepList, a run's steps with a state each, and StepBar, the same run as
88
91
  one segment per step for a summary, a table cell, or a toast.
package/dist/app-shell.js CHANGED
@@ -3,6 +3,7 @@
3
3
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  import * as React from "react";
5
5
  import { clsx as cn } from "clsx";
6
+ import { PanelLeftClose, PanelLeftOpen, PanelRight } from "lucide-react";
6
7
  import { Button } from "./button.js";
7
8
  import { Header } from "./header.js";
8
9
  import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
@@ -20,7 +21,7 @@ function AppShellPanel({ className, ...props }) {
20
21
  return _jsx("aside", { "data-slot": "app-shell-panel", className: cn("app-shell-panel", className), ...props });
21
22
  }
22
23
  function AppShellPanelToggle({ className, placement = "header", children, "aria-label": label, ...props }) {
23
- return _jsx(Button, { variant: "ghost", size: "sm", "data-slot": "app-shell-panel-toggle", "data-placement": placement, className: cn("app-shell-panel-toggle", className), "aria-label": label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), title: label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), ...props, children: children ?? _jsxs("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("rect", { x: "1.5", y: "2", width: "13", height: "12", rx: "1.5" }), _jsx("path", { d: "M10.5 2v12" })] }) });
24
+ return _jsx(Button, { variant: "ghost", size: "sm", "data-slot": "app-shell-panel-toggle", "data-placement": placement, className: cn("app-shell-panel-toggle", className), "aria-label": label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), title: label ?? (props["aria-expanded"] ? "Close panel" : "Open panel"), ...props, children: children ?? _jsx(PanelRight, { className: "icon", "aria-hidden": "true" }) });
24
25
  }
25
26
  function ApplicationShellNavigation({ navigation, navigationLabel, collapsible = false, }) {
26
27
  return (_jsx(Navigation, { "aria-label": navigationLabel, children: navigation.map((group, groupIndex) => (_jsx(NavigationGroup, { label: group.label, children: group.destinations.length > 0 ? (_jsx(NavigationList, { children: group.destinations.map((destination, destinationIndex) => (_jsx(NavigationItem, { children: _jsx(NavigationLink, { href: destination.href, active: destination.active, className: collapsible && destination.leading ? "sidebar-link-with-icon" : undefined, title: collapsible && typeof destination.label === "string" ? destination.label : undefined, onClick: (event) => {
@@ -56,7 +57,7 @@ function ApplicationShellSidebar({ brand, primaryAction, navigation, navigationL
56
57
  setInternalCollapsed(next);
57
58
  onCollapsedChange?.(next);
58
59
  }
59
- const toggle = collapsible ? (_jsx(Button, { ref: toggleRef, variant: "ghost", size: "sm", className: "sidebar-toggle btn-icon", "aria-controls": sidebarId, "aria-expanded": !isCollapsed, "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar", title: isCollapsed ? "Expand sidebar" : "Collapse sidebar", onClick: toggleSidebar, children: _jsxs("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("rect", { x: "1.5", y: "2", width: "13", height: "12", rx: "1.5" }), _jsx("path", { d: "M5.5 2v12" }), _jsx("path", { d: isCollapsed ? "m8.5 5.5 2.5 2.5-2.5 2.5" : "m11 5.5-2.5 2.5 2.5 2.5" })] }) })) : null;
60
+ const toggle = collapsible ? (_jsx(Button, { ref: toggleRef, variant: "ghost", size: "sm", className: "sidebar-toggle btn-icon", "aria-controls": sidebarId, "aria-expanded": !isCollapsed, "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar", title: isCollapsed ? "Expand sidebar" : "Collapse sidebar", onClick: toggleSidebar, children: isCollapsed ? _jsx(PanelLeftOpen, { className: "icon", "aria-hidden": "true" }) : _jsx(PanelLeftClose, { className: "icon", "aria-hidden": "true" }) })) : null;
60
61
  return (_jsxs(AppShell, { ...shellProps, children: [_jsxs(Sidebar, { ref: sidebarRef, id: sidebarId, collapsed: isCollapsed, children: [_jsx(SidebarHeader, { className: collapsible && togglePlacement === "sidebar" ? "sidebar-header-collapsible" : undefined, children: collapsible ? _jsxs(_Fragment, { children: [_jsxs("div", { className: "sidebar-expanded-content", children: [brand, primaryAction] }), togglePlacement === "sidebar" && toggle] }) : _jsxs(_Fragment, { children: [brand, primaryAction] }) }), _jsx(SidebarBody, { children: _jsx(ApplicationShellNavigation, { navigation: navigation, navigationLabel: navigationLabel, collapsible: collapsible }) }), footer && _jsx(SidebarFooter, { className: collapsible ? "sidebar-expanded-content" : undefined, children: footer })] }), _jsxs(AppShellMain, { children: [(header || (collapsible && togglePlacement === "header")) && _jsxs(Header, { variant: headerVariant, children: [togglePlacement === "header" && toggle, header] }), children] }), panel] }));
61
62
  }
62
63
  export { AppShell, AppShellMain, AppShellPanel, AppShellPanelToggle, ApplicationShell };
@@ -4,7 +4,7 @@ import { clsx as cn } from "clsx";
4
4
  import { chartColor, chartSlot, formatChartTime, formatChartValue, measured, seriesSummary, validateChart } from "./chart-data.js";
5
5
  export function ChartSeriesLabel({ series, index }) {
6
6
  const slot = chartSlot(series, index);
7
- return _jsxs("span", { className: "chart-series-label", children: [_jsx("svg", { "aria-hidden": "true", width: "28", height: "12", viewBox: "0 0 28 12", children: _jsx("path", { d: "M0 6H28", stroke: chartColor(slot), strokeWidth: "2" }) }), _jsxs("span", { children: [slot, ". ", series.label] })] });
7
+ return _jsxs("span", { className: "chart-series-label", children: [_jsx("svg", { className: "chart-series-swatch", "aria-hidden": "true", width: "28", height: "12", viewBox: "0 0 28 12", children: _jsx("path", { d: "M0 6H28", stroke: chartColor(slot), strokeWidth: "2" }) }), _jsxs("span", { children: [slot, ". ", series.label] })] });
8
8
  }
9
9
  export function ChartLegend({ data, series, label, formatValue = formatChartValue, variant = "table", activeTimestamp, formatTime = formatChartTime, highlightSeries, onHighlightSeriesChange, className, ...props }) {
10
10
  validateChart(data, series);
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { Line } from "recharts";
3
+ export type ChartStyle = "solid" | "pixel" | "halftone" | "rounded";
4
+ export declare function useChartStyle(ref: React.RefObject<HTMLElement | null>, override?: ChartStyle, mounted?: boolean): ChartStyle;
5
+ type CurveFactory = Exclude<NonNullable<React.ComponentProps<typeof Line>["type"]>, string>;
6
+ export declare const pixelCurve: CurveFactory;
7
+ export declare function ChartPattern({ id, color }: {
8
+ id: string;
9
+ color: string;
10
+ }): React.JSX.Element;
11
+ export declare function ChartDot({ cx, cy, r, fill, opacity, chartStyle }: {
12
+ cx?: number;
13
+ cy?: number;
14
+ r?: number;
15
+ fill?: string;
16
+ opacity?: number;
17
+ chartStyle: ChartStyle;
18
+ }): React.JSX.Element | null;
19
+ export {};
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ const chartStyles = ["solid", "pixel", "halftone", "rounded"];
5
+ // Geometry must update with a scoped appearance attribute, not just CSS paint.
6
+ export function useChartStyle(ref, override, mounted = true) {
7
+ const [inherited, setInherited] = React.useState("solid");
8
+ React.useLayoutEffect(() => {
9
+ if (override)
10
+ return;
11
+ const element = ref.current;
12
+ if (!element)
13
+ return;
14
+ const read = () => {
15
+ const style = getComputedStyle(element).getPropertyValue("--chart-style").trim();
16
+ setInherited(chartStyles.includes(style) ? style : "solid");
17
+ };
18
+ read();
19
+ const observer = new MutationObserver(read);
20
+ observer.observe(element.ownerDocument.documentElement, { attributes: true, subtree: true, attributeFilter: ["data-chart-style"] });
21
+ return () => observer.disconnect();
22
+ }, [ref, override, mounted]);
23
+ return override ?? inherited;
24
+ }
25
+ export const pixelCurve = context => {
26
+ let areaLine = NaN, count = 0, previousX = 0, previousY = 0;
27
+ return {
28
+ areaStart() { areaLine = 0; },
29
+ areaEnd() { areaLine = NaN; },
30
+ lineStart() { count = 0; },
31
+ lineEnd() {
32
+ if (areaLine || (areaLine !== 0 && count === 1))
33
+ context.closePath();
34
+ areaLine = 1 - areaLine;
35
+ },
36
+ point(x, y) {
37
+ if (count === 0) {
38
+ count = 1;
39
+ if (areaLine)
40
+ context.lineTo(x, y);
41
+ else
42
+ context.moveTo(x, y);
43
+ }
44
+ else {
45
+ count = 2;
46
+ const steps = Math.max(1, Math.ceil(Math.max(Math.abs(x - previousX), Math.abs(y - previousY)) / 4));
47
+ for (let step = 1; step <= steps; step++) {
48
+ const nextX = previousX + (x - previousX) * step / steps;
49
+ const nextY = previousY + (y - previousY) * step / steps;
50
+ context.lineTo(nextX, previousY + (y - previousY) * (step - 1) / steps);
51
+ context.lineTo(nextX, nextY);
52
+ }
53
+ }
54
+ previousX = x;
55
+ previousY = y;
56
+ },
57
+ };
58
+ };
59
+ export function ChartPattern({ id, color }) {
60
+ return _jsx("pattern", { id: id, width: 4, height: 4, patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: 1, cy: 1, r: 0.8, fill: color }) });
61
+ }
62
+ export function ChartDot({ cx, cy, r = 4, fill, opacity, chartStyle }) {
63
+ if (cx === undefined || cy === undefined)
64
+ return null;
65
+ return chartStyle === "pixel"
66
+ ? _jsx("rect", { x: cx - r, y: cy - r, width: 2 * r, height: 2 * r, fill: fill, opacity: opacity })
67
+ : _jsx("circle", { cx: cx, cy: cy, r: r, fill: fill, opacity: opacity });
68
+ }
package/dist/chart.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import { type ChartStyle } from "./chart-style.js";
2
3
  import { type ChartSample, type ChartSeries } from "./chart-data.js";
3
4
  export type { ChartSample, ChartSeries } from "./chart-data.js";
4
5
  export type ChartProps = Omit<React.ComponentProps<"figure">, "children"> & {
@@ -18,5 +19,6 @@ export type ChartProps = Omit<React.ComponentProps<"figure">, "children"> & {
18
19
  formatValue?: (value: number) => string;
19
20
  min?: number;
20
21
  max?: number;
22
+ chartStyle?: ChartStyle;
21
23
  };
22
- export declare function Chart({ data, series, label, variant, layout, legend, highlightSeries, onHighlightSeriesChange, height, syncId, formatTime, formatValue, min, max, className, ...props }: ChartProps): React.JSX.Element;
24
+ export declare function Chart({ data, series, label, variant, layout, legend, highlightSeries, onHighlightSeriesChange, height, syncId, formatTime, formatValue, min, max, chartStyle, ref, className, ...props }: ChartProps): React.JSX.Element;
package/dist/chart.js CHANGED
@@ -4,9 +4,12 @@ import * as React from "react";
4
4
  import { clsx as cn } from "clsx";
5
5
  import { Area, CartesianGrid, ComposedChart, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
6
6
  import { ChartLegend, ChartSeriesLabel } from "./chart-legend.js";
7
+ import { ChartDot, ChartPattern, pixelCurve, useChartStyle } from "./chart-style.js";
7
8
  import { chartColor, chartSlot, formatChartTime, formatChartValue, measured, validateChart } from "./chart-data.js";
8
- export function Chart({ data, series, label, variant = "line", layout = "standard", legend = "table", highlightSeries, onHighlightSeriesChange, height = layout === "compact" ? 165 : layout === "split" ? 90 : 200, syncId, formatTime = formatChartTime, formatValue = formatChartValue, min, max, className, ...props }) {
9
+ export function Chart({ data, series, label, variant = "line", layout = "standard", legend = "table", highlightSeries, onHighlightSeriesChange, height = layout === "compact" ? 165 : layout === "split" ? 90 : 200, syncId, formatTime = formatChartTime, formatValue = formatChartValue, min, max, chartStyle, ref, className, ...props }) {
9
10
  const id = React.useId();
11
+ const frame = React.useRef(null);
12
+ const treatment = useChartStyle(frame, chartStyle);
10
13
  const [localHighlight, setLocalHighlight] = React.useState(null);
11
14
  const [activeTimestamp, setActiveTimestamp] = React.useState(null);
12
15
  const requestedHighlight = highlightSeries === undefined ? localHighlight : highlightSeries;
@@ -44,26 +47,35 @@ export function Chart({ data, series, label, variant = "line", layout = "standar
44
47
  else
45
48
  splitMin -= Math.max(1, Math.abs(splitMin) * 0.1);
46
49
  }
47
- const renderPlot = (indices, lane) => _jsx("div", { className: "chart-plot", style: { height }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: plot, syncId: syncId ?? (layout === "split" ? id : undefined), syncMethod: "value", accessibilityLayer: true, "aria-label": lane ? `${label}: ${lane.label}` : label, "aria-describedby": `${id}-help`, margin: { top: 8, right: 12, bottom: 0, left: 0 }, children: [_jsx(CartesianGrid, { vertical: false, stroke: "var(--color-border)", strokeWidth: 0.5 }), _jsx(XAxis, { dataKey: "timestamp", type: "number", domain: ["dataMin", "dataMax"], scale: "time", axisLine: false, tickLine: false, tickFormatter: formatTime, minTickGap: 48, tick: { fill: "var(--color-muted-foreground)" } }), _jsx(YAxis, { domain: layout === "split" ? [splitMin, splitMax]
50
+ const renderPlot = (indices, lane) => _jsx("div", { className: "chart-plot", style: { height }, children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(ComposedChart, { data: plot, syncId: syncId ?? (layout === "split" ? id : undefined), syncMethod: "value", accessibilityLayer: true, "aria-label": lane ? `${label}: ${lane.label}` : label, "aria-describedby": `${id}-help`, margin: { top: 8, right: 12, bottom: 0, left: 0 }, children: [_jsx("defs", { children: indices.map(index => _jsx(ChartPattern, { id: `${id}-halftone-${index}`, color: chartColor(chartSlot(series[index], index)) }, series[index].key)) }), _jsx(CartesianGrid, { vertical: false, stroke: "var(--color-border)", strokeWidth: 0.5 }), _jsx(XAxis, { dataKey: "timestamp", type: "number", domain: ["dataMin", "dataMax"], scale: "time", axisLine: false, tickLine: false, tickFormatter: formatTime, minTickGap: 48, tick: { fill: "var(--color-muted-foreground)" } }), _jsx(YAxis, { domain: layout === "split" ? [splitMin, splitMax]
48
51
  : [min ?? (variant === "stacked-area" ? 0 : "auto"), max ?? "auto"], tickCount: 3, axisLine: false, tickLine: false, tickFormatter: formatValue, tick: { fill: "var(--color-muted-foreground)" }, width: 56 }), _jsx(Tooltip, { filterNull: false, isAnimationActive: false, cursor: { stroke: "var(--color-border-strong)", strokeDasharray: "3 3" }, content: ({ active, label: timestamp }) => _jsx(ChartReadout, { active: active, timestamp: Number(timestamp), data: data, series: series, formatTime: formatTime, displayValue: displayValue, sidebar: legend === "sidebar", onInspect: legend === "sidebar" && (!lane || indices[0] === 0) ? setActiveTimestamp : undefined }) }), indices.map(index => {
49
52
  const item = series[index];
50
53
  const slot = chartSlot(item, index);
51
54
  const dimmed = highlighted !== null && item.key !== highlighted;
52
55
  const common = { dataKey: `values.${index}`, name: item.label, stroke: chartColor(slot),
53
- strokeWidth: item.key === highlighted ? 2.2 : 1.5, strokeOpacity: dimmed ? 0.3 : 1,
56
+ strokeWidth: item.key === highlighted ? (treatment === "pixel" || treatment === "rounded" ? 2.7 : 2.2) : treatment === "pixel" || treatment === "rounded" ? 2 : 1.5,
57
+ strokeOpacity: dimmed ? 0.3 : 1, strokeLinecap: treatment === "rounded" ? "round" : "butt",
58
+ strokeLinejoin: treatment === "rounded" ? "round" : "miter",
54
59
  connectNulls: false, isAnimationActive: false,
55
60
  dot: (dotProps) => {
56
61
  const at = dotProps.index ?? -1;
57
62
  const isolated = measured(plot[at]?.values[index])
58
63
  && !measured(plot[at - 1]?.values[index]) && !measured(plot[at + 1]?.values[index]);
59
- return _jsx("circle", { cx: dotProps.cx, cy: dotProps.cy, r: isolated ? 3 : 0, fill: chartColor(slot), opacity: dimmed ? 0.3 : 1 }, at);
60
- }, activeDot: { r: 4 } };
61
- return variant === "stacked-area"
62
- ? _jsx(Area, { ...common, type: "linear", stackId: "total", fill: chartColor(slot), fillOpacity: dimmed ? 0.06 : 0.2 }, item.key)
63
- : _jsx(Line, { ...common, type: "linear" }, item.key);
64
+ return _jsx(ChartDot, { cx: dotProps.cx, cy: dotProps.cy, r: isolated ? 3 : 0, chartStyle: treatment, fill: chartColor(slot), opacity: dimmed ? 0.3 : 1 }, at);
65
+ }, activeDot: (dotProps) => _jsx(ChartDot, { ...dotProps, chartStyle: treatment, fill: chartColor(slot), opacity: dimmed ? 0.3 : 1 }) };
66
+ const curve = treatment === "pixel" ? pixelCurve : treatment === "rounded" && variant === "line" ? "monotone" : "linear";
67
+ return variant === "stacked-area" || treatment === "halftone"
68
+ ? _jsx(Area, { ...common, type: curve, stackId: variant === "stacked-area" ? "total" : undefined, fill: treatment === "halftone" ? `url(#${id}-halftone-${index})` : chartColor(slot), fillOpacity: dimmed ? 0.06 : 0.2 }, item.key)
69
+ : _jsx(Line, { ...common, type: curve }, item.key);
64
70
  })] }) }) });
65
71
  const legendContent = _jsx(ChartLegend, { data: data, series: series, label: `${label}: summary`, variant: legend, formatValue: formatValue, formatTime: formatTime, activeTimestamp: legend === "sidebar" && hasData ? activeTimestamp : null, highlightSeries: highlighted, onHighlightSeriesChange: highlight });
66
- return _jsxs("figure", { ...props, "data-slot": "chart", "data-layout": layout, "data-legend": legend, className: cn("framed-chart", className), "aria-labelledby": `${id}-title`, children: [_jsx("figcaption", { id: `${id}-title`, className: "t-h3", children: label }), _jsx("p", { id: `${id}-help`, className: "chart-help", children: "Focus the chart and use Left and Right to inspect samples. Select a series in the legend to highlight it. Exact values are available below." }), _jsxs("div", { className: "chart-body", children: [_jsx("div", { className: "chart-plots", children: hasData ? layout === "split" ? series.map((item, index) => _jsxs("div", { className: "chart-lane", children: [_jsxs("div", { className: "chart-lane-heading", children: [_jsx(ChartSeriesLabel, { series: item, index: index }), _jsx("span", { children: displayValue(data.at(-1)?.values[item.key]) })] }), renderPlot([index], item)] }, item.key)) : renderPlot(series.map((_, index) => index))
72
+ return _jsxs("figure", { ...props, ref: element => {
73
+ frame.current = element;
74
+ if (typeof ref === "function")
75
+ return ref(element);
76
+ if (ref)
77
+ ref.current = element;
78
+ }, "data-slot": "chart", "data-layout": layout, "data-legend": legend, "data-chart-treatment": treatment, className: cn("framed-chart", className), "aria-labelledby": `${id}-title`, children: [_jsx("figcaption", { id: `${id}-title`, className: "t-h3", children: label }), _jsx("p", { id: `${id}-help`, className: "chart-help", children: "Focus the chart and use Left and Right to inspect samples. Select a series in the legend to highlight it. Exact values are available below." }), _jsxs("div", { className: "chart-body", children: [_jsx("div", { className: "chart-plots", children: hasData ? layout === "split" ? series.map((item, index) => _jsxs("div", { className: "chart-lane", children: [_jsxs("div", { className: "chart-lane-heading", children: [_jsx(ChartSeriesLabel, { series: item, index: index }), _jsx("span", { children: displayValue(data.at(-1)?.values[item.key]) })] }), renderPlot([index], item)] }, item.key)) : renderPlot(series.map((_, index) => index))
67
79
  : _jsx("div", { className: "chart-empty hatch", style: { minHeight: height }, children: "No collected samples in this window." }) }), legend === "sidebar" && legendContent] }), legend !== "sidebar" && legendContent, _jsxs("details", { className: "disclosure chart-values", children: [_jsx("summary", { children: "View exact values" }), _jsx("div", { className: "chart-table-scroll", children: _jsxs("table", { className: "chart-table", children: [_jsxs("caption", { children: [label, ": collected samples, timestamps in UTC"] }), _jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { scope: "col", children: "Timestamp" }), series.map(item => _jsx("th", { scope: "col", children: item.label }, item.key))] }) }), _jsx("tbody", { children: data.map(sample => _jsxs("tr", { children: [_jsx("th", { scope: "row", children: formatChartTime(sample.timestamp) }), series.map(item => _jsx("td", { children: measured(sample.values[item.key]) ? String(sample.values[item.key]) : "Not collected" }, item.key))] }, sample.timestamp)) })] }) })] })] });
68
80
  }
69
81
  // Observe Recharts' synchronized tooltip state after render. This keeps the
@@ -2,6 +2,7 @@
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { clsx as cn } from "clsx";
5
+ import { Check, X } from "lucide-react";
5
6
  // One field holding several structured values. The component owns the box, the
6
7
  // chips, and the combobox keys; the product owns what a chip means, which
7
8
  // suggestions match, and which options a chip accepts.
@@ -188,7 +189,7 @@ function EditableSegment({ slot, className, value, placeholder, display, onCommi
188
189
  event.preventDefault();
189
190
  restoreSegmentFocus(editorRef.current);
190
191
  commit(draft);
191
- }, children: _jsx(CheckIcon, {}) })] }));
192
+ }, children: _jsx(Check, { className: "icon", "aria-hidden": "true" }) })] }));
192
193
  }
193
194
  return (_jsx("button", { type: "button", "data-slot": slot, "data-empty": value ? undefined : "true", className: cn(className), "aria-label": editLabel, onClick: () => setDraft(value), ...props, children: value ? (display ?? value) : placeholder }));
194
195
  }
@@ -224,12 +225,6 @@ function ChipRemove({ className, onClick, ...props }) {
224
225
  root?.querySelector('[data-slot="chip-input-field"]')?.focus();
225
226
  }
226
227
  });
227
- }, children: _jsx(CloseIcon, {}) }));
228
- }
229
- function CheckIcon() {
230
- return (_jsx("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "m3.5 8.5 3 3 6-7" }) }));
231
- }
232
- function CloseIcon() {
233
- return (_jsx("svg", { className: "icon", viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }));
228
+ }, children: _jsx(X, { className: "icon", "aria-hidden": "true" }) }));
234
229
  }
235
230
  export { Chip, ChipInput, ChipInputBox, ChipInputEmpty, ChipInputField, ChipInputList, ChipInputOption, ChipName, ChipOption, ChipOptionAdd, ChipRemove, ChipScope, ChipValue, };
@@ -2,6 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { clsx as cn } from "clsx";
5
+ import { Search } from "lucide-react";
5
6
  import { Dialog as DialogPrimitive, VisuallyHidden } from "radix-ui";
6
7
  import { DialogOverlay, DialogPortal } from "./dialog.js";
7
8
  // The palette owns its overlay, focus, and in-palette keys. Matching is the
@@ -60,7 +61,7 @@ function CommandPaletteInput({ className, onKeyDown, onCompositionStart, onCompo
60
61
  }
61
62
  onKeyDown?.(event);
62
63
  }
63
- return (_jsxs("div", { className: "palette-input", "data-slot": "command-palette-input", children: [_jsxs("svg", { className: "icon muted", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", "aria-hidden": "true", children: [_jsx("circle", { cx: "7", cy: "7", r: "4.5" }), _jsx("path", { d: "m10.5 10.5 3 3" })] }), _jsx("input", { role: "combobox", "aria-expanded": "true", "aria-controls": listId, "aria-activedescendant": activeId || undefined, "aria-autocomplete": "list", autoComplete: "off", autoFocus: true, onKeyDown: move, onCompositionStart: (event) => {
64
+ return (_jsxs("div", { className: "palette-input", "data-slot": "command-palette-input", children: [_jsx(Search, { className: "icon muted", "aria-hidden": "true" }), _jsx("input", { role: "combobox", "aria-expanded": "true", "aria-controls": listId, "aria-activedescendant": activeId || undefined, "aria-autocomplete": "list", autoComplete: "off", autoFocus: true, onKeyDown: move, onCompositionStart: (event) => {
64
65
  composing.current = true;
65
66
  onCompositionStart?.(event);
66
67
  }, onCompositionEnd: (event) => {
@@ -0,0 +1,24 @@
1
+ import * as React from "react";
2
+ export type DetailSelectOption = {
3
+ value: string;
4
+ label: string;
5
+ icon?: React.ReactNode;
6
+ illustration: React.ReactNode;
7
+ description: React.ReactNode;
8
+ disabled?: boolean;
9
+ };
10
+ export type DetailSelectProps = {
11
+ label: string;
12
+ options: readonly DetailSelectOption[];
13
+ value?: string;
14
+ defaultValue?: string;
15
+ onValueChange?: (value: string) => void;
16
+ placeholder?: string;
17
+ disabled?: boolean;
18
+ controlSize?: "sm" | "md" | "lg" | "xl";
19
+ id?: string;
20
+ className?: string;
21
+ "aria-describedby"?: string;
22
+ "aria-invalid"?: React.AriaAttributes["aria-invalid"];
23
+ };
24
+ export declare function DetailSelect({ label, options, value, defaultValue, onValueChange, placeholder, disabled, controlSize, id, className, "aria-describedby": describedBy, "aria-invalid": invalid }: DetailSelectProps): React.JSX.Element;
@@ -0,0 +1,56 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { clsx as cn } from "clsx";
5
+ import { Check } from "lucide-react";
6
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
7
+ export function DetailSelect({ label, options, value, defaultValue, onValueChange, placeholder = "Choose an option", disabled, controlSize, id, className, "aria-describedby": describedBy, "aria-invalid": invalid }) {
8
+ const generatedId = React.useId();
9
+ const triggerId = id ?? generatedId;
10
+ const [localValue, setLocalValue] = React.useState(defaultValue);
11
+ const [open, setOpen] = React.useState(false);
12
+ const selected = value === undefined ? localValue : value;
13
+ const current = options.find(option => option.value === selected);
14
+ const buttons = React.useRef([]);
15
+ const choose = (option, close = true) => {
16
+ if (value === undefined)
17
+ setLocalValue(option.value);
18
+ if (option.value !== selected)
19
+ onValueChange?.(option.value);
20
+ if (close)
21
+ setOpen(false);
22
+ };
23
+ return _jsxs("div", { "data-slot": "detail-select", className: cn("detail-select", className), children: [_jsx("label", { id: `${triggerId}-label`, htmlFor: triggerId, className: "t-label", children: label }), _jsxs(Popover, { open: open && !disabled, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { id: triggerId, type: "button", disabled: disabled, "data-control-size": controlSize, className: "select detail-select-trigger", "aria-labelledby": `${triggerId}-label ${triggerId}-value`, "aria-describedby": describedBy, "aria-invalid": invalid, onKeyDown: event => {
24
+ if (event.key !== "ArrowDown" && event.key !== "ArrowUp")
25
+ return;
26
+ event.preventDefault();
27
+ setOpen(true);
28
+ }, children: [current?.icon && _jsx("span", { className: "detail-select-icon", "aria-hidden": "true", children: current.icon }), _jsx("span", { id: `${triggerId}-value`, children: current?.label ?? placeholder })] }) }), _jsx(PopoverContent, { className: "detail-select-content", "aria-label": `${label}: options`, collisionPadding: 16, onOpenAutoFocus: event => {
29
+ const index = options.findIndex(option => option.value === selected && !option.disabled);
30
+ const target = buttons.current[index] ?? buttons.current.find(button => button && !button.disabled);
31
+ if (target) {
32
+ event.preventDefault();
33
+ target.focus();
34
+ }
35
+ }, children: options.length ? options.map((option, index) => _jsxs("section", { className: "detail-select-option", "data-selected": option.value === selected || undefined, "data-disabled": option.disabled || undefined, onClick: event => {
36
+ if (option.disabled || event.defaultPrevented || !(event.target instanceof Element))
37
+ return;
38
+ const interactive = event.target.closest("a, button, input, select, textarea, summary, label, [contenteditable], [role=button], [role=link], [role=checkbox], [role=radio], [role=switch], [role=slider], [role=combobox]");
39
+ if (!interactive || !event.currentTarget.contains(interactive))
40
+ choose(option);
41
+ }, "aria-labelledby": `${triggerId}-option-${index}`, children: [_jsx("div", { className: "detail-select-illustration", children: option.illustration }), _jsxs("div", { className: "detail-select-body", children: [_jsx("h3", { className: "detail-select-heading", children: _jsxs("button", { id: `${triggerId}-option-${index}`, type: "button", className: "detail-select-choice", ref: element => { buttons.current[index] = element; }, disabled: option.disabled, "aria-pressed": option.value === selected, "aria-describedby": `${triggerId}-description-${index}`, onClick: () => choose(option), onKeyDown: event => {
42
+ if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key))
43
+ return;
44
+ const enabled = options.map((option, index) => ({ option, button: buttons.current[index] }))
45
+ .filter(item => item.button && !item.option.disabled);
46
+ const position = enabled.findIndex(item => item.button === event.currentTarget);
47
+ const next = event.key === "Home" ? 0 : event.key === "End" ? enabled.length - 1
48
+ : (position + (event.key === "ArrowDown" ? 1 : -1) + enabled.length) % enabled.length;
49
+ const target = enabled[next];
50
+ if (target) {
51
+ target.button?.focus();
52
+ choose(target.option, false);
53
+ }
54
+ event.preventDefault();
55
+ }, children: [_jsx("span", { children: option.label }), option.value === selected && _jsx(Check, { className: "icon icon-sm", "aria-hidden": "true" })] }) }), _jsx("div", { id: `${triggerId}-description-${index}`, className: "detail-select-description", children: option.description })] })] }, option.value)) : _jsx("p", { className: "detail-select-empty", children: "No available options." }) })] })] });
56
+ }
@@ -0,0 +1,54 @@
1
+ import * as React from "react";
2
+ import { type LucideIcon } from "lucide-react";
3
+ export type DiagramKind = "route" | "service" | "repository" | "image" | "database";
4
+ export type DiagramBackground = "solid" | "dots" | "grid" | "crosses" | "construction" | "guides" | "fibers";
5
+ export type DiagramStatus = "stopped" | "failed";
6
+ export type DiagramEdgeLine = "solid" | "dashed" | "dotted";
7
+ export type DiagramEdgeTone = "neutral" | "success" | "danger";
8
+ export type DiagramBorderStyle = "solid" | "none" | "rail" | "dash" | "bevel" | "double" | "base" | "offset" | "manga" | "brush";
9
+ export type DiagramCornerStyle = "square" | "rounded" | "asym" | "pixel";
10
+ export type DiagramCornerSize = "off" | "small" | "medium" | "large";
11
+ export type DiagramCornerMarks = "none" | "ticks" | "brackets" | "arcs" | "diagonal" | "dots";
12
+ export type DiagramFrameProps = {
13
+ borderStyle?: DiagramBorderStyle;
14
+ cornerStyle?: DiagramCornerStyle;
15
+ cornerSize?: DiagramCornerSize;
16
+ cornerMarks?: DiagramCornerMarks;
17
+ };
18
+ export type DiagramProps = Omit<React.ComponentProps<"div">, "children"> & DiagramFrameProps & {
19
+ /** Names the drawing for assistive technology. */
20
+ label: string;
21
+ /** Unset follows the page's canvas; a page with no canvas gets dots. */
22
+ background?: DiagramBackground;
23
+ strength?: "quiet" | "visible";
24
+ children: React.ReactNode;
25
+ };
26
+ declare function Diagram({ label, background, strength, borderStyle, cornerStyle, cornerSize, cornerMarks, className, children, ...props }: DiagramProps): React.JSX.Element;
27
+ declare function DiagramColumn({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
28
+ export type DiagramNodeProps = Omit<React.ComponentProps<"div">, "title" | "children"> & DiagramFrameProps & {
29
+ /** Edges refer to the node by this id. Unique within the Diagram. */
30
+ id: string;
31
+ /** The name in weight. It never wraps. */
32
+ title: string;
33
+ /** Default icon, label and tone. `icon` and `label` override it. */
34
+ kind?: DiagramKind;
35
+ icon?: LucideIcon;
36
+ label?: string;
37
+ /** Marks the node the screen is about. */
38
+ accent?: boolean;
39
+ status?: DiagramStatus;
40
+ /** Free text under the title. Line breaks are kept. */
41
+ children?: React.ReactNode;
42
+ };
43
+ declare function DiagramNode({ id, title, kind, icon, label, accent, status, borderStyle, cornerStyle, cornerSize, cornerMarks, className, children, ...props }: DiagramNodeProps): React.JSX.Element;
44
+ export type DiagramEdgeProps = {
45
+ /** One source id, or several that merge into the target. */
46
+ from: string | string[];
47
+ to: string;
48
+ /** Mono text on the run into the target, such as a port or a variable. */
49
+ label?: string;
50
+ line?: DiagramEdgeLine;
51
+ tone?: DiagramEdgeTone;
52
+ };
53
+ declare function DiagramEdge({ from, to, label, line, tone }: DiagramEdgeProps): null;
54
+ export { Diagram, DiagramColumn, DiagramNode, DiagramEdge };
@@ -0,0 +1,136 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { clsx as cn } from "clsx";
4
+ import { Container, Database, GitBranch, Route, Server } from "lucide-react";
5
+ import { Card } from "./card.js";
6
+ import { StatusBadge } from "./status-badge.js";
7
+ import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
8
+ const DiagramContext = React.createContext(null);
9
+ function useRegistry(part) {
10
+ const registry = React.useContext(DiagramContext);
11
+ if (!registry)
12
+ throw new Error(`${part} must be inside <Diagram>`);
13
+ return registry;
14
+ }
15
+ /* Each kind carries its default label, icon and tone. The tone colours the
16
+ rail and the icon; the frame stays neutral so the kind reads at a glance
17
+ without turning the node into a status. */
18
+ const kinds = {
19
+ route: { label: "Route", tone: "neutral", icon: Route },
20
+ service: { label: "Service", tone: "primary", icon: Server },
21
+ repository: { label: "Git repository", tone: "primary", icon: GitBranch },
22
+ image: { label: "Container image", tone: "primary", icon: Container },
23
+ database: { label: "Database", tone: "info", icon: Database },
24
+ };
25
+ const statuses = {
26
+ stopped: { label: "Stopped", tone: "neutral" },
27
+ failed: { label: "Failed", tone: "danger" },
28
+ };
29
+ const RADIUS = 8;
30
+ /* An edge is two paths. The trunk is the horizontal run out of the source,
31
+ shared by every edge that leaves it, so it is always drawn solid and
32
+ neutral: two styles on one line would paint over each other. The branch
33
+ is the rest, the turn onto the merge column, the vertical run and the
34
+ straight run into the target, and it carries the edge's line and tone. */
35
+ function elbow(sx, sy, tx, ty, mid) {
36
+ const dy = ty - sy;
37
+ if (Math.abs(dy) < 1)
38
+ return { trunk: `M ${sx} ${sy} H ${mid}`, branch: `M ${mid} ${sy} H ${tx}` };
39
+ const r = Math.max(0, Math.min(RADIUS, Math.abs(dy) / 2, mid - sx, tx - mid));
40
+ const d = Math.sign(dy);
41
+ return {
42
+ trunk: `M ${sx} ${sy} H ${mid - r}`,
43
+ branch: [
44
+ `M ${mid - r} ${sy}`,
45
+ `Q ${mid} ${sy} ${mid} ${sy + d * r}`,
46
+ `V ${ty - d * r}`,
47
+ `Q ${mid} ${ty} ${mid + r} ${ty}`,
48
+ `H ${tx}`,
49
+ ].join(" "),
50
+ };
51
+ }
52
+ function Diagram({ label, background, strength, borderStyle, cornerStyle, cornerSize, cornerMarks, className, children, ...props }) {
53
+ const frame = React.useRef(null);
54
+ const nodes = React.useRef(new Map()).current;
55
+ const [edges, setEdges] = React.useState([]);
56
+ const [version, setVersion] = React.useState(0);
57
+ const [drawn, setDrawn] = React.useState({ paths: [], labels: [] });
58
+ const marker = `${React.useId()}arrow`;
59
+ const register = React.useCallback((id, element) => {
60
+ if (element)
61
+ nodes.set(id, element);
62
+ else
63
+ nodes.delete(id);
64
+ setVersion((value) => value + 1);
65
+ }, [nodes]);
66
+ const addEdge = React.useCallback((edge) => {
67
+ setEdges((list) => [...list, edge]);
68
+ return () => setEdges((list) => list.filter((item) => item !== edge));
69
+ }, []);
70
+ const context = React.useMemo(() => ({ nodes, register, addEdge }), [nodes, register, addEdge]);
71
+ useIsomorphicLayoutEffect(() => {
72
+ const root = frame.current;
73
+ if (!root)
74
+ return;
75
+ const measure = () => {
76
+ const origin = root.getBoundingClientRect();
77
+ const box = (id) => {
78
+ const rect = nodes.get(id)?.getBoundingClientRect();
79
+ if (!rect)
80
+ return null;
81
+ return {
82
+ left: rect.left - origin.left,
83
+ right: rect.right - origin.left,
84
+ y: rect.top - origin.top + rect.height / 2,
85
+ };
86
+ };
87
+ const next = { paths: [], labels: [] };
88
+ for (const edge of edges) {
89
+ const target = box(edge.to);
90
+ if (!target)
91
+ continue;
92
+ const sources = edge.from.map(box).filter((b) => b !== null);
93
+ if (!sources.length)
94
+ continue;
95
+ const start = Math.max(...sources.map((s) => s.right));
96
+ const mid = (start + target.left) / 2;
97
+ sources.forEach((source, index) => {
98
+ const { trunk, branch } = elbow(source.right, source.y, target.left, target.y, mid);
99
+ next.paths.push({ key: `${edge.key}:${index}:trunk`, d: trunk, arrow: false });
100
+ next.paths.push({ key: `${edge.key}:${index}`, d: branch, line: edge.line, tone: edge.tone, arrow: true });
101
+ });
102
+ // The label sits on the shared run into the target, above the line.
103
+ if (edge.label)
104
+ next.labels.push({ key: edge.key, x: mid, y: target.y - RADIUS, text: edge.label });
105
+ }
106
+ setDrawn(next);
107
+ };
108
+ measure();
109
+ const observer = new ResizeObserver(measure);
110
+ observer.observe(root);
111
+ nodes.forEach((element) => observer.observe(element));
112
+ return () => observer.disconnect();
113
+ }, [edges, nodes, version]);
114
+ return (_jsx(DiagramContext.Provider, { value: context, children: _jsx("div", { ...props, "data-slot": "diagram", className: cn("card diagram", className), "data-background-style": background, "data-background-strength": strength, children: _jsx("div", { "data-slot": "diagram-scroll", className: "diagram-scroll", role: "img", "aria-label": label, tabIndex: 0, children: _jsxs("div", { ref: frame, "data-slot": "diagram-canvas", className: "diagram-canvas", children: [_jsx("div", { "data-slot": "diagram-lanes", className: "diagram-lanes", "data-border-style": borderStyle, "data-corner-style": cornerStyle, "data-corner-size": cornerSize, "data-corner-marks": cornerMarks, children: children }), _jsxs("svg", { className: "diagram-edges", "aria-hidden": "true", children: [_jsx("defs", { children: ["neutral", "success", "danger"].map((tone) => (_jsx("marker", { id: `${marker}-${tone}`, className: "diagram-arrow", "data-tone": tone, viewBox: "0 0 10 10", refX: "9", refY: "5", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: _jsx("path", { d: "M 0 0 L 10 5 L 0 10 z" }) }, tone))) }), drawn.paths.map((path) => (_jsx("path", { d: path.d, "data-line": path.line, "data-tone": path.tone, markerEnd: path.arrow ? `url(#${marker}-${path.tone ?? "neutral"})` : undefined }, path.key))), drawn.labels.map((item) => (_jsx("text", { x: item.x, y: item.y, className: "diagram-edge-label", children: item.text }, item.key)))] })] }) }) }) }));
115
+ }
116
+ function DiagramColumn({ className, ...props }) {
117
+ return _jsx("div", { ...props, "data-slot": "diagram-column", className: cn("diagram-column", className) });
118
+ }
119
+ function DiagramNode({ id, title, kind, icon, label, accent, status, borderStyle, cornerStyle, cornerSize, cornerMarks, className, children, ...props }) {
120
+ const { register } = useRegistry("DiagramNode");
121
+ const ref = React.useCallback((element) => register(id, element), [id, register]);
122
+ const spec = kind ? kinds[kind] : undefined;
123
+ const Icon = icon ?? spec?.icon;
124
+ const caption = label ?? spec?.label;
125
+ return (_jsxs(Card, { ...props, ref: ref, "data-slot": "diagram-node", className: cn("diagram-node", className), "data-kind": kind, "data-tone": spec?.tone ?? "neutral", "data-accent": accent || undefined, "data-status": status, "data-border-style": borderStyle, "data-corner-style": cornerStyle, "data-corner-size": cornerSize, "data-corner-marks": cornerMarks, children: [(Icon || caption) && (_jsxs("span", { className: "diagram-node-kind", children: [Icon && _jsx(Icon, { className: "icon icon-sm", strokeWidth: 1.75, "aria-hidden": "true", focusable: "false" }), caption && _jsx("span", { className: "t-caps", children: caption })] })), _jsx("span", { className: "diagram-node-title", children: title }), children != null && _jsx("span", { className: "diagram-node-text mono", children: children }), status && (_jsx(StatusBadge, { tone: statuses[status].tone, className: "diagram-node-status", children: statuses[status].label }))] }));
126
+ }
127
+ /* An edge renders nothing itself: it registers with the Diagram, which draws
128
+ it once the nodes are measured. */
129
+ function DiagramEdge({ from, to, label, line, tone }) {
130
+ const { addEdge } = useRegistry("DiagramEdge");
131
+ // Ids never contain a newline, so the join is a stable dependency.
132
+ const sources = (Array.isArray(from) ? from : [from]).join("\n");
133
+ React.useEffect(() => addEdge({ key: `${sources}->${to}`, from: sources.split("\n"), to, label, line, tone }), [addEdge, sources, to, label, line, tone]);
134
+ return null;
135
+ }
136
+ export { Diagram, DiagramColumn, DiagramNode, DiagramEdge };
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export * from "./form-field.js";
20
20
  export * from "./form.js";
21
21
  export * from "./header.js";
22
22
  export * from "./input.js";
23
+ export * from "./password-input.js";
23
24
  export * from "./kv.js";
24
25
  export * from "./label.js";
25
26
  export * from "./link.js";
@@ -30,12 +31,15 @@ export * from "./pagination.js";
30
31
  export * from "./popover.js";
31
32
  export * from "./search.js";
32
33
  export * from "./select.js";
34
+ export * from "./detail-select.js";
35
+ export type { ChartStyle } from "./chart-style.js";
33
36
  export * from "./separator.js";
34
37
  export * from "./sidebar.js";
35
38
  export * from "./skeleton.js";
36
39
  export * from "./sparkline.js";
37
40
  export * from "./spinner.js";
38
41
  export * from "./split.js";
42
+ export * from "./pane-grid.js";
39
43
  export * from "./stat.js";
40
44
  export * from "./switch.js";
41
45
  export * from "./table.js";
@@ -60,3 +64,4 @@ export * from "./status-badge.js";
60
64
  export * from "./steps.js";
61
65
  export * from "./radio-group.js";
62
66
  export * from "./file-dropzone.js";
67
+ export * from "./diagram.js";
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ export * from "./form-field.js";
21
21
  export * from "./form.js";
22
22
  export * from "./header.js";
23
23
  export * from "./input.js";
24
+ export * from "./password-input.js";
24
25
  export * from "./kv.js";
25
26
  export * from "./label.js";
26
27
  export * from "./link.js";
@@ -31,12 +32,14 @@ export * from "./pagination.js";
31
32
  export * from "./popover.js";
32
33
  export * from "./search.js";
33
34
  export * from "./select.js";
35
+ export * from "./detail-select.js";
34
36
  export * from "./separator.js";
35
37
  export * from "./sidebar.js";
36
38
  export * from "./skeleton.js";
37
39
  export * from "./sparkline.js";
38
40
  export * from "./spinner.js";
39
41
  export * from "./split.js";
42
+ export * from "./pane-grid.js";
40
43
  export * from "./stat.js";
41
44
  export * from "./switch.js";
42
45
  export * from "./table.js";
@@ -61,3 +64,4 @@ export * from "./status-badge.js";
61
64
  export * from "./steps.js";
62
65
  export * from "./radio-group.js";
63
66
  export * from "./file-dropzone.js";
67
+ export * from "./diagram.js";