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
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_tailwindcss = require("./tailwindcss-9e6ZuYgS.cjs");
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
2
|
+
const require_generator = require("./generator-CxauQbx3.cjs");
|
|
4
3
|
const require_utils = require("./utils-CuKLf1Zv.cjs");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
4
|
+
const require_compiler = require("./compiler-DkGY5Nmh.cjs");
|
|
5
|
+
const require_runtime_state = require("./runtime-state-BOzuVoKl.cjs");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-U3KIUegn.cjs");
|
|
7
|
+
const require_generated_css_marker = require("./generated-css-marker-jMNbQHpy.cjs");
|
|
8
|
+
const require_cache = require("./cache-CzvIGfwS.cjs");
|
|
9
|
+
const require_hmr_timing = require("./hmr-timing-DfMbbZ1E.cjs");
|
|
10
|
+
const require_scoped_generator = require("./scoped-generator-BIZ7N_J-.cjs");
|
|
11
|
+
const require_source_candidate_scan_signature = require("./source-candidate-scan-signature-nG-rg809.cjs");
|
|
12
|
+
const require_pipeline_helpers = require("./pipeline-helpers-zMPmp5F3.cjs");
|
|
13
13
|
const require_css_loader_runtime = require("./css-loader-runtime-DGqsWVua.cjs");
|
|
14
14
|
const require_runtime_registry = require("./runtime-registry-BlIjpImP.cjs");
|
|
15
15
|
let node_fs = require("node:fs");
|
|
@@ -18,13 +18,13 @@ let node_path = require("node:path");
|
|
|
18
18
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
19
19
|
let node_process = require("node:process");
|
|
20
20
|
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
21
|
-
let
|
|
21
|
+
let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
|
|
22
22
|
let node_module = require("node:module");
|
|
23
23
|
node_module = require_rolldown_runtime.__toESM(node_module, 1);
|
|
24
24
|
let node_fs_promises = require("node:fs/promises");
|
|
25
|
+
let _weapp_core_escape = require("@weapp-core/escape");
|
|
25
26
|
let micromatch = require("micromatch");
|
|
26
27
|
micromatch = require_rolldown_runtime.__toESM(micromatch, 1);
|
|
27
|
-
let _weapp_core_escape = require("@weapp-core/escape");
|
|
28
28
|
let _weapp_tailwindcss_shared_node = require("@weapp-tailwindcss/shared/node");
|
|
29
29
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/shared.ts
|
|
30
30
|
function getCacheKey(filename) {
|
|
@@ -32,13 +32,13 @@ function getCacheKey(filename) {
|
|
|
32
32
|
}
|
|
33
33
|
function stripResourceQuery(resource) {
|
|
34
34
|
if (typeof resource !== "string") return resource;
|
|
35
|
-
return
|
|
35
|
+
return require_generated_css_marker.stripRequestQuery(resource);
|
|
36
36
|
}
|
|
37
37
|
function isCssLikeModuleResource(resource, cssMatcher) {
|
|
38
38
|
if (typeof resource !== "string") return false;
|
|
39
39
|
const normalizedResource = stripResourceQuery(resource);
|
|
40
40
|
if (normalizedResource && cssMatcher(normalizedResource)) return true;
|
|
41
|
-
if (
|
|
41
|
+
if (require_generated_css_marker.isSourceStyleRequest(resource)) return true;
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
44
44
|
function hasLoaderEntry(entries, target) {
|
|
@@ -186,7 +186,7 @@ function dirnameWebpackResourcePath(file) {
|
|
|
186
186
|
return node_path.default.dirname(file);
|
|
187
187
|
}
|
|
188
188
|
function resolveWebpackCssAssetModuleResource(resource, issuer, options) {
|
|
189
|
-
if (!isCssLikeModuleResource(resource, options.cssMatcher
|
|
189
|
+
if (!isCssLikeModuleResource(resource, options.cssMatcher)) return;
|
|
190
190
|
const normalized = stripResourceQuery(resource);
|
|
191
191
|
if (!normalized) return;
|
|
192
192
|
const absoluteResource = resolveWebpackResourcePath(normalized);
|
|
@@ -284,7 +284,7 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
284
284
|
return [...new Set(entries)];
|
|
285
285
|
})();
|
|
286
286
|
const configuredMainCssEntryFiles = configuredCssEntryFiles.slice(0, 1);
|
|
287
|
-
const scoreCssSourceOutputMatch = (file, sourceFile) =>
|
|
287
|
+
const scoreCssSourceOutputMatch = (file, sourceFile) => require_generated_css_marker.scoreTailwindV4CssSourceFileMatch(file, sourceFile, {
|
|
288
288
|
outputRoot: outputDir,
|
|
289
289
|
projectRoot: compilerOptions.tailwindcssBasedir,
|
|
290
290
|
cwd: compilerOptions.tailwindcssBasedir
|
|
@@ -344,7 +344,7 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
344
344
|
}
|
|
345
345
|
const tailwindSourceMatches = resourceMatches.filter((sourceFile) => {
|
|
346
346
|
const sourceCss = cssSources.get(sourceFile)?.css;
|
|
347
|
-
return sourceCss && (
|
|
347
|
+
return sourceCss && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(sourceCss) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCss)(sourceCss) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(sourceCss));
|
|
348
348
|
});
|
|
349
349
|
if (tailwindSourceMatches.length === 1) {
|
|
350
350
|
const sourceFile = tailwindSourceMatches[0];
|
|
@@ -369,9 +369,9 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
369
369
|
return sourceFile;
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const representedTailwindSourceMatches = [...cssSources.entries()].filter(([, source]) =>
|
|
372
|
+
const representedTailwindSourceMatches = [...cssSources.entries()].filter(([, source]) => (0, _weapp_tailwindcss_postcss_transform.isWebpackCssSourceRepresentedInAsset)(rawSource, source.css)).map(([sourceFile]) => ({
|
|
373
373
|
sourceFile,
|
|
374
|
-
score:
|
|
374
|
+
score: require_generated_css_marker.scoreTailwindV4CssSourceFileMatch(file, sourceFile, {
|
|
375
375
|
outputRoot: outputDir,
|
|
376
376
|
projectRoot: compilerOptions.tailwindcssBasedir,
|
|
377
377
|
cwd: compilerOptions.tailwindcssBasedir
|
|
@@ -387,7 +387,7 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
387
387
|
}
|
|
388
388
|
const pathMatches = [...cssSources.keys()].map((sourceFile) => ({
|
|
389
389
|
sourceFile,
|
|
390
|
-
score:
|
|
390
|
+
score: require_generated_css_marker.scoreTailwindV4CssSourceFileMatch(file, sourceFile, {
|
|
391
391
|
outputRoot: outputDir,
|
|
392
392
|
projectRoot: compilerOptions.tailwindcssBasedir,
|
|
393
393
|
cwd: compilerOptions.tailwindcssBasedir
|
|
@@ -416,7 +416,7 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
416
416
|
const sourceMatchedMainCssEntry = sourceFile !== void 0 && isConfiguredMainCssEntryFile(sourceFile) && isCssSourceAllowedForOutput(file, sourceFile);
|
|
417
417
|
const isMainChunk = isMainCssAsset || sourceMatchedMainCssEntry;
|
|
418
418
|
const sourceCss = sourceFile ? cssSources.get(sourceFile)?.css : void 0;
|
|
419
|
-
const generatorSourceCss =
|
|
419
|
+
const generatorSourceCss = (0, _weapp_tailwindcss_postcss_transform.removeWebpackGeneratorNonTailwindImports)(sourceCss);
|
|
420
420
|
const generatorCssSource = require_pipeline_helpers.createWebpackGeneratorCssSource(sourceFile, generatorSourceCss);
|
|
421
421
|
const cacheKey = [
|
|
422
422
|
majorVersion ?? "unknown",
|
|
@@ -446,7 +446,7 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
446
446
|
const majorVersion = runtimeState.tailwindRuntime.majorVersion;
|
|
447
447
|
const sourceFile = resolveWebpackCssSourceFile(file);
|
|
448
448
|
const sourceCss = sourceFile ? cssSources.get(sourceFile)?.css : void 0;
|
|
449
|
-
const generatorSourceCss =
|
|
449
|
+
const generatorSourceCss = (0, _weapp_tailwindcss_postcss_transform.removeWebpackGeneratorNonTailwindImports)(sourceCss);
|
|
450
450
|
const cacheKey = [
|
|
451
451
|
majorVersion ?? "unknown",
|
|
452
452
|
sourceFile ?? "asset",
|
|
@@ -479,13 +479,13 @@ function createWebpackCssSourceResolvers(options) {
|
|
|
479
479
|
async function finalizeWebpackProcessAssets(context) {
|
|
480
480
|
const { activeProcessCacheKeys, activeProcessHashKeys, activeWebpackCssSourceFiles, compilerOptions, cssAssetResources, cssHandlerOptionsCache, cssTaskFactories, cssUserHandlerOptionsCache, debug, entries, groupedEntries, hmrTimingStartedAt, htmlTaskFactories, jsTaskFactories, pruneWebpackCssSources, recordTimingDetail, registeredWebpackCssSourceFiles, taskConcurrency, tasks, timingDetails, watchMode, webpackSourceCandidateScanCache } = context;
|
|
481
481
|
if (!watchMode) {
|
|
482
|
-
|
|
482
|
+
require_generated_css_marker.pushConcurrentTaskFactories(tasks, htmlTaskFactories, taskConcurrency);
|
|
483
483
|
await Promise.all(tasks);
|
|
484
484
|
tasks.length = 0;
|
|
485
|
-
|
|
485
|
+
require_generated_css_marker.pushConcurrentTaskFactories(tasks, jsTaskFactories, taskConcurrency);
|
|
486
486
|
await Promise.all(tasks);
|
|
487
487
|
tasks.length = 0;
|
|
488
|
-
|
|
488
|
+
require_generated_css_marker.pushConcurrentTaskFactories(tasks, cssTaskFactories, taskConcurrency);
|
|
489
489
|
}
|
|
490
490
|
const taskWaitStartedAt = performance.now();
|
|
491
491
|
await Promise.all(tasks);
|
|
@@ -524,18 +524,18 @@ async function finalizeWebpackProcessAssets(context) {
|
|
|
524
524
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-result.ts
|
|
525
525
|
async function finalizeWebpackGeneratedCssResult(context) {
|
|
526
526
|
const { ConcatSource, compilerOptions, cssHandlerOptions, currentRawSource, debug, file, finalizeCssAssetSource, finalizeTracedCss, generated, generatorRawSource, generatorRuntimeSet, isWebGeneratorTarget, runtimeState, shouldPreserveExistingPreflight, sourceCss, sourceCssProcessed, userRawSource } = context;
|
|
527
|
-
const finalizedGeneratedCss = generated ? finalizeCssAssetSource(isWebGeneratorTarget && currentRawSource.includes("tailwindcss v4.") ?
|
|
527
|
+
const finalizedGeneratedCss = generated ? finalizeCssAssetSource(isWebGeneratorTarget && currentRawSource.includes("tailwindcss v4.") ? (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
528
528
|
css: generated.css,
|
|
529
529
|
processed: true
|
|
530
530
|
}, {
|
|
531
|
-
css:
|
|
531
|
+
css: (0, _weapp_tailwindcss_postcss_transform.removeWebpackTailwindGeneratedAssetCss)(currentRawSource),
|
|
532
532
|
processed: true
|
|
533
533
|
})?.css ?? generated.css : generated.css, {
|
|
534
534
|
cssPreflight: cssHandlerOptions.isMainChunk,
|
|
535
535
|
generatedCss: true,
|
|
536
536
|
preserveExistingPreflight: shouldPreserveExistingPreflight
|
|
537
537
|
}) : isWebGeneratorTarget ? finalizeCssAssetSource(generatorRawSource, { generatedCss: false }) : finalizeCssAssetSource((await compilerOptions.styleHandler(generatorRawSource, cssHandlerOptions)).css, { generatedCss: false });
|
|
538
|
-
const sourceBareUserCss = isWebGeneratorTarget ? void 0 :
|
|
538
|
+
const sourceBareUserCss = isWebGeneratorTarget ? void 0 : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)(...[
|
|
539
539
|
userRawSource,
|
|
540
540
|
sourceCss === void 0 ? void 0 : {
|
|
541
541
|
css: sourceCss,
|
|
@@ -548,7 +548,7 @@ async function finalizeWebpackGeneratedCssResult(context) {
|
|
|
548
548
|
].map((source) => {
|
|
549
549
|
if (source === void 0) return;
|
|
550
550
|
return {
|
|
551
|
-
css:
|
|
551
|
+
css: (0, _weapp_tailwindcss_postcss_transform.collectWebpackBareSelectorUserCss)(source.css),
|
|
552
552
|
processed: source.processed
|
|
553
553
|
};
|
|
554
554
|
}));
|
|
@@ -557,8 +557,8 @@ async function finalizeWebpackGeneratedCssResult(context) {
|
|
|
557
557
|
cssPreflight: false,
|
|
558
558
|
generatedCss: false
|
|
559
559
|
});
|
|
560
|
-
const missingSourceBareUserCss = finalizedSourceBareUserCss.trim().length === 0 ? "" : (0,
|
|
561
|
-
const source = new ConcatSource(finalizeTracedCss(missingSourceBareUserCss.trim().length === 0 ? finalizedGeneratedCss :
|
|
560
|
+
const missingSourceBareUserCss = finalizedSourceBareUserCss.trim().length === 0 ? "" : (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(finalizedGeneratedCss, finalizedSourceBareUserCss);
|
|
561
|
+
const source = new ConcatSource(finalizeTracedCss(missingSourceBareUserCss.trim().length === 0 ? finalizedGeneratedCss : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
562
562
|
css: finalizedGeneratedCss,
|
|
563
563
|
processed: true
|
|
564
564
|
}, {
|
|
@@ -592,7 +592,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
592
592
|
const cssSourceHash = (() => {
|
|
593
593
|
const sourceFile = resolveWebpackCssSourceFile(file, currentRawSource);
|
|
594
594
|
const sourceCss = sourceFile ? cssSources.get(sourceFile)?.css : void 0;
|
|
595
|
-
const generatorSourceCss =
|
|
595
|
+
const generatorSourceCss = (0, _weapp_tailwindcss_postcss_transform.removeWebpackGeneratorNonTailwindImports)(sourceCss);
|
|
596
596
|
if (sourceCss === void 0) return sourceFile === void 0 ? "webpack-css-source:0" : `webpack-css-source:0:${sourceFile}`;
|
|
597
597
|
return `webpack-css-source:1:${compilerOptions.cache.computeHash(sourceCss)}:${generatorSourceCss === sourceCss || generatorSourceCss === void 0 ? "generator-source:0" : compilerOptions.cache.computeHash(generatorSourceCss)}`;
|
|
598
598
|
})();
|
|
@@ -622,14 +622,14 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
622
622
|
const sourceCss = sourceFile ? cssSources.get(node_path.default.resolve(sourceFile))?.css : void 0;
|
|
623
623
|
const isConfiguredCssSource = sourceFile !== void 0 && configuredCssEntryFiles.some((entry) => node_path.default.resolve(entry) === node_path.default.resolve(sourceFile));
|
|
624
624
|
const isConfiguredMainCssSource = sourceFile !== void 0 && configuredMainCssEntryFiles.some((entry) => node_path.default.resolve(entry) === node_path.default.resolve(sourceFile));
|
|
625
|
-
const sourceCssHasTailwindRoot = sourceCss !== void 0 &&
|
|
625
|
+
const sourceCssHasTailwindRoot = sourceCss !== void 0 && (0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(sourceCss, { importFallback: true });
|
|
626
626
|
const shouldPreserveExistingPreflight = cssHandlerOptions.isMainChunk || !isConfiguredMainCssSource && (isConfiguredCssSource || sourceCssHasTailwindRoot);
|
|
627
627
|
const loaderGeneratedCss = sourceFile ? generatedCssSources.get(node_path.default.resolve(sourceFile)) : void 0;
|
|
628
|
-
const shouldRegenerateExplicitTailwindV4CssSource = sourceCss !== void 0 && (
|
|
628
|
+
const shouldRegenerateExplicitTailwindV4CssSource = sourceCss !== void 0 && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(sourceCss, { importFallback: true }) || sourceCss.includes("@config"));
|
|
629
629
|
const explicitTailwindV4SourceCandidates = shouldRegenerateExplicitTailwindV4CssSource && sourceCss && sourceFile && webpackSourceCandidates?.getSourceCandidatesForEntries ? await require_tailwindcss.resolveTailwindV4EntriesFromCssCached(sourceCss, node_path.default.dirname(sourceFile)).then((resolved) => resolved?.entries ? webpackSourceCandidates.getSourceCandidatesForEntries(resolved.entries) : void 0) : void 0;
|
|
630
630
|
if (loaderGeneratedCss && require_pipeline_helpers.shouldConsumeWebpackLoaderGeneratedCss({
|
|
631
631
|
allowMarkerlessRegistryMatch: configuredCssEntryFiles.length === 1,
|
|
632
|
-
hasBundlerGeneratedCssMarker:
|
|
632
|
+
hasBundlerGeneratedCssMarker: (0, _weapp_tailwindcss_postcss_transform.hasBundlerGeneratedCssMarker)(currentRawSource),
|
|
633
633
|
loaderGeneratedClassSet: loaderGeneratedCss.classSet,
|
|
634
634
|
sourceCandidates: explicitTailwindV4SourceCandidates,
|
|
635
635
|
shouldRegenerateExplicitTailwindV4CssSource,
|
|
@@ -640,22 +640,22 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
640
640
|
transformRuntimeSet.add(className);
|
|
641
641
|
}
|
|
642
642
|
for (const dependency of loaderGeneratedCss.dependencies) compilation.fileDependencies?.add?.(dependency);
|
|
643
|
-
const currentRawSourceWithoutBundlerMarkers =
|
|
643
|
+
const currentRawSourceWithoutBundlerMarkers = (0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(currentRawSource);
|
|
644
644
|
const currentAssetHasProcessedUrl = require_pipeline_helpers.hasProcessedCssAssetUrl(currentRawSourceWithoutBundlerMarkers) && currentRawSourceWithoutBundlerMarkers !== loaderGeneratedCss.css;
|
|
645
|
-
const currentAssetUserCss = currentAssetHasProcessedUrl ? currentRawSourceWithoutBundlerMarkers : require_pipeline_helpers.shouldUseWebpackAssetAsGeneratorUserCss(currentRawSourceWithoutBundlerMarkers, loaderGeneratedCss.css, { processed: true }) ?
|
|
646
|
-
const loaderGeneratedCssWithoutMarkers =
|
|
647
|
-
const currentAssetUserCssWithoutMarkers = currentAssetUserCss === void 0 ? "" :
|
|
648
|
-
const currentAssetMissingUserCss = !(currentAssetUserCssWithoutMarkers.trim().length > 0 && !
|
|
645
|
+
const currentAssetUserCss = currentAssetHasProcessedUrl ? currentRawSourceWithoutBundlerMarkers : require_pipeline_helpers.shouldUseWebpackAssetAsGeneratorUserCss(currentRawSourceWithoutBundlerMarkers, loaderGeneratedCss.css, { processed: true }) ? (0, _weapp_tailwindcss_postcss_transform.removeGeneratedSelectorCompatCss)(currentRawSourceWithoutBundlerMarkers, loaderGeneratedCss.css) : void 0;
|
|
646
|
+
const loaderGeneratedCssWithoutMarkers = (0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(loaderGeneratedCss.css);
|
|
647
|
+
const currentAssetUserCssWithoutMarkers = currentAssetUserCss === void 0 ? "" : (0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(currentAssetUserCss);
|
|
648
|
+
const currentAssetMissingUserCss = !(currentAssetUserCssWithoutMarkers.trim().length > 0 && !(0, _weapp_tailwindcss_postcss_transform.isCommentOnlyCss)(currentAssetUserCssWithoutMarkers)) ? "" : (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(currentAssetUserCssWithoutMarkers, loaderGeneratedCssWithoutMarkers);
|
|
649
649
|
if (isConfiguredMainCssSource && !cssHandlerOptions.isMainChunk) {
|
|
650
650
|
debug("css skip duplicate webpack loader main generation: %s <- %s", file, sourceFile);
|
|
651
|
-
const userCss = currentAssetMissingUserCss.trim().length === 0 ||
|
|
651
|
+
const userCss = currentAssetMissingUserCss.trim().length === 0 || (0, _weapp_tailwindcss_postcss_transform.isCommentOnlyCss)(currentAssetMissingUserCss) ? "" : finalizeCssAssetSource(currentAssetMissingUserCss, {
|
|
652
652
|
cssPreflight: false,
|
|
653
653
|
generatedCss: false
|
|
654
654
|
});
|
|
655
655
|
return { result: new ConcatSource(finalizeTracedCss(userCss, cssHandlerOptions)) };
|
|
656
656
|
}
|
|
657
|
-
const mergedLoaderCss = currentAssetUserCss === void 0 ? loaderGeneratedCss.css :
|
|
658
|
-
css: currentAssetUserCss === void 0 ? loaderGeneratedCss.css : currentAssetHasProcessedUrl ?
|
|
657
|
+
const mergedLoaderCss = currentAssetUserCss === void 0 ? loaderGeneratedCss.css : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
658
|
+
css: currentAssetUserCss === void 0 ? loaderGeneratedCss.css : currentAssetHasProcessedUrl ? (0, _weapp_tailwindcss_postcss_transform.removeGeneratedSelectorCompatCss)(loaderGeneratedCss.css, currentAssetUserCss) : (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(currentAssetUserCss, loaderGeneratedCss.css),
|
|
659
659
|
processed: true
|
|
660
660
|
}, currentAssetUserCss === void 0 ? void 0 : {
|
|
661
661
|
css: currentAssetUserCss,
|
|
@@ -667,7 +667,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
667
667
|
generatedCss: true,
|
|
668
668
|
preserveExistingPreflight: shouldPreserveExistingPreflight
|
|
669
669
|
});
|
|
670
|
-
const loaderSourceBareUserCss = isWebGeneratorTarget ? void 0 :
|
|
670
|
+
const loaderSourceBareUserCss = isWebGeneratorTarget ? void 0 : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)(...[currentAssetUserCss === void 0 ? void 0 : {
|
|
671
671
|
css: currentAssetUserCss,
|
|
672
672
|
processed: true
|
|
673
673
|
}, sourceCss === void 0 ? void 0 : {
|
|
@@ -676,7 +676,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
676
676
|
}].map((source) => {
|
|
677
677
|
if (source === void 0) return;
|
|
678
678
|
return {
|
|
679
|
-
css:
|
|
679
|
+
css: (0, _weapp_tailwindcss_postcss_transform.collectWebpackBareSelectorUserCss)(source.css),
|
|
680
680
|
processed: source.processed
|
|
681
681
|
};
|
|
682
682
|
}));
|
|
@@ -685,8 +685,8 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
685
685
|
cssPreflight: false,
|
|
686
686
|
generatedCss: false
|
|
687
687
|
});
|
|
688
|
-
const missingLoaderSourceBareUserCss = finalizedLoaderSourceBareUserCss.trim().length === 0 ? "" : (0,
|
|
689
|
-
const css = finalizeTracedCss(missingLoaderSourceBareUserCss.trim().length === 0 ? finalizedLoaderCss :
|
|
688
|
+
const missingLoaderSourceBareUserCss = finalizedLoaderSourceBareUserCss.trim().length === 0 ? "" : (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(finalizedLoaderCss, finalizedLoaderSourceBareUserCss);
|
|
689
|
+
const css = finalizeTracedCss(missingLoaderSourceBareUserCss.trim().length === 0 ? finalizedLoaderCss : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
690
690
|
css: finalizedLoaderCss,
|
|
691
691
|
processed: true
|
|
692
692
|
}, {
|
|
@@ -701,13 +701,13 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
701
701
|
...source,
|
|
702
702
|
file: registeredSourceFile
|
|
703
703
|
})), generatorRawSource, sourceFile, (registeredSourceFile) => isSameWebpackSourceScope(file, registeredSourceFile, sourceFile));
|
|
704
|
-
const currentAssetLooksGenerated =
|
|
705
|
-
const currentAssetHasBundlerGeneratedMarker =
|
|
706
|
-
const currentAssetUserCssSource = currentAssetLooksGenerated ?
|
|
707
|
-
if (sourceFile === void 0 && currentAssetHasBundlerGeneratedMarker && (currentAssetUserCssSource.trim().length === 0 ||
|
|
708
|
-
const currentAssetHasAdditionalUserCss = currentAssetLooksGenerated && (
|
|
704
|
+
const currentAssetLooksGenerated = (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCss)(currentRawSource) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(currentRawSource);
|
|
705
|
+
const currentAssetHasBundlerGeneratedMarker = (0, _weapp_tailwindcss_postcss_transform.hasBundlerGeneratedCssMarker)(currentRawSource);
|
|
706
|
+
const currentAssetUserCssSource = currentAssetLooksGenerated ? (0, _weapp_tailwindcss_postcss_transform.removeWebpackTailwindGeneratedAssetCss)(currentRawSource) : currentRawSource;
|
|
707
|
+
if (sourceFile === void 0 && currentAssetHasBundlerGeneratedMarker && (currentAssetUserCssSource.trim().length === 0 || (0, _weapp_tailwindcss_postcss_transform.isCommentOnlyCss)(currentAssetUserCssSource))) return { result: new ConcatSource(finalizeTracedCss("", cssHandlerOptions)) };
|
|
708
|
+
const currentAssetHasAdditionalUserCss = currentAssetLooksGenerated && ((0, _weapp_tailwindcss_postcss_transform.hasAdditionalWebpackAssetUserCssMarkers)(currentAssetUserCssSource, generatorRawSource) || currentAssetUserCssSource.trim().length > 0);
|
|
709
709
|
const shouldPreserveGeneratedWebAssetUserCss = isWebGeneratorTarget && currentAssetLooksGenerated && !currentAssetHasBundlerGeneratedMarker && !currentAssetHasAdditionalUserCss;
|
|
710
|
-
const hasExplicitSourceCssForCurrentAsset = sourceCss !== void 0 && (
|
|
710
|
+
const hasExplicitSourceCssForCurrentAsset = sourceCss !== void 0 && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(sourceCss, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(sourceCss));
|
|
711
711
|
const currentAssetHasUserCss = (sourceCssProcessed || hasExplicitSourceCssForCurrentAsset) && currentAssetLooksGenerated && !shouldPreserveGeneratedWebAssetUserCss ? currentAssetHasAdditionalUserCss : require_pipeline_helpers.shouldUseWebpackAssetAsGeneratorUserCss(currentAssetUserCssSource, generatorRawSource, { processed: sourceCssProcessed || shouldPreserveGeneratedWebAssetUserCss });
|
|
712
712
|
const shouldAppendCurrentAssetUserCss = shouldAppendCurrentWebpackAssetUserCss({
|
|
713
713
|
currentAssetHasBundlerGeneratedMarker,
|
|
@@ -717,17 +717,17 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
717
717
|
shouldPreserveGeneratedWebAssetUserCss,
|
|
718
718
|
sourceCssProcessed
|
|
719
719
|
});
|
|
720
|
-
const userRawSource =
|
|
720
|
+
const userRawSource = (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)(createWebpackCurrentAssetUserRawSource({
|
|
721
721
|
currentAssetHasUserCss,
|
|
722
722
|
currentAssetLooksGenerated,
|
|
723
723
|
currentAssetUserCssSource,
|
|
724
724
|
shouldAppendCurrentAssetUserCss,
|
|
725
725
|
sourceCssProcessed
|
|
726
726
|
}), registeredUserRawSource);
|
|
727
|
-
if ((0,
|
|
727
|
+
if ((0, _weapp_tailwindcss_postcss_transform.isPureLocalCssImportWrapper)(currentRawSource)) return { result: new ConcatSource((0, _weapp_tailwindcss_postcss_transform.removeTailwindSourceDirectives)((0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(currentRawSource), { importFallback: true })) };
|
|
728
728
|
const fallbackGeneratorRuntimeSet = getGeneratorRuntimeSet();
|
|
729
|
-
const hasExplicitTailwindV4SourceCss = sourceCss !== void 0 && (
|
|
730
|
-
const currentAssetHasTailwindDirectives =
|
|
729
|
+
const hasExplicitTailwindV4SourceCss = sourceCss !== void 0 && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(sourceCss, { importFallback: true }) || sourceCss.includes("@config"));
|
|
730
|
+
const currentAssetHasTailwindDirectives = (0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(generatorRawSource, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(generatorRawSource, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(generatorRawSource);
|
|
731
731
|
const shouldForceTailwindV4Generation = hasConfiguredTailwindV4SourceRoots() && (configuredMainCssEntryFiles.length > 0 && sourceFile !== void 0 || currentAssetHasTailwindDirectives || hasExplicitTailwindV4SourceCss);
|
|
732
732
|
const shouldSkipUnmatchedMainCssGeneration = !isWebGeneratorTarget && cssHandlerOptions.isMainChunk && sourceFile === void 0 && configuredMainCssEntryFiles.length > 0 && !currentAssetHasTailwindDirectives;
|
|
733
733
|
const shouldSkipPlainNonMainCssGeneration = !cssHandlerOptions.isMainChunk && sourceCss !== void 0 && !hasExplicitSourceCssForCurrentAsset && !hasExplicitTailwindV4SourceCss && !currentAssetHasTailwindDirectives;
|
|
@@ -778,7 +778,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
778
778
|
};
|
|
779
779
|
let generated;
|
|
780
780
|
if (!shouldSkipUnmatchedMainCssGeneration && !shouldSkipPlainNonMainCssGeneration) try {
|
|
781
|
-
generated = await
|
|
781
|
+
generated = await require_generated_css_marker.generateTailwindV4Css({
|
|
782
782
|
...generatorOptions,
|
|
783
783
|
outputFile: file
|
|
784
784
|
});
|
|
@@ -1082,7 +1082,7 @@ async function processWebpackProcessedCssAsset(element, context) {
|
|
|
1082
1082
|
const processedCssAssetMetadata = { isMainCssChunk: cssHandlerOptionsForProcessedAsset.isMainChunk };
|
|
1083
1083
|
const processedSourceFile = cssHandlerOptionsForProcessedAsset.sourceOptions?.sourceFile;
|
|
1084
1084
|
const processedSourceCss = processedSourceFile ? cssSources.get(node_path.default.resolve(processedSourceFile))?.css : void 0;
|
|
1085
|
-
const shouldRegenerateProcessedTailwindV4SourceCss = processedSourceCss !== void 0 && (
|
|
1085
|
+
const shouldRegenerateProcessedTailwindV4SourceCss = processedSourceCss !== void 0 && ((0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(processedSourceCss, { importFallback: true }) || processedSourceCss.includes("@config"));
|
|
1086
1086
|
const processedCssAssetKnown = isKnownWebpackProcessedCssAsset?.(file, processedCssAssetMetadata) === true;
|
|
1087
1087
|
const processedLoaderGeneratedCss = processedSourceFile ? generatedCssSources.get(node_path.default.resolve(processedSourceFile)) : void 0;
|
|
1088
1088
|
const processedAssetSourceHash = watchMode && isWebGeneratorTarget && cssHandlerOptionsForProcessedAsset.isMainChunk ? compilerOptions.cache.computeHash(readRawSource()) : chunkHash === void 0 ? processedCssAssetKnown ? "webpack-css-asset:known" : compilerOptions.cache.computeHash(readRawSource()) : "webpack-css-asset:chunk";
|
|
@@ -1101,20 +1101,20 @@ async function processWebpackProcessedCssAsset(element, context) {
|
|
|
1101
1101
|
hasTailwindGeneratedAssetCss = hasGeneratedCssMarker;
|
|
1102
1102
|
} else {
|
|
1103
1103
|
const source = readCurrentProcessedRawSource();
|
|
1104
|
-
hasGeneratedCssMarker =
|
|
1105
|
-
hasTailwindGeneratedAssetCss =
|
|
1104
|
+
hasGeneratedCssMarker = (0, _weapp_tailwindcss_postcss_transform.hasBundlerGeneratedCssMarker)(source);
|
|
1105
|
+
hasTailwindGeneratedAssetCss = (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCss)(source) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(source);
|
|
1106
1106
|
}
|
|
1107
1107
|
const hasProcessedAssetTailwindDirectives = () => {
|
|
1108
1108
|
const source = readCurrentProcessedRawSource();
|
|
1109
|
-
return
|
|
1109
|
+
return (0, _weapp_tailwindcss_postcss_transform.hasTailwindRootDirectives)(source, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(source, { importFallback: true }) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindApplyDirective)(source);
|
|
1110
1110
|
};
|
|
1111
1111
|
const shouldForceConfiguredMainCssGeneration = cssHandlerOptionsForProcessedAsset.isMainChunk && hasConfiguredTailwindV4SourceRoots() && !hasGeneratedCssMarker && (configuredMainCssEntryFiles.length > 0 || shouldRegenerateProcessedTailwindV4SourceCss || hasProcessedAssetTailwindDirectives());
|
|
1112
1112
|
const hasProcessedMainAssetUserCss = cachedSkipProcessedCssAsset === void 0 && cssHandlerOptionsForProcessedAsset.isMainChunk && (hasGeneratedCssMarker || hasTailwindGeneratedAssetCss) && require_pipeline_helpers.createWebpackUserCssSourceAppend([...cssSources.entries()].map(([sourceFile, source]) => ({
|
|
1113
1113
|
...source,
|
|
1114
1114
|
file: sourceFile
|
|
1115
1115
|
})), readCurrentProcessedRawSource()) !== void 0;
|
|
1116
|
-
const hasProcessedLoaderGeneratedUserCss = cachedSkipProcessedCssAsset === void 0 && processedLoaderGeneratedCss !== void 0 &&
|
|
1117
|
-
const shouldFinalizeProcessedWebCssAsset = isWebGeneratorTarget && !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss &&
|
|
1116
|
+
const hasProcessedLoaderGeneratedUserCss = cachedSkipProcessedCssAsset === void 0 && processedLoaderGeneratedCss !== void 0 && (0, _weapp_tailwindcss_postcss_transform.hasAdditionalWebpackAssetUserCssMarkers)(processedLoaderGeneratedCss.css, readCurrentProcessedRawSource());
|
|
1117
|
+
const shouldFinalizeProcessedWebCssAsset = isWebGeneratorTarget && !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss && (0, _weapp_tailwindcss_postcss_transform.hasTailwindSourceDirectives)(readCurrentProcessedRawSource(), { importFallback: true });
|
|
1118
1118
|
const shouldPreserveFinalWebCssAsset = isWebGeneratorTarget && processedSourceFile === void 0 && !shouldForceConfiguredMainCssGeneration && (hasGeneratedCssMarker || hasTailwindGeneratedAssetCss);
|
|
1119
1119
|
const shouldSkipKnownProcessedCssAsset = !shouldForceConfiguredMainCssGeneration && !shouldRegenerateProcessedTailwindV4SourceCss && !shouldRegenerateStaleProcessedWebCssAsset && (processedCssAssetKnown || isWebpackProcessedCssAsset?.(file, readCurrentProcessedRawSource(), processedCssAssetMetadata)) && !hasProcessedMainAssetUserCss && !hasProcessedLoaderGeneratedUserCss && (!cssHandlerOptionsForProcessedAsset.isMainChunk || hasGeneratedCssMarker || hasTailwindGeneratedAssetCss);
|
|
1120
1120
|
const shouldSkipProcessedCssAsset = cachedSkipProcessedCssAsset ?? (shouldFinalizeProcessedWebCssAsset || shouldPreserveFinalWebCssAsset || shouldSkipKnownProcessedCssAsset);
|
|
@@ -1141,30 +1141,30 @@ async function processWebpackProcessedCssAsset(element, context) {
|
|
|
1141
1141
|
},
|
|
1142
1142
|
transform: async () => {
|
|
1143
1143
|
const source = readCurrentProcessedRawSource();
|
|
1144
|
-
const missingProcessedLoaderGeneratedCss = isWebGeneratorTarget && processedLoaderGeneratedCss ? (0,
|
|
1145
|
-
const sourceWithLoaderGeneratedCss = missingProcessedLoaderGeneratedCss.trim().length === 0 ? source :
|
|
1144
|
+
const missingProcessedLoaderGeneratedCss = isWebGeneratorTarget && processedLoaderGeneratedCss ? (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(source, (0, _weapp_tailwindcss_postcss_transform.stripBundlerGeneratedCssMarkers)(processedLoaderGeneratedCss.css)) : "";
|
|
1145
|
+
const sourceWithLoaderGeneratedCss = missingProcessedLoaderGeneratedCss.trim().length === 0 ? source : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
1146
1146
|
css: source,
|
|
1147
1147
|
processed: true
|
|
1148
1148
|
}, {
|
|
1149
1149
|
css: missingProcessedLoaderGeneratedCss,
|
|
1150
1150
|
processed: true
|
|
1151
1151
|
}).css;
|
|
1152
|
-
const processedBareSelectorSourceCss = processedSourceCss ?? (hasTailwindGeneratedAssetCss ?
|
|
1152
|
+
const processedBareSelectorSourceCss = processedSourceCss ?? (hasTailwindGeneratedAssetCss ? (0, _weapp_tailwindcss_postcss_transform.removeWebpackTailwindGeneratedAssetCss)(sourceWithLoaderGeneratedCss) : void 0);
|
|
1153
1153
|
const handledCss = hasTailwindGeneratedAssetCss && (!hasGeneratedCssMarker || !isWebGeneratorTarget && require_pipeline_helpers.hasDeferredWebpackGeneratedCss(source, [...generatedCssSources.values()].map((item) => item.classSet))) ? isWebGeneratorTarget ? sourceWithLoaderGeneratedCss : (await compilerOptions.styleHandler(sourceWithLoaderGeneratedCss, cssHandlerOptionsForProcessedAsset)).css : sourceWithLoaderGeneratedCss;
|
|
1154
|
-
const nextCss =
|
|
1154
|
+
const nextCss = (0, _weapp_tailwindcss_postcss_transform.stripTrailingLineWhitespace)(finalizeCssAssetSource(handledCss, {
|
|
1155
1155
|
cssPreflight: cssHandlerOptionsForProcessedAsset.isMainChunk,
|
|
1156
1156
|
generatedCss: hasGeneratedCssMarker || hasTailwindGeneratedAssetCss
|
|
1157
1157
|
}));
|
|
1158
|
-
const processedSourceBareUserCss = isWebGeneratorTarget || processedBareSelectorSourceCss === void 0 ? void 0 :
|
|
1159
|
-
css:
|
|
1158
|
+
const processedSourceBareUserCss = isWebGeneratorTarget || processedBareSelectorSourceCss === void 0 ? void 0 : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
1159
|
+
css: (0, _weapp_tailwindcss_postcss_transform.collectWebpackBareSelectorUserCss)(processedBareSelectorSourceCss),
|
|
1160
1160
|
processed: false
|
|
1161
1161
|
});
|
|
1162
1162
|
const finalizedProcessedSourceBareUserCss = processedSourceBareUserCss === void 0 ? "" : finalizeCssAssetSource(processedSourceBareUserCss.css, {
|
|
1163
1163
|
cssPreflight: false,
|
|
1164
1164
|
generatedCss: false
|
|
1165
1165
|
});
|
|
1166
|
-
const missingProcessedSourceBareUserCss = finalizedProcessedSourceBareUserCss.trim().length === 0 ? "" : (0,
|
|
1167
|
-
const css = missingProcessedSourceBareUserCss.trim().length === 0 ? nextCss :
|
|
1166
|
+
const missingProcessedSourceBareUserCss = finalizedProcessedSourceBareUserCss.trim().length === 0 ? "" : (0, _weapp_tailwindcss_postcss_transform.filterExistingCssRules)(nextCss, finalizedProcessedSourceBareUserCss);
|
|
1167
|
+
const css = missingProcessedSourceBareUserCss.trim().length === 0 ? nextCss : (0, _weapp_tailwindcss_postcss_transform.composeProcessedCssSources)({
|
|
1168
1168
|
css: nextCss,
|
|
1169
1169
|
processed: true
|
|
1170
1170
|
}, {
|
|
@@ -1263,7 +1263,7 @@ function compactSnapshot(snapshot) {
|
|
|
1263
1263
|
};
|
|
1264
1264
|
}
|
|
1265
1265
|
function normalizeChangedFiles(changedFiles) {
|
|
1266
|
-
return new Set([...changedFiles ?? []].map((file) =>
|
|
1266
|
+
return new Set([...changedFiles ?? []].map((file) => (0, require_tailwindcss.source_scan_exports.resolveSourceScanPath)(file)));
|
|
1267
1267
|
}
|
|
1268
1268
|
async function resolveScanFileSnapshot(file) {
|
|
1269
1269
|
try {
|
|
@@ -1288,14 +1288,14 @@ function isSameFileMeta(left, right) {
|
|
|
1288
1288
|
async function resolveScanFiles(roots, outDir) {
|
|
1289
1289
|
const files = /* @__PURE__ */ new Set();
|
|
1290
1290
|
await Promise.all(roots.map(async (root) => {
|
|
1291
|
-
const rootFiles = await
|
|
1291
|
+
const rootFiles = await require_generated_css_marker.resolveSourceCandidateScanFiles({
|
|
1292
1292
|
entries: root.entries,
|
|
1293
1293
|
explicit: root.explicit,
|
|
1294
|
-
filter:
|
|
1294
|
+
filter: require_generated_css_marker.isSourceCandidateRequest,
|
|
1295
1295
|
outDir,
|
|
1296
1296
|
root: root.root
|
|
1297
1297
|
});
|
|
1298
|
-
for (const file of rootFiles) files.add(
|
|
1298
|
+
for (const file of rootFiles) files.add((0, require_tailwindcss.source_scan_exports.resolveSourceScanPath)(file));
|
|
1299
1299
|
}));
|
|
1300
1300
|
return files;
|
|
1301
1301
|
}
|
|
@@ -1395,7 +1395,7 @@ async function refreshWebpackSourceCandidates(options) {
|
|
|
1395
1395
|
if (!sourceScan || !sourceScan.explicit && !sourceScan.entries?.length && !sourceScan.inlineCandidates) return;
|
|
1396
1396
|
return options.scanCache.resolve({
|
|
1397
1397
|
changedFiles: options.watchChangedFiles,
|
|
1398
|
-
collector:
|
|
1398
|
+
collector: require_generated_css_marker.createSourceCandidateStore({
|
|
1399
1399
|
bareArbitraryValues: options.compilerOptions.arbitraryValues?.bareArbitraryValues,
|
|
1400
1400
|
customAttributesEntities: options.compilerOptions.customAttributesEntities,
|
|
1401
1401
|
disabledDefaultTemplateHandler: options.compilerOptions.disabledDefaultTemplateHandler
|
|
@@ -1423,7 +1423,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1423
1423
|
const webpackSourceCandidateScanCache = createWebpackSourceCandidateScanCache();
|
|
1424
1424
|
const bundleBuildState = require_cache.createRuntimeCompilationBuildState();
|
|
1425
1425
|
const bundleRuntimeClassSetManager = runtimeClassSetManager ?? require_hmr_timing.createRuntimeClassSetManager();
|
|
1426
|
-
const escapeFragments =
|
|
1426
|
+
const escapeFragments = require_generated_css_marker.createEscapeFragments(_weapp_core_escape.MappingChars2String);
|
|
1427
1427
|
const processedCssAssetSkipDecisionCache = /* @__PURE__ */ new Map();
|
|
1428
1428
|
compiler.hooks.compilation.tap(require_compiler.pluginName, (compilation) => {
|
|
1429
1429
|
compilation.hooks.processAssets.tapPromise({
|
|
@@ -1473,7 +1473,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1473
1473
|
const compilationChanges = require_compiler.createCompilationDependencyChanges(watchChangedFiles);
|
|
1474
1474
|
const affectedCompilationScopes = require_compiler.recordCompilationDependencyChanges(runtimeState, compilationChanges);
|
|
1475
1475
|
const getCompilationDependencyRevision = (scopeId) => require_compiler.getCompilationScopeDependencyRevision(runtimeState, scopeId);
|
|
1476
|
-
const taskConcurrency = watchMode ?
|
|
1476
|
+
const taskConcurrency = watchMode ? require_generated_css_marker.resolveTaskConcurrency(1) : void 0;
|
|
1477
1477
|
const activeProcessCacheKeys = /* @__PURE__ */ new Set();
|
|
1478
1478
|
const activeProcessHashKeys = /* @__PURE__ */ new Set();
|
|
1479
1479
|
const rememberProcessCacheKey = (cacheKey, hashKey = cacheKey) => {
|
|
@@ -1503,7 +1503,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1503
1503
|
runtimeState
|
|
1504
1504
|
});
|
|
1505
1505
|
const finalizeCssAssetSource = (source, options = {}) => require_pipeline_helpers.finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTarget, options);
|
|
1506
|
-
const shouldRefreshWebpackSourceCandidates = !isWebGeneratorTarget && groupedEntries.css.length > 0 || cssSources.size > 0 || generatedCssSources.size > 0 ||
|
|
1506
|
+
const shouldRefreshWebpackSourceCandidates = !isWebGeneratorTarget && groupedEntries.css.length > 0 || cssSources.size > 0 || generatedCssSources.size > 0 || require_generated_css_marker.isCssSourceTraceEnabled(compilerOptions);
|
|
1507
1507
|
recordTimingDetail("setup", setupStartedAt);
|
|
1508
1508
|
const sourceCandidatesStartedAt = performance.now();
|
|
1509
1509
|
const webpackSourceCandidates = shouldRefreshWebpackSourceCandidates ? await refreshWebpackSourceCandidates({
|
|
@@ -1518,8 +1518,8 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1518
1518
|
const webpackSourceCandidateValueSignature = webpackSourceCandidates ? require_scoped_generator.createCandidateSignature(webpackSourceCandidates.getSourceCandidatesForEntries(void 0)) : "source-candidates:0";
|
|
1519
1519
|
recordTimingDetail("sourceCandidates", sourceCandidatesStartedAt);
|
|
1520
1520
|
const cssSourceTraceTokenSources = require_pipeline_helpers.createWebpackCssSourceTraceTokenSources(compilerOptions, webpackSourceCandidates);
|
|
1521
|
-
const cssSourceTraceSignature =
|
|
1522
|
-
const annotateCss = (css) =>
|
|
1521
|
+
const cssSourceTraceSignature = require_generated_css_marker.createCssSourceTraceCacheSignature(cssSourceTraceTokenSources, compilerOptions);
|
|
1522
|
+
const annotateCss = (css) => require_generated_css_marker.annotateCssSourceTrace(css, {
|
|
1523
1523
|
opts: compilerOptions,
|
|
1524
1524
|
tokenSources: cssSourceTraceTokenSources
|
|
1525
1525
|
});
|
|
@@ -1602,7 +1602,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1602
1602
|
currentJsRuntimeCandidates = void 0;
|
|
1603
1603
|
currentJsRuntimeTokenSignature = void 0;
|
|
1604
1604
|
const code = require_pipeline_helpers.stringifyWebpackSourceLike(source);
|
|
1605
|
-
for (const candidate of
|
|
1605
|
+
for (const candidate of require_generated_css_marker.collectStrictEscapedRuntimeCandidates(code, _weapp_core_escape.MappingChars2String, escapeFragments)) if (require_pipeline_helpers.isRuntimeTransformCandidate(candidate)) transformedJsRuntimeCandidates.add(candidate);
|
|
1606
1606
|
};
|
|
1607
1607
|
const createRuntimeSetHash = (generatorRuntimeSet) => compilerOptions.cache.computeHash([
|
|
1608
1608
|
require_tailwindcss.getRuntimeClassSetSignature(runtimeState.tailwindRuntime),
|
|
@@ -1744,8 +1744,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
1744
1744
|
debug
|
|
1745
1745
|
});
|
|
1746
1746
|
for (const [file, asset] of groupedEntries.css) {
|
|
1747
|
-
const
|
|
1748
|
-
const source = require_pipeline_helpers.stringifyWebpackSourceLike(rawSource);
|
|
1747
|
+
const source = (compilation.getAsset(file)?.source.source() ?? asset.source()).toString();
|
|
1749
1748
|
updateAssetIfChanged(file, require_pipeline_helpers.finalizeWebpackCssAssetOutputSource(source, compilerOptions, isWebGeneratorTarget));
|
|
1750
1749
|
}
|
|
1751
1750
|
});
|
|
@@ -1961,7 +1960,7 @@ function addMpxWebpackPluginAlias(alias, pkgDir) {
|
|
|
1961
1960
|
}
|
|
1962
1961
|
];
|
|
1963
1962
|
const managedNames = new Set(entries.filter((entry) => typeof entry.name === "string").map((entry) => entry.name));
|
|
1964
|
-
const managedPatterns = new Set(entries.
|
|
1963
|
+
const managedPatterns = new Set(entries.flatMap((entry) => entry.name instanceof RegExp ? [`${entry.name.source}/${entry.name.flags}`] : []));
|
|
1965
1964
|
for (let index = alias.length - 1; index >= 0; index--) {
|
|
1966
1965
|
const name = alias[index]?.name;
|
|
1967
1966
|
if (managedNames.has(name) || name instanceof RegExp && managedPatterns.has(`${name.source}/${name.flags}`)) alias.splice(index, 1);
|
|
@@ -2233,10 +2232,10 @@ function setupWebpackV5Loaders(options) {
|
|
|
2233
2232
|
const isLynxMainThreadCss = compilerOptions.platform === "lynx" && (module.layer === "react:main-thread" || loaderEntries.some((entry) => entry.loader?.includes?.("ignore-css-loader")));
|
|
2234
2233
|
let rewriteAnchorIdx = findRewriteAnchor(loaderEntries);
|
|
2235
2234
|
const classSetAnchorIdx = findClassSetAnchor(loaderEntries);
|
|
2236
|
-
const isCssModule = isCssLikeModuleResource(module.resource, compilerOptions.cssMatcher
|
|
2235
|
+
const isCssModule = isCssLikeModuleResource(module.resource, compilerOptions.cssMatcher);
|
|
2237
2236
|
if (isCssModule) {
|
|
2238
|
-
const frameworkPostcssOptions =
|
|
2239
|
-
if (frameworkPostcssOptions)
|
|
2237
|
+
const frameworkPostcssOptions = require_generated_css_marker.collectFrameworkPostcssOptionsFromLoaderEntries(loaderEntries, _loaderContext);
|
|
2238
|
+
if (frameworkPostcssOptions) require_generated_css_marker.captureResolvedFrameworkPostcssOptions(compilerOptions, frameworkPostcssOptions);
|
|
2240
2239
|
}
|
|
2241
2240
|
if (isCssModule && typeof module.resource === "string") markWebpackCssSourceModule?.(module.resource);
|
|
2242
2241
|
if (node_process.default.env["WEAPP_TW_LOADER_DEBUG"] && isCssModule) debug("loader hook css module: %s layer=%s loaders=%o anchors=%o", module.resource, module.layer, loaderEntries.map((x) => x.loader), {
|
|
@@ -2264,7 +2263,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
2264
2263
|
if (cssImportRewriteLoaderOptions && runtimeCssImportRewriteLoaderExists && runtimeCssImportRewriteLoader && isCssModule && !isLynxMainThreadCss) {
|
|
2265
2264
|
const existingIndex = loaderEntries.findIndex((entry) => entry.loader?.includes?.(runtimeCssImportRewriteLoader));
|
|
2266
2265
|
const existingOptions = existingIndex === -1 ? void 0 : loaderEntries[existingIndex]?.options;
|
|
2267
|
-
const generateInRegisteredLoader = typeof existingOptions === "object" && existingOptions !== null && "generateCss" in existingOptions && existingOptions
|
|
2266
|
+
const generateInRegisteredLoader = typeof existingOptions === "object" && existingOptions !== null && "generateCss" in existingOptions && existingOptions["generateCss"] === true;
|
|
2268
2267
|
const rewriteLoaderEntry = existingIndex !== -1 ? {
|
|
2269
2268
|
...loaderEntries.splice(existingIndex, 1)[0],
|
|
2270
2269
|
loader: runtimeCssImportRewriteLoader,
|
|
@@ -2331,6 +2330,7 @@ function appendIgnoredPath(ignored, ignoredPath) {
|
|
|
2331
2330
|
return createOutputIgnoredPredicate(normalizeIgnoredList(ignored), ignoredPath);
|
|
2332
2331
|
}
|
|
2333
2332
|
function setupWebpackWatchOutputIgnore(compiler) {
|
|
2333
|
+
const compilerOptions = compiler.options;
|
|
2334
2334
|
const appendOutputIgnoredPath = (watchOptions, outputPath) => {
|
|
2335
2335
|
const resolvedOutputPath = outputPath || compiler.outputPath || compiler.options?.output?.path;
|
|
2336
2336
|
const paths = resolvedOutputPath && node_path.default.win32.isAbsolute(resolvedOutputPath) && !node_path.default.posix.isAbsolute(resolvedOutputPath) ? node_path.default.win32 : node_path.default;
|
|
@@ -2344,8 +2344,8 @@ function setupWebpackWatchOutputIgnore(compiler) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
return { ignored: appendIgnoredPath(void 0, outputDir) };
|
|
2346
2346
|
};
|
|
2347
|
-
const compilerWatchOptions = appendOutputIgnoredPath(
|
|
2348
|
-
if (compilerWatchOptions)
|
|
2347
|
+
const compilerWatchOptions = appendOutputIgnoredPath(compilerOptions.watchOptions);
|
|
2348
|
+
if (compilerWatchOptions) compilerOptions.watchOptions = compilerWatchOptions;
|
|
2349
2349
|
const syncOutputIgnoredPath = () => {
|
|
2350
2350
|
const outputPath = compiler.outputPath || compiler.options?.output?.path;
|
|
2351
2351
|
const watchOptions = compiler.watching?.watchOptions;
|
|
@@ -2357,8 +2357,8 @@ function setupWebpackWatchOutputIgnore(compiler) {
|
|
|
2357
2357
|
const watchOptions = compiler.watching?.watchOptions;
|
|
2358
2358
|
if (watchOptions) appendOutputIgnoredPath(watchOptions, outputPath);
|
|
2359
2359
|
else {
|
|
2360
|
-
const compilerWatchOptions = appendOutputIgnoredPath(
|
|
2361
|
-
if (compilerWatchOptions)
|
|
2360
|
+
const compilerWatchOptions = appendOutputIgnoredPath(compilerOptions.watchOptions, outputPath);
|
|
2361
|
+
if (compilerWatchOptions) compilerOptions.watchOptions = compilerWatchOptions;
|
|
2362
2362
|
}
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
@@ -2503,7 +2503,7 @@ var WebpackFrameworkPlugin = class {
|
|
|
2503
2503
|
const file = node_path.default.resolve(source.file);
|
|
2504
2504
|
const previous = webpackCssSources.get(file);
|
|
2505
2505
|
const next = {
|
|
2506
|
-
css: typeof source.css === "string" ?
|
|
2506
|
+
css: typeof source.css === "string" ? (0, _weapp_tailwindcss_postcss_transform.normalizeTailwindConfigDirectives)(source.css, node_path.default.dirname(file)) : source.css,
|
|
2507
2507
|
processed: source.processed
|
|
2508
2508
|
};
|
|
2509
2509
|
if (previous && shouldKeepPreviousWebpackCssSource(previous, next)) {
|
|
@@ -2629,7 +2629,7 @@ var WebpackFrameworkPlugin = class {
|
|
|
2629
2629
|
return webpackProcessedCssSourceFiles.has(node_path.default.resolve(file)) || isWebpackProcessedTailwindEntryAsset(metadata?.isMainCssChunk);
|
|
2630
2630
|
},
|
|
2631
2631
|
isWebpackProcessedCssAsset(file, rawSource, metadata) {
|
|
2632
|
-
return webpackProcessedCssSourceFiles.has(node_path.default.resolve(file)) || isWebpackProcessedTailwindEntryAsset(metadata?.isMainCssChunk) ||
|
|
2632
|
+
return webpackProcessedCssSourceFiles.has(node_path.default.resolve(file)) || isWebpackProcessedTailwindEntryAsset(metadata?.isMainCssChunk) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCss)(rawSource) || (0, _weapp_tailwindcss_postcss_transform.hasTailwindGeneratedCssMarkers)(rawSource) || rawSource.includes("weapp-tailwindcss webpack-generated-css");
|
|
2633
2633
|
},
|
|
2634
2634
|
consumeRuntimeRefreshRequirement() {
|
|
2635
2635
|
runtimeRefreshRequiredForCompilation = false;
|
package/dist/webpack.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-DxrWatNB.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-BB-kw4Qr.js";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TraverseOptions } from '@babel/traverse';
|
|
1
|
+
import type { TraverseOptions, Visitor } from '@babel/traverse';
|
|
2
2
|
import type { JsTokenUpdater } from '../../../js/JsTokenUpdater.js';
|
|
3
3
|
import type { ITemplateHandlerOptions } from '../../../types/index.js';
|
|
4
|
-
export declare function createLegacyTraverseOptions(options: ITemplateHandlerOptions, jsTokenUpdater: JsTokenUpdater): TraverseOptions & {
|
|
4
|
+
export declare function createLegacyTraverseOptions(options: ITemplateHandlerOptions, jsTokenUpdater: JsTokenUpdater): TraverseOptions & Visitor & {
|
|
5
5
|
noScope: true;
|
|
6
6
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
2
2
|
import type { AttributeMatcher } from '../custom-attributes.js';
|
|
3
|
-
export declare function customTemplateHandler(rawSource: string, options:
|
|
3
|
+
export declare function customTemplateHandler(rawSource: string, options: ITemplateHandlerOptions, cachedMatcher?: AttributeMatcher | undefined): Promise<string>;
|