@modern-js/module-tools-docs 2.0.2 → 2.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/doc_build/html/main/index.html +1 -1
- package/doc_build/static/css/main.css +267 -660
- package/doc_build/static/css/main.css.map +1 -1
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +6 -23
- package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +1 -1
- package/doc_build/static/js/async/en_api_config_build-config.js +79 -36
- package/doc_build/static/js/async/en_api_config_build-config.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_build-preset.js +40 -20
- package/doc_build/static/js/async/en_api_config_build-preset.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_design-system.js +33800 -2340
- package/doc_build/static/js/async/en_api_config_design-system.js.map +1 -1
- package/doc_build/static/js/async/en_api_config_plugins.js +15 -19
- package/doc_build/static/js/async/en_api_config_testing.js +26 -24
- package/doc_build/static/js/async/en_api_config_testing.js.map +1 -1
- package/doc_build/static/js/async/{en_api_.js → en_api_index.js} +10 -14
- package/doc_build/static/js/async/en_api_index.js.map +1 -0
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +24 -26
- package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_asset.js +16 -41
- package/doc_build/static/js/async/en_guide_advance_asset.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_build-umd.js +20 -24
- package/doc_build/static/js/async/en_guide_advance_copy.js +25 -23
- package/doc_build/static/js/async/en_guide_advance_copy.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_external-dependency.js +15 -19
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +352 -94
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +11 -15
- package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +1 -1
- package/doc_build/static/js/async/en_guide_advance_theme-config.js +26 -24
- package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +275 -88
- package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_command-preview.js +45 -33
- package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +274 -196
- package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +18 -20
- package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js +27 -32
- package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +33 -15
- package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +1 -1
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js +24 -63
- package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +1 -1
- package/doc_build/static/js/async/en_guide_best-practices_components.js +39 -27
- package/doc_build/static/js/async/en_guide_best-practices_components.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_getting-started.js +288 -45
- package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_welcome.js +27 -13
- package/doc_build/static/js/async/en_guide_intro_welcome.js.map +1 -1
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +16 -12
- package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +1 -1
- package/doc_build/static/js/async/{en_.js → en_index.js} +12 -16
- package/doc_build/static/js/async/en_index.js.map +1 -0
- package/doc_build/static/js/async/en_plugins_guide_getting-started.js +17 -21
- package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +20 -24
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js +19 -23
- package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +1 -1
- package/doc_build/static/js/async/en_plugins_official-list_overview.js +8 -12
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +166 -367
- package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +1 -1
- package/doc_build/static/js/async/{api_config_build-config.js → zh_api_config_build-config.js} +80 -35
- package/doc_build/static/js/async/{api_config_build-config.js.map → zh_api_config_build-config.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_build-preset.js → zh_api_config_build-preset.js} +39 -21
- package/doc_build/static/js/async/{api_config_build-preset.js.map → zh_api_config_build-preset.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_design-system.js → zh_api_config_design-system.js} +27 -23
- package/doc_build/static/js/async/{api_config_design-system.js.map → zh_api_config_design-system.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_plugins.js → zh_api_config_plugins.js} +17 -21
- package/doc_build/static/js/async/{api_config_plugins.js.map → zh_api_config_plugins.js.map} +1 -1
- package/doc_build/static/js/async/{api_config_testing.js → zh_api_config_testing.js} +28 -26
- package/doc_build/static/js/async/{api_config_testing.js.map → zh_api_config_testing.js.map} +1 -1
- package/doc_build/static/js/async/{api_.js → zh_api_index.js} +10 -14
- package/doc_build/static/js/async/zh_api_index.js.map +1 -0
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js → zh_api_plugin-api_plugin-hooks.js} +25 -27
- package/doc_build/static/js/async/{api_plugin-api_plugin-hooks.js.map → zh_api_plugin-api_plugin-hooks.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_asset.js → zh_guide_advance_asset.js} +18 -43
- package/doc_build/static/js/async/{guide_advance_asset.js.map → zh_guide_advance_asset.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_build-umd.js → zh_guide_advance_build-umd.js} +22 -26
- package/doc_build/static/js/async/{guide_advance_build-umd.js.map → zh_guide_advance_build-umd.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_copy.js → zh_guide_advance_copy.js} +26 -24
- package/doc_build/static/js/async/{guide_advance_copy.js.map → zh_guide_advance_copy.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_external-dependency.js → zh_guide_advance_external-dependency.js} +17 -21
- package/doc_build/static/js/async/{guide_advance_external-dependency.js.map → zh_guide_advance_external-dependency.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js → zh_guide_advance_in-depth-about-build.js} +353 -95
- package/doc_build/static/js/async/{guide_advance_in-depth-about-build.js.map → zh_guide_advance_in-depth-about-build.js.map} +1 -1
- package/doc_build/static/js/async/{guide_advance_in-depth-about-dev-command.js → zh_guide_advance_in-depth-about-dev-command.js} +16 -18
- package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.js.map +1 -0
- package/doc_build/static/js/async/{guide_advance_theme-config.js → zh_guide_advance_theme-config.js} +24 -22
- package/doc_build/static/js/async/{guide_advance_theme-config.js.map → zh_guide_advance_theme-config.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_before-getting-started.js → zh_guide_basic_before-getting-started.js} +272 -85
- package/doc_build/static/js/async/zh_guide_basic_before-getting-started.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_command-preview.js → zh_guide_basic_command-preview.js} +47 -35
- package/doc_build/static/js/async/zh_guide_basic_command-preview.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_modify-output-product.js → zh_guide_basic_modify-output-product.js} +203 -88
- package/doc_build/static/js/async/zh_guide_basic_modify-output-product.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js → zh_guide_basic_publish-your-project.js} +20 -22
- package/doc_build/static/js/async/{guide_basic_publish-your-project.js.map → zh_guide_basic_publish-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_test-your-project.js → zh_guide_basic_test-your-project.js} +30 -35
- package/doc_build/static/js/async/{guide_basic_test-your-project.js.map → zh_guide_basic_test-your-project.js.map} +1 -1
- package/doc_build/static/js/async/{guide_basic_use-micro-generator.js → zh_guide_basic_use-micro-generator.js} +40 -20
- package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.js.map +1 -0
- package/doc_build/static/js/async/{guide_basic_using-storybook.js → zh_guide_basic_using-storybook.js} +78 -171
- package/doc_build/static/js/async/{guide_basic_using-storybook.js.map → zh_guide_basic_using-storybook.js.map} +1 -1
- package/doc_build/static/js/async/{guide_best-practices_components.js → zh_guide_best-practices_components.js} +41 -29
- package/doc_build/static/js/async/{guide_best-practices_components.js.map → zh_guide_best-practices_components.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_getting-started.js → zh_guide_intro_getting-started.js} +291 -42
- package/doc_build/static/js/async/{guide_intro_getting-started.js.map → zh_guide_intro_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{guide_intro_welcome.js → zh_guide_intro_welcome.js} +28 -14
- package/doc_build/static/js/async/zh_guide_intro_welcome.js.map +1 -0
- package/doc_build/static/js/async/{guide_intro_why-module-engineering-solution.js → zh_guide_intro_why-module-engineering-solution.js} +18 -14
- package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.js.map +1 -0
- package/doc_build/static/js/async/{index.js → zh_index.js} +11 -15
- package/doc_build/static/js/async/zh_index.js.map +1 -0
- package/doc_build/static/js/async/{plugins_guide_getting-started.js → zh_plugins_guide_getting-started.js} +19 -23
- package/doc_build/static/js/async/{plugins_guide_getting-started.js.map → zh_plugins_guide_getting-started.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js → zh_plugins_guide_plugin-object.js} +22 -26
- package/doc_build/static/js/async/{plugins_guide_plugin-object.js.map → zh_plugins_guide_plugin-object.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_guide_setup-function.js → zh_plugins_guide_setup-function.js} +21 -25
- package/doc_build/static/js/async/{plugins_guide_setup-function.js.map → zh_plugins_guide_setup-function.js.map} +1 -1
- package/doc_build/static/js/async/{plugins_official-list_overview.js → zh_plugins_official-list_overview.js} +10 -14
- package/doc_build/static/js/async/zh_plugins_official-list_overview.js.map +1 -0
- package/doc_build/static/js/builder-runtime.js +1 -1
- package/doc_build/static/js/builder-runtime.js.map +1 -1
- package/doc_build/static/js/lib-polyfill.js +3433 -16355
- package/doc_build/static/js/lib-polyfill.js.map +1 -1
- package/doc_build/static/js/main.js +2073 -2700
- package/doc_build/static/js/main.js.map +1 -1
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +485 -1689
- package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +1 -1
- package/doc_build/static/search_index.json +1 -0
- package/docs/.island/dist/404.html +41 -0
- package/docs/.island/dist/assets/asset.26aea654.js +160 -0
- package/docs/.island/dist/assets/asset.36e3d3c9.js +160 -0
- package/docs/.island/dist/assets/before-getting-started.0e863740.js +87 -0
- package/docs/.island/dist/assets/before-getting-started.2c6e6b8a.js +87 -0
- package/docs/.island/dist/assets/build-config.460d11d9.js +804 -0
- package/docs/.island/dist/assets/build-config.e155e534.js +854 -0
- package/docs/.island/dist/assets/build-preset.6c2c6c62.js +256 -0
- package/docs/.island/dist/assets/build-preset.d3da921d.js +256 -0
- package/docs/.island/dist/assets/build-umd.ba00f028.js +264 -0
- package/docs/.island/dist/assets/build-umd.edb9d163.js +273 -0
- package/docs/.island/dist/assets/command-preview.1dc93921.js +264 -0
- package/docs/.island/dist/assets/command-preview.ef7a9d01.js +264 -0
- package/docs/.island/dist/assets/components.esm.03560353.js +9 -0
- package/docs/.island/dist/assets/copy.28dc4d5f.js +277 -0
- package/docs/.island/dist/assets/copy.f4625565.js +277 -0
- package/docs/.island/dist/assets/design-system.8993234c.js +1254 -0
- package/docs/.island/dist/assets/design-system.b0ba163f.js +639 -0
- package/docs/.island/dist/assets/dev.b373b152.js +37 -0
- package/docs/.island/dist/assets/dev.b39fd42a.js +37 -0
- package/docs/.island/dist/assets/down.f35427d3.svg +1 -0
- package/docs/.island/dist/assets/extension.4bf3526b.js +1 -0
- package/docs/.island/dist/assets/extension.d64ed0b8.js +469 -0
- package/docs/.island/dist/assets/external-dependency.2ede7532.js +156 -0
- package/docs/.island/dist/assets/external-dependency.92ca89e0.js +156 -0
- package/docs/.island/dist/assets/getting-started.822cf0b2.js +117 -0
- package/docs/.island/dist/assets/getting-started.e2764829.js +114 -0
- package/docs/.island/dist/assets/github.3bf8ccee.svg +1 -0
- package/docs/.island/dist/assets/in-depth-about-build.94cc902d.js +375 -0
- package/docs/.island/dist/assets/in-depth-about-build.aa74de10.js +374 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.877bdb83.js +33 -0
- package/docs/.island/dist/assets/in-depth-about-dev-command.9736befd.js +39 -0
- package/docs/.island/dist/assets/index.01786ba7.js +30 -0
- package/docs/.island/dist/assets/index.6cef6f5f.js +4 -0
- package/docs/.island/dist/assets/index.cb118238.js +36 -0
- package/docs/.island/dist/assets/index.ccb6ce27.js +4 -0
- package/docs/.island/dist/assets/island_inject.69495876.js +1 -0
- package/docs/.island/dist/assets/island_inject.cdfb22d9.js +1 -0
- package/docs/.island/dist/assets/loading.8c9bb911.svg +1 -0
- package/docs/.island/dist/assets/modify-output-product.9e2394d7.js +100 -0
- package/docs/.island/dist/assets/modify-output-product.f363845a.js +100 -0
- package/docs/.island/dist/assets/moon.6b705924.svg +3 -0
- package/docs/.island/dist/assets/plugin.70a61997.js +42 -0
- package/docs/.island/dist/assets/plugin.80b12ee2.js +42 -0
- package/docs/.island/dist/assets/publish-your-project.7321c10e.js +164 -0
- package/docs/.island/dist/assets/publish-your-project.7326359f.js +166 -0
- package/docs/.island/dist/assets/right.89674cd7.svg +1 -0
- package/docs/.island/dist/assets/search.0aea6901.svg +1 -0
- package/docs/.island/dist/assets/search.11353245.js +222 -0
- package/docs/.island/dist/assets/search.a1b1cff3.js +3 -0
- package/docs/.island/dist/assets/search.f9025ced.js +3 -0
- package/docs/.island/dist/assets/style.09015a4b.css +1 -0
- package/docs/.island/dist/assets/style.2e5f7bc2.css +1970 -0
- package/docs/.island/dist/assets/sun.841dac10.svg +11 -0
- package/docs/.island/dist/assets/test-your-project.8ab2809e.js +190 -0
- package/docs/.island/dist/assets/test-your-project.9ae2a49e.js +190 -0
- package/docs/.island/dist/assets/test.2bfe276b.js +66 -0
- package/docs/.island/dist/assets/test.a2c00a3f.js +67 -0
- package/docs/.island/dist/assets/translator.b1077c44.svg +1 -0
- package/docs/.island/dist/assets/use-micro-generator.13c1a09f.js +60 -0
- package/docs/.island/dist/assets/use-micro-generator.dfe877f6.js +60 -0
- package/docs/.island/dist/assets/using-storybook.adb88cb8.js +260 -0
- package/docs/.island/dist/assets/using-storybook.b8e7dd04.js +260 -0
- package/docs/.island/dist/assets/welcome.94880043.js +13 -0
- package/docs/.island/dist/assets/welcome.b2140e7e.js +13 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.bfe7981a.js +26 -0
- package/docs/.island/dist/assets/why-module-engineering-solution.e31cd19f.js +26 -0
- package/docs/.island/dist/chunk-COLCRJ2V.js +1 -0
- package/docs/.island/dist/chunk-K5FMOYDC.js +10 -0
- package/docs/.island/dist/chunk-WE42KMYS.js +26 -0
- package/docs/.island/dist/client-entry.js +3 -0
- package/docs/.island/dist/en/api/build-config.html +344 -0
- package/docs/.island/dist/en/api/build-preset.html +82 -0
- package/docs/.island/dist/en/api/design-system.html +155 -0
- package/docs/.island/dist/en/api/dev.html +45 -0
- package/docs/.island/dist/en/api/index.html +41 -0
- package/docs/.island/dist/en/api/plugin.html +48 -0
- package/docs/.island/dist/en/api/test.html +58 -0
- package/docs/.island/dist/en/guide/advance/asset.html +68 -0
- package/docs/.island/dist/en/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/en/guide/advance/copy.html +82 -0
- package/docs/.island/dist/en/guide/advance/extension.html +41 -0
- package/docs/.island/dist/en/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/en/guide/advance/in-depth-about-dev-command.html +51 -0
- package/docs/.island/dist/en/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/en/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/en/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/en/guide/basic/publish-your-project.html +91 -0
- package/docs/.island/dist/en/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/en/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/en/guide/basic/using-storybook.html +113 -0
- package/docs/.island/dist/en/guide/intro/getting-started.html +76 -0
- package/docs/.island/dist/en/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/en/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/en/index.html +42 -0
- package/docs/.island/dist/react-dom.js +1 -0
- package/docs/.island/dist/react-dom_client.js +1 -0
- package/docs/.island/dist/react.js +1 -0
- package/docs/.island/dist/react_jsx-runtime.js +10 -0
- package/docs/.island/dist/ssr-manifest.json +57 -0
- package/docs/.island/dist/test-result.png +0 -0
- package/docs/.island/dist/why-module-solution.png +0 -0
- package/docs/.island/dist/zh/api/build-config.html +361 -0
- package/docs/.island/dist/zh/api/build-preset.html +82 -0
- package/docs/.island/dist/zh/api/design-system.html +149 -0
- package/docs/.island/dist/zh/api/dev.html +46 -0
- package/docs/.island/dist/zh/api/index.html +41 -0
- package/docs/.island/dist/zh/api/plugin.html +48 -0
- package/docs/.island/dist/zh/api/test.html +59 -0
- package/docs/.island/dist/zh/guide/advance/asset.html +68 -0
- package/docs/.island/dist/zh/guide/advance/build-umd.html +72 -0
- package/docs/.island/dist/zh/guide/advance/copy.html +82 -0
- package/docs/.island/dist/zh/guide/advance/extension.html +127 -0
- package/docs/.island/dist/zh/guide/advance/external-dependency.html +71 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-build.html +148 -0
- package/docs/.island/dist/zh/guide/advance/in-depth-about-dev-command.html +53 -0
- package/docs/.island/dist/zh/guide/basic/before-getting-started.html +127 -0
- package/docs/.island/dist/zh/guide/basic/command-preview.html +100 -0
- package/docs/.island/dist/zh/guide/basic/modify-output-product.html +140 -0
- package/docs/.island/dist/zh/guide/basic/publish-your-project.html +92 -0
- package/docs/.island/dist/zh/guide/basic/test-your-project.html +72 -0
- package/docs/.island/dist/zh/guide/basic/use-micro-generator.html +65 -0
- package/docs/.island/dist/zh/guide/basic/using-storybook.html +114 -0
- package/docs/.island/dist/zh/guide/intro/getting-started.html +79 -0
- package/docs/.island/dist/zh/guide/intro/welcome.html +53 -0
- package/docs/.island/dist/zh/guide/intro/why-module-engineering-solution.html +49 -0
- package/docs/.island/dist/zh/index.html +42 -0
- package/docs/en/api/config/build-config.md +15 -5
- package/docs/en/api/config/build-preset.md +3 -2
- package/docs/en/api/config/design-system.md +623 -615
- package/docs/en/api/config/plugins.md +2 -2
- package/docs/en/api/config/testing.md +2 -1
- package/docs/en/guide/advance/asset.mdx +0 -4
- package/docs/en/guide/advance/build-umd.mdx +3 -3
- package/docs/en/guide/advance/in-depth-about-build.md +14 -13
- package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/en/guide/basic/before-getting-started.md +16 -9
- package/docs/en/guide/basic/command-preview.md +2 -2
- package/docs/en/guide/basic/modify-output-product.md +65 -69
- package/docs/en/guide/basic/test-your-project.mdx +1 -3
- package/docs/en/guide/basic/use-micro-generator.md +4 -0
- package/docs/en/guide/basic/using-storybook.mdx +1 -13
- package/docs/en/guide/intro/getting-started.md +16 -7
- package/docs/en/plugins/guide/getting-started.mdx +2 -2
- package/docs/en/plugins/guide/plugin-object.mdx +5 -5
- package/docs/zh/api/config/build-config.md +18 -6
- package/docs/zh/api/config/build-preset.md +3 -2
- package/docs/zh/api/config/design-system.md +2 -2
- package/docs/zh/api/config/plugins.md +2 -2
- package/docs/zh/api/config/testing.md +3 -2
- package/docs/zh/guide/advance/asset.mdx +0 -5
- package/docs/zh/guide/advance/build-umd.mdx +3 -3
- package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
- package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
- package/docs/zh/guide/basic/before-getting-started.md +15 -8
- package/docs/zh/guide/basic/command-preview.md +2 -2
- package/docs/zh/guide/basic/modify-output-product.md +17 -19
- package/docs/zh/guide/basic/test-your-project.mdx +1 -3
- package/docs/zh/guide/basic/use-micro-generator.md +5 -1
- package/docs/zh/guide/basic/using-storybook.mdx +9 -19
- package/docs/zh/guide/intro/getting-started.md +17 -11
- package/docs/zh/plugins/guide/getting-started.mdx +2 -2
- package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
- package/modern.config.ts +11 -5
- package/package.json +4 -4
- package/doc_build/static/js/async/api_.js.map +0 -1
- package/doc_build/static/js/async/en_.js.map +0 -1
- package/doc_build/static/js/async/en_api_.js.map +0 -1
- package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
- package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
- package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
- package/doc_build/static/js/async/index.js.map +0 -1
- package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
package/doc_build/static/js/async/{api_config_build-preset.js → zh_api_config_build-preset.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_api_config_build-preset"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/api/config/build-preset.md":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -18,11 +18,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18
18
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const CH = {
|
|
22
22
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
23
23
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const chCodeConfig = {
|
|
26
26
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
27
27
|
"theme": {
|
|
28
28
|
"name": "nord",
|
|
@@ -1185,12 +1185,12 @@ var chCodeConfig = {
|
|
|
1185
1185
|
"autoImport": true,
|
|
1186
1186
|
"showCopyButton": true,
|
|
1187
1187
|
"skipLanguages": [],
|
|
1188
|
-
"filepath": "/Users/
|
|
1188
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/api/config/build-preset.md"
|
|
1189
1189
|
};
|
|
1190
|
-
|
|
1190
|
+
const frontmatter = {
|
|
1191
1191
|
"sidebar_position": 2
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const toc = [{
|
|
1194
1194
|
"id": "string",
|
|
1195
1195
|
"text": "string",
|
|
1196
1196
|
"depth": 2
|
|
@@ -1219,10 +1219,10 @@ var toc = [{
|
|
|
1219
1219
|
"text": "Function",
|
|
1220
1220
|
"depth": 2
|
|
1221
1221
|
}];
|
|
1222
|
-
|
|
1223
|
-
|
|
1222
|
+
const title = `BuildPreset`;
|
|
1223
|
+
const content = "\"---\\nsidebar_position: 2\\n---\\n\\n# BuildPreset\\n\\n构建的预设字符串或者预设函数。提供开箱即用的构建配置。\\n\\n- type: `string | Function`\\n- default: `undefined`\\n\\n## string\\n\\n字符串的形式可以让你直接使用内置的预设。\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildPreset: 'npm-library',\\n});\\n```\\n\\n### `'npm-library'`\\n\\n在类 [NPM](https://www.npmjs.com/) 包管理器下使用的 Library 通用模式,包含 `esm` 和 `cjs` 两种 Bundle 产物,并且包含一份类型文件。\\n\\n:::info\\n关于类 [NPM](https://www.npmjs.com/) 包管理器\\n\\n- [npm](https://www.npmjs.com)\\n- [yarn](https://yarnpkg.com/)\\n- [pnpm](https://pnpm.io/)\\n\\n:::\\n\\n```json package.json\\n{\\n \\\"main\\\": \\\"./dist/lib/index.js\\\",\\n \\\"module\\\": \\\"./dist/es/index.js\\\",\\n \\\"types\\\": \\\"./dist/types/index.d.ts\\\"\\n}\\n```\\n\\n预设字符串对应的构建配置:\\n\\n```js\\nexport const buildConfig = [\\n {\\n format: 'cjs',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './lib',\\n },\\n {\\n format: 'esm',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './es',\\n },\\n {\\n buildType: 'bundle',\\n outDir: './types',\\n dts: {\\n only: true,\\n },\\n },\\n];\\n```\\n\\n### `'npm-library-with-umd'`\\n\\n在类 [NPM](https://www.npmjs.com/) 包管理器下使用,并且 Library 支持类似 [unpkg](https://unpkg.com/) 的模式。在预设 `'npm-library'` 的基础上,额外提供 `umd` 产物。\\n\\n```json package.json\\n{\\n \\\"main\\\": \\\"./dist/lib/index.js\\\",\\n \\\"module\\\": \\\"./dist/es/index.js\\\",\\n \\\"types\\\": \\\"./dist/types/index.d.ts\\\",\\n \\\"unpkg\\\": \\\"./dist/umd/index.js\\\",\\n};\\n```\\n\\n预设字符串对应的构建配置:\\n\\n```js\\nexport const buildConfig = [\\n {\\n format: 'cjs',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './lib',\\n },\\n {\\n format: 'esm',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './es',\\n },\\n {\\n format: 'umd',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './umd',\\n },\\n {\\n buildType: 'bundle',\\n outDir: './types',\\n dts: {\\n only: true,\\n },\\n },\\n];\\n```\\n\\n### `'npm-component'`\\n\\n在类 [NPM](https://www.npmjs.com/) 包管理器下使用的 组件(库)通用模式。包含 `esm` 和 `cjs` 两种 Bundleless 产物(便于 _[Tree shaking](https://developer.mozilla.org/zh-CN/docs/Glossary/Tree_shaking)_ 优化),以及包含一份类型文件。\\n\\n对于源码中包含的样式文件,产物中提供样式的编译产物和样式的源文件。\\n\\n```json package.json\\n{\\n \\\"main\\\": \\\"./dist/lib/index.js\\\", // bundleless type\\n \\\"module\\\": \\\"./dist/es/index.js\\\", // bundleless type\\n \\\"types\\\": \\\"./dist/types/index.d.ts\\\",\\n};\\n```\\n\\n预设字符串对应的构建配置:\\n\\n```js\\nexport const buildConfig = [\\n {\\n format: 'cjs',\\n target: 'es6',\\n buildType: 'bundleless',\\n outDir: './lib',\\n },\\n {\\n format: 'esm',\\n target: 'es6',\\n buildType: 'bundleless',\\n outDir: './es',\\n },\\n {\\n buildType: 'bundleless',\\n outDir: './types',\\n dts: {\\n only: true,\\n },\\n },\\n];\\n```\\n\\n### `'npm-component-with-umd'`\\n\\n在类 [NPM](https://www.npmjs.com/) 包管理器下使用的组件(库),同时支持类 [unpkg](https://unpkg.com/) 的模式。 在预设 `'npm-component'` 的基础上,额外提供 `umd` 产物。\\n\\n```json package.json\\n{\\n \\\"main\\\": \\\"./dist/lib/index.js\\\", // bundleless type\\n \\\"module\\\": \\\"./dist/es/index.js\\\", // bundleless type\\n \\\"types\\\": \\\"./dist/types/index.d.ts\\\",\\n \\\"unpkg\\\": \\\"./dist/umd/index.js\\\",\\n};\\n```\\n\\n```js\\nexport const buildConfig = [\\n {\\n format: 'cjs',\\n target: 'es6',\\n buildType: 'bundleless',\\n outDir: './lib',\\n },\\n {\\n format: 'esm',\\n target: 'es6',\\n buildType: 'bundleless',\\n outDir: './es',\\n },\\n {\\n format: 'umd',\\n target: 'es6',\\n buildType: 'bundle',\\n outDir: './umd',\\n },\\n {\\n buildType: 'bundleless',\\n outDir: './types',\\n dts: {\\n only: true,\\n },\\n },\\n];\\n```\\n\\n### 关于预设值支持的 ECMAScript 版本以及 `{es5...esnext}`\\n\\n当想要使用支持其他 ECMAScript 版本的 `buildPreset` 预设的时候,可以直接在 `'npm-library'`、`'npm-library-with-umd'`、`'npm-component'`、`'npm-component-with-umd'` 这些预设值后面增加想要支持的版本。\\n\\n例如希望 `'npm-library'` 预设支持 `'es2017'`,则可以按照如下方式配置:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildPreset: 'npm-library-es2017',\\n});\\n```\\n\\n## Function\\n\\n函数的配置方式,可以通过 `preset` 参数获取到预设值,然后对里面的构建配置进行修改来自定义你的构建配置。\\n以下是一个函数的配置方式的例子,它配置了压缩构建产物的功能:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nexport default defineConfig({\\n buildPreset({ preset }) {\\n const { NPM_LIBRARY } = preset;\\n return NPM_LIBRARY.map(config => {\\n config.minify = {\\n compress: {\\n drop_console: true,\\n },\\n };\\n return config;\\n });\\n },\\n});\\n```\\n\"";
|
|
1224
1224
|
function _createMdxContent(props) {
|
|
1225
|
-
|
|
1225
|
+
const _components = Object.assign({
|
|
1226
1226
|
h1: "h1",
|
|
1227
1227
|
a: "a",
|
|
1228
1228
|
p: "p",
|
|
@@ -1530,6 +1530,8 @@ function _createMdxContent(props) {
|
|
|
1530
1530
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1531
1531
|
children: ["在类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1532
1532
|
href: "https://www.npmjs.com/",
|
|
1533
|
+
target: "_blank",
|
|
1534
|
+
rel: "nofollow",
|
|
1533
1535
|
children: "NPM"
|
|
1534
1536
|
}), " 包管理器下使用的 Library 通用模式,包含 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1535
1537
|
children: "esm"
|
|
@@ -1542,26 +1544,34 @@ function _createMdxContent(props) {
|
|
|
1542
1544
|
className: "modern-directive-title",
|
|
1543
1545
|
children: "INFO"
|
|
1544
1546
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.div, {
|
|
1545
|
-
className: "
|
|
1547
|
+
className: "modern-directive-content",
|
|
1546
1548
|
children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1547
|
-
children: ["关于类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1549
|
+
children: ["\n关于类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1548
1550
|
href: "https://www.npmjs.com/",
|
|
1551
|
+
target: "_blank",
|
|
1552
|
+
rel: "nofollow",
|
|
1549
1553
|
children: "NPM"
|
|
1550
1554
|
}), " 包管理器"]
|
|
1551
1555
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
1552
1556
|
children: ["\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1553
1557
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1554
1558
|
href: "https://www.npmjs.com",
|
|
1559
|
+
target: "_blank",
|
|
1560
|
+
rel: "nofollow",
|
|
1555
1561
|
children: "npm"
|
|
1556
1562
|
})
|
|
1557
1563
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1558
1564
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1559
1565
|
href: "https://yarnpkg.com/",
|
|
1566
|
+
target: "_blank",
|
|
1567
|
+
rel: "nofollow",
|
|
1560
1568
|
children: "yarn"
|
|
1561
1569
|
})
|
|
1562
1570
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.li, {
|
|
1563
1571
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
1564
1572
|
href: "https://pnpm.io/",
|
|
1573
|
+
target: "_blank",
|
|
1574
|
+
rel: "nofollow",
|
|
1565
1575
|
children: "pnpm"
|
|
1566
1576
|
})
|
|
1567
1577
|
}), "\n"]
|
|
@@ -2688,9 +2698,13 @@ function _createMdxContent(props) {
|
|
|
2688
2698
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
2689
2699
|
children: ["在类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2690
2700
|
href: "https://www.npmjs.com/",
|
|
2701
|
+
target: "_blank",
|
|
2702
|
+
rel: "nofollow",
|
|
2691
2703
|
children: "NPM"
|
|
2692
2704
|
}), " 包管理器下使用,并且 Library 支持类似 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
2693
2705
|
href: "https://unpkg.com/",
|
|
2706
|
+
target: "_blank",
|
|
2707
|
+
rel: "nofollow",
|
|
2694
2708
|
children: "unpkg"
|
|
2695
2709
|
}), " 的模式。在预设 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
2696
2710
|
children: "'npm-library'"
|
|
@@ -4168,6 +4182,8 @@ function _createMdxContent(props) {
|
|
|
4168
4182
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
4169
4183
|
children: ["在类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
4170
4184
|
href: "https://www.npmjs.com/",
|
|
4185
|
+
target: "_blank",
|
|
4186
|
+
rel: "nofollow",
|
|
4171
4187
|
children: "NPM"
|
|
4172
4188
|
}), " 包管理器下使用的 组件(库)通用模式。包含 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
4173
4189
|
children: "esm"
|
|
@@ -4176,6 +4192,8 @@ function _createMdxContent(props) {
|
|
|
4176
4192
|
}), " 两种 Bundleless 产物(便于 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.em, {
|
|
4177
4193
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
4178
4194
|
href: "https://developer.mozilla.org/zh-CN/docs/Glossary/Tree_shaking",
|
|
4195
|
+
target: "_blank",
|
|
4196
|
+
rel: "nofollow",
|
|
4179
4197
|
children: "Tree shaking"
|
|
4180
4198
|
})
|
|
4181
4199
|
}), " 优化),以及包含一份类型文件。"]
|
|
@@ -5344,9 +5362,13 @@ function _createMdxContent(props) {
|
|
|
5344
5362
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
5345
5363
|
children: ["在类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
5346
5364
|
href: "https://www.npmjs.com/",
|
|
5365
|
+
target: "_blank",
|
|
5366
|
+
rel: "nofollow",
|
|
5347
5367
|
children: "NPM"
|
|
5348
5368
|
}), " 包管理器下使用的组件(库),同时支持类 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
5349
5369
|
href: "https://unpkg.com/",
|
|
5370
|
+
target: "_blank",
|
|
5371
|
+
rel: "nofollow",
|
|
5350
5372
|
children: "unpkg"
|
|
5351
5373
|
}), " 的模式。 在预设 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
5352
5374
|
children: "'npm-component'"
|
|
@@ -6863,7 +6885,7 @@ function _createMdxContent(props) {
|
|
|
6863
6885
|
children: ["例如希望 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
6864
6886
|
children: "'npm-library'"
|
|
6865
6887
|
}), " 预设支持 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
6866
|
-
children: "es2017"
|
|
6888
|
+
children: "'es2017'"
|
|
6867
6889
|
}), ",则可以按照如下方式配置:"]
|
|
6868
6890
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(CH.Code, {
|
|
6869
6891
|
codeConfig: chCodeConfig,
|
|
@@ -7827,23 +7849,19 @@ function _createMdxContent(props) {
|
|
|
7827
7849
|
})]
|
|
7828
7850
|
});
|
|
7829
7851
|
}
|
|
7830
|
-
function MDXContent() {
|
|
7831
|
-
|
|
7832
|
-
var _ref = props.components || {},
|
|
7833
|
-
MDXLayout = _ref.wrapper;
|
|
7852
|
+
function MDXContent(props = {}) {
|
|
7853
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
7834
7854
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
7835
7855
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
7836
7856
|
})) : _createMdxContent(props);
|
|
7837
7857
|
}
|
|
7838
|
-
_c = MDXContent;
|
|
7839
7858
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
7840
7859
|
function _missingMdxReference(id, component, place) {
|
|
7841
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
7860
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/api/config/build-preset.md`" : ""));
|
|
7842
7861
|
}
|
|
7843
|
-
|
|
7844
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
7862
|
+
|
|
7845
7863
|
|
|
7846
7864
|
/***/ })
|
|
7847
7865
|
|
|
7848
7866
|
}]);
|
|
7849
|
-
//# sourceMappingURL=
|
|
7867
|
+
//# sourceMappingURL=zh_api_config_build-preset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/js/async/
|
|
1
|
+
{"version":3,"file":"static/js/async/zh_api_config_build-preset.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA;;;;AAEA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAEA;;AAAA;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;AAEA;;AAAA","sources":["webpack://@modern-js/module-tools-docs/./docs/zh/api/config/build-preset.md"],"names":[],"sourceRoot":""}
|
package/doc_build/static/js/async/{api_config_design-system.js → zh_api_config_design-system.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["
|
|
2
|
+
(self["webpackChunk_modern_js_module_tools_docs"] = self["webpackChunk_modern_js_module_tools_docs"] || []).push([["zh_api_config_design-system"],{
|
|
3
3
|
|
|
4
4
|
/***/ "./docs/zh/api/config/design-system.md":
|
|
5
5
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -18,11 +18,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
18
18
|
/*@jsxRuntime automatic @jsxImportSource react*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const CH = {
|
|
22
22
|
annotations: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.annotations,
|
|
23
23
|
Code: _code_hike_mdx_dist_components_cjs_js__WEBPACK_IMPORTED_MODULE_1__.Code
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
const chCodeConfig = {
|
|
26
26
|
"staticMediaQuery": "not screen, (max-width: 768px)",
|
|
27
27
|
"theme": {
|
|
28
28
|
"name": "nord",
|
|
@@ -1185,12 +1185,12 @@ var chCodeConfig = {
|
|
|
1185
1185
|
"autoImport": true,
|
|
1186
1186
|
"showCopyButton": true,
|
|
1187
1187
|
"skipLanguages": [],
|
|
1188
|
-
"filepath": "/Users/
|
|
1188
|
+
"filepath": "/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/api/config/design-system.md"
|
|
1189
1189
|
};
|
|
1190
|
-
|
|
1190
|
+
const frontmatter = {
|
|
1191
1191
|
"sidebar_position": 3
|
|
1192
1192
|
};
|
|
1193
|
-
|
|
1193
|
+
const toc = [{
|
|
1194
1194
|
"id": "screens",
|
|
1195
1195
|
"text": "Screens",
|
|
1196
1196
|
"depth": 2
|
|
@@ -1255,10 +1255,10 @@ var toc = [{
|
|
|
1255
1255
|
"text": "配置引用",
|
|
1256
1256
|
"depth": 2
|
|
1257
1257
|
}];
|
|
1258
|
-
|
|
1259
|
-
var content = "\"---\\nsidebar_position: 3\\n---\\n\\n# DesignSystem\\n\\n本章描述了有关 designSystem 相关的配置\\n\\n:::tips\\n需要先通过 `pnpm run new` 启用 Tailwind CSS 功能。\\n:::\\n\\n- type: `Object`\\n- default: `见下方配置详情`。\\n\\n<details>\\n <summary>designSystem 配置详情</summary>\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n md: '768px',\\n lg: '1024px',\\n xl: '1280px',\\n },\\n colors: {\\n transparent: 'transparent',\\n current: 'currentColor',\\n\\n black: '#000',\\n white: '#fff',\\n\\n gray: {\\n 100: '#f7fafc',\\n 200: '#edf2f7',\\n 300: '#e2e8f0',\\n 400: '#cbd5e0',\\n 500: '#a0aec0',\\n 600: '#718096',\\n 700: '#4a5568',\\n 800: '#2d3748',\\n 900: '#1a202c',\\n },\\n red: {\\n 100: '#fff5f5',\\n 200: '#fed7d7',\\n 300: '#feb2b2',\\n 400: '#fc8181',\\n 500: '#f56565',\\n 600: '#e53e3e',\\n 700: '#c53030',\\n 800: '#9b2c2c',\\n 900: '#742a2a',\\n },\\n orange: {\\n 100: '#fffaf0',\\n 200: '#feebc8',\\n 300: '#fbd38d',\\n 400: '#f6ad55',\\n 500: '#ed8936',\\n 600: '#dd6b20',\\n 700: '#c05621',\\n 800: '#9c4221',\\n 900: '#7b341e',\\n },\\n yellow: {\\n 100: '#fffff0',\\n 200: '#fefcbf',\\n 300: '#faf089',\\n 400: '#f6e05e',\\n 500: '#ecc94b',\\n 600: '#d69e2e',\\n 700: '#b7791f',\\n 800: '#975a16',\\n 900: '#744210',\\n },\\n green: {\\n 100: '#f0fff4',\\n 200: '#c6f6d5',\\n 300: '#9ae6b4',\\n 400: '#68d391',\\n 500: '#48bb78',\\n 600: '#38a169',\\n 700: '#2f855a',\\n 800: '#276749',\\n 900: '#22543d',\\n },\\n teal: {\\n 100: '#e6fffa',\\n 200: '#b2f5ea',\\n 300: '#81e6d9',\\n 400: '#4fd1c5',\\n 500: '#38b2ac',\\n 600: '#319795',\\n 700: '#2c7a7b',\\n 800: '#285e61',\\n 900: '#234e52',\\n },\\n blue: {\\n 100: '#ebf8ff',\\n 200: '#bee3f8',\\n 300: '#90cdf4',\\n 400: '#63b3ed',\\n 500: '#4299e1',\\n 600: '#3182ce',\\n 700: '#2b6cb0',\\n 800: '#2c5282',\\n 900: '#2a4365',\\n },\\n indigo: {\\n 100: '#ebf4ff',\\n 200: '#c3dafe',\\n 300: '#a3bffa',\\n 400: '#7f9cf5',\\n 500: '#667eea',\\n 600: '#5a67d8',\\n 700: '#4c51bf',\\n 800: '#434190',\\n 900: '#3c366b',\\n },\\n purple: {\\n 100: '#faf5ff',\\n 200: '#e9d8fd',\\n 300: '#d6bcfa',\\n 400: '#b794f4',\\n 500: '#9f7aea',\\n 600: '#805ad5',\\n 700: '#6b46c1',\\n 800: '#553c9a',\\n 900: '#44337a',\\n },\\n pink: {\\n 100: '#fff5f7',\\n 200: '#fed7e2',\\n 300: '#fbb6ce',\\n 400: '#f687b3',\\n 500: '#ed64a6',\\n 600: '#d53f8c',\\n 700: '#b83280',\\n 800: '#97266d',\\n 900: '#702459',\\n },\\n },\\n spacing: {\\n px: '1px',\\n 0: '0',\\n 1: '0.25rem',\\n 2: '0.5rem',\\n 3: '0.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 8: '2rem',\\n 10: '2.5rem',\\n 12: '3rem',\\n 16: '4rem',\\n 20: '5rem',\\n 24: '6rem',\\n 32: '8rem',\\n 40: '10rem',\\n 48: '12rem',\\n 56: '14rem',\\n 64: '16rem',\\n },\\n backgroundColor: theme => theme('colors'),\\n backgroundOpacity: theme => theme('opacity'),\\n backgroundPosition: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n backgroundSize: {\\n auto: 'auto',\\n cover: 'cover',\\n contain: 'contain',\\n },\\n borderColor: theme => ({\\n ...theme('colors'),\\n default: theme('colors.gray.300', 'currentColor'),\\n }),\\n borderOpacity: theme => theme('opacity'),\\n borderRadius: {\\n none: '0',\\n sm: '0.125rem',\\n default: '0.25rem',\\n md: '0.375rem',\\n lg: '0.5rem',\\n full: '9999px',\\n },\\n borderWidth: {\\n default: '1px',\\n 0: '0',\\n 2: '2px',\\n 4: '4px',\\n 8: '8px',\\n },\\n boxShadow: {\\n xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',\\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\\n default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',\\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\\n xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',\\n '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',\\n inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',\\n outline: '0 0 0 3px rgba(66, 153, 225, 0.5)',\\n none: 'none',\\n },\\n container: {},\\n cursor: {\\n auto: 'auto',\\n default: 'default',\\n pointer: 'pointer',\\n wait: 'wait',\\n text: 'text',\\n move: 'move',\\n 'not-allowed': 'not-allowed',\\n },\\n divideColor: theme => theme('borderColor'),\\n divideOpacity: theme => theme('borderOpacity'),\\n divideWidth: theme => theme('borderWidth'),\\n fill: {\\n current: 'currentColor',\\n },\\n flex: {\\n 1: '1 1 0%',\\n auto: '1 1 auto',\\n initial: '0 1 auto',\\n none: 'none',\\n },\\n flexGrow: {\\n 0: '0',\\n default: '1',\\n },\\n flexShrink: {\\n 0: '0',\\n default: '1',\\n },\\n fontFamily: {\\n sans: [\\n 'system-ui',\\n '-apple-system',\\n 'BlinkMacSystemFont',\\n '\\\"Segoe UI\\\"',\\n 'Roboto',\\n '\\\"Helvetica Neue\\\"',\\n 'Arial',\\n '\\\"Noto Sans\\\"',\\n 'sans-serif',\\n '\\\"Apple Color Emoji\\\"',\\n '\\\"Segoe UI Emoji\\\"',\\n '\\\"Segoe UI Symbol\\\"',\\n '\\\"Noto Color Emoji\\\"',\\n ],\\n serif: ['Georgia', 'Cambria', '\\\"Times New Roman\\\"', 'Times', 'serif'],\\n mono: [\\n 'Menlo',\\n 'Monaco',\\n 'Consolas',\\n '\\\"Liberation Mono\\\"',\\n '\\\"Courier New\\\"',\\n 'monospace',\\n ],\\n },\\n fontSize: {\\n xs: '0.75rem',\\n sm: '0.875rem',\\n base: '1rem',\\n lg: '1.125rem',\\n xl: '1.25rem',\\n '2xl': '1.5rem',\\n '3xl': '1.875rem',\\n '4xl': '2.25rem',\\n '5xl': '3rem',\\n '6xl': '4rem',\\n },\\n fontWeight: {\\n hairline: '100',\\n thin: '200',\\n light: '300',\\n normal: '400',\\n medium: '500',\\n semibold: '600',\\n bold: '700',\\n extrabold: '800',\\n black: '900',\\n },\\n height: theme => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n full: '100%',\\n screen: '100vh',\\n }),\\n inset: {\\n 0: '0',\\n auto: 'auto',\\n },\\n letterSpacing: {\\n tighter: '-0.05em',\\n tight: '-0.025em',\\n normal: '0',\\n wide: '0.025em',\\n wider: '0.05em',\\n widest: '0.1em',\\n },\\n lineHeight: {\\n none: '1',\\n tight: '1.25',\\n snug: '1.375',\\n normal: '1.5',\\n relaxed: '1.625',\\n loose: '2',\\n 3: '.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 7: '1.75rem',\\n 8: '2rem',\\n 9: '2.25rem',\\n 10: '2.5rem',\\n },\\n listStyleType: {\\n none: 'none',\\n disc: 'disc',\\n decimal: 'decimal',\\n },\\n margin: (theme, { negative }) => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n }),\\n maxHeight: {\\n full: '100%',\\n screen: '100vh',\\n },\\n maxWidth: (theme, { breakpoints }) => ({\\n none: 'none',\\n xs: '20rem',\\n sm: '24rem',\\n md: '28rem',\\n lg: '32rem',\\n xl: '36rem',\\n '2xl': '42rem',\\n '3xl': '48rem',\\n '4xl': '56rem',\\n '5xl': '64rem',\\n '6xl': '72rem',\\n full: '100%',\\n ...breakpoints(theme('screens')),\\n }),\\n minHeight: {\\n 0: '0',\\n full: '100%',\\n screen: '100vh',\\n },\\n minWidth: {\\n 0: '0',\\n full: '100%',\\n },\\n objectPosition: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n opacity: {\\n 0: '0',\\n 25: '0.25',\\n 50: '0.5',\\n 75: '0.75',\\n 100: '1',\\n },\\n order: {\\n first: '-9999',\\n last: '9999',\\n none: '0',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n },\\n padding: theme => theme('spacing'),\\n placeholderColor: theme => theme('colors'),\\n placeholderOpacity: theme => theme('opacity'),\\n space: (theme, { negative }) => ({\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n }),\\n stroke: {\\n current: 'currentColor',\\n },\\n strokeWidth: {\\n 0: '0',\\n 1: '1',\\n 2: '2',\\n },\\n textColor: theme => theme('colors'),\\n textOpacity: theme => theme('opacity'),\\n width: theme => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n '1/2': '50%',\\n '1/3': '33.333333%',\\n '2/3': '66.666667%',\\n '1/4': '25%',\\n '2/4': '50%',\\n '3/4': '75%',\\n '1/5': '20%',\\n '2/5': '40%',\\n '3/5': '60%',\\n '4/5': '80%',\\n '1/6': '16.666667%',\\n '2/6': '33.333333%',\\n '3/6': '50%',\\n '4/6': '66.666667%',\\n '5/6': '83.333333%',\\n '1/12': '8.333333%',\\n '2/12': '16.666667%',\\n '3/12': '25%',\\n '4/12': '33.333333%',\\n '5/12': '41.666667%',\\n '6/12': '50%',\\n '7/12': '58.333333%',\\n '8/12': '66.666667%',\\n '9/12': '75%',\\n '10/12': '83.333333%',\\n '11/12': '91.666667%',\\n full: '100%',\\n screen: '100vw',\\n }),\\n zIndex: {\\n auto: 'auto',\\n 0: '0',\\n 10: '10',\\n 20: '20',\\n 30: '30',\\n 40: '40',\\n 50: '50',\\n },\\n gap: theme => theme('spacing'),\\n gridTemplateColumns: {\\n none: 'none',\\n 1: 'repeat(1, minmax(0, 1fr))',\\n 2: 'repeat(2, minmax(0, 1fr))',\\n 3: 'repeat(3, minmax(0, 1fr))',\\n 4: 'repeat(4, minmax(0, 1fr))',\\n 5: 'repeat(5, minmax(0, 1fr))',\\n 6: 'repeat(6, minmax(0, 1fr))',\\n 7: 'repeat(7, minmax(0, 1fr))',\\n 8: 'repeat(8, minmax(0, 1fr))',\\n 9: 'repeat(9, minmax(0, 1fr))',\\n 10: 'repeat(10, minmax(0, 1fr))',\\n 11: 'repeat(11, minmax(0, 1fr))',\\n 12: 'repeat(12, minmax(0, 1fr))',\\n },\\n gridColumn: {\\n auto: 'auto',\\n 'span-1': 'span 1 / span 1',\\n 'span-2': 'span 2 / span 2',\\n 'span-3': 'span 3 / span 3',\\n 'span-4': 'span 4 / span 4',\\n 'span-5': 'span 5 / span 5',\\n 'span-6': 'span 6 / span 6',\\n 'span-7': 'span 7 / span 7',\\n 'span-8': 'span 8 / span 8',\\n 'span-9': 'span 9 / span 9',\\n 'span-10': 'span 10 / span 10',\\n 'span-11': 'span 11 / span 11',\\n 'span-12': 'span 12 / span 12',\\n },\\n gridColumnStart: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n 13: '13',\\n },\\n gridColumnEnd: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n 13: '13',\\n },\\n gridTemplateRows: {\\n none: 'none',\\n 1: 'repeat(1, minmax(0, 1fr))',\\n 2: 'repeat(2, minmax(0, 1fr))',\\n 3: 'repeat(3, minmax(0, 1fr))',\\n 4: 'repeat(4, minmax(0, 1fr))',\\n 5: 'repeat(5, minmax(0, 1fr))',\\n 6: 'repeat(6, minmax(0, 1fr))',\\n },\\n gridRow: {\\n auto: 'auto',\\n 'span-1': 'span 1 / span 1',\\n 'span-2': 'span 2 / span 2',\\n 'span-3': 'span 3 / span 3',\\n 'span-4': 'span 4 / span 4',\\n 'span-5': 'span 5 / span 5',\\n 'span-6': 'span 6 / span 6',\\n },\\n gridRowStart: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n },\\n gridRowEnd: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n },\\n transformOrigin: {\\n center: 'center',\\n top: 'top',\\n 'top-right': 'top right',\\n right: 'right',\\n 'bottom-right': 'bottom right',\\n bottom: 'bottom',\\n 'bottom-left': 'bottom left',\\n left: 'left',\\n 'top-left': 'top left',\\n },\\n scale: {\\n 0: '0',\\n 50: '.5',\\n 75: '.75',\\n 90: '.9',\\n 95: '.95',\\n 100: '1',\\n 105: '1.05',\\n 110: '1.1',\\n 125: '1.25',\\n 150: '1.5',\\n },\\n rotate: {\\n '-180': '-180deg',\\n '-90': '-90deg',\\n '-45': '-45deg',\\n 0: '0',\\n 45: '45deg',\\n 90: '90deg',\\n 180: '180deg',\\n },\\n translate: (theme, { negative }) => ({\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n '-full': '-100%',\\n '-1/2': '-50%',\\n '1/2': '50%',\\n full: '100%',\\n }),\\n skew: {\\n '-12': '-12deg',\\n '-6': '-6deg',\\n '-3': '-3deg',\\n 0: '0',\\n 3: '3deg',\\n 6: '6deg',\\n 12: '12deg',\\n },\\n transitionProperty: {\\n none: 'none',\\n all: 'all',\\n default:\\n 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform',\\n colors: 'background-color, border-color, color, fill, stroke',\\n opacity: 'opacity',\\n shadow: 'box-shadow',\\n transform: 'transform',\\n },\\n transitionTimingFunction: {\\n linear: 'linear',\\n in: 'cubic-bezier(0.4, 0, 1, 1)',\\n out: 'cubic-bezier(0, 0, 0.2, 1)',\\n 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',\\n },\\n transitionDuration: {\\n 75: '75ms',\\n 100: '100ms',\\n 150: '150ms',\\n 200: '200ms',\\n 300: '300ms',\\n 500: '500ms',\\n 700: '700ms',\\n 1000: '1000ms',\\n },\\n transitionDelay: {\\n 75: '75ms',\\n 100: '100ms',\\n 150: '150ms',\\n 200: '200ms',\\n 300: '300ms',\\n 500: '500ms',\\n 700: '700ms',\\n 1000: '1000ms',\\n },\\n};\\n```\\n\\n:::tips\\n更多关于[TailwindCSS 配置](https://tailwindcss.com/docs/configuration#theme)\\n:::\\n\\n</details>\\n\\n`designSystem` 用于定义项目的调色板、排版比例(Typographic Scales 或者 Type Scale)、字体列表、断点、边框圆角值等等。因为 Modern.js 借用了 Tailwind Theme 的设计方式,并且内部也集成了 Tailwind CSS,所以 `designSystem` 使用方式与 Tailwind CSS Theme 相同\\n\\n`designSystem` 对象包含 `screens`、`colors` 和 `spacing` 的属性,以及每个可自定义核心插件。\\n\\n## Screens\\n\\n使用`screens` 可以自定义项目中的响应断点:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n md: '768px',\\n lg: '1024px',\\n xl: '1280px',\\n },\\n};\\n```\\n\\n其中 `screens` 对象里的属性名是屏幕名称(用作 `Tailwind CSS` 生成的自适应实用程序变体的前缀,例如 `md:text-center`),值是该断点应在其开始的 `min-width`。\\n\\n默认断点受常见设备分辨率的启发:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n // => @media (min-width: 640px) { ... }\\n\\n md: '768px',\\n // => @media (min-width: 768px) { ... }\\n\\n lg: '1024px',\\n // => @media (min-width: 1024px) { ... }\\n\\n xl: '1280px',\\n // => @media (min-width: 1280px) { ... }\\n },\\n};\\n```\\n\\n你可以在你的项目中使用任意你喜欢的名称作为断点的属性:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n tablet: '640px',\\n // => @media (min-width: 640px) { ... }\\n\\n laptop: '1024px',\\n // => @media (min-width: 1024px) { ... }\\n\\n desktop: '1280px',\\n // => @media (min-width: 1280px) { ... }\\n },\\n};\\n```\\n\\n这些屏幕名称反映在 `utilities` 中,因此 `text-center` 现在是这样的:\\n\\n```css\\n.text-center {\\n text-align: center;\\n}\\n\\n@media (min-width: 640px) {\\n .tablet\\\\:text-center {\\n text-align: center;\\n }\\n}\\n\\n@media (min-width: 1024px) {\\n .laptop\\\\:text-center {\\n text-align: center;\\n }\\n}\\n\\n@media (min-width: 1280px) {\\n .desktop\\\\:text-center {\\n text-align: center;\\n }\\n}\\n```\\n\\n### Max-width 断点\\n\\n如果要使用 `max-width` 断点而不是 `min-width`,可以将屏幕指定为具有 `max` 属性的对象:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n xl: { max: '1279px' },\\n // => @media (max-width: 1279px) { ... }\\n\\n lg: { max: '1023px' },\\n // => @media (max-width: 1023px) { ... }\\n\\n md: { max: '767px' },\\n // => @media (max-width: 767px) { ... }\\n\\n sm: { max: '639px' },\\n // => @media (max-width: 639px) { ... }\\n },\\n};\\n```\\n\\n如有必要,以创建带有 `min-width` 和 `max-width` 定义的断点,例如:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: { min: '640px', max: '767px' },\\n md: { min: '768px', max: '1023px' },\\n lg: { min: '1024px', max: '1279px' },\\n xl: { min: '1280px' },\\n },\\n};\\n```\\n\\n### 多个范围的断点\\n\\n有时,将单个断点定义应用于多个范围会很有用。\\n\\n例如,假设您有一个 `sidebar`,并且希望断点基于内容区域宽度而不是整个视口。您可以模拟这种情况,当 `sidebar` 可见并缩小内容区域时,断点的样式使用较小的断点样式:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '500px',\\n md: [\\n // Sidebar appears at 768px, so revert to `sm:` styles between 768px\\n // and 868px, after which the main content area is wide enough again to\\n // apply the `md:` styles.\\n { min: '668px', max: '767px' },\\n { min: '868px' },\\n ],\\n lg: '1100px',\\n xl: '1400px',\\n },\\n};\\n```\\n\\n### 自定义媒体查询\\n\\n如果需要为断点提供完全自定义的媒体查询,则可以使用带有 `raw` 属性的对象:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n portrait: { raw: '(orientation: portrait)' },\\n // => @media (orientation: portrait) { ... }\\n },\\n },\\n};\\n```\\n\\n### Print 样式\\n\\n如果需要为打印应用不同的样式,则 `raw` 选项可能特别有用。\\n\\n需要做的就是在 `designSystem.extend.screens` 下添加一个 `print`:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n print: { raw: 'print' },\\n // => @media print { ... }\\n },\\n },\\n};\\n```\\n\\n然后,可以使用诸如 `print:text-black` 之类的类来指定仅当某人尝试打印页面时才应用的样式:\\n\\n```html\\n<div class=\\\"text-gray-700 print:text-black\\\">\\n <!-- ... -->\\n</div>\\n```\\n\\n### Dark Mode\\n\\n`raw` 选项可以用于实现 “暗模式” 屏幕:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n dark: { raw: '(prefers-color-scheme: dark)' },\\n // => @media (prefers-color-scheme: dark) { ... }\\n },\\n },\\n};\\n```\\n\\n然后,您可以使用 `dark:` 前缀在暗模式下为元素设置不同的样式:\\n\\n```html\\n<div class=\\\"text-gray-700 dark:text-gray-200\\\">\\n <!-- ... -->\\n</div>\\n```\\n\\n请注意,由于这些 `screen variants` 是在 `Tailwind CSS` 中实现的,因此**无法使用这种方法将断点与暗模式结合使用** ,例如 `md:dark:text-gray-300` 将不起作用。\\n\\n## Colors\\n\\n`colors` 属性可让您自定义项目的全局调色板。\\n\\n```js\\nconst designSystem = {\\n colors: {\\n transparent: 'transparent',\\n black: '#000',\\n white: '#fff',\\n gray: {\\n 100: '#f7fafc',\\n // ...\\n 900: '#1a202c',\\n },\\n\\n // ...\\n },\\n};\\n```\\n\\n默认情况下,这些颜色由 `backgroundColor`,`textColor` 和 `borderColor` 核心插件继承。\\n\\n想了解更多,可以查看:[Customizing Colors](https://tailwindcss.com/docs/customizing-colors)。\\n\\n## Spacing\\n\\n使用 `space` 属性,可以自定义项目的全局间距和缩放比例:\\n\\n```js\\nconst designSystem = {\\n spacing: {\\n px: '1px',\\n 0: '0',\\n 1: '0.25rem',\\n 2: '0.5rem',\\n 3: '0.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 8: '2rem',\\n 10: '2.5rem',\\n 12: '3rem',\\n 16: '4rem',\\n 20: '5rem',\\n 24: '6rem',\\n 32: '8rem',\\n 40: '10rem',\\n 48: '12rem',\\n 56: '14rem',\\n 64: '16rem',\\n },\\n};\\n```\\n\\n默认情况下,这些值由 `padding`,`margin`,`negativeMargin`,`width` 和 `height` 核心插件继承。\\n\\n想要了解更多,看 [Customizing Spacing](https://tailwindcss.com/docs/customizing-spacing)。\\n\\n## 核心插件\\n\\n主题部分的其余部分用于配置每个核心插件可用的值。\\n\\n例如,`borderRadius` 属性可让您自定义将生成的圆角的 `utilities`:\\n\\n```js\\nconst designSystem = {\\n borderRadius: {\\n none: '0',\\n sm: '.125rem',\\n default: '.25rem',\\n lg: '.5rem',\\n full: '9999px',\\n },\\n};\\n```\\n\\n**属性名确定所生成类的后缀,值确定实际 CSS 声明的值。**\\n上面的示例`borderRadius`配置将生成以下 CSS 类:\\n\\n```css\\n.rounded-none {\\n border-radius: 0;\\n}\\n.rounded-sm {\\n border-radius: 0.125rem;\\n}\\n.rounded {\\n border-radius: 0.25rem;\\n}\\n.rounded-lg {\\n border-radius: 0.5rem;\\n}\\n.rounded-full {\\n border-radius: 9999px;\\n}\\n```\\n\\n会注意到,在主题配置中使用 `default` 属性创建了不带后缀的 `rounded` 类。这是许多(尽管不是全部)核心插件支持的 Tailwind CSS 中的通用约定。\\n\\n要了解有关自定义特定核心插件的更多信息,请访问该插件的文档。\\n\\n## 自定义默认配置\\n\\n开箱即用,您的项目将自动从默认主题配置继承值。如果想自定义默认主题,则根据目标有几种不同的选择。\\n\\n### 覆盖默认配置\\n\\n要覆盖默认配置中的选项,请在 `designSystem` 中添加要覆盖的属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n // Replaces all of the default `opacity` values\\n opacity: {\\n 0: '0',\\n 20: '0.2',\\n 40: '0.4',\\n 60: '0.6',\\n 80: '0.8',\\n 100: '1',\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n这将完全替换默认属性配置,因此在上面的示例中,不会生成默认的 `opacity utilities`。\\n\\n您未提供的任何属性都将从默认主题继承,因此在上面的示例中,将保留颜色,间距,边框圆角,背景位置等内容的默认主题配置。\\n\\n### 扩展默认配置\\n\\n如果您想保留主题选项的默认值,但又要添加新值,请在 `designSystem.extend` 属性下添加扩展的内容。\\n\\n例如,如果您想添加一个额外的断点但保留现有的断点,则可以扩展 `screens` 属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n extend: {\\n // Adds a new breakpoint in addition to the default breakpoints\\n screens: {\\n '2xl': '1440px',\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n您当然可以覆盖默认主题的某些部分,并在同一配置中扩展默认主题的其他部分:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n opacity: {\\n 0: '0',\\n 20: '0.2',\\n 40: '0.4',\\n 60: '0.6',\\n 80: '0.8',\\n 100: '1',\\n },\\n extend: {\\n screens: {\\n '2xl': '1440px',\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n### 引用其他值\\n\\n如果需要在配置中引用另一个值,可以通过提供闭包函数而不是静态值来实现。函数将收到 `theme()` 函数作为参数,您可以使用该函数使用点表示法在配置中查找其他值。\\n\\n例如,您可以在 `fill` 配置上通过引用 `theme('colors')` 为调色板中的每种颜色生成 `fill` utilities。\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n colors: {\\n // ...\\n },\\n fill: theme => theme('colors'),\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n`theme()`函数尝试从已经完全合并的配置对象中找到您要查找的值,因此它可以引用您自己的自定义设置以及默认主题值。它也可以递归工作,因此只要链末尾有一个静态值,它就可以解析您要查找的值。\\n\\n**引用默认配置**\\n\\n如果出于任何原因想要引用默认配置中的值,则可以从 `tailwindcss/defaultTheme` 导入它。一个有用的示例是,如果要将添加默认配置提供的字体中某一个字体:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst defaultTheme = require('tailwindcss/defaultTheme');\\n\\nconst designSystem = {\\n extend: {\\n fontFamily: {\\n sans: ['Lato', ...defaultTheme.fontFamily.sans],\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n### 禁用整个核心插件\\n\\n如果您不想为某个核心插件生成任何类,则最好在 `corePlugins` 配置中将该插件设置为 `false`,而不是在配置中为该属性提供一个空对象:\\n\\n```js\\n// Don't assign an empty object in your theme configuration\\n\\nconst designSystem = {\\n opacity: {},\\n};\\n\\n// Do disable the plugin in your corePlugins configuration\\nconst designSyttem = {\\n corePlugins: {\\n opacity: false,\\n },\\n};\\n```\\n\\n最终结果是相同的,但是由于许多核心插件未公开任何配置,因此无论如何只能使用 corePlugins 禁用它们,最好保持一致。\\n\\n### 添加自己的 key\\n\\n在很多情况下,将自己的属性添加到配置对象可能会很有用。\\n\\n其中一个示例是添加新属性为多个核心插件之间复用。例如,您可以提取一个 `positions`对象,`backgroundPosition` 和 `objectPosition` 插件都可以引用该对象:\\n\\n```js\\nconst designSystem = {\\n positions: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n backgroundPosition: theme => theme('positions'),\\n objectPosition: theme => theme('positions'),\\n};\\n```\\n\\n另一个示例是在自定义插件中添加新的属性以进行引用。例如,如果您为项目编写了渐变插件,则可以向该插件引用的主题对象添加渐变属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n gradients: theme => ({\\n 'blue-green': [theme('colors.blue.500'), theme('colors.green.500')],\\n 'purple-blue': [theme('colors.purple.500'), theme('colors.blue.500')],\\n // ...\\n }),\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n buildConfig: {\\n style: {\\n postcss: {\\n plugins: [require('./plugins/gradients')],\\n },\\n },\\n },\\n});\\n```\\n\\n## 配置引用\\n\\n除了 `screens`,`colors` 和 `spacing` 外,配置对象中的所有属性都映射到 `Tailwind CSS` 的核心插件上。由于许多插件负责仅接受静态值集(例如,例如`float`)的 CSS 属性,因此请注意,并非每个插件在主题对象中都有对应的属性。\\n\\n所有这些属性也可以在 `designSystem.extend` 属性下使用,以扩展默认主题。\\n\\n关于所有属性的作用,可以查看此 [链接](https://tailwindcss.com/docs/theme#configuration-reference)。\\n\"";
|
|
1258
|
+
const title = `DesignSystem`;
|
|
1259
|
+
const content = "\"---\\nsidebar_position: 3\\n---\\n\\n# DesignSystem\\n\\n本章描述了有关 designSystem 相关的配置\\n\\n:::tip\\n需要先通过 `pnpm run new` 启用 Tailwind CSS 功能。\\n:::\\n\\n- type: `Object`\\n- default: `见下方配置详情`。\\n\\n<details>\\n <summary>designSystem 配置详情</summary>\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n md: '768px',\\n lg: '1024px',\\n xl: '1280px',\\n },\\n colors: {\\n transparent: 'transparent',\\n current: 'currentColor',\\n\\n black: '#000',\\n white: '#fff',\\n\\n gray: {\\n 100: '#f7fafc',\\n 200: '#edf2f7',\\n 300: '#e2e8f0',\\n 400: '#cbd5e0',\\n 500: '#a0aec0',\\n 600: '#718096',\\n 700: '#4a5568',\\n 800: '#2d3748',\\n 900: '#1a202c',\\n },\\n red: {\\n 100: '#fff5f5',\\n 200: '#fed7d7',\\n 300: '#feb2b2',\\n 400: '#fc8181',\\n 500: '#f56565',\\n 600: '#e53e3e',\\n 700: '#c53030',\\n 800: '#9b2c2c',\\n 900: '#742a2a',\\n },\\n orange: {\\n 100: '#fffaf0',\\n 200: '#feebc8',\\n 300: '#fbd38d',\\n 400: '#f6ad55',\\n 500: '#ed8936',\\n 600: '#dd6b20',\\n 700: '#c05621',\\n 800: '#9c4221',\\n 900: '#7b341e',\\n },\\n yellow: {\\n 100: '#fffff0',\\n 200: '#fefcbf',\\n 300: '#faf089',\\n 400: '#f6e05e',\\n 500: '#ecc94b',\\n 600: '#d69e2e',\\n 700: '#b7791f',\\n 800: '#975a16',\\n 900: '#744210',\\n },\\n green: {\\n 100: '#f0fff4',\\n 200: '#c6f6d5',\\n 300: '#9ae6b4',\\n 400: '#68d391',\\n 500: '#48bb78',\\n 600: '#38a169',\\n 700: '#2f855a',\\n 800: '#276749',\\n 900: '#22543d',\\n },\\n teal: {\\n 100: '#e6fffa',\\n 200: '#b2f5ea',\\n 300: '#81e6d9',\\n 400: '#4fd1c5',\\n 500: '#38b2ac',\\n 600: '#319795',\\n 700: '#2c7a7b',\\n 800: '#285e61',\\n 900: '#234e52',\\n },\\n blue: {\\n 100: '#ebf8ff',\\n 200: '#bee3f8',\\n 300: '#90cdf4',\\n 400: '#63b3ed',\\n 500: '#4299e1',\\n 600: '#3182ce',\\n 700: '#2b6cb0',\\n 800: '#2c5282',\\n 900: '#2a4365',\\n },\\n indigo: {\\n 100: '#ebf4ff',\\n 200: '#c3dafe',\\n 300: '#a3bffa',\\n 400: '#7f9cf5',\\n 500: '#667eea',\\n 600: '#5a67d8',\\n 700: '#4c51bf',\\n 800: '#434190',\\n 900: '#3c366b',\\n },\\n purple: {\\n 100: '#faf5ff',\\n 200: '#e9d8fd',\\n 300: '#d6bcfa',\\n 400: '#b794f4',\\n 500: '#9f7aea',\\n 600: '#805ad5',\\n 700: '#6b46c1',\\n 800: '#553c9a',\\n 900: '#44337a',\\n },\\n pink: {\\n 100: '#fff5f7',\\n 200: '#fed7e2',\\n 300: '#fbb6ce',\\n 400: '#f687b3',\\n 500: '#ed64a6',\\n 600: '#d53f8c',\\n 700: '#b83280',\\n 800: '#97266d',\\n 900: '#702459',\\n },\\n },\\n spacing: {\\n px: '1px',\\n 0: '0',\\n 1: '0.25rem',\\n 2: '0.5rem',\\n 3: '0.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 8: '2rem',\\n 10: '2.5rem',\\n 12: '3rem',\\n 16: '4rem',\\n 20: '5rem',\\n 24: '6rem',\\n 32: '8rem',\\n 40: '10rem',\\n 48: '12rem',\\n 56: '14rem',\\n 64: '16rem',\\n },\\n backgroundColor: theme => theme('colors'),\\n backgroundOpacity: theme => theme('opacity'),\\n backgroundPosition: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n backgroundSize: {\\n auto: 'auto',\\n cover: 'cover',\\n contain: 'contain',\\n },\\n borderColor: theme => ({\\n ...theme('colors'),\\n default: theme('colors.gray.300', 'currentColor'),\\n }),\\n borderOpacity: theme => theme('opacity'),\\n borderRadius: {\\n none: '0',\\n sm: '0.125rem',\\n default: '0.25rem',\\n md: '0.375rem',\\n lg: '0.5rem',\\n full: '9999px',\\n },\\n borderWidth: {\\n default: '1px',\\n 0: '0',\\n 2: '2px',\\n 4: '4px',\\n 8: '8px',\\n },\\n boxShadow: {\\n xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',\\n sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',\\n default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',\\n md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',\\n lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',\\n xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',\\n '2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)',\\n inner: 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)',\\n outline: '0 0 0 3px rgba(66, 153, 225, 0.5)',\\n none: 'none',\\n },\\n container: {},\\n cursor: {\\n auto: 'auto',\\n default: 'default',\\n pointer: 'pointer',\\n wait: 'wait',\\n text: 'text',\\n move: 'move',\\n 'not-allowed': 'not-allowed',\\n },\\n divideColor: theme => theme('borderColor'),\\n divideOpacity: theme => theme('borderOpacity'),\\n divideWidth: theme => theme('borderWidth'),\\n fill: {\\n current: 'currentColor',\\n },\\n flex: {\\n 1: '1 1 0%',\\n auto: '1 1 auto',\\n initial: '0 1 auto',\\n none: 'none',\\n },\\n flexGrow: {\\n 0: '0',\\n default: '1',\\n },\\n flexShrink: {\\n 0: '0',\\n default: '1',\\n },\\n fontFamily: {\\n sans: [\\n 'system-ui',\\n '-apple-system',\\n 'BlinkMacSystemFont',\\n '\\\"Segoe UI\\\"',\\n 'Roboto',\\n '\\\"Helvetica Neue\\\"',\\n 'Arial',\\n '\\\"Noto Sans\\\"',\\n 'sans-serif',\\n '\\\"Apple Color Emoji\\\"',\\n '\\\"Segoe UI Emoji\\\"',\\n '\\\"Segoe UI Symbol\\\"',\\n '\\\"Noto Color Emoji\\\"',\\n ],\\n serif: ['Georgia', 'Cambria', '\\\"Times New Roman\\\"', 'Times', 'serif'],\\n mono: [\\n 'Menlo',\\n 'Monaco',\\n 'Consolas',\\n '\\\"Liberation Mono\\\"',\\n '\\\"Courier New\\\"',\\n 'monospace',\\n ],\\n },\\n fontSize: {\\n xs: '0.75rem',\\n sm: '0.875rem',\\n base: '1rem',\\n lg: '1.125rem',\\n xl: '1.25rem',\\n '2xl': '1.5rem',\\n '3xl': '1.875rem',\\n '4xl': '2.25rem',\\n '5xl': '3rem',\\n '6xl': '4rem',\\n },\\n fontWeight: {\\n hairline: '100',\\n thin: '200',\\n light: '300',\\n normal: '400',\\n medium: '500',\\n semibold: '600',\\n bold: '700',\\n extrabold: '800',\\n black: '900',\\n },\\n height: theme => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n full: '100%',\\n screen: '100vh',\\n }),\\n inset: {\\n 0: '0',\\n auto: 'auto',\\n },\\n letterSpacing: {\\n tighter: '-0.05em',\\n tight: '-0.025em',\\n normal: '0',\\n wide: '0.025em',\\n wider: '0.05em',\\n widest: '0.1em',\\n },\\n lineHeight: {\\n none: '1',\\n tight: '1.25',\\n snug: '1.375',\\n normal: '1.5',\\n relaxed: '1.625',\\n loose: '2',\\n 3: '.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 7: '1.75rem',\\n 8: '2rem',\\n 9: '2.25rem',\\n 10: '2.5rem',\\n },\\n listStyleType: {\\n none: 'none',\\n disc: 'disc',\\n decimal: 'decimal',\\n },\\n margin: (theme, { negative }) => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n }),\\n maxHeight: {\\n full: '100%',\\n screen: '100vh',\\n },\\n maxWidth: (theme, { breakpoints }) => ({\\n none: 'none',\\n xs: '20rem',\\n sm: '24rem',\\n md: '28rem',\\n lg: '32rem',\\n xl: '36rem',\\n '2xl': '42rem',\\n '3xl': '48rem',\\n '4xl': '56rem',\\n '5xl': '64rem',\\n '6xl': '72rem',\\n full: '100%',\\n ...breakpoints(theme('screens')),\\n }),\\n minHeight: {\\n 0: '0',\\n full: '100%',\\n screen: '100vh',\\n },\\n minWidth: {\\n 0: '0',\\n full: '100%',\\n },\\n objectPosition: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n opacity: {\\n 0: '0',\\n 25: '0.25',\\n 50: '0.5',\\n 75: '0.75',\\n 100: '1',\\n },\\n order: {\\n first: '-9999',\\n last: '9999',\\n none: '0',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n },\\n padding: theme => theme('spacing'),\\n placeholderColor: theme => theme('colors'),\\n placeholderOpacity: theme => theme('opacity'),\\n space: (theme, { negative }) => ({\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n }),\\n stroke: {\\n current: 'currentColor',\\n },\\n strokeWidth: {\\n 0: '0',\\n 1: '1',\\n 2: '2',\\n },\\n textColor: theme => theme('colors'),\\n textOpacity: theme => theme('opacity'),\\n width: theme => ({\\n auto: 'auto',\\n ...theme('spacing'),\\n '1/2': '50%',\\n '1/3': '33.333333%',\\n '2/3': '66.666667%',\\n '1/4': '25%',\\n '2/4': '50%',\\n '3/4': '75%',\\n '1/5': '20%',\\n '2/5': '40%',\\n '3/5': '60%',\\n '4/5': '80%',\\n '1/6': '16.666667%',\\n '2/6': '33.333333%',\\n '3/6': '50%',\\n '4/6': '66.666667%',\\n '5/6': '83.333333%',\\n '1/12': '8.333333%',\\n '2/12': '16.666667%',\\n '3/12': '25%',\\n '4/12': '33.333333%',\\n '5/12': '41.666667%',\\n '6/12': '50%',\\n '7/12': '58.333333%',\\n '8/12': '66.666667%',\\n '9/12': '75%',\\n '10/12': '83.333333%',\\n '11/12': '91.666667%',\\n full: '100%',\\n screen: '100vw',\\n }),\\n zIndex: {\\n auto: 'auto',\\n 0: '0',\\n 10: '10',\\n 20: '20',\\n 30: '30',\\n 40: '40',\\n 50: '50',\\n },\\n gap: theme => theme('spacing'),\\n gridTemplateColumns: {\\n none: 'none',\\n 1: 'repeat(1, minmax(0, 1fr))',\\n 2: 'repeat(2, minmax(0, 1fr))',\\n 3: 'repeat(3, minmax(0, 1fr))',\\n 4: 'repeat(4, minmax(0, 1fr))',\\n 5: 'repeat(5, minmax(0, 1fr))',\\n 6: 'repeat(6, minmax(0, 1fr))',\\n 7: 'repeat(7, minmax(0, 1fr))',\\n 8: 'repeat(8, minmax(0, 1fr))',\\n 9: 'repeat(9, minmax(0, 1fr))',\\n 10: 'repeat(10, minmax(0, 1fr))',\\n 11: 'repeat(11, minmax(0, 1fr))',\\n 12: 'repeat(12, minmax(0, 1fr))',\\n },\\n gridColumn: {\\n auto: 'auto',\\n 'span-1': 'span 1 / span 1',\\n 'span-2': 'span 2 / span 2',\\n 'span-3': 'span 3 / span 3',\\n 'span-4': 'span 4 / span 4',\\n 'span-5': 'span 5 / span 5',\\n 'span-6': 'span 6 / span 6',\\n 'span-7': 'span 7 / span 7',\\n 'span-8': 'span 8 / span 8',\\n 'span-9': 'span 9 / span 9',\\n 'span-10': 'span 10 / span 10',\\n 'span-11': 'span 11 / span 11',\\n 'span-12': 'span 12 / span 12',\\n },\\n gridColumnStart: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n 13: '13',\\n },\\n gridColumnEnd: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n 8: '8',\\n 9: '9',\\n 10: '10',\\n 11: '11',\\n 12: '12',\\n 13: '13',\\n },\\n gridTemplateRows: {\\n none: 'none',\\n 1: 'repeat(1, minmax(0, 1fr))',\\n 2: 'repeat(2, minmax(0, 1fr))',\\n 3: 'repeat(3, minmax(0, 1fr))',\\n 4: 'repeat(4, minmax(0, 1fr))',\\n 5: 'repeat(5, minmax(0, 1fr))',\\n 6: 'repeat(6, minmax(0, 1fr))',\\n },\\n gridRow: {\\n auto: 'auto',\\n 'span-1': 'span 1 / span 1',\\n 'span-2': 'span 2 / span 2',\\n 'span-3': 'span 3 / span 3',\\n 'span-4': 'span 4 / span 4',\\n 'span-5': 'span 5 / span 5',\\n 'span-6': 'span 6 / span 6',\\n },\\n gridRowStart: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n },\\n gridRowEnd: {\\n auto: 'auto',\\n 1: '1',\\n 2: '2',\\n 3: '3',\\n 4: '4',\\n 5: '5',\\n 6: '6',\\n 7: '7',\\n },\\n transformOrigin: {\\n center: 'center',\\n top: 'top',\\n 'top-right': 'top right',\\n right: 'right',\\n 'bottom-right': 'bottom right',\\n bottom: 'bottom',\\n 'bottom-left': 'bottom left',\\n left: 'left',\\n 'top-left': 'top left',\\n },\\n scale: {\\n 0: '0',\\n 50: '.5',\\n 75: '.75',\\n 90: '.9',\\n 95: '.95',\\n 100: '1',\\n 105: '1.05',\\n 110: '1.1',\\n 125: '1.25',\\n 150: '1.5',\\n },\\n rotate: {\\n '-180': '-180deg',\\n '-90': '-90deg',\\n '-45': '-45deg',\\n 0: '0',\\n 45: '45deg',\\n 90: '90deg',\\n 180: '180deg',\\n },\\n translate: (theme, { negative }) => ({\\n ...theme('spacing'),\\n ...negative(theme('spacing')),\\n '-full': '-100%',\\n '-1/2': '-50%',\\n '1/2': '50%',\\n full: '100%',\\n }),\\n skew: {\\n '-12': '-12deg',\\n '-6': '-6deg',\\n '-3': '-3deg',\\n 0: '0',\\n 3: '3deg',\\n 6: '6deg',\\n 12: '12deg',\\n },\\n transitionProperty: {\\n none: 'none',\\n all: 'all',\\n default:\\n 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform',\\n colors: 'background-color, border-color, color, fill, stroke',\\n opacity: 'opacity',\\n shadow: 'box-shadow',\\n transform: 'transform',\\n },\\n transitionTimingFunction: {\\n linear: 'linear',\\n in: 'cubic-bezier(0.4, 0, 1, 1)',\\n out: 'cubic-bezier(0, 0, 0.2, 1)',\\n 'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',\\n },\\n transitionDuration: {\\n 75: '75ms',\\n 100: '100ms',\\n 150: '150ms',\\n 200: '200ms',\\n 300: '300ms',\\n 500: '500ms',\\n 700: '700ms',\\n 1000: '1000ms',\\n },\\n transitionDelay: {\\n 75: '75ms',\\n 100: '100ms',\\n 150: '150ms',\\n 200: '200ms',\\n 300: '300ms',\\n 500: '500ms',\\n 700: '700ms',\\n 1000: '1000ms',\\n },\\n};\\n```\\n\\n:::tip\\n更多关于[TailwindCSS 配置](https://tailwindcss.com/docs/configuration#theme)\\n:::\\n\\n</details>\\n\\n`designSystem` 用于定义项目的调色板、排版比例(Typographic Scales 或者 Type Scale)、字体列表、断点、边框圆角值等等。因为 Modern.js 借用了 Tailwind Theme 的设计方式,并且内部也集成了 Tailwind CSS,所以 `designSystem` 使用方式与 Tailwind CSS Theme 相同\\n\\n`designSystem` 对象包含 `screens`、`colors` 和 `spacing` 的属性,以及每个可自定义核心插件。\\n\\n## Screens\\n\\n使用`screens` 可以自定义项目中的响应断点:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n md: '768px',\\n lg: '1024px',\\n xl: '1280px',\\n },\\n};\\n```\\n\\n其中 `screens` 对象里的属性名是屏幕名称(用作 `Tailwind CSS` 生成的自适应实用程序变体的前缀,例如 `md:text-center`),值是该断点应在其开始的 `min-width`。\\n\\n默认断点受常见设备分辨率的启发:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '640px',\\n // => @media (min-width: 640px) { ... }\\n\\n md: '768px',\\n // => @media (min-width: 768px) { ... }\\n\\n lg: '1024px',\\n // => @media (min-width: 1024px) { ... }\\n\\n xl: '1280px',\\n // => @media (min-width: 1280px) { ... }\\n },\\n};\\n```\\n\\n你可以在你的项目中使用任意你喜欢的名称作为断点的属性:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n tablet: '640px',\\n // => @media (min-width: 640px) { ... }\\n\\n laptop: '1024px',\\n // => @media (min-width: 1024px) { ... }\\n\\n desktop: '1280px',\\n // => @media (min-width: 1280px) { ... }\\n },\\n};\\n```\\n\\n这些屏幕名称反映在 `utilities` 中,因此 `text-center` 现在是这样的:\\n\\n```css\\n.text-center {\\n text-align: center;\\n}\\n\\n@media (min-width: 640px) {\\n .tablet\\\\:text-center {\\n text-align: center;\\n }\\n}\\n\\n@media (min-width: 1024px) {\\n .laptop\\\\:text-center {\\n text-align: center;\\n }\\n}\\n\\n@media (min-width: 1280px) {\\n .desktop\\\\:text-center {\\n text-align: center;\\n }\\n}\\n```\\n\\n### Max-width 断点\\n\\n如果要使用 `max-width` 断点而不是 `min-width`,可以将屏幕指定为具有 `max` 属性的对象:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n xl: { max: '1279px' },\\n // => @media (max-width: 1279px) { ... }\\n\\n lg: { max: '1023px' },\\n // => @media (max-width: 1023px) { ... }\\n\\n md: { max: '767px' },\\n // => @media (max-width: 767px) { ... }\\n\\n sm: { max: '639px' },\\n // => @media (max-width: 639px) { ... }\\n },\\n};\\n```\\n\\n如有必要,以创建带有 `min-width` 和 `max-width` 定义的断点,例如:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: { min: '640px', max: '767px' },\\n md: { min: '768px', max: '1023px' },\\n lg: { min: '1024px', max: '1279px' },\\n xl: { min: '1280px' },\\n },\\n};\\n```\\n\\n### 多个范围的断点\\n\\n有时,将单个断点定义应用于多个范围会很有用。\\n\\n例如,假设您有一个 `sidebar`,并且希望断点基于内容区域宽度而不是整个视口。您可以模拟这种情况,当 `sidebar` 可见并缩小内容区域时,断点的样式使用较小的断点样式:\\n\\n```js\\nconst designSystem = {\\n screens: {\\n sm: '500px',\\n md: [\\n // Sidebar appears at 768px, so revert to `sm:` styles between 768px\\n // and 868px, after which the main content area is wide enough again to\\n // apply the `md:` styles.\\n { min: '668px', max: '767px' },\\n { min: '868px' },\\n ],\\n lg: '1100px',\\n xl: '1400px',\\n },\\n};\\n```\\n\\n### 自定义媒体查询\\n\\n如果需要为断点提供完全自定义的媒体查询,则可以使用带有 `raw` 属性的对象:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n portrait: { raw: '(orientation: portrait)' },\\n // => @media (orientation: portrait) { ... }\\n },\\n },\\n};\\n```\\n\\n### Print 样式\\n\\n如果需要为打印应用不同的样式,则 `raw` 选项可能特别有用。\\n\\n需要做的就是在 `designSystem.extend.screens` 下添加一个 `print`:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n print: { raw: 'print' },\\n // => @media print { ... }\\n },\\n },\\n};\\n```\\n\\n然后,可以使用诸如 `print:text-black` 之类的类来指定仅当某人尝试打印页面时才应用的样式:\\n\\n```html\\n<div class=\\\"text-gray-700 print:text-black\\\">\\n <!-- ... -->\\n</div>\\n```\\n\\n### Dark Mode\\n\\n`raw` 选项可以用于实现 “暗模式” 屏幕:\\n\\n```js\\nconst designSystem = {\\n extend: {\\n screens: {\\n dark: { raw: '(prefers-color-scheme: dark)' },\\n // => @media (prefers-color-scheme: dark) { ... }\\n },\\n },\\n};\\n```\\n\\n然后,您可以使用 `dark:` 前缀在暗模式下为元素设置不同的样式:\\n\\n```html\\n<div class=\\\"text-gray-700 dark:text-gray-200\\\">\\n <!-- ... -->\\n</div>\\n```\\n\\n请注意,由于这些 `screen variants` 是在 `Tailwind CSS` 中实现的,因此**无法使用这种方法将断点与暗模式结合使用** ,例如 `md:dark:text-gray-300` 将不起作用。\\n\\n## Colors\\n\\n`colors` 属性可让您自定义项目的全局调色板。\\n\\n```js\\nconst designSystem = {\\n colors: {\\n transparent: 'transparent',\\n black: '#000',\\n white: '#fff',\\n gray: {\\n 100: '#f7fafc',\\n // ...\\n 900: '#1a202c',\\n },\\n\\n // ...\\n },\\n};\\n```\\n\\n默认情况下,这些颜色由 `backgroundColor`,`textColor` 和 `borderColor` 核心插件继承。\\n\\n想了解更多,可以查看:[Customizing Colors](https://tailwindcss.com/docs/customizing-colors)。\\n\\n## Spacing\\n\\n使用 `space` 属性,可以自定义项目的全局间距和缩放比例:\\n\\n```js\\nconst designSystem = {\\n spacing: {\\n px: '1px',\\n 0: '0',\\n 1: '0.25rem',\\n 2: '0.5rem',\\n 3: '0.75rem',\\n 4: '1rem',\\n 5: '1.25rem',\\n 6: '1.5rem',\\n 8: '2rem',\\n 10: '2.5rem',\\n 12: '3rem',\\n 16: '4rem',\\n 20: '5rem',\\n 24: '6rem',\\n 32: '8rem',\\n 40: '10rem',\\n 48: '12rem',\\n 56: '14rem',\\n 64: '16rem',\\n },\\n};\\n```\\n\\n默认情况下,这些值由 `padding`,`margin`,`negativeMargin`,`width` 和 `height` 核心插件继承。\\n\\n想要了解更多,看 [Customizing Spacing](https://tailwindcss.com/docs/customizing-spacing)。\\n\\n## 核心插件\\n\\n主题部分的其余部分用于配置每个核心插件可用的值。\\n\\n例如,`borderRadius` 属性可让您自定义将生成的圆角的 `utilities`:\\n\\n```js\\nconst designSystem = {\\n borderRadius: {\\n none: '0',\\n sm: '.125rem',\\n default: '.25rem',\\n lg: '.5rem',\\n full: '9999px',\\n },\\n};\\n```\\n\\n**属性名确定所生成类的后缀,值确定实际 CSS 声明的值。**\\n上面的示例`borderRadius`配置将生成以下 CSS 类:\\n\\n```css\\n.rounded-none {\\n border-radius: 0;\\n}\\n.rounded-sm {\\n border-radius: 0.125rem;\\n}\\n.rounded {\\n border-radius: 0.25rem;\\n}\\n.rounded-lg {\\n border-radius: 0.5rem;\\n}\\n.rounded-full {\\n border-radius: 9999px;\\n}\\n```\\n\\n会注意到,在主题配置中使用 `default` 属性创建了不带后缀的 `rounded` 类。这是许多(尽管不是全部)核心插件支持的 Tailwind CSS 中的通用约定。\\n\\n要了解有关自定义特定核心插件的更多信息,请访问该插件的文档。\\n\\n## 自定义默认配置\\n\\n开箱即用,您的项目将自动从默认主题配置继承值。如果想自定义默认主题,则根据目标有几种不同的选择。\\n\\n### 覆盖默认配置\\n\\n要覆盖默认配置中的选项,请在 `designSystem` 中添加要覆盖的属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n // Replaces all of the default `opacity` values\\n opacity: {\\n 0: '0',\\n 20: '0.2',\\n 40: '0.4',\\n 60: '0.6',\\n 80: '0.8',\\n 100: '1',\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n这将完全替换默认属性配置,因此在上面的示例中,不会生成默认的 `opacity utilities`。\\n\\n您未提供的任何属性都将从默认主题继承,因此在上面的示例中,将保留颜色,间距,边框圆角,背景位置等内容的默认主题配置。\\n\\n### 扩展默认配置\\n\\n如果您想保留主题选项的默认值,但又要添加新值,请在 `designSystem.extend` 属性下添加扩展的内容。\\n\\n例如,如果您想添加一个额外的断点但保留现有的断点,则可以扩展 `screens` 属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n extend: {\\n // Adds a new breakpoint in addition to the default breakpoints\\n screens: {\\n '2xl': '1440px',\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n您当然可以覆盖默认主题的某些部分,并在同一配置中扩展默认主题的其他部分:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n opacity: {\\n 0: '0',\\n 20: '0.2',\\n 40: '0.4',\\n 60: '0.6',\\n 80: '0.8',\\n 100: '1',\\n },\\n extend: {\\n screens: {\\n '2xl': '1440px',\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n### 引用其他值\\n\\n如果需要在配置中引用另一个值,可以通过提供闭包函数而不是静态值来实现。函数将收到 `theme()` 函数作为参数,您可以使用该函数使用点表示法在配置中查找其他值。\\n\\n例如,您可以在 `fill` 配置上通过引用 `theme('colors')` 为调色板中的每种颜色生成 `fill` utilities。\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n colors: {\\n // ...\\n },\\n fill: theme => theme('colors'),\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n`theme()`函数尝试从已经完全合并的配置对象中找到您要查找的值,因此它可以引用您自己的自定义设置以及默认主题值。它也可以递归工作,因此只要链末尾有一个静态值,它就可以解析您要查找的值。\\n\\n**引用默认配置**\\n\\n如果出于任何原因想要引用默认配置中的值,则可以从 `tailwindcss/defaultTheme` 导入它。一个有用的示例是,如果要将添加默认配置提供的字体中某一个字体:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst defaultTheme = require('tailwindcss/defaultTheme');\\n\\nconst designSystem = {\\n extend: {\\n fontFamily: {\\n sans: ['Lato', ...defaultTheme.fontFamily.sans],\\n },\\n },\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n});\\n```\\n\\n### 禁用整个核心插件\\n\\n如果您不想为某个核心插件生成任何类,则最好在 `corePlugins` 配置中将该插件设置为 `false`,而不是在配置中为该属性提供一个空对象:\\n\\n```js\\n// Don't assign an empty object in your theme configuration\\n\\nconst designSystem = {\\n opacity: {},\\n};\\n\\n// Do disable the plugin in your corePlugins configuration\\nconst designSyttem = {\\n corePlugins: {\\n opacity: false,\\n },\\n};\\n```\\n\\n最终结果是相同的,但是由于许多核心插件未公开任何配置,因此无论如何只能使用 corePlugins 禁用它们,最好保持一致。\\n\\n### 添加自己的 key\\n\\n在很多情况下,将自己的属性添加到配置对象可能会很有用。\\n\\n其中一个示例是添加新属性为多个核心插件之间复用。例如,您可以提取一个 `positions`对象,`backgroundPosition` 和 `objectPosition` 插件都可以引用该对象:\\n\\n```js\\nconst designSystem = {\\n positions: {\\n bottom: 'bottom',\\n center: 'center',\\n left: 'left',\\n 'left-bottom': 'left bottom',\\n 'left-top': 'left top',\\n right: 'right',\\n 'right-bottom': 'right bottom',\\n 'right-top': 'right top',\\n top: 'top',\\n },\\n backgroundPosition: theme => theme('positions'),\\n objectPosition: theme => theme('positions'),\\n};\\n```\\n\\n另一个示例是在自定义插件中添加新的属性以进行引用。例如,如果您为项目编写了渐变插件,则可以向该插件引用的主题对象添加渐变属性:\\n\\n```js modern.config.ts\\nimport { defineConfig } from '@modern-js/module-tools';\\n\\nconst designSystem = {\\n gradients: theme => ({\\n 'blue-green': [theme('colors.blue.500'), theme('colors.green.500')],\\n 'purple-blue': [theme('colors.purple.500'), theme('colors.blue.500')],\\n // ...\\n }),\\n};\\n\\nexport default defineConfig({\\n designSystem,\\n buildConfig: {\\n style: {\\n postcss: {\\n plugins: [require('./plugins/gradients')],\\n },\\n },\\n },\\n});\\n```\\n\\n## 配置引用\\n\\n除了 `screens`,`colors` 和 `spacing` 外,配置对象中的所有属性都映射到 `Tailwind CSS` 的核心插件上。由于许多插件负责仅接受静态值集(例如,例如`float`)的 CSS 属性,因此请注意,并非每个插件在主题对象中都有对应的属性。\\n\\n所有这些属性也可以在 `designSystem.extend` 属性下使用,以扩展默认主题。\\n\\n关于所有属性的作用,可以查看此 [链接](https://tailwindcss.com/docs/theme#configuration-reference)。\\n\"";
|
|
1260
1260
|
function _createMdxContent(props) {
|
|
1261
|
-
|
|
1261
|
+
const _components = Object.assign({
|
|
1262
1262
|
h1: "h1",
|
|
1263
1263
|
a: "a",
|
|
1264
1264
|
p: "p",
|
|
@@ -1289,11 +1289,11 @@ function _createMdxContent(props) {
|
|
|
1289
1289
|
className: "modern-directive-title",
|
|
1290
1290
|
children: "TIP"
|
|
1291
1291
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
|
|
1292
|
-
className: "
|
|
1292
|
+
className: "modern-directive-content",
|
|
1293
1293
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
1294
|
-
children: ["需要先通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1294
|
+
children: ["\n需要先通过 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.code, {
|
|
1295
1295
|
children: "pnpm run new"
|
|
1296
|
-
}), "
|
|
1296
|
+
}), "启用 Tailwind CSS 功能。"]
|
|
1297
1297
|
})
|
|
1298
1298
|
})]
|
|
1299
1299
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.ul, {
|
|
@@ -35538,10 +35538,12 @@ function _createMdxContent(props) {
|
|
|
35538
35538
|
className: "modern-directive-title",
|
|
35539
35539
|
children: "TIP"
|
|
35540
35540
|
}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.div, {
|
|
35541
|
-
className: "
|
|
35541
|
+
className: "modern-directive-content",
|
|
35542
35542
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
35543
|
-
children: ["更多关于", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
35543
|
+
children: ["\n更多关于", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
35544
35544
|
href: "https://tailwindcss.com/docs/configuration#theme",
|
|
35545
|
+
target: "_blank",
|
|
35546
|
+
rel: "nofollow",
|
|
35545
35547
|
children: "TailwindCSS 配置"
|
|
35546
35548
|
})]
|
|
35547
35549
|
})
|
|
@@ -41111,6 +41113,8 @@ function _createMdxContent(props) {
|
|
|
41111
41113
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
41112
41114
|
children: ["想了解更多,可以查看:", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
41113
41115
|
href: "https://tailwindcss.com/docs/customizing-colors",
|
|
41116
|
+
target: "_blank",
|
|
41117
|
+
rel: "nofollow",
|
|
41114
41118
|
children: "Customizing Colors"
|
|
41115
41119
|
}), "。"]
|
|
41116
41120
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
|
|
@@ -42378,6 +42382,8 @@ function _createMdxContent(props) {
|
|
|
42378
42382
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
42379
42383
|
children: ["想要了解更多,看 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
42380
42384
|
href: "https://tailwindcss.com/docs/customizing-spacing",
|
|
42385
|
+
target: "_blank",
|
|
42386
|
+
rel: "nofollow",
|
|
42381
42387
|
children: "Customizing Spacing"
|
|
42382
42388
|
}), "。"]
|
|
42383
42389
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.h2, {
|
|
@@ -48681,28 +48687,26 @@ function _createMdxContent(props) {
|
|
|
48681
48687
|
}), "\n", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components.p, {
|
|
48682
48688
|
children: ["关于所有属性的作用,可以查看此 ", (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components.a, {
|
|
48683
48689
|
href: "https://tailwindcss.com/docs/theme#configuration-reference",
|
|
48690
|
+
target: "_blank",
|
|
48691
|
+
rel: "nofollow",
|
|
48684
48692
|
children: "链接"
|
|
48685
48693
|
}), "。"]
|
|
48686
48694
|
})]
|
|
48687
48695
|
});
|
|
48688
48696
|
}
|
|
48689
|
-
function MDXContent() {
|
|
48690
|
-
|
|
48691
|
-
var _ref = props.components || {},
|
|
48692
|
-
MDXLayout = _ref.wrapper;
|
|
48697
|
+
function MDXContent(props = {}) {
|
|
48698
|
+
const {wrapper: MDXLayout} = props.components || ({});
|
|
48693
48699
|
return MDXLayout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MDXLayout, Object.assign({}, props, {
|
|
48694
48700
|
children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_createMdxContent, props)
|
|
48695
48701
|
})) : _createMdxContent(props);
|
|
48696
48702
|
}
|
|
48697
|
-
_c = MDXContent;
|
|
48698
48703
|
/* harmony default export */ __webpack_exports__["default"] = (MDXContent);
|
|
48699
48704
|
function _missingMdxReference(id, component, place) {
|
|
48700
|
-
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/
|
|
48705
|
+
throw new Error("Expected " + (component ? "component" : "object") + " `" + id + "` to be defined: you likely forgot to import, pass, or provide it." + (place ? "\nIt’s referenced in your code at `" + place + "` in `/Users/targeral/github/targeral-modern-js/website/module-tools/docs/zh/api/config/design-system.md`" : ""));
|
|
48701
48706
|
}
|
|
48702
|
-
|
|
48703
|
-
__webpack_require__.$Refresh$.register(_c, "MDXContent");
|
|
48707
|
+
|
|
48704
48708
|
|
|
48705
48709
|
/***/ })
|
|
48706
48710
|
|
|
48707
48711
|
}]);
|
|
48708
|
-
//# sourceMappingURL=
|
|
48712
|
+
//# sourceMappingURL=zh_api_config_design-system.js.map
|