@blocklet/discuss-kit-ux 1.5.185 → 1.5.186

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,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, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-8d296d98.mjs";
7
+ import { i as inferInitialEditorState, I as ImagePathFixerPlugin, a as isEmptyContent, s as stringify, g as getExcerptSync } from "./index-625024f0.mjs";
8
8
  import "@blocklet/labels";
9
9
  import "@mui/material/styles";
10
10
  import "@mui/material/Box";
@@ -642,6 +642,8 @@ const iconStyle = {
642
642
  width: 20,
643
643
  height: 20
644
644
  };
645
+ const animationHeight = 8;
646
+ const getExtraAnimation = (value) => "";
645
647
  const formatKey = (key) => {
646
648
  return trim(key == null ? void 0 : key.toLowerCase());
647
649
  };
@@ -707,11 +709,12 @@ function Badge({ startComponent, passports, pointInfo, did, spacing = 0.5, ...re
707
709
  if (badgeIcon) {
708
710
  const isHttpIcon = ["http", "/", "data"].some((prefix2) => badgeIcon.startsWith(prefix2));
709
711
  if (!isHttpIcon) {
710
- icon = /* @__PURE__ */ jsx(Icon, { icon: badgeIcon, color: badgeColor, style: { ...iconStyle } });
712
+ icon = /* @__PURE__ */ jsx(Icon, { className: "badge-icon", icon: badgeIcon, color: badgeColor, style: { ...iconStyle } });
711
713
  } else {
712
714
  icon = /* @__PURE__ */ jsx(
713
715
  Avatar$1,
714
716
  {
717
+ className: "badge-icon",
715
718
  sx: {
716
719
  img: {
717
720
  userSelect: "none !important",
@@ -740,7 +743,32 @@ function Badge({ startComponent, passports, pointInfo, did, spacing = 0.5, ...re
740
743
  fontSize: 12,
741
744
  px: 0.25,
742
745
  my: "2px !important",
743
- mr: spacing
746
+ mr: spacing,
747
+ "@keyframes jump": {
748
+ "0%": {
749
+ transform: `translateY(0) ${getExtraAnimation()}`
750
+ },
751
+ "25%": {
752
+ transform: `translateY(-${animationHeight}px) ${getExtraAnimation()}`
753
+ },
754
+ "50%": {
755
+ transform: `translateY(0px) ${getExtraAnimation()}`
756
+ },
757
+ "75%": {
758
+ transform: `translateY(-${animationHeight}px) ${getExtraAnimation()}`
759
+ },
760
+ "100%": {
761
+ transform: `translateY(0) ${getExtraAnimation()}`
762
+ }
763
+ },
764
+ "*": {
765
+ transition: "all 0.2s ease-in-out"
766
+ },
767
+ ":hover": {
768
+ ".badge-icon": {
769
+ // animation: 'jump 2s infinite',
770
+ }
771
+ }
744
772
  },
745
773
  ...restProps
746
774
  }
@@ -947,7 +975,7 @@ function AuthorInfo({
947
975
  const BadgeRender = /* @__PURE__ */ jsx(
948
976
  Badge,
949
977
  {
950
- startComponent: !downMd && /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }, "dot"),
978
+ startComponent: !downMd && /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5 }, "dot"),
951
979
  passports: user.passports || [],
952
980
  pointInfo: user.pointInfo || {},
953
981
  did: user.did
@@ -956,15 +984,22 @@ function AuthorInfo({
956
984
  return /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
957
985
  renderAvatar(),
958
986
  /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", flexDirection: "column" }, children: [
959
- /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", height: 20 }, lineHeight: 1, children: [
960
- /* @__PURE__ */ jsx("span", { children: user.fullName }),
961
- createdAt && /* @__PURE__ */ jsxs(Fragment, { children: [
962
- /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
963
- renderTime()
964
- ] }),
965
- append,
966
- !downMd && BadgeRender
967
- ] }),
987
+ /* @__PURE__ */ jsxs(
988
+ Box,
989
+ {
990
+ sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
991
+ lineHeight: 1,
992
+ children: [
993
+ /* @__PURE__ */ jsx("span", { children: user.fullName }),
994
+ createdAt && /* @__PURE__ */ jsxs(Fragment, { children: [
995
+ /* @__PURE__ */ jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
996
+ renderTime()
997
+ ] }),
998
+ append,
999
+ !downMd && BadgeRender
1000
+ ]
1001
+ }
1002
+ ),
968
1003
  downMd && /* @__PURE__ */ jsx(Box, { mt: 0.5, children: BadgeRender }),
969
1004
  !(responsive && downMd) && /* @__PURE__ */ jsx(DIDAddress, { inline: true, responsive: false, compact: true, copyable: false, style: { lineHeight: 1, height: 20 }, children: user.did })
970
1005
  ] })
@@ -4278,7 +4313,7 @@ function Pagination({ page, size = 20, total, onChange, routerMode = true, ...re
4278
4313
  }
4279
4314
  );
4280
4315
  }
4281
- const Editor = lazy(() => import("./editor-c78610e0.mjs"));
4316
+ const Editor = lazy(() => import("./editor-c429bd0d.mjs"));
4282
4317
  function LazyEditor(props) {
4283
4318
  const fallback = /* @__PURE__ */ jsxs(Fragment, { children: [
4284
4319
  /* @__PURE__ */ jsx(Skeleton, {}),
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "@blocklet/labels";
2
- import { K, j, N, A, h, a5, B, z, y, E, Q, O, T, V, o, C, q, v, x, Z, _, a9, a0, H, J, D, a8, a7, G, c, b, a6, M, P, ag, n, m, a4, R, S, a1, k, W, Y, aa, ad, ac, ae, ah, F, ai, l, p, r, t, d, a2, L, e, U, w, $, a3, u, af, aj, X, ab, f } from "./index-8d296d98.mjs";
2
+ import { K, j, N, A, h, a5, B, z, y, E, Q, O, T, V, o, C, q, v, x, Z, _, a9, a0, H, J, D, a8, a7, G, c, b, a6, M, P, ag, n, m, a4, R, S, a1, k, W, Y, aa, ad, ac, ae, ah, F, ai, l, p, r, t, d, a2, L, e, U, w, $, a3, u, af, aj, X, ab, f } from "./index-625024f0.mjs";
3
3
  import "react/jsx-runtime";
4
4
  import "react";
5
5
  import "@mui/material/Box";
package/dist/index.umd.js CHANGED
@@ -587,6 +587,8 @@ var __publicField = (obj, key, value) => {
587
587
  width: 20,
588
588
  height: 20
589
589
  };
590
+ const animationHeight = 8;
591
+ const getExtraAnimation = (value) => "";
590
592
  const formatKey = (key) => {
591
593
  return trim(key == null ? void 0 : key.toLowerCase());
592
594
  };
@@ -652,11 +654,12 @@ var __publicField = (obj, key, value) => {
652
654
  if (badgeIcon) {
653
655
  const isHttpIcon = ["http", "/", "data"].some((prefix2) => badgeIcon.startsWith(prefix2));
654
656
  if (!isHttpIcon) {
655
- icon = /* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { icon: badgeIcon, color: badgeColor, style: { ...iconStyle } });
657
+ icon = /* @__PURE__ */ jsxRuntime.jsx(react$1.Icon, { className: "badge-icon", icon: badgeIcon, color: badgeColor, style: { ...iconStyle } });
656
658
  } else {
657
659
  icon = /* @__PURE__ */ jsxRuntime.jsx(
658
660
  Avatar$1,
659
661
  {
662
+ className: "badge-icon",
660
663
  sx: {
661
664
  img: {
662
665
  userSelect: "none !important",
@@ -685,7 +688,32 @@ var __publicField = (obj, key, value) => {
685
688
  fontSize: 12,
686
689
  px: 0.25,
687
690
  my: "2px !important",
688
- mr: spacing
691
+ mr: spacing,
692
+ "@keyframes jump": {
693
+ "0%": {
694
+ transform: `translateY(0) ${getExtraAnimation()}`
695
+ },
696
+ "25%": {
697
+ transform: `translateY(-${animationHeight}px) ${getExtraAnimation()}`
698
+ },
699
+ "50%": {
700
+ transform: `translateY(0px) ${getExtraAnimation()}`
701
+ },
702
+ "75%": {
703
+ transform: `translateY(-${animationHeight}px) ${getExtraAnimation()}`
704
+ },
705
+ "100%": {
706
+ transform: `translateY(0) ${getExtraAnimation()}`
707
+ }
708
+ },
709
+ "*": {
710
+ transition: "all 0.2s ease-in-out"
711
+ },
712
+ ":hover": {
713
+ ".badge-icon": {
714
+ // animation: 'jump 2s infinite',
715
+ }
716
+ }
689
717
  },
690
718
  ...restProps
691
719
  }
@@ -892,7 +920,7 @@ var __publicField = (obj, key, value) => {
892
920
  const BadgeRender = /* @__PURE__ */ jsxRuntime.jsx(
893
921
  Badge,
894
922
  {
895
- startComponent: !downMd && /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }, "dot"),
923
+ startComponent: !downMd && /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5 }, "dot"),
896
924
  passports: user.passports || [],
897
925
  pointInfo: user.pointInfo || {},
898
926
  did: user.did
@@ -901,15 +929,22 @@ var __publicField = (obj, key, value) => {
901
929
  return /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, fontSize }, ...rest, children: [
902
930
  renderAvatar(),
903
931
  /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", flexDirection: "column" }, children: [
904
- /* @__PURE__ */ jsxRuntime.jsxs(Box, { sx: { display: "flex", alignItems: "center", height: 20 }, lineHeight: 1, children: [
905
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: user.fullName }),
906
- createdAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
907
- /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
908
- renderTime()
909
- ] }),
910
- append,
911
- !downMd && BadgeRender
912
- ] }),
932
+ /* @__PURE__ */ jsxRuntime.jsxs(
933
+ Box,
934
+ {
935
+ sx: { display: "flex", alignItems: "center", minHeight: 20, flexWrap: "wrap", lineHeight: 1.5 },
936
+ lineHeight: 1,
937
+ children: [
938
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: user.fullName }),
939
+ createdAt && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
940
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { component: "span", display: "inline-block", mx: 0.5, children: "·" }),
941
+ renderTime()
942
+ ] }),
943
+ append,
944
+ !downMd && BadgeRender
945
+ ]
946
+ }
947
+ ),
913
948
  downMd && /* @__PURE__ */ jsxRuntime.jsx(Box, { mt: 0.5, children: BadgeRender }),
914
949
  !(responsive && downMd) && /* @__PURE__ */ jsxRuntime.jsx(DIDAddress, { inline: true, responsive: false, compact: true, copyable: false, style: { lineHeight: 1, height: 20 }, children: user.did })
915
950
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/discuss-kit-ux",
3
- "version": "1.5.185",
3
+ "version": "1.5.186",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@arcblock/ws": "^1.18.95",
32
- "@blocklet/editor": "1.5.185",
33
- "@blocklet/labels": "1.5.185",
32
+ "@blocklet/editor": "1.5.186",
33
+ "@blocklet/labels": "1.5.186",
34
34
  "@blocklet/uploader": "^0.0.45",
35
35
  "@emotion/css": "^11.10.5",
36
36
  "@emotion/react": "^11.10.5",
@@ -93,5 +93,5 @@
93
93
  "resolutions": {
94
94
  "react": "^18.2.0"
95
95
  },
96
- "gitHead": "ddb802ddbf61267404f1b151483ccbdfc549099f"
96
+ "gitHead": "5779304dfb653bfa91e78094391c84a03a48d00c"
97
97
  }