@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.
Files changed (182) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +38 -7
  3. package/dist/category-paths.d.ts +3 -0
  4. package/dist/charts/chart-state-panel.d.ts +11 -0
  5. package/dist/charts/chart.d.ts +35 -0
  6. package/dist/charts/index.d.ts +5 -0
  7. package/dist/charts/index.js +287 -0
  8. package/dist/chunks/action-row.js +39 -0
  9. package/dist/chunks/alert-panel.js +182 -0
  10. package/dist/chunks/button.js +193 -0
  11. package/dist/chunks/cn.js +6 -0
  12. package/dist/chunks/factory-emulator-controls.js +123 -0
  13. package/dist/chunks/package-form-field.js +546 -0
  14. package/dist/chunks/scroll-area.js +261 -0
  15. package/dist/chunks/surface-panel.js +73 -0
  16. package/dist/chunks/table-layout.js +292 -0
  17. package/dist/chunks/typography-roles.js +26 -0
  18. package/dist/chunks/typography.js +129 -0
  19. package/dist/chunks/widget-frame.js +344 -0
  20. package/dist/data-display/code-panel.d.ts +12 -0
  21. package/dist/data-display/data-table.d.ts +27 -0
  22. package/dist/data-display/description-list.d.ts +4 -0
  23. package/{src/data-display/index.ts → dist/data-display/index.d.ts} +4 -26
  24. package/dist/data-display/index.js +20 -0
  25. package/dist/data-display/table-layout.d.ts +8 -0
  26. package/dist/data-display/table.d.ts +14 -0
  27. package/dist/factory-emulator/factory-emulator-controls.d.ts +23 -0
  28. package/dist/factory-emulator/index.d.ts +6 -0
  29. package/dist/factory-emulator/index.js +6 -0
  30. package/dist/feedback/alert-panel-semantics.d.ts +11 -0
  31. package/dist/feedback/alert-panel.d.ts +29 -0
  32. package/dist/feedback/index.d.ts +6 -0
  33. package/dist/feedback/index.js +10 -0
  34. package/dist/feedback/skeleton.d.ts +2 -0
  35. package/dist/forms/index.d.ts +19 -0
  36. package/dist/forms/index.js +37 -0
  37. package/dist/forms/package-checkbox.d.ts +3 -0
  38. package/dist/forms/package-enum-select.d.ts +42 -0
  39. package/dist/forms/package-file-input.d.ts +3 -0
  40. package/dist/forms/package-form-field.d.ts +49 -0
  41. package/dist/forms/package-input.d.ts +6 -0
  42. package/dist/forms/package-native-select.d.ts +3 -0
  43. package/dist/forms/package-select.d.ts +32 -0
  44. package/dist/forms/package-textarea.d.ts +10 -0
  45. package/dist/forms/select-icons.d.ts +3 -0
  46. package/dist/graphs/graph-edge-path.d.ts +18 -0
  47. package/dist/graphs/graph-edge.d.ts +15 -0
  48. package/dist/graphs/graph-node-button.d.ts +11 -0
  49. package/dist/graphs/graph-node-handle-badge.d.ts +5 -0
  50. package/dist/graphs/graph-node-handle.d.ts +18 -0
  51. package/dist/graphs/graph-node-shell.d.ts +13 -0
  52. package/dist/graphs/graph-node-state-indicator.d.ts +6 -0
  53. package/dist/graphs/graph-node-state.d.ts +23 -0
  54. package/dist/graphs/graph-viewport-surface.d.ts +5 -0
  55. package/dist/graphs/index.d.ts +13 -0
  56. package/dist/graphs/index.js +614 -0
  57. package/{src/icons/index.ts → dist/icons/index.d.ts} +1 -2
  58. package/dist/icons/index.js +4 -0
  59. package/dist/index.d.ts +26 -0
  60. package/dist/index.js +145 -0
  61. package/dist/layout/action-row.d.ts +8 -0
  62. package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -3
  63. package/dist/layout/index.js +9 -0
  64. package/dist/layout/surface-panel.d.ts +15 -0
  65. package/{src/navigation/index.ts → dist/navigation/index.d.ts} +1 -2
  66. package/dist/navigation/index.js +4 -0
  67. package/dist/overlays/collapsible.d.ts +5 -0
  68. package/dist/overlays/dialog.d.ts +16 -0
  69. package/dist/overlays/index.d.ts +10 -0
  70. package/dist/overlays/index.js +27 -0
  71. package/dist/overlays/overlay-layout.d.ts +6 -0
  72. package/dist/overlays/popover.d.ts +6 -0
  73. package/dist/overlays/scroll-area.d.ts +9 -0
  74. package/dist/primitives/button-link.d.ts +5 -0
  75. package/dist/primitives/button.d.ts +9 -0
  76. package/dist/primitives/icon-button-shell.d.ts +10 -0
  77. package/{src/primitives/index.ts → dist/primitives/index.d.ts} +2 -19
  78. package/dist/primitives/index.js +49 -0
  79. package/dist/primitives/package-text.d.ts +6 -0
  80. package/dist/primitives/typography-roles.d.ts +12 -0
  81. package/dist/primitives/typography.d.ts +36 -0
  82. package/dist/recipes/index.d.ts +14 -0
  83. package/dist/recipes/index.js +32 -0
  84. package/dist/recipes/widget-frame-content.d.ts +24 -0
  85. package/dist/recipes/widget-frame-disclosure.d.ts +33 -0
  86. package/dist/recipes/widget-frame-layout.d.ts +12 -0
  87. package/dist/recipes/widget-frame-skeleton.d.ts +2 -0
  88. package/dist/recipes/widget-frame-states.d.ts +15 -0
  89. package/dist/recipes/widget-frame-typography.d.ts +10 -0
  90. package/dist/recipes/widget-frame.d.ts +12 -0
  91. package/{src → dist}/styles.css +36 -0
  92. package/dist/testing/index.d.ts +4 -0
  93. package/dist/testing/index.js +16 -0
  94. package/dist/testing/render.d.ts +5 -0
  95. package/{src/tokens/index.ts → dist/tokens/index.d.ts} +1 -2
  96. package/dist/tokens/index.js +4 -0
  97. package/dist/utilities/cn.d.ts +1 -0
  98. package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -3
  99. package/dist/utilities/index.js +6 -0
  100. package/package.json +65 -64
  101. package/docs/README.md +0 -83
  102. package/docs/button.md +0 -119
  103. package/docs/charts.md +0 -325
  104. package/docs/data-display-code-panel.md +0 -120
  105. package/docs/feedback-alert-panel.md +0 -117
  106. package/docs/feedback-skeleton.md +0 -54
  107. package/docs/forms-form-field.md +0 -490
  108. package/docs/forms-input-primitives.md +0 -311
  109. package/docs/forms-select-primitives.md +0 -362
  110. package/docs/graphs.md +0 -250
  111. package/docs/layout-display-primitives.md +0 -211
  112. package/docs/overlays.md +0 -414
  113. package/docs/table-data-table.md +0 -331
  114. package/docs/typography-roles.md +0 -182
  115. package/docs/widget-frame-recipes.md +0 -273
  116. package/src/category-paths.ts +0 -20
  117. package/src/charts/chart-state-panel.tsx +0 -103
  118. package/src/charts/chart.tsx +0 -287
  119. package/src/charts/index.ts +0 -21
  120. package/src/data-display/code-panel.tsx +0 -67
  121. package/src/data-display/data-table.tsx +0 -180
  122. package/src/data-display/description-list.tsx +0 -24
  123. package/src/data-display/table-layout.ts +0 -12
  124. package/src/data-display/table.tsx +0 -131
  125. package/src/feedback/alert-panel-semantics.ts +0 -75
  126. package/src/feedback/alert-panel.tsx +0 -187
  127. package/src/feedback/index.ts +0 -21
  128. package/src/feedback/skeleton.tsx +0 -16
  129. package/src/forms/index.ts +0 -73
  130. package/src/forms/package-checkbox.tsx +0 -50
  131. package/src/forms/package-enum-select.tsx +0 -185
  132. package/src/forms/package-file-input.tsx +0 -25
  133. package/src/forms/package-form-field.tsx +0 -202
  134. package/src/forms/package-input.tsx +0 -25
  135. package/src/forms/package-native-select.tsx +0 -25
  136. package/src/forms/package-select.tsx +0 -209
  137. package/src/forms/package-textarea.tsx +0 -35
  138. package/src/forms/select-icons.tsx +0 -35
  139. package/src/graphs/graph-edge-path.ts +0 -241
  140. package/src/graphs/graph-edge.tsx +0 -130
  141. package/src/graphs/graph-interactive-example.tsx +0 -187
  142. package/src/graphs/graph-node-button.tsx +0 -51
  143. package/src/graphs/graph-node-handle-badge.tsx +0 -108
  144. package/src/graphs/graph-node-handle.ts +0 -28
  145. package/src/graphs/graph-node-shell.tsx +0 -111
  146. package/src/graphs/graph-node-state-indicator.tsx +0 -47
  147. package/src/graphs/graph-node-state.ts +0 -111
  148. package/src/graphs/graph-viewport-surface.tsx +0 -27
  149. package/src/graphs/index.ts +0 -41
  150. package/src/index.ts +0 -209
  151. package/src/layout/action-row.tsx +0 -53
  152. package/src/layout/surface-panel.tsx +0 -91
  153. package/src/overlays/collapsible.tsx +0 -22
  154. package/src/overlays/dialog.tsx +0 -148
  155. package/src/overlays/index.ts +0 -31
  156. package/src/overlays/overlay-layout.ts +0 -9
  157. package/src/overlays/popover.tsx +0 -29
  158. package/src/overlays/scroll-area.tsx +0 -78
  159. package/src/primitives/button-link.tsx +0 -22
  160. package/src/primitives/button.tsx +0 -258
  161. package/src/primitives/icon-button-shell.tsx +0 -49
  162. package/src/primitives/package-text.tsx +0 -29
  163. package/src/primitives/typography-roles.ts +0 -12
  164. package/src/primitives/typography.tsx +0 -165
  165. package/src/recipes/index.ts +0 -61
  166. package/src/recipes/widget-frame-content.tsx +0 -114
  167. package/src/recipes/widget-frame-disclosure.tsx +0 -161
  168. package/src/recipes/widget-frame-layout.ts +0 -40
  169. package/src/recipes/widget-frame-skeleton.tsx +0 -16
  170. package/src/recipes/widget-frame-states.tsx +0 -99
  171. package/src/recipes/widget-frame-typography.ts +0 -19
  172. package/src/recipes/widget-frame.tsx +0 -84
  173. package/src/testing/index.ts +0 -13
  174. package/src/testing/render.tsx +0 -16
  175. package/src/utilities/cn.ts +0 -5
  176. /package/{src → dist}/styles/color-palette-presets.css +0 -0
  177. /package/{src → dist}/styles/color-role-tokens.css +0 -0
  178. /package/{src → dist}/styles/layout-role-tokens.css +0 -0
  179. /package/{src → dist}/styles/text-color-role-tokens.css +0 -0
  180. /package/{src → dist}/styles/typography-role-tokens.css +0 -0
  181. /package/{src → dist}/styles/typography-role-utilities.css +0 -0
  182. /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 = "data-display" as const;
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
- DataTableColumn,
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,6 @@
1
+ import { F } from "../chunks/factory-emulator-controls.js";
2
+ const COMPONENTS_CATEGORY = "factory-emulator";
3
+ export {
4
+ COMPONENTS_CATEGORY,
5
+ F as FactoryEmulatorControls
6
+ };
@@ -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;