@blocklet/launcher-layout 3.0.6 → 3.0.8

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.
@@ -1,18 +1,18 @@
1
- import { jsxs as n, jsx as r, Fragment as b } from "react/jsx-runtime";
2
- import { createElement as B } from "react";
1
+ import { jsxs as i, jsx as r, Fragment as b } from "react/jsx-runtime";
2
+ import { createElement as z } from "react";
3
3
  import y from "prop-types";
4
4
  import { getDisplayName as g } from "@blocklet/meta/lib/util";
5
- import z from "@arcblock/ux/lib/DID";
5
+ import j from "@arcblock/ux/lib/DID";
6
6
  import o from "lodash/get";
7
7
  import D from "@emotion/styled";
8
- import j from "@uiw/react-markdown-preview";
9
- import { Typography as q, Box as N } from "@mui/material";
10
- import R from "rehype-react";
8
+ import N from "@uiw/react-markdown-preview";
9
+ import { Typography as q, useTheme as R, Box as S } from "@mui/material";
10
+ import T from "rehype-react";
11
11
  import x from "url-join";
12
- import { useRequest as S, useCreation as C } from "ahooks";
13
- import I from "../markdown-body.js";
14
- import T from "../info-list.js";
15
- const A = (l) => l.payment ? (l.payment.price || []).map((m) => m.value || 0).every((m) => m === 0) : !0, E = new R({ createElement: B }).Compiler, i = {
12
+ import { useRequest as C, useCreation as I } from "ahooks";
13
+ import A from "../markdown-body.js";
14
+ import E from "../info-list.js";
15
+ const L = (d) => d.payment ? (d.payment.price || []).map((m) => m.value || 0).every((m) => m === 0) : !0, F = new T({ createElement: z }).Compiler, n = {
16
16
  zh: {
17
17
  appinfo: {
18
18
  name: "应用名",
@@ -40,22 +40,22 @@ const A = (l) => l.payment ? (l.payment.price || []).map((m) => m.value || 0).ev
40
40
  }
41
41
  }
42
42
  };
43
- function L({ blockletMeta: l, locale: t, handleDescEle: m = "" }) {
44
- const { data: e } = l, { registryUrl: d, did: f } = e, u = g({
43
+ function M({ blockletMeta: d, locale: t, handleDescEle: m = "" }) {
44
+ const { data: e } = d, B = R(), { registryUrl: l, did: f } = e, u = g({
45
45
  meta: e
46
- }), p = S(
47
- () => d && f ? fetch(x(d, "/api/blocklets", f, "readme")).then((a) => a.json()) : null,
46
+ }), p = C(
47
+ () => l && f ? fetch(x(l, "/api/blocklets", f, "readme")).then((a) => a.json()) : null,
48
48
  {
49
- refreshDeps: [d, f]
49
+ refreshDeps: [l, f]
50
50
  }
51
- ), k = C(() => p.data ? p.data[t] || p.data.en || p.data[Object.keys(p.data)[0]] : "", [p]), h = e && e.htmlAst ? E(e.htmlAst) : "", w = A(e);
51
+ ), k = I(() => p.data ? p.data[t] || p.data.en || p.data[Object.keys(p.data)[0]] : "", [p]), h = e && e.htmlAst ? F(e.htmlAst) : "", w = L(e);
52
52
  let c = o(e, "owner.fullName");
53
53
  if (c) {
54
54
  const a = o(e, "owner.did");
55
- a && (c = /* @__PURE__ */ n(N, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
55
+ a && (c = /* @__PURE__ */ i(S, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
56
56
  c,
57
57
  /* @__PURE__ */ r(
58
- z,
58
+ j,
59
59
  {
60
60
  sx: {
61
61
  lineHeight: "initial",
@@ -77,48 +77,48 @@ function L({ blockletMeta: l, locale: t, handleDescEle: m = "" }) {
77
77
  c = o(e, "author.name");
78
78
  const s = [
79
79
  {
80
- key: o(i[t], "appinfo.name"),
80
+ key: o(n[t], "appinfo.name"),
81
81
  value: g({
82
82
  meta: e
83
83
  })
84
84
  },
85
85
  {
86
- key: o(i[t], "appinfo.version"),
86
+ key: o(n[t], "appinfo.version"),
87
87
  value: e.version
88
88
  },
89
89
  {
90
- key: o(i[t], "appinfo.author"),
90
+ key: o(n[t], "appinfo.author"),
91
91
  value: c
92
92
  },
93
93
  {
94
94
  type: "description",
95
- key: o(i[t], "appinfo.description"),
95
+ key: o(n[t], "appinfo.description"),
96
96
  value: e.description
97
97
  }
98
98
  ];
99
99
  e.requirements && s.push({
100
- key: o(i[t], "appinfo.requirements"),
100
+ key: o(n[t], "appinfo.requirements"),
101
101
  value: e.requirements.server
102
102
  }), e.community && s.push({
103
- key: o(i[t], "appinfo.community"),
103
+ key: o(n[t], "appinfo.community"),
104
104
  value: /* @__PURE__ */ r("a", { href: e.community, target: "_blank", rel: "noreferrer", children: e.community })
105
105
  }), e.documentation && s.push({
106
- key: o(i[t], "appinfo.documentation"),
106
+ key: o(n[t], "appinfo.documentation"),
107
107
  value: /* @__PURE__ */ r("a", { href: e.documentation, target: "_blank", rel: "noreferrer", children: e.documentation })
108
108
  }), e.support && s.push({
109
- key: o(i[t], "appinfo.support"),
109
+ key: o(n[t], "appinfo.support"),
110
110
  value: /* @__PURE__ */ r("a", { href: `mailto:${e.support}`, target: "_blank", rel: "noreferrer", children: e.support })
111
111
  }), h && s.push({
112
- key: o(i[t], "appinfo.overview"),
112
+ key: o(n[t], "appinfo.overview"),
113
113
  value: ""
114
114
  });
115
115
  let v;
116
- return t === "zh" ? v = /* @__PURE__ */ n(b, { children: [
117
- w ? /* @__PURE__ */ n("p", { children: [
116
+ return t === "zh" ? v = /* @__PURE__ */ i(b, { children: [
117
+ w ? /* @__PURE__ */ i("p", { children: [
118
118
  "您可以免费使用 ",
119
119
  /* @__PURE__ */ r("b", { children: u }),
120
120
  ";"
121
- ] }) : /* @__PURE__ */ n("p", { children: [
121
+ ] }) : /* @__PURE__ */ i("p", { children: [
122
122
  "您需要购买才能使用 ",
123
123
  /* @__PURE__ */ r("b", { children: u }),
124
124
  ";"
@@ -126,12 +126,12 @@ function L({ blockletMeta: l, locale: t, handleDescEle: m = "" }) {
126
126
  /* @__PURE__ */ r("p", { children: "在应用启动前,需要选择您的节点;" }),
127
127
  /* @__PURE__ */ r("p", { children: "如果您没有节点,我们会引导您创建新的节点;" }),
128
128
  /* @__PURE__ */ r("p", { children: "下面为该应用的信息:" })
129
- ] }) : v = /* @__PURE__ */ n(b, { children: [
130
- w ? /* @__PURE__ */ n("p", { children: [
129
+ ] }) : v = /* @__PURE__ */ i(b, { children: [
130
+ w ? /* @__PURE__ */ i("p", { children: [
131
131
  "You can use ",
132
132
  /* @__PURE__ */ r("b", { children: u }),
133
133
  " for free;"
134
- ] }) : /* @__PURE__ */ n("p", { children: [
134
+ ] }) : /* @__PURE__ */ i("p", { children: [
135
135
  "You need to purchase before launch ",
136
136
  /* @__PURE__ */ r("b", { children: u }),
137
137
  ";"
@@ -139,25 +139,25 @@ function L({ blockletMeta: l, locale: t, handleDescEle: m = "" }) {
139
139
  /* @__PURE__ */ r("p", { children: "Before the blocklet starts, you need to select your Blocklet Server; " }),
140
140
  /* @__PURE__ */ r("p", { children: "If you do not have any Blocklet Server, we will guide you to create a new one; " }),
141
141
  /* @__PURE__ */ r("p", { children: "Below is the information for the blocklet: " })
142
- ] }), /* @__PURE__ */ n(M, { children: [
142
+ ] }), /* @__PURE__ */ i(_, { children: [
143
143
  m || v,
144
- /* @__PURE__ */ r(T, { infoList: s }),
145
- k ? /* @__PURE__ */ n("div", { className: "app-overview", children: [
146
- /* @__PURE__ */ r(q, { variant: "h5", gutterBottom: !0, children: o(i[t], "appinfo.overview") }),
147
- /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(F, { component: "div", className: "content-wrapper post-content", children: /* @__PURE__ */ r(
148
- j,
144
+ /* @__PURE__ */ r(E, { infoList: s }),
145
+ k ? /* @__PURE__ */ i("div", { className: "app-overview", children: [
146
+ /* @__PURE__ */ r(q, { variant: "h5", gutterBottom: !0, children: o(n[t], "appinfo.overview") }),
147
+ /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(P, { component: "div", className: "content-wrapper post-content", children: /* @__PURE__ */ r(
148
+ N,
149
149
  {
150
150
  source: k,
151
151
  wrapperElement: {
152
- "data-color-mode": "light"
152
+ "data-color-mode": B.palette.mode
153
153
  },
154
- urlTransform: (a, P, _) => a.startsWith("/") ? x(d, a) : a
154
+ urlTransform: (a, O, U) => a.startsWith("/") ? x(l, a) : a
155
155
  }
156
156
  ) }) })
157
157
  ] }) : h ? /* @__PURE__ */ r("div", { className: "app-overview", children: h }) : null
158
158
  ] });
159
159
  }
160
- const F = D(q)`
160
+ const P = D(q)`
161
161
  width: 100%;
162
162
  word-wrap: break-word;
163
163
  word-break: break-word;
@@ -175,7 +175,7 @@ const F = D(q)`
175
175
  iframe {
176
176
  width: 100% !important;
177
177
  }
178
- `, M = D.div`
178
+ `, _ = D.div`
179
179
  .info-table {
180
180
  a {
181
181
  word-break: break-all;
@@ -205,12 +205,15 @@ const F = D(q)`
205
205
  margin-left: 2em;
206
206
  }
207
207
  }
208
+ .wmde-markdown[data-color-mode='dark'] {
209
+ background: transparent;
210
+ }
208
211
  `;
209
- L.propTypes = {
212
+ M.propTypes = {
210
213
  blockletMeta: y.object.isRequired,
211
214
  locale: y.string.isRequired,
212
215
  handleDescEle: y.node
213
216
  };
214
217
  export {
215
- L as default
218
+ M as default
216
219
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-layout",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "Common ux components of launcher",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -43,7 +43,7 @@
43
43
  "react": "^19.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@arcblock/icons": "3.0.6",
46
+ "@arcblock/icons": "3.0.8",
47
47
  "@blocklet/meta": "^1.16.44",
48
48
  "@emotion/react": "^11.14.0",
49
49
  "@emotion/styled": "^11.14.0",
@@ -55,5 +55,5 @@
55
55
  "rehype-react": "^7.2.0",
56
56
  "url-join": "^4.0.1"
57
57
  },
58
- "gitHead": "b985886f6650c3df0f48665c71d7a8ce0d9bdb93"
58
+ "gitHead": "30b21395b2f3ef6824df728aeafd10e9dea173d9"
59
59
  }