@blocklet/list 0.16.42 → 0.16.44
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/index.es.js +137 -136
- package/package.json +4 -4
package/lib/index.es.js
CHANGED
|
@@ -38,31 +38,32 @@ import It from "@iconify-icons/tabler/cloud-download";
|
|
|
38
38
|
import Bt from "@mui/icons-material/ChevronLeft";
|
|
39
39
|
import Rt from "@mui/icons-material/ChevronRight";
|
|
40
40
|
import L from "@mui/material/Skeleton";
|
|
41
|
-
import
|
|
41
|
+
import Tt from "react-image-gallery";
|
|
42
42
|
import "react-image-gallery/styles/css/image-gallery.css";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
43
|
+
import Te from "@mui/material/Grid";
|
|
44
|
+
import Pt from "react-infinite-scroll-hook";
|
|
45
45
|
import At from "@iconify-icons/tabler/square";
|
|
46
46
|
import Et from "@iconify-icons/tabler/square-check-filled";
|
|
47
|
-
import
|
|
47
|
+
import Pe from "@mui/material/Chip";
|
|
48
|
+
import { useTheme as Ot } from "@mui/material/styles";
|
|
48
49
|
import te from "@mui/icons-material/Search";
|
|
49
|
-
import
|
|
50
|
-
import
|
|
50
|
+
import Ft from "@mui/material/Autocomplete";
|
|
51
|
+
import Lt from "@mui/material/Dialog";
|
|
51
52
|
import Ue from "@mui/material/OutlinedInput";
|
|
52
|
-
import
|
|
53
|
-
import { useHotkeys as
|
|
53
|
+
import _t from "@mui/material/TextField";
|
|
54
|
+
import { useHotkeys as Mt } from "react-hotkeys-hook";
|
|
54
55
|
import Ae from "@mui/material/InputAdornment";
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import { Card as
|
|
59
|
-
import
|
|
56
|
+
import zt from "@arcblock/ux/lib/Empty";
|
|
57
|
+
import Dt from "json-stable-stringify";
|
|
58
|
+
import Nt from "@mui/icons-material/Menu";
|
|
59
|
+
import { Card as Wt, Box as ce, Skeleton as F } from "@mui/material";
|
|
60
|
+
import $t from "@arcblock/ux/lib/Img";
|
|
60
61
|
const Ve = _e({
|
|
61
62
|
open: !1,
|
|
62
63
|
toggleOpen: (e) => {
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
|
-
function
|
|
66
|
+
function jt({ children: e }) {
|
|
66
67
|
const [r, o] = E(!1), n = (a) => {
|
|
67
68
|
o(a ?? !a);
|
|
68
69
|
}, l = V(() => ({ open: r, toggleOpen: n }), [r]);
|
|
@@ -71,7 +72,7 @@ function $t({ children: e }) {
|
|
|
71
72
|
function Ce() {
|
|
72
73
|
return Me(Ve);
|
|
73
74
|
}
|
|
74
|
-
const
|
|
75
|
+
const P = {
|
|
75
76
|
nameAsc: "title",
|
|
76
77
|
nameDesc: "title",
|
|
77
78
|
popularity: "stats.downloads",
|
|
@@ -85,14 +86,14 @@ const T = {
|
|
|
85
86
|
explorePath: "/api/blocklets/explore",
|
|
86
87
|
exploreDidsPath: "/api/blocklets/dids",
|
|
87
88
|
cacheSize: 100
|
|
88
|
-
},
|
|
89
|
+
}, Ht = (e) => ne(
|
|
89
90
|
async () => {
|
|
90
|
-
const { data: r } = await e.get(
|
|
91
|
+
const { data: r } = await e.get(P.categoriesPath);
|
|
91
92
|
return Array.isArray(r) ? r : [];
|
|
92
93
|
},
|
|
93
94
|
{ manual: !0 }
|
|
94
95
|
);
|
|
95
|
-
function
|
|
96
|
+
function Ut(e, r) {
|
|
96
97
|
const o = e.menu ? {
|
|
97
98
|
sortBy: "popularity",
|
|
98
99
|
sortDirection: "desc",
|
|
@@ -151,7 +152,7 @@ function Ht(e, r) {
|
|
|
151
152
|
}
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
|
-
const
|
|
155
|
+
const Vt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
155
156
|
{
|
|
156
157
|
name: e("sort.popularity"),
|
|
157
158
|
value: "popularity"
|
|
@@ -176,17 +177,17 @@ const Ut = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
176
177
|
...i || m ? { imageFilter: "resize", w: i, h: m } : {},
|
|
177
178
|
v: s
|
|
178
179
|
});
|
|
179
|
-
},
|
|
180
|
+
}, Gt = (e) => [
|
|
180
181
|
{ name: e("blocklet.free"), value: "free" },
|
|
181
182
|
{ name: e("blocklet.payment"), value: "payment" }
|
|
182
|
-
],
|
|
183
|
+
], qt = (e = [], r = "en") => e.map((o) => ({ name: o.locales[r] || o.locales.en, value: o._id })), Kt = (e) => {
|
|
183
184
|
var r, o;
|
|
184
185
|
return Array.isArray(e) ? e.map((n) => n.message).join(`
|
|
185
186
|
`) : (o = (r = e.response) == null ? void 0 : r.data) != null && o.error ? e.response.data.error.message || e.response.data.error : e.message || e;
|
|
186
|
-
},
|
|
187
|
+
}, Xt = (e, r) => (
|
|
187
188
|
// eslint-disable-next-line no-prototype-builtins
|
|
188
189
|
e == null ? void 0 : e.replace(/{(\w*)}/g, (o, n) => r.hasOwnProperty(n) ? r[n] : "")
|
|
189
|
-
),
|
|
190
|
+
), Qt = () => window.innerWidth <= 600, Yt = {
|
|
190
191
|
common: {
|
|
191
192
|
title: "Blocklet Store",
|
|
192
193
|
searchStore: "Search Blocklet",
|
|
@@ -238,7 +239,7 @@ const Ut = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
238
239
|
autocomplete: {
|
|
239
240
|
expandResult: 'View all search results for "{name}"'
|
|
240
241
|
}
|
|
241
|
-
},
|
|
242
|
+
}, Zt = {
|
|
242
243
|
common: {
|
|
243
244
|
title: "Blocklet 商店",
|
|
244
245
|
searchStore: "搜索 Blocklet",
|
|
@@ -291,14 +292,14 @@ const Ut = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
291
292
|
expandResult: "查看 “{name}” 的所有搜索结果"
|
|
292
293
|
}
|
|
293
294
|
}, de = {
|
|
294
|
-
en: Re(
|
|
295
|
-
zh: Re(
|
|
295
|
+
en: Re(Yt),
|
|
296
|
+
zh: Re(Zt)
|
|
296
297
|
}, Ke = (e, r) => {
|
|
297
298
|
const o = {};
|
|
298
299
|
return e && (o["x-blocklet-server-version"] = e), r && (o["x-blocklet-store-version"] = r), o;
|
|
299
|
-
},
|
|
300
|
+
}, Jt = (e) => (r, o) => {
|
|
300
301
|
const n = de[e] ? de[e][r] : de.en[r];
|
|
301
|
-
return
|
|
302
|
+
return Xt(n, o) || r;
|
|
302
303
|
}, Xe = {
|
|
303
304
|
errors: {
|
|
304
305
|
fetchCategoriesError: null
|
|
@@ -354,8 +355,8 @@ const Ut = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
354
355
|
handlePage: () => {
|
|
355
356
|
}
|
|
356
357
|
}
|
|
357
|
-
}, Qe = _e(Xe), { Provider:
|
|
358
|
-
function
|
|
358
|
+
}, Qe = _e(Xe), { Provider: er, Consumer: Fo } = Qe;
|
|
359
|
+
function tr(e) {
|
|
359
360
|
const {
|
|
360
361
|
locale: r = "zh",
|
|
361
362
|
filters: o = {},
|
|
@@ -365,8 +366,8 @@ function er(e) {
|
|
|
365
366
|
minItemWidth: a = 350,
|
|
366
367
|
queryFilter: s = !0,
|
|
367
368
|
layout: i = {},
|
|
368
|
-
wrapChildren: m = (
|
|
369
|
-
extraFilter: d = (
|
|
369
|
+
wrapChildren: m = (T) => T,
|
|
370
|
+
extraFilter: d = (T) => T,
|
|
370
371
|
baseSearch: f = !1,
|
|
371
372
|
fetchCategoryDelay: u = 0,
|
|
372
373
|
showResourcesSwitch: g = !1,
|
|
@@ -379,15 +380,15 @@ function er(e) {
|
|
|
379
380
|
endpoint: C,
|
|
380
381
|
blockletRender: b,
|
|
381
382
|
compact: k = !1
|
|
382
|
-
} = e, A = Ke(n, B), z = V(() => ze({ baseURL: C, headers: A }), [C]), $ =
|
|
383
|
+
} = e, A = Ke(n, B), z = V(() => ze({ baseURL: C, headers: A }), [C]), $ = Ut(o, { onFilterChange: l, emptyCategory: !i.showExplore, onSearchSelect: p }), [D, q] = E(""), {
|
|
383
384
|
data: j = [],
|
|
384
385
|
error: ae,
|
|
385
386
|
loading: Y,
|
|
386
387
|
run: Z
|
|
387
|
-
} =
|
|
388
|
-
const
|
|
389
|
-
return _ > -1 ? [{ ...
|
|
390
|
-
}, [j]), K = ge(
|
|
388
|
+
} = Ht(z), H = V(() => {
|
|
389
|
+
const T = ot(j, [(W) => W.name], ["asc"]), _ = T.findIndex((W) => W.name === "All" || W.locales.en === "All");
|
|
390
|
+
return _ > -1 ? [{ ...T[_], _id: "All" }, ...T.slice(0, _), ...T.slice(_ + 1)] : T;
|
|
391
|
+
}, [j]), K = ge(Jt(r), [r]), c = V(() => qt(H, r), [H, r]), S = Gt(K), N = {
|
|
391
392
|
search: $,
|
|
392
393
|
compact: k,
|
|
393
394
|
errors: { fetchCategoriesError: ae },
|
|
@@ -420,9 +421,9 @@ function er(e) {
|
|
|
420
421
|
showCategory: y,
|
|
421
422
|
tagFilters: I,
|
|
422
423
|
onFilterChange: l,
|
|
423
|
-
getCategoryLocale: (
|
|
424
|
-
if (!
|
|
425
|
-
const _ = j.find((W) => W._id ===
|
|
424
|
+
getCategoryLocale: (T) => {
|
|
425
|
+
if (!T) return null;
|
|
426
|
+
const _ = j.find((W) => W._id === T || W.locales.en === "All");
|
|
426
427
|
return _ ? _.locales[r] || _.locales.en : null;
|
|
427
428
|
},
|
|
428
429
|
get developerName() {
|
|
@@ -432,7 +433,7 @@ function er(e) {
|
|
|
432
433
|
};
|
|
433
434
|
return G(() => {
|
|
434
435
|
setTimeout(Z, u || 0);
|
|
435
|
-
}, [C, Z, u]), /* @__PURE__ */ t(
|
|
436
|
+
}, [C, Z, u]), /* @__PURE__ */ t(er, { value: N, children: x });
|
|
436
437
|
}
|
|
437
438
|
function R() {
|
|
438
439
|
const e = Me(Qe);
|
|
@@ -485,7 +486,7 @@ function Se({
|
|
|
485
486
|
let u = e;
|
|
486
487
|
return i || (u = J(r, u), m) || (u = J(o, u), d) || (u = J(n, u), f) ? u : J(l, u);
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
+
function rr({ children: e }) {
|
|
489
490
|
const { open: r, toggleOpen: o } = Ce();
|
|
490
491
|
return /* @__PURE__ */ t(
|
|
491
492
|
Se,
|
|
@@ -495,7 +496,7 @@ function tr({ children: e }) {
|
|
|
495
496
|
}
|
|
496
497
|
);
|
|
497
498
|
}
|
|
498
|
-
const
|
|
499
|
+
const or = lt(({ loading: e, disabled: r, ...o }, n) => /* @__PURE__ */ t(
|
|
499
500
|
ie,
|
|
500
501
|
{
|
|
501
502
|
ref: n,
|
|
@@ -525,7 +526,7 @@ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
|
|
|
525
526
|
}
|
|
526
527
|
return /* @__PURE__ */ h(M, { children: [
|
|
527
528
|
/* @__PURE__ */ h(
|
|
528
|
-
|
|
529
|
+
nr,
|
|
529
530
|
{
|
|
530
531
|
ref: a,
|
|
531
532
|
onClick: y,
|
|
@@ -545,7 +546,7 @@ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
|
|
|
545
546
|
{
|
|
546
547
|
...p,
|
|
547
548
|
style: { transformOrigin: C === "bottom" ? "center top" : "center bottom" },
|
|
548
|
-
children: /* @__PURE__ */ t(vt, { children: /* @__PURE__ */ t(bt, { onClickAway: g, children: /* @__PURE__ */ t(
|
|
549
|
+
children: /* @__PURE__ */ t(vt, { children: /* @__PURE__ */ t(bt, { onClickAway: g, children: /* @__PURE__ */ t(ir, { autoFocusItem: i, onMouseEnter: y, onMouseLeave: g, children: r.map((b) => /* @__PURE__ */ h($e, { onClick: () => I(b), sx: { fontSize: 14 }, children: [
|
|
549
550
|
/* @__PURE__ */ t(
|
|
550
551
|
yt,
|
|
551
552
|
{
|
|
@@ -558,7 +559,7 @@ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
|
|
|
558
559
|
) })
|
|
559
560
|
] });
|
|
560
561
|
}
|
|
561
|
-
const
|
|
562
|
+
const nr = Q(or)`
|
|
562
563
|
border: 1px solid #f0f0f0;
|
|
563
564
|
padding: 6px 8px 6px 12px;
|
|
564
565
|
font-weight: ${(e) => e.theme.typography.fontWeightRegular};
|
|
@@ -586,7 +587,7 @@ const or = Q(rr)`
|
|
|
586
587
|
margin-right: 3px;
|
|
587
588
|
}
|
|
588
589
|
}
|
|
589
|
-
`,
|
|
590
|
+
`, ir = Q(je)`
|
|
590
591
|
.my-select__option__icon {
|
|
591
592
|
color: transparent;
|
|
592
593
|
font-size: 14px;
|
|
@@ -622,7 +623,7 @@ function Ze() {
|
|
|
622
623
|
{
|
|
623
624
|
checked: o.price === "free",
|
|
624
625
|
size: "small",
|
|
625
|
-
sx: { "& .MuiSvgIcon-fontSizeSmall": { fontSize: 16, color: "text.
|
|
626
|
+
sx: { "& .MuiSvgIcon-fontSizeSmall": { fontSize: 16, color: "text.hint" } },
|
|
626
627
|
onChange: (s) => l(s.target.checked ? "free" : "")
|
|
627
628
|
}
|
|
628
629
|
),
|
|
@@ -642,13 +643,13 @@ function Ze() {
|
|
|
642
643
|
}
|
|
643
644
|
);
|
|
644
645
|
}
|
|
645
|
-
function
|
|
646
|
+
function lr({ menus: e }) {
|
|
646
647
|
const { selectedCategory: r, search: o, t: n, categoryOptions: l, loadings: a, layout: s, baseSearch: i, compact: m } = R(), { filters: d, handleActiveMenu: f, handleCategory: u, cleanFilter: g } = o, { toggleOpen: y } = Ce();
|
|
647
648
|
G(() => {
|
|
648
649
|
y(!1);
|
|
649
650
|
}, [Object.values(d).join("")]);
|
|
650
|
-
const I =
|
|
651
|
-
return s.showCategory && !m ? /* @__PURE__ */ h(
|
|
651
|
+
const I = Vt(i, s.showSearch, d.keyword);
|
|
652
|
+
return s.showCategory && !m ? /* @__PURE__ */ h(rr, { children: [
|
|
652
653
|
/* @__PURE__ */ t(
|
|
653
654
|
Se,
|
|
654
655
|
{
|
|
@@ -688,7 +689,7 @@ function ir({ menus: e }) {
|
|
|
688
689
|
v,
|
|
689
690
|
{
|
|
690
691
|
variant: "body1",
|
|
691
|
-
color: !r && !d.menu ? "text.primary" : "text.
|
|
692
|
+
color: !r && !d.menu ? "text.primary" : "text.hint",
|
|
692
693
|
fontWeight: !r && !d.menu ? "fontWeightMedium" : void 0,
|
|
693
694
|
sx: { cursor: "pointer" },
|
|
694
695
|
onClick: () => {
|
|
@@ -704,7 +705,7 @@ function ir({ menus: e }) {
|
|
|
704
705
|
v,
|
|
705
706
|
{
|
|
706
707
|
variant: "body1",
|
|
707
|
-
color: d.menu === x.key ? "text.primary" : "text.
|
|
708
|
+
color: d.menu === x.key ? "text.primary" : "text.hint",
|
|
708
709
|
fontWeight: d.menu === x.key ? "fontWeightMedium" : void 0,
|
|
709
710
|
sx: { cursor: "pointer" },
|
|
710
711
|
onClick: () => {
|
|
@@ -723,7 +724,7 @@ function ir({ menus: e }) {
|
|
|
723
724
|
title: x.name,
|
|
724
725
|
sx: { cursor: "pointer" },
|
|
725
726
|
"data-cy": "filter",
|
|
726
|
-
color: r === x.value ? "text.primary" : "text.
|
|
727
|
+
color: r === x.value ? "text.primary" : "text.hint",
|
|
727
728
|
textTransform: "capitalize",
|
|
728
729
|
onClick: () => {
|
|
729
730
|
r === x.value ? g() : u(x.value), y(!1);
|
|
@@ -776,8 +777,8 @@ function Ee({
|
|
|
776
777
|
)
|
|
777
778
|
] });
|
|
778
779
|
}
|
|
779
|
-
const
|
|
780
|
-
function
|
|
780
|
+
const ar = 16 / 9, ue = 292, ye = 189, oe = 336;
|
|
781
|
+
function sr() {
|
|
781
782
|
var x, B;
|
|
782
783
|
const { t: e, search: r } = R(), { get: o } = Ie(), n = we(), l = U(n.breakpoints.down("md")), a = ((B = (x = window.blocklet) == null ? void 0 : x.preferences) == null ? void 0 : B.homeBanner) || [], {
|
|
783
784
|
data: s = [],
|
|
@@ -785,7 +786,7 @@ function ar() {
|
|
|
785
786
|
loading: m
|
|
786
787
|
} = ne(async () => {
|
|
787
788
|
const p = await o(
|
|
788
|
-
ve(
|
|
789
|
+
ve(P.blockletsPath, { didList: a.map((C) => C.did).join(",") })
|
|
789
790
|
);
|
|
790
791
|
return p != null && p.dataList ? a.map((C) => p.dataList.find((b) => b.did === C.did)) : [];
|
|
791
792
|
});
|
|
@@ -796,7 +797,7 @@ function ar() {
|
|
|
796
797
|
transform: "translateY(-50%)",
|
|
797
798
|
zIndex: 100,
|
|
798
799
|
cursor: "pointer",
|
|
799
|
-
color: "text.
|
|
800
|
+
color: "text.hint"
|
|
800
801
|
};
|
|
801
802
|
return !i && a.length > 0 ? /* @__PURE__ */ h(M, { children: [
|
|
802
803
|
/* @__PURE__ */ t(v, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
|
|
@@ -823,7 +824,7 @@ function ar() {
|
|
|
823
824
|
/* @__PURE__ */ t(L, { variant: "rounded", height: 30, width: 100 })
|
|
824
825
|
] })
|
|
825
826
|
] }) : /* @__PURE__ */ t(
|
|
826
|
-
|
|
827
|
+
Tt,
|
|
827
828
|
{
|
|
828
829
|
showNav: !0,
|
|
829
830
|
autoPlay: !0,
|
|
@@ -840,7 +841,7 @@ function ar() {
|
|
|
840
841
|
original: p.did,
|
|
841
842
|
renderItem: () => {
|
|
842
843
|
var z;
|
|
843
|
-
const b = s[C] || {}, k = p.cover ||
|
|
844
|
+
const b = s[C] || {}, k = p.cover || dr(p.did, (z = b.screenshots) == null ? void 0 : z[0]), A = qe(k, n.breakpoints.values.md * 2);
|
|
844
845
|
return /* @__PURE__ */ h(
|
|
845
846
|
O,
|
|
846
847
|
{
|
|
@@ -889,7 +890,7 @@ function ar() {
|
|
|
889
890
|
)
|
|
890
891
|
] }) : null;
|
|
891
892
|
function f(p) {
|
|
892
|
-
return /* @__PURE__ */ t(w, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md: oe }, children: /* @__PURE__ */ t(
|
|
893
|
+
return /* @__PURE__ */ t(w, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md: oe }, children: /* @__PURE__ */ t(ur, { url: p }) });
|
|
893
894
|
}
|
|
894
895
|
function u(p) {
|
|
895
896
|
return /* @__PURE__ */ t(v, { variant: "h2", width: "100%", children: p });
|
|
@@ -922,7 +923,7 @@ function ar() {
|
|
|
922
923
|
const { did: b, owner: k, stats: A } = p;
|
|
923
924
|
return /* @__PURE__ */ h(w, { display: "flex", alignItems: "center", gap: 2, color: "text.secondary", children: [
|
|
924
925
|
/* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(He, { src: k.avatar, did: b, size: 20, variant: "circle" }), children: k.fullName }),
|
|
925
|
-
/* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(X, { icon: It }), title: `${A.downloads + C}`, children:
|
|
926
|
+
/* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(X, { icon: It }), title: `${A.downloads + C}`, children: cr(A.downloads + C) })
|
|
926
927
|
] });
|
|
927
928
|
}
|
|
928
929
|
function I(p) {
|
|
@@ -945,8 +946,8 @@ function ar() {
|
|
|
945
946
|
);
|
|
946
947
|
}
|
|
947
948
|
}
|
|
948
|
-
const
|
|
949
|
-
function
|
|
949
|
+
const cr = (e) => Number.isNaN(e) ? 0 : e < 1e3 ? e : e < 1e6 ? `${(e / 1e3).toFixed(1)}k` : e < 1e9 ? `${(e / 1e6).toFixed(1)}m` : `${(e / 1e9).toFixed(1)}b`, dr = (e, r) => e && r ? `/assets/${e}/screenshots/${r}` : "";
|
|
950
|
+
function ur({ url: e }) {
|
|
950
951
|
const [r, o] = E(!0);
|
|
951
952
|
return /* @__PURE__ */ h(M, { children: [
|
|
952
953
|
r && /* @__PURE__ */ t(
|
|
@@ -971,41 +972,41 @@ function dr({ url: e }) {
|
|
|
971
972
|
borderRadius: 2,
|
|
972
973
|
border: 1,
|
|
973
974
|
borderColor: "divider",
|
|
974
|
-
sx: { objectFit: "container", cursor: "pointer", aspectRatio:
|
|
975
|
+
sx: { objectFit: "container", cursor: "pointer", aspectRatio: ar },
|
|
975
976
|
onLoad: () => o(!1),
|
|
976
977
|
onError: () => o(!1)
|
|
977
978
|
}
|
|
978
979
|
)
|
|
979
980
|
] });
|
|
980
981
|
}
|
|
981
|
-
function
|
|
982
|
+
function hr({ title: e, blocklets: r }) {
|
|
982
983
|
const { blockletRender: o, serverVersion: n } = R();
|
|
983
984
|
return /* @__PURE__ */ h(w, { mt: 3, children: [
|
|
984
985
|
/* @__PURE__ */ t(v, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
|
|
985
|
-
/* @__PURE__ */ t(
|
|
986
|
+
/* @__PURE__ */ t(Te, { container: !0, spacing: 2, boxSizing: "border-box", maxWidth: "calc(100vw - 16px)", children: r.map((l) => /* @__PURE__ */ t(Te, { item: !0, xs: 12, md: 6, p: "2px", "data-blocklet-did": l.did, children: /* @__PURE__ */ t(w, { padding: "1px", children: o({ blocklet: l, blocklets: r, serverVersion: n }) }) }, l.did)) })
|
|
986
987
|
] });
|
|
987
988
|
}
|
|
988
|
-
function
|
|
989
|
+
function pr() {
|
|
989
990
|
const { get: e } = Ie(), { t: r } = R(), {
|
|
990
991
|
data: o = [],
|
|
991
992
|
error: n,
|
|
992
993
|
loading: l
|
|
993
994
|
} = ne(async () => {
|
|
994
|
-
const a = await e(
|
|
995
|
+
const a = await e(P.explorePath);
|
|
995
996
|
return Array.isArray(a) ? a : [];
|
|
996
997
|
});
|
|
997
|
-
return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${
|
|
998
|
-
/* @__PURE__ */ t(
|
|
998
|
+
return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : l ? /* @__PURE__ */ t(Je, { mt: 15 }) : /* @__PURE__ */ h(M, { children: [
|
|
999
|
+
/* @__PURE__ */ t(sr, {}),
|
|
999
1000
|
o.map(
|
|
1000
1001
|
(a) => {
|
|
1001
1002
|
var s;
|
|
1002
|
-
return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(
|
|
1003
|
+
return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(hr, { title: r(`explore.${a.type}`), blocklets: a.blocklets }, a.type) : null;
|
|
1003
1004
|
}
|
|
1004
1005
|
)
|
|
1005
1006
|
] });
|
|
1006
1007
|
}
|
|
1007
1008
|
const he = "__FREE_TEXT__", Oe = "__NO_RESULT__", pe = 40;
|
|
1008
|
-
function
|
|
1009
|
+
function mr({
|
|
1009
1010
|
endpoint: e,
|
|
1010
1011
|
t: r,
|
|
1011
1012
|
locale: o,
|
|
@@ -1016,11 +1017,11 @@ function pr({
|
|
|
1016
1017
|
}) {
|
|
1017
1018
|
const i = re(null), m = re(!1), [d, f] = E(!1), [u, g] = E(""), [y, I] = E(!1), x = Ie(), [B, p] = E(!1), C = (s == null ? void 0 : s.placeholder) || r("common.searchStore"), b = async (c) => {
|
|
1018
1019
|
p(!0);
|
|
1019
|
-
const S = await x.get(Be(e, ve(
|
|
1020
|
+
const S = await x.get(Be(e, ve(P.blockletsPath, c)));
|
|
1020
1021
|
return p(!1), S.dataList || [];
|
|
1021
1022
|
}, { data: k, run: A } = ne(
|
|
1022
1023
|
(c) => c ? b({
|
|
1023
|
-
sortBy:
|
|
1024
|
+
sortBy: P.nameDesc,
|
|
1024
1025
|
page: 1,
|
|
1025
1026
|
pageSize: 10,
|
|
1026
1027
|
keyword: c,
|
|
@@ -1032,7 +1033,7 @@ function pr({
|
|
|
1032
1033
|
);
|
|
1033
1034
|
G(() => {
|
|
1034
1035
|
p(!0), A(n.keyword), g(n.keyword || "");
|
|
1035
|
-
}, [n.keyword, A]),
|
|
1036
|
+
}, [n.keyword, A]), Mt(
|
|
1036
1037
|
"ctrl + k, command + k",
|
|
1037
1038
|
(c) => {
|
|
1038
1039
|
var S, N;
|
|
@@ -1043,7 +1044,7 @@ function pr({
|
|
|
1043
1044
|
const z = De((c) => A(c), { wait: 300 }), $ = { name: he, title: u, did: "" };
|
|
1044
1045
|
let D = [];
|
|
1045
1046
|
return u && (B ? D = [$] : k != null && k.length ? D = [$, ...k] : D = [{ name: Oe, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ h(M, { children: [
|
|
1046
|
-
/* @__PURE__ */ h(
|
|
1047
|
+
/* @__PURE__ */ h(Lt, { fullScreen: !0, open: y, sx: { display: { md: "none" } }, children: [
|
|
1047
1048
|
/* @__PURE__ */ h(w, { p: 2, pb: 0, display: "flex", alignItems: "center", gap: 2, children: [
|
|
1048
1049
|
/* @__PURE__ */ t(
|
|
1049
1050
|
Ue,
|
|
@@ -1088,12 +1089,12 @@ function pr({
|
|
|
1088
1089
|
/* @__PURE__ */ t(
|
|
1089
1090
|
te,
|
|
1090
1091
|
{
|
|
1091
|
-
sx: { display: { sx: "block", md: "none" }, fontSize: 28, color: "text.
|
|
1092
|
+
sx: { display: { sx: "block", md: "none" }, fontSize: 28, color: "text.hint" },
|
|
1092
1093
|
onClick: () => I(!0)
|
|
1093
1094
|
}
|
|
1094
1095
|
),
|
|
1095
1096
|
/* @__PURE__ */ t(
|
|
1096
|
-
|
|
1097
|
+
Ft,
|
|
1097
1098
|
{
|
|
1098
1099
|
ref: i,
|
|
1099
1100
|
open: !!u && d,
|
|
@@ -1125,7 +1126,7 @@ function pr({
|
|
|
1125
1126
|
}
|
|
1126
1127
|
},
|
|
1127
1128
|
renderInput: (c) => /* @__PURE__ */ t(
|
|
1128
|
-
|
|
1129
|
+
_t,
|
|
1129
1130
|
{
|
|
1130
1131
|
...c,
|
|
1131
1132
|
InputProps: {
|
|
@@ -1183,7 +1184,7 @@ function pr({
|
|
|
1183
1184
|
Z(c),
|
|
1184
1185
|
/* @__PURE__ */ h(v, { variant: "body1", children: [
|
|
1185
1186
|
/* @__PURE__ */ t(v, { fontWeight: "fontWeightMedium", display: "flex", alignItems: "center", gap: 1, children: c.title }),
|
|
1186
|
-
/* @__PURE__ */ t(v, { sx: { color: "text.
|
|
1187
|
+
/* @__PURE__ */ t(v, { sx: { color: "text.hint" }, fontSize: "13px", children: ((N = (S = c.category) == null ? void 0 : S.locales) == null ? void 0 : N[o || "en"]) || "" })
|
|
1187
1188
|
] })
|
|
1188
1189
|
]
|
|
1189
1190
|
},
|
|
@@ -1200,7 +1201,7 @@ function pr({
|
|
|
1200
1201
|
display: "flex",
|
|
1201
1202
|
justifyContent: "center",
|
|
1202
1203
|
alignItems: "center",
|
|
1203
|
-
color: "text.
|
|
1204
|
+
color: "text.hint",
|
|
1204
1205
|
bgcolor: "#F1F3F5",
|
|
1205
1206
|
borderRadius: "8px",
|
|
1206
1207
|
children: /* @__PURE__ */ t(te, { sx: { fontSize: 28 } })
|
|
@@ -1210,13 +1211,13 @@ function pr({
|
|
|
1210
1211
|
return c.logo && (S = Be(e, "assets", c.did, qe(c.logo, pe, c.version))), /* @__PURE__ */ t(He, { src: S, size: pe, style: { borderRadius: "8px", overflow: "hidden" } });
|
|
1211
1212
|
}
|
|
1212
1213
|
function H(c = !0) {
|
|
1213
|
-
return /* @__PURE__ */ t(w, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.
|
|
1214
|
+
return /* @__PURE__ */ t(w, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.hint" }, children: c && u && B ? /* @__PURE__ */ t(le, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(te, { sx: { fontSize: 16, cursor: "default" } }) });
|
|
1214
1215
|
}
|
|
1215
1216
|
function K() {
|
|
1216
|
-
return u ? /* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", color: "text.
|
|
1217
|
+
return u ? /* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", color: "text.hint" }, children: /* @__PURE__ */ t(ke, { sx: { fontSize: 20, cursor: "pointer" }, onClick: () => j() }) }) : null;
|
|
1217
1218
|
}
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
+
function fr({ placeholder: e, ...r }) {
|
|
1220
1221
|
const { search: o, t: n } = R(), { filters: l, handleKeyword: a } = o, [s, i] = E(l.keyword || ""), m = De(a, { wait: 300 }), d = (g) => {
|
|
1221
1222
|
const { value: y } = g.target;
|
|
1222
1223
|
i(y), m.run(y);
|
|
@@ -1228,23 +1229,23 @@ function mr({ placeholder: e, ...r }) {
|
|
|
1228
1229
|
}, [l.keyword]);
|
|
1229
1230
|
const u = e || n("common.searchPlaceholder");
|
|
1230
1231
|
return /* @__PURE__ */ t(
|
|
1231
|
-
|
|
1232
|
+
gr,
|
|
1232
1233
|
{
|
|
1233
1234
|
inputProps: {
|
|
1234
1235
|
"data-cy": "search-blocklet"
|
|
1235
1236
|
},
|
|
1236
|
-
startAdornment: /* @__PURE__ */ t(Ae, { position: "start", children: /* @__PURE__ */ t(
|
|
1237
|
+
startAdornment: /* @__PURE__ */ t(Ae, { position: "start", children: /* @__PURE__ */ t(xr, { sx: { fontSize: 18, ml: -0.5 } }) }),
|
|
1237
1238
|
onChange: d,
|
|
1238
1239
|
placeholder: u,
|
|
1239
1240
|
value: s,
|
|
1240
1241
|
title: u,
|
|
1241
1242
|
"data-cy": "search",
|
|
1242
|
-
endAdornment: s && /* @__PURE__ */ t(Ae, { position: "end", children: /* @__PURE__ */ t(
|
|
1243
|
+
endAdornment: s && /* @__PURE__ */ t(Ae, { position: "end", children: /* @__PURE__ */ t(yr, { "data-cy": "search-delete", onClick: f }) }),
|
|
1243
1244
|
...r
|
|
1244
1245
|
}
|
|
1245
1246
|
);
|
|
1246
1247
|
}
|
|
1247
|
-
const
|
|
1248
|
+
const gr = Q(Ue)`
|
|
1248
1249
|
background-color: ${(e) => e.theme.palette.grey[50]};
|
|
1249
1250
|
font-size: 14px;
|
|
1250
1251
|
border-radius: 6px;
|
|
@@ -1261,14 +1262,14 @@ const fr = Q(Ue)`
|
|
|
1261
1262
|
color: transparent;
|
|
1262
1263
|
}
|
|
1263
1264
|
}
|
|
1264
|
-
`,
|
|
1265
|
+
`, xr = Q(te)`
|
|
1265
1266
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1266
|
-
`,
|
|
1267
|
+
`, yr = Q(ke)`
|
|
1267
1268
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1268
1269
|
font-size: 16px;
|
|
1269
1270
|
cursor: pointer;
|
|
1270
1271
|
`;
|
|
1271
|
-
function
|
|
1272
|
+
function wr() {
|
|
1272
1273
|
var b;
|
|
1273
1274
|
const {
|
|
1274
1275
|
search: e,
|
|
@@ -1312,8 +1313,8 @@ function yr() {
|
|
|
1312
1313
|
justifyContent: { xs: "flex-start", md: "flex-end" },
|
|
1313
1314
|
gap: 2,
|
|
1314
1315
|
children: [
|
|
1315
|
-
i.showSearch ? /* @__PURE__ */ t(w, { flex: 1, flexBasis: { xs: "100%", md: "auto" }, children: m ? /* @__PURE__ */ t(
|
|
1316
|
-
|
|
1316
|
+
i.showSearch ? /* @__PURE__ */ t(w, { flex: 1, flexBasis: { xs: "100%", md: "auto" }, children: m ? /* @__PURE__ */ t(fr, {}) : /* @__PURE__ */ t(
|
|
1317
|
+
mr,
|
|
1317
1318
|
{
|
|
1318
1319
|
locale: n,
|
|
1319
1320
|
endpoint: o,
|
|
@@ -1330,7 +1331,7 @@ function yr() {
|
|
|
1330
1331
|
}
|
|
1331
1332
|
) }) : null,
|
|
1332
1333
|
u.owner && a && /* @__PURE__ */ t(
|
|
1333
|
-
|
|
1334
|
+
Pe,
|
|
1334
1335
|
{
|
|
1335
1336
|
label: r("blocklet.authorTag", { name: a }),
|
|
1336
1337
|
size: "small",
|
|
@@ -1338,7 +1339,7 @@ function yr() {
|
|
|
1338
1339
|
}
|
|
1339
1340
|
),
|
|
1340
1341
|
u.resourceDid && u.resourceBlocklet && /* @__PURE__ */ t(
|
|
1341
|
-
|
|
1342
|
+
Pe,
|
|
1342
1343
|
{
|
|
1343
1344
|
label: r("blocklet.resourceTag", { name: u.resourceBlocklet }),
|
|
1344
1345
|
size: "small",
|
|
@@ -1391,6 +1392,7 @@ function Fe({
|
|
|
1391
1392
|
onChange: r,
|
|
1392
1393
|
label: o
|
|
1393
1394
|
}) {
|
|
1395
|
+
const n = Ot();
|
|
1394
1396
|
return /* @__PURE__ */ t(
|
|
1395
1397
|
We,
|
|
1396
1398
|
{
|
|
@@ -1401,10 +1403,10 @@ function Fe({
|
|
|
1401
1403
|
{
|
|
1402
1404
|
checked: e,
|
|
1403
1405
|
icon: /* @__PURE__ */ t(X, { style: { padding: 0 }, icon: At }),
|
|
1404
|
-
checkedIcon: /* @__PURE__ */ t(X, { style: { padding: 0, color:
|
|
1406
|
+
checkedIcon: /* @__PURE__ */ t(X, { style: { padding: 0, color: n.palette.primary.main }, icon: Et }),
|
|
1405
1407
|
size: "large",
|
|
1406
1408
|
sx: { p: 0, mr: 1 },
|
|
1407
|
-
onChange: (
|
|
1409
|
+
onChange: (l) => r(l.target.checked)
|
|
1408
1410
|
}
|
|
1409
1411
|
),
|
|
1410
1412
|
label: o
|
|
@@ -1412,8 +1414,8 @@ function Fe({
|
|
|
1412
1414
|
);
|
|
1413
1415
|
}
|
|
1414
1416
|
function ee({ children: e }) {
|
|
1415
|
-
return /* @__PURE__ */ h(w, { display: "flex", mt: 2, flexDirection: "column", alignItems: "center", justifyContent: "center", color: "text.
|
|
1416
|
-
/* @__PURE__ */ t(
|
|
1417
|
+
return /* @__PURE__ */ h(w, { display: "flex", mt: 2, flexDirection: "column", alignItems: "center", justifyContent: "center", color: "text.hint", children: [
|
|
1418
|
+
/* @__PURE__ */ t(zt, {}),
|
|
1417
1419
|
e
|
|
1418
1420
|
] });
|
|
1419
1421
|
}
|
|
@@ -1452,7 +1454,7 @@ function fe({
|
|
|
1452
1454
|
] })
|
|
1453
1455
|
] });
|
|
1454
1456
|
}
|
|
1455
|
-
function
|
|
1457
|
+
function br() {
|
|
1456
1458
|
const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = R(), { filters: l } = r, a = !!n || !!l.price;
|
|
1457
1459
|
if (l.keyword && a)
|
|
1458
1460
|
return /* @__PURE__ */ h(ee, { children: [
|
|
@@ -1494,33 +1496,33 @@ function wr() {
|
|
|
1494
1496
|
}
|
|
1495
1497
|
return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(Le, {}) });
|
|
1496
1498
|
}
|
|
1497
|
-
const
|
|
1499
|
+
const kr = (e, r, o, n) => dt(
|
|
1498
1500
|
async (l) => {
|
|
1499
1501
|
l || (o.currentPage = o.defaultCurrentPage);
|
|
1500
1502
|
const { currentPage: a, pageSize: s } = o, i = {
|
|
1501
1503
|
...r,
|
|
1502
1504
|
category: r.category === "All" ? "" : r.category,
|
|
1503
|
-
sortBy:
|
|
1505
|
+
sortBy: P[r.sortBy],
|
|
1504
1506
|
page: a,
|
|
1505
1507
|
pageSize: s
|
|
1506
1508
|
};
|
|
1507
1509
|
n(null);
|
|
1508
|
-
const { data: m = {} } = await e.get(
|
|
1510
|
+
const { data: m = {} } = await e.get(P.blockletsPath, { params: i });
|
|
1509
1511
|
return o.currentPage++, { page: a, pageSize: s, list: (m == null ? void 0 : m.dataList) || [], total: (m == null ? void 0 : m.total) || 0 };
|
|
1510
1512
|
},
|
|
1511
1513
|
{
|
|
1512
1514
|
isNoMore: (l) => l ? l.page * l.pageSize >= l.total : !1,
|
|
1513
|
-
reloadDeps: [e,
|
|
1515
|
+
reloadDeps: [e, Dt(r)],
|
|
1514
1516
|
onError: n
|
|
1515
1517
|
}
|
|
1516
1518
|
);
|
|
1517
|
-
function
|
|
1519
|
+
function vr() {
|
|
1518
1520
|
var u;
|
|
1519
1521
|
const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: l } = R(), { filters: a } = r, s = ut({
|
|
1520
|
-
currentPage:
|
|
1521
|
-
pageSize:
|
|
1522
|
-
defaultCurrentPage:
|
|
1523
|
-
}), [i, m] = E(null), d =
|
|
1522
|
+
currentPage: P.currentPage,
|
|
1523
|
+
pageSize: Qt() ? P.mobilePageSize : P.pageSize,
|
|
1524
|
+
defaultCurrentPage: P.defaultCurrentPage
|
|
1525
|
+
}), [i, m] = E(null), d = kr(e, a, s, m), f = V(
|
|
1524
1526
|
() => {
|
|
1525
1527
|
var g, y;
|
|
1526
1528
|
return o ? o(((g = d.data) == null ? void 0 : g.list) || []) : ((y = d.data) == null ? void 0 : y.list) || [];
|
|
@@ -1546,19 +1548,19 @@ function kr() {
|
|
|
1546
1548
|
}
|
|
1547
1549
|
};
|
|
1548
1550
|
}
|
|
1549
|
-
function
|
|
1550
|
-
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: l, minItemWidth: a, layout: s, baseSearch: i, compact: m } = R(), { filters: d } = r, { blocklets: f, errors: u, loadMore: g, loadings: y, hasNextPage: I, total: x } =
|
|
1551
|
+
function Cr() {
|
|
1552
|
+
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: l, minItemWidth: a, layout: s, baseSearch: i, compact: m } = R(), { filters: d } = r, { blocklets: f, errors: u, loadMore: g, loadings: y, hasNextPage: I, total: x } = vr(), [B] = Pt({
|
|
1551
1553
|
loading: y.fetchBlockletsLoading || y.loadingMore,
|
|
1552
1554
|
hasNextPage: I,
|
|
1553
1555
|
onLoadMore: g
|
|
1554
1556
|
});
|
|
1555
1557
|
if (u.fetchBlockletsError) {
|
|
1556
|
-
const k = new Error(`Failed to fetch blocklets from ${o}: ${
|
|
1558
|
+
const k = new Error(`Failed to fetch blocklets from ${o}: ${Kt(u.fetchBlockletsError)}`);
|
|
1557
1559
|
return /* @__PURE__ */ t(be, { error: k });
|
|
1558
1560
|
}
|
|
1559
1561
|
const p = i && s.showSearch || !d.keyword;
|
|
1560
1562
|
return /* @__PURE__ */ h(M, { children: [
|
|
1561
|
-
p ? /* @__PURE__ */ t(
|
|
1563
|
+
p ? /* @__PURE__ */ t(wr, {}) : /* @__PURE__ */ h(M, { children: [
|
|
1562
1564
|
/* @__PURE__ */ t(Se, { xs: /* @__PURE__ */ t(Ze, {}), md: null }),
|
|
1563
1565
|
b()
|
|
1564
1566
|
] }),
|
|
@@ -1592,7 +1594,7 @@ function vr() {
|
|
|
1592
1594
|
k.did
|
|
1593
1595
|
))
|
|
1594
1596
|
}
|
|
1595
|
-
) : /* @__PURE__ */ t(
|
|
1597
|
+
) : /* @__PURE__ */ t(br, {});
|
|
1596
1598
|
}
|
|
1597
1599
|
function b() {
|
|
1598
1600
|
return /* @__PURE__ */ h(
|
|
@@ -1615,13 +1617,13 @@ function vr() {
|
|
|
1615
1617
|
children: e("blocklet.search", { keyword: d.keyword })
|
|
1616
1618
|
}
|
|
1617
1619
|
),
|
|
1618
|
-
/* @__PURE__ */ t(v, { variant: "body1", color: "text.
|
|
1620
|
+
/* @__PURE__ */ t(v, { variant: "body1", color: "text.hint", fontSize: 13, children: e("blocklet.resultCount", { count: x }) })
|
|
1619
1621
|
]
|
|
1620
1622
|
}
|
|
1621
1623
|
);
|
|
1622
1624
|
}
|
|
1623
1625
|
}
|
|
1624
|
-
function
|
|
1626
|
+
function Sr() {
|
|
1625
1627
|
const { t: e, selectedCategory: r, getCategoryLocale: o } = R(), { toggleOpen: n } = Ce();
|
|
1626
1628
|
return /* @__PURE__ */ h(
|
|
1627
1629
|
v,
|
|
@@ -1633,17 +1635,17 @@ function Cr() {
|
|
|
1633
1635
|
py: 2,
|
|
1634
1636
|
fontWeight: "fontWeightMedium",
|
|
1635
1637
|
children: [
|
|
1636
|
-
/* @__PURE__ */ t(Ye, { onClick: () => n(!0), children: /* @__PURE__ */ t(
|
|
1638
|
+
/* @__PURE__ */ t(Ye, { onClick: () => n(!0), children: /* @__PURE__ */ t(Nt, {}) }),
|
|
1637
1639
|
o(r) || e("common.category")
|
|
1638
1640
|
]
|
|
1639
1641
|
}
|
|
1640
1642
|
);
|
|
1641
1643
|
}
|
|
1642
|
-
function
|
|
1644
|
+
function Ir({ menus: e, children: r }) {
|
|
1643
1645
|
var d;
|
|
1644
1646
|
const { search: o, layout: n, compact: l } = R(), { filters: a } = o, s = re(null), i = a.category || a.keyword || a.price, m = (d = e == null ? void 0 : e.find((f) => f.key === a.menu)) == null ? void 0 : d.key;
|
|
1645
|
-
return /* @__PURE__ */ t(
|
|
1646
|
-
!l && /* @__PURE__ */ t(
|
|
1647
|
+
return /* @__PURE__ */ t(jt, { children: /* @__PURE__ */ h(st, { FallbackComponent: be, children: [
|
|
1648
|
+
!l && /* @__PURE__ */ t(Sr, {}),
|
|
1647
1649
|
/* @__PURE__ */ h(
|
|
1648
1650
|
w,
|
|
1649
1651
|
{
|
|
@@ -1653,7 +1655,7 @@ function Sr({ menus: e, children: r }) {
|
|
|
1653
1655
|
className: "list-container",
|
|
1654
1656
|
pt: { xs: 0, md: l ? 0 : 5 },
|
|
1655
1657
|
children: [
|
|
1656
|
-
/* @__PURE__ */ t(
|
|
1658
|
+
/* @__PURE__ */ t(lr, { menus: e }),
|
|
1657
1659
|
/* @__PURE__ */ h(
|
|
1658
1660
|
O,
|
|
1659
1661
|
{
|
|
@@ -1668,7 +1670,7 @@ function Sr({ menus: e, children: r }) {
|
|
|
1668
1670
|
} : { overflow: "visible" },
|
|
1669
1671
|
children: [
|
|
1670
1672
|
m && (r == null ? void 0 : r(m)),
|
|
1671
|
-
!m && (n.showExplore && !i ? /* @__PURE__ */ t(
|
|
1673
|
+
!m && (n.showExplore && !i ? /* @__PURE__ */ t(pr, {}) : /* @__PURE__ */ t(Cr, {}))
|
|
1672
1674
|
]
|
|
1673
1675
|
}
|
|
1674
1676
|
)
|
|
@@ -1677,8 +1679,8 @@ function Sr({ menus: e, children: r }) {
|
|
|
1677
1679
|
)
|
|
1678
1680
|
] }) });
|
|
1679
1681
|
}
|
|
1680
|
-
function
|
|
1681
|
-
return /* @__PURE__ */ h(
|
|
1682
|
+
function Lo(e) {
|
|
1683
|
+
return /* @__PURE__ */ h(Wt, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
|
|
1682
1684
|
/* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, pb: 1, children: [
|
|
1683
1685
|
/* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, flex: 1, children: [
|
|
1684
1686
|
/* @__PURE__ */ t(F, { variant: "rounded", width: 48, height: 48 }),
|
|
@@ -1696,13 +1698,12 @@ function Oo(e) {
|
|
|
1696
1698
|
] })
|
|
1697
1699
|
] });
|
|
1698
1700
|
}
|
|
1699
|
-
function
|
|
1700
|
-
return e ? /* @__PURE__ */ t(L, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(
|
|
1701
|
+
function _o({ showSkeleton: e, ...r }) {
|
|
1702
|
+
return e ? /* @__PURE__ */ t(L, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t($t, { ...r });
|
|
1701
1703
|
}
|
|
1702
|
-
function
|
|
1704
|
+
function Mo(e) {
|
|
1703
1705
|
const { menus: r, children: o, ...n } = e, l = we(), a = et(
|
|
1704
|
-
it({
|
|
1705
|
-
...l,
|
|
1706
|
+
it({}, l, {
|
|
1706
1707
|
typography: {
|
|
1707
1708
|
h1: {
|
|
1708
1709
|
fontSize: 32,
|
|
@@ -1729,12 +1730,12 @@ function Lo(e) {
|
|
|
1729
1730
|
}
|
|
1730
1731
|
})
|
|
1731
1732
|
);
|
|
1732
|
-
return /* @__PURE__ */ t(tt, { theme: a, children: /* @__PURE__ */ t(
|
|
1733
|
+
return /* @__PURE__ */ t(tt, { theme: a, children: /* @__PURE__ */ t(tr, { ...n, children: /* @__PURE__ */ t(Ir, { menus: r, children: o }) }) });
|
|
1733
1734
|
}
|
|
1734
1735
|
export {
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1736
|
+
mr as Autocomplete,
|
|
1737
|
+
Lo as CardSkeleton,
|
|
1738
|
+
_o as Image,
|
|
1739
|
+
Mo as default,
|
|
1740
|
+
Ut as useSearch
|
|
1740
1741
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/list",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.44",
|
|
4
4
|
"description": "Common ux components of blocklet",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"react-dom": ">=18.2.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@blocklet/js-sdk": "^1.16.42
|
|
56
|
-
"@blocklet/util": "0.16.
|
|
55
|
+
"@blocklet/js-sdk": "^1.16.42",
|
|
56
|
+
"@blocklet/util": "0.16.44",
|
|
57
57
|
"@emotion/react": "^11.10.0",
|
|
58
58
|
"@emotion/styled": "^11.10.0",
|
|
59
59
|
"@iconify-icons/tabler": "^1.2.95",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"prettier": "^3.3.2",
|
|
92
92
|
"vite": "^5.4.10"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "78a298b057eeb22e89dc5a1ae4b67a9f9f4303db"
|
|
95
95
|
}
|