@blocklet/pages-kit-inner-components 0.4.157 → 0.4.158

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.
@@ -3,7 +3,7 @@ import "@mui/icons-material";
3
3
  import { Box as b, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
4
4
  import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as bt, Fragment as Mt, isValidElement as yt, useState as K, useEffect as E, useRef as tt } from "react";
5
5
  import G from "lodash/keyBy";
6
- import { e as j, g as N, E as Kt, h as et, l as ot } from "./state-BcZbsEn6.js";
6
+ import { e as j, g as N, E as Kt, h as et, l as ot } from "./state-bs1ORWYm.js";
7
7
  import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
8
8
  import { deepmerge as Gt } from "@mui/utils";
9
9
  import nt from "lodash/pick";
@@ -1512,9 +1512,6 @@ function no({
1512
1512
  dark: m,
1513
1513
  ...f,
1514
1514
  align: p,
1515
- sx: {
1516
- bgcolor: c === "wall" ? void 0 : m ? "grey.900" : "common.white"
1517
- },
1518
1515
  style: d === 0 && t.length > 1 ? {
1519
1516
  borderRadius: 0,
1520
1517
  marginRight: "-1px",
@@ -4,7 +4,7 @@ import { Icon as P } from "@iconify-icon/react";
4
4
  import { TextField as A, Stack as w, FormControlLabel as F, Switch as L, Box as j, InputAdornment as k } from "@mui/material";
5
5
  import { forwardRef as B, useState as D, useEffect as E, useImperativeHandle as U } from "react";
6
6
  import { useDebounce as V } from "react-use";
7
- import { g as x } from "./state-BcZbsEn6.js";
7
+ import { g as x } from "./state-bs1ORWYm.js";
8
8
  const J = B(function({ showMarkdown: I, markdown: h, onMarkdownChange: n, showUploader: S, value: o, meta: H, onChange: l, ...a }, z) {
9
9
  const [e, c] = D("");
10
10
  E(() => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { u as a, S as o, a as s, b as n } from "./state-BcZbsEn6.js";
2
+ import { u as a, S as o, a as s, b as n } from "./state-bs1ORWYm.js";
3
3
  function d({ children: t }) {
4
4
  const r = a();
5
5
  return /* @__PURE__ */ e(o, { url: s(r ?? ""), name: "root", waitingSynced: !0, children: /* @__PURE__ */ e(i, { children: t }) });
@@ -0,0 +1,527 @@
1
+ import { jsx as e, jsxs as D } from "react/jsx-runtime";
2
+ import { d as q, e as pe, g as me, u as de, c as ge } from "./state-bs1ORWYm.js";
3
+ import { useLocaleContext as K } from "@arcblock/ux/lib/Locale/context";
4
+ import Q from "@arcblock/ux/lib/Result";
5
+ import { useHeaderState as fe } from "@blocklet/pages-kit/builtin/page/header";
6
+ import { useColorConvert as he } from "@blocklet/pages-kit/contexts/color";
7
+ import { setPageDataSource as X } from "@blocklet/pages-kit/utils/data-source";
8
+ import { generateParamCombinations as be } from "@blocklet/pages-kit/utils/route";
9
+ import ye from "@blocklet/ui-react/lib/Header";
10
+ import { cx as Y } from "@emotion/css";
11
+ import { Global as J, css as Z } from "@emotion/react";
12
+ import ee from "@emotion/styled";
13
+ import { Box as L, CircularProgress as ve, useTheme as te, Button as we, Stack as Se, alpha as G, useMediaQuery as xe } from "@mui/material";
14
+ import { useReactive as oe, useScroll as ke } from "ahooks";
15
+ import Pe from "isomorphic-dompurify";
16
+ import N from "lodash/cloneDeep";
17
+ import Ce from "lodash/isEmpty";
18
+ import ne from "lodash/isEqual";
19
+ import { useEffect as O, useContext as Ie, lazy as re, useMemo as j, useRef as ae, Suspense as Re, useState as je } from "react";
20
+ import { Helmet as Ee } from "react-helmet";
21
+ import { useSearchParams as se, Routes as Me, Route as I, Navigate as Te, ScrollRestoration as Be } from "react-router-dom";
22
+ import { useAsync as ie } from "react-use";
23
+ import { joinURL as R } from "ufo";
24
+ import { S as Fe, n as Oe, P as Le, a as _e, B as Ae, g as De } from "./array-MChdTfwz.js";
25
+ import { styled as le, useTheme as Ne } from "@arcblock/ux/lib/Theme";
26
+ import $e from "@blocklet/ui-react/lib/Footer";
27
+ import "webfontloader";
28
+ import { createAuthServiceSessionContext as He } from "@arcblock/did-connect/lib/Session";
29
+ const Ue = le($e, { shouldForwardProp: (t) => !!t })`
30
+ & > div > .MuiContainer-root {
31
+ max-width: unset;
32
+ }
33
+ `;
34
+ function Ve({ meta: t, ...n }) {
35
+ const r = Ne();
36
+ return /* @__PURE__ */ e(Ue, { ...n, meta: t, theme: r || {} });
37
+ }
38
+ function ze(t) {
39
+ return /* @__PURE__ */ e(L, { display: "flex", flex: 1, height: "100%", alignItems: "center", justifyContent: "center", ...t, children: /* @__PURE__ */ e(ve, { size: 30 }) });
40
+ }
41
+ function Ge(t) {
42
+ return /* @__PURE__ */ e(We, { ...t });
43
+ }
44
+ const We = le(L)`
45
+ position: fixed;
46
+ left: 0;
47
+ top: 0;
48
+ z-index: 999999999999;
49
+ width: 80px;
50
+ font-size: 12px;
51
+ text-align: center;
52
+ opacity: 0.7;
53
+ transform: translateX(-23%) translateY(70%) rotate(-45deg);
54
+ pointer-events: none;
55
+ `, qe = `Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
56
+ sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'`;
57
+ function Ke({
58
+ titleFontFamily: t,
59
+ descriptionFontFamily: n
60
+ }) {
61
+ var o;
62
+ const r = te(), a = (o = r == null ? void 0 : r.typography) == null ? void 0 : o.fontFamily;
63
+ O(() => {
64
+ }, [t, n]);
65
+ const l = `${a}, ${qe}`;
66
+ return /* @__PURE__ */ e(
67
+ J,
68
+ {
69
+ styles: Z`
70
+ #app {
71
+ font-family: ${l};
72
+
73
+ .page-kit-section__title {
74
+ font-family: ${l};
75
+ }
76
+
77
+ .page-kit-section__description {
78
+ font-family: ${l};
79
+ }
80
+ }
81
+ `
82
+ }
83
+ );
84
+ }
85
+ const { SessionProvider: Bt, SessionContext: Qe, SessionConsumer: Ft, withSession: Ot } = He();
86
+ function U() {
87
+ return Ie(Qe);
88
+ }
89
+ function Xe(...t) {
90
+ var r;
91
+ const { session: n } = U();
92
+ return t.includes((r = n.user) == null ? void 0 : r.role);
93
+ }
94
+ function Ye(...t) {
95
+ var a;
96
+ const { session: n } = U(), r = Xe(...t);
97
+ return ((a = window.blocklet) == null ? void 0 : a.tenantMode) === "multiple" ? !!n.user : r;
98
+ }
99
+ function Lt() {
100
+ const [t] = se(), { session: n } = U(), r = Ye("owner", "admin", "pagesEditor", "member"), a = j(() => {
101
+ const o = t.get("mode");
102
+ return Fe.includes(o) ? o : "production";
103
+ }, [t]), l = a === "production" ? a : n.user ? r ? a : "production" : null;
104
+ return l ? /* @__PURE__ */ e(Je, { mode: l }) : null;
105
+ }
106
+ function Je({ mode: t }) {
107
+ if (t !== "draft") {
108
+ const n = window.__PAGE_STATE__;
109
+ return n ? /* @__PURE__ */ e(H, { mode: t, state: n }) : /* @__PURE__ */ e(et, { mode: t, children: ({ state: r }) => /* @__PURE__ */ e(H, { mode: t, state: r }) });
110
+ }
111
+ return /* @__PURE__ */ e(Ze, { children: ({ state: n }) => /* @__PURE__ */ e(H, { mode: t, state: n }) });
112
+ }
113
+ const Ze = re(() => import("./draft-data-ClUGStC_.js"));
114
+ function et({
115
+ mode: t,
116
+ children: n
117
+ }) {
118
+ const r = document.querySelector('meta[property="pages:version"]'), a = r == null ? void 0 : r.content, l = de(), o = j(() => {
119
+ if (a === "{{pagesPublishedAt}}") {
120
+ const c = localStorage.getItem(ge(l ?? ""));
121
+ return Number(c) ? Number(c) : (/* @__PURE__ */ new Date()).getTime();
122
+ }
123
+ return Number(a);
124
+ }, [a]), { loading: m, value: s } = ie(() => De({ mode: t, version: o }), [t, o]);
125
+ return m ? /* @__PURE__ */ e(ze, {}) : s ? n({ state: s }) : null;
126
+ }
127
+ function H({ mode: t, state: n }) {
128
+ const { t: r, locale: a } = K(), [l] = se(), o = l.get("hiddenBadge") === "true", m = l.get("showPublish") === "true", {
129
+ pageIds: s,
130
+ pages: c,
131
+ routeIds: g,
132
+ routes: d,
133
+ supportedLocales: u,
134
+ config: { defaultLocale: b },
135
+ resources: v
136
+ } = n, w = q(n), y = j(
137
+ () => u != null && u.some((p) => p.locale === a) ? a : void 0,
138
+ [a, u]
139
+ ), f = Object.values(c).find((p) => (p == null ? void 0 : p.slug) === "/") ? void 0 : Object.values(c)[0], _ = j(
140
+ () => s.map((p) => {
141
+ const i = c[p];
142
+ return i && {
143
+ id: i.id,
144
+ path: R("/", y || "", i.slug, t !== "production" ? `?mode=${t}` : "")
145
+ };
146
+ }).filter(Oe),
147
+ [s, c, y, t]
148
+ ), k = ([...p]) => (t !== "production" && m && p.unshift(
149
+ /* @__PURE__ */ e(Re, { fallback: /* @__PURE__ */ e("div", {}), children: /* @__PURE__ */ e(tt, { mode: "production", state: n }) })
150
+ ), p);
151
+ return /* @__PURE__ */ D(Le, { value: { pages: _ }, children: [
152
+ /* @__PURE__ */ D(Me, { children: [
153
+ f && /* @__PURE__ */ e(I, { index: !0, element: /* @__PURE__ */ e(Te, { to: R("/", y || "", f.slug) }) }),
154
+ g == null ? void 0 : g.map((p) => {
155
+ var E, M, T, S;
156
+ const i = d == null ? void 0 : d[p];
157
+ if (!i || !i.displayTemplateId) return null;
158
+ const P = c[i.displayTemplateId];
159
+ if (!P) return null;
160
+ let C = [];
161
+ if (i.params && i.params.length > 0) {
162
+ const h = be({
163
+ basePath: i.path,
164
+ params: i.params,
165
+ routeId: i.id,
166
+ paramsOptions: i.paramsOptions,
167
+ currentIndex: 0,
168
+ currentParams: [],
169
+ currentOptionIds: [],
170
+ result: []
171
+ });
172
+ C = h == null ? void 0 : h.map((x) => {
173
+ var B, F, V, z;
174
+ const A = x.paramOptionIds.join("-");
175
+ return /* @__PURE__ */ e(
176
+ I,
177
+ {
178
+ path: R(":projectIdOrSlug?", x.path),
179
+ element: /* @__PURE__ */ e(
180
+ W,
181
+ {
182
+ mode: t,
183
+ components: w,
184
+ page: P,
185
+ locale: y,
186
+ defaultLocale: b,
187
+ headerAddons: k,
188
+ state: n,
189
+ pageData: (z = (V = (F = (B = i.dataSource) == null ? void 0 : B.pathDataMappings) == null ? void 0 : F[A]) == null ? void 0 : V.dataCache) == null ? void 0 : z[y || b || "en"]
190
+ }
191
+ )
192
+ },
193
+ A
194
+ );
195
+ });
196
+ }
197
+ return C.push(
198
+ /* @__PURE__ */ e(
199
+ I,
200
+ {
201
+ path: R(":projectIdOrSlug?", i.path),
202
+ element: /* @__PURE__ */ e(
203
+ W,
204
+ {
205
+ mode: t,
206
+ components: w,
207
+ page: P,
208
+ locale: y,
209
+ defaultLocale: b,
210
+ headerAddons: k,
211
+ state: n,
212
+ pageData: (S = (T = (M = (E = i.dataSource) == null ? void 0 : E.pathDataMappings) == null ? void 0 : M[i.id]) == null ? void 0 : T.dataCache) == null ? void 0 : S[y || b || "en"]
213
+ }
214
+ )
215
+ },
216
+ i.id
217
+ )
218
+ ), C;
219
+ }),
220
+ s.map((p) => {
221
+ const i = c[p];
222
+ return i ? /* @__PURE__ */ e(
223
+ I,
224
+ {
225
+ path: R(":projectIdOrSlug?", i.slug),
226
+ element: /* @__PURE__ */ e(
227
+ $,
228
+ {
229
+ mode: t,
230
+ components: w,
231
+ page: i,
232
+ locale: y,
233
+ defaultLocale: b,
234
+ headerAddons: k
235
+ }
236
+ )
237
+ },
238
+ i.id
239
+ ) : null;
240
+ }),
241
+ v.pages && Object.values(v.pages).map(({ blockletId: p, page: i }) => /* @__PURE__ */ e(
242
+ I,
243
+ {
244
+ path: R("/", `@${p}`, i.slug),
245
+ element: /* @__PURE__ */ e(
246
+ $,
247
+ {
248
+ mode: t,
249
+ components: w,
250
+ page: i,
251
+ locale: y,
252
+ defaultLocale: b,
253
+ headerAddons: k
254
+ }
255
+ )
256
+ },
257
+ i.id
258
+ )),
259
+ /* @__PURE__ */ e(
260
+ I,
261
+ {
262
+ path: "*",
263
+ element: /* @__PURE__ */ e(L, { width: "100vw", height: "100vh", display: "flex", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ e(Q, { status: 404, extra: /* @__PURE__ */ e(ue, { href: "/", children: r("common.back") }) }) })
264
+ }
265
+ )
266
+ ] }),
267
+ t !== "production" && !o && /* @__PURE__ */ e(Ge, { sx: { bgcolor: "info.light" }, children: t }),
268
+ /* @__PURE__ */ e(Ke, {})
269
+ ] });
270
+ }
271
+ function W({
272
+ mode: t,
273
+ pageData: n,
274
+ components: r,
275
+ page: a,
276
+ locale: l,
277
+ defaultLocale: o,
278
+ headerAddons: m,
279
+ state: s
280
+ }) {
281
+ const c = oe({
282
+ page: null
283
+ });
284
+ O(() => {
285
+ const d = a || null;
286
+ d ? c.page = N(d) : c.page = null;
287
+ }, [a, c]);
288
+ const g = ae();
289
+ return O(() => {
290
+ ne(n, g.current) || n && c.page && (X(c.page, s, l, n), g.current = N(n));
291
+ }, [c.page, n, l, s]), c.page ? /* @__PURE__ */ e(
292
+ $,
293
+ {
294
+ mode: t,
295
+ components: r,
296
+ page: c.page,
297
+ locale: l,
298
+ defaultLocale: o,
299
+ headerAddons: m
300
+ }
301
+ ) : null;
302
+ }
303
+ function _t({
304
+ mode: t,
305
+ state: n,
306
+ path: r,
307
+ pageData: a
308
+ }) {
309
+ const { t: l, locale: o } = K(), {
310
+ pages: m,
311
+ supportedLocales: s,
312
+ config: { defaultLocale: c },
313
+ resources: g
314
+ } = n, d = Object.values(m).find((f) => (f == null ? void 0 : f.slug) === r), u = Object.values(g.pages || {}).find((f) => f.page.slug === r), b = j(
315
+ () => s != null && s.some((f) => f.locale === o) ? o : void 0,
316
+ [o, s]
317
+ ), v = oe({
318
+ page: null
319
+ });
320
+ O(() => {
321
+ const f = d || (u == null ? void 0 : u.page) || null;
322
+ f ? v.page = N(f) : v.page = null;
323
+ }, [d, u]);
324
+ const w = ae();
325
+ if (O(() => {
326
+ ne(a, w.current) || a && v.page && (X(v.page, n, b, a), w.current = N(a));
327
+ }, [{}]), !d && !(u != null && u.page))
328
+ return /* @__PURE__ */ e(L, { width: "100vw", height: "100vh", display: "flex", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ e(Q, { style: { background: "inherit" }, status: 404, extra: /* @__PURE__ */ e(ue, { href: "/", children: l("common.back") }) }) });
329
+ const y = q(n);
330
+ return v.page ? /* @__PURE__ */ e(
331
+ $,
332
+ {
333
+ mode: t,
334
+ components: y,
335
+ page: v.page,
336
+ locale: b,
337
+ defaultLocale: c
338
+ }
339
+ ) : null;
340
+ }
341
+ function $({
342
+ mode: t,
343
+ components: n,
344
+ page: r,
345
+ locale: a,
346
+ defaultLocale: l,
347
+ headerAddons: o
348
+ }) {
349
+ var _, k, p, i, P, C, E, M, T;
350
+ const m = he(), s = ((_ = r.locales) == null ? void 0 : _[a]) ?? ((k = r.locales) == null ? void 0 : k[l]) ?? {}, c = s.title || ((p = window.blocklet) == null ? void 0 : p.appName), g = s.description || ((i = window.blocklet) == null ? void 0 : i.appDescription), d = pe(me(s.image), 540), { logo: u, brand: b, description: v, ...w } = fe(), y = j(
351
+ () => (S) => {
352
+ var x;
353
+ let h = (o == null ? void 0 : o(S)) ?? S;
354
+ return h = ((x = w.addons) == null ? void 0 : x.call(w, h)) ?? h, h;
355
+ },
356
+ [w.addons, o]
357
+ ), f = (P = s.header) != null && P.translucent ? nt : ce;
358
+ return /* @__PURE__ */ D(_e, { page: r, defaultLocale: l, currentLocale: a, children: [
359
+ /* @__PURE__ */ e(
360
+ J,
361
+ {
362
+ styles: Z`
363
+ body {
364
+ background-color: ${m(
365
+ !s.backgroundColor || s.backgroundColor === "transparent" ? "background.default" : s.backgroundColor
366
+ )} !important;
367
+ }
368
+ `
369
+ }
370
+ ),
371
+ /* @__PURE__ */ e(
372
+ f,
373
+ {
374
+ hideNavMenu: !!((C = s.header) != null && C.hideNavMenus),
375
+ translucentTextColor: (E = s.header) == null ? void 0 : E.translucentTextColor,
376
+ ...u ? { logo: u } : {},
377
+ ...b ? { brand: b } : {},
378
+ ...v ? { description: v } : {},
379
+ className: Y(((M = s.header) == null ? void 0 : M.sticky) && "sticky", "page-header"),
380
+ maxWidth: !1,
381
+ addons: y
382
+ }
383
+ ),
384
+ /* @__PURE__ */ e(Be, {}),
385
+ /* @__PURE__ */ D(Ee, { children: [
386
+ /* @__PURE__ */ e("title", { children: c }),
387
+ /* @__PURE__ */ e("meta", { name: "og:title", content: c }),
388
+ /* @__PURE__ */ e("meta", { name: "og:description", content: g }),
389
+ /* @__PURE__ */ e("meta", { name: "og:image", content: d }),
390
+ /* @__PURE__ */ e("meta", { name: "twitter:image:src", content: d }),
391
+ /* @__PURE__ */ e("meta", { name: "twitter:image", content: d }),
392
+ /* @__PURE__ */ e("meta", { property: "twitter:description", content: g }),
393
+ /* @__PURE__ */ e("meta", { property: "twitter:title", content: c }),
394
+ /* @__PURE__ */ e("meta", { name: "description", content: g })
395
+ ] }),
396
+ /* @__PURE__ */ e(
397
+ Se,
398
+ {
399
+ flexGrow: 1,
400
+ className: "PageView-root",
401
+ sx: {
402
+ // 第一个 .BlockBase-root 的 pt 为 0
403
+ "& .BlockBase-root:first-child": {
404
+ pt: "0 !important"
405
+ }
406
+ },
407
+ children: r.sectionIds.map((S) => {
408
+ var B, F;
409
+ const h = r.sections[S];
410
+ if (!h || h.visibility === "hidden") return null;
411
+ const x = (B = h.locales) == null ? void 0 : B[a], A = ((F = h.locales) == null ? void 0 : F[l]) ?? {};
412
+ return /* @__PURE__ */ e(
413
+ Ae,
414
+ {
415
+ id: S,
416
+ type: h.component,
417
+ mode: t,
418
+ section: h,
419
+ config: {
420
+ ...Ce(x) ? A : x,
421
+ locale: a,
422
+ dev: t === "draft" ? {
423
+ mode: t,
424
+ components: n,
425
+ defaultLocale: l
426
+ } : { mode: t }
427
+ }
428
+ },
429
+ S
430
+ );
431
+ })
432
+ }
433
+ ),
434
+ !((T = s.footer) != null && T.hidden) && /* @__PURE__ */ e(Ve, {})
435
+ ] });
436
+ }
437
+ const tt = re(() => import("./publish-button-Dur9W9gN.js")), ce = ee(ye)`
438
+ &.sticky {
439
+ position: sticky;
440
+ top: 0;
441
+ }
442
+ `;
443
+ function ot({ logo: t }) {
444
+ const [n, r] = je(), a = xe((o) => o.breakpoints.down("sm")), { value: l } = ie(() => {
445
+ var s, c;
446
+ const o = new URL(
447
+ a ? ((s = window == null ? void 0 : window.blocklet) == null ? void 0 : s.appLogo) || "/.well-known/service/blocklet/logo" : ((c = window == null ? void 0 : window.blocklet) == null ? void 0 : c.appLogoRect) || "/.well-known/service/blocklet/logo-rect",
448
+ window.location.origin
449
+ );
450
+ o.searchParams.delete("imageFilter"), o.searchParams.delete("f");
451
+ const m = o.toString();
452
+ return new Promise((g) => {
453
+ fetch(m).then((d) => {
454
+ const u = d.headers.get("content-type");
455
+ u != null && u.includes("svg") && d.text().then((b) => {
456
+ r(b), g(null);
457
+ }), g(d.url);
458
+ });
459
+ });
460
+ }, [a]);
461
+ if (t)
462
+ return t;
463
+ if (n)
464
+ return /* @__PURE__ */ e(L, { sx: { filter: "initial !important" }, dangerouslySetInnerHTML: { __html: Pe.sanitize(n) } });
465
+ if (l) {
466
+ const o = new URL(l);
467
+ o.searchParams.set("imageFilter", "convert"), o.searchParams.set("f", "png"), o.searchParams.set("h", "80");
468
+ const m = o.toString();
469
+ return /* @__PURE__ */ e("img", { src: m, alt: "logo" });
470
+ }
471
+ return null;
472
+ }
473
+ function nt({
474
+ logo: t,
475
+ translucentTextColor: n,
476
+ ...r
477
+ }) {
478
+ const { top: a = 0 } = ke(() => document.getElementById("app")) || {}, l = te();
479
+ let o = Math.min(a / 800, 1), m = "";
480
+ return o > 0.1 ? (o = Math.max(o, 0.6), m = G(l.palette.text.primary, o)) : m = n || "#EEEEEE", /* @__PURE__ */ e(
481
+ ce,
482
+ {
483
+ logo: /* @__PURE__ */ e(ot, { logo: t }),
484
+ ...r,
485
+ className: Y(o <= 0.7 && "reverse-color"),
486
+ style: {
487
+ backgroundColor: G(l.palette.background.default, o),
488
+ // @ts-ignore
489
+ "--logo-invert": o <= 0.7 ? 1 - o / 6 : 1 - o
490
+ },
491
+ sx: {
492
+ backdropFilter: o >= 0.6 ? "blur(10px)" : "blur(0px)",
493
+ transition: "all 0.3s ease",
494
+ position: "fixed !important",
495
+ left: 0,
496
+ top: 0,
497
+ right: 0,
498
+ bgcolor: "transparent",
499
+ "&.reverse-color": {
500
+ ".navmenu-root>.navmenu-sub>span,\n .navmenu-root>.navmenu-item,\n .header-addons>button,\n .header-addons>a,\n .header-addons>div>button": {
501
+ color: `${m} !important`
502
+ }
503
+ },
504
+ "& .navmenu--horizontal": {
505
+ bgcolor: "transparent !important"
506
+ },
507
+ ".header-logo > div": {
508
+ filter: "invert(var(--logo-invert))"
509
+ },
510
+ ".header-logo": {
511
+ color: m
512
+ }
513
+ }
514
+ }
515
+ );
516
+ }
517
+ const ue = ee(we)``;
518
+ export {
519
+ Lt as H,
520
+ ze as L,
521
+ H as P,
522
+ nt as T,
523
+ Je as a,
524
+ W as b,
525
+ _t as c,
526
+ $ as d
527
+ };
@@ -1,5 +1,5 @@
1
1
  import { jsx as t, jsxs as f, Fragment as le } from "react/jsx-runtime";
2
- import { u as ce, c as de } from "./state-BcZbsEn6.js";
2
+ import { u as ce, c as de } from "./state-bs1ORWYm.js";
3
3
  import { useLocaleContext as U } from "@arcblock/ux/lib/Locale/context";
4
4
  import Q from "@arcblock/ux/lib/Toast";
5
5
  import { generateParamCombinations as me } from "@blocklet/pages-kit/utils/route";
@@ -10,8 +10,8 @@ import { produce as Oe } from "immer";
10
10
  import ee from "lodash/difference";
11
11
  import { useState as T, useMemo as R, useCallback as j, forwardRef as Te, useImperativeHandle as je, useEffect as W, useRef as ve } from "react";
12
12
  import { useAsync as Re } from "react-use";
13
- import { L as Ee } from "./home-Bqe3w7ou.js";
14
- import { p as ze, g as Be } from "./array-DudMqbtU.js";
13
+ import { L as Ee } from "./home-DLCpie9E.js";
14
+ import { p as ze, g as Be } from "./array-MChdTfwz.js";
15
15
  function Le(s) {
16
16
  const [y, w] = T(!1);
17
17
  return /* @__PURE__ */ t(