tailwindcss-patch 9.3.2 → 9.3.4
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/cli.js +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/commands/cli-runtime.d.mts +1 -1
- package/dist/commands/cli-runtime.d.ts +1 -1
- package/dist/commands/cli-runtime.js +1 -1
- package/dist/commands/cli-runtime.mjs +1 -1
- package/dist/{index.bundle-CcVIAfDb.js → index.bundle-BIcthh-J.js} +25 -6
- package/dist/{index.bundle-DjS24i5r.mjs → index.bundle-BU7uUzRH.mjs} +25 -6
- package/dist/index.d.mts +2 -67
- package/dist/index.d.ts +2 -67
- package/dist/index.js +4 -2
- package/dist/index.mjs +3 -3
- package/dist/{validate-Bqych-z9.d.ts → validate-Bd5gnHL1.d.mts} +84 -7
- package/dist/{validate-Sq_yuh3r.mjs → validate-BoTQvn7s.mjs} +184 -7
- package/dist/{validate-CF0M_7KH.js → validate-DmELQoI2.js} +195 -6
- package/dist/{validate-C8-qsOWo.d.mts → validate-ZwyABmFW.d.ts} +85 -6
- package/package.json +1 -1
- package/src/extraction/candidate-extractor.ts +222 -1
- package/src/index.bundle.ts +5 -0
- package/src/index.ts +4 -0
- package/src/options/normalize.ts +14 -0
- package/src/options/types.ts +4 -0
- package/src/runtime/class-collector.ts +33 -13
- package/src/v4/index.ts +1 -0
- package/src/v4/source.ts +48 -6
- package/src/v4/types.ts +8 -0
|
@@ -16,7 +16,7 @@ import _babelTraverse from "@babel/traverse";
|
|
|
16
16
|
import { parse, parse as parse$1 } from "@babel/parser";
|
|
17
17
|
import { loadConfig } from "tailwindcss-config";
|
|
18
18
|
//#region package.json
|
|
19
|
-
var version = "9.3.
|
|
19
|
+
var version = "9.3.4";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/constants.ts
|
|
22
22
|
const pkgName = "tailwindcss-patch";
|
|
@@ -1323,6 +1323,13 @@ function normalizeExtendLengthUnitsOptions(extend) {
|
|
|
1323
1323
|
function normalizeTailwindV4Options(v4, fallbackBase) {
|
|
1324
1324
|
const configuredBase = v4?.base ? path.resolve(v4.base) : void 0;
|
|
1325
1325
|
const base = configuredBase ?? fallbackBase;
|
|
1326
|
+
const resolveV4Path = (value) => path.isAbsolute(value) ? path.resolve(value) : path.resolve(fallbackBase, value);
|
|
1327
|
+
const cssSources = Array.isArray(v4?.cssSources) ? v4.cssSources.filter((source) => typeof source?.css === "string").map((source) => ({
|
|
1328
|
+
css: source.css,
|
|
1329
|
+
...source.base === void 0 ? {} : { base: resolveV4Path(source.base) },
|
|
1330
|
+
...source.file === void 0 ? {} : { file: resolveV4Path(source.file) },
|
|
1331
|
+
...source.dependencies === void 0 ? {} : { dependencies: source.dependencies.filter(Boolean).map(resolveV4Path) }
|
|
1332
|
+
})) : [];
|
|
1326
1333
|
const cssEntries = Array.isArray(v4?.cssEntries) ? v4.cssEntries.filter((entry) => Boolean(entry)).map((entry) => path.resolve(entry)) : [];
|
|
1327
1334
|
const userSources = v4?.sources;
|
|
1328
1335
|
const hasUserDefinedSources = Boolean(userSources?.length);
|
|
@@ -1335,6 +1342,7 @@ function normalizeTailwindV4Options(v4, fallbackBase) {
|
|
|
1335
1342
|
base,
|
|
1336
1343
|
...configuredBase === void 0 ? {} : { configuredBase },
|
|
1337
1344
|
...v4?.css === void 0 ? {} : { css: v4.css },
|
|
1345
|
+
cssSources,
|
|
1338
1346
|
cssEntries,
|
|
1339
1347
|
sources,
|
|
1340
1348
|
hasUserDefinedSources,
|
|
@@ -2056,6 +2064,132 @@ function getOxideModule() {
|
|
|
2056
2064
|
});
|
|
2057
2065
|
return oxideImportPromise;
|
|
2058
2066
|
}
|
|
2067
|
+
const HTML_ATTRIBUTE_NAME_CANDIDATE_RE = /^(?:class|className|hover-class|hoverClass)$/;
|
|
2068
|
+
const CSS_DIRECTIVE_CANDIDATE_RE = /^@(?:apply|tailwind|source|config|plugin|theme|utility|custom-variant|variant)$/;
|
|
2069
|
+
const CSS_APPLY_IMPORTANT = "!important";
|
|
2070
|
+
const JS_LIKE_SOURCE_EXTENSION_RE = /^(?:[cm]?[jt]sx?)$/;
|
|
2071
|
+
const MIXED_TEMPLATE_SOURCE_EXTENSION_RE = /^(?:vue|uvue|nvue|svelte|mpx)$/;
|
|
2072
|
+
const CSS_LIKE_SOURCE_EXTENSION_RE = /^(?:css|wxss|acss|jxss|ttss|qss|tyss|scss|sass|less|styl|stylus)$/;
|
|
2073
|
+
const SFC_SCRIPT_BLOCK_RE = /<script\b[^>]*>([\s\S]*?)<\/script>/gi;
|
|
2074
|
+
function isWhitespace(value) {
|
|
2075
|
+
return value === " " || value === "\n" || value === "\r" || value === " " || value === "\f";
|
|
2076
|
+
}
|
|
2077
|
+
function isHtmlAttributeNameCandidate(content, candidate) {
|
|
2078
|
+
if (!HTML_ATTRIBUTE_NAME_CANDIDATE_RE.test(candidate.rawCandidate)) return false;
|
|
2079
|
+
let index = candidate.end;
|
|
2080
|
+
while (isWhitespace(content[index])) index++;
|
|
2081
|
+
return content[index] === "=";
|
|
2082
|
+
}
|
|
2083
|
+
function isInsideHtmlTagText(content, candidate) {
|
|
2084
|
+
if (content.lastIndexOf("<", candidate.start) > content.lastIndexOf(">", candidate.start)) return false;
|
|
2085
|
+
const nextOpen = content.indexOf("<", candidate.end);
|
|
2086
|
+
return nextOpen !== -1 && (nextOpen < content.indexOf(">", candidate.end) || content.indexOf(">", candidate.end) === -1);
|
|
2087
|
+
}
|
|
2088
|
+
function isCssDirectiveCandidate(candidate) {
|
|
2089
|
+
return candidate === CSS_APPLY_IMPORTANT || CSS_DIRECTIVE_CANDIDATE_RE.test(candidate);
|
|
2090
|
+
}
|
|
2091
|
+
function isCandidateInCssApplyParams(content, candidate) {
|
|
2092
|
+
const apply = content.lastIndexOf("@apply", candidate.start);
|
|
2093
|
+
if (apply === -1) return false;
|
|
2094
|
+
const boundary = content.slice(apply + 6, candidate.start);
|
|
2095
|
+
return !/[;{}]/.test(boundary);
|
|
2096
|
+
}
|
|
2097
|
+
function isCandidateInsideJsStringStaticContent(content, start) {
|
|
2098
|
+
let quote;
|
|
2099
|
+
let templateExpressionDepth = 0;
|
|
2100
|
+
for (let index = 0; index < start; index++) {
|
|
2101
|
+
const char = content[index];
|
|
2102
|
+
const next = content[index + 1];
|
|
2103
|
+
if (quote && char === "\\") {
|
|
2104
|
+
index++;
|
|
2105
|
+
continue;
|
|
2106
|
+
}
|
|
2107
|
+
if (quote === "`" && templateExpressionDepth > 0) {
|
|
2108
|
+
if (char === "\"" || char === "'") {
|
|
2109
|
+
const nestedQuote = char;
|
|
2110
|
+
index++;
|
|
2111
|
+
while (index < start) {
|
|
2112
|
+
const nestedChar = content[index];
|
|
2113
|
+
if (nestedChar === "\\") {
|
|
2114
|
+
index += 2;
|
|
2115
|
+
continue;
|
|
2116
|
+
}
|
|
2117
|
+
if (nestedChar === nestedQuote) break;
|
|
2118
|
+
index++;
|
|
2119
|
+
}
|
|
2120
|
+
continue;
|
|
2121
|
+
}
|
|
2122
|
+
if (char === "`") {
|
|
2123
|
+
index++;
|
|
2124
|
+
while (index < start) {
|
|
2125
|
+
const nestedChar = content[index];
|
|
2126
|
+
if (nestedChar === "\\") {
|
|
2127
|
+
index += 2;
|
|
2128
|
+
continue;
|
|
2129
|
+
}
|
|
2130
|
+
if (nestedChar === "`") break;
|
|
2131
|
+
index++;
|
|
2132
|
+
}
|
|
2133
|
+
continue;
|
|
2134
|
+
}
|
|
2135
|
+
if (char === "{") {
|
|
2136
|
+
templateExpressionDepth++;
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
2139
|
+
if (char === "}") {
|
|
2140
|
+
templateExpressionDepth--;
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
continue;
|
|
2144
|
+
}
|
|
2145
|
+
if (quote) {
|
|
2146
|
+
if (quote === "`" && char === "$" && next === "{") {
|
|
2147
|
+
templateExpressionDepth = 1;
|
|
2148
|
+
index++;
|
|
2149
|
+
continue;
|
|
2150
|
+
}
|
|
2151
|
+
if (char === quote) quote = void 0;
|
|
2152
|
+
continue;
|
|
2153
|
+
}
|
|
2154
|
+
if (char === "\"" || char === "'" || char === "`") quote = char;
|
|
2155
|
+
}
|
|
2156
|
+
return quote !== void 0 && templateExpressionDepth === 0;
|
|
2157
|
+
}
|
|
2158
|
+
function shouldKeepSourceCandidate(content, extension, candidate) {
|
|
2159
|
+
if (!candidate.rawCandidate || isCssDirectiveCandidate(candidate.rawCandidate)) return false;
|
|
2160
|
+
if (CSS_LIKE_SOURCE_EXTENSION_RE.test(extension) && !isCandidateInCssApplyParams(content, candidate)) return false;
|
|
2161
|
+
if (isHtmlAttributeNameCandidate(content, candidate)) return false;
|
|
2162
|
+
if (isInsideHtmlTagText(content, candidate)) return false;
|
|
2163
|
+
if (JS_LIKE_SOURCE_EXTENSION_RE.test(extension) && !isCandidateInsideJsStringStaticContent(content, candidate.start)) return false;
|
|
2164
|
+
return true;
|
|
2165
|
+
}
|
|
2166
|
+
function createLocalCandidate(candidate) {
|
|
2167
|
+
return {
|
|
2168
|
+
rawCandidate: candidate.rawCandidate,
|
|
2169
|
+
start: candidate.localStart,
|
|
2170
|
+
end: candidate.localStart + candidate.rawCandidate.length
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
async function extractMixedSourceScriptCandidates(content) {
|
|
2174
|
+
const candidates = [];
|
|
2175
|
+
SFC_SCRIPT_BLOCK_RE.lastIndex = 0;
|
|
2176
|
+
let match = SFC_SCRIPT_BLOCK_RE.exec(content);
|
|
2177
|
+
while (match !== null) {
|
|
2178
|
+
const scriptContent = match[1] ?? "";
|
|
2179
|
+
const scriptStart = match.index + match[0].indexOf(scriptContent);
|
|
2180
|
+
const scriptCandidates = await extractRawCandidatesWithPositions(scriptContent, "js");
|
|
2181
|
+
candidates.push(...scriptCandidates.map((candidate) => ({
|
|
2182
|
+
content: scriptContent,
|
|
2183
|
+
extension: "js",
|
|
2184
|
+
localStart: candidate.start,
|
|
2185
|
+
rawCandidate: candidate.rawCandidate,
|
|
2186
|
+
start: candidate.start + scriptStart,
|
|
2187
|
+
end: candidate.end + scriptStart
|
|
2188
|
+
})));
|
|
2189
|
+
match = SFC_SCRIPT_BLOCK_RE.exec(content);
|
|
2190
|
+
}
|
|
2191
|
+
return candidates;
|
|
2192
|
+
}
|
|
2059
2193
|
function createCandidateCacheKey(designSystemKey, options) {
|
|
2060
2194
|
if (options.bareArbitraryValues == null || options.bareArbitraryValues === false) return designSystemKey;
|
|
2061
2195
|
return `${designSystemKey}:bare-arbitrary:${JSON.stringify(options.bareArbitraryValues)}`;
|
|
@@ -2071,6 +2205,32 @@ async function extractRawCandidatesWithPositions(content, extension = "html") {
|
|
|
2071
2205
|
end: position + candidate.length
|
|
2072
2206
|
}));
|
|
2073
2207
|
}
|
|
2208
|
+
async function extractSourceCandidatesWithPositions(content, extension = "html") {
|
|
2209
|
+
const normalizedExtension = extension.replace(/^\./, "");
|
|
2210
|
+
const candidates = (await extractRawCandidatesWithPositions(content, normalizedExtension)).map((candidate) => ({
|
|
2211
|
+
...candidate,
|
|
2212
|
+
content,
|
|
2213
|
+
extension: normalizedExtension,
|
|
2214
|
+
localStart: candidate.start
|
|
2215
|
+
}));
|
|
2216
|
+
if (MIXED_TEMPLATE_SOURCE_EXTENSION_RE.test(normalizedExtension)) candidates.push(...await extractMixedSourceScriptCandidates(content));
|
|
2217
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2218
|
+
return candidates.filter((candidate) => {
|
|
2219
|
+
if (!shouldKeepSourceCandidate(candidate.content, candidate.extension, createLocalCandidate(candidate))) return false;
|
|
2220
|
+
const key = `${candidate.start}:${candidate.end}:${candidate.rawCandidate}`;
|
|
2221
|
+
if (seen.has(key)) return false;
|
|
2222
|
+
seen.add(key);
|
|
2223
|
+
return true;
|
|
2224
|
+
}).map(({ rawCandidate, start, end }) => ({
|
|
2225
|
+
rawCandidate,
|
|
2226
|
+
start,
|
|
2227
|
+
end
|
|
2228
|
+
}));
|
|
2229
|
+
}
|
|
2230
|
+
async function extractSourceCandidates(content, extension = "html") {
|
|
2231
|
+
const candidates = await extractSourceCandidatesWithPositions(content, extension);
|
|
2232
|
+
return [...new Set(candidates.map((candidate) => candidate.rawCandidate))];
|
|
2233
|
+
}
|
|
2074
2234
|
async function extractRawCandidates(sources) {
|
|
2075
2235
|
const { Scanner } = await getOxideModule();
|
|
2076
2236
|
return new Scanner(sources === void 0 ? {} : { sources }).scan();
|
|
@@ -2315,6 +2475,25 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2315
2475
|
negated: source.negated
|
|
2316
2476
|
}));
|
|
2317
2477
|
};
|
|
2478
|
+
const addCandidates = async (extractOptions) => {
|
|
2479
|
+
const candidates = await extractValidCandidates(extractOptions);
|
|
2480
|
+
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2481
|
+
};
|
|
2482
|
+
if (v4Options.cssSources.length > 0) for (const source of v4Options.cssSources) {
|
|
2483
|
+
const sourceFile = toAbsolute(source.file);
|
|
2484
|
+
const sourceBase = toAbsolute(source.base) ?? (sourceFile ? path.dirname(sourceFile) : resolvedDefaultBase);
|
|
2485
|
+
const designSystemBases = resolvedConfiguredBase && resolvedConfiguredBase !== sourceBase ? [sourceBase, resolvedConfiguredBase] : [sourceBase];
|
|
2486
|
+
const sources = resolveSources(sourceBase);
|
|
2487
|
+
const firstBase = designSystemBases[0] ?? sourceBase;
|
|
2488
|
+
await addCandidates({
|
|
2489
|
+
cwd: options.projectRoot,
|
|
2490
|
+
base: firstBase,
|
|
2491
|
+
baseFallbacks: designSystemBases.slice(1),
|
|
2492
|
+
css: source.css,
|
|
2493
|
+
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2494
|
+
...sources === void 0 ? {} : { sources }
|
|
2495
|
+
});
|
|
2496
|
+
}
|
|
2318
2497
|
if (v4Options.cssEntries.length > 0) for (const entry of v4Options.cssEntries) {
|
|
2319
2498
|
const filePath = path.isAbsolute(entry) ? entry : path.resolve(options.projectRoot, entry);
|
|
2320
2499
|
if (!await fs.pathExists(filePath)) continue;
|
|
@@ -2323,7 +2502,7 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2323
2502
|
const designSystemBases = resolvedConfiguredBase && resolvedConfiguredBase !== entryDir ? [entryDir, resolvedConfiguredBase] : [entryDir];
|
|
2324
2503
|
const sources = resolveSources(resolvedConfiguredBase ?? entryDir);
|
|
2325
2504
|
const firstBase = designSystemBases[0] ?? entryDir;
|
|
2326
|
-
|
|
2505
|
+
await addCandidates({
|
|
2327
2506
|
cwd: options.projectRoot,
|
|
2328
2507
|
base: firstBase,
|
|
2329
2508
|
baseFallbacks: designSystemBases.slice(1),
|
|
@@ -2331,19 +2510,17 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2331
2510
|
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2332
2511
|
...sources === void 0 ? {} : { sources }
|
|
2333
2512
|
});
|
|
2334
|
-
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2335
2513
|
}
|
|
2336
|
-
else {
|
|
2514
|
+
else if (v4Options.cssSources.length === 0) {
|
|
2337
2515
|
const baseForCss = resolvedConfiguredBase ?? resolvedDefaultBase;
|
|
2338
2516
|
const sources = resolveSources(baseForCss);
|
|
2339
|
-
|
|
2517
|
+
await addCandidates({
|
|
2340
2518
|
cwd: options.projectRoot,
|
|
2341
2519
|
base: baseForCss,
|
|
2342
2520
|
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2343
2521
|
...v4Options.css === void 0 ? {} : { css: v4Options.css },
|
|
2344
2522
|
...sources === void 0 ? {} : { sources }
|
|
2345
2523
|
});
|
|
2346
|
-
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2347
2524
|
}
|
|
2348
2525
|
return set;
|
|
2349
2526
|
}
|
|
@@ -3909,4 +4086,4 @@ var ValidateCommandError = class extends Error {
|
|
|
3909
4086
|
}
|
|
3910
4087
|
};
|
|
3911
4088
|
//#endregion
|
|
3912
|
-
export {
|
|
4089
|
+
export { loadWorkspaceConfigModule as A, compileTailwindV4Source as C, replaceBareArbitraryValueSelectors as D, extractTailwindV4InlineSourceCandidates as E, CacheStore as M, logger as N, resolveValidTailwindV4Candidates as O, groupTokensByFile as S, canonicalizeBareArbitraryValueCandidates as T, extractRawCandidates as _, tailwindcssPatchCommands as a, extractSourceCandidatesWithPositions as b, MIGRATION_REPORT_KIND as c, getPatchStatusReport as d, runTailwindBuild as f, extractProjectCandidatesWithPositions as g, collectClassesFromTailwindV4 as h, classifyValidateError as i, normalizeOptions as j, loadPatchOptionsForWorkspace as k, MIGRATION_REPORT_SCHEMA_VERSION as l, collectClassesFromContexts as m, VALIDATE_FAILURE_REASONS as n, migrateConfigFiles as o, loadRuntimeContexts as p, ValidateCommandError as r, restoreConfigFiles as s, VALIDATE_EXIT_CODES as t, TailwindcssPatcher as u, extractRawCandidatesWithPositions as v, loadTailwindV4DesignSystem as w, extractValidCandidates as x, extractSourceCandidates as y };
|
|
@@ -23,7 +23,7 @@ _babel_traverse = require_chunk.__toESM(_babel_traverse);
|
|
|
23
23
|
let _babel_parser = require("@babel/parser");
|
|
24
24
|
let tailwindcss_config = require("tailwindcss-config");
|
|
25
25
|
//#region package.json
|
|
26
|
-
var version = "9.3.
|
|
26
|
+
var version = "9.3.4";
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/constants.ts
|
|
29
29
|
const pkgName = "tailwindcss-patch";
|
|
@@ -1330,6 +1330,13 @@ function normalizeExtendLengthUnitsOptions(extend) {
|
|
|
1330
1330
|
function normalizeTailwindV4Options(v4, fallbackBase) {
|
|
1331
1331
|
const configuredBase = v4?.base ? pathe.default.resolve(v4.base) : void 0;
|
|
1332
1332
|
const base = configuredBase ?? fallbackBase;
|
|
1333
|
+
const resolveV4Path = (value) => pathe.default.isAbsolute(value) ? pathe.default.resolve(value) : pathe.default.resolve(fallbackBase, value);
|
|
1334
|
+
const cssSources = Array.isArray(v4?.cssSources) ? v4.cssSources.filter((source) => typeof source?.css === "string").map((source) => ({
|
|
1335
|
+
css: source.css,
|
|
1336
|
+
...source.base === void 0 ? {} : { base: resolveV4Path(source.base) },
|
|
1337
|
+
...source.file === void 0 ? {} : { file: resolveV4Path(source.file) },
|
|
1338
|
+
...source.dependencies === void 0 ? {} : { dependencies: source.dependencies.filter(Boolean).map(resolveV4Path) }
|
|
1339
|
+
})) : [];
|
|
1333
1340
|
const cssEntries = Array.isArray(v4?.cssEntries) ? v4.cssEntries.filter((entry) => Boolean(entry)).map((entry) => pathe.default.resolve(entry)) : [];
|
|
1334
1341
|
const userSources = v4?.sources;
|
|
1335
1342
|
const hasUserDefinedSources = Boolean(userSources?.length);
|
|
@@ -1342,6 +1349,7 @@ function normalizeTailwindV4Options(v4, fallbackBase) {
|
|
|
1342
1349
|
base,
|
|
1343
1350
|
...configuredBase === void 0 ? {} : { configuredBase },
|
|
1344
1351
|
...v4?.css === void 0 ? {} : { css: v4.css },
|
|
1352
|
+
cssSources,
|
|
1345
1353
|
cssEntries,
|
|
1346
1354
|
sources,
|
|
1347
1355
|
hasUserDefinedSources,
|
|
@@ -2058,6 +2066,132 @@ function getOxideModule() {
|
|
|
2058
2066
|
});
|
|
2059
2067
|
return oxideImportPromise;
|
|
2060
2068
|
}
|
|
2069
|
+
const HTML_ATTRIBUTE_NAME_CANDIDATE_RE = /^(?:class|className|hover-class|hoverClass)$/;
|
|
2070
|
+
const CSS_DIRECTIVE_CANDIDATE_RE = /^@(?:apply|tailwind|source|config|plugin|theme|utility|custom-variant|variant)$/;
|
|
2071
|
+
const CSS_APPLY_IMPORTANT = "!important";
|
|
2072
|
+
const JS_LIKE_SOURCE_EXTENSION_RE = /^(?:[cm]?[jt]sx?)$/;
|
|
2073
|
+
const MIXED_TEMPLATE_SOURCE_EXTENSION_RE = /^(?:vue|uvue|nvue|svelte|mpx)$/;
|
|
2074
|
+
const CSS_LIKE_SOURCE_EXTENSION_RE = /^(?:css|wxss|acss|jxss|ttss|qss|tyss|scss|sass|less|styl|stylus)$/;
|
|
2075
|
+
const SFC_SCRIPT_BLOCK_RE = /<script\b[^>]*>([\s\S]*?)<\/script>/gi;
|
|
2076
|
+
function isWhitespace(value) {
|
|
2077
|
+
return value === " " || value === "\n" || value === "\r" || value === " " || value === "\f";
|
|
2078
|
+
}
|
|
2079
|
+
function isHtmlAttributeNameCandidate(content, candidate) {
|
|
2080
|
+
if (!HTML_ATTRIBUTE_NAME_CANDIDATE_RE.test(candidate.rawCandidate)) return false;
|
|
2081
|
+
let index = candidate.end;
|
|
2082
|
+
while (isWhitespace(content[index])) index++;
|
|
2083
|
+
return content[index] === "=";
|
|
2084
|
+
}
|
|
2085
|
+
function isInsideHtmlTagText(content, candidate) {
|
|
2086
|
+
if (content.lastIndexOf("<", candidate.start) > content.lastIndexOf(">", candidate.start)) return false;
|
|
2087
|
+
const nextOpen = content.indexOf("<", candidate.end);
|
|
2088
|
+
return nextOpen !== -1 && (nextOpen < content.indexOf(">", candidate.end) || content.indexOf(">", candidate.end) === -1);
|
|
2089
|
+
}
|
|
2090
|
+
function isCssDirectiveCandidate(candidate) {
|
|
2091
|
+
return candidate === CSS_APPLY_IMPORTANT || CSS_DIRECTIVE_CANDIDATE_RE.test(candidate);
|
|
2092
|
+
}
|
|
2093
|
+
function isCandidateInCssApplyParams(content, candidate) {
|
|
2094
|
+
const apply = content.lastIndexOf("@apply", candidate.start);
|
|
2095
|
+
if (apply === -1) return false;
|
|
2096
|
+
const boundary = content.slice(apply + 6, candidate.start);
|
|
2097
|
+
return !/[;{}]/.test(boundary);
|
|
2098
|
+
}
|
|
2099
|
+
function isCandidateInsideJsStringStaticContent(content, start) {
|
|
2100
|
+
let quote;
|
|
2101
|
+
let templateExpressionDepth = 0;
|
|
2102
|
+
for (let index = 0; index < start; index++) {
|
|
2103
|
+
const char = content[index];
|
|
2104
|
+
const next = content[index + 1];
|
|
2105
|
+
if (quote && char === "\\") {
|
|
2106
|
+
index++;
|
|
2107
|
+
continue;
|
|
2108
|
+
}
|
|
2109
|
+
if (quote === "`" && templateExpressionDepth > 0) {
|
|
2110
|
+
if (char === "\"" || char === "'") {
|
|
2111
|
+
const nestedQuote = char;
|
|
2112
|
+
index++;
|
|
2113
|
+
while (index < start) {
|
|
2114
|
+
const nestedChar = content[index];
|
|
2115
|
+
if (nestedChar === "\\") {
|
|
2116
|
+
index += 2;
|
|
2117
|
+
continue;
|
|
2118
|
+
}
|
|
2119
|
+
if (nestedChar === nestedQuote) break;
|
|
2120
|
+
index++;
|
|
2121
|
+
}
|
|
2122
|
+
continue;
|
|
2123
|
+
}
|
|
2124
|
+
if (char === "`") {
|
|
2125
|
+
index++;
|
|
2126
|
+
while (index < start) {
|
|
2127
|
+
const nestedChar = content[index];
|
|
2128
|
+
if (nestedChar === "\\") {
|
|
2129
|
+
index += 2;
|
|
2130
|
+
continue;
|
|
2131
|
+
}
|
|
2132
|
+
if (nestedChar === "`") break;
|
|
2133
|
+
index++;
|
|
2134
|
+
}
|
|
2135
|
+
continue;
|
|
2136
|
+
}
|
|
2137
|
+
if (char === "{") {
|
|
2138
|
+
templateExpressionDepth++;
|
|
2139
|
+
continue;
|
|
2140
|
+
}
|
|
2141
|
+
if (char === "}") {
|
|
2142
|
+
templateExpressionDepth--;
|
|
2143
|
+
continue;
|
|
2144
|
+
}
|
|
2145
|
+
continue;
|
|
2146
|
+
}
|
|
2147
|
+
if (quote) {
|
|
2148
|
+
if (quote === "`" && char === "$" && next === "{") {
|
|
2149
|
+
templateExpressionDepth = 1;
|
|
2150
|
+
index++;
|
|
2151
|
+
continue;
|
|
2152
|
+
}
|
|
2153
|
+
if (char === quote) quote = void 0;
|
|
2154
|
+
continue;
|
|
2155
|
+
}
|
|
2156
|
+
if (char === "\"" || char === "'" || char === "`") quote = char;
|
|
2157
|
+
}
|
|
2158
|
+
return quote !== void 0 && templateExpressionDepth === 0;
|
|
2159
|
+
}
|
|
2160
|
+
function shouldKeepSourceCandidate(content, extension, candidate) {
|
|
2161
|
+
if (!candidate.rawCandidate || isCssDirectiveCandidate(candidate.rawCandidate)) return false;
|
|
2162
|
+
if (CSS_LIKE_SOURCE_EXTENSION_RE.test(extension) && !isCandidateInCssApplyParams(content, candidate)) return false;
|
|
2163
|
+
if (isHtmlAttributeNameCandidate(content, candidate)) return false;
|
|
2164
|
+
if (isInsideHtmlTagText(content, candidate)) return false;
|
|
2165
|
+
if (JS_LIKE_SOURCE_EXTENSION_RE.test(extension) && !isCandidateInsideJsStringStaticContent(content, candidate.start)) return false;
|
|
2166
|
+
return true;
|
|
2167
|
+
}
|
|
2168
|
+
function createLocalCandidate(candidate) {
|
|
2169
|
+
return {
|
|
2170
|
+
rawCandidate: candidate.rawCandidate,
|
|
2171
|
+
start: candidate.localStart,
|
|
2172
|
+
end: candidate.localStart + candidate.rawCandidate.length
|
|
2173
|
+
};
|
|
2174
|
+
}
|
|
2175
|
+
async function extractMixedSourceScriptCandidates(content) {
|
|
2176
|
+
const candidates = [];
|
|
2177
|
+
SFC_SCRIPT_BLOCK_RE.lastIndex = 0;
|
|
2178
|
+
let match = SFC_SCRIPT_BLOCK_RE.exec(content);
|
|
2179
|
+
while (match !== null) {
|
|
2180
|
+
const scriptContent = match[1] ?? "";
|
|
2181
|
+
const scriptStart = match.index + match[0].indexOf(scriptContent);
|
|
2182
|
+
const scriptCandidates = await extractRawCandidatesWithPositions(scriptContent, "js");
|
|
2183
|
+
candidates.push(...scriptCandidates.map((candidate) => ({
|
|
2184
|
+
content: scriptContent,
|
|
2185
|
+
extension: "js",
|
|
2186
|
+
localStart: candidate.start,
|
|
2187
|
+
rawCandidate: candidate.rawCandidate,
|
|
2188
|
+
start: candidate.start + scriptStart,
|
|
2189
|
+
end: candidate.end + scriptStart
|
|
2190
|
+
})));
|
|
2191
|
+
match = SFC_SCRIPT_BLOCK_RE.exec(content);
|
|
2192
|
+
}
|
|
2193
|
+
return candidates;
|
|
2194
|
+
}
|
|
2061
2195
|
function createCandidateCacheKey(designSystemKey, options) {
|
|
2062
2196
|
if (options.bareArbitraryValues == null || options.bareArbitraryValues === false) return designSystemKey;
|
|
2063
2197
|
return `${designSystemKey}:bare-arbitrary:${JSON.stringify(options.bareArbitraryValues)}`;
|
|
@@ -2073,6 +2207,32 @@ async function extractRawCandidatesWithPositions(content, extension = "html") {
|
|
|
2073
2207
|
end: position + candidate.length
|
|
2074
2208
|
}));
|
|
2075
2209
|
}
|
|
2210
|
+
async function extractSourceCandidatesWithPositions(content, extension = "html") {
|
|
2211
|
+
const normalizedExtension = extension.replace(/^\./, "");
|
|
2212
|
+
const candidates = (await extractRawCandidatesWithPositions(content, normalizedExtension)).map((candidate) => ({
|
|
2213
|
+
...candidate,
|
|
2214
|
+
content,
|
|
2215
|
+
extension: normalizedExtension,
|
|
2216
|
+
localStart: candidate.start
|
|
2217
|
+
}));
|
|
2218
|
+
if (MIXED_TEMPLATE_SOURCE_EXTENSION_RE.test(normalizedExtension)) candidates.push(...await extractMixedSourceScriptCandidates(content));
|
|
2219
|
+
const seen = /* @__PURE__ */ new Set();
|
|
2220
|
+
return candidates.filter((candidate) => {
|
|
2221
|
+
if (!shouldKeepSourceCandidate(candidate.content, candidate.extension, createLocalCandidate(candidate))) return false;
|
|
2222
|
+
const key = `${candidate.start}:${candidate.end}:${candidate.rawCandidate}`;
|
|
2223
|
+
if (seen.has(key)) return false;
|
|
2224
|
+
seen.add(key);
|
|
2225
|
+
return true;
|
|
2226
|
+
}).map(({ rawCandidate, start, end }) => ({
|
|
2227
|
+
rawCandidate,
|
|
2228
|
+
start,
|
|
2229
|
+
end
|
|
2230
|
+
}));
|
|
2231
|
+
}
|
|
2232
|
+
async function extractSourceCandidates(content, extension = "html") {
|
|
2233
|
+
const candidates = await extractSourceCandidatesWithPositions(content, extension);
|
|
2234
|
+
return [...new Set(candidates.map((candidate) => candidate.rawCandidate))];
|
|
2235
|
+
}
|
|
2076
2236
|
async function extractRawCandidates(sources) {
|
|
2077
2237
|
const { Scanner } = await getOxideModule();
|
|
2078
2238
|
return new Scanner(sources === void 0 ? {} : { sources }).scan();
|
|
@@ -2317,6 +2477,25 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2317
2477
|
negated: source.negated
|
|
2318
2478
|
}));
|
|
2319
2479
|
};
|
|
2480
|
+
const addCandidates = async (extractOptions) => {
|
|
2481
|
+
const candidates = await extractValidCandidates(extractOptions);
|
|
2482
|
+
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2483
|
+
};
|
|
2484
|
+
if (v4Options.cssSources.length > 0) for (const source of v4Options.cssSources) {
|
|
2485
|
+
const sourceFile = toAbsolute(source.file);
|
|
2486
|
+
const sourceBase = toAbsolute(source.base) ?? (sourceFile ? pathe.default.dirname(sourceFile) : resolvedDefaultBase);
|
|
2487
|
+
const designSystemBases = resolvedConfiguredBase && resolvedConfiguredBase !== sourceBase ? [sourceBase, resolvedConfiguredBase] : [sourceBase];
|
|
2488
|
+
const sources = resolveSources(sourceBase);
|
|
2489
|
+
const firstBase = designSystemBases[0] ?? sourceBase;
|
|
2490
|
+
await addCandidates({
|
|
2491
|
+
cwd: options.projectRoot,
|
|
2492
|
+
base: firstBase,
|
|
2493
|
+
baseFallbacks: designSystemBases.slice(1),
|
|
2494
|
+
css: source.css,
|
|
2495
|
+
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2496
|
+
...sources === void 0 ? {} : { sources }
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2320
2499
|
if (v4Options.cssEntries.length > 0) for (const entry of v4Options.cssEntries) {
|
|
2321
2500
|
const filePath = pathe.default.isAbsolute(entry) ? entry : pathe.default.resolve(options.projectRoot, entry);
|
|
2322
2501
|
if (!await fs_extra.default.pathExists(filePath)) continue;
|
|
@@ -2325,7 +2504,7 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2325
2504
|
const designSystemBases = resolvedConfiguredBase && resolvedConfiguredBase !== entryDir ? [entryDir, resolvedConfiguredBase] : [entryDir];
|
|
2326
2505
|
const sources = resolveSources(resolvedConfiguredBase ?? entryDir);
|
|
2327
2506
|
const firstBase = designSystemBases[0] ?? entryDir;
|
|
2328
|
-
|
|
2507
|
+
await addCandidates({
|
|
2329
2508
|
cwd: options.projectRoot,
|
|
2330
2509
|
base: firstBase,
|
|
2331
2510
|
baseFallbacks: designSystemBases.slice(1),
|
|
@@ -2333,19 +2512,17 @@ async function collectClassesFromTailwindV4(options) {
|
|
|
2333
2512
|
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2334
2513
|
...sources === void 0 ? {} : { sources }
|
|
2335
2514
|
});
|
|
2336
|
-
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2337
2515
|
}
|
|
2338
|
-
else {
|
|
2516
|
+
else if (v4Options.cssSources.length === 0) {
|
|
2339
2517
|
const baseForCss = resolvedConfiguredBase ?? resolvedDefaultBase;
|
|
2340
2518
|
const sources = resolveSources(baseForCss);
|
|
2341
|
-
|
|
2519
|
+
await addCandidates({
|
|
2342
2520
|
cwd: options.projectRoot,
|
|
2343
2521
|
base: baseForCss,
|
|
2344
2522
|
...v4Options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: v4Options.bareArbitraryValues },
|
|
2345
2523
|
...v4Options.css === void 0 ? {} : { css: v4Options.css },
|
|
2346
2524
|
...sources === void 0 ? {} : { sources }
|
|
2347
2525
|
});
|
|
2348
|
-
for (const candidate of candidates) if (options.filter(candidate)) set.add(candidate);
|
|
2349
2526
|
}
|
|
2350
2527
|
return set;
|
|
2351
2528
|
}
|
|
@@ -4001,6 +4178,18 @@ Object.defineProperty(exports, "extractRawCandidatesWithPositions", {
|
|
|
4001
4178
|
return extractRawCandidatesWithPositions;
|
|
4002
4179
|
}
|
|
4003
4180
|
});
|
|
4181
|
+
Object.defineProperty(exports, "extractSourceCandidates", {
|
|
4182
|
+
enumerable: true,
|
|
4183
|
+
get: function() {
|
|
4184
|
+
return extractSourceCandidates;
|
|
4185
|
+
}
|
|
4186
|
+
});
|
|
4187
|
+
Object.defineProperty(exports, "extractSourceCandidatesWithPositions", {
|
|
4188
|
+
enumerable: true,
|
|
4189
|
+
get: function() {
|
|
4190
|
+
return extractSourceCandidatesWithPositions;
|
|
4191
|
+
}
|
|
4192
|
+
});
|
|
4004
4193
|
Object.defineProperty(exports, "extractTailwindV4InlineSourceCandidates", {
|
|
4005
4194
|
enumerable: true,
|
|
4006
4195
|
get: function() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PackageInfo, PackageResolvingOptions } from "local-pkg";
|
|
2
|
-
import * as _$consola from "consola";
|
|
3
|
-
import { Node, Rule } from "postcss";
|
|
4
1
|
import { CAC, Command } from "cac";
|
|
2
|
+
import { PackageInfo, PackageResolvingOptions } from "local-pkg";
|
|
5
3
|
import { SourceEntry } from "@tailwindcss/oxide";
|
|
4
|
+
import { Node, Rule } from "postcss";
|
|
6
5
|
import { Config } from "tailwindcss";
|
|
6
|
+
import * as _$consola from "consola";
|
|
7
|
+
|
|
7
8
|
//#region src/cache/types.d.ts
|
|
8
9
|
declare const CACHE_SCHEMA_VERSION = 2;
|
|
9
10
|
declare const CACHE_FINGERPRINT_VERSION = 1;
|
|
@@ -158,6 +159,78 @@ interface PatchStatusReport {
|
|
|
158
159
|
entries: PatchStatusEntry[];
|
|
159
160
|
}
|
|
160
161
|
//#endregion
|
|
162
|
+
//#region src/v4/types.d.ts
|
|
163
|
+
interface TailwindV4SourceOptions {
|
|
164
|
+
projectRoot?: string;
|
|
165
|
+
cwd?: string;
|
|
166
|
+
base?: string;
|
|
167
|
+
baseFallbacks?: string[];
|
|
168
|
+
css?: string;
|
|
169
|
+
cssSources?: TailwindV4CssSource[];
|
|
170
|
+
cssEntries?: string[];
|
|
171
|
+
packageName?: string;
|
|
172
|
+
}
|
|
173
|
+
interface TailwindV4CssSource {
|
|
174
|
+
css: string;
|
|
175
|
+
base?: string;
|
|
176
|
+
file?: string;
|
|
177
|
+
dependencies?: string[];
|
|
178
|
+
}
|
|
179
|
+
interface TailwindV4ResolvedSource {
|
|
180
|
+
projectRoot: string;
|
|
181
|
+
base: string;
|
|
182
|
+
baseFallbacks: string[];
|
|
183
|
+
css: string;
|
|
184
|
+
dependencies: string[];
|
|
185
|
+
}
|
|
186
|
+
interface TailwindV4CandidateSource {
|
|
187
|
+
content: string;
|
|
188
|
+
extension?: string;
|
|
189
|
+
}
|
|
190
|
+
interface TailwindV4GenerateOptions {
|
|
191
|
+
candidates?: Iterable<string>;
|
|
192
|
+
sources?: TailwindV4CandidateSource[];
|
|
193
|
+
/**
|
|
194
|
+
* Enables UnoCSS-style bare arbitrary values such as `p-10%` and `p-2.5px`.
|
|
195
|
+
*/
|
|
196
|
+
bareArbitraryValues?: boolean | {
|
|
197
|
+
units?: string[];
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* 扫描文件系统 source entries 中的候选类名。
|
|
201
|
+
*
|
|
202
|
+
* - `true`:使用 Tailwind v4 编译入口解析出的 `@source` 列表。
|
|
203
|
+
* - `TailwindV4SourcePattern[]`:使用调用方显式传入的 source 列表。
|
|
204
|
+
*/
|
|
205
|
+
scanSources?: boolean | TailwindV4SourcePattern[];
|
|
206
|
+
}
|
|
207
|
+
interface TailwindV4SourcePattern {
|
|
208
|
+
base: string;
|
|
209
|
+
pattern: string;
|
|
210
|
+
negated: boolean;
|
|
211
|
+
}
|
|
212
|
+
interface TailwindV4GenerateResult {
|
|
213
|
+
css: string;
|
|
214
|
+
classSet: Set<string>;
|
|
215
|
+
rawCandidates: Set<string>;
|
|
216
|
+
dependencies: string[];
|
|
217
|
+
sources: TailwindV4SourcePattern[];
|
|
218
|
+
root: null | 'none' | {
|
|
219
|
+
base: string;
|
|
220
|
+
pattern: string;
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
interface TailwindV4DesignSystem {
|
|
224
|
+
parseCandidate: (candidate: string) => unknown[];
|
|
225
|
+
candidatesToCss: (candidates: string[]) => Array<string | null | undefined>;
|
|
226
|
+
}
|
|
227
|
+
interface TailwindV4Engine {
|
|
228
|
+
source: TailwindV4ResolvedSource;
|
|
229
|
+
loadDesignSystem: () => Promise<TailwindV4DesignSystem>;
|
|
230
|
+
validateCandidates: (candidates: Iterable<string>) => Promise<Set<string>>;
|
|
231
|
+
generate: (options?: TailwindV4GenerateOptions) => Promise<TailwindV4GenerateResult>;
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
161
234
|
//#region src/options/types.d.ts
|
|
162
235
|
type CacheStrategy = 'merge' | 'overwrite';
|
|
163
236
|
type CacheDriver = 'file' | 'memory' | 'noop';
|
|
@@ -245,6 +318,8 @@ interface TailwindV4Options {
|
|
|
245
318
|
base?: string;
|
|
246
319
|
/** Raw CSS passed directly to the v4 design system. */
|
|
247
320
|
css?: string;
|
|
321
|
+
/** 构建器在 CSS 落盘前捕获的内存 CSS 入口。 */
|
|
322
|
+
cssSources?: TailwindV4CssSource[];
|
|
248
323
|
/** Set of CSS entry files that should be scanned for `@config` directives. */
|
|
249
324
|
cssEntries?: string[];
|
|
250
325
|
/** Overrides the content sources scanned by the oxide scanner. */
|
|
@@ -327,6 +402,7 @@ interface NormalizedTailwindV4Options {
|
|
|
327
402
|
base: string;
|
|
328
403
|
configuredBase?: string;
|
|
329
404
|
css?: string;
|
|
405
|
+
cssSources: TailwindV4CssSource[];
|
|
330
406
|
cssEntries: string[];
|
|
331
407
|
sources: SourceEntry[];
|
|
332
408
|
hasUserDefinedSources: boolean;
|
|
@@ -437,11 +513,14 @@ interface ExtractValidCandidatesOption {
|
|
|
437
513
|
cwd?: string;
|
|
438
514
|
bareArbitraryValues?: boolean | BareArbitraryValueOptions;
|
|
439
515
|
}
|
|
440
|
-
|
|
516
|
+
interface ExtractSourceCandidate {
|
|
441
517
|
rawCandidate: string;
|
|
442
518
|
start: number;
|
|
443
519
|
end: number;
|
|
444
|
-
}
|
|
520
|
+
}
|
|
521
|
+
declare function extractRawCandidatesWithPositions(content: string, extension?: string): Promise<ExtractSourceCandidate[]>;
|
|
522
|
+
declare function extractSourceCandidatesWithPositions(content: string, extension?: string): Promise<ExtractSourceCandidate[]>;
|
|
523
|
+
declare function extractSourceCandidates(content: string, extension?: string): Promise<string[]>;
|
|
445
524
|
declare function extractRawCandidates(sources?: SourceEntry[]): Promise<string[]>;
|
|
446
525
|
declare function extractValidCandidates(options?: ExtractValidCandidatesOption): Promise<string[]>;
|
|
447
526
|
interface ExtractProjectCandidatesOptions {
|
|
@@ -698,4 +777,4 @@ declare class ValidateCommandError extends Error {
|
|
|
698
777
|
constructor(summary: ValidateFailureSummary, options?: ErrorOptions);
|
|
699
778
|
}
|
|
700
779
|
//#endregion
|
|
701
|
-
export {
|
|
780
|
+
export { TailwindV4GenerateResult as $, extractSourceCandidatesWithPositions as A, ExtractOptions as B, MIGRATION_REPORT_SCHEMA_VERSION as C, extractRawCandidates as D, extractProjectCandidatesWithPositions as E, ApplyOptions as F, TailwindV2Options as G, NormalizedTailwindCssPatchOptions as H, CacheOptions as I, TailwindV4CandidateSource as J, TailwindV3Options as K, CacheStrategy as L, groupTokensByFile as M, BareArbitraryValueOptions as N, extractRawCandidatesWithPositions as O, normalizeOptions as P, TailwindV4GenerateOptions as Q, ExposeContextOptions as R, MIGRATION_REPORT_KIND as S, CacheReadResult as St, TailwindcssPatcher as T, TailwindCssOptions as U, NormalizedCacheOptions as V, TailwindCssPatchOptions as W, TailwindV4DesignSystem as X, TailwindV4CssSource as Y, TailwindV4Engine as Z, ConfigFileMigrationEntry as _, CacheClearScope as _t, ValidateFailureSummary as a, PatchName as at, RestoreConfigFilesOptions as b, CacheIndexFileV2 as bt, TailwindcssPatchCliMountOptions as c, TailwindPatchRuntime as ct, TailwindcssPatchCommandContext as d, TailwindTokenLocation as dt, TailwindV4ResolvedSource as et, TailwindcssPatchCommandHandler as f, TailwindTokenReport as ft, tailwindcssPatchCommands as g, CacheClearResult as gt, TailwindcssPatchCommandOptions as h, CacheClearOptions as ht, ValidateFailureReason as i, PatchCheckStatus as it, extractValidCandidates as j, extractSourceCandidates as k, TailwindcssPatchCliOptions as l, TailwindTokenByFileMap as lt, TailwindcssPatchCommandOptionDefinition as m, TailwindcssRuntimeContext as mt, VALIDATE_FAILURE_REASONS as n, ExtractResult as nt, ValidateJsonFailurePayload as o, PatchStatusEntry as ot, TailwindcssPatchCommandHandlerMap as p, TailwindcssClassCache as pt, TailwindV4Options as q, ValidateCommandError as r, ILengthUnitsPatchOptions as rt, ValidateJsonSuccessPayload as s, PatchStatusReport as st, VALIDATE_EXIT_CODES as t, TailwindV4SourceOptions as tt, TailwindcssPatchCommand as u, TailwindTokenFileKey as ut, ConfigFileMigrationReport as v, CacheContextDescriptor as vt, logger as w, RestoreConfigFilesResult as x, CacheReadMeta as xt, MigrateConfigFilesOptions as y, CacheContextMetadata as yt, ExtendLengthUnitsOptions as z };
|