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
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { $ as hasTailwindSourceDirectives, B as stripMiniProgramCssSpecificityPlaceholders, D as resolveTailwindcssOptions, F as stripUnmatchedTailwindSourceMediaCloseFragments, I as finalizeMiniProgramCss, M as removeMiniProgramHoverSelectors, N as removeTailwindV4GeneratorAtRules, Ot as resolveSourceScanPath, P as stripTailwindSourceMediaFragments, Pt as getTailwindV4IncrementalGenerateCacheStats, Q as hasTailwindRootDirectives, R as pruneMiniProgramGeneratedCss, V as removeTailwindV4GeneratedUserCssArtifacts, X as hasTailwindApplyDirective, _ as upsertTailwindV4CssSource, et as normalizeTailwindConfigDirectives, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, it as removeTailwindSourceDirectives, j as isCommentOnlyCss, lt as hasTailwindGeneratedCss, o as resolveRuntimeBranch, rt as parseImportRequest, ut as hasTailwindGeneratedCssMarkers } from "./generator-CDdzqf1S.js";
|
|
2
|
+
import { n as _defineProperty } from "./object-Bvy6-w9r.js";
|
|
3
|
+
import { _ as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature, p as resolveSourceScanEntries } from "./tailwindcss-D7TGiZR2.js";
|
|
4
|
+
import { r as getGroupedEntries } from "./utils-MVwpU07P.js";
|
|
5
|
+
import { $ as createCompilationDependencyChanges, A as isCssSourceTraceEnabled, B as createRuntimeCompilationAffectingSignature, D as annotateCssSourceTrace, E as stripBundlerGeneratedCssMarkers, F as isPureLocalCssImportWrapper, G as createRuntimeAffectingSourceSignature, K as disposeCompilerOwner, M as createRuntimeClassSetManager, N as collectStrictEscapedRuntimeCandidates, O as createCssSourceTraceCacheSignature, P as createEscapeFragments, Q as recordCompilationDependencyChanges, R as finalizeCompilerShadowRun, S as stripRequestQuery, U as resetRuntimeCompilationBuildState, V as createRuntimeCompilationBuildState, W as updateRuntimeCompilationBuildState, X as getCompilationScopeDependencyRevision, Y as AssetEmissionPlan, _ as collectFrameworkPostcssOptionsFromLoaderEntries, b as hasMiniProgramTailwindV4PreflightReset, c as pushConcurrentTaskFactories, g as captureResolvedFrameworkPostcssOptions, it as resolveSourceCandidateScanFiles, j as processCachedTask, k as createCssTokenSourceMap, l as resolveTaskConcurrency, m as removeGeneratedSelectorCompatCss, n as emitHmrTiming, nt as isSourceCandidateRequest, p as scoreTailwindV4CssSourceFileMatch, q as beginCompilerShadowRun, r as generateTailwindV4Css, s as collectRawSourceClassSelectors, tt as createSourceCandidateStore, v as createCssSourceOrderAppend, w as hasBundlerGeneratedCssMarker, x as isSourceStyleRequest, z as buildRuntimeCompilationSnapshot } from "./hmr-timing-CuJwQzDc.js";
|
|
6
|
+
import { h as createDebug, v as md5Hash } from "./wxml-IBzZSaQC.js";
|
|
7
|
+
import { d as refreshTailwindRuntimeState, i as pluginName, l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, r as resolveStyleOptionsFromContext, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-oTkxC5aZ.js";
|
|
8
|
+
import { getDefaultCssPreflight } from "./defaults.js";
|
|
9
|
+
import { S as resolveWebpackFrameworkProfile, a as createCandidateSignature, b as webpackStyleInjectorDelegates, d as classifyRuntimeEntry, f as resolvePackageDir, g as toAbsoluteOutputPath, h as resolveOutputSpecifier, p as resolvePluginDisabledState, r as createScopedGeneratorRuntime, t as createSourceCandidateScanSignature, v as createBuiltinWebpackStyleInjectorPlugin } from "./source-candidate-scan-signature-B0S7f5P7.js";
|
|
9
10
|
import Module, { createRequire } from "node:module";
|
|
10
11
|
import fs from "node:fs";
|
|
11
12
|
import path from "node:path";
|
|
@@ -1308,7 +1309,7 @@ async function finalizeWebpackGeneratedCssResult(context) {
|
|
|
1308
1309
|
//#endregion
|
|
1309
1310
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.ts
|
|
1310
1311
|
async function processWebpackGeneratedCssAsset(element, context) {
|
|
1311
|
-
const { ConcatSource, assetHashByChunk, compilation, compilerOptions, configuredCssEntryFiles, configuredMainCssEntryFiles, createRuntimeSetHash, cssSourceTraceSignature, cssSources, cssTaskFactories, debug, enqueueTask, finalizeCssAssetSource, finalizeTracedCss, generatedCssSources, generatorRuntimeSet, getCssHandlerOptions, getCssUserHandlerOptions, getGeneratorRuntimeSet, hasConfiguredTailwindV4SourceRoots, isSameWebpackSourceScope, isWebGeneratorTarget, rememberProcessCacheKey, resolveWebpackCssSourceFile, runtimeAffectingSourceHash, runtimeState, transformRuntimeSet, updateAssetIfChanged, watchMode, webpackSourceCandidateValueSignature, webpackSourceCandidates } = context;
|
|
1312
|
+
const { ConcatSource, affectedCompilationScopes, assetHashByChunk, compilation, compilationChanges, compilerOptions, configuredCssEntryFiles, configuredMainCssEntryFiles, createRuntimeSetHash, cssSourceTraceSignature, cssSources, cssTaskFactories, debug, enqueueTask, finalizeCssAssetSource, finalizeTracedCss, generatedCssSources, generatorRuntimeSet, getCompilationDependencyRevision, getCssHandlerOptions, getCssUserHandlerOptions, getGeneratorRuntimeSet, hasConfiguredTailwindV4SourceRoots, isSameWebpackSourceScope, isWebGeneratorTarget, rememberProcessCacheKey, resolveWebpackCssSourceFile, runtimeAffectingSourceHash, runtimeState, transformRuntimeSet, updateAssetIfChanged, watchMode, webpackSourceCandidateValueSignature, webpackSourceCandidates } = context;
|
|
1312
1313
|
const [file, originalSource] = element;
|
|
1313
1314
|
const currentRawSource = originalSource.source().toString();
|
|
1314
1315
|
const chunkHash = assetHashByChunk.get(file);
|
|
@@ -1316,6 +1317,12 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1316
1317
|
const hashKey = `${file}:asset`;
|
|
1317
1318
|
rememberProcessCacheKey(cacheKey, hashKey);
|
|
1318
1319
|
const cssHandlerOptionsForHash = getCssHandlerOptions(file, currentRawSource);
|
|
1320
|
+
const compilationScope = {
|
|
1321
|
+
id: file,
|
|
1322
|
+
kind: cssHandlerOptionsForHash.isMainChunk ? "global" : "component"
|
|
1323
|
+
};
|
|
1324
|
+
const scopeCompilationChanges = affectedCompilationScopes.has(compilationScope.id) ? compilationChanges : void 0;
|
|
1325
|
+
const compilationDependencyRevision = getCompilationDependencyRevision(compilationScope.id);
|
|
1319
1326
|
const cssChunkHash = watchMode && cssHandlerOptionsForHash.isMainChunk ? void 0 : chunkHash;
|
|
1320
1327
|
const cssSourceHash = (() => {
|
|
1321
1328
|
const sourceFile = resolveWebpackCssSourceFile(file, currentRawSource);
|
|
@@ -1324,7 +1331,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1324
1331
|
if (sourceCss === void 0) return sourceFile === void 0 ? "webpack-css-source:0" : `webpack-css-source:0:${sourceFile}`;
|
|
1325
1332
|
return `webpack-css-source:1:${compilerOptions.cache.computeHash(sourceCss)}:${generatorSourceCss === sourceCss || generatorSourceCss === void 0 ? "generator-source:0" : compilerOptions.cache.computeHash(generatorSourceCss)}`;
|
|
1326
1333
|
})();
|
|
1327
|
-
const runtimeAwareHash = createRuntimeAwareCssHash(cssChunkHash, compilerOptions.cache.computeHash(currentRawSource), `${createRuntimeSetHash(getGeneratorRuntimeSet())}:${runtimeAffectingSourceHash}:${webpackSourceCandidates?.signatureHash ?? "source-candidates:0"}:${webpackSourceCandidateValueSignature}:${cssSourceTraceSignature}:${cssSourceHash}`);
|
|
1334
|
+
const runtimeAwareHash = createRuntimeAwareCssHash(cssChunkHash, compilerOptions.cache.computeHash(currentRawSource), `${createRuntimeSetHash(getGeneratorRuntimeSet())}:${runtimeAffectingSourceHash}:${webpackSourceCandidates?.signatureHash ?? "source-candidates:0"}:${webpackSourceCandidateValueSignature}:${cssSourceTraceSignature}:${cssSourceHash}:compiler-dependencies:${compilationDependencyRevision}`);
|
|
1328
1335
|
await enqueueTask(async () => {
|
|
1329
1336
|
await processCachedTask({
|
|
1330
1337
|
cache: compilerOptions.cache,
|
|
@@ -1493,11 +1500,13 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1493
1500
|
file,
|
|
1494
1501
|
cssHandlerOptions: generatorCssHandlerOptions,
|
|
1495
1502
|
cssUserHandlerOptions: getCssUserHandlerOptions(file),
|
|
1503
|
+
compilationChanges: scopeCompilationChanges,
|
|
1496
1504
|
frameworkPostcssOwner: compilerOptions,
|
|
1497
|
-
|
|
1505
|
+
cssStage: "framework-processed",
|
|
1498
1506
|
getSourceCandidatesForEntries: webpackSourceCandidates?.getSourceCandidatesForEntries,
|
|
1499
1507
|
sourceCandidates: scopedGeneratorRuntimeSet,
|
|
1500
1508
|
restoreLocalCssImports: false,
|
|
1509
|
+
scope: compilationScope,
|
|
1501
1510
|
styleHandler: compilerOptions.styleHandler,
|
|
1502
1511
|
debug
|
|
1503
1512
|
};
|
|
@@ -1517,6 +1526,7 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1517
1526
|
generated = void 0;
|
|
1518
1527
|
}
|
|
1519
1528
|
else debug("css generator skipped for plain webpack css asset: %s", file);
|
|
1529
|
+
for (const dependency of generated?.dependencies ?? []) compilation.fileDependencies?.add?.(dependency);
|
|
1520
1530
|
return finalizeWebpackGeneratedCssResult({
|
|
1521
1531
|
ConcatSource,
|
|
1522
1532
|
compilerOptions,
|
|
@@ -1541,89 +1551,49 @@ async function processWebpackGeneratedCssAsset(element, context) {
|
|
|
1541
1551
|
}, cssTaskFactories, "tasks.css");
|
|
1542
1552
|
}
|
|
1543
1553
|
//#endregion
|
|
1544
|
-
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/
|
|
1545
|
-
function
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
function markProcessFile(type, file, processFiles) {
|
|
1561
|
-
if (type === "html" || type === "js" || type === "css") processFiles[type].add(file);
|
|
1554
|
+
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/asset-emission-plan.ts
|
|
1555
|
+
function applyWebpackAssetEmissionPlan(plan, options) {
|
|
1556
|
+
for (const operation of plan.operations()) {
|
|
1557
|
+
if (operation.kind === "delete") {
|
|
1558
|
+
options.compilation.deleteAsset?.(operation.assetId);
|
|
1559
|
+
continue;
|
|
1560
|
+
}
|
|
1561
|
+
const source = typeof operation.source === "string" ? new options.ConcatSource(operation.source) : operation.source;
|
|
1562
|
+
if (options.writeMode !== "update" && !options.compilation.getAsset(operation.assetId)) {
|
|
1563
|
+
if (options.compilation.emitAsset) {
|
|
1564
|
+
options.compilation.emitAsset(operation.assetId, source);
|
|
1565
|
+
continue;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
options.compilation.updateAsset(operation.assetId, source);
|
|
1569
|
+
}
|
|
1562
1570
|
}
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
const runtimeAffectingHashByFile = /* @__PURE__ */ new Map();
|
|
1567
|
-
const changedByType = createChangedByType();
|
|
1568
|
-
const runtimeAffectingChangedByType = createChangedByType();
|
|
1569
|
-
const processFiles = createProcessFiles();
|
|
1571
|
+
//#endregion
|
|
1572
|
+
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.ts
|
|
1573
|
+
function buildWebpackBundleSnapshot(assets, opts, state, compilation, options = {}) {
|
|
1570
1574
|
const entries = [];
|
|
1571
|
-
const firstRun = state.iteration === 0 && state.sourceHashByFile.size === 0;
|
|
1572
1575
|
for (const [file, asset] of Object.entries(assets)) {
|
|
1573
|
-
const type =
|
|
1576
|
+
const type = classifyRuntimeEntry(file, opts);
|
|
1574
1577
|
if (type !== "html" && type !== "js") continue;
|
|
1575
1578
|
const source = stringifyWebpackSource(compilation?.getAsset(file)?.source.source() ?? asset.source());
|
|
1576
|
-
const hash = opts.cache.computeHash(source);
|
|
1577
|
-
sourceHashByFile.set(file, hash);
|
|
1578
|
-
const previousHash = state.sourceHashByFile.get(file);
|
|
1579
|
-
const changed = previousHash == null || previousHash !== hash;
|
|
1580
|
-
const previousRuntimeAffectingHash = state.runtimeAffectingHashByFile.get(file);
|
|
1581
|
-
const runtimeAffectingHash = !changed && previousRuntimeAffectingHash != null ? previousRuntimeAffectingHash : (() => {
|
|
1582
|
-
const runtimeAffectingSignature = createRuntimeAffectingSourceSignature(source, type);
|
|
1583
|
-
runtimeAffectingSignatureByFile.set(file, runtimeAffectingSignature);
|
|
1584
|
-
return opts.cache.computeHash(runtimeAffectingSignature);
|
|
1585
|
-
})();
|
|
1586
|
-
runtimeAffectingHashByFile.set(file, runtimeAffectingHash);
|
|
1587
|
-
if (changed) changedByType[type].add(file);
|
|
1588
|
-
if (previousRuntimeAffectingHash == null || previousRuntimeAffectingHash !== runtimeAffectingHash) runtimeAffectingChangedByType[type].add(file);
|
|
1589
|
-
if (firstRun) markProcessFile(type, file, processFiles);
|
|
1590
|
-
else if (type === "html") processFiles.html.add(file);
|
|
1591
|
-
else if (changed) processFiles.js.add(file);
|
|
1592
1579
|
entries.push({
|
|
1593
1580
|
file,
|
|
1594
|
-
|
|
1595
|
-
fileName: file,
|
|
1596
|
-
name: void 0,
|
|
1597
|
-
names: [],
|
|
1598
|
-
needsCodeReference: false,
|
|
1599
|
-
originalFileName: null,
|
|
1600
|
-
originalFileNames: [],
|
|
1601
|
-
source,
|
|
1602
|
-
type: "asset"
|
|
1603
|
-
},
|
|
1581
|
+
runtimeCandidate: true,
|
|
1604
1582
|
source,
|
|
1605
1583
|
type
|
|
1606
1584
|
});
|
|
1607
1585
|
}
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
runtimeAffectingChangedByType,
|
|
1617
|
-
processFiles,
|
|
1618
|
-
linkedImpactsByEntry: /* @__PURE__ */ new Map()
|
|
1619
|
-
};
|
|
1586
|
+
const currentFiles = new Set(entries.map((entry) => entry.file));
|
|
1587
|
+
const removedFiles = new Set(options.removedFiles);
|
|
1588
|
+
for (const file of state.sourceHashByFile.keys()) if (!currentFiles.has(file)) removedFiles.add(file);
|
|
1589
|
+
return buildRuntimeCompilationSnapshot(entries, state, {
|
|
1590
|
+
computeHash: (source) => opts.cache.computeHash(source),
|
|
1591
|
+
createRuntimeAffectingSignature: createRuntimeAffectingSourceSignature,
|
|
1592
|
+
removedFiles
|
|
1593
|
+
});
|
|
1620
1594
|
}
|
|
1621
1595
|
function releaseWebpackBundleSnapshotSources(snapshot) {
|
|
1622
|
-
for (const entry of snapshot.entries)
|
|
1623
|
-
entry.source = "";
|
|
1624
|
-
if (entry.output.type === "asset") entry.output.source = "";
|
|
1625
|
-
else entry.output.code = "";
|
|
1626
|
-
}
|
|
1596
|
+
for (const entry of snapshot.entries) entry.source = "";
|
|
1627
1597
|
}
|
|
1628
1598
|
function stringifyWebpackSource(source) {
|
|
1629
1599
|
if (typeof source === "string") return source;
|
|
@@ -1636,8 +1606,14 @@ function createWebpackAssetUpdater(options) {
|
|
|
1636
1606
|
return stringifyWebpackSource(asset.source.source());
|
|
1637
1607
|
};
|
|
1638
1608
|
const updateAssetIfChanged = (file, source, { compare = true, notifyUpdate = true } = {}) => {
|
|
1609
|
+
const plan = new AssetEmissionPlan();
|
|
1610
|
+
plan.write(file, source);
|
|
1639
1611
|
if (!compare) {
|
|
1640
|
-
|
|
1612
|
+
applyWebpackAssetEmissionPlan(plan, {
|
|
1613
|
+
compilation: options.compilation,
|
|
1614
|
+
ConcatSource: options.ConcatSource,
|
|
1615
|
+
writeMode: "update"
|
|
1616
|
+
});
|
|
1641
1617
|
return true;
|
|
1642
1618
|
}
|
|
1643
1619
|
const nextSource = typeof source === "string" ? source : stringifyWebpackSource(source.source());
|
|
@@ -1646,7 +1622,11 @@ function createWebpackAssetUpdater(options) {
|
|
|
1646
1622
|
options.debug("asset unchanged, skip update: %s", file);
|
|
1647
1623
|
return false;
|
|
1648
1624
|
}
|
|
1649
|
-
|
|
1625
|
+
applyWebpackAssetEmissionPlan(plan, {
|
|
1626
|
+
compilation: options.compilation,
|
|
1627
|
+
ConcatSource: options.ConcatSource,
|
|
1628
|
+
writeMode: "update"
|
|
1629
|
+
});
|
|
1650
1630
|
if (notifyUpdate) options.onUpdate(file, previousSource ?? "", nextSource);
|
|
1651
1631
|
return true;
|
|
1652
1632
|
};
|
|
@@ -1658,7 +1638,7 @@ function createWebpackAssetUpdater(options) {
|
|
|
1658
1638
|
//#endregion
|
|
1659
1639
|
//#region src/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.ts
|
|
1660
1640
|
async function enqueueWebpackHtmlAndJsTasks(context) {
|
|
1661
|
-
const { ConcatSource, applyWebpackLinkedJsResults, assetHashByChunk, compilation, compilerOptions, debug, defaultTemplateHandlerOptions, enqueueTask, groupedEntries, isWebGeneratorTarget, jsAssets, moduleGraphOptions, outputDir, rememberProcessCacheKey, rememberTransformedRuntimeCandidates, runtimeState, transformRuntimeSet, updateAssetIfChanged } = context;
|
|
1641
|
+
const { ConcatSource, applyWebpackLinkedJsResults, assetHashByChunk, compilation, compilerOptions, debug, defaultTemplateHandlerOptions, enqueueTask, groupedEntries, isWebGeneratorTarget, jsAssets, moduleGraphOptions, outputDir, rememberProcessCacheKey, rememberTransformedRuntimeCandidates, runtimeState, transformRuntimeSet, updateAssetIfChanged, watchMode } = context;
|
|
1662
1642
|
const htmlTaskFactories = [];
|
|
1663
1643
|
if (!isWebGeneratorTarget && Array.isArray(groupedEntries.html)) for (const element of groupedEntries.html) {
|
|
1664
1644
|
const [file, originalSource] = element;
|
|
@@ -1710,6 +1690,7 @@ async function enqueueWebpackHtmlAndJsTasks(context) {
|
|
|
1710
1690
|
const initialSource = asset.source.source();
|
|
1711
1691
|
const initialRawSource = typeof initialSource === "string" ? initialSource : initialSource.toString();
|
|
1712
1692
|
const chunkHash = assetHashByChunk.get(file);
|
|
1693
|
+
const outputModuleGraphOptions = chunkHash === void 0 ? moduleGraphOptions : void 0;
|
|
1713
1694
|
await enqueueJsTask(async () => {
|
|
1714
1695
|
await processCachedTask({
|
|
1715
1696
|
cache: compilerOptions.cache,
|
|
@@ -1732,8 +1713,9 @@ async function enqueueWebpackHtmlAndJsTasks(context) {
|
|
|
1732
1713
|
const handlerOptions = {
|
|
1733
1714
|
tailwindcssMajorVersion: runtimeState.tailwindRuntime.majorVersion,
|
|
1734
1715
|
generateMap: false,
|
|
1716
|
+
experimentalJsFastPath: compilerOptions.experimentalJsFastPath ?? (watchMode ? "oxc" : false),
|
|
1735
1717
|
filename: absoluteFile,
|
|
1736
|
-
moduleGraph:
|
|
1718
|
+
moduleGraph: outputModuleGraphOptions,
|
|
1737
1719
|
babelParserOptions: { sourceFilename: absoluteFile }
|
|
1738
1720
|
};
|
|
1739
1721
|
if (shouldSkipJsTransform(currentSource, {
|
|
@@ -1791,6 +1773,8 @@ function createWebpackJsAssetModuleGraph(options) {
|
|
|
1791
1773
|
}
|
|
1792
1774
|
function applyWebpackLinkedJsResults(options) {
|
|
1793
1775
|
if (!options.linked) return;
|
|
1776
|
+
const plan = new AssetEmissionPlan();
|
|
1777
|
+
const updates = [];
|
|
1794
1778
|
for (const [id, { code }] of Object.entries(options.linked)) {
|
|
1795
1779
|
const assetName = options.jsAssets.get(id);
|
|
1796
1780
|
if (!assetName) continue;
|
|
@@ -1799,8 +1783,20 @@ function applyWebpackLinkedJsResults(options) {
|
|
|
1799
1783
|
const previousSource = asset.source.source();
|
|
1800
1784
|
const previous = previousSource == null ? "" : String(previousSource);
|
|
1801
1785
|
if (previous === code) continue;
|
|
1802
|
-
|
|
1803
|
-
|
|
1786
|
+
plan.write(assetName, code);
|
|
1787
|
+
updates.push({
|
|
1788
|
+
assetName,
|
|
1789
|
+
code,
|
|
1790
|
+
previous
|
|
1791
|
+
});
|
|
1792
|
+
}
|
|
1793
|
+
if (updates.length === 0) return;
|
|
1794
|
+
applyWebpackAssetEmissionPlan(plan, {
|
|
1795
|
+
compilation: options.compilation,
|
|
1796
|
+
ConcatSource: options.ConcatSource,
|
|
1797
|
+
writeMode: "update"
|
|
1798
|
+
});
|
|
1799
|
+
for (const { assetName, code, previous } of updates) {
|
|
1804
1800
|
options.compilerOptions.onUpdate(assetName, previous, code);
|
|
1805
1801
|
options.debug("js linked handle: %s", assetName);
|
|
1806
1802
|
}
|
|
@@ -2121,7 +2117,7 @@ async function refreshWebpackSourceCandidates(options) {
|
|
|
2121
2117
|
const root = options.compilerOptions.tailwindcssBasedir ?? process.cwd();
|
|
2122
2118
|
let sourceScan;
|
|
2123
2119
|
try {
|
|
2124
|
-
sourceScan = await
|
|
2120
|
+
sourceScan = await resolveSourceScanEntries(options.compilerOptions, options.runtimeState.tailwindRuntime, {
|
|
2125
2121
|
root,
|
|
2126
2122
|
outDir: options.outputDir
|
|
2127
2123
|
});
|
|
@@ -2158,11 +2154,10 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2158
2154
|
const cssHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
2159
2155
|
const cssUserHandlerOptionsCache = /* @__PURE__ */ new Map();
|
|
2160
2156
|
const webpackSourceCandidateScanCache = createWebpackSourceCandidateScanCache();
|
|
2161
|
-
const bundleBuildState =
|
|
2162
|
-
const bundleRuntimeClassSetManager = runtimeClassSetManager ??
|
|
2157
|
+
const bundleBuildState = createRuntimeCompilationBuildState();
|
|
2158
|
+
const bundleRuntimeClassSetManager = runtimeClassSetManager ?? createRuntimeClassSetManager();
|
|
2163
2159
|
const escapeFragments = createEscapeFragments(MappingChars2String);
|
|
2164
2160
|
const processedCssAssetSkipDecisionCache = /* @__PURE__ */ new Map();
|
|
2165
|
-
let webpackWatchRuntimeScanInitialized = false;
|
|
2166
2161
|
compiler.hooks.compilation.tap(pluginName, (compilation) => {
|
|
2167
2162
|
compilation.hooks.processAssets.tapPromise({
|
|
2168
2163
|
name: pluginName,
|
|
@@ -2172,6 +2167,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2172
2167
|
if (entries.length === 0) return;
|
|
2173
2168
|
const groupedEntries = getGroupedEntries(entries, compilerOptions);
|
|
2174
2169
|
if (isWebGeneratorTarget && groupedEntries.css.length === 0) return;
|
|
2170
|
+
beginCompilerShadowRun(runtimeState);
|
|
2175
2171
|
compilerOptions.onStart();
|
|
2176
2172
|
debug("start");
|
|
2177
2173
|
await runtimeState.readyPromise;
|
|
@@ -2207,6 +2203,9 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2207
2203
|
cssMatcher: compilerOptions.cssMatcher
|
|
2208
2204
|
}));
|
|
2209
2205
|
const watchChangedFiles = new Set([...getWatchChangedFiles?.() ?? []].map((file) => path.resolve(file)));
|
|
2206
|
+
const compilationChanges = createCompilationDependencyChanges(watchChangedFiles);
|
|
2207
|
+
const affectedCompilationScopes = recordCompilationDependencyChanges(runtimeState, compilationChanges);
|
|
2208
|
+
const getCompilationDependencyRevision = (scopeId) => getCompilationScopeDependencyRevision(runtimeState, scopeId);
|
|
2210
2209
|
const taskConcurrency = watchMode ? resolveTaskConcurrency(1) : void 0;
|
|
2211
2210
|
const activeProcessCacheKeys = /* @__PURE__ */ new Set();
|
|
2212
2211
|
const activeProcessHashKeys = /* @__PURE__ */ new Set();
|
|
@@ -2273,8 +2272,8 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2273
2272
|
else if (watchMode && !forceRuntimeRefresh) {
|
|
2274
2273
|
const baseRuntimeSet = getRuntimeClassSetSync(runtimeState.tailwindRuntime);
|
|
2275
2274
|
const snapshot = buildWebpackBundleSnapshot(assets, compilerOptions, bundleBuildState, compilation);
|
|
2276
|
-
if (
|
|
2277
|
-
runtimeAffectingSourceHash =
|
|
2275
|
+
if (bundleBuildState.iteration === 0) for (const entry of snapshot.entries) snapshot.runtimeAffectingChangedByType[entry.type].add(entry.file);
|
|
2276
|
+
runtimeAffectingSourceHash = createRuntimeCompilationAffectingSignature(snapshot, (source) => compilerOptions.cache.computeHash(source));
|
|
2278
2277
|
try {
|
|
2279
2278
|
runtimeSet = await bundleRuntimeClassSetManager.sync(runtimeState.tailwindRuntime, snapshot, {
|
|
2280
2279
|
baseClassSet: baseRuntimeSet,
|
|
@@ -2286,12 +2285,11 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2286
2285
|
runtimeSet = getRuntimeClassSetSync(runtimeState.tailwindRuntime);
|
|
2287
2286
|
}
|
|
2288
2287
|
releaseWebpackBundleSnapshotSources(snapshot);
|
|
2289
|
-
|
|
2290
|
-
webpackWatchRuntimeScanInitialized = true;
|
|
2288
|
+
updateRuntimeCompilationBuildState(bundleBuildState, snapshot, /* @__PURE__ */ new Map(), { incremental: true });
|
|
2291
2289
|
} else {
|
|
2292
2290
|
if (forceRuntimeRefresh) {
|
|
2293
2291
|
await bundleRuntimeClassSetManager.reset();
|
|
2294
|
-
|
|
2292
|
+
resetRuntimeCompilationBuildState(bundleBuildState);
|
|
2295
2293
|
}
|
|
2296
2294
|
runtimeSet = await ensureRuntimeClassSet(runtimeState, {
|
|
2297
2295
|
forceRefresh: forceRuntimeRefresh,
|
|
@@ -2391,12 +2389,15 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2391
2389
|
rememberTransformedRuntimeCandidates,
|
|
2392
2390
|
runtimeState,
|
|
2393
2391
|
transformRuntimeSet,
|
|
2394
|
-
updateAssetIfChanged
|
|
2392
|
+
updateAssetIfChanged,
|
|
2393
|
+
watchMode
|
|
2395
2394
|
});
|
|
2396
2395
|
const cssTaskContext = {
|
|
2397
2396
|
ConcatSource,
|
|
2397
|
+
affectedCompilationScopes,
|
|
2398
2398
|
assetHashByChunk,
|
|
2399
2399
|
compilation,
|
|
2400
|
+
compilationChanges,
|
|
2400
2401
|
compilerOptions,
|
|
2401
2402
|
configuredCssEntryFiles,
|
|
2402
2403
|
configuredMainCssEntryFiles,
|
|
@@ -2410,6 +2411,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2410
2411
|
finalizeTracedCss,
|
|
2411
2412
|
generatedCssSources,
|
|
2412
2413
|
generatorRuntimeSet,
|
|
2414
|
+
getCompilationDependencyRevision,
|
|
2413
2415
|
getCssHandlerOptions,
|
|
2414
2416
|
getCssUserHandlerOptions,
|
|
2415
2417
|
getGeneratorRuntimeSet,
|
|
@@ -2458,6 +2460,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2458
2460
|
watchMode,
|
|
2459
2461
|
webpackSourceCandidateScanCache
|
|
2460
2462
|
});
|
|
2463
|
+
finalizeCompilerShadowRun(runtimeState);
|
|
2461
2464
|
});
|
|
2462
2465
|
if (!isWebGeneratorTarget) compilation.hooks.processAssets.tapPromise({
|
|
2463
2466
|
name: `${pluginName}:finalize-css-assets`,
|
|
@@ -2478,7 +2481,7 @@ function setupWebpackV5ProcessAssetsHook(options) {
|
|
|
2478
2481
|
});
|
|
2479
2482
|
}
|
|
2480
2483
|
//#endregion
|
|
2481
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.
|
|
2484
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.12_@volar+typescript@2.4.28_oxc-resolver@11.20.0_tsx@4.23.1_typescript@6.0._aa54d75c0ba96fdb34ddc2494c359153/node_modules/tsdown/esm-shims.js
|
|
2482
2485
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
2483
2486
|
const getDirname = () => path.dirname(getFilename());
|
|
2484
2487
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -2891,12 +2894,12 @@ function setupWebpackV5Loaders(options) {
|
|
|
2891
2894
|
uniAppX: compilerOptions.uniAppX
|
|
2892
2895
|
});
|
|
2893
2896
|
if (shouldRewriteCssImports && mpxCssImportRewrite) ensureMpxTailwindcssAliases(compiler, weappTailwindcssPackageDir);
|
|
2894
|
-
const runtimeClassSetLoader = runtimeLoaderPath ?? path.resolve(__dirname, "./weapp-tw-runtime-classset-loader.
|
|
2897
|
+
const runtimeClassSetLoader = runtimeLoaderPath ?? path.resolve(__dirname, "./weapp-tw-runtime-classset-loader.cjs");
|
|
2895
2898
|
const shouldInjectRuntimeClassSetLoader = !generatorBranch.isWeb;
|
|
2896
2899
|
const shouldInjectCssGenerationLoader = generatorOptions.enabled && runtimeState.tailwindRuntime.majorVersion === 4 && (generatorTarget === "web" || generatorTarget === "weapp");
|
|
2897
2900
|
const shouldInjectCssImportRewriteLoader = shouldRewriteCssImports || shouldInjectCssGenerationLoader;
|
|
2898
|
-
const runtimeCssGenerationLoader = shouldInjectCssGenerationLoader ? path.resolve(__dirname, "./weapp-tw-css-generation-loader.
|
|
2899
|
-
const runtimeCssImportRewriteLoader = shouldInjectCssImportRewriteLoader ? path.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.
|
|
2901
|
+
const runtimeCssGenerationLoader = shouldInjectCssGenerationLoader ? path.resolve(__dirname, "./weapp-tw-css-generation-loader.cjs") : void 0;
|
|
2902
|
+
const runtimeCssImportRewriteLoader = shouldInjectCssImportRewriteLoader ? path.resolve(__dirname, "./weapp-tw-css-import-rewrite-loader.cjs") : void 0;
|
|
2900
2903
|
const runtimeClassSetLoaderExists = fs.existsSync(runtimeClassSetLoader);
|
|
2901
2904
|
const runtimeCssGenerationLoaderExists = runtimeCssGenerationLoader ? fs.existsSync(runtimeCssGenerationLoader) : false;
|
|
2902
2905
|
const runtimeCssImportRewriteLoaderExists = runtimeCssImportRewriteLoader ? fs.existsSync(runtimeCssImportRewriteLoader) : false;
|
|
@@ -2922,6 +2925,7 @@ function setupWebpackV5Loaders(options) {
|
|
|
2922
2925
|
});
|
|
2923
2926
|
const cleanupWebpackLoaderRuntime = () => {
|
|
2924
2927
|
deleteWebpackLoaderRuntime(runtimeRegistryKey);
|
|
2928
|
+
disposeCompilerOwner(runtimeState);
|
|
2925
2929
|
};
|
|
2926
2930
|
compiler.hooks.watchClose?.tap?.(pluginName, cleanupWebpackLoaderRuntime);
|
|
2927
2931
|
compiler.hooks.shutdown?.tap?.(pluginName, cleanupWebpackLoaderRuntime);
|
package/dist/webpack.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_webpack = require("./webpack-Dao6bWEj.cjs");
|
|
3
|
+
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
|
+
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
|
+
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir, } from './bundlers/webpack/index';
|
|
2
|
-
export type { UserDefinedOptions } from './types';
|
|
1
|
+
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir, } from './bundlers/webpack/index.js';
|
|
2
|
+
export type { UserDefinedOptions } from './types/index.js';
|
package/dist/webpack.js
CHANGED
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
|
-
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
|
-
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-dAY9h8r8.js";
|
|
2
|
+
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
package/dist/wxml/Tokenizer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Token } from './tokenizer/types';
|
|
2
|
-
export type { Expression, Token } from './tokenizer/types';
|
|
1
|
+
import type { Token } from './tokenizer/types.js';
|
|
2
|
+
export type { Expression, Token } from './tokenizer/types.js';
|
|
3
3
|
export declare class Tokenizer {
|
|
4
4
|
private state;
|
|
5
5
|
private buffer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ICustomAttributesEntities, ItemOrItemArray } from '../types';
|
|
1
|
+
import type { ICustomAttributesEntities, ItemOrItemArray } from '../types/index.js';
|
|
2
2
|
export type AttributeMatcher = (tag: string, attr: string) => boolean;
|
|
3
3
|
export declare function isPropsMatch(props: ItemOrItemArray<string | RegExp>, attr: string): boolean;
|
|
4
4
|
export declare function createAttributeMatcher(entities?: ICustomAttributesEntities): AttributeMatcher | undefined;
|
package/dist/wxml/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { replaceWxml } from './shared';
|
|
2
|
-
export { createTemplateHandler, customTemplateHandler, generateCode, templateReplacer } from './utils';
|
|
1
|
+
export { replaceWxml } from './shared.js';
|
|
2
|
+
export { createTemplateHandler, customTemplateHandler, generateCode, templateReplacer } from './utils.js';
|
package/dist/wxml/shared.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../types';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../types/index.js';
|
|
2
2
|
export declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../../../types';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../../../types/index.js';
|
|
2
2
|
export declare function rewriteLegacyExpression(match: string, options: ITemplateHandlerOptions): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TraverseOptions } from '@babel/traverse';
|
|
2
|
-
import type { JsTokenUpdater } from '../../../js/JsTokenUpdater';
|
|
3
|
-
import type { ITemplateHandlerOptions } from '../../../types';
|
|
2
|
+
import type { JsTokenUpdater } from '../../../js/JsTokenUpdater.js';
|
|
3
|
+
import type { ITemplateHandlerOptions } from '../../../types/index.js';
|
|
4
4
|
export declare function createLegacyTraverseOptions(options: ITemplateHandlerOptions, jsTokenUpdater: JsTokenUpdater): TraverseOptions & {
|
|
5
5
|
noScope: true;
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../../types';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
2
2
|
export declare function generateCode(match: string, options?: ITemplateHandlerOptions): string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../../types';
|
|
2
|
-
import type { AttributeMatcher } from '../custom-attributes';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
2
|
+
import type { AttributeMatcher } from '../custom-attributes.js';
|
|
3
3
|
export declare function customTemplateHandler(rawSource: string, options: Required<ITemplateHandlerOptions>, cachedMatcher?: AttributeMatcher | undefined): Promise<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type MagicString from 'magic-string';
|
|
2
|
-
import type { ITemplateHandlerOptions } from '../../types';
|
|
3
|
-
import type { Expression } from '../Tokenizer';
|
|
2
|
+
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
3
|
+
import type { Expression } from '../Tokenizer.js';
|
|
4
4
|
export declare function updateWhitespaceGap(ms: MagicString, start: number, end: number, options: ITemplateHandlerOptions): void;
|
|
5
5
|
export declare function updateWxmlSegment(ms: MagicString, start: number, end: number, options: ITemplateHandlerOptions, keepEOL: boolean, ignoreHead: boolean): void;
|
|
6
6
|
export declare function updateExpressionSegment(ms: MagicString, exp: Expression, options: ITemplateHandlerOptions): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type MagicString from 'magic-string';
|
|
2
|
-
import type { ITemplateHandlerOptions } from '../../types';
|
|
3
|
-
import type { Token } from '../Tokenizer';
|
|
2
|
+
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
3
|
+
import type { Token } from '../Tokenizer.js';
|
|
4
4
|
export declare function handleEachClassFragment(ms: MagicString, tokens: Token[], options?: ITemplateHandlerOptions): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../../types';
|
|
2
|
-
import { Tokenizer } from '../Tokenizer';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../../types/index.js';
|
|
2
|
+
import { Tokenizer } from '../Tokenizer.js';
|
|
3
3
|
export declare function templateReplacer(original: string, options?: ITemplateHandlerOptions, tokenizer?: Tokenizer): string;
|
package/dist/wxml/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from '../types';
|
|
2
|
-
import { isPropsMatch } from './custom-attributes';
|
|
3
|
-
import { generateCode } from './utils/codegen';
|
|
4
|
-
import { customTemplateHandler } from './utils/custom-template';
|
|
5
|
-
import { templateReplacer } from './utils/template-fragments';
|
|
1
|
+
import type { ITemplateHandlerOptions } from '../types/index.js';
|
|
2
|
+
import { isPropsMatch } from './custom-attributes.js';
|
|
3
|
+
import { generateCode } from './utils/codegen.js';
|
|
4
|
+
import { customTemplateHandler } from './utils/custom-template.js';
|
|
5
|
+
import { templateReplacer } from './utils/template-fragments.js';
|
|
6
6
|
export { isPropsMatch };
|
|
7
7
|
export { customTemplateHandler, generateCode, templateReplacer };
|
|
8
8
|
export declare function createTemplateHandler(options?: Omit<ITemplateHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITemplateHandlerOptions, "runtimeSet">) => Promise<string>;
|