@propknot/shared-ui 1.0.20 → 1.0.22
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/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1594,10 +1594,7 @@ var CustomThemeProvider = ({ children }) => {
|
|
|
1594
1594
|
if (!event.origin.startsWith("http://localhost:")) return;
|
|
1595
1595
|
const { type, theme } = event.data;
|
|
1596
1596
|
if (type === "THEME_CHANGE" && theme && ["light", "dark"].includes(theme)) {
|
|
1597
|
-
console.log("[ThemeContext] Setting theme to:", theme);
|
|
1598
1597
|
setCurrentTheme(theme);
|
|
1599
|
-
} else if (type === "THEME_CHANGE") {
|
|
1600
|
-
console.log("[ThemeContext] Rejected theme change:", theme, "Valid:", ["light", "dark"].includes(theme));
|
|
1601
1598
|
}
|
|
1602
1599
|
};
|
|
1603
1600
|
window.addEventListener("message", handleMessage);
|
|
@@ -1652,7 +1649,7 @@ var CustomThemeProvider = ({ children }) => {
|
|
|
1652
1649
|
}
|
|
1653
1650
|
return (user == null ? void 0 : user.preferredBrandingColor) || 0;
|
|
1654
1651
|
};
|
|
1655
|
-
const effectiveTheme = user ? currentTheme : "light";
|
|
1652
|
+
const effectiveTheme = user || isEmbedded ? currentTheme : "light";
|
|
1656
1653
|
const themeObject = effectiveTheme === "dark" ? darkTheme : lightTheme;
|
|
1657
1654
|
const isDarkMode = effectiveTheme === "dark";
|
|
1658
1655
|
const effectiveBrandingColor = getEffectiveBrandingColor();
|