dirk-cfx-react 1.1.46 → 1.1.48
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/hooks/index.cjs +8 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +8 -3
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2309,10 +2309,15 @@ function TornEdgeSVGFilter() {
|
|
|
2309
2309
|
}
|
|
2310
2310
|
function createScriptSettings(defaultValue) {
|
|
2311
2311
|
const store = create(() => defaultValue);
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2312
|
+
if (typeof window !== "undefined") {
|
|
2313
|
+
window.addEventListener("message", (event) => {
|
|
2314
|
+
if (event.data?.action === "UPDATE_SCRIPT_SETTINGS" && event.data?.data) {
|
|
2315
|
+
console.log("[scriptSettings] UPDATE_SCRIPT_SETTINGS received", event.data.data);
|
|
2316
|
+
store.setState((prev) => ({ ...prev, ...event.data.data }));
|
|
2317
|
+
}
|
|
2315
2318
|
});
|
|
2319
|
+
}
|
|
2320
|
+
const useScriptSettingHooks = () => {
|
|
2316
2321
|
};
|
|
2317
2322
|
const updateScriptSettings = async (newSettings) => {
|
|
2318
2323
|
store.setState((prev) => ({ ...prev, ...newSettings }));
|