@weapp-tailwindcss/postcss 3.2.0 → 3.2.2
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/compat/color-mix.d.ts +4 -0
- package/dist/compat/tailwindcss-v4/variables.d.ts +2 -0
- package/dist/compat/tailwindcss-v4.d.ts +1 -1
- package/dist/compat/uni-app-x-uvue/theme.d.ts +4 -0
- package/dist/index.cjs +4282 -2462
- package/dist/index.d.ts +1 -1
- package/dist/index.js +122 -7
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type PostcssAppType, type PostcssStyleBranch, type PostcssStyleBranchProfile, resolvePostcssStyleBranch, type ResolvePostcssStyleBranchOptions, resolvePostcssStyleBranchProfile, } from './branches/index.js';
|
|
2
|
-
export { type DynamicColorMixAlphaProtection, type DynamicColorMixAlphaProtectionOptions, type ModernColorValueNormalization, normalizeModernColorValue, protectDynamicColorMixAlpha, } from './compat/color-mix.js';
|
|
2
|
+
export { type DynamicColorMixAlphaProtection, type DynamicColorMixAlphaProtectionOptions, type ModernColorValueNormalization, normalizeModernColorValue, protectDynamicColorMixAlpha, protectDynamicVarFallbacks, } from './compat/color-mix.js';
|
|
3
3
|
export { consumeCascadeLayers, finalizeMiniProgramCss, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, normalizeMiniProgramGeneratedCssForPostcss, pruneMiniProgramGeneratedCss, removeEmptyAtRules, removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, stripMiniProgramCssSpecificityPlaceholders, unwrapUnsupportedCascadeLayers, } from './compat/mini-program-css/index.js';
|
|
4
4
|
export { normalizeMiniProgramPrefixedDeclaration, removeUnsupportedMiniProgramPrefixedAtRule, } from './compat/mini-program-prefixes.js';
|
|
5
5
|
export { convertTailwindcssRpxDeclarationsToRem, convertTailwindcssRpxDeclarationToRem, convertTailwindcssRpxValueToRem, normalizeTailwindcssRpxDeclaration, normalizeTailwindcssRpxDeclarations, normalizeTailwindcssWebRpxDeclarations, type TailwindcssRpxToRemOptions, } from './compat/tailwindcss-rpx.js';
|
package/dist/index.js
CHANGED
|
@@ -282,6 +282,7 @@ const GRADIENT_BACKGROUND_RE = /^(linear|radial|conic)-gradient\(/i;
|
|
|
282
282
|
const GRADIENT_STOPS_VAR_RE = /^(?:linear|radial|conic)-gradient\(\s*var\(\s*--tw-gradient-stops\b/i;
|
|
283
283
|
const SIMPLE_CLASS_SELECTOR_RE = /^\.([_a-z\u00A0-\uFFFF\\-][\w\u00A0-\uFFFF\\-]*)$/i;
|
|
284
284
|
const COLOR_VAR_RE = /^var\(\s*(--color-[\w-]+)\s*\)$/i;
|
|
285
|
+
const TAILWIND_THEME_VARIABLE_RE = /^--(?:animate|aspect|blur|breakpoint|color|container|drop-shadow|ease|font|inset-shadow|leading|perspective|radius|shadow|spacing|text|tracking)(?:-|$)/;
|
|
285
286
|
const GRADIENT_DIRECTION_CLASS_RE = /^(?:-?bg-linear|bg-gradient-to-|-?bg-conic|bg-radial)/;
|
|
286
287
|
const RADIUS_VALUE_RE = /\b([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\s*(r?px)\b/gi;
|
|
287
288
|
const SCIENTIFIC_NOTATION_RE = /e/i;
|
|
@@ -306,6 +307,9 @@ const DEFAULT_VARIABLE_SCOPE_SELECTORS = /* @__PURE__ */ new Set([
|
|
|
306
307
|
function isTailwindcssV4(options) {
|
|
307
308
|
return options?.majorVersion === 4;
|
|
308
309
|
}
|
|
310
|
+
function isTailwindcssV4ThemeVariable(property) {
|
|
311
|
+
return property.startsWith("--tw-") || TAILWIND_THEME_VARIABLE_RE.test(property);
|
|
312
|
+
}
|
|
309
313
|
function testIfRootHostForV4(node) {
|
|
310
314
|
return node.type === "rule" && node.selector.includes(":root") && node.selector.includes(":host");
|
|
311
315
|
}
|
|
@@ -838,7 +842,7 @@ function resolveNodes(nodes, variables, resolving) {
|
|
|
838
842
|
const configured = variables.get(variable.value);
|
|
839
843
|
let replacement;
|
|
840
844
|
if (configured !== void 0 && !resolving.has(variable.value)) replacement = resolveThemeValue(configured, variables, /* @__PURE__ */ new Set([...resolving, variable.value]));
|
|
841
|
-
else if (variable.value
|
|
845
|
+
else if (fallback && isTailwindcssV4ThemeVariable(variable.value)) replacement = resolveThemeValue(fallback, variables, resolving);
|
|
842
846
|
if (replacement === void 0) {
|
|
843
847
|
resolveNodes(node.nodes, variables, resolving);
|
|
844
848
|
continue;
|
|
@@ -854,6 +858,36 @@ function resolveThemeValue(value, variables, resolving = /* @__PURE__ */ new Set
|
|
|
854
858
|
resolveNodes(parsed.nodes, variables, resolving);
|
|
855
859
|
return parsed.toString();
|
|
856
860
|
}
|
|
861
|
+
function getUnresolvedAuthorVariableFallback(value) {
|
|
862
|
+
const nodes = valueParser(value).nodes.filter((node) => node.type !== "space" && node.type !== "comment");
|
|
863
|
+
const variable = nodes.length === 1 ? nodes[0] : void 0;
|
|
864
|
+
if (variable?.type !== "function" || variable.value.toLowerCase() !== "var") return;
|
|
865
|
+
const variableNode = variable.nodes.find((node) => node.type === "word");
|
|
866
|
+
const commaIndex = variable.nodes.findIndex((node) => node.type === "div" && node.value === ",");
|
|
867
|
+
if (variableNode?.type !== "word" || !variableNode.value.startsWith("--") || isTailwindcssV4ThemeVariable(variableNode.value) || variableNode.value.startsWith("--default-") || commaIndex < 0) return;
|
|
868
|
+
const fallback = valueParser.stringify(variable.nodes.slice(commaIndex + 1)).trim();
|
|
869
|
+
if (!fallback) return;
|
|
870
|
+
return {
|
|
871
|
+
name: variableNode.value,
|
|
872
|
+
fallback
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* HBuilderX 不接受带 fallback 的 var() 声明,拆成静态 fallback 与动态变量两条声明。
|
|
877
|
+
*/
|
|
878
|
+
function splitUnresolvedAuthorVariableFallbacks(root, variables) {
|
|
879
|
+
if (typeof root.walkDecls !== "function") return false;
|
|
880
|
+
let changed = false;
|
|
881
|
+
root.walkDecls((decl) => {
|
|
882
|
+
if (decl.prop.startsWith("--")) return;
|
|
883
|
+
const unresolved = getUnresolvedAuthorVariableFallback(decl.value);
|
|
884
|
+
if (!unresolved || variables.has(unresolved.name)) return;
|
|
885
|
+
decl.parent?.insertBefore(decl, decl.clone({ value: unresolved.fallback }));
|
|
886
|
+
decl.value = `var(${unresolved.name})`;
|
|
887
|
+
changed = true;
|
|
888
|
+
});
|
|
889
|
+
return changed;
|
|
890
|
+
}
|
|
857
891
|
/**
|
|
858
892
|
* UVUE 不支持 Tailwind 的混合根选择器,因此先把根作用域中的静态主题 token
|
|
859
893
|
* 内联到实际 utility,再移除仅用于变量承载的系统规则。
|
|
@@ -875,6 +909,7 @@ function consumeUniAppXSystemRootTheme(root, customPropertyValues) {
|
|
|
875
909
|
decl.value = resolveThemeValue(decl.value, variables);
|
|
876
910
|
});
|
|
877
911
|
}
|
|
912
|
+
splitUnresolvedAuthorVariableFallbacks(root, variables);
|
|
878
913
|
for (const rule of carrierRules) rule.remove();
|
|
879
914
|
}
|
|
880
915
|
//#endregion
|
|
@@ -882,6 +917,7 @@ function consumeUniAppXSystemRootTheme(root, customPropertyValues) {
|
|
|
882
917
|
const ALLOWED_DISPLAY_VALUES = /* @__PURE__ */ new Set(["flex", "none"]);
|
|
883
918
|
const FALLBACK_CLASS_RE = /\.((?:\\.|[\w-])+)/g;
|
|
884
919
|
const IMPORTANT_SUFFIX_RE = /\s*!important$/i;
|
|
920
|
+
const TRANSFORM_PROPERTIES = /* @__PURE__ */ new Set(["transform", "-webkit-transform"]);
|
|
885
921
|
function isUniAppXUvueTarget(options) {
|
|
886
922
|
return Boolean(options?.uniAppX) && options?.uniAppXCssTarget === "uvue";
|
|
887
923
|
}
|
|
@@ -891,6 +927,30 @@ function normalizeUnsupportedMode(mode) {
|
|
|
891
927
|
function normalizeValue(value) {
|
|
892
928
|
return value.trim().toLowerCase().replace(IMPORTANT_SUFFIX_RE, "");
|
|
893
929
|
}
|
|
930
|
+
function hasCalcFunction(value) {
|
|
931
|
+
const parsed = valueParser(value);
|
|
932
|
+
let found = false;
|
|
933
|
+
parsed.walk((node) => {
|
|
934
|
+
if (node.type === "function" && node.value.toLowerCase() === "calc") found = true;
|
|
935
|
+
});
|
|
936
|
+
return found;
|
|
937
|
+
}
|
|
938
|
+
function normalizeUniAppXTransformValue(value) {
|
|
939
|
+
if (!value.toLowerCase().includes("translate(") || !value.includes(",")) return value;
|
|
940
|
+
const parsed = valueParser(value);
|
|
941
|
+
let changed = false;
|
|
942
|
+
parsed.walk((node) => {
|
|
943
|
+
if (node.type !== "function" || node.value.toLowerCase() !== "translate") return;
|
|
944
|
+
for (const child of node.nodes) {
|
|
945
|
+
if (child.type !== "div" || child.value !== ",") continue;
|
|
946
|
+
child.value = " ";
|
|
947
|
+
child.before = "";
|
|
948
|
+
child.after = "";
|
|
949
|
+
changed = true;
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
return changed ? parsed.toString() : value;
|
|
953
|
+
}
|
|
894
954
|
function getSourceFile(rule, result) {
|
|
895
955
|
return rule.source?.input.from ?? result.opts.from ?? "unknown source";
|
|
896
956
|
}
|
|
@@ -919,6 +979,7 @@ function hasOnlyClassSelectors(rule) {
|
|
|
919
979
|
function getUnsupportedDeclarationReason(prop, value) {
|
|
920
980
|
const normalizedProp = prop.trim().toLowerCase();
|
|
921
981
|
const normalizedValue = normalizeValue(value);
|
|
982
|
+
if (hasCalcFunction(value)) return `${normalizedProp}: ${value}`;
|
|
922
983
|
if (normalizedProp === "display" && !ALLOWED_DISPLAY_VALUES.has(normalizedValue)) return `${normalizedProp}: ${value}`;
|
|
923
984
|
if (normalizedProp === "min-height" && normalizedValue === "100vh") return `${normalizedProp}: ${value}`;
|
|
924
985
|
if (normalizedProp === "grid-template-columns" || normalizedProp === "grid-template-rows" || normalizedProp === "grid-auto-columns" || normalizedProp === "grid-auto-rows" || normalizedProp === "grid-auto-flow") return `${normalizedProp}: ${value}`;
|
|
@@ -943,6 +1004,7 @@ function applyUniAppXUvueCompatibility(result, options) {
|
|
|
943
1004
|
if (root.type === "root" && Array.isArray(root.nodes) && typeof root.walkDecls === "function") {
|
|
944
1005
|
root.walkDecls((decl) => {
|
|
945
1006
|
normalizeTailwindcssV4Declaration(decl);
|
|
1007
|
+
if (TRANSFORM_PROPERTIES.has(decl.prop.toLowerCase())) decl.value = normalizeUniAppXTransformValue(decl.value);
|
|
946
1008
|
});
|
|
947
1009
|
const calcResult = postcss$1([postcssCalc()]).process(root, result.opts).sync();
|
|
948
1010
|
root = calcResult.root;
|
|
@@ -1291,6 +1353,51 @@ function tryResolveColorMix(node, customPropertyValues) {
|
|
|
1291
1353
|
}
|
|
1292
1354
|
//#endregion
|
|
1293
1355
|
//#region src/compat/color-mix.ts
|
|
1356
|
+
const DYNAMIC_VAR_FALLBACK_PLACEHOLDER_PREFIX = "__weapp_tw_var_fallback_";
|
|
1357
|
+
function getStandaloneDynamicVarWithFallback(value) {
|
|
1358
|
+
const nodes = valueParser(value).nodes.filter((node) => node.type !== "space" && node.type !== "comment");
|
|
1359
|
+
const variable = nodes.length === 1 ? nodes[0] : void 0;
|
|
1360
|
+
const property = variable?.type === "function" ? variable.nodes.find((node) => node.type === "word" && node.value.startsWith("--")) : void 0;
|
|
1361
|
+
if (variable?.type !== "function" || variable.value.toLowerCase() !== "var" || property?.type !== "word" || isTailwindcssV4ThemeVariable(property.value) || !variable.nodes.some((node) => node.type === "div" && node.value === ",")) return;
|
|
1362
|
+
return variable;
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* 保护带 fallback 的作者 CSS 变量,避免兼容插件把它错误静态化。
|
|
1366
|
+
*/
|
|
1367
|
+
function protectDynamicVarFallbacks(css) {
|
|
1368
|
+
if (!css.includes("var(") || !css.includes(",")) return {
|
|
1369
|
+
css,
|
|
1370
|
+
restore: (value) => value
|
|
1371
|
+
};
|
|
1372
|
+
const replacements = /* @__PURE__ */ new Map();
|
|
1373
|
+
let root;
|
|
1374
|
+
try {
|
|
1375
|
+
root = postcss$1.parse(css);
|
|
1376
|
+
} catch {
|
|
1377
|
+
return {
|
|
1378
|
+
css,
|
|
1379
|
+
restore: (value) => value
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
root.walkDecls((decl) => {
|
|
1383
|
+
if (!getStandaloneDynamicVarWithFallback(decl.value)) return;
|
|
1384
|
+
const placeholder = `${DYNAMIC_VAR_FALLBACK_PLACEHOLDER_PREFIX}${replacements.size}__`;
|
|
1385
|
+
replacements.set(placeholder, decl.value);
|
|
1386
|
+
decl.value = placeholder;
|
|
1387
|
+
});
|
|
1388
|
+
if (replacements.size === 0) return {
|
|
1389
|
+
css,
|
|
1390
|
+
restore: (value) => value
|
|
1391
|
+
};
|
|
1392
|
+
return {
|
|
1393
|
+
css: root.toString(),
|
|
1394
|
+
restore(value) {
|
|
1395
|
+
let restored = value;
|
|
1396
|
+
for (const [placeholder, replacement] of replacements) restored = restored.split(placeholder).join(replacement);
|
|
1397
|
+
return restored;
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1294
1401
|
function normalizeModernColorValue(value, customPropertyValues = /* @__PURE__ */ new Map()) {
|
|
1295
1402
|
if (!hasUnsupportedModernColorFunction(value)) return {
|
|
1296
1403
|
value,
|
|
@@ -6337,9 +6444,14 @@ function createStyleHandler(options) {
|
|
|
6337
6444
|
}
|
|
6338
6445
|
function processSource(rawSource, root, cloneOutput, opt) {
|
|
6339
6446
|
const resolvedOptions = resolver.resolve(opt);
|
|
6340
|
-
const
|
|
6341
|
-
const
|
|
6342
|
-
|
|
6447
|
+
const isUniAppXFramework = resolvedOptions.appType === "uni-app-x";
|
|
6448
|
+
const protectedVarFallbacks = resolvedOptions.uniAppX || isUniAppXFramework ? protectDynamicVarFallbacks(rawSource) : {
|
|
6449
|
+
css: rawSource,
|
|
6450
|
+
restore: (value) => value
|
|
6451
|
+
};
|
|
6452
|
+
const protectedColorMix = resolvedOptions.majorVersion === 4 ? protectDynamicColorMixAlpha(protectedVarFallbacks.css) : void 0;
|
|
6453
|
+
const source = protectedColorMix?.css ?? protectedVarFallbacks.css;
|
|
6454
|
+
const processInput = source !== rawSource ? source : root?.clone() ?? source;
|
|
6343
6455
|
let signal;
|
|
6344
6456
|
if (!hasUserPlugins) try {
|
|
6345
6457
|
signal = probeFeatures(source);
|
|
@@ -6366,8 +6478,8 @@ function createStyleHandler(options) {
|
|
|
6366
6478
|
finalResult = nextResult;
|
|
6367
6479
|
}
|
|
6368
6480
|
}
|
|
6369
|
-
if (protectedColorMix) {
|
|
6370
|
-
const restoredCss =
|
|
6481
|
+
if (protectedColorMix || protectedVarFallbacks.css !== rawSource) {
|
|
6482
|
+
const restoredCss = protectedVarFallbacks.restore(protectedColorMix?.restore(finalResult.css) ?? finalResult.css);
|
|
6371
6483
|
if (restoredCss !== finalResult.css) {
|
|
6372
6484
|
const nextResult = finalResult.root.clone().toResult(finalResult.opts);
|
|
6373
6485
|
nextResult.css = restoredCss;
|
|
@@ -6376,6 +6488,9 @@ function createStyleHandler(options) {
|
|
|
6376
6488
|
finalResult = nextResult;
|
|
6377
6489
|
}
|
|
6378
6490
|
}
|
|
6491
|
+
if (resolvedOptions.uniAppX && (resolvedOptions.uniAppXCssTarget === "uvue" || !isUniAppXFramework) && finalResult.root) {
|
|
6492
|
+
if (splitUnresolvedAuthorVariableFallbacks(finalResult.root, /* @__PURE__ */ new Map())) finalResult.css = finalResult.root.toString();
|
|
6493
|
+
}
|
|
6379
6494
|
resultCache.set(cacheKey, finalResult);
|
|
6380
6495
|
return cloneOutput ? cloneResult(finalResult) : finalResult;
|
|
6381
6496
|
});
|
|
@@ -6888,4 +7003,4 @@ function mergeMiniProgramThemeScopeRuleDeclarations(baseCss, css) {
|
|
|
6888
7003
|
}
|
|
6889
7004
|
}
|
|
6890
7005
|
//#endregion
|
|
6891
|
-
export { CSS_MACRO_POSTCSS_PLUGIN_NAME, CSS_MACRO_STYLE_OPTIONS_MARKER, FULL_SOURCE_SCAN_EXTENSIONS, FULL_SOURCE_SCAN_EXTENSION_RE, FULL_SOURCE_SCAN_PATTERN, analyzeTailwindCssDirectives, cleanLocalCssImportWrapperTailwindDirectives, cleanLocalCssImportWrapperTailwindDirectivesRoot, collectApplyOnlyCssSelectors, collectApplyOnlyCssSelectorsRoot, collectCssImportRequestsRoot, collectCssInlineSourceCandidates, compileCssMacroConditionalComments, consumeCascadeLayers, containsCssAfterMinify, convertTailwindcssRpxDeclarationToRem, convertTailwindcssRpxDeclarationsToRem, convertTailwindcssRpxValueToRem, createCssSourceOrderAppend, createFallbackPlaceholderReplacer, createInjectPreflight, createPostcssStyleTargetProfile, createSourceScanPattern, createStyleHandler, createStylePipeline, createTailwindSourceEntryMatcher, createWeappTailwindcssPostcssPlugin, creator as cssMacroPostcssPlugin, dedupeCoveredCssRules, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, filterApplyOnlyGeneratedCss, filterApplyOnlyGeneratedCssRoot, filterExistingCssRules, finalizeMiniProgramCss, getPostcssPluginName, hasCssMacroStyleOptions, hasCssMacroTailwindV4CustomVariantConditionalComments, hasCssMacroTailwindV4Directive, hasCssMacroTailwindV4InternalAtRules, hasCssMacroTailwindV4Source, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, internalCssSelectorReplacer, isFileExcludedByTailwindSourceEntries, isFileMatchedByTailwindSourceEntries, isLocalCssImportRequest, isMiniProgramLocalCssImportRequest, isPureLocalCssImportWrapper, isPureLocalCssImportWrapperRoot, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssImportRequest, isTailwindCssPackageJsonImportRequest, isWeappTailwindcssImportRequest, mergeCoveredCssRuleDeclarations, mergeMiniProgramPreflightRuleDeclarations, mergeMiniProgramThemeScopeRuleDeclarations, normalizeLegacyContentEntries, normalizeMiniProgramGeneratedCssForPostcss, normalizeMiniProgramPrefixedDeclaration, normalizeModernColorValue, normalizeOutputImportRequest, normalizeTailwindCssImportRequest, normalizeTailwindcssRpxDeclaration, normalizeTailwindcssRpxDeclarations, normalizeTailwindcssV4InfinityCalcCss, normalizeTailwindcssWebRpxDeclarations, normalizeWebCssCompatOptions, parseConfigParam, parseSourceFileParam, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, postcss, postcssHtmlTransform, prefixLocalCssImportsWithWebpackIgnoreRoot, protectDynamicColorMixAlpha, pruneMiniProgramGeneratedCss, removeEmptyAtRules, removeMatchingLocalCssImports, removeMatchingLocalCssImportsRoot, removeTailwindPostcssPlugins, removeTailwindSourceDirectivesRoot, removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, removeUnsupportedMiniProgramCssImportsRoot, removeUnsupportedMiniProgramPrefixedAtRule, resolveCssSourceEntries, resolveFilteredPostcssConfig, resolvePostcssConfig, resolvePostcssFrameworkProfile, resolvePostcssFrameworkStrategy, resolvePostcssStyleBranch, resolvePostcssStyleBranchProfile, resolvePostcssStyleTarget, resolveSourceScanPath, resolveTailwindSourceEntry, restoreLocalCssImports, rewriteLocalCssImportRequestsForOutput, rewriteLocalCssImportRequestsForOutputRoot, splitLocalCssImports, splitLocalCssImportsRoot, stripMiniProgramCssSpecificityPlaceholders, toPosixPath, transformCssMacroCss, transformCssMacroTailwindV4Source, transformWebCssCompat, transformWebCssSafeSelectors, unitConversionComposeRules, unitConversionPresets, unwrapUnsupportedCascadeLayers, withCssMacroStyleOptions };
|
|
7006
|
+
export { CSS_MACRO_POSTCSS_PLUGIN_NAME, CSS_MACRO_STYLE_OPTIONS_MARKER, FULL_SOURCE_SCAN_EXTENSIONS, FULL_SOURCE_SCAN_EXTENSION_RE, FULL_SOURCE_SCAN_PATTERN, analyzeTailwindCssDirectives, cleanLocalCssImportWrapperTailwindDirectives, cleanLocalCssImportWrapperTailwindDirectivesRoot, collectApplyOnlyCssSelectors, collectApplyOnlyCssSelectorsRoot, collectCssImportRequestsRoot, collectCssInlineSourceCandidates, compileCssMacroConditionalComments, consumeCascadeLayers, containsCssAfterMinify, convertTailwindcssRpxDeclarationToRem, convertTailwindcssRpxDeclarationsToRem, convertTailwindcssRpxValueToRem, createCssSourceOrderAppend, createFallbackPlaceholderReplacer, createInjectPreflight, createPostcssStyleTargetProfile, createSourceScanPattern, createStyleHandler, createStylePipeline, createTailwindSourceEntryMatcher, createWeappTailwindcssPostcssPlugin, creator as cssMacroPostcssPlugin, dedupeCoveredCssRules, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, filterApplyOnlyGeneratedCss, filterApplyOnlyGeneratedCssRoot, filterExistingCssRules, finalizeMiniProgramCss, getPostcssPluginName, hasCssMacroStyleOptions, hasCssMacroTailwindV4CustomVariantConditionalComments, hasCssMacroTailwindV4Directive, hasCssMacroTailwindV4InternalAtRules, hasCssMacroTailwindV4Source, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, internalCssSelectorReplacer, isFileExcludedByTailwindSourceEntries, isFileMatchedByTailwindSourceEntries, isLocalCssImportRequest, isMiniProgramLocalCssImportRequest, isPureLocalCssImportWrapper, isPureLocalCssImportWrapperRoot, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssImportRequest, isTailwindCssPackageJsonImportRequest, isWeappTailwindcssImportRequest, mergeCoveredCssRuleDeclarations, mergeMiniProgramPreflightRuleDeclarations, mergeMiniProgramThemeScopeRuleDeclarations, normalizeLegacyContentEntries, normalizeMiniProgramGeneratedCssForPostcss, normalizeMiniProgramPrefixedDeclaration, normalizeModernColorValue, normalizeOutputImportRequest, normalizeTailwindCssImportRequest, normalizeTailwindcssRpxDeclaration, normalizeTailwindcssRpxDeclarations, normalizeTailwindcssV4InfinityCalcCss, normalizeTailwindcssWebRpxDeclarations, normalizeWebCssCompatOptions, parseConfigParam, parseSourceFileParam, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, postcss, postcssHtmlTransform, prefixLocalCssImportsWithWebpackIgnoreRoot, protectDynamicColorMixAlpha, protectDynamicVarFallbacks, pruneMiniProgramGeneratedCss, removeEmptyAtRules, removeMatchingLocalCssImports, removeMatchingLocalCssImportsRoot, removeTailwindPostcssPlugins, removeTailwindSourceDirectivesRoot, removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, removeUnsupportedMiniProgramCssImportsRoot, removeUnsupportedMiniProgramPrefixedAtRule, resolveCssSourceEntries, resolveFilteredPostcssConfig, resolvePostcssConfig, resolvePostcssFrameworkProfile, resolvePostcssFrameworkStrategy, resolvePostcssStyleBranch, resolvePostcssStyleBranchProfile, resolvePostcssStyleTarget, resolveSourceScanPath, resolveTailwindSourceEntry, restoreLocalCssImports, rewriteLocalCssImportRequestsForOutput, rewriteLocalCssImportRequestsForOutputRoot, splitLocalCssImports, splitLocalCssImportsRoot, stripMiniProgramCssSpecificityPlaceholders, toPosixPath, transformCssMacroCss, transformCssMacroTailwindV4Source, transformWebCssCompat, transformWebCssSafeSelectors, unitConversionComposeRules, unitConversionPresets, unwrapUnsupportedCascadeLayers, withCssMacroStyleOptions };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/postcss",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.2",
|
|
5
5
|
"description": "@weapp-tailwindcss/postcss",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"node": "^20.19.0 || >=22.12.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@csstools/css-color-parser": "^4.1.
|
|
68
|
+
"@csstools/css-color-parser": "^4.1.10",
|
|
69
69
|
"@csstools/css-parser-algorithms": "^4.0.0",
|
|
70
70
|
"@csstools/css-tokenizer": "^4.0.0",
|
|
71
71
|
"@tailwindcss-mangle/engine": "0.2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"es-toolkit": "^1.49.0",
|
|
75
75
|
"lru-cache": "11.5.2",
|
|
76
76
|
"micromatch": "^4.0.8",
|
|
77
|
-
"postcss": "^8.5.
|
|
77
|
+
"postcss": "^8.5.22",
|
|
78
78
|
"postcss-load-config": "^6.0.1",
|
|
79
79
|
"postcss-preset-env": "^11.3.2",
|
|
80
80
|
"postcss-pxtrans": "^1.0.4",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"postcss-rule-unit-converter": "^0.2.2",
|
|
83
83
|
"postcss-selector-parser": "~7.1.4",
|
|
84
84
|
"postcss-value-parser": "^4.2.0",
|
|
85
|
-
"@weapp-tailwindcss/postcss-calc": "^1.0.3",
|
|
86
85
|
"@weapp-tailwindcss/shared": "2.0.1",
|
|
86
|
+
"@weapp-tailwindcss/postcss-calc": "^1.0.3",
|
|
87
87
|
"tailwindcss-config": "2.0.2"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|