create-blocklet 0.9.32 → 0.10.0
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/package.json +5 -5
- package/templates/component-studio/package.json +22 -22
- package/templates/did-connect-dapp/package.json +17 -17
- package/templates/did-connect-dapp/src/components/connect-item.jsx +9 -2
- package/templates/did-connect-dapp/src/components/info-row.jsx +10 -3
- package/templates/did-connect-dapp/src/pages/main.jsx +14 -5
- package/templates/did-wallet-dapp/package.json +19 -19
- package/templates/did-wallet-dapp/src/pages/profile.jsx +43 -36
- package/templates/express-api/package.json +2 -2
- package/templates/nestjs-api/package.json +2 -2
- package/templates/nextjs-dapp/package.json +7 -7
- package/templates/react-aigne-dapp/api/src/agents/chatbot.ts +2 -1
- package/templates/react-aigne-dapp/api/src/agents/index.ts +4 -6
- package/templates/react-aigne-dapp/package.json +18 -16
- package/templates/react-aigne-dapp/src/components/ScrollView.tsx +10 -5
- package/templates/react-aigne-dapp/src/pages/home.tsx +44 -14
- package/templates/react-dapp/package.json +11 -11
- package/templates/react-dapp-ts/package.json +11 -11
- package/templates/react-gun-dapp/package.json +10 -10
- package/templates/react-static/package.json +5 -5
- package/templates/solidjs-dapp/package.json +9 -9
- package/templates/solidjs-static/package.json +3 -3
- package/templates/svelte-dapp/package.json +11 -11
- package/templates/svelte-static/package.json +3 -3
- package/templates/todo-list-example/package.json +19 -19
- package/templates/todo-list-example/src/pages/required-login.tsx +15 -2
- package/templates/vue-dapp/package.json +9 -9
- package/templates/vue-static/package.json +3 -3
- package/templates/vue-ts-static/package.json +4 -4
- package/templates/vue2-dapp/package.json +7 -7
- package/templates/vue2-static/package.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-blocklet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"exports": "./index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "git@github.com:blocklet/create-blocklet.git",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"test:run": "vitest run"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@arcblock/did": "^1.
|
|
33
|
-
"@ocap/mcrypto": "^1.
|
|
34
|
-
"@ocap/util": "^1.
|
|
32
|
+
"@arcblock/did": "^1.20.15",
|
|
33
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
34
|
+
"@ocap/util": "^1.20.15",
|
|
35
35
|
"boxen": "^7.1.1",
|
|
36
36
|
"ejs": "^3.1.10",
|
|
37
37
|
"envfile": "^7.1.0",
|
|
@@ -48,6 +48,6 @@
|
|
|
48
48
|
"@arcblock/eslint-config-base": "^0.3.3",
|
|
49
49
|
"eslint": "^8.57.1",
|
|
50
50
|
"prettier": "^3.5.1",
|
|
51
|
-
"vitest": "^2.
|
|
51
|
+
"vitest": "^3.2.4"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@arcblock/did-auth": "^1.
|
|
53
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
54
54
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
55
|
-
"@arcblock/did-connect": "^
|
|
56
|
-
"@arcblock/ux": "^
|
|
57
|
-
"@blocklet/pages-kit": "^0.
|
|
58
|
-
"@blocklet/pages-kit-block-studio": "^0.
|
|
59
|
-
"@blocklet/pages-kit-inner-components": "^0.
|
|
60
|
-
"@blocklet/pages-kit-runtime": "^0.
|
|
61
|
-
"@blocklet/sdk": "^1.16.
|
|
62
|
-
"@blocklet/studio-ui": "^0.4.
|
|
63
|
-
"@blocklet/ui-react": "^
|
|
64
|
-
"@ocap/client": "^1.
|
|
65
|
-
"@ocap/mcrypto": "^1.
|
|
66
|
-
"@ocap/wallet": "^1.
|
|
55
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
56
|
+
"@arcblock/ux": "^3.0.8",
|
|
57
|
+
"@blocklet/pages-kit": "^0.5.56",
|
|
58
|
+
"@blocklet/pages-kit-block-studio": "^0.5.56",
|
|
59
|
+
"@blocklet/pages-kit-inner-components": "^0.5.56",
|
|
60
|
+
"@blocklet/pages-kit-runtime": "^0.5.56",
|
|
61
|
+
"@blocklet/sdk": "^1.16.44",
|
|
62
|
+
"@blocklet/studio-ui": "^0.4.275",
|
|
63
|
+
"@blocklet/ui-react": "^3.0.8",
|
|
64
|
+
"@ocap/client": "^1.20.15",
|
|
65
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
66
|
+
"@ocap/wallet": "^1.20.15",
|
|
67
67
|
"axios": "^1.7.9",
|
|
68
68
|
"cookie-parser": "^1.4.7",
|
|
69
69
|
"cors": "^2.8.5",
|
|
@@ -73,7 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@biomejs/biome": "^1.9.4",
|
|
76
|
-
"@blocklet/js-sdk": "^1.16.
|
|
76
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
77
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
77
78
|
"@types/cookie-parser": "^1.4.8",
|
|
78
79
|
"@types/cors": "^2.8.17",
|
|
79
80
|
"@types/dotenv-flow": "^3.3.3",
|
|
@@ -81,8 +82,7 @@
|
|
|
81
82
|
"@types/node": "^20.17.12",
|
|
82
83
|
"@types/react": "^18.3.18",
|
|
83
84
|
"@types/react-dom": "^18.3.5",
|
|
84
|
-
"@vitejs/plugin-react": "^4.
|
|
85
|
-
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
85
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
86
86
|
"bumpp": "^9.9.3",
|
|
87
87
|
"cross-env": "^7.0.3",
|
|
88
88
|
"get-port": "^5.1.1",
|
|
@@ -90,18 +90,18 @@
|
|
|
90
90
|
"lint-staged": "^15.3.0",
|
|
91
91
|
"nodemon": "^3.1.9",
|
|
92
92
|
"npm-run-all": "^4.1.5",
|
|
93
|
-
"react": "^
|
|
94
|
-
"react-dom": "^
|
|
93
|
+
"react": "^19.1.0",
|
|
94
|
+
"react-dom": "^19.1.0",
|
|
95
95
|
"react-router-dom": "^6.26.1",
|
|
96
96
|
"rimraf": "^5.0.10",
|
|
97
97
|
"simple-git-hooks": "^2.11.1",
|
|
98
98
|
"typescript": "^5.7.2",
|
|
99
|
-
"vite": "^
|
|
100
|
-
"vite-node": "^2.
|
|
101
|
-
"vite-plugin-blocklet": "^0.
|
|
99
|
+
"vite": "^7.0.0",
|
|
100
|
+
"vite-node": "^3.2.4",
|
|
101
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
102
102
|
"vite-plugin-require": "^1.2.14",
|
|
103
103
|
"vite-plugin-svgr": "^4.3.0",
|
|
104
|
-
"vite-tsconfig-paths": "^
|
|
104
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
105
105
|
"zx": "^8.3.0"
|
|
106
106
|
},
|
|
107
107
|
"importSort": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcblock/did": "^1.
|
|
42
|
-
"@arcblock/did-auth": "^1.
|
|
41
|
+
"@arcblock/did": "^1.20.15",
|
|
42
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
43
43
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
44
|
-
"@blocklet/sdk": "^1.16.
|
|
45
|
-
"@ocap/client": "^1.
|
|
46
|
-
"@ocap/mcrypto": "^1.
|
|
47
|
-
"@ocap/util": "^1.
|
|
48
|
-
"@ocap/wallet": "^1.
|
|
44
|
+
"@blocklet/sdk": "^1.16.44",
|
|
45
|
+
"@ocap/client": "^1.20.15",
|
|
46
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
47
|
+
"@ocap/util": "^1.20.15",
|
|
48
|
+
"@ocap/wallet": "^1.20.15",
|
|
49
49
|
"cookie-parser": "^1.4.7",
|
|
50
50
|
"dotenv-flow": "^4.1.0",
|
|
51
51
|
"express": "^4.21.2",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"lodash": "^4.17.21"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@arcblock/did-connect": "^
|
|
56
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
57
57
|
"@arcblock/eslint-config": "^0.3.3",
|
|
58
|
-
"@arcblock/ux": "^
|
|
59
|
-
"@blocklet/ui-react": "^
|
|
58
|
+
"@arcblock/ux": "^3.0.8",
|
|
59
|
+
"@blocklet/ui-react": "^3.0.8",
|
|
60
60
|
"@emotion/react": "^11.14.0",
|
|
61
|
-
"@emotion/styled": "^11.14.
|
|
61
|
+
"@emotion/styled": "^11.14.1",
|
|
62
62
|
"@iconify-icons/material-symbols": "^1.2.58",
|
|
63
63
|
"@iconify/react": "^5.2.0",
|
|
64
|
-
"@mui/material": "^
|
|
64
|
+
"@mui/material": "^7.1.2",
|
|
65
65
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
66
|
-
"@vitejs/plugin-react": "^4.
|
|
66
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
67
67
|
"bumpp": "^9.11.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"eslint": "^8.57.1",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"nodemon": "^3.1.9",
|
|
73
73
|
"prettier": "^3.5.1",
|
|
74
74
|
"prop-types": "^15.8.1",
|
|
75
|
-
"react": "~
|
|
76
|
-
"react-dom": "~
|
|
75
|
+
"react": "~19.1.0",
|
|
76
|
+
"react-dom": "~19.1.0",
|
|
77
77
|
"rimraf": "^5.0.10",
|
|
78
78
|
"simple-git-hooks": "^2.11.1",
|
|
79
79
|
"tsx": "^4.19.3",
|
|
80
|
-
"vite": "^
|
|
81
|
-
"vite-plugin-blocklet": "^0.
|
|
80
|
+
"vite": "^7.0.0",
|
|
81
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
82
82
|
"vite-plugin-svgr": "^4.3.0",
|
|
83
83
|
"zx": "^8.3.2"
|
|
84
84
|
},
|
|
@@ -12,7 +12,9 @@ export default function ConnectItem({ title, description = null, result = null,
|
|
|
12
12
|
{title}
|
|
13
13
|
</Typography>
|
|
14
14
|
{description ? (
|
|
15
|
-
<Typography variant="body1"
|
|
15
|
+
<Typography variant="body1" gutterBottom sx={{
|
|
16
|
+
color: "text.secondary"
|
|
17
|
+
}}>
|
|
16
18
|
{description}
|
|
17
19
|
</Typography>
|
|
18
20
|
) : null}
|
|
@@ -20,7 +22,12 @@ export default function ConnectItem({ title, description = null, result = null,
|
|
|
20
22
|
{result ? (
|
|
21
23
|
<Card sx={{ mt: 2 }} variant="outlined">
|
|
22
24
|
<CardContent>
|
|
23
|
-
<Typography
|
|
25
|
+
<Typography
|
|
26
|
+
gutterBottom
|
|
27
|
+
sx={{
|
|
28
|
+
color: "text.secondary",
|
|
29
|
+
fontSize: 14
|
|
30
|
+
}}>
|
|
24
31
|
{t('result')}
|
|
25
32
|
</Typography>
|
|
26
33
|
{result}
|
|
@@ -4,7 +4,14 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
export default function InfoRow({ icon = null, name, value }) {
|
|
6
6
|
return (
|
|
7
|
-
<Typography
|
|
7
|
+
<Typography
|
|
8
|
+
variant="body1"
|
|
9
|
+
gutterBottom
|
|
10
|
+
sx={{
|
|
11
|
+
color: "text.primary",
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'center'
|
|
14
|
+
}}>
|
|
8
15
|
<Box
|
|
9
16
|
sx={{
|
|
10
17
|
display: 'inline-flex',
|
|
@@ -22,9 +29,9 @@ export default function InfoRow({ icon = null, name, value }) {
|
|
|
22
29
|
</Box>
|
|
23
30
|
<Typography
|
|
24
31
|
component="span"
|
|
25
|
-
color="text.secondary"
|
|
26
32
|
sx={{
|
|
27
|
-
|
|
33
|
+
color: "text.secondary",
|
|
34
|
+
wordBreak: 'break-word'
|
|
28
35
|
}}>
|
|
29
36
|
{value}
|
|
30
37
|
</Typography>
|
|
@@ -24,7 +24,9 @@ function Main() {
|
|
|
24
24
|
<Layout>
|
|
25
25
|
<Typography component="h3" variant="h4" color="textPrimary" gutterBottom>
|
|
26
26
|
{t('step1.title')}{' '}
|
|
27
|
-
<Typography component="small"
|
|
27
|
+
<Typography component="small" sx={{
|
|
28
|
+
color: "text.secondary"
|
|
29
|
+
}}>
|
|
28
30
|
{t('step1.prepareDIDWallet')}
|
|
29
31
|
</Typography>
|
|
30
32
|
</Typography>
|
|
@@ -64,14 +66,21 @@ function Main() {
|
|
|
64
66
|
}}
|
|
65
67
|
/>
|
|
66
68
|
</Box>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
<Typography
|
|
70
|
+
component="h3"
|
|
71
|
+
variant="h4"
|
|
72
|
+
gutterBottom
|
|
73
|
+
sx={{
|
|
74
|
+
color: "text.primary",
|
|
75
|
+
mt: 2
|
|
76
|
+
}}>
|
|
69
77
|
{t('step2.title')}{' '}
|
|
70
|
-
<Typography component="small"
|
|
78
|
+
<Typography component="small" sx={{
|
|
79
|
+
color: "text.secondary"
|
|
80
|
+
}}>
|
|
71
81
|
{t('step2.enjoyPlayground')}
|
|
72
82
|
</Typography>
|
|
73
83
|
</Typography>
|
|
74
|
-
|
|
75
84
|
<Box
|
|
76
85
|
sx={{
|
|
77
86
|
display: 'flex',
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"bump-version": "zx --quiet scripts/bump-version.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@blocklet/sdk": "^1.16.
|
|
23
|
-
"@ocap/mcrypto": "^1.
|
|
24
|
-
"@ocap/util": "^1.
|
|
25
|
-
"@ocap/wallet": "^1.
|
|
22
|
+
"@blocklet/sdk": "^1.16.44",
|
|
23
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
24
|
+
"@ocap/util": "^1.20.15",
|
|
25
|
+
"@ocap/wallet": "^1.20.15",
|
|
26
26
|
"body-parser": "^1.20.3",
|
|
27
27
|
"cookie-parser": "^1.4.7",
|
|
28
28
|
"cors": "^2.8.5",
|
|
@@ -31,33 +31,33 @@
|
|
|
31
31
|
"morgan": "^1.10.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@arcblock/did-connect": "^
|
|
34
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
35
35
|
"@arcblock/eslint-config": "^0.3.3",
|
|
36
|
-
"@arcblock/ux": "^
|
|
37
|
-
"@blocklet/js-sdk": "^1.16.
|
|
38
|
-
"@blocklet/ui-react": "^
|
|
36
|
+
"@arcblock/ux": "^3.0.8",
|
|
37
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
38
|
+
"@blocklet/ui-react": "^3.0.8",
|
|
39
39
|
"@emotion/react": "^11.14.0",
|
|
40
|
-
"@emotion/styled": "^11.14.
|
|
41
|
-
"@mui/icons-material": "^
|
|
42
|
-
"@mui/material": "^
|
|
43
|
-
"@vitejs/plugin-react": "^4.
|
|
40
|
+
"@emotion/styled": "^11.14.1",
|
|
41
|
+
"@mui/icons-material": "^7.1.2",
|
|
42
|
+
"@mui/material": "^7.1.2",
|
|
43
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
44
44
|
"bumpp": "^9.11.1",
|
|
45
|
+
"cross-env": "^7.0.3",
|
|
45
46
|
"dayjs": "^1.11.13",
|
|
46
47
|
"dotenv-flow": "^4.1.0",
|
|
47
48
|
"flat": "^6.0.1",
|
|
48
49
|
"nodemon": "^3.1.9",
|
|
49
|
-
"react": "~
|
|
50
|
-
"react-dom": "
|
|
50
|
+
"react": "~19.1.0",
|
|
51
|
+
"react-dom": "19.1.0",
|
|
51
52
|
"react-router-dom": "^6.29.0",
|
|
52
53
|
"rimraf": "^5.0.10",
|
|
53
54
|
"simple-git-hooks": "^2.11.1",
|
|
54
|
-
"vite": "^
|
|
55
|
-
"vite-node": "^2.
|
|
56
|
-
"vite-plugin-blocklet": "^0.
|
|
55
|
+
"vite": "^7.0.0",
|
|
56
|
+
"vite-node": "^3.2.4",
|
|
57
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
57
58
|
"vite-plugin-require": "^1.2.14",
|
|
58
59
|
"vite-plugin-svgr": "^4.3.0",
|
|
59
|
-
"zx": "^8.3.2"
|
|
60
|
-
"cross-env": "^7.0.3"
|
|
60
|
+
"zx": "^8.3.2"
|
|
61
61
|
},
|
|
62
62
|
"lint-staged": {
|
|
63
63
|
"*.{mjs,js,jsx,ts,tsx}": [
|
|
@@ -42,7 +42,12 @@ export default function Main() {
|
|
|
42
42
|
|
|
43
43
|
const rows = !!user
|
|
44
44
|
? [
|
|
45
|
-
{ name: t('name'), value: <Box
|
|
45
|
+
{ name: t('name'), value: <Box
|
|
46
|
+
sx={{
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
gap: 2
|
|
50
|
+
}}><Avatar src={user.avatar}/>{user.fullName}</Box> },
|
|
46
51
|
preferences.displayAvatar ? { name: t('avatar'), value: <Avatar alt="" src={user.avatar}></Avatar> } : null,
|
|
47
52
|
{ name: t('did'), value: <DID did={user.did} showQrcode locale="zh" /> },
|
|
48
53
|
{ name: t('email'), value: user.email },
|
|
@@ -92,45 +97,47 @@ export default function Main() {
|
|
|
92
97
|
</Button>
|
|
93
98
|
</Box>
|
|
94
99
|
)}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
valueComponent="div"
|
|
117
|
-
key={row.name}
|
|
118
|
-
nameWidth={120}
|
|
119
|
-
name={row.name}
|
|
120
|
-
nameFormatter={() => t('did')}>
|
|
121
|
-
{row.value}
|
|
122
|
-
</InfoRow>
|
|
123
|
-
);
|
|
124
|
-
}
|
|
125
|
-
|
|
100
|
+
{!!user && (
|
|
101
|
+
<Box
|
|
102
|
+
sx={{
|
|
103
|
+
display: 'flex',
|
|
104
|
+
flexDirection: 'column',
|
|
105
|
+
gap: 2,
|
|
106
|
+
'&>div': {
|
|
107
|
+
mb: 0,
|
|
108
|
+
},
|
|
109
|
+
'.info-row__name': {
|
|
110
|
+
fontWeight: 'bold',
|
|
111
|
+
color: 'grey.800',
|
|
112
|
+
},
|
|
113
|
+
}}>
|
|
114
|
+
<Typography variant="h3" sx={{
|
|
115
|
+
mb: 3
|
|
116
|
+
}}>
|
|
117
|
+
{t('profile')}
|
|
118
|
+
</Typography>
|
|
119
|
+
{rows.map((row) => {
|
|
120
|
+
if (row.name === t('did')) {
|
|
126
121
|
return (
|
|
127
|
-
<InfoRow
|
|
122
|
+
<InfoRow
|
|
123
|
+
valueComponent="div"
|
|
124
|
+
key={row.name}
|
|
125
|
+
nameWidth={120}
|
|
126
|
+
name={row.name}
|
|
127
|
+
nameFormatter={() => t('did')}>
|
|
128
128
|
{row.value}
|
|
129
129
|
</InfoRow>
|
|
130
130
|
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return (
|
|
134
|
+
<InfoRow valueComponent="div" key={row.name} nameWidth={120} name={row.name}>
|
|
135
|
+
{row.value}
|
|
136
|
+
</InfoRow>
|
|
137
|
+
);
|
|
138
|
+
})}
|
|
139
|
+
</Box>
|
|
140
|
+
)}
|
|
134
141
|
</Stack>
|
|
135
142
|
);
|
|
136
143
|
}
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"license": "ISC",
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
35
|
-
"@blocklet/sdk": "^1.16.
|
|
36
|
-
"@ocap/client": "^1.
|
|
35
|
+
"@blocklet/sdk": "^1.16.44",
|
|
36
|
+
"@ocap/client": "^1.20.15",
|
|
37
37
|
"dotenv-flow": "^4.1.0",
|
|
38
38
|
"express": "^4.21.2"
|
|
39
39
|
},
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
39
|
-
"@blocklet/sdk": "^1.16.
|
|
39
|
+
"@blocklet/sdk": "^1.16.44",
|
|
40
40
|
"@nestjs/common": "^11.0.10",
|
|
41
41
|
"@nestjs/core": "^11.0.10",
|
|
42
42
|
"@nestjs/platform-express": "^11.0.10",
|
|
43
|
-
"@ocap/client": "^1.
|
|
43
|
+
"@ocap/client": "^1.20.15",
|
|
44
44
|
"dotenv-flow": "^4.1.0",
|
|
45
45
|
"express": "^4.21.2",
|
|
46
46
|
"reflect-metadata": "^0.2.2",
|
|
@@ -28,17 +28,17 @@
|
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@arcblock/did-auth": "^1.
|
|
31
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
32
32
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
33
|
-
"@blocklet/sdk": "^1.16.
|
|
34
|
-
"@ocap/client": "^1.
|
|
35
|
-
"@ocap/mcrypto": "^1.
|
|
36
|
-
"@ocap/wallet": "^1.
|
|
33
|
+
"@blocklet/sdk": "^1.16.44",
|
|
34
|
+
"@ocap/client": "^1.20.15",
|
|
35
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
36
|
+
"@ocap/wallet": "^1.20.15",
|
|
37
37
|
"dotenv-flow": "^4.1.0",
|
|
38
38
|
"express": "^4.21.2",
|
|
39
39
|
"next": "14.2.4",
|
|
40
|
-
"react": "~
|
|
41
|
-
"react-dom": "
|
|
40
|
+
"react": "~19.1.0",
|
|
41
|
+
"react-dom": "19.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"bumpp": "^9.11.1",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AIAgent } from '@aigne/core';
|
|
2
|
+
import { DefaultMemory } from '@aigne/agent-library/default-memory/index.js';
|
|
2
3
|
|
|
3
4
|
export const chatbot = AIAgent.from({
|
|
4
5
|
name: 'chatbot',
|
|
5
6
|
instructions:
|
|
6
7
|
'You are a helpful assistant. You can answer questions, provide information, and assist with various tasks.',
|
|
7
|
-
memory:
|
|
8
|
+
memory: new DefaultMemory(),
|
|
8
9
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { OpenAIChatModel } from '@aigne/
|
|
1
|
+
import { AIGNE } from '@aigne/core';
|
|
2
|
+
import { OpenAIChatModel } from '@aigne/openai';
|
|
3
3
|
import config from '@blocklet/sdk/lib/config';
|
|
4
4
|
import { Router } from 'express';
|
|
5
5
|
|
|
@@ -10,15 +10,13 @@ const model = new OpenAIChatModel({
|
|
|
10
10
|
apiKey: config.env.OPENAI_API_KEY || '',
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const aigne = new AIGNE({
|
|
14
14
|
model,
|
|
15
|
-
agents: [chatbot],
|
|
16
15
|
});
|
|
17
16
|
|
|
18
17
|
export const router = Router();
|
|
19
18
|
|
|
20
19
|
router.post('/chat', async (req, res) => {
|
|
21
|
-
const result = await
|
|
22
|
-
|
|
20
|
+
const result = await aigne.invoke(chatbot, { message: req.body });
|
|
23
21
|
res.json(result);
|
|
24
22
|
});
|
|
@@ -38,18 +38,20 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@aigne/core": "^1.
|
|
42
|
-
"@
|
|
41
|
+
"@aigne/core": "^1.25.0",
|
|
42
|
+
"@aigne/openai": "^0.4.2",
|
|
43
|
+
"@aigne/agent-library": "^1.17.2",
|
|
44
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
43
45
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
44
|
-
"@arcblock/did-connect": "^
|
|
45
|
-
"@arcblock/ux": "^
|
|
46
|
-
"@blocklet/sdk": "^1.16.
|
|
47
|
-
"@blocklet/ui-react": "^
|
|
48
|
-
"@mui/icons-material": "^
|
|
49
|
-
"@mui/material": "^
|
|
50
|
-
"@ocap/client": "^1.
|
|
51
|
-
"@ocap/mcrypto": "^1.
|
|
52
|
-
"@ocap/wallet": "^1.
|
|
46
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
47
|
+
"@arcblock/ux": "^3.0.8",
|
|
48
|
+
"@blocklet/sdk": "^1.16.44",
|
|
49
|
+
"@blocklet/ui-react": "^3.0.8",
|
|
50
|
+
"@mui/icons-material": "^7.1.2",
|
|
51
|
+
"@mui/material": "^7.1.2",
|
|
52
|
+
"@ocap/client": "^1.20.15",
|
|
53
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
54
|
+
"@ocap/wallet": "^1.20.15",
|
|
53
55
|
"axios": "^1.7.9",
|
|
54
56
|
"cookie-parser": "^1.4.7",
|
|
55
57
|
"cors": "^2.8.5",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
"@types/react-dom": "^18.3.5",
|
|
78
80
|
"@types/react-scroll-to-bottom": "^4.2.5",
|
|
79
81
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
80
|
-
"@vitejs/plugin-react": "^4.
|
|
82
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
81
83
|
"bumpp": "^9.11.1",
|
|
82
84
|
"cross-env": "^7.0.3",
|
|
83
85
|
"eslint": "^8.57.1",
|
|
@@ -87,16 +89,16 @@
|
|
|
87
89
|
"npm-run-all": "^4.1.5",
|
|
88
90
|
"prettier": "^3.5.1",
|
|
89
91
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
90
|
-
"react": "~
|
|
91
|
-
"react-dom": "~
|
|
92
|
+
"react": "~19.1.0",
|
|
93
|
+
"react-dom": "~19.1.0",
|
|
92
94
|
"react-router-dom": "^6.29.0",
|
|
93
95
|
"rimraf": "^5.0.10",
|
|
94
96
|
"simple-git-hooks": "^2.11.1",
|
|
95
97
|
"ts-node": "^10.9.2",
|
|
96
98
|
"tsx": "^4.19.3",
|
|
97
99
|
"typescript": "^5.7.3",
|
|
98
|
-
"vite": "^
|
|
99
|
-
"vite-plugin-blocklet": "^0.
|
|
100
|
+
"vite": "^7.0.0",
|
|
101
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
100
102
|
"vite-plugin-svgr": "^4.3.0",
|
|
101
103
|
"zx": "^8.3.2"
|
|
102
104
|
},
|
|
@@ -26,7 +26,12 @@ export default function ScrollView({
|
|
|
26
26
|
// Skip scroll view if we are in a scroll view
|
|
27
27
|
if (ctx) {
|
|
28
28
|
return (
|
|
29
|
-
<Box
|
|
29
|
+
<Box
|
|
30
|
+
component={component}
|
|
31
|
+
{...props}
|
|
32
|
+
sx={[{
|
|
33
|
+
flexGrow: 1
|
|
34
|
+
}, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}>
|
|
30
35
|
{children}
|
|
31
36
|
</Box>
|
|
32
37
|
);
|
|
@@ -65,11 +70,11 @@ function ScrollViewWithinWindow({
|
|
|
65
70
|
component={component}
|
|
66
71
|
{...props}
|
|
67
72
|
ref={scroll === 'element' ? setTarget : undefined}
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
sx={[{
|
|
74
|
+
flexGrow: 1,
|
|
70
75
|
...(scroll === 'element' ? { flex: 1, height: '100%', overflow: 'auto', overscrollBehavior: 'contain' } : {}),
|
|
71
|
-
...props.sx
|
|
72
|
-
}}>
|
|
76
|
+
...props.sx
|
|
77
|
+
}, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}>
|
|
73
78
|
{children}
|
|
74
79
|
</Box>
|
|
75
80
|
);
|
|
@@ -95,23 +95,31 @@ export default function Home() {
|
|
|
95
95
|
return (
|
|
96
96
|
<ScrollView scroll="window" sx={{ minHeight: '100vh' }}>
|
|
97
97
|
<Box component={Header} sx={{ position: 'sticky', top: 0, '.header-container': { maxWidth: '100%' } }} />
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
<Box sx={{
|
|
99
|
+
textAlign: "center"
|
|
100
|
+
}}>
|
|
100
101
|
<a href="https://www.arcblock.io/docs/blocklet-developer/getting-started" target="_blank" rel="noreferrer">
|
|
101
102
|
<img src={blockletLogo} className="logo blocklet" alt="Blocklet logo" />
|
|
102
103
|
</a>
|
|
103
104
|
<h1>Vite + React + AIGNE Framework SDK</h1>
|
|
104
105
|
</Box>
|
|
105
|
-
|
|
106
106
|
<Box>
|
|
107
|
-
<Typography
|
|
107
|
+
<Typography
|
|
108
|
+
variant="h4"
|
|
109
|
+
sx={{
|
|
110
|
+
textAlign: "center",
|
|
111
|
+
my: 6
|
|
112
|
+
}}>
|
|
108
113
|
AIGNE Chatbot
|
|
109
114
|
</Typography>
|
|
110
|
-
<Typography
|
|
115
|
+
<Typography
|
|
116
|
+
sx={{
|
|
117
|
+
textAlign: "center",
|
|
118
|
+
my: 6
|
|
119
|
+
}}>
|
|
111
120
|
This is a simple demo to help you quickly use the AIGNE framework SDK
|
|
112
121
|
</Typography>
|
|
113
122
|
</Box>
|
|
114
|
-
|
|
115
123
|
<Container sx={{ display: 'flex', flexDirection: 'column', py: 3 }} maxWidth="md">
|
|
116
124
|
<Stack sx={{ flex: 1, height: 0, display: 'flex', flexDirection: 'column', gap: 3, mb: 5 }}>
|
|
117
125
|
{messages.map((message) => (
|
|
@@ -150,26 +158,48 @@ export default function Home() {
|
|
|
150
158
|
|
|
151
159
|
const MessageView = memo(({ message }: { message: MessageItem }) => {
|
|
152
160
|
return (
|
|
153
|
-
<Stack
|
|
154
|
-
|
|
161
|
+
<Stack sx={{
|
|
162
|
+
gap: 2
|
|
163
|
+
}}>
|
|
164
|
+
<Stack direction="row" sx={{
|
|
165
|
+
gap: 2
|
|
166
|
+
}}>
|
|
155
167
|
<Avatar>🧑</Avatar>
|
|
156
168
|
|
|
157
|
-
<Stack
|
|
169
|
+
<Stack
|
|
170
|
+
sx={{
|
|
171
|
+
flex: 1,
|
|
172
|
+
pt: 1,
|
|
173
|
+
gap: 1
|
|
174
|
+
}}>
|
|
158
175
|
<Typography>{message.question}</Typography>
|
|
159
176
|
</Stack>
|
|
160
177
|
</Stack>
|
|
161
|
-
|
|
162
|
-
|
|
178
|
+
<Stack direction="row" sx={{
|
|
179
|
+
gap: 2
|
|
180
|
+
}}>
|
|
163
181
|
<Avatar>🤖</Avatar>
|
|
164
|
-
<Stack
|
|
182
|
+
<Stack
|
|
183
|
+
sx={{
|
|
184
|
+
flex: 1,
|
|
185
|
+
pt: 1,
|
|
186
|
+
gap: 2
|
|
187
|
+
}}>
|
|
165
188
|
{message.$message && (
|
|
166
|
-
<Stack
|
|
189
|
+
<Stack sx={{
|
|
190
|
+
gap: 1
|
|
191
|
+
}}>
|
|
167
192
|
<MarkdownRenderer citations={[]}>{message.$message}</MarkdownRenderer>
|
|
168
193
|
</Stack>
|
|
169
194
|
)}
|
|
170
195
|
|
|
171
196
|
{message.loading && (
|
|
172
|
-
<Stack
|
|
197
|
+
<Stack
|
|
198
|
+
direction="row"
|
|
199
|
+
sx={{
|
|
200
|
+
gap: 2,
|
|
201
|
+
alignItems: "center"
|
|
202
|
+
}}>
|
|
173
203
|
<CircularProgress size={16} />
|
|
174
204
|
</Stack>
|
|
175
205
|
)}
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@arcblock/did-auth": "^1.
|
|
43
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
44
44
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
45
|
-
"@blocklet/sdk": "^1.16.
|
|
46
|
-
"@ocap/client": "^1.
|
|
47
|
-
"@ocap/mcrypto": "^1.
|
|
48
|
-
"@ocap/wallet": "^1.
|
|
45
|
+
"@blocklet/sdk": "^1.16.44",
|
|
46
|
+
"@ocap/client": "^1.20.15",
|
|
47
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
48
|
+
"@ocap/wallet": "^1.20.15",
|
|
49
49
|
"axios": "^1.7.9",
|
|
50
50
|
"cookie-parser": "^1.4.7",
|
|
51
51
|
"cors": "^2.8.5",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@arcblock/eslint-config": "^0.3.3",
|
|
58
|
-
"@blocklet/js-sdk": "^1.16.
|
|
58
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
59
59
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
60
|
-
"@vitejs/plugin-react": "^4.
|
|
60
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
61
61
|
"bumpp": "^9.11.1",
|
|
62
62
|
"cross-env": "^7.0.3",
|
|
63
63
|
"eslint": "^8.57.1",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"nodemon": "^3.1.9",
|
|
66
66
|
"npm-run-all": "^4.1.5",
|
|
67
67
|
"prettier": "^3.5.1",
|
|
68
|
-
"react": "~
|
|
69
|
-
"react-dom": "~
|
|
68
|
+
"react": "~19.1.0",
|
|
69
|
+
"react-dom": "~19.1.0",
|
|
70
70
|
"react-router-dom": "^6.29.0",
|
|
71
71
|
"rimraf": "^5.0.10",
|
|
72
72
|
"simple-git-hooks": "^2.11.1",
|
|
73
73
|
"tsx": "^4.19.3",
|
|
74
|
-
"vite": "^
|
|
75
|
-
"vite-plugin-blocklet": "^0.
|
|
74
|
+
"vite": "^7.0.0",
|
|
75
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.3.0",
|
|
77
77
|
"zx": "^8.3.2"
|
|
78
78
|
},
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcblock/did-auth": "^1.
|
|
41
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
42
42
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
43
|
-
"@blocklet/sdk": "^1.16.
|
|
44
|
-
"@ocap/client": "^1.
|
|
45
|
-
"@ocap/mcrypto": "^1.
|
|
46
|
-
"@ocap/wallet": "^1.
|
|
43
|
+
"@blocklet/sdk": "^1.16.44",
|
|
44
|
+
"@ocap/client": "^1.20.15",
|
|
45
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
46
|
+
"@ocap/wallet": "^1.20.15",
|
|
47
47
|
"axios": "^1.7.9",
|
|
48
48
|
"cookie-parser": "^1.4.7",
|
|
49
49
|
"cors": "^2.8.5",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@arcblock/eslint-config": "^0.3.3",
|
|
56
56
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
57
|
-
"@blocklet/js-sdk": "^1.16.
|
|
57
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
58
58
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
59
59
|
"@types/cookie-parser": "^1.4.8",
|
|
60
60
|
"@types/cors": "^2.8.17",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/node": "^20.17.19",
|
|
64
64
|
"@types/react": "^18.3.18",
|
|
65
65
|
"@types/react-dom": "^18.3.5",
|
|
66
|
-
"@vitejs/plugin-react": "^4.
|
|
66
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
67
67
|
"bumpp": "^9.11.1",
|
|
68
68
|
"cross-env": "^7.0.3",
|
|
69
69
|
"eslint": "^8.57.1",
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
"npm-run-all": "^4.1.5",
|
|
74
74
|
"prettier": "^3.5.1",
|
|
75
75
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
76
|
-
"react": "~
|
|
77
|
-
"react-dom": "~
|
|
76
|
+
"react": "~19.1.0",
|
|
77
|
+
"react-dom": "~19.1.0",
|
|
78
78
|
"react-router-dom": "^6.29.0",
|
|
79
79
|
"rimraf": "^5.0.10",
|
|
80
80
|
"simple-git-hooks": "^2.11.1",
|
|
81
81
|
"ts-node": "^10.9.2",
|
|
82
82
|
"tsx": "^4.19.3",
|
|
83
83
|
"typescript": "^5.7.3",
|
|
84
|
-
"vite": "^
|
|
85
|
-
"vite-plugin-blocklet": "^0.
|
|
84
|
+
"vite": "^7.0.0",
|
|
85
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
86
86
|
"vite-plugin-svgr": "^4.3.0",
|
|
87
87
|
"zx": "^8.3.2"
|
|
88
88
|
},
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@arcblock/did-auth": "^1.
|
|
43
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
44
44
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
45
|
-
"@blocklet/sdk": "^1.16.
|
|
46
|
-
"@ocap/client": "^1.
|
|
47
|
-
"@ocap/mcrypto": "^1.
|
|
48
|
-
"@ocap/wallet": "^1.
|
|
45
|
+
"@blocklet/sdk": "^1.16.44",
|
|
46
|
+
"@ocap/client": "^1.20.15",
|
|
47
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
48
|
+
"@ocap/wallet": "^1.20.15",
|
|
49
49
|
"axios": "^1.7.9",
|
|
50
50
|
"cookie-parser": "^1.4.7",
|
|
51
51
|
"cors": "^2.8.5",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@arcblock/eslint-config": "^0.3.3",
|
|
59
59
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
60
|
-
"@vitejs/plugin-react": "^4.
|
|
60
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
61
61
|
"bumpp": "^9.11.1",
|
|
62
62
|
"cross-env": "^7.0.3",
|
|
63
63
|
"eslint": "^8.57.1",
|
|
@@ -65,14 +65,14 @@
|
|
|
65
65
|
"nodemon": "^3.1.9",
|
|
66
66
|
"npm-run-all": "^4.1.5",
|
|
67
67
|
"prettier": "^3.5.1",
|
|
68
|
-
"react": "~
|
|
69
|
-
"react-dom": "~
|
|
68
|
+
"react": "~19.1.0",
|
|
69
|
+
"react-dom": "~19.1.0",
|
|
70
70
|
"react-router-dom": "^6.29.0",
|
|
71
71
|
"rimraf": "^5.0.10",
|
|
72
72
|
"simple-git-hooks": "^2.11.1",
|
|
73
73
|
"tsx": "^4.19.3",
|
|
74
|
-
"vite": "^
|
|
75
|
-
"vite-plugin-blocklet": "^0.
|
|
74
|
+
"vite": "^7.0.0",
|
|
75
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.3.0",
|
|
77
77
|
"zx": "^8.3.2"
|
|
78
78
|
},
|
|
@@ -41,18 +41,18 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@arcblock/eslint-config": "^0.3.3",
|
|
43
43
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
44
|
-
"@vitejs/plugin-react": "^4.
|
|
44
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
45
45
|
"bumpp": "^9.11.1",
|
|
46
46
|
"eslint": "^8.57.1",
|
|
47
47
|
"lint-staged": "^15.4.3",
|
|
48
48
|
"prettier": "^3.5.1",
|
|
49
|
-
"react": "~
|
|
50
|
-
"react-dom": "~
|
|
49
|
+
"react": "~19.1.0",
|
|
50
|
+
"react-dom": "~19.1.0",
|
|
51
51
|
"react-router-dom": "^6.29.0",
|
|
52
52
|
"rimraf": "^5.0.10",
|
|
53
53
|
"simple-git-hooks": "^2.11.1",
|
|
54
|
-
"vite": "^
|
|
55
|
-
"vite-plugin-blocklet": "^0.
|
|
54
|
+
"vite": "^7.0.0",
|
|
55
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
56
56
|
"vite-plugin-svgr": "^4.3.0",
|
|
57
57
|
"zx": "^8.3.2"
|
|
58
58
|
},
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@blocklet/js-sdk": "^1.16.
|
|
24
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
25
25
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
26
26
|
"bumpp": "^9.11.1",
|
|
27
27
|
"cross-env": "^7.0.3",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"rimraf": "^5.0.10",
|
|
37
37
|
"simple-git-hooks": "^2.11.1",
|
|
38
38
|
"tsx": "^4.19.3",
|
|
39
|
-
"vite": "^
|
|
40
|
-
"vite-plugin-blocklet": "^0.
|
|
41
|
-
"vite-plugin-solid": "^2.11.
|
|
39
|
+
"vite": "^7.0.0",
|
|
40
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
41
|
+
"vite-plugin-solid": "^2.11.7",
|
|
42
42
|
"zx": "^8.3.2"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@arcblock/did-auth": "^1.
|
|
45
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
46
46
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
47
|
-
"@blocklet/sdk": "^1.16.
|
|
48
|
-
"@ocap/client": "^1.
|
|
49
|
-
"@ocap/mcrypto": "^1.
|
|
50
|
-
"@ocap/wallet": "^1.
|
|
47
|
+
"@blocklet/sdk": "^1.16.44",
|
|
48
|
+
"@ocap/client": "^1.20.15",
|
|
49
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
50
|
+
"@ocap/wallet": "^1.20.15",
|
|
51
51
|
"axios": "^1.7.9",
|
|
52
52
|
"cookie-parser": "^1.4.7",
|
|
53
53
|
"cors": "^2.8.5",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"rimraf": "^5.0.10",
|
|
32
32
|
"simple-git-hooks": "^2.11.1",
|
|
33
33
|
"solid-js": "^1.9.4",
|
|
34
|
-
"vite": "^
|
|
35
|
-
"vite-plugin-blocklet": "^0.
|
|
36
|
-
"vite-plugin-solid": "^2.11.
|
|
34
|
+
"vite": "^7.0.0",
|
|
35
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
36
|
+
"vite-plugin-solid": "^2.11.7",
|
|
37
37
|
"zx": "^8.3.2"
|
|
38
38
|
},
|
|
39
39
|
"lint-staged": {
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"bump-version": "zx --quiet scripts/bump-version.mjs"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@arcblock/did-auth": "^1.
|
|
20
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
21
21
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
22
|
-
"@blocklet/sdk": "^1.16.
|
|
23
|
-
"@ocap/client": "^1.
|
|
24
|
-
"@ocap/mcrypto": "^1.
|
|
25
|
-
"@ocap/wallet": "^1.
|
|
22
|
+
"@blocklet/sdk": "^1.16.44",
|
|
23
|
+
"@ocap/client": "^1.20.15",
|
|
24
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
25
|
+
"@ocap/wallet": "^1.20.15",
|
|
26
26
|
"axios": "^1.7.9",
|
|
27
27
|
"cookie-parser": "^1.4.7",
|
|
28
28
|
"cors": "^2.8.5",
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"express-async-errors": "^3.1.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@blocklet/js-sdk": "^1.16.
|
|
35
|
-
"@sveltejs/vite-plugin-svelte": "
|
|
34
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
35
|
+
"@sveltejs/vite-plugin-svelte": "5.1.0",
|
|
36
36
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
37
37
|
"bumpp": "^9.11.1",
|
|
38
38
|
"cross-env": "^7.0.3",
|
|
39
39
|
"lint-staged": "^15.4.3",
|
|
40
|
+
"nodemon": "^3.1.9",
|
|
40
41
|
"npm-run-all": "^4.1.5",
|
|
41
42
|
"prettier": "^3.5.1",
|
|
42
43
|
"prettier-plugin-svelte": "^3.3.3",
|
|
@@ -44,10 +45,9 @@
|
|
|
44
45
|
"simple-git-hooks": "^2.11.1",
|
|
45
46
|
"svelte": "^4.2.19",
|
|
46
47
|
"tsx": "^4.19.3",
|
|
47
|
-
"vite": "^
|
|
48
|
-
"vite-plugin-blocklet": "^0.
|
|
49
|
-
"zx": "^8.3.2"
|
|
50
|
-
"nodemon": "^3.1.9"
|
|
48
|
+
"vite": "^7.0.0",
|
|
49
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
50
|
+
"zx": "^8.3.2"
|
|
51
51
|
},
|
|
52
52
|
"lint-staged": {
|
|
53
53
|
"*.{mjs,js,svelte}": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"bump-version": "zx --quiet scripts/bump-version.mjs"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
19
|
+
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
20
20
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
21
21
|
"bumpp": "^9.11.1",
|
|
22
22
|
"lint-staged": "^15.4.3",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"rimraf": "^5.0.10",
|
|
26
26
|
"simple-git-hooks": "^2.11.1",
|
|
27
27
|
"svelte": "^4.2.19",
|
|
28
|
-
"vite": "^
|
|
29
|
-
"vite-plugin-blocklet": "^0.
|
|
28
|
+
"vite": "^7.0.0",
|
|
29
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
30
30
|
"zx": "^8.3.2"
|
|
31
31
|
},
|
|
32
32
|
"lint-staged": {
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@arcblock/did-auth": "^1.
|
|
41
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
42
42
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
43
|
-
"@blocklet/did-space-js": "^0.
|
|
44
|
-
"@blocklet/sdk": "^1.16.
|
|
45
|
-
"@did-space/core": "^0.
|
|
46
|
-
"@ocap/client": "^1.
|
|
47
|
-
"@ocap/mcrypto": "^1.
|
|
48
|
-
"@ocap/wallet": "^1.
|
|
43
|
+
"@blocklet/did-space-js": "^1.0.63",
|
|
44
|
+
"@blocklet/sdk": "^1.16.44",
|
|
45
|
+
"@did-space/core": "^1.0.63",
|
|
46
|
+
"@ocap/client": "^1.20.15",
|
|
47
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
48
|
+
"@ocap/wallet": "^1.20.15",
|
|
49
49
|
"axios": "^1.7.9",
|
|
50
50
|
"cookie-parser": "^1.4.7",
|
|
51
51
|
"cors": "^2.8.5",
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"nanoid": "^5.1.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@arcblock/did-connect": "^
|
|
59
|
+
"@arcblock/did-connect": "^3.0.8",
|
|
60
60
|
"@arcblock/eslint-config": "^0.3.3",
|
|
61
61
|
"@arcblock/eslint-config-ts": "^0.3.3",
|
|
62
|
-
"@arcblock/ux": "^
|
|
63
|
-
"@blocklet/js-sdk": "^1.16.
|
|
64
|
-
"@blocklet/ui-react": "^
|
|
62
|
+
"@arcblock/ux": "^3.0.8",
|
|
63
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
64
|
+
"@blocklet/ui-react": "^3.0.8",
|
|
65
65
|
"@emotion/react": "^11.14.0",
|
|
66
|
-
"@emotion/styled": "^11.14.
|
|
67
|
-
"@mui/icons-material": "^
|
|
68
|
-
"@mui/material": "^
|
|
66
|
+
"@emotion/styled": "^11.14.1",
|
|
67
|
+
"@mui/icons-material": "^7.1.2",
|
|
68
|
+
"@mui/material": "^7.1.2",
|
|
69
69
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
70
70
|
"@types/cookie-parser": "^1.4.8",
|
|
71
71
|
"@types/cors": "^2.8.17",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/react": "^18.3.18",
|
|
77
77
|
"@types/react-dom": "^18.3.5",
|
|
78
78
|
"@types/react-toastify": "^4.1.0",
|
|
79
|
-
"@vitejs/plugin-react": "^4.
|
|
79
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
80
80
|
"bumpp": "^9.11.1",
|
|
81
81
|
"cross-env": "^7.0.3",
|
|
82
82
|
"eslint": "^8.57.1",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"nodemon": "^3.1.9",
|
|
87
87
|
"prettier": "^3.5.1",
|
|
88
88
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
89
|
-
"react": "~
|
|
90
|
-
"react-dom": "~
|
|
89
|
+
"react": "~19.1.0",
|
|
90
|
+
"react-dom": "~19.1.0",
|
|
91
91
|
"react-icons": "^5.5.0",
|
|
92
92
|
"react-router-dom": "^6.29.0",
|
|
93
93
|
"react-toastify": "^10.0.6",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"ts-node": "^10.9.2",
|
|
97
97
|
"tsx": "^4.19.3",
|
|
98
98
|
"typescript": "^5.7.3",
|
|
99
|
-
"vite": "^
|
|
100
|
-
"vite-plugin-blocklet": "^0.
|
|
99
|
+
"vite": "^7.0.0",
|
|
100
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
101
101
|
"vite-plugin-svgr": "^4.3.0",
|
|
102
102
|
"zx": "^8.3.2"
|
|
103
103
|
},
|
|
@@ -28,8 +28,21 @@ function RequiredLogin({ onLogin = () => {}, nextUrl = undefined, ...rest }: Rea
|
|
|
28
28
|
}, [session.user, navigate, nextUrl]);
|
|
29
29
|
|
|
30
30
|
return (
|
|
31
|
-
<Grid
|
|
32
|
-
|
|
31
|
+
<Grid
|
|
32
|
+
container
|
|
33
|
+
{...rest}
|
|
34
|
+
sx={[{
|
|
35
|
+
justifyContent: "center"
|
|
36
|
+
}, ...(Array.isArray(rest.sx) ? rest.sx : [rest.sx])]}>
|
|
37
|
+
<Grid
|
|
38
|
+
size={{
|
|
39
|
+
xl: 12,
|
|
40
|
+
lg: 12
|
|
41
|
+
}}
|
|
42
|
+
sx={{
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
textAlign: "center"
|
|
45
|
+
}}>
|
|
33
46
|
<Alert severity="warning">Connect to the DID Wallet login to access the website</Alert>
|
|
34
47
|
<Button
|
|
35
48
|
onClick={() => session.login(onLogin)}
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"bump-version": "zx --quiet scripts/bump-version.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@arcblock/did-auth": "^1.
|
|
22
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
23
23
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
24
|
-
"@blocklet/sdk": "^1.16.
|
|
25
|
-
"@ocap/client": "^1.
|
|
26
|
-
"@ocap/mcrypto": "^1.
|
|
27
|
-
"@ocap/wallet": "^1.
|
|
24
|
+
"@blocklet/sdk": "^1.16.44",
|
|
25
|
+
"@ocap/client": "^1.20.15",
|
|
26
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
27
|
+
"@ocap/wallet": "^1.20.15",
|
|
28
28
|
"axios": "^1.7.9",
|
|
29
29
|
"cookie-parser": "^1.4.7",
|
|
30
30
|
"cors": "^2.8.5",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"express-async-errors": "^3.1.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@blocklet/js-sdk": "^1.16.
|
|
36
|
+
"@blocklet/js-sdk": "^1.16.44",
|
|
37
37
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
38
|
-
"@vitejs/plugin-vue": "^
|
|
38
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
39
39
|
"bumpp": "^9.11.1",
|
|
40
40
|
"cross-env": "^7.0.3",
|
|
41
41
|
"eslint": "^8.57.1",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"rimraf": "^5.0.10",
|
|
50
50
|
"simple-git-hooks": "^2.11.1",
|
|
51
51
|
"tsx": "^4.19.3",
|
|
52
|
-
"vite": "^
|
|
53
|
-
"vite-plugin-blocklet": "^0.
|
|
52
|
+
"vite": "^7.0.0",
|
|
53
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
54
54
|
"vue": "^3.5.13",
|
|
55
55
|
"zx": "^8.3.2"
|
|
56
56
|
},
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
22
|
-
"@vitejs/plugin-vue": "^
|
|
22
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
23
23
|
"bumpp": "^9.11.1",
|
|
24
24
|
"eslint": "^8.57.1",
|
|
25
25
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"prettier": "^3.5.1",
|
|
30
30
|
"rimraf": "^5.0.10",
|
|
31
31
|
"simple-git-hooks": "^2.11.1",
|
|
32
|
-
"vite": "^
|
|
33
|
-
"vite-plugin-blocklet": "^0.
|
|
32
|
+
"vite": "^7.0.0",
|
|
33
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
34
34
|
"vue": "^3.5.13",
|
|
35
35
|
"zx": "^8.3.2"
|
|
36
36
|
},
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@antfu/eslint-config": "^2.27.3",
|
|
31
|
-
"@blocklet/cli": "^1.16.
|
|
32
|
-
"@vitejs/plugin-vue": "^
|
|
31
|
+
"@blocklet/cli": "^1.16.44",
|
|
32
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
33
33
|
"bumpp": "^9.11.1",
|
|
34
34
|
"eslint": "9.5.0",
|
|
35
35
|
"eslint-plugin-format": "^0.1.3",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"simple-git-hooks": "^2.11.1",
|
|
39
39
|
"taze": "^0.16.9",
|
|
40
40
|
"typescript": "^5.7.3",
|
|
41
|
-
"vite": "^
|
|
42
|
-
"vite-plugin-blocklet": "^0.
|
|
41
|
+
"vite": "^7.0.0",
|
|
42
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
43
43
|
"vue-tsc": "^2.2.2",
|
|
44
44
|
"zx": "^8.3.2"
|
|
45
45
|
},
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"bump-version": "zx --quiet scripts/bump-version.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@arcblock/did-auth": "^1.
|
|
22
|
+
"@arcblock/did-auth": "^1.20.15",
|
|
23
23
|
"@arcblock/did-auth-storage-nedb": "^1.7.1",
|
|
24
|
-
"@blocklet/sdk": "^1.16.
|
|
25
|
-
"@ocap/client": "^1.
|
|
26
|
-
"@ocap/mcrypto": "^1.
|
|
27
|
-
"@ocap/wallet": "^1.
|
|
24
|
+
"@blocklet/sdk": "^1.16.44",
|
|
25
|
+
"@ocap/client": "^1.20.15",
|
|
26
|
+
"@ocap/mcrypto": "^1.20.15",
|
|
27
|
+
"@ocap/wallet": "^1.20.15",
|
|
28
28
|
"axios": "^1.7.9",
|
|
29
29
|
"cookie-parser": "^1.4.7",
|
|
30
30
|
"cors": "^2.8.5",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"rimraf": "^5.0.10",
|
|
49
49
|
"simple-git-hooks": "^2.11.1",
|
|
50
50
|
"tsx": "^4.19.3",
|
|
51
|
-
"vite": "^
|
|
52
|
-
"vite-plugin-blocklet": "^0.
|
|
51
|
+
"vite": "^7.0.0",
|
|
52
|
+
"vite-plugin-blocklet": "^0.10.0",
|
|
53
53
|
"vue": "^2.7.16",
|
|
54
54
|
"zx": "^8.3.2"
|
|
55
55
|
},
|