weapp-tailwindcss 5.1.16 → 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 +4 -4
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -3
- 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 +9 -2
- package/dist/bundlers/shared/generator-css/candidates.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +4 -3
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +3 -3
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +2 -2
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +58 -0
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +3 -14
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +3 -12
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +3 -12
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +3 -25
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +2 -2
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +3 -4
- 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 +3 -3
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +4 -3
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +9 -9
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +3 -3
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +4 -4
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +7 -6
- package/dist/bundlers/shared/generator-css/types.d.ts +12 -3
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -5
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -1
- package/dist/bundlers/shared/generator-css.d.ts +9 -9
- 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/{vite → shared}/source-candidates/collector.d.ts +1 -1
- 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/{vite → shared}/source-candidates/store.d.ts +1 -1
- package/dist/bundlers/{vite → shared}/source-candidates/types-and-cache.d.ts +3 -3
- 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 +8 -3
- 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 +3 -3
- package/dist/bundlers/vite/css-finalizer/plugin.d.ts +1 -1
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
- 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 +1 -1
- package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +5 -5
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +2 -2
- 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 → generate-bundle/runtime.d.ts} +4 -4
- 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 +6 -6
- 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 +2 -1
- package/dist/bundlers/vite/processed-css-assets/collector.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +1 -1
- 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 +4 -4
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +5 -5
- package/dist/bundlers/vite/processed-css-assets.d.ts +4 -4
- package/dist/bundlers/vite/resolve-app-type.d.ts +1 -1
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +3 -2
- 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 -1
- 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.d.ts +7 -7
- 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 -4
- 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 +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +11 -41
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.d.ts +1 -1
- 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 +4 -4
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.d.ts +3 -3
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +6 -6
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/resources.d.ts +2 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +4 -4
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +9 -9
- 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 +4 -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 +2 -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 +4 -4
- package/dist/bundlers/webpack/shared/create-framework-plugin.d.ts +3 -3
- 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 +141 -168
- 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-BtLIID4m.js → context-PZXBqrAJ.cjs} +31 -93
- package/dist/{context-JzwzSX36.mjs → context-oTkxC5aZ.js} +22 -11
- 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-B91GhUJQ.js → generator-C8D5cnbe.cjs} +164 -33
- package/dist/{generator-Bv7myuhY.mjs → generator-CDdzqf1S.js} +155 -30
- package/dist/generator.cjs +12 -0
- package/dist/generator.d.ts +1 -1
- package/dist/generator.js +2 -12
- package/dist/{gulp-Q1wITegn.js → gulp-Cjcss8T_.cjs} +157 -103
- package/dist/{gulp-CKSklPlH.mjs → gulp-DNXQvDUw.js} +141 -90
- package/dist/gulp.cjs +5 -0
- package/dist/gulp.d.ts +4 -4
- package/dist/gulp.js +2 -5
- package/dist/{hmr-timing-BXg7nI8N.mjs → hmr-timing-CuJwQzDc.js} +3824 -1988
- 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.d.ts +1 -1
- package/dist/source-candidate-scan-signature-B0S7f5P7.js +421 -0
- package/dist/source-candidate-scan-signature-BmSuoxR9.cjs +555 -0
- 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/css-compat.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/engine.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +4 -5
- 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 -2
- 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-B4phC0kB.js → tailwindcss-Cs94gJgf.cjs} +9 -769
- package/dist/{tailwindcss-BTcXX8Ka.mjs → tailwindcss-D7TGiZR2.js} +22 -22
- 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-CMPaWn9P.js → v4-generation-core-D7MuR5ZF.cjs} +3468 -2059
- package/dist/{vite-BwQWl9ft.mjs → vite-BI1TeUPO.js} +5968 -4456
- package/dist/{vite-DhVnXvAQ.js → vite-CBzmUTu-.cjs} +6159 -4672
- 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} +9 -11
- package/dist/{webpack-kh78iMSS.js → webpack-Dao6bWEj.cjs} +208 -954
- package/dist/{webpack-Bo1QrFPf.mjs → webpack-dAY9h8r8.js} +105 -101
- 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 -714
- package/package.json +56 -53
- 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/source-candidate-scan-signature-BKZZk_e6.js +0 -1078
- package/dist/source-candidate-scan-signature-CtK-mB_C.mjs +0 -854
- 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-B0tVkJLH.js +0 -10524
- 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_framework = require("./framework.cjs");
|
|
3
|
+
const require_generator = require("./generator-C8D5cnbe.cjs");
|
|
4
|
+
require("./auto-DtU6f3X6.cjs");
|
|
5
|
+
const require_options = require("./options-DlvhQwWB.cjs");
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-D7MuR5ZF.cjs");
|
|
7
|
+
let node_path = require("node:path");
|
|
8
|
+
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
|
+
let node_module = require("node:module");
|
|
10
|
+
let weapp_style_injector_vite = require("weapp-style-injector/vite");
|
|
11
|
+
let weapp_style_injector_vite_taro = require("weapp-style-injector/vite/taro");
|
|
12
|
+
let weapp_style_injector_vite_uni_app = require("weapp-style-injector/vite/uni-app");
|
|
13
|
+
let weapp_style_injector_webpack = require("weapp-style-injector/webpack");
|
|
14
|
+
let weapp_style_injector_webpack_mpx = require("weapp-style-injector/webpack/mpx");
|
|
15
|
+
let weapp_style_injector_webpack_taro = require("weapp-style-injector/webpack/taro");
|
|
16
|
+
let weapp_style_injector_webpack_uni_app = require("weapp-style-injector/webpack/uni-app");
|
|
17
|
+
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
18
|
+
//#region src/bundlers/framework-selector.ts
|
|
19
|
+
function resolveBundlerAppType(options) {
|
|
20
|
+
if (options.appType) return options.appType;
|
|
21
|
+
return require_framework.detectAppType({
|
|
22
|
+
cwd: options.cwd,
|
|
23
|
+
detectEnv: options.detectEnv,
|
|
24
|
+
env: options.env,
|
|
25
|
+
manifest: options.manifest,
|
|
26
|
+
packageJson: options.packageJson,
|
|
27
|
+
root: options.root,
|
|
28
|
+
searchUp: options.searchUp
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function isUniAppXFramework(appType, uniAppX) {
|
|
32
|
+
return appType === "uni-app-x" || require_options.resolveUniAppXOptions(uniAppX).enabled;
|
|
33
|
+
}
|
|
34
|
+
function resolveViteFrameworkProfile(options) {
|
|
35
|
+
const appType = resolveBundlerAppType(options);
|
|
36
|
+
if (isUniAppXFramework(appType, options.uniAppX)) return {
|
|
37
|
+
appType,
|
|
38
|
+
frameworkName: "uni-app-x"
|
|
39
|
+
};
|
|
40
|
+
if (appType === "uni-app" || appType === "uni-app-vite") return {
|
|
41
|
+
appType,
|
|
42
|
+
frameworkName: "uni-app"
|
|
43
|
+
};
|
|
44
|
+
if (appType === "taro") return {
|
|
45
|
+
appType,
|
|
46
|
+
frameworkName: "taro"
|
|
47
|
+
};
|
|
48
|
+
if (appType === "weapp-vite") return {
|
|
49
|
+
appType,
|
|
50
|
+
frameworkName: "weapp-vite"
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
appType,
|
|
54
|
+
frameworkName: "generic"
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function resolveWebpackFrameworkProfile(options) {
|
|
58
|
+
const appType = resolveBundlerAppType(options);
|
|
59
|
+
if (appType === "mpx") return {
|
|
60
|
+
appType,
|
|
61
|
+
frameworkName: "mpx"
|
|
62
|
+
};
|
|
63
|
+
if (appType === "taro") return {
|
|
64
|
+
appType,
|
|
65
|
+
frameworkName: "taro"
|
|
66
|
+
};
|
|
67
|
+
if (appType === "uni-app" || appType === "uni-app-vite" || isUniAppXFramework(appType, options.uniAppX)) return {
|
|
68
|
+
appType,
|
|
69
|
+
frameworkName: "uni-app"
|
|
70
|
+
};
|
|
71
|
+
if (appType === "weapp-vite") return {
|
|
72
|
+
appType,
|
|
73
|
+
frameworkName: "weapp-vite"
|
|
74
|
+
};
|
|
75
|
+
return {
|
|
76
|
+
appType,
|
|
77
|
+
frameworkName: "generic"
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/style-injector/options.ts
|
|
82
|
+
function normalizeStyleInjectorOptions(options) {
|
|
83
|
+
if (options === true) return {};
|
|
84
|
+
if (!options) return;
|
|
85
|
+
return options;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/style-injector/internal.ts
|
|
89
|
+
function toPluginArray(pluginOrPlugins) {
|
|
90
|
+
return Array.isArray(pluginOrPlugins) ? pluginOrPlugins : [pluginOrPlugins];
|
|
91
|
+
}
|
|
92
|
+
function normalizeWebpackStyleInjectorOptions(options) {
|
|
93
|
+
const normalized = normalizeStyleInjectorOptions(options);
|
|
94
|
+
if (!normalized) return;
|
|
95
|
+
const { generateSubpackageStyle, loadSubpackageTargetStyle, ...rest } = normalized;
|
|
96
|
+
const webpackOptions = { ...rest };
|
|
97
|
+
if (generateSubpackageStyle) webpackOptions.generateSubpackageStyle = (context) => {
|
|
98
|
+
const generated = generateSubpackageStyle(context);
|
|
99
|
+
if (generated && typeof generated.then === "function") throw new TypeError("[weapp-style-injector] Webpack subpackage style generators must return synchronously.");
|
|
100
|
+
return generated;
|
|
101
|
+
};
|
|
102
|
+
if (loadSubpackageTargetStyle) webpackOptions.loadSubpackageTargetStyle = (fileName, sourceAbsolutePath) => {
|
|
103
|
+
const loaded = loadSubpackageTargetStyle(fileName, sourceAbsolutePath);
|
|
104
|
+
if (loaded && typeof loaded.then === "function") throw new TypeError("[weapp-style-injector] Webpack subpackage target style loaders must return synchronously.");
|
|
105
|
+
return loaded;
|
|
106
|
+
};
|
|
107
|
+
return webpackOptions;
|
|
108
|
+
}
|
|
109
|
+
function getTransformHandler(hook) {
|
|
110
|
+
if (typeof hook === "function") return hook;
|
|
111
|
+
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
112
|
+
}
|
|
113
|
+
function getGenerateBundleHandler(hook) {
|
|
114
|
+
if (typeof hook === "function") return hook;
|
|
115
|
+
if (hook && typeof hook === "object" && typeof hook.handler === "function") return hook.handler;
|
|
116
|
+
}
|
|
117
|
+
const viteStyleInjectorDelegates = {
|
|
118
|
+
generic: ((options) => [(0, weapp_style_injector_vite.weappStyleInjector)(options)]),
|
|
119
|
+
taro: ((options) => toPluginArray((0, weapp_style_injector_vite_taro.StyleInjector)(options))),
|
|
120
|
+
uniApp: ((options) => toPluginArray((0, weapp_style_injector_vite_uni_app.StyleInjector)(options)))
|
|
121
|
+
};
|
|
122
|
+
const webpackStyleInjectorDelegates = {
|
|
123
|
+
generic: ((options) => (0, weapp_style_injector_webpack.weappStyleInjectorWebpack)(options)),
|
|
124
|
+
mpx: ((options) => (0, weapp_style_injector_webpack_mpx.StyleInjector)(options)),
|
|
125
|
+
taro: ((options) => (0, weapp_style_injector_webpack_taro.StyleInjector)(options)),
|
|
126
|
+
uniApp: ((options) => (0, weapp_style_injector_webpack_uni_app.StyleInjector)(options))
|
|
127
|
+
};
|
|
128
|
+
function createBuiltinViteStyleInjectorPlugins(options, getDelegateFactory) {
|
|
129
|
+
const normalized = normalizeStyleInjectorOptions(options);
|
|
130
|
+
if (!normalized) return [];
|
|
131
|
+
let config;
|
|
132
|
+
let delegates;
|
|
133
|
+
let delegatesConfigured = false;
|
|
134
|
+
let delegatesBuildStarted = false;
|
|
135
|
+
const resolveDelegates = () => {
|
|
136
|
+
if (delegates) return delegates;
|
|
137
|
+
delegates = getDelegateFactory()(normalized);
|
|
138
|
+
return delegates;
|
|
139
|
+
};
|
|
140
|
+
const configureDelegates = async () => {
|
|
141
|
+
if (delegatesConfigured || !config) return;
|
|
142
|
+
delegatesConfigured = true;
|
|
143
|
+
for (const plugin of resolveDelegates()) if (typeof plugin.configResolved === "function") await plugin.configResolved(config);
|
|
144
|
+
};
|
|
145
|
+
const startDelegates = async (context) => {
|
|
146
|
+
if (delegatesBuildStarted) return;
|
|
147
|
+
await configureDelegates();
|
|
148
|
+
delegatesBuildStarted = true;
|
|
149
|
+
for (const plugin of resolveDelegates()) if (typeof plugin.buildStart === "function") await plugin.buildStart.call(context, {});
|
|
150
|
+
};
|
|
151
|
+
return [{
|
|
152
|
+
name: "weapp-tailwindcss:style-injector-pre",
|
|
153
|
+
apply: "build",
|
|
154
|
+
enforce: "pre",
|
|
155
|
+
configResolved(resolvedConfig) {
|
|
156
|
+
config = resolvedConfig;
|
|
157
|
+
},
|
|
158
|
+
async buildStart() {
|
|
159
|
+
await startDelegates(this);
|
|
160
|
+
},
|
|
161
|
+
async load(id, options) {
|
|
162
|
+
await configureDelegates();
|
|
163
|
+
for (const plugin of resolveDelegates()) {
|
|
164
|
+
if (typeof plugin.load !== "function") continue;
|
|
165
|
+
const result = await plugin.load.call(this, id, options);
|
|
166
|
+
if (result != null) return result;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
async transform(code, id, options) {
|
|
170
|
+
await configureDelegates();
|
|
171
|
+
let currentCode = code;
|
|
172
|
+
let changed = false;
|
|
173
|
+
for (const plugin of resolveDelegates()) {
|
|
174
|
+
const handler = getTransformHandler(plugin.transform);
|
|
175
|
+
if (!handler) continue;
|
|
176
|
+
const result = await handler.call(this, currentCode, id, options);
|
|
177
|
+
if (!result) continue;
|
|
178
|
+
if (typeof result === "string") {
|
|
179
|
+
currentCode = result;
|
|
180
|
+
changed = true;
|
|
181
|
+
} else if (typeof result === "object" && typeof result.code === "string") {
|
|
182
|
+
currentCode = result.code;
|
|
183
|
+
changed = true;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (changed) return {
|
|
187
|
+
code: currentCode,
|
|
188
|
+
map: null
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
name: "weapp-tailwindcss:style-injector",
|
|
193
|
+
apply: "build",
|
|
194
|
+
enforce: "post",
|
|
195
|
+
configResolved(resolvedConfig) {
|
|
196
|
+
config = resolvedConfig;
|
|
197
|
+
},
|
|
198
|
+
async generateBundle(outputOptions, bundle, isWrite) {
|
|
199
|
+
await configureDelegates();
|
|
200
|
+
for (const plugin of resolveDelegates()) {
|
|
201
|
+
const handler = getGenerateBundleHandler(plugin.generateBundle);
|
|
202
|
+
if (!handler) continue;
|
|
203
|
+
await handler.call(this, outputOptions, bundle, isWrite);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}];
|
|
207
|
+
}
|
|
208
|
+
function createBuiltinWebpackStyleInjectorPlugin(options, delegateFactory) {
|
|
209
|
+
const normalized = normalizeWebpackStyleInjectorOptions(options);
|
|
210
|
+
if (!normalized) return;
|
|
211
|
+
return delegateFactory(normalized);
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
//#region src/bundlers/shared/module-graph.ts
|
|
215
|
+
const QUERY_HASH_RE = /[?#].*$/u;
|
|
216
|
+
const PROTOCOL_RE = /^[a-z][a-z+.-]*:/iu;
|
|
217
|
+
const WINDOWS_ABSOLUTE_RE = /^[a-z]:[\\/]/iu;
|
|
218
|
+
const VIRTUAL_PREFIX = "\0";
|
|
219
|
+
const JS_EXTENSIONS = [
|
|
220
|
+
".js",
|
|
221
|
+
".mjs",
|
|
222
|
+
".cjs"
|
|
223
|
+
];
|
|
224
|
+
function normalizeOutputPathKey(value) {
|
|
225
|
+
return node_path.default.normalize(value).replace(/\\/g, "/");
|
|
226
|
+
}
|
|
227
|
+
function stripQueryAndHash(specifier) {
|
|
228
|
+
return specifier.replace(QUERY_HASH_RE, "");
|
|
229
|
+
}
|
|
230
|
+
function isResolvableSpecifier(specifier) {
|
|
231
|
+
if (!specifier) return false;
|
|
232
|
+
const normalized = stripQueryAndHash(specifier);
|
|
233
|
+
if (normalized.startsWith(VIRTUAL_PREFIX)) return false;
|
|
234
|
+
if (node_path.default.isAbsolute(normalized) || WINDOWS_ABSOLUTE_RE.test(normalized)) return true;
|
|
235
|
+
return !PROTOCOL_RE.test(normalized);
|
|
236
|
+
}
|
|
237
|
+
function toAbsoluteOutputPath(fileName, outDir) {
|
|
238
|
+
if (node_path.default.isAbsolute(fileName) || WINDOWS_ABSOLUTE_RE.test(fileName)) return node_path.default.normalize(fileName);
|
|
239
|
+
return node_path.default.resolve(outDir, fileName);
|
|
240
|
+
}
|
|
241
|
+
function matchWithExtensions(candidate, hasOutput) {
|
|
242
|
+
if (hasOutput(candidate)) return candidate;
|
|
243
|
+
if (!node_path.default.extname(candidate)) for (const ext of JS_EXTENSIONS) {
|
|
244
|
+
const extended = `${candidate}${ext}`;
|
|
245
|
+
if (hasOutput(extended)) return extended;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
function resolveOutputSpecifier(specifier, importer, outDir, hasOutput) {
|
|
249
|
+
if (!isResolvableSpecifier(specifier)) return;
|
|
250
|
+
const normalized = stripQueryAndHash(specifier);
|
|
251
|
+
let candidate;
|
|
252
|
+
if (node_path.default.isAbsolute(normalized) || WINDOWS_ABSOLUTE_RE.test(normalized)) candidate = node_path.default.normalize(normalized);
|
|
253
|
+
else if (normalized.startsWith("/")) candidate = node_path.default.resolve(outDir, normalized.slice(1));
|
|
254
|
+
else candidate = node_path.default.resolve(node_path.default.dirname(importer), normalized);
|
|
255
|
+
return matchWithExtensions(candidate, hasOutput);
|
|
256
|
+
}
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region src/utils/disabled.ts
|
|
259
|
+
function resolvePluginDisabledState(disabled) {
|
|
260
|
+
if (disabled === true) return { plugin: true };
|
|
261
|
+
if (disabled === false || disabled == null) return { plugin: false };
|
|
262
|
+
return { plugin: disabled.plugin ?? false };
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/utils/resolve-package.ts
|
|
266
|
+
const require$1 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
267
|
+
function resolvePackageDir(name) {
|
|
268
|
+
const pkgPath = require$1.resolve(`${name}/package.json`);
|
|
269
|
+
return node_path.default.dirname(pkgPath);
|
|
270
|
+
}
|
|
271
|
+
//#endregion
|
|
272
|
+
//#region src/bundlers/shared/runtime-entry-type.ts
|
|
273
|
+
const CSS_REQUEST_RE = /\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\?)/;
|
|
274
|
+
const HTML_REQUEST_RE = /\.html?(?:$|\?)/;
|
|
275
|
+
function classifyRuntimeEntry(file, matchers) {
|
|
276
|
+
if (matchers.htmlMatcher(file) || HTML_REQUEST_RE.test(file)) return "html";
|
|
277
|
+
if (matchers.cssMatcher(file) || CSS_REQUEST_RE.test(file) || require_v4_generation_core.isSourceStyleRequest(file)) return "css";
|
|
278
|
+
if (matchers.jsMatcher(file) || matchers.wxsMatcher(file)) return "js";
|
|
279
|
+
return "other";
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region src/bundlers/shared/runtime-signatures.ts
|
|
283
|
+
function summarizeStringDiff(previous, next) {
|
|
284
|
+
if (previous === next) return "same";
|
|
285
|
+
const previousLength = previous.length;
|
|
286
|
+
const nextLength = next.length;
|
|
287
|
+
const minLength = Math.min(previousLength, nextLength);
|
|
288
|
+
let prefixLength = 0;
|
|
289
|
+
while (prefixLength < minLength && previous.charCodeAt(prefixLength) === next.charCodeAt(prefixLength)) prefixLength += 1;
|
|
290
|
+
let previousSuffixCursor = previousLength - 1;
|
|
291
|
+
let nextSuffixCursor = nextLength - 1;
|
|
292
|
+
while (previousSuffixCursor >= prefixLength && nextSuffixCursor >= prefixLength && previous.charCodeAt(previousSuffixCursor) === next.charCodeAt(nextSuffixCursor)) {
|
|
293
|
+
previousSuffixCursor -= 1;
|
|
294
|
+
nextSuffixCursor -= 1;
|
|
295
|
+
}
|
|
296
|
+
const previousChangedLength = previousSuffixCursor >= prefixLength ? previousSuffixCursor - prefixLength + 1 : 0;
|
|
297
|
+
const nextChangedLength = nextSuffixCursor >= prefixLength ? nextSuffixCursor - prefixLength + 1 : 0;
|
|
298
|
+
return `changed@${prefixLength} old=${previousChangedLength} new=${nextChangedLength} len=${previousLength}->${nextLength}`;
|
|
299
|
+
}
|
|
300
|
+
function createLinkedImpactSignature(entry, linkedImpactsByEntry, sourceHashByFile) {
|
|
301
|
+
const changedLinkedFiles = linkedImpactsByEntry.get(entry);
|
|
302
|
+
if (!changedLinkedFiles || changedLinkedFiles.size === 0) return;
|
|
303
|
+
return [...changedLinkedFiles].sort().map((file) => {
|
|
304
|
+
return `${file}:${sourceHashByFile.get(file) ?? "missing"}`;
|
|
305
|
+
}).join(",");
|
|
306
|
+
}
|
|
307
|
+
function createJsHashSalt(runtimeSignature, linkedImpactSignature) {
|
|
308
|
+
if (!linkedImpactSignature) return runtimeSignature;
|
|
309
|
+
return `${runtimeSignature}:linked:${linkedImpactSignature}`;
|
|
310
|
+
}
|
|
311
|
+
function createStableTextSignature(input) {
|
|
312
|
+
let hash = 2166136261;
|
|
313
|
+
for (let i = 0; i < input.length; i++) {
|
|
314
|
+
hash ^= input.charCodeAt(i);
|
|
315
|
+
hash = Math.imul(hash, 16777619);
|
|
316
|
+
}
|
|
317
|
+
return (hash >>> 0).toString(36);
|
|
318
|
+
}
|
|
319
|
+
function createCandidateSignature(candidates) {
|
|
320
|
+
if (candidates.size === 0) return "empty";
|
|
321
|
+
return createStableTextSignature([...candidates].sort().join("\n"));
|
|
322
|
+
}
|
|
323
|
+
function getSnapshotHash(snapshotMap, file, fallback) {
|
|
324
|
+
return snapshotMap.get(file) ?? fallback;
|
|
325
|
+
}
|
|
326
|
+
function hasRuntimeAffectingSourceChanges(changedByType) {
|
|
327
|
+
return changedByType.html.size > 0 || changedByType.js.size > 0;
|
|
328
|
+
}
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/bundlers/vite/generate-bundle/scoped-generator.ts
|
|
331
|
+
function hasOwnSourceDirectives(rawSource) {
|
|
332
|
+
return rawSource.includes("@source") || rawSource.includes("@config");
|
|
333
|
+
}
|
|
334
|
+
function createLocalSourceEntries(sourceFile) {
|
|
335
|
+
return [{
|
|
336
|
+
base: node_path.default.dirname(node_path.default.resolve(sourceFile.replace(/[?#].*$/, ""))),
|
|
337
|
+
negated: false,
|
|
338
|
+
pattern: "**/*"
|
|
339
|
+
}];
|
|
340
|
+
}
|
|
341
|
+
function intersectCandidates(first, second) {
|
|
342
|
+
if (first.size === 0 || second.size === 0) return /* @__PURE__ */ new Set();
|
|
343
|
+
const [small, large] = first.size <= second.size ? [first, second] : [second, first];
|
|
344
|
+
const scoped = /* @__PURE__ */ new Set();
|
|
345
|
+
for (const candidate of small) if (large.has(candidate)) scoped.add(candidate);
|
|
346
|
+
return scoped;
|
|
347
|
+
}
|
|
348
|
+
function mergeCandidates(first, second) {
|
|
349
|
+
return /* @__PURE__ */ new Set([...first, ...second]);
|
|
350
|
+
}
|
|
351
|
+
function canFallbackToOutputCandidates(rawSource, entries) {
|
|
352
|
+
return rawSource.includes("@source") && entries.length > 0 && entries.every((entry) => !entry.negated);
|
|
353
|
+
}
|
|
354
|
+
function resolveScopedSourceEntries(rawSource, sourceFile, resolvedEntries) {
|
|
355
|
+
if (!hasOwnSourceDirectives(rawSource)) return {
|
|
356
|
+
entries: resolvedEntries,
|
|
357
|
+
localEntries: void 0
|
|
358
|
+
};
|
|
359
|
+
if (resolvedEntries !== void 0) return { entries: resolvedEntries };
|
|
360
|
+
return { entries: createLocalSourceEntries(sourceFile) };
|
|
361
|
+
}
|
|
362
|
+
async function resolveScopedGeneratorSourceEntries(rawSource, sourceFile) {
|
|
363
|
+
return resolveScopedSourceEntries(rawSource, sourceFile, (await require_options.resolveTailwindV4EntriesFromCssCached(rawSource, node_path.default.dirname(node_path.default.resolve(sourceFile.replace(/[?#].*$/, "")))))?.entries);
|
|
364
|
+
}
|
|
365
|
+
async function createScopedGeneratorCandidateSignature(rawSource, sourceFile, fallbackSignature, getSourceCandidatesForEntries, options = {}) {
|
|
366
|
+
if (!getSourceCandidatesForEntries || !hasOwnSourceDirectives(rawSource)) return fallbackSignature;
|
|
367
|
+
const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
|
|
368
|
+
if (entries === void 0) return fallbackSignature;
|
|
369
|
+
const scopedSignature = createCandidateSignature(getSourceCandidatesForEntries(entries));
|
|
370
|
+
return options.includeFallbackSignature === true ? `${scopedSignature}:${fallbackSignature}` : scopedSignature;
|
|
371
|
+
}
|
|
372
|
+
async function createScopedGeneratorSourceTraceMap(rawSource, sourceFile, getSourceCandidateSourcesForEntries) {
|
|
373
|
+
if (!getSourceCandidateSourcesForEntries || !hasOwnSourceDirectives(rawSource)) return getSourceCandidateSourcesForEntries?.(void 0);
|
|
374
|
+
const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
|
|
375
|
+
if (entries === void 0) return getSourceCandidateSourcesForEntries(void 0);
|
|
376
|
+
return getSourceCandidateSourcesForEntries(entries);
|
|
377
|
+
}
|
|
378
|
+
async function createScopedGeneratorRuntime(options) {
|
|
379
|
+
const { cssHandlerOptions, fallbackRuntime, getSourceCandidatesForEntries, outputFile, rawSource, shouldExcludeSubpackageSourceCandidates, sourceFile, scopedSourceCandidateGetter } = options;
|
|
380
|
+
if (getSourceCandidatesForEntries && rawSource && sourceFile) {
|
|
381
|
+
const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
|
|
382
|
+
if (entries !== void 0 && (entries.length > 0 || hasOwnSourceDirectives(rawSource))) {
|
|
383
|
+
const explicitCandidates = getSourceCandidatesForEntries(entries);
|
|
384
|
+
const outputCandidates = scopedSourceCandidateGetter?.(void 0);
|
|
385
|
+
const scopedCandidates = outputCandidates ? explicitCandidates.size === 0 && canFallbackToOutputCandidates(rawSource, entries) ? outputCandidates : intersectCandidates(explicitCandidates, outputCandidates) : explicitCandidates;
|
|
386
|
+
return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
const scopedCandidates = scopedSourceCandidateGetter?.(void 0);
|
|
390
|
+
if (scopedCandidates && (scopedCandidates.size > 0 || shouldExcludeSubpackageSourceCandidates(outputFile, cssHandlerOptions))) return shouldExcludeSubpackageSourceCandidates(outputFile, cssHandlerOptions) ? scopedCandidates : mergeCandidates(scopedCandidates, fallbackRuntime);
|
|
391
|
+
if (!shouldExcludeSubpackageSourceCandidates(outputFile, cssHandlerOptions)) return fallbackRuntime;
|
|
392
|
+
return fallbackRuntime;
|
|
393
|
+
}
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/bundlers/shared/source-candidate-scan-signature.ts
|
|
396
|
+
function normalizeSignaturePath(value) {
|
|
397
|
+
return require_generator.toPosixPath(node_path.default.resolve(value));
|
|
398
|
+
}
|
|
399
|
+
function serializeInlineCandidates(inlineCandidates) {
|
|
400
|
+
return {
|
|
401
|
+
excluded: [...inlineCandidates?.excluded ?? []].sort(),
|
|
402
|
+
included: [...inlineCandidates?.included ?? []].sort()
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
function serializeSourceEntries(entries) {
|
|
406
|
+
return (entries ?? []).map((entry) => ({
|
|
407
|
+
base: normalizeSignaturePath(entry.base),
|
|
408
|
+
negated: entry.negated,
|
|
409
|
+
pattern: entry.pattern
|
|
410
|
+
})).sort((a, b) => `${a.base}\0${a.pattern}\0${a.negated}`.localeCompare(`${b.base}\0${b.pattern}\0${b.negated}`));
|
|
411
|
+
}
|
|
412
|
+
function createSourceCandidateScanSignature(input) {
|
|
413
|
+
return JSON.stringify({
|
|
414
|
+
inlineCandidates: serializeInlineCandidates(input.inlineCandidates),
|
|
415
|
+
outDir: input.outDir ? normalizeSignaturePath(input.outDir) : void 0,
|
|
416
|
+
roots: input.roots.map((root) => ({
|
|
417
|
+
entries: serializeSourceEntries(root.entries),
|
|
418
|
+
root: normalizeSignaturePath(root.root)
|
|
419
|
+
})),
|
|
420
|
+
scanAllSources: input.scanAllSources ?? false
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
//#endregion
|
|
424
|
+
Object.defineProperty(exports, "classifyRuntimeEntry", {
|
|
425
|
+
enumerable: true,
|
|
426
|
+
get: function() {
|
|
427
|
+
return classifyRuntimeEntry;
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
Object.defineProperty(exports, "createBuiltinViteStyleInjectorPlugins", {
|
|
431
|
+
enumerable: true,
|
|
432
|
+
get: function() {
|
|
433
|
+
return createBuiltinViteStyleInjectorPlugins;
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
Object.defineProperty(exports, "createBuiltinWebpackStyleInjectorPlugin", {
|
|
437
|
+
enumerable: true,
|
|
438
|
+
get: function() {
|
|
439
|
+
return createBuiltinWebpackStyleInjectorPlugin;
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
Object.defineProperty(exports, "createCandidateSignature", {
|
|
443
|
+
enumerable: true,
|
|
444
|
+
get: function() {
|
|
445
|
+
return createCandidateSignature;
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
Object.defineProperty(exports, "createJsHashSalt", {
|
|
449
|
+
enumerable: true,
|
|
450
|
+
get: function() {
|
|
451
|
+
return createJsHashSalt;
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
Object.defineProperty(exports, "createLinkedImpactSignature", {
|
|
455
|
+
enumerable: true,
|
|
456
|
+
get: function() {
|
|
457
|
+
return createLinkedImpactSignature;
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
Object.defineProperty(exports, "createScopedGeneratorCandidateSignature", {
|
|
461
|
+
enumerable: true,
|
|
462
|
+
get: function() {
|
|
463
|
+
return createScopedGeneratorCandidateSignature;
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
Object.defineProperty(exports, "createScopedGeneratorRuntime", {
|
|
467
|
+
enumerable: true,
|
|
468
|
+
get: function() {
|
|
469
|
+
return createScopedGeneratorRuntime;
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
Object.defineProperty(exports, "createScopedGeneratorSourceTraceMap", {
|
|
473
|
+
enumerable: true,
|
|
474
|
+
get: function() {
|
|
475
|
+
return createScopedGeneratorSourceTraceMap;
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
Object.defineProperty(exports, "createSourceCandidateScanSignature", {
|
|
479
|
+
enumerable: true,
|
|
480
|
+
get: function() {
|
|
481
|
+
return createSourceCandidateScanSignature;
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
Object.defineProperty(exports, "getSnapshotHash", {
|
|
485
|
+
enumerable: true,
|
|
486
|
+
get: function() {
|
|
487
|
+
return getSnapshotHash;
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
Object.defineProperty(exports, "hasRuntimeAffectingSourceChanges", {
|
|
491
|
+
enumerable: true,
|
|
492
|
+
get: function() {
|
|
493
|
+
return hasRuntimeAffectingSourceChanges;
|
|
494
|
+
}
|
|
495
|
+
});
|
|
496
|
+
Object.defineProperty(exports, "normalizeOutputPathKey", {
|
|
497
|
+
enumerable: true,
|
|
498
|
+
get: function() {
|
|
499
|
+
return normalizeOutputPathKey;
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
Object.defineProperty(exports, "resolveOutputSpecifier", {
|
|
503
|
+
enumerable: true,
|
|
504
|
+
get: function() {
|
|
505
|
+
return resolveOutputSpecifier;
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
Object.defineProperty(exports, "resolvePackageDir", {
|
|
509
|
+
enumerable: true,
|
|
510
|
+
get: function() {
|
|
511
|
+
return resolvePackageDir;
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
Object.defineProperty(exports, "resolvePluginDisabledState", {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
get: function() {
|
|
517
|
+
return resolvePluginDisabledState;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
Object.defineProperty(exports, "resolveViteFrameworkProfile", {
|
|
521
|
+
enumerable: true,
|
|
522
|
+
get: function() {
|
|
523
|
+
return resolveViteFrameworkProfile;
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
Object.defineProperty(exports, "resolveWebpackFrameworkProfile", {
|
|
527
|
+
enumerable: true,
|
|
528
|
+
get: function() {
|
|
529
|
+
return resolveWebpackFrameworkProfile;
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
Object.defineProperty(exports, "summarizeStringDiff", {
|
|
533
|
+
enumerable: true,
|
|
534
|
+
get: function() {
|
|
535
|
+
return summarizeStringDiff;
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
Object.defineProperty(exports, "toAbsoluteOutputPath", {
|
|
539
|
+
enumerable: true,
|
|
540
|
+
get: function() {
|
|
541
|
+
return toAbsoluteOutputPath;
|
|
542
|
+
}
|
|
543
|
+
});
|
|
544
|
+
Object.defineProperty(exports, "viteStyleInjectorDelegates", {
|
|
545
|
+
enumerable: true,
|
|
546
|
+
get: function() {
|
|
547
|
+
return viteStyleInjectorDelegates;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
Object.defineProperty(exports, "webpackStyleInjectorDelegates", {
|
|
551
|
+
enumerable: true,
|
|
552
|
+
get: function() {
|
|
553
|
+
return webpackStyleInjectorDelegates;
|
|
554
|
+
}
|
|
555
|
+
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
2
|
import type { WebpackObjectPluginInstance, WebpackWeappStyleInjectorOptions } from 'weapp-style-injector/webpack';
|
|
3
|
-
import type { WeappTailwindcssStyleInjectorUserOptions } from './options';
|
|
4
|
-
import { normalizeStyleInjectorOptions } from './options';
|
|
3
|
+
import type { WeappTailwindcssStyleInjectorUserOptions } from './options.js';
|
|
4
|
+
import { normalizeStyleInjectorOptions } from './options.js';
|
|
5
5
|
export type ViteStyleInjectorDelegateFactory = (options: NonNullable<ReturnType<typeof normalizeStyleInjectorOptions>>) => Plugin[];
|
|
6
6
|
export type WebpackStyleInjectorDelegateFactory = (options: NonNullable<ReturnType<typeof normalizeWebpackStyleInjectorOptions>>) => WebpackObjectPluginInstance;
|
|
7
7
|
declare function normalizeWebpackStyleInjectorOptions(options: WeappTailwindcssStyleInjectorUserOptions | undefined): WebpackWeappStyleInjectorOptions | undefined;
|
|
8
8
|
export declare const viteStyleInjectorDelegates: {
|
|
9
|
-
generic: (options: import("./options").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
10
|
-
taro: (options: import("./options").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
11
|
-
uniApp: (options: import("./options").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
9
|
+
generic: (options: import("./options.js").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
10
|
+
taro: (options: import("./options.js").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
11
|
+
uniApp: (options: import("./options.js").WeappTailwindcssStyleInjectorOptions) => Plugin<any>[];
|
|
12
12
|
};
|
|
13
13
|
export declare const webpackStyleInjectorDelegates: {
|
|
14
14
|
generic: (options: WebpackWeappStyleInjectorOptions) => WebpackObjectPluginInstance;
|
|
@@ -18,4 +18,4 @@ export declare const webpackStyleInjectorDelegates: {
|
|
|
18
18
|
};
|
|
19
19
|
export declare function createBuiltinViteStyleInjectorPlugins(options: WeappTailwindcssStyleInjectorUserOptions | undefined, getDelegateFactory: () => ViteStyleInjectorDelegateFactory): Plugin[];
|
|
20
20
|
export declare function createBuiltinWebpackStyleInjectorPlugin(options: WeappTailwindcssStyleInjectorUserOptions | undefined, delegateFactory: WebpackStyleInjectorDelegateFactory): WebpackObjectPluginInstance | undefined;
|
|
21
|
-
export type { WeappTailwindcssStyleInjectorOptions, WeappTailwindcssStyleInjectorUserOptions } from './options';
|
|
21
|
+
export type { WeappTailwindcssStyleInjectorOptions, WeappTailwindcssStyleInjectorUserOptions } from './options.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const require_generator = require("./generator-C8D5cnbe.cjs");
|
|
2
|
+
const require_options = require("./options-DlvhQwWB.cjs");
|
|
3
|
+
//#region src/context/style-options.ts
|
|
4
|
+
function normalizeStyleHandlerMajorVersion(majorVersion) {
|
|
5
|
+
return majorVersion === 4 ? 4 : void 0;
|
|
6
|
+
}
|
|
7
|
+
function resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion) {
|
|
8
|
+
const resolvedUniAppXOptions = require_options.resolveUniAppXOptions(ctx.uniAppX);
|
|
9
|
+
const branch = require_generator.resolveGeneratorRuntimeBranch(require_generator.normalizeWeappTailwindcssGeneratorOptions(ctx.generator, {
|
|
10
|
+
appType: ctx.appType,
|
|
11
|
+
platform: ctx.cssOptions?.platform ?? ctx.platform,
|
|
12
|
+
tailwindcssMajorVersion,
|
|
13
|
+
uniAppX: resolvedUniAppXOptions
|
|
14
|
+
}), {
|
|
15
|
+
appType: ctx.appType,
|
|
16
|
+
platform: ctx.cssOptions?.platform ?? ctx.platform,
|
|
17
|
+
tailwindcssMajorVersion,
|
|
18
|
+
uniAppX: resolvedUniAppXOptions
|
|
19
|
+
});
|
|
20
|
+
const hasCssOptions = ctx.cssOptions !== void 0;
|
|
21
|
+
const cssOptions = {
|
|
22
|
+
cssPreflight: ctx.cssOptions?.cssPreflight ?? ctx.cssPreflight,
|
|
23
|
+
cssPreflightRange: ctx.cssOptions?.cssPreflightRange ?? ctx.cssPreflightRange,
|
|
24
|
+
cssChildCombinatorReplaceValue: ctx.cssOptions?.cssChildCombinatorReplaceValue ?? ctx.cssChildCombinatorReplaceValue,
|
|
25
|
+
cssSelectorReplacement: ctx.cssOptions?.cssSelectorReplacement ?? ctx.cssSelectorReplacement,
|
|
26
|
+
rem2rpx: ctx.cssOptions?.rem2rpx ?? ctx.rem2rpx,
|
|
27
|
+
cssRemoveProperty: ctx.cssOptions?.cssRemoveProperty ?? ctx.cssRemoveProperty,
|
|
28
|
+
cssRemoveHoverPseudoClass: ctx.cssOptions?.cssRemoveHoverPseudoClass ?? ctx.cssRemoveHoverPseudoClass,
|
|
29
|
+
tailwindcssV4GradientFallback: ctx.cssOptions?.tailwindcssV4GradientFallback ?? ctx.tailwindcssV4GradientFallback,
|
|
30
|
+
cssPresetEnv: ctx.cssOptions?.cssPresetEnv ?? ctx.cssPresetEnv,
|
|
31
|
+
atRules: ctx.cssOptions?.atRules ?? ctx.atRules,
|
|
32
|
+
autoprefixer: ctx.cssOptions?.autoprefixer ?? ctx.autoprefixer,
|
|
33
|
+
cssCalc: ctx.cssOptions?.cssCalc ?? ctx.cssCalc,
|
|
34
|
+
platform: branch.platform ?? ctx.cssOptions?.platform ?? ctx.platform,
|
|
35
|
+
px2rpx: ctx.cssOptions?.px2rpx ?? ctx.px2rpx,
|
|
36
|
+
unitsToPx: ctx.cssOptions?.unitsToPx ?? ctx.unitsToPx,
|
|
37
|
+
unitConversion: ctx.cssOptions?.unitConversion ?? ctx.unitConversion,
|
|
38
|
+
injectAdditionalCssVarScope: ctx.cssOptions?.injectAdditionalCssVarScope ?? ctx.injectAdditionalCssVarScope
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
appType: ctx.appType,
|
|
42
|
+
postcssOptions: ctx.postcssOptions,
|
|
43
|
+
cssPreflight: cssOptions.cssPreflight,
|
|
44
|
+
cssPreflightRange: cssOptions.cssPreflightRange,
|
|
45
|
+
cssChildCombinatorReplaceValue: cssOptions.cssChildCombinatorReplaceValue,
|
|
46
|
+
cssSelectorReplacement: cssOptions.cssSelectorReplacement,
|
|
47
|
+
rem2rpx: cssOptions.rem2rpx,
|
|
48
|
+
...hasCssOptions ? { cssOptions } : {},
|
|
49
|
+
cssRemoveProperty: cssOptions.cssRemoveProperty,
|
|
50
|
+
cssRemoveHoverPseudoClass: cssOptions.cssRemoveHoverPseudoClass,
|
|
51
|
+
tailwindcssV4GradientFallback: cssOptions.tailwindcssV4GradientFallback,
|
|
52
|
+
cssPresetEnv: cssOptions.cssPresetEnv,
|
|
53
|
+
atRules: cssOptions.atRules,
|
|
54
|
+
autoprefixer: cssOptions.autoprefixer,
|
|
55
|
+
cssCalc: cssOptions.cssCalc,
|
|
56
|
+
uniAppX: branch.isNativeApp,
|
|
57
|
+
platform: cssOptions.platform,
|
|
58
|
+
px2rpx: cssOptions.px2rpx,
|
|
59
|
+
unitsToPx: cssOptions.unitsToPx,
|
|
60
|
+
unitConversion: cssOptions.unitConversion
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
Object.defineProperty(exports, "normalizeStyleHandlerMajorVersion", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function() {
|
|
67
|
+
return normalizeStyleHandlerMajorVersion;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "resolveStyleOptionsFromContext", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function() {
|
|
73
|
+
return resolveStyleOptionsFromContext;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ICustomAttributesEntities } from '../types';
|
|
2
|
-
import type { IArbitraryValues } from '../types/shared';
|
|
1
|
+
import type { ICustomAttributesEntities } from '../types/index.js';
|
|
2
|
+
import type { IArbitraryValues } from '../types/shared.js';
|
|
3
3
|
export interface SourceCandidateExtractionOptions {
|
|
4
4
|
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
5
5
|
customAttributesEntities?: ICustomAttributesEntities | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PackageResolvingOptions } from 'local-pkg';
|
|
2
2
|
import type { PackageJson } from 'pkg-types';
|
|
3
|
-
import { createTailwindcssRuntime } from './runtime-factory';
|
|
3
|
+
import { createTailwindcssRuntime } from './runtime-factory.js';
|
|
4
4
|
declare function getTailwindcssPackageInfo(options?: PackageResolvingOptions): {
|
|
5
5
|
name: string;
|
|
6
6
|
version: string | undefined;
|