@howone/sdk 0.1.21 → 0.1.23
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 +6 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -328,7 +328,6 @@ var UnifiedAuthService = class {
|
|
|
328
328
|
};
|
|
329
329
|
popupCheckInterval = window.setInterval(checkPopupStatus, 1e3);
|
|
330
330
|
const messageHandler = (event) => {
|
|
331
|
-
console.log("messageHandler", event);
|
|
332
331
|
const validOrigins = [window.location.origin, "https://create-x-backend-dev.fly.dev"];
|
|
333
332
|
const isValidOrigin = validOrigins.some(
|
|
334
333
|
(origin) => event.origin === origin || event.origin.includes("localhost") || event.origin.includes("127.0.0.1") || event.origin.includes("fly.dev")
|
|
@@ -1942,7 +1941,6 @@ var ToastContent = ({ type, title, message, component, closeToast }) => {
|
|
|
1942
1941
|
const handleClose = useCallback(() => {
|
|
1943
1942
|
closeToast?.();
|
|
1944
1943
|
}, [closeToast]);
|
|
1945
|
-
console.log(iconConfig, "????????");
|
|
1946
1944
|
if (component) {
|
|
1947
1945
|
return /* @__PURE__ */ jsxs7("div", { className: `flex items-start gap-3 min-h-[80px] w-full backdrop-blur-md
|
|
1948
1946
|
rounded-xl p-4 shadow-2xl relative overflow-hidden ${iconConfig.bgGradient}`, children: [
|
|
@@ -2011,7 +2009,7 @@ var ToastContent = ({ type, title, message, component, closeToast }) => {
|
|
|
2011
2009
|
};
|
|
2012
2010
|
var defaultToastOptions = {
|
|
2013
2011
|
position: "bottom-right",
|
|
2014
|
-
autoClose:
|
|
2012
|
+
autoClose: 3e3,
|
|
2015
2013
|
hideProgressBar: true,
|
|
2016
2014
|
closeOnClick: false,
|
|
2017
2015
|
pauseOnHover: true,
|
|
@@ -2144,13 +2142,12 @@ var ERROR_HANDLER_SCRIPT = `(function () {
|
|
|
2144
2142
|
const file = fileElement ? fileElement.textContent : "";
|
|
2145
2143
|
const frames = Array.from(frameElements)
|
|
2146
2144
|
.map((el) => el.textContent)
|
|
2147
|
-
.join("
|
|
2148
|
-
");
|
|
2145
|
+
.join("\\n");
|
|
2149
2146
|
const stack = stackElement ? stackElement.textContent : "";
|
|
2150
2147
|
|
|
2151
2148
|
let line, column;
|
|
2152
2149
|
const fileStr = file || "";
|
|
2153
|
-
const lineColMatch = fileStr.match(/(?:line|at|:)(?:.*?)(?::| )(d+)(?::| )(d+)/i);
|
|
2150
|
+
const lineColMatch = fileStr.match(/(?:line|at|:)(?:.*?)(?::| )(\\d+)(?::| )(\\d+)/i);
|
|
2154
2151
|
if (lineColMatch) {
|
|
2155
2152
|
line = parseInt(lineColMatch[1], 10);
|
|
2156
2153
|
column = parseInt(lineColMatch[2], 10);
|
|
@@ -2299,7 +2296,7 @@ var ERROR_HANDLER_SCRIPT = `(function () {
|
|
|
2299
2296
|
return originalFetch.apply(this, args)
|
|
2300
2297
|
.then(response => {
|
|
2301
2298
|
if (!response.ok) {
|
|
2302
|
-
const networkError = new Error(
|
|
2299
|
+
const networkError = new Error('HTTP ' + response.status + ': ' + response.statusText);
|
|
2303
2300
|
handleFetchError(networkError, url, response);
|
|
2304
2301
|
}
|
|
2305
2302
|
return response;
|
|
@@ -2347,7 +2344,7 @@ var ERROR_HANDLER_SCRIPT = `(function () {
|
|
|
2347
2344
|
xhr.onreadystatechange = function() {
|
|
2348
2345
|
if (xhr.readyState === 4) {
|
|
2349
2346
|
if (xhr.status >= 400) {
|
|
2350
|
-
const networkError = new Error(
|
|
2347
|
+
const networkError = new Error('HTTP ' + xhr.status + ': ' + xhr.statusText);
|
|
2351
2348
|
handleXHRError(networkError, xhr, false);
|
|
2352
2349
|
}
|
|
2353
2350
|
}
|
|
@@ -2359,7 +2356,7 @@ var ERROR_HANDLER_SCRIPT = `(function () {
|
|
|
2359
2356
|
|
|
2360
2357
|
const originalOnError = xhr.onerror;
|
|
2361
2358
|
xhr.onerror = function() {
|
|
2362
|
-
const networkError = new Error(
|
|
2359
|
+
const networkError = new Error('Network error for ' + xhr.__intercepted_method__ + ' ' + xhr.__intercepted_url__);
|
|
2363
2360
|
handleXHRError(networkError, xhr, true);
|
|
2364
2361
|
|
|
2365
2362
|
if (originalOnError) {
|