@chipmobilesdk/rn-theme 1.2.0 → 1.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 (257) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +3 -1
  3. package/lib/commonjs/color/categorical.js +35 -0
  4. package/lib/commonjs/color/categorical.js.map +1 -0
  5. package/lib/commonjs/color/contrast.js +199 -0
  6. package/lib/commonjs/color/contrast.js.map +1 -0
  7. package/lib/commonjs/color/parse.js +110 -0
  8. package/lib/commonjs/color/parse.js.map +1 -0
  9. package/lib/commonjs/color/roles.js +235 -0
  10. package/lib/commonjs/color/roles.js.map +1 -0
  11. package/lib/commonjs/index.js +94 -0
  12. package/lib/commonjs/index.js.map +1 -0
  13. package/lib/commonjs/integration/navigationTheme.js +43 -0
  14. package/lib/commonjs/integration/navigationTheme.js.map +1 -0
  15. package/lib/commonjs/package.json +1 -0
  16. package/lib/commonjs/presets/byTone.js +28 -0
  17. package/lib/commonjs/presets/byTone.js.map +1 -0
  18. package/lib/commonjs/presets/layout.js +67 -0
  19. package/lib/commonjs/presets/layout.js.map +1 -0
  20. package/lib/commonjs/presets/themePresets.js +115 -0
  21. package/lib/commonjs/presets/themePresets.js.map +1 -0
  22. package/lib/commonjs/theme/buildThemes.js +211 -0
  23. package/lib/commonjs/theme/buildThemes.js.map +1 -0
  24. package/lib/commonjs/theme/errors.js +49 -0
  25. package/lib/commonjs/theme/errors.js.map +1 -0
  26. package/lib/commonjs/theme/overrides.js +125 -0
  27. package/lib/commonjs/theme/overrides.js.map +1 -0
  28. package/lib/commonjs/theme/validateThemeConfig.js +157 -0
  29. package/lib/commonjs/theme/validateThemeConfig.js.map +1 -0
  30. package/lib/commonjs/tokens/defaults.js +132 -0
  31. package/lib/commonjs/tokens/defaults.js.map +1 -0
  32. package/lib/commonjs/tokens/typography.js +136 -0
  33. package/lib/commonjs/tokens/typography.js.map +1 -0
  34. package/lib/commonjs/types/brand.js +2 -0
  35. package/lib/commonjs/types/brand.js.map +1 -0
  36. package/lib/commonjs/types/colors.js +2 -0
  37. package/lib/commonjs/types/colors.js.map +1 -0
  38. package/lib/commonjs/types/index.js +2 -0
  39. package/lib/commonjs/types/index.js.map +1 -0
  40. package/lib/commonjs/types/theme.js +6 -0
  41. package/lib/commonjs/types/theme.js.map +1 -0
  42. package/lib/commonjs/types/tokens.js +2 -0
  43. package/lib/commonjs/types/tokens.js.map +1 -0
  44. package/lib/commonjs/types/typography.js +2 -0
  45. package/lib/commonjs/types/typography.js.map +1 -0
  46. package/lib/commonjs/unistyles/createUnistylesConfig.js +113 -0
  47. package/lib/commonjs/unistyles/createUnistylesConfig.js.map +1 -0
  48. package/lib/commonjs/unistyles/themeMode.js +39 -0
  49. package/lib/commonjs/unistyles/themeMode.js.map +1 -0
  50. package/lib/commonjs/vendor/mcu/LICENSE +191 -0
  51. package/lib/commonjs/vendor/mcu/hct/cam16.js +362 -0
  52. package/lib/commonjs/vendor/mcu/hct/cam16.js.map +1 -0
  53. package/lib/commonjs/vendor/mcu/hct/hct.js +183 -0
  54. package/lib/commonjs/vendor/mcu/hct/hct.js.map +1 -0
  55. package/lib/commonjs/vendor/mcu/hct/hct_solver.js +401 -0
  56. package/lib/commonjs/vendor/mcu/hct/hct_solver.js.map +1 -0
  57. package/lib/commonjs/vendor/mcu/hct/viewing_conditions.js +116 -0
  58. package/lib/commonjs/vendor/mcu/hct/viewing_conditions.js.map +1 -0
  59. package/lib/commonjs/vendor/mcu/index.js +27 -0
  60. package/lib/commonjs/vendor/mcu/index.js.map +1 -0
  61. package/lib/commonjs/vendor/mcu/palettes/tonal_palette.js +177 -0
  62. package/lib/commonjs/vendor/mcu/palettes/tonal_palette.js.map +1 -0
  63. package/lib/commonjs/vendor/mcu/utils/color_utils.js +298 -0
  64. package/lib/commonjs/vendor/mcu/utils/color_utils.js.map +1 -0
  65. package/lib/commonjs/vendor/mcu/utils/math_utils.js +158 -0
  66. package/lib/commonjs/vendor/mcu/utils/math_utils.js.map +1 -0
  67. package/lib/module/color/categorical.js +31 -0
  68. package/lib/module/color/categorical.js.map +1 -0
  69. package/lib/module/color/contrast.js +194 -0
  70. package/lib/module/color/contrast.js.map +1 -0
  71. package/lib/module/color/parse.js +101 -0
  72. package/lib/module/color/parse.js.map +1 -0
  73. package/lib/module/color/roles.js +229 -0
  74. package/lib/module/color/roles.js.map +1 -0
  75. package/lib/module/index.js +23 -0
  76. package/lib/module/index.js.map +1 -0
  77. package/lib/module/integration/navigationTheme.js +39 -0
  78. package/lib/module/integration/navigationTheme.js.map +1 -0
  79. package/lib/module/package.json +1 -0
  80. package/lib/module/presets/byTone.js +24 -0
  81. package/lib/module/presets/byTone.js.map +1 -0
  82. package/lib/module/presets/layout.js +63 -0
  83. package/lib/module/presets/layout.js.map +1 -0
  84. package/lib/module/presets/themePresets.js +110 -0
  85. package/lib/module/presets/themePresets.js.map +1 -0
  86. package/lib/module/theme/buildThemes.js +208 -0
  87. package/lib/module/theme/buildThemes.js.map +1 -0
  88. package/lib/module/theme/errors.js +43 -0
  89. package/lib/module/theme/errors.js.map +1 -0
  90. package/lib/module/theme/overrides.js +119 -0
  91. package/lib/module/theme/overrides.js.map +1 -0
  92. package/lib/module/theme/validateThemeConfig.js +152 -0
  93. package/lib/module/theme/validateThemeConfig.js.map +1 -0
  94. package/lib/module/tokens/defaults.js +120 -0
  95. package/lib/module/tokens/defaults.js.map +1 -0
  96. package/lib/module/tokens/typography.js +129 -0
  97. package/lib/module/tokens/typography.js.map +1 -0
  98. package/lib/module/types/brand.js +2 -0
  99. package/lib/module/types/brand.js.map +1 -0
  100. package/lib/module/types/colors.js +2 -0
  101. package/lib/module/types/colors.js.map +1 -0
  102. package/lib/module/types/index.js +2 -0
  103. package/lib/module/types/index.js.map +1 -0
  104. package/lib/module/types/theme.js +4 -0
  105. package/lib/module/types/theme.js.map +1 -0
  106. package/lib/module/types/tokens.js +2 -0
  107. package/lib/module/types/tokens.js.map +1 -0
  108. package/lib/module/types/typography.js +2 -0
  109. package/lib/module/types/typography.js.map +1 -0
  110. package/lib/module/unistyles/createUnistylesConfig.js +109 -0
  111. package/lib/module/unistyles/createUnistylesConfig.js.map +1 -0
  112. package/lib/module/unistyles/themeMode.js +36 -0
  113. package/lib/module/unistyles/themeMode.js.map +1 -0
  114. package/lib/module/vendor/mcu/LICENSE +191 -0
  115. package/lib/module/vendor/mcu/hct/cam16.js +356 -0
  116. package/lib/module/vendor/mcu/hct/cam16.js.map +1 -0
  117. package/lib/module/vendor/mcu/hct/hct.js +178 -0
  118. package/lib/module/vendor/mcu/hct/hct.js.map +1 -0
  119. package/lib/module/vendor/mcu/hct/hct_solver.js +396 -0
  120. package/lib/module/vendor/mcu/hct/hct_solver.js.map +1 -0
  121. package/lib/module/vendor/mcu/hct/viewing_conditions.js +110 -0
  122. package/lib/module/vendor/mcu/hct/viewing_conditions.js.map +1 -0
  123. package/lib/module/vendor/mcu/index.js +8 -0
  124. package/lib/module/vendor/mcu/index.js.map +1 -0
  125. package/lib/module/vendor/mcu/palettes/tonal_palette.js +172 -0
  126. package/lib/module/vendor/mcu/palettes/tonal_palette.js.map +1 -0
  127. package/lib/module/vendor/mcu/utils/color_utils.js +277 -0
  128. package/lib/module/vendor/mcu/utils/color_utils.js.map +1 -0
  129. package/lib/module/vendor/mcu/utils/math_utils.js +146 -0
  130. package/lib/module/vendor/mcu/utils/math_utils.js.map +1 -0
  131. package/lib/typescript/commonjs/color/categorical.d.ts +7 -0
  132. package/lib/typescript/commonjs/color/categorical.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/color/contrast.d.ts +26 -0
  134. package/lib/typescript/commonjs/color/contrast.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/color/parse.d.ts +25 -0
  136. package/lib/typescript/commonjs/color/parse.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/color/roles.d.ts +26 -0
  138. package/lib/typescript/commonjs/color/roles.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/index.d.ts +18 -0
  140. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/integration/navigationTheme.d.ts +30 -0
  142. package/lib/typescript/commonjs/integration/navigationTheme.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/package.json +1 -0
  144. package/lib/typescript/commonjs/presets/byTone.d.ts +19 -0
  145. package/lib/typescript/commonjs/presets/byTone.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/presets/layout.d.ts +63 -0
  147. package/lib/typescript/commonjs/presets/layout.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/presets/themePresets.d.ts +11 -0
  149. package/lib/typescript/commonjs/presets/themePresets.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/theme/buildThemes.d.ts +18 -0
  151. package/lib/typescript/commonjs/theme/buildThemes.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/theme/errors.d.ts +23 -0
  153. package/lib/typescript/commonjs/theme/errors.d.ts.map +1 -0
  154. package/lib/typescript/commonjs/theme/overrides.d.ts +11 -0
  155. package/lib/typescript/commonjs/theme/overrides.d.ts.map +1 -0
  156. package/lib/typescript/commonjs/theme/validateThemeConfig.d.ts +6 -0
  157. package/lib/typescript/commonjs/theme/validateThemeConfig.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/tokens/defaults.d.ts +23 -0
  159. package/lib/typescript/commonjs/tokens/defaults.d.ts.map +1 -0
  160. package/lib/typescript/commonjs/tokens/typography.d.ts +14 -0
  161. package/lib/typescript/commonjs/tokens/typography.d.ts.map +1 -0
  162. package/lib/typescript/commonjs/types/brand.d.ts +21 -0
  163. package/lib/typescript/commonjs/types/brand.d.ts.map +1 -0
  164. package/lib/typescript/commonjs/types/colors.d.ts +76 -0
  165. package/lib/typescript/commonjs/types/colors.d.ts.map +1 -0
  166. package/lib/typescript/commonjs/types/index.d.ts +6 -0
  167. package/lib/typescript/commonjs/types/index.d.ts.map +1 -0
  168. package/lib/typescript/commonjs/types/theme.d.ts +140 -0
  169. package/lib/typescript/commonjs/types/theme.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/types/tokens.d.ts +79 -0
  171. package/lib/typescript/commonjs/types/tokens.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/types/typography.d.ts +53 -0
  173. package/lib/typescript/commonjs/types/typography.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/unistyles/createUnistylesConfig.d.ts +52 -0
  175. package/lib/typescript/commonjs/unistyles/createUnistylesConfig.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/unistyles/themeMode.d.ts +13 -0
  177. package/lib/typescript/commonjs/unistyles/themeMode.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/vendor/mcu/hct/cam16.d.ts +132 -0
  179. package/lib/typescript/commonjs/vendor/mcu/hct/cam16.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/vendor/mcu/hct/hct.d.ts +93 -0
  181. package/lib/typescript/commonjs/vendor/mcu/hct/hct.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/vendor/mcu/hct/hct_solver.d.ts +147 -0
  183. package/lib/typescript/commonjs/vendor/mcu/hct/hct_solver.d.ts.map +1 -0
  184. package/lib/typescript/commonjs/vendor/mcu/hct/viewing_conditions.d.ts +75 -0
  185. package/lib/typescript/commonjs/vendor/mcu/hct/viewing_conditions.d.ts.map +1 -0
  186. package/lib/typescript/commonjs/vendor/mcu/index.d.ts +4 -0
  187. package/lib/typescript/commonjs/vendor/mcu/index.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/vendor/mcu/palettes/tonal_palette.d.ts +56 -0
  189. package/lib/typescript/commonjs/vendor/mcu/palettes/tonal_palette.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/vendor/mcu/utils/color_utils.d.ts +129 -0
  191. package/lib/typescript/commonjs/vendor/mcu/utils/color_utils.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/vendor/mcu/utils/math_utils.d.ts +83 -0
  193. package/lib/typescript/commonjs/vendor/mcu/utils/math_utils.d.ts.map +1 -0
  194. package/lib/typescript/module/color/categorical.d.ts +7 -0
  195. package/lib/typescript/module/color/categorical.d.ts.map +1 -0
  196. package/lib/typescript/module/color/contrast.d.ts +26 -0
  197. package/lib/typescript/module/color/contrast.d.ts.map +1 -0
  198. package/lib/typescript/module/color/parse.d.ts +25 -0
  199. package/lib/typescript/module/color/parse.d.ts.map +1 -0
  200. package/lib/typescript/module/color/roles.d.ts +26 -0
  201. package/lib/typescript/module/color/roles.d.ts.map +1 -0
  202. package/lib/typescript/module/index.d.ts +18 -0
  203. package/lib/typescript/module/index.d.ts.map +1 -0
  204. package/lib/typescript/module/integration/navigationTheme.d.ts +30 -0
  205. package/lib/typescript/module/integration/navigationTheme.d.ts.map +1 -0
  206. package/lib/typescript/module/package.json +1 -0
  207. package/lib/typescript/module/presets/byTone.d.ts +19 -0
  208. package/lib/typescript/module/presets/byTone.d.ts.map +1 -0
  209. package/lib/typescript/module/presets/layout.d.ts +63 -0
  210. package/lib/typescript/module/presets/layout.d.ts.map +1 -0
  211. package/lib/typescript/module/presets/themePresets.d.ts +11 -0
  212. package/lib/typescript/module/presets/themePresets.d.ts.map +1 -0
  213. package/lib/typescript/module/theme/buildThemes.d.ts +18 -0
  214. package/lib/typescript/module/theme/buildThemes.d.ts.map +1 -0
  215. package/lib/typescript/module/theme/errors.d.ts +23 -0
  216. package/lib/typescript/module/theme/errors.d.ts.map +1 -0
  217. package/lib/typescript/module/theme/overrides.d.ts +11 -0
  218. package/lib/typescript/module/theme/overrides.d.ts.map +1 -0
  219. package/lib/typescript/module/theme/validateThemeConfig.d.ts +6 -0
  220. package/lib/typescript/module/theme/validateThemeConfig.d.ts.map +1 -0
  221. package/lib/typescript/module/tokens/defaults.d.ts +23 -0
  222. package/lib/typescript/module/tokens/defaults.d.ts.map +1 -0
  223. package/lib/typescript/module/tokens/typography.d.ts +14 -0
  224. package/lib/typescript/module/tokens/typography.d.ts.map +1 -0
  225. package/lib/typescript/module/types/brand.d.ts +21 -0
  226. package/lib/typescript/module/types/brand.d.ts.map +1 -0
  227. package/lib/typescript/module/types/colors.d.ts +76 -0
  228. package/lib/typescript/module/types/colors.d.ts.map +1 -0
  229. package/lib/typescript/module/types/index.d.ts +6 -0
  230. package/lib/typescript/module/types/index.d.ts.map +1 -0
  231. package/lib/typescript/module/types/theme.d.ts +140 -0
  232. package/lib/typescript/module/types/theme.d.ts.map +1 -0
  233. package/lib/typescript/module/types/tokens.d.ts +79 -0
  234. package/lib/typescript/module/types/tokens.d.ts.map +1 -0
  235. package/lib/typescript/module/types/typography.d.ts +53 -0
  236. package/lib/typescript/module/types/typography.d.ts.map +1 -0
  237. package/lib/typescript/module/unistyles/createUnistylesConfig.d.ts +52 -0
  238. package/lib/typescript/module/unistyles/createUnistylesConfig.d.ts.map +1 -0
  239. package/lib/typescript/module/unistyles/themeMode.d.ts +13 -0
  240. package/lib/typescript/module/unistyles/themeMode.d.ts.map +1 -0
  241. package/lib/typescript/module/vendor/mcu/hct/cam16.d.ts +132 -0
  242. package/lib/typescript/module/vendor/mcu/hct/cam16.d.ts.map +1 -0
  243. package/lib/typescript/module/vendor/mcu/hct/hct.d.ts +93 -0
  244. package/lib/typescript/module/vendor/mcu/hct/hct.d.ts.map +1 -0
  245. package/lib/typescript/module/vendor/mcu/hct/hct_solver.d.ts +147 -0
  246. package/lib/typescript/module/vendor/mcu/hct/hct_solver.d.ts.map +1 -0
  247. package/lib/typescript/module/vendor/mcu/hct/viewing_conditions.d.ts +75 -0
  248. package/lib/typescript/module/vendor/mcu/hct/viewing_conditions.d.ts.map +1 -0
  249. package/lib/typescript/module/vendor/mcu/index.d.ts +4 -0
  250. package/lib/typescript/module/vendor/mcu/index.d.ts.map +1 -0
  251. package/lib/typescript/module/vendor/mcu/palettes/tonal_palette.d.ts +56 -0
  252. package/lib/typescript/module/vendor/mcu/palettes/tonal_palette.d.ts.map +1 -0
  253. package/lib/typescript/module/vendor/mcu/utils/color_utils.d.ts +129 -0
  254. package/lib/typescript/module/vendor/mcu/utils/color_utils.d.ts.map +1 -0
  255. package/lib/typescript/module/vendor/mcu/utils/math_utils.d.ts +83 -0
  256. package/lib/typescript/module/vendor/mcu/utils/math_utils.d.ts.map +1 -0
  257. package/package.json +40 -16
@@ -0,0 +1,235 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DISABLED_CONTENT_OPACITY = exports.DEFAULT_SEEDS = void 0;
7
+ exports.buildColorRoles = buildColorRoles;
8
+ exports.buildPalettes = buildPalettes;
9
+ exports.buildTones = buildTones;
10
+ var _index = require("../vendor/mcu/index.js");
11
+ var _defaults = require("../tokens/defaults.js");
12
+ var _parse = require("./parse.js");
13
+ /**
14
+ * 0.2.x light semantic colours, kept as default seeds so their hues carry over.
15
+ */
16
+ const DEFAULT_SEEDS = exports.DEFAULT_SEEDS = {
17
+ error: '#B3261E',
18
+ success: '#2E7D32',
19
+ warning: '#E65100',
20
+ info: '#0277BD'
21
+ };
22
+
23
+ /** Neutral chroma when no neutral seed is given (Material 3 uses 4–8). */
24
+ const NEUTRAL_CHROMA = 4;
25
+ const NEUTRAL_VARIANT_CHROMA = 8;
26
+ /** Upper bound for a supplied neutral seed, so surfaces never turn into a brand colour. */
27
+ const MAX_NEUTRAL_SEED_CHROMA = 16;
28
+ const NEUTRAL_VARIANT_EXTRA_CHROMA = 4;
29
+
30
+ /** Material 3 opacities applied to `onSurface` and the scrim. */
31
+ /** The same figure as `opacity.disabledContent`, from its one definition (THM-07). */
32
+ const DISABLED_CONTENT_OPACITY = exports.DISABLED_CONTENT_OPACITY = _defaults.DEFAULT_OPACITY.disabledContent;
33
+ const SCRIM_OPACITY = 0.32;
34
+
35
+ /**
36
+ * Tones per role (plan D-3). Contrast depends only on tone, so these pairs
37
+ * hold for every hue and chroma.
38
+ */
39
+ const TONES = {
40
+ light: {
41
+ role: 40,
42
+ onRole: 100,
43
+ container: 90,
44
+ onContainer: 10,
45
+ toneBorder: 50,
46
+ background: 98,
47
+ onBackground: 10,
48
+ surfaceVariant: 90,
49
+ onSurfaceVariant: 30,
50
+ surfaceContainerLowest: 100,
51
+ surfaceContainerLow: 96,
52
+ surfaceContainer: 94,
53
+ surfaceContainerHigh: 92,
54
+ surfaceContainerHighest: 90,
55
+ inverseSurface: 20,
56
+ inverseOnSurface: 95,
57
+ inversePrimary: 80,
58
+ outline: 50,
59
+ outlineVariant: 80
60
+ },
61
+ dark: {
62
+ role: 80,
63
+ onRole: 20,
64
+ container: 30,
65
+ onContainer: 90,
66
+ toneBorder: 60,
67
+ background: 6,
68
+ onBackground: 90,
69
+ surfaceVariant: 30,
70
+ onSurfaceVariant: 80,
71
+ surfaceContainerLowest: 4,
72
+ surfaceContainerLow: 10,
73
+ surfaceContainer: 12,
74
+ surfaceContainerHigh: 17,
75
+ surfaceContainerHighest: 22,
76
+ inverseSurface: 90,
77
+ inverseOnSurface: 20,
78
+ inversePrimary: 40,
79
+ outline: 60,
80
+ outlineVariant: 30
81
+ }
82
+ };
83
+ const BLACK_TONE = 0;
84
+ const KEY_TONE = 50;
85
+ /** Keeps the colour's hue and chroma (plan D-2). */
86
+ function paletteOf(color) {
87
+ return _index.TonalPalette.fromInt((0, _parse.argbFromColor)(color));
88
+ }
89
+
90
+ /**
91
+ * Same tones as `TonalPalette.fromHueAndChroma`, without its key-colour search:
92
+ * a palette's tones depend only on hue and chroma, and these neutral chromas
93
+ * fit the gamut at tone 50, so no search is needed (spec FR-4).
94
+ */
95
+ function paletteFromHueAndChroma(hue, chroma) {
96
+ return _index.TonalPalette.fromHct(_index.Hct.from(hue, chroma, KEY_TONE));
97
+ }
98
+ function neutralPalettes(input) {
99
+ if (input.seeds?.neutral != null) {
100
+ const seed = _index.Hct.fromInt((0, _parse.argbFromColor)(input.seeds.neutral));
101
+ const chroma = Math.min(seed.chroma, MAX_NEUTRAL_SEED_CHROMA);
102
+ return {
103
+ neutral: paletteFromHueAndChroma(seed.hue, chroma),
104
+ neutralVariant: paletteFromHueAndChroma(seed.hue, chroma + NEUTRAL_VARIANT_EXTRA_CHROMA)
105
+ };
106
+ }
107
+ const hue = _index.Hct.fromInt((0, _parse.argbFromColor)(input.brandColors.primary)).hue;
108
+ return {
109
+ neutral: paletteFromHueAndChroma(hue, NEUTRAL_CHROMA),
110
+ neutralVariant: paletteFromHueAndChroma(hue, NEUTRAL_VARIANT_CHROMA)
111
+ };
112
+ }
113
+ function buildPalettes(input) {
114
+ const seeds = {
115
+ ...DEFAULT_SEEDS,
116
+ ...input.seeds
117
+ };
118
+ const custom = {};
119
+ for (const [name, color] of Object.entries(input.tones ?? {})) {
120
+ custom[name] = paletteOf(color);
121
+ }
122
+ return {
123
+ accent: {
124
+ primary: paletteOf(input.brandColors.primary),
125
+ secondary: paletteOf(input.brandColors.secondary),
126
+ tertiary: paletteOf(input.brandColors.tertiary),
127
+ error: paletteOf(seeds.error),
128
+ success: paletteOf(seeds.success),
129
+ warning: paletteOf(seeds.warning),
130
+ info: paletteOf(seeds.info)
131
+ },
132
+ ...neutralPalettes(input),
133
+ custom
134
+ };
135
+ }
136
+ function hex(palette, tone) {
137
+ return (0, _parse.hexFromArgb)(palette.tone(tone));
138
+ }
139
+ function buildColorRoles(palettes, scheme) {
140
+ const t = TONES[scheme];
141
+ const {
142
+ neutral,
143
+ neutralVariant
144
+ } = palettes;
145
+ const accent = palette => ({
146
+ role: hex(palette, t.role),
147
+ onRole: hex(palette, t.onRole),
148
+ container: hex(palette, t.container),
149
+ onContainer: hex(palette, t.onContainer)
150
+ });
151
+ const [primary, secondary, tertiary, error, success, warning, info] = ['primary', 'secondary', 'tertiary', 'error', 'success', 'warning', 'info'].map(name => accent(palettes.accent[name]));
152
+ const onSurface = hex(neutral, t.onBackground);
153
+ return {
154
+ primary: primary.role,
155
+ onPrimary: primary.onRole,
156
+ primaryContainer: primary.container,
157
+ onPrimaryContainer: primary.onContainer,
158
+ secondary: secondary.role,
159
+ onSecondary: secondary.onRole,
160
+ secondaryContainer: secondary.container,
161
+ onSecondaryContainer: secondary.onContainer,
162
+ tertiary: tertiary.role,
163
+ onTertiary: tertiary.onRole,
164
+ tertiaryContainer: tertiary.container,
165
+ onTertiaryContainer: tertiary.onContainer,
166
+ error: error.role,
167
+ onError: error.onRole,
168
+ errorContainer: error.container,
169
+ onErrorContainer: error.onContainer,
170
+ success: success.role,
171
+ onSuccess: success.onRole,
172
+ successContainer: success.container,
173
+ onSuccessContainer: success.onContainer,
174
+ warning: warning.role,
175
+ onWarning: warning.onRole,
176
+ warningContainer: warning.container,
177
+ onWarningContainer: warning.onContainer,
178
+ info: info.role,
179
+ onInfo: info.onRole,
180
+ infoContainer: info.container,
181
+ onInfoContainer: info.onContainer,
182
+ background: hex(neutral, t.background),
183
+ onBackground: onSurface,
184
+ surface: hex(neutral, t.background),
185
+ onSurface,
186
+ surfaceVariant: hex(neutralVariant, t.surfaceVariant),
187
+ onSurfaceVariant: hex(neutralVariant, t.onSurfaceVariant),
188
+ surfaceContainerLowest: hex(neutral, t.surfaceContainerLowest),
189
+ surfaceContainerLow: hex(neutral, t.surfaceContainerLow),
190
+ surfaceContainer: hex(neutral, t.surfaceContainer),
191
+ surfaceContainerHigh: hex(neutral, t.surfaceContainerHigh),
192
+ surfaceContainerHighest: hex(neutral, t.surfaceContainerHighest),
193
+ inverseSurface: hex(neutral, t.inverseSurface),
194
+ inverseOnSurface: hex(neutral, t.inverseOnSurface),
195
+ inversePrimary: hex(palettes.accent.primary, t.inversePrimary),
196
+ outline: hex(neutralVariant, t.outline),
197
+ outlineVariant: hex(neutralVariant, t.outlineVariant),
198
+ scrim: (0, _parse.withAlpha)(hex(neutral, BLACK_TONE), SCRIM_OPACITY),
199
+ shadow: hex(neutral, BLACK_TONE),
200
+ disabled: (0, _parse.withAlpha)(onSurface, DISABLED_CONTENT_OPACITY)
201
+ };
202
+ }
203
+ function accentTone(palette, scheme) {
204
+ const t = TONES[scheme];
205
+ return {
206
+ fg: hex(palette, t.role),
207
+ container: hex(palette, t.container),
208
+ onContainer: hex(palette, t.onContainer),
209
+ border: hex(palette, t.toneBorder),
210
+ fill: hex(palette, t.role),
211
+ onFill: hex(palette, t.onRole)
212
+ };
213
+ }
214
+ function buildTones(palettes, color, scheme) {
215
+ const tones = {
216
+ neutral: {
217
+ fg: color.onSurface,
218
+ container: color.surfaceContainerHigh,
219
+ onContainer: color.onSurface,
220
+ border: color.outline,
221
+ fill: color.inverseSurface,
222
+ onFill: color.inverseOnSurface
223
+ },
224
+ primary: accentTone(palettes.accent.primary, scheme),
225
+ info: accentTone(palettes.accent.info, scheme),
226
+ success: accentTone(palettes.accent.success, scheme),
227
+ warning: accentTone(palettes.accent.warning, scheme),
228
+ error: accentTone(palettes.accent.error, scheme)
229
+ };
230
+ for (const [name, palette] of Object.entries(palettes.custom)) {
231
+ tones[name] = accentTone(palette, scheme);
232
+ }
233
+ return tones;
234
+ }
235
+ //# sourceMappingURL=roles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_index","require","_defaults","_parse","DEFAULT_SEEDS","exports","error","success","warning","info","NEUTRAL_CHROMA","NEUTRAL_VARIANT_CHROMA","MAX_NEUTRAL_SEED_CHROMA","NEUTRAL_VARIANT_EXTRA_CHROMA","DISABLED_CONTENT_OPACITY","DEFAULT_OPACITY","disabledContent","SCRIM_OPACITY","TONES","light","role","onRole","container","onContainer","toneBorder","background","onBackground","surfaceVariant","onSurfaceVariant","surfaceContainerLowest","surfaceContainerLow","surfaceContainer","surfaceContainerHigh","surfaceContainerHighest","inverseSurface","inverseOnSurface","inversePrimary","outline","outlineVariant","dark","BLACK_TONE","KEY_TONE","paletteOf","color","TonalPalette","fromInt","argbFromColor","paletteFromHueAndChroma","hue","chroma","fromHct","Hct","from","neutralPalettes","input","seeds","neutral","seed","Math","min","neutralVariant","brandColors","primary","buildPalettes","custom","name","Object","entries","tones","accent","secondary","tertiary","hex","palette","tone","hexFromArgb","buildColorRoles","palettes","scheme","t","map","onSurface","onPrimary","primaryContainer","onPrimaryContainer","onSecondary","secondaryContainer","onSecondaryContainer","onTertiary","tertiaryContainer","onTertiaryContainer","onError","errorContainer","onErrorContainer","onSuccess","successContainer","onSuccessContainer","onWarning","warningContainer","onWarningContainer","onInfo","infoContainer","onInfoContainer","surface","scrim","withAlpha","shadow","disabled","accentTone","fg","border","fill","onFill","buildTones"],"sourceRoot":"../../../src","sources":["color/roles.ts"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACO,MAAMG,aAAoD,GAAAC,OAAA,CAAAD,aAAA,GAAG;EACnEE,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE;AACP,CAAC;;AAED;AACA,MAAMC,cAAc,GAAG,CAAC;AACxB,MAAMC,sBAAsB,GAAG,CAAC;AAChC;AACA,MAAMC,uBAAuB,GAAG,EAAE;AAClC,MAAMC,4BAA4B,GAAG,CAAC;;AAEtC;AACA;AACO,MAAMC,wBAAwB,GAAAT,OAAA,CAAAS,wBAAA,GAAGC,yBAAe,CAACC,eAAe;AACvE,MAAMC,aAAa,GAAG,IAAI;;AAE1B;AACA;AACA;AACA;AACA,MAAMC,KAAK,GAAG;EACbC,KAAK,EAAE;IACNC,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE,GAAG;IACXC,SAAS,EAAE,EAAE;IACbC,WAAW,EAAE,EAAE;IACfC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,EAAE;IACdC,YAAY,EAAE,EAAE;IAChBC,cAAc,EAAE,EAAE;IAClBC,gBAAgB,EAAE,EAAE;IACpBC,sBAAsB,EAAE,GAAG;IAC3BC,mBAAmB,EAAE,EAAE;IACvBC,gBAAgB,EAAE,EAAE;IACpBC,oBAAoB,EAAE,EAAE;IACxBC,uBAAuB,EAAE,EAAE;IAC3BC,cAAc,EAAE,EAAE;IAClBC,gBAAgB,EAAE,EAAE;IACp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,CAACR,MAAM,CAAC5D,IAAI,EAAEqE,MAAM,CAAC;IAC9CvE,OAAO,EAAEqG,UAAU,CAAC/B,QAAQ,CAACR,MAAM,CAAC9D,OAAO,EAAEuE,MAAM,CAAC;IACpDtE,OAAO,EAAEoG,UAAU,CAAC/B,QAAQ,CAACR,MAAM,CAAC7D,OAAO,EAAEsE,MAAM,CAAC;IACpDxE,KAAK,EAAEsG,UAAU,CAAC/B,QAAQ,CAACR,MAAM,CAAC/D,KAAK,EAAEwE,MAAM;EAChD,CAAC;EAED,KAAK,MAAM,CAACb,IAAI,EAAEQ,OAAO,CAAC,IAAIP,MAAM,CAACC,OAAO,CAACU,QAAQ,CAACb,MAAM,CAAC,EAAE;IAC9DI,KAAK,CAACH,IAAI,CAAC,GAAG2C,UAAU,CAACnC,OAAO,EAAEK,MAAM,CAAC;EAC1C;EAEA,OAAOV,KAAK;AACb","ignoreList":[]}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "DEFAULT_BREAKPOINTS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _defaults.DEFAULT_BREAKPOINTS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ThemeConfigError", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _errors.ThemeConfigError;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "ThemeContrastError", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _errors.ThemeContrastError;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "applyThemeMode", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _themeMode.applyThemeMode;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "auditTheme", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _contrast.auditTheme;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "buildThemes", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _buildThemes.buildThemes;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "byTone", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _byTone.byTone;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "contrastRatio", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _contrast.contrastRatio;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "createUnistylesConfig", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _createUnistylesConfig.createUnistylesConfig;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "layout", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _layout.layout;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "presets", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _layout.presets;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "toNavigationTheme", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _navigationTheme.toNavigationTheme;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "withAlpha", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _parse.withAlpha;
82
+ }
83
+ });
84
+ var _buildThemes = require("./theme/buildThemes.js");
85
+ var _errors = require("./theme/errors.js");
86
+ var _createUnistylesConfig = require("./unistyles/createUnistylesConfig.js");
87
+ var _themeMode = require("./unistyles/themeMode.js");
88
+ var _defaults = require("./tokens/defaults.js");
89
+ var _contrast = require("./color/contrast.js");
90
+ var _parse = require("./color/parse.js");
91
+ var _layout = require("./presets/layout.js");
92
+ var _byTone = require("./presets/byTone.js");
93
+ var _navigationTheme = require("./integration/navigationTheme.js");
94
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_buildThemes","require","_errors","_createUnistylesConfig","_themeMode","_defaults","_contrast","_parse","_layout","_byTone","_navigationTheme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAGA,IAAAK,SAAA,GAAAL,OAAA;AAEA,IAAAM,MAAA,GAAAN,OAAA;AAGA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAGA,IAAAS,gBAAA,GAAAT,OAAA","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.toNavigationTheme = toNavigationTheme;
7
+ /**
8
+ * The theme shape React Navigation expects, declared here so the package needs
9
+ * no navigation dependency (spec AC-9.3).
10
+ */
11
+
12
+ function toNavigationTheme(theme, scheme) {
13
+ const {
14
+ color,
15
+ font
16
+ } = theme;
17
+ return {
18
+ dark: scheme === 'dark',
19
+ colors: {
20
+ primary: color.primary,
21
+ background: color.background,
22
+ card: color.surfaceContainer,
23
+ text: color.onSurface,
24
+ border: color.outlineVariant,
25
+ notification: color.error
26
+ },
27
+ fonts: {
28
+ regular: {
29
+ ...font.regular
30
+ },
31
+ medium: {
32
+ ...font.medium
33
+ },
34
+ bold: {
35
+ ...font.bold
36
+ },
37
+ heavy: {
38
+ ...font.heavy
39
+ }
40
+ }
41
+ };
42
+ }
43
+ //# sourceMappingURL=navigationTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toNavigationTheme","theme","scheme","color","font","dark","colors","primary","background","card","surfaceContainer","text","onSurface","border","outlineVariant","notification","error","fonts","regular","medium","bold","heavy"],"sourceRoot":"../../../src","sources":["integration/navigationTheme.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;;AAwBO,SAASA,iBAAiBA,CAACC,KAAuB,EAAEC,MAAmB,EAAmB;EAChG,MAAM;IAAEC,KAAK;IAAEC;EAAK,CAAC,GAAGH,KAAK;EAE7B,OAAO;IACNI,IAAI,EAAEH,MAAM,KAAK,MAAM;IACvBI,MAAM,EAAE;MACPC,OAAO,EAAEJ,KAAK,CAACI,OAAO;MACtBC,UAAU,EAAEL,KAAK,CAACK,UAAU;MAC5BC,IAAI,EAAEN,KAAK,CAACO,gBAAgB;MAC5BC,IAAI,EAAER,KAAK,CAACS,SAAS;MACrBC,MAAM,EAAEV,KAAK,CAACW,cAAc;MAC5BC,YAAY,EAAEZ,KAAK,CAACa;IACrB,CAAC;IACDC,KAAK,EAAE;MACNC,OAAO,EAAE;QAAE,GAAGd,IAAI,CAACc;MAAQ,CAAC;MAC5BC,MAAM,EAAE;QAAE,GAAGf,IAAI,CAACe;MAAO,CAAC;MAC1BC,IAAI,EAAE;QAAE,GAAGhB,IAAI,CAACgB;MAAK,CAAC;MACtBC,KAAK,EAAE;QAAE,GAAGjB,IAAI,CAACiB;MAAM;IACxB;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.byTone = byTone;
7
+ /**
8
+ * Builds a variant map with one entry per tone of the theme.
9
+ *
10
+ * Call it inline under a literal `variants` key, with the stylesheet's own
11
+ * `theme` argument:
12
+ *
13
+ * ```ts
14
+ * toneText: { variants: { tone: byTone(theme, t => ({ color: t.onContainer })) } },
15
+ * ```
16
+ *
17
+ * The Unistyles Babel plugin reads dependencies statically: a variants object
18
+ * built elsewhere, or a `theme` read through an alias, hides them and the
19
+ * style stops updating on theme or variant changes.
20
+ */
21
+ function byTone(theme, build) {
22
+ const result = {};
23
+ for (const name of Object.keys(theme.tone)) {
24
+ result[name] = build(theme.tone[name], name);
25
+ }
26
+ return result;
27
+ }
28
+ //# sourceMappingURL=byTone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["byTone","theme","build","result","name","Object","keys","tone"],"sourceRoot":"../../../src","sources":["presets/byTone.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,MAAMA,CACrBC,KAAa,EACbC,KAAwE,EACxB;EAChD,MAAMC,MAAM,GAAG,CAAC,CAAkD;EAElE,KAAK,MAAMC,IAAI,IAAIC,MAAM,CAACC,IAAI,CAACL,KAAK,CAACM,IAAI,CAAC,EAA0C;IACnFJ,MAAM,CAACC,IAAI,CAAC,GAAGF,KAAK,CAACD,KAAK,CAACM,IAAI,CAACH,IAAI,CAAC,EAAEA,IAAI,CAAC;EAC7C;EAEA,OAAOD,MAAM;AACd","ignoreList":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.presets = exports.layout = void 0;
7
+ /**
8
+ * Theme-independent flex presets. Spread them inside `StyleSheet.create` or
9
+ * put them in a style array; styles built only from these carry no theme
10
+ * dependency, so Unistyles never recalculates them on a theme change.
11
+ */
12
+ const layout = exports.layout = {
13
+ row: {
14
+ flexDirection: 'row'
15
+ },
16
+ column: {
17
+ flexDirection: 'column'
18
+ },
19
+ rowCenter: {
20
+ flexDirection: 'row',
21
+ alignItems: 'center'
22
+ },
23
+ rowBetween: {
24
+ flexDirection: 'row',
25
+ alignItems: 'center',
26
+ justifyContent: 'space-between'
27
+ },
28
+ center: {
29
+ alignItems: 'center',
30
+ justifyContent: 'center'
31
+ },
32
+ fill: {
33
+ flex: 1
34
+ },
35
+ wrap: {
36
+ flexDirection: 'row',
37
+ flexWrap: 'wrap'
38
+ },
39
+ absoluteFill: {
40
+ position: 'absolute',
41
+ top: 0,
42
+ right: 0,
43
+ bottom: 0,
44
+ left: 0
45
+ },
46
+ selfStart: {
47
+ alignSelf: 'flex-start'
48
+ },
49
+ selfCenter: {
50
+ alignSelf: 'center'
51
+ },
52
+ selfEnd: {
53
+ alignSelf: 'flex-end'
54
+ }
55
+ };
56
+ // Annotated rather than `as const`: a readonly `fontVariant` tuple fails
57
+ // React Native's `TextStyle` and degrades inference of sibling styles (spec AC-3.7).
58
+ const presets = exports.presets = {
59
+ glyphAlign: {
60
+ includeFontPadding: false,
61
+ textAlignVertical: 'center'
62
+ },
63
+ tabularNums: {
64
+ fontVariant: ['tabular-nums']
65
+ }
66
+ };
67
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["layout","exports","row","flexDirection","column","rowCenter","alignItems","rowBetween","justifyContent","center","fill","flex","wrap","flexWrap","absoluteFill","position","top","right","bottom","left","selfStart","alignSelf","selfCenter","selfEnd","presets","glyphAlign","includeFontPadding","textAlignVertical","tabularNums","fontVariant"],"sourceRoot":"../../../src","sources":["presets/layout.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMA,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACrBE,GAAG,EAAE;IAAEC,aAAa,EAAE;EAAM,CAAC;EAC7BC,MAAM,EAAE;IAAED,aAAa,EAAE;EAAS,CAAC;EACnCE,SAAS,EAAE;IAAEF,aAAa,EAAE,KAAK;IAAEG,UAAU,EAAE;EAAS,CAAC;EACzDC,UAAU,EAAE;IAAEJ,aAAa,EAAE,KAAK;IAAEG,UAAU,EAAE,QAAQ;IAAEE,cAAc,EAAE;EAAgB,CAAC;EAC3FC,MAAM,EAAE;IAAEH,UAAU,EAAE,QAAQ;IAAEE,cAAc,EAAE;EAAS,CAAC;EAC1DE,IAAI,EAAE;IAAEC,IAAI,EAAE;EAAE,CAAC;EACjBC,IAAI,EAAE;IAAET,aAAa,EAAE,KAAK;IAAEU,QAAQ,EAAE;EAAO,CAAC;EAChDC,YAAY,EAAE;IAAEC,QAAQ,EAAE,UAAU;IAAEC,GAAG,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE,CAAC;IAAEC,IAAI,EAAE;EAAE,CAAC;EAC5EC,SAAS,EAAE;IAAEC,SAAS,EAAE;EAAa,CAAC;EACtCC,UAAU,EAAE;IAAED,SAAS,EAAE;EAAS,CAAC;EACnCE,OAAO,EAAE;IAAEF,SAAS,EAAE;EAAW;AAClC,CAA8C;AAa9C;AACA;AACO,MAAMG,OAA0B,GAAAvB,OAAA,CAAAuB,OAAA,GAAG;EACzCC,UAAU,EAAE;IAAEC,kBAAkB,EAAE,KAAK;IAAEC,iBAAiB,EAAE;EAAS,CAAC;EACtEC,WAAW,EAAE;IAAEC,WAAW,EAAE,CAAC,cAAc;EAAE;AAC9C,CAAC","ignoreList":[]}
@@ -0,0 +1,115 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PRESET_KEYS = void 0;
7
+ exports.buildPresets = buildPresets;
8
+ const PRESET_KEYS = exports.PRESET_KEYS = ['text', 'stack', 'inline', 'border', 'box'];
9
+ function textPreset(token, color) {
10
+ return {
11
+ ...token,
12
+ color
13
+ };
14
+ }
15
+ function buildText({
16
+ typography
17
+ }, color) {
18
+ return {
19
+ body: textPreset(typography.body, color.onSurface),
20
+ bodyMuted: textPreset(typography.body, color.onSurfaceVariant),
21
+ label: textPreset(typography.label, color.onSurface),
22
+ labelMuted: textPreset(typography.label, color.onSurfaceVariant),
23
+ caption: textPreset(typography.caption, color.onSurfaceVariant),
24
+ title: textPreset(typography.title, color.onSurface),
25
+ headline: textPreset(typography.headline, color.onSurface),
26
+ disabled: textPreset(typography.body, color.disabled)
27
+ };
28
+ }
29
+ function bySpacing(spacing, build) {
30
+ const result = {};
31
+ for (const key of Object.keys(spacing)) {
32
+ result[key] = build(spacing[key]);
33
+ }
34
+ return result;
35
+ }
36
+ function buildBorder({
37
+ borderWidth,
38
+ color
39
+ }) {
40
+ return {
41
+ hairline: {
42
+ borderWidth: borderWidth.hairline,
43
+ borderColor: color.outlineVariant
44
+ },
45
+ top: {
46
+ borderTopWidth: borderWidth.thin,
47
+ borderTopColor: color.outlineVariant
48
+ },
49
+ bottom: {
50
+ borderBottomWidth: borderWidth.thin,
51
+ borderBottomColor: color.outlineVariant
52
+ },
53
+ all: {
54
+ borderWidth: borderWidth.thin,
55
+ borderColor: color.outline
56
+ }
57
+ };
58
+ }
59
+ function buildBox({
60
+ borderWidth,
61
+ color,
62
+ radius,
63
+ spacing,
64
+ size
65
+ }) {
66
+ return {
67
+ outlined: {
68
+ borderWidth: borderWidth.thin,
69
+ borderColor: color.outline,
70
+ borderRadius: radius.md,
71
+ padding: spacing.sm,
72
+ gap: spacing.xs
73
+ },
74
+ card: {
75
+ backgroundColor: color.surfaceContainerLow,
76
+ borderRadius: radius.lg,
77
+ padding: spacing.md,
78
+ gap: spacing.sm
79
+ },
80
+ sheet: {
81
+ backgroundColor: color.surfaceContainerLow,
82
+ borderTopLeftRadius: radius.xl,
83
+ borderTopRightRadius: radius.xl,
84
+ padding: spacing.md,
85
+ gap: spacing.md
86
+ },
87
+ touchTarget: {
88
+ minWidth: size.touchTarget,
89
+ minHeight: size.touchTarget,
90
+ justifyContent: 'center'
91
+ }
92
+ };
93
+ }
94
+
95
+ /**
96
+ * Token-reading presets, built from the theme's final (overridden) tokens so
97
+ * they follow every override — e.g. `radius.md = 0` reaches `box.outlined`.
98
+ */
99
+ function buildPresets(tokens) {
100
+ return {
101
+ text: buildText(tokens, tokens.color),
102
+ stack: bySpacing(tokens.spacing, gap => ({
103
+ flexDirection: 'column',
104
+ gap
105
+ })),
106
+ inline: bySpacing(tokens.spacing, gap => ({
107
+ flexDirection: 'row',
108
+ alignItems: 'center',
109
+ gap
110
+ })),
111
+ border: buildBorder(tokens),
112
+ box: buildBox(tokens)
113
+ };
114
+ }
115
+ //# sourceMappingURL=themePresets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PRESET_KEYS","exports","textPreset","token","color","buildText","typography","body","onSurface","bodyMuted","onSurfaceVariant","label","labelMuted","caption","title","headline","disabled","bySpacing","spacing","build","result","key","Object","keys","buildBorder","borderWidth","hairline","borderColor","outlineVariant","top","borderTopWidth","thin","borderTopColor","bottom","borderBottomWidth","borderBottomColor","all","outline","buildBox","radius","size","outlined","borderRadius","md","padding","sm","gap","xs","card","backgroundColor","surfaceContainerLow","lg","sheet","borderTopLeftRadius","xl","borderTopRightRadius","touchTarget","minWidth","minHeight","justifyContent","buildPresets","tokens","text","stack","flexDirection","inline","alignItems","border","box"],"sourceRoot":"../../../src","sources":["presets/themePresets.ts"],"mappings":";;;;;;;AAgBO,MAAMA,WAAiC,GAAAC,OAAA,CAAAD,WAAA,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC;AAE7F,SAASE,UAAUA,CAACC,KAAsB,EAAEC,KAAa,EAAc;EACtE,OAAO;IAAE,GAAGD,KAAK;IAAEC;EAAM,CAAC;AAC3B;AAEA,SAASC,SAASA,CAAC;EAAEC;AAAwB,CAAC,EAAEF,KAAiB,EAAe;EAC/E,OAAO;IACNG,IAAI,EAAEL,UAAU,CAACI,UAAU,CAACC,IAAI,EAAEH,KAAK,CAACI,SAAS,CAAC;IAClDC,SAAS,EAAEP,UAAU,CAACI,UAAU,CAACC,IAAI,EAAEH,KAAK,CAACM,gBAAgB,CAAC;IAC9DC,KAAK,EAAET,UAAU,CAACI,UAAU,CAACK,KAAK,EAAEP,KAAK,CAACI,SAAS,CAAC;IACpDI,UAAU,EAAEV,UAAU,CAACI,UAAU,CAACK,KAAK,EAAEP,KAAK,CAACM,gBAAgB,CAAC;IAChEG,OAAO,EAAEX,UAAU,CAACI,UAAU,CAACO,OAAO,EAAET,KAAK,CAACM,gBAAgB,CAAC;IAC/DI,KAAK,EAAEZ,UAAU,CAACI,UAAU,CAACQ,KAAK,EAAEV,KAAK,CAACI,SAAS,CAAC;IACpDO,QAAQ,EAAEb,UAAU,CAACI,UAAU,CAACS,QAAQ,EAAEX,KAAK,CAACI,SAAS,CAAC;IAC1DQ,QAAQ,EAAEd,UA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