@4399ywkf/cli 0.0.22 → 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,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,18 @@
|
|
|
1
|
+
import React, { lazy } from "react";
|
|
2
|
+
import { createBrowserRouter, Navigate } from "react-router";
|
|
3
|
+
|
|
4
|
+
export const createRouter = (basename?: string) => {
|
|
5
|
+
return createBrowserRouter([
|
|
6
|
+
{
|
|
7
|
+
path: "/",
|
|
8
|
+
element: <Navigate to="/base" replace />,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
path: "/base",
|
|
12
|
+
Component: lazy(() => import("@/pages/base")),
|
|
13
|
+
},
|
|
14
|
+
], {
|
|
15
|
+
basename: basename || "/",
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
2
|
+
|
|
3
|
+
// 模拟 window.matchMedia
|
|
4
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
5
|
+
writable: true,
|
|
6
|
+
value: jest.fn().mockImplementation((query) => ({
|
|
7
|
+
matches: false,
|
|
8
|
+
media: query,
|
|
9
|
+
onchange: null,
|
|
10
|
+
addListener: jest.fn(), // deprecated
|
|
11
|
+
removeListener: jest.fn(), // deprecated
|
|
12
|
+
addEventListener: jest.fn(),
|
|
13
|
+
removeEventListener: jest.fn(),
|
|
14
|
+
dispatchEvent: jest.fn(),
|
|
15
|
+
})),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// 模拟 ResizeObserver
|
|
19
|
+
global.ResizeObserver = jest.fn().mockImplementation(() => ({
|
|
20
|
+
observe: jest.fn(),
|
|
21
|
+
unobserve: jest.fn(),
|
|
22
|
+
disconnect: jest.fn(),
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
// 模拟 IntersectionObserver
|
|
26
|
+
global.IntersectionObserver = jest.fn().mockImplementation(() => ({
|
|
27
|
+
observe: jest.fn(),
|
|
28
|
+
unobserve: jest.fn(),
|
|
29
|
+
disconnect: jest.fn(),
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
// 模拟 Garfish (微前端框架)
|
|
33
|
+
(global as any).window = global.window || {};
|
|
34
|
+
(global as any).window.__GARFISH__ = true;
|
|
35
|
+
(global as any).window.Garfish = {
|
|
36
|
+
channel: {
|
|
37
|
+
emit: jest.fn(),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Theme, css } from 'antd-style';
|
|
2
|
+
import { rgba } from 'polished';
|
|
3
|
+
|
|
4
|
+
export default ({ token }: { prefixCls: string; token: Theme }) => css`
|
|
5
|
+
.${token.prefixCls}-popover {
|
|
6
|
+
z-index: 1100;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.${token.prefixCls}-menu-sub.${token.prefixCls}-menu-vertical {
|
|
10
|
+
border: 1px solid ${token.colorBorder};
|
|
11
|
+
box-shadow: ${token.boxShadow};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.${token.prefixCls}-menu-item-selected {
|
|
15
|
+
.${token.prefixCls}-menu-title-content {
|
|
16
|
+
color: ${token.colorText};
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${token.prefixCls}-modal-mask, .${token.prefixCls}-drawer-mask {
|
|
21
|
+
background: ${rgba(token.colorBgLayout, 0.5)} !important;
|
|
22
|
+
backdrop-filter: blur(2px);
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
blue,
|
|
3
|
+
cyan,
|
|
4
|
+
geekblue,
|
|
5
|
+
gold,
|
|
6
|
+
green,
|
|
7
|
+
lime,
|
|
8
|
+
magenta,
|
|
9
|
+
orange,
|
|
10
|
+
purple,
|
|
11
|
+
red,
|
|
12
|
+
volcano,
|
|
13
|
+
yellow,
|
|
14
|
+
} from '@/color/colors';
|
|
15
|
+
import { mauve, olive, sage, sand, slate } from '@/color/neutrals';
|
|
16
|
+
|
|
17
|
+
export const primaryColors = {
|
|
18
|
+
blue: blue.dark[9],
|
|
19
|
+
cyan: cyan.dark[9],
|
|
20
|
+
geekblue: geekblue.dark[9],
|
|
21
|
+
gold: gold.dark[9],
|
|
22
|
+
green: green.dark[9],
|
|
23
|
+
lime: lime.dark[9],
|
|
24
|
+
magenta: magenta.dark[9],
|
|
25
|
+
orange: orange.dark[9],
|
|
26
|
+
purple: purple.dark[9],
|
|
27
|
+
red: red.dark[9],
|
|
28
|
+
volcano: volcano.dark[9],
|
|
29
|
+
yellow: yellow.dark[9],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type PrimaryColorsObj = typeof primaryColors;
|
|
33
|
+
export type PrimaryColors = keyof PrimaryColorsObj;
|
|
34
|
+
export const primaryColorsSwatches = [
|
|
35
|
+
primaryColors.red,
|
|
36
|
+
primaryColors.orange,
|
|
37
|
+
primaryColors.gold,
|
|
38
|
+
primaryColors.yellow,
|
|
39
|
+
primaryColors.lime,
|
|
40
|
+
primaryColors.green,
|
|
41
|
+
primaryColors.cyan,
|
|
42
|
+
primaryColors.blue,
|
|
43
|
+
primaryColors.geekblue,
|
|
44
|
+
primaryColors.purple,
|
|
45
|
+
primaryColors.magenta,
|
|
46
|
+
primaryColors.volcano,
|
|
47
|
+
];
|
|
48
|
+
export const neutralColors = {
|
|
49
|
+
mauve: mauve.dark[9],
|
|
50
|
+
olive: olive.dark[9],
|
|
51
|
+
sage: sage.dark[9],
|
|
52
|
+
sand: sand.dark[9],
|
|
53
|
+
slate: slate.dark[9],
|
|
54
|
+
};
|
|
55
|
+
export const neutralColorsSwatches = [
|
|
56
|
+
neutralColors.mauve,
|
|
57
|
+
neutralColors.slate,
|
|
58
|
+
neutralColors.sage,
|
|
59
|
+
neutralColors.olive,
|
|
60
|
+
neutralColors.sand,
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export type NeutralColorsObj = typeof neutralColors;
|
|
64
|
+
export type NeutralColors = keyof NeutralColorsObj;
|
|
65
|
+
|
|
66
|
+
export const findCustomThemeName = (type: 'primary' | 'neutral', value: string) => {
|
|
67
|
+
const res = type === 'primary' ? primaryColors : neutralColors;
|
|
68
|
+
const result = Object.entries(res).find((item) => item[1] === value);
|
|
69
|
+
return result?.[0];
|
|
70
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Theme, css } from 'antd-style';
|
|
2
|
+
|
|
3
|
+
// fix ios input keyboard
|
|
4
|
+
// overflow: hidden;
|
|
5
|
+
// ref: https://zhuanlan.zhihu.com/p/113855026
|
|
6
|
+
export default ({ token }: { prefixCls: string; token: Theme }) => css`
|
|
7
|
+
html,
|
|
8
|
+
body{
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
overscroll-behavior: none;
|
|
12
|
+
|
|
13
|
+
height: 100%;
|
|
14
|
+
min-height: 100dvh;
|
|
15
|
+
max-height: 100dvh;
|
|
16
|
+
|
|
17
|
+
background: ${token.colorBgLayout};
|
|
18
|
+
|
|
19
|
+
@media (min-device-width: 576px) {
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body {
|
|
25
|
+
/* 提高合成层级,强制硬件加速,否则会有渲染黑边出现 */
|
|
26
|
+
will-change: opacity;
|
|
27
|
+
transform: translateZ(0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
* {
|
|
31
|
+
scrollbar-color: ${token.colorFill} transparent;
|
|
32
|
+
scrollbar-width: thin;
|
|
33
|
+
|
|
34
|
+
::-webkit-scrollbar {
|
|
35
|
+
width: 0.75em;
|
|
36
|
+
height: 0.75em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
::-webkit-scrollbar-thumb {
|
|
40
|
+
border-radius: 10px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:hover::-webkit-scrollbar-thumb {
|
|
44
|
+
border: 3px solid transparent;
|
|
45
|
+
background-color: ${token.colorText};
|
|
46
|
+
background-clip: content-box;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
::-webkit-scrollbar-track {
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode, type Ref } from 'react';
|
|
3
|
+
import { FlexboxProps } from 'react-layout-kit';
|
|
4
|
+
|
|
5
|
+
import { DivProps } from '@/types';
|
|
6
|
+
|
|
7
|
+
export interface SyntaxHighlighterProps extends DivProps {
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
children: string;
|
|
10
|
+
enableTransformer?: HighlighterProps['enableTransformer'];
|
|
11
|
+
language: HighlighterProps['language'];
|
|
12
|
+
ref?: Ref<HTMLDivElement>;
|
|
13
|
+
theme?: HighlighterProps['theme'];
|
|
14
|
+
variant?: HighlighterProps['variant'];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface HighlighterProps extends Omit<FlexboxProps, 'children' | 'wrap'> {
|
|
18
|
+
allowChangeLanguage?: boolean;
|
|
19
|
+
animated?: boolean;
|
|
20
|
+
bodyRender?: (props: { content: string; language: string; originalNode: ReactNode }) => ReactNode;
|
|
21
|
+
children: string;
|
|
22
|
+
copyable?: boolean;
|
|
23
|
+
defaultExpand?: boolean;
|
|
24
|
+
enableTransformer?: boolean;
|
|
25
|
+
fileName?: string;
|
|
26
|
+
fullFeatured?: boolean;
|
|
27
|
+
icon?: ReactNode;
|
|
28
|
+
language: string;
|
|
29
|
+
shadow?: boolean;
|
|
30
|
+
showLanguage?: boolean;
|
|
31
|
+
theme?: 'lobe-theme';
|
|
32
|
+
variant?: 'filled' | 'outlined' | 'borderless';
|
|
33
|
+
wrap?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createGlobalStyle } from "antd-style";
|
|
2
|
+
export * from "./customTheme";
|
|
3
|
+
|
|
4
|
+
import antdOverride from "./antdOverride";
|
|
5
|
+
import global from "./global";
|
|
6
|
+
|
|
7
|
+
const prefixCls = process.env.APP_NAME ?? "ant";
|
|
8
|
+
|
|
9
|
+
export const GlobalStyle = createGlobalStyle(({ theme }) => [
|
|
10
|
+
global({ prefixCls, token: theme }),
|
|
11
|
+
antdOverride({ prefixCls, token: theme }),
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export * from "./text";
|
|
15
|
+
export * from "./highlighter";
|
|
16
|
+
export * from "./mermaid";
|
|
17
|
+
|
|
18
|
+
export { generateCustomStylish as lobeCustomStylish } from "./theme/customStylish";
|
|
19
|
+
export { generateCustomToken as lobeCustomToken } from "./theme/customToken";
|
|
20
|
+
export {
|
|
21
|
+
generateColorNeutralPalette,
|
|
22
|
+
generateColorPalette,
|
|
23
|
+
} from "./theme/generateColorPalette";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { MappingAlgorithm } from "antd/es/theme/interface";
|
|
2
|
+
|
|
3
|
+
import { colorScales } from "@/color/colors";
|
|
4
|
+
import { neutralColorScales } from "@/color/neutrals";
|
|
5
|
+
import type { ColorScaleItem } from "@/color/types";
|
|
6
|
+
|
|
7
|
+
import { NeutralColors, PrimaryColors } from "../../customTheme";
|
|
8
|
+
import {
|
|
9
|
+
generateColorNeutralPalette,
|
|
10
|
+
generateColorPalette,
|
|
11
|
+
} from "../generateColorPalette";
|
|
12
|
+
import darkBaseToken from "../token/dark";
|
|
13
|
+
|
|
14
|
+
export const darkAlgorithm: MappingAlgorithm = (seedToken, mapToken) => {
|
|
15
|
+
const primaryColor = (seedToken as any).primaryColor as PrimaryColors;
|
|
16
|
+
const neutralColor = (seedToken as any).neutralColor as NeutralColors;
|
|
17
|
+
|
|
18
|
+
let primaryTokens = {};
|
|
19
|
+
let neutralTokens = {};
|
|
20
|
+
|
|
21
|
+
// generate primary color Token with colorPrimary
|
|
22
|
+
const primaryScale: ColorScaleItem = colorScales[primaryColor];
|
|
23
|
+
|
|
24
|
+
if (primaryScale) {
|
|
25
|
+
primaryTokens = generateColorPalette({
|
|
26
|
+
appearance: "dark",
|
|
27
|
+
scale: primaryScale,
|
|
28
|
+
type: "Primary",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// generate neutral color Token with colorBgBase
|
|
33
|
+
const neutralScale = neutralColorScales[neutralColor];
|
|
34
|
+
if (neutralScale) {
|
|
35
|
+
neutralTokens = generateColorNeutralPalette({
|
|
36
|
+
appearance: "dark",
|
|
37
|
+
scale: neutralScale,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
...mapToken!,
|
|
43
|
+
...darkBaseToken,
|
|
44
|
+
...primaryTokens,
|
|
45
|
+
...neutralTokens,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MappingAlgorithm } from "antd/es/theme/interface";
|
|
2
|
+
|
|
3
|
+
import { colorScales } from "@/color/colors";
|
|
4
|
+
import { neutralColorScales } from "@/color/neutrals";
|
|
5
|
+
import type { ColorScaleItem } from "@/color/types";
|
|
6
|
+
|
|
7
|
+
import { NeutralColors, PrimaryColors } from "../../customTheme";
|
|
8
|
+
import {
|
|
9
|
+
generateColorNeutralPalette,
|
|
10
|
+
generateColorPalette,
|
|
11
|
+
} from "../generateColorPalette";
|
|
12
|
+
import lightBaseToken from "../token/light";
|
|
13
|
+
|
|
14
|
+
export const lightAlgorithm: MappingAlgorithm = (seedToken, mapToken) => {
|
|
15
|
+
const primaryColor = (seedToken as any).primaryColor as PrimaryColors;
|
|
16
|
+
const neutralColor = (seedToken as any).neutralColor as NeutralColors;
|
|
17
|
+
|
|
18
|
+
let primaryTokens = {};
|
|
19
|
+
let neutralTokens = {};
|
|
20
|
+
const primaryScale: ColorScaleItem = colorScales[primaryColor];
|
|
21
|
+
|
|
22
|
+
if (primaryScale) {
|
|
23
|
+
primaryTokens = generateColorPalette({
|
|
24
|
+
appearance: "light",
|
|
25
|
+
scale: primaryScale,
|
|
26
|
+
type: "Primary",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const neutralScale = neutralColorScales[neutralColor];
|
|
31
|
+
if (neutralScale) {
|
|
32
|
+
neutralTokens = generateColorNeutralPalette({
|
|
33
|
+
appearance: "light",
|
|
34
|
+
scale: neutralScale,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
...mapToken!,
|
|
40
|
+
...lightBaseToken,
|
|
41
|
+
...primaryTokens,
|
|
42
|
+
...neutralTokens,
|
|
43
|
+
};
|
|
44
|
+
};
|