@blocklet/pages-kit-inner-components 0.4.99 → 0.4.100
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/cjs/add-component.js +378 -0
- package/lib/cjs/chunks/array-BMkoDb_A.js +507 -0
- package/lib/cjs/chunks/config-color-Da8lKUL0.js +21 -0
- package/lib/cjs/chunks/{draft-data-Quz8toC_.js → draft-data-UP_7unuZ.js} +1 -1
- package/lib/cjs/chunks/home-CMaoUDJD.js +36 -0
- package/lib/cjs/chunks/publish-button-ByqPCT2Y.js +1 -0
- package/lib/cjs/chunks/state-BoXTl4DM.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +1 -1
- package/lib/cjs/setting.js +3 -23
- package/lib/cjs/theme.js +3 -3
- package/lib/es/add-component.js +2991 -0
- package/lib/es/chunks/array-C85JziT_.js +2086 -0
- package/lib/es/chunks/config-color-B-ax03qd.js +328 -0
- package/lib/es/chunks/{draft-data-B1GJKphX.js → draft-data-0n1CKRWr.js} +1 -1
- package/lib/es/chunks/home-BBfstt15.js +470 -0
- package/lib/es/chunks/{publish-button-BY10Od4q.js → publish-button-OwaTBakj.js} +8 -7
- package/lib/es/chunks/state-DsXKwImw.js +425 -0
- package/lib/es/home.js +10 -8
- package/lib/es/locales.js +17 -179
- package/lib/es/setting.js +929 -1112
- package/lib/es/theme.js +53 -59
- package/package.json +21 -19
- package/lib/cjs/chunks/home-D9IcqQld.js +0 -542
- package/lib/cjs/chunks/publish-button-6WQRr1s7.js +0 -1
- package/lib/cjs/chunks/state-eTpgUKhB.js +0 -1
- package/lib/es/chunks/home-Cclj5ETj.js +0 -2357
- package/lib/es/chunks/state-CYDNg8EG.js +0 -420
package/lib/es/theme.js
CHANGED
|
@@ -1,41 +1,35 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import g from "@arcblock/ux/lib/Colors";
|
|
3
|
-
import { createTheme as
|
|
4
|
-
import {
|
|
5
|
-
import x from "@iconify-
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { createTheme as w } from "@arcblock/ux/lib/Theme";
|
|
4
|
+
import { getBlockletTheme as v } from "@blocklet/pages-kit/utils/style";
|
|
5
|
+
import { Icon as x } from "@iconify-icon/react";
|
|
6
|
+
import E from "@iconify-icons/tabler/chevron-down";
|
|
7
|
+
import { loadingButtonClasses as k } from "@mui/lab";
|
|
8
|
+
import { listItemIconClasses as y, switchClasses as B, svgIconClasses as a, sliderClasses as n, outlinedInputClasses as b, inputBaseClasses as e, filledInputClasses as u, inputLabelClasses as r, inputClasses as i, selectClasses as D, autocompleteClasses as d, getContrastRatio as $, darken as C, lighten as z, Box as A } from "@mui/material";
|
|
9
|
+
import { defu as S } from "defu";
|
|
9
10
|
function h(t) {
|
|
10
|
-
const l = g.common.white, m =
|
|
11
|
+
const l = g.common.white, m = $(t, l) >= 2 ? l : "rgba(0, 0, 0, 0.87)";
|
|
11
12
|
return {
|
|
12
13
|
main: t,
|
|
13
|
-
light:
|
|
14
|
-
dark:
|
|
14
|
+
light: z(t, 0.2),
|
|
15
|
+
dark: C(t, 0.3),
|
|
15
16
|
contrastText: m
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
function c(t = {}) {
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const o = v();
|
|
21
|
+
return w(
|
|
22
|
+
S(t, {
|
|
21
23
|
palette: {
|
|
22
24
|
_did: h(g.did.primary),
|
|
23
25
|
black: h(g.grey[900])
|
|
24
26
|
},
|
|
25
|
-
breakpoints
|
|
26
|
-
|
|
27
|
-
xs: 0,
|
|
28
|
-
sm: 600,
|
|
29
|
-
md: 900,
|
|
30
|
-
lg: 1200,
|
|
31
|
-
xl: 1536,
|
|
32
|
-
section: 1440
|
|
33
|
-
}
|
|
34
|
-
}
|
|
27
|
+
// respect blocklet theme breakpoints
|
|
28
|
+
breakpoints: o.breakpoints
|
|
35
29
|
})
|
|
36
30
|
);
|
|
37
31
|
}
|
|
38
|
-
const
|
|
32
|
+
const M = `
|
|
39
33
|
:root {
|
|
40
34
|
/* Light */
|
|
41
35
|
/* colors */
|
|
@@ -154,7 +148,7 @@ const S = `
|
|
|
154
148
|
--radius-m: 8px;
|
|
155
149
|
--radius-l: 12px;
|
|
156
150
|
--radius-round: 9999px;
|
|
157
|
-
}`,
|
|
151
|
+
}`, q = `
|
|
158
152
|
:root {
|
|
159
153
|
/* Dark */
|
|
160
154
|
/* colors */
|
|
@@ -273,7 +267,7 @@ const S = `
|
|
|
273
267
|
--radius-m: 8px;
|
|
274
268
|
--radius-l: 12px;
|
|
275
269
|
--radius-round: 9999px;
|
|
276
|
-
}`,
|
|
270
|
+
}`, s = c({
|
|
277
271
|
typography: {
|
|
278
272
|
button: {
|
|
279
273
|
// @ts-ignore
|
|
@@ -308,7 +302,7 @@ const S = `
|
|
|
308
302
|
},
|
|
309
303
|
components: {
|
|
310
304
|
MuiCssBaseline: {
|
|
311
|
-
styleOverrides:
|
|
305
|
+
styleOverrides: M
|
|
312
306
|
},
|
|
313
307
|
MuiFormLabel: {
|
|
314
308
|
styleOverrides: {
|
|
@@ -366,7 +360,7 @@ const S = `
|
|
|
366
360
|
height: 28,
|
|
367
361
|
width: 48,
|
|
368
362
|
padding: 8,
|
|
369
|
-
[`&.${
|
|
363
|
+
[`&.${B.sizeSmall}`]: {
|
|
370
364
|
height: 26,
|
|
371
365
|
width: 40,
|
|
372
366
|
padding: 8
|
|
@@ -409,7 +403,7 @@ const S = `
|
|
|
409
403
|
{
|
|
410
404
|
props: {},
|
|
411
405
|
// @ts-ignore
|
|
412
|
-
style: ({ theme: t, ownerState:
|
|
406
|
+
style: ({ theme: t, ownerState: o }) => t.unstable_sx({
|
|
413
407
|
[`.${e.root}`]: {
|
|
414
408
|
borderRadius: 1,
|
|
415
409
|
lineHeight: "1.5rem",
|
|
@@ -431,36 +425,36 @@ const S = `
|
|
|
431
425
|
[`&.${e.hiddenLabel}`]: {
|
|
432
426
|
mt: 0,
|
|
433
427
|
pt: 0,
|
|
434
|
-
[`.${
|
|
428
|
+
[`.${D.select}.${i.input}:focus`]: {
|
|
435
429
|
bgcolor: "transparent"
|
|
436
430
|
}
|
|
437
431
|
}
|
|
438
432
|
},
|
|
439
|
-
[`.${
|
|
433
|
+
[`.${r.standard}`]: {
|
|
440
434
|
transform: "translate(0px, 18px) scale(1)",
|
|
441
|
-
[`&.${
|
|
435
|
+
[`&.${r.sizeSmall}`]: {
|
|
442
436
|
transform: "translate(0px, 15px) scale(1)"
|
|
443
437
|
},
|
|
444
|
-
[`&.${
|
|
438
|
+
[`&.${r.shrink}`]: {
|
|
445
439
|
transform: "translate(0px, -1px) scale(0.8)",
|
|
446
|
-
[`&.${
|
|
440
|
+
[`&.${r.sizeSmall}`]: {
|
|
447
441
|
transform: "translate(0px, -1px) scale(0.8)"
|
|
448
442
|
}
|
|
449
443
|
}
|
|
450
444
|
},
|
|
451
445
|
// filled
|
|
452
|
-
[`.${
|
|
446
|
+
[`.${u.root}`]: {
|
|
453
447
|
":before,:after": { display: "none" },
|
|
454
448
|
[`.${e.input}`]: {
|
|
455
449
|
pb: 0.5,
|
|
456
|
-
pt:
|
|
450
|
+
pt: o != null && o.label ? 2 : 0.5,
|
|
457
451
|
px: 1,
|
|
458
452
|
":focus": {
|
|
459
453
|
borderRadius: 1
|
|
460
454
|
},
|
|
461
455
|
[`&.${e.inputSizeSmall}`]: {
|
|
462
456
|
pb: 0.25,
|
|
463
|
-
pt:
|
|
457
|
+
pt: o != null && o.label ? 1.25 : 0.25
|
|
464
458
|
},
|
|
465
459
|
[`&.${e.inputHiddenLabel}`]: {
|
|
466
460
|
py: 0.5,
|
|
@@ -470,20 +464,20 @@ const S = `
|
|
|
470
464
|
}
|
|
471
465
|
}
|
|
472
466
|
},
|
|
473
|
-
[`.${
|
|
467
|
+
[`.${r.filled}`]: {
|
|
474
468
|
transform: "translate(8px, 11px) scale(1)",
|
|
475
|
-
[`&.${
|
|
469
|
+
[`&.${r.sizeSmall}`]: {
|
|
476
470
|
transform: "translate(8px, 7px) scale(1)"
|
|
477
471
|
},
|
|
478
|
-
[`&.${
|
|
472
|
+
[`&.${r.shrink}`]: {
|
|
479
473
|
transform: "translate(8px, 2px) scale(0.8)",
|
|
480
|
-
[`&.${
|
|
474
|
+
[`&.${r.sizeSmall}`]: {
|
|
481
475
|
transform: "translate(8px, 0) scale(0.8)"
|
|
482
476
|
}
|
|
483
477
|
}
|
|
484
478
|
},
|
|
485
479
|
// outlined
|
|
486
|
-
[`.${
|
|
480
|
+
[`.${b.root}`]: {
|
|
487
481
|
[`.${e.input}`]: {
|
|
488
482
|
py: 1.25,
|
|
489
483
|
px: 1,
|
|
@@ -498,12 +492,12 @@ const S = `
|
|
|
498
492
|
}
|
|
499
493
|
}
|
|
500
494
|
},
|
|
501
|
-
[`.${
|
|
495
|
+
[`.${r.outlined}`]: {
|
|
502
496
|
transform: "translate(8px, 10px) scale(1)",
|
|
503
|
-
[`&.${
|
|
497
|
+
[`&.${r.sizeSmall}`]: {
|
|
504
498
|
transform: "translate(8px, 7px) scale(1)"
|
|
505
499
|
},
|
|
506
|
-
[`&.${
|
|
500
|
+
[`&.${r.shrink}`]: {
|
|
507
501
|
transform: "translate(16px, -7px) scale(0.8)"
|
|
508
502
|
}
|
|
509
503
|
}
|
|
@@ -554,7 +548,7 @@ const S = `
|
|
|
554
548
|
select: {
|
|
555
549
|
display: "flex",
|
|
556
550
|
alignItems: "center",
|
|
557
|
-
[`.${
|
|
551
|
+
[`.${y.root}`]: {
|
|
558
552
|
minWidth: 20
|
|
559
553
|
}
|
|
560
554
|
}
|
|
@@ -568,7 +562,7 @@ const S = `
|
|
|
568
562
|
borderRadius: 1,
|
|
569
563
|
lineHeight: "1.5rem",
|
|
570
564
|
// filled
|
|
571
|
-
[`&.${
|
|
565
|
+
[`&.${u.root}`]: {
|
|
572
566
|
":before,:after": { display: "none" },
|
|
573
567
|
[`.${e.input}`]: {
|
|
574
568
|
py: 0.5,
|
|
@@ -579,7 +573,7 @@ const S = `
|
|
|
579
573
|
}
|
|
580
574
|
},
|
|
581
575
|
// outlined
|
|
582
|
-
[`&.${
|
|
576
|
+
[`&.${b.root}`]: {
|
|
583
577
|
[`.${e.input}`]: {
|
|
584
578
|
py: 0.5,
|
|
585
579
|
borderRadius: 1,
|
|
@@ -711,7 +705,7 @@ const S = `
|
|
|
711
705
|
backgroundColor: "#030712"
|
|
712
706
|
}
|
|
713
707
|
},
|
|
714
|
-
[`&.${
|
|
708
|
+
[`&.${k.loading}`]: {
|
|
715
709
|
color: "grey"
|
|
716
710
|
}
|
|
717
711
|
}),
|
|
@@ -734,21 +728,21 @@ const S = `
|
|
|
734
728
|
}
|
|
735
729
|
}), F = {
|
|
736
730
|
fontSize: "5rem",
|
|
737
|
-
[
|
|
731
|
+
[s.breakpoints.down("xl")]: {
|
|
738
732
|
fontSize: "5rem"
|
|
739
733
|
},
|
|
740
|
-
[
|
|
734
|
+
[s.breakpoints.down("lg")]: {
|
|
741
735
|
fontSize: "4rem"
|
|
742
736
|
},
|
|
743
|
-
[
|
|
737
|
+
[s.breakpoints.down("md")]: {
|
|
744
738
|
fontSize: "3rem"
|
|
745
739
|
},
|
|
746
|
-
[
|
|
740
|
+
[s.breakpoints.down("sm")]: {
|
|
747
741
|
fontSize: "2rem"
|
|
748
742
|
}
|
|
749
743
|
};
|
|
750
|
-
|
|
751
|
-
const
|
|
744
|
+
s.typography.big = { ...F };
|
|
745
|
+
const T = c({
|
|
752
746
|
typography: {
|
|
753
747
|
button: {
|
|
754
748
|
// @ts-ignore
|
|
@@ -757,15 +751,15 @@ const M = c({
|
|
|
757
751
|
}
|
|
758
752
|
}
|
|
759
753
|
});
|
|
760
|
-
|
|
754
|
+
T.typography.big = { ...F };
|
|
761
755
|
function p(t) {
|
|
762
|
-
return /* @__PURE__ */ f(
|
|
756
|
+
return /* @__PURE__ */ f(A, { ...t, component: x, icon: E });
|
|
763
757
|
}
|
|
764
758
|
export {
|
|
765
759
|
c as create,
|
|
766
|
-
|
|
760
|
+
q as darkThemeRoot,
|
|
767
761
|
h as genPaletteColor,
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
762
|
+
M as lightThemeRoot,
|
|
763
|
+
T as pagesTheme,
|
|
764
|
+
s as theme
|
|
771
765
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/pages-kit-inner-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.100",
|
|
4
4
|
"description": "Pages Kit inner components library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
"./project-html": {
|
|
52
52
|
"import": "./lib/es/project-html.js",
|
|
53
53
|
"require": "./lib/cjs/project-html.js"
|
|
54
|
+
},
|
|
55
|
+
"./add-component": {
|
|
56
|
+
"import": "./lib/es/add-component.js",
|
|
57
|
+
"require": "./lib/cjs/add-component.js"
|
|
54
58
|
}
|
|
55
59
|
},
|
|
56
60
|
"files": [
|
|
@@ -65,25 +69,25 @@
|
|
|
65
69
|
"url": "git+https://github.com/blocklet/pages-kit.git"
|
|
66
70
|
},
|
|
67
71
|
"dependencies": {
|
|
68
|
-
"@arcblock/did-auth": "^1.19.
|
|
72
|
+
"@arcblock/did-auth": "^1.19.17",
|
|
69
73
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
70
|
-
"@arcblock/did-connect": "^2.12.
|
|
71
|
-
"@arcblock/react-hooks": "^2.12.
|
|
72
|
-
"@arcblock/ux": "^2.12.
|
|
74
|
+
"@arcblock/did-connect": "^2.12.58",
|
|
75
|
+
"@arcblock/react-hooks": "^2.12.58",
|
|
76
|
+
"@arcblock/ux": "^2.12.58",
|
|
73
77
|
"@blocklet/ai-kit": "^0.1.72",
|
|
74
|
-
"@blocklet/ai-runtime": "^0.4.
|
|
75
|
-
"@blocklet/code-editor": "^0.4.
|
|
76
|
-
"@blocklet/crawler": "^2.2.
|
|
78
|
+
"@blocklet/ai-runtime": "^0.4.255",
|
|
79
|
+
"@blocklet/code-editor": "^0.4.255",
|
|
80
|
+
"@blocklet/crawler": "^2.2.14",
|
|
77
81
|
"@blocklet/embed": "^0.2.3",
|
|
78
82
|
"@blocklet/js-sdk": "^1.16.41",
|
|
79
83
|
"@blocklet/logger": "1.16.36",
|
|
80
|
-
"@blocklet/quickjs": "^0.4.
|
|
84
|
+
"@blocklet/quickjs": "^0.4.255",
|
|
81
85
|
"@blocklet/sdk": "^1.16.41",
|
|
82
|
-
"@blocklet/studio-ui": "^0.4.
|
|
86
|
+
"@blocklet/studio-ui": "^0.4.255",
|
|
83
87
|
"@blocklet/tracker": "^1.16.41",
|
|
84
|
-
"@blocklet/ui-react": "^2.12.
|
|
88
|
+
"@blocklet/ui-react": "^2.12.58",
|
|
85
89
|
"@blocklet/uploader": "^0.1.82",
|
|
86
|
-
"@blocklet/uploader-server": "^0.1.
|
|
90
|
+
"@blocklet/uploader-server": "^0.1.94",
|
|
87
91
|
"@emotion/cache": "^11.13.1",
|
|
88
92
|
"@emotion/css": "^11.13.0",
|
|
89
93
|
"@emotion/react": "^11.13.0",
|
|
@@ -102,9 +106,9 @@
|
|
|
102
106
|
"@mui/styles": "^5.16.14",
|
|
103
107
|
"@mui/utils": "^5.16.6",
|
|
104
108
|
"@mui/x-date-pickers": "^7.13.0",
|
|
105
|
-
"@ocap/client": "^1.19.
|
|
106
|
-
"@ocap/mcrypto": "^1.19.
|
|
107
|
-
"@ocap/wallet": "^1.19.
|
|
109
|
+
"@ocap/client": "^1.19.17",
|
|
110
|
+
"@ocap/mcrypto": "^1.19.17",
|
|
111
|
+
"@ocap/wallet": "^1.19.17",
|
|
108
112
|
"@reactivedata/reactive": "^0.2.2",
|
|
109
113
|
"@syncedstore/core": "^0.6.0",
|
|
110
114
|
"@syncedstore/react": "^0.6.0",
|
|
@@ -159,7 +163,6 @@
|
|
|
159
163
|
"prettier": "^3.3.3",
|
|
160
164
|
"react": "^18.3.1",
|
|
161
165
|
"react-best-gradient-color-picker": "^3.0.14",
|
|
162
|
-
"react-color": "^2.19.3",
|
|
163
166
|
"react-dnd": "^16.0.1",
|
|
164
167
|
"react-dnd-html5-backend": "^16.0.1",
|
|
165
168
|
"react-dom": "^18.3.1",
|
|
@@ -202,8 +205,8 @@
|
|
|
202
205
|
"yaml": "^2.5.0",
|
|
203
206
|
"yjs": "^13.6.18",
|
|
204
207
|
"zustand": "^4.5.5",
|
|
205
|
-
"@blocklet/pages-kit": "^0.4.
|
|
206
|
-
"@blocklet/pages-kit-block-studio": "^0.4.
|
|
208
|
+
"@blocklet/pages-kit": "^0.4.100",
|
|
209
|
+
"@blocklet/pages-kit-block-studio": "^0.4.100"
|
|
207
210
|
},
|
|
208
211
|
"devDependencies": {
|
|
209
212
|
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
|
|
@@ -223,7 +226,6 @@
|
|
|
223
226
|
"@types/node": "^22.4.2",
|
|
224
227
|
"@types/node-fetch": "^2.6.11",
|
|
225
228
|
"@types/react": "^18.3.4",
|
|
226
|
-
"@types/react-color": "^3.0.12",
|
|
227
229
|
"@types/react-dom": "^18.3.0",
|
|
228
230
|
"@types/react-frame-component": "^4.1.6",
|
|
229
231
|
"@types/react-window": "^1.8.8",
|