@you-agent-factory/components 0.0.0 → 0.0.2
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/LICENSE.md +21 -0
- package/README.md +38 -7
- package/dist/category-paths.d.ts +3 -0
- package/dist/charts/chart-state-panel.d.ts +11 -0
- package/dist/charts/chart.d.ts +35 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +287 -0
- package/dist/chunks/action-row.js +39 -0
- package/dist/chunks/alert-panel.js +182 -0
- package/dist/chunks/button.js +193 -0
- package/dist/chunks/cn.js +6 -0
- package/dist/chunks/factory-emulator-controls.js +123 -0
- package/dist/chunks/package-form-field.js +546 -0
- package/dist/chunks/scroll-area.js +261 -0
- package/dist/chunks/surface-panel.js +73 -0
- package/dist/chunks/table-layout.js +292 -0
- package/dist/chunks/typography-roles.js +26 -0
- package/dist/chunks/typography.js +129 -0
- package/dist/chunks/widget-frame.js +344 -0
- package/dist/data-display/code-panel.d.ts +12 -0
- package/dist/data-display/data-table.d.ts +27 -0
- package/dist/data-display/description-list.d.ts +4 -0
- package/{src/data-display/index.ts → dist/data-display/index.d.ts} +4 -26
- package/dist/data-display/index.js +20 -0
- package/dist/data-display/table-layout.d.ts +8 -0
- package/dist/data-display/table.d.ts +14 -0
- package/dist/factory-emulator/factory-emulator-controls.d.ts +23 -0
- package/dist/factory-emulator/index.d.ts +6 -0
- package/dist/factory-emulator/index.js +6 -0
- package/dist/feedback/alert-panel-semantics.d.ts +11 -0
- package/dist/feedback/alert-panel.d.ts +29 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/feedback/index.js +10 -0
- package/dist/feedback/skeleton.d.ts +2 -0
- package/dist/forms/index.d.ts +19 -0
- package/dist/forms/index.js +37 -0
- package/dist/forms/package-checkbox.d.ts +3 -0
- package/dist/forms/package-enum-select.d.ts +42 -0
- package/dist/forms/package-file-input.d.ts +3 -0
- package/dist/forms/package-form-field.d.ts +49 -0
- package/dist/forms/package-input.d.ts +6 -0
- package/dist/forms/package-native-select.d.ts +3 -0
- package/dist/forms/package-select.d.ts +32 -0
- package/dist/forms/package-textarea.d.ts +10 -0
- package/dist/forms/select-icons.d.ts +3 -0
- package/dist/graphs/graph-edge-path.d.ts +18 -0
- package/dist/graphs/graph-edge.d.ts +15 -0
- package/dist/graphs/graph-node-button.d.ts +11 -0
- package/dist/graphs/graph-node-handle-badge.d.ts +5 -0
- package/dist/graphs/graph-node-handle.d.ts +18 -0
- package/dist/graphs/graph-node-shell.d.ts +13 -0
- package/dist/graphs/graph-node-state-indicator.d.ts +6 -0
- package/dist/graphs/graph-node-state.d.ts +23 -0
- package/dist/graphs/graph-viewport-surface.d.ts +5 -0
- package/dist/graphs/index.d.ts +13 -0
- package/dist/graphs/index.js +614 -0
- package/{src/icons/index.ts → dist/icons/index.d.ts} +1 -2
- package/dist/icons/index.js +4 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +145 -0
- package/dist/layout/action-row.d.ts +8 -0
- package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -3
- package/dist/layout/index.js +9 -0
- package/dist/layout/surface-panel.d.ts +15 -0
- package/{src/navigation/index.ts → dist/navigation/index.d.ts} +1 -2
- package/dist/navigation/index.js +4 -0
- package/dist/overlays/collapsible.d.ts +5 -0
- package/dist/overlays/dialog.d.ts +16 -0
- package/dist/overlays/index.d.ts +10 -0
- package/dist/overlays/index.js +27 -0
- package/dist/overlays/overlay-layout.d.ts +6 -0
- package/dist/overlays/popover.d.ts +6 -0
- package/dist/overlays/scroll-area.d.ts +9 -0
- package/dist/primitives/button-link.d.ts +5 -0
- package/dist/primitives/button.d.ts +9 -0
- package/dist/primitives/icon-button-shell.d.ts +10 -0
- package/{src/primitives/index.ts → dist/primitives/index.d.ts} +2 -19
- package/dist/primitives/index.js +49 -0
- package/dist/primitives/package-text.d.ts +6 -0
- package/dist/primitives/typography-roles.d.ts +12 -0
- package/dist/primitives/typography.d.ts +36 -0
- package/dist/recipes/index.d.ts +14 -0
- package/dist/recipes/index.js +32 -0
- package/dist/recipes/widget-frame-content.d.ts +24 -0
- package/dist/recipes/widget-frame-disclosure.d.ts +33 -0
- package/dist/recipes/widget-frame-layout.d.ts +12 -0
- package/dist/recipes/widget-frame-skeleton.d.ts +2 -0
- package/dist/recipes/widget-frame-states.d.ts +15 -0
- package/dist/recipes/widget-frame-typography.d.ts +10 -0
- package/dist/recipes/widget-frame.d.ts +12 -0
- package/{src → dist}/styles.css +36 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +16 -0
- package/dist/testing/render.d.ts +5 -0
- package/{src/tokens/index.ts → dist/tokens/index.d.ts} +1 -2
- package/dist/tokens/index.js +4 -0
- package/dist/utilities/cn.d.ts +1 -0
- package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -3
- package/dist/utilities/index.js +6 -0
- package/package.json +65 -64
- package/docs/README.md +0 -83
- package/docs/button.md +0 -119
- package/docs/charts.md +0 -325
- package/docs/data-display-code-panel.md +0 -120
- package/docs/feedback-alert-panel.md +0 -117
- package/docs/feedback-skeleton.md +0 -54
- package/docs/forms-form-field.md +0 -490
- package/docs/forms-input-primitives.md +0 -311
- package/docs/forms-select-primitives.md +0 -362
- package/docs/graphs.md +0 -250
- package/docs/layout-display-primitives.md +0 -211
- package/docs/overlays.md +0 -414
- package/docs/table-data-table.md +0 -331
- package/docs/typography-roles.md +0 -182
- package/docs/widget-frame-recipes.md +0 -273
- package/src/category-paths.ts +0 -20
- package/src/charts/chart-state-panel.tsx +0 -103
- package/src/charts/chart.tsx +0 -287
- package/src/charts/index.ts +0 -21
- package/src/data-display/code-panel.tsx +0 -67
- package/src/data-display/data-table.tsx +0 -180
- package/src/data-display/description-list.tsx +0 -24
- package/src/data-display/table-layout.ts +0 -12
- package/src/data-display/table.tsx +0 -131
- package/src/feedback/alert-panel-semantics.ts +0 -75
- package/src/feedback/alert-panel.tsx +0 -187
- package/src/feedback/index.ts +0 -21
- package/src/feedback/skeleton.tsx +0 -16
- package/src/forms/index.ts +0 -73
- package/src/forms/package-checkbox.tsx +0 -50
- package/src/forms/package-enum-select.tsx +0 -185
- package/src/forms/package-file-input.tsx +0 -25
- package/src/forms/package-form-field.tsx +0 -202
- package/src/forms/package-input.tsx +0 -25
- package/src/forms/package-native-select.tsx +0 -25
- package/src/forms/package-select.tsx +0 -209
- package/src/forms/package-textarea.tsx +0 -35
- package/src/forms/select-icons.tsx +0 -35
- package/src/graphs/graph-edge-path.ts +0 -241
- package/src/graphs/graph-edge.tsx +0 -130
- package/src/graphs/graph-interactive-example.tsx +0 -187
- package/src/graphs/graph-node-button.tsx +0 -51
- package/src/graphs/graph-node-handle-badge.tsx +0 -108
- package/src/graphs/graph-node-handle.ts +0 -28
- package/src/graphs/graph-node-shell.tsx +0 -111
- package/src/graphs/graph-node-state-indicator.tsx +0 -47
- package/src/graphs/graph-node-state.ts +0 -111
- package/src/graphs/graph-viewport-surface.tsx +0 -27
- package/src/graphs/index.ts +0 -41
- package/src/index.ts +0 -209
- package/src/layout/action-row.tsx +0 -53
- package/src/layout/surface-panel.tsx +0 -91
- package/src/overlays/collapsible.tsx +0 -22
- package/src/overlays/dialog.tsx +0 -148
- package/src/overlays/index.ts +0 -31
- package/src/overlays/overlay-layout.ts +0 -9
- package/src/overlays/popover.tsx +0 -29
- package/src/overlays/scroll-area.tsx +0 -78
- package/src/primitives/button-link.tsx +0 -22
- package/src/primitives/button.tsx +0 -258
- package/src/primitives/icon-button-shell.tsx +0 -49
- package/src/primitives/package-text.tsx +0 -29
- package/src/primitives/typography-roles.ts +0 -12
- package/src/primitives/typography.tsx +0 -165
- package/src/recipes/index.ts +0 -61
- package/src/recipes/widget-frame-content.tsx +0 -114
- package/src/recipes/widget-frame-disclosure.tsx +0 -161
- package/src/recipes/widget-frame-layout.ts +0 -40
- package/src/recipes/widget-frame-skeleton.tsx +0 -16
- package/src/recipes/widget-frame-states.tsx +0 -99
- package/src/recipes/widget-frame-typography.ts +0 -19
- package/src/recipes/widget-frame.tsx +0 -84
- package/src/testing/index.ts +0 -13
- package/src/testing/render.tsx +0 -16
- package/src/utilities/cn.ts +0 -5
- /package/{src → dist}/styles/color-palette-presets.css +0 -0
- /package/{src → dist}/styles/color-role-tokens.css +0 -0
- /package/{src → dist}/styles/layout-role-tokens.css +0 -0
- /package/{src → dist}/styles/text-color-role-tokens.css +0 -0
- /package/{src → dist}/styles/typography-role-tokens.css +0 -0
- /package/{src → dist}/styles/typography-role-utilities.css +0 -0
- /package/{src → dist}/styles/typography-roles.css +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { B as Button } from "./button.js";
|
|
4
|
+
import { c as cn } from "./cn.js";
|
|
5
|
+
import { a as BODY_CODE_CLASS, b as SUPPORTING_CODE_CLASS, P as PAGE_HEADING_CLASS, S as SECTION_HEADING_CLASS, c as SUPPORTING_LABEL_CLASS, D as DENSE_BODY_TEXT_CLASS, C as CAPTION_TEXT_CLASS, M as MUTED_TEXT_CLASS, d as SUPPORTING_TEXT_CLASS, B as BODY_TEXT_CLASS, T as TEXT_TRUNCATE_CLASS, e as TEXT_WRAP_CLASS } from "./typography-roles.js";
|
|
6
|
+
const ButtonLink = forwardRef(
|
|
7
|
+
function ButtonLink2({ children, className, size = "default", tone = "default", ...props }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Button, { asChild: true, className, size, tone, children: /* @__PURE__ */ jsx("a", { ref, ...props, children }) });
|
|
9
|
+
}
|
|
10
|
+
);
|
|
11
|
+
const ICON_BUTTON_SHELL_BASE_CLASS = "relative shrink-0";
|
|
12
|
+
const ICON_BUTTON_SHELL_SIZE_CLASS = "h-10 w-10 rounded-lg";
|
|
13
|
+
const ICON_BUTTON_SHELL_TONE_CLASS = {
|
|
14
|
+
dangerGhost: "text-on-surface-subtle hover:border-af-danger-border hover:bg-error-container hover:text-on-error-container"
|
|
15
|
+
};
|
|
16
|
+
const IconButtonShell = forwardRef(function IconButtonShell2({ className, tone = "outline", ...props }, ref) {
|
|
17
|
+
const buttonTone = tone === "dangerGhost" ? "ghost" : tone;
|
|
18
|
+
const toneClassName = tone === "dangerGhost" ? ICON_BUTTON_SHELL_TONE_CLASS.dangerGhost : void 0;
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
Button,
|
|
21
|
+
{
|
|
22
|
+
className: cn(
|
|
23
|
+
ICON_BUTTON_SHELL_BASE_CLASS,
|
|
24
|
+
ICON_BUTTON_SHELL_SIZE_CLASS,
|
|
25
|
+
toneClassName,
|
|
26
|
+
className
|
|
27
|
+
),
|
|
28
|
+
ref,
|
|
29
|
+
size: "icon",
|
|
30
|
+
tone: buttonTone,
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
function typographyOverflowClass({
|
|
36
|
+
truncate,
|
|
37
|
+
wrap
|
|
38
|
+
}) {
|
|
39
|
+
if (truncate) {
|
|
40
|
+
return TEXT_TRUNCATE_CLASS;
|
|
41
|
+
}
|
|
42
|
+
if (wrap) {
|
|
43
|
+
return TEXT_WRAP_CLASS;
|
|
44
|
+
}
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
const TEXT_VARIANT_CLASS = {
|
|
48
|
+
body: BODY_TEXT_CLASS,
|
|
49
|
+
supporting: SUPPORTING_TEXT_CLASS,
|
|
50
|
+
muted: MUTED_TEXT_CLASS,
|
|
51
|
+
caption: CAPTION_TEXT_CLASS,
|
|
52
|
+
dense: DENSE_BODY_TEXT_CLASS
|
|
53
|
+
};
|
|
54
|
+
const Text = forwardRef(function Text2({
|
|
55
|
+
as: Component = "p",
|
|
56
|
+
children,
|
|
57
|
+
className,
|
|
58
|
+
truncate,
|
|
59
|
+
variant = "body",
|
|
60
|
+
wrap,
|
|
61
|
+
...props
|
|
62
|
+
}, ref) {
|
|
63
|
+
return /* @__PURE__ */ jsx(
|
|
64
|
+
Component,
|
|
65
|
+
{
|
|
66
|
+
className: cn(
|
|
67
|
+
TEXT_VARIANT_CLASS[variant],
|
|
68
|
+
typographyOverflowClass({ truncate, wrap }),
|
|
69
|
+
className
|
|
70
|
+
),
|
|
71
|
+
ref,
|
|
72
|
+
...props,
|
|
73
|
+
children
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
});
|
|
77
|
+
const Heading = forwardRef(function Heading2({ as, children, className, level = "section", truncate, wrap, ...props }, ref) {
|
|
78
|
+
const Component = as ?? (level === "page" ? "h1" : "h3");
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
Component,
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
level === "page" ? PAGE_HEADING_CLASS : SECTION_HEADING_CLASS,
|
|
84
|
+
typographyOverflowClass({ truncate, wrap }),
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
ref,
|
|
88
|
+
...props,
|
|
89
|
+
children
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
const Label = forwardRef(function Label2({ as: Component = "span", children, className, truncate, wrap, ...props }, ref) {
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
Component,
|
|
96
|
+
{
|
|
97
|
+
className: cn(
|
|
98
|
+
SUPPORTING_LABEL_CLASS,
|
|
99
|
+
typographyOverflowClass({ truncate, wrap }),
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
ref,
|
|
103
|
+
...props,
|
|
104
|
+
children
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
const Code = forwardRef(function Code2({ as: Component = "code", children, className, size = "body", ...props }, ref) {
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
Component,
|
|
111
|
+
{
|
|
112
|
+
className: cn(
|
|
113
|
+
size === "body" ? BODY_CODE_CLASS : SUPPORTING_CODE_CLASS,
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
ref,
|
|
117
|
+
...props,
|
|
118
|
+
children
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
ButtonLink as B,
|
|
124
|
+
Code as C,
|
|
125
|
+
Heading as H,
|
|
126
|
+
IconButtonShell as I,
|
|
127
|
+
Label as L,
|
|
128
|
+
Text as T
|
|
129
|
+
};
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { c as cn } from "./cn.js";
|
|
4
|
+
const WIDGET_FRAME_SECTION_HEADING_CLASS = "text-title-large uppercase text-on-surface";
|
|
5
|
+
const WIDGET_FRAME_BODY_TEXT_CLASS = "text-body-medium text-on-surface-variant";
|
|
6
|
+
const WIDGET_FRAME_SUBTITLE_CLASS = "font-mono text-display-small text-on-surface-variant [overflow-wrap:anywhere]";
|
|
7
|
+
const WIDGET_FRAME_SUPPORTING_LABEL_CLASS = "text-label-medium uppercase text-on-surface-subtle";
|
|
8
|
+
const WIDGET_FRAME_SUPPORTING_LABELS_CLASS = "[&_dt]:text-label-medium [&_dt]:uppercase [&_dt]:text-on-surface-subtle";
|
|
9
|
+
const WIDGET_FRAME_DISCLOSURE_CLASS = "grid min-w-0 gap-2.5";
|
|
10
|
+
const WIDGET_FRAME_DISCLOSURE_TRIGGER_CLASS = cn(
|
|
11
|
+
"inline-flex min-h-9 shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg border border-outline bg-surface-container-high px-2.5 py-2 text-on-surface-variant transition hover:border-outline-variant hover:bg-af-overlay hover:text-on-surface focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-af-accent disabled:cursor-not-allowed disabled:border-outline disabled:bg-surface-container-low disabled:text-on-surface-disabled",
|
|
12
|
+
WIDGET_FRAME_BODY_TEXT_CLASS
|
|
13
|
+
);
|
|
14
|
+
const WIDGET_FRAME_DISCLOSURE_ICON_CLASS = "h-3.5 w-3.5 shrink-0 text-current transition-transform duration-150";
|
|
15
|
+
function WidgetFrameDisclosure({
|
|
16
|
+
children,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", { className: cn(WIDGET_FRAME_DISCLOSURE_CLASS, className), ...props, children });
|
|
21
|
+
}
|
|
22
|
+
function WidgetFrameDisclosureIcon({
|
|
23
|
+
className,
|
|
24
|
+
expanded
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
className: cn(
|
|
31
|
+
WIDGET_FRAME_DISCLOSURE_ICON_CLASS,
|
|
32
|
+
expanded ? "rotate-180" : "rotate-0",
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
fill: "none",
|
|
36
|
+
focusable: "false",
|
|
37
|
+
viewBox: "0 0 16 16",
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
children: /* @__PURE__ */ jsx(
|
|
40
|
+
"path",
|
|
41
|
+
{
|
|
42
|
+
d: "M4 6l4 4 4-4",
|
|
43
|
+
stroke: "currentColor",
|
|
44
|
+
strokeLinecap: "round",
|
|
45
|
+
strokeLinejoin: "round",
|
|
46
|
+
strokeWidth: "1.8"
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const WidgetFrameDisclosureTrigger = forwardRef(function WidgetFrameDisclosureTrigger2({
|
|
53
|
+
children,
|
|
54
|
+
className,
|
|
55
|
+
controlsID,
|
|
56
|
+
expanded,
|
|
57
|
+
onClick,
|
|
58
|
+
onExpandedChange,
|
|
59
|
+
type = "button",
|
|
60
|
+
...props
|
|
61
|
+
}, ref) {
|
|
62
|
+
const handleClick = (event) => {
|
|
63
|
+
onClick?.(event);
|
|
64
|
+
if (!event.defaultPrevented) {
|
|
65
|
+
onExpandedChange?.(!expanded);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ jsxs(
|
|
69
|
+
"button",
|
|
70
|
+
{
|
|
71
|
+
"aria-controls": controlsID,
|
|
72
|
+
"aria-expanded": expanded,
|
|
73
|
+
className: cn(WIDGET_FRAME_DISCLOSURE_TRIGGER_CLASS, className),
|
|
74
|
+
onClick: handleClick,
|
|
75
|
+
ref,
|
|
76
|
+
type,
|
|
77
|
+
...props,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ jsx(WidgetFrameDisclosureIcon, { expanded }),
|
|
80
|
+
children
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
});
|
|
85
|
+
function WidgetFrameDisclosurePanel({
|
|
86
|
+
children,
|
|
87
|
+
className,
|
|
88
|
+
expanded,
|
|
89
|
+
id,
|
|
90
|
+
...props
|
|
91
|
+
}) {
|
|
92
|
+
return /* @__PURE__ */ jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: cn("min-w-0", className),
|
|
96
|
+
hidden: !expanded,
|
|
97
|
+
id,
|
|
98
|
+
...props,
|
|
99
|
+
children
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const WIDGET_SUBTITLE_CLASS = cn("mt-0", WIDGET_FRAME_SUBTITLE_CLASS);
|
|
104
|
+
const DETAIL_COPY_CLASS = cn("m-0", WIDGET_FRAME_BODY_TEXT_CLASS);
|
|
105
|
+
const EMPTY_STATE_CLASS = "grid min-h-60 items-start gap-1.5 rounded-2xl border border-dashed border-outline-variant bg-surface-container-low p-5 [&_h3]:m-0";
|
|
106
|
+
const EMPTY_STATE_COMPACT_CLASS = "min-h-0";
|
|
107
|
+
function WidgetSubtitle({
|
|
108
|
+
as: Component = "p",
|
|
109
|
+
children,
|
|
110
|
+
className,
|
|
111
|
+
...props
|
|
112
|
+
}) {
|
|
113
|
+
return /* @__PURE__ */ jsx(Component, { className: cn(WIDGET_SUBTITLE_CLASS, className), ...props, children });
|
|
114
|
+
}
|
|
115
|
+
function WidgetDetailCopy({
|
|
116
|
+
children,
|
|
117
|
+
className,
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsx("p", { className: cn(DETAIL_COPY_CLASS, className), ...props, children });
|
|
121
|
+
}
|
|
122
|
+
function WidgetEmptyState({
|
|
123
|
+
children,
|
|
124
|
+
className,
|
|
125
|
+
compact = false,
|
|
126
|
+
...props
|
|
127
|
+
}) {
|
|
128
|
+
return /* @__PURE__ */ jsx(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: cn(
|
|
132
|
+
EMPTY_STATE_CLASS,
|
|
133
|
+
compact && EMPTY_STATE_COMPACT_CLASS,
|
|
134
|
+
className
|
|
135
|
+
),
|
|
136
|
+
...props,
|
|
137
|
+
children
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
function WidgetEmptyStateTitle({
|
|
142
|
+
as: Component = "h3",
|
|
143
|
+
children,
|
|
144
|
+
className,
|
|
145
|
+
...props
|
|
146
|
+
}) {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
Component,
|
|
149
|
+
{
|
|
150
|
+
className: cn(WIDGET_FRAME_SECTION_HEADING_CLASS, className),
|
|
151
|
+
...props,
|
|
152
|
+
children
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function WidgetEmptyStateText({
|
|
157
|
+
children,
|
|
158
|
+
className,
|
|
159
|
+
...props
|
|
160
|
+
}) {
|
|
161
|
+
return /* @__PURE__ */ jsx("p", { className: cn("m-0", WIDGET_FRAME_BODY_TEXT_CLASS, className), ...props, children });
|
|
162
|
+
}
|
|
163
|
+
function WidgetFrameSkeleton({
|
|
164
|
+
className,
|
|
165
|
+
...props
|
|
166
|
+
}) {
|
|
167
|
+
return /* @__PURE__ */ jsx(
|
|
168
|
+
"div",
|
|
169
|
+
{
|
|
170
|
+
"aria-hidden": "true",
|
|
171
|
+
className: cn("animate-pulse rounded-xl bg-af-overlay", className),
|
|
172
|
+
...props
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
const WIDGET_STATE_PANEL_CLASS = "grid gap-2";
|
|
177
|
+
const WIDGET_ERROR_STATE_CLASS = "rounded-2xl border border-af-danger-border bg-error-container p-5 text-on-error-container";
|
|
178
|
+
const WIDGET_SUCCESS_STATE_CLASS = "rounded-2xl border border-af-success-border bg-success-container p-5 text-on-success-container";
|
|
179
|
+
const WIDGET_LOADING_PLACEHOLDER_CLASS = "grid gap-2 pt-2";
|
|
180
|
+
function WidgetLoadingState({
|
|
181
|
+
children,
|
|
182
|
+
className,
|
|
183
|
+
placeholder,
|
|
184
|
+
showDefaultPlaceholder = true,
|
|
185
|
+
...props
|
|
186
|
+
}) {
|
|
187
|
+
const resolvedPlaceholder = placeholder ?? (showDefaultPlaceholder ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
188
|
+
/* @__PURE__ */ jsx(WidgetFrameSkeleton, { className: "h-4 w-full max-w-48" }),
|
|
189
|
+
/* @__PURE__ */ jsx(WidgetFrameSkeleton, { className: "h-24 w-full" }),
|
|
190
|
+
/* @__PURE__ */ jsx(WidgetFrameSkeleton, { className: "h-4 w-full max-w-48" })
|
|
191
|
+
] }) : null);
|
|
192
|
+
return /* @__PURE__ */ jsxs(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
"aria-busy": "true",
|
|
196
|
+
className: cn(WIDGET_STATE_PANEL_CLASS, className),
|
|
197
|
+
role: "status",
|
|
198
|
+
...props,
|
|
199
|
+
children: [
|
|
200
|
+
children,
|
|
201
|
+
resolvedPlaceholder ? /* @__PURE__ */ jsx(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
"aria-hidden": "true",
|
|
205
|
+
className: WIDGET_LOADING_PLACEHOLDER_CLASS,
|
|
206
|
+
children: resolvedPlaceholder
|
|
207
|
+
}
|
|
208
|
+
) : null
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
function WidgetErrorState({
|
|
214
|
+
children,
|
|
215
|
+
className,
|
|
216
|
+
...props
|
|
217
|
+
}) {
|
|
218
|
+
return /* @__PURE__ */ jsx(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
className: cn(WIDGET_ERROR_STATE_CLASS, WIDGET_STATE_PANEL_CLASS, className),
|
|
222
|
+
role: "alert",
|
|
223
|
+
...props,
|
|
224
|
+
children
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
function WidgetSuccessState({
|
|
229
|
+
children,
|
|
230
|
+
className,
|
|
231
|
+
...props
|
|
232
|
+
}) {
|
|
233
|
+
return /* @__PURE__ */ jsx(
|
|
234
|
+
"div",
|
|
235
|
+
{
|
|
236
|
+
className: cn(
|
|
237
|
+
WIDGET_SUCCESS_STATE_CLASS,
|
|
238
|
+
WIDGET_STATE_PANEL_CLASS,
|
|
239
|
+
className
|
|
240
|
+
),
|
|
241
|
+
role: "status",
|
|
242
|
+
...props,
|
|
243
|
+
children
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
const WIDGET_FRAME_MIN_WIDTH_CLASS = "min-w-0";
|
|
248
|
+
const WIDGET_FRAME_WIDE_BODY_CLASS = "min-h-72";
|
|
249
|
+
const WIDGET_FRAME_RESPONSIVE_SHELL_CLASS = "min-w-0 w-full";
|
|
250
|
+
const WIDGET_FRAME_STORY_SHELL_DATA_ATTR = "data-widget-frame-story-shell";
|
|
251
|
+
const WIDGET_FRAME_OVERFLOW_TOLERANCE_PX = 1;
|
|
252
|
+
const widgetFrameDetailCardClass = cn(
|
|
253
|
+
"[&_dd]:m-0 [&_dl]:m-0 [&_dl]:grid [&_dl]:gap-3 [&_dl_div:first-child]:border-t-0 [&_dl_div:first-child]:pt-0 [&_dl_div]:border-t [&_dl_div]:border-outline [&_dl_div]:pt-3 [&_dt]:mb-1 [&_h3]:mt-0",
|
|
254
|
+
WIDGET_FRAME_SUPPORTING_LABELS_CLASS
|
|
255
|
+
);
|
|
256
|
+
function widgetFrameStoryShellStyle(maxWidth) {
|
|
257
|
+
return {
|
|
258
|
+
style: {
|
|
259
|
+
maxWidth,
|
|
260
|
+
padding: "1rem",
|
|
261
|
+
width: "100%"
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
function widgetFrameHasNoHorizontalOverflow(element, tolerancePx = WIDGET_FRAME_OVERFLOW_TOLERANCE_PX) {
|
|
266
|
+
return element.scrollWidth <= element.clientWidth + tolerancePx;
|
|
267
|
+
}
|
|
268
|
+
const WIDGET_FRAME_SHELL_CLASS = "flex min-w-0 flex-col rounded-lg border border-outline bg-surface-container-high text-on-surface shadow-af-card";
|
|
269
|
+
const WIDGET_FRAME_SCROLL_CLASS = "overflow-hidden";
|
|
270
|
+
const WIDGET_FRAME_HEADER_CLASS = "relative z-10 flex min-h-13 shrink-0 items-center justify-between gap-3 border-b border-outline bg-surface-container-high px-3.5 py-3";
|
|
271
|
+
const WIDGET_FRAME_HEADER_TOOLS_CLASS = "flex min-w-0 shrink-0 items-center gap-2";
|
|
272
|
+
const WIDGET_FRAME_BODY_SCROLL_CLASS = "min-h-0 flex-1 overflow-auto";
|
|
273
|
+
const WIDGET_FRAME_BODY_CLASS = cn(
|
|
274
|
+
"grid min-h-0 gap-2.5 px-3.5 pt-3.5 pb-4 [&>*]:pb-1 [&_p]:m-0",
|
|
275
|
+
WIDGET_FRAME_BODY_TEXT_CLASS
|
|
276
|
+
);
|
|
277
|
+
function WidgetFrame({
|
|
278
|
+
bodyClassName,
|
|
279
|
+
bodyProps,
|
|
280
|
+
bodyScroll = true,
|
|
281
|
+
children,
|
|
282
|
+
className,
|
|
283
|
+
headerAction,
|
|
284
|
+
title,
|
|
285
|
+
wide = false
|
|
286
|
+
}) {
|
|
287
|
+
const cardClassName = cn(
|
|
288
|
+
WIDGET_FRAME_SHELL_CLASS,
|
|
289
|
+
WIDGET_FRAME_MIN_WIDTH_CLASS,
|
|
290
|
+
widgetFrameDetailCardClass,
|
|
291
|
+
wide && WIDGET_FRAME_WIDE_BODY_CLASS,
|
|
292
|
+
bodyScroll && WIDGET_FRAME_SCROLL_CLASS,
|
|
293
|
+
className
|
|
294
|
+
);
|
|
295
|
+
const cardBodyClassName = cn(WIDGET_FRAME_BODY_CLASS, bodyClassName);
|
|
296
|
+
const bodyClassNames = cn(
|
|
297
|
+
"min-h-0 flex-1",
|
|
298
|
+
bodyScroll && WIDGET_FRAME_BODY_SCROLL_CLASS,
|
|
299
|
+
cardBodyClassName
|
|
300
|
+
);
|
|
301
|
+
return /* @__PURE__ */ jsxs("article", { "aria-label": title, className: cardClassName, children: [
|
|
302
|
+
/* @__PURE__ */ jsxs("header", { className: WIDGET_FRAME_HEADER_CLASS, children: [
|
|
303
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx("h3", { className: "m-0 min-w-0 flex-1 text-title-large uppercase text-on-surface [overflow-wrap:anywhere]", children: title }) }),
|
|
304
|
+
/* @__PURE__ */ jsx("div", { className: WIDGET_FRAME_HEADER_TOOLS_CLASS, children: headerAction ?? /* @__PURE__ */ jsx(
|
|
305
|
+
"span",
|
|
306
|
+
{
|
|
307
|
+
"aria-hidden": "true",
|
|
308
|
+
className: "block h-10 w-10 shrink-0",
|
|
309
|
+
"data-widget-frame-header-action-spacer": "true"
|
|
310
|
+
}
|
|
311
|
+
) })
|
|
312
|
+
] }),
|
|
313
|
+
/* @__PURE__ */ jsx("div", { className: bodyClassNames, ...bodyProps, children })
|
|
314
|
+
] });
|
|
315
|
+
}
|
|
316
|
+
export {
|
|
317
|
+
WIDGET_FRAME_BODY_TEXT_CLASS as W,
|
|
318
|
+
WIDGET_FRAME_MIN_WIDTH_CLASS as a,
|
|
319
|
+
WIDGET_FRAME_OVERFLOW_TOLERANCE_PX as b,
|
|
320
|
+
WIDGET_FRAME_RESPONSIVE_SHELL_CLASS as c,
|
|
321
|
+
WIDGET_FRAME_SECTION_HEADING_CLASS as d,
|
|
322
|
+
WIDGET_FRAME_STORY_SHELL_DATA_ATTR as e,
|
|
323
|
+
WIDGET_FRAME_SUBTITLE_CLASS as f,
|
|
324
|
+
WIDGET_FRAME_SUPPORTING_LABELS_CLASS as g,
|
|
325
|
+
WIDGET_FRAME_SUPPORTING_LABEL_CLASS as h,
|
|
326
|
+
WIDGET_FRAME_WIDE_BODY_CLASS as i,
|
|
327
|
+
WidgetDetailCopy as j,
|
|
328
|
+
WidgetEmptyState as k,
|
|
329
|
+
WidgetEmptyStateText as l,
|
|
330
|
+
WidgetEmptyStateTitle as m,
|
|
331
|
+
WidgetErrorState as n,
|
|
332
|
+
WidgetFrame as o,
|
|
333
|
+
WidgetFrameDisclosure as p,
|
|
334
|
+
WidgetFrameDisclosureIcon as q,
|
|
335
|
+
WidgetFrameDisclosurePanel as r,
|
|
336
|
+
WidgetFrameDisclosureTrigger as s,
|
|
337
|
+
WidgetFrameSkeleton as t,
|
|
338
|
+
WidgetLoadingState as u,
|
|
339
|
+
WidgetSubtitle as v,
|
|
340
|
+
WidgetSuccessState as w,
|
|
341
|
+
widgetFrameDetailCardClass as x,
|
|
342
|
+
widgetFrameHasNoHorizontalOverflow as y,
|
|
343
|
+
widgetFrameStoryShellStyle as z
|
|
344
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
type CodePanelPadding = "compact" | "default";
|
|
3
|
+
type CodePanelSurface = "high" | "low";
|
|
4
|
+
type CodePanelMaxHeight = "none" | "sm" | "md" | "lg";
|
|
5
|
+
export interface CodePanelProps extends HTMLAttributes<HTMLPreElement> {
|
|
6
|
+
maxHeight?: CodePanelMaxHeight;
|
|
7
|
+
padding?: CodePanelPadding;
|
|
8
|
+
surface?: CodePanelSurface;
|
|
9
|
+
}
|
|
10
|
+
export declare function codePanelVariants({ className, maxHeight, padding, surface, }: Pick<CodePanelProps, "className" | "maxHeight" | "padding" | "surface">): string;
|
|
11
|
+
export declare const CodePanel: import("react").ForwardRefExoticComponent<CodePanelProps & import("react").RefAttributes<HTMLPreElement>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { type TableSize } from "./table";
|
|
3
|
+
export type DataTableState = "empty" | "error" | "loading" | "success";
|
|
4
|
+
export interface DataTableColumn<Row> {
|
|
5
|
+
cell: (row: Row) => ReactNode;
|
|
6
|
+
header: ReactNode;
|
|
7
|
+
id: string;
|
|
8
|
+
cellClassName?: string;
|
|
9
|
+
headerClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DataTableProps<Row> {
|
|
12
|
+
columns: DataTableColumn<Row>[];
|
|
13
|
+
data: Row[];
|
|
14
|
+
getRowKey: (row: Row) => string;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
caption?: ReactNode;
|
|
17
|
+
containerClassName?: string;
|
|
18
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
19
|
+
emptyMessage?: ReactNode;
|
|
20
|
+
errorMessage?: ReactNode;
|
|
21
|
+
loadingMessage?: ReactNode;
|
|
22
|
+
rowClassName?: (row: Row) => string | undefined;
|
|
23
|
+
size?: TableSize;
|
|
24
|
+
state?: DataTableState;
|
|
25
|
+
tableClassName?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function DataTable<Row>({ columns, data, getRowKey, ariaLabel, caption, containerClassName, containerProps, emptyMessage, errorMessage, loadingMessage, rowClassName, size, state, tableClassName, }: DataTableProps<Row>): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
3
|
+
}
|
|
4
|
+
export declare const DescriptionList: import("react").ForwardRefExoticComponent<DescriptionListProps & import("react").RefAttributes<HTMLDListElement>>;
|
|
@@ -1,34 +1,12 @@
|
|
|
1
1
|
/** Stable category path for `@you-agent-factory/components/data-display`. */
|
|
2
|
-
export const COMPONENTS_CATEGORY
|
|
3
|
-
|
|
2
|
+
export declare const COMPONENTS_CATEGORY: "data-display";
|
|
4
3
|
export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
|
|
5
|
-
|
|
6
4
|
export { CodePanel, codePanelVariants } from "./code-panel";
|
|
7
5
|
export type { CodePanelProps } from "./code-panel";
|
|
8
6
|
export { DescriptionList } from "./description-list";
|
|
9
7
|
export type { DescriptionListProps } from "./description-list";
|
|
10
|
-
|
|
11
8
|
export { DataTable } from "./data-table";
|
|
12
|
-
export type {
|
|
13
|
-
|
|
14
|
-
DataTableProps,
|
|
15
|
-
DataTableState,
|
|
16
|
-
} from "./data-table";
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
Table,
|
|
20
|
-
TableBody,
|
|
21
|
-
TableCaption,
|
|
22
|
-
TableCell,
|
|
23
|
-
TableHead,
|
|
24
|
-
TableHeader,
|
|
25
|
-
TableRow,
|
|
26
|
-
} from "./table";
|
|
9
|
+
export type { DataTableColumn, DataTableProps, DataTableState, } from "./data-table";
|
|
10
|
+
export { Table, TableBody, TableCaption, TableCell, TableHead, TableHeader, TableRow, } from "./table";
|
|
27
11
|
export type { TableProps, TableSize } from "./table";
|
|
28
|
-
|
|
29
|
-
export {
|
|
30
|
-
tableCellTruncateClassName,
|
|
31
|
-
tableCellWrapClassName,
|
|
32
|
-
tableMinWidthWideClassName,
|
|
33
|
-
tableNarrowContainerClassName,
|
|
34
|
-
} from "./table-layout";
|
|
12
|
+
export { tableCellTruncateClassName, tableCellWrapClassName, tableMinWidthWideClassName, tableNarrowContainerClassName, } from "./table-layout";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { C, D, a, T, b, c, d, e, f, g, h, t, i, j, k } from "../chunks/table-layout.js";
|
|
2
|
+
const COMPONENTS_CATEGORY = "data-display";
|
|
3
|
+
export {
|
|
4
|
+
COMPONENTS_CATEGORY,
|
|
5
|
+
C as CodePanel,
|
|
6
|
+
D as DataTable,
|
|
7
|
+
a as DescriptionList,
|
|
8
|
+
T as Table,
|
|
9
|
+
b as TableBody,
|
|
10
|
+
c as TableCaption,
|
|
11
|
+
d as TableCell,
|
|
12
|
+
e as TableHead,
|
|
13
|
+
f as TableHeader,
|
|
14
|
+
g as TableRow,
|
|
15
|
+
h as codePanelVariants,
|
|
16
|
+
t as tableCellTruncateClassName,
|
|
17
|
+
i as tableCellWrapClassName,
|
|
18
|
+
j as tableMinWidthWideClassName,
|
|
19
|
+
k as tableNarrowContainerClassName
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Wrap long cell content without forcing page-level horizontal overflow. */
|
|
2
|
+
export declare const tableCellWrapClassName = "min-w-0 [overflow-wrap:anywhere]";
|
|
3
|
+
/** Truncate overflowing cell content with ellipsis. */
|
|
4
|
+
export declare const tableCellTruncateClassName = "block min-w-0 max-w-full truncate whitespace-nowrap";
|
|
5
|
+
/** Minimum table width for wide datasets; pair with a narrow scroll container. */
|
|
6
|
+
export declare const tableMinWidthWideClassName = "min-w-2xl";
|
|
7
|
+
/** Scroll container classes for narrow viewport table containment. */
|
|
8
|
+
export declare const tableNarrowContainerClassName = "min-w-0 overscroll-x-contain";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type HTMLAttributes, type TableHTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from "react";
|
|
2
|
+
export type TableSize = "default" | "dense";
|
|
3
|
+
export interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
4
|
+
containerClassName?: string;
|
|
5
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
size?: TableSize;
|
|
7
|
+
}
|
|
8
|
+
export declare const Table: import("react").ForwardRefExoticComponent<TableProps & import("react").RefAttributes<HTMLTableElement>>;
|
|
9
|
+
export declare const TableHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
10
|
+
export declare const TableBody: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
11
|
+
export declare const TableRow: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableRowElement> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
12
|
+
export declare const TableHead: import("react").ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
13
|
+
export declare const TableCell: import("react").ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
14
|
+
export declare const TableCaption: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes } from "react";
|
|
2
|
+
export declare const FACTORY_EMULATOR_SPEEDS: readonly [0.5, 1, 2, 4];
|
|
3
|
+
export type FactoryEmulatorSpeed = (typeof FACTORY_EMULATOR_SPEEDS)[number];
|
|
4
|
+
export type FactoryEmulatorAction = "pause" | "play" | "restart" | "step";
|
|
5
|
+
export interface FactoryEmulatorRuntimeStatus {
|
|
6
|
+
label: string;
|
|
7
|
+
tone?: "danger" | "neutral" | "success" | "warning";
|
|
8
|
+
}
|
|
9
|
+
export interface FactoryEmulatorControlsProps extends Omit<HTMLAttributes<HTMLElement>, "onChange"> {
|
|
10
|
+
disabledActions?: readonly FactoryEmulatorAction[];
|
|
11
|
+
isPlaying: boolean;
|
|
12
|
+
onPause: () => void;
|
|
13
|
+
onPlay: () => void;
|
|
14
|
+
onRestart: () => void;
|
|
15
|
+
onSpeedChange: (speed: FactoryEmulatorSpeed) => void;
|
|
16
|
+
onStep: () => void;
|
|
17
|
+
runtimeStatus: FactoryEmulatorRuntimeStatus;
|
|
18
|
+
showPlaybackActions?: boolean;
|
|
19
|
+
showRuntimeStatus?: boolean;
|
|
20
|
+
showSpeedControl?: boolean;
|
|
21
|
+
speed: FactoryEmulatorSpeed;
|
|
22
|
+
}
|
|
23
|
+
export declare function FactoryEmulatorControls({ className, disabledActions, isPlaying, onPause, onPlay, onRestart, onSpeedChange, onStep, runtimeStatus, showPlaybackActions, showRuntimeStatus, showSpeedControl, speed, ...props }: FactoryEmulatorControlsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Controlled, host-state-owned Factory emulator visualizer components. */
|
|
2
|
+
/** Stable category path for `@you-agent-factory/components/factory-emulator`. */
|
|
3
|
+
export declare const COMPONENTS_CATEGORY: "factory-emulator";
|
|
4
|
+
export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
|
|
5
|
+
export { FactoryEmulatorControls } from "./factory-emulator-controls";
|
|
6
|
+
export type { FactoryEmulatorAction, FactoryEmulatorControlsProps, FactoryEmulatorRuntimeStatus, FactoryEmulatorSpeed, } from "./factory-emulator-controls";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlertPanelTone, AlertPanelVariant } from "./alert-panel";
|
|
2
|
+
export type AlertPanelSemanticVariant = "danger" | "empty" | "error" | "info" | "loading" | "neutral" | "success" | "warning";
|
|
3
|
+
export interface AlertPanelSemanticConfig {
|
|
4
|
+
busy?: boolean;
|
|
5
|
+
role: "alert" | "status";
|
|
6
|
+
statusLabel?: string;
|
|
7
|
+
tone: AlertPanelTone;
|
|
8
|
+
variant: AlertPanelVariant;
|
|
9
|
+
}
|
|
10
|
+
export declare const ALERT_PANEL_SEMANTIC_CONFIG: Record<AlertPanelSemanticVariant, AlertPanelSemanticConfig>;
|
|
11
|
+
export declare function resolveAlertPanelSemantic(semantic: AlertPanelSemanticVariant): AlertPanelSemanticConfig;
|