@multiplatform.one/theme 6.0.4 → 6.3.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 (187) hide show
  1. package/README.md +73 -0
  2. package/package.json +22 -9
  3. package/src/dates.spec.ts +75 -0
  4. package/src/dates.ts +130 -0
  5. package/src/devWarn.spec.ts +144 -0
  6. package/src/devWarn.ts +235 -0
  7. package/src/figma/figmaTokens.spec.ts +244 -0
  8. package/src/figma/figmaTokens.ts +503 -0
  9. package/src/font.ts +6 -8
  10. package/src/fonts/createFontLoader.web.ts +15 -4
  11. package/src/index.ts +7 -0
  12. package/src/keyboardFocusRing.ts +45 -0
  13. package/src/menuRow.spec.ts +32 -0
  14. package/src/menuRow.ts +31 -0
  15. package/src/theme/FontKnobStyles.native.tsx +24 -0
  16. package/src/theme/FontKnobStyles.tsx +256 -0
  17. package/src/theme/animations/reactNative.ts +6 -1
  18. package/src/theme/chartPalette.spec.ts +159 -0
  19. package/src/theme/chartPalette.ts +170 -0
  20. package/src/theme/colorRules.ts +33 -1
  21. package/src/theme/cookies.spec.ts +32 -0
  22. package/src/theme/cookiesPersistence.spec.ts +86 -0
  23. package/src/theme/cornerSmoothing.native.ts +16 -0
  24. package/src/theme/cornerSmoothing.spec.ts +27 -0
  25. package/src/theme/cornerSmoothing.ts +46 -0
  26. package/src/theme/createDefaultThemeConfig.ts +32 -8
  27. package/src/theme/createThemeConfig.spec.ts +137 -0
  28. package/src/theme/createThemes.ts +77 -2
  29. package/src/theme/defaults/accent.ts +39 -0
  30. package/src/theme/defaults/base.ts +63 -0
  31. package/src/theme/defaults/builderOptions.ts +174 -0
  32. package/src/theme/defaults/fonts.spec.ts +87 -0
  33. package/src/theme/defaults/fonts.ts +89 -0
  34. package/src/theme/defaults/index.ts +4 -0
  35. package/src/theme/devtools/ThemeDevtoolsPanel.tsx +196 -2
  36. package/src/theme/devtools/buildSnapshot.ts +11 -0
  37. package/src/theme/devtools/knobIcons.tsx +141 -0
  38. package/src/theme/devtools/vizConstants.ts +1 -1
  39. package/src/theme/focusState.spec.ts +174 -0
  40. package/src/theme/focusState.ts +112 -0
  41. package/src/theme/fontKnobStyles.spec.ts +98 -0
  42. package/src/theme/hairline.native.ts +43 -0
  43. package/src/theme/hairline.spec.ts +63 -0
  44. package/src/theme/hairline.ts +101 -0
  45. package/src/theme/index.ts +8 -0
  46. package/src/theme/intent.spec.tsx +2 -2
  47. package/src/theme/intents.ts +6 -2
  48. package/src/theme/knobs.ts +134 -2
  49. package/src/theme/layoutTokens.spec.ts +75 -0
  50. package/src/theme/layoutTokens.ts +213 -0
  51. package/src/theme/layoutTokensHooks.spec.tsx +157 -0
  52. package/src/theme/presets.spec.ts +17 -0
  53. package/src/theme/presets.ts +22 -2
  54. package/src/theme/readableColor.ts +101 -0
  55. package/src/theme/recipes.ts +130 -7
  56. package/src/theme/resolveKnobs.spec.ts +560 -21
  57. package/src/theme/resolveKnobs.ts +267 -23
  58. package/src/theme/shared.tsx +26 -2
  59. package/src/theme/useResolvedKnobs.ts +67 -26
  60. package/src/theme/useResolvedKnobsBehavior.spec.tsx +166 -0
  61. package/types/audit/constraintAudit.d.ts +83 -0
  62. package/types/audit/constraintAudit.d.ts.map +1 -0
  63. package/types/audit/diffReport.d.ts +45 -0
  64. package/types/audit/diffReport.d.ts.map +1 -0
  65. package/types/audit/index.d.ts +5 -0
  66. package/types/audit/index.d.ts.map +1 -0
  67. package/types/dates.d.ts +52 -0
  68. package/types/dates.d.ts.map +1 -0
  69. package/types/devWarn.d.ts +104 -0
  70. package/types/devWarn.d.ts.map +1 -0
  71. package/types/figma/figmaTokens.d.ts +168 -0
  72. package/types/figma/figmaTokens.d.ts.map +1 -0
  73. package/types/font.d.ts +5 -0
  74. package/types/font.d.ts.map +1 -0
  75. package/types/fonts/createFontLoader.d.ts +3 -0
  76. package/types/fonts/createFontLoader.d.ts.map +1 -0
  77. package/types/fonts/createFontLoader.web.d.ts +3 -0
  78. package/types/fonts/createFontLoader.web.d.ts.map +1 -0
  79. package/types/fonts/index.d.ts +3 -0
  80. package/types/fonts/index.d.ts.map +1 -0
  81. package/types/fonts/types.d.ts +12 -0
  82. package/types/fonts/types.d.ts.map +1 -0
  83. package/types/index.d.ts +9 -0
  84. package/types/index.d.ts.map +1 -0
  85. package/types/keyboardFocusRing.d.ts +32 -0
  86. package/types/keyboardFocusRing.d.ts.map +1 -0
  87. package/types/menuRow.d.ts +32 -0
  88. package/types/menuRow.d.ts.map +1 -0
  89. package/types/theme/FontKnobStyles.d.ts +49 -0
  90. package/types/theme/FontKnobStyles.d.ts.map +1 -0
  91. package/types/theme/FontKnobStyles.native.d.ts +12 -0
  92. package/types/theme/FontKnobStyles.native.d.ts.map +1 -0
  93. package/types/theme/Intent.d.ts +20 -0
  94. package/types/theme/Intent.d.ts.map +1 -0
  95. package/types/theme/Preset.d.ts +15 -0
  96. package/types/theme/Preset.d.ts.map +1 -0
  97. package/types/theme/PresetContext.d.ts +18 -0
  98. package/types/theme/PresetContext.d.ts.map +1 -0
  99. package/types/theme/Tint.d.ts +19 -0
  100. package/types/theme/Tint.d.ts.map +1 -0
  101. package/types/theme/animations/css.d.ts +24 -0
  102. package/types/theme/animations/css.d.ts.map +1 -0
  103. package/types/theme/animations/index.d.ts +2 -0
  104. package/types/theme/animations/index.d.ts.map +1 -0
  105. package/types/theme/animations/index.web.d.ts +2 -0
  106. package/types/theme/animations/index.web.d.ts.map +1 -0
  107. package/types/theme/animations/reactNative.d.ts +104 -0
  108. package/types/theme/animations/reactNative.d.ts.map +1 -0
  109. package/types/theme/chartPalette.d.ts +62 -0
  110. package/types/theme/chartPalette.d.ts.map +1 -0
  111. package/types/theme/colorRules.d.ts +69 -0
  112. package/types/theme/colorRules.d.ts.map +1 -0
  113. package/types/theme/cookies.d.ts +76 -0
  114. package/types/theme/cookies.d.ts.map +1 -0
  115. package/types/theme/cornerSmoothing.d.ts +31 -0
  116. package/types/theme/cornerSmoothing.d.ts.map +1 -0
  117. package/types/theme/cornerSmoothing.native.d.ts +14 -0
  118. package/types/theme/cornerSmoothing.native.d.ts.map +1 -0
  119. package/types/theme/createDefaultThemeConfig.d.ts +37 -0
  120. package/types/theme/createDefaultThemeConfig.d.ts.map +1 -0
  121. package/types/theme/createThemes.d.ts +38 -0
  122. package/types/theme/createThemes.d.ts.map +1 -0
  123. package/types/theme/defaults/accent.d.ts +3 -0
  124. package/types/theme/defaults/accent.d.ts.map +1 -0
  125. package/types/theme/defaults/base.d.ts +3 -0
  126. package/types/theme/defaults/base.d.ts.map +1 -0
  127. package/types/theme/defaults/builderOptions.d.ts +3 -0
  128. package/types/theme/defaults/builderOptions.d.ts.map +1 -0
  129. package/types/theme/defaults/fonts.d.ts +7 -0
  130. package/types/theme/defaults/fonts.d.ts.map +1 -0
  131. package/types/theme/defaults/index.d.ts +5 -0
  132. package/types/theme/defaults/index.d.ts.map +1 -0
  133. package/types/theme/devtools/ColorLineVisualizer.d.ts +17 -0
  134. package/types/theme/devtools/ColorLineVisualizer.d.ts.map +1 -0
  135. package/types/theme/devtools/ThemeDevtoolsPanel.d.ts +87 -0
  136. package/types/theme/devtools/ThemeDevtoolsPanel.d.ts.map +1 -0
  137. package/types/theme/devtools/buildSnapshot.d.ts +12 -0
  138. package/types/theme/devtools/buildSnapshot.d.ts.map +1 -0
  139. package/types/theme/devtools/knobIcons.d.ts +33 -0
  140. package/types/theme/devtools/knobIcons.d.ts.map +1 -0
  141. package/types/theme/devtools/vizConstants.d.ts +5 -0
  142. package/types/theme/devtools/vizConstants.d.ts.map +1 -0
  143. package/types/theme/focusState.d.ts +42 -0
  144. package/types/theme/focusState.d.ts.map +1 -0
  145. package/types/theme/hairline.d.ts +88 -0
  146. package/types/theme/hairline.d.ts.map +1 -0
  147. package/types/theme/hairline.native.d.ts +42 -0
  148. package/types/theme/hairline.native.d.ts.map +1 -0
  149. package/types/theme/index.d.ts +29 -0
  150. package/types/theme/index.d.ts.map +1 -0
  151. package/types/theme/intents.d.ts +3 -0
  152. package/types/theme/intents.d.ts.map +1 -0
  153. package/types/theme/knobs.d.ts +236 -0
  154. package/types/theme/knobs.d.ts.map +1 -0
  155. package/types/theme/layoutTokens.d.ts +104 -0
  156. package/types/theme/layoutTokens.d.ts.map +1 -0
  157. package/types/theme/preset.types.d.ts +21 -0
  158. package/types/theme/preset.types.d.ts.map +1 -0
  159. package/types/theme/presets.d.ts +4 -0
  160. package/types/theme/presets.d.ts.map +1 -0
  161. package/types/theme/readableColor.d.ts +17 -0
  162. package/types/theme/readableColor.d.ts.map +1 -0
  163. package/types/theme/recipes.d.ts +200 -0
  164. package/types/theme/recipes.d.ts.map +1 -0
  165. package/types/theme/resolveKnobs.d.ts +22 -0
  166. package/types/theme/resolveKnobs.d.ts.map +1 -0
  167. package/types/theme/shared.d.ts +40 -0
  168. package/types/theme/shared.d.ts.map +1 -0
  169. package/types/theme/theme.d.ts +19 -0
  170. package/types/theme/theme.d.ts.map +1 -0
  171. package/types/theme/theme.native.d.ts +10 -0
  172. package/types/theme/theme.native.d.ts.map +1 -0
  173. package/types/theme/useColorScale.d.ts +7 -0
  174. package/types/theme/useColorScale.d.ts.map +1 -0
  175. package/types/theme/useColorScale.native.d.ts +6 -0
  176. package/types/theme/useColorScale.native.d.ts.map +1 -0
  177. package/types/theme/useResolvedKnobs.d.ts +32 -0
  178. package/types/theme/useResolvedKnobs.d.ts.map +1 -0
  179. package/types/theme/useTheme.d.ts +31 -0
  180. package/types/theme/useTheme.d.ts.map +1 -0
  181. package/types/theme/useTheme.native.d.ts +10 -0
  182. package/types/theme/useTheme.native.d.ts.map +1 -0
  183. package/CHANGELOG.md +0 -46
  184. package/src/theme/__snapshots__/resolveKnobs.spec.ts.snap +0 -69
  185. package/src/theme/pokemonScreen.spec.ts +0 -109
  186. package/tsconfig.json +0 -11
  187. package/vitest.config.mjs +0 -9
@@ -0,0 +1,3 @@
1
+ import type { FontLoader, FontLoaderConfig } from "./types";
2
+ export declare function createFontLoader(config: FontLoaderConfig): FontLoader;
3
+ //# sourceMappingURL=createFontLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFontLoader.d.ts","sourceRoot":"","sources":["../../src/fonts/createFontLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CAYrE"}
@@ -0,0 +1,3 @@
1
+ import type { FontLoader, FontLoaderConfig } from "./types";
2
+ export declare function createFontLoader(_config: FontLoaderConfig): FontLoader;
3
+ //# sourceMappingURL=createFontLoader.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFontLoader.web.d.ts","sourceRoot":"","sources":["../../src/fonts/createFontLoader.web.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,UAAU,CAiBtE"}
@@ -0,0 +1,3 @@
1
+ export * from "./createFontLoader";
2
+ export * from "./types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface FontEntry {
2
+ family: string;
3
+ nativeModule?: number;
4
+ }
5
+ export interface FontLoaderConfig {
6
+ fonts: FontEntry[];
7
+ inter?: boolean;
8
+ }
9
+ export interface FontLoader {
10
+ importFonts: () => Record<string, number>;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/fonts/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,9 @@
1
+ export * from "./theme/index";
2
+ export * from "./dates";
3
+ export * from "./devWarn";
4
+ export * from "./keyboardFocusRing";
5
+ export * from "./menuRow";
6
+ export * from "./font";
7
+ export * from "./fonts/index";
8
+ export type { GenericFonts, MediaQueryKey, ThemeName } from "@tamagui/web";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAG9B,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Keyboard-modality tracker for manual focus-ring painting (web only).
3
+ *
4
+ * Group widgets built on roving/redirected focus (tamagui Tabs, ToggleGroup,
5
+ * Group-wrapped button strips) move focus from the container to the current
6
+ * item inside a focusin handler. Chromium drops keyboard modality on that
7
+ * script-initiated focus, so neither CSS :focus-visible nor tamagui's
8
+ * focusVisibleStyle fire for the redirected item — keyboard users get no
9
+ * ring (DG-A11Y-01). Components track modality with these helpers and paint
10
+ * the ring themselves on keyboard-origin focus.
11
+ */
12
+ /**
13
+ * Install the global modality listeners. Call during render of any component
14
+ * that uses `wasKeyboardFocus`, so the tracker is live before the first
15
+ * keystroke reaches the widget. Idempotent; no-op on native/SSR.
16
+ */
17
+ export declare function ensureKeyboardModalityTracking(): void;
18
+ /**
19
+ * True when the most recent user input was a key press. Call from onFocus to
20
+ * decide whether the focused element should paint a keyboard focus ring.
21
+ * Installs the global listeners on first use; safe to call on native (always
22
+ * false) and during SSR.
23
+ */
24
+ export declare function wasKeyboardFocus(): boolean;
25
+ /** Standard manual ring props (mirrors the focusVisibleStyle contract). */
26
+ export declare const keyboardFocusRingProps: {
27
+ readonly outlineColor: "$outlineColor";
28
+ readonly outlineWidth: 2;
29
+ readonly outlineStyle: "solid";
30
+ readonly outlineOffset: -2;
31
+ };
32
+ //# sourceMappingURL=keyboardFocusRing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboardFocusRing.d.ts","sourceRoot":"","sources":["../src/keyboardFocusRing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH;;;;GAIG;AACH,wBAAgB,8BAA8B,SAK7C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C;AAED,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB;;;;;CAKzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * LC-16 ONE-IMPLEMENTATION — the shared menu-row frame geometry.
3
+ *
4
+ * One geometry recipe for every menu/listbox row (DropdownMenu `ItemRow`,
5
+ * Select `SelectRow`, MentionInput `MentionSuggestionItem`): the row spans
6
+ * the full overlay width (edge-to-edge highlight, SP-EDGE), owns its
7
+ * horizontal padding, keeps flat corners (the overlay container clips to the
8
+ * radius knob), and suppresses the focus outline — the row surface highlight
9
+ * IS the focus/active indicator.
10
+ *
11
+ * It lives in `@multiplatform.one/theme` (not `components`) because the
12
+ * dependency direction is `components` → `forms` → `theme`; the two forms
13
+ * consumers cannot import `components` without a cycle.
14
+ *
15
+ * Deliberately NOT part of the recipe — each consumer owns it, by design:
16
+ * - color ramps: menus highlight with `componentColors.interactive.*`,
17
+ * form fields with `formInputColors.background.*` (package-boundary rule);
18
+ * - cursor: `pointer` for menu items, `default` for listbox options;
19
+ * - vertical sizing: height/minHeight from the size token, or row padding;
20
+ * - in-row gap and the state-variant model (selected/active/disabled).
21
+ */
22
+ export declare const menuRowFrame: {
23
+ readonly flexDirection: "row";
24
+ readonly alignItems: "center";
25
+ readonly width: "100%";
26
+ readonly paddingHorizontal: "$3";
27
+ readonly borderRadius: 0;
28
+ readonly userSelect: "none";
29
+ readonly backgroundColor: "transparent";
30
+ readonly outlineStyle: any;
31
+ };
32
+ //# sourceMappingURL=menuRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menuRow.d.ts","sourceRoot":"","sources":["../src/menuRow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY;;;;;;;;2BAQC,GAAG;CACnB,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { FontCategory } from "./knobs";
2
+ /**
3
+ * Per-category legibility floors, applied on top of the base (Inter-tuned)
4
+ * lineHeight tables when the heading/body knob selects that category.
5
+ * `heading`/`body` are minimum lineHeight:fontSize ratios; `letterSpacing:
6
+ * "neutral"` zeroes Inter's tracking-by-size curve (wrong for fixed-pitch
7
+ * and connected-script families). "sans-serif" is the default scope (never
8
+ * overridden), listed for completeness.
9
+ */
10
+ export declare const fontCategoryMetrics: Record<FontCategory, {
11
+ heading: number;
12
+ body: number;
13
+ letterSpacing: "inherit" | "neutral";
14
+ }>;
15
+ /** Numeric font tables for a purpose font, keyed WITHOUT the `$` prefix. */
16
+ export interface FontScopeTables {
17
+ size: Record<string, number>;
18
+ lineHeight: Record<string, number>;
19
+ letterSpacing?: Record<string, number>;
20
+ }
21
+ /**
22
+ * Resolve the concrete font-family stack registered in the Tamagui config for
23
+ * a font category. Returns undefined when the category font is not registered
24
+ * (the caller then leaves the default family in place).
25
+ */
26
+ export declare function getConfiguredFontFamily(category: FontCategory): string | undefined;
27
+ /**
28
+ * Read the numeric size/lineHeight/letterSpacing tables of the `$heading` /
29
+ * `$body` purpose font from the Tamagui config, keys normalized without the
30
+ * `$` prefix (matching the emitted `--f-lineHeight-<key>` CSS var names).
31
+ * Returns undefined outside a configured Tamagui runtime (unit tests, SSR
32
+ * before setup) — callers then emit family-only overrides.
33
+ */
34
+ export declare function getConfiguredFontTables(scope: "heading" | "body"): FontScopeTables | undefined;
35
+ /**
36
+ * Build the CSS override for the current headingFont/bodyFont knob values.
37
+ * Always emits the zero-specificity default-leading rules (unsized scoped
38
+ * text must meet the active category's line-height floor — LC-11); family
39
+ * and per-size overrides are added for non-default categories. Exported for
40
+ * unit testing.
41
+ */
42
+ export declare function buildFontKnobCss(headingFont: FontCategory, bodyFont: FontCategory, resolveFamily?: (category: FontCategory) => string | undefined, resolveTables?: (scope: "heading" | "body") => FontScopeTables | undefined): string;
43
+ /**
44
+ * Mount ONCE near the root (inside the Preset/PresetContext provider). Reads
45
+ * the active headingFont/bodyFont knobs and syncs a `<style>` override so all
46
+ * `$heading`/`$body` text follows the knobs. Renders nothing.
47
+ */
48
+ export declare function FontKnobStyles(): null;
49
+ //# sourceMappingURL=FontKnobStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontKnobStyles.d.ts","sourceRoot":"","sources":["../../src/theme/FontKnobStyles.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAM5C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CACtC,YAAY,EACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,CAgBxE,CAAC;AAqBF,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAelF;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,GAAG,eAAe,GAAG,SAAS,CAgC9F;AAkCD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,YAAY,EACzB,QAAQ,EAAE,YAAY,EACtB,aAAa,GAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,MAAM,GAAG,SAAmC,EACvF,aAAa,GAAE,CACb,KAAK,EAAE,SAAS,GAAG,MAAM,KACtB,eAAe,GAAG,SAAmC,GACzD,MAAM,CAkBR;AAED;;;;GAIG;AACH,wBAAgB,cAAc,SAgC7B"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Native no-op. React Native has no CSS variables, so the web-only
3
+ * `.font_heading` / `.font_body` --f-family override cannot apply. On native,
4
+ * components consume the font knobs through `knobProps.heading` /
5
+ * `knobProps.body` from useResolvedKnobs (see e.g. public/components
6
+ * layouts/page.tsx).
7
+ */
8
+ import type { FontCategory } from "./knobs";
9
+ export declare function getConfiguredFontFamily(_category: FontCategory): string | undefined;
10
+ export declare function buildFontKnobCss(_headingFont: FontCategory, _bodyFont: FontCategory, _resolveFamily?: (category: FontCategory) => string | undefined): string;
11
+ export declare function FontKnobStyles(): null;
12
+ //# sourceMappingURL=FontKnobStyles.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontKnobStyles.native.d.ts","sourceRoot":"","sources":["../../src/theme/FontKnobStyles.native.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAEnF;AAED,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,YAAY,EACvB,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,MAAM,GAAG,SAAS,GAC9D,MAAM,CAER;AAED,wBAAgB,cAAc,SAE7B"}
@@ -0,0 +1,20 @@
1
+ import type { PropsWithChildren } from "react";
2
+ import type { ThemeName } from "@tamagui/web";
3
+ export interface IntentProps extends PropsWithChildren {
4
+ /** Intent name. */
5
+ name: "accent" | "error" | "warning" | "success";
6
+ /** Override the default Tamagui theme for this intent. */
7
+ theme?: ThemeName;
8
+ }
9
+ /**
10
+ * Wraps children with an intent context and corresponding Tamagui theme.
11
+ *
12
+ * Dual responsibility:
13
+ * 1. Layer 1 (color): Activates Tamagui sub-theme (intent name or explicit theme prop)
14
+ * 2. Layer 2 (structure): Provides intent name via context so useResolvedKnobs can merge overrides
15
+ *
16
+ * If both wrapper and component prop are present, component prop wins.
17
+ * Nesting intents replaces (does not merge) — innermost wins.
18
+ */
19
+ export declare function Intent({ name, theme, children }: IntentProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=Intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Intent.d.ts","sourceRoot":"","sources":["../../src/theme/Intent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD,mBAAmB;IACnB,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAO5D"}
@@ -0,0 +1,15 @@
1
+ import { type PropsWithChildren } from "react";
2
+ import type { ThemeName } from "@tamagui/web";
3
+ import { type Knobs } from "./knobs";
4
+ export interface PresetProps extends PropsWithChildren {
5
+ /** Named preset to apply. Looked up from the preset registry. */
6
+ preset?: string;
7
+ /** Tamagui theme name (e.g. "blue", "red"). Wraps children in <Theme />. */
8
+ theme?: ThemeName;
9
+ /** Partial knob overrides merged on top of the preset's knobs. */
10
+ overrides?: Partial<Knobs>;
11
+ /** When true (default), inherits from parent Preset. When false, replaces entirely. */
12
+ cascade?: boolean;
13
+ }
14
+ export declare function Preset({ children, preset: presetName, theme, overrides, cascade, }: PresetProps): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=Preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preset.d.ts","sourceRoot":"","sources":["../../src/theme/Preset.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,SAAS,CAAC;AAInD,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3B,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,SAAS,EACT,OAAc,GACf,EAAE,WAAW,2CAmEb"}
@@ -0,0 +1,18 @@
1
+ import type { Knobs } from "./knobs";
2
+ import type { Preset } from "./preset.types";
3
+ import type { ThemeName } from "@tamagui/web";
4
+ export interface PresetContextValue {
5
+ preset: Preset;
6
+ overrides?: Partial<Knobs>;
7
+ }
8
+ export declare const PresetContext: import("react").Context<PresetContextValue | null>;
9
+ /**
10
+ * Read the nearest Preset context. Returns null if no <Preset> ancestor exists.
11
+ */
12
+ export declare function usePresetContext(): PresetContextValue | null;
13
+ /**
14
+ * Read the tints array from the nearest Preset context.
15
+ * Returns an empty array if no <Preset> ancestor exists.
16
+ */
17
+ export declare function usePresetTints(): ThemeName[];
18
+ //# sourceMappingURL=PresetContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PresetContext.d.ts","sourceRoot":"","sources":["../../src/theme/PresetContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,SAAS,EAAE,CAG5C"}
@@ -0,0 +1,19 @@
1
+ import { type PropsWithChildren } from "react";
2
+ export interface TintProps extends PropsWithChildren {
3
+ /** Extra offset beyond the normal +1 nesting increment. Default 0. */
4
+ alt?: number;
5
+ /** Disable tinting (renders children without a Theme wrapper). */
6
+ disable?: boolean;
7
+ }
8
+ /**
9
+ * Depth-based tint component. Each nesting level increments the depth
10
+ * and selects a tint from the preset's tints array via modulo.
11
+ *
12
+ * Applies a tint sub-theme based on nesting depth.
13
+ */
14
+ export declare function Tint({ children, alt, disable, ...props }: TintProps): import("react/jsx-runtime").JSX.Element;
15
+ /**
16
+ * Read the current tint depth from context.
17
+ */
18
+ export declare function useTintDepth(): number;
19
+ //# sourceMappingURL=Tint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tint.d.ts","sourceRoot":"","sources":["../../src/theme/Tint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AAM1E,MAAM,WAAW,SAAU,SAAQ,iBAAiB;IAClD,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAO,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAiBvE;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
@@ -0,0 +1,24 @@
1
+ export declare const animationConfig: {
2
+ readonly bouncy: "ease-in 200ms";
3
+ readonly lazy: "ease-in 600ms";
4
+ readonly slow: "ease-in 500ms";
5
+ readonly medium: "ease-in-out 250ms";
6
+ readonly quick: "ease-in 100ms";
7
+ readonly tooltip: "ease-in 400ms";
8
+ readonly snappy: "ease-out 80ms";
9
+ readonly gentle: "ease-in-out 450ms";
10
+ };
11
+ export type AnimationName = keyof typeof animationConfig;
12
+ export declare const animationNames: AnimationName[];
13
+ export declare const animations: import("@tamagui/web").AnimationDriver<{
14
+ readonly bouncy: "ease-in 200ms";
15
+ readonly lazy: "ease-in 600ms";
16
+ readonly slow: "ease-in 500ms";
17
+ readonly medium: "ease-in-out 250ms";
18
+ readonly quick: "ease-in 100ms";
19
+ readonly tooltip: "ease-in 400ms";
20
+ readonly snappy: "ease-out 80ms";
21
+ readonly gentle: "ease-in-out 450ms";
22
+ }>;
23
+ export declare const animationDurations: Record<AnimationName, number>;
24
+ //# sourceMappingURL=css.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../../src/theme/animations/css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;CASlB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,eAAe,CAAC;AACzD,eAAO,MAAM,cAAc,EAAmC,aAAa,EAAE,CAAC;AAC9E,eAAO,MAAM,UAAU;;;;;;;;;EAAoC,CAAC;AAO5D,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAE3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./reactNative";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/theme/animations/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./css";
2
+ //# sourceMappingURL=index.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/theme/animations/index.web.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Canonical spring vocabulary. Exported so native gesture code can drive
3
+ * RN `Animated.spring` (which provides completion callbacks) with the exact
4
+ * same physics as Tamagui's `transition` tokens — one closed vocabulary.
5
+ */
6
+ export declare const animationConfig: {
7
+ readonly bouncy: {
8
+ readonly type: "spring";
9
+ readonly damping: 9;
10
+ readonly mass: 0.9;
11
+ readonly stiffness: 150;
12
+ };
13
+ readonly lazy: {
14
+ readonly type: "spring";
15
+ readonly damping: 18;
16
+ readonly stiffness: 50;
17
+ };
18
+ readonly slow: {
19
+ readonly type: "spring";
20
+ readonly damping: 15;
21
+ readonly stiffness: 40;
22
+ };
23
+ readonly medium: {
24
+ readonly type: "spring";
25
+ readonly damping: 15;
26
+ readonly mass: 1;
27
+ readonly stiffness: 120;
28
+ };
29
+ readonly quick: {
30
+ readonly type: "spring";
31
+ readonly damping: 20;
32
+ readonly mass: 1.2;
33
+ readonly stiffness: 250;
34
+ };
35
+ readonly tooltip: {
36
+ readonly type: "spring";
37
+ readonly damping: 10;
38
+ readonly mass: 0.9;
39
+ readonly stiffness: 100;
40
+ };
41
+ readonly snappy: {
42
+ readonly type: "spring";
43
+ readonly damping: 28;
44
+ readonly mass: 0.8;
45
+ readonly stiffness: 350;
46
+ };
47
+ readonly gentle: {
48
+ readonly type: "spring";
49
+ readonly damping: 12;
50
+ readonly mass: 1.4;
51
+ readonly stiffness: 60;
52
+ };
53
+ };
54
+ export type AnimationName = keyof typeof animationConfig;
55
+ export declare const animationNames: AnimationName[];
56
+ export declare const animations: import("@tamagui/web").AnimationDriver<{
57
+ readonly bouncy: {
58
+ readonly type: "spring";
59
+ readonly damping: 9;
60
+ readonly mass: 0.9;
61
+ readonly stiffness: 150;
62
+ };
63
+ readonly lazy: {
64
+ readonly type: "spring";
65
+ readonly damping: 18;
66
+ readonly stiffness: 50;
67
+ };
68
+ readonly slow: {
69
+ readonly type: "spring";
70
+ readonly damping: 15;
71
+ readonly stiffness: 40;
72
+ };
73
+ readonly medium: {
74
+ readonly type: "spring";
75
+ readonly damping: 15;
76
+ readonly mass: 1;
77
+ readonly stiffness: 120;
78
+ };
79
+ readonly quick: {
80
+ readonly type: "spring";
81
+ readonly damping: 20;
82
+ readonly mass: 1.2;
83
+ readonly stiffness: 250;
84
+ };
85
+ readonly tooltip: {
86
+ readonly type: "spring";
87
+ readonly damping: 10;
88
+ readonly mass: 0.9;
89
+ readonly stiffness: 100;
90
+ };
91
+ readonly snappy: {
92
+ readonly type: "spring";
93
+ readonly damping: 28;
94
+ readonly mass: 0.8;
95
+ readonly stiffness: 350;
96
+ };
97
+ readonly gentle: {
98
+ readonly type: "spring";
99
+ readonly damping: 12;
100
+ readonly mass: 1.4;
101
+ readonly stiffness: 60;
102
+ };
103
+ }>;
104
+ //# sourceMappingURL=reactNative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactNative.d.ts","sourceRoot":"","sources":["../../../src/theme/animations/reactNative.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ClB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,eAAe,CAAC;AACzD,eAAO,MAAM,cAAc,EAAmC,aAAa,EAAE,CAAC;AAC9E,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Chart palette contract (SB-D-07 / SB-D-25 GAP closure).
3
+ *
4
+ * Charts are chrome that renders data, so their DEFAULT colors must come from
5
+ * the one theme channel (Axiom 5 ONE SOURCE) while explicit user/data colors
6
+ * pass through untouched (Axiom 11 VALUE IS DATA):
7
+ *
8
+ * - `single` — every mark of a single-series chart takes the theme identity:
9
+ * the active accent, or the tint solid when a tint sub-theme is active
10
+ * (the palette re-anchors under tint exactly like the neutral ramp does).
11
+ * - `categorical` — identity-led list of sanctioned Radix step-9 solids for
12
+ * multi-series data. Slot 0 is the theme identity; the fixed hue cycle
13
+ * fills the rest, dropping hues indistinguishable from the identity so
14
+ * adjacent series stay tellable-apart under every tint.
15
+ * - `semantic` — error/success/warning series solids from the sanctioned
16
+ * semantic ramps ($red/$green/$yellow), tint-independent, scheme-aware.
17
+ *
18
+ * Values resolve from the same Radix scales the theme builder splats into the
19
+ * base themes, so `categorical[1]` under `light` equals `$blue9`, and they
20
+ * stay resolvable on native and under tint sub-themes (which only carry the
21
+ * re-ramped neutral family).
22
+ */
23
+ export interface ChartPalette {
24
+ /** Scheme the palette resolved for. */
25
+ scheme: "light" | "dark";
26
+ /** Theme-identity solid: paints every mark of a single-series chart. */
27
+ single: string;
28
+ /** Identity-led distinguishable solids for categorical multi-series data. */
29
+ categorical: string[];
30
+ /** Semantic series solids (trend/status series), tint-independent. */
31
+ semantic: {
32
+ error: string;
33
+ success: string;
34
+ warning: string;
35
+ };
36
+ }
37
+ export interface ResolveChartPaletteInput {
38
+ scheme: "light" | "dark";
39
+ /**
40
+ * Resolved theme-identity solid — `accentBackground` in base themes, the
41
+ * re-ramped `$color9` under a tint. Falls back to the violet ramp solid
42
+ * when missing or unparseable (SSR before hydration, exotic values).
43
+ */
44
+ identitySolid?: string;
45
+ }
46
+ /**
47
+ * Pure palette resolution — see {@link ChartPalette} for the contract.
48
+ * Exported separately from the hook so tests and non-React callers can
49
+ * resolve palettes for any scheme/identity combination.
50
+ */
51
+ export declare function resolveChartPalette(input: ResolveChartPaletteInput): ChartPalette;
52
+ /**
53
+ * Canonical chart palette for the active Tamagui theme.
54
+ *
55
+ * Reads scheme and tint from the resolved theme name and the identity solid
56
+ * from the active theme (`$color9` under a tint — the re-ramped neutral
57
+ * solid — otherwise `$accentBackground`). Chart chrome MUST take its default
58
+ * series colors from this hook; explicit `color`/`colors` props on chart
59
+ * data are user values and pass through untouched.
60
+ */
61
+ export declare function useChartPalette(): ChartPalette;
62
+ //# sourceMappingURL=chartPalette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartPalette.d.ts","sourceRoot":"","sources":["../../src/theme/chartPalette.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,YAAY;IAC3B,uCAAuC;IACvC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,wEAAwE;IACxE,MAAM,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAC/D;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAyED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,YAAY,CAuBjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAU9C"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Color Rules — reference constants and utilities for the 12-step color scale.
3
+ *
4
+ * The 12 Radix/Tamagui steps divide into semantic groups:
5
+ * 1–2 Background
6
+ * 3–5 UI Background
7
+ * 6–8 Border
8
+ * 9–10 Primary
9
+ * 11–12 Text
10
+ *
11
+ * Tamagui's templates handle all color-to-component mapping automatically.
12
+ * This module provides:
13
+ * - Semantic group definitions for the debugger
14
+ * - Luminance/contrast utilities for accessibility checks
15
+ * - Component color ramp config (button vs input)
16
+ */
17
+ /** Parse a CSS color string to a 6-digit hex (handles hex, hsl, named "white"/"black"). */
18
+ export declare function normalizeToHex(raw: string): string | null;
19
+ /** WCAG 2.x relative luminance from a 6-digit hex string. */
20
+ export declare function relativeLuminance(hex: string): number;
21
+ /** WCAG contrast ratio (always >= 1). */
22
+ export declare function contrastRatio(l1: number, l2: number): number;
23
+ export declare const minContrastRatio = 3;
24
+ /** WCAG AA contrast floor for normal-size body/label text. */
25
+ export declare const aaTextContrastRatio = 4.5;
26
+ /**
27
+ * Axiom 15 OPTICS — pick whichever candidate foreground carries more WCAG
28
+ * contrast on a given `fill`. The canonical "readable foreground on a fill"
29
+ * primitive: intent Buttons (defaults/builderOptions), the Switch thumb and
30
+ * on-accent labels (useReadableTextOn) all reduce to this. Inputs/outputs are
31
+ * raw color strings so callers keep their own tokens/hsla; returns
32
+ * `candidateA` unchanged when any color fails to parse (safe default).
33
+ */
34
+ export declare function pickReadableForeground(fill: string, candidateA: string, candidateB: string): string;
35
+ /**
36
+ * Given a 12-color scale (hex strings), a background step, and a starting
37
+ * text step, scan towards `preferredDir` for the first step whose contrast
38
+ * ratio meets minContrastRatio. Falls back to the opposite direction,
39
+ * then to the step with the highest contrast if nothing passes.
40
+ */
41
+ export declare function findReadableStep(scale: string[], bgStep: number, startStep: number, preferredDir: 1 | -1): number;
42
+ export type ColorStep = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
43
+ export interface ColorRamp {
44
+ base: ColorStep;
45
+ hover: ColorStep;
46
+ /** press for buttons, active/checked for inputs */
47
+ active: ColorStep;
48
+ }
49
+ export interface ComponentColorConfig {
50
+ bg: ColorRamp;
51
+ border: ColorRamp;
52
+ }
53
+ export interface ButtonColorConfig extends ComponentColorConfig {
54
+ textLow: ColorRamp;
55
+ }
56
+ export declare const buttonColors: ButtonColorConfig;
57
+ export declare const inputColors: ComponentColorConfig;
58
+ export declare function $color(step: ColorStep): "$color1" | "$color12" | "$color5" | "$color2" | "$color11" | "$color3" | "$color4" | "$color6" | "$color7" | "$color8" | "$color9" | "$color10";
59
+ export interface SemanticGroup {
60
+ key: string;
61
+ label: string;
62
+ from: number;
63
+ to: number;
64
+ color: string;
65
+ }
66
+ export declare const semanticGroups: SemanticGroup[];
67
+ /** Normalise a raw color scale into 6-digit hex strings. Returns null when parsing fails. */
68
+ export declare function normalizeColorScale(raw: string[]): string[] | null;
69
+ //# sourceMappingURL=colorRules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorRules.d.ts","sourceRoot":"","sources":["../../src/theme/colorRules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAYH,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA6BzD;AAED,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED,yCAAyC;AACzC,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,MAAM,CAUR;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,GACnB,MAAM,CAkBR;AAID,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEzE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,SAAS,CAAC;IACjB,mDAAmD;IACnD,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,SAAS,CAAC;IACd,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,iBAI1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,oBAGzB,CAAC;AAEF,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,oJAErC;AAID,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,aAAa,EAMzC,CAAC;AAEF,6FAA6F;AAC7F,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,IAAI,CASlE"}