@multiplatform.one/theme 7.10.0 → 7.15.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 (49) hide show
  1. package/README.md +22 -2
  2. package/package.json +8 -8
  3. package/src/audit/constraintAudit.spec.ts +102 -0
  4. package/src/audit/constraintAudit.ts +78 -33
  5. package/src/figma/figmaTokens.spec.ts +1 -2
  6. package/src/numbers.spec.ts +27 -1
  7. package/src/numbers.ts +40 -0
  8. package/src/theme/Surface.spec.tsx +9 -4
  9. package/src/theme/createDefaultThemeConfig.ts +8 -1
  10. package/src/theme/index.ts +3 -0
  11. package/src/theme/intent.spec.tsx +9 -7
  12. package/src/theme/layoutTokensHooks.spec.tsx +3 -2
  13. package/src/theme/radiusClass.ts +18 -0
  14. package/src/theme/resolveKnobs.spec.ts +73 -7
  15. package/src/theme/resolveKnobs.ts +84 -25
  16. package/src/theme/sizeRecipes.ts +8 -5
  17. package/src/theme/subsetThemes.spec.ts +102 -0
  18. package/src/theme/subsetThemes.ts +56 -0
  19. package/src/theme/theme.tsx +15 -5
  20. package/src/theme/transitionProps.native.ts +15 -0
  21. package/src/theme/transitionProps.spec.ts +14 -0
  22. package/src/theme/transitionProps.ts +16 -0
  23. package/src/theme/useResolvedKnobs.hydration.spec.tsx +141 -0
  24. package/src/theme/useResolvedKnobs.ts +28 -22
  25. package/src/theme/useResolvedKnobsBehavior.spec.tsx +15 -1
  26. package/src/theme/useTouchSurface.ts +8 -0
  27. package/types/audit/constraintAudit.d.ts.map +1 -1
  28. package/types/numbers.d.ts +12 -0
  29. package/types/numbers.d.ts.map +1 -1
  30. package/types/theme/createDefaultThemeConfig.d.ts +7 -0
  31. package/types/theme/createDefaultThemeConfig.d.ts.map +1 -1
  32. package/types/theme/index.d.ts +3 -0
  33. package/types/theme/index.d.ts.map +1 -1
  34. package/types/theme/radiusClass.d.ts +14 -0
  35. package/types/theme/radiusClass.d.ts.map +1 -1
  36. package/types/theme/resolveKnobs.d.ts +23 -1
  37. package/types/theme/resolveKnobs.d.ts.map +1 -1
  38. package/types/theme/sizeRecipes.d.ts +8 -5
  39. package/types/theme/sizeRecipes.d.ts.map +1 -1
  40. package/types/theme/subsetThemes.d.ts +39 -0
  41. package/types/theme/subsetThemes.d.ts.map +1 -0
  42. package/types/theme/theme.d.ts.map +1 -1
  43. package/types/theme/transitionProps.d.ts +14 -0
  44. package/types/theme/transitionProps.d.ts.map +1 -0
  45. package/types/theme/transitionProps.native.d.ts +13 -0
  46. package/types/theme/transitionProps.native.d.ts.map +1 -0
  47. package/types/theme/useResolvedKnobs.d.ts.map +1 -1
  48. package/types/theme/useTouchSurface.d.ts +3 -0
  49. package/types/theme/useTouchSurface.d.ts.map +1 -0
@@ -0,0 +1,141 @@
1
+ // @vitest-environment jsdom
2
+ import { act } from "react";
3
+ import { TestProviders } from "@multiplatform.one/test-utils";
4
+ import { hydrateRoot, type Root } from "react-dom/client";
5
+ import { renderToString } from "react-dom/server";
6
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
7
+ import { useResolvedKnobs } from "./useResolvedKnobs";
8
+
9
+ const host = vi.hoisted(() => {
10
+ vi.stubGlobal("matchMedia", () => ({
11
+ matches: false,
12
+ addEventListener() {},
13
+ removeEventListener() {},
14
+ addListener() {},
15
+ removeListener() {},
16
+ }));
17
+ return { web: true, touch: false };
18
+ });
19
+ vi.mock("@multiplatform.one/platform", async (importOriginal) => ({
20
+ ...(await importOriginal<typeof import("@multiplatform.one/platform")>()),
21
+ get isWeb() {
22
+ return host.web;
23
+ },
24
+ get isTouchable() {
25
+ return !host.web && host.touch;
26
+ },
27
+ get isWebTouchable() {
28
+ return host.web && host.touch;
29
+ },
30
+ }));
31
+
32
+ let reducedMotion = false;
33
+ const motionListeners = new Set<() => void>();
34
+ let root: Root | undefined;
35
+ let container: HTMLDivElement;
36
+ let errors: unknown[];
37
+ let observed: { height: unknown; transition: unknown }[];
38
+
39
+ function Probe() {
40
+ const { knobProps } = useResolvedKnobs();
41
+ const height = knobProps.control.height;
42
+ const transition = knobProps.transition;
43
+ observed.push({ height, transition });
44
+ return (
45
+ <button data-height={String(height)} data-motion={String(transition)}>
46
+ Control
47
+ </button>
48
+ );
49
+ }
50
+
51
+ function Fixture() {
52
+ return (
53
+ <TestProviders>
54
+ <Probe />
55
+ </TestProviders>
56
+ );
57
+ }
58
+
59
+ beforeEach(() => {
60
+ host.web = true;
61
+ host.touch = false;
62
+ reducedMotion = false;
63
+ motionListeners.clear();
64
+ observed = [];
65
+ errors = [];
66
+ vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
67
+ const query = {
68
+ get matches() {
69
+ return reducedMotion;
70
+ },
71
+ addEventListener: (_event: string, listener: () => void) => motionListeners.add(listener),
72
+ removeEventListener: (_event: string, listener: () => void) => motionListeners.delete(listener),
73
+ };
74
+ vi.stubGlobal("matchMedia", () => query);
75
+ vi.spyOn(console, "error").mockImplementation((...args) => errors.push(args));
76
+ container = document.createElement("div");
77
+ document.body.append(container);
78
+ });
79
+
80
+ afterEach(async () => {
81
+ if (root) await act(async () => root?.unmount());
82
+ root = undefined;
83
+ container.remove();
84
+ vi.restoreAllMocks();
85
+ vi.unstubAllGlobals();
86
+ });
87
+
88
+ async function hydrate() {
89
+ await act(async () => {
90
+ root = hydrateRoot(container, <Fixture />, {
91
+ onRecoverableError: (error) => errors.push(error),
92
+ });
93
+ });
94
+ }
95
+
96
+ describe("responsive knob hydration", () => {
97
+ it("keeps server control markup before adopting the browser touch floor", async () => {
98
+ container.innerHTML = renderToString(<Fixture />);
99
+ const serverControl = container.querySelector("button");
100
+ const serverHeight = observed[0].height;
101
+ observed = [];
102
+ host.touch = true;
103
+ await hydrate();
104
+ expect(observed[0].height).toBe(serverHeight);
105
+ expect(container.querySelector("button")).toBe(serverControl);
106
+ expect(container.querySelector("button")?.getAttribute("data-height")).toBe("48");
107
+ expect(errors).toEqual([]);
108
+ });
109
+
110
+ it("hydrates before adopting reduced motion and keeps observing preference changes", async () => {
111
+ container.innerHTML = renderToString(<Fixture />);
112
+ const serverControl = container.querySelector("button");
113
+ const serverTransition = observed[0].transition;
114
+ observed = [];
115
+ reducedMotion = true;
116
+ await hydrate();
117
+ expect(observed[0].transition).toBe(serverTransition);
118
+ expect(container.querySelector("button")).toBe(serverControl);
119
+ expect(container.querySelector("button")?.getAttribute("data-motion")).toBe("undefined");
120
+ expect(motionListeners.size).toBe(1);
121
+ await act(async () => {
122
+ reducedMotion = false;
123
+ for (const listener of motionListeners) listener();
124
+ });
125
+ expect(container.querySelector("button")?.getAttribute("data-motion")).toBe(
126
+ String(serverTransition),
127
+ );
128
+ expect(errors).toEqual([]);
129
+ await act(async () => root?.unmount());
130
+ root = undefined;
131
+ expect(motionListeners.size).toBe(0);
132
+ });
133
+
134
+ it("keeps native touch sizing on its initial render", () => {
135
+ host.web = false;
136
+ host.touch = true;
137
+ container.innerHTML = renderToString(<Fixture />);
138
+ expect(observed[0].height).toBe(48);
139
+ expect(errors).toEqual([]);
140
+ });
141
+ });
@@ -1,5 +1,6 @@
1
- import { createContext, useContext, useEffect, useMemo, useState } from "react";
1
+ import { createContext, useContext, useMemo, useSyncExternalStore } from "react";
2
2
  import { type SizeTokens, useThemeName } from "tamagui";
3
+ import { useTouchSurface } from "./useTouchSurface";
3
4
  import { defaultKnobs, type Knobs } from "./knobs";
4
5
  import type { IntentOverride } from "./preset.types";
5
6
  import type { KnobPropsOverride, ResolvedKnobs } from "./recipes";
@@ -19,27 +20,30 @@ export function useIntentContext(): string | null {
19
20
  return useContext(IntentContext);
20
21
  }
21
22
 
22
- /** OS `prefers-reduced-motion: reduce` — forces animation=none for A-* decorative motion. */
23
+ const reducedMotionQuery = "(prefers-reduced-motion: reduce)";
24
+ const serverReducedMotion = () => false;
25
+
26
+ function readReducedMotion(): boolean {
27
+ return typeof window !== "undefined" && !!window.matchMedia?.(reducedMotionQuery).matches;
28
+ }
29
+
30
+ function subscribeReducedMotion(notify: () => void) {
31
+ if (typeof window === "undefined" || !window.matchMedia) return () => {};
32
+ const mq = window.matchMedia(reducedMotionQuery);
33
+ if (typeof mq.addEventListener === "function") {
34
+ mq.addEventListener("change", notify);
35
+ return () => mq.removeEventListener("change", notify);
36
+ }
37
+ if (typeof mq.addListener === "function") {
38
+ mq.addListener(notify);
39
+ return () => mq.removeListener?.(notify);
40
+ }
41
+ return () => {};
42
+ }
43
+
44
+ /** Adopt the OS motion preference after matching the server's initial markup. */
23
45
  function usePrefersReducedMotion(): boolean {
24
- const [reduced, setReduced] = useState(() => {
25
- if (typeof window === "undefined" || !window.matchMedia) return false;
26
- return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
27
- });
28
- useEffect(() => {
29
- if (typeof window === "undefined" || !window.matchMedia) return;
30
- const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
31
- const handler = () => setReduced(mq.matches);
32
- handler();
33
- if (typeof mq.addEventListener === "function") {
34
- mq.addEventListener("change", handler);
35
- return () => mq.removeEventListener("change", handler);
36
- }
37
- if (typeof mq.addListener === "function") {
38
- mq.addListener(handler);
39
- return () => mq.removeListener?.(handler);
40
- }
41
- }, []);
42
- return reduced;
46
+ return useSyncExternalStore(subscribeReducedMotion, readReducedMotion, serverReducedMotion);
43
47
  }
44
48
 
45
49
  function applySurfaceToKnobs(
@@ -114,6 +118,7 @@ export const solidButtonIntents = new Set(["error", "warning", "success"]);
114
118
  * 9. Call resolveKnobs(mergedKnobs, override, scheme) — override merges last
115
119
  */
116
120
  export function useResolvedKnobs(options?: UseResolvedKnobsOptions): ResolvedKnobs {
121
+ const touch = useTouchSurface();
117
122
  const presetCtx = usePresetContext();
118
123
  const contextIntent = useIntentContext();
119
124
  const prefersReducedMotion = usePrefersReducedMotion();
@@ -188,7 +193,7 @@ export function useResolvedKnobs(options?: UseResolvedKnobsOptions): ResolvedKno
188
193
  merged = { ...merged, animation: "none" };
189
194
  }
190
195
 
191
- const resolved = resolveKnobs(merged, override, scheme);
196
+ const resolved = resolveKnobs(merged, override, scheme, { touch });
192
197
 
193
198
  if (intent && component === "Button" && solidButtonIntents.has(intent)) {
194
199
  const labelColor = merged.fillStyle === "filled" ? "$color" : "$color11";
@@ -213,5 +218,6 @@ export function useResolvedKnobs(options?: UseResolvedKnobsOptions): ResolvedKno
213
218
  surfaceSize,
214
219
  surfaceDensity,
215
220
  scheme,
221
+ touch,
216
222
  ]);
217
223
  }
@@ -1,3 +1,4 @@
1
+ import { TestProviders } from "@multiplatform.one/test-utils";
1
2
  /**
2
3
  * useResolvedKnobs behavior specs — the resolution rules consumers feel but
3
4
  * that aren't covered by the pure resolveKnobs specs: Tamagui size-token →
@@ -6,7 +7,7 @@
6
7
  * rule (filled binds $color, outlined pins $color11).
7
8
  */
8
9
 
9
- import { renderHook } from "@testing-library/react";
10
+ import { renderHook as renderHookBase } from "@testing-library/react";
10
11
  import type { ReactNode } from "react";
11
12
  import { createElement } from "react";
12
13
  import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
@@ -22,6 +23,19 @@ vi.mock(import("tamagui"), async (importOriginal) => ({
22
23
  useThemeName: () => "light",
23
24
  }));
24
25
 
26
+ const renderHook: typeof renderHookBase = (hook, options) => {
27
+ const InnerWrapper = options?.wrapper;
28
+ return renderHookBase(hook, {
29
+ ...options,
30
+ wrapper: ({ children }) =>
31
+ createElement(
32
+ TestProviders,
33
+ null,
34
+ InnerWrapper ? createElement(InnerWrapper, null, children) : children,
35
+ ),
36
+ });
37
+ };
38
+
25
39
  let originalMatchMedia: typeof window.matchMedia;
26
40
 
27
41
  function stubMatchMedia(
@@ -0,0 +1,8 @@
1
+ import { isTouchable, isWeb, isWebTouchable } from "@multiplatform.one/platform";
2
+ import { useDidFinishSSR } from "tamagui";
3
+
4
+ /** Match web SSR before adopting touch geometry. Native applies its floor immediately. */
5
+ export function useTouchSurface(): boolean {
6
+ const didFinishSSR = useDidFinishSSR();
7
+ return (!isWeb || didFinishSSR) && (isTouchable || isWebTouchable);
8
+ }
@@ -1 +1 @@
1
- {"version":3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AE,MAAM,CAAC;QACpB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,CAAC;IACtB,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,EAAE,YAAY,EAAE,CAAC;CAC1B;AA6ED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI9C,CAAC;AAmJF;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,CA8rBrE"}
@@ -54,6 +54,18 @@ export type PercentFormatOptions = NumberFormatOptions;
54
54
  * `undefined` when the symbol has no known code — callers prefix it.
55
55
  */
56
56
  export declare function resolveCurrencyCode(symbol: string | undefined): string | undefined;
57
+ export interface CurrencyAffix {
58
+ glyph: string;
59
+ /** Which side of the amount the locale writes the glyph on. */
60
+ position: "leading" | "trailing";
61
+ }
62
+ /**
63
+ * The glyph a money field writes beside its amount ("$", "€", "₹"), and on
64
+ * which side, for a code or a Frappe-style symbol. The money register's own
65
+ * placement, so an editor and `formatCurrency` agree. A symbol with no known
66
+ * code comes back as itself, leading.
67
+ */
68
+ export declare function currencyAffix(currency: string | undefined, locale?: string): CurrencyAffix | undefined;
57
69
  /**
58
70
  * Cardinal / aggregate register — grouped digits, at most two fraction
59
71
  * digits ("15,400", "5,133.33"). Empty input renders "" and an unparseable
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/numbers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sDAAsD;IACtD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAcvD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIlF;AAyCD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,GAAE,mBAAwB,GAAG,MAAM,CAQ1F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,GAAE,qBAA0B,GAAG,MAAM,CA8B9F;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAK5F"}
1
+ {"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../src/numbers.ts"],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CA8B9F;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,GAAE,oBAAyB,GAAG,MAAM,CAK5F"}
@@ -3,6 +3,7 @@ import { type BaseThemeBuilderDefinition, type CreateThemesBuilderOptions, type
3
3
  import type { Preset } from "./preset.types";
4
4
  import { type SizeRecipeInputs } from "./recipeInputs";
5
5
  import { type ThemeConfig } from "./shared";
6
+ import { type ThemeSubset } from "./subsetThemes";
6
7
  /**
7
8
  * The Tamagui era this theme config resolves against (MPO-19 X13; rendered
8
9
  * reference §12.2 C9 "unpinned theme package"). Every era-bearing default in
@@ -49,6 +50,12 @@ export interface CreateDefaultThemeConfigOptions {
49
50
  * theme-builder).
50
51
  */
51
52
  recipeInputs?: Partial<SizeRecipeInputs>;
53
+ /**
54
+ * Ship only the themes this surface can reach (`10` AC-6). Applied to the
55
+ * built matrix, after `additionalThemes`, so a subset filters which themes
56
+ * exist and never changes what one contains. See `subsetThemes`.
57
+ */
58
+ subset?: ThemeSubset;
52
59
  }
53
60
  /**
54
61
  * Builds a complete Tamagui theme config with batteries included: calling it
@@ -1 +1 @@
1
- {"version":3,"file":"createDefaultThemeConfig.d.ts","sourceRoot":"","sources":["../../src/theme/createDefaultThemeConfig.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE/D,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAE/B,KAAK,sBAAsB,EAE5B,MAAM,gBAAgB,CAAC;AAKxB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,UAAU,CAAC;AAI/D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,EAAG,IAAa,CAAC;AACzC,sDAAsD;AACt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wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,WAAW,CA8Db"}
@@ -30,10 +30,13 @@ export * from "./resolveKnobs";
30
30
  export * from "./shared";
31
31
  export * from "./themeValue";
32
32
  export * from "./sizeRecipes";
33
+ export * from "./subsetThemes";
33
34
  export * from "./Surface";
34
35
  export * from "./tileSizes";
36
+ export * from "./transitionProps";
35
37
  export * from "./theme";
36
38
  export * from "./Tint";
37
39
  export * from "./useResolvedKnobs";
38
40
  export * from "./useTheme";
41
+ export * from "./useTouchSurface";
39
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,YAAY,EAAE,MAAM,IAAI,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjF,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC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AAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -64,6 +64,20 @@ export interface RadiusClassDeclaration {
64
64
  * <Frame {...radiusClassProps("R-IDENTITY", "Avatar")} circular />
65
65
  */
66
66
  export declare function radiusClassProps(radiusClass: KnobImmuneRadiusClass, part: string): RadiusClassDeclaration;
67
+ export interface RadiusResolutionDeclaration {
68
+ "data-radius-resolution": "BINARY";
69
+ }
70
+ /**
71
+ * Declare that a part resolves through the BINARY row (DG-RAD-03), so the
72
+ * constraint audit measures it as 0 or half its own shorter edge. The token
73
+ * scale has no h/2 value, so an undeclared thumb or track reads off-scale at
74
+ * every stop. Spread it only where the painted radius IS the resolved one: a
75
+ * consumer radius override ejects the part from the class.
76
+ *
77
+ * @example
78
+ * <StyledSwitch.Thumb {...radiusResolutionProps("BINARY")} borderRadius={thumbRadius} />
79
+ */
80
+ export declare function radiusResolutionProps(radiusClass: "BINARY"): RadiusResolutionDeclaration;
67
81
  /**
68
82
  * The geometry a doctrine cell may need. `h/2` cells need the part's own
69
83
  * painted height (shorter edge); CONTAINER-CAP cells need the container's own
@@ -1 +1 @@
1
- {"version":3,"file":"radiusClass.d.ts","sourceRoot":"","sources":["../../src/theme/radiusClass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAEL,6BAA6B,EAE7B,KAAK,mBAAmB,EAExB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE5D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;;;OAGG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,MAAM,EAAE,oBAAoB,CAAC;IAC7B,uEAAuE;IACvE,WAAW,EAAE,qBAAqB,CAAC;IACnC,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,kBAAkB,CAkC7F"}
@@ -40,9 +40,31 @@ export declare function resolvePageTitleScale(scale: PageTitleScale): {
40
40
  * while it fits, or the padding px number once the token would exceed it.
41
41
  */
42
42
  export declare function capContainerRadius(borderRadius: Knobs["borderRadius"], space: Knobs["space"]): string | number;
43
+ /** Containers the constraint audit measures against the cap (DG-RAD-04). */
44
+ export type CappedContainer = "PageSection" | "TextArea";
45
+ export interface ContainerCapDeclaration {
46
+ "data-constraint-container": CappedContainer;
47
+ "data-radius-knob": Knobs["borderRadius"];
48
+ "data-space-knob": Knobs["space"];
49
+ }
50
+ /**
51
+ * Declare a container that spreads `containerRadius`, with the knob stops it
52
+ * resolved, so the constraint audit checks its painted corners against
53
+ * `capContainerRadius` for those stops. The cap is a padding px value, not a
54
+ * radius token, so an undeclared capped container reads off-scale at `full`.
55
+ * Returns nothing when `radiusToken` is not a `borderRadiusMap` token or
56
+ * `space` is not a space stop: a part whose radius did not come from the knob
57
+ * makes no claim.
58
+ *
59
+ * @example
60
+ * <YStack {...knobProps.containerRadius} {...containerCapProps("PageSection", knobProps.borderRadius.borderRadius, knobProps.space)} />
61
+ */
62
+ export declare function containerCapProps(container: CappedContainer, radiusToken: unknown, space: string): ContainerCapDeclaration | undefined;
43
63
  export declare const elevationMap: Record<string, string | number | undefined>;
44
64
  export declare const overlayElevationMap: Record<string, string | number | undefined>;
45
65
  /** Scheme the resolver was invoked with. Defaults light so unit tests stay stable. */
46
66
  export type ColorScheme = "light" | "dark";
47
- export declare function resolveKnobs(knobs: Knobs, override?: KnobPropsOverride, scheme?: ColorScheme): ResolvedKnobs;
67
+ export declare function resolveKnobs(knobs: Knobs, override?: KnobPropsOverride, scheme?: ColorScheme, environment?: {
68
+ touch?: boolean;
69
+ }): ResolvedKnobs;
48
70
  //# sourceMappingURL=resolveKnobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/resolveKnobs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,SAAS,CAAC;AAU9D,OAAO,KAAK,EAA8B,KAAK,EAAE,cAAc,EAAc,MAAM,SAAS,CAAC;AAE7F,OAAO,KAAK,EAOV,iBAAiB,EAEjB,aAAa,EAEd,MAAM,WAAW,CAAC;AAKnB;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAI/D,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAIlE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,EAAE,OAAO,GAAG,KAAK,CAU3E;AAID,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC;AAqDX;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,CAErF;AA0BD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,EACnC,KAAK,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AAc,CAAA;CAAE,CAErF;AA0BD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,EACnC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,GACpB,MAAM,GAAG,MAAM,CAIjB;AAED,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,uBAAuB;IACtC,2BAA2B,EAAE,eAAe,CAAC;IAC7C,kBAAkB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1C,iBAAiB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;CACnC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,OAAO,EACpB,KAAK,EAAE,MAAM,GACZ,uBAAuB,GAAG,SAAS,CAUrC;AAuFD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEL,CAAC;AAEjE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEnB,CAAC;AAE1D,sFAAsF;AACtF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AA8O3C,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,QAAQ,CAAC,EAAE,iBAAiB,EAC5B,MAAM,GAAE,WAAqB,EAC7B,WAAW,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAChC,aAAa,CAyNf"}
@@ -68,14 +68,17 @@ export declare function sizeRecipeForToken(token: string, options?: {
68
68
  /**
69
69
  * Identity helper for the LC-65 SIZE-RECIPE ESCAPE lint
70
70
  * (`scripts/lint-conventions.mjs`). Wrap a numeric height / minHeight /
71
- * paddingHorizontal / fontSize that must stay a literal:
71
+ * paddingHorizontal / fontSize that must stay a literal, and say why:
72
72
  *
73
- * height={sizeRecipeEscape(20)}
73
+ * height={sizeRecipeEscape(20, "toolbar chrome match")}
74
74
  *
75
- * Or comment `// size-recipe-escape:` on the previous line or same
76
- * statement. Pilot: Button/, InputParts/, fields/Select/.
75
+ * Or write the same reason in a `size-recipe-escape:` line comment on the
76
+ * previous line or same statement. Pilot: Button/, InputParts/,
77
+ * fields/Select/. Either way the file and the reason must be a row in
78
+ * `docs/theme-propagation-spec.md` `## Size-recipe escapes` (MPO-23, `00` L8
79
+ * E8); an undeclared escape fails `lint-conventions`.
77
80
  */
78
- export declare function sizeRecipeEscape<T>(value: T): T;
81
+ export declare function sizeRecipeEscape<T>(value: T, _reason?: string): T;
79
82
  /**
80
83
  * LC-84 TEXT-INSET — optical vertical inset of a text field, never larger
81
84
  * than the recipe padX. Extra horizontal space is legal only when an icon
@@ -1 +1 @@
1
- {"version":3,"file":"sizeRecipes.d.ts","sourceRoot":"","sources":["../../src/theme/sizeRecipes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,gCAAgC,EAChC,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,oB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AC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,gBAAgB,CAAA;CAAE,GAC1E,UAAU,CAKZ;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAEjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,mBAAmB,GAAG,UAAU,CAAC,GACpE,MAAM,CAER"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The themes one surface can reach (`10` AC-6, MPO-23).
3
+ *
4
+ * Themes are emitted into the served document as CSS, so a surface pays for
5
+ * every theme it will never enter. shc measured it on the live storefront:
6
+ * 721,818 of 1,232,058 decompressed bytes were the theme sheet, 921 classes of
7
+ * which the rendered routes asked for seven, and building the same house
8
+ * config over a named subset cut the sheet from 697,788 to 186,158 bytes
9
+ * (`shc/packages/themes/storefront.ts`). This is that subset as a pure
10
+ * function over the built matrix, so every app can do it the same way.
11
+ *
12
+ * It filters WHICH themes exist, never what a theme contains: `$color5` means
13
+ * the same thing in every theme that survives. A subset is a loaded gun, all
14
+ * the same. A component whose sub-theme was dropped does not crash, it renders
15
+ * in its parent's colours, so list everything the surface renders.
16
+ */
17
+ export interface ThemeSubset {
18
+ /**
19
+ * Component sub-themes the surface renders, by Tamagui componentName
20
+ * (`Button`, `Input`, `ListItem`, `SelectTrigger`, …). Tamagui enters one
21
+ * by rendering the component, so this is "which components exist on this
22
+ * surface", not a style choice.
23
+ */
24
+ components: readonly string[];
25
+ /**
26
+ * Named themes the surface can enter beside the bare `light`/`dark`
27
+ * schemes: `accent`, the semantic children (`error`, `success`,
28
+ * `warning`), Tamagui's state children (`active`, `alt1`, `alt2`), and any
29
+ * decorative hue a `theme="…"` or `<Theme name="…">` on the surface names.
30
+ */
31
+ tints: readonly string[];
32
+ }
33
+ /**
34
+ * Keep a theme when its component suffix (if any) is in `components` and
35
+ * every other non-scheme segment of its name is in `tints`. Names are
36
+ * `[light|dark_]<tint>*[_Component]`, so `light` and `dark` always survive.
37
+ */
38
+ export declare function subsetThemes<T>(themes: Record<string, T>, subset: ThemeSubset): Record<string, T>;
39
+ //# sourceMappingURL=subsetThemes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subsetThemes.d.ts","sourceRoot":"","sources":["../../src/theme/subsetThemes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;OAKG;IACH,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;;OAKG;IACH,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAID;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAejG"}
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,kBAAkB,EAAmB,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC9F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAS/C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAkB5D;AAMD,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IAChF,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,cAAc,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAMD,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC1D,QAAQ,EACR,MAAM,EACN,WAAqB,EACrB,GAAG,YAAY,EAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAiFvB"}
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/theme/theme.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EAE1B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAS/C;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,IAAI,GAAG,IAAI,CAkB5D;AAMD,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CACjD,SAAQ,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,cAAc,CAAC,CAAC;IAChF,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,UAAU,CAAC,cAAc,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAChC;AAMD,wBAAgB,aAAa,CAAC,CAAC,SAAS,kBAAkB,EAAE,EAC1D,QAAQ,EACR,MAAM,EACN,WAAqB,EACrB,GAAG,YAAY,EAChB,EAAE,kBAAkB,CAAC,CAAC,CAAC,2CAsFvB"}
@@ -0,0 +1,14 @@
1
+ import type { TransitionProp } from "tamagui";
2
+ /**
3
+ * Spreadable `transition` for a part that rides the animation knob.
4
+ *
5
+ * Tamagui decides whether a component runs its animation hooks from
6
+ * `"transition" in props`, so a part that drops the key at animation `none`
7
+ * throws "Rendered more hooks than during the previous render" the moment the
8
+ * knob flips to any other stop (MPO-327). On web the key therefore stays, and
9
+ * an undefined value paints no CSS transition. The native twin differs.
10
+ */
11
+ export declare function transitionProps(transition: TransitionProp | undefined): {
12
+ transition?: TransitionProp;
13
+ };
14
+ //# sourceMappingURL=transitionProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transitionProps.d.ts","sourceRoot":"","sources":["../../src/theme/transitionProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,GAAG;IACvE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAEA"}
@@ -0,0 +1,13 @@
1
+ import type { TransitionProp } from "tamagui";
2
+ /**
3
+ * Native twin of `transitionProps.ts`.
4
+ *
5
+ * The React Native driver resolves an undefined `transition` to an empty
6
+ * config and animates with a default spring (LC-59), so keeping the key at
7
+ * animation `none` would put motion on every part that is meant to be still.
8
+ * Native keeps omitting it until the driver has an instant token to pass.
9
+ */
10
+ export declare function transitionProps(transition: TransitionProp | undefined): {
11
+ transition?: TransitionProp;
12
+ };
13
+ //# sourceMappingURL=transitionProps.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transitionProps.native.d.ts","sourceRoot":"","sources":["../../src/theme/transitionProps.native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,GAAG;IACvE,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B,CAEA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useResolvedKnobs.d.ts","sourceRoot":"","sources":["../../src/theme/useResolvedKnobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,S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AC,EAAE,uBAAuB,GAAG,aAAa,CAuGjF"}
@@ -0,0 +1,3 @@
1
+ /** Match web SSR before adopting touch geometry. Native applies its floor immediately. */
2
+ export declare function useTouchSurface(): boolean;
3
+ //# sourceMappingURL=useTouchSurface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTouchSurface.d.ts","sourceRoot":"","sources":["../../src/theme/useTouchSurface.ts"],"names":[],"mappings":"AAGA,0FAA0F;AAC1F,wBAAgB,eAAe,IAAI,OAAO,CAGzC"}