@blocklet/launcher-layout 3.0.7 → 3.0.9
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.
- package/lib/wizard/wizard-desc.js +48 -45
- package/package.json +5 -5
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createElement as
|
|
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
|
|
5
|
+
import j from "@arcblock/ux/lib/DID";
|
|
6
6
|
import o from "lodash/get";
|
|
7
7
|
import D from "@emotion/styled";
|
|
8
|
-
import
|
|
9
|
-
import { Typography as q, Box as
|
|
10
|
-
import
|
|
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
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
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
|
|
44
|
-
const { data: e } =
|
|
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 =
|
|
47
|
-
() =>
|
|
46
|
+
}), p = C(
|
|
47
|
+
() => l && f ? fetch(x(l, "/api/blocklets", f, "readme")).then((a) => a.json()) : null,
|
|
48
48
|
{
|
|
49
|
-
refreshDeps: [
|
|
49
|
+
refreshDeps: [l, f]
|
|
50
50
|
}
|
|
51
|
-
), k =
|
|
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__ */
|
|
55
|
+
a && (c = /* @__PURE__ */ i(S, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
56
56
|
c,
|
|
57
57
|
/* @__PURE__ */ r(
|
|
58
|
-
|
|
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(
|
|
80
|
+
key: o(n[t], "appinfo.name"),
|
|
81
81
|
value: g({
|
|
82
82
|
meta: e
|
|
83
83
|
})
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
key: o(
|
|
86
|
+
key: o(n[t], "appinfo.version"),
|
|
87
87
|
value: e.version
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
key: o(
|
|
90
|
+
key: o(n[t], "appinfo.author"),
|
|
91
91
|
value: c
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
type: "description",
|
|
95
|
-
key: o(
|
|
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(
|
|
100
|
+
key: o(n[t], "appinfo.requirements"),
|
|
101
101
|
value: e.requirements.server
|
|
102
102
|
}), e.community && s.push({
|
|
103
|
-
key: o(
|
|
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(
|
|
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(
|
|
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(
|
|
112
|
+
key: o(n[t], "appinfo.overview"),
|
|
113
113
|
value: ""
|
|
114
114
|
});
|
|
115
115
|
let v;
|
|
116
|
-
return t === "zh" ? v = /* @__PURE__ */
|
|
117
|
-
w ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
130
|
-
w ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
142
|
+
] }), /* @__PURE__ */ i(_, { children: [
|
|
143
143
|
m || v,
|
|
144
|
-
/* @__PURE__ */ r(
|
|
145
|
-
k ? /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */ r(q, { variant: "h5", gutterBottom: !0, children: o(
|
|
147
|
-
/* @__PURE__ */ r(
|
|
148
|
-
|
|
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":
|
|
152
|
+
"data-color-mode": B.palette.mode
|
|
153
153
|
},
|
|
154
|
-
urlTransform: (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
|
|
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
|
-
`,
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "3.0.9",
|
|
4
4
|
"description": "Common ux components of launcher",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@arcblock/did-connect": "
|
|
40
|
-
"@arcblock/ux": "
|
|
39
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
40
|
+
"@arcblock/ux": "^3.0.8",
|
|
41
41
|
"@mui/icons-material": "^7.1.2",
|
|
42
42
|
"@mui/material": "^7.1.2",
|
|
43
43
|
"react": "^19.0.0"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@arcblock/icons": "3.0.
|
|
46
|
+
"@arcblock/icons": "3.0.9",
|
|
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": "
|
|
58
|
+
"gitHead": "e2283285cb6e99f09146cde5e1af002e55091619"
|
|
59
59
|
}
|