@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.
- package/lib/cjs/add-component.js +13 -13
- package/lib/cjs/chunks/{draft-data-e1KnFlxv.js → draft-data-BYzGfJ7S.js} +1 -1
- package/lib/cjs/chunks/{home-BTdS1u5a.js → home-FbBl1G79.js} +2 -2
- package/lib/cjs/chunks/{index-DoTEfRgc.js → index-B-TdKJtn.js} +20 -20
- package/lib/cjs/chunks/{publish-button-JfvmgBSI.js → publish-button-JUoM34Aa.js} +1 -1
- package/lib/cjs/chunks/site-state-oC_X_C59.js +1 -0
- package/lib/cjs/chunks/state-BBnuCgyl.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +2 -2
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +1 -1
- package/lib/cjs/site-state.js +1 -1
- package/lib/es/add-component.js +102 -102
- package/lib/es/chunks/{draft-data-DRdPzuGm.js → draft-data-fMhhz4sh.js} +1 -1
- package/lib/es/chunks/{home-D3e7ljVw.js → home-BujeKjPf.js} +3 -3
- package/lib/es/chunks/{index-Dci_IgHn.js → index-BZ1MijZ6.js} +297 -297
- package/lib/es/chunks/{publish-button-CtlD3O0E.js → publish-button-BO4u_Nxb.js} +3 -3
- package/lib/es/chunks/{site-state-NvsHZBJX.js → site-state-D8_lRJeG.js} +510 -494
- package/lib/es/chunks/{state-qDCrgEMQ.js → state-CMRCtF-D.js} +47 -42
- package/lib/es/home.js +3 -3
- package/lib/es/locales.js +2 -0
- package/lib/es/resources.js +1 -1
- package/lib/es/setting.js +1 -1
- package/lib/es/site-state.js +1 -1
- package/package.json +3 -3
- package/lib/cjs/chunks/site-state-B_SwLwSW.js +0 -1
- package/lib/cjs/chunks/state-DU3L5Lve.js +0 -1
package/lib/es/add-component.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import { i as D,
|
|
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
|
|
6
|
-
import
|
|
7
|
-
import { Box as n, styled as H, alpha as
|
|
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
|
|
10
|
-
import { a as
|
|
11
|
-
import { styled as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
49
|
-
import { createFetch as
|
|
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
|
|
55
|
-
import
|
|
56
|
-
import
|
|
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
|
|
65
|
-
import { CustomComponentRenderer as
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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:
|
|
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
|
|
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
|
-
|
|
245
|
-
fetch:
|
|
244
|
+
He({
|
|
245
|
+
fetch: We(),
|
|
246
246
|
path: "/api/ai/completions"
|
|
247
247
|
});
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
442
|
+
Fe`
|
|
443
443
|
.MuiMenu-root {
|
|
444
444
|
z-index: 13010 !important;
|
|
445
445
|
}
|
|
446
446
|
`;
|
|
447
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
547
|
-
const
|
|
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:
|
|
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: "
|
|
565
|
+
image: Ge(Xe, "/static/assets/builder.png")
|
|
566
566
|
}
|
|
567
567
|
]
|
|
568
568
|
};
|
|
569
|
-
function
|
|
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 =
|
|
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
|
|
582
|
-
return /* @__PURE__ */ o(
|
|
583
|
-
const m =
|
|
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 =
|
|
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:
|
|
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
|
-
|
|
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,
|
|
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
|
-
})) : [],
|
|
635
|
+
})) : [], Ze = [
|
|
636
636
|
{
|
|
637
637
|
id: "section",
|
|
638
638
|
name: "Section",
|
|
639
|
-
properties:
|
|
639
|
+
properties: ke
|
|
640
640
|
},
|
|
641
641
|
{
|
|
642
642
|
id: "section-card-list",
|
|
643
643
|
name: "Section Card List",
|
|
644
|
-
properties:
|
|
644
|
+
properties: Ye
|
|
645
645
|
},
|
|
646
646
|
{
|
|
647
647
|
id: "toc",
|
|
648
648
|
name: "Toc",
|
|
649
|
-
properties:
|
|
649
|
+
properties: we
|
|
650
650
|
},
|
|
651
651
|
{
|
|
652
652
|
id: "iframe",
|
|
653
653
|
name: "Embed",
|
|
654
|
-
properties:
|
|
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
|
|
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:
|
|
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 =
|
|
679
|
+
}), h = M(() => x || [
|
|
680
680
|
{
|
|
681
681
|
name: "basic",
|
|
682
682
|
label: a("maker.components.basicGroup"),
|
|
683
|
-
components:
|
|
683
|
+
components: Ze
|
|
684
684
|
},
|
|
685
685
|
e && {
|
|
686
686
|
name: "custom",
|
|
687
687
|
label: a("maker.components.customGroup"),
|
|
688
|
-
components: B(
|
|
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(
|
|
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 =
|
|
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
|
-
|
|
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,
|
|
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 ||
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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:
|
|
810
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
|
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 =
|
|
978
|
-
|
|
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
|
-
}, []),
|
|
990
|
+
}, []), E(() => {
|
|
991
991
|
const C = () => {
|
|
992
|
-
if (f.current += 1, f.current >
|
|
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
|
-
|
|
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 =
|
|
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:
|
|
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(
|
|
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(
|
|
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
|
|
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 !==
|
|
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
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|