@oxyhq/bloom 0.42.1 → 0.44.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 (62) hide show
  1. package/lib/commonjs/theme/BloomThemeProvider.js +31 -14
  2. package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
  3. package/lib/commonjs/theme/apply-dark-class.js +12 -3
  4. package/lib/commonjs/theme/apply-dark-class.js.map +1 -1
  5. package/lib/commonjs/theme/color-scope/seed-scope.js +6 -4
  6. package/lib/commonjs/theme/color-scope/seed-scope.js.map +1 -1
  7. package/lib/commonjs/theme/native-root-vars.js +5 -0
  8. package/lib/commonjs/theme/native-root-vars.js.map +1 -1
  9. package/lib/commonjs/theme/native-root-vars.native.js +13 -3
  10. package/lib/commonjs/theme/native-root-vars.native.js.map +1 -1
  11. package/lib/commonjs/theme/native-root-vars.web.js +5 -0
  12. package/lib/commonjs/theme/native-root-vars.web.js.map +1 -1
  13. package/lib/commonjs/theme/preset-vars.js +11 -8
  14. package/lib/commonjs/theme/preset-vars.js.map +1 -1
  15. package/lib/module/theme/BloomThemeProvider.js +33 -16
  16. package/lib/module/theme/BloomThemeProvider.js.map +1 -1
  17. package/lib/module/theme/apply-dark-class.js +11 -3
  18. package/lib/module/theme/apply-dark-class.js.map +1 -1
  19. package/lib/module/theme/color-scope/seed-scope.js +6 -4
  20. package/lib/module/theme/color-scope/seed-scope.js.map +1 -1
  21. package/lib/module/theme/native-root-vars.js +4 -0
  22. package/lib/module/theme/native-root-vars.js.map +1 -1
  23. package/lib/module/theme/native-root-vars.native.js +12 -3
  24. package/lib/module/theme/native-root-vars.native.js.map +1 -1
  25. package/lib/module/theme/native-root-vars.web.js +4 -0
  26. package/lib/module/theme/native-root-vars.web.js.map +1 -1
  27. package/lib/module/theme/preset-vars.js +11 -8
  28. package/lib/module/theme/preset-vars.js.map +1 -1
  29. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts +11 -1
  30. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
  31. package/lib/typescript/commonjs/theme/apply-dark-class.d.ts +7 -0
  32. package/lib/typescript/commonjs/theme/apply-dark-class.d.ts.map +1 -1
  33. package/lib/typescript/commonjs/theme/color-scope/seed-scope.d.ts.map +1 -1
  34. package/lib/typescript/commonjs/theme/native-root-vars.d.ts +2 -0
  35. package/lib/typescript/commonjs/theme/native-root-vars.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/theme/native-root-vars.native.d.ts +8 -0
  37. package/lib/typescript/commonjs/theme/native-root-vars.native.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts +2 -0
  39. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts.map +1 -1
  40. package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
  41. package/lib/typescript/module/theme/BloomThemeProvider.d.ts +11 -1
  42. package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
  43. package/lib/typescript/module/theme/apply-dark-class.d.ts +7 -0
  44. package/lib/typescript/module/theme/apply-dark-class.d.ts.map +1 -1
  45. package/lib/typescript/module/theme/color-scope/seed-scope.d.ts.map +1 -1
  46. package/lib/typescript/module/theme/native-root-vars.d.ts +2 -0
  47. package/lib/typescript/module/theme/native-root-vars.d.ts.map +1 -1
  48. package/lib/typescript/module/theme/native-root-vars.native.d.ts +8 -0
  49. package/lib/typescript/module/theme/native-root-vars.native.d.ts.map +1 -1
  50. package/lib/typescript/module/theme/native-root-vars.web.d.ts +2 -0
  51. package/lib/typescript/module/theme/native-root-vars.web.d.ts.map +1 -1
  52. package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
  53. package/package.json +1 -1
  54. package/src/theme/BloomThemeProvider.tsx +53 -17
  55. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +52 -52
  56. package/src/theme/__tests__/__snapshots__/visual-gallery.test.tsx.snap +104 -104
  57. package/src/theme/apply-dark-class.ts +15 -8
  58. package/src/theme/color-scope/seed-scope.ts +6 -4
  59. package/src/theme/native-root-vars.native.ts +17 -8
  60. package/src/theme/native-root-vars.ts +5 -0
  61. package/src/theme/native-root-vars.web.ts +5 -0
  62. package/src/theme/preset-vars.ts +11 -8
@@ -25,12 +25,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
25
25
  "primaryLight": "rgb(36 26 14)",
26
26
  "primarySubtle": "rgb(101 62 0)",
27
27
  "primarySubtleForeground": "rgb(255 221 184)",
28
- "secondary": "rgb(255 186 43)",
29
- "secondaryForeground": "rgb(66 44 0)",
28
+ "secondary": "rgb(95 65 0)",
29
+ "secondaryForeground": "rgb(255 222 170)",
30
30
  "shadow": "rgba(0, 0, 0, 0.3)",
31
31
  "success": "#10B981",
32
- "tertiary": "rgb(243 192 0)",
33
- "tertiaryForeground": "rgb(61 46 0)",
32
+ "tertiary": "rgb(88 68 0)",
33
+ "tertiaryForeground": "rgb(255 224 144)",
34
34
  "text": "rgb(244 223 203)",
35
35
  "textSecondary": "rgb(217 195 171)",
36
36
  "textTertiary": "rgb(161 141 120)",
@@ -60,12 +60,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
60
60
  "primaryLight": "rgb(255 241 229)",
61
61
  "primarySubtle": "rgb(255 221 184)",
62
62
  "primarySubtleForeground": "rgb(101 62 0)",
63
- "secondary": "rgb(125 87 0)",
64
- "secondaryForeground": "rgb(255 255 255)",
63
+ "secondary": "rgb(255 222 170)",
64
+ "secondaryForeground": "rgb(95 65 0)",
65
65
  "shadow": "rgba(0, 0, 0, 0.1)",
66
66
  "success": "#10B981",
67
- "tertiary": "rgb(117 91 0)",
68
- "tertiaryForeground": "rgb(255 255 255)",
67
+ "tertiary": "rgb(255 224 144)",
68
+ "tertiaryForeground": "rgb(88 68 0)",
69
69
  "text": "rgb(36 26 14)",
70
70
  "textSecondary": "rgb(84 68 50)",
71
71
  "textTertiary": "rgb(135 116 96)",
@@ -95,12 +95,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
95
95
  "primaryLight": "rgb(21 28 36)",
96
96
  "primarySubtle": "rgb(0 74 120)",
97
97
  "primarySubtleForeground": "rgb(207 229 255)",
98
- "secondary": "rgb(175 198 255)",
99
- "secondaryForeground": "rgb(0 45 109)",
98
+ "secondary": "rgb(0 66 153)",
99
+ "secondaryForeground": "rgb(217 226 255)",
100
100
  "shadow": "rgba(0, 0, 0, 0.3)",
101
101
  "success": "#10B981",
102
- "tertiary": "rgb(193 193 255)",
103
- "tertiaryForeground": "rgb(18 0 169)",
102
+ "tertiary": "rgb(44 39 201)",
103
+ "tertiaryForeground": "rgb(225 224 255)",
104
104
  "text": "rgb(220 227 238)",
105
105
  "textSecondary": "rgb(190 199 212)",
106
106
  "textTertiary": "rgb(136 146 158)",
@@ -130,12 +130,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
130
130
  "primaryLight": "rgb(237 244 255)",
131
131
  "primarySubtle": "rgb(207 229 255)",
132
132
  "primarySubtleForeground": "rgb(0 74 120)",
133
- "secondary": "rgb(0 89 200)",
134
- "secondaryForeground": "rgb(255 255 255)",
133
+ "secondary": "rgb(217 226 255)",
134
+ "secondaryForeground": "rgb(0 66 153)",
135
135
  "shadow": "rgba(0, 0, 0, 0.1)",
136
136
  "success": "#10B981",
137
- "tertiary": "rgb(71 71 225)",
138
- "tertiaryForeground": "rgb(255 255 255)",
137
+ "tertiary": "rgb(225 224 255)",
138
+ "tertiaryForeground": "rgb(44 39 201)",
139
139
  "text": "rgb(21 28 36)",
140
140
  "textSecondary": "rgb(62 72 82)",
141
141
  "textTertiary": "rgb(111 120 132)",
@@ -165,12 +165,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
165
165
  "primaryLight": "rgb(24 29 18)",
166
166
  "primarySubtle": "rgb(40 80 0)",
167
167
  "primarySubtleForeground": "rgb(138 254 0)",
168
- "secondary": "rgb(102 222 124)",
169
- "secondaryForeground": "rgb(0 57 19)",
168
+ "secondary": "rgb(0 83 30)",
169
+ "secondaryForeground": "rgb(130 252 149)",
170
170
  "shadow": "rgba(0, 0, 0, 0.3)",
171
171
  "success": "#10B981",
172
- "tertiary": "rgb(0 226 157)",
173
- "tertiaryForeground": "rgb(0 56 36)",
172
+ "tertiary": "rgb(0 82 54)",
173
+ "tertiaryForeground": "rgb(71 255 184)",
174
174
  "text": "rgb(223 229 211)",
175
175
  "textSecondary": "rgb(193 202 180)",
176
176
  "textTertiary": "rgb(139 148 128)",
@@ -200,12 +200,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
200
200
  "primaryLight": "rgb(240 246 227)",
201
201
  "primarySubtle": "rgb(138 254 0)",
202
202
  "primarySubtleForeground": "rgb(40 80 0)",
203
- "secondary": "rgb(0 110 43)",
204
- "secondaryForeground": "rgb(255 255 255)",
203
+ "secondary": "rgb(130 252 149)",
204
+ "secondaryForeground": "rgb(0 83 30)",
205
205
  "shadow": "rgba(0, 0, 0, 0.1)",
206
206
  "success": "#10B981",
207
- "tertiary": "rgb(0 108 73)",
208
- "tertiaryForeground": "rgb(255 255 255)",
207
+ "tertiary": "rgb(71 255 184)",
208
+ "tertiaryForeground": "rgb(0 82 54)",
209
209
  "text": "rgb(24 29 18)",
210
210
  "textSecondary": "rgb(65 73 57)",
211
211
  "textTertiary": "rgb(114 122 103)",
@@ -235,12 +235,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
235
235
  "primaryLight": "rgb(19 30 24)",
236
236
  "primarySubtle": "rgb(0 82 54)",
237
237
  "primarySubtleForeground": "rgb(71 255 184)",
238
- "secondary": "rgb(0 223 192)",
239
- "secondaryForeground": "rgb(0 56 46)",
238
+ "secondary": "rgb(0 81 68)",
239
+ "secondaryForeground": "rgb(0 254 219)",
240
240
  "shadow": "rgba(0, 0, 0, 0.3)",
241
241
  "success": "#10B981",
242
- "tertiary": "rgb(0 221 218)",
243
- "tertiaryForeground": "rgb(0 55 54)",
242
+ "tertiary": "rgb(0 80 78)",
243
+ "tertiaryForeground": "rgb(0 252 248)",
244
244
  "text": "rgb(217 230 220)",
245
245
  "textSecondary": "rgb(186 203 191)",
246
246
  "textTertiary": "rgb(132 149 138)",
@@ -270,12 +270,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
270
270
  "primaryLight": "rgb(234 247 237)",
271
271
  "primarySubtle": "rgb(71 255 184)",
272
272
  "primarySubtleForeground": "rgb(0 82 54)",
273
- "secondary": "rgb(0 107 91)",
274
- "secondaryForeground": "rgb(255 255 255)",
273
+ "secondary": "rgb(0 254 219)",
274
+ "secondaryForeground": "rgb(0 81 68)",
275
275
  "shadow": "rgba(0, 0, 0, 0.1)",
276
276
  "success": "#10B981",
277
- "tertiary": "rgb(0 106 104)",
278
- "tertiaryForeground": "rgb(255 255 255)",
277
+ "tertiary": "rgb(0 252 248)",
278
+ "tertiaryForeground": "rgb(0 80 78)",
279
279
  "text": "rgb(19 30 24)",
280
280
  "textSecondary": "rgb(59 74 65)",
281
281
  "textTertiary": "rgb(107 123 113)",
@@ -305,12 +305,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
305
305
  "primaryLight": "rgb(17 30 28)",
306
306
  "primarySubtle": "rgb(0 80 72)",
307
307
  "primarySubtleForeground": "rgb(0 254 229)",
308
- "secondary": "rgb(0 220 230)",
309
- "secondaryForeground": "rgb(0 55 58)",
308
+ "secondary": "rgb(0 79 83)",
309
+ "secondaryForeground": "rgb(109 246 255)",
310
310
  "shadow": "rgba(0, 0, 0, 0.3)",
311
311
  "success": "#10B981",
312
- "tertiary": "rgb(38 216 255)",
313
- "tertiaryForeground": "rgb(0 54 65)",
312
+ "tertiary": "rgb(0 78 94)",
313
+ "tertiaryForeground": "rgb(177 236 255)",
314
314
  "text": "rgb(215 230 225)",
315
315
  "textSecondary": "rgb(184 202 198)",
316
316
  "textTertiary": "rgb(130 148 144)",
@@ -340,12 +340,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
340
340
  "primaryLight": "rgb(232 247 242)",
341
341
  "primarySubtle": "rgb(0 254 229)",
342
342
  "primarySubtleForeground": "rgb(0 80 72)",
343
- "secondary": "rgb(0 105 110)",
344
- "secondaryForeground": "rgb(255 255 255)",
343
+ "secondary": "rgb(109 246 255)",
344
+ "secondaryForeground": "rgb(0 79 83)",
345
345
  "shadow": "rgba(0, 0, 0, 0.1)",
346
346
  "success": "#10B981",
347
- "tertiary": "rgb(0 103 124)",
348
- "tertiaryForeground": "rgb(255 255 255)",
347
+ "tertiary": "rgb(177 236 255)",
348
+ "tertiaryForeground": "rgb(0 78 94)",
349
349
  "text": "rgb(17 30 28)",
350
350
  "textSecondary": "rgb(57 74 71)",
351
351
  "textTertiary": "rgb(105 123 119)",
@@ -375,12 +375,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
375
375
  "primaryLight": "rgb(38 24 17)",
376
376
  "primarySubtle": "rgb(120 50 0)",
377
377
  "primarySubtleForeground": "rgb(255 219 202)",
378
- "secondary": "rgb(255 184 118)",
379
- "secondaryForeground": "rgb(75 39 0)",
378
+ "secondary": "rgb(107 59 0)",
379
+ "secondaryForeground": "rgb(255 220 192)",
380
380
  "shadow": "rgba(0, 0, 0, 0.3)",
381
381
  "success": "#10B981",
382
- "tertiary": "rgb(255 186 71)",
383
- "tertiaryForeground": "rgb(68 43 0)",
382
+ "tertiary": "rgb(97 64 0)",
383
+ "tertiaryForeground": "rgb(255 221 176)",
384
384
  "text": "rgb(248 221 209)",
385
385
  "textSecondary": "rgb(223 192 178)",
386
386
  "textTertiary": "rgb(166 139 126)",
@@ -410,12 +410,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
410
410
  "primaryLight": "rgb(255 241 235)",
411
411
  "primarySubtle": "rgb(255 219 202)",
412
412
  "primarySubtleForeground": "rgb(120 50 0)",
413
- "secondary": "rgb(141 79 0)",
414
- "secondaryForeground": "rgb(255 255 255)",
413
+ "secondary": "rgb(255 220 192)",
414
+ "secondaryForeground": "rgb(107 59 0)",
415
415
  "shadow": "rgba(0, 0, 0, 0.1)",
416
416
  "success": "#10B981",
417
- "tertiary": "rgb(128 86 0)",
418
- "tertiaryForeground": "rgb(255 255 255)",
417
+ "tertiary": "rgb(255 221 176)",
418
+ "tertiaryForeground": "rgb(97 64 0)",
419
419
  "text": "rgb(38 24 17)",
420
420
  "textSecondary": "rgb(87 66 56)",
421
421
  "textTertiary": "rgb(139 114 102)",
@@ -445,12 +445,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
445
445
  "primaryLight": "rgb(33 25 34)",
446
446
  "primarySubtle": "rgb(119 0 154)",
447
447
  "primarySubtleForeground": "rgb(251 215 255)",
448
- "secondary": "rgb(255 171 243)",
449
- "secondaryForeground": "rgb(91 0 91)",
448
+ "secondary": "rgb(124 22 122)",
449
+ "secondaryForeground": "rgb(255 215 245)",
450
450
  "shadow": "rgba(0, 0, 0, 0.3)",
451
451
  "success": "#10B981",
452
- "tertiary": "rgb(255 174 217)",
453
- "tertiaryForeground": "rgb(97 0 70)",
452
+ "tertiary": "rgb(137 0 100)",
453
+ "tertiaryForeground": "rgb(255 216 234)",
454
454
  "text": "rgb(237 222 235)",
455
455
  "textSecondary": "rgb(210 193 210)",
456
456
  "textTertiary": "rgb(155 140 155)",
@@ -480,12 +480,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
480
480
  "primaryLight": "rgb(255 239 253)",
481
481
  "primarySubtle": "rgb(251 215 255)",
482
482
  "primarySubtleForeground": "rgb(119 0 154)",
483
- "secondary": "rgb(153 51 148)",
484
- "secondaryForeground": "rgb(255 255 255)",
483
+ "secondary": "rgb(255 215 245)",
484
+ "secondaryForeground": "rgb(124 22 122)",
485
485
  "shadow": "rgba(0, 0, 0, 0.1)",
486
486
  "success": "#10B981",
487
- "tertiary": "rgb(169 36 127)",
488
- "tertiaryForeground": "rgb(255 255 255)",
487
+ "tertiary": "rgb(255 216 234)",
488
+ "tertiaryForeground": "rgb(137 0 100)",
489
489
  "text": "rgb(33 25 34)",
490
490
  "textSecondary": "rgb(79 67 80)",
491
491
  "textTertiary": "rgb(129 115 129)",
@@ -515,12 +515,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
515
515
  "primaryLight": "rgb(37 24 29)",
516
516
  "primarySubtle": "rgb(140 0 83)",
517
517
  "primarySubtleForeground": "rgb(255 217 228)",
518
- "secondary": "rgb(255 178 190)",
519
- "secondaryForeground": "rgb(102 0 38)",
518
+ "secondary": "rgb(138 21 58)",
519
+ "secondaryForeground": "rgb(255 217 222)",
520
520
  "shadow": "rgba(0, 0, 0, 0.3)",
521
521
  "success": "#10B981",
522
- "tertiary": "rgb(255 179 175)",
523
- "tertiaryForeground": "rgb(104 0 14)",
522
+ "tertiary": "rgb(143 12 27)",
523
+ "tertiaryForeground": "rgb(255 218 215)",
524
524
  "text": "rgb(245 220 227)",
525
525
  "textSecondary": "rgb(219 191 200)",
526
526
  "textTertiary": "rgb(163 138 146)",
@@ -550,12 +550,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
550
550
  "primaryLight": "rgb(255 240 243)",
551
551
  "primarySubtle": "rgb(255 217 228)",
552
552
  "primarySubtleForeground": "rgb(140 0 83)",
553
- "secondary": "rgb(170 48 81)",
554
- "secondaryForeground": "rgb(255 255 255)",
553
+ "secondary": "rgb(255 217 222)",
554
+ "secondaryForeground": "rgb(138 21 58)",
555
555
  "shadow": "rgba(0, 0, 0, 0.1)",
556
556
  "success": "#10B981",
557
- "tertiary": "rgb(178 42 48)",
558
- "tertiaryForeground": "rgb(255 255 255)",
557
+ "tertiary": "rgb(255 218 215)",
558
+ "tertiaryForeground": "rgb(143 12 27)",
559
559
  "text": "rgb(37 24 29)",
560
560
  "textSecondary": "rgb(85 65 72)",
561
561
  "textTertiary": "rgb(136 113 120)",
@@ -585,12 +585,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
585
585
  "primaryLight": "rgb(29 26 36)",
586
586
  "primarySubtle": "rgb(86 0 202)",
587
587
  "primarySubtleForeground": "rgb(233 221 255)",
588
- "secondary": "rgb(227 181 255)",
589
- "secondaryForeground": "rgb(77 0 122)",
588
+ "secondary": "rgb(105 30 154)",
589
+ "secondaryForeground": "rgb(243 218 255)",
590
590
  "shadow": "rgba(0, 0, 0, 0.3)",
591
591
  "success": "#10B981",
592
- "tertiary": "rgb(254 169 255)",
593
- "tertiaryForeground": "rgb(88 0 98)",
592
+ "tertiary": "rgb(125 0 139)",
593
+ "tertiaryForeground": "rgb(255 214 251)",
594
594
  "text": "rgb(231 224 238)",
595
595
  "textSecondary": "rgb(203 195 213)",
596
596
  "textTertiary": "rgb(148 142 159)",
@@ -620,12 +620,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
620
620
  "primaryLight": "rgb(248 241 255)",
621
621
  "primarySubtle": "rgb(233 221 255)",
622
622
  "primarySubtleForeground": "rgb(86 0 202)",
623
- "secondary": "rgb(131 60 180)",
624
- "secondaryForeground": "rgb(255 255 255)",
623
+ "secondary": "rgb(243 218 255)",
624
+ "secondaryForeground": "rgb(105 30 154)",
625
625
  "shadow": "rgba(0, 0, 0, 0.1)",
626
626
  "success": "#10B981",
627
- "tertiary": "rgb(154 41 166)",
628
- "tertiaryForeground": "rgb(255 255 255)",
627
+ "tertiary": "rgb(255 214 251)",
628
+ "tertiaryForeground": "rgb(125 0 139)",
629
629
  "text": "rgb(29 26 36)",
630
630
  "textSecondary": "rgb(73 68 83)",
631
631
  "textTertiary": "rgb(122 116 132)",
@@ -655,12 +655,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
655
655
  "primaryLight": "rgb(39 24 23)",
656
656
  "primarySubtle": "rgb(147 0 19)",
657
657
  "primarySubtleForeground": "rgb(255 218 215)",
658
- "secondary": "rgb(255 181 152)",
659
- "secondaryForeground": "rgb(89 28 0)",
658
+ "secondary": "rgb(126 44 0)",
659
+ "secondaryForeground": "rgb(255 219 206)",
660
660
  "shadow": "rgba(0, 0, 0, 0.3)",
661
661
  "success": "#10B981",
662
- "tertiary": "rgb(255 183 126)",
663
- "tertiaryForeground": "rgb(77 38 0)",
662
+ "tertiary": "rgb(110 57 0)",
663
+ "tertiaryForeground": "rgb(255 220 195)",
664
664
  "text": "rgb(249 220 217)",
665
665
  "textSecondary": "rgb(223 191 188)",
666
666
  "textTertiary": "rgb(167 138 136)",
@@ -690,12 +690,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
690
690
  "primaryLight": "rgb(255 240 239)",
691
691
  "primarySubtle": "rgb(255 218 215)",
692
692
  "primarySubtleForeground": "rgb(147 0 19)",
693
- "secondary": "rgb(166 60 0)",
694
- "secondaryForeground": "rgb(255 255 255)",
693
+ "secondary": "rgb(255 219 206)",
694
+ "secondaryForeground": "rgb(126 44 0)",
695
695
  "shadow": "rgba(0, 0, 0, 0.1)",
696
696
  "success": "#10B981",
697
- "tertiary": "rgb(145 76 0)",
698
- "tertiaryForeground": "rgb(255 255 255)",
697
+ "tertiary": "rgb(255 220 195)",
698
+ "tertiaryForeground": "rgb(110 57 0)",
699
699
  "text": "rgb(39 24 23)",
700
700
  "textSecondary": "rgb(88 65 63)",
701
701
  "textTertiary": "rgb(140 113 110)",
@@ -725,12 +725,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
725
725
  "primaryLight": "rgb(20 29 35)",
726
726
  "primarySubtle": "rgb(0 76 110)",
727
727
  "primarySubtleForeground": "rgb(201 230 255)",
728
- "secondary": "rgb(164 200 255)",
729
- "secondaryForeground": "rgb(0 49 94)",
728
+ "secondary": "rgb(0 71 132)",
729
+ "secondaryForeground": "rgb(212 227 255)",
730
730
  "shadow": "rgba(0, 0, 0, 0.3)",
731
731
  "success": "#10B981",
732
- "tertiary": "rgb(183 196 255)",
733
- "tertiaryForeground": "rgb(0 38 131)",
732
+ "tertiary": "rgb(0 56 183)",
733
+ "tertiaryForeground": "rgb(221 225 255)",
734
734
  "text": "rgb(219 227 237)",
735
735
  "textSecondary": "rgb(188 200 211)",
736
736
  "textTertiary": "rgb(134 146 157)",
@@ -760,12 +760,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
760
760
  "primaryLight": "rgb(236 245 254)",
761
761
  "primarySubtle": "rgb(201 230 255)",
762
762
  "primarySubtleForeground": "rgb(0 76 110)",
763
- "secondary": "rgb(0 95 173)",
764
- "secondaryForeground": "rgb(255 255 255)",
763
+ "secondary": "rgb(212 227 255)",
764
+ "secondaryForeground": "rgb(0 71 132)",
765
765
  "shadow": "rgba(0, 0, 0, 0.1)",
766
766
  "success": "#10B981",
767
- "tertiary": "rgb(26 79 226)",
768
- "tertiaryForeground": "rgb(255 255 255)",
767
+ "tertiary": "rgb(221 225 255)",
768
+ "tertiaryForeground": "rgb(0 56 183)",
769
769
  "text": "rgb(20 29 35)",
770
770
  "textSecondary": "rgb(61 72 81)",
771
771
  "textTertiary": "rgb(109 120 131)",
@@ -795,12 +795,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
795
795
  "primaryLight": "rgb(17 29 32)",
796
796
  "primarySubtle": "rgb(0 79 88)",
797
797
  "primarySubtleForeground": "rgb(154 240 255)",
798
- "secondary": "rgb(103 211 255)",
799
- "secondaryForeground": "rgb(0 53 70)",
798
+ "secondary": "rgb(0 77 100)",
799
+ "secondaryForeground": "rgb(189 233 255)",
800
800
  "shadow": "rgba(0, 0, 0, 0.3)",
801
801
  "success": "#10B981",
802
- "tertiary": "rgb(146 204 255)",
803
- "tertiaryForeground": "rgb(0 51 81)",
802
+ "tertiary": "rgb(0 75 115)",
803
+ "tertiaryForeground": "rgb(204 229 255)",
804
804
  "text": "rgb(215 229 232)",
805
805
  "textSecondary": "rgb(184 202 205)",
806
806
  "textTertiary": "rgb(131 148 151)",
@@ -830,12 +830,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
830
830
  "primaryLight": "rgb(233 246 249)",
831
831
  "primarySubtle": "rgb(154 240 255)",
832
832
  "primarySubtleForeground": "rgb(0 79 88)",
833
- "secondary": "rgb(0 102 132)",
834
- "secondaryForeground": "rgb(255 255 255)",
833
+ "secondary": "rgb(189 233 255)",
834
+ "secondaryForeground": "rgb(0 77 100)",
835
835
  "shadow": "rgba(0, 0, 0, 0.1)",
836
836
  "success": "#10B981",
837
- "tertiary": "rgb(0 100 151)",
838
- "tertiaryForeground": "rgb(255 255 255)",
837
+ "tertiary": "rgb(204 229 255)",
838
+ "tertiaryForeground": "rgb(0 75 115)",
839
839
  "text": "rgb(17 29 32)",
840
840
  "textSecondary": "rgb(57 73 77)",
841
841
  "textTertiary": "rgb(105 122 125)",
@@ -865,12 +865,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
865
865
  "primaryLight": "rgb(33 27 13)",
866
866
  "primarySubtle": "rgb(90 67 0)",
867
867
  "primarySubtleForeground": "rgb(255 223 154)",
868
- "secondary": "rgb(232 196 0)",
869
- "secondaryForeground": "rgb(58 48 0)",
868
+ "secondary": "rgb(84 70 0)",
869
+ "secondaryForeground": "rgb(255 225 104)",
870
870
  "shadow": "rgba(0, 0, 0, 0.3)",
871
871
  "success": "#10B981",
872
- "tertiary": "rgb(213 203 0)",
873
- "tertiaryForeground": "rgb(53 50 0)",
872
+ "tertiary": "rgb(76 72 0)",
873
+ "tertiaryForeground": "rgb(243 231 0)",
874
874
  "text": "rgb(238 225 202)",
875
875
  "textSecondary": "rgb(211 197 170)",
876
876
  "textTertiary": "rgb(156 143 119)",
@@ -900,12 +900,12 @@ exports[`theme.colors snapshot for all presets (catches unintended palette shift
900
900
  "primaryLight": "rgb(255 242 221)",
901
901
  "primarySubtle": "rgb(255 223 154)",
902
902
  "primarySubtleForeground": "rgb(90 67 0)",
903
- "secondary": "rgb(111 93 0)",
904
- "secondaryForeground": "rgb(255 255 255)",
903
+ "secondary": "rgb(255 225 104)",
904
+ "secondaryForeground": "rgb(84 70 0)",
905
905
  "shadow": "rgba(0, 0, 0, 0.1)",
906
906
  "success": "#10B981",
907
- "tertiary": "rgb(102 96 0)",
908
- "tertiaryForeground": "rgb(255 255 255)",
907
+ "tertiary": "rgb(243 231 0)",
908
+ "tertiaryForeground": "rgb(76 72 0)",
909
909
  "text": "rgb(33 27 13)",
910
910
  "textSecondary": "rgb(79 70 49)",
911
911
  "textTertiary": "rgb(130 118 95)",
@@ -26,18 +26,25 @@ export function applyDarkClass(resolved: 'light' | 'dark') {
26
26
  * Includes extended tokens (card, chart-*, content-area, sidebar-*) so consumer
27
27
  * apps don't need to synthesize them.
28
28
  */
29
+ /**
30
+ * Write a pre-computed `--x -> value` record to the document root (web only).
31
+ * The single web writer primitive: both the preset path (`applyColorPresetVars`)
32
+ * and `BloomThemeProvider`'s dynamic-seed path feed their already-resolved vars
33
+ * through here, so the "write to document" logic lives in exactly one place.
34
+ */
35
+ export function applyVarsToDocument(vars: Record<string, string>) {
36
+ if (Platform.OS !== 'web' || typeof document === 'undefined') return;
37
+ const root = document.documentElement.style;
38
+ for (const [key, value] of Object.entries(vars)) {
39
+ root.setProperty(key, value);
40
+ }
41
+ }
42
+
29
43
  export function applyColorPresetVars(
30
44
  preset: AppColorName,
31
45
  resolved: 'light' | 'dark',
32
46
  accents?: ExplicitAccents,
33
47
  ) {
34
- if (Platform.OS !== 'web' || typeof document === 'undefined') return;
35
48
  if (!APP_COLOR_PRESETS[preset]) return;
36
-
37
- const vars = getResolvedTokens(preset, resolved, accents);
38
- const root = document.documentElement.style;
39
-
40
- for (const [key, value] of Object.entries(vars)) {
41
- root.setProperty(key, value);
42
- }
49
+ applyVarsToDocument(getResolvedTokens(preset, resolved, accents));
43
50
  }
@@ -26,10 +26,12 @@ export function roleColorsToPresetTokens(r: RoleColors): Record<string, string>
26
26
  '--popover-foreground': r.onSurface,
27
27
  '--primary': r.primary,
28
28
  '--primary-foreground': r.onPrimary,
29
- '--secondary': r.secondary,
30
- '--secondary-foreground': r.onSecondary,
31
- '--tertiary': r.tertiary,
32
- '--tertiary-foreground': r.onTertiary,
29
+ // shadcn `secondary`/`tertiary` are low-emphasis TONAL SURFACES → M3 container
30
+ // roles (must stay identical to `getPresetVars`; the parity test enforces it).
31
+ '--secondary': r.secondaryContainer,
32
+ '--secondary-foreground': r.onSecondaryContainer,
33
+ '--tertiary': r.tertiaryContainer,
34
+ '--tertiary-foreground': r.onTertiaryContainer,
33
35
  '--muted': r.surfaceContainerHigh,
34
36
  '--muted-foreground': r.onSurfaceVariant,
35
37
  '--accent': r.secondaryContainer,
@@ -122,17 +122,26 @@ import { getResolvedTokens } from './token-registry';
122
122
  * Defensive guard: if a host ships a react-native-css build that doesn't expose
123
123
  * `rootVariables` as a callable (it always does on @3), we bail rather than throw.
124
124
  */
125
- export function applyNativeRootVars(
126
- colorPreset: AppColorName,
127
- mode: 'light' | 'dark',
128
- accents?: ExplicitAccents,
129
- ): void {
125
+ /**
126
+ * Write a pre-computed `--x -> value` record into react-native-css's global
127
+ * `rootVariables` family. The single native writer primitive: both the preset
128
+ * path (`applyNativeRootVars`) and `BloomThemeProvider`'s dynamic-seed path feed
129
+ * their already-resolved vars through here, so the global-write logic lives in
130
+ * exactly one place.
131
+ */
132
+ export function applyVarsToRootVariables(vars: Record<string, string>): void {
130
133
  if (typeof rootVariables !== 'function') return;
131
-
132
- const vars = getResolvedTokens(colorPreset, mode, accents);
133
134
  for (const [key, value] of Object.entries(vars)) {
134
- // The family is keyed by the bare name; `getResolvedTokens` keys include `--`.
135
+ // The family is keyed by the bare name; the var keys include `--`.
135
136
  const name = key.startsWith('--') ? key.slice(2) : key;
136
137
  rootVariables(name).set([[value]]);
137
138
  }
138
139
  }
140
+
141
+ export function applyNativeRootVars(
142
+ colorPreset: AppColorName,
143
+ mode: 'light' | 'dark',
144
+ accents?: ExplicitAccents,
145
+ ): void {
146
+ applyVarsToRootVariables(getResolvedTokens(colorPreset, mode, accents));
147
+ }
@@ -31,6 +31,11 @@ import type { ExplicitAccents } from './preset-vars';
31
31
  * The signature is intentionally identical to those variants so the import site in
32
32
  * `BloomThemeProvider` is platform-agnostic.
33
33
  */
34
+ /** Neutral-default no-op of the native root-vars writer primitive. */
35
+ export function applyVarsToRootVariables(_vars: Record<string, string>): void {
36
+ // Intentionally empty — the native variant does the real work.
37
+ }
38
+
34
39
  export function applyNativeRootVars(
35
40
  _colorPreset: AppColorName,
36
41
  _mode: 'light' | 'dark',
@@ -18,6 +18,11 @@ import type { ExplicitAccents } from './preset-vars';
18
18
  * The signature is intentionally identical to the plain variant so the import
19
19
  * site in `BloomThemeProvider` is platform-agnostic.
20
20
  */
21
+ /** Web no-op of the native root-vars writer primitive (web writes to the document). */
22
+ export function applyVarsToRootVariables(_vars: Record<string, string>): void {
23
+ // Intentionally empty — web applies vars to `document.documentElement`.
24
+ }
25
+
21
26
  export function applyNativeRootVars(
22
27
  _colorPreset: AppColorName,
23
28
  _mode: 'light' | 'dark',
@@ -63,14 +63,17 @@ export function getPresetVars(
63
63
  '--popover-foreground': r.onSurface,
64
64
  '--primary': r.primary,
65
65
  '--primary-foreground': r.onPrimary,
66
- // The FIX: `secondary` is now a REAL contrast colour (the engine's secondary
67
- // role), not a mirror of `primary`.
68
- '--secondary': r.secondary,
69
- '--secondary-foreground': r.onSecondary,
70
- // The third accent of the M3 trio, exposed so `bg-tertiary` / `colors.tertiary`
71
- // work alongside primary + secondary.
72
- '--tertiary': r.tertiary,
73
- '--tertiary-foreground': r.onTertiary,
66
+ // shadcn `secondary`/`tertiary` are LOW-EMPHASIS TONAL SURFACES (the soft
67
+ // filled look of a shadcn secondary button — `bg-secondary` fills inputs,
68
+ // cards, chips, tabs), NOT the raw M3 accent. So they map to the M3 *container*
69
+ // roles (soft, brand-tinted, legible), with the on-container as the foreground.
70
+ // Mapping them to the raw accent (a dark tone-40 colour) turns every
71
+ // `bg-secondary` surface into a dark slab — the exact bug this fixes. The raw
72
+ // vivid accents remain available via the chart ramp (`--chart-2`/`--chart-3`).
73
+ '--secondary': r.secondaryContainer,
74
+ '--secondary-foreground': r.onSecondaryContainer,
75
+ '--tertiary': r.tertiaryContainer,
76
+ '--tertiary-foreground': r.onTertiaryContainer,
74
77
  '--muted': r.surfaceContainerHigh,
75
78
  '--muted-foreground': r.onSurfaceVariant,
76
79
  '--accent': r.secondaryContainer,