weapp-tailwindcss 5.1.10 → 5.1.12
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/cache-options-DavPxrhC.js +16 -0
- package/dist/cache-options-DwBtLwQe.mjs +5 -0
- package/dist/cli.js +10 -6
- package/dist/cli.mjs +10 -6
- package/dist/context-DRRgW7i2.js +1311 -0
- package/dist/context-xSJE588m.mjs +1234 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/defaults.js +119 -5
- package/dist/defaults.mjs +114 -1
- package/dist/{generator-ROzBodj6.mjs → generator-BvPcmqxU.mjs} +9 -139
- package/dist/{generator-Bz94KTkH.js → generator-CS10c9g1.js} +18 -154
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/{gulp-BKqMb_Ds.mjs → gulp-BEOzXrbp.mjs} +5 -4
- package/dist/{gulp-DfOLvYLs.js → gulp-DNZZvUMq.js} +6 -5
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-DOTdH18A.js → hmr-timing-DW1g3zjl.js} +17 -15
- package/dist/{hmr-timing-DwtYJdwb.mjs → hmr-timing-hRhRAjYV.mjs} +5 -3
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/object-BJSWl-E5.mjs +9 -0
- package/dist/object-COs_Mw6p.js +14 -0
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/presets.js +5 -5
- package/dist/presets.mjs +3 -3
- package/dist/rspack.js +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/{source-candidate-scan-signature-BrWuBTjY.js → source-candidate-scan-signature-CMgu5bJk.js} +6 -6
- package/dist/{source-candidate-scan-signature-CQ04hiox.mjs → source-candidate-scan-signature-t4XKAQ04.mjs} +3 -3
- package/dist/{tailwindcss-hzy_WaC9.mjs → tailwindcss-DZT_pWrd.mjs} +132 -2
- package/dist/{tailwindcss-Dn5DVlkI.js → tailwindcss-z9JMF-qU.js} +140 -10
- package/dist/{transform-DZQETx51.js → transform-COFRlmDF.js} +13 -13
- package/dist/{transform-BgnNYkIG.mjs → transform-D5JUgMpE.mjs} +1 -1
- package/dist/{utils-D3h8j7Mk.js → utils-CuKLf1Zv.js} +0 -15
- package/dist/{utils-DodxWHGz.mjs → utils-MVwpU07P.mjs} +1 -8
- package/dist/{vite-BimHmlSp.mjs → vite-DF1gE6a5.mjs} +36 -30
- package/dist/{vite-bztpcI8_.js → vite-VGfkFQkC.js} +51 -45
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +6 -2
- package/dist/{webpack-CCapGlNg.mjs → webpack-CTYm19zA.mjs} +22 -16
- package/dist/{webpack-XxBCIrBp.js → webpack-CzXjfvYS.js} +28 -22
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/dist/{context-y2BGCok4.js → wxml-Ce10eREX.js} +37 -1286
- package/dist/{context-DzkSFEVL.mjs → wxml-DdGdeqaH.mjs} +13 -1235
- package/package.json +2 -2
- package/dist/defaults-9B6aMyZb.mjs +0 -118
- package/dist/defaults-nsf4VNMX.js +0 -154
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
2
|
+
const require_framework = require("./framework.js");
|
|
2
3
|
require("./auto-DtU6f3X6.js");
|
|
3
|
-
const
|
|
4
|
+
const require_object = require("./object-COs_Mw6p.js");
|
|
5
|
+
require("./utils-CuKLf1Zv.js");
|
|
4
6
|
let node_fs = require("node:fs");
|
|
5
7
|
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
6
8
|
let node_path = require("node:path");
|
|
@@ -54,14 +56,6 @@ function inferGeneratorTargetFromEnv() {
|
|
|
54
56
|
return inferGeneratorTargetFromExplicitEnv() ?? (shouldUseWebGeneratorTargetFromEnv() ? "web" : "weapp");
|
|
55
57
|
}
|
|
56
58
|
//#endregion
|
|
57
|
-
//#region src/utils/object.ts
|
|
58
|
-
function definedEntries(value) {
|
|
59
|
-
return Object.entries(value).filter(([, item]) => item !== void 0);
|
|
60
|
-
}
|
|
61
|
-
function omitUndefined(value) {
|
|
62
|
-
return Object.fromEntries(definedEntries(value));
|
|
63
|
-
}
|
|
64
|
-
//#endregion
|
|
65
59
|
//#region src/tailwindcss/v4-engine/candidates.ts
|
|
66
60
|
const UNSUPPORTED_MINI_PROGRAM_TAILWIND_V4_CANDIDATE_RE = /(?:^|:)(?:group|peer|in|not-in)-[^\s:]*\/|(?:^|:)(?:in|not-in)-\[/;
|
|
67
61
|
function isUnsupportedMiniProgramTailwindV4Candidate(candidate) {
|
|
@@ -608,135 +602,6 @@ function restoreRpxLengthCssSelectors(css, restoreCandidates) {
|
|
|
608
602
|
});
|
|
609
603
|
}
|
|
610
604
|
//#endregion
|
|
611
|
-
//#region src/tailwindcss/source-scan/inline-source.ts
|
|
612
|
-
const NUMERICAL_RANGE_RE = /^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;
|
|
613
|
-
function segmentTopLevel(input, separator, options = {}) {
|
|
614
|
-
const parts = [];
|
|
615
|
-
const stack = [];
|
|
616
|
-
let lastPos = 0;
|
|
617
|
-
let quote;
|
|
618
|
-
for (let index = 0; index < input.length; index++) {
|
|
619
|
-
const char = input[index];
|
|
620
|
-
if (char === "\\") {
|
|
621
|
-
index += 1;
|
|
622
|
-
continue;
|
|
623
|
-
}
|
|
624
|
-
if (quote) {
|
|
625
|
-
if (char === quote) quote = void 0;
|
|
626
|
-
continue;
|
|
627
|
-
}
|
|
628
|
-
if (char === "\"" || char === "'") {
|
|
629
|
-
quote = char;
|
|
630
|
-
continue;
|
|
631
|
-
}
|
|
632
|
-
if (char === "(") {
|
|
633
|
-
stack.push(")");
|
|
634
|
-
continue;
|
|
635
|
-
}
|
|
636
|
-
if (char === "[") {
|
|
637
|
-
stack.push("]");
|
|
638
|
-
continue;
|
|
639
|
-
}
|
|
640
|
-
if (char === "{") {
|
|
641
|
-
stack.push("}");
|
|
642
|
-
continue;
|
|
643
|
-
}
|
|
644
|
-
if (stack.length > 0 && char === stack[stack.length - 1]) {
|
|
645
|
-
stack.pop();
|
|
646
|
-
continue;
|
|
647
|
-
}
|
|
648
|
-
if (stack.length === 0 && char === separator) {
|
|
649
|
-
const part = input.slice(lastPos, index);
|
|
650
|
-
if (part || options.keepEmpty) parts.push(part);
|
|
651
|
-
lastPos = index + 1;
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
const part = input.slice(lastPos);
|
|
655
|
-
if (part || options.keepEmpty) parts.push(part);
|
|
656
|
-
return parts;
|
|
657
|
-
}
|
|
658
|
-
function isSequence(value) {
|
|
659
|
-
return NUMERICAL_RANGE_RE.test(value);
|
|
660
|
-
}
|
|
661
|
-
function expandSequence(value) {
|
|
662
|
-
const match = value.match(NUMERICAL_RANGE_RE);
|
|
663
|
-
if (!match) return [value];
|
|
664
|
-
const [, start, end, stepValue] = match;
|
|
665
|
-
if (start === void 0 || end === void 0) return [value];
|
|
666
|
-
let step = stepValue ? Number.parseInt(stepValue, 10) : void 0;
|
|
667
|
-
const startNumber = Number.parseInt(start, 10);
|
|
668
|
-
const endNumber = Number.parseInt(end, 10);
|
|
669
|
-
const increasing = startNumber < endNumber;
|
|
670
|
-
if (step === void 0) step = increasing ? 1 : -1;
|
|
671
|
-
if (step === 0) return [];
|
|
672
|
-
if (increasing && step < 0) step = -step;
|
|
673
|
-
if (!increasing && step > 0) step = -step;
|
|
674
|
-
const result = [];
|
|
675
|
-
for (let value = startNumber; increasing ? value <= endNumber : value >= endNumber; value += step) result.push(String(value));
|
|
676
|
-
return result;
|
|
677
|
-
}
|
|
678
|
-
function expandInlineSourceCandidatePattern(pattern) {
|
|
679
|
-
const index = pattern.indexOf("{");
|
|
680
|
-
if (index === -1) return [pattern];
|
|
681
|
-
const prefix = pattern.slice(0, index);
|
|
682
|
-
const rest = pattern.slice(index);
|
|
683
|
-
let depth = 0;
|
|
684
|
-
let endIndex = -1;
|
|
685
|
-
for (let index = 0; index < rest.length; index++) {
|
|
686
|
-
const char = rest[index];
|
|
687
|
-
if (char === "{") depth += 1;
|
|
688
|
-
else if (char === "}") {
|
|
689
|
-
depth -= 1;
|
|
690
|
-
if (depth === 0) {
|
|
691
|
-
endIndex = index;
|
|
692
|
-
break;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
if (endIndex === -1) return [pattern];
|
|
697
|
-
const inner = rest.slice(1, endIndex);
|
|
698
|
-
const suffix = rest.slice(endIndex + 1);
|
|
699
|
-
const parts = (isSequence(inner) ? expandSequence(inner) : segmentTopLevel(inner, ",", { keepEmpty: true })).flatMap((part) => expandInlineSourceCandidatePattern(part));
|
|
700
|
-
return expandInlineSourceCandidatePattern(suffix).flatMap((suffix) => parts.map((part) => `${prefix}${part}${suffix}`));
|
|
701
|
-
}
|
|
702
|
-
function parseSourceInlineParam(params) {
|
|
703
|
-
let value = params.trim();
|
|
704
|
-
const negated = value.startsWith("not ");
|
|
705
|
-
if (negated) value = value.slice(4).trim();
|
|
706
|
-
if (!value.startsWith("inline(") || !value.endsWith(")")) return;
|
|
707
|
-
const inlineValue = value.slice(7, -1).trim();
|
|
708
|
-
const match = /^(['"])([\s\S]*)\1$/.exec(inlineValue);
|
|
709
|
-
if (!match) return;
|
|
710
|
-
const source = match[2];
|
|
711
|
-
if (source === void 0) return;
|
|
712
|
-
return {
|
|
713
|
-
negated,
|
|
714
|
-
source
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function collectCssInlineSourceCandidates(root) {
|
|
718
|
-
const included = /* @__PURE__ */ new Set();
|
|
719
|
-
const excluded = /* @__PURE__ */ new Set();
|
|
720
|
-
root.walkAtRules("source", (rule) => {
|
|
721
|
-
const parsed = parseSourceInlineParam(rule.params);
|
|
722
|
-
if (!parsed) return;
|
|
723
|
-
const target = parsed.negated ? excluded : included;
|
|
724
|
-
for (const source of segmentTopLevel(parsed.source, " ")) {
|
|
725
|
-
const trimmed = source.trim();
|
|
726
|
-
if (!trimmed) continue;
|
|
727
|
-
for (const candidate of expandInlineSourceCandidatePattern(trimmed)) {
|
|
728
|
-
const normalized = candidate.trim();
|
|
729
|
-
if (normalized) target.add(normalized);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
});
|
|
733
|
-
for (const candidate of excluded) included.delete(candidate);
|
|
734
|
-
return {
|
|
735
|
-
included,
|
|
736
|
-
excluded
|
|
737
|
-
};
|
|
738
|
-
}
|
|
739
|
-
//#endregion
|
|
740
605
|
//#region src/tailwindcss/source-scan.ts
|
|
741
606
|
const DEFAULT_SOURCE_SCAN_EXTENSIONS = [
|
|
742
607
|
"html",
|
|
@@ -1309,7 +1174,7 @@ function createTailwindV4Engine(source) {
|
|
|
1309
1174
|
const delegateSourceScan = shouldDelegateWebSourceScanToTailwind(target, resolvedScanSources);
|
|
1310
1175
|
const filesystemCandidates = !delegateSourceScan && Array.isArray(resolvedScanSources) ? new Set(await (0, _tailwindcss_mangle_engine.extractRawCandidates)(resolvedScanSources, { ...patchOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: patchOptions.bareArbitraryValues } })) : void 0;
|
|
1311
1176
|
const normalizedCandidates = normalizeTargetRpxLengthCandidates(resolveTargetCandidates(/* @__PURE__ */ new Set([...collectCandidates(patchOptions.candidates), ...filesystemCandidates ?? []]), target), target, resolvedStyleOptions);
|
|
1312
|
-
const result = await engine.generate(omitUndefined({
|
|
1177
|
+
const result = await engine.generate(require_object.omitUndefined({
|
|
1313
1178
|
scanSources: delegateSourceScan ? resolvedScanSources : false,
|
|
1314
1179
|
...patchOptions,
|
|
1315
1180
|
candidates: normalizedCandidates.candidates
|
|
@@ -2657,7 +2522,7 @@ function isSameCssSource(a, b) {
|
|
|
2657
2522
|
}
|
|
2658
2523
|
function upsertTailwindV4CssSource(opts, source) {
|
|
2659
2524
|
if (!isTailwindV4CssEntry(source.file)) return false;
|
|
2660
|
-
const normalizedSource = omitUndefined({
|
|
2525
|
+
const normalizedSource = require_object.omitUndefined({
|
|
2661
2526
|
...source,
|
|
2662
2527
|
...source.base === void 0 ? {} : { base: normalizeCssSourceBase(source.base) },
|
|
2663
2528
|
...source.file === void 0 ? {} : { file: normalizeCssSourceFile(source.file) },
|
|
@@ -2907,7 +2772,7 @@ function resolveEngineTailwindV4SourceOptions(runtime) {
|
|
|
2907
2772
|
}
|
|
2908
2773
|
function resolveTailwindV4SourceOptionsFromRuntime(runtime) {
|
|
2909
2774
|
const tailwindV4Options = readTailwindV4Options(runtime);
|
|
2910
|
-
return normalizeTailwindV4SourceOptions(omitUndefined({
|
|
2775
|
+
return normalizeTailwindV4SourceOptions(require_object.omitUndefined({
|
|
2911
2776
|
...resolveEngineTailwindV4SourceOptions(runtime),
|
|
2912
2777
|
sources: tailwindV4Options?.sources
|
|
2913
2778
|
}));
|
|
@@ -2952,12 +2817,17 @@ function createMiniProgramRuntimeBranch(base) {
|
|
|
2952
2817
|
return createRuntimeBranch(base, "mini-program", { platform: typeof context.platform === "string" && context.platform.length > 0 ? context.platform : uniUtsPlatform.isMp ? uniUtsPlatform.normalized : context.platform });
|
|
2953
2818
|
}
|
|
2954
2819
|
//#endregion
|
|
2820
|
+
//#region src/utils/uni-platform.ts
|
|
2821
|
+
function resolveUniUtsPlatform(value = node_process.default.env["UNI_UTS_PLATFORM"]) {
|
|
2822
|
+
return require_framework.resolveUniUtsPlatform(value);
|
|
2823
|
+
}
|
|
2824
|
+
//#endregion
|
|
2955
2825
|
//#region src/runtime-branch/platform.ts
|
|
2956
2826
|
function isRuntimeUniAppXEnabled(value) {
|
|
2957
2827
|
return value === true || typeof value === "object" && value?.enabled !== false;
|
|
2958
2828
|
}
|
|
2959
2829
|
function normalizeRuntimeUniUtsPlatform(value) {
|
|
2960
|
-
return typeof value === "object" && value !== null ? value :
|
|
2830
|
+
return typeof value === "object" && value !== null ? value : resolveUniUtsPlatform(value);
|
|
2961
2831
|
}
|
|
2962
2832
|
function resolveNativeAppPlatform(platform) {
|
|
2963
2833
|
if (platform.isAppAndroid) return "android";
|
|
@@ -3084,12 +2954,6 @@ Object.defineProperty(exports, "VITE_MARKER_RE", {
|
|
|
3084
2954
|
return VITE_MARKER_RE;
|
|
3085
2955
|
}
|
|
3086
2956
|
});
|
|
3087
|
-
Object.defineProperty(exports, "collectCssInlineSourceCandidates", {
|
|
3088
|
-
enumerable: true,
|
|
3089
|
-
get: function() {
|
|
3090
|
-
return collectCssInlineSourceCandidates;
|
|
3091
|
-
}
|
|
3092
|
-
});
|
|
3093
2957
|
Object.defineProperty(exports, "createCssAppend", {
|
|
3094
2958
|
enumerable: true,
|
|
3095
2959
|
get: function() {
|
|
@@ -3324,12 +3188,6 @@ Object.defineProperty(exports, "normalizeWeappTailwindcssGeneratorOptions", {
|
|
|
3324
3188
|
return normalizeWeappTailwindcssGeneratorOptions;
|
|
3325
3189
|
}
|
|
3326
3190
|
});
|
|
3327
|
-
Object.defineProperty(exports, "omitUndefined", {
|
|
3328
|
-
enumerable: true,
|
|
3329
|
-
get: function() {
|
|
3330
|
-
return omitUndefined;
|
|
3331
|
-
}
|
|
3332
|
-
});
|
|
3333
3191
|
Object.defineProperty(exports, "parseConfigParam", {
|
|
3334
3192
|
enumerable: true,
|
|
3335
3193
|
get: function() {
|
|
@@ -3456,6 +3314,12 @@ Object.defineProperty(exports, "resolveTailwindcssOptions", {
|
|
|
3456
3314
|
return resolveTailwindcssOptions;
|
|
3457
3315
|
}
|
|
3458
3316
|
});
|
|
3317
|
+
Object.defineProperty(exports, "resolveUniUtsPlatform", {
|
|
3318
|
+
enumerable: true,
|
|
3319
|
+
get: function() {
|
|
3320
|
+
return resolveUniUtsPlatform;
|
|
3321
|
+
}
|
|
3322
|
+
});
|
|
3459
3323
|
Object.defineProperty(exports, "shouldFilterApplyOnlyGeneratedCss", {
|
|
3460
3324
|
enumerable: true,
|
|
3461
3325
|
get: function() {
|
package/dist/generator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-CS10c9g1.js");
|
|
3
3
|
exports.createWeappTailwindcssGenerator = require_generator.createWeappTailwindcssGenerator;
|
|
4
4
|
exports.createWeappTailwindcssGeneratorFromRuntime = require_generator.createWeappTailwindcssGeneratorFromRuntime;
|
|
5
5
|
exports.normalizeWeappTailwindcssGeneratorOptions = require_generator.normalizeWeappTailwindcssGeneratorOptions;
|
package/dist/generator.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as
|
|
1
|
+
import { bt as transformTailwindV4CssToWeapp, d as resolveTailwindV4SourceFromRuntime, f as resolveTailwindV4SourceFromRuntimeOptions, i as normalizeWeappTailwindcssGeneratorOptions, n as createWeappTailwindcssGeneratorFromRuntime, p as resolveTailwindV4SourceOptionsFromRuntime, r as resolveTailwindSourceFromRuntime, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source, yt as transformTailwindV4CssByTarget } from "./generator-BvPcmqxU.mjs";
|
|
2
2
|
export { createWeappTailwindcssGenerator, createWeappTailwindcssGeneratorFromRuntime, normalizeWeappTailwindcssGeneratorOptions, resolveTailwindSourceFromRuntime, resolveTailwindV4Source, resolveTailwindV4SourceFromRuntime, resolveTailwindV4SourceFromRuntimeOptions, resolveTailwindV4SourceOptionsFromRuntime, transformTailwindV4CssByTarget, transformTailwindV4CssToWeapp };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Q as normalizeTailwindConfigDirectives, X as hasTailwindRootDirectives, et as normalizeTailwindSourceForGenerator, g as upsertTailwindV4CssSource, gt as prependConfigDirective, h as hasConfiguredTailwindV4CssRoots, vt as getTailwindV4IncrementalGenerateCacheStats } from "./generator-BvPcmqxU.mjs";
|
|
2
|
+
import { l as getRuntimeClassSetSignature, p as resolveViteSourceScanEntries } from "./tailwindcss-DZT_pWrd.mjs";
|
|
3
|
+
import { y as createDebug } from "./wxml-DdGdeqaH.mjs";
|
|
4
|
+
import { l as createTailwindRuntimeReadyPromise, n as normalizeStyleHandlerMajorVersion, o as shouldSkipJsTransform, t as getCompilerContext, u as ensureRuntimeClassSet } from "./context-xSJE588m.mjs";
|
|
5
|
+
import { A as processCachedTask, D as createCssSourceTraceCacheSignature, E as annotateCssSourceTrace, O as createCssTokenSourceMap, b as rewriteLocalCssImportRequestsForOutput, n as emitHmrTiming, r as createSourceCandidateCollector, s as createBundleRuntimeClassSetManager, u as generateCssByGenerator, x as splitLocalCssImports } from "./hmr-timing-hRhRAjYV.mjs";
|
|
5
6
|
import fs from "node:fs";
|
|
6
7
|
import path from "node:path";
|
|
7
8
|
import process from "node:process";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
2
|
+
const require_generator = require("./generator-CS10c9g1.js");
|
|
3
|
+
const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
|
|
4
|
+
const require_wxml = require("./wxml-Ce10eREX.js");
|
|
5
|
+
const require_context = require("./context-DRRgW7i2.js");
|
|
6
|
+
const require_hmr_timing = require("./hmr-timing-DW1g3zjl.js");
|
|
6
7
|
let node_fs = require("node:fs");
|
|
7
8
|
node_fs = require_rolldown_runtime.__toESM(node_fs);
|
|
8
9
|
let node_path = require("node:path");
|
|
@@ -130,7 +131,7 @@ function createVinylTransform(phase, handler, getTimingDetails) {
|
|
|
130
131
|
}
|
|
131
132
|
//#endregion
|
|
132
133
|
//#region src/bundlers/gulp/shared/create-native-framework-plugins.ts
|
|
133
|
-
const debug =
|
|
134
|
+
const debug = require_wxml.createDebug();
|
|
134
135
|
const GULP_RUNTIME_SOURCE_CACHE_MAX = 256;
|
|
135
136
|
const GULP_PROCESS_CACHE_MAX = 512;
|
|
136
137
|
function toMb(bytes) {
|
package/dist/gulp.js
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-DNZZvUMq.js");
|
|
3
3
|
exports.WeappTailwindcss = require_gulp.createPlugins;
|
|
4
4
|
exports.createPlugins = require_gulp.createPlugins;
|
|
5
5
|
exports.weappTailwindcss = require_gulp.createPlugins;
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPlugins } from "./gulp-
|
|
1
|
+
import { t as createPlugins } from "./gulp-BEOzXrbp.mjs";
|
|
2
2
|
export { createPlugins as WeappTailwindcss, createPlugins, createPlugins as weappTailwindcss };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const
|
|
4
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
2
|
+
const require_generator = require("./generator-CS10c9g1.js");
|
|
3
|
+
const require_object = require("./object-COs_Mw6p.js");
|
|
4
|
+
const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
|
|
5
|
+
const require_wxml = require("./wxml-Ce10eREX.js");
|
|
6
|
+
const require_context = require("./context-DRRgW7i2.js");
|
|
5
7
|
let node_fs = require("node:fs");
|
|
6
8
|
let node_path = require("node:path");
|
|
7
9
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
@@ -62,7 +64,7 @@ function createCssTokenSourceMap(sourcesByToken, opts) {
|
|
|
62
64
|
sources: [...sources].map((file) => normalizeSourcePath(file, root)).sort()
|
|
63
65
|
};
|
|
64
66
|
tokenSources.set(token, source);
|
|
65
|
-
const escaped =
|
|
67
|
+
const escaped = require_wxml.replaceWxml(token, { escapeMap: opts.escapeMap });
|
|
66
68
|
tokenSources.set(escaped, source);
|
|
67
69
|
tokenSources.set(escaped.replaceAll("\\", ""), source);
|
|
68
70
|
}
|
|
@@ -149,7 +151,7 @@ function collectGeneratedRawSourceCandidates(candidates, rawSource, escapeMap) {
|
|
|
149
151
|
if (selectors.size === 0) return /* @__PURE__ */ new Set();
|
|
150
152
|
const matched = /* @__PURE__ */ new Set();
|
|
151
153
|
for (const candidate of candidates) {
|
|
152
|
-
const escaped = normalizeCssClassSelector(
|
|
154
|
+
const escaped = normalizeCssClassSelector(require_wxml.replaceWxml(candidate, { escapeMap }));
|
|
153
155
|
if (selectors.has(candidate) || selectors.has(escaped)) matched.add(candidate);
|
|
154
156
|
}
|
|
155
157
|
return matched;
|
|
@@ -568,7 +570,7 @@ function escapeCompatSelectorClasses(selector) {
|
|
|
568
570
|
end += 1;
|
|
569
571
|
}
|
|
570
572
|
if (className.includes("\\")) {
|
|
571
|
-
result += `.${
|
|
573
|
+
result += `.${require_wxml.replaceWxml(unescapeSimpleCssIdent(className))}`;
|
|
572
574
|
changed = true;
|
|
573
575
|
} else result += `.${className}`;
|
|
574
576
|
index = end;
|
|
@@ -1135,7 +1137,7 @@ function mergeCssSources(cssSources, cssEntrySources) {
|
|
|
1135
1137
|
return merged.length > 0 ? merged : void 0;
|
|
1136
1138
|
}
|
|
1137
1139
|
function createSingleTailwindV4SourceOptions(sourceOptions, options) {
|
|
1138
|
-
return
|
|
1140
|
+
return require_object.omitUndefined({
|
|
1139
1141
|
projectRoot: sourceOptions.projectRoot,
|
|
1140
1142
|
baseFallbacks: sourceOptions.baseFallbacks,
|
|
1141
1143
|
packageName: sourceOptions.packageName,
|
|
@@ -1147,7 +1149,7 @@ function createSingleTailwindV4SourceOptions(sourceOptions, options) {
|
|
|
1147
1149
|
async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions, options = {}) {
|
|
1148
1150
|
const { cssEntries: _cssEntries, cssSources: _cssSources, ...singleEntrySourceOptions } = sourceOptions;
|
|
1149
1151
|
if (!(0, node_fs.existsSync)(cssEntry)) return withGeneratorSourceMetadata(await require_generator.resolveTailwindV4Source({
|
|
1150
|
-
...
|
|
1152
|
+
...require_object.omitUndefined(singleEntrySourceOptions),
|
|
1151
1153
|
cssEntries: [cssEntry]
|
|
1152
1154
|
}), {
|
|
1153
1155
|
candidateMatchedCssSource: options.candidateMatched,
|
|
@@ -1163,7 +1165,7 @@ async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions, options
|
|
|
1163
1165
|
sourceFile: sourceOptions.sourceFile ?? cssEntry
|
|
1164
1166
|
});
|
|
1165
1167
|
return withGeneratorSourceMetadata(await require_generator.resolveTailwindV4Source({
|
|
1166
|
-
...
|
|
1168
|
+
...require_object.omitUndefined(singleEntrySourceOptions),
|
|
1167
1169
|
base,
|
|
1168
1170
|
css: require_generator.normalizeConfigDirective(css, config),
|
|
1169
1171
|
cssEntries: [cssEntry]
|
|
@@ -1415,7 +1417,7 @@ function createTailwindV4CssSourceResolver(sourceOptions, generatorOptions) {
|
|
|
1415
1417
|
}
|
|
1416
1418
|
async function resolveTailwindV4SourceSideEntrySource(resolvedEntrySource, sourceOptions, generatorOptions, file) {
|
|
1417
1419
|
if (!resolvedEntrySource) return;
|
|
1418
|
-
const resolvedSourceOptions =
|
|
1420
|
+
const resolvedSourceOptions = require_object.omitUndefined(sourceOptions);
|
|
1419
1421
|
const config = resolveExistingConfigPath(resolvedEntrySource.config, resolvedEntrySource.configRequest, file, {
|
|
1420
1422
|
...resolvedSourceOptions,
|
|
1421
1423
|
sourceFile: resolvedEntrySource.file
|
|
@@ -1447,7 +1449,7 @@ async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, fi
|
|
|
1447
1449
|
css: rawSource
|
|
1448
1450
|
} : void 0;
|
|
1449
1451
|
const sourceOptions = tryResolveTailwindV4SourceOptions(runtimeState);
|
|
1450
|
-
const resolvedSourceOptions = sourceOptions ?
|
|
1452
|
+
const resolvedSourceOptions = sourceOptions ? require_object.omitUndefined({
|
|
1451
1453
|
...sourceOptions,
|
|
1452
1454
|
sourceFile: sourceOptions.sourceFile ?? resolvePostcssSourceFile(cssHandlerOptions),
|
|
1453
1455
|
...resolveCssHandlerSourceOptions(cssHandlerOptions),
|
|
@@ -1493,7 +1495,7 @@ async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, fi
|
|
|
1493
1495
|
css: require_generator.prependConfigDirective(source.css, generatorOptions.config)
|
|
1494
1496
|
} : source;
|
|
1495
1497
|
}
|
|
1496
|
-
const config = resolveExistingConfigPath(resolvedEntrySource.config, resolvedEntrySource.configRequest, file,
|
|
1498
|
+
const config = resolveExistingConfigPath(resolvedEntrySource.config, resolvedEntrySource.configRequest, file, require_object.omitUndefined({
|
|
1497
1499
|
...resolvedSourceOptions ?? {},
|
|
1498
1500
|
sourceFile: resolvedEntrySource.file ?? resolvedSourceOptions?.sourceFile ?? resolvePostcssSourceFile(cssHandlerOptions)
|
|
1499
1501
|
}));
|
|
@@ -1518,7 +1520,7 @@ async function resolveGeneratorSources(majorVersion, runtimeState, rawSource, fi
|
|
|
1518
1520
|
const sourceOptionsFromRuntime = require_generator.resolveTailwindV4SourceOptionsFromRuntime(runtimeState.tailwindRuntime);
|
|
1519
1521
|
const cssEntries = selectionOptions?.cssEntries ?? sourceOptionsFromRuntime.cssEntries;
|
|
1520
1522
|
const runtimeCssSources = selectionOptions?.cssEntries ? void 0 : sourceOptionsFromRuntime.cssSources;
|
|
1521
|
-
sourceOptions =
|
|
1523
|
+
sourceOptions = require_object.omitUndefined({
|
|
1522
1524
|
...sourceOptionsFromRuntime,
|
|
1523
1525
|
sourceFile: resolvePostcssSourceFile(cssHandlerOptions),
|
|
1524
1526
|
...resolveCssHandlerSourceOptions(cssHandlerOptions),
|
|
@@ -2717,7 +2719,7 @@ function collectStrictEscapedRuntimeCandidates(source, escapeMap, escapeFragment
|
|
|
2717
2719
|
}
|
|
2718
2720
|
//#endregion
|
|
2719
2721
|
//#region src/bundlers/vite/incremental-runtime-class-set.ts
|
|
2720
|
-
const debug =
|
|
2722
|
+
const debug = require_wxml.createDebug("[vite:runtime-set] ");
|
|
2721
2723
|
function createExtractOptions(context, source, bareArbitraryValues) {
|
|
2722
2724
|
return {
|
|
2723
2725
|
cwd: context.projectRoot,
|
|
@@ -2901,7 +2903,7 @@ async function extractScriptStringCandidates(source, extension, options) {
|
|
|
2901
2903
|
if (!SCRIPT_SOURCE_CANDIDATE_EXTENSIONS.has(extension)) return [];
|
|
2902
2904
|
const values = /* @__PURE__ */ new Set();
|
|
2903
2905
|
try {
|
|
2904
|
-
|
|
2906
|
+
require_wxml.traverse(require_wxml.babelParse(source, {
|
|
2905
2907
|
cache: true,
|
|
2906
2908
|
cacheKey: `source-candidates:${extension}`,
|
|
2907
2909
|
plugins: ["jsx", "typescript"],
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import {
|
|
3
|
-
import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective } from "./tailwindcss-
|
|
1
|
+
import { $ as normalizeTailwindSourceDirectives, A as filterApplyOnlyGeneratedCss, At as resolveTailwindV4CssSourceBase, B as stripUnmatchedTailwindSourceMediaCloseFragments, F as removeTailwindV4GeneratedUserCssArtifacts, G as removeUnsupportedMiniProgramAtRules, H as finalizeMiniProgramCss, I as removeTailwindV4GeneratorAtRules, J as hasTailwindApplyDirective, L as shouldFilterApplyOnlyGeneratedCss, M as isCommentOnlyCss, N as normalizeEmptyTailwindCustomVariants, Nt as filterUnsupportedMiniProgramTailwindV4Candidates, Pt as loadTailwindV4DesignSystem, R as splitUserCssLayerBlocks, Tt as isFileMatchedByTailwindSourceEntries, V as transformGeneratorUserCss, X as hasTailwindRootDirectives, Z as hasTailwindSourceDirectives, a as resolveGeneratorRuntimeBranch, at as VITE_MARKER_RE, ct as hasTailwindGeneratedCssMarkers, d as resolveTailwindV4SourceFromRuntime, dt as splitTailwindV4GeneratedCssBySourceOrder, ft as stripGeneratorPlaceholderMarkers, gt as prependConfigDirective, ht as normalizeConfigDirective, i as normalizeWeappTailwindcssGeneratorOptions, it as GENERATOR_PLACEHOLDER_MARKER_RE, j as hasUserCssLayerBlocks, jt as toPosixPath$1, k as extractGeneratedCssForUserLayerSelectors, kt as resolveSourceScanPath, lt as splitGeneratorPlaceholderCssBySourceOrder, mt as stripTailwindBanners, nt as removeTailwindSourceDirectives, ot as createCssAppend, p as resolveTailwindV4SourceOptionsFromRuntime, pt as stripTailwindBanner, rt as resolveCssEntrySource, s as shouldUseMiniProgramCssBranch, st as hasTailwindGeneratedCss, t as createWeappTailwindcssGenerator, tt as parseImportRequest, u as resolveTailwindV4Source$1, ut as splitTailwindGeneratedCssByBanner, xt as FULL_SOURCE_SCAN_EXTENSION_RE, z as stripTailwindSourceMediaFragments } from "./generator-BvPcmqxU.mjs";
|
|
2
|
+
import { t as omitUndefined } from "./object-BJSWl-E5.mjs";
|
|
3
|
+
import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective } from "./tailwindcss-DZT_pWrd.mjs";
|
|
4
|
+
import { _ as babelParse, b as md5Hash, g as replaceWxml, v as traverse, y as createDebug } from "./wxml-DdGdeqaH.mjs";
|
|
5
|
+
import { r as resolveStyleOptionsFromContext } from "./context-xSJE588m.mjs";
|
|
4
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
7
|
import path from "node:path";
|
|
6
8
|
import process from "node:process";
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_framework = require("./framework.js");
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_gulp = require("./gulp-
|
|
3
|
+
const require_generator = require("./generator-CS10c9g1.js");
|
|
4
|
+
const require_gulp = require("./gulp-DNZZvUMq.js");
|
|
5
5
|
const require_postcss = require("./postcss.js");
|
|
6
|
-
const require_vite = require("./vite-
|
|
7
|
-
const require_webpack = require("./webpack-
|
|
6
|
+
const require_vite = require("./vite-VGfkFQkC.js");
|
|
7
|
+
const require_webpack = require("./webpack-CzXjfvYS.js");
|
|
8
8
|
require("./webpack.js");
|
|
9
9
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
10
10
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/index.mjs
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.mjs";
|
|
2
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
3
|
-
import { t as createPlugins } from "./gulp-
|
|
2
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-BvPcmqxU.mjs";
|
|
3
|
+
import { t as createPlugins } from "./gulp-BEOzXrbp.mjs";
|
|
4
4
|
import weappTailwindcssPostcssPlugin from "./postcss.mjs";
|
|
5
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
6
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
5
|
+
import { t as WeappTailwindcss } from "./vite-DF1gE6a5.mjs";
|
|
6
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-CTYm19zA.mjs";
|
|
7
7
|
import "./webpack.mjs";
|
|
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 };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/object.ts
|
|
2
|
+
function definedEntries(value) {
|
|
3
|
+
return Object.entries(value).filter(([, item]) => item !== void 0);
|
|
4
|
+
}
|
|
5
|
+
function omitUndefined(value) {
|
|
6
|
+
return Object.fromEntries(definedEntries(value));
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { omitUndefined as t };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/utils/object.ts
|
|
2
|
+
function definedEntries(value) {
|
|
3
|
+
return Object.entries(value).filter(([, item]) => item !== void 0);
|
|
4
|
+
}
|
|
5
|
+
function omitUndefined(value) {
|
|
6
|
+
return Object.fromEntries(definedEntries(value));
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
Object.defineProperty(exports, "omitUndefined", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return omitUndefined;
|
|
13
|
+
}
|
|
14
|
+
});
|
package/dist/postcss.js
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-CS10c9g1.js");
|
|
6
6
|
const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss").createWeappTailwindcssPostcssPlugin)({
|
|
7
7
|
createGenerator: (source) => {
|
|
8
8
|
return require_generator.createWeappTailwindcssGenerator(source);
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions,
|
|
1
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-BvPcmqxU.mjs";
|
|
2
2
|
import { createWeappTailwindcssPostcssPlugin } from "@weapp-tailwindcss/postcss";
|
|
3
3
|
const weappTailwindcssPostcssPlugin = createWeappTailwindcssPostcssPlugin({
|
|
4
4
|
createGenerator: (source) => {
|
package/dist/presets.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
3
3
|
const require_framework = require("./framework.js");
|
|
4
|
-
const
|
|
5
|
-
require("./
|
|
6
|
-
|
|
4
|
+
const require_object = require("./object-COs_Mw6p.js");
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
|
|
6
|
+
require("./utils-CuKLf1Zv.js");
|
|
7
7
|
require("./logger-TlKT3xmR.js");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
@@ -37,7 +37,7 @@ function createBasePreset(options = {}) {
|
|
|
37
37
|
const { base, cssEntries, resolve, rawOptions, ...userOptions } = options;
|
|
38
38
|
const baseDir = require_tailwindcss.resolveTailwindcssBasedir(base);
|
|
39
39
|
const normalizedCssEntries = normalizeCssEntries(cssEntries);
|
|
40
|
-
const tailwindConfig = { v4:
|
|
40
|
+
const tailwindConfig = { v4: require_object.omitUndefined({
|
|
41
41
|
base: baseDir,
|
|
42
42
|
cssEntries: normalizedCssEntries
|
|
43
43
|
}) };
|
|
@@ -130,7 +130,7 @@ function uniAppX(options) {
|
|
|
130
130
|
...installedTailwindDefaults ?? {},
|
|
131
131
|
cwd: options.base,
|
|
132
132
|
resolve: resolvedResolve,
|
|
133
|
-
v4:
|
|
133
|
+
v4: require_object.omitUndefined({
|
|
134
134
|
base: options.base,
|
|
135
135
|
cssEntries
|
|
136
136
|
})
|
package/dist/presets.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveTaroPlatform, resolveUniPlatformsFromEnv } from "./framework.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
2
|
+
import { t as omitUndefined } from "./object-BJSWl-E5.mjs";
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-DZT_pWrd.mjs";
|
|
4
|
+
import { n as defuOverrideArray } from "./utils-MVwpU07P.mjs";
|
|
5
5
|
import { t as logger } from "./logger-BNzxZbZj.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import process from "node:process";
|
package/dist/rspack.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
3
|
-
const require_webpack = require("./webpack-
|
|
3
|
+
const require_webpack = require("./webpack-CzXjfvYS.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
6
6
|
//#region src/bundlers/rspack/index.ts
|
package/dist/rspack.mjs
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-CTYm19zA.mjs";
|
|
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,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
|
|
2
2
|
const require_framework = require("./framework.js");
|
|
3
3
|
require("./auto-DtU6f3X6.js");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const require_hmr_timing = require("./hmr-timing-
|
|
4
|
+
const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
|
|
5
|
+
const require_wxml = require("./wxml-Ce10eREX.js");
|
|
6
|
+
const require_hmr_timing = require("./hmr-timing-DW1g3zjl.js");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path);
|
|
9
9
|
let node_process = require("node:process");
|
|
@@ -407,7 +407,7 @@ const JS_INCOMPLETE_TRAILING_OPERATOR_RE = /(?:=>|[=+\-*%&|^!~?:,.({[\]])\s*$/;
|
|
|
407
407
|
function createHtmlRuntimeAffectingSignature(source) {
|
|
408
408
|
try {
|
|
409
409
|
const parts = [];
|
|
410
|
-
const parser = new
|
|
410
|
+
const parser = new require_wxml.Parser({
|
|
411
411
|
onattribute(name, value) {
|
|
412
412
|
parts.push(`a:${name}=${value}`);
|
|
413
413
|
},
|
|
@@ -429,14 +429,14 @@ function createHtmlRuntimeAffectingSignature(source) {
|
|
|
429
429
|
function createJsRuntimeAffectingSignature(source) {
|
|
430
430
|
if (!JS_RUNTIME_AFFECTING_TEXT_HINT_RE.test(source) && !JS_INCOMPLETE_TRAILING_OPERATOR_RE.test(source)) return "";
|
|
431
431
|
try {
|
|
432
|
-
const ast =
|
|
432
|
+
const ast = require_wxml.babelParse(source, {
|
|
433
433
|
cache: false,
|
|
434
434
|
cacheKey: "vite-runtime-affecting:unambiguous",
|
|
435
435
|
plugins: ["jsx", "typescript"],
|
|
436
436
|
sourceType: "unambiguous"
|
|
437
437
|
});
|
|
438
438
|
const parts = [];
|
|
439
|
-
|
|
439
|
+
require_wxml.traverse(ast, {
|
|
440
440
|
noScope: true,
|
|
441
441
|
StringLiteral(path) {
|
|
442
442
|
parts.push(`s:${path.node.value}`);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { detectAppType } from "./framework.mjs";
|
|
2
2
|
import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-CrJJc5rK.mjs";
|
|
3
|
-
import { g as
|
|
4
|
-
import {
|
|
5
|
-
import { u as generateCssByGenerator } from "./hmr-timing-
|
|
3
|
+
import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-DZT_pWrd.mjs";
|
|
4
|
+
import { _ as babelParse, n as Parser, v as traverse } from "./wxml-DdGdeqaH.mjs";
|
|
5
|
+
import { u as generateCssByGenerator } from "./hmr-timing-hRhRAjYV.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process from "node:process";
|