@blocklet/launcher-layout 2.3.19 → 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 +52 -0
- 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 +187 -96
- package/package.json +19 -31
- 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/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 -238
|
@@ -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,24 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _TableCell = _interopRequireDefault(require("@mui/material/TableCell"));
|
|
16
|
-
var _TableContainer = _interopRequireDefault(require("@mui/material/TableContainer"));
|
|
17
|
-
var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
|
|
18
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
var _templateObject;
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
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";
|
|
22
15
|
const isFreeBlocklet = meta => {
|
|
23
16
|
if (!meta.payment) {
|
|
24
17
|
return true;
|
|
@@ -26,8 +19,8 @@ const isFreeBlocklet = meta => {
|
|
|
26
19
|
const priceList = (meta.payment.price || []).map(x => x.value || 0);
|
|
27
20
|
return priceList.every(x => x === 0);
|
|
28
21
|
};
|
|
29
|
-
const renderAst = new
|
|
30
|
-
createElement
|
|
22
|
+
const renderAst = new RehypeReact({
|
|
23
|
+
createElement
|
|
31
24
|
}).Compiler;
|
|
32
25
|
const localeData = {
|
|
33
26
|
zh: {
|
|
@@ -57,46 +50,95 @@ const localeData = {
|
|
|
57
50
|
}
|
|
58
51
|
}
|
|
59
52
|
};
|
|
60
|
-
function WizardDesc(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
} = _ref;
|
|
53
|
+
function WizardDesc({
|
|
54
|
+
blockletMeta,
|
|
55
|
+
locale,
|
|
56
|
+
handleDescEle
|
|
57
|
+
}) {
|
|
66
58
|
const {
|
|
67
59
|
data
|
|
68
60
|
} = blockletMeta;
|
|
69
|
-
|
|
61
|
+
|
|
62
|
+
// FIXME: @zhanghan 暂且假定这里是有 registryUrl 的值的,后续需要更好的方式来判断一个 blocklet 来源于哪个 registryUrl
|
|
63
|
+
const {
|
|
64
|
+
registryUrl,
|
|
65
|
+
did
|
|
66
|
+
} = data;
|
|
67
|
+
const name = getDisplayName({
|
|
70
68
|
meta: data
|
|
71
69
|
});
|
|
70
|
+
const readmeState = useRequest(() => {
|
|
71
|
+
if (registryUrl && did) {
|
|
72
|
+
return fetch(joinURL(registryUrl, '/api/blocklets', did, 'readme')).then(res => res.json());
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}, {
|
|
76
|
+
refreshDeps: [registryUrl, did]
|
|
77
|
+
});
|
|
78
|
+
const markdownSource = useCreation(() => {
|
|
79
|
+
if (!readmeState.data) {
|
|
80
|
+
return '';
|
|
81
|
+
}
|
|
82
|
+
return readmeState.data[locale] || readmeState.data.en || readmeState.data[Object.keys(readmeState.data)[0]];
|
|
83
|
+
}, [readmeState]);
|
|
72
84
|
const blockletDesc = data && data.htmlAst ? renderAst(data.htmlAst) : '';
|
|
73
85
|
const isFree = isFreeBlocklet(data);
|
|
86
|
+
let authorInfo = get(data, 'owner.fullName');
|
|
87
|
+
if (authorInfo) {
|
|
88
|
+
const ownerDid = get(data, 'owner.did');
|
|
89
|
+
if (ownerDid) {
|
|
90
|
+
authorInfo = /*#__PURE__*/_jsxs(Box, {
|
|
91
|
+
sx: {
|
|
92
|
+
display: 'flex',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
gap: 1
|
|
95
|
+
},
|
|
96
|
+
children: [authorInfo, /*#__PURE__*/_jsx(DID, {
|
|
97
|
+
sx: {
|
|
98
|
+
lineHeight: 'initial',
|
|
99
|
+
'&::before': {
|
|
100
|
+
content: '"("'
|
|
101
|
+
},
|
|
102
|
+
'&::after': {
|
|
103
|
+
content: '")"'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
did: ownerDid,
|
|
107
|
+
compact: true,
|
|
108
|
+
size: 14,
|
|
109
|
+
locale: locale
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
authorInfo = get(data, 'author.name');
|
|
115
|
+
}
|
|
74
116
|
const infos = [{
|
|
75
|
-
key: (
|
|
76
|
-
value:
|
|
117
|
+
key: get(localeData[locale], 'appinfo.name'),
|
|
118
|
+
value: getDisplayName({
|
|
77
119
|
meta: data
|
|
78
120
|
})
|
|
79
121
|
}, {
|
|
80
|
-
key: (
|
|
122
|
+
key: get(localeData[locale], 'appinfo.version'),
|
|
81
123
|
value: data.version
|
|
82
124
|
}, {
|
|
83
|
-
key: (
|
|
84
|
-
value:
|
|
125
|
+
key: get(localeData[locale], 'appinfo.author'),
|
|
126
|
+
value: authorInfo
|
|
85
127
|
}, {
|
|
86
128
|
type: 'description',
|
|
87
|
-
key: (
|
|
129
|
+
key: get(localeData[locale], 'appinfo.description'),
|
|
88
130
|
value: data.description
|
|
89
131
|
}];
|
|
90
132
|
if (data.requirements) {
|
|
91
133
|
infos.push({
|
|
92
|
-
key: (
|
|
134
|
+
key: get(localeData[locale], 'appinfo.requirements'),
|
|
93
135
|
value: data.requirements.server
|
|
94
136
|
});
|
|
95
137
|
}
|
|
96
138
|
if (data.community) {
|
|
97
139
|
infos.push({
|
|
98
|
-
key: (
|
|
99
|
-
value: /*#__PURE__*/(
|
|
140
|
+
key: get(localeData[locale], 'appinfo.community'),
|
|
141
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
100
142
|
href: data.community,
|
|
101
143
|
target: "_blank",
|
|
102
144
|
rel: "noreferrer",
|
|
@@ -106,8 +148,8 @@ function WizardDesc(_ref) {
|
|
|
106
148
|
}
|
|
107
149
|
if (data.documentation) {
|
|
108
150
|
infos.push({
|
|
109
|
-
key: (
|
|
110
|
-
value: /*#__PURE__*/(
|
|
151
|
+
key: get(localeData[locale], 'appinfo.documentation'),
|
|
152
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
111
153
|
href: data.documentation,
|
|
112
154
|
target: "_blank",
|
|
113
155
|
rel: "noreferrer",
|
|
@@ -117,9 +159,9 @@ function WizardDesc(_ref) {
|
|
|
117
159
|
}
|
|
118
160
|
if (data.support) {
|
|
119
161
|
infos.push({
|
|
120
|
-
key: (
|
|
121
|
-
value: /*#__PURE__*/(
|
|
122
|
-
href:
|
|
162
|
+
key: get(localeData[locale], 'appinfo.support'),
|
|
163
|
+
value: /*#__PURE__*/_jsx("a", {
|
|
164
|
+
href: `mailto:${data.support}`,
|
|
123
165
|
target: "_blank",
|
|
124
166
|
rel: "noreferrer",
|
|
125
167
|
children: data.support
|
|
@@ -128,91 +170,140 @@ function WizardDesc(_ref) {
|
|
|
128
170
|
}
|
|
129
171
|
if (blockletDesc) {
|
|
130
172
|
infos.push({
|
|
131
|
-
key: (
|
|
173
|
+
key: get(localeData[locale], 'appinfo.overview'),
|
|
132
174
|
value: ''
|
|
133
175
|
});
|
|
134
176
|
}
|
|
135
177
|
let descEle;
|
|
136
178
|
if (locale === 'zh') {
|
|
137
|
-
descEle = /*#__PURE__*/(
|
|
138
|
-
children: [isFree ? /*#__PURE__*/(
|
|
139
|
-
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", {
|
|
140
182
|
children: name
|
|
141
183
|
}), "\uFF1B"]
|
|
142
|
-
}) : /*#__PURE__*/(
|
|
143
|
-
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", {
|
|
144
186
|
children: name
|
|
145
187
|
}), "\uFF1B"]
|
|
146
|
-
}), /*#__PURE__*/(
|
|
188
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
147
189
|
children: "\u5728\u5E94\u7528\u542F\u52A8\u524D\uFF0C\u9700\u8981\u9009\u62E9\u60A8\u7684\u8282\u70B9\uFF1B"
|
|
148
|
-
}), /*#__PURE__*/(
|
|
190
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
149
191
|
children: "\u5982\u679C\u60A8\u6CA1\u6709\u8282\u70B9\uFF0C\u6211\u4EEC\u4F1A\u5F15\u5BFC\u60A8\u521B\u5EFA\u65B0\u7684\u8282\u70B9\uFF1B"
|
|
150
|
-
}), /*#__PURE__*/(
|
|
192
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
151
193
|
children: "\u4E0B\u9762\u4E3A\u8BE5\u5E94\u7528\u7684\u4FE1\u606F\uFF1A"
|
|
152
194
|
})]
|
|
153
195
|
});
|
|
154
196
|
} else {
|
|
155
|
-
descEle = /*#__PURE__*/(
|
|
156
|
-
children: [isFree ? /*#__PURE__*/(
|
|
157
|
-
children: ["You can use ", /*#__PURE__*/(
|
|
197
|
+
descEle = /*#__PURE__*/_jsxs(_Fragment, {
|
|
198
|
+
children: [isFree ? /*#__PURE__*/_jsxs("p", {
|
|
199
|
+
children: ["You can use ", /*#__PURE__*/_jsx("b", {
|
|
158
200
|
children: name
|
|
159
201
|
}), " for free;"]
|
|
160
|
-
}) : /*#__PURE__*/(
|
|
161
|
-
children: ["You need to purchase before launch ", /*#__PURE__*/(
|
|
202
|
+
}) : /*#__PURE__*/_jsxs("p", {
|
|
203
|
+
children: ["You need to purchase before launch ", /*#__PURE__*/_jsx("b", {
|
|
162
204
|
children: name
|
|
163
205
|
}), ";"]
|
|
164
|
-
}), /*#__PURE__*/(
|
|
206
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
165
207
|
children: "Before the blocklet starts, you need to select your Blocklet Server; "
|
|
166
|
-
}), /*#__PURE__*/(
|
|
208
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
167
209
|
children: "If you do not have any Blocklet Server, we will guide you to create a new one; "
|
|
168
|
-
}), /*#__PURE__*/(
|
|
210
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
169
211
|
children: "Below is the information for the blocklet: "
|
|
170
212
|
})]
|
|
171
213
|
});
|
|
172
214
|
}
|
|
173
|
-
return /*#__PURE__*/(
|
|
174
|
-
children: [handleDescEle || descEle, /*#__PURE__*/(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
215
|
+
return /*#__PURE__*/_jsxs(Container, {
|
|
216
|
+
children: [handleDescEle || descEle, /*#__PURE__*/_jsx(InfoList, {
|
|
217
|
+
infoList: infos
|
|
218
|
+
}), markdownSource ? /*#__PURE__*/_jsxs("div", {
|
|
219
|
+
className: "app-overview",
|
|
220
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
221
|
+
variant: "h5",
|
|
222
|
+
gutterBottom: true,
|
|
223
|
+
children: get(localeData[locale], 'appinfo.overview')
|
|
224
|
+
}), /*#__PURE__*/_jsx(MarkdownBody, {
|
|
225
|
+
children: /*#__PURE__*/_jsx(PostContent, {
|
|
226
|
+
component: "div",
|
|
227
|
+
className: "content-wrapper post-content",
|
|
228
|
+
children: /*#__PURE__*/_jsx(MarkdownPreview, {
|
|
229
|
+
source: markdownSource,
|
|
230
|
+
wrapperElement: {
|
|
231
|
+
'data-color-mode': 'light'
|
|
232
|
+
}
|
|
233
|
+
// 先保留后面两个参数,可用于精细判断
|
|
234
|
+
// eslint-disable-next-line no-unused-vars
|
|
235
|
+
,
|
|
236
|
+
urlTransform: (url, key, node) => {
|
|
237
|
+
if (url.startsWith('/')) {
|
|
238
|
+
return joinURL(registryUrl, url);
|
|
239
|
+
}
|
|
240
|
+
return url;
|
|
241
|
+
}
|
|
200
242
|
})
|
|
201
243
|
})
|
|
202
|
-
})
|
|
203
|
-
})
|
|
244
|
+
})]
|
|
245
|
+
}) : blockletDesc ? /*#__PURE__*/_jsx("div", {
|
|
204
246
|
className: "app-overview",
|
|
205
247
|
children: blockletDesc
|
|
206
|
-
})]
|
|
248
|
+
}) : null]
|
|
207
249
|
});
|
|
208
250
|
}
|
|
209
|
-
const
|
|
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
|
+
`;
|
|
210
301
|
WizardDesc.propTypes = {
|
|
211
|
-
blockletMeta:
|
|
212
|
-
locale:
|
|
213
|
-
handleDescEle:
|
|
302
|
+
blockletMeta: PropTypes.object.isRequired,
|
|
303
|
+
locale: PropTypes.string.isRequired,
|
|
304
|
+
handleDescEle: PropTypes.node
|
|
214
305
|
};
|
|
215
306
|
WizardDesc.defaultProps = {
|
|
216
307
|
handleDescEle: ''
|
|
217
308
|
};
|
|
218
|
-
|
|
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,32 +26,30 @@
|
|
|
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": {
|
|
39
35
|
"url": "https://github.com/blocklet/launcher/issues"
|
|
40
36
|
},
|
|
41
37
|
"peerDependencies": {
|
|
42
|
-
"react": ">=18.1.0"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
38
|
"@arcblock/did-connect": "^2.9.76",
|
|
46
|
-
"@arcblock/icons": "^2.9.76",
|
|
47
39
|
"@arcblock/ux": "^2.9.76",
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
40
|
+
"@mui/icons-material": "^5.15.15",
|
|
41
|
+
"@mui/material": "^5.15.15",
|
|
42
|
+
"react": "^18.2.0"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@arcblock/icons": "^2.9.89",
|
|
46
|
+
"@blocklet/launcher-util": "2.3.21",
|
|
47
|
+
"@blocklet/launcher-ux": "2.3.21",
|
|
50
48
|
"@blocklet/meta": "^1.16.26",
|
|
51
49
|
"@emotion/react": "^11.11.4",
|
|
52
50
|
"@emotion/styled": "^11.11.5",
|
|
53
|
-
"@
|
|
54
|
-
"
|
|
51
|
+
"@uiw/react-markdown-preview": "^5.1.1",
|
|
52
|
+
"ahooks": "^3.8.0",
|
|
55
53
|
"is-empty": "^1.2.0",
|
|
56
54
|
"lodash": "^4.17.21",
|
|
57
55
|
"prop-types": "^15.8.1",
|
|
@@ -59,23 +57,13 @@
|
|
|
59
57
|
"url-join": "^4.0.1"
|
|
60
58
|
},
|
|
61
59
|
"devDependencies": {
|
|
62
|
-
"@babel/cli": "^7.24.
|
|
63
|
-
"@babel/core": "^7.24.
|
|
64
|
-
"@babel/preset-env": "^7.24.
|
|
65
|
-
"@babel/preset-react": "^7.24.
|
|
60
|
+
"@babel/cli": "^7.24.6",
|
|
61
|
+
"@babel/core": "^7.24.6",
|
|
62
|
+
"@babel/preset-env": "^7.24.6",
|
|
63
|
+
"@babel/preset-react": "^7.24.6",
|
|
66
64
|
"@storybook/react": "^6.5.16",
|
|
67
65
|
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
68
|
-
"glob": "^10.
|
|
69
|
-
},
|
|
70
|
-
"exports": {
|
|
71
|
-
".": {
|
|
72
|
-
"import": "./es/index.js",
|
|
73
|
-
"require": "./lib/index.js"
|
|
74
|
-
},
|
|
75
|
-
"./lib/": {
|
|
76
|
-
"import": "./es/",
|
|
77
|
-
"require": "./lib/"
|
|
78
|
-
}
|
|
66
|
+
"glob": "^10.4.1"
|
|
79
67
|
},
|
|
80
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "6027e12a520531f4a246711373cc9dc485bab82c"
|
|
81
69
|
}
|
|
Binary file
|