weapp-tailwindcss 5.0.0-next.31 → 5.0.0-next.33
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/auto-DEHRmEAx.mjs +200 -0
- package/dist/auto-dPpsm6FB.js +238 -0
- package/dist/{bundle-state-Ct_8GcSR.js → bundle-state-Co_ksa-C.js} +3 -3
- package/dist/{bundle-state-Bi-cQua6.mjs → bundle-state-DUIidcox.mjs} +2 -2
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle.d.ts +1 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +1 -0
- package/dist/cli.js +3 -6
- package/dist/cli.mjs +4 -7
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +2 -1
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/{generator-CrU-Ghc1.js → generator-BEXaaUzP.js} +1 -1
- package/dist/{generator-Qw-tZ0Z2.mjs → generator-CpsHA4Wd.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +7 -7
- package/dist/gulp.mjs +6 -6
- package/dist/{incremental-runtime-class-set-FAOHZmzh.js → incremental-runtime-class-set-BE8RVbuz.js} +71 -9
- package/dist/{incremental-runtime-class-set-Boqi1QlB.mjs → incremental-runtime-class-set-BXYUYjCd.mjs} +70 -8
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-C6zOQqlL.mjs → postcss-BvkdIZr8.mjs} +3 -3
- package/dist/{postcss-DAWf9D3C.js → postcss-DN7IQzYb.js} +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-D7gJSmJz.js → precheck-D_KT1pis.js} +8 -10
- package/dist/{precheck-D7K12zeX.mjs → precheck-mM9IVd1f.mjs} +8 -10
- package/dist/presets.js +4 -4
- package/dist/presets.mjs +3 -3
- package/dist/{source-candidates-DNM8iwXW.js → source-candidates-7Q-kTOSb.js} +1 -1
- package/dist/{source-candidates-CX2ozpKM.mjs → source-candidates-_x8bq0Mz.mjs} +1 -1
- package/dist/{tailwindcss-B-e2RiXr.js → tailwindcss-Cl7hUlYV.js} +3 -3
- package/dist/{tailwindcss-C7dJHZ0G.mjs → tailwindcss-udhXxMX9.mjs} +2 -2
- package/dist/{v3-engine-DcvCCHfs.mjs → v3-engine-C_KeUQG3.mjs} +6 -6
- package/dist/{v3-engine-CHItlVq5.js → v3-engine-DwY4Fixu.js} +7 -7
- package/dist/{vite-BgTPSkQS.js → vite-BVbIr2vs.js} +105 -44
- package/dist/{vite-fFRpSvyz.mjs → vite-C8vSTuBQ.mjs} +104 -43
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +127 -7
- package/dist/{webpack-BXSWVdXh.js → webpack-DlHo84RT.js} +8 -8
- package/dist/{webpack-Dx2AZpGU.mjs → webpack-dva53gYi.mjs} +7 -7
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +5 -5
- package/dist/auto-TH1jG2UW.js +0 -115
- package/dist/auto-XyKTOP7B.mjs +0 -78
package/dist/gulp.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
5
|
-
const require_precheck = require("./precheck-
|
|
6
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
7
|
-
const require_source_candidates = require("./source-candidates-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-BE8RVbuz.js");
|
|
5
|
+
const require_precheck = require("./precheck-D_KT1pis.js");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-Cl7hUlYV.js");
|
|
7
|
+
const require_source_candidates = require("./source-candidates-7Q-kTOSb.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
10
|
-
let node_path = require("node:path");
|
|
11
|
-
node_path = require_chunk.__toESM(node_path);
|
|
12
10
|
let node_process = require("node:process");
|
|
13
11
|
node_process = require_chunk.__toESM(node_process);
|
|
12
|
+
let node_path = require("node:path");
|
|
13
|
+
node_path = require_chunk.__toESM(node_path);
|
|
14
14
|
let node_buffer = require("node:buffer");
|
|
15
15
|
let node_stream = require("node:stream");
|
|
16
16
|
node_stream = require_chunk.__toESM(node_stream);
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-
|
|
2
|
-
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-
|
|
3
|
-
import { c as hasTailwindRootDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager, u as normalizeTailwindSourceForGenerator } from "./incremental-runtime-class-set-
|
|
4
|
-
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
5
|
-
import { t as createSourceCandidateCollector } from "./source-candidates-
|
|
1
|
+
import { b as ensureRuntimeClassSet, n as getCompilerContext, t as shouldSkipJsTransform, y as createTailwindRuntimeReadyPromise } from "./precheck-mM9IVd1f.mjs";
|
|
2
|
+
import { B as createDebug, _ as resolveViteSourceScanEntries, l as getRuntimeClassSetSignature } from "./v3-engine-C_KeUQG3.mjs";
|
|
3
|
+
import { c as hasTailwindRootDirectives, i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager, u as normalizeTailwindSourceForGenerator } from "./incremental-runtime-class-set-BXYUYjCd.mjs";
|
|
4
|
+
import { c as upsertTailwindV4CssSource, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-udhXxMX9.mjs";
|
|
5
|
+
import { t as createSourceCandidateCollector } from "./source-candidates-_x8bq0Mz.mjs";
|
|
6
6
|
import fs from "node:fs";
|
|
7
|
-
import path from "node:path";
|
|
8
7
|
import process from "node:process";
|
|
8
|
+
import path from "node:path";
|
|
9
9
|
import { Buffer } from "node:buffer";
|
|
10
10
|
import stream from "node:stream";
|
|
11
11
|
//#region src/bundlers/gulp/index.ts
|
package/dist/{incremental-runtime-class-set-FAOHZmzh.js → incremental-runtime-class-set-BE8RVbuz.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
3
|
+
const require_generator = require("./generator-BEXaaUzP.js");
|
|
4
|
+
const require_precheck = require("./precheck-D_KT1pis.js");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
6
6
|
let postcss = require("postcss");
|
|
7
7
|
postcss = require_chunk.__toESM(postcss);
|
|
8
|
-
let node_path = require("node:path");
|
|
9
|
-
node_path = require_chunk.__toESM(node_path);
|
|
10
8
|
let node_process = require("node:process");
|
|
11
9
|
node_process = require_chunk.__toESM(node_process);
|
|
10
|
+
let node_path = require("node:path");
|
|
11
|
+
node_path = require_chunk.__toESM(node_path);
|
|
12
12
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
13
13
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
14
14
|
//#region src/bundlers/shared/generator-css/markers.ts
|
|
@@ -2095,6 +2095,63 @@ function createNonSourceBaseClassSet(baseClassSet, candidateCountByClass) {
|
|
|
2095
2095
|
for (const candidate of candidateCountByClass.keys()) nextBaseClassSet.delete(candidate);
|
|
2096
2096
|
return nextBaseClassSet;
|
|
2097
2097
|
}
|
|
2098
|
+
function isHighConfidenceV3Candidate(candidate) {
|
|
2099
|
+
return candidate.includes("[") || candidate.includes(":") || candidate.includes("/");
|
|
2100
|
+
}
|
|
2101
|
+
function isRawCandidateInClassContext(source, start, extension) {
|
|
2102
|
+
if (typeof start !== "number" || start <= 0) return false;
|
|
2103
|
+
const before = source.slice(Math.max(0, start - 200), start);
|
|
2104
|
+
if (extension === "html") return /\bclass\s*=\s*["'][^"']*$/i.test(before);
|
|
2105
|
+
return /\bclass(?:Name)?\s*[:=]\s*["'][^"']*$/i.test(before) || /\.classList\.(?:add|remove|toggle|contains)\([^)]*$/i.test(before);
|
|
2106
|
+
}
|
|
2107
|
+
function resolveQuotedLiteralRange(source, start) {
|
|
2108
|
+
if (typeof start !== "number" || start <= 0) return;
|
|
2109
|
+
let quote;
|
|
2110
|
+
let literalStart = -1;
|
|
2111
|
+
for (let index = start - 1; index >= 0; index--) {
|
|
2112
|
+
const char = source[index];
|
|
2113
|
+
if (char !== "\"" && char !== "'" && char !== "`") continue;
|
|
2114
|
+
quote = char;
|
|
2115
|
+
literalStart = index;
|
|
2116
|
+
break;
|
|
2117
|
+
}
|
|
2118
|
+
if (!quote) return;
|
|
2119
|
+
let escaped = false;
|
|
2120
|
+
for (let index = literalStart + 1; index < source.length; index++) {
|
|
2121
|
+
const char = source[index];
|
|
2122
|
+
if (escaped) {
|
|
2123
|
+
escaped = false;
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
if (char === "\\") {
|
|
2127
|
+
escaped = true;
|
|
2128
|
+
continue;
|
|
2129
|
+
}
|
|
2130
|
+
if (char === quote) {
|
|
2131
|
+
if (start < index) return {
|
|
2132
|
+
start: literalStart,
|
|
2133
|
+
end: index
|
|
2134
|
+
};
|
|
2135
|
+
return;
|
|
2136
|
+
}
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
function createHighConfidenceLiteralRanges(source, matches) {
|
|
2140
|
+
const ranges = [];
|
|
2141
|
+
for (const match of matches) {
|
|
2142
|
+
const candidate = match?.rawCandidate;
|
|
2143
|
+
if (typeof candidate !== "string" || !isHighConfidenceV3Candidate(candidate)) continue;
|
|
2144
|
+
const range = resolveQuotedLiteralRange(source, match.start);
|
|
2145
|
+
if (range) ranges.push(range);
|
|
2146
|
+
}
|
|
2147
|
+
return ranges;
|
|
2148
|
+
}
|
|
2149
|
+
function isRawCandidateInRanges(start, ranges) {
|
|
2150
|
+
return typeof start === "number" && ranges.some((range) => start > range.start && start < range.end);
|
|
2151
|
+
}
|
|
2152
|
+
function isRawCandidateAllowedForV3(source, candidate, start, extension, knownSourceCandidates, highConfidenceLiteralRanges = []) {
|
|
2153
|
+
return isHighConfidenceV3Candidate(candidate) || knownSourceCandidates?.has(candidate) === true || isRawCandidateInClassContext(source, start, extension) || isRawCandidateInRanges(start, highConfidenceLiteralRanges);
|
|
2154
|
+
}
|
|
2098
2155
|
function createBundleRuntimeClassSetManager(options = {}) {
|
|
2099
2156
|
const customExtractCandidates = options.extractCandidates;
|
|
2100
2157
|
const extractCandidates = customExtractCandidates ?? tailwindcss_patch.extractValidCandidates;
|
|
@@ -2153,12 +2210,17 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2153
2210
|
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source)));
|
|
2154
2211
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2155
2212
|
}
|
|
2156
|
-
async function extractEntryRawCandidates(entry) {
|
|
2157
|
-
const
|
|
2213
|
+
async function extractEntryRawCandidates(entry, patcher, knownSourceCandidates) {
|
|
2214
|
+
const extension = resolveEntryExtension(entry);
|
|
2215
|
+
const matches = await extractRawCandidates(entry.source, extension);
|
|
2216
|
+
const highConfidenceLiteralRanges = patcher.majorVersion === 3 && !customExtractCandidates ? createHighConfidenceLiteralRanges(entry.source, matches) : [];
|
|
2158
2217
|
const candidates = /* @__PURE__ */ new Set();
|
|
2159
2218
|
for (const match of matches) {
|
|
2160
2219
|
const candidate = match?.rawCandidate;
|
|
2161
|
-
if (typeof candidate === "string" && candidate.length > 0)
|
|
2220
|
+
if (typeof candidate === "string" && candidate.length > 0) {
|
|
2221
|
+
if (patcher.majorVersion === 3 && !customExtractCandidates && !isRawCandidateAllowedForV3(entry.source, candidate, match.start, extension, knownSourceCandidates, highConfidenceLiteralRanges)) continue;
|
|
2222
|
+
candidates.add(candidate);
|
|
2223
|
+
}
|
|
2162
2224
|
}
|
|
2163
2225
|
return candidates;
|
|
2164
2226
|
}
|
|
@@ -2191,7 +2253,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2191
2253
|
await Promise.all(changedRuntimeFiles.map(async (file) => {
|
|
2192
2254
|
const entry = runtimeEntriesByFile.get(file);
|
|
2193
2255
|
if (!entry) return;
|
|
2194
|
-
const candidates = await extractEntryRawCandidates(entry);
|
|
2256
|
+
const candidates = await extractEntryRawCandidates(entry, patcher, nextBaseClassSet);
|
|
2195
2257
|
rawCandidatesByFile.set(file, candidates);
|
|
2196
2258
|
for (const candidate of candidates) if (!candidateValidityCache.has(candidate)) unknownCandidates.add(candidate);
|
|
2197
2259
|
}));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as replaceWxml, r as resolveStyleOptionsFromContext } from "./precheck-
|
|
2
|
-
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, q as omitUndefined, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-
|
|
3
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { m as replaceWxml, r as resolveStyleOptionsFromContext } from "./precheck-mM9IVd1f.mjs";
|
|
2
|
+
import { B as createDebug, D as loadTailwindV4DesignSystem, E as filterUnsupportedMiniProgramTailwindV4Candidates, R as resolveTailwindV4CssSourceBase, S as resolveTailwindV4SourceOptionsFromPatcher, h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, n as resolveTailwindV3SourceFromPatcher, q as omitUndefined, r as resolveTailwindV3SourceOptionsFromPatcher, t as resolveTailwindV3Source, x as resolveTailwindV4SourceFromPatcher, y as resolveTailwindV4Source$1 } from "./v3-engine-C_KeUQG3.mjs";
|
|
3
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-CpsHA4Wd.mjs";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import postcss from "postcss";
|
|
6
|
-
import path from "node:path";
|
|
7
6
|
import process from "node:process";
|
|
7
|
+
import path from "node:path";
|
|
8
8
|
import { extractRawCandidatesWithPositions, extractSourceCandidates, extractValidCandidates } from "tailwindcss-patch";
|
|
9
9
|
import { finalizeMiniProgramCss, removeUnsupportedMiniProgramAtRules } from "@weapp-tailwindcss/postcss";
|
|
10
10
|
//#region src/bundlers/shared/generator-css/markers.ts
|
|
@@ -2091,6 +2091,63 @@ function createNonSourceBaseClassSet(baseClassSet, candidateCountByClass) {
|
|
|
2091
2091
|
for (const candidate of candidateCountByClass.keys()) nextBaseClassSet.delete(candidate);
|
|
2092
2092
|
return nextBaseClassSet;
|
|
2093
2093
|
}
|
|
2094
|
+
function isHighConfidenceV3Candidate(candidate) {
|
|
2095
|
+
return candidate.includes("[") || candidate.includes(":") || candidate.includes("/");
|
|
2096
|
+
}
|
|
2097
|
+
function isRawCandidateInClassContext(source, start, extension) {
|
|
2098
|
+
if (typeof start !== "number" || start <= 0) return false;
|
|
2099
|
+
const before = source.slice(Math.max(0, start - 200), start);
|
|
2100
|
+
if (extension === "html") return /\bclass\s*=\s*["'][^"']*$/i.test(before);
|
|
2101
|
+
return /\bclass(?:Name)?\s*[:=]\s*["'][^"']*$/i.test(before) || /\.classList\.(?:add|remove|toggle|contains)\([^)]*$/i.test(before);
|
|
2102
|
+
}
|
|
2103
|
+
function resolveQuotedLiteralRange(source, start) {
|
|
2104
|
+
if (typeof start !== "number" || start <= 0) return;
|
|
2105
|
+
let quote;
|
|
2106
|
+
let literalStart = -1;
|
|
2107
|
+
for (let index = start - 1; index >= 0; index--) {
|
|
2108
|
+
const char = source[index];
|
|
2109
|
+
if (char !== "\"" && char !== "'" && char !== "`") continue;
|
|
2110
|
+
quote = char;
|
|
2111
|
+
literalStart = index;
|
|
2112
|
+
break;
|
|
2113
|
+
}
|
|
2114
|
+
if (!quote) return;
|
|
2115
|
+
let escaped = false;
|
|
2116
|
+
for (let index = literalStart + 1; index < source.length; index++) {
|
|
2117
|
+
const char = source[index];
|
|
2118
|
+
if (escaped) {
|
|
2119
|
+
escaped = false;
|
|
2120
|
+
continue;
|
|
2121
|
+
}
|
|
2122
|
+
if (char === "\\") {
|
|
2123
|
+
escaped = true;
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
if (char === quote) {
|
|
2127
|
+
if (start < index) return {
|
|
2128
|
+
start: literalStart,
|
|
2129
|
+
end: index
|
|
2130
|
+
};
|
|
2131
|
+
return;
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
function createHighConfidenceLiteralRanges(source, matches) {
|
|
2136
|
+
const ranges = [];
|
|
2137
|
+
for (const match of matches) {
|
|
2138
|
+
const candidate = match?.rawCandidate;
|
|
2139
|
+
if (typeof candidate !== "string" || !isHighConfidenceV3Candidate(candidate)) continue;
|
|
2140
|
+
const range = resolveQuotedLiteralRange(source, match.start);
|
|
2141
|
+
if (range) ranges.push(range);
|
|
2142
|
+
}
|
|
2143
|
+
return ranges;
|
|
2144
|
+
}
|
|
2145
|
+
function isRawCandidateInRanges(start, ranges) {
|
|
2146
|
+
return typeof start === "number" && ranges.some((range) => start > range.start && start < range.end);
|
|
2147
|
+
}
|
|
2148
|
+
function isRawCandidateAllowedForV3(source, candidate, start, extension, knownSourceCandidates, highConfidenceLiteralRanges = []) {
|
|
2149
|
+
return isHighConfidenceV3Candidate(candidate) || knownSourceCandidates?.has(candidate) === true || isRawCandidateInClassContext(source, start, extension) || isRawCandidateInRanges(start, highConfidenceLiteralRanges);
|
|
2150
|
+
}
|
|
2094
2151
|
function createBundleRuntimeClassSetManager(options = {}) {
|
|
2095
2152
|
const customExtractCandidates = options.extractCandidates;
|
|
2096
2153
|
const extractCandidates = customExtractCandidates ?? extractValidCandidates;
|
|
@@ -2149,12 +2206,17 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2149
2206
|
const validCandidates = new Set(await extractCandidates(createExtractOptions(context, source)));
|
|
2150
2207
|
for (const candidate of unknownCandidates) candidateValidityCache.set(candidate, validCandidates.has(candidate));
|
|
2151
2208
|
}
|
|
2152
|
-
async function extractEntryRawCandidates(entry) {
|
|
2153
|
-
const
|
|
2209
|
+
async function extractEntryRawCandidates(entry, patcher, knownSourceCandidates) {
|
|
2210
|
+
const extension = resolveEntryExtension(entry);
|
|
2211
|
+
const matches = await extractRawCandidates(entry.source, extension);
|
|
2212
|
+
const highConfidenceLiteralRanges = patcher.majorVersion === 3 && !customExtractCandidates ? createHighConfidenceLiteralRanges(entry.source, matches) : [];
|
|
2154
2213
|
const candidates = /* @__PURE__ */ new Set();
|
|
2155
2214
|
for (const match of matches) {
|
|
2156
2215
|
const candidate = match?.rawCandidate;
|
|
2157
|
-
if (typeof candidate === "string" && candidate.length > 0)
|
|
2216
|
+
if (typeof candidate === "string" && candidate.length > 0) {
|
|
2217
|
+
if (patcher.majorVersion === 3 && !customExtractCandidates && !isRawCandidateAllowedForV3(entry.source, candidate, match.start, extension, knownSourceCandidates, highConfidenceLiteralRanges)) continue;
|
|
2218
|
+
candidates.add(candidate);
|
|
2219
|
+
}
|
|
2158
2220
|
}
|
|
2159
2221
|
return candidates;
|
|
2160
2222
|
}
|
|
@@ -2187,7 +2249,7 @@ function createBundleRuntimeClassSetManager(options = {}) {
|
|
|
2187
2249
|
await Promise.all(changedRuntimeFiles.map(async (file) => {
|
|
2188
2250
|
const entry = runtimeEntriesByFile.get(file);
|
|
2189
2251
|
if (!entry) return;
|
|
2190
|
-
const candidates = await extractEntryRawCandidates(entry);
|
|
2252
|
+
const candidates = await extractEntryRawCandidates(entry, patcher, nextBaseClassSet);
|
|
2191
2253
|
rawCandidatesByFile.set(file, candidates);
|
|
2192
2254
|
for (const candidate of candidates) if (!candidateValidityCache.has(candidate)) unknownCandidates.add(candidate);
|
|
2193
2255
|
}));
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_generator = require("./generator-BEXaaUzP.js");
|
|
3
3
|
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
4
|
+
const require_postcss = require("./postcss-DN7IQzYb.js");
|
|
5
|
+
const require_vite = require("./vite-BVbIr2vs.js");
|
|
6
|
+
const require_webpack = require("./webpack-DlHo84RT.js");
|
|
7
7
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-CpsHA4Wd.mjs";
|
|
2
2
|
import { WeappTailwindcss as createPlugins } from "./gulp.mjs";
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-BvkdIZr8.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-C8vSTuBQ.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-dva53gYi.mjs";
|
|
6
6
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
7
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as collectCssInlineSourceCandidates, F as parseConfigParam, H as readInstalledPackageMajorVersion, I as resolveCssSourceEntries, M as expandTailwindSourceEntries, O as DEFAULT_SOURCE_SCAN_EXTENSIONS, P as normalizeLegacyContentEntries, j as createSourceScanPattern, t as resolveTailwindV3Source, y as resolveTailwindV4Source$1 } from "./v3-engine-
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
1
|
+
import { A as collectCssInlineSourceCandidates, F as parseConfigParam, H as readInstalledPackageMajorVersion, I as resolveCssSourceEntries, M as expandTailwindSourceEntries, O as DEFAULT_SOURCE_SCAN_EXTENSIONS, P as normalizeLegacyContentEntries, j as createSourceScanPattern, t as resolveTailwindV3Source, y as resolveTailwindV4Source$1 } from "./v3-engine-C_KeUQG3.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-CpsHA4Wd.mjs";
|
|
3
3
|
import postcss from "postcss";
|
|
4
|
-
import path from "node:path";
|
|
5
4
|
import process from "node:process";
|
|
5
|
+
import path from "node:path";
|
|
6
6
|
import { extractRawCandidatesWithPositions, extractValidCandidates } from "tailwindcss-patch";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { loadConfig } from "tailwindcss-config";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
3
|
+
const require_generator = require("./generator-BEXaaUzP.js");
|
|
4
4
|
let postcss = require("postcss");
|
|
5
5
|
postcss = require_chunk.__toESM(postcss);
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
node_path = require_chunk.__toESM(node_path);
|
|
8
6
|
let node_process = require("node:process");
|
|
9
7
|
node_process = require_chunk.__toESM(node_process);
|
|
8
|
+
let node_path = require("node:path");
|
|
9
|
+
node_path = require_chunk.__toESM(node_path);
|
|
10
10
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
11
11
|
let node_fs_promises = require("node:fs/promises");
|
|
12
12
|
let tailwindcss_config = require("tailwindcss-config");
|
package/dist/postcss.js
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_postcss = require("./postcss-
|
|
5
|
+
const require_postcss = require("./postcss-DN7IQzYb.js");
|
|
6
6
|
exports.default = require_postcss.weappTailwindcssPostcssPlugin;
|
|
7
7
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
1
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-BvkdIZr8.mjs";
|
|
2
2
|
export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
3
3
|
const require_defaults = require("./defaults-zKUH2mDe.js");
|
|
4
4
|
require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
node_path = require_chunk.__toESM(node_path);
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-Cl7hUlYV.js");
|
|
8
6
|
let node_process = require("node:process");
|
|
9
7
|
node_process = require_chunk.__toESM(node_process);
|
|
8
|
+
let node_path = require("node:path");
|
|
9
|
+
node_path = require_chunk.__toESM(node_path);
|
|
10
10
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
11
|
+
let tailwindcss_patch = require("tailwindcss-patch");
|
|
11
12
|
let node_fs_promises = require("node:fs/promises");
|
|
12
13
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
13
14
|
let node_buffer = require("node:buffer");
|
|
@@ -20,7 +21,6 @@ let _babel_parser = require("@babel/parser");
|
|
|
20
21
|
let magic_string = require("magic-string");
|
|
21
22
|
magic_string = require_chunk.__toESM(magic_string);
|
|
22
23
|
let _ast_core_escape = require("@ast-core/escape");
|
|
23
|
-
let _weapp_tailwindcss_shared_extractors = require("@weapp-tailwindcss/shared/extractors");
|
|
24
24
|
let _babel_types = require("@babel/types");
|
|
25
25
|
_babel_types = require_chunk.__toESM(_babel_types);
|
|
26
26
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
@@ -920,8 +920,7 @@ function hasIgnoreComment(node) {
|
|
|
920
920
|
}
|
|
921
921
|
return false;
|
|
922
922
|
}
|
|
923
|
-
function extractLiteralValue(path, { unescapeUnicode
|
|
924
|
-
const allowDoubleQuotes = arbitraryValues?.allowDoubleQuotes;
|
|
923
|
+
function extractLiteralValue(path, { unescapeUnicode }) {
|
|
925
924
|
const { node } = path;
|
|
926
925
|
let offset = 0;
|
|
927
926
|
let original;
|
|
@@ -933,7 +932,6 @@ function extractLiteralValue(path, { unescapeUnicode, arbitraryValues }) {
|
|
|
933
932
|
let literal = original;
|
|
934
933
|
if (unescapeUnicode && original.includes("\\u")) literal = decodeUnicode2(original);
|
|
935
934
|
return {
|
|
936
|
-
allowDoubleQuotes,
|
|
937
935
|
literal,
|
|
938
936
|
offset,
|
|
939
937
|
original
|
|
@@ -987,8 +985,8 @@ function replaceHandleValue(path, options) {
|
|
|
987
985
|
const fallbackEnabled = shouldEnableArbitraryValueFallback(options);
|
|
988
986
|
if (!alwaysEscape && !fallbackEnabled && (!classNameSet || classNameSet.size === 0)) return;
|
|
989
987
|
if (hasIgnoreComment(path.node)) return;
|
|
990
|
-
const { literal, original,
|
|
991
|
-
const candidates = (0,
|
|
988
|
+
const { literal, original, offset } = extractLiteralValue(path, options);
|
|
989
|
+
const candidates = (0, tailwindcss_patch.splitCandidateTokens)(literal);
|
|
992
990
|
if (candidates.length === 0) return;
|
|
993
991
|
const debugEnabled = debug.enabled;
|
|
994
992
|
const classContext = options.wrapExpression || isClassContextLiteralPath(path);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { B as createDebug, C as createTailwindV4Engine, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-
|
|
1
|
+
import { B as createDebug, C as createTailwindV4Engine$1, K as resolveBooleanObjectOption, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, q as omitUndefined, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher } from "./v3-engine-C_KeUQG3.mjs";
|
|
2
2
|
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-8xrgzxFY.mjs";
|
|
3
3
|
import { i as isMap, n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
4
|
-
import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-
|
|
4
|
+
import { a as applyV4CssCalcDefaults, i as resolveUniAppXOptions, o as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-udhXxMX9.mjs";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
|
-
import path from "node:path";
|
|
7
6
|
import process from "node:process";
|
|
7
|
+
import path from "node:path";
|
|
8
8
|
import { logger, pc } from "@weapp-tailwindcss/logger";
|
|
9
|
+
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
9
10
|
import { rm } from "node:fs/promises";
|
|
10
11
|
import { createStyleHandler } from "@weapp-tailwindcss/postcss";
|
|
11
12
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -16,7 +17,6 @@ import _babelTraverse from "@babel/traverse";
|
|
|
16
17
|
import { parse, parseExpression } from "@babel/parser";
|
|
17
18
|
import MagicString from "magic-string";
|
|
18
19
|
import { jsStringEscape } from "@ast-core/escape";
|
|
19
|
-
import { splitCode } from "@weapp-tailwindcss/shared/extractors";
|
|
20
20
|
import * as t from "@babel/types";
|
|
21
21
|
//#region \0rolldown/runtime.js
|
|
22
22
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -207,7 +207,7 @@ function tryGetRuntimeClassSetSync(twPatcher) {
|
|
|
207
207
|
}
|
|
208
208
|
async function collectTailwindV4GeneratorClassSet(twPatcher) {
|
|
209
209
|
try {
|
|
210
|
-
const generated = await createTailwindV4Engine(await resolveTailwindV4SourceFromPatcher(twPatcher)).generate({
|
|
210
|
+
const generated = await createTailwindV4Engine$1(await resolveTailwindV4SourceFromPatcher(twPatcher)).generate({
|
|
211
211
|
scanSources: true,
|
|
212
212
|
target: "tailwind"
|
|
213
213
|
});
|
|
@@ -919,8 +919,7 @@ function hasIgnoreComment(node) {
|
|
|
919
919
|
}
|
|
920
920
|
return false;
|
|
921
921
|
}
|
|
922
|
-
function extractLiteralValue(path, { unescapeUnicode
|
|
923
|
-
const allowDoubleQuotes = arbitraryValues?.allowDoubleQuotes;
|
|
922
|
+
function extractLiteralValue(path, { unescapeUnicode }) {
|
|
924
923
|
const { node } = path;
|
|
925
924
|
let offset = 0;
|
|
926
925
|
let original;
|
|
@@ -932,7 +931,6 @@ function extractLiteralValue(path, { unescapeUnicode, arbitraryValues }) {
|
|
|
932
931
|
let literal = original;
|
|
933
932
|
if (unescapeUnicode && original.includes("\\u")) literal = decodeUnicode2(original);
|
|
934
933
|
return {
|
|
935
|
-
allowDoubleQuotes,
|
|
936
934
|
literal,
|
|
937
935
|
offset,
|
|
938
936
|
original
|
|
@@ -986,8 +984,8 @@ function replaceHandleValue(path, options) {
|
|
|
986
984
|
const fallbackEnabled = shouldEnableArbitraryValueFallback(options);
|
|
987
985
|
if (!alwaysEscape && !fallbackEnabled && (!classNameSet || classNameSet.size === 0)) return;
|
|
988
986
|
if (hasIgnoreComment(path.node)) return;
|
|
989
|
-
const { literal, original,
|
|
990
|
-
const candidates =
|
|
987
|
+
const { literal, original, offset } = extractLiteralValue(path, options);
|
|
988
|
+
const candidates = splitCandidateTokens(literal);
|
|
991
989
|
if (candidates.length === 0) return;
|
|
992
990
|
const debugEnabled = debug.enabled;
|
|
993
991
|
const classContext = options.wrapExpression || isClassContextLiteralPath(path);
|
package/dist/presets.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
4
4
|
const require_utils = require("./utils-D7Ygohep.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-Cl7hUlYV.js");
|
|
6
6
|
require("./logger-TlKT3xmR.js");
|
|
7
|
-
let node_path = require("node:path");
|
|
8
|
-
node_path = require_chunk.__toESM(node_path);
|
|
9
7
|
let node_process = require("node:process");
|
|
10
8
|
node_process = require_chunk.__toESM(node_process);
|
|
9
|
+
let node_path = require("node:path");
|
|
10
|
+
node_path = require_chunk.__toESM(node_path);
|
|
11
11
|
let local_pkg = require("local-pkg");
|
|
12
12
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
13
13
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
package/dist/presets.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { q as omitUndefined } from "./v3-engine-
|
|
1
|
+
import { q as omitUndefined } from "./v3-engine-C_KeUQG3.mjs";
|
|
2
2
|
import { n as defuOverrideArray, o as resolveUniUtsPlatform } from "./utils-DsaS975I.mjs";
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-udhXxMX9.mjs";
|
|
4
4
|
import { t as logger } from "./logger-BNzxZbZj.mjs";
|
|
5
|
-
import path from "node:path";
|
|
6
5
|
import process from "node:process";
|
|
6
|
+
import path from "node:path";
|
|
7
7
|
import { getPackageInfoSync } from "local-pkg";
|
|
8
8
|
//#region src/presets/shared.ts
|
|
9
9
|
function normalizeCssEntries(entries) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_chunk.__toESM(node_path);
|
|
5
5
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as resolveSourceScanPath, N as isFileMatchedByTailwindSourceEntries, k as FULL_SOURCE_SCAN_EXTENSION_RE, z as toPosixPath } from "./v3-engine-
|
|
1
|
+
import { L as resolveSourceScanPath, N as isFileMatchedByTailwindSourceEntries, k as FULL_SOURCE_SCAN_EXTENSION_RE, z as toPosixPath } from "./v3-engine-C_KeUQG3.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { extractSourceCandidates, resolveProjectSourceFiles } from "tailwindcss-patch";
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C5U5_Hdc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-DwY4Fixu.js");
|
|
3
3
|
require("./utils-D7Ygohep.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_module = require("node:module");
|
|
6
|
-
let node_path = require("node:path");
|
|
7
|
-
node_path = require_chunk.__toESM(node_path);
|
|
8
6
|
let node_process = require("node:process");
|
|
9
7
|
node_process = require_chunk.__toESM(node_process);
|
|
8
|
+
let node_path = require("node:path");
|
|
9
|
+
node_path = require_chunk.__toESM(node_path);
|
|
10
10
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
11
11
|
let node_url = require("node:url");
|
|
12
12
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { G as normalizeStringListOption, H as readInstalledPackageMajorVersion, J as findNearestPackageRoot, V as createTailwindcssPatcher, X as findWorkspaceRoot, Y as findWorkspacePackageDir, f as runtimeSignaturePatchersSymbol, q as omitUndefined } from "./v3-engine-
|
|
1
|
+
import { G as normalizeStringListOption, H as readInstalledPackageMajorVersion, J as findNearestPackageRoot, V as createTailwindcssPatcher, X as findWorkspaceRoot, Y as findWorkspacePackageDir, f as runtimeSignaturePatchersSymbol, q as omitUndefined } from "./v3-engine-C_KeUQG3.mjs";
|
|
2
2
|
import { n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
|
-
import path from "node:path";
|
|
6
5
|
import process from "node:process";
|
|
6
|
+
import path from "node:path";
|
|
7
7
|
import { logger } from "@weapp-tailwindcss/logger";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
9
9
|
//#region src/tailwindcss/v4/css-sources.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as transformCssMacroCss, n as hasCssMacroTailwindPlugin, o as withCssMacroStyleOptions, r as hasCssMacroTailwindV4Directive, t as hasCssMacroStyleOptions } from "./auto-
|
|
1
|
+
import { a as transformCssMacroCss, n as hasCssMacroTailwindPlugin, o as withCssMacroStyleOptions, r as hasCssMacroTailwindV4Directive, t as hasCssMacroStyleOptions } from "./auto-DEHRmEAx.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import fs, { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
4
4
|
import postcss from "postcss";
|
|
5
|
-
import path from "node:path";
|
|
6
5
|
import process from "node:process";
|
|
6
|
+
import path from "node:path";
|
|
7
7
|
import { logger } from "@weapp-tailwindcss/logger";
|
|
8
8
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
9
9
|
import { TailwindcssPatcher, createTailwindV4Engine, extractRawCandidates, loadTailwindV4DesignSystem, resolveProjectSourceFiles, resolveTailwindV4Source, resolveTailwindV4SourceFromPatchOptions } from "tailwindcss-patch";
|
|
@@ -747,7 +747,7 @@ function normalizeTailwindV4GeneratedUrlValues(css) {
|
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
async function transformTailwindV4CssToWeapp(css, options) {
|
|
750
|
-
const protectedCss = protectDynamicColorMixAlpha(normalizeTailwindV4GeneratedUrlValues(css), { customPropertyValues: options && "customPropertyValues" in options ? options.customPropertyValues : void 0 });
|
|
750
|
+
const protectedCss = protectDynamicColorMixAlpha(normalizeTailwindV4GeneratedUrlValues(hasCssMacroStyleOptions(options) ? await transformCssMacroCss(css, options) : css), { customPropertyValues: options && "customPropertyValues" in options ? options.customPropertyValues : void 0 });
|
|
751
751
|
const result = await defaultStyleHandler$1(protectedCss.css, {
|
|
752
752
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
753
753
|
cssRemoveHoverPseudoClass: true,
|
|
@@ -760,7 +760,7 @@ async function transformTailwindV4CssToWeapp(css, options) {
|
|
|
760
760
|
}
|
|
761
761
|
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
762
762
|
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
763
|
-
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css) : css;
|
|
763
|
+
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css, options) : css;
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region src/tailwindcss/v4-engine/tailwind-v3-default-colors.ts
|
|
@@ -2824,7 +2824,7 @@ function ensureMiniProgramV3PreflightReset(css, cssPreflight) {
|
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
async function transformTailwindV3CssToWeapp(css, options) {
|
|
2827
|
-
const result = await defaultStyleHandler(css, {
|
|
2827
|
+
const result = await defaultStyleHandler(hasCssMacroStyleOptions(options) ? await transformCssMacroCss(css, options) : css, {
|
|
2828
2828
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
2829
2829
|
cssRemoveHoverPseudoClass: true,
|
|
2830
2830
|
isMainChunk: true,
|
|
@@ -2839,7 +2839,7 @@ async function transformTailwindV3CssToWeapp(css, options) {
|
|
|
2839
2839
|
}
|
|
2840
2840
|
async function transformTailwindV3CssByTarget(css, target, options) {
|
|
2841
2841
|
if (target === "weapp") return transformTailwindV3CssToWeapp(css, options);
|
|
2842
|
-
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css) : css;
|
|
2842
|
+
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css, options) : css;
|
|
2843
2843
|
}
|
|
2844
2844
|
//#endregion
|
|
2845
2845
|
//#region src/tailwindcss/v3-engine/generator.ts
|