weapp-tailwindcss 5.1.15 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +6 -0
- package/README.md +6 -0
- package/bin/{weapp-tailwindcss.js → weapp-tailwindcss.cjs} +1 -1
- package/dist/bundlers/framework-selector.d.ts +2 -2
- package/dist/bundlers/gulp/asset-emission-plan.d.ts +10 -0
- package/dist/bundlers/gulp/frameworks/native/index.d.ts +10 -3
- package/dist/bundlers/gulp/index.d.ts +10 -3
- package/dist/bundlers/gulp/module-graph.d.ts +1 -1
- package/dist/bundlers/gulp/runtime-snapshot.d.ts +4 -2
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/cache-state.d.ts +71 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +45 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins.d.ts +9 -2
- package/dist/bundlers/rspack/index.d.ts +2 -2
- package/dist/bundlers/shared/cache.d.ts +1 -1
- package/dist/bundlers/shared/css-imports.d.ts +1 -1
- package/dist/bundlers/shared/css-source-trace.d.ts +2 -2
- package/dist/bundlers/shared/framework-postcss.d.ts +21 -0
- package/dist/bundlers/shared/generator-css/candidates.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +19 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +25 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +30 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +4 -72
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +5 -3
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +58 -0
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +32 -0
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +13 -5
- package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +16 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +7 -9
- package/dist/bundlers/shared/generator-css/types.d.ts +12 -3
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +10 -0
- package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +15 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -33
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -1
- package/dist/bundlers/shared/generator-css.d.ts +9 -10
- package/dist/bundlers/shared/runtime-class-set/entries.d.ts +4 -0
- package/dist/bundlers/shared/runtime-class-set/escaped-candidates.d.ts +9 -0
- package/dist/bundlers/shared/runtime-class-set.d.ts +30 -0
- package/dist/bundlers/shared/runtime-entry-type.d.ts +8 -0
- package/dist/bundlers/shared/runtime-signatures.d.ts +8 -0
- package/dist/bundlers/shared/source-candidate-scan-signature.d.ts +13 -0
- package/dist/bundlers/shared/source-candidates/collector.d.ts +8 -0
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +10 -0
- package/dist/bundlers/{vite → shared}/source-candidates/script.d.ts +1 -1
- package/dist/bundlers/shared/source-candidates/store.d.ts +2 -0
- package/dist/bundlers/shared/source-candidates/types-and-cache.d.ts +69 -0
- package/dist/bundlers/shared/source-candidates.d.ts +4 -0
- package/dist/bundlers/shared/source-scan/css-entries.d.ts +18 -0
- package/dist/bundlers/shared/source-scan.d.ts +16 -0
- package/dist/bundlers/shared/static-config-content.d.ts +5 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +9 -1
- package/dist/bundlers/vite/bundle-entries.d.ts +1 -1
- package/dist/bundlers/vite/bundle-state.d.ts +11 -38
- package/dist/bundlers/vite/css-asset-identity.d.ts +11 -0
- package/dist/bundlers/vite/css-finalizer/options.d.ts +54 -0
- package/dist/bundlers/vite/css-finalizer/plugin.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -43
- package/dist/bundlers/vite/css-memory.d.ts +1 -2
- package/dist/bundlers/vite/frameworks/generic/index.d.ts +2 -2
- package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -2
- package/dist/bundlers/vite/frameworks/uni-app/index.d.ts +3 -3
- package/dist/bundlers/vite/frameworks/uni-app-x/index.d.ts +3 -3
- package/dist/bundlers/vite/frameworks/weapp-vite/index.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/asset-emission-plan.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/bundle-markup-candidates.d.ts +4 -4
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-cache-task.d.ts +34 -0
- package/dist/bundlers/vite/generate-bundle/css-composition-plan.d.ts +58 -0
- package/dist/bundlers/vite/generate-bundle/css-config-directives.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-entry-processing.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +21 -2
- package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-source-plan.d.ts +19 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +61 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-result.d.ts +23 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-task.d.ts +42 -0
- package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +3 -2
- package/dist/bundlers/vite/generate-bundle/finalize/bundle.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +69 -0
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +2 -70
- package/dist/bundlers/vite/generate-bundle/html-processing.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +6 -5
- package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/remembered-css-plan.d.ts +35 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +5 -6
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/root-style-output.d.ts +20 -0
- package/dist/bundlers/vite/generate-bundle/runtime-configured-css.d.ts +54 -0
- package/dist/bundlers/vite/generate-bundle/runtime-linked-css.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime-linked-source-memory.d.ts +3 -3
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +6 -0
- package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +1 -8
- package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +3 -3
- package/dist/bundlers/vite/generate-bundle/source-candidate-source.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/subpackages.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +14 -1
- package/dist/bundlers/vite/generate-bundle/transform-filter.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/transform-scheduling.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +8 -7
- package/dist/bundlers/vite/generate-bundle/uni-app-x-postprocess.d.ts +3 -2
- package/dist/bundlers/vite/generate-bundle/validate-runtime-candidates.d.ts +22 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +7 -7
- package/dist/bundlers/vite/incremental-runtime-class-set/entries.d.ts +1 -4
- package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -3
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +2 -30
- package/dist/bundlers/vite/index.d.ts +3 -3
- package/dist/bundlers/vite/js-precheck.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +13 -0
- package/dist/bundlers/vite/processed-css-assets/collector.d.ts +4 -0
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +34 -0
- package/dist/bundlers/vite/processed-css-assets/empty-at-rule.d.ts +1 -0
- package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +42 -0
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +89 -0
- package/dist/bundlers/vite/processed-css-assets/style-files.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +4 -71
- package/dist/bundlers/vite/resolve-app-type.d.ts +1 -1
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +3 -1
- package/dist/bundlers/vite/runtime-affecting-signature.d.ts +1 -2
- package/dist/bundlers/vite/runtime-candidate-entry.d.ts +9 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +4 -4
- package/dist/bundlers/vite/serve-css-generation.d.ts +2 -0
- package/dist/bundlers/vite/serve-js-transform.d.ts +1 -1
- package/dist/bundlers/vite/serve-root-import-shell.d.ts +1 -1
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +2 -0
- package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +8 -8
- package/dist/bundlers/vite/shared/framework-hmr-candidate-state.d.ts +45 -0
- package/dist/bundlers/vite/shared/framework-post-plugin.d.ts +2 -0
- package/dist/bundlers/vite/shared/framework-processed-css-registry.d.ts +22 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +1 -0
- package/dist/bundlers/vite/shared/framework-source-candidates-plugin.d.ts +2 -0
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +38 -0
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +4 -4
- package/dist/bundlers/vite/source-candidate-scan-signature.d.ts +2 -13
- package/dist/bundlers/vite/source-candidates/scan-root.d.ts +1 -10
- package/dist/bundlers/vite/source-candidates.d.ts +1 -68
- package/dist/bundlers/vite/source-output-relations.d.ts +24 -0
- package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -18
- package/dist/bundlers/vite/source-scan.d.ts +2 -16
- package/dist/bundlers/vite/static-config-content.d.ts +1 -5
- package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
- package/dist/bundlers/vite/web-css-compat.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/asset-emission-plan.d.ts +18 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.d.ts +2 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/finalize-assets.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-result.d.ts +3 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +11 -41
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/js-module-graph.d.ts +4 -10
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +8 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.d.ts +78 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +43 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/resources.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/runtime-candidates.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +28 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +21 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +9 -219
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +4 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-refresh.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +2 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +8 -4
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/generic/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/index.d.ts +7 -7
- package/dist/bundlers/webpack/frameworks/mpx/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/taro/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/uni-app/index.d.ts +2 -2
- package/dist/bundlers/webpack/frameworks/weapp-vite/index.d.ts +2 -2
- package/dist/bundlers/webpack/index.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +7 -2
- package/dist/bundlers/webpack/loaders/weapp-tw-css-generation-loader.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +1 -1
- package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +1 -1
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +20 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/watch-output.d.ts +13 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin.d.ts +3 -21
- package/dist/cli/context.d.ts +2 -2
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/helpers/options.d.ts +3 -3
- package/dist/cli/helpers.d.ts +1 -1
- package/dist/cli.cjs +37012 -0
- package/dist/cli.js +145 -176
- package/dist/compiler/artifact.d.ts +14 -0
- package/dist/compiler/candidate-index.d.ts +10 -0
- package/dist/compiler/compilation-change-coordinator.d.ts +28 -0
- package/dist/compiler/compilation-dependency-state.d.ts +16 -0
- package/dist/compiler/compilation-scope-graph.d.ts +31 -0
- package/dist/compiler/compilation-session-pool.d.ts +54 -0
- package/dist/compiler/compiler-owner-state.d.ts +3 -0
- package/dist/compiler/composition.d.ts +8 -0
- package/dist/compiler/emission-plan.d.ts +26 -0
- package/dist/compiler/index.d.ts +23 -0
- package/dist/compiler/invalidation.d.ts +3 -0
- package/dist/compiler/mode.d.ts +3 -0
- package/dist/compiler/owner-lifecycle.d.ts +1 -0
- package/dist/compiler/platform-adapter.d.ts +9 -0
- package/dist/compiler/runtime-affecting-signature.d.ts +2 -0
- package/dist/compiler/runtime-build-state.d.ts +6 -0
- package/dist/compiler/runtime-snapshot.d.ts +53 -0
- package/dist/compiler/scope-planner.d.ts +6 -0
- package/dist/compiler/semantic-css.d.ts +66 -0
- package/dist/compiler/session.d.ts +13 -0
- package/dist/compiler/shadow-gate.d.ts +26 -0
- package/dist/compiler/shadow-report-session.d.ts +37 -0
- package/dist/compiler/shadow-report.d.ts +15 -0
- package/dist/compiler/source-graph.d.ts +32 -0
- package/dist/compiler/tailwind-generation-session-pool.d.ts +22 -0
- package/dist/compiler/types.d.ts +95 -0
- package/dist/constants.d.ts +2 -2
- package/dist/context/compiler-context-cache.d.ts +1 -1
- package/dist/context/custom-attributes.d.ts +1 -1
- package/dist/context/handlers.d.ts +3 -3
- package/dist/context/index.d.ts +1 -1
- package/dist/context/runtime-package-replacements.d.ts +1 -1
- package/dist/context/style-options.d.ts +1 -1
- package/dist/context/tailwindcss.d.ts +3 -3
- package/dist/{context-VeFq_8vW.js → context-PZXBqrAJ.cjs} +32 -94
- package/dist/{context-BgGWVAmN.mjs → context-oTkxC5aZ.js} +23 -12
- package/dist/{core.mjs → core.cjs} +13 -12
- package/dist/core.d.ts +2 -2
- package/dist/core.js +12 -13
- package/dist/css-imports-DfNC3e6a.cjs +43 -0
- package/dist/css-loader-runtime-CSv0lKqV.cjs +11 -0
- package/dist/css-macro/postcss.cjs +19 -0
- package/dist/css-macro/postcss.js +2 -19
- package/dist/{css-macro.mjs → css-macro.cjs} +11 -8
- package/dist/css-macro.d.ts +2 -2
- package/dist/css-macro.js +8 -11
- package/dist/{defaults.mjs → defaults.cjs} +16 -11
- package/dist/defaults.d.ts +1 -1
- package/dist/defaults.js +11 -16
- package/dist/{escape.mjs → escape.cjs} +18 -4
- package/dist/escape.js +4 -18
- package/dist/framework/platform.d.ts +1 -1
- package/dist/{framework.mjs → framework.cjs} +47 -25
- package/dist/framework.d.ts +1 -1
- package/dist/framework.js +25 -47
- package/dist/generator/index.d.ts +6 -6
- package/dist/generator/options.d.ts +3 -3
- package/dist/generator/types.d.ts +2 -2
- package/dist/{generator-CEnUsjed.js → generator-C8D5cnbe.cjs} +730 -468
- package/dist/{generator-CEo920So.mjs → generator-CDdzqf1S.js} +747 -497
- package/dist/generator.cjs +12 -0
- package/dist/generator.d.ts +1 -1
- package/dist/generator.js +2 -12
- package/dist/{gulp-3m1dAiig.js → gulp-Cjcss8T_.cjs} +326 -241
- package/dist/{gulp-DP71z1jG.mjs → gulp-DNXQvDUw.js} +316 -234
- package/dist/gulp.cjs +5 -0
- package/dist/gulp.d.ts +4 -4
- package/dist/gulp.js +2 -5
- package/dist/{hmr-timing-1aS6--U7.mjs → hmr-timing-CuJwQzDc.js} +5230 -3259
- package/dist/hmr-timing-DMLfNfGG.cjs +555 -0
- package/dist/index.cjs +45 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.js +9 -45
- package/dist/js/JsTokenUpdater.d.ts +1 -1
- package/dist/js/ModuleGraph.d.ts +3 -3
- package/dist/js/NodePathWalker.d.ts +2 -2
- package/dist/js/babel/process.d.ts +2 -2
- package/dist/js/babel.d.ts +8 -8
- package/dist/js/evalTransforms.d.ts +2 -2
- package/dist/js/fast-path/oxc.d.ts +1 -1
- package/dist/js/handlers.d.ts +2 -2
- package/dist/js/index.d.ts +3 -3
- package/dist/js/literal-transform.d.ts +1 -1
- package/dist/js/module-graph/ignored-exports.d.ts +4 -4
- package/dist/js/module-graph/types.d.ts +2 -2
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/precheck.d.ts +1 -1
- package/dist/js/replacement-cache.d.ts +1 -1
- package/dist/js/sourceAnalysis.d.ts +3 -3
- package/dist/js/taggedTemplateIgnore.d.ts +1 -1
- package/dist/object-Bvy6-w9r.js +47 -0
- package/dist/object-C_Vr6_S5.cjs +58 -0
- package/dist/options-DlvhQwWB.cjs +775 -0
- package/dist/pipeline-helpers-XtUmUlci.cjs +955 -0
- package/dist/postcss-html-transform.cjs +7 -0
- package/dist/postcss-html-transform.js +3 -5
- package/dist/postcss.cjs +15 -0
- package/dist/postcss.js +7 -11
- package/dist/presets/hbuilderx.d.ts +2 -2
- package/dist/presets/index.d.ts +4 -4
- package/dist/presets/shared.d.ts +1 -1
- package/dist/presets/taro.d.ts +2 -2
- package/dist/presets/uni-app-x.d.ts +1 -1
- package/dist/presets/uni-app.d.ts +2 -2
- package/dist/{presets.mjs → presets.cjs} +37 -24
- package/dist/presets.d.ts +1 -1
- package/dist/presets.js +24 -36
- package/dist/reset.cjs +19 -0
- package/dist/reset.d.ts +2 -2
- package/dist/reset.js +2 -19
- package/dist/{rolldown-runtime-emK7D4bc.js → rolldown-runtime-CVvi-lCc.cjs} +15 -0
- package/dist/{rspack.mjs → rspack.cjs} +10 -4
- package/dist/rspack.d.ts +3 -3
- package/dist/rspack.js +4 -10
- package/dist/runtime-branch/create-branch.d.ts +1 -1
- package/dist/runtime-branch/generator-target-env.d.ts +1 -1
- package/dist/runtime-branch/index.d.ts +2 -2
- package/dist/runtime-branch/mini-program.d.ts +1 -1
- package/dist/runtime-branch/native-app.d.ts +1 -1
- package/dist/runtime-branch/platform.d.ts +2 -2
- package/dist/runtime-branch/tailwind-version.d.ts +1 -1
- package/dist/runtime-branch/types.d.ts +2 -2
- package/dist/runtime-branch/web.d.ts +1 -1
- package/dist/runtime-branch.d.ts +1 -1
- package/dist/runtime-registry-Y7NrD2WH.cjs +31 -0
- package/dist/shared/classname-transform.d.ts +1 -1
- package/dist/shared/mpx-plugin-owner.d.ts +2 -0
- package/dist/shared/mpx.d.ts +1 -1
- package/dist/{source-candidate-scan-signature-Cf7259PR.mjs → source-candidate-scan-signature-B0S7f5P7.js} +26 -336
- package/dist/{source-candidate-scan-signature-BAahhiwb.js → source-candidate-scan-signature-BmSuoxR9.cjs} +31 -414
- package/dist/style-injector/internal.d.ts +6 -6
- package/dist/style-options-CEfXwZzX.cjs +75 -0
- package/dist/tailwindcss/candidates.d.ts +2 -2
- package/dist/tailwindcss/index.d.ts +1 -1
- package/dist/tailwindcss/runtime/cache.d.ts +1 -1
- package/dist/tailwindcss/runtime-factory.d.ts +2 -2
- package/dist/tailwindcss/runtime-options.d.ts +1 -1
- package/dist/tailwindcss/runtime-types.d.ts +2 -2
- package/dist/tailwindcss/runtime.d.ts +2 -2
- package/dist/tailwindcss/source-scan.d.ts +2 -2
- package/dist/tailwindcss/targets.d.ts +1 -1
- package/dist/tailwindcss/v4/config.d.ts +1 -1
- package/dist/tailwindcss/v4/css-sources.d.ts +2 -1
- package/dist/tailwindcss/v4/index.d.ts +2 -2
- package/dist/tailwindcss/v4/multi-runtime.d.ts +1 -1
- package/dist/tailwindcss/v4/runtime-factory.d.ts +5 -5
- package/dist/tailwindcss/v4/runtime-options.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/css-macro-source.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/cache-stats.d.ts +26 -0
- package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/engine.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +51 -0
- package/dist/tailwindcss/v4-engine/generator/native-session.d.ts +17 -0
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +2 -1
- package/dist/tailwindcss/v4-engine/generator.d.ts +2 -28
- package/dist/tailwindcss/v4-engine/index.d.ts +5 -5
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
- package/dist/tailwindcss/v4-engine/types.d.ts +1 -0
- package/dist/{tailwindcss-KBYPJ2DW.js → tailwindcss-Cs94gJgf.cjs} +10 -770
- package/dist/{tailwindcss-xs704TRw.mjs → tailwindcss-D7TGiZR2.js} +23 -23
- package/dist/transform-BUEyOCT7.cjs +341 -0
- package/dist/transform-BbaPIji9.js +342 -0
- package/dist/typedoc.export.d.ts +4 -4
- package/dist/types/index.d.ts +7 -7
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/typedoc-tailwindcss-runtime.d.ts +3 -3
- package/dist/types/user-defined-options/general.d.ts +5 -5
- package/dist/types/user-defined-options/important.d.ts +2 -2
- package/dist/types/user-defined-options/index.d.ts +9 -9
- package/dist/types/user-defined-options/matcher.d.ts +2 -2
- package/dist/types.cjs +0 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -0
- package/dist/uni-app-x/harmony.d.ts +1 -0
- package/dist/uni-app-x/index.d.ts +2 -2
- package/dist/uni-app-x/options.d.ts +1 -1
- package/dist/uni-app-x/style-asset/harmony-apply.d.ts +1 -0
- package/dist/uni-app-x/style-asset/style-value.d.ts +3 -0
- package/dist/uni-app-x/style-asset.d.ts +5 -4
- package/dist/uni-app-x/transform.d.ts +1 -1
- package/dist/uni-app-x/vite/harmony-apply.d.ts +19 -0
- package/dist/uni-app-x/vite/native-target.d.ts +2 -0
- package/dist/uni-app-x/vite.d.ts +5 -2
- package/dist/unocss/index.d.ts +1 -1
- package/dist/utils/disabled.d.ts +1 -1
- package/dist/utils/index.d.ts +3 -3
- package/dist/{hmr-timing-B8p4f0ca.js → v4-generation-core-D7MuR5ZF.cjs} +4886 -3330
- package/dist/{vite-nXZEiwG0.mjs → vite-BI1TeUPO.js} +6148 -4522
- package/dist/{vite-DUVjMduj.js → vite-CBzmUTu-.cjs} +6267 -4666
- package/dist/vite.cjs +4 -0
- package/dist/vite.d.ts +3 -3
- package/dist/vite.js +2 -4
- package/dist/watch-dependencies-BZGubvuJ.cjs +40 -0
- package/dist/{weapp-tw-css-generation-loader.js → weapp-tw-css-generation-loader.cjs} +3 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +201 -0
- package/dist/{weapp-tw-runtime-classset-loader.js → weapp-tw-runtime-classset-loader.cjs} +19 -15
- package/dist/{webpack-nppysF4B.js → webpack-Dao6bWEj.cjs} +1000 -1473
- package/dist/{webpack-C_UUFRgj.mjs → webpack-dAY9h8r8.js} +1462 -1185
- package/dist/webpack.cjs +5 -0
- package/dist/webpack.d.ts +2 -2
- package/dist/webpack.js +2 -5
- package/dist/wxml/Tokenizer.d.ts +2 -2
- package/dist/wxml/custom-attributes.d.ts +1 -1
- package/dist/wxml/index.d.ts +2 -2
- package/dist/wxml/shared.d.ts +1 -1
- package/dist/wxml/utils/codegen/legacy-rewriter.d.ts +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/codegen.d.ts +1 -1
- package/dist/wxml/utils/custom-template.d.ts +2 -2
- package/dist/wxml/utils/fragment-helpers.d.ts +2 -2
- package/dist/wxml/utils/fragment-updater.d.ts +2 -2
- package/dist/wxml/utils/template-fragments.d.ts +2 -2
- package/dist/wxml/utils.d.ts +5 -5
- package/dist/wxml-DSMNuUaP.cjs +38609 -0
- package/dist/{cli.mjs → wxml-IBzZSaQC.js} +237 -718
- package/package.json +59 -54
- package/dist/css-macro/postcss.mjs +0 -2
- package/dist/generator.mjs +0 -2
- package/dist/gulp.mjs +0 -2
- package/dist/index.mjs +0 -9
- package/dist/object-BJSWl-E5.mjs +0 -9
- package/dist/object-COs_Mw6p.js +0 -14
- package/dist/postcss-html-transform.mjs +0 -5
- package/dist/postcss.mjs +0 -11
- package/dist/reset.mjs +0 -2
- package/dist/transform-B_KM9sLX.mjs +0 -14930
- package/dist/transform-CcYptivi.js +0 -14927
- package/dist/types.mjs +0 -1
- package/dist/vite.mjs +0 -2
- package/dist/watch-dependencies-bpG6kmAf.js +0 -80
- package/dist/weapp-tw-css-import-rewrite-loader-DNk0IxAt.js +0 -10198
- package/dist/weapp-tw-css-import-rewrite-loader.js +0 -10
- package/dist/webpack.mjs +0 -2
- package/dist/wxml-Ce10eREX.js +0 -3979
- package/dist/wxml-DdGdeqaH.mjs +0 -3861
- /package/dist/{auto-2dg_uhEJ.mjs → auto-2dg_uhEJ.js} +0 -0
- /package/dist/{auto-DtU6f3X6.js → auto-DtU6f3X6.cjs} +0 -0
- /package/dist/bundlers/{vite → shared}/source-scan/dependencies.d.ts +0 -0
- /package/dist/{cache-options-DavPxrhC.js → cache-options-DavPxrhC.cjs} +0 -0
- /package/dist/{cache-options-DwBtLwQe.mjs → cache-options-DwBtLwQe.js} +0 -0
- /package/dist/{logger-BNzxZbZj.mjs → logger-BNzxZbZj.js} +0 -0
- /package/dist/{logger-TlKT3xmR.js → logger-TlKT3xmR.cjs} +0 -0
- /package/dist/{utils-CuKLf1Zv.js → utils-CuKLf1Zv.cjs} +0 -0
- /package/dist/{utils-MVwpU07P.mjs → utils-MVwpU07P.js} +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_framework = require("./framework.
|
|
3
|
-
require("./auto-DtU6f3X6.
|
|
4
|
-
const require_object = require("./object-
|
|
5
|
-
require("./utils-CuKLf1Zv.
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
2
|
+
const require_framework = require("./framework.cjs");
|
|
3
|
+
require("./auto-DtU6f3X6.cjs");
|
|
4
|
+
const require_object = require("./object-C_Vr6_S5.cjs");
|
|
5
|
+
require("./utils-CuKLf1Zv.cjs");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
|
-
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
7
|
+
node_fs = require_rolldown_runtime.__toESM(node_fs, 1);
|
|
8
8
|
let node_path = require("node:path");
|
|
9
|
-
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
9
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
10
10
|
let node_process = require("node:process");
|
|
11
|
-
node_process = require_rolldown_runtime.__toESM(node_process);
|
|
11
|
+
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
12
12
|
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
13
13
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
14
14
|
let lru_cache = require("lru-cache");
|
|
15
15
|
let node_module = require("node:module");
|
|
16
16
|
let node_fs_promises = require("node:fs/promises");
|
|
17
17
|
let micromatch = require("micromatch");
|
|
18
|
-
micromatch = require_rolldown_runtime.__toESM(micromatch);
|
|
18
|
+
micromatch = require_rolldown_runtime.__toESM(micromatch, 1);
|
|
19
19
|
//#region src/runtime-branch/generator-target-env.ts
|
|
20
20
|
const explicitGeneratorTargetEnvKeys = ["WEAPP_TW_TARGET", "WEAPP_TAILWINDCSS_TARGET"];
|
|
21
21
|
const uniWebPlatformEnvKeys = ["UNI_PLATFORM", "UNI_UTS_PLATFORM"];
|
|
@@ -66,6 +66,216 @@ function filterUnsupportedMiniProgramTailwindV4Candidates(candidates) {
|
|
|
66
66
|
return new Set([...candidates].filter((candidate) => !isUnsupportedMiniProgramTailwindV4Candidate(candidate)));
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
|
+
//#region src/tailwindcss/v4-engine/generator/rpx-candidates.ts
|
|
70
|
+
const RPX_LENGTH_UTILITY_PATTERN = String.raw`text|border(?:-[trblxyse])?|bg|outline|ring`;
|
|
71
|
+
const BARE_RPX_LENGTH_CANDIDATE_RE = new RegExp(String.raw`(^|:)(!?)(${RPX_LENGTH_UTILITY_PATTERN})-\[([-+]?(?:\d+|\d*\.\d+)rpx)\](.*)$`, "u");
|
|
72
|
+
const BARE_RPX_LENGTH_HINT_CANDIDATE_RE = new RegExp(String.raw`(?:^|:)!?(${RPX_LENGTH_UTILITY_PATTERN})-\[length:([-+]?(?:\d+|\d*\.\d+)rpx)\].*$`, "u");
|
|
73
|
+
const RPX_LENGTH_SELECTOR_RE = new RegExp(String.raw`(${RPX_LENGTH_UTILITY_PATTERN})-\\\[length\\:((?:\\[.+-]|[+\-.\d])+rpx)\\\]`, "g");
|
|
74
|
+
function normalizeRpxLengthCandidate(candidate) {
|
|
75
|
+
return candidate.replace(BARE_RPX_LENGTH_CANDIDATE_RE, (_match, prefix, important, utility, value, suffix) => {
|
|
76
|
+
return `${prefix}${important}${utility}-[length:${value}]${suffix}`;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function normalizeRpxLengthCandidates(candidates) {
|
|
80
|
+
const normalized = /* @__PURE__ */ new Set();
|
|
81
|
+
const restoreCandidates = /* @__PURE__ */ new Map();
|
|
82
|
+
for (const candidate of candidates) {
|
|
83
|
+
const normalizedCandidate = normalizeRpxLengthCandidate(candidate);
|
|
84
|
+
normalized.add(normalizedCandidate);
|
|
85
|
+
if (normalizedCandidate !== candidate) restoreCandidates.set(normalizedCandidate, candidate);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
candidates: normalized,
|
|
89
|
+
restoreCandidates
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function restoreRpxLengthCandidates(candidates, restoreCandidates) {
|
|
93
|
+
if (restoreCandidates.size === 0) return new Set(candidates);
|
|
94
|
+
return new Set([...candidates].map((candidate) => restoreCandidates.get(candidate) ?? candidate));
|
|
95
|
+
}
|
|
96
|
+
function normalizeCssEscapedRpxSelectorValue(value) {
|
|
97
|
+
return value.replace(/\\([.+-])/g, "$1");
|
|
98
|
+
}
|
|
99
|
+
function restoreRpxLengthCssSelectors(css, restoreCandidates) {
|
|
100
|
+
if (restoreCandidates.size === 0 || !css.includes("\\[length\\:")) return css;
|
|
101
|
+
const restoredUtilities = new Set([...restoreCandidates.keys()].map((candidate) => {
|
|
102
|
+
const match = BARE_RPX_LENGTH_HINT_CANDIDATE_RE.exec(candidate);
|
|
103
|
+
return match ? `${match[1]}:${match[2]}` : void 0;
|
|
104
|
+
}).filter((value) => Boolean(value)));
|
|
105
|
+
return css.replace(RPX_LENGTH_SELECTOR_RE, (match, utility, value) => {
|
|
106
|
+
return restoredUtilities.has(`${utility}:${normalizeCssEscapedRpxSelectorValue(value)}`) ? `${utility}-\\[${value}\\]` : match;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
const INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX = 12e3;
|
|
110
|
+
const INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX = 2 * 1024 * 1024;
|
|
111
|
+
const incrementalGenerateCache = new lru_cache.LRUCache({ max: 8 });
|
|
112
|
+
const incrementalGenerateTaskCache = new lru_cache.LRUCache({ max: 32 });
|
|
113
|
+
function collectCandidates(candidates) {
|
|
114
|
+
return new Set(candidates ?? []);
|
|
115
|
+
}
|
|
116
|
+
function hasRemovedCandidates(previousCandidates, nextCandidates) {
|
|
117
|
+
for (const candidate of previousCandidates) if (!nextCandidates.has(candidate)) return true;
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
function createStableJson(value) {
|
|
121
|
+
if (value === void 0) return "undefined";
|
|
122
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
123
|
+
if (Array.isArray(value)) return `[${value.map((item) => createStableJson(item)).join(",")}]`;
|
|
124
|
+
return `{${Object.keys(value).sort().map((key) => {
|
|
125
|
+
const record = value;
|
|
126
|
+
return `${JSON.stringify(key)}:${createStableJson(record[key])}`;
|
|
127
|
+
}).join(",")}}`;
|
|
128
|
+
}
|
|
129
|
+
function createDependencyFingerprint(files) {
|
|
130
|
+
return files.map((file) => {
|
|
131
|
+
try {
|
|
132
|
+
const stat = node_fs.default.statSync(file);
|
|
133
|
+
return `${file}:${stat.size}:${stat.mtimeMs}`;
|
|
134
|
+
} catch {
|
|
135
|
+
return `${file}:missing`;
|
|
136
|
+
}
|
|
137
|
+
}).join("|");
|
|
138
|
+
}
|
|
139
|
+
function createTailwindV4SourceCacheKey(source) {
|
|
140
|
+
return [
|
|
141
|
+
source.projectRoot,
|
|
142
|
+
source.base,
|
|
143
|
+
createStableJson(source.baseFallbacks),
|
|
144
|
+
source.css,
|
|
145
|
+
createDependencyFingerprint(source.dependencies)
|
|
146
|
+
].join("\0");
|
|
147
|
+
}
|
|
148
|
+
function createIncrementalGenerateCacheKey(source, target, styleOptions) {
|
|
149
|
+
return [
|
|
150
|
+
createTailwindV4SourceCacheKey(source),
|
|
151
|
+
target,
|
|
152
|
+
createStableJson(styleOptions)
|
|
153
|
+
].join("\0");
|
|
154
|
+
}
|
|
155
|
+
function createIncrementalGenerateTaskCacheKey(cacheKey, requestedCandidates, scanSources) {
|
|
156
|
+
return [
|
|
157
|
+
cacheKey,
|
|
158
|
+
scanSources === true ? "scan:1" : "scan:0",
|
|
159
|
+
[...requestedCandidates].sort().join("\n")
|
|
160
|
+
].join("\0");
|
|
161
|
+
}
|
|
162
|
+
function runIncrementalGenerateTask(cacheKey, requestedCandidates, scanSources, task) {
|
|
163
|
+
const taskKey = createIncrementalGenerateTaskCacheKey(cacheKey, requestedCandidates, scanSources);
|
|
164
|
+
const cachedTask = incrementalGenerateTaskCache.get(taskKey);
|
|
165
|
+
if (cachedTask) return cachedTask;
|
|
166
|
+
const promise = task();
|
|
167
|
+
incrementalGenerateTaskCache.set(taskKey, promise);
|
|
168
|
+
promise.finally(() => {
|
|
169
|
+
if (incrementalGenerateTaskCache.get(taskKey) === promise) incrementalGenerateTaskCache.delete(taskKey);
|
|
170
|
+
});
|
|
171
|
+
return promise;
|
|
172
|
+
}
|
|
173
|
+
function createIncrementalDesignSystemPromise(source, cacheKey) {
|
|
174
|
+
const promise = (0, _tailwindcss_mangle_engine.loadTailwindV4DesignSystem)(source);
|
|
175
|
+
promise.catch(() => {
|
|
176
|
+
if (incrementalGenerateCache.get(cacheKey)?.designSystemPromise === promise) incrementalGenerateCache.delete(cacheKey);
|
|
177
|
+
});
|
|
178
|
+
return promise;
|
|
179
|
+
}
|
|
180
|
+
function resolveTargetCandidates(candidates, target) {
|
|
181
|
+
const collected = collectCandidates(candidates);
|
|
182
|
+
return target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(collected) : collected;
|
|
183
|
+
}
|
|
184
|
+
function collectSeenCandidates(generated) {
|
|
185
|
+
return new Set(generated.classSet);
|
|
186
|
+
}
|
|
187
|
+
function createIncrementalStyleOptions(styleOptions) {
|
|
188
|
+
return {
|
|
189
|
+
...styleOptions,
|
|
190
|
+
isMainChunk: false
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function resolveStyleOptions(source, options) {
|
|
194
|
+
return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4Source)(source.css) ? (0, _weapp_tailwindcss_postcss.withCssMacroStyleOptions)(options) : options;
|
|
195
|
+
}
|
|
196
|
+
function collectCustomPropertyValues(css) {
|
|
197
|
+
const values = /* @__PURE__ */ new Map();
|
|
198
|
+
try {
|
|
199
|
+
_weapp_tailwindcss_postcss.postcss.parse(css).walkDecls((decl) => {
|
|
200
|
+
if (decl.prop.startsWith("--")) values.set(decl.prop, decl.value.trim());
|
|
201
|
+
});
|
|
202
|
+
} catch {}
|
|
203
|
+
return values;
|
|
204
|
+
}
|
|
205
|
+
function mergeCustomPropertyValues(target, css) {
|
|
206
|
+
for (const [prop, value] of collectCustomPropertyValues(css)) target.set(prop, value);
|
|
207
|
+
}
|
|
208
|
+
function createStableTextSignature(input) {
|
|
209
|
+
let hash = 2166136261;
|
|
210
|
+
for (let i = 0; i < input.length; i++) {
|
|
211
|
+
hash ^= input.charCodeAt(i);
|
|
212
|
+
hash = Math.imul(hash, 16777619);
|
|
213
|
+
}
|
|
214
|
+
return (hash >>> 0).toString(36);
|
|
215
|
+
}
|
|
216
|
+
function summarizeIncrementalCacheKey(key) {
|
|
217
|
+
return {
|
|
218
|
+
keyHash: createStableTextSignature(key),
|
|
219
|
+
keyBytes: key.length
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function shouldRebuildIncrementalEntry(cached, requestedCandidates, missingCandidates) {
|
|
223
|
+
return cached.seenCandidates.size + missingCandidates.length > 12e3 || cached.css.length > 2097152 || cached.rawCss.length > 2097152 || requestedCandidates.size > 12e3;
|
|
224
|
+
}
|
|
225
|
+
function shouldAdmitIncrementalEntry(requestedCandidates, generated) {
|
|
226
|
+
return requestedCandidates.size <= 12e3 && generated.css.length <= 2097152 && generated.rawCss.length <= 2097152;
|
|
227
|
+
}
|
|
228
|
+
function seedIncrementalGenerateCache(options) {
|
|
229
|
+
if (!shouldAdmitIncrementalEntry(options.requestedCandidates, options.generated)) return false;
|
|
230
|
+
const cacheKey = createIncrementalGenerateCacheKey(options.compatibleSource, options.target, options.styleOptions);
|
|
231
|
+
const customPropertyValues = collectCustomPropertyValues(options.compatibleSource.css);
|
|
232
|
+
mergeCustomPropertyValues(customPropertyValues, options.generated.css);
|
|
233
|
+
incrementalGenerateCache.set(cacheKey, {
|
|
234
|
+
seenCandidates: collectSeenCandidates(options.generated),
|
|
235
|
+
classSet: new Set(options.generated.classSet),
|
|
236
|
+
css: options.generated.css,
|
|
237
|
+
rawCss: options.generated.rawCss,
|
|
238
|
+
customPropertyValues,
|
|
239
|
+
designSystemPromise: createIncrementalDesignSystemPromise(options.compatibleSource, cacheKey),
|
|
240
|
+
dependencies: options.generated.dependencies,
|
|
241
|
+
sources: options.generated.sources,
|
|
242
|
+
root: options.generated.root,
|
|
243
|
+
target: options.generated.target
|
|
244
|
+
});
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
function shouldNormalizeRpxLengthCandidatesForTarget(target, styleOptions) {
|
|
248
|
+
if (target !== "web") return true;
|
|
249
|
+
return styleOptions?.appType === "uni-app-vite" || shouldUseWebGeneratorTargetFromEnv();
|
|
250
|
+
}
|
|
251
|
+
function normalizeTargetRpxLengthCandidates(candidates, target, styleOptions) {
|
|
252
|
+
return shouldNormalizeRpxLengthCandidatesForTarget(target, styleOptions) ? normalizeRpxLengthCandidates(candidates) : {
|
|
253
|
+
candidates: new Set(candidates),
|
|
254
|
+
restoreCandidates: /* @__PURE__ */ new Map()
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/tailwindcss/v4-engine/generator/cache-stats.ts
|
|
259
|
+
function getTailwindV4IncrementalGenerateCacheStats() {
|
|
260
|
+
return {
|
|
261
|
+
max: 8,
|
|
262
|
+
entryCandidatesMax: INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX,
|
|
263
|
+
entryCssBytesMax: INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX,
|
|
264
|
+
size: incrementalGenerateCache.size,
|
|
265
|
+
taskMax: 32,
|
|
266
|
+
taskSize: incrementalGenerateTaskCache.size,
|
|
267
|
+
entries: [...incrementalGenerateCache.entries()].map(([key, entry]) => ({
|
|
268
|
+
...summarizeIncrementalCacheKey(key),
|
|
269
|
+
candidates: entry.seenCandidates.size,
|
|
270
|
+
classSet: entry.classSet.size,
|
|
271
|
+
cssBytes: entry.css.length,
|
|
272
|
+
rawCssBytes: entry.rawCss.length
|
|
273
|
+
})),
|
|
274
|
+
keys: [...incrementalGenerateCache.keys()].map(summarizeIncrementalCacheKey),
|
|
275
|
+
taskKeys: [...incrementalGenerateTaskCache.keys()].map(summarizeIncrementalCacheKey)
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
//#endregion
|
|
69
279
|
//#region src/tailwindcss/v4-engine/css-macro-source.ts
|
|
70
280
|
function resolveCssMacroTailwindV4Source(source) {
|
|
71
281
|
const css = (0, _weapp_tailwindcss_postcss.transformCssMacroTailwindV4Source)(source.css);
|
|
@@ -75,6 +285,59 @@ function resolveCssMacroTailwindV4Source(source) {
|
|
|
75
285
|
};
|
|
76
286
|
}
|
|
77
287
|
//#endregion
|
|
288
|
+
//#region src/tailwindcss/v4-engine/miniprogram.ts
|
|
289
|
+
const defaultStyleHandler = (0, _weapp_tailwindcss_postcss.createStyleHandler)({
|
|
290
|
+
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
291
|
+
cssRemoveHoverPseudoClass: true,
|
|
292
|
+
isMainChunk: true,
|
|
293
|
+
majorVersion: 4
|
|
294
|
+
});
|
|
295
|
+
const CSS_DECLARATION_URL_RE = /(:\s*)url\(([^\n\r"';[\]{}]*[[\]{}][^\n\r;]*)\)(?=\s*;)/g;
|
|
296
|
+
function normalizeTailwindV4GeneratedUrlValues(css) {
|
|
297
|
+
return css.replace(CSS_DECLARATION_URL_RE, (match, prefix, urlValue) => {
|
|
298
|
+
try {
|
|
299
|
+
return `${prefix}url("${urlValue.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}")`;
|
|
300
|
+
} catch {
|
|
301
|
+
return match;
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
async function transformTailwindV4CssToWeapp(css, options) {
|
|
306
|
+
const compatibleCss = normalizeTailwindV4GeneratedUrlValues((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? await (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css);
|
|
307
|
+
const customPropertyValues = options?.customPropertyValues;
|
|
308
|
+
const protectedCss = (0, _weapp_tailwindcss_postcss.protectDynamicColorMixAlpha)(compatibleCss, { customPropertyValues });
|
|
309
|
+
const result = await defaultStyleHandler(protectedCss.css, {
|
|
310
|
+
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
311
|
+
cssRemoveHoverPseudoClass: true,
|
|
312
|
+
isMainChunk: true,
|
|
313
|
+
majorVersion: 4,
|
|
314
|
+
...options
|
|
315
|
+
});
|
|
316
|
+
const pruneOptions = {
|
|
317
|
+
preserveContentInit: options?.uniAppX === true && options.uniAppXCssTarget === "uvue" ? false : void 0,
|
|
318
|
+
preservePreflight: true,
|
|
319
|
+
preserveConditionalComments: (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options)
|
|
320
|
+
};
|
|
321
|
+
return (0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(protectedCss.restore(result.css), pruneOptions);
|
|
322
|
+
}
|
|
323
|
+
function transformTailwindV4WebRpxCss(css) {
|
|
324
|
+
if (!css.includes("rpx")) return css;
|
|
325
|
+
try {
|
|
326
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
327
|
+
return (0, _weapp_tailwindcss_postcss.normalizeTailwindcssWebRpxDeclarations)(root, { majorVersion: 4 }) ? root.toString() : css;
|
|
328
|
+
} catch {
|
|
329
|
+
return css;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
function shouldTransformWebRpxCss(options) {
|
|
333
|
+
return options?.appType === "uni-app-vite" || shouldUseWebGeneratorTargetFromEnv();
|
|
334
|
+
}
|
|
335
|
+
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
336
|
+
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
337
|
+
const resolvedWebCss = await ((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css);
|
|
338
|
+
return shouldTransformWebRpxCss(options) ? transformTailwindV4WebRpxCss(resolvedWebCss) : resolvedWebCss;
|
|
339
|
+
}
|
|
340
|
+
//#endregion
|
|
78
341
|
//#region src/tailwindcss/v4-engine/tailwind-v4-default-colors.ts
|
|
79
342
|
const TAILWIND_V4_COLOR_STEPS = [
|
|
80
343
|
"50",
|
|
@@ -561,45 +824,53 @@ function createCompatibleSource(source, target) {
|
|
|
561
824
|
};
|
|
562
825
|
}
|
|
563
826
|
//#endregion
|
|
564
|
-
//#region src/tailwindcss/v4-engine/generator/
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
|
|
827
|
+
//#region src/tailwindcss/v4-engine/generator/native-session.ts
|
|
828
|
+
var TailwindV4NativeSessionPool = class {
|
|
829
|
+
constructor(createSession = _tailwindcss_mangle_engine.createTailwindGenerationSession) {
|
|
830
|
+
this.createSession = createSession;
|
|
831
|
+
require_object._defineProperty(this, "sessions", /* @__PURE__ */ new Map());
|
|
832
|
+
require_object._defineProperty(this, "disposed", false);
|
|
833
|
+
}
|
|
834
|
+
generate(target, sourceKey, source, request) {
|
|
835
|
+
const entry = this.getSession(target, sourceKey, source);
|
|
836
|
+
const generated = entry.pending.then(() => entry.session.generate(request));
|
|
837
|
+
entry.pending = generated.then(() => void 0, () => void 0);
|
|
838
|
+
return generated;
|
|
839
|
+
}
|
|
840
|
+
dispose() {
|
|
841
|
+
for (const entry of this.sessions.values()) this.disposeEntry(entry);
|
|
842
|
+
this.sessions.clear();
|
|
843
|
+
this.disposed = true;
|
|
844
|
+
}
|
|
845
|
+
get size() {
|
|
846
|
+
return this.sessions.size;
|
|
847
|
+
}
|
|
848
|
+
getSession(target, sourceKey, source) {
|
|
849
|
+
if (this.disposed) throw new Error("TailwindV4NativeSessionPool 已释放。");
|
|
850
|
+
const cached = this.sessions.get(target);
|
|
851
|
+
if (cached?.sourceKey === sourceKey) return cached;
|
|
852
|
+
if (cached) this.disposeEntry(cached);
|
|
853
|
+
const session = this.createSession(source);
|
|
854
|
+
const entry = {
|
|
855
|
+
pending: Promise.resolve(),
|
|
856
|
+
session,
|
|
857
|
+
sourceKey
|
|
858
|
+
};
|
|
859
|
+
this.sessions.set(target, entry);
|
|
860
|
+
return entry;
|
|
581
861
|
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
}
|
|
591
|
-
function normalizeCssEscapedRpxSelectorValue(value) {
|
|
592
|
-
return value.replace(/\\([.+-])/g, "$1");
|
|
862
|
+
disposeEntry(entry) {
|
|
863
|
+
entry.pending.then(() => entry.session.dispose());
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
function createEngineSourceEntries(sources, sourceId) {
|
|
867
|
+
return sources.map((source, index) => ({
|
|
868
|
+
id: `${sourceId}:candidate-source:${index}`,
|
|
869
|
+
...source
|
|
870
|
+
}));
|
|
593
871
|
}
|
|
594
|
-
function
|
|
595
|
-
|
|
596
|
-
const restoredUtilities = new Set([...restoreCandidates.keys()].map((candidate) => {
|
|
597
|
-
const match = BARE_RPX_LENGTH_HINT_CANDIDATE_RE.exec(candidate);
|
|
598
|
-
return match ? `${match[1]}:${match[2]}` : void 0;
|
|
599
|
-
}).filter((value) => Boolean(value)));
|
|
600
|
-
return css.replace(RPX_LENGTH_SELECTOR_RE, (match, utility, value) => {
|
|
601
|
-
return restoredUtilities.has(`${utility}:${normalizeCssEscapedRpxSelectorValue(value)}`) ? `${utility}-\\[${value}\\]` : match;
|
|
602
|
-
});
|
|
872
|
+
function serializeTailwindGenerationArtifact(artifact) {
|
|
873
|
+
return [...artifact.fragments].sort((left, right) => left.order - right.order).map((fragment) => fragment.root.toString()).join("\n");
|
|
603
874
|
}
|
|
604
875
|
//#endregion
|
|
605
876
|
//#region src/tailwindcss/source-scan.ts
|
|
@@ -962,231 +1233,81 @@ async function resolveScanSources(source, scanSources) {
|
|
|
962
1233
|
if (scanSources !== true) return scanSources;
|
|
963
1234
|
return await resolveCssDefinedScanSources(source) ?? false;
|
|
964
1235
|
}
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
const defaultStyleHandler = (0, _weapp_tailwindcss_postcss.createStyleHandler)({
|
|
968
|
-
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
969
|
-
cssRemoveHoverPseudoClass: true,
|
|
970
|
-
isMainChunk: true,
|
|
971
|
-
majorVersion: 4
|
|
972
|
-
});
|
|
973
|
-
const CSS_DECLARATION_URL_RE = /(:\s*)url\(([^\n\r"';[\]{}]*[[\]{}][^\n\r;]*)\)(?=\s*;)/g;
|
|
974
|
-
function normalizeTailwindV4GeneratedUrlValues(css) {
|
|
975
|
-
return css.replace(CSS_DECLARATION_URL_RE, (match, prefix, urlValue) => {
|
|
976
|
-
try {
|
|
977
|
-
return `${prefix}url("${urlValue.replaceAll("\\", "\\\\").replaceAll("\"", "\\\"")}")`;
|
|
978
|
-
} catch {
|
|
979
|
-
return match;
|
|
980
|
-
}
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
async function transformTailwindV4CssToWeapp(css, options) {
|
|
984
|
-
const protectedCss = (0, _weapp_tailwindcss_postcss.protectDynamicColorMixAlpha)(normalizeTailwindV4GeneratedUrlValues((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? await (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css), { customPropertyValues: options && "customPropertyValues" in options ? options.customPropertyValues : void 0 });
|
|
985
|
-
const result = await defaultStyleHandler(protectedCss.css, {
|
|
986
|
-
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
987
|
-
cssRemoveHoverPseudoClass: true,
|
|
988
|
-
isMainChunk: true,
|
|
989
|
-
majorVersion: 4,
|
|
990
|
-
...options
|
|
991
|
-
});
|
|
992
|
-
const pruneOptions = {
|
|
993
|
-
preservePreflight: true,
|
|
994
|
-
preserveConditionalComments: (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options)
|
|
995
|
-
};
|
|
996
|
-
return (0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(protectedCss.restore(result.css), pruneOptions);
|
|
997
|
-
}
|
|
998
|
-
function transformTailwindV4WebRpxCss(css) {
|
|
999
|
-
if (!css.includes("rpx")) return css;
|
|
1000
|
-
try {
|
|
1001
|
-
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
1002
|
-
return (0, _weapp_tailwindcss_postcss.normalizeTailwindcssWebRpxDeclarations)(root, { majorVersion: 4 }) ? root.toString() : css;
|
|
1003
|
-
} catch {
|
|
1004
|
-
return css;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
function shouldTransformWebRpxCss(options) {
|
|
1008
|
-
return options?.appType === "uni-app-vite" || shouldUseWebGeneratorTargetFromEnv();
|
|
1009
|
-
}
|
|
1010
|
-
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
1011
|
-
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
1012
|
-
const resolvedWebCss = await ((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css);
|
|
1013
|
-
return shouldTransformWebRpxCss(options) ? transformTailwindV4WebRpxCss(resolvedWebCss) : resolvedWebCss;
|
|
1014
|
-
}
|
|
1015
|
-
//#endregion
|
|
1016
|
-
//#region src/tailwindcss/v4-engine/generator.ts
|
|
1017
|
-
const INCREMENTAL_GENERATE_CACHE_MAX = 8;
|
|
1018
|
-
const INCREMENTAL_GENERATE_TASK_CACHE_MAX = 32;
|
|
1019
|
-
const INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX = 12e3;
|
|
1020
|
-
const INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX = 2 * 1024 * 1024;
|
|
1021
|
-
const incrementalGenerateCache = new lru_cache.LRUCache({ max: INCREMENTAL_GENERATE_CACHE_MAX });
|
|
1022
|
-
const incrementalGenerateTaskCache = new lru_cache.LRUCache({ max: INCREMENTAL_GENERATE_TASK_CACHE_MAX });
|
|
1023
|
-
function collectCandidates(candidates) {
|
|
1024
|
-
return new Set(candidates ?? []);
|
|
1025
|
-
}
|
|
1026
|
-
function hasRemovedCandidates(previousCandidates, nextCandidates) {
|
|
1027
|
-
for (const candidate of previousCandidates) if (!nextCandidates.has(candidate)) return true;
|
|
1028
|
-
return false;
|
|
1029
|
-
}
|
|
1030
|
-
function createStableJson(value) {
|
|
1031
|
-
if (value === void 0) return "undefined";
|
|
1032
|
-
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
1033
|
-
if (Array.isArray(value)) return `[${value.map((item) => createStableJson(item)).join(",")}]`;
|
|
1034
|
-
return `{${Object.keys(value).sort().map((key) => {
|
|
1035
|
-
const record = value;
|
|
1036
|
-
return `${JSON.stringify(key)}:${createStableJson(record[key])}`;
|
|
1037
|
-
}).join(",")}}`;
|
|
1038
|
-
}
|
|
1039
|
-
function createDependencyFingerprint(files) {
|
|
1040
|
-
return files.map((file) => {
|
|
1041
|
-
try {
|
|
1042
|
-
const stat = node_fs.default.statSync(file);
|
|
1043
|
-
return `${file}:${stat.size}:${stat.mtimeMs}`;
|
|
1044
|
-
} catch {
|
|
1045
|
-
return `${file}:missing`;
|
|
1046
|
-
}
|
|
1047
|
-
}).join("|");
|
|
1048
|
-
}
|
|
1049
|
-
function createIncrementalGenerateCacheKey(source, target, styleOptions) {
|
|
1050
|
-
return [
|
|
1051
|
-
source.projectRoot,
|
|
1052
|
-
source.base,
|
|
1053
|
-
createStableJson(source.baseFallbacks),
|
|
1054
|
-
source.css,
|
|
1055
|
-
createDependencyFingerprint(source.dependencies),
|
|
1056
|
-
target,
|
|
1057
|
-
createStableJson(styleOptions)
|
|
1058
|
-
].join("\0");
|
|
1059
|
-
}
|
|
1060
|
-
function createIncrementalGenerateTaskCacheKey(cacheKey, requestedCandidates, scanSources) {
|
|
1061
|
-
return [
|
|
1062
|
-
cacheKey,
|
|
1063
|
-
scanSources === true ? "scan:1" : "scan:0",
|
|
1064
|
-
[...requestedCandidates].sort().join("\n")
|
|
1065
|
-
].join("\0");
|
|
1066
|
-
}
|
|
1067
|
-
function runIncrementalGenerateTask(cacheKey, requestedCandidates, scanSources, task) {
|
|
1068
|
-
const taskKey = createIncrementalGenerateTaskCacheKey(cacheKey, requestedCandidates, scanSources);
|
|
1069
|
-
const cachedTask = incrementalGenerateTaskCache.get(taskKey);
|
|
1070
|
-
if (cachedTask) return cachedTask;
|
|
1071
|
-
const promise = task();
|
|
1072
|
-
incrementalGenerateTaskCache.set(taskKey, promise);
|
|
1073
|
-
promise.finally(() => {
|
|
1074
|
-
if (incrementalGenerateTaskCache.get(taskKey) === promise) incrementalGenerateTaskCache.delete(taskKey);
|
|
1075
|
-
});
|
|
1076
|
-
return promise;
|
|
1077
|
-
}
|
|
1078
|
-
function createIncrementalDesignSystemPromise(source, cacheKey) {
|
|
1079
|
-
const promise = (0, _tailwindcss_mangle_engine.loadTailwindV4DesignSystem)(source);
|
|
1080
|
-
promise.catch(() => {
|
|
1081
|
-
if (incrementalGenerateCache.get(cacheKey)?.designSystemPromise === promise) incrementalGenerateCache.delete(cacheKey);
|
|
1082
|
-
});
|
|
1083
|
-
return promise;
|
|
1084
|
-
}
|
|
1085
|
-
function resolveTargetCandidates(candidates, target) {
|
|
1086
|
-
const collected = collectCandidates(candidates);
|
|
1087
|
-
return target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(collected) : collected;
|
|
1088
|
-
}
|
|
1089
|
-
function collectSeenCandidates(generated) {
|
|
1090
|
-
return new Set(generated.classSet);
|
|
1091
|
-
}
|
|
1092
|
-
function shouldDelegateWebSourceScanToTailwind(target, scanSources) {
|
|
1093
|
-
return target === "web" && scanSources !== false;
|
|
1094
|
-
}
|
|
1095
|
-
function createIncrementalStyleOptions(styleOptions) {
|
|
1096
|
-
return {
|
|
1097
|
-
...styleOptions,
|
|
1098
|
-
isMainChunk: false
|
|
1099
|
-
};
|
|
1100
|
-
}
|
|
1101
|
-
function resolveStyleOptions(source, options) {
|
|
1102
|
-
return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4Source)(source.css) ? (0, _weapp_tailwindcss_postcss.withCssMacroStyleOptions)(options) : options;
|
|
1103
|
-
}
|
|
1104
|
-
function collectCustomPropertyValues(css) {
|
|
1105
|
-
const values = /* @__PURE__ */ new Map();
|
|
1236
|
+
function resolveCompiledSourceRoot(source) {
|
|
1237
|
+
let root = null;
|
|
1106
1238
|
try {
|
|
1107
|
-
_weapp_tailwindcss_postcss.postcss.parse(css).
|
|
1108
|
-
if (
|
|
1239
|
+
_weapp_tailwindcss_postcss.postcss.parse(source.css).walkAtRules("import", (rule) => {
|
|
1240
|
+
if (!isTailwindCssImport(rule.params)) return;
|
|
1241
|
+
const sourceParam = parseImportSourceParam(rule.params);
|
|
1242
|
+
if (sourceParam?.none) {
|
|
1243
|
+
root = "none";
|
|
1244
|
+
return false;
|
|
1245
|
+
}
|
|
1246
|
+
if (sourceParam?.sourcePath) {
|
|
1247
|
+
root = {
|
|
1248
|
+
base: source.base,
|
|
1249
|
+
pattern: sourceParam.sourcePath
|
|
1250
|
+
};
|
|
1251
|
+
return false;
|
|
1252
|
+
}
|
|
1109
1253
|
});
|
|
1110
1254
|
} catch {}
|
|
1111
|
-
return
|
|
1112
|
-
}
|
|
1113
|
-
function mergeCustomPropertyValues(target, css) {
|
|
1114
|
-
for (const [prop, value] of collectCustomPropertyValues(css)) target.set(prop, value);
|
|
1115
|
-
}
|
|
1116
|
-
function createStableTextSignature(input) {
|
|
1117
|
-
let hash = 2166136261;
|
|
1118
|
-
for (let i = 0; i < input.length; i++) {
|
|
1119
|
-
hash ^= input.charCodeAt(i);
|
|
1120
|
-
hash = Math.imul(hash, 16777619);
|
|
1121
|
-
}
|
|
1122
|
-
return (hash >>> 0).toString(36);
|
|
1123
|
-
}
|
|
1124
|
-
function summarizeIncrementalCacheKey(key) {
|
|
1125
|
-
return {
|
|
1126
|
-
keyHash: createStableTextSignature(key),
|
|
1127
|
-
keyBytes: key.length
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
function shouldRebuildIncrementalEntry(cached, requestedCandidates, missingCandidates) {
|
|
1131
|
-
return cached.seenCandidates.size + missingCandidates.length > INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX || cached.css.length > INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX || cached.rawCss.length > INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX || requestedCandidates.size > INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX;
|
|
1132
|
-
}
|
|
1133
|
-
function shouldAdmitIncrementalEntry(requestedCandidates, generated) {
|
|
1134
|
-
return requestedCandidates.size <= INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX && generated.css.length <= INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX && generated.rawCss.length <= INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX;
|
|
1135
|
-
}
|
|
1136
|
-
function seedIncrementalGenerateCache(options) {
|
|
1137
|
-
if (!shouldAdmitIncrementalEntry(options.requestedCandidates, options.generated)) return false;
|
|
1138
|
-
const cacheKey = createIncrementalGenerateCacheKey(options.compatibleSource, options.target, options.styleOptions);
|
|
1139
|
-
const customPropertyValues = collectCustomPropertyValues(options.compatibleSource.css);
|
|
1140
|
-
mergeCustomPropertyValues(customPropertyValues, options.generated.css);
|
|
1141
|
-
incrementalGenerateCache.set(cacheKey, {
|
|
1142
|
-
seenCandidates: collectSeenCandidates(options.generated),
|
|
1143
|
-
classSet: new Set(options.generated.classSet),
|
|
1144
|
-
css: options.generated.css,
|
|
1145
|
-
rawCss: options.generated.rawCss,
|
|
1146
|
-
customPropertyValues,
|
|
1147
|
-
designSystemPromise: createIncrementalDesignSystemPromise(options.compatibleSource, cacheKey),
|
|
1148
|
-
dependencies: options.generated.dependencies,
|
|
1149
|
-
sources: options.generated.sources,
|
|
1150
|
-
root: options.generated.root,
|
|
1151
|
-
target: options.generated.target
|
|
1152
|
-
});
|
|
1153
|
-
return true;
|
|
1154
|
-
}
|
|
1155
|
-
function shouldNormalizeRpxLengthCandidatesForTarget(target, styleOptions) {
|
|
1156
|
-
if (target !== "web") return true;
|
|
1157
|
-
return styleOptions?.appType === "uni-app-vite" || shouldUseWebGeneratorTargetFromEnv();
|
|
1158
|
-
}
|
|
1159
|
-
function normalizeTargetRpxLengthCandidates(candidates, target, styleOptions) {
|
|
1160
|
-
return shouldNormalizeRpxLengthCandidatesForTarget(target, styleOptions) ? normalizeRpxLengthCandidates(candidates) : {
|
|
1161
|
-
candidates: new Set(candidates),
|
|
1162
|
-
restoreCandidates: /* @__PURE__ */ new Map()
|
|
1163
|
-
};
|
|
1255
|
+
return root;
|
|
1164
1256
|
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region src/tailwindcss/v4-engine/generator/engine.ts
|
|
1259
|
+
function isCssSyntaxError(error) {
|
|
1260
|
+
return error instanceof Error && error.name === "CssSyntaxError";
|
|
1167
1261
|
}
|
|
1168
1262
|
function createTailwindV4Engine(source) {
|
|
1263
|
+
const generationSessions = new TailwindV4NativeSessionPool();
|
|
1264
|
+
const incrementalCacheKeys = /* @__PURE__ */ new Set();
|
|
1265
|
+
const validationEngine = (0, _tailwindcss_mangle_engine.createTailwindV4Engine)(source);
|
|
1169
1266
|
async function generateOnce(generateSource, options = {}) {
|
|
1170
1267
|
const { scanSources = true, styleOptions, target = "weapp", ...patchOptions } = options;
|
|
1171
1268
|
const resolvedStyleOptions = resolveStyleOptions(generateSource, styleOptions);
|
|
1172
|
-
const
|
|
1269
|
+
const compatibleSource = createCompatibleSource(resolveCssMacroTailwindV4Source(generateSource), target);
|
|
1173
1270
|
const resolvedScanSources = await resolveScanSources(generateSource, scanSources);
|
|
1174
|
-
const
|
|
1175
|
-
const filesystemCandidates = !delegateSourceScan && Array.isArray(resolvedScanSources) ? new Set(await (0, _tailwindcss_mangle_engine.extractRawCandidates)(resolvedScanSources, { ...patchOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: patchOptions.bareArbitraryValues } })) : void 0;
|
|
1271
|
+
const filesystemCandidates = Array.isArray(resolvedScanSources) ? new Set(await (0, _tailwindcss_mangle_engine.extractRawCandidates)(resolvedScanSources, { ...patchOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: patchOptions.bareArbitraryValues } })) : void 0;
|
|
1176
1272
|
const normalizedCandidates = normalizeTargetRpxLengthCandidates(resolveTargetCandidates(/* @__PURE__ */ new Set([...collectCandidates(patchOptions.candidates), ...filesystemCandidates ?? []]), target), target, resolvedStyleOptions);
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1179
|
-
...patchOptions,
|
|
1273
|
+
const sourceId = compatibleSource.dependencies[0] ?? compatibleSource.base;
|
|
1274
|
+
const generationRequest = {
|
|
1275
|
+
...patchOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: patchOptions.bareArbitraryValues },
|
|
1276
|
+
...patchOptions.sources === void 0 ? {} : { sourceEntries: createEngineSourceEntries(patchOptions.sources, sourceId) },
|
|
1180
1277
|
candidates: normalizedCandidates.candidates
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
|
|
1278
|
+
};
|
|
1279
|
+
let generatedCss;
|
|
1280
|
+
let classSet;
|
|
1281
|
+
let rawCandidates;
|
|
1282
|
+
let dependencies;
|
|
1283
|
+
try {
|
|
1284
|
+
const artifact = await generationSessions.generate(target, createTailwindV4SourceCacheKey(compatibleSource), compatibleSource, generationRequest);
|
|
1285
|
+
generatedCss = serializeTailwindGenerationArtifact(artifact);
|
|
1286
|
+
classSet = artifact.classSet;
|
|
1287
|
+
rawCandidates = artifact.rawCandidates;
|
|
1288
|
+
dependencies = artifact.dependencies;
|
|
1289
|
+
} catch (error) {
|
|
1290
|
+
if (!isCssSyntaxError(error)) throw error;
|
|
1291
|
+
const legacyResult = await (0, _tailwindcss_mangle_engine.createTailwindV4Engine)(compatibleSource).generate({
|
|
1292
|
+
...patchOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: patchOptions.bareArbitraryValues },
|
|
1293
|
+
...patchOptions.sources === void 0 ? {} : { sources: patchOptions.sources },
|
|
1294
|
+
candidates: normalizedCandidates.candidates,
|
|
1295
|
+
scanSources: false
|
|
1296
|
+
});
|
|
1297
|
+
generatedCss = legacyResult.css;
|
|
1298
|
+
classSet = legacyResult.classSet;
|
|
1299
|
+
rawCandidates = legacyResult.rawCandidates;
|
|
1300
|
+
dependencies = legacyResult.dependencies;
|
|
1301
|
+
}
|
|
1302
|
+
const sources = Array.isArray(resolvedScanSources) ? resolvedScanSources : [];
|
|
1303
|
+
const rawCss = restoreRpxLengthCssSelectors(generatedCss, normalizedCandidates.restoreCandidates);
|
|
1184
1304
|
const css = await transformTailwindV4CssByTarget(rawCss, target, resolvedStyleOptions);
|
|
1185
1305
|
return {
|
|
1186
|
-
|
|
1306
|
+
classSet: restoreRpxLengthCandidates(classSet, normalizedCandidates.restoreCandidates),
|
|
1307
|
+
rawCandidates: restoreRpxLengthCandidates(rawCandidates, normalizedCandidates.restoreCandidates),
|
|
1308
|
+
dependencies,
|
|
1309
|
+
root: resolveCompiledSourceRoot(compatibleSource),
|
|
1187
1310
|
sources,
|
|
1188
|
-
classSet: restoreRpxLengthCandidates(result.classSet, normalizedCandidates.restoreCandidates),
|
|
1189
|
-
rawCandidates: restoreRpxLengthCandidates(result.rawCandidates, normalizedCandidates.restoreCandidates),
|
|
1190
1311
|
css,
|
|
1191
1312
|
rawCss,
|
|
1192
1313
|
target
|
|
@@ -1200,6 +1321,7 @@ function createTailwindV4Engine(source) {
|
|
|
1200
1321
|
const styleOptions = resolveStyleOptions(source, options.styleOptions);
|
|
1201
1322
|
if ((options.sources?.length ?? 0) > 0 || options.bareArbitraryValues !== void 0 || Array.isArray(options.scanSources)) return generateOnce(cssMacroSource, options);
|
|
1202
1323
|
const cacheKey = createIncrementalGenerateCacheKey(compatibleSource, target, styleOptions);
|
|
1324
|
+
incrementalCacheKeys.add(cacheKey);
|
|
1203
1325
|
if (options.scanSources === true) return runIncrementalGenerateTask(cacheKey, requestedCandidates, options.scanSources, async () => {
|
|
1204
1326
|
const generated = await generateOnce(cssMacroSource, options);
|
|
1205
1327
|
if (!seedIncrementalGenerateCache({
|
|
@@ -1304,28 +1426,14 @@ function createTailwindV4Engine(source) {
|
|
|
1304
1426
|
}
|
|
1305
1427
|
return {
|
|
1306
1428
|
source,
|
|
1307
|
-
loadDesignSystem:
|
|
1308
|
-
validateCandidates:
|
|
1309
|
-
generate
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
entryCandidatesMax: INCREMENTAL_GENERATE_ENTRY_CANDIDATES_MAX,
|
|
1316
|
-
entryCssBytesMax: INCREMENTAL_GENERATE_ENTRY_CSS_BYTES_MAX,
|
|
1317
|
-
size: incrementalGenerateCache.size,
|
|
1318
|
-
taskMax: INCREMENTAL_GENERATE_TASK_CACHE_MAX,
|
|
1319
|
-
taskSize: incrementalGenerateTaskCache.size,
|
|
1320
|
-
entries: [...incrementalGenerateCache.entries()].map(([key, entry]) => ({
|
|
1321
|
-
...summarizeIncrementalCacheKey(key),
|
|
1322
|
-
candidates: entry.seenCandidates.size,
|
|
1323
|
-
classSet: entry.classSet.size,
|
|
1324
|
-
cssBytes: entry.css.length,
|
|
1325
|
-
rawCssBytes: entry.rawCss.length
|
|
1326
|
-
})),
|
|
1327
|
-
keys: [...incrementalGenerateCache.keys()].map(summarizeIncrementalCacheKey),
|
|
1328
|
-
taskKeys: [...incrementalGenerateTaskCache.keys()].map(summarizeIncrementalCacheKey)
|
|
1429
|
+
loadDesignSystem: validationEngine.loadDesignSystem,
|
|
1430
|
+
validateCandidates: validationEngine.validateCandidates,
|
|
1431
|
+
generate,
|
|
1432
|
+
dispose() {
|
|
1433
|
+
generationSessions.dispose();
|
|
1434
|
+
for (const cacheKey of incrementalCacheKeys) incrementalGenerateCache.delete(cacheKey);
|
|
1435
|
+
incrementalCacheKeys.clear();
|
|
1436
|
+
}
|
|
1329
1437
|
};
|
|
1330
1438
|
}
|
|
1331
1439
|
//#endregion
|
|
@@ -1754,39 +1862,320 @@ function resolveCssEntrySource(rawSource, base, options = {}) {
|
|
|
1754
1862
|
}
|
|
1755
1863
|
}
|
|
1756
1864
|
});
|
|
1757
|
-
if (!found) return;
|
|
1758
|
-
if (hasPreprocessorOnlySyntax(rawSource)) {
|
|
1759
|
-
const css = extractTailwindSourceForPostcssFallback(rawSource, {
|
|
1760
|
-
...options,
|
|
1761
|
-
removeConfig
|
|
1865
|
+
if (!found) return;
|
|
1866
|
+
if (hasPreprocessorOnlySyntax(rawSource)) {
|
|
1867
|
+
const css = extractTailwindSourceForPostcssFallback(rawSource, {
|
|
1868
|
+
...options,
|
|
1869
|
+
removeConfig
|
|
1870
|
+
});
|
|
1871
|
+
if (css) return {
|
|
1872
|
+
css,
|
|
1873
|
+
config,
|
|
1874
|
+
configRequest,
|
|
1875
|
+
base
|
|
1876
|
+
};
|
|
1877
|
+
}
|
|
1878
|
+
return {
|
|
1879
|
+
css: removedConfig || normalizedImports ? root.toString() : rawSource,
|
|
1880
|
+
config,
|
|
1881
|
+
configRequest,
|
|
1882
|
+
base
|
|
1883
|
+
};
|
|
1884
|
+
} catch {
|
|
1885
|
+
const css = extractTailwindSourceForPostcssFallback(rawSource, options);
|
|
1886
|
+
const configRequest = extractConfigRequestFromSource(rawSource);
|
|
1887
|
+
const config = configRequest ? resolveConfigPath(base, configRequest) : void 0;
|
|
1888
|
+
return css ? {
|
|
1889
|
+
css,
|
|
1890
|
+
config,
|
|
1891
|
+
configRequest,
|
|
1892
|
+
base
|
|
1893
|
+
} : void 0;
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
//#endregion
|
|
1897
|
+
//#region src/bundlers/shared/generator-css/scoped-rules.ts
|
|
1898
|
+
const VUE_SCOPED_SELECTOR_RE = /\.data-v-[\w-]+|\[data-v-[^\]]+\]/g;
|
|
1899
|
+
function normalizeGeneratedSelector$1(selector) {
|
|
1900
|
+
return selector.replace(/:not\(#\\#\)/g, "").trim();
|
|
1901
|
+
}
|
|
1902
|
+
function normalizeVueScopedSelector(selector) {
|
|
1903
|
+
let scoped = false;
|
|
1904
|
+
return {
|
|
1905
|
+
normalized: normalizeGeneratedSelector$1(selector).replace(VUE_SCOPED_SELECTOR_RE, () => {
|
|
1906
|
+
scoped = true;
|
|
1907
|
+
return "";
|
|
1908
|
+
}).trim(),
|
|
1909
|
+
scoped
|
|
1910
|
+
};
|
|
1911
|
+
}
|
|
1912
|
+
function normalizeCssComparableValue(value) {
|
|
1913
|
+
const normalizeUnquotedSegment = (segment) => segment.replace(/(^|[^\w.-])(-?)0+\.(\d+)/g, "$1$2.$3");
|
|
1914
|
+
let result = "";
|
|
1915
|
+
let segmentStart = 0;
|
|
1916
|
+
let index = 0;
|
|
1917
|
+
while (index < value.length) {
|
|
1918
|
+
const quote = value[index];
|
|
1919
|
+
if (quote !== "\"" && quote !== "'") {
|
|
1920
|
+
index++;
|
|
1921
|
+
continue;
|
|
1922
|
+
}
|
|
1923
|
+
result += normalizeUnquotedSegment(value.slice(segmentStart, index));
|
|
1924
|
+
const stringStart = index;
|
|
1925
|
+
index++;
|
|
1926
|
+
while (index < value.length) {
|
|
1927
|
+
if (value[index] === "\\") {
|
|
1928
|
+
index += 2;
|
|
1929
|
+
continue;
|
|
1930
|
+
}
|
|
1931
|
+
if (value[index] === quote) {
|
|
1932
|
+
index++;
|
|
1933
|
+
break;
|
|
1934
|
+
}
|
|
1935
|
+
index++;
|
|
1936
|
+
}
|
|
1937
|
+
result += value.slice(stringStart, index);
|
|
1938
|
+
segmentStart = index;
|
|
1939
|
+
}
|
|
1940
|
+
return result + normalizeUnquotedSegment(value.slice(segmentStart));
|
|
1941
|
+
}
|
|
1942
|
+
function createCssNodeSignature(node) {
|
|
1943
|
+
if (node.type === "decl") return JSON.stringify([
|
|
1944
|
+
"decl",
|
|
1945
|
+
node.prop,
|
|
1946
|
+
normalizeCssComparableValue(node.value),
|
|
1947
|
+
node.important
|
|
1948
|
+
]);
|
|
1949
|
+
if (node.type === "atrule") return JSON.stringify([
|
|
1950
|
+
"atrule",
|
|
1951
|
+
node.name,
|
|
1952
|
+
normalizeCssComparableValue(node.params),
|
|
1953
|
+
node.nodes?.map(createCssNodeSignature) ?? null
|
|
1954
|
+
]);
|
|
1955
|
+
if (node.type === "rule") return JSON.stringify([
|
|
1956
|
+
"rule",
|
|
1957
|
+
node.selector,
|
|
1958
|
+
node.nodes?.map(createCssNodeSignature) ?? null
|
|
1959
|
+
]);
|
|
1960
|
+
if (node.type === "comment") return JSON.stringify(["comment", node.text]);
|
|
1961
|
+
return node.toString();
|
|
1962
|
+
}
|
|
1963
|
+
function createRuleBodySignature(rule) {
|
|
1964
|
+
return JSON.stringify(rule.nodes?.map(createCssNodeSignature) ?? []);
|
|
1965
|
+
}
|
|
1966
|
+
function createRuleAtRuleContextSignature(rule) {
|
|
1967
|
+
const context = [];
|
|
1968
|
+
let parent = rule.parent;
|
|
1969
|
+
while (parent && parent.type !== "root" && parent.type !== "document") {
|
|
1970
|
+
if (parent.type === "atrule") context.unshift(JSON.stringify([parent.name, parent.params]));
|
|
1971
|
+
parent = parent.parent;
|
|
1972
|
+
}
|
|
1973
|
+
return JSON.stringify(context);
|
|
1974
|
+
}
|
|
1975
|
+
function createScopedRuleCoverageKey(rule, selector) {
|
|
1976
|
+
return JSON.stringify([
|
|
1977
|
+
createRuleAtRuleContextSignature(rule),
|
|
1978
|
+
createRuleBodySignature(rule),
|
|
1979
|
+
selector
|
|
1980
|
+
]);
|
|
1981
|
+
}
|
|
1982
|
+
function removeUnscopedRulesCoveredByScopedRules(root) {
|
|
1983
|
+
const scopedCoverage = /* @__PURE__ */ new Set();
|
|
1984
|
+
root.walkRules((rule) => {
|
|
1985
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
1986
|
+
const normalized = normalizeVueScopedSelector(selector);
|
|
1987
|
+
if (normalized.scoped && normalized.normalized) scopedCoverage.add(createScopedRuleCoverageKey(rule, normalized.normalized));
|
|
1988
|
+
}
|
|
1989
|
+
});
|
|
1990
|
+
if (scopedCoverage.size === 0) return;
|
|
1991
|
+
root.walkRules((rule) => {
|
|
1992
|
+
const normalizedSelectors = (rule.selectors ?? [rule.selector]).map(normalizeVueScopedSelector);
|
|
1993
|
+
if (normalizedSelectors.some((selector) => selector.scoped || !selector.normalized) || !normalizedSelectors.every((selector) => scopedCoverage.has(createScopedRuleCoverageKey(rule, selector.normalized)))) return;
|
|
1994
|
+
rule.remove();
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
function preferScopedGeneratedCssRules(css) {
|
|
1998
|
+
if (!css.includes("data-v-")) return css;
|
|
1999
|
+
try {
|
|
2000
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2001
|
+
removeUnscopedRulesCoveredByScopedRules(root);
|
|
2002
|
+
root.walkAtRules((rule) => {
|
|
2003
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) rule.remove();
|
|
2004
|
+
});
|
|
2005
|
+
return root.toString();
|
|
2006
|
+
} catch {
|
|
2007
|
+
return css;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
//#endregion
|
|
2011
|
+
//#region src/bundlers/shared/generator-css/user-css/user-layers.ts
|
|
2012
|
+
function splitUserCssLayerBlocks(source) {
|
|
2013
|
+
if (!source.includes("@layer")) return {
|
|
2014
|
+
layer: "",
|
|
2015
|
+
rest: source
|
|
2016
|
+
};
|
|
2017
|
+
try {
|
|
2018
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(source);
|
|
2019
|
+
const layerRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2020
|
+
const restRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2021
|
+
for (const node of root.nodes) (node.type === "atrule" && node.name === "layer" && node.nodes?.length ? layerRoot : restRoot).append(node.clone());
|
|
2022
|
+
return {
|
|
2023
|
+
layer: layerRoot.toString(),
|
|
2024
|
+
rest: restRoot.toString()
|
|
2025
|
+
};
|
|
2026
|
+
} catch {
|
|
2027
|
+
return {
|
|
2028
|
+
layer: source,
|
|
2029
|
+
rest: ""
|
|
2030
|
+
};
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
function hasUserCssLayerBlocks(source) {
|
|
2034
|
+
if (!source.includes("@layer")) return false;
|
|
2035
|
+
try {
|
|
2036
|
+
let hasLayerBlock = false;
|
|
2037
|
+
_weapp_tailwindcss_postcss.postcss.parse(source).walkAtRules("layer", (node) => {
|
|
2038
|
+
if (node.nodes?.length) hasLayerBlock = true;
|
|
2039
|
+
});
|
|
2040
|
+
return hasLayerBlock;
|
|
2041
|
+
} catch {
|
|
2042
|
+
return true;
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
function collectUserLayerSelectors(source) {
|
|
2046
|
+
const selectors = /* @__PURE__ */ new Set();
|
|
2047
|
+
try {
|
|
2048
|
+
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2049
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2050
|
+
const normalized = selector.trim();
|
|
2051
|
+
if (normalized) selectors.add(normalized);
|
|
2052
|
+
}
|
|
2053
|
+
});
|
|
2054
|
+
} catch {}
|
|
2055
|
+
return selectors;
|
|
2056
|
+
}
|
|
2057
|
+
function matchesUserLayerSelector(selector, userLayerSelector) {
|
|
2058
|
+
if (selector === userLayerSelector) return true;
|
|
2059
|
+
if (!selector.startsWith(userLayerSelector)) return false;
|
|
2060
|
+
const next = selector[userLayerSelector.length];
|
|
2061
|
+
return next === ":" || next === "[";
|
|
2062
|
+
}
|
|
2063
|
+
function extractGeneratedCssForUserLayerSelectors(css, userLayerSource) {
|
|
2064
|
+
const selectors = collectUserLayerSelectors(userLayerSource);
|
|
2065
|
+
if (selectors.size === 0) return {
|
|
2066
|
+
layer: "",
|
|
2067
|
+
rest: css
|
|
2068
|
+
};
|
|
2069
|
+
try {
|
|
2070
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2071
|
+
const layerRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2072
|
+
const selectorList = [...selectors];
|
|
2073
|
+
root.walkRules((rule) => {
|
|
2074
|
+
if ((rule.selectors ?? [rule.selector]).some((selector) => selectorList.some((userSelector) => matchesUserLayerSelector(selector.trim(), userSelector)))) {
|
|
2075
|
+
layerRoot.append(rule.clone());
|
|
2076
|
+
rule.remove();
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
return {
|
|
2080
|
+
layer: layerRoot.toString(),
|
|
2081
|
+
rest: root.toString()
|
|
2082
|
+
};
|
|
2083
|
+
} catch {
|
|
2084
|
+
return {
|
|
2085
|
+
layer: "",
|
|
2086
|
+
rest: css
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
function normalizeGeneratedSelector(selector) {
|
|
2091
|
+
return selector.replace(/:not\(#\\#\)/g, "").trim();
|
|
2092
|
+
}
|
|
2093
|
+
function collectApplyOnlySourceSelectors(source) {
|
|
2094
|
+
const selectors = /* @__PURE__ */ new Set();
|
|
2095
|
+
try {
|
|
2096
|
+
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2097
|
+
if (!rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) return;
|
|
2098
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2099
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
2100
|
+
if (normalized) selectors.add(normalized);
|
|
2101
|
+
}
|
|
2102
|
+
});
|
|
2103
|
+
} catch {}
|
|
2104
|
+
return selectors;
|
|
2105
|
+
}
|
|
2106
|
+
function hasOnlyApplyBackedSourceRules(source) {
|
|
2107
|
+
let hasApplyRule = false;
|
|
2108
|
+
let hasNonApplyRule = false;
|
|
2109
|
+
try {
|
|
2110
|
+
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2111
|
+
if (rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) hasApplyRule = true;
|
|
2112
|
+
else hasNonApplyRule = true;
|
|
2113
|
+
});
|
|
2114
|
+
} catch {
|
|
2115
|
+
return false;
|
|
2116
|
+
}
|
|
2117
|
+
return hasApplyRule && !hasNonApplyRule;
|
|
2118
|
+
}
|
|
2119
|
+
function removeCssComments(css) {
|
|
2120
|
+
return css.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
2121
|
+
}
|
|
2122
|
+
function isEmptyCustomVariantBlock(rule) {
|
|
2123
|
+
if (rule.name !== "custom-variant") return false;
|
|
2124
|
+
if (!/^[\w-]+$/.test(rule.params.trim())) return false;
|
|
2125
|
+
if (rule.nodes === void 0) return true;
|
|
2126
|
+
return rule.nodes.every((node) => node.type === "comment");
|
|
2127
|
+
}
|
|
2128
|
+
//#endregion
|
|
2129
|
+
//#region src/bundlers/shared/generator-css/user-css/apply-only.ts
|
|
2130
|
+
function normalizeEmptyTailwindCustomVariants(css) {
|
|
2131
|
+
if (!css.includes("@custom-variant")) return css;
|
|
2132
|
+
try {
|
|
2133
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2134
|
+
let changed = false;
|
|
2135
|
+
root.walkAtRules("custom-variant", (rule) => {
|
|
2136
|
+
if (!isEmptyCustomVariantBlock(rule)) return;
|
|
2137
|
+
rule.remove();
|
|
2138
|
+
changed = true;
|
|
2139
|
+
});
|
|
2140
|
+
return changed ? root.toString() : css;
|
|
2141
|
+
} catch {
|
|
2142
|
+
return css;
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
function filterApplyOnlyGeneratedCss(css, source, options = {}) {
|
|
2146
|
+
const selectors = collectApplyOnlySourceSelectors(source);
|
|
2147
|
+
if (selectors.size === 0) return css;
|
|
2148
|
+
const selectorList = [...selectors];
|
|
2149
|
+
const preserveVariables = options.preserveVariables !== false;
|
|
2150
|
+
try {
|
|
2151
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2152
|
+
root.walkRules((rule) => {
|
|
2153
|
+
const isApplySelector = (rule.selectors ?? [rule.selector]).some((selector) => {
|
|
2154
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
2155
|
+
return selectorList.some((sourceSelector) => {
|
|
2156
|
+
if (normalized === sourceSelector) return true;
|
|
2157
|
+
if (!normalized.startsWith(sourceSelector)) return false;
|
|
2158
|
+
const next = normalized[sourceSelector.length];
|
|
2159
|
+
return next === ":" || next === "[" || next === ".";
|
|
2160
|
+
});
|
|
1762
2161
|
});
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
return
|
|
1771
|
-
css: removedConfig || normalizedImports ? root.toString() : rawSource,
|
|
1772
|
-
config,
|
|
1773
|
-
configRequest,
|
|
1774
|
-
base
|
|
1775
|
-
};
|
|
2162
|
+
const isVariableRule = rule.nodes?.some((node) => node.type === "decl" && node.prop.startsWith("--"));
|
|
2163
|
+
if (!isApplySelector && (!preserveVariables || !isVariableRule)) rule.remove();
|
|
2164
|
+
});
|
|
2165
|
+
root.walkAtRules((rule) => {
|
|
2166
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) rule.remove();
|
|
2167
|
+
});
|
|
2168
|
+
const filteredCss = root.toString();
|
|
2169
|
+
return removeCssComments(options.preferScopedRules ? preferScopedGeneratedCssRules(filteredCss) : filteredCss).trim();
|
|
1776
2170
|
} catch {
|
|
1777
|
-
|
|
1778
|
-
const configRequest = extractConfigRequestFromSource(rawSource);
|
|
1779
|
-
const config = configRequest ? resolveConfigPath(base, configRequest) : void 0;
|
|
1780
|
-
return css ? {
|
|
1781
|
-
css,
|
|
1782
|
-
config,
|
|
1783
|
-
configRequest,
|
|
1784
|
-
base
|
|
1785
|
-
} : void 0;
|
|
2171
|
+
return css;
|
|
1786
2172
|
}
|
|
1787
2173
|
}
|
|
2174
|
+
function shouldFilterApplyOnlyGeneratedCss(_majorVersion, target, source, options) {
|
|
2175
|
+
return (target === "weapp" || target === "web") && hasTailwindApplyDirective(source) && !hasTailwindRootDirectives(source) && !options.hasGeneratedCss && !options.hasGeneratedMarkers && collectApplyOnlySourceSelectors(source).size > 0 && hasOnlyApplyBackedSourceRules(source);
|
|
2176
|
+
}
|
|
1788
2177
|
//#endregion
|
|
1789
|
-
//#region src/bundlers/shared/generator-css/user-css.ts
|
|
2178
|
+
//#region src/bundlers/shared/generator-css/user-css/generated-cleanup.ts
|
|
1790
2179
|
const TAILWIND_V4_GENERATOR_AT_RULES = /* @__PURE__ */ new Set([
|
|
1791
2180
|
"config",
|
|
1792
2181
|
"custom-variant",
|
|
@@ -1890,6 +2279,8 @@ function removeTailwindV4GeneratedUserCssArtifacts(source) {
|
|
|
1890
2279
|
return source;
|
|
1891
2280
|
}
|
|
1892
2281
|
}
|
|
2282
|
+
//#endregion
|
|
2283
|
+
//#region src/bundlers/shared/generator-css/user-css/at-rules.ts
|
|
1893
2284
|
function removeTailwindSourceMediaBlocks(source) {
|
|
1894
2285
|
let next = source;
|
|
1895
2286
|
let changed = false;
|
|
@@ -2046,6 +2437,8 @@ function removeTailwindApplyAtRules(source) {
|
|
|
2046
2437
|
return source;
|
|
2047
2438
|
}
|
|
2048
2439
|
}
|
|
2440
|
+
//#endregion
|
|
2441
|
+
//#region src/bundlers/shared/generator-css/user-css/source-fragments.ts
|
|
2049
2442
|
function removeTailwindV4GeneratorAtRules(source) {
|
|
2050
2443
|
try {
|
|
2051
2444
|
const root = _weapp_tailwindcss_postcss.postcss.parse(source);
|
|
@@ -2167,168 +2560,8 @@ function stripUnmatchedTailwindSourceMediaCloseFragments(source) {
|
|
|
2167
2560
|
return stripLeadingTailwindSourceMediaCloseFragment(source).replace(/\s*\}\s*$/, "");
|
|
2168
2561
|
}
|
|
2169
2562
|
}
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
layer: "",
|
|
2173
|
-
rest: source
|
|
2174
|
-
};
|
|
2175
|
-
try {
|
|
2176
|
-
const root = _weapp_tailwindcss_postcss.postcss.parse(source);
|
|
2177
|
-
const layerRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2178
|
-
const restRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2179
|
-
for (const node of root.nodes) (node.type === "atrule" && node.name === "layer" && node.nodes?.length ? layerRoot : restRoot).append(node.clone());
|
|
2180
|
-
return {
|
|
2181
|
-
layer: layerRoot.toString(),
|
|
2182
|
-
rest: restRoot.toString()
|
|
2183
|
-
};
|
|
2184
|
-
} catch {
|
|
2185
|
-
return {
|
|
2186
|
-
layer: source,
|
|
2187
|
-
rest: ""
|
|
2188
|
-
};
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
function hasUserCssLayerBlocks(source) {
|
|
2192
|
-
if (!source.includes("@layer")) return false;
|
|
2193
|
-
try {
|
|
2194
|
-
let hasLayerBlock = false;
|
|
2195
|
-
_weapp_tailwindcss_postcss.postcss.parse(source).walkAtRules("layer", (node) => {
|
|
2196
|
-
if (node.nodes?.length) hasLayerBlock = true;
|
|
2197
|
-
});
|
|
2198
|
-
return hasLayerBlock;
|
|
2199
|
-
} catch {
|
|
2200
|
-
return true;
|
|
2201
|
-
}
|
|
2202
|
-
}
|
|
2203
|
-
function collectUserLayerSelectors(source) {
|
|
2204
|
-
const selectors = /* @__PURE__ */ new Set();
|
|
2205
|
-
try {
|
|
2206
|
-
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2207
|
-
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2208
|
-
const normalized = selector.trim();
|
|
2209
|
-
if (normalized) selectors.add(normalized);
|
|
2210
|
-
}
|
|
2211
|
-
});
|
|
2212
|
-
} catch {}
|
|
2213
|
-
return selectors;
|
|
2214
|
-
}
|
|
2215
|
-
function matchesUserLayerSelector(selector, userLayerSelector) {
|
|
2216
|
-
if (selector === userLayerSelector) return true;
|
|
2217
|
-
if (!selector.startsWith(userLayerSelector)) return false;
|
|
2218
|
-
const next = selector[userLayerSelector.length];
|
|
2219
|
-
return next === ":" || next === "[";
|
|
2220
|
-
}
|
|
2221
|
-
function extractGeneratedCssForUserLayerSelectors(css, userLayerSource) {
|
|
2222
|
-
const selectors = collectUserLayerSelectors(userLayerSource);
|
|
2223
|
-
if (selectors.size === 0) return {
|
|
2224
|
-
layer: "",
|
|
2225
|
-
rest: css
|
|
2226
|
-
};
|
|
2227
|
-
try {
|
|
2228
|
-
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2229
|
-
const layerRoot = _weapp_tailwindcss_postcss.postcss.root();
|
|
2230
|
-
const selectorList = [...selectors];
|
|
2231
|
-
root.walkRules((rule) => {
|
|
2232
|
-
if ((rule.selectors ?? [rule.selector]).some((selector) => selectorList.some((userSelector) => matchesUserLayerSelector(selector.trim(), userSelector)))) {
|
|
2233
|
-
layerRoot.append(rule.clone());
|
|
2234
|
-
rule.remove();
|
|
2235
|
-
}
|
|
2236
|
-
});
|
|
2237
|
-
return {
|
|
2238
|
-
layer: layerRoot.toString(),
|
|
2239
|
-
rest: root.toString()
|
|
2240
|
-
};
|
|
2241
|
-
} catch {
|
|
2242
|
-
return {
|
|
2243
|
-
layer: "",
|
|
2244
|
-
rest: css
|
|
2245
|
-
};
|
|
2246
|
-
}
|
|
2247
|
-
}
|
|
2248
|
-
function normalizeGeneratedSelector(selector) {
|
|
2249
|
-
return selector.replace(/:not\(#\\#\)/g, "").trim();
|
|
2250
|
-
}
|
|
2251
|
-
function collectApplyOnlySourceSelectors(source) {
|
|
2252
|
-
const selectors = /* @__PURE__ */ new Set();
|
|
2253
|
-
try {
|
|
2254
|
-
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2255
|
-
if (!rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) return;
|
|
2256
|
-
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2257
|
-
const normalized = normalizeGeneratedSelector(selector);
|
|
2258
|
-
if (normalized) selectors.add(normalized);
|
|
2259
|
-
}
|
|
2260
|
-
});
|
|
2261
|
-
} catch {}
|
|
2262
|
-
return selectors;
|
|
2263
|
-
}
|
|
2264
|
-
function hasOnlyApplyBackedSourceRules(source) {
|
|
2265
|
-
let hasApplyRule = false;
|
|
2266
|
-
let hasNonApplyRule = false;
|
|
2267
|
-
try {
|
|
2268
|
-
_weapp_tailwindcss_postcss.postcss.parse(source).walkRules((rule) => {
|
|
2269
|
-
if (rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) hasApplyRule = true;
|
|
2270
|
-
else hasNonApplyRule = true;
|
|
2271
|
-
});
|
|
2272
|
-
} catch {
|
|
2273
|
-
return false;
|
|
2274
|
-
}
|
|
2275
|
-
return hasApplyRule && !hasNonApplyRule;
|
|
2276
|
-
}
|
|
2277
|
-
function removeCssComments(css) {
|
|
2278
|
-
return css.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
2279
|
-
}
|
|
2280
|
-
function isEmptyCustomVariantBlock(rule) {
|
|
2281
|
-
if (rule.name !== "custom-variant") return false;
|
|
2282
|
-
if (!/^[\w-]+$/.test(rule.params.trim())) return false;
|
|
2283
|
-
if (rule.nodes === void 0) return true;
|
|
2284
|
-
return rule.nodes.every((node) => node.type === "comment");
|
|
2285
|
-
}
|
|
2286
|
-
function normalizeEmptyTailwindCustomVariants(css) {
|
|
2287
|
-
if (!css.includes("@custom-variant")) return css;
|
|
2288
|
-
try {
|
|
2289
|
-
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2290
|
-
let changed = false;
|
|
2291
|
-
root.walkAtRules("custom-variant", (rule) => {
|
|
2292
|
-
if (!isEmptyCustomVariantBlock(rule)) return;
|
|
2293
|
-
rule.remove();
|
|
2294
|
-
changed = true;
|
|
2295
|
-
});
|
|
2296
|
-
return changed ? root.toString() : css;
|
|
2297
|
-
} catch {
|
|
2298
|
-
return css;
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
function filterApplyOnlyGeneratedCss(css, source, options = {}) {
|
|
2302
|
-
const selectors = collectApplyOnlySourceSelectors(source);
|
|
2303
|
-
if (selectors.size === 0) return css;
|
|
2304
|
-
const selectorList = [...selectors];
|
|
2305
|
-
const preserveVariables = options.preserveVariables !== false;
|
|
2306
|
-
try {
|
|
2307
|
-
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2308
|
-
root.walkRules((rule) => {
|
|
2309
|
-
const isApplySelector = (rule.selectors ?? [rule.selector]).some((selector) => {
|
|
2310
|
-
const normalized = normalizeGeneratedSelector(selector);
|
|
2311
|
-
return selectorList.some((sourceSelector) => {
|
|
2312
|
-
if (normalized === sourceSelector) return true;
|
|
2313
|
-
if (!normalized.startsWith(sourceSelector)) return false;
|
|
2314
|
-
const next = normalized[sourceSelector.length];
|
|
2315
|
-
return next === ":" || next === "[" || next === ".";
|
|
2316
|
-
});
|
|
2317
|
-
});
|
|
2318
|
-
const isVariableRule = rule.nodes?.some((node) => node.type === "decl" && node.prop.startsWith("--"));
|
|
2319
|
-
if (!isApplySelector && (!preserveVariables || !isVariableRule)) rule.remove();
|
|
2320
|
-
});
|
|
2321
|
-
root.walkAtRules((rule) => {
|
|
2322
|
-
if (rule.nodes !== void 0 && rule.nodes.length === 0) rule.remove();
|
|
2323
|
-
});
|
|
2324
|
-
return removeCssComments(root.toString()).trim();
|
|
2325
|
-
} catch {
|
|
2326
|
-
return css;
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
function shouldFilterApplyOnlyGeneratedCss(_majorVersion, target, source, options) {
|
|
2330
|
-
return (target === "weapp" || target === "web") && hasTailwindApplyDirective(source) && !hasTailwindRootDirectives(source) && !options.hasGeneratedCss && !options.hasGeneratedMarkers && collectApplyOnlySourceSelectors(source).size > 0 && hasOnlyApplyBackedSourceRules(source);
|
|
2331
|
-
}
|
|
2563
|
+
//#endregion
|
|
2564
|
+
//#region src/bundlers/shared/generator-css/user-css/transform.ts
|
|
2332
2565
|
async function transformGeneratorUserCss(source, options) {
|
|
2333
2566
|
if (source.trim().length === 0) return "";
|
|
2334
2567
|
if (options.processed) return stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(removeTailwindV4GeneratorAtRules(options.generatorTarget === "weapp" ? removeTailwindV4GeneratedUserCssArtifacts(unwrapMiniProgramCascadeLayers(removeProcessedMiniProgramUnsupportedCss(source, {
|
|
@@ -2569,6 +2802,23 @@ function upsertTailwindV4CssSource(opts, source) {
|
|
|
2569
2802
|
};
|
|
2570
2803
|
return true;
|
|
2571
2804
|
}
|
|
2805
|
+
function removeTailwindV4CssSource(opts, file) {
|
|
2806
|
+
const tailwindcss = opts.tailwindcss;
|
|
2807
|
+
const v4 = tailwindcss?.v4;
|
|
2808
|
+
const cssSources = v4?.cssSources;
|
|
2809
|
+
if (!cssSources || cssSources.length === 0) return false;
|
|
2810
|
+
const sourceFile = normalizeCssSourceFile(file);
|
|
2811
|
+
const nextCssSources = cssSources.filter((source) => normalizeCssSourceFile(source.file) !== sourceFile);
|
|
2812
|
+
if (nextCssSources.length === cssSources.length) return false;
|
|
2813
|
+
opts.tailwindcss = {
|
|
2814
|
+
...tailwindcss,
|
|
2815
|
+
v4: {
|
|
2816
|
+
...v4,
|
|
2817
|
+
cssSources: nextCssSources
|
|
2818
|
+
}
|
|
2819
|
+
};
|
|
2820
|
+
return true;
|
|
2821
|
+
}
|
|
2572
2822
|
//#endregion
|
|
2573
2823
|
//#region src/tailwindcss/v4-engine/source.ts
|
|
2574
2824
|
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
@@ -3214,6 +3464,12 @@ Object.defineProperty(exports, "parseImportRequest", {
|
|
|
3214
3464
|
return parseImportRequest;
|
|
3215
3465
|
}
|
|
3216
3466
|
});
|
|
3467
|
+
Object.defineProperty(exports, "preferScopedGeneratedCssRules", {
|
|
3468
|
+
enumerable: true,
|
|
3469
|
+
get: function() {
|
|
3470
|
+
return preferScopedGeneratedCssRules;
|
|
3471
|
+
}
|
|
3472
|
+
});
|
|
3217
3473
|
Object.defineProperty(exports, "prependConfigDirective", {
|
|
3218
3474
|
enumerable: true,
|
|
3219
3475
|
get: function() {
|
|
@@ -3232,6 +3488,12 @@ Object.defineProperty(exports, "removeTailwindSourceDirectives", {
|
|
|
3232
3488
|
return removeTailwindSourceDirectives;
|
|
3233
3489
|
}
|
|
3234
3490
|
});
|
|
3491
|
+
Object.defineProperty(exports, "removeTailwindV4CssSource", {
|
|
3492
|
+
enumerable: true,
|
|
3493
|
+
get: function() {
|
|
3494
|
+
return removeTailwindV4CssSource;
|
|
3495
|
+
}
|
|
3496
|
+
});
|
|
3235
3497
|
Object.defineProperty(exports, "removeTailwindV4GeneratedUserCssArtifacts", {
|
|
3236
3498
|
enumerable: true,
|
|
3237
3499
|
get: function() {
|