weapp-tailwindcss 5.5.5 → 5.5.7
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/{auto-DtU6f3X6.cjs → auto-B1OyRrE8.cjs} +1 -1
- package/dist/{auto-2dg_uhEJ.js → auto-ENr4xzzw.js} +1 -1
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -4
- package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -1
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
- package/dist/bundlers/shared/css-source-trace.d.ts +2 -5
- package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/framework-css-composition.d.ts +1 -0
- package/dist/bundlers/shared/framework-postcss.d.ts +1 -24
- package/dist/bundlers/shared/framework-user-css.d.ts +1 -3
- package/dist/bundlers/shared/generated-css-marker.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/candidates.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/class-selectors.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/directives/fallback.d.ts +1 -11
- package/dist/bundlers/shared/generator-css/directives.d.ts +1 -25
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +1 -19
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +1 -25
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +1 -30
- package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/local-imports.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/markers.d.ts +1 -28
- package/dist/bundlers/shared/generator-css/output-import-shell.d.ts +1 -8
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +1 -58
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +1 -6
- package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -21
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -13
- package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +1 -7
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +1 -33
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -28
- package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -14
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +1 -16
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +1 -22
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -7
- package/dist/bundlers/shared/generator-css/types.d.ts +1 -61
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -9
- package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +1 -3
- package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -15
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -10
- package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +1 -15
- package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -5
- package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +1 -10
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -7
- package/dist/bundlers/shared/generator-css.d.ts +1 -9
- package/dist/bundlers/shared/run-tasks.d.ts +1 -3
- package/dist/bundlers/shared/runtime-class-set.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/collector.d.ts +1 -8
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +1 -12
- package/dist/bundlers/shared/source-candidates/script.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/snapshot.d.ts +1 -19
- package/dist/bundlers/shared/source-candidates/source-priority.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/store.d.ts +1 -2
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +1 -75
- package/dist/bundlers/shared/source-candidates/views.d.ts +1 -12
- package/dist/bundlers/shared/source-candidates.d.ts +1 -4
- package/dist/bundlers/shared/source-scan/css-entries.d.ts +1 -18
- package/dist/bundlers/shared/source-scan/dependencies.d.ts +1 -2
- package/dist/bundlers/shared/source-scan.d.ts +1 -16
- package/dist/bundlers/shared/static-config-content.d.ts +1 -5
- package/dist/bundlers/shared/style-handler-options.d.ts +1 -0
- package/dist/bundlers/shared/style-requests.d.ts +1 -5
- package/dist/bundlers/shared/v4-generation-core.d.ts +1 -21
- package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +3 -0
- package/dist/bundlers/vite/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/frameworks/generic/web.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/finalize/sync-processed-css.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/framework-style-memory.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/web-css-module.d.ts +1 -0
- package/dist/bundlers/vite/plugin-hook.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -10
- package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +1 -4
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +4 -7
- package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -13
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +3 -1
- package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +3 -2
- package/dist/bundlers/vite/shared/framework-runtime-configuration.d.ts +3 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +9 -0
- package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +6 -5
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +3 -3
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +3 -1
- package/dist/bundlers/vite/shared/hmr-source.d.ts +2 -0
- package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -1
- package/dist/bundlers/vite/source-candidates.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +2 -7
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +4 -8
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +2 -7
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +2 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/watch-dependencies.d.ts +6 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +1 -1
- package/dist/cache/index.d.ts +4 -4
- package/dist/cache/source.d.ts +29 -0
- package/dist/{cache-CBJFB1HN.cjs → cache-CzvIGfwS.cjs} +1 -0
- package/dist/compiler/composition.d.ts +1 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/runtime-affecting-signature/js.d.ts +1 -0
- package/dist/compiler/semantic-css.d.ts +1 -1
- package/dist/compiler/types.d.ts +1 -1
- package/dist/{compiler-D_vxtEdw.js → compiler-CThodfGH.js} +3105 -3065
- package/dist/{compiler-Cc0JXfbw.cjs → compiler-DkGY5Nmh.cjs} +22414 -45557
- package/dist/core/compiler/generation-cache.d.ts +4 -2
- package/dist/core/compiler/transforms.d.ts +1 -1
- package/dist/core/compiler/types.d.ts +1 -1
- package/dist/core.cjs +10 -10
- package/dist/core.d.ts +2 -2
- package/dist/core.js +5 -5
- package/dist/css-cleanup-B6FUJC3z.cjs +1 -0
- package/dist/{css-imports-FRZwX4P6.cjs → css-imports-R_RDMjPz.cjs} +7 -22
- package/dist/css-macro/auto.d.ts +1 -1
- package/dist/css-macro/postcss.cjs +1 -1
- package/dist/css-macro.cjs +3 -3
- package/dist/css-macro.js +2 -2
- package/dist/{defaults-CKx-4LcW.js → defaults-AQuvJS-h.js} +4 -2
- package/dist/{defaults-CiGsr8Xq.cjs → defaults-CyX5iO9y.cjs} +4 -2
- package/dist/defaults.cjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/final-css-cleanup-B6FUJC3z.cjs +1 -0
- package/dist/{final-css-cleanup-B0HUBtiE.js → final-css-cleanup-BOzhuhGz.js} +3 -127
- package/dist/framework/index.d.ts +1 -1
- package/dist/framework/platform.d.ts +2 -2
- package/dist/framework.cjs +1 -1
- package/dist/{v4-generation-core-DJBWZ_D0.cjs → generated-css-marker-jMNbQHpy.cjs} +717 -1730
- package/dist/generation/candidates.d.ts +1 -0
- package/dist/generation/class-selectors.d.ts +4 -0
- package/dist/generation/config-directive.d.ts +1 -0
- package/dist/generation/directives/fallback.d.ts +1 -0
- package/dist/generation/directives.d.ts +1 -0
- package/dist/generation/framework-css-composition.d.ts +1 -0
- package/dist/generation/framework-postcss.d.ts +25 -0
- package/dist/generation/framework-user-css.d.ts +5 -0
- package/dist/generation/generation-helpers/preflight.d.ts +19 -0
- package/dist/generation/generation-helpers/results.d.ts +23 -0
- package/dist/generation/generation-helpers/runtime-isolation.d.ts +30 -0
- package/dist/generation/generation-helpers/source-order.d.ts +1 -0
- package/dist/generation/generation-helpers.d.ts +4 -0
- package/dist/generation/index.d.ts +9 -0
- package/dist/generation/legacy-compat.d.ts +12 -0
- package/dist/generation/legacy-selectors.d.ts +1 -0
- package/dist/generation/legacy-units.d.ts +1 -0
- package/dist/generation/local-imports.d.ts +1 -0
- package/dist/generation/markers.d.ts +1 -0
- package/dist/generation/output-import-shell.d.ts +1 -0
- package/dist/generation/pipeline/context.d.ts +60 -0
- package/dist/generation/pipeline/deferred-output.d.ts +3 -0
- package/dist/generation/pipeline/execution.d.ts +3 -0
- package/dist/generation/pipeline/fallback-output.d.ts +3 -0
- package/dist/generation/pipeline/ordered-output.d.ts +3 -0
- package/dist/generation/pipeline/preparation.d.ts +19 -0
- package/dist/generation/pipeline.d.ts +2 -0
- package/dist/generation/result-helpers.d.ts +6 -0
- package/dist/generation/scoped-rules.d.ts +1 -0
- package/dist/generation/service.d.ts +20 -0
- package/dist/generation/source-files.d.ts +21 -0
- package/dist/generation/source-resolver/apply-reference.d.ts +10 -0
- package/dist/generation/source-resolver/config.d.ts +7 -0
- package/dist/generation/source-resolver/configuration.d.ts +33 -0
- package/dist/generation/source-resolver/matching.d.ts +3 -0
- package/dist/generation/source-resolver/metadata.d.ts +28 -0
- package/dist/generation/source-resolver/postcss-source.d.ts +14 -0
- package/dist/generation/source-resolver/resolve-source.d.ts +4 -0
- package/dist/generation/source-resolver/resolve-sources.d.ts +5 -0
- package/dist/generation/source-resolver/single-source.d.ts +16 -0
- package/dist/generation/source-resolver/source-entries.d.ts +3 -0
- package/dist/generation/source-resolver/source-matching.d.ts +5 -0
- package/dist/generation/source-resolver/types.d.ts +22 -0
- package/dist/generation/source-resolver.d.ts +7 -0
- package/dist/generation/style-options.d.ts +8 -0
- package/dist/generation/style-requests.d.ts +5 -0
- package/dist/generation/types.d.ts +65 -0
- package/dist/generation/user-css/apply-only.d.ts +5 -0
- package/dist/generation/user-css/at-rules.d.ts +1 -0
- package/dist/generation/user-css/compile-functions.d.ts +3 -0
- package/dist/generation/user-css/generated-cleanup.d.ts +1 -0
- package/dist/generation/user-css/source-fragments.d.ts +1 -0
- package/dist/generation/user-css/transform.d.ts +1 -0
- package/dist/generation/user-css/user-layers.d.ts +1 -0
- package/dist/generation/user-css.d.ts +5 -0
- package/dist/generation/user-layer-order.d.ts +1 -0
- package/dist/generation/validate.d.ts +7 -0
- package/dist/generator-CxauQbx3.cjs +1868 -0
- package/dist/generator-oKZ5mCJ5.js +1637 -0
- package/dist/generator.cjs +10 -4
- package/dist/generator.js +1 -1
- package/dist/{gulp-Dnt8VL8D.cjs → gulp-CVvBpIlq.cjs} +27 -26
- package/dist/{gulp-B1mPTMqw.js → gulp-DhddVxGA.js} +6 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-qpX410qU.cjs → hmr-timing-DfMbbZ1E.cjs} +13 -13
- package/dist/{hmr-timing-wAt0LavM.js → hmr-timing-xPpat-km.js} +601 -1548
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/js/ModuleGraph.d.ts +3 -1
- package/dist/js/NodePathWalker.d.ts +1 -1
- package/dist/js/babel/analyze.d.ts +6 -0
- package/dist/js/babel.d.ts +1 -2
- package/dist/js/fast-path/analysis.d.ts +14 -0
- package/dist/js/fast-path/oxc.d.ts +1 -1
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/node-path-walker/import-tokens.d.ts +1 -1
- package/dist/js/oxc-parser.d.ts +4 -0
- package/dist/pipeline-helpers-zMPmp5F3.cjs +516 -0
- package/dist/postcss-html-transform.cjs +1 -1
- package/dist/postcss.cjs +3 -2
- package/dist/postcss.d.ts +1 -1
- package/dist/postcss.js +3 -2
- package/dist/presets.cjs +3 -3
- package/dist/presets.js +2 -2
- package/dist/project-sources/candidates/collector.d.ts +8 -0
- package/dist/project-sources/candidates/scan-root.d.ts +12 -0
- package/dist/project-sources/candidates/script.d.ts +1 -0
- package/dist/project-sources/candidates/snapshot.d.ts +19 -0
- package/dist/project-sources/candidates/source-priority.d.ts +1 -0
- package/dist/project-sources/candidates/store.d.ts +2 -0
- package/dist/project-sources/candidates/types-and-cache.d.ts +75 -0
- package/dist/project-sources/candidates/views.d.ts +12 -0
- package/dist/project-sources/candidates.d.ts +4 -0
- package/dist/project-sources/css-entries.d.ts +18 -0
- package/dist/project-sources/dependencies.d.ts +2 -0
- package/dist/project-sources/index.d.ts +16 -0
- package/dist/project-sources/static-config-content.d.ts +5 -0
- package/dist/reset.cjs +1 -1
- package/dist/{rolldown-runtime-Ctb5zv51.cjs → rolldown-runtime-fg3euq-1.cjs} +7 -0
- package/dist/rspack.cjs +4 -4
- package/dist/rspack.js +2 -2
- package/dist/{runtime-state-XYSycuGu.cjs → runtime-state-BOzuVoKl.cjs} +1 -1
- package/dist/{scoped-generator-CtetE5rm.cjs → scoped-generator-BIZ7N_J-.cjs} +51 -36
- package/dist/{scoped-generator-BqxVxNp9.js → scoped-generator-DlQrVbuC.js} +49 -33
- package/dist/{source-candidate-scan-signature-Lm32zKVA.js → source-candidate-scan-signature-BjVQYL-C.js} +22 -5
- package/dist/{source-candidate-scan-signature-BDGB9nKZ.cjs → source-candidate-scan-signature-nG-rg809.cjs} +34 -5
- package/dist/style-injector/internal.d.ts +118 -8
- package/dist/style-injector/options.d.ts +6 -2
- package/dist/tailwindcss/miniprogram.d.ts +1 -1
- package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -1
- package/dist/tailwindcss/runtime-options.d.ts +5 -0
- package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -7
- package/dist/tailwindcss/source-scan.d.ts +3 -32
- package/dist/tailwindcss/v4/css-sources.d.ts +1 -1
- package/dist/tailwindcss/v4/preflight.d.ts +1 -4
- package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +4 -0
- package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +2 -3
- package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +1 -6
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +5 -2
- package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +1 -3
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +3 -7
- package/dist/tailwindcss/v4-engine/source.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/types.d.ts +3 -1
- package/dist/{tailwindcss-9e6ZuYgS.cjs → tailwindcss-U3KIUegn.cjs} +66 -271
- package/dist/{tailwindcss-DTV9MoJT.js → tailwindcss-kSd0ykiX.js} +73 -251
- package/dist/{transform-BbbZvFQq.js → transform-BAon9ykq.js} +35 -20
- package/dist/{transform-D21f8Dm8.cjs → transform-D2KFdA3C.cjs} +41 -26
- package/dist/types/index.d.ts +4 -3
- package/dist/types/user-defined-options/general.d.ts +1 -1
- package/dist/uni-app-x/border-preflight.d.ts +1 -2
- package/dist/uni-app-x/component-local-style.d.ts +4 -1
- package/dist/uni-app-x/transform.d.ts +4 -2
- package/dist/uni-app-x/vite/author-apply.d.ts +3 -1
- package/dist/uni-app-x/vite/native-hmr.d.ts +1 -1
- package/dist/uni-app-x/vite/style-result.d.ts +5 -0
- package/dist/utils/run-tasks.d.ts +3 -0
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-CaH7WjX6.cjs → vite-BxW0qd7J.cjs} +677 -1315
- package/dist/{vite-CuYntLZP.js → vite-D-RGkmOE.js} +541 -1173
- package/dist/vite-web.d.ts +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-GbC14Rlt.cjs → watch-dependencies-C1so1whD.cjs} +14 -1
- package/dist/weapp-tw-css-generation-loader.cjs +4 -3
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +34 -29
- package/dist/weapp-tw-runtime-classset-loader.cjs +5 -18
- package/dist/{web-CdXkY_VO.js → web--kA4HUTm.js} +149 -211
- package/dist/{web-CYs2Kcaa.cjs → web-Y-H6I1k6.cjs} +226 -286
- package/dist/{webpack-BnCSOUuu.js → webpack-BB-kw4Qr.js} +38 -450
- package/dist/{webpack-BQNnpQPC.cjs → webpack-DxrWatNB.cjs} +97 -97
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/custom-template.d.ts +1 -1
- package/package.json +16 -13
- package/dist/final-css-cleanup-DSjczga3.cjs +0 -138
- package/dist/generator-BdSIvFEO.cjs +0 -3905
- package/dist/generator-CAOx1Sqm.js +0 -3357
- package/dist/pipeline-helpers-BHagysZY.cjs +0 -971
- package/dist/tailwindcss/v4-engine/css-import.d.ts +0 -14
- package/dist/uni-app-x/style-asset/source-parser.d.ts +0 -2
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan.js';
|
|
2
|
+
import type { ICustomAttributesEntities } from '../../types/index.js';
|
|
3
|
+
import type { IArbitraryValues } from '../../types/shared.js';
|
|
4
|
+
import { LRUCache } from 'lru-cache';
|
|
5
|
+
export interface SourceCandidateStore {
|
|
6
|
+
syncSource: (id: string, source: string) => Promise<void>;
|
|
7
|
+
sync: (id: string, source: string) => Promise<void>;
|
|
8
|
+
syncCss: (id: string, source: string) => Promise<void>;
|
|
9
|
+
syncModuleSource: (id: string, source: string, extension?: string) => Promise<Set<string>>;
|
|
10
|
+
merge: (id: string, source: string) => Promise<void>;
|
|
11
|
+
syncFile: (id: string) => Promise<void>;
|
|
12
|
+
syncCurrentSource: (id: string, source: string) => Promise<SourceCandidateChange>;
|
|
13
|
+
syncCurrentFile: (id: string) => Promise<SourceCandidateChange>;
|
|
14
|
+
resolveScanFiles: (options: ScanSourceCandidateRootOptions) => Promise<string[]>;
|
|
15
|
+
scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
|
|
16
|
+
syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
|
|
17
|
+
remove: (id: string) => SourceCandidateChange;
|
|
18
|
+
source: (id: string) => string | undefined;
|
|
19
|
+
sources: () => IterableIterator<[string, string]>;
|
|
20
|
+
values: () => Set<string>;
|
|
21
|
+
valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
|
|
22
|
+
sourcesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>;
|
|
23
|
+
snapshot: () => SourceCandidateCollectorSnapshot;
|
|
24
|
+
restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
|
|
25
|
+
clearScan: () => void;
|
|
26
|
+
resetScan: () => void;
|
|
27
|
+
clear: () => void;
|
|
28
|
+
getRevision: () => number;
|
|
29
|
+
}
|
|
30
|
+
export interface SourceCandidateCollector extends SourceCandidateStore {
|
|
31
|
+
}
|
|
32
|
+
export interface SourceCandidateChange {
|
|
33
|
+
addedCandidates: Set<string>;
|
|
34
|
+
removedCandidates: Set<string>;
|
|
35
|
+
}
|
|
36
|
+
export interface SourceCandidateCollectorSnapshot {
|
|
37
|
+
candidatesById: Array<[string, string[]]>;
|
|
38
|
+
cssCandidatesById?: Array<[string, string[]]> | undefined;
|
|
39
|
+
cssSourceById?: Array<[string, string]> | undefined;
|
|
40
|
+
moduleCandidatesById?: Array<[string, string[]]> | undefined;
|
|
41
|
+
moduleSourceById?: Array<[string, string]> | undefined;
|
|
42
|
+
scanCandidatesById?: Array<[string, string[]]> | undefined;
|
|
43
|
+
scanSourceById?: Array<[string, string]> | undefined;
|
|
44
|
+
sourceById?: Array<[string, string]> | undefined;
|
|
45
|
+
transformCandidatesById?: Array<[string, string[]]> | undefined;
|
|
46
|
+
transformSourceById?: Array<[string, string]> | undefined;
|
|
47
|
+
inlineExcludedCandidates: string[];
|
|
48
|
+
inlineIncludedCandidates: string[];
|
|
49
|
+
}
|
|
50
|
+
export interface SourceCandidateFilterOptions {
|
|
51
|
+
excludeEntries?: TailwindSourceEntry[] | undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface ScanSourceCandidateRootOptions {
|
|
54
|
+
root: string;
|
|
55
|
+
outDir?: string | undefined;
|
|
56
|
+
entries?: TailwindSourceEntry[] | undefined;
|
|
57
|
+
explicit?: boolean | undefined;
|
|
58
|
+
onFilesResolved?: ((files: string[]) => void) | undefined;
|
|
59
|
+
}
|
|
60
|
+
export interface SourceCandidateCollectorOptions {
|
|
61
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
62
|
+
customAttributesEntities?: ICustomAttributesEntities | undefined;
|
|
63
|
+
disabledDefaultTemplateHandler?: boolean | undefined;
|
|
64
|
+
extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
|
|
65
|
+
}
|
|
66
|
+
export declare const SOURCE_CANDIDATE_CONTENT_CACHE_MAX = 128;
|
|
67
|
+
export declare const sourceCandidateContentCache: LRUCache<string, string[], unknown>;
|
|
68
|
+
export declare function cleanUrl(id: string): string;
|
|
69
|
+
export declare function resolveSourceCandidateExtension(id: string): string;
|
|
70
|
+
export declare function createSourceCandidateContentCacheKey(extension: string, source: string, bareArbitraryValues: IArbitraryValues['bareArbitraryValues'] | undefined, customAttributesEntities: ICustomAttributesEntities | undefined, disabledDefaultTemplateHandler: boolean | undefined, extractor: SourceCandidateCollectorOptions['extractor']): string;
|
|
71
|
+
export declare function extractCandidates(source: string, extension: string, options: SourceCandidateCollectorOptions): Promise<Set<string>>;
|
|
72
|
+
export declare function isSourceCandidateRequest(id: string): boolean;
|
|
73
|
+
export declare function removeCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
|
|
74
|
+
export declare function addCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
|
|
75
|
+
export declare function diffCandidateSets(previous: Set<string>, next: Set<string>): SourceCandidateChange;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan.js';
|
|
2
|
+
type CandidateMap = Map<string, Set<string>>;
|
|
3
|
+
interface CandidateViewOptions {
|
|
4
|
+
candidatesById: CandidateMap;
|
|
5
|
+
moduleCandidatesById: CandidateMap;
|
|
6
|
+
candidateCount: Map<string, number>;
|
|
7
|
+
inlineIncludedCandidates: Set<string>;
|
|
8
|
+
inlineExcludedCandidates: Set<string>;
|
|
9
|
+
}
|
|
10
|
+
export declare function collectCandidateValues(view: CandidateViewOptions, entries?: TailwindSourceEntry[], excludeEntries?: TailwindSourceEntry[]): Set<string>;
|
|
11
|
+
export declare function collectCandidateSources(view: CandidateViewOptions, entries?: TailwindSourceEntry[], excludeEntries?: TailwindSourceEntry[]): Map<string, Set<string>>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { clearSourceCandidateContentCacheForTest, createSourceCandidateCollector, getSourceCandidateContentCacheStatsForTest } from './candidates/collector.js';
|
|
2
|
+
export { createSourceCandidateStore } from './candidates/store.js';
|
|
3
|
+
export { isSourceCandidateRequest } from './candidates/types-and-cache.js';
|
|
4
|
+
export type { SourceCandidateChange, SourceCandidateCollector, SourceCandidateCollectorOptions, SourceCandidateCollectorSnapshot, SourceCandidateFilterOptions, SourceCandidateStore } from './candidates/types-and-cache.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TailwindV4CssSource } from '@weapp-tailwindcss/engine';
|
|
2
|
+
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../tailwindcss/source-scan.js';
|
|
3
|
+
import type { UserDefinedOptions } from '../types/index.js';
|
|
4
|
+
export interface ResolvedTailwindV4CssEntries {
|
|
5
|
+
entries: TailwindSourceEntry[];
|
|
6
|
+
explicit: boolean;
|
|
7
|
+
includesPreflight: boolean;
|
|
8
|
+
inlineCandidates: TailwindInlineSourceCandidates;
|
|
9
|
+
dependencies: string[];
|
|
10
|
+
}
|
|
11
|
+
export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates: Array<TailwindInlineSourceCandidates | undefined>): TailwindInlineSourceCandidates | undefined;
|
|
12
|
+
export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
13
|
+
export declare function resolveTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
|
|
14
|
+
export declare function collectExistingCssEntries(options: UserDefinedOptions): string[];
|
|
15
|
+
export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
16
|
+
export declare function resolveTailwindConfigEntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
17
|
+
export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
|
|
18
|
+
export declare function collectConfiguredCssSources(options: UserDefinedOptions): TailwindV4CssSource[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../tailwindcss/source-scan.js';
|
|
2
|
+
import type { TailwindcssRuntimeLike, UserDefinedOptions } from '../types/index.js';
|
|
3
|
+
export { discoverTailwindV4CssEntries, resolveTailwindConfigEntriesFromCssCached, resolveTailwindV4CssDependencies, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, } from './css-entries.js';
|
|
4
|
+
export type { ResolvedTailwindV4CssEntries } from './css-entries.js';
|
|
5
|
+
export interface ResolvedSourceScan {
|
|
6
|
+
dependencies?: string[] | undefined;
|
|
7
|
+
entries?: TailwindSourceEntry[] | undefined;
|
|
8
|
+
explicit?: boolean | undefined;
|
|
9
|
+
inlineCandidates?: TailwindInlineSourceCandidates | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface ResolveSourceScanOptions {
|
|
12
|
+
root?: string | undefined;
|
|
13
|
+
outDir?: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function resolveSourceScanEntries(options: UserDefinedOptions, runtime: TailwindcssRuntimeLike, scanOptions?: ResolveSourceScanOptions): Promise<ResolvedSourceScan | undefined>;
|
|
16
|
+
export declare function createSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
|
package/dist/reset.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
5
|
+
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
6
6
|
let _weapp_tailwindcss_reset = require("@weapp-tailwindcss/reset");
|
|
7
7
|
_weapp_tailwindcss_reset = require_rolldown_runtime.__toESM(_weapp_tailwindcss_reset, 1);
|
|
8
8
|
Object.defineProperty(exports, "default", {
|
|
@@ -25,6 +25,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
25
|
}
|
|
26
26
|
return to;
|
|
27
27
|
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
28
29
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
29
30
|
value: mod,
|
|
30
31
|
enumerable: true
|
|
@@ -42,6 +43,12 @@ Object.defineProperty(exports, "__exportAll", {
|
|
|
42
43
|
return __exportAll;
|
|
43
44
|
}
|
|
44
45
|
});
|
|
46
|
+
Object.defineProperty(exports, "__reExport", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function() {
|
|
49
|
+
return __reExport;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
45
52
|
Object.defineProperty(exports, "__toESM", {
|
|
46
53
|
enumerable: true,
|
|
47
54
|
get: function() {
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
3
|
-
const
|
|
4
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
3
|
+
const require_generated_css_marker = require("./generated-css-marker-jMNbQHpy.cjs");
|
|
4
|
+
const require_webpack = require("./webpack-DxrWatNB.cjs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
7
7
|
//#region src/bundlers/rspack/rule-match.ts
|
|
@@ -87,7 +87,7 @@ function matchesAnyStringCondition(condition, inputs) {
|
|
|
87
87
|
}
|
|
88
88
|
function matchesStyleResourceCondition(condition) {
|
|
89
89
|
if (typeof condition === "function") return;
|
|
90
|
-
if (typeof condition === "string" &&
|
|
90
|
+
if (typeof condition === "string" && require_generated_css_marker.isSourceStyleRequest(condition)) return true;
|
|
91
91
|
const matched = matchesAnyStringCondition(condition, STYLE_RULE_PROBES);
|
|
92
92
|
return typeof condition === "string" && matched === false ? void 0 : matched;
|
|
93
93
|
}
|
package/dist/rspack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { V as isSourceStyleRequest } from "./hmr-timing-xPpat-km.js";
|
|
2
|
+
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-BB-kw4Qr.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
//#region src/bundlers/rspack/rule-match.ts
|
|
5
5
|
const STYLE_RULE_PROBES = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
4
4
|
let node_process = require("node:process");
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
require("./
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const
|
|
3
|
+
const require_generator = require("./generator-CxauQbx3.cjs");
|
|
4
|
+
require("./auto-B1OyRrE8.cjs");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-U3KIUegn.cjs");
|
|
6
|
+
const require_generated_css_marker = require("./generated-css-marker-jMNbQHpy.cjs");
|
|
7
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-nG-rg809.cjs");
|
|
7
8
|
let node_path = require("node:path");
|
|
8
9
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
10
|
let weapp_style_injector_vite = require("weapp-style-injector/vite");
|
|
@@ -13,7 +14,7 @@ let weapp_style_injector_webpack = require("weapp-style-injector/webpack");
|
|
|
13
14
|
let weapp_style_injector_webpack_mpx = require("weapp-style-injector/webpack/mpx");
|
|
14
15
|
let weapp_style_injector_webpack_taro = require("weapp-style-injector/webpack/taro");
|
|
15
16
|
let weapp_style_injector_webpack_uni_app = require("weapp-style-injector/webpack/uni-app");
|
|
16
|
-
let
|
|
17
|
+
let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
|
|
17
18
|
//#region src/bundlers/framework-selector.ts
|
|
18
19
|
function resolveBundlerAppType(options) {
|
|
19
20
|
if (options.appType) return options.appType;
|
|
@@ -79,7 +80,7 @@ function resolveWebpackFrameworkProfile(options) {
|
|
|
79
80
|
//#endregion
|
|
80
81
|
//#region src/style-injector/internal.ts
|
|
81
82
|
function toPluginArray(pluginOrPlugins) {
|
|
82
|
-
return Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins];
|
|
83
|
+
return pluginOrPlugins ? Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins] : [];
|
|
83
84
|
}
|
|
84
85
|
function normalizeWebpackStyleInjectorOptions(options) {
|
|
85
86
|
const normalized = require_source_candidate_scan_signature.normalizeStyleInjectorOptions(options);
|
|
@@ -98,29 +99,36 @@ function normalizeWebpackStyleInjectorOptions(options) {
|
|
|
98
99
|
};
|
|
99
100
|
return webpackOptions;
|
|
100
101
|
}
|
|
101
|
-
function getTransformHandler(hook) {
|
|
102
|
-
if (typeof hook === "function") return hook;
|
|
103
|
-
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
104
|
-
}
|
|
105
|
-
function getGenerateBundleHandler(hook) {
|
|
106
|
-
if (typeof hook === "function") return hook;
|
|
107
|
-
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
108
|
-
}
|
|
109
102
|
const viteStyleInjectorDelegates = {
|
|
110
103
|
generic: ((options) => [(0, weapp_style_injector_vite.weappStyleInjector)(options)]),
|
|
111
|
-
taro: ((options) => toPluginArray((0, weapp_style_injector_vite_taro.StyleInjector)(
|
|
112
|
-
|
|
104
|
+
taro: ((options) => toPluginArray((0, weapp_style_injector_vite_taro.StyleInjector)(require_generator.omitUndefined({
|
|
105
|
+
...options,
|
|
106
|
+
subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
|
|
107
|
+
})))),
|
|
108
|
+
uniApp: ((options) => toPluginArray((0, weapp_style_injector_vite_uni_app.StyleInjector)(require_generator.omitUndefined({
|
|
109
|
+
...options,
|
|
110
|
+
subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
|
|
111
|
+
}))))
|
|
113
112
|
};
|
|
114
113
|
const webpackStyleInjectorDelegates = {
|
|
115
|
-
generic: ((options) => (0, weapp_style_injector_webpack.weappStyleInjectorWebpack)(options)),
|
|
116
|
-
mpx: ((options) => (0, weapp_style_injector_webpack_mpx.StyleInjector)(
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
generic: ((options) => (0, weapp_style_injector_webpack.weappStyleInjectorWebpack)(require_generator.omitUndefined(options))),
|
|
115
|
+
mpx: ((options) => (0, weapp_style_injector_webpack_mpx.StyleInjector)(require_generator.omitUndefined({
|
|
116
|
+
...options,
|
|
117
|
+
subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appPath")
|
|
118
|
+
}))),
|
|
119
|
+
taro: ((options) => (0, weapp_style_injector_webpack_taro.StyleInjector)(require_generator.omitUndefined({
|
|
120
|
+
...options,
|
|
121
|
+
subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
|
|
122
|
+
}))),
|
|
123
|
+
uniApp: ((options) => (0, weapp_style_injector_webpack_uni_app.StyleInjector)(require_generator.omitUndefined({
|
|
124
|
+
...options,
|
|
125
|
+
subPackages: require_source_candidate_scan_signature.resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
|
|
126
|
+
})))
|
|
119
127
|
};
|
|
120
128
|
function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
121
129
|
const normalized = require_source_candidate_scan_signature.normalizeStyleInjectorOptions(options);
|
|
122
130
|
if (!normalized) return [];
|
|
123
|
-
let
|
|
131
|
+
let configuration;
|
|
124
132
|
let delegates;
|
|
125
133
|
let delegatesConfigured = false;
|
|
126
134
|
let delegatesBuildStarted = false;
|
|
@@ -130,31 +138,35 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
130
138
|
return delegates;
|
|
131
139
|
};
|
|
132
140
|
const configureDelegates = async () => {
|
|
133
|
-
if (delegatesConfigured || !
|
|
141
|
+
if (delegatesConfigured || !configuration) return;
|
|
134
142
|
delegatesConfigured = true;
|
|
135
|
-
for (const plugin of resolveDelegates())
|
|
143
|
+
for (const plugin of resolveDelegates()) await require_source_candidate_scan_signature.getViteHookHandler(plugin.configResolved)?.call(configuration.context, configuration.config);
|
|
136
144
|
};
|
|
137
|
-
const startDelegates = async (context) => {
|
|
145
|
+
const startDelegates = async (context, buildOptions) => {
|
|
138
146
|
if (delegatesBuildStarted) return;
|
|
139
147
|
await configureDelegates();
|
|
140
148
|
delegatesBuildStarted = true;
|
|
141
|
-
for (const plugin of resolveDelegates())
|
|
149
|
+
for (const plugin of resolveDelegates()) await require_source_candidate_scan_signature.getViteHookHandler(plugin.buildStart)?.call(context, buildOptions);
|
|
142
150
|
};
|
|
143
151
|
return [{
|
|
144
152
|
name: "weapp-tailwindcss:style-injector-pre",
|
|
145
153
|
apply: "build",
|
|
146
154
|
enforce: "pre",
|
|
147
155
|
configResolved(resolvedConfig) {
|
|
148
|
-
|
|
156
|
+
configuration = {
|
|
157
|
+
config: resolvedConfig,
|
|
158
|
+
context: this
|
|
159
|
+
};
|
|
149
160
|
},
|
|
150
|
-
async buildStart() {
|
|
151
|
-
await startDelegates(this);
|
|
161
|
+
async buildStart(buildOptions) {
|
|
162
|
+
await startDelegates(this, buildOptions);
|
|
152
163
|
},
|
|
153
164
|
async load(id, options) {
|
|
154
165
|
await configureDelegates();
|
|
155
166
|
for (const plugin of resolveDelegates()) {
|
|
156
|
-
|
|
157
|
-
|
|
167
|
+
const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.load);
|
|
168
|
+
if (!handler) continue;
|
|
169
|
+
const result = await handler.call(this, id, options);
|
|
158
170
|
if (result != null) return result;
|
|
159
171
|
}
|
|
160
172
|
},
|
|
@@ -163,7 +175,7 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
163
175
|
let currentCode = code;
|
|
164
176
|
let changed = false;
|
|
165
177
|
for (const plugin of resolveDelegates()) {
|
|
166
|
-
const handler =
|
|
178
|
+
const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.transform);
|
|
167
179
|
if (!handler) continue;
|
|
168
180
|
const result = await handler.call(this, currentCode, id, options);
|
|
169
181
|
if (!result) continue;
|
|
@@ -185,12 +197,15 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
185
197
|
apply: "build",
|
|
186
198
|
enforce: "post",
|
|
187
199
|
configResolved(resolvedConfig) {
|
|
188
|
-
|
|
200
|
+
configuration = {
|
|
201
|
+
config: resolvedConfig,
|
|
202
|
+
context: this
|
|
203
|
+
};
|
|
189
204
|
},
|
|
190
205
|
async generateBundle(outputOptions, bundle, isWrite) {
|
|
191
206
|
await configureDelegates();
|
|
192
207
|
for (const plugin of resolveDelegates()) {
|
|
193
|
-
const handler =
|
|
208
|
+
const handler = require_source_candidate_scan_signature.getViteHookHandler(plugin.generateBundle);
|
|
194
209
|
if (!handler) continue;
|
|
195
210
|
await handler.call(this, outputOptions, bundle, isWrite);
|
|
196
211
|
}
|
|
@@ -215,7 +230,7 @@ const CSS_REQUEST_RE = /\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\?
|
|
|
215
230
|
const HTML_REQUEST_RE = /\.html?(?:$|\?)/;
|
|
216
231
|
function classifyRuntimeEntry(file, matchers) {
|
|
217
232
|
if (matchers.htmlMatcher(file) || HTML_REQUEST_RE.test(file)) return "html";
|
|
218
|
-
if (matchers.cssMatcher(file) || CSS_REQUEST_RE.test(file) ||
|
|
233
|
+
if (matchers.cssMatcher(file) || CSS_REQUEST_RE.test(file) || require_generated_css_marker.isSourceStyleRequest(file)) return "css";
|
|
219
234
|
if (matchers.jsMatcher(file) || matchers.wxsMatcher(file)) return "js";
|
|
220
235
|
return "other";
|
|
221
236
|
}
|
|
@@ -325,7 +340,7 @@ async function createScopedGeneratorRuntime(options) {
|
|
|
325
340
|
const explicitCandidates = getSourceCandidatesForEntries(entries);
|
|
326
341
|
const outputCandidates = scopedSourceCandidateGetter?.(void 0);
|
|
327
342
|
const scopedCandidates = outputCandidates ? explicitCandidates.size === 0 && canFallbackToOutputCandidates(rawSource, entries) ? outputCandidates : intersectCandidates(explicitCandidates, outputCandidates) : explicitCandidates;
|
|
328
|
-
return (0,
|
|
343
|
+
return (0, _weapp_tailwindcss_postcss_transform.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
|
|
329
344
|
}
|
|
330
345
|
}
|
|
331
346
|
const scopedCandidates = scopedSourceCandidateGetter?.(void 0);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-kSd0ykiX.js";
|
|
1
2
|
import { detectAppType } from "./framework.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { o as normalizeStyleInjectorOptions } from "./source-candidate-scan-signature-
|
|
3
|
+
import { T as omitUndefined } from "./generator-oKZ5mCJ5.js";
|
|
4
|
+
import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-ENr4xzzw.js";
|
|
5
|
+
import { V as isSourceStyleRequest } from "./hmr-timing-xPpat-km.js";
|
|
6
|
+
import { c as getViteHookHandler, o as normalizeStyleInjectorOptions, s as resolveStyleInjectorSubPackages } from "./source-candidate-scan-signature-BjVQYL-C.js";
|
|
6
7
|
import path from "node:path";
|
|
8
|
+
import { finalizeMiniProgramCss as finalizeMiniProgramCss$1, hasMiniProgramCssSpecificityPlaceholders, pruneMiniProgramGeneratedCss, stripMiniProgramCssSpecificityPlaceholders } from "@weapp-tailwindcss/postcss/transform";
|
|
7
9
|
import { weappStyleInjector } from "weapp-style-injector/vite";
|
|
8
10
|
import { StyleInjector } from "weapp-style-injector/vite/taro";
|
|
9
11
|
import { StyleInjector as StyleInjector$1 } from "weapp-style-injector/vite/uni-app";
|
|
@@ -76,7 +78,7 @@ function resolveWebpackFrameworkProfile(options) {
|
|
|
76
78
|
//#endregion
|
|
77
79
|
//#region src/style-injector/internal.ts
|
|
78
80
|
function toPluginArray(pluginOrPlugins) {
|
|
79
|
-
return Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins];
|
|
81
|
+
return pluginOrPlugins ? Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins] : [];
|
|
80
82
|
}
|
|
81
83
|
function normalizeWebpackStyleInjectorOptions(options) {
|
|
82
84
|
const normalized = normalizeStyleInjectorOptions(options);
|
|
@@ -95,29 +97,36 @@ function normalizeWebpackStyleInjectorOptions(options) {
|
|
|
95
97
|
};
|
|
96
98
|
return webpackOptions;
|
|
97
99
|
}
|
|
98
|
-
function getTransformHandler(hook) {
|
|
99
|
-
if (typeof hook === "function") return hook;
|
|
100
|
-
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
101
|
-
}
|
|
102
|
-
function getGenerateBundleHandler(hook) {
|
|
103
|
-
if (typeof hook === "function") return hook;
|
|
104
|
-
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
105
|
-
}
|
|
106
100
|
const viteStyleInjectorDelegates = {
|
|
107
101
|
generic: ((options) => [weappStyleInjector(options)]),
|
|
108
|
-
taro: ((options) => toPluginArray(StyleInjector(
|
|
109
|
-
|
|
102
|
+
taro: ((options) => toPluginArray(StyleInjector(omitUndefined({
|
|
103
|
+
...options,
|
|
104
|
+
subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
|
|
105
|
+
})))),
|
|
106
|
+
uniApp: ((options) => toPluginArray(StyleInjector$1(omitUndefined({
|
|
107
|
+
...options,
|
|
108
|
+
subPackages: resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
|
|
109
|
+
}))))
|
|
110
110
|
};
|
|
111
111
|
const webpackStyleInjectorDelegates = {
|
|
112
|
-
generic: ((options) => weappStyleInjectorWebpack(options)),
|
|
113
|
-
mpx: ((options) => StyleInjector$2(
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
generic: ((options) => weappStyleInjectorWebpack(omitUndefined(options))),
|
|
113
|
+
mpx: ((options) => StyleInjector$2(omitUndefined({
|
|
114
|
+
...options,
|
|
115
|
+
subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appPath")
|
|
116
|
+
}))),
|
|
117
|
+
taro: ((options) => StyleInjector$3(omitUndefined({
|
|
118
|
+
...options,
|
|
119
|
+
subPackages: resolveStyleInjectorSubPackages(options.subPackages, "appConfigPath")
|
|
120
|
+
}))),
|
|
121
|
+
uniApp: ((options) => StyleInjector$4(omitUndefined({
|
|
122
|
+
...options,
|
|
123
|
+
subPackages: resolveStyleInjectorSubPackages(options.subPackages, "pagesJsonPath")
|
|
124
|
+
})))
|
|
116
125
|
};
|
|
117
126
|
function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
118
127
|
const normalized = normalizeStyleInjectorOptions(options);
|
|
119
128
|
if (!normalized) return [];
|
|
120
|
-
let
|
|
129
|
+
let configuration;
|
|
121
130
|
let delegates;
|
|
122
131
|
let delegatesConfigured = false;
|
|
123
132
|
let delegatesBuildStarted = false;
|
|
@@ -127,31 +136,35 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
127
136
|
return delegates;
|
|
128
137
|
};
|
|
129
138
|
const configureDelegates = async () => {
|
|
130
|
-
if (delegatesConfigured || !
|
|
139
|
+
if (delegatesConfigured || !configuration) return;
|
|
131
140
|
delegatesConfigured = true;
|
|
132
|
-
for (const plugin of resolveDelegates())
|
|
141
|
+
for (const plugin of resolveDelegates()) await getViteHookHandler(plugin.configResolved)?.call(configuration.context, configuration.config);
|
|
133
142
|
};
|
|
134
|
-
const startDelegates = async (context) => {
|
|
143
|
+
const startDelegates = async (context, buildOptions) => {
|
|
135
144
|
if (delegatesBuildStarted) return;
|
|
136
145
|
await configureDelegates();
|
|
137
146
|
delegatesBuildStarted = true;
|
|
138
|
-
for (const plugin of resolveDelegates())
|
|
147
|
+
for (const plugin of resolveDelegates()) await getViteHookHandler(plugin.buildStart)?.call(context, buildOptions);
|
|
139
148
|
};
|
|
140
149
|
return [{
|
|
141
150
|
name: "weapp-tailwindcss:style-injector-pre",
|
|
142
151
|
apply: "build",
|
|
143
152
|
enforce: "pre",
|
|
144
153
|
configResolved(resolvedConfig) {
|
|
145
|
-
|
|
154
|
+
configuration = {
|
|
155
|
+
config: resolvedConfig,
|
|
156
|
+
context: this
|
|
157
|
+
};
|
|
146
158
|
},
|
|
147
|
-
async buildStart() {
|
|
148
|
-
await startDelegates(this);
|
|
159
|
+
async buildStart(buildOptions) {
|
|
160
|
+
await startDelegates(this, buildOptions);
|
|
149
161
|
},
|
|
150
162
|
async load(id, options) {
|
|
151
163
|
await configureDelegates();
|
|
152
164
|
for (const plugin of resolveDelegates()) {
|
|
153
|
-
|
|
154
|
-
|
|
165
|
+
const handler = getViteHookHandler(plugin.load);
|
|
166
|
+
if (!handler) continue;
|
|
167
|
+
const result = await handler.call(this, id, options);
|
|
155
168
|
if (result != null) return result;
|
|
156
169
|
}
|
|
157
170
|
},
|
|
@@ -160,7 +173,7 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
160
173
|
let currentCode = code;
|
|
161
174
|
let changed = false;
|
|
162
175
|
for (const plugin of resolveDelegates()) {
|
|
163
|
-
const handler =
|
|
176
|
+
const handler = getViteHookHandler(plugin.transform);
|
|
164
177
|
if (!handler) continue;
|
|
165
178
|
const result = await handler.call(this, currentCode, id, options);
|
|
166
179
|
if (!result) continue;
|
|
@@ -182,12 +195,15 @@ function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
|
182
195
|
apply: "build",
|
|
183
196
|
enforce: "post",
|
|
184
197
|
configResolved(resolvedConfig) {
|
|
185
|
-
|
|
198
|
+
configuration = {
|
|
199
|
+
config: resolvedConfig,
|
|
200
|
+
context: this
|
|
201
|
+
};
|
|
186
202
|
},
|
|
187
203
|
async generateBundle(outputOptions, bundle, isWrite) {
|
|
188
204
|
await configureDelegates();
|
|
189
205
|
for (const plugin of resolveDelegates()) {
|
|
190
|
-
const handler =
|
|
206
|
+
const handler = getViteHookHandler(plugin.generateBundle);
|
|
191
207
|
if (!handler) continue;
|
|
192
208
|
await handler.call(this, outputOptions, bundle, isWrite);
|
|
193
209
|
}
|
|
@@ -331,4 +347,4 @@ async function createScopedGeneratorRuntime(options) {
|
|
|
331
347
|
return fallbackRuntime;
|
|
332
348
|
}
|
|
333
349
|
//#endregion
|
|
334
|
-
export {
|
|
350
|
+
export { createBuiltinWebpackStyleInjectorPlugin as _, hasMiniProgramCssSpecificityPlaceholders as a, resolveViteFrameworkProfile as b, createCandidateSignature as c, getSnapshotHash as d, hasRuntimeAffectingSourceChanges as f, createBuiltinViteStyleInjectorPlugins as g, resolvePluginDisabledState as h, finalizeMiniProgramCss$1 as i, createJsHashSalt as l, classifyRuntimeEntry as m, createScopedGeneratorRuntime as n, pruneMiniProgramGeneratedCss as o, summarizeStringDiff as p, createScopedGeneratorSourceTraceMap as r, stripMiniProgramCssSpecificityPlaceholders as s, createScopedGeneratorCandidateSignature as t, createLinkedImpactSignature as u, viteStyleInjectorDelegates as v, resolveWebpackFrameworkProfile as x, webpackStyleInjectorDelegates as y };
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
1
|
+
import { v as source_scan_exports } from "./tailwindcss-kSd0ykiX.js";
|
|
2
|
+
import { T as omitUndefined } from "./generator-oKZ5mCJ5.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
//#region src/bundlers/vite/plugin-hook.ts
|
|
6
|
+
/** 保留具体 hook 的参数及 this 类型,兼容函数和对象形式。 */
|
|
7
|
+
function getViteHookHandler(hook) {
|
|
8
|
+
return typeof hook === "function" ? hook : hook?.handler;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
5
11
|
//#region src/style-injector/options.ts
|
|
6
12
|
function normalizeStyleInjectorOptions(options) {
|
|
7
13
|
if (options === true) return {};
|
|
8
14
|
if (!options) return;
|
|
9
|
-
return options;
|
|
15
|
+
return omitUndefined(options);
|
|
16
|
+
}
|
|
17
|
+
/** 在框架入口校验分包配置,避免把另一框架的配置静默交给预设。 */
|
|
18
|
+
function resolveStyleInjectorSubPackages(subPackages, key) {
|
|
19
|
+
if (subPackages === void 0) return;
|
|
20
|
+
return (Array.isArray(subPackages) ? subPackages : [subPackages]).map((entry) => {
|
|
21
|
+
if (hasSubPackagePath(entry, key)) return entry;
|
|
22
|
+
throw new TypeError(`[weapp-style-injector] subPackages must provide ${key} for the selected framework.`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function hasSubPackagePath(entry, key) {
|
|
26
|
+
return key in entry && typeof Reflect.get(entry, key) === "string";
|
|
10
27
|
}
|
|
11
28
|
//#endregion
|
|
12
29
|
//#region src/bundlers/shared/module-graph.ts
|
|
@@ -62,7 +79,7 @@ function resolvePackageDir(name) {
|
|
|
62
79
|
//#endregion
|
|
63
80
|
//#region src/bundlers/shared/source-candidate-scan-signature.ts
|
|
64
81
|
function normalizeSignaturePath(value) {
|
|
65
|
-
return toPosixPath(path.resolve(value));
|
|
82
|
+
return (0, source_scan_exports.toPosixPath)(path.resolve(value));
|
|
66
83
|
}
|
|
67
84
|
function serializeInlineCandidates(inlineCandidates) {
|
|
68
85
|
return {
|
|
@@ -89,4 +106,4 @@ function createSourceCandidateScanSignature(input) {
|
|
|
89
106
|
});
|
|
90
107
|
}
|
|
91
108
|
//#endregion
|
|
92
|
-
export { toAbsoluteOutputPath as a, resolveOutputSpecifier as i, resolvePackageDir as n, normalizeStyleInjectorOptions as o, normalizeOutputPathKey as r, createSourceCandidateScanSignature as t };
|
|
109
|
+
export { toAbsoluteOutputPath as a, getViteHookHandler as c, resolveOutputSpecifier as i, resolvePackageDir as n, normalizeStyleInjectorOptions as o, normalizeOutputPathKey as r, resolveStyleInjectorSubPackages as s, createSourceCandidateScanSignature as t };
|