weapp-tailwindcss 5.1.5 → 5.1.7
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/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +4 -1
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +1 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +7 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +10 -0
- package/dist/{context-rrYZuUBU.mjs → context-BqeDu1Ha.mjs} +5 -4
- package/dist/{context-BziwyWy1.js → context-C7KTDlrG.js} +5 -4
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator-24-HgU9F.mjs → generator-BOt2Tvx3.mjs} +2 -2
- package/dist/{generator-CilgHtxb.js → generator-DASZwC6t.js} +2 -2
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/{gulp-CuVsZdO9.js → gulp-D6hsaTLM.js} +4 -4
- package/dist/{gulp-ygWfmOqh.mjs → gulp-alDZryyB.mjs} +4 -4
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-BKdCeIrn.js → hmr-timing-BIr_CiPW.js} +55 -566
- package/dist/{hmr-timing-Dh_nn3w5.mjs → hmr-timing-CYwVMRol.mjs} +32 -513
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/postcss.js +2 -2
- package/dist/postcss.mjs +2 -2
- package/dist/presets.js +6 -3
- package/dist/presets.mjs +6 -3
- package/dist/rspack.js +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/runtime-branch/generator-target-env.d.ts +1 -0
- package/dist/{source-candidate-scan-signature-DATRnS1X.mjs → source-candidate-scan-signature-D97ZEXcj.mjs} +3 -3
- package/dist/{source-candidate-scan-signature-DIj9m4wB.js → source-candidate-scan-signature-Djr2Hw8y.js} +3 -3
- package/dist/{tailwindcss-C-uM4rB8.mjs → tailwindcss-DDGD90w7.mjs} +15 -2
- package/dist/{tailwindcss-BwoNQ3t8.js → tailwindcss-DPxJpRVP.js} +15 -2
- package/dist/{transform-KLD1tJdb.js → transform-CvqqZBuq.js} +1 -1
- package/dist/{transform-DHLemtaX.mjs → transform-DPPr79r2.mjs} +1 -1
- package/dist/uni-app-x/web-preflight-reset.d.ts +3 -0
- package/dist/{v4-engine-CKtsdKxK.js → v4-engine-3UmJkAY7.js} +641 -3
- package/dist/{v4-engine-BuuYDXt1.mjs → v4-engine-CYSrDVNp.mjs} +560 -6
- package/dist/{vite-Yp14HNyS.js → vite-BJRlG835.js} +636 -114
- package/dist/{vite-cH0tTMHc.mjs → vite-XxJh7Xtu.mjs} +637 -115
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +3078 -2907
- package/dist/{webpack-DN3tgLbF.js → webpack-BxBOMUtY.js} +286 -47
- package/dist/{webpack-DBhmJ-_P.mjs → webpack-eN8WzIT-.mjs} +280 -41
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +3 -3
|
@@ -4,7 +4,7 @@ import fs, { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { createTailwindV4Engine, extractRawCandidates, loadTailwindV4DesignSystem, resolveProjectSourceFiles, resolveTailwindV4Source, resolveValidTailwindV4Candidates as resolveValidTailwindV4Candidates$1 } from "@tailwindcss-mangle/engine";
|
|
7
|
-
import { analyzeTailwindCssDirectives, createStyleHandler, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssPackageJsonImportRequest, normalizeTailwindCssImportRequest, normalizeTailwindcssWebRpxDeclarations, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, postcss, protectDynamicColorMixAlpha, pruneMiniProgramGeneratedCss } from "@weapp-tailwindcss/postcss";
|
|
7
|
+
import { analyzeTailwindCssDirectives, createStyleHandler, filterExistingCssRules, finalizeMiniProgramCss, hasMiniProgramCssSpecificityPlaceholders, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssPackageJsonImportRequest, normalizeTailwindCssImportRequest, normalizeTailwindcssWebRpxDeclarations, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, postcss, protectDynamicColorMixAlpha, pruneMiniProgramGeneratedCss, pruneMiniProgramGeneratedCss as pruneMiniProgramGeneratedCss$1, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, stripMiniProgramCssSpecificityPlaceholders } from "@weapp-tailwindcss/postcss";
|
|
8
8
|
import { LRUCache } from "lru-cache";
|
|
9
9
|
import { stat } from "node:fs/promises";
|
|
10
10
|
import micromatch from "micromatch";
|
|
@@ -41,6 +41,9 @@ function inferGeneratorTargetFromExplicitEnv() {
|
|
|
41
41
|
function shouldUseWebGeneratorTargetFromEnv() {
|
|
42
42
|
return uniWebPlatformEnvKeys.some((key) => isUniWebPlatform(getEnvValue(key))) || isUniAppWebViewPlatform(getEnvValue("UNI_PLATFORM")) && !isUniNativeAppPlatform(getEnvValue("UNI_UTS_PLATFORM")) || mpxWebPlatformEnvKeys.some((key) => isMpxWebPlatform(getEnvValue(key))) || getEnvValue("TARO_ENV") === "h5";
|
|
43
43
|
}
|
|
44
|
+
function shouldUseUniAppViteWebViewGeneratorTarget(appType, platform = getEnvValue("UNI_PLATFORM")) {
|
|
45
|
+
return appType === "uni-app-vite" && isUniAppWebViewPlatform(platform);
|
|
46
|
+
}
|
|
44
47
|
function inferGeneratorTargetFromEnv() {
|
|
45
48
|
return inferGeneratorTargetFromExplicitEnv() ?? (shouldUseWebGeneratorTargetFromEnv() ? "web" : "weapp");
|
|
46
49
|
}
|
|
@@ -1067,7 +1070,7 @@ async function transformTailwindV4CssToWeapp(css, options) {
|
|
|
1067
1070
|
preservePreflight: true,
|
|
1068
1071
|
preserveConditionalComments: hasCssMacroStyleOptions(options)
|
|
1069
1072
|
};
|
|
1070
|
-
return pruneMiniProgramGeneratedCss(protectedCss.restore(result.css), pruneOptions);
|
|
1073
|
+
return pruneMiniProgramGeneratedCss$1(protectedCss.restore(result.css), pruneOptions);
|
|
1071
1074
|
}
|
|
1072
1075
|
function transformTailwindV4WebRpxCss(css) {
|
|
1073
1076
|
if (!css.includes("rpx")) return css;
|
|
@@ -1855,6 +1858,557 @@ function resolveCssEntrySource(rawSource, base, options = {}) {
|
|
|
1855
1858
|
}
|
|
1856
1859
|
}
|
|
1857
1860
|
//#endregion
|
|
1861
|
+
//#region src/bundlers/shared/generator-css/user-css.ts
|
|
1862
|
+
const TAILWIND_V4_GENERATOR_AT_RULES = /* @__PURE__ */ new Set([
|
|
1863
|
+
"config",
|
|
1864
|
+
"custom-variant",
|
|
1865
|
+
"plugin",
|
|
1866
|
+
"source",
|
|
1867
|
+
"theme",
|
|
1868
|
+
"utility",
|
|
1869
|
+
"variant"
|
|
1870
|
+
]);
|
|
1871
|
+
function removeBalancedAtRuleBlock(source, atRuleStart) {
|
|
1872
|
+
const blockStart = source.indexOf("{", atRuleStart);
|
|
1873
|
+
if (blockStart === -1) {
|
|
1874
|
+
const semicolon = source.indexOf(";", atRuleStart);
|
|
1875
|
+
return semicolon === -1 ? source.slice(0, atRuleStart) : `${source.slice(0, atRuleStart)}${source.slice(semicolon + 1)}`;
|
|
1876
|
+
}
|
|
1877
|
+
let depth = 0;
|
|
1878
|
+
for (let index = blockStart; index < source.length; index++) {
|
|
1879
|
+
const char = source[index];
|
|
1880
|
+
if (char === "{") {
|
|
1881
|
+
depth++;
|
|
1882
|
+
continue;
|
|
1883
|
+
}
|
|
1884
|
+
if (char !== "}") continue;
|
|
1885
|
+
depth--;
|
|
1886
|
+
if (depth === 0) return `${source.slice(0, atRuleStart)}${source.slice(index + 1)}`;
|
|
1887
|
+
}
|
|
1888
|
+
return source.slice(0, atRuleStart);
|
|
1889
|
+
}
|
|
1890
|
+
function removeTailwindV4GeneratorAtRulesFallback(source) {
|
|
1891
|
+
let next = source;
|
|
1892
|
+
let changed = false;
|
|
1893
|
+
const sourceMediaRE = /@media\s+source\([^)]*\)\s*\{/g;
|
|
1894
|
+
for (;;) {
|
|
1895
|
+
sourceMediaRE.lastIndex = 0;
|
|
1896
|
+
const match = sourceMediaRE.exec(next);
|
|
1897
|
+
if (!match) break;
|
|
1898
|
+
next = removeBalancedAtRuleBlock(next, match.index);
|
|
1899
|
+
changed = true;
|
|
1900
|
+
}
|
|
1901
|
+
const atRuleRE = /@(?:config|custom-variant|plugin|source|theme|utility|variant)\b/g;
|
|
1902
|
+
for (;;) {
|
|
1903
|
+
atRuleRE.lastIndex = 0;
|
|
1904
|
+
const match = atRuleRE.exec(next);
|
|
1905
|
+
if (!match) break;
|
|
1906
|
+
next = removeBalancedAtRuleBlock(next, match.index);
|
|
1907
|
+
changed = true;
|
|
1908
|
+
}
|
|
1909
|
+
return changed ? next : source;
|
|
1910
|
+
}
|
|
1911
|
+
function isTailwindGeneratedPreflightComment(text) {
|
|
1912
|
+
return text.includes("cssremedy") || text.includes("Use the user's configured") || text.includes("tailwindlabs/tailwindcss") || text.includes("Prevent padding and border from affecting element width") || text.includes("Remove default margins and padding") || text.includes("Deprecated") || text.includes("Reset all borders") || text.includes("Add the correct text decoration") || text.includes("Make elements with the HTML hidden attribute stay hidden") || text.includes("Inherit font styles in all browsers") || text.includes("Add the correct height in Firefox") || text.includes("Remove the default font size and weight for headings") || text.includes("Reset links to optimize for opt-in styling") || text.includes("Add the correct font weight in Edge and Safari") || text.includes("Use the user's configured `mono` font-family") || text.includes("Add the correct font size in all browsers") || text.includes("Prevent `sub` and `sup` elements from affecting the line height") || text.includes("Remove text indentation from table contents") || text.includes("Use the modern Firefox focus style") || text.includes("Add the correct vertical alignment") || text.includes("Add the correct display") || text.includes("Make lists unstyled by default") || text.includes("Make replaced elements `display: block` by default") || text.includes("Constrain images and videos to the parent width") || text.includes("Restore default font weight") || text.includes("Restore indentation") || text.includes("Restore space after button") || text.includes("Prevent resizing textareas horizontally") || text.includes("Remove the inner padding in Chrome and Safari") || text.includes("Ensure date/time inputs have the same height") || text.includes("Prevent height from changing on date/time inputs") || text.includes("Remove excess padding from pseudo-elements") || text.includes("Center dropdown marker shown on inputs") || text.includes("Remove the additional `:invalid` styles") || text.includes("Correct the inability to style the border radius") || text.includes("Correct the cursor style of increment and decrement buttons");
|
|
1913
|
+
}
|
|
1914
|
+
function isTailwindGeneratedThemeRule(selector, node) {
|
|
1915
|
+
if (!/(?:^|,)\s*(?::host|page|\.tw-root|wx-root-portal-content)\b/.test(selector)) return false;
|
|
1916
|
+
return node.nodes?.some((child) => child.type === "decl" && /^--(?:color|spacing|text|font|default|radius|tw-)/.test(child.prop)) ?? false;
|
|
1917
|
+
}
|
|
1918
|
+
function isTailwindGeneratedPreflightRule(selector, node) {
|
|
1919
|
+
if (selector === "view,text,::after,::before" || selector === "view, text, ::after, ::before" || selector === "*" || selector === "::after" || selector === "::before" || selector === "::backdrop" || selector === ":host" || selector === "[hidden]:not([hidden=\"until-found\"])" || selector === "[hidden]:not([hidden='until-found'])" || selector === "button,input[type=\"button\"],input[type=\"reset\"],input[type=\"submit\"]" || selector === "button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"]" || selector === "button,input[type='button'],input[type='reset'],input[type='submit']" || selector === "button, input[type='button'], input[type='reset'], input[type='submit']") return true;
|
|
1920
|
+
if (selector === "abbr[title]") return node.nodes?.some((child) => child.type === "decl" && child.prop === "text-decoration") ?? false;
|
|
1921
|
+
if (selector === ":host") return node.nodes?.some((child) => child.type === "decl" && child.value?.includes("--theme(")) ?? false;
|
|
1922
|
+
return false;
|
|
1923
|
+
}
|
|
1924
|
+
function removeTailwindV4GeneratedUserCssArtifacts(source) {
|
|
1925
|
+
try {
|
|
1926
|
+
const root = postcss.parse(source);
|
|
1927
|
+
let changed = false;
|
|
1928
|
+
root.walkComments((comment) => {
|
|
1929
|
+
if (!isTailwindGeneratedPreflightComment(comment.text)) return;
|
|
1930
|
+
comment.remove();
|
|
1931
|
+
changed = true;
|
|
1932
|
+
});
|
|
1933
|
+
root.walkRules((rule) => {
|
|
1934
|
+
const selector = rule.selector.replace(/\s+/g, " ").trim();
|
|
1935
|
+
if (isTailwindGeneratedThemeRule(selector, rule) || isTailwindGeneratedPreflightRule(selector, rule)) {
|
|
1936
|
+
rule.remove();
|
|
1937
|
+
changed = true;
|
|
1938
|
+
}
|
|
1939
|
+
});
|
|
1940
|
+
root.walkAtRules((rule) => {
|
|
1941
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) {
|
|
1942
|
+
rule.remove();
|
|
1943
|
+
changed = true;
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
return changed ? root.toString() : source;
|
|
1947
|
+
} catch {
|
|
1948
|
+
return source;
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
function removeTailwindSourceMediaBlocks(source) {
|
|
1952
|
+
let next = source;
|
|
1953
|
+
let changed = false;
|
|
1954
|
+
const sourceMediaRE = /@media\s+source\([^)]*\)\s*\{/g;
|
|
1955
|
+
for (;;) {
|
|
1956
|
+
sourceMediaRE.lastIndex = 0;
|
|
1957
|
+
const match = sourceMediaRE.exec(next);
|
|
1958
|
+
if (!match) break;
|
|
1959
|
+
const blockStart = next.indexOf("{", match.index);
|
|
1960
|
+
if (blockStart === -1) break;
|
|
1961
|
+
let depth = 0;
|
|
1962
|
+
let blockEnd = -1;
|
|
1963
|
+
for (let index = blockStart; index < next.length; index++) {
|
|
1964
|
+
const char = next[index];
|
|
1965
|
+
if (char === "{") {
|
|
1966
|
+
depth++;
|
|
1967
|
+
continue;
|
|
1968
|
+
}
|
|
1969
|
+
if (char !== "}") continue;
|
|
1970
|
+
depth--;
|
|
1971
|
+
if (depth === 0) {
|
|
1972
|
+
blockEnd = index;
|
|
1973
|
+
break;
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
if (blockEnd === -1) break;
|
|
1977
|
+
next = `${next.slice(0, match.index)}${next.slice(blockEnd + 1)}`;
|
|
1978
|
+
changed = true;
|
|
1979
|
+
}
|
|
1980
|
+
for (;;) {
|
|
1981
|
+
const atRuleStart = findTailwindSourceWrapperBlockStart(next);
|
|
1982
|
+
if (atRuleStart === -1) break;
|
|
1983
|
+
next = removeBalancedAtRuleBlock(next, atRuleStart);
|
|
1984
|
+
changed = true;
|
|
1985
|
+
}
|
|
1986
|
+
return changed ? next : source;
|
|
1987
|
+
}
|
|
1988
|
+
function terminateTailwindSourceAtRulesBeforeNextDirective(source) {
|
|
1989
|
+
if (!source.includes("@source")) return source;
|
|
1990
|
+
let next = "";
|
|
1991
|
+
let searchIndex = 0;
|
|
1992
|
+
for (;;) {
|
|
1993
|
+
const atRuleStart = source.indexOf("@source", searchIndex);
|
|
1994
|
+
if (atRuleStart === -1) {
|
|
1995
|
+
next += source.slice(searchIndex);
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
const nextChar = source[atRuleStart + 7];
|
|
1999
|
+
if (nextChar && /[\w-]/.test(nextChar)) {
|
|
2000
|
+
next += source.slice(searchIndex, atRuleStart + 7);
|
|
2001
|
+
searchIndex = atRuleStart + 7;
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
next += source.slice(searchIndex, atRuleStart);
|
|
2005
|
+
let quote;
|
|
2006
|
+
let parenDepth = 0;
|
|
2007
|
+
let terminated = false;
|
|
2008
|
+
let index = atRuleStart + 7;
|
|
2009
|
+
for (; index < source.length; index++) {
|
|
2010
|
+
const char = source[index];
|
|
2011
|
+
if (quote) {
|
|
2012
|
+
if (char === "\\") {
|
|
2013
|
+
index++;
|
|
2014
|
+
continue;
|
|
2015
|
+
}
|
|
2016
|
+
if (char === quote) quote = void 0;
|
|
2017
|
+
continue;
|
|
2018
|
+
}
|
|
2019
|
+
if (char === "\"" || char === "'") {
|
|
2020
|
+
quote = char;
|
|
2021
|
+
continue;
|
|
2022
|
+
}
|
|
2023
|
+
if (char === "(") {
|
|
2024
|
+
parenDepth++;
|
|
2025
|
+
continue;
|
|
2026
|
+
}
|
|
2027
|
+
if (char === ")" && parenDepth > 0) {
|
|
2028
|
+
parenDepth--;
|
|
2029
|
+
continue;
|
|
2030
|
+
}
|
|
2031
|
+
if (parenDepth > 0) continue;
|
|
2032
|
+
if (char === ";" || char === "{") {
|
|
2033
|
+
terminated = true;
|
|
2034
|
+
index++;
|
|
2035
|
+
break;
|
|
2036
|
+
}
|
|
2037
|
+
if (char === "@" && /^(?:config|custom-variant|plugin|source|theme|utility|variant)\b/.test(source.slice(index + 1))) break;
|
|
2038
|
+
}
|
|
2039
|
+
const segment = source.slice(atRuleStart, index);
|
|
2040
|
+
const trimmedSegment = segment.trimEnd();
|
|
2041
|
+
next += terminated || trimmedSegment.endsWith(";") || trimmedSegment.endsWith("{") ? segment : `${trimmedSegment};${segment.slice(trimmedSegment.length)}`;
|
|
2042
|
+
searchIndex = index;
|
|
2043
|
+
}
|
|
2044
|
+
return next;
|
|
2045
|
+
}
|
|
2046
|
+
function findTailwindSourceWrapperBlockStart(source) {
|
|
2047
|
+
let searchIndex = 0;
|
|
2048
|
+
for (;;) {
|
|
2049
|
+
const atRuleStart = source.indexOf("@source", searchIndex);
|
|
2050
|
+
if (atRuleStart === -1) return -1;
|
|
2051
|
+
const nextChar = source[atRuleStart + 7];
|
|
2052
|
+
if (nextChar && /[\w-]/.test(nextChar)) {
|
|
2053
|
+
searchIndex = atRuleStart + 7;
|
|
2054
|
+
continue;
|
|
2055
|
+
}
|
|
2056
|
+
let quote;
|
|
2057
|
+
let parenDepth = 0;
|
|
2058
|
+
for (let index = atRuleStart + 7; index < source.length; index++) {
|
|
2059
|
+
const char = source[index];
|
|
2060
|
+
if (quote) {
|
|
2061
|
+
if (char === "\\") {
|
|
2062
|
+
index++;
|
|
2063
|
+
continue;
|
|
2064
|
+
}
|
|
2065
|
+
if (char === quote) quote = void 0;
|
|
2066
|
+
continue;
|
|
2067
|
+
}
|
|
2068
|
+
if (char === "\"" || char === "'") {
|
|
2069
|
+
quote = char;
|
|
2070
|
+
continue;
|
|
2071
|
+
}
|
|
2072
|
+
if (char === "(") {
|
|
2073
|
+
parenDepth++;
|
|
2074
|
+
continue;
|
|
2075
|
+
}
|
|
2076
|
+
if (char === ")" && parenDepth > 0) {
|
|
2077
|
+
parenDepth--;
|
|
2078
|
+
continue;
|
|
2079
|
+
}
|
|
2080
|
+
if (parenDepth > 0) continue;
|
|
2081
|
+
if (char === ";") {
|
|
2082
|
+
searchIndex = index + 1;
|
|
2083
|
+
break;
|
|
2084
|
+
}
|
|
2085
|
+
if (char === "{") return atRuleStart;
|
|
2086
|
+
}
|
|
2087
|
+
if (searchIndex <= atRuleStart) return -1;
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
function removeTailwindApplyAtRules(source) {
|
|
2091
|
+
if (!source.includes("@apply")) return source;
|
|
2092
|
+
try {
|
|
2093
|
+
const root = postcss.parse(source);
|
|
2094
|
+
let changed = false;
|
|
2095
|
+
root.walkAtRules("apply", (rule) => {
|
|
2096
|
+
rule.remove();
|
|
2097
|
+
changed = true;
|
|
2098
|
+
});
|
|
2099
|
+
root.walk((node) => {
|
|
2100
|
+
if ("nodes" in node && node.nodes?.length === 0) node.remove();
|
|
2101
|
+
});
|
|
2102
|
+
return changed ? root.toString() : source;
|
|
2103
|
+
} catch {
|
|
2104
|
+
return source;
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
function removeTailwindV4GeneratorAtRules(source) {
|
|
2108
|
+
try {
|
|
2109
|
+
const root = postcss.parse(source);
|
|
2110
|
+
let changed = false;
|
|
2111
|
+
root.walkAtRules((rule) => {
|
|
2112
|
+
if (rule.name === "media" && /^source\(/.test(rule.params.trim())) {
|
|
2113
|
+
rule.remove();
|
|
2114
|
+
changed = true;
|
|
2115
|
+
return;
|
|
2116
|
+
}
|
|
2117
|
+
if (!TAILWIND_V4_GENERATOR_AT_RULES.has(rule.name)) return;
|
|
2118
|
+
rule.remove();
|
|
2119
|
+
changed = true;
|
|
2120
|
+
});
|
|
2121
|
+
return changed ? root.toString() : source;
|
|
2122
|
+
} catch {
|
|
2123
|
+
return removeTailwindV4GeneratorAtRulesFallback(source);
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
function isCommentOnlyCss(source) {
|
|
2127
|
+
try {
|
|
2128
|
+
const root = postcss.parse(source);
|
|
2129
|
+
return root.nodes.length > 0 && root.nodes.every((node) => node.type === "comment");
|
|
2130
|
+
} catch {
|
|
2131
|
+
return false;
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
function removeMiniProgramHoverSelectors(source, enabled = true) {
|
|
2135
|
+
if (!enabled || !source.includes(":hover")) return source;
|
|
2136
|
+
try {
|
|
2137
|
+
const root = postcss.parse(source);
|
|
2138
|
+
let changed = false;
|
|
2139
|
+
root.walkRules((rule) => {
|
|
2140
|
+
const selectors = rule.selectors ?? [rule.selector];
|
|
2141
|
+
const keptSelectors = selectors.filter((selector) => !selector.includes(":hover"));
|
|
2142
|
+
if (keptSelectors.length === selectors.length) return;
|
|
2143
|
+
changed = true;
|
|
2144
|
+
if (keptSelectors.length === 0) {
|
|
2145
|
+
rule.remove();
|
|
2146
|
+
return;
|
|
2147
|
+
}
|
|
2148
|
+
rule.selectors = keptSelectors;
|
|
2149
|
+
});
|
|
2150
|
+
root.walk((node) => {
|
|
2151
|
+
if ("nodes" in node && node.nodes?.length === 0) {
|
|
2152
|
+
node.remove();
|
|
2153
|
+
changed = true;
|
|
2154
|
+
}
|
|
2155
|
+
});
|
|
2156
|
+
return changed ? root.toString() : source;
|
|
2157
|
+
} catch {
|
|
2158
|
+
return source;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
function removeProcessedMiniProgramUnsupportedCss(source, options) {
|
|
2162
|
+
return removeMiniProgramHoverSelectors(removeUnsupportedMiniProgramAtRules(source), options.cssRemoveHoverPseudoClass);
|
|
2163
|
+
}
|
|
2164
|
+
function unwrapMiniProgramCascadeLayers(source) {
|
|
2165
|
+
if (!source.includes("@layer")) return source;
|
|
2166
|
+
try {
|
|
2167
|
+
const root = postcss.parse(source);
|
|
2168
|
+
removeUnsupportedCascadeLayers(root);
|
|
2169
|
+
return root.toString();
|
|
2170
|
+
} catch {
|
|
2171
|
+
return source;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
function hasClassSelector(selector) {
|
|
2175
|
+
return /(?:^|[^\w-])\.[_a-z\u00A0-\uFFFF\\-]/i.test(selector);
|
|
2176
|
+
}
|
|
2177
|
+
function collectBareSelectorUserCss(source) {
|
|
2178
|
+
try {
|
|
2179
|
+
const root = postcss.parse(source);
|
|
2180
|
+
let changed = false;
|
|
2181
|
+
root.walkAtRules("import", (rule) => {
|
|
2182
|
+
rule.remove();
|
|
2183
|
+
changed = true;
|
|
2184
|
+
});
|
|
2185
|
+
root.walkRules((rule) => {
|
|
2186
|
+
if ((rule.selectors?.length ? rule.selectors : [rule.selector]).some((selector) => hasClassSelector(selector))) {
|
|
2187
|
+
rule.remove();
|
|
2188
|
+
changed = true;
|
|
2189
|
+
}
|
|
2190
|
+
});
|
|
2191
|
+
root.walkAtRules((rule) => {
|
|
2192
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) {
|
|
2193
|
+
rule.remove();
|
|
2194
|
+
changed = true;
|
|
2195
|
+
}
|
|
2196
|
+
});
|
|
2197
|
+
return changed ? root.toString() : source;
|
|
2198
|
+
} catch {
|
|
2199
|
+
return "";
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
function stripTailwindSourceMediaFragments(source) {
|
|
2203
|
+
let removedSourceMediaStart = false;
|
|
2204
|
+
return terminateTailwindSourceAtRulesBeforeNextDirective(removeTailwindSourceMediaBlocks(source)).split(/\r?\n/).filter((line) => {
|
|
2205
|
+
if (/^\s*@media\s+source\([^)]*\)\s*\{\s*$/.test(line)) {
|
|
2206
|
+
removedSourceMediaStart = true;
|
|
2207
|
+
return false;
|
|
2208
|
+
}
|
|
2209
|
+
if (/^\s*\}\s*\/\*\s*source\([^)]*\)\s*\*\/\s*$/.test(line)) return false;
|
|
2210
|
+
if (removedSourceMediaStart && /^\s*\}\s*$/.test(line)) {
|
|
2211
|
+
removedSourceMediaStart = false;
|
|
2212
|
+
return false;
|
|
2213
|
+
}
|
|
2214
|
+
return true;
|
|
2215
|
+
}).join("\n");
|
|
2216
|
+
}
|
|
2217
|
+
function stripLeadingTailwindSourceMediaCloseFragment(source) {
|
|
2218
|
+
return source.replace(/^\s*\}\s*(?:\n|$)/, "");
|
|
2219
|
+
}
|
|
2220
|
+
function stripUnmatchedTailwindSourceMediaCloseFragments(source) {
|
|
2221
|
+
try {
|
|
2222
|
+
postcss.parse(source);
|
|
2223
|
+
return source;
|
|
2224
|
+
} catch {
|
|
2225
|
+
return stripLeadingTailwindSourceMediaCloseFragment(source).replace(/\s*\}\s*$/, "");
|
|
2226
|
+
}
|
|
2227
|
+
}
|
|
2228
|
+
function splitUserCssLayerBlocks(source) {
|
|
2229
|
+
if (!source.includes("@layer")) return {
|
|
2230
|
+
layer: "",
|
|
2231
|
+
rest: source
|
|
2232
|
+
};
|
|
2233
|
+
try {
|
|
2234
|
+
const root = postcss.parse(source);
|
|
2235
|
+
const layerRoot = postcss.root();
|
|
2236
|
+
const restRoot = postcss.root();
|
|
2237
|
+
for (const node of root.nodes) (node.type === "atrule" && node.name === "layer" && node.nodes?.length ? layerRoot : restRoot).append(node.clone());
|
|
2238
|
+
return {
|
|
2239
|
+
layer: layerRoot.toString(),
|
|
2240
|
+
rest: restRoot.toString()
|
|
2241
|
+
};
|
|
2242
|
+
} catch {
|
|
2243
|
+
return {
|
|
2244
|
+
layer: source,
|
|
2245
|
+
rest: ""
|
|
2246
|
+
};
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
function hasUserCssLayerBlocks(source) {
|
|
2250
|
+
if (!source.includes("@layer")) return false;
|
|
2251
|
+
try {
|
|
2252
|
+
let hasLayerBlock = false;
|
|
2253
|
+
postcss.parse(source).walkAtRules("layer", (node) => {
|
|
2254
|
+
if (node.nodes?.length) hasLayerBlock = true;
|
|
2255
|
+
});
|
|
2256
|
+
return hasLayerBlock;
|
|
2257
|
+
} catch {
|
|
2258
|
+
return true;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
function collectUserLayerSelectors(source) {
|
|
2262
|
+
const selectors = /* @__PURE__ */ new Set();
|
|
2263
|
+
try {
|
|
2264
|
+
postcss.parse(source).walkRules((rule) => {
|
|
2265
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2266
|
+
const normalized = selector.trim();
|
|
2267
|
+
if (normalized) selectors.add(normalized);
|
|
2268
|
+
}
|
|
2269
|
+
});
|
|
2270
|
+
} catch {}
|
|
2271
|
+
return selectors;
|
|
2272
|
+
}
|
|
2273
|
+
function matchesUserLayerSelector(selector, userLayerSelector) {
|
|
2274
|
+
if (selector === userLayerSelector) return true;
|
|
2275
|
+
if (!selector.startsWith(userLayerSelector)) return false;
|
|
2276
|
+
const next = selector[userLayerSelector.length];
|
|
2277
|
+
return next === ":" || next === "[";
|
|
2278
|
+
}
|
|
2279
|
+
function extractGeneratedCssForUserLayerSelectors(css, userLayerSource) {
|
|
2280
|
+
const selectors = collectUserLayerSelectors(userLayerSource);
|
|
2281
|
+
if (selectors.size === 0) return {
|
|
2282
|
+
layer: "",
|
|
2283
|
+
rest: css
|
|
2284
|
+
};
|
|
2285
|
+
try {
|
|
2286
|
+
const root = postcss.parse(css);
|
|
2287
|
+
const layerRoot = postcss.root();
|
|
2288
|
+
const selectorList = [...selectors];
|
|
2289
|
+
root.walkRules((rule) => {
|
|
2290
|
+
if ((rule.selectors ?? [rule.selector]).some((selector) => selectorList.some((userSelector) => matchesUserLayerSelector(selector.trim(), userSelector)))) {
|
|
2291
|
+
layerRoot.append(rule.clone());
|
|
2292
|
+
rule.remove();
|
|
2293
|
+
}
|
|
2294
|
+
});
|
|
2295
|
+
return {
|
|
2296
|
+
layer: layerRoot.toString(),
|
|
2297
|
+
rest: root.toString()
|
|
2298
|
+
};
|
|
2299
|
+
} catch {
|
|
2300
|
+
return {
|
|
2301
|
+
layer: "",
|
|
2302
|
+
rest: css
|
|
2303
|
+
};
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
function normalizeGeneratedSelector(selector) {
|
|
2307
|
+
return selector.replace(/:not\(#\\#\)/g, "").trim();
|
|
2308
|
+
}
|
|
2309
|
+
function collectApplyOnlySourceSelectors(source) {
|
|
2310
|
+
const selectors = /* @__PURE__ */ new Set();
|
|
2311
|
+
try {
|
|
2312
|
+
postcss.parse(source).walkRules((rule) => {
|
|
2313
|
+
if (!rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) return;
|
|
2314
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
2315
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
2316
|
+
if (normalized) selectors.add(normalized);
|
|
2317
|
+
}
|
|
2318
|
+
});
|
|
2319
|
+
} catch {}
|
|
2320
|
+
return selectors;
|
|
2321
|
+
}
|
|
2322
|
+
function hasOnlyApplyBackedSourceRules(source) {
|
|
2323
|
+
let hasApplyRule = false;
|
|
2324
|
+
let hasNonApplyRule = false;
|
|
2325
|
+
try {
|
|
2326
|
+
postcss.parse(source).walkRules((rule) => {
|
|
2327
|
+
if (rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) hasApplyRule = true;
|
|
2328
|
+
else hasNonApplyRule = true;
|
|
2329
|
+
});
|
|
2330
|
+
} catch {
|
|
2331
|
+
return false;
|
|
2332
|
+
}
|
|
2333
|
+
return hasApplyRule && !hasNonApplyRule;
|
|
2334
|
+
}
|
|
2335
|
+
function removeCssComments(css) {
|
|
2336
|
+
return css.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
2337
|
+
}
|
|
2338
|
+
function isEmptyCustomVariantBlock(rule) {
|
|
2339
|
+
if (rule.name !== "custom-variant") return false;
|
|
2340
|
+
if (!/^[\w-]+$/.test(rule.params.trim())) return false;
|
|
2341
|
+
if (rule.nodes === void 0) return true;
|
|
2342
|
+
return rule.nodes.every((node) => node.type === "comment");
|
|
2343
|
+
}
|
|
2344
|
+
function normalizeEmptyTailwindCustomVariants(css) {
|
|
2345
|
+
if (!css.includes("@custom-variant")) return css;
|
|
2346
|
+
try {
|
|
2347
|
+
const root = postcss.parse(css);
|
|
2348
|
+
let changed = false;
|
|
2349
|
+
root.walkAtRules("custom-variant", (rule) => {
|
|
2350
|
+
if (!isEmptyCustomVariantBlock(rule)) return;
|
|
2351
|
+
rule.remove();
|
|
2352
|
+
changed = true;
|
|
2353
|
+
});
|
|
2354
|
+
return changed ? root.toString() : css;
|
|
2355
|
+
} catch {
|
|
2356
|
+
return css;
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
function filterApplyOnlyGeneratedCss(css, source, options = {}) {
|
|
2360
|
+
const selectors = collectApplyOnlySourceSelectors(source);
|
|
2361
|
+
if (selectors.size === 0) return css;
|
|
2362
|
+
const selectorList = [...selectors];
|
|
2363
|
+
const preserveVariables = options.preserveVariables !== false;
|
|
2364
|
+
try {
|
|
2365
|
+
const root = postcss.parse(css);
|
|
2366
|
+
root.walkRules((rule) => {
|
|
2367
|
+
const isApplySelector = (rule.selectors ?? [rule.selector]).some((selector) => {
|
|
2368
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
2369
|
+
return selectorList.some((sourceSelector) => {
|
|
2370
|
+
if (normalized === sourceSelector) return true;
|
|
2371
|
+
if (!normalized.startsWith(sourceSelector)) return false;
|
|
2372
|
+
const next = normalized[sourceSelector.length];
|
|
2373
|
+
return next === ":" || next === "[" || next === ".";
|
|
2374
|
+
});
|
|
2375
|
+
});
|
|
2376
|
+
const isVariableRule = rule.nodes?.some((node) => node.type === "decl" && node.prop.startsWith("--"));
|
|
2377
|
+
if (!isApplySelector && (!preserveVariables || !isVariableRule)) rule.remove();
|
|
2378
|
+
});
|
|
2379
|
+
root.walkAtRules((rule) => {
|
|
2380
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) rule.remove();
|
|
2381
|
+
});
|
|
2382
|
+
return removeCssComments(root.toString()).trim();
|
|
2383
|
+
} catch {
|
|
2384
|
+
return css;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
function shouldFilterApplyOnlyGeneratedCss(_majorVersion, target, source, options) {
|
|
2388
|
+
return (target === "weapp" || target === "web") && hasTailwindApplyDirective(source) && !hasTailwindRootDirectives(source) && !options.hasGeneratedCss && !options.hasGeneratedMarkers && collectApplyOnlySourceSelectors(source).size > 0 && hasOnlyApplyBackedSourceRules(source);
|
|
2389
|
+
}
|
|
2390
|
+
async function transformGeneratorUserCss(source, options) {
|
|
2391
|
+
if (source.trim().length === 0) return "";
|
|
2392
|
+
if (options.processed) return stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(removeTailwindV4GeneratorAtRules(options.generatorTarget === "weapp" ? removeTailwindV4GeneratedUserCssArtifacts(removeProcessedMiniProgramUnsupportedCss(source, {
|
|
2393
|
+
...options.generatorStyleOptions,
|
|
2394
|
+
...options.cssUserHandlerOptions
|
|
2395
|
+
})) : source)));
|
|
2396
|
+
const cleanedSource = removeTailwindSourceDirectives(removeTailwindV4GeneratorAtRules(stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(source))), { importFallback: options.importFallback });
|
|
2397
|
+
if (cleanedSource.trim().length === 0) return "";
|
|
2398
|
+
const userSource = stripUnmatchedTailwindSourceMediaCloseFragments(removeTailwindApplyAtRules(removeTailwindSourceDirectives(stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(options.generatorTarget === "weapp" ? removeTailwindV4GeneratedUserCssArtifacts(removeUnsupportedMiniProgramAtRules(unwrapMiniProgramCascadeLayers(cleanedSource))) : cleanedSource)), { importFallback: options.importFallback })));
|
|
2399
|
+
if (userSource.trim().length === 0) return "";
|
|
2400
|
+
if (isCommentOnlyCss(userSource)) return userSource;
|
|
2401
|
+
if (options.generatorTarget !== "weapp") return userSource;
|
|
2402
|
+
const { css } = await options.styleHandler(userSource, {
|
|
2403
|
+
...options.generatorStyleOptions,
|
|
2404
|
+
...options.cssUserHandlerOptions
|
|
2405
|
+
});
|
|
2406
|
+
const transformedCss = removeTailwindV4GeneratedUserCssArtifacts(removeUnsupportedMiniProgramAtRules(css));
|
|
2407
|
+
const bareSelectorUserCss = collectBareSelectorUserCss(userSource);
|
|
2408
|
+
const missingBareSelectorUserCss = bareSelectorUserCss.trim().length > 0 ? filterExistingCssRules(transformedCss, bareSelectorUserCss) : "";
|
|
2409
|
+
return missingBareSelectorUserCss.trim().length > 0 ? `${transformedCss}\n${missingBareSelectorUserCss}` : transformedCss;
|
|
2410
|
+
}
|
|
2411
|
+
//#endregion
|
|
1858
2412
|
//#region src/utils/options.ts
|
|
1859
2413
|
function resolveBooleanObjectOption(value, enabledValue) {
|
|
1860
2414
|
if (!value) return false;
|
|
@@ -2193,7 +2747,7 @@ function normalizeTailwindV4CssSources(cssSources, packageName, projectRoot) {
|
|
|
2193
2747
|
};
|
|
2194
2748
|
}
|
|
2195
2749
|
const configBase = base ?? projectRoot ?? process.cwd();
|
|
2196
|
-
const css = normalizeTailwindV4CssPackageImports(normalizeTailwindConfigDirectives(cssSource.css, configBase), packageName);
|
|
2750
|
+
const css = normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeTailwindConfigDirectives(cssSource.css, configBase)), packageName);
|
|
2197
2751
|
if (css === cssSource.css && file === cssSource.file && base === cssSource.base) return cssSource;
|
|
2198
2752
|
changed = true;
|
|
2199
2753
|
return {
|
|
@@ -2218,7 +2772,7 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
2218
2772
|
const base = path.dirname(file);
|
|
2219
2773
|
const rawCss = readFileSync(file, "utf8");
|
|
2220
2774
|
const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
|
|
2221
|
-
const css = normalizeTailwindV4CssPackageImports(normalizeConfigDirective(rawCss, entrySource?.config && existsSync(entrySource.config) ? entrySource.config : entrySource?.configRequest && !path.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? path.resolve(base, entrySource.configRequest) : entrySource?.config), packageName);
|
|
2775
|
+
const css = normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeConfigDirective(rawCss, entrySource?.config && existsSync(entrySource.config) ? entrySource.config : entrySource?.configRequest && !path.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? path.resolve(base, entrySource.configRequest) : entrySource?.config)), packageName);
|
|
2222
2776
|
cssSources.push({
|
|
2223
2777
|
file,
|
|
2224
2778
|
base,
|
|
@@ -2234,7 +2788,7 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
2234
2788
|
function normalizeTailwindV4SourceOptions(options) {
|
|
2235
2789
|
if (!options) return options;
|
|
2236
2790
|
const cssBase = resolveBase(options.base, options.projectRoot ?? options.cwd ?? process.cwd());
|
|
2237
|
-
const css = options.css === void 0 ? void 0 : normalizeTailwindV4CssPackageImports(normalizeTailwindConfigDirectives(options.css, cssBase), options.packageName);
|
|
2791
|
+
const css = options.css === void 0 ? void 0 : normalizeTailwindV4CssPackageImports(normalizeEmptyTailwindCustomVariants(normalizeTailwindConfigDirectives(options.css, cssBase)), options.packageName);
|
|
2238
2792
|
const entrySources = normalizeTailwindV4CssEntrySources(options.cssEntries, options.packageName);
|
|
2239
2793
|
const configuredCssSources = filterTailwindV4CssSourceRoots(options.cssSources);
|
|
2240
2794
|
const cssSources = normalizeTailwindV4CssSources(configuredCssSources || entrySources?.cssSources ? [...configuredCssSources ?? [], ...entrySources?.cssSources ?? []] : void 0, options.packageName, options.projectRoot);
|
|
@@ -2313,4 +2867,4 @@ async function resolveTailwindV4SourceFromRuntime(runtime) {
|
|
|
2313
2867
|
return resolveTailwindV4Source$1(resolveTailwindV4SourceOptionsFromRuntime(runtime));
|
|
2314
2868
|
}
|
|
2315
2869
|
//#endregion
|
|
2316
|
-
export {
|
|
2870
|
+
export { hasTailwindGeneratedCssMarkers as $, stripTailwindSourceMediaFragments as A, resolveValidTailwindV4Candidates$1 as At, hasTailwindNonRootGenerationDirectives as B, isCommentOnlyCss as C, collectCssInlineSourceCandidates as Ct, removeTailwindV4GeneratorAtRules as D, inferGeneratorTargetFromEnv as Dt, removeTailwindV4GeneratedUserCssArtifacts as E, omitUndefined as Et, pruneMiniProgramGeneratedCss as F, normalizeTailwindSourceForGenerator as G, hasTailwindSourceDirectives as H, removeUnsupportedMiniProgramAtRules as I, resolveCssEntrySource as J, parseImportRequest as K, stripMiniProgramCssSpecificityPlaceholders as L, transformGeneratorUserCss as M, finalizeMiniProgramCss as N, shouldFilterApplyOnlyGeneratedCss as O, shouldUseUniAppViteWebViewGeneratorTarget as Ot, hasMiniProgramCssSpecificityPlaceholders as P, hasTailwindGeneratedCss as Q, hasLocalCssImport as R, hasUserCssLayerBlocks as S, toPosixPath as St, removeMiniProgramHoverSelectors as T, filterUnsupportedMiniProgramTailwindV4Candidates as Tt, normalizeTailwindConfigDirectives as U, hasTailwindRootDirectives as V, normalizeTailwindSourceDirectives as W, VITE_MARKER_RE as X, GENERATOR_PLACEHOLDER_MARKER_RE as Y, createCssAppend as Z, resolveTailwindcssOptions as _, normalizeLegacyContentEntries as _t, filterTailwindV4CssSourceRoots as a, stripTailwindBanners as at, extractGeneratedCssForUserLayerSelectors as b, resolveSourceScanPath as bt, groupCssEntriesByBase as c, createTailwindV4Engine$1 as ct, normalizeCssEntries as d, transformTailwindV4CssToWeapp as dt, splitGeneratorPlaceholderCssBySourceOrder as et, findNearestPackageRoot as f, FULL_SOURCE_SCAN_EXTENSION_RE as ft, normalizeTailwindcssRuntimeOptions as g, isFileMatchedByTailwindSourceEntries as gt, normalizeExtendLengthUnits as h, expandTailwindSourceEntries as ht, resolveTailwindV4SourceOptionsFromRuntime as i, stripTailwindBanner as it, stripUnmatchedTailwindSourceMediaCloseFragments as j, splitUserCssLayerBlocks as k, loadTailwindV4DesignSystem as kt, guessBasedirFromEntries as l, getTailwindV4IncrementalGenerateCacheStats as lt, findWorkspaceRoot as m, createTailwindSourceEntryMatcher as mt, resolveTailwindV4SourceFromRuntime as n, splitTailwindV4GeneratedCssBySourceOrder as nt, hasConfiguredTailwindV4CssRoots as o, normalizeConfigDirective as ot, findWorkspacePackageDir as p, FULL_SOURCE_SCAN_PATTERN as pt, removeTailwindSourceDirectives as q, resolveTailwindV4SourceFromRuntimeOptions as r, stripGeneratorPlaceholderMarkers as rt, upsertTailwindV4CssSource as s, prependConfigDirective as st, resolveTailwindV4Source$1 as t, splitTailwindGeneratedCssByBanner as tt, isTailwindV4CssEntry as u, transformTailwindV4CssByTarget as ut, normalizeStringListOption as v, parseConfigParam as vt, normalizeEmptyTailwindCustomVariants as w, resolveCssMacroTailwindV4Source as wt, filterApplyOnlyGeneratedCss as x, resolveTailwindV4CssSourceBase as xt, resolveBooleanObjectOption as y, resolveCssSourceEntries as yt, hasTailwindApplyDirective as z };
|