@blocklet/discuss-kit-ux 2.1.1 → 2.1.3

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.
@@ -4,8 +4,9 @@ interface Props {
4
4
  did?: string;
5
5
  spacing?: number;
6
6
  startComponent?: any;
7
- [key: string]: any;
8
7
  inProfile?: boolean;
8
+ emptyProps?: Record<string, any>;
9
+ [key: string]: any;
9
10
  }
10
- export default function Badge({ startComponent, passports, pointInfo, did, spacing, inProfile, ...restProps }: Props): import("react/jsx-runtime").JSX.Element | null;
11
+ export default function Badge({ startComponent, passports, pointInfo, did, spacing, inProfile, emptyProps, ...restProps }: Props): import("react/jsx-runtime").JSX.Element | null;
11
12
  export {};
@@ -4,7 +4,7 @@ import { OnContentChangePlugin } from "@blocklet/editor/lib/ext/OnContentChangeP
4
4
  import { CtrlsShortcutPlugin } from "@blocklet/editor/lib/ext/ShortcutPlugin";
5
5
  import { SafeAreaPlugin } from "@blocklet/editor/lib/ext/SafeAreaPlugin";
6
6
  import { lazy } from "react";
7
- import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-Dg_94VmY.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, V as VideoPathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-DJrI2eNo.mjs";
8
8
  const BlockletEditor = lazy(() => import("@blocklet/editor"));
9
9
  const Root = styled(Box)`
10
10
  .be-editable,
@@ -882,10 +882,10 @@ function EmptyStatus({ sx }) {
882
882
  return /* @__PURE__ */ jsx(
883
883
  Box$1,
884
884
  {
885
- sx: { height: "50vh", width: "100%", ...sx },
885
+ sx: mergeSx({ height: "50vh", width: "100%" }, sx),
886
886
  display: "flex",
887
887
  flexDirection: "column",
888
- alignItems: "cetner",
888
+ alignItems: "center",
889
889
  justifyContent: "center",
890
890
  children: /* @__PURE__ */ jsx(Empty$3, { children: t("profile.empty") })
891
891
  }
@@ -930,6 +930,7 @@ function Badge({
930
930
  did,
931
931
  spacing = 0.5,
932
932
  inProfile = false,
933
+ emptyProps,
933
934
  ...restProps
934
935
  }) {
935
936
  var _a2;
@@ -959,7 +960,7 @@ function Badge({
959
960
  return JSON.stringify(item);
960
961
  });
961
962
  if (inProfile && (uniqBadges == null ? void 0 : uniqBadges.length) <= 0) {
962
- return /* @__PURE__ */ jsx(EmptyStatus, {});
963
+ return /* @__PURE__ */ jsx(EmptyStatus, { ...emptyProps });
963
964
  }
964
965
  return uniqBadges.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
965
966
  startComponent,
@@ -4715,7 +4716,7 @@ function Back({ url, fallbackUrl, iconOnly, sx, ...rest }) {
4715
4716
  }
4716
4717
  const tablerSend = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M10 14L21 3m0 0l-6.5 18a.55.55 0 0 1-1 0L10 14l-7-3.5a.55.55 0 0 1 0-1z" }) });
4717
4718
  const tablerLetterCase = (props) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", "data-iconify": "tabler", width: "1.2em", height: "1.2em", ...props, children: /* @__PURE__ */ jsx("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0-7 0M3 19V8.5a3.5 3.5 0 0 1 7 0V19m-7-6h7m11-1v7" }) });
4718
- const Editor = lazy(() => import("./editor-IcWrVf5F.mjs"));
4719
+ const Editor = lazy(() => import("./editor-DmeTB3KQ.mjs"));
4719
4720
  function LazyEditor(props) {
4720
4721
  const fallback2 = /* @__PURE__ */ jsxs(Box, { sx: { px: 3 }, children: [
4721
4722
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-Dg_94VmY.mjs";
2
+ import { T, n, W, A, m, ad, B, F, K, J, L, ap, Y, X, $, Z, _, a1, w, C, x, y, E, a5, a6, ah, a8, O, Q, ac, D, ag, af, H, G, b, k, ae, M, P, ao, v, q, R, S, a9, aq, o, a2, a4, ai, al, ak, am, ar, N, as, l, f, p, r, j, t, h, aa, U, c, a0, z, a7, ab, u, an, d, at, a3, aj, e } from "./index-DJrI2eNo.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -807,10 +807,10 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
807
807
  return /* @__PURE__ */ jsxRuntime.jsx(
808
808
  Box,
809
809
  {
810
- sx: { height: "50vh", width: "100%", ...sx },
810
+ sx: mergeSx({ height: "50vh", width: "100%" }, sx),
811
811
  display: "flex",
812
812
  flexDirection: "column",
813
- alignItems: "cetner",
813
+ alignItems: "center",
814
814
  justifyContent: "center",
815
815
  children: /* @__PURE__ */ jsxRuntime.jsx(Empty$3, { children: t("profile.empty") })
816
816
  }
@@ -855,6 +855,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
855
855
  did,
856
856
  spacing = 0.5,
857
857
  inProfile = false,
858
+ emptyProps,
858
859
  ...restProps
859
860
  }) {
860
861
  var _a2;
@@ -884,7 +885,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
884
885
  return JSON.stringify(item);
885
886
  });
886
887
  if (inProfile && (uniqBadges == null ? void 0 : uniqBadges.length) <= 0) {
887
- return /* @__PURE__ */ jsxRuntime.jsx(EmptyStatus, {});
888
+ return /* @__PURE__ */ jsxRuntime.jsx(EmptyStatus, { ...emptyProps });
888
889
  }
889
890
  return uniqBadges.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
890
891
  startComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -43,8 +43,8 @@
43
43
  "ufo": "^1.5.4",
44
44
  "unstated-next": "^1.1.0",
45
45
  "url-join": "^4.0.1",
46
- "@blocklet/editor": "^2.1.1",
47
- "@blocklet/labels": "^2.1.1"
46
+ "@blocklet/editor": "^2.1.3",
47
+ "@blocklet/labels": "^2.1.3"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@arcblock/did-connect": "^2.10.36",