@marketrix.ai/widget 1.0.15 → 1.0.16
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/debug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA2BH,iBAAS,eAAe,IAAI,IAAI,CAW/B;AA6BD,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAIL,gBAAgB,EASjB,MAAM,mBAAmB,CAAC;AAoF3B,eAAO,MAAM,UAAU,GACrB,QAAQ,eAAe,EACvB,YAAY,WAAW,KACtB,OAAO,CAAC,IAAI,CA+Gd,CAAC;AAKF,eAAO,MAAM,aAAa,QAAO,IAwBhC,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAAU,WAAW,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAW7F,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0E1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,QAAQ,eAAe,KAAG,OAAO,CAAC,IAAI,CA4CvE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAIL,gBAAgB,EASjB,MAAM,mBAAmB,CAAC;AAoF3B,eAAO,MAAM,UAAU,GACrB,QAAQ,eAAe,EACvB,YAAY,WAAW,KACtB,OAAO,CAAC,IAAI,CA+Gd,CAAC;AAKF,eAAO,MAAM,aAAa,QAAO,IAwBhC,CAAC;AAGF,eAAO,MAAM,qBAAqB,GAAU,WAAW,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAW7F,CAAC;AAGF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0E1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,QAAQ,eAAe,KAAG,OAAO,CAAC,IAAI,CA4CvE,CAAC;AAcF,YAAY,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,GACZ,MAAM,SAAS,CAAC;;;0BAjEyB,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;yBArP/D,eAAe,cACX,WAAW,KACtB,OAAO,CAAC,IAAI,CAAC;yBAoHiB,IAAI;uCA2BkB,OAAO,CAAC,eAAe,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC;;;AAwK/F,wBAOE"}
|
package/dist/index.mjs
CHANGED
|
@@ -18885,8 +18885,13 @@ function handleApiError(error, context = "Operation", config) {
|
|
|
18885
18885
|
};
|
|
18886
18886
|
}
|
|
18887
18887
|
|
|
18888
|
-
const
|
|
18889
|
-
|
|
18888
|
+
const getIsDevelopment = () => {
|
|
18889
|
+
if (typeof window === "undefined") {
|
|
18890
|
+
return false;
|
|
18891
|
+
}
|
|
18892
|
+
return window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname.includes("localhost");
|
|
18893
|
+
};
|
|
18894
|
+
const MIN_LOG_LEVEL = getIsDevelopment() ? "debug" : "error";
|
|
18890
18895
|
const LOG_LEVELS = {
|
|
18891
18896
|
debug: 0,
|
|
18892
18897
|
info: 1,
|
|
@@ -38634,6 +38639,9 @@ const clearWidgetState = () => {
|
|
|
38634
38639
|
currentConfig = null;
|
|
38635
38640
|
};
|
|
38636
38641
|
const showWidgetSettingsLoader = (message) => {
|
|
38642
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
38643
|
+
return;
|
|
38644
|
+
}
|
|
38637
38645
|
if (loaderInstance) {
|
|
38638
38646
|
const loaderContainer2 = document.getElementById("marketrix-widget-loader-container");
|
|
38639
38647
|
if (loaderContainer2) {
|
|
@@ -38675,6 +38683,9 @@ const hideWidgetSettingsLoader = () => {
|
|
|
38675
38683
|
};
|
|
38676
38684
|
let initWidgetFunction = null;
|
|
38677
38685
|
const autoInitializeWidget = (retryCount = 0) => {
|
|
38686
|
+
if (typeof window === "undefined" || typeof document === "undefined") {
|
|
38687
|
+
return;
|
|
38688
|
+
}
|
|
38678
38689
|
const MAX_RETRIES = 5;
|
|
38679
38690
|
const RETRY_DELAYS = [0, 100, 500, 1e3, 2e3];
|
|
38680
38691
|
if (!initWidgetFunction) {
|
|
@@ -39040,13 +39051,15 @@ const mountWidget = async (config) => {
|
|
|
39040
39051
|
);
|
|
39041
39052
|
}
|
|
39042
39053
|
};
|
|
39043
|
-
|
|
39044
|
-
|
|
39045
|
-
|
|
39046
|
-
|
|
39047
|
-
|
|
39048
|
-
|
|
39049
|
-
}
|
|
39054
|
+
if (typeof window !== "undefined") {
|
|
39055
|
+
setTimeout(() => {
|
|
39056
|
+
try {
|
|
39057
|
+
registerAutoInit(initWidget);
|
|
39058
|
+
} catch (error) {
|
|
39059
|
+
console.debug("Marketrix Widget: Auto-init registration skipped", error);
|
|
39060
|
+
}
|
|
39061
|
+
}, 0);
|
|
39062
|
+
}
|
|
39050
39063
|
const index = {
|
|
39051
39064
|
MarketrixWidget,
|
|
39052
39065
|
mountWidget,
|