@pathscale/ui 1.1.31 → 1.1.33
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.
|
@@ -72,10 +72,9 @@ const ThemeColorPicker_ThemeColorPicker = (props)=>{
|
|
|
72
72
|
}
|
|
73
73
|
];
|
|
74
74
|
const handleGrayscale = (swatch)=>{
|
|
75
|
-
store.setThemeColor(null);
|
|
76
|
-
(0, __WEBPACK_EXTERNAL_MODULE__hueShift_js_ca4235e5__.resetHueShift)();
|
|
77
|
-
local.onColorChange?.(null, 0);
|
|
78
75
|
local.onThemeSwitch?.(swatch.theme);
|
|
76
|
+
store.setThemeColor(swatch.hex);
|
|
77
|
+
local.onColorChange?.(null, 0);
|
|
79
78
|
};
|
|
80
79
|
(0, __WEBPACK_EXTERNAL_MODULE_solid_js_aeefcc6d__.createEffect)(()=>{
|
|
81
80
|
if (!isOpen()) return;
|
|
@@ -6,6 +6,7 @@ const checkCspAllowsInlineStyles = ()=>{
|
|
|
6
6
|
try {
|
|
7
7
|
const testEl = document.createElement("div");
|
|
8
8
|
testEl.style.setProperty("--csp-test", "1");
|
|
9
|
+
if (!document.body) return true;
|
|
9
10
|
document.body.appendChild(testEl);
|
|
10
11
|
const computed = getComputedStyle(testEl).getPropertyValue("--csp-test");
|
|
11
12
|
document.body.removeChild(testEl);
|
|
@@ -13,8 +14,8 @@ const checkCspAllowsInlineStyles = ()=>{
|
|
|
13
14
|
} catch {
|
|
14
15
|
cspAllowsInlineStyles = false;
|
|
15
16
|
}
|
|
16
|
-
if (
|
|
17
|
-
return cspAllowsInlineStyles;
|
|
17
|
+
if (false === cspAllowsInlineStyles) console.info("[themeColor] CSP blocks inline styles - theme color customization disabled");
|
|
18
|
+
return cspAllowsInlineStyles ?? true;
|
|
18
19
|
};
|
|
19
20
|
const PRIMARY_VARS = [
|
|
20
21
|
"--color-primary",
|