@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/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 v } from "@arcblock/ux/lib/Theme";
4
- import { Icon as w } from "@iconify-icon/react";
5
- import x from "@iconify-icons/tabler/chevron-down";
6
- import { loadingButtonClasses as E } from "@mui/lab";
7
- import { listItemIconClasses as k, switchClasses as y, svgIconClasses as a, sliderClasses as n, outlinedInputClasses as u, inputBaseClasses as e, filledInputClasses as b, inputLabelClasses as s, inputClasses as i, selectClasses as B, autocompleteClasses as d, getContrastRatio as D, darken as $, lighten as C, Box as z } from "@mui/material";
8
- import { defu as A } from "defu";
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 = D(t, l) >= 2 ? l : "rgba(0, 0, 0, 0.87)";
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: C(t, 0.2),
14
- dark: $(t, 0.3),
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
- return v(
20
- A(t, {
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
- values: {
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 S = `
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
- }`, U = `
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
- }`, o = c({
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: S
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
- [`&.${y.sizeSmall}`]: {
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: r }) => t.unstable_sx({
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
- [`.${B.select}.${i.input}:focus`]: {
428
+ [`.${D.select}.${i.input}:focus`]: {
435
429
  bgcolor: "transparent"
436
430
  }
437
431
  }
438
432
  },
439
- [`.${s.standard}`]: {
433
+ [`.${r.standard}`]: {
440
434
  transform: "translate(0px, 18px) scale(1)",
441
- [`&.${s.sizeSmall}`]: {
435
+ [`&.${r.sizeSmall}`]: {
442
436
  transform: "translate(0px, 15px) scale(1)"
443
437
  },
444
- [`&.${s.shrink}`]: {
438
+ [`&.${r.shrink}`]: {
445
439
  transform: "translate(0px, -1px) scale(0.8)",
446
- [`&.${s.sizeSmall}`]: {
440
+ [`&.${r.sizeSmall}`]: {
447
441
  transform: "translate(0px, -1px) scale(0.8)"
448
442
  }
449
443
  }
450
444
  },
451
445
  // filled
452
- [`.${b.root}`]: {
446
+ [`.${u.root}`]: {
453
447
  ":before,:after": { display: "none" },
454
448
  [`.${e.input}`]: {
455
449
  pb: 0.5,
456
- pt: r != null && r.label ? 2 : 0.5,
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: r != null && r.label ? 1.25 : 0.25
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
- [`.${s.filled}`]: {
467
+ [`.${r.filled}`]: {
474
468
  transform: "translate(8px, 11px) scale(1)",
475
- [`&.${s.sizeSmall}`]: {
469
+ [`&.${r.sizeSmall}`]: {
476
470
  transform: "translate(8px, 7px) scale(1)"
477
471
  },
478
- [`&.${s.shrink}`]: {
472
+ [`&.${r.shrink}`]: {
479
473
  transform: "translate(8px, 2px) scale(0.8)",
480
- [`&.${s.sizeSmall}`]: {
474
+ [`&.${r.sizeSmall}`]: {
481
475
  transform: "translate(8px, 0) scale(0.8)"
482
476
  }
483
477
  }
484
478
  },
485
479
  // outlined
486
- [`.${u.root}`]: {
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
- [`.${s.outlined}`]: {
495
+ [`.${r.outlined}`]: {
502
496
  transform: "translate(8px, 10px) scale(1)",
503
- [`&.${s.sizeSmall}`]: {
497
+ [`&.${r.sizeSmall}`]: {
504
498
  transform: "translate(8px, 7px) scale(1)"
505
499
  },
506
- [`&.${s.shrink}`]: {
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
- [`.${k.root}`]: {
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
- [`&.${b.root}`]: {
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
- [`&.${u.root}`]: {
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
- [`&.${E.loading}`]: {
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
- [o.breakpoints.down("xl")]: {
731
+ [s.breakpoints.down("xl")]: {
738
732
  fontSize: "5rem"
739
733
  },
740
- [o.breakpoints.down("lg")]: {
734
+ [s.breakpoints.down("lg")]: {
741
735
  fontSize: "4rem"
742
736
  },
743
- [o.breakpoints.down("md")]: {
737
+ [s.breakpoints.down("md")]: {
744
738
  fontSize: "3rem"
745
739
  },
746
- [o.breakpoints.down("sm")]: {
740
+ [s.breakpoints.down("sm")]: {
747
741
  fontSize: "2rem"
748
742
  }
749
743
  };
750
- o.typography.big = { ...F };
751
- const M = c({
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
- M.typography.big = { ...F };
754
+ T.typography.big = { ...F };
761
755
  function p(t) {
762
- return /* @__PURE__ */ f(z, { ...t, component: w, icon: x });
756
+ return /* @__PURE__ */ f(A, { ...t, component: x, icon: E });
763
757
  }
764
758
  export {
765
759
  c as create,
766
- U as darkThemeRoot,
760
+ q as darkThemeRoot,
767
761
  h as genPaletteColor,
768
- S as lightThemeRoot,
769
- M as pagesTheme,
770
- o as theme
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.99",
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.15",
72
+ "@arcblock/did-auth": "^1.19.17",
69
73
  "@arcblock/did-auth-storage-nedb": "^1.7.1",
70
- "@arcblock/did-connect": "^2.12.54",
71
- "@arcblock/react-hooks": "^2.12.54",
72
- "@arcblock/ux": "^2.12.54",
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.254",
75
- "@blocklet/code-editor": "^0.4.254",
76
- "@blocklet/crawler": "^2.2.12",
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.254",
84
+ "@blocklet/quickjs": "^0.4.255",
81
85
  "@blocklet/sdk": "^1.16.41",
82
- "@blocklet/studio-ui": "^0.4.254",
86
+ "@blocklet/studio-ui": "^0.4.255",
83
87
  "@blocklet/tracker": "^1.16.41",
84
- "@blocklet/ui-react": "^2.12.54",
88
+ "@blocklet/ui-react": "^2.12.58",
85
89
  "@blocklet/uploader": "^0.1.82",
86
- "@blocklet/uploader-server": "^0.1.93",
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.15",
106
- "@ocap/mcrypto": "^1.19.15",
107
- "@ocap/wallet": "^1.19.15",
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.99",
206
- "@blocklet/pages-kit-block-studio": "^0.4.99"
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",