@blocklet/pages-kit-inner-components 0.7.22 → 0.7.23

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,25 +1,26 @@
1
1
  import { jsx as o, jsxs as w } from "react/jsx-runtime";
2
- import { i as D, a as G, h as J, j as Z, k as ee, l as oe, m as te, f as re } from "./chunks/state-qDCrgEMQ.js";
2
+ import { i as D, j as J, a as G, h as Z, k as ee, l as oe, m as te, n as re, f as ie } from "./chunks/state-CMRCtF-D.js";
3
3
  import $ from "@arcblock/ux/lib/Empty";
4
4
  import { useLocaleContext as F } from "@arcblock/ux/lib/Locale/context";
5
- import { Icon as L } from "@iconify-icon/react";
6
- import ie from "@mui/icons-material/Check";
7
- import { Box as n, styled as H, alpha as ne, Stack as ae, Dialog as se, DialogTitle as le, TextField as pe, IconButton as ce, DialogContent as de, Tabs as me, Tab as ue, Grid as O, Card as fe, CardMedia as be, CardContent as ge, Typography as W, DialogActions as xe, Button as N, Skeleton as he } from "@mui/material";
5
+ import { Icon as A } from "@iconify-icon/react";
6
+ import ne from "@mui/icons-material/Check";
7
+ import { Box as n, styled as H, alpha as ae, Stack as se, Dialog as le, DialogTitle as pe, TextField as ce, IconButton as de, DialogContent as me, Tabs as ue, Tab as fe, Grid as O, Card as ge, CardMedia as be, CardContent as xe, Typography as W, DialogActions as he, Button as N, Skeleton as ye } from "@mui/material";
8
8
  import { useReactive as Q } from "ahooks";
9
- import { createContext as _, useMemo as P, useEffect as M, useRef as E } from "react";
10
- import { a as ye, R as ve, B as V, c as Ce, T as ke, I as we } from "./chunks/index-Dci_IgHn.js";
11
- import { styled as g } from "@arcblock/ux/lib/Theme";
9
+ import { createContext as _, useMemo as M, useEffect as E, useRef as P } from "react";
10
+ import { a as ve, R as Ce, B as V, c as ke, T as we, I as Ie } from "./chunks/index-BZ1MijZ6.js";
11
+ import { styled as b } from "@arcblock/ux/lib/Theme";
12
12
  import "@blocklet/pages-kit/builtin/color-picker";
13
13
  import "@blocklet/pages-kit/utils/style";
14
14
  import "@emotion/css";
15
15
  import "lodash/without";
16
- import { red as Ie, pink as Te, purple as Re, indigo as Se, blue as ze, cyan as Ee, teal as Pe, green as Me, lime as _e, yellow as Ae, amber as Le, orange as Oe, brown as Ne, grey as je, blueGrey as Be } from "@mui/material/colors";
16
+ import { red as Te, pink as Re, purple as Se, indigo as ze, blue as Pe, cyan as Me, teal as Ee, green as _e, lime as Le, yellow as Ae, amber as Oe, orange as Ne, brown as je, grey as Be, blueGrey as De } from "@mui/material/colors";
17
17
  import "@blocklet/pages-kit/builtin/uploader";
18
18
  import "react-use";
19
19
  import "lodash/cloneDeep";
20
20
  import "@dnd-kit/core";
21
21
  import "@dnd-kit/sortable";
22
22
  import "@mui/icons-material";
23
+ import { joinURL as Ge } from "ufo";
23
24
  import "@dnd-kit/utilities";
24
25
  import "@blocklet/pages-kit/contexts/color";
25
26
  import "@mui/lab";
@@ -31,29 +32,28 @@ import "is-uri";
31
32
  import "@arcblock/ux/lib/Toast";
32
33
  import "@mui/material/Tooltip";
33
34
  import "@mui/icons-material/KeyboardArrowLeft";
34
- import De from "@mui/material/Box";
35
+ import $e from "@mui/material/Box";
35
36
  import "@mui/material/DialogTitle";
36
37
  import "@mui/material/IconButton";
37
38
  import "@mui/material/Dialog";
38
39
  import "@mui/material/useMediaQuery";
39
- import { css as Ge } from "@emotion/react";
40
+ import { css as Fe } from "@emotion/react";
40
41
  import "@mui/material/Alert";
41
42
  import "@mui/material/AlertTitle";
42
43
  import "react-error-boundary";
43
- import "ufo";
44
44
  import "lodash/isEmpty";
45
45
  import "yaml";
46
46
  import "@mui/material/Typography";
47
47
  import "joi";
48
- import { createStatusApi as U, createTextCompletionApi as $e } from "@blocklet/aigne-hub/api";
49
- import { createFetch as Fe } from "@blocklet/js-sdk";
48
+ import { createStatusApi as U, createTextCompletionApi as He } from "@blocklet/aigne-hub/api";
49
+ import { createFetch as We } from "@blocklet/js-sdk";
50
50
  import "@mui/x-date-pickers";
51
51
  import "@mui/x-date-pickers/AdapterDayjs";
52
52
  import "@mui/x-date-pickers/LocalizationProvider";
53
53
  import "circular-natal-horoscope-js/dist";
54
- import X from "dayjs";
55
- import He from "dayjs/plugin/timezone";
56
- import We from "dayjs/plugin/utc";
54
+ import K from "dayjs";
55
+ import Qe from "dayjs/plugin/timezone";
56
+ import Ve from "dayjs/plugin/utc";
57
57
  import "fast-deep-equal";
58
58
  import "lodash/isNil";
59
59
  import "tz-lookup";
@@ -61,14 +61,14 @@ import "@mui/icons-material/CheckCircleOutline";
61
61
  import "lodash/uniq";
62
62
  import "lodash/get";
63
63
  import "lodash/set";
64
- import { nextId as Y } from "@blocklet/pages-kit/utils/common";
65
- import { CustomComponentRenderer as Qe } from "@blocklet/pages-kit/components";
66
- Ie[300], Te[300], Re[300], // deepPurple['300'],
67
- Se[300], ze[300], // lightBlue['300'],
68
- Ee[300], Pe[300], Me[300], // lightGreen['300'],
69
- _e[300], Ae[300], Le[300], Oe[300], // deepOrange['300'],
70
- Ne[300], je[300], Be[300];
71
- g(n)`
64
+ import { nextId as X } from "@blocklet/pages-kit/utils/common";
65
+ import { CustomComponentRenderer as Ue } from "@blocklet/pages-kit/components";
66
+ Te[300], Re[300], Se[300], // deepPurple['300'],
67
+ ze[300], Pe[300], // lightBlue['300'],
68
+ Me[300], Ee[300], _e[300], // lightGreen['300'],
69
+ Le[300], Ae[300], Oe[300], Ne[300], // deepOrange['300'],
70
+ je[300], Be[300], De[300];
71
+ b(n)`
72
72
  .color-item {
73
73
  position: relative;
74
74
  }
@@ -175,7 +175,7 @@ H(n)(({ theme: e }) => ({
175
175
  padding: e.spacing(0.5),
176
176
  opacity: 0,
177
177
  transition: "opacity 0.2s ease",
178
- backgroundColor: ne(e.palette.background.paper, 0.8),
178
+ backgroundColor: ae(e.palette.background.paper, 0.8),
179
179
  backdropFilter: "blur(2px)",
180
180
  borderRadius: e.spacing(0.5),
181
181
  margin: `auto ${e.spacing(0.5)}`,
@@ -231,7 +231,7 @@ H(n)`
231
231
  transform: translateY(-50%);
232
232
  }
233
233
  `;
234
- const Ve = _({ embed: !1 }), { Provider: dt } = Ve;
234
+ const Ke = _({ embed: !1 }), { Provider: ft } = Ke;
235
235
  _(void 0);
236
236
  U({
237
237
  axios: D,
@@ -241,13 +241,13 @@ U({
241
241
  axios: D,
242
242
  path: "/api/ai/agent-status"
243
243
  });
244
- $e({
245
- fetch: Fe(),
244
+ He({
245
+ fetch: We(),
246
246
  path: "/api/ai/completions"
247
247
  });
248
- X.extend(We);
249
- X.extend(He);
250
- g(n)`
248
+ K.extend(Ve);
249
+ K.extend(Qe);
250
+ b(n)`
251
251
  flex-grow: 1;
252
252
  display: flex;
253
253
  flex-direction: column;
@@ -352,7 +352,7 @@ g(n)`
352
352
  }
353
353
  `;
354
354
  _({});
355
- g(n)`
355
+ b(n)`
356
356
  display: flex;
357
357
  flex-direction: column;
358
358
  flex: 1;
@@ -365,7 +365,7 @@ g(n)`
365
365
  }
366
366
  }
367
367
  `;
368
- g(n)`
368
+ b(n)`
369
369
  background: #fbfbfb;
370
370
  border: 1px solid #f6f6f6;
371
371
  border-radius: 4px;
@@ -387,7 +387,7 @@ g(n)`
387
387
  cursor: pointer;
388
388
  }
389
389
  `;
390
- g(De)`
390
+ b($e)`
391
391
  background: #f6f2ff;
392
392
  margin-bottom: 20px;
393
393
 
@@ -408,7 +408,7 @@ g(De)`
408
408
  margin-top: 4px;
409
409
  }
410
410
  `;
411
- g(n)`
411
+ b(n)`
412
412
  display: block;
413
413
  padding: 16px;
414
414
  text-decoration: none;
@@ -439,12 +439,12 @@ g(n)`
439
439
  overflow: hidden;
440
440
  }
441
441
  `;
442
- Ge`
442
+ Fe`
443
443
  .MuiMenu-root {
444
444
  z-index: 13010 !important;
445
445
  }
446
446
  `;
447
- g(n)`
447
+ b(n)`
448
448
  display: flex;
449
449
  flex-direction: column;
450
450
  flex: 1;
@@ -457,7 +457,7 @@ g(n)`
457
457
  }
458
458
  }
459
459
  `;
460
- g(n)`
460
+ b(n)`
461
461
  background: #fbfbfb;
462
462
  border: 1px solid #f6f6f6;
463
463
  border-radius: 4px;
@@ -481,7 +481,7 @@ g(n)`
481
481
  cursor: pointer;
482
482
  }
483
483
  `;
484
- g(n)`
484
+ b(n)`
485
485
  > .ai-button {
486
486
  display: none;
487
487
  z-index: 1;
@@ -500,7 +500,7 @@ g(n)`
500
500
  }
501
501
  }
502
502
  `;
503
- g(n)`
503
+ b(n)`
504
504
  > .language-button {
505
505
  display: none;
506
506
  z-index: 1;
@@ -519,7 +519,7 @@ g(n)`
519
519
  }
520
520
  }
521
521
  `;
522
- g(n)`
522
+ b(n)`
523
523
  position: relative;
524
524
 
525
525
  .action {
@@ -543,8 +543,8 @@ g(n)`
543
543
  }
544
544
  }
545
545
  `;
546
- Y();
547
- const Ue = {
546
+ X();
547
+ const Xe = J("pages-kit"), Ye = {
548
548
  type: "default",
549
549
  title: "Section CardList",
550
550
  description: "This is Section CardList",
@@ -559,14 +559,14 @@ const Ue = {
559
559
  padding: "normal",
560
560
  list: [
561
561
  {
562
- id: Y(),
562
+ id: X(),
563
563
  title: "Simplified Service Delivery",
564
564
  description: "Block Server's Service Gateway makes networking easy with access to load balancing, SSL termination, automatic and customizable URL mapping, and redirects.",
565
- image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png"
565
+ image: Ge(Xe, "/static/assets/builder.png")
566
566
  }
567
567
  ]
568
568
  };
569
- function Xe({
569
+ function qe({
570
570
  componentId: e,
571
571
  locale: c,
572
572
  components: d
@@ -576,14 +576,14 @@ function Xe({
576
576
  config: { defaultLocale: l }
577
577
  },
578
578
  localState: { customComponentPreviewerProperties: v }
579
- } = G(), i = J(), x = d || i, u = x?.[e], p = u?.data ?? (u && typeof u == "object" && "component" in u ? u.component : void 0), f = p?.renderer;
579
+ } = G(), i = Z(), x = d || i, u = x?.[e], p = u?.data ?? (u && typeof u == "object" && "component" in u ? u.component : void 0), f = p?.renderer;
580
580
  if (f?.type === "component-template" && p) {
581
- const b = Z(p, f), a = c || l || "en", t = ee();
582
- return /* @__PURE__ */ o(ye, { page: b, defaultLocale: l, currentLocale: a, children: /* @__PURE__ */ o(ve, { children: /* @__PURE__ */ o(ae, { spacing: 2, sx: { p: 1 }, children: b.sectionIds.map((h, y) => {
583
- const m = b.sections[h];
581
+ const g = ee(p, f), a = c || l || "en", t = oe();
582
+ return /* @__PURE__ */ o(ve, { page: g, defaultLocale: l, currentLocale: a, children: /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(se, { spacing: 2, sx: { p: 1 }, children: g.sectionIds.map((h, y) => {
583
+ const m = g.sections[h];
584
584
  if (!m || m.visibility === "hidden")
585
585
  return null;
586
- const S = b.dataSource?.[m.id]?.[a] ?? (l ? b.dataSource?.[m.id]?.[l] : void 0) ?? {}, C = m.properties ?? {};
586
+ const S = g.dataSource?.[m.id]?.[a] ?? (l ? g.dataSource?.[m.id]?.[l] : void 0) ?? {}, C = m.properties ?? {};
587
587
  return /* @__PURE__ */ o(
588
588
  V,
589
589
  {
@@ -602,7 +602,7 @@ function Xe({
602
602
  projectId: t
603
603
  }
604
604
  },
605
- page: b,
605
+ page: g,
606
606
  renderIndex: y
607
607
  },
608
608
  m.id
@@ -610,7 +610,7 @@ function Xe({
610
610
  }) }) }) });
611
611
  }
612
612
  return /* @__PURE__ */ o(
613
- Qe,
613
+ Ue,
614
614
  {
615
615
  componentId: e,
616
616
  locale: c,
@@ -623,7 +623,7 @@ function Xe({
623
623
  }
624
624
  );
625
625
  }
626
- const j = 260, Ye = 5, K = "IGNORE_RENDER_BLOCKLET_TITLE", B = (e, c) => e ? Object.entries(e).map(([d, l]) => ({
626
+ const j = 260, Je = 5, Y = "IGNORE_RENDER_BLOCKLET_TITLE", B = (e, c) => e ? Object.entries(e).map(([d, l]) => ({
627
627
  id: d,
628
628
  component: d,
629
629
  name: l?.data?.name || l?.component?.name || d,
@@ -632,26 +632,26 @@ const j = 260, Ye = 5, K = "IGNORE_RENDER_BLOCKLET_TITLE", B = (e, c) => e ? Obj
632
632
  type: c,
633
633
  blockletId: l?.blockletId,
634
634
  blockletTitle: l?.blockletTitle
635
- })) : [], Ke = [
635
+ })) : [], Ze = [
636
636
  {
637
637
  id: "section",
638
638
  name: "Section",
639
- properties: Ce
639
+ properties: ke
640
640
  },
641
641
  {
642
642
  id: "section-card-list",
643
643
  name: "Section Card List",
644
- properties: Ue
644
+ properties: Ye
645
645
  },
646
646
  {
647
647
  id: "toc",
648
648
  name: "Toc",
649
- properties: ke
649
+ properties: we
650
650
  },
651
651
  {
652
652
  id: "iframe",
653
653
  name: "Embed",
654
- properties: we
654
+ properties: Ie
655
655
  },
656
656
  {
657
657
  id: "layout-block",
@@ -659,7 +659,7 @@ const j = 260, Ye = 5, K = "IGNORE_RENDER_BLOCKLET_TITLE", B = (e, c) => e ? Obj
659
659
  properties: {}
660
660
  }
661
661
  ].map((e) => ({ ...e, type: "basic", component: e.id }));
662
- function mt({
662
+ function gt({
663
663
  state: e,
664
664
  open: c,
665
665
  onClose: d,
@@ -670,27 +670,27 @@ function mt({
670
670
  components: u,
671
671
  multiple: p = !1,
672
672
  defaultSelected: f,
673
- emptyText: b
673
+ emptyText: g
674
674
  }) {
675
675
  const { t: a } = F(), t = Q({
676
676
  selectedComponent: null,
677
677
  activeTab: v,
678
678
  searchQuery: ""
679
- }), h = P(() => x || [
679
+ }), h = M(() => x || [
680
680
  {
681
681
  name: "basic",
682
682
  label: a("maker.components.basicGroup"),
683
- components: Ke
683
+ components: Ze
684
684
  },
685
685
  e && {
686
686
  name: "custom",
687
687
  label: a("maker.components.customGroup"),
688
- components: B(oe(e), "custom")
688
+ components: B(te(e), "custom")
689
689
  },
690
690
  e && {
691
691
  name: "resource",
692
692
  label: a("maker.components.resourceGroup"),
693
- components: B(te(e), "resource")
693
+ components: B(re(e), "resource")
694
694
  }
695
695
  ].filter(Boolean), [x, a, e, c]), y = t.activeTab || h[0]?.name, m = () => {
696
696
  t.selectedComponent && (l(t.selectedComponent), d());
@@ -706,16 +706,16 @@ function mt({
706
706
  } else
707
707
  t.selectedComponent = r;
708
708
  }
709
- }, C = (r) => t.selectedComponent ? p ? t.selectedComponent.some((s) => s.id === r.id) : t.selectedComponent.id === r.id : !1, I = h?.length === 0, T = P(() => {
709
+ }, C = (r) => t.selectedComponent ? p ? t.selectedComponent.some((s) => s.id === r.id) : t.selectedComponent.id === r.id : !1, I = h?.length === 0, T = M(() => {
710
710
  const r = h.find((s) => s?.name === y)?.components || [];
711
711
  return t.searchQuery ? r.filter((s) => s.name.toLowerCase().includes(t.searchQuery.toLowerCase())) : r;
712
712
  }, [y, h, t.searchQuery]);
713
- M(() => {
713
+ E(() => {
714
714
  t.searchQuery = "", c && f ? t.selectedComponent = p ? Array.isArray(f) ? f : [f] : f : t.selectedComponent = null;
715
715
  }, [c, f, p]);
716
- const R = T?.length === 0, A = b || a(y === "resource" ? "maker.components.needAddResource" : "maker.components.noComponents"), q = P(() => T ? T.reduce(
716
+ const R = T?.length === 0, L = g || a(y === "resource" ? "maker.components.needAddResource" : "maker.components.noComponents"), q = M(() => T ? T.reduce(
717
717
  (r, s) => {
718
- const k = s.blockletId || K, z = s.blockletTitle || a("maker.components.defaultGroup");
718
+ const k = s.blockletId || Y, z = s.blockletTitle || a("maker.components.defaultGroup");
719
719
  return r[k] || (r[k] = {
720
720
  title: z,
721
721
  components: []
@@ -724,7 +724,7 @@ function mt({
724
724
  {}
725
725
  ) : {}, [T]);
726
726
  return /* @__PURE__ */ w(
727
- se,
727
+ le,
728
728
  {
729
729
  open: c,
730
730
  onClose: d,
@@ -741,10 +741,10 @@ function mt({
741
741
  }
742
742
  },
743
743
  children: [
744
- /* @__PURE__ */ w(le, { className: "between", sx: { display: "flex", gap: 2 }, children: [
744
+ /* @__PURE__ */ w(pe, { className: "between", sx: { display: "flex", gap: 2 }, children: [
745
745
  /* @__PURE__ */ o(n, { children: i || a("maker.components.addComponent") }),
746
746
  /* @__PURE__ */ o(
747
- pe,
747
+ ce,
748
748
  {
749
749
  size: "small",
750
750
  placeholder: a("maker.components.searchComponent"),
@@ -754,7 +754,7 @@ function mt({
754
754
  slotProps: {
755
755
  input: {
756
756
  startAdornment: /* @__PURE__ */ o(
757
- L,
757
+ A,
758
758
  {
759
759
  icon: "tabler:search",
760
760
  style: {
@@ -766,10 +766,10 @@ function mt({
766
766
  }
767
767
  }
768
768
  ),
769
- /* @__PURE__ */ o(ce, { size: "small", onClick: d, children: /* @__PURE__ */ o(n, { component: L, icon: "tabler:x", sx: { color: "text.primary" } }) })
769
+ /* @__PURE__ */ o(de, { size: "small", onClick: d, children: /* @__PURE__ */ o(n, { component: A, icon: "tabler:x", sx: { color: "text.primary" } }) })
770
770
  ] }),
771
771
  /* @__PURE__ */ w(
772
- de,
772
+ me,
773
773
  {
774
774
  sx: {
775
775
  display: "flex",
@@ -780,7 +780,7 @@ function mt({
780
780
  },
781
781
  children: [
782
782
  !I && /* @__PURE__ */ o(n, { sx: { width: 150, borderRight: 1, borderColor: "divider" }, children: /* @__PURE__ */ o(
783
- me,
783
+ ue,
784
784
  {
785
785
  orientation: "vertical",
786
786
  value: y,
@@ -794,7 +794,7 @@ function mt({
794
794
  px: 2
795
795
  }
796
796
  },
797
- children: h.map((r, s) => /* @__PURE__ */ o(ue, { label: r?.label, value: r?.name }, s))
797
+ children: h.map((r, s) => /* @__PURE__ */ o(fe, { label: r?.label, value: r?.name }, s))
798
798
  }
799
799
  ) }),
800
800
  /* @__PURE__ */ o(
@@ -806,8 +806,8 @@ function mt({
806
806
  overflowY: "auto",
807
807
  pr: 1
808
808
  },
809
- children: R ? /* @__PURE__ */ o($, { children: A }) : /* @__PURE__ */ o(
810
- Je,
809
+ children: R ? /* @__PURE__ */ o($, { children: L }) : /* @__PURE__ */ o(
810
+ oo,
811
811
  {
812
812
  wrapperComponent: O,
813
813
  wrapperComponentProps: {
@@ -818,7 +818,7 @@ function mt({
818
818
  } : {}
819
819
  },
820
820
  groups: q,
821
- emptyText: A,
821
+ emptyText: L,
822
822
  renderItem: (r) => {
823
823
  const s = C(r);
824
824
  return /* @__PURE__ */ o(
@@ -871,7 +871,7 @@ function mt({
871
871
  lg: 4
872
872
  },
873
873
  children: /* @__PURE__ */ w(
874
- fe,
874
+ ge,
875
875
  {
876
876
  className: "add-component-card",
877
877
  sx: {
@@ -891,7 +891,7 @@ function mt({
891
891
  position: "relative"
892
892
  },
893
893
  children: /* @__PURE__ */ o(
894
- qe,
894
+ eo,
895
895
  {
896
896
  components: u,
897
897
  containerHeight: j,
@@ -902,7 +902,7 @@ function mt({
902
902
  }
903
903
  ),
904
904
  /* @__PURE__ */ o(
905
- ge,
905
+ xe,
906
906
  {
907
907
  sx: {
908
908
  bgcolor: "background.paper",
@@ -922,7 +922,7 @@ function mt({
922
922
  )
923
923
  }
924
924
  ),
925
- /* @__PURE__ */ o(n, { className: "check-container", children: /* @__PURE__ */ o(ie, { className: "check-icon" }) })
925
+ /* @__PURE__ */ o(n, { className: "check-container", children: /* @__PURE__ */ o(ne, { className: "check-icon" }) })
926
926
  ]
927
927
  }
928
928
  )
@@ -938,7 +938,7 @@ function mt({
938
938
  }
939
939
  ),
940
940
  /* @__PURE__ */ w(
941
- xe,
941
+ he,
942
942
  {
943
943
  sx: {
944
944
  borderTop: 1,
@@ -963,7 +963,7 @@ function mt({
963
963
  }
964
964
  );
965
965
  }
966
- function qe({
966
+ function eo({
967
967
  containerHeight: e,
968
968
  component: c,
969
969
  minScale: d = 0.1,
@@ -974,8 +974,8 @@ function qe({
974
974
  shouldScroll: !1,
975
975
  isVisible: !1,
976
976
  hadInit: !1
977
- }), { currentPage: x } = G(), u = E(null), p = E(null), f = E(0), b = E(null);
978
- M(() => {
977
+ }), { currentPage: x } = G(), u = P(null), p = P(null), f = P(0), g = P(null);
978
+ E(() => {
979
979
  const C = new IntersectionObserver(
980
980
  ([I]) => {
981
981
  i.isVisible = I.isIntersecting;
@@ -987,9 +987,9 @@ function qe({
987
987
  }
988
988
  );
989
989
  return p.current && C.observe(p.current), () => C.disconnect();
990
- }, []), M(() => {
990
+ }, []), E(() => {
991
991
  const C = () => {
992
- if (f.current += 1, f.current > Ye) {
992
+ if (f.current += 1, f.current > Je) {
993
993
  I.disconnect();
994
994
  return;
995
995
  }
@@ -997,7 +997,7 @@ function qe({
997
997
  const T = u.current.scrollHeight, R = e / T;
998
998
  R < d ? (i.scale = d, i.shouldScroll = !0) : R < 1 ? (i.scale = R, i.shouldScroll = !1) : (i.scale = 1, i.shouldScroll = !1);
999
999
  }
1000
- b.current && clearTimeout(b.current), b.current = setTimeout(() => {
1000
+ g.current && clearTimeout(g.current), g.current = setTimeout(() => {
1001
1001
  i.hadInit = !0;
1002
1002
  }, 200);
1003
1003
  }, I = new ResizeObserver(() => {
@@ -1007,12 +1007,12 @@ function qe({
1007
1007
  I.disconnect();
1008
1008
  };
1009
1009
  }, [e, d, i.isVisible, c]);
1010
- const { id: a, type: t, component: h, properties: y, previewImage: m } = c, S = P(() => i.isVisible ? m ? /* @__PURE__ */ o(
1010
+ const { id: a, type: t, component: h, properties: y, previewImage: m } = c, S = M(() => i.isVisible ? m ? /* @__PURE__ */ o(
1011
1011
  n,
1012
1012
  {
1013
1013
  component: "img",
1014
1014
  loading: "lazy",
1015
- src: re(m),
1015
+ src: ie(m),
1016
1016
  alt: c.name,
1017
1017
  sx: {
1018
1018
  width: "100%",
@@ -1040,7 +1040,7 @@ function qe({
1040
1040
  page: x
1041
1041
  },
1042
1042
  a
1043
- ) : /* @__PURE__ */ o(Xe, { componentId: a, locale: v, components: l }, a) : null, [a, t, h, y, v, m, i.isVisible]);
1043
+ ) : /* @__PURE__ */ o(qe, { componentId: a, locale: v, components: l }, a) : null, [a, t, h, y, v, m, i.isVisible]);
1044
1044
  return /* @__PURE__ */ o(
1045
1045
  n,
1046
1046
  {
@@ -1063,7 +1063,7 @@ function qe({
1063
1063
  height: i.hadInit && i.shouldScroll ? "100%" : `${100 / i.scale}%`
1064
1064
  },
1065
1065
  children: [
1066
- !i.hadInit && /* @__PURE__ */ o(he, { variant: "rectangular", width: "100%", height: "100%" }),
1066
+ !i.hadInit && /* @__PURE__ */ o(ye, { variant: "rectangular", width: "100%", height: "100%" }),
1067
1067
  /* @__PURE__ */ o(
1068
1068
  n,
1069
1069
  {
@@ -1083,7 +1083,7 @@ function qe({
1083
1083
  }
1084
1084
  );
1085
1085
  }
1086
- function Je({
1086
+ function oo({
1087
1087
  groups: e,
1088
1088
  emptyText: c,
1089
1089
  renderItem: d,
@@ -1101,7 +1101,7 @@ function Je({
1101
1101
  mb: 3
1102
1102
  },
1103
1103
  children: [
1104
- i !== K && /* @__PURE__ */ w(
1104
+ i !== Y && /* @__PURE__ */ w(
1105
1105
  W,
1106
1106
  {
1107
1107
  className: "blocklet-title",
@@ -1139,10 +1139,10 @@ function Je({
1139
1139
  )) : /* @__PURE__ */ o($, { children: c }) });
1140
1140
  }
1141
1141
  export {
1142
- mt as AddComponent,
1143
- qe as AutoScaledComponentRenderer,
1144
- Ke as BASIC_COMPONENT_LIST,
1145
- Je as GroupedComponentsList,
1146
- mt as default,
1142
+ gt as AddComponent,
1143
+ eo as AutoScaledComponentRenderer,
1144
+ Ze as BASIC_COMPONENT_LIST,
1145
+ oo as GroupedComponentsList,
1146
+ gt as default,
1147
1147
  B as formatComponent
1148
1148
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { u as a, S as o, g as s, a as n } from "./state-qDCrgEMQ.js";
2
+ import { u as a, S as o, g as s, a as n } from "./state-CMRCtF-D.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 }) });
@@ -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-qDCrgEMQ.js";
2
+ import { u as U, c as W, d as se, e as ie, f as le, b as ce } from "./state-CMRCtF-D.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";
@@ -21,7 +21,7 @@ import { Helmet as Ce } from "react-helmet";
21
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 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-Dci_IgHn.js";
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-BZ1MijZ6.js";
25
25
  import _e from "@blocklet/ui-react/lib/Footer";
26
26
  import "webfontloader";
27
27
  import { u as De, a as Fe } from "./session-Dx5M-1r2.js";
@@ -149,7 +149,7 @@ function qe({ mode: t }) {
149
149
  }
150
150
  return /* @__PURE__ */ e(Ye, { children: ({ state: o }) => /* @__PURE__ */ e(O, { mode: t, state: o }) });
151
151
  }
152
- const Ke = J(() => import("./publish-button-CtlD3O0E.js")), Ye = J(() => import("./draft-data-DRdPzuGm.js"));
152
+ const Ke = J(() => import("./publish-button-BO4u_Nxb.js")), Ye = J(() => import("./draft-data-fMhhz4sh.js"));
153
153
  function Qe({
154
154
  mode: t,
155
155
  children: o