@blocklet/launcher-layout 3.0.10 → 3.0.12
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/index.js +64 -64
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as i, jsxs as r, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { deepmerge as
|
|
4
|
-
import { ThemeProvider as
|
|
5
|
-
import { styled as l, useTheme as
|
|
1
|
+
import { jsx as i, jsxs as r, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import A from "@arcblock/ux/lib/Center";
|
|
3
|
+
import { deepmerge as W } from "@arcblock/ux/lib/Theme";
|
|
4
|
+
import { ThemeProvider as R } from "@emotion/react";
|
|
5
|
+
import { styled as l, Box as d, useTheme as _, useMediaQuery as D, StyledEngineProvider as F, ThemeProvider as q, Typography as w, CircularProgress as B } from "@mui/material";
|
|
6
6
|
import G from "lodash/isObject";
|
|
7
7
|
import t from "prop-types";
|
|
8
8
|
import { isValidElement as I, Suspense as Q } from "react";
|
|
9
9
|
import { HeaderAddons as V } from "@arcblock/ux/lib/Header";
|
|
10
|
-
import { useStepContext as
|
|
11
|
-
import
|
|
12
|
-
import { getTranslations as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
10
|
+
import { useStepContext as J } from "./context/step.js";
|
|
11
|
+
import K from "./header.js";
|
|
12
|
+
import { getTranslations as U } from "./locale.js";
|
|
13
|
+
import X from "./nav.js";
|
|
14
|
+
import Y from "./small-circle-progress.js";
|
|
15
|
+
const c = "72px", Z = l(d)`
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
display: flex;
|
|
18
18
|
overflow: hidden;
|
|
19
19
|
width: 100%;
|
|
20
20
|
height: 100%;
|
|
21
|
-
padding-top: ${
|
|
22
|
-
`,
|
|
21
|
+
padding-top: ${c};
|
|
22
|
+
`, L = l(d)`
|
|
23
23
|
display: flex;
|
|
24
24
|
min-width: 900px;
|
|
25
25
|
max-width: ${(e) => e.contentMaxWidth};
|
|
@@ -30,52 +30,52 @@ const p = "72px", Y = l("div")`
|
|
|
30
30
|
height: ${(e) => e.height || "80%"};
|
|
31
31
|
|
|
32
32
|
@media (max-height: 1200px) {
|
|
33
|
-
margin-top: ${
|
|
33
|
+
margin-top: ${c};
|
|
34
34
|
height: 100%;
|
|
35
35
|
max-height: 100%;
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
38
|
-
function
|
|
38
|
+
function ee({
|
|
39
39
|
blockletMeta: e = {},
|
|
40
|
-
loading:
|
|
41
|
-
children:
|
|
42
|
-
logoUrl:
|
|
43
|
-
locale:
|
|
44
|
-
header:
|
|
45
|
-
headerEndAddons:
|
|
46
|
-
pcWidth:
|
|
40
|
+
loading: m = !1,
|
|
41
|
+
children: j,
|
|
42
|
+
logoUrl: h = "",
|
|
43
|
+
locale: s = "en",
|
|
44
|
+
header: p = null,
|
|
45
|
+
headerEndAddons: u = null,
|
|
46
|
+
pcWidth: C = "80%",
|
|
47
47
|
navLogo: n = "",
|
|
48
48
|
useOfSkeleton: v = !0,
|
|
49
|
-
navSubTitle:
|
|
50
|
-
contentMaxWidth:
|
|
51
|
-
theme:
|
|
52
|
-
themeOverrides:
|
|
49
|
+
navSubTitle: g = "",
|
|
50
|
+
contentMaxWidth: x = "1245px",
|
|
51
|
+
theme: S = null,
|
|
52
|
+
themeOverrides: M = null,
|
|
53
53
|
extraNav: o = null,
|
|
54
|
-
...
|
|
54
|
+
...P
|
|
55
55
|
}) {
|
|
56
|
-
const
|
|
57
|
-
n && !I(n) && G(n) && (a ? n = n.mobile : n = /* @__PURE__ */ i(
|
|
58
|
-
const
|
|
59
|
-
return /* @__PURE__ */ i(
|
|
60
|
-
/* @__PURE__ */ r(
|
|
61
|
-
|
|
62
|
-
!
|
|
56
|
+
const H = _(), a = D((O) => O.breakpoints.down("md")), { activeStep: f, totalStepsCount: b } = J(), y = e || {}, E = a ? Z : L, N = U(s);
|
|
57
|
+
n && !I(n) && G(n) && (a ? n = n.mobile : n = /* @__PURE__ */ i(ne, { children: n.desktop }));
|
|
58
|
+
const k = W(H, S || {}, M || {});
|
|
59
|
+
return /* @__PURE__ */ i(F, { injectFirst: !0, children: /* @__PURE__ */ i(q, { theme: k, children: /* @__PURE__ */ i(R, { theme: k, children: /* @__PURE__ */ r(ie, { ...P, children: [
|
|
60
|
+
/* @__PURE__ */ r(te, { maxWidth: x, width: C, className: "ll-header", children: [
|
|
61
|
+
p && p,
|
|
62
|
+
!p && /* @__PURE__ */ r(z, { children: [
|
|
63
63
|
a && /* @__PURE__ */ i("div", { className: "left", children: /* @__PURE__ */ i(
|
|
64
|
-
|
|
64
|
+
K,
|
|
65
65
|
{
|
|
66
|
-
blockletMeta:
|
|
66
|
+
blockletMeta: y,
|
|
67
67
|
navLogo: n,
|
|
68
68
|
subTitle: /* @__PURE__ */ r("span", { children: [
|
|
69
|
-
`${
|
|
69
|
+
`${g || N.defaultNavSubTitle} ${f + 1}/${b}`,
|
|
70
70
|
/* @__PURE__ */ i(
|
|
71
|
-
|
|
71
|
+
Y,
|
|
72
72
|
{
|
|
73
|
-
value: (
|
|
73
|
+
value: (f + 1) / b * 100,
|
|
74
74
|
style: { marginLeft: 3 }
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
77
|
o && /* @__PURE__ */ i(
|
|
78
|
-
|
|
78
|
+
w,
|
|
79
79
|
{
|
|
80
80
|
variant: "caption",
|
|
81
81
|
className: "extra-nav-text",
|
|
@@ -94,18 +94,18 @@ function L({
|
|
|
94
94
|
}
|
|
95
95
|
)
|
|
96
96
|
] }),
|
|
97
|
-
logoUrl:
|
|
98
|
-
locale:
|
|
99
|
-
loading:
|
|
97
|
+
logoUrl: h,
|
|
98
|
+
locale: s,
|
|
99
|
+
loading: m
|
|
100
100
|
}
|
|
101
101
|
) }),
|
|
102
102
|
n && !a && /* @__PURE__ */ i("div", { className: "left", children: n }),
|
|
103
|
-
|
|
103
|
+
u && /* @__PURE__ */ i(V, { className: "right", children: u })
|
|
104
104
|
] })
|
|
105
105
|
] }),
|
|
106
|
-
/* @__PURE__ */ r(
|
|
106
|
+
/* @__PURE__ */ r(E, { contentMaxWidth: x, className: "ll-container", children: [
|
|
107
107
|
/* @__PURE__ */ i(
|
|
108
|
-
|
|
108
|
+
X,
|
|
109
109
|
{
|
|
110
110
|
sx: {
|
|
111
111
|
display: {
|
|
@@ -113,26 +113,26 @@ function L({
|
|
|
113
113
|
md: "block"
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
locale:
|
|
117
|
-
blockletMeta:
|
|
118
|
-
logoUrl:
|
|
116
|
+
locale: s,
|
|
117
|
+
blockletMeta: y,
|
|
118
|
+
logoUrl: h,
|
|
119
119
|
useOfSkeleton: v,
|
|
120
|
-
subTitle:
|
|
121
|
-
loading:
|
|
120
|
+
subTitle: g,
|
|
121
|
+
loading: m,
|
|
122
122
|
extraNav: o
|
|
123
123
|
}
|
|
124
124
|
),
|
|
125
|
-
/* @__PURE__ */ i(
|
|
125
|
+
/* @__PURE__ */ i(w, { component: "div", className: "layout-content", children: /* @__PURE__ */ i(
|
|
126
126
|
Q,
|
|
127
127
|
{
|
|
128
|
-
fallback: /* @__PURE__ */ i(
|
|
129
|
-
children:
|
|
128
|
+
fallback: /* @__PURE__ */ i(A, { relative: "parent", children: /* @__PURE__ */ i(B, { style: { marginTop: 36 } }) }),
|
|
129
|
+
children: j
|
|
130
130
|
}
|
|
131
131
|
) })
|
|
132
132
|
] })
|
|
133
133
|
] }) }) }) });
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
ee.propTypes = {
|
|
136
136
|
loading: t.bool,
|
|
137
137
|
blockletMeta: t.object,
|
|
138
138
|
children: t.object.isRequired,
|
|
@@ -152,10 +152,10 @@ L.propTypes = {
|
|
|
152
152
|
themeOverrides: t.object,
|
|
153
153
|
extraNav: t.object
|
|
154
154
|
};
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
const
|
|
155
|
+
const $ = navigator.userAgent.toLocaleLowerCase();
|
|
156
|
+
let T = "";
|
|
157
|
+
$.includes("iphone os") && $.includes("crios") && (T = "height: calc(100vh - 60px);");
|
|
158
|
+
const te = l("header")`
|
|
159
159
|
width: ${(e) => e.width || "80%"};
|
|
160
160
|
min-width: 900px;
|
|
161
161
|
box-sizing: border-box;
|
|
@@ -174,7 +174,7 @@ const ee = l("header")`
|
|
|
174
174
|
${(e) => e.theme.breakpoints.down("md")} {
|
|
175
175
|
min-width: 360px;
|
|
176
176
|
width: 100%;
|
|
177
|
-
height: ${
|
|
177
|
+
height: ${c};
|
|
178
178
|
justify-content: space-between;
|
|
179
179
|
background-color: ${({ theme: e }) => e.palette.mode === "dark" ? e.palette.background.default : e.palette.grey[100]};
|
|
180
180
|
}
|
|
@@ -184,14 +184,14 @@ const ee = l("header")`
|
|
|
184
184
|
display: flex;
|
|
185
185
|
align-items: center;
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`, ie = l(d)`
|
|
188
188
|
display: flex;
|
|
189
189
|
flex-direction: column;
|
|
190
190
|
justify-content: center;
|
|
191
191
|
align-items: center;
|
|
192
192
|
letter-spacing: normal;
|
|
193
193
|
background: ${({ theme: e }) => e.palette.mode === "dark" ? e.palette.background.default : e.palette.grey[100]};
|
|
194
|
-
${
|
|
194
|
+
${T}
|
|
195
195
|
|
|
196
196
|
header:empty {
|
|
197
197
|
display: none;
|
|
@@ -228,10 +228,10 @@ const ee = l("header")`
|
|
|
228
228
|
padding: 16px;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
`,
|
|
231
|
+
`, ne = l(d)`
|
|
232
232
|
display: block;
|
|
233
233
|
margin-top: 4px;
|
|
234
234
|
`;
|
|
235
235
|
export {
|
|
236
|
-
|
|
236
|
+
ee as default
|
|
237
237
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/launcher-layout",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"description": "Common ux components of launcher",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@arcblock/did-connect": "^3.0.
|
|
40
|
-
"@arcblock/ux": "^3.0.
|
|
39
|
+
"@arcblock/did-connect": "^3.0.10",
|
|
40
|
+
"@arcblock/ux": "^3.0.10",
|
|
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.
|
|
47
|
-
"@blocklet/meta": "^1.16.
|
|
46
|
+
"@arcblock/icons": "3.0.12",
|
|
47
|
+
"@blocklet/meta": "^1.16.45",
|
|
48
48
|
"@emotion/react": "^11.14.0",
|
|
49
49
|
"@emotion/styled": "^11.14.0",
|
|
50
50
|
"@uiw/react-markdown-preview": "^5.1.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"rehype-react": "^7.2.0",
|
|
56
56
|
"url-join": "^4.0.1"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "ebe824e4b0ddfc1cbdd9ffecc22283e57a58c042"
|
|
59
59
|
}
|