@oxyhq/bloom 0.6.12 → 0.6.13
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.
- package/lib/commonjs/theme/apply-dark-class.js +6 -1
- package/lib/commonjs/theme/apply-dark-class.js.map +1 -1
- package/lib/module/theme/apply-dark-class.js +6 -1
- package/lib/module/theme/apply-dark-class.js.map +1 -1
- package/lib/typescript/commonjs/theme/apply-dark-class.d.ts +5 -0
- package/lib/typescript/commonjs/theme/apply-dark-class.d.ts.map +1 -1
- package/lib/typescript/module/theme/apply-dark-class.d.ts +5 -0
- package/lib/typescript/module/theme/apply-dark-class.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/theme/apply-dark-class.ts +6 -1
|
@@ -16,6 +16,11 @@ function applyDarkClass(resolved) {
|
|
|
16
16
|
/**
|
|
17
17
|
* Apply a color preset's CSS custom properties to the document root.
|
|
18
18
|
* No-op on native — only affects web.
|
|
19
|
+
*
|
|
20
|
+
* Values are written as raw HSL triples (e.g. `185 100% 20%`), matching the
|
|
21
|
+
* shadcn/Tailwind convention where stylesheets wrap them themselves with
|
|
22
|
+
* `hsl(var(--primary))`. Writing pre-resolved `hsl(...)` values here would
|
|
23
|
+
* produce invalid `hsl(hsl(...))` in consuming stylesheets and break theming.
|
|
19
24
|
*/
|
|
20
25
|
function applyColorPresetVars(preset, resolved) {
|
|
21
26
|
if (_reactNative.Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
@@ -24,7 +29,7 @@ function applyColorPresetVars(preset, resolved) {
|
|
|
24
29
|
const vars = resolved === 'dark' ? config.dark : config.light;
|
|
25
30
|
const root = document.documentElement.style;
|
|
26
31
|
for (const [key, value] of Object.entries(vars)) {
|
|
27
|
-
root.setProperty(key,
|
|
32
|
+
root.setProperty(key, value);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
//# sourceMappingURL=apply-dark-class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_colorPresets","applyDarkClass","resolved","Platform","OS","document","documentElement","classList","toggle","applyColorPresetVars","preset","config","APP_COLOR_PRESETS","vars","dark","light","root","style","key","value","Object","entries","setProperty"],"sourceRoot":"../../../src","sources":["theme/apply-dark-class.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,SAASE,cAAcA,CAACC,QAA0B,EAAE;EACzD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;IAC5DA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,MAAM,EAAEN,QAAQ,KAAK,MAAM,CAAC;EACxE;AACF;;AAEA;AACA;AACA;AACA;AACO,SAASO,oBAAoBA,CAACC,MAAoB,EAAER,QAA0B,EAAE;EACrF,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAE9D,MAAMM,MAAM,GAAGC,+BAAiB,CAACF,MAAM,CAAC;EACxC,IAAI,CAACC,MAAM,EAAE;EAEb,MAAME,IAAI,GAAGX,QAAQ,KAAK,MAAM,GAAGS,MAAM,CAACG,IAAI,GAAGH,MAAM,CAACI,KAAK;EAC7D,MAAMC,IAAI,GAAGX,QAAQ,CAACC,eAAe,CAACW,KAAK;EAE3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,IAAI,CAAC,EAAE;IAC/CG,IAAI,CAACM,WAAW,CAACJ,GAAG,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_colorPresets","applyDarkClass","resolved","Platform","OS","document","documentElement","classList","toggle","applyColorPresetVars","preset","config","APP_COLOR_PRESETS","vars","dark","light","root","style","key","value","Object","entries","setProperty"],"sourceRoot":"../../../src","sources":["theme/apply-dark-class.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAEO,SAASE,cAAcA,CAACC,QAA0B,EAAE;EACzD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;IAC5DA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,MAAM,EAAEN,QAAQ,KAAK,MAAM,CAAC;EACxE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,oBAAoBA,CAACC,MAAoB,EAAER,QAA0B,EAAE;EACrF,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAE9D,MAAMM,MAAM,GAAGC,+BAAiB,CAACF,MAAM,CAAC;EACxC,IAAI,CAACC,MAAM,EAAE;EAEb,MAAME,IAAI,GAAGX,QAAQ,KAAK,MAAM,GAAGS,MAAM,CAACG,IAAI,GAAGH,MAAM,CAACI,KAAK;EAC7D,MAAMC,IAAI,GAAGX,QAAQ,CAACC,eAAe,CAACW,KAAK;EAE3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,IAAI,CAAC,EAAE;IAC/CG,IAAI,CAACM,WAAW,CAACJ,GAAG,EAAEC,KAAK,CAAC;EAC9B;AACF","ignoreList":[]}
|
|
@@ -11,6 +11,11 @@ export function applyDarkClass(resolved) {
|
|
|
11
11
|
/**
|
|
12
12
|
* Apply a color preset's CSS custom properties to the document root.
|
|
13
13
|
* No-op on native — only affects web.
|
|
14
|
+
*
|
|
15
|
+
* Values are written as raw HSL triples (e.g. `185 100% 20%`), matching the
|
|
16
|
+
* shadcn/Tailwind convention where stylesheets wrap them themselves with
|
|
17
|
+
* `hsl(var(--primary))`. Writing pre-resolved `hsl(...)` values here would
|
|
18
|
+
* produce invalid `hsl(hsl(...))` in consuming stylesheets and break theming.
|
|
14
19
|
*/
|
|
15
20
|
export function applyColorPresetVars(preset, resolved) {
|
|
16
21
|
if (Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
@@ -19,7 +24,7 @@ export function applyColorPresetVars(preset, resolved) {
|
|
|
19
24
|
const vars = resolved === 'dark' ? config.dark : config.light;
|
|
20
25
|
const root = document.documentElement.style;
|
|
21
26
|
for (const [key, value] of Object.entries(vars)) {
|
|
22
|
-
root.setProperty(key,
|
|
27
|
+
root.setProperty(key, value);
|
|
23
28
|
}
|
|
24
29
|
}
|
|
25
30
|
//# sourceMappingURL=apply-dark-class.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","APP_COLOR_PRESETS","applyDarkClass","resolved","OS","document","documentElement","classList","toggle","applyColorPresetVars","preset","config","vars","dark","light","root","style","key","value","Object","entries","setProperty"],"sourceRoot":"../../../src","sources":["theme/apply-dark-class.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,iBAAiB,QAA2B,oBAAiB;AAEtE,OAAO,SAASC,cAAcA,CAACC,QAA0B,EAAE;EACzD,IAAIH,QAAQ,CAACI,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;IAC5DA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,MAAM,EAAEL,QAAQ,KAAK,MAAM,CAAC;EACxE;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASM,oBAAoBA,CAACC,MAAoB,EAAEP,QAA0B,EAAE;EACrF,IAAIH,QAAQ,CAACI,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAE9D,MAAMM,MAAM,GAAGV,iBAAiB,CAACS,MAAM,CAAC;EACxC,IAAI,CAACC,MAAM,EAAE;EAEb,MAAMC,IAAI,GAAGT,QAAQ,KAAK,MAAM,GAAGQ,MAAM,CAACE,IAAI,GAAGF,MAAM,CAACG,KAAK;EAC7D,MAAMC,IAAI,GAAGV,QAAQ,CAACC,eAAe,CAACU,KAAK;EAE3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,IAAI,CAAC,EAAE;IAC/CG,IAAI,CAACM,WAAW,CAACJ,GAAG,
|
|
1
|
+
{"version":3,"names":["Platform","APP_COLOR_PRESETS","applyDarkClass","resolved","OS","document","documentElement","classList","toggle","applyColorPresetVars","preset","config","vars","dark","light","root","style","key","value","Object","entries","setProperty"],"sourceRoot":"../../../src","sources":["theme/apply-dark-class.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,iBAAiB,QAA2B,oBAAiB;AAEtE,OAAO,SAASC,cAAcA,CAACC,QAA0B,EAAE;EACzD,IAAIH,QAAQ,CAACI,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;IAC5DA,QAAQ,CAACC,eAAe,CAACC,SAAS,CAACC,MAAM,CAAC,MAAM,EAAEL,QAAQ,KAAK,MAAM,CAAC;EACxE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,oBAAoBA,CAACC,MAAoB,EAAEP,QAA0B,EAAE;EACrF,IAAIH,QAAQ,CAACI,EAAE,KAAK,KAAK,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAE9D,MAAMM,MAAM,GAAGV,iBAAiB,CAACS,MAAM,CAAC;EACxC,IAAI,CAACC,MAAM,EAAE;EAEb,MAAMC,IAAI,GAAGT,QAAQ,KAAK,MAAM,GAAGQ,MAAM,CAACE,IAAI,GAAGF,MAAM,CAACG,KAAK;EAC7D,MAAMC,IAAI,GAAGV,QAAQ,CAACC,eAAe,CAACU,KAAK;EAE3C,KAAK,MAAM,CAACC,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACR,IAAI,CAAC,EAAE;IAC/CG,IAAI,CAACM,WAAW,CAACJ,GAAG,EAAEC,KAAK,CAAC;EAC9B;AACF","ignoreList":[]}
|
|
@@ -3,6 +3,11 @@ export declare function applyDarkClass(resolved: 'light' | 'dark'): void;
|
|
|
3
3
|
/**
|
|
4
4
|
* Apply a color preset's CSS custom properties to the document root.
|
|
5
5
|
* No-op on native — only affects web.
|
|
6
|
+
*
|
|
7
|
+
* Values are written as raw HSL triples (e.g. `185 100% 20%`), matching the
|
|
8
|
+
* shadcn/Tailwind convention where stylesheets wrap them themselves with
|
|
9
|
+
* `hsl(var(--primary))`. Writing pre-resolved `hsl(...)` values here would
|
|
10
|
+
* produce invalid `hsl(hsl(...))` in consuming stylesheets and break theming.
|
|
6
11
|
*/
|
|
7
12
|
export declare function applyColorPresetVars(preset: AppColorName, resolved: 'light' | 'dark'): void;
|
|
8
13
|
//# sourceMappingURL=apply-dark-class.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-dark-class.d.ts","sourceRoot":"","sources":["../../../../src/theme/apply-dark-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,QAIxD;AAED
|
|
1
|
+
{"version":3,"file":"apply-dark-class.d.ts","sourceRoot":"","sources":["../../../../src/theme/apply-dark-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,QAIxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,QAYpF"}
|
|
@@ -3,6 +3,11 @@ export declare function applyDarkClass(resolved: 'light' | 'dark'): void;
|
|
|
3
3
|
/**
|
|
4
4
|
* Apply a color preset's CSS custom properties to the document root.
|
|
5
5
|
* No-op on native — only affects web.
|
|
6
|
+
*
|
|
7
|
+
* Values are written as raw HSL triples (e.g. `185 100% 20%`), matching the
|
|
8
|
+
* shadcn/Tailwind convention where stylesheets wrap them themselves with
|
|
9
|
+
* `hsl(var(--primary))`. Writing pre-resolved `hsl(...)` values here would
|
|
10
|
+
* produce invalid `hsl(hsl(...))` in consuming stylesheets and break theming.
|
|
6
11
|
*/
|
|
7
12
|
export declare function applyColorPresetVars(preset: AppColorName, resolved: 'light' | 'dark'): void;
|
|
8
13
|
//# sourceMappingURL=apply-dark-class.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-dark-class.d.ts","sourceRoot":"","sources":["../../../../src/theme/apply-dark-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,QAIxD;AAED
|
|
1
|
+
{"version":3,"file":"apply-dark-class.d.ts","sourceRoot":"","sources":["../../../../src/theme/apply-dark-class.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEvE,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,MAAM,QAIxD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,QAYpF"}
|
package/package.json
CHANGED
|
@@ -10,6 +10,11 @@ export function applyDarkClass(resolved: 'light' | 'dark') {
|
|
|
10
10
|
/**
|
|
11
11
|
* Apply a color preset's CSS custom properties to the document root.
|
|
12
12
|
* No-op on native — only affects web.
|
|
13
|
+
*
|
|
14
|
+
* Values are written as raw HSL triples (e.g. `185 100% 20%`), matching the
|
|
15
|
+
* shadcn/Tailwind convention where stylesheets wrap them themselves with
|
|
16
|
+
* `hsl(var(--primary))`. Writing pre-resolved `hsl(...)` values here would
|
|
17
|
+
* produce invalid `hsl(hsl(...))` in consuming stylesheets and break theming.
|
|
13
18
|
*/
|
|
14
19
|
export function applyColorPresetVars(preset: AppColorName, resolved: 'light' | 'dark') {
|
|
15
20
|
if (Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
@@ -21,6 +26,6 @@ export function applyColorPresetVars(preset: AppColorName, resolved: 'light' | '
|
|
|
21
26
|
const root = document.documentElement.style;
|
|
22
27
|
|
|
23
28
|
for (const [key, value] of Object.entries(vars)) {
|
|
24
|
-
root.setProperty(key,
|
|
29
|
+
root.setProperty(key, value);
|
|
25
30
|
}
|
|
26
31
|
}
|