@hanzo/ui 8.0.71 → 8.0.73

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.
@@ -1,7 +1,7 @@
1
1
  'use client';"use strict";
2
2
  'use client';
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = void 0;
4
+ exports.PopoverClose = exports.PopoverAnchor = exports.PopoverContent = exports.PopoverTrigger = exports.place = void 0;
5
5
  exports.Popover = Popover;
6
6
  const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  /**
@@ -9,20 +9,36 @@ const jsx_runtime_1 = require("react/jsx-runtime");
9
9
  *
10
10
  * `PopoverContent` mounts its own portal and re-applies the trigger's resolved
11
11
  * theme inside it (gui portals re-root the subtree, so theme context does not
12
- * flow). `sideOffset` lands on the popper root, which is where gui keeps it.
12
+ * flow).
13
+ *
14
+ * gui keeps BOTH placement facts on the popper ROOT — `offset` and `placement`
15
+ * — while the compound API spells them on Content, as `sideOffset` and `align`.
16
+ * One value, one owner: the root holds them, Content publishes into it.
13
17
  */
14
18
  const gui_1 = require("@hanzo/gui");
15
19
  const react_1 = require("react");
16
20
  const portal_theme_1 = require("../../product/menu/portal-theme.cjs");
17
21
  const slot_1 = require("./slot.cjs");
18
22
  const DEFAULT_OFFSET = 4;
19
- /** gui puts `offset` on the popper ROOT; the compound API puts `sideOffset` on
20
- * Content. One value, one owner: the root holds it, Content publishes into it. */
21
- const OffsetContext = /* @__PURE__ */ (0, react_1.createContext)(null);
22
- function Popover({ offset = DEFAULT_OFFSET, ...props }) {
23
- const [current, setOffset] = (0, react_1.useState)(offset);
24
- (0, react_1.useEffect)(() => setOffset(offset), [offset]);
25
- return ((0, jsx_runtime_1.jsx)(OffsetContext.Provider, { value: setOffset, children: (0, jsx_runtime_1.jsx)(gui_1.Popover, { offset: current, ...props }) }));
23
+ const DEFAULT_SIDE = 'bottom';
24
+ /**
25
+ * The placement a SIDE and an ALIGN name together. gui speaks floating-ui's
26
+ * one string; the compound API splits the same fact in two, so this rejoins
27
+ * them. `center` is the ABSENCE of a suffix rather than a suffix of its own,
28
+ * and a side that already carries one is re-aligned rather than appended to.
29
+ *
30
+ * Example: place('bottom', 'start') === 'bottom-start'
31
+ */
32
+ const place = (side, align = 'center') => {
33
+ const base = side.split('-')[0];
34
+ return align === 'center' ? base : `${base}-${align}`;
35
+ };
36
+ exports.place = place;
37
+ const Publish = /* @__PURE__ */ (0, react_1.createContext)(null);
38
+ function Popover({ offset = DEFAULT_OFFSET, placement, ...props }) {
39
+ const [placed, setPlaced] = (0, react_1.useState)({});
40
+ const publish = (0, react_1.useCallback)((p) => setPlaced((prev) => ({ ...prev, ...p })), []);
41
+ return ((0, jsx_runtime_1.jsx)(Publish.Provider, { value: publish, children: (0, jsx_runtime_1.jsx)(gui_1.Popover, { offset: placed.offset ?? offset, placement: (0, exports.place)(placement ?? DEFAULT_SIDE, placed.align), ...props }) }));
26
42
  }
27
43
  const PopoverTrigger = gui_1.Popover.Trigger;
28
44
  exports.PopoverTrigger = PopoverTrigger;
@@ -30,10 +46,10 @@ const PopoverAnchor = gui_1.Popover.Anchor;
30
46
  exports.PopoverAnchor = PopoverAnchor;
31
47
  const PopoverClose = gui_1.Popover.Close;
32
48
  exports.PopoverClose = PopoverClose;
33
- const PopoverContent = ({ sideOffset = DEFAULT_OFFSET, align: _align, ...props }) => {
49
+ const PopoverContent = ({ sideOffset = DEFAULT_OFFSET, align, ...props }) => {
34
50
  const themeName = (0, portal_theme_1.useThemeName)();
35
- const setOffset = (0, react_1.useContext)(OffsetContext);
36
- (0, react_1.useEffect)(() => setOffset?.(sideOffset), [setOffset, sideOffset]);
51
+ const publish = (0, react_1.useContext)(Publish);
52
+ (0, react_1.useEffect)(() => publish?.({ offset: sideOffset, align }), [publish, sideOffset, align]);
37
53
  return ((0, jsx_runtime_1.jsx)(portal_theme_1.PortalTheme, { name: themeName, children: (0, jsx_runtime_1.jsx)(gui_1.Popover.Content, { ...(0, slot_1.slot)('popover-content'), bg: "$color2", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", p: "$4", width: 288, ...props }) }));
38
54
  };
39
55
  exports.PopoverContent = PopoverContent;
@@ -3,21 +3,35 @@
3
3
  *
4
4
  * `PopoverContent` mounts its own portal and re-applies the trigger's resolved
5
5
  * theme inside it (gui portals re-root the subtree, so theme context does not
6
- * flow). `sideOffset` lands on the popper root, which is where gui keeps it.
6
+ * flow).
7
+ *
8
+ * gui keeps BOTH placement facts on the popper ROOT — `offset` and `placement`
9
+ * — while the compound API spells them on Content, as `sideOffset` and `align`.
10
+ * One value, one owner: the root holds them, Content publishes into it.
7
11
  */
8
12
  import { Popover as GuiPopover } from '@hanzo/gui';
9
13
  import { type ComponentProps } from 'react';
14
+ export type Align = 'start' | 'center' | 'end';
15
+ /**
16
+ * The placement a SIDE and an ALIGN name together. gui speaks floating-ui's
17
+ * one string; the compound API splits the same fact in two, so this rejoins
18
+ * them. `center` is the ABSENCE of a suffix rather than a suffix of its own,
19
+ * and a side that already carries one is re-aligned rather than appended to.
20
+ *
21
+ * Example: place('bottom', 'start') === 'bottom-start'
22
+ */
23
+ export declare const place: (side: string, align?: Align) => string;
10
24
  export type PopoverProps = Omit<ComponentProps<typeof GuiPopover>, 'offset'> & {
11
25
  offset?: number;
12
26
  };
13
- declare function Popover({ offset, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
27
+ declare function Popover({ offset, placement, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
14
28
  declare const PopoverTrigger: typeof GuiPopover.Trigger;
15
29
  declare const PopoverAnchor: typeof GuiPopover.Anchor;
16
30
  declare const PopoverClose: typeof GuiPopover.Close;
17
31
  export type PopoverContentProps = ComponentProps<typeof GuiPopover.Content> & {
18
32
  sideOffset?: number;
19
- align?: 'start' | 'center' | 'end';
33
+ align?: Align;
20
34
  };
21
- declare const PopoverContent: ({ sideOffset, align: _align, ...props }: PopoverContentProps) => import("react/jsx-runtime").JSX.Element;
35
+ declare const PopoverContent: ({ sideOffset, align, ...props }: PopoverContentProps) => import("react/jsx-runtime").JSX.Element;
22
36
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose };
23
37
  //# sourceMappingURL=popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/popover.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAkD,KAAK,cAAc,EAAE,MAAM,OAAO,CAAA;AAU3F,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAElG,iBAAS,OAAO,CAAC,EAAE,MAAuB,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAQnE;AAED,QAAA,MAAM,cAAc,EAAE,OAAO,UAAU,CAAC,OAA4B,CAAA;AACpE,QAAA,MAAM,aAAa,EAAE,OAAO,UAAU,CAAC,MAA0B,CAAA;AACjE,QAAA,MAAM,YAAY,EAAE,OAAO,UAAU,CAAC,KAAwB,CAAA;AAE9D,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;CACnC,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,yCAA0D,mBAAmB,4CAkBpG,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/popover.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAML,KAAK,cAAc,EACpB,MAAM,OAAO,CAAA;AAOd,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,EAAE,QAAO,KAAgB,KAAG,MAG7D,CAAA;AAOD,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAElG,iBAAS,OAAO,CAAC,EAAE,MAAuB,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAY9E;AAED,QAAA,MAAM,cAAc,EAAE,OAAO,UAAU,CAAC,OAA4B,CAAA;AACpE,QAAA,MAAM,aAAa,EAAE,OAAO,UAAU,CAAC,MAA0B,CAAA;AACjE,QAAA,MAAM,YAAY,EAAE,OAAO,UAAU,CAAC,KAAwB,CAAA;AAE9D,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,OAAO,CAAC,GAAG;IAC5E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,iCAAkD,mBAAmB,4CAkB5F,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
@@ -5,28 +5,43 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  *
6
6
  * `PopoverContent` mounts its own portal and re-applies the trigger's resolved
7
7
  * theme inside it (gui portals re-root the subtree, so theme context does not
8
- * flow). `sideOffset` lands on the popper root, which is where gui keeps it.
8
+ * flow).
9
+ *
10
+ * gui keeps BOTH placement facts on the popper ROOT — `offset` and `placement`
11
+ * — while the compound API spells them on Content, as `sideOffset` and `align`.
12
+ * One value, one owner: the root holds them, Content publishes into it.
9
13
  */
10
14
  import { Popover as GuiPopover } from '@hanzo/gui';
11
- import { createContext, useContext, useEffect, useState } from 'react';
15
+ import { createContext, useCallback, useContext, useEffect, useState, } from 'react';
12
16
  import { PortalTheme, useThemeName } from '../../product/menu/portal-theme.js';
13
17
  import { slot } from './slot.js';
14
18
  const DEFAULT_OFFSET = 4;
15
- /** gui puts `offset` on the popper ROOT; the compound API puts `sideOffset` on
16
- * Content. One value, one owner: the root holds it, Content publishes into it. */
17
- const OffsetContext = /* @__PURE__ */ createContext(null);
18
- function Popover({ offset = DEFAULT_OFFSET, ...props }) {
19
- const [current, setOffset] = useState(offset);
20
- useEffect(() => setOffset(offset), [offset]);
21
- return (_jsx(OffsetContext.Provider, { value: setOffset, children: _jsx(GuiPopover, { offset: current, ...props }) }));
19
+ const DEFAULT_SIDE = 'bottom';
20
+ /**
21
+ * The placement a SIDE and an ALIGN name together. gui speaks floating-ui's
22
+ * one string; the compound API splits the same fact in two, so this rejoins
23
+ * them. `center` is the ABSENCE of a suffix rather than a suffix of its own,
24
+ * and a side that already carries one is re-aligned rather than appended to.
25
+ *
26
+ * Example: place('bottom', 'start') === 'bottom-start'
27
+ */
28
+ export const place = (side, align = 'center') => {
29
+ const base = side.split('-')[0];
30
+ return align === 'center' ? base : `${base}-${align}`;
31
+ };
32
+ const Publish = /* @__PURE__ */ createContext(null);
33
+ function Popover({ offset = DEFAULT_OFFSET, placement, ...props }) {
34
+ const [placed, setPlaced] = useState({});
35
+ const publish = useCallback((p) => setPlaced((prev) => ({ ...prev, ...p })), []);
36
+ return (_jsx(Publish.Provider, { value: publish, children: _jsx(GuiPopover, { offset: placed.offset ?? offset, placement: place(placement ?? DEFAULT_SIDE, placed.align), ...props }) }));
22
37
  }
23
38
  const PopoverTrigger = GuiPopover.Trigger;
24
39
  const PopoverAnchor = GuiPopover.Anchor;
25
40
  const PopoverClose = GuiPopover.Close;
26
- const PopoverContent = ({ sideOffset = DEFAULT_OFFSET, align: _align, ...props }) => {
41
+ const PopoverContent = ({ sideOffset = DEFAULT_OFFSET, align, ...props }) => {
27
42
  const themeName = useThemeName();
28
- const setOffset = useContext(OffsetContext);
29
- useEffect(() => setOffset?.(sideOffset), [setOffset, sideOffset]);
43
+ const publish = useContext(Publish);
44
+ useEffect(() => publish?.({ offset: sideOffset, align }), [publish, sideOffset, align]);
30
45
  return (_jsx(PortalTheme, { name: themeName, children: _jsx(GuiPopover.Content, { ...slot('popover-content'), bg: "$color2", borderWidth: 1, borderColor: "$borderColor", rounded: "$4", p: "$4", width: 288, ...props }) }));
31
46
  };
32
47
  export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverClose };
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/backends/gui/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAA;AAC3F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAE7B,MAAM,cAAc,GAAG,CAAC,CAAA;AAExB;mFACmF;AACnF,MAAM,aAAa,GAAG,eAAe,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAA;AAIvF,SAAS,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,EAAE,GAAG,KAAK,EAAgB;IAClE,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;IAC7C,SAAS,CAAC,GAAG,EAAE,CAAC,SA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MAAM,CAAC,KAAK,CAAqB,KACzE,KAAK,GACT,GACe,CACpB,CAAA;AACH,CAAC;AAED,MAAM,cAAc,GAA8B,UAAU,CAAC,OAAO,CAAA;AACpE,MAAM,aAAa,GAA6B,UAAU,CAAC,MAAM,CAAA;AACjE,MAAM,YAAY,GAA4B,UAAU,CAAC,KAAK,CAAA;AAO9D,MAAM,cAAc,GAAG,CAAC,EAAE,UAAU,GAAG,cAAc,EAAE,KAAK,EAAE,GAAG,KAAK,EAAuB,EAAE,EAAE;IAC/F,MAAM,SAAS,GAAG,YAAY,EAAE,CAAA;IAChC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,CAAA;IACnC,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAA;IACvF,OAAO,CACL,KAAC,WAAW,IAAC,IAAI,EAAE,SAAS,YAC1B,KAAC,UAAU,CAAC,OAAO,OACb,IAAI,CAAC,iBAAiB,CAAC,EAC3B,EAAE,EAAC,SAAS,EACZ,WAAW,EAAE,CAAC,EACd,WAAW,EAAC,cAAc,EAC1B,OAAO,EAAC,IAAI,EACZ,CAAC,EAAC,IAAI,EACN,KAAK,EAAE,GAAG,KACN,KAAK,GACT,GACU,CACf,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
@@ -1,7 +1,7 @@
1
1
  'use client';"use strict";
2
2
  'use client';
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Slider = void 0;
4
+ exports.Slider = exports.named = void 0;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  /** Slider — 6px track, 16px thumb, `touch()` to the 44px floor on every target. */
7
7
  const gui_1 = require("@hanzo/gui");
@@ -9,12 +9,36 @@ const slot_1 = require("./slot.cjs");
9
9
  const gesture_1 = require("./gesture.cjs");
10
10
  const TRACK = 6;
11
11
  const THUMB = 16;
12
- const Slider = (props) => ((0, jsx_runtime_1.jsxs)(gui_1.Slider, { ...(0, slot_1.slot)('slider'), width: "100%", ...props, children: [(0, jsx_runtime_1.jsx)(gui_1.Slider.Track, { ...(0, slot_1.slot)('slider-track'), height: TRACK, bg: "$color4", rounded: "$10", children: (0, jsx_runtime_1.jsx)(gui_1.Slider.TrackActive, { ...(0, slot_1.slot)('slider-range'), bg: "$color12" }) }), (0, jsx_runtime_1.jsx)(gui_1.Slider.Thumb, { ...(0, slot_1.slot)('slider-thumb'), index: 0, circular: true, size: THUMB,
13
- // A FILLED knob, no ring. It used to be a dark knob ringed in `$color12`,
14
- // which is #fff on dark the one border value the identity does not
15
- // allow. `$borderColor` is not the fix either: gui gives the thumb its own
16
- // `SliderThumb` sub-theme, where that token is white as well. A filled
17
- // knob needs no border, and `$color12` reads on both themes (white on
18
- // dark, near-black on light).
19
- bg: "$color12", borderWidth: 0, ...(0, gesture_1.touch)(THUMB) })] }));
12
+ /**
13
+ * The name belongs where the ROLE is. gui puts `role="slider"` on the Thumb,
14
+ * so a name spread onto the root lands on a plain container that no screen
15
+ * reader announces the control reads as an unlabelled slider. These are the
16
+ * naming and description properties an ARIA slider must carry; everything else
17
+ * (value, range, step, orientation, disabled) is the root's and stays there.
18
+ */
19
+ const NAMES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-valuetext'];
20
+ /** Splits a caller's props into what the thumb must carry and what the root keeps. */
21
+ const named = (props) => {
22
+ const name = {};
23
+ const rest = {};
24
+ for (const [k, v] of Object.entries(props)) {
25
+ if (NAMES.includes(k))
26
+ name[k] = v;
27
+ else
28
+ rest[k] = v;
29
+ }
30
+ return { name, rest };
31
+ };
32
+ exports.named = named;
33
+ const Slider = (props) => {
34
+ const { name, rest } = (0, exports.named)(props);
35
+ return ((0, jsx_runtime_1.jsxs)(gui_1.Slider, { ...(0, slot_1.slot)('slider'), width: "100%", ...rest, children: [(0, jsx_runtime_1.jsx)(gui_1.Slider.Track, { ...(0, slot_1.slot)('slider-track'), height: TRACK, bg: "$color4", rounded: "$10", children: (0, jsx_runtime_1.jsx)(gui_1.Slider.TrackActive, { ...(0, slot_1.slot)('slider-range'), bg: "$color12" }) }), (0, jsx_runtime_1.jsx)(gui_1.Slider.Thumb, { ...(0, slot_1.slot)('slider-thumb'), index: 0, circular: true, size: THUMB,
36
+ // A FILLED knob, no ring. It used to be a dark knob ringed in `$color12`,
37
+ // which is #fff on dark — the one border value the identity does not
38
+ // allow. `$borderColor` is not the fix either: gui gives the thumb its own
39
+ // `SliderThumb` sub-theme, where that token is white as well. A filled
40
+ // knob needs no border, and `$color12` reads on both themes (white on
41
+ // dark, near-black on light).
42
+ bg: "$color12", borderWidth: 0, ...(0, gesture_1.touch)(THUMB), ...name })] }));
43
+ };
20
44
  exports.Slider = Slider;
@@ -1,6 +1,22 @@
1
1
  /** Slider — 6px track, 16px thumb, `touch()` to the 44px floor on every target. */
2
2
  import { Slider as GuiSlider } from '@hanzo/gui';
3
3
  import type { ComponentProps } from 'react';
4
+ /**
5
+ * The name belongs where the ROLE is. gui puts `role="slider"` on the Thumb,
6
+ * so a name spread onto the root lands on a plain container that no screen
7
+ * reader announces — the control reads as an unlabelled slider. These are the
8
+ * naming and description properties an ARIA slider must carry; everything else
9
+ * (value, range, step, orientation, disabled) is the root's and stays there.
10
+ */
11
+ declare const NAMES: readonly ["aria-label", "aria-labelledby", "aria-describedby", "aria-valuetext"];
12
+ type Name = (typeof NAMES)[number];
13
+ /** An ARIA naming property is a string by contract, so the split says so. */
14
+ type Names = Partial<Record<Name, string>>;
15
+ /** Splits a caller's props into what the thumb must carry and what the root keeps. */
16
+ export declare const named: (props: Record<string, unknown>) => {
17
+ name: Names;
18
+ rest: Record<string, unknown>;
19
+ };
4
20
  export type SliderProps = ComponentProps<typeof GuiSlider>;
5
21
  declare const Slider: (props: SliderProps) => import("react/jsx-runtime").JSX.Element;
6
22
  export { Slider };
@@ -1 +1 @@
1
- {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/slider.tsx"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAO3C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAA;AAE1D,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,4CAqBjC,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/slider.tsx"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAO3C;;;;;;GAMG;AACH,QAAA,MAAM,KAAK,kFAAmF,CAAA;AAE9F,KAAK,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAElC,6EAA6E;AAC7E,KAAK,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAA;AAE1C,sFAAsF;AACtF,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAQlG,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,SAAS,CAAC,CAAA;AAE1D,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,4CAyBjC,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -6,13 +6,36 @@ import { slot } from './slot.js';
6
6
  import { touch } from './gesture.js';
7
7
  const TRACK = 6;
8
8
  const THUMB = 16;
9
- const Slider = (props) => (_jsxs(GuiSlider, { ...slot('slider'), width: "100%", ...props, children: [_jsx(GuiSlider.Track, { ...slot('slider-track'), height: TRACK, bg: "$color4", rounded: "$10", children: _jsx(GuiSlider.TrackActive, { ...slot('slider-range'), bg: "$color12" }) }), _jsx(GuiSlider.Thumb, { ...slot('slider-thumb'), index: 0, circular: true, size: THUMB,
10
- // A FILLED knob, no ring. It used to be a dark knob ringed in `$color12`,
11
- // which is #fff on dark the one border value the identity does not
12
- // allow. `$borderColor` is not the fix either: gui gives the thumb its own
13
- // `SliderThumb` sub-theme, where that token is white as well. A filled
14
- // knob needs no border, and `$color12` reads on both themes (white on
15
- // dark, near-black on light).
16
- bg: "$color12", borderWidth: 0, ...touch(THUMB) })] }));
9
+ /**
10
+ * The name belongs where the ROLE is. gui puts `role="slider"` on the Thumb,
11
+ * so a name spread onto the root lands on a plain container that no screen
12
+ * reader announces the control reads as an unlabelled slider. These are the
13
+ * naming and description properties an ARIA slider must carry; everything else
14
+ * (value, range, step, orientation, disabled) is the root's and stays there.
15
+ */
16
+ const NAMES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-valuetext'];
17
+ /** Splits a caller's props into what the thumb must carry and what the root keeps. */
18
+ export const named = (props) => {
19
+ const name = {};
20
+ const rest = {};
21
+ for (const [k, v] of Object.entries(props)) {
22
+ if (NAMES.includes(k))
23
+ name[k] = v;
24
+ else
25
+ rest[k] = v;
26
+ }
27
+ return { name, rest };
28
+ };
29
+ const Slider = (props) => {
30
+ const { name, rest } = named(props);
31
+ return (_jsxs(GuiSlider, { ...slot('slider'), width: "100%", ...rest, children: [_jsx(GuiSlider.Track, { ...slot('slider-track'), height: TRACK, bg: "$color4", rounded: "$10", children: _jsx(GuiSlider.TrackActive, { ...slot('slider-range'), bg: "$color12" }) }), _jsx(GuiSlider.Thumb, { ...slot('slider-thumb'), index: 0, circular: true, size: THUMB,
32
+ // A FILLED knob, no ring. It used to be a dark knob ringed in `$color12`,
33
+ // which is #fff on dark — the one border value the identity does not
34
+ // allow. `$borderColor` is not the fix either: gui gives the thumb its own
35
+ // `SliderThumb` sub-theme, where that token is white as well. A filled
36
+ // knob needs no border, and `$color12` reads on both themes (white on
37
+ // dark, near-black on light).
38
+ bg: "$color12", borderWidth: 0, ...touch(THUMB), ...name })] }));
39
+ };
17
40
  export { Slider };
18
41
  //# sourceMappingURL=slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sourceRoot":"","sources":["../../../src/backends/gui/slider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,mFAAmF;AACnF,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,YAAY,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAEjC,MAAM,KAAK,GAAG,CAAC,CAAA;AACf,MAAM,KAAK,GAAG,EAAE,CAAA;AAIhB,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE,CAAC,CACrC,MAAC,SAAS,OAAK,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAC,MAAM,KAAK,KAAK,aACnD,KAAC,SAAS,CAAC,KAAK,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,EAAC,OAAO,EAAC,KAAK,YAClF,KAAC,SAAS,CAAC,WAAW,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,EAAC,UAAU,GAAG,GACjD,EAClB,KAAC,SAAS,CAAC,KAAK,OACV,IAAI,CAAC,cAAc,CAAC,EACxB,KAAK,EAAE,CAAC,EACR,QAAQ,QACR,IAAI,EAAE,KAAK;YACX,0EAA0E;YAC1E,qEAAqE;YACrE,2EAA2E;YAC3E,uEAAuE;YACvE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,CACL,MAAC,SAAS,OAAK,IAAI,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAC,MAAM,KAAK,IAAI,aAClD,KAAC,SAAS,CAAC,KAAK,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,EAAC,OAAO,EAAC,KAAK,YAClF,KAAC,SAAS,CAAC,WAAW,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,EAAE,EAAC,UAAU,GAAG,GACjD,EAClB,KAAC,SAAS,CAAC,KAAK,OACV,IAAI,CAAC,cAAc,CAAC,EACxB,KAAK,EAAE,CAAC,EACR,QAAQ,QACR,IAAI,EAAE,KAAK;gBACX,0EAA0E;gBAC1E,qEAAqE;gBACrE,2EAA2E;gBAC3E,uEAAuE;gBACvE,sEAAsE;gBACtE,8BAA8B;gBAC9B,EAAE,EAAC,UAAU,EACb,WAAW,EAAE,CAAC,KACV,KAAK,CAAC,KAAK,CAAC,KACZ,IAAI,GACR,IACQ,CACb,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
package/dist/root.cjs CHANGED
@@ -39,6 +39,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
39
39
  */
40
40
  const gui_1 = require("@hanzo/gui");
41
41
  const telemetry_1 = require("@hanzogui/telemetry");
42
+ const react_1 = require("react");
43
+ const state_1 = require("@hanzo/appearance/state");
42
44
  const gui_config_1 = require("./gui-config.cjs");
43
45
  require("./styles.css");
44
46
  /** A stylesheet that did not reach the document is invisible until someone opens
@@ -62,6 +64,24 @@ const assertStylesheet = () => {
62
64
  const Hanzo = ({ children, theme = 'dark', analytics }) => {
63
65
  if (process.env.NODE_ENV !== 'production')
64
66
  assertStylesheet();
67
+ // A person's stored type size, density and accent, put on the document.
68
+ //
69
+ // Unconditional, unlike `analytics`, and the difference is the whole reason
70
+ // that one is a prop. Analytics starts a conversation with a server the app
71
+ // did not ask for; this reads a preference the PERSON already set on this
72
+ // device and honours it. An app that has to opt in is an app that forgets to,
73
+ // and then the setting silently does nothing on that surface — which is worse
74
+ // than not offering it.
75
+ //
76
+ // Costs nothing when unused: an axis nobody set is absent rather than
77
+ // neutral, so `apply()` removes the property instead of stamping a `1` that
78
+ // would outrank a brand's own scale.
79
+ //
80
+ // This is the MOUNT half only. First paint still wants `bootScript()` in
81
+ // <head>, because no component can run before the document exists.
82
+ (0, react_1.useEffect)(() => {
83
+ (0, state_1.apply)((0, state_1.read)());
84
+ }, []);
65
85
  const tree = ((0, jsx_runtime_1.jsx)(gui_1.GuiProvider, { config: gui_config_1.config, defaultTheme: theme, disableInjectCSS: true, children: children }));
66
86
  // OUTSIDE the gui provider: capture is delegated at the document, so it does
67
87
  // not need to be inside the styled tree, and an app that renders its own
package/dist/root.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type TelemetryConfig } from '@hanzogui/telemetry';
2
- import type { ReactNode } from 'react';
2
+ import { type ReactNode } from 'react';
3
3
  import './styles.css';
4
4
  export type HanzoProps = {
5
5
  children?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;AAqBD,eAAO,MAAM,KAAK,GAAI,gCAAyC,UAAU,4CAaxE,CAAA;AAED,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAqCA,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKjD,OAAO,cAAc,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAA;CACtC,CAAA;AAqBD,eAAO,MAAM,KAAK,GAAI,gCAAyC,UAAU,4CA+BxE,CAAA;AAED,eAAe,KAAK,CAAA"}
package/dist/root.js CHANGED
@@ -36,6 +36,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
36
36
  */
37
37
  import { GuiProvider } from '@hanzo/gui';
38
38
  import { TelemetryProvider } from '@hanzogui/telemetry';
39
+ import { useEffect } from 'react';
40
+ import { apply, read } from '@hanzo/appearance/state';
39
41
  import { config } from './gui-config.js';
40
42
  import './styles.css';
41
43
  /** A stylesheet that did not reach the document is invisible until someone opens
@@ -59,6 +61,24 @@ const assertStylesheet = () => {
59
61
  export const Hanzo = ({ children, theme = 'dark', analytics }) => {
60
62
  if (process.env.NODE_ENV !== 'production')
61
63
  assertStylesheet();
64
+ // A person's stored type size, density and accent, put on the document.
65
+ //
66
+ // Unconditional, unlike `analytics`, and the difference is the whole reason
67
+ // that one is a prop. Analytics starts a conversation with a server the app
68
+ // did not ask for; this reads a preference the PERSON already set on this
69
+ // device and honours it. An app that has to opt in is an app that forgets to,
70
+ // and then the setting silently does nothing on that surface — which is worse
71
+ // than not offering it.
72
+ //
73
+ // Costs nothing when unused: an axis nobody set is absent rather than
74
+ // neutral, so `apply()` removes the property instead of stamping a `1` that
75
+ // would outrank a brand's own scale.
76
+ //
77
+ // This is the MOUNT half only. First paint still wants `bootScript()` in
78
+ // <head>, because no component can run before the document exists.
79
+ useEffect(() => {
80
+ apply(read());
81
+ }, []);
62
82
  const tree = (_jsx(GuiProvider, { config: config, defaultTheme: theme, disableInjectCSS: true, children: children }));
63
83
  // OUTSIDE the gui provider: capture is delegated at the document, so it does
64
84
  // not need to be inside the styled tree, and an app that renders its own
package/dist/root.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"root.js","sourceRoot":"","sources":["../src/root.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAwB,MAAM,qBAAqB,CAAA;AAG7E,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,cAAc,CAAA;AAgCrB;;;;;;qEAMqE;AACrE,IAAI,OAAO,GAAG,KAAK,CAAA;AACnB,MAAM,gBAAgB,GAAG,GAAG,EAAE;IAC5B,IAAI,OAAO,IAAI,OAAO,QAAQ,KAAK,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAM;IAC3F,OAAO,GAAG,IAAI,CAAA;IACd,IAAI,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,IAAI,EAAE;QAAE,OAAM;IACnG,MAAM,IAAI,KAAK,CACb,qFAAqF;QACnF,iFAAiF;QACjF,kDAAkD,CACrD,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,SAAS,EAAc,EAAE,EAAE;IAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QAAE,gBAAgB,EAAE,CAAA;IAC7D,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,IAA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A;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,GAAG,MAAM,EAAE,SAAS,EAAc,EAAE,EAAE;IAC3E,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY;QAAE,gBAAgB,EAAE,CAAA;IAC7D,wEAAwE;IACxE,EAAE;IACF,4EAA4E;IAC5E,4EAA4E;IAC5E,0EAA0E;IAC1E,8EAA8E;IAC9E,8EAA8E;IAC9E,wBAAwB;IACxB,EAAE;IACF,sEAAsE;IACtE,4EAA4E;IAC5E,qCAAqC;IACrC,EAAE;IACF,yEAAyE;IACzE,mEAAmE;IACnE,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,IAAI,EAAE,CAAC,CAAA;IACf,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,MAAM,IAAI,GAAG,CACX,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,kBAC/D,QAAQ,GACG,CACf,CAAA;IACD,6EAA6E;IAC7E,yEAAyE;IACzE,8EAA8E;IAC9E,qDAAqD;IACrD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,KAAC,iBAAiB,OAAK,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,YAAG,IAAI,GAAqB,CAAA;AACjG,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "8.0.71",
3
+ "version": "8.0.73",
4
4
  "type": "module",
5
5
  "description": "Hanzo UI — the one canonical Hanzo component library, on @hanzo/gui + @hanzo/design. ONE substrate: every component renders through @hanzo/gui primitives, so the same import works on web, native (expo) and desktop (Tauri). Self-contained (theme.css), presentational, host-agnostic, clean-room.",
6
6
  "exports": {
@@ -187,6 +187,7 @@
187
187
  "dist"
188
188
  ],
189
189
  "dependencies": {
190
+ "@hanzo/appearance": "^0.1.4",
190
191
  "@hanzo/design": "^0.5.1",
191
192
  "@hanzo/logo": "^1.0.13",
192
193
  "@hanzo/products": "^0.2.0",