@xenosystem/components 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.json +12 -0
- package/dist/chrome/index.d.ts +7 -3
- package/dist/chrome/index.js +30 -9
- package/package.json +1 -1
package/dist/catalog.json
CHANGED
|
@@ -763,6 +763,18 @@
|
|
|
763
763
|
"optional": true,
|
|
764
764
|
"doc": "Accessible name; the figure is read as text."
|
|
765
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
|
+
},
|
|
766
778
|
{
|
|
767
779
|
"name": "className",
|
|
768
780
|
"type": "string",
|
package/dist/chrome/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ interface ScrollAreaProps {
|
|
|
94
94
|
*/
|
|
95
95
|
declare function ScrollArea({ children, className }: ScrollAreaProps): ReactNode;
|
|
96
96
|
/** Props for {@link Column}. */
|
|
97
|
-
interface ColumnProps {
|
|
97
|
+
interface ColumnProps extends HTMLAttributes<HTMLDivElement> {
|
|
98
98
|
children?: ReactNode;
|
|
99
99
|
className?: string;
|
|
100
100
|
}
|
|
@@ -104,7 +104,7 @@ interface ColumnProps {
|
|
|
104
104
|
* 'flex', flexDirection: 'column', height: '100%', minHeight: 0 }}>` by hand; as a unit it is the root
|
|
105
105
|
* a declaration can name.
|
|
106
106
|
*/
|
|
107
|
-
declare function Column({ children, className }: ColumnProps): ReactNode;
|
|
107
|
+
declare function Column({ children, className, ...rest }: ColumnProps): ReactNode;
|
|
108
108
|
/** Props for {@link Stack}. */
|
|
109
109
|
interface StackProps {
|
|
110
110
|
children?: ReactNode;
|
|
@@ -731,10 +731,14 @@ interface ReadoutProps {
|
|
|
731
731
|
size?: 'sm' | 'md';
|
|
732
732
|
/** Accessible name; the figure is read as text. */
|
|
733
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;
|
|
734
738
|
className?: string;
|
|
735
739
|
}
|
|
736
740
|
/** A value with its unit — the transport's position, a timeline's duration, a calendar's week number. */
|
|
737
|
-
declare function Readout({ value, unit, size, label, className }: ReadoutProps): ReactNode;
|
|
741
|
+
declare function Readout({ value, unit, size, label, onClick, title, className }: ReadoutProps): ReactNode;
|
|
738
742
|
/** Props for {@link NumberInput}. */
|
|
739
743
|
interface NumberInputProps {
|
|
740
744
|
value: number;
|
package/dist/chrome/index.js
CHANGED
|
@@ -730,6 +730,22 @@ div.xc-section-trigger {
|
|
|
730
730
|
}
|
|
731
731
|
.xc-readout--md .xc-readout-value { font-size: ${PANEL_METRICS.fontBody + 1}px; }
|
|
732
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
|
+
}
|
|
733
749
|
.xc-readout-unit {
|
|
734
750
|
font-size: ${PANEL_METRICS.fontMeta - 2}px;
|
|
735
751
|
letter-spacing: 0.06em;
|
|
@@ -1305,9 +1321,9 @@ function ScrollArea({ children, className }) {
|
|
|
1305
1321
|
usePanelPrimitives();
|
|
1306
1322
|
return /* @__PURE__ */ jsx("div", { className: cx(CLS_SCROLL, className), children });
|
|
1307
1323
|
}
|
|
1308
|
-
function Column({ children, className }) {
|
|
1324
|
+
function Column({ children, className, ...rest }) {
|
|
1309
1325
|
usePanelPrimitives();
|
|
1310
|
-
return /* @__PURE__ */ jsx("div", { className: cx(CLS_COLUMN, className), children });
|
|
1326
|
+
return /* @__PURE__ */ jsx("div", { className: cx(CLS_COLUMN, className), ...rest, children });
|
|
1311
1327
|
}
|
|
1312
1328
|
function Stack({ children, direction = "column", gap, pad = "gutter", className }) {
|
|
1313
1329
|
usePanelPrimitives();
|
|
@@ -1324,7 +1340,7 @@ import { useState as useState3 } from "react";
|
|
|
1324
1340
|
|
|
1325
1341
|
// src/chrome/controls.tsx
|
|
1326
1342
|
import { useId } from "react";
|
|
1327
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1343
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1328
1344
|
function SearchGlyph() {
|
|
1329
1345
|
return /* @__PURE__ */ jsxs2(
|
|
1330
1346
|
"svg",
|
|
@@ -1626,12 +1642,16 @@ function Composer({
|
|
|
1626
1642
|
}
|
|
1627
1643
|
);
|
|
1628
1644
|
}
|
|
1629
|
-
function Readout({ value, unit, size = "md", label, className }) {
|
|
1645
|
+
function Readout({ value, unit, size = "md", label, onClick, title, className }) {
|
|
1630
1646
|
usePanelPrimitives();
|
|
1631
|
-
|
|
1647
|
+
const body = /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
1632
1648
|
/* @__PURE__ */ jsx2("span", { className: `${CLS_READOUT}-value`, children: value }),
|
|
1633
1649
|
unit !== void 0 && unit !== null ? /* @__PURE__ */ jsx2("span", { className: `${CLS_READOUT}-unit`, children: unit }) : null
|
|
1634
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 });
|
|
1635
1655
|
}
|
|
1636
1656
|
function NumberInput({ value, onChange, caption, label, min, max, step, disabled, className }) {
|
|
1637
1657
|
usePanelPrimitives();
|
|
@@ -1763,7 +1783,7 @@ function Section({
|
|
|
1763
1783
|
|
|
1764
1784
|
// src/chrome/rows.tsx
|
|
1765
1785
|
import { createContext, useContext } from "react";
|
|
1766
|
-
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";
|
|
1767
1787
|
var RowListContext = createContext(null);
|
|
1768
1788
|
function RowList({
|
|
1769
1789
|
children,
|
|
@@ -1829,7 +1849,7 @@ function Row({
|
|
|
1829
1849
|
...rest,
|
|
1830
1850
|
children: [
|
|
1831
1851
|
noIcon ? null : /* @__PURE__ */ jsx4("span", { className: CLS_ROW_ICON, children: icon }),
|
|
1832
|
-
children ?? /* @__PURE__ */ jsxs4(
|
|
1852
|
+
children ?? /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
1833
1853
|
/* @__PURE__ */ jsx4("span", { className: CLS_ROW_LABEL, children: label }),
|
|
1834
1854
|
meta != null ? /* @__PURE__ */ jsx4("span", { className: CLS_ROW_META, children: meta }) : null
|
|
1835
1855
|
] }),
|
|
@@ -1873,7 +1893,7 @@ function ErrorState({
|
|
|
1873
1893
|
}
|
|
1874
1894
|
|
|
1875
1895
|
// src/chrome/indicators.tsx
|
|
1876
|
-
import { Fragment as
|
|
1896
|
+
import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1877
1897
|
function Badge({
|
|
1878
1898
|
children,
|
|
1879
1899
|
tone = "neutral",
|
|
@@ -1939,7 +1959,7 @@ function ProportionBar({ segments, label, className }) {
|
|
|
1939
1959
|
}
|
|
1940
1960
|
function StatusBar({ left, right, children, className }) {
|
|
1941
1961
|
usePanelPrimitives();
|
|
1942
|
-
return /* @__PURE__ */ jsx6("div", { className: cx(CLS_STATUSBAR, className), children: children ?? /* @__PURE__ */ jsxs6(
|
|
1962
|
+
return /* @__PURE__ */ jsx6("div", { className: cx(CLS_STATUSBAR, className), children: children ?? /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1943
1963
|
/* @__PURE__ */ jsx6("span", { children: left }),
|
|
1944
1964
|
/* @__PURE__ */ jsx6("span", { children: right })
|
|
1945
1965
|
] }) });
|
|
@@ -2059,6 +2079,7 @@ function gallery() {
|
|
|
2059
2079
|
form("IconButton", "primary", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(ChevronGlyph, {}), label: "Play", onClick: noop, variant: "primary" }));
|
|
2060
2080
|
form("IconButton", "danger-armed", () => /* @__PURE__ */ jsx7(IconButton, { icon: /* @__PURE__ */ jsx7(ClearGlyph, {}), label: "Record", onClick: noop, variant: "danger", active: true }));
|
|
2061
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" }));
|
|
2062
2083
|
form("Readout", "secondary", () => /* @__PURE__ */ jsx7(Readout, { value: "00:04:00:00", size: "sm" }));
|
|
2063
2084
|
form("NumberInput", "default", () => /* @__PURE__ */ jsx7(NumberInput, { value: 120, onChange: noop, caption: "BPM", min: 20, max: 300 }));
|
|
2064
2085
|
form("NumberInput", "disabled", () => /* @__PURE__ */ jsx7(NumberInput, { value: 24, onChange: noop, caption: "FPS", disabled: true }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xenosystem/components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
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",
|