@oxyhq/bloom 0.7.0 → 0.7.1

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 (64) hide show
  1. package/lib/commonjs/react-native-css.d.js +2 -0
  2. package/lib/commonjs/react-native-css.d.js.map +1 -0
  3. package/lib/commonjs/theme/BloomThemeProvider.js +39 -7
  4. package/lib/commonjs/theme/BloomThemeProvider.js.map +1 -1
  5. package/lib/commonjs/theme/color-presets.js +118 -118
  6. package/lib/commonjs/theme/color-presets.js.map +1 -1
  7. package/lib/commonjs/theme/color-scope/index.js +28 -6
  8. package/lib/commonjs/theme/color-scope/index.js.map +1 -1
  9. package/lib/commonjs/theme/color-scope/style-builder.js +35 -0
  10. package/lib/commonjs/theme/color-scope/style-builder.js.map +1 -1
  11. package/lib/commonjs/theme/native-root-vars.js +105 -0
  12. package/lib/commonjs/theme/native-root-vars.js.map +1 -0
  13. package/lib/commonjs/theme/native-root-vars.web.js +27 -0
  14. package/lib/commonjs/theme/native-root-vars.web.js.map +1 -0
  15. package/lib/commonjs/theme/preset-vars.js +4 -1
  16. package/lib/commonjs/theme/preset-vars.js.map +1 -1
  17. package/lib/module/react-native-css.d.js +2 -0
  18. package/lib/module/react-native-css.d.js.map +1 -0
  19. package/lib/module/theme/BloomThemeProvider.js +40 -8
  20. package/lib/module/theme/BloomThemeProvider.js.map +1 -1
  21. package/lib/module/theme/color-presets.js +118 -118
  22. package/lib/module/theme/color-presets.js.map +1 -1
  23. package/lib/module/theme/color-scope/index.js +29 -7
  24. package/lib/module/theme/color-scope/index.js.map +1 -1
  25. package/lib/module/theme/color-scope/style-builder.js +35 -0
  26. package/lib/module/theme/color-scope/style-builder.js.map +1 -1
  27. package/lib/module/theme/native-root-vars.js +101 -0
  28. package/lib/module/theme/native-root-vars.js.map +1 -0
  29. package/lib/module/theme/native-root-vars.web.js +23 -0
  30. package/lib/module/theme/native-root-vars.web.js.map +1 -0
  31. package/lib/module/theme/preset-vars.js +4 -1
  32. package/lib/module/theme/preset-vars.js.map +1 -1
  33. package/lib/typescript/commonjs/icons/common.d.ts +8 -8
  34. package/lib/typescript/commonjs/theme/BloomThemeProvider.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/theme/color-scope/index.d.ts +9 -2
  36. package/lib/typescript/commonjs/theme/color-scope/index.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts +32 -0
  38. package/lib/typescript/commonjs/theme/color-scope/style-builder.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/theme/native-root-vars.d.ts +89 -0
  40. package/lib/typescript/commonjs/theme/native-root-vars.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts +20 -0
  42. package/lib/typescript/commonjs/theme/native-root-vars.web.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/theme/preset-vars.d.ts.map +1 -1
  44. package/lib/typescript/module/icons/common.d.ts +8 -8
  45. package/lib/typescript/module/theme/BloomThemeProvider.d.ts.map +1 -1
  46. package/lib/typescript/module/theme/color-scope/index.d.ts +9 -2
  47. package/lib/typescript/module/theme/color-scope/index.d.ts.map +1 -1
  48. package/lib/typescript/module/theme/color-scope/style-builder.d.ts +32 -0
  49. package/lib/typescript/module/theme/color-scope/style-builder.d.ts.map +1 -1
  50. package/lib/typescript/module/theme/native-root-vars.d.ts +89 -0
  51. package/lib/typescript/module/theme/native-root-vars.d.ts.map +1 -0
  52. package/lib/typescript/module/theme/native-root-vars.web.d.ts +20 -0
  53. package/lib/typescript/module/theme/native-root-vars.web.d.ts.map +1 -0
  54. package/lib/typescript/module/theme/preset-vars.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/src/__tests__/native-root-vars.test.ts +125 -0
  57. package/src/react-native-css.d.ts +69 -0
  58. package/src/theme/BloomThemeProvider.tsx +32 -6
  59. package/src/theme/color-presets.ts +118 -118
  60. package/src/theme/color-scope/index.tsx +30 -8
  61. package/src/theme/color-scope/style-builder.ts +40 -0
  62. package/src/theme/native-root-vars.ts +102 -0
  63. package/src/theme/native-root-vars.web.ts +22 -0
  64. package/src/theme/preset-vars.ts +4 -1
@@ -53,25 +53,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
53
53
  name: 'teal',
54
54
  hex: '#005c67',
55
55
  light: {
56
- '--background': '0 0% 99%',
56
+ '--background': '185 8% 99%',
57
57
  '--foreground': '0 0% 12%',
58
- '--surface': '185 10% 97%',
58
+ '--surface': '185 14% 97%',
59
59
  '--surface-foreground': '0 0% 12%',
60
- '--popover': '0 0% 100%',
60
+ '--popover': '185 12% 99%',
61
61
  '--popover-foreground': '0 0% 12%',
62
62
  '--primary': '185 100% 20%',
63
63
  '--primary-foreground': '0 0% 100%',
64
- '--secondary': '185 8% 95%',
64
+ '--secondary': '185 12% 95%',
65
65
  '--secondary-foreground': '0 0% 12%',
66
- '--muted': '185 8% 95%',
66
+ '--muted': '185 12% 95%',
67
67
  '--muted-foreground': '185 5% 42%',
68
- '--accent': '185 8% 95%',
68
+ '--accent': '185 12% 95%',
69
69
  '--accent-foreground': '0 0% 12%',
70
70
  '--destructive': '0 84% 60%',
71
- '--border': '185 8% 88%',
72
- '--input': '185 8% 88%',
71
+ '--border': '185 14% 88%',
72
+ '--input': '185 14% 88%',
73
73
  '--ring': '185 100% 20%',
74
- '--sidebar': '185 10% 97%',
74
+ '--sidebar': '185 14% 97%',
75
75
  },
76
76
  dark: {
77
77
  '--background': '185 50% 5%',
@@ -100,25 +100,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
100
100
  name: 'blue',
101
101
  hex: '#1D9BF0',
102
102
  light: {
103
- '--background': '0 0% 99%',
103
+ '--background': '205 8% 99%',
104
104
  '--foreground': '0 0% 12%',
105
- '--surface': '205 10% 97%',
105
+ '--surface': '205 14% 97%',
106
106
  '--surface-foreground': '0 0% 12%',
107
- '--popover': '0 0% 100%',
107
+ '--popover': '205 12% 99%',
108
108
  '--popover-foreground': '0 0% 12%',
109
109
  '--primary': '205 87% 53%',
110
110
  '--primary-foreground': '0 0% 100%',
111
- '--secondary': '205 8% 95%',
111
+ '--secondary': '205 12% 95%',
112
112
  '--secondary-foreground': '0 0% 12%',
113
- '--muted': '205 8% 95%',
113
+ '--muted': '205 12% 95%',
114
114
  '--muted-foreground': '205 5% 42%',
115
- '--accent': '205 8% 95%',
115
+ '--accent': '205 12% 95%',
116
116
  '--accent-foreground': '0 0% 12%',
117
117
  '--destructive': '0 84% 60%',
118
- '--border': '205 8% 88%',
119
- '--input': '205 8% 88%',
118
+ '--border': '205 14% 88%',
119
+ '--input': '205 14% 88%',
120
120
  '--ring': '205 87% 53%',
121
- '--sidebar': '205 10% 97%',
121
+ '--sidebar': '205 14% 97%',
122
122
  },
123
123
  dark: {
124
124
  '--background': '205 50% 5%',
@@ -147,25 +147,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
147
147
  name: 'green',
148
148
  hex: '#10B981',
149
149
  light: {
150
- '--background': '0 0% 99%',
150
+ '--background': '160 8% 99%',
151
151
  '--foreground': '0 0% 12%',
152
- '--surface': '160 10% 97%',
152
+ '--surface': '160 14% 97%',
153
153
  '--surface-foreground': '0 0% 12%',
154
- '--popover': '0 0% 100%',
154
+ '--popover': '160 12% 99%',
155
155
  '--popover-foreground': '0 0% 12%',
156
156
  '--primary': '160 84% 39%',
157
157
  '--primary-foreground': '0 0% 100%',
158
- '--secondary': '160 8% 95%',
158
+ '--secondary': '160 12% 95%',
159
159
  '--secondary-foreground': '0 0% 12%',
160
- '--muted': '160 8% 95%',
160
+ '--muted': '160 12% 95%',
161
161
  '--muted-foreground': '160 5% 42%',
162
- '--accent': '160 8% 95%',
162
+ '--accent': '160 12% 95%',
163
163
  '--accent-foreground': '0 0% 12%',
164
164
  '--destructive': '0 84% 60%',
165
- '--border': '160 8% 88%',
166
- '--input': '160 8% 88%',
165
+ '--border': '160 14% 88%',
166
+ '--input': '160 14% 88%',
167
167
  '--ring': '160 84% 39%',
168
- '--sidebar': '160 10% 97%',
168
+ '--sidebar': '160 14% 97%',
169
169
  },
170
170
  dark: {
171
171
  '--background': '160 50% 5%',
@@ -194,25 +194,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
194
194
  name: 'amber',
195
195
  hex: '#F59E0B',
196
196
  light: {
197
- '--background': '0 0% 99%',
197
+ '--background': '38 8% 99%',
198
198
  '--foreground': '0 0% 12%',
199
- '--surface': '38 10% 97%',
199
+ '--surface': '38 14% 97%',
200
200
  '--surface-foreground': '0 0% 12%',
201
- '--popover': '0 0% 100%',
201
+ '--popover': '38 12% 99%',
202
202
  '--popover-foreground': '0 0% 12%',
203
203
  '--primary': '38 92% 50%',
204
204
  '--primary-foreground': '0 0% 0%',
205
- '--secondary': '38 8% 95%',
205
+ '--secondary': '38 12% 95%',
206
206
  '--secondary-foreground': '0 0% 12%',
207
- '--muted': '38 8% 95%',
207
+ '--muted': '38 12% 95%',
208
208
  '--muted-foreground': '38 5% 42%',
209
- '--accent': '38 8% 95%',
209
+ '--accent': '38 12% 95%',
210
210
  '--accent-foreground': '0 0% 12%',
211
211
  '--destructive': '0 84% 60%',
212
- '--border': '38 8% 88%',
213
- '--input': '38 8% 88%',
212
+ '--border': '38 14% 88%',
213
+ '--input': '38 14% 88%',
214
214
  '--ring': '38 92% 50%',
215
- '--sidebar': '38 10% 97%',
215
+ '--sidebar': '38 14% 97%',
216
216
  },
217
217
  dark: {
218
218
  '--background': '38 50% 5%',
@@ -241,25 +241,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
241
241
  name: 'yellow',
242
242
  hex: '#ffc300',
243
243
  light: {
244
- '--background': '0 0% 99%',
244
+ '--background': '46 8% 99%',
245
245
  '--foreground': '0 0% 12%',
246
- '--surface': '46 10% 97%',
246
+ '--surface': '46 14% 97%',
247
247
  '--surface-foreground': '0 0% 12%',
248
- '--popover': '0 0% 100%',
248
+ '--popover': '46 12% 99%',
249
249
  '--popover-foreground': '0 0% 12%',
250
250
  '--primary': '46 100% 50%',
251
251
  '--primary-foreground': '0 0% 0%',
252
- '--secondary': '46 8% 95%',
252
+ '--secondary': '46 12% 95%',
253
253
  '--secondary-foreground': '0 0% 12%',
254
- '--muted': '46 8% 95%',
254
+ '--muted': '46 12% 95%',
255
255
  '--muted-foreground': '46 5% 42%',
256
- '--accent': '46 8% 95%',
256
+ '--accent': '46 12% 95%',
257
257
  '--accent-foreground': '0 0% 12%',
258
258
  '--destructive': '0 84% 60%',
259
- '--border': '46 8% 88%',
260
- '--input': '46 8% 88%',
259
+ '--border': '46 14% 88%',
260
+ '--input': '46 14% 88%',
261
261
  '--ring': '46 100% 50%',
262
- '--sidebar': '46 10% 97%',
262
+ '--sidebar': '46 14% 97%',
263
263
  },
264
264
  dark: {
265
265
  '--background': '46 50% 5%',
@@ -288,25 +288,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
288
288
  name: 'red',
289
289
  hex: '#EF4444',
290
290
  light: {
291
- '--background': '0 0% 99%',
291
+ '--background': '0 8% 99%',
292
292
  '--foreground': '0 0% 12%',
293
- '--surface': '0 10% 97%',
293
+ '--surface': '0 14% 97%',
294
294
  '--surface-foreground': '0 0% 12%',
295
- '--popover': '0 0% 100%',
295
+ '--popover': '0 12% 99%',
296
296
  '--popover-foreground': '0 0% 12%',
297
297
  '--primary': '0 84% 60%',
298
298
  '--primary-foreground': '0 0% 100%',
299
- '--secondary': '0 8% 95%',
299
+ '--secondary': '0 12% 95%',
300
300
  '--secondary-foreground': '0 0% 12%',
301
- '--muted': '0 8% 95%',
301
+ '--muted': '0 12% 95%',
302
302
  '--muted-foreground': '0 5% 42%',
303
- '--accent': '0 8% 95%',
303
+ '--accent': '0 12% 95%',
304
304
  '--accent-foreground': '0 0% 12%',
305
305
  '--destructive': '0 84% 60%',
306
- '--border': '0 8% 88%',
307
- '--input': '0 8% 88%',
306
+ '--border': '0 14% 88%',
307
+ '--input': '0 14% 88%',
308
308
  '--ring': '0 84% 60%',
309
- '--sidebar': '0 10% 97%',
309
+ '--sidebar': '0 14% 97%',
310
310
  },
311
311
  dark: {
312
312
  '--background': '0 50% 5%',
@@ -335,25 +335,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
335
335
  name: 'purple',
336
336
  hex: '#8B5CF6',
337
337
  light: {
338
- '--background': '0 0% 99%',
338
+ '--background': '258 8% 99%',
339
339
  '--foreground': '0 0% 12%',
340
- '--surface': '258 10% 97%',
340
+ '--surface': '258 14% 97%',
341
341
  '--surface-foreground': '0 0% 12%',
342
- '--popover': '0 0% 100%',
342
+ '--popover': '258 12% 99%',
343
343
  '--popover-foreground': '0 0% 12%',
344
344
  '--primary': '258 90% 66%',
345
345
  '--primary-foreground': '0 0% 100%',
346
- '--secondary': '258 8% 95%',
346
+ '--secondary': '258 12% 95%',
347
347
  '--secondary-foreground': '0 0% 12%',
348
- '--muted': '258 8% 95%',
348
+ '--muted': '258 12% 95%',
349
349
  '--muted-foreground': '258 5% 42%',
350
- '--accent': '258 8% 95%',
350
+ '--accent': '258 12% 95%',
351
351
  '--accent-foreground': '0 0% 12%',
352
352
  '--destructive': '0 84% 60%',
353
- '--border': '258 8% 88%',
354
- '--input': '258 8% 88%',
353
+ '--border': '258 14% 88%',
354
+ '--input': '258 14% 88%',
355
355
  '--ring': '258 90% 66%',
356
- '--sidebar': '258 10% 97%',
356
+ '--sidebar': '258 14% 97%',
357
357
  },
358
358
  dark: {
359
359
  '--background': '258 50% 5%',
@@ -382,25 +382,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
382
382
  name: 'pink',
383
383
  hex: '#EC4899',
384
384
  light: {
385
- '--background': '0 0% 99%',
385
+ '--background': '330 8% 99%',
386
386
  '--foreground': '0 0% 12%',
387
- '--surface': '330 10% 97%',
387
+ '--surface': '330 14% 97%',
388
388
  '--surface-foreground': '0 0% 12%',
389
- '--popover': '0 0% 100%',
389
+ '--popover': '330 12% 99%',
390
390
  '--popover-foreground': '0 0% 12%',
391
391
  '--primary': '330 81% 60%',
392
392
  '--primary-foreground': '0 0% 100%',
393
- '--secondary': '330 8% 95%',
393
+ '--secondary': '330 12% 95%',
394
394
  '--secondary-foreground': '0 0% 12%',
395
- '--muted': '330 8% 95%',
395
+ '--muted': '330 12% 95%',
396
396
  '--muted-foreground': '330 5% 42%',
397
- '--accent': '330 8% 95%',
397
+ '--accent': '330 12% 95%',
398
398
  '--accent-foreground': '0 0% 12%',
399
399
  '--destructive': '0 84% 60%',
400
- '--border': '330 8% 88%',
401
- '--input': '330 8% 88%',
400
+ '--border': '330 14% 88%',
401
+ '--input': '330 14% 88%',
402
402
  '--ring': '330 81% 60%',
403
- '--sidebar': '330 10% 97%',
403
+ '--sidebar': '330 14% 97%',
404
404
  },
405
405
  dark: {
406
406
  '--background': '330 50% 5%',
@@ -429,25 +429,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
429
429
  name: 'sky',
430
430
  hex: '#0EA5E9',
431
431
  light: {
432
- '--background': '0 0% 99%',
432
+ '--background': '199 8% 99%',
433
433
  '--foreground': '0 0% 12%',
434
- '--surface': '199 10% 97%',
434
+ '--surface': '199 14% 97%',
435
435
  '--surface-foreground': '0 0% 12%',
436
- '--popover': '0 0% 100%',
436
+ '--popover': '199 12% 99%',
437
437
  '--popover-foreground': '0 0% 12%',
438
438
  '--primary': '199 89% 48%',
439
439
  '--primary-foreground': '0 0% 100%',
440
- '--secondary': '199 8% 95%',
440
+ '--secondary': '199 12% 95%',
441
441
  '--secondary-foreground': '0 0% 12%',
442
- '--muted': '199 8% 95%',
442
+ '--muted': '199 12% 95%',
443
443
  '--muted-foreground': '199 5% 42%',
444
- '--accent': '199 8% 95%',
444
+ '--accent': '199 12% 95%',
445
445
  '--accent-foreground': '0 0% 12%',
446
446
  '--destructive': '0 84% 60%',
447
- '--border': '199 8% 88%',
448
- '--input': '199 8% 88%',
447
+ '--border': '199 14% 88%',
448
+ '--input': '199 14% 88%',
449
449
  '--ring': '199 89% 48%',
450
- '--sidebar': '199 10% 97%',
450
+ '--sidebar': '199 14% 97%',
451
451
  },
452
452
  dark: {
453
453
  '--background': '199 50% 5%',
@@ -476,25 +476,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
476
476
  name: 'orange',
477
477
  hex: '#F97316',
478
478
  light: {
479
- '--background': '0 0% 99%',
479
+ '--background': '25 8% 99%',
480
480
  '--foreground': '0 0% 12%',
481
- '--surface': '25 10% 97%',
481
+ '--surface': '25 14% 97%',
482
482
  '--surface-foreground': '0 0% 12%',
483
- '--popover': '0 0% 100%',
483
+ '--popover': '25 12% 99%',
484
484
  '--popover-foreground': '0 0% 12%',
485
485
  '--primary': '25 95% 53%',
486
486
  '--primary-foreground': '0 0% 100%',
487
- '--secondary': '25 8% 95%',
487
+ '--secondary': '25 12% 95%',
488
488
  '--secondary-foreground': '0 0% 12%',
489
- '--muted': '25 8% 95%',
489
+ '--muted': '25 12% 95%',
490
490
  '--muted-foreground': '25 5% 42%',
491
- '--accent': '25 8% 95%',
491
+ '--accent': '25 12% 95%',
492
492
  '--accent-foreground': '0 0% 12%',
493
493
  '--destructive': '0 84% 60%',
494
- '--border': '25 8% 88%',
495
- '--input': '25 8% 88%',
494
+ '--border': '25 14% 88%',
495
+ '--input': '25 14% 88%',
496
496
  '--ring': '25 95% 53%',
497
- '--sidebar': '25 10% 97%',
497
+ '--sidebar': '25 14% 97%',
498
498
  },
499
499
  dark: {
500
500
  '--background': '25 50% 5%',
@@ -523,25 +523,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
523
523
  name: 'mint',
524
524
  hex: '#14B8A6',
525
525
  light: {
526
- '--background': '0 0% 99%',
526
+ '--background': '173 8% 99%',
527
527
  '--foreground': '0 0% 12%',
528
- '--surface': '173 10% 97%',
528
+ '--surface': '173 14% 97%',
529
529
  '--surface-foreground': '0 0% 12%',
530
- '--popover': '0 0% 100%',
530
+ '--popover': '173 12% 99%',
531
531
  '--popover-foreground': '0 0% 12%',
532
532
  '--primary': '173 80% 40%',
533
533
  '--primary-foreground': '0 0% 100%',
534
- '--secondary': '173 8% 95%',
534
+ '--secondary': '173 12% 95%',
535
535
  '--secondary-foreground': '0 0% 12%',
536
- '--muted': '173 8% 95%',
536
+ '--muted': '173 12% 95%',
537
537
  '--muted-foreground': '173 5% 42%',
538
- '--accent': '173 8% 95%',
538
+ '--accent': '173 12% 95%',
539
539
  '--accent-foreground': '0 0% 12%',
540
540
  '--destructive': '0 84% 60%',
541
- '--border': '173 8% 88%',
542
- '--input': '173 8% 88%',
541
+ '--border': '173 14% 88%',
542
+ '--input': '173 14% 88%',
543
543
  '--ring': '173 80% 40%',
544
- '--sidebar': '173 10% 97%',
544
+ '--sidebar': '173 14% 97%',
545
545
  },
546
546
  dark: {
547
547
  '--background': '173 50% 5%',
@@ -570,25 +570,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
570
570
  name: 'oxy',
571
571
  hex: '#c46ede',
572
572
  light: {
573
- '--background': '0 0% 99%',
573
+ '--background': '277 8% 99%',
574
574
  '--foreground': '0 0% 12%',
575
- '--surface': '277 10% 97%',
575
+ '--surface': '277 14% 97%',
576
576
  '--surface-foreground': '0 0% 12%',
577
- '--popover': '0 0% 100%',
577
+ '--popover': '277 12% 99%',
578
578
  '--popover-foreground': '0 0% 12%',
579
579
  '--primary': '277 66% 56%',
580
580
  '--primary-foreground': '0 0% 100%',
581
- '--secondary': '277 8% 95%',
581
+ '--secondary': '277 12% 95%',
582
582
  '--secondary-foreground': '0 0% 12%',
583
- '--muted': '277 8% 95%',
583
+ '--muted': '277 12% 95%',
584
584
  '--muted-foreground': '277 5% 42%',
585
- '--accent': '277 8% 95%',
585
+ '--accent': '277 12% 95%',
586
586
  '--accent-foreground': '0 0% 12%',
587
587
  '--destructive': '0 84% 60%',
588
- '--border': '277 8% 88%',
589
- '--input': '277 8% 88%',
588
+ '--border': '277 14% 88%',
589
+ '--input': '277 14% 88%',
590
590
  '--ring': '277 66% 56%',
591
- '--sidebar': '277 10% 97%',
591
+ '--sidebar': '277 14% 97%',
592
592
  },
593
593
  dark: {
594
594
  '--background': '277 50% 5%',
@@ -616,25 +616,25 @@ export const APP_COLOR_PRESETS: Record<AppColorName, AppColorPreset> = {
616
616
  name: 'faircoin',
617
617
  hex: '#9ffb50',
618
618
  light: {
619
- '--background': '0 0% 99%',
619
+ '--background': '92 8% 99%',
620
620
  '--foreground': '0 0% 12%',
621
- '--surface': '92 12% 95%',
621
+ '--surface': '92 16% 95%',
622
622
  '--surface-foreground': '0 0% 12%',
623
- '--popover': '0 0% 100%',
623
+ '--popover': '92 12% 99%',
624
624
  '--popover-foreground': '0 0% 12%',
625
625
  '--primary': '92 90% 25%',
626
626
  '--primary-foreground': '0 0% 100%',
627
- '--secondary': '92 10% 92%',
627
+ '--secondary': '92 14% 92%',
628
628
  '--secondary-foreground': '0 0% 12%',
629
- '--muted': '92 8% 93%',
630
- '--muted-foreground': '0 0% 40%',
631
- '--accent': '92 10% 92%',
629
+ '--muted': '92 12% 93%',
630
+ '--muted-foreground': '92 5% 40%',
631
+ '--accent': '92 14% 92%',
632
632
  '--accent-foreground': '0 0% 12%',
633
633
  '--destructive': '0 84% 60%',
634
- '--border': '92 8% 85%',
635
- '--input': '92 8% 85%',
634
+ '--border': '92 12% 85%',
635
+ '--input': '92 12% 85%',
636
636
  '--ring': '92 90% 25%',
637
- '--sidebar': '92 12% 95%',
637
+ '--sidebar': '92 16% 95%',
638
638
  },
639
639
  dark: {
640
640
  '--background': '69 54% 8%',
@@ -4,7 +4,7 @@ import { View, type StyleProp, type ViewStyle } from 'react-native';
4
4
  import { BloomThemeContext, type BloomThemeContextValue } from '../BloomThemeProvider';
5
5
  import { buildTheme } from '../build-theme';
6
6
  import type { AppColorName } from '../color-presets';
7
- import { buildNativePresetStyle } from './style-builder';
7
+ import { buildNativePresetStyle, buildScopeVars, getVariableContextProvider } from './style-builder';
8
8
 
9
9
  export interface BloomColorScopeProps {
10
10
  /**
@@ -46,10 +46,15 @@ export function BloomColorScope({
46
46
  return { ...parent, theme, colorPreset };
47
47
  }, [colorPreset, resolvedMode, parent]);
48
48
 
49
- const varsStyle = useMemo(
50
- () => buildNativePresetStyle(colorPreset, resolvedMode),
49
+ // Preset vars flow to the subtree through react-native-css's real
50
+ // VariableContext (`VariableContextProvider`), NOT via an inline `vars()`
51
+ // style — under react-native-css@3 inline vars applied to a plain `<View>`
52
+ // (no matched className rules) are dropped silently. See `style-builder.ts`.
53
+ const nativeVars = useMemo(
54
+ () => buildScopeVars(colorPreset, resolvedMode),
51
55
  [colorPreset, resolvedMode],
52
56
  );
57
+ const VariableProvider = getVariableContextProvider();
53
58
 
54
59
  let content: React.ReactNode;
55
60
  if (asChild) {
@@ -59,20 +64,37 @@ export function BloomColorScope({
59
64
  'BloomColorScope with `asChild` requires a single React element child that accepts a `style` prop.',
60
65
  );
61
66
  }
67
+ // The vars no longer ride on the child's `style`; merge only the caller's
68
+ // `style` and the child's own `style` (child last so its styles win).
62
69
  const childStyle = child.props.style;
63
- const mergedStyle: StyleProp<ViewStyle> = [varsStyle, style, childStyle];
70
+ const mergedStyle: StyleProp<ViewStyle> = [style, childStyle];
64
71
  content = cloneElement(child, { style: mergedStyle });
65
72
  } else {
66
- content = <View style={[{ flex: 1 }, varsStyle, style]}>{children}</View>;
73
+ content = <View style={[{ flex: 1 }, style]}>{children}</View>;
67
74
  }
68
75
 
69
- return <BloomThemeContext.Provider value={contextValue}>{content}</BloomThemeContext.Provider>;
76
+ // Wrap the subtree in the variable provider when NativeWind is available;
77
+ // otherwise render as-is so we never crash on web/non-NativeWind hosts.
78
+ const scoped = VariableProvider ? (
79
+ <VariableProvider value={nativeVars}>{content}</VariableProvider>
80
+ ) : (
81
+ content
82
+ );
83
+
84
+ return <BloomThemeContext.Provider value={contextValue}>{scoped}</BloomThemeContext.Provider>;
70
85
  }
71
86
 
72
87
  /**
73
88
  * Escape hatch for advanced cases where the wrapping element is owned by the
74
- * caller. Returns a stable native style object carrying the preset's CSS vars.
75
- * Returns `undefined` on web or when `nativewind` is not installed.
89
+ * caller. Returns a stable native style object carrying the preset's CSS vars
90
+ * via NativeWind's `vars()`. Returns `undefined` on web or when `nativewind`
91
+ * is not installed.
92
+ *
93
+ * NOTE: subject to the react-native-css@3 limitation — the returned style only
94
+ * propagates vars to descendants when applied to an interop className component
95
+ * (the runtime gates propagation on matched className style rules). It is a
96
+ * no-op on a plain `<View>` with no `className`. For the common case prefer
97
+ * `<BloomColorScope>`, which wraps children in `VariableContextProvider`.
76
98
  */
77
99
  export function useColorScopeStyle(colorPreset: AppColorName): StyleProp<ViewStyle> {
78
100
  const parent = useContext(BloomThemeContext);
@@ -1,11 +1,24 @@
1
+ import type React from 'react';
1
2
  import { Platform, type StyleProp, type ViewStyle } from 'react-native';
2
3
 
3
4
  import { getPresetVars } from '../preset-vars';
4
5
  import type { AppColorName } from '../color-presets';
5
6
  import { lazyRequire } from '../../utils/lazy-require';
6
7
 
8
+ /**
9
+ * Component that provides inline CSS variables to a subtree via NativeWind's
10
+ * (react-native-css's) real `VariableContext`. The runtime strips the leading
11
+ * `--` from each key internally, so we feed it the full `--name -> value`
12
+ * record produced by `buildScopeVars`.
13
+ */
14
+ export type VariableContextProviderComponent = React.ComponentType<{
15
+ value: Record<string, string>;
16
+ children: React.ReactNode;
17
+ }>;
18
+
7
19
  interface NativeWindVarsModule {
8
20
  vars: (record: Record<string, string>) => StyleProp<ViewStyle>;
21
+ VariableContextProvider?: VariableContextProviderComponent;
9
22
  }
10
23
 
11
24
  const getNativeWindVars = lazyRequire<NativeWindVarsModule>('nativewind');
@@ -22,11 +35,38 @@ export function buildScopeVars(
22
35
  return getPresetVars(colorPreset, mode, { includeResolvedColorVars: true });
23
36
  }
24
37
 
38
+ /**
39
+ * Resolve NativeWind's `VariableContextProvider` — the canonical, non-deprecated
40
+ * react-native-css v3 API for providing inline CSS variables to a subtree. It
41
+ * reads the same `VariableContext` that interop className components consume, so
42
+ * descendants resolve `var(--primary)` etc. correctly. Returns `null` on web or
43
+ * when `nativewind` is not installed.
44
+ *
45
+ * This replaces the deprecated `vars()`-on-a-plain-`<View>`-style mechanism:
46
+ * under react-native-css@3, `vars()` returns an inline-vars marker that is only
47
+ * propagated to children when the host element matches className style rules
48
+ * (`usesVariables`/`variables`). A plain `<View>` with no `className` drops the
49
+ * vars silently, so the subtree renders without the preset palette.
50
+ */
51
+ export function getVariableContextProvider(): VariableContextProviderComponent | null {
52
+ if (Platform.OS === 'web') return null;
53
+ const module = getNativeWindVars();
54
+ if (!module || typeof module.VariableContextProvider !== 'function') return null;
55
+ return module.VariableContextProvider;
56
+ }
57
+
25
58
  /**
26
59
  * Build a native style object carrying every CSS var of the preset, using
27
60
  * NativeWind's `vars()` when available. Returns `undefined` on web (where the
28
61
  * provider writes vars to `documentElement` instead) or when `nativewind` is
29
62
  * not installed.
63
+ *
64
+ * @deprecated Under react-native-css@3, `vars()` only propagates to a subtree
65
+ * when applied to an interop className component (the runtime gates propagation
66
+ * on matched className style rules). Applied to a plain `<View>` the vars are
67
+ * dropped silently. Prefer wrapping children in `getVariableContextProvider()`.
68
+ * Retained only as the escape-hatch contract of `useColorScopeStyle`, where the
69
+ * caller owns the host element and is expected to be a className component.
30
70
  */
31
71
  export function buildNativePresetStyle(
32
72
  colorPreset: AppColorName,