@weapp-tailwindcss/postcss 3.3.5 → 3.3.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.
Files changed (107) hide show
  1. package/README.md +10 -0
  2. package/README.zh-CN.md +6 -0
  3. package/dist/compat/index.d.ts +57 -0
  4. package/dist/compat/legacy-css/source-cleanup.d.ts +2 -0
  5. package/dist/compat/mini-program-css/output-import-shell.d.ts +8 -0
  6. package/dist/compat/native/compile.d.ts +2 -0
  7. package/dist/compat/native/properties.d.ts +15 -0
  8. package/dist/compat/native/selectors.d.ts +8 -0
  9. package/dist/compat/native/types.d.ts +23 -0
  10. package/dist/compat/processed-css/cleanup.d.ts +4 -0
  11. package/dist/compat/processed-css/composition.d.ts +6 -0
  12. package/dist/compat/processed-css/entry-directives.d.ts +1 -0
  13. package/dist/compat/processed-css/imports.d.ts +8 -0
  14. package/dist/compat/scoped-css/cleanup.d.ts +4 -0
  15. package/dist/compat/scoped-css/coverage.d.ts +10 -0
  16. package/dist/compat/scoped-css/covered-rules.d.ts +4 -0
  17. package/dist/compat/scoped-css/predicates.d.ts +13 -0
  18. package/dist/compat/tailwind-directive-injection.d.ts +8 -0
  19. package/dist/compat/tailwindcss-v4/generated-output.d.ts +5 -0
  20. package/dist/compat/tailwindcss-v4/package-import-statements.d.ts +1 -0
  21. package/dist/compat/tailwindcss-v4/preflight-imports.d.ts +3 -0
  22. package/dist/compat/tailwindcss-v4/rpx-candidates.d.ts +6 -0
  23. package/dist/compat/tailwindcss-v4/theme-injection.d.ts +1 -0
  24. package/dist/compat/tailwindcss-v4/theme-source.d.ts +5 -0
  25. package/dist/compat/tailwindcss-v4/user-css/apply-only.d.ts +6 -0
  26. package/dist/compat/tailwindcss-v4/user-css/apply-reference.d.ts +4 -0
  27. package/dist/compat/tailwindcss-v4/user-css/at-rules.d.ts +3 -0
  28. package/dist/compat/tailwindcss-v4/user-css/class-selectors.d.ts +2 -0
  29. package/dist/compat/tailwindcss-v4/user-css/directives/entry-source.d.ts +9 -0
  30. package/dist/compat/tailwindcss-v4/user-css/directives/fallback.d.ts +11 -0
  31. package/dist/compat/tailwindcss-v4/user-css/directives/index.d.ts +2 -0
  32. package/dist/compat/tailwindcss-v4/user-css/directives/shared.d.ts +26 -0
  33. package/dist/compat/tailwindcss-v4/user-css/framework-composition.d.ts +2 -0
  34. package/dist/compat/tailwindcss-v4/user-css/framework-source.d.ts +1 -0
  35. package/dist/compat/tailwindcss-v4/user-css/generated-cleanup.d.ts +7 -0
  36. package/dist/compat/tailwindcss-v4/user-css/identity.d.ts +1 -0
  37. package/dist/compat/tailwindcss-v4/user-css/markers.d.ts +32 -0
  38. package/dist/compat/tailwindcss-v4/user-css/rule-deduplication.d.ts +1 -0
  39. package/dist/compat/tailwindcss-v4/user-css/scoped-rules.d.ts +4 -0
  40. package/dist/compat/tailwindcss-v4/user-css/source-fragments.d.ts +15 -0
  41. package/dist/compat/tailwindcss-v4/user-css/transform.d.ts +14 -0
  42. package/dist/compat/tailwindcss-v4/user-css/user-layer-order.d.ts +10 -0
  43. package/dist/compat/tailwindcss-v4/user-css/user-layers.d.ts +15 -0
  44. package/dist/compat/uni-app-x/apply-source.d.ts +2 -0
  45. package/dist/compat/uni-app-x/harmony-apply.d.ts +2 -0
  46. package/dist/compat/uni-app-x/reference-paths.d.ts +2 -0
  47. package/dist/compat/uni-app-x-style-value.d.ts +2 -0
  48. package/dist/compat/webpack-css/bare-selectors.d.ts +1 -0
  49. package/dist/compat/webpack-css/generated-cleanup.d.ts +4 -0
  50. package/dist/compat/webpack-css/identity.d.ts +5 -0
  51. package/dist/compat/webpack-css/preflight.d.ts +5 -0
  52. package/dist/compat/webpack-css/user-source.d.ts +6 -0
  53. package/dist/diagnostics/rpx-theme.d.ts +9 -0
  54. package/dist/directives-C7XTve1w.js +8263 -0
  55. package/dist/experimental/lightningcss/index.cjs +256 -0
  56. package/dist/experimental/lightningcss/index.d.ts +3 -0
  57. package/dist/experimental/lightningcss/index.js +245 -0
  58. package/dist/experimental/lightningcss/options.d.ts +3 -0
  59. package/dist/experimental/lightningcss/selector-transform.d.ts +10 -0
  60. package/dist/experimental/lightningcss/selector-utils.d.ts +10 -0
  61. package/dist/generator-plugin/config-directive.d.ts +5 -0
  62. package/dist/generator-plugin/source-files.d.ts +5 -5
  63. package/dist/generator-plugin/types.d.ts +5 -0
  64. package/dist/index.cjs +383 -9089
  65. package/dist/index.d.ts +2 -43
  66. package/dist/index.js +10 -8935
  67. package/dist/native.cjs +425 -0
  68. package/dist/native.d.ts +3 -0
  69. package/dist/native.js +419 -0
  70. package/dist/plugin-CRzZbcEf.js +185 -0
  71. package/dist/plugin-DwoAGHyN.cjs +194 -0
  72. package/dist/plugin.cjs +3 -0
  73. package/dist/plugin.d.ts +2 -0
  74. package/dist/plugin.js +2 -0
  75. package/dist/postcss-runtime-i5rHe_mj.js +2 -0
  76. package/dist/preflight-BTZL2nvC.cjs +21 -0
  77. package/dist/preflight-DVg4eehD.js +16 -0
  78. package/dist/resolve-BFphwPip.cjs +9987 -0
  79. package/dist/resolve-D-FbFBpF.js +1139 -0
  80. package/dist/rewrite-imports-Dk9TKKSF.js +145 -0
  81. package/dist/shared-CELzerNo.cjs +34 -0
  82. package/dist/shared-CfQUwapA.js +23 -0
  83. package/dist/source-scan/candidates.d.ts +4 -0
  84. package/dist/source-scan/description.d.ts +15 -0
  85. package/dist/source-scan/params.d.ts +5 -0
  86. package/dist/source-scan/resolve.d.ts +30 -0
  87. package/dist/source-scan/tailwind-v4/entry-source.d.ts +16 -0
  88. package/dist/source-scan/tailwind-v4/fingerprint.d.ts +5 -0
  89. package/dist/source-scan.d.ts +3 -24
  90. package/dist/syntax/index.d.ts +1 -0
  91. package/dist/syntax/location-dependencies.d.ts +2 -0
  92. package/dist/syntax/rewrite-imports.d.ts +5 -0
  93. package/dist/syntax/runtime-signature.d.ts +2 -0
  94. package/dist/syntax/source-style.d.ts +1 -0
  95. package/dist/syntax.cjs +1167 -0
  96. package/dist/syntax.d.ts +6 -0
  97. package/dist/syntax.js +3 -0
  98. package/dist/transform-BGYgGeQj.js +9239 -0
  99. package/dist/transform-DpFypcaN.cjs +10956 -0
  100. package/dist/transform.cjs +421 -0
  101. package/dist/transform.d.ts +40 -0
  102. package/dist/transform.js +10 -0
  103. package/dist/utils/apply-source.d.ts +11 -0
  104. package/dist/utils/css-source-trace.d.ts +6 -0
  105. package/dist/utils/custom-property-values.d.ts +4 -0
  106. package/dist/utils/generated-css-marker.d.ts +12 -0
  107. package/package.json +49 -9
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @weapp-tailwindcss/postcss
2
2
 
3
+ The `/syntax`, `/transform`, and `/plugin` subpaths separate syntax helpers, CSS transformations, and PostCSS generation orchestration. Existing root exports remain available.
4
+
3
5
  > English | [简体中文](./README.zh-CN.md)
4
6
 
5
7
  This package is the CSS processing core of weapp-tailwindcss. It handles PostCSS AST transforms, selector compatibility, platform differences, and Tailwind output post-processing for mini programs.
@@ -8,6 +10,14 @@ This package is the CSS processing core of weapp-tailwindcss. It handles PostCSS
8
10
 
9
11
  For repeated comparisons against one CSS string, `createCssRuleMatcher(baseCss)` provides `contains(css)` and `filter(css)` with reusable, lazy comparison indexes. It preserves the semantics of `containsCssAfterMinify` and `filterExistingCssRules`. Create a new matcher when the base CSS changes; release it after the batch.
10
12
 
13
+ ## Native compiler
14
+
15
+ The isolated `@weapp-tailwindcss/postcss/native` entry provides `compileNativeCss(css, options)` for CSS-to-native style translation. It returns rules, variables, and warnings. React Native manifest IDs, Tailwind generation, and runtime integration remain in `@weapp-tailwindcss/react-native`; importing its `/runtime` entry does not load this compiler.
16
+
17
+ ## Experimental transforms
18
+
19
+ Experimental LightningCSS selector transforms live under `@weapp-tailwindcss/postcss/experimental/lightningcss`. They are not exported from the stable root. The `@weapp-tailwindcss/experimental/lightningcss` facade loads the LightningCSS engine; the PostCSS subpath itself only imports its types. The optional peer is needed only by consumers of these experimental types.
20
+
11
21
  ## Website
12
22
 
13
23
  For setup guides, configuration references, and framework examples, see the [official weapp-tailwindcss documentation](https://tw.weapp.dev).
package/README.zh-CN.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @weapp-tailwindcss/postcss
2
2
 
3
+ `/syntax`、`/transform`、`/plugin` 子路径分别提供语法能力、CSS 转换和 PostCSS 生成编排。原根导出保持兼容。
4
+
5
+ 独立入口 `@weapp-tailwindcss/postcss/native` 提供 `compileNativeCss(css, options)`,将 CSS 转成原生样式规则、变量和告警。React Native manifest ID、Tailwind 生成与运行时集成仍由 `@weapp-tailwindcss/react-native` 负责;导入其 `/runtime` 不会加载 CSS 编译器。
6
+
7
+ LightningCSS 实验转换放在 `@weapp-tailwindcss/postcss/experimental/lightningcss`,不由稳定根入口导出。实验包的原入口负责加载引擎,PostCSS 子入口只引用 LightningCSS 类型;可选 peer 仅供实验类型的消费方使用。
8
+
3
9
  > [English](./README.md) | 简体中文
4
10
 
5
11
  这个包是 weapp-tailwindcss 的 CSS 处理核心,负责小程序端的 PostCSS AST 转换、选择器兼容、平台差异处理和 Tailwind 输出后处理。
@@ -0,0 +1,57 @@
1
+ export { createAuthorSelectorMatcher } from './author-selector.js';
2
+ export { type DynamicColorMixAlphaProtection, type DynamicColorMixAlphaProtectionOptions, type ModernColorValueNormalization, normalizeModernColorValue, protectDynamicColorMixAlpha, protectDynamicVarFallbacks } from './color-mix.js';
3
+ export { collectDedupedPostTransformCompatCss, collectGeneratedSelectors, inheritLegacyUnitConvertedDeclarations, normalizeCompatSelectors, removeGeneratedSelectorCompatCss, removeTailwindApplyRules } from './legacy-css/index.js';
4
+ export { normalizeLegacyCompatCssSource, removeMiniProgramContainerCompatCss } from './legacy-css/source-cleanup.js';
5
+ export { transformLynxCssCompat } from './lynx-css.js';
6
+ export { consumeCascadeLayers, finalizeMiniProgramCss, type FinalizeMiniProgramCssOptions, finalizeMiniProgramCssRoot, finalizeMiniProgramCssStructure, hasEmptyCssBlockCandidate, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, normalizeMiniProgramGeneratedCssForPostcss, pruneMiniProgramGeneratedCss, removeEmptyAtRules, removeEmptyRules, removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, removeUnusedMiniProgramContentInit, repairTrailingUnclosedTailwindSourceMedia, stripMiniProgramCssSpecificityPlaceholders, unwrapUnsupportedCascadeLayers } from './mini-program-css/index.js';
7
+ export { normalizeMiniProgramGeneratorCssSource, normalizeMiniProgramImportShell, removeMiniProgramOutputImports, removeSelfMiniProgramOutputImports } from './mini-program-css/output-import-shell.js';
8
+ export { normalizeMiniProgramPrefixedDeclaration, removeUnsupportedMiniProgramPrefixedAtRule } from './mini-program-prefixes.js';
9
+ export { hasNonCommentCss, isCssImportOnly, removeCommentOnlyAtRules, restoreProcessedCssImports } from './processed-css/cleanup.js';
10
+ export { composeProcessedCssSources } from './processed-css/composition.js';
11
+ export { removeTailwindEntryDirectivesFromCss } from './processed-css/entry-directives.js';
12
+ export { collectImportedCssFiles, isStyleImportRequest, normalizeInjectableCssWithImports } from './processed-css/imports.js';
13
+ export { removeCssCoveredByRootStyleSources, removeScopedTailwindPreflightCss } from './scoped-css/cleanup.js';
14
+ export { collectRootScopedComparableCssCoverage, type ComparableCssCoverage, isRuleCoveredByRootCss } from './scoped-css/coverage.js';
15
+ export { removeCssRulesCoveredBySources } from './scoped-css/covered-rules.js';
16
+ export { hasScopedMiniProgramTailwindContentInitRule, hasScopedUniAppWebTailwindPreflightRule, hasUnscopedMiniProgramTailwindPreflightRule, hasVueScopedAttr, isLikelyTailwindGlobalRule, isLikelyTailwindLayerOrderAtRule, isLikelyTailwindPropertyAtRule, isScopedMiniProgramTailwindContentInitRule, isScopedUniAppWebTailwindPreflightRule, isScopedUniversalTailwindPreflightRule, isUnscopedMiniProgramTailwindPreflightRule, normalizeCssSignatureValue } from './scoped-css/predicates.js';
17
+ export { injectTailwindDirectives, type TailwindDirectiveInjectionOptions } from './tailwind-directive-injection.js';
18
+ export { convertTailwindcssRpxDeclarationsToRem, convertTailwindcssRpxDeclarationToRem, convertTailwindcssRpxValueToRem, normalizeTailwindcssRpxDeclaration, normalizeTailwindcssRpxDeclarations, normalizeTailwindcssWebRpxDeclarations, type TailwindcssRpxToRemOptions } from './tailwindcss-rpx.js';
19
+ export { normalizeTailwindcssV4InfinityCalcCss } from './tailwindcss-v4.js';
20
+ export { compileTailwindAuthorFunctions, createTailwindAuthorFunctionProbe } from './tailwindcss-v4/author-functions.js';
21
+ export { normalizeTailwindV4GeneratedUrlValues, transformTailwindV4CssToWeapp, transformTailwindV4GeneratedCss, transformTailwindV4WebRpxCss } from './tailwindcss-v4/generated-output.js';
22
+ export { normalizeTailwindcssV4InfinityRadiusCss } from './tailwindcss-v4/infinity-radius.js';
23
+ export { rewriteTailwindPackageImportStatements } from './tailwindcss-v4/package-import-statements.js';
24
+ export { includesTailwindV4PreflightDirective, isTailwindV4CssImportParam, isTailwindV4PreflightImportParam } from './tailwindcss-v4/preflight-imports.js';
25
+ export { normalizeRpxLengthCandidates, restoreRpxLengthCandidates, restoreRpxLengthCssSelectors } from './tailwindcss-v4/rpx-candidates.js';
26
+ export { insertTailwindThemeCss } from './tailwindcss-v4/theme-injection.js';
27
+ export { normalizeTailwindV4RuntimeCss, removeTailwindV4PreflightImports, removeUnsupportedThemeVendorKeyframes } from './tailwindcss-v4/theme-source.js';
28
+ export { filterTailwindV4ApplyOnlyGeneratedCss, normalizeEmptyTailwindCustomVariants } from './tailwindcss-v4/user-css/apply-only.js';
29
+ export { createTailwindV4SourceReferenceSource, hasTailwindApplyContextDirective } from './tailwindcss-v4/user-css/apply-reference.js';
30
+ export { removeTailwindApplyAtRules, removeTailwindSourceMediaBlocks, terminateTailwindSourceAtRulesBeforeNextDirective } from './tailwindcss-v4/user-css/at-rules.js';
31
+ export { collectRawSourceClassSelectors, normalizeCssClassSelector } from './tailwindcss-v4/user-css/class-selectors.js';
32
+ export { hasLocalCssImport, hasTailwindApplyDirective, hasTailwindNonRootGenerationDirectives, hasTailwindRootDirectives, hasTailwindRootImportDirectives, hasTailwindSourceDirectives, normalizeTailwindConfigDirectives, normalizeTailwindSourceDirectives, normalizeTailwindSourceForGenerator, parseImportRequest, removeTailwindSourceDirectives, resolveCssEntrySource } from './tailwindcss-v4/user-css/directives/index.js';
33
+ export { extractConfigRequestFromSource, extractTailwindDirectiveLines, extractTailwindSourceForPostcssFallback } from './tailwindcss-v4/user-css/directives/fallback.js';
34
+ export { composeFrameworkProcessedCss } from './tailwindcss-v4/user-css/framework-composition.js';
35
+ export { normalizeFrameworkProcessedUserCss } from './tailwindcss-v4/user-css/framework-source.js';
36
+ export { createGeneratedThemeDeclarationResolver, type GeneratedThemeDeclarationResolver, removeBalancedAtRuleBlock, removeTailwindV4GeneratedUserCssArtifacts, removeTailwindV4GeneratorAtRulesFallback, TAILWIND_V4_GENERATOR_AT_RULES } from './tailwindcss-v4/user-css/generated-cleanup.js';
37
+ export { isCssAlreadyRepresentedByMarkers } from './tailwindcss-v4/user-css/identity.js';
38
+ export { createCssAppend, GENERATOR_PLACEHOLDER_MARKER_GLOBAL_RE, GENERATOR_PLACEHOLDER_MARKER_RE, hasTailwindGeneratedCss, hasTailwindGeneratedCssMarkers, removeDuplicatedViteMarkers, removeTailwindGeneratedCssByBanner, splitGeneratorPlaceholderCssBySourceOrder, splitTailwindGeneratedCssByBanner, splitTailwindV4GeneratedCss, splitTailwindV4GeneratedCssBySourceOrder, stripGeneratorPlaceholderMarkers, stripTailwindBanner, stripTailwindBannerComments, stripTailwindBanners, TAILWIND_BANNER_GLOBAL_RE, TAILWIND_BANNER_PREFIX_RE, TAILWIND_BANNER_RE, TAILWIND_GENERATED_CSS_MARKER_RE, TAILWIND_V4_BANNER_RE, VITE_MARKER_RE } from './tailwindcss-v4/user-css/markers.js';
39
+ export { deduplicateGeneratedCssRules } from './tailwindcss-v4/user-css/rule-deduplication.js';
40
+ export { preferScopedGeneratedCssRules, preferScopedGeneratedCssRulesRoot } from './tailwindcss-v4/user-css/scoped-rules.js';
41
+ export { collectBareSelectorUserCss, isCommentOnlyCss, removeMiniProgramHoverSelectors, removeMiniProgramInteractiveSelectors, type RemoveMiniProgramInteractiveSelectorsOptions, removeProcessedMiniProgramUnsupportedCss, removeTailwindV4GeneratorAtRules, stripTailwindSourceMediaFragments, stripUnmatchedTailwindSourceMediaCloseFragments, unwrapMiniProgramCascadeLayers } from './tailwindcss-v4/user-css/source-fragments.js';
42
+ export { transformGeneratorUserCss } from './tailwindcss-v4/user-css/transform.js';
43
+ export { extractMarkedUserLayerComponentsCss, mergeMarkedUserLayerComponentsCss, reorderMarkedUserLayerComponentsCss, wrapUserLayerComponentsCss } from './tailwindcss-v4/user-css/user-layer-order.js';
44
+ export { analyzeApplyOnlySource, collectApplyOnlySourceSelectors, extractGeneratedCssForUserLayerSelectors, hasOnlyApplyBackedSourceRules, hasUserCssLayerBlocks, isEmptyCustomVariantBlock, normalizeGeneratedSelector, removeCssComments, splitUserCssLayerBlocks } from './tailwindcss-v4/user-css/user-layers.js';
45
+ export { normalizeUniAppXImportantApplyForSass, restoreUniAppXImportantApplyMarker, UNI_APP_X_IMPORTANT_APPLY_MARKER } from './uni-app-x.js';
46
+ export { isTailwindRuntimePropertyRule, retainUniAppXAuthorApplyCss } from './uni-app-x-author-apply.js';
47
+ export { createUniAppXBorderPreflight, hoistUniAppXBorderPreflight, UNI_APP_X_BORDER_PREFLIGHT_CLASS } from './uni-app-x-border.js';
48
+ export { collectCssApplyUtilities, type CssClassStyleValue, cssToClassStyleValue, expandCssApplySourcesToStyleValue, normalizeUniAppXStyleProperty, normalizeUniAppXStyleValue } from './uni-app-x-style-value.js';
49
+ export { collectCssReferenceDirectives, createUniAppXHarmonyApplyGeneratorSource } from './uni-app-x/apply-source.js';
50
+ export { createUniAppXHarmonyApplyCssExpander } from './uni-app-x/harmony-apply.js';
51
+ export { rewriteUniAppXStyleReferences } from './uni-app-x/reference-paths.js';
52
+ export { type NormalizedWebCssCompatOptions, normalizeWebCssCompatOptions, transformWebCssCompat, transformWebCssSafeSelectors } from './web-css.js';
53
+ export { collectWebpackBareSelectorUserCss } from './webpack-css/bare-selectors.js';
54
+ export { isOnlyWebpackTailwindGeneratedPreflightCss, parseWebpackCssLayerNames, removeWebpackTailwindGeneratedAssetCss, stripTrailingLineWhitespace } from './webpack-css/generated-cleanup.js';
55
+ export { collectGeneratedCssClassCandidates, collectWebpackAssetUserCssMarkers, collectWebpackCssRuleIdentityMarkers, hasAdditionalWebpackAssetUserCssMarkers, unescapeCssIdentifier } from './webpack-css/identity.js';
56
+ export { dedupeMiniProgramPreflightSelectorRules, ensureWebpackMiniProgramTwContentInit, hasMiniProgramPreflightSelector, removeMiniProgramPreflightSelectorRule, removeTailwindV4StandaloneHostPreflightRule } from './webpack-css/preflight.js';
57
+ export { hasWebpackTailwindSourceDirectives, isWebpackCssSourceRepresentedInAsset, isWebpackTailwindImportRequest, normalizeWebpackUserCssFallbackSource, removeWebpackGeneratorNonTailwindImports, removeWebpackUserCssFallbackImports } from './webpack-css/user-source.js';
@@ -0,0 +1,2 @@
1
+ export declare function removeMiniProgramContainerCompatCss(css: string): string;
2
+ export declare function normalizeLegacyCompatCssSource(rawSource: string): string;
@@ -0,0 +1,8 @@
1
+ export declare function normalizeMiniProgramImportShell(css: string, output?: {
2
+ outputFile: string;
3
+ outputFiles: Iterable<string>;
4
+ cssOnly?: boolean;
5
+ }): string;
6
+ export declare function removeSelfMiniProgramOutputImports(css: string, outputFile: string): string;
7
+ export declare function removeMiniProgramOutputImports(css: string): string;
8
+ export declare function normalizeMiniProgramGeneratorCssSource(css: string, outputFile?: string | undefined, outputFiles?: Iterable<string>): string;
@@ -0,0 +1,2 @@
1
+ import type { CompileNativeStylesheetOptions, NativeCssStylesheet } from './types.js';
2
+ export declare function compileNativeCss(css: string, options?: CompileNativeStylesheetOptions): NativeCssStylesheet;
@@ -0,0 +1,15 @@
1
+ export declare function propertyName(property: string): string;
2
+ export declare function expandDeclaration(property: string, value: string, variables: Record<string, string>): {
3
+ [k: string]: number | undefined;
4
+ } | {
5
+ shadowOpacity?: number;
6
+ shadowOffset: {
7
+ width: any;
8
+ height: any;
9
+ };
10
+ shadowRadius: any;
11
+ shadowColor: string;
12
+ } | {
13
+ borderColor?: string;
14
+ borderWidth?: any;
15
+ } | undefined;
@@ -0,0 +1,8 @@
1
+ import type { AtRule } from 'postcss';
2
+ import type { NativeStyleRule } from './types.js';
3
+ export declare function splitClassName(className: string): string[];
4
+ export declare function baseClassName(className: string): string | undefined;
5
+ export declare function unsupportedVariant(className: string): string | undefined;
6
+ export declare function walkClasses(selector: string): string[];
7
+ export declare function variantForClass(className: string): Pick<NativeStyleRule, 'colorScheme' | 'platform'>;
8
+ export declare function atRuleVariant(node: AtRule | undefined): Pick<NativeStyleRule, 'colorScheme' | 'platform'>;
@@ -0,0 +1,23 @@
1
+ export type NativePlatform = 'android' | 'ios' | 'native' | 'web';
2
+ export interface NativeStyleRule {
3
+ style: Record<string, unknown>;
4
+ colorScheme?: 'dark' | undefined;
5
+ platform?: NativePlatform | undefined;
6
+ important?: boolean | undefined;
7
+ order?: number | undefined;
8
+ id?: string | undefined;
9
+ }
10
+ export interface NativeCompilerWarning {
11
+ className?: string | undefined;
12
+ property?: string | undefined;
13
+ message: string;
14
+ }
15
+ export interface CompileNativeStylesheetOptions {
16
+ classSet?: Iterable<string> | undefined;
17
+ ignorePreflight?: boolean | undefined;
18
+ }
19
+ export interface NativeCssStylesheet {
20
+ rules: Record<string, NativeStyleRule[]>;
21
+ variables: Record<string, string>;
22
+ warnings: NativeCompilerWarning[];
23
+ }
@@ -0,0 +1,4 @@
1
+ export declare function hasNonCommentCss(css: string): boolean;
2
+ export declare function restoreProcessedCssImports(source: string, filtered: string, miniProgram?: boolean): string;
3
+ export declare function removeCommentOnlyAtRules(css: string): string;
4
+ export declare function isCssImportOnly(css: string): boolean;
@@ -0,0 +1,6 @@
1
+ interface ProcessedCssSource {
2
+ css: string;
3
+ processed: boolean;
4
+ }
5
+ export declare function composeProcessedCssSources(...sources: Array<ProcessedCssSource | undefined>): ProcessedCssSource | undefined;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare function removeTailwindEntryDirectivesFromCss(css: string, preserveCssLayers?: boolean): string;
@@ -0,0 +1,8 @@
1
+ type CssImportResolver = (request: string) => string | undefined;
2
+ export declare function isStyleImportRequest(request: string | undefined): boolean;
3
+ export declare function normalizeInjectableCssWithImports(css: string, miniProgram: boolean, resolveImport: CssImportResolver): {
4
+ css: string;
5
+ importedStyleFiles: Set<string>;
6
+ };
7
+ export declare function collectImportedCssFiles(css: string, resolveImport: CssImportResolver): Set<string>;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function removeScopedTailwindPreflightCss(css: string, options?: {
2
+ preserveRuntimeProperties?: boolean;
3
+ }): string;
4
+ export declare function removeCssCoveredByRootStyleSources(css: string, rootSources: string[]): string;
@@ -0,0 +1,10 @@
1
+ import postcss from 'postcss';
2
+ export declare function createAtRuleCoverageKey(atRule: postcss.AtRule): string;
3
+ export declare function collectRootScopedComparableCssCoverage(cssSources: string[]): {
4
+ rules: Set<string>;
5
+ atRules: Set<string>;
6
+ declarationsBySelector: Map<string, Set<string>>;
7
+ normalizedRuleCss: Set<string>;
8
+ };
9
+ export type ComparableCssCoverage = ReturnType<typeof collectRootScopedComparableCssCoverage>;
10
+ export declare function isRuleCoveredByRootCss(rule: postcss.Rule, coverage: ReturnType<typeof collectRootScopedComparableCssCoverage>): boolean;
@@ -0,0 +1,4 @@
1
+ import type { ComparableCssCoverage } from './coverage.js';
2
+ export declare function removeCssRulesCoveredBySources(css: string, sources: string[], options?: {
3
+ exactOnly?: boolean | undefined;
4
+ }, preparedCoverage?: ComparableCssCoverage | undefined): string;
@@ -0,0 +1,13 @@
1
+ import type { AtRule, Rule } from 'postcss';
2
+ export declare function hasVueScopedAttr(value: string): boolean;
3
+ export declare function normalizeCssSignatureValue(value: string): string;
4
+ export declare function isScopedUniversalTailwindPreflightRule(rule: Rule): boolean;
5
+ export declare function isScopedUniAppWebTailwindPreflightRule(rule: Rule): boolean;
6
+ export declare function hasScopedUniAppWebTailwindPreflightRule(css: string): boolean;
7
+ export declare function isLikelyTailwindGlobalRule(rule: Rule): boolean;
8
+ export declare function isLikelyTailwindPropertyAtRule(atRule: AtRule): boolean;
9
+ export declare function isLikelyTailwindLayerOrderAtRule(atRule: AtRule): boolean;
10
+ export declare function isUnscopedMiniProgramTailwindPreflightRule(rule: Rule): boolean;
11
+ export declare function isScopedMiniProgramTailwindContentInitRule(rule: Rule): boolean;
12
+ export declare function hasUnscopedMiniProgramTailwindPreflightRule(css: string): boolean;
13
+ export declare function hasScopedMiniProgramTailwindContentInitRule(css: string): boolean;
@@ -0,0 +1,8 @@
1
+ import type { Root } from 'postcss';
2
+ export interface TailwindDirectiveInjectionOptions {
3
+ directiveParams: readonly string[];
4
+ insertAfterAtRulesNames: readonly string[];
5
+ matchesComment: (text: string) => boolean;
6
+ }
7
+ /** 只插入缺失指令;配置、输入过滤和模板依赖由调用方管理。 */
8
+ export declare function injectTailwindDirectives(root: Root, options: TailwindDirectiveInjectionOptions): void;
@@ -0,0 +1,5 @@
1
+ import type { IStyleHandlerOptions } from '../../types.js';
2
+ export declare function normalizeTailwindV4GeneratedUrlValues(css: string): string;
3
+ export declare function transformTailwindV4CssToWeapp(css: string, options?: Partial<IStyleHandlerOptions>): Promise<string>;
4
+ export declare function transformTailwindV4WebRpxCss(css: string): string;
5
+ export declare function transformTailwindV4GeneratedCss(css: string, target: 'weapp' | 'web', options?: Partial<IStyleHandlerOptions>, webRpxCompatibility?: boolean): Promise<string>;
@@ -0,0 +1 @@
1
+ export declare function rewriteTailwindPackageImportStatements(code: string, resolve: (specifier: string) => string | null | undefined): string | undefined;
@@ -0,0 +1,3 @@
1
+ export declare function isTailwindV4CssImportParam(params: string): boolean;
2
+ export declare function isTailwindV4PreflightImportParam(params: string): boolean;
3
+ export declare function includesTailwindV4PreflightDirective(css: string): boolean;
@@ -0,0 +1,6 @@
1
+ export declare function normalizeRpxLengthCandidates(candidates: Iterable<string>): {
2
+ candidates: Set<string>;
3
+ restoreCandidates: Map<string, string>;
4
+ };
5
+ export declare function restoreRpxLengthCandidates(candidates: Iterable<string>, restoreCandidates: ReadonlyMap<string, string>): Set<string>;
6
+ export declare function restoreRpxLengthCssSelectors(css: string, restoreCandidates: ReadonlyMap<string, string>): string;
@@ -0,0 +1 @@
1
+ export declare function insertTailwindThemeCss(css: string, themeCss: string): string;
@@ -1,4 +1,9 @@
1
+ import type { Root } from 'postcss';
1
2
  /** 从小程序入口 CSS 中移除 Tailwind v4 preflight import。 */
2
3
  export declare function removeTailwindV4PreflightImports(css: string): string;
3
4
  /** 删除 `@theme` 内不被小程序接受的厂商前缀 keyframes。 */
4
5
  export declare function removeUnsupportedThemeVendorKeyframes(css: string): string;
6
+ /** 复用已有 AST,避免运行时样式清理重复解析。 */
7
+ export declare function removeUnsupportedThemeVendorKeyframesRoot(root: Root): boolean;
8
+ /** loader 调用端决定是否需要清理;非法 CSS 沿用原有抛错行为。 */
9
+ export declare function normalizeTailwindV4RuntimeCss(css: string): string;
@@ -0,0 +1,6 @@
1
+ export declare function normalizeEmptyTailwindCustomVariants(css: string): string;
2
+ export declare function filterTailwindV4ApplyOnlyGeneratedCss(css: string, source: string, options?: {
3
+ preserveVariables?: boolean | undefined;
4
+ preserveRuntimeProperties?: boolean | undefined;
5
+ preferScopedRules?: boolean | undefined;
6
+ }): string;
@@ -0,0 +1,4 @@
1
+ export declare function hasTailwindApplyContextDirective(css: string): boolean;
2
+ export declare function createTailwindV4SourceReferenceSource(css: string, sourceOptions: {
3
+ packageName?: string | undefined;
4
+ }, referenceDirective?: string): string;
@@ -0,0 +1,3 @@
1
+ export declare function removeTailwindSourceMediaBlocks(source: string): string;
2
+ export declare function terminateTailwindSourceAtRulesBeforeNextDirective(source: string): string;
3
+ export declare function removeTailwindApplyAtRules(source: string): string;
@@ -0,0 +1,2 @@
1
+ export declare function normalizeCssClassSelector(value: string): string;
2
+ export declare function collectRawSourceClassSelectors(rawSource: string): Set<string>;
@@ -0,0 +1,9 @@
1
+ export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
2
+ removeConfig?: boolean;
3
+ importFallback?: boolean;
4
+ }): {
5
+ css: string;
6
+ config: string | undefined;
7
+ configRequest: string | undefined;
8
+ base: string;
9
+ } | undefined;
@@ -0,0 +1,11 @@
1
+ interface TailwindDirectiveOptions {
2
+ importFallback?: boolean | undefined;
3
+ }
4
+ export declare function extractTailwindDirectiveLines(rawSource: string, options?: TailwindDirectiveOptions & {
5
+ removeConfig?: boolean;
6
+ }): string[];
7
+ export declare function extractTailwindSourceForPostcssFallback(rawSource: string, options?: TailwindDirectiveOptions & {
8
+ removeConfig?: boolean;
9
+ }): string | undefined;
10
+ export declare function extractConfigRequestFromSource(rawSource: string): string | undefined;
11
+ export {};
@@ -0,0 +1,2 @@
1
+ export { resolveCssEntrySource } from './entry-source.js';
2
+ export { hasLocalCssImport, hasTailwindApplyDirective, hasTailwindNonRootGenerationDirectives, hasTailwindRootDirectives, hasTailwindRootImportDirectives, hasTailwindSourceDirectives, normalizeTailwindConfigDirectives, normalizeTailwindSourceDirectives, normalizeTailwindSourceForGenerator, parseImportRequest, removeTailwindSourceDirectives, } from './shared.js';
@@ -0,0 +1,26 @@
1
+ import { postcss } from '../../../../postcss-runtime.js';
2
+ interface TailwindDirectiveOptions {
3
+ importFallback?: boolean | undefined;
4
+ preserveApplyContext?: boolean | undefined;
5
+ }
6
+ interface TailwindGenerationDirectiveOptions extends TailwindDirectiveOptions {
7
+ ignoreLayer?: boolean | undefined;
8
+ }
9
+ export declare function parseImportRequest(params: string): string | undefined;
10
+ export declare function hasLocalCssImport(rawSource: string): boolean;
11
+ export declare function parseConfigRequest(params: string): string | undefined;
12
+ export declare function normalizeTailwindImportAtRules(root: postcss.Root, options?: TailwindDirectiveOptions): boolean;
13
+ export declare function resolveConfigPath(base: string, configPath: string): string | undefined;
14
+ export declare function normalizeTailwindConfigDirectives(rawSource: string, base: string): string;
15
+ export declare function hasPreprocessorOnlySyntax(rawSource: string): boolean;
16
+ export declare function normalizeTailwindSourceForGenerator(rawSource: string, options?: TailwindDirectiveOptions): string;
17
+ export declare function normalizeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
18
+ export declare function hasGeneratedCssArtifacts(rawSource: string): boolean;
19
+ export declare function isTailwindGenerationDirective(node: postcss.Node, options?: TailwindGenerationDirectiveOptions): boolean;
20
+ export declare function removeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
21
+ export declare function hasTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
22
+ export declare function hasTailwindNonRootGenerationDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
23
+ export declare function hasTailwindRootImportDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
24
+ export declare function hasTailwindRootDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
25
+ export declare function hasTailwindApplyDirective(rawSource: string): boolean;
26
+ export {};
@@ -0,0 +1,2 @@
1
+ /** 保留生成侧已确定的层位置;框架侧重复选择器及其间的覆盖区间按原顺序恢复。 */
2
+ export declare function composeFrameworkProcessedCss(before: string, generated: string, after: string): string;
@@ -0,0 +1 @@
1
+ export declare function normalizeFrameworkProcessedUserCss(source: string): string;
@@ -0,0 +1,7 @@
1
+ export declare const TAILWIND_V4_GENERATOR_AT_RULES: Set<string>;
2
+ export declare function removeBalancedAtRuleBlock(source: string, atRuleStart: number): string;
3
+ export declare function removeTailwindV4GeneratorAtRulesFallback(source: string): string;
4
+ export type GeneratedThemeDeclarationResolver = () => ReadonlySet<string>;
5
+ /** 同一轮框架恢复共享声明索引;只有遇到根变量时才解析生成产物。 */
6
+ export declare function createGeneratedThemeDeclarationResolver(source: string): GeneratedThemeDeclarationResolver;
7
+ export declare function removeTailwindV4GeneratedUserCssArtifacts(source: string, generatedSource?: string | GeneratedThemeDeclarationResolver): string;
@@ -0,0 +1 @@
1
+ export declare function isCssAlreadyRepresentedByMarkers(css: string, source: string): boolean;
@@ -0,0 +1,32 @@
1
+ import type postcss from 'postcss';
2
+ export declare const TAILWIND_V4_BANNER_RE: RegExp;
3
+ export declare const TAILWIND_GENERATED_CSS_MARKER_RE: RegExp;
4
+ export declare const GENERATOR_PLACEHOLDER_MARKER_RE: RegExp;
5
+ export declare const GENERATOR_PLACEHOLDER_MARKER_GLOBAL_RE: RegExp;
6
+ export declare const TAILWIND_BANNER_PREFIX_RE: RegExp;
7
+ export declare const TAILWIND_BANNER_RE: RegExp;
8
+ export declare const TAILWIND_BANNER_GLOBAL_RE: RegExp;
9
+ export declare const VITE_MARKER_RE: RegExp;
10
+ export declare function removeDuplicatedViteMarkers(css: string, baseCss: string): string;
11
+ export declare function createCssAppend(base: string, extra: string): string;
12
+ export declare function splitTailwindV4GeneratedCss(rawSource: string, rawTailwindCss: string): string | undefined;
13
+ export declare function splitTailwindV4GeneratedCssBySourceOrder(rawSource: string, rawTailwindCss: string): {
14
+ before: string;
15
+ after: string;
16
+ } | undefined;
17
+ export declare function splitGeneratorPlaceholderCssBySourceOrder(rawSource: string, rawTailwindCss?: string): {
18
+ before: string;
19
+ after: string;
20
+ } | undefined;
21
+ export declare function removeTailwindGeneratedCssByBanner(rawSource: string): string | undefined;
22
+ export declare function splitTailwindGeneratedCssByBanner(rawSource: string, start?: number): {
23
+ before: string;
24
+ after: string;
25
+ } | undefined;
26
+ export declare function stripTailwindBanner(css: string): string;
27
+ export declare function stripTailwindBanners(css: string): string;
28
+ /** 仅移除 AST 中的 Tailwind 版权注释,保留其它注释和声明字面量。 */
29
+ export declare function stripTailwindBannerComments(root: postcss.Root | postcss.Document): void;
30
+ export declare function stripGeneratorPlaceholderMarkers(css: string): string;
31
+ export declare function hasTailwindGeneratedCss(rawSource: string): boolean;
32
+ export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function deduplicateGeneratedCssRules(css: string): string;
@@ -0,0 +1,4 @@
1
+ import { postcss } from '../../../postcss-runtime.js';
2
+ /** 复用调用方 AST;索引仅在本次调用内存活,不跨样式变更缓存。 */
3
+ export declare function preferScopedGeneratedCssRulesRoot(root: postcss.Root): void;
4
+ export declare function preferScopedGeneratedCssRules(css: string): string;
@@ -0,0 +1,15 @@
1
+ import type { IStyleHandlerOptions } from '../../../types.js';
2
+ export declare function removeTailwindV4GeneratorAtRules(source: string): string;
3
+ export declare function isCommentOnlyCss(source: string): boolean;
4
+ export interface RemoveMiniProgramInteractiveSelectorsOptions {
5
+ active?: boolean | undefined;
6
+ hover?: boolean | undefined;
7
+ focus?: boolean | undefined;
8
+ }
9
+ export declare function removeMiniProgramInteractiveSelectors(source: string, options?: RemoveMiniProgramInteractiveSelectorsOptions): string;
10
+ export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
11
+ export declare function removeProcessedMiniProgramUnsupportedCss(source: string, options: Partial<IStyleHandlerOptions>): string;
12
+ export declare function unwrapMiniProgramCascadeLayers(source: string): string;
13
+ export declare function collectBareSelectorUserCss(source: string, transformedCss?: string): string;
14
+ export declare function stripTailwindSourceMediaFragments(source: string): string;
15
+ export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
@@ -0,0 +1,14 @@
1
+ import type { IStyleHandlerOptions } from '../../../types.js';
2
+ import type { GeneratedThemeDeclarationResolver } from './generated-cleanup.js';
3
+ export declare function transformGeneratorUserCss(source: string, options: {
4
+ compileAuthorCssFunctions?: ((css: string) => Promise<string>) | undefined;
5
+ generatorTarget: string;
6
+ generatorStyleOptions: Partial<IStyleHandlerOptions>;
7
+ cssUserHandlerOptions: IStyleHandlerOptions;
8
+ styleHandler: (css: string, options: IStyleHandlerOptions) => Promise<{
9
+ css: string;
10
+ }>;
11
+ importFallback: boolean;
12
+ generatedSource?: string | GeneratedThemeDeclarationResolver | undefined;
13
+ processed?: boolean | undefined;
14
+ }): Promise<string>;
@@ -0,0 +1,10 @@
1
+ export declare function wrapUserLayerComponentsCss(css: string): string;
2
+ export declare function extractMarkedUserLayerComponentsCss(css: string): {
3
+ layers: string[];
4
+ rest: string;
5
+ };
6
+ export declare function reorderMarkedUserLayerComponentsCss(css: string): string;
7
+ export declare function mergeMarkedUserLayerComponentsCss(baseCss: string, markedCss: string): {
8
+ css: string;
9
+ merged: boolean;
10
+ };
@@ -0,0 +1,15 @@
1
+ import { postcss } from '../../../postcss-runtime.js';
2
+ export declare function splitUserCssLayerBlocks(source: string): {
3
+ layer: string;
4
+ rest: string;
5
+ };
6
+ export declare function hasUserCssLayerBlocks(source: string): boolean;
7
+ export declare function extractGeneratedCssForUserLayerSelectors(css: string, userLayerSource: string): {
8
+ layer: string;
9
+ rest: string;
10
+ };
11
+ export { analyzeApplyOnlySource, normalizeGeneratedSelector } from '../../../utils/apply-source.js';
12
+ export declare function collectApplyOnlySourceSelectors(source: string): Set<string>;
13
+ export declare function hasOnlyApplyBackedSourceRules(source: string): boolean;
14
+ export declare function removeCssComments(css: string): string;
15
+ export declare function isEmptyCustomVariantBlock(rule: postcss.AtRule): boolean;
@@ -0,0 +1,2 @@
1
+ export declare function createUniAppXHarmonyApplyGeneratorSource(applyStyleSources: string[]): string;
2
+ export declare function collectCssReferenceDirectives(source: string): Set<string>;
@@ -0,0 +1,2 @@
1
+ /** 每份生成结果建立一次索引,仅在命中作者规则时克隆声明。 */
2
+ export declare function createUniAppXHarmonyApplyCssExpander(generatedCss: string): ((styleSource: string) => string) | undefined;
@@ -0,0 +1,2 @@
1
+ /** 路径身份由调用端解析,本包只改写 reference 声明。 */
2
+ export declare function rewriteUniAppXStyleReferences(styleSource: string, resolveReference?: (request: string) => string): string;
@@ -1,5 +1,7 @@
1
1
  type StyleDeclarations = Record<string, string | number>;
2
2
  export type CssClassStyleValue = Record<string, Record<string, StyleDeclarations>>;
3
+ export declare function normalizeUniAppXStyleProperty(prop: string): string;
4
+ export declare function normalizeUniAppXStyleValue(prop: string, value: string | number): string | number;
3
5
  /** 把 CSS 规则编译成 Harmony/UTS 可消费的 class -> 声明对象。 */
4
6
  export declare function cssToClassStyleValue(source: string): CssClassStyleValue | undefined;
5
7
  /** 从 SCSS/CSS 源码收集 `@apply` 工具类。 */
@@ -0,0 +1 @@
1
+ export declare function collectWebpackBareSelectorUserCss(source: string): string;
@@ -0,0 +1,4 @@
1
+ export declare function stripTrailingLineWhitespace(source: string): string;
2
+ export declare function parseWebpackCssLayerNames(params: string): string[];
3
+ export declare function removeWebpackTailwindGeneratedAssetCss(source: string): string;
4
+ export declare function isOnlyWebpackTailwindGeneratedPreflightCss(source: string): boolean;
@@ -0,0 +1,5 @@
1
+ export declare function collectWebpackAssetUserCssMarkers(source: string): Set<string>;
2
+ export declare function collectWebpackCssRuleIdentityMarkers(source: string): Set<string>;
3
+ export declare function unescapeCssIdentifier(value: string): string;
4
+ export declare function collectGeneratedCssClassCandidates(source: string): Set<string>;
5
+ export declare function hasAdditionalWebpackAssetUserCssMarkers(rawSource: string, generatorRawSource: string): boolean;
@@ -0,0 +1,5 @@
1
+ export declare function removeMiniProgramPreflightSelectorRule(source: string): string;
2
+ export declare function dedupeMiniProgramPreflightSelectorRules(source: string): string;
3
+ export declare function hasMiniProgramPreflightSelector(source: string): boolean;
4
+ export declare function ensureWebpackMiniProgramTwContentInit(source: string): string;
5
+ export declare function removeTailwindV4StandaloneHostPreflightRule(source: string): string;
@@ -0,0 +1,6 @@
1
+ export declare function hasWebpackTailwindSourceDirectives(source: string | undefined): boolean;
2
+ export declare function isWebpackTailwindImportRequest(request: string | undefined): boolean | undefined;
3
+ export declare function removeWebpackGeneratorNonTailwindImports(source: string | undefined): string | undefined;
4
+ export declare function removeWebpackUserCssFallbackImports(source: string): string;
5
+ export declare function normalizeWebpackUserCssFallbackSource(source: string): string;
6
+ export declare function isWebpackCssSourceRepresentedInAsset(rawSource: string, sourceCss: string | undefined): boolean;
@@ -0,0 +1,9 @@
1
+ import postcss from 'postcss';
2
+ export interface RpxCalcUsage {
3
+ variables: string[];
4
+ inlineRpx: boolean;
5
+ }
6
+ /** 只收集主题声明中的 rpx 维度,忽略字符串、注释与 URL。 */
7
+ export declare function collectRpxThemeVariables(css: string | postcss.Root): string[];
8
+ /** 检查 calc 内的变量与内联 rpx;解析失败不报告安全结论。 */
9
+ export declare function inspectRpxCalcUsage(css: string, themeVariables: ReadonlySet<string>): RpxCalcUsage | undefined;