@blocklet/launcher-layout 2.3.20 → 2.3.21
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/compact-layout.js +55 -34
- package/lib/content.js +67 -20
- package/lib/context/step.js +19 -28
- package/lib/header.js +224 -91
- package/lib/index.js +198 -101
- package/lib/info-list.js +45 -0
- package/lib/launch-result-message.js +116 -55
- package/lib/locale.js +1 -8
- package/lib/markdown-body.js +45 -21
- package/lib/nav.js +300 -51
- package/lib/page-header.js +51 -38
- package/lib/theme-provider.js +24 -32
- package/lib/wizard/server-eula.js +60 -41
- package/lib/wizard/wizard-desc.js +129 -114
- package/package.json +7 -21
- package/es/assets/blocklet-default-logo.png +0 -0
- package/es/compact-layout.js +0 -114
- package/es/content.js +0 -72
- package/es/context/step.js +0 -137
- package/es/header.js +0 -337
- package/es/index.js +0 -307
- package/es/launch-result-message.js +0 -144
- package/es/locale.js +0 -13
- package/es/markdown-body.js +0 -52
- package/es/nav.js +0 -405
- package/es/page-header.js +0 -66
- package/es/theme-provider.js +0 -41
- package/es/wizard/server-eula.js +0 -96
- package/es/wizard/wizard-desc.js +0 -332
|
@@ -1,54 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
-
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
11
|
-
var _Button = _interopRequireDefault(require("@arcblock/ux/lib/Button"));
|
|
12
|
-
var _Dialog = _interopRequireDefault(require("@arcblock/ux/lib/Dialog"));
|
|
13
|
-
var _submit = _interopRequireDefault(require("@blocklet/launcher-ux/lib/hot-key/submit"));
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
var _templateObject;
|
|
16
1
|
/* eslint-disable react/jsx-wrap-multilines */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import { CircularProgress } from '@mui/material';
|
|
6
|
+
import Button from '@arcblock/ux/lib/Button';
|
|
7
|
+
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
8
|
+
import SubmitHotKey from '@blocklet/launcher-ux/lib/hot-key/submit';
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
function ServerEula({
|
|
11
|
+
onContinue,
|
|
12
|
+
nextDisabled,
|
|
13
|
+
launching,
|
|
14
|
+
texts,
|
|
15
|
+
description
|
|
16
|
+
}) {
|
|
17
|
+
const [open, setOpen] = useState(false);
|
|
28
18
|
const handleOpen = () => setOpen(x => !x);
|
|
29
|
-
return /*#__PURE__*/(
|
|
30
|
-
children: [/*#__PURE__*/(
|
|
31
|
-
children: /*#__PURE__*/(
|
|
19
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx(Div, {
|
|
21
|
+
children: /*#__PURE__*/_jsxs(SubmitHotKey, {
|
|
32
22
|
disabled: nextDisabled,
|
|
33
23
|
onConfirm: onContinue,
|
|
34
|
-
children: [/*#__PURE__*/(
|
|
24
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
35
25
|
className: "eula-trigger",
|
|
36
26
|
onClick: handleOpen,
|
|
37
27
|
children: texts.listenName
|
|
38
|
-
}), /*#__PURE__*/(
|
|
28
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
39
29
|
disabled: nextDisabled,
|
|
40
30
|
color: "primary",
|
|
41
31
|
variant: "contained",
|
|
42
32
|
className: "next-button",
|
|
43
33
|
onClick: onContinue,
|
|
44
|
-
children: launching ? /*#__PURE__*/(
|
|
45
|
-
children: [/*#__PURE__*/(
|
|
34
|
+
children: launching ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
35
|
+
children: [/*#__PURE__*/_jsx(CircularProgress, {
|
|
46
36
|
size: 14
|
|
47
37
|
}), texts.launchingText]
|
|
48
38
|
}) : texts.buttonNext
|
|
49
39
|
})]
|
|
50
40
|
})
|
|
51
|
-
}), /*#__PURE__*/(
|
|
41
|
+
}), /*#__PURE__*/_jsx(Dialog, {
|
|
52
42
|
open: open,
|
|
53
43
|
title: texts.listenName,
|
|
54
44
|
onClose: () => setOpen(false),
|
|
@@ -57,11 +47,11 @@ function ServerEula(_ref) {
|
|
|
57
47
|
});
|
|
58
48
|
}
|
|
59
49
|
ServerEula.propTypes = {
|
|
60
|
-
onContinue:
|
|
61
|
-
nextDisabled:
|
|
62
|
-
launching:
|
|
63
|
-
description:
|
|
64
|
-
texts:
|
|
50
|
+
onContinue: PropTypes.func.isRequired,
|
|
51
|
+
nextDisabled: PropTypes.bool,
|
|
52
|
+
launching: PropTypes.bool,
|
|
53
|
+
description: PropTypes.any,
|
|
54
|
+
texts: PropTypes.object
|
|
65
55
|
};
|
|
66
56
|
ServerEula.defaultProps = {
|
|
67
57
|
nextDisabled: false,
|
|
@@ -73,5 +63,34 @@ ServerEula.defaultProps = {
|
|
|
73
63
|
buttonNext: ''
|
|
74
64
|
}
|
|
75
65
|
};
|
|
76
|
-
const Div =
|
|
77
|
-
|
|
66
|
+
const Div = styled.div`
|
|
67
|
+
margin: 0 auto;
|
|
68
|
+
display: flex;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
align-items: center;
|
|
71
|
+
|
|
72
|
+
@media (max-width: ${props => props.theme.breakpoints.values.sm}px) {
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.eula-trigger {
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
text-decoration: underline;
|
|
79
|
+
${props => props.theme.breakpoints.up('md')} {
|
|
80
|
+
padding-right: 24px;
|
|
81
|
+
}
|
|
82
|
+
${props => props.theme.breakpoints.down('md')} {
|
|
83
|
+
padding: 16px;
|
|
84
|
+
}
|
|
85
|
+
font-size: 14px;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
&:hover {
|
|
88
|
+
color: ${props => props.theme.palette.primary.main};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.next-button {
|
|
93
|
+
min-width: 200px;
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
96
|
+
export default ServerEula;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _rehypeReact = _interopRequireDefault(require("rehype-react"));
|
|
16
|
-
var _urlJoin = _interopRequireDefault(require("url-join"));
|
|
17
|
-
var _ahooks = require("ahooks");
|
|
18
|
-
var _markdownBody = _interopRequireDefault(require("../markdown-body"));
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
var _templateObject, _templateObject2;
|
|
21
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
1
|
+
import { createElement } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { getDisplayName } from '@blocklet/meta/lib/util';
|
|
4
|
+
import DID from '@arcblock/ux/lib/DID';
|
|
5
|
+
import get from 'lodash/get';
|
|
6
|
+
import styled from '@emotion/styled';
|
|
7
|
+
import MarkdownPreview from '@uiw/react-markdown-preview';
|
|
8
|
+
import { Box, Typography } from '@mui/material';
|
|
9
|
+
import RehypeReact from 'rehype-react';
|
|
10
|
+
import joinURL from 'url-join';
|
|
11
|
+
import { useCreation, useRequest } from 'ahooks';
|
|
12
|
+
import MarkdownBody from '../markdown-body';
|
|
13
|
+
import InfoList from '../info-list';
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
15
|
const isFreeBlocklet = meta => {
|
|
24
16
|
if (!meta.payment) {
|
|
25
17
|
return true;
|
|
@@ -27,8 +19,8 @@ const isFreeBlocklet = meta => {
|
|
|
27
19
|
const priceList = (meta.payment.price || []).map(x => x.value || 0);
|
|
28
20
|
return priceList.every(x => x === 0);
|
|
29
21
|
};
|
|
30
|
-
const renderAst = new
|
|
31
|
-
createElement
|
|
22
|
+
const renderAst = new RehypeReact({
|
|
23
|
+
createElement
|
|
32
24
|
}).Compiler;
|
|
33
25
|
const localeData = {
|
|
34
26
|
zh: {
|
|
@@ -58,12 +50,11 @@ const localeData = {
|
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
52
|
};
|
|
61
|
-
function WizardDesc(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
} = _ref;
|
|
53
|
+
function WizardDesc({
|
|
54
|
+
blockletMeta,
|
|
55
|
+
locale,
|
|
56
|
+
handleDescEle
|
|
57
|
+
}) {
|
|
67
58
|
const {
|
|
68
59
|
data
|
|
69
60
|
} = blockletMeta;
|
|
@@ -73,18 +64,18 @@ function WizardDesc(_ref) {
|
|
|
73
64
|
registryUrl,
|
|
74
65
|
did
|
|
75
66
|
} = data;
|
|
76
|
-
const name =
|
|
67
|
+
const name = getDisplayName({
|
|
77
68
|
meta: data
|
|
78
69
|
});
|
|
79
|
-
const readmeState =
|
|
70
|
+
const readmeState = useRequest(() => {
|
|
80
71
|
if (registryUrl && did) {
|
|
81
|
-
return fetch((
|
|
72
|
+
return fetch(joinURL(registryUrl, '/api/blocklets', did, 'readme')).then(res => res.json());
|
|
82
73
|
}
|
|
83
74
|
return null;
|
|
84
75
|
}, {
|
|
85
76
|
refreshDeps: [registryUrl, did]
|
|
86
77
|
});
|
|
87
|
-
const markdownSource =
|
|
78
|
+
const markdownSource = useCreation(() => {
|
|
88
79
|
if (!readmeState.data) {
|
|
89
80
|
return '';
|
|
90
81
|
}
|
|
@@ -92,17 +83,17 @@ function WizardDesc(_ref) {
|
|
|
92
83
|
}, [readmeState]);
|
|
93
84
|
const blockletDesc = data && data.htmlAst ? renderAst(data.htmlAst) : '';
|
|
94
85
|
const isFree = isFreeBlocklet(data);
|
|
95
|
-
let authorInfo = (
|
|
86
|
+
let authorInfo = get(data, 'owner.fullName');
|
|
96
87
|
if (authorInfo) {
|
|
97
|
-
const ownerDid = (
|
|
88
|
+
const ownerDid = get(data, 'owner.did');
|
|
98
89
|
if (ownerDid) {
|
|
99
|
-
authorInfo = /*#__PURE__*/(
|
|
90
|
+
authorInfo = /*#__PURE__*/_jsxs(Box, {
|
|
100
91
|
sx: {
|
|
101
92
|
display: 'flex',
|
|
102
93
|
alignItems: 'center',
|
|
103
94
|
gap: 1
|
|
104
95
|
},
|
|
105
|
-
children: [authorInfo, /*#__PURE__*/(
|
|
96
|
+
children: [authorInfo, /*#__PURE__*/_jsx(DID, {
|
|
106
97
|
sx: {
|
|
107
98
|
lineHeight: 'initial',
|
|
108
99
|
'&::before': {
|
|
@@ -120,34 +111,34 @@ function WizardDesc(_ref) {
|
|
|
120
111
|
});
|
|
121
112
|
}
|
|
122
113
|
} else {
|
|
123
|
-
authorInfo = (
|
|
114
|
+
authorInfo = get(data, 'author.name');
|
|
124
115
|
}
|
|
125
116
|
const infos = [{
|
|
126
|
-
key: (
|
|
127
|
-
value:
|
|
117
|
+
key: get(localeData[locale], 'appinfo.name'),
|
|
118
|
+
value: getDisplayName({
|
|
128
119
|
meta: data
|
|
129
120
|
})
|
|
130
121
|
}, {
|
|
131
|
-
key: (
|
|
122
|
+
key: get(localeData[locale], 'appinfo.version'),
|
|
132
123
|
value: data.version
|
|
133
124
|
}, {
|
|
134
|
-
key: (
|
|
125
|
+
key: get(localeData[locale], 'appinfo.author'),
|
|
135
126
|
value: authorInfo
|
|
136
127
|
}, {
|
|
137
128
|
type: 'description',
|
|
138
|
-
key: (
|
|
129
|
+
key: get(localeData[locale], 'appinfo.description'),
|
|
139
130
|
value: data.description
|
|
140
131
|
}];
|
|
141
132
|
if (data.requirements) {
|
|
142
133
|
infos.push({
|
|
143
|
-
key: (
|
|
134
|
+
key: get(localeData[locale], 'appinfo.requirements'),
|
|
144
135
|
value: data.requirements.server
|
|
145
136
|
});
|
|
146
137
|
}
|
|
147
138
|
if (data.community) {
|
|
148
139
|
infos.push({
|
|
149
|
-
key: (
|
|
150
|
-
value: /*#__PURE__*/(
|
|
140
|
+
key: get(localeData[locale], 'appinfo.community'),
|
|
141
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
151
142
|
href: data.community,
|
|
152
143
|
target: "_blank",
|
|
153
144
|
rel: "noreferrer",
|
|
@@ -157,8 +148,8 @@ function WizardDesc(_ref) {
|
|
|
157
148
|
}
|
|
158
149
|
if (data.documentation) {
|
|
159
150
|
infos.push({
|
|
160
|
-
key: (
|
|
161
|
-
value: /*#__PURE__*/(
|
|
151
|
+
key: get(localeData[locale], 'appinfo.documentation'),
|
|
152
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
162
153
|
href: data.documentation,
|
|
163
154
|
target: "_blank",
|
|
164
155
|
rel: "noreferrer",
|
|
@@ -168,9 +159,9 @@ function WizardDesc(_ref) {
|
|
|
168
159
|
}
|
|
169
160
|
if (data.support) {
|
|
170
161
|
infos.push({
|
|
171
|
-
key: (
|
|
172
|
-
value: /*#__PURE__*/(
|
|
173
|
-
href:
|
|
162
|
+
key: get(localeData[locale], 'appinfo.support'),
|
|
163
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
164
|
+
href: `mailto:${data.support}`,
|
|
174
165
|
target: "_blank",
|
|
175
166
|
rel: "noreferrer",
|
|
176
167
|
children: data.support
|
|
@@ -179,116 +170,140 @@ function WizardDesc(_ref) {
|
|
|
179
170
|
}
|
|
180
171
|
if (blockletDesc) {
|
|
181
172
|
infos.push({
|
|
182
|
-
key: (
|
|
173
|
+
key: get(localeData[locale], 'appinfo.overview'),
|
|
183
174
|
value: ''
|
|
184
175
|
});
|
|
185
176
|
}
|
|
186
177
|
let descEle;
|
|
187
178
|
if (locale === 'zh') {
|
|
188
|
-
descEle = /*#__PURE__*/(
|
|
189
|
-
children: [isFree ? /*#__PURE__*/(
|
|
190
|
-
children: ["\u60A8\u53EF\u4EE5\u514D\u8D39\u4F7F\u7528 ", /*#__PURE__*/(
|
|
179
|
+
descEle = /*#__PURE__*/_jsxs(_Fragment, {
|
|
180
|
+
children: [isFree ? /*#__PURE__*/_jsxs("p", {
|
|
181
|
+
children: ["\u60A8\u53EF\u4EE5\u514D\u8D39\u4F7F\u7528 ", /*#__PURE__*/_jsx("b", {
|
|
191
182
|
children: name
|
|
192
183
|
}), "\uFF1B"]
|
|
193
|
-
}) : /*#__PURE__*/(
|
|
194
|
-
children: ["\u60A8\u9700\u8981\u8D2D\u4E70\u624D\u80FD\u4F7F\u7528 ", /*#__PURE__*/(
|
|
184
|
+
}) : /*#__PURE__*/_jsxs("p", {
|
|
185
|
+
children: ["\u60A8\u9700\u8981\u8D2D\u4E70\u624D\u80FD\u4F7F\u7528 ", /*#__PURE__*/_jsx("b", {
|
|
195
186
|
children: name
|
|
196
187
|
}), "\uFF1B"]
|
|
197
|
-
}), /*#__PURE__*/(
|
|
188
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
198
189
|
children: "\u5728\u5E94\u7528\u542F\u52A8\u524D\uFF0C\u9700\u8981\u9009\u62E9\u60A8\u7684\u8282\u70B9\uFF1B"
|
|
199
|
-
}), /*#__PURE__*/(
|
|
190
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
200
191
|
children: "\u5982\u679C\u60A8\u6CA1\u6709\u8282\u70B9\uFF0C\u6211\u4EEC\u4F1A\u5F15\u5BFC\u60A8\u521B\u5EFA\u65B0\u7684\u8282\u70B9\uFF1B"
|
|
201
|
-
}), /*#__PURE__*/(
|
|
192
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
202
193
|
children: "\u4E0B\u9762\u4E3A\u8BE5\u5E94\u7528\u7684\u4FE1\u606F\uFF1A"
|
|
203
194
|
})]
|
|
204
195
|
});
|
|
205
196
|
} else {
|
|
206
|
-
descEle = /*#__PURE__*/(
|
|
207
|
-
children: [isFree ? /*#__PURE__*/(
|
|
208
|
-
children: ["You can use ", /*#__PURE__*/(
|
|
197
|
+
descEle = /*#__PURE__*/_jsxs(_Fragment, {
|
|
198
|
+
children: [isFree ? /*#__PURE__*/_jsxs("p", {
|
|
199
|
+
children: ["You can use ", /*#__PURE__*/_jsx("b", {
|
|
209
200
|
children: name
|
|
210
201
|
}), " for free;"]
|
|
211
|
-
}) : /*#__PURE__*/(
|
|
212
|
-
children: ["You need to purchase before launch ", /*#__PURE__*/(
|
|
202
|
+
}) : /*#__PURE__*/_jsxs("p", {
|
|
203
|
+
children: ["You need to purchase before launch ", /*#__PURE__*/_jsx("b", {
|
|
213
204
|
children: name
|
|
214
205
|
}), ";"]
|
|
215
|
-
}), /*#__PURE__*/(
|
|
206
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
216
207
|
children: "Before the blocklet starts, you need to select your Blocklet Server; "
|
|
217
|
-
}), /*#__PURE__*/(
|
|
208
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
218
209
|
children: "If you do not have any Blocklet Server, we will guide you to create a new one; "
|
|
219
|
-
}), /*#__PURE__*/(
|
|
210
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
220
211
|
children: "Below is the information for the blocklet: "
|
|
221
212
|
})]
|
|
222
213
|
});
|
|
223
214
|
}
|
|
224
|
-
return /*#__PURE__*/(
|
|
225
|
-
children: [handleDescEle || descEle, /*#__PURE__*/(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Table, {
|
|
229
|
-
size: "small",
|
|
230
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableBody, {
|
|
231
|
-
children: infos.map(e => {
|
|
232
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.TableRow, {
|
|
233
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
234
|
-
component: "th",
|
|
235
|
-
scope: "row",
|
|
236
|
-
style: {
|
|
237
|
-
width: 100
|
|
238
|
-
},
|
|
239
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
240
|
-
style: {
|
|
241
|
-
fontWeight: 'bold',
|
|
242
|
-
whiteSpace: 'nowrap'
|
|
243
|
-
},
|
|
244
|
-
children: e.key
|
|
245
|
-
})
|
|
246
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableCell, {
|
|
247
|
-
children: e.value
|
|
248
|
-
})]
|
|
249
|
-
}, e.key);
|
|
250
|
-
})
|
|
251
|
-
})
|
|
252
|
-
})
|
|
253
|
-
})
|
|
254
|
-
}), markdownSource ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
215
|
+
return /*#__PURE__*/_jsxs(Container, {
|
|
216
|
+
children: [handleDescEle || descEle, /*#__PURE__*/_jsx(InfoList, {
|
|
217
|
+
infoList: infos
|
|
218
|
+
}), markdownSource ? /*#__PURE__*/_jsxs("div", {
|
|
255
219
|
className: "app-overview",
|
|
256
|
-
children: [/*#__PURE__*/(
|
|
220
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
257
221
|
variant: "h5",
|
|
258
222
|
gutterBottom: true,
|
|
259
|
-
children: (
|
|
260
|
-
}), /*#__PURE__*/(
|
|
261
|
-
children: /*#__PURE__*/(
|
|
223
|
+
children: get(localeData[locale], 'appinfo.overview')
|
|
224
|
+
}), /*#__PURE__*/_jsx(MarkdownBody, {
|
|
225
|
+
children: /*#__PURE__*/_jsx(PostContent, {
|
|
262
226
|
component: "div",
|
|
263
227
|
className: "content-wrapper post-content",
|
|
264
|
-
children: /*#__PURE__*/(
|
|
265
|
-
source: markdownSource
|
|
228
|
+
children: /*#__PURE__*/_jsx(MarkdownPreview, {
|
|
229
|
+
source: markdownSource,
|
|
230
|
+
wrapperElement: {
|
|
231
|
+
'data-color-mode': 'light'
|
|
232
|
+
}
|
|
266
233
|
// 先保留后面两个参数,可用于精细判断
|
|
267
234
|
// eslint-disable-next-line no-unused-vars
|
|
268
235
|
,
|
|
269
236
|
urlTransform: (url, key, node) => {
|
|
270
237
|
if (url.startsWith('/')) {
|
|
271
|
-
return (
|
|
238
|
+
return joinURL(registryUrl, url);
|
|
272
239
|
}
|
|
273
240
|
return url;
|
|
274
241
|
}
|
|
275
242
|
})
|
|
276
243
|
})
|
|
277
244
|
})]
|
|
278
|
-
}) : blockletDesc ? /*#__PURE__*/(
|
|
245
|
+
}) : blockletDesc ? /*#__PURE__*/_jsx("div", {
|
|
279
246
|
className: "app-overview",
|
|
280
247
|
children: blockletDesc
|
|
281
248
|
}) : null]
|
|
282
249
|
});
|
|
283
250
|
}
|
|
284
|
-
const PostContent = (
|
|
285
|
-
|
|
251
|
+
const PostContent = styled(Typography)`
|
|
252
|
+
width: 100%;
|
|
253
|
+
word-wrap: break-word;
|
|
254
|
+
word-break: break-word;
|
|
255
|
+
line-height: 1.5em;
|
|
256
|
+
min-height: 10vh;
|
|
257
|
+
margin-bottom: 40px !important;
|
|
258
|
+
|
|
259
|
+
.alert-content {
|
|
260
|
+
max-width: 100%;
|
|
261
|
+
p:last-of-type {
|
|
262
|
+
margin-bottom: 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
iframe {
|
|
267
|
+
width: 100% !important;
|
|
268
|
+
}
|
|
269
|
+
`;
|
|
270
|
+
const Container = styled.div`
|
|
271
|
+
.info-table {
|
|
272
|
+
a {
|
|
273
|
+
word-break: break-all;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
.app-overview {
|
|
277
|
+
font-size: 16px;
|
|
278
|
+
margin: 16px 0 0 16px;
|
|
279
|
+
h1 {
|
|
280
|
+
margin: 8px 0;
|
|
281
|
+
font-size: 20px;
|
|
282
|
+
}
|
|
283
|
+
h2 {
|
|
284
|
+
margin: 8px 0;
|
|
285
|
+
font-size: 18px;
|
|
286
|
+
}
|
|
287
|
+
ul {
|
|
288
|
+
display: block;
|
|
289
|
+
list-style-type: disc;
|
|
290
|
+
padding-left: 2em;
|
|
291
|
+
li {
|
|
292
|
+
display: list-item;
|
|
293
|
+
list-style: disc;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
blockquote {
|
|
297
|
+
margin-left: 2em;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
`;
|
|
286
301
|
WizardDesc.propTypes = {
|
|
287
|
-
blockletMeta:
|
|
288
|
-
locale:
|
|
289
|
-
handleDescEle:
|
|
302
|
+
blockletMeta: PropTypes.object.isRequired,
|
|
303
|
+
locale: PropTypes.string.isRequired,
|
|
304
|
+
handleDescEle: PropTypes.node
|
|
290
305
|
};
|
|
291
306
|
WizardDesc.defaultProps = {
|
|
292
307
|
handleDescEle: ''
|
|
293
308
|
};
|
|
294
|
-
|
|
309
|
+
export default WizardDesc;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-layout",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.21",
|
|
4
4
|
"description": "Common ux components of launcher",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,13 +26,9 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"lint": "eslint src",
|
|
28
28
|
"lint:fix": "npm run lint -- --fix",
|
|
29
|
-
"build": "
|
|
30
|
-
"build:lib": "babel src --out-dir lib --copy-files --no-copy-ignored",
|
|
31
|
-
"build:es": "babel --config-file ./babel.config.es.js src --out-dir es --copy-files --no-copy-ignored",
|
|
29
|
+
"build": "babel src --out-dir lib --copy-files --no-copy-ignored",
|
|
32
30
|
"autoexports": "node tools/auto-exports.js",
|
|
33
|
-
"watch": "
|
|
34
|
-
"watch:lib": "babel src --out-dir lib -w --copy-files",
|
|
35
|
-
"watch:es": "babel --config-file ./babel.config.es.js src --out-dir es -w --copy-files",
|
|
31
|
+
"watch": "babel src --out-dir lib -w --copy-files",
|
|
36
32
|
"prepublish": "npm run build"
|
|
37
33
|
},
|
|
38
34
|
"bugs": {
|
|
@@ -46,9 +42,9 @@
|
|
|
46
42
|
"react": "^18.2.0"
|
|
47
43
|
},
|
|
48
44
|
"dependencies": {
|
|
49
|
-
"@arcblock/icons": "^2.9.
|
|
50
|
-
"@blocklet/launcher-util": "2.3.
|
|
51
|
-
"@blocklet/launcher-ux": "2.3.
|
|
45
|
+
"@arcblock/icons": "^2.9.89",
|
|
46
|
+
"@blocklet/launcher-util": "2.3.21",
|
|
47
|
+
"@blocklet/launcher-ux": "2.3.21",
|
|
52
48
|
"@blocklet/meta": "^1.16.26",
|
|
53
49
|
"@emotion/react": "^11.11.4",
|
|
54
50
|
"@emotion/styled": "^11.11.5",
|
|
@@ -69,15 +65,5 @@
|
|
|
69
65
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
70
66
|
"glob": "^10.4.1"
|
|
71
67
|
},
|
|
72
|
-
"
|
|
73
|
-
".": {
|
|
74
|
-
"import": "./es/index.js",
|
|
75
|
-
"require": "./lib/index.js"
|
|
76
|
-
},
|
|
77
|
-
"./lib/": {
|
|
78
|
-
"import": "./es/",
|
|
79
|
-
"require": "./lib/"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"gitHead": "f066eec3d7942533b3dbc88419840e3ce06a05d1"
|
|
68
|
+
"gitHead": "6027e12a520531f4a246711373cc9dc485bab82c"
|
|
83
69
|
}
|
|
Binary file
|