weapp-tailwindcss 5.0.13 → 5.1.0

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 (178) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/auto-Ba6hDrse.mjs +13 -0
  4. package/dist/auto-DtU6f3X6.js +18 -0
  5. package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
  6. package/dist/bundlers/shared/generator-css/directives.d.ts +2 -1
  7. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +21 -9
  8. package/dist/bundlers/shared/generator-css/local-imports.d.ts +3 -0
  9. package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +3 -0
  10. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +0 -1
  11. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -1
  12. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +3 -3
  13. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -1
  14. package/dist/bundlers/shared/generator-css/types.d.ts +13 -1
  15. package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -1
  16. package/dist/bundlers/shared/run-tasks.d.ts +1 -0
  17. package/dist/bundlers/shared/v4-generation-core.d.ts +11 -0
  18. package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
  19. package/dist/bundlers/vite/css-memory.d.ts +10 -0
  20. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +0 -1
  21. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
  22. package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -0
  23. package/dist/bundlers/vite/generate-bundle/env-flags.d.ts +0 -1
  24. package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +12 -0
  25. package/dist/bundlers/vite/generate-bundle/finalize.d.ts +5 -0
  26. package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +21 -18
  27. package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +3 -1
  28. package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +1 -0
  29. package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
  30. package/dist/bundlers/vite/generate-bundle/vite-css-cache.d.ts +1 -1
  31. package/dist/bundlers/vite/generate-bundle.d.ts +3 -1
  32. package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -0
  33. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +3 -3
  34. package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
  35. package/dist/bundlers/vite/runtime-class-set.d.ts +5 -5
  36. package/dist/bundlers/vite/source-candidates/script.d.ts +1 -7
  37. package/dist/bundlers/vite/source-candidates.d.ts +9 -2
  38. package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -6
  39. package/dist/bundlers/vite/source-scan.d.ts +2 -2
  40. package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
  41. package/dist/bundlers/vite/utils.d.ts +1 -0
  42. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +24 -0
  43. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +48 -11
  44. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +28 -0
  45. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +4 -2
  46. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +10 -1
  47. package/dist/bundlers/webpack/shared/css-loader-runtime.d.ts +1 -0
  48. package/dist/cache/index.d.ts +1 -0
  49. package/dist/cli/mount-options.d.ts +2 -2
  50. package/dist/cli.js +124 -437
  51. package/dist/cli.mjs +120 -433
  52. package/dist/context/index.d.ts +3 -3
  53. package/dist/context/style-options.d.ts +4 -1
  54. package/dist/context/tailwindcss.d.ts +1 -1
  55. package/dist/{precheck-B0Z8yW7E.js → context-BHxLe743.js} +391 -153
  56. package/dist/{precheck-CRI90iL1.mjs → context-Mbzkek1q.mjs} +368 -137
  57. package/dist/core.js +15 -12
  58. package/dist/core.mjs +10 -7
  59. package/dist/css-macro.js +1 -1
  60. package/dist/css-macro.mjs +1 -1
  61. package/dist/{defaults-C_J_kBpw.js → defaults-CVcKbXBG.js} +4 -15
  62. package/dist/{defaults-Bqx18S1f.mjs → defaults-ZElj1zKc.mjs} +5 -10
  63. package/dist/defaults.d.ts +1 -7
  64. package/dist/defaults.js +1 -2
  65. package/dist/defaults.mjs +2 -2
  66. package/dist/generator/index.d.ts +6 -7
  67. package/dist/generator/options.d.ts +3 -3
  68. package/dist/generator/types.d.ts +9 -10
  69. package/dist/generator-9rUz4Hcb.js +170 -0
  70. package/dist/generator-Dc4qaPmT.mjs +123 -0
  71. package/dist/generator.js +10 -16
  72. package/dist/generator.mjs +3 -3
  73. package/dist/{gulp-XT8Jc7lH.js → gulp-B_sdP6dx.js} +47 -87
  74. package/dist/{gulp-DfOQERcV.mjs → gulp-uM36oIJs.mjs} +40 -80
  75. package/dist/gulp.js +1 -1
  76. package/dist/gulp.mjs +1 -1
  77. package/dist/{hmr-timing-DQIP_8qP.mjs → hmr-timing-BXMLsF4b.mjs} +1145 -842
  78. package/dist/{hmr-timing-BMftW7Us.js → hmr-timing-CogqkFaF.js} +1262 -881
  79. package/dist/index.js +4 -4
  80. package/dist/index.mjs +4 -4
  81. package/dist/js/fast-path/oxc.d.ts +4 -0
  82. package/dist/js/precheck.d.ts +1 -0
  83. package/dist/postcss.js +3 -4
  84. package/dist/postcss.mjs +2 -3
  85. package/dist/presets.js +9 -19
  86. package/dist/presets.mjs +8 -18
  87. package/dist/runtime-branch/create-branch.d.ts +2 -0
  88. package/dist/runtime-branch/generator-target-env.d.ts +4 -0
  89. package/dist/runtime-branch/index.d.ts +6 -0
  90. package/dist/runtime-branch/mini-program.d.ts +2 -0
  91. package/dist/runtime-branch/native-app.d.ts +2 -0
  92. package/dist/runtime-branch/platform.d.ts +6 -0
  93. package/dist/runtime-branch/tailwind-version.d.ts +2 -0
  94. package/dist/runtime-branch/types.d.ts +37 -0
  95. package/dist/runtime-branch/web.d.ts +2 -0
  96. package/dist/runtime-branch.d.ts +1 -0
  97. package/dist/{bundle-state-CKWeTEhv.js → source-candidate-scan-signature-2ybpptAK.js} +261 -19
  98. package/dist/{bundle-state-zQ2MrDdi.mjs → source-candidate-scan-signature-Cvb5z1ha.mjs} +187 -17
  99. package/dist/tailwindcss/candidates.d.ts +7 -0
  100. package/dist/tailwindcss/index.d.ts +2 -2
  101. package/dist/tailwindcss/runtime/cache.d.ts +6 -6
  102. package/dist/tailwindcss/runtime-factory.d.ts +12 -0
  103. package/dist/tailwindcss/runtime-options.d.ts +8 -0
  104. package/dist/tailwindcss/runtime-types.d.ts +86 -0
  105. package/dist/tailwindcss/runtime.d.ts +6 -6
  106. package/dist/tailwindcss/source-scan.d.ts +1 -1
  107. package/dist/tailwindcss/targets.d.ts +2 -2
  108. package/dist/tailwindcss/v4/config.d.ts +3 -3
  109. package/dist/tailwindcss/v4/css-entries.d.ts +1 -0
  110. package/dist/tailwindcss/v4/css-sources.d.ts +4 -2
  111. package/dist/tailwindcss/v4/index.d.ts +1 -1
  112. package/dist/tailwindcss/v4/multi-runtime.d.ts +2 -0
  113. package/dist/tailwindcss/v4/runtime-factory.d.ts +15 -0
  114. package/dist/tailwindcss/v4/runtime-options.d.ts +2 -0
  115. package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
  116. package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
  117. package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +3 -3
  118. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +1 -1
  119. package/dist/tailwindcss/v4-engine/generator.d.ts +10 -3
  120. package/dist/tailwindcss/v4-engine/index.d.ts +1 -1
  121. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +7 -1
  122. package/dist/tailwindcss/v4-engine/source.d.ts +23 -6
  123. package/dist/tailwindcss/v4-engine/types.d.ts +8 -9
  124. package/dist/tailwindcss/version.d.ts +1 -1
  125. package/dist/tailwindcss-DHIYcqXT.js +1523 -0
  126. package/dist/tailwindcss-wyUHrfil.mjs +1418 -0
  127. package/dist/{transform-YmrmxuF3.js → transform-CQVOgmzM.js} +17 -17
  128. package/dist/{transform-DfcEjsZF.mjs → transform-tExdt40m.mjs} +2 -2
  129. package/dist/typedoc.export.d.ts +1 -1
  130. package/dist/types/index.d.ts +16 -17
  131. package/dist/types/shared.d.ts +1 -1
  132. package/dist/types/{typedoc-tailwindcss-patch.d.ts → typedoc-tailwindcss-runtime.d.ts} +4 -10
  133. package/dist/types/user-defined-options/general.d.ts +5 -3
  134. package/dist/types/user-defined-options/important.d.ts +2 -2
  135. package/dist/uni-app-x/style-asset.d.ts +1 -0
  136. package/dist/v4-engine-CF9zt4Cw.mjs +2396 -0
  137. package/dist/v4-engine-D4ubP7N5.js +2778 -0
  138. package/dist/{vite-CXHVsHmX.js → vite-CP0ylSxZ.js} +1081 -542
  139. package/dist/{vite-DjI09vVN.mjs → vite-CPO83EhA.mjs} +916 -376
  140. package/dist/vite.js +1 -1
  141. package/dist/vite.mjs +1 -1
  142. package/dist/weapp-tw-css-import-rewrite-loader.js +5350 -4165
  143. package/dist/weapp-tw-runtime-classset-loader.js +15 -4
  144. package/dist/webpack-Bsek8VhR.js +2094 -0
  145. package/dist/webpack-BzqhJ8yK.mjs +2082 -0
  146. package/dist/webpack.js +1 -1
  147. package/dist/webpack.mjs +1 -1
  148. package/package.json +4 -5
  149. package/dist/auto-CTp6wE5a.js +0 -33
  150. package/dist/auto-Cl8_hsG6.mjs +0 -22
  151. package/dist/bundlers/vite/incremental-runtime-class-set/v3-candidates.d.ts +0 -13
  152. package/dist/bundlers/vite/source-candidates/tailwind-v3-default-extractor.d.ts +0 -1
  153. package/dist/context/tailwindcss/rax.d.ts +0 -2
  154. package/dist/generator-CzpArpCL.js +0 -92
  155. package/dist/generator-ITLd7PTl.mjs +0 -67
  156. package/dist/tailwindcss/patcher-options.d.ts +0 -8
  157. package/dist/tailwindcss/patcher.d.ts +0 -12
  158. package/dist/tailwindcss/runtime-patch.d.ts +0 -5
  159. package/dist/tailwindcss/v3-engine/generator/cache-key.d.ts +0 -3
  160. package/dist/tailwindcss/v3-engine/generator/content.d.ts +0 -10
  161. package/dist/tailwindcss/v3-engine/generator/runtime-ready.d.ts +0 -2
  162. package/dist/tailwindcss/v3-engine/generator.d.ts +0 -19
  163. package/dist/tailwindcss/v3-engine/index.d.ts +0 -4
  164. package/dist/tailwindcss/v3-engine/miniprogram.d.ts +0 -4
  165. package/dist/tailwindcss/v3-engine/source.d.ts +0 -5
  166. package/dist/tailwindcss/v3-engine/types.d.ts +0 -61
  167. package/dist/tailwindcss/v4/multi-patcher.d.ts +0 -2
  168. package/dist/tailwindcss/v4/patcher-options.d.ts +0 -2
  169. package/dist/tailwindcss/v4/patcher.d.ts +0 -15
  170. package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +0 -1
  171. package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +0 -1
  172. package/dist/tailwindcss-DTq3uYBK.mjs +0 -556
  173. package/dist/tailwindcss-DZEwT3C_.js +0 -613
  174. package/dist/v3-engine-2rrgylhn.js +0 -4686
  175. package/dist/v3-engine-C6eJ0YzK.mjs +0 -4272
  176. package/dist/webpack-BcPpnT90.mjs +0 -1184
  177. package/dist/webpack-CfkUkMXG.js +0 -1196
  178. /package/dist/tailwindcss/{patcher-resolve.d.ts → runtime-resolve.d.ts} +0 -0
package/README.en.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > English | [简体中文](./README.md)
4
4
 
5
- This is the core package that brings Tailwind CSS to mini program ecosystems, handling class transformation, CSS compatibility, framework build adapters, and Tailwind v3/v4 support.
5
+ This is the core package that brings Tailwind CSS to mini program ecosystems, handling class transformation, CSS compatibility, framework build adapters, and Tailwind v4 support.
6
6
 
7
7
  ## Website
8
8
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > 简体中文 | [English](./README.en.md)
4
4
 
5
- 这个包是把 Tailwind CSS 带到小程序生态的核心入口,负责类名转译、CSS 兼容、框架构建适配和 Tailwind v3/v4 支持。
5
+ 这个包是把 Tailwind CSS 带到小程序生态的核心入口,负责类名转译、CSS 兼容、框架构建适配和 Tailwind v4 支持。
6
6
 
7
7
  ## 官网
8
8
 
@@ -0,0 +1,13 @@
1
+ import { hasCssMacroStyleOptions, hasCssMacroTailwindV4Directive, transformCssMacroCss, withCssMacroStyleOptions } from "@weapp-tailwindcss/postcss";
2
+ //#region src/css-macro/auto.ts
3
+ const CSS_MACRO_PLUGIN_MARKER = "__weappTailwindcssCssMacro";
4
+ function markCssMacroPlugin(value) {
5
+ Object.defineProperty(value, CSS_MACRO_PLUGIN_MARKER, {
6
+ configurable: false,
7
+ enumerable: false,
8
+ value: true
9
+ });
10
+ return value;
11
+ }
12
+ //#endregion
13
+ export { withCssMacroStyleOptions as a, transformCssMacroCss as i, hasCssMacroTailwindV4Directive as n, markCssMacroPlugin as r, hasCssMacroStyleOptions as t };
@@ -0,0 +1,18 @@
1
+ require("@weapp-tailwindcss/postcss");
2
+ //#region src/css-macro/auto.ts
3
+ const CSS_MACRO_PLUGIN_MARKER = "__weappTailwindcssCssMacro";
4
+ function markCssMacroPlugin(value) {
5
+ Object.defineProperty(value, CSS_MACRO_PLUGIN_MARKER, {
6
+ configurable: false,
7
+ enumerable: false,
8
+ value: true
9
+ });
10
+ return value;
11
+ }
12
+ //#endregion
13
+ Object.defineProperty(exports, "markCssMacroPlugin", {
14
+ enumerable: true,
15
+ get: function() {
16
+ return markCssMacroPlugin;
17
+ }
18
+ });
@@ -1 +1 @@
1
- export { finalizeMiniProgramCss, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
1
+ export { finalizeMiniProgramCss, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, stripMiniProgramCssSpecificityPlaceholders, } from '@weapp-tailwindcss/postcss';
@@ -5,10 +5,11 @@ export declare function parseImportRequest(params: string): string | undefined;
5
5
  export declare function hasLocalCssImport(rawSource: string): boolean;
6
6
  export declare function normalizeTailwindConfigDirectives(rawSource: string, base: string): string;
7
7
  export declare function normalizeTailwindSourceForGenerator(rawSource: string, options?: TailwindDirectiveOptions): string;
8
- export declare function normalizeTailwindV3CssEntrySource(rawSource: string): string;
9
8
  export declare function normalizeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
10
9
  export declare function removeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
11
10
  export declare function hasTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
11
+ export declare function hasTailwindNonRootGenerationDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
12
+ export declare function hasTailwindRootImportDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
12
13
  export declare function hasTailwindRootDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
13
14
  export declare function hasTailwindApplyDirective(rawSource: string): boolean;
14
15
  export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
@@ -3,7 +3,8 @@ import type { GeneratorResolvedSource } from './source-resolver';
3
3
  import type { createWeappTailwindcssGenerator } from '../../../generator';
4
4
  import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
5
5
  import type { InternalUserDefinedOptions } from '../../../types';
6
- export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
6
+ export declare function hasMiniProgramTailwindV4PreflightReset(css: string): boolean;
7
+ export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, _majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
7
8
  injectPreflight?: boolean;
8
9
  styleOptions?: Partial<IStyleHandlerOptions> | undefined;
9
10
  }): string;
@@ -19,20 +20,20 @@ export declare function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime: Set<
19
20
  majorVersion?: number | undefined;
20
21
  matchedCssSourceFile: boolean;
21
22
  }): Set<string>;
22
- export declare function shouldIsolateScopedCssSource(majorVersion: number | undefined, source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined, options: {
23
+ export declare function shouldIsolateScopedCssSource(_majorVersion: number | undefined, source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined, options: {
23
24
  cssHandlerOptions?: IStyleHandlerOptions | undefined;
24
25
  target: string;
25
26
  }): boolean;
26
- export declare function shouldIsolateCurrentTailwindV4CssCandidates(majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
27
+ export declare function shouldIsolateCurrentTailwindV4CssCandidates(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
27
28
  hasGeneratedCss: boolean;
28
29
  hasGeneratedMarkers: boolean;
29
30
  rawSource: string;
30
31
  }): boolean;
31
32
  export declare function shouldScanTailwindV4Sources(majorVersion: number | undefined, target: string, generatorRuntime: Set<string>, isolateCssSource: boolean): boolean;
32
- export declare function shouldAppendWebBundleCssFallback(target: string, options: {
33
+ export declare function shouldAppendWebBundleCssFallback(target: string, _options: {
33
34
  hasSourceDirectives: boolean;
34
35
  hasMatchedCssSourceFile: boolean;
35
- }): boolean;
36
+ }): target is "web";
36
37
  export declare function isEmptyCssSourceOrderParts(parts: {
37
38
  before: string;
38
39
  after: string;
@@ -45,17 +46,28 @@ export declare function splitRawSourceByGeneratedCssOrder(rawSource: string, raw
45
46
  after: string;
46
47
  } | undefined;
47
48
  export declare function shouldUseGeneratorForCurrentCss(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
49
+ forceGenerator?: boolean | undefined;
48
50
  hasGeneratedCss: boolean;
49
51
  hasGeneratedMarkers: boolean;
50
52
  hasSourceDirectives: boolean;
51
53
  rawSource: string;
52
- }): boolean | undefined;
54
+ }): boolean;
53
55
  export declare function hasGeneratorSourceDirectives(source: string, importFallback: boolean): boolean;
54
56
  export declare function createRuntimeWithCurrentCssCandidates(runtime: Set<string>, currentCssCandidates: string[], isolateCurrentCssCandidates: boolean): Set<string>;
55
57
  export declare function mergeGeneratorResults(generatedResults: GeneratorResult[]): (import("@/generator").TailwindV4GenerateResult & {
56
- target: import("@/generator").WeappTailwindcssGeneratorTarget;
58
+ target: WeappTailwindcssGeneratorTarget;
57
59
  rawCss: string;
58
- }) | undefined;
60
+ }) | {
61
+ css: string;
62
+ rawCss: string;
63
+ incrementalCss: string | undefined;
64
+ incrementalRawCss: string | undefined;
65
+ classSet: Set<string>;
66
+ dependencies: string[];
67
+ sources: import("@tailwindcss-mangle/engine").TailwindV4SourcePattern[];
68
+ target: any;
69
+ root: import("@tailwindcss-mangle/engine").TailwindV4CompiledSourceRoot;
70
+ rawCandidates: Set<string>;
71
+ } | undefined;
59
72
  type GeneratorResult = Awaited<ReturnType<ReturnType<typeof createWeappTailwindcssGenerator>['generate']>>;
60
- export declare function isSupportedGeneratorMajorVersion(majorVersion: number | undefined): boolean;
61
73
  export {};
@@ -5,3 +5,6 @@ export declare function splitLocalCssImports(source: string): {
5
5
  source: string;
6
6
  } | undefined;
7
7
  export declare function restoreLocalCssImports(css: string, imports: string | undefined): string;
8
+ export declare function rewriteLocalCssImportRequestsForOutput(css: string, options?: {
9
+ styleOutputExtension?: string | undefined;
10
+ }): string;
@@ -1,3 +1,6 @@
1
1
  export declare function createTailwindV4ApplyReferenceSource(css: string, sourceOptions: {
2
2
  packageName?: string;
3
3
  }): string;
4
+ export declare function createTailwindV4SourceReferenceSource(css: string, sourceOptions: {
5
+ packageName?: string;
6
+ }): string;
@@ -1,4 +1,3 @@
1
1
  import type { SourceStyleMatchOptions } from './types';
2
2
  export declare function normalizeCssSourceForCompare(css: string): string;
3
- export declare function getOutputFileStem(file: string): string;
4
3
  export declare function scoreTailwindV4CssSourceFileMatch(file: string, cssSourceFile: string, sourceOptions: SourceStyleMatchOptions): number;
@@ -12,4 +12,4 @@ export type GeneratorResolvedSource = TailwindResolvedSource & {
12
12
  __weappTailwindcssMeta?: GeneratorSourceMetadata | undefined;
13
13
  };
14
14
  export declare function withGeneratorSourceMetadata(source: TailwindResolvedSource, metadata: GeneratorSourceMetadata): GeneratorResolvedSource;
15
- export declare function withMatchedSourceSideMetadata(source: TailwindResolvedSource, resolvedEntrySource: SourceSideCssEntrySource): import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource;
15
+ export declare function withMatchedSourceSideMetadata(source: TailwindResolvedSource, resolvedEntrySource: SourceSideCssEntrySource): import("@tailwindcss-mangle/engine").TailwindV4ResolvedSource;
@@ -1,9 +1,9 @@
1
1
  import type { SourceSideCssEntryOptions } from '../source-files';
2
- import type { resolveTailwindV4SourceOptionsFromPatcher } from '../../../../generator';
2
+ import type { resolveTailwindV4SourceOptionsFromRuntime } from '../../../../generator';
3
3
  import type { TailwindSourceEntry } from '../../../../tailwindcss/source-scan';
4
4
  import type { InternalUserDefinedOptions } from '../../../../types';
5
5
  export interface GeneratorSourceRuntimeState {
6
- twPatcher: InternalUserDefinedOptions['twPatcher'];
6
+ tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
7
7
  }
8
8
  export interface GeneratorSourceSelectionOptions {
9
9
  runtime?: Set<string> | undefined;
@@ -11,7 +11,7 @@ export interface GeneratorSourceSelectionOptions {
11
11
  cssEntries?: string[] | undefined;
12
12
  cssSources?: TailwindV4CssSource[] | undefined;
13
13
  }
14
- export type TailwindV4SourceOptions = ReturnType<typeof resolveTailwindV4SourceOptionsFromPatcher> & {
14
+ export type TailwindV4SourceOptions = ReturnType<typeof resolveTailwindV4SourceOptionsFromRuntime> & {
15
15
  config?: string | undefined;
16
16
  outputRoot?: string | undefined;
17
17
  sourceFile?: string | undefined;
@@ -4,6 +4,6 @@ import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource
4
4
  export type { GeneratorResolvedSource, GeneratorSourceMetadata } from './source-resolver/metadata';
5
5
  export { resolveCssSourceBase } from './source-resolver/postcss-source';
6
6
  export type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './source-resolver/types';
7
- export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource | undefined>;
7
+ export declare function resolveGeneratorSource(_majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@tailwindcss-mangle/engine").TailwindV4ResolvedSource | undefined>;
8
8
  export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
9
9
  export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<any>;
@@ -5,7 +5,7 @@ import type { InternalUserDefinedOptions } from '../../../types';
5
5
  export interface GenerateCssByGeneratorOptions {
6
6
  opts: InternalUserDefinedOptions;
7
7
  runtimeState: {
8
- twPatcher: InternalUserDefinedOptions['twPatcher'];
8
+ tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
9
9
  readyPromise: Promise<void>;
10
10
  };
11
11
  runtime: Set<string>;
@@ -15,15 +15,27 @@ export interface GenerateCssByGeneratorOptions {
15
15
  cssUserHandlerOptions: IStyleHandlerOptions;
16
16
  cssSources?: TailwindV4CssSource[] | undefined;
17
17
  getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
18
+ sourceCandidates?: Set<string> | undefined;
18
19
  styleHandler: InternalUserDefinedOptions['styleHandler'];
19
20
  debug: (format: string, ...args: unknown[]) => void;
21
+ userRawSource?: string | undefined;
22
+ userRawSourceProcessed?: boolean | undefined;
23
+ forceGenerator?: boolean | undefined;
20
24
  previousCss?: string | undefined;
21
25
  deferEmptyScopedCssSource?: boolean | undefined;
26
+ restoreLocalCssImports?: boolean | undefined;
22
27
  }
23
28
  export interface GenerateCssByGeneratorResult {
24
29
  css: string;
30
+ classSet: Set<string>;
25
31
  target: string;
26
32
  source: 'generator';
27
33
  dependencies: string[];
28
34
  incremental?: boolean | undefined;
35
+ metadata?: {
36
+ file: string;
37
+ majorVersion?: number | undefined;
38
+ outputFile?: string | undefined;
39
+ rawCss?: string | undefined;
40
+ } | undefined;
29
41
  }
@@ -1,6 +1,9 @@
1
1
  import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
2
2
  import type { InternalUserDefinedOptions } from '../../../types';
3
+ export declare function removeTailwindV4GeneratedUserCssArtifacts(source: string): string;
3
4
  export declare function removeTailwindV4GeneratorAtRules(source: string): string;
5
+ export declare function isCommentOnlyCss(source: string): boolean;
6
+ export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
4
7
  export declare function stripTailwindSourceMediaFragments(source: string): string;
5
8
  export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
6
9
  export declare function splitUserCssLayerBlocks(source: string): {
@@ -13,7 +16,7 @@ export declare function extractGeneratedCssForUserLayerSelectors(css: string, us
13
16
  rest: string;
14
17
  };
15
18
  export declare function filterApplyOnlyGeneratedCss(css: string, source: string): string;
16
- export declare function shouldFilterApplyOnlyGeneratedCss(majorVersion: number | undefined, target: string, source: string, options: {
19
+ export declare function shouldFilterApplyOnlyGeneratedCss(_majorVersion: number | undefined, target: string, source: string, options: {
17
20
  hasGeneratedCss: boolean;
18
21
  hasGeneratedMarkers: boolean;
19
22
  }): boolean;
@@ -23,4 +26,5 @@ export declare function transformGeneratorUserCss(source: string, options: {
23
26
  cssUserHandlerOptions: IStyleHandlerOptions;
24
27
  styleHandler: InternalUserDefinedOptions['styleHandler'];
25
28
  importFallback: boolean;
29
+ processed?: boolean | undefined;
26
30
  }): Promise<string>;
@@ -1,2 +1,3 @@
1
1
  export declare function runWithConcurrency<T>(factories: Array<() => Promise<T>>, limit?: number): Promise<T[]>;
2
+ export declare function resolveTaskConcurrency(defaultLimit?: number): number;
2
3
  export declare function pushConcurrentTaskFactories(queue: Array<Promise<void>>, factories: Array<() => Promise<unknown>>, limit?: number): void;
@@ -0,0 +1,11 @@
1
+ import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css';
2
+ export interface TailwindV4GenerationCoreInput extends GenerateCssByGeneratorOptions {
3
+ outputFile?: string | undefined;
4
+ sourceCandidates?: Set<string> | undefined;
5
+ }
6
+ export interface TailwindV4GenerationCoreResult extends GenerateCssByGeneratorResult {
7
+ classSet: Set<string>;
8
+ dependencies: string[];
9
+ metadata: NonNullable<GenerateCssByGeneratorResult['metadata']>;
10
+ }
11
+ export declare function generateTailwindV4Css(options: TailwindV4GenerationCoreInput): Promise<TailwindV4GenerationCoreResult | undefined>;
@@ -9,7 +9,7 @@ interface RememberedMainCssSource {
9
9
  interface CssFinalizerContext {
10
10
  opts: InternalUserDefinedOptions;
11
11
  runtimeState: {
12
- twPatcher: InternalUserDefinedOptions['twPatcher'];
12
+ tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
13
13
  readyPromise: Promise<void>;
14
14
  };
15
15
  ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
@@ -11,8 +11,18 @@ export declare function createViteCssMemory(options: {
11
11
  getRememberedCssSources: () => Map<string, RememberedCssSource>;
12
12
  getStats: () => {
13
13
  rememberedCssSources: number;
14
+ rememberedCssSourcesRaw: {
15
+ bytes: number;
16
+ mb: number;
17
+ size: number;
18
+ };
14
19
  rememberedCssSignatureByFile: number;
15
20
  knownSfcSources: number;
21
+ knownSfcSourcesRaw: {
22
+ bytes: number;
23
+ mb: number;
24
+ size: number;
25
+ };
16
26
  };
17
27
  rememberCssSource: (entry: RememberedCssSource, cssRuntimeSignature?: string) => void;
18
28
  rememberKnownSfcSource: (id: string, code: string) => void;
@@ -1,2 +1 @@
1
1
  export declare function collectUnescapedDynamicCandidates(source: string, allowedCandidates?: Set<string>): string[];
2
- export declare function collectLegacyContainerCompatCandidates(sourceCandidates: Set<string>, candidates: Set<string>): Set<string>;
@@ -1,4 +1,4 @@
1
- import type { TailwindV4CssSource } from 'tailwindcss-patch';
1
+ import type { TailwindV4CssSource } from '@tailwindcss-mangle/engine';
2
2
  import type { InternalUserDefinedOptions } from '../../../types';
3
3
  export interface ConfiguredCssSourceEntry {
4
4
  file: string;
@@ -11,6 +11,7 @@ export declare function resolveReplayCssOutputFile(rootDir: string, file: string
11
11
  export declare function resolveReplayCssOutputFileFromSourceRoot(rootDir: string, file: string, sourceRoot: string | undefined): string;
12
12
  export declare function resolveViteCssOutputFile(file: string, opts: InternalUserDefinedOptions, isWebGeneratorTarget: boolean, preserveCssExtension?: boolean, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
13
13
  export declare function resolveViteCssPipelineOutputFile(file: string, opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
14
+ export declare function resolveViteCssPipelineOutputFileFromSourceFile(sourceFile: string, opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
14
15
  export declare function canProcessViteSourceStyleAsCss(source: string, file: string): boolean;
15
16
  export declare function normalizeCssSourceForCompare(css: string): string;
16
17
  export declare function stripStyleFileExtension(file: string): string;
@@ -3,5 +3,4 @@ export declare function resolveGenerateBundleEnvFlags(): {
3
3
  disableDirtyOptimization: boolean;
4
4
  disableJsPrecheck: boolean;
5
5
  debugCssDiff: boolean;
6
- disableV3OxideSourceRuntime: boolean;
7
6
  };
@@ -0,0 +1,12 @@
1
+ import type { OutputAsset, OutputChunk } from 'rollup';
2
+ import type { GenerateBundleContext } from './types';
3
+ export declare function finalizeMiniProgramCssAssets(bundle: Record<string, OutputAsset | OutputChunk>, options: {
4
+ cssMatcher: GenerateBundleContext['opts']['cssMatcher'];
5
+ getCssHandlerOptions: GenerateBundleContext['getCssHandlerOptions'];
6
+ isWebGeneratorTarget: boolean;
7
+ lastCssResultByFile?: Map<string, string> | undefined;
8
+ onUpdate: GenerateBundleContext['opts']['onUpdate'];
9
+ recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
10
+ styleHandler: GenerateBundleContext['opts']['styleHandler'];
11
+ debug?: GenerateBundleContext['debug'];
12
+ }): Promise<number>;
@@ -54,5 +54,10 @@ interface FinalizeGenerateBundleOptions {
54
54
  transformRuntime: Set<string>;
55
55
  useIncrementalMode: boolean;
56
56
  }
57
+ export declare function normalizeTaroRootImportShellAssets(bundle: Record<string, OutputAsset | OutputChunk>, options: Pick<GenerateBundleContext['opts'], 'appType' | 'cssMatcher'> & {
58
+ debug: GenerateBundleContext['debug'];
59
+ onUpdate: GenerateBundleContext['opts']['onUpdate'];
60
+ recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
61
+ }): number;
57
62
  export declare function finalizeGenerateBundle(options: FinalizeGenerateBundleOptions): Promise<void>;
58
63
  export {};
@@ -5,8 +5,11 @@ export declare function resolveViteMemoryDebugStats(context: {
5
5
  cache: GenerateBundleContext['opts']['cache'];
6
6
  generatorRuntimeSize: number;
7
7
  getViteCssCacheStats?: (() => Record<string, unknown>) | undefined;
8
+ hasOmittedKnownFiles: boolean;
8
9
  lastCssResultByFile: Map<string, string>;
9
10
  phase: string;
11
+ processCachePruned: boolean;
12
+ processCachePruneSkipReason?: string | undefined;
10
13
  runtimeSize: number;
11
14
  sourceCandidatesSize: number;
12
15
  transformRuntimeSize: number;
@@ -14,6 +17,9 @@ export declare function resolveViteMemoryDebugStats(context: {
14
17
  }): {
15
18
  phase: string;
16
19
  mode: string;
20
+ bundle: {
21
+ hasOmittedKnownFiles: boolean;
22
+ };
17
23
  process: {
18
24
  rssMb: number;
19
25
  heapTotalMb: number;
@@ -28,10 +34,15 @@ export declare function resolveViteMemoryDebugStats(context: {
28
34
  generatorRuntime: number;
29
35
  };
30
36
  processCache: {
37
+ pruneSkipReason?: string;
31
38
  instance: number;
32
39
  hashMap: number;
33
40
  activeCacheKeys: number;
34
41
  activeHashKeys: number;
42
+ staleCacheKeys: number;
43
+ staleHashKeys: number;
44
+ pruned: boolean;
45
+ pruneSkipped: boolean;
35
46
  };
36
47
  viteCss: {
37
48
  lastCssResultByFile: {
@@ -41,21 +52,6 @@ export declare function resolveViteMemoryDebugStats(context: {
41
52
  };
42
53
  };
43
54
  tailwind: {
44
- v3: {
45
- max: number;
46
- entryCandidatesMax: number;
47
- entryCssBytesMax: number;
48
- size: number;
49
- entries: {
50
- key: string;
51
- candidates: number;
52
- classSet: number;
53
- cssBytes: number;
54
- rawCssBytes: number;
55
- exactResults: number;
56
- }[];
57
- keys: string[];
58
- };
59
55
  v4: {
60
56
  max: number;
61
57
  entryCandidatesMax: number;
@@ -64,14 +60,21 @@ export declare function resolveViteMemoryDebugStats(context: {
64
60
  taskMax: number;
65
61
  taskSize: number;
66
62
  entries: {
67
- key: string;
68
63
  candidates: number;
69
64
  classSet: number;
70
65
  cssBytes: number;
71
66
  rawCssBytes: number;
67
+ keyHash: string;
68
+ keyBytes: number;
69
+ }[];
70
+ keys: {
71
+ keyHash: string;
72
+ keyBytes: number;
73
+ }[];
74
+ taskKeys: {
75
+ keyHash: string;
76
+ keyBytes: number;
72
77
  }[];
73
- keys: string[];
74
- taskKeys: string[];
75
78
  };
76
79
  };
77
80
  } | undefined;
@@ -3,7 +3,9 @@ import type { BundleSnapshot } from '../bundle-state';
3
3
  import type { RememberedCssSource } from './types';
4
4
  export declare function extractSfcStyleSources(source: string): string[];
5
5
  export declare function hasSfcStyleSources(source: string): boolean;
6
- export declare function hasTailwindGenerationSource(source: string): boolean;
6
+ export declare function hasTailwindGenerationSource(source: string, options?: {
7
+ allowRootDirectives?: boolean | undefined;
8
+ }): boolean;
7
9
  export declare function resolveSfcStyleSourceFromOutputFile(outputFile: string, snapshot: BundleSnapshot, outputRoot: string, sourceRoot: string | undefined, cssMatcher: ((file: string) => boolean) | undefined, getSfcSource: ((file: string) => string | undefined) | undefined, debug: (format: string, ...args: unknown[]) => void): Promise<RememberedCssSource | undefined>;
8
10
  export declare function normalizeSfcSourceFileForCompare(file: string): string;
9
11
  export declare function collectChunkModuleIds(output: OutputChunk): string[];
@@ -2,6 +2,7 @@ import type { BundleSnapshot } from '../bundle-state';
2
2
  import type { SourceCandidateFilterOptions } from '../source-candidates';
3
3
  import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
4
4
  interface CreateSubpackageSourceCandidateScopeOptions {
5
+ cssSourceFiles?: Iterable<string> | undefined;
5
6
  getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
6
7
  getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
7
8
  projectRoot?: string | undefined;
@@ -8,7 +8,7 @@ import type { InternalUserDefinedOptions } from '../../../types';
8
8
  export interface GenerateBundleContext {
9
9
  opts: InternalUserDefinedOptions;
10
10
  runtimeState: {
11
- twPatcher: InternalUserDefinedOptions['twPatcher'];
11
+ tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
12
12
  readyPromise: Promise<void>;
13
13
  };
14
14
  ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
@@ -1,4 +1,4 @@
1
- export declare function resolveViteCssTaskConcurrency(useIncrementalMode: boolean): number;
1
+ export declare function resolveViteCssTaskConcurrency(_useIncrementalMode: boolean, _majorVersion?: number | undefined): number;
2
2
  export declare function normalizeViteCssCacheKey(file: string): string;
3
3
  export declare function rememberLastCssResult(resultByFile: Map<string, string>, sourceHashByFile: Map<string, string>, file: string, css: string, sourceHash: string): void;
4
4
  export declare function getLastCssResult(resultByFile: Map<string, string>, ...files: Array<string | undefined>): string | undefined;
@@ -1,7 +1,9 @@
1
1
  import type { OutputAsset, OutputChunk } from 'rollup';
2
2
  import type { GenerateBundleContext, GenerateBundleThis } from './generate-bundle/types';
3
3
  export { normalizeBundleFileNameKeysForTest } from './generate-bundle/bundle-file-names';
4
- export { resolveMiniProgramStyleOutputExtension, resolveReplayCssOutputFile, resolveReplayCssOutputFileFromSourceRoot, resolveViteCssPipelineOutputFile } from './generate-bundle/css-output';
4
+ export { resolveMiniProgramStyleOutputExtension, resolveReplayCssOutputFile, resolveReplayCssOutputFileFromSourceRoot, resolveViteCssPipelineOutputFile, resolveViteCssPipelineOutputFileFromSourceFile } from './generate-bundle/css-output';
5
5
  export { resolveRememberedCssSourceForTest } from './generate-bundle/remembered-css';
6
6
  export type { GenerateBundleContext, GenerateBundleThis, RememberedCssSource } from './generate-bundle/types';
7
+ export declare function shouldKeepRootMiniProgramStyleAsImportShell(appType: unknown): appType is "uni-app-x" | "taro" | "uni-app-vite";
8
+ export declare function shouldMoveRootMiniProgramStyleToImportShellOrigin(appType: unknown): appType is "taro";
7
9
  export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
@@ -1,2 +1,3 @@
1
1
  export declare function createEscapeFragments(escapeMap: Record<string, string>): string[];
2
2
  export declare function collectEscapedRuntimeCandidates(source: string, escapeMap: Record<string, string>, escapeFragments: string[]): Set<string>;
3
+ export declare function collectStrictEscapedRuntimeCandidates(source: string, escapeMap: Record<string, string>, escapeFragments: string[]): Set<string>;
@@ -1,7 +1,7 @@
1
1
  import type { BundleSnapshot } from './bundle-state';
2
- import type { TailwindcssPatcherLike } from '../../types';
2
+ import type { TailwindcssRuntimeLike } from '../../types';
3
3
  import type { IArbitraryValues } from '../../types/shared';
4
- import { extractRawCandidatesWithPositions, extractValidCandidates } from 'tailwindcss-patch';
4
+ import { extractRawCandidatesWithPositions, extractValidCandidates } from '@tailwindcss-mangle/engine';
5
5
  type ExtractValidCandidatesOptions = Parameters<typeof extractValidCandidates>[0];
6
6
  type MemoryExtractValidCandidatesOptions = ExtractValidCandidatesOptions & {
7
7
  content?: string;
@@ -13,7 +13,7 @@ type ExtractRawCandidatesFn = (content: string, extension?: string, options?: {
13
13
  bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
14
14
  }) => Promise<ExtractRawCandidateResult>;
15
15
  export interface BundleRuntimeClassSetManager {
16
- sync: (patcher: TailwindcssPatcherLike, snapshot: BundleSnapshot, options?: BundleRuntimeClassSetSyncOptions) => Promise<Set<string>>;
16
+ sync: (runtime: TailwindcssRuntimeLike, snapshot: BundleSnapshot, options?: BundleRuntimeClassSetSyncOptions) => Promise<Set<string>>;
17
17
  reset: () => Promise<void>;
18
18
  }
19
19
  export interface BundleRuntimeClassSetSyncOptions {
@@ -18,6 +18,7 @@ interface RewriteCssImportsOptions {
18
18
  onTailwindRootCss?: ((id: string, code: string) => Promise<void> | void) | undefined;
19
19
  onCssSourceTransform?: ((id: string, code: string) => Promise<void> | void) | undefined;
20
20
  shouldGenerateCss?: ((id: string, code: string) => boolean) | undefined;
21
+ shouldDeferGeneration?: ((id: string, code: string) => boolean) | undefined;
21
22
  }
22
23
  export declare function createRewriteCssImportsPlugins(options: RewriteCssImportsOptions): Plugin[];
23
24
  export declare function hasVitePipelineTailwindGenerationDirective(code: string): boolean;
@@ -2,8 +2,8 @@ import type { BundleSnapshot } from './bundle-state';
2
2
  import type { InternalUserDefinedOptions } from '../../types';
3
3
  interface CreateViteRuntimeClassSetOptions {
4
4
  opts: InternalUserDefinedOptions;
5
- initialTwPatcher: InternalUserDefinedOptions['twPatcher'];
6
- refreshTailwindcssPatcher: InternalUserDefinedOptions['refreshTailwindcssPatcher'];
5
+ initialTailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
6
+ refreshTailwindcssRuntime: InternalUserDefinedOptions['refreshTailwindcssRuntime'];
7
7
  uniAppXEnabled: boolean;
8
8
  customAttributesEntities: unknown;
9
9
  disabledDefaultTemplateHandler: boolean;
@@ -11,13 +11,13 @@ interface CreateViteRuntimeClassSetOptions {
11
11
  }
12
12
  export declare function createViteRuntimeClassSet(options: CreateViteRuntimeClassSetOptions): {
13
13
  runtimeState: {
14
- twPatcher: import("@/types").TailwindcssPatcherLike;
14
+ tailwindRuntime: import("@/types").TailwindcssRuntimeLike;
15
15
  readyPromise: Promise<void>;
16
- refreshTailwindcssPatcher: (options?: import("@/types").RefreshTailwindcssPatcherOptions) => Promise<import("@/types").TailwindcssPatcherLike>;
16
+ refreshTailwindcssRuntime: (options?: import("@/types").RefreshTailwindcssRuntimeOptions) => Promise<import("@/types").TailwindcssRuntimeLike>;
17
17
  };
18
18
  refreshRuntimeState: (force: boolean) => Promise<void>;
19
19
  ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
20
- ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
20
+ ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, _options?: {
21
21
  allowBaselineOnlyInitialSync?: boolean | undefined;
22
22
  baseClassSet?: Set<string> | undefined;
23
23
  transformOnly?: boolean | undefined;
@@ -1,7 +1 @@
1
- import type { IArbitraryValues } from '../../../types/shared';
2
- interface ScriptCandidateExtractionOptions {
3
- bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
4
- extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
5
- }
6
- export declare function extractScriptStringCandidates(source: string, extension: string, options: ScriptCandidateExtractionOptions): Promise<never[] | Set<string>>;
7
- export {};
1
+ export { extractScriptStringCandidates } from '../../../tailwindcss/candidates';
@@ -1,7 +1,7 @@
1
1
  import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
2
  import type { IArbitraryValues } from '../../types/shared';
3
- export { createTailwindV3DefaultExtractor } from './source-candidates/tailwind-v3-default-extractor';
4
- export interface SourceCandidateCollector {
3
+ export interface SourceCandidateStore {
4
+ syncSource: (id: string, source: string) => Promise<void>;
5
5
  sync: (id: string, source: string) => Promise<void>;
6
6
  syncCss: (id: string, source: string) => Promise<void>;
7
7
  merge: (id: string, source: string) => Promise<void>;
@@ -21,12 +21,17 @@ export interface SourceCandidateCollector {
21
21
  resetScan: () => void;
22
22
  clear: () => void;
23
23
  }
24
+ export interface SourceCandidateCollector extends SourceCandidateStore {
25
+ }
24
26
  export interface SourceCandidateCollectorSnapshot {
25
27
  candidatesById: Array<[string, string[]]>;
26
28
  cssCandidatesById?: Array<[string, string[]]> | undefined;
29
+ cssSourceById?: Array<[string, string]> | undefined;
27
30
  scanCandidatesById?: Array<[string, string[]]> | undefined;
31
+ scanSourceById?: Array<[string, string]> | undefined;
28
32
  sourceById?: Array<[string, string]> | undefined;
29
33
  transformCandidatesById?: Array<[string, string[]]> | undefined;
34
+ transformSourceById?: Array<[string, string]> | undefined;
30
35
  inlineExcludedCandidates: string[];
31
36
  inlineIncludedCandidates: string[];
32
37
  }
@@ -44,6 +49,7 @@ export interface SourceCandidateCollectorOptions {
44
49
  extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
45
50
  }
46
51
  export declare function isSourceCandidateRequest(id: string): boolean;
52
+ export declare function createSourceCandidateStore(options?: SourceCandidateCollectorOptions): SourceCandidateStore;
47
53
  export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
48
54
  export declare function getSourceCandidateContentCacheStatsForTest(): {
49
55
  max: number;
@@ -51,3 +57,4 @@ export declare function getSourceCandidateContentCacheStatsForTest(): {
51
57
  keys: string[];
52
58
  };
53
59
  export declare function clearSourceCandidateContentCacheForTest(): void;
60
+ export {};