@sincpro/web-ui 2.11.0 → 2.13.0

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 (207) hide show
  1. package/README.md +77 -20
  2. package/dist/components/activity/Messages.d.ts +3 -23
  3. package/dist/components/activity/Messages.js +3 -17
  4. package/dist/components/activity/index.d.ts +2 -1
  5. package/dist/components/activity/index.js +2 -1
  6. package/dist/components/activity/messageKind.d.ts +23 -0
  7. package/dist/components/activity/messageKind.js +17 -0
  8. package/dist/components/assist/assist.d.ts +1 -1
  9. package/dist/components/assist/assist.js +1 -1
  10. package/dist/components/frame/model.js +1 -1
  11. package/dist/components/guide/index.d.ts +2 -1
  12. package/dist/components/guide/index.js +2 -1
  13. package/dist/components/guide/selector.d.ts +25 -0
  14. package/dist/components/guide/selector.js +14 -0
  15. package/dist/components/guide/target.d.ts +3 -25
  16. package/dist/components/guide/target.js +2 -14
  17. package/dist/components/index.d.ts +1 -0
  18. package/dist/components/index.js +1 -0
  19. package/dist/components/listing/AxisLevels.d.ts +2 -5
  20. package/dist/components/listing/AxisLevels.js +5 -22
  21. package/dist/components/listing/BoardColumns.js +10 -6
  22. package/dist/components/listing/ColumnsMenu.d.ts +3 -7
  23. package/dist/components/listing/ColumnsMenu.js +4 -8
  24. package/dist/components/listing/Listing.js +3 -1
  25. package/dist/components/listing/ListingBar.d.ts +16 -94
  26. package/dist/components/listing/ListingBar.js +24 -2
  27. package/dist/components/listing/RecordCard.d.ts +41 -3
  28. package/dist/components/listing/RecordCard.js +63 -22
  29. package/dist/components/listing/Row.js +5 -2
  30. package/dist/components/listing/collapsed.d.ts +2 -0
  31. package/dist/components/listing/collapsed.js +8 -0
  32. package/dist/components/listing/columnSpecs.d.ts +34 -0
  33. package/dist/components/listing/columnSpecs.js +54 -0
  34. package/dist/components/listing/columns.d.ts +3 -21
  35. package/dist/components/listing/columns.js +2 -39
  36. package/dist/components/listing/index.d.ts +11 -7
  37. package/dist/components/listing/index.js +15 -8
  38. package/dist/components/listing/levels.d.ts +9 -0
  39. package/dist/components/listing/levels.js +27 -0
  40. package/dist/components/listing/pageSizes.d.ts +9 -0
  41. package/dist/components/listing/pageSizes.js +11 -0
  42. package/dist/components/listing/pages.d.ts +2 -9
  43. package/dist/components/listing/pages.js +5 -9
  44. package/dist/components/listing/set.d.ts +1 -1
  45. package/dist/components/listing/tree.d.ts +2 -1
  46. package/dist/components/listing/tree.js +4 -5
  47. package/dist/components/preview/FilePreview.d.ts +3 -3
  48. package/dist/components/preview/FilePreview.js +3 -15
  49. package/dist/components/preview/index.d.ts +2 -1
  50. package/dist/components/preview/index.js +2 -1
  51. package/dist/components/preview/previewKind.d.ts +3 -0
  52. package/dist/components/preview/previewKind.js +17 -0
  53. package/dist/components/receipt/Receipt.d.ts +51 -0
  54. package/dist/components/receipt/Receipt.js +23 -0
  55. package/dist/components/receipt/index.d.ts +1 -0
  56. package/dist/components/receipt/index.js +3 -0
  57. package/dist/components/search/CriteriaChips.js +5 -3
  58. package/dist/components/search/FilterBuilder.d.ts +5 -139
  59. package/dist/components/search/FilterBuilder.js +5 -579
  60. package/dist/components/search/JsonEditor.d.ts +2 -8
  61. package/dist/components/search/JsonEditor.js +5 -15
  62. package/dist/components/search/RuleValue.d.ts +2 -2
  63. package/dist/components/search/RuleValue.js +5 -4
  64. package/dist/components/search/datePeriods.js +1 -1
  65. package/dist/components/search/filterTree.d.ts +183 -0
  66. package/dist/components/search/filterTree.js +570 -0
  67. package/dist/components/search/formatJson.d.ts +8 -0
  68. package/dist/components/search/formatJson.js +17 -0
  69. package/dist/components/search/index.d.ts +5 -3
  70. package/dist/components/search/index.js +7 -3
  71. package/dist/components/search/query.js +1 -1
  72. package/dist/components/shell/KioskFrame.d.ts +35 -0
  73. package/dist/components/shell/KioskFrame.js +39 -0
  74. package/dist/components/shell/SearchEntry.js +1 -1
  75. package/dist/components/shell/index.d.ts +1 -0
  76. package/dist/components/shell/index.js +1 -0
  77. package/dist/foundations/calendar.js +1 -1
  78. package/dist/foundations/catalog.d.ts +7 -8
  79. package/dist/foundations/catalog.js +10 -35
  80. package/dist/foundations/chart.js +1 -1
  81. package/dist/foundations/clock.d.ts +3 -0
  82. package/dist/foundations/clock.js +41 -0
  83. package/dist/foundations/controlName.d.ts +12 -0
  84. package/dist/foundations/controlName.js +14 -0
  85. package/dist/foundations/copy.d.ts +3 -1130
  86. package/dist/foundations/copy.es.d.ts +1 -1
  87. package/dist/foundations/copy.es.js +26 -0
  88. package/dist/foundations/copy.js +13 -747
  89. package/dist/foundations/copyStore.d.ts +21 -0
  90. package/dist/foundations/copyStore.js +47 -0
  91. package/dist/foundations/density.d.ts +4 -8
  92. package/dist/foundations/density.js +2 -9
  93. package/dist/foundations/form.d.ts +2 -12
  94. package/dist/foundations/form.js +4 -14
  95. package/dist/foundations/idle.d.ts +1 -0
  96. package/dist/foundations/idle.js +34 -0
  97. package/dist/foundations/index.d.ts +21 -11
  98. package/dist/foundations/index.js +28 -11
  99. package/dist/foundations/keys.d.ts +8 -0
  100. package/dist/foundations/keys.js +6 -0
  101. package/dist/foundations/pickBy.d.ts +16 -0
  102. package/dist/foundations/pickBy.js +17 -0
  103. package/dist/foundations/pivotSheet.js +0 -0
  104. package/dist/foundations/pointer.d.ts +25 -0
  105. package/dist/foundations/pointer.js +28 -0
  106. package/dist/foundations/shortcut.d.ts +3 -9
  107. package/dist/foundations/shortcut.js +2 -7
  108. package/dist/foundations/sticky.d.ts +2 -6
  109. package/dist/foundations/sticky.js +5 -8
  110. package/dist/foundations/stickyStyle.d.ts +12 -0
  111. package/dist/foundations/stickyStyle.js +13 -0
  112. package/dist/foundations/surface.d.ts +2 -2
  113. package/dist/foundations/surface.js +4 -2
  114. package/dist/foundations/theme.d.ts +3 -13
  115. package/dist/foundations/theme.js +2 -15
  116. package/dist/foundations/themeChoice.d.ts +19 -0
  117. package/dist/foundations/themeChoice.js +22 -0
  118. package/dist/foundations/types.d.ts +3 -0
  119. package/dist/foundations/uiCopy.d.ts +1173 -0
  120. package/dist/foundations/uiCopy.js +775 -0
  121. package/dist/foundations/xlsx.d.ts +4 -10
  122. package/dist/foundations/xlsx.js +0 -0
  123. package/dist/foundations/xlsxDownload.d.ts +8 -0
  124. package/dist/foundations/xlsxDownload.js +28 -0
  125. package/dist/primitives/button/Button.d.ts +3 -15
  126. package/dist/primitives/button/Button.js +2 -65
  127. package/dist/primitives/button/classes.d.ts +21 -0
  128. package/dist/primitives/button/classes.js +65 -0
  129. package/dist/primitives/button/index.d.ts +2 -1
  130. package/dist/primitives/button/index.js +3 -1
  131. package/dist/primitives/choice/RadioGroup.d.ts +8 -1
  132. package/dist/primitives/choice/RadioGroup.js +9 -1
  133. package/dist/primitives/choice/options.d.ts +3 -0
  134. package/dist/primitives/field/Field.d.ts +2 -6
  135. package/dist/primitives/field/Field.js +4 -10
  136. package/dist/primitives/field/Keypad.d.ts +43 -0
  137. package/dist/primitives/field/Keypad.js +62 -0
  138. package/dist/primitives/field/Stepper.d.ts +28 -0
  139. package/dist/primitives/field/Stepper.js +52 -0
  140. package/dist/primitives/field/classes.d.ts +6 -0
  141. package/dist/primitives/field/classes.js +13 -0
  142. package/dist/primitives/field/clipboard.js +1 -1
  143. package/dist/primitives/field/index.d.ts +5 -1
  144. package/dist/primitives/field/index.js +9 -1
  145. package/dist/primitives/field/keypadKeys.d.ts +24 -0
  146. package/dist/primitives/field/keypadKeys.js +80 -0
  147. package/dist/primitives/hint/Hint.js +1 -1
  148. package/dist/primitives/menu/Menu.d.ts +2 -19
  149. package/dist/primitives/menu/Menu.js +4 -30
  150. package/dist/primitives/menu/classes.d.ts +18 -0
  151. package/dist/primitives/menu/classes.js +33 -0
  152. package/dist/primitives/menu/index.d.ts +2 -1
  153. package/dist/primitives/menu/index.js +3 -1
  154. package/dist/primitives/notice/Flag.js +1 -1
  155. package/dist/primitives/notice/Outcome.d.ts +28 -0
  156. package/dist/primitives/notice/Outcome.js +28 -0
  157. package/dist/primitives/notice/index.d.ts +1 -0
  158. package/dist/primitives/notice/index.js +2 -0
  159. package/dist/primitives/table/CellCopy.js +1 -1
  160. package/dist/primitives/table/EditableTable.d.ts +3 -37
  161. package/dist/primitives/table/EditableTable.js +2 -47
  162. package/dist/primitives/table/ReportTable.js +1 -1
  163. package/dist/primitives/table/RowActions.js +1 -1
  164. package/dist/primitives/table/Table.d.ts +2 -4
  165. package/dist/primitives/table/Table.js +13 -16
  166. package/dist/primitives/table/cellTone.d.ts +5 -0
  167. package/dist/primitives/table/cellTone.js +13 -0
  168. package/dist/primitives/table/editRules.d.ts +43 -0
  169. package/dist/primitives/table/editRules.js +53 -0
  170. package/dist/primitives/table/index.d.ts +4 -2
  171. package/dist/primitives/table/index.js +4 -2
  172. package/dist/primitives/tag/Count.d.ts +2 -3
  173. package/dist/primitives/tag/Count.js +4 -5
  174. package/dist/primitives/tag/Tags.d.ts +22 -1
  175. package/dist/primitives/tag/Tags.js +57 -14
  176. package/dist/primitives/tag/countText.d.ts +3 -0
  177. package/dist/primitives/tag/countText.js +7 -0
  178. package/dist/primitives/tag/index.d.ts +3 -2
  179. package/dist/primitives/tag/index.js +2 -1
  180. package/dist/primitives/value/DateValue.d.ts +2 -5
  181. package/dist/primitives/value/DateValue.js +6 -44
  182. package/dist/primitives/value/Elapsed.d.ts +16 -0
  183. package/dist/primitives/value/Elapsed.js +37 -0
  184. package/dist/primitives/value/Meter.d.ts +3 -8
  185. package/dist/primitives/value/Meter.js +2 -9
  186. package/dist/primitives/value/RichText.d.ts +2 -4
  187. package/dist/primitives/value/RichText.js +5 -20
  188. package/dist/primitives/value/Value.d.ts +10 -7
  189. package/dist/primitives/value/Value.js +7 -24
  190. package/dist/primitives/value/elapsedTime.d.ts +26 -0
  191. package/dist/primitives/value/elapsedTime.js +32 -0
  192. package/dist/primitives/value/format.d.ts +16 -0
  193. package/dist/primitives/value/format.js +81 -0
  194. package/dist/primitives/value/index.d.ts +9 -4
  195. package/dist/primitives/value/index.js +13 -4
  196. package/dist/primitives/value/meterLevel.d.ts +10 -0
  197. package/dist/primitives/value/meterLevel.js +12 -0
  198. package/dist/primitives/value/richTextPlain.d.ts +4 -0
  199. package/dist/primitives/value/richTextPlain.js +23 -0
  200. package/dist/tokens.css +87 -1
  201. package/dist/views/list/List.d.ts +11 -0
  202. package/dist/views/list/List.js +14 -3
  203. package/dist/views/list/ListView.d.ts +1 -1
  204. package/dist/views/list/ListView.js +26 -6
  205. package/dist/views/list/types.d.ts +7 -0
  206. package/dist/views/record/Record.js +1 -1
  207. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ /** What changes, at any depth. A word is replaced; a section is merged. */
2
+ export type CopyOverride<C> = {
3
+ [K in keyof C]?: C[K] extends string ? string : C[K] extends readonly unknown[] ? C[K] : C[K] extends object ? CopyOverride<C[K]> : C[K];
4
+ };
5
+ /** `base` with `over` on top: sections merge, everything else is replaced. */
6
+ export declare function mergeCopyOver<C extends object>(base: C, over: CopyOverride<C> | undefined): C;
7
+ /** `{name}` → value. A missing key stays visible in the template. */
8
+ export declare function fillCopy(template: string, params: Record<string, string | number>): string;
9
+ /** A catalog's words outside React. Not public: `createCopy` hands them out with its
10
+ * `Provider`, and web-ui's own are `installCopy` / `currentCopy` / `mergeCopy`. */
11
+ export type CopyStore<C extends object> = {
12
+ /** The factory words: what is there before anything is installed. */
13
+ english: C;
14
+ /** Sets the session's words — English with `over` on top — and returns them. */
15
+ install: (over?: CopyOverride<C>) => C;
16
+ /** The installed words: for what is not a component. */
17
+ current: () => C;
18
+ /** English with `over` on top, without installing it. */
19
+ merge: (over?: CopyOverride<C>) => C;
20
+ };
21
+ export declare function copyStore<C extends object>(english: C): CopyStore<C>;
@@ -0,0 +1,47 @@
1
+ /* ==================================================================== *
2
+ * A CATALOG'S WORDS, WITHOUT REACT — installed, merged, filled.
3
+ *
4
+ * Context: `createCopy` (`catalog.tsx`) is the mechanism every package speaks, and half of
5
+ * it is a React context — so it carries `"use client"`. The other half is what a formatter,
6
+ * a sentence built in a function or a server component reads: the installed words, a merge,
7
+ * a template filled. Behind the directive that half was a client reference on the server,
8
+ * and `dateLabel()` threw instead of naming a month. So it lives here, without the
9
+ * directive, and the catalog's `Provider` is built over the same store
10
+ * (`catalogOver`): one global, read the same from a component and from a function.
11
+ *
12
+ * On the server the store is the server's: an application installs its language there too
13
+ * (the module of its root layout), as it does in the browser.
14
+ * ==================================================================== */
15
+ const isSection = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
16
+ /** `base` with `over` on top: sections merge, everything else is replaced. */
17
+ export function mergeCopyOver(base, over) {
18
+ if (over === undefined)
19
+ return base;
20
+ const out = { ...base };
21
+ for (const [key, value] of Object.entries(over)) {
22
+ if (value === undefined)
23
+ continue;
24
+ const under = out[key];
25
+ out[key] = isSection(under) && isSection(value) ? mergeCopyOver(under, value) : value;
26
+ }
27
+ return out;
28
+ }
29
+ /** `{name}` → value. A missing key stays visible in the template. */
30
+ export function fillCopy(template, params) {
31
+ return template.replace(/\{(\w+)\}/g, (whole, name) => {
32
+ const value = params[name];
33
+ return value === undefined ? whole : String(value);
34
+ });
35
+ }
36
+ export function copyStore(english) {
37
+ let installed = english;
38
+ return {
39
+ english,
40
+ install: (over) => {
41
+ installed = mergeCopyOver(english, over);
42
+ return installed;
43
+ },
44
+ current: () => installed,
45
+ merge: (over) => mergeCopyOver(english, over),
46
+ };
47
+ }
@@ -1,5 +1,8 @@
1
+ import { byDensity } from "./pickBy.js";
2
+ import type { Density } from "./types.js";
1
3
  import { type ReactNode } from "react";
2
- export type Density = "comfortable" | "compact";
4
+ export type { Density };
5
+ export { byDensity };
3
6
  /** The surface declares it: `Peek` and the narrow dialogs set it to `compact`;
4
7
  * a panel leaves it at `comfortable`. */
5
8
  export declare function DensityProvider({ value, children, }: {
@@ -7,10 +10,3 @@ export declare function DensityProvider({ value, children, }: {
7
10
  children: ReactNode;
8
11
  }): import("react").JSX.Element;
9
12
  export declare function useDensity(): Density;
10
- /** Pick between two values according to the density, without writing the
11
- * ternary.
12
- *
13
- * It exists so the difference between the two stays on ONE readable line next
14
- * to the class, and not scattered across conditionals — which is how one of
15
- * the two densities ends up unmaintained. */
16
- export declare function byDensity<T>(d: Density, comfortable: T, compact: T): T;
@@ -1,6 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { byDensity } from "./pickBy.js";
3
4
  import { createContext, useContext } from "react";
5
+ export { byDensity };
4
6
  const Ctx = createContext("comfortable");
5
7
  /** The surface declares it: `Peek` and the narrow dialogs set it to `compact`;
6
8
  * a panel leaves it at `comfortable`. */
@@ -10,12 +12,3 @@ export function DensityProvider({ value, children, }) {
10
12
  export function useDensity() {
11
13
  return useContext(Ctx);
12
14
  }
13
- /** Pick between two values according to the density, without writing the
14
- * ternary.
15
- *
16
- * It exists so the difference between the two stays on ONE readable line next
17
- * to the class, and not scattered across conditionals — which is how one of
18
- * the two densities ends up unmaintained. */
19
- export function byDensity(d, comfortable, compact) {
20
- return d === "compact" ? compact : comfortable;
21
- }
@@ -1,3 +1,4 @@
1
+ import { controlName } from "./controlName.js";
1
2
  import { type ReactNode } from "react";
2
3
  /**
3
4
  * What a `Field` hands to the control inside it: the id its label points at, the ids that
@@ -59,18 +60,7 @@ export declare function useFieldIds(own: {
59
60
  describedBy: string | undefined;
60
61
  invalid: boolean;
61
62
  };
62
- /**
63
- * The `aria-label` a control puts on itself: none inside a `Field` — the field's label names
64
- * it — and outside one the control's own, or as a last resort its placeholder (what a browser
65
- * reads for a bare `<input placeholder>` anyway, so a control outside a form is never
66
- * nameless).
67
- *
68
- * Context: a control inside a `Field` used to keep its `aria-label` too. With both, React Aria
69
- * names the control by the label AND itself («Cliente Cliente», «Cantidad cantidad»), so the
70
- * name was read twice. The field wins: an `aria-label` is for a control that has no label
71
- * on screen — a table cell, a search box — and inside a field it is ignored.
72
- */
73
- export declare function controlName(labelledBy: string | undefined, ariaLabel: string | undefined, fallback?: string): string | undefined;
63
+ export { controlName };
74
64
  export type FormMode = "edit" | "read";
75
65
  export declare function FormModeProvider({ value, children, }: {
76
66
  value: FormMode;
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { controlName } from "./controlName.js";
3
4
  import { createContext, useContext } from "react";
4
5
  export const FieldIdsContext = createContext(null);
5
6
  export const ControlStateContext = createContext(null);
@@ -28,20 +29,9 @@ export function useFieldIds(own) {
28
29
  invalid: own.invalid ?? field?.invalid ?? place?.invalid ?? false,
29
30
  };
30
31
  }
31
- /**
32
- * The `aria-label` a control puts on itself: none inside a `Field` — the field's label names
33
- * it — and outside one the control's own, or as a last resort its placeholder (what a browser
34
- * reads for a bare `<input placeholder>` anyway, so a control outside a form is never
35
- * nameless).
36
- *
37
- * Context: a control inside a `Field` used to keep its `aria-label` too. With both, React Aria
38
- * names the control by the label AND itself («Cliente Cliente», «Cantidad cantidad»), so the
39
- * name was read twice. The field wins: an `aria-label` is for a control that has no label
40
- * on screen — a table cell, a search box — and inside a field it is ignored.
41
- */
42
- export function controlName(labelledBy, ariaLabel, fallback) {
43
- return labelledBy === undefined ? (ariaLabel ?? fallback) : undefined;
44
- }
32
+ /* `controlName` is a plain function (`controlName.ts`), without the directive, so a server
33
+ component reads it; re-exported so every path that read it here keeps reading it. */
34
+ export { controlName };
45
35
  const Ctx = createContext("edit");
46
36
  export function FormModeProvider({ value, children, }) {
47
37
  return _jsx(Ctx.Provider, { value: value, children: children });
@@ -0,0 +1 @@
1
+ export declare function useIdle(seconds: number, onIdle: () => void, active?: boolean): void;
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { useEffect, useRef } from "react";
3
+ /* ==================================================================== *
4
+ * IDLE — nobody has touched it for a while.
5
+ *
6
+ * Context: a kiosk is left half-way — two coffees in the order and the person gone — and the
7
+ * next one finds someone else's order. After `seconds` without a touch, a key or a scroll,
8
+ * `onIdle` runs once; the next touch starts the count again. Off while `active` is false (on
9
+ * the attract screen there is nothing to abandon).
10
+ * ==================================================================== */
11
+ const EVENTS = ["pointerdown", "keydown", "wheel", "touchstart"];
12
+ export function useIdle(seconds, onIdle, active = true) {
13
+ /* The latest callback, without restarting the count when the screen re-renders. */
14
+ const callback = useRef(onIdle);
15
+ useEffect(() => {
16
+ callback.current = onIdle;
17
+ });
18
+ useEffect(() => {
19
+ if (!active || seconds <= 0)
20
+ return;
21
+ let timer = setTimeout(() => callback.current(), seconds * 1000);
22
+ const restart = () => {
23
+ clearTimeout(timer);
24
+ timer = setTimeout(() => callback.current(), seconds * 1000);
25
+ };
26
+ for (const name of EVENTS)
27
+ window.addEventListener(name, restart, { passive: true });
28
+ return () => {
29
+ clearTimeout(timer);
30
+ for (const name of EVENTS)
31
+ window.removeEventListener(name, restart);
32
+ };
33
+ }, [seconds, active]);
34
+ }
@@ -1,13 +1,21 @@
1
- export { type CopyCatalog, type CopyOverride, createCopy, mergeCopyOver, } from "./catalog.js";
2
- export { currentCopy, currentCopyLocale, ENGLISH_COPY, fillCopy, installCopy, mergeCopy, type UiCopy, type UiCopyOverride, UiCopyProvider, useUiCopy, } from "./copy.js";
3
- export { byDensity, type Density, DensityProvider, useDensity, } from "./density.js";
1
+ export { type CopyCatalog, createCopy } from "./catalog.js";
2
+ export { UiCopyProvider, useUiCopy } from "./copy.js";
3
+ export { type CopyOverride, mergeCopyOver } from "./copyStore.js";
4
+ export { DensityProvider, useDensity } from "./density.js";
5
+ export { useNow } from "./clock.js";
6
+ export { useIdle } from "./idle.js";
7
+ export { byDensity, bySurface } from "./pickBy.js";
8
+ export { currentCopy, currentCopyLocale, ENGLISH_COPY, fillCopy, installCopy, mergeCopy, type UiCopy, type UiCopyOverride, } from "./uiCopy.js";
4
9
  export { useViewStyle, type ViewStyle, ViewStyleProvider, } from "./viewStyle.js";
5
- export { controlName, FieldBoundary, type FieldIds, type FormMode, FormModeProvider, type FormStyle, FormStyleProvider, useFieldIds, useFormMode, useFormStyle, } from "./form.js";
6
- export { type KeyPress, type Keys, keysAria, keysLabel, matchesKeys, needsModifier, type ParsedKeys, parseKeys, } from "./keys.js";
7
- export { type KeyboardPlatform, type ModShortcut, modShortcut, type Shortcut, useKeyboardPlatform, useKeysHint, useShortcuts, } from "./shortcut.js";
8
- export { bySurface, SurfaceProvider, useSurface } from "./surface.js";
9
- export { applyTheme, isTheme, type ResolvedTheme, resolveTheme, type Theme, THEME_ATTRIBUTE, ThemeProvider, type ThemeProviderProps, THEMES, useTheme, } from "./theme.js";
10
- export type { OpenTarget, Size, Surface, Tone } from "./types.js";
10
+ export { controlName } from "./controlName.js";
11
+ export { FieldBoundary, type FieldIds, type FormMode, FormModeProvider, type FormStyle, FormStyleProvider, useFieldIds, useFormMode, useFormStyle, } from "./form.js";
12
+ export { type KeyPress, type Keys, keysAria, keysLabel, matchesKeys, type ModShortcut, modShortcut, needsModifier, type ParsedKeys, parseKeys, } from "./keys.js";
13
+ export { type KeyboardPlatform, type Shortcut, useKeyboardPlatform, useKeysHint, useShortcuts, } from "./shortcut.js";
14
+ export { isPointer, type Pointer, POINTER_ATTRIBUTE, pointerAttributes, POINTERS, } from "./pointer.js";
15
+ export { SurfaceProvider, useSurface } from "./surface.js";
16
+ export { applyTheme, ThemeProvider, type ThemeProviderProps, useTheme, } from "./theme.js";
17
+ export { isTheme, type ResolvedTheme, resolveTheme, type Theme, THEME_ATTRIBUTE, THEMES, } from "./themeChoice.js";
18
+ export type { Density, OpenTarget, Size, Surface, Tone, } from "./types.js";
11
19
  /** The system's Spanish, for whoever wants to install it whole. */
12
20
  export { SPANISH_COPY } from "./copy.es.js";
13
21
  export { flatten, loose, pick, pickAll, propsOf, slot, slotOf, type Slotted, } from "./slots.js";
@@ -16,5 +24,7 @@ export { GRAIN_ORDER, type GroupableField, type GroupGrain, type Grouping, type
16
24
  export { axisLabels, axisSpans, keyStarts, type Pivot, type PivotAxis, type PivotCell, type PivotCrossing, type PivotFold, pivotFrom, pivotIsEmpty, type PivotKey, type PivotLevel, type PivotMargin, type PivotMeasure, pivotOf, type PivotSource, type PivotSpec, } from "./pivot.js";
17
25
  export { chartCompare, type ChartData, chartFromPivot, chartFromRecord, type ChartKind, type ChartMeasure, chartMeasures, type ChartOrder, type ChartPoint, type ChartReading, COUNT_MEASURE, orderChart, SERIES_COLORS, } from "./chart.js";
18
26
  export { downloadPivot, pivotSheet, type PivotSheetOptions, pivotXlsx, } from "./pivotSheet.js";
19
- export { STICKY_TOP, stickyReset, stickyTop, useScrollBox, useStickyLayer, } from "./sticky.js";
20
- export { columnName, downloadXlsx, writeXlsx, type XlsxCell, type XlsxMerge, type XlsxSheet, } from "./xlsx.js";
27
+ export { useScrollBox, useStickyLayer } from "./sticky.js";
28
+ export { STICKY_TOP, stickyReset, stickyTop } from "./stickyStyle.js";
29
+ export { columnName, writeXlsx, type XlsxCell, type XlsxMerge, type XlsxSheet, } from "./xlsx.js";
30
+ export { downloadXlsx } from "./xlsxDownload.js";
@@ -1,23 +1,38 @@
1
1
  /* What is shared by more than one family and belongs to none of them. */
2
- /* THE MECHANISM of a copy catalog — web-ui's words are one; an application's own are another. */
3
- export { createCopy, mergeCopyOver, } from "./catalog.js";
4
- export { currentCopy, currentCopyLocale, ENGLISH_COPY, fillCopy, installCopy, mergeCopy, UiCopyProvider, useUiCopy, } from "./copy.js";
5
- export { byDensity, DensityProvider, useDensity, } from "./density.js";
2
+ /* THE MECHANISM of a copy catalog — web-ui's words are one; an application's own are another.
3
+ What needs no React — the words, their store, a merge, a template, a pick by density or
4
+ surface — comes from modules without `"use client"`, so a server component reads it
5
+ (`tests/serverBoundary.test.ts`). */
6
+ export { createCopy } from "./catalog.js";
7
+ export { UiCopyProvider, useUiCopy } from "./copy.js";
8
+ export { mergeCopyOver } from "./copyStore.js";
9
+ export { DensityProvider, useDensity } from "./density.js";
10
+ /* NOW, live — one shared ticking clock per interval, `null` on the server. */
11
+ export { useNow } from "./clock.js";
12
+ /* IDLE — nobody touched it for a while: a kiosk forgets the abandoned order. */
13
+ export { useIdle } from "./idle.js";
14
+ export { byDensity, bySurface } from "./pickBy.js";
15
+ export { currentCopy, currentCopyLocale, ENGLISH_COPY, fillCopy, installCopy, mergeCopy, } from "./uiCopy.js";
6
16
  /* How a whole application draws its views — `traditional` or `modern` (the direction): the
7
17
  record's rail and the actions of a record and of a list. Set once, like the density. */
8
18
  export { useViewStyle, ViewStyleProvider, } from "./viewStyle.js";
9
19
  /* A CONTROL'S CONTRACT — the ids its `Field` gives it and whether it is viewed or written. The
10
20
  package's controls and the application's speak it alike. */
11
- export { controlName, FieldBoundary, FormModeProvider, FormStyleProvider, useFieldIds, useFormMode, useFormStyle, } from "./form.js";
21
+ export { controlName } from "./controlName.js";
22
+ export { FieldBoundary, FormModeProvider, FormStyleProvider, useFieldIds, useFormMode, useFormStyle, } from "./form.js";
12
23
  /* A SHORTCUT, drawn the way the person's keyboard says it («⌘K» on a Mac, «Ctrl K» elsewhere),
13
24
  and BOUND: `useShortcuts` runs it while the piece that declares it is on screen — the last
14
25
  mounted wins. A combination is written once («Alt+D», «Mod+S») and read by `foundations/keys`. */
15
- export { keysAria, keysLabel, matchesKeys, needsModifier, parseKeys, } from "./keys.js";
16
- export { modShortcut, useKeyboardPlatform, useKeysHint, useShortcuts, } from "./shortcut.js";
26
+ export { keysAria, keysLabel, matchesKeys, modShortcut, needsModifier, parseKeys, } from "./keys.js";
27
+ export { useKeyboardPlatform, useKeysHint, useShortcuts, } from "./shortcut.js";
28
+ /* THE POINTER — a finger or a mouse, when the application knows better than the device (a till
29
+ is a touch monitor with a mouse plugged in). `tokens.css` reads `data-pointer`. */
30
+ export { isPointer, POINTER_ATTRIBUTE, pointerAttributes, POINTERS, } from "./pointer.js";
17
31
  /* THE THEME — light, dark or the operating system's. The palettes live in `tokens.css`; this
18
32
  only writes `data-theme`. */
19
- export { bySurface, SurfaceProvider, useSurface } from "./surface.js";
20
- export { applyTheme, isTheme, resolveTheme, THEME_ATTRIBUTE, ThemeProvider, THEMES, useTheme, } from "./theme.js";
33
+ export { SurfaceProvider, useSurface } from "./surface.js";
34
+ export { applyTheme, ThemeProvider, useTheme, } from "./theme.js";
35
+ export { isTheme, resolveTheme, THEME_ATTRIBUTE, THEMES, } from "./themeChoice.js";
21
36
  /** The system's Spanish, for whoever wants to install it whole. */
22
37
  export { SPANISH_COPY } from "./copy.es.js";
23
38
  /* THE SLOTS — how an archetype is written as a TREE. It lives here and not inside
@@ -42,5 +57,7 @@ export { chartCompare, chartFromPivot, chartFromRecord, chartMeasures, COUNT_MEA
42
57
  /* THE SHEET: the same grid, in a file. The writer is generic and knows
43
58
  nothing of pivots; `pivotSheet` is what translates one. */
44
59
  export { downloadPivot, pivotSheet, pivotXlsx, } from "./pivotSheet.js";
45
- export { STICKY_TOP, stickyReset, stickyTop, useScrollBox, useStickyLayer, } from "./sticky.js";
46
- export { columnName, downloadXlsx, writeXlsx, } from "./xlsx.js";
60
+ export { useScrollBox, useStickyLayer } from "./sticky.js";
61
+ export { STICKY_TOP, stickyReset, stickyTop } from "./stickyStyle.js";
62
+ export { columnName, writeXlsx, } from "./xlsx.js";
63
+ export { downloadXlsx } from "./xlsxDownload.js";
@@ -32,3 +32,11 @@ export declare function needsModifier(keys: Keys): boolean;
32
32
  export declare function keysLabel(keys: Keys, platform: KeyboardPlatform | null): string;
33
33
  /** What `aria-keyshortcuts` says on this keyboard: «Alt+D», «Meta+S». */
34
34
  export declare function keysAria(keys: Keys, platform: KeyboardPlatform | null): string;
35
+ export type ModShortcut = {
36
+ /** What is drawn: «⌘K», «Ctrl K». */
37
+ label: string;
38
+ /** For `aria-keyshortcuts`: «Meta+K», «Control+K». */
39
+ aria: string;
40
+ };
41
+ /** The platform's command key with `key`: ⌘ on a Mac, Ctrl elsewhere. */
42
+ export declare function modShortcut(key: string, platform: KeyboardPlatform): ModShortcut;
@@ -97,3 +97,9 @@ export function keysAria(keys, platform) {
97
97
  want.key.length === 1 ? want.key.toUpperCase() : want.key,
98
98
  ].join("+");
99
99
  }
100
+ /** The platform's command key with `key`: ⌘ on a Mac, Ctrl elsewhere. */
101
+ export function modShortcut(key, platform) {
102
+ return platform === "apple"
103
+ ? { label: `⌘${key}`, aria: `Meta+${key}` }
104
+ : { label: `Ctrl ${key}`, aria: `Control+${key}` };
105
+ }
@@ -0,0 +1,16 @@
1
+ import type { Density, Surface } from "./types.js";
2
+ /**
3
+ * One of two values, by the density or by the surface — the two choices a surface makes for
4
+ * everything inside it (`density.tsx`, `surface.tsx`). Reading them takes React's context;
5
+ * picking by them does not, so the pick lives here, without `"use client"`: a server
6
+ * component that knows its surface writes the same classes.
7
+ */
8
+ /** Pick between two values according to the density, without writing the
9
+ * ternary.
10
+ *
11
+ * It exists so the difference between the two stays on ONE readable line next
12
+ * to the class, and not scattered across conditionals — which is how one of
13
+ * the two densities ends up unmaintained. */
14
+ export declare function byDensity<T>(d: Density, comfortable: T, compact: T): T;
15
+ /** Picks between two values according to the surface. The twin of `byDensity`. */
16
+ export declare const bySurface: <T>(surface: Surface, canvas: T, chrome: T) => T;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * One of two values, by the density or by the surface — the two choices a surface makes for
3
+ * everything inside it (`density.tsx`, `surface.tsx`). Reading them takes React's context;
4
+ * picking by them does not, so the pick lives here, without `"use client"`: a server
5
+ * component that knows its surface writes the same classes.
6
+ */
7
+ /** Pick between two values according to the density, without writing the
8
+ * ternary.
9
+ *
10
+ * It exists so the difference between the two stays on ONE readable line next
11
+ * to the class, and not scattered across conditionals — which is how one of
12
+ * the two densities ends up unmaintained. */
13
+ export function byDensity(d, comfortable, compact) {
14
+ return d === "compact" ? compact : comfortable;
15
+ }
16
+ /** Picks between two values according to the surface. The twin of `byDensity`. */
17
+ export const bySurface = (surface, canvas, chrome) => surface === "chrome" ? chrome : canvas;
Binary file
@@ -0,0 +1,25 @@
1
+ /**
2
+ * THE POINTER — what the person presses with, when the application knows better than the
3
+ * device.
4
+ *
5
+ * Context: the stylesheet sizes every control for a finger under `pointer: coarse`, and that
6
+ * is the browser's answer for the PRIMARY pointer. A till is a touch monitor with a mouse
7
+ * plugged in, a kiosk a touch screen the browser may report as a mouse: there the cashier gets
8
+ * 30 px targets. The application says it instead — `data-pointer` on `<html>` (or on a zone):
9
+ *
10
+ * touch sized for a finger, whatever the device reports
11
+ * fine sized for a mouse, even on a tablet (a back office driven with a trackpad)
12
+ * auto the device decides — the same as writing nothing
13
+ *
14
+ * Pure and without `"use client"`: a server layout writes `<html data-pointer>` itself, so the
15
+ * first paint already has the right sizes.
16
+ */
17
+ export type Pointer = "auto" | "touch" | "fine";
18
+ export declare const POINTERS: readonly Pointer[];
19
+ /** The attribute the stylesheet reads. */
20
+ export declare const POINTER_ATTRIBUTE = "data-pointer";
21
+ /** True for one of the three values — what comes from a setting or a URL is a string. */
22
+ export declare function isPointer(value: unknown): value is Pointer;
23
+ /** The attributes to spread on an element (`<html {...pointerAttributes("touch")}>`): `auto`
24
+ * writes none, so the device decides. */
25
+ export declare function pointerAttributes(pointer: Pointer): Record<string, string>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * THE POINTER — what the person presses with, when the application knows better than the
3
+ * device.
4
+ *
5
+ * Context: the stylesheet sizes every control for a finger under `pointer: coarse`, and that
6
+ * is the browser's answer for the PRIMARY pointer. A till is a touch monitor with a mouse
7
+ * plugged in, a kiosk a touch screen the browser may report as a mouse: there the cashier gets
8
+ * 30 px targets. The application says it instead — `data-pointer` on `<html>` (or on a zone):
9
+ *
10
+ * touch sized for a finger, whatever the device reports
11
+ * fine sized for a mouse, even on a tablet (a back office driven with a trackpad)
12
+ * auto the device decides — the same as writing nothing
13
+ *
14
+ * Pure and without `"use client"`: a server layout writes `<html data-pointer>` itself, so the
15
+ * first paint already has the right sizes.
16
+ */
17
+ export const POINTERS = ["auto", "touch", "fine"];
18
+ /** The attribute the stylesheet reads. */
19
+ export const POINTER_ATTRIBUTE = "data-pointer";
20
+ /** True for one of the three values — what comes from a setting or a URL is a string. */
21
+ export function isPointer(value) {
22
+ return value === "auto" || value === "touch" || value === "fine";
23
+ }
24
+ /** The attributes to spread on an element (`<html {...pointerAttributes("touch")}>`): `auto`
25
+ * writes none, so the device decides. */
26
+ export function pointerAttributes(pointer) {
27
+ return pointer === "auto" ? {} : { [POINTER_ATTRIBUTE]: pointer };
28
+ }
@@ -1,4 +1,4 @@
1
- import { type KeyboardPlatform, type Keys } from "./keys.js";
1
+ import { type KeyboardPlatform, type Keys, type ModShortcut, modShortcut } from "./keys.js";
2
2
  /**
3
3
  * Context: a shortcut is drawn the way the person's keyboard says it — «⌘K» on a Mac, «Ctrl K»
4
4
  * everywhere else. A «Ctrl K» on a Mac is a shortcut that does not work, and people stop
@@ -9,14 +9,8 @@ import { type KeyboardPlatform, type Keys } from "./keys.js";
9
9
  export type { KeyboardPlatform };
10
10
  /** The keyboard the page is being used with; `null` on the server and while hydrating. */
11
11
  export declare function useKeyboardPlatform(): KeyboardPlatform | null;
12
- export type ModShortcut = {
13
- /** What is drawn: «⌘K», «Ctrl K». */
14
- label: string;
15
- /** For `aria-keyshortcuts`: «Meta+K», «Control+K». */
16
- aria: string;
17
- };
18
- /** The platform's command key with `key`: ⌘ on a Mac, Ctrl elsewhere. */
19
- export declare function modShortcut(key: string, platform: KeyboardPlatform): ModShortcut;
12
+ export type { ModShortcut };
13
+ export { modShortcut };
20
14
  export interface Shortcut {
21
15
  /** «Alt+D», «Mod+S», «Alt+P»: see `foundations/keys`. */
22
16
  keys: Keys;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { keysAria, keysLabel, matchesKeys, needsModifier, } from "./keys.js";
2
+ import { keysAria, keysLabel, matchesKeys, modShortcut, needsModifier, } from "./keys.js";
3
3
  import { useEffect, useRef, useSyncExternalStore } from "react";
4
4
  function readPlatform() {
5
5
  const nav = navigator;
@@ -13,12 +13,7 @@ const unchanging = () => () => { };
13
13
  export function useKeyboardPlatform() {
14
14
  return useSyncExternalStore(unchanging, readPlatform, () => null);
15
15
  }
16
- /** The platform's command key with `key`: ⌘ on a Mac, Ctrl elsewhere. */
17
- export function modShortcut(key, platform) {
18
- return platform === "apple"
19
- ? { label: `⌘${key}`, aria: `Meta+${key}` }
20
- : { label: `Ctrl ${key}`, aria: `Control+${key}` };
21
- }
16
+ export { modShortcut };
22
17
  const stack = [];
23
18
  function editable(target) {
24
19
  if (!(target instanceof HTMLElement))
@@ -1,10 +1,6 @@
1
+ import { STICKY_TOP, stickyReset, stickyTop } from "./stickyStyle.js";
1
2
  import { type CSSProperties, type RefObject } from "react";
2
- /** The variable that says at what height the next thing to stick starts. */
3
- export declare const STICKY_TOP = "--sticky-top";
4
- /** What goes in the `style` of something sticky: it sticks below what is already there. */
5
- export declare const stickyTop: CSSProperties;
6
- /** For a box with its own scroll: inside, the stack starts from zero. */
7
- export declare function stickyReset(): CSSProperties;
3
+ export { STICKY_TOP, stickyReset, stickyTop };
8
4
  /**
9
5
  * A TABLE'S BOX: when it has to be a scroll container and when not.
10
6
  *
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import { STICKY_TOP, stickyReset, stickyTop } from "./stickyStyle.js";
2
3
  import { useLayoutEffect, useRef, useState } from "react";
3
4
  /* ==================================================================== *
4
5
  * THE STACK OF STICKY THINGS
@@ -30,14 +31,10 @@ import { useLayoutEffect, useRef, useState } from "react";
30
31
  * the page, so what is sticky sticks to the box's edge: there the stack
31
32
  * starts from zero again. That is `stickyReset()`.
32
33
  * ==================================================================== */
33
- /** The variable that says at what height the next thing to stick starts. */
34
- export const STICKY_TOP = "--sticky-top";
35
- /** What goes in the `style` of something sticky: it sticks below what is already there. */
36
- export const stickyTop = { top: `var(${STICKY_TOP}, 0px)` };
37
- /** For a box with its own scroll: inside, the stack starts from zero. */
38
- export function stickyReset() {
39
- return { [STICKY_TOP]: "0px" };
40
- }
34
+ /* `STICKY_TOP`, `stickyTop` and `stickyReset` are plain values: `stickyStyle.ts`, without the
35
+ directive, so a band a server component draws reads them too. Re-exported so every path that
36
+ read them here keeps reading them. */
37
+ export { STICKY_TOP, stickyReset, stickyTop };
41
38
  /**
42
39
  * A TABLE'S BOX: when it has to be a scroll container and when not.
43
40
  *
@@ -0,0 +1,12 @@
1
+ import type { CSSProperties } from "react";
2
+ /**
3
+ * The sticky stack's variable and the two styles that read it — see the long note in
4
+ * `sticky.tsx`. Plain values, without `"use client"`: a band a server component draws sticks
5
+ * below the others the same way. Measuring a band is `sticky.tsx`'s, in the browser.
6
+ */
7
+ /** The variable that says at what height the next thing to stick starts. */
8
+ export declare const STICKY_TOP = "--sticky-top";
9
+ /** What goes in the `style` of something sticky: it sticks below what is already there. */
10
+ export declare const stickyTop: CSSProperties;
11
+ /** For a box with its own scroll: inside, the stack starts from zero. */
12
+ export declare function stickyReset(): CSSProperties;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * The sticky stack's variable and the two styles that read it — see the long note in
3
+ * `sticky.tsx`. Plain values, without `"use client"`: a band a server component draws sticks
4
+ * below the others the same way. Measuring a band is `sticky.tsx`'s, in the browser.
5
+ */
6
+ /** The variable that says at what height the next thing to stick starts. */
7
+ export const STICKY_TOP = "--sticky-top";
8
+ /** What goes in the `style` of something sticky: it sticks below what is already there. */
9
+ export const stickyTop = { top: `var(${STICKY_TOP}, 0px)` };
10
+ /** For a box with its own scroll: inside, the stack starts from zero. */
11
+ export function stickyReset() {
12
+ return { [STICKY_TOP]: "0px" };
13
+ }
@@ -1,9 +1,9 @@
1
+ import { bySurface } from "./pickBy.js";
1
2
  import type { Surface } from "./types.js";
2
3
  import { type ReactNode } from "react";
4
+ export { bySurface };
3
5
  export declare function SurfaceProvider({ value, children, }: {
4
6
  value: Surface;
5
7
  children: ReactNode;
6
8
  }): import("react").JSX.Element;
7
9
  export declare function useSurface(explicit?: Surface): Surface;
8
- /** Picks between two values according to the surface. The twin of `byDensity`. */
9
- export declare const bySurface: <T>(surface: Surface, canvas: T, chrome: T) => T;
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { bySurface } from "./pickBy.js";
3
4
  import { createContext, useContext } from "react";
4
5
  /**
5
6
  * Context: which surface whatever is inside is drawing on.
@@ -15,6 +16,9 @@ import { createContext, useContext } from "react";
15
16
  * by reading the JSX, which is the system's rule for color.
16
17
  */
17
18
  const Ctx = createContext("canvas");
19
+ /* `bySurface` is a plain function (`pickBy.ts`), without the directive, so a server component
20
+ reads it; re-exported so every path that read it here keeps reading it. */
21
+ export { bySurface };
18
22
  export function SurfaceProvider({ value, children, }) {
19
23
  return _jsx(Ctx.Provider, { value: value, children: children });
20
24
  }
@@ -22,5 +26,3 @@ export function useSurface(explicit) {
22
26
  const inherited = useContext(Ctx);
23
27
  return explicit ?? inherited;
24
28
  }
25
- /** Picks between two values according to the surface. The twin of `byDensity`. */
26
- export const bySurface = (surface, canvas, chrome) => surface === "chrome" ? chrome : canvas;
@@ -1,16 +1,7 @@
1
+ import { isTheme, type ResolvedTheme, resolveTheme, type Theme, THEME_ATTRIBUTE, THEMES } from "./themeChoice.js";
1
2
  import { type ReactNode } from "react";
2
- export type Theme = "system" | "light" | "dark";
3
- /** What the palette actually is once `system` has been looked up. */
4
- export type ResolvedTheme = "light" | "dark";
5
- export declare const THEMES: readonly Theme[];
6
- /** The attribute the stylesheet reads. */
7
- export declare const THEME_ATTRIBUTE = "data-theme";
8
- /** `system` is the operating system's answer; the other two are themselves. Pure, so it can
9
- * be tested without a browser. */
10
- export declare function resolveTheme(theme: Theme, systemPrefersDark: boolean): ResolvedTheme;
11
- /** True for a string that is one of the three values — what comes out of storage or a URL
12
- * is `string | null`, and this is the way back to `Theme`. */
13
- export declare function isTheme(value: unknown): value is Theme;
3
+ export type { ResolvedTheme, Theme };
4
+ export { isTheme, resolveTheme, THEME_ATTRIBUTE, THEMES };
14
5
  /** Writes the choice on an element. `system` REMOVES the attribute: the stylesheet then
15
6
  * follows `prefers-color-scheme` by itself, and an attribute saying "system" would be a
16
7
  * value no selector reads. Returns nothing; the DOM is the output. */
@@ -39,4 +30,3 @@ export declare function ThemeProvider({ value, defaultValue, onChange, element,
39
30
  * still reads (what `<html>` and the OS say) and `setTheme` writes `<html>` directly, so a
40
31
  * one-off call site works without wrapping the app. */
41
32
  export declare function useTheme(): ThemeValue;
42
- export {};