weapp-tailwindcss 5.2.9 → 5.2.11
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/class-selectors.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +1 -0
- package/dist/bundlers/vite/utils.d.ts +2 -0
- package/dist/cli.cjs +4 -30
- package/dist/cli.js +4 -30
- package/dist/{context-CByXWyhQ.cjs → context-C3TryIjF.cjs} +8 -13
- package/dist/{context-BMkbwnH8.js → context-DbL0d-zB.js} +8 -13
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{gulp-BWhCahA2.js → gulp-BLaGc0MJ.js} +3 -3
- package/dist/{gulp-BdoorWb5.cjs → gulp-DSrcDQsA.cjs} +4 -4
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-DiYnyg_W.cjs → hmr-timing-BnGBBJ6S.cjs} +2 -2
- package/dist/{hmr-timing-CJocHeZr.js → hmr-timing-DXyGw6jp.js} +18 -8
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/js/literal-transform.d.ts +1 -1
- package/dist/{pipeline-helpers-CsNLoEX1.cjs → pipeline-helpers-B5CzvTUJ.cjs} +1 -1
- package/dist/rspack.cjs +1 -1
- package/dist/rspack.js +1 -1
- package/dist/shared/classname-transform.d.ts +2 -3
- package/dist/{source-candidate-scan-signature-D9FXTD9a.cjs → source-candidate-scan-signature-GjsLzP8Z.cjs} +1 -1
- package/dist/{source-candidate-scan-signature-of-TmeOs.js → source-candidate-scan-signature-xgmxO8_F.js} +1 -1
- package/dist/{transform-GzbxfNGA.cjs → transform-9wbmvHcC.cjs} +1 -1
- package/dist/{transform-DhDe9eSf.js → transform-BlsDWgjt.js} +1 -1
- package/dist/{v4-generation-core-BjHT6qGC.cjs → v4-generation-core-D4zQcQqW.cjs} +22 -6
- package/dist/{vite-8l9_S4Qi.js → vite-BWmBFzgf.js} +36 -12
- package/dist/{vite-Dcx59GRQ.cjs → vite-DTDbD-95.cjs} +37 -13
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +2 -2
- package/dist/{webpack-CzQrloDg.cjs → webpack-Bpovb6YE.cjs} +6 -6
- package/dist/{webpack-CkeFhPY2.js → webpack-CtUyQNqC.js} +4 -4
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/{wxml-IBzZSaQC.js → wxml-CWJc0yY-.js} +5 -31
- package/dist/{wxml-DSMNuUaP.cjs → wxml-DUIdXCVa.cjs} +4 -36
- package/package.json +2 -2
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function collectRawSourceClassSelectors(rawSource: string): Set<string>;
|
|
2
2
|
export declare function collectGeneratedRawSourceCandidates(candidates: Iterable<string>, rawSource: string, escapeMap: Record<string, string> | undefined): Set<string>;
|
|
3
|
+
export declare function collectGeneratedRawSourceCandidatesFromCss(candidates: Iterable<string>, cssSources: Iterable<string>, escapeMap: Record<string, string> | undefined): Set<string>;
|
|
@@ -42,6 +42,7 @@ export interface FinalizeGenerateBundleOptions {
|
|
|
42
42
|
outDir: string;
|
|
43
43
|
pendingLinkedUpdates: Array<() => void>;
|
|
44
44
|
pendingRememberedCssReplayUpdates: PendingRememberedCssReplayUpdate[];
|
|
45
|
+
prepareJsTransformRuntime?: (() => void) | undefined;
|
|
45
46
|
pruneViteCssCaches: GenerateBundleContext['pruneViteCssCaches'];
|
|
46
47
|
recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
|
|
47
48
|
recordTimingDetail: (name: string, startedAt: number) => void;
|
|
@@ -4,6 +4,8 @@ export declare function slash(p: string): string;
|
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const cssLangRE: RegExp;
|
|
6
6
|
export declare function isCSSRequest(request: string): boolean;
|
|
7
|
+
export declare function isWeappViteSidecarRequest(request: string): boolean;
|
|
8
|
+
export declare function resolveViteCssPipelineRequestFile(request: string): string;
|
|
7
9
|
export declare function isHTMLRequest(request: string): boolean;
|
|
8
10
|
export declare function normalizePath(id: string): string;
|
|
9
11
|
export { cleanUrl };
|
package/dist/cli.cjs
CHANGED
|
@@ -35013,30 +35013,8 @@ function isPlainSlashPathCandidate(candidate) {
|
|
|
35013
35013
|
if (candidate.includes("[") || candidate.includes("]") || candidate.includes(":")) return false;
|
|
35014
35014
|
return !candidate.slice(0, slashIndex).includes("-");
|
|
35015
35015
|
}
|
|
35016
|
-
function isArbitraryValueCandidate(candidate) {
|
|
35017
|
-
let hasOpenBracket = false;
|
|
35018
|
-
let hasCloseBracket = false;
|
|
35019
|
-
for (let i = 0; i < candidate.length; i++) {
|
|
35020
|
-
const char = candidate[i];
|
|
35021
|
-
if (char === "[") hasOpenBracket = true;
|
|
35022
|
-
else if (char === "]") hasCloseBracket = true;
|
|
35023
|
-
if (hasOpenBracket && hasCloseBracket) break;
|
|
35024
|
-
}
|
|
35025
|
-
if (!hasOpenBracket || !hasCloseBracket) return false;
|
|
35026
|
-
if (isUrlLikeCandidate(candidate.trim())) return false;
|
|
35027
|
-
return true;
|
|
35028
|
-
}
|
|
35029
|
-
function shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion) {
|
|
35030
|
-
if (jsArbitraryValueFallback === true) return true;
|
|
35031
|
-
if (jsArbitraryValueFallback === false) return false;
|
|
35032
|
-
return tailwindcssMajorVersion === 4 && (!classNameSet || classNameSet.size === 0);
|
|
35033
|
-
}
|
|
35034
|
-
function shouldEnableArbitraryValueFallback({ classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion }) {
|
|
35035
|
-
return shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion);
|
|
35036
|
-
}
|
|
35037
35016
|
const SKIP_RESULT = { decision: "skip" };
|
|
35038
35017
|
const DIRECT_RESULT = { decision: "direct" };
|
|
35039
|
-
const FALLBACK_RESULT = { decision: "fallback" };
|
|
35040
35018
|
function getEscapedCandidateCacheStore(escapeMap) {
|
|
35041
35019
|
if (!escapeMap) return defaultEscapedCandidateCache;
|
|
35042
35020
|
if (escapeMap === lastEscapedCandidateEscapeMap && lastEscapedCandidateCacheStore) return lastEscapedCandidateCacheStore;
|
|
@@ -35061,11 +35039,11 @@ function getEscapedCandidate(candidate, escapeMap, store = getEscapedCandidateCa
|
|
|
35061
35039
|
* JS 转译严格遵循 runtime class set:
|
|
35062
35040
|
* 1. 直接命中 classNameSet 原始值;
|
|
35063
35041
|
* 2. 兼容命中 classNameSet 中已转义值;
|
|
35064
|
-
* 3.
|
|
35042
|
+
* 3. 除显式 alwaysEscape 外,不允许绕过 classNameSet。
|
|
35065
35043
|
*
|
|
35066
35044
|
* 返回结构化结果,附带已计算的 escapedValue 以避免下游重复 escape。
|
|
35067
35045
|
*/
|
|
35068
|
-
function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNameSet, escapeMap,
|
|
35046
|
+
function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNameSet, escapeMap, jsPreserveClass, classContext }) {
|
|
35069
35047
|
if (jsPreserveClass?.(candidate)) return SKIP_RESULT;
|
|
35070
35048
|
if (alwaysEscape) return DIRECT_RESULT;
|
|
35071
35049
|
if (!classContext && isPlainSlashPathCandidate(candidate)) return SKIP_RESULT;
|
|
@@ -35077,7 +35055,6 @@ function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNam
|
|
|
35077
35055
|
escapedValue: escapedCandidate
|
|
35078
35056
|
};
|
|
35079
35057
|
}
|
|
35080
|
-
if (classContext && shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion) && isArbitraryValueCandidate(candidate)) return FALLBACK_RESULT;
|
|
35081
35058
|
return SKIP_RESULT;
|
|
35082
35059
|
}
|
|
35083
35060
|
//#endregion
|
|
@@ -35323,8 +35300,7 @@ function createCandidatePlanResolver(options, classContext) {
|
|
|
35323
35300
|
function replaceHandleValue(path, options) {
|
|
35324
35301
|
const { needEscaped = false } = options;
|
|
35325
35302
|
const { classNameSet, alwaysEscape } = options;
|
|
35326
|
-
|
|
35327
|
-
if (!alwaysEscape && !fallbackEnabled && (!classNameSet || classNameSet.size === 0)) return;
|
|
35303
|
+
if (!alwaysEscape && (!classNameSet || classNameSet.size === 0)) return;
|
|
35328
35304
|
if (hasIgnoreComment(path.node)) return;
|
|
35329
35305
|
if (isConditionTestLiteral(path)) return;
|
|
35330
35306
|
const { literal, original, offset } = extractLiteralValue(path, options);
|
|
@@ -35336,7 +35312,6 @@ function replaceHandleValue(path, options) {
|
|
|
35336
35312
|
let mutated = false;
|
|
35337
35313
|
let matchedCandidateCount = 0;
|
|
35338
35314
|
let escapedDecisionCount = 0;
|
|
35339
|
-
let fallbackDecisionCount = 0;
|
|
35340
35315
|
let escapedSamples;
|
|
35341
35316
|
let skippedSamples;
|
|
35342
35317
|
const resolveCandidatePlan = createCandidatePlanResolver(options, classContext);
|
|
@@ -35356,7 +35331,6 @@ function replaceHandleValue(path, options) {
|
|
|
35356
35331
|
if (!escapedSamples) escapedSamples = [];
|
|
35357
35332
|
if (escapedSamples.length < 6) escapedSamples.push(candidate);
|
|
35358
35333
|
}
|
|
35359
|
-
if (plan.result.decision === "fallback") fallbackDecisionCount += 1;
|
|
35360
35334
|
}
|
|
35361
35335
|
const replaced = transformed.replace(candidate, plan.replacement);
|
|
35362
35336
|
if (replaced !== transformed) {
|
|
@@ -35366,7 +35340,7 @@ function replaceHandleValue(path, options) {
|
|
|
35366
35340
|
}
|
|
35367
35341
|
const node = path.node;
|
|
35368
35342
|
if (!mutated || typeof node.start !== "number" || typeof node.end !== "number") return;
|
|
35369
|
-
if (debugEnabled) debug$1("runtimeSet size=%d
|
|
35343
|
+
if (debugEnabled) debug$1("runtimeSet size=%d candidates=%d matched=%d escapedHits=%d skipped=%d file=%s escapedSamples=%s skippedSamples=%s", classNameSet?.size ?? 0, candidates.length, matchedCandidateCount, escapedDecisionCount, skippedSamples?.length ?? 0, options.filename ?? "unknown", escapedSamples?.join(",") || "-", skippedSamples?.join(",") || "-");
|
|
35370
35344
|
const start = node.start + offset;
|
|
35371
35345
|
const end = node.end - offset;
|
|
35372
35346
|
if (start >= end || transformed === original) return;
|
package/dist/cli.js
CHANGED
|
@@ -315,30 +315,8 @@ function isPlainSlashPathCandidate(candidate) {
|
|
|
315
315
|
if (candidate.includes("[") || candidate.includes("]") || candidate.includes(":")) return false;
|
|
316
316
|
return !candidate.slice(0, slashIndex).includes("-");
|
|
317
317
|
}
|
|
318
|
-
function isArbitraryValueCandidate(candidate) {
|
|
319
|
-
let hasOpenBracket = false;
|
|
320
|
-
let hasCloseBracket = false;
|
|
321
|
-
for (let i = 0; i < candidate.length; i++) {
|
|
322
|
-
const char = candidate[i];
|
|
323
|
-
if (char === "[") hasOpenBracket = true;
|
|
324
|
-
else if (char === "]") hasCloseBracket = true;
|
|
325
|
-
if (hasOpenBracket && hasCloseBracket) break;
|
|
326
|
-
}
|
|
327
|
-
if (!hasOpenBracket || !hasCloseBracket) return false;
|
|
328
|
-
if (isUrlLikeCandidate(candidate.trim())) return false;
|
|
329
|
-
return true;
|
|
330
|
-
}
|
|
331
|
-
function shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion) {
|
|
332
|
-
if (jsArbitraryValueFallback === true) return true;
|
|
333
|
-
if (jsArbitraryValueFallback === false) return false;
|
|
334
|
-
return tailwindcssMajorVersion === 4 && (!classNameSet || classNameSet.size === 0);
|
|
335
|
-
}
|
|
336
|
-
function shouldEnableArbitraryValueFallback({ classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion }) {
|
|
337
|
-
return shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion);
|
|
338
|
-
}
|
|
339
318
|
const SKIP_RESULT = { decision: "skip" };
|
|
340
319
|
const DIRECT_RESULT = { decision: "direct" };
|
|
341
|
-
const FALLBACK_RESULT = { decision: "fallback" };
|
|
342
320
|
function getEscapedCandidateCacheStore(escapeMap) {
|
|
343
321
|
if (!escapeMap) return defaultEscapedCandidateCache;
|
|
344
322
|
if (escapeMap === lastEscapedCandidateEscapeMap && lastEscapedCandidateCacheStore) return lastEscapedCandidateCacheStore;
|
|
@@ -363,11 +341,11 @@ function getEscapedCandidate(candidate, escapeMap, store = getEscapedCandidateCa
|
|
|
363
341
|
* JS 转译严格遵循 runtime class set:
|
|
364
342
|
* 1. 直接命中 classNameSet 原始值;
|
|
365
343
|
* 2. 兼容命中 classNameSet 中已转义值;
|
|
366
|
-
* 3.
|
|
344
|
+
* 3. 除显式 alwaysEscape 外,不允许绕过 classNameSet。
|
|
367
345
|
*
|
|
368
346
|
* 返回结构化结果,附带已计算的 escapedValue 以避免下游重复 escape。
|
|
369
347
|
*/
|
|
370
|
-
function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNameSet, escapeMap,
|
|
348
|
+
function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNameSet, escapeMap, jsPreserveClass, classContext }) {
|
|
371
349
|
if (jsPreserveClass?.(candidate)) return SKIP_RESULT;
|
|
372
350
|
if (alwaysEscape) return DIRECT_RESULT;
|
|
373
351
|
if (!classContext && isPlainSlashPathCandidate(candidate)) return SKIP_RESULT;
|
|
@@ -379,7 +357,6 @@ function resolveClassNameTransformWithResult(candidate, { alwaysEscape, classNam
|
|
|
379
357
|
escapedValue: escapedCandidate
|
|
380
358
|
};
|
|
381
359
|
}
|
|
382
|
-
if (classContext && shouldEnableArbitraryValueFallbackByInputs(classNameSet, jsArbitraryValueFallback, tailwindcssMajorVersion) && isArbitraryValueCandidate(candidate)) return FALLBACK_RESULT;
|
|
383
360
|
return SKIP_RESULT;
|
|
384
361
|
}
|
|
385
362
|
//#endregion
|
|
@@ -625,8 +602,7 @@ function createCandidatePlanResolver(options, classContext) {
|
|
|
625
602
|
function replaceHandleValue(path, options) {
|
|
626
603
|
const { needEscaped = false } = options;
|
|
627
604
|
const { classNameSet, alwaysEscape } = options;
|
|
628
|
-
|
|
629
|
-
if (!alwaysEscape && !fallbackEnabled && (!classNameSet || classNameSet.size === 0)) return;
|
|
605
|
+
if (!alwaysEscape && (!classNameSet || classNameSet.size === 0)) return;
|
|
630
606
|
if (hasIgnoreComment(path.node)) return;
|
|
631
607
|
if (isConditionTestLiteral(path)) return;
|
|
632
608
|
const { literal, original, offset } = extractLiteralValue(path, options);
|
|
@@ -638,7 +614,6 @@ function replaceHandleValue(path, options) {
|
|
|
638
614
|
let mutated = false;
|
|
639
615
|
let matchedCandidateCount = 0;
|
|
640
616
|
let escapedDecisionCount = 0;
|
|
641
|
-
let fallbackDecisionCount = 0;
|
|
642
617
|
let escapedSamples;
|
|
643
618
|
let skippedSamples;
|
|
644
619
|
const resolveCandidatePlan = createCandidatePlanResolver(options, classContext);
|
|
@@ -658,7 +633,6 @@ function replaceHandleValue(path, options) {
|
|
|
658
633
|
if (!escapedSamples) escapedSamples = [];
|
|
659
634
|
if (escapedSamples.length < 6) escapedSamples.push(candidate);
|
|
660
635
|
}
|
|
661
|
-
if (plan.result.decision === "fallback") fallbackDecisionCount += 1;
|
|
662
636
|
}
|
|
663
637
|
const replaced = transformed.replace(candidate, plan.replacement);
|
|
664
638
|
if (replaced !== transformed) {
|
|
@@ -668,7 +642,7 @@ function replaceHandleValue(path, options) {
|
|
|
668
642
|
}
|
|
669
643
|
const node = path.node;
|
|
670
644
|
if (!mutated || typeof node.start !== "number" || typeof node.end !== "number") return;
|
|
671
|
-
if (debugEnabled) debug("runtimeSet size=%d
|
|
645
|
+
if (debugEnabled) debug("runtimeSet size=%d candidates=%d matched=%d escapedHits=%d skipped=%d file=%s escapedSamples=%s skippedSamples=%s", classNameSet?.size ?? 0, candidates.length, matchedCandidateCount, escapedDecisionCount, skippedSamples?.length ?? 0, options.filename ?? "unknown", escapedSamples?.join(",") || "-", skippedSamples?.join(",") || "-");
|
|
672
646
|
const start = node.start + offset;
|
|
673
647
|
const end = node.end - offset;
|
|
674
648
|
if (start >= end || transformed === original) return;
|
|
@@ -4,7 +4,7 @@ const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
|
4
4
|
const require_object = require("./object-C_Vr6_S5.cjs");
|
|
5
5
|
const require_options = require("./options-zpZez7qe.cjs");
|
|
6
6
|
require("./utils-CuKLf1Zv.cjs");
|
|
7
|
-
const require_wxml = require("./wxml-
|
|
7
|
+
const require_wxml = require("./wxml-DUIdXCVa.cjs");
|
|
8
8
|
const require_defaults = require("./defaults.cjs");
|
|
9
9
|
const require_tailwindcss = require("./tailwindcss-LtnGCxF0.cjs");
|
|
10
10
|
const require_style_options = require("./style-options-COpQc8fr.cjs");
|
|
@@ -785,15 +785,14 @@ function walk(input, options) {
|
|
|
785
785
|
}
|
|
786
786
|
//#endregion
|
|
787
787
|
//#region src/js/literal-transform.ts
|
|
788
|
-
function transformLiteralText(literal, options) {
|
|
789
|
-
|
|
790
|
-
if (!options.alwaysEscape && !fallbackEnabled && (!options.classNameSet || options.classNameSet.size === 0)) return;
|
|
788
|
+
function transformLiteralText(literal, options, classContext = true) {
|
|
789
|
+
if (!options.alwaysEscape && (!options.classNameSet || options.classNameSet.size === 0)) return;
|
|
791
790
|
const source = options.unescapeUnicode && literal.includes("\\u") ? require_wxml.decodeUnicode2(literal) : literal;
|
|
792
791
|
const candidates = (0, _tailwindcss_mangle_engine.splitCandidateTokens)(source);
|
|
793
792
|
if (candidates.length === 0) return;
|
|
794
793
|
const transformOptions = {
|
|
795
794
|
...options,
|
|
796
|
-
classContext
|
|
795
|
+
classContext
|
|
797
796
|
};
|
|
798
797
|
const replacementCache = require_wxml.getReplacementCacheStore(options.escapeMap);
|
|
799
798
|
let transformed = source;
|
|
@@ -847,7 +846,7 @@ function hasSupportedClassMatchSource(options) {
|
|
|
847
846
|
}
|
|
848
847
|
function canAttemptOxcJsFastPath(options) {
|
|
849
848
|
if (options.experimentalJsFastPath !== true && options.experimentalJsFastPath !== "oxc") return false;
|
|
850
|
-
return !options.generateMap && !options.wrapExpression && !options.moduleGraph && !options.moduleSpecifierReplacements && hasSupportedClassMatchSource(options) && !
|
|
849
|
+
return !options.generateMap && !options.wrapExpression && !options.moduleGraph && !options.moduleSpecifierReplacements && hasSupportedClassMatchSource(options) && !hasValues(options.ignoreCallExpressionIdentifiers);
|
|
851
850
|
}
|
|
852
851
|
function getParserLang(filename) {
|
|
853
852
|
if (filename?.endsWith(".ts") || filename?.endsWith(".mts") || filename?.endsWith(".cts")) return "ts";
|
|
@@ -867,7 +866,7 @@ function getMagicString(rawSource, context) {
|
|
|
867
866
|
}
|
|
868
867
|
function addStringLiteralReplacement(rawSource, node, transformOptions, context) {
|
|
869
868
|
if (typeof node.value !== "string" || typeof node.raw !== "string" || !isRangeValid(node.start, node.end)) return false;
|
|
870
|
-
const transformed = transformLiteralText(node.value, transformOptions);
|
|
869
|
+
const transformed = transformLiteralText(node.value, transformOptions, false);
|
|
871
870
|
if (!transformed) return false;
|
|
872
871
|
const start = node.start + 1;
|
|
873
872
|
const end = node.end - 1;
|
|
@@ -878,7 +877,7 @@ function addStringLiteralReplacement(rawSource, node, transformOptions, context)
|
|
|
878
877
|
function addTemplateElementReplacement(rawSource, node, transformOptions, context) {
|
|
879
878
|
const raw = node.value?.raw;
|
|
880
879
|
if (typeof raw !== "string" || !isRangeValid(node.start, node.end)) return false;
|
|
881
|
-
const transformed = transformLiteralText(raw, transformOptions);
|
|
880
|
+
const transformed = transformLiteralText(raw, transformOptions, false);
|
|
882
881
|
if (!transformed || transformed === raw) return false;
|
|
883
882
|
const first = rawSource[node.start];
|
|
884
883
|
const last = rawSource[node.end - 1];
|
|
@@ -1011,8 +1010,6 @@ function getOptionsFingerprint(options) {
|
|
|
1011
1010
|
options.generateMap ? "1" : "0",
|
|
1012
1011
|
options.uniAppX ? "1" : "0",
|
|
1013
1012
|
options.wrapExpression ? "1" : "0",
|
|
1014
|
-
String(options.tailwindcssMajorVersion ?? ""),
|
|
1015
|
-
String(options.jsArbitraryValueFallback ?? ""),
|
|
1016
1013
|
JSON.stringify(options.arbitraryValues ?? null),
|
|
1017
1014
|
JSON.stringify(options.ignoreCallExpressionIdentifiers ?? null),
|
|
1018
1015
|
JSON.stringify(options.ignoreTaggedTemplateExpressionIdentifiers?.map((v) => v instanceof RegExp ? v.source : v) ?? null),
|
|
@@ -1149,7 +1146,7 @@ function resolveRuntimePackageReplacements(option) {
|
|
|
1149
1146
|
//#endregion
|
|
1150
1147
|
//#region src/context/handlers.ts
|
|
1151
1148
|
function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions, tailwindcssMajorVersion) {
|
|
1152
|
-
const { escapeMap, injectAdditionalCssVarScope, postcssOptions, uniAppX, arbitraryValues, jsPreserveClass,
|
|
1149
|
+
const { escapeMap, injectAdditionalCssVarScope, postcssOptions, uniAppX, arbitraryValues, jsPreserveClass, babelParserOptions, experimentalJsFastPath, ignoreCallExpressionIdentifiers, ignoreTaggedTemplateExpressionIdentifiers, inlineWxs, disabledDefaultTemplateHandler, replaceRuntimePackages } = ctx;
|
|
1153
1150
|
const resolvedUniAppXOptions = require_options.resolveUniAppXOptions(uniAppX);
|
|
1154
1151
|
const styleOptions = require_style_options.resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion);
|
|
1155
1152
|
const resolvedInjectAdditionalCssVarScope = styleOptions.cssOptions?.injectAdditionalCssVarScope ?? injectAdditionalCssVarScope;
|
|
@@ -1168,8 +1165,6 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
|
|
|
1168
1165
|
escapeMap,
|
|
1169
1166
|
arbitraryValues,
|
|
1170
1167
|
jsPreserveClass,
|
|
1171
|
-
jsArbitraryValueFallback: jsArbitraryValueFallback ?? "auto",
|
|
1172
|
-
tailwindcssMajorVersion,
|
|
1173
1168
|
generateMap: true,
|
|
1174
1169
|
babelParserOptions,
|
|
1175
1170
|
experimentalJsFastPath,
|
|
@@ -2,7 +2,7 @@ import { resolveMpxPlatform } from "./framework.js";
|
|
|
2
2
|
import { It as shouldUseUniAppWebRpxCompatibility, Lt as loadTailwindV4DesignSystem, Nt as resolveCssMacroTailwindV4Source, Rt as resolveValidTailwindV4Candidates$1, a as resolveGeneratorRuntimeBranch, d as resolveTailwindV4SourceFromRuntime, i as normalizeWeappTailwindcssGeneratorOptions, k as resolveBooleanObjectOption, yt as createTailwindV4Engine$1 } from "./generator-BLpOsd5O.js";
|
|
3
3
|
import { c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssRuntimeFromContext, u as getRuntimeClassSetSignatureWithSources } from "./tailwindcss-2zdmASlM.js";
|
|
4
4
|
import { i as isMap, n as defuOverrideArray } from "./utils-MVwpU07P.js";
|
|
5
|
-
import { a as jsHandler, c as getReplacementCacheStore, d as decodeUnicode2, f as resolveClassNameTransformWithResult,
|
|
5
|
+
import { _ as md5Hash, a as jsHandler, c as getReplacementCacheStore, d as decodeUnicode2, f as resolveClassNameTransformWithResult, l as jsStringEscape, m as createDebug, s as getReplacement, t as createTemplateHandler } from "./wxml-CWJc0yY-.js";
|
|
6
6
|
import { getDefaultOptions, resolveDefaultCssPreflight } from "./defaults.js";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import path from "node:path";
|
|
@@ -612,15 +612,14 @@ function toCustomAttributesEntities(customAttributes) {
|
|
|
612
612
|
}
|
|
613
613
|
//#endregion
|
|
614
614
|
//#region src/js/literal-transform.ts
|
|
615
|
-
function transformLiteralText(literal, options) {
|
|
616
|
-
|
|
617
|
-
if (!options.alwaysEscape && !fallbackEnabled && (!options.classNameSet || options.classNameSet.size === 0)) return;
|
|
615
|
+
function transformLiteralText(literal, options, classContext = true) {
|
|
616
|
+
if (!options.alwaysEscape && (!options.classNameSet || options.classNameSet.size === 0)) return;
|
|
618
617
|
const source = options.unescapeUnicode && literal.includes("\\u") ? decodeUnicode2(literal) : literal;
|
|
619
618
|
const candidates = splitCandidateTokens(source);
|
|
620
619
|
if (candidates.length === 0) return;
|
|
621
620
|
const transformOptions = {
|
|
622
621
|
...options,
|
|
623
|
-
classContext
|
|
622
|
+
classContext
|
|
624
623
|
};
|
|
625
624
|
const replacementCache = getReplacementCacheStore(options.escapeMap);
|
|
626
625
|
let transformed = source;
|
|
@@ -674,7 +673,7 @@ function hasSupportedClassMatchSource(options) {
|
|
|
674
673
|
}
|
|
675
674
|
function canAttemptOxcJsFastPath(options) {
|
|
676
675
|
if (options.experimentalJsFastPath !== true && options.experimentalJsFastPath !== "oxc") return false;
|
|
677
|
-
return !options.generateMap && !options.wrapExpression && !options.moduleGraph && !options.moduleSpecifierReplacements && hasSupportedClassMatchSource(options) && !
|
|
676
|
+
return !options.generateMap && !options.wrapExpression && !options.moduleGraph && !options.moduleSpecifierReplacements && hasSupportedClassMatchSource(options) && !hasValues(options.ignoreCallExpressionIdentifiers);
|
|
678
677
|
}
|
|
679
678
|
function getParserLang(filename) {
|
|
680
679
|
if (filename?.endsWith(".ts") || filename?.endsWith(".mts") || filename?.endsWith(".cts")) return "ts";
|
|
@@ -694,7 +693,7 @@ function getMagicString(rawSource, context) {
|
|
|
694
693
|
}
|
|
695
694
|
function addStringLiteralReplacement(rawSource, node, transformOptions, context) {
|
|
696
695
|
if (typeof node.value !== "string" || typeof node.raw !== "string" || !isRangeValid(node.start, node.end)) return false;
|
|
697
|
-
const transformed = transformLiteralText(node.value, transformOptions);
|
|
696
|
+
const transformed = transformLiteralText(node.value, transformOptions, false);
|
|
698
697
|
if (!transformed) return false;
|
|
699
698
|
const start = node.start + 1;
|
|
700
699
|
const end = node.end - 1;
|
|
@@ -705,7 +704,7 @@ function addStringLiteralReplacement(rawSource, node, transformOptions, context)
|
|
|
705
704
|
function addTemplateElementReplacement(rawSource, node, transformOptions, context) {
|
|
706
705
|
const raw = node.value?.raw;
|
|
707
706
|
if (typeof raw !== "string" || !isRangeValid(node.start, node.end)) return false;
|
|
708
|
-
const transformed = transformLiteralText(raw, transformOptions);
|
|
707
|
+
const transformed = transformLiteralText(raw, transformOptions, false);
|
|
709
708
|
if (!transformed || transformed === raw) return false;
|
|
710
709
|
const first = rawSource[node.start];
|
|
711
710
|
const last = rawSource[node.end - 1];
|
|
@@ -838,8 +837,6 @@ function getOptionsFingerprint(options) {
|
|
|
838
837
|
options.generateMap ? "1" : "0",
|
|
839
838
|
options.uniAppX ? "1" : "0",
|
|
840
839
|
options.wrapExpression ? "1" : "0",
|
|
841
|
-
String(options.tailwindcssMajorVersion ?? ""),
|
|
842
|
-
String(options.jsArbitraryValueFallback ?? ""),
|
|
843
840
|
JSON.stringify(options.arbitraryValues ?? null),
|
|
844
841
|
JSON.stringify(options.ignoreCallExpressionIdentifiers ?? null),
|
|
845
842
|
JSON.stringify(options.ignoreTaggedTemplateExpressionIdentifiers?.map((v) => v instanceof RegExp ? v.source : v) ?? null),
|
|
@@ -1039,7 +1036,7 @@ function resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion) {
|
|
|
1039
1036
|
//#endregion
|
|
1040
1037
|
//#region src/context/handlers.ts
|
|
1041
1038
|
function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions, tailwindcssMajorVersion) {
|
|
1042
|
-
const { escapeMap, injectAdditionalCssVarScope, postcssOptions, uniAppX, arbitraryValues, jsPreserveClass,
|
|
1039
|
+
const { escapeMap, injectAdditionalCssVarScope, postcssOptions, uniAppX, arbitraryValues, jsPreserveClass, babelParserOptions, experimentalJsFastPath, ignoreCallExpressionIdentifiers, ignoreTaggedTemplateExpressionIdentifiers, inlineWxs, disabledDefaultTemplateHandler, replaceRuntimePackages } = ctx;
|
|
1043
1040
|
const resolvedUniAppXOptions = resolveUniAppXOptions(uniAppX);
|
|
1044
1041
|
const styleOptions = resolveStyleOptionsFromContext(ctx, tailwindcssMajorVersion);
|
|
1045
1042
|
const resolvedInjectAdditionalCssVarScope = styleOptions.cssOptions?.injectAdditionalCssVarScope ?? injectAdditionalCssVarScope;
|
|
@@ -1058,8 +1055,6 @@ function createHandlersFromContext(ctx, customAttributesEntities, cssCalcOptions
|
|
|
1058
1055
|
escapeMap,
|
|
1059
1056
|
arbitraryValues,
|
|
1060
1057
|
jsPreserveClass,
|
|
1061
|
-
jsArbitraryValueFallback: jsArbitraryValueFallback ?? "auto",
|
|
1062
|
-
tailwindcssMajorVersion,
|
|
1063
1058
|
generateMap: true,
|
|
1064
1059
|
babelParserOptions,
|
|
1065
1060
|
experimentalJsFastPath,
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_context = require("./context-
|
|
2
|
+
const require_context = require("./context-C3TryIjF.cjs");
|
|
3
3
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
4
4
|
//#region src/core.ts
|
|
5
5
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createTailwindRuntimeReadyPromise, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-
|
|
1
|
+
import { l as createTailwindRuntimeReadyPromise, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-DbL0d-zB.js";
|
|
2
2
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
3
3
|
//#region src/core.ts
|
|
4
4
|
const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Pt as getTailwindV4IncrementalGenerateCacheStats, Q as hasTailwindRootDirectives, _ as upsertTailwindV4CssSource, et as normalizeTailwindConfigDirectives, g as removeTailwindV4CssSource, h as hasConfiguredTailwindV4CssRoots, nt as normalizeTailwindSourceForGenerator, vt as prependConfigDirective } from "./generator-BLpOsd5O.js";
|
|
2
2
|
import { l as getRuntimeClassSetSignature, p as resolveSourceScanEntries } from "./tailwindcss-2zdmASlM.js";
|
|
3
|
-
import { $ as
|
|
4
|
-
import {
|
|
5
|
-
import { l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-
|
|
3
|
+
import { $ as getCompilationScopeDependencyRevision, A as annotateCssSourceTrace, B as splitLocalCssImports, D as stripBundlerGeneratedCssMarkers, F as createRuntimeClassSetManager, G as removeRuntimeCompilationBuildStateFiles, H as buildRuntimeCompilationSnapshot, J as createRuntimeAffectingSourceSignature, M as createCssTokenSourceMap, O as finalizeMiniProgramCssStructure, P as processCachedTask, Q as AssetEmissionPlan, T as hasBundlerGeneratedCssMarker, V as finalizeCompilerShadowRun, W as createRuntimeCompilationBuildState, X as beginCompilerShadowRun, Y as disposeCompilerOwner, Z as getCompilerShadowRunSnapshot, b as finalizeMiniProgramGeneratorCss, et as invalidateCompilationScope, j as createCssSourceTraceCacheSignature, n as emitHmrTiming, nt as createCompilationDependencyChanges, q as updateRuntimeCompilationBuildState, r as generateTailwindV4Css, rt as createSourceCandidateCollector, tt as recordCompilationDependencyChanges, w as createBundlerGeneratedCssMarker, z as rewriteLocalCssImportRequestsForOutput } from "./hmr-timing-DXyGw6jp.js";
|
|
4
|
+
import { m as createDebug } from "./wxml-CWJc0yY-.js";
|
|
5
|
+
import { l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-DbL0d-zB.js";
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
2
2
|
const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
3
3
|
const require_options = require("./options-zpZez7qe.cjs");
|
|
4
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
5
|
-
const require_wxml = require("./wxml-
|
|
6
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
7
|
-
const require_context = require("./context-
|
|
4
|
+
const require_v4_generation_core = require("./v4-generation-core-D4zQcQqW.cjs");
|
|
5
|
+
const require_wxml = require("./wxml-DUIdXCVa.cjs");
|
|
6
|
+
const require_hmr_timing = require("./hmr-timing-BnGBBJ6S.cjs");
|
|
7
|
+
const require_context = require("./context-C3TryIjF.cjs");
|
|
8
8
|
const require_tailwindcss = require("./tailwindcss-LtnGCxF0.cjs");
|
|
9
9
|
const require_style_options = require("./style-options-COpQc8fr.cjs");
|
|
10
10
|
let node_fs = require("node:fs");
|
package/dist/gulp.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_gulp = require("./gulp-
|
|
2
|
+
const require_gulp = require("./gulp-DSrcDQsA.cjs");
|
|
3
3
|
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
4
|
exports.createPlugins = require_gulp.createPlugins;
|
|
5
5
|
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPlugins } from "./gulp-
|
|
1
|
+
import { t as createPlugins } from "./gulp-BLaGc0MJ.js";
|
|
2
2
|
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
2
2
|
const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
4
|
-
const require_wxml = require("./wxml-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-D4zQcQqW.cjs");
|
|
4
|
+
const require_wxml = require("./wxml-DUIdXCVa.cjs");
|
|
5
5
|
const require_tailwindcss = require("./tailwindcss-LtnGCxF0.cjs");
|
|
6
6
|
let node_process = require("node:process");
|
|
7
7
|
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
@@ -2,8 +2,8 @@ import { $ as hasTailwindSourceDirectives, A as transformGeneratorUserCss, At as
|
|
|
2
2
|
import { o as transformCssMacroCss, r as hasCssMacroTailwindV4InternalAtRules, t as hasCssMacroStyleOptions } from "./auto-2dg_uhEJ.js";
|
|
3
3
|
import { n as _defineProperty, t as omitUndefined } from "./object-Bvy6-w9r.js";
|
|
4
4
|
import { g as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective, y as collectCssInlineSourceCandidates } from "./tailwindcss-2zdmASlM.js";
|
|
5
|
-
import { _ as
|
|
6
|
-
import { r as resolveStyleOptionsFromContext } from "./context-
|
|
5
|
+
import { _ as md5Hash, g as traverse, h as babelParse, m as createDebug, p as replaceWxml, r as createAttributeMatcher } from "./wxml-CWJc0yY-.js";
|
|
6
|
+
import { r as resolveStyleOptionsFromContext } from "./context-DbL0d-zB.js";
|
|
7
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import process from "node:process";
|
|
@@ -4664,6 +4664,11 @@ function collectGeneratedRawSourceCandidates(candidates, rawSource, escapeMap) {
|
|
|
4664
4664
|
}
|
|
4665
4665
|
return matched;
|
|
4666
4666
|
}
|
|
4667
|
+
function collectGeneratedRawSourceCandidatesFromCss(candidates, cssSources, escapeMap) {
|
|
4668
|
+
const matched = /* @__PURE__ */ new Set();
|
|
4669
|
+
for (const css of cssSources) for (const candidate of collectGeneratedRawSourceCandidates(candidates, css, escapeMap)) matched.add(candidate);
|
|
4670
|
+
return matched;
|
|
4671
|
+
}
|
|
4667
4672
|
//#endregion
|
|
4668
4673
|
//#region src/bundlers/shared/generator-css/result-helpers.ts
|
|
4669
4674
|
function collectCssRuleIdentityMarkers(source) {
|
|
@@ -5579,12 +5584,17 @@ async function validateCandidatesByGeneratorWithOwner(options) {
|
|
|
5579
5584
|
//#endregion
|
|
5580
5585
|
//#region src/bundlers/shared/v4-generation-core.ts
|
|
5581
5586
|
function resolveGenerationOptions(options, mode) {
|
|
5582
|
-
|
|
5583
|
-
const
|
|
5584
|
-
const compilationChanges = mergeCompilationDependencyChanges(options.compilationChanges, consumeCompilationScopeChanges(options.runtimeState, scopeId));
|
|
5585
|
-
if (compilationChanges.length === 0) return options;
|
|
5586
|
-
return {
|
|
5587
|
+
const physicalFile = stripRequestQuery(options.file);
|
|
5588
|
+
const normalizedOptions = physicalFile === options.file ? options : {
|
|
5587
5589
|
...options,
|
|
5590
|
+
file: physicalFile
|
|
5591
|
+
};
|
|
5592
|
+
if (mode === "legacy") return normalizedOptions;
|
|
5593
|
+
const scopeId = normalizedOptions.scope?.id ?? normalizedOptions.outputFile ?? normalizedOptions.file;
|
|
5594
|
+
const compilationChanges = mergeCompilationDependencyChanges(normalizedOptions.compilationChanges, consumeCompilationScopeChanges(normalizedOptions.runtimeState, scopeId));
|
|
5595
|
+
if (compilationChanges.length === 0) return normalizedOptions;
|
|
5596
|
+
return {
|
|
5597
|
+
...normalizedOptions,
|
|
5588
5598
|
compilationChanges,
|
|
5589
5599
|
previousClassSet: void 0,
|
|
5590
5600
|
previousCss: void 0
|
|
@@ -5777,4 +5787,4 @@ function createHmrTimingRecorder(bundler) {
|
|
|
5777
5787
|
};
|
|
5778
5788
|
}
|
|
5779
5789
|
//#endregion
|
|
5780
|
-
export {
|
|
5790
|
+
export { getCompilationScopeDependencyRevision as $, annotateCssSourceTrace as A, splitLocalCssImports as B, stripRequestQuery as C, stripBundlerGeneratedCssMarkers as D, parseBundlerGeneratedCssMarkerBlocks as E, createRuntimeClassSetManager as F, removeRuntimeCompilationBuildStateFiles as G, buildRuntimeCompilationSnapshot as H, collectStrictEscapedRuntimeCandidates as I, createRuntimeAffectingSourceSignature as J, resetRuntimeCompilationBuildState as K, createEscapeFragments as L, createCssTokenSourceMap as M, isCssSourceTraceEnabled as N, finalizeMiniProgramCssStructure as O, processCachedTask as P, AssetEmissionPlan as Q, isPureLocalCssImportWrapper as R, isSourceStyleRequest as S, hasBundlerGeneratedCssMarker as T, createRuntimeCompilationAffectingSignature as U, finalizeCompilerShadowRun as V, createRuntimeCompilationBuildState as W, beginCompilerShadowRun as X, disposeCompilerOwner as Y, getCompilerShadowRunSnapshot as Z, captureResolvedFrameworkPostcssOptions as _, extractMarkedUserLayerComponentsCss as a, isSourceCandidateRequest as at, finalizeMiniProgramGeneratorCss as b, collectRawSourceClassSelectors as c, runWithConcurrency as d, invalidateCompilationScope as et, normalizeMiniProgramGeneratorCssSource as f, captureFrameworkPostcssOptions as g, removeGeneratedSelectorCompatCss as h, validateCandidatesByGenerator as i, createSourceCandidateStore as it, createCssSourceTraceCacheSignature as j, hasEmptyAtRuleBlockCandidate as k, pushConcurrentTaskFactories as l, scoreTailwindV4CssSourceFileMatch as m, emitHmrTiming as n, createCompilationDependencyChanges as nt, mergeMarkedUserLayerComponentsCss as o, extractCandidatesFromSource as ot, normalizeMiniProgramImportShell as p, updateRuntimeCompilationBuildState as q, generateTailwindV4Css as r, createSourceCandidateCollector as rt, collectGeneratedRawSourceCandidatesFromCss as s, resolveSourceCandidateScanFiles as st, createHmrTimingRecorder as t, recordCompilationDependencyChanges as tt, resolveTaskConcurrency as u, collectFrameworkPostcssOptionsFromLoaderEntries as v, createBundlerGeneratedCssMarker as w, hasMiniProgramTailwindV4PreflightReset as x, createCssSourceOrderAppend as y, rewriteLocalCssImportRequestsForOutput as z };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
3
|
const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
4
|
-
const require_gulp = require("./gulp-
|
|
4
|
+
const require_gulp = require("./gulp-DSrcDQsA.cjs");
|
|
5
5
|
const require_postcss = require("./postcss.cjs");
|
|
6
|
-
const require_vite = require("./vite-
|
|
7
|
-
const require_webpack = require("./webpack-
|
|
6
|
+
const require_vite = require("./vite-DTDbD-95.cjs");
|
|
7
|
+
const require_webpack = require("./webpack-Bpovb6YE.cjs");
|
|
8
8
|
require("./webpack.cjs");
|
|
9
9
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
10
10
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.js";
|
|
2
2
|
import { t as createWeappTailwindcssGenerator } from "./generator-BLpOsd5O.js";
|
|
3
|
-
import { t as createPlugins } from "./gulp-
|
|
3
|
+
import { t as createPlugins } from "./gulp-BLaGc0MJ.js";
|
|
4
4
|
import weappTailwindcssPostcssPlugin from "./postcss.js";
|
|
5
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
6
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-BWmBFzgf.js";
|
|
6
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-CtUyQNqC.js";
|
|
7
7
|
import "./webpack.js";
|
|
8
8
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
9
9
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { IJsHandlerOptions } from '../types/index.js';
|
|
2
|
-
export declare function transformLiteralText(literal: string, options: IJsHandlerOptions): string | undefined;
|
|
2
|
+
export declare function transformLiteralText(literal: string, options: IJsHandlerOptions, classContext?: boolean): string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
2
2
|
const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
3
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
3
|
+
const require_v4_generation_core = require("./v4-generation-core-D4zQcQqW.cjs");
|
|
4
4
|
const require_defaults = require("./defaults.cjs");
|
|
5
5
|
const require_style_options = require("./style-options-COpQc8fr.cjs");
|
|
6
6
|
let node_path = require("node:path");
|
package/dist/rspack.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-CVvi-lCc.cjs");
|
|
3
|
-
const require_webpack = require("./webpack-
|
|
3
|
+
const require_webpack = require("./webpack-Bpovb6YE.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-CtUyQNqC.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IJsHandlerOptions } from '../types/index.js';
|
|
2
|
-
export type ClassNameTransformDecision = 'direct' | 'escaped' | '
|
|
2
|
+
export type ClassNameTransformDecision = 'direct' | 'escaped' | 'skip';
|
|
3
3
|
export interface ClassNameTransformResult {
|
|
4
4
|
decision: ClassNameTransformDecision;
|
|
5
5
|
escapedValue?: string;
|
|
@@ -7,8 +7,7 @@ export interface ClassNameTransformResult {
|
|
|
7
7
|
interface ResolveClassNameTransformOptions extends Pick<IJsHandlerOptions, 'alwaysEscape' | 'classNameSet' | 'escapeMap' | 'jsArbitraryValueFallback' | 'jsPreserveClass' | 'tailwindcssMajorVersion'> {
|
|
8
8
|
classContext?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function resolveClassNameTransformWithResult(candidate: string, { alwaysEscape, classNameSet, escapeMap, jsArbitraryValueFallback, jsPreserveClass, tailwindcssMajorVersion, classContext, }: ResolveClassNameTransformOptions): ClassNameTransformResult;
|
|
10
|
+
export declare function resolveClassNameTransformWithResult(candidate: string, { alwaysEscape, classNameSet, escapeMap, jsPreserveClass, classContext, }: ResolveClassNameTransformOptions): ClassNameTransformResult;
|
|
12
11
|
export declare function resolveClassNameTransformDecision(candidate: string, options: ResolveClassNameTransformOptions): ClassNameTransformDecision;
|
|
13
12
|
export declare function shouldTransformClassNameCandidate(candidate: string, options: ResolveClassNameTransformOptions): boolean;
|
|
14
13
|
export {};
|
|
@@ -3,7 +3,7 @@ const require_framework = require("./framework.cjs");
|
|
|
3
3
|
const require_generator = require("./generator-B0dCFlP1.cjs");
|
|
4
4
|
require("./auto-DtU6f3X6.cjs");
|
|
5
5
|
const require_options = require("./options-zpZez7qe.cjs");
|
|
6
|
-
const require_v4_generation_core = require("./v4-generation-core-
|
|
6
|
+
const require_v4_generation_core = require("./v4-generation-core-D4zQcQqW.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");
|
|
@@ -2,7 +2,7 @@ import { detectAppType } from "./framework.js";
|
|
|
2
2
|
import { At as toPosixPath } from "./generator-BLpOsd5O.js";
|
|
3
3
|
import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-2dg_uhEJ.js";
|
|
4
4
|
import { _ as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-2zdmASlM.js";
|
|
5
|
-
import {
|
|
5
|
+
import { S as isSourceStyleRequest } from "./hmr-timing-DXyGw6jp.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { weappStyleInjector } from "weapp-style-injector/vite";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_object = require("./object-C_Vr6_S5.cjs");
|
|
2
|
-
const require_wxml = require("./wxml-
|
|
2
|
+
const require_wxml = require("./wxml-DUIdXCVa.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
|