@0xchain/header 0.0.1 → 1.1.0-beta.1
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 +10 -10
- package/dist/lib/Drawer.js +13 -13
- package/dist/lib/Explorer.js +10 -10
- package/dist/lib/Nav.js +12 -12
- package/dist/lib/Setting/SettingBody.js +10 -10
- package/dist/lib/Setting/index.js +6 -6
- package/dist/lib/User/Pc.js +12 -12
- package/package.json +14 -14
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as x, jsx as
|
|
1
|
+
import { jsxs as r, Fragment as x, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { twMerge as i } from "tailwind-merge";
|
|
3
3
|
import k from "@0xchain/request";
|
|
4
|
-
import m, { HeaderSource as
|
|
4
|
+
import m, { HeaderSource as o } from "./lib/Right.js";
|
|
5
5
|
import g from "./lib/Logo.js";
|
|
6
6
|
import { cookies as E } from "next/headers";
|
|
7
7
|
import { USER_EVENTS as _, emitUserEvent as w, onUserEvent as j } from "./lib/events.js";
|
|
8
|
-
async function N({ extra: l, children: p, className: f, hideNews: d, hideLogin: c, source: t =
|
|
8
|
+
async function N({ extra: l, children: p, className: f, hideNews: d, hideLogin: c, source: t = o.DEFAULT }) {
|
|
9
9
|
var n;
|
|
10
10
|
let e = {
|
|
11
11
|
data: {}
|
|
@@ -24,21 +24,21 @@ async function N({ extra: l, children: p, className: f, hideNews: d, hideLogin:
|
|
|
24
24
|
e = { data: {} };
|
|
25
25
|
}
|
|
26
26
|
return /* @__PURE__ */ r(x, { children: [
|
|
27
|
-
/* @__PURE__ */ r("div", { className: i("sticky left-0 right-0 top-0 bg-background h-16 z-999", t ===
|
|
28
|
-
/* @__PURE__ */ r("div", { className: "md:bg-
|
|
29
|
-
/* @__PURE__ */ r("div", { className: i("items-center flex-1 gap-6", t ===
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ r("div", { className: i("sticky left-0 right-0 top-0 bg-background h-16 z-999", t === o.CHAT ? "hidden md:block" : "block", f), children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: "md:bg-card h-13 text-center flex flex-wrap justify-between items-center gap-2 px-4", children: [
|
|
29
|
+
/* @__PURE__ */ r("div", { className: i("items-center flex-1 gap-6", t === o.CHAT ? "hidden md:flex" : "flex"), children: [
|
|
30
|
+
/* @__PURE__ */ a(g, {}),
|
|
31
31
|
p
|
|
32
32
|
] }),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ a(m, { hideNews: d, hideLogin: c, user: (e == null ? void 0 : e.data) || {} })
|
|
34
34
|
] }),
|
|
35
35
|
l
|
|
36
36
|
] }),
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ a("div", { className: i(t === o.CHAT ? "block md:hidden" : "hidden"), children: /* @__PURE__ */ a(m, { hideNews: d, source: t, hideLogin: c, user: (e == null ? void 0 : e.data) || {} }) })
|
|
38
38
|
] });
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
o as HeaderSource,
|
|
42
42
|
_ as USER_EVENTS,
|
|
43
43
|
N as default,
|
|
44
44
|
w as emitUserEvent,
|
package/dist/lib/Drawer.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
2
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
|
+
import i from "rc-drawer";
|
|
4
4
|
import { Menu as d, X as m } from "lucide-react";
|
|
5
|
-
import
|
|
6
|
-
import { useState as
|
|
7
|
-
function b({ hideLogin:
|
|
8
|
-
const [
|
|
9
|
-
if (!
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
const l = (
|
|
12
|
-
|
|
5
|
+
import f from "./Nav.js";
|
|
6
|
+
import { useState as p } from "react";
|
|
7
|
+
function b({ hideLogin: a, hideNews: n, user: s }) {
|
|
8
|
+
const [o, t] = p(!1);
|
|
9
|
+
if (!o)
|
|
10
|
+
return /* @__PURE__ */ e(d, { onClick: () => t(!0), size: 32, style: { color: "var(--foreground)" }, className: "md:hidden bg-card rounded-lg p-[4px] " });
|
|
11
|
+
const l = (r) => {
|
|
12
|
+
r == null || r.preventDefault(), r == null || r.stopPropagation(), t(!1);
|
|
13
13
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ e(i, { open: o, placement: "right", className: "block md:hidden fixed top-0 bottom-0 left-0 right-0 z-1001 bg-background/70 p-2 h-screen", children: /* @__PURE__ */ c("div", { className: "w-full max-h-[calc(100svh-16px)] overflow-y-auto p-3 bg-card rounded-lg", children: [
|
|
15
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end items-center p-2", children: /* @__PURE__ */ e(m, { size: 24, style: { color: "var(--foreground)" }, onClick: (r) => l(r) }) }),
|
|
16
|
+
/* @__PURE__ */ e(f, { onClick: (r) => l(r), hideLogin: a, hideNews: n, user: s })
|
|
17
17
|
] }) });
|
|
18
18
|
}
|
|
19
19
|
export {
|
package/dist/lib/Explorer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as a, Fragment as
|
|
2
|
+
import { jsxs as a, Fragment as g, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import f from "@0xchain/translation";
|
|
4
|
-
import { Dropdown as
|
|
4
|
+
import { Dropdown as w } from "antd";
|
|
5
5
|
import { useState as u, useEffect as b } from "react";
|
|
6
6
|
import N from "@0xchain/request";
|
|
7
7
|
import y from "@0xchain/link";
|
|
@@ -12,7 +12,7 @@ import { Accordion as I, AccordionItem as S, AccordionTrigger as j } from "@0xch
|
|
|
12
12
|
function R({ onClick: o = () => {
|
|
13
13
|
}, onExpandChange: l }) {
|
|
14
14
|
A();
|
|
15
|
-
const { gotoExplorer: p } = x(), [s, h] = u([]), [
|
|
15
|
+
const { gotoExplorer: p } = x(), [s, h] = u([]), [n, t] = u(""), v = async () => {
|
|
16
16
|
const e = await N.get("/api/v2/chains/all-chain-list/basic");
|
|
17
17
|
h(e.data);
|
|
18
18
|
};
|
|
@@ -28,7 +28,7 @@ function R({ onClick: o = () => {
|
|
|
28
28
|
className: "w-full h-full flex items-center gap-2 py-2 cursor-pointer font-medium",
|
|
29
29
|
baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
|
|
30
30
|
onClick: (m) => {
|
|
31
|
-
m.preventDefault(), m.stopPropagation(), o == null || o(),
|
|
31
|
+
m.preventDefault(), m.stopPropagation(), o == null || o(), t("");
|
|
32
32
|
},
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ r(
|
|
@@ -44,9 +44,9 @@ function R({ onClick: o = () => {
|
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
|
-
return /* @__PURE__ */ a(
|
|
47
|
+
return /* @__PURE__ */ a(g, { children: [
|
|
48
48
|
/* @__PURE__ */ r("div", { className: "hidden md:block", children: /* @__PURE__ */ r(
|
|
49
|
-
|
|
49
|
+
w,
|
|
50
50
|
{
|
|
51
51
|
getPopupContainer: () => document.body,
|
|
52
52
|
classNames: {
|
|
@@ -72,18 +72,18 @@ function R({ onClick: o = () => {
|
|
|
72
72
|
type: "single",
|
|
73
73
|
collapsible: !0,
|
|
74
74
|
className: "w-full",
|
|
75
|
-
value:
|
|
75
|
+
value: n,
|
|
76
76
|
onValueChange: (e) => {
|
|
77
|
-
|
|
77
|
+
t(e), l == null || l(!!e);
|
|
78
78
|
},
|
|
79
|
-
children: /* @__PURE__ */ r(S, { value: "explorer", className: "border-0", children: /* @__PURE__ */ r(j, { className: "rounded-lg font-medium h-11 w-full flex py-2 justify-between items-center hover:no-underline focus-visible:ring-0 focus-visible:ring-offset-0", children: /* @__PURE__ */ r("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ r("span", { className: "text-
|
|
79
|
+
children: /* @__PURE__ */ r(S, { value: "explorer", className: "border-0", children: /* @__PURE__ */ r(j, { className: "rounded-lg font-medium h-11 w-full flex py-2 justify-between items-center hover:no-underline focus-visible:ring-0 focus-visible:ring-offset-0", children: /* @__PURE__ */ r("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ r("span", { className: "text-foreground", children: /* @__PURE__ */ r(f, { value: "title", parentKey: "browser" }) }) }) }) })
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
82
|
/* @__PURE__ */ r(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
85
|
className: "grid transition-[grid-template-rows] duration-300 ease-in-out",
|
|
86
|
-
style: { gridTemplateRows:
|
|
86
|
+
style: { gridTemplateRows: n ? "1fr" : "0fr" },
|
|
87
87
|
children: /* @__PURE__ */ r("div", { className: "overflow-hidden", children: /* @__PURE__ */ r("div", { className: "mt-3 rounded-lg flex flex-col gap-2 max-h-[60vh] overflow-auto", children: s.map((e) => /* @__PURE__ */ r("div", { className: "w-full", children: c(e) }, e.chainSymbol)) }) })
|
|
88
88
|
}
|
|
89
89
|
)
|
package/dist/lib/Nav.js
CHANGED
|
@@ -5,8 +5,8 @@ import v from "./User/index.js";
|
|
|
5
5
|
import N from "./Setting/index.js";
|
|
6
6
|
import u from "@0xchain/translation";
|
|
7
7
|
import { twMerge as a } from "tailwind-merge";
|
|
8
|
-
import
|
|
9
|
-
import { useLocale as
|
|
8
|
+
import S from "@0xchain/better-link";
|
|
9
|
+
import { useLocale as k } from "next-intl";
|
|
10
10
|
import P from "./User/Logout.js";
|
|
11
11
|
import { useState as m, useCallback as B, useEffect as T } from "react";
|
|
12
12
|
import I from "./User/SignIn.js";
|
|
@@ -14,12 +14,12 @@ import { fetchUserProfile as j } from "@0xchain/auth";
|
|
|
14
14
|
import { onUserEvent as A, cleanUserEvent as R, USER_EVENTS as f } from "./events.js";
|
|
15
15
|
import { usePathname as C } from "next/navigation";
|
|
16
16
|
import D from "./Explorer.js";
|
|
17
|
-
function ee({ onClick:
|
|
17
|
+
function ee({ onClick: o = () => {
|
|
18
18
|
}, hideNews: p = !1, hideLogin: c = !1, user: h }) {
|
|
19
|
-
const { gotoAISQL: x, gotoChat:
|
|
19
|
+
const { gotoAISQL: x, gotoChat: g } = S(), t = k(), l = C(), [U, w] = m(""), [s, E] = m(h), [X, b] = m(!1), y = [
|
|
20
20
|
{
|
|
21
21
|
baseUrl: process.env.NEXT_PUBLIC_CHAT_URL,
|
|
22
|
-
href:
|
|
22
|
+
href: g({ locale: t }),
|
|
23
23
|
key: `/${t}`,
|
|
24
24
|
label: /* @__PURE__ */ r("span", { children: "iSearch" }),
|
|
25
25
|
show: (e) => e === `/${t}` || e.includes(`/${t}/conversation`)
|
|
@@ -35,7 +35,7 @@ function ee({ onClick: s = () => {
|
|
|
35
35
|
baseUrl: process.env.NEXT_PUBLIC_BASE_URL,
|
|
36
36
|
href: "/explorer",
|
|
37
37
|
key: "/explorer",
|
|
38
|
-
label: /* @__PURE__ */ r(D, { onClick:
|
|
38
|
+
label: /* @__PURE__ */ r(D, { onClick: o, onExpandChange: b }),
|
|
39
39
|
show: (e) => e.includes("/explorer")
|
|
40
40
|
},
|
|
41
41
|
// {
|
|
@@ -63,7 +63,7 @@ function ee({ onClick: s = () => {
|
|
|
63
63
|
}
|
|
64
64
|
].filter((e) => p ? !["/explorer", "/chat", "/sql"].includes(e.key) : !0), i = B(() => new Promise((e) => {
|
|
65
65
|
j().then((n) => {
|
|
66
|
-
E(n),
|
|
66
|
+
E(n), w((/* @__PURE__ */ new Date()).getTime().toString()), e(n);
|
|
67
67
|
});
|
|
68
68
|
}), []);
|
|
69
69
|
return T(() => (A(f.PROFILE_UPDATED, i), () => {
|
|
@@ -81,17 +81,17 @@ function ee({ onClick: s = () => {
|
|
|
81
81
|
"ul",
|
|
82
82
|
{
|
|
83
83
|
className: a(
|
|
84
|
-
"flex flex-col justify-start items-start w-full h-full text-sm z-1001 text-
|
|
84
|
+
"flex flex-col justify-start items-start w-full h-full text-sm z-1001 text-foreground",
|
|
85
85
|
"md:flex-row md:items-center md:w-auto md:h-[34px] md:gap-6",
|
|
86
86
|
"order-2 md:order-0"
|
|
87
87
|
),
|
|
88
|
-
children: y.map((e, n) => /* @__PURE__ */ r("li", { className: a("w-full md:px-4 md:py-1 md:h-auto font-bold md:w-auto cursor-pointer md:rounded-full", e.key === "/explorer" ? "h-auto" : "h-11", e.show(l) ? "md:text-primary md:bg-primary/20" : "md:hover:bg-
|
|
88
|
+
children: y.map((e, n) => /* @__PURE__ */ r("li", { className: a("w-full md:px-4 md:py-1 md:h-auto font-bold md:w-auto cursor-pointer md:rounded-full", e.key === "/explorer" ? "h-auto" : "h-11", e.show(l) ? "md:text-primary md:bg-primary/20" : "md:hover:bg-border"), children: e.href === l ? e.label : /* @__PURE__ */ r(_, { href: e.href, onClick: o, className: "h-full flex items-center justify-start", baseUrl: e.baseUrl, suppressHydrationWarning: !0, children: e.label }) }, n))
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */ r(N, { onClick:
|
|
91
|
+
/* @__PURE__ */ r(N, { onClick: o }),
|
|
92
92
|
!l.includes("/login") && !c ? /* @__PURE__ */ d(L, { children: [
|
|
93
|
-
/* @__PURE__ */ r(v, { onClick:
|
|
94
|
-
|
|
93
|
+
/* @__PURE__ */ r(v, { onClick: o, userInfo: s }, U),
|
|
94
|
+
s != null && s.id ? /* @__PURE__ */ r("div", { className: "flex md:hidden h-11 md:h-auto cursor-pointer whitespace-nowrap order-3 bg-background rounded-lg p-2 mt-3 w-full items-center justify-center text-muted-foreground", children: /* @__PURE__ */ r(P, {}) }) : /* @__PURE__ */ r(I, { onClick: o, className: "flex md:hidden h-11 cursor-pointer whitespace-nowrap order-3 bg-primary text-white rounded-lg p-2 mt-3 w-full items-center justify-center" })
|
|
95
95
|
] }) : null
|
|
96
96
|
]
|
|
97
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useLocale as h, useTranslations as d } from "next-intl";
|
|
4
4
|
import { useSearchParams as p, usePathname as x } from "next/navigation";
|
|
5
5
|
import { Accordion as b, AccordionItem as w, AccordionTrigger as y, AccordionContent as N } from "@0xchain/ui/accordion";
|
|
@@ -10,7 +10,7 @@ import $ from "@0xchain/theme-toggle";
|
|
|
10
10
|
function U({ onClick: f = () => {
|
|
11
11
|
} }) {
|
|
12
12
|
var i;
|
|
13
|
-
const a = h(),
|
|
13
|
+
const a = h(), l = p(), t = d("lang"), s = d("setting"), o = [
|
|
14
14
|
{ name: t("en"), lang: "en" },
|
|
15
15
|
{ name: t("ja"), lang: "ja" },
|
|
16
16
|
{ name: t("ko"), lang: "ko" },
|
|
@@ -18,16 +18,16 @@ function U({ onClick: f = () => {
|
|
|
18
18
|
{ name: t("zh-hans"), lang: "zh-hans" }
|
|
19
19
|
], c = x(), u = v(
|
|
20
20
|
(n) => {
|
|
21
|
-
const m = c.replace(new RegExp(`/${a}(/|$)`), `/${n}$1`), g =
|
|
21
|
+
const m = c.replace(new RegExp(`/${a}(/|$)`), `/${n}$1`), g = l.toString();
|
|
22
22
|
return g ? `${m}?${g}` : m;
|
|
23
23
|
},
|
|
24
|
-
[c, a,
|
|
24
|
+
[c, a, l]
|
|
25
25
|
);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ e("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ e(b, { type: "single", className: "flex-1", collapsible: !0, children: /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ e(y, { className: "p-2 bg-background rounded-lg h-11 md:h-auto text-gray-500 w-full flex py-2 justify-between items-center hover:no-underline focus-visible:ring-0 focus-visible:ring-offset-0", children: /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ e("span", { className: "text-
|
|
30
|
-
/* @__PURE__ */ e("span", { className: "text-
|
|
26
|
+
return /* @__PURE__ */ r("div", { className: "text-sm gap-2 flex flex-col justify-start items-start md:py-2", children: [
|
|
27
|
+
/* @__PURE__ */ e("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ e(b, { type: "single", className: "flex-1", collapsible: !0, children: /* @__PURE__ */ r(w, { value: a, className: "border-0", children: [
|
|
28
|
+
/* @__PURE__ */ e(y, { className: "p-2 bg-background rounded-lg h-11 md:h-auto text-gray-500 w-full flex py-2 justify-between items-center hover:no-underline focus-visible:ring-0 focus-visible:ring-offset-0", children: /* @__PURE__ */ r("div", { className: "flex w-full justify-between items-center", children: [
|
|
29
|
+
/* @__PURE__ */ e("span", { className: "text-foreground", children: s("language") }),
|
|
30
|
+
/* @__PURE__ */ e("span", { className: "text-foreground", children: (i = o.find((n) => n.lang === a)) == null ? void 0 : i.name })
|
|
31
31
|
] }) }),
|
|
32
32
|
/* @__PURE__ */ e(N, { className: "bg-background mt-3 rounded-lg flex flex-col gap-2", children: o.map((n) => /* @__PURE__ */ e(
|
|
33
33
|
k,
|
|
@@ -45,7 +45,7 @@ function U({ onClick: f = () => {
|
|
|
45
45
|
n.lang
|
|
46
46
|
)) })
|
|
47
47
|
] }) }) }),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ r("div", { className: "bg-background p-2 rounded-lg h-11 md:h-auto flex w-full justify-between items-center", children: [
|
|
49
49
|
/* @__PURE__ */ e("div", { children: s("theme") }),
|
|
50
50
|
/* @__PURE__ */ e($, {})
|
|
51
51
|
] })
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import i from "@0xchain/iconfont";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
function g({ onClick:
|
|
3
|
+
import a from "@0xchain/tooltip";
|
|
4
|
+
import r from "./SettingBody.js";
|
|
5
|
+
function g({ onClick: o = () => {
|
|
6
6
|
} }) {
|
|
7
7
|
return /* @__PURE__ */ n("div", { className: "w-full md:w-auto order-3 md:order-0", children: [
|
|
8
|
-
/* @__PURE__ */ e("div", { className: "hidden md:flex items-center bg-
|
|
8
|
+
/* @__PURE__ */ e("div", { className: "hidden md:flex items-center bg-card hover:bg-border rounded-lg p-1.5 cursor-pointer", children: /* @__PURE__ */ e(a, { side: "bottom", onChange: (t) => {
|
|
9
9
|
document.querySelectorAll("iframe").forEach((d) => {
|
|
10
10
|
d.style.pointerEvents = t ? "none" : "auto";
|
|
11
11
|
});
|
|
12
|
-
}, needClick: !0, contentClassName: "bg-
|
|
13
|
-
/* @__PURE__ */ e("div", { className: "md:hidden", children: /* @__PURE__ */ e(
|
|
12
|
+
}, needClick: !0, contentClassName: "bg-card w-70 rounded-lg bg-card text-foreground border border-border", trigger: /* @__PURE__ */ e(i, { type: "icon-centersetup", className: "text-2xl" }), arrowClassName: "fill-card", children: /* @__PURE__ */ e(r, { onClick: o }) }) }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: "md:hidden", children: /* @__PURE__ */ e(r, {}) })
|
|
14
14
|
] });
|
|
15
15
|
}
|
|
16
16
|
export {
|
package/dist/lib/User/Pc.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as l, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { jsx as l, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
import d from "@0xchain/link";
|
|
4
|
+
import c from "@0xchain/translation";
|
|
5
5
|
import n from "./MainTrigger.js";
|
|
6
|
-
import
|
|
6
|
+
import m from "./Logout.js";
|
|
7
7
|
import s from "@0xchain/avatar";
|
|
8
8
|
import p from "@0xchain/tooltip";
|
|
9
9
|
function y({
|
|
10
|
-
list:
|
|
10
|
+
list: o,
|
|
11
11
|
userInfo: e,
|
|
12
|
-
onClick:
|
|
12
|
+
onClick: t
|
|
13
13
|
}) {
|
|
14
|
-
return /* @__PURE__ */ l(p, { onChange: (
|
|
14
|
+
return /* @__PURE__ */ l(p, { onChange: (r) => {
|
|
15
15
|
document.querySelectorAll("iframe").forEach((i) => {
|
|
16
|
-
i.style.pointerEvents =
|
|
16
|
+
i.style.pointerEvents = r ? "none" : "auto";
|
|
17
17
|
});
|
|
18
|
-
}, trigger: /* @__PURE__ */ l(n, { userInfo: e }), arrowClassName: "fill-
|
|
19
|
-
/* @__PURE__ */ l("div", { className: "flex flex-col gap-3 w-full bg-background rounded-lg p-2", children: /* @__PURE__ */
|
|
18
|
+
}, trigger: /* @__PURE__ */ l(n, { userInfo: e }), arrowClassName: "fill-card", contentClassName: "text-foreground w-75 p-0 border-transparent outline-none ", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-2 p-3 bg-card rounded-md", children: [
|
|
19
|
+
/* @__PURE__ */ l("div", { className: "flex flex-col gap-3 w-full bg-background rounded-lg p-2", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
20
20
|
/* @__PURE__ */ l(s, { userInfo: e, className: "w-8 h-8" }),
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col overflow-hidden", children: [
|
|
22
22
|
/* @__PURE__ */ l("div", { className: "text-sm font-medium", children: (e == null ? void 0 : e.username) || "--" }),
|
|
23
23
|
/* @__PURE__ */ l("div", { className: "text-xs text-muted-foreground w-full truncate", children: (e == null ? void 0 : e.email) || (e == null ? void 0 : e.walletAddress) })
|
|
24
24
|
] })
|
|
25
25
|
] }) }),
|
|
26
|
-
|
|
26
|
+
o.map((r) => /* @__PURE__ */ l("div", { className: "px-0 py-0 focus-visible:border-none focus-visible:outline-none", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2 w-full", children: r.name === "logout" ? /* @__PURE__ */ l(m, { className: "flex-1 flex py-3 border-t border-border w-full px-2 hover:bg-background" }) : /* @__PURE__ */ l(d, { href: `/${r.href}`, baseUrl: process.env.NEXT_PUBLIC_AUTH_URL, className: "flex-1 flex py-3 h-full w-full px-2 hover:bg-background hover:text-primary rounded-lg ", onClick: t, children: /* @__PURE__ */ l(c, { value: r.name, parentKey: "account" }) }) }) }, r.name))
|
|
27
27
|
] }) });
|
|
28
28
|
}
|
|
29
29
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@0xchain/header",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0-beta.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"tailwind-merge": "3.3.1",
|
|
33
33
|
"next": "15.5.6",
|
|
34
34
|
"antd": "6.1.1",
|
|
35
|
-
"@0xchain/
|
|
36
|
-
"@0xchain/
|
|
37
|
-
"@0xchain/image": "
|
|
38
|
-
"@0xchain/better-link": "
|
|
39
|
-
"@0xchain/
|
|
40
|
-
"@0xchain/
|
|
41
|
-
"@0xchain/
|
|
42
|
-
"@0xchain/iconfont": "
|
|
43
|
-
"@0xchain/request": "
|
|
44
|
-
"@0xchain/
|
|
45
|
-
"@0xchain/
|
|
46
|
-
"@0xchain/
|
|
47
|
-
"@0xchain/
|
|
35
|
+
"@0xchain/avatar": "1.1.0-beta.1",
|
|
36
|
+
"@0xchain/auth": "1.1.0-beta.1",
|
|
37
|
+
"@0xchain/image": "1.1.0-beta.1",
|
|
38
|
+
"@0xchain/better-link": "1.1.0-beta.1",
|
|
39
|
+
"@0xchain/translation": "1.1.0-beta.1",
|
|
40
|
+
"@0xchain/link": "1.1.0-beta.1",
|
|
41
|
+
"@0xchain/ui": "1.1.0-beta.1",
|
|
42
|
+
"@0xchain/iconfont": "1.1.0-beta.1",
|
|
43
|
+
"@0xchain/request": "1.1.0-beta.1",
|
|
44
|
+
"@0xchain/theme-toggle": "1.1.0-beta.1",
|
|
45
|
+
"@0xchain/with-login": "1.1.0-beta.1",
|
|
46
|
+
"@0xchain/tooltip": "1.1.0-beta.1",
|
|
47
|
+
"@0xchain/token": "1.1.0-beta.1"
|
|
48
48
|
},
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|