create-secra 0.1.11 → 1.0.2
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/README.md +15 -5
- package/README.zh-CN.md +15 -4
- package/antd-adapter-template/README.md +24 -0
- package/antd-adapter-template/index.html +16 -0
- package/antd-adapter-template/package-lock.json +3420 -0
- package/antd-adapter-template/package.json +20 -47
- package/antd-adapter-template/src/app/App.tsx +7 -0
- package/antd-adapter-template/src/app/layouts/AppLayout.tsx +163 -0
- package/antd-adapter-template/src/app/router.ts +26 -0
- package/antd-adapter-template/src/app/routes/RouteTitleSync.tsx +26 -0
- package/antd-adapter-template/src/app/routes/dynamic-routes.ts +52 -0
- package/antd-adapter-template/src/app/routes/route-modules.ts +4 -0
- package/antd-adapter-template/src/app/routes/static-routes.tsx +110 -0
- package/antd-adapter-template/src/app/routes/types.ts +9 -0
- package/antd-adapter-template/src/features/auth/api/auth-api.ts +61 -0
- package/antd-adapter-template/src/features/auth/auth-store.ts +125 -0
- package/antd-adapter-template/src/features/auth/auth-types.ts +29 -0
- package/antd-adapter-template/src/features/auth/authorization.ts +46 -0
- package/antd-adapter-template/src/features/auth/use-auth.ts +10 -0
- package/antd-adapter-template/src/main.tsx +79 -0
- package/antd-adapter-template/src/pages/dashboard/DashboardPage.tsx +105 -0
- package/antd-adapter-template/src/pages/errors/ForbiddenPage.tsx +36 -0
- package/antd-adapter-template/src/pages/errors/NotFoundPage.tsx +36 -0
- package/antd-adapter-template/src/pages/home/HomePage.tsx +129 -0
- package/antd-adapter-template/src/pages/login/LoginPage.tsx +128 -0
- package/antd-adapter-template/src/pages/permission-test/PermissionTestPage.tsx +55 -0
- package/antd-adapter-template/src/pages/restricted/RestrictedDemoPage.tsx +17 -0
- package/antd-adapter-template/src/shared/kernel/app-kernel.ts +10 -0
- package/antd-adapter-template/src/shared/request/client.ts +46 -0
- package/antd-adapter-template/src/shared/request/contracts.ts +6 -0
- package/antd-adapter-template/src/shared/request/kv-adapter.ts +14 -0
- package/antd-adapter-template/src/shared/request/kv-backend.ts +244 -0
- package/antd-adapter-template/src/shared/request/ky-browser-stub.ts +6 -0
- package/antd-adapter-template/src/shared/request/undici-browser-stub.ts +4 -0
- package/antd-adapter-template/src/styles/global.css +185 -0
- package/antd-adapter-template/src/vite-env.d.ts +2 -0
- package/antd-adapter-template/tsconfig.app.json +10 -13
- package/antd-adapter-template/tsconfig.json +7 -2
- package/antd-adapter-template/tsconfig.node.json +6 -16
- package/antd-adapter-template/vite.config.ts +24 -0
- package/bin/index.mjs +32 -14
- package/package.json +2 -2
- package/{antd-adapter-template/apps/core → template}/index.html +2 -3
- package/template/package.json +14 -46
- package/template/src/App.tsx +48 -0
- package/template/src/main.tsx +36 -0
- package/template/src/styles.css +163 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tsconfig.app.json +0 -5
- package/template/tsconfig.node.json +0 -5
- package/template/vite.config.ts +6 -0
- package/antd-adapter-template/apps/core/package.json +0 -18
- package/antd-adapter-template/apps/core/public/favicon.ico +0 -1
- package/antd-adapter-template/apps/core/public/favicon.svg +0 -1
- package/antd-adapter-template/apps/core/public/logo.svg +0 -1
- package/antd-adapter-template/apps/core/src/api/auth.ts +0 -49
- package/antd-adapter-template/apps/core/src/assets/react.svg +0 -1
- package/antd-adapter-template/apps/core/src/components/AntdGlobalProvider.tsx +0 -87
- package/antd-adapter-template/apps/core/src/components/AntdRootLayout.tsx +0 -10
- package/antd-adapter-template/apps/core/src/components/layout.tsx +0 -387
- package/antd-adapter-template/apps/core/src/guards/auth-route-guard.ts +0 -45
- package/antd-adapter-template/apps/core/src/main.tsx +0 -65
- package/antd-adapter-template/apps/core/src/pages/auth/components/account-login-fields.tsx +0 -60
- package/antd-adapter-template/apps/core/src/pages/auth/components/phone-login-fields.tsx +0 -60
- package/antd-adapter-template/apps/core/src/pages/auth/login.tsx +0 -169
- package/antd-adapter-template/apps/core/src/pages/index.tsx +0 -156
- package/antd-adapter-template/apps/core/src/router.ts +0 -42
- package/antd-adapter-template/apps/core/src/shims/use-sync-external-store-shim.ts +0 -3
- package/antd-adapter-template/apps/core/src/theme/theme.css +0 -48
- package/antd-adapter-template/apps/core/src/types/crypto-js.d.ts +0 -5
- package/antd-adapter-template/apps/core/src/utils/index.ts +0 -12
- package/antd-adapter-template/apps/core/src/utils/md5.ts +0 -6
- package/antd-adapter-template/apps/core/tsconfig.app.json +0 -11
- package/antd-adapter-template/apps/core/tsconfig.json +0 -13
- package/antd-adapter-template/apps/core/tsconfig.node.json +0 -7
- package/antd-adapter-template/apps/core/vite.config.ts +0 -118
- package/antd-adapter-template/eslint.config.js +0 -23
- package/antd-adapter-template/packages/sdk/.swcrc +0 -18
- package/antd-adapter-template/packages/sdk/package.json +0 -52
- package/antd-adapter-template/packages/sdk/src/build/index.ts +0 -28
- package/antd-adapter-template/packages/sdk/src/build/plugins/auto-import.ts +0 -46
- package/antd-adapter-template/packages/sdk/src/build/plugins/bundle-analyzer.ts +0 -33
- package/antd-adapter-template/packages/sdk/src/build/plugins/remove-console.ts +0 -23
- package/antd-adapter-template/packages/sdk/src/build/plugins/unocss.ts +0 -202
- package/antd-adapter-template/packages/sdk/src/build/plugins/unplugin-icon.ts +0 -43
- package/antd-adapter-template/packages/sdk/src/components/i18n-switch-dropdown.tsx +0 -139
- package/antd-adapter-template/packages/sdk/src/components/index.ts +0 -2
- package/antd-adapter-template/packages/sdk/src/components/theme-switch-dropdown.tsx +0 -131
- package/antd-adapter-template/packages/sdk/src/hooks/auth/core.ts +0 -101
- package/antd-adapter-template/packages/sdk/src/hooks/auth/index.ts +0 -139
- package/antd-adapter-template/packages/sdk/src/hooks/auth/with-auth.tsx +0 -41
- package/antd-adapter-template/packages/sdk/src/hooks/index.ts +0 -1
- package/antd-adapter-template/packages/sdk/src/i18n/index.ts +0 -150
- package/antd-adapter-template/packages/sdk/src/index.ts +0 -11
- package/antd-adapter-template/packages/sdk/src/request/index.ts +0 -436
- package/antd-adapter-template/packages/sdk/src/storage/README.md +0 -30
- package/antd-adapter-template/packages/sdk/src/storage/index.ts +0 -57
- package/antd-adapter-template/packages/sdk/src/styles/reset.css +0 -111
- package/antd-adapter-template/packages/sdk/src/theme/index.ts +0 -466
- package/antd-adapter-template/packages/sdk/tsconfig.json +0 -16
- package/antd-adapter-template/pnpm-workspace.yaml +0 -3
- package/antd-adapter-template/turbo.json +0 -17
- package/template/apps/core/index.html +0 -13
- package/template/apps/core/package.json +0 -18
- package/template/apps/core/public/favicon.ico +0 -1
- package/template/apps/core/public/favicon.svg +0 -1
- package/template/apps/core/public/logo.svg +0 -1
- package/template/apps/core/src/assets/react.svg +0 -1
- package/template/apps/core/src/main.tsx +0 -14
- package/template/apps/core/src/pages/index.tsx +0 -84
- package/template/apps/core/src/router.ts +0 -19
- package/template/apps/core/src/types/auto-imports.d.ts +0 -130
- package/template/apps/core/tsconfig.app.json +0 -7
- package/template/apps/core/tsconfig.json +0 -7
- package/template/apps/core/tsconfig.node.json +0 -7
- package/template/apps/core/vite.config.ts +0 -86
- package/template/eslint.config.js +0 -23
- package/template/packages/sdk/.swcrc +0 -18
- package/template/packages/sdk/package-lock.json +0 -1621
- package/template/packages/sdk/package.json +0 -32
- package/template/packages/sdk/src/build/index.ts +0 -33
- package/template/packages/sdk/src/build/plugins/auto-import.ts +0 -47
- package/template/packages/sdk/src/build/plugins/bundle-analyzer.ts +0 -35
- package/template/packages/sdk/src/build/plugins/remove-console.ts +0 -21
- package/template/packages/sdk/src/build/plugins/unocss.ts +0 -113
- package/template/packages/sdk/src/build/plugins/unplugin-icon.ts +0 -43
- package/template/packages/sdk/src/index.ts +0 -1
- package/template/packages/sdk/src/request/index.ts +0 -341
- package/template/packages/sdk/src/styles/reset.css +0 -111
- package/template/packages/sdk/tsconfig.json +0 -16
- package/template/pnpm-lock.yaml +0 -8055
- package/template/pnpm-workspace.yaml +0 -3
- package/template/turbo.json +0 -17
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/* Reset CSS - 常用的样式重置 */
|
|
2
|
-
|
|
3
|
-
/* 使用更直观的盒模型 */
|
|
4
|
-
*,
|
|
5
|
-
*::before,
|
|
6
|
-
*::after {
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* 移除默认的 margin 和 padding */
|
|
11
|
-
* {
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* 设置根元素字体大小和行高 */
|
|
17
|
-
html {
|
|
18
|
-
font-size: 16px;
|
|
19
|
-
line-height: 1.5;
|
|
20
|
-
-webkit-text-size-adjust: 100%;
|
|
21
|
-
-moz-text-size-adjust: 100%;
|
|
22
|
-
text-size-adjust: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* 设置 body 样式 */
|
|
26
|
-
body {
|
|
27
|
-
margin: 0;
|
|
28
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
29
|
-
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
30
|
-
sans-serif;
|
|
31
|
-
-webkit-font-smoothing: antialiased;
|
|
32
|
-
-moz-osx-font-smoothing: grayscale;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* 移除列表样式 */
|
|
36
|
-
ul,
|
|
37
|
-
ol {
|
|
38
|
-
list-style: none;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* 移除链接默认样式 */
|
|
42
|
-
a {
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
color: inherit;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* 移除按钮默认样式 */
|
|
48
|
-
button {
|
|
49
|
-
background: none;
|
|
50
|
-
border: none;
|
|
51
|
-
padding: 0;
|
|
52
|
-
font: inherit;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
outline: inherit;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* 移除输入框默认样式 */
|
|
58
|
-
input,
|
|
59
|
-
textarea,
|
|
60
|
-
select {
|
|
61
|
-
font: inherit;
|
|
62
|
-
border: none;
|
|
63
|
-
outline: none;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* 移除图片默认样式 */
|
|
67
|
-
img,
|
|
68
|
-
picture,
|
|
69
|
-
video,
|
|
70
|
-
canvas,
|
|
71
|
-
svg {
|
|
72
|
-
display: block;
|
|
73
|
-
max-width: 100%;
|
|
74
|
-
height: auto;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* 移除表格默认样式 */
|
|
78
|
-
table {
|
|
79
|
-
border-collapse: collapse;
|
|
80
|
-
border-spacing: 0;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/* 移除标题默认样式 */
|
|
84
|
-
h1,
|
|
85
|
-
h2,
|
|
86
|
-
h3,
|
|
87
|
-
h4,
|
|
88
|
-
h5,
|
|
89
|
-
h6 {
|
|
90
|
-
font-size: inherit;
|
|
91
|
-
font-weight: inherit;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* 移除段落默认样式 */
|
|
95
|
-
p {
|
|
96
|
-
margin: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/* 移除引用默认样式 */
|
|
100
|
-
blockquote,
|
|
101
|
-
q {
|
|
102
|
-
quotes: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
blockquote::before,
|
|
106
|
-
blockquote::after,
|
|
107
|
-
q::before,
|
|
108
|
-
q::after {
|
|
109
|
-
content: '';
|
|
110
|
-
content: none;
|
|
111
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"lib": ["ES2022", "DOM"],
|
|
6
|
-
"jsx": "react-jsx",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"types": ["react", "react-dom"],
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
|
-
"outDir": "dist"
|
|
14
|
-
},
|
|
15
|
-
"include": ["src"]
|
|
16
|
-
}
|