@blocklet/list 0.16.46 → 0.16.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.es.js +168 -169
  2. package/package.json +3 -3
package/lib/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { jsx as t, jsxs as h, Fragment as M } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
2
  import { styled as Q, useTheme as we } from "@arcblock/ux/lib/Theme";
3
3
  import et from "@mui/material/styles/createTheme";
4
4
  import tt from "@mui/material/styles/ThemeProvider";
@@ -6,24 +6,24 @@ import { pick as rt, omitBy as se, orderBy as ot, isEmpty as nt, merge as it } f
6
6
  import { ErrorFallback as be } from "@arcblock/ux/lib/ErrorBoundary";
7
7
  import w from "@mui/material/Box";
8
8
  import O from "@mui/material/Stack";
9
- import { createContext as _e, useState as E, useMemo as V, useContext as Me, useCallback as ge, useEffect as G, forwardRef as lt, useRef as re, memo as at } from "react";
9
+ import { createContext as Me, useState as E, useMemo as V, useContext as ze, useCallback as ge, useEffect as G, forwardRef as lt, useRef as re, memo as at } from "react";
10
10
  import { ErrorBoundary as st } from "react-error-boundary";
11
11
  import ct from "@iconify-icons/tabler/compass";
12
12
  import { Icon as X } from "@iconify/react";
13
13
  import ke from "@mui/icons-material/Close";
14
14
  import v from "@mui/material/Typography";
15
- import { createAxios as ze } from "@blocklet/js-sdk";
15
+ import { createAxios as Fe } from "@blocklet/js-sdk";
16
16
  import { useRequest as ne, useDebounceFn as De, useInfiniteScroll as dt, useReactive as ut } from "ahooks";
17
17
  import "color";
18
- import { parseURL as ht, parseQuery as pt, parseFilename as mt, stringifyParsedURL as ft, withQuery as ve, joinURL as Be } from "ufo";
19
- import Re from "flat";
18
+ import { parseURL as ht, parseQuery as pt, parseFilename as mt, stringifyParsedURL as ft, withQuery as ve, joinURL as Re } from "ufo";
19
+ import Be from "flat";
20
20
  import ie from "@mui/material/Button";
21
21
  import gt from "@mui/material/styles/useTheme";
22
22
  import U from "@mui/material/useMediaQuery";
23
- import xt from "@mui/material/Drawer";
23
+ import yt from "@mui/material/Drawer";
24
24
  import Ne from "@mui/material/Checkbox";
25
25
  import We from "@mui/material/FormControlLabel";
26
- import yt from "@mui/icons-material/Check";
26
+ import xt from "@mui/icons-material/Check";
27
27
  import wt from "@mui/icons-material/KeyboardArrowDown";
28
28
  import bt from "@mui/material/ClickAwayListener";
29
29
  import kt from "@mui/material/Grow";
@@ -35,9 +35,9 @@ import St from "@mui/material/SvgIcon";
35
35
  import le from "@mui/material/CircularProgress";
36
36
  import He from "@arcblock/ux/lib/Avatar";
37
37
  import It from "@iconify-icons/tabler/cloud-download";
38
- import Bt from "@mui/icons-material/ChevronLeft";
39
- import Rt from "@mui/icons-material/ChevronRight";
40
- import L from "@mui/material/Skeleton";
38
+ import Rt from "@mui/icons-material/ChevronLeft";
39
+ import Bt from "@mui/icons-material/ChevronRight";
40
+ import _ from "@mui/material/Skeleton";
41
41
  import Tt from "react-image-gallery";
42
42
  import "react-image-gallery/styles/css/image-gallery.css";
43
43
  import Te from "@mui/material/Grid";
@@ -47,18 +47,18 @@ import Et from "@iconify-icons/tabler/square-check-filled";
47
47
  import Pe from "@mui/material/Chip";
48
48
  import { useTheme as Ot } from "@mui/material/styles";
49
49
  import te from "@mui/icons-material/Search";
50
- import Ft from "@mui/material/Autocomplete";
51
- import Lt from "@mui/material/Dialog";
50
+ import Lt from "@mui/material/Autocomplete";
51
+ import _t from "@mui/material/Dialog";
52
52
  import Ue from "@mui/material/OutlinedInput";
53
- import _t from "@mui/material/TextField";
54
- import { useHotkeys as Mt } from "react-hotkeys-hook";
53
+ import Mt from "@mui/material/TextField";
54
+ import { useHotkeys as zt } from "react-hotkeys-hook";
55
55
  import Ae from "@mui/material/InputAdornment";
56
- import zt from "@arcblock/ux/lib/Empty";
56
+ import Ft from "@arcblock/ux/lib/Empty";
57
57
  import Dt from "json-stable-stringify";
58
58
  import Nt from "@mui/icons-material/Menu";
59
- import { Card as Wt, Box as ce, Skeleton as F } from "@mui/material";
59
+ import { Card as Wt, Box as ce, Skeleton as L } from "@mui/material";
60
60
  import $t from "@arcblock/ux/lib/Img";
61
- const Ve = _e({
61
+ const Ve = Me({
62
62
  open: !1,
63
63
  toggleOpen: (e) => {
64
64
  }
@@ -70,7 +70,7 @@ function jt({ children: e }) {
70
70
  return /* @__PURE__ */ t(Ve.Provider, { value: l, children: e });
71
71
  }
72
72
  function Ce() {
73
- return Me(Ve);
73
+ return ze(Ve);
74
74
  }
75
75
  const P = {
76
76
  nameAsc: "title",
@@ -292,8 +292,8 @@ const Vt = (e, r, o) => e && r || !o, Ge = (e) => [
292
292
  expandResult: "查看 “{name}” 的所有搜索结果"
293
293
  }
294
294
  }, de = {
295
- en: Re(Yt),
296
- zh: Re(Zt)
295
+ en: Be(Yt),
296
+ zh: Be(Zt)
297
297
  }, Ke = (e, r) => {
298
298
  const o = {};
299
299
  return e && (o["x-blocklet-server-version"] = e), r && (o["x-blocklet-store-version"] = r), o;
@@ -355,7 +355,7 @@ const Vt = (e, r, o) => e && r || !o, Ge = (e) => [
355
355
  handlePage: () => {
356
356
  }
357
357
  }
358
- }, Qe = _e(Xe), { Provider: er, Consumer: Fo } = Qe;
358
+ }, Qe = Me(Xe), { Provider: er, Consumer: Lo } = Qe;
359
359
  function tr(e) {
360
360
  const {
361
361
  locale: r = "zh",
@@ -371,23 +371,23 @@ function tr(e) {
371
371
  baseSearch: f = !1,
372
372
  fetchCategoryDelay: u = 0,
373
373
  showResourcesSwitch: g = !1,
374
- showCategory: y = !0,
374
+ showCategory: x = !0,
375
375
  tagFilters: I = [],
376
- children: x,
377
- storeVersion: B,
376
+ children: y,
377
+ storeVersion: R,
378
378
  onSearchSelect: p = () => {
379
379
  },
380
380
  endpoint: C,
381
381
  blockletRender: b,
382
382
  compact: k = !1
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
+ } = e, A = Ke(n, R), F = V(() => Fe({ baseURL: C, headers: A }), [C]), $ = Ut(o, { onFilterChange: l, emptyCategory: !i.showExplore, onSearchSelect: p }), [D, q] = E(""), {
384
384
  data: j = [],
385
385
  error: ae,
386
386
  loading: Y,
387
387
  run: Z
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;
388
+ } = Ht(F), H = V(() => {
389
+ const T = ot(j, [(W) => W.name], ["asc"]), M = T.findIndex((W) => W.name === "All" || W.locales.en === "All");
390
+ return M > -1 ? [{ ...T[M], _id: "All" }, ...T.slice(0, M), ...T.slice(M + 1)] : T;
391
391
  }, [j]), K = ge(Jt(r), [r]), c = V(() => qt(H, r), [H, r]), S = Gt(K), N = {
392
392
  search: $,
393
393
  compact: k,
@@ -407,7 +407,7 @@ function tr(e) {
407
407
  minItemWidth: a,
408
408
  wrapChildren: m,
409
409
  t: K,
410
- storeVersion: B,
410
+ storeVersion: R,
411
411
  serverVersion: n,
412
412
  selectedCategory: $.filters.category || (i.showExplore ? "" : "All"),
413
413
  categoryList: H,
@@ -415,16 +415,16 @@ function tr(e) {
415
415
  locale: r,
416
416
  categoryOptions: c,
417
417
  priceOptions: S,
418
- storeApi: z,
418
+ storeApi: F,
419
419
  baseSearch: f,
420
420
  showResourcesSwitch: g,
421
- showCategory: y,
421
+ showCategory: x,
422
422
  tagFilters: I,
423
423
  onFilterChange: l,
424
424
  getCategoryLocale: (T) => {
425
425
  if (!T) return null;
426
- const _ = j.find((W) => W._id === T || W.locales.en === "All");
427
- return _ ? _.locales[r] || _.locales.en : null;
426
+ const M = j.find((W) => W._id === T || W.locales.en === "All");
427
+ return M ? M.locales[r] || M.locales.en : null;
428
428
  },
429
429
  get developerName() {
430
430
  return D;
@@ -433,10 +433,10 @@ function tr(e) {
433
433
  };
434
434
  return G(() => {
435
435
  setTimeout(Z, u || 0);
436
- }, [C, Z, u]), /* @__PURE__ */ t(er, { value: N, children: x });
436
+ }, [C, Z, u]), /* @__PURE__ */ t(er, { value: N, children: y });
437
437
  }
438
- function R() {
439
- const e = Me(Qe);
438
+ function B() {
439
+ const e = ze(Qe);
440
440
  return e || Xe;
441
441
  }
442
442
  function Ye({
@@ -491,7 +491,7 @@ function rr({ children: e }) {
491
491
  return /* @__PURE__ */ t(
492
492
  Se,
493
493
  {
494
- xs: /* @__PURE__ */ t(xt, { open: r, onClose: () => o(!1), children: e }),
494
+ xs: /* @__PURE__ */ t(yt, { open: r, onClose: () => o(!1), children: e }),
495
495
  md: /* @__PURE__ */ t(w, { children: e })
496
496
  }
497
497
  );
@@ -507,36 +507,36 @@ const or = lt(({ loading: e, disabled: r, ...o }, n) => /* @__PURE__ */ t(
507
507
  startIcon: e && /* @__PURE__ */ t(le, { size: "1em" })
508
508
  }
509
509
  ));
510
- function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
511
- var B;
510
+ function ye({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
511
+ var R;
512
512
  const a = re(null), s = we(), [i, m] = E(!1), [d, f] = E(e !== null ? e : ""), u = U(s.breakpoints.down("sm"));
513
513
  G(() => {
514
514
  f(e !== null ? e : "");
515
515
  }, [e]);
516
516
  const g = ge(() => {
517
517
  m(!1);
518
- }, []), y = ge(() => {
518
+ }, []), x = ge(() => {
519
519
  m(!0);
520
520
  }, []);
521
521
  function I(p) {
522
522
  f(p.value), o(p.value), u && g();
523
523
  }
524
- function x(p) {
524
+ function y(p) {
525
525
  return p === d;
526
526
  }
527
- return /* @__PURE__ */ h(M, { children: [
527
+ return /* @__PURE__ */ h(z, { children: [
528
528
  /* @__PURE__ */ h(
529
529
  nr,
530
530
  {
531
531
  ref: a,
532
- onClick: y,
532
+ onClick: x,
533
533
  variant: "outlined",
534
534
  size: "medium",
535
535
  className: ["my-select__selector", nt(d) ? "" : "my-select__selector--active"].join(" "),
536
536
  sx: { minWidth: { xs: "100px", md: "auto" }, color: "text.primary", borderRadius: "8px" },
537
537
  ...l,
538
538
  children: [
539
- ((B = r.find((p) => p.value === d)) == null ? void 0 : B.name) || n,
539
+ ((R = r.find((p) => p.value === d)) == null ? void 0 : R.name) || n,
540
540
  /* @__PURE__ */ t(St, { className: "my-select__arrowdown", component: wt, sx: { width: 18, height: 18 } })
541
541
  ]
542
542
  }
@@ -546,11 +546,11 @@ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
546
546
  {
547
547
  ...p,
548
548
  style: { transformOrigin: C === "bottom" ? "center top" : "center bottom" },
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
+ children: /* @__PURE__ */ t(vt, { children: /* @__PURE__ */ t(bt, { onClickAway: g, children: /* @__PURE__ */ t(ir, { autoFocusItem: i, onMouseEnter: x, onMouseLeave: g, children: r.map((b) => /* @__PURE__ */ h($e, { onClick: () => I(b), sx: { fontSize: 14 }, children: [
550
550
  /* @__PURE__ */ t(
551
- yt,
551
+ xt,
552
552
  {
553
- sx: { mr: 1, fontSize: 16, visibility: x(b.value) ? "visible" : "hidden" }
553
+ sx: { mr: 1, fontSize: 16, visibility: y(b.value) ? "visible" : "hidden" }
554
554
  }
555
555
  ),
556
556
  b.name
@@ -560,11 +560,11 @@ function xe({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
560
560
  ] });
561
561
  }
562
562
  const nr = Q(or)`
563
- border: 1px solid #f0f0f0;
563
+ border: 1px solid ${(e) => e.theme.palette.divider};
564
564
  padding: 6px 8px 6px 12px;
565
565
  font-weight: ${(e) => e.theme.typography.fontWeightRegular};
566
566
  font-size: 14px;
567
- color: #666;
567
+ color: ${(e) => e.theme.palette.text.secondary};
568
568
  line-height: 1;
569
569
  text-transform: none;
570
570
  & + & {
@@ -575,14 +575,14 @@ const nr = Q(or)`
575
575
  .my-select__arrowdown,
576
576
  }
577
577
  .my-select__arrowdown {
578
- color: #999;
578
+ color: ${(e) => e.theme.palette.grey[400]};
579
579
  font-size: 14px;
580
580
  margin-left: 6px;
581
581
  }
582
582
  .my-select__icon {
583
583
  font-size: 0;
584
584
  svg {
585
- color: #999;
585
+ color: ${(e) => e.theme.palette.grey[400]};
586
586
  font-size: 18px;
587
587
  margin-right: 3px;
588
588
  }
@@ -605,7 +605,7 @@ const nr = Q(or)`
605
605
  }
606
606
  `;
607
607
  function Ze() {
608
- const { search: e, t: r } = R(), { filters: o, handleSort: n, handlePrice: l } = e, a = Ge(r);
608
+ const { search: e, t: r } = B(), { filters: o, handleSort: n, handlePrice: l } = e, a = Ge(r);
609
609
  return /* @__PURE__ */ h(
610
610
  O,
611
611
  {
@@ -631,7 +631,7 @@ function Ze() {
631
631
  }
632
632
  ),
633
633
  /* @__PURE__ */ t(
634
- xe,
634
+ ye,
635
635
  {
636
636
  value: o.sortBy || a[0].value,
637
637
  options: a,
@@ -644,9 +644,9 @@ function Ze() {
644
644
  );
645
645
  }
646
646
  function lr({ menus: e }) {
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
+ const { selectedCategory: r, search: o, t: n, categoryOptions: l, loadings: a, layout: s, baseSearch: i, compact: m } = B(), { filters: d, handleActiveMenu: f, handleCategory: u, cleanFilter: g } = o, { toggleOpen: x } = Ce();
648
648
  G(() => {
649
- y(!1);
649
+ x(!1);
650
650
  }, [Object.values(d).join("")]);
651
651
  const I = Vt(i, s.showSearch, d.keyword);
652
652
  return s.showCategory && !m ? /* @__PURE__ */ h(rr, { children: [
@@ -665,7 +665,7 @@ function lr({ menus: e }) {
665
665
  borderBottom: 1,
666
666
  borderColor: "divider",
667
667
  children: [
668
- /* @__PURE__ */ t(Ye, { onClick: () => y(!1), children: /* @__PURE__ */ t(ke, {}) }),
668
+ /* @__PURE__ */ t(Ye, { onClick: () => x(!1), children: /* @__PURE__ */ t(ke, {}) }),
669
669
  /* @__PURE__ */ t(v, { flex: 1, variant: "body1", fontWeight: "fontWeightMedium", children: n("common.category") })
670
670
  ]
671
671
  }
@@ -681,7 +681,7 @@ function lr({ menus: e }) {
681
681
  boxSizing: "content-box",
682
682
  p: { xs: 2, md: 0 },
683
683
  pr: { md: 6 },
684
- children: I ? /* @__PURE__ */ h(M, { children: [
684
+ children: I ? /* @__PURE__ */ h(z, { children: [
685
685
  s.showExplore && /* @__PURE__ */ h(w, { mb: 3, pb: 3, borderBottom: 1, borderColor: "divider", children: [
686
686
  /* @__PURE__ */ h(w, { display: "flex", alignItems: "center", gap: 1, children: [
687
687
  /* @__PURE__ */ t(X, { icon: ct, width: 20, height: 20 }),
@@ -689,49 +689,49 @@ function lr({ menus: e }) {
689
689
  v,
690
690
  {
691
691
  variant: "body1",
692
- color: !r && !d.menu ? "text.primary" : "text.hint",
692
+ color: !r && !d.menu ? "text.primary" : "grey.400",
693
693
  fontWeight: !r && !d.menu ? "fontWeightMedium" : void 0,
694
694
  sx: { cursor: "pointer" },
695
695
  onClick: () => {
696
- y(!1), g();
696
+ x(!1), g();
697
697
  },
698
698
  children: n("explore.title")
699
699
  }
700
700
  )
701
701
  ] }),
702
- e == null ? void 0 : e.map((x) => /* @__PURE__ */ h(w, { display: "flex", alignItems: "center", mt: 2, gap: 1, children: [
703
- typeof x.icon == "string" ? /* @__PURE__ */ t(X, { icon: x.icon, width: 20, height: 20 }) : x.icon,
702
+ e == null ? void 0 : e.map((y) => /* @__PURE__ */ h(w, { display: "flex", alignItems: "center", mt: 2, gap: 1, children: [
703
+ typeof y.icon == "string" ? /* @__PURE__ */ t(X, { icon: y.icon, width: 20, height: 20 }) : y.icon,
704
704
  /* @__PURE__ */ t(
705
705
  v,
706
706
  {
707
707
  variant: "body1",
708
- color: d.menu === x.key ? "text.primary" : "text.hint",
709
- fontWeight: d.menu === x.key ? "fontWeightMedium" : void 0,
708
+ color: d.menu === y.key ? "text.primary" : "grey.400",
709
+ fontWeight: d.menu === y.key ? "fontWeightMedium" : void 0,
710
710
  sx: { cursor: "pointer" },
711
711
  onClick: () => {
712
- var B;
713
- y(!1), f(x.key), (B = x.onClick) == null || B.call(x);
712
+ var R;
713
+ x(!1), f(y.key), (R = y.onClick) == null || R.call(y);
714
714
  },
715
- children: x.title
715
+ children: y.title
716
716
  }
717
717
  )
718
- ] }, x.key))
718
+ ] }, y.key))
719
719
  ] }),
720
- !!l.length && /* @__PURE__ */ t(O, { gap: 2, children: l.map((x) => /* @__PURE__ */ t(
720
+ !!l.length && /* @__PURE__ */ t(O, { gap: 2, children: l.map((y) => /* @__PURE__ */ t(
721
721
  v,
722
722
  {
723
723
  variant: "body1",
724
- title: x.name,
724
+ title: y.name,
725
725
  sx: { cursor: "pointer" },
726
726
  "data-cy": "filter",
727
- color: r === x.value ? "text.primary" : "text.hint",
727
+ color: r === y.value ? "text.primary" : "grey.400",
728
728
  textTransform: "capitalize",
729
729
  onClick: () => {
730
- r === x.value ? g() : u(x.value), y(!1);
730
+ r === y.value ? g() : u(y.value), x(!1);
731
731
  },
732
- children: x.name
732
+ children: y.name
733
733
  },
734
- x.value
734
+ y.value
735
735
  )) })
736
736
  ] }) : /* @__PURE__ */ t(Ze, {})
737
737
  }
@@ -739,7 +739,7 @@ function lr({ menus: e }) {
739
739
  ] }) : null;
740
740
  }
741
741
  function Ie() {
742
- const { endpoint: e, serverVersion: r, storeVersion: o } = R(), n = Ke(r, o), l = V(() => ze({
742
+ const { endpoint: e, serverVersion: r, storeVersion: o } = B(), n = Ke(r, o), l = V(() => Fe({
743
743
  baseURL: e,
744
744
  headers: n
745
745
  }), [e]);
@@ -777,10 +777,10 @@ function Ee({
777
777
  )
778
778
  ] });
779
779
  }
780
- const ar = 16 / 9, ue = 292, ye = 189, oe = 336;
780
+ const ar = 16 / 9, ue = 292, xe = 189, oe = 336;
781
781
  function sr() {
782
- var x, B;
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) || [], {
782
+ var y, R;
783
+ const { t: e, search: r } = B(), { get: o } = Ie(), n = we(), l = U(n.breakpoints.down("md")), a = ((R = (y = window.blocklet) == null ? void 0 : y.preferences) == null ? void 0 : R.homeBanner) || [], {
784
784
  data: s = [],
785
785
  error: i,
786
786
  loading: m
@@ -799,7 +799,7 @@ function sr() {
799
799
  cursor: "pointer",
800
800
  color: "text.hint"
801
801
  };
802
- return !i && a.length > 0 ? /* @__PURE__ */ h(M, { children: [
802
+ return !i && a.length > 0 ? /* @__PURE__ */ h(z, { children: [
803
803
  /* @__PURE__ */ t(v, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
804
804
  /* @__PURE__ */ t(
805
805
  w,
@@ -812,16 +812,16 @@ function sr() {
812
812
  borderRadius: 3,
813
813
  overflow: "hidden",
814
814
  children: m ? /* @__PURE__ */ h(w, { p: 5, display: { md: "flex" }, gap: 5, alignItems: "center", justifyContent: "center", children: [
815
- /* @__PURE__ */ t(L, { variant: "rounded", height: ye, width: oe }),
815
+ /* @__PURE__ */ t(_, { variant: "rounded", height: xe, width: oe }),
816
816
  /* @__PURE__ */ h(w, { flex: 1, height: "100%", children: [
817
- /* @__PURE__ */ t(L, { variant: "text", height: 50, width: 100 }),
818
- /* @__PURE__ */ t(L, { variant: "text", height: 40, width: "100%" }),
819
- /* @__PURE__ */ t(L, { variant: "text", height: 40, width: 300 }),
817
+ /* @__PURE__ */ t(_, { variant: "text", height: 50, width: 100 }),
818
+ /* @__PURE__ */ t(_, { variant: "text", height: 40, width: "100%" }),
819
+ /* @__PURE__ */ t(_, { variant: "text", height: 40, width: 300 }),
820
820
  /* @__PURE__ */ h(w, { display: "flex", gap: 1, my: 2, children: [
821
- /* @__PURE__ */ t(L, { variant: "circular", height: 20, width: 20 }),
822
- /* @__PURE__ */ t(L, { variant: "text", height: 20, width: 50 })
821
+ /* @__PURE__ */ t(_, { variant: "circular", height: 20, width: 20 }),
822
+ /* @__PURE__ */ t(_, { variant: "text", height: 20, width: 50 })
823
823
  ] }),
824
- /* @__PURE__ */ t(L, { variant: "rounded", height: 30, width: 100 })
824
+ /* @__PURE__ */ t(_, { variant: "rounded", height: 30, width: 100 })
825
825
  ] })
826
826
  ] }) : /* @__PURE__ */ t(
827
827
  Tt,
@@ -835,13 +835,13 @@ function sr() {
835
835
  showBullets: !1,
836
836
  showThumbnails: !1,
837
837
  showFullscreenButton: !1,
838
- renderLeftNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Bt, { sx: { ...d, left: 5 } }) }),
839
- renderRightNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...d, right: 5 } }) }),
838
+ renderLeftNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...d, left: 5 } }) }),
839
+ renderRightNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Bt, { sx: { ...d, right: 5 } }) }),
840
840
  items: a.map((p, C) => ({
841
841
  original: p.did,
842
842
  renderItem: () => {
843
- var z;
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);
843
+ var F;
844
+ const b = s[C] || {}, k = p.cover || dr(p.did, (F = b.screenshots) == null ? void 0 : F[0]), A = qe(k, n.breakpoints.values.md * 2);
845
845
  return /* @__PURE__ */ h(
846
846
  O,
847
847
  {
@@ -876,7 +876,7 @@ function sr() {
876
876
  u(p.name || b.title || p.name),
877
877
  g(p.desc || b.description)
878
878
  ] }),
879
- b.did && y(b, p.baseNum),
879
+ b.did && x(b, p.baseNum),
880
880
  I(b)
881
881
  ] })
882
882
  ]
@@ -919,7 +919,7 @@ function sr() {
919
919
  }
920
920
  );
921
921
  }
922
- function y(p, C = 0) {
922
+ function x(p, C = 0) {
923
923
  const { did: b, owner: k, stats: A } = p;
924
924
  return /* @__PURE__ */ h(w, { display: "flex", alignItems: "center", gap: 2, color: "text.secondary", children: [
925
925
  /* @__PURE__ */ t(Ee, { icon: /* @__PURE__ */ t(He, { src: k.avatar, did: b, size: 20, variant: "circle" }), children: k.fullName }),
@@ -936,9 +936,8 @@ function sr() {
936
936
  sx: {
937
937
  width: "fit-content",
938
938
  textTransform: "none",
939
- bgcolor: "white",
940
- borderRadius: "8px",
941
- borderColor: "divider",
939
+ borderRadius: 1,
940
+ borderColor: "grey.300",
942
941
  "&:hover": { borderColor: "divider" }
943
942
  },
944
943
  children: e("explore.viewDetail")
@@ -949,14 +948,14 @@ function sr() {
949
948
  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
949
  function ur({ url: e }) {
951
950
  const [r, o] = E(!0);
952
- return /* @__PURE__ */ h(M, { children: [
951
+ return /* @__PURE__ */ h(z, { children: [
953
952
  r && /* @__PURE__ */ t(
954
- L,
953
+ _,
955
954
  {
956
955
  variant: "rectangular",
957
956
  sx: {
958
957
  width: { xs: "100%", md: oe },
959
- height: { xs: "auto", md: ye }
958
+ height: { xs: "auto", md: xe }
960
959
  }
961
960
  }
962
961
  ),
@@ -968,7 +967,7 @@ function ur({ url: e }) {
968
967
  src: e,
969
968
  alt: "",
970
969
  width: { xs: "100%", md: oe },
971
- height: { xs: "auto", md: ye },
970
+ height: { xs: "auto", md: xe },
972
971
  borderRadius: 2,
973
972
  border: 1,
974
973
  borderColor: "divider",
@@ -980,14 +979,14 @@ function ur({ url: e }) {
980
979
  ] });
981
980
  }
982
981
  function hr({ title: e, blocklets: r }) {
983
- const { blockletRender: o, serverVersion: n } = R();
982
+ const { blockletRender: o, serverVersion: n } = B();
984
983
  return /* @__PURE__ */ h(w, { mt: 3, children: [
985
984
  /* @__PURE__ */ t(v, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
986
985
  /* @__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)) })
987
986
  ] });
988
987
  }
989
988
  function pr() {
990
- const { get: e } = Ie(), { t: r } = R(), {
989
+ const { get: e } = Ie(), { t: r } = B(), {
991
990
  data: o = [],
992
991
  error: n,
993
992
  loading: l
@@ -995,7 +994,7 @@ function pr() {
995
994
  const a = await e(P.explorePath);
996
995
  return Array.isArray(a) ? a : [];
997
996
  });
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: [
997
+ return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : l ? /* @__PURE__ */ t(Je, { mt: 15 }) : /* @__PURE__ */ h(z, { children: [
999
998
  /* @__PURE__ */ t(sr, {}),
1000
999
  o.map(
1001
1000
  (a) => {
@@ -1015,9 +1014,9 @@ function mr({
1015
1014
  handleSearchSelect: a,
1016
1015
  ...s
1017
1016
  }) {
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) => {
1017
+ const i = re(null), m = re(!1), [d, f] = E(!1), [u, g] = E(""), [x, I] = E(!1), y = Ie(), [R, p] = E(!1), C = (s == null ? void 0 : s.placeholder) || r("common.searchStore"), b = async (c) => {
1019
1018
  p(!0);
1020
- const S = await x.get(Be(e, ve(P.blockletsPath, c)));
1019
+ const S = await y.get(Re(e, ve(P.blockletsPath, c)));
1021
1020
  return p(!1), S.dataList || [];
1022
1021
  }, { data: k, run: A } = ne(
1023
1022
  (c) => c ? b({
@@ -1033,7 +1032,7 @@ function mr({
1033
1032
  );
1034
1033
  G(() => {
1035
1034
  p(!0), A(n.keyword), g(n.keyword || "");
1036
- }, [n.keyword, A]), Mt(
1035
+ }, [n.keyword, A]), zt(
1037
1036
  "ctrl + k, command + k",
1038
1037
  (c) => {
1039
1038
  var S, N;
@@ -1041,17 +1040,17 @@ function mr({
1041
1040
  },
1042
1041
  { enableOnTags: ["INPUT"] }
1043
1042
  );
1044
- const z = De((c) => A(c), { wait: 300 }), $ = { name: he, title: u, did: "" };
1043
+ const F = De((c) => A(c), { wait: 300 }), $ = { name: he, title: u, did: "" };
1045
1044
  let D = [];
1046
- return u && (B ? D = [$] : k != null && k.length ? D = [$, ...k] : D = [{ name: Oe, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ h(M, { children: [
1047
- /* @__PURE__ */ h(Lt, { fullScreen: !0, open: y, sx: { display: { md: "none" } }, children: [
1045
+ return u && (R ? D = [$] : k != null && k.length ? D = [$, ...k] : D = [{ name: Oe, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ h(z, { children: [
1046
+ /* @__PURE__ */ h(_t, { fullScreen: !0, open: x, sx: { display: { md: "none" } }, children: [
1048
1047
  /* @__PURE__ */ h(w, { p: 2, pb: 0, display: "flex", alignItems: "center", gap: 2, children: [
1049
1048
  /* @__PURE__ */ t(
1050
1049
  Ue,
1051
1050
  {
1052
1051
  fullWidth: !0,
1053
1052
  sx: {
1054
- bgcolor: "#F9FAFB",
1053
+ bgcolor: "grey.50",
1055
1054
  px: 1,
1056
1055
  py: 0.5,
1057
1056
  ".MuiInputBase-input": { p: 1 },
@@ -1069,7 +1068,7 @@ function mr({
1069
1068
  className: "bl-autocomplete-input",
1070
1069
  value: u,
1071
1070
  onChange: (c) => q(c.target.value),
1072
- startAdornment: H(y),
1071
+ startAdornment: H(x),
1073
1072
  endAdornment: K()
1074
1073
  }
1075
1074
  ),
@@ -1094,7 +1093,7 @@ function mr({
1094
1093
  }
1095
1094
  ),
1096
1095
  /* @__PURE__ */ t(
1097
- Ft,
1096
+ Lt,
1098
1097
  {
1099
1098
  ref: i,
1100
1099
  open: !!u && d,
@@ -1126,7 +1125,7 @@ function mr({
1126
1125
  }
1127
1126
  },
1128
1127
  renderInput: (c) => /* @__PURE__ */ t(
1129
- _t,
1128
+ Mt,
1130
1129
  {
1131
1130
  ...c,
1132
1131
  InputProps: {
@@ -1147,7 +1146,7 @@ function mr({
1147
1146
  value: $,
1148
1147
  sx: [
1149
1148
  {
1150
- bgcolor: "#F9FAFB",
1149
+ bgcolor: "grey.50",
1151
1150
  borderRadius: "8px",
1152
1151
  overflow: "hidden",
1153
1152
  ".MuiOutlinedInput-notchedOutline": {
@@ -1165,7 +1164,7 @@ function mr({
1165
1164
  )
1166
1165
  ] });
1167
1166
  function q(c) {
1168
- p(!0), g(c), m.current = !1, z.run(c);
1167
+ p(!0), g(c), m.current = !1, F.run(c);
1169
1168
  }
1170
1169
  function j() {
1171
1170
  I(!1), g(""), q(""), l("");
@@ -1202,25 +1201,25 @@ function mr({
1202
1201
  justifyContent: "center",
1203
1202
  alignItems: "center",
1204
1203
  color: "text.hint",
1205
- bgcolor: "#F1F3F5",
1204
+ bgcolor: "grey.100",
1206
1205
  borderRadius: "8px",
1207
1206
  children: /* @__PURE__ */ t(te, { sx: { fontSize: 28 } })
1208
1207
  }
1209
1208
  );
1210
1209
  let S = "";
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" } });
1210
+ return c.logo && (S = Re(e, "assets", c.did, qe(c.logo, pe, c.version))), /* @__PURE__ */ t(He, { src: S, size: pe, style: { borderRadius: "8px", overflow: "hidden" } });
1212
1211
  }
1213
1212
  function H(c = !0) {
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" } }) });
1213
+ return /* @__PURE__ */ t(w, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.hint" }, children: c && u && R ? /* @__PURE__ */ t(le, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(te, { sx: { fontSize: 16, cursor: "default" } }) });
1215
1214
  }
1216
1215
  function K() {
1217
1216
  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;
1218
1217
  }
1219
1218
  }
1220
1219
  function fr({ placeholder: e, ...r }) {
1221
- const { search: o, t: n } = R(), { filters: l, handleKeyword: a } = o, [s, i] = E(l.keyword || ""), m = De(a, { wait: 300 }), d = (g) => {
1222
- const { value: y } = g.target;
1223
- i(y), m.run(y);
1220
+ const { search: o, t: n } = B(), { filters: l, handleKeyword: a } = o, [s, i] = E(l.keyword || ""), m = De(a, { wait: 300 }), d = (g) => {
1221
+ const { value: x } = g.target;
1222
+ i(x), m.run(x);
1224
1223
  }, f = () => {
1225
1224
  i(""), a("");
1226
1225
  };
@@ -1234,13 +1233,13 @@ function fr({ placeholder: e, ...r }) {
1234
1233
  inputProps: {
1235
1234
  "data-cy": "search-blocklet"
1236
1235
  },
1237
- startAdornment: /* @__PURE__ */ t(Ae, { position: "start", children: /* @__PURE__ */ t(xr, { sx: { fontSize: 18, ml: -0.5 } }) }),
1236
+ startAdornment: /* @__PURE__ */ t(Ae, { position: "start", children: /* @__PURE__ */ t(yr, { sx: { fontSize: 18, ml: -0.5 } }) }),
1238
1237
  onChange: d,
1239
1238
  placeholder: u,
1240
1239
  value: s,
1241
1240
  title: u,
1242
1241
  "data-cy": "search",
1243
- endAdornment: s && /* @__PURE__ */ t(Ae, { position: "end", children: /* @__PURE__ */ t(yr, { "data-cy": "search-delete", onClick: f }) }),
1242
+ endAdornment: s && /* @__PURE__ */ t(Ae, { position: "end", children: /* @__PURE__ */ t(xr, { "data-cy": "search-delete", onClick: f }) }),
1244
1243
  ...r
1245
1244
  }
1246
1245
  );
@@ -1262,9 +1261,9 @@ const gr = Q(Ue)`
1262
1261
  color: transparent;
1263
1262
  }
1264
1263
  }
1265
- `, xr = Q(te)`
1264
+ `, yr = Q(te)`
1266
1265
  color: ${(e) => e.theme.palette.grey[500]};
1267
- `, yr = Q(ke)`
1266
+ `, xr = Q(ke)`
1268
1267
  color: ${(e) => e.theme.palette.grey[500]};
1269
1268
  font-size: 16px;
1270
1269
  cursor: pointer;
@@ -1283,7 +1282,7 @@ function wr() {
1283
1282
  baseSearch: m,
1284
1283
  categoryOptions: d,
1285
1284
  compact: f
1286
- } = R(), { filters: u, handleSort: g, handlePrice: y, handleDeveloper: I, handleSwitchShowResources: x, cleanFilter: B, handleCategory: p } = e, C = Ge(r);
1285
+ } = B(), { filters: u, handleSort: g, handlePrice: x, handleDeveloper: I, handleSwitchShowResources: y, cleanFilter: R, handleCategory: p } = e, C = Ge(r);
1287
1286
  return /* @__PURE__ */ h(
1288
1287
  O,
1289
1288
  {
@@ -1343,27 +1342,27 @@ function wr() {
1343
1342
  {
1344
1343
  label: r("blocklet.resourceTag", { name: u.resourceBlocklet }),
1345
1344
  size: "small",
1346
- onDelete: () => B(["resourceDid", "resourceBlocklet", "showResources"])
1345
+ onDelete: () => R(["resourceDid", "resourceBlocklet", "showResources"])
1347
1346
  }
1348
1347
  ),
1349
1348
  s ? /* @__PURE__ */ t(
1350
- Fe,
1349
+ Le,
1351
1350
  {
1352
1351
  checked: u.showResources !== "false",
1353
- onChange: (k) => x(k ? "true" : "false"),
1352
+ onChange: (k) => y(k ? "true" : "false"),
1354
1353
  label: r("common.showResources")
1355
1354
  }
1356
1355
  ) : null,
1357
1356
  /* @__PURE__ */ t(
1358
- Fe,
1357
+ Le,
1359
1358
  {
1360
1359
  checked: u.price === "free",
1361
- onChange: (k) => y(k ? "free" : ""),
1360
+ onChange: (k) => x(k ? "free" : ""),
1362
1361
  label: r("blocklet.free")
1363
1362
  }
1364
1363
  ),
1365
1364
  f && /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(
1366
- xe,
1365
+ ye,
1367
1366
  {
1368
1367
  value: u.category || ((b = d[0]) == null ? void 0 : b.value),
1369
1368
  options: d,
@@ -1372,7 +1371,7 @@ function wr() {
1372
1371
  }
1373
1372
  ) }),
1374
1373
  /* @__PURE__ */ t(
1375
- xe,
1374
+ ye,
1376
1375
  {
1377
1376
  value: u.sortBy || C[0].value,
1378
1377
  options: C,
@@ -1387,7 +1386,7 @@ function wr() {
1387
1386
  }
1388
1387
  );
1389
1388
  }
1390
- function Fe({
1389
+ function Le({
1391
1390
  checked: e,
1392
1391
  onChange: r,
1393
1392
  label: o
@@ -1402,7 +1401,7 @@ function Fe({
1402
1401
  Ne,
1403
1402
  {
1404
1403
  checked: e,
1405
- icon: /* @__PURE__ */ t(X, { style: { padding: 0 }, icon: At }),
1404
+ icon: /* @__PURE__ */ t(X, { style: { padding: 0, color: n.palette.text.secondary }, icon: At }),
1406
1405
  checkedIcon: /* @__PURE__ */ t(X, { style: { padding: 0, color: n.palette.primary.main }, icon: Et }),
1407
1406
  size: "large",
1408
1407
  sx: { p: 0, mr: 1 },
@@ -1415,16 +1414,16 @@ function Fe({
1415
1414
  }
1416
1415
  function ee({ children: e }) {
1417
1416
  return /* @__PURE__ */ h(w, { display: "flex", mt: 2, flexDirection: "column", alignItems: "center", justifyContent: "center", color: "text.hint", children: [
1418
- /* @__PURE__ */ t(zt, {}),
1417
+ /* @__PURE__ */ t(Ft, {}),
1419
1418
  e
1420
1419
  ] });
1421
1420
  }
1422
- function Le() {
1423
- const { t: e } = R();
1421
+ function _e() {
1422
+ const { t: e } = B();
1424
1423
  return /* @__PURE__ */ t(v, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
1425
1424
  }
1426
1425
  function me({ filterTip: e, keywordTip: r }) {
1427
- const { t: o, locale: n } = R(), l = () => n === "zh" ? "、" : " , ";
1426
+ const { t: o, locale: n } = B(), l = () => n === "zh" ? "、" : " , ";
1428
1427
  return /* @__PURE__ */ h(w, { mt: 1, display: "flex", children: [
1429
1428
  /* @__PURE__ */ t(v, { style: { marginRight: "16px" }, children: o("blocklet.emptyTip") }),
1430
1429
  e && /* @__PURE__ */ t(v, { children: o("blocklet.filterTip") }),
@@ -1455,7 +1454,7 @@ function fe({
1455
1454
  ] });
1456
1455
  }
1457
1456
  function br() {
1458
- const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = R(), { filters: l } = r, a = !!n || !!l.price;
1457
+ const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = B(), { filters: l } = r, a = !!n || !!l.price;
1459
1458
  if (l.keyword && a)
1460
1459
  return /* @__PURE__ */ h(ee, { children: [
1461
1460
  /* @__PURE__ */ t(
@@ -1490,11 +1489,11 @@ function br() {
1490
1489
  primaryEnd: e("blocklet.noCategoryResults2"),
1491
1490
  filter: s
1492
1491
  }
1493
- ) : /* @__PURE__ */ t(Le, {}),
1492
+ ) : /* @__PURE__ */ t(_e, {}),
1494
1493
  /* @__PURE__ */ t(me, { filterTip: !0 })
1495
1494
  ] });
1496
1495
  }
1497
- return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(Le, {}) });
1496
+ return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(_e, {}) });
1498
1497
  }
1499
1498
  const kr = (e, r, o, n) => dt(
1500
1499
  async (l) => {
@@ -1518,19 +1517,19 @@ const kr = (e, r, o, n) => dt(
1518
1517
  );
1519
1518
  function vr() {
1520
1519
  var u;
1521
- const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: l } = R(), { filters: a } = r, s = ut({
1520
+ const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: l } = B(), { filters: a } = r, s = ut({
1522
1521
  currentPage: P.currentPage,
1523
1522
  pageSize: Qt() ? P.mobilePageSize : P.pageSize,
1524
1523
  defaultCurrentPage: P.defaultCurrentPage
1525
1524
  }), [i, m] = E(null), d = kr(e, a, s, m), f = V(
1526
1525
  () => {
1527
- var g, y;
1528
- return o ? o(((g = d.data) == null ? void 0 : g.list) || []) : ((y = d.data) == null ? void 0 : y.list) || [];
1526
+ var g, x;
1527
+ return o ? o(((g = d.data) == null ? void 0 : g.list) || []) : ((x = d.data) == null ? void 0 : x.list) || [];
1529
1528
  },
1530
1529
  [d.data, o]
1531
1530
  );
1532
1531
  return G(() => {
1533
- const g = f.find((y) => y.owner.did === a.owner);
1532
+ const g = f.find((x) => x.owner.did === a.owner);
1534
1533
  l((g == null ? void 0 : g.owner.fullName) || (g == null ? void 0 : g.author.name) || "");
1535
1534
  }, [a.owner, f, l]), {
1536
1535
  blocklets: f,
@@ -1549,8 +1548,8 @@ function vr() {
1549
1548
  };
1550
1549
  }
1551
1550
  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({
1553
- loading: y.fetchBlockletsLoading || y.loadingMore,
1551
+ const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: l, minItemWidth: a, layout: s, baseSearch: i, compact: m } = B(), { filters: d } = r, { blocklets: f, errors: u, loadMore: g, loadings: x, hasNextPage: I, total: y } = vr(), [R] = Pt({
1552
+ loading: x.fetchBlockletsLoading || x.loadingMore,
1554
1553
  hasNextPage: I,
1555
1554
  onLoadMore: g
1556
1555
  });
@@ -1559,16 +1558,16 @@ function Cr() {
1559
1558
  return /* @__PURE__ */ t(be, { error: k });
1560
1559
  }
1561
1560
  const p = i && s.showSearch || !d.keyword;
1562
- return /* @__PURE__ */ h(M, { children: [
1563
- p ? /* @__PURE__ */ t(wr, {}) : /* @__PURE__ */ h(M, { children: [
1561
+ return /* @__PURE__ */ h(z, { children: [
1562
+ p ? /* @__PURE__ */ t(wr, {}) : /* @__PURE__ */ h(z, { children: [
1564
1563
  /* @__PURE__ */ t(Se, { xs: /* @__PURE__ */ t(Ze, {}), md: null }),
1565
1564
  b()
1566
1565
  ] }),
1567
1566
  C(),
1568
- !y.fetchBlockletsLoading && I && /* @__PURE__ */ t(w, { height: 70, minHeight: 70, display: "flex", justifyContent: "center", py: 2, overflow: "hidden", ref: B, children: /* @__PURE__ */ t(le, {}) })
1567
+ !x.fetchBlockletsLoading && I && /* @__PURE__ */ t(w, { height: 70, minHeight: 70, display: "flex", justifyContent: "center", py: 2, overflow: "hidden", ref: R, children: /* @__PURE__ */ t(le, {}) })
1569
1568
  ] });
1570
1569
  function C() {
1571
- return y.fetchBlockletsLoading ? /* @__PURE__ */ t(Je, { mt: 15 }) : f.length ? /* @__PURE__ */ t(
1570
+ return x.fetchBlockletsLoading ? /* @__PURE__ */ t(Je, { mt: 15 }) : f.length ? /* @__PURE__ */ t(
1572
1571
  w,
1573
1572
  {
1574
1573
  className: "blocklet-list",
@@ -1617,14 +1616,14 @@ function Cr() {
1617
1616
  children: e("blocklet.search", { keyword: d.keyword })
1618
1617
  }
1619
1618
  ),
1620
- /* @__PURE__ */ t(v, { variant: "body1", color: "text.hint", fontSize: 13, children: e("blocklet.resultCount", { count: x }) })
1619
+ /* @__PURE__ */ t(v, { variant: "body1", color: "text.hint", fontSize: 13, children: e("blocklet.resultCount", { count: y }) })
1621
1620
  ]
1622
1621
  }
1623
1622
  );
1624
1623
  }
1625
1624
  }
1626
1625
  function Sr() {
1627
- const { t: e, selectedCategory: r, getCategoryLocale: o } = R(), { toggleOpen: n } = Ce();
1626
+ const { t: e, selectedCategory: r, getCategoryLocale: o } = B(), { toggleOpen: n } = Ce();
1628
1627
  return /* @__PURE__ */ h(
1629
1628
  v,
1630
1629
  {
@@ -1643,7 +1642,7 @@ function Sr() {
1643
1642
  }
1644
1643
  function Ir({ menus: e, children: r }) {
1645
1644
  var d;
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
+ const { search: o, layout: n, compact: l } = B(), { 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;
1647
1646
  return /* @__PURE__ */ t(jt, { children: /* @__PURE__ */ h(st, { FallbackComponent: be, children: [
1648
1647
  !l && /* @__PURE__ */ t(Sr, {}),
1649
1648
  /* @__PURE__ */ h(
@@ -1679,29 +1678,29 @@ function Ir({ menus: e, children: r }) {
1679
1678
  )
1680
1679
  ] }) });
1681
1680
  }
1682
- function Lo(e) {
1681
+ function _o(e) {
1683
1682
  return /* @__PURE__ */ h(Wt, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
1684
1683
  /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, pb: 1, children: [
1685
1684
  /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 2, flex: 1, children: [
1686
- /* @__PURE__ */ t(F, { variant: "rounded", width: 48, height: 48 }),
1687
- /* @__PURE__ */ t(F, { variant: "text", width: 60, height: 28 })
1685
+ /* @__PURE__ */ t(L, { variant: "rounded", width: 48, height: 48 }),
1686
+ /* @__PURE__ */ t(L, { variant: "text", width: 60, height: 28 })
1688
1687
  ] }),
1689
- /* @__PURE__ */ t(F, { variant: "text", width: 70, height: 40 })
1688
+ /* @__PURE__ */ t(L, { variant: "text", width: 70, height: 40 })
1690
1689
  ] }),
1691
- /* @__PURE__ */ t(F, { variant: "text", width: "100%", height: 24 }),
1692
- /* @__PURE__ */ t(F, { variant: "text", width: "90%", height: 24 }),
1690
+ /* @__PURE__ */ t(L, { variant: "text", width: "100%", height: 24 }),
1691
+ /* @__PURE__ */ t(L, { variant: "text", width: "90%", height: 24 }),
1693
1692
  /* @__PURE__ */ h(ce, { display: "flex", alignItems: "center", gap: 1, pt: 1.5, children: [
1694
- /* @__PURE__ */ t(F, { variant: "rounded", width: 24, height: 24 }),
1695
- /* @__PURE__ */ t(F, { variant: "text", width: "15%", height: 20 }),
1696
- /* @__PURE__ */ t(F, { variant: "rounded", width: 24, height: 24, sx: { ml: 1 } }),
1697
- /* @__PURE__ */ t(F, { variant: "text", width: "15%", height: 20 })
1693
+ /* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24 }),
1694
+ /* @__PURE__ */ t(L, { variant: "text", width: "15%", height: 20 }),
1695
+ /* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24, sx: { ml: 1 } }),
1696
+ /* @__PURE__ */ t(L, { variant: "text", width: "15%", height: 20 })
1698
1697
  ] })
1699
1698
  ] });
1700
1699
  }
1701
- function _o({ showSkeleton: e, ...r }) {
1702
- return e ? /* @__PURE__ */ t(L, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t($t, { ...r });
1700
+ function Mo({ showSkeleton: e, ...r }) {
1701
+ return e ? /* @__PURE__ */ t(_, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t($t, { ...r });
1703
1702
  }
1704
- function Mo(e) {
1703
+ function zo(e) {
1705
1704
  const { menus: r, children: o, ...n } = e, l = we(), a = et(
1706
1705
  it({}, l, {
1707
1706
  typography: {
@@ -1734,8 +1733,8 @@ function Mo(e) {
1734
1733
  }
1735
1734
  export {
1736
1735
  mr as Autocomplete,
1737
- Lo as CardSkeleton,
1738
- _o as Image,
1739
- Mo as default,
1736
+ _o as CardSkeleton,
1737
+ Mo as Image,
1738
+ zo as default,
1740
1739
  Ut as useSearch
1741
1740
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/list",
3
- "version": "0.16.46",
3
+ "version": "0.16.48",
4
4
  "description": "Common ux components of blocklet",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@blocklet/js-sdk": "^1.16.42",
56
- "@blocklet/util": "0.16.46",
56
+ "@blocklet/util": "0.16.48",
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": "b8f69856c8f8171e28be52823792340c0979f9a7"
94
+ "gitHead": "2cc1c6d728c27977209a451159d59fd73961249c"
95
95
  }