@xenosystem/components 0.8.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/catalog.json CHANGED
@@ -360,7 +360,7 @@
360
360
  {
361
361
  "name": "IconButton",
362
362
  "file": "controls.tsx",
363
- "doc": "A square icon-only button — the toolbar/row workhorse.\r\n\n@example\r\n```tsx\r\n<IconButton icon={<TrashGlyph />} label=\"Delete layer\" onClick={remove} disabled={!selection} />\r\n```",
363
+ "doc": "A square icon-only button — the toolbar/row workhorse.\n\n@example\n```tsx\n<IconButton icon={<TrashGlyph />} label=\"Delete layer\" onClick={remove} disabled={!selection} />\n```",
364
364
  "props": "IconButtonProps",
365
365
  "propList": [
366
366
  {
@@ -410,7 +410,7 @@
410
410
  {
411
411
  "name": "TextButton",
412
412
  "file": "controls.tsx",
413
- "doc": "A borderless text action — the inline `+ Add` / `Clear` / `Unbind` affordance. Muted by default so\r\nit reads as secondary; `strong` promotes it. Never a filled button: `DESIGN_SYSTEM.md` §7 allows\r\nexactly one primary action on screen and a panel is rarely the place for it.",
413
+ "doc": "A borderless text action — the inline `+ Add` / `Clear` / `Unbind` affordance. Muted by default so\nit reads as secondary; `strong` promotes it. Never a filled button: `DESIGN_SYSTEM.md` §7 allows\nexactly one primary action on screen and a panel is rarely the place for it.",
414
414
  "props": "TextButtonProps",
415
415
  "propList": [
416
416
  {
@@ -448,7 +448,7 @@
448
448
  {
449
449
  "name": "SearchField",
450
450
  "file": "controls.tsx",
451
- "doc": "The canonical filter input: recessed well, leading glyph, Escape-to-clear, and a clear button\r\nthat only appears when there is something to clear.\r\n\n@example\r\n```tsx\r\n<SearchField value={query} onChange={setQuery} placeholder=\"Filter layers…\" />\r\n```",
451
+ "doc": "The canonical filter input: recessed well, leading glyph, Escape-to-clear, and a clear button\nthat only appears when there is something to clear.\n\n@example\n```tsx\n<SearchField value={query} onChange={setQuery} placeholder=\"Filter layers…\" />\n```",
452
452
  "props": "SearchFieldProps",
453
453
  "propList": [
454
454
  {
@@ -554,7 +554,7 @@
554
554
  {
555
555
  "name": "Toggle",
556
556
  "file": "controls.tsx",
557
- "doc": "The signature XENO toggle: a rectangular track with a SQUARE knob whose corner radius softens\r\nwhen it moves to the ON position (DESIGN_SYSTEM §3 \"The Toggle Switch\"). Never a pill.",
557
+ "doc": "The signature XENO toggle: a rectangular track with a SQUARE knob whose corner radius softens\nwhen it moves to the ON position (DESIGN_SYSTEM §3 \"The Toggle Switch\"). Never a pill.",
558
558
  "props": "ToggleProps",
559
559
  "propList": [
560
560
  {
@@ -598,7 +598,7 @@
598
598
  {
599
599
  "name": "FieldGroup",
600
600
  "file": "controls.tsx",
601
- "doc": "A label-column layout: every {@link Field} inside shares ONE label width, so labels start at the\r\nsame x and controls end at the same x — the column alignment DESIGN_SYSTEM §5 requires and the\r\nthing hand-rolled property grids always get wrong.\r\n\n@example\r\n```tsx\r\n<FieldGroup labelWidth={64}>\r\n <Field label=\"Opacity\"><Slider … /></Field>\r\n <Field label=\"Blend\"><Select … /></Field>\r\n</FieldGroup>\r\n```",
601
+ "doc": "A label-column layout: every {@link Field} inside shares ONE label width, so labels start at the\nsame x and controls end at the same x — the column alignment DESIGN_SYSTEM §5 requires and the\nthing hand-rolled property grids always get wrong.\n\n@example\n```tsx\n<FieldGroup labelWidth={64}>\n <Field label=\"Opacity\"><Slider … /></Field>\n <Field label=\"Blend\"><Select … /></Field>\n</FieldGroup>\n```",
602
602
  "props": "FieldGroupProps",
603
603
  "propList": [
604
604
  {
@@ -665,6 +665,68 @@
665
665
  }
666
666
  ]
667
667
  },
668
+ {
669
+ "name": "Composer",
670
+ "file": "controls.tsx",
671
+ "doc": "",
672
+ "props": "ComposerProps",
673
+ "propList": [
674
+ {
675
+ "name": "value",
676
+ "type": "string",
677
+ "optional": false,
678
+ "doc": "Controlled draft."
679
+ },
680
+ {
681
+ "name": "onChange",
682
+ "type": "(value: string) => void",
683
+ "optional": false,
684
+ "doc": "Every keystroke."
685
+ },
686
+ {
687
+ "name": "onSubmit",
688
+ "type": "() => void",
689
+ "optional": true,
690
+ "doc": "Enter (or Shift+Enter when `submitOnEnter` is false) — the caller decides what \"submit\" means."
691
+ },
692
+ {
693
+ "name": "placeholder",
694
+ "type": "string",
695
+ "optional": true,
696
+ "doc": ""
697
+ },
698
+ {
699
+ "name": "label",
700
+ "type": "string",
701
+ "optional": true,
702
+ "doc": "Accessible name; defaults to the placeholder."
703
+ },
704
+ {
705
+ "name": "submitOnEnter",
706
+ "type": "boolean",
707
+ "optional": true,
708
+ "doc": "Enter submits and Shift+Enter breaks the line (the chat convention). `false` swaps them."
709
+ },
710
+ {
711
+ "name": "disabled",
712
+ "type": "boolean",
713
+ "optional": true,
714
+ "doc": ""
715
+ },
716
+ {
717
+ "name": "autoFocus",
718
+ "type": "boolean",
719
+ "optional": true,
720
+ "doc": ""
721
+ },
722
+ {
723
+ "name": "className",
724
+ "type": "string",
725
+ "optional": true,
726
+ "doc": ""
727
+ }
728
+ ]
729
+ },
668
730
  {
669
731
  "name": "PanelFrame",
670
732
  "file": "frame.tsx",
@@ -182,7 +182,7 @@ declare function Section({ title, children, badge, actions, collapsible, collaps
182
182
  * (Section, RowList/Row, Toolbar, StatTile, ProportionBar, EmptyState, LoadingState, ErrorState,
183
183
  * StatusBadge, IconFrame …), re-cut for dense in-panel density rather than dashboard-page density.
184
184
  *
185
- * Modifiers use BEM's double dash (`xeno-row--selected`), matching workflow's existing
185
+ * Modifiers use BEM's double dash (`xc-row--selected`), matching workflow's existing
186
186
  * `xeno-panel-content--no-header`.
187
187
  *
188
188
  * @module
@@ -198,101 +198,101 @@ declare const CLS_PANEL_CONTENT = "xeno-panel-content";
198
198
  /** Applied to the content well when the frame renders no header. */
199
199
  declare const CLS_PANEL_CONTENT_NO_HEADER = "xeno-panel-content--no-header";
200
200
  /** Horizontal control strip (`left` / `right` clusters). */
201
- declare const CLS_TOOLBAR = "xeno-toolbar";
201
+ declare const CLS_TOOLBAR = "xc-toolbar";
202
202
  /** A cluster of controls inside a toolbar. */
203
- declare const CLS_TOOLBAR_GROUP = "xeno-toolbar-group";
203
+ declare const CLS_TOOLBAR_GROUP = "xc-toolbar-group";
204
204
  /** Footer strip: counts on the left, state on the right. */
205
- declare const CLS_STATUSBAR = "xeno-statusbar";
205
+ declare const CLS_STATUSBAR = "xc-statusbar";
206
206
  /** 1px hairline; `--vertical` for an inline separator inside a toolbar. */
207
- declare const CLS_DIVIDER = "xeno-divider";
207
+ declare const CLS_DIVIDER = "xc-divider";
208
208
  /** Collapsible titled group. */
209
- declare const CLS_SECTION = "xeno-section";
209
+ declare const CLS_SECTION = "xc-section";
210
210
  /** The section's header row. */
211
- declare const CLS_SECTION_HEADER = "xeno-section-header";
211
+ declare const CLS_SECTION_HEADER = "xc-section-header";
212
212
  /** The `<button>` inside the header that toggles collapse (siblings stay outside it — see `Section`). */
213
- declare const CLS_SECTION_TRIGGER = "xeno-section-trigger";
213
+ declare const CLS_SECTION_TRIGGER = "xc-section-trigger";
214
214
  /** Disclosure chevron wrapper (rotates via the `--collapsed` modifier). */
215
- declare const CLS_SECTION_CHEVRON = "xeno-section-chevron";
215
+ declare const CLS_SECTION_CHEVRON = "xc-section-chevron";
216
216
  /** Uppercase section label. */
217
- declare const CLS_SECTION_TITLE = "xeno-section-title";
217
+ declare const CLS_SECTION_TITLE = "xc-section-title";
218
218
  /** Trailing cluster in the section header (badge + actions + toggle). */
219
- declare const CLS_SECTION_ACTIONS = "xeno-section-actions";
219
+ declare const CLS_SECTION_ACTIONS = "xc-section-actions";
220
220
  /** The section's body. */
221
- declare const CLS_SECTION_BODY = "xeno-section-body";
221
+ declare const CLS_SECTION_BODY = "xc-section-body";
222
222
  /** Hairline-divided vertical list container. */
223
- declare const CLS_ROWLIST = "xeno-rowlist";
223
+ declare const CLS_ROWLIST = "xc-rowlist";
224
224
  /** A single dense row. */
225
- declare const CLS_ROW = "xeno-row";
225
+ declare const CLS_ROW = "xc-row";
226
226
  /** Fixed-width leading icon slot (keeps labels in one column — DESIGN_SYSTEM §5). */
227
- declare const CLS_ROW_ICON = "xeno-row-icon";
227
+ declare const CLS_ROW_ICON = "xc-row-icon";
228
228
  /** The row's flexible label column. */
229
- declare const CLS_ROW_LABEL = "xeno-row-label";
229
+ declare const CLS_ROW_LABEL = "xc-row-label";
230
230
  /** Secondary text after the label. */
231
- declare const CLS_ROW_META = "xeno-row-meta";
231
+ declare const CLS_ROW_META = "xc-row-meta";
232
232
  /** Right-aligned trailing slot. */
233
- declare const CLS_ROW_TRAILING = "xeno-row-trailing";
233
+ declare const CLS_ROW_TRAILING = "xc-row-trailing";
234
234
  /** Square icon-only button. */
235
- declare const CLS_ICON_BUTTON = "xeno-iconbtn";
235
+ declare const CLS_ICON_BUTTON = "xc-iconbtn";
236
236
  /** Borderless inline text action (`+ Add`, `Clear`, `Unbind`). */
237
- declare const CLS_TEXT_BUTTON = "xeno-textbtn";
237
+ declare const CLS_TEXT_BUTTON = "xc-textbtn";
238
238
  /** Search / filter input wrapper. */
239
- declare const CLS_SEARCH = "xeno-search";
239
+ declare const CLS_SEARCH = "xc-search";
240
240
  /** The `<input>` inside a search field. */
241
- declare const CLS_SEARCH_INPUT = "xeno-search-input";
241
+ declare const CLS_SEARCH_INPUT = "xc-search-input";
242
242
  /** Segmented (radio-group) control. */
243
- declare const CLS_SEGMENTED = "xeno-segmented";
243
+ declare const CLS_SEGMENTED = "xc-segmented";
244
244
  /** One segment button. */
245
- declare const CLS_SEGMENT = "xeno-segment";
245
+ declare const CLS_SEGMENT = "xc-segment";
246
246
  /** The signature XENO toggle (rectangular track, square knob). */
247
- declare const CLS_TOGGLE = "xeno-toggle";
247
+ declare const CLS_TOGGLE = "xc-toggle";
248
248
  /** The toggle's knob. */
249
- declare const CLS_TOGGLE_KNOB = "xeno-toggle-knob";
249
+ declare const CLS_TOGGLE_KNOB = "xc-toggle-knob";
250
250
  /** Label-column field group (all labels share one width). */
251
- declare const CLS_FIELD_GROUP = "xeno-fieldgroup";
251
+ declare const CLS_FIELD_GROUP = "xc-fieldgroup";
252
252
  /** One label + control row. */
253
- declare const CLS_FIELD = "xeno-field";
253
+ declare const CLS_FIELD = "xc-field";
254
254
  /** The field's label cell. */
255
- declare const CLS_FIELD_LABEL = "xeno-field-label";
255
+ declare const CLS_FIELD_LABEL = "xc-field-label";
256
256
  /** The field's control cell. */
257
- declare const CLS_FIELD_CONTROL = "xeno-field-control";
257
+ declare const CLS_FIELD_CONTROL = "xc-field-control";
258
258
  /** Muted hint under a field. */
259
- declare const CLS_FIELD_HINT = "xeno-field-hint";
259
+ declare const CLS_FIELD_HINT = "xc-field-hint";
260
260
  /** Centered zero-content state. */
261
- declare const CLS_EMPTY = "xeno-empty";
261
+ declare const CLS_EMPTY = "xc-empty";
262
262
  /** Centered busy state. */
263
- declare const CLS_LOADING = "xeno-loading";
263
+ declare const CLS_LOADING = "xc-loading";
264
264
  /** Centered failure state. */
265
- declare const CLS_ERROR = "xeno-error";
265
+ declare const CLS_ERROR = "xc-error";
266
266
  /** Shared container for the three states above. */
267
- declare const CLS_STATE = "xeno-state";
267
+ declare const CLS_STATE = "xc-state";
268
268
  /** The state's icon chip. */
269
- declare const CLS_STATE_ICON = "xeno-state-icon";
269
+ declare const CLS_STATE_ICON = "xc-state-icon";
270
270
  /** The state's headline. */
271
- declare const CLS_STATE_TITLE = "xeno-state-title";
271
+ declare const CLS_STATE_TITLE = "xc-state-title";
272
272
  /** The state's supporting line — the ACTIONABLE hint. */
273
- declare const CLS_STATE_HINT = "xeno-state-hint";
273
+ declare const CLS_STATE_HINT = "xc-state-hint";
274
274
  /** Indeterminate progress bar used by the loading state (no spinner — no circles). */
275
- declare const CLS_STATE_PROGRESS = "xeno-state-progress";
275
+ declare const CLS_STATE_PROGRESS = "xc-state-progress";
276
276
  /** Small rectangular status/metadata chip. */
277
- declare const CLS_BADGE = "xeno-badge";
277
+ declare const CLS_BADGE = "xc-badge";
278
278
  /** 2px-radius square status dot (never a circle). */
279
- declare const CLS_DOT = "xeno-dot";
279
+ declare const CLS_DOT = "xc-dot";
280
280
  /** Flat outlined icon container. */
281
- declare const CLS_ICON_FRAME = "xeno-iconframe";
281
+ declare const CLS_ICON_FRAME = "xc-iconframe";
282
282
  /** Label + big value tile. */
283
- declare const CLS_STAT = "xeno-stat";
283
+ declare const CLS_STAT = "xc-stat";
284
284
  /** The stat's uppercase label row. */
285
- declare const CLS_STAT_LABEL = "xeno-stat-label";
285
+ declare const CLS_STAT_LABEL = "xc-stat-label";
286
286
  /** The stat's value. */
287
- declare const CLS_STAT_VALUE = "xeno-stat-value";
287
+ declare const CLS_STAT_VALUE = "xc-stat-value";
288
288
  /** The stat's sub-line. */
289
- declare const CLS_STAT_SUB = "xeno-stat-sub";
289
+ declare const CLS_STAT_SUB = "xc-stat-sub";
290
290
  /** Horizontal stacked proportion bar (replaces a pie/donut — no circles). */
291
- declare const CLS_BAR = "xeno-bar";
291
+ declare const CLS_BAR = "xc-bar";
292
292
  /** One segment of a proportion bar. */
293
- declare const CLS_BAR_SEGMENT = "xeno-bar-segment";
293
+ declare const CLS_BAR_SEGMENT = "xc-bar-segment";
294
294
  /** Scroll container with the canonical thin rectangular thumb. */
295
- declare const CLS_SCROLL = "xeno-scroll";
295
+ declare const CLS_SCROLL = "xc-scroll";
296
296
  /**
297
297
  * Semantic tone for badges, dots and states. `neutral` is the default and the only tone that is
298
298
  * purely monochromatic; the other four are the ONLY places DESIGN_SYSTEM permits chromatic color
@@ -652,6 +652,32 @@ interface FieldProps {
652
652
  }
653
653
  /** One label + control row inside a {@link FieldGroup}. */
654
654
  declare function Field({ label, children, hint, htmlFor, stacked, className, }: FieldProps): ReactNode;
655
+ /** Props for {@link Composer}. */
656
+ interface ComposerProps {
657
+ /** Controlled draft. */
658
+ value: string;
659
+ /** Every keystroke. */
660
+ onChange: (value: string) => void;
661
+ /** Enter (or Shift+Enter when `submitOnEnter` is false) — the caller decides what "submit" means. */
662
+ onSubmit?: () => void;
663
+ placeholder?: string;
664
+ /** Accessible name; defaults to the placeholder. */
665
+ label?: string;
666
+ /** Enter submits and Shift+Enter breaks the line (the chat convention). `false` swaps them. */
667
+ submitOnEnter?: boolean;
668
+ disabled?: boolean;
669
+ autoFocus?: boolean;
670
+ className?: string;
671
+ }
672
+ /**
673
+ * The message box a person types a turn into — the agent panel's composer, a comment box. One unit so
674
+ * the submit convention is decided ONCE (Enter sends, Shift+Enter breaks) and every block agrees.
675
+ * Extracted 2026-09-18 from the agent block's raw `<textarea>` — the one part of that view that was
676
+ * not a chrome unit, which is what stood between it and being a declaration (xeno-apps SPEC §8d).
677
+ */
678
+ /** The submit convention, as a pure decision so it is testable and shared: Enter sends, Shift+Enter breaks. */
679
+ declare function composerWantsSubmit(key: string, shiftKey: boolean, submitOnEnter?: boolean): boolean;
680
+ declare function Composer({ value, onChange, onSubmit, placeholder, label, submitOnEnter, disabled, autoFocus, className, }: ComposerProps): ReactNode;
655
681
 
656
682
  /**
657
683
  * The three terminal states: `EmptyState`, `LoadingState`, `ErrorState`.
@@ -1131,6 +1157,7 @@ declare const COMPONENTS: {
1131
1157
  readonly 'chrome/IconButton': typeof IconButton;
1132
1158
  readonly 'chrome/TextButton': typeof TextButton;
1133
1159
  readonly 'chrome/SearchField': typeof SearchField;
1160
+ readonly 'chrome/Composer': typeof Composer;
1134
1161
  readonly 'chrome/SegmentedControl': typeof SegmentedControl;
1135
1162
  readonly 'chrome/Toggle': typeof Toggle;
1136
1163
  readonly 'chrome/FieldGroup': typeof FieldGroup;
@@ -1178,4 +1205,4 @@ interface GalleryEntry {
1178
1205
  /** The entries, one per unit × state. Adding a unit to {@link COMPONENTS} without an entry here fails the family's test. */
1179
1206
  declare function gallery(): GalleryEntry[];
1180
1207
 
1181
- export { Badge, type BadgeProps, CLS_BADGE, CLS_BAR, CLS_BAR_SEGMENT, CLS_DIVIDER, CLS_DOT, CLS_EMPTY, CLS_ERROR, CLS_FIELD, CLS_FIELD_CONTROL, CLS_FIELD_GROUP, CLS_FIELD_HINT, CLS_FIELD_LABEL, CLS_ICON_BUTTON, CLS_ICON_FRAME, CLS_LOADING, CLS_PANEL, CLS_PANEL_CONTENT, CLS_PANEL_CONTENT_NO_HEADER, CLS_PANEL_HEADER, CLS_PANEL_TITLE, CLS_ROW, CLS_ROWLIST, CLS_ROW_ICON, CLS_ROW_LABEL, CLS_ROW_META, CLS_ROW_TRAILING, CLS_SCROLL, CLS_SEARCH, CLS_SEARCH_INPUT, CLS_SECTION, CLS_SECTION_ACTIONS, CLS_SECTION_BODY, CLS_SECTION_CHEVRON, CLS_SECTION_HEADER, CLS_SECTION_TITLE, CLS_SECTION_TRIGGER, CLS_SEGMENT, CLS_SEGMENTED, CLS_STAT, CLS_STATE, CLS_STATE_HINT, CLS_STATE_ICON, CLS_STATE_PROGRESS, CLS_STATE_TITLE, CLS_STATUSBAR, CLS_STAT_LABEL, CLS_STAT_SUB, CLS_STAT_VALUE, CLS_TEXT_BUTTON, CLS_TOGGLE, CLS_TOGGLE_KNOB, CLS_TOOLBAR, CLS_TOOLBAR_GROUP, COMPONENTS, ChevronGlyph, ClearGlyph, Divider, type DividerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, Field, FieldGroup, type FieldGroupProps, type FieldProps, type GalleryEntry, IconButton, type IconButtonProps, IconFrame, type IconFrameProps, LoadingState, type LoadingStateProps, PANEL_COLORS, PANEL_DISABLED_OPACITY, PANEL_METRICS, PANEL_PRIMITIVES_CSS, PANEL_PRIMITIVES_STYLE_ID, PANEL_TONES, type PanelColors, PanelFrame, type PanelFrameProps, type PanelMetrics, type PanelTone, type PrimitivesInjectTarget, ProportionBar, type ProportionBarProps, type ProportionSegment, Row, RowList, type RowListProps, type RowProps, type RowState, ScrollArea, type ScrollAreaProps, SearchField, type SearchFieldProps, SearchGlyph, Section, type SectionProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, Sparkline, type SparklineProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, TextButton, type TextButtonProps, Toggle, type ToggleProps, Toolbar, ToolbarGroup, type ToolbarGroupProps, type ToolbarProps, badgeClass, cx, dotClass, ensurePanelPrimitivesInjected, gallery, iconButtonClass, nextSegmentValue, rowClass, sectionClass, usePanelPrimitives };
1208
+ export { Badge, type BadgeProps, CLS_BADGE, CLS_BAR, CLS_BAR_SEGMENT, CLS_DIVIDER, CLS_DOT, CLS_EMPTY, CLS_ERROR, CLS_FIELD, CLS_FIELD_CONTROL, CLS_FIELD_GROUP, CLS_FIELD_HINT, CLS_FIELD_LABEL, CLS_ICON_BUTTON, CLS_ICON_FRAME, CLS_LOADING, CLS_PANEL, CLS_PANEL_CONTENT, CLS_PANEL_CONTENT_NO_HEADER, CLS_PANEL_HEADER, CLS_PANEL_TITLE, CLS_ROW, CLS_ROWLIST, CLS_ROW_ICON, CLS_ROW_LABEL, CLS_ROW_META, CLS_ROW_TRAILING, CLS_SCROLL, CLS_SEARCH, CLS_SEARCH_INPUT, CLS_SECTION, CLS_SECTION_ACTIONS, CLS_SECTION_BODY, CLS_SECTION_CHEVRON, CLS_SECTION_HEADER, CLS_SECTION_TITLE, CLS_SECTION_TRIGGER, CLS_SEGMENT, CLS_SEGMENTED, CLS_STAT, CLS_STATE, CLS_STATE_HINT, CLS_STATE_ICON, CLS_STATE_PROGRESS, CLS_STATE_TITLE, CLS_STATUSBAR, CLS_STAT_LABEL, CLS_STAT_SUB, CLS_STAT_VALUE, CLS_TEXT_BUTTON, CLS_TOGGLE, CLS_TOGGLE_KNOB, CLS_TOOLBAR, CLS_TOOLBAR_GROUP, COMPONENTS, ChevronGlyph, ClearGlyph, Composer, type ComposerProps, Divider, type DividerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, Field, FieldGroup, type FieldGroupProps, type FieldProps, type GalleryEntry, IconButton, type IconButtonProps, IconFrame, type IconFrameProps, LoadingState, type LoadingStateProps, PANEL_COLORS, PANEL_DISABLED_OPACITY, PANEL_METRICS, PANEL_PRIMITIVES_CSS, PANEL_PRIMITIVES_STYLE_ID, PANEL_TONES, type PanelColors, PanelFrame, type PanelFrameProps, type PanelMetrics, type PanelTone, type PrimitivesInjectTarget, ProportionBar, type ProportionBarProps, type ProportionSegment, Row, RowList, type RowListProps, type RowProps, type RowState, ScrollArea, type ScrollAreaProps, SearchField, type SearchFieldProps, SearchGlyph, Section, type SectionProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, Sparkline, type SparklineProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, TextButton, type TextButtonProps, Toggle, type ToggleProps, Toolbar, ToolbarGroup, type ToolbarGroupProps, type ToolbarProps, badgeClass, composerWantsSubmit, cx, dotClass, ensurePanelPrimitivesInjected, gallery, iconButtonClass, nextSegmentValue, rowClass, sectionClass, usePanelPrimitives };
@@ -4,54 +4,55 @@ var CLS_PANEL_HEADER = "xeno-panel-header";
4
4
  var CLS_PANEL_TITLE = "xeno-panel-title";
5
5
  var CLS_PANEL_CONTENT = "xeno-panel-content";
6
6
  var CLS_PANEL_CONTENT_NO_HEADER = "xeno-panel-content--no-header";
7
- var CLS_TOOLBAR = "xeno-toolbar";
8
- var CLS_TOOLBAR_GROUP = "xeno-toolbar-group";
9
- var CLS_STATUSBAR = "xeno-statusbar";
10
- var CLS_DIVIDER = "xeno-divider";
11
- var CLS_SECTION = "xeno-section";
12
- var CLS_SECTION_HEADER = "xeno-section-header";
13
- var CLS_SECTION_TRIGGER = "xeno-section-trigger";
14
- var CLS_SECTION_CHEVRON = "xeno-section-chevron";
15
- var CLS_SECTION_TITLE = "xeno-section-title";
16
- var CLS_SECTION_ACTIONS = "xeno-section-actions";
17
- var CLS_SECTION_BODY = "xeno-section-body";
18
- var CLS_ROWLIST = "xeno-rowlist";
19
- var CLS_ROW = "xeno-row";
20
- var CLS_ROW_ICON = "xeno-row-icon";
21
- var CLS_ROW_LABEL = "xeno-row-label";
22
- var CLS_ROW_META = "xeno-row-meta";
23
- var CLS_ROW_TRAILING = "xeno-row-trailing";
24
- var CLS_ICON_BUTTON = "xeno-iconbtn";
25
- var CLS_TEXT_BUTTON = "xeno-textbtn";
26
- var CLS_SEARCH = "xeno-search";
27
- var CLS_SEARCH_INPUT = "xeno-search-input";
28
- var CLS_SEGMENTED = "xeno-segmented";
29
- var CLS_SEGMENT = "xeno-segment";
30
- var CLS_TOGGLE = "xeno-toggle";
31
- var CLS_TOGGLE_KNOB = "xeno-toggle-knob";
32
- var CLS_FIELD_GROUP = "xeno-fieldgroup";
33
- var CLS_FIELD = "xeno-field";
34
- var CLS_FIELD_LABEL = "xeno-field-label";
35
- var CLS_FIELD_CONTROL = "xeno-field-control";
36
- var CLS_FIELD_HINT = "xeno-field-hint";
37
- var CLS_EMPTY = "xeno-empty";
38
- var CLS_LOADING = "xeno-loading";
39
- var CLS_ERROR = "xeno-error";
40
- var CLS_STATE = "xeno-state";
41
- var CLS_STATE_ICON = "xeno-state-icon";
42
- var CLS_STATE_TITLE = "xeno-state-title";
43
- var CLS_STATE_HINT = "xeno-state-hint";
44
- var CLS_STATE_PROGRESS = "xeno-state-progress";
45
- var CLS_BADGE = "xeno-badge";
46
- var CLS_DOT = "xeno-dot";
47
- var CLS_ICON_FRAME = "xeno-iconframe";
48
- var CLS_STAT = "xeno-stat";
49
- var CLS_STAT_LABEL = "xeno-stat-label";
50
- var CLS_STAT_VALUE = "xeno-stat-value";
51
- var CLS_STAT_SUB = "xeno-stat-sub";
52
- var CLS_BAR = "xeno-bar";
53
- var CLS_BAR_SEGMENT = "xeno-bar-segment";
54
- var CLS_SCROLL = "xeno-scroll";
7
+ var CLS_TOOLBAR = "xc-toolbar";
8
+ var CLS_TOOLBAR_GROUP = "xc-toolbar-group";
9
+ var CLS_STATUSBAR = "xc-statusbar";
10
+ var CLS_DIVIDER = "xc-divider";
11
+ var CLS_SECTION = "xc-section";
12
+ var CLS_SECTION_HEADER = "xc-section-header";
13
+ var CLS_SECTION_TRIGGER = "xc-section-trigger";
14
+ var CLS_SECTION_CHEVRON = "xc-section-chevron";
15
+ var CLS_SECTION_TITLE = "xc-section-title";
16
+ var CLS_SECTION_ACTIONS = "xc-section-actions";
17
+ var CLS_SECTION_BODY = "xc-section-body";
18
+ var CLS_ROWLIST = "xc-rowlist";
19
+ var CLS_ROW = "xc-row";
20
+ var CLS_ROW_ICON = "xc-row-icon";
21
+ var CLS_ROW_LABEL = "xc-row-label";
22
+ var CLS_ROW_META = "xc-row-meta";
23
+ var CLS_ROW_TRAILING = "xc-row-trailing";
24
+ var CLS_ICON_BUTTON = "xc-iconbtn";
25
+ var CLS_TEXT_BUTTON = "xc-textbtn";
26
+ var CLS_SEARCH = "xc-search";
27
+ var CLS_SEARCH_INPUT = "xc-search-input";
28
+ var CLS_COMPOSER = "xc-composer";
29
+ var CLS_SEGMENTED = "xc-segmented";
30
+ var CLS_SEGMENT = "xc-segment";
31
+ var CLS_TOGGLE = "xc-toggle";
32
+ var CLS_TOGGLE_KNOB = "xc-toggle-knob";
33
+ var CLS_FIELD_GROUP = "xc-fieldgroup";
34
+ var CLS_FIELD = "xc-field";
35
+ var CLS_FIELD_LABEL = "xc-field-label";
36
+ var CLS_FIELD_CONTROL = "xc-field-control";
37
+ var CLS_FIELD_HINT = "xc-field-hint";
38
+ var CLS_EMPTY = "xc-empty";
39
+ var CLS_LOADING = "xc-loading";
40
+ var CLS_ERROR = "xc-error";
41
+ var CLS_STATE = "xc-state";
42
+ var CLS_STATE_ICON = "xc-state-icon";
43
+ var CLS_STATE_TITLE = "xc-state-title";
44
+ var CLS_STATE_HINT = "xc-state-hint";
45
+ var CLS_STATE_PROGRESS = "xc-state-progress";
46
+ var CLS_BADGE = "xc-badge";
47
+ var CLS_DOT = "xc-dot";
48
+ var CLS_ICON_FRAME = "xc-iconframe";
49
+ var CLS_STAT = "xc-stat";
50
+ var CLS_STAT_LABEL = "xc-stat-label";
51
+ var CLS_STAT_VALUE = "xc-stat-value";
52
+ var CLS_STAT_SUB = "xc-stat-sub";
53
+ var CLS_BAR = "xc-bar";
54
+ var CLS_BAR_SEGMENT = "xc-bar-segment";
55
+ var CLS_SCROLL = "xc-scroll";
55
56
  var PANEL_TONES = Object.freeze([
56
57
  "neutral",
57
58
  "info",
@@ -284,7 +285,7 @@ var PANEL_PRIMITIVES_CSS = `
284
285
 
285
286
  /* \u2500\u2500\u2500 2. Strips: toolbar, status bar, divider, scroll \u2500\u2500\u2500 */
286
287
 
287
- .xeno-toolbar {
288
+ .xc-toolbar {
288
289
  display: flex;
289
290
  align-items: center;
290
291
  gap: ${PANEL_METRICS.gutter}px;
@@ -298,21 +299,21 @@ var PANEL_PRIMITIVES_CSS = `
298
299
  font-size: ${PANEL_METRICS.fontBody}px;
299
300
  user-select: none;
300
301
  }
301
- .xeno-toolbar--flush {
302
+ .xc-toolbar--flush {
302
303
  border-bottom: none;
303
304
  }
304
- .xeno-toolbar-group {
305
+ .xc-toolbar-group {
305
306
  display: flex;
306
307
  align-items: center;
307
308
  gap: ${PANEL_METRICS.rowGap}px;
308
309
  min-width: 0;
309
310
  }
310
- .xeno-toolbar-group--end {
311
+ .xc-toolbar-group--end {
311
312
  margin-left: auto;
312
313
  flex: 0 0 auto;
313
314
  }
314
315
 
315
- .xeno-statusbar {
316
+ .xc-statusbar {
316
317
  display: flex;
317
318
  align-items: center;
318
319
  justify-content: space-between;
@@ -326,39 +327,39 @@ var PANEL_PRIMITIVES_CSS = `
326
327
  user-select: none;
327
328
  }
328
329
 
329
- .xeno-divider {
330
+ .xc-divider {
330
331
  flex: 0 0 auto;
331
332
  background: ${BORDER};
332
333
  height: 1px;
333
334
  width: 100%;
334
335
  }
335
- .xeno-divider--vertical {
336
+ .xc-divider--vertical {
336
337
  width: 1px;
337
338
  height: 12px;
338
339
  align-self: center;
339
340
  }
340
341
 
341
- .xeno-scroll {
342
+ .xc-scroll {
342
343
  flex: 1 1 auto;
343
344
  min-height: 0;
344
345
  overflow-y: auto;
345
346
  overflow-x: hidden;
346
347
  outline: none;
347
348
  }
348
- .xeno-scroll::-webkit-scrollbar {
349
+ .xc-scroll::-webkit-scrollbar {
349
350
  width: 10px;
350
351
  height: 10px;
351
352
  }
352
- .xeno-scroll::-webkit-scrollbar-track {
353
+ .xc-scroll::-webkit-scrollbar-track {
353
354
  background: transparent;
354
355
  }
355
- .xeno-scroll::-webkit-scrollbar-thumb {
356
+ .xc-scroll::-webkit-scrollbar-thumb {
356
357
  background: #3a3a3d;
357
358
  border: 3px solid transparent;
358
359
  background-clip: padding-box;
359
360
  border-radius: ${PANEL_METRICS.radius}px;
360
361
  }
361
- .xeno-scroll::-webkit-scrollbar-thumb:hover {
362
+ .xc-scroll::-webkit-scrollbar-thumb:hover {
362
363
  background: #555555;
363
364
  border: 3px solid transparent;
364
365
  background-clip: padding-box;
@@ -366,13 +367,13 @@ var PANEL_PRIMITIVES_CSS = `
366
367
 
367
368
  /* \u2500\u2500\u2500 3. Section \u2500\u2500\u2500 */
368
369
 
369
- .xeno-section {
370
+ .xc-section {
370
371
  display: flex;
371
372
  flex-direction: column;
372
373
  flex: 0 0 auto;
373
374
  min-width: 0;
374
375
  }
375
- .xeno-section-header {
376
+ .xc-section-header {
376
377
  display: flex;
377
378
  align-items: center;
378
379
  gap: ${PANEL_METRICS.rowGap}px;
@@ -382,7 +383,7 @@ var PANEL_PRIMITIVES_CSS = `
382
383
  background: ${PANEL_COLORS.wash};
383
384
  user-select: none;
384
385
  }
385
- .xeno-section-trigger {
386
+ .xc-section-trigger {
386
387
  display: flex;
387
388
  align-items: center;
388
389
  gap: ${PANEL_METRICS.rowGap}px;
@@ -398,10 +399,10 @@ var PANEL_PRIMITIVES_CSS = `
398
399
  cursor: pointer;
399
400
  }
400
401
  /* A non-collapsible header renders a <div> with this class, not a disabled button. */
401
- div.xeno-section-trigger {
402
+ div.xc-section-trigger {
402
403
  cursor: default;
403
404
  }
404
- .xeno-section-chevron {
405
+ .xc-section-chevron {
405
406
  display: flex;
406
407
  align-items: center;
407
408
  justify-content: center;
@@ -412,10 +413,10 @@ div.xeno-section-trigger {
412
413
  transform: rotate(90deg);
413
414
  transition: transform 80ms ease;
414
415
  }
415
- .xeno-section--collapsed .xeno-section-chevron {
416
+ .xc-section--collapsed .xc-section-chevron {
416
417
  transform: rotate(0deg);
417
418
  }
418
- .xeno-section-title {
419
+ .xc-section-title {
419
420
  flex: 1 1 auto;
420
421
  min-width: 0;
421
422
  overflow: hidden;
@@ -427,39 +428,39 @@ div.xeno-section-trigger {
427
428
  text-transform: uppercase;
428
429
  color: ${MUTED};
429
430
  }
430
- .xeno-section-actions {
431
+ .xc-section-actions {
431
432
  display: flex;
432
433
  align-items: center;
433
434
  gap: ${PANEL_METRICS.rowGap}px;
434
435
  flex: 0 0 auto;
435
436
  }
436
- .xeno-section-body {
437
+ .xc-section-body {
437
438
  padding: 3px 0;
438
439
  min-width: 0;
439
440
  }
440
- .xeno-section-body--off {
441
+ .xc-section-body--off {
441
442
  opacity: ${PANEL_DISABLED_OPACITY};
442
443
  pointer-events: none;
443
444
  }
444
- .xeno-section-body--flush {
445
+ .xc-section-body--flush {
445
446
  padding: 0;
446
447
  }
447
- .xeno-section--collapsed .xeno-section-body {
448
+ .xc-section--collapsed .xc-section-body {
448
449
  display: none;
449
450
  }
450
451
 
451
452
  /* \u2500\u2500\u2500 4. Rows \u2500\u2500\u2500 */
452
453
 
453
- .xeno-rowlist {
454
+ .xc-rowlist {
454
455
  display: flex;
455
456
  flex-direction: column;
456
457
  min-width: 0;
457
458
  }
458
- .xeno-rowlist--divided .xeno-row {
459
+ .xc-rowlist--divided .xc-row {
459
460
  border-bottom: 1px solid ${BORDER};
460
461
  }
461
462
 
462
- .xeno-row {
463
+ .xc-row {
463
464
  display: flex;
464
465
  align-items: center;
465
466
  gap: ${PANEL_METRICS.rowGap}px;
@@ -475,33 +476,33 @@ div.xeno-section-trigger {
475
476
  user-select: none;
476
477
  transition: background-color 80ms ease;
477
478
  }
478
- .xeno-row--interactive {
479
+ .xc-row--interactive {
479
480
  cursor: pointer;
480
481
  }
481
- .xeno-row--interactive:hover {
482
+ .xc-row--interactive:hover {
482
483
  background: ${PANEL_COLORS.rowHover};
483
484
  }
484
- .xeno-row--selected {
485
+ .xc-row--selected {
485
486
  background: ${PANEL_COLORS.rowSelected};
486
487
  }
487
- .xeno-row--selected:hover {
488
+ .xc-row--selected:hover {
488
489
  background: ${PANEL_COLORS.rowSelected};
489
490
  }
490
- .xeno-row--active {
491
+ .xc-row--active {
491
492
  box-shadow: inset 0 0 0 1px ${PANEL_COLORS.ring};
492
493
  }
493
- .xeno-row--disabled {
494
+ .xc-row--disabled {
494
495
  opacity: ${PANEL_DISABLED_OPACITY};
495
496
  cursor: not-allowed;
496
497
  }
497
- .xeno-row--disabled:hover {
498
+ .xc-row--disabled:hover {
498
499
  background: transparent;
499
500
  }
500
- .xeno-row:focus-visible {
501
+ .xc-row:focus-visible {
501
502
  outline: 1px solid ${PANEL_COLORS.focus};
502
503
  outline-offset: -1px;
503
504
  }
504
- .xeno-row-icon {
505
+ .xc-row-icon {
505
506
  display: flex;
506
507
  align-items: center;
507
508
  justify-content: center;
@@ -510,20 +511,20 @@ div.xeno-section-trigger {
510
511
  flex: 0 0 auto;
511
512
  opacity: 0.8;
512
513
  }
513
- .xeno-row-label {
514
+ .xc-row-label {
514
515
  flex: 1 1 auto;
515
516
  min-width: 0;
516
517
  overflow: hidden;
517
518
  text-overflow: ellipsis;
518
519
  white-space: nowrap;
519
520
  }
520
- .xeno-row-meta {
521
+ .xc-row-meta {
521
522
  flex: 0 0 auto;
522
523
  font-size: ${PANEL_METRICS.fontLabel}px;
523
524
  color: ${MUTED};
524
525
  font-variant-numeric: tabular-nums;
525
526
  }
526
- .xeno-row-trailing {
527
+ .xc-row-trailing {
527
528
  display: flex;
528
529
  align-items: center;
529
530
  gap: ${PANEL_METRICS.rowGap}px;
@@ -533,7 +534,7 @@ div.xeno-section-trigger {
533
534
 
534
535
  /* \u2500\u2500\u2500 5. Controls \u2500\u2500\u2500 */
535
536
 
536
- .xeno-iconbtn {
537
+ .xc-iconbtn {
537
538
  display: flex;
538
539
  align-items: center;
539
540
  justify-content: center;
@@ -547,41 +548,41 @@ div.xeno-section-trigger {
547
548
  opacity: 0.8;
548
549
  transition: background-color 80ms ease, opacity 80ms ease;
549
550
  }
550
- .xeno-iconbtn--sm {
551
+ .xc-iconbtn--sm {
551
552
  width: ${PANEL_METRICS.iconButtonSm}px;
552
553
  height: ${PANEL_METRICS.iconButtonSm}px;
553
554
  }
554
- .xeno-iconbtn--md {
555
+ .xc-iconbtn--md {
555
556
  width: ${PANEL_METRICS.iconButton}px;
556
557
  height: ${PANEL_METRICS.iconButton}px;
557
558
  }
558
- .xeno-iconbtn--sm svg {
559
+ .xc-iconbtn--sm svg {
559
560
  width: ${PANEL_METRICS.iconGlyphSm}px;
560
561
  height: ${PANEL_METRICS.iconGlyphSm}px;
561
562
  }
562
- .xeno-iconbtn--md svg {
563
+ .xc-iconbtn--md svg {
563
564
  width: ${PANEL_METRICS.iconGlyph}px;
564
565
  height: ${PANEL_METRICS.iconGlyph}px;
565
566
  }
566
- .xeno-iconbtn:hover {
567
+ .xc-iconbtn:hover {
567
568
  background: ${PANEL_COLORS.soft};
568
569
  opacity: 1;
569
570
  }
570
- .xeno-iconbtn--active {
571
+ .xc-iconbtn--active {
571
572
  background: ${PANEL_COLORS.rowSelected};
572
573
  opacity: 1;
573
574
  }
574
- .xeno-iconbtn:focus-visible {
575
+ .xc-iconbtn:focus-visible {
575
576
  outline: 1px solid ${PANEL_COLORS.focus};
576
577
  outline-offset: 1px;
577
578
  }
578
- .xeno-iconbtn[disabled] {
579
+ .xc-iconbtn[disabled] {
579
580
  opacity: ${PANEL_DISABLED_OPACITY};
580
581
  cursor: not-allowed;
581
582
  background: transparent;
582
583
  }
583
584
 
584
- .xeno-textbtn {
585
+ .xc-textbtn {
585
586
  flex: 0 0 auto;
586
587
  padding: 0;
587
588
  border: none;
@@ -593,23 +594,23 @@ div.xeno-section-trigger {
593
594
  cursor: pointer;
594
595
  transition: color 80ms ease;
595
596
  }
596
- .xeno-textbtn:hover {
597
+ .xc-textbtn:hover {
597
598
  color: ${FG};
598
599
  }
599
- .xeno-textbtn--strong {
600
+ .xc-textbtn--strong {
600
601
  color: ${FG};
601
602
  }
602
- .xeno-textbtn:focus-visible {
603
+ .xc-textbtn:focus-visible {
603
604
  outline: 1px solid ${PANEL_COLORS.focus};
604
605
  outline-offset: 1px;
605
606
  }
606
- .xeno-textbtn[disabled] {
607
+ .xc-textbtn[disabled] {
607
608
  opacity: ${PANEL_DISABLED_OPACITY};
608
609
  cursor: not-allowed;
609
610
  color: ${MUTED};
610
611
  }
611
612
 
612
- .xeno-search {
613
+ .xc-search {
613
614
  display: flex;
614
615
  align-items: center;
615
616
  gap: ${PANEL_METRICS.rowGap}px;
@@ -624,20 +625,20 @@ div.xeno-section-trigger {
624
625
  color: ${FG};
625
626
  transition: border-color 80ms ease;
626
627
  }
627
- .xeno-search:focus-within {
628
+ .xc-search:focus-within {
628
629
  border-color: ${PANEL_COLORS.ring};
629
630
  }
630
- .xeno-search--disabled {
631
+ .xc-search--disabled {
631
632
  opacity: ${PANEL_DISABLED_OPACITY};
632
633
  }
633
- .xeno-search-glyph {
634
+ .xc-search-glyph {
634
635
  display: flex;
635
636
  align-items: center;
636
637
  justify-content: center;
637
638
  flex: 0 0 auto;
638
639
  color: ${MUTED};
639
640
  }
640
- .xeno-search-input {
641
+ .xc-search-input {
641
642
  flex: 1 1 auto;
642
643
  min-width: 0;
643
644
  height: 100%;
@@ -650,10 +651,38 @@ div.xeno-section-trigger {
650
651
  outline: none;
651
652
  cursor: text;
652
653
  }
653
- .xeno-search-input::placeholder {
654
+ .xc-search-input::placeholder {
654
655
  color: ${DIM};
655
656
  }
656
- .xeno-search-clear {
657
+
658
+ /* \u2500\u2500 Composer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
659
+ .xc-composer {
660
+ display: block;
661
+ width: 100%;
662
+ min-height: 64px;
663
+ box-sizing: border-box;
664
+ padding: 8px 10px;
665
+ resize: vertical;
666
+ border: none;
667
+ border-top: 1px solid ${BORDER};
668
+ background: transparent;
669
+ color: ${FG};
670
+ font: inherit;
671
+ font-size: ${PANEL_METRICS.fontBody}px;
672
+ line-height: 1.45;
673
+ outline: none;
674
+ }
675
+ .xc-composer::placeholder {
676
+ color: ${DIM};
677
+ }
678
+ .xc-composer:focus-visible {
679
+ box-shadow: inset 0 0 0 1px ${PANEL_COLORS.focus};
680
+ }
681
+ .xc-composer:disabled {
682
+ opacity: ${PANEL_DISABLED_OPACITY};
683
+ cursor: not-allowed;
684
+ }
685
+ .xc-search-clear {
657
686
  display: flex;
658
687
  align-items: center;
659
688
  justify-content: center;
@@ -667,12 +696,12 @@ div.xeno-section-trigger {
667
696
  color: ${MUTED};
668
697
  cursor: pointer;
669
698
  }
670
- .xeno-search-clear:hover {
699
+ .xc-search-clear:hover {
671
700
  color: ${FG};
672
701
  background: ${PANEL_COLORS.soft};
673
702
  }
674
703
 
675
- .xeno-segmented {
704
+ .xc-segmented {
676
705
  display: inline-flex;
677
706
  align-items: stretch;
678
707
  flex: 0 0 auto;
@@ -682,20 +711,20 @@ div.xeno-section-trigger {
682
711
  border-radius: ${PANEL_METRICS.radius}px;
683
712
  box-sizing: border-box;
684
713
  }
685
- .xeno-segmented--sm {
714
+ .xc-segmented--sm {
686
715
  height: ${PANEL_METRICS.iconButtonSm + 2}px;
687
716
  }
688
- .xeno-segmented--md {
717
+ .xc-segmented--md {
689
718
  height: ${CTRL_H};
690
719
  }
691
- .xeno-segmented--stretch {
720
+ .xc-segmented--stretch {
692
721
  display: flex;
693
722
  width: 100%;
694
723
  }
695
- .xeno-segmented--stretch .xeno-segment {
724
+ .xc-segmented--stretch .xc-segment {
696
725
  flex: 1 1 0;
697
726
  }
698
- .xeno-segment {
727
+ .xc-segment {
699
728
  display: flex;
700
729
  align-items: center;
701
730
  justify-content: center;
@@ -712,23 +741,23 @@ div.xeno-section-trigger {
712
741
  transition: background-color 80ms ease, color 80ms ease;
713
742
  white-space: nowrap;
714
743
  }
715
- .xeno-segment:hover {
744
+ .xc-segment:hover {
716
745
  color: ${FG};
717
746
  }
718
- .xeno-segment--checked {
747
+ .xc-segment--checked {
719
748
  background: ${PANEL_COLORS.rowSelected};
720
749
  color: ${FG};
721
750
  }
722
- .xeno-segment:focus-visible {
751
+ .xc-segment:focus-visible {
723
752
  outline: 1px solid ${PANEL_COLORS.focus};
724
753
  outline-offset: -1px;
725
754
  }
726
- .xeno-segment[disabled] {
755
+ .xc-segment[disabled] {
727
756
  opacity: ${PANEL_DISABLED_OPACITY};
728
757
  cursor: not-allowed;
729
758
  }
730
759
 
731
- .xeno-toggle {
760
+ .xc-toggle {
732
761
  position: relative;
733
762
  display: inline-flex;
734
763
  align-items: center;
@@ -740,18 +769,18 @@ div.xeno-section-trigger {
740
769
  cursor: pointer;
741
770
  transition: background-color 80ms ease;
742
771
  }
743
- .xeno-toggle--sm {
772
+ .xc-toggle--sm {
744
773
  width: 16px;
745
774
  height: 10px;
746
775
  }
747
- .xeno-toggle--md {
776
+ .xc-toggle--md {
748
777
  width: 22px;
749
778
  height: 12px;
750
779
  }
751
- .xeno-toggle--on {
780
+ .xc-toggle--on {
752
781
  background: rgba(255, 255, 255, 0.25);
753
782
  }
754
- .xeno-toggle-knob {
783
+ .xc-toggle-knob {
755
784
  position: absolute;
756
785
  top: 2px;
757
786
  left: 2px;
@@ -759,45 +788,45 @@ div.xeno-section-trigger {
759
788
  border-radius: 1px;
760
789
  transition: transform 80ms ease, border-radius 80ms ease, background-color 80ms ease;
761
790
  }
762
- .xeno-toggle--sm .xeno-toggle-knob {
791
+ .xc-toggle--sm .xc-toggle-knob {
763
792
  width: 6px;
764
793
  height: 6px;
765
794
  }
766
- .xeno-toggle--md .xeno-toggle-knob {
795
+ .xc-toggle--md .xc-toggle-knob {
767
796
  width: 8px;
768
797
  height: 8px;
769
798
  }
770
- .xeno-toggle--on .xeno-toggle-knob {
799
+ .xc-toggle--on .xc-toggle-knob {
771
800
  background: ${FG};
772
801
  border-radius: ${PANEL_METRICS.radius}px;
773
802
  }
774
- .xeno-toggle--sm.xeno-toggle--on .xeno-toggle-knob {
803
+ .xc-toggle--sm.xc-toggle--on .xc-toggle-knob {
775
804
  transform: translateX(6px);
776
805
  }
777
- .xeno-toggle--md.xeno-toggle--on .xeno-toggle-knob {
806
+ .xc-toggle--md.xc-toggle--on .xc-toggle-knob {
778
807
  transform: translateX(10px);
779
808
  }
780
- .xeno-toggle:focus-visible {
809
+ .xc-toggle:focus-visible {
781
810
  outline: 1px solid ${PANEL_COLORS.focus};
782
811
  outline-offset: 1px;
783
812
  }
784
813
  /* Both layers, per DESIGN_SYSTEM \xA73.1 "Cursors \u2014 two layers, both required": the modifier class
785
814
  for callers that style a wrapper, and the attribute selector for the real disabled control. */
786
- .xeno-toggle--disabled,
787
- .xeno-toggle[disabled] {
815
+ .xc-toggle--disabled,
816
+ .xc-toggle[disabled] {
788
817
  opacity: ${PANEL_DISABLED_OPACITY};
789
818
  cursor: not-allowed;
790
819
  }
791
820
 
792
821
  /* \u2500\u2500\u2500 6. Fields \u2500\u2500\u2500 */
793
822
 
794
- .xeno-fieldgroup {
823
+ .xc-fieldgroup {
795
824
  display: flex;
796
825
  flex-direction: column;
797
826
  gap: 2px;
798
827
  min-width: 0;
799
828
  }
800
- .xeno-field {
829
+ .xc-field {
801
830
  display: flex;
802
831
  align-items: center;
803
832
  gap: ${PANEL_METRICS.rowGap}px;
@@ -807,7 +836,7 @@ div.xeno-section-trigger {
807
836
  box-sizing: border-box;
808
837
  min-width: 0;
809
838
  }
810
- .xeno-field-label {
839
+ .xc-field-label {
811
840
  flex: 0 0 auto;
812
841
  width: ${LABEL_W};
813
842
  overflow: hidden;
@@ -818,7 +847,7 @@ div.xeno-section-trigger {
818
847
  user-select: none;
819
848
  cursor: default;
820
849
  }
821
- .xeno-field-control {
850
+ .xc-field-control {
822
851
  display: flex;
823
852
  align-items: center;
824
853
  gap: ${PANEL_METRICS.rowGap}px;
@@ -826,29 +855,29 @@ div.xeno-section-trigger {
826
855
  min-width: 0;
827
856
  justify-content: flex-end;
828
857
  }
829
- .xeno-field-hint {
858
+ .xc-field-hint {
830
859
  flex: 1 1 100%;
831
860
  padding-left: ${LABEL_W};
832
861
  font-size: ${PANEL_METRICS.fontLabel}px;
833
862
  color: ${DIM};
834
863
  }
835
- .xeno-field--stacked {
864
+ .xc-field--stacked {
836
865
  flex-direction: column;
837
866
  align-items: stretch;
838
867
  }
839
- .xeno-field--stacked .xeno-field-label {
868
+ .xc-field--stacked .xc-field-label {
840
869
  width: auto;
841
870
  }
842
- .xeno-field--stacked .xeno-field-control {
871
+ .xc-field--stacked .xc-field-control {
843
872
  justify-content: flex-start;
844
873
  }
845
- .xeno-field--stacked .xeno-field-hint {
874
+ .xc-field--stacked .xc-field-hint {
846
875
  padding-left: 0;
847
876
  }
848
877
 
849
878
  /* \u2500\u2500\u2500 7. States \u2500\u2500\u2500 */
850
879
 
851
- .xeno-state {
880
+ .xc-state {
852
881
  display: flex;
853
882
  flex-direction: column;
854
883
  align-items: center;
@@ -858,7 +887,7 @@ div.xeno-section-trigger {
858
887
  text-align: center;
859
888
  min-width: 0;
860
889
  }
861
- .xeno-state-icon {
890
+ .xc-state-icon {
862
891
  display: flex;
863
892
  align-items: center;
864
893
  justify-content: center;
@@ -868,28 +897,28 @@ div.xeno-section-trigger {
868
897
  border-radius: ${PANEL_METRICS.radius}px;
869
898
  color: ${MUTED};
870
899
  }
871
- .xeno-empty,
872
- .xeno-loading {
900
+ .xc-empty,
901
+ .xc-loading {
873
902
  user-select: none;
874
903
  }
875
- .xeno-state-title {
904
+ .xc-state-title {
876
905
  font-size: ${PANEL_METRICS.fontMeta}px;
877
906
  text-transform: uppercase;
878
907
  letter-spacing: 0.08em;
879
908
  opacity: 0.4;
880
909
  color: ${FG};
881
910
  }
882
- .xeno-state-hint {
911
+ .xc-state-hint {
883
912
  max-width: 28ch;
884
913
  font-size: ${PANEL_METRICS.fontMeta}px;
885
914
  line-height: 1.45;
886
915
  color: ${MUTED};
887
916
  }
888
- .xeno-error .xeno-state-title {
917
+ .xc-error .xc-state-title {
889
918
  opacity: 1;
890
919
  color: ${PANEL_COLORS.errorText};
891
920
  }
892
- .xeno-state-progress {
921
+ .xc-state-progress {
893
922
  position: relative;
894
923
  width: 64px;
895
924
  height: 2px;
@@ -897,7 +926,7 @@ div.xeno-section-trigger {
897
926
  background: ${PANEL_COLORS.soft};
898
927
  overflow: hidden;
899
928
  }
900
- .xeno-state-progress::after {
929
+ .xc-state-progress::after {
901
930
  content: '';
902
931
  position: absolute;
903
932
  top: 0;
@@ -921,7 +950,7 @@ div.xeno-section-trigger {
921
950
 
922
951
  /* \u2500\u2500\u2500 8. Indicators \u2500\u2500\u2500 */
923
952
 
924
- .xeno-badge {
953
+ .xc-badge {
925
954
  display: inline-flex;
926
955
  align-items: center;
927
956
  gap: 3px;
@@ -937,18 +966,18 @@ div.xeno-section-trigger {
937
966
  white-space: nowrap;
938
967
  user-select: none;
939
968
  }
940
- .xeno-badge--md {
969
+ .xc-badge--md {
941
970
  height: ${PANEL_METRICS.badgeHeightMd}px;
942
971
  line-height: ${PANEL_METRICS.badgeHeightMd}px;
943
972
  padding: 0 5px;
944
973
  font-size: ${PANEL_METRICS.fontMeta}px;
945
974
  }
946
- .xeno-badge--info { color: ${PANEL_COLORS.infoText}; }
947
- .xeno-badge--success { color: ${PANEL_COLORS.successText}; }
948
- .xeno-badge--warning { color: ${PANEL_COLORS.warningText}; }
949
- .xeno-badge--error { color: ${PANEL_COLORS.errorText}; }
975
+ .xc-badge--info { color: ${PANEL_COLORS.infoText}; }
976
+ .xc-badge--success { color: ${PANEL_COLORS.successText}; }
977
+ .xc-badge--warning { color: ${PANEL_COLORS.warningText}; }
978
+ .xc-badge--error { color: ${PANEL_COLORS.errorText}; }
950
979
 
951
- .xeno-dot {
980
+ .xc-dot {
952
981
  display: inline-block;
953
982
  flex: 0 0 auto;
954
983
  width: ${PANEL_METRICS.dotSize}px;
@@ -956,12 +985,12 @@ div.xeno-section-trigger {
956
985
  border-radius: 1px;
957
986
  background: ${MUTED};
958
987
  }
959
- .xeno-dot--info { background: ${PANEL_COLORS.infoText}; }
960
- .xeno-dot--success { background: ${PANEL_COLORS.successText}; }
961
- .xeno-dot--warning { background: ${PANEL_COLORS.warningText}; }
962
- .xeno-dot--error { background: ${PANEL_COLORS.error}; }
988
+ .xc-dot--info { background: ${PANEL_COLORS.infoText}; }
989
+ .xc-dot--success { background: ${PANEL_COLORS.successText}; }
990
+ .xc-dot--warning { background: ${PANEL_COLORS.warningText}; }
991
+ .xc-dot--error { background: ${PANEL_COLORS.error}; }
963
992
 
964
- .xeno-iconframe {
993
+ .xc-iconframe {
965
994
  display: flex;
966
995
  align-items: center;
967
996
  justify-content: center;
@@ -974,7 +1003,7 @@ div.xeno-section-trigger {
974
1003
 
975
1004
  /* \u2500\u2500\u2500 9. Data tiles \u2500\u2500\u2500 */
976
1005
 
977
- .xeno-stat {
1006
+ .xc-stat {
978
1007
  display: flex;
979
1008
  flex-direction: column;
980
1009
  gap: 3px;
@@ -984,7 +1013,7 @@ div.xeno-section-trigger {
984
1013
  border-radius: ${PANEL_METRICS.radius}px;
985
1014
  background: rgba(0, 0, 0, 0.2);
986
1015
  }
987
- .xeno-stat-label {
1016
+ .xc-stat-label {
988
1017
  display: flex;
989
1018
  align-items: center;
990
1019
  justify-content: space-between;
@@ -994,7 +1023,7 @@ div.xeno-section-trigger {
994
1023
  letter-spacing: 0.06em;
995
1024
  color: ${MUTED};
996
1025
  }
997
- .xeno-stat-value {
1026
+ .xc-stat-value {
998
1027
  font-size: 16px;
999
1028
  font-weight: 600;
1000
1029
  line-height: 1.1;
@@ -1004,13 +1033,13 @@ div.xeno-section-trigger {
1004
1033
  text-overflow: ellipsis;
1005
1034
  white-space: nowrap;
1006
1035
  }
1007
- .xeno-stat-sub {
1036
+ .xc-stat-sub {
1008
1037
  font-size: ${PANEL_METRICS.fontLabel}px;
1009
1038
  color: ${DIM};
1010
1039
  font-variant-numeric: tabular-nums;
1011
1040
  }
1012
1041
 
1013
- .xeno-bar {
1042
+ .xc-bar {
1014
1043
  display: flex;
1015
1044
  width: 100%;
1016
1045
  height: 6px;
@@ -1018,7 +1047,7 @@ div.xeno-section-trigger {
1018
1047
  background: rgba(255, 255, 255, 0.04);
1019
1048
  overflow: hidden;
1020
1049
  }
1021
- .xeno-bar-segment {
1050
+ .xc-bar-segment {
1022
1051
  height: 100%;
1023
1052
  min-width: 0;
1024
1053
  }
@@ -1026,16 +1055,16 @@ div.xeno-section-trigger {
1026
1055
  /* \u2500\u2500\u2500 10. Reduced motion (DESIGN_SYSTEM \xA711) \u2500\u2500\u2500 */
1027
1056
 
1028
1057
  @media (prefers-reduced-motion: reduce) {
1029
- .xeno-row,
1030
- .xeno-iconbtn,
1031
- .xeno-segment,
1032
- .xeno-toggle,
1033
- .xeno-toggle-knob,
1034
- .xeno-search,
1035
- .xeno-section-chevron {
1058
+ .xc-row,
1059
+ .xc-iconbtn,
1060
+ .xc-segment,
1061
+ .xc-toggle,
1062
+ .xc-toggle-knob,
1063
+ .xc-search,
1064
+ .xc-section-chevron {
1036
1065
  transition: none;
1037
1066
  }
1038
- .xeno-state-progress::after,
1067
+ .xc-state-progress::after,
1039
1068
  .xeno-spin {
1040
1069
  animation: none;
1041
1070
  }
@@ -1204,7 +1233,7 @@ function IconButton({
1204
1233
  "aria-pressed": active,
1205
1234
  disabled,
1206
1235
  onClick,
1207
- className: iconButtonClass({ active, disabled }, cx(`${"xeno-iconbtn"}--${size}`, className)),
1236
+ className: iconButtonClass({ active, disabled }, cx(`${"xc-iconbtn"}--${size}`, className)),
1208
1237
  children: icon
1209
1238
  }
1210
1239
  );
@@ -1392,6 +1421,42 @@ function Field({
1392
1421
  hint != null ? /* @__PURE__ */ jsx2("div", { className: CLS_FIELD_HINT, id: hintId, children: hint }) : null
1393
1422
  ] });
1394
1423
  }
1424
+ function composerWantsSubmit(key, shiftKey, submitOnEnter = true) {
1425
+ if (key !== "Enter") return false;
1426
+ return submitOnEnter ? !shiftKey : shiftKey;
1427
+ }
1428
+ function Composer({
1429
+ value,
1430
+ onChange,
1431
+ onSubmit,
1432
+ placeholder = "Type a message\u2026",
1433
+ label,
1434
+ submitOnEnter = true,
1435
+ disabled,
1436
+ autoFocus,
1437
+ className
1438
+ }) {
1439
+ usePanelPrimitives();
1440
+ const handleKeyDown = (e) => {
1441
+ if (!onSubmit || !composerWantsSubmit(e.key, e.shiftKey, submitOnEnter)) return;
1442
+ e.preventDefault();
1443
+ onSubmit();
1444
+ };
1445
+ return /* @__PURE__ */ jsx2(
1446
+ "textarea",
1447
+ {
1448
+ className: cx(CLS_COMPOSER, className),
1449
+ value,
1450
+ placeholder,
1451
+ "aria-label": label ?? placeholder,
1452
+ disabled,
1453
+ autoFocus,
1454
+ spellCheck: true,
1455
+ onChange: (e) => onChange(e.target.value),
1456
+ onKeyDown: handleKeyDown
1457
+ }
1458
+ );
1459
+ }
1395
1460
 
1396
1461
  // src/chrome/section.tsx
1397
1462
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -1590,7 +1655,7 @@ function Badge({
1590
1655
  className
1591
1656
  }) {
1592
1657
  usePanelPrimitives();
1593
- return /* @__PURE__ */ jsx6("span", { title, className: badgeClass(tone, cx(size === "md" && "xeno-badge--md", className)), children });
1658
+ return /* @__PURE__ */ jsx6("span", { title, className: badgeClass(tone, cx(size === "md" && "xc-badge--md", className)), children });
1594
1659
  }
1595
1660
  function StatusDot({ tone = "neutral", label, className }) {
1596
1661
  usePanelPrimitives();
@@ -1714,6 +1779,7 @@ var COMPONENTS = {
1714
1779
  "chrome/IconButton": IconButton,
1715
1780
  "chrome/TextButton": TextButton,
1716
1781
  "chrome/SearchField": SearchField,
1782
+ "chrome/Composer": Composer,
1717
1783
  "chrome/SegmentedControl": SegmentedControl,
1718
1784
  "chrome/Toggle": Toggle,
1719
1785
  "chrome/FieldGroup": FieldGroup,
@@ -1761,6 +1827,9 @@ function gallery() {
1761
1827
  form("TextButton", "disabled", () => /* @__PURE__ */ jsx7(TextButton, { onClick: noop, disabled: true, children: "Clear all" }));
1762
1828
  form("SearchField", "empty", () => /* @__PURE__ */ jsx7(SearchField, { value: "", onChange: noop, placeholder: "Filter rows\u2026", label: "Filter" }));
1763
1829
  form("SearchField", "filled", () => /* @__PURE__ */ jsx7(SearchField, { value: "render", onChange: noop, placeholder: "Filter rows\u2026", label: "Filter" }));
1830
+ form("Composer", "empty", () => /* @__PURE__ */ jsx7(Composer, { value: "", onChange: noop, onSubmit: noop, placeholder: "Ask the agent\u2026" }));
1831
+ form("Composer", "draft", () => /* @__PURE__ */ jsx7(Composer, { value: "Summarise the last run and list the failing steps.", onChange: noop, onSubmit: noop }));
1832
+ form("Composer", "disabled", () => /* @__PURE__ */ jsx7(Composer, { value: "", onChange: noop, placeholder: "Not connected", disabled: true }));
1764
1833
  form("SegmentedControl", "first", () => /* @__PURE__ */ jsx7(SegmentedControl, { options: SEGMENTS, value: "all", onChange: noop, label: "Level" }));
1765
1834
  form("SegmentedControl", "last", () => /* @__PURE__ */ jsx7(SegmentedControl, { options: SEGMENTS, value: "warnings", onChange: noop, label: "Level" }));
1766
1835
  form("Toggle", "off", () => /* @__PURE__ */ jsx7(Toggle, { checked: false, onChange: noop, label: "Follow output" }));
@@ -1878,6 +1947,7 @@ export {
1878
1947
  COMPONENTS,
1879
1948
  ChevronGlyph,
1880
1949
  ClearGlyph,
1950
+ Composer,
1881
1951
  Divider,
1882
1952
  EmptyState,
1883
1953
  ErrorState,
@@ -1911,6 +1981,7 @@ export {
1911
1981
  Toolbar,
1912
1982
  ToolbarGroup,
1913
1983
  badgeClass,
1984
+ composerWantsSubmit,
1914
1985
  cx,
1915
1986
  dotClass,
1916
1987
  ensurePanelPrimitivesInjected,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/components",
3
- "version": "0.8.1",
3
+ "version": "0.9.1",
4
4
  "description": "XENO Components \u2014 rung 2 of the front ladder: molecules composed from @xenosystem/elements, with no host contract. Families as subpaths: /auth, /navigation, /feedback, /data.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",