@blocklet/ui-react 3.0.9 → 3.0.11

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 (51) hide show
  1. package/lib/BlockletStudio/index.js +70 -71
  2. package/lib/ComponentInstaller/index.js +85 -88
  3. package/lib/ComponentInstaller/installer-item.js +47 -53
  4. package/lib/ComponentInstaller/use-component-installed.js +32 -38
  5. package/lib/ComponentManager/components/add-component.js +47 -50
  6. package/lib/ComponentManager/components/publish-component.js +30 -31
  7. package/lib/ComponentManager/components/resource-dialog.js +28 -30
  8. package/lib/Dashboard/index.d.ts +1 -1
  9. package/lib/Dashboard/index.js +59 -61
  10. package/lib/Footer/index.js +51 -52
  11. package/lib/Footer/internal-footer.js +43 -47
  12. package/lib/Footer/layout/standard.js +11 -12
  13. package/lib/Footer/links.js +25 -28
  14. package/lib/Footer/social-media.js +17 -17
  15. package/lib/Header/index.js +81 -83
  16. package/lib/Notifications/Snackbar.js +76 -77
  17. package/lib/Notifications/hooks/use-title.js +34 -34
  18. package/lib/Notifications/utils.js +56 -60
  19. package/lib/UserCenter/components/config-inviter.js +17 -18
  20. package/lib/UserCenter/components/danger-zone.js +49 -52
  21. package/lib/UserCenter/components/nft.js +44 -45
  22. package/lib/UserCenter/components/notification.js +92 -99
  23. package/lib/UserCenter/components/passport.js +22 -22
  24. package/lib/UserCenter/components/privacy.js +6 -6
  25. package/lib/UserCenter/components/settings.js +40 -43
  26. package/lib/UserCenter/components/status-dialog/date-picker.js +7 -8
  27. package/lib/UserCenter/components/status-dialog/index.js +112 -114
  28. package/lib/UserCenter/components/status-selector/duration-menu.js +35 -36
  29. package/lib/UserCenter/components/status-selector/index.js +13 -13
  30. package/lib/UserCenter/components/storage/action.js +21 -22
  31. package/lib/UserCenter/components/storage/delete.js +24 -24
  32. package/lib/UserCenter/components/third-party-login/index.js +53 -53
  33. package/lib/UserCenter/components/third-party-login/third-party-item.js +87 -89
  34. package/lib/UserCenter/components/user-center.js +198 -207
  35. package/lib/UserCenter/components/user-info/metadata.js +343 -353
  36. package/lib/UserCenter/components/user-info/switch-role.js +17 -20
  37. package/lib/UserCenter/components/user-info/user-basic-info.js +79 -82
  38. package/lib/UserCenter/components/user-info/user-info.js +40 -40
  39. package/lib/UserCenter/components/user-info/user-status.js +97 -99
  40. package/lib/UserCenter/components/user-info/utils.js +34 -35
  41. package/lib/UserSessions/components/user-session-info.js +25 -28
  42. package/lib/UserSessions/components/user-sessions.js +169 -181
  43. package/lib/blocklets.js +62 -72
  44. package/lib/common/domain-warning.js +31 -31
  45. package/lib/common/header-addons.d.ts +1 -1
  46. package/lib/common/header-addons.js +49 -53
  47. package/lib/common/notification-addon.js +29 -32
  48. package/lib/common/ws.js +17 -18
  49. package/lib/contexts/config-user-space.js +16 -19
  50. package/lib/utils.js +44 -48
  51. package/package.json +11 -11
@@ -1,143 +1,141 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useMemo as w } from "react";
3
- import { useMemoizedFn as H } from "ahooks";
4
- import { withErrorBoundary as y } from "react-error-boundary";
5
- import { ErrorFallback as C } from "@arcblock/ux/lib/ErrorBoundary";
6
- import { styled as T, useTheme as _, deepmerge as E, ThemeProvider as F } from "@arcblock/ux/lib/Theme";
7
- import { ResponsiveHeader as L } from "@arcblock/ux/lib/Header";
8
- import P, { Products as R } from "@arcblock/ux/lib/NavMenu";
9
- import { useLocaleContext as z } from "@arcblock/ux/lib/Locale/context";
10
- import { translate as A } from "@arcblock/ux/lib/Locale/util";
11
- import M from "@arcblock/ux/lib/hooks/use-blocklet-logo";
12
- import W from "lodash/omit";
13
- import B from "lodash/isFinite";
14
- import j from "clsx";
15
- import S from "../Icon/index.js";
16
- import { mapRecursive as U, flatRecursive as K, matchPaths as O } from "../utils.js";
17
- import { formatBlockletInfo as q, getLocalizedNavigation as D, publicPath as G } from "../blocklets.js";
18
- import J from "../common/header-addons.js";
19
- import { useWalletHiddenTopbar as Q } from "../common/wallet-hidden-topbar.js";
20
- import V from "../libs/with-hide-when-embed.js";
21
- const X = {
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useMemo as k } from "react";
3
+ import { useMemoizedFn as $ } from "ahooks";
4
+ import { withErrorBoundary as N } from "react-error-boundary";
5
+ import { ErrorFallback as H } from "@arcblock/ux/lib/ErrorBoundary";
6
+ import { styled as y, useTheme as C, deepmerge as T, ThemeProvider as _ } from "@arcblock/ux/lib/Theme";
7
+ import { ResponsiveHeader as E } from "@arcblock/ux/lib/Header";
8
+ import B, { Products as F } from "@arcblock/ux/lib/NavMenu";
9
+ import { useLocaleContext as L } from "@arcblock/ux/lib/Locale/context";
10
+ import { translate as P } from "@arcblock/ux/lib/Locale/util";
11
+ import R from "@arcblock/ux/lib/hooks/use-blocklet-logo";
12
+ import z from "lodash/omit";
13
+ import A from "lodash/isFinite";
14
+ import M from "clsx";
15
+ import W from "../Icon/index.js";
16
+ import { mapRecursive as j, flatRecursive as S, matchPaths as U } from "../utils.js";
17
+ import { formatBlockletInfo as K, getLocalizedNavigation as O, publicPath as q } from "../blocklets.js";
18
+ import D from "../common/header-addons.js";
19
+ import { useWalletHiddenTopbar as G } from "../common/wallet-hidden-topbar.js";
20
+ import J from "../libs/with-hide-when-embed.js";
21
+ const Q = {
22
22
  en: {
23
23
  products: "Products"
24
24
  },
25
25
  zh: {
26
26
  products: "产品"
27
27
  }
28
- }, Y = (e) => {
29
- if (!(e != null && e.length))
28
+ }, V = (e) => {
29
+ if (!e?.length)
30
30
  return { navItems: [], activeId: null };
31
- let t = 1;
32
- const m = U(e, (o) => {
33
- var d, f;
34
- const n = o.icon ? /* @__PURE__ */ l(S, { icon: o.icon }) : null;
31
+ let r = 1;
32
+ const s = j(e, (o) => {
33
+ const i = o.icon ? /* @__PURE__ */ n(W, { icon: o.icon }) : null;
35
34
  if (o.items)
36
35
  return {
37
- id: `${t++}`,
36
+ id: `${r++}`,
38
37
  label: o.title,
39
- icon: n,
38
+ icon: i,
40
39
  children: o.items
41
40
  };
42
- let a = {};
43
- return ((d = o.link) != null && d.startsWith("http") || (f = o.link) != null && f.startsWith("//")) && (a = {
41
+ let l = {};
42
+ return (o.link?.startsWith("http") || o.link?.startsWith("//")) && (l = {
44
43
  target: "_blank",
45
44
  rel: "noreferrer"
46
45
  }), {
47
- id: `${t++}`,
48
- label: /* @__PURE__ */ l("a", { href: o.link, ...a, children: o.title }),
49
- icon: n,
46
+ id: `${r++}`,
47
+ label: /* @__PURE__ */ n("a", { href: o.link, ...l, children: o.title }),
48
+ icon: i,
50
49
  description: o.description,
51
50
  link: o.link
52
51
  };
53
- }, "items"), i = K(m), p = O(i.map((o) => o.link));
54
- return { navItems: m, activeId: p >= 0 ? i[p].id : null };
52
+ }, "items"), a = S(s), d = U(a.map((o) => o.link));
53
+ return { navItems: s, activeId: d >= 0 ? a[d].id : null };
55
54
  };
56
- function Z({
55
+ function X({
57
56
  meta: e = {},
58
- addons: t = void 0,
59
- sessionManagerProps: b = {
57
+ addons: r = void 0,
58
+ sessionManagerProps: u = {
60
59
  showRole: !0
61
60
  },
62
- homeLink: m = G,
63
- theme: i = void 0,
64
- hideNavMenu: p = !1,
61
+ homeLink: s = q,
62
+ theme: a = void 0,
63
+ hideNavMenu: d = !1,
65
64
  showDomainWarningDialog: o = !0,
66
- ...n
65
+ ...i
67
66
  }) {
68
- var v, x;
69
- Q();
70
- const a = _(), { locale: d } = z() || {}, f = H((r, h = {}) => A(X, r, d, "en", h)), c = w(() => {
71
- const r = Object.assign({}, window.blocklet, e);
67
+ G();
68
+ const l = C(), { locale: h } = L() || {}, v = $((t, f = {}) => P(Q, t, h, "en", f)), m = k(() => {
69
+ const t = Object.assign({}, window.blocklet, e);
72
70
  try {
73
- return q(r);
74
- } catch (h) {
75
- return console.error("Failed to format blocklet info", h, r), r;
71
+ return K(t);
72
+ } catch (f) {
73
+ return console.error("Failed to format blocklet info", f, t), t;
76
74
  }
77
- }, [e]), u = w(() => E(a, i), [a, i]), I = M({
75
+ }, [e]), c = k(() => T(l, a), [l, a]), x = R({
78
76
  meta: e,
79
- theme: i
77
+ theme: a
80
78
  });
81
- if (!c.appName)
79
+ if (!m.appName)
82
80
  return null;
83
- const $ = D((v = c == null ? void 0 : c.navigation) == null ? void 0 : v.header, d), g = Y($), { navItems: s, activeId: N } = g, k = parseInt((x = window.blocklet) == null ? void 0 : x.USE_ARCBLOCK_THEME, 10);
84
- return B(k) && s.splice(k, 0, {
85
- label: f("products"),
81
+ const I = O(m?.navigation?.header, h), b = V(I), { navItems: p, activeId: w } = b, g = parseInt(window.blocklet?.USE_ARCBLOCK_THEME, 10);
82
+ return A(g) && p.splice(g, 0, {
83
+ label: v("products"),
86
84
  // eslint-disable-next-line react/no-unstable-nested-components
87
- children: ({ isOpen: r }) => /* @__PURE__ */ l(R, { isOpen: r })
88
- }), /* @__PURE__ */ l(F, { theme: u, children: /* @__PURE__ */ l(
89
- oo,
85
+ children: ({ isOpen: t }) => /* @__PURE__ */ n(F, { isOpen: t })
86
+ }), /* @__PURE__ */ n(_, { theme: c, children: /* @__PURE__ */ n(
87
+ Y,
90
88
  {
91
- homeLink: m,
92
- logo: /* @__PURE__ */ l("img", { src: I, alt: "logo" }),
89
+ homeLink: s,
90
+ logo: /* @__PURE__ */ n("img", { src: x, alt: "logo" }),
93
91
  addons: (
94
92
  // @ts-ignore
95
- /* @__PURE__ */ l(
96
- J,
93
+ /* @__PURE__ */ n(
94
+ D,
97
95
  {
98
- formattedBlocklet: c,
99
- addons: typeof t == "function" ? (r) => t(r, { navigation: g }) : t,
100
- sessionManagerProps: b,
96
+ formattedBlocklet: m,
97
+ addons: typeof r == "function" ? (t) => r(t, { navigation: b }) : r,
98
+ sessionManagerProps: u,
101
99
  showDomainWarningDialog: o
102
100
  }
103
101
  )
104
102
  ),
105
- ...W(n, ["bordered"]),
106
- $bordered: n == null ? void 0 : n.bordered,
107
- $bgcolor: u.palette.background.default,
108
- className: j("blocklet__header", n.className),
109
- children: p || !(s != null && s.length) ? null : ({ isMobile: r }) => (
103
+ ...z(i, ["bordered"]),
104
+ $bordered: i?.bordered,
105
+ $bgcolor: c.palette.background.default,
106
+ className: M("blocklet__header", i.className),
107
+ children: d || !p?.length ? null : ({ isMobile: t }) => (
110
108
  // @ts-ignore
111
- /* @__PURE__ */ l(
112
- P,
109
+ /* @__PURE__ */ n(
110
+ B,
113
111
  {
114
- mode: r ? "inline" : "horizontal",
115
- activeId: N,
116
- items: s,
112
+ mode: t ? "inline" : "horizontal",
113
+ activeId: w,
114
+ items: p,
117
115
  className: "header-nav",
118
116
  bgColor: "transparent",
119
- textColor: u.palette.grey[500],
120
- activeTextColor: u.palette.text.primary
117
+ textColor: c.palette.grey[500],
118
+ activeTextColor: c.palette.text.primary
121
119
  }
122
120
  )
123
121
  )
124
122
  }
125
123
  ) });
126
124
  }
127
- const oo = T(L)`
125
+ const Y = y(E)`
128
126
  ${({ $bgcolor: e }) => `background-color: ${e || "#fff"};`}
129
127
  .header-logo {
130
128
  min-width: 44px;
131
129
  }
132
- ${({ $bordered: e, theme: t }) => e ? `border-bottom: 1px solid ${t.palette.divider};` : ""}
130
+ ${({ $bordered: e, theme: r }) => e ? `border-bottom: 1px solid ${r.palette.divider};` : ""}
133
131
  ${(e) => e.theme.breakpoints.down("md")} {
134
132
  .header-logo {
135
133
  min-width: 32px;
136
134
  }
137
135
  }
138
- `, No = y(V(Z), {
139
- FallbackComponent: C
136
+ `, wo = N(J(X), {
137
+ FallbackComponent: H
140
138
  });
141
139
  export {
142
- No as default
140
+ wo as default
143
141
  };
@@ -1,45 +1,45 @@
1
- import { jsxs as c, jsx as r, Fragment as u } from "react/jsx-runtime";
2
- import { useState as $, useEffect as z } from "react";
3
- import n from "@emotion/styled";
4
- import { green as D, amber as N, common as a } from "@mui/material/colors";
5
- import { Box as A, Typography as b, IconButton as T } from "@mui/material";
6
- import { useCreation as p } from "ahooks";
7
- import { Close as W } from "@mui/icons-material";
8
- import { Icon as B } from "@iconify/react";
9
- import _ from "@iconify-icons/tabler/circle-check";
10
- import j from "@iconify-icons/tabler/exclamation-circle";
11
- import h from "@iconify-icons/tabler/info-circle";
12
- import E from "@iconify-icons/tabler/xbox-x";
13
- import { SnackbarContent as H, useSnackbar as L } from "notistack";
14
- import M from "./hooks/use-width.js";
15
- import O from "./hooks/use-title.js";
16
- import { toClickableSpan as P, isIncludeActivity as F, sanitize as G } from "./utils.js";
17
- const R = {
18
- normal: h,
19
- success: _,
20
- info: h,
21
- warning: j,
22
- error: E
23
- }, q = n(W)`
1
+ import { jsxs as c, jsx as e, Fragment as x } from "react/jsx-runtime";
2
+ import { useState as S, useEffect as $ } from "react";
3
+ import i from "@emotion/styled";
4
+ import { green as z, amber as D, common as a } from "@mui/material/colors";
5
+ import { Box as N, Typography as f, IconButton as A } from "@mui/material";
6
+ import { useCreation as s } from "ahooks";
7
+ import { Close as M } from "@mui/icons-material";
8
+ import { Icon as T } from "@iconify/react";
9
+ import W from "@iconify-icons/tabler/circle-check";
10
+ import B from "@iconify-icons/tabler/exclamation-circle";
11
+ import u from "@iconify-icons/tabler/info-circle";
12
+ import _ from "@iconify-icons/tabler/xbox-x";
13
+ import { SnackbarContent as j, useSnackbar as E } from "notistack";
14
+ import H from "./hooks/use-width.js";
15
+ import L from "./hooks/use-title.js";
16
+ import { toClickableSpan as O, isIncludeActivity as P, sanitize as F } from "./utils.js";
17
+ const G = {
18
+ normal: u,
19
+ success: W,
20
+ info: u,
21
+ warning: B,
22
+ error: _
23
+ }, R = i(M)`
24
24
  font-size: 20px;
25
- `, J = n.div`
25
+ `, q = i.div`
26
26
  display: flex;
27
27
  align-items: flex-start;
28
28
  gap: 8px;
29
29
  flex: 1;
30
30
  width: 0;
31
- `, K = n.div`
31
+ `, J = i.div`
32
32
  display: flex;
33
33
  align-items: center;
34
34
  margin-left: auto;
35
35
  margin-right: -8px;
36
36
  width: 44px;
37
- `, Q = {
37
+ `, K = {
38
38
  xl: "400px",
39
39
  lg: "400px",
40
40
  md: "400px",
41
41
  sm: "300px"
42
- }, U = n(H)`
42
+ }, Q = i(j)`
43
43
  display: flex;
44
44
  color: #fff;
45
45
  align-items: center;
@@ -50,26 +50,26 @@ const R = {
50
50
  0px 6px 10px 0px rgba(0, 0, 0, 0.14),
51
51
  0px 1px 18px 0px rgba(0, 0, 0, 0.12);
52
52
 
53
- ${({ severity: t, breakpoint: i }) => {
54
- const e = Q[i] || "400px";
55
- return t === "success" ? `
56
- background-color: ${D[600]} !important;
57
- width: ${e};
58
- ` : t === "error" ? `
53
+ ${({ severity: o, breakpoint: n }) => {
54
+ const t = K[n] || "400px";
55
+ return o === "success" ? `
56
+ background-color: ${z[600]} !important;
57
+ width: ${t};
58
+ ` : o === "error" ? `
59
59
  background-color: #d32f2f !important;
60
- width: ${e};
61
- ` : t === "info" ? `
60
+ width: ${t};
61
+ ` : o === "info" ? `
62
62
  background-color: #1976d2 !important;
63
- width: ${e};
64
- ` : t === "warning" ? `
65
- background-color: ${N[700]} !important;
66
- width: ${e};
63
+ width: ${t};
64
+ ` : o === "warning" ? `
65
+ background-color: ${D[700]} !important;
66
+ width: ${t};
67
67
  ` : `
68
68
  background-color: #333;
69
- width: ${e};
69
+ width: ${t};
70
70
  `;
71
71
  }}
72
- `, V = n.div`
72
+ `, U = i.div`
73
73
  cursor: pointer;
74
74
  display: flex;
75
75
  flex-direction: column;
@@ -96,43 +96,42 @@ const R = {
96
96
  }
97
97
  }
98
98
  `;
99
- function xe({
100
- ref: t = void 0,
101
- keyId: i,
102
- notification: e = {},
103
- viewAllUrl: w,
104
- content: f = null
99
+ function mt({
100
+ ref: o = void 0,
101
+ keyId: n,
102
+ notification: t = {},
103
+ viewAllUrl: b,
104
+ content: h = null
105
105
  }) {
106
- var x;
107
- const k = M(), [g, v] = $(e.description || ""), d = R[e.severity || ""], { closeSnackbar: m } = L(), y = () => m(i);
108
- z(() => {
109
- P(e.description || "", "en").then((l) => {
110
- v(l);
106
+ const w = H(), [k, g] = S(t.description || ""), p = G[t.severity || ""], { closeSnackbar: d } = E(), v = () => d(n);
107
+ $(() => {
108
+ O(t.description || "", "en").then((l) => {
109
+ g(l);
111
110
  });
112
- }, [e.description]);
113
- const C = (l) => {
114
- l.stopPropagation(), m(i), l != null && l.customPreventRedirect || window.open(w, "_blank");
115
- }, I = p(() => F(e), [e]), o = p(() => e == null ? void 0 : e.activity, [e]), s = p(() => !o || o.type === "tips" ? null : o == null ? void 0 : o.meta, [o]), S = O({
116
- activity: o,
117
- users: [e == null ? void 0 : e.actorInfo],
118
- actors: [(x = e == null ? void 0 : e.activity) == null ? void 0 : x.actor],
111
+ }, [t.description]);
112
+ const y = (l) => {
113
+ l.stopPropagation(), d(n), l?.customPreventRedirect || window.open(b, "_blank");
114
+ }, C = s(() => P(t), [t]), r = s(() => t?.activity, [t]), m = s(() => !r || r.type === "tips" ? null : r?.meta, [r]), I = L({
115
+ activity: r,
116
+ users: [t?.actorInfo],
117
+ actors: [t?.activity?.actor],
119
118
  extra: {
120
119
  linkColor: a.white
121
120
  }
122
121
  });
123
122
  return /* @__PURE__ */ c(
124
- U,
123
+ Q,
125
124
  {
126
- ref: t,
127
- severity: e.severity,
128
- breakpoint: k,
125
+ ref: o,
126
+ severity: t.severity,
127
+ breakpoint: w,
129
128
  children: [
130
- /* @__PURE__ */ c(J, { children: [
131
- d ? /* @__PURE__ */ r(B, { icon: d, fontSize: 24 }) : null,
132
- /* @__PURE__ */ r(V, { onClick: C, style: { width: "calc(100% - 30px)" }, children: /* @__PURE__ */ r(A, { children: I ? /* @__PURE__ */ c(u, { children: [
133
- /* @__PURE__ */ r("span", { className: "title", children: S }),
134
- s ? /* @__PURE__ */ r(
135
- b,
129
+ /* @__PURE__ */ c(q, { children: [
130
+ p ? /* @__PURE__ */ e(T, { icon: p, fontSize: 24 }) : null,
131
+ /* @__PURE__ */ e(U, { onClick: y, style: { width: "calc(100% - 30px)" }, children: /* @__PURE__ */ e(N, { children: C ? /* @__PURE__ */ c(x, { children: [
132
+ /* @__PURE__ */ e("span", { className: "title", children: I }),
133
+ m ? /* @__PURE__ */ e(
134
+ f,
136
135
  {
137
136
  variant: "subtitle2",
138
137
  component: "p",
@@ -146,26 +145,26 @@ function xe({
146
145
  color: a.white,
147
146
  lineHeight: 1.2
148
147
  },
149
- children: s == null ? void 0 : s.content
148
+ children: m?.content
150
149
  }
151
150
  ) : null
152
- ] }) : /* @__PURE__ */ c(u, { children: [
153
- /* @__PURE__ */ r("span", { className: "title", children: e.title }),
154
- f || /* @__PURE__ */ r(
155
- b,
151
+ ] }) : /* @__PURE__ */ c(x, { children: [
152
+ /* @__PURE__ */ e("span", { className: "title", children: t.title }),
153
+ h || /* @__PURE__ */ e(
154
+ f,
156
155
  {
157
156
  component: "span",
158
157
  className: "desc",
159
- dangerouslySetInnerHTML: { __html: G(g) }
158
+ dangerouslySetInnerHTML: { __html: F(k) }
160
159
  }
161
160
  )
162
161
  ] }) }) })
163
162
  ] }),
164
- /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(T, { "aria-label": "close", color: "inherit", onClick: y, size: "large", children: /* @__PURE__ */ r(q, {}) }, "close") })
163
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(A, { "aria-label": "close", color: "inherit", onClick: v, size: "large", children: /* @__PURE__ */ e(R, {}) }, "close") })
165
164
  ]
166
165
  }
167
166
  );
168
167
  }
169
168
  export {
170
- xe as default
169
+ mt as default
171
170
  };
@@ -1,4 +1,4 @@
1
- import { jsx as s, jsxs as o, Fragment as i } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as i, Fragment as t } from "react/jsx-runtime";
2
2
  import F from "react";
3
3
  import { useCreation as f, useMemoizedFn as U } from "ahooks";
4
4
  import { useTheme as C, Link as E } from "@mui/material";
@@ -7,37 +7,37 @@ import { joinURL as R, withQuery as S } from "ufo";
7
7
  import D from "lodash/isEmpty";
8
8
  import { getActivityLink as I } from "../utils.js";
9
9
  const P = {
10
- comment: (r, l) => l && l > 1 ? /* @__PURE__ */ o(i, { children: [
10
+ comment: (r, o) => o && o > 1 ? /* @__PURE__ */ i(t, { children: [
11
11
  "left ",
12
- l,
12
+ o,
13
13
  " comments on your ",
14
14
  r
15
- ] }) : /* @__PURE__ */ o(i, { children: [
15
+ ] }) : /* @__PURE__ */ i(t, { children: [
16
16
  "commented on your ",
17
17
  r
18
18
  ] }),
19
- like: (r) => /* @__PURE__ */ o(i, { children: [
19
+ like: (r) => /* @__PURE__ */ i(t, { children: [
20
20
  "liked your ",
21
21
  r
22
22
  ] }),
23
- follow: () => /* @__PURE__ */ s(i, { children: "followed you" }),
24
- tips: (r) => /* @__PURE__ */ o(i, { children: [
23
+ follow: () => /* @__PURE__ */ s(t, { children: "followed you" }),
24
+ tips: (r) => /* @__PURE__ */ i(t, { children: [
25
25
  "gave tips to your ",
26
26
  r
27
27
  ] }),
28
- mention: (r) => /* @__PURE__ */ o(i, { children: [
28
+ mention: (r) => /* @__PURE__ */ i(t, { children: [
29
29
  "mentioned you in ",
30
30
  r
31
31
  ] }),
32
- assign: () => /* @__PURE__ */ s(i, { children: "assigned you a task" })
32
+ assign: () => /* @__PURE__ */ s(t, { children: "assigned you a task" })
33
33
  };
34
- function a({ user: r, color: l = void 0 }) {
35
- const { palette: d } = C(), h = S(R(M, "user"), { did: r.did }), m = l || d.text.primary;
34
+ function a({ user: r, color: o = void 0 }) {
35
+ const { palette: d } = C(), h = S(R(M, "user"), { did: r.did }), u = o || d.text.primary;
36
36
  return /* @__PURE__ */ s(
37
37
  E,
38
38
  {
39
39
  href: h,
40
- color: m,
40
+ color: u,
41
41
  target: "_blank",
42
42
  onClick: (p) => {
43
43
  p.customPreventRedirect = !0;
@@ -52,52 +52,52 @@ function a({ user: r, color: l = void 0 }) {
52
52
  );
53
53
  }
54
54
  a.displayName = "UserLink";
55
- function H({ activity: r, users: l, actors: d, extra: h = {}, mountPoint: m = "" }) {
56
- const { palette: p } = C(), { type: u, target: g } = r || {}, { type: y } = g || {}, { linkColor: c = p.text.primary } = h || {}, k = f(() => {
57
- if (!Array.isArray(l)) return /* @__PURE__ */ new Map();
55
+ function H({ activity: r, users: o, actors: d, extra: h = {}, mountPoint: u = "" }) {
56
+ const { palette: p } = C(), { type: m, target: g } = r || {}, { type: y } = g || {}, { linkColor: c = p.text.primary } = h || {}, k = f(() => {
57
+ if (!Array.isArray(o)) return /* @__PURE__ */ new Map();
58
58
  const e = /* @__PURE__ */ new Map();
59
- return l.forEach((t) => {
60
- t != null && t.did && !e.has(t.did) && e.set(t.did, t);
59
+ return o.forEach((l) => {
60
+ l?.did && !e.has(l.did) && e.set(l.did, l);
61
61
  }), e;
62
- }, [l]), n = f(() => Array.isArray(d) ? d.map((e) => e ? k.get(e) || { did: e, fullName: "System" } : null).filter(Boolean) : [], [d, k]), L = U(() => {
62
+ }, [o]), n = f(() => Array.isArray(d) ? d.map((e) => e ? k.get(e) || { did: e, fullName: "System" } : null).filter(Boolean) : [], [d, k]), L = U(() => {
63
63
  if (!Array.isArray(n) || n.length === 0)
64
64
  return null;
65
65
  if (n.length === 1)
66
66
  return /* @__PURE__ */ s(a, { user: n[0], color: c });
67
- const e = n.slice(0, -1), t = n[n.length - 1];
67
+ const e = n.slice(0, -1), l = n[n.length - 1];
68
68
  if (n.length === 2)
69
- return /* @__PURE__ */ o(i, { children: [
69
+ return /* @__PURE__ */ i(t, { children: [
70
70
  /* @__PURE__ */ s(a, { user: e[0], color: c }),
71
71
  " and ",
72
- /* @__PURE__ */ s(a, { user: t, color: c })
72
+ /* @__PURE__ */ s(a, { user: l, color: c })
73
73
  ] });
74
74
  const _ = n.length > 3, N = _ ? n.slice(0, 2) : e;
75
- return /* @__PURE__ */ o(i, { children: [
76
- N.map((T, w) => /* @__PURE__ */ o(F.Fragment, { children: [
75
+ return /* @__PURE__ */ i(t, { children: [
76
+ N.map((T, w) => /* @__PURE__ */ i(F.Fragment, { children: [
77
77
  /* @__PURE__ */ s(a, { user: T, color: c }),
78
78
  w < N.length - 1 ? ", " : ""
79
79
  ] }, T.did)),
80
- _ ? `, and ${n.length - 2} others` : /* @__PURE__ */ o(i, { children: [
80
+ _ ? `, and ${n.length - 2} others` : /* @__PURE__ */ i(t, { children: [
81
81
  ", and ",
82
- /* @__PURE__ */ s(a, { user: t, color: c })
82
+ /* @__PURE__ */ s(a, { user: l, color: c })
83
83
  ] })
84
84
  ] });
85
85
  }), A = U(() => {
86
- const e = u ? P[u] : null;
87
- return e ? e(y, l.length) : null;
86
+ const e = m ? P[m] : null;
87
+ return e ? e(y, o.length) : null;
88
88
  }), v = f(() => {
89
- const e = L(), t = A();
90
- return !e || !t ? null : /* @__PURE__ */ o(i, { children: [
89
+ const e = L(), l = A();
90
+ return !e || !l ? null : /* @__PURE__ */ i(t, { children: [
91
91
  e,
92
92
  " ",
93
- t
93
+ l
94
94
  ] });
95
- }, [u, y, n, L, A]), x = f(() => {
95
+ }, [m, y, n, L, A]), x = f(() => {
96
96
  if (!r) return null;
97
97
  const e = I(r);
98
- return e != null && e.targetLink ? R(m, e.targetLink) : null;
99
- }, [r, m]);
100
- return !u || D(g) ? null : /* @__PURE__ */ o(i, { children: [
98
+ return e?.targetLink ? R(u, e.targetLink) : null;
99
+ }, [r, u]);
100
+ return !m || D(g) ? null : /* @__PURE__ */ i(t, { children: [
101
101
  v,
102
102
  " ",
103
103
  x && /* @__PURE__ */ s(