@multiplatform.one/theme 7.83.1 → 7.83.2

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 (810) hide show
  1. package/dist/cjs/audit/constraintAudit.cjs +567 -0
  2. package/dist/cjs/audit/constraintAudit.native.js +948 -0
  3. package/dist/cjs/audit/constraintAudit.native.js.map +1 -0
  4. package/dist/cjs/audit/designTokens.cjs +53 -0
  5. package/dist/cjs/audit/designTokens.native.js +80 -0
  6. package/dist/cjs/audit/designTokens.native.js.map +1 -0
  7. package/dist/cjs/audit/diffReport.cjs +255 -0
  8. package/dist/cjs/audit/diffReport.native.js +519 -0
  9. package/dist/cjs/audit/diffReport.native.js.map +1 -0
  10. package/dist/cjs/audit/index.cjs +41 -0
  11. package/dist/cjs/audit/index.native.js +44 -0
  12. package/dist/cjs/audit/index.native.js.map +1 -0
  13. package/dist/cjs/audit/themeMatrix.cjs +924 -0
  14. package/dist/cjs/audit/themeMatrix.native.js +1552 -0
  15. package/dist/cjs/audit/themeMatrix.native.js.map +1 -0
  16. package/dist/cjs/dates.cjs +261 -0
  17. package/dist/cjs/dates.native.js +289 -0
  18. package/dist/cjs/dates.native.js.map +1 -0
  19. package/dist/cjs/devWarn.cjs +163 -0
  20. package/dist/cjs/devWarn.native.js +191 -0
  21. package/dist/cjs/devWarn.native.js.map +1 -0
  22. package/dist/cjs/expo.cjs +82 -0
  23. package/dist/cjs/expo.native.js +87 -0
  24. package/dist/cjs/expo.native.js.map +1 -0
  25. package/dist/cjs/figma/figmaTokens.cjs +350 -0
  26. package/dist/cjs/figma/figmaTokens.native.js +637 -0
  27. package/dist/cjs/figma/figmaTokens.native.js.map +1 -0
  28. package/dist/cjs/font.cjs +65 -0
  29. package/dist/cjs/font.native.js +74 -0
  30. package/dist/cjs/font.native.js.map +1 -0
  31. package/dist/cjs/fonts/createFontLoader.cjs +32 -0
  32. package/dist/cjs/fonts/createFontLoader.native.js +69 -0
  33. package/dist/cjs/fonts/createFontLoader.native.js.map +1 -0
  34. package/dist/cjs/fonts/index.cjs +21 -0
  35. package/dist/cjs/fonts/index.native.js +24 -0
  36. package/dist/cjs/fonts/index.native.js.map +1 -0
  37. package/dist/cjs/fonts/types.cjs +18 -0
  38. package/dist/cjs/fonts/types.native.js +21 -0
  39. package/dist/cjs/fonts/types.native.js.map +1 -0
  40. package/dist/cjs/index.cjs +39 -0
  41. package/dist/cjs/index.native.js +42 -0
  42. package/dist/cjs/index.native.js.map +1 -0
  43. package/dist/cjs/keyboardFocusRing.cjs +111 -0
  44. package/dist/cjs/keyboardFocusRing.native.js +116 -0
  45. package/dist/cjs/keyboardFocusRing.native.js.map +1 -0
  46. package/dist/cjs/menuRow.cjs +80 -0
  47. package/dist/cjs/menuRow.native.js +86 -0
  48. package/dist/cjs/menuRow.native.js.map +1 -0
  49. package/dist/cjs/numbers.cjs +161 -0
  50. package/dist/cjs/numbers.native.js +173 -0
  51. package/dist/cjs/numbers.native.js.map +1 -0
  52. package/dist/cjs/theme/FontKnobStyles.cjs +161 -0
  53. package/dist/cjs/theme/FontKnobStyles.native.js +41 -0
  54. package/dist/cjs/theme/FontKnobStyles.native.js.map +1 -0
  55. package/dist/cjs/theme/Heading.cjs +174 -0
  56. package/dist/cjs/theme/Heading.native.js +186 -0
  57. package/dist/cjs/theme/Heading.native.js.map +1 -0
  58. package/dist/cjs/theme/IconSlot.cjs +67 -0
  59. package/dist/cjs/theme/IconSlot.native.js +78 -0
  60. package/dist/cjs/theme/IconSlot.native.js.map +1 -0
  61. package/dist/cjs/theme/Intent.cjs +44 -0
  62. package/dist/cjs/theme/Intent.native.js +48 -0
  63. package/dist/cjs/theme/Intent.native.js.map +1 -0
  64. package/dist/cjs/theme/Preset.cjs +150 -0
  65. package/dist/cjs/theme/Preset.native.js +156 -0
  66. package/dist/cjs/theme/Preset.native.js.map +1 -0
  67. package/dist/cjs/theme/PresetContext.cjs +38 -0
  68. package/dist/cjs/theme/PresetContext.native.js +42 -0
  69. package/dist/cjs/theme/PresetContext.native.js.map +1 -0
  70. package/dist/cjs/theme/Surface.cjs +115 -0
  71. package/dist/cjs/theme/Surface.native.js +126 -0
  72. package/dist/cjs/theme/Surface.native.js.map +1 -0
  73. package/dist/cjs/theme/Text.cjs +147 -0
  74. package/dist/cjs/theme/Text.native.js +155 -0
  75. package/dist/cjs/theme/Text.native.js.map +1 -0
  76. package/dist/cjs/theme/Tint.cjs +55 -0
  77. package/dist/cjs/theme/Tint.native.js +59 -0
  78. package/dist/cjs/theme/Tint.native.js.map +1 -0
  79. package/dist/cjs/theme/activateThemeConfig.cjs +42 -0
  80. package/dist/cjs/theme/activateThemeConfig.native.js +45 -0
  81. package/dist/cjs/theme/activateThemeConfig.native.js.map +1 -0
  82. package/dist/cjs/theme/animations/css.cjs +36 -0
  83. package/dist/cjs/theme/animations/css.native.js +39 -0
  84. package/dist/cjs/theme/animations/css.native.js.map +1 -0
  85. package/dist/cjs/theme/animations/index.cjs +20 -0
  86. package/dist/cjs/theme/animations/index.native.js +23 -0
  87. package/dist/cjs/theme/animations/index.native.js.map +1 -0
  88. package/dist/cjs/theme/animations/reactNative.cjs +158 -0
  89. package/dist/cjs/theme/animations/reactNative.native.js +161 -0
  90. package/dist/cjs/theme/animations/reactNative.native.js.map +1 -0
  91. package/dist/cjs/theme/chartPalette.cjs +229 -0
  92. package/dist/cjs/theme/chartPalette.native.js +297 -0
  93. package/dist/cjs/theme/chartPalette.native.js.map +1 -0
  94. package/dist/cjs/theme/colorRules.cjs +300 -0
  95. package/dist/cjs/theme/colorRules.native.js +330 -0
  96. package/dist/cjs/theme/colorRules.native.js.map +1 -0
  97. package/dist/cjs/theme/controlTiers.cjs +67 -0
  98. package/dist/cjs/theme/controlTiers.native.js +72 -0
  99. package/dist/cjs/theme/controlTiers.native.js.map +1 -0
  100. package/dist/cjs/theme/cookies.cjs +183 -0
  101. package/dist/cjs/theme/cookies.native.js +309 -0
  102. package/dist/cjs/theme/cookies.native.js.map +1 -0
  103. package/dist/cjs/theme/cornerSmoothing.cjs +111 -0
  104. package/dist/cjs/theme/cornerSmoothing.native.js +71 -0
  105. package/dist/cjs/theme/cornerSmoothing.native.js.map +1 -0
  106. package/dist/cjs/theme/createDefaultThemeConfig.cjs +130 -0
  107. package/dist/cjs/theme/createDefaultThemeConfig.native.js +176 -0
  108. package/dist/cjs/theme/createDefaultThemeConfig.native.js.map +1 -0
  109. package/dist/cjs/theme/createThemes.cjs +737 -0
  110. package/dist/cjs/theme/createThemes.native.js +1183 -0
  111. package/dist/cjs/theme/createThemes.native.js.map +1 -0
  112. package/dist/cjs/theme/dedupeInherited.cjs +83 -0
  113. package/dist/cjs/theme/dedupeInherited.native.js +194 -0
  114. package/dist/cjs/theme/dedupeInherited.native.js.map +1 -0
  115. package/dist/cjs/theme/defaults/accent.cjs +32 -0
  116. package/dist/cjs/theme/defaults/accent.native.js +35 -0
  117. package/dist/cjs/theme/defaults/accent.native.js.map +1 -0
  118. package/dist/cjs/theme/defaults/base.cjs +48 -0
  119. package/dist/cjs/theme/defaults/base.native.js +51 -0
  120. package/dist/cjs/theme/defaults/base.native.js.map +1 -0
  121. package/dist/cjs/theme/defaults/builderOptions.cjs +192 -0
  122. package/dist/cjs/theme/defaults/builderOptions.native.js +263 -0
  123. package/dist/cjs/theme/defaults/builderOptions.native.js.map +1 -0
  124. package/dist/cjs/theme/defaults/categoryFonts.cjs +50 -0
  125. package/dist/cjs/theme/defaults/categoryFonts.native.js +53 -0
  126. package/dist/cjs/theme/defaults/categoryFonts.native.js.map +1 -0
  127. package/dist/cjs/theme/defaults/fonts.cjs +301 -0
  128. package/dist/cjs/theme/defaults/fonts.native.js +390 -0
  129. package/dist/cjs/theme/defaults/fonts.native.js.map +1 -0
  130. package/dist/cjs/theme/defaults/house.cjs +39 -0
  131. package/dist/cjs/theme/defaults/house.native.js +46 -0
  132. package/dist/cjs/theme/defaults/house.native.js.map +1 -0
  133. package/dist/cjs/theme/defaults/index.cjs +25 -0
  134. package/dist/cjs/theme/defaults/index.native.js +28 -0
  135. package/dist/cjs/theme/defaults/index.native.js.map +1 -0
  136. package/dist/cjs/theme/devtools/ColorLineVisualizer.cjs +243 -0
  137. package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js +269 -0
  138. package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js.map +1 -0
  139. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.cjs +1350 -0
  140. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js +1814 -0
  141. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -0
  142. package/dist/cjs/theme/devtools/animationOptions.cjs +36 -0
  143. package/dist/cjs/theme/devtools/animationOptions.native.js +46 -0
  144. package/dist/cjs/theme/devtools/animationOptions.native.js.map +1 -0
  145. package/dist/cjs/theme/devtools/buildSnapshot.cjs +92 -0
  146. package/dist/cjs/theme/devtools/buildSnapshot.native.js +174 -0
  147. package/dist/cjs/theme/devtools/buildSnapshot.native.js.map +1 -0
  148. package/dist/cjs/theme/devtools/knobIcons.cjs +498 -0
  149. package/dist/cjs/theme/devtools/knobIcons.native.js +520 -0
  150. package/dist/cjs/theme/devtools/knobIcons.native.js.map +1 -0
  151. package/dist/cjs/theme/devtools/vizConstants.cjs +54 -0
  152. package/dist/cjs/theme/devtools/vizConstants.native.js +57 -0
  153. package/dist/cjs/theme/devtools/vizConstants.native.js.map +1 -0
  154. package/dist/cjs/theme/dynamicType.cjs +52 -0
  155. package/dist/cjs/theme/dynamicType.native.js +55 -0
  156. package/dist/cjs/theme/dynamicType.native.js.map +1 -0
  157. package/dist/cjs/theme/fieldFocus.cjs +56 -0
  158. package/dist/cjs/theme/fieldFocus.native.js +62 -0
  159. package/dist/cjs/theme/fieldFocus.native.js.map +1 -0
  160. package/dist/cjs/theme/fillContrast.cjs +130 -0
  161. package/dist/cjs/theme/fillContrast.native.js +163 -0
  162. package/dist/cjs/theme/fillContrast.native.js.map +1 -0
  163. package/dist/cjs/theme/focusState.cjs +120 -0
  164. package/dist/cjs/theme/focusState.native.js +123 -0
  165. package/dist/cjs/theme/focusState.native.js.map +1 -0
  166. package/dist/cjs/theme/fontCategoryMetrics.cjs +91 -0
  167. package/dist/cjs/theme/fontCategoryMetrics.native.js +94 -0
  168. package/dist/cjs/theme/fontCategoryMetrics.native.js.map +1 -0
  169. package/dist/cjs/theme/fontCategoryStacks.cjs +40 -0
  170. package/dist/cjs/theme/fontCategoryStacks.native.js +43 -0
  171. package/dist/cjs/theme/fontCategoryStacks.native.js.map +1 -0
  172. package/dist/cjs/theme/glyphPaint.cjs +55 -0
  173. package/dist/cjs/theme/glyphPaint.native.js +81 -0
  174. package/dist/cjs/theme/glyphPaint.native.js.map +1 -0
  175. package/dist/cjs/theme/glyphTint.cjs +113 -0
  176. package/dist/cjs/theme/glyphTint.native.js +125 -0
  177. package/dist/cjs/theme/glyphTint.native.js.map +1 -0
  178. package/dist/cjs/theme/groupGeometry.cjs +67 -0
  179. package/dist/cjs/theme/groupGeometry.native.js +72 -0
  180. package/dist/cjs/theme/groupGeometry.native.js.map +1 -0
  181. package/dist/cjs/theme/hairline.cjs +102 -0
  182. package/dist/cjs/theme/hairline.native.js +73 -0
  183. package/dist/cjs/theme/hairline.native.js.map +1 -0
  184. package/dist/cjs/theme/index.cjs +95 -0
  185. package/dist/cjs/theme/index.native.js +98 -0
  186. package/dist/cjs/theme/index.native.js.map +1 -0
  187. package/dist/cjs/theme/intents.cjs +62 -0
  188. package/dist/cjs/theme/intents.native.js +65 -0
  189. package/dist/cjs/theme/intents.native.js.map +1 -0
  190. package/dist/cjs/theme/knobs.cjs +172 -0
  191. package/dist/cjs/theme/knobs.native.js +175 -0
  192. package/dist/cjs/theme/knobs.native.js.map +1 -0
  193. package/dist/cjs/theme/layoutTokens.cjs +172 -0
  194. package/dist/cjs/theme/layoutTokens.native.js +222 -0
  195. package/dist/cjs/theme/layoutTokens.native.js.map +1 -0
  196. package/dist/cjs/theme/listRows.cjs +44 -0
  197. package/dist/cjs/theme/listRows.native.js +49 -0
  198. package/dist/cjs/theme/listRows.native.js.map +1 -0
  199. package/dist/cjs/theme/mergedTokens.cjs +39 -0
  200. package/dist/cjs/theme/mergedTokens.native.js +61 -0
  201. package/dist/cjs/theme/mergedTokens.native.js.map +1 -0
  202. package/dist/cjs/theme/motion.cjs +72 -0
  203. package/dist/cjs/theme/motion.native.js +82 -0
  204. package/dist/cjs/theme/motion.native.js.map +1 -0
  205. package/dist/cjs/theme/motionStops.cjs +28 -0
  206. package/dist/cjs/theme/motionStops.native.js +31 -0
  207. package/dist/cjs/theme/motionStops.native.js.map +1 -0
  208. package/dist/cjs/theme/motionTiming.cjs +79 -0
  209. package/dist/cjs/theme/motionTiming.native.js +85 -0
  210. package/dist/cjs/theme/motionTiming.native.js.map +1 -0
  211. package/dist/cjs/theme/nativeFontFamily.cjs +30 -0
  212. package/dist/cjs/theme/nativeFontFamily.native.js +37 -0
  213. package/dist/cjs/theme/nativeFontFamily.native.js.map +1 -0
  214. package/dist/cjs/theme/nativeMonoFamily.cjs +44 -0
  215. package/dist/cjs/theme/nativeMonoFamily.native.js +47 -0
  216. package/dist/cjs/theme/nativeMonoFamily.native.js.map +1 -0
  217. package/dist/cjs/theme/overlaySurfaces.cjs +327 -0
  218. package/dist/cjs/theme/overlaySurfaces.native.js +351 -0
  219. package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -0
  220. package/dist/cjs/theme/pageGutter.cjs +85 -0
  221. package/dist/cjs/theme/pageGutter.native.js +92 -0
  222. package/dist/cjs/theme/pageGutter.native.js.map +1 -0
  223. package/dist/cjs/theme/preset.types.cjs +18 -0
  224. package/dist/cjs/theme/preset.types.native.js +21 -0
  225. package/dist/cjs/theme/preset.types.native.js.map +1 -0
  226. package/dist/cjs/theme/presetPreview.cjs +42 -0
  227. package/dist/cjs/theme/presetPreview.native.js +46 -0
  228. package/dist/cjs/theme/presetPreview.native.js.map +1 -0
  229. package/dist/cjs/theme/presetStore.cjs +288 -0
  230. package/dist/cjs/theme/presetStore.native.js +344 -0
  231. package/dist/cjs/theme/presetStore.native.js.map +1 -0
  232. package/dist/cjs/theme/presetUserSync.cjs +70 -0
  233. package/dist/cjs/theme/presetUserSync.native.js +75 -0
  234. package/dist/cjs/theme/presetUserSync.native.js.map +1 -0
  235. package/dist/cjs/theme/presets.cjs +128 -0
  236. package/dist/cjs/theme/presets.native.js +131 -0
  237. package/dist/cjs/theme/presets.native.js.map +1 -0
  238. package/dist/cjs/theme/radiusClass.cjs +128 -0
  239. package/dist/cjs/theme/radiusClass.native.js +137 -0
  240. package/dist/cjs/theme/radiusClass.native.js.map +1 -0
  241. package/dist/cjs/theme/radiusClassTable.generated.cjs +164 -0
  242. package/dist/cjs/theme/radiusClassTable.generated.native.js +167 -0
  243. package/dist/cjs/theme/radiusClassTable.generated.native.js.map +1 -0
  244. package/dist/cjs/theme/ramps.cjs +75 -0
  245. package/dist/cjs/theme/ramps.native.js +79 -0
  246. package/dist/cjs/theme/ramps.native.js.map +1 -0
  247. package/dist/cjs/theme/readableColor.cjs +248 -0
  248. package/dist/cjs/theme/readableColor.native.js +354 -0
  249. package/dist/cjs/theme/readableColor.native.js.map +1 -0
  250. package/dist/cjs/theme/recipeInputs.cjs +352 -0
  251. package/dist/cjs/theme/recipeInputs.native.js +470 -0
  252. package/dist/cjs/theme/recipeInputs.native.js.map +1 -0
  253. package/dist/cjs/theme/recipes.cjs +18 -0
  254. package/dist/cjs/theme/recipes.native.js +21 -0
  255. package/dist/cjs/theme/recipes.native.js.map +1 -0
  256. package/dist/cjs/theme/resolveKnobs.cjs +778 -0
  257. package/dist/cjs/theme/resolveKnobs.native.js +795 -0
  258. package/dist/cjs/theme/resolveKnobs.native.js.map +1 -0
  259. package/dist/cjs/theme/scale/ScaleStyles.cjs +57 -0
  260. package/dist/cjs/theme/scale/ScaleStyles.native.js +41 -0
  261. package/dist/cjs/theme/scale/ScaleStyles.native.js.map +1 -0
  262. package/dist/cjs/theme/scale/activeScale.cjs +56 -0
  263. package/dist/cjs/theme/scale/activeScale.native.js +84 -0
  264. package/dist/cjs/theme/scale/activeScale.native.js.map +1 -0
  265. package/dist/cjs/theme/scale/deriveRecipeInputs.cjs +111 -0
  266. package/dist/cjs/theme/scale/deriveRecipeInputs.native.js +154 -0
  267. package/dist/cjs/theme/scale/deriveRecipeInputs.native.js.map +1 -0
  268. package/dist/cjs/theme/scale/generateScale.cjs +114 -0
  269. package/dist/cjs/theme/scale/generateScale.native.js +200 -0
  270. package/dist/cjs/theme/scale/generateScale.native.js.map +1 -0
  271. package/dist/cjs/theme/scale/index.cjs +78 -0
  272. package/dist/cjs/theme/scale/index.native.js +81 -0
  273. package/dist/cjs/theme/scale/index.native.js.map +1 -0
  274. package/dist/cjs/theme/scale/installScaleConfig.cjs +31 -0
  275. package/dist/cjs/theme/scale/installScaleConfig.native.js +65 -0
  276. package/dist/cjs/theme/scale/installScaleConfig.native.js.map +1 -0
  277. package/dist/cjs/theme/scale/scaleAttribute.cjs +39 -0
  278. package/dist/cjs/theme/scale/scaleAttribute.native.js +42 -0
  279. package/dist/cjs/theme/scale/scaleAttribute.native.js.map +1 -0
  280. package/dist/cjs/theme/scale/scaleCss.cjs +89 -0
  281. package/dist/cjs/theme/scale/scaleCss.native.js +201 -0
  282. package/dist/cjs/theme/scale/scaleCss.native.js.map +1 -0
  283. package/dist/cjs/theme/scale/scaleFonts.cjs +86 -0
  284. package/dist/cjs/theme/scale/scaleFonts.native.js +155 -0
  285. package/dist/cjs/theme/scale/scaleFonts.native.js.map +1 -0
  286. package/dist/cjs/theme/scale/scaleInputs.cjs +232 -0
  287. package/dist/cjs/theme/scale/scaleInputs.native.js +237 -0
  288. package/dist/cjs/theme/scale/scaleInputs.native.js.map +1 -0
  289. package/dist/cjs/theme/scale/themeScales.cjs +136 -0
  290. package/dist/cjs/theme/scale/themeScales.native.js +185 -0
  291. package/dist/cjs/theme/scale/themeScales.native.js.map +1 -0
  292. package/dist/cjs/theme/scale/useActiveScale.cjs +78 -0
  293. package/dist/cjs/theme/scale/useActiveScale.native.js +87 -0
  294. package/dist/cjs/theme/scale/useActiveScale.native.js.map +1 -0
  295. package/dist/cjs/theme/schemeStore.cjs +87 -0
  296. package/dist/cjs/theme/schemeStore.native.js +104 -0
  297. package/dist/cjs/theme/schemeStore.native.js.map +1 -0
  298. package/dist/cjs/theme/shared.cjs +125 -0
  299. package/dist/cjs/theme/shared.native.js +168 -0
  300. package/dist/cjs/theme/shared.native.js.map +1 -0
  301. package/dist/cjs/theme/sizeRecipes.cjs +176 -0
  302. package/dist/cjs/theme/sizeRecipes.native.js +251 -0
  303. package/dist/cjs/theme/sizeRecipes.native.js.map +1 -0
  304. package/dist/cjs/theme/subsetThemes.cjs +46 -0
  305. package/dist/cjs/theme/subsetThemes.native.js +76 -0
  306. package/dist/cjs/theme/subsetThemes.native.js.map +1 -0
  307. package/dist/cjs/theme/theme.cjs +189 -0
  308. package/dist/cjs/theme/theme.native.js +115 -0
  309. package/dist/cjs/theme/theme.native.js.map +1 -0
  310. package/dist/cjs/theme/themeValue.cjs +51 -0
  311. package/dist/cjs/theme/themeValue.native.js +73 -0
  312. package/dist/cjs/theme/themeValue.native.js.map +1 -0
  313. package/dist/cjs/theme/tileSizes.cjs +202 -0
  314. package/dist/cjs/theme/tileSizes.native.js +230 -0
  315. package/dist/cjs/theme/tileSizes.native.js.map +1 -0
  316. package/dist/cjs/theme/touchManipulation.cjs +33 -0
  317. package/dist/cjs/theme/touchManipulation.native.js +36 -0
  318. package/dist/cjs/theme/touchManipulation.native.js.map +1 -0
  319. package/dist/cjs/theme/transitionProps.cjs +50 -0
  320. package/dist/cjs/theme/transitionProps.native.js +81 -0
  321. package/dist/cjs/theme/transitionProps.native.js.map +1 -0
  322. package/dist/cjs/theme/useColorScale.cjs +47 -0
  323. package/dist/cjs/theme/useColorScale.native.js +33 -0
  324. package/dist/cjs/theme/useColorScale.native.js.map +1 -0
  325. package/dist/cjs/theme/usePresetSwitch.cjs +70 -0
  326. package/dist/cjs/theme/usePresetSwitch.native.js +50 -0
  327. package/dist/cjs/theme/usePresetSwitch.native.js.map +1 -0
  328. package/dist/cjs/theme/useResolvedKnobs.cjs +140 -0
  329. package/dist/cjs/theme/useResolvedKnobs.native.js +177 -0
  330. package/dist/cjs/theme/useResolvedKnobs.native.js.map +1 -0
  331. package/dist/cjs/theme/useSchemePreference.cjs +49 -0
  332. package/dist/cjs/theme/useSchemePreference.native.js +80 -0
  333. package/dist/cjs/theme/useSchemePreference.native.js.map +1 -0
  334. package/dist/cjs/theme/useTheme.cjs +152 -0
  335. package/dist/cjs/theme/useTheme.native.js +94 -0
  336. package/dist/cjs/theme/useTheme.native.js.map +1 -0
  337. package/dist/cjs/theme/useTouchSurface.cjs +33 -0
  338. package/dist/cjs/theme/useTouchSurface.native.js +36 -0
  339. package/dist/cjs/theme/useTouchSurface.native.js.map +1 -0
  340. package/dist/cjs/theme/v3TokenRoles.cjs +64 -0
  341. package/dist/cjs/theme/v3TokenRoles.native.js +67 -0
  342. package/dist/cjs/theme/v3TokenRoles.native.js.map +1 -0
  343. package/dist/esm/audit/constraintAudit.mjs +540 -0
  344. package/dist/esm/audit/constraintAudit.mjs.map +1 -0
  345. package/dist/esm/audit/constraintAudit.native.js +918 -0
  346. package/dist/esm/audit/constraintAudit.native.js.map +1 -0
  347. package/dist/esm/audit/designTokens.mjs +28 -0
  348. package/dist/esm/audit/designTokens.mjs.map +1 -0
  349. package/dist/esm/audit/designTokens.native.js +52 -0
  350. package/dist/esm/audit/designTokens.native.js.map +1 -0
  351. package/dist/esm/audit/diffReport.mjs +229 -0
  352. package/dist/esm/audit/diffReport.mjs.map +1 -0
  353. package/dist/esm/audit/diffReport.native.js +490 -0
  354. package/dist/esm/audit/diffReport.native.js.map +1 -0
  355. package/dist/esm/audit/index.mjs +5 -0
  356. package/dist/esm/audit/index.mjs.map +1 -0
  357. package/dist/esm/audit/index.native.js +5 -0
  358. package/dist/esm/audit/index.native.js.map +1 -0
  359. package/dist/esm/audit/themeMatrix.mjs +890 -0
  360. package/dist/esm/audit/themeMatrix.mjs.map +1 -0
  361. package/dist/esm/audit/themeMatrix.native.js +1515 -0
  362. package/dist/esm/audit/themeMatrix.native.js.map +1 -0
  363. package/dist/esm/dates.mjs +224 -0
  364. package/dist/esm/dates.mjs.map +1 -0
  365. package/dist/esm/dates.native.js +249 -0
  366. package/dist/esm/dates.native.js.map +1 -0
  367. package/dist/esm/devWarn.mjs +123 -0
  368. package/dist/esm/devWarn.mjs.map +1 -0
  369. package/dist/esm/devWarn.native.js +148 -0
  370. package/dist/esm/devWarn.native.js.map +1 -0
  371. package/dist/esm/expo.mjs +53 -0
  372. package/dist/esm/expo.mjs.map +1 -0
  373. package/dist/esm/expo.native.js +55 -0
  374. package/dist/esm/expo.native.js.map +1 -0
  375. package/dist/esm/figma/figmaTokens.mjs +322 -0
  376. package/dist/esm/figma/figmaTokens.mjs.map +1 -0
  377. package/dist/esm/figma/figmaTokens.native.js +606 -0
  378. package/dist/esm/figma/figmaTokens.native.js.map +1 -0
  379. package/dist/esm/font.mjs +40 -0
  380. package/dist/esm/font.mjs.map +1 -0
  381. package/dist/esm/font.native.js +46 -0
  382. package/dist/esm/font.native.js.map +1 -0
  383. package/dist/esm/fonts/createFontLoader.mjs +7 -0
  384. package/dist/esm/fonts/createFontLoader.mjs.map +1 -0
  385. package/dist/esm/fonts/createFontLoader.native.js +41 -0
  386. package/dist/esm/fonts/createFontLoader.native.js.map +1 -0
  387. package/dist/esm/fonts/index.mjs +3 -0
  388. package/dist/esm/fonts/index.mjs.map +1 -0
  389. package/dist/esm/fonts/index.native.js +3 -0
  390. package/dist/esm/fonts/index.native.js.map +1 -0
  391. package/dist/esm/fonts/types.mjs +2 -0
  392. package/dist/esm/fonts/types.mjs.map +1 -0
  393. package/dist/esm/fonts/types.native.js +2 -0
  394. package/dist/esm/fonts/types.native.js.map +1 -0
  395. package/dist/esm/index.mjs +11 -0
  396. package/dist/esm/index.mjs.map +1 -0
  397. package/dist/esm/index.native.js +11 -0
  398. package/dist/esm/index.native.js.map +1 -0
  399. package/dist/esm/keyboardFocusRing.mjs +81 -0
  400. package/dist/esm/keyboardFocusRing.mjs.map +1 -0
  401. package/dist/esm/keyboardFocusRing.native.js +83 -0
  402. package/dist/esm/keyboardFocusRing.native.js.map +1 -0
  403. package/dist/esm/menuRow.mjs +49 -0
  404. package/dist/esm/menuRow.mjs.map +1 -0
  405. package/dist/esm/menuRow.native.js +52 -0
  406. package/dist/esm/menuRow.native.js.map +1 -0
  407. package/dist/esm/numbers.mjs +132 -0
  408. package/dist/esm/numbers.mjs.map +1 -0
  409. package/dist/esm/numbers.native.js +141 -0
  410. package/dist/esm/numbers.native.js.map +1 -0
  411. package/dist/esm/theme/FontKnobStyles.mjs +131 -0
  412. package/dist/esm/theme/FontKnobStyles.mjs.map +1 -0
  413. package/dist/esm/theme/FontKnobStyles.native.js +11 -0
  414. package/dist/esm/theme/FontKnobStyles.native.js.map +1 -0
  415. package/dist/esm/theme/Heading.mjs +143 -0
  416. package/dist/esm/theme/Heading.mjs.map +1 -0
  417. package/dist/esm/theme/Heading.native.js +152 -0
  418. package/dist/esm/theme/Heading.native.js.map +1 -0
  419. package/dist/esm/theme/IconSlot.mjs +42 -0
  420. package/dist/esm/theme/IconSlot.mjs.map +1 -0
  421. package/dist/esm/theme/IconSlot.native.js +50 -0
  422. package/dist/esm/theme/IconSlot.native.js.map +1 -0
  423. package/dist/esm/theme/Intent.mjs +19 -0
  424. package/dist/esm/theme/Intent.mjs.map +1 -0
  425. package/dist/esm/theme/Intent.native.js +20 -0
  426. package/dist/esm/theme/Intent.native.js.map +1 -0
  427. package/dist/esm/theme/Preset.mjs +124 -0
  428. package/dist/esm/theme/Preset.mjs.map +1 -0
  429. package/dist/esm/theme/Preset.native.js +127 -0
  430. package/dist/esm/theme/Preset.native.js.map +1 -0
  431. package/dist/esm/theme/PresetContext.mjs +11 -0
  432. package/dist/esm/theme/PresetContext.mjs.map +1 -0
  433. package/dist/esm/theme/PresetContext.native.js +12 -0
  434. package/dist/esm/theme/PresetContext.native.js.map +1 -0
  435. package/dist/esm/theme/Surface.mjs +80 -0
  436. package/dist/esm/theme/Surface.mjs.map +1 -0
  437. package/dist/esm/theme/Surface.native.js +88 -0
  438. package/dist/esm/theme/Surface.native.js.map +1 -0
  439. package/dist/esm/theme/Text.mjs +119 -0
  440. package/dist/esm/theme/Text.mjs.map +1 -0
  441. package/dist/esm/theme/Text.native.js +124 -0
  442. package/dist/esm/theme/Text.native.js.map +1 -0
  443. package/dist/esm/theme/Tint.mjs +29 -0
  444. package/dist/esm/theme/Tint.mjs.map +1 -0
  445. package/dist/esm/theme/Tint.native.js +30 -0
  446. package/dist/esm/theme/Tint.native.js.map +1 -0
  447. package/dist/esm/theme/activateThemeConfig.mjs +17 -0
  448. package/dist/esm/theme/activateThemeConfig.mjs.map +1 -0
  449. package/dist/esm/theme/activateThemeConfig.native.js +17 -0
  450. package/dist/esm/theme/activateThemeConfig.native.js.map +1 -0
  451. package/dist/esm/theme/animations/css.mjs +7 -0
  452. package/dist/esm/theme/animations/css.mjs.map +1 -0
  453. package/dist/esm/theme/animations/css.native.js +7 -0
  454. package/dist/esm/theme/animations/css.native.js.map +1 -0
  455. package/dist/esm/theme/animations/index.mjs +2 -0
  456. package/dist/esm/theme/animations/index.mjs.map +1 -0
  457. package/dist/esm/theme/animations/index.native.js +2 -0
  458. package/dist/esm/theme/animations/index.native.js.map +1 -0
  459. package/dist/esm/theme/animations/reactNative.mjs +131 -0
  460. package/dist/esm/theme/animations/reactNative.mjs.map +1 -0
  461. package/dist/esm/theme/animations/reactNative.native.js +131 -0
  462. package/dist/esm/theme/animations/reactNative.native.js.map +1 -0
  463. package/dist/esm/theme/chartPalette.mjs +191 -0
  464. package/dist/esm/theme/chartPalette.mjs.map +1 -0
  465. package/dist/esm/theme/chartPalette.native.js +256 -0
  466. package/dist/esm/theme/chartPalette.native.js.map +1 -0
  467. package/dist/esm/theme/colorRules.mjs +251 -0
  468. package/dist/esm/theme/colorRules.mjs.map +1 -0
  469. package/dist/esm/theme/colorRules.native.js +278 -0
  470. package/dist/esm/theme/colorRules.native.js.map +1 -0
  471. package/dist/esm/theme/controlTiers.mjs +39 -0
  472. package/dist/esm/theme/controlTiers.mjs.map +1 -0
  473. package/dist/esm/theme/controlTiers.native.js +41 -0
  474. package/dist/esm/theme/controlTiers.native.js.map +1 -0
  475. package/dist/esm/theme/cookies.mjs +145 -0
  476. package/dist/esm/theme/cookies.mjs.map +1 -0
  477. package/dist/esm/theme/cookies.native.js +268 -0
  478. package/dist/esm/theme/cookies.native.js.map +1 -0
  479. package/dist/esm/theme/cornerSmoothing.mjs +71 -0
  480. package/dist/esm/theme/cornerSmoothing.mjs.map +1 -0
  481. package/dist/esm/theme/cornerSmoothing.native.js +28 -0
  482. package/dist/esm/theme/cornerSmoothing.native.js.map +1 -0
  483. package/dist/esm/theme/createDefaultThemeConfig.mjs +102 -0
  484. package/dist/esm/theme/createDefaultThemeConfig.mjs.map +1 -0
  485. package/dist/esm/theme/createDefaultThemeConfig.native.js +145 -0
  486. package/dist/esm/theme/createDefaultThemeConfig.native.js.map +1 -0
  487. package/dist/esm/theme/createThemes.mjs +697 -0
  488. package/dist/esm/theme/createThemes.mjs.map +1 -0
  489. package/dist/esm/theme/createThemes.native.js +1140 -0
  490. package/dist/esm/theme/createThemes.native.js.map +1 -0
  491. package/dist/esm/theme/dedupeInherited.mjs +55 -0
  492. package/dist/esm/theme/dedupeInherited.mjs.map +1 -0
  493. package/dist/esm/theme/dedupeInherited.native.js +163 -0
  494. package/dist/esm/theme/dedupeInherited.native.js.map +1 -0
  495. package/dist/esm/theme/defaults/accent.mjs +7 -0
  496. package/dist/esm/theme/defaults/accent.mjs.map +1 -0
  497. package/dist/esm/theme/defaults/accent.native.js +7 -0
  498. package/dist/esm/theme/defaults/accent.native.js.map +1 -0
  499. package/dist/esm/theme/defaults/base.mjs +23 -0
  500. package/dist/esm/theme/defaults/base.mjs.map +1 -0
  501. package/dist/esm/theme/defaults/base.native.js +23 -0
  502. package/dist/esm/theme/defaults/base.native.js.map +1 -0
  503. package/dist/esm/theme/defaults/builderOptions.mjs +165 -0
  504. package/dist/esm/theme/defaults/builderOptions.mjs.map +1 -0
  505. package/dist/esm/theme/defaults/builderOptions.native.js +233 -0
  506. package/dist/esm/theme/defaults/builderOptions.native.js.map +1 -0
  507. package/dist/esm/theme/defaults/categoryFonts.mjs +25 -0
  508. package/dist/esm/theme/defaults/categoryFonts.mjs.map +1 -0
  509. package/dist/esm/theme/defaults/categoryFonts.native.js +25 -0
  510. package/dist/esm/theme/defaults/categoryFonts.native.js.map +1 -0
  511. package/dist/esm/theme/defaults/fonts.mjs +240 -0
  512. package/dist/esm/theme/defaults/fonts.mjs.map +1 -0
  513. package/dist/esm/theme/defaults/fonts.native.js +326 -0
  514. package/dist/esm/theme/defaults/fonts.native.js.map +1 -0
  515. package/dist/esm/theme/defaults/house.mjs +13 -0
  516. package/dist/esm/theme/defaults/house.mjs.map +1 -0
  517. package/dist/esm/theme/defaults/house.native.js +17 -0
  518. package/dist/esm/theme/defaults/house.native.js.map +1 -0
  519. package/dist/esm/theme/defaults/index.mjs +7 -0
  520. package/dist/esm/theme/defaults/index.mjs.map +1 -0
  521. package/dist/esm/theme/defaults/index.native.js +7 -0
  522. package/dist/esm/theme/defaults/index.native.js.map +1 -0
  523. package/dist/esm/theme/devtools/ColorLineVisualizer.mjs +218 -0
  524. package/dist/esm/theme/devtools/ColorLineVisualizer.mjs.map +1 -0
  525. package/dist/esm/theme/devtools/ColorLineVisualizer.native.js +230 -0
  526. package/dist/esm/theme/devtools/ColorLineVisualizer.native.js.map +1 -0
  527. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs +1325 -0
  528. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs.map +1 -0
  529. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js +1786 -0
  530. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -0
  531. package/dist/esm/theme/devtools/animationOptions.mjs +11 -0
  532. package/dist/esm/theme/devtools/animationOptions.mjs.map +1 -0
  533. package/dist/esm/theme/devtools/animationOptions.native.js +18 -0
  534. package/dist/esm/theme/devtools/animationOptions.native.js.map +1 -0
  535. package/dist/esm/theme/devtools/buildSnapshot.mjs +67 -0
  536. package/dist/esm/theme/devtools/buildSnapshot.mjs.map +1 -0
  537. package/dist/esm/theme/devtools/buildSnapshot.native.js +146 -0
  538. package/dist/esm/theme/devtools/buildSnapshot.native.js.map +1 -0
  539. package/dist/esm/theme/devtools/knobIcons.mjs +456 -0
  540. package/dist/esm/theme/devtools/knobIcons.mjs.map +1 -0
  541. package/dist/esm/theme/devtools/knobIcons.native.js +464 -0
  542. package/dist/esm/theme/devtools/knobIcons.native.js.map +1 -0
  543. package/dist/esm/theme/devtools/vizConstants.mjs +26 -0
  544. package/dist/esm/theme/devtools/vizConstants.mjs.map +1 -0
  545. package/dist/esm/theme/devtools/vizConstants.native.js +26 -0
  546. package/dist/esm/theme/devtools/vizConstants.native.js.map +1 -0
  547. package/dist/esm/theme/dynamicType.mjs +24 -0
  548. package/dist/esm/theme/dynamicType.mjs.map +1 -0
  549. package/dist/esm/theme/dynamicType.native.js +24 -0
  550. package/dist/esm/theme/dynamicType.native.js.map +1 -0
  551. package/dist/esm/theme/fieldFocus.mjs +27 -0
  552. package/dist/esm/theme/fieldFocus.mjs.map +1 -0
  553. package/dist/esm/theme/fieldFocus.native.js +30 -0
  554. package/dist/esm/theme/fieldFocus.native.js.map +1 -0
  555. package/dist/esm/theme/fillContrast.mjs +98 -0
  556. package/dist/esm/theme/fillContrast.mjs.map +1 -0
  557. package/dist/esm/theme/fillContrast.native.js +128 -0
  558. package/dist/esm/theme/fillContrast.native.js.map +1 -0
  559. package/dist/esm/theme/focusState.mjs +81 -0
  560. package/dist/esm/theme/focusState.mjs.map +1 -0
  561. package/dist/esm/theme/focusState.native.js +81 -0
  562. package/dist/esm/theme/focusState.native.js.map +1 -0
  563. package/dist/esm/theme/fontCategoryMetrics.mjs +65 -0
  564. package/dist/esm/theme/fontCategoryMetrics.mjs.map +1 -0
  565. package/dist/esm/theme/fontCategoryMetrics.native.js +65 -0
  566. package/dist/esm/theme/fontCategoryMetrics.native.js.map +1 -0
  567. package/dist/esm/theme/fontCategoryStacks.mjs +15 -0
  568. package/dist/esm/theme/fontCategoryStacks.mjs.map +1 -0
  569. package/dist/esm/theme/fontCategoryStacks.native.js +15 -0
  570. package/dist/esm/theme/fontCategoryStacks.native.js.map +1 -0
  571. package/dist/esm/theme/glyphPaint.mjs +29 -0
  572. package/dist/esm/theme/glyphPaint.mjs.map +1 -0
  573. package/dist/esm/theme/glyphPaint.native.js +52 -0
  574. package/dist/esm/theme/glyphPaint.native.js.map +1 -0
  575. package/dist/esm/theme/glyphTint.mjs +82 -0
  576. package/dist/esm/theme/glyphTint.mjs.map +1 -0
  577. package/dist/esm/theme/glyphTint.native.js +91 -0
  578. package/dist/esm/theme/glyphTint.native.js.map +1 -0
  579. package/dist/esm/theme/groupGeometry.mjs +38 -0
  580. package/dist/esm/theme/groupGeometry.mjs.map +1 -0
  581. package/dist/esm/theme/groupGeometry.native.js +40 -0
  582. package/dist/esm/theme/groupGeometry.native.js.map +1 -0
  583. package/dist/esm/theme/hairline.mjs +73 -0
  584. package/dist/esm/theme/hairline.mjs.map +1 -0
  585. package/dist/esm/theme/hairline.native.js +41 -0
  586. package/dist/esm/theme/hairline.native.js.map +1 -0
  587. package/dist/esm/theme/index.mjs +66 -0
  588. package/dist/esm/theme/index.mjs.map +1 -0
  589. package/dist/esm/theme/index.native.js +66 -0
  590. package/dist/esm/theme/index.native.js.map +1 -0
  591. package/dist/esm/theme/intents.mjs +37 -0
  592. package/dist/esm/theme/intents.mjs.map +1 -0
  593. package/dist/esm/theme/intents.native.js +37 -0
  594. package/dist/esm/theme/intents.native.js.map +1 -0
  595. package/dist/esm/theme/knobs.mjs +125 -0
  596. package/dist/esm/theme/knobs.mjs.map +1 -0
  597. package/dist/esm/theme/knobs.native.js +125 -0
  598. package/dist/esm/theme/knobs.native.js.map +1 -0
  599. package/dist/esm/theme/layoutTokens.mjs +124 -0
  600. package/dist/esm/theme/layoutTokens.mjs.map +1 -0
  601. package/dist/esm/theme/layoutTokens.native.js +171 -0
  602. package/dist/esm/theme/layoutTokens.native.js.map +1 -0
  603. package/dist/esm/theme/listRows.mjs +17 -0
  604. package/dist/esm/theme/listRows.mjs.map +1 -0
  605. package/dist/esm/theme/listRows.native.js +19 -0
  606. package/dist/esm/theme/listRows.native.js.map +1 -0
  607. package/dist/esm/theme/mergedTokens.mjs +14 -0
  608. package/dist/esm/theme/mergedTokens.mjs.map +1 -0
  609. package/dist/esm/theme/mergedTokens.native.js +33 -0
  610. package/dist/esm/theme/mergedTokens.native.js.map +1 -0
  611. package/dist/esm/theme/motion.mjs +41 -0
  612. package/dist/esm/theme/motion.mjs.map +1 -0
  613. package/dist/esm/theme/motion.native.js +48 -0
  614. package/dist/esm/theme/motion.native.js.map +1 -0
  615. package/dist/esm/theme/motionStops.mjs +3 -0
  616. package/dist/esm/theme/motionStops.mjs.map +1 -0
  617. package/dist/esm/theme/motionStops.native.js +3 -0
  618. package/dist/esm/theme/motionStops.native.js.map +1 -0
  619. package/dist/esm/theme/motionTiming.mjs +48 -0
  620. package/dist/esm/theme/motionTiming.mjs.map +1 -0
  621. package/dist/esm/theme/motionTiming.native.js +51 -0
  622. package/dist/esm/theme/motionTiming.native.js.map +1 -0
  623. package/dist/esm/theme/nativeFontFamily.mjs +5 -0
  624. package/dist/esm/theme/nativeFontFamily.mjs.map +1 -0
  625. package/dist/esm/theme/nativeFontFamily.native.js +9 -0
  626. package/dist/esm/theme/nativeFontFamily.native.js.map +1 -0
  627. package/dist/esm/theme/nativeMonoFamily.mjs +18 -0
  628. package/dist/esm/theme/nativeMonoFamily.mjs.map +1 -0
  629. package/dist/esm/theme/nativeMonoFamily.native.js +18 -0
  630. package/dist/esm/theme/nativeMonoFamily.native.js.map +1 -0
  631. package/dist/esm/theme/overlaySurfaces.mjs +290 -0
  632. package/dist/esm/theme/overlaySurfaces.mjs.map +1 -0
  633. package/dist/esm/theme/overlaySurfaces.native.js +311 -0
  634. package/dist/esm/theme/overlaySurfaces.native.js.map +1 -0
  635. package/dist/esm/theme/pageGutter.mjs +55 -0
  636. package/dist/esm/theme/pageGutter.mjs.map +1 -0
  637. package/dist/esm/theme/pageGutter.native.js +59 -0
  638. package/dist/esm/theme/pageGutter.native.js.map +1 -0
  639. package/dist/esm/theme/preset.types.mjs +2 -0
  640. package/dist/esm/theme/preset.types.mjs.map +1 -0
  641. package/dist/esm/theme/preset.types.native.js +2 -0
  642. package/dist/esm/theme/preset.types.native.js.map +1 -0
  643. package/dist/esm/theme/presetPreview.mjs +17 -0
  644. package/dist/esm/theme/presetPreview.mjs.map +1 -0
  645. package/dist/esm/theme/presetPreview.native.js +18 -0
  646. package/dist/esm/theme/presetPreview.native.js.map +1 -0
  647. package/dist/esm/theme/presetStore.mjs +251 -0
  648. package/dist/esm/theme/presetStore.mjs.map +1 -0
  649. package/dist/esm/theme/presetStore.native.js +304 -0
  650. package/dist/esm/theme/presetStore.native.js.map +1 -0
  651. package/dist/esm/theme/presetUserSync.mjs +44 -0
  652. package/dist/esm/theme/presetUserSync.mjs.map +1 -0
  653. package/dist/esm/theme/presetUserSync.native.js +46 -0
  654. package/dist/esm/theme/presetUserSync.native.js.map +1 -0
  655. package/dist/esm/theme/presets.mjs +97 -0
  656. package/dist/esm/theme/presets.mjs.map +1 -0
  657. package/dist/esm/theme/presets.native.js +97 -0
  658. package/dist/esm/theme/presets.native.js.map +1 -0
  659. package/dist/esm/theme/radiusClass.mjs +99 -0
  660. package/dist/esm/theme/radiusClass.mjs.map +1 -0
  661. package/dist/esm/theme/radiusClass.native.js +105 -0
  662. package/dist/esm/theme/radiusClass.native.js.map +1 -0
  663. package/dist/esm/theme/radiusClassTable.generated.mjs +135 -0
  664. package/dist/esm/theme/radiusClassTable.generated.mjs.map +1 -0
  665. package/dist/esm/theme/radiusClassTable.generated.native.js +135 -0
  666. package/dist/esm/theme/radiusClassTable.generated.native.js.map +1 -0
  667. package/dist/esm/theme/ramps.mjs +48 -0
  668. package/dist/esm/theme/ramps.mjs.map +1 -0
  669. package/dist/esm/theme/ramps.native.js +49 -0
  670. package/dist/esm/theme/ramps.native.js.map +1 -0
  671. package/dist/esm/theme/readableColor.mjs +214 -0
  672. package/dist/esm/theme/readableColor.mjs.map +1 -0
  673. package/dist/esm/theme/readableColor.native.js +317 -0
  674. package/dist/esm/theme/readableColor.native.js.map +1 -0
  675. package/dist/esm/theme/recipeInputs.mjs +309 -0
  676. package/dist/esm/theme/recipeInputs.mjs.map +1 -0
  677. package/dist/esm/theme/recipeInputs.native.js +424 -0
  678. package/dist/esm/theme/recipeInputs.native.js.map +1 -0
  679. package/dist/esm/theme/recipes.mjs +2 -0
  680. package/dist/esm/theme/recipes.mjs.map +1 -0
  681. package/dist/esm/theme/recipes.native.js +2 -0
  682. package/dist/esm/theme/recipes.native.js.map +1 -0
  683. package/dist/esm/theme/resolveKnobs.mjs +730 -0
  684. package/dist/esm/theme/resolveKnobs.mjs.map +1 -0
  685. package/dist/esm/theme/resolveKnobs.native.js +744 -0
  686. package/dist/esm/theme/resolveKnobs.native.js.map +1 -0
  687. package/dist/esm/theme/scale/ScaleStyles.mjs +30 -0
  688. package/dist/esm/theme/scale/ScaleStyles.mjs.map +1 -0
  689. package/dist/esm/theme/scale/ScaleStyles.native.js +11 -0
  690. package/dist/esm/theme/scale/ScaleStyles.native.js.map +1 -0
  691. package/dist/esm/theme/scale/activeScale.mjs +28 -0
  692. package/dist/esm/theme/scale/activeScale.mjs.map +1 -0
  693. package/dist/esm/theme/scale/activeScale.native.js +53 -0
  694. package/dist/esm/theme/scale/activeScale.native.js.map +1 -0
  695. package/dist/esm/theme/scale/deriveRecipeInputs.mjs +86 -0
  696. package/dist/esm/theme/scale/deriveRecipeInputs.mjs.map +1 -0
  697. package/dist/esm/theme/scale/deriveRecipeInputs.native.js +126 -0
  698. package/dist/esm/theme/scale/deriveRecipeInputs.native.js.map +1 -0
  699. package/dist/esm/theme/scale/generateScale.mjs +85 -0
  700. package/dist/esm/theme/scale/generateScale.mjs.map +1 -0
  701. package/dist/esm/theme/scale/generateScale.native.js +168 -0
  702. package/dist/esm/theme/scale/generateScale.native.js.map +1 -0
  703. package/dist/esm/theme/scale/index.mjs +12 -0
  704. package/dist/esm/theme/scale/index.mjs.map +1 -0
  705. package/dist/esm/theme/scale/index.native.js +12 -0
  706. package/dist/esm/theme/scale/index.native.js.map +1 -0
  707. package/dist/esm/theme/scale/installScaleConfig.mjs +6 -0
  708. package/dist/esm/theme/scale/installScaleConfig.mjs.map +1 -0
  709. package/dist/esm/theme/scale/installScaleConfig.native.js +36 -0
  710. package/dist/esm/theme/scale/installScaleConfig.native.js.map +1 -0
  711. package/dist/esm/theme/scale/scaleAttribute.mjs +11 -0
  712. package/dist/esm/theme/scale/scaleAttribute.mjs.map +1 -0
  713. package/dist/esm/theme/scale/scaleAttribute.native.js +11 -0
  714. package/dist/esm/theme/scale/scaleAttribute.native.js.map +1 -0
  715. package/dist/esm/theme/scale/scaleCss.mjs +62 -0
  716. package/dist/esm/theme/scale/scaleCss.mjs.map +1 -0
  717. package/dist/esm/theme/scale/scaleCss.native.js +171 -0
  718. package/dist/esm/theme/scale/scaleCss.native.js.map +1 -0
  719. package/dist/esm/theme/scale/scaleFonts.mjs +60 -0
  720. package/dist/esm/theme/scale/scaleFonts.mjs.map +1 -0
  721. package/dist/esm/theme/scale/scaleFonts.native.js +126 -0
  722. package/dist/esm/theme/scale/scaleFonts.native.js.map +1 -0
  723. package/dist/esm/theme/scale/scaleInputs.mjs +189 -0
  724. package/dist/esm/theme/scale/scaleInputs.mjs.map +1 -0
  725. package/dist/esm/theme/scale/scaleInputs.native.js +191 -0
  726. package/dist/esm/theme/scale/scaleInputs.native.js.map +1 -0
  727. package/dist/esm/theme/scale/themeScales.mjs +109 -0
  728. package/dist/esm/theme/scale/themeScales.mjs.map +1 -0
  729. package/dist/esm/theme/scale/themeScales.native.js +155 -0
  730. package/dist/esm/theme/scale/themeScales.native.js.map +1 -0
  731. package/dist/esm/theme/scale/useActiveScale.mjs +51 -0
  732. package/dist/esm/theme/scale/useActiveScale.mjs.map +1 -0
  733. package/dist/esm/theme/scale/useActiveScale.native.js +57 -0
  734. package/dist/esm/theme/scale/useActiveScale.native.js.map +1 -0
  735. package/dist/esm/theme/schemeStore.mjs +59 -0
  736. package/dist/esm/theme/schemeStore.mjs.map +1 -0
  737. package/dist/esm/theme/schemeStore.native.js +73 -0
  738. package/dist/esm/theme/schemeStore.native.js.map +1 -0
  739. package/dist/esm/theme/shared.mjs +95 -0
  740. package/dist/esm/theme/shared.mjs.map +1 -0
  741. package/dist/esm/theme/shared.native.js +135 -0
  742. package/dist/esm/theme/shared.native.js.map +1 -0
  743. package/dist/esm/theme/sizeRecipes.mjs +112 -0
  744. package/dist/esm/theme/sizeRecipes.mjs.map +1 -0
  745. package/dist/esm/theme/sizeRecipes.native.js +184 -0
  746. package/dist/esm/theme/sizeRecipes.native.js.map +1 -0
  747. package/dist/esm/theme/subsetThemes.mjs +21 -0
  748. package/dist/esm/theme/subsetThemes.mjs.map +1 -0
  749. package/dist/esm/theme/subsetThemes.native.js +48 -0
  750. package/dist/esm/theme/subsetThemes.native.js.map +1 -0
  751. package/dist/esm/theme/theme.mjs +163 -0
  752. package/dist/esm/theme/theme.mjs.map +1 -0
  753. package/dist/esm/theme/theme.native.js +87 -0
  754. package/dist/esm/theme/theme.native.js.map +1 -0
  755. package/dist/esm/theme/themeValue.mjs +25 -0
  756. package/dist/esm/theme/themeValue.mjs.map +1 -0
  757. package/dist/esm/theme/themeValue.native.js +44 -0
  758. package/dist/esm/theme/themeValue.native.js.map +1 -0
  759. package/dist/esm/theme/tileSizes.mjs +167 -0
  760. package/dist/esm/theme/tileSizes.mjs.map +1 -0
  761. package/dist/esm/theme/tileSizes.native.js +192 -0
  762. package/dist/esm/theme/tileSizes.native.js.map +1 -0
  763. package/dist/esm/theme/touchManipulation.mjs +7 -0
  764. package/dist/esm/theme/touchManipulation.mjs.map +1 -0
  765. package/dist/esm/theme/touchManipulation.native.js +7 -0
  766. package/dist/esm/theme/touchManipulation.native.js.map +1 -0
  767. package/dist/esm/theme/transitionProps.mjs +25 -0
  768. package/dist/esm/theme/transitionProps.mjs.map +1 -0
  769. package/dist/esm/theme/transitionProps.native.js +53 -0
  770. package/dist/esm/theme/transitionProps.native.js.map +1 -0
  771. package/dist/esm/theme/useColorScale.mjs +22 -0
  772. package/dist/esm/theme/useColorScale.mjs.map +1 -0
  773. package/dist/esm/theme/useColorScale.native.js +5 -0
  774. package/dist/esm/theme/useColorScale.native.js.map +1 -0
  775. package/dist/esm/theme/usePresetSwitch.mjs +45 -0
  776. package/dist/esm/theme/usePresetSwitch.mjs.map +1 -0
  777. package/dist/esm/theme/usePresetSwitch.native.js +22 -0
  778. package/dist/esm/theme/usePresetSwitch.native.js.map +1 -0
  779. package/dist/esm/theme/useResolvedKnobs.mjs +111 -0
  780. package/dist/esm/theme/useResolvedKnobs.mjs.map +1 -0
  781. package/dist/esm/theme/useResolvedKnobs.native.js +145 -0
  782. package/dist/esm/theme/useResolvedKnobs.native.js.map +1 -0
  783. package/dist/esm/theme/useSchemePreference.mjs +24 -0
  784. package/dist/esm/theme/useSchemePreference.mjs.map +1 -0
  785. package/dist/esm/theme/useSchemePreference.native.js +52 -0
  786. package/dist/esm/theme/useSchemePreference.native.js.map +1 -0
  787. package/dist/esm/theme/useTheme.mjs +127 -0
  788. package/dist/esm/theme/useTheme.mjs.map +1 -0
  789. package/dist/esm/theme/useTheme.native.js +66 -0
  790. package/dist/esm/theme/useTheme.native.js.map +1 -0
  791. package/dist/esm/theme/useTouchSurface.mjs +8 -0
  792. package/dist/esm/theme/useTouchSurface.mjs.map +1 -0
  793. package/dist/esm/theme/useTouchSurface.native.js +8 -0
  794. package/dist/esm/theme/useTouchSurface.native.js.map +1 -0
  795. package/dist/esm/theme/v3TokenRoles.mjs +39 -0
  796. package/dist/esm/theme/v3TokenRoles.mjs.map +1 -0
  797. package/dist/esm/theme/v3TokenRoles.native.js +39 -0
  798. package/dist/esm/theme/v3TokenRoles.native.js.map +1 -0
  799. package/package.json +56 -12
  800. package/src/theme/scale/activeScale.spec.ts +33 -0
  801. package/src/theme/scale/activeScale.ts +19 -0
  802. package/src/theme/scale/index.ts +6 -1
  803. package/src/theme/subsetThemes.spec.ts +81 -0
  804. package/src/theme/subsetThemes.ts +13 -1
  805. package/types/theme/scale/activeScale.d.ts +8 -0
  806. package/types/theme/scale/activeScale.d.ts.map +1 -1
  807. package/types/theme/scale/index.d.ts +1 -1
  808. package/types/theme/scale/index.d.ts.map +1 -1
  809. package/types/theme/subsetThemes.d.ts +10 -1
  810. package/types/theme/subsetThemes.d.ts.map +1 -1
@@ -0,0 +1,1183 @@
1
+ "use strict";
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
+ get: () => from[key],
19
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
+ });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
36
+ var createThemes_exports = {};
37
+ __export(createThemes_exports, {
38
+ createThemesBuilder: () => createThemesBuilder,
39
+ houseComponentThemes: () => houseComponentThemes,
40
+ houseGrandChildrenThemes: () => houseGrandChildrenThemes,
41
+ houseTemplates: () => houseTemplates,
42
+ tintHueNames: () => tintHueNames
43
+ });
44
+ module.exports = __toCommonJS(createThemes_exports);
45
+ var Colors = __toESM(require("@tamagui/colors"));
46
+ var import_theme_builder = require("@tamagui/theme-builder");
47
+ var import_v5 = require("@tamagui/themes/v5");
48
+ var import_colorRules = require("./colorRules.native.js");
49
+ var import_builderOptions = require("./defaults/builderOptions.native.js");
50
+ var import_ramps = require("./ramps.native.js");
51
+ var intentInkFloor = {
52
+ /** Stored hsla(41, 99%, 30%, 1); 4.54:1 on $color2, dE76 2.54. */
53
+ warning: "#986801",
54
+ /** Stored hsla(154, 63%, 31%, 1); 4.53:1 on $color2, dE76 0.82. */
55
+ success: "#1d8156"
56
+ };
57
+ function withIntentInkFloor(palette, ink) {
58
+ if (palette.length !== 12) return palette;
59
+ var stepped = [...palette];
60
+ stepped[10] = ink;
61
+ return stepped;
62
+ }
63
+ var lightSurfaceGrouped = {
64
+ ...import_v5.v5Templates.light_surface1,
65
+ background: import_theme_builder.PALETTE_BACKGROUND_OFFSET,
66
+ backgroundHover: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 1,
67
+ backgroundPress: import_theme_builder.PALETTE_BACKGROUND_OFFSET + 2,
68
+ backgroundFocus: import_theme_builder.PALETTE_BACKGROUND_OFFSET,
69
+ backgroundActive: import_theme_builder.PALETTE_BACKGROUND_OFFSET
70
+ };
71
+ var houseTemplates = {
72
+ ...import_v5.v5Templates,
73
+ light_surface1: lightSurfaceGrouped
74
+ };
75
+ var houseComponentThemes = {
76
+ Button: {
77
+ template: "surface2"
78
+ },
79
+ Input: {
80
+ template: "surface1"
81
+ },
82
+ TextArea: {
83
+ template: "surface1"
84
+ },
85
+ Progress: {
86
+ template: "surface2"
87
+ },
88
+ ProgressIndicator: {
89
+ template: "surface3"
90
+ },
91
+ Slider: {
92
+ template: "surface2"
93
+ },
94
+ SliderActive: {
95
+ template: "surface3"
96
+ },
97
+ SliderThumb: {
98
+ template: "surface1"
99
+ },
100
+ Switch: {
101
+ template: "surface2"
102
+ },
103
+ Card: {
104
+ template: "surface1"
105
+ },
106
+ ListItem: {
107
+ template: "surface1"
108
+ },
109
+ SelectTrigger: {
110
+ template: "surface1"
111
+ },
112
+ SelectItem: {
113
+ template: "surface1"
114
+ },
115
+ InputContainerFrame: {
116
+ template: "surface1"
117
+ }
118
+ };
119
+ var houseGrandChildrenThemes = {
120
+ active: {
121
+ template: "surface3"
122
+ },
123
+ alt1: {
124
+ template: "surface1"
125
+ },
126
+ alt2: {
127
+ template: "surface2"
128
+ }
129
+ };
130
+ function sanitizeGetTheme(getTheme) {
131
+ return function (props) {
132
+ var out = {};
133
+ var _iteratorNormalCompletion = true,
134
+ _didIteratorError = false,
135
+ _iteratorError = void 0;
136
+ try {
137
+ for (var _iterator = Object.entries(getTheme(props))[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
138
+ var [key, value] = _step.value;
139
+ if (value != null) out[key] = value;
140
+ }
141
+ } catch (err) {
142
+ _didIteratorError = true;
143
+ _iteratorError = err;
144
+ } finally {
145
+ try {
146
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
147
+ _iterator.return();
148
+ }
149
+ } finally {
150
+ if (_didIteratorError) {
151
+ throw _iteratorError;
152
+ }
153
+ }
154
+ }
155
+ return out;
156
+ };
157
+ }
158
+ var tintHueNames = /* @__PURE__ */new Set(["amber", "blue", "bronze", "brown", "crimson", "cyan", "gold", "grass", "gray", "green", "indigo", "lime", "mauve", "mint", "olive", "orange", "pink", "plum", "purple", "red", "sage", "sand", "sky", "slate", "teal", "tomato", "violet", "yellow"]);
159
+ var tintNeutralTextKeys = ["color", "colorHover", "colorPress", "colorFocus", "color11", "color12", "placeholderColor"];
160
+ function neutralizeTintText(themes) {
161
+ var out = {
162
+ ...themes
163
+ };
164
+ var _iteratorNormalCompletion = true,
165
+ _didIteratorError = false,
166
+ _iteratorError = void 0;
167
+ try {
168
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
169
+ var [name, theme] = _step.value;
170
+ var parts = name.split("_");
171
+ if (parts.length < 2) continue;
172
+ var scheme = parts[0];
173
+ if (scheme !== "light" && scheme !== "dark") continue;
174
+ if (!tintHueNames.has(parts[1])) continue;
175
+ var base = themes[scheme];
176
+ if (!base) continue;
177
+ var patched = {
178
+ ...theme
179
+ };
180
+ var _iteratorNormalCompletion1 = true,
181
+ _didIteratorError1 = false,
182
+ _iteratorError1 = void 0;
183
+ try {
184
+ for (var _iterator1 = tintNeutralTextKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
185
+ var key = _step1.value;
186
+ if (key in patched && base[key] != null) patched[key] = base[key];
187
+ }
188
+ } catch (err) {
189
+ _didIteratorError1 = true;
190
+ _iteratorError1 = err;
191
+ } finally {
192
+ try {
193
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
194
+ _iterator1.return();
195
+ }
196
+ } finally {
197
+ if (_didIteratorError1) {
198
+ throw _iteratorError1;
199
+ }
200
+ }
201
+ }
202
+ if ("textMuted" in patched) patched.textMuted = (0, import_builderOptions.pickSecondaryInk)(patched, base);
203
+ out[name] = patched;
204
+ }
205
+ } catch (err) {
206
+ _didIteratorError = true;
207
+ _iteratorError = err;
208
+ } finally {
209
+ try {
210
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
211
+ _iterator.return();
212
+ }
213
+ } finally {
214
+ if (_didIteratorError) {
215
+ throw _iteratorError;
216
+ }
217
+ }
218
+ }
219
+ return out;
220
+ }
221
+ var semanticIntentNames = /* @__PURE__ */new Set(["error", "warning", "success"]);
222
+ var entryControlNames = /* @__PURE__ */new Set(["Input", "TextArea"]);
223
+ function neutralizeSemanticEntryText(themes) {
224
+ var out = {
225
+ ...themes
226
+ };
227
+ var _iteratorNormalCompletion = true,
228
+ _didIteratorError = false,
229
+ _iteratorError = void 0;
230
+ try {
231
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
232
+ var [name, theme] = _step.value;
233
+ var [scheme, intent, component, ...rest] = name.split("_");
234
+ if (rest.length > 0 || scheme !== "light" && scheme !== "dark") continue;
235
+ if (!intent || !semanticIntentNames.has(intent)) continue;
236
+ var base = themes[scheme];
237
+ if (!base) continue;
238
+ if (component === void 0) {
239
+ if (base.placeholderColor != null) out[name] = {
240
+ ...theme,
241
+ placeholderColor: base.placeholderColor
242
+ };
243
+ continue;
244
+ }
245
+ if (!entryControlNames.has(component)) continue;
246
+ var neutral = {
247
+ ...base,
248
+ ...themes[`${scheme}_${component}`]
249
+ };
250
+ var patched = {
251
+ ...theme
252
+ };
253
+ var _iteratorNormalCompletion1 = true,
254
+ _didIteratorError1 = false,
255
+ _iteratorError1 = void 0;
256
+ try {
257
+ for (var _iterator1 = tintNeutralTextKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
258
+ var key = _step1.value;
259
+ if (neutral[key] != null) patched[key] = neutral[key];
260
+ }
261
+ } catch (err) {
262
+ _didIteratorError1 = true;
263
+ _iteratorError1 = err;
264
+ } finally {
265
+ try {
266
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
267
+ _iterator1.return();
268
+ }
269
+ } finally {
270
+ if (_didIteratorError1) {
271
+ throw _iteratorError1;
272
+ }
273
+ }
274
+ }
275
+ out[name] = patched;
276
+ }
277
+ } catch (err) {
278
+ _didIteratorError = true;
279
+ _iteratorError = err;
280
+ } finally {
281
+ try {
282
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
283
+ _iterator.return();
284
+ }
285
+ } finally {
286
+ if (_didIteratorError) {
287
+ throw _iteratorError;
288
+ }
289
+ }
290
+ }
291
+ return out;
292
+ }
293
+ function luminanceOf(color) {
294
+ var hex = color ? (0, import_colorRules.normalizeToHex)(color) : null;
295
+ return hex ? (0, import_colorRules.relativeLuminance)(hex) : null;
296
+ }
297
+ function nearestHoldingStep(preferred, steps, holds) {
298
+ var preferredLum = luminanceOf(preferred);
299
+ if (preferredLum === null || holds(preferredLum)) return preferred;
300
+ var best = preferred;
301
+ var bestDistance = Number.POSITIVE_INFINITY;
302
+ var _iteratorNormalCompletion = true,
303
+ _didIteratorError = false,
304
+ _iteratorError = void 0;
305
+ try {
306
+ for (var _iterator = steps[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
307
+ var step = _step.value;
308
+ var lum = luminanceOf(step);
309
+ if (step === void 0 || lum === null || !holds(lum)) continue;
310
+ var distance = Math.abs(lum - preferredLum);
311
+ if (distance < bestDistance) {
312
+ bestDistance = distance;
313
+ best = step;
314
+ }
315
+ }
316
+ } catch (err) {
317
+ _didIteratorError = true;
318
+ _iteratorError = err;
319
+ } finally {
320
+ try {
321
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
322
+ _iterator.return();
323
+ }
324
+ } finally {
325
+ if (_didIteratorError) {
326
+ throw _iteratorError;
327
+ }
328
+ }
329
+ }
330
+ return best;
331
+ }
332
+ function holdAccentFloor(themes) {
333
+ var _loop = function (_i2, _iter2) {
334
+ var scheme = _iter2[_i2];
335
+ var base = themes[scheme];
336
+ if (!(base === null || base === void 0 ? void 0 : base.accentBackground) || !base.accentColor) return "continue";
337
+ var paper = luminanceOf(base.color1);
338
+ var ink = luminanceOf(base.color12);
339
+ var surfaces = [base.color1, base.color2, base.color3, base.color4].map(luminanceOf);
340
+ if (paper === null || ink === null || surfaces.some(function (lum) {
341
+ return lum === null;
342
+ })) return "continue";
343
+ var steps = Array.from({
344
+ length: 12
345
+ }, function (_, index) {
346
+ return base[`accent${index + 1}`];
347
+ });
348
+ var fill = nearestHoldingStep(base.accentBackground, steps.slice(0, 10), function (lum) {
349
+ return Math.max((0, import_colorRules.contrastRatio)(lum, paper), (0, import_colorRules.contrastRatio)(lum, ink)) >= import_colorRules.aaTextContrastRatio && (0, import_colorRules.contrastRatio)(lum, paper) >= import_colorRules.minContrastRatio;
350
+ });
351
+ var accentInk = nearestHoldingStep(base.accentColor, steps, function (lum) {
352
+ return surfaces.every(function (surface) {
353
+ return (0, import_colorRules.contrastRatio)(lum, surface) >= import_colorRules.aaTextContrastRatio;
354
+ });
355
+ });
356
+ if (fill === base.accentBackground && accentInk === base.accentColor) return "continue";
357
+ var _iteratorNormalCompletion = true,
358
+ _didIteratorError = false,
359
+ _iteratorError = void 0;
360
+ try {
361
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
362
+ var [name, theme] = _step.value;
363
+ if (name !== scheme && !name.startsWith(`${scheme}_`)) continue;
364
+ var inheritsFill = theme.accentBackground === base.accentBackground;
365
+ var inheritsInk = theme.accentColor === base.accentColor;
366
+ if (!inheritsFill && !inheritsInk) continue;
367
+ out[name] = {
368
+ ...theme,
369
+ ...(inheritsFill ? {
370
+ accentBackground: fill
371
+ } : null),
372
+ ...(inheritsInk ? {
373
+ accentColor: accentInk
374
+ } : null)
375
+ };
376
+ }
377
+ } catch (err) {
378
+ _didIteratorError = true;
379
+ _iteratorError = err;
380
+ } finally {
381
+ try {
382
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
383
+ _iterator.return();
384
+ }
385
+ } finally {
386
+ if (_didIteratorError) {
387
+ throw _iteratorError;
388
+ }
389
+ }
390
+ }
391
+ };
392
+ var out = {
393
+ ...themes
394
+ };
395
+ for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
396
+ return out;
397
+ }
398
+ var selectionSurfaceContrastRatio = 1.16;
399
+ var selectionSurfaceScope = /^(light|dark)(_[a-z]+)?$/;
400
+ function holdSelectionSurface(themes) {
401
+ var out = {
402
+ ...themes
403
+ };
404
+ var _iteratorNormalCompletion = true,
405
+ _didIteratorError = false,
406
+ _iteratorError = void 0;
407
+ try {
408
+ var _loop = function () {
409
+ var [scopeName, scope] = _step.value;
410
+ if (!selectionSurfaceScope.test(scopeName) || /_(accent|active)$/.test(scopeName)) return "continue";
411
+ var page = luminanceOf(scope.background);
412
+ var [surface, next, last] = [scope.color4, scope.color5, scope.color6].map(function (color) {
413
+ return color ? (0, import_colorRules.normalizeToHex)(color) : null;
414
+ });
415
+ if (page === null || !surface || !next || !last) return "continue";
416
+ if ((0, import_colorRules.contrastRatio)((0, import_colorRules.relativeLuminance)(surface), page) >= selectionSurfaceContrastRatio) return "continue";
417
+ var candidates = [...Array.from({
418
+ length: 20
419
+ }, function (_, index) {
420
+ return mixHex(surface, next, (index + 1) / 20);
421
+ }), ...Array.from({
422
+ length: 20
423
+ }, function (_, index) {
424
+ return mixHex(next, last, (index + 1) / 20);
425
+ })];
426
+ var held = candidates.find(function (candidate) {
427
+ return (0, import_colorRules.contrastRatio)((0, import_colorRules.relativeLuminance)(candidate), page) >= selectionSurfaceContrastRatio;
428
+ });
429
+ if (!held) return "continue";
430
+ var _iteratorNormalCompletion2 = true,
431
+ _didIteratorError2 = false,
432
+ _iteratorError2 = void 0;
433
+ try {
434
+ for (var _iterator2 = Object.entries(themes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
435
+ var [name, theme] = _step1.value;
436
+ if (name !== scopeName && !name.startsWith(`${scopeName}_`)) continue;
437
+ if (theme.color4 !== scope.color4) continue;
438
+ out[name] = {
439
+ ...out[name],
440
+ color4: held,
441
+ ...(theme.borderColor === scope.color4 ? {
442
+ borderColor: held
443
+ } : null)
444
+ };
445
+ }
446
+ } catch (err) {
447
+ _didIteratorError2 = true;
448
+ _iteratorError2 = err;
449
+ } finally {
450
+ try {
451
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
452
+ _iterator2.return();
453
+ }
454
+ } finally {
455
+ if (_didIteratorError2) {
456
+ throw _iteratorError2;
457
+ }
458
+ }
459
+ }
460
+ };
461
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop();
462
+ } catch (err) {
463
+ _didIteratorError = true;
464
+ _iteratorError = err;
465
+ } finally {
466
+ try {
467
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
468
+ _iterator.return();
469
+ }
470
+ } finally {
471
+ if (_didIteratorError) {
472
+ throw _iteratorError;
473
+ }
474
+ }
475
+ }
476
+ return out;
477
+ }
478
+ var selectedTintContrastRatio = 1.1;
479
+ var neutralSelectedTintContrastRatio = 1.25;
480
+ var achromaticChannelSpread = 8;
481
+ function isAchromaticRamp(steps) {
482
+ return steps.every(function (step) {
483
+ var hex = step ? (0, import_colorRules.normalizeToHex)(step) : null;
484
+ if (!hex) return false;
485
+ var channels = [1, 3, 5].map(function (offset) {
486
+ return Number.parseInt(hex.slice(offset, offset + 2), 16);
487
+ });
488
+ return Math.max(...channels) - Math.min(...channels) <= achromaticChannelSpread;
489
+ });
490
+ }
491
+ function holdSelectedState(themes) {
492
+ var _loop = function (_i2, _iter2) {
493
+ var scheme = _iter2[_i2];
494
+ var base = themes[scheme];
495
+ if (!(base === null || base === void 0 ? void 0 : base.accentColor)) return "continue";
496
+ var steps = Array.from({
497
+ length: 12
498
+ }, function (_, index) {
499
+ return base[`accent${index + 1}`];
500
+ });
501
+ var paint = selectedPaint(base, steps, base.accentColor);
502
+ if (paint) out[scheme] = {
503
+ ...base,
504
+ ...paint
505
+ };
506
+ };
507
+ var out = {
508
+ ...themes
509
+ };
510
+ for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
511
+ return out;
512
+ }
513
+ function selectedPaint(scope, steps, accentColor) {
514
+ var page = luminanceOf(scope.color1);
515
+ var neutral = luminanceOf(scope.color4);
516
+ if (page === null || neutral === null) return void 0;
517
+ var grey = isAchromaticRamp(steps);
518
+ var offNeutral = grey ? neutralSelectedTintContrastRatio : selectedTintContrastRatio;
519
+ var tint = nearestHoldingStep(scope.color4, steps, function (lum2) {
520
+ return (0, import_colorRules.contrastRatio)(lum2, page) >= selectedTintContrastRatio && (0, import_colorRules.contrastRatio)(lum2, neutral) >= offNeutral;
521
+ });
522
+ var tintLum = luminanceOf(tint);
523
+ if (tint === scope.color4 || tintLum === null) return void 0;
524
+ if (grey) {
525
+ var strongest = tint;
526
+ var strongestRatio = 0;
527
+ var _iteratorNormalCompletion = true,
528
+ _didIteratorError = false,
529
+ _iteratorError = void 0;
530
+ try {
531
+ for (var _iterator = steps[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
532
+ var step = _step.value;
533
+ var lum = luminanceOf(step);
534
+ if (step === void 0 || lum === null) continue;
535
+ var ratio = (0, import_colorRules.contrastRatio)(lum, tintLum);
536
+ if (ratio > strongestRatio) {
537
+ strongest = step;
538
+ strongestRatio = ratio;
539
+ }
540
+ }
541
+ } catch (err) {
542
+ _didIteratorError = true;
543
+ _iteratorError = err;
544
+ } finally {
545
+ try {
546
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
547
+ _iterator.return();
548
+ }
549
+ } finally {
550
+ if (_didIteratorError) {
551
+ throw _iteratorError;
552
+ }
553
+ }
554
+ }
555
+ if (strongestRatio >= import_colorRules.aaTextContrastRatio) return {
556
+ selectedBackground: tint,
557
+ selectedColor: strongest
558
+ };
559
+ }
560
+ var ink = nearestHoldingStep(accentColor, steps, function (lum2) {
561
+ return (0, import_colorRules.contrastRatio)(lum2, tintLum) >= import_colorRules.aaTextContrastRatio;
562
+ });
563
+ return {
564
+ selectedBackground: tint,
565
+ selectedColor: ink
566
+ };
567
+ }
568
+ var switchStateContrastRatio = 1.5;
569
+ var switchRaisedAlphas = [0.16, 0.2, 0.24, 0.28, 0.32, 0.36, 0.4];
570
+ var switchRaisedAlphaStep = 0.04;
571
+ function raisedGrounds(themes, scheme) {
572
+ var _themes_scheme;
573
+ if (scheme === "light") return [];
574
+ var hues = Object.entries(themes).filter(function (param) {
575
+ var [name] = param;
576
+ return new RegExp(`^${scheme}_[a-z]+$`).test(name);
577
+ }).filter(function (param) {
578
+ var [name] = param;
579
+ return !/_(accent|active)$/.test(name);
580
+ });
581
+ return [(_themes_scheme = themes[scheme]) === null || _themes_scheme === void 0 ? void 0 : _themes_scheme.color4, ...hues.map(function (param) {
582
+ var [, theme] = param;
583
+ return theme.color4;
584
+ })].filter(function (color) {
585
+ return typeof color === "string";
586
+ });
587
+ }
588
+ function holdSwitchTrack(themes) {
589
+ var out = {
590
+ ...themes
591
+ };
592
+ for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) {
593
+ var scheme = _iter[_i];
594
+ var base = themes[scheme];
595
+ if (!base) continue;
596
+ var paint = switchTrackPaint(base, base.accentBackground, base.background, raisedGrounds(themes, scheme));
597
+ if (paint) out[scheme] = {
598
+ ...base,
599
+ ...paint
600
+ };
601
+ }
602
+ return out;
603
+ }
604
+ function switchTrackPaint(base, onFill, ground) {
605
+ var raised = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [];
606
+ var _ref, _inBand_find;
607
+ var on = luminanceOf(onFill);
608
+ if (!ground || on === null) return void 0;
609
+ var alpha = import_colorRules.switchOffFillAlpha[(0, import_colorRules.isLightGround)(ground) ? "light" : "dark"];
610
+ var target = (0, import_colorRules.systemFillLuminance)(ground, alpha);
611
+ if (target === null) return void 0;
612
+ var raisedLums = raised.map(function (color) {
613
+ return luminanceOf(color);
614
+ }).filter(function (lum) {
615
+ return lum !== null;
616
+ });
617
+ var greys = Array.from({
618
+ length: 12
619
+ }, function (_, index) {
620
+ return index + 1;
621
+ }).map(function (step) {
622
+ return {
623
+ color: base[`gray${step}`],
624
+ lum: luminanceOf(base[`gray${step}`]),
625
+ hover: base[`gray${Math.max(step - 1, 1)}`],
626
+ press: base[`gray${Math.min(step + 1, 12)}`]
627
+ };
628
+ }).filter(function (entry) {
629
+ return entry.lum !== null;
630
+ });
631
+ var fills = raised[0] ? switchRaisedAlphas.flatMap(function (fillAlpha) {
632
+ var color = (0, import_colorRules.systemFillHex)(raised[0], fillAlpha);
633
+ var hover = (0, import_colorRules.systemFillHex)(raised[0], fillAlpha - switchRaisedAlphaStep);
634
+ var press = (0, import_colorRules.systemFillHex)(raised[0], fillAlpha + switchRaisedAlphaStep);
635
+ var lum = luminanceOf(color !== null && color !== void 0 ? color : void 0);
636
+ return color && hover && press && lum !== null ? [{
637
+ color,
638
+ lum,
639
+ hover,
640
+ press
641
+ }] : [];
642
+ }) : [];
643
+ var byTarget = function byTarget2(a, b) {
644
+ return Math.abs(a.lum - target) - Math.abs(b.lum - target);
645
+ };
646
+ var steps = [...greys].sort(byTarget);
647
+ var inBand = [...greys, ...fills].filter(function (entry) {
648
+ return (0, import_colorRules.inSwitchOffBand)(entry.color, ground);
649
+ }).filter(function (entry) {
650
+ return raisedLums.every(function (lum) {
651
+ return (0, import_colorRules.contrastRatio)(entry.lum, lum) >= import_colorRules.plateContrastRatio;
652
+ });
653
+ }).sort(byTarget);
654
+ var pick = (_ref = (_inBand_find = inBand.find(function (entry) {
655
+ return (0, import_colorRules.contrastRatio)(entry.lum, on) >= switchStateContrastRatio;
656
+ })) !== null && _inBand_find !== void 0 ? _inBand_find : inBand[0]) !== null && _ref !== void 0 ? _ref : steps[0];
657
+ if (!pick) return void 0;
658
+ return {
659
+ switchTrackOff: pick.color,
660
+ switchTrackOffHover: pick.hover,
661
+ switchTrackOffPress: pick.press
662
+ };
663
+ }
664
+ var syntaxInkHues = ["purple", "green", "blue", "orange", "red"];
665
+ function mixHex(from, to, share) {
666
+ var channel = function channel2(offset) {
667
+ return Math.round(Number.parseInt(from.slice(offset, offset + 2), 16) * (1 - share) + Number.parseInt(to.slice(offset, offset + 2), 16) * share).toString(16).padStart(2, "0");
668
+ };
669
+ return `#${channel(1)}${channel(3)}${channel(5)}`;
670
+ }
671
+ function holdSyntaxFloor(themes) {
672
+ var out = {
673
+ ...themes
674
+ };
675
+ var _iteratorNormalCompletion = true,
676
+ _didIteratorError = false,
677
+ _iteratorError = void 0;
678
+ try {
679
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
680
+ var [name, theme] = _step.value;
681
+ var surface = luminanceOf(theme.color3);
682
+ if (surface === null) continue;
683
+ var ink = {};
684
+ var _iteratorNormalCompletion1 = true,
685
+ _didIteratorError1 = false,
686
+ _iteratorError1 = void 0;
687
+ try {
688
+ for (var _iterator1 = syntaxInkHues[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
689
+ var hue = _step1.value;
690
+ var from = theme[`${hue}11`] ? (0, import_colorRules.normalizeToHex)(theme[`${hue}11`]) : null;
691
+ var to = theme[`${hue}12`] ? (0, import_colorRules.normalizeToHex)(theme[`${hue}12`]) : null;
692
+ var wash = luminanceOf(theme[`${hue}3`]);
693
+ if (!from || !to || wash === null) continue;
694
+ for (var step = 0; step <= 20; step++) {
695
+ var candidate = mixHex(from, to, step / 20);
696
+ var lum = (0, import_colorRules.relativeLuminance)(candidate);
697
+ if ((0, import_colorRules.contrastRatio)(lum, surface) >= import_colorRules.aaTextContrastRatio && (0, import_colorRules.contrastRatio)(lum, wash) >= import_colorRules.aaTextContrastRatio) {
698
+ ink[`syntax${hue[0].toUpperCase()}${hue.slice(1)}`] = candidate;
699
+ break;
700
+ }
701
+ }
702
+ }
703
+ } catch (err) {
704
+ _didIteratorError1 = true;
705
+ _iteratorError1 = err;
706
+ } finally {
707
+ try {
708
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
709
+ _iterator1.return();
710
+ }
711
+ } finally {
712
+ if (_didIteratorError1) {
713
+ throw _iteratorError1;
714
+ }
715
+ }
716
+ }
717
+ if (Object.keys(ink).length > 0) out[name] = {
718
+ ...theme,
719
+ ...ink
720
+ };
721
+ }
722
+ } catch (err) {
723
+ _didIteratorError = true;
724
+ _iteratorError = err;
725
+ } finally {
726
+ try {
727
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
728
+ _iterator.return();
729
+ }
730
+ } finally {
731
+ if (_didIteratorError) {
732
+ throw _iteratorError;
733
+ }
734
+ }
735
+ }
736
+ return out;
737
+ }
738
+ var namedInkHues = import_ramps.themeRampHues;
739
+ function holdNamedInkFloor(themes) {
740
+ var out = {
741
+ ...themes
742
+ };
743
+ var _iteratorNormalCompletion = true,
744
+ _didIteratorError = false,
745
+ _iteratorError = void 0;
746
+ try {
747
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
748
+ var [name, theme] = _step.value;
749
+ var surfaces = [luminanceOf(theme.background), luminanceOf(theme.color3)];
750
+ if (surfaces.some(function (surface) {
751
+ return surface === null;
752
+ })) continue;
753
+ var ink = {};
754
+ var _iteratorNormalCompletion1 = true,
755
+ _didIteratorError1 = false,
756
+ _iteratorError1 = void 0;
757
+ try {
758
+ for (var _iterator1 = namedInkHues[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
759
+ var _loop = function (step2) {
760
+ var candidate = mixHex(from, to, step2 / 20);
761
+ var lum = (0, import_colorRules.relativeLuminance)(candidate);
762
+ if (surfaces.every(function (surface) {
763
+ return (0, import_colorRules.contrastRatio)(lum, surface) >= import_colorRules.aaTextContrastRatio;
764
+ })) {
765
+ if (step2 > 0) ink[`${hue}11`] = candidate;
766
+ return "break";
767
+ }
768
+ };
769
+ var hue = _step1.value;
770
+ var from = theme[`${hue}11`] ? (0, import_colorRules.normalizeToHex)(theme[`${hue}11`]) : null;
771
+ var to = theme[`${hue}12`] ? (0, import_colorRules.normalizeToHex)(theme[`${hue}12`]) : null;
772
+ if (!from || !to) continue;
773
+ for (var step = 0; step <= 20; step++) {
774
+ var _ret = _loop(step);
775
+ if (_ret === "break") break;
776
+ }
777
+ }
778
+ } catch (err) {
779
+ _didIteratorError1 = true;
780
+ _iteratorError1 = err;
781
+ } finally {
782
+ try {
783
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
784
+ _iterator1.return();
785
+ }
786
+ } finally {
787
+ if (_didIteratorError1) {
788
+ throw _iteratorError1;
789
+ }
790
+ }
791
+ }
792
+ if (Object.keys(ink).length > 0) out[name] = {
793
+ ...theme,
794
+ ...ink
795
+ };
796
+ }
797
+ } catch (err) {
798
+ _didIteratorError = true;
799
+ _iteratorError = err;
800
+ } finally {
801
+ try {
802
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
803
+ _iterator.return();
804
+ }
805
+ } finally {
806
+ if (_didIteratorError) {
807
+ throw _iteratorError;
808
+ }
809
+ }
810
+ }
811
+ return out;
812
+ }
813
+ function walkToHoldingInk(step11, step12, holds) {
814
+ var from = (0, import_colorRules.normalizeToHex)(step11);
815
+ var to = (0, import_colorRules.normalizeToHex)(step12);
816
+ if (!from || !to) return null;
817
+ if (holds((0, import_colorRules.relativeLuminance)(from))) return step11;
818
+ for (var step = 1; step <= 20; step++) {
819
+ var candidate = mixHex(from, to, step / 20);
820
+ if (holds((0, import_colorRules.relativeLuminance)(candidate))) return candidate;
821
+ }
822
+ return null;
823
+ }
824
+ function holdFillLabel(preferred, steps, labels, paper) {
825
+ var preferredLum = luminanceOf(preferred);
826
+ if (preferredLum === null) return void 0;
827
+ var labelOn = function labelOn2(step2) {
828
+ return labels.find(function (label2) {
829
+ var lum2 = luminanceOf(label2);
830
+ var stepLum = luminanceOf(step2);
831
+ return lum2 !== null && stepLum !== null && (0, import_colorRules.contrastRatio)(lum2, stepLum) >= import_colorRules.aaTextContrastRatio && Math.abs((0, import_colorRules.apcaContrast)(label2, step2)) >= import_colorRules.fillLabelLc;
832
+ });
833
+ };
834
+ var best;
835
+ var bestDistance = Number.POSITIVE_INFINITY;
836
+ for (var _i = 0, _iter = [preferred, ...steps]; _i < _iter.length; _i++) {
837
+ var step = _iter[_i];
838
+ var lum = luminanceOf(step);
839
+ if (step === void 0 || lum === null || (0, import_colorRules.contrastRatio)(lum, paper) < import_colorRules.minContrastRatio) continue;
840
+ var label = labelOn(step);
841
+ var distance = Math.abs(lum - preferredLum);
842
+ if (label && distance < bestDistance) {
843
+ bestDistance = distance;
844
+ best = {
845
+ fill: step,
846
+ label
847
+ };
848
+ }
849
+ }
850
+ return best;
851
+ }
852
+ function holdColorThemeAccent(themes) {
853
+ var _loop = function (_i2, _iter2) {
854
+ var scheme = _iter2[_i2];
855
+ var base = themes[scheme];
856
+ if (!base) return "continue";
857
+ var _iteratorNormalCompletion = true,
858
+ _didIteratorError = false,
859
+ _iteratorError = void 0;
860
+ try {
861
+ var _loop2 = function () {
862
+ var hue = _step.value;
863
+ var _ref, _walkToHoldingInk, _ref1;
864
+ var scopeName = `${scheme}_${hue}`;
865
+ var scope = themes[scopeName];
866
+ var ramp = Array.from({
867
+ length: 12
868
+ }, function (_, index) {
869
+ return base[`${hue}${index + 1}`];
870
+ });
871
+ if (!scope || ramp.some(function (step) {
872
+ return !step;
873
+ })) return "continue";
874
+ var paper = luminanceOf(scope.color1);
875
+ var ink = luminanceOf(scope.color12);
876
+ var surfaces = [scope.color1, scope.color2, scope.color3, scope.color4].map(luminanceOf);
877
+ if (paper === null || ink === null || surfaces.some(function (lum) {
878
+ return lum === null;
879
+ })) return "continue";
880
+ var labels = [scope.color1, scope.color12].sort(function (a, b) {
881
+ return luminanceOf(b) - luminanceOf(a);
882
+ });
883
+ var solid = holdFillLabel(ramp[8], ramp.slice(0, 11), labels, paper);
884
+ var holdsInk = function holdsInk2(lum) {
885
+ return surfaces.every(function (surface) {
886
+ return (0, import_colorRules.contrastRatio)(lum, surface) >= import_colorRules.aaTextContrastRatio;
887
+ });
888
+ };
889
+ var fill = (_ref = solid === null || solid === void 0 ? void 0 : solid.fill) !== null && _ref !== void 0 ? _ref : nearestHoldingStep(ramp[8], ramp.slice(0, 11), function (lum) {
890
+ return Math.max((0, import_colorRules.contrastRatio)(lum, paper), (0, import_colorRules.contrastRatio)(lum, ink)) >= import_colorRules.aaTextContrastRatio && (0, import_colorRules.contrastRatio)(lum, paper) >= import_colorRules.minContrastRatio;
891
+ });
892
+ var accentInk = (_walkToHoldingInk = walkToHoldingInk(ramp[10], ramp[11], holdsInk)) !== null && _walkToHoldingInk !== void 0 ? _walkToHoldingInk : nearestHoldingStep(ramp[10], ramp, holdsInk);
893
+ var fillStep = ramp.indexOf(fill);
894
+ var fillHover = ramp[Math.min(fillStep + 1, ramp.length - 1)];
895
+ var onFill = (_ref1 = solid === null || solid === void 0 ? void 0 : solid.label) !== null && _ref1 !== void 0 ? _ref1 : (0, import_colorRules.holdInkFloor)(fill, (0, import_colorRules.pickReadableForeground)(fill, scope.color1, scope.color12));
896
+ var accent = {
897
+ accentBackground: fill,
898
+ accentColor: accentInk,
899
+ ...selectedPaint(scope, ramp, accentInk)
900
+ };
901
+ var rootOn = luminanceOf(base.switchTrackOff);
902
+ var fillLum = luminanceOf(fill);
903
+ var rootHolds = rootOn === null || fillLum === null || (0, import_colorRules.contrastRatio)(rootOn, fillLum) >= switchStateContrastRatio;
904
+ var track = rootHolds ? void 0 : switchTrackPaint(base, fill, scope.background, (0, import_colorRules.isLightGround)(scope.background) ? [] : [scope.color4]);
905
+ var _iteratorNormalCompletion2 = true,
906
+ _didIteratorError2 = false,
907
+ _iteratorError2 = void 0;
908
+ try {
909
+ var _loop3 = function () {
910
+ var [name, theme] = _step1.value;
911
+ if (name === scopeName) {
912
+ out[name] = {
913
+ ...theme,
914
+ ...accent,
915
+ ...track
916
+ };
917
+ } else if (name.startsWith(`${scopeName}_`)) {
918
+ var owned = Object.keys(accent).filter(function (key) {
919
+ return key in theme;
920
+ });
921
+ if (owned.length > 0) {
922
+ out[name] = {
923
+ ...theme,
924
+ ...Object.fromEntries(owned.map(function (key) {
925
+ return [key, accent[key]];
926
+ }))
927
+ };
928
+ }
929
+ }
930
+ };
931
+ for (var _iterator2 = Object.entries(themes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion2 = (_step1 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) _loop3();
932
+ } catch (err) {
933
+ _didIteratorError2 = true;
934
+ _iteratorError2 = err;
935
+ } finally {
936
+ try {
937
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
938
+ _iterator2.return();
939
+ }
940
+ } finally {
941
+ if (_didIteratorError2) {
942
+ throw _iteratorError2;
943
+ }
944
+ }
945
+ }
946
+ out[`${scopeName}_accent`] = {
947
+ background: fill,
948
+ backgroundHover: fillHover,
949
+ backgroundPress: fillHover,
950
+ backgroundFocus: fillHover,
951
+ backgroundActive: fill,
952
+ borderColor: fill,
953
+ borderColorHover: fillHover,
954
+ borderColorFocus: fillHover,
955
+ borderColorPress: fillHover,
956
+ color: onFill,
957
+ colorHover: onFill,
958
+ colorPress: onFill,
959
+ colorFocus: onFill,
960
+ placeholderColor: onFill,
961
+ boundaryColor: onFill,
962
+ outlineColor: onFill,
963
+ color10: onFill,
964
+ color11: onFill,
965
+ color12: onFill,
966
+ textMuted: onFill,
967
+ accentBackground: onFill,
968
+ accentColor: onFill
969
+ };
970
+ };
971
+ for (var _iterator = childrenHues[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _loop2();
972
+ } catch (err) {
973
+ _didIteratorError = true;
974
+ _iteratorError = err;
975
+ } finally {
976
+ try {
977
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
978
+ _iterator.return();
979
+ }
980
+ } finally {
981
+ if (_didIteratorError) {
982
+ throw _iteratorError;
983
+ }
984
+ }
985
+ }
986
+ };
987
+ var out = {
988
+ ...themes
989
+ };
990
+ for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
991
+ return out;
992
+ }
993
+ var defaultLightShadows = {
994
+ shadow1: "rgba(0,0,0,0.04)",
995
+ shadow2: "rgba(0,0,0,0.08)",
996
+ shadow3: "rgba(0,0,0,0.12)",
997
+ shadow4: "rgba(0,0,0,0.22)",
998
+ shadow5: "rgba(0,0,0,0.33)",
999
+ shadow6: "rgba(0,0,0,0.44)"
1000
+ };
1001
+ var defaultDarkShadows = {
1002
+ shadow1: "rgba(0,0,0,0.15)",
1003
+ shadow2: "rgba(0,0,0,0.23)",
1004
+ shadow3: "rgba(0,0,0,0.33)",
1005
+ shadow4: "rgba(0,0,0,0.45)",
1006
+ shadow5: "rgba(0,0,0,0.65)",
1007
+ shadow6: "rgba(0,0,0,0.8)"
1008
+ };
1009
+ var childrenHues = ["blue", "red", "green", "yellow", "orange", "pink", "purple", "gray"];
1010
+ function holdFocusRingAccent(themes) {
1011
+ var _loop = function (_i2, _iter2) {
1012
+ var scheme = _iter2[_i2];
1013
+ var _themes_;
1014
+ var base = themes[scheme];
1015
+ if (!base) return "continue";
1016
+ var grounds = [base.color1, base.color2].map(luminanceOf);
1017
+ if (grounds.some(function (lum) {
1018
+ return lum === null;
1019
+ })) return "continue";
1020
+ var holds = function holds2(color) {
1021
+ var lum = luminanceOf(color);
1022
+ return lum !== null && isChromatic(color) && grounds.every(function (ground) {
1023
+ return (0, import_colorRules.contrastRatio)(lum, ground) >= import_colorRules.minContrastRatio;
1024
+ });
1025
+ };
1026
+ var rootRing = [base.accentColor, (_themes_ = themes[`${scheme}_blue`]) === null || _themes_ === void 0 ? void 0 : _themes_.accentColor].find(holds);
1027
+ var _iteratorNormalCompletion = true,
1028
+ _didIteratorError = false,
1029
+ _iteratorError = void 0;
1030
+ try {
1031
+ for (var _iterator = Object.entries(themes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
1032
+ var [name, theme] = _step.value;
1033
+ var _parts_;
1034
+ var _themes_1;
1035
+ if (name !== scheme && !name.startsWith(`${scheme}_`)) continue;
1036
+ if (theme.outlineColor === void 0) continue;
1037
+ var parts = name.split("_");
1038
+ if (parts.includes("accent")) continue;
1039
+ var hue = childrenHues.includes((_parts_ = parts[1]) !== null && _parts_ !== void 0 ? _parts_ : "") ? parts[1] : void 0;
1040
+ var scopeInk = hue ? (_themes_1 = themes[`${scheme}_${hue}`]) === null || _themes_1 === void 0 ? void 0 : _themes_1.accentColor : void 0;
1041
+ var ring = holds(scopeInk) ? scopeInk : rootRing;
1042
+ if (!ring || ring === theme.outlineColor) continue;
1043
+ out[name] = {
1044
+ ...theme,
1045
+ outlineColor: ring
1046
+ };
1047
+ }
1048
+ } catch (err) {
1049
+ _didIteratorError = true;
1050
+ _iteratorError = err;
1051
+ } finally {
1052
+ try {
1053
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1054
+ _iterator.return();
1055
+ }
1056
+ } finally {
1057
+ if (_didIteratorError) {
1058
+ throw _iteratorError;
1059
+ }
1060
+ }
1061
+ }
1062
+ };
1063
+ var out = {
1064
+ ...themes
1065
+ };
1066
+ for (var _i = 0, _iter = ["light", "dark"]; _i < _iter.length; _i++) _loop(_i, _iter);
1067
+ return out;
1068
+ }
1069
+ function isChromatic(color) {
1070
+ var hex = color ? (0, import_colorRules.normalizeToHex)(color) : null;
1071
+ if (!hex) return false;
1072
+ var channels = [1, 3, 5].map(function (index) {
1073
+ return Number.parseInt(hex.slice(index, index + 2), 16);
1074
+ });
1075
+ return Math.max(...channels) - Math.min(...channels) >= 24;
1076
+ }
1077
+ function createThemesBuilder(baseTheme, accentTheme, options) {
1078
+ var _ref, _ref1;
1079
+ var _baseTheme_lightShadows, _baseTheme_darkShadows;
1080
+ var getTheme = (options === null || options === void 0 ? void 0 : options.getTheme) ? sanitizeGetTheme(options.getTheme) : void 0;
1081
+ var base = {
1082
+ palette: {
1083
+ dark: baseTheme.darkPalette,
1084
+ light: baseTheme.lightPalette
1085
+ },
1086
+ extra: {
1087
+ light: {
1088
+ ...Object.assign({}, ...Object.values(import_v5.defaultChildrenThemes).map(function (theme) {
1089
+ return theme.light;
1090
+ })),
1091
+ ...baseTheme.lightShadows,
1092
+ shadowColor: ((_baseTheme_lightShadows = baseTheme.lightShadows) === null || _baseTheme_lightShadows === void 0 ? void 0 : _baseTheme_lightShadows.shadow3) || defaultLightShadows.shadow3
1093
+ },
1094
+ dark: {
1095
+ ...Object.assign({}, ...Object.values(import_v5.defaultChildrenThemes).map(function (theme) {
1096
+ return theme.dark;
1097
+ })),
1098
+ ...baseTheme.darkShadows,
1099
+ shadowColor: ((_baseTheme_darkShadows = baseTheme.darkShadows) === null || _baseTheme_darkShadows === void 0 ? void 0 : _baseTheme_darkShadows.shadow3) || defaultDarkShadows.shadow3
1100
+ }
1101
+ }
1102
+ };
1103
+ var childrenThemes = {
1104
+ ...Object.fromEntries(childrenHues.map(function (name) {
1105
+ var {
1106
+ light,
1107
+ dark
1108
+ } = import_v5.defaultChildrenThemes[name];
1109
+ return [name, {
1110
+ palette: {
1111
+ light: Object.values(light),
1112
+ dark: Object.values(dark)
1113
+ }
1114
+ }];
1115
+ })),
1116
+ warning: {
1117
+ palette: {
1118
+ dark: Object.values(Colors.yellowDark),
1119
+ light: withIntentInkFloor(Object.values(Colors.yellow), intentInkFloor.warning)
1120
+ }
1121
+ },
1122
+ error: {
1123
+ palette: {
1124
+ dark: Object.values(Colors.redDark),
1125
+ light: Object.values(Colors.red)
1126
+ }
1127
+ },
1128
+ success: {
1129
+ palette: {
1130
+ dark: Object.values(Colors.greenDark),
1131
+ light: withIntentInkFloor(Object.values(Colors.green), intentInkFloor.success)
1132
+ }
1133
+ }
1134
+ };
1135
+ var createThemesProps = {
1136
+ templates: houseTemplates,
1137
+ componentThemes: (_ref = options === null || options === void 0 ? void 0 : options.componentThemes) !== null && _ref !== void 0 ? _ref : houseComponentThemes,
1138
+ grandChildrenThemes: (_ref1 = options === null || options === void 0 ? void 0 : options.grandChildrenThemes) !== null && _ref1 !== void 0 ? _ref1 : houseGrandChildrenThemes,
1139
+ base,
1140
+ childrenThemes,
1141
+ accent: {
1142
+ palette: {
1143
+ dark: accentTheme.darkPalette,
1144
+ light: accentTheme.lightPalette
1145
+ }
1146
+ }
1147
+ };
1148
+ if (getTheme) {
1149
+ createThemesProps.getTheme = getTheme;
1150
+ }
1151
+ var initialTheme = (0, import_theme_builder.createThemes)(createThemesProps);
1152
+ var themes = holdFocusRingAccent(holdColorThemeAccent(holdSwitchTrack(holdSyntaxFloor(holdNamedInkFloor(holdSelectedState(holdAccentFloor(holdSelectionSurface(neutralizeSemanticEntryText(neutralizeTintText(initialTheme))))))))));
1153
+ return {
1154
+ themes() {
1155
+ return themes;
1156
+ },
1157
+ addTheme(name, theme) {
1158
+ var _ref2, _ref12;
1159
+ var addThemeProps = {
1160
+ templates: houseTemplates,
1161
+ componentThemes: (_ref2 = options === null || options === void 0 ? void 0 : options.componentThemes) !== null && _ref2 !== void 0 ? _ref2 : houseComponentThemes,
1162
+ grandChildrenThemes: (_ref12 = options === null || options === void 0 ? void 0 : options.grandChildrenThemes) !== null && _ref12 !== void 0 ? _ref12 : houseGrandChildrenThemes,
1163
+ base,
1164
+ childrenThemes,
1165
+ accent: {
1166
+ palette: {
1167
+ dark: theme.darkPalette,
1168
+ light: theme.lightPalette
1169
+ }
1170
+ }
1171
+ };
1172
+ if (getTheme) {
1173
+ addThemeProps.getTheme = getTheme;
1174
+ }
1175
+ var createdTheme = (0, import_theme_builder.createThemes)(addThemeProps);
1176
+ return {
1177
+ [`dark_${name}`]: createdTheme.dark_accent,
1178
+ [`light_${name}`]: createdTheme.light_accent
1179
+ };
1180
+ }
1181
+ };
1182
+ }
1183
+ //# sourceMappingURL=createThemes.native.js.map