@multiplatform.one/theme 9.17.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1342) hide show
  1. package/dist/cjs/audit/constraintAudit.cjs +612 -510
  2. package/dist/cjs/audit/constraintAudit.native.cjs +978 -0
  3. package/dist/cjs/audit/constraintAudit.native.js +953 -887
  4. package/dist/cjs/audit/constraintAudit.native.js.map +1 -1
  5. package/dist/cjs/audit/designTokens.cjs +31 -35
  6. package/dist/cjs/audit/designTokens.native.cjs +70 -0
  7. package/dist/cjs/audit/designTokens.native.js +50 -58
  8. package/dist/cjs/audit/designTokens.native.js.map +1 -1
  9. package/dist/cjs/audit/diffReport.cjs +246 -236
  10. package/dist/cjs/audit/diffReport.native.cjs +502 -0
  11. package/dist/cjs/audit/diffReport.native.js +481 -496
  12. package/dist/cjs/audit/diffReport.native.js.map +1 -1
  13. package/dist/cjs/audit/index.cjs +25 -27
  14. package/dist/cjs/audit/index.native.cjs +41 -0
  15. package/dist/cjs/audit/index.native.js +25 -26
  16. package/dist/cjs/audit/index.native.js.map +1 -1
  17. package/dist/cjs/audit/themeMatrix.cjs +998 -886
  18. package/dist/cjs/audit/themeMatrix.native.cjs +1600 -0
  19. package/dist/cjs/audit/themeMatrix.native.js +1560 -1510
  20. package/dist/cjs/audit/themeMatrix.native.js.map +1 -1
  21. package/dist/cjs/dates.cjs +186 -224
  22. package/dist/cjs/dates.native.cjs +241 -0
  23. package/dist/cjs/dates.native.js +200 -246
  24. package/dist/cjs/dates.native.js.map +1 -1
  25. package/dist/cjs/devWarn.cjs +153 -129
  26. package/dist/cjs/devWarn.native.cjs +221 -0
  27. package/dist/cjs/devWarn.native.js +176 -153
  28. package/dist/cjs/devWarn.native.js.map +1 -1
  29. package/dist/cjs/expo.cjs +53 -66
  30. package/dist/cjs/expo.native.cjs +83 -0
  31. package/dist/cjs/expo.native.js +57 -69
  32. package/dist/cjs/expo.native.js.map +1 -1
  33. package/dist/cjs/figma/figmaTokens.cjs +317 -291
  34. package/dist/cjs/figma/figmaTokens.native.cjs +639 -0
  35. package/dist/cjs/figma/figmaTokens.native.js +577 -574
  36. package/dist/cjs/figma/figmaTokens.native.js.map +1 -1
  37. package/dist/cjs/font.cjs +27 -50
  38. package/dist/cjs/font.native.cjs +51 -0
  39. package/dist/cjs/font.native.js +34 -56
  40. package/dist/cjs/font.native.js.map +1 -1
  41. package/dist/cjs/fonts/createFontLoader.cjs +15 -21
  42. package/dist/cjs/fonts/createFontLoader.native.cjs +68 -0
  43. package/dist/cjs/fonts/createFontLoader.native.js +55 -55
  44. package/dist/cjs/fonts/createFontLoader.native.js.map +1 -1
  45. package/dist/cjs/fonts/index.cjs +9 -11
  46. package/dist/cjs/fonts/index.native.cjs +22 -0
  47. package/dist/cjs/fonts/index.native.js +9 -10
  48. package/dist/cjs/fonts/index.native.js.map +1 -1
  49. package/dist/cjs/fonts/interFaces.cjs +21 -23
  50. package/dist/cjs/fonts/interFaces.native.cjs +38 -0
  51. package/dist/cjs/fonts/interFaces.native.js +21 -22
  52. package/dist/cjs/fonts/interFaces.native.js.map +1 -1
  53. package/dist/cjs/fonts/types.cjs +9 -11
  54. package/dist/cjs/fonts/types.native.cjs +18 -0
  55. package/dist/cjs/fonts/types.native.js +9 -10
  56. package/dist/cjs/fonts/types.native.js.map +1 -1
  57. package/dist/cjs/index.cjs +16 -18
  58. package/dist/cjs/index.gnome.cjs +404 -398
  59. package/dist/cjs/index.gnome.native.cjs +465 -0
  60. package/dist/cjs/index.gnome.native.js +404 -397
  61. package/dist/cjs/index.gnome.native.js.map +1 -1
  62. package/dist/cjs/index.native.cjs +39 -0
  63. package/dist/cjs/index.native.js +16 -17
  64. package/dist/cjs/index.native.js.map +1 -1
  65. package/dist/cjs/keyboardFocusRing.cjs +61 -56
  66. package/dist/cjs/keyboardFocusRing.native.cjs +120 -0
  67. package/dist/cjs/keyboardFocusRing.native.js +63 -57
  68. package/dist/cjs/keyboardFocusRing.native.js.map +1 -1
  69. package/dist/cjs/menuRow.cjs +57 -55
  70. package/dist/cjs/menuRow.native.cjs +91 -0
  71. package/dist/cjs/menuRow.native.js +60 -57
  72. package/dist/cjs/menuRow.native.js.map +1 -1
  73. package/dist/cjs/nativeTwins.cjs +17 -19
  74. package/dist/cjs/nativeTwins.native.cjs +34 -0
  75. package/dist/cjs/nativeTwins.native.js +17 -18
  76. package/dist/cjs/nativeTwins.native.js.map +1 -1
  77. package/dist/cjs/numbers.cjs +138 -159
  78. package/dist/cjs/numbers.native.cjs +193 -0
  79. package/dist/cjs/numbers.native.js +153 -173
  80. package/dist/cjs/numbers.native.js.map +1 -1
  81. package/dist/cjs/theme/FontKnobStyles.cjs +129 -127
  82. package/dist/cjs/theme/FontKnobStyles.native.cjs +38 -0
  83. package/dist/cjs/theme/FontKnobStyles.native.js +19 -20
  84. package/dist/cjs/theme/FontKnobStyles.native.js.map +1 -1
  85. package/dist/cjs/theme/Heading.cjs +92 -148
  86. package/dist/cjs/theme/Heading.native.cjs +129 -0
  87. package/dist/cjs/theme/Heading.native.js +94 -149
  88. package/dist/cjs/theme/Heading.native.js.map +1 -1
  89. package/dist/cjs/theme/IconSlot.cjs +36 -54
  90. package/dist/cjs/theme/IconSlot.native.cjs +54 -0
  91. package/dist/cjs/theme/IconSlot.native.js +38 -60
  92. package/dist/cjs/theme/IconSlot.native.js.map +1 -1
  93. package/dist/cjs/theme/Intent.cjs +35 -43
  94. package/dist/cjs/theme/Intent.native.cjs +51 -0
  95. package/dist/cjs/theme/Intent.native.js +35 -42
  96. package/dist/cjs/theme/Intent.native.js.map +1 -1
  97. package/dist/cjs/theme/Preset.cjs +127 -130
  98. package/dist/cjs/theme/Preset.native.cjs +152 -0
  99. package/dist/cjs/theme/Preset.native.js +129 -131
  100. package/dist/cjs/theme/Preset.native.js.map +1 -1
  101. package/dist/cjs/theme/PresetContext.cjs +19 -21
  102. package/dist/cjs/theme/PresetContext.native.cjs +39 -0
  103. package/dist/cjs/theme/PresetContext.native.js +20 -21
  104. package/dist/cjs/theme/PresetContext.native.js.map +1 -1
  105. package/dist/cjs/theme/Surface.cjs +70 -78
  106. package/dist/cjs/theme/Surface.native.cjs +116 -0
  107. package/dist/cjs/theme/Surface.native.js +76 -84
  108. package/dist/cjs/theme/Surface.native.js.map +1 -1
  109. package/dist/cjs/theme/Text.cjs +105 -134
  110. package/dist/cjs/theme/Text.native.cjs +134 -0
  111. package/dist/cjs/theme/Text.native.js +105 -134
  112. package/dist/cjs/theme/Text.native.js.map +1 -1
  113. package/dist/cjs/theme/Tint.cjs +29 -36
  114. package/dist/cjs/theme/Tint.native.cjs +51 -0
  115. package/dist/cjs/theme/Tint.native.js +30 -36
  116. package/dist/cjs/theme/Tint.native.js.map +1 -1
  117. package/dist/cjs/theme/accentHue.cjs +54 -48
  118. package/dist/cjs/theme/accentHue.native.cjs +87 -0
  119. package/dist/cjs/theme/accentHue.native.js +62 -55
  120. package/dist/cjs/theme/accentHue.native.js.map +1 -1
  121. package/dist/cjs/theme/accentInk.cjs +113 -112
  122. package/dist/cjs/theme/accentInk.native.cjs +217 -0
  123. package/dist/cjs/theme/accentInk.native.js +182 -186
  124. package/dist/cjs/theme/accentInk.native.js.map +1 -1
  125. package/dist/cjs/theme/activateThemeConfig.cjs +20 -28
  126. package/dist/cjs/theme/activateThemeConfig.native.cjs +36 -0
  127. package/dist/cjs/theme/activateThemeConfig.native.js +20 -27
  128. package/dist/cjs/theme/activateThemeConfig.native.js.map +1 -1
  129. package/dist/cjs/theme/animations/css.cjs +19 -21
  130. package/dist/cjs/theme/animations/css.native.cjs +36 -0
  131. package/dist/cjs/theme/animations/css.native.js +20 -21
  132. package/dist/cjs/theme/animations/css.native.js.map +1 -1
  133. package/dist/cjs/theme/animations/index.cjs +9 -11
  134. package/dist/cjs/theme/animations/index.native.cjs +30 -0
  135. package/dist/cjs/theme/animations/index.native.js +19 -10
  136. package/dist/cjs/theme/animations/index.native.js.map +1 -1
  137. package/dist/cjs/theme/animations/reactNative.cjs +138 -143
  138. package/dist/cjs/theme/animations/reactNative.native.cjs +155 -0
  139. package/dist/cjs/theme/animations/reactNative.native.js +139 -143
  140. package/dist/cjs/theme/animations/reactNative.native.js.map +1 -1
  141. package/dist/cjs/theme/chartPalette.cjs +263 -209
  142. package/dist/cjs/theme/chartPalette.native.cjs +393 -0
  143. package/dist/cjs/theme/chartPalette.native.js +335 -285
  144. package/dist/cjs/theme/chartPalette.native.js.map +1 -1
  145. package/dist/cjs/theme/colorRules.cjs +276 -260
  146. package/dist/cjs/theme/colorRules.native.cjs +378 -0
  147. package/dist/cjs/theme/colorRules.native.js +308 -293
  148. package/dist/cjs/theme/colorRules.native.js.map +1 -1
  149. package/dist/cjs/theme/composeKnobs.cjs +176 -0
  150. package/dist/cjs/theme/composeKnobs.native.cjs +358 -0
  151. package/dist/cjs/theme/composeKnobs.native.js +360 -0
  152. package/dist/cjs/theme/composeKnobs.native.js.map +1 -0
  153. package/dist/cjs/theme/controlSizing.cjs +112 -0
  154. package/dist/cjs/theme/controlSizing.native.cjs +190 -0
  155. package/dist/cjs/theme/controlSizing.native.js +192 -0
  156. package/dist/cjs/theme/controlSizing.native.js.map +1 -0
  157. package/dist/cjs/theme/controlTiers.cjs +42 -44
  158. package/dist/cjs/theme/controlTiers.native.cjs +74 -0
  159. package/dist/cjs/theme/controlTiers.native.js +45 -46
  160. package/dist/cjs/theme/controlTiers.native.js.map +1 -1
  161. package/dist/cjs/theme/cookies.cjs +138 -137
  162. package/dist/cjs/theme/cookies.native.cjs +292 -0
  163. package/dist/cjs/theme/cookies.native.js +244 -259
  164. package/dist/cjs/theme/cookies.native.js.map +1 -1
  165. package/dist/cjs/theme/cornerSmoothing.cjs +69 -71
  166. package/dist/cjs/theme/cornerSmoothing.native.cjs +68 -0
  167. package/dist/cjs/theme/cornerSmoothing.native.js +34 -35
  168. package/dist/cjs/theme/cornerSmoothing.native.js.map +1 -1
  169. package/dist/cjs/theme/createDefaultThemeConfig.cjs +105 -109
  170. package/dist/cjs/theme/createDefaultThemeConfig.native.cjs +184 -0
  171. package/dist/cjs/theme/createDefaultThemeConfig.native.js +144 -151
  172. package/dist/cjs/theme/createDefaultThemeConfig.native.js.map +1 -1
  173. package/dist/cjs/theme/createThemes.cjs +1077 -997
  174. package/dist/cjs/theme/createThemes.native.cjs +1999 -0
  175. package/dist/cjs/theme/createThemes.native.js +1839 -1724
  176. package/dist/cjs/theme/createThemes.native.js.map +1 -1
  177. package/dist/cjs/theme/dedupeInherited.cjs +60 -62
  178. package/dist/cjs/theme/dedupeInherited.native.cjs +181 -0
  179. package/dist/cjs/theme/dedupeInherited.native.js +158 -169
  180. package/dist/cjs/theme/dedupeInherited.native.js.map +1 -1
  181. package/dist/cjs/theme/defaults/accent.cjs +17 -21
  182. package/dist/cjs/theme/defaults/accent.native.cjs +30 -0
  183. package/dist/cjs/theme/defaults/accent.native.js +17 -20
  184. package/dist/cjs/theme/defaults/accent.native.js.map +1 -1
  185. package/dist/cjs/theme/defaults/base.cjs +41 -45
  186. package/dist/cjs/theme/defaults/base.native.cjs +54 -0
  187. package/dist/cjs/theme/defaults/base.native.js +41 -44
  188. package/dist/cjs/theme/defaults/base.native.js.map +1 -1
  189. package/dist/cjs/theme/defaults/builderOptions.cjs +210 -190
  190. package/dist/cjs/theme/defaults/builderOptions.native.cjs +313 -0
  191. package/dist/cjs/theme/defaults/builderOptions.native.js +273 -259
  192. package/dist/cjs/theme/defaults/builderOptions.native.js.map +1 -1
  193. package/dist/cjs/theme/defaults/categoryFonts.cjs +34 -38
  194. package/dist/cjs/theme/defaults/categoryFonts.native.cjs +48 -0
  195. package/dist/cjs/theme/defaults/categoryFonts.native.js +34 -37
  196. package/dist/cjs/theme/defaults/categoryFonts.native.js.map +1 -1
  197. package/dist/cjs/theme/defaults/fonts.cjs +174 -206
  198. package/dist/cjs/theme/defaults/fonts.native.cjs +333 -0
  199. package/dist/cjs/theme/defaults/fonts.native.js +248 -293
  200. package/dist/cjs/theme/defaults/fonts.native.js.map +1 -1
  201. package/dist/cjs/theme/defaults/house.cjs +73 -23
  202. package/dist/cjs/theme/defaults/house.native.cjs +95 -0
  203. package/dist/cjs/theme/defaults/house.native.js +77 -26
  204. package/dist/cjs/theme/defaults/house.native.js.map +1 -1
  205. package/dist/cjs/theme/defaults/index.cjs +9 -11
  206. package/dist/cjs/theme/defaults/index.native.cjs +25 -0
  207. package/dist/cjs/theme/defaults/index.native.js +9 -10
  208. package/dist/cjs/theme/defaults/index.native.js.map +1 -1
  209. package/dist/cjs/theme/defaults/interFont.cjs +41 -0
  210. package/dist/cjs/theme/defaults/interFont.native.cjs +46 -0
  211. package/dist/cjs/theme/defaults/interFont.native.js +48 -0
  212. package/dist/cjs/theme/defaults/interFont.native.js.map +1 -0
  213. package/dist/cjs/theme/devtools/ColorLineVisualizer.cjs +176 -218
  214. package/dist/cjs/theme/devtools/ColorLineVisualizer.native.cjs +28 -0
  215. package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js +15 -18
  216. package/dist/cjs/theme/devtools/ColorLineVisualizer.native.js.map +1 -1
  217. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.cjs +1303 -1271
  218. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.cjs +28 -0
  219. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js +15 -18
  220. package/dist/cjs/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -1
  221. package/dist/cjs/theme/devtools/animationOptions.cjs +18 -22
  222. package/dist/cjs/theme/devtools/animationOptions.native.cjs +36 -0
  223. package/dist/cjs/theme/devtools/animationOptions.native.js +20 -28
  224. package/dist/cjs/theme/devtools/animationOptions.native.js.map +1 -1
  225. package/dist/cjs/theme/devtools/buildSnapshot.cjs +95 -80
  226. package/dist/cjs/theme/devtools/buildSnapshot.native.cjs +180 -0
  227. package/dist/cjs/theme/devtools/buildSnapshot.native.js +166 -158
  228. package/dist/cjs/theme/devtools/buildSnapshot.native.js.map +1 -1
  229. package/dist/cjs/theme/devtools/index.cjs +9 -11
  230. package/dist/cjs/theme/devtools/index.native.cjs +25 -0
  231. package/dist/cjs/theme/devtools/index.native.js +9 -10
  232. package/dist/cjs/theme/devtools/index.native.js.map +1 -1
  233. package/dist/cjs/theme/devtools/knobIcons.cjs +370 -441
  234. package/dist/cjs/theme/devtools/knobIcons.native.cjs +434 -0
  235. package/dist/cjs/theme/devtools/knobIcons.native.js +377 -447
  236. package/dist/cjs/theme/devtools/knobIcons.native.js.map +1 -1
  237. package/dist/cjs/theme/devtools/vizConstants.cjs +32 -34
  238. package/dist/cjs/theme/devtools/vizConstants.native.cjs +54 -0
  239. package/dist/cjs/theme/devtools/vizConstants.native.js +32 -33
  240. package/dist/cjs/theme/devtools/vizConstants.native.js.map +1 -1
  241. package/dist/cjs/theme/dynamicType.cjs +31 -33
  242. package/dist/cjs/theme/dynamicType.native.cjs +52 -0
  243. package/dist/cjs/theme/dynamicType.native.js +31 -32
  244. package/dist/cjs/theme/dynamicType.native.js.map +1 -1
  245. package/dist/cjs/theme/fieldFocus.cjs +44 -42
  246. package/dist/cjs/theme/fieldFocus.native.cjs +77 -0
  247. package/dist/cjs/theme/fieldFocus.native.js +48 -45
  248. package/dist/cjs/theme/fieldFocus.native.js.map +1 -1
  249. package/dist/cjs/theme/fillContrast.cjs +120 -108
  250. package/dist/cjs/theme/fillContrast.native.cjs +175 -0
  251. package/dist/cjs/theme/fillContrast.native.js +144 -133
  252. package/dist/cjs/theme/fillContrast.native.js.map +1 -1
  253. package/dist/cjs/theme/focusState.cjs +100 -87
  254. package/dist/cjs/theme/focusState.native.cjs +174 -0
  255. package/dist/cjs/theme/focusState.native.js +139 -86
  256. package/dist/cjs/theme/focusState.native.js.map +1 -1
  257. package/dist/cjs/theme/fontCategoryMetrics.cjs +71 -76
  258. package/dist/cjs/theme/fontCategoryMetrics.native.cjs +88 -0
  259. package/dist/cjs/theme/fontCategoryMetrics.native.js +71 -75
  260. package/dist/cjs/theme/fontCategoryMetrics.native.js.map +1 -1
  261. package/dist/cjs/theme/fontCategoryStacks.cjs +25 -29
  262. package/dist/cjs/theme/fontCategoryStacks.native.cjs +38 -0
  263. package/dist/cjs/theme/fontCategoryStacks.native.js +25 -28
  264. package/dist/cjs/theme/fontCategoryStacks.native.js.map +1 -1
  265. package/dist/cjs/theme/glyphPaint.cjs +37 -39
  266. package/dist/cjs/theme/glyphPaint.native.cjs +76 -0
  267. package/dist/cjs/theme/glyphPaint.native.js +58 -61
  268. package/dist/cjs/theme/glyphPaint.native.js.map +1 -1
  269. package/dist/cjs/theme/glyphTint.cjs +65 -61
  270. package/dist/cjs/theme/glyphTint.native.cjs +100 -0
  271. package/dist/cjs/theme/glyphTint.native.js +68 -62
  272. package/dist/cjs/theme/glyphTint.native.js.map +1 -1
  273. package/dist/cjs/theme/groupGeometry.cjs +44 -46
  274. package/dist/cjs/theme/groupGeometry.native.cjs +69 -0
  275. package/dist/cjs/theme/groupGeometry.native.js +46 -47
  276. package/dist/cjs/theme/groupGeometry.native.js.map +1 -1
  277. package/dist/cjs/theme/hairline.cjs +79 -85
  278. package/dist/cjs/theme/hairline.native.cjs +60 -0
  279. package/dist/cjs/theme/hairline.native.js +40 -51
  280. package/dist/cjs/theme/hairline.native.js.map +1 -1
  281. package/dist/cjs/theme/index.cjs +20 -20
  282. package/dist/cjs/theme/index.native.cjs +100 -0
  283. package/dist/cjs/theme/index.native.js +20 -19
  284. package/dist/cjs/theme/index.native.js.map +1 -1
  285. package/dist/cjs/theme/intents.cjs +39 -51
  286. package/dist/cjs/theme/intents.native.cjs +52 -0
  287. package/dist/cjs/theme/intents.native.js +39 -50
  288. package/dist/cjs/theme/intents.native.js.map +1 -1
  289. package/dist/cjs/theme/knobs.cjs +123 -120
  290. package/dist/cjs/theme/knobs.native.cjs +177 -0
  291. package/dist/cjs/theme/knobs.native.js +123 -119
  292. package/dist/cjs/theme/knobs.native.js.map +1 -1
  293. package/dist/cjs/theme/layoutTokens.cjs +129 -124
  294. package/dist/cjs/theme/layoutTokens.native.cjs +236 -0
  295. package/dist/cjs/theme/layoutTokens.native.js +173 -173
  296. package/dist/cjs/theme/layoutTokens.native.js.map +1 -1
  297. package/dist/cjs/theme/listRows.cjs +24 -26
  298. package/dist/cjs/theme/listRows.native.cjs +46 -0
  299. package/dist/cjs/theme/listRows.native.js +26 -27
  300. package/dist/cjs/theme/listRows.native.js.map +1 -1
  301. package/dist/cjs/theme/motion.cjs +64 -56
  302. package/dist/cjs/theme/motion.native.cjs +98 -0
  303. package/dist/cjs/theme/motion.native.js +70 -61
  304. package/dist/cjs/theme/motion.native.js.map +1 -1
  305. package/dist/cjs/theme/motionStops.cjs +28 -18
  306. package/dist/cjs/theme/motionStops.native.cjs +40 -0
  307. package/dist/cjs/theme/motionStops.native.js +29 -18
  308. package/dist/cjs/theme/motionStops.native.js.map +1 -1
  309. package/dist/cjs/theme/motionTiming.cjs +52 -54
  310. package/dist/cjs/theme/motionTiming.native.cjs +82 -0
  311. package/dist/cjs/theme/motionTiming.native.js +55 -56
  312. package/dist/cjs/theme/motionTiming.native.js.map +1 -1
  313. package/dist/cjs/theme/nativeFontFamily.cjs +15 -19
  314. package/dist/cjs/theme/nativeFontFamily.native.cjs +32 -0
  315. package/dist/cjs/theme/nativeFontFamily.native.js +17 -20
  316. package/dist/cjs/theme/nativeFontFamily.native.js.map +1 -1
  317. package/dist/cjs/theme/nativeMonoFamily.cjs +43 -27
  318. package/dist/cjs/theme/nativeMonoFamily.native.cjs +62 -0
  319. package/dist/cjs/theme/nativeMonoFamily.native.js +43 -26
  320. package/dist/cjs/theme/nativeMonoFamily.native.js.map +1 -1
  321. package/dist/cjs/theme/nativePresetSwitch.cjs +27 -31
  322. package/dist/cjs/theme/nativePresetSwitch.native.cjs +45 -0
  323. package/dist/cjs/theme/nativePresetSwitch.native.js +29 -32
  324. package/dist/cjs/theme/nativePresetSwitch.native.js.map +1 -1
  325. package/dist/cjs/theme/nativeSchemePreference.cjs +45 -51
  326. package/dist/cjs/theme/nativeSchemePreference.native.cjs +74 -0
  327. package/dist/cjs/theme/nativeSchemePreference.native.js +49 -54
  328. package/dist/cjs/theme/nativeSchemePreference.native.js.map +1 -1
  329. package/dist/cjs/theme/nativeTheme.cjs +72 -85
  330. package/dist/cjs/theme/nativeTheme.native.cjs +101 -0
  331. package/dist/cjs/theme/nativeTheme.native.js +75 -87
  332. package/dist/cjs/theme/nativeTheme.native.js.map +1 -1
  333. package/dist/cjs/theme/nativeTransitionProps.cjs +45 -53
  334. package/dist/cjs/theme/nativeTransitionProps.native.cjs +67 -0
  335. package/dist/cjs/theme/nativeTransitionProps.native.js +49 -61
  336. package/dist/cjs/theme/nativeTransitionProps.native.js.map +1 -1
  337. package/dist/cjs/theme/overlayFill.cjs +55 -41
  338. package/dist/cjs/theme/overlayFill.native.cjs +84 -0
  339. package/dist/cjs/theme/overlayFill.native.js +60 -45
  340. package/dist/cjs/theme/overlayFill.native.js.map +1 -1
  341. package/dist/cjs/theme/overlaySurfaces.cjs +291 -354
  342. package/dist/cjs/theme/overlaySurfaces.native.cjs +375 -0
  343. package/dist/cjs/theme/overlaySurfaces.native.js +306 -377
  344. package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -1
  345. package/dist/cjs/theme/pageGutter.cjs +67 -76
  346. package/dist/cjs/theme/pageGutter.native.cjs +130 -0
  347. package/dist/cjs/theme/pageGutter.native.js +92 -102
  348. package/dist/cjs/theme/pageGutter.native.js.map +1 -1
  349. package/dist/cjs/theme/preset.types.cjs +9 -11
  350. package/dist/cjs/theme/preset.types.native.cjs +18 -0
  351. package/dist/cjs/theme/preset.types.native.js +9 -10
  352. package/dist/cjs/theme/preset.types.native.js.map +1 -1
  353. package/dist/cjs/theme/presetPreview.cjs +26 -30
  354. package/dist/cjs/theme/presetPreview.native.cjs +41 -0
  355. package/dist/cjs/theme/presetPreview.native.js +27 -30
  356. package/dist/cjs/theme/presetPreview.native.js.map +1 -1
  357. package/dist/cjs/theme/presetStore.cjs +200 -218
  358. package/dist/cjs/theme/presetStore.native.cjs +318 -0
  359. package/dist/cjs/theme/presetStore.native.js +245 -269
  360. package/dist/cjs/theme/presetStore.native.js.map +1 -1
  361. package/dist/cjs/theme/presetUserSync.cjs +47 -52
  362. package/dist/cjs/theme/presetUserSync.native.cjs +69 -0
  363. package/dist/cjs/theme/presetUserSync.native.js +49 -53
  364. package/dist/cjs/theme/presetUserSync.native.js.map +1 -1
  365. package/dist/cjs/theme/presets.cjs +111 -100
  366. package/dist/cjs/theme/presets.native.cjs +140 -0
  367. package/dist/cjs/theme/presets.native.js +111 -99
  368. package/dist/cjs/theme/presets.native.js.map +1 -1
  369. package/dist/cjs/theme/radiusClass.cjs +91 -99
  370. package/dist/cjs/theme/radiusClass.native.cjs +128 -0
  371. package/dist/cjs/theme/radiusClass.native.js +97 -104
  372. package/dist/cjs/theme/radiusClass.native.js.map +1 -1
  373. package/dist/cjs/theme/radiusClassTable.generated.cjs +133 -147
  374. package/dist/cjs/theme/radiusClassTable.generated.native.cjs +152 -0
  375. package/dist/cjs/theme/radiusClassTable.generated.native.js +133 -146
  376. package/dist/cjs/theme/radiusClassTable.generated.native.js.map +1 -1
  377. package/dist/cjs/theme/ramps.cjs +67 -58
  378. package/dist/cjs/theme/ramps.native.cjs +87 -0
  379. package/dist/cjs/theme/ramps.native.js +68 -58
  380. package/dist/cjs/theme/ramps.native.js.map +1 -1
  381. package/dist/cjs/theme/readableColor.cjs +196 -191
  382. package/dist/cjs/theme/readableColor.native.cjs +270 -0
  383. package/dist/cjs/theme/readableColor.native.js +225 -222
  384. package/dist/cjs/theme/readableColor.native.js.map +1 -1
  385. package/dist/cjs/theme/recipeInputs.cjs +268 -290
  386. package/dist/cjs/theme/recipeInputs.native.cjs +432 -0
  387. package/dist/cjs/theme/recipeInputs.native.js +367 -403
  388. package/dist/cjs/theme/recipeInputs.native.js.map +1 -1
  389. package/dist/cjs/theme/recipes.cjs +9 -11
  390. package/dist/cjs/theme/recipes.native.cjs +18 -0
  391. package/dist/cjs/theme/recipes.native.js +9 -10
  392. package/dist/cjs/theme/recipes.native.js.map +1 -1
  393. package/dist/cjs/theme/reducedMotion.cjs +27 -31
  394. package/dist/cjs/theme/reducedMotion.native.cjs +74 -0
  395. package/dist/cjs/theme/reducedMotion.native.js +49 -54
  396. package/dist/cjs/theme/reducedMotion.native.js.map +1 -1
  397. package/dist/cjs/theme/resolveKnobs.cjs +645 -764
  398. package/dist/cjs/theme/resolveKnobs.native.cjs +792 -0
  399. package/dist/cjs/theme/resolveKnobs.native.js +657 -778
  400. package/dist/cjs/theme/resolveKnobs.native.js.map +1 -1
  401. package/dist/cjs/theme/rowStates.cjs +44 -49
  402. package/dist/cjs/theme/rowStates.native.cjs +91 -0
  403. package/dist/cjs/theme/rowStates.native.js +60 -65
  404. package/dist/cjs/theme/rowStates.native.js.map +1 -1
  405. package/dist/cjs/theme/scale/ScaleStyles.cjs +33 -37
  406. package/dist/cjs/theme/scale/ScaleStyles.native.cjs +38 -0
  407. package/dist/cjs/theme/scale/ScaleStyles.native.js +19 -20
  408. package/dist/cjs/theme/scale/ScaleStyles.native.js.map +1 -1
  409. package/dist/cjs/theme/scale/activeScale.cjs +31 -33
  410. package/dist/cjs/theme/scale/activeScale.native.cjs +77 -0
  411. package/dist/cjs/theme/scale/activeScale.native.js +52 -57
  412. package/dist/cjs/theme/scale/activeScale.native.js.map +1 -1
  413. package/dist/cjs/theme/scale/deriveRecipeInputs.cjs +72 -88
  414. package/dist/cjs/theme/scale/deriveRecipeInputs.native.cjs +133 -0
  415. package/dist/cjs/theme/scale/deriveRecipeInputs.native.js +107 -126
  416. package/dist/cjs/theme/scale/deriveRecipeInputs.native.js.map +1 -1
  417. package/dist/cjs/theme/scale/generateScale.cjs +75 -81
  418. package/dist/cjs/theme/scale/generateScale.native.cjs +182 -0
  419. package/dist/cjs/theme/scale/generateScale.native.js +147 -163
  420. package/dist/cjs/theme/scale/generateScale.native.js.map +1 -1
  421. package/dist/cjs/theme/scale/index.cjs +55 -57
  422. package/dist/cjs/theme/scale/index.native.cjs +78 -0
  423. package/dist/cjs/theme/scale/index.native.js +55 -56
  424. package/dist/cjs/theme/scale/index.native.js.map +1 -1
  425. package/dist/cjs/theme/scale/installScaleConfig.cjs +15 -19
  426. package/dist/cjs/theme/scale/installScaleConfig.native.cjs +68 -0
  427. package/dist/cjs/theme/scale/installScaleConfig.native.js +45 -40
  428. package/dist/cjs/theme/scale/installScaleConfig.native.js.map +1 -1
  429. package/dist/cjs/theme/scale/scaleAttribute.cjs +18 -22
  430. package/dist/cjs/theme/scale/scaleAttribute.native.cjs +37 -0
  431. package/dist/cjs/theme/scale/scaleAttribute.native.js +18 -21
  432. package/dist/cjs/theme/scale/scaleAttribute.native.js.map +1 -1
  433. package/dist/cjs/theme/scale/scaleCss.cjs +69 -70
  434. package/dist/cjs/theme/scale/scaleCss.native.cjs +184 -0
  435. package/dist/cjs/theme/scale/scaleCss.native.js +163 -178
  436. package/dist/cjs/theme/scale/scaleCss.native.js.map +1 -1
  437. package/dist/cjs/theme/scale/scaleFonts.cjs +64 -66
  438. package/dist/cjs/theme/scale/scaleFonts.native.cjs +141 -0
  439. package/dist/cjs/theme/scale/scaleFonts.native.js +119 -131
  440. package/dist/cjs/theme/scale/scaleFonts.native.js.map +1 -1
  441. package/dist/cjs/theme/scale/scaleInputs.cjs +262 -193
  442. package/dist/cjs/theme/scale/scaleInputs.native.cjs +305 -0
  443. package/dist/cjs/theme/scale/scaleInputs.native.js +264 -194
  444. package/dist/cjs/theme/scale/scaleInputs.native.js.map +1 -1
  445. package/dist/cjs/theme/scale/themeScales.cjs +117 -110
  446. package/dist/cjs/theme/scale/themeScales.native.cjs +188 -0
  447. package/dist/cjs/theme/scale/themeScales.native.js +160 -155
  448. package/dist/cjs/theme/scale/themeScales.native.js.map +1 -1
  449. package/dist/cjs/theme/scale/useActiveScale.cjs +50 -52
  450. package/dist/cjs/theme/scale/useActiveScale.native.cjs +84 -0
  451. package/dist/cjs/theme/scale/useActiveScale.native.js +56 -57
  452. package/dist/cjs/theme/scale/useActiveScale.native.js.map +1 -1
  453. package/dist/cjs/theme/schemeStore.cjs +54 -56
  454. package/dist/cjs/theme/schemeStore.native.cjs +101 -0
  455. package/dist/cjs/theme/schemeStore.native.js +67 -68
  456. package/dist/cjs/theme/schemeStore.native.js.map +1 -1
  457. package/dist/cjs/theme/shared.cjs +94 -97
  458. package/dist/cjs/theme/shared.native.cjs +160 -0
  459. package/dist/cjs/theme/shared.native.js +130 -136
  460. package/dist/cjs/theme/shared.native.js.map +1 -1
  461. package/dist/cjs/theme/sizeRecipes.cjs +120 -116
  462. package/dist/cjs/theme/sizeRecipes.native.cjs +233 -0
  463. package/dist/cjs/theme/sizeRecipes.native.js +181 -187
  464. package/dist/cjs/theme/sizeRecipes.native.js.map +1 -1
  465. package/dist/cjs/theme/subsetThemes.cjs +31 -35
  466. package/dist/cjs/theme/subsetThemes.native.cjs +69 -0
  467. package/dist/cjs/theme/subsetThemes.native.js +56 -61
  468. package/dist/cjs/theme/subsetThemes.native.js.map +1 -1
  469. package/dist/cjs/theme/theme.cjs +163 -160
  470. package/dist/cjs/theme/theme.native.cjs +20 -0
  471. package/dist/cjs/theme/theme.native.js +9 -10
  472. package/dist/cjs/theme/theme.native.js.map +1 -1
  473. package/dist/cjs/theme/themeValue.cjs +40 -32
  474. package/dist/cjs/theme/themeValue.native.cjs +78 -0
  475. package/dist/cjs/theme/themeValue.native.js +57 -50
  476. package/dist/cjs/theme/themeValue.native.js.map +1 -1
  477. package/dist/cjs/theme/tileSizes.cjs +134 -163
  478. package/dist/cjs/theme/tileSizes.native.cjs +198 -0
  479. package/dist/cjs/theme/tileSizes.native.js +157 -187
  480. package/dist/cjs/theme/tileSizes.native.js.map +1 -1
  481. package/dist/cjs/theme/tintHues.cjs +48 -21
  482. package/dist/cjs/theme/tintHues.native.cjs +63 -0
  483. package/dist/cjs/theme/tintHues.native.js +48 -20
  484. package/dist/cjs/theme/tintHues.native.js.map +1 -1
  485. package/dist/cjs/theme/tokenNumber.cjs +18 -22
  486. package/dist/cjs/theme/tokenNumber.native.cjs +34 -0
  487. package/dist/cjs/theme/tokenNumber.native.js +20 -23
  488. package/dist/cjs/theme/tokenNumber.native.js.map +1 -1
  489. package/dist/cjs/theme/touchManipulation.cjs +31 -18
  490. package/dist/cjs/theme/touchManipulation.native.cjs +48 -0
  491. package/dist/cjs/theme/touchManipulation.native.js +31 -17
  492. package/dist/cjs/theme/touchManipulation.native.js.map +1 -1
  493. package/dist/cjs/theme/transitionProps.cjs +32 -37
  494. package/dist/cjs/theme/transitionProps.native.cjs +20 -0
  495. package/dist/cjs/theme/transitionProps.native.js +9 -10
  496. package/dist/cjs/theme/transitionProps.native.js.map +1 -1
  497. package/dist/cjs/theme/usePresetSwitch.cjs +46 -53
  498. package/dist/cjs/theme/usePresetSwitch.native.cjs +20 -0
  499. package/dist/cjs/theme/usePresetSwitch.native.js +9 -10
  500. package/dist/cjs/theme/usePresetSwitch.native.js.map +1 -1
  501. package/dist/cjs/theme/useResolvedKnobs.cjs +138 -126
  502. package/dist/cjs/theme/useResolvedKnobs.native.cjs +189 -0
  503. package/dist/cjs/theme/useResolvedKnobs.native.js +157 -151
  504. package/dist/cjs/theme/useResolvedKnobs.native.js.map +1 -1
  505. package/dist/cjs/theme/useSchemePreference.cjs +26 -30
  506. package/dist/cjs/theme/useSchemePreference.native.cjs +20 -0
  507. package/dist/cjs/theme/useSchemePreference.native.js +9 -10
  508. package/dist/cjs/theme/useSchemePreference.native.js.map +1 -1
  509. package/dist/cjs/theme/useTheme.cjs +147 -134
  510. package/dist/cjs/theme/useTheme.native.cjs +86 -0
  511. package/dist/cjs/theme/useTheme.native.js +68 -74
  512. package/dist/cjs/theme/useTheme.native.js.map +1 -1
  513. package/dist/cjs/theme/useTouchSurface.cjs +16 -20
  514. package/dist/cjs/theme/useTouchSurface.native.cjs +31 -0
  515. package/dist/cjs/theme/useTouchSurface.native.js +16 -19
  516. package/dist/cjs/theme/useTouchSurface.native.js.map +1 -1
  517. package/dist/cjs/theme/v3TokenRoles.cjs +49 -53
  518. package/dist/cjs/theme/v3TokenRoles.native.cjs +62 -0
  519. package/dist/cjs/theme/v3TokenRoles.native.js +49 -52
  520. package/dist/cjs/theme/v3TokenRoles.native.js.map +1 -1
  521. package/dist/cjs/theme/v5Palettes.cjs +293 -0
  522. package/dist/cjs/theme/v5Palettes.native.cjs +333 -0
  523. package/dist/cjs/theme/v5Palettes.native.js +335 -0
  524. package/dist/cjs/theme/v5Palettes.native.js.map +1 -0
  525. package/dist/cjs/theme/v5Templates.cjs +120 -0
  526. package/dist/cjs/theme/v5Templates.native.cjs +126 -0
  527. package/dist/cjs/theme/v5Templates.native.js +128 -0
  528. package/dist/cjs/theme/v5Templates.native.js.map +1 -0
  529. package/dist/esm/audit/constraintAudit.mjs +598 -492
  530. package/dist/esm/audit/constraintAudit.mjs.map +1 -1
  531. package/dist/esm/audit/constraintAudit.native.js +938 -869
  532. package/dist/esm/audit/constraintAudit.native.js.map +1 -1
  533. package/dist/esm/audit/designTokens.mjs +19 -17
  534. package/dist/esm/audit/designTokens.mjs.map +1 -1
  535. package/dist/esm/audit/designTokens.native.js +37 -40
  536. package/dist/esm/audit/designTokens.native.js.map +1 -1
  537. package/dist/esm/audit/diffReport.mjs +232 -219
  538. package/dist/esm/audit/diffReport.mjs.map +1 -1
  539. package/dist/esm/audit/diffReport.native.js +467 -480
  540. package/dist/esm/audit/diffReport.native.js.map +1 -1
  541. package/dist/esm/audit/index.mjs +3 -3
  542. package/dist/esm/audit/index.native.js +3 -3
  543. package/dist/esm/audit/themeMatrix.mjs +977 -861
  544. package/dist/esm/audit/themeMatrix.mjs.map +1 -1
  545. package/dist/esm/audit/themeMatrix.native.js +1538 -1485
  546. package/dist/esm/audit/themeMatrix.native.js.map +1 -1
  547. package/dist/esm/dates.mjs +161 -196
  548. package/dist/esm/dates.mjs.map +1 -1
  549. package/dist/esm/dates.native.js +175 -219
  550. package/dist/esm/dates.native.js.map +1 -1
  551. package/dist/esm/devWarn.mjs +124 -97
  552. package/dist/esm/devWarn.mjs.map +1 -1
  553. package/dist/esm/devWarn.native.js +147 -122
  554. package/dist/esm/devWarn.native.js.map +1 -1
  555. package/dist/esm/expo.mjs +36 -45
  556. package/dist/esm/expo.mjs.map +1 -1
  557. package/dist/esm/expo.native.js +40 -49
  558. package/dist/esm/expo.native.js.map +1 -1
  559. package/dist/esm/figma/figmaTokens.mjs +302 -272
  560. package/dist/esm/figma/figmaTokens.mjs.map +1 -1
  561. package/dist/esm/figma/figmaTokens.native.js +561 -555
  562. package/dist/esm/figma/figmaTokens.native.js.map +1 -1
  563. package/dist/esm/font.mjs +15 -32
  564. package/dist/esm/font.mjs.map +1 -1
  565. package/dist/esm/font.native.js +22 -39
  566. package/dist/esm/font.native.js.map +1 -1
  567. package/dist/esm/fonts/createFontLoader.mjs +2 -3
  568. package/dist/esm/fonts/createFontLoader.mjs.map +1 -1
  569. package/dist/esm/fonts/createFontLoader.native.js +42 -38
  570. package/dist/esm/fonts/createFontLoader.native.js.map +1 -1
  571. package/dist/esm/fonts/index.mjs +5 -4
  572. package/dist/esm/fonts/index.native.js +5 -4
  573. package/dist/esm/fonts/interFaces.mjs +7 -6
  574. package/dist/esm/fonts/interFaces.mjs.map +1 -1
  575. package/dist/esm/fonts/interFaces.native.js +7 -6
  576. package/dist/esm/fonts/interFaces.native.js.map +1 -1
  577. package/dist/esm/fonts/types.mjs +0 -2
  578. package/dist/esm/fonts/types.native.js +0 -2
  579. package/dist/esm/index.gnome.mjs +20 -19
  580. package/dist/esm/index.gnome.native.js +20 -19
  581. package/dist/esm/index.mjs +18 -10
  582. package/dist/esm/index.native.js +18 -10
  583. package/dist/esm/keyboardFocusRing.mjs +44 -35
  584. package/dist/esm/keyboardFocusRing.mjs.map +1 -1
  585. package/dist/esm/keyboardFocusRing.native.js +46 -37
  586. package/dist/esm/keyboardFocusRing.native.js.map +1 -1
  587. package/dist/esm/menuRow.mjs +38 -33
  588. package/dist/esm/menuRow.mjs.map +1 -1
  589. package/dist/esm/menuRow.native.js +41 -36
  590. package/dist/esm/menuRow.native.js.map +1 -1
  591. package/dist/esm/nativeTwins.mjs +2 -2
  592. package/dist/esm/nativeTwins.native.js +2 -2
  593. package/dist/esm/numbers.mjs +118 -136
  594. package/dist/esm/numbers.mjs.map +1 -1
  595. package/dist/esm/numbers.native.js +133 -151
  596. package/dist/esm/numbers.native.js.map +1 -1
  597. package/dist/esm/theme/FontKnobStyles.mjs +113 -107
  598. package/dist/esm/theme/FontKnobStyles.mjs.map +1 -1
  599. package/dist/esm/theme/FontKnobStyles.native.js +4 -3
  600. package/dist/esm/theme/FontKnobStyles.native.js.map +1 -1
  601. package/dist/esm/theme/Heading.mjs +75 -127
  602. package/dist/esm/theme/Heading.mjs.map +1 -1
  603. package/dist/esm/theme/Heading.native.js +78 -130
  604. package/dist/esm/theme/Heading.native.js.map +1 -1
  605. package/dist/esm/theme/IconSlot.mjs +24 -36
  606. package/dist/esm/theme/IconSlot.mjs.map +1 -1
  607. package/dist/esm/theme/IconSlot.native.js +25 -42
  608. package/dist/esm/theme/IconSlot.native.js.map +1 -1
  609. package/dist/esm/theme/Intent.mjs +23 -25
  610. package/dist/esm/theme/Intent.mjs.map +1 -1
  611. package/dist/esm/theme/Intent.native.js +24 -26
  612. package/dist/esm/theme/Intent.native.js.map +1 -1
  613. package/dist/esm/theme/Preset.mjs +115 -114
  614. package/dist/esm/theme/Preset.mjs.map +1 -1
  615. package/dist/esm/theme/Preset.native.js +118 -117
  616. package/dist/esm/theme/Preset.native.js.map +1 -1
  617. package/dist/esm/theme/PresetContext.mjs +5 -3
  618. package/dist/esm/theme/PresetContext.mjs.map +1 -1
  619. package/dist/esm/theme/PresetContext.native.js +6 -4
  620. package/dist/esm/theme/PresetContext.native.js.map +1 -1
  621. package/dist/esm/theme/Surface.mjs +48 -52
  622. package/dist/esm/theme/Surface.mjs.map +1 -1
  623. package/dist/esm/theme/Surface.native.js +55 -60
  624. package/dist/esm/theme/Surface.native.js.map +1 -1
  625. package/dist/esm/theme/Text.mjs +91 -116
  626. package/dist/esm/theme/Text.mjs.map +1 -1
  627. package/dist/esm/theme/Text.native.js +92 -118
  628. package/dist/esm/theme/Text.native.js.map +1 -1
  629. package/dist/esm/theme/Tint.mjs +16 -19
  630. package/dist/esm/theme/Tint.mjs.map +1 -1
  631. package/dist/esm/theme/Tint.native.js +18 -21
  632. package/dist/esm/theme/Tint.native.js.map +1 -1
  633. package/dist/esm/theme/accentHue.mjs +38 -28
  634. package/dist/esm/theme/accentHue.mjs.map +1 -1
  635. package/dist/esm/theme/accentHue.native.js +46 -36
  636. package/dist/esm/theme/accentHue.native.js.map +1 -1
  637. package/dist/esm/theme/accentInk.mjs +93 -88
  638. package/dist/esm/theme/accentInk.mjs.map +1 -1
  639. package/dist/esm/theme/accentInk.native.js +162 -163
  640. package/dist/esm/theme/accentInk.native.js.map +1 -1
  641. package/dist/esm/theme/activateThemeConfig.mjs +8 -10
  642. package/dist/esm/theme/activateThemeConfig.mjs.map +1 -1
  643. package/dist/esm/theme/activateThemeConfig.native.js +8 -10
  644. package/dist/esm/theme/activateThemeConfig.native.js.map +1 -1
  645. package/dist/esm/theme/animations/css.mjs +4 -3
  646. package/dist/esm/theme/animations/css.mjs.map +1 -1
  647. package/dist/esm/theme/animations/css.native.js +4 -3
  648. package/dist/esm/theme/animations/css.native.js.map +1 -1
  649. package/dist/esm/theme/animations/index.mjs +1 -2
  650. package/dist/esm/theme/animations/index.native.js +8 -1
  651. package/dist/esm/theme/animations/index.native.js.map +1 -1
  652. package/dist/esm/theme/animations/reactNative.mjs +126 -127
  653. package/dist/esm/theme/animations/reactNative.mjs.map +1 -1
  654. package/dist/esm/theme/animations/reactNative.native.js +126 -127
  655. package/dist/esm/theme/animations/reactNative.native.js.map +1 -1
  656. package/dist/esm/theme/chartPalette.mjs +247 -184
  657. package/dist/esm/theme/chartPalette.mjs.map +1 -1
  658. package/dist/esm/theme/chartPalette.native.js +319 -261
  659. package/dist/esm/theme/chartPalette.native.js.map +1 -1
  660. package/dist/esm/theme/colorRules.mjs +237 -218
  661. package/dist/esm/theme/colorRules.mjs.map +1 -1
  662. package/dist/esm/theme/colorRules.native.js +269 -252
  663. package/dist/esm/theme/colorRules.native.js.map +1 -1
  664. package/dist/esm/theme/composeKnobs.mjs +152 -0
  665. package/dist/esm/theme/composeKnobs.mjs.map +1 -0
  666. package/dist/esm/theme/composeKnobs.native.js +332 -0
  667. package/dist/esm/theme/composeKnobs.native.js.map +1 -0
  668. package/dist/esm/theme/controlSizing.mjs +88 -0
  669. package/dist/esm/theme/controlSizing.mjs.map +1 -0
  670. package/dist/esm/theme/controlSizing.native.js +164 -0
  671. package/dist/esm/theme/controlSizing.native.js.map +1 -0
  672. package/dist/esm/theme/controlTiers.mjs +25 -24
  673. package/dist/esm/theme/controlTiers.mjs.map +1 -1
  674. package/dist/esm/theme/controlTiers.native.js +28 -27
  675. package/dist/esm/theme/controlTiers.native.js.map +1 -1
  676. package/dist/esm/theme/cookies.mjs +114 -109
  677. package/dist/esm/theme/cookies.mjs.map +1 -1
  678. package/dist/esm/theme/cookies.native.js +219 -231
  679. package/dist/esm/theme/cookies.native.js.map +1 -1
  680. package/dist/esm/theme/cornerSmoothing.mjs +42 -40
  681. package/dist/esm/theme/cornerSmoothing.mjs.map +1 -1
  682. package/dist/esm/theme/cornerSmoothing.native.js +6 -5
  683. package/dist/esm/theme/cornerSmoothing.native.js.map +1 -1
  684. package/dist/esm/theme/createDefaultThemeConfig.mjs +91 -91
  685. package/dist/esm/theme/createDefaultThemeConfig.mjs.map +1 -1
  686. package/dist/esm/theme/createDefaultThemeConfig.native.js +130 -134
  687. package/dist/esm/theme/createDefaultThemeConfig.native.js.map +1 -1
  688. package/dist/esm/theme/createThemes.mjs +1057 -968
  689. package/dist/esm/theme/createThemes.mjs.map +1 -1
  690. package/dist/esm/theme/createThemes.native.js +1819 -1696
  691. package/dist/esm/theme/createThemes.native.js.map +1 -1
  692. package/dist/esm/theme/dedupeInherited.mjs +44 -43
  693. package/dist/esm/theme/dedupeInherited.mjs.map +1 -1
  694. package/dist/esm/theme/dedupeInherited.native.js +142 -151
  695. package/dist/esm/theme/dedupeInherited.native.js.map +1 -1
  696. package/dist/esm/theme/defaults/accent.mjs +5 -3
  697. package/dist/esm/theme/defaults/accent.mjs.map +1 -1
  698. package/dist/esm/theme/defaults/accent.native.js +5 -3
  699. package/dist/esm/theme/defaults/accent.native.js.map +1 -1
  700. package/dist/esm/theme/defaults/base.mjs +29 -27
  701. package/dist/esm/theme/defaults/base.mjs.map +1 -1
  702. package/dist/esm/theme/defaults/base.native.js +29 -27
  703. package/dist/esm/theme/defaults/base.native.js.map +1 -1
  704. package/dist/esm/theme/defaults/builderOptions.mjs +196 -172
  705. package/dist/esm/theme/defaults/builderOptions.mjs.map +1 -1
  706. package/dist/esm/theme/defaults/builderOptions.native.js +258 -241
  707. package/dist/esm/theme/defaults/builderOptions.native.js.map +1 -1
  708. package/dist/esm/theme/defaults/categoryFonts.mjs +22 -20
  709. package/dist/esm/theme/defaults/categoryFonts.mjs.map +1 -1
  710. package/dist/esm/theme/defaults/categoryFonts.native.js +22 -20
  711. package/dist/esm/theme/defaults/categoryFonts.native.js.map +1 -1
  712. package/dist/esm/theme/defaults/fonts.mjs +126 -154
  713. package/dist/esm/theme/defaults/fonts.mjs.map +1 -1
  714. package/dist/esm/theme/defaults/fonts.native.js +199 -241
  715. package/dist/esm/theme/defaults/fonts.native.js.map +1 -1
  716. package/dist/esm/theme/defaults/house.mjs +60 -6
  717. package/dist/esm/theme/defaults/house.mjs.map +1 -1
  718. package/dist/esm/theme/defaults/house.native.js +64 -10
  719. package/dist/esm/theme/defaults/house.native.js.map +1 -1
  720. package/dist/esm/theme/defaults/index.mjs +11 -7
  721. package/dist/esm/theme/defaults/index.native.js +11 -7
  722. package/dist/esm/theme/defaults/interFont.mjs +18 -0
  723. package/dist/esm/theme/defaults/interFont.mjs.map +1 -0
  724. package/dist/esm/theme/defaults/interFont.native.js +21 -0
  725. package/dist/esm/theme/defaults/interFont.native.js.map +1 -0
  726. package/dist/esm/theme/devtools/ColorLineVisualizer.mjs +162 -193
  727. package/dist/esm/theme/devtools/ColorLineVisualizer.mjs.map +1 -1
  728. package/dist/esm/theme/devtools/ColorLineVisualizer.native.js +2 -1
  729. package/dist/esm/theme/devtools/ColorLineVisualizer.native.js.map +1 -1
  730. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs +1311 -1273
  731. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.mjs.map +1 -1
  732. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js +2 -1
  733. package/dist/esm/theme/devtools/ThemeDevtoolsPanel.native.js.map +1 -1
  734. package/dist/esm/theme/devtools/animationOptions.mjs +6 -4
  735. package/dist/esm/theme/devtools/animationOptions.mjs.map +1 -1
  736. package/dist/esm/theme/devtools/animationOptions.native.js +7 -10
  737. package/dist/esm/theme/devtools/animationOptions.native.js.map +1 -1
  738. package/dist/esm/theme/devtools/buildSnapshot.mjs +83 -62
  739. package/dist/esm/theme/devtools/buildSnapshot.mjs.map +1 -1
  740. package/dist/esm/theme/devtools/buildSnapshot.native.js +154 -141
  741. package/dist/esm/theme/devtools/buildSnapshot.native.js.map +1 -1
  742. package/dist/esm/theme/devtools/index.mjs +11 -7
  743. package/dist/esm/theme/devtools/index.native.js +11 -7
  744. package/dist/esm/theme/devtools/knobIcons.mjs +338 -400
  745. package/dist/esm/theme/devtools/knobIcons.mjs.map +1 -1
  746. package/dist/esm/theme/devtools/knobIcons.native.js +345 -407
  747. package/dist/esm/theme/devtools/knobIcons.native.js.map +1 -1
  748. package/dist/esm/theme/devtools/vizConstants.mjs +16 -15
  749. package/dist/esm/theme/devtools/vizConstants.mjs.map +1 -1
  750. package/dist/esm/theme/devtools/vizConstants.native.js +16 -15
  751. package/dist/esm/theme/devtools/vizConstants.native.js.map +1 -1
  752. package/dist/esm/theme/dynamicType.mjs +15 -14
  753. package/dist/esm/theme/dynamicType.mjs.map +1 -1
  754. package/dist/esm/theme/dynamicType.native.js +15 -14
  755. package/dist/esm/theme/dynamicType.native.js.map +1 -1
  756. package/dist/esm/theme/fieldFocus.mjs +26 -20
  757. package/dist/esm/theme/fieldFocus.mjs.map +1 -1
  758. package/dist/esm/theme/fieldFocus.native.js +30 -24
  759. package/dist/esm/theme/fieldFocus.native.js.map +1 -1
  760. package/dist/esm/theme/fillContrast.mjs +101 -85
  761. package/dist/esm/theme/fillContrast.mjs.map +1 -1
  762. package/dist/esm/theme/fillContrast.native.js +125 -111
  763. package/dist/esm/theme/fillContrast.native.js.map +1 -1
  764. package/dist/esm/theme/focusState.mjs +74 -58
  765. package/dist/esm/theme/focusState.mjs.map +1 -1
  766. package/dist/esm/theme/focusState.native.js +113 -58
  767. package/dist/esm/theme/focusState.native.js.map +1 -1
  768. package/dist/esm/theme/fontCategoryMetrics.mjs +57 -59
  769. package/dist/esm/theme/fontCategoryMetrics.mjs.map +1 -1
  770. package/dist/esm/theme/fontCategoryMetrics.native.js +57 -59
  771. package/dist/esm/theme/fontCategoryMetrics.native.js.map +1 -1
  772. package/dist/esm/theme/fontCategoryStacks.mjs +12 -11
  773. package/dist/esm/theme/fontCategoryStacks.mjs.map +1 -1
  774. package/dist/esm/theme/fontCategoryStacks.native.js +12 -11
  775. package/dist/esm/theme/fontCategoryStacks.native.js.map +1 -1
  776. package/dist/esm/theme/glyphPaint.mjs +24 -22
  777. package/dist/esm/theme/glyphPaint.mjs.map +1 -1
  778. package/dist/esm/theme/glyphPaint.native.js +45 -45
  779. package/dist/esm/theme/glyphPaint.native.js.map +1 -1
  780. package/dist/esm/theme/glyphTint.mjs +50 -43
  781. package/dist/esm/theme/glyphTint.mjs.map +1 -1
  782. package/dist/esm/theme/glyphTint.native.js +53 -45
  783. package/dist/esm/theme/glyphTint.native.js.map +1 -1
  784. package/dist/esm/theme/groupGeometry.mjs +28 -26
  785. package/dist/esm/theme/groupGeometry.mjs.map +1 -1
  786. package/dist/esm/theme/groupGeometry.native.js +30 -28
  787. package/dist/esm/theme/groupGeometry.native.js.map +1 -1
  788. package/dist/esm/theme/hairline.mjs +61 -64
  789. package/dist/esm/theme/hairline.mjs.map +1 -1
  790. package/dist/esm/theme/hairline.native.js +24 -32
  791. package/dist/esm/theme/hairline.native.js.map +1 -1
  792. package/dist/esm/theme/index.mjs +136 -67
  793. package/dist/esm/theme/index.native.js +136 -67
  794. package/dist/esm/theme/intents.mjs +26 -33
  795. package/dist/esm/theme/intents.mjs.map +1 -1
  796. package/dist/esm/theme/intents.native.js +26 -33
  797. package/dist/esm/theme/intents.native.js.map +1 -1
  798. package/dist/esm/theme/knobs.mjs +89 -82
  799. package/dist/esm/theme/knobs.mjs.map +1 -1
  800. package/dist/esm/theme/knobs.native.js +89 -82
  801. package/dist/esm/theme/knobs.native.js.map +1 -1
  802. package/dist/esm/theme/layoutTokens.mjs +94 -85
  803. package/dist/esm/theme/layoutTokens.mjs.map +1 -1
  804. package/dist/esm/theme/layoutTokens.native.js +134 -131
  805. package/dist/esm/theme/layoutTokens.native.js.map +1 -1
  806. package/dist/esm/theme/listRows.mjs +10 -8
  807. package/dist/esm/theme/listRows.mjs.map +1 -1
  808. package/dist/esm/theme/listRows.native.js +12 -10
  809. package/dist/esm/theme/listRows.native.js.map +1 -1
  810. package/dist/esm/theme/motion.mjs +46 -35
  811. package/dist/esm/theme/motion.mjs.map +1 -1
  812. package/dist/esm/theme/motion.native.js +52 -41
  813. package/dist/esm/theme/motion.native.js.map +1 -1
  814. package/dist/esm/theme/motionStops.mjs +16 -1
  815. package/dist/esm/theme/motionStops.mjs.map +1 -1
  816. package/dist/esm/theme/motionStops.native.js +16 -1
  817. package/dist/esm/theme/motionStops.native.js.map +1 -1
  818. package/dist/esm/theme/motionTiming.mjs +33 -32
  819. package/dist/esm/theme/motionTiming.mjs.map +1 -1
  820. package/dist/esm/theme/motionTiming.native.js +36 -35
  821. package/dist/esm/theme/motionTiming.native.js.map +1 -1
  822. package/dist/esm/theme/nativeFontFamily.mjs +2 -1
  823. package/dist/esm/theme/nativeFontFamily.mjs.map +1 -1
  824. package/dist/esm/theme/nativeFontFamily.native.js +5 -3
  825. package/dist/esm/theme/nativeFontFamily.native.js.map +1 -1
  826. package/dist/esm/theme/nativeMonoFamily.mjs +29 -10
  827. package/dist/esm/theme/nativeMonoFamily.mjs.map +1 -1
  828. package/dist/esm/theme/nativeMonoFamily.native.js +29 -10
  829. package/dist/esm/theme/nativeMonoFamily.native.js.map +1 -1
  830. package/dist/esm/theme/nativePresetSwitch.mjs +15 -13
  831. package/dist/esm/theme/nativePresetSwitch.mjs.map +1 -1
  832. package/dist/esm/theme/nativePresetSwitch.native.js +17 -15
  833. package/dist/esm/theme/nativePresetSwitch.native.js.map +1 -1
  834. package/dist/esm/theme/nativeSchemePreference.mjs +33 -33
  835. package/dist/esm/theme/nativeSchemePreference.mjs.map +1 -1
  836. package/dist/esm/theme/nativeSchemePreference.native.js +37 -37
  837. package/dist/esm/theme/nativeSchemePreference.native.js.map +1 -1
  838. package/dist/esm/theme/nativeTheme.mjs +61 -68
  839. package/dist/esm/theme/nativeTheme.mjs.map +1 -1
  840. package/dist/esm/theme/nativeTheme.native.js +65 -72
  841. package/dist/esm/theme/nativeTheme.native.js.map +1 -1
  842. package/dist/esm/theme/nativeTransitionProps.mjs +34 -36
  843. package/dist/esm/theme/nativeTransitionProps.mjs.map +1 -1
  844. package/dist/esm/theme/nativeTransitionProps.native.js +37 -44
  845. package/dist/esm/theme/nativeTransitionProps.native.js.map +1 -1
  846. package/dist/esm/theme/overlayFill.mjs +42 -24
  847. package/dist/esm/theme/overlayFill.mjs.map +1 -1
  848. package/dist/esm/theme/overlayFill.native.js +47 -29
  849. package/dist/esm/theme/overlayFill.native.js.map +1 -1
  850. package/dist/esm/theme/overlaySurfaces.mjs +258 -317
  851. package/dist/esm/theme/overlaySurfaces.mjs.map +1 -1
  852. package/dist/esm/theme/overlaySurfaces.native.js +273 -341
  853. package/dist/esm/theme/overlaySurfaces.native.js.map +1 -1
  854. package/dist/esm/theme/pageGutter.mjs +48 -53
  855. package/dist/esm/theme/pageGutter.mjs.map +1 -1
  856. package/dist/esm/theme/pageGutter.native.js +74 -81
  857. package/dist/esm/theme/pageGutter.native.js.map +1 -1
  858. package/dist/esm/theme/preset.types.mjs +0 -2
  859. package/dist/esm/theme/preset.types.native.js +0 -2
  860. package/dist/esm/theme/presetPreview.mjs +14 -12
  861. package/dist/esm/theme/presetPreview.mjs.map +1 -1
  862. package/dist/esm/theme/presetPreview.native.js +15 -13
  863. package/dist/esm/theme/presetPreview.native.js.map +1 -1
  864. package/dist/esm/theme/presetStore.mjs +177 -191
  865. package/dist/esm/theme/presetStore.mjs.map +1 -1
  866. package/dist/esm/theme/presetStore.native.js +220 -241
  867. package/dist/esm/theme/presetStore.native.js.map +1 -1
  868. package/dist/esm/theme/presetUserSync.mjs +34 -35
  869. package/dist/esm/theme/presetUserSync.mjs.map +1 -1
  870. package/dist/esm/theme/presetUserSync.native.js +36 -37
  871. package/dist/esm/theme/presetUserSync.native.js.map +1 -1
  872. package/dist/esm/theme/presets.mjs +93 -78
  873. package/dist/esm/theme/presets.mjs.map +1 -1
  874. package/dist/esm/theme/presets.native.js +93 -78
  875. package/dist/esm/theme/presets.native.js.map +1 -1
  876. package/dist/esm/theme/radiusClass.mjs +74 -78
  877. package/dist/esm/theme/radiusClass.mjs.map +1 -1
  878. package/dist/esm/theme/radiusClass.native.js +80 -84
  879. package/dist/esm/theme/radiusClass.native.js.map +1 -1
  880. package/dist/esm/theme/radiusClassTable.generated.mjs +116 -127
  881. package/dist/esm/theme/radiusClassTable.generated.mjs.map +1 -1
  882. package/dist/esm/theme/radiusClassTable.generated.native.js +116 -127
  883. package/dist/esm/theme/radiusClassTable.generated.native.js.map +1 -1
  884. package/dist/esm/theme/ramps.mjs +53 -41
  885. package/dist/esm/theme/ramps.mjs.map +1 -1
  886. package/dist/esm/theme/ramps.native.js +54 -42
  887. package/dist/esm/theme/ramps.native.js.map +1 -1
  888. package/dist/esm/theme/readableColor.mjs +174 -165
  889. package/dist/esm/theme/readableColor.mjs.map +1 -1
  890. package/dist/esm/theme/readableColor.native.js +203 -197
  891. package/dist/esm/theme/readableColor.native.js.map +1 -1
  892. package/dist/esm/theme/recipeInputs.mjs +239 -258
  893. package/dist/esm/theme/recipeInputs.mjs.map +1 -1
  894. package/dist/esm/theme/recipeInputs.native.js +338 -372
  895. package/dist/esm/theme/recipeInputs.native.js.map +1 -1
  896. package/dist/esm/theme/recipes.mjs +0 -2
  897. package/dist/esm/theme/recipes.native.js +0 -2
  898. package/dist/esm/theme/reducedMotion.mjs +15 -13
  899. package/dist/esm/theme/reducedMotion.mjs.map +1 -1
  900. package/dist/esm/theme/reducedMotion.native.js +37 -37
  901. package/dist/esm/theme/reducedMotion.native.js.map +1 -1
  902. package/dist/esm/theme/resolveKnobs.mjs +612 -727
  903. package/dist/esm/theme/resolveKnobs.mjs.map +1 -1
  904. package/dist/esm/theme/resolveKnobs.native.js +624 -742
  905. package/dist/esm/theme/resolveKnobs.native.js.map +1 -1
  906. package/dist/esm/theme/rowStates.mjs +28 -29
  907. package/dist/esm/theme/rowStates.mjs.map +1 -1
  908. package/dist/esm/theme/rowStates.native.js +44 -46
  909. package/dist/esm/theme/rowStates.native.js.map +1 -1
  910. package/dist/esm/theme/scale/ScaleStyles.mjs +19 -19
  911. package/dist/esm/theme/scale/ScaleStyles.mjs.map +1 -1
  912. package/dist/esm/theme/scale/ScaleStyles.native.js +4 -3
  913. package/dist/esm/theme/scale/ScaleStyles.native.js.map +1 -1
  914. package/dist/esm/theme/scale/activeScale.mjs +16 -14
  915. package/dist/esm/theme/scale/activeScale.mjs.map +1 -1
  916. package/dist/esm/theme/scale/activeScale.native.js +37 -39
  917. package/dist/esm/theme/scale/activeScale.native.js.map +1 -1
  918. package/dist/esm/theme/scale/deriveRecipeInputs.mjs +60 -70
  919. package/dist/esm/theme/scale/deriveRecipeInputs.mjs.map +1 -1
  920. package/dist/esm/theme/scale/deriveRecipeInputs.native.js +95 -109
  921. package/dist/esm/theme/scale/deriveRecipeInputs.native.js.map +1 -1
  922. package/dist/esm/theme/scale/generateScale.mjs +59 -61
  923. package/dist/esm/theme/scale/generateScale.mjs.map +1 -1
  924. package/dist/esm/theme/scale/generateScale.native.js +131 -144
  925. package/dist/esm/theme/scale/generateScale.native.js.map +1 -1
  926. package/dist/esm/theme/scale/index.mjs +3 -3
  927. package/dist/esm/theme/scale/index.native.js +3 -3
  928. package/dist/esm/theme/scale/installScaleConfig.mjs +3 -1
  929. package/dist/esm/theme/scale/installScaleConfig.mjs.map +1 -1
  930. package/dist/esm/theme/scale/installScaleConfig.native.js +32 -24
  931. package/dist/esm/theme/scale/installScaleConfig.native.js.map +1 -1
  932. package/dist/esm/theme/scale/scaleAttribute.mjs +3 -3
  933. package/dist/esm/theme/scale/scaleAttribute.mjs.map +1 -1
  934. package/dist/esm/theme/scale/scaleAttribute.native.js +3 -3
  935. package/dist/esm/theme/scale/scaleAttribute.native.js.map +1 -1
  936. package/dist/esm/theme/scale/scaleCss.mjs +55 -52
  937. package/dist/esm/theme/scale/scaleCss.mjs.map +1 -1
  938. package/dist/esm/theme/scale/scaleCss.native.js +148 -160
  939. package/dist/esm/theme/scale/scaleCss.native.js.map +1 -1
  940. package/dist/esm/theme/scale/scaleFonts.mjs +51 -49
  941. package/dist/esm/theme/scale/scaleFonts.mjs.map +1 -1
  942. package/dist/esm/theme/scale/scaleFonts.native.js +105 -114
  943. package/dist/esm/theme/scale/scaleFonts.native.js.map +1 -1
  944. package/dist/esm/theme/scale/scaleInputs.mjs +231 -159
  945. package/dist/esm/theme/scale/scaleInputs.mjs.map +1 -1
  946. package/dist/esm/theme/scale/scaleInputs.native.js +233 -161
  947. package/dist/esm/theme/scale/scaleInputs.native.js.map +1 -1
  948. package/dist/esm/theme/scale/themeScales.mjs +103 -92
  949. package/dist/esm/theme/scale/themeScales.mjs.map +1 -1
  950. package/dist/esm/theme/scale/themeScales.native.js +146 -138
  951. package/dist/esm/theme/scale/themeScales.native.js.map +1 -1
  952. package/dist/esm/theme/scale/useActiveScale.mjs +36 -34
  953. package/dist/esm/theme/scale/useActiveScale.mjs.map +1 -1
  954. package/dist/esm/theme/scale/useActiveScale.native.js +42 -40
  955. package/dist/esm/theme/scale/useActiveScale.native.js.map +1 -1
  956. package/dist/esm/theme/schemeStore.mjs +39 -37
  957. package/dist/esm/theme/schemeStore.mjs.map +1 -1
  958. package/dist/esm/theme/schemeStore.native.js +52 -50
  959. package/dist/esm/theme/schemeStore.native.js.map +1 -1
  960. package/dist/esm/theme/shared.mjs +77 -76
  961. package/dist/esm/theme/shared.mjs.map +1 -1
  962. package/dist/esm/theme/shared.native.js +113 -116
  963. package/dist/esm/theme/shared.native.js.map +1 -1
  964. package/dist/esm/theme/sizeRecipes.mjs +76 -69
  965. package/dist/esm/theme/sizeRecipes.mjs.map +1 -1
  966. package/dist/esm/theme/sizeRecipes.native.js +136 -140
  967. package/dist/esm/theme/sizeRecipes.native.js.map +1 -1
  968. package/dist/esm/theme/subsetThemes.mjs +18 -17
  969. package/dist/esm/theme/subsetThemes.mjs.map +1 -1
  970. package/dist/esm/theme/subsetThemes.native.js +43 -44
  971. package/dist/esm/theme/subsetThemes.native.js.map +1 -1
  972. package/dist/esm/theme/theme.mjs +150 -143
  973. package/dist/esm/theme/theme.mjs.map +1 -1
  974. package/dist/esm/theme/theme.native.js +1 -2
  975. package/dist/esm/theme/themeValue.mjs +26 -15
  976. package/dist/esm/theme/themeValue.mjs.map +1 -1
  977. package/dist/esm/theme/themeValue.native.js +43 -34
  978. package/dist/esm/theme/themeValue.native.js.map +1 -1
  979. package/dist/esm/theme/tileSizes.mjs +111 -137
  980. package/dist/esm/theme/tileSizes.mjs.map +1 -1
  981. package/dist/esm/theme/tileSizes.native.js +134 -162
  982. package/dist/esm/theme/tileSizes.native.js.map +1 -1
  983. package/dist/esm/theme/tintHues.mjs +34 -4
  984. package/dist/esm/theme/tintHues.mjs.map +1 -1
  985. package/dist/esm/theme/tintHues.native.js +34 -4
  986. package/dist/esm/theme/tintHues.native.js.map +1 -1
  987. package/dist/esm/theme/tokenNumber.mjs +6 -4
  988. package/dist/esm/theme/tokenNumber.mjs.map +1 -1
  989. package/dist/esm/theme/tokenNumber.native.js +8 -6
  990. package/dist/esm/theme/tokenNumber.native.js.map +1 -1
  991. package/dist/esm/theme/touchManipulation.mjs +17 -1
  992. package/dist/esm/theme/touchManipulation.mjs.map +1 -1
  993. package/dist/esm/theme/touchManipulation.native.js +17 -1
  994. package/dist/esm/theme/touchManipulation.native.js.map +1 -1
  995. package/dist/esm/theme/transitionProps.mjs +19 -19
  996. package/dist/esm/theme/transitionProps.mjs.map +1 -1
  997. package/dist/esm/theme/transitionProps.native.js +1 -2
  998. package/dist/esm/theme/usePresetSwitch.mjs +34 -35
  999. package/dist/esm/theme/usePresetSwitch.mjs.map +1 -1
  1000. package/dist/esm/theme/usePresetSwitch.native.js +1 -2
  1001. package/dist/esm/theme/useResolvedKnobs.mjs +121 -105
  1002. package/dist/esm/theme/useResolvedKnobs.mjs.map +1 -1
  1003. package/dist/esm/theme/useResolvedKnobs.native.js +139 -130
  1004. package/dist/esm/theme/useResolvedKnobs.native.js.map +1 -1
  1005. package/dist/esm/theme/useSchemePreference.mjs +14 -12
  1006. package/dist/esm/theme/useSchemePreference.mjs.map +1 -1
  1007. package/dist/esm/theme/useSchemePreference.native.js +1 -2
  1008. package/dist/esm/theme/useTheme.mjs +136 -117
  1009. package/dist/esm/theme/useTheme.mjs.map +1 -1
  1010. package/dist/esm/theme/useTheme.native.js +55 -56
  1011. package/dist/esm/theme/useTheme.native.js.map +1 -1
  1012. package/dist/esm/theme/useTouchSurface.mjs +4 -2
  1013. package/dist/esm/theme/useTouchSurface.mjs.map +1 -1
  1014. package/dist/esm/theme/useTouchSurface.native.js +4 -2
  1015. package/dist/esm/theme/useTouchSurface.native.js.map +1 -1
  1016. package/dist/esm/theme/v3TokenRoles.mjs +36 -35
  1017. package/dist/esm/theme/v3TokenRoles.mjs.map +1 -1
  1018. package/dist/esm/theme/v3TokenRoles.native.js +36 -35
  1019. package/dist/esm/theme/v3TokenRoles.native.js.map +1 -1
  1020. package/dist/esm/theme/v5Palettes.mjs +265 -0
  1021. package/dist/esm/theme/v5Palettes.mjs.map +1 -0
  1022. package/dist/esm/theme/v5Palettes.native.js +303 -0
  1023. package/dist/esm/theme/v5Palettes.native.js.map +1 -0
  1024. package/dist/esm/theme/v5Templates.mjs +97 -0
  1025. package/dist/esm/theme/v5Templates.mjs.map +1 -0
  1026. package/dist/esm/theme/v5Templates.native.js +101 -0
  1027. package/dist/esm/theme/v5Templates.native.js.map +1 -0
  1028. package/package.json +25 -27
  1029. package/src/audit/constraintAudit.spec.ts +15 -15
  1030. package/src/audit/constraintAudit.ts +6 -6
  1031. package/src/devWarn.spec.ts +10 -1
  1032. package/src/devWarn.ts +12 -2
  1033. package/src/expo.spec.ts +1 -1
  1034. package/src/expoConfig.spec.ts +6 -13
  1035. package/src/figma/figmaTokens.spec.ts +23 -22
  1036. package/src/figma/figmaTokens.ts +26 -12
  1037. package/src/fonts/createFontLoader.ts +27 -9
  1038. package/src/index.gnome.ts +21 -4
  1039. package/src/index.ts +17 -1
  1040. package/src/keyboardFocusRing.ts +4 -4
  1041. package/src/menuRow.palette.spec.ts +8 -8
  1042. package/src/menuRow.spec.ts +29 -17
  1043. package/src/menuRow.ts +21 -15
  1044. package/src/stateInTheValue.spec.tsx +136 -0
  1045. package/src/tamaguiProvides.spec.tsx +76 -0
  1046. package/src/theme/FontKnobStyles.tsx +2 -2
  1047. package/src/theme/Heading.titleCap.spec.tsx +78 -0
  1048. package/src/theme/Heading.tsx +2 -2
  1049. package/src/theme/IconSlot.spec.tsx +2 -2
  1050. package/src/theme/Intent.stories.tsx +7 -7
  1051. package/src/theme/Preset.stories.tsx +7 -7
  1052. package/src/theme/Surface.spec.tsx +34 -31
  1053. package/src/theme/Surface.stories.tsx +2 -2
  1054. package/src/theme/Surface.tsx +19 -17
  1055. package/src/theme/Text.tsx +58 -17
  1056. package/src/theme/ThemeProvider.stories.tsx +4 -6
  1057. package/src/theme/Tint.stories.tsx +8 -8
  1058. package/src/theme/accentFloor.spec.ts +21 -16
  1059. package/src/theme/accentHue.spec.ts +30 -27
  1060. package/src/theme/accentHue.ts +2 -2
  1061. package/src/theme/accentInk.ts +11 -11
  1062. package/src/theme/accentIntentInk.spec.ts +6 -6
  1063. package/src/theme/accentOnSurface.flip.spec.tsx +3 -5
  1064. package/src/theme/accentOnSurface.palette.spec.tsx +2 -2
  1065. package/src/theme/accentOnSurface.spec.tsx +4 -4
  1066. package/src/theme/activateThemeConfig.ts +0 -4
  1067. package/src/theme/animations/animations.spec.ts +58 -7
  1068. package/src/theme/animations/css.ts +1 -1
  1069. package/src/theme/animations/index.ts +4 -0
  1070. package/src/theme/animations/reactNative.ts +0 -3
  1071. package/src/theme/bodyLeading.theme.spec.tsx +130 -0
  1072. package/src/theme/boundaryFloor.spec.ts +14 -12
  1073. package/src/theme/cardLift.native.spec.ts +34 -0
  1074. package/src/theme/chartCategoricalSeverity.spec.ts +8 -8
  1075. package/src/theme/chartPalette.spec.ts +8 -8
  1076. package/src/theme/chartPalette.ts +7 -7
  1077. package/src/theme/colorRules.spec.ts +15 -15
  1078. package/src/theme/colorRules.ts +1 -1
  1079. package/src/theme/colorThemeAccent.spec.ts +19 -16
  1080. package/src/theme/composeKnobs.spec.ts +332 -0
  1081. package/src/theme/composeKnobs.ts +223 -0
  1082. package/src/theme/controlEdges.spec.ts +9 -9
  1083. package/src/theme/controlSizing.render.spec.tsx +96 -0
  1084. package/src/theme/controlSizing.spec.ts +171 -0
  1085. package/src/theme/controlSizing.ts +198 -0
  1086. package/src/theme/controlTiers.ts +8 -8
  1087. package/src/theme/createDefaultThemeConfig.spec.ts +75 -67
  1088. package/src/theme/createDefaultThemeConfig.ts +11 -5
  1089. package/src/theme/createThemeConfig.spec.ts +4 -5
  1090. package/src/theme/createThemes.spec.ts +19 -17
  1091. package/src/theme/createThemes.ts +511 -305
  1092. package/src/theme/defaults/accent.ts +1 -1
  1093. package/src/theme/defaults/base.ts +1 -1
  1094. package/src/theme/defaults/builderOptions.ts +43 -40
  1095. package/src/theme/defaults/fonts.spec.ts +14 -11
  1096. package/src/theme/defaults/fonts.theme.spec.tsx +3 -3
  1097. package/src/theme/defaults/fonts.ts +2 -5
  1098. package/src/theme/defaults/interFont.spec.ts +91 -0
  1099. package/src/theme/defaults/interFont.ts +50 -0
  1100. package/src/theme/defaults/neutralRamp.spec.ts +4 -3
  1101. package/src/theme/defaults/secondaryInk.spec.ts +41 -41
  1102. package/src/theme/devtools/ColorLineVisualizer.spec.tsx +3 -3
  1103. package/src/theme/devtools/ColorLineVisualizer.tsx +2 -2
  1104. package/src/theme/devtools/buildSnapshot.spec.ts +2 -2
  1105. package/src/theme/devtools/buildSnapshot.ts +2 -2
  1106. package/src/theme/dropTarget.spec.ts +12 -6
  1107. package/src/theme/fieldEdge.spec.ts +6 -6
  1108. package/src/theme/fieldFocus.spec.ts +12 -12
  1109. package/src/theme/fieldFocus.ts +3 -3
  1110. package/src/theme/fillContrast.spec.ts +13 -13
  1111. package/src/theme/fillContrast.ts +11 -8
  1112. package/src/theme/focusState.spec.ts +142 -27
  1113. package/src/theme/focusState.ts +69 -3
  1114. package/src/theme/focusVisibleRing.spec.tsx +186 -0
  1115. package/src/theme/glyphPaint.spec.ts +10 -8
  1116. package/src/theme/glyphPaint.ts +2 -2
  1117. package/src/theme/glyphTint.fillInk.spec.ts +98 -0
  1118. package/src/theme/glyphTint.ts +44 -1
  1119. package/src/theme/hairline.native.ts +2 -2
  1120. package/src/theme/hairline.spec.ts +2 -2
  1121. package/src/theme/hairline.ts +2 -2
  1122. package/src/theme/hairlineToken.spec.ts +37 -34
  1123. package/src/theme/houseGround.spec.ts +18 -14
  1124. package/src/theme/index.ts +2 -0
  1125. package/src/theme/intent.spec.tsx +7 -7
  1126. package/src/theme/intentFill.spec.ts +9 -3
  1127. package/src/theme/layoutTokens.spec.ts +2 -2
  1128. package/src/theme/layoutTokens.ts +2 -2
  1129. package/src/theme/layoutTokensHooks.spec.tsx +3 -3
  1130. package/src/theme/motion.spec.ts +30 -21
  1131. package/src/theme/mpo13Proof.spec.ts +15 -15
  1132. package/src/theme/mpo19Proof.spec.ts +64 -41
  1133. package/src/theme/namedInkFloor.spec.ts +14 -13
  1134. package/src/theme/nativeTheme.tsx +4 -7
  1135. package/src/theme/nativeTransitionProps.ts +11 -12
  1136. package/src/theme/oneThemeEngine.spec.ts +6 -6
  1137. package/src/theme/overlayChroma.spec.ts +4 -4
  1138. package/src/theme/overlayFill.ts +3 -3
  1139. package/src/theme/overlaySurfaces.focus.spec.tsx +29 -25
  1140. package/src/theme/overlaySurfaces.tsx +50 -56
  1141. package/src/theme/pageGutter.spec.tsx +8 -6
  1142. package/src/theme/pageGutter.tsx +3 -3
  1143. package/src/theme/presetPreview.ts +3 -3
  1144. package/src/theme/radiusClass.spec.ts +16 -12
  1145. package/src/theme/radiusClass.ts +1 -1
  1146. package/src/theme/rampRoles.spec.ts +4 -4
  1147. package/src/theme/ramps.spec.ts +8 -10
  1148. package/src/theme/ramps.ts +15 -13
  1149. package/src/theme/readableColor.hooks.spec.tsx +40 -25
  1150. package/src/theme/readableColor.ts +13 -13
  1151. package/src/theme/recipeInputs.ts +26 -27
  1152. package/src/theme/recipes.ts +27 -24
  1153. package/src/theme/resolveFontTokenFamily.spec.ts +2 -2
  1154. package/src/theme/resolveKnobs.spec.ts +239 -253
  1155. package/src/theme/resolveKnobs.ts +184 -171
  1156. package/src/theme/rowStates.spec.ts +12 -12
  1157. package/src/theme/rowStates.ts +5 -5
  1158. package/src/theme/scale/activeScale.spec.ts +2 -2
  1159. package/src/theme/scale/activeScale.ts +2 -4
  1160. package/src/theme/scale/deriveRecipeInputs.ts +12 -18
  1161. package/src/theme/scale/generateScale.spec.ts +42 -44
  1162. package/src/theme/scale/generateScale.ts +3 -3
  1163. package/src/theme/scale/installScaleConfig.native.spec.ts +6 -5
  1164. package/src/theme/scale/installScaleConfig.native.ts +0 -3
  1165. package/src/theme/scale/scaleCss.probe.spec.tsx +17 -11
  1166. package/src/theme/scale/scaleCss.spec.ts +7 -9
  1167. package/src/theme/scale/scaleCss.ts +3 -7
  1168. package/src/theme/scale/scaleFonts.ts +1 -1
  1169. package/src/theme/scale/scaleInputs.ts +120 -140
  1170. package/src/theme/scale/themeScales.ts +36 -10
  1171. package/src/theme/scale/useActiveScale.spec.tsx +4 -4
  1172. package/src/theme/scrimTokens.spec.ts +12 -9
  1173. package/src/theme/selectedState.spec.ts +32 -30
  1174. package/src/theme/selectionFill.spec.ts +13 -13
  1175. package/src/theme/semanticEntryText.spec.ts +12 -6
  1176. package/src/theme/severityChannel.spec.ts +10 -10
  1177. package/src/theme/shared.tsx +1 -8
  1178. package/src/theme/sheetGrabber.spec.ts +1 -1
  1179. package/src/theme/sheetHandle.spec.ts +4 -4
  1180. package/src/theme/sizeLadder.spec.ts +9 -9
  1181. package/src/theme/sizeRecipes.spec.ts +75 -74
  1182. package/src/theme/sizeRecipes.ts +8 -7
  1183. package/src/theme/switchThumb.spec.ts +24 -20
  1184. package/src/theme/syntaxFloor.spec.ts +7 -7
  1185. package/src/theme/theme.palette.spec.tsx +3 -3
  1186. package/src/theme/theme.tsx +4 -7
  1187. package/src/theme/themeValue.spec.ts +7 -7
  1188. package/src/theme/tokenNumber.spec.tsx +13 -4
  1189. package/src/theme/tokenNumber.ts +4 -4
  1190. package/src/theme/transitionProps.spec.ts +18 -30
  1191. package/src/theme/transitionProps.ts +13 -20
  1192. package/src/theme/useResolvedKnobs.ts +7 -7
  1193. package/src/theme/useResolvedKnobsBehavior.spec.tsx +20 -8
  1194. package/src/theme/v3TokenRoles.ts +23 -23
  1195. package/src/theme/v5Palettes.ts +300 -0
  1196. package/src/theme/v5Templates.ts +133 -0
  1197. package/types/devWarn.d.ts +1 -1
  1198. package/types/devWarn.d.ts.map +1 -1
  1199. package/types/figma/figmaTokens.d.ts +1 -1
  1200. package/types/figma/figmaTokens.d.ts.map +1 -1
  1201. package/types/fonts/createFontLoader.d.ts.map +1 -1
  1202. package/types/index.d.ts +9 -1
  1203. package/types/index.d.ts.map +1 -1
  1204. package/types/index.gnome.d.ts +12 -8
  1205. package/types/index.gnome.d.ts.map +1 -1
  1206. package/types/keyboardFocusRing.d.ts +2 -2
  1207. package/types/keyboardFocusRing.d.ts.map +1 -1
  1208. package/types/menuRow.d.ts +20 -15
  1209. package/types/menuRow.d.ts.map +1 -1
  1210. package/types/theme/Heading.d.ts +7 -7
  1211. package/types/theme/Heading.d.ts.map +1 -1
  1212. package/types/theme/Intent.d.ts +1 -1
  1213. package/types/theme/Intent.d.ts.map +1 -1
  1214. package/types/theme/Preset.d.ts +1 -1
  1215. package/types/theme/Preset.d.ts.map +1 -1
  1216. package/types/theme/Surface.d.ts +12 -12
  1217. package/types/theme/Surface.d.ts.map +1 -1
  1218. package/types/theme/Text.d.ts +4 -4
  1219. package/types/theme/Text.d.ts.map +1 -1
  1220. package/types/theme/Tint.d.ts +1 -1
  1221. package/types/theme/Tint.d.ts.map +1 -1
  1222. package/types/theme/accentInk.d.ts +1 -1
  1223. package/types/theme/accentInk.d.ts.map +1 -1
  1224. package/types/theme/activateThemeConfig.d.ts.map +1 -1
  1225. package/types/theme/animations/css.d.ts +1 -1
  1226. package/types/theme/animations/index.d.ts +126 -0
  1227. package/types/theme/animations/index.d.ts.map +1 -1
  1228. package/types/theme/animations/reactNative.d.ts +0 -126
  1229. package/types/theme/animations/reactNative.d.ts.map +1 -1
  1230. package/types/theme/colorRules.d.ts +1 -1
  1231. package/types/theme/colorRules.d.ts.map +1 -1
  1232. package/types/theme/composeKnobs.d.ts +56 -0
  1233. package/types/theme/composeKnobs.d.ts.map +1 -0
  1234. package/types/theme/controlSizing.d.ts +78 -0
  1235. package/types/theme/controlSizing.d.ts.map +1 -0
  1236. package/types/theme/createDefaultThemeConfig.d.ts.map +1 -1
  1237. package/types/theme/createThemes.d.ts +157 -387
  1238. package/types/theme/createThemes.d.ts.map +1 -1
  1239. package/types/theme/defaults/builderOptions.d.ts +3 -3
  1240. package/types/theme/defaults/builderOptions.d.ts.map +1 -1
  1241. package/types/theme/defaults/fonts.d.ts +6 -18
  1242. package/types/theme/defaults/fonts.d.ts.map +1 -1
  1243. package/types/theme/defaults/interFont.d.ts +39 -0
  1244. package/types/theme/defaults/interFont.d.ts.map +1 -0
  1245. package/types/theme/devtools/ThemeDevtoolsPanel.d.ts +1 -1
  1246. package/types/theme/devtools/ThemeDevtoolsPanel.d.ts.map +1 -1
  1247. package/types/theme/fieldFocus.d.ts +2 -2
  1248. package/types/theme/fieldFocus.d.ts.map +1 -1
  1249. package/types/theme/fillContrast.d.ts.map +1 -1
  1250. package/types/theme/focusState.d.ts +41 -0
  1251. package/types/theme/focusState.d.ts.map +1 -1
  1252. package/types/theme/glyphTint.d.ts +22 -0
  1253. package/types/theme/glyphTint.d.ts.map +1 -1
  1254. package/types/theme/hairline.d.ts +2 -2
  1255. package/types/theme/hairline.native.d.ts +2 -2
  1256. package/types/theme/index.d.ts +2 -0
  1257. package/types/theme/index.d.ts.map +1 -1
  1258. package/types/theme/layoutTokens.d.ts +1 -1
  1259. package/types/theme/layoutTokens.d.ts.map +1 -1
  1260. package/types/theme/nativeTheme.d.ts +1 -1
  1261. package/types/theme/nativeTheme.d.ts.map +1 -1
  1262. package/types/theme/nativeTransitionProps.d.ts +0 -1
  1263. package/types/theme/nativeTransitionProps.d.ts.map +1 -1
  1264. package/types/theme/overlayFill.d.ts +1 -1
  1265. package/types/theme/overlaySurfaces.d.ts +13 -18
  1266. package/types/theme/overlaySurfaces.d.ts.map +1 -1
  1267. package/types/theme/pageGutter.d.ts +3 -3
  1268. package/types/theme/pageGutter.d.ts.map +1 -1
  1269. package/types/theme/ramps.d.ts +4 -0
  1270. package/types/theme/ramps.d.ts.map +1 -1
  1271. package/types/theme/recipeInputs.d.ts +11 -11
  1272. package/types/theme/recipeInputs.d.ts.map +1 -1
  1273. package/types/theme/recipes.d.ts +29 -27
  1274. package/types/theme/recipes.d.ts.map +1 -1
  1275. package/types/theme/resolveKnobs.d.ts +28 -28
  1276. package/types/theme/resolveKnobs.d.ts.map +1 -1
  1277. package/types/theme/rowStates.d.ts +1 -1
  1278. package/types/theme/rowStates.d.ts.map +1 -1
  1279. package/types/theme/scale/ScaleStyles.d.ts +1 -1
  1280. package/types/theme/scale/ScaleStyles.d.ts.map +1 -1
  1281. package/types/theme/scale/activeScale.d.ts.map +1 -1
  1282. package/types/theme/scale/deriveRecipeInputs.d.ts.map +1 -1
  1283. package/types/theme/scale/installScaleConfig.native.d.ts.map +1 -1
  1284. package/types/theme/scale/scaleCss.d.ts.map +1 -1
  1285. package/types/theme/scale/scaleInputs.d.ts +12 -12
  1286. package/types/theme/scale/scaleInputs.d.ts.map +1 -1
  1287. package/types/theme/scale/themeScales.d.ts +1 -1
  1288. package/types/theme/scale/themeScales.d.ts.map +1 -1
  1289. package/types/theme/shared.d.ts.map +1 -1
  1290. package/types/theme/sizeRecipes.d.ts +5 -5
  1291. package/types/theme/sizeRecipes.d.ts.map +1 -1
  1292. package/types/theme/theme.d.ts +1 -1
  1293. package/types/theme/theme.d.ts.map +1 -1
  1294. package/types/theme/tokenNumber.d.ts +2 -2
  1295. package/types/theme/tokenNumber.d.ts.map +1 -1
  1296. package/types/theme/transitionProps.d.ts +3 -3
  1297. package/types/theme/transitionProps.d.ts.map +1 -1
  1298. package/types/theme/useResolvedKnobs.d.ts +2 -2
  1299. package/types/theme/v3TokenRoles.d.ts +23 -23
  1300. package/types/theme/v5Palettes.d.ts +45 -0
  1301. package/types/theme/v5Palettes.d.ts.map +1 -0
  1302. package/types/theme/v5Templates.d.ts +191 -0
  1303. package/types/theme/v5Templates.d.ts.map +1 -0
  1304. package/dist/cjs/theme/mergedTokens.cjs +0 -39
  1305. package/dist/cjs/theme/mergedTokens.native.js +0 -61
  1306. package/dist/cjs/theme/mergedTokens.native.js.map +0 -1
  1307. package/dist/esm/audit/index.mjs.map +0 -1
  1308. package/dist/esm/audit/index.native.js.map +0 -1
  1309. package/dist/esm/fonts/index.mjs.map +0 -1
  1310. package/dist/esm/fonts/index.native.js.map +0 -1
  1311. package/dist/esm/fonts/types.mjs.map +0 -1
  1312. package/dist/esm/fonts/types.native.js.map +0 -1
  1313. package/dist/esm/index.gnome.mjs.map +0 -1
  1314. package/dist/esm/index.gnome.native.js.map +0 -1
  1315. package/dist/esm/index.mjs.map +0 -1
  1316. package/dist/esm/index.native.js.map +0 -1
  1317. package/dist/esm/nativeTwins.mjs.map +0 -1
  1318. package/dist/esm/nativeTwins.native.js.map +0 -1
  1319. package/dist/esm/theme/animations/index.mjs.map +0 -1
  1320. package/dist/esm/theme/defaults/index.mjs.map +0 -1
  1321. package/dist/esm/theme/defaults/index.native.js.map +0 -1
  1322. package/dist/esm/theme/devtools/index.mjs.map +0 -1
  1323. package/dist/esm/theme/devtools/index.native.js.map +0 -1
  1324. package/dist/esm/theme/index.mjs.map +0 -1
  1325. package/dist/esm/theme/index.native.js.map +0 -1
  1326. package/dist/esm/theme/mergedTokens.mjs +0 -14
  1327. package/dist/esm/theme/mergedTokens.mjs.map +0 -1
  1328. package/dist/esm/theme/mergedTokens.native.js +0 -33
  1329. package/dist/esm/theme/mergedTokens.native.js.map +0 -1
  1330. package/dist/esm/theme/preset.types.mjs.map +0 -1
  1331. package/dist/esm/theme/preset.types.native.js.map +0 -1
  1332. package/dist/esm/theme/recipes.mjs.map +0 -1
  1333. package/dist/esm/theme/recipes.native.js.map +0 -1
  1334. package/dist/esm/theme/scale/index.mjs.map +0 -1
  1335. package/dist/esm/theme/scale/index.native.js.map +0 -1
  1336. package/dist/esm/theme/theme.native.js.map +0 -1
  1337. package/dist/esm/theme/transitionProps.native.js.map +0 -1
  1338. package/dist/esm/theme/usePresetSwitch.native.js.map +0 -1
  1339. package/dist/esm/theme/useSchemePreference.native.js.map +0 -1
  1340. package/src/theme/mergedTokens.ts +0 -20
  1341. package/types/theme/mergedTokens.d.ts +0 -11
  1342. package/types/theme/mergedTokens.d.ts.map +0 -1
@@ -3,922 +3,1034 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
10
  };
11
11
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: () => from[key],
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
19
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
21
  var themeMatrix_exports = {};
24
22
  __export(themeMatrix_exports, {
25
- auditSignatures: () => auditSignatures,
26
- captureMatrixSnapshot: () => captureMatrixSnapshot,
27
- chartProofSignatures: () => chartProofSignatures,
28
- diffGeometry: () => diffGeometry,
29
- evaluateChartProof: () => evaluateChartProof,
30
- evaluateIconContrast: () => evaluateIconContrast,
31
- evaluateNoBreakage: () => evaluateNoBreakage,
32
- evaluateTextContrast: () => evaluateTextContrast,
33
- iconContrastSignatures: () => iconContrastSignatures,
34
- offScaleIdentity: () => offScaleIdentity
23
+ auditSignatures: () => auditSignatures,
24
+ captureMatrixSnapshot: () => captureMatrixSnapshot,
25
+ chartProofSignatures: () => chartProofSignatures,
26
+ diffGeometry: () => diffGeometry,
27
+ evaluateChartProof: () => evaluateChartProof,
28
+ evaluateIconContrast: () => evaluateIconContrast,
29
+ evaluateNoBreakage: () => evaluateNoBreakage,
30
+ evaluateTextContrast: () => evaluateTextContrast,
31
+ iconContrastSignatures: () => iconContrastSignatures,
32
+ offScaleIdentity: () => offScaleIdentity
35
33
  });
36
34
  module.exports = __toCommonJS(themeMatrix_exports);
37
35
  var import_colorRules = require("../theme/colorRules.cjs");
38
36
  function captureMatrixSnapshot() {
39
- if (typeof document === "undefined") throw new Error("captureMatrixSnapshot needs a DOM");
40
- const SKIP_TAGS = /* @__PURE__ */new Set(["script", "style", "link", "meta", "head", "title", "noscript", "br", "wbr", "template"]);
41
- const round = n => Math.round(n * 4) / 4;
42
- const toRect = r => ({
43
- x: round(r.x),
44
- y: round(r.y),
45
- w: round(r.width),
46
- h: round(r.height)
47
- });
48
- function parseCssColor(raw) {
49
- const s = raw.trim().toLowerCase();
50
- if (s === "transparent") return [0, 0, 0, 0];
51
- const m = s.match(/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.%]+))?\s*\)$/);
52
- if (!m) return null;
53
- let a = 1;
54
- if (m[4] !== void 0) {
55
- a = m[4].endsWith("%") ? Number.parseFloat(m[4]) / 100 : Number.parseFloat(m[4]);
56
- }
57
- return [Number.parseFloat(m[1]), Number.parseFloat(m[2]), Number.parseFloat(m[3]), a];
58
- }
59
- function toHex(rgb) {
60
- const h = v => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, "0");
61
- return `#${h(rgb[0])}${h(rgb[1])}${h(rgb[2])}`;
62
- }
63
- function blend(top, bottom) {
64
- const a = top[3];
65
- return [top[0] * a + bottom[0] * (1 - a), top[1] * a + bottom[1] * (1 - a), top[2] * a + bottom[2] * (1 - a)];
66
- }
67
- function effectiveBackground(el) {
68
- const layers = [];
69
- let overImage = false;
70
- let node = el;
71
- let opaqueBase = null;
72
- while (node) {
73
- const cs = getComputedStyle(node);
74
- if (cs.backgroundImage && cs.backgroundImage !== "none") overImage = true;
75
- if (node.getAttribute("data-mpo-chart-backdrop") === "patterned") overImage = true;
76
- const parsed = parseCssColor(cs.backgroundColor);
77
- if (parsed && parsed[3] > 0) {
78
- if (parsed[3] >= 0.999) {
79
- opaqueBase = [parsed[0], parsed[1], parsed[2]];
80
- break;
81
- }
82
- layers.push(parsed);
83
- }
84
- node = node.parentElement;
85
- }
86
- if (!opaqueBase) {
87
- return {
88
- hex: "#ffffff",
89
- resolved: false,
90
- overImage
91
- };
92
- }
93
- let acc = opaqueBase;
94
- for (let i = layers.length - 1; i >= 0; i--) {
95
- acc = blend(layers[i], acc);
96
- }
97
- return {
98
- hex: toHex(acc),
99
- resolved: !overImage,
100
- overImage
101
- };
102
- }
103
- function effectiveOpacity(el) {
104
- let o = 1;
105
- let node = el;
106
- while (node) {
107
- const v = Number.parseFloat(getComputedStyle(node).opacity);
108
- if (!Number.isNaN(v)) o *= v;
109
- node = node.parentElement;
110
- }
111
- return o;
112
- }
113
- const GEOMETRY_PROPS = ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "rowGap", "columnGap", "fontSize", "fontWeight", "fontFamily", "lineHeight", "letterSpacing"];
114
- const root = document.querySelector("#mpo-matrix-root") ?? document.querySelector("[data-mpo-matrix-root]") ?? document.querySelector("#storybook-root") ?? document.querySelector("#root") ?? document.body;
115
- const storyRendered = !!root && root.children.length > 0;
116
- const geometry = [];
117
- const textSamples = [];
118
- const iconSamples = [];
119
- const chartSamples = [];
120
- let svgRootCount = 0;
121
- const capturedSvgRoots = /* @__PURE__ */new Set();
122
- function accessibleName(el) {
123
- const labelledBy = el.getAttribute("aria-labelledby");
124
- if (labelledBy) {
125
- const name = labelledBy.split(/\s+/).map(id => document.getElementById(id)?.textContent ?? "").join(" ").trim();
126
- if (name) return name.slice(0, 100);
127
- }
128
- const labels = "labels" in el ? el.labels : null;
129
- const labelText = labels ? Array.from(labels).map(label => label.textContent ?? "").join(" ") : "";
130
- return (el.getAttribute("aria-label") || labelText || el.getAttribute("title") || el.textContent || "").trim().slice(0, 100);
131
- }
132
- function controlName(el) {
133
- if (el.matches("[data-mp-input-box]")) {
134
- const input = el.querySelector("input, textarea, select");
135
- if (input) return accessibleName(input) || input.getAttribute("placeholder") || "input";
136
- }
137
- return accessibleName(el);
138
- }
139
- function unsupportedCompositing(el) {
140
- let backgroundInGroup = false;
141
- for (let node = el; node; node = node.parentElement) {
142
- const cs = getComputedStyle(node);
143
- const background = parseCssColor(cs.backgroundColor);
144
- if (background && background[3] > 0) backgroundInGroup = true;
145
- if (Number.parseFloat(cs.opacity) < 1 && backgroundInGroup) return true;
146
- if (cs.mixBlendMode && cs.mixBlendMode !== "normal") return true;
147
- }
148
- return false;
149
- }
150
- function collectIcon(el, key, cs) {
151
- if (el.tagName.toLowerCase() !== "svg" || el.parentElement?.closest("svg")) return;
152
- const backdrop = effectiveBackground(el);
153
- const rect = el.getBoundingClientRect();
154
- const sample = {
155
- key,
156
- context: accessibleName(el),
157
- status: "conveying",
158
- background: backdrop.hex,
159
- backgroundResolved: backdrop.resolved,
160
- overImage: backdrop.overImage,
161
- shapeCount: 0,
162
- distinctPaints: 0,
163
- rect: toRect(rect)
164
- };
165
- iconSamples.push(sample);
166
- if (cs.visibility === "hidden" || cs.visibility === "collapse" || effectiveOpacity(el) === 0 || rect.width === 0 || rect.height === 0) {
167
- sample.status = "hidden";
168
- return;
169
- }
170
- if (el.closest('[disabled], [aria-disabled="true"], [data-disabled="true"]')) {
171
- sample.status = "disabled-control";
172
- return;
173
- }
174
- const controls = 'button, a[href], label, summary, [data-mp-input-box], [role="button"], [role="link"], [role="menuitem"], [role="tab"], [role="checkbox"], [role="radio"], [role="switch"], [role="option"], [role="combobox"]';
175
- let namedControl = el.closest(controls);
176
- while (namedControl && !controlName(namedControl)) namedControl = namedControl.parentElement?.closest(controls) ?? null;
177
- if (namedControl) sample.context = controlName(namedControl);else if (el.closest('[aria-hidden="true"], [role="presentation"], [role="none"]')) {
178
- sample.status = "decorative-standalone";
179
- return;
180
- }
181
- if (!backdrop.resolved) {
182
- sample.unmeasurable = "unresolved-backdrop";
183
- return;
184
- }
185
- if (el.querySelector("use")) {
186
- sample.unmeasurable = "use-indirection";
187
- return;
188
- }
189
- const paintNodes = [el, ...Array.from(el.querySelectorAll("*"))];
190
- for (let ancestor = el.parentElement; ancestor; ancestor = ancestor.parentElement) paintNodes.push(ancestor);
191
- if (paintNodes.some(node => {
192
- const style = getComputedStyle(node);
193
- return style.filter && style.filter !== "none" || style.maskImage && style.maskImage !== "none";
194
- })) {
195
- sample.unmeasurable = "masked-or-filtered";
196
- return;
197
- }
198
- const background = [Number.parseInt(backdrop.hex.slice(1, 3), 16), Number.parseInt(backdrop.hex.slice(3, 5), 16), Number.parseInt(backdrop.hex.slice(5, 7), 16)];
199
- const paints = /* @__PURE__ */new Set();
200
- const kinds = /* @__PURE__ */new Set();
201
- const alphaValue = raw => raw.endsWith("%") ? Number.parseFloat(raw) / 100 : Number.parseFloat(raw);
202
- for (const shape of Array.from(el.querySelectorAll("path, rect, circle, ellipse, line, polyline, polygon, text, tspan"))) {
203
- if (shape.closest("defs, clipPath, mask, pattern, marker, symbol")) continue;
204
- const style = getComputedStyle(shape);
205
- let hiddenGroup = false;
206
- for (let node = shape; node && node !== el; node = node.parentElement) {
207
- if (getComputedStyle(node).display === "none") hiddenGroup = true;
208
- }
209
- if (hiddenGroup || style.display === "none" || style.visibility === "hidden" || style.visibility === "collapse" || effectiveOpacity(shape) === 0) continue;
210
- const bounds = shape.getBBox();
211
- if (typeof SVGGeometryElement !== "undefined" && shape instanceof SVGGeometryElement && shape.getTotalLength() === 0) continue;
212
- sample.shapeCount++;
213
- if (unsupportedCompositing(shape)) {
214
- sample.unmeasurable = "unsupported-compositing";
215
- return;
216
- }
217
- if ([style.markerStart, style.markerMid, style.markerEnd].some(value => value && value !== "none")) {
218
- sample.unmeasurable = "unsupported-paint";
219
- return;
220
- }
221
- for (const kind of ["fill", "stroke"]) {
222
- if (kind === "fill" && (shape.tagName.toLowerCase() === "line" || bounds.width === 0 || bounds.height === 0)) continue;
223
- if (kind === "stroke" && !(Number.parseFloat(style.strokeWidth) > 0)) continue;
224
- const raw = style[kind].trim().toLowerCase();
225
- if (raw === "none") continue;
226
- const ink = parseCssColor(raw === "currentcolor" ? style.color : raw);
227
- if (!ink) {
228
- sample.unmeasurable = "unsupported-paint";
229
- return;
230
- }
231
- const paintOpacity = alphaValue(kind === "fill" ? style.fillOpacity : style.strokeOpacity);
232
- ink[3] *= (Number.isFinite(paintOpacity) ? paintOpacity : 1) * effectiveOpacity(shape);
233
- if (ink[3] === 0) continue;
234
- paints.add(toHex(blend(ink, background)));
235
- kinds.add(kind);
236
- }
237
- }
238
- sample.distinctPaints = paints.size;
239
- if (paints.size === 0) sample.unmeasurable = "no-paint";else if (paints.size > 1) sample.unmeasurable = "multicolor";else {
240
- sample.paint = Array.from(paints)[0];
241
- sample.paintKinds = Array.from(kinds);
242
- }
243
- }
244
- function collectChart(el, key) {
245
- const backdrop = effectiveBackground(el);
246
- const rawCount = el.getAttribute("data-mpo-chart-datum-count");
247
- const expected = rawCount !== null && /^\d+$/.test(rawCount) ? Number(rawCount) : -1;
248
- const owner = el.closest("[data-mpo-chart-owner]");
249
- const rows = owner ? Array.from(owner.querySelectorAll("[data-mpo-chart-datum-text]")).filter(row => row.tagName.toLowerCase() !== "svg" && row.closest("[data-mpo-chart-owner]") === owner) : [];
250
- const visible = node => {
251
- const style = getComputedStyle(node);
252
- const rect = node.getBoundingClientRect();
253
- return style.visibility !== "hidden" && style.visibility !== "collapse" && effectiveOpacity(node) > 0 && (rect.width > 0 || rect.height > 0);
254
- };
255
- const completeRows = rows.filter((row, index) => {
256
- const name = row.querySelector("[data-mpo-chart-datum-label]");
257
- const value = row.querySelector("[data-mpo-chart-datum-value]");
258
- return row.getAttribute("data-mpo-chart-datum-text") === String(index) && name && value && visible(name) && visible(value) && !!name.textContent?.trim() && !!value.textContent?.trim();
259
- });
260
- const sample = {
261
- key,
262
- kind: el.getAttribute("data-mpo-chart") ?? "",
263
- context: accessibleName(el),
264
- label: (el.getAttribute("aria-label") ?? "").trim(),
265
- background: backdrop.hex,
266
- backgroundResolved: backdrop.resolved,
267
- marks: [],
268
- labels: [],
269
- chrome: [],
270
- unaccountedPaint: [],
271
- separation: {
272
- declared: el.getAttribute("data-mpo-chart-separated") === "true"
273
- },
274
- datumText: {
275
- viewId: el.getAttribute("data-mpo-chart-data-view") ?? void 0,
276
- expectedValues: el.getAttribute("data-mpo-chart-data-expected") ?? void 0,
277
- declared: el.getAttribute("data-mpo-chart-datum-text") === "true",
278
- expected,
279
- observed: completeRows.length,
280
- complete: expected > 0 && rows.length === expected && completeRows.length === expected
281
- }
282
- };
283
- chartSamples.push(sample);
284
- if (!visible(el)) sample.unmeasurable = "hidden-chart";else if (!backdrop.resolved) sample.unmeasurable = "unresolved-backdrop";else if (el.querySelector("use")) sample.unmeasurable = "use-indirection";
285
- const marks = Array.from(el.querySelectorAll("[data-mpo-chart-mark]"));
286
- const certifiedMasks = /* @__PURE__ */new Set();
287
- if ((sample.kind === "pie" || sample.kind === "donut") && marks.length > 1) {
288
- const round2 = value => Math.round(value * 1e3) / 1e3;
289
- const pathTokens = path => JSON.stringify((path.replace(/^path\(["']?|["']?\)$/g, "").match(/[a-zA-Z]|[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g) ?? []).map(token => Number.isNaN(Number(token)) ? token : Number(token)));
290
- const point = (radius, angle) => `${round2(radius * Math.cos(angle - Math.PI / 2))},${round2(radius * Math.sin(angle - Math.PI / 2))}`;
291
- const proofs = marks.map(mark => {
292
- if (mark.tagName.toLowerCase() !== "path" || mark.getAttribute("data-mpo-chart-mask") !== "eroded-arc-v1") return;
293
- const values = (mark.getAttribute("data-mpo-chart-slice") ?? "").split(",").map(Number);
294
- if (values.length !== 4 || !values.every(Number.isFinite)) return;
295
- const [start, end, inner, outer] = values;
296
- const span = end - start;
297
- if (start < 0 || end > Math.PI * 2 + 1e-9 || span <= 0 || span >= Math.PI * 2 || inner < 0 || outer <= inner) return;
298
- const radius = (inner + outer) / 2;
299
- const projection = Math.min(outer, Math.max(inner, radius * Math.cos(span / 2)));
300
- const radialDistance = Math.sqrt(Math.max(0, radius ** 2 + projection ** 2 - 2 * radius * projection * Math.cos(span / 2)));
301
- if (outer - radius <= 1.002 || radius - inner <= 1.002 || radialDistance <= 1.002) return;
302
- const large = Number(span >= Math.PI);
303
- const d = `M${point(outer, start)}A${round2(outer)},${round2(outer)},0,${large},1,${point(outer, end)}` + (inner ? `L${point(inner, end)}A${round2(inner)},${round2(inner)},0,${large},0,${point(inner, start)}Z` : "L0,0Z");
304
- if (mark.getAttribute("d") !== d) return;
305
- const markStyle = getComputedStyle(mark);
306
- const paintedD = markStyle.getPropertyValue("d");
307
- if (paintedD && pathTokens(paintedD) !== pathTokens(d)) return;
308
- if (markStyle.stroke !== "none") return;
309
- const reference = /^url\(["']?#([^"')]+)["']?\)$/.exec(mark.getAttribute("mask") ?? "");
310
- if (!reference) return;
311
- const matches = Array.from(document.querySelectorAll("[id]")).filter(node => node.id === reference[1]);
312
- const mask = matches[0];
313
- if (matches.length !== 1 || mask.tagName.toLowerCase() !== "mask" || !el.contains(mask)) return;
314
- const definitions = mask.parentElement;
315
- if (definitions?.tagName.toLowerCase() !== "defs" || definitions.parentElement !== mark.parentElement) return;
316
- const computedReference = /^url\(["']?([^"')]+)["']?\)$/.exec(markStyle.maskImage);
317
- if (!computedReference || !["match-source", "luminance"].includes(markStyle.maskMode)) return;
318
- try {
319
- if (new URL(computedReference[1], document.baseURI).href !== new URL(`#${reference[1]}`, document.URL).href) return;
320
- } catch {
321
- return;
322
- }
323
- if (mask.getAttribute("maskUnits") !== "userSpaceOnUse" || mask.getAttribute("maskContentUnits") !== "userSpaceOnUse" || getComputedStyle(mask).getPropertyValue("mask-type") !== "luminance") return;
324
- const bounds = {
325
- x: -outer - 2,
326
- y: -outer - 2,
327
- width: (outer + 2) * 2,
328
- height: (outer + 2) * 2
329
- };
330
- if (Object.entries(bounds).some(([name, value]) => Number(mask.getAttribute(name)) !== value)) return;
331
- if (mask.children.length !== 1) return;
332
- const boundary = mask.children[0];
333
- if (boundary.tagName.toLowerCase() !== "path" || boundary.getAttribute("d") !== d) return;
334
- for (const node of [definitions, mask, boundary]) {
335
- const style = getComputedStyle(node);
336
- if (style.transform !== "none" || style.filter !== "none" || style.maskImage !== "none" || style.clipPath !== "none" || style.opacity !== "1" || style.visibility !== "visible" || style.display === "none") return;
337
- if ([style.markerStart, style.markerMid, style.markerEnd].some(value => value && value !== "none")) return;
338
- }
339
- if (unsupportedCompositing(boundary)) return;
340
- const boundaryStyle = getComputedStyle(boundary);
341
- if (boundaryStyle.fill !== "rgb(255, 255, 255)" || boundaryStyle.stroke !== "rgb(0, 0, 0)" || boundaryStyle.fillOpacity !== "1" || boundaryStyle.strokeOpacity !== "1" || Number.parseFloat(boundaryStyle.strokeWidth) !== 2 || boundaryStyle.strokeLinejoin !== "round" || boundaryStyle.strokeLinecap !== "round" || boundaryStyle.paintOrder !== "normal" || boundaryStyle.vectorEffect !== "none" || boundaryStyle.strokeDasharray !== "none") return;
342
- const boundaryD = boundaryStyle.getPropertyValue("d");
343
- if (boundaryD && pathTokens(boundaryD) !== pathTokens(d)) return;
344
- for (let node = mark; node; node = node.parentElement) {
345
- const style = getComputedStyle(node);
346
- if (style.transform.startsWith("matrix3d") || style.perspective && style.perspective !== "none") return;
347
- }
348
- const ctm = mark.getScreenCTM();
349
- if (!ctm) return;
350
- const matrix = [ctm.a, ctm.b, ctm.c, ctm.d, ctm.e, ctm.f];
351
- const firstScale = Math.hypot(ctm.a + ctm.d, ctm.b - ctm.c);
352
- const secondScale = Math.hypot(ctm.a - ctm.d, ctm.b + ctm.c);
353
- const smallest = Math.abs(firstScale - secondScale) / 2;
354
- if (!matrix.every(Number.isFinite) || !Number.isFinite(smallest) || smallest <= 0) return;
355
- const measuredGap = 2 * smallest * window.devicePixelRatio;
356
- const gap = Math.abs(measuredGap - 2) <= 8 * Number.EPSILON ? 2 : measuredGap;
357
- return {
358
- mark,
359
- start,
360
- end,
361
- inner,
362
- outer,
363
- matrix,
364
- gap
365
- };
366
- });
367
- const first = proofs[0];
368
- if (first && Math.abs(first.start) < 1e-9 && proofs.every((proof, index) => proof && proof.inner === first.inner && proof.outer === first.outer && proof.matrix.every((value, axis) => value === first.matrix[axis]) && Math.abs(proof.start - (index ? proofs[index - 1].end : 0)) < 1e-9) && Math.abs(proofs[proofs.length - 1].end - Math.PI * 2) < 1e-9) {
369
- for (const proof of proofs) certifiedMasks.add(proof.mark);
370
- sample.separation.method = "eroded-arc";
371
- sample.separation.minimumGapPx = first.gap;
372
- }
373
- }
374
- function paintSample(shape, paintKey, label) {
375
- const item = {
376
- key: paintKey,
377
- label,
378
- background: backdrop.hex
379
- };
380
- if (shape.closest("defs, clipPath, mask, pattern, marker, symbol")) return {
381
- ...item,
382
- unmeasurable: "no-paint"
383
- };
384
- if (!visible(shape)) return {
385
- ...item,
386
- unmeasurable: "no-paint"
387
- };
388
- if (!backdrop.resolved) return {
389
- ...item,
390
- unmeasurable: "unresolved-backdrop"
391
- };
392
- for (let node = shape; node; node = node.parentElement) {
393
- const style2 = getComputedStyle(node);
394
- if (style2.filter && style2.filter !== "none" || style2.maskImage && style2.maskImage !== "none" && !(node === shape && certifiedMasks.has(shape))) return {
395
- ...item,
396
- unmeasurable: "masked-or-filtered"
397
- };
398
- if (style2.clipPath && style2.clipPath !== "none") return {
399
- ...item,
400
- unmeasurable: "unsupported-paint"
401
- };
402
- }
403
- if (unsupportedCompositing(shape)) return {
404
- ...item,
405
- unmeasurable: "unsupported-compositing"
406
- };
407
- const style = getComputedStyle(shape);
408
- if ([style.markerStart, style.markerMid, style.markerEnd].some(value => value && value !== "none")) return {
409
- ...item,
410
- unmeasurable: "unsupported-paint"
411
- };
412
- let bounds;
413
- try {
414
- bounds = shape.getBBox();
415
- } catch {
416
- return {
417
- ...item,
418
- unmeasurable: "unsupported-paint"
419
- };
420
- }
421
- const background = [Number.parseInt(backdrop.hex.slice(1, 3), 16), Number.parseInt(backdrop.hex.slice(3, 5), 16), Number.parseInt(backdrop.hex.slice(5, 7), 16)];
422
- const paints = /* @__PURE__ */new Set();
423
- for (const kind of ["fill", "stroke"]) {
424
- if (kind === "fill" && (shape.tagName.toLowerCase() === "line" || bounds.width === 0 || bounds.height === 0)) continue;
425
- if (kind === "stroke" && !(Number.parseFloat(style.strokeWidth) > 0)) continue;
426
- const raw = style[kind].trim().toLowerCase();
427
- if (raw === "none") continue;
428
- const ink = parseCssColor(raw === "currentcolor" ? style.color : raw);
429
- if (!ink) return {
430
- ...item,
431
- unmeasurable: "unsupported-paint"
432
- };
433
- const alphaRaw = kind === "fill" ? style.fillOpacity : style.strokeOpacity;
434
- const alpha = Number.parseFloat(alphaRaw) / (alphaRaw.endsWith("%") ? 100 : 1);
435
- ink[3] *= (Number.isFinite(alpha) ? alpha : 1) * effectiveOpacity(shape);
436
- if (ink[3] > 0) paints.add(toHex(blend(ink, background)));
437
- }
438
- if (paints.size !== 1) return {
439
- ...item,
440
- unmeasurable: paints.size ? "multicolor" : "no-paint"
441
- };
442
- return {
443
- ...item,
444
- paint: Array.from(paints)[0]
445
- };
446
- }
447
- for (const [index, mark] of marks.entries()) {
448
- const tag = mark.tagName.toLowerCase();
449
- const item = !["path", "rect", "circle", "ellipse", "line", "polyline", "polygon"].includes(tag) ? {
450
- key: `${key}/mark:${index}`,
451
- label: mark.getAttribute("data-mpo-chart-mark") ?? "",
452
- background: backdrop.hex,
453
- unmeasurable: "unsupported-paint"
454
- } : paintSample(mark, `${key}/mark:${index}`, mark.getAttribute("data-mpo-chart-mark") || `mark ${index + 1}`);
455
- sample.marks.push(item);
456
- }
457
- for (const [index, node] of Array.from(el.querySelectorAll("text, tspan")).entries()) {
458
- const text = Array.from(node.childNodes).filter(child => child.nodeType === 3).map(child => child.textContent ?? "").join("").trim();
459
- if (text) sample.labels.push(paintSample(node, `${key}/label:${index}`, text));
460
- }
461
- for (const [index, drawable] of Array.from(el.querySelectorAll("path, rect, circle, ellipse, line, polyline, polygon, image, foreignObject, use")).entries()) {
462
- if (drawable.hasAttribute("data-mpo-chart-mark")) continue;
463
- const tag = drawable.tagName.toLowerCase();
464
- const item = paintSample(drawable, `${key}/drawable:${index}`, `unaccounted ${tag}`);
465
- if (item.unmeasurable === "no-paint") continue;
466
- const chrome = drawable.getAttribute("data-mpo-chart-chrome");
467
- const style = getComputedStyle(drawable);
468
- const rect = drawable.getBoundingClientRect();
469
- const ctm = drawable.getScreenCTM?.();
470
- const squareSum = ctm ? ctm.a ** 2 + ctm.b ** 2 + ctm.c ** 2 + ctm.d ** 2 : NaN;
471
- const determinant = ctm ? ctm.a * ctm.d - ctm.b * ctm.c : NaN;
472
- const largestScale = Math.sqrt((squareSum + Math.sqrt(Math.max(0, squareSum ** 2 - 4 * determinant ** 2))) / 2);
473
- const screenStrokeWidth = Number.parseFloat(style.strokeWidth) * largestScale;
474
- const thinAxisLine = (chrome === "axis" || chrome === "grid") && tag === "line" && (rect.width === 0 || rect.height === 0) && Number.isFinite(screenStrokeWidth) && screenStrokeWidth <= 1 && screenStrokeWidth > 0 && !item.unmeasurable;
475
- if (thinAxisLine) sample.chrome.push({
476
- ...item,
477
- label: `${chrome} line`
478
- });else sample.unaccountedPaint.push({
479
- ...item,
480
- unmeasurable: "unsupported-paint"
481
- });
482
- }
483
- if (sample.kind === "bar" && marks.length > 0 && marks.every((mark, index) =>
484
- // A bar path that declares its box (value-end rounding, MPO-56)
485
- // paints inside that box just as a rect does.
486
- (mark.tagName.toLowerCase() === "rect" || mark.tagName.toLowerCase() === "path" && mark.hasAttribute("data-mpo-chart-bar")) && getComputedStyle(mark).stroke === "none" && !sample.marks[index].unmeasurable)) {
487
- let minimumGapPx = Infinity;
488
- const bounds = marks.map(mark => mark.getBoundingClientRect());
489
- for (let i = 0; i < bounds.length; i++) for (let j = i + 1; j < bounds.length; j++) {
490
- const a = bounds[i];
491
- const b = bounds[j];
492
- const dx = Math.max(0, a.left - b.right, b.left - a.right);
493
- const dy = Math.max(0, a.top - b.bottom, b.top - a.bottom);
494
- minimumGapPx = Math.min(minimumGapPx, Math.hypot(dx, dy) * window.devicePixelRatio);
495
- }
496
- sample.separation.method = "rect-bounds";
497
- sample.separation.minimumGapPx = Number.isFinite(minimumGapPx) ? minimumGapPx : 2;
498
- }
499
- if (sample.kind === "area") sample.unmeasurable ??= "unsupported-overlap";
500
- }
501
- function collectText(el, key, cs) {
502
- const directText = [];
503
- for (const child of Array.from(el.childNodes)) {
504
- if (child.nodeType === 3 && (child.textContent ?? "").trim().length > 0) {
505
- directText.push(child);
506
- }
507
- }
508
- if (directText.length === 0) return void 0;
509
- const range = document.createRange();
510
- range.setStartBefore(directText[0]);
511
- range.setEndAfter(directText[directText.length - 1]);
512
- const textRect = range.getBoundingClientRect();
513
- if (!(textRect.width > 0 && textRect.height > 0)) return void 0;
514
- const opacity = effectiveOpacity(el);
515
- if (opacity > 0.05 && cs.visibility !== "hidden") {
516
- const ink = parseCssColor(cs.color);
517
- const backdrop = effectiveBackground(el);
518
- if (ink) {
519
- const baseParsed = parseCssColor(backdrop.hex) ?? [255, 255, 255, 1];
520
- const inkOpaque = toHex(ink[3] >= 0.999 ? [ink[0], ink[1], ink[2]] : blend(ink, [baseParsed[0], baseParsed[1], baseParsed[2]]));
521
- textSamples.push({
522
- key,
523
- text: (directText[0].textContent ?? "").trim().slice(0, 60),
524
- color: inkOpaque,
525
- background: backdrop.hex,
526
- backgroundResolved: backdrop.resolved,
527
- overImage: backdrop.overImage,
528
- fontSizePx: Number.parseFloat(cs.fontSize) || 0,
529
- fontWeightNum: Number.parseFloat(cs.fontWeight) || 400,
530
- rect: toRect(textRect)
531
- });
532
- }
533
- }
534
- return toRect(textRect);
535
- }
536
- function boxedChildren(el, path) {
537
- const out = [];
538
- const counts = {};
539
- for (const child of Array.from(el.children)) {
540
- const tag = child.tagName.toLowerCase();
541
- if (SKIP_TAGS.has(tag)) continue;
542
- if (child.namespaceURI === "http://www.w3.org/2000/svg" && tag !== "svg") continue;
543
- const cs = getComputedStyle(child);
544
- if (cs.display === "none") continue;
545
- if (cs.display === "contents") {
546
- const index = counts[tag] ?? 0;
547
- counts[tag] = index + 1;
548
- collectText(child, `${path}/${tag}:${index}~contents`, cs);
549
- for (const grandchild of boxedChildren(child, path)) out.push(grandchild);
550
- continue;
551
- }
552
- out.push(child);
553
- }
554
- return out;
555
- }
556
- function visit(el, path) {
557
- const tag = el.tagName.toLowerCase();
558
- const cs = getComputedStyle(el);
559
- const rect = el.getBoundingClientRect();
560
- const props = {};
561
- for (const prop of GEOMETRY_PROPS) {
562
- props[prop] = cs[prop];
563
- }
564
- const entry = {
565
- key: path,
566
- tag,
567
- rect: toRect(rect),
568
- props
569
- };
570
- const textRect = collectText(el, path, cs);
571
- if (textRect) entry.textRect = textRect;
572
- if (tag === "svg" && !el.parentElement?.closest("svg")) {
573
- capturedSvgRoots.add(el);
574
- if (el.hasAttribute("data-mpo-chart")) collectChart(el, path);else collectIcon(el, path, cs);
575
- }
576
- geometry.push(entry);
577
- const counts = {};
578
- for (const child of boxedChildren(el, path)) {
579
- const childTag = child.tagName.toLowerCase();
580
- const index = counts[childTag] ?? 0;
581
- counts[childTag] = index + 1;
582
- visit(child, `${path}/${childTag}:${index}`);
583
- }
584
- }
585
- if (root) {
586
- const counts = {};
587
- for (const child of boxedChildren(root, "")) {
588
- const childTag = child.tagName.toLowerCase();
589
- const index = counts[childTag] ?? 0;
590
- counts[childTag] = index + 1;
591
- visit(child, `${childTag}:${index}`);
592
- }
593
- const svgRoots = Array.from(root.querySelectorAll("svg")).filter(svg => !svg.parentElement?.closest("svg"));
594
- svgRootCount = svgRoots.length;
595
- for (const [index, svg] of svgRoots.entries()) {
596
- if (capturedSvgRoots.has(svg)) continue;
597
- const key = `unpainted-svg:${index}`;
598
- if (svg.hasAttribute("data-mpo-chart")) collectChart(svg, key);else collectIcon(svg, key, getComputedStyle(svg));
599
- }
600
- }
601
- return {
602
- storyRendered,
603
- geometry,
604
- textSamples,
605
- iconSamples,
606
- chartSamples,
607
- svgRootCount
608
- };
37
+ if (typeof document === "undefined") throw new Error("captureMatrixSnapshot needs a DOM");
38
+ const SKIP_TAGS = /* @__PURE__ */ new Set([
39
+ "script",
40
+ "style",
41
+ "link",
42
+ "meta",
43
+ "head",
44
+ "title",
45
+ "noscript",
46
+ "br",
47
+ "wbr",
48
+ "template"
49
+ ]);
50
+ const round = (n) => Math.round(n * 4) / 4;
51
+ const toRect = (r) => ({
52
+ x: round(r.x),
53
+ y: round(r.y),
54
+ w: round(r.width),
55
+ h: round(r.height)
56
+ });
57
+ function parseCssColor(raw) {
58
+ const s = raw.trim().toLowerCase();
59
+ if (s === "transparent") return [
60
+ 0,
61
+ 0,
62
+ 0,
63
+ 0
64
+ ];
65
+ const m = s.match(/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.%]+))?\s*\)$/);
66
+ if (!m) return null;
67
+ let a = 1;
68
+ if (m[4] !== void 0) {
69
+ a = m[4].endsWith("%") ? Number.parseFloat(m[4]) / 100 : Number.parseFloat(m[4]);
70
+ }
71
+ return [
72
+ Number.parseFloat(m[1]),
73
+ Number.parseFloat(m[2]),
74
+ Number.parseFloat(m[3]),
75
+ a
76
+ ];
77
+ }
78
+ function toHex(rgb) {
79
+ const h = (v) => Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, "0");
80
+ return `#${h(rgb[0])}${h(rgb[1])}${h(rgb[2])}`;
81
+ }
82
+ function blend(top, bottom) {
83
+ const a = top[3];
84
+ return [
85
+ top[0] * a + bottom[0] * (1 - a),
86
+ top[1] * a + bottom[1] * (1 - a),
87
+ top[2] * a + bottom[2] * (1 - a)
88
+ ];
89
+ }
90
+ function effectiveBackground(el) {
91
+ const layers = [];
92
+ let overImage = false;
93
+ let node = el;
94
+ let opaqueBase = null;
95
+ while (node) {
96
+ const cs = getComputedStyle(node);
97
+ if (cs.backgroundImage && cs.backgroundImage !== "none") overImage = true;
98
+ if (node.getAttribute("data-mpo-chart-backdrop") === "patterned") overImage = true;
99
+ const parsed = parseCssColor(cs.backgroundColor);
100
+ if (parsed && parsed[3] > 0) {
101
+ if (parsed[3] >= .999) {
102
+ opaqueBase = [
103
+ parsed[0],
104
+ parsed[1],
105
+ parsed[2]
106
+ ];
107
+ break;
108
+ }
109
+ layers.push(parsed);
110
+ }
111
+ node = node.parentElement;
112
+ }
113
+ if (!opaqueBase) {
114
+ return {
115
+ hex: "#ffffff",
116
+ resolved: false,
117
+ overImage
118
+ };
119
+ }
120
+ let acc = opaqueBase;
121
+ for (let i = layers.length - 1; i >= 0; i--) {
122
+ acc = blend(layers[i], acc);
123
+ }
124
+ return {
125
+ hex: toHex(acc),
126
+ resolved: !overImage,
127
+ overImage
128
+ };
129
+ }
130
+ function effectiveOpacity(el) {
131
+ let o = 1;
132
+ let node = el;
133
+ while (node) {
134
+ const v = Number.parseFloat(getComputedStyle(node).opacity);
135
+ if (!Number.isNaN(v)) o *= v;
136
+ node = node.parentElement;
137
+ }
138
+ return o;
139
+ }
140
+ const GEOMETRY_PROPS = [
141
+ "borderTopLeftRadius",
142
+ "borderTopRightRadius",
143
+ "borderBottomLeftRadius",
144
+ "borderBottomRightRadius",
145
+ "borderTopWidth",
146
+ "borderRightWidth",
147
+ "borderBottomWidth",
148
+ "borderLeftWidth",
149
+ "paddingTop",
150
+ "paddingRight",
151
+ "paddingBottom",
152
+ "paddingLeft",
153
+ "rowGap",
154
+ "columnGap",
155
+ "fontSize",
156
+ "fontWeight",
157
+ "fontFamily",
158
+ "lineHeight",
159
+ "letterSpacing"
160
+ ];
161
+ const root = document.querySelector("#mpo-matrix-root") ?? document.querySelector("[data-mpo-matrix-root]") ?? document.querySelector("#storybook-root") ?? document.querySelector("#root") ?? document.body;
162
+ const storyRendered = !!root && root.children.length > 0;
163
+ const geometry = [];
164
+ const textSamples = [];
165
+ const iconSamples = [];
166
+ const chartSamples = [];
167
+ let svgRootCount = 0;
168
+ const capturedSvgRoots = /* @__PURE__ */ new Set();
169
+ function accessibleName(el) {
170
+ const labelledBy = el.getAttribute("aria-labelledby");
171
+ if (labelledBy) {
172
+ const name = labelledBy.split(/\s+/).map((id) => document.getElementById(id)?.textContent ?? "").join(" ").trim();
173
+ if (name) return name.slice(0, 100);
174
+ }
175
+ const labels = "labels" in el ? el.labels : null;
176
+ const labelText = labels ? Array.from(labels).map((label) => label.textContent ?? "").join(" ") : "";
177
+ return (el.getAttribute("aria-label") || labelText || el.getAttribute("title") || el.textContent || "").trim().slice(0, 100);
178
+ }
179
+ function controlName(el) {
180
+ if (el.matches("[data-mp-input-box]")) {
181
+ const input = el.querySelector("input, textarea, select");
182
+ if (input) return accessibleName(input) || input.getAttribute("placeholder") || "input";
183
+ }
184
+ return accessibleName(el);
185
+ }
186
+ function unsupportedCompositing(el) {
187
+ let backgroundInGroup = false;
188
+ for (let node = el; node; node = node.parentElement) {
189
+ const cs = getComputedStyle(node);
190
+ const background = parseCssColor(cs.backgroundColor);
191
+ if (background && background[3] > 0) backgroundInGroup = true;
192
+ if (Number.parseFloat(cs.opacity) < 1 && backgroundInGroup) return true;
193
+ if (cs.mixBlendMode && cs.mixBlendMode !== "normal") return true;
194
+ }
195
+ return false;
196
+ }
197
+ function collectIcon(el, key, cs) {
198
+ if (el.tagName.toLowerCase() !== "svg" || el.parentElement?.closest("svg")) return;
199
+ const backdrop = effectiveBackground(el);
200
+ const rect = el.getBoundingClientRect();
201
+ const sample = {
202
+ key,
203
+ context: accessibleName(el),
204
+ status: "conveying",
205
+ background: backdrop.hex,
206
+ backgroundResolved: backdrop.resolved,
207
+ overImage: backdrop.overImage,
208
+ shapeCount: 0,
209
+ distinctPaints: 0,
210
+ rect: toRect(rect)
211
+ };
212
+ iconSamples.push(sample);
213
+ if (cs.visibility === "hidden" || cs.visibility === "collapse" || effectiveOpacity(el) === 0 || rect.width === 0 || rect.height === 0) {
214
+ sample.status = "hidden";
215
+ return;
216
+ }
217
+ if (el.closest("[disabled], [aria-disabled=\"true\"], [data-disabled=\"true\"]")) {
218
+ sample.status = "disabled-control";
219
+ return;
220
+ }
221
+ const controls = "button, a[href], label, summary, [data-mp-input-box], [role=\"button\"], [role=\"link\"], [role=\"menuitem\"], [role=\"tab\"], [role=\"checkbox\"], [role=\"radio\"], [role=\"switch\"], [role=\"option\"], [role=\"combobox\"]";
222
+ let namedControl = el.closest(controls);
223
+ while (namedControl && !controlName(namedControl)) namedControl = namedControl.parentElement?.closest(controls) ?? null;
224
+ if (namedControl) sample.context = controlName(namedControl);
225
+ else if (el.closest("[aria-hidden=\"true\"], [role=\"presentation\"], [role=\"none\"]")) {
226
+ sample.status = "decorative-standalone";
227
+ return;
228
+ }
229
+ if (!backdrop.resolved) {
230
+ sample.unmeasurable = "unresolved-backdrop";
231
+ return;
232
+ }
233
+ if (el.querySelector("use")) {
234
+ sample.unmeasurable = "use-indirection";
235
+ return;
236
+ }
237
+ const paintNodes = [el, ...Array.from(el.querySelectorAll("*"))];
238
+ for (let ancestor = el.parentElement; ancestor; ancestor = ancestor.parentElement) paintNodes.push(ancestor);
239
+ if (paintNodes.some((node) => {
240
+ const style = getComputedStyle(node);
241
+ return style.filter && style.filter !== "none" || style.maskImage && style.maskImage !== "none";
242
+ })) {
243
+ sample.unmeasurable = "masked-or-filtered";
244
+ return;
245
+ }
246
+ const background = [
247
+ Number.parseInt(backdrop.hex.slice(1, 3), 16),
248
+ Number.parseInt(backdrop.hex.slice(3, 5), 16),
249
+ Number.parseInt(backdrop.hex.slice(5, 7), 16)
250
+ ];
251
+ const paints = /* @__PURE__ */ new Set();
252
+ const kinds = /* @__PURE__ */ new Set();
253
+ const alphaValue = (raw) => raw.endsWith("%") ? Number.parseFloat(raw) / 100 : Number.parseFloat(raw);
254
+ for (const shape of Array.from(el.querySelectorAll("path, rect, circle, ellipse, line, polyline, polygon, text, tspan"))) {
255
+ if (shape.closest("defs, clipPath, mask, pattern, marker, symbol")) continue;
256
+ const style = getComputedStyle(shape);
257
+ let hiddenGroup = false;
258
+ for (let node = shape; node && node !== el; node = node.parentElement) {
259
+ if (getComputedStyle(node).display === "none") hiddenGroup = true;
260
+ }
261
+ if (hiddenGroup || style.display === "none" || style.visibility === "hidden" || style.visibility === "collapse" || effectiveOpacity(shape) === 0) continue;
262
+ const bounds = shape.getBBox();
263
+ if (typeof SVGGeometryElement !== "undefined" && shape instanceof SVGGeometryElement && shape.getTotalLength() === 0) continue;
264
+ sample.shapeCount++;
265
+ if (unsupportedCompositing(shape)) {
266
+ sample.unmeasurable = "unsupported-compositing";
267
+ return;
268
+ }
269
+ if ([
270
+ style.markerStart,
271
+ style.markerMid,
272
+ style.markerEnd
273
+ ].some((value) => value && value !== "none")) {
274
+ sample.unmeasurable = "unsupported-paint";
275
+ return;
276
+ }
277
+ for (const kind of ["fill", "stroke"]) {
278
+ if (kind === "fill" && (shape.tagName.toLowerCase() === "line" || bounds.width === 0 || bounds.height === 0)) continue;
279
+ if (kind === "stroke" && !(Number.parseFloat(style.strokeWidth) > 0)) continue;
280
+ const raw = style[kind].trim().toLowerCase();
281
+ if (raw === "none") continue;
282
+ const ink = parseCssColor(raw === "currentcolor" ? style.color : raw);
283
+ if (!ink) {
284
+ sample.unmeasurable = "unsupported-paint";
285
+ return;
286
+ }
287
+ const paintOpacity = alphaValue(kind === "fill" ? style.fillOpacity : style.strokeOpacity);
288
+ ink[3] *= (Number.isFinite(paintOpacity) ? paintOpacity : 1) * effectiveOpacity(shape);
289
+ if (ink[3] === 0) continue;
290
+ paints.add(toHex(blend(ink, background)));
291
+ kinds.add(kind);
292
+ }
293
+ }
294
+ sample.distinctPaints = paints.size;
295
+ if (paints.size === 0) sample.unmeasurable = "no-paint";
296
+ else if (paints.size > 1) sample.unmeasurable = "multicolor";
297
+ else {
298
+ sample.paint = Array.from(paints)[0];
299
+ sample.paintKinds = Array.from(kinds);
300
+ }
301
+ }
302
+ function collectChart(el, key) {
303
+ const backdrop = effectiveBackground(el);
304
+ const rawCount = el.getAttribute("data-mpo-chart-datum-count");
305
+ const expected = rawCount !== null && /^\d+$/.test(rawCount) ? Number(rawCount) : -1;
306
+ const owner = el.closest("[data-mpo-chart-owner]");
307
+ const rows = owner ? Array.from(owner.querySelectorAll("[data-mpo-chart-datum-text]")).filter((row) => row.tagName.toLowerCase() !== "svg" && row.closest("[data-mpo-chart-owner]") === owner) : [];
308
+ const visible = (node) => {
309
+ const style = getComputedStyle(node);
310
+ const rect = node.getBoundingClientRect();
311
+ return style.visibility !== "hidden" && style.visibility !== "collapse" && effectiveOpacity(node) > 0 && (rect.width > 0 || rect.height > 0);
312
+ };
313
+ const completeRows = rows.filter((row, index) => {
314
+ const name = row.querySelector("[data-mpo-chart-datum-label]");
315
+ const value = row.querySelector("[data-mpo-chart-datum-value]");
316
+ return row.getAttribute("data-mpo-chart-datum-text") === String(index) && name && value && visible(name) && visible(value) && !!name.textContent?.trim() && !!value.textContent?.trim();
317
+ });
318
+ const sample = {
319
+ key,
320
+ kind: el.getAttribute("data-mpo-chart") ?? "",
321
+ context: accessibleName(el),
322
+ label: (el.getAttribute("aria-label") ?? "").trim(),
323
+ background: backdrop.hex,
324
+ backgroundResolved: backdrop.resolved,
325
+ marks: [],
326
+ labels: [],
327
+ chrome: [],
328
+ unaccountedPaint: [],
329
+ separation: { declared: el.getAttribute("data-mpo-chart-separated") === "true" },
330
+ datumText: {
331
+ viewId: el.getAttribute("data-mpo-chart-data-view") ?? void 0,
332
+ expectedValues: el.getAttribute("data-mpo-chart-data-expected") ?? void 0,
333
+ declared: el.getAttribute("data-mpo-chart-datum-text") === "true",
334
+ expected,
335
+ observed: completeRows.length,
336
+ complete: expected > 0 && rows.length === expected && completeRows.length === expected
337
+ }
338
+ };
339
+ chartSamples.push(sample);
340
+ if (!visible(el)) sample.unmeasurable = "hidden-chart";
341
+ else if (!backdrop.resolved) sample.unmeasurable = "unresolved-backdrop";
342
+ else if (el.querySelector("use")) sample.unmeasurable = "use-indirection";
343
+ const marks = Array.from(el.querySelectorAll("[data-mpo-chart-mark]"));
344
+ const certifiedMasks = /* @__PURE__ */ new Set();
345
+ if ((sample.kind === "pie" || sample.kind === "donut") && marks.length > 1) {
346
+ const round2 = (value) => Math.round(value * 1e3) / 1e3;
347
+ const pathTokens = (path) => JSON.stringify((path.replace(/^path\(["']?|["']?\)$/g, "").match(/[a-zA-Z]|[-+]?(?:\d*\.)?\d+(?:[eE][-+]?\d+)?/g) ?? []).map((token) => Number.isNaN(Number(token)) ? token : Number(token)));
348
+ const point = (radius, angle) => `${round2(radius * Math.cos(angle - Math.PI / 2))},${round2(radius * Math.sin(angle - Math.PI / 2))}`;
349
+ const proofs = marks.map((mark) => {
350
+ if (mark.tagName.toLowerCase() !== "path" || mark.getAttribute("data-mpo-chart-mask") !== "eroded-arc-v1") return;
351
+ const values = (mark.getAttribute("data-mpo-chart-slice") ?? "").split(",").map(Number);
352
+ if (values.length !== 4 || !values.every(Number.isFinite)) return;
353
+ const [start, end, inner, outer] = values;
354
+ const span = end - start;
355
+ if (start < 0 || end > Math.PI * 2 + 1e-9 || span <= 0 || span >= Math.PI * 2 || inner < 0 || outer <= inner) return;
356
+ const radius = (inner + outer) / 2;
357
+ const projection = Math.min(outer, Math.max(inner, radius * Math.cos(span / 2)));
358
+ const radialDistance = Math.sqrt(Math.max(0, radius ** 2 + projection ** 2 - 2 * radius * projection * Math.cos(span / 2)));
359
+ if (outer - radius <= 1.002 || radius - inner <= 1.002 || radialDistance <= 1.002) return;
360
+ const large = Number(span >= Math.PI);
361
+ const d = `M${point(outer, start)}A${round2(outer)},${round2(outer)},0,${large},1,${point(outer, end)}` + (inner ? `L${point(inner, end)}A${round2(inner)},${round2(inner)},0,${large},0,${point(inner, start)}Z` : "L0,0Z");
362
+ if (mark.getAttribute("d") !== d) return;
363
+ const markStyle = getComputedStyle(mark);
364
+ const paintedD = markStyle.getPropertyValue("d");
365
+ if (paintedD && pathTokens(paintedD) !== pathTokens(d)) return;
366
+ if (markStyle.stroke !== "none") return;
367
+ const reference = /^url\(["']?#([^"')]+)["']?\)$/.exec(mark.getAttribute("mask") ?? "");
368
+ if (!reference) return;
369
+ const matches = Array.from(document.querySelectorAll("[id]")).filter((node) => node.id === reference[1]);
370
+ const mask = matches[0];
371
+ if (matches.length !== 1 || mask.tagName.toLowerCase() !== "mask" || !el.contains(mask)) return;
372
+ const definitions = mask.parentElement;
373
+ if (definitions?.tagName.toLowerCase() !== "defs" || definitions.parentElement !== mark.parentElement) return;
374
+ const computedReference = /^url\(["']?([^"')]+)["']?\)$/.exec(markStyle.maskImage);
375
+ if (!computedReference || !["match-source", "luminance"].includes(markStyle.maskMode)) return;
376
+ try {
377
+ if (new URL(computedReference[1], document.baseURI).href !== new URL(`#${reference[1]}`, document.URL).href) return;
378
+ } catch {
379
+ return;
380
+ }
381
+ if (mask.getAttribute("maskUnits") !== "userSpaceOnUse" || mask.getAttribute("maskContentUnits") !== "userSpaceOnUse" || getComputedStyle(mask).getPropertyValue("mask-type") !== "luminance") return;
382
+ const bounds = {
383
+ x: -outer - 2,
384
+ y: -outer - 2,
385
+ width: (outer + 2) * 2,
386
+ height: (outer + 2) * 2
387
+ };
388
+ if (Object.entries(bounds).some(([name, value]) => Number(mask.getAttribute(name)) !== value)) return;
389
+ if (mask.children.length !== 1) return;
390
+ const boundary = mask.children[0];
391
+ if (boundary.tagName.toLowerCase() !== "path" || boundary.getAttribute("d") !== d) return;
392
+ for (const node of [
393
+ definitions,
394
+ mask,
395
+ boundary
396
+ ]) {
397
+ const style = getComputedStyle(node);
398
+ if (style.transform !== "none" || style.filter !== "none" || style.maskImage !== "none" || style.clipPath !== "none" || style.opacity !== "1" || style.visibility !== "visible" || style.display === "none") return;
399
+ if ([
400
+ style.markerStart,
401
+ style.markerMid,
402
+ style.markerEnd
403
+ ].some((value) => value && value !== "none")) return;
404
+ }
405
+ if (unsupportedCompositing(boundary)) return;
406
+ const boundaryStyle = getComputedStyle(boundary);
407
+ if (boundaryStyle.fill !== "rgb(255, 255, 255)" || boundaryStyle.stroke !== "rgb(0, 0, 0)" || boundaryStyle.fillOpacity !== "1" || boundaryStyle.strokeOpacity !== "1" || Number.parseFloat(boundaryStyle.strokeWidth) !== 2 || boundaryStyle.strokeLinejoin !== "round" || boundaryStyle.strokeLinecap !== "round" || boundaryStyle.paintOrder !== "normal" || boundaryStyle.vectorEffect !== "none" || boundaryStyle.strokeDasharray !== "none") return;
408
+ const boundaryD = boundaryStyle.getPropertyValue("d");
409
+ if (boundaryD && pathTokens(boundaryD) !== pathTokens(d)) return;
410
+ for (let node = mark; node; node = node.parentElement) {
411
+ const style = getComputedStyle(node);
412
+ if (style.transform.startsWith("matrix3d") || style.perspective && style.perspective !== "none") return;
413
+ }
414
+ const ctm = mark.getScreenCTM();
415
+ if (!ctm) return;
416
+ const matrix = [
417
+ ctm.a,
418
+ ctm.b,
419
+ ctm.c,
420
+ ctm.d,
421
+ ctm.e,
422
+ ctm.f
423
+ ];
424
+ const firstScale = Math.hypot(ctm.a + ctm.d, ctm.b - ctm.c);
425
+ const secondScale = Math.hypot(ctm.a - ctm.d, ctm.b + ctm.c);
426
+ const smallest = Math.abs(firstScale - secondScale) / 2;
427
+ if (!matrix.every(Number.isFinite) || !Number.isFinite(smallest) || smallest <= 0) return;
428
+ const measuredGap = 2 * smallest * window.devicePixelRatio;
429
+ const gap = Math.abs(measuredGap - 2) <= 8 * Number.EPSILON ? 2 : measuredGap;
430
+ return {
431
+ mark,
432
+ start,
433
+ end,
434
+ inner,
435
+ outer,
436
+ matrix,
437
+ gap
438
+ };
439
+ });
440
+ const first = proofs[0];
441
+ if (first && Math.abs(first.start) < 1e-9 && proofs.every((proof, index) => proof && proof.inner === first.inner && proof.outer === first.outer && proof.matrix.every((value, axis) => value === first.matrix[axis]) && Math.abs(proof.start - (index ? proofs[index - 1].end : 0)) < 1e-9) && Math.abs(proofs[proofs.length - 1].end - Math.PI * 2) < 1e-9) {
442
+ for (const proof of proofs) certifiedMasks.add(proof.mark);
443
+ sample.separation.method = "eroded-arc";
444
+ sample.separation.minimumGapPx = first.gap;
445
+ }
446
+ }
447
+ function paintSample(shape, paintKey, label) {
448
+ const item = {
449
+ key: paintKey,
450
+ label,
451
+ background: backdrop.hex
452
+ };
453
+ if (shape.closest("defs, clipPath, mask, pattern, marker, symbol")) return {
454
+ ...item,
455
+ unmeasurable: "no-paint"
456
+ };
457
+ if (!visible(shape)) return {
458
+ ...item,
459
+ unmeasurable: "no-paint"
460
+ };
461
+ if (!backdrop.resolved) return {
462
+ ...item,
463
+ unmeasurable: "unresolved-backdrop"
464
+ };
465
+ for (let node = shape; node; node = node.parentElement) {
466
+ const style2 = getComputedStyle(node);
467
+ if (style2.filter && style2.filter !== "none" || style2.maskImage && style2.maskImage !== "none" && !(node === shape && certifiedMasks.has(shape))) return {
468
+ ...item,
469
+ unmeasurable: "masked-or-filtered"
470
+ };
471
+ if (style2.clipPath && style2.clipPath !== "none") return {
472
+ ...item,
473
+ unmeasurable: "unsupported-paint"
474
+ };
475
+ }
476
+ if (unsupportedCompositing(shape)) return {
477
+ ...item,
478
+ unmeasurable: "unsupported-compositing"
479
+ };
480
+ const style = getComputedStyle(shape);
481
+ if ([
482
+ style.markerStart,
483
+ style.markerMid,
484
+ style.markerEnd
485
+ ].some((value) => value && value !== "none")) return {
486
+ ...item,
487
+ unmeasurable: "unsupported-paint"
488
+ };
489
+ let bounds;
490
+ try {
491
+ bounds = shape.getBBox();
492
+ } catch {
493
+ return {
494
+ ...item,
495
+ unmeasurable: "unsupported-paint"
496
+ };
497
+ }
498
+ const background = [
499
+ Number.parseInt(backdrop.hex.slice(1, 3), 16),
500
+ Number.parseInt(backdrop.hex.slice(3, 5), 16),
501
+ Number.parseInt(backdrop.hex.slice(5, 7), 16)
502
+ ];
503
+ const paints = /* @__PURE__ */ new Set();
504
+ for (const kind of ["fill", "stroke"]) {
505
+ if (kind === "fill" && (shape.tagName.toLowerCase() === "line" || bounds.width === 0 || bounds.height === 0)) continue;
506
+ if (kind === "stroke" && !(Number.parseFloat(style.strokeWidth) > 0)) continue;
507
+ const raw = style[kind].trim().toLowerCase();
508
+ if (raw === "none") continue;
509
+ const ink = parseCssColor(raw === "currentcolor" ? style.color : raw);
510
+ if (!ink) return {
511
+ ...item,
512
+ unmeasurable: "unsupported-paint"
513
+ };
514
+ const alphaRaw = kind === "fill" ? style.fillOpacity : style.strokeOpacity;
515
+ const alpha = Number.parseFloat(alphaRaw) / (alphaRaw.endsWith("%") ? 100 : 1);
516
+ ink[3] *= (Number.isFinite(alpha) ? alpha : 1) * effectiveOpacity(shape);
517
+ if (ink[3] > 0) paints.add(toHex(blend(ink, background)));
518
+ }
519
+ if (paints.size !== 1) return {
520
+ ...item,
521
+ unmeasurable: paints.size ? "multicolor" : "no-paint"
522
+ };
523
+ return {
524
+ ...item,
525
+ paint: Array.from(paints)[0]
526
+ };
527
+ }
528
+ for (const [index, mark] of marks.entries()) {
529
+ const tag = mark.tagName.toLowerCase();
530
+ const item = ![
531
+ "path",
532
+ "rect",
533
+ "circle",
534
+ "ellipse",
535
+ "line",
536
+ "polyline",
537
+ "polygon"
538
+ ].includes(tag) ? {
539
+ key: `${key}/mark:${index}`,
540
+ label: mark.getAttribute("data-mpo-chart-mark") ?? "",
541
+ background: backdrop.hex,
542
+ unmeasurable: "unsupported-paint"
543
+ } : paintSample(mark, `${key}/mark:${index}`, mark.getAttribute("data-mpo-chart-mark") || `mark ${index + 1}`);
544
+ sample.marks.push(item);
545
+ }
546
+ for (const [index, node] of Array.from(el.querySelectorAll("text, tspan")).entries()) {
547
+ const text = Array.from(node.childNodes).filter((child) => child.nodeType === 3).map((child) => child.textContent ?? "").join("").trim();
548
+ if (text) sample.labels.push(paintSample(node, `${key}/label:${index}`, text));
549
+ }
550
+ for (const [index, drawable] of Array.from(el.querySelectorAll("path, rect, circle, ellipse, line, polyline, polygon, image, foreignObject, use")).entries()) {
551
+ if (drawable.hasAttribute("data-mpo-chart-mark")) continue;
552
+ const tag = drawable.tagName.toLowerCase();
553
+ const item = paintSample(drawable, `${key}/drawable:${index}`, `unaccounted ${tag}`);
554
+ if (item.unmeasurable === "no-paint") continue;
555
+ const chrome = drawable.getAttribute("data-mpo-chart-chrome");
556
+ const style = getComputedStyle(drawable);
557
+ const rect = drawable.getBoundingClientRect();
558
+ const ctm = drawable.getScreenCTM?.();
559
+ const squareSum = ctm ? ctm.a ** 2 + ctm.b ** 2 + ctm.c ** 2 + ctm.d ** 2 : NaN;
560
+ const determinant = ctm ? ctm.a * ctm.d - ctm.b * ctm.c : NaN;
561
+ const largestScale = Math.sqrt((squareSum + Math.sqrt(Math.max(0, squareSum ** 2 - 4 * determinant ** 2))) / 2);
562
+ const screenStrokeWidth = Number.parseFloat(style.strokeWidth) * largestScale;
563
+ const thinAxisLine = (chrome === "axis" || chrome === "grid") && tag === "line" && (rect.width === 0 || rect.height === 0) && Number.isFinite(screenStrokeWidth) && screenStrokeWidth <= 1 && screenStrokeWidth > 0 && !item.unmeasurable;
564
+ if (thinAxisLine) sample.chrome.push({
565
+ ...item,
566
+ label: `${chrome} line`
567
+ });
568
+ else sample.unaccountedPaint.push({
569
+ ...item,
570
+ unmeasurable: "unsupported-paint"
571
+ });
572
+ }
573
+ if (sample.kind === "bar" && marks.length > 0 && marks.every((mark, index) => (mark.tagName.toLowerCase() === "rect" || mark.tagName.toLowerCase() === "path" && mark.hasAttribute("data-mpo-chart-bar")) && getComputedStyle(mark).stroke === "none" && !sample.marks[index].unmeasurable)) {
574
+ let minimumGapPx = Infinity;
575
+ const bounds = marks.map((mark) => mark.getBoundingClientRect());
576
+ for (let i = 0; i < bounds.length; i++) for (let j = i + 1; j < bounds.length; j++) {
577
+ const a = bounds[i];
578
+ const b = bounds[j];
579
+ const dx = Math.max(0, a.left - b.right, b.left - a.right);
580
+ const dy = Math.max(0, a.top - b.bottom, b.top - a.bottom);
581
+ minimumGapPx = Math.min(minimumGapPx, Math.hypot(dx, dy) * window.devicePixelRatio);
582
+ }
583
+ sample.separation.method = "rect-bounds";
584
+ sample.separation.minimumGapPx = Number.isFinite(minimumGapPx) ? minimumGapPx : 2;
585
+ }
586
+ if (sample.kind === "area") sample.unmeasurable ??= "unsupported-overlap";
587
+ }
588
+ function collectText(el, key, cs) {
589
+ const directText = [];
590
+ for (const child of Array.from(el.childNodes)) {
591
+ if (child.nodeType === 3 && (child.textContent ?? "").trim().length > 0) {
592
+ directText.push(child);
593
+ }
594
+ }
595
+ if (directText.length === 0) return void 0;
596
+ const range = document.createRange();
597
+ range.setStartBefore(directText[0]);
598
+ range.setEndAfter(directText[directText.length - 1]);
599
+ const textRect = range.getBoundingClientRect();
600
+ if (!(textRect.width > 0 && textRect.height > 0)) return void 0;
601
+ const opacity = effectiveOpacity(el);
602
+ if (opacity > .05 && cs.visibility !== "hidden") {
603
+ const ink = parseCssColor(cs.color);
604
+ const backdrop = effectiveBackground(el);
605
+ if (ink) {
606
+ const baseParsed = parseCssColor(backdrop.hex) ?? [
607
+ 255,
608
+ 255,
609
+ 255,
610
+ 1
611
+ ];
612
+ const inkOpaque = toHex(ink[3] >= .999 ? [
613
+ ink[0],
614
+ ink[1],
615
+ ink[2]
616
+ ] : blend(ink, [
617
+ baseParsed[0],
618
+ baseParsed[1],
619
+ baseParsed[2]
620
+ ]));
621
+ textSamples.push({
622
+ key,
623
+ text: (directText[0].textContent ?? "").trim().slice(0, 60),
624
+ color: inkOpaque,
625
+ background: backdrop.hex,
626
+ backgroundResolved: backdrop.resolved,
627
+ overImage: backdrop.overImage,
628
+ fontSizePx: Number.parseFloat(cs.fontSize) || 0,
629
+ fontWeightNum: Number.parseFloat(cs.fontWeight) || 400,
630
+ rect: toRect(textRect)
631
+ });
632
+ }
633
+ }
634
+ return toRect(textRect);
635
+ }
636
+ function boxedChildren(el, path) {
637
+ const out = [];
638
+ const counts = {};
639
+ for (const child of Array.from(el.children)) {
640
+ const tag = child.tagName.toLowerCase();
641
+ if (SKIP_TAGS.has(tag)) continue;
642
+ if (child.namespaceURI === "http://www.w3.org/2000/svg" && tag !== "svg") continue;
643
+ const cs = getComputedStyle(child);
644
+ if (cs.display === "none") continue;
645
+ if (cs.display === "contents") {
646
+ const index = counts[tag] ?? 0;
647
+ counts[tag] = index + 1;
648
+ collectText(child, `${path}/${tag}:${index}~contents`, cs);
649
+ for (const grandchild of boxedChildren(child, path)) out.push(grandchild);
650
+ continue;
651
+ }
652
+ out.push(child);
653
+ }
654
+ return out;
655
+ }
656
+ function visit(el, path) {
657
+ const tag = el.tagName.toLowerCase();
658
+ const cs = getComputedStyle(el);
659
+ const rect = el.getBoundingClientRect();
660
+ const props = {};
661
+ for (const prop of GEOMETRY_PROPS) {
662
+ props[prop] = cs[prop];
663
+ }
664
+ const entry = {
665
+ key: path,
666
+ tag,
667
+ rect: toRect(rect),
668
+ props
669
+ };
670
+ const textRect = collectText(el, path, cs);
671
+ if (textRect) entry.textRect = textRect;
672
+ if (tag === "svg" && !el.parentElement?.closest("svg")) {
673
+ capturedSvgRoots.add(el);
674
+ if (el.hasAttribute("data-mpo-chart")) collectChart(el, path);
675
+ else collectIcon(el, path, cs);
676
+ }
677
+ geometry.push(entry);
678
+ const counts = {};
679
+ for (const child of boxedChildren(el, path)) {
680
+ const childTag = child.tagName.toLowerCase();
681
+ const index = counts[childTag] ?? 0;
682
+ counts[childTag] = index + 1;
683
+ visit(child, `${path}/${childTag}:${index}`);
684
+ }
685
+ }
686
+ if (root) {
687
+ const counts = {};
688
+ for (const child of boxedChildren(root, "")) {
689
+ const childTag = child.tagName.toLowerCase();
690
+ const index = counts[childTag] ?? 0;
691
+ counts[childTag] = index + 1;
692
+ visit(child, `${childTag}:${index}`);
693
+ }
694
+ const svgRoots = Array.from(root.querySelectorAll("svg")).filter((svg) => !svg.parentElement?.closest("svg"));
695
+ svgRootCount = svgRoots.length;
696
+ for (const [index, svg] of svgRoots.entries()) {
697
+ if (capturedSvgRoots.has(svg)) continue;
698
+ const key = `unpainted-svg:${index}`;
699
+ if (svg.hasAttribute("data-mpo-chart")) collectChart(svg, key);
700
+ else collectIcon(svg, key, getComputedStyle(svg));
701
+ }
702
+ }
703
+ return {
704
+ storyRendered,
705
+ geometry,
706
+ textSamples,
707
+ iconSamples,
708
+ chartSamples,
709
+ svgRootCount
710
+ };
609
711
  }
610
712
  function diffGeometry(before, after, options = {}) {
611
- const epsilon = options.epsilonPx ?? 0;
612
- const byKey = new Map(before.geometry.map(g => [g.key, g]));
613
- const seen = /* @__PURE__ */new Set();
614
- const moves = [];
615
- const addedKeys = [];
616
- const rectDiffers = (a, b) => Math.abs(a.x - b.x) > epsilon || Math.abs(a.y - b.y) > epsilon || Math.abs(a.w - b.w) > epsilon || Math.abs(a.h - b.h) > epsilon;
617
- const formatRect = r => `${r.x},${r.y} ${r.w}x${r.h}`;
618
- for (const curr of after.geometry) {
619
- const prev = byKey.get(curr.key);
620
- if (!prev) {
621
- addedKeys.push(curr.key);
622
- continue;
623
- }
624
- seen.add(curr.key);
625
- if (rectDiffers(prev.rect, curr.rect)) {
626
- moves.push({
627
- key: curr.key,
628
- property: "rect",
629
- before: formatRect(prev.rect),
630
- after: formatRect(curr.rect)
631
- });
632
- }
633
- if (prev.textRect && curr.textRect && rectDiffers(prev.textRect, curr.textRect)) {
634
- moves.push({
635
- key: curr.key,
636
- property: "textRect",
637
- before: formatRect(prev.textRect),
638
- after: formatRect(curr.textRect)
639
- });
640
- } else if (!!prev.textRect !== !!curr.textRect) {
641
- moves.push({
642
- key: curr.key,
643
- property: "textRect",
644
- before: prev.textRect ? formatRect(prev.textRect) : "(none)",
645
- after: curr.textRect ? formatRect(curr.textRect) : "(none)"
646
- });
647
- }
648
- for (const prop of Object.keys(prev.props)) {
649
- if (prev.props[prop] !== curr.props[prop]) {
650
- moves.push({
651
- key: curr.key,
652
- property: prop,
653
- before: prev.props[prop],
654
- after: curr.props[prop] ?? "(missing)"
655
- });
656
- }
657
- }
658
- }
659
- const removedKeys = before.geometry.filter(g => !seen.has(g.key)).map(g => g.key);
660
- return {
661
- identical: moves.length === 0 && addedKeys.length === 0 && removedKeys.length === 0,
662
- removedKeys,
663
- addedKeys,
664
- moves
665
- };
713
+ const epsilon = options.epsilonPx ?? 0;
714
+ const byKey = new Map(before.geometry.map((g) => [g.key, g]));
715
+ const seen = /* @__PURE__ */ new Set();
716
+ const moves = [];
717
+ const addedKeys = [];
718
+ const rectDiffers = (a, b) => Math.abs(a.x - b.x) > epsilon || Math.abs(a.y - b.y) > epsilon || Math.abs(a.w - b.w) > epsilon || Math.abs(a.h - b.h) > epsilon;
719
+ const formatRect = (r) => `${r.x},${r.y} ${r.w}x${r.h}`;
720
+ for (const curr of after.geometry) {
721
+ const prev = byKey.get(curr.key);
722
+ if (!prev) {
723
+ addedKeys.push(curr.key);
724
+ continue;
725
+ }
726
+ seen.add(curr.key);
727
+ if (rectDiffers(prev.rect, curr.rect)) {
728
+ moves.push({
729
+ key: curr.key,
730
+ property: "rect",
731
+ before: formatRect(prev.rect),
732
+ after: formatRect(curr.rect)
733
+ });
734
+ }
735
+ if (prev.textRect && curr.textRect && rectDiffers(prev.textRect, curr.textRect)) {
736
+ moves.push({
737
+ key: curr.key,
738
+ property: "textRect",
739
+ before: formatRect(prev.textRect),
740
+ after: formatRect(curr.textRect)
741
+ });
742
+ } else if (!!prev.textRect !== !!curr.textRect) {
743
+ moves.push({
744
+ key: curr.key,
745
+ property: "textRect",
746
+ before: prev.textRect ? formatRect(prev.textRect) : "(none)",
747
+ after: curr.textRect ? formatRect(curr.textRect) : "(none)"
748
+ });
749
+ }
750
+ for (const prop of Object.keys(prev.props)) {
751
+ if (prev.props[prop] !== curr.props[prop]) {
752
+ moves.push({
753
+ key: curr.key,
754
+ property: prop,
755
+ before: prev.props[prop],
756
+ after: curr.props[prop] ?? "(missing)"
757
+ });
758
+ }
759
+ }
760
+ }
761
+ const removedKeys = before.geometry.filter((g) => !seen.has(g.key)).map((g) => g.key);
762
+ return {
763
+ identical: moves.length === 0 && addedKeys.length === 0 && removedKeys.length === 0,
764
+ removedKeys,
765
+ addedKeys,
766
+ moves
767
+ };
666
768
  }
667
769
  function evaluateTextContrast(samples) {
668
- let measured = 0;
669
- let unmeasurable = 0;
670
- const violations = [];
671
- for (const sample of samples) {
672
- if (!sample.backgroundResolved) {
673
- unmeasurable++;
674
- continue;
675
- }
676
- const large = sample.fontSizePx >= 24 || sample.fontSizePx >= 18.66 && sample.fontWeightNum >= 700;
677
- const required = large ? import_colorRules.minContrastRatio : import_colorRules.aaTextContrastRatio;
678
- try {
679
- const report = (0, import_colorRules.measureContrast)({
680
- foreground: sample.color,
681
- background: sample.background,
682
- floor: required,
683
- label: sample.key
684
- });
685
- measured++;
686
- if (!report.pass) {
687
- violations.push({
688
- key: sample.key,
689
- text: sample.text,
690
- color: report.foreground,
691
- background: report.background,
692
- ratio: report.ratio,
693
- required: report.floor
694
- });
695
- }
696
- } catch {
697
- unmeasurable++;
698
- }
699
- }
700
- return {
701
- measured,
702
- unmeasurable,
703
- violations
704
- };
770
+ let measured = 0;
771
+ let unmeasurable = 0;
772
+ const violations = [];
773
+ for (const sample of samples) {
774
+ if (!sample.backgroundResolved) {
775
+ unmeasurable++;
776
+ continue;
777
+ }
778
+ const large = sample.fontSizePx >= 24 || sample.fontSizePx >= 18.66 && sample.fontWeightNum >= 700;
779
+ const required = large ? import_colorRules.minContrastRatio : import_colorRules.aaTextContrastRatio;
780
+ try {
781
+ const report = (0, import_colorRules.measureContrast)({
782
+ foreground: sample.color,
783
+ background: sample.background,
784
+ floor: required,
785
+ label: sample.key
786
+ });
787
+ measured++;
788
+ if (!report.pass) {
789
+ violations.push({
790
+ key: sample.key,
791
+ text: sample.text,
792
+ color: report.foreground,
793
+ background: report.background,
794
+ ratio: report.ratio,
795
+ required: report.floor
796
+ });
797
+ }
798
+ } catch {
799
+ unmeasurable++;
800
+ }
801
+ }
802
+ return {
803
+ measured,
804
+ unmeasurable,
805
+ violations
806
+ };
705
807
  }
706
808
  function evaluateIconContrast(samples) {
707
- const result = {
708
- ok: true,
709
- candidates: 0,
710
- measured: 0,
711
- violations: [],
712
- unverified: [],
713
- excludedDisabled: 0,
714
- excludedDecorative: 0,
715
- excludedHidden: 0
716
- };
717
- for (const sample of samples) {
718
- if (sample.status === "disabled-control") {
719
- result.excludedDisabled++;
720
- continue;
721
- }
722
- if (sample.status === "decorative-standalone") {
723
- result.excludedDecorative++;
724
- continue;
725
- }
726
- if (sample.status === "hidden") {
727
- result.excludedHidden++;
728
- continue;
729
- }
730
- result.candidates++;
731
- const reason = sample.unmeasurable ?? (!sample.backgroundResolved ? "unresolved-backdrop" : !sample.paint ? "no-paint" : void 0);
732
- if (reason) {
733
- result.unverified.push({
734
- key: sample.key,
735
- context: sample.context,
736
- reason
737
- });
738
- continue;
739
- }
740
- try {
741
- const contrast = (0, import_colorRules.measureContrast)({
742
- foreground: sample.paint,
743
- background: sample.background,
744
- floor: import_colorRules.minContrastRatio,
745
- label: sample.key
746
- });
747
- result.measured++;
748
- if (!contrast.pass) result.violations.push({
749
- key: sample.key,
750
- context: sample.context,
751
- paint: contrast.foreground,
752
- background: contrast.background,
753
- ratio: contrast.ratio,
754
- required: contrast.floor
755
- });
756
- } catch {
757
- result.unverified.push({
758
- key: sample.key,
759
- context: sample.context,
760
- reason: "unsupported-paint"
761
- });
762
- }
763
- }
764
- result.ok = result.violations.length === 0 && result.unverified.length === 0;
765
- return result;
809
+ const result = {
810
+ ok: true,
811
+ candidates: 0,
812
+ measured: 0,
813
+ violations: [],
814
+ unverified: [],
815
+ excludedDisabled: 0,
816
+ excludedDecorative: 0,
817
+ excludedHidden: 0
818
+ };
819
+ for (const sample of samples) {
820
+ if (sample.status === "disabled-control") {
821
+ result.excludedDisabled++;
822
+ continue;
823
+ }
824
+ if (sample.status === "decorative-standalone") {
825
+ result.excludedDecorative++;
826
+ continue;
827
+ }
828
+ if (sample.status === "hidden") {
829
+ result.excludedHidden++;
830
+ continue;
831
+ }
832
+ result.candidates++;
833
+ const reason = sample.unmeasurable ?? (!sample.backgroundResolved ? "unresolved-backdrop" : !sample.paint ? "no-paint" : void 0);
834
+ if (reason) {
835
+ result.unverified.push({
836
+ key: sample.key,
837
+ context: sample.context,
838
+ reason
839
+ });
840
+ continue;
841
+ }
842
+ try {
843
+ const contrast = (0, import_colorRules.measureContrast)({
844
+ foreground: sample.paint,
845
+ background: sample.background,
846
+ floor: import_colorRules.minContrastRatio,
847
+ label: sample.key
848
+ });
849
+ result.measured++;
850
+ if (!contrast.pass) result.violations.push({
851
+ key: sample.key,
852
+ context: sample.context,
853
+ paint: contrast.foreground,
854
+ background: contrast.background,
855
+ ratio: contrast.ratio,
856
+ required: contrast.floor
857
+ });
858
+ } catch {
859
+ result.unverified.push({
860
+ key: sample.key,
861
+ context: sample.context,
862
+ reason: "unsupported-paint"
863
+ });
864
+ }
865
+ }
866
+ result.ok = result.violations.length === 0 && result.unverified.length === 0;
867
+ return result;
766
868
  }
767
869
  function iconContrastSignatures(result) {
768
- return [...result.violations.map(item => `${item.key} (${item.context}) icon ${item.paint} on ${item.background} = ${item.ratio}:1 (floor ${item.required})`), ...result.unverified.map(item => `${item.key} (${item.context}) icon UNVERIFIED: ${item.reason}`)];
870
+ return [...result.violations.map((item) => `${item.key} (${item.context}) icon ${item.paint} on ${item.background} = ${item.ratio}:1 (floor ${item.required})`), ...result.unverified.map((item) => `${item.key} (${item.context}) icon UNVERIFIED: ${item.reason}`)];
769
871
  }
770
872
  function evaluateChartProof(samples) {
771
- const result = {
772
- ok: true,
773
- candidates: samples.length,
774
- measured: 0,
775
- marksMeasured: 0,
776
- labelsMeasured: 0,
777
- byKind: /* @__PURE__ */Object.create(null),
778
- violations: [],
779
- unverified: []
780
- };
781
- for (const sample of samples) {
782
- result.byKind[sample.kind] = (result.byKind[sample.kind] ?? 0) + 1;
783
- const unverified = (reason, key = sample.key, context = sample.context) => result.unverified.push({
784
- key,
785
- context,
786
- reason
787
- });
788
- if (!["bar", "pie", "donut", "line", "area"].includes(sample.kind)) {
789
- unverified("unknown-kind");
790
- continue;
791
- }
792
- if (!sample.label.trim()) result.violations.push({
793
- key: sample.key,
794
- context: sample.context,
795
- rule: "missing-label"
796
- });
797
- if (sample.unmeasurable) unverified(sample.unmeasurable);else if (!sample.backgroundResolved) unverified("unresolved-backdrop");
798
- if (!sample.marks.length) unverified("no-marks");
799
- for (const item of sample.unaccountedPaint ?? []) unverified("unsupported-paint", item.key, `${sample.context}: ${item.label}`);
800
- if (!sample.datumText.declared || !sample.datumText.complete || sample.datumText.expected <= 0 || sample.datumText.observed !== sample.datumText.expected) unverified("incomplete-datum-text", sample.key, sample.datumText.failure ? `${sample.context}: ${sample.datumText.failure}` : sample.context);
801
- const compare = (paint, background, key, context, rule, floor) => {
802
- try {
803
- const measured = (0, import_colorRules.measureContrast)({
804
- foreground: paint,
805
- background,
806
- floor,
807
- label: key
808
- });
809
- if (!measured.pass) result.violations.push({
810
- key,
811
- context,
812
- rule,
813
- paint: measured.foreground,
814
- background: measured.background,
815
- ratio: measured.ratio,
816
- required: measured.floor
817
- });
818
- return true;
819
- } catch {
820
- unverified("unsupported-paint", key, context);
821
- return false;
822
- }
823
- };
824
- for (const mark of sample.marks) {
825
- const context = `${sample.context}: ${mark.label}`;
826
- if (mark.unmeasurable || !mark.paint) unverified(mark.unmeasurable ?? "no-paint", mark.key, context);else if (compare(mark.paint, mark.background, mark.key, context, "mark-backdrop", import_colorRules.minContrastRatio)) result.marksMeasured++;
827
- }
828
- for (const label of sample.labels) {
829
- const context = `${sample.context}: ${label.label}`;
830
- if (label.unmeasurable || !label.paint) unverified(label.unmeasurable ?? "no-paint", label.key, context);else if (compare(label.paint, label.background, label.key, context, "axis-text", import_colorRules.aaTextContrastRatio)) result.labelsMeasured++;
831
- }
832
- const separated = (sample.kind === "bar" && sample.separation.method === "rect-bounds" || (sample.kind === "pie" || sample.kind === "donut") && sample.separation.method === "eroded-arc") && Number.isFinite(sample.separation.minimumGapPx) && sample.separation.minimumGapPx >= 2;
833
- if (sample.kind === "bar" && !separated) unverified("unverified-separation");
834
- if (sample.kind === "pie" || sample.kind === "donut") {
835
- if (sample.separation.declared && !separated) unverified("unverified-separation");
836
- if (sample.marks.length > 1 && !separated) {
837
- for (let i = 0; i < sample.marks.length; i++) {
838
- const first = sample.marks[i];
839
- const second = sample.marks[(i + 1) % sample.marks.length];
840
- if (sample.marks.length === 2 && i === 1) continue;
841
- if (first.paint && second.paint && !first.unmeasurable && !second.unmeasurable) compare(first.paint, second.paint, `${first.key}~${second.key}`, `${sample.context}: ${first.label} / ${second.label}`, "adjacent-pair", import_colorRules.minContrastRatio);
842
- }
843
- }
844
- }
845
- if (!sample.unmeasurable && sample.backgroundResolved && sample.marks.length > 0 && sample.marks.every(mark => mark.paint && !mark.unmeasurable)) result.measured++;
846
- }
847
- result.ok = result.violations.length === 0 && result.unverified.length === 0;
848
- return result;
873
+ const result = {
874
+ ok: true,
875
+ candidates: samples.length,
876
+ measured: 0,
877
+ marksMeasured: 0,
878
+ labelsMeasured: 0,
879
+ byKind: /* @__PURE__ */ Object.create(null),
880
+ violations: [],
881
+ unverified: []
882
+ };
883
+ for (const sample of samples) {
884
+ result.byKind[sample.kind] = (result.byKind[sample.kind] ?? 0) + 1;
885
+ const unverified = (reason, key = sample.key, context = sample.context) => result.unverified.push({
886
+ key,
887
+ context,
888
+ reason
889
+ });
890
+ if (![
891
+ "bar",
892
+ "pie",
893
+ "donut",
894
+ "line",
895
+ "area"
896
+ ].includes(sample.kind)) {
897
+ unverified("unknown-kind");
898
+ continue;
899
+ }
900
+ if (!sample.label.trim()) result.violations.push({
901
+ key: sample.key,
902
+ context: sample.context,
903
+ rule: "missing-label"
904
+ });
905
+ if (sample.unmeasurable) unverified(sample.unmeasurable);
906
+ else if (!sample.backgroundResolved) unverified("unresolved-backdrop");
907
+ if (!sample.marks.length) unverified("no-marks");
908
+ for (const item of sample.unaccountedPaint ?? []) unverified("unsupported-paint", item.key, `${sample.context}: ${item.label}`);
909
+ if (!sample.datumText.declared || !sample.datumText.complete || sample.datumText.expected <= 0 || sample.datumText.observed !== sample.datumText.expected) unverified("incomplete-datum-text", sample.key, sample.datumText.failure ? `${sample.context}: ${sample.datumText.failure}` : sample.context);
910
+ const compare = (paint, background, key, context, rule, floor) => {
911
+ try {
912
+ const measured = (0, import_colorRules.measureContrast)({
913
+ foreground: paint,
914
+ background,
915
+ floor,
916
+ label: key
917
+ });
918
+ if (!measured.pass) result.violations.push({
919
+ key,
920
+ context,
921
+ rule,
922
+ paint: measured.foreground,
923
+ background: measured.background,
924
+ ratio: measured.ratio,
925
+ required: measured.floor
926
+ });
927
+ return true;
928
+ } catch {
929
+ unverified("unsupported-paint", key, context);
930
+ return false;
931
+ }
932
+ };
933
+ for (const mark of sample.marks) {
934
+ const context = `${sample.context}: ${mark.label}`;
935
+ if (mark.unmeasurable || !mark.paint) unverified(mark.unmeasurable ?? "no-paint", mark.key, context);
936
+ else if (compare(mark.paint, mark.background, mark.key, context, "mark-backdrop", import_colorRules.minContrastRatio)) result.marksMeasured++;
937
+ }
938
+ for (const label of sample.labels) {
939
+ const context = `${sample.context}: ${label.label}`;
940
+ if (label.unmeasurable || !label.paint) unverified(label.unmeasurable ?? "no-paint", label.key, context);
941
+ else if (compare(label.paint, label.background, label.key, context, "axis-text", import_colorRules.aaTextContrastRatio)) result.labelsMeasured++;
942
+ }
943
+ const separated = (sample.kind === "bar" && sample.separation.method === "rect-bounds" || (sample.kind === "pie" || sample.kind === "donut") && sample.separation.method === "eroded-arc") && Number.isFinite(sample.separation.minimumGapPx) && sample.separation.minimumGapPx >= 2;
944
+ if (sample.kind === "bar" && !separated) unverified("unverified-separation");
945
+ if (sample.kind === "pie" || sample.kind === "donut") {
946
+ if (sample.separation.declared && !separated) unverified("unverified-separation");
947
+ if (sample.marks.length > 1 && !separated) {
948
+ for (let i = 0; i < sample.marks.length; i++) {
949
+ const first = sample.marks[i];
950
+ const second = sample.marks[(i + 1) % sample.marks.length];
951
+ if (sample.marks.length === 2 && i === 1) continue;
952
+ if (first.paint && second.paint && !first.unmeasurable && !second.unmeasurable) compare(first.paint, second.paint, `${first.key}~${second.key}`, `${sample.context}: ${first.label} / ${second.label}`, "adjacent-pair", import_colorRules.minContrastRatio);
953
+ }
954
+ }
955
+ }
956
+ if (!sample.unmeasurable && sample.backgroundResolved && sample.marks.length > 0 && sample.marks.every((mark) => mark.paint && !mark.unmeasurable)) result.measured++;
957
+ }
958
+ result.ok = result.violations.length === 0 && result.unverified.length === 0;
959
+ return result;
849
960
  }
850
961
  function chartProofSignatures(result) {
851
- return [...result.violations.map(item => `${item.key} (${item.context}) chart ${item.rule}${item.ratio === void 0 ? "" : ` ${item.paint} on ${item.background} = ${item.ratio}:1 (floor ${item.required})`}`), ...result.unverified.map(item => `${item.key} (${item.context}) chart UNVERIFIED: ${item.reason}`)];
962
+ return [...result.violations.map((item) => `${item.key} (${item.context}) chart ${item.rule}${item.ratio === void 0 ? "" : ` ${item.paint} on ${item.background} = ${item.ratio}:1 (floor ${item.required})`}`), ...result.unverified.map((item) => `${item.key} (${item.context}) chart UNVERIFIED: ${item.reason}`)];
852
963
  }
853
964
  function auditSignatures(violations) {
854
- const out = [];
855
- for (const element of violations) {
856
- for (const violation of element.violations) out.push(`${element.key ? `[${element.key}] ` : ""}${element.label} :: ${violation}`);
857
- }
858
- return out;
965
+ const out = [];
966
+ for (const element of violations) {
967
+ for (const violation of element.violations) out.push(`${element.key ? `[${element.key}] ` : ""}${element.label} :: ${violation}`);
968
+ }
969
+ return out;
859
970
  }
860
971
  function newEntries(before, after) {
861
- const remaining = /* @__PURE__ */new Map();
862
- for (const entry of before) remaining.set(entry, (remaining.get(entry) ?? 0) + 1);
863
- const added = [];
864
- for (const entry of after) {
865
- const count = remaining.get(entry) ?? 0;
866
- if (count > 0) remaining.set(entry, count - 1);else added.push(entry);
867
- }
868
- return added;
972
+ const remaining = /* @__PURE__ */ new Map();
973
+ for (const entry of before) remaining.set(entry, (remaining.get(entry) ?? 0) + 1);
974
+ const added = [];
975
+ for (const entry of after) {
976
+ const count = remaining.get(entry) ?? 0;
977
+ if (count > 0) remaining.set(entry, count - 1);
978
+ else added.push(entry);
979
+ }
980
+ return added;
869
981
  }
870
982
  function offScaleIdentity(signature) {
871
- return signature.replace(/-?\d+(?:\.\d+)?px/g, "#px").replace(/(inlineColor: \w+=)"[^"]*"/g, '$1"#colour"').replace(/\.font_[\w-]+/g, ".font_#family");
983
+ return signature.replace(/-?\d+(?:\.\d+)?px/g, "#px").replace(/(inlineColor: \w+=)"[^"]*"/g, "$1\"#colour\"").replace(/\.font_[\w-]+/g, ".font_#family");
872
984
  }
873
985
  function newOffScaleEntries(before, after) {
874
- const added = newEntries(before.map(offScaleIdentity), after.map(offScaleIdentity));
875
- const pending = /* @__PURE__ */new Map();
876
- for (const identity of added) pending.set(identity, (pending.get(identity) ?? 0) + 1);
877
- const named = [];
878
- for (const signature of after) {
879
- const identity = offScaleIdentity(signature);
880
- const count = pending.get(identity) ?? 0;
881
- if (count === 0) continue;
882
- pending.set(identity, count - 1);
883
- named.push(signature);
884
- }
885
- return named;
986
+ const added = newEntries(before.map(offScaleIdentity), after.map(offScaleIdentity));
987
+ const pending = /* @__PURE__ */ new Map();
988
+ for (const identity of added) pending.set(identity, (pending.get(identity) ?? 0) + 1);
989
+ const named = [];
990
+ for (const signature of after) {
991
+ const identity = offScaleIdentity(signature);
992
+ const count = pending.get(identity) ?? 0;
993
+ if (count === 0) continue;
994
+ pending.set(identity, count - 1);
995
+ named.push(signature);
996
+ }
997
+ return named;
886
998
  }
887
999
  const namedList = (entries, limit = 6) => {
888
- if (entries.length === 0) return "";
889
- const shown = entries.slice(0, limit).join("; ");
890
- return entries.length > limit ? ` \u2014 new: ${shown}; \u2026 ${entries.length - limit} more` : ` \u2014 new: ${shown}`;
1000
+ if (entries.length === 0) return "";
1001
+ const shown = entries.slice(0, limit).join("; ");
1002
+ return entries.length > limit ? ` \u2014 new: ${shown}; \u2026 ${entries.length - limit} more` : ` \u2014 new: ${shown}`;
891
1003
  };
892
1004
  function evaluateNoBreakage(input) {
893
- const failures = [];
894
- if (!input.storyRendered) {
895
- failures.push("story did not render (empty story root)");
896
- }
897
- const structuralAdded = input.offScaleSignatures && input.baselineOffScaleSignatures ? newOffScaleEntries(input.baselineOffScaleSignatures, input.offScaleSignatures) : [];
898
- if (structuralAdded.length || input.offScaleViolations > input.baselineOffScaleViolations) {
899
- failures.push(`constraint audit: ${input.offScaleViolations} off-scale violations (default cell has ${input.baselineOffScaleViolations})${namedList(structuralAdded)}`);
900
- }
901
- const signature = violation => `${violation.key} "${violation.text}" ${violation.color} on ${violation.background} = ${violation.ratio}:1 (floor ${violation.required})`;
902
- const contrastAdded = input.baselineContrast ? newEntries(input.baselineContrast.violations.map(signature), input.contrast.violations.map(signature)) : [];
903
- if (contrastAdded.length || input.contrast.violations.length > input.baselineContrastViolations) {
904
- failures.push(`text contrast: ${input.contrast.violations.length} below-floor text nodes (default cell has ${input.baselineContrastViolations})${namedList(contrastAdded)}`);
905
- }
906
- if (input.icons === void 0 !== (input.baselineIcons === void 0)) {
907
- failures.push("icon contrast: icons and baselineIcons must be supplied together");
908
- } else if (input.icons && input.baselineIcons) {
909
- const newIconFindings = newEntries(iconContrastSignatures(input.baselineIcons), iconContrastSignatures(input.icons));
910
- if (newIconFindings.length > 0) {
911
- failures.push(`icon contrast: ${newIconFindings.length} new findings${namedList(newIconFindings)}`);
912
- }
913
- }
914
- if (input.charts === void 0 !== (input.baselineCharts === void 0)) {
915
- failures.push("chart proof: charts and baselineCharts must be supplied together");
916
- } else if (input.charts && input.baselineCharts) {
917
- const added = newEntries(chartProofSignatures(input.baselineCharts), chartProofSignatures(input.charts));
918
- if (added.length) failures.push(`chart proof: ${added.length} new findings${namedList(added)}`);
919
- }
920
- return {
921
- ok: failures.length === 0,
922
- failures
923
- };
924
- }
1005
+ const failures = [];
1006
+ if (!input.storyRendered) {
1007
+ failures.push("story did not render (empty story root)");
1008
+ }
1009
+ const structuralAdded = input.offScaleSignatures && input.baselineOffScaleSignatures ? newOffScaleEntries(input.baselineOffScaleSignatures, input.offScaleSignatures) : [];
1010
+ if (structuralAdded.length || input.offScaleViolations > input.baselineOffScaleViolations) {
1011
+ failures.push(`constraint audit: ${input.offScaleViolations} off-scale violations (default cell has ${input.baselineOffScaleViolations})${namedList(structuralAdded)}`);
1012
+ }
1013
+ const signature = (violation) => `${violation.key} "${violation.text}" ${violation.color} on ${violation.background} = ${violation.ratio}:1 (floor ${violation.required})`;
1014
+ const contrastAdded = input.baselineContrast ? newEntries(input.baselineContrast.violations.map(signature), input.contrast.violations.map(signature)) : [];
1015
+ if (contrastAdded.length || input.contrast.violations.length > input.baselineContrastViolations) {
1016
+ failures.push(`text contrast: ${input.contrast.violations.length} below-floor text nodes (default cell has ${input.baselineContrastViolations})${namedList(contrastAdded)}`);
1017
+ }
1018
+ if (input.icons === void 0 !== (input.baselineIcons === void 0)) {
1019
+ failures.push("icon contrast: icons and baselineIcons must be supplied together");
1020
+ } else if (input.icons && input.baselineIcons) {
1021
+ const newIconFindings = newEntries(iconContrastSignatures(input.baselineIcons), iconContrastSignatures(input.icons));
1022
+ if (newIconFindings.length > 0) {
1023
+ failures.push(`icon contrast: ${newIconFindings.length} new findings${namedList(newIconFindings)}`);
1024
+ }
1025
+ }
1026
+ if (input.charts === void 0 !== (input.baselineCharts === void 0)) {
1027
+ failures.push("chart proof: charts and baselineCharts must be supplied together");
1028
+ } else if (input.charts && input.baselineCharts) {
1029
+ const added = newEntries(chartProofSignatures(input.baselineCharts), chartProofSignatures(input.charts));
1030
+ if (added.length) failures.push(`chart proof: ${added.length} new findings${namedList(added)}`);
1031
+ }
1032
+ return {
1033
+ ok: failures.length === 0,
1034
+ failures
1035
+ };
1036
+ }