weapp-tailwindcss 5.2.11 → 5.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -1
- package/dist/bundlers/shared/hmr-timing.d.ts +1 -0
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +2 -0
- package/dist/bundlers/vite/css-finalizer/generic-web-fast-path.d.ts +16 -0
- package/dist/bundlers/vite/css-finalizer/options.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -0
- package/dist/bundlers/vite/shared/generic-web-production-fast-path.d.ts +28 -0
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -0
- package/dist/cli.cjs +372 -293
- package/dist/cli.js +20 -11
- package/dist/{context-DbL0d-zB.js → context-CKQKq4Mv.js} +19 -8
- package/dist/{context-C3TryIjF.cjs → context-vWlNv-Cf.cjs} +17 -11
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-imports-DfNC3e6a.cjs → css-imports-BFMU7Hpd.cjs} +1 -1
- package/dist/css-macro/postcss.cjs +1 -1
- package/dist/css-macro.cjs +1 -1
- package/dist/defaults.cjs +2 -0
- package/dist/defaults.js +2 -0
- package/dist/framework.cjs +1 -1
- package/dist/{generator-BLpOsd5O.js → generator-BP4WmgIo.js} +36 -15
- package/dist/{generator-B0dCFlP1.cjs → generator-BXrWA7Sj.cjs} +43 -22
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-DSrcDQsA.cjs → gulp-DxKLSgXX.cjs} +16 -13
- package/dist/{gulp-BLaGc0MJ.js → gulp-G--cGMcR.js} +12 -9
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-BnGBBJ6S.cjs → hmr-timing-BtqnyxAO.cjs} +5 -5
- package/dist/{hmr-timing-DXyGw6jp.js → hmr-timing-iTua_Z55.js} +47 -16
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{object-Bvy6-w9r.js → object-B-8IHefx.js} +4 -4
- package/dist/{object-C_Vr6_S5.cjs → object-DbHtAXRk.cjs} +4 -4
- package/dist/{options-zpZez7qe.cjs → options-DbYws6lr.cjs} +8 -17
- package/dist/{pipeline-helpers-B5CzvTUJ.cjs → pipeline-helpers-DnYpfbat.cjs} +25 -10
- package/dist/postcss-html-transform.cjs +1 -1
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +6 -5
- package/dist/presets.js +4 -3
- package/dist/reset.cjs +1 -1
- package/dist/{rolldown-runtime-CVvi-lCc.cjs → rolldown-runtime-Ctb5zv51.cjs} +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +1 -1
- package/dist/{runtime-registry-Y7NrD2WH.cjs → runtime-registry-BlIjpImP.cjs} +10 -0
- package/dist/{source-candidate-scan-signature-GjsLzP8Z.cjs → source-candidate-scan-signature-Ggn8fzkT.cjs} +6 -5
- package/dist/{source-candidate-scan-signature-xgmxO8_F.js → source-candidate-scan-signature-TKJIs7VF.js} +5 -4
- package/dist/{style-options-COpQc8fr.cjs → style-options-Cta1OP3i.cjs} +9 -4
- package/dist/{tailwindcss-2zdmASlM.js → tailwindcss-C2K-vjJv.js} +20 -20
- package/dist/{tailwindcss-LtnGCxF0.cjs → tailwindcss-D1M2xj5O.cjs} +17 -13
- package/dist/{transform-BlsDWgjt.js → transform-52FLRu-0.js} +2 -2
- package/dist/{transform-9wbmvHcC.cjs → transform-BiHG42Rp.cjs} +2 -2
- package/dist/types/user-defined-options/general.d.ts +2 -0
- package/dist/{v4-generation-core-D4zQcQqW.cjs → v4-generation-core-D-zVR2mt.cjs} +53 -16
- package/dist/{vite-BWmBFzgf.js → vite-B577QMUl.js} +317 -82
- package/dist/{vite-DTDbD-95.cjs → vite-BFWJAH16.cjs} +322 -87
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-BZGubvuJ.cjs → watch-dependencies-DLZDrWdH.cjs} +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +14 -12
- package/dist/weapp-tw-runtime-classset-loader.cjs +5 -4
- package/dist/{webpack-CtUyQNqC.js → webpack-DLJkStre.js} +41 -22
- package/dist/{webpack-Bpovb6YE.cjs → webpack-DTqFKvcE.cjs} +46 -36
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/{wxml-CWJc0yY-.js → wxml-B7OAVpXJ.js} +10 -6
- package/dist/{wxml-DUIdXCVa.cjs → wxml-CQmBCjOR.cjs} +386 -311
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_generator = require("./generator-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
3
3
|
let node_fs = require("node:fs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -599,6 +599,7 @@ function createResolvedV4CssScanInput(entries, inlineCandidates, explicit) {
|
|
|
599
599
|
}
|
|
600
600
|
async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
601
601
|
const sourceOptions = require_generator.resolveTailwindV4SourceOptionsFromRuntime(runtime);
|
|
602
|
+
const configuredSourceEntries = sourceOptions.sources ?? [];
|
|
602
603
|
const cssEntries = collectExistingCssEntries(options);
|
|
603
604
|
if (cssEntries.length === 0 && !sourceOptions.css && !sourceOptions.cssSources?.length) {
|
|
604
605
|
const scanRoot = scanOptions.root;
|
|
@@ -611,7 +612,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
611
612
|
const entries = [];
|
|
612
613
|
const cssInlineCandidates = [];
|
|
613
614
|
const dependencies = /* @__PURE__ */ new Set();
|
|
614
|
-
let explicit =
|
|
615
|
+
let explicit = configuredSourceEntries.length > 0;
|
|
615
616
|
let readableCssEntryCount = 0;
|
|
616
617
|
for (const cssEntry of cssEntries) {
|
|
617
618
|
addSourceScanDependency(dependencies, cssEntry);
|
|
@@ -633,13 +634,13 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
633
634
|
const inlineCandidates = mergeTailwindInlineSourceCandidates(cssInlineCandidates);
|
|
634
635
|
const scanEntries = createMergedCssEntrySourceScanEntries(entries, { sourceCount: readableCssEntryCount });
|
|
635
636
|
if (scanEntries.length > 0 || inlineCandidates || explicit || readableCssEntryCount > 0) return createResolvedSourceScan({
|
|
636
|
-
entries: resolveExplicitSourceScanEntries(scanEntries, explicit),
|
|
637
|
+
entries: resolveExplicitSourceScanEntries([...configuredSourceEntries, ...scanEntries], explicit),
|
|
637
638
|
explicit,
|
|
638
639
|
inlineCandidates
|
|
639
640
|
}, dependencies);
|
|
640
641
|
if (typeof sourceOptions.css === "string" && sourceOptions.css.length > 0) {
|
|
641
642
|
const resolved = await resolveTailwindV4EntriesFromCssCached(sourceOptions.css, sourceOptions.base ?? sourceOptions.projectRoot ?? node_process.default.cwd());
|
|
642
|
-
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries, resolved.inlineCandidates, resolved.explicit), new Set(resolved.dependencies)) : void 0;
|
|
643
|
+
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput([...configuredSourceEntries, ...resolved.entries], resolved.inlineCandidates, explicit || resolved.explicit), new Set(resolved.dependencies)) : void 0;
|
|
643
644
|
}
|
|
644
645
|
const sourceOptionBase = sourceOptions.base ?? sourceOptions.projectRoot ?? node_process.default.cwd();
|
|
645
646
|
const configuredCssSources = collectConfiguredCssSources(options);
|
|
@@ -659,7 +660,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
659
660
|
const cssSourceCount = (sourceOptions.cssSources?.length ?? 0) + configuredCssSources.length;
|
|
660
661
|
const cssSourceScanEntries = createMergedCssEntrySourceScanEntries(entries, { sourceCount: cssSourceCount });
|
|
661
662
|
if (cssSourceScanEntries.length > 0 || cssSourceInlineCandidates || explicit) return createResolvedSourceScan({
|
|
662
|
-
entries: resolveExplicitSourceScanEntries(cssSourceScanEntries, explicit),
|
|
663
|
+
entries: resolveExplicitSourceScanEntries([...configuredSourceEntries, ...cssSourceScanEntries], explicit),
|
|
663
664
|
explicit,
|
|
664
665
|
inlineCandidates: cssSourceInlineCandidates
|
|
665
666
|
}, dependencies);
|
|
@@ -668,11 +669,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
668
669
|
addSourceScanDependency(dependencies, source.file);
|
|
669
670
|
addSourceScanDependencies(dependencies, source.dependencies);
|
|
670
671
|
const resolved = await resolveTailwindV4EntriesFromCssCached(source.css, source.base);
|
|
671
|
-
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries.length > 0 ? resolved.entries :
|
|
672
|
-
}
|
|
673
|
-
function createSourceScanMatcher(entries) {
|
|
674
|
-
if (entries?.length === 0) return () => false;
|
|
675
|
-
return require_generator.createTailwindSourceEntryMatcher(entries);
|
|
672
|
+
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries.length > 0 ? [...configuredSourceEntries, ...resolved.entries] : configuredSourceEntries, resolved.inlineCandidates, explicit || (resolved.entries.length > 0 ? resolved.explicit : false)), /* @__PURE__ */ new Set([...dependencies, ...resolved.dependencies])) : void 0;
|
|
676
673
|
}
|
|
677
674
|
//#endregion
|
|
678
675
|
//#region src/uni-app-x/options.ts
|
|
@@ -719,12 +716,6 @@ Object.defineProperty(exports, "collectCssInlineSourceCandidates", {
|
|
|
719
716
|
return collectCssInlineSourceCandidates;
|
|
720
717
|
}
|
|
721
718
|
});
|
|
722
|
-
Object.defineProperty(exports, "createSourceScanMatcher", {
|
|
723
|
-
enumerable: true,
|
|
724
|
-
get: function() {
|
|
725
|
-
return createSourceScanMatcher;
|
|
726
|
-
}
|
|
727
|
-
});
|
|
728
719
|
Object.defineProperty(exports, "discoverTailwindV4CssEntries", {
|
|
729
720
|
enumerable: true,
|
|
730
721
|
get: function() {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-D-zVR2mt.cjs");
|
|
4
4
|
const require_defaults = require("./defaults.cjs");
|
|
5
|
-
const require_style_options = require("./style-options-
|
|
5
|
+
const require_style_options = require("./style-options-Cta1OP3i.cjs");
|
|
6
6
|
let node_path = require("node:path");
|
|
7
7
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
8
8
|
let node_process = require("node:process");
|
|
@@ -465,11 +465,15 @@ function includesTailwindPreflightImport(source) {
|
|
|
465
465
|
function finalizeMiniProgramUserCssAssetSource(source, compilerOptions, isWebGeneratorTarget, options = {}) {
|
|
466
466
|
const styleOptions = require_style_options.resolveStyleOptionsFromContext(compilerOptions);
|
|
467
467
|
if (isWebGeneratorTarget) return source;
|
|
468
|
-
|
|
468
|
+
const output = removeTailwindV4StandaloneHostPreflightRule((0, _weapp_tailwindcss_postcss.finalizeMiniProgramCss)(require_generator.removeMiniProgramInteractiveSelectors(source, {
|
|
469
|
+
active: styleOptions.cssRemoveActivePseudoClass ?? true,
|
|
470
|
+
hover: styleOptions.cssRemoveHoverPseudoClass ?? true
|
|
471
|
+
}), {
|
|
469
472
|
cssPreflight: options.cssPreflight === false ? false : !require_v4_generation_core.hasMiniProgramTailwindV4PreflightReset(source) ? resolveConfiguredWebpackCssPreflight(compilerOptions, styleOptions) : void 0,
|
|
470
473
|
isTailwindcssV4: true,
|
|
471
474
|
tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
|
|
472
|
-
}))
|
|
475
|
+
}));
|
|
476
|
+
return (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(output);
|
|
473
477
|
}
|
|
474
478
|
function shouldFallbackToWebpackUserCssOnGeneratorError(options) {
|
|
475
479
|
return !require_generator.hasTailwindRootDirectives(options.generatorRawSource, { importFallback: true }) && !require_generator.hasTailwindSourceDirectives(options.generatorRawSource, { importFallback: true }) && !require_generator.hasTailwindApplyDirective(options.generatorRawSource) && !options.hasExplicitTailwindV4SourceCss && options.configuredMainCssEntryFilesLength === 0;
|
|
@@ -486,7 +490,8 @@ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTa
|
|
|
486
490
|
const styleOptions = require_style_options.resolveStyleOptionsFromContext(compilerOptions);
|
|
487
491
|
if (isWebGeneratorTarget) {
|
|
488
492
|
if (options.generatedCss === true) return stripTrailingLineWhitespace(require_generator.stripUnmatchedTailwindSourceMediaCloseFragments(require_generator.stripTailwindSourceMediaFragments(require_v4_generation_core.stripBundlerGeneratedCssMarkers(source))));
|
|
489
|
-
|
|
493
|
+
const finalized = require_generator.removeTailwindSourceDirectives(require_v4_generation_core.stripBundlerGeneratedCssMarkers(source), { importFallback: true });
|
|
494
|
+
return stripTrailingLineWhitespace(require_generator.stripUnmatchedTailwindSourceMediaCloseFragments(require_generator.stripTailwindSourceMediaFragments(require_generator.removeTailwindV4GeneratorAtRules(finalized))));
|
|
490
495
|
}
|
|
491
496
|
let finalized = require_generator.removeTailwindSourceDirectives(require_v4_generation_core.stripBundlerGeneratedCssMarkers(source), { importFallback: true });
|
|
492
497
|
if (options.generatedCss !== true) {
|
|
@@ -496,7 +501,10 @@ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTa
|
|
|
496
501
|
tailwindcssV4GradientFallback: styleOptions.tailwindcssV4GradientFallback
|
|
497
502
|
});
|
|
498
503
|
finalized = dedupeMiniProgramPreflightSelectorRules(finalized);
|
|
499
|
-
return (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(require_generator.
|
|
504
|
+
return (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(require_generator.removeMiniProgramInteractiveSelectors(finalized, {
|
|
505
|
+
active: styleOptions.cssRemoveActivePseudoClass ?? true,
|
|
506
|
+
hover: styleOptions.cssRemoveHoverPseudoClass ?? true
|
|
507
|
+
}));
|
|
500
508
|
}
|
|
501
509
|
try {
|
|
502
510
|
finalized = (0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(finalized, { preservePreflight: options.cssPreflight !== false });
|
|
@@ -512,12 +520,19 @@ function finalizeWebpackCssAssetSource(source, compilerOptions, isWebGeneratorTa
|
|
|
512
520
|
finalized = ensureWebpackMiniProgramTwContentInit(finalized);
|
|
513
521
|
if (shouldRemoveExistingPreflight) finalized = removeMiniProgramPreflightSelectorRule(finalized);
|
|
514
522
|
else finalized = dedupeMiniProgramPreflightSelectorRules(finalized);
|
|
515
|
-
return (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(require_generator.
|
|
523
|
+
return (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(require_generator.removeMiniProgramInteractiveSelectors(finalized, {
|
|
524
|
+
active: styleOptions.cssRemoveActivePseudoClass ?? true,
|
|
525
|
+
hover: styleOptions.cssRemoveHoverPseudoClass ?? true
|
|
526
|
+
}));
|
|
516
527
|
}
|
|
517
528
|
function finalizeWebpackCssAssetOutputSource(source, compilerOptions, isWebGeneratorTarget) {
|
|
518
529
|
if (isWebGeneratorTarget) return source;
|
|
519
530
|
const styleOptions = require_style_options.resolveStyleOptionsFromContext(compilerOptions);
|
|
520
|
-
|
|
531
|
+
const finalized = (0, _weapp_tailwindcss_postcss.stripMiniProgramCssSpecificityPlaceholders)(require_generator.removeMiniProgramInteractiveSelectors((0, _weapp_tailwindcss_postcss.dedupeCoveredCssRules)(dedupeMiniProgramPreflightSelectorRules(source)), {
|
|
532
|
+
active: styleOptions.cssRemoveActivePseudoClass ?? true,
|
|
533
|
+
hover: styleOptions.cssRemoveHoverPseudoClass ?? true
|
|
534
|
+
}));
|
|
535
|
+
return require_v4_generation_core.finalizeMiniProgramCssStructure(finalized);
|
|
521
536
|
}
|
|
522
537
|
function collectWebpackJsRuntimeCandidatesFromAssets(options) {
|
|
523
538
|
if (options.isWebGeneratorTarget) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
let _weapp_tailwindcss_postcss_html_transform = require("@weapp-tailwindcss/postcss/html-transform");
|
|
3
3
|
_weapp_tailwindcss_postcss_html_transform = require_rolldown_runtime.__toESM(_weapp_tailwindcss_postcss_html_transform, 1);
|
|
4
4
|
//#region src/postcss-html-transform.ts
|
package/dist/postcss.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_generator = require("./generator-
|
|
5
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
6
6
|
const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss").createWeappTailwindcssPostcssPlugin)({
|
|
7
7
|
createGenerator: (source) => {
|
|
8
8
|
return require_generator.createWeappTailwindcssGenerator(source);
|
package/dist/postcss.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-
|
|
1
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-BP4WmgIo.js";
|
|
2
2
|
import { createWeappTailwindcssPostcssPlugin } from "@weapp-tailwindcss/postcss";
|
|
3
3
|
const weappTailwindcssPostcssPlugin = createWeappTailwindcssPostcssPlugin({
|
|
4
4
|
createGenerator: (source) => {
|
package/dist/presets.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
3
3
|
const require_framework = require("./framework.cjs");
|
|
4
|
-
const require_object = require("./object-
|
|
5
|
-
const require_options = require("./options-
|
|
4
|
+
const require_object = require("./object-DbHtAXRk.cjs");
|
|
5
|
+
const require_options = require("./options-DbYws6lr.cjs");
|
|
6
6
|
require("./utils-CuKLf1Zv.cjs");
|
|
7
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
7
|
+
const require_tailwindcss = require("./tailwindcss-D1M2xj5O.cjs");
|
|
8
8
|
require("./logger-TlKT3xmR.cjs");
|
|
9
9
|
let node_path = require("node:path");
|
|
10
10
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -54,7 +54,8 @@ function createBasePreset(options = {}) {
|
|
|
54
54
|
} : tailwindConfig
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
const mergedUserOptions = (0, _weapp_tailwindcss_shared.defuOverrideArray)(userOptions, rawOptions ?? {});
|
|
58
|
+
return (0, _weapp_tailwindcss_shared.defuOverrideArray)(mergedUserOptions, preset);
|
|
58
59
|
}
|
|
59
60
|
//#endregion
|
|
60
61
|
//#region src/presets/hbuilderx.ts
|
package/dist/presets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveTaroPlatform, resolveUniPlatformsFromEnv } from "./framework.js";
|
|
2
|
-
import { t as omitUndefined } from "./object-
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
2
|
+
import { t as omitUndefined } from "./object-B-8IHefx.js";
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-C2K-vjJv.js";
|
|
4
4
|
import { n as defuOverrideArray } from "./utils-MVwpU07P.js";
|
|
5
5
|
import { t as logger } from "./logger-BNzxZbZj.js";
|
|
6
6
|
import path from "node:path";
|
|
@@ -47,7 +47,8 @@ function createBasePreset(options = {}) {
|
|
|
47
47
|
} : tailwindConfig
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
|
|
50
|
+
const mergedUserOptions = defuOverrideArray(userOptions, rawOptions ?? {});
|
|
51
|
+
return defuOverrideArray(mergedUserOptions, preset);
|
|
51
52
|
}
|
|
52
53
|
//#endregion
|
|
53
54
|
//#region src/presets/hbuilderx.ts
|
package/dist/reset.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
5
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
6
6
|
let _weapp_tailwindcss_reset = require("@weapp-tailwindcss/reset");
|
|
7
7
|
_weapp_tailwindcss_reset = require_rolldown_runtime.__toESM(_weapp_tailwindcss_reset, 1);
|
|
8
8
|
Object.defineProperty(exports, "default", {
|
|
@@ -25,7 +25,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
25
25
|
}
|
|
26
26
|
return to;
|
|
27
27
|
};
|
|
28
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
29
29
|
value: mod,
|
|
30
30
|
enumerable: true
|
|
31
31
|
}) : target, mod));
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
3
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
3
|
+
const require_webpack = require("./webpack-DTqFKvcE.cjs");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
6
6
|
//#region src/bundlers/rspack/index.ts
|
package/dist/rspack.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-DLJkStre.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
//#region src/bundlers/rspack/index.ts
|
|
4
4
|
const CSS_IMPORT_REWRITE_LOADER_NAME = "weapp-tw-css-import-rewrite-loader";
|
|
@@ -10,6 +10,10 @@ function deleteWebpackLoaderRuntime(key) {
|
|
|
10
10
|
function getWebpackLoaderRuntime(key) {
|
|
11
11
|
return key ? runtimeRegistry.get(key) : void 0;
|
|
12
12
|
}
|
|
13
|
+
/** 获取当前编译器注册的最新运行时,供 Rspeedy 静态 CSS 规则使用。 */
|
|
14
|
+
function getLatestWebpackLoaderRuntime() {
|
|
15
|
+
return [...runtimeRegistry.values()].at(-1);
|
|
16
|
+
}
|
|
13
17
|
//#endregion
|
|
14
18
|
Object.defineProperty(exports, "deleteWebpackLoaderRuntime", {
|
|
15
19
|
enumerable: true,
|
|
@@ -17,6 +21,12 @@ Object.defineProperty(exports, "deleteWebpackLoaderRuntime", {
|
|
|
17
21
|
return deleteWebpackLoaderRuntime;
|
|
18
22
|
}
|
|
19
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "getLatestWebpackLoaderRuntime", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return getLatestWebpackLoaderRuntime;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
20
30
|
Object.defineProperty(exports, "getWebpackLoaderRuntime", {
|
|
21
31
|
enumerable: true,
|
|
22
32
|
get: function() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
4
4
|
require("./auto-DtU6f3X6.cjs");
|
|
5
|
-
const require_options = require("./options-
|
|
6
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
+
const require_options = require("./options-DbYws6lr.cjs");
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-D-zVR2mt.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
9
|
let node_module = require("node:module");
|
|
@@ -360,7 +360,8 @@ function resolveScopedSourceEntries(rawSource, sourceFile, resolvedEntries) {
|
|
|
360
360
|
return { entries: createLocalSourceEntries(sourceFile) };
|
|
361
361
|
}
|
|
362
362
|
async function resolveScopedGeneratorSourceEntries(rawSource, sourceFile) {
|
|
363
|
-
|
|
363
|
+
const sourceBase = node_path.default.dirname(node_path.default.resolve(sourceFile.replace(/[?#].*$/, "")));
|
|
364
|
+
return resolveScopedSourceEntries(rawSource, sourceFile, (await require_options.resolveTailwindV4EntriesFromCssCached(rawSource, sourceBase))?.entries);
|
|
364
365
|
}
|
|
365
366
|
async function createScopedGeneratorCandidateSignature(rawSource, sourceFile, fallbackSignature, getSourceCandidatesForEntries, options = {}) {
|
|
366
367
|
if (!getSourceCandidatesForEntries || !hasOwnSourceDirectives(rawSource)) return fallbackSignature;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { detectAppType } from "./framework.js";
|
|
2
|
-
import { At as toPosixPath } from "./generator-
|
|
2
|
+
import { At as toPosixPath } from "./generator-BP4WmgIo.js";
|
|
3
3
|
import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-2dg_uhEJ.js";
|
|
4
|
-
import {
|
|
5
|
-
import { S as isSourceStyleRequest } from "./hmr-timing-
|
|
4
|
+
import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-C2K-vjJv.js";
|
|
5
|
+
import { S as isSourceStyleRequest } from "./hmr-timing-iTua_Z55.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { weappStyleInjector } from "weapp-style-injector/vite";
|
|
@@ -357,7 +357,8 @@ function resolveScopedSourceEntries(rawSource, sourceFile, resolvedEntries) {
|
|
|
357
357
|
return { entries: createLocalSourceEntries(sourceFile) };
|
|
358
358
|
}
|
|
359
359
|
async function resolveScopedGeneratorSourceEntries(rawSource, sourceFile) {
|
|
360
|
-
|
|
360
|
+
const sourceBase = path.dirname(path.resolve(sourceFile.replace(/[?#].*$/, "")));
|
|
361
|
+
return resolveScopedSourceEntries(rawSource, sourceFile, (await resolveTailwindV4EntriesFromCssCached(rawSource, sourceBase))?.entries);
|
|
361
362
|
}
|
|
362
363
|
async function createScopedGeneratorCandidateSignature(rawSource, sourceFile, fallbackSignature, getSourceCandidatesForEntries, options = {}) {
|
|
363
364
|
if (!getSourceCandidatesForEntries || !hasOwnSourceDirectives(rawSource)) return fallbackSignature;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
const require_generator = require("./generator-
|
|
2
|
-
const require_options = require("./options-
|
|
1
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
2
|
+
const require_options = require("./options-DbYws6lr.cjs");
|
|
3
3
|
//#region src/context/style-options.ts
|
|
4
4
|
function normalizeStyleHandlerMajorVersion(majorVersion) {
|
|
5
5
|
return majorVersion === 4 ? 4 : void 0;
|
|
6
6
|
}
|
|
7
7
|
function resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion) {
|
|
8
8
|
const resolvedUniAppXOptions = require_options.resolveUniAppXOptions(ctx.uniAppX);
|
|
9
|
-
const
|
|
9
|
+
const generatorOptions = require_generator.normalizeWeappTailwindcssGeneratorOptions(ctx.generator, {
|
|
10
10
|
appType: ctx.appType,
|
|
11
11
|
platform: ctx.cssOptions?.platform ?? ctx.platform,
|
|
12
12
|
tailwindcssMajorVersion,
|
|
13
13
|
uniAppX: resolvedUniAppXOptions
|
|
14
|
-
})
|
|
14
|
+
});
|
|
15
|
+
const branch = require_generator.resolveGeneratorRuntimeBranch(generatorOptions, {
|
|
15
16
|
appType: ctx.appType,
|
|
16
17
|
platform: ctx.cssOptions?.platform ?? ctx.platform,
|
|
17
18
|
tailwindcssMajorVersion,
|
|
@@ -27,7 +28,9 @@ function resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion) {
|
|
|
27
28
|
cssSelectorReplacement: ctx.cssOptions?.cssSelectorReplacement ?? ctx.cssSelectorReplacement,
|
|
28
29
|
rem2rpx,
|
|
29
30
|
cssRemoveProperty: ctx.cssOptions?.cssRemoveProperty ?? ctx.cssRemoveProperty,
|
|
31
|
+
cssRemoveActivePseudoClass: ctx.cssOptions?.cssRemoveActivePseudoClass ?? ctx.cssRemoveActivePseudoClass,
|
|
30
32
|
cssRemoveHoverPseudoClass: ctx.cssOptions?.cssRemoveHoverPseudoClass ?? ctx.cssRemoveHoverPseudoClass,
|
|
33
|
+
cssRemoveFocusPseudoClass: ctx.cssOptions?.cssRemoveFocusPseudoClass ?? ctx.cssRemoveFocusPseudoClass,
|
|
31
34
|
tailwindcssV4GradientFallback: ctx.cssOptions?.tailwindcssV4GradientFallback ?? ctx.tailwindcssV4GradientFallback,
|
|
32
35
|
cssPresetEnv: ctx.cssOptions?.cssPresetEnv ?? ctx.cssPresetEnv,
|
|
33
36
|
atRules: ctx.cssOptions?.atRules ?? ctx.atRules,
|
|
@@ -49,7 +52,9 @@ function resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion) {
|
|
|
49
52
|
rem2rpx: cssOptions.rem2rpx,
|
|
50
53
|
...hasCssOptions ? { cssOptions } : {},
|
|
51
54
|
cssRemoveProperty: cssOptions.cssRemoveProperty,
|
|
55
|
+
cssRemoveActivePseudoClass: cssOptions.cssRemoveActivePseudoClass,
|
|
52
56
|
cssRemoveHoverPseudoClass: cssOptions.cssRemoveHoverPseudoClass,
|
|
57
|
+
cssRemoveFocusPseudoClass: cssOptions.cssRemoveFocusPseudoClass,
|
|
53
58
|
tailwindcssV4GradientFallback: cssOptions.tailwindcssV4GradientFallback,
|
|
54
59
|
cssPresetEnv: cssOptions.cssPresetEnv,
|
|
55
60
|
atRules: cssOptions.atRules,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as findWorkspacePackageDir,
|
|
2
|
-
import { t as omitUndefined } from "./object-
|
|
1
|
+
import { C as findWorkspacePackageDir, D as resolveTailwindcssOptions, Dt as resolveCssSourceEntries, E as normalizeTailwindcssRuntimeOptions, Et as parseConfigParam, Lt as loadTailwindV4DesignSystem, Nt as resolveCssMacroTailwindV4Source, O as normalizeStringListOption, S as findNearestPackageRoot, St as expandTailwindSourceEntries, T as normalizeExtendLengthUnits, Tt as normalizeLegacyContentEntries, b as isTailwindV4CssEntry, d as resolveTailwindV4SourceFromRuntime, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, kt as resolveTailwindV4CssSourceBase, m as filterTailwindV4CssSourceRoots, p as resolveTailwindV4SourceOptionsFromRuntime, v as groupCssEntriesByBase, w as findWorkspaceRoot, x as normalizeCssEntries, xt as FULL_SOURCE_SCAN_PATTERN, y as guessBasedirFromEntries } from "./generator-BP4WmgIo.js";
|
|
2
|
+
import { t as omitUndefined } from "./object-B-8IHefx.js";
|
|
3
3
|
import { n as defuOverrideArray$1 } from "./utils-MVwpU07P.js";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
@@ -602,6 +602,7 @@ function createResolvedV4CssScanInput(entries, inlineCandidates, explicit) {
|
|
|
602
602
|
}
|
|
603
603
|
async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
604
604
|
const sourceOptions = resolveTailwindV4SourceOptionsFromRuntime(runtime);
|
|
605
|
+
const configuredSourceEntries = sourceOptions.sources ?? [];
|
|
605
606
|
const cssEntries = collectExistingCssEntries(options);
|
|
606
607
|
if (cssEntries.length === 0 && !sourceOptions.css && !sourceOptions.cssSources?.length) {
|
|
607
608
|
const scanRoot = scanOptions.root;
|
|
@@ -614,7 +615,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
614
615
|
const entries = [];
|
|
615
616
|
const cssInlineCandidates = [];
|
|
616
617
|
const dependencies = /* @__PURE__ */ new Set();
|
|
617
|
-
let explicit =
|
|
618
|
+
let explicit = configuredSourceEntries.length > 0;
|
|
618
619
|
let readableCssEntryCount = 0;
|
|
619
620
|
for (const cssEntry of cssEntries) {
|
|
620
621
|
addSourceScanDependency(dependencies, cssEntry);
|
|
@@ -636,13 +637,13 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
636
637
|
const inlineCandidates = mergeTailwindInlineSourceCandidates(cssInlineCandidates);
|
|
637
638
|
const scanEntries = createMergedCssEntrySourceScanEntries(entries, { sourceCount: readableCssEntryCount });
|
|
638
639
|
if (scanEntries.length > 0 || inlineCandidates || explicit || readableCssEntryCount > 0) return createResolvedSourceScan({
|
|
639
|
-
entries: resolveExplicitSourceScanEntries(scanEntries, explicit),
|
|
640
|
+
entries: resolveExplicitSourceScanEntries([...configuredSourceEntries, ...scanEntries], explicit),
|
|
640
641
|
explicit,
|
|
641
642
|
inlineCandidates
|
|
642
643
|
}, dependencies);
|
|
643
644
|
if (typeof sourceOptions.css === "string" && sourceOptions.css.length > 0) {
|
|
644
645
|
const resolved = await resolveTailwindV4EntriesFromCssCached(sourceOptions.css, sourceOptions.base ?? sourceOptions.projectRoot ?? process.cwd());
|
|
645
|
-
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries, resolved.inlineCandidates, resolved.explicit), new Set(resolved.dependencies)) : void 0;
|
|
646
|
+
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput([...configuredSourceEntries, ...resolved.entries], resolved.inlineCandidates, explicit || resolved.explicit), new Set(resolved.dependencies)) : void 0;
|
|
646
647
|
}
|
|
647
648
|
const sourceOptionBase = sourceOptions.base ?? sourceOptions.projectRoot ?? process.cwd();
|
|
648
649
|
const configuredCssSources = collectConfiguredCssSources(options);
|
|
@@ -662,7 +663,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
662
663
|
const cssSourceCount = (sourceOptions.cssSources?.length ?? 0) + configuredCssSources.length;
|
|
663
664
|
const cssSourceScanEntries = createMergedCssEntrySourceScanEntries(entries, { sourceCount: cssSourceCount });
|
|
664
665
|
if (cssSourceScanEntries.length > 0 || cssSourceInlineCandidates || explicit) return createResolvedSourceScan({
|
|
665
|
-
entries: resolveExplicitSourceScanEntries(cssSourceScanEntries, explicit),
|
|
666
|
+
entries: resolveExplicitSourceScanEntries([...configuredSourceEntries, ...cssSourceScanEntries], explicit),
|
|
666
667
|
explicit,
|
|
667
668
|
inlineCandidates: cssSourceInlineCandidates
|
|
668
669
|
}, dependencies);
|
|
@@ -671,11 +672,7 @@ async function resolveSourceScanEntries(options, runtime, scanOptions = {}) {
|
|
|
671
672
|
addSourceScanDependency(dependencies, source.file);
|
|
672
673
|
addSourceScanDependencies(dependencies, source.dependencies);
|
|
673
674
|
const resolved = await resolveTailwindV4EntriesFromCssCached(source.css, source.base);
|
|
674
|
-
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries.length > 0 ? resolved.entries :
|
|
675
|
-
}
|
|
676
|
-
function createSourceScanMatcher(entries) {
|
|
677
|
-
if (entries?.length === 0) return () => false;
|
|
678
|
-
return createTailwindSourceEntryMatcher(entries);
|
|
675
|
+
return resolved ? createResolvedSourceScan(createResolvedV4CssScanInput(resolved.entries.length > 0 ? [...configuredSourceEntries, ...resolved.entries] : configuredSourceEntries, resolved.inlineCandidates, explicit || (resolved.entries.length > 0 ? resolved.explicit : false)), /* @__PURE__ */ new Set([...dependencies, ...resolved.dependencies])) : void 0;
|
|
679
676
|
}
|
|
680
677
|
//#endregion
|
|
681
678
|
//#region src/tailwindcss/runtime/cache.ts
|
|
@@ -1200,10 +1197,11 @@ function createTailwindcssRuntime(options) {
|
|
|
1200
1197
|
};
|
|
1201
1198
|
const normalizedBasedir = basedir ? path.resolve(basedir) : void 0;
|
|
1202
1199
|
const cacheRoot = findNearestPackageRoot(normalizedBasedir) ?? normalizedBasedir ?? process.cwd();
|
|
1203
|
-
if (cacheDir)
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1200
|
+
if (cacheDir) {
|
|
1201
|
+
if (path.isAbsolute(cacheDir)) cache.dir = cacheDir;
|
|
1202
|
+
else if (normalizedBasedir) cache.dir = path.resolve(normalizedBasedir, cacheDir);
|
|
1203
|
+
else cache.dir = path.resolve(process.cwd(), cacheDir);
|
|
1204
|
+
} else cache.dir = path.join(cacheRoot, "node_modules", ".cache", "@tailwindcss-mangle", "engine");
|
|
1207
1205
|
if (normalizedBasedir) cache.cwd = normalizedBasedir;
|
|
1208
1206
|
const resolvePaths = createDefaultResolvePaths(cache.cwd ?? normalizedBasedir ?? process.cwd());
|
|
1209
1207
|
const normalizedUserOptions = normalizeTailwindcssRuntimeOptions(tailwindcssRuntimeOptions);
|
|
@@ -1253,10 +1251,12 @@ function createTailwindcssRuntime(options) {
|
|
|
1253
1251
|
searchRoots.add(parentDir);
|
|
1254
1252
|
}
|
|
1255
1253
|
const configPath = findTailwindConfig(searchRoots);
|
|
1256
|
-
if (!resolvedTailwindOptions.config)
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1254
|
+
if (!resolvedTailwindOptions.config) {
|
|
1255
|
+
if (configPath) resolvedTailwindOptions.config = configPath;
|
|
1256
|
+
else {
|
|
1257
|
+
const fallbackConfig = resolveTailwindConfigFallback(resolvedTailwindOptions.packageName, resolvedTailwindOptions.resolve.paths ?? resolvePaths);
|
|
1258
|
+
if (fallbackConfig) resolvedTailwindOptions.config = fallbackConfig;
|
|
1259
|
+
}
|
|
1260
1260
|
}
|
|
1261
1261
|
if (!resolvedTailwindOptions.cwd && configPath) resolvedTailwindOptions.cwd = path.dirname(configPath);
|
|
1262
1262
|
resolvedOptions.tailwindcss = resolvedTailwindOptions;
|
|
@@ -1605,4 +1605,4 @@ function createTailwindcssRuntimeFromContext(ctx) {
|
|
|
1605
1605
|
return createTailwindcssRuntimeForBase(resolvedTailwindcssBasedir, normalizedCssEntries ?? rawCssEntries, runtimeOptions);
|
|
1606
1606
|
}
|
|
1607
1607
|
//#endregion
|
|
1608
|
-
export {
|
|
1608
|
+
export { includesTailwindV4PreflightDirective as _, findTailwindConfig as a, getRuntimeClassSetCacheEntry as c, invalidateRuntimeClassSet as d, resolveSourceScanEntries as f, resolveTailwindV4EntriesFromCssCached as g, resolveTailwindV4EntriesFromCss as h, resolveUniAppXOptions as i, getRuntimeClassSetSignature as l, resolveTailwindV4CssDependencies as m, resolveTailwindcssBasedir as n, applyV4CssCalcDefaults as o, discoverTailwindV4CssEntries as p, isUniAppXEnabled as r, warnMissingCssEntries as s, createTailwindcssRuntimeFromContext as t, getRuntimeClassSetSignatureWithSources as u, collectCssInlineSourceCandidates as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_rolldown_runtime = require("./rolldown-runtime-
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_object = require("./object-
|
|
4
|
-
const require_options = require("./options-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
|
+
const require_generator = require("./generator-BXrWA7Sj.cjs");
|
|
3
|
+
const require_object = require("./object-DbHtAXRk.cjs");
|
|
4
|
+
const require_options = require("./options-DbYws6lr.cjs");
|
|
5
5
|
require("./utils-CuKLf1Zv.cjs");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_path = require("node:path");
|
|
@@ -80,7 +80,8 @@ async function collectTailwindV4TrackedSourceFiles(tailwindRuntime) {
|
|
|
80
80
|
const files = /* @__PURE__ */ new Set();
|
|
81
81
|
for (const cssEntry of tailwindOptions?.v4?.cssEntries ?? []) {
|
|
82
82
|
if (!(0, node_fs.existsSync)(cssEntry)) continue;
|
|
83
|
-
const
|
|
83
|
+
const css = (0, node_fs.readFileSync)(cssEntry, "utf8");
|
|
84
|
+
const resolved = await require_options.resolveTailwindV4EntriesFromCssCached(css, node_path.default.dirname(cssEntry));
|
|
84
85
|
const expanded = resolved?.entries?.length ? await require_generator.expandTailwindSourceEntries(resolved.entries) : [];
|
|
85
86
|
for (const file of expanded) files.add(file);
|
|
86
87
|
}
|
|
@@ -536,10 +537,11 @@ function createTailwindcssRuntime(options) {
|
|
|
536
537
|
};
|
|
537
538
|
const normalizedBasedir = basedir ? node_path.default.resolve(basedir) : void 0;
|
|
538
539
|
const cacheRoot = require_generator.findNearestPackageRoot(normalizedBasedir) ?? normalizedBasedir ?? node_process.default.cwd();
|
|
539
|
-
if (cacheDir)
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
540
|
+
if (cacheDir) {
|
|
541
|
+
if (node_path.default.isAbsolute(cacheDir)) cache.dir = cacheDir;
|
|
542
|
+
else if (normalizedBasedir) cache.dir = node_path.default.resolve(normalizedBasedir, cacheDir);
|
|
543
|
+
else cache.dir = node_path.default.resolve(node_process.default.cwd(), cacheDir);
|
|
544
|
+
} else cache.dir = node_path.default.join(cacheRoot, "node_modules", ".cache", "@tailwindcss-mangle", "engine");
|
|
543
545
|
if (normalizedBasedir) cache.cwd = normalizedBasedir;
|
|
544
546
|
const resolvePaths = createDefaultResolvePaths(cache.cwd ?? normalizedBasedir ?? node_process.default.cwd());
|
|
545
547
|
const normalizedUserOptions = require_generator.normalizeTailwindcssRuntimeOptions(tailwindcssRuntimeOptions);
|
|
@@ -589,10 +591,12 @@ function createTailwindcssRuntime(options) {
|
|
|
589
591
|
searchRoots.add(parentDir);
|
|
590
592
|
}
|
|
591
593
|
const configPath = findTailwindConfig(searchRoots);
|
|
592
|
-
if (!resolvedTailwindOptions.config)
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
594
|
+
if (!resolvedTailwindOptions.config) {
|
|
595
|
+
if (configPath) resolvedTailwindOptions.config = configPath;
|
|
596
|
+
else {
|
|
597
|
+
const fallbackConfig = resolveTailwindConfigFallback(resolvedTailwindOptions.packageName, resolvedTailwindOptions.resolve.paths ?? resolvePaths);
|
|
598
|
+
if (fallbackConfig) resolvedTailwindOptions.config = fallbackConfig;
|
|
599
|
+
}
|
|
596
600
|
}
|
|
597
601
|
if (!resolvedTailwindOptions.cwd && configPath) resolvedTailwindOptions.cwd = node_path.default.dirname(configPath);
|
|
598
602
|
resolvedOptions.tailwindcss = resolvedTailwindOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as _defineProperty } from "./object-
|
|
2
|
-
import { g as traverse$1, h as babelParse, i as analyzeSource, n as generateCode, o as JsTokenUpdater, p as replaceWxml, r as createAttributeMatcher, u as isClassContextLiteralPath } from "./wxml-
|
|
1
|
+
import { n as _defineProperty } from "./object-B-8IHefx.js";
|
|
2
|
+
import { g as traverse$1, h as babelParse, i as analyzeSource, n as generateCode, o as JsTokenUpdater, p as replaceWxml, r as createAttributeMatcher, u as isClassContextLiteralPath } from "./wxml-B7OAVpXJ.js";
|
|
3
3
|
import { splitCandidateTokens } from "@tailwindcss-mangle/engine";
|
|
4
4
|
import MagicString from "magic-string";
|
|
5
5
|
import { NodeTypes, parse } from "@vue/compiler-dom";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_object = require("./object-
|
|
2
|
-
const require_wxml = require("./wxml-
|
|
1
|
+
const require_object = require("./object-DbHtAXRk.cjs");
|
|
2
|
+
const require_wxml = require("./wxml-CQmBCjOR.cjs");
|
|
3
3
|
let _tailwindcss_mangle_engine = require("@tailwindcss-mangle/engine");
|
|
4
4
|
let _vue_compiler_dom = require("@vue/compiler-dom");
|
|
5
5
|
//#region src/uni-app-x/component-local-style-binding.ts
|
|
@@ -35,7 +35,9 @@ export interface UserDefinedOptionsGeneralPart {
|
|
|
35
35
|
cssChildCombinatorReplaceValue?: string | string[] | undefined;
|
|
36
36
|
postcssOptions?: LoadedPostcssOptions | undefined;
|
|
37
37
|
cssOptions?: CssOptions | undefined;
|
|
38
|
+
cssRemoveActivePseudoClass?: boolean | undefined;
|
|
38
39
|
cssRemoveHoverPseudoClass?: boolean | undefined;
|
|
40
|
+
cssRemoveFocusPseudoClass?: boolean | undefined;
|
|
39
41
|
cssRemoveProperty?: boolean | undefined;
|
|
40
42
|
tailwindcssV4GradientFallback?: boolean | undefined;
|
|
41
43
|
tailwindcssRuntimeOptions?: TailwindCssRuntimeOptions | undefined;
|