@blocklet/launcher-layout 3.0.11 → 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.
Files changed (2) hide show
  1. package/lib/index.js +64 -64
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -1,25 +1,25 @@
1
- import { jsx as i, jsxs as r, Fragment as O } from "react/jsx-runtime";
2
- import z from "@arcblock/ux/lib/Center";
3
- import { deepmerge as A } from "@arcblock/ux/lib/Theme";
4
- import { ThemeProvider as W } from "@emotion/react";
5
- import { styled as l, useTheme as R, useMediaQuery as _, StyledEngineProvider as D, ThemeProvider as F, Typography as k, CircularProgress as q } from "@mui/material";
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 B } from "./context/step.js";
11
- import J from "./header.js";
12
- import { getTranslations as K } from "./locale.js";
13
- import U from "./nav.js";
14
- import X from "./small-circle-progress.js";
15
- const p = "72px", Y = l("div")`
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: ${p};
22
- `, Z = l("div")`
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: ${p};
33
+ margin-top: ${c};
34
34
  height: 100%;
35
35
  max-height: 100%;
36
36
  }
37
37
  `;
38
- function L({
38
+ function ee({
39
39
  blockletMeta: e = {},
40
- loading: c = !1,
41
- children: T,
42
- logoUrl: m = "",
43
- locale: d = "en",
44
- header: s = null,
45
- headerEndAddons: h = null,
46
- pcWidth: j = "80%",
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: u = "",
50
- contentMaxWidth: g = "1245px",
51
- theme: C = null,
52
- themeOverrides: S = null,
49
+ navSubTitle: g = "",
50
+ contentMaxWidth: x = "1245px",
51
+ theme: S = null,
52
+ themeOverrides: M = null,
53
53
  extraNav: o = null,
54
- ...M
54
+ ...P
55
55
  }) {
56
- const P = R(), a = _((N) => N.breakpoints.down("md")), { activeStep: x, totalStepsCount: f } = B(), b = e || {}, H = a ? Y : Z, E = K(d);
57
- n && !I(n) && G(n) && (a ? n = n.mobile : n = /* @__PURE__ */ i(ie, { children: n.desktop }));
58
- const y = A(P, C || {}, S || {});
59
- return /* @__PURE__ */ i(D, { injectFirst: !0, children: /* @__PURE__ */ i(F, { theme: y, children: /* @__PURE__ */ i(W, { theme: y, children: /* @__PURE__ */ r(te, { ...M, children: [
60
- /* @__PURE__ */ r(ee, { maxWidth: g, width: j, className: "ll-header", children: [
61
- s && s,
62
- !s && /* @__PURE__ */ r(O, { children: [
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
- J,
64
+ K,
65
65
  {
66
- blockletMeta: b,
66
+ blockletMeta: y,
67
67
  navLogo: n,
68
68
  subTitle: /* @__PURE__ */ r("span", { children: [
69
- `${u || E.defaultNavSubTitle} ${x + 1}/${f}`,
69
+ `${g || N.defaultNavSubTitle} ${f + 1}/${b}`,
70
70
  /* @__PURE__ */ i(
71
- X,
71
+ Y,
72
72
  {
73
- value: (x + 1) / f * 100,
73
+ value: (f + 1) / b * 100,
74
74
  style: { marginLeft: 3 }
75
75
  }
76
76
  ),
77
77
  o && /* @__PURE__ */ i(
78
- k,
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: m,
98
- locale: d,
99
- loading: c
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
- h && /* @__PURE__ */ i(V, { className: "right", children: h })
103
+ u && /* @__PURE__ */ i(V, { className: "right", children: u })
104
104
  ] })
105
105
  ] }),
106
- /* @__PURE__ */ r(H, { contentMaxWidth: g, className: "ll-container", children: [
106
+ /* @__PURE__ */ r(E, { contentMaxWidth: x, className: "ll-container", children: [
107
107
  /* @__PURE__ */ i(
108
- U,
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: d,
117
- blockletMeta: b,
118
- logoUrl: m,
116
+ locale: s,
117
+ blockletMeta: y,
118
+ logoUrl: h,
119
119
  useOfSkeleton: v,
120
- subTitle: u,
121
- loading: c,
120
+ subTitle: g,
121
+ loading: m,
122
122
  extraNav: o
123
123
  }
124
124
  ),
125
- /* @__PURE__ */ i(k, { component: "div", className: "layout-content", children: /* @__PURE__ */ i(
125
+ /* @__PURE__ */ i(w, { component: "div", className: "layout-content", children: /* @__PURE__ */ i(
126
126
  Q,
127
127
  {
128
- fallback: /* @__PURE__ */ i(z, { relative: "parent", children: /* @__PURE__ */ i(q, { style: { marginTop: 36 } }) }),
129
- children: T
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
- L.propTypes = {
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 w = navigator.userAgent.toLocaleLowerCase();
156
- let $ = "";
157
- w.includes("iphone os") && w.includes("crios") && ($ = "height: calc(100vh - 60px);");
158
- const ee = l("header")`
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: ${p};
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
- `, te = l("div")`
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
- `, ie = l("div")`
231
+ `, ne = l(d)`
232
232
  display: block;
233
233
  margin-top: 4px;
234
234
  `;
235
235
  export {
236
- L as default
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.11",
3
+ "version": "3.0.12",
4
4
  "description": "Common ux components of launcher",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -43,7 +43,7 @@
43
43
  "react": "^19.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@arcblock/icons": "3.0.11",
46
+ "@arcblock/icons": "3.0.12",
47
47
  "@blocklet/meta": "^1.16.45",
48
48
  "@emotion/react": "^11.14.0",
49
49
  "@emotion/styled": "^11.14.0",
@@ -55,5 +55,5 @@
55
55
  "rehype-react": "^7.2.0",
56
56
  "url-join": "^4.0.1"
57
57
  },
58
- "gitHead": "3619d5d23622fb8074ace5f6c685bcc25c14c056"
58
+ "gitHead": "ebe824e4b0ddfc1cbdd9ffecc22283e57a58c042"
59
59
  }