@blocklet/pages-kit-inner-components 0.6.103 → 0.6.105

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 (34) hide show
  1. package/lib/cjs/add-component.js +1 -1
  2. package/lib/cjs/chunks/components-BmFOXvb0.js +57 -0
  3. package/lib/cjs/chunks/{draft-data-CkVvOh60.js → draft-data-e1KnFlxv.js} +1 -1
  4. package/lib/cjs/chunks/{home-DdN3Z-6B.js → home-DHmHyTMb.js} +10 -10
  5. package/lib/cjs/chunks/{index-B-Wh6PRT.js → index-Cu2Jg8OH.js} +24 -24
  6. package/lib/cjs/chunks/{publish-button-BtLFUEny.js → publish-button-Do7oJLSH.js} +1 -1
  7. package/lib/cjs/chunks/site-state-BQySNTiP.js +1 -0
  8. package/lib/cjs/chunks/state-DU3L5Lve.js +1 -0
  9. package/lib/cjs/components.js +1 -1
  10. package/lib/cjs/home.js +1 -1
  11. package/lib/cjs/project-html.js +1 -1
  12. package/lib/cjs/resources.js +1 -1
  13. package/lib/cjs/setting.js +3 -3
  14. package/lib/cjs/site-state.js +1 -1
  15. package/lib/es/add-component.js +2 -2
  16. package/lib/es/chunks/components-DLjI_Xlm.js +615 -0
  17. package/lib/es/chunks/{draft-data-BOoVhbon.js → draft-data-DRdPzuGm.js} +1 -1
  18. package/lib/es/chunks/{home-DVTVPkSm.js → home-DajDpGXA.js} +123 -123
  19. package/lib/es/chunks/{index-DENjTU8O.js → index-BpP1FqET.js} +239 -238
  20. package/lib/es/chunks/{publish-button-BVcMw8Fh.js → publish-button-8kEbdc0k.js} +3 -3
  21. package/lib/es/chunks/site-state-DS7eIMFg.js +1684 -0
  22. package/lib/es/chunks/{state-DNdwHwty.js → state-qDCrgEMQ.js} +114 -113
  23. package/lib/es/components.js +14 -13
  24. package/lib/es/home.js +3 -3
  25. package/lib/es/project-html.js +1 -1
  26. package/lib/es/resources.js +2 -2
  27. package/lib/es/setting.js +415 -413
  28. package/lib/es/site-state.js +2 -2
  29. package/package.json +7 -7
  30. package/lib/cjs/chunks/components-DsHjikTX.js +0 -57
  31. package/lib/cjs/chunks/site-state-DlLhHuIr.js +0 -1
  32. package/lib/cjs/chunks/state-BdtFHk36.js +0 -1
  33. package/lib/es/chunks/components-BIhMGXjB.js +0 -610
  34. package/lib/es/chunks/site-state-CN4Kulgk.js +0 -1671
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
- import { u as U, c as W, d as se, e as ie, f as le, b as ce } from "./state-DNdwHwty.js";
2
+ import { u as U, c as W, d as se, e as ie, f as le, b as ce } from "./state-qDCrgEMQ.js";
3
3
  import { useLocaleContext as V } from "@arcblock/ux/lib/Locale/context";
4
4
  import A from "@arcblock/ux/lib/Result";
5
5
  import { styled as M, useTheme as ue } from "@arcblock/ux/lib/Theme";
@@ -10,44 +10,44 @@ import { generateParamCombinations as me } from "@blocklet/pages-kit/utils/route
10
10
  import ge from "@blocklet/ui-react/lib/Header";
11
11
  import { cx as he } from "@emotion/css";
12
12
  import { Global as q, css as K } from "@emotion/react";
13
- import { Box as k, CircularProgress as fe, useTheme as Y, Button as be, Stack as ye, alpha as D } from "@mui/material";
14
- import { useReactive as J, useScroll as xe } from "ahooks";
15
- import ve from "isomorphic-dompurify";
13
+ import { Box as k, CircularProgress as fe, useTheme as Y, Button as be, Stack as ye, alpha as $ } from "@mui/material";
14
+ import { useReactive as Q, useDeepCompareEffect as xe, useScroll as ve } from "ahooks";
15
+ import Pe from "isomorphic-dompurify";
16
16
  import R from "lodash/cloneDeep";
17
- import Pe from "lodash/isEmpty";
18
- import Q from "lodash/isEqual";
19
- import { useRef as B, useEffect as C, lazy as X, useMemo as x, Suspense as ke, useState as we } from "react";
20
- import { Helmet as Se } from "react-helmet";
21
- import { useSearchParams as Z, Routes as Ce, Route as S, Navigate as Ie, ScrollRestoration as Te } from "react-router-dom";
17
+ import ke from "lodash/isEmpty";
18
+ import X from "lodash/isEqual";
19
+ import { useRef as B, useEffect as C, lazy as J, useMemo as x, Suspense as we, useState as Se } from "react";
20
+ import { Helmet as Ce } from "react-helmet";
21
+ import { useSearchParams as Z, Routes as Ie, Route as S, Navigate as Te, ScrollRestoration as Re } from "react-router-dom";
22
22
  import { useAsync as ee } from "react-use";
23
23
  import { joinURL as P } from "ufo";
24
- import { u as Re, S as je, i as z, P as Me, a as Oe, R as Ee, B as Le, b as te, g as Ae } from "./index-DENjTU8O.js";
25
- import Be from "@blocklet/ui-react/lib/Footer";
24
+ import { u as je, S as Me, i as z, P as Ee, a as Le, R as Oe, B as Ae, b as te, g as Be } from "./index-BpP1FqET.js";
25
+ import _e from "@blocklet/ui-react/lib/Footer";
26
26
  import "webfontloader";
27
- import { u as _e, a as Fe } from "./session-Dx5M-1r2.js";
27
+ import { u as De, a as Fe } from "./session-Dx5M-1r2.js";
28
28
  const $e = M(k)`
29
29
  display: contents;
30
30
  & > div > div > .MuiContainer-root {
31
31
  max-width: unset;
32
32
  }
33
33
  `;
34
- function De({ meta: t, ...o }) {
35
- const a = ue(), { getPageMetaStyle: n } = Re(), r = n();
34
+ function ze({ meta: t, ...o }) {
35
+ const a = ue(), { getPageMetaStyle: r } = je(), n = r();
36
36
  return /* @__PURE__ */ e(
37
37
  $e,
38
38
  {
39
39
  sx: {
40
40
  ".blocklet__footer .MuiContainer-root": {
41
- ...r.maxWidth && {
42
- maxWidth: r.maxWidth
41
+ ...n.maxWidth && {
42
+ maxWidth: n.maxWidth
43
43
  },
44
- ...r.px && {
45
- px: r.px
44
+ ...n.px && {
45
+ px: n.px
46
46
  }
47
47
  }
48
48
  },
49
49
  children: /* @__PURE__ */ e(
50
- Be,
50
+ _e,
51
51
  {
52
52
  ...o,
53
53
  meta: t,
@@ -60,8 +60,8 @@ function De({ meta: t, ...o }) {
60
60
  }
61
61
  );
62
62
  }
63
- let ze = null;
64
- function He(t) {
63
+ let He = null;
64
+ function Ne(t) {
65
65
  const o = B(null), { type: a } = t;
66
66
  return C(() => {
67
67
  a === "app" && o.current;
@@ -89,10 +89,10 @@ function He(t) {
89
89
  }
90
90
  );
91
91
  }
92
- function Ne(t) {
93
- return /* @__PURE__ */ e(Ue, { ...t });
92
+ function Ue(t) {
93
+ return /* @__PURE__ */ e(We, { ...t });
94
94
  }
95
- const Ue = M(k)`
95
+ const We = M(k)`
96
96
  position: fixed;
97
97
  left: 0;
98
98
  top: 0;
@@ -103,29 +103,29 @@ const Ue = M(k)`
103
103
  opacity: 0.7;
104
104
  transform: translateX(-23%) translateY(70%) rotate(-45deg);
105
105
  pointer-events: none;
106
- `, We = `Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
106
+ `, Ve = `Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
107
107
  sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'`;
108
- function Ve({
108
+ function Ge({
109
109
  titleFontFamily: t,
110
110
  descriptionFontFamily: o
111
111
  }) {
112
- const n = Y()?.typography?.fontFamily;
112
+ const r = Y()?.typography?.fontFamily;
113
113
  C(() => {
114
114
  }, [t, o]);
115
- const r = `${n}, ${We}`;
115
+ const n = `${r}, ${Ve}`;
116
116
  return /* @__PURE__ */ e(
117
117
  q,
118
118
  {
119
119
  styles: K`
120
120
  #app {
121
- font-family: ${r};
121
+ font-family: ${n};
122
122
 
123
123
  .page-kit-section__title {
124
- font-family: ${r};
124
+ font-family: ${n};
125
125
  }
126
126
 
127
127
  .page-kit-section__description {
128
- font-family: ${r};
128
+ font-family: ${n};
129
129
  }
130
130
  }
131
131
  `
@@ -135,36 +135,36 @@ function Ve({
135
135
  function H(t) {
136
136
  return t != null;
137
137
  }
138
- function Tt() {
139
- const [t] = Z(), { session: o } = _e(), a = Fe("owner", "admin", "pagesEditor", "member"), n = x(() => {
140
- const r = t.get("mode");
141
- return je.includes(r) ? r : "production";
138
+ function Rt() {
139
+ const [t] = Z(), { session: o } = De(), a = Fe("owner", "admin", "pagesEditor", "member"), r = x(() => {
140
+ const n = t.get("mode");
141
+ return Me.includes(n) ? n : "production";
142
142
  }, [t]);
143
- return n === "draft" && (!a || !o.user) ? /* @__PURE__ */ e(A, { status: "403" }) : /* @__PURE__ */ e(Ge, { mode: n });
143
+ return r === "draft" && (!a || !o.user) ? /* @__PURE__ */ e(A, { status: "403" }) : /* @__PURE__ */ e(qe, { mode: r });
144
144
  }
145
- function Ge({ mode: t }) {
145
+ function qe({ mode: t }) {
146
146
  if (t !== "draft") {
147
147
  const o = window.__PAGE_STATE__;
148
- return o ? /* @__PURE__ */ e(L, { mode: t, state: o }) : /* @__PURE__ */ e(Ye, { mode: t, children: ({ state: a }) => /* @__PURE__ */ e(L, { mode: t, state: a }) });
148
+ return o ? /* @__PURE__ */ e(O, { mode: t, state: o }) : /* @__PURE__ */ e(Qe, { mode: t, children: ({ state: a }) => /* @__PURE__ */ e(O, { mode: t, state: a }) });
149
149
  }
150
- return /* @__PURE__ */ e(Ke, { children: ({ state: o }) => /* @__PURE__ */ e(L, { mode: t, state: o }) });
150
+ return /* @__PURE__ */ e(Ye, { children: ({ state: o }) => /* @__PURE__ */ e(O, { mode: t, state: o }) });
151
151
  }
152
- const qe = X(() => import("./publish-button-BVcMw8Fh.js")), Ke = X(() => import("./draft-data-BOoVhbon.js"));
153
- function Ye({
152
+ const Ke = J(() => import("./publish-button-8kEbdc0k.js")), Ye = J(() => import("./draft-data-DRdPzuGm.js"));
153
+ function Qe({
154
154
  mode: t,
155
155
  children: o
156
156
  }) {
157
- const n = document.querySelector('meta[property="pages:version"]')?.content, r = U(), i = x(() => {
158
- if (n === "{{pagesPublishedAt}}") {
159
- const u = localStorage.getItem(ce(r ?? ""));
157
+ const r = document.querySelector('meta[property="pages:version"]')?.content, n = U(), i = x(() => {
158
+ if (r === "{{pagesPublishedAt}}") {
159
+ const u = localStorage.getItem(ce(n ?? ""));
160
160
  return Number(u) ? Number(u) : (/* @__PURE__ */ new Date()).getTime();
161
161
  }
162
- return Number(n);
163
- }, [n]), { loading: p, value: c } = ee(() => Ae({ mode: t, version: i }), [t, i]);
164
- return p ? /* @__PURE__ */ e(He, {}) : c ? o({ state: c }) : null;
162
+ return Number(r);
163
+ }, [r]), { loading: p, value: c } = ee(() => Be({ mode: t, version: i }), [t, i]);
164
+ return p ? /* @__PURE__ */ e(Ne, {}) : c ? o({ state: c }) : null;
165
165
  }
166
- function L({ mode: t, state: o }) {
167
- const { t: a, locale: n } = V(), [r] = Z(), i = U(), p = se(), c = r.get("hiddenBadge") === "true", u = r.get("showPublish") === "true", {
166
+ function O({ mode: t, state: o }) {
167
+ const { t: a, locale: r } = V(), [n] = Z(), i = U(), p = se(), c = n.get("hiddenBadge") === "true", u = n.get("showPublish") === "true", {
168
168
  pageIds: d,
169
169
  pages: l,
170
170
  routeIds: f,
@@ -173,8 +173,8 @@ function L({ mode: t, state: o }) {
173
173
  config: { defaultLocale: y },
174
174
  resources: w
175
175
  } = o, b = W(o), v = x(
176
- () => g?.some((h) => h.locale === n) ? n : void 0,
177
- [n, g]
176
+ () => g?.some((h) => h.locale === r) ? r : void 0,
177
+ [r, g]
178
178
  ), _ = Object.values(m || {}).find((h) => h?.path === "/") || Object.values(l).find((h) => h?.slug === "/") ? void 0 : Object.values(l)[0], ae = x(() => t === "production" ? d?.map((h) => {
179
179
  const s = l[h];
180
180
  return s && {
@@ -190,18 +190,18 @@ function L({ mode: t, state: o }) {
190
190
  path: P("/", p || i || "", s.path, `?mode=${t}&showPublish=true`)
191
191
  } : null;
192
192
  }).filter(H), [d, l, t, m, f, i, p]), I = ([...h]) => (t !== "production" && u && h.unshift(
193
- /* @__PURE__ */ e(ke, { fallback: /* @__PURE__ */ e("div", {}), children: /* @__PURE__ */ e(qe, { ref: { current: null }, mode: "production", state: o }) })
193
+ /* @__PURE__ */ e(we, { fallback: /* @__PURE__ */ e("div", {}), children: /* @__PURE__ */ e(Ke, { ref: { current: null }, mode: "production", state: o }) })
194
194
  ), h);
195
- return /* @__PURE__ */ T(Me, { value: { pages: ae }, children: [
196
- /* @__PURE__ */ T(Ce, { children: [
197
- _ && /* @__PURE__ */ e(S, { index: !0, element: /* @__PURE__ */ e(Ie, { to: P("/", v || "", _.slug) }) }),
195
+ return /* @__PURE__ */ T(Ee, { value: { pages: ae }, children: [
196
+ /* @__PURE__ */ T(Ie, { children: [
197
+ _ && /* @__PURE__ */ e(S, { index: !0, element: /* @__PURE__ */ e(Te, { to: P("/", v || "", _.slug) }) }),
198
198
  f?.map((h) => {
199
199
  const s = m?.[h];
200
200
  if (!s || !s.displayTemplateId) return null;
201
- const O = l[s.displayTemplateId];
202
- if (!O) return null;
203
- let E = [];
204
- return s.params && s.params.length > 0 && (E = me({
201
+ const E = l[s.displayTemplateId];
202
+ if (!E) return null;
203
+ let L = [];
204
+ return s.params && s.params.length > 0 && (L = me({
205
205
  basePath: s.path,
206
206
  params: s.params,
207
207
  routeId: s.id,
@@ -210,29 +210,29 @@ function L({ mode: t, state: o }) {
210
210
  currentParams: [],
211
211
  currentOptionIds: [],
212
212
  result: []
213
- })?.map((F) => {
214
- const $ = F.paramOptionIds.join("-");
213
+ })?.map((D) => {
214
+ const F = D.paramOptionIds.join("-");
215
215
  return /* @__PURE__ */ e(
216
216
  S,
217
217
  {
218
- path: P(":projectIdOrSlug?", F.path),
218
+ path: P(":projectIdOrSlug?", D.path),
219
219
  element: /* @__PURE__ */ e(
220
220
  N,
221
221
  {
222
222
  mode: t,
223
223
  components: b,
224
- page: O,
224
+ page: E,
225
225
  locale: v,
226
226
  defaultLocale: y,
227
227
  headerAddons: I,
228
228
  state: o,
229
- pageData: s.dataSource?.pathDataMappings?.[$]?.dataCache?.[v || y || "en"]
229
+ pageData: s.dataSource?.pathDataMappings?.[F]?.dataCache?.[v || y || "en"]
230
230
  }
231
231
  )
232
232
  },
233
- $
233
+ F
234
234
  );
235
- })), E.push(
235
+ })), L.push(
236
236
  /* @__PURE__ */ e(
237
237
  S,
238
238
  {
@@ -242,7 +242,7 @@ function L({ mode: t, state: o }) {
242
242
  {
243
243
  mode: t,
244
244
  components: b,
245
- page: O,
245
+ page: E,
246
246
  locale: v,
247
247
  defaultLocale: y,
248
248
  headerAddons: I,
@@ -253,7 +253,7 @@ function L({ mode: t, state: o }) {
253
253
  },
254
254
  s.id
255
255
  )
256
- ), E;
256
+ ), L;
257
257
  }),
258
258
  d?.map((h) => {
259
259
  const s = l[h];
@@ -325,49 +325,49 @@ function L({ mode: t, state: o }) {
325
325
  }
326
326
  )
327
327
  ] }),
328
- t !== "production" && !c && /* @__PURE__ */ e(Ne, { sx: { bgcolor: "info.light" }, children: t }),
329
- /* @__PURE__ */ e(Ve, {})
328
+ t !== "production" && !c && /* @__PURE__ */ e(Ue, { sx: { bgcolor: "info.light" }, children: t }),
329
+ /* @__PURE__ */ e(Ge, {})
330
330
  ] });
331
331
  }
332
332
  function N({
333
333
  mode: t,
334
334
  pageData: o,
335
335
  components: a,
336
- page: n,
337
- locale: r,
336
+ page: r,
337
+ locale: n,
338
338
  defaultLocale: i,
339
339
  headerAddons: p,
340
340
  state: c
341
341
  }) {
342
- const u = J({
342
+ const u = Q({
343
343
  page: null
344
344
  });
345
- C(() => {
346
- const l = n || null;
345
+ xe(() => {
346
+ const l = r || null;
347
347
  l ? u.page = R(l) : u.page = null;
348
- }, [n, JSON.stringify(n), u]);
348
+ }, [r, u]);
349
349
  const d = B(void 0);
350
350
  return C(() => {
351
- Q(o, d.current) || o && u.page && (G(u.page, c, r, o), d.current = R(o));
352
- }, [u.page, o, r, c]), u.page ? /* @__PURE__ */ e(
351
+ X(o, d.current) || o && u.page && (G(u.page, c, n, o), d.current = R(o));
352
+ }, [u.page, o, n, c]), u.page ? /* @__PURE__ */ e(
353
353
  j,
354
354
  {
355
355
  mode: t,
356
356
  components: a,
357
357
  page: u.page,
358
- locale: r,
358
+ locale: n,
359
359
  defaultLocale: i,
360
360
  headerAddons: p
361
361
  }
362
362
  ) : null;
363
363
  }
364
- function Rt({
364
+ function jt({
365
365
  mode: t,
366
366
  state: o,
367
367
  path: a,
368
- pageData: n
368
+ pageData: r
369
369
  }) {
370
- const { t: r, locale: i } = V(), {
370
+ const { t: n, locale: i } = V(), {
371
371
  pages: p,
372
372
  supportedLocales: c,
373
373
  config: { defaultLocale: u },
@@ -375,7 +375,7 @@ function Rt({
375
375
  } = o, l = Object.values(p).find((b) => b?.slug === a), f = Object.values(d?.pages || {}).find((b) => b.page.slug === a), m = x(
376
376
  () => c?.some((b) => b.locale === i) ? i : void 0,
377
377
  [i, c]
378
- ), g = J({
378
+ ), g = Q({
379
379
  page: null
380
380
  });
381
381
  C(() => {
@@ -384,7 +384,7 @@ function Rt({
384
384
  }, [l, f]);
385
385
  const y = B(void 0);
386
386
  if (C(() => {
387
- Q(n, y.current) || n && g.page && (G(g.page, o, m, n), y.current = R(n));
387
+ X(r, y.current) || r && g.page && (G(g.page, o, m, r), y.current = R(r));
388
388
  }, [{}]), !l && !f?.page)
389
389
  return /* @__PURE__ */ e(
390
390
  k,
@@ -396,7 +396,7 @@ function Rt({
396
396
  justifyContent: "center",
397
397
  alignItems: "center"
398
398
  },
399
- children: /* @__PURE__ */ e(A, { style: { background: "inherit" }, status: 404, extra: /* @__PURE__ */ e(re, { href: "/", children: r("common.back") }) })
399
+ children: /* @__PURE__ */ e(A, { style: { background: "inherit" }, status: 404, extra: /* @__PURE__ */ e(re, { href: "/", children: n("common.back") }) })
400
400
  }
401
401
  );
402
402
  const w = W(o);
@@ -415,12 +415,12 @@ function j({
415
415
  mode: t,
416
416
  components: o,
417
417
  page: a,
418
- locale: n,
419
- defaultLocale: r,
418
+ locale: r,
419
+ defaultLocale: n,
420
420
  headerAddons: i
421
421
  }) {
422
- const p = de(), c = a.locales?.[n] ?? a.locales?.[r] ?? {}, u = c.title || window.blocklet?.appName, d = c.description || window.blocklet?.appDescription, l = ie(le(c.image), 540);
423
- return /* @__PURE__ */ T(Oe, { page: a, defaultLocale: r, currentLocale: n, children: [
422
+ const p = de(), c = a.locales?.[r] ?? a.locales?.[n] ?? {}, u = c.title || window.blocklet?.appName, d = c.description || window.blocklet?.appDescription, l = ie(le(c.image), 540);
423
+ return /* @__PURE__ */ T(Le, { page: a, defaultLocale: n, currentLocale: r, children: [
424
424
  /* @__PURE__ */ e(
425
425
  q,
426
426
  {
@@ -433,9 +433,9 @@ function j({
433
433
  `
434
434
  }
435
435
  ),
436
- /* @__PURE__ */ e(Je, { meta: c, headerAddons: i }),
437
- /* @__PURE__ */ e(Te, {}),
438
- /* @__PURE__ */ T(Se, { children: [
436
+ /* @__PURE__ */ e(Xe, { meta: c, headerAddons: i }),
437
+ /* @__PURE__ */ e(Re, {}),
438
+ /* @__PURE__ */ T(Ce, { children: [
439
439
  /* @__PURE__ */ e("title", { children: u }),
440
440
  /* @__PURE__ */ e("meta", { name: "og:title", content: u }),
441
441
  /* @__PURE__ */ e("meta", { name: "og:description", content: d }),
@@ -459,27 +459,27 @@ function j({
459
459
  zIndex: 0
460
460
  // 确保页面内容在其他元素之上
461
461
  },
462
- children: /* @__PURE__ */ e(Ee, { children: a?.sectionIds?.map((f, m) => {
462
+ children: /* @__PURE__ */ e(Oe, { children: a?.sectionIds?.map((f, m) => {
463
463
  const g = a.sections[f];
464
464
  if (!g || g.visibility === "hidden") return null;
465
- const y = a.dataSource?.[f]?.[n], w = a.dataSource?.[f]?.[r] ?? {};
465
+ const y = a.dataSource?.[f]?.[r], w = a.dataSource?.[f]?.[n] ?? {};
466
466
  return /* @__PURE__ */ e(k, { sx: { position: "relative" }, children: /* @__PURE__ */ e(
467
- Le,
467
+ Ae,
468
468
  {
469
469
  id: f,
470
470
  type: g.component,
471
471
  mode: t,
472
472
  section: g,
473
473
  config: {
474
- ...Pe(y) ? w : y,
475
- locale: n,
474
+ ...ke(y) ? w : y,
475
+ locale: r,
476
476
  dev: t === "draft" ? {
477
477
  mode: t,
478
478
  components: o,
479
- defaultLocale: r
479
+ defaultLocale: n
480
480
  } : {
481
481
  mode: t,
482
- defaultLocale: r
482
+ defaultLocale: n
483
483
  // 用于 fallback 的 locale
484
484
  }
485
485
  },
@@ -491,7 +491,7 @@ function j({
491
491
  }) })
492
492
  }
493
493
  ),
494
- !c.footer?.hidden && /* @__PURE__ */ e(De, {})
494
+ !c.footer?.hidden && /* @__PURE__ */ e(ze, {})
495
495
  ] });
496
496
  }
497
497
  const oe = M(ge)`
@@ -500,15 +500,15 @@ const oe = M(ge)`
500
500
  top: 0;
501
501
  }
502
502
  `;
503
- function Je({ meta: t, headerAddons: o }) {
504
- const { logo: a, brand: n, description: r, ...i } = pe(), p = te(), c = x(
503
+ function Xe({ meta: t, headerAddons: o }) {
504
+ const { logo: a, brand: r, description: n, ...i } = pe(), p = te(), c = x(
505
505
  () => (d) => {
506
506
  let l = o?.(d) ?? d;
507
507
  return l = i.addons?.(l) ?? l, l;
508
508
  },
509
509
  [i.addons, o]
510
510
  ), u = x(
511
- () => t.header?.translucent ? Qe : oe,
511
+ () => t.header?.translucent ? Je : oe,
512
512
  [t.header?.translucent]
513
513
  );
514
514
  return /* @__PURE__ */ e(
@@ -517,8 +517,8 @@ function Je({ meta: t, headerAddons: o }) {
517
517
  hideNavMenu: !!t.header?.hideNavMenus,
518
518
  translucentTextColor: t.header?.translucentTextColor,
519
519
  ...a ? { logo: /* @__PURE__ */ e(ne, { logo: a }) } : {},
520
- ...n ? { brand: n } : {},
521
- ...r ? { description: r } : {},
520
+ ...r ? { brand: r } : {},
521
+ ...n ? { description: n } : {},
522
522
  className: he(t.header?.sticky && "sticky", "page-header"),
523
523
  maxWidth: !1,
524
524
  addons: c,
@@ -544,9 +544,9 @@ function Je({ meta: t, headerAddons: o }) {
544
544
  );
545
545
  }
546
546
  function ne({ logo: t }) {
547
- const [o, a] = we(), n = te(), { value: r } = ee(() => {
547
+ const [o, a] = Se(), r = te(), { value: n } = ee(() => {
548
548
  const i = new URL(
549
- n ? window?.blocklet?.appLogo || "/.well-known/service/blocklet/logo" : window?.blocklet?.appLogoRect || "/.well-known/service/blocklet/logo-rect",
549
+ r ? window?.blocklet?.appLogo || "/.well-known/service/blocklet/logo" : window?.blocklet?.appLogoRect || "/.well-known/service/blocklet/logo-rect",
550
550
  window.location.origin
551
551
  );
552
552
  i.searchParams.delete("imageFilter"), i.searchParams.delete("f");
@@ -558,29 +558,29 @@ function ne({ logo: t }) {
558
558
  }), c(u.url);
559
559
  });
560
560
  });
561
- }, [n]);
562
- if (n)
561
+ }, [r]);
562
+ if (r)
563
563
  return null;
564
564
  if (t)
565
565
  return t;
566
566
  if (o)
567
- return /* @__PURE__ */ e(k, { sx: { filter: "initial !important" }, dangerouslySetInnerHTML: { __html: ve.sanitize(o) } });
568
- if (r) {
569
- const i = new URL(r);
567
+ return /* @__PURE__ */ e(k, { sx: { filter: "initial !important" }, dangerouslySetInnerHTML: { __html: Pe.sanitize(o) } });
568
+ if (n) {
569
+ const i = new URL(n);
570
570
  i.searchParams.set("imageFilter", "convert"), i.searchParams.set("f", "png"), i.searchParams.set("h", "80");
571
571
  const p = i.toString();
572
572
  return /* @__PURE__ */ e("img", { src: p, alt: "logo" });
573
573
  }
574
574
  return null;
575
575
  }
576
- function Qe({
576
+ function Je({
577
577
  logo: t,
578
578
  translucentTextColor: o,
579
579
  ...a
580
580
  }) {
581
- const r = xe(document.getElementById("app"), (m) => m.top < 1200), i = Y(), p = i.palette.mode === "dark", c = Math.min(r?.top ?? 0, 800), u = x(() => {
581
+ const n = ve(document.getElementById("app"), (m) => m.top < 1200), i = Y(), p = i.palette.mode === "dark", c = Math.min(n?.top ?? 0, 800), u = x(() => {
582
582
  let m = Math.min(c / 800, 1), g = "";
583
- return m > 0.1 ? (m = Math.max(m, 0.6), g = D(i.palette.text.primary, m)) : g = o || "#EEEEEE", {
583
+ return m > 0.1 ? (m = Math.max(m, 0.6), g = $(i.palette.text.primary, m)) : g = o || "#EEEEEE", {
584
584
  backgroundOpacity: m,
585
585
  textColor: g,
586
586
  isReversed: m < 0.7
@@ -612,7 +612,7 @@ function Qe({
612
612
  zIndex: -1,
613
613
  // 置于内容下方
614
614
  // 背景样式(颜色和模糊)是固定的
615
- backgroundColor: D(i.palette.background.default, d),
615
+ backgroundColor: $(i.palette.background.default, d),
616
616
  backdropFilter: d >= 0.6 ? "blur(10px)" : "blur(0px)",
617
617
  // **性能关键**: 只对 opacity 进行动画
618
618
  // opacity: backgroundOpacity,
@@ -651,13 +651,13 @@ function Qe({
651
651
  }
652
652
  const re = M(be)``;
653
653
  export {
654
- Tt as H,
655
- He as L,
656
- L as P,
657
- Qe as T,
658
- Ge as a,
654
+ Rt as H,
655
+ Ne as L,
656
+ O as P,
657
+ Je as T,
658
+ qe as a,
659
659
  N as b,
660
- Rt as c,
660
+ jt as c,
661
661
  j as d,
662
- Je as e
662
+ Xe as e
663
663
  };