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
|
@@ -0,0 +1,555 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
2
|
+
const require_generator = require("./generator-C8D5cnbe.cjs");
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-D7MuR5ZF.cjs");
|
|
4
|
+
const require_wxml = require("./wxml-DSMNuUaP.cjs");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-Cs94gJgf.cjs");
|
|
6
|
+
let node_process = require("node:process");
|
|
7
|
+
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
8
|
+
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
9
|
+
let _weapp_core_escape = require("@weapp-core/escape");
|
|
10
|
+
//#region src/compiler/runtime-build-state.ts
|
|
11
|
+
function invertLinkedByEntry(linkedByEntry) {
|
|
12
|
+
const dependentsByLinkedFile = /* @__PURE__ */ new Map();
|
|
13
|
+
for (const [entryFile, linkedFiles] of linkedByEntry.entries()) for (const linkedFile of linkedFiles) {
|
|
14
|
+
let dependents = dependentsByLinkedFile.get(linkedFile);
|
|
15
|
+
if (!dependents) {
|
|
16
|
+
dependents = /* @__PURE__ */ new Set();
|
|
17
|
+
dependentsByLinkedFile.set(linkedFile, dependents);
|
|
18
|
+
}
|
|
19
|
+
dependents.add(entryFile);
|
|
20
|
+
}
|
|
21
|
+
return dependentsByLinkedFile;
|
|
22
|
+
}
|
|
23
|
+
function replaceMapEntries(target, source) {
|
|
24
|
+
target.clear();
|
|
25
|
+
for (const [key, value] of source) target.set(key, value);
|
|
26
|
+
return target;
|
|
27
|
+
}
|
|
28
|
+
function mergeMapEntries(target, source) {
|
|
29
|
+
for (const [key, value] of source) target.set(key, value);
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function createRuntimeCompilationBuildState() {
|
|
33
|
+
return {
|
|
34
|
+
iteration: 0,
|
|
35
|
+
sourceHashByFile: /* @__PURE__ */ new Map(),
|
|
36
|
+
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
37
|
+
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
38
|
+
linkedByEntry: /* @__PURE__ */ new Map(),
|
|
39
|
+
dependentsByLinkedFile: /* @__PURE__ */ new Map(),
|
|
40
|
+
bundleMarkupCandidatesByFile: /* @__PURE__ */ new Map(),
|
|
41
|
+
generatorCandidateSignature: void 0
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function updateRuntimeCompilationBuildState(state, snapshot, linkedByEntry, options = {}) {
|
|
45
|
+
const incremental = options.incremental === true;
|
|
46
|
+
removeRuntimeCompilationBuildStateFiles(state, snapshot.removedFiles);
|
|
47
|
+
state.iteration += 1;
|
|
48
|
+
state.sourceHashByFile = incremental ? mergeMapEntries(state.sourceHashByFile, snapshot.sourceHashByFile) : replaceMapEntries(state.sourceHashByFile, snapshot.sourceHashByFile);
|
|
49
|
+
state.runtimeAffectingSignatureByFile.clear();
|
|
50
|
+
state.runtimeAffectingHashByFile = incremental ? mergeMapEntries(state.runtimeAffectingHashByFile, snapshot.runtimeAffectingHashByFile) : replaceMapEntries(state.runtimeAffectingHashByFile, snapshot.runtimeAffectingHashByFile);
|
|
51
|
+
state.linkedByEntry = incremental ? mergeMapEntries(state.linkedByEntry, linkedByEntry) : replaceMapEntries(state.linkedByEntry, linkedByEntry);
|
|
52
|
+
state.dependentsByLinkedFile = invertLinkedByEntry(state.linkedByEntry);
|
|
53
|
+
}
|
|
54
|
+
function removeRuntimeCompilationBuildStateFiles(state, files) {
|
|
55
|
+
const removedFiles = new Set(files);
|
|
56
|
+
if (removedFiles.size === 0) return;
|
|
57
|
+
for (const file of removedFiles) {
|
|
58
|
+
state.sourceHashByFile.delete(file);
|
|
59
|
+
state.runtimeAffectingSignatureByFile.delete(file);
|
|
60
|
+
state.runtimeAffectingHashByFile.delete(file);
|
|
61
|
+
state.bundleMarkupCandidatesByFile.delete(file);
|
|
62
|
+
state.linkedByEntry.delete(file);
|
|
63
|
+
}
|
|
64
|
+
for (const linkedFiles of state.linkedByEntry.values()) for (const file of removedFiles) linkedFiles.delete(file);
|
|
65
|
+
state.dependentsByLinkedFile = invertLinkedByEntry(state.linkedByEntry);
|
|
66
|
+
}
|
|
67
|
+
function resetRuntimeCompilationBuildState(state) {
|
|
68
|
+
state.iteration = 0;
|
|
69
|
+
state.sourceHashByFile.clear();
|
|
70
|
+
state.runtimeAffectingSignatureByFile.clear();
|
|
71
|
+
state.runtimeAffectingHashByFile.clear();
|
|
72
|
+
state.linkedByEntry.clear();
|
|
73
|
+
state.dependentsByLinkedFile.clear();
|
|
74
|
+
state.bundleMarkupCandidatesByFile.clear();
|
|
75
|
+
state.generatorCandidateSignature = void 0;
|
|
76
|
+
}
|
|
77
|
+
function createRuntimeCompilationAffectingSignature(snapshot, computeHash) {
|
|
78
|
+
const entries = [...snapshot.runtimeAffectingHashByFile].sort(([first], [second]) => first.localeCompare(second)).map(([file, hash]) => `${file}:${hash}`);
|
|
79
|
+
return entries.length === 0 ? "runtime-affecting:0" : `runtime-affecting:1:${computeHash(entries.join("\n"))}`;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/compiler/runtime-snapshot.ts
|
|
83
|
+
function createChangedByType() {
|
|
84
|
+
return {
|
|
85
|
+
html: /* @__PURE__ */ new Set(),
|
|
86
|
+
js: /* @__PURE__ */ new Set(),
|
|
87
|
+
css: /* @__PURE__ */ new Set(),
|
|
88
|
+
other: /* @__PURE__ */ new Set()
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function createProcessFiles() {
|
|
92
|
+
return {
|
|
93
|
+
html: /* @__PURE__ */ new Set(),
|
|
94
|
+
js: /* @__PURE__ */ new Set(),
|
|
95
|
+
css: /* @__PURE__ */ new Set()
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function markProcessFile(type, file, processFiles) {
|
|
99
|
+
if (type === "html" || type === "js" || type === "css") processFiles[type].add(file);
|
|
100
|
+
}
|
|
101
|
+
function markFilesByEntryType(files, entriesByFile, target) {
|
|
102
|
+
for (const file of files ?? []) {
|
|
103
|
+
const entry = entriesByFile.get(file);
|
|
104
|
+
if (entry) target[entry.type].add(file);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function createRuntimeCompilationSnapshot(entries, options = {}) {
|
|
108
|
+
const changedByType = createChangedByType();
|
|
109
|
+
const runtimeAffectingChangedByType = createChangedByType();
|
|
110
|
+
const processFiles = createProcessFiles();
|
|
111
|
+
const entriesByFile = new Map(entries.map((entry) => [entry.file, entry]));
|
|
112
|
+
markFilesByEntryType(options.changedFiles, entriesByFile, changedByType);
|
|
113
|
+
markFilesByEntryType(options.runtimeAffectingChangedFiles, entriesByFile, runtimeAffectingChangedByType);
|
|
114
|
+
for (const file of options.processFiles ?? []) {
|
|
115
|
+
const entry = entriesByFile.get(file);
|
|
116
|
+
if (entry) markProcessFile(entry.type, file, processFiles);
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
entries,
|
|
120
|
+
sourceHashByFile: /* @__PURE__ */ new Map(),
|
|
121
|
+
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
122
|
+
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
123
|
+
hasOmittedKnownFiles: options.hasOmittedKnownFiles === true,
|
|
124
|
+
removedFiles: new Set([...options.removedFiles ?? []].filter((file) => !entriesByFile.has(file))),
|
|
125
|
+
changedByType,
|
|
126
|
+
runtimeAffectingChangedByType,
|
|
127
|
+
processFiles,
|
|
128
|
+
linkedImpactsByEntry: /* @__PURE__ */ new Map()
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function buildRuntimeCompilationSnapshot(entries, state, options) {
|
|
132
|
+
const snapshot = createRuntimeCompilationSnapshot(entries, {
|
|
133
|
+
hasOmittedKnownFiles: options.hasOmittedKnownFiles,
|
|
134
|
+
removedFiles: options.removedFiles
|
|
135
|
+
});
|
|
136
|
+
const firstRun = state.iteration === 0 && state.sourceHashByFile.size === 0;
|
|
137
|
+
for (const entry of entries) {
|
|
138
|
+
const { file, source, type } = entry;
|
|
139
|
+
const hash = options.computeHash(source);
|
|
140
|
+
snapshot.sourceHashByFile.set(file, hash);
|
|
141
|
+
const previousHash = state.sourceHashByFile.get(file);
|
|
142
|
+
const changed = previousHash == null || previousHash !== hash;
|
|
143
|
+
const previousRuntimeAffectingHash = state.runtimeAffectingHashByFile.get(file);
|
|
144
|
+
const runtimeAffectingHash = !changed && previousRuntimeAffectingHash != null ? previousRuntimeAffectingHash : (() => {
|
|
145
|
+
const signature = options.createRuntimeAffectingSignature(source, type);
|
|
146
|
+
snapshot.runtimeAffectingSignatureByFile.set(file, signature);
|
|
147
|
+
return options.computeHash(signature);
|
|
148
|
+
})();
|
|
149
|
+
snapshot.runtimeAffectingHashByFile.set(file, runtimeAffectingHash);
|
|
150
|
+
if (changed) snapshot.changedByType[type].add(file);
|
|
151
|
+
if (previousRuntimeAffectingHash == null || previousRuntimeAffectingHash !== runtimeAffectingHash) snapshot.runtimeAffectingChangedByType[type].add(file);
|
|
152
|
+
if (options.forceAll || firstRun) markProcessFile(type, file, snapshot.processFiles);
|
|
153
|
+
else if (type === "html") snapshot.processFiles.html.add(file);
|
|
154
|
+
else if (changed && (type === "js" || type === "css")) snapshot.processFiles[type].add(file);
|
|
155
|
+
}
|
|
156
|
+
if (!options.forceAll && !firstRun) for (const changedFile of snapshot.changedByType.js) {
|
|
157
|
+
const dependents = state.dependentsByLinkedFile.get(changedFile);
|
|
158
|
+
if (!dependents) continue;
|
|
159
|
+
for (const entryFile of dependents) {
|
|
160
|
+
snapshot.processFiles.js.add(entryFile);
|
|
161
|
+
let impacts = snapshot.linkedImpactsByEntry.get(entryFile);
|
|
162
|
+
if (!impacts) {
|
|
163
|
+
impacts = /* @__PURE__ */ new Set();
|
|
164
|
+
snapshot.linkedImpactsByEntry.set(entryFile, impacts);
|
|
165
|
+
}
|
|
166
|
+
impacts.add(changedFile);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return snapshot;
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/compiler/shadow-gate.ts
|
|
173
|
+
const COMPILER_SHADOW_GATE_ENV = "WEAPP_TAILWINDCSS_COMPILER_SHADOW_GATE";
|
|
174
|
+
function resolveCompilerShadowGateMode(env = node_process.default.env) {
|
|
175
|
+
const value = env[COMPILER_SHADOW_GATE_ENV]?.trim().toLowerCase();
|
|
176
|
+
return value === "report" || value === "error" ? value : "off";
|
|
177
|
+
}
|
|
178
|
+
function evaluateCompilerShadowGate(snapshot, mode = "off") {
|
|
179
|
+
const issues = [];
|
|
180
|
+
if (snapshot.summary.mismatched > 0) issues.push("semantic-mismatch");
|
|
181
|
+
if (snapshot.summary.truncated > 0) issues.push("truncated-report");
|
|
182
|
+
if (snapshot.summary.dropped > 0) issues.push("dropped-report");
|
|
183
|
+
return {
|
|
184
|
+
mode,
|
|
185
|
+
passed: issues.length === 0,
|
|
186
|
+
issues,
|
|
187
|
+
snapshot
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function emitCompilerShadowGateResult(payload) {
|
|
191
|
+
node_process.default.stdout.write(`[weapp-tailwindcss:compiler-shadow] ${JSON.stringify(payload)}\n`);
|
|
192
|
+
}
|
|
193
|
+
function finalizeCompilerShadowRun(owner, options = {}) {
|
|
194
|
+
const env = options.env ?? node_process.default.env;
|
|
195
|
+
if (require_v4_generation_core.resolveCompilerMode(env) !== "shadow") return;
|
|
196
|
+
const snapshot = require_v4_generation_core.completeCompilerShadowReportRun(owner, options.revision);
|
|
197
|
+
if (!snapshot) return;
|
|
198
|
+
const result = evaluateCompilerShadowGate(snapshot, resolveCompilerShadowGateMode(env));
|
|
199
|
+
if (result.mode !== "off") {
|
|
200
|
+
const payload = {
|
|
201
|
+
mode: result.mode,
|
|
202
|
+
passed: result.passed,
|
|
203
|
+
issues: result.issues,
|
|
204
|
+
revision: snapshot.revision,
|
|
205
|
+
summary: snapshot.summary
|
|
206
|
+
};
|
|
207
|
+
if (options.emit) options.emit(payload);
|
|
208
|
+
else emitCompilerShadowGateResult(payload);
|
|
209
|
+
}
|
|
210
|
+
if (result.mode === "error" && !result.passed) throw new Error(`weapp-tailwindcss shadow gate failed: ${result.issues.join(", ")}`);
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/bundlers/shared/runtime-class-set/entries.ts
|
|
215
|
+
const EXTENSION_DOT_PREFIX_RE = /^\./;
|
|
216
|
+
function createRuntimeEntries(snapshot) {
|
|
217
|
+
return snapshot.entries.filter((entry) => entry.runtimeCandidate !== false);
|
|
218
|
+
}
|
|
219
|
+
function collectChangedRuntimeFiles(snapshot) {
|
|
220
|
+
return /* @__PURE__ */ new Set([...snapshot.runtimeAffectingChangedByType.html, ...snapshot.runtimeAffectingChangedByType.js]);
|
|
221
|
+
}
|
|
222
|
+
function resolveEntryExtension(entry) {
|
|
223
|
+
if (entry.type === "html") return "html";
|
|
224
|
+
const ext = entry.file.split(/[?#]/, 1)[0]?.split(".").pop()?.replace(EXTENSION_DOT_PREFIX_RE, "") ?? "";
|
|
225
|
+
if (ext.length > 0) return ext;
|
|
226
|
+
return "js";
|
|
227
|
+
}
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/bundlers/shared/runtime-class-set.ts
|
|
230
|
+
const debug = require_wxml.createDebug("[runtime-set] ");
|
|
231
|
+
function createExtractOptions(context, source, bareArbitraryValues) {
|
|
232
|
+
return {
|
|
233
|
+
cwd: context.projectRoot,
|
|
234
|
+
base: context.base,
|
|
235
|
+
baseFallbacks: context.baseFallbacks,
|
|
236
|
+
css: context.css,
|
|
237
|
+
content: source,
|
|
238
|
+
extension: "html",
|
|
239
|
+
...bareArbitraryValues === void 0 ? {} : { bareArbitraryValues }
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function createCandidateValidationSource(candidates) {
|
|
243
|
+
return [...new Set(candidates)].sort().join("\n");
|
|
244
|
+
}
|
|
245
|
+
function removeCandidateSet(candidateCountByClass, candidates) {
|
|
246
|
+
for (const className of candidates) {
|
|
247
|
+
const count = candidateCountByClass.get(className);
|
|
248
|
+
if (count == null) continue;
|
|
249
|
+
if (count <= 1) {
|
|
250
|
+
candidateCountByClass.delete(className);
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
candidateCountByClass.set(className, count - 1);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function addCandidateSet(candidateCountByClass, candidates) {
|
|
257
|
+
for (const className of candidates) {
|
|
258
|
+
const nextCount = (candidateCountByClass.get(className) ?? 0) + 1;
|
|
259
|
+
candidateCountByClass.set(className, nextCount);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
function createRuntimeClassSet(baseClassSet, candidateCountByClass) {
|
|
263
|
+
return /* @__PURE__ */ new Set([...baseClassSet, ...candidateCountByClass.keys()]);
|
|
264
|
+
}
|
|
265
|
+
function createNonSourceBaseClassSet(baseClassSet, candidateCountByClass) {
|
|
266
|
+
const nextBaseClassSet = new Set(baseClassSet);
|
|
267
|
+
for (const candidate of candidateCountByClass.keys()) nextBaseClassSet.delete(candidate);
|
|
268
|
+
return nextBaseClassSet;
|
|
269
|
+
}
|
|
270
|
+
function createRuntimeClassSetManager(options = {}) {
|
|
271
|
+
const customExtractCandidates = options.extractCandidates;
|
|
272
|
+
const extractCandidates = customExtractCandidates ?? _tailwindcss_mangle_engine.extractValidCandidates;
|
|
273
|
+
const extractRawCandidates = options.extractRawCandidates ?? _tailwindcss_mangle_engine.extractRawCandidatesWithPositions;
|
|
274
|
+
const escapeMap = options.escapeMap ?? _weapp_core_escape.MappingChars2String;
|
|
275
|
+
const escapeFragments = require_v4_generation_core.createEscapeFragments(escapeMap);
|
|
276
|
+
let baseClassSet = /* @__PURE__ */ new Set();
|
|
277
|
+
const candidateCountByClass = /* @__PURE__ */ new Map();
|
|
278
|
+
const candidatesByFile = /* @__PURE__ */ new Map();
|
|
279
|
+
const candidateValidityCache = /* @__PURE__ */ new Map();
|
|
280
|
+
let runtimeSignature;
|
|
281
|
+
let validationContext;
|
|
282
|
+
let designSystemPromise;
|
|
283
|
+
async function reset() {
|
|
284
|
+
baseClassSet = /* @__PURE__ */ new Set();
|
|
285
|
+
candidateCountByClass.clear();
|
|
286
|
+
candidatesByFile.clear();
|
|
287
|
+
candidateValidityCache.clear();
|
|
288
|
+
runtimeSignature = void 0;
|
|
289
|
+
validationContext = void 0;
|
|
290
|
+
designSystemPromise = void 0;
|
|
291
|
+
}
|
|
292
|
+
async function resolveValidationContextCached(runtime) {
|
|
293
|
+
if (!validationContext) validationContext = await require_generator.resolveTailwindV4SourceFromRuntime(runtime);
|
|
294
|
+
return validationContext;
|
|
295
|
+
}
|
|
296
|
+
async function loadDesignSystem(context) {
|
|
297
|
+
if (!designSystemPromise) designSystemPromise = (0, _tailwindcss_mangle_engine.loadTailwindV4DesignSystem)(context);
|
|
298
|
+
return designSystemPromise;
|
|
299
|
+
}
|
|
300
|
+
function populateCandidateValidityCacheFromDesignSystem(designSystem, unknownCandidates) {
|
|
301
|
+
const validCandidates = (0, _tailwindcss_mangle_engine.resolveValidTailwindV4Candidates)(designSystem, unknownCandidates, { ...options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: options.bareArbitraryValues } });
|
|
302
|
+
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
303
|
+
}
|
|
304
|
+
async function validateUnknownCandidates(runtime, unknownCandidates) {
|
|
305
|
+
if (unknownCandidates.size === 0) return;
|
|
306
|
+
const context = await resolveValidationContextCached(runtime);
|
|
307
|
+
if (!customExtractCandidates) try {
|
|
308
|
+
populateCandidateValidityCacheFromDesignSystem(await loadDesignSystem(context), unknownCandidates);
|
|
309
|
+
return;
|
|
310
|
+
} catch (error) {
|
|
311
|
+
debug("incremental design-system validation failed: %O", error);
|
|
312
|
+
designSystemPromise = void 0;
|
|
313
|
+
throw error;
|
|
314
|
+
}
|
|
315
|
+
const source = createCandidateValidationSource(unknownCandidates);
|
|
316
|
+
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source, options.bareArbitraryValues)));
|
|
317
|
+
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
318
|
+
}
|
|
319
|
+
async function extractEntryRawCandidates(entry, _runtime, _knownSourceCandidates) {
|
|
320
|
+
const extension = resolveEntryExtension(entry);
|
|
321
|
+
const matches = options.bareArbitraryValues === void 0 || options.bareArbitraryValues === false ? await extractRawCandidates(entry.source, extension) : await extractRawCandidates(entry.source, extension, { bareArbitraryValues: options.bareArbitraryValues });
|
|
322
|
+
const candidates = /* @__PURE__ */ new Set();
|
|
323
|
+
for (const match of matches) {
|
|
324
|
+
const candidate = match?.rawCandidate;
|
|
325
|
+
if (typeof candidate === "string" && candidate.length > 0) candidates.add(candidate);
|
|
326
|
+
}
|
|
327
|
+
for (const candidate of require_v4_generation_core.collectEscapedRuntimeCandidates(entry.source, escapeMap, escapeFragments)) candidates.add(candidate);
|
|
328
|
+
return candidates;
|
|
329
|
+
}
|
|
330
|
+
async function sync(runtime, snapshot, options = {}) {
|
|
331
|
+
const nextSignature = require_tailwindcss.getRuntimeClassSetSignature(runtime) ?? "runtime:missing";
|
|
332
|
+
const runtimeEntries = createRuntimeEntries(snapshot);
|
|
333
|
+
const runtimeEntriesByFile = new Map(runtimeEntries.map((entry) => [entry.file, entry]));
|
|
334
|
+
const currentRuntimeFiles = new Set(runtimeEntriesByFile.keys());
|
|
335
|
+
const hadTrackedRuntimeFiles = candidatesByFile.size > 0;
|
|
336
|
+
const fullRebuild = runtimeSignature !== nextSignature || candidatesByFile.size === 0;
|
|
337
|
+
if (runtimeSignature !== nextSignature) {
|
|
338
|
+
debug("runtime signature changed, reset incremental runtime set: %s", nextSignature);
|
|
339
|
+
await reset();
|
|
340
|
+
}
|
|
341
|
+
runtimeSignature = nextSignature;
|
|
342
|
+
const nextBaseClassSet = options.baseClassSet;
|
|
343
|
+
const canUseBaseWithoutInitialFullScan = Boolean(fullRebuild && !hadTrackedRuntimeFiles && options.skipInitialFullScanWithBase === true && nextBaseClassSet && nextBaseClassSet.size > 0);
|
|
344
|
+
for (const [file, previousCandidates] of candidatesByFile) {
|
|
345
|
+
if (!snapshot.removedFiles.has(file) && (currentRuntimeFiles.has(file) || snapshot.hasOmittedKnownFiles)) continue;
|
|
346
|
+
removeCandidateSet(candidateCountByClass, previousCandidates);
|
|
347
|
+
candidatesByFile.delete(file);
|
|
348
|
+
}
|
|
349
|
+
const changedRuntimeFiles = canUseBaseWithoutInitialFullScan ? [...collectChangedRuntimeFiles(snapshot)] : fullRebuild ? [...runtimeEntriesByFile.keys()] : [...collectChangedRuntimeFiles(snapshot)];
|
|
350
|
+
if (changedRuntimeFiles.length === 0) {
|
|
351
|
+
if (nextBaseClassSet) baseClassSet = canUseBaseWithoutInitialFullScan ? new Set(nextBaseClassSet) : createNonSourceBaseClassSet(nextBaseClassSet, candidateCountByClass);
|
|
352
|
+
return createRuntimeClassSet(baseClassSet, candidateCountByClass);
|
|
353
|
+
}
|
|
354
|
+
const rawCandidatesByFile = /* @__PURE__ */ new Map();
|
|
355
|
+
const unknownCandidates = /* @__PURE__ */ new Set();
|
|
356
|
+
for (const file of changedRuntimeFiles) {
|
|
357
|
+
const entry = runtimeEntriesByFile.get(file);
|
|
358
|
+
if (!entry) continue;
|
|
359
|
+
const candidates = await extractEntryRawCandidates(entry, runtime, nextBaseClassSet);
|
|
360
|
+
rawCandidatesByFile.set(file, candidates);
|
|
361
|
+
for (const candidate of candidates) if (!candidateValidityCache.has(candidate)) unknownCandidates.add(candidate);
|
|
362
|
+
}
|
|
363
|
+
await validateUnknownCandidates(runtime, unknownCandidates);
|
|
364
|
+
let rawCandidateCount = 0;
|
|
365
|
+
for (const file of changedRuntimeFiles) {
|
|
366
|
+
const nextRawCandidates = rawCandidatesByFile.get(file);
|
|
367
|
+
const previousCandidates = candidatesByFile.get(file);
|
|
368
|
+
if (previousCandidates) removeCandidateSet(candidateCountByClass, previousCandidates);
|
|
369
|
+
if (!nextRawCandidates || nextRawCandidates.size === 0) {
|
|
370
|
+
candidatesByFile.delete(file);
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
rawCandidateCount += nextRawCandidates.size;
|
|
374
|
+
const nextCandidates = new Set([...nextRawCandidates].filter((candidate) => candidateValidityCache.get(candidate) === true));
|
|
375
|
+
if (nextCandidates.size === 0) {
|
|
376
|
+
candidatesByFile.delete(file);
|
|
377
|
+
continue;
|
|
378
|
+
}
|
|
379
|
+
addCandidateSet(candidateCountByClass, nextCandidates);
|
|
380
|
+
candidatesByFile.set(file, nextCandidates);
|
|
381
|
+
}
|
|
382
|
+
if (nextBaseClassSet) baseClassSet = canUseBaseWithoutInitialFullScan ? new Set(nextBaseClassSet) : createNonSourceBaseClassSet(nextBaseClassSet, candidateCountByClass);
|
|
383
|
+
const runtimeSet = createRuntimeClassSet(baseClassSet, candidateCountByClass);
|
|
384
|
+
debug("incremental runtime set synced, changedFiles=%d rawCandidates=%d validateMisses=%d runtimeSize=%d trackedFiles=%d", changedRuntimeFiles.length, rawCandidateCount, unknownCandidates.size, runtimeSet.size, candidatesByFile.size);
|
|
385
|
+
return new Set(runtimeSet);
|
|
386
|
+
}
|
|
387
|
+
return {
|
|
388
|
+
sync,
|
|
389
|
+
reset
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/bundlers/shared/cache.ts
|
|
394
|
+
async function processCachedTask({ cache, cacheKey, hashKey = cacheKey, rawSource, hash, readCache, applyResult, transform, onCacheHit }) {
|
|
395
|
+
let cacheHit = false;
|
|
396
|
+
const result = await cache.process({
|
|
397
|
+
key: cacheKey,
|
|
398
|
+
hashKey,
|
|
399
|
+
rawSource,
|
|
400
|
+
hash,
|
|
401
|
+
resolveCache: readCache,
|
|
402
|
+
async onCacheHit(value) {
|
|
403
|
+
cacheHit = true;
|
|
404
|
+
await applyResult(value, { cacheHit: true });
|
|
405
|
+
onCacheHit?.();
|
|
406
|
+
},
|
|
407
|
+
transform
|
|
408
|
+
});
|
|
409
|
+
if (!cacheHit) await applyResult(result, { cacheHit: false });
|
|
410
|
+
}
|
|
411
|
+
//#endregion
|
|
412
|
+
//#region src/bundlers/shared/hmr-timing.ts
|
|
413
|
+
function shouldEmitHmrTiming() {
|
|
414
|
+
return node_process.default.env["WEAPP_TW_WATCH_REGRESSION"] === "1" || node_process.default.env["WEAPP_TW_HMR_TIMING"] === "1";
|
|
415
|
+
}
|
|
416
|
+
function shouldEmitHumanReadableTiming() {
|
|
417
|
+
return node_process.default.env["WEAPP_TW_HMR_TIMING"] === "1" && node_process.default.env["WEAPP_TW_HMR_TIMING_LOG"] !== "0";
|
|
418
|
+
}
|
|
419
|
+
function emitHmrTiming(bundler, phase, durationMs, details = {}) {
|
|
420
|
+
if (!shouldEmitHmrTiming()) return;
|
|
421
|
+
const serializableDetails = { ...details };
|
|
422
|
+
delete serializableDetails.emit;
|
|
423
|
+
const payload = {
|
|
424
|
+
bundler,
|
|
425
|
+
phase,
|
|
426
|
+
durationMs: Math.max(0, Math.round(durationMs)),
|
|
427
|
+
...serializableDetails,
|
|
428
|
+
...typeof details.wallMs === "number" ? { wallMs: Math.max(0, Math.round(details.wallMs)) } : {}
|
|
429
|
+
};
|
|
430
|
+
node_process.default.stdout.write(`[weapp-tailwindcss:hmr] ${JSON.stringify(payload)}\n`);
|
|
431
|
+
if (shouldEmitHumanReadableTiming()) {
|
|
432
|
+
const fileSuffix = details.file ? ` file=${details.file}` : "";
|
|
433
|
+
if (details.metric === "total") {
|
|
434
|
+
const hooks = details.hooks ? Object.entries(details.hooks).map(([hook, summary]) => `${hook}=${Math.max(0, Math.round(summary.durationMs))}ms/${summary.count}`).join(", ") : "";
|
|
435
|
+
const hookSuffix = hooks ? ` (${hooks})` : "";
|
|
436
|
+
const wallSuffix = typeof payload.wallMs === "number" ? ` wall=${payload.wallMs}ms` : "";
|
|
437
|
+
node_process.default.stdout.write(`[weapp-tailwindcss] ${bundler}:weapp-tailwindcss 总耗时 ${payload.durationMs}ms${wallSuffix}${hookSuffix}\n`);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
node_process.default.stdout.write(`[weapp-tailwindcss] ${bundler}:${phase} 耗时 ${payload.durationMs}ms${fileSuffix}\n`);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function createHmrTimingRecorder(bundler) {
|
|
444
|
+
const session = {
|
|
445
|
+
hooks: {},
|
|
446
|
+
totalMs: 0
|
|
447
|
+
};
|
|
448
|
+
const record = (phase, durationMs, details = {}) => {
|
|
449
|
+
const roundedDuration = Math.max(0, Math.round(durationMs));
|
|
450
|
+
if (session.startedAt === void 0) session.startedAt = performance.now() - Math.max(0, durationMs);
|
|
451
|
+
session.totalMs += Math.max(0, durationMs);
|
|
452
|
+
const current = session.hooks[phase] ?? {
|
|
453
|
+
count: 0,
|
|
454
|
+
durationMs: 0,
|
|
455
|
+
maxMs: 0
|
|
456
|
+
};
|
|
457
|
+
current.count += 1;
|
|
458
|
+
current.durationMs += roundedDuration;
|
|
459
|
+
current.maxMs = Math.max(current.maxMs, roundedDuration);
|
|
460
|
+
session.hooks[phase] = current;
|
|
461
|
+
if (details.emit !== false) emitHmrTiming(bundler, phase, durationMs, details);
|
|
462
|
+
};
|
|
463
|
+
const measure = async (phase, task, details = {}) => {
|
|
464
|
+
const startedAt = performance.now();
|
|
465
|
+
try {
|
|
466
|
+
return await task();
|
|
467
|
+
} finally {
|
|
468
|
+
record(phase, performance.now() - startedAt, details);
|
|
469
|
+
}
|
|
470
|
+
};
|
|
471
|
+
const emitTotal = (phase = "total") => {
|
|
472
|
+
if (session.totalMs <= 0) return;
|
|
473
|
+
const wallMs = session.startedAt === void 0 ? session.totalMs : performance.now() - session.startedAt;
|
|
474
|
+
emitHmrTiming(bundler, phase, session.totalMs, {
|
|
475
|
+
hooks: session.hooks,
|
|
476
|
+
metric: "total",
|
|
477
|
+
wallMs
|
|
478
|
+
});
|
|
479
|
+
session.hooks = {};
|
|
480
|
+
delete session.startedAt;
|
|
481
|
+
session.totalMs = 0;
|
|
482
|
+
};
|
|
483
|
+
return {
|
|
484
|
+
emitTotal,
|
|
485
|
+
measure,
|
|
486
|
+
record
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
//#endregion
|
|
490
|
+
Object.defineProperty(exports, "buildRuntimeCompilationSnapshot", {
|
|
491
|
+
enumerable: true,
|
|
492
|
+
get: function() {
|
|
493
|
+
return buildRuntimeCompilationSnapshot;
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
Object.defineProperty(exports, "createHmrTimingRecorder", {
|
|
497
|
+
enumerable: true,
|
|
498
|
+
get: function() {
|
|
499
|
+
return createHmrTimingRecorder;
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
Object.defineProperty(exports, "createRuntimeClassSetManager", {
|
|
503
|
+
enumerable: true,
|
|
504
|
+
get: function() {
|
|
505
|
+
return createRuntimeClassSetManager;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
Object.defineProperty(exports, "createRuntimeCompilationAffectingSignature", {
|
|
509
|
+
enumerable: true,
|
|
510
|
+
get: function() {
|
|
511
|
+
return createRuntimeCompilationAffectingSignature;
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
Object.defineProperty(exports, "createRuntimeCompilationBuildState", {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
get: function() {
|
|
517
|
+
return createRuntimeCompilationBuildState;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
Object.defineProperty(exports, "emitHmrTiming", {
|
|
521
|
+
enumerable: true,
|
|
522
|
+
get: function() {
|
|
523
|
+
return emitHmrTiming;
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
Object.defineProperty(exports, "finalizeCompilerShadowRun", {
|
|
527
|
+
enumerable: true,
|
|
528
|
+
get: function() {
|
|
529
|
+
return finalizeCompilerShadowRun;
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
Object.defineProperty(exports, "processCachedTask", {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: function() {
|
|
535
|
+
return processCachedTask;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
Object.defineProperty(exports, "removeRuntimeCompilationBuildStateFiles", {
|
|
539
|
+
enumerable: true,
|
|
540
|
+
get: function() {
|
|
541
|
+
return removeRuntimeCompilationBuildStateFiles;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
Object.defineProperty(exports, "resetRuntimeCompilationBuildState", {
|
|
545
|
+
enumerable: true,
|
|
546
|
+
get: function() {
|
|
547
|
+
return resetRuntimeCompilationBuildState;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
Object.defineProperty(exports, "updateRuntimeCompilationBuildState", {
|
|
551
|
+
enumerable: true,
|
|
552
|
+
get: function() {
|
|
553
|
+
return updateRuntimeCompilationBuildState;
|
|
554
|
+
}
|
|
555
|
+
});
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_framework = require("./framework.cjs");
|
|
3
|
+
const require_generator = require("./generator-C8D5cnbe.cjs");
|
|
4
|
+
const require_gulp = require("./gulp-Cjcss8T_.cjs");
|
|
5
|
+
const require_postcss = require("./postcss.cjs");
|
|
6
|
+
const require_vite = require("./vite-CBzmUTu-.cjs");
|
|
7
|
+
const require_webpack = require("./webpack-Dao6bWEj.cjs");
|
|
8
|
+
require("./webpack.cjs");
|
|
9
|
+
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
10
|
+
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
11
|
+
exports.createPlugins = require_gulp.createPlugins;
|
|
12
|
+
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
13
|
+
exports.detectAppType = require_framework.detectAppType;
|
|
14
|
+
exports.detectAppTypeFromEnv = require_framework.detectAppTypeFromEnv;
|
|
15
|
+
exports.detectAppTypeFromPackageJson = require_framework.detectAppTypeFromPackageJson;
|
|
16
|
+
exports.isMpxPackage = require_framework.isMpxPackage;
|
|
17
|
+
exports.isRunningInHBuilderX = require_framework.isRunningInHBuilderX;
|
|
18
|
+
exports.isTaroPackage = require_framework.isTaroPackage;
|
|
19
|
+
exports.isUniAppPackage = require_framework.isUniAppPackage;
|
|
20
|
+
exports.isUniAppVitePackage = require_framework.isUniAppVitePackage;
|
|
21
|
+
exports.isUniAppXManifest = require_framework.isUniAppXManifest;
|
|
22
|
+
exports.isUniAppXPackage = require_framework.isUniAppXPackage;
|
|
23
|
+
exports.isWeappVitePackage = require_framework.isWeappVitePackage;
|
|
24
|
+
exports.resolveImplicitAppTypeFromViteRoot = require_framework.resolveImplicitAppTypeFromViteRoot;
|
|
25
|
+
exports.resolveMpxPlatform = require_framework.resolveMpxPlatform;
|
|
26
|
+
exports.resolvePlatform = require_framework.resolvePlatform;
|
|
27
|
+
exports.resolveTaroPlatform = require_framework.resolveTaroPlatform;
|
|
28
|
+
exports.resolveUniAppXPlatform = require_framework.resolveUniAppXPlatform;
|
|
29
|
+
exports.resolveUniPlatform = require_framework.resolveUniPlatform;
|
|
30
|
+
exports.resolveUniPlatformsFromEnv = require_framework.resolveUniPlatformsFromEnv;
|
|
31
|
+
exports.resolveUniUtsPlatform = require_framework.resolveUniUtsPlatform;
|
|
32
|
+
Object.defineProperty(exports, "unitConversionComposeRules", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function() {
|
|
35
|
+
return _weapp_tailwindcss_postcss.unitConversionComposeRules;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "unitConversionPresets", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function() {
|
|
41
|
+
return _weapp_tailwindcss_postcss.unitConversionPresets;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
|
45
|
+
exports.weappTailwindcssPostcssPlugin = require_postcss.default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './framework';
|
|
2
|
-
export { createWeappTailwindcssGenerator } from './generator';
|
|
3
|
-
export type * from './generator';
|
|
4
|
-
export { createPlugins } from './gulp';
|
|
5
|
-
export { weappTailwindcssPostcssPlugin } from './postcss';
|
|
6
|
-
export type { WeappTailwindcssPostcssPluginOptions } from './postcss';
|
|
7
|
-
export type * from './types';
|
|
8
|
-
export { WeappTailwindcss } from './vite';
|
|
9
|
-
export { weappTailwindcssPackageDir } from './webpack';
|
|
1
|
+
export * from './framework/index.js';
|
|
2
|
+
export { createWeappTailwindcssGenerator } from './generator/index.js';
|
|
3
|
+
export type * from './generator/index.js';
|
|
4
|
+
export { createPlugins } from './gulp.js';
|
|
5
|
+
export { weappTailwindcssPostcssPlugin } from './postcss.js';
|
|
6
|
+
export type { WeappTailwindcssPostcssPluginOptions } from './postcss.js';
|
|
7
|
+
export type * from './types/index.js';
|
|
8
|
+
export { WeappTailwindcss } from './vite.js';
|
|
9
|
+
export { weappTailwindcssPackageDir } from './webpack.js';
|
|
10
10
|
export { unitConversionComposeRules, unitConversionPresets, } from '@weapp-tailwindcss/postcss';
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
11
|
-
exports.createPlugins = require_gulp.createPlugins;
|
|
12
|
-
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
13
|
-
exports.detectAppType = require_framework.detectAppType;
|
|
14
|
-
exports.detectAppTypeFromEnv = require_framework.detectAppTypeFromEnv;
|
|
15
|
-
exports.detectAppTypeFromPackageJson = require_framework.detectAppTypeFromPackageJson;
|
|
16
|
-
exports.isMpxPackage = require_framework.isMpxPackage;
|
|
17
|
-
exports.isRunningInHBuilderX = require_framework.isRunningInHBuilderX;
|
|
18
|
-
exports.isTaroPackage = require_framework.isTaroPackage;
|
|
19
|
-
exports.isUniAppPackage = require_framework.isUniAppPackage;
|
|
20
|
-
exports.isUniAppVitePackage = require_framework.isUniAppVitePackage;
|
|
21
|
-
exports.isUniAppXManifest = require_framework.isUniAppXManifest;
|
|
22
|
-
exports.isUniAppXPackage = require_framework.isUniAppXPackage;
|
|
23
|
-
exports.isWeappVitePackage = require_framework.isWeappVitePackage;
|
|
24
|
-
exports.resolveImplicitAppTypeFromViteRoot = require_framework.resolveImplicitAppTypeFromViteRoot;
|
|
25
|
-
exports.resolveMpxPlatform = require_framework.resolveMpxPlatform;
|
|
26
|
-
exports.resolvePlatform = require_framework.resolvePlatform;
|
|
27
|
-
exports.resolveTaroPlatform = require_framework.resolveTaroPlatform;
|
|
28
|
-
exports.resolveUniAppXPlatform = require_framework.resolveUniAppXPlatform;
|
|
29
|
-
exports.resolveUniPlatform = require_framework.resolveUniPlatform;
|
|
30
|
-
exports.resolveUniPlatformsFromEnv = require_framework.resolveUniPlatformsFromEnv;
|
|
31
|
-
exports.resolveUniUtsPlatform = require_framework.resolveUniUtsPlatform;
|
|
32
|
-
Object.defineProperty(exports, "unitConversionComposeRules", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function() {
|
|
35
|
-
return _weapp_tailwindcss_postcss.unitConversionComposeRules;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(exports, "unitConversionPresets", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function() {
|
|
41
|
-
return _weapp_tailwindcss_postcss.unitConversionPresets;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
|
45
|
-
exports.weappTailwindcssPostcssPlugin = require_postcss.default;
|
|
1
|
+
import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.js";
|
|
2
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-CDdzqf1S.js";
|
|
3
|
+
import { t as createPlugins } from "./gulp-DNXQvDUw.js";
|
|
4
|
+
import weappTailwindcssPostcssPlugin from "./postcss.js";
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-BI1TeUPO.js";
|
|
6
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-dAY9h8r8.js";
|
|
7
|
+
import "./webpack.js";
|
|
8
|
+
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
9
|
+
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|