@blocklet/launcher-layout 2.3.20 → 2.3.22

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(e) { return e && e.__esModule ? e : { default: e }; }
18
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
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,25 +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 _DID = _interopRequireDefault(require("@arcblock/ux/lib/DID"));
11
- var _get = _interopRequireDefault(require("lodash/get"));
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
13
- var _reactMarkdownPreview = _interopRequireDefault(require("@uiw/react-markdown-preview"));
14
- var _material = require("@mui/material");
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 _rehypeReact.default({
31
- createElement: _react.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(_ref) {
62
- let {
63
- blockletMeta,
64
- locale,
65
- handleDescEle
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 = (0, _util.getDisplayName)({
67
+ const name = getDisplayName({
77
68
  meta: data
78
69
  });
79
- const readmeState = (0, _ahooks.useRequest)(() => {
70
+ const readmeState = useRequest(() => {
80
71
  if (registryUrl && did) {
81
- return fetch((0, _urlJoin.default)(registryUrl, '/api/blocklets', did, 'readme')).then(res => res.json());
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 = (0, _ahooks.useCreation)(() => {
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 = (0, _get.default)(data, 'owner.fullName');
86
+ let authorInfo = get(data, 'owner.fullName');
96
87
  if (authorInfo) {
97
- const ownerDid = (0, _get.default)(data, 'owner.did');
88
+ const ownerDid = get(data, 'owner.did');
98
89
  if (ownerDid) {
99
- authorInfo = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
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__*/(0, _jsxRuntime.jsx)(_DID.default, {
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 = (0, _get.default)(data, 'author.name');
114
+ authorInfo = get(data, 'author.name');
124
115
  }
125
116
  const infos = [{
126
- key: (0, _get.default)(localeData[locale], 'appinfo.name'),
127
- value: (0, _util.getDisplayName)({
117
+ key: get(localeData[locale], 'appinfo.name'),
118
+ value: getDisplayName({
128
119
  meta: data
129
120
  })
130
121
  }, {
131
- key: (0, _get.default)(localeData[locale], 'appinfo.version'),
122
+ key: get(localeData[locale], 'appinfo.version'),
132
123
  value: data.version
133
124
  }, {
134
- key: (0, _get.default)(localeData[locale], 'appinfo.author'),
125
+ key: get(localeData[locale], 'appinfo.author'),
135
126
  value: authorInfo
136
127
  }, {
137
128
  type: 'description',
138
- key: (0, _get.default)(localeData[locale], 'appinfo.description'),
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: (0, _get.default)(localeData[locale], 'appinfo.requirements'),
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: (0, _get.default)(localeData[locale], 'appinfo.community'),
150
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
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: (0, _get.default)(localeData[locale], 'appinfo.documentation'),
161
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
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: (0, _get.default)(localeData[locale], 'appinfo.support'),
172
- value: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
173
- href: "mailto:".concat(data.support),
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: (0, _get.default)(localeData[locale], 'appinfo.overview'),
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
189
- children: [isFree ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
190
- 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", {
191
182
  children: name
192
183
  }), "\uFF1B"]
193
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
194
- 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", {
195
186
  children: name
196
187
  }), "\uFF1B"]
197
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
207
- children: [isFree ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
208
- 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", {
209
200
  children: name
210
201
  }), " for free;"]
211
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
212
- 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", {
213
204
  children: name
214
205
  }), ";"]
215
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
206
+ }), /*#__PURE__*/_jsx("p", {
216
207
  children: "Before the blocklet starts, you need to select your Blocklet Server; "
217
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
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__*/(0, _jsxRuntime.jsx)("p", {
210
+ }), /*#__PURE__*/_jsx("p", {
220
211
  children: "Below is the information for the blocklet: "
221
212
  })]
222
213
  });
223
214
  }
224
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Container, {
225
- children: [handleDescEle || descEle, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
226
- className: "info-table",
227
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TableContainer, {
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__*/(0, _jsxRuntime.jsx)(_material.Typography, {
220
+ children: [/*#__PURE__*/_jsx(Typography, {
257
221
  variant: "h5",
258
222
  gutterBottom: true,
259
- children: (0, _get.default)(localeData[locale], 'appinfo.overview')
260
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_markdownBody.default, {
261
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(PostContent, {
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__*/(0, _jsxRuntime.jsx)(_reactMarkdownPreview.default, {
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 (0, _urlJoin.default)(registryUrl, url);
238
+ return joinURL(registryUrl, url);
272
239
  }
273
240
  return url;
274
241
  }
275
242
  })
276
243
  })
277
244
  })]
278
- }) : blockletDesc ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
245
+ }) : blockletDesc ? /*#__PURE__*/_jsx("div", {
279
246
  className: "app-overview",
280
247
  children: blockletDesc
281
248
  }) : null]
282
249
  });
283
250
  }
284
- const PostContent = (0, _styled.default)(_material.Typography)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n word-wrap: break-word;\n word-break: break-word;\n line-height: 1.5em;\n min-height: 10vh;\n margin-bottom: 40px !important;\n\n .alert-content {\n max-width: 100%;\n p:last-of-type {\n margin-bottom: 0;\n }\n }\n\n iframe {\n width: 100% !important;\n }\n"])));
285
- const Container = _styled.default.div(_templateObject2 || (_templateObject2 = _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
+ `;
286
301
  WizardDesc.propTypes = {
287
- blockletMeta: _propTypes.default.object.isRequired,
288
- locale: _propTypes.default.string.isRequired,
289
- handleDescEle: _propTypes.default.node
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
- 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.20",
3
+ "version": "2.3.22",
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": "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": {
@@ -46,10 +42,10 @@
46
42
  "react": "^18.2.0"
47
43
  },
48
44
  "dependencies": {
49
- "@arcblock/icons": "^2.9.88",
50
- "@blocklet/launcher-util": "2.3.20",
51
- "@blocklet/launcher-ux": "2.3.20",
52
- "@blocklet/meta": "^1.16.26",
45
+ "@arcblock/icons": "^2.9.91",
46
+ "@blocklet/launcher-util": "2.3.22",
47
+ "@blocklet/launcher-ux": "2.3.22",
48
+ "@blocklet/meta": "^1.16.27",
53
49
  "@emotion/react": "^11.11.4",
54
50
  "@emotion/styled": "^11.11.5",
55
51
  "@uiw/react-markdown-preview": "^5.1.1",
@@ -61,23 +57,13 @@
61
57
  "url-join": "^4.0.1"
62
58
  },
63
59
  "devDependencies": {
64
- "@babel/cli": "^7.24.6",
65
- "@babel/core": "^7.24.6",
66
- "@babel/preset-env": "^7.24.6",
67
- "@babel/preset-react": "^7.24.6",
60
+ "@babel/cli": "^7.24.7",
61
+ "@babel/core": "^7.24.7",
62
+ "@babel/preset-env": "^7.24.7",
63
+ "@babel/preset-react": "^7.24.7",
68
64
  "@storybook/react": "^6.5.16",
69
65
  "babel-plugin-inline-react-svg": "^2.0.2",
70
66
  "glob": "^10.4.1"
71
67
  },
72
- "exports": {
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": "26147646fbed9dcb818a87cf2b450caf0a3a75bb"
83
69
  }
Binary file