@ichaingo/header 1.2.3 → 1.2.4

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.
Files changed (2) hide show
  1. package/dist/index.js +73 -77
  2. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -4,10 +4,10 @@ import p from "@ichaingo/link";
4
4
  import { DropdownMenu as X, DropdownMenuTrigger as G, DropdownMenuContent as M, DropdownMenuGroup as K, DropdownMenuItem as F } from "@ichaingo/ui/dropdown-menu";
5
5
  import u from "@ichaingo/translation";
6
6
  import { useState as N, useMemo as W, useEffect as w, useCallback as U } from "react";
7
- import L from "@ichaingo/better-link";
7
+ import _ from "@ichaingo/better-link";
8
8
  import { useLocale as y, useTranslations as E } from "next-intl";
9
9
  import { useTheme as f } from "next-themes";
10
- import _ from "@ichaingo/avatar";
10
+ import L from "@ichaingo/avatar";
11
11
  import { logout as q, fetchUserProfile as Q } from "@ichaingo/auth";
12
12
  import { twMerge as d } from "tailwind-merge";
13
13
  import { Accordion as P, AccordionItem as R, AccordionTrigger as j, AccordionContent as B } from "@ichaingo/ui/accordion";
@@ -16,22 +16,22 @@ import { Popover as V, PopoverTrigger as J, PopoverContent as Y } from "@ichaing
16
16
  import { PopoverArrow as Z } from "@radix-ui/react-popover";
17
17
  import { useSearchParams as I, usePathname as H } from "next/navigation";
18
18
  import ee from "@ichaingo/theme-toggle";
19
- import re from "rc-drawer";
20
- import { Menu as te, X as le } from "lucide-react";
19
+ import te from "rc-drawer";
20
+ import { Menu as re, X as le } from "lucide-react";
21
21
  function ne({
22
- userInfo: t
22
+ userInfo: r
23
23
  }) {
24
- const { gotoLogin: r } = L(), [l, n] = N(""), a = y(), { resolvedTheme: o } = f(), i = W(() => t == null ? void 0 : t.id, [t]);
24
+ const { gotoLogin: t } = _(), [l, n] = N(""), a = y(), { resolvedTheme: o } = f(), i = W(() => r == null ? void 0 : r.id, [r]);
25
25
  return w(() => {
26
- n(r({
26
+ n(t({
27
27
  locale: a,
28
28
  theme: o || "",
29
29
  redirect: window.location.href
30
30
  }));
31
- }, [a, o, r]), i ? (
31
+ }, [a, o, t]), i ? (
32
32
  // userInfo?.profileUrl
33
33
  // https://images.ichaingo.com/user-profile/100000201.png
34
- /* @__PURE__ */ e(_, { userInfo: t, className: "w-8 h-8" })
34
+ /* @__PURE__ */ e(L, { userInfo: r, className: "w-8 h-8" })
35
35
  ) : /* @__PURE__ */ e(
36
36
  p,
37
37
  {
@@ -42,42 +42,42 @@ function ne({
42
42
  }
43
43
  );
44
44
  }
45
- function D({ className: t }) {
46
- const r = U(async () => {
45
+ function D({ className: r }) {
46
+ const t = U(async () => {
47
47
  await q();
48
48
  }, []);
49
49
  return /* @__PURE__ */ e(
50
50
  "button",
51
51
  {
52
- onClick: r,
53
- className: d("cursor-pointer relative", t),
52
+ onClick: t,
53
+ className: d("cursor-pointer relative", r),
54
54
  children: /* @__PURE__ */ e(u, { value: "logout", parentKey: "account" })
55
55
  }
56
56
  );
57
57
  }
58
58
  function ae({
59
- list: t,
60
- userInfo: r,
59
+ list: r,
60
+ userInfo: t,
61
61
  onClick: l
62
62
  }) {
63
63
  const { resolvedTheme: n } = f();
64
64
  return /* @__PURE__ */ s(X, { children: [
65
- /* @__PURE__ */ e(G, { className: "outline-none cursor-pointer", children: /* @__PURE__ */ e(ne, { userInfo: r }) }),
65
+ /* @__PURE__ */ e(G, { className: "outline-none cursor-pointer", children: /* @__PURE__ */ e(ne, { userInfo: t }) }),
66
66
  /* @__PURE__ */ e(M, { align: "end", className: "z-2000 w-75 p-0 border-transparent outline-none border border-stroke", children: /* @__PURE__ */ s(K, { className: "flex flex-col gap-2 p-3 bg-module rounded-md", children: [
67
67
  /* @__PURE__ */ e("div", { className: "flex flex-col gap-3 w-full bg-background rounded-lg p-2", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
68
- /* @__PURE__ */ e(_, { userInfo: r, className: "w-8 h-8" }),
68
+ /* @__PURE__ */ e(L, { userInfo: t, className: "w-8 h-8" }),
69
69
  /* @__PURE__ */ s("div", { className: "flex flex-col overflow-hidden", children: [
70
- /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: (r == null ? void 0 : r.username) || "--" }),
71
- /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground w-full truncate", children: (r == null ? void 0 : r.email) || (r == null ? void 0 : r.walletAddress) })
70
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: (t == null ? void 0 : t.username) || "--" }),
71
+ /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground w-full truncate", children: (t == null ? void 0 : t.email) || (t == null ? void 0 : t.walletAddress) })
72
72
  ] })
73
73
  ] }) }),
74
- t.map((a) => /* @__PURE__ */ e(F, { className: "px-0 py-0 focus-visible:border-none focus-visible:outline-none", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full", children: a.name === "logout" ? /* @__PURE__ */ e(D, { className: "flex-1 flex py-3 border-t border-stroke w-full px-2 hover:bg-background" }) : /* @__PURE__ */ e(p, { href: `/${a.href}?theme=${n}`, baseUrl: process.env.NEXT_PUBLIC_AUTH_URL, className: "flex-1 flex py-3 h-full w-full px-2 hover:bg-background rounded-lg ", onClick: l, children: /* @__PURE__ */ e(u, { value: a.name, parentKey: "account" }) }) }) }, a.name))
74
+ r.map((a) => /* @__PURE__ */ e(F, { className: "px-0 py-0 focus-visible:border-none focus-visible:outline-none", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2 w-full", children: a.name === "logout" ? /* @__PURE__ */ e(D, { className: "flex-1 flex py-3 border-t border-stroke w-full px-2 hover:bg-background" }) : /* @__PURE__ */ e(p, { href: `/${a.href}?theme=${n}`, baseUrl: process.env.NEXT_PUBLIC_AUTH_URL, className: "flex-1 flex py-3 h-full w-full px-2 hover:bg-background rounded-lg ", onClick: l, children: /* @__PURE__ */ e(u, { value: a.name, parentKey: "account" }) }) }) }, a.name))
75
75
  ] }) })
76
76
  ] });
77
77
  }
78
78
  function se({
79
- list: t,
80
- userInfo: r,
79
+ list: r,
80
+ userInfo: t,
81
81
  onClick: l
82
82
  }) {
83
83
  const { resolvedTheme: n } = f();
@@ -90,13 +90,13 @@ function se({
90
90
  defaultValue: "",
91
91
  children: /* @__PURE__ */ s(R, { value: "item-1", className: "p-0 w-full border border-none", children: [
92
92
  /* @__PURE__ */ e(j, { className: "w-full bg-background p-3 flex items-center justify-between", children: /* @__PURE__ */ e("div", { className: "flex flex-col gap-3 w-full overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
93
- /* @__PURE__ */ e(_, { userInfo: r, className: "w-8 h-8 shrink-0" }),
93
+ /* @__PURE__ */ e(L, { userInfo: t, className: "w-8 h-8 shrink-0" }),
94
94
  /* @__PURE__ */ s("div", { className: "flex flex-col overflow-hidden", children: [
95
- /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: r == null ? void 0 : r.username }),
96
- /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground w-full truncate", children: (r == null ? void 0 : r.email) || (r == null ? void 0 : r.walletAddress) })
95
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: t == null ? void 0 : t.username }),
96
+ /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground w-full truncate", children: (t == null ? void 0 : t.email) || (t == null ? void 0 : t.walletAddress) })
97
97
  ] })
98
98
  ] }) }) }),
99
- /* @__PURE__ */ e(B, { className: "flex text-sm flex-col text-balance bg-background rounded-lg p-3 gap-3 mt-[10px]", children: /* @__PURE__ */ e("dl", { children: t.map((a) => /* @__PURE__ */ e(
99
+ /* @__PURE__ */ e(B, { className: "flex text-sm flex-col text-balance bg-background rounded-lg p-3 gap-3 mt-[10px]", children: /* @__PURE__ */ e("dl", { children: r.map((a) => /* @__PURE__ */ e(
100
100
  "dd",
101
101
  {
102
102
  className: "flex justify-start items-center gap-2 py-2",
@@ -108,9 +108,9 @@ function se({
108
108
  }
109
109
  );
110
110
  }
111
- function $({ onClick: t = () => {
112
- }, className: r }) {
113
- const l = y(), { resolvedTheme: n, theme: a } = f(), { gotoLogin: o } = L(), [i, m] = N("");
111
+ function $({ onClick: r = () => {
112
+ }, className: t }) {
113
+ const l = y(), { resolvedTheme: n, theme: a } = f(), { gotoLogin: o } = _(), [i, m] = N("");
114
114
  return w(() => {
115
115
  m(o({
116
116
  locale: l,
@@ -121,12 +121,12 @@ function $({ onClick: t = () => {
121
121
  p,
122
122
  {
123
123
  href: i,
124
- onClick: t,
124
+ onClick: r,
125
125
  baseUrl: process.env.NEXT_PUBLIC_AUTH_URL,
126
126
  replace: !0,
127
127
  className: d(
128
128
  "cursor-pointer text-sm text-white bg-primary py-2 px-3 rounded-lg",
129
- r
129
+ t
130
130
  ),
131
131
  children: /* @__PURE__ */ e(u, { value: "signIn", parentKey: "account" })
132
132
  }
@@ -141,10 +141,6 @@ const k = [
141
141
  name: "collect",
142
142
  href: "user-center/collect"
143
143
  },
144
- {
145
- name: "privateLabel",
146
- href: "user-center/private-label"
147
- },
148
144
  {
149
145
  name: "setting",
150
146
  href: "user-center/setting"
@@ -154,20 +150,20 @@ const k = [
154
150
  href: void 0
155
151
  }
156
152
  ];
157
- function oe({ onClick: t = (n) => {
158
- }, className: r, userInfo: l }) {
153
+ function oe({ onClick: r = (n) => {
154
+ }, className: t, userInfo: l }) {
159
155
  return l != null && l.id ? /* @__PURE__ */ s(A, { children: [
160
- /* @__PURE__ */ e("div", { className: d("hidden md:flex items-center", r), children: /* @__PURE__ */ e(ae, { list: k, userInfo: l, onClick: t }) }),
161
- /* @__PURE__ */ e("div", { className: d("block md:hidden w-full", r), children: /* @__PURE__ */ e(se, { list: k.filter((n) => n.href), userInfo: l, onClick: t }) })
162
- ] }) : /* @__PURE__ */ e($, { onClick: t, className: d(
156
+ /* @__PURE__ */ e("div", { className: d("hidden md:flex items-center", t), children: /* @__PURE__ */ e(ae, { list: k, userInfo: l, onClick: r }) }),
157
+ /* @__PURE__ */ e("div", { className: d("block md:hidden w-full", t), children: /* @__PURE__ */ e(se, { list: k.filter((n) => n.href), userInfo: l, onClick: r }) })
158
+ ] }) : /* @__PURE__ */ e($, { onClick: r, className: d(
163
159
  "hidden md:flex cursor-pointer text-sm text-white bg-primary py-2 px-3 rounded-lg",
164
160
  "order-3"
165
161
  ) });
166
162
  }
167
- function T({ onClick: t = () => {
163
+ function T({ onClick: r = () => {
168
164
  } }) {
169
165
  var g;
170
- const r = y(), l = I(), n = E("lang"), a = E("setting"), o = [
166
+ const t = y(), l = I(), n = E("lang"), a = E("setting"), o = [
171
167
  { name: n("en"), lang: "en" },
172
168
  { name: n("zh-hant"), lang: "zh-hant" },
173
169
  { name: n("zh-hans"), lang: "zh-hans" },
@@ -175,16 +171,16 @@ function T({ onClick: t = () => {
175
171
  { name: n("ko"), lang: "ko" }
176
172
  ], i = H(), m = U(
177
173
  (c) => {
178
- const v = i.replace(new RegExp(`/${r}(/|$)`), `/${c}$1`), b = l.toString();
174
+ const v = i.replace(new RegExp(`/${t}(/|$)`), `/${c}$1`), b = l.toString();
179
175
  return b ? `${v}?${b}` : v;
180
176
  },
181
- [i, r, l]
177
+ [i, t, l]
182
178
  );
183
179
  return /* @__PURE__ */ s("div", { className: "text-sm gap-2 flex flex-col justify-start items-start md:py-2", children: [
184
- /* @__PURE__ */ e("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ e(P, { type: "single", className: "flex-1", collapsible: !0, children: /* @__PURE__ */ s(R, { value: r, className: "border-0", children: [
180
+ /* @__PURE__ */ e("div", { className: "flex w-full justify-between items-center", children: /* @__PURE__ */ e(P, { type: "single", className: "flex-1", collapsible: !0, children: /* @__PURE__ */ s(R, { value: t, className: "border-0", children: [
185
181
  /* @__PURE__ */ e(j, { 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__ */ s("div", { className: "flex w-full justify-between items-center", children: [
186
182
  /* @__PURE__ */ e("span", { className: "text-title", children: a("language") }),
187
- /* @__PURE__ */ e("span", { className: "text-title", children: (g = o.find((c) => c.lang === r)) == null ? void 0 : g.name })
183
+ /* @__PURE__ */ e("span", { className: "text-title", children: (g = o.find((c) => c.lang === t)) == null ? void 0 : g.name })
188
184
  ] }) }),
189
185
  /* @__PURE__ */ e(B, { className: "bg-background mt-3 rounded-lg flex flex-col gap-2", children: o.map((c) => /* @__PURE__ */ e(
190
186
  p,
@@ -193,10 +189,10 @@ function T({ onClick: t = () => {
193
189
  withLocale: !1,
194
190
  className: d(
195
191
  "p-2 rounded-lg flex w-full justify-between items-center",
196
- r === c.lang ? "text-primary" : ""
192
+ t === c.lang ? "text-primary" : ""
197
193
  ),
198
194
  href: m(c.lang),
199
- onClick: t,
195
+ onClick: r,
200
196
  children: c.name
201
197
  },
202
198
  c.lang
@@ -208,7 +204,7 @@ function T({ onClick: t = () => {
208
204
  ] })
209
205
  ] });
210
206
  }
211
- function ie({ onClick: t = () => {
207
+ function ie({ onClick: r = () => {
212
208
  } }) {
213
209
  return /* @__PURE__ */ s("div", { className: "w-full md:w-auto order-3 md:order-0", children: [
214
210
  /* @__PURE__ */ e("div", { className: "hidden md:flex items-center bg-module rounded-lg p-1.5 cursor-pointer", children: /* @__PURE__ */ s(V, { children: [
@@ -220,7 +216,7 @@ function ie({ onClick: t = () => {
220
216
  className: "relative top-[10px] rounded-xl border border-stroke bg-module p-2 w-72 z-1000",
221
217
  children: [
222
218
  /* @__PURE__ */ e(Z, { className: "fill-module" }),
223
- /* @__PURE__ */ e(T, { onClick: t })
219
+ /* @__PURE__ */ e(T, { onClick: r })
224
220
  ]
225
221
  }
226
222
  )
@@ -233,22 +229,22 @@ const C = {
233
229
  LOGGED_IN: "user-logged-in",
234
230
  LOGGED_OUT: "user-logged-out"
235
231
  };
236
- function je(t, r) {
237
- const l = new CustomEvent(t, { detail: r });
232
+ function je(r, t) {
233
+ const l = new CustomEvent(r, { detail: t });
238
234
  window.dispatchEvent(l);
239
235
  }
240
- function ce(t, r) {
236
+ function ce(r, t) {
241
237
  const l = (n) => {
242
- r(n.detail);
238
+ t(n.detail);
243
239
  };
244
- return window.addEventListener(t, l), () => window.removeEventListener(t, l);
240
+ return window.addEventListener(r, l), () => window.removeEventListener(r, l);
245
241
  }
246
- function de(t, r) {
247
- window.removeEventListener(t, r);
242
+ function de(r, t) {
243
+ window.removeEventListener(r, t);
248
244
  }
249
- function z({ onClick: t = () => {
250
- }, hideNews: r = !1, hideLogin: l = !1 }) {
251
- const { gotoAISQL: n, gotoChat: a } = L(), o = y(), { resolvedTheme: i, theme: m } = f(), g = H(), [c, v] = N(null), b = [
245
+ function z({ onClick: r = () => {
246
+ }, hideNews: t = !1, hideLogin: l = !1 }) {
247
+ const { gotoAISQL: n, gotoChat: a } = _(), o = y(), { resolvedTheme: i, theme: m } = f(), g = H(), [c, v] = N(null), b = [
252
248
  {
253
249
  baseUrl: process.env.NEXT_PUBLIC_ICHAINGO_SEARCH_BASEURL,
254
250
  href: `/explorer?theme=${i || m}`,
@@ -294,7 +290,7 @@ function z({ onClick: t = () => {
294
290
  key: "/market",
295
291
  label: /* @__PURE__ */ e(u, { value: "market", parentKey: "menu" })
296
292
  }
297
- ].filter((h) => r ? !["/explorer", "/chat", "/sql"].includes(h.key) : !0), x = U(() => {
293
+ ].filter((h) => t ? !["/explorer", "/chat", "/sql"].includes(h.key) : !0), x = U(() => {
298
294
  Q().then((h) => {
299
295
  v(h);
300
296
  });
@@ -320,39 +316,39 @@ function z({ onClick: t = () => {
320
316
  "md:flex-row md:items-center md:w-auto md:h-[34px] md:leading-[34px] md:gap-6",
321
317
  "order-2 md:order-0"
322
318
  ),
323
- children: b.map((h, O) => /* @__PURE__ */ e("li", { className: d("w-full md:w-auto h-11 md:h-auto cursor-pointer", g.includes(h.key) && "border-b-2 border-primary text-primary "), children: /* @__PURE__ */ e(p, { href: h.href, onClick: t, className: "h-full flex items-center justify-start", baseUrl: h.baseUrl, suppressHydrationWarning: !0, children: h.label }) }, O))
319
+ children: b.map((h, O) => /* @__PURE__ */ e("li", { className: d("w-full md:w-auto h-11 md:h-auto cursor-pointer", g.includes(h.key) && "border-b-2 border-primary text-primary "), children: /* @__PURE__ */ e(p, { href: h.href, onClick: r, className: "h-full flex items-center justify-start", baseUrl: h.baseUrl, suppressHydrationWarning: !0, children: h.label }) }, O))
324
320
  }
325
321
  ),
326
- /* @__PURE__ */ e(ie, { onClick: t }),
322
+ /* @__PURE__ */ e(ie, { onClick: r }),
327
323
  !g.includes("/login") && !l ? /* @__PURE__ */ s(A, { children: [
328
- /* @__PURE__ */ e(oe, { onClick: t, userInfo: c }),
329
- c != null && c.id ? /* @__PURE__ */ e("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-subtitle", children: /* @__PURE__ */ e(D, {}) }) : /* @__PURE__ */ e($, { onClick: t, className: "flex md:hidden h-11 cursor-pointer whitespace-nowrap order-3 bg-primary text-[#fff] rounded-lg p-2 mt-3 w-full items-center justify-center" })
324
+ /* @__PURE__ */ e(oe, { onClick: r, userInfo: c }),
325
+ c != null && c.id ? /* @__PURE__ */ e("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-subtitle", children: /* @__PURE__ */ e(D, {}) }) : /* @__PURE__ */ e($, { onClick: r, className: "flex md:hidden h-11 cursor-pointer whitespace-nowrap order-3 bg-primary text-[#fff] rounded-lg p-2 mt-3 w-full items-center justify-center" })
330
326
  ] }) : null
331
327
  ]
332
328
  }
333
329
  );
334
330
  }
335
- function me({ hideLogin: t, hideNews: r }) {
331
+ function me({ hideLogin: r, hideNews: t }) {
336
332
  const [l, n] = N(!1);
337
333
  if (!l)
338
- return /* @__PURE__ */ e(te, { onClick: () => n(!0), size: 32, style: { color: "var(--title)" }, className: "md:hidden ml-2.5 bg-module rounded-lg p-[4px] " });
334
+ return /* @__PURE__ */ e(re, { onClick: () => n(!0), size: 32, style: { color: "var(--title)" }, className: "md:hidden ml-2.5 bg-module rounded-lg p-[4px] " });
339
335
  const a = (o) => {
340
336
  o == null || o.preventDefault(), o == null || o.stopPropagation(), n(!1);
341
337
  };
342
- return /* @__PURE__ */ e(re, { open: l, placement: "right", className: "block md:hidden fixed top-0 bottom-0 left-0 right-0 z-1001 bg-background p-2", children: /* @__PURE__ */ s("div", { className: "w-full max-h-full overflow-y-auto p-3 bg-module rounded-lg", children: [
338
+ return /* @__PURE__ */ e(te, { open: l, placement: "right", className: "block md:hidden fixed top-0 bottom-0 left-0 right-0 z-1001 bg-background p-2", children: /* @__PURE__ */ s("div", { className: "w-full max-h-full overflow-y-auto p-3 bg-module rounded-lg", children: [
343
339
  /* @__PURE__ */ e("div", { className: "flex justify-end items-center p-2", children: /* @__PURE__ */ e(le, { size: 24, style: { color: "var(--title)" }, onClick: (o) => a(o) }) }),
344
- /* @__PURE__ */ e(z, { onClick: (o) => a(o), hideLogin: t, hideNews: r })
340
+ /* @__PURE__ */ e(z, { onClick: (o) => a(o), hideLogin: r, hideNews: t })
345
341
  ] }) });
346
342
  }
347
- function ue({ hideNews: t, hideLogin: r }) {
343
+ function ue({ hideNews: r, hideLogin: t }) {
348
344
  return /* @__PURE__ */ s("div", { className: "flex justify-end items-center md:gap-10 z-1001 ", children: [
349
- /* @__PURE__ */ e(me, { hideLogin: r, hideNews: t }),
350
- /* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e(z, { hideNews: t, hideLogin: r }) })
345
+ /* @__PURE__ */ e(me, { hideLogin: t, hideNews: r }),
346
+ /* @__PURE__ */ e("div", { className: "hidden md:block", children: /* @__PURE__ */ e(z, { hideNews: r, hideLogin: t }) })
351
347
  ] });
352
348
  }
353
349
  function he() {
354
- const { resolvedTheme: t, theme: r } = f();
355
- return /* @__PURE__ */ e(p, { suppressHydrationWarning: !0, href: `/?theme=${t || r}`, baseUrl: process.env.NEXT_PUBLIC_ICHAINGO_SEARCH_BASEURL, className: d(
350
+ const { resolvedTheme: r, theme: t } = f();
351
+ return /* @__PURE__ */ e(p, { suppressHydrationWarning: !0, href: `/?theme=${r || t}`, baseUrl: process.env.NEXT_PUBLIC_ICHAINGO_SEARCH_BASEURL, className: d(
356
352
  "w-auto shrink-0 block"
357
353
  ), children: /* @__PURE__ */ e(
358
354
  S,
@@ -366,16 +362,16 @@ function he() {
366
362
  }
367
363
  ) });
368
364
  }
369
- function Be({ extra: t, children: r, className: l, hideNews: n, hideLogin: a }) {
365
+ function Be({ extra: r, children: t, className: l, hideNews: n, hideLogin: a }) {
370
366
  return /* @__PURE__ */ s("div", { className: d("sticky left-0 right-0 top-0 bg-background h-16 z-999", l), children: [
371
367
  /* @__PURE__ */ s("div", { className: "md:bg-module h-13 text-center flex flex-wrap justify-between items-center gap-2 px-4", children: [
372
368
  /* @__PURE__ */ s("div", { className: "flex items-center flex-1 gap-6", children: [
373
369
  /* @__PURE__ */ e(he, {}),
374
- r
370
+ t
375
371
  ] }),
376
372
  /* @__PURE__ */ e(ue, { hideNews: n, hideLogin: a })
377
373
  ] }),
378
- t
374
+ r
379
375
  ] });
380
376
  }
381
377
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ichaingo/header",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -29,16 +29,16 @@
29
29
  "rollup-plugin-preserve-use-client": "^1.0.0",
30
30
  "tailwind-merge": "^2.5.5",
31
31
  "next": "15.1.6",
32
- "@ichaingo/auth": "1.2.3",
33
- "@ichaingo/better-link": "1.2.3",
34
- "@ichaingo/translation": "1.2.3",
35
- "@ichaingo/image": "1.2.3",
36
- "@ichaingo/theme-toggle": "1.2.3",
37
- "@ichaingo/i18n": "1.2.3",
38
- "@ichaingo/link": "1.2.3",
39
- "@ichaingo/avatar": "1.2.3",
40
- "@ichaingo/providers": "1.2.3",
41
- "@ichaingo/ui": "1.2.3"
32
+ "@ichaingo/image": "1.2.4",
33
+ "@ichaingo/link": "1.2.4",
34
+ "@ichaingo/ui": "1.2.4",
35
+ "@ichaingo/auth": "1.2.4",
36
+ "@ichaingo/avatar": "1.2.4",
37
+ "@ichaingo/i18n": "1.2.4",
38
+ "@ichaingo/translation": "1.2.4",
39
+ "@ichaingo/providers": "1.2.4",
40
+ "@ichaingo/better-link": "1.2.4",
41
+ "@ichaingo/theme-toggle": "1.2.4"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/js-cookie": "^3.0.6"