@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.
@@ -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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
- function ServerEula(_ref) {
20
- let {
21
- onContinue,
22
- nextDisabled,
23
- launching,
24
- texts,
25
- description
26
- } = _ref;
27
- const [open, setOpen] = (0, _react.useState)(false);
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
30
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Div, {
31
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_submit.default, {
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__*/(0, _jsxRuntime.jsx)("div", {
24
+ children: [/*#__PURE__*/_jsx("div", {
35
25
  className: "eula-trigger",
36
26
  onClick: handleOpen,
37
27
  children: texts.listenName
38
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
45
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CircularProgress.default, {
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__*/(0, _jsxRuntime.jsx)(_Dialog.default, {
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: _propTypes.default.func.isRequired,
61
- nextDisabled: _propTypes.default.bool,
62
- launching: _propTypes.default.bool,
63
- description: _propTypes.default.any,
64
- texts: _propTypes.default.object
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 = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin: 0 auto;\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n @media (max-width: ", "px) {\n flex-direction: column;\n }\n\n .eula-trigger {\n cursor: pointer;\n text-decoration: underline;\n ", " {\n padding-right: 24px;\n }\n ", " {\n padding: 16px;\n }\n font-size: 14px;\n white-space: nowrap;\n &:hover {\n color: ", ";\n }\n }\n\n .next-button {\n min-width: 200px;\n }\n"])), props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.up('md'), props => props.theme.breakpoints.down('md'), props => props.theme.palette.primary.main);
77
- var _default = exports.default = ServerEula;
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
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = require("react");
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _util = require("@blocklet/meta/lib/util");
10
- var _get = _interopRequireDefault(require("lodash/get"));
11
- var _styled = _interopRequireDefault(require("@emotion/styled"));
12
- var _rehypeReact = _interopRequireDefault(require("rehype-react"));
13
- var _Table = _interopRequireDefault(require("@mui/material/Table"));
14
- var _TableBody = _interopRequireDefault(require("@mui/material/TableBody"));
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 _rehypeReact.default({
30
- createElement: _react.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(_ref) {
61
- let {
62
- blockletMeta,
63
- locale,
64
- handleDescEle
65
- } = _ref;
53
+ function WizardDesc({
54
+ blockletMeta,
55
+ locale,
56
+ handleDescEle
57
+ }) {
66
58
  const {
67
59
  data
68
60
  } = blockletMeta;
69
- const name = (0, _util.getDisplayName)({
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: (0, _get.default)(localeData[locale], 'appinfo.name'),
76
- value: (0, _util.getDisplayName)({
117
+ key: get(localeData[locale], 'appinfo.name'),
118
+ value: getDisplayName({
77
119
  meta: data
78
120
  })
79
121
  }, {
80
- key: (0, _get.default)(localeData[locale], 'appinfo.version'),
122
+ key: get(localeData[locale], 'appinfo.version'),
81
123
  value: data.version
82
124
  }, {
83
- key: (0, _get.default)(localeData[locale], 'appinfo.author'),
84
- value: (0, _get.default)(data, 'author.name')
125
+ key: get(localeData[locale], 'appinfo.author'),
126
+ value: authorInfo
85
127
  }, {
86
128
  type: 'description',
87
- key: (0, _get.default)(localeData[locale], 'appinfo.description'),
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: (0, _get.default)(localeData[locale], 'appinfo.requirements'),
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: (0, _get.default)(localeData[locale], 'appinfo.community'),
99
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
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: (0, _get.default)(localeData[locale], 'appinfo.documentation'),
110
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
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: (0, _get.default)(localeData[locale], 'appinfo.support'),
121
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
122
- href: "mailto:".concat(data.support),
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: (0, _get.default)(localeData[locale], 'appinfo.overview'),
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
138
- children: [isFree ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
139
- children: ["\u60A8\u53EF\u4EE5\u514D\u8D39\u4F7F\u7528 ", /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
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__*/(0, _jsxRuntime.jsxs)("p", {
143
- children: ["\u60A8\u9700\u8981\u8D2D\u4E70\u624D\u80FD\u4F7F\u7528 ", /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
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__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
156
- children: [isFree ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
157
- children: ["You can use ", /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
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__*/(0, _jsxRuntime.jsxs)("p", {
161
- children: ["You need to purchase before launch ", /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
202
+ }) : /*#__PURE__*/_jsxs("p", {
203
+ children: ["You need to purchase before launch ", /*#__PURE__*/_jsx("b", {
162
204
  children: name
163
205
  }), ";"]
164
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
206
+ }), /*#__PURE__*/_jsx("p", {
165
207
  children: "Before the blocklet starts, you need to select your Blocklet Server; "
166
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
210
+ }), /*#__PURE__*/_jsx("p", {
169
211
  children: "Below is the information for the blocklet: "
170
212
  })]
171
213
  });
172
214
  }
173
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
174
- children: [handleDescEle || descEle, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
175
- className: "info-table",
176
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableContainer.default, {
177
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Table.default, {
178
- size: "small",
179
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableBody.default, {
180
- children: infos.map(e => {
181
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_TableRow.default, {
182
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TableCell.default, {
183
- component: "th",
184
- scope: "row",
185
- style: {
186
- width: 100
187
- },
188
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
189
- style: {
190
- fontWeight: 'bold',
191
- whiteSpace: 'nowrap'
192
- },
193
- children: e.key
194
- })
195
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TableCell.default, {
196
- children: e.value
197
- })]
198
- }, e.key);
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
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
244
+ })]
245
+ }) : blockletDesc ? /*#__PURE__*/_jsx("div", {
204
246
  className: "app-overview",
205
247
  children: blockletDesc
206
- })]
248
+ }) : null]
207
249
  });
208
250
  }
209
- const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .info-table {\n a {\n word-break: break-all;\n }\n }\n .app-overview {\n font-size: 16px;\n margin: 16px 0 0 16px;\n h1 {\n margin: 8px 0;\n font-size: 20px;\n }\n h2 {\n margin: 8px 0;\n font-size: 18px;\n }\n ul {\n display: block;\n list-style-type: disc;\n padding-left: 2em;\n li {\n display: list-item;\n list-style: disc;\n }\n }\n blockquote {\n margin-left: 2em;\n }\n }\n"])));
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: _propTypes.default.object.isRequired,
212
- locale: _propTypes.default.string.isRequired,
213
- handleDescEle: _propTypes.default.node
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
- var _default = exports.default = WizardDesc;
309
+ export default WizardDesc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-layout",
3
- "version": "2.3.19",
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": "npm run build:lib && npm run build:es && npm run autoexports",
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": "npm run watch:lib && npm run watch:es && npm run autoexports",
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
- "@blocklet/launcher-util": "2.3.19",
49
- "@blocklet/launcher-ux": "2.3.19",
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
- "@mui/icons-material": "^5.15.15",
54
- "@mui/material": "^5.15.15",
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.1",
63
- "@babel/core": "^7.24.4",
64
- "@babel/preset-env": "^7.24.4",
65
- "@babel/preset-react": "^7.24.1",
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.3.12"
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": "390e1c74743c4733482995dc5bbae6f7ad1037d1"
68
+ "gitHead": "6027e12a520531f4a246711373cc9dc485bab82c"
81
69
  }
Binary file