@4399ywkf/cli 1.0.9 → 2.0.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/dist/templates/app/.gitignore.tpl +5 -26
- package/dist/templates/app/config/env/.env.development +3 -5
- package/dist/templates/app/config/env/.env.production +1 -2
- package/dist/templates/app/config/env/.env.public.tpl +2 -12
- package/dist/templates/app/package.json.tpl +10 -103
- package/dist/templates/app/public/index.html +1 -19
- package/dist/templates/app/src/index.css +1 -2
- package/dist/templates/app/src/pages/$.tsx +19 -0
- package/dist/templates/app/src/pages/dashboard/analytics/page.tsx +16 -0
- package/dist/templates/app/src/pages/dashboard/layout.tsx +29 -0
- package/dist/templates/app/src/pages/dashboard/page.tsx +31 -0
- package/dist/templates/app/src/pages/error.tsx +20 -0
- package/dist/templates/app/src/pages/layout.tsx +36 -0
- package/dist/templates/app/src/pages/loading.tsx +9 -0
- package/dist/templates/app/src/pages/page.tsx +47 -0
- package/dist/templates/app/src/pages/user/[id]/page.tsx +28 -0
- package/dist/templates/app/src/pages/user/page.tsx +42 -0
- package/dist/templates/app/tsconfig.json +24 -35
- package/dist/templates/app/ywkf.config.ts +71 -0
- package/package.json +42 -22
- package/dist/templates/404/index.tsx +0 -5
- package/dist/templates/404/page.tsx +0 -27
- package/dist/templates/404.png +0 -0
- package/dist/templates/404.tsx +0 -5
- package/dist/templates/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/AppTheme.tsx +0 -136
- package/dist/templates/BaseLayout.tsx +0 -15
- package/dist/templates/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/ColorScales/index.md +0 -168
- package/dist/templates/ColorScales/index.tsx +0 -70
- package/dist/templates/ColorScales/style.ts +0 -42
- package/dist/templates/ConfigProvider/index.md +0 -63
- package/dist/templates/ConfigProvider/index.tsx +0 -42
- package/dist/templates/ContentFormWrapper.tsx +0 -11
- package/dist/templates/ContentWrapper.module.less +0 -137
- package/dist/templates/ContentWrapper.tsx +0 -13
- package/dist/templates/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/FontLoader/index.md +0 -12
- package/dist/templates/FontLoader/index.tsx +0 -41
- package/dist/templates/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/GlobalProvider/index.tsx +0 -23
- package/dist/templates/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/GlobalStyle/global.ts +0 -61
- package/dist/templates/GlobalStyle/index.ts +0 -10
- package/dist/templates/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/Loading/index.tsx +0 -21
- package/dist/templates/Locale.tsx +0 -84
- package/dist/templates/MainContentWrap.tsx +0 -64
- package/dist/templates/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/ManualSlave/index.ts +0 -1
- package/dist/templates/ManualSlavePage.module.less +0 -25
- package/dist/templates/ManualSlavePage.tsx +0 -45
- package/dist/templates/Meta.tsx +0 -75
- package/dist/templates/Query.tsx +0 -12
- package/dist/templates/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/RequireAuth/index.ts +0 -1
- package/dist/templates/RequireAuth.tsx +0 -76
- package/dist/templates/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/ScaleRow.tsx +0 -74
- package/dist/templates/StyleRegistry.tsx +0 -9
- package/dist/templates/ThemeContext.tsx +0 -135
- package/dist/templates/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/ThemeProvider/index.md +0 -69
- package/dist/templates/ThemeProvider/index.ts +0 -3
- package/dist/templates/ThemeProvider/type.ts +0 -28
- package/dist/templates/ThemeProvider.tsx +0 -109
- package/dist/templates/actions.ts +0 -23
- package/dist/templates/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/antdOverride.ts +0 -89
- package/dist/templates/antdTheme.ts +0 -62
- package/dist/templates/api.ts +0 -5
- package/dist/templates/app/.browserslistrc +0 -5
- package/dist/templates/app/.i18nrc.js +0 -57
- package/dist/templates/app/.nvmrc +0 -1
- package/dist/templates/app/.vscode/settings.json +0 -88
- package/dist/templates/app/config/jwt/index.ts +0 -31
- package/dist/templates/app/config/request/error-handler.ts +0 -67
- package/dist/templates/app/config/request/index.ts +0 -172
- package/dist/templates/app/config/request/interceptors.ts +0 -118
- package/dist/templates/app/config/request/token-manager.ts +0 -23
- package/dist/templates/app/config/request/types.ts +0 -63
- package/dist/templates/app/config/router/index.tsx +0 -26
- package/dist/templates/app/config/rspack/paths.js +0 -12
- package/dist/templates/app/config/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/app/config/rspack/rspack.config.mjs +0 -187
- package/dist/templates/app/config/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/app/config/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/app/docs/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/app/docs/glossary.md +0 -11
- package/dist/templates/app/locales/zh-CN/common.json +0 -3
- package/dist/templates/app/public/404.png +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/app/public/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/app/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/app/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/app/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/app/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/app/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/app/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/app/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/app/public/images/screenshot_background.webp +0 -0
- package/dist/templates/app/public/images/theme_auto.webp +0 -0
- package/dist/templates/app/public/images/theme_dark.webp +0 -0
- package/dist/templates/app/public/images/theme_light.webp +0 -0
- package/dist/templates/app/react-app-env.d.ts +0 -19
- package/dist/templates/app/scripts/convert-locales-to-json.js +0 -47
- package/dist/templates/app/scripts/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/app/scripts/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/app/scripts/i18nWorkflow/const.ts +0 -18
- package/dist/templates/app/scripts/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/app/scripts/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/app/scripts/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/app/scripts/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/app/scripts/i18nWorkflow/index.ts +0 -11
- package/dist/templates/app/scripts/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/app/scripts/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/app/src/bootstrap/index.ts +0 -34
- package/dist/templates/app/src/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/app/src/color/ColorScales/index.md +0 -168
- package/dist/templates/app/src/color/ColorScales/index.tsx +0 -70
- package/dist/templates/app/src/color/ColorScales/style.ts +0 -42
- package/dist/templates/app/src/color/colors/blue.ts +0 -66
- package/dist/templates/app/src/color/colors/cyan.ts +0 -66
- package/dist/templates/app/src/color/colors/geekblue.ts +0 -66
- package/dist/templates/app/src/color/colors/gold.ts +0 -66
- package/dist/templates/app/src/color/colors/gray.ts +0 -66
- package/dist/templates/app/src/color/colors/green.ts +0 -66
- package/dist/templates/app/src/color/colors/index.ts +0 -66
- package/dist/templates/app/src/color/colors/lime.ts +0 -66
- package/dist/templates/app/src/color/colors/magenta.ts +0 -66
- package/dist/templates/app/src/color/colors/orange.ts +0 -66
- package/dist/templates/app/src/color/colors/primary.ts +0 -66
- package/dist/templates/app/src/color/colors/purple.ts +0 -66
- package/dist/templates/app/src/color/colors/red.ts +0 -66
- package/dist/templates/app/src/color/colors/volcano.ts +0 -66
- package/dist/templates/app/src/color/colors/yellow.ts +0 -66
- package/dist/templates/app/src/color/index.ts +0 -4
- package/dist/templates/app/src/color/neutrals/index.ts +0 -30
- package/dist/templates/app/src/color/neutrals/mauve.ts +0 -66
- package/dist/templates/app/src/color/neutrals/olive.ts +0 -66
- package/dist/templates/app/src/color/neutrals/sage.ts +0 -66
- package/dist/templates/app/src/color/neutrals/sand.ts +0 -66
- package/dist/templates/app/src/color/neutrals/slate.ts +0 -66
- package/dist/templates/app/src/color/types.ts +0 -21
- package/dist/templates/app/src/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/app/src/components/ConfigProvider/index.md +0 -63
- package/dist/templates/app/src/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/app/src/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/app/src/components/FontLoader/index.md +0 -12
- package/dist/templates/app/src/components/FontLoader/index.tsx +0 -41
- package/dist/templates/app/src/components/Loading/index.tsx +0 -21
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/app/src/components/ManualSlave/index.ts +0 -1
- package/dist/templates/app/src/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/app/src/components/RequireAuth/index.ts +0 -1
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/app/src/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/app/src/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/app/src/components/ThemeProvider/index.md +0 -69
- package/dist/templates/app/src/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/app/src/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/app/src/config/env.ts +0 -84
- package/dist/templates/app/src/const/constants.ts +0 -0
- package/dist/templates/app/src/const/locale.ts +0 -9
- package/dist/templates/app/src/const/system.ts +0 -1
- package/dist/templates/app/src/const/theme.ts +0 -5
- package/dist/templates/app/src/const/url.ts +0 -1
- package/dist/templates/app/src/index.tsx +0 -15
- package/dist/templates/app/src/layout/BaseLayout.tsx +0 -15
- package/dist/templates/app/src/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/app/src/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/app/src/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/app/src/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/app/src/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/app/src/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/app/src/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/app/src/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/app/src/layout/Locale.tsx +0 -85
- package/dist/templates/app/src/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/app/src/layout/ThemeContext.tsx +0 -135
- package/dist/templates/app/src/locales/create.ts +0 -56
- package/dist/templates/app/src/locales/default/common.ts +0 -3
- package/dist/templates/app/src/locales/default/index.ts +0 -7
- package/dist/templates/app/src/locales/resources.ts +0 -104
- package/dist/templates/app/src/locales/utils.ts +0 -23
- package/dist/templates/app/src/micro/garfish.ts +0 -53
- package/dist/templates/app/src/pages/404/index.tsx +0 -5
- package/dist/templates/app/src/pages/404/page.tsx +0 -27
- package/dist/templates/app/src/pages/404.tsx +0 -5
- package/dist/templates/app/src/pages/base/index.tsx +0 -287
- package/dist/templates/app/src/pages/index.tsx +0 -5
- package/dist/templates/app/src/routes.tsx +0 -27
- package/dist/templates/app/src/styles/antdOverride.ts +0 -24
- package/dist/templates/app/src/styles/customTheme.ts +0 -70
- package/dist/templates/app/src/styles/global.ts +0 -53
- package/dist/templates/app/src/styles/highlighter.ts +0 -34
- package/dist/templates/app/src/styles/index.ts +0 -23
- package/dist/templates/app/src/styles/mermaid.ts +0 -7
- package/dist/templates/app/src/styles/text.ts +0 -10
- package/dist/templates/app/src/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/app/src/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/app/src/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/app/src/styles/theme/customStylish.ts +0 -189
- package/dist/templates/app/src/styles/theme/customToken.ts +0 -93
- package/dist/templates/app/src/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/app/src/styles/theme/token/base.ts +0 -16
- package/dist/templates/app/src/styles/theme/token/dark.ts +0 -60
- package/dist/templates/app/src/styles/theme/token/light.ts +0 -60
- package/dist/templates/app/src/types/customStylish.ts +0 -20
- package/dist/templates/app/src/types/customToken.ts +0 -70
- package/dist/templates/app/src/types/global.d.ts +0 -19
- package/dist/templates/app/src/types/index.ts +0 -21
- package/dist/templates/app/src/types/routes.ts +0 -70
- package/dist/templates/app/src/utils/convert.ts +0 -40
- package/dist/templates/app/src/utils/cookie.ts +0 -25
- package/dist/templates/app/src/utils/copyToClipboard.ts +0 -13
- package/dist/templates/app/src/utils/difference.ts +0 -26
- package/dist/templates/app/src/utils/genCdnUrl.ts +0 -30
- package/dist/templates/app/src/utils/index.ts +0 -3
- package/dist/templates/app/src/utils/locale.ts +0 -46
- package/dist/templates/app/store/middleware/createDevtools.ts +0 -23
- package/dist/templates/app/store/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/app/store/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/app/store/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/app/store/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/app/store/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/app/store/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/app/store/types.ts +0 -83
- package/dist/templates/app/store/user/index.tsx +0 -1
- package/dist/templates/app/store/user/indexApi.tsx +0 -5
- package/dist/templates/app/store/user/initialState.ts +0 -15
- package/dist/templates/app/store/user/slices/profile/actions.ts +0 -20
- package/dist/templates/app/store/user/slices/profile/api.ts +0 -5
- package/dist/templates/app/store/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/app/store/user/slices/settings/actions.ts +0 -23
- package/dist/templates/app/store/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/app/store/user/store.ts +0 -39
- package/dist/templates/app/tailwind.config.js +0 -13
- package/dist/templates/app//347/277/273/350/257/221.md +0 -9
- package/dist/templates/banner_market_modal.webp +0 -0
- package/dist/templates/base/index.tsx +0 -287
- package/dist/templates/base.ts +0 -16
- package/dist/templates/blue.ts +0 -66
- package/dist/templates/bootstrap/index.ts +0 -34
- package/dist/templates/chatmode_chat_dark.webp +0 -0
- package/dist/templates/chatmode_chat_light.webp +0 -0
- package/dist/templates/chatmode_docs_dark.webp +0 -0
- package/dist/templates/chatmode_docs_light.webp +0 -0
- package/dist/templates/cleanUnusedKeys.ts +0 -344
- package/dist/templates/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/color/ColorScales/index.md +0 -168
- package/dist/templates/color/ColorScales/index.tsx +0 -70
- package/dist/templates/color/ColorScales/style.ts +0 -42
- package/dist/templates/color/colors/blue.ts +0 -66
- package/dist/templates/color/colors/cyan.ts +0 -66
- package/dist/templates/color/colors/geekblue.ts +0 -66
- package/dist/templates/color/colors/gold.ts +0 -66
- package/dist/templates/color/colors/gray.ts +0 -66
- package/dist/templates/color/colors/green.ts +0 -66
- package/dist/templates/color/colors/index.ts +0 -66
- package/dist/templates/color/colors/lime.ts +0 -66
- package/dist/templates/color/colors/magenta.ts +0 -66
- package/dist/templates/color/colors/orange.ts +0 -66
- package/dist/templates/color/colors/primary.ts +0 -66
- package/dist/templates/color/colors/purple.ts +0 -66
- package/dist/templates/color/colors/red.ts +0 -66
- package/dist/templates/color/colors/volcano.ts +0 -66
- package/dist/templates/color/colors/yellow.ts +0 -66
- package/dist/templates/color/index.ts +0 -4
- package/dist/templates/color/neutrals/index.ts +0 -30
- package/dist/templates/color/neutrals/mauve.ts +0 -66
- package/dist/templates/color/neutrals/olive.ts +0 -66
- package/dist/templates/color/neutrals/sage.ts +0 -66
- package/dist/templates/color/neutrals/sand.ts +0 -66
- package/dist/templates/color/neutrals/slate.ts +0 -66
- package/dist/templates/color/types.ts +0 -21
- package/dist/templates/colors/blue.ts +0 -66
- package/dist/templates/colors/cyan.ts +0 -66
- package/dist/templates/colors/geekblue.ts +0 -66
- package/dist/templates/colors/gold.ts +0 -66
- package/dist/templates/colors/gray.ts +0 -66
- package/dist/templates/colors/green.ts +0 -66
- package/dist/templates/colors/index.ts +0 -66
- package/dist/templates/colors/lime.ts +0 -66
- package/dist/templates/colors/magenta.ts +0 -66
- package/dist/templates/colors/orange.ts +0 -66
- package/dist/templates/colors/primary.ts +0 -66
- package/dist/templates/colors/purple.ts +0 -66
- package/dist/templates/colors/red.ts +0 -66
- package/dist/templates/colors/volcano.ts +0 -66
- package/dist/templates/colors/yellow.ts +0 -66
- package/dist/templates/common.json +0 -3
- package/dist/templates/common.ts +0 -3
- package/dist/templates/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/components/ConfigProvider/index.md +0 -63
- package/dist/templates/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/components/FontLoader/index.md +0 -12
- package/dist/templates/components/FontLoader/index.tsx +0 -41
- package/dist/templates/components/Loading/index.tsx +0 -21
- package/dist/templates/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/components/ManualSlave/index.ts +0 -1
- package/dist/templates/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/components/RequireAuth/index.ts +0 -1
- package/dist/templates/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/components/ThemeProvider/index.md +0 -69
- package/dist/templates/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/config/env/.env.development +0 -5
- package/dist/templates/config/env/.env.production +0 -2
- package/dist/templates/config/env/.env.public.tpl +0 -14
- package/dist/templates/config/env.ts +0 -84
- package/dist/templates/config/jwt/index.ts +0 -31
- package/dist/templates/config/request/error-handler.ts +0 -67
- package/dist/templates/config/request/index.ts +0 -172
- package/dist/templates/config/request/interceptors.ts +0 -118
- package/dist/templates/config/request/token-manager.ts +0 -23
- package/dist/templates/config/request/types.ts +0 -63
- package/dist/templates/config/router/index.tsx +0 -26
- package/dist/templates/config/rspack/paths.js +0 -12
- package/dist/templates/config/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/config/rspack/rspack.config.mjs +0 -187
- package/dist/templates/config/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/config/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/const/constants.ts +0 -0
- package/dist/templates/const/locale.ts +0 -9
- package/dist/templates/const/system.ts +0 -1
- package/dist/templates/const/theme.ts +0 -5
- package/dist/templates/const/url.ts +0 -1
- package/dist/templates/const.ts +0 -18
- package/dist/templates/constants.ts +0 -0
- package/dist/templates/convert-locales-to-json.js +0 -47
- package/dist/templates/convert.ts +0 -40
- package/dist/templates/cookie.ts +0 -25
- package/dist/templates/copyToClipboard.ts +0 -13
- package/dist/templates/create.ts +0 -56
- package/dist/templates/createDevtools.ts +0 -23
- package/dist/templates/createHyperStorage/index.ts +0 -127
- package/dist/templates/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/createHyperStorage/type.ts +0 -27
- package/dist/templates/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/customStylish.ts +0 -189
- package/dist/templates/customTheme.ts +0 -70
- package/dist/templates/customToken.ts +0 -93
- package/dist/templates/cyan.ts +0 -66
- package/dist/templates/dark.ts +0 -60
- package/dist/templates/darkAlgorithm.ts +0 -47
- package/dist/templates/default/common.ts +0 -3
- package/dist/templates/default/index.ts +0 -7
- package/dist/templates/difference.ts +0 -26
- package/dist/templates/docs/DIRECTORY_STRUCTURE.md +0 -141
- package/dist/templates/docs/glossary.md +0 -11
- package/dist/templates/empty_topic_dark.webp +0 -0
- package/dist/templates/empty_topic_light.webp +0 -0
- package/dist/templates/env/.env.development +0 -5
- package/dist/templates/env/.env.production +0 -2
- package/dist/templates/env/.env.public.tpl +0 -14
- package/dist/templates/env.ts +0 -84
- package/dist/templates/error-handler.ts +0 -67
- package/dist/templates/favicon.ico +0 -0
- package/dist/templates/flattenLocaleKeys.ts +0 -139
- package/dist/templates/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/garfish.ts +0 -53
- package/dist/templates/geekblue.ts +0 -66
- package/dist/templates/genCdnUrl.ts +0 -30
- package/dist/templates/genDefaultLocale.ts +0 -19
- package/dist/templates/genDiff.ts +0 -49
- package/dist/templates/generateColorPalette.ts +0 -59
- package/dist/templates/global.d.ts +0 -19
- package/dist/templates/global.ts +0 -61
- package/dist/templates/glossary.md +0 -11
- package/dist/templates/gold.ts +0 -66
- package/dist/templates/gray.ts +0 -66
- package/dist/templates/green.ts +0 -66
- package/dist/templates/highlighter.ts +0 -34
- package/dist/templates/i18nConfig.ts +0 -7
- package/dist/templates/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/i18nWorkflow/const.ts +0 -18
- package/dist/templates/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/i18nWorkflow/index.ts +0 -11
- package/dist/templates/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/images/banner_market_modal.webp +0 -0
- package/dist/templates/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/images/empty_topic_dark.webp +0 -0
- package/dist/templates/images/empty_topic_light.webp +0 -0
- package/dist/templates/images/screenshot_background.webp +0 -0
- package/dist/templates/images/theme_auto.webp +0 -0
- package/dist/templates/images/theme_dark.webp +0 -0
- package/dist/templates/images/theme_light.webp +0 -0
- package/dist/templates/index.css +0 -2
- package/dist/templates/index.html +0 -29
- package/dist/templates/index.md +0 -69
- package/dist/templates/index.ts +0 -10
- package/dist/templates/index.tsx +0 -287
- package/dist/templates/indexApi.tsx +0 -5
- package/dist/templates/indexedDB.ts +0 -31
- package/dist/templates/initialState.ts +0 -32
- package/dist/templates/interceptors.ts +0 -118
- package/dist/templates/jwt/index.ts +0 -31
- package/dist/templates/keyMapper.ts +0 -57
- package/dist/templates/layout/BaseLayout.tsx +0 -15
- package/dist/templates/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/layout/Locale.tsx +0 -85
- package/dist/templates/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/layout/ThemeContext.tsx +0 -135
- package/dist/templates/light.ts +0 -60
- package/dist/templates/lightAlgorithm.ts +0 -44
- package/dist/templates/lime.ts +0 -66
- package/dist/templates/localStorage.ts +0 -23
- package/dist/templates/locale.ts +0 -46
- package/dist/templates/locales/create.ts +0 -56
- package/dist/templates/locales/default/common.ts +0 -3
- package/dist/templates/locales/default/index.ts +0 -7
- package/dist/templates/locales/resources.ts +0 -104
- package/dist/templates/locales/utils.ts +0 -23
- package/dist/templates/locales/zh-CN/common.json +0 -3
- package/dist/templates/magenta.ts +0 -66
- package/dist/templates/mauve.ts +0 -66
- package/dist/templates/mermaid.ts +0 -7
- package/dist/templates/micro/garfish.ts +0 -53
- package/dist/templates/middleware/createDevtools.ts +0 -23
- package/dist/templates/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/neutrals/index.ts +0 -30
- package/dist/templates/neutrals/mauve.ts +0 -66
- package/dist/templates/neutrals/olive.ts +0 -66
- package/dist/templates/neutrals/sage.ts +0 -66
- package/dist/templates/neutrals/sand.ts +0 -66
- package/dist/templates/neutrals/slate.ts +0 -66
- package/dist/templates/olive.ts +0 -66
- package/dist/templates/orange.ts +0 -66
- package/dist/templates/package.json.tpl +0 -128
- package/dist/templates/page.tsx +0 -27
- package/dist/templates/pages/404/index.tsx +0 -5
- package/dist/templates/pages/404/page.tsx +0 -27
- package/dist/templates/pages/404.tsx +0 -5
- package/dist/templates/pages/base/index.tsx +0 -287
- package/dist/templates/pages/index.tsx +0 -5
- package/dist/templates/paths.js +0 -12
- package/dist/templates/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/postcss.config.js +0 -6
- package/dist/templates/primary.ts +0 -66
- package/dist/templates/profile/actions.ts +0 -20
- package/dist/templates/profile/api.ts +0 -5
- package/dist/templates/profile/initialState.ts +0 -14
- package/dist/templates/protectedPatterns.ts +0 -91
- package/dist/templates/public/404.png +0 -0
- package/dist/templates/public/favicon.ico +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Bold.woff2 +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Medium.woff2 +0 -0
- package/dist/templates/public/fonts/HarmonyOS_Sans_Regular.woff2 +0 -0
- package/dist/templates/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/public/images/screenshot_background.webp +0 -0
- package/dist/templates/public/images/theme_auto.webp +0 -0
- package/dist/templates/public/images/theme_dark.webp +0 -0
- package/dist/templates/public/images/theme_light.webp +0 -0
- package/dist/templates/public/index.html +0 -29
- package/dist/templates/purple.ts +0 -66
- package/dist/templates/react-app-env.d.ts +0 -19
- package/dist/templates/red.ts +0 -66
- package/dist/templates/request/error-handler.ts +0 -67
- package/dist/templates/request/index.ts +0 -172
- package/dist/templates/request/interceptors.ts +0 -118
- package/dist/templates/request/token-manager.ts +0 -23
- package/dist/templates/request/types.ts +0 -63
- package/dist/templates/resources.ts +0 -104
- package/dist/templates/router/index.tsx +0 -26
- package/dist/templates/routes.ts +0 -70
- package/dist/templates/routes.tsx +0 -27
- package/dist/templates/rspack/paths.js +0 -12
- package/dist/templates/rspack/plugins/RoutesConventionsRspackPlugin.js +0 -100
- package/dist/templates/rspack/rspack.config.mjs +0 -187
- package/dist/templates/rspack/rspack.dev.mjs +0 -219
- package/dist/templates/rspack/rspack.prod.mjs +0 -233
- package/dist/templates/rspack.config.mjs +0 -187
- package/dist/templates/rspack.dev.mjs +0 -219
- package/dist/templates/rspack.prod.mjs +0 -233
- package/dist/templates/sage.ts +0 -66
- package/dist/templates/sand.ts +0 -66
- package/dist/templates/screenshot_background.webp +0 -0
- package/dist/templates/scripts/convert-locales-to-json.js +0 -47
- package/dist/templates/scripts/i18nWorkflow/analyzeUnusedKeys.ts +0 -506
- package/dist/templates/scripts/i18nWorkflow/cleanUnusedKeys.ts +0 -344
- package/dist/templates/scripts/i18nWorkflow/const.ts +0 -18
- package/dist/templates/scripts/i18nWorkflow/flattenLocaleKeys.ts +0 -139
- package/dist/templates/scripts/i18nWorkflow/genDefaultLocale.ts +0 -19
- package/dist/templates/scripts/i18nWorkflow/genDiff.ts +0 -49
- package/dist/templates/scripts/i18nWorkflow/i18nConfig.ts +0 -7
- package/dist/templates/scripts/i18nWorkflow/index.ts +0 -11
- package/dist/templates/scripts/i18nWorkflow/protectedPatterns.ts +0 -91
- package/dist/templates/scripts/i18nWorkflow/utils.ts +0 -76
- package/dist/templates/settings/actions.ts +0 -23
- package/dist/templates/settings/initialState.ts +0 -32
- package/dist/templates/slate.ts +0 -66
- package/dist/templates/slices/profile/actions.ts +0 -20
- package/dist/templates/slices/profile/api.ts +0 -5
- package/dist/templates/slices/profile/initialState.ts +0 -14
- package/dist/templates/slices/settings/actions.ts +0 -23
- package/dist/templates/slices/settings/initialState.ts +0 -32
- package/dist/templates/src/bootstrap/index.ts +0 -34
- package/dist/templates/src/color/ColorScales/ScaleRow.tsx +0 -74
- package/dist/templates/src/color/ColorScales/index.md +0 -168
- package/dist/templates/src/color/ColorScales/index.tsx +0 -70
- package/dist/templates/src/color/ColorScales/style.ts +0 -42
- package/dist/templates/src/color/colors/blue.ts +0 -66
- package/dist/templates/src/color/colors/cyan.ts +0 -66
- package/dist/templates/src/color/colors/geekblue.ts +0 -66
- package/dist/templates/src/color/colors/gold.ts +0 -66
- package/dist/templates/src/color/colors/gray.ts +0 -66
- package/dist/templates/src/color/colors/green.ts +0 -66
- package/dist/templates/src/color/colors/index.ts +0 -66
- package/dist/templates/src/color/colors/lime.ts +0 -66
- package/dist/templates/src/color/colors/magenta.ts +0 -66
- package/dist/templates/src/color/colors/orange.ts +0 -66
- package/dist/templates/src/color/colors/primary.ts +0 -66
- package/dist/templates/src/color/colors/purple.ts +0 -66
- package/dist/templates/src/color/colors/red.ts +0 -66
- package/dist/templates/src/color/colors/volcano.ts +0 -66
- package/dist/templates/src/color/colors/yellow.ts +0 -66
- package/dist/templates/src/color/index.ts +0 -4
- package/dist/templates/src/color/neutrals/index.ts +0 -30
- package/dist/templates/src/color/neutrals/mauve.ts +0 -66
- package/dist/templates/src/color/neutrals/olive.ts +0 -66
- package/dist/templates/src/color/neutrals/sage.ts +0 -66
- package/dist/templates/src/color/neutrals/sand.ts +0 -66
- package/dist/templates/src/color/neutrals/slate.ts +0 -66
- package/dist/templates/src/color/types.ts +0 -21
- package/dist/templates/src/components/AntdStaticMethods/index.tsx +0 -20
- package/dist/templates/src/components/ConfigProvider/index.md +0 -63
- package/dist/templates/src/components/ConfigProvider/index.tsx +0 -42
- package/dist/templates/src/components/ErrorBoundary/index.tsx +0 -506
- package/dist/templates/src/components/FontLoader/index.md +0 -12
- package/dist/templates/src/components/FontLoader/index.tsx +0 -41
- package/dist/templates/src/components/Loading/index.tsx +0 -21
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.module.less +0 -25
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.tsx +0 -45
- package/dist/templates/src/components/ManualSlave/index.ts +0 -1
- package/dist/templates/src/components/RequireAuth/RequireAuth.tsx +0 -76
- package/dist/templates/src/components/RequireAuth/index.ts +0 -1
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +0 -89
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/global.ts +0 -61
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/index.ts +0 -10
- package/dist/templates/src/components/ThemeProvider/Meta.tsx +0 -75
- package/dist/templates/src/components/ThemeProvider/ThemeProvider.tsx +0 -109
- package/dist/templates/src/components/ThemeProvider/index.md +0 -69
- package/dist/templates/src/components/ThemeProvider/index.ts +0 -3
- package/dist/templates/src/components/ThemeProvider/type.ts +0 -28
- package/dist/templates/src/config/env.ts +0 -84
- package/dist/templates/src/const/constants.ts +0 -0
- package/dist/templates/src/const/locale.ts +0 -9
- package/dist/templates/src/const/system.ts +0 -1
- package/dist/templates/src/const/theme.ts +0 -5
- package/dist/templates/src/const/url.ts +0 -1
- package/dist/templates/src/index.css +0 -2
- package/dist/templates/src/index.tsx +0 -15
- package/dist/templates/src/layout/BaseLayout.tsx +0 -15
- package/dist/templates/src/layout/ContentFormWrapper.tsx +0 -11
- package/dist/templates/src/layout/ContentWrapper.module.less +0 -137
- package/dist/templates/src/layout/ContentWrapper.tsx +0 -13
- package/dist/templates/src/layout/GlobalProvider/AppTheme.tsx +0 -136
- package/dist/templates/src/layout/GlobalProvider/Locale.tsx +0 -84
- package/dist/templates/src/layout/GlobalProvider/Query.tsx +0 -12
- package/dist/templates/src/layout/GlobalProvider/StyleRegistry.tsx +0 -9
- package/dist/templates/src/layout/GlobalProvider/index.tsx +0 -23
- package/dist/templates/src/layout/Locale.tsx +0 -85
- package/dist/templates/src/layout/MainContentWrap.tsx +0 -64
- package/dist/templates/src/layout/ThemeContext.tsx +0 -135
- package/dist/templates/src/locales/create.ts +0 -56
- package/dist/templates/src/locales/default/common.ts +0 -3
- package/dist/templates/src/locales/default/index.ts +0 -7
- package/dist/templates/src/locales/resources.ts +0 -104
- package/dist/templates/src/locales/utils.ts +0 -23
- package/dist/templates/src/micro/garfish.ts +0 -53
- package/dist/templates/src/pages/404/index.tsx +0 -5
- package/dist/templates/src/pages/404/page.tsx +0 -27
- package/dist/templates/src/pages/404.tsx +0 -5
- package/dist/templates/src/pages/base/index.tsx +0 -287
- package/dist/templates/src/pages/index.tsx +0 -5
- package/dist/templates/src/routes.tsx +0 -27
- package/dist/templates/src/styles/antdOverride.ts +0 -24
- package/dist/templates/src/styles/customTheme.ts +0 -70
- package/dist/templates/src/styles/global.ts +0 -53
- package/dist/templates/src/styles/highlighter.ts +0 -34
- package/dist/templates/src/styles/index.ts +0 -23
- package/dist/templates/src/styles/mermaid.ts +0 -7
- package/dist/templates/src/styles/text.ts +0 -10
- package/dist/templates/src/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/src/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/src/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/src/styles/theme/customStylish.ts +0 -189
- package/dist/templates/src/styles/theme/customToken.ts +0 -93
- package/dist/templates/src/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/src/styles/theme/token/base.ts +0 -16
- package/dist/templates/src/styles/theme/token/dark.ts +0 -60
- package/dist/templates/src/styles/theme/token/light.ts +0 -60
- package/dist/templates/src/types/customStylish.ts +0 -20
- package/dist/templates/src/types/customToken.ts +0 -70
- package/dist/templates/src/types/global.d.ts +0 -19
- package/dist/templates/src/types/index.ts +0 -21
- package/dist/templates/src/types/routes.ts +0 -70
- package/dist/templates/src/utils/convert.ts +0 -40
- package/dist/templates/src/utils/cookie.ts +0 -25
- package/dist/templates/src/utils/copyToClipboard.ts +0 -13
- package/dist/templates/src/utils/difference.ts +0 -26
- package/dist/templates/src/utils/genCdnUrl.ts +0 -30
- package/dist/templates/src/utils/index.ts +0 -3
- package/dist/templates/src/utils/locale.ts +0 -46
- package/dist/templates/store/middleware/createDevtools.ts +0 -23
- package/dist/templates/store/middleware/createHyperStorage/index.ts +0 -127
- package/dist/templates/store/middleware/createHyperStorage/indexedDB.ts +0 -31
- package/dist/templates/store/middleware/createHyperStorage/keyMapper.ts +0 -57
- package/dist/templates/store/middleware/createHyperStorage/localStorage.ts +0 -23
- package/dist/templates/store/middleware/createHyperStorage/type.ts +0 -27
- package/dist/templates/store/middleware/createHyperStorage/urlStorage.ts +0 -85
- package/dist/templates/store/types.ts +0 -83
- package/dist/templates/store/user/index.tsx +0 -1
- package/dist/templates/store/user/indexApi.tsx +0 -5
- package/dist/templates/store/user/initialState.ts +0 -15
- package/dist/templates/store/user/slices/profile/actions.ts +0 -20
- package/dist/templates/store/user/slices/profile/api.ts +0 -5
- package/dist/templates/store/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/store/user/slices/settings/actions.ts +0 -23
- package/dist/templates/store/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/store/user/store.ts +0 -39
- package/dist/templates/store.ts +0 -39
- package/dist/templates/style.ts +0 -42
- package/dist/templates/styles/antdOverride.ts +0 -24
- package/dist/templates/styles/customTheme.ts +0 -70
- package/dist/templates/styles/global.ts +0 -53
- package/dist/templates/styles/highlighter.ts +0 -34
- package/dist/templates/styles/index.ts +0 -23
- package/dist/templates/styles/mermaid.ts +0 -7
- package/dist/templates/styles/text.ts +0 -10
- package/dist/templates/styles/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/styles/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/styles/theme/antdTheme.ts +0 -62
- package/dist/templates/styles/theme/customStylish.ts +0 -189
- package/dist/templates/styles/theme/customToken.ts +0 -93
- package/dist/templates/styles/theme/generateColorPalette.ts +0 -59
- package/dist/templates/styles/theme/token/base.ts +0 -16
- package/dist/templates/styles/theme/token/dark.ts +0 -60
- package/dist/templates/styles/theme/token/light.ts +0 -60
- package/dist/templates/system.ts +0 -1
- package/dist/templates/tailwind.config.js +0 -13
- package/dist/templates/text.ts +0 -10
- package/dist/templates/theme/algorithms/darkAlgorithm.ts +0 -47
- package/dist/templates/theme/algorithms/lightAlgorithm.ts +0 -44
- package/dist/templates/theme/antdTheme.ts +0 -62
- package/dist/templates/theme/customStylish.ts +0 -189
- package/dist/templates/theme/customToken.ts +0 -93
- package/dist/templates/theme/generateColorPalette.ts +0 -59
- package/dist/templates/theme/token/base.ts +0 -16
- package/dist/templates/theme/token/dark.ts +0 -60
- package/dist/templates/theme/token/light.ts +0 -60
- package/dist/templates/theme.ts +0 -5
- package/dist/templates/theme_auto.webp +0 -0
- package/dist/templates/theme_dark.webp +0 -0
- package/dist/templates/theme_light.webp +0 -0
- package/dist/templates/token/base.ts +0 -16
- package/dist/templates/token/dark.ts +0 -60
- package/dist/templates/token/light.ts +0 -60
- package/dist/templates/token-manager.ts +0 -23
- package/dist/templates/tsconfig.json +0 -43
- package/dist/templates/type.ts +0 -27
- package/dist/templates/types/customStylish.ts +0 -20
- package/dist/templates/types/customToken.ts +0 -70
- package/dist/templates/types/global.d.ts +0 -19
- package/dist/templates/types/index.ts +0 -21
- package/dist/templates/types/routes.ts +0 -70
- package/dist/templates/types.ts +0 -21
- package/dist/templates/url.ts +0 -1
- package/dist/templates/urlStorage.ts +0 -85
- package/dist/templates/user/index.tsx +0 -1
- package/dist/templates/user/indexApi.tsx +0 -5
- package/dist/templates/user/initialState.ts +0 -15
- package/dist/templates/user/slices/profile/actions.ts +0 -20
- package/dist/templates/user/slices/profile/api.ts +0 -5
- package/dist/templates/user/slices/profile/initialState.ts +0 -14
- package/dist/templates/user/slices/settings/actions.ts +0 -23
- package/dist/templates/user/slices/settings/initialState.ts +0 -32
- package/dist/templates/user/store.ts +0 -39
- package/dist/templates/utils/convert.ts +0 -40
- package/dist/templates/utils/cookie.ts +0 -25
- package/dist/templates/utils/copyToClipboard.ts +0 -13
- package/dist/templates/utils/difference.ts +0 -26
- package/dist/templates/utils/genCdnUrl.ts +0 -30
- package/dist/templates/utils/index.ts +0 -3
- package/dist/templates/utils/locale.ts +0 -46
- package/dist/templates/utils.ts +0 -23
- package/dist/templates/volcano.ts +0 -66
- package/dist/templates/yellow.ts +0 -66
- package/dist/templates/zh-CN/common.json +0 -3
- package/dist/templates//347/277/273/350/257/221.md +0 -9
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Space } from 'antd';
|
|
2
|
-
import React, { memo } from 'react';
|
|
3
|
-
import { Flexbox } from 'react-layout-kit';
|
|
4
|
-
|
|
5
|
-
import { ColorScaleItem } from '../types';
|
|
6
|
-
import ScaleRow from './ScaleRow';
|
|
7
|
-
import { useStyles } from './style';
|
|
8
|
-
|
|
9
|
-
export interface ColorScalesProps {
|
|
10
|
-
/**
|
|
11
|
-
* @description Index of the mid highlight color in the scale
|
|
12
|
-
*/
|
|
13
|
-
midHighLight: number;
|
|
14
|
-
/**
|
|
15
|
-
* @description Name of the color scale
|
|
16
|
-
*/
|
|
17
|
-
name: string;
|
|
18
|
-
/**
|
|
19
|
-
* @description Color scale item object
|
|
20
|
-
*/
|
|
21
|
-
scale: ColorScaleItem;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const ColorScales = memo<ColorScalesProps>(({ name, scale, midHighLight }) => {
|
|
25
|
-
const { styles } = useStyles();
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<Flexbox align={'center'} flex={1} horizontal justify={'center'}>
|
|
29
|
-
<div style={{ padding: '8px 16px 32px 0' }}>
|
|
30
|
-
<Space direction={'vertical'} size={2}>
|
|
31
|
-
<Space key="scale-title" size={2}>
|
|
32
|
-
<Flexbox align={'center'} className={styles.scaleRowTitle} horizontal key="scale-num" />
|
|
33
|
-
{Array.from({ length: scale.light.length })
|
|
34
|
-
.fill('')
|
|
35
|
-
.map((_, index) => {
|
|
36
|
-
if (index === 0 || index === 12) return false;
|
|
37
|
-
|
|
38
|
-
const isMidHighlight = midHighLight === index;
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className={styles.scaleBox} key={`num${index}`}>
|
|
42
|
-
<div className={styles.scaleBox}>
|
|
43
|
-
<Flexbox
|
|
44
|
-
align={'center'}
|
|
45
|
-
className={styles.scaleItem}
|
|
46
|
-
horizontal
|
|
47
|
-
justify={'center'}
|
|
48
|
-
style={{
|
|
49
|
-
fontWeight: isMidHighlight ? 700 : 400,
|
|
50
|
-
opacity: 0.5,
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
{index}
|
|
54
|
-
</Flexbox>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
);
|
|
58
|
-
})}
|
|
59
|
-
</Space>
|
|
60
|
-
<ScaleRow key="light" name={name} scale={scale.light} title="light" />
|
|
61
|
-
<ScaleRow key="lightA" name={name} scale={scale.lightA} title="lightA" />
|
|
62
|
-
<ScaleRow key="dark" name={name} scale={scale.dark} title="dark" />
|
|
63
|
-
<ScaleRow key="darkA" name={name} scale={scale.darkA} title="darkA" />
|
|
64
|
-
</Space>
|
|
65
|
-
</div>
|
|
66
|
-
</Flexbox>
|
|
67
|
-
);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
export default ColorScales;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { createStyles } from 'antd-style';
|
|
2
|
-
|
|
3
|
-
export const alphaBg = {
|
|
4
|
-
dark: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACPTkDJAAAAZUlEQVRIDe2VMQoAMAgDa9/g/1/oIzrpZBCh2dLFkkoDF0Fz99OdiOjks+2/7S8fRRmMMIVoRGSoYzvvqF8ZIMKlC1GhQBc6IkPzq32QmdAzkEGihpWOSPsAss8HegYySNSw0hE9WQ4StafZFqkAAAAASUVORK5CYII=) 0% 0% / 26px',
|
|
5
|
-
light:
|
|
6
|
-
'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAFpJREFUWAntljEKADAIA23p6v//qQ+wfUEcCu1yriEgp0FHRJSJcnehmmWm1Dv/lO4HIg1AAAKjTqm03ea88zMCCEDgO4HV5bS757f+7wRoAAIQ4B9gByAAgQ3pfiDmXmAeEwAAAABJRU5ErkJggg==) 0% 0% / 26px',
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const useStyles = createStyles(({ css, token }) => ({
|
|
10
|
-
scaleBox: css`
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
|
|
13
|
-
position: relative;
|
|
14
|
-
|
|
15
|
-
width: 48px;
|
|
16
|
-
height: 32px;
|
|
17
|
-
|
|
18
|
-
background-position:
|
|
19
|
-
0 0,
|
|
20
|
-
0 8px,
|
|
21
|
-
8px -8px,
|
|
22
|
-
-8px 0;
|
|
23
|
-
background-size: 16px 16px;
|
|
24
|
-
|
|
25
|
-
transition: scale 400ms ${token.motionEaseOut};
|
|
26
|
-
|
|
27
|
-
&:active {
|
|
28
|
-
scale: 0.8;
|
|
29
|
-
}
|
|
30
|
-
`,
|
|
31
|
-
scaleItem: css`
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
`,
|
|
35
|
-
scaleRowTitle: css`
|
|
36
|
-
width: 64px;
|
|
37
|
-
height: 32px;
|
|
38
|
-
`,
|
|
39
|
-
text: css`
|
|
40
|
-
opacity: 0.5;
|
|
41
|
-
`,
|
|
42
|
-
}));
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
nav: Components
|
|
3
|
-
group: Theme
|
|
4
|
-
title: ConfigProvider
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
ConfigProvider is a context provider component that allows you to configure global settings for other components in the library, such as CDN settings for external resources.
|
|
8
|
-
|
|
9
|
-
## Default
|
|
10
|
-
|
|
11
|
-
The `proxy` provides two CDN resolution addresses, `aliyun` and `unpkg`, with `aliyun` as the default. This can be configured through the `cdn` attribute of `ConfigProvider`.
|
|
12
|
-
|
|
13
|
-
<code src="./demos/index.tsx" nopadding></code>
|
|
14
|
-
|
|
15
|
-
## Custom CDN
|
|
16
|
-
|
|
17
|
-
At the same time, it provides custom CDN configuration, set `proxy` to `custom` and configure through the `customCdnFn` attribute.
|
|
18
|
-
|
|
19
|
-
```ts
|
|
20
|
-
import { ConfigProvider, Logo } from '@lobehub/ui';
|
|
21
|
-
|
|
22
|
-
export default () => {
|
|
23
|
-
return (
|
|
24
|
-
<ConfigProvider config={{
|
|
25
|
-
proxy: 'custom',
|
|
26
|
-
customCdnFn: (e: {pkg:string, version:string, path:string}) => `https://yourcdn/${pkg}/${version}/${path}`
|
|
27
|
-
}}>
|
|
28
|
-
<Logo />
|
|
29
|
-
</ConfigProvider>
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## APIs
|
|
35
|
-
|
|
36
|
-
### ConfigProvider
|
|
37
|
-
|
|
38
|
-
| Property | Description | Type | Default |
|
|
39
|
-
| -------- | -------------------- | ----------- | ------- |
|
|
40
|
-
| config | Configuration object | `Config` | - |
|
|
41
|
-
| children | Child components | `ReactNode` | - |
|
|
42
|
-
|
|
43
|
-
### Config
|
|
44
|
-
|
|
45
|
-
| Property | Description | Type | Default |
|
|
46
|
-
| -------------- | -------------------------------------------------------------- | ----------------------------------------------- | ------- |
|
|
47
|
-
| proxy | CDN proxy to use for external resources | `'jsdelivr' \| 'unpkg' \| 'aliyun' \| 'custom'` | - |
|
|
48
|
-
| customCdnFn | Custom function for generating CDN URLs when proxy is 'custom' | `CdnFn` | - |
|
|
49
|
-
| aAs | Custom component to use for rendering anchor tags | `ElementType` | - |
|
|
50
|
-
| imgAs | Custom component to use for rendering image tags | `ElementType` | - |
|
|
51
|
-
| imgUnoptimized | Whether to disable image optimization | `boolean` | - |
|
|
52
|
-
|
|
53
|
-
### CdnFn
|
|
54
|
-
|
|
55
|
-
```ts
|
|
56
|
-
type CdnFn = ({ pkg, version, path }: CdnApi) => string;
|
|
57
|
-
|
|
58
|
-
interface CdnApi {
|
|
59
|
-
pkg: string;
|
|
60
|
-
version: string;
|
|
61
|
-
path: string;
|
|
62
|
-
}
|
|
63
|
-
```
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
type ElementType,
|
|
3
|
-
type ReactNode,
|
|
4
|
-
createContext,
|
|
5
|
-
memo,
|
|
6
|
-
use,
|
|
7
|
-
} from 'react';
|
|
8
|
-
|
|
9
|
-
import { type CDN, type CdnApi, genCdnUrl } from '@/utils/genCdnUrl';
|
|
10
|
-
|
|
11
|
-
export interface Config {
|
|
12
|
-
aAs?: ElementType;
|
|
13
|
-
customCdnFn?: CdnFn;
|
|
14
|
-
imgAs?: ElementType;
|
|
15
|
-
imgUnoptimized?: boolean;
|
|
16
|
-
proxy?: CDN | 'custom';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const ConfigContext = createContext<Config | null>(null);
|
|
20
|
-
|
|
21
|
-
const ConfigProvider = memo<{ children: ReactNode; config: Config }>(
|
|
22
|
-
({ children, config }) => {
|
|
23
|
-
return <ConfigContext value={config}>{children}</ConfigContext>;
|
|
24
|
-
},
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
// useCdnFn
|
|
28
|
-
export type CdnFn = ({ pkg, version, path }: CdnApi) => string;
|
|
29
|
-
|
|
30
|
-
const cdnFallback: CdnFn = ({ pkg, version, path }) =>
|
|
31
|
-
genCdnUrl({ path, pkg, proxy: 'aliyun', version });
|
|
32
|
-
|
|
33
|
-
export const useCdnFn = (): CdnFn => {
|
|
34
|
-
const config = use(ConfigContext);
|
|
35
|
-
if (!config) return cdnFallback;
|
|
36
|
-
if (config?.proxy !== 'custom')
|
|
37
|
-
return ({ pkg, version, path }) =>
|
|
38
|
-
genCdnUrl({ path, pkg, proxy: config.proxy as any, version });
|
|
39
|
-
return config?.customCdnFn || cdnFallback;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default ConfigProvider;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import styles from './ContentWrapper.module.less';
|
|
4
|
-
|
|
5
|
-
export const ContentFormWrapper = ({ children }: { children: ReactNode }) => (
|
|
6
|
-
<div
|
|
7
|
-
className={`${styles['content-wrapper']} ${styles['content-wrapper-form-container']}`}
|
|
8
|
-
>
|
|
9
|
-
{children}
|
|
10
|
-
</div>
|
|
11
|
-
);
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
.content_wrapper {
|
|
2
|
-
height: calc(100% - 49px);
|
|
3
|
-
overflow-y: auto;
|
|
4
|
-
position: relative;
|
|
5
|
-
width: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.content-wrapper {
|
|
9
|
-
position: relative;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.content-wrapper-form-container {
|
|
13
|
-
background: #fff;
|
|
14
|
-
height: calc(100vh - 112px);
|
|
15
|
-
overflow: auto;
|
|
16
|
-
position: relative;
|
|
17
|
-
width: 100%;
|
|
18
|
-
|
|
19
|
-
.content-wrapper-form {
|
|
20
|
-
margin-top: 20px;
|
|
21
|
-
max-width: 1200px;
|
|
22
|
-
margin-left: auto;
|
|
23
|
-
margin-right: auto;
|
|
24
|
-
padding-left: 20px;
|
|
25
|
-
padding-right: 20px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.form-footer-layout {
|
|
29
|
-
position: relative;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.content-wrapper-list {
|
|
34
|
-
background-color: var(--contexify-menu-bgColor);
|
|
35
|
-
border-radius: var(--border-radius-medium);
|
|
36
|
-
margin: 20px;
|
|
37
|
-
min-height: calc(100% - 40px);
|
|
38
|
-
padding: 0 12px;
|
|
39
|
-
|
|
40
|
-
.content-wrapper-content {
|
|
41
|
-
margin-top: 20px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.content-wrapper-title {
|
|
45
|
-
align-items: center;
|
|
46
|
-
color: #020814;
|
|
47
|
-
display: flex;
|
|
48
|
-
font-size: 18px;
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
line-height: 26px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.content-wrapper-headerBox {
|
|
55
|
-
align-items: center;
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
|
|
59
|
-
&>span:last-child {
|
|
60
|
-
margin-right: 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
:global {
|
|
65
|
-
.richTableTitle {
|
|
66
|
-
padding-left: 0 !important;
|
|
67
|
-
padding-right: 0 !important;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.content-wrapper-create_header {
|
|
72
|
-
background: #fff;
|
|
73
|
-
height: var(--container--form--layout--header-height);
|
|
74
|
-
width: 100%;
|
|
75
|
-
|
|
76
|
-
.content-wrapper-header-table {
|
|
77
|
-
max-width: 100% !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.content-wrapper-header {
|
|
81
|
-
border-bottom: 1px solid #eaedf1;
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
height: var(--container--form--layout--header-height);
|
|
85
|
-
line-height: var(--container--form--layout--header-height);
|
|
86
|
-
margin: 0 auto;
|
|
87
|
-
max-width: 1200px;
|
|
88
|
-
|
|
89
|
-
.content-wrapper-back_wrapper {
|
|
90
|
-
align-items: center;
|
|
91
|
-
display: flex;
|
|
92
|
-
width: auto;
|
|
93
|
-
|
|
94
|
-
.content-wrapper-icon_wrapper {
|
|
95
|
-
align-items: center;
|
|
96
|
-
border-radius: 4px;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
display: flex;
|
|
99
|
-
height: 20px;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
line-height: 20px;
|
|
102
|
-
transition: background 0.3s;
|
|
103
|
-
width: 20px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.content-wrapper-title {
|
|
107
|
-
color: #020814;
|
|
108
|
-
font-size: 18px;
|
|
109
|
-
font-weight: 500;
|
|
110
|
-
line-height: 26px;
|
|
111
|
-
margin-left: 4px;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.form-wrapper-footer_wrapper {
|
|
118
|
-
background: #fff;
|
|
119
|
-
border-top: 1px solid #e5e6eb;
|
|
120
|
-
bottom: 0;
|
|
121
|
-
height: 64px;
|
|
122
|
-
position: fixed;
|
|
123
|
-
width: 100%;
|
|
124
|
-
z-index: 100;
|
|
125
|
-
|
|
126
|
-
.form-wrapper-footer {
|
|
127
|
-
align-items: center;
|
|
128
|
-
display: flex;
|
|
129
|
-
height: 100%;
|
|
130
|
-
justify-content: flex-start;
|
|
131
|
-
margin: 0 auto;
|
|
132
|
-
max-width: 100vw;
|
|
133
|
-
padding: 0 20px;
|
|
134
|
-
width: 100%;
|
|
135
|
-
gap: 8px;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
import styles from './ContentWrapper.module.less';
|
|
4
|
-
|
|
5
|
-
export const ContentWrapper = ({ children }: { children: ReactNode }) => (
|
|
6
|
-
<div className={styles.content_wrapper}>
|
|
7
|
-
<div
|
|
8
|
-
className={`${styles['content-wrapper']} ${styles['content-wrapper-list']}`}
|
|
9
|
-
>
|
|
10
|
-
{children}
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
);
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# 企业脚手架目录规划说明
|
|
2
|
-
|
|
3
|
-
## 1. 现状概览
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
app/
|
|
7
|
-
├── config/ # 构建 + 运行时配置混放
|
|
8
|
-
│ ├── env/ # 环境变量文件
|
|
9
|
-
│ ├── jwt/ # 运行时
|
|
10
|
-
│ ├── request/ # 运行时
|
|
11
|
-
│ ├── router/ # 渲染入口(renderClient)
|
|
12
|
-
│ └── rspack/ # 构建
|
|
13
|
-
├── locales/ # 文案 JSON(与 src/locales 双源)
|
|
14
|
-
├── public/
|
|
15
|
-
├── scripts/
|
|
16
|
-
├── src/
|
|
17
|
-
│ ├── bootstrap/
|
|
18
|
-
│ ├── color/ # 设计 token 色板
|
|
19
|
-
│ ├── components/
|
|
20
|
-
│ ├── config/ # 仅 env.ts(与根 config 易混淆)
|
|
21
|
-
│ ├── const/
|
|
22
|
-
│ ├── layout/
|
|
23
|
-
│ ├── locales/ # i18n 逻辑 + TS 文案
|
|
24
|
-
│ ├── micro/
|
|
25
|
-
│ ├── pages/
|
|
26
|
-
│ ├── routes.tsx
|
|
27
|
-
│ ├── styles/ # 全局样式 + theme 算法
|
|
28
|
-
│ ├── types/
|
|
29
|
-
│ └── utils/
|
|
30
|
-
└── store/ # 与 src 平级
|
|
31
|
-
├── middleware/
|
|
32
|
-
└── user/
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## 2. 结论:整体可用,有几处需约定或收敛
|
|
38
|
-
|
|
39
|
-
- **做得好的**:`store` 独立、按 agent/slice 拆分;`pages` + `layout` + `components` 分层清晰;构建配置集中在 `config/rspack`、环境变量在 `config/env`,便于维护。
|
|
40
|
-
- **需要约定的**:根目录 `config` 与 `src/config` 的职责边界、`locales` 双源、`color`/`styles`/`theme` 的归属。
|
|
41
|
-
- **可优化项**:收敛「配置与文案」的入口、统一命名(如 `const` vs `constants`)、可选能力(如 `micro`)在文档中说明。
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## 3. 问题与建议
|
|
46
|
-
|
|
47
|
-
### 3.1 config 双位置(根 config vs src/config)
|
|
48
|
-
|
|
49
|
-
| 位置 | 内容 | 问题 |
|
|
50
|
-
|------------|----------------|------------------------------|
|
|
51
|
-
| 根 `config/` | env 文件、rspack、request、jwt、router | 构建与运行时混在同一层 |
|
|
52
|
-
| `src/config/` | 仅 `env.ts`(zod 解析) | 新人易困惑「改 env 改哪边」 |
|
|
53
|
-
|
|
54
|
-
**建议(二选一或折中):**
|
|
55
|
-
|
|
56
|
-
- **方案 A(推荐)**:约定「根 `config/` = 仅构建与环境文件」:只放 `env/`、`rspack/`;把 `request/`、`jwt/`、`router/` 迁到 `src/config/`(或 `src/core/`),alias 保持 `@config` 指向 `src/config`,构建配置单独用 `config/rspack` 路径。这样「构建配置在根 config,运行时配置在 src」边界清晰。
|
|
57
|
-
- **方案 B**:维持现状,在 README 中明确写清:「环境变量与构建用根 `config/`,运行时解析用 `src/config/env.ts`;请求/路由等由根 `config/` 的模块提供」,减少误改。
|
|
58
|
-
|
|
59
|
-
### 3.2 locales 双源(根 locales vs src/locales)
|
|
60
|
-
|
|
61
|
-
- 根 `locales/zh-CN/common.json` 与 `src/locales/default/common.ts` 内容重复,且有脚本把 TS 转 JSON。
|
|
62
|
-
- **建议**:选单一数据源。若以 i18n 代码为主,保留 `src/locales`,删除根 `locales/` 和转换脚本,构建或运行时从 `src/locales` 生成/加载;若以 JSON 为主,则只保留根 `locales/`,在 README 中说明「文案只放根 locales」。
|
|
63
|
-
|
|
64
|
-
### 3.3 store 与 src 平级
|
|
65
|
-
|
|
66
|
-
- `store/` 在项目根与 `src/` 平级,符合「状态与 UI 分离」的常见企业习惯;alias `@store` 指向根下 `store` 也合理。
|
|
67
|
-
- **建议**:保持现状;在 README 或本说明中写一句:「业务 UI 在 `src/`,领域状态在 `store/`,按 agent/slice 拆分」,避免被误挪进 `src`。
|
|
68
|
-
|
|
69
|
-
### 3.4 src 内部:color / styles / theme
|
|
70
|
-
|
|
71
|
-
- `color/`:色板与 token 数据;`styles/`:全局样式、antd 覆盖、**theme 算法与 customToken**;`types/` 中还有 `customStylish`、`customToken`。
|
|
72
|
-
- 问题:主题相关分散在 `color`、`styles/theme`、`styles`、`types`,新人找「改主题」入口不直观。
|
|
73
|
-
- **建议**:
|
|
74
|
-
- 要么保留 `color/` 但在 README 标明「设计 token 与色板,被 `styles/theme` 消费」;
|
|
75
|
-
- 要么将 `color/` 收进 `styles/theme/`(如 `styles/theme/color/`),入口统一为 `styles/theme`,减少顶层目录。
|
|
76
|
-
- 不强求一步到位,但需在文档中画一条线:**主题与 token 的入口是 `src/styles/theme`(及可选 `src/color`)**。
|
|
77
|
-
|
|
78
|
-
### 3.5 横切目录:const / types / utils
|
|
79
|
-
|
|
80
|
-
- `const/`、`types/`、`utils/` 是常见横切层,结构合理。
|
|
81
|
-
- 小问题:`const/constants.ts` 当前为空;`types` 里既有全局类型又有与 theme 强相关的类型。
|
|
82
|
-
- **建议**:`const` 保留,删除或补全 `constants.ts`,避免空文件;在 README 或本说明中约定「全局业务常量放 `const/`,组件/页面私有常量随模块」。`types` 可注明「与 theme/样式强相关的类型与 `styles/theme` 同目录或在本目录集中维护」,二选一即可。
|
|
83
|
-
|
|
84
|
-
### 3.6 可选能力:micro、bootstrap
|
|
85
|
-
|
|
86
|
-
- `micro/` 仅 Garfish,已作为可选项;`bootstrap/` 仅应用启动逻辑。
|
|
87
|
-
- **建议**:保持 `micro/` 在 `src` 下,README 中说明「微前端为可选项,入口与配置见 xxx」。`bootstrap/` 可保留;若希望根入口更短,可把 `bootstrapWithEnv()` 的实现迁到 `src/index.tsx` 或 `src/config/bootstrap.ts`,只保留单文件也可。
|
|
88
|
-
|
|
89
|
-
### 3.7 pages 与路由
|
|
90
|
-
|
|
91
|
-
- `pages/` 下有 404、base、index 等;路由定义在 `src/routes.tsx`,渲染入口在 `config/router/index.tsx`。
|
|
92
|
-
- **建议**:约定「路由表仅由 `src/routes.tsx` 维护;`config/router` 只负责 `renderClient` 与挂载」,在 README 或本说明写清,避免在 `config/router` 里再配路由造成双源。
|
|
93
|
-
|
|
94
|
-
### 3.8 根目录与脚本
|
|
95
|
-
|
|
96
|
-
- 根目录的 `tsconfig`、`tailwind`、`postcss`、`scripts/` 等符合常规,无需调整。
|
|
97
|
-
- `scripts/` 若仅剩「locales 转 JSON」且已决定废弃根 `locales/`,可删除该脚本;否则保留并注明用途。
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## 4. 推荐约定(最小改动版)
|
|
102
|
-
|
|
103
|
-
在不做大范围迁移的前提下,建议先做「约定文档化 + 少量收敛」:
|
|
104
|
-
|
|
105
|
-
1. **配置**:在 README 中写清「根 `config/` = 构建与环境文件;运行时配置与请求/路由实现来自 `@config`(当前指向根 config,或你们改为 src/config)」。
|
|
106
|
-
2. **文案**:选定 locales 单一数据源(推荐 `src/locales`),删除或弃用另一侧及转换脚本。
|
|
107
|
-
3. **主题**:在 README 中标明「主题与 token 入口:`src/styles/theme`,色板数据见 `src/color`(可选)」。
|
|
108
|
-
4. **store**:说明「全局状态在根 `store/`,按 agent/slice 划分,与 `src` 并列」。
|
|
109
|
-
5. **路由**:说明「路由表只在 `src/routes.tsx` 维护;`config/router` 仅负责渲染与挂载」。
|
|
110
|
-
6. **空文件**:删除或补全 `src/const/constants.ts`。
|
|
111
|
-
|
|
112
|
-
若后续要做更大调整,再考虑:把 request/jwt/router 迁入 `src/config` 或 `src/core`、将 `color` 并入 `styles/theme` 等。
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
|
-
## 5. 可选:目标结构示意(供长期演进参考)
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
app/
|
|
120
|
-
├── config/ # 仅构建与环境
|
|
121
|
-
│ ├── env/
|
|
122
|
-
│ └── rspack/
|
|
123
|
-
├── public/
|
|
124
|
-
├── scripts/
|
|
125
|
-
├── src/
|
|
126
|
-
│ ├── config/ # 运行时:env 解析、request、router 挂载等
|
|
127
|
-
│ ├── core/ # 可选:bootstrap、微前端入口等
|
|
128
|
-
│ ├── layout/
|
|
129
|
-
│ ├── pages/
|
|
130
|
-
│ ├── components/
|
|
131
|
-
│ ├── styles/ # 全局样式 + theme(含 token/color 或引用)
|
|
132
|
-
│ ├── locales/ # 单一 i18n 数据源
|
|
133
|
-
│ ├── const/
|
|
134
|
-
│ ├── types/
|
|
135
|
-
│ ├── utils/
|
|
136
|
-
│ ├── routes.tsx
|
|
137
|
-
│ └── index.tsx
|
|
138
|
-
└── store/
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
当前模板不必立刻改成上述结构,可先落实「约定 + 文档 + 删除冗余」,再按团队习惯逐步演进。
|