@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
@@ -0,0 +1,145 @@
1
+ import { parseCssImportSpecifier, quoteCssImportSpecifier, tokenizer, u } from "./resolve-D-FbFBpF.js";
2
+ import { postcss as postcss$1 } from "./postcss-runtime-i5rHe_mj.js";
3
+ import postcss from "postcss";
4
+ import scss, { default as scssSyntax } from "postcss-scss";
5
+ //#region src/syntax/parse.ts
6
+ /** 解析标准 CSS;调用方负责处理非法输入。 */
7
+ function parseCssSource(source, from) {
8
+ return postcss.parse(source, { from });
9
+ }
10
+ /**
11
+ * 解析 SCSS/Sass 风格源码。
12
+ * `postcss.parse` 不读取 syntax 选项,行注释和插值必须走 SCSS parser。
13
+ */
14
+ function parseScssSource(source, from) {
15
+ return scssSyntax.parse(source, { from });
16
+ }
17
+ function stringifyScssSource(root) {
18
+ return root.toString(scssSyntax.stringify);
19
+ }
20
+ /** Harmony 在 Sass 预处理前读取局部样式;必须识别行注释,避免将其并入选择器。 */
21
+ function parseUniAppXStyleSource(source) {
22
+ return parseScssSource(source);
23
+ }
24
+ function isUniAppXStyleSourceEmpty(source) {
25
+ try {
26
+ return parseUniAppXStyleSource(source).nodes.every((node) => node.type === "comment");
27
+ } catch {
28
+ return false;
29
+ }
30
+ }
31
+ //#endregion
32
+ //#region src/syntax/runtime-signature.ts
33
+ function rawField(node, field, value) {
34
+ const raw = node.raws[field];
35
+ return raw?.value === value ? raw.raw : value;
36
+ }
37
+ function signatureNodes(nodes) {
38
+ const result = [];
39
+ for (const node of nodes) {
40
+ if (node.type === "comment") continue;
41
+ const before = node.raws.before?.trim() ?? "";
42
+ const between = node.raws.between?.trim() ?? "";
43
+ if (node.type === "decl") result.push([
44
+ "decl",
45
+ before,
46
+ node.prop,
47
+ between,
48
+ rawField(node, "value", node.value),
49
+ Boolean(node.important)
50
+ ]);
51
+ else {
52
+ const after = node.raws.after?.trim() ?? "";
53
+ if (node.type === "rule") result.push([
54
+ "rule",
55
+ before,
56
+ rawField(node, "selector", node.selector),
57
+ between,
58
+ signatureNodes(node.nodes),
59
+ after
60
+ ]);
61
+ else result.push([
62
+ "atrule",
63
+ before,
64
+ node.name,
65
+ node.raws.afterName?.trim() ?? "",
66
+ rawField(node, "params", node.params),
67
+ between,
68
+ Boolean(node.nodes),
69
+ signatureNodes(node.nodes ?? []),
70
+ after
71
+ ]);
72
+ }
73
+ }
74
+ return result;
75
+ }
76
+ /** 忽略结构性排版,保留值、选择器和 token 边界;不追求合并所有等价 CSS。 */
77
+ function createCssRuntimeAffectingSignature(source) {
78
+ try {
79
+ const root = parseCssSource(source);
80
+ return JSON.stringify([
81
+ "css",
82
+ signatureNodes(root.nodes),
83
+ root.raws.after?.trim() ?? ""
84
+ ]);
85
+ } catch {
86
+ return JSON.stringify(["raw", source]);
87
+ }
88
+ }
89
+ //#endregion
90
+ //#region src/syntax/location-dependencies.ts
91
+ const LOCATION_SYNTAX_HINT_RE = /[@\\]|url\(/i;
92
+ const ABSOLUTE_URL_RE = /^(?:[a-z][a-z\d+.-]*:|\/|#)/i;
93
+ function isIndependentUrl(value) {
94
+ return ABSOLUTE_URL_RE.test(value.trim());
95
+ }
96
+ /** 判断 CSS 转换是否依赖资源位置;路径解析和缓存范围仍由调用方负责。 */
97
+ function hasCssLocationDependencies(source) {
98
+ if (!LOCATION_SYNTAX_HINT_RE.test(source)) return false;
99
+ let malformed = false;
100
+ const stream = tokenizer({ css: source }, { onParseError() {
101
+ malformed = true;
102
+ } });
103
+ const nextSignificant = () => {
104
+ let token = stream.nextToken();
105
+ while (token[0] === u.Whitespace || token[0] === u.Comment) token = stream.nextToken();
106
+ return token;
107
+ };
108
+ while (!stream.endOfFile()) {
109
+ const token = stream.nextToken();
110
+ if (token[0] === u.AtKeyword && token[4].value.toLowerCase() === "import") return true;
111
+ if (token[0] === u.URL && !isIndependentUrl(token[4].value)) return true;
112
+ if (token[0] === u.Function && token[4].value.toLowerCase() === "url") {
113
+ const value = nextSignificant();
114
+ if (value[0] !== u.String || !isIndependentUrl(value[4].value)) return true;
115
+ if (nextSignificant()[0] !== u.CloseParen) return true;
116
+ }
117
+ }
118
+ return malformed;
119
+ }
120
+ //#endregion
121
+ //#region src/syntax/rewrite-imports.ts
122
+ /** 改写请求串;文件查找、包解析与路径规则由调用方提供。 */
123
+ function rewriteCssImportSpecifiers(css, resolve, options = {}) {
124
+ let root;
125
+ try {
126
+ root = postcss$1.parse(css);
127
+ } catch (error) {
128
+ if (options.tolerateInvalidCss) return css;
129
+ throw error;
130
+ }
131
+ const names = new Set(options.atRuleNames ?? ["import"]);
132
+ let changed = false;
133
+ root.walkAtRules((rule) => {
134
+ if (!names.has(rule.name)) return;
135
+ const parsed = parseCssImportSpecifier(rule.params);
136
+ if (!parsed) return;
137
+ const replacement = resolve(parsed.specifier);
138
+ if (!replacement) return;
139
+ rule.params = rule.params.replace(parsed.raw, () => quoteCssImportSpecifier(replacement, parsed.quote));
140
+ changed = true;
141
+ });
142
+ return changed ? root.toString() : css;
143
+ }
144
+ //#endregion
145
+ export { createCssRuntimeAffectingSignature, hasCssLocationDependencies, isUniAppXStyleSourceEmpty, parseCssSource, parseScssSource, parseUniAppXStyleSource, rewriteCssImportSpecifiers, scss, stringifyScssSource };
@@ -0,0 +1,34 @@
1
+ let _weapp_core_escape = require("@weapp-core/escape");
2
+ //#region src/shared.ts
3
+ const escapeOptionsCache = /* @__PURE__ */ new WeakMap();
4
+ function getEscapeOptions(escapeMap) {
5
+ let cached = escapeOptionsCache.get(escapeMap);
6
+ if (!cached) {
7
+ cached = { map: escapeMap };
8
+ escapeOptionsCache.set(escapeMap, cached);
9
+ }
10
+ return cached;
11
+ }
12
+ function internalCssSelectorReplacer(selectors, options) {
13
+ const escapeMap = options?.escapeMap;
14
+ if (escapeMap === void 0 || escapeMap === _weapp_core_escape.MappingChars2String) return (0, _weapp_core_escape.escape)(selectors);
15
+ return (0, _weapp_core_escape.escape)(selectors, getEscapeOptions(escapeMap));
16
+ }
17
+ function composeIsPseudo(strs) {
18
+ if (typeof strs === "string") return strs;
19
+ if (strs.length > 1) return `:is(${strs.join(",")})`;
20
+ return strs.join("");
21
+ }
22
+ //#endregion
23
+ Object.defineProperty(exports, "composeIsPseudo", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return composeIsPseudo;
27
+ }
28
+ });
29
+ Object.defineProperty(exports, "internalCssSelectorReplacer", {
30
+ enumerable: true,
31
+ get: function() {
32
+ return internalCssSelectorReplacer;
33
+ }
34
+ });
@@ -0,0 +1,23 @@
1
+ import { MappingChars2String, escape } from "@weapp-core/escape";
2
+ //#region src/shared.ts
3
+ const escapeOptionsCache = /* @__PURE__ */ new WeakMap();
4
+ function getEscapeOptions(escapeMap) {
5
+ let cached = escapeOptionsCache.get(escapeMap);
6
+ if (!cached) {
7
+ cached = { map: escapeMap };
8
+ escapeOptionsCache.set(escapeMap, cached);
9
+ }
10
+ return cached;
11
+ }
12
+ function internalCssSelectorReplacer(selectors, options) {
13
+ const escapeMap = options?.escapeMap;
14
+ if (escapeMap === void 0 || escapeMap === MappingChars2String) return escape(selectors);
15
+ return escape(selectors, getEscapeOptions(escapeMap));
16
+ }
17
+ function composeIsPseudo(strs) {
18
+ if (typeof strs === "string") return strs;
19
+ if (strs.length > 1) return `:is(${strs.join(",")})`;
20
+ return strs.join("");
21
+ }
22
+ //#endregion
23
+ export { composeIsPseudo, internalCssSelectorReplacer };
@@ -0,0 +1,4 @@
1
+ export declare function collectCssApplyCandidates(css: string): string[];
2
+ export declare function collectGeneratorCssCandidates(css: string): string[];
3
+ /** 仅收集具有 Tailwind 上下文的运行时 apply 候选,复用同一次解析结果。 */
4
+ export declare function collectRuntimeApplyCandidates(css: string): string[];
@@ -0,0 +1,15 @@
1
+ import type { Root } from 'postcss';
2
+ import { isTailwindCssImport } from '../syntax/css-import.js';
3
+ /** 只提取来源指令;默认扫描策略与配置加载由调用层决定。 */
4
+ export declare function describeCssSources(root: Root, isSourceImport?: typeof isTailwindCssImport): {
5
+ imports: {
6
+ none?: boolean;
7
+ sourcePath?: string | undefined;
8
+ }[];
9
+ sources: {
10
+ sourcePath: string;
11
+ negated: boolean;
12
+ }[];
13
+ configs: string[];
14
+ inlineCandidates: import("./inline-source.js").TailwindInlineSourceCandidates;
15
+ };
@@ -0,0 +1,5 @@
1
+ export declare function parseConfigParam(params: string): string | undefined;
2
+ export declare function parseSourceFileParam(params: string): {
3
+ negated: boolean;
4
+ sourcePath: string;
5
+ } | undefined;
@@ -0,0 +1,30 @@
1
+ import type { TailwindSourceEntry } from '@weapp-tailwindcss/source-scan';
2
+ import type { Root } from 'postcss';
3
+ export interface CssScanDefinition {
4
+ root: Root;
5
+ base: string;
6
+ }
7
+ export interface CssScanPolicy {
8
+ base: string;
9
+ defaultBase?: string | undefined;
10
+ automatic: 'auto' | 'fallback' | 'disabled';
11
+ requireImport?: boolean;
12
+ pattern: string;
13
+ config?: string | undefined;
14
+ configResolution: 'module' | 'path';
15
+ sourceEntries?: TailwindSourceEntry[] | undefined;
16
+ loadConfigContent?: boolean;
17
+ ignoredPatterns?: readonly string[];
18
+ }
19
+ /** 将 AST 描述与配置 content 合并,再交给共享扫描策略生成执行计划。 */
20
+ export declare function resolveCssScanSources(definitions: CssScanDefinition[], policy: CssScanPolicy): Promise<{
21
+ entries: TailwindSourceEntry[];
22
+ explicitEntries: TailwindSourceEntry[];
23
+ configEntries: TailwindSourceEntry[];
24
+ configGroups: TailwindSourceEntry[][];
25
+ configPaths: string[];
26
+ inlineCandidates: {
27
+ included: Set<string>;
28
+ excluded: Set<string>;
29
+ };
30
+ }>;
@@ -0,0 +1,16 @@
1
+ /** 复用本次解析;命中配置缓存时不展开 inline 候选。 */
2
+ export declare function analyzeTailwindV4EntrySource(css: string): {
3
+ configRequests: string[];
4
+ getSourceDirectives(): {
5
+ sourceRequests: {
6
+ sourcePath: string;
7
+ negated: boolean;
8
+ }[];
9
+ importSourcePath: string | undefined;
10
+ hasSourceNone: boolean;
11
+ hasTailwindCssImport: boolean;
12
+ includesPreflight: boolean;
13
+ inlineCandidates: import("../inline-source.js").TailwindInlineSourceCandidates;
14
+ };
15
+ } | undefined;
16
+ export type TailwindV4EntrySourceAnalysis = NonNullable<ReturnType<typeof analyzeTailwindV4EntrySource>>;
@@ -0,0 +1,5 @@
1
+ /** 单次入口选择内复用解析结果,仅在需要匹配时计算指纹。 */
2
+ export declare function analyzeTailwindV4Source(source: string, configBasename: (request: string) => string): {
3
+ hasExplicitDirectives: boolean;
4
+ getFingerprint(): Set<string>;
5
+ };
@@ -1,30 +1,9 @@
1
+ import type { TailwindSourceEntry } from '@weapp-tailwindcss/source-scan';
1
2
  import type { Root } from 'postcss';
2
- export interface TailwindSourceEntry {
3
- base: string;
4
- pattern: string;
5
- negated: boolean;
6
- }
7
3
  export type { TailwindInlineSourceCandidates } from './source-scan/inline-source.js';
8
4
  export { collectCssInlineSourceCandidates, expandInlineSourceCandidatePattern } from './source-scan/inline-source.js';
9
- export declare const DEFAULT_SOURCE_SCAN_EXTENSIONS: string[];
10
- export declare const FULL_SOURCE_SCAN_EXTENSIONS: string[];
11
- export declare function createSourceScanPattern(extensions?: string[]): string;
12
- export declare const FULL_SOURCE_SCAN_PATTERN: string;
13
- export declare const FULL_SOURCE_SCAN_EXTENSION_RE: RegExp;
14
- export declare function toPosixPath(value: string): string;
15
- export declare function resolveSourceScanPath(value: string): string;
16
- export declare function isFileExcludedByTailwindSourceEntries(file: string, entries: TailwindSourceEntry[] | undefined): boolean;
17
- export declare function isFileMatchedByTailwindSourceEntries(file: string, entries: TailwindSourceEntry[] | undefined): boolean;
18
- export declare function createTailwindSourceEntryMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
19
- export declare function parseConfigParam(params: string): string | undefined;
20
- export declare function normalizeLegacyContentEntries(content: unknown, base: string, options?: {
21
- relativeBase?: string | undefined;
22
- }): TailwindSourceEntry[];
23
- export declare function resolveTailwindSourceEntry(sourcePath: string, base: string, negated: boolean, defaultPattern?: string): Promise<TailwindSourceEntry>;
24
- export declare function parseSourceFileParam(params: string): {
25
- negated: boolean;
26
- sourcePath: string;
27
- } | undefined;
5
+ export { parseConfigParam, parseSourceFileParam } from './source-scan/params.js';
6
+ export { createSourceScanPattern, createTailwindSourceEntryMatcher, DEFAULT_SOURCE_SCAN_EXTENSIONS, FULL_SOURCE_SCAN_EXTENSION_RE, FULL_SOURCE_SCAN_EXTENSIONS, FULL_SOURCE_SCAN_PATTERN, isFileExcludedByTailwindSourceEntries, isFileMatchedByTailwindSourceEntries, normalizeGlobPattern, normalizeLegacyContentEntries, resolveSourceScanPath, resolveTailwindSourceEntry, type TailwindSourceEntry, toPosixPath, } from '@weapp-tailwindcss/source-scan';
28
7
  export declare function resolveCssSourceEntries(root: Root, base: string, defaultPattern?: string): Promise<TailwindSourceEntry[]>;
29
8
  export declare function expandTailwindSourceEntries(entries: TailwindSourceEntry[], options?: {
30
9
  ignore?: string[];
@@ -1,2 +1,3 @@
1
1
  export { type CssImportSourceParam, type CssImportSpecifier, isTailwindCssImport, parseCssImportSpecifier, parseImportSourceParam, quoteCssImportSpecifier, } from './css-import.js';
2
2
  export { isUniAppXStyleSourceEmpty, parseCssSource, parseScssSource, parseUniAppXStyleSource, scss, stringifyScssSource, } from './parse.js';
3
+ export { createCssRuntimeAffectingSignature } from './runtime-signature.js';
@@ -0,0 +1,2 @@
1
+ /** 判断 CSS 转换是否依赖资源位置;路径解析和缓存范围仍由调用方负责。 */
2
+ export declare function hasCssLocationDependencies(source: string): boolean;
@@ -0,0 +1,5 @@
1
+ /** 改写请求串;文件查找、包解析与路径规则由调用方提供。 */
2
+ export declare function rewriteCssImportSpecifiers(css: string, resolve: (specifier: string) => string | null | undefined, options?: {
3
+ atRuleNames?: string[];
4
+ tolerateInvalidCss?: boolean;
5
+ }): string;
@@ -0,0 +1,2 @@
1
+ /** 忽略结构性排版,保留值、选择器和 token 边界;不追求合并所有等价 CSS。 */
2
+ export declare function createCssRuntimeAffectingSignature(source: string): string;
@@ -0,0 +1 @@
1
+ export declare function canProcessSourceStyleAsCss(source: string, file: string): boolean;