@howone/sdk 0.3.16 → 0.3.18
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 +7 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1836,27 +1836,12 @@ function ThemeToggle({ className }) {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
};
|
|
1838
1838
|
if (!mounted) {
|
|
1839
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1840
|
-
"button",
|
|
1841
|
-
{
|
|
1842
|
-
className: `relative inline-flex h-10 w-12 items-center justify-center rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground ${className || ""}`,
|
|
1843
|
-
disabled: true,
|
|
1844
|
-
children: [
|
|
1845
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:sun-bold", width: 20, height: 20 }),
|
|
1846
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "\u5207\u6362\u4E3B\u9898" })
|
|
1847
|
-
]
|
|
1848
|
-
}
|
|
1849
|
-
);
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:sun-bold", width: 20, height: 20 });
|
|
1850
1840
|
}
|
|
1851
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1852
|
-
"
|
|
1841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1842
|
+
"div",
|
|
1853
1843
|
{
|
|
1854
|
-
|
|
1855
|
-
onClick: handleToggle,
|
|
1856
|
-
children: [
|
|
1857
|
-
theme === "light" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:sun-bold", width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:moon-linear", width: 20, height: 20 }),
|
|
1858
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: "\u5207\u6362\u4E3B\u9898" })
|
|
1859
|
-
]
|
|
1844
|
+
children: theme === "light" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:sun-bold", width: 20, height: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react10.Icon, { icon: "solar:moon-linear", width: 20, height: 20 })
|
|
1860
1845
|
}
|
|
1861
1846
|
);
|
|
1862
1847
|
}
|
|
@@ -2120,7 +2105,7 @@ var ToastContent = ({ type, title, message, component, closeToast }) => {
|
|
|
2120
2105
|
};
|
|
2121
2106
|
var defaultToastOptions = {
|
|
2122
2107
|
position: "bottom-right",
|
|
2123
|
-
autoClose:
|
|
2108
|
+
autoClose: 1500,
|
|
2124
2109
|
hideProgressBar: true,
|
|
2125
2110
|
closeOnClick: false,
|
|
2126
2111
|
pauseOnHover: true,
|
|
@@ -3830,7 +3815,7 @@ function createClient(opts) {
|
|
|
3830
3815
|
if (typeof window === "undefined") return;
|
|
3831
3816
|
const loc = redirect || window.location.href;
|
|
3832
3817
|
try {
|
|
3833
|
-
const root = env3.
|
|
3818
|
+
const root = env3.AUTH_ROOT_VALUE;
|
|
3834
3819
|
const authUrl = new URL("/auth", String(root));
|
|
3835
3820
|
authUrl.searchParams.set("redirect_uri", String(loc));
|
|
3836
3821
|
if (opts?.projectId) authUrl.searchParams.set("project_id", String(opts.projectId));
|
|
@@ -3838,7 +3823,7 @@ function createClient(opts) {
|
|
|
3838
3823
|
} catch {
|
|
3839
3824
|
const encoded = encodeURIComponent(String(loc));
|
|
3840
3825
|
const pid = opts?.projectId ? `&project_id=${encodeURIComponent(String(opts.projectId))}` : "";
|
|
3841
|
-
const root = env3.
|
|
3826
|
+
const root = env3.AUTH_ROOT_VALUE;
|
|
3842
3827
|
window.location.href = `${root}/auth?redirect_uri=${encoded}${pid}`;
|
|
3843
3828
|
}
|
|
3844
3829
|
},
|