@blocklet/pages-kit-inner-components 0.6.35 → 0.6.37

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as i, jsxs as b, Fragment as J } from "react/jsx-runtime";
2
2
  import { ErrorOutline as be } from "@mui/icons-material";
3
- import { Box as p, styled as ye, Typography as W, Container as ve, useTheme as Tt, useMediaQuery as Yt, GlobalStyles as ke, Card as we, CircularProgress as Ce, Grid as Pt, CardMedia as Be, CardContent as Ee, Alert as Ie } from "@mui/material";
3
+ import { Box as p, styled as ye, Typography as M, Container as ve, useTheme as Tt, useMediaQuery as Yt, GlobalStyles as ke, Card as we, CircularProgress as Ce, Grid as Pt, CardMedia as Be, CardContent as Ee, Alert as Ie } from "@mui/material";
4
4
  import Se from "lodash/isEmpty";
5
5
  import et from "lodash/pick";
6
6
  import De, { createContext as ht, useMemo as E, useCallback as H, useContext as ft, useState as ot, useEffect as X, Fragment as Qe, isValidElement as Jt, useRef as xt } from "react";
@@ -8,17 +8,17 @@ import S from "lodash/keyBy";
8
8
  import { styled as I, useTheme as Xt } from "@arcblock/ux/lib/Theme";
9
9
  import { cx as v, css as ut } from "@emotion/css";
10
10
  import R from "lodash/omit";
11
- import { Link as Re, NavLink as Ne, useNavigate as Le } from "react-router-dom";
11
+ import { Link as Re, NavLink as Le, useNavigate as Ne } from "react-router-dom";
12
12
  import je from "@arcblock/ux/lib/Button";
13
13
  import gt from "is-uri";
14
14
  import { Icon as Kt } from "@iconify-icon/react";
15
- import { e as U, f as N, i as bt, l as yt } from "./state-DRjnlQY_.js";
15
+ import { e as U, f as L, i as bt, l as yt } from "./state-DRjnlQY_.js";
16
16
  import Pe from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
17
17
  import { useColorConvert as Zt } from "@blocklet/pages-kit/contexts/color";
18
18
  import { materialDark as ze } from "react-syntax-highlighter/dist/esm/styles/prism";
19
- import Me from "@arcblock/react-hooks/lib/useBrowser";
19
+ import We from "@arcblock/react-hooks/lib/useBrowser";
20
20
  import zt from "@arcblock/ux/lib/Colors";
21
- import { ResponsiveImage as qt, CustomComponentRenderer as We } from "@blocklet/pages-kit/components";
21
+ import { ResponsiveImage as qt, CustomComponentRenderer as Me } from "@blocklet/pages-kit/components";
22
22
  import { isGradient as Ue, isColorString as Fe } from "@blocklet/pages-kit/utils/style";
23
23
  import _t from "@mui/material/useMediaQuery";
24
24
  import { join as $ } from "pathe";
@@ -310,7 +310,7 @@ const K = "{{CUSTOM_VALUE}}", qe = [
310
310
  // { value: 'google-pixel', title: 'Google Pixel', group: 'deviceFrame' },
311
311
  // { value: 'google-pixel-2-xl', title: 'Google Pixel 2 XL', group: 'deviceFrame' },
312
312
  // { value: 'apple-watch', title: 'Apple Watch', group: 'deviceFrame' },
313
- ], lo = (t) => te.some((e) => e.value === t), co = (t) => ee.some((e) => e.value === t), ee = [
313
+ ], lo = (t) => te.some((e) => e.value === t), Ao = (t) => ee.some((e) => e.value === t), ee = [
314
314
  {
315
315
  value: "chrome",
316
316
  title: "Chrome Browser",
@@ -323,7 +323,7 @@ const K = "{{CUSTOM_VALUE}}", qe = [
323
323
  group: "browserFrame",
324
324
  sx: {}
325
325
  }
326
- ], Ao = [
326
+ ], co = [
327
327
  {
328
328
  value: "shadow-sm",
329
329
  title: "Shadow Low Elevation",
@@ -363,7 +363,7 @@ const K = "{{CUSTOM_VALUE}}", qe = [
363
363
  },
364
364
  ...so,
365
365
  ...ee,
366
- ...Ao,
366
+ ...co,
367
367
  ...te
368
368
  ], go = [
369
369
  {
@@ -465,13 +465,13 @@ function Q(t) {
465
465
  const { type: e, value: o, format: n = "sx", defaultValue: r = null } = t, a = So.get(e);
466
466
  if (!a || typeof o != "string" || !o)
467
467
  return r;
468
- const c = o.startsWith("custom:"), s = c ? "custom" : o;
468
+ const A = o.startsWith("custom:"), s = A ? "custom" : o;
469
469
  if (a?.[s] && a?.[s]?.[n]) {
470
470
  const l = a[s][n];
471
- if (c) {
472
- const A = o.replace("custom:", "");
471
+ if (A) {
472
+ const c = o.replace("custom:", "");
473
473
  try {
474
- return JSON.parse(JSON.stringify(l || {}).replaceAll(K, A));
474
+ return JSON.parse(JSON.stringify(l || {}).replaceAll(K, c));
475
475
  } catch {
476
476
  }
477
477
  }
@@ -497,13 +497,13 @@ function Oi({
497
497
  if (!r) return {};
498
498
  const l = n || o;
499
499
  return r.locales?.[l] ?? {};
500
- }, [r, o, n]), c = H(
500
+ }, [r, o, n]), A = H(
501
501
  (l = "sx") => {
502
- const A = a();
503
- return !A || !A.style ? {} : Object.entries(A.style || {}).reduce((u, [m, g]) => {
502
+ const c = a();
503
+ return !c || !c.style ? {} : Object.entries(c.style || {}).reduce((u, [m, g]) => {
504
504
  if (!g) return u;
505
505
  const x = `${m}Custom`;
506
- A.style[x];
506
+ c.style[x];
507
507
  const f = Q({
508
508
  type: m,
509
509
  value: g,
@@ -517,9 +517,9 @@ function Oi({
517
517
  () => ({
518
518
  page: r,
519
519
  getPageMeta: a,
520
- getPageMetaStyle: c
520
+ getPageMetaStyle: A
521
521
  }),
522
- [r, a, c]
522
+ [r, a, A]
523
523
  );
524
524
  return /* @__PURE__ */ i(oe.Provider, { value: s, children: e });
525
525
  }
@@ -541,10 +541,10 @@ function re() {
541
541
  function Ro({ icon: t, ...e }) {
542
542
  return /* @__PURE__ */ i(Kt, { icon: t, ...e, ref: null });
543
543
  }
544
- function No({ icon: t, className: e = "", size: o = "1rem", ...n }) {
545
- return /* @__PURE__ */ i(Lo, { component: Ro, className: v("css-icon", e), size: o, ...n, icon: t });
544
+ function Lo({ icon: t, className: e = "", size: o = "1rem", ...n }) {
545
+ return /* @__PURE__ */ i(No, { component: Ro, className: v("css-icon", e), size: o, ...n, icon: t });
546
546
  }
547
- const Lo = I(p)`
547
+ const No = I(p)`
548
548
  &.css-icon {
549
549
  display: inline-block;
550
550
  width: ${({ size: t }) => t};
@@ -552,8 +552,8 @@ const Lo = I(p)`
552
552
  }
553
553
  `;
554
554
  function jo({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...r }) {
555
- const a = U(N(t), 540), [c, s] = ot(!1), l = Xt();
556
- return c ? /* @__PURE__ */ i(No, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...r }) : /* @__PURE__ */ i(Po, { className: v("image-icon", e), size: o, ...r, children: /* @__PURE__ */ i(
555
+ const a = U(L(t), 540), [A, s] = ot(!1), l = Xt();
556
+ return A ? /* @__PURE__ */ i(Lo, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...r }) : /* @__PURE__ */ i(Po, { className: v("image-icon", e), size: o, ...r, children: /* @__PURE__ */ i(
557
557
  "img",
558
558
  {
559
559
  className: "image-icon__image",
@@ -583,9 +583,9 @@ function mt({ icon: t, size: e = "1rem", imageMeta: o, ...n }) {
583
583
  const zo = I(p)`
584
584
  flex-shrink: 0;
585
585
  `;
586
- function Y({ text: t, children: e, icon: o = "", endIcon: n, color: r = "primary", link: a = "", href: c = "", ...s }) {
587
- const l = o ? /* @__PURE__ */ i(mt, { icon: o }) : null, A = n ? /* @__PURE__ */ i(mt, { icon: n }) : null, d = a || c, u = { ...s };
588
- return d && (u.href = d, gt(d) && (u.target = u.target || "_blank")), /* @__PURE__ */ i(je, { startIcon: l, endIcon: A, color: r, ...u, children: t || e });
586
+ function Y({ text: t, children: e, icon: o = "", endIcon: n, color: r = "primary", link: a = "", href: A = "", ...s }) {
587
+ const l = o ? /* @__PURE__ */ i(mt, { icon: o }) : null, c = n ? /* @__PURE__ */ i(mt, { icon: n }) : null, d = a || A, u = { ...s };
588
+ return d && (u.href = d, gt(d) && (u.target = u.target || "_blank")), /* @__PURE__ */ i(je, { startIcon: l, endIcon: c, color: r, ...u, children: t || e });
589
589
  }
590
590
  function ae({ editing: t, text: e, ...o }) {
591
591
  const { pages: n = [] } = re(), r = n.find((a) => a.id === (o.link || o.linkId));
@@ -614,7 +614,7 @@ function V({ actions: t, center: e, className: o, align: n }) {
614
614
  }
615
615
  ) : null;
616
616
  }
617
- const Mo = "section", Wo = ye(p)`
617
+ const Wo = "section", Mo = ye(p)`
618
618
  overflow: hidden;
619
619
 
620
620
  .section__title {
@@ -665,7 +665,7 @@ const Mo = "section", Wo = ye(p)`
665
665
  margin-bottom: 0.5rem;
666
666
  }
667
667
  }
668
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[Mo]}px) {
668
+ @media (min-width: ${({ theme: t }) => t.breakpoints.values[Wo]}px) {
669
669
  .section__tag {
670
670
  margin-bottom: 32px;
671
671
  }
@@ -684,10 +684,10 @@ function it({
684
684
  actions: n,
685
685
  className: r = "",
686
686
  classes: a = {},
687
- prepend: c,
687
+ prepend: A,
688
688
  append: s,
689
689
  level: l = 2,
690
- tag: A,
690
+ tag: c,
691
691
  badge: d,
692
692
  center: u,
693
693
  logo: m,
@@ -696,7 +696,7 @@ function it({
696
696
  ...f
697
697
  }) {
698
698
  const y = Zt();
699
- if (!t && !e && !n && !d && !A && !c && !s && !m) return null;
699
+ if (!t && !e && !n && !d && !c && !A && !s && !m) return null;
700
700
  const k = Math.max(Math.min(5, l + 1), 1), w = {
701
701
  1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
702
702
  2: "xl:!text-2xl lg:!text-xl md:!text-lg",
@@ -705,12 +705,12 @@ function it({
705
705
  5: "xl:!text-lg md:!text-md sm:!text-sm",
706
706
  6: "!text-sm"
707
707
  }, B = l === 0 ? "big" : `h${k}`, D = l === 0;
708
- return /* @__PURE__ */ b(Wo, { className: v("base-info", "lg:text-left", u && "!text-center", r), ...f, children: [
709
- c && /* @__PURE__ */ i("div", { children: c }),
710
- (A || d) && /* @__PURE__ */ i("div", { className: v("section__tag", a?.tag || a?.badge), children: A || d }),
708
+ return /* @__PURE__ */ b(Mo, { className: v("base-info", "lg:text-left", u && "!text-center", r), ...f, children: [
709
+ A && /* @__PURE__ */ i("div", { children: A }),
710
+ (c || d) && /* @__PURE__ */ i("div", { className: v("section__tag", a?.tag || a?.badge), children: c || d }),
711
711
  m && /* @__PURE__ */ i("img", { className: "w-[120px] m-auto mb-8", src: m, alt: "info", loading: "lazy" }),
712
712
  t && /* @__PURE__ */ i(
713
- W,
713
+ M,
714
714
  {
715
715
  sx: {
716
716
  whiteSpace: "pre-wrap",
@@ -747,7 +747,7 @@ function it({
747
747
  children: /* @__PURE__ */ i(Pe, { codeOptions: { showActionButton: !1, theme: ze }, children: e })
748
748
  }
749
749
  ) : /* @__PURE__ */ i(
750
- W,
750
+ M,
751
751
  {
752
752
  sx: {
753
753
  whiteSpace: "pre-wrap",
@@ -803,7 +803,7 @@ function Ho(t) {
803
803
  }
804
804
  function Vo(t) {
805
805
  let e = {};
806
- return typeof t == "string" ? Ue(t) ? e.image = t : (e.image = N(t), Fe(t) && (e.color = t, e.image = "")) : e = t, e;
806
+ return typeof t == "string" ? Ue(t) ? e.image = t : (e.image = L(t), Fe(t) && (e.color = t, e.image = "")) : e = t, e;
807
807
  }
808
808
  function Go() {
809
809
  const [t, e] = ot(Date.now());
@@ -816,12 +816,12 @@ function Go() {
816
816
  };
817
817
  }, []), t;
818
818
  }
819
- function Mt(t, e, o, n, r) {
819
+ function Wt(t, e, o, n, r) {
820
820
  let a = null;
821
- const { color: c = "", image: s } = Vo(e);
821
+ const { color: A = "", image: s } = Vo(e);
822
822
  if (s && Fo(s)) {
823
823
  delete o.backgroundColor;
824
- const l = !(t.mobile.apple.device || Uo()) && T(s), A = T(s) && n ? U(N(n), 1200, "quality") : "";
824
+ const l = !(t.mobile.apple.device || Uo()) && T(s), c = T(s) && n ? U(L(n), 1200, "quality") : "";
825
825
  l ? a = /* @__PURE__ */ i(
826
826
  p,
827
827
  {
@@ -832,7 +832,7 @@ function Mt(t, e, o, n, r) {
832
832
  muted: !0,
833
833
  controls: !1,
834
834
  playsInline: !0,
835
- poster: A,
835
+ poster: c,
836
836
  src: T(s) ? s : U(s, 1200, "quality"),
837
837
  sx: {
838
838
  width: "100%",
@@ -849,7 +849,7 @@ function Mt(t, e, o, n, r) {
849
849
  ) : a = /* @__PURE__ */ i(
850
850
  qt,
851
851
  {
852
- src: T(s) && n ? A : s,
852
+ src: T(s) && n ? c : s,
853
853
  sizesAttr: {
854
854
  sm: 600,
855
855
  md: 900,
@@ -872,7 +872,7 @@ function Mt(t, e, o, n, r) {
872
872
  },
873
873
  r || s
874
874
  );
875
- } else s ? o.backgroundImage = `${s} !important` : c && (o.backgroundColor = `${c} !important`);
875
+ } else s ? o.backgroundImage = `${s} !important` : A && (o.backgroundColor = `${A} !important`);
876
876
  return a;
877
877
  }
878
878
  function Oo({ autoWidth: t, children: e, ...o }) {
@@ -897,12 +897,12 @@ function at({
897
897
  sx: n = {},
898
898
  boxed: r = { show: !1 },
899
899
  padding: a = "normal",
900
- boxProps: c,
900
+ boxProps: A,
901
901
  type: s,
902
902
  ...l
903
903
  }) {
904
- const A = { ...n }, d = _t((g) => g.breakpoints.down("md"));
905
- t && (A.color = zt.common.white, A.backgroundColor = `${zt.grey[900]} !important`), r.show && (A.display = "flex");
904
+ const c = { ...n }, d = _t((g) => g.breakpoints.down("md"));
905
+ t && (c.color = zt.common.white, c.backgroundColor = `${zt.grey[900]} !important`), r.show && (c.display = "flex");
906
906
  const u = E(() => !Number(l.boxMaxWidth) || d ? {
907
907
  width: "100%"
908
908
  } : s === "wall" && l.boxMaxWidth ? {
@@ -920,7 +920,7 @@ function at({
920
920
  To,
921
921
  {
922
922
  component: "section",
923
- styles: { ...A, ...m },
923
+ styles: { ...c, ...m },
924
924
  className: v("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", o, {
925
925
  dark: t
926
926
  }),
@@ -935,7 +935,7 @@ function at({
935
935
  "titleAppearance",
936
936
  "descriptionAppearance"
937
937
  ),
938
- children: /* @__PURE__ */ i(Oo, { autoWidth: l?.autoWidth, className: v("section-content h-full"), sx: u, children: r.show ? /* @__PURE__ */ i(wt, { ...c, boxed: r, children: e }) : e })
938
+ children: /* @__PURE__ */ i(Oo, { autoWidth: l?.autoWidth, className: v("section-content h-full"), sx: u, children: r.show ? /* @__PURE__ */ i(wt, { ...A, boxed: r, children: e }) : e })
939
939
  }
940
940
  );
941
941
  }
@@ -946,21 +946,21 @@ function wt({
946
946
  sx: n = {},
947
947
  boxed: r = { show: !1 },
948
948
  className: a = "",
949
- styles: c = {},
949
+ styles: A = {},
950
950
  ...s
951
951
  }) {
952
- const l = { ...c, ...n }, A = Zt();
952
+ const l = { ...A, ...n }, c = Zt();
953
953
  let d = null;
954
- const u = _t((x) => x.breakpoints.up("sm")), m = Me(), g = Go();
955
- return t && (d = Mt(
954
+ const u = _t((x) => x.breakpoints.up("sm")), m = We(), g = Go();
955
+ return t && (d = Wt(
956
956
  m,
957
- typeof t == "string" ? A(t) : t,
957
+ typeof t == "string" ? c(t) : t,
958
958
  l,
959
959
  e,
960
960
  g
961
- )), r.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = u ? "50px" : "20px"), r?.border && (l.border = "1px solid #c0c0c0"), r?.background && (d = Mt(
961
+ )), r.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = u ? "50px" : "20px"), r?.border && (l.border = "1px solid #c0c0c0"), r?.background && (d = Wt(
962
962
  m,
963
- typeof r?.background == "string" ? A(r?.background) : r?.background,
963
+ typeof r?.background == "string" ? c(r?.background) : r?.background,
964
964
  l,
965
965
  r?.backgroundVideoPoster,
966
966
  g
@@ -1005,7 +1005,7 @@ function se(t) {
1005
1005
  return Array.isArray(t);
1006
1006
  }
1007
1007
  const z = "&>*";
1008
- function le({ children: t, col: e, gap: o, className: n, align: r, sx: a, type: c, ...s } = {
1008
+ function le({ children: t, col: e, gap: o, className: n, align: r, sx: a, type: A, ...s } = {
1009
1009
  children: null,
1010
1010
  className: "",
1011
1011
  col: 3,
@@ -1014,7 +1014,7 @@ function le({ children: t, col: e, gap: o, className: n, align: r, sx: a, type:
1014
1014
  align: "center",
1015
1015
  type: "default"
1016
1016
  }) {
1017
- const l = Xt(), A = Number(Math.floor(100 / e * 100) / 100), d = {
1017
+ const l = Xt(), c = Number(Math.floor(100 / e * 100) / 100), d = {
1018
1018
  center: "justify-center items-center",
1019
1019
  left: "justify-start items-center",
1020
1020
  right: "justify-end items-center",
@@ -1054,7 +1054,7 @@ function le({ children: t, col: e, gap: o, className: n, align: r, sx: a, type:
1054
1054
  };
1055
1055
  break;
1056
1056
  }
1057
- return y[z] = { width: `calc(${A}% - ${f}rem)` }, y[`@media (max-width: ${l.breakpoints.values.xl}px)`] = D, y[`@media (max-width: ${l.breakpoints.values.lg}px)`] = B, y[`@media (max-width: ${l.breakpoints.values.md}px)`] = w, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, c === "wall" && (y = { ...a, gap: `${g}rem` }, y[z] = { width: `calc(${A}% - ${f}rem)` }, k[z] = { width: `calc(45% - ${g / 2 / 2}rem)` }, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(p, { className: v("flex flex-wrap flex-row h-full", u, n), sx: y, ...s, children: t });
1057
+ return y[z] = { width: `calc(${c}% - ${f}rem)` }, y[`@media (max-width: ${l.breakpoints.values.xl}px)`] = D, y[`@media (max-width: ${l.breakpoints.values.lg}px)`] = B, y[`@media (max-width: ${l.breakpoints.values.md}px)`] = w, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, A === "wall" && (y = { ...a, gap: `${g}rem` }, y[z] = { width: `calc(${c}% - ${f}rem)` }, k[z] = { width: `calc(45% - ${g / 2 / 2}rem)` }, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(p, { className: v("flex flex-wrap flex-row h-full", u, n), sx: y, ...s, children: t });
1058
1058
  }
1059
1059
  function G({ type: t = "", icon: e = "", size: o = "3rem", className: n = "", ...r }) {
1060
1060
  return /* @__PURE__ */ i(
@@ -1075,13 +1075,13 @@ function Yo({
1075
1075
  className: n,
1076
1076
  activeClassName: r = "active",
1077
1077
  target: a = "auto",
1078
- autoExternalMark: c = !1,
1078
+ autoExternalMark: A = !1,
1079
1079
  useRouterLink: s,
1080
1080
  ...l
1081
1081
  }) {
1082
- const { pages: A = [], locale: d = "" } = {}, u = e ? $("/", e) : e || "";
1082
+ const { pages: c = [], locale: d = "" } = {}, u = e ? $("/", e) : e || "";
1083
1083
  let m = a === "auto" ? "_self" : a, g = $(u, t);
1084
- const x = c ? gt(g) : !1;
1084
+ const x = A ? gt(g) : !1;
1085
1085
  if (e)
1086
1086
  return g = $(u, d, t), /* @__PURE__ */ i(
1087
1087
  "a",
@@ -1098,10 +1098,10 @@ function Yo({
1098
1098
  a === "auto" && (m = "_blank"), g = t;
1099
1099
  else {
1100
1100
  He(g) && (g = $(window.location.pathname, g));
1101
- const f = Ve(`${window.location.origin}${g}`), y = A.some((k) => k.pathname === f.pathname);
1101
+ const f = Ve(`${window.location.origin}${g}`), y = c.some((k) => k.pathname === f.pathname);
1102
1102
  if (s || y)
1103
1103
  return /* @__PURE__ */ i(
1104
- Ne,
1104
+ Le,
1105
1105
  {
1106
1106
  end: !0,
1107
1107
  to: dt(g),
@@ -1133,13 +1133,13 @@ function Z({
1133
1133
  className: n = "",
1134
1134
  dark: r = !1,
1135
1135
  border: a = !0,
1136
- ...c
1136
+ ...A
1137
1137
  }) {
1138
1138
  let s = {};
1139
- const { pages: l = [] } = re(), A = l.find((m) => m.id === c.link), d = !o || De.Children.toArray(o).every((m) => m === null);
1140
- c.link && (s = {
1139
+ const { pages: l = [] } = re(), c = l.find((m) => m.id === A.link), d = !o || De.Children.toArray(o).every((m) => m === null);
1140
+ A.link && (s = {
1141
1141
  component: Yo,
1142
- to: A?.path || c.link,
1142
+ to: c?.path || A.link,
1143
1143
  useRouterLink: !0
1144
1144
  });
1145
1145
  const u = Tt();
@@ -1151,7 +1151,7 @@ function Z({
1151
1151
  borderColor: u.palette.divider
1152
1152
  },
1153
1153
  ...s,
1154
- ...R(c, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
1154
+ ...R(A, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
1155
1155
  children: [
1156
1156
  t,
1157
1157
  !d && /* @__PURE__ */ i("div", { className: "card__body", children: o }),
@@ -1185,7 +1185,7 @@ function q({
1185
1185
  }) {
1186
1186
  return /* @__PURE__ */ b(J, { children: [
1187
1187
  e && /* @__PURE__ */ i(
1188
- W,
1188
+ M,
1189
1189
  {
1190
1190
  className: v("card__title text-gray-800", "dark:text-gray-50"),
1191
1191
  component: "h5",
@@ -1197,7 +1197,7 @@ function q({
1197
1197
  }
1198
1198
  ),
1199
1199
  n && /* @__PURE__ */ i(
1200
- W,
1200
+ M,
1201
1201
  {
1202
1202
  className: v("card__description", "text-gray-500", "dark:text-gray-400"),
1203
1203
  component: "div",
@@ -1217,13 +1217,13 @@ function Xo({
1217
1217
  imageProps: n = {},
1218
1218
  imageMeta: r,
1219
1219
  imageSize: a,
1220
- titleProps: c = {},
1220
+ titleProps: A = {},
1221
1221
  descriptionProps: s = {},
1222
1222
  actions: l,
1223
- align: A,
1223
+ align: c,
1224
1224
  ...d
1225
1225
  }) {
1226
- const u = kt(t), m = U(N(t), 540);
1226
+ const u = kt(t), m = U(L(t), 540);
1227
1227
  return /* @__PURE__ */ b(
1228
1228
  Ko,
1229
1229
  {
@@ -1261,14 +1261,14 @@ function Xo({
1261
1261
  e || o ? /* @__PURE__ */ i(
1262
1262
  q,
1263
1263
  {
1264
- align: A,
1264
+ align: c,
1265
1265
  title: e,
1266
- titleProps: c,
1266
+ titleProps: A,
1267
1267
  description: o,
1268
1268
  descriptionProps: s
1269
1269
  }
1270
1270
  ) : null,
1271
- l?.length ? /* @__PURE__ */ i(V, { align: A, actions: l, className: "mt-4" }) : null
1271
+ l?.length ? /* @__PURE__ */ i(V, { align: c, actions: l, className: "mt-4" }) : null
1272
1272
  ]
1273
1273
  }
1274
1274
  );
@@ -1307,7 +1307,7 @@ const Ko = I(Z)`
1307
1307
  height: 100%;
1308
1308
  object-position: top center;
1309
1309
  }
1310
- `, Wt = "section";
1310
+ `, Mt = "section";
1311
1311
  function Ut({
1312
1312
  title: t,
1313
1313
  image: e,
@@ -1315,17 +1315,17 @@ function Ut({
1315
1315
  description: n,
1316
1316
  actions: r,
1317
1317
  align: a,
1318
- listType: c = "",
1318
+ listType: A = "",
1319
1319
  className: s = "",
1320
1320
  ...l
1321
1321
  }) {
1322
- return /* @__PURE__ */ b(Zo, { className: v("card", `list-type-${c}`, s), align: a, ...l, children: [
1322
+ return /* @__PURE__ */ b(Zo, { className: v("card", `list-type-${A}`, s), align: a, ...l, children: [
1323
1323
  e && /* @__PURE__ */ i(
1324
1324
  G,
1325
1325
  {
1326
1326
  icon: e,
1327
1327
  color: "primary.main",
1328
- size: c === "icon-title" ? "1.2rem" : "3rem",
1328
+ size: A === "icon-title" ? "1.2rem" : "3rem",
1329
1329
  imageMeta: o
1330
1330
  }
1331
1331
  ),
@@ -1340,7 +1340,7 @@ const Zo = I(Z)`
1340
1340
  color: inherit !important;
1341
1341
  border-radius: 0.5rem;
1342
1342
  /* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
1343
- @media (max-width: ${({ theme: t }) => t.breakpoints.values[Wt]}px) {
1343
+ @media (max-width: ${({ theme: t }) => t.breakpoints.values[Mt]}px) {
1344
1344
  padding: 1.5rem 2rem;
1345
1345
  }
1346
1346
  @media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
@@ -1388,7 +1388,7 @@ const Zo = I(Z)`
1388
1388
  }
1389
1389
  }
1390
1390
 
1391
- @media (min-width: ${({ theme: t }) => t.breakpoints.values[Wt]}px) {
1391
+ @media (min-width: ${({ theme: t }) => t.breakpoints.values[Mt]}px) {
1392
1392
  padding: 2rem 2rem;
1393
1393
  text-align: left;
1394
1394
  box-sizing: border-box;
@@ -1401,13 +1401,13 @@ function qo({
1401
1401
  imageProps: n = {},
1402
1402
  imageMeta: r,
1403
1403
  imageSize: a,
1404
- titleProps: c = {},
1404
+ titleProps: A = {},
1405
1405
  descriptionProps: s = {},
1406
1406
  actions: l,
1407
- align: A,
1407
+ align: c,
1408
1408
  ...d
1409
1409
  }) {
1410
- const u = kt(t), m = U(N(t), 540);
1410
+ const u = kt(t), m = U(L(t), 540);
1411
1411
  return /* @__PURE__ */ b(
1412
1412
  _o,
1413
1413
  {
@@ -1451,14 +1451,14 @@ function qo({
1451
1451
  e || o ? /* @__PURE__ */ i(
1452
1452
  q,
1453
1453
  {
1454
- align: A,
1454
+ align: c,
1455
1455
  title: e,
1456
- titleProps: c,
1456
+ titleProps: A,
1457
1457
  description: o,
1458
1458
  descriptionProps: s
1459
1459
  }
1460
1460
  ) : null,
1461
- l?.length ? /* @__PURE__ */ i(V, { align: A, actions: l, className: "mt-4" }) : null
1461
+ l?.length ? /* @__PURE__ */ i(V, { align: c, actions: l, className: "mt-4" }) : null
1462
1462
  ]
1463
1463
  }
1464
1464
  );
@@ -1495,15 +1495,15 @@ function $o({
1495
1495
  iconSize: n = 100,
1496
1496
  description: r,
1497
1497
  actions: a,
1498
- align: c,
1498
+ align: A,
1499
1499
  className: s = "",
1500
1500
  ...l
1501
1501
  }) {
1502
1502
  return /* @__PURE__ */ i(tn, { className: v("card", s), ...l, children: /* @__PURE__ */ b(p, { className: "flex items-center", children: [
1503
1503
  e && /* @__PURE__ */ i(G, { icon: e, color: "primary.main", size: n, imageMeta: o }),
1504
1504
  /* @__PURE__ */ b(p, { className: "flex-1 ml-4", children: [
1505
- /* @__PURE__ */ i(q, { align: c, title: t, description: r }),
1506
- /* @__PURE__ */ i(V, { align: c, actions: a, className: "mt-4" })
1505
+ /* @__PURE__ */ i(q, { align: A, title: t, description: r }),
1506
+ /* @__PURE__ */ i(V, { align: A, actions: a, className: "mt-4" })
1507
1507
  ] })
1508
1508
  ] }) });
1509
1509
  }
@@ -1573,12 +1573,12 @@ function en({
1573
1573
  descriptionProps: n = {},
1574
1574
  image: r,
1575
1575
  imageMeta: a,
1576
- className: c = "",
1576
+ className: A = "",
1577
1577
  align: s,
1578
1578
  hoverStyle: l,
1579
- ...A
1579
+ ...c
1580
1580
  }) {
1581
- return /* @__PURE__ */ b(on, { className: v("card-simple", c, `hover-style__${l}`), align: s, ...A, children: [
1581
+ return /* @__PURE__ */ b(on, { className: v("card-simple", A, `hover-style__${l}`), align: s, ...c, children: [
1582
1582
  r && /* @__PURE__ */ i(G, { icon: r, color: "primary.main", imageMeta: a }),
1583
1583
  t || o ? /* @__PURE__ */ i(
1584
1584
  q,
@@ -1706,10 +1706,10 @@ function rn({
1706
1706
  listBorder: n = !0,
1707
1707
  listType: r = "",
1708
1708
  col: a = 3,
1709
- gap: c,
1709
+ gap: A,
1710
1710
  iconColor: s,
1711
1711
  className: l = "",
1712
- type: A = "default",
1712
+ type: c = "default",
1713
1713
  dark: d = !1,
1714
1714
  textAlign: u = "left",
1715
1715
  hoverStyle: m,
@@ -1718,10 +1718,10 @@ function rn({
1718
1718
  return /* @__PURE__ */ i(
1719
1719
  le,
1720
1720
  {
1721
- type: A,
1721
+ type: c,
1722
1722
  className: v("card-list py-1", l, "items-stretch"),
1723
1723
  col: a,
1724
- gap: c,
1724
+ gap: A,
1725
1725
  align: e,
1726
1726
  ...g,
1727
1727
  children: o || t.map((x) => /* @__PURE__ */ i(
@@ -1729,12 +1729,12 @@ function rn({
1729
1729
  {
1730
1730
  borderColor: n,
1731
1731
  iconColor: s,
1732
- type: A,
1732
+ type: c,
1733
1733
  listType: r,
1734
1734
  dark: d,
1735
1735
  ...x,
1736
1736
  align: u,
1737
- style: c === 0 && t.length > 1 ? {
1737
+ style: A === 0 && t.length > 1 ? {
1738
1738
  borderRadius: 0,
1739
1739
  marginRight: "-1px",
1740
1740
  marginBottom: "-1px"
@@ -1757,7 +1757,7 @@ const an = [
1757
1757
  "type",
1758
1758
  "textAlign"
1759
1759
  ];
1760
- function L(t, e) {
1760
+ function N(t, e) {
1761
1761
  const o = et(t, e), n = R(t, e);
1762
1762
  return [o, n];
1763
1763
  }
@@ -1778,13 +1778,13 @@ const sn = I(at)`
1778
1778
  }
1779
1779
  `;
1780
1780
  function ln({ className: t, ...e }) {
1781
- const [o, n] = L(e, rt), [r, a] = L(n, an);
1781
+ const [o, n] = N(e, rt), [r, a] = N(n, an);
1782
1782
  return /* @__PURE__ */ b(sn, { className: v("section--card-list", t), type: e.type, ...a, children: [
1783
1783
  Object.keys(o).length > 0 && /* @__PURE__ */ i(it, { center: !0, ...o, className: "mb-[2.5vw]" }),
1784
1784
  /* @__PURE__ */ i(rn, { ...r, dark: !!e.dark })
1785
1785
  ] });
1786
1786
  }
1787
- const cn = I(ln)`
1787
+ const An = I(ln)`
1788
1788
  .card__description {
1789
1789
  white-space: pre-wrap;
1790
1790
  }
@@ -1800,20 +1800,20 @@ const cn = I(ln)`
1800
1800
  background: inherit !important;
1801
1801
  }
1802
1802
  `;
1803
- function An({ section: t, ...e }) {
1804
- const [{ editing: o }, n] = L(e, nt), r = E(() => ({
1803
+ function cn({ section: t, ...e }) {
1804
+ const [{ editing: o }, n] = N(e, nt), r = E(() => ({
1805
1805
  ...R(n, ["listBorder", "list", "iconSize", "imageSize"]),
1806
1806
  list: n.list?.map((a) => ({
1807
1807
  ...R(a, "icon", "iconColor"),
1808
1808
  image: ["news", "simple", "default"].includes(n.type) && a.icon ? a.icon : a.image,
1809
- actions: a.actions?.map?.((c) => /* @__PURE__ */ i(ae, { ...c, editing: o }, c.id)),
1809
+ actions: a.actions?.map?.((A) => /* @__PURE__ */ i(ae, { ...A, editing: o }, A.id)),
1810
1810
  border: n.listBorder,
1811
1811
  iconSize: n.iconSize,
1812
1812
  imageSize: n.imageSize,
1813
1813
  hoverStyle: n.hoverStyle
1814
1814
  }))
1815
1815
  }), [n]);
1816
- return /* @__PURE__ */ i(cn, { style: o ? { pointerEvents: "none" } : {}, ...r });
1816
+ return /* @__PURE__ */ i(An, { style: o ? { pointerEvents: "none" } : {}, ...r });
1817
1817
  }
1818
1818
  function dn({
1819
1819
  properties: t,
@@ -1822,7 +1822,7 @@ function dn({
1822
1822
  dev: n
1823
1823
  }) {
1824
1824
  return e?.config?.componentId ? /* @__PURE__ */ i(
1825
- We,
1825
+ Me,
1826
1826
  {
1827
1827
  instanceId: e.id,
1828
1828
  componentId: e.config.componentId,
@@ -1841,7 +1841,7 @@ function dn({
1841
1841
  py: 2
1842
1842
  },
1843
1843
  children: /* @__PURE__ */ i(
1844
- W,
1844
+ M,
1845
1845
  {
1846
1846
  variant: "caption",
1847
1847
  sx: {
@@ -1875,9 +1875,9 @@ function un({
1875
1875
  );
1876
1876
  }
1877
1877
  function gn({ dataId: t, src: e, actions: o, center: n, onLoad: r, ...a }) {
1878
- const [c, s] = L(a, rt);
1878
+ const [A, s] = N(a, rt);
1879
1879
  return /* @__PURE__ */ b(at, { ...s, children: [
1880
- Object.keys(c).length > 0 && /* @__PURE__ */ i(it, { center: n, ...c }),
1880
+ Object.keys(A).length > 0 && /* @__PURE__ */ i(it, { center: n, ...A }),
1881
1881
  /* @__PURE__ */ i(
1882
1882
  un,
1883
1883
  {
@@ -1902,13 +1902,13 @@ const Ji = {
1902
1902
  id: ""
1903
1903
  };
1904
1904
  function mn({ section: t, id: e, src: o, ...n }) {
1905
- const r = `${e}-${n.locale}`, [{ editing: a }, c] = L(n, nt), s = xt({}), l = JSON.parse(JSON.stringify(c)), { message: A } = Ge(r, "server"), d = Oe(JSON.parse(JSON.stringify(c.config) || "{}"));
1905
+ const r = `${e}-${n.locale}`, [{ editing: a }, A] = N(n, nt), s = xt({}), l = JSON.parse(JSON.stringify(A)), { message: c } = Ge(r, "server"), d = Oe(JSON.parse(JSON.stringify(A.config) || "{}"));
1906
1906
  return X(() => {
1907
- A && A.onInit(() => d.current);
1908
- }, [A]), X(() => {
1909
- const u = JSON.parse(JSON.stringify(c.config) || "{}");
1910
- Te(s.current, u) || (s.current = u, A?.send("config-set", u));
1911
- }, [A, c.config]), o ? /* @__PURE__ */ i(gn, { ...l, dataId: r, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(pn, { children: 'Please set the "src" attribute for this block' });
1907
+ c && c.onInit(() => d.current);
1908
+ }, [c]), X(() => {
1909
+ const u = JSON.parse(JSON.stringify(A.config) || "{}");
1910
+ Te(s.current, u) || (s.current = u, c?.send("config-set", u));
1911
+ }, [c, A.config]), o ? /* @__PURE__ */ i(gn, { ...l, dataId: r, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(pn, { children: 'Please set the "src" attribute for this block' });
1912
1912
  }
1913
1913
  const pn = I("div")`
1914
1914
  user-select: none;
@@ -1983,11 +1983,11 @@ const pn = I("div")`
1983
1983
  style: "solid",
1984
1984
  color: "divider"
1985
1985
  };
1986
- function ce(t) {
1986
+ function Ae(t) {
1987
1987
  return typeof t == "string" && t.startsWith("custom:");
1988
1988
  }
1989
1989
  function Dn(t) {
1990
- if (!ce(t)) return Ht;
1990
+ if (!Ae(t)) return Ht;
1991
1991
  try {
1992
1992
  const e = t?.substring(7) || "", [o = "1px", n = "solid", ...r] = e.split(" ");
1993
1993
  return {
@@ -2002,7 +2002,7 @@ function Dn(t) {
2002
2002
  function Qn(t) {
2003
2003
  if (!t || t === "none")
2004
2004
  return { border: "none" };
2005
- if (ce(t)) {
2005
+ if (Ae(t)) {
2006
2006
  const { width: e, style: o, color: n } = Dn(t);
2007
2007
  return {
2008
2008
  border: "none",
@@ -2014,11 +2014,11 @@ function Qn(t) {
2014
2014
  }
2015
2015
  return {};
2016
2016
  }
2017
- function Ae(t) {
2017
+ function ce(t) {
2018
2018
  return typeof t == "string" && t.startsWith("custom:");
2019
2019
  }
2020
2020
  function Rn(t) {
2021
- if (!Ae(t)) return "0";
2021
+ if (!ce(t)) return "0";
2022
2022
  try {
2023
2023
  return t?.substring(7) || "0";
2024
2024
  } catch {
@@ -2026,17 +2026,17 @@ function Rn(t) {
2026
2026
  }
2027
2027
  }
2028
2028
  const pt = (t) => typeof t == "string" && t.startsWith("custom:"), Vt = (t) => pt(t) ? t.replace("custom:", "") : "";
2029
- function Nn(t) {
2030
- return !t || t === "none" ? { borderRadius: 0 } : Ae(t) ? { borderRadius: Rn(t) } : {};
2029
+ function Ln(t) {
2030
+ return !t || t === "none" ? { borderRadius: 0 } : ce(t) ? { borderRadius: Rn(t) } : {};
2031
2031
  }
2032
- function Ln({ ref: t = void 0, type: e, sx: o, children: n, ...r }) {
2033
- const a = Tt(), c = a.palette.mode === "dark", l = Yt(a.breakpoints.down("sm")) ? 20 : 32, A = {
2032
+ function Nn({ ref: t = void 0, type: e, sx: o, children: n, ...r }) {
2033
+ const a = Tt(), A = a.palette.mode === "dark", l = Yt(a.breakpoints.down("sm")) ? 20 : 32, c = {
2034
2034
  overflow: "hidden !important",
2035
2035
  display: "grid !important",
2036
2036
  boxSizing: "border-box"
2037
- }, d = "layout-block-frame", u = [A, ...Array.isArray(o) ? o : [o]];
2037
+ }, d = "layout-block-frame", u = [c, ...Array.isArray(o) ? o : [o]];
2038
2038
  return H(() => {
2039
- const g = lo(e || ""), x = co(e || "");
2039
+ const g = lo(e || ""), x = Ao(e || "");
2040
2040
  if (g)
2041
2041
  return u.push({
2042
2042
  img: {
@@ -2054,7 +2054,7 @@ function Ln({ ref: t = void 0, type: e, sx: o, children: n, ...r }) {
2054
2054
  {
2055
2055
  // @ts-ignore
2056
2056
  ".screenshot--container": {
2057
- ...A,
2057
+ ...c,
2058
2058
  ...et(o, ["p", "px", "py", "pl", "pr", "pt", "pb", "ml", "mr", "mt", "mb", "alignItems"])
2059
2059
  }
2060
2060
  }
@@ -2066,7 +2066,7 @@ function Ln({ ref: t = void 0, type: e, sx: o, children: n, ...r }) {
2066
2066
  const f = e?.includes("chrome") ? "chrome" : "safari", y = Sn.find((_) => _.name === f);
2067
2067
  if (!y)
2068
2068
  return /* @__PURE__ */ i(p, { className: d, ref: t, sx: u, ...r, children: n });
2069
- const k = y.mode[c ? "dark" : "light"], w = k.top, B = k.bottom, D = f === "chrome";
2069
+ const k = y.mode[A ? "dark" : "light"], w = k.top, B = k.bottom, D = f === "chrome";
2070
2070
  return /* @__PURE__ */ b(
2071
2071
  p,
2072
2072
  {
@@ -2198,9 +2198,9 @@ function Ln({ ref: t = void 0, type: e, sx: o, children: n, ...r }) {
2198
2198
  );
2199
2199
  }
2200
2200
  return /* @__PURE__ */ i(p, { className: d, ref: t, sx: u, ...r, children: n });
2201
- }, [e, n, u, c, l])();
2201
+ }, [e, n, u, A, l])();
2202
2202
  }
2203
- const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "start", Fn = "none", Hn = "none", Vn = "full", Gn = 12, On = ({
2203
+ const jn = "none", Pn = "none", zn = "none", Wn = "100%", Mn = "center", Un = "start", Fn = "none", Hn = "none", Vn = "full", Gn = 12, On = ({
2204
2204
  gridSettings: t,
2205
2205
  section: e,
2206
2206
  index: o,
@@ -2208,7 +2208,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2208
2208
  simulateMode: r = "desktop",
2209
2209
  isBackground: a
2210
2210
  }) => {
2211
- const c = t?.[r] ?? {}, s = c[e.id], l = Tn(c);
2211
+ const A = t?.[r] ?? {}, s = A[e.id], l = Tn(A);
2212
2212
  return {
2213
2213
  i: e.id,
2214
2214
  static: e?.locked || a,
@@ -2230,7 +2230,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2230
2230
  maxY: l
2231
2231
  };
2232
2232
  }, Tn = (t) => Object.values(t).reduce((e, o) => Math.max(e, o.y || 0), 0) || 0, Yn = (t) => {
2233
- const { currentBreakpoint: e } = fn(), { dev: o, id: n, section: r, onBlockRender: a } = t, c = o?.mode, s = Yt((h) => h.breakpoints.down("sm")), { t: l } = Je(), { getPageMeta: A } = ne(), d = A(), { sections: u, sectionIds: m, config: g } = r, {
2233
+ const { currentBreakpoint: e } = fn(), { dev: o, id: n, section: r, onBlockRender: a } = t, A = o?.mode, s = Yt((h) => h.breakpoints.down("sm")), { t: l } = Je(), { getPageMeta: c } = ne(), d = c(), { sections: u, sectionIds: m, config: g } = r, {
2234
2234
  columns: x = Gn,
2235
2235
  gridSettings: f,
2236
2236
  gap: y,
@@ -2259,13 +2259,13 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2259
2259
  Object.keys(C.gap || {}).forEach((j) => {
2260
2260
  C.gap[j] / 2, -C.gap[j] / 2, -C.gap[j], C.gap[j];
2261
2261
  });
2262
- const M = C.gap[e];
2262
+ const W = C.gap[e];
2263
2263
  return {
2264
2264
  container: {
2265
2265
  // rowGap 不用管,跟高度相关,不会存在 overflow 问题
2266
2266
  rowGap: C.gap,
2267
2267
  columnGap: C.gap,
2268
- [M ? `@container (width < ${M * x * 8}px)` : ""]: {
2268
+ [W ? `@container (width < ${W * x * 8}px)` : ""]: {
2269
2269
  // 避免宽度溢出,导致内容溢出
2270
2270
  columnGap: "0px",
2271
2271
  // 添加提示,触发 item 的样式
@@ -2287,11 +2287,11 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2287
2287
  value: h,
2288
2288
  format: "sx"
2289
2289
  });
2290
- }, [B, k]), ct = E(() => Q({
2290
+ }, [B, k]), At = E(() => Q({
2291
2291
  type: "layoutBlockAlignContent",
2292
- value: Bt ?? Wn,
2292
+ value: Bt ?? Mn,
2293
2293
  format: "sx"
2294
- }), [Bt]), At = E(() => Q({
2294
+ }), [Bt]), ct = E(() => Q({
2295
2295
  type: "layoutBlockJustifyContent",
2296
2296
  value: Et ?? Un,
2297
2297
  format: "sx"
@@ -2303,7 +2303,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2303
2303
  format: "sx"
2304
2304
  });
2305
2305
  }, [lt]), me = E(() => {
2306
- const h = It ?? Hn, C = Nn(h);
2306
+ const h = It ?? Hn, C = Ln(h);
2307
2307
  return Object.keys(C).length > 0 ? C : Q({
2308
2308
  type: "layoutBlockBorderRadius",
2309
2309
  value: h,
@@ -2311,24 +2311,24 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2311
2311
  });
2312
2312
  }, [It]), pe = E(() => Q({
2313
2313
  type: "layoutBlockHeight",
2314
- value: D ?? Mn,
2314
+ value: D ?? Wn,
2315
2315
  format: "sx"
2316
2316
  }), [D]), he = E(() => Q({
2317
2317
  type: "maxWidth",
2318
2318
  value: _ ?? Vn,
2319
2319
  format: "sx"
2320
2320
  }), [_]), Qt = H(
2321
- (h, C = !1, M = 0, j) => {
2321
+ (h, C = !1, W = 0, j) => {
2322
2322
  if (!a || !h || !h.component || h.visibility === "hidden")
2323
2323
  return null;
2324
2324
  const P = On({
2325
2325
  gridSettings: f,
2326
2326
  section: h,
2327
- index: M,
2327
+ index: W,
2328
2328
  columns: x,
2329
2329
  simulateMode: s ? "mobile" : "desktop",
2330
2330
  isBackground: C
2331
- }), O = P?.x ?? 0, F = P?.y ?? 0, Lt = P?.w ?? x, jt = P?.h ?? 1, fe = P?.maxY ?? 0, xe = !!r?.config?.backgroundSectionId;
2331
+ }), O = P?.x ?? 0, F = P?.y ?? 0, Nt = P?.w ?? x, jt = P?.h ?? 1, fe = P?.maxY ?? 0, xe = !!r?.config?.backgroundSectionId;
2332
2332
  return /* @__PURE__ */ i(
2333
2333
  p,
2334
2334
  {
@@ -2350,7 +2350,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2350
2350
  } : {
2351
2351
  position: "relative",
2352
2352
  // 使用 grid 定位普通元素
2353
- gridColumn: `${O + 1} / span ${Lt}`,
2353
+ gridColumn: `${O + 1} / span ${Nt}`,
2354
2354
  // hasBackground 的话,不再 + 1,因为 background 会占用第一行
2355
2355
  gridRow: `${F + (xe ? 0 : 1)} / span ${jt}`,
2356
2356
  zIndex: 1,
@@ -2362,7 +2362,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2362
2362
  maxWidth: "100%",
2363
2363
  // 防止内容撑开网格项
2364
2364
  // overflow: 'hidden', // 防止子内容溢出网格项
2365
- "--grid-w": Lt,
2365
+ "--grid-w": Nt,
2366
2366
  "--grid-x": O,
2367
2367
  "--grid-h": jt,
2368
2368
  "--grid-y": F,
@@ -2373,8 +2373,8 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2373
2373
  position: "relative",
2374
2374
  containerType: "inline-size",
2375
2375
  containerName: `layout-block-container-${h.id}`,
2376
- ...ct,
2377
- ...At
2376
+ ...At,
2377
+ ...ct
2378
2378
  }
2379
2379
  }
2380
2380
  },
@@ -2385,7 +2385,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2385
2385
  section: {
2386
2386
  ...h
2387
2387
  },
2388
- mode: c
2388
+ mode: A
2389
2389
  })
2390
2390
  },
2391
2391
  h.id
@@ -2393,27 +2393,27 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2393
2393
  },
2394
2394
  [
2395
2395
  n,
2396
- c,
2396
+ A,
2397
2397
  a,
2398
2398
  f,
2399
2399
  x,
2400
2400
  s,
2401
2401
  Dt,
2402
- ct,
2403
2402
  At,
2403
+ ct,
2404
2404
  St,
2405
2405
  d
2406
2406
  ]
2407
- ), { backgroundElements: Rt, contentElements: Nt } = E(() => {
2407
+ ), { backgroundElements: Rt, contentElements: Lt } = E(() => {
2408
2408
  const h = [], C = [];
2409
- return m?.forEach((M, j) => {
2410
- const P = u?.[M];
2409
+ return m?.forEach((W, j) => {
2410
+ const P = u?.[W];
2411
2411
  if (!P) return;
2412
- const O = r?.config?.backgroundSectionId === M, F = Qt(P, O, j);
2412
+ const O = r?.config?.backgroundSectionId === W, F = Qt(P, O, j);
2413
2413
  F && (O ? h.push(F) : C.push(F));
2414
2414
  }), { backgroundElements: h || [], contentElements: C || [] };
2415
2415
  }, [Qt, u, m, st, Ct]);
2416
- return c === "draft" && !Rt?.length && !Nt?.length ? /* @__PURE__ */ b(
2416
+ return A === "draft" && !Rt?.length && !Lt?.length ? /* @__PURE__ */ b(
2417
2417
  p,
2418
2418
  {
2419
2419
  sx: {
@@ -2490,7 +2490,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2490
2490
  ]
2491
2491
  }
2492
2492
  ) : /* @__PURE__ */ b(
2493
- Ln,
2493
+ Nn,
2494
2494
  {
2495
2495
  type: lt,
2496
2496
  sx: {
@@ -2505,8 +2505,8 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2505
2505
  overflow: "hidden",
2506
2506
  // Prevent content overflow
2507
2507
  ...Dt?.container,
2508
- ...ct,
2509
2508
  ...At,
2509
+ ...ct,
2510
2510
  ...de,
2511
2511
  // 应用水平内边距
2512
2512
  ...ue
@@ -2557,6 +2557,12 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2557
2557
  position: "inherit !important"
2558
2558
  }
2559
2559
  },
2560
+ // 子元素如果有这个 class,则设置为全宽
2561
+ "&:has(.ALWAYS_FULL_WIDTH_BLOCK)": {
2562
+ maxWidth: "100%",
2563
+ margin: "0 !important",
2564
+ padding: "0 !important"
2565
+ },
2560
2566
  // 因为有 device frame 的存在,需要这样写
2561
2567
  "& > div": {
2562
2568
  ...ge,
@@ -2568,7 +2574,7 @@ const jn = "none", Pn = "none", zn = "none", Mn = "100%", Wn = "center", Un = "s
2568
2574
  }
2569
2575
  ),
2570
2576
  Rt,
2571
- Nt
2577
+ Lt
2572
2578
  ] })
2573
2579
  ]
2574
2580
  }
@@ -2581,9 +2587,9 @@ function Xn({
2581
2587
  className: n,
2582
2588
  reverse: r = !1,
2583
2589
  fullSizeImage: a,
2584
- ...c
2590
+ ...A
2585
2591
  }) {
2586
- const [s, l] = L(c, rt), A = Object.keys(s).length > 0 && Object.values(et(s, Jn)).filter(Boolean).length > 0 && /* @__PURE__ */ i(it, { ...s }), d = Jt(t) ? t : /* @__PURE__ */ i(p, { component: "img", src: t, alt: "", className: "block" }), u = ["phone", "macbook"].includes(e), m = t && /* @__PURE__ */ i(
2592
+ const [s, l] = N(A, rt), c = Object.keys(s).length > 0 && Object.values(et(s, Jn)).filter(Boolean).length > 0 && /* @__PURE__ */ i(it, { ...s }), d = Jt(t) ? t : /* @__PURE__ */ i(p, { component: "img", src: t, alt: "", className: "block" }), u = ["phone", "macbook"].includes(e), m = t && /* @__PURE__ */ i(
2587
2593
  p,
2588
2594
  {
2589
2595
  className: v(
@@ -2639,9 +2645,9 @@ function Xn({
2639
2645
  ` : void 0,
2640
2646
  children: r ? /* @__PURE__ */ b(J, { children: [
2641
2647
  m,
2642
- A
2648
+ c
2643
2649
  ] }) : /* @__PURE__ */ b(J, { children: [
2644
- A,
2650
+ c,
2645
2651
  m
2646
2652
  ] })
2647
2653
  }
@@ -2695,13 +2701,13 @@ function ti({ url: t }) {
2695
2701
  const e = xt(null), o = 495, [n, r] = ot(
2696
2702
  e.current ? e.current.offsetWidth * 0.5625 : o
2697
2703
  ), a = H(() => {
2698
- const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
2699
- return r(Math.floor(s * c));
2704
+ const A = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
2705
+ return r(Math.floor(s * A));
2700
2706
  }, []);
2701
2707
  return X(() => {
2702
2708
  window.addEventListener("resize", a);
2703
- const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
2704
- return r(Math.floor(s * c)), function() {
2709
+ const A = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
2710
+ return r(Math.floor(s * A)), function() {
2705
2711
  window.removeEventListener("resize", a);
2706
2712
  };
2707
2713
  }, [n, a]), /* @__PURE__ */ i(
@@ -2744,19 +2750,19 @@ function oi({
2744
2750
  videoPoster: n,
2745
2751
  imageMeta: r,
2746
2752
  imageOptimization: a,
2747
- imageSize: c,
2753
+ imageSize: A,
2748
2754
  section: s,
2749
2755
  ...l
2750
2756
  }) {
2751
- const [{ editing: A }, d] = L({ ...l, boxed: e ? void 0 : o }, nt);
2752
- let u = ni(d.image, n, e, r, a, c);
2757
+ const [{ editing: c }, d] = N({ ...l, boxed: e ? void 0 : o }, nt);
2758
+ let u = ni(d.image, n, e, r, a, A);
2753
2759
  t || (u = null);
2754
2760
  let m = null;
2755
- return d.actions && (m = d.actions?.map?.((g, x) => /* @__PURE__ */ i(ae, { ...g, editing: A }, x))), /* @__PURE__ */ i(
2761
+ return d.actions && (m = d.actions?.map?.((g, x) => /* @__PURE__ */ i(ae, { ...g, editing: c }, x))), /* @__PURE__ */ i(
2756
2762
  ei,
2757
2763
  {
2758
2764
  ...d,
2759
- style: A ? { pointerEvents: "none" } : {},
2765
+ style: c ? { pointerEvents: "none" } : {},
2760
2766
  image: u,
2761
2767
  fullSizeImage: t && e,
2762
2768
  actions: m
@@ -2769,10 +2775,10 @@ function ni(t, e, o, n, r, a) {
2769
2775
  return /* @__PURE__ */ i(_n, { src: t });
2770
2776
  if (t.indexOf("twitter.com") !== -1)
2771
2777
  return /* @__PURE__ */ i($n, { sourceType: "url", url: t });
2772
- const c = qn(t);
2773
- if (c)
2774
- return /* @__PURE__ */ i(ti, { url: c });
2775
- const { naturalWidth: s, naturalHeight: l, filename: A } = n || {};
2778
+ const A = qn(t);
2779
+ if (A)
2780
+ return /* @__PURE__ */ i(ti, { url: A });
2781
+ const { naturalWidth: s, naturalHeight: l, filename: c } = n || {};
2776
2782
  if (T(t))
2777
2783
  return /* @__PURE__ */ i(
2778
2784
  "video",
@@ -2789,8 +2795,8 @@ function ni(t, e, o, n, r, a) {
2789
2795
  width: "100%",
2790
2796
  height: "100%"
2791
2797
  },
2792
- poster: U(N(e), o ? 1200 : 540, r),
2793
- children: /* @__PURE__ */ i("source", { src: N(t), type: Ho(t) })
2798
+ poster: U(L(e), o ? 1200 : 540, r),
2799
+ children: /* @__PURE__ */ i("source", { src: L(t), type: Ho(t) })
2794
2800
  },
2795
2801
  t
2796
2802
  );
@@ -2798,7 +2804,7 @@ function ni(t, e, o, n, r, a) {
2798
2804
  return /* @__PURE__ */ i(
2799
2805
  qt,
2800
2806
  {
2801
- src: N(t),
2807
+ src: L(t),
2802
2808
  sizesAttr: {
2803
2809
  sm: 600 * d,
2804
2810
  md: 450 * d,
@@ -2810,7 +2816,7 @@ function ni(t, e, o, n, r, a) {
2810
2816
  },
2811
2817
  width: s && `${s}px`,
2812
2818
  height: l && `${l}px`,
2813
- alt: A ?? t,
2819
+ alt: c ?? t,
2814
2820
  style: { objectFit: a || "contain", display: "block", width: "100%", height: "100%" },
2815
2821
  loading: "lazy"
2816
2822
  }
@@ -2840,11 +2846,11 @@ const _i = {
2840
2846
  sort: "-updatedAt"
2841
2847
  }, Gt = 20;
2842
2848
  function ri({ style: t, sort: e, section: o, ...n }) {
2843
- const [{ editing: r, locale: a }, c] = L(n, nt), [s, l] = L(c, rt), [A, d] = ot(), u = xt(!1), m = Ke(), g = Le(), x = H(async () => {
2849
+ const [{ editing: r, locale: a }, A] = N(n, nt), [s, l] = N(A, rt), [c, d] = ot(), u = xt(!1), m = Ke(), g = Ne(), x = H(async () => {
2844
2850
  if (!u.current) {
2845
2851
  u.current = !0, m();
2846
2852
  try {
2847
- const f = A ? Math.floor(A.list.length / Gt) + 1 : 1, { list: y, total: k } = await ii({ locale: a, sort: e, page: f, limit: Gt });
2853
+ const f = c ? Math.floor(c.list.length / Gt) + 1 : 1, { list: y, total: k } = await ii({ locale: a, sort: e, page: f, limit: Gt });
2848
2854
  d((w) => ({
2849
2855
  list: (w?.list ?? []).concat(y),
2850
2856
  total: k
@@ -2853,12 +2859,12 @@ function ri({ style: t, sort: e, section: o, ...n }) {
2853
2859
  u.current = !1, m();
2854
2860
  }
2855
2861
  }
2856
- }, [A, a, e, m]);
2862
+ }, [c, a, e, m]);
2857
2863
  return Ze(() => {
2858
2864
  x();
2859
2865
  }), /* @__PURE__ */ b(at, { ...l, sx: r ? { pointerEvents: "none" } : {}, children: [
2860
2866
  Object.keys(s).length > 0 && /* @__PURE__ */ i(it, { ...s }),
2861
- A ? /* @__PURE__ */ b(J, { children: [
2867
+ c ? /* @__PURE__ */ b(J, { children: [
2862
2868
  /* @__PURE__ */ i(
2863
2869
  Pt,
2864
2870
  {
@@ -2867,7 +2873,7 @@ function ri({ style: t, sort: e, section: o, ...n }) {
2867
2873
  sx: {
2868
2874
  justifyContent: "center"
2869
2875
  },
2870
- children: A?.list.map((f) => /* @__PURE__ */ i(
2876
+ children: c?.list.map((f) => /* @__PURE__ */ i(
2871
2877
  Pt,
2872
2878
  {
2873
2879
  size: {
@@ -2887,13 +2893,13 @@ function ri({ style: t, sort: e, section: o, ...n }) {
2887
2893
  {
2888
2894
  component: "img",
2889
2895
  alt: "",
2890
- image: U(N(f.image), 540),
2896
+ image: U(L(f.image), 540),
2891
2897
  loading: "lazy"
2892
2898
  }
2893
2899
  ),
2894
2900
  /* @__PURE__ */ b(Ee, { children: [
2895
- /* @__PURE__ */ i(W, { variant: "h6", component: "div", className: Ot, children: f.title || f.id }),
2896
- /* @__PURE__ */ i(W, { variant: "body2", className: Ot, children: f.description })
2901
+ /* @__PURE__ */ i(M, { variant: "h6", component: "div", className: Ot, children: f.title || f.id }),
2902
+ /* @__PURE__ */ i(M, { variant: "body2", className: Ot, children: f.description })
2897
2903
  ] })
2898
2904
  ]
2899
2905
  }
@@ -2910,7 +2916,7 @@ function ri({ style: t, sort: e, section: o, ...n }) {
2910
2916
  textAlign: "center",
2911
2917
  mt: 2
2912
2918
  },
2913
- children: A.total > A.list.length ? /* @__PURE__ */ i(Y, { variant: "outlined", color: "secondary", onClick: x, loading: u.current, children: "More" }) : /* @__PURE__ */ i(Y, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
2919
+ children: c.total > c.list.length ? /* @__PURE__ */ i(Y, { variant: "outlined", color: "secondary", onClick: x, loading: u.current, children: "More" }) : /* @__PURE__ */ i(Y, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
2914
2920
  }
2915
2921
  )
2916
2922
  ] }) : /* @__PURE__ */ i(
@@ -2954,7 +2960,7 @@ const Ot = ut`
2954
2960
  `, si = {
2955
2961
  iframe: mn,
2956
2962
  section: oi,
2957
- "section-card-list": An,
2963
+ "section-card-list": cn,
2958
2964
  toc: ri,
2959
2965
  "custom-component": dn,
2960
2966
  "layout-block": Yn
@@ -2966,10 +2972,10 @@ function li({
2966
2972
  config: n,
2967
2973
  section: r,
2968
2974
  ignorePageMetaStyle: a,
2969
- page: c,
2975
+ page: A,
2970
2976
  ...s
2971
2977
  }) {
2972
- const l = si[e], { getPageMetaStyle: A } = ne(), d = E(() => {
2978
+ const l = si[e], { getPageMetaStyle: c } = ne(), d = E(() => {
2973
2979
  const { height: g, ...x } = n;
2974
2980
  return e === "layout-block" && (x.onBlockRender = (f) => {
2975
2981
  const y = {
@@ -2980,8 +2986,8 @@ function li({
2980
2986
  ...f?.config,
2981
2987
  dev: y
2982
2988
  }, { locale: B } = w;
2983
- let D = c?.dataSource?.[f?.id]?.[B];
2984
- return Se(D) && (D = c?.dataSource?.[f?.id]?.[k ?? "en"]), /* @__PURE__ */ i(
2989
+ let D = A?.dataSource?.[f?.id]?.[B];
2990
+ return Se(D) && (D = A?.dataSource?.[f?.id]?.[k ?? "en"]), /* @__PURE__ */ i(
2985
2991
  li,
2986
2992
  {
2987
2993
  ...f,
@@ -2990,18 +2996,18 @@ function li({
2990
2996
  ...D,
2991
2997
  ...w
2992
2998
  },
2993
- page: c,
2999
+ page: A,
2994
3000
  ignorePageMetaStyle: !0
2995
3001
  }
2996
3002
  );
2997
3003
  }), x;
2998
3004
  }, [n, e]), u = E(() => {
2999
3005
  const g = {};
3000
- return n.height && e !== "custom-component" && (g.height = n.height), g.sx = a ? void 0 : A("sx"), g.id = `BlockBase-${t}`, g;
3001
- }, [n.height, a, e, A]), m = l && /* @__PURE__ */ i(l, { mode: o, ...d, id: t, section: r });
3002
- return m ? /* @__PURE__ */ i(Do, { ...s, ...u, children: m }) : /* @__PURE__ */ i(ci, { type: e });
3006
+ return n.height && e !== "custom-component" && (g.height = n.height), g.sx = a ? void 0 : c("sx"), g.id = `BlockBase-${t}`, g;
3007
+ }, [n.height, a, e, c]), m = l && /* @__PURE__ */ i(l, { mode: o, ...d, id: t, section: r });
3008
+ return m ? /* @__PURE__ */ i(Do, { ...s, ...u, children: m }) : /* @__PURE__ */ i(Ai, { type: e });
3003
3009
  }
3004
- function ci({ type: t }) {
3010
+ function Ai({ type: t }) {
3005
3011
  return /* @__PURE__ */ i(
3006
3012
  p,
3007
3013
  {