weapp-tailwindcss 5.0.12 → 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 (205) 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 +27 -10
  8. package/dist/bundlers/shared/generator-css/local-imports.d.ts +3 -0
  9. package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -0
  10. package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +6 -0
  11. package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +7 -0
  12. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +3 -0
  13. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +15 -0
  14. package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +12 -0
  15. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +22 -0
  16. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +6 -23
  17. package/dist/bundlers/shared/generator-css/types.d.ts +15 -1
  18. package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -1
  19. package/dist/bundlers/shared/generator-css/validate.d.ts +1 -0
  20. package/dist/bundlers/shared/run-tasks.d.ts +1 -0
  21. package/dist/bundlers/shared/v4-generation-core.d.ts +11 -0
  22. package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
  23. package/dist/bundlers/vite/css-memory.d.ts +37 -0
  24. package/dist/bundlers/vite/generate-bundle/bundle-file-names.d.ts +2 -0
  25. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +0 -1
  26. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +8 -0
  27. package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +4 -0
  28. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +5 -0
  29. package/dist/bundlers/vite/generate-bundle/css-output.d.ts +9 -7
  30. package/dist/bundlers/vite/generate-bundle/env-flags.d.ts +6 -0
  31. package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +12 -0
  32. package/dist/bundlers/vite/generate-bundle/finalize.d.ts +63 -0
  33. package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +31 -0
  34. package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +80 -0
  35. package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +53 -0
  36. package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -1
  37. package/dist/bundlers/vite/generate-bundle/runtime-linked-css.d.ts +4 -0
  38. package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +21 -0
  39. package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +5 -2
  40. package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +30 -0
  41. package/dist/bundlers/vite/generate-bundle/timing.d.ts +1 -0
  42. package/dist/bundlers/vite/generate-bundle/types.d.ts +3 -1
  43. package/dist/bundlers/vite/generate-bundle/uni-app-x-postprocess.d.ts +20 -0
  44. package/dist/bundlers/vite/generate-bundle/vite-css-cache.d.ts +6 -0
  45. package/dist/bundlers/vite/generate-bundle.d.ts +4 -1
  46. package/dist/bundlers/vite/hot-css-modules.d.ts +5 -0
  47. package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -0
  48. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +3 -3
  49. package/dist/bundlers/vite/map-cache.d.ts +2 -0
  50. package/dist/bundlers/vite/processed-css-assets.d.ts +16 -0
  51. package/dist/bundlers/vite/resolve-app-type.d.ts +1 -2
  52. package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
  53. package/dist/bundlers/vite/runtime-class-set.d.ts +5 -5
  54. package/dist/bundlers/vite/source-candidate-scan-signature.d.ts +13 -0
  55. package/dist/bundlers/vite/source-candidates/script.d.ts +1 -7
  56. package/dist/bundlers/vite/source-candidates.d.ts +12 -2
  57. package/dist/bundlers/vite/source-scan/css-entries.d.ts +3 -6
  58. package/dist/bundlers/vite/source-scan.d.ts +3 -3
  59. package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
  60. package/dist/bundlers/vite/utils.d.ts +1 -0
  61. package/dist/bundlers/vite/weapp-vite-config.d.ts +3 -1
  62. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +24 -0
  63. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +48 -10
  64. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +28 -0
  65. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +5 -1
  66. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +15 -1
  67. package/dist/bundlers/webpack/shared/css-loader-runtime.d.ts +1 -0
  68. package/dist/cache/index.d.ts +1 -0
  69. package/dist/cli/mount-options.d.ts +2 -2
  70. package/dist/cli.js +126 -439
  71. package/dist/cli.mjs +121 -434
  72. package/dist/context/index.d.ts +3 -3
  73. package/dist/context/style-options.d.ts +4 -1
  74. package/dist/context/tailwindcss.d.ts +1 -1
  75. package/dist/{precheck-30zNPRlI.js → context-BHxLe743.js} +484 -175
  76. package/dist/{precheck-CsFr1q2l.mjs → context-Mbzkek1q.mjs} +461 -159
  77. package/dist/core.js +15 -12
  78. package/dist/core.mjs +10 -7
  79. package/dist/css-macro.js +2 -2
  80. package/dist/css-macro.mjs +2 -2
  81. package/dist/{defaults-Boc26eel.js → defaults-CVcKbXBG.js} +6 -50
  82. package/dist/{defaults-DH0ZQRhy.mjs → defaults-ZElj1zKc.mjs} +7 -45
  83. package/dist/defaults.d.ts +1 -7
  84. package/dist/defaults.js +1 -2
  85. package/dist/defaults.mjs +2 -2
  86. package/dist/framework/index.d.ts +59 -0
  87. package/dist/framework.d.ts +1 -0
  88. package/dist/framework.js +198 -0
  89. package/dist/framework.mjs +180 -0
  90. package/dist/generator/index.d.ts +6 -7
  91. package/dist/generator/options.d.ts +3 -3
  92. package/dist/generator/types.d.ts +9 -10
  93. package/dist/generator-9rUz4Hcb.js +170 -0
  94. package/dist/generator-Dc4qaPmT.mjs +123 -0
  95. package/dist/generator.js +10 -16
  96. package/dist/generator.mjs +3 -3
  97. package/dist/{gulp-CxGZU0-v.js → gulp-B_sdP6dx.js} +80 -92
  98. package/dist/{gulp-BfZpaYSQ.mjs → gulp-uM36oIJs.mjs} +73 -85
  99. package/dist/gulp.js +1 -1
  100. package/dist/gulp.mjs +1 -1
  101. package/dist/{hmr-timing-DNjF8bWA.mjs → hmr-timing-BXMLsF4b.mjs} +1289 -909
  102. package/dist/{hmr-timing-DFR51wgo.js → hmr-timing-CogqkFaF.js} +1397 -939
  103. package/dist/index.d.ts +1 -0
  104. package/dist/index.js +20 -4
  105. package/dist/index.mjs +6 -5
  106. package/dist/js/fast-path/oxc.d.ts +4 -0
  107. package/dist/js/precheck.d.ts +1 -0
  108. package/dist/postcss.js +3 -4
  109. package/dist/postcss.mjs +2 -3
  110. package/dist/presets.js +10 -20
  111. package/dist/presets.mjs +9 -19
  112. package/dist/runtime-branch/create-branch.d.ts +2 -0
  113. package/dist/runtime-branch/generator-target-env.d.ts +4 -0
  114. package/dist/runtime-branch/index.d.ts +6 -0
  115. package/dist/runtime-branch/mini-program.d.ts +2 -0
  116. package/dist/runtime-branch/native-app.d.ts +2 -0
  117. package/dist/runtime-branch/platform.d.ts +6 -0
  118. package/dist/runtime-branch/tailwind-version.d.ts +2 -0
  119. package/dist/runtime-branch/types.d.ts +37 -0
  120. package/dist/runtime-branch/web.d.ts +2 -0
  121. package/dist/runtime-branch.d.ts +1 -0
  122. package/dist/{bundle-state-DU2ATDhw.js → source-candidate-scan-signature-2ybpptAK.js} +262 -20
  123. package/dist/{bundle-state-BxMNKjBV.mjs → source-candidate-scan-signature-Cvb5z1ha.mjs} +187 -17
  124. package/dist/tailwindcss/candidates.d.ts +7 -0
  125. package/dist/tailwindcss/index.d.ts +2 -2
  126. package/dist/tailwindcss/runtime/cache.d.ts +6 -6
  127. package/dist/tailwindcss/runtime-factory.d.ts +12 -0
  128. package/dist/tailwindcss/runtime-options.d.ts +8 -0
  129. package/dist/tailwindcss/runtime-types.d.ts +86 -0
  130. package/dist/tailwindcss/runtime.d.ts +6 -6
  131. package/dist/tailwindcss/source-scan.d.ts +1 -1
  132. package/dist/tailwindcss/targets.d.ts +2 -2
  133. package/dist/tailwindcss/v4/config.d.ts +3 -3
  134. package/dist/tailwindcss/v4/css-entries.d.ts +1 -0
  135. package/dist/tailwindcss/v4/css-sources.d.ts +4 -2
  136. package/dist/tailwindcss/v4/index.d.ts +1 -1
  137. package/dist/tailwindcss/v4/multi-runtime.d.ts +2 -0
  138. package/dist/tailwindcss/v4/runtime-factory.d.ts +15 -0
  139. package/dist/tailwindcss/v4/runtime-options.d.ts +2 -0
  140. package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
  141. package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
  142. package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +3 -3
  143. package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +1 -1
  144. package/dist/tailwindcss/v4-engine/generator.d.ts +10 -3
  145. package/dist/tailwindcss/v4-engine/index.d.ts +1 -1
  146. package/dist/tailwindcss/v4-engine/miniprogram.d.ts +7 -1
  147. package/dist/tailwindcss/v4-engine/source.d.ts +23 -6
  148. package/dist/tailwindcss/v4-engine/types.d.ts +8 -9
  149. package/dist/tailwindcss/version.d.ts +1 -1
  150. package/dist/tailwindcss-DHIYcqXT.js +1523 -0
  151. package/dist/tailwindcss-wyUHrfil.mjs +1418 -0
  152. package/dist/{transform-CaVEBOuR.js → transform-CQVOgmzM.js} +45 -37
  153. package/dist/{transform-Cju08-aJ.mjs → transform-tExdt40m.mjs} +30 -22
  154. package/dist/typedoc.export.d.ts +1 -1
  155. package/dist/types/index.d.ts +16 -17
  156. package/dist/types/shared.d.ts +1 -1
  157. package/dist/types/{typedoc-tailwindcss-patch.d.ts → typedoc-tailwindcss-runtime.d.ts} +4 -10
  158. package/dist/types/user-defined-options/general.d.ts +8 -4
  159. package/dist/types/user-defined-options/important.d.ts +2 -2
  160. package/dist/uni-app-x/style-asset.d.ts +1 -0
  161. package/dist/{utils-Dolmt8EO.js → utils-BCa37Wqj.js} +2 -17
  162. package/dist/{utils-DsaS975I.mjs → utils-DodxWHGz.mjs} +2 -17
  163. package/dist/v4-engine-CF9zt4Cw.mjs +2396 -0
  164. package/dist/v4-engine-D4ubP7N5.js +2778 -0
  165. package/dist/{vite-BBGOjh9e.js → vite-CP0ylSxZ.js} +2887 -1683
  166. package/dist/{vite-CS5DE-HD.mjs → vite-CPO83EhA.mjs} +2753 -1548
  167. package/dist/vite.js +1 -1
  168. package/dist/vite.mjs +1 -1
  169. package/dist/weapp-tw-css-import-rewrite-loader.js +5741 -4396
  170. package/dist/weapp-tw-runtime-classset-loader.js +36 -0
  171. package/dist/webpack-Bsek8VhR.js +2094 -0
  172. package/dist/webpack-BzqhJ8yK.mjs +2082 -0
  173. package/dist/webpack.js +1 -1
  174. package/dist/webpack.mjs +1 -1
  175. package/package.json +11 -7
  176. package/dist/auto-CTp6wE5a.js +0 -33
  177. package/dist/auto-Cl8_hsG6.mjs +0 -22
  178. package/dist/bundlers/vite/incremental-runtime-class-set/v3-candidates.d.ts +0 -13
  179. package/dist/bundlers/vite/source-candidates/tailwind-v3-default-extractor.d.ts +0 -1
  180. package/dist/context/tailwindcss/rax.d.ts +0 -2
  181. package/dist/generator-Cb1Zp3Al.js +0 -92
  182. package/dist/generator-mvNFUvns.mjs +0 -67
  183. package/dist/tailwindcss/patcher-options.d.ts +0 -8
  184. package/dist/tailwindcss/patcher.d.ts +0 -12
  185. package/dist/tailwindcss/runtime-patch.d.ts +0 -5
  186. package/dist/tailwindcss/v3-engine/generator/cache-key.d.ts +0 -3
  187. package/dist/tailwindcss/v3-engine/generator/content.d.ts +0 -10
  188. package/dist/tailwindcss/v3-engine/generator/runtime-ready.d.ts +0 -2
  189. package/dist/tailwindcss/v3-engine/generator.d.ts +0 -19
  190. package/dist/tailwindcss/v3-engine/index.d.ts +0 -4
  191. package/dist/tailwindcss/v3-engine/miniprogram.d.ts +0 -4
  192. package/dist/tailwindcss/v3-engine/source.d.ts +0 -5
  193. package/dist/tailwindcss/v3-engine/types.d.ts +0 -61
  194. package/dist/tailwindcss/v4/multi-patcher.d.ts +0 -2
  195. package/dist/tailwindcss/v4/patcher-options.d.ts +0 -2
  196. package/dist/tailwindcss/v4/patcher.d.ts +0 -15
  197. package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +0 -1
  198. package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +0 -1
  199. package/dist/tailwindcss-CK84uGBp.mjs +0 -556
  200. package/dist/tailwindcss-Clpkz1oR.js +0 -613
  201. package/dist/v3-engine-CQE5JJNZ.js +0 -4639
  202. package/dist/v3-engine-DKBaKWGL.mjs +0 -4231
  203. package/dist/webpack-DIWrcpRo.js +0 -1066
  204. package/dist/webpack-SPcri_D8.mjs +0 -1054
  205. /package/dist/tailwindcss/{patcher-resolve.d.ts → runtime-resolve.d.ts} +0 -0
@@ -0,0 +1,80 @@
1
+ import type { GenerateBundleContext } from './types';
2
+ export declare function resolveViteMemoryDebugStats(context: {
3
+ activeProcessCacheKeys: Set<string>;
4
+ activeProcessHashKeys: Set<string | number>;
5
+ cache: GenerateBundleContext['opts']['cache'];
6
+ generatorRuntimeSize: number;
7
+ getViteCssCacheStats?: (() => Record<string, unknown>) | undefined;
8
+ hasOmittedKnownFiles: boolean;
9
+ lastCssResultByFile: Map<string, string>;
10
+ phase: string;
11
+ processCachePruned: boolean;
12
+ processCachePruneSkipReason?: string | undefined;
13
+ runtimeSize: number;
14
+ sourceCandidatesSize: number;
15
+ transformRuntimeSize: number;
16
+ useIncrementalMode: boolean;
17
+ }): {
18
+ phase: string;
19
+ mode: string;
20
+ bundle: {
21
+ hasOmittedKnownFiles: boolean;
22
+ };
23
+ process: {
24
+ rssMb: number;
25
+ heapTotalMb: number;
26
+ heapUsedMb: number;
27
+ externalMb: number;
28
+ arrayBuffersMb: number;
29
+ };
30
+ runtime: {
31
+ sourceCandidates: number;
32
+ runtime: number;
33
+ transformRuntime: number;
34
+ generatorRuntime: number;
35
+ };
36
+ processCache: {
37
+ pruneSkipReason?: string;
38
+ instance: number;
39
+ hashMap: number;
40
+ activeCacheKeys: number;
41
+ activeHashKeys: number;
42
+ staleCacheKeys: number;
43
+ staleHashKeys: number;
44
+ pruned: boolean;
45
+ pruneSkipped: boolean;
46
+ };
47
+ viteCss: {
48
+ lastCssResultByFile: {
49
+ bytes: number;
50
+ mb: number;
51
+ size: number;
52
+ };
53
+ };
54
+ tailwind: {
55
+ v4: {
56
+ max: number;
57
+ entryCandidatesMax: number;
58
+ entryCssBytesMax: number;
59
+ size: number;
60
+ taskMax: number;
61
+ taskSize: number;
62
+ entries: {
63
+ candidates: number;
64
+ classSet: number;
65
+ cssBytes: number;
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;
77
+ }[];
78
+ };
79
+ };
80
+ } | undefined;
@@ -0,0 +1,53 @@
1
+ import type { OutputAsset, OutputChunk } from 'rollup';
2
+ import type { BundleMetrics } from './metrics';
3
+ import type { GenerateBundleContext, RememberedCssSource } from './types';
4
+ interface ProcessRememberedCssReplayOptions {
5
+ addWatchFile: (id: string) => void;
6
+ bundle: Record<string, OutputAsset | OutputChunk>;
7
+ bundleFiles: string[];
8
+ cache: GenerateBundleContext['opts']['cache'];
9
+ createScopedGeneratorRuntime: (outputFile: string, cssHandlerOptions: {
10
+ isMainChunk?: boolean | undefined;
11
+ }, runtime: Set<string>, rawSource?: string | undefined, sourceFile?: string | undefined) => Promise<Set<string>>;
12
+ createScopedSourceCandidateGetter: (outputFile: string, cssHandlerOptions: {
13
+ isMainChunk?: boolean | undefined;
14
+ }) => GenerateBundleContext['getSourceCandidatesForEntries'];
15
+ createScopedSourceCandidateSourceGetter: (outputFile: string, cssHandlerOptions: {
16
+ isMainChunk?: boolean | undefined;
17
+ }) => GenerateBundleContext['getSourceCandidateSourcesForEntries'];
18
+ cssTaskFactories: Array<() => Promise<void>>;
19
+ debug: GenerateBundleContext['debug'];
20
+ defaultStyleOutputExtension: string;
21
+ emitOrReplayCssAsset: (fileName: string, source: string) => OutputAsset;
22
+ generatorRuntime: Set<string>;
23
+ getCssHandlerOptions: (file: string) => ReturnType<ReturnType<typeof import('./css-handler-options').createCssHandlerOptionsCache>['getCssHandlerOptions']>;
24
+ getCssUserHandlerOptions: (file: string) => ReturnType<ReturnType<typeof import('./css-handler-options').createCssHandlerOptionsCache>['getCssUserHandlerOptions']>;
25
+ getRememberedCssSignature?: ((file: string) => string | undefined) | undefined;
26
+ getRememberedCssSources?: (() => Iterable<[string, RememberedCssSource]>) | undefined;
27
+ isNativeAppStyleTarget: boolean;
28
+ isWebGeneratorTarget: boolean;
29
+ lastCssResultByFile: Map<string, string>;
30
+ lastCssSourceHashByFile: Map<string, string>;
31
+ markCssAssetProcessed: GenerateBundleContext['markCssAssetProcessed'];
32
+ metrics: BundleMetrics;
33
+ normalizeViteCssCacheKey: (file: string) => string;
34
+ onUpdate: GenerateBundleContext['opts']['onUpdate'];
35
+ opts: GenerateBundleContext['opts'];
36
+ recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
37
+ recordViteProcessedCssAssetResult: GenerateBundleContext['recordViteProcessedCssAssetResult'];
38
+ refreshRememberedCssSource?: GenerateBundleContext['refreshRememberedCssSource'];
39
+ rootDir: string;
40
+ runtimeState: GenerateBundleContext['runtimeState'];
41
+ setRememberedCssSignature?: ((file: string, cssRuntimeSignature: string) => void) | undefined;
42
+ shouldInjectCssIntoMainFromOutput: (outputFile: string, sourceFile: string, cssHandlerOptions: {
43
+ isMainChunk?: boolean | undefined;
44
+ }) => boolean;
45
+ shouldPreserveAppCssExtension: boolean;
46
+ sourceRoot: string | undefined;
47
+ styleHandler: GenerateBundleContext['opts']['styleHandler'];
48
+ timeTask: (name: string, task: () => Promise<void>) => Promise<void>;
49
+ useIncrementalMode: boolean;
50
+ activeViteCssCacheFiles: Set<string>;
51
+ }
52
+ export declare function processRememberedCssReplay(options: ProcessRememberedCssReplayOptions): Promise<void>;
53
+ export {};
@@ -5,7 +5,7 @@ export declare function createRememberedCssRuntimeSignature(cssRuntimeSignature:
5
5
  export declare function resolveRememberedCssSourceForTest(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource | undefined;
6
6
  export declare function findRememberedCssSources(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource[];
7
7
  export declare function mergeRememberedCssSources(sources: RememberedCssSource[], outputFile: string): RememberedCssSource | undefined;
8
- export declare function collectRememberedCssReplayGroups(sources: Iterable<[string, RememberedCssSource]> | undefined, opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget: boolean, preserveCssExtension: boolean, sourceRoot?: string | undefined): Map<string, {
8
+ export declare function collectRememberedCssReplayGroups(sources: Iterable<[string, RememberedCssSource]> | undefined, opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget: boolean, preserveCssExtension: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): Map<string, {
9
9
  key: string;
10
10
  remembered: RememberedCssSource;
11
11
  }[]>;
@@ -0,0 +1,4 @@
1
+ import type { BundleSnapshot } from '../bundle-state';
2
+ export declare function collectCssExtensionByStem(files: string[], cssMatcher: (file: string) => boolean): Map<string, string>;
3
+ export declare function collectRuntimeLinkedCssFiles(snapshot: BundleSnapshot, extensionByStem: Map<string, string>, fallbackExtension: string): Set<string>;
4
+ export declare function collectJsImportedCssFiles(snapshot: BundleSnapshot): Set<string>;
@@ -0,0 +1,21 @@
1
+ import type { SourceCandidateFilterOptions } from '../source-candidates';
2
+ import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
3
+ export declare function createScopedGeneratorCandidateSignature(rawSource: string, sourceFile: string, fallbackSignature: string, getSourceCandidatesForEntries: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined, options?: {
4
+ includeFallbackSignature?: boolean | undefined;
5
+ majorVersion?: number | undefined;
6
+ }): Promise<string>;
7
+ export declare function createScopedGeneratorRuntime(options: {
8
+ cssHandlerOptions: {
9
+ isMainChunk?: boolean | undefined;
10
+ };
11
+ fallbackRuntime: Set<string>;
12
+ getSourceCandidatesForEntries: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
13
+ majorVersion: number | undefined;
14
+ outputFile: string;
15
+ rawSource?: string | undefined;
16
+ shouldExcludeSubpackageSourceCandidates: (outputFile: string, cssHandlerOptions: {
17
+ isMainChunk?: boolean | undefined;
18
+ }) => boolean;
19
+ sourceFile?: string | undefined;
20
+ scopedSourceCandidateGetter: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
21
+ }): Promise<Set<string>>;
@@ -3,7 +3,10 @@ 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;
7
- export declare function resolveSfcStyleSourceFromOutputFile(outputFile: string, snapshot: BundleSnapshot, outputRoot: string, sourceRoot: string | undefined, getSfcSource: ((file: string) => string | undefined) | undefined, debug: (format: string, ...args: unknown[]) => void): Promise<RememberedCssSource | undefined>;
6
+ export declare function hasTailwindGenerationSource(source: string, options?: {
7
+ allowRootDirectives?: boolean | undefined;
8
+ }): boolean;
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[];
12
+ export declare function resolveSourceStyleSourceFromOutputFile(outputFile: string, snapshot: BundleSnapshot, outputRoot: string, sourceRoot: string | undefined, getSourceStyleSource: ((file: string) => string | undefined) | undefined, getSourceStyleSources: (() => Iterable<[string, string]>) | undefined, configuredSourceEntries: Iterable<[string, string]> | undefined, debug: (format: string, ...args: unknown[]) => void): RememberedCssSource | undefined;
@@ -0,0 +1,30 @@
1
+ import type { BundleSnapshot } from '../bundle-state';
2
+ import type { SourceCandidateFilterOptions } from '../source-candidates';
3
+ import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
4
+ interface CreateSubpackageSourceCandidateScopeOptions {
5
+ cssSourceFiles?: Iterable<string> | undefined;
6
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
7
+ getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
8
+ projectRoot?: string | undefined;
9
+ rootDir: string;
10
+ snapshot: BundleSnapshot;
11
+ sourceRoot?: string | undefined;
12
+ subpackageRoots?: Set<string> | undefined;
13
+ tailwindcssBasedir?: string | undefined;
14
+ useIncrementalMode: boolean;
15
+ }
16
+ export declare function createSubpackageSourceCandidateScope(options: CreateSubpackageSourceCandidateScopeOptions): {
17
+ createScopedSourceCandidateGetter: (outputFile: string, cssHandlerOptions: {
18
+ isMainChunk?: boolean | undefined;
19
+ }) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Set<string>) | undefined;
20
+ createScopedSourceCandidateSourceGetter: (outputFile: string, cssHandlerOptions: {
21
+ isMainChunk?: boolean | undefined;
22
+ }) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
23
+ shouldExcludeSubpackageSourceCandidates: (outputFile: string, cssHandlerOptions: {
24
+ isMainChunk?: boolean | undefined;
25
+ }) => boolean;
26
+ shouldInjectCssIntoMainFromOutput: (outputFile: string, _sourceFile: string, outputCssHandlerOptions: {
27
+ isMainChunk?: boolean | undefined;
28
+ }) => boolean;
29
+ };
30
+ export {};
@@ -0,0 +1 @@
1
+ export declare function createBundleTaskTimer(recordTimingDetail: (name: string, startedAt: number) => void): (name: string, task: () => Promise<void>) => Promise<void>;
@@ -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>>;
@@ -38,6 +38,8 @@ export interface GenerateBundleContext {
38
38
  outputFile?: string | undefined;
39
39
  } | undefined;
40
40
  getSourceCandidates?: () => Set<string>;
41
+ getSourceCandidateSource?: (file: string) => string | undefined;
42
+ getSourceCandidateSources?: () => Iterable<[string, string]>;
41
43
  getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
42
44
  getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
43
45
  waitForSourceCandidateSyncs?: () => Promise<void>;
@@ -0,0 +1,20 @@
1
+ import type { OutputAsset, OutputChunk } from 'rollup';
2
+ import type { CssHandlerOptionsCache } from './css-handler-options';
3
+ import type { GenerateBundleContext } from './types';
4
+ interface HandleUniAppXPostCssOptions {
5
+ bundle: Record<string, OutputAsset | OutputChunk>;
6
+ debug: GenerateBundleContext['debug'];
7
+ generatorRuntime: Set<string>;
8
+ getCssHandlerOptions: CssHandlerOptionsCache['getCssHandlerOptions'];
9
+ getSourceCandidateSourcesForEntries: GenerateBundleContext['getSourceCandidateSourcesForEntries'];
10
+ getSourceCandidatesForEntries: GenerateBundleContext['getSourceCandidatesForEntries'];
11
+ getViteProcessedCssAssetResults: GenerateBundleContext['getViteProcessedCssAssetResults'];
12
+ isHarmonyAppStyleTarget: boolean;
13
+ isNativeAppStyleTarget: boolean;
14
+ onUpdate: GenerateBundleContext['opts']['onUpdate'];
15
+ opts: GenerateBundleContext['opts'];
16
+ runtimeState: GenerateBundleContext['runtimeState'];
17
+ styleHandler: GenerateBundleContext['opts']['styleHandler'];
18
+ }
19
+ export declare function handleUniAppXPostCssTasks(options: HandleUniAppXPostCssOptions): Promise<string[]>;
20
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare function resolveViteCssTaskConcurrency(_useIncrementalMode: boolean, _majorVersion?: number | undefined): number;
2
+ export declare function normalizeViteCssCacheKey(file: string): string;
3
+ export declare function rememberLastCssResult(resultByFile: Map<string, string>, sourceHashByFile: Map<string, string>, file: string, css: string, sourceHash: string): void;
4
+ export declare function getLastCssResult(resultByFile: Map<string, string>, ...files: Array<string | undefined>): string | undefined;
5
+ export declare function getLastCssSourceHash(sourceHashByFile: Map<string, string>, file: string): string | undefined;
6
+ export declare function pruneLastCssResults(resultByFile: Map<string, string>, sourceHashByFile: Map<string, string>, activeFiles: Set<string>): void;
@@ -1,6 +1,9 @@
1
1
  import type { OutputAsset, OutputChunk } from 'rollup';
2
2
  import type { GenerateBundleContext, GenerateBundleThis } from './generate-bundle/types';
3
- export { resolveReplayCssOutputFile, resolveReplayCssOutputFileFromSourceRoot, resolveViteCssPipelineOutputFile } from './generate-bundle/css-output';
3
+ export { normalizeBundleFileNameKeysForTest } from './generate-bundle/bundle-file-names';
4
+ export { resolveMiniProgramStyleOutputExtension, resolveReplayCssOutputFile, resolveReplayCssOutputFileFromSourceRoot, resolveViteCssPipelineOutputFile, resolveViteCssPipelineOutputFileFromSourceFile } from './generate-bundle/css-output';
4
5
  export { resolveRememberedCssSourceForTest } from './generate-bundle/remembered-css';
5
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";
6
9
  export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ import type { HmrContext, ModuleNode } from 'vite';
2
+ export declare function resolveHotTailwindCssModules(ctx: HmrContext, tailwindRootCssModuleIds: Set<string>): ModuleNode[];
3
+ export declare function hasSelfAcceptingNonStyleHotModule(modules: ModuleNode[]): boolean;
4
+ export declare function sendSupplementalCssHotUpdates(ctx: HmrContext, cssModules: ModuleNode[]): void;
5
+ export declare function sendFullReloadForUnresolvedHotUpdate(ctx: HmrContext): 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 {
@@ -0,0 +1,2 @@
1
+ export declare function touchMapEntry<Key, Value>(map: Map<Key, Value>, key: Key, value: Value): void;
2
+ export declare function pruneMapToMaxSize<Key, Value>(map: Map<Key, Value>, maxSize: number, onDelete?: (key: Key) => void): void;
@@ -27,6 +27,7 @@ interface CollectViteProcessedCssAssetOptions {
27
27
  recordCssAssetResult?: CssAssetResultRecorder | undefined;
28
28
  recordViteProcessedCssAssetResult?: CssAssetResultRecorder | undefined;
29
29
  resolveViteProcessedCssOutputFile?: ((file: string) => string | undefined) | undefined;
30
+ subpackageRoots?: Set<string> | undefined;
30
31
  debug?: ((format: string, ...args: unknown[]) => void) | undefined;
31
32
  }
32
33
  interface InjectViteProcessedCssAssetOptions {
@@ -34,9 +35,24 @@ interface InjectViteProcessedCssAssetOptions {
34
35
  getViteProcessedCssAssetResults?: CssAssetResultsGetter | undefined;
35
36
  markCssAssetProcessed?: CssAssetProcessedMarker | undefined;
36
37
  recordCssAssetResult?: CssAssetResultRecorder | undefined;
38
+ shouldRemoveInjectedSourceAsset?: ((file: string, record: {
39
+ file: string;
40
+ css: string;
41
+ injectIntoMain?: boolean | undefined;
42
+ outputFile?: string | undefined;
43
+ }) => boolean) | undefined;
37
44
  debug?: ((format: string, ...args: unknown[]) => void) | undefined;
38
45
  onUpdate?: ((file: string, original: string, generated: string) => void) | undefined;
39
46
  }
47
+ export declare function removeCssCoveredByRootStyleAssets(bundle: OutputBundle, options: {
48
+ cssMatcher: (file: string) => boolean;
49
+ debug?: ((format: string, ...args: unknown[]) => void) | undefined;
50
+ isViteProcessedCssAsset?: CssAssetMarkerMatcher | undefined;
51
+ onUpdate?: ((file: string, original: string, generated: string) => void) | undefined;
52
+ recordCssAssetResult?: CssAssetResultRecorder | undefined;
53
+ subpackageRoots?: Set<string> | undefined;
54
+ }): number;
55
+ export declare function isCssImportOnlyBundleAsset(bundle: OutputBundle, file: string, css: string): boolean;
40
56
  export declare function collectViteProcessedCssAssetResults(bundle: OutputBundle, options: CollectViteProcessedCssAssetOptions): number;
41
57
  export declare function injectViteProcessedCssIntoMainCssAssets(bundle: OutputBundle, options: InjectViteProcessedCssAssetOptions): number;
42
58
  export {};
@@ -1,2 +1 @@
1
- import type { AppType } from '../../types';
2
- export declare function resolveImplicitAppTypeFromViteRoot(root: string): AppType | undefined;
1
+ export { resolveImplicitAppTypeFromViteRoot } from '../../framework';
@@ -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;
@@ -0,0 +1,13 @@
1
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
+ export interface SourceCandidateScanRoot {
3
+ root: string;
4
+ entries?: TailwindSourceEntry[] | undefined;
5
+ explicit?: boolean | undefined;
6
+ }
7
+ export interface SourceCandidateScanSignatureInput {
8
+ inlineCandidates?: TailwindInlineSourceCandidates | undefined;
9
+ outDir?: string | undefined;
10
+ roots: SourceCandidateScanRoot[];
11
+ scanAllSources?: boolean | undefined;
12
+ }
13
+ export declare function createSourceCandidateScanSignature(input: SourceCandidateScanSignatureInput): string;
@@ -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>;
@@ -11,19 +11,27 @@ export interface SourceCandidateCollector {
11
11
  syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
12
12
  remove: (id: string) => void;
13
13
  source: (id: string) => string | undefined;
14
+ sources: () => IterableIterator<[string, string]>;
14
15
  values: () => Set<string>;
15
16
  valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
16
17
  sourcesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>;
17
18
  snapshot: () => SourceCandidateCollectorSnapshot;
18
19
  restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
20
+ clearScan: () => void;
21
+ resetScan: () => void;
19
22
  clear: () => void;
20
23
  }
24
+ export interface SourceCandidateCollector extends SourceCandidateStore {
25
+ }
21
26
  export interface SourceCandidateCollectorSnapshot {
22
27
  candidatesById: Array<[string, string[]]>;
23
28
  cssCandidatesById?: Array<[string, string[]]> | undefined;
29
+ cssSourceById?: Array<[string, string]> | undefined;
24
30
  scanCandidatesById?: Array<[string, string[]]> | undefined;
31
+ scanSourceById?: Array<[string, string]> | undefined;
25
32
  sourceById?: Array<[string, string]> | undefined;
26
33
  transformCandidatesById?: Array<[string, string[]]> | undefined;
34
+ transformSourceById?: Array<[string, string]> | undefined;
27
35
  inlineExcludedCandidates: string[];
28
36
  inlineIncludedCandidates: string[];
29
37
  }
@@ -41,6 +49,7 @@ export interface SourceCandidateCollectorOptions {
41
49
  extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
42
50
  }
43
51
  export declare function isSourceCandidateRequest(id: string): boolean;
52
+ export declare function createSourceCandidateStore(options?: SourceCandidateCollectorOptions): SourceCandidateStore;
44
53
  export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
45
54
  export declare function getSourceCandidateContentCacheStatsForTest(): {
46
55
  max: number;
@@ -48,3 +57,4 @@ export declare function getSourceCandidateContentCacheStatsForTest(): {
48
57
  keys: string[];
49
58
  };
50
59
  export declare function clearSourceCandidateContentCacheForTest(): void;
60
+ export {};
@@ -1,6 +1,6 @@
1
- import type { TailwindV4CssSource } from 'tailwindcss-patch';
1
+ import type { TailwindV4CssSource } from '@tailwindcss-mangle/engine';
2
2
  import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../../tailwindcss/source-scan';
3
- import type { TailwindcssPatcherLike, UserDefinedOptions } from '../../../types';
3
+ import type { UserDefinedOptions } from '../../../types';
4
4
  export interface ResolvedTailwindV4CssEntries {
5
5
  entries: TailwindSourceEntry[];
6
6
  explicit: boolean;
@@ -11,10 +11,7 @@ export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates:
11
11
  export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
12
12
  export declare function resolveViteTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
13
13
  export declare function collectExistingCssEntries(options: UserDefinedOptions): string[];
14
- export declare function resolveTailwindV3CssEntryScan(options: UserDefinedOptions, patcher: TailwindcssPatcherLike): Promise<{
15
- entries: TailwindSourceEntry[];
16
- dependencies: Set<string>;
17
- }>;
18
14
  export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
15
+ export declare function resolveTailwindConfigEntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
19
16
  export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
20
17
  export declare function collectConfiguredCssSources(options: UserDefinedOptions): TailwindV4CssSource[];
@@ -1,6 +1,6 @@
1
1
  import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
- import type { TailwindcssPatcherLike, UserDefinedOptions } from '../../types';
3
- export { discoverTailwindV4CssEntries, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, resolveViteTailwindV4CssDependencies, } from './source-scan/css-entries';
2
+ import type { TailwindcssRuntimeLike, UserDefinedOptions } from '../../types';
3
+ export { discoverTailwindV4CssEntries, resolveTailwindConfigEntriesFromCssCached, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, resolveViteTailwindV4CssDependencies, } from './source-scan/css-entries';
4
4
  export type { ResolvedTailwindV4CssEntries } from './source-scan/css-entries';
5
5
  export interface ResolvedViteSourceScan {
6
6
  dependencies?: string[] | undefined;
@@ -12,5 +12,5 @@ interface ResolveViteSourceScanOptions {
12
12
  root?: string | undefined;
13
13
  outDir?: string | undefined;
14
14
  }
15
- export declare function resolveViteSourceScanEntries(options: UserDefinedOptions, patcher: TailwindcssPatcherLike, scanOptions?: ResolveViteSourceScanOptions): Promise<ResolvedViteSourceScan | undefined>;
15
+ export declare function resolveViteSourceScanEntries(options: UserDefinedOptions, runtime: TailwindcssRuntimeLike, scanOptions?: ResolveViteSourceScanOptions): Promise<ResolvedViteSourceScan | undefined>;
16
16
  export declare function createViteSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
@@ -1,2 +1,2 @@
1
1
  import type { InternalUserDefinedOptions, IStyleHandlerOptions } from '../../types';
2
- export declare function resolveUniAppXNativeCssHandlerOptions(opts: Pick<InternalUserDefinedOptions, 'appType' | 'uniAppX'>): Partial<IStyleHandlerOptions>;
2
+ export declare function resolveUniAppXNativeCssHandlerOptions(opts: Pick<InternalUserDefinedOptions, 'appType' | 'generator' | 'platform' | 'cssOptions' | 'uniAppX'>): Partial<IStyleHandlerOptions>;
@@ -4,6 +4,7 @@ export declare function slash(p: string): string;
4
4
  export declare const isWindows: boolean;
5
5
  export declare const cssLangRE: RegExp;
6
6
  export declare function isCSSRequest(request: string): boolean;
7
+ export declare function isHTMLRequest(request: string): boolean;
7
8
  export declare function normalizePath(id: string): string;
8
9
  export { cleanUrl };
9
10
  export declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
@@ -1 +1,3 @@
1
- export declare function resolveWeappViteSourceRoot(config: unknown): string | undefined;
1
+ import type { OutputBundle } from 'rollup';
2
+ export declare function resolveWeappViteSourceRoot(config: unknown, _appType?: unknown): string | undefined;
3
+ export declare function resolveSourceRootFromBundleGraph(config: unknown, bundle: OutputBundle): string | undefined;
@@ -10,6 +10,21 @@ interface ChunkLike {
10
10
  name?: string;
11
11
  hash?: string | null;
12
12
  files?: Iterable<string> | Array<string>;
13
+ hasRuntime?: () => boolean;
14
+ }
15
+ interface ModuleLike {
16
+ context?: string;
17
+ dependencies?: Array<unknown> | Iterable<unknown>;
18
+ modules?: ModuleLike[] | Iterable<ModuleLike>;
19
+ request?: string;
20
+ resource?: string;
21
+ rootModule?: ModuleLike;
22
+ userRequest?: string;
23
+ }
24
+ interface ChunkGraphLike {
25
+ getChunkModulesIterable?: (chunk: ChunkLike) => Iterable<ModuleLike> | undefined;
26
+ getIssuer?: (module: ModuleLike) => ModuleLike | null | undefined;
27
+ getModule?: (dependency: unknown) => ModuleLike | null | undefined;
13
28
  }
14
29
  interface WebpackWatchChangeLike {
15
30
  modifiedFiles?: Set<string>;
@@ -19,6 +34,15 @@ interface RuntimeWatchDependenciesLike {
19
34
  files?: Iterable<string>;
20
35
  contexts?: Iterable<string>;
21
36
  }
37
+ export declare function inferWebpackMainCssFiles(chunks: Iterable<ChunkLike>, cssMatcher: (file: string) => boolean, options?: {
38
+ mainSourceFiles?: ReadonlySet<string> | undefined;
39
+ resourcesByAsset?: ReadonlyMap<string, ReadonlySet<string>> | undefined;
40
+ }): Set<string>;
41
+ export declare function resolveSingleActiveWebpackCssResource(assetResources: ReadonlySet<string> | undefined, activeWebpackAssetResourceFiles: ReadonlySet<string>): string | undefined;
42
+ export declare function createWebpackCssAssetResourceMap(chunks: Iterable<ChunkLike>, chunkGraph: ChunkGraphLike | undefined, cssMatcher: (file: string) => boolean, normalizeResource: (resource: string, issuer?: {
43
+ context?: string;
44
+ resource?: string;
45
+ }) => string | undefined): Map<string, Set<string>>;
22
46
  export declare function createAssetHashByChunkMap(chunks: Iterable<ChunkLike>): Map<string, string>;
23
47
  export declare function createRuntimeAwareCssHash(assetHash: string | undefined, sourceHash: string, runtimeSetHash: string): string;
24
48
  export declare function hasWatchChanges(compiler: WebpackWatchChangeLike): boolean;