weapp-tailwindcss 5.0.0-next.3 → 5.0.0-next.31

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 (244) hide show
  1. package/README.md +6 -7
  2. package/bin/weapp-tailwindcss.js +1 -21
  3. package/dist/auto-TH1jG2UW.js +115 -0
  4. package/dist/auto-XyKTOP7B.mjs +78 -0
  5. package/dist/bundle-state-Bi-cQua6.mjs +413 -0
  6. package/dist/bundle-state-Ct_8GcSR.js +529 -0
  7. package/dist/bundlers/shared/cache.d.ts +6 -6
  8. package/dist/bundlers/shared/css-cleanup/at-rules.d.ts +1 -0
  9. package/dist/bundlers/shared/css-cleanup.d.ts +1 -4
  10. package/dist/bundlers/shared/css-imports.d.ts +3 -3
  11. package/dist/bundlers/shared/generated-css-marker.d.ts +3 -0
  12. package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
  13. package/dist/bundlers/shared/generator-css/directives.d.ts +21 -0
  14. package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
  15. package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
  16. package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
  17. package/dist/bundlers/shared/generator-css/markers.d.ts +28 -0
  18. package/dist/bundlers/shared/generator-css/source-files.d.ts +14 -0
  19. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +24 -0
  20. package/dist/bundlers/shared/generator-css/user-layer-order.d.ts +10 -0
  21. package/dist/bundlers/shared/generator-css.d.ts +16 -22
  22. package/dist/bundlers/shared/hmr-timing.d.ts +22 -0
  23. package/dist/bundlers/shared/style-requests.d.ts +2 -0
  24. package/dist/bundlers/vite/bundle-state.d.ts +1 -0
  25. package/dist/bundlers/vite/css-finalizer.d.ts +7 -1
  26. package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
  27. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +24 -0
  28. package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +4 -0
  29. package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
  30. package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
  31. package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
  32. package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
  33. package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
  34. package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
  35. package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
  36. package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
  37. package/dist/bundlers/vite/generate-bundle.d.ts +14 -2
  38. package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +5 -1
  39. package/dist/bundlers/vite/index.d.ts +5 -2
  40. package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
  41. package/dist/bundlers/vite/postcss-config.d.ts +6 -0
  42. package/dist/bundlers/vite/processed-css-assets.d.ts +32 -0
  43. package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -3
  44. package/dist/bundlers/vite/runtime-class-set.d.ts +25 -0
  45. package/dist/bundlers/vite/serve-css-generation.d.ts +11 -0
  46. package/dist/bundlers/vite/source-candidates.d.ts +19 -1
  47. package/dist/bundlers/vite/source-scan.d.ts +26 -0
  48. package/dist/bundlers/vite/static-config-content.d.ts +5 -0
  49. package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
  50. package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +6 -0
  51. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +6 -2
  52. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +9 -3
  53. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +2 -1
  54. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +31 -0
  55. package/dist/bundlers/webpack/loaders/weapp-tw-css-import-rewrite-loader.d.ts +2 -6
  56. package/dist/bundlers/webpack/loaders/weapp-tw-runtime-classset-loader.d.ts +3 -7
  57. package/dist/cache/index.d.ts +6 -6
  58. package/dist/{chunk-8l464Juk.js → chunk-C5U5_Hdc.js} +14 -0
  59. package/dist/cli/context.d.ts +1 -14
  60. package/dist/cli/doctor/types.d.ts +11 -11
  61. package/dist/cli/helpers.d.ts +1 -2
  62. package/dist/cli/mount-options.d.ts +2 -0
  63. package/dist/cli/types.d.ts +0 -2
  64. package/dist/cli/vscode-entry.d.ts +3 -3
  65. package/dist/cli.js +758 -604
  66. package/dist/cli.mjs +766 -612
  67. package/dist/constants.d.ts +1 -2
  68. package/dist/context/runtime-package-replacements.d.ts +2 -0
  69. package/dist/context/style-options.d.ts +3 -0
  70. package/dist/core.js +12 -20
  71. package/dist/core.mjs +8 -14
  72. package/dist/css-macro/auto.d.ts +10 -0
  73. package/dist/css-macro/constants.d.ts +5 -2
  74. package/dist/css-macro/postcss.d.ts +1 -0
  75. package/dist/css-macro/postcss.js +7 -46
  76. package/dist/css-macro/postcss.mjs +2 -46
  77. package/dist/css-macro.d.ts +1 -0
  78. package/dist/css-macro.js +16 -7
  79. package/dist/css-macro.mjs +15 -6
  80. package/dist/defaults-8xrgzxFY.mjs +151 -0
  81. package/dist/defaults-zKUH2mDe.js +193 -0
  82. package/dist/defaults.d.ts +15 -1
  83. package/dist/defaults.js +6 -131
  84. package/dist/defaults.mjs +2 -129
  85. package/dist/escape.js +10 -2
  86. package/dist/escape.mjs +10 -2
  87. package/dist/generator/index.d.ts +1 -1
  88. package/dist/generator/options.d.ts +9 -8
  89. package/dist/generator/types.d.ts +3 -3
  90. package/dist/generator-CrU-Ghc1.js +90 -0
  91. package/dist/generator-Qw-tZ0Z2.mjs +65 -0
  92. package/dist/generator.js +12 -12
  93. package/dist/generator.mjs +2 -1
  94. package/dist/gulp.js +187 -48
  95. package/dist/gulp.mjs +180 -41
  96. package/dist/incremental-runtime-class-set-Boqi1QlB.mjs +2224 -0
  97. package/dist/incremental-runtime-class-set-FAOHZmzh.js +2293 -0
  98. package/dist/index.d.ts +3 -2
  99. package/dist/index.js +19 -7
  100. package/dist/index.mjs +6 -5
  101. package/dist/js/babel/cache-options.d.ts +3 -0
  102. package/dist/js/babel/parse.d.ts +7 -4
  103. package/dist/js/index.d.ts +1 -0
  104. package/dist/js/literal-transform.d.ts +2 -0
  105. package/dist/js/precheck.d.ts +2 -2
  106. package/dist/logger-BNzxZbZj.mjs +2 -0
  107. package/dist/logger-TlKT3xmR.js +1 -0
  108. package/dist/postcss/config-directive.d.ts +1 -0
  109. package/dist/postcss/context.d.ts +9 -0
  110. package/dist/postcss/source-files.d.ts +8 -0
  111. package/dist/postcss/tailwind-version.d.ts +3 -0
  112. package/dist/postcss-C6zOQqlL.mjs +228 -0
  113. package/dist/postcss-C7BMYpEF.mjs +169 -0
  114. package/dist/postcss-CiYLsqZn.js +192 -0
  115. package/dist/postcss-DAWf9D3C.js +237 -0
  116. package/dist/postcss-html-transform.js +1 -1
  117. package/dist/postcss.d.ts +2 -2
  118. package/dist/postcss.js +3 -276
  119. package/dist/postcss.mjs +1 -269
  120. package/dist/precheck-D7K12zeX.mjs +4716 -0
  121. package/dist/precheck-D7gJSmJz.js +4842 -0
  122. package/dist/presets/index.d.ts +1 -0
  123. package/dist/presets/uni-app-x.d.ts +1 -0
  124. package/dist/presets.js +29 -13
  125. package/dist/presets.mjs +25 -11
  126. package/dist/reset.d.ts +1 -0
  127. package/dist/reset.js +1 -1
  128. package/dist/runtime-registry-DpcR3IHI.js +5496 -0
  129. package/dist/shared/mpx.d.ts +1 -0
  130. package/dist/source-candidates-CX2ozpKM.mjs +322 -0
  131. package/dist/source-candidates-DNM8iwXW.js +335 -0
  132. package/dist/tailwindcss/miniprogram.d.ts +1 -1
  133. package/dist/tailwindcss/patcher-options.d.ts +3 -51
  134. package/dist/tailwindcss/patcher.d.ts +1 -2
  135. package/dist/tailwindcss/remove-unsupported-css.d.ts +1 -2
  136. package/dist/tailwindcss/runtime/cache.d.ts +4 -3
  137. package/dist/tailwindcss/runtime-patch.d.ts +5 -0
  138. package/dist/tailwindcss/runtime.d.ts +11 -12
  139. package/dist/tailwindcss/source-scan.d.ts +35 -0
  140. package/dist/tailwindcss/targets.d.ts +1 -5
  141. package/dist/tailwindcss/v3-engine/types.d.ts +17 -14
  142. package/dist/tailwindcss/v4/css-entries.d.ts +2 -2
  143. package/dist/tailwindcss/v4/css-sources.d.ts +5 -0
  144. package/dist/tailwindcss/v4/patcher-options.d.ts +1 -23
  145. package/dist/tailwindcss/v4/patcher.d.ts +1 -0
  146. package/dist/tailwindcss/v4-engine/source.d.ts +2 -2
  147. package/dist/tailwindcss/v4-engine/types.d.ts +17 -5
  148. package/dist/tailwindcss/version.d.ts +4 -0
  149. package/dist/tailwindcss-B-e2RiXr.js +642 -0
  150. package/dist/tailwindcss-C7dJHZ0G.mjs +591 -0
  151. package/dist/typedoc.export.d.ts +0 -2
  152. package/dist/types/index.d.ts +52 -49
  153. package/dist/types/shared.d.ts +6 -0
  154. package/dist/types/user-defined-options/general.d.ts +25 -24
  155. package/dist/types/user-defined-options/important.d.ts +33 -28
  156. package/dist/types/user-defined-options/lifecycle.d.ts +4 -4
  157. package/dist/types/user-defined-options/matcher.d.ts +6 -6
  158. package/dist/uni-app-x/vite.d.ts +1 -1
  159. package/dist/unocss/index.d.ts +2 -0
  160. package/dist/utils/disabled.d.ts +2 -3
  161. package/dist/utils/object.d.ts +9 -0
  162. package/dist/utils/options.d.ts +2 -0
  163. package/dist/utils/regex.d.ts +1 -0
  164. package/dist/{utils-DmC9_In3.js → utils-D7Ygohep.js} +2 -2
  165. package/dist/{utils-7DUGTFED.mjs → utils-DsaS975I.mjs} +1 -1
  166. package/dist/v3-engine-CHItlVq5.js +3616 -0
  167. package/dist/v3-engine-DcvCCHfs.mjs +3321 -0
  168. package/dist/vite-BgTPSkQS.js +24446 -0
  169. package/dist/vite-fFRpSvyz.mjs +24432 -0
  170. package/dist/vite.d.ts +1 -2
  171. package/dist/vite.js +3 -4
  172. package/dist/vite.mjs +2 -2
  173. package/dist/weapp-tw-css-import-rewrite-loader.js +5227 -18
  174. package/dist/weapp-tw-runtime-classset-loader.js +32 -9
  175. package/dist/webpack-BXSWVdXh.js +851 -0
  176. package/dist/webpack-Dx2AZpGU.mjs +841 -0
  177. package/dist/webpack.d.ts +1 -3
  178. package/dist/webpack.js +3 -4
  179. package/dist/webpack.mjs +2 -2
  180. package/package.json +38 -48
  181. package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
  182. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-assets.d.ts +0 -14
  183. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4-loaders.d.ts +0 -15
  184. package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +0 -9
  185. package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
  186. package/dist/cli/config.d.ts +0 -5
  187. package/dist/cli/helpers/patch-cwd.d.ts +0 -1
  188. package/dist/cli/mount-options/patch-status.d.ts +0 -2
  189. package/dist/cli/patch-options.d.ts +0 -6
  190. package/dist/cli/tokens.d.ts +0 -4
  191. package/dist/cli/workspace/package-dirs.d.ts +0 -3
  192. package/dist/cli/workspace/patch-package.d.ts +0 -3
  193. package/dist/cli/workspace/patch-utils.d.ts +0 -3
  194. package/dist/cli/workspace/types.d.ts +0 -11
  195. package/dist/cli/workspace/workspace-globs.d.ts +0 -2
  196. package/dist/cli/workspace/workspace-io.d.ts +0 -1
  197. package/dist/cli/workspace/workspace-lock.d.ts +0 -1
  198. package/dist/cli/workspace.d.ts +0 -2
  199. package/dist/constants-B-_T5UnW.mjs +0 -44
  200. package/dist/constants-p1dyh1x1.js +0 -73
  201. package/dist/css-imports-BbrbluP9.js +0 -177
  202. package/dist/css-imports-CSdPq_Sc.mjs +0 -128
  203. package/dist/experimental/index.d.ts +0 -2
  204. package/dist/experimental/oxc/ast-utils.d.ts +0 -30
  205. package/dist/experimental/oxc/index.d.ts +0 -2
  206. package/dist/experimental/oxc/module-specifiers.d.ts +0 -2
  207. package/dist/experimental/shared/cache.d.ts +0 -3
  208. package/dist/experimental/shared/transform.d.ts +0 -3
  209. package/dist/experimental/shared.d.ts +0 -8
  210. package/dist/experimental/swc/ast-utils.d.ts +0 -30
  211. package/dist/experimental/swc/index.d.ts +0 -2
  212. package/dist/experimental/swc/module-specifiers.d.ts +0 -2
  213. package/dist/generator-Y-Ikv4Fu.mjs +0 -1177
  214. package/dist/generator-css-Bwy_Uz89.mjs +0 -1097
  215. package/dist/generator-css-CRLrHW4F.js +0 -1124
  216. package/dist/generator-mmhXzZnv.js +0 -1276
  217. package/dist/js/syntax.d.ts +0 -10
  218. package/dist/lightningcss/index.d.ts +0 -8
  219. package/dist/lightningcss/style-handler/options.d.ts +0 -3
  220. package/dist/lightningcss/style-handler/selector-transform.d.ts +0 -10
  221. package/dist/lightningcss/style-handler/selector-utils.d.ts +0 -10
  222. package/dist/lightningcss/style-handler.d.ts +0 -17
  223. package/dist/loader-anchors-1MumTAtA.mjs +0 -205
  224. package/dist/loader-anchors-TrFvT6g1.js +0 -273
  225. package/dist/logger-BZ45DZJT.js +0 -1003
  226. package/dist/logger-BoVx1Dbt.mjs +0 -935
  227. package/dist/patcher-options-6gJN2EXy.js +0 -115
  228. package/dist/patcher-options-DQfR5xxT.mjs +0 -92
  229. package/dist/recorder-GdTJ3QqX.js +0 -2878
  230. package/dist/recorder-XdFvVASS.mjs +0 -2763
  231. package/dist/tailwindcss/recorder.d.ts +0 -13
  232. package/dist/tailwindcss/targets/paths.d.ts +0 -13
  233. package/dist/tailwindcss/targets/record-io.d.ts +0 -5
  234. package/dist/tailwindcss/targets/recorder.d.ts +0 -3
  235. package/dist/tailwindcss/targets/types.d.ts +0 -35
  236. package/dist/types/disabled-options.d.ts +0 -4
  237. package/dist/vite-BDywuCjn.mjs +0 -2186
  238. package/dist/vite-DgRh_GXn.js +0 -2199
  239. package/dist/webpack-CAJR4hhP.js +0 -456
  240. package/dist/webpack-CiHqVZTg.mjs +0 -441
  241. package/dist/webpack4.d.ts +0 -4
  242. package/dist/webpack4.js +0 -387
  243. package/dist/webpack4.mjs +0 -379
  244. package/scripts/postinstall.mjs +0 -59
@@ -0,0 +1,24 @@
1
+ import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
2
+ import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource } from '../../../generator';
3
+ import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
4
+ import type { InternalUserDefinedOptions } from '../../../types';
5
+ interface GeneratorSourceRuntimeState {
6
+ twPatcher: InternalUserDefinedOptions['twPatcher'];
7
+ }
8
+ interface GeneratorSourceSelectionOptions {
9
+ runtime?: Set<string> | undefined;
10
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
11
+ }
12
+ export interface GeneratorSourceMetadata {
13
+ matchedCssSourceFile?: string | undefined;
14
+ sourceBase?: string | undefined;
15
+ sourceCss?: string | undefined;
16
+ }
17
+ export type GeneratorResolvedSource = TailwindResolvedSource & {
18
+ __weappTailwindcssMeta?: GeneratorSourceMetadata | undefined;
19
+ };
20
+ export declare function resolveCssSourceBase(file: string, cssHandlerOptions: IStyleHandlerOptions): string;
21
+ export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("tailwindcss-patch").TailwindV4ResolvedSource | import("@/generator").TailwindV3ResolvedSource | undefined>;
22
+ export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
23
+ export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<TailwindSourceEntry[] | undefined>;
24
+ export {};
@@ -0,0 +1,10 @@
1
+ export declare function wrapUserLayerComponentsCss(css: string): string;
2
+ export declare function extractMarkedUserLayerComponentsCss(css: string): {
3
+ layers: string[];
4
+ rest: string;
5
+ };
6
+ export declare function reorderMarkedUserLayerComponentsCss(css: string): string;
7
+ export declare function mergeMarkedUserLayerComponentsCss(baseCss: string, markedCss: string): {
8
+ css: string;
9
+ merged: boolean;
10
+ };
@@ -1,43 +1,37 @@
1
1
  import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
2
+ import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
3
  import type { InternalUserDefinedOptions } from '../../types';
4
+ export { hasTailwindSourceDirectives, normalizeTailwindSourceForGenerator, removeTailwindSourceDirectives, resolveCssEntrySource, } from './generator-css/directives';
5
+ export { removeTailwindApplyRules, } from './generator-css/legacy-compat';
6
+ export { inheritLegacyUnitConvertedDeclarations, } from './generator-css/legacy-units';
7
+ export { createCssAppend, hasTailwindGeneratedCss, hasTailwindGeneratedCssMarkers, removeTailwindGeneratedCssByBanner, splitGeneratorPlaceholderCssBySourceOrder, splitTailwindGeneratedCssByBanner, splitTailwindV4GeneratedCss, splitTailwindV4GeneratedCssBySourceOrder, stripGeneratorPlaceholderMarkers, stripTailwindBanner, stripTailwindBanners, } from './generator-css/markers';
8
+ export { resolveGeneratorSource, } from './generator-css/source-resolver';
3
9
  export interface GenerateCssByGeneratorOptions {
4
10
  opts: InternalUserDefinedOptions;
5
11
  runtimeState: {
6
12
  twPatcher: InternalUserDefinedOptions['twPatcher'];
7
- patchPromise: Promise<void>;
13
+ readyPromise: Promise<void>;
8
14
  };
9
15
  runtime: Set<string>;
10
16
  rawSource: string;
11
17
  file: string;
12
18
  cssHandlerOptions: IStyleHandlerOptions;
13
19
  cssUserHandlerOptions: IStyleHandlerOptions;
20
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
14
21
  styleHandler: InternalUserDefinedOptions['styleHandler'];
15
22
  debug: (format: string, ...args: unknown[]) => void;
23
+ previousCss?: string | undefined;
16
24
  }
17
25
  export interface GenerateCssByGeneratorResult {
18
26
  css: string;
19
27
  target: string;
20
- source: 'generator' | 'generator-forced';
28
+ source: 'generator';
29
+ dependencies: string[];
30
+ incremental?: boolean | undefined;
21
31
  }
22
- export declare function createCssAppend(base: string, extra: string): string;
23
- export declare function splitTailwindV4GeneratedCss(rawSource: string, rawTailwindCss: string): string | undefined;
24
- export declare function removeTailwindGeneratedCssByBanner(rawSource: string): string | undefined;
25
- export declare function stripTailwindBanner(css: string): string;
26
- export declare function stripTailwindBanners(css: string): string;
27
- export declare function stripGeneratorPlaceholderMarkers(css: string): string;
28
- export declare function hasTailwindGeneratedCss(rawSource: string): boolean;
29
- export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boolean;
30
- export declare function inheritLegacyUnitConvertedDeclarations(css: string, legacyCss: string): string;
31
- export declare function removeTailwindSourceDirectives(rawSource: string): string;
32
- export declare function hasTailwindSourceDirectives(rawSource: string): boolean;
33
- export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
34
- removeConfig?: boolean;
35
- }): {
36
- css: string;
37
- config: string | undefined;
38
- configRequest: string | undefined;
39
- base: string;
40
- } | undefined;
41
- export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GenerateCssByGeneratorOptions['runtimeState'], rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions): Promise<import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource>;
42
32
  export declare function isPureLocalCssImportWrapper(css: string): boolean;
43
33
  export declare function generateCssByGenerator(options: GenerateCssByGeneratorOptions): Promise<GenerateCssByGeneratorResult | undefined>;
34
+ export interface ValidateCandidatesByGeneratorOptions extends Omit<GenerateCssByGeneratorOptions, 'runtime'> {
35
+ candidates: Set<string>;
36
+ }
37
+ export declare function validateCandidatesByGenerator(options: ValidateCandidatesByGeneratorOptions): Promise<Set<string>>;
@@ -0,0 +1,22 @@
1
+ export interface HmrTimingDetails {
2
+ emit?: boolean;
3
+ file?: string;
4
+ hooks?: Record<string, HmrTimingHookSummary>;
5
+ metric?: 'hook' | 'total';
6
+ wallMs?: number;
7
+ }
8
+ export interface HmrTimingHookSummary {
9
+ count: number;
10
+ durationMs: number;
11
+ maxMs: number;
12
+ }
13
+ type HmrTimingBundler = 'vite' | 'webpack' | 'gulp';
14
+ export interface HmrTimingRecorder {
15
+ emitTotal: (phase?: string) => void;
16
+ measure: <T>(phase: string, task: () => T | Promise<T>, details?: HmrTimingDetails) => Promise<T>;
17
+ record: (phase: string, durationMs: number, details?: HmrTimingDetails) => void;
18
+ }
19
+ export declare function shouldEmitHmrTiming(): boolean;
20
+ export declare function emitHmrTiming(bundler: HmrTimingBundler, phase: string, durationMs: number, details?: HmrTimingDetails): void;
21
+ export declare function createHmrTimingRecorder(bundler: HmrTimingBundler): HmrTimingRecorder;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function stripRequestQuery(request: string): string;
2
+ export declare function isSourceStyleRequest(request: string | undefined): boolean;
@@ -31,6 +31,7 @@ export interface BundleBuildState {
31
31
  runtimeAffectingHashByFile: Map<string, string>;
32
32
  linkedByEntry: Map<string, Set<string>>;
33
33
  dependentsByLinkedFile: Map<string, Set<string>>;
34
+ generatorCandidateSignature?: string | undefined;
34
35
  }
35
36
  interface UpdateBundleBuildStateOptions {
36
37
  incremental?: boolean;
@@ -1,11 +1,12 @@
1
1
  import type { OutputAsset } from 'rollup';
2
2
  import type { Plugin, ResolvedConfig } from 'vite';
3
+ import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
3
4
  import type { InternalUserDefinedOptions } from '../../types';
4
5
  interface CssFinalizerContext {
5
6
  opts: InternalUserDefinedOptions;
6
7
  runtimeState: {
7
8
  twPatcher: InternalUserDefinedOptions['twPatcher'];
8
- patchPromise: Promise<void>;
9
+ readyPromise: Promise<void>;
9
10
  };
10
11
  ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
11
12
  isCssAssetProcessed: (asset: OutputAsset, file?: string) => boolean;
@@ -13,10 +14,15 @@ interface CssFinalizerContext {
13
14
  debug: (format: string, ...args: unknown[]) => void;
14
15
  getResolvedConfig: () => ResolvedConfig | undefined;
15
16
  recordCssAssetResult?: (file: string, css: string) => void;
17
+ recordViteProcessedCssAssetResult?: (file: string, css: string) => void;
18
+ getViteProcessedCssAssetResults?: () => Iterable<[string, string]>;
16
19
  getRecordedGeneratorCandidates?: () => Set<string> | undefined;
17
20
  getSourceCandidates?: () => Set<string>;
21
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
18
22
  waitForSourceCandidateSyncs?: () => Promise<void>;
19
23
  rememberMainCssSource?: (file: string, rawSource: string) => void;
24
+ getRememberedMainCssSource?: (file: string) => string | undefined;
25
+ isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
20
26
  }
21
27
  export declare function createViteCssFinalizerOutputPlugin(context: CssFinalizerContext): Plugin;
22
28
  export {};
@@ -0,0 +1,2 @@
1
+ export declare function collectUnescapedDynamicCandidates(source: string): string[];
2
+ export declare function collectLegacyContainerCompatCandidates(sourceCandidates: Set<string>, candidates: Set<string>): Set<string>;
@@ -0,0 +1,24 @@
1
+ import type { InternalUserDefinedOptions, IStyleHandlerOptions } from '../../../types';
2
+ type CssHandlerOptions = IStyleHandlerOptions & {
3
+ postcssOptions: {
4
+ options: {
5
+ from: string;
6
+ };
7
+ };
8
+ majorVersion: number | undefined;
9
+ sourceOptions?: {
10
+ outputRoot?: string | undefined;
11
+ } | undefined;
12
+ };
13
+ interface CssHandlerOptionsCacheOptions {
14
+ getAppType: () => InternalUserDefinedOptions['appType'];
15
+ mainCssChunkMatcher: InternalUserDefinedOptions['mainCssChunkMatcher'];
16
+ getMajorVersion: () => number | undefined;
17
+ getOutputRoot?: (() => string | undefined) | undefined;
18
+ }
19
+ export interface CssHandlerOptionsCache {
20
+ getCssHandlerOptions: (file: string) => CssHandlerOptions;
21
+ getCssUserHandlerOptions: (file: string) => CssHandlerOptions;
22
+ }
23
+ export declare function createCssHandlerOptionsCache(options: CssHandlerOptionsCacheOptions): CssHandlerOptionsCache;
24
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { InternalUserDefinedOptions } from '../../../types';
2
+ export declare function createCssTransformShareScope(file: string, rawSource: string): string;
3
+ export declare function createCssTransformShareScopeKey(opts: InternalUserDefinedOptions, file: string, rawSource: string): string;
4
+ export declare function createCssRuntimeSignature(runtimeSignature: string, generatorCandidateSignature: string): string;
@@ -0,0 +1 @@
1
+ export declare function hasOmittedKnownBundleFiles(currentBundleFiles: string[], previousBundleFiles: Iterable<string>): boolean;
@@ -0,0 +1,2 @@
1
+ import type { OutputEntry } from '../bundle-entries';
2
+ export declare function createJsEntryResolver(jsEntries: Map<string, OutputEntry>): (id: string) => OutputEntry | undefined;
@@ -0,0 +1,8 @@
1
+ import type { CreateJsHandlerOptions, InternalUserDefinedOptions } from '../../../types';
2
+ interface JsHandlerOptionsFactoryOptions {
3
+ getMajorVersion: () => number | undefined;
4
+ moduleGraph: CreateJsHandlerOptions['moduleGraph'];
5
+ }
6
+ export declare function resolveUniAppXJsTransformEnabled(uniAppX: InternalUserDefinedOptions['uniAppX'] | undefined): boolean;
7
+ export declare function createJsHandlerOptionsFactory(options: JsHandlerOptionsFactoryOptions): (absoluteFilename: string, extra?: CreateJsHandlerOptions) => CreateJsHandlerOptions;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { OutputEntry } from '../bundle-entries';
2
+ import type { LinkedJsModuleResult } from '../../../types';
3
+ interface LinkedUpdateHelpersOptions {
4
+ jsEntries: Map<string, OutputEntry>;
5
+ onUpdate: (fileName: string, previous: string, next: string) => void;
6
+ debug: (format: string, ...args: unknown[]) => void;
7
+ }
8
+ export declare function createLinkedUpdateHelpers(options: LinkedUpdateHelpersOptions): {
9
+ applyLinkedUpdates: (linked?: Record<string, LinkedJsModuleResult>) => void;
10
+ pendingLinkedUpdates: (() => void)[];
11
+ };
12
+ export declare function collectLinkedFileNames(linked: Record<string, LinkedJsModuleResult> | undefined, getJsEntry: (id: string) => OutputEntry | undefined, linkedSet: Set<string> | undefined): void;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface BundleMetric {
2
+ total: number;
3
+ transformed: number;
4
+ cacheHits: number;
5
+ elapsed: number;
6
+ }
7
+ export interface BundleMetrics {
8
+ runtimeSet: number;
9
+ html: BundleMetric;
10
+ js: BundleMetric;
11
+ css: BundleMetric;
12
+ }
13
+ export declare function formatDebugFileList(files: Set<string>, limit?: number): string;
14
+ export declare function createEmptyMetrics(): BundleMetrics;
15
+ export declare function measureElapsed(start: number): number;
16
+ export declare function formatCacheHitRate(metric: BundleMetric): string;
17
+ export declare function formatMs(value: number): string;
@@ -0,0 +1,9 @@
1
+ import type { BundleSnapshot } from '../bundle-state';
2
+ interface LogBundleProcessPlanOptions {
3
+ debug: (format: string, ...args: unknown[]) => void;
4
+ snapshot: BundleSnapshot;
5
+ useIncrementalMode: boolean;
6
+ iteration: number;
7
+ }
8
+ export declare function logBundleProcessPlan(options: LogBundleProcessPlanOptions): void;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { OutputAsset } from 'rollup';
2
+ interface GeneratorDependencyContext {
3
+ addWatchFile?: (id: string) => void;
4
+ }
5
+ export declare function createReplayCssAsset(fileName: string, source: string): OutputAsset;
6
+ export declare function registerGeneratorDependencies(ctx: GeneratorDependencyContext, dependencies: readonly string[] | undefined): void;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { EntryType } from '../bundle-state';
2
+ export declare function summarizeStringDiff(previous: string, next: string): string;
3
+ export declare function createLinkedImpactSignature(entry: string, linkedImpactsByEntry: Map<string, Set<string>>, sourceHashByFile: Map<string, string>): string | undefined;
4
+ export declare function createJsHashSalt(runtimeSignature: string, linkedImpactSignature?: string): string;
5
+ export declare function createStableTextSignature(input: string): string;
6
+ export declare function createCandidateSignature(candidates: Set<string>): string;
7
+ export declare function getSnapshotHash(snapshotMap: Map<string, string>, file: string, fallback: string): string;
8
+ export declare function hasRuntimeAffectingSourceChanges(changedByType: Record<EntryType, Set<string>>): boolean;
@@ -1,33 +1,45 @@
1
1
  import type { OutputAsset, OutputChunk } from 'rollup';
2
2
  import type { ResolvedConfig } from 'vite';
3
+ import type { HmrTimingRecorder } from '../shared/hmr-timing';
3
4
  import type { BundleSnapshot } from './bundle-state';
5
+ import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
4
6
  import type { InternalUserDefinedOptions } from '../../types';
5
7
  interface GenerateBundleContext {
6
8
  opts: InternalUserDefinedOptions;
7
9
  runtimeState: {
8
10
  twPatcher: InternalUserDefinedOptions['twPatcher'];
9
- patchPromise: Promise<void>;
11
+ readyPromise: Promise<void>;
10
12
  };
11
13
  ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
12
- ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean) => Promise<Set<string>>;
14
+ ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
15
+ allowBaselineOnlyInitialSync?: boolean | undefined;
16
+ baseClassSet?: Set<string> | undefined;
17
+ }) => Promise<Set<string>>;
13
18
  debug: (format: string, ...args: unknown[]) => void;
14
19
  getResolvedConfig: () => ResolvedConfig | undefined;
15
20
  markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
21
+ isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
16
22
  recordCssAssetResult?: (file: string, css: string) => void;
23
+ recordViteProcessedCssAssetResult?: (file: string, css: string) => void;
24
+ getViteProcessedCssAssetResults?: () => Iterable<[string, string]>;
17
25
  getSourceCandidates?: () => Set<string>;
26
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
18
27
  waitForSourceCandidateSyncs?: () => Promise<void>;
19
28
  rememberMainCssSource?: (file: string, rawSource: string, cssRuntimeSignature: string) => void;
20
29
  getRememberedMainCssSources?: () => Map<string, string>;
21
30
  getRememberedMainCssSignature?: (file: string) => string | undefined;
22
31
  setRememberedMainCssSignature?: (file: string, cssRuntimeSignature: string) => void;
23
32
  recordGeneratorCandidates?: (candidates: Set<string>) => void;
33
+ hmrTimingRecorder?: HmrTimingRecorder;
24
34
  }
25
35
  interface GenerateBundleThis {
36
+ addWatchFile?: (id: string) => void;
26
37
  emitFile?: (emittedFile: {
27
38
  type: 'asset';
28
39
  fileName: string;
29
40
  source: string;
30
41
  }) => string;
31
42
  }
43
+ export declare function resolveReplayCssOutputFile(rootDir: string, file: string): string;
32
44
  export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
33
45
  export {};
@@ -10,9 +10,13 @@ type ExtractValidCandidatesFn = (options?: MemoryExtractValidCandidatesOptions)
10
10
  type ExtractRawCandidateResult = Awaited<ReturnType<typeof extractRawCandidatesWithPositions>>;
11
11
  type ExtractRawCandidatesFn = (content: string, extension?: string) => Promise<ExtractRawCandidateResult>;
12
12
  export interface BundleRuntimeClassSetManager {
13
- sync: (patcher: TailwindcssPatcherLike, snapshot: BundleSnapshot) => Promise<Set<string>>;
13
+ sync: (patcher: TailwindcssPatcherLike, snapshot: BundleSnapshot, options?: BundleRuntimeClassSetSyncOptions) => Promise<Set<string>>;
14
14
  reset: () => Promise<void>;
15
15
  }
16
+ export interface BundleRuntimeClassSetSyncOptions {
17
+ baseClassSet?: Set<string> | undefined;
18
+ skipInitialFullScanWithBase?: boolean | undefined;
19
+ }
16
20
  interface CreateBundleRuntimeClassSetManagerOptions {
17
21
  extractCandidates?: ExtractValidCandidatesFn;
18
22
  extractRawCandidates?: ExtractRawCandidatesFn;
@@ -1,3 +1,6 @@
1
- import type { Plugin } from 'vite';
2
1
  import type { UserDefinedOptions } from '../../types';
3
- export declare function UnifiedViteWeappTailwindcssPlugin(options?: UserDefinedOptions): Plugin[] | undefined;
2
+ export interface WeappTailwindcssVitePlugin {
3
+ name: string;
4
+ [hook: string]: any;
5
+ }
6
+ export declare function WeappTailwindcss(options?: UserDefinedOptions): WeappTailwindcssVitePlugin[] | undefined;
@@ -0,0 +1,5 @@
1
+ import type { Plugin } from 'vite';
2
+ export declare function getPostcssPluginName(plugin: unknown): string | undefined;
3
+ export declare function removeTailwindPostcssPlugins(plugins: unknown[]): number;
4
+ export declare function removeTailwindVitePlugins(plugins: Plugin[]): number;
5
+ export declare function disableAndRemoveTailwindVitePlugins(plugins: unknown[]): number;
@@ -0,0 +1,6 @@
1
+ import postcssrc from 'postcss-load-config';
2
+ export declare function resolveFilteredPostcssConfig(root: string): Promise<{
3
+ options: import("postcss").ProcessOptions<import("postcss").Document | import("postcss").Root>;
4
+ plugins: postcssrc.ResultPlugin[];
5
+ removed: number;
6
+ } | undefined>;
@@ -0,0 +1,32 @@
1
+ import type { OutputAsset, OutputBundle } from 'rollup';
2
+ import type { InternalUserDefinedOptions } from '../../types';
3
+ interface CssAssetMarkerMatcher {
4
+ (asset: OutputAsset, file?: string): boolean;
5
+ }
6
+ interface CssAssetProcessedMarker {
7
+ (asset: OutputAsset, file?: string): void;
8
+ }
9
+ interface CssAssetResultRecorder {
10
+ (file: string, css: string): void;
11
+ }
12
+ interface CssAssetResultsGetter {
13
+ (): Iterable<[string, string]>;
14
+ }
15
+ interface CollectViteProcessedCssAssetOptions {
16
+ isViteProcessedCssAsset?: CssAssetMarkerMatcher | undefined;
17
+ markCssAssetProcessed?: CssAssetProcessedMarker | undefined;
18
+ recordCssAssetResult?: CssAssetResultRecorder | undefined;
19
+ recordViteProcessedCssAssetResult?: CssAssetResultRecorder | undefined;
20
+ debug?: ((format: string, ...args: unknown[]) => void) | undefined;
21
+ }
22
+ interface InjectViteProcessedCssAssetOptions {
23
+ opts: InternalUserDefinedOptions;
24
+ getViteProcessedCssAssetResults?: CssAssetResultsGetter | undefined;
25
+ markCssAssetProcessed?: CssAssetProcessedMarker | undefined;
26
+ recordCssAssetResult?: CssAssetResultRecorder | undefined;
27
+ debug?: ((format: string, ...args: unknown[]) => void) | undefined;
28
+ onUpdate?: ((file: string, original: string, generated: string) => void) | undefined;
29
+ }
30
+ export declare function collectViteProcessedCssAssetResults(bundle: OutputBundle, options: CollectViteProcessedCssAssetOptions): number;
31
+ export declare function injectViteProcessedCssIntoMainCssAssets(bundle: OutputBundle, options: InjectViteProcessedCssAssetOptions): number;
32
+ export {};
@@ -1,11 +1,16 @@
1
1
  import type { Plugin } from 'vite';
2
2
  import type { AppType } from '../../types';
3
3
  interface RewriteCssImportsOptions {
4
- appType?: AppType;
5
- getAppType?: () => AppType | undefined;
4
+ appType?: AppType | undefined;
5
+ getAppType?: (() => AppType | undefined) | undefined;
6
+ generateTailwindCss?: ((id: string, code: string, hookContext?: {
7
+ addWatchFile?: (id: string) => void;
8
+ }) => Promise<string | undefined> | string | undefined) | undefined;
9
+ shouldOwnTailwindGeneration?: boolean | undefined;
6
10
  shouldRewrite: boolean;
7
- rootImport?: string;
11
+ rootImport?: string | undefined;
8
12
  weappTailwindcssDirPosix: string;
13
+ onTailwindRootCss?: ((id: string, code: string) => Promise<void> | void) | undefined;
9
14
  }
10
15
  export declare function createRewriteCssImportsPlugins(options: RewriteCssImportsOptions): Plugin[];
11
16
  export {};
@@ -0,0 +1,25 @@
1
+ import type { BundleSnapshot } from './bundle-state';
2
+ import type { InternalUserDefinedOptions } from '../../types';
3
+ interface CreateViteRuntimeClassSetOptions {
4
+ opts: InternalUserDefinedOptions;
5
+ initialTwPatcher: InternalUserDefinedOptions['twPatcher'];
6
+ refreshTailwindcssPatcher: InternalUserDefinedOptions['refreshTailwindcssPatcher'];
7
+ uniAppXEnabled: boolean;
8
+ customAttributesEntities: unknown;
9
+ disabledDefaultTemplateHandler: boolean;
10
+ debug: (format: string, ...args: unknown[]) => void;
11
+ }
12
+ export declare function createViteRuntimeClassSet(options: CreateViteRuntimeClassSetOptions): {
13
+ runtimeState: {
14
+ twPatcher: import("@/types").TailwindcssPatcherLike;
15
+ readyPromise: Promise<void>;
16
+ refreshTailwindcssPatcher: (options?: import("@/types").RefreshTailwindcssPatcherOptions) => Promise<import("@/types").TailwindcssPatcherLike>;
17
+ };
18
+ refreshRuntimeState: (force: boolean) => Promise<void>;
19
+ ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
20
+ ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
21
+ allowBaselineOnlyInitialSync?: boolean | undefined;
22
+ baseClassSet?: Set<string> | undefined;
23
+ }) => Promise<Set<string>>;
24
+ };
25
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { Plugin } from 'vite';
2
+ interface ViteServeCssGenerationOptions {
3
+ generateCss: (id: string, code: string, hookContext?: {
4
+ addWatchFile?: (id: string) => void;
5
+ }) => Promise<string | undefined> | string | undefined;
6
+ getCommand: () => string | undefined;
7
+ onTailwindRootCss?: ((id: string, code: string) => Promise<void> | void) | undefined;
8
+ shouldGenerate: () => boolean;
9
+ }
10
+ export declare function createViteServeCssGenerationPlugins(options: ViteServeCssGenerationOptions): Plugin[];
11
+ export {};
@@ -1,14 +1,32 @@
1
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
1
2
  export interface SourceCandidateCollector {
2
3
  sync: (id: string, source: string) => Promise<void>;
4
+ syncCss: (id: string, source: string) => Promise<void>;
5
+ merge: (id: string, source: string) => Promise<void>;
3
6
  syncFile: (id: string) => Promise<void>;
7
+ syncCurrentFile: (id: string) => Promise<void>;
4
8
  scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
9
+ syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
5
10
  remove: (id: string) => void;
6
11
  values: () => Set<string>;
12
+ valuesForEntries: (entries: TailwindSourceEntry[] | undefined) => Set<string>;
13
+ snapshot: () => SourceCandidateCollectorSnapshot;
14
+ restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
7
15
  clear: () => void;
8
16
  }
17
+ export interface SourceCandidateCollectorSnapshot {
18
+ candidatesById: Array<[string, string[]]>;
19
+ cssCandidatesById?: Array<[string, string[]]> | undefined;
20
+ scanCandidatesById?: Array<[string, string[]]> | undefined;
21
+ transformCandidatesById?: Array<[string, string[]]> | undefined;
22
+ inlineExcludedCandidates: string[];
23
+ inlineIncludedCandidates: string[];
24
+ }
9
25
  interface ScanSourceCandidateRootOptions {
10
26
  root: string;
11
- outDir?: string;
27
+ outDir?: string | undefined;
28
+ entries?: TailwindSourceEntry[] | undefined;
29
+ explicit?: boolean | undefined;
12
30
  }
13
31
  export declare function isSourceCandidateRequest(id: string): boolean;
14
32
  export declare function createSourceCandidateCollector(): SourceCandidateCollector;
@@ -0,0 +1,26 @@
1
+ import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
+ import type { TailwindcssPatcherLike, UserDefinedOptions } from '../../types';
3
+ export interface ResolvedTailwindV4CssEntries {
4
+ entries: TailwindSourceEntry[];
5
+ explicit: boolean;
6
+ inlineCandidates: TailwindInlineSourceCandidates;
7
+ dependencies: string[];
8
+ }
9
+ export interface ResolvedViteSourceScan {
10
+ dependencies?: string[] | undefined;
11
+ entries?: TailwindSourceEntry[] | undefined;
12
+ explicit?: boolean | undefined;
13
+ inlineCandidates?: TailwindInlineSourceCandidates | undefined;
14
+ }
15
+ interface ResolveViteSourceScanOptions {
16
+ root?: string | undefined;
17
+ outDir?: string | undefined;
18
+ }
19
+ export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates: Array<TailwindInlineSourceCandidates | undefined>): TailwindInlineSourceCandidates | undefined;
20
+ export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
21
+ export declare function resolveViteTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
22
+ export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
23
+ export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
24
+ export declare function resolveViteSourceScanEntries(options: UserDefinedOptions, patcher: TailwindcssPatcherLike, scanOptions?: ResolveViteSourceScanOptions): Promise<ResolvedViteSourceScan | undefined>;
25
+ export declare function createViteSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
26
+ export {};
@@ -0,0 +1,5 @@
1
+ type StaticContentValue = string | StaticContentValue[] | {
2
+ files: StaticContentValue;
3
+ };
4
+ export declare function readStaticConfigContent(configPath: string): StaticContentValue | undefined;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare function resolveImplicitTailwindcssBasedirFromViteRoot(root: string): string;
@@ -15,6 +15,12 @@ interface WebpackWatchChangeLike {
15
15
  modifiedFiles?: Set<string>;
16
16
  removedFiles?: Set<string>;
17
17
  }
18
+ interface RuntimeWatchDependenciesLike {
19
+ files?: Iterable<string>;
20
+ contexts?: Iterable<string>;
21
+ }
18
22
  export declare function createAssetHashByChunkMap(chunks: Iterable<ChunkLike>): Map<string, string>;
23
+ export declare function createRuntimeAwareCssHash(assetHash: string | undefined, sourceHash: string, runtimeSetHash: string): string;
19
24
  export declare function hasWatchChanges(compiler: WebpackWatchChangeLike): boolean;
25
+ export declare function isWatchFileInRuntimeDependencies(file: string, dependencies: RuntimeWatchDependenciesLike): boolean;
20
26
  export {};
@@ -1,16 +1,20 @@
1
1
  import type { Compiler } from 'webpack';
2
+ import type { BundleRuntimeClassSetManager } from '../../vite/incremental-runtime-class-set';
2
3
  import type { AppType, InternalUserDefinedOptions } from '../../../types';
3
4
  interface SetupWebpackV5ProcessAssetsHookOptions {
4
5
  compiler: Compiler;
5
6
  options: InternalUserDefinedOptions;
6
- appType?: AppType;
7
+ appType?: AppType | undefined;
7
8
  runtimeState: {
8
9
  twPatcher: InternalUserDefinedOptions['twPatcher'];
9
- patchPromise: Promise<void>;
10
+ readyPromise: Promise<void>;
10
11
  };
11
12
  getRuntimeRefreshRequirement: () => boolean;
12
13
  refreshRuntimeMetadata: (force: boolean) => Promise<void>;
14
+ isWebpackProcessedCssAsset?: ((file: string, rawSource: string) => boolean) | undefined;
13
15
  consumeRuntimeRefreshRequirement: () => void;
16
+ isWatchMode?: (() => boolean) | undefined;
17
+ runtimeClassSetManager?: BundleRuntimeClassSetManager | undefined;
14
18
  debug: (format: string, ...args: unknown[]) => void;
15
19
  }
16
20
  export declare function setupWebpackV5ProcessAssetsHook(options: SetupWebpackV5ProcessAssetsHookOptions): void;
@@ -1,18 +1,24 @@
1
+ import type { TailwindV4CssSource } from 'tailwindcss-patch';
1
2
  import type { Compiler } from 'webpack';
3
+ import type { TailwindRuntimeState } from '../../../tailwindcss/runtime';
2
4
  import type { AppType, InternalUserDefinedOptions } from '../../../types';
3
5
  interface SetupWebpackV5LoadersOptions {
4
6
  compiler: Compiler;
5
7
  options: InternalUserDefinedOptions;
6
- appType?: AppType;
8
+ appType?: AppType | undefined;
7
9
  weappTailwindcssPackageDir: string;
8
10
  shouldRewriteCssImports: boolean;
9
- runtimeLoaderPath?: string;
10
- runtimeCssImportRewriteLoaderPath?: string;
11
+ runtimeLoaderPath?: string | undefined;
12
+ registerAutoCssSource?: ((source: TailwindV4CssSource) => Promise<void> | void) | undefined;
13
+ runtimeState: TailwindRuntimeState;
11
14
  getClassSetInLoader: () => Promise<void>;
15
+ getRuntimeSetInLoader: () => Promise<Set<string>>;
16
+ markWebpackProcessedCssSource?: ((file: string) => void) | undefined;
12
17
  getRuntimeWatchDependencies: () => {
13
18
  files: ReadonlySet<string>;
14
19
  contexts: ReadonlySet<string>;
15
20
  };
21
+ runtimeRegistryKey?: string | undefined;
16
22
  debug: (format: string, ...args: unknown[]) => void;
17
23
  }
18
24
  export declare function setupWebpackV5Loaders(options: SetupWebpackV5LoadersOptions): void;
@@ -1,9 +1,10 @@
1
1
  import type { Compiler } from 'webpack';
2
2
  import type { AppType, IBaseWebpackPlugin, InternalUserDefinedOptions, UserDefinedOptions } from '../../../types';
3
3
  export declare const weappTailwindcssPackageDir: string;
4
- export declare class UnifiedWebpackPluginV5 implements IBaseWebpackPlugin {
4
+ export declare class WeappTailwindcss implements IBaseWebpackPlugin {
5
5
  options: InternalUserDefinedOptions;
6
6
  appType?: AppType;
7
+ private hasInitialTailwindCssRoots;
7
8
  constructor(options?: UserDefinedOptions);
8
9
  apply(compiler: Compiler): void;
9
10
  }