@xenosystem/components 0.9.3 → 0.10.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
@@ -399,6 +399,12 @@
399
399
  "optional": true,
400
400
  "doc": "`sm` = 20px (inside rows), `md` = 24px (toolbars, default)."
401
401
  },
402
+ {
403
+ "name": "variant",
404
+ "type": "'default' | 'primary' | 'danger'",
405
+ "optional": true,
406
+ "doc": "`primary` — the one emphasised action in a strip (Play); `danger` — armed / destructive (Record)."
407
+ },
402
408
  {
403
409
  "name": "className",
404
410
  "type": "string",
@@ -727,6 +733,210 @@
727
733
  }
728
734
  ]
729
735
  },
736
+ {
737
+ "name": "Readout",
738
+ "file": "controls.tsx",
739
+ "doc": "A value with its unit — the transport's position, a timeline's duration, a calendar's week number.",
740
+ "props": "ReadoutProps",
741
+ "propList": [
742
+ {
743
+ "name": "value",
744
+ "type": "ReactNode",
745
+ "optional": false,
746
+ "doc": "The figure — a timecode, a count, a duration. Rendered in tabular numerals."
747
+ },
748
+ {
749
+ "name": "unit",
750
+ "type": "ReactNode",
751
+ "optional": true,
752
+ "doc": "The small unit or format label beside it (`TC`, `frames`, `bars`)."
753
+ },
754
+ {
755
+ "name": "size",
756
+ "type": "'sm' | 'md'",
757
+ "optional": true,
758
+ "doc": "`md` (default) for the primary readout; `sm` for a secondary one (a duration beside the position)."
759
+ },
760
+ {
761
+ "name": "label",
762
+ "type": "string",
763
+ "optional": true,
764
+ "doc": "Accessible name; the figure is read as text."
765
+ },
766
+ {
767
+ "name": "onClick",
768
+ "type": "() => void",
769
+ "optional": true,
770
+ "doc": "Clickable readouts cycle their display (timecode → frames → seconds); the unit becomes a button."
771
+ },
772
+ {
773
+ "name": "title",
774
+ "type": "string",
775
+ "optional": true,
776
+ "doc": "Native tooltip for a clickable readout (\"Click to change time display\")."
777
+ },
778
+ {
779
+ "name": "className",
780
+ "type": "string",
781
+ "optional": true,
782
+ "doc": ""
783
+ }
784
+ ]
785
+ },
786
+ {
787
+ "name": "NumberInput",
788
+ "file": "controls.tsx",
789
+ "doc": "A compact numeric field with an inline caption — BPM, fps, a count — committed on change.",
790
+ "props": "NumberInputProps",
791
+ "propList": [
792
+ {
793
+ "name": "value",
794
+ "type": "number",
795
+ "optional": false,
796
+ "doc": ""
797
+ },
798
+ {
799
+ "name": "onChange",
800
+ "type": "(value: number) => void",
801
+ "optional": false,
802
+ "doc": ""
803
+ },
804
+ {
805
+ "name": "caption",
806
+ "type": "ReactNode",
807
+ "optional": true,
808
+ "doc": "Inline label, before the box (`BPM`). Also the accessible name unless `label` is set."
809
+ },
810
+ {
811
+ "name": "label",
812
+ "type": "string",
813
+ "optional": true,
814
+ "doc": ""
815
+ },
816
+ {
817
+ "name": "min",
818
+ "type": "number",
819
+ "optional": true,
820
+ "doc": ""
821
+ },
822
+ {
823
+ "name": "max",
824
+ "type": "number",
825
+ "optional": true,
826
+ "doc": ""
827
+ },
828
+ {
829
+ "name": "step",
830
+ "type": "number",
831
+ "optional": true,
832
+ "doc": ""
833
+ },
834
+ {
835
+ "name": "disabled",
836
+ "type": "boolean",
837
+ "optional": true,
838
+ "doc": ""
839
+ },
840
+ {
841
+ "name": "className",
842
+ "type": "string",
843
+ "optional": true,
844
+ "doc": ""
845
+ }
846
+ ]
847
+ },
848
+ {
849
+ "name": "Slider",
850
+ "file": "controls.tsx",
851
+ "doc": "A horizontal slider: track, fill and knob. The playhead scrubber; a zoom; a level.",
852
+ "props": "SliderProps",
853
+ "propList": [
854
+ {
855
+ "name": "progress",
856
+ "type": "number",
857
+ "optional": false,
858
+ "doc": "Position, 0–1."
859
+ },
860
+ {
861
+ "name": "label",
862
+ "type": "string",
863
+ "optional": false,
864
+ "doc": "Accessible name."
865
+ },
866
+ {
867
+ "name": "valueMin",
868
+ "type": "number",
869
+ "optional": true,
870
+ "doc": "The ARIA value triple — what a screen reader announces (ticks, seconds, percent)."
871
+ },
872
+ {
873
+ "name": "valueMax",
874
+ "type": "number",
875
+ "optional": true,
876
+ "doc": ""
877
+ },
878
+ {
879
+ "name": "valueNow",
880
+ "type": "number",
881
+ "optional": true,
882
+ "doc": ""
883
+ },
884
+ {
885
+ "name": "valueText",
886
+ "type": "string",
887
+ "optional": true,
888
+ "doc": ""
889
+ },
890
+ {
891
+ "name": "onPointerDown",
892
+ "type": "(e: PointerEvent<HTMLDivElement>) => void",
893
+ "optional": true,
894
+ "doc": "Pointer gestures on the track. The caller owns the maths (it knows the timebase); the unit owns the surface."
895
+ },
896
+ {
897
+ "name": "onPointerMove",
898
+ "type": "(e: PointerEvent<HTMLDivElement>) => void",
899
+ "optional": true,
900
+ "doc": ""
901
+ },
902
+ {
903
+ "name": "onPointerUp",
904
+ "type": "(e: PointerEvent<HTMLDivElement>) => void",
905
+ "optional": true,
906
+ "doc": ""
907
+ },
908
+ {
909
+ "name": "onPointerCancel",
910
+ "type": "(e: PointerEvent<HTMLDivElement>) => void",
911
+ "optional": true,
912
+ "doc": ""
913
+ },
914
+ {
915
+ "name": "onKeyDown",
916
+ "type": "(e: KeyboardEvent<HTMLDivElement>) => void",
917
+ "optional": true,
918
+ "doc": ""
919
+ },
920
+ {
921
+ "name": "disabled",
922
+ "type": "boolean",
923
+ "optional": true,
924
+ "doc": ""
925
+ },
926
+ {
927
+ "name": "className",
928
+ "type": "string",
929
+ "optional": true,
930
+ "doc": ""
931
+ },
932
+ {
933
+ "name": "trackRef",
934
+ "type": "Ref<HTMLDivElement>",
935
+ "optional": true,
936
+ "doc": "The track element, for a caller that measures it."
937
+ }
938
+ ]
939
+ },
730
940
  {
731
941
  "name": "PanelFrame",
732
942
  "file": "frame.tsx",
@@ -1,4 +1,4 @@
1
- import { ReactNode, HTMLAttributes, ReactElement } from 'react';
1
+ import { ReactNode, HTMLAttributes, PointerEvent, KeyboardEvent, Ref, ReactElement } from 'react';
2
2
 
3
3
  /**
4
4
  * Frame + strip primitives: `PanelFrame`, `Toolbar`, `ToolbarGroup`, `Divider`, `ScrollArea`.
@@ -515,6 +515,8 @@ interface IconButtonProps {
515
515
  disabled?: boolean;
516
516
  /** `sm` = 20px (inside rows), `md` = 24px (toolbars, default). */
517
517
  size?: 'sm' | 'md';
518
+ /** `primary` — the one emphasised action in a strip (Play); `danger` — armed / destructive (Record). */
519
+ variant?: 'default' | 'primary' | 'danger';
518
520
  /** Extra classes. */
519
521
  className?: string;
520
522
  }
@@ -526,7 +528,7 @@ interface IconButtonProps {
526
528
  * <IconButton icon={<TrashGlyph />} label="Delete layer" onClick={remove} disabled={!selection} />
527
529
  * ```
528
530
  */
529
- declare function IconButton({ icon, label, onClick, active, disabled, size, className, }: IconButtonProps): ReactNode;
531
+ declare function IconButton({ icon, label, onClick, active, disabled, size, variant, className, }: IconButtonProps): ReactNode;
530
532
  /** Props for {@link TextButton}. */
531
533
  interface TextButtonProps {
532
534
  /** Label. Census copy patterns: `+ Add`, `Clear`, `Cancel`, `Unbind`. */
@@ -719,6 +721,63 @@ interface ComposerProps {
719
721
  /** The submit convention, as a pure decision so it is testable and shared: Enter sends, Shift+Enter breaks. */
720
722
  declare function composerWantsSubmit(key: string, shiftKey: boolean, submitOnEnter?: boolean): boolean;
721
723
  declare function Composer({ value, onChange, onSubmit, placeholder, label, submitOnEnter, disabled, autoFocus, className, }: ComposerProps): ReactNode;
724
+ /** Props for {@link Readout}. */
725
+ interface ReadoutProps {
726
+ /** The figure — a timecode, a count, a duration. Rendered in tabular numerals. */
727
+ value: ReactNode;
728
+ /** The small unit or format label beside it (`TC`, `frames`, `bars`). */
729
+ unit?: ReactNode;
730
+ /** `md` (default) for the primary readout; `sm` for a secondary one (a duration beside the position). */
731
+ size?: 'sm' | 'md';
732
+ /** Accessible name; the figure is read as text. */
733
+ label?: string;
734
+ /** Clickable readouts cycle their display (timecode → frames → seconds); the unit becomes a button. */
735
+ onClick?: () => void;
736
+ /** Native tooltip for a clickable readout ("Click to change time display"). */
737
+ title?: string;
738
+ className?: string;
739
+ }
740
+ /** A value with its unit — the transport's position, a timeline's duration, a calendar's week number. */
741
+ declare function Readout({ value, unit, size, label, onClick, title, className }: ReadoutProps): ReactNode;
742
+ /** Props for {@link NumberInput}. */
743
+ interface NumberInputProps {
744
+ value: number;
745
+ onChange: (value: number) => void;
746
+ /** Inline label, before the box (`BPM`). Also the accessible name unless `label` is set. */
747
+ caption?: ReactNode;
748
+ label?: string;
749
+ min?: number;
750
+ max?: number;
751
+ step?: number;
752
+ disabled?: boolean;
753
+ className?: string;
754
+ }
755
+ /** A compact numeric field with an inline caption — BPM, fps, a count — committed on change. */
756
+ declare function NumberInput({ value, onChange, caption, label, min, max, step, disabled, className }: NumberInputProps): ReactNode;
757
+ /** Props for {@link Slider}. */
758
+ interface SliderProps {
759
+ /** Position, 0–1. */
760
+ progress: number;
761
+ /** Accessible name. */
762
+ label: string;
763
+ /** The ARIA value triple — what a screen reader announces (ticks, seconds, percent). */
764
+ valueMin?: number;
765
+ valueMax?: number;
766
+ valueNow?: number;
767
+ valueText?: string;
768
+ /** Pointer gestures on the track. The caller owns the maths (it knows the timebase); the unit owns the surface. */
769
+ onPointerDown?: (e: PointerEvent<HTMLDivElement>) => void;
770
+ onPointerMove?: (e: PointerEvent<HTMLDivElement>) => void;
771
+ onPointerUp?: (e: PointerEvent<HTMLDivElement>) => void;
772
+ onPointerCancel?: (e: PointerEvent<HTMLDivElement>) => void;
773
+ onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
774
+ disabled?: boolean;
775
+ className?: string;
776
+ /** The track element, for a caller that measures it. */
777
+ trackRef?: Ref<HTMLDivElement>;
778
+ }
779
+ /** A horizontal slider: track, fill and knob. The playhead scrubber; a zoom; a level. */
780
+ declare function Slider({ progress, label, valueMin, valueMax, valueNow, valueText, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onKeyDown, disabled, className, trackRef }: SliderProps): ReactNode;
722
781
 
723
782
  /**
724
783
  * The three terminal states: `EmptyState`, `LoadingState`, `ErrorState`.
@@ -1199,6 +1258,9 @@ declare const COMPONENTS: {
1199
1258
  readonly 'chrome/TextButton': typeof TextButton;
1200
1259
  readonly 'chrome/SearchField': typeof SearchField;
1201
1260
  readonly 'chrome/Composer': typeof Composer;
1261
+ readonly 'chrome/Readout': typeof Readout;
1262
+ readonly 'chrome/NumberInput': typeof NumberInput;
1263
+ readonly 'chrome/Slider': typeof Slider;
1202
1264
  readonly 'chrome/SegmentedControl': typeof SegmentedControl;
1203
1265
  readonly 'chrome/Toggle': typeof Toggle;
1204
1266
  readonly 'chrome/FieldGroup': typeof FieldGroup;
@@ -1249,4 +1311,4 @@ interface GalleryEntry {
1249
1311
  /** The entries, one per unit × state. Adding a unit to {@link COMPONENTS} without an entry here fails the family's test. */
1250
1312
  declare function gallery(): GalleryEntry[];
1251
1313
 
1252
- 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, Column, type ColumnProps, 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, Stack, type StackProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, Text, TextButton, type TextButtonProps, type TextProps, Toggle, type ToggleProps, Toolbar, ToolbarGroup, type ToolbarGroupProps, type ToolbarProps, badgeClass, composerWantsSubmit, cx, dotClass, ensurePanelPrimitivesInjected, gallery, iconButtonClass, nextSegmentValue, rowClass, sectionClass, usePanelPrimitives };
1314
+ 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, Column, type ColumnProps, 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, NumberInput, type NumberInputProps, 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, Readout, type ReadoutProps, Row, RowList, type RowListProps, type RowProps, type RowState, ScrollArea, type ScrollAreaProps, SearchField, type SearchFieldProps, SearchGlyph, Section, type SectionProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, Slider, type SliderProps, Sparkline, type SparklineProps, Stack, type StackProps, StatTile, type StatTileProps, StatusBadge, type StatusBadgeProps, StatusBar, type StatusBarProps, StatusDot, type StatusDotProps, Text, TextButton, type TextButtonProps, type TextProps, Toggle, type ToggleProps, Toolbar, ToolbarGroup, type ToolbarGroupProps, type ToolbarProps, badgeClass, composerWantsSubmit, cx, dotClass, ensurePanelPrimitivesInjected, gallery, iconButtonClass, nextSegmentValue, rowClass, sectionClass, usePanelPrimitives };
@@ -56,6 +56,9 @@ var CLS_SCROLL = "xc-scroll";
56
56
  var CLS_COLUMN = "xc-column";
57
57
  var CLS_STACK = "xc-stack";
58
58
  var CLS_TEXT = "xc-text";
59
+ var CLS_READOUT = "xc-readout";
60
+ var CLS_NUMBER = "xc-number";
61
+ var CLS_SLIDER = "xc-slider";
59
62
  var PANEL_TONES = Object.freeze([
60
63
  "neutral",
61
64
  "info",
@@ -702,6 +705,127 @@ div.xc-section-trigger {
702
705
  font-variant-numeric: tabular-nums;
703
706
  }
704
707
 
708
+ /* \u2500\u2500 IconButton variants \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 */
709
+ .xc-iconbtn--primary {
710
+ background: ${PANEL_COLORS.well};
711
+ width: ${PANEL_METRICS.iconButton + 6}px;
712
+ }
713
+ .xc-iconbtn--danger {
714
+ color: var(--xeno-danger, ${PANEL_COLORS.error});
715
+ }
716
+ .xc-iconbtn--danger.xc-iconbtn--active {
717
+ background: color-mix(in srgb, var(--xeno-danger, ${PANEL_COLORS.error}) 18%, transparent);
718
+ }
719
+
720
+ /* \u2500\u2500 Readout \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\u2500\u2500 */
721
+ .xc-readout {
722
+ display: inline-flex;
723
+ align-items: baseline;
724
+ gap: 4px;
725
+ min-width: 0;
726
+ color: ${FG};
727
+ font-variant-numeric: tabular-nums;
728
+ letter-spacing: 0.02em;
729
+ white-space: nowrap;
730
+ }
731
+ .xc-readout--md .xc-readout-value { font-size: ${PANEL_METRICS.fontBody + 1}px; }
732
+ .xc-readout--sm .xc-readout-value { font-size: ${PANEL_METRICS.fontMeta}px; color: ${MUTED}; }
733
+ .xc-readout--button {
734
+ appearance: none;
735
+ padding: 0 4px;
736
+ border: 1px solid transparent;
737
+ border-radius: ${PANEL_METRICS.radius}px;
738
+ background: transparent;
739
+ font: inherit;
740
+ cursor: pointer;
741
+ }
742
+ .xc-readout--button:hover {
743
+ border-color: ${BORDER};
744
+ }
745
+ .xc-readout--button:focus-visible {
746
+ outline: 1px solid ${PANEL_COLORS.focus};
747
+ outline-offset: -1px;
748
+ }
749
+ .xc-readout-unit {
750
+ font-size: ${PANEL_METRICS.fontMeta - 2}px;
751
+ letter-spacing: 0.06em;
752
+ text-transform: uppercase;
753
+ color: ${MUTED};
754
+ }
755
+
756
+ /* \u2500\u2500 NumberInput \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 */
757
+ .xc-number {
758
+ display: inline-flex;
759
+ align-items: center;
760
+ gap: 3px;
761
+ flex: 0 0 auto;
762
+ }
763
+ .xc-number-caption {
764
+ font-size: ${PANEL_METRICS.fontMeta - 2}px;
765
+ letter-spacing: 0.06em;
766
+ text-transform: uppercase;
767
+ color: ${MUTED};
768
+ }
769
+ .xc-number-input {
770
+ width: 44px;
771
+ height: ${PANEL_METRICS.controlHeightSm}px;
772
+ padding: 0 4px;
773
+ box-sizing: border-box;
774
+ border: 1px solid ${BORDER};
775
+ border-radius: ${PANEL_METRICS.radius}px;
776
+ background: ${PANEL_COLORS.well};
777
+ color: ${FG};
778
+ font: inherit;
779
+ font-size: ${PANEL_METRICS.fontMeta}px;
780
+ font-variant-numeric: tabular-nums;
781
+ outline: none;
782
+ }
783
+ .xc-number-input:focus-visible {
784
+ border-color: ${PANEL_COLORS.ring};
785
+ }
786
+ .xc-number--disabled {
787
+ opacity: ${PANEL_DISABLED_OPACITY};
788
+ }
789
+
790
+ /* \u2500\u2500 Slider \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\u2500\u2500\u2500 */
791
+ .xc-slider {
792
+ position: relative;
793
+ height: 10px;
794
+ box-sizing: border-box;
795
+ border-radius: ${PANEL_METRICS.radius}px;
796
+ background: ${PANEL_COLORS.well};
797
+ cursor: pointer;
798
+ outline: none;
799
+ touch-action: none;
800
+ }
801
+ .xc-slider:focus-visible {
802
+ box-shadow: inset 0 0 0 1px ${PANEL_COLORS.focus};
803
+ }
804
+ .xc-slider-fill {
805
+ position: absolute;
806
+ left: 0;
807
+ top: 0;
808
+ bottom: 0;
809
+ border-radius: ${PANEL_METRICS.radius}px;
810
+ background: ${PANEL_COLORS.rowSelected};
811
+ pointer-events: none;
812
+ }
813
+ .xc-slider-knob {
814
+ position: absolute;
815
+ top: 1px;
816
+ bottom: 1px;
817
+ width: 4px;
818
+ margin-left: -2px;
819
+ border-radius: 1px;
820
+ background: ${FG};
821
+ pointer-events: none;
822
+ }
823
+ .xc-slider--disabled {
824
+ opacity: ${PANEL_DISABLED_OPACITY};
825
+ cursor: default;
826
+ }
827
+
828
+
705
829
  /* \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 */
706
830
  .xc-composer {
707
831
  display: block;
@@ -1216,7 +1340,7 @@ import { useState as useState3 } from "react";
1216
1340
 
1217
1341
  // src/chrome/controls.tsx
1218
1342
  import { useId } from "react";
1219
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1343
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
1220
1344
  function SearchGlyph() {
1221
1345
  return /* @__PURE__ */ jsxs2(
1222
1346
  "svg",
@@ -1281,6 +1405,7 @@ function IconButton({
1281
1405
  active,
1282
1406
  disabled,
1283
1407
  size = "md",
1408
+ variant = "default",
1284
1409
  className
1285
1410
  }) {
1286
1411
  usePanelPrimitives();
@@ -1293,7 +1418,7 @@ function IconButton({
1293
1418
  "aria-pressed": active,
1294
1419
  disabled,
1295
1420
  onClick,
1296
- className: iconButtonClass({ active, disabled }, cx(`${"xc-iconbtn"}--${size}`, className)),
1421
+ className: iconButtonClass({ active, disabled }, cx(`${"xc-iconbtn"}--${size}`, variant !== "default" && `xc-iconbtn--${variant}`, className)),
1297
1422
  children: icon
1298
1423
  }
1299
1424
  );
@@ -1517,6 +1642,68 @@ function Composer({
1517
1642
  }
1518
1643
  );
1519
1644
  }
1645
+ function Readout({ value, unit, size = "md", label, onClick, title, className }) {
1646
+ usePanelPrimitives();
1647
+ const body = /* @__PURE__ */ jsxs2(Fragment, { children: [
1648
+ /* @__PURE__ */ jsx2("span", { className: `${CLS_READOUT}-value`, children: value }),
1649
+ unit !== void 0 && unit !== null ? /* @__PURE__ */ jsx2("span", { className: `${CLS_READOUT}-unit`, children: unit }) : null
1650
+ ] });
1651
+ if (onClick) {
1652
+ return /* @__PURE__ */ jsx2("button", { type: "button", className: cx(CLS_READOUT, `${CLS_READOUT}--${size}`, `${CLS_READOUT}--button`, className), onClick, title, "aria-label": label, children: body });
1653
+ }
1654
+ return /* @__PURE__ */ jsx2("span", { className: cx(CLS_READOUT, `${CLS_READOUT}--${size}`, className), "aria-label": label, role: label ? "status" : void 0, children: body });
1655
+ }
1656
+ function NumberInput({ value, onChange, caption, label, min, max, step, disabled, className }) {
1657
+ usePanelPrimitives();
1658
+ return /* @__PURE__ */ jsxs2("label", { className: cx(CLS_NUMBER, disabled && `${CLS_NUMBER}--disabled`, className), children: [
1659
+ caption !== void 0 ? /* @__PURE__ */ jsx2("span", { className: `${CLS_NUMBER}-caption`, children: caption }) : null,
1660
+ /* @__PURE__ */ jsx2(
1661
+ "input",
1662
+ {
1663
+ type: "number",
1664
+ className: `${CLS_NUMBER}-input`,
1665
+ value,
1666
+ min,
1667
+ max,
1668
+ step,
1669
+ disabled,
1670
+ "aria-label": label ?? (typeof caption === "string" ? caption : void 0),
1671
+ onChange: (e) => {
1672
+ const n = Number(e.target.value);
1673
+ if (Number.isFinite(n)) onChange(n);
1674
+ }
1675
+ }
1676
+ )
1677
+ ] });
1678
+ }
1679
+ function Slider({ progress, label, valueMin = 0, valueMax = 1, valueNow, valueText, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onKeyDown, disabled, className, trackRef }) {
1680
+ usePanelPrimitives();
1681
+ const pct = `${Math.max(0, Math.min(1, progress)) * 100}%`;
1682
+ return /* @__PURE__ */ jsxs2(
1683
+ "div",
1684
+ {
1685
+ ref: trackRef,
1686
+ className: cx(CLS_SLIDER, disabled && `${CLS_SLIDER}--disabled`, className),
1687
+ role: "slider",
1688
+ "aria-label": label,
1689
+ "aria-valuemin": valueMin,
1690
+ "aria-valuemax": valueMax,
1691
+ "aria-valuenow": valueNow ?? progress,
1692
+ "aria-valuetext": valueText,
1693
+ "aria-disabled": disabled || void 0,
1694
+ tabIndex: disabled ? -1 : 0,
1695
+ onPointerDown: disabled ? void 0 : onPointerDown,
1696
+ onPointerMove: disabled ? void 0 : onPointerMove,
1697
+ onPointerUp: disabled ? void 0 : onPointerUp,
1698
+ onPointerCancel: disabled ? void 0 : onPointerCancel,
1699
+ onKeyDown: disabled ? void 0 : onKeyDown,
1700
+ children: [
1701
+ /* @__PURE__ */ jsx2("span", { className: `${CLS_SLIDER}-fill`, style: { width: pct } }),
1702
+ /* @__PURE__ */ jsx2("span", { className: `${CLS_SLIDER}-knob`, style: { left: pct } })
1703
+ ]
1704
+ }
1705
+ );
1706
+ }
1520
1707
 
1521
1708
  // src/chrome/section.tsx
1522
1709
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -1596,7 +1783,7 @@ function Section({
1596
1783
 
1597
1784
  // src/chrome/rows.tsx
1598
1785
  import { createContext, useContext } from "react";
1599
- import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1786
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1600
1787
  var RowListContext = createContext(null);
1601
1788
  function RowList({
1602
1789
  children,
@@ -1662,7 +1849,7 @@ function Row({
1662
1849
  ...rest,
1663
1850
  children: [
1664
1851
  noIcon ? null : /* @__PURE__ */ jsx4("span", { className: CLS_ROW_ICON, children: icon }),
1665
- children ?? /* @__PURE__ */ jsxs4(Fragment, { children: [
1852
+ children ?? /* @__PURE__ */ jsxs4(Fragment2, { children: [
1666
1853
  /* @__PURE__ */ jsx4("span", { className: CLS_ROW_LABEL, children: label }),
1667
1854
  meta != null ? /* @__PURE__ */ jsx4("span", { className: CLS_ROW_META, children: meta }) : null
1668
1855
  ] }),
@@ -1706,7 +1893,7 @@ function ErrorState({
1706
1893
  }
1707
1894
 
1708
1895
  // src/chrome/indicators.tsx
1709
- import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1896
+ import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
1710
1897
  function Badge({
1711
1898
  children,
1712
1899
  tone = "neutral",
@@ -1772,7 +1959,7 @@ function ProportionBar({ segments, label, className }) {
1772
1959
  }
1773
1960
  function StatusBar({ left, right, children, className }) {
1774
1961
  usePanelPrimitives();
1775
- return /* @__PURE__ */ jsx6("div", { className: cx(CLS_STATUSBAR, className), children: children ?? /* @__PURE__ */ jsxs6(Fragment2, { children: [
1962
+ return /* @__PURE__ */ jsx6("div", { className: cx(CLS_STATUSBAR, className), children: children ?? /* @__PURE__ */ jsxs6(Fragment3, { children: [
1776
1963
  /* @__PURE__ */ jsx6("span", { children: left }),
1777
1964
  /* @__PURE__ */ jsx6("span", { children: right })
1778
1965
  ] }) });
@@ -1840,6 +2027,9 @@ var COMPONENTS = {
1840
2027
  "chrome/TextButton": TextButton,
1841
2028
  "chrome/SearchField": SearchField,
1842
2029
  "chrome/Composer": Composer,
2030
+ "chrome/Readout": Readout,
2031
+ "chrome/NumberInput": NumberInput,
2032
+ "chrome/Slider": Slider,
1843
2033
  "chrome/SegmentedControl": SegmentedControl,
1844
2034
  "chrome/Toggle": Toggle,
1845
2035
  "chrome/FieldGroup": FieldGroup,
@@ -1886,6 +2076,16 @@ function gallery() {
1886
2076
  };
1887
2077
  form("IconButton", "default", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(SearchGlyph, {}), label: "Search", onClick: noop }));
1888
2078
  form("IconButton", "active", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(SearchGlyph, {}), label: "Search", onClick: noop, active: true }));
2079
+ form("IconButton", "primary", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(ChevronGlyph, {}), label: "Play", onClick: noop, variant: "primary" }));
2080
+ form("IconButton", "danger-armed", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(ClearGlyph, {}), label: "Record", onClick: noop, variant: "danger", active: true }));
2081
+ form("Readout", "timecode", () => /* @__PURE__ */ jsx7(Readout, { value: "00:01:23:12", unit: "TC", label: "Position" }));
2082
+ form("Readout", "clickable", () => /* @__PURE__ */ jsx7(Readout, { value: "00:01:23:12", unit: "TC", label: "Position 00:01:23:12", onClick: noop, title: "Click to change time display" }));
2083
+ form("Readout", "secondary", () => /* @__PURE__ */ jsx7(Readout, { value: "00:04:00:00", size: "sm" }));
2084
+ form("NumberInput", "default", () => /* @__PURE__ */ jsx7(NumberInput, { value: 120, onChange: noop, caption: "BPM", min: 20, max: 300 }));
2085
+ form("NumberInput", "disabled", () => /* @__PURE__ */ jsx7(NumberInput, { value: 24, onChange: noop, caption: "FPS", disabled: true }));
2086
+ form("Slider", "quarter", () => /* @__PURE__ */ jsx7(Slider, { progress: 0.25, label: "Playhead", valueMax: 100, valueNow: 25, valueText: "25%" }));
2087
+ form("Slider", "end", () => /* @__PURE__ */ jsx7(Slider, { progress: 1, label: "Playhead" }));
2088
+ form("Slider", "disabled", () => /* @__PURE__ */ jsx7(Slider, { progress: 0.5, label: "Playhead", disabled: true }));
1889
2089
  form("TextButton", "default", () => /* @__PURE__ */ jsx7(TextButton, { onClick: noop, children: "Clear all" }));
1890
2090
  form("TextButton", "disabled", () => /* @__PURE__ */ jsx7(TextButton, { onClick: noop, disabled: true, children: "Clear all" }));
1891
2091
  form("SearchField", "empty", () => /* @__PURE__ */ jsx7(SearchField, { value: "", onChange: noop, placeholder: "Filter rows\u2026", label: "Filter" }));
@@ -2040,6 +2240,7 @@ export {
2040
2240
  IconButton,
2041
2241
  IconFrame,
2042
2242
  LoadingState,
2243
+ NumberInput,
2043
2244
  PANEL_COLORS,
2044
2245
  PANEL_DISABLED_OPACITY,
2045
2246
  PANEL_METRICS,
@@ -2048,6 +2249,7 @@ export {
2048
2249
  PANEL_TONES,
2049
2250
  PanelFrame,
2050
2251
  ProportionBar,
2252
+ Readout,
2051
2253
  Row,
2052
2254
  RowList,
2053
2255
  ScrollArea,
@@ -2055,6 +2257,7 @@ export {
2055
2257
  SearchGlyph,
2056
2258
  Section,
2057
2259
  SegmentedControl,
2260
+ Slider,
2058
2261
  Sparkline,
2059
2262
  Stack,
2060
2263
  StatTile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/components",
3
- "version": "0.9.3",
3
+ "version": "0.10.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",