@4399ywkf/cli 0.0.21 → 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/dist/cli.js +19 -638
- package/dist/templates/404/index.tsx +5 -0
- package/dist/templates/404/page.tsx +27 -0
- package/dist/templates/404.png +0 -0
- package/dist/templates/404.tsx +5 -0
- package/dist/templates/BaseLayout.tsx +15 -0
- package/dist/templates/ColorScales/ScaleRow.tsx +74 -0
- package/dist/templates/ColorScales/index.md +168 -0
- package/dist/templates/ColorScales/index.tsx +70 -0
- package/dist/templates/ColorScales/style.ts +42 -0
- package/dist/templates/ConfigProvider/index.md +63 -0
- package/dist/templates/ConfigProvider/index.tsx +42 -0
- package/dist/templates/ContentFormWrapper.tsx +11 -0
- package/dist/templates/ContentWrapper.module.less +137 -0
- package/dist/templates/ContentWrapper.tsx +13 -0
- package/dist/templates/ErrorBoundary/index.tsx +506 -0
- package/dist/templates/FontLoader/index.md +12 -0
- package/dist/templates/FontLoader/index.tsx +41 -0
- package/dist/templates/GlobalStyle/antdOverride.ts +89 -0
- package/dist/templates/GlobalStyle/global.ts +61 -0
- package/dist/templates/GlobalStyle/index.ts +10 -0
- package/dist/templates/Loading/__tests__/Loading.test.tsx +23 -0
- package/dist/templates/Loading/index.tsx +21 -0
- package/dist/templates/Loading.test.tsx +23 -0
- package/dist/templates/Locale.tsx +89 -0
- package/dist/templates/MainContentWrap.tsx +68 -0
- package/dist/templates/ManualSlave/ManualSlavePage.module.less +25 -0
- package/dist/templates/ManualSlave/ManualSlavePage.tsx +45 -0
- package/dist/templates/ManualSlave/index.ts +1 -0
- package/dist/templates/ManualSlavePage.module.less +25 -0
- package/dist/templates/ManualSlavePage.tsx +45 -0
- package/dist/templates/Meta.tsx +75 -0
- package/dist/templates/RequireAuth/RequireAuth.tsx +76 -0
- package/dist/templates/RequireAuth/index.ts +1 -0
- package/dist/templates/RequireAuth.tsx +76 -0
- package/dist/templates/RoutesConventionsRspackPlugin.js +100 -0
- package/dist/templates/ScaleRow.tsx +74 -0
- package/dist/templates/ThemeContext.tsx +132 -0
- package/dist/templates/ThemeProvider/GlobalStyle/antdOverride.ts +89 -0
- package/dist/templates/ThemeProvider/GlobalStyle/global.ts +61 -0
- package/dist/templates/ThemeProvider/GlobalStyle/index.ts +10 -0
- package/dist/templates/ThemeProvider/Meta.tsx +75 -0
- package/dist/templates/ThemeProvider/ThemeProvider.tsx +109 -0
- package/dist/templates/ThemeProvider/index.md +69 -0
- package/dist/templates/ThemeProvider/index.ts +3 -0
- package/dist/templates/ThemeProvider/type.ts +28 -0
- package/dist/templates/ThemeProvider.tsx +109 -0
- package/dist/templates/__mocks__/fileMock.js +1 -0
- package/dist/templates/__mocks__/styleMock.ts +1 -0
- package/dist/templates/__tests__/Loading.test.tsx +23 -0
- package/dist/templates/__tests__/example.test.ts +7 -0
- package/dist/templates/actions.ts +23 -0
- package/dist/templates/algorithms/darkAlgorithm.ts +47 -0
- package/dist/templates/algorithms/lightAlgorithm.ts +44 -0
- package/dist/templates/antdOverride.ts +89 -0
- package/dist/templates/antdTheme.ts +62 -0
- package/dist/templates/api.ts +5 -0
- package/dist/templates/app/.browserslistrc +5 -0
- package/dist/templates/app/.gitignore.tpl +30 -0
- package/dist/templates/app/.npmrc.tpl +2 -0
- package/dist/templates/app/.nvmrc +1 -0
- package/dist/templates/app/.vscode/settings.json +88 -0
- package/dist/templates/app/config/env/.env.development +5 -0
- package/dist/templates/app/config/env/.env.production +2 -0
- package/dist/templates/app/config/env/.env.public.tpl +31 -0
- package/dist/templates/app/config/jwt/index.ts +31 -0
- package/dist/templates/app/config/public/404.png +0 -0
- package/dist/templates/app/config/public/favicon.ico +0 -0
- package/dist/templates/app/config/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/app/config/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/app/config/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/app/config/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/app/config/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/app/config/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/app/config/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/app/config/public/images/screenshot_background.webp +0 -0
- package/dist/templates/app/config/public/images/theme_auto.webp +0 -0
- package/dist/templates/app/config/public/images/theme_dark.webp +0 -0
- package/dist/templates/app/config/public/images/theme_light.webp +0 -0
- package/dist/templates/app/config/public/index.html +29 -0
- package/dist/templates/app/config/request/index.ts +174 -0
- package/dist/templates/app/config/router/index.tsx +26 -0
- package/dist/templates/app/config/rspack/paths.js +12 -0
- package/dist/templates/app/config/rspack/plugins/RoutesConventionsRspackPlugin.js +100 -0
- package/dist/templates/app/config/rspack/rspack.config.mjs +186 -0
- package/dist/templates/app/config/rspack/rspack.dev.mjs +219 -0
- package/dist/templates/app/config/rspack/rspack.prod.mjs +254 -0
- package/dist/templates/app/config/sentry/sentry.config.ts +188 -0
- package/dist/templates/app/locales/en-US/common.json +74 -0
- package/dist/templates/app/locales/en-US/generate.json +71 -0
- package/dist/templates/app/locales/en-US/nav.json +10 -0
- package/dist/templates/app/locales/en-US/overview.json +6 -0
- package/dist/templates/app/locales/en-US/retopology.json +4 -0
- package/dist/templates/app/locales/en-US/rigging.json +21 -0
- package/dist/templates/app/locales/en-US/segmentation.json +4 -0
- package/dist/templates/app/locales/en-US/stylization.json +11 -0
- package/dist/templates/app/locales/en-US/texture.json +4 -0
- package/dist/templates/app/locales/en-US/threeModel.json +9 -0
- package/dist/templates/app/locales/en-US/toolbox.json +11 -0
- package/dist/templates/app/locales/zh-CN/common.json +74 -0
- package/dist/templates/app/locales/zh-CN/generate.json +71 -0
- package/dist/templates/app/locales/zh-CN/nav.json +10 -0
- package/dist/templates/app/locales/zh-CN/overview.json +6 -0
- package/dist/templates/app/locales/zh-CN/retopology.json +4 -0
- package/dist/templates/app/locales/zh-CN/rigging.json +21 -0
- package/dist/templates/app/locales/zh-CN/segmentation.json +4 -0
- package/dist/templates/app/locales/zh-CN/stylization.json +11 -0
- package/dist/templates/app/locales/zh-CN/texture.json +4 -0
- package/dist/templates/app/locales/zh-CN/threeModel.json +9 -0
- package/dist/templates/app/locales/zh-CN/toolbox.json +11 -0
- package/dist/templates/app/package.json.tpl +145 -0
- package/dist/templates/app/postcss.config.js +6 -0
- package/dist/templates/app/react-app-env.d.ts +14 -0
- package/dist/templates/app/scripts/convert-locales-to-json.js +47 -0
- package/dist/templates/app/src/__mocks__/fileMock.js +1 -0
- package/dist/templates/app/src/__mocks__/styleMock.ts +1 -0
- package/dist/templates/app/src/color/ColorScales/ScaleRow.tsx +74 -0
- package/dist/templates/app/src/color/ColorScales/index.md +168 -0
- package/dist/templates/app/src/color/ColorScales/index.tsx +70 -0
- package/dist/templates/app/src/color/ColorScales/style.ts +42 -0
- package/dist/templates/app/src/color/colors/blue.ts +66 -0
- package/dist/templates/app/src/color/colors/cyan.ts +66 -0
- package/dist/templates/app/src/color/colors/geekblue.ts +66 -0
- package/dist/templates/app/src/color/colors/gold.ts +66 -0
- package/dist/templates/app/src/color/colors/gray.ts +66 -0
- package/dist/templates/app/src/color/colors/green.ts +66 -0
- package/dist/templates/app/src/color/colors/index.ts +66 -0
- package/dist/templates/app/src/color/colors/lime.ts +66 -0
- package/dist/templates/app/src/color/colors/magenta.ts +66 -0
- package/dist/templates/app/src/color/colors/orange.ts +66 -0
- package/dist/templates/app/src/color/colors/primary.ts +66 -0
- package/dist/templates/app/src/color/colors/purple.ts +66 -0
- package/dist/templates/app/src/color/colors/red.ts +66 -0
- package/dist/templates/app/src/color/colors/volcano.ts +66 -0
- package/dist/templates/app/src/color/colors/yellow.ts +66 -0
- package/dist/templates/app/src/color/index.ts +4 -0
- package/dist/templates/app/src/color/neutrals/index.ts +30 -0
- package/dist/templates/app/src/color/neutrals/mauve.ts +66 -0
- package/dist/templates/app/src/color/neutrals/olive.ts +66 -0
- package/dist/templates/app/src/color/neutrals/sage.ts +66 -0
- package/dist/templates/app/src/color/neutrals/sand.ts +66 -0
- package/dist/templates/app/src/color/neutrals/slate.ts +66 -0
- package/dist/templates/app/src/color/types.ts +21 -0
- package/dist/templates/app/src/components/ConfigProvider/index.md +63 -0
- package/dist/templates/app/src/components/ConfigProvider/index.tsx +42 -0
- package/dist/templates/app/src/components/ErrorBoundary/index.tsx +506 -0
- package/dist/templates/app/src/components/FontLoader/index.md +12 -0
- package/dist/templates/app/src/components/FontLoader/index.tsx +41 -0
- package/dist/templates/app/src/components/Loading/__tests__/Loading.test.tsx +23 -0
- package/dist/templates/app/src/components/Loading/index.tsx +21 -0
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.module.less +25 -0
- package/dist/templates/app/src/components/ManualSlave/ManualSlavePage.tsx +45 -0
- package/dist/templates/app/src/components/ManualSlave/index.ts +1 -0
- package/dist/templates/app/src/components/RequireAuth/RequireAuth.tsx +76 -0
- package/dist/templates/app/src/components/RequireAuth/index.ts +1 -0
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +89 -0
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/global.ts +61 -0
- package/dist/templates/app/src/components/ThemeProvider/GlobalStyle/index.ts +10 -0
- package/dist/templates/app/src/components/ThemeProvider/Meta.tsx +75 -0
- package/dist/templates/app/src/components/ThemeProvider/ThemeProvider.tsx +109 -0
- package/dist/templates/app/src/components/ThemeProvider/index.md +69 -0
- package/dist/templates/app/src/components/ThemeProvider/index.ts +3 -0
- package/dist/templates/app/src/components/ThemeProvider/type.ts +28 -0
- package/dist/templates/app/src/const/constants.ts +0 -0
- package/dist/templates/app/src/const/locale.ts +9 -0
- package/dist/templates/app/src/const/system.ts +1 -0
- package/dist/templates/app/src/const/theme.ts +5 -0
- package/dist/templates/app/src/const/url.ts +1 -0
- package/dist/templates/app/src/hooks/useRouteTitle.tsx +36 -0
- package/dist/templates/app/src/hooks/useSentry.ts +92 -0
- package/dist/templates/app/src/index.css +2 -0
- package/dist/templates/app/src/index.tsx +56 -0
- package/dist/templates/app/src/layout/BaseLayout.tsx +15 -0
- package/dist/templates/app/src/layout/ContentFormWrapper.tsx +11 -0
- package/dist/templates/app/src/layout/ContentWrapper.module.less +137 -0
- package/dist/templates/app/src/layout/ContentWrapper.tsx +13 -0
- package/dist/templates/app/src/layout/Locale.tsx +89 -0
- package/dist/templates/app/src/layout/MainContentWrap.tsx +68 -0
- package/dist/templates/app/src/layout/ThemeContext.tsx +132 -0
- package/dist/templates/app/src/loading.tsx +52 -0
- package/dist/templates/app/src/locales/create.ts +56 -0
- package/dist/templates/app/src/locales/default/chat.ts +455 -0
- package/dist/templates/app/src/locales/default/index.ts +7 -0
- package/dist/templates/app/src/locales/resources.ts +104 -0
- package/dist/templates/app/src/pages/404/index.tsx +5 -0
- package/dist/templates/app/src/pages/404/page.tsx +27 -0
- package/dist/templates/app/src/pages/404.tsx +5 -0
- package/dist/templates/app/src/pages/base/index.tsx +32 -0
- package/dist/templates/app/src/pages/base/layout.tsx +6 -0
- package/dist/templates/app/src/pages/base/page.tsx +25 -0
- package/dist/templates/app/src/pages/index.css +282 -0
- package/dist/templates/app/src/pages/index.tsx +5 -0
- package/dist/templates/app/src/routes.tsx +18 -0
- package/dist/templates/app/src/setupTests.ts +39 -0
- package/dist/templates/app/src/styles/antdOverride.ts +24 -0
- package/dist/templates/app/src/styles/customTheme.ts +70 -0
- package/dist/templates/app/src/styles/global.ts +53 -0
- package/dist/templates/app/src/styles/highlighter.ts +34 -0
- package/dist/templates/app/src/styles/index.ts +23 -0
- package/dist/templates/app/src/styles/mermaid.ts +7 -0
- package/dist/templates/app/src/styles/text.ts +10 -0
- package/dist/templates/app/src/styles/theme/algorithms/darkAlgorithm.ts +47 -0
- package/dist/templates/app/src/styles/theme/algorithms/lightAlgorithm.ts +44 -0
- package/dist/templates/app/src/styles/theme/antdTheme.ts +62 -0
- package/dist/templates/app/src/styles/theme/customStylish.ts +189 -0
- package/dist/templates/app/src/styles/theme/customToken.ts +93 -0
- package/dist/templates/app/src/styles/theme/generateColorPalette.ts +59 -0
- package/dist/templates/app/src/styles/theme/token/base.ts +16 -0
- package/dist/templates/app/src/styles/theme/token/dark.ts +60 -0
- package/dist/templates/app/src/styles/theme/token/light.ts +60 -0
- package/dist/templates/app/src/test-utils.tsx +18 -0
- package/dist/templates/app/src/types/customStylish.ts +20 -0
- package/dist/templates/app/src/types/customToken.ts +70 -0
- package/dist/templates/app/src/types/index.ts +21 -0
- package/dist/templates/app/src/types/routes.ts +70 -0
- package/dist/templates/app/src/utils/__tests__/example.test.ts +7 -0
- package/dist/templates/app/src/utils/convert.ts +40 -0
- package/dist/templates/app/src/utils/cookie.ts +25 -0
- package/dist/templates/app/src/utils/copyToClipboard.ts +13 -0
- package/dist/templates/app/src/utils/difference.ts +26 -0
- package/dist/templates/app/src/utils/env.ts +3 -0
- package/dist/templates/app/src/utils/format.ts +21 -0
- package/dist/templates/app/src/utils/genCdnUrl.ts +30 -0
- package/dist/templates/app/src/utils/getMicroApp.ts +39 -0
- package/dist/templates/app/src/utils/index.ts +1 -0
- package/dist/templates/app/src/utils/locale.ts +46 -0
- package/dist/templates/app/src/utils/sentry.ts +187 -0
- package/dist/templates/app/src/utils/sentryDecorators.ts +34 -0
- package/dist/templates/app/src/utils/updateVersion.ts +186 -0
- package/dist/templates/app/store/auth/index.tsx +82 -0
- package/dist/templates/app/store/auth/indexApi.tsx +11 -0
- package/dist/templates/app/store/global/index.tsx +133 -0
- package/dist/templates/app/store/global/indexApi.tsx +19 -0
- package/dist/templates/app/store/global/types.ts +62 -0
- package/dist/templates/app/store/middleware/createDevtools.ts +23 -0
- package/dist/templates/app/store/middleware/createHyperStorage/index.ts +127 -0
- package/dist/templates/app/store/middleware/createHyperStorage/indexedDB.ts +31 -0
- package/dist/templates/app/store/middleware/createHyperStorage/keyMapper.ts +57 -0
- package/dist/templates/app/store/middleware/createHyperStorage/localStorage.ts +23 -0
- package/dist/templates/app/store/middleware/createHyperStorage/type.ts +27 -0
- package/dist/templates/app/store/middleware/createHyperStorage/urlStorage.ts +85 -0
- package/dist/templates/app/store/theme/index.ts +25 -0
- package/dist/templates/app/store/types.ts +83 -0
- package/dist/templates/app/store/user/index.tsx +1 -0
- package/dist/templates/app/store/user/indexApi.tsx +5 -0
- package/dist/templates/app/store/user/initialState.ts +15 -0
- package/dist/templates/app/store/user/slices/profile/actions.ts +20 -0
- package/dist/templates/app/store/user/slices/profile/api.ts +5 -0
- package/dist/templates/app/store/user/slices/profile/initialState.ts +14 -0
- package/dist/templates/app/store/user/slices/settings/actions.ts +23 -0
- package/dist/templates/app/store/user/slices/settings/initialState.ts +32 -0
- package/dist/templates/app/store/user/store.ts +39 -0
- package/dist/templates/app/tailwind.config.js +13 -0
- package/dist/templates/app/tsconfig.json +27 -0
- package/dist/templates/app//347/277/273/350/257/221.md +9 -0
- package/dist/templates/auth/index.tsx +82 -0
- package/dist/templates/auth/indexApi.tsx +11 -0
- package/dist/templates/banner_market_modal.webp +0 -0
- package/dist/templates/base/index.tsx +32 -0
- package/dist/templates/base/layout.tsx +6 -0
- package/dist/templates/base/page.tsx +25 -0
- package/dist/templates/base.ts +16 -0
- package/dist/templates/blue.ts +66 -0
- package/dist/templates/chat.ts +455 -0
- 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/color/ColorScales/ScaleRow.tsx +74 -0
- package/dist/templates/color/ColorScales/index.md +168 -0
- package/dist/templates/color/ColorScales/index.tsx +70 -0
- package/dist/templates/color/ColorScales/style.ts +42 -0
- package/dist/templates/color/colors/blue.ts +66 -0
- package/dist/templates/color/colors/cyan.ts +66 -0
- package/dist/templates/color/colors/geekblue.ts +66 -0
- package/dist/templates/color/colors/gold.ts +66 -0
- package/dist/templates/color/colors/gray.ts +66 -0
- package/dist/templates/color/colors/green.ts +66 -0
- package/dist/templates/color/colors/index.ts +66 -0
- package/dist/templates/color/colors/lime.ts +66 -0
- package/dist/templates/color/colors/magenta.ts +66 -0
- package/dist/templates/color/colors/orange.ts +66 -0
- package/dist/templates/color/colors/primary.ts +66 -0
- package/dist/templates/color/colors/purple.ts +66 -0
- package/dist/templates/color/colors/red.ts +66 -0
- package/dist/templates/color/colors/volcano.ts +66 -0
- package/dist/templates/color/colors/yellow.ts +66 -0
- package/dist/templates/color/index.ts +4 -0
- package/dist/templates/color/neutrals/index.ts +30 -0
- package/dist/templates/color/neutrals/mauve.ts +66 -0
- package/dist/templates/color/neutrals/olive.ts +66 -0
- package/dist/templates/color/neutrals/sage.ts +66 -0
- package/dist/templates/color/neutrals/sand.ts +66 -0
- package/dist/templates/color/neutrals/slate.ts +66 -0
- package/dist/templates/color/types.ts +21 -0
- package/dist/templates/colors/blue.ts +66 -0
- package/dist/templates/colors/cyan.ts +66 -0
- package/dist/templates/colors/geekblue.ts +66 -0
- package/dist/templates/colors/gold.ts +66 -0
- package/dist/templates/colors/gray.ts +66 -0
- package/dist/templates/colors/green.ts +66 -0
- package/dist/templates/colors/index.ts +66 -0
- package/dist/templates/colors/lime.ts +66 -0
- package/dist/templates/colors/magenta.ts +66 -0
- package/dist/templates/colors/orange.ts +66 -0
- package/dist/templates/colors/primary.ts +66 -0
- package/dist/templates/colors/purple.ts +66 -0
- package/dist/templates/colors/red.ts +66 -0
- package/dist/templates/colors/volcano.ts +66 -0
- package/dist/templates/colors/yellow.ts +66 -0
- package/dist/templates/common.json +74 -0
- package/dist/templates/components/ConfigProvider/index.md +63 -0
- package/dist/templates/components/ConfigProvider/index.tsx +42 -0
- package/dist/templates/components/ErrorBoundary/index.tsx +506 -0
- package/dist/templates/components/FontLoader/index.md +12 -0
- package/dist/templates/components/FontLoader/index.tsx +41 -0
- package/dist/templates/components/Loading/__tests__/Loading.test.tsx +23 -0
- package/dist/templates/components/Loading/index.tsx +21 -0
- package/dist/templates/components/ManualSlave/ManualSlavePage.module.less +25 -0
- package/dist/templates/components/ManualSlave/ManualSlavePage.tsx +45 -0
- package/dist/templates/components/ManualSlave/index.ts +1 -0
- package/dist/templates/components/RequireAuth/RequireAuth.tsx +76 -0
- package/dist/templates/components/RequireAuth/index.ts +1 -0
- package/dist/templates/components/ThemeProvider/GlobalStyle/antdOverride.ts +89 -0
- package/dist/templates/components/ThemeProvider/GlobalStyle/global.ts +61 -0
- package/dist/templates/components/ThemeProvider/GlobalStyle/index.ts +10 -0
- package/dist/templates/components/ThemeProvider/Meta.tsx +75 -0
- package/dist/templates/components/ThemeProvider/ThemeProvider.tsx +109 -0
- package/dist/templates/components/ThemeProvider/index.md +69 -0
- package/dist/templates/components/ThemeProvider/index.ts +3 -0
- package/dist/templates/components/ThemeProvider/type.ts +28 -0
- package/dist/templates/config/env/.env.development +5 -0
- package/dist/templates/config/env/.env.production +2 -0
- package/dist/templates/config/env/.env.public.tpl +31 -0
- package/dist/templates/config/jwt/index.ts +31 -0
- package/dist/templates/config/public/404.png +0 -0
- package/dist/templates/config/public/favicon.ico +0 -0
- package/dist/templates/config/public/images/banner_market_modal.webp +0 -0
- package/dist/templates/config/public/images/chatmode_chat_dark.webp +0 -0
- package/dist/templates/config/public/images/chatmode_chat_light.webp +0 -0
- package/dist/templates/config/public/images/chatmode_docs_dark.webp +0 -0
- package/dist/templates/config/public/images/chatmode_docs_light.webp +0 -0
- package/dist/templates/config/public/images/empty_topic_dark.webp +0 -0
- package/dist/templates/config/public/images/empty_topic_light.webp +0 -0
- package/dist/templates/config/public/images/screenshot_background.webp +0 -0
- package/dist/templates/config/public/images/theme_auto.webp +0 -0
- package/dist/templates/config/public/images/theme_dark.webp +0 -0
- package/dist/templates/config/public/images/theme_light.webp +0 -0
- package/dist/templates/config/public/index.html +29 -0
- package/dist/templates/config/request/index.ts +174 -0
- package/dist/templates/config/router/index.tsx +26 -0
- package/dist/templates/config/rspack/paths.js +12 -0
- package/dist/templates/config/rspack/plugins/RoutesConventionsRspackPlugin.js +100 -0
- package/dist/templates/config/rspack/rspack.config.mjs +186 -0
- package/dist/templates/config/rspack/rspack.dev.mjs +219 -0
- package/dist/templates/config/rspack/rspack.prod.mjs +254 -0
- package/dist/templates/config/sentry/sentry.config.ts +188 -0
- package/dist/templates/const/constants.ts +0 -0
- package/dist/templates/const/locale.ts +9 -0
- package/dist/templates/const/system.ts +1 -0
- package/dist/templates/const/theme.ts +5 -0
- package/dist/templates/const/url.ts +1 -0
- package/dist/templates/constants.ts +0 -0
- package/dist/templates/convert-locales-to-json.js +47 -0
- package/dist/templates/convert.ts +40 -0
- package/dist/templates/cookie.ts +25 -0
- package/dist/templates/copyToClipboard.ts +13 -0
- package/dist/templates/create.ts +56 -0
- package/dist/templates/createDevtools.ts +23 -0
- package/dist/templates/createHyperStorage/index.ts +127 -0
- package/dist/templates/createHyperStorage/indexedDB.ts +31 -0
- package/dist/templates/createHyperStorage/keyMapper.ts +57 -0
- package/dist/templates/createHyperStorage/localStorage.ts +23 -0
- package/dist/templates/createHyperStorage/type.ts +27 -0
- package/dist/templates/createHyperStorage/urlStorage.ts +85 -0
- package/dist/templates/customStylish.ts +189 -0
- package/dist/templates/customTheme.ts +70 -0
- package/dist/templates/customToken.ts +93 -0
- package/dist/templates/cyan.ts +66 -0
- package/dist/templates/dark.ts +60 -0
- package/dist/templates/darkAlgorithm.ts +47 -0
- package/dist/templates/default/chat.ts +455 -0
- package/dist/templates/default/index.ts +7 -0
- package/dist/templates/difference.ts +26 -0
- package/dist/templates/empty_topic_dark.webp +0 -0
- package/dist/templates/empty_topic_light.webp +0 -0
- package/dist/templates/en-US/common.json +74 -0
- package/dist/templates/en-US/generate.json +71 -0
- package/dist/templates/en-US/nav.json +10 -0
- package/dist/templates/en-US/overview.json +6 -0
- package/dist/templates/en-US/retopology.json +4 -0
- package/dist/templates/en-US/rigging.json +21 -0
- package/dist/templates/en-US/segmentation.json +4 -0
- package/dist/templates/en-US/stylization.json +11 -0
- package/dist/templates/en-US/texture.json +4 -0
- package/dist/templates/en-US/threeModel.json +9 -0
- package/dist/templates/en-US/toolbox.json +11 -0
- package/dist/templates/env/.env.development +5 -0
- package/dist/templates/env/.env.production +2 -0
- package/dist/templates/env/.env.public.tpl +31 -0
- package/dist/templates/env.ts +3 -0
- package/dist/templates/example.test.ts +7 -0
- package/dist/templates/favicon.ico +0 -0
- package/dist/templates/fileMock.js +1 -0
- package/dist/templates/format.ts +21 -0
- package/dist/templates/geekblue.ts +66 -0
- package/dist/templates/genCdnUrl.ts +30 -0
- package/dist/templates/generate.json +71 -0
- package/dist/templates/generateColorPalette.ts +59 -0
- package/dist/templates/getMicroApp.ts +39 -0
- package/dist/templates/global/index.tsx +133 -0
- package/dist/templates/global/indexApi.tsx +19 -0
- package/dist/templates/global/types.ts +62 -0
- package/dist/templates/global.ts +61 -0
- package/dist/templates/gold.ts +66 -0
- package/dist/templates/gray.ts +66 -0
- package/dist/templates/green.ts +66 -0
- package/dist/templates/highlighter.ts +34 -0
- package/dist/templates/hooks/useRouteTitle.tsx +36 -0
- package/dist/templates/hooks/useSentry.ts +92 -0
- 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 +282 -0
- package/dist/templates/index.html +29 -0
- package/dist/templates/index.md +69 -0
- package/dist/templates/index.ts +10 -0
- package/dist/templates/index.tsx +32 -0
- package/dist/templates/indexApi.tsx +5 -0
- package/dist/templates/indexedDB.ts +31 -0
- package/dist/templates/initialState.ts +32 -0
- package/dist/templates/jwt/index.ts +31 -0
- package/dist/templates/keyMapper.ts +57 -0
- package/dist/templates/layout/BaseLayout.tsx +15 -0
- package/dist/templates/layout/ContentFormWrapper.tsx +11 -0
- package/dist/templates/layout/ContentWrapper.module.less +137 -0
- package/dist/templates/layout/ContentWrapper.tsx +13 -0
- package/dist/templates/layout/Locale.tsx +89 -0
- package/dist/templates/layout/MainContentWrap.tsx +68 -0
- package/dist/templates/layout/ThemeContext.tsx +132 -0
- package/dist/templates/layout.tsx +6 -0
- package/dist/templates/light.ts +60 -0
- package/dist/templates/lightAlgorithm.ts +44 -0
- package/dist/templates/lime.ts +66 -0
- package/dist/templates/loading.tsx +52 -0
- package/dist/templates/localStorage.ts +23 -0
- package/dist/templates/locale.ts +46 -0
- package/dist/templates/locales/create.ts +56 -0
- package/dist/templates/locales/default/chat.ts +455 -0
- package/dist/templates/locales/default/index.ts +7 -0
- package/dist/templates/locales/en-US/common.json +74 -0
- package/dist/templates/locales/en-US/generate.json +71 -0
- package/dist/templates/locales/en-US/nav.json +10 -0
- package/dist/templates/locales/en-US/overview.json +6 -0
- package/dist/templates/locales/en-US/retopology.json +4 -0
- package/dist/templates/locales/en-US/rigging.json +21 -0
- package/dist/templates/locales/en-US/segmentation.json +4 -0
- package/dist/templates/locales/en-US/stylization.json +11 -0
- package/dist/templates/locales/en-US/texture.json +4 -0
- package/dist/templates/locales/en-US/threeModel.json +9 -0
- package/dist/templates/locales/en-US/toolbox.json +11 -0
- package/dist/templates/locales/resources.ts +104 -0
- package/dist/templates/locales/zh-CN/common.json +74 -0
- package/dist/templates/locales/zh-CN/generate.json +71 -0
- package/dist/templates/locales/zh-CN/nav.json +10 -0
- package/dist/templates/locales/zh-CN/overview.json +6 -0
- package/dist/templates/locales/zh-CN/retopology.json +4 -0
- package/dist/templates/locales/zh-CN/rigging.json +21 -0
- package/dist/templates/locales/zh-CN/segmentation.json +4 -0
- package/dist/templates/locales/zh-CN/stylization.json +11 -0
- package/dist/templates/locales/zh-CN/texture.json +4 -0
- package/dist/templates/locales/zh-CN/threeModel.json +9 -0
- package/dist/templates/locales/zh-CN/toolbox.json +11 -0
- package/dist/templates/magenta.ts +66 -0
- package/dist/templates/mauve.ts +66 -0
- package/dist/templates/mermaid.ts +7 -0
- package/dist/templates/middleware/createDevtools.ts +23 -0
- package/dist/templates/middleware/createHyperStorage/index.ts +127 -0
- package/dist/templates/middleware/createHyperStorage/indexedDB.ts +31 -0
- package/dist/templates/middleware/createHyperStorage/keyMapper.ts +57 -0
- package/dist/templates/middleware/createHyperStorage/localStorage.ts +23 -0
- package/dist/templates/middleware/createHyperStorage/type.ts +27 -0
- package/dist/templates/middleware/createHyperStorage/urlStorage.ts +85 -0
- package/dist/templates/nav.json +10 -0
- package/dist/templates/neutrals/index.ts +30 -0
- package/dist/templates/neutrals/mauve.ts +66 -0
- package/dist/templates/neutrals/olive.ts +66 -0
- package/dist/templates/neutrals/sage.ts +66 -0
- package/dist/templates/neutrals/sand.ts +66 -0
- package/dist/templates/neutrals/slate.ts +66 -0
- package/dist/templates/olive.ts +66 -0
- package/dist/templates/orange.ts +66 -0
- package/dist/templates/overview.json +6 -0
- package/dist/templates/package.json.tpl +145 -0
- package/dist/templates/page.tsx +25 -0
- package/dist/templates/pages/404/index.tsx +5 -0
- package/dist/templates/pages/404/page.tsx +27 -0
- package/dist/templates/pages/404.tsx +5 -0
- package/dist/templates/pages/base/index.tsx +32 -0
- package/dist/templates/pages/base/layout.tsx +6 -0
- package/dist/templates/pages/base/page.tsx +25 -0
- package/dist/templates/pages/index.css +282 -0
- package/dist/templates/pages/index.tsx +5 -0
- package/dist/templates/paths.js +12 -0
- package/dist/templates/plugins/RoutesConventionsRspackPlugin.js +100 -0
- package/dist/templates/postcss.config.js +6 -0
- package/dist/templates/primary.ts +66 -0
- package/dist/templates/profile/actions.ts +20 -0
- package/dist/templates/profile/api.ts +5 -0
- package/dist/templates/profile/initialState.ts +14 -0
- package/dist/templates/public/404.png +0 -0
- package/dist/templates/public/favicon.ico +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 +29 -0
- package/dist/templates/purple.ts +66 -0
- package/dist/templates/react-app-env.d.ts +14 -0
- package/dist/templates/red.ts +66 -0
- package/dist/templates/request/index.ts +174 -0
- package/dist/templates/resources.ts +104 -0
- package/dist/templates/retopology.json +4 -0
- package/dist/templates/rigging.json +21 -0
- package/dist/templates/router/index.tsx +26 -0
- package/dist/templates/routes.ts +70 -0
- package/dist/templates/routes.tsx +18 -0
- package/dist/templates/rspack/paths.js +12 -0
- package/dist/templates/rspack/plugins/RoutesConventionsRspackPlugin.js +100 -0
- package/dist/templates/rspack/rspack.config.mjs +186 -0
- package/dist/templates/rspack/rspack.dev.mjs +219 -0
- package/dist/templates/rspack/rspack.prod.mjs +254 -0
- package/dist/templates/rspack.config.mjs +186 -0
- package/dist/templates/rspack.dev.mjs +219 -0
- package/dist/templates/rspack.prod.mjs +254 -0
- package/dist/templates/sage.ts +66 -0
- package/dist/templates/sand.ts +66 -0
- package/dist/templates/screenshot_background.webp +0 -0
- package/dist/templates/scripts/convert-locales-to-json.js +47 -0
- package/dist/templates/segmentation.json +4 -0
- package/dist/templates/sentry/sentry.config.ts +188 -0
- package/dist/templates/sentry.config.ts +188 -0
- package/dist/templates/sentry.ts +187 -0
- package/dist/templates/sentryDecorators.ts +34 -0
- package/dist/templates/settings/actions.ts +23 -0
- package/dist/templates/settings/initialState.ts +32 -0
- package/dist/templates/setupTests.ts +39 -0
- package/dist/templates/slate.ts +66 -0
- package/dist/templates/slices/profile/actions.ts +20 -0
- package/dist/templates/slices/profile/api.ts +5 -0
- package/dist/templates/slices/profile/initialState.ts +14 -0
- package/dist/templates/slices/settings/actions.ts +23 -0
- package/dist/templates/slices/settings/initialState.ts +32 -0
- package/dist/templates/src/__mocks__/fileMock.js +1 -0
- package/dist/templates/src/__mocks__/styleMock.ts +1 -0
- package/dist/templates/src/color/ColorScales/ScaleRow.tsx +74 -0
- package/dist/templates/src/color/ColorScales/index.md +168 -0
- package/dist/templates/src/color/ColorScales/index.tsx +70 -0
- package/dist/templates/src/color/ColorScales/style.ts +42 -0
- package/dist/templates/src/color/colors/blue.ts +66 -0
- package/dist/templates/src/color/colors/cyan.ts +66 -0
- package/dist/templates/src/color/colors/geekblue.ts +66 -0
- package/dist/templates/src/color/colors/gold.ts +66 -0
- package/dist/templates/src/color/colors/gray.ts +66 -0
- package/dist/templates/src/color/colors/green.ts +66 -0
- package/dist/templates/src/color/colors/index.ts +66 -0
- package/dist/templates/src/color/colors/lime.ts +66 -0
- package/dist/templates/src/color/colors/magenta.ts +66 -0
- package/dist/templates/src/color/colors/orange.ts +66 -0
- package/dist/templates/src/color/colors/primary.ts +66 -0
- package/dist/templates/src/color/colors/purple.ts +66 -0
- package/dist/templates/src/color/colors/red.ts +66 -0
- package/dist/templates/src/color/colors/volcano.ts +66 -0
- package/dist/templates/src/color/colors/yellow.ts +66 -0
- package/dist/templates/src/color/index.ts +4 -0
- package/dist/templates/src/color/neutrals/index.ts +30 -0
- package/dist/templates/src/color/neutrals/mauve.ts +66 -0
- package/dist/templates/src/color/neutrals/olive.ts +66 -0
- package/dist/templates/src/color/neutrals/sage.ts +66 -0
- package/dist/templates/src/color/neutrals/sand.ts +66 -0
- package/dist/templates/src/color/neutrals/slate.ts +66 -0
- package/dist/templates/src/color/types.ts +21 -0
- package/dist/templates/src/components/ConfigProvider/index.md +63 -0
- package/dist/templates/src/components/ConfigProvider/index.tsx +42 -0
- package/dist/templates/src/components/ErrorBoundary/index.tsx +506 -0
- package/dist/templates/src/components/FontLoader/index.md +12 -0
- package/dist/templates/src/components/FontLoader/index.tsx +41 -0
- package/dist/templates/src/components/Loading/__tests__/Loading.test.tsx +23 -0
- package/dist/templates/src/components/Loading/index.tsx +21 -0
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.module.less +25 -0
- package/dist/templates/src/components/ManualSlave/ManualSlavePage.tsx +45 -0
- package/dist/templates/src/components/ManualSlave/index.ts +1 -0
- package/dist/templates/src/components/RequireAuth/RequireAuth.tsx +76 -0
- package/dist/templates/src/components/RequireAuth/index.ts +1 -0
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/antdOverride.ts +89 -0
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/global.ts +61 -0
- package/dist/templates/src/components/ThemeProvider/GlobalStyle/index.ts +10 -0
- package/dist/templates/src/components/ThemeProvider/Meta.tsx +75 -0
- package/dist/templates/src/components/ThemeProvider/ThemeProvider.tsx +109 -0
- package/dist/templates/src/components/ThemeProvider/index.md +69 -0
- package/dist/templates/src/components/ThemeProvider/index.ts +3 -0
- package/dist/templates/src/components/ThemeProvider/type.ts +28 -0
- package/dist/templates/src/const/constants.ts +0 -0
- package/dist/templates/src/const/locale.ts +9 -0
- package/dist/templates/src/const/system.ts +1 -0
- package/dist/templates/src/const/theme.ts +5 -0
- package/dist/templates/src/const/url.ts +1 -0
- package/dist/templates/src/hooks/useRouteTitle.tsx +36 -0
- package/dist/templates/src/hooks/useSentry.ts +92 -0
- package/dist/templates/src/index.css +2 -0
- package/dist/templates/src/index.tsx +56 -0
- package/dist/templates/src/layout/BaseLayout.tsx +15 -0
- package/dist/templates/src/layout/ContentFormWrapper.tsx +11 -0
- package/dist/templates/src/layout/ContentWrapper.module.less +137 -0
- package/dist/templates/src/layout/ContentWrapper.tsx +13 -0
- package/dist/templates/src/layout/Locale.tsx +89 -0
- package/dist/templates/src/layout/MainContentWrap.tsx +68 -0
- package/dist/templates/src/layout/ThemeContext.tsx +132 -0
- package/dist/templates/src/loading.tsx +52 -0
- package/dist/templates/src/locales/create.ts +56 -0
- package/dist/templates/src/locales/default/chat.ts +455 -0
- package/dist/templates/src/locales/default/index.ts +7 -0
- package/dist/templates/src/locales/resources.ts +104 -0
- package/dist/templates/src/pages/404/index.tsx +5 -0
- package/dist/templates/src/pages/404/page.tsx +27 -0
- package/dist/templates/src/pages/404.tsx +5 -0
- package/dist/templates/src/pages/base/index.tsx +32 -0
- package/dist/templates/src/pages/base/layout.tsx +6 -0
- package/dist/templates/src/pages/base/page.tsx +25 -0
- package/dist/templates/src/pages/index.css +282 -0
- package/dist/templates/src/pages/index.tsx +5 -0
- package/dist/templates/src/routes.tsx +18 -0
- package/dist/templates/src/setupTests.ts +39 -0
- package/dist/templates/src/styles/antdOverride.ts +24 -0
- package/dist/templates/src/styles/customTheme.ts +70 -0
- package/dist/templates/src/styles/global.ts +53 -0
- package/dist/templates/src/styles/highlighter.ts +34 -0
- package/dist/templates/src/styles/index.ts +23 -0
- package/dist/templates/src/styles/mermaid.ts +7 -0
- package/dist/templates/src/styles/text.ts +10 -0
- package/dist/templates/src/styles/theme/algorithms/darkAlgorithm.ts +47 -0
- package/dist/templates/src/styles/theme/algorithms/lightAlgorithm.ts +44 -0
- package/dist/templates/src/styles/theme/antdTheme.ts +62 -0
- package/dist/templates/src/styles/theme/customStylish.ts +189 -0
- package/dist/templates/src/styles/theme/customToken.ts +93 -0
- package/dist/templates/src/styles/theme/generateColorPalette.ts +59 -0
- package/dist/templates/src/styles/theme/token/base.ts +16 -0
- package/dist/templates/src/styles/theme/token/dark.ts +60 -0
- package/dist/templates/src/styles/theme/token/light.ts +60 -0
- package/dist/templates/src/test-utils.tsx +18 -0
- package/dist/templates/src/types/customStylish.ts +20 -0
- package/dist/templates/src/types/customToken.ts +70 -0
- package/dist/templates/src/types/index.ts +21 -0
- package/dist/templates/src/types/routes.ts +70 -0
- package/dist/templates/src/utils/__tests__/example.test.ts +7 -0
- package/dist/templates/src/utils/convert.ts +40 -0
- package/dist/templates/src/utils/cookie.ts +25 -0
- package/dist/templates/src/utils/copyToClipboard.ts +13 -0
- package/dist/templates/src/utils/difference.ts +26 -0
- package/dist/templates/src/utils/env.ts +3 -0
- package/dist/templates/src/utils/format.ts +21 -0
- package/dist/templates/src/utils/genCdnUrl.ts +30 -0
- package/dist/templates/src/utils/getMicroApp.ts +39 -0
- package/dist/templates/src/utils/index.ts +1 -0
- package/dist/templates/src/utils/locale.ts +46 -0
- package/dist/templates/src/utils/sentry.ts +187 -0
- package/dist/templates/src/utils/sentryDecorators.ts +34 -0
- package/dist/templates/src/utils/updateVersion.ts +186 -0
- package/dist/templates/store/auth/index.tsx +82 -0
- package/dist/templates/store/auth/indexApi.tsx +11 -0
- package/dist/templates/store/global/index.tsx +133 -0
- package/dist/templates/store/global/indexApi.tsx +19 -0
- package/dist/templates/store/global/types.ts +62 -0
- package/dist/templates/store/middleware/createDevtools.ts +23 -0
- package/dist/templates/store/middleware/createHyperStorage/index.ts +127 -0
- package/dist/templates/store/middleware/createHyperStorage/indexedDB.ts +31 -0
- package/dist/templates/store/middleware/createHyperStorage/keyMapper.ts +57 -0
- package/dist/templates/store/middleware/createHyperStorage/localStorage.ts +23 -0
- package/dist/templates/store/middleware/createHyperStorage/type.ts +27 -0
- package/dist/templates/store/middleware/createHyperStorage/urlStorage.ts +85 -0
- package/dist/templates/store/theme/index.ts +25 -0
- package/dist/templates/store/types.ts +83 -0
- package/dist/templates/store/user/index.tsx +1 -0
- package/dist/templates/store/user/indexApi.tsx +5 -0
- package/dist/templates/store/user/initialState.ts +15 -0
- package/dist/templates/store/user/slices/profile/actions.ts +20 -0
- package/dist/templates/store/user/slices/profile/api.ts +5 -0
- package/dist/templates/store/user/slices/profile/initialState.ts +14 -0
- package/dist/templates/store/user/slices/settings/actions.ts +23 -0
- package/dist/templates/store/user/slices/settings/initialState.ts +32 -0
- package/dist/templates/store/user/store.ts +39 -0
- package/dist/templates/store.ts +39 -0
- package/dist/templates/style.ts +42 -0
- package/dist/templates/styleMock.ts +1 -0
- package/dist/templates/styles/antdOverride.ts +24 -0
- package/dist/templates/styles/customTheme.ts +70 -0
- package/dist/templates/styles/global.ts +53 -0
- package/dist/templates/styles/highlighter.ts +34 -0
- package/dist/templates/styles/index.ts +23 -0
- package/dist/templates/styles/mermaid.ts +7 -0
- package/dist/templates/styles/text.ts +10 -0
- package/dist/templates/styles/theme/algorithms/darkAlgorithm.ts +47 -0
- package/dist/templates/styles/theme/algorithms/lightAlgorithm.ts +44 -0
- package/dist/templates/styles/theme/antdTheme.ts +62 -0
- package/dist/templates/styles/theme/customStylish.ts +189 -0
- package/dist/templates/styles/theme/customToken.ts +93 -0
- package/dist/templates/styles/theme/generateColorPalette.ts +59 -0
- package/dist/templates/styles/theme/token/base.ts +16 -0
- package/dist/templates/styles/theme/token/dark.ts +60 -0
- package/dist/templates/styles/theme/token/light.ts +60 -0
- package/dist/templates/stylization.json +11 -0
- package/dist/templates/system.ts +1 -0
- package/dist/templates/tailwind.config.js +13 -0
- package/dist/templates/test-utils.tsx +18 -0
- package/dist/templates/text.ts +10 -0
- package/dist/templates/texture.json +4 -0
- package/dist/templates/theme/algorithms/darkAlgorithm.ts +47 -0
- package/dist/templates/theme/algorithms/lightAlgorithm.ts +44 -0
- package/dist/templates/theme/antdTheme.ts +62 -0
- package/dist/templates/theme/customStylish.ts +189 -0
- package/dist/templates/theme/customToken.ts +93 -0
- package/dist/templates/theme/generateColorPalette.ts +59 -0
- package/dist/templates/theme/index.ts +25 -0
- package/dist/templates/theme/token/base.ts +16 -0
- package/dist/templates/theme/token/dark.ts +60 -0
- package/dist/templates/theme/token/light.ts +60 -0
- package/dist/templates/theme.ts +5 -0
- 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/threeModel.json +9 -0
- package/dist/templates/token/base.ts +16 -0
- package/dist/templates/token/dark.ts +60 -0
- package/dist/templates/token/light.ts +60 -0
- package/dist/templates/toolbox.json +11 -0
- package/dist/templates/tsconfig.json +27 -0
- package/dist/templates/type.ts +28 -0
- package/dist/templates/types/customStylish.ts +20 -0
- package/dist/templates/types/customToken.ts +70 -0
- package/dist/templates/types/index.ts +21 -0
- package/dist/templates/types/routes.ts +70 -0
- package/dist/templates/types.ts +21 -0
- package/dist/templates/updateVersion.ts +186 -0
- package/dist/templates/url.ts +1 -0
- package/dist/templates/urlStorage.ts +85 -0
- package/dist/templates/useRouteTitle.tsx +36 -0
- package/dist/templates/useSentry.ts +92 -0
- package/dist/templates/user/index.tsx +1 -0
- package/dist/templates/user/indexApi.tsx +5 -0
- package/dist/templates/user/initialState.ts +15 -0
- package/dist/templates/user/slices/profile/actions.ts +20 -0
- package/dist/templates/user/slices/profile/api.ts +5 -0
- package/dist/templates/user/slices/profile/initialState.ts +14 -0
- package/dist/templates/user/slices/settings/actions.ts +23 -0
- package/dist/templates/user/slices/settings/initialState.ts +32 -0
- package/dist/templates/user/store.ts +39 -0
- package/dist/templates/utils/__tests__/example.test.ts +7 -0
- package/dist/templates/utils/convert.ts +40 -0
- package/dist/templates/utils/cookie.ts +25 -0
- package/dist/templates/utils/copyToClipboard.ts +13 -0
- package/dist/templates/utils/difference.ts +26 -0
- package/dist/templates/utils/env.ts +3 -0
- package/dist/templates/utils/format.ts +21 -0
- package/dist/templates/utils/genCdnUrl.ts +30 -0
- package/dist/templates/utils/getMicroApp.ts +39 -0
- package/dist/templates/utils/index.ts +1 -0
- package/dist/templates/utils/locale.ts +46 -0
- package/dist/templates/utils/sentry.ts +187 -0
- package/dist/templates/utils/sentryDecorators.ts +34 -0
- package/dist/templates/utils/updateVersion.ts +186 -0
- package/dist/templates/volcano.ts +66 -0
- package/dist/templates/yellow.ts +66 -0
- package/dist/templates/zh-CN/common.json +74 -0
- package/dist/templates/zh-CN/generate.json +71 -0
- package/dist/templates/zh-CN/nav.json +10 -0
- package/dist/templates/zh-CN/overview.json +6 -0
- package/dist/templates/zh-CN/retopology.json +4 -0
- package/dist/templates/zh-CN/rigging.json +21 -0
- package/dist/templates/zh-CN/segmentation.json +4 -0
- package/dist/templates/zh-CN/stylization.json +11 -0
- package/dist/templates/zh-CN/texture.json +4 -0
- package/dist/templates/zh-CN/threeModel.json +9 -0
- package/dist/templates/zh-CN/toolbox.json +11 -0
- package/dist/templates//347/277/273/350/257/221.md +9 -0
- package/package.json +29 -21
- package/README.md +0 -180
- package/dist/api.js +0 -44
- package/dist/templates.js +0 -87
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"author": "{{{ author }}}",
|
|
4
|
+
"version": "{{{ version }}}",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "cross-env NODE_ENV=development rspack serve --config config/rspack/rspack.dev.mjs",
|
|
7
|
+
"dev": "pnpm run start",
|
|
8
|
+
"dev:test": "cross-env NODE_ENV=testDevelopment rspack serve --config config/rspack/rspack.dev.mjs",
|
|
9
|
+
"build:test": "cross-env NODE_ENV=test rspack build --config config/rspack/rspack.prod.mjs --mode production",
|
|
10
|
+
"build": "cross-env NODE_ENV=production rspack build --config config/rspack/rspack.prod.mjs --mode production",
|
|
11
|
+
"test": "jest",
|
|
12
|
+
"lint": "biome check",
|
|
13
|
+
"test:watch": "jest --watch",
|
|
14
|
+
"test:coverage": "jest --coverage",
|
|
15
|
+
"prepare": "husky install",
|
|
16
|
+
"test:ci": "jest --coverage --watchAll=false"
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=20.0.0",
|
|
20
|
+
"pnpm": ">=8.0.0"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@ant-design/icons": "^6.0.0",
|
|
24
|
+
"@rspack/cli": "^1.1.8",
|
|
25
|
+
"@rspack/core": "^1.6.1",
|
|
26
|
+
"@sentry/react": "^9.27.0",
|
|
27
|
+
"@sentry/webpack-plugin": "^3.5.0",
|
|
28
|
+
"@tailwindcss/postcss": "^4.1.8",
|
|
29
|
+
"@tanstack/react-query": "^5.80.6",
|
|
30
|
+
"ahooks": "^3.8.5",
|
|
31
|
+
"antd": "^6.1.1",
|
|
32
|
+
"antd-style": "^3.7.1",
|
|
33
|
+
"clsx": "^2.1.1",
|
|
34
|
+
"copy-webpack-plugin": "^13.0.1",
|
|
35
|
+
"dayjs": "^1.11.13",
|
|
36
|
+
"fast-deep-equal": "^3.1.3",
|
|
37
|
+
"garfish": "^1.19.3",
|
|
38
|
+
"i18next": "^25.2.1",
|
|
39
|
+
"i18next-browser-languagedetector": "^8.1.0",
|
|
40
|
+
"i18next-resources-to-backend": "^1.2.1",
|
|
41
|
+
"idb-keyval": "^6.2.2",
|
|
42
|
+
"lucide-react": "^0.460.0",
|
|
43
|
+
"nanoid": "^5.0.9",
|
|
44
|
+
"polished": "^4.3.1",
|
|
45
|
+
"qs": "^6.13.1",
|
|
46
|
+
"query-string": "^8.2.0",
|
|
47
|
+
"react": "^19.1.0",
|
|
48
|
+
"react-dom": "^19.1.0",
|
|
49
|
+
"react-i18next": "^15.5.2",
|
|
50
|
+
"react-layout-kit": "^2.0.0",
|
|
51
|
+
"react-refresh": "^0.14.2",
|
|
52
|
+
"react-router": "^7.6.1",
|
|
53
|
+
"resolve-accept-language": "^3.1.11",
|
|
54
|
+
"rtl-detect": "^1.1.2",
|
|
55
|
+
"rxjs": "^7.8.2",
|
|
56
|
+
"styled-components": "^5.3.11",
|
|
57
|
+
"tailwind-merge": "^3.3.0",
|
|
58
|
+
"tailwindcss": "^4.1.8",
|
|
59
|
+
"universal-cookie": "^8.0.1",
|
|
60
|
+
"url-join": "^5.0.0",
|
|
61
|
+
"uuid": "^11.0.3",
|
|
62
|
+
"zustand": "^5.0.5",
|
|
63
|
+
"zustand-utils": "^2.1.1"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@babel/core": "^7.26.0",
|
|
67
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
68
|
+
"@babel/plugin-proposal-decorators": "^7.25.9",
|
|
69
|
+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
|
70
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
71
|
+
"@babel/plugin-transform-runtime": "^7.25.9",
|
|
72
|
+
"@babel/preset-env": "^7.26.0",
|
|
73
|
+
"@babel/preset-react": "^7.25.9",
|
|
74
|
+
"@babel/runtime": "^7.26.0",
|
|
75
|
+
"@babel/runtime-corejs3": "^7.26.0",
|
|
76
|
+
"@biomejs/biome": "2.3.2",
|
|
77
|
+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
|
|
78
|
+
"@rsdoctor/rspack-plugin": "^1.3.8",
|
|
79
|
+
"@rsdoctor/webpack-plugin": "^0.4.13",
|
|
80
|
+
"@rspack/cli": "^1.1.8",
|
|
81
|
+
"@rspack/core": "^1.1.8",
|
|
82
|
+
"@svgr/webpack": "^7.0.0",
|
|
83
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
84
|
+
"@testing-library/react": "^16.3.0",
|
|
85
|
+
"@testing-library/user-event": "^14.6.1",
|
|
86
|
+
"@types/jest": "^29.5.14",
|
|
87
|
+
"@types/lodash-es": "^4.17.12",
|
|
88
|
+
"@types/node": "^22.9.0",
|
|
89
|
+
"@types/react": "^19.1.6",
|
|
90
|
+
"@types/react-dom": "^19.1.6",
|
|
91
|
+
"@types/react-resizable": "^3.0.8",
|
|
92
|
+
"@types/styled-components": "^5.1.34",
|
|
93
|
+
"assert": "^2.1.0",
|
|
94
|
+
"autoprefixer": "^10.4.20",
|
|
95
|
+
"axios": "^1.6.8",
|
|
96
|
+
"browserify-fs": "^1.0.0",
|
|
97
|
+
"browserify-zlib": "^0.2.0",
|
|
98
|
+
"buffer": "^6.0.3",
|
|
99
|
+
"chokidar": "^4.0.3",
|
|
100
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
101
|
+
"cross-env": "^7.0.3",
|
|
102
|
+
"crypto-browserify": "^3.12.1",
|
|
103
|
+
"css-loader": "^6.11.0",
|
|
104
|
+
"css-minimizer-webpack-plugin": "^7.0.0",
|
|
105
|
+
"dotenv": "^16.4.5",
|
|
106
|
+
"ejs-loader": "^0.5.0",
|
|
107
|
+
"esbuild-loader": "^4.2.2",
|
|
108
|
+
"esbuild-register": "^3.6.0",
|
|
109
|
+
"globals": "^16.3.0",
|
|
110
|
+
"html-webpack-plugin": "^5.6.3",
|
|
111
|
+
"husky": "^9.1.7",
|
|
112
|
+
"jest": "^29.7.0",
|
|
113
|
+
"jest-environment-jsdom": "30.0.0-beta.3",
|
|
114
|
+
"jiti": "^2.5.1",
|
|
115
|
+
"js-cookie": "^2.2.1",
|
|
116
|
+
"less": "^4.2.0",
|
|
117
|
+
"less-loader": "^12.2.0",
|
|
118
|
+
"lint-staged": "^16.1.6",
|
|
119
|
+
"lodash-es": "^4.17.21",
|
|
120
|
+
"mini-css-extract-plugin": "^2.9.2",
|
|
121
|
+
"moment": "^2.30.1",
|
|
122
|
+
"path-browserify": "^1.0.1",
|
|
123
|
+
"postcss": "^8.4.49",
|
|
124
|
+
"postcss-loader": "^7.3.4",
|
|
125
|
+
"process": "^0.11.10",
|
|
126
|
+
"querystring-es3": "^0.2.1",
|
|
127
|
+
"react-compiler-webpack": "^0.2.0",
|
|
128
|
+
"sass": "^1.92.0",
|
|
129
|
+
"sass-loader": "^16.0.5",
|
|
130
|
+
"stream-browserify": "^3.0.0",
|
|
131
|
+
"style-loader": "^3.3.4",
|
|
132
|
+
"terser-webpack-plugin": "^5.3.11",
|
|
133
|
+
"ts-jest": "^29.3.4",
|
|
134
|
+
"ts-loader": "^9.5.1",
|
|
135
|
+
"typescript": "^5.6.3",
|
|
136
|
+
"url": "^0.11.4",
|
|
137
|
+
"util": "^0.12.5",
|
|
138
|
+
"webpack-merge": "^6.0.1"
|
|
139
|
+
},
|
|
140
|
+
"lint-staged": {
|
|
141
|
+
"*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}": [
|
|
142
|
+
"biome check --files-ignore-unknown=true"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useThemeStore } from '@store/theme';
|
|
2
|
+
import { Button } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
export default function BasePage() {
|
|
6
|
+
const theme = useThemeStore(state => state.theme);
|
|
7
|
+
const setTheme = useThemeStore(state => state.setTheme);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button type="primary">antd按钮</Button>
|
|
12
|
+
<button
|
|
13
|
+
type="button"
|
|
14
|
+
className={
|
|
15
|
+
' dark:text-red-600 dark:bg-[var(--tailwindssantd-color-primary)] bg-[var(--tailwindssantd-color-primary)]'
|
|
16
|
+
}
|
|
17
|
+
>
|
|
18
|
+
tailwind按钮
|
|
19
|
+
</button>
|
|
20
|
+
<button type="button" onClick={() => setTheme('dark')}>
|
|
21
|
+
切换主题({theme})
|
|
22
|
+
</button>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import UnFindPng from '@config/public/404.png';
|
|
2
|
+
import { Button, Empty } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useNavigate } from 'react-router';
|
|
5
|
+
|
|
6
|
+
export const UnPageFind = () => {
|
|
7
|
+
const navigate = useNavigate();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className='p-4 w-full h-full relative flex justify-center items-center'>
|
|
11
|
+
<Empty
|
|
12
|
+
image={UnFindPng}
|
|
13
|
+
description={
|
|
14
|
+
<div className='flex flex-col gap-2 justify-center items-center'>
|
|
15
|
+
<h2>抱歉,页面无法访问…</h2>
|
|
16
|
+
<span>404,网址错误或已失效。请检查网址。</span>
|
|
17
|
+
<Button size={'large'} type={'primary'} className='w-24' onClick={() => navigate('/')}>
|
|
18
|
+
返回首页
|
|
19
|
+
</Button>
|
|
20
|
+
</div>
|
|
21
|
+
}
|
|
22
|
+
></Empty>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default UnPageFind;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createStyles } from "antd-style"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const useStyles = createStyles(({ token, isDarkMode }) => ({
|
|
6
|
+
button: {
|
|
7
|
+
backgroundColor: token.colorPrimary,
|
|
8
|
+
width: '100px',
|
|
9
|
+
color: isDarkMode ? token.colorText : "#fff",
|
|
10
|
+
padding: `${token.paddingXS}px ${token.paddingSM}px`,
|
|
11
|
+
borderRadius: token.borderRadius,
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
transition: 'all 0.3s ease',
|
|
14
|
+
|
|
15
|
+
'&:hover': {
|
|
16
|
+
backgroundColor: token.colorPrimaryHover,
|
|
17
|
+
},
|
|
18
|
+
'&:active': {
|
|
19
|
+
backgroundColor: token.colorPrimaryActive,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
export default function Base() {
|
|
25
|
+
const { styles } = useStyles();
|
|
26
|
+
return (
|
|
27
|
+
<div className={styles.button}>
|
|
28
|
+
Base
|
|
29
|
+
{/* <Button type="primary">antd按钮</Button> */}
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useThemeStore } from '@store/theme';
|
|
2
|
+
import { Button } from 'antd';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
export default function BasePage() {
|
|
6
|
+
const theme = useThemeStore(state => state.theme);
|
|
7
|
+
const setTheme = useThemeStore(state => state.setTheme);
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button type="primary">antd按钮</Button>
|
|
12
|
+
<button
|
|
13
|
+
type="button"
|
|
14
|
+
className={
|
|
15
|
+
' dark:text-red-600 dark:bg-[var(--tailwindssantd-color-primary)] bg-[var(--tailwindssantd-color-primary)]'
|
|
16
|
+
}
|
|
17
|
+
>
|
|
18
|
+
tailwind按钮
|
|
19
|
+
</button>
|
|
20
|
+
<button type="button" onClick={() => setTheme('dark')}>
|
|
21
|
+
切换主题({theme})
|
|
22
|
+
</button>
|
|
23
|
+
</>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
html,
|
|
2
|
+
body {
|
|
3
|
+
padding: 0;
|
|
4
|
+
margin: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
font-family: PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
#root {
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
p {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* {
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
-moz-osx-font-smoothing: grayscale;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
main {
|
|
26
|
+
flex: 1;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
.module__app {
|
|
35
|
+
height: calc(100vh - 50px) !important;
|
|
36
|
+
position: relative;
|
|
37
|
+
width: 100%;
|
|
38
|
+
-webkit-box-pack: start;
|
|
39
|
+
place-content: flex-start;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
-webkit-font-smoothing: antialiased;
|
|
42
|
+
overflow: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:root {
|
|
46
|
+
--red-1: 255, 236, 232;
|
|
47
|
+
--red-2: 253, 205, 197;
|
|
48
|
+
--red-3: 251, 172, 163;
|
|
49
|
+
--red-4: 249, 137, 129;
|
|
50
|
+
--red-5: 247, 101, 96;
|
|
51
|
+
--red-6: 245, 63, 63;
|
|
52
|
+
--red-7: 203, 39, 45;
|
|
53
|
+
--red-8: 161, 21, 30;
|
|
54
|
+
--red-9: 119, 8, 19;
|
|
55
|
+
--red-10: 77, 0, 10;
|
|
56
|
+
--orangered-1: 255, 243, 232;
|
|
57
|
+
--orangered-2: 253, 221, 195;
|
|
58
|
+
--orangered-3: 252, 197, 159;
|
|
59
|
+
--orangered-4: 250, 172, 123;
|
|
60
|
+
--orangered-5: 249, 144, 87;
|
|
61
|
+
--orangered-6: 247, 114, 52;
|
|
62
|
+
--orangered-7: 204, 81, 32;
|
|
63
|
+
--orangered-8: 162, 53, 17;
|
|
64
|
+
--orangered-9: 119, 31, 6;
|
|
65
|
+
--orangered-10: 77, 14, 0;
|
|
66
|
+
--orange-1: 255, 247, 232;
|
|
67
|
+
--orange-2: 255, 228, 186;
|
|
68
|
+
--orange-3: 255, 207, 139;
|
|
69
|
+
--orange-4: 255, 182, 93;
|
|
70
|
+
--orange-5: 255, 154, 46;
|
|
71
|
+
--orange-6: 255, 125, 0;
|
|
72
|
+
--orange-7: 210, 95, 0;
|
|
73
|
+
--orange-8: 166, 69, 0;
|
|
74
|
+
--orange-9: 121, 46, 0;
|
|
75
|
+
--orange-10: 77, 27, 0;
|
|
76
|
+
--gold-1: 255, 252, 232;
|
|
77
|
+
--gold-2: 253, 244, 191;
|
|
78
|
+
--gold-3: 252, 233, 150;
|
|
79
|
+
--gold-4: 250, 220, 109;
|
|
80
|
+
--gold-5: 249, 204, 69;
|
|
81
|
+
--gold-6: 247, 186, 30;
|
|
82
|
+
--gold-7: 204, 146, 19;
|
|
83
|
+
--gold-8: 162, 109, 10;
|
|
84
|
+
--gold-9: 119, 75, 4;
|
|
85
|
+
--gold-10: 77, 45, 0;
|
|
86
|
+
--yellow-1: 254, 255, 232;
|
|
87
|
+
--yellow-2: 254, 254, 190;
|
|
88
|
+
--yellow-3: 253, 250, 148;
|
|
89
|
+
--yellow-4: 252, 242, 107;
|
|
90
|
+
--yellow-5: 251, 232, 66;
|
|
91
|
+
--yellow-6: 250, 220, 25;
|
|
92
|
+
--yellow-7: 207, 175, 15;
|
|
93
|
+
--yellow-8: 163, 132, 8;
|
|
94
|
+
--yellow-9: 120, 93, 3;
|
|
95
|
+
--yellow-10: 77, 56, 0;
|
|
96
|
+
--lime-1: 252, 255, 232;
|
|
97
|
+
--lime-2: 237, 248, 187;
|
|
98
|
+
--lime-3: 220, 241, 144;
|
|
99
|
+
--lime-4: 201, 233, 104;
|
|
100
|
+
--lime-5: 181, 226, 65;
|
|
101
|
+
--lime-6: 159, 219, 29;
|
|
102
|
+
--lime-7: 126, 183, 18;
|
|
103
|
+
--lime-8: 95, 148, 10;
|
|
104
|
+
--lime-9: 67, 112, 4;
|
|
105
|
+
--lime-10: 42, 77, 0;
|
|
106
|
+
--green-1: 232, 255, 234;
|
|
107
|
+
--green-2: 175, 240, 181;
|
|
108
|
+
--green-3: 123, 225, 136;
|
|
109
|
+
--green-4: 76, 210, 99;
|
|
110
|
+
--green-5: 35, 195, 67;
|
|
111
|
+
--green-6: 0, 180, 42;
|
|
112
|
+
--green-7: 0, 154, 41;
|
|
113
|
+
--green-8: 0, 128, 38;
|
|
114
|
+
--green-9: 0, 102, 34;
|
|
115
|
+
--green-10: 0, 77, 28;
|
|
116
|
+
--cyan-1: 232, 255, 251;
|
|
117
|
+
--cyan-2: 183, 244, 236;
|
|
118
|
+
--cyan-3: 137, 233, 224;
|
|
119
|
+
--cyan-4: 94, 223, 214;
|
|
120
|
+
--cyan-5: 55, 212, 207;
|
|
121
|
+
--cyan-6: 20, 201, 201;
|
|
122
|
+
--cyan-7: 13, 165, 170;
|
|
123
|
+
--cyan-8: 7, 130, 139;
|
|
124
|
+
--cyan-9: 3, 97, 108;
|
|
125
|
+
--cyan-10: 0, 66, 77;
|
|
126
|
+
--blue-1: 232, 247, 255;
|
|
127
|
+
--blue-2: 195, 231, 254;
|
|
128
|
+
--blue-3: 159, 212, 253;
|
|
129
|
+
--blue-4: 123, 192, 252;
|
|
130
|
+
--blue-5: 87, 169, 251;
|
|
131
|
+
--blue-6: 52, 145, 250;
|
|
132
|
+
--blue-7: 32, 108, 207;
|
|
133
|
+
--blue-8: 17, 75, 163;
|
|
134
|
+
--blue-9: 6, 48, 120;
|
|
135
|
+
--blue-10: 0, 26, 77;
|
|
136
|
+
--arcoblue-1: 232, 243, 255;
|
|
137
|
+
--arcoblue-2: 190, 218, 255;
|
|
138
|
+
--arcoblue-3: 148, 191, 255;
|
|
139
|
+
--arcoblue-4: 106, 161, 255;
|
|
140
|
+
--arcoblue-5: 64, 128, 255;
|
|
141
|
+
--arcoblue-6: 22, 93, 255;
|
|
142
|
+
--arcoblue-7: 14, 66, 210;
|
|
143
|
+
--arcoblue-8: 7, 44, 166;
|
|
144
|
+
--arcoblue-9: 3, 26, 121;
|
|
145
|
+
--arcoblue-10: 0, 13, 77;
|
|
146
|
+
--purple-1: 245, 232, 255;
|
|
147
|
+
--purple-2: 221, 190, 246;
|
|
148
|
+
--purple-3: 195, 150, 237;
|
|
149
|
+
--purple-4: 168, 113, 227;
|
|
150
|
+
--purple-5: 141, 78, 218;
|
|
151
|
+
--purple-6: 114, 46, 209;
|
|
152
|
+
--purple-7: 85, 29, 176;
|
|
153
|
+
--purple-8: 60, 16, 143;
|
|
154
|
+
--purple-9: 39, 6, 110;
|
|
155
|
+
--purple-10: 22, 0, 77;
|
|
156
|
+
--pinkpurple-1: 255, 232, 251;
|
|
157
|
+
--pinkpurple-2: 247, 186, 239;
|
|
158
|
+
--pinkpurple-3: 240, 142, 230;
|
|
159
|
+
--pinkpurple-4: 232, 101, 223;
|
|
160
|
+
--pinkpurple-5: 225, 62, 219;
|
|
161
|
+
--pinkpurple-6: 217, 26, 217;
|
|
162
|
+
--pinkpurple-7: 176, 16, 182;
|
|
163
|
+
--pinkpurple-8: 138, 9, 147;
|
|
164
|
+
--pinkpurple-9: 101, 3, 112;
|
|
165
|
+
--pinkpurple-10: 66, 0, 77;
|
|
166
|
+
--magenta-1: 255, 232, 241;
|
|
167
|
+
--magenta-2: 253, 194, 219;
|
|
168
|
+
--magenta-3: 251, 157, 199;
|
|
169
|
+
--magenta-4: 249, 121, 183;
|
|
170
|
+
--magenta-5: 247, 84, 168;
|
|
171
|
+
--magenta-6: 245, 49, 157;
|
|
172
|
+
--magenta-7: 203, 30, 131;
|
|
173
|
+
--magenta-8: 161, 16, 105;
|
|
174
|
+
--magenta-9: 119, 6, 79;
|
|
175
|
+
--magenta-10: 77, 0, 52;
|
|
176
|
+
--gray-1: 247, 248, 250;
|
|
177
|
+
--gray-2: 242, 243, 245;
|
|
178
|
+
--gray-4: 201, 205, 212;
|
|
179
|
+
--gray-5: 169, 174, 184;
|
|
180
|
+
--gray-6: 134, 144, 156;
|
|
181
|
+
--gray-7: 107, 119, 133;
|
|
182
|
+
--gray-8: 78, 89, 105;
|
|
183
|
+
--gray-9: 39, 46, 59;
|
|
184
|
+
--gray-10: 29, 33, 41;
|
|
185
|
+
--data-2: var(--arcoblue-2);
|
|
186
|
+
--data-3: 85, 197, 253;
|
|
187
|
+
--data-4: 156, 220, 252;
|
|
188
|
+
--data-8: var(--green-2);
|
|
189
|
+
--data-10: var(--purple-2);
|
|
190
|
+
--success-1: var(--green-1);
|
|
191
|
+
--success-2: var(--green-2);
|
|
192
|
+
--success-3: var(--green-3);
|
|
193
|
+
--success-4: var(--green-4);
|
|
194
|
+
--success-5: var(--green-5);
|
|
195
|
+
--success-6: var(--green-6);
|
|
196
|
+
--success-7: var(--green-7);
|
|
197
|
+
--success-8: var(--green-8);
|
|
198
|
+
--success-9: var(--green-9);
|
|
199
|
+
--success-10: var(--green-10);
|
|
200
|
+
--primary-1: var(--arcoblue-1);
|
|
201
|
+
--primary-2: var(--arcoblue-2);
|
|
202
|
+
--primary-3: var(--arcoblue-3);
|
|
203
|
+
--primary-4: var(--arcoblue-4);
|
|
204
|
+
--primary-5: var(--arcoblue-5);
|
|
205
|
+
--primary-6: var(--arcoblue-6);
|
|
206
|
+
--primary-7: var(--arcoblue-7);
|
|
207
|
+
--primary-8: var(--arcoblue-8);
|
|
208
|
+
--primary-9: var(--arcoblue-9);
|
|
209
|
+
--primary-10: var(--arcoblue-10);
|
|
210
|
+
--danger-1: var(--red-1);
|
|
211
|
+
--danger-2: var(--red-2);
|
|
212
|
+
--danger-3: var(--red-3);
|
|
213
|
+
--danger-4: var(--red-4);
|
|
214
|
+
--danger-5: var(--red-5);
|
|
215
|
+
--danger-6: var(--red-6);
|
|
216
|
+
--danger-7: var(--red-7);
|
|
217
|
+
--danger-8: var(--red-8);
|
|
218
|
+
--danger-9: var(--red-9);
|
|
219
|
+
--danger-10: var(--red-10);
|
|
220
|
+
--warning-1: var(--orange-1);
|
|
221
|
+
--warning-2: var(--orange-2);
|
|
222
|
+
--warning-3: var(--orange-3);
|
|
223
|
+
--warning-4: var(--orange-4);
|
|
224
|
+
--warning-5: var(--orange-5);
|
|
225
|
+
--warning-6: var(--orange-6);
|
|
226
|
+
--warning-7: var(--orange-7);
|
|
227
|
+
--warning-8: var(--orange-8);
|
|
228
|
+
--warning-9: var(--orange-9);
|
|
229
|
+
--warning-10: var(--orange-10);
|
|
230
|
+
--link-1: var(--arcoblue-1);
|
|
231
|
+
--link-2: var(--arcoblue-2);
|
|
232
|
+
--link-3: var(--arcoblue-3);
|
|
233
|
+
--link-4: var(--arcoblue-4);
|
|
234
|
+
--link-5: var(--arcoblue-5);
|
|
235
|
+
--link-6: var(--arcoblue-6);
|
|
236
|
+
--link-7: var(--arcoblue-7);
|
|
237
|
+
--link-8: var(--arcoblue-8);
|
|
238
|
+
--link-9: var(--arcoblue-9);
|
|
239
|
+
--link-10: var(--arcoblue-10);
|
|
240
|
+
--data-1: var(--arcoblue-5);
|
|
241
|
+
--data-5: var(--orange-6);
|
|
242
|
+
--data-6: var(--orange-3);
|
|
243
|
+
--data-7: var(--green-4);
|
|
244
|
+
--data-9: var(--purple-4);
|
|
245
|
+
--data-11: var(--gold-6);
|
|
246
|
+
--data-12: var(--gold-4);
|
|
247
|
+
--data-13: var(--lime-6);
|
|
248
|
+
--data-14: var(--lime-4);
|
|
249
|
+
--data-15: var(--magenta-4);
|
|
250
|
+
--data-16: var(--magenta-3);
|
|
251
|
+
--data-17: var(--cyan-6);
|
|
252
|
+
--data-18: var(--cyan-3);
|
|
253
|
+
--data-19: var(--pinkpurple-4);
|
|
254
|
+
--data-20: var(--pinkpurple-2);
|
|
255
|
+
--container--layout--padding: 20px 32px;
|
|
256
|
+
--border-radius-medium: 4px;
|
|
257
|
+
--color-border-3: #dde2e9;
|
|
258
|
+
--primary-5: 66, 129, 255;
|
|
259
|
+
--color-text-1: rgb(29, 33, 41);
|
|
260
|
+
--color-fill-2: rgb(242, 243, 245);
|
|
261
|
+
--gray-3: 229, 230, 235;
|
|
262
|
+
--color-neutral-3: rgb(var(--gray-3));
|
|
263
|
+
--container--form--layout--header-height: 64px;
|
|
264
|
+
--contexify-zIndex: 666 !important;
|
|
265
|
+
--contexify-menu-minWidth: 220px !important;
|
|
266
|
+
--contexify-menu-padding: 6px !important;
|
|
267
|
+
--contexify-menu-radius: var(--border-radius-medium) !important;
|
|
268
|
+
--contexify-menu-bgColor: #fff !important;
|
|
269
|
+
--contexify-menu-shadow: 0 4px 10px rgba(0, 0, 0, .1) !important;
|
|
270
|
+
--contexify-menu-negatePadding: var(--contexify-menu-padding) !important;
|
|
271
|
+
--contexify-separator-color: rgba(0, 0, 0, .2) !important;
|
|
272
|
+
--contexify-separator-margin: 5px !important;
|
|
273
|
+
--contexify-itemContent-padding: 6px !important;
|
|
274
|
+
--contexify-activeItem-radius: 4px !important;
|
|
275
|
+
--contexify-item-color: #333 !important;
|
|
276
|
+
--contexify-activeItem-color: var(--color-text-1) !important;
|
|
277
|
+
--contexify-activeItem-bgColor: var(--color-fill-2) !important;
|
|
278
|
+
--contexify-rightSlot-color: #6f6e77 !important;
|
|
279
|
+
--contexify-activeRightSlot-color: #fff !important;
|
|
280
|
+
--contexify-arrow-color: #6f6e77 !important;
|
|
281
|
+
--contexify-activeArrow-color: #fff !important
|
|
282
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
const appDirectory = fs.realpathSync(process.cwd());
|
|
5
|
+
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
|
6
|
+
const resolveOwn = relativePath => path.resolve(__dirname, '.', relativePath);
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
resolveApp,
|
|
11
|
+
resolveOwn
|
|
12
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
require("esbuild-register");
|
|
2
|
+
const { getConventionRoutes } = require("../../router/routesConvention");
|
|
3
|
+
const { getRoutes } = require("../../router/getRoutes");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const fs = require("fs");
|
|
6
|
+
|
|
7
|
+
class RoutesConventionsRspackPlugin {
|
|
8
|
+
constructor(options = {}) {
|
|
9
|
+
this.options = {
|
|
10
|
+
base: "src/pages",
|
|
11
|
+
exclude: [
|
|
12
|
+
/\/components?\//,
|
|
13
|
+
/\/models\//,
|
|
14
|
+
/\/utils?\//,
|
|
15
|
+
/^_/,
|
|
16
|
+
/\.d\.ts$/,
|
|
17
|
+
/\.(test|spec|e2e)\.(ts|tsx|js|jsx)$/,
|
|
18
|
+
],
|
|
19
|
+
...options,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
generateRoutes() {
|
|
24
|
+
const routesFilePath = path.resolve(process.cwd(), "src/routes.ts");
|
|
25
|
+
|
|
26
|
+
if (fs.existsSync(routesFilePath)) {
|
|
27
|
+
try {
|
|
28
|
+
delete require.cache[routesFilePath];
|
|
29
|
+
const routesModule = require(routesFilePath);
|
|
30
|
+
const configRoutes = routesModule.routes;
|
|
31
|
+
|
|
32
|
+
if (
|
|
33
|
+
configRoutes &&
|
|
34
|
+
Array.isArray(configRoutes) &&
|
|
35
|
+
configRoutes.length > 0
|
|
36
|
+
) {
|
|
37
|
+
console.log("📋 使用配置式路由...", configRoutes);
|
|
38
|
+
return getRoutes(configRoutes);
|
|
39
|
+
} else {
|
|
40
|
+
console.log("📋 routes文件存在但为空,使用约定式路由...");
|
|
41
|
+
}
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.warn("⚠️ 读取routes文件失败,使用约定式路由...", error.message);
|
|
44
|
+
}
|
|
45
|
+
} else {
|
|
46
|
+
console.log("📋 routes文件不存在,使用约定式路由...");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const routes = getConventionRoutes({
|
|
50
|
+
base: path.resolve(process.cwd(), this.options.base),
|
|
51
|
+
prefix: "pages/",
|
|
52
|
+
exclude: this.options.exclude,
|
|
53
|
+
});
|
|
54
|
+
return routes;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
apply(compiler) {
|
|
58
|
+
const pluginName = "RoutesConventionsRspackPlugin";
|
|
59
|
+
|
|
60
|
+
compiler.hooks.beforeCompile.tapAsync(pluginName, (params, callback) => {
|
|
61
|
+
try {
|
|
62
|
+
console.log("🚀 生成约定式路由...");
|
|
63
|
+
const routes = this.generateRoutes();
|
|
64
|
+
|
|
65
|
+
// 找到 DefinePlugin 并更新路由数据
|
|
66
|
+
const definePlugin = compiler.options.plugins.find(
|
|
67
|
+
(plugin) => plugin.constructor.name === "DefinePlugin"
|
|
68
|
+
);
|
|
69
|
+
console.log("注入数据 -------->", routes, definePlugin);
|
|
70
|
+
|
|
71
|
+
if (definePlugin && definePlugin.definitions) {
|
|
72
|
+
definePlugin.definitions["__CONVENTION_ROUTES__"] =
|
|
73
|
+
JSON.stringify(routes);
|
|
74
|
+
} else if (definePlugin) {
|
|
75
|
+
// 对于 rspack,直接修改 DefinePlugin 的内部定义
|
|
76
|
+
// rspack 的 DefinePlugin 可能将定义存储在不同的属性中
|
|
77
|
+
if (!definePlugin.definitions) {
|
|
78
|
+
definePlugin.definitions = {};
|
|
79
|
+
}
|
|
80
|
+
definePlugin.definitions["__CONVENTION_ROUTES__"] =
|
|
81
|
+
JSON.stringify(routes);
|
|
82
|
+
|
|
83
|
+
// 或者尝试直接访问 rspack DefinePlugin 的内部结构
|
|
84
|
+
// 可能需要访问 definePlugin.options 或其他属性
|
|
85
|
+
if (definePlugin.options) {
|
|
86
|
+
definePlugin.options["__CONVENTION_ROUTES__"] =
|
|
87
|
+
JSON.stringify(routes);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
callback();
|
|
92
|
+
} catch (error) {
|
|
93
|
+
console.error("❌ 生成约定式路由失败:", error);
|
|
94
|
+
callback(error);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
module.exports = RoutesConventionsRspackPlugin;
|