@usableapp/cardds 0.7.113 → 0.7.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/bin/cardds.mjs +19 -1
  3. package/css/actions.css +33 -1
  4. package/css/base.css +2 -0
  5. package/css/layover.css +1 -9
  6. package/css/parts.css +6 -0
  7. package/css/sheet.css +36 -0
  8. package/css/stamp.css +21 -2
  9. package/css/tokens.css +2 -1
  10. package/dist/actions/BtnGroup.d.ts +47 -6
  11. package/dist/actions/BtnGroup.js +55 -5
  12. package/dist/actions/BtnRow.d.ts +6 -2
  13. package/dist/actions/BtnRow.js +5 -3
  14. package/dist/actions/Chip.d.ts +4 -2
  15. package/dist/actions/Chip.js +3 -3
  16. package/dist/actions/joined.d.ts +2 -0
  17. package/dist/actions/joined.js +4 -0
  18. package/dist/cardds.css +101 -13
  19. package/dist/catalog.json +1 -1
  20. package/dist/choice/CalendarWeeks.d.ts +15 -2
  21. package/dist/choice/CalendarWeeks.js +12 -5
  22. package/dist/choice/span.d.ts +41 -0
  23. package/dist/choice/span.js +97 -23
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.js +0 -1
  26. package/dist/media/MapArea.d.ts +5 -3
  27. package/dist/media/MapArea.js +2 -1
  28. package/dist/media/MapPick.d.ts +14 -2
  29. package/dist/media/MapPick.js +41 -2
  30. package/dist/parts/Foot.d.ts +4 -1
  31. package/dist/parts/Foot.js +3 -2
  32. package/dist/parts/Words.d.ts +2 -2
  33. package/dist/post/PostDesk.js +38 -4
  34. package/dist/sheets/Modal.d.ts +1 -5
  35. package/dist/sheets/Modal.js +2 -7
  36. package/dist/stamp/Stamp.d.ts +4 -2
  37. package/dist/stamp/Stamp.js +3 -3
  38. package/dist/type/icons.d.ts +1 -1
  39. package/dist/type/icons.js +2 -2
  40. package/docs/reference.md +75 -3
  41. package/icons.svg +1 -0
  42. package/lib/guide.mjs +9 -8
  43. package/lint/rules.mjs +1 -1
  44. package/package.json +1 -1
  45. package/dist/actions/IconBtnGroup.d.ts +0 -35
  46. package/dist/actions/IconBtnGroup.js +0 -49
@@ -34,6 +34,17 @@ export interface CalendarWeeksProps extends Omit<ComponentProps<'div'>, 'onSelec
34
34
  defaultSpan?: [string, string];
35
35
  /** the member covered a run: the finger lifted after a drag, or the second tap closed it */
36
36
  onSpanChange?: (span: [string, string]) => void;
37
+ /** CONTROLLED, several runs of days at once: a list of `[first, last]` by `key` (the same key twice for one day), in order, `[]` for none;
38
+ * pair it with `onRangesChange`. Given (or `defaultRanges` / `onRangesChange`), the weeks hold ranges: a tap on a free day adds that day,
39
+ * a tap on a held day removes the whole range it is in, a drag along a row adds its run. A new range that overlaps or touches held ones
40
+ * (no day between) is merged with them into one. Ranges outside `weeks` (the app showed another month) are kept and handed back with
41
+ * every change; a range partly in `weeks` shows its part and is handed back whole (a tap on it removes it whole). Keys sort as their
42
+ * days do (ISO dates) to place them. `span` and `selected` are not read */
43
+ ranges?: [string, string][];
44
+ /** UNCONTROLLED: the ranges held on arrival; the weeks then keep their own */
45
+ defaultRanges?: [string, string][];
46
+ /** the member changed the ranges (a tap, or the finger lifted after a drag): the whole new list, in order */
47
+ onRangesChange?: (ranges: [string, string][]) => void;
37
48
  /** weekday heads, 7 */
38
49
  weekdays?: string[];
39
50
  /** given, the label is a button: the app opens its own month / year pick. Not given, the label is plain words */
@@ -45,5 +56,7 @@ export interface CalendarWeeksProps extends Omit<ComponentProps<'div'>, 'onSelec
45
56
  * is the app's to answer with its month / year pick. It opens at the week that holds today (Lh 2026-10-19): the first row in sight is the week
46
57
  * whose day has `today`, at once and without a scroll to watch; with no `today` in the data it opens at the first week. For a day within the coming weeks on a step with little height.
47
58
  * A run of days instead of one (the asker says from when to when, Lh 2026-10-21): `span` + `onSpanChange`, or `defaultSpan` — a tap on the first day
48
- * and a tap on the last covers the days between, across the weeks; a drag along a row covers it too, while a finger moving up or down still scrolls the box. On a sheet, never in a Card. */
49
- export declare function CalendarWeeks({ weeks, show, selected, defaultSelected, onSelect, span, defaultSpan, onSpanChange, weekdays, onLabelClick, className, ref, ...rest }: CalendarWeeksProps): import("react").JSX.Element;
59
+ * and a tap on the last covers the days between, across the weeks; a drag along a row covers it too, while a finger moving up or down still scrolls the box.
60
+ * Several runs at once (days apart, or a few separate stretches): `ranges` + `onRangesChange`, or `defaultRanges` — a tap adds a day or removes the
61
+ * range it is in, a drag adds a run, and a range that overlaps or touches another is merged into one. On a sheet, never in a Card. */
62
+ export declare function CalendarWeeks({ weeks, show, selected, defaultSelected, onSelect, span, defaultSpan, onSpanChange, ranges, defaultRanges, onRangesChange, weekdays, onLabelClick, className, ref, ...rest }: CalendarWeeksProps): import("react").JSX.Element;
@@ -3,19 +3,26 @@ import { useLayoutEffect, useRef, useState } from 'react';
3
3
  import { useControlled, setRefs } from '../state.js';
4
4
  import { cx } from '../cx.js';
5
5
  import { calendarDay } from './calendarDay.js';
6
- import { useSpan, spanByKey } from './span.js';
6
+ import { useSpan, spanByKey, useRangesByKey } from './span.js';
7
7
  /** CalendarWeeks — a run of weeks that scrolls week by week, `show` rows in sight (2 by default), Calendar's own 44px round cells; a sticky head holds
8
8
  * the month · year of the first row in sight and the weekday heads. It knows no dates, as Calendar: the app builds `weeks` (each a `label` and 7 days
9
9
  * with `key`, `num`, `today`, `disabled`, `mark`) and owns the day (`selected` + `onSelect`, or `defaultSelected`); a tap on the label (`onLabelClick`)
10
10
  * is the app's to answer with its month / year pick. It opens at the week that holds today (Lh 2026-10-19): the first row in sight is the week
11
11
  * whose day has `today`, at once and without a scroll to watch; with no `today` in the data it opens at the first week. For a day within the coming weeks on a step with little height.
12
12
  * A run of days instead of one (the asker says from when to when, Lh 2026-10-21): `span` + `onSpanChange`, or `defaultSpan` — a tap on the first day
13
- * and a tap on the last covers the days between, across the weeks; a drag along a row covers it too, while a finger moving up or down still scrolls the box. On a sheet, never in a Card. */
14
- export function CalendarWeeks({ weeks, show = 2, selected, defaultSelected, onSelect, span, defaultSpan, onSpanChange, weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], onLabelClick, className, ref, ...rest }) {
13
+ * and a tap on the last covers the days between, across the weeks; a drag along a row covers it too, while a finger moving up or down still scrolls the box.
14
+ * Several runs at once (days apart, or a few separate stretches): `ranges` + `onRangesChange`, or `defaultRanges` — a tap adds a day or removes the
15
+ * range it is in, a drag adds a run, and a range that overlaps or touches another is merged into one. On a sheet, never in a Card. */
16
+ export function CalendarWeeks({ weeks, show = 2, selected, defaultSelected, onSelect, span, defaultSpan, onSpanChange, ranges, defaultRanges, onRangesChange, weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], onLabelClick, className, ref, ...rest }) {
15
17
  const [day, pick] = useControlled(selected, defaultSelected, onSelect);
16
- const spanning = span !== undefined || defaultSpan !== undefined || onSpanChange !== undefined;
18
+ const many = ranges !== undefined || defaultRanges !== undefined || onRangesChange !== undefined;
19
+ const spanning = many || span !== undefined || defaultSpan !== undefined || onSpanChange !== undefined;
17
20
  const all = weeks.flatMap((w) => w.days);
18
- const covered = useSpan({ ...spanByKey(all.map((d) => d.key), span, defaultSpan, onSpanChange), blocked: (i) => !all[i] || !!all[i].disabled });
21
+ const keys = all.map((d) => d.key);
22
+ const blocked = (i) => !all[i] || !!all[i].disabled;
23
+ const one = useSpan({ ...spanByKey(keys, span, defaultSpan, onSpanChange), blocked });
24
+ const held = useRangesByKey({ keys, ranges, defaultRanges, onRangesChange, blocked });
25
+ const covered = many ? held : one;
19
26
  let at = 0;
20
27
  const [first, setFirst] = useState(0);
21
28
  const box = useRef(null);
@@ -26,9 +26,50 @@ export declare function useSpan({ span, defaultSpan, onSpanChange, blocked }: {
26
26
  onPointerCancel: () => void;
27
27
  };
28
28
  };
29
+ /** several runs held at once (CalendarWeeks `ranges`): a tap on a free cell adds it as a one-cell range, a tap on a held cell removes
30
+ * the whole range it is in; a drag adds its run. A new range that overlaps or touches held ones is MERGED with them into one (Mon–Tue
31
+ * held, a drag Wed–Thu = Mon–Thu). Controlled like an input: `ranges` + `onRangesChange`, or `defaultRanges`; asked once a finger lifts */
32
+ export declare function useRanges({ ranges, defaultRanges, onRangesChange, blocked }: {
33
+ ranges: Span[] | undefined;
34
+ defaultRanges?: Span[];
35
+ onRangesChange?: (ranges: Span[]) => void;
36
+ blocked: (i: number) => boolean;
37
+ }): {
38
+ ranges: Span[];
39
+ at: (i: number) => SpanAt;
40
+ tap: (i: number) => void;
41
+ box: {
42
+ onPointerDown: (e: ReactPointerEvent<HTMLElement>) => void;
43
+ onPointerMove: (e: ReactPointerEvent<HTMLElement>) => void;
44
+ onPointerUp: () => void;
45
+ onPointerCancel: () => void;
46
+ };
47
+ };
29
48
  /** the same span by the holder's keys (CalendarWeeks, HourGrid): useSpan's `span`, `defaultSpan` and `onSpanChange` from a `[key, key]` span, the ask handed back in keys */
30
49
  export declare function spanByKey(keys: string[], span: [string, string] | null | undefined, defaultSpan: [string, string] | undefined, onSpanChange: ((span: [string, string]) => void) | undefined): {
31
50
  span: Span | null | undefined;
32
51
  defaultSpan: Span | undefined;
33
52
  onSpanChange: ((s: Span) => void) | undefined;
34
53
  };
54
+ /** the same ranges by the holder's keys (CalendarWeeks), held in keys so nothing is lost when the holder shows other cells (the app swaps
55
+ * `weeks` to another month): a range outside the shown keys is kept untouched and handed back with every ask; a range partly in sight
56
+ * shows its part in sight and is handed back whole, a tap on that part removes the whole range, a run merged into it keeps its far end.
57
+ * Placing a key outside the shown ones compares keys as strings, so keys sort as their days do (ISO dates: "2026-06-05").
58
+ * The list handed back is in that order */
59
+ export declare function useRangesByKey({ keys, ranges, defaultRanges, onRangesChange, blocked }: {
60
+ keys: string[];
61
+ ranges: [string, string][] | undefined;
62
+ defaultRanges?: [string, string][];
63
+ onRangesChange?: (ranges: [string, string][]) => void;
64
+ blocked: (i: number) => boolean;
65
+ }): {
66
+ ranges: Span[];
67
+ at: (i: number) => SpanAt;
68
+ tap: (i: number) => void;
69
+ box: {
70
+ onPointerDown: (e: ReactPointerEvent<HTMLElement>) => void;
71
+ onPointerMove: (e: ReactPointerEvent<HTMLElement>) => void;
72
+ onPointerUp: () => void;
73
+ onPointerCancel: () => void;
74
+ };
75
+ };
@@ -1,18 +1,13 @@
1
1
  import { useRef, useState } from 'react';
2
2
  import { useControlled } from '../state.js';
3
3
  const sorted = (a, b) => (a <= b ? [a, b] : [b, a]);
4
- /** the span mechanic, written once for Calendar, CalendarWeeks and HourGrid (Lh 2026-10-21: the asker says from when to when).
5
- * The holder numbers its cells in order (`data-span` = the index), spreads `box` on the grid, and asks `at(i)` for each cell's class.
6
- * One drag across the cells covers them: the first cell under the finger is one end, the last the other, whichever way the finger
7
- * went. Two taps do the same without a drag: a tap makes a one-cell span, a second tap on another cell closes it (a third starts over).
8
- * A cell that is `blocked` (disabled) is never covered: the run stops before it, so a span never jumps a day that cannot be picked.
9
- * Controlled like an input: `span` + `onSpanChange`, or `defaultSpan`; while the finger is down the cells show the live run and the
10
- * app is asked once, when it lifts. A pointer the browser takes away (the box scrolled instead) covers nothing. */
11
- export function useSpan({ span, defaultSpan, onSpanChange, blocked }) {
12
- const [held, request] = useControlled(span, defaultSpan ?? null, onSpanChange);
4
+ /** the finger on the cells, written once for a span and for ranges: one drag across the cells is a run (the first cell under the finger
5
+ * one end, the last the other, whichever way the finger went, stopping before a `blocked` cell); a finger that did not move is a tap.
6
+ * `live` is the run while the finger is down; `onRun` / `onTap` when it lifts. A pointer the browser takes away (the box scrolled
7
+ * instead) is nothing. `reach` is the farthest cell toward `to` a run from `from` reaches before a blocked one */
8
+ function useRunDrag({ blocked, onRun, onTap }) {
13
9
  const [live, setLive] = useState(null);
14
10
  const drag = useRef(null);
15
- // the farthest cell toward `to` the run from `from` reaches before a blocked cell
16
11
  const reach = (from, to) => {
17
12
  const step = to < from ? -1 : 1;
18
13
  let at = from;
@@ -24,11 +19,6 @@ export function useSpan({ span, defaultSpan, onSpanChange, blocked }) {
24
19
  const cell = document.elementFromPoint(x, y)?.closest('[data-span]');
25
20
  return cell && box.contains(cell) ? Number(cell.dataset.span) : null;
26
21
  };
27
- // a tap on `i` (a finger that did not move, or a key on the cell): the second end of a one-cell span, else a new one-cell span
28
- const tap = (i) => {
29
- const one = held && held[0] === held[1] ? held[0] : null;
30
- request(one !== null && one !== i ? sorted(one, reach(one, i)) : [i, i]);
31
- };
32
22
  const onPointerDown = (e) => {
33
23
  const cell = e.target.closest('[data-span]');
34
24
  if (!cell || !e.currentTarget.contains(cell))
@@ -58,23 +48,107 @@ export function useSpan({ span, defaultSpan, onSpanChange, blocked }) {
58
48
  drag.current = null;
59
49
  setLive(null);
60
50
  if (d.moved)
61
- request(sorted(d.from, d.to));
51
+ onRun(sorted(d.from, d.to));
62
52
  else
63
- tap(d.from);
53
+ onTap(d.from);
64
54
  };
65
55
  const onPointerCancel = () => { drag.current = null; setLive(null); };
56
+ return { live, reach, box: { onPointerDown, onPointerMove, onPointerUp, onPointerCancel } };
57
+ }
58
+ /** where cell `i` stands in run `r` */
59
+ const atRun = (r, i) => {
60
+ if (r[0] === r[1])
61
+ return i === r[0] ? 'one' : undefined;
62
+ return i === r[0] ? 'start' : i === r[1] ? 'end' : i > r[0] && i < r[1] ? 'in' : undefined;
63
+ };
64
+ /** the span mechanic, written once for Calendar, CalendarWeeks and HourGrid (Lh 2026-10-21: the asker says from when to when).
65
+ * The holder numbers its cells in order (`data-span` = the index), spreads `box` on the grid, and asks `at(i)` for each cell's class.
66
+ * One drag across the cells covers them: the first cell under the finger is one end, the last the other, whichever way the finger
67
+ * went. Two taps do the same without a drag: a tap makes a one-cell span, a second tap on another cell closes it (a third starts over).
68
+ * A cell that is `blocked` (disabled) is never covered: the run stops before it, so a span never jumps a day that cannot be picked.
69
+ * Controlled like an input: `span` + `onSpanChange`, or `defaultSpan`; while the finger is down the cells show the live run and the
70
+ * app is asked once, when it lifts. A pointer the browser takes away (the box scrolled instead) covers nothing. */
71
+ export function useSpan({ span, defaultSpan, onSpanChange, blocked }) {
72
+ const [held, request] = useControlled(span, defaultSpan ?? null, onSpanChange);
73
+ // a tap on `i` (a finger that did not move, or a key on the cell): the second end of a one-cell span, else a new one-cell span
74
+ const tap = (i) => {
75
+ const one = held && held[0] === held[1] ? held[0] : null;
76
+ request(one !== null && one !== i ? sorted(one, reach(one, i)) : [i, i]);
77
+ };
78
+ const { live, reach, box } = useRunDrag({ blocked, onRun: request, onTap: tap });
66
79
  const shown = live ?? held ?? null;
80
+ const at = (i) => (shown ? atRun(shown, i) : undefined);
81
+ return { span: shown, at, tap, box };
82
+ }
83
+ /** `run` added to `ranges`: every range it overlaps or touches (no cell between) is merged into it, one range; the result in order */
84
+ const addRun = (ranges, run) => {
85
+ let [a, b] = run;
86
+ const rest = [];
87
+ for (const r of ranges) {
88
+ if (r[1] >= a - 1 && r[0] <= b + 1) {
89
+ a = Math.min(a, r[0]);
90
+ b = Math.max(b, r[1]);
91
+ }
92
+ else
93
+ rest.push(r);
94
+ }
95
+ return [...rest, [a, b]].sort((x, y) => x[0] - y[0]);
96
+ };
97
+ /** several runs held at once (CalendarWeeks `ranges`): a tap on a free cell adds it as a one-cell range, a tap on a held cell removes
98
+ * the whole range it is in; a drag adds its run. A new range that overlaps or touches held ones is MERGED with them into one (Mon–Tue
99
+ * held, a drag Wed–Thu = Mon–Thu). Controlled like an input: `ranges` + `onRangesChange`, or `defaultRanges`; asked once a finger lifts */
100
+ export function useRanges({ ranges, defaultRanges, onRangesChange, blocked }) {
101
+ const [held, request] = useControlled(ranges, defaultRanges ?? [], onRangesChange);
102
+ const list = held ?? [];
103
+ const tap = (i) => {
104
+ const hit = list.find((r) => i >= r[0] && i <= r[1]);
105
+ request(hit ? list.filter((r) => r !== hit) : addRun(list, [i, i]));
106
+ };
107
+ const { live, box } = useRunDrag({ blocked, onRun: (run) => request(addRun(list, run)), onTap: tap });
108
+ const shown = live ? addRun(list, live) : list;
67
109
  const at = (i) => {
68
- if (!shown)
69
- return undefined;
70
- if (shown[0] === shown[1])
71
- return i === shown[0] ? 'one' : undefined;
72
- return i === shown[0] ? 'start' : i === shown[1] ? 'end' : i > shown[0] && i < shown[1] ? 'in' : undefined;
110
+ const r = shown.find((r) => i >= r[0] && i <= r[1]);
111
+ return r && atRun(r, i);
73
112
  };
74
- return { span: shown, at, tap, box: { onPointerDown, onPointerMove, onPointerUp, onPointerCancel } };
113
+ return { ranges: shown, at, tap, box };
75
114
  }
76
115
  /** the same span by the holder's keys (CalendarWeeks, HourGrid): useSpan's `span`, `defaultSpan` and `onSpanChange` from a `[key, key]` span, the ask handed back in keys */
77
116
  export function spanByKey(keys, span, defaultSpan, onSpanChange) {
78
117
  const of = (s) => (s ? [keys.indexOf(s[0]), keys.indexOf(s[1])] : s);
79
118
  return { span: of(span), defaultSpan: of(defaultSpan) ?? undefined, onSpanChange: onSpanChange && ((s) => onSpanChange([keys[s[0]], keys[s[1]]])) };
80
119
  }
120
+ /** the same ranges by the holder's keys (CalendarWeeks), held in keys so nothing is lost when the holder shows other cells (the app swaps
121
+ * `weeks` to another month): a range outside the shown keys is kept untouched and handed back with every ask; a range partly in sight
122
+ * shows its part in sight and is handed back whole, a tap on that part removes the whole range, a run merged into it keeps its far end.
123
+ * Placing a key outside the shown ones compares keys as strings, so keys sort as their days do (ISO dates: "2026-06-05").
124
+ * The list handed back is in that order */
125
+ export function useRangesByKey({ keys, ranges, defaultRanges, onRangesChange, blocked }) {
126
+ const [held, request] = useControlled(ranges, defaultRanges ?? [], onRangesChange);
127
+ const list = held ?? [];
128
+ const first = keys[0], last = keys[keys.length - 1];
129
+ // a range's part in sight, clipped to the shown cells; null when none of it is
130
+ const clip = ([a, b]) => {
131
+ if (!keys.length || b < first || a > last)
132
+ return null;
133
+ const i = a < first ? 0 : keys.indexOf(a), j = b > last ? keys.length - 1 : keys.indexOf(b);
134
+ return i < 0 || j < 0 ? null : sorted(i, j);
135
+ };
136
+ const back = (spans) => {
137
+ const out = list.filter((r) => !clip(r));
138
+ for (const s of spans) {
139
+ let [a, b] = [keys[s[0]], keys[s[1]]];
140
+ for (const r of list) {
141
+ const c = clip(r);
142
+ if (c && c[0] >= s[0] && c[1] <= s[1]) {
143
+ if (r[0] < a)
144
+ a = r[0];
145
+ if (r[1] > b)
146
+ b = r[1];
147
+ }
148
+ }
149
+ out.push([a, b]);
150
+ }
151
+ return out.sort((x, y) => (x[0] < y[0] ? -1 : x[0] > y[0] ? 1 : 0));
152
+ };
153
+ return useRanges({ ranges: list.map(clip).filter((c) => !!c), onRangesChange: (spans) => request(back(spans)), blocked });
154
+ }
package/dist/index.d.ts CHANGED
@@ -35,7 +35,6 @@ export * from './sheets/SheetSteps.js';
35
35
  export * from './sheets/Modal.js';
36
36
  export * from './actions/Btn.js';
37
37
  export * from './actions/IconBtn.js';
38
- export * from './actions/IconBtnGroup.js';
39
38
  export * from './actions/Chip.js';
40
39
  export * from './actions/Dot.js';
41
40
  export * from './actions/Dropdown.js';
package/dist/index.js CHANGED
@@ -39,7 +39,6 @@ export * from './sheets/SheetSteps.js';
39
39
  export * from './sheets/Modal.js';
40
40
  export * from './actions/Btn.js';
41
41
  export * from './actions/IconBtn.js';
42
- export * from './actions/IconBtnGroup.js';
43
42
  export * from './actions/Chip.js';
44
43
  export * from './actions/Dot.js';
45
44
  export * from './actions/Dropdown.js';
@@ -11,12 +11,13 @@ export interface MapAreaProps extends ComponentProps<'div'> {
11
11
  /** the tile provider's credit, bottom right (OSM requires it) — a caption, never the engine's own control */
12
12
  credit?: ReactNode;
13
13
  /** the shape of the centre mark. `ring` (default) is the rough area the member's neighbours may see; `pin` is an EXACT point, a clear pin
14
- * at the centre, for a meeting place (Lh 2026-10-19: a meeting position is a pin, never the ring) */
15
- mark?: 'ring' | 'pin';
14
+ * at the centre, for a meeting place (Lh 2026-10-19: a meeting position is a pin, never the ring); `none` draws no centre mark at all,
15
+ * for an app whose map engine places its own marks (then `ringRef` and `ringLabel` are not read) */
16
+ mark?: 'ring' | 'pin' | 'none';
16
17
  /** the accessible name of the centre mark, whatever its shape (what the centre means): the rough area for a ring, the meeting point for a pin */
17
18
  ringLabel?: string;
18
19
  /** the centre mark's element, whatever its shape — the engine reads its position to know which point is the choice: a ring's CENTRE
19
- * (the middle of its box), a pin's TIP (the bottom-centre of its box) */
20
+ * (the middle of its box), a pin's TIP (the bottom-centre of its box). Not needed with `mark="none"`: there is no mark to read */
20
21
  ringRef?: Ref<HTMLSpanElement>;
21
22
  /** FIRST, the map engine's mount — ONE element, filled to the box (the app hands it to Leaflet or the like); after it, the
22
23
  * places the member may pick (`MapPick`), over the map */
@@ -31,6 +32,7 @@ export interface MapAreaProps extends ComponentProps<'div'> {
31
32
  * `ringRef` is how the engine learns where that is. Places to pick go after the mount, as `MapPick`s.
32
33
  * Variation `mark="pin"`: for a meeting place the centre is an exact point, so a clear pin stands there instead of the ring,
33
34
  * its tip on the point the ring's centre would be (the engine reads the pin's bottom-centre). The ring stays for a rough area.
35
+ * Variation `mark="none"`: no centre mark at all — the app's engine draws its own marks on the map; nothing stands at the centre.
34
36
  * Variation `bleed` (with `inline`): the map edge to edge of what holds it, no corner, for the map under a step's controls.
35
37
  */
36
38
  export declare function MapArea({ inline, bleed, hint, credit, mark, ringLabel, ringRef, className, children, ...rest }: MapAreaProps): import("react").JSX.Element;
@@ -10,10 +10,11 @@ import { Icon } from '../type/Icon.js';
10
10
  * `ringRef` is how the engine learns where that is. Places to pick go after the mount, as `MapPick`s.
11
11
  * Variation `mark="pin"`: for a meeting place the centre is an exact point, so a clear pin stands there instead of the ring,
12
12
  * its tip on the point the ring's centre would be (the engine reads the pin's bottom-centre). The ring stays for a rough area.
13
+ * Variation `mark="none"`: no centre mark at all — the app's engine draws its own marks on the map; nothing stands at the centre.
13
14
  * Variation `bleed` (with `inline`): the map edge to edge of what holds it, no corner, for the map under a step's controls.
14
15
  */
15
16
  export function MapArea({ inline, bleed, hint, credit, mark = 'ring', ringLabel = mark === 'pin' ? 'จุดนัด' : 'ย่านของคุณโดยประมาณ', ringRef, className, children, ...rest }) {
16
17
  return (_jsxs("div", { className: cx('map', inline && 'map--inline', inline && bleed && 'map--bleed', className), ...rest, children: [children, mark === 'pin'
17
18
  ? _jsx("span", { ref: ringRef, className: "map__pin", role: "img", "aria-label": ringLabel, children: _jsx(Icon, { name: "map-pin" }) })
18
- : _jsx("span", { ref: ringRef, className: "map__ring", role: "img", "aria-label": ringLabel }), hint != null && _jsx("span", { className: "map__hint", children: hint }), credit != null && _jsx("span", { className: "map__credit", children: credit })] }));
19
+ : mark === 'ring' && _jsx("span", { ref: ringRef, className: "map__ring", role: "img", "aria-label": ringLabel }), hint != null && _jsx("span", { className: "map__hint", children: hint }), credit != null && _jsx("span", { className: "map__credit", children: credit })] }));
19
20
  }
@@ -1,4 +1,4 @@
1
- import type { ChangeEventHandler, ComponentProps, ReactNode } from 'react';
1
+ import { type ChangeEventHandler, type ComponentProps, type ReactNode } from 'react';
2
2
  import { type IconName } from '../type/Icon.js';
3
3
  export interface MapPickProps extends Omit<ComponentProps<'label'>, 'onChange'> {
4
4
  /** the place's short name, under its mark (a library, a village hall): the radio's accessible name */
@@ -21,6 +21,15 @@ export interface MapPickProps extends Omit<ComponentProps<'label'>, 'onChange'>
21
21
  onChange?: ChangeEventHandler<HTMLInputElement>;
22
22
  /** this place cannot be picked now */
23
23
  disabled?: boolean;
24
+ /** THE NAME IN A TOOLTIP: only the mark stands on the map; pressing it opens the name in a bubble over it, and a press anywhere
25
+ * else (another place too) or Escape closes it — so close places never lay their names over each other. Without it the name is always under the mark */
26
+ tip?: boolean;
27
+ /** with `tip`, CONTROLLED: the name's bubble is open. The app owns it — pair it with `onOpenChange` */
28
+ open?: boolean;
29
+ /** with `tip`, UNCONTROLLED: the bubble is open on arrival */
30
+ defaultOpen?: boolean;
31
+ /** with `tip`: the member opened (the mark pressed) or closed (the mark pressed again, a press elsewhere, Escape) the bubble */
32
+ onOpenChange?: (open: boolean) => void;
24
33
  }
25
34
  /**
26
35
  * MapPick — a place on a map the member taps to choose it: a small round mark with its short name under it, standing on
@@ -28,5 +37,8 @@ export interface MapPickProps extends Omit<ComponentProps<'label'>, 'onChange'>
28
37
  * full `--tap` square round the point, and the name takes a tap too. The marks of one choice share a `name` and are one
29
38
  * radio group (arrow keys move between them); the picked one fills with accent. It knows nothing of the map or the sheet:
30
39
  * it goes in a `MapArea` after the engine's mount, and the app owns which place is picked. On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18).
40
+ * Variation `tip`: places close together — only the mark shows, its name opens in a bubble over it when it is pressed (the place is
41
+ * picked too) and closes on a press elsewhere or Escape. One bubble at a time with no place knowing another: pressing a second
42
+ * place is a press outside the first, which closes itself. Open/closed is controlled like an input (`open` + `onOpenChange`, or `defaultOpen`).
31
43
  */
32
- export declare function MapPick({ children, icon, top, left, name, value, checked, defaultChecked, onChange, disabled, className, style, ...rest }: MapPickProps): import("react").JSX.Element;
44
+ export declare function MapPick({ children, icon, top, left, name, value, checked, defaultChecked, onChange, disabled, tip, open, defaultOpen, onOpenChange, className, style, ...rest }: MapPickProps): import("react").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useLayoutEffect, useRef, useState } from 'react';
2
3
  import { cx } from '../cx.js';
4
+ import { useControlled, useLatest } from '../state.js';
3
5
  import { Icon } from '../type/Icon.js';
4
6
  /**
5
7
  * MapPick — a place on a map the member taps to choose it: a small round mark with its short name under it, standing on
@@ -7,7 +9,44 @@ import { Icon } from '../type/Icon.js';
7
9
  * full `--tap` square round the point, and the name takes a tap too. The marks of one choice share a `name` and are one
8
10
  * radio group (arrow keys move between them); the picked one fills with accent. It knows nothing of the map or the sheet:
9
11
  * it goes in a `MapArea` after the engine's mount, and the app owns which place is picked. On a sheet, never in a Card: the sheet is the paper the member fills in (Lh 2026-10-18).
12
+ * Variation `tip`: places close together — only the mark shows, its name opens in a bubble over it when it is pressed (the place is
13
+ * picked too) and closes on a press elsewhere or Escape. One bubble at a time with no place knowing another: pressing a second
14
+ * place is a press outside the first, which closes itself. Open/closed is controlled like an input (`open` + `onOpenChange`, or `defaultOpen`).
10
15
  */
11
- export function MapPick({ children, icon, top, left, name, value, checked, defaultChecked, onChange, disabled, className, style, ...rest }) {
12
- return (_jsxs("label", { className: cx('map-pick', className), style: { top, left, ...style }, ...rest, children: [_jsx("input", { type: "radio", name: name, value: value, checked: checked, defaultChecked: defaultChecked, onChange: onChange, disabled: disabled }), _jsx("span", { className: "map-pick__mark", children: icon && _jsx(Icon, { name: icon, size: "xs" }) }), _jsx("span", { className: "map-pick__name", children: children })] }));
16
+ export function MapPick({ children, icon, top, left, name, value, checked, defaultChecked, onChange, disabled, tip, open, defaultOpen = false, onOpenChange, className, style, ...rest }) {
17
+ const [shown, request] = useControlled(open, defaultOpen, onOpenChange);
18
+ const ref = useRef(null);
19
+ const ask = useLatest(request);
20
+ const isOpen = !!tip && shown;
21
+ // the bubble stays inside the map's box: under the mark when there is no room over it, slid in from a side edge
22
+ const [fit, setFit] = useState({ below: false, dx: 0 });
23
+ useLayoutEffect(() => {
24
+ if (!isOpen) {
25
+ setFit((f) => (f.below || f.dx ? { below: false, dx: 0 } : f));
26
+ return;
27
+ }
28
+ const label = ref.current, bubble = label?.querySelector('.map-pick__name'), map = label?.closest('.map');
29
+ if (!bubble || !map)
30
+ return;
31
+ const b = bubble.getBoundingClientRect(), m = map.getBoundingClientRect();
32
+ const dx = b.left < m.left ? m.left - b.left : b.right > m.right ? m.right - b.right : 0;
33
+ setFit({ below: b.top < m.top, dx });
34
+ }, [isOpen]);
35
+ useEffect(() => {
36
+ if (!isOpen)
37
+ return;
38
+ // a press or the focus (an arrow key moving the pick) going elsewhere closes it
39
+ const away = (e) => { if (!ref.current?.contains(e.target))
40
+ ask.current(false); };
41
+ const key = (e) => { if (e.key === 'Escape')
42
+ ask.current(false); };
43
+ document.addEventListener('pointerdown', away, true);
44
+ document.addEventListener('focusin', away);
45
+ document.addEventListener('keydown', key);
46
+ return () => { document.removeEventListener('pointerdown', away, true); document.removeEventListener('focusin', away); document.removeEventListener('keydown', key); };
47
+ }, [isOpen, ask]);
48
+ // a press on the label reaches the input as one click (so does an arrow key moving the pick): it opens the bubble, or closes the open one
49
+ const press = () => { if (tip)
50
+ request(!shown); };
51
+ return (_jsxs("label", { ref: ref, className: cx('map-pick', tip && 'map-pick--tip', isOpen && 'is-open', isOpen && fit.below && 'is-below', className), style: { top, left, ...(fit.dx ? { '--_tip-dx': `${fit.dx}px` } : null), ...style }, ...rest, children: [_jsx("input", { type: "radio", name: name, value: value, checked: checked, defaultChecked: defaultChecked, onChange: onChange, onClick: press, disabled: disabled }), _jsx("span", { className: "map-pick__mark", children: icon && _jsx(Icon, { name: icon, size: "xs" }) }), _jsx("span", { className: "map-pick__name", children: children })] }));
13
52
  }
@@ -7,6 +7,9 @@ export interface FootProps extends ComponentProps<'div'> {
7
7
  * stand as ONE group in the middle of the foot, a fixed gap apart (wider than the Btns' — `--foot-gap` sets it). The Btn foot is
8
8
  * unchanged: this is the other foot, for a few big round answers */
9
9
  round?: boolean;
10
+ /** with `round`: a dotted link between each two buttons and a closer gap (was `BtnTrio`). Knobs `--btn-trio-gap`, `--btn-trio-dots-w`,
11
+ * `--btn-trio-dots-h` */
12
+ joined?: boolean;
10
13
  }
11
14
  /** Foot — the last row of a card, a sheet or a stack sheet: what the member can do next, its buttons on one line. One takes the width, up to
12
15
  * four share it evenly. Btns only in the row; a small link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words,
@@ -14,4 +17,4 @@ export interface FootProps extends ComponentProps<'div'> {
14
17
  * `primary` with a word, the others with icons): one centred group, a fixed gap between them. In a `Sheet` it stands on the box's bottom edge
15
18
  * at every state. A `Card` finds its `Foot` by type (a turning card draws it on both faces), so a consumer's own component that wraps a `Foot`
16
19
  * is not found. */
17
- export declare function Foot({ link, round, className, children, ...rest }: FootProps): import("react").JSX.Element;
20
+ export declare function Foot({ link, round, joined, className, children, ...rest }: FootProps): import("react").JSX.Element;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from '../cx.js';
3
+ import { joinDots } from '../actions/joined.js';
3
4
  /** Foot — the last row of a card, a sheet or a stack sheet: what the member can do next, its buttons on one line. One takes the width, up to
4
5
  * four share it evenly. Btns only in the row; a small link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words,
5
6
  * centred — for a foot whose one button should not fill the card. With `round` it is the foot of a few round `IconBtn`s (`size="xl"`, one
6
7
  * `primary` with a word, the others with icons): one centred group, a fixed gap between them. In a `Sheet` it stands on the box's bottom edge
7
8
  * at every state. A `Card` finds its `Foot` by type (a turning card draws it on both faces), so a consumer's own component that wraps a `Foot`
8
9
  * is not found. */
9
- export function Foot({ link, round, className, children, ...rest }) {
10
- return (_jsxs("div", { className: cx('foot', link != null && 'foot--link', round && 'foot--round', className), ...rest, children: [children, link != null && _jsx("div", { className: "foot__link", children: link })] }));
10
+ export function Foot({ link, round, joined, className, children, ...rest }) {
11
+ return (_jsxs("div", { className: cx('foot', link != null && 'foot--link', round && 'foot--round', joined && 'foot--joined', className), ...rest, children: [joined ? joinDots(children) : children, link != null && _jsx("div", { className: "foot__link", children: link })] }));
11
12
  }
@@ -1,8 +1,8 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
2
  export interface WordsProps extends Omit<ComponentProps<'span'>, 'title'> {
3
- /** the title line */
3
+ /** the title line; on an option row, the answer to the sheet's question in the member's words, never "Choose…" (docs/reference.md "Option rows") */
4
4
  title?: ReactNode;
5
- /** the caption under it (may hold a Dot) */
5
+ /** the caption under it (may hold a Dot); on an option row, only the difference that decides, one line, on every option of the list or on none */
6
6
  meta?: ReactNode;
7
7
  /** the title as a heading element in that type level; without it the title is a span in title type. In a `Head` the title is always a heading: `h2` unless this says otherwise (`h1` for the one-feature page) */
8
8
  level?: 'h1' | 'h2' | 'display';
@@ -1,12 +1,30 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useLayoutEffect, useRef } from 'react';
3
3
  import { cx } from '../cx.js';
4
- import { reducedMotion, swipeOf, useControlled, useLatest } from '../state.js';
4
+ import { reducedMotion, swipeOf, useControlled, useLatest, watchSize } from '../state.js';
5
5
  import { holdRoomWhile } from '../room.js';
6
6
  import { word } from '../words.js';
7
7
  import { StampPlace } from '../stamp/Stamp.js';
8
8
  const STRIKE = 700; // ms the struck card is seen before it asks to leave
9
9
  const SWIPE = 48; // px a sideways drag must travel to move the paper
10
+ /* how far down the paper the line being written ends: a copy of the paper's column, off the page, holding only the words BEFORE the cursor */
11
+ function cursorFoot(ta) {
12
+ const cs = getComputedStyle(ta), copy = document.createElement('div');
13
+ Object.assign(copy.style, { position: 'absolute', visibility: 'hidden', top: '0', left: '-9999px', boxSizing: 'border-box', whiteSpace: 'pre-wrap', overflowWrap: 'break-word',
14
+ width: `${ta.clientWidth}px`, padding: cs.padding, font: cs.font, lineHeight: cs.lineHeight, letterSpacing: cs.letterSpacing });
15
+ copy.textContent = `${ta.value.slice(0, ta.selectionEnd)}\u200b`;
16
+ document.body.append(copy);
17
+ const foot = copy.offsetHeight - parseFloat(cs.paddingBottom);
18
+ copy.remove();
19
+ return foot;
20
+ }
21
+ /* the box the page scrolls in: the nearest one round the paper that scrolls */
22
+ function scrollerOf(el) {
23
+ let box = el.parentElement;
24
+ while (box && !/auto|scroll/.test(getComputedStyle(box).overflowY))
25
+ box = box.parentElement;
26
+ return box;
27
+ }
10
28
  /* ruled lines the half holds, and how many the words leave free (the box is collapsed for a moment to read the words' own height) */
11
29
  function linesOf(ta) {
12
30
  const line = parseFloat(getComputedStyle(ta).lineHeight);
@@ -50,10 +68,26 @@ export function PostDesk({ half, defaultHalf = 'message', onHalfChange, message,
50
68
  };
51
69
  const full = useLatest(onFull);
52
70
  const room = useRef(null);
53
- useLayoutEffect(() => { measure(); room.current?.sync(); }, [text]);
71
+ /* the line being written stays in sight: with a keyboard up the page is shorter than the paper and its foot lies under the
72
+ bottom layer, where the browser still counts a cursor as seen. The page is scrolled, the paper never moves or shrinks. */
73
+ const reveal = () => {
74
+ const ta = paper.current, box = ta && scrollerOf(ta);
75
+ if (!ta || !box || document.activeElement !== ta)
76
+ return;
77
+ const line = parseFloat(getComputedStyle(ta).lineHeight), b = box.getBoundingClientRect();
78
+ const foot = b.bottom - parseFloat(getComputedStyle(box).paddingBottom); // the page keeps the bottom layer's height as its own padding
79
+ const at = ta.getBoundingClientRect().top + cursorFoot(ta);
80
+ if (at + line / 2 > foot)
81
+ box.scrollTop += at + line / 2 - foot;
82
+ else if (at - line * 2 < b.top)
83
+ box.scrollTop -= b.top - (at - line * 2);
84
+ };
85
+ useLayoutEffect(() => { measure(); room.current?.sync(); reveal(); }, [text]);
54
86
  useEffect(() => {
55
87
  const ta = paper.current;
56
- return holdRoomWhile(room, [ta], measure, ta.parentElement, () => paper.current, () => ta.scrollHeight > ta.clientHeight + 1, (refused) => refused && full.current?.());
88
+ const stop = watchSize([scrollerOf(ta)], reveal); // the keyboard came up: the page got shorter
89
+ const held = holdRoomWhile(room, [ta], measure, ta.parentElement, () => paper.current, () => ta.scrollHeight > ta.clientHeight + 1, (refused) => refused && full.current?.());
90
+ return () => { stop(); held(); };
57
91
  }, []);
58
92
  useEffect(() => {
59
93
  if (at !== 'struck')
@@ -68,7 +102,7 @@ export function PostDesk({ half, defaultHalf = 'message', onHalfChange, message,
68
102
  if (writing && dx)
69
103
  askSide(dx < 0 ? 'address' : 'message');
70
104
  };
71
- return (_jsxs("div", { className: cx('post-desk', `post-desk--${side}`, `post-desk--${at}`, className), ...rest, children: [_jsxs("div", { className: "post-desk__window", onPointerDown: (e) => { from.current = { x: e.clientX, y: e.clientY }; }, onPointerUp: drop, children: [_jsxs("div", { className: "post-desk__card post-paper", children: [_jsx("section", { className: "post-desk__half post-desk__half--message", "aria-label": word('message'), inert: !writing || side !== 'message', children: _jsx("textarea", { ref: paper, className: "post-desk__write", "aria-label": word('message'), placeholder: placeholder, value: text, onChange: (e) => askText(e.currentTarget.value) }) }), _jsxs("section", { className: "post-desk__half post-desk__half--address", "aria-label": word('address'), inert: !writing || side !== 'address', children: [_jsx("div", { className: "post-desk__corner", children: _jsxs("div", { className: "post-corner", children: [!writing && postmark, _jsx("button", { className: "post-corner__stamp post-desk__slot", type: "button", "aria-pressed": chosen != null, "aria-label": word(chosen ? 'stampOff' : 'stampOn'), onClick: () => askStamp(chosen ? null : stamps[0]?.id ?? null), children: chosen ? chosen.stamp : _jsx(StampPlace, { "aria-hidden": "true", children: word('stampOn') }) })] }) }), _jsx("div", { className: "post-desk__lines", children: address })] })] }), writing && _jsx("button", { className: `post-desk__reach post-desk__reach--${side === 'message' ? 'address' : 'message'}`, type: "button", "aria-label": word(side === 'message' ? 'toAddress' : 'toMessage'), onClick: () => askSide(side === 'message' ? 'address' : 'message') }), at === 'sent' && _jsx("div", { className: "post-desk__gone", children: sent })] }), _jsx("p", { className: "post-desk__note", "aria-live": "polite", children: note }), writing && side === 'address' && stamps.length > 0 && (_jsx("div", { className: "post-desk__stamps", role: "group", "aria-label": word('stamps'), children: stamps.map((s) => (_jsx("button", { className: "post-desk__pick", type: "button", "aria-pressed": s.id === stuck, "aria-label": s.label, onClick: () => askStamp(s.id), children: s.stamp }, s.id))) }))] }));
105
+ return (_jsxs("div", { className: cx('post-desk', `post-desk--${side}`, `post-desk--${at}`, className), ...rest, children: [_jsxs("div", { className: "post-desk__window", onPointerDown: (e) => { from.current = { x: e.clientX, y: e.clientY }; }, onPointerUp: drop, children: [_jsxs("div", { className: "post-desk__card post-paper", children: [_jsx("section", { className: "post-desk__half post-desk__half--message", "aria-label": word('message'), inert: !writing || side !== 'message', children: _jsx("textarea", { ref: paper, className: "post-desk__write", "aria-label": word('message'), placeholder: placeholder, value: text, onChange: (e) => askText(e.currentTarget.value), onFocus: reveal, onSelect: reveal }) }), _jsxs("section", { className: "post-desk__half post-desk__half--address", "aria-label": word('address'), inert: !writing || side !== 'address', children: [_jsx("div", { className: "post-desk__corner", children: _jsxs("div", { className: "post-corner", children: [!writing && postmark, _jsx("button", { className: "post-corner__stamp post-desk__slot", type: "button", "aria-pressed": chosen != null, "aria-label": word(chosen ? 'stampOff' : 'stampOn'), onClick: () => askStamp(chosen ? null : stamps[0]?.id ?? null), children: chosen ? chosen.stamp : _jsx(StampPlace, { "aria-hidden": "true", children: word('stampOn') }) })] }) }), _jsx("div", { className: "post-desk__lines", children: address })] })] }), writing && _jsx("button", { className: `post-desk__reach post-desk__reach--${side === 'message' ? 'address' : 'message'}`, type: "button", "aria-label": word(side === 'message' ? 'toAddress' : 'toMessage'), onClick: () => askSide(side === 'message' ? 'address' : 'message') }), at === 'sent' && _jsx("div", { className: "post-desk__gone", children: sent })] }), _jsx("p", { className: "post-desk__note", "aria-live": "polite", children: note }), writing && side === 'address' && stamps.length > 0 && (_jsx("div", { className: "post-desk__stamps", role: "group", "aria-label": word('stamps'), children: stamps.map((s) => (_jsx("button", { className: "post-desk__pick", type: "button", "aria-pressed": s.id === stuck, "aria-label": s.label, onClick: () => askStamp(s.id), children: s.stamp }, s.id))) }))] }));
72
106
  }
73
107
  /** PostDeskLine — one address line of a PostDesk (`address`): a small word and a bare input on a rule. The value is the app's, like any input's. */
74
108
  export function PostDeskLine({ label, type = 'text', autoComplete = 'off', className, ...rest }) {
@@ -29,11 +29,7 @@ export interface ModalAskProps extends Omit<ComponentProps<'div'>, 'title'> {
29
29
  /** a LIGHT ModalAsk: the card's paper and dark words instead of the dark end (Lh 2026-09-29) — same layout, same trio; the one solid button turns dark */
30
30
  light?: boolean;
31
31
  }
32
- /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnTrio` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
32
+ /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
33
33
  * with the app's `onClick`; the ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `Body`) is the CONFIRM: a question with nothing
34
34
  * to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
35
35
  export declare function ModalAsk({ title, caption, light, className, children, ...rest }: ModalAskProps): import("react").JSX.Element;
36
- export interface BtnTrioProps extends ComponentProps<'div'> {
37
- }
38
- /** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
39
- export declare function BtnTrio({ className, children, ...rest }: BtnTrioProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Children, Fragment, useEffect, useRef } from 'react';
2
+ import { useEffect, useRef } from 'react';
3
3
  import { focusWhenActive, useLatest } from '../state.js';
4
4
  import { cx } from '../cx.js';
5
5
  /**
@@ -57,14 +57,9 @@ export function Modal({ open = true, onClosed, onDismiss, className, ...rest })
57
57
  }, [has, open]);
58
58
  return _jsx("article", { ref: ref, className: cx('card modal', className), ...rest });
59
59
  }
60
- /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnTrio` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
60
+ /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
61
61
  * with the app's `onClick`; the ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `Body`) is the CONFIRM: a question with nothing
62
62
  * to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
63
63
  export function ModalAsk({ title, caption, light, className, children, ...rest }) {
64
64
  return (_jsxs("div", { className: cx('modal__drawer', light && 'modal__drawer--light', className), ...rest, children: [_jsx("h2", { className: "t-h2", tabIndex: -1, children: title }), caption != null && _jsx("p", { className: "t-caption", children: caption }), children] }));
65
65
  }
66
- /** BtnTrio — three round buttons with dotted connectors between them (× · ? · ✓); the middle one inverted. */
67
- export function BtnTrio({ className, children, ...rest }) {
68
- const items = Children.toArray(children);
69
- return (_jsx("div", { className: cx('btn-trio', className), ...rest, children: items.map((child, i) => (_jsxs(Fragment, { children: [i > 0 && _jsx("span", { className: "btn-trio__dots" }), child] }, i))) }));
70
- }