@oxyhq/bloom 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +16 -4
  2. package/docs/accordion.mdx +69 -0
  3. package/docs/activity-heatmap.mdx +71 -0
  4. package/docs/admonition.mdx +77 -0
  5. package/docs/alert-dialog.mdx +75 -0
  6. package/docs/alert.mdx +93 -0
  7. package/docs/animated-check.mdx +53 -0
  8. package/docs/aspect-ratio.mdx +45 -0
  9. package/docs/avatar-group.mdx +91 -0
  10. package/docs/avatar.mdx +126 -0
  11. package/docs/badge.mdx +74 -0
  12. package/docs/benefit-list.mdx +56 -0
  13. package/docs/bottom-sheet.mdx +103 -0
  14. package/docs/button.mdx +218 -0
  15. package/docs/card.mdx +106 -0
  16. package/docs/checkbox.mdx +59 -0
  17. package/docs/chip.mdx +53 -0
  18. package/docs/code.mdx +50 -0
  19. package/docs/combobox.mdx +64 -0
  20. package/docs/command.mdx +85 -0
  21. package/docs/composition-bar.mdx +63 -0
  22. package/docs/connection-dots.mdx +50 -0
  23. package/docs/connection-status.mdx +56 -0
  24. package/docs/content-panel.mdx +62 -0
  25. package/docs/context-menu.mdx +65 -0
  26. package/docs/design-tokens.mdx +254 -0
  27. package/docs/dialog.mdx +277 -0
  28. package/docs/divider.mdx +56 -0
  29. package/docs/dot-grid-meter.mdx +66 -0
  30. package/docs/dropdown-menu.mdx +161 -0
  31. package/docs/error-boundary.mdx +72 -0
  32. package/docs/fab.mdx +67 -0
  33. package/docs/field.mdx +70 -0
  34. package/docs/fill.mdx +58 -0
  35. package/docs/fonts.mdx +144 -0
  36. package/docs/frosted-icon-button.mdx +60 -0
  37. package/docs/getting-started.mdx +75 -0
  38. package/docs/grid.mdx +64 -0
  39. package/docs/hooks.mdx +81 -0
  40. package/docs/icon-circle.mdx +66 -0
  41. package/docs/icons.mdx +69 -0
  42. package/docs/image-aspect-ratio-cache.mdx +63 -0
  43. package/docs/image-resolver.mdx +66 -0
  44. package/docs/index.mdx +44 -0
  45. package/docs/input-group.mdx +58 -0
  46. package/docs/item.mdx +69 -0
  47. package/docs/kbd.mdx +57 -0
  48. package/docs/label.mdx +50 -0
  49. package/docs/link-preview.mdx +66 -0
  50. package/docs/list.mdx +72 -0
  51. package/docs/loading.mdx +129 -0
  52. package/docs/media-inset-border.mdx +52 -0
  53. package/docs/menubar.mdx +86 -0
  54. package/docs/migrating-to-1.0.mdx +434 -0
  55. package/docs/motion.mdx +83 -0
  56. package/docs/overlay.mdx +75 -0
  57. package/docs/popover.mdx +73 -0
  58. package/docs/portal.mdx +63 -0
  59. package/docs/pressable-scale.mdx +51 -0
  60. package/docs/profile-card.mdx +66 -0
  61. package/docs/progressive-blur.mdx +54 -0
  62. package/docs/prompt-input.mdx +183 -0
  63. package/docs/provider.mdx +64 -0
  64. package/docs/radio-indicator.mdx +60 -0
  65. package/docs/radio.mdx +65 -0
  66. package/docs/scroll.mdx +66 -0
  67. package/docs/search.mdx +67 -0
  68. package/docs/segmented-control.mdx +76 -0
  69. package/docs/select.mdx +93 -0
  70. package/docs/settings-list.mdx +186 -0
  71. package/docs/skeleton.mdx +66 -0
  72. package/docs/slider.mdx +73 -0
  73. package/docs/stat-bar.mdx +59 -0
  74. package/docs/stat-widgets.mdx +33 -0
  75. package/docs/styles.mdx +61 -0
  76. package/docs/subtle-hover.mdx +53 -0
  77. package/docs/surfaces.mdx +72 -0
  78. package/docs/switch.mdx +90 -0
  79. package/docs/tab-bar.mdx +386 -0
  80. package/docs/tabs.mdx +75 -0
  81. package/docs/text-field.mdx +187 -0
  82. package/docs/theme.mdx +67 -0
  83. package/docs/toast.mdx +285 -0
  84. package/docs/tooltip.mdx +67 -0
  85. package/docs/typography.mdx +88 -0
  86. package/docs/user-hover-card.mdx +140 -0
  87. package/docs/zoomable-image-gallery.mdx +66 -0
  88. package/lib/commonjs/design-tokens/color-roles.js +21 -1
  89. package/lib/commonjs/design-tokens/color-roles.js.map +1 -1
  90. package/lib/commonjs/design-tokens/index.js +6 -0
  91. package/lib/commonjs/design-tokens/index.js.map +1 -1
  92. package/lib/commonjs/design-tokens/tailwind-preset.js +3 -1
  93. package/lib/commonjs/design-tokens/tailwind-preset.js.map +1 -1
  94. package/lib/commonjs/design-tokens/theme-css.js +1 -0
  95. package/lib/commonjs/design-tokens/theme-css.js.map +1 -1
  96. package/lib/commonjs/design-tokens/theme.css +3 -0
  97. package/lib/commonjs/design-tokens/tokens-json.js +13 -4
  98. package/lib/commonjs/design-tokens/tokens-json.js.map +1 -1
  99. package/lib/commonjs/design-tokens/tokens.json +6227 -265
  100. package/lib/commonjs/index.js +7 -0
  101. package/lib/commonjs/index.js.map +1 -1
  102. package/lib/commonjs/index.web.js +7 -0
  103. package/lib/commonjs/index.web.js.map +1 -1
  104. package/lib/commonjs/theme/ambient-store.js +16 -1
  105. package/lib/commonjs/theme/ambient-store.js.map +1 -1
  106. package/lib/commonjs/theme/color-policy.js +30 -33
  107. package/lib/commonjs/theme/color-policy.js.map +1 -1
  108. package/lib/commonjs/theme/color-presets.js +413 -166
  109. package/lib/commonjs/theme/color-presets.js.map +1 -1
  110. package/lib/commonjs/theme/color-scope/seed-scope.js +1 -0
  111. package/lib/commonjs/theme/color-scope/seed-scope.js.map +1 -1
  112. package/lib/commonjs/theme/glass-colors.js +18 -21
  113. package/lib/commonjs/theme/glass-colors.js.map +1 -1
  114. package/lib/commonjs/theme/index.js +30 -0
  115. package/lib/commonjs/theme/index.js.map +1 -1
  116. package/lib/commonjs/theme/index.web.js +30 -0
  117. package/lib/commonjs/theme/index.web.js.map +1 -1
  118. package/lib/module/design-tokens/color-roles.js +20 -0
  119. package/lib/module/design-tokens/color-roles.js.map +1 -1
  120. package/lib/module/design-tokens/index.js +2 -2
  121. package/lib/module/design-tokens/index.js.map +1 -1
  122. package/lib/module/design-tokens/tailwind-preset.js +4 -2
  123. package/lib/module/design-tokens/tailwind-preset.js.map +1 -1
  124. package/lib/module/design-tokens/theme-css.js +2 -1
  125. package/lib/module/design-tokens/theme-css.js.map +1 -1
  126. package/lib/module/design-tokens/theme.css +3 -0
  127. package/lib/module/design-tokens/tokens-json.js +14 -5
  128. package/lib/module/design-tokens/tokens-json.js.map +1 -1
  129. package/lib/module/design-tokens/tokens.json +6227 -265
  130. package/lib/module/index.js +1 -1
  131. package/lib/module/index.js.map +1 -1
  132. package/lib/module/index.web.js +1 -1
  133. package/lib/module/index.web.js.map +1 -1
  134. package/lib/module/theme/ambient-store.js +16 -1
  135. package/lib/module/theme/ambient-store.js.map +1 -1
  136. package/lib/module/theme/color-policy.js +30 -33
  137. package/lib/module/theme/color-policy.js.map +1 -1
  138. package/lib/module/theme/color-presets.js +412 -165
  139. package/lib/module/theme/color-presets.js.map +1 -1
  140. package/lib/module/theme/color-scope/seed-scope.js +2 -1
  141. package/lib/module/theme/color-scope/seed-scope.js.map +1 -1
  142. package/lib/module/theme/glass-colors.js +18 -21
  143. package/lib/module/theme/glass-colors.js.map +1 -1
  144. package/lib/module/theme/index.js +1 -1
  145. package/lib/module/theme/index.js.map +1 -1
  146. package/lib/module/theme/index.web.js +1 -1
  147. package/lib/module/theme/index.web.js.map +1 -1
  148. package/lib/typescript/commonjs/design-tokens/color-roles.d.ts +20 -0
  149. package/lib/typescript/commonjs/design-tokens/color-roles.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/design-tokens/index.d.ts +3 -3
  151. package/lib/typescript/commonjs/design-tokens/index.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/design-tokens/tailwind-preset.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/design-tokens/theme-css.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/design-tokens/tokens-json.d.ts +12 -3
  155. package/lib/typescript/commonjs/design-tokens/tokens-json.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/index.d.ts +2 -2
  157. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/index.web.d.ts +2 -2
  159. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/theme/ambient-store.d.ts.map +1 -1
  161. package/lib/typescript/commonjs/theme/color-policy.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/theme/color-presets.d.ts +386 -62
  163. package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/theme/glass-colors.d.ts +18 -21
  166. package/lib/typescript/commonjs/theme/glass-colors.d.ts.map +1 -1
  167. package/lib/typescript/commonjs/theme/index.d.ts +2 -2
  168. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/theme/index.web.d.ts +2 -2
  170. package/lib/typescript/commonjs/theme/index.web.d.ts.map +1 -1
  171. package/lib/typescript/module/design-tokens/color-roles.d.ts +20 -0
  172. package/lib/typescript/module/design-tokens/color-roles.d.ts.map +1 -1
  173. package/lib/typescript/module/design-tokens/index.d.ts +3 -3
  174. package/lib/typescript/module/design-tokens/index.d.ts.map +1 -1
  175. package/lib/typescript/module/design-tokens/tailwind-preset.d.ts.map +1 -1
  176. package/lib/typescript/module/design-tokens/theme-css.d.ts.map +1 -1
  177. package/lib/typescript/module/design-tokens/tokens-json.d.ts +12 -3
  178. package/lib/typescript/module/design-tokens/tokens-json.d.ts.map +1 -1
  179. package/lib/typescript/module/index.d.ts +2 -2
  180. package/lib/typescript/module/index.d.ts.map +1 -1
  181. package/lib/typescript/module/index.web.d.ts +2 -2
  182. package/lib/typescript/module/index.web.d.ts.map +1 -1
  183. package/lib/typescript/module/theme/ambient-store.d.ts.map +1 -1
  184. package/lib/typescript/module/theme/color-policy.d.ts.map +1 -1
  185. package/lib/typescript/module/theme/color-presets.d.ts +386 -62
  186. package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
  187. package/lib/typescript/module/theme/color-scope/seed-scope.d.ts.map +1 -1
  188. package/lib/typescript/module/theme/glass-colors.d.ts +18 -21
  189. package/lib/typescript/module/theme/glass-colors.d.ts.map +1 -1
  190. package/lib/typescript/module/theme/index.d.ts +2 -2
  191. package/lib/typescript/module/theme/index.d.ts.map +1 -1
  192. package/lib/typescript/module/theme/index.web.d.ts +2 -2
  193. package/lib/typescript/module/theme/index.web.d.ts.map +1 -1
  194. package/package.json +5 -2
  195. package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
  196. package/src/__tests__/support/constructed-style-sheets.ts +68 -0
  197. package/src/__tests__/support/press-host.ts +30 -0
  198. package/src/__tests__/support/rendered-style.ts +99 -0
  199. package/src/__tests__/support/unread-hook-fixture.ts +33 -0
  200. package/src/design-tokens/color-roles.ts +21 -0
  201. package/src/design-tokens/index.ts +3 -2
  202. package/src/design-tokens/tailwind-preset.ts +3 -2
  203. package/src/design-tokens/theme-css.ts +2 -1
  204. package/src/design-tokens/theme.css +3 -0
  205. package/src/design-tokens/tokens-json.ts +29 -9
  206. package/src/design-tokens/tokens.json +6227 -265
  207. package/src/glass/GlassSurface.tsx +2 -2
  208. package/src/index.ts +2 -0
  209. package/src/index.web.ts +2 -0
  210. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +4082 -0
  211. package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
  212. package/src/theme/ambient-store.ts +21 -1
  213. package/src/theme/color-policy.ts +33 -38
  214. package/src/theme/color-presets.ts +473 -146
  215. package/src/theme/color-scope/seed-scope.ts +2 -1
  216. package/src/theme/glass-colors.ts +18 -21
  217. package/src/theme/index.ts +16 -1
  218. package/src/theme/index.web.ts +16 -1
@@ -89,23 +89,22 @@ import { withAlpha } from './color-utils';
89
89
  *
90
90
  * The 15% that bleeds through moves the pane TOWARD the surface under it, and
91
91
  * in light mode that means lighter — which is the direction a white label can
92
- * least afford. Measured over 18 presets x 2 modes x 5 Bloom surfaces:
92
+ * least afford. Measured over 34 presets x 2 modes x 5 Bloom surfaces:
93
93
  *
94
- * `Button` primary 30 of 180 rows fall below WCAG AA, in the band
95
- * 4.17..4.49, ALL of them in LIGHT mode, across nine
96
- * presets (blue, faircoin, green, mint, orange, pumpkin,
97
- * rose, sky, yellow).
98
- * `Button` destructive 0 of 180. Worst 5.32.
94
+ * `Button` primary 38 of 340 rows fall below WCAG AA, in the band
95
+ * 4.17..4.49, ALL of them in LIGHT mode, across fourteen
96
+ * presets (blue, faircoin, green, lagoon, lavender, mint,
97
+ * olive, orange, pine, plum, pumpkin, rose, sky, yellow).
98
+ * `Button` destructive 0 of 340. Worst 5.32.
99
99
  *
100
- * As a SOLID fill all 360 rows pass, so this is a real regression and not an
101
- * inherited one 173 rows across the whole fill vocabulary cross the AA line
102
- * that did not before, none of which failed both ways. That count was 45 (and
103
- * 263) until `SURFACE_RAMP` opened up three of the five Bloom surfaces the
104
- * button can sit on a palette improvement showing up here, not a relaxed
105
- * bar; re-measure both numbers on every alpha or surface change.
100
+ * As a SOLID fill all 680 Button rows pass. The original 18 presets retain
101
+ * their exact 30/180 shipped failure set; all eight added failures belong to
102
+ * the new recipes. A browser helper briefly reported 45 only because it parsed
103
+ * the structured `GLASS_SHEEN.bottom` stop as CSS; that was measurement drift,
104
+ * never the shipped oracle and never a threshold being relaxed.
106
105
  *
107
106
  * The alpha at which the failures reach zero is **0.89** (worst 4.52), and the
108
- * curve between is steep: 0.86 -> 21 rows, 0.87 -> 14, 0.88 -> 5, 0.89 -> 0.
107
+ * curve between is steep: 0.86 -> 25 rows, 0.87 -> 14, 0.88 -> 5, 0.89 -> 0.
109
108
  * So AA compliance costs four hundredths of alpha. 0.85 is kept because it is
110
109
  * the reference's own value and matching the reference is the requirement;
111
110
  * `glass-colors.test.ts` pins the compromise as an EXACT failure count and an
@@ -241,7 +240,7 @@ export interface GlassColors {
241
240
  * `colors.negative`, `colors.success` — rather than a tone name, because the
242
241
  * caller is the only one who knows which token its variant means. `Button`'s
243
242
  * `destructive` is `colors.negative` (the engine's error ROLE) and not
244
- * `colors.error` (the fixed status seed): measured, those two differ in all 36
243
+ * `colors.error` (the fixed status seed): measured, those two differ in all 68
245
244
  * preset x mode combinations and by as much as `rgb(255 180 171)` against
246
245
  * `rgb(209 45 50)` on `teal`/dark, so a tone vocabulary here would have
247
246
  * silently repainted every destructive button on the way past.
@@ -256,13 +255,11 @@ export interface GlassColors {
256
255
  * It is worth writing down WHY it is that token, because at 0.25 it was
257
256
  * `colors.text` and that was correct THEN: a pane that is three-quarters
258
257
  * backdrop takes its luminance from the page, so it needed the page's reading
259
- * colour at that alpha `colors.text` passed everywhere and the on-fill
260
- * token failed 650 of 1080 rows. At 0.85 the pane is the fill, so it takes
261
- * the fill's own label: on the SAME 1080-row matrix (presets x modes x tones
262
- * x surfaces), `colors.text` now fails AA on 864 rows (worst 1.21) against
263
- * the on-fill token's 173 (worst 4.17) — the reason this flipped when the
264
- * alpha did. Neither count is permanent; the gate re-measures both on every
265
- * alpha or surface change and reports them side by side.
258
+ * colour. At 0.85 the pane is the fill, so it takes the fill's own label: on
259
+ * the complete 2040-row matrix (34 presets x 2 modes x 6 tones x 5 surfaces),
260
+ * `colors.text` fails AA on 1714 rows (worst 1.21) against the on-fill token's
261
+ * 305 (worst 4.17). Neither count is permanent; the gate re-measures and pins
262
+ * both on every alpha or surface change.
266
263
  */
267
264
  export function resolveGlassColors(fill: string): GlassColors {
268
265
  return {
@@ -38,9 +38,24 @@ export type {
38
38
  export { useNavigationTheme } from './use-navigation-theme';
39
39
  export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
40
40
  export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
41
- export type { AppColorName, AppColorPreset, ColorPresetGate, PresetTokens } from './color-presets';
41
+ export type {
42
+ AppColorName,
43
+ AppColorPreset,
44
+ ColorPresetFamily,
45
+ ColorPresetFamilyDefinition,
46
+ ColorPresetGate,
47
+ ColorPresetGroup,
48
+ ColorPresetPairing,
49
+ ColorPresetRecipe,
50
+ PresetTokens,
51
+ } from './color-presets';
42
52
  export {
43
53
  APP_COLOR_NAMES,
54
+ COLOR_PLAYGROUND_NAMES,
55
+ COLOR_PRESET_FAMILIES,
56
+ COLOR_PRESET_FAMILY_REGISTRY,
57
+ COLOR_PRESET_GROUPS,
58
+ COLOR_PRESET_REGISTRY,
44
59
  FREE_COLOR_NAMES,
45
60
  HANDLE_COLOR_NAMES,
46
61
  PREMIUM_COLOR_NAMES,
@@ -43,9 +43,24 @@ export type {
43
43
  export { useNavigationTheme } from './use-navigation-theme';
44
44
  export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
45
45
  export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
46
- export type { AppColorName, AppColorPreset, ColorPresetGate, PresetTokens } from './color-presets';
46
+ export type {
47
+ AppColorName,
48
+ AppColorPreset,
49
+ ColorPresetFamily,
50
+ ColorPresetFamilyDefinition,
51
+ ColorPresetGate,
52
+ ColorPresetGroup,
53
+ ColorPresetPairing,
54
+ ColorPresetRecipe,
55
+ PresetTokens,
56
+ } from './color-presets';
47
57
  export {
48
58
  APP_COLOR_NAMES,
59
+ COLOR_PLAYGROUND_NAMES,
60
+ COLOR_PRESET_FAMILIES,
61
+ COLOR_PRESET_FAMILY_REGISTRY,
62
+ COLOR_PRESET_GROUPS,
63
+ COLOR_PRESET_REGISTRY,
49
64
  FREE_COLOR_NAMES,
50
65
  HANDLE_COLOR_NAMES,
51
66
  PREMIUM_COLOR_NAMES,