weapp-tailwindcss 5.0.11 → 5.0.13

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 (109) hide show
  1. package/dist/{bundle-state-BwtEqxvU.js → bundle-state-CKWeTEhv.js} +2 -40
  2. package/dist/{bundle-state-CXzPknlT.mjs → bundle-state-zQ2MrDdi.mjs} +2 -34
  3. package/dist/bundlers/gulp/vinyl-transform.d.ts +1 -1
  4. package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +7 -2
  5. package/dist/bundlers/shared/generator-css/source-files.d.ts +1 -0
  6. package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +3 -0
  7. package/dist/bundlers/shared/generator-css/source-resolver/config.d.ts +7 -0
  8. package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +4 -0
  9. package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +15 -0
  10. package/dist/bundlers/shared/generator-css/source-resolver/postcss-source.d.ts +12 -0
  11. package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +22 -0
  12. package/dist/bundlers/shared/generator-css/source-resolver.d.ts +5 -22
  13. package/dist/bundlers/shared/generator-css/types.d.ts +2 -0
  14. package/dist/bundlers/shared/generator-css/validate.d.ts +1 -0
  15. package/dist/bundlers/shared/hmr-timing.d.ts +1 -0
  16. package/dist/bundlers/vite/css-memory.d.ts +27 -0
  17. package/dist/bundlers/vite/generate-bundle/bundle-file-names.d.ts +2 -0
  18. package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +8 -0
  19. package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +4 -0
  20. package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +5 -0
  21. package/dist/bundlers/vite/generate-bundle/css-output.d.ts +9 -7
  22. package/dist/bundlers/vite/generate-bundle/env-flags.d.ts +7 -0
  23. package/dist/bundlers/vite/generate-bundle/finalize.d.ts +58 -0
  24. package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +31 -0
  25. package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +77 -0
  26. package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +53 -0
  27. package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -1
  28. package/dist/bundlers/vite/generate-bundle/runtime-linked-css.d.ts +4 -0
  29. package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +21 -0
  30. package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +2 -1
  31. package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +29 -0
  32. package/dist/bundlers/vite/generate-bundle/timing.d.ts +1 -0
  33. package/dist/bundlers/vite/generate-bundle/types.d.ts +7 -0
  34. package/dist/bundlers/vite/generate-bundle/uni-app-x-postprocess.d.ts +20 -0
  35. package/dist/bundlers/vite/generate-bundle/vite-css-cache.d.ts +6 -0
  36. package/dist/bundlers/vite/generate-bundle.d.ts +2 -1
  37. package/dist/bundlers/vite/hot-css-modules.d.ts +5 -0
  38. package/dist/bundlers/vite/map-cache.d.ts +2 -0
  39. package/dist/bundlers/vite/processed-css-assets.d.ts +16 -0
  40. package/dist/bundlers/vite/resolve-app-type.d.ts +1 -2
  41. package/dist/bundlers/vite/source-candidate-scan-signature.d.ts +13 -0
  42. package/dist/bundlers/vite/source-candidates.d.ts +9 -0
  43. package/dist/bundlers/vite/source-scan/css-entries.d.ts +1 -0
  44. package/dist/bundlers/vite/source-scan.d.ts +1 -1
  45. package/dist/bundlers/vite/weapp-vite-config.d.ts +3 -0
  46. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +11 -8
  47. package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +2 -0
  48. package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +5 -0
  49. package/dist/cache/index.d.ts +4 -0
  50. package/dist/cli.js +9 -2
  51. package/dist/cli.mjs +8 -1
  52. package/dist/core.d.ts +7 -0
  53. package/dist/core.js +8 -5
  54. package/dist/core.mjs +8 -5
  55. package/dist/css-macro.js +1 -1
  56. package/dist/css-macro.mjs +1 -1
  57. package/dist/{defaults-DH0ZQRhy.mjs → defaults-Bqx18S1f.mjs} +2 -35
  58. package/dist/{defaults-Boc26eel.js → defaults-C_J_kBpw.js} +2 -35
  59. package/dist/defaults.js +1 -1
  60. package/dist/defaults.mjs +1 -1
  61. package/dist/framework/index.d.ts +59 -0
  62. package/dist/framework.d.ts +1 -0
  63. package/dist/framework.js +198 -0
  64. package/dist/framework.mjs +180 -0
  65. package/dist/{generator-ChgOWNOj.js → generator-CzpArpCL.js} +1 -1
  66. package/dist/{generator-h2XRiJ9-.mjs → generator-ITLd7PTl.mjs} +1 -1
  67. package/dist/generator.js +2 -2
  68. package/dist/generator.mjs +2 -2
  69. package/dist/{gulp-Be88jhoY.mjs → gulp-DfOQERcV.mjs} +137 -23
  70. package/dist/{gulp-CHtZF-oT.js → gulp-XT8Jc7lH.js} +137 -23
  71. package/dist/gulp.js +1 -1
  72. package/dist/gulp.mjs +1 -1
  73. package/dist/{hmr-timing-BkivBZvN.js → hmr-timing-BMftW7Us.js} +354 -225
  74. package/dist/{hmr-timing-Ct5w4hdM.mjs → hmr-timing-DQIP_8qP.mjs} +341 -225
  75. package/dist/index.d.ts +1 -0
  76. package/dist/index.js +20 -4
  77. package/dist/index.mjs +6 -5
  78. package/dist/postcss.js +9 -10
  79. package/dist/postcss.mjs +7 -5
  80. package/dist/{precheck-CY9oaH49.js → precheck-B0Z8yW7E.js} +108 -27
  81. package/dist/{precheck-BpHxsWRd.mjs → precheck-CRI90iL1.mjs} +109 -28
  82. package/dist/presets.js +3 -3
  83. package/dist/presets.mjs +3 -3
  84. package/dist/tailwindcss/source-scan.d.ts +1 -0
  85. package/dist/tailwindcss/v3-engine/generator.d.ts +17 -0
  86. package/dist/tailwindcss/v3-engine/index.d.ts +1 -1
  87. package/dist/tailwindcss/v3-engine/types.d.ts +1 -0
  88. package/dist/tailwindcss/v4-engine/generator.d.ts +19 -0
  89. package/dist/tailwindcss/v4-engine/index.d.ts +1 -1
  90. package/dist/{tailwindcss-Bfy2egdX.mjs → tailwindcss-DTq3uYBK.mjs} +2 -2
  91. package/dist/{tailwindcss-DbbAKAZP.js → tailwindcss-DZEwT3C_.js} +3 -3
  92. package/dist/{transform-r5evL6Hn.mjs → transform-DfcEjsZF.mjs} +29 -21
  93. package/dist/{transform-Cd634UZV.js → transform-YmrmxuF3.js} +29 -21
  94. package/dist/types/user-defined-options/general.d.ts +3 -1
  95. package/dist/{utils-Dolmt8EO.js → utils-BCa37Wqj.js} +2 -17
  96. package/dist/{utils-DsaS975I.mjs → utils-DodxWHGz.mjs} +2 -17
  97. package/dist/{v3-engine-D0yA9ZkF.js → v3-engine-2rrgylhn.js} +194 -34
  98. package/dist/{v3-engine-CFkP6dWF.mjs → v3-engine-C6eJ0YzK.mjs} +176 -34
  99. package/dist/{vite-j9cB2Ff1.js → vite-CXHVsHmX.js} +2071 -1160
  100. package/dist/{vite-Bd8qf9dK.mjs → vite-DjI09vVN.mjs} +2071 -1160
  101. package/dist/vite.js +1 -1
  102. package/dist/vite.mjs +1 -1
  103. package/dist/weapp-tw-css-import-rewrite-loader.js +476 -217
  104. package/dist/weapp-tw-runtime-classset-loader.js +25 -0
  105. package/dist/{webpack-DPdrcC2X.mjs → webpack-BcPpnT90.mjs} +251 -40
  106. package/dist/{webpack-CJAOcYEO.js → webpack-CfkUkMXG.js} +254 -43
  107. package/dist/webpack.js +1 -1
  108. package/dist/webpack.mjs +1 -1
  109. package/package.json +10 -5
@@ -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>>;
@@ -4,6 +4,7 @@ import type { RememberedCssSource } from './types';
4
4
  export declare function extractSfcStyleSources(source: string): string[];
5
5
  export declare function hasSfcStyleSources(source: string): boolean;
6
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>;
7
+ 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
8
  export declare function normalizeSfcSourceFileForCompare(file: string): string;
9
9
  export declare function collectChunkModuleIds(output: OutputChunk): string[];
10
+ 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,29 @@
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
+ getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
6
+ getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
7
+ projectRoot?: string | undefined;
8
+ rootDir: string;
9
+ snapshot: BundleSnapshot;
10
+ sourceRoot?: string | undefined;
11
+ subpackageRoots?: Set<string> | undefined;
12
+ tailwindcssBasedir?: string | undefined;
13
+ useIncrementalMode: boolean;
14
+ }
15
+ export declare function createSubpackageSourceCandidateScope(options: CreateSubpackageSourceCandidateScopeOptions): {
16
+ createScopedSourceCandidateGetter: (outputFile: string, cssHandlerOptions: {
17
+ isMainChunk?: boolean | undefined;
18
+ }) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Set<string>) | undefined;
19
+ createScopedSourceCandidateSourceGetter: (outputFile: string, cssHandlerOptions: {
20
+ isMainChunk?: boolean | undefined;
21
+ }) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
22
+ shouldExcludeSubpackageSourceCandidates: (outputFile: string, cssHandlerOptions: {
23
+ isMainChunk?: boolean | undefined;
24
+ }) => boolean;
25
+ shouldInjectCssIntoMainFromOutput: (outputFile: string, _sourceFile: string, outputCssHandlerOptions: {
26
+ isMainChunk?: boolean | undefined;
27
+ }) => boolean;
28
+ };
29
+ export {};
@@ -0,0 +1 @@
1
+ export declare function createBundleTaskTimer(recordTimingDetail: (name: string, startedAt: number) => void): (name: string, task: () => Promise<void>) => Promise<void>;
@@ -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>;
@@ -48,6 +50,11 @@ export interface GenerateBundleContext {
48
50
  setRememberedCssSignature?: (file: string, cssRuntimeSignature: string) => void;
49
51
  getKnownSfcSource?: (file: string) => string | undefined;
50
52
  recordGeneratorCandidates?: (candidates: Set<string>) => void;
53
+ pruneViteCssCaches?: (options: {
54
+ activeFiles: Set<string>;
55
+ activeKnownSfcFiles?: Set<string> | undefined;
56
+ }) => void;
57
+ getViteCssCacheStats?: () => Record<string, unknown>;
51
58
  hmrTimingRecorder?: HmrTimingRecorder;
52
59
  }
53
60
  export interface RememberedCssSource {
@@ -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): 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,7 @@
1
1
  import type { OutputAsset, OutputChunk } from 'rollup';
2
2
  import type { GenerateBundleContext, GenerateBundleThis } from './generate-bundle/types';
3
- export { resolveReplayCssOutputFile, resolveViteCssPipelineOutputFile } from './generate-bundle/css-output';
3
+ export { normalizeBundleFileNameKeysForTest } from './generate-bundle/bundle-file-names';
4
+ export { resolveMiniProgramStyleOutputExtension, resolveReplayCssOutputFile, resolveReplayCssOutputFileFromSourceRoot, resolveViteCssPipelineOutputFile } 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';
6
7
  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;
@@ -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';
@@ -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;
@@ -11,11 +11,14 @@ 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
  }
21
24
  export interface SourceCandidateCollectorSnapshot {
@@ -42,3 +45,9 @@ export interface SourceCandidateCollectorOptions {
42
45
  }
43
46
  export declare function isSourceCandidateRequest(id: string): boolean;
44
47
  export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
48
+ export declare function getSourceCandidateContentCacheStatsForTest(): {
49
+ max: number;
50
+ size: number;
51
+ keys: string[];
52
+ };
53
+ export declare function clearSourceCandidateContentCacheForTest(): void;
@@ -16,5 +16,6 @@ export declare function resolveTailwindV3CssEntryScan(options: UserDefinedOption
16
16
  dependencies: Set<string>;
17
17
  }>;
18
18
  export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
19
+ export declare function resolveTailwindConfigEntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
19
20
  export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
20
21
  export declare function collectConfiguredCssSources(options: UserDefinedOptions): TailwindV4CssSource[];
@@ -1,6 +1,6 @@
1
1
  import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
2
2
  import type { TailwindcssPatcherLike, UserDefinedOptions } from '../../types';
3
- export { discoverTailwindV4CssEntries, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, resolveViteTailwindV4CssDependencies, } from './source-scan/css-entries';
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;
@@ -0,0 +1,3 @@
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;
@@ -15,9 +15,18 @@ export interface SetupWebpackV5ProcessAssetsHookOptions {
15
15
  consumeRuntimeRefreshRequirement: () => void;
16
16
  isWatchMode?: (() => boolean) | undefined;
17
17
  runtimeClassSetManager?: BundleRuntimeClassSetManager | undefined;
18
+ getWebpackCssSources?: (() => Iterable<[string, string | undefined]>) | undefined;
18
19
  debug: (format: string, ...args: unknown[]) => void;
19
20
  }
20
21
  export type WebpackSourceLike = string | WebpackSources.Source;
22
+ interface WebpackAssetCompilationLike {
23
+ getAsset: (file: string) => {
24
+ source: {
25
+ source: () => unknown;
26
+ };
27
+ } | undefined;
28
+ updateAsset: Compiler['webpack']['Compilation']['prototype']['updateAsset'];
29
+ }
21
30
  export declare function createWebpackSnapshotAssets(assets: Record<string, {
22
31
  source: () => unknown;
23
32
  }>): {
@@ -29,14 +38,7 @@ export declare function createWebpackSnapshotAssets(assets: Record<string, {
29
38
  };
30
39
  export declare function stringifyWebpackSource(source: unknown): string;
31
40
  export declare function createWebpackAssetUpdater(options: {
32
- compilation: {
33
- getAsset: (file: string) => {
34
- source: {
35
- source: () => unknown;
36
- };
37
- } | undefined;
38
- updateAsset: (file: string, source: WebpackSourceLike) => void;
39
- };
41
+ compilation: WebpackAssetCompilationLike;
40
42
  ConcatSource: new (source: string) => WebpackSources.Source;
41
43
  onUpdate: (file: string, previousSource: string, nextSource: string) => void;
42
44
  debug: (format: string, ...args: unknown[]) => void;
@@ -46,3 +48,4 @@ export declare function createWebpackAssetUpdater(options: {
46
48
  notifyUpdate?: boolean;
47
49
  }) => boolean;
48
50
  };
51
+ export {};
@@ -1,5 +1,6 @@
1
1
  import type { TailwindV4CssSource } from 'tailwindcss-patch';
2
2
  import type { Compiler } from 'webpack';
3
+ import type { WebpackCssSourceRegistration } from '../loaders/runtime-registry';
3
4
  import type { TailwindRuntimeState } from '../../../tailwindcss/runtime';
4
5
  import type { AppType, InternalUserDefinedOptions } from '../../../types';
5
6
  interface SetupWebpackV5LoadersOptions {
@@ -14,6 +15,7 @@ interface SetupWebpackV5LoadersOptions {
14
15
  getClassSetInLoader: () => Promise<void>;
15
16
  getRuntimeSetInLoader: () => Promise<Set<string>>;
16
17
  markWebpackProcessedCssSource?: ((file: string) => void) | undefined;
18
+ registerWebpackCssSourceFile?: ((source: WebpackCssSourceRegistration) => void) | undefined;
17
19
  getRuntimeWatchDependencies: () => {
18
20
  files: ReadonlySet<string>;
19
21
  contexts: ReadonlySet<string>;
@@ -4,11 +4,16 @@ import type { AppType, InternalUserDefinedOptions } from '../../../types';
4
4
  export interface WebpackRuntimeClassSetLoaderOptions {
5
5
  getClassSet?: () => void | Promise<void>;
6
6
  getWatchDependencies?: () => RuntimeLoaderWatchDependencies | Promise<RuntimeLoaderWatchDependencies | void> | void;
7
+ registerCssSourceFile?: (source: WebpackCssSourceRegistration) => void;
7
8
  }
8
9
  export interface RuntimeLoaderWatchDependencies {
9
10
  files?: Iterable<string>;
10
11
  contexts?: Iterable<string>;
11
12
  }
13
+ export interface WebpackCssSourceRegistration {
14
+ css?: string | undefined;
15
+ file: string;
16
+ }
12
17
  export interface WebpackCssImportRewriteRuntimeOptions {
13
18
  pkgDir: string;
14
19
  appType?: AppType;
@@ -31,6 +31,10 @@ export interface ICreateCacheReturnType {
31
31
  set: <V extends CacheValue = sources.Source>(key: string, value: V) => LRUCache<string, CacheValue>;
32
32
  has: (key: string) => boolean;
33
33
  calcHashValueChanged: (key: HashMapKey, hash: string) => ICreateCacheReturnType;
34
+ prune?: (options: {
35
+ cacheKeys?: Iterable<string> | undefined;
36
+ hashKeys?: Iterable<HashMapKey> | undefined;
37
+ }) => void;
34
38
  process: <T extends CacheValue>(options: CacheProcessOptions<T>) => Promise<T>;
35
39
  }
36
40
  declare function createCache(options?: boolean): ICreateCacheReturnType;
package/dist/cli.js CHANGED
@@ -34,10 +34,10 @@ let lru_cache = require("lru-cache");
34
34
  let _weapp_tailwindcss_shared_node = require("@weapp-tailwindcss/shared/node");
35
35
  let _weapp_core_escape = require("@weapp-core/escape");
36
36
  require("@weapp-tailwindcss/shared");
37
- let debug = require("debug");
38
- debug = __toESM(debug);
39
37
  let node_fs = require("node:fs");
40
38
  node_fs = __toESM(node_fs);
39
+ let debug = require("debug");
40
+ debug = __toESM(debug);
41
41
  let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
42
42
  require("micromatch");
43
43
  let node_module = require("node:module");
@@ -507,6 +507,12 @@ new RegExp(`\\.(?:${FULL_SOURCE_SCAN_EXTENSIONS.map((extension) => extension.rep
507
507
  isMainChunk: true,
508
508
  majorVersion: 4
509
509
  });
510
+ //#endregion
511
+ //#region src/tailwindcss/v4-engine/generator.ts
512
+ const INCREMENTAL_GENERATE_CACHE_MAX$1 = 8;
513
+ const INCREMENTAL_GENERATE_TASK_CACHE_MAX = 32;
514
+ new lru_cache.LRUCache({ max: INCREMENTAL_GENERATE_CACHE_MAX$1 });
515
+ new lru_cache.LRUCache({ max: INCREMENTAL_GENERATE_TASK_CACHE_MAX });
510
516
  (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
511
517
  (0, _weapp_tailwindcss_postcss.createStyleHandler)({
512
518
  cssChildCombinatorReplaceValue: ["view", "text"],
@@ -514,6 +520,7 @@ new RegExp(`\\.(?:${FULL_SOURCE_SCAN_EXTENSIONS.map((extension) => extension.rep
514
520
  isMainChunk: true,
515
521
  majorVersion: 3
516
522
  });
523
+ new lru_cache.LRUCache({ max: 8 });
517
524
  typeof tailwindcss_patch.generateTailwindV3RawStyle === "function" && tailwindcss_patch.generateTailwindV3RawStyle;
518
525
  [
519
526
  "@tailwind base;",
package/dist/cli.mjs CHANGED
@@ -10,8 +10,8 @@ import { LRUCache } from "lru-cache";
10
10
  import { md5 as md5Hash } from "@weapp-tailwindcss/shared/node";
11
11
  import { MappingChars2String, escape } from "@weapp-core/escape";
12
12
  import "@weapp-tailwindcss/shared";
13
- import _createDebug from "debug";
14
13
  import { constants, existsSync, readFileSync } from "node:fs";
14
+ import _createDebug from "debug";
15
15
  import { createStyleHandler } from "@weapp-tailwindcss/postcss";
16
16
  import "micromatch";
17
17
  import "tailwindcss-config";
@@ -478,6 +478,12 @@ createStyleHandler({
478
478
  isMainChunk: true,
479
479
  majorVersion: 4
480
480
  });
481
+ //#endregion
482
+ //#region src/tailwindcss/v4-engine/generator.ts
483
+ const INCREMENTAL_GENERATE_CACHE_MAX$1 = 8;
484
+ const INCREMENTAL_GENERATE_TASK_CACHE_MAX = 32;
485
+ new LRUCache({ max: INCREMENTAL_GENERATE_CACHE_MAX$1 });
486
+ new LRUCache({ max: INCREMENTAL_GENERATE_TASK_CACHE_MAX });
481
487
  createRequire(import.meta.url);
482
488
  createStyleHandler({
483
489
  cssChildCombinatorReplaceValue: ["view", "text"],
@@ -485,6 +491,7 @@ createStyleHandler({
485
491
  isMainChunk: true,
486
492
  majorVersion: 3
487
493
  });
494
+ new LRUCache({ max: 8 });
488
495
  typeof tailwindcssPatch.generateTailwindV3RawStyle === "function" && tailwindcssPatch.generateTailwindV3RawStyle;
489
496
  [
490
497
  "@tailwind base;",
package/dist/core.d.ts CHANGED
@@ -2,7 +2,14 @@ import type { CreateJsHandlerOptions, IStyleHandlerOptions, ITemplateHandlerOpti
2
2
  type RuntimeJsTransformOptions = {
3
3
  runtimeSet?: Set<string>;
4
4
  } & CreateJsHandlerOptions;
5
+ export interface GetRuntimeSetOptions {
6
+ forceRefresh?: boolean | undefined;
7
+ forceCollect?: boolean | undefined;
8
+ clearCache?: boolean | undefined;
9
+ allowEmpty?: boolean | undefined;
10
+ }
5
11
  export declare function createContext(options?: UserDefinedOptions): {
12
+ getRuntimeSet: (options?: GetRuntimeSetOptions) => Promise<Set<string>>;
6
13
  transformWxss: (rawCss: string, options?: Partial<IStyleHandlerOptions>) => Promise<import("postcss").Result<import("postcss").Document | import("postcss").Root>>;
7
14
  transformWxml: (rawWxml: string, options?: ITemplateHandlerOptions) => Promise<string>;
8
15
  transformJs: (rawJs: string, options?: RuntimeJsTransformOptions) => Promise<import("./types").JsHandlerResult>;
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_precheck = require("./precheck-CY9oaH49.js");
2
+ const require_precheck = require("./precheck-B0Z8yW7E.js");
3
3
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
4
4
  //#region src/core.ts
5
5
  const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
@@ -106,12 +106,14 @@ function createContext(options = {}) {
106
106
  async function transformWxss(rawCss, options) {
107
107
  await runtimeState.readyPromise;
108
108
  const result = await styleHandler(rawCss, resolveTransformWxssOptions(options));
109
- runtimeSet = await require_precheck.ensureRuntimeClassSet(runtimeState, {
110
- forceRefresh: true,
111
- forceCollect: true
112
- });
109
+ runtimeSet = await require_precheck.ensureRuntimeClassSet(runtimeState);
113
110
  return result;
114
111
  }
112
+ async function getRuntimeSet(options) {
113
+ await runtimeState.readyPromise;
114
+ runtimeSet = await require_precheck.ensureRuntimeClassSet(runtimeState, options);
115
+ return runtimeSet;
116
+ }
115
117
  async function transformJs(rawJs, options) {
116
118
  await runtimeState.readyPromise;
117
119
  if (options?.runtimeSet) runtimeSet = options.runtimeSet;
@@ -126,6 +128,7 @@ function createContext(options = {}) {
126
128
  return templateHandler(rawWxml, resolveTransformWxmlOptions(options));
127
129
  }
128
130
  return {
131
+ getRuntimeSet,
129
132
  transformWxss,
130
133
  transformWxml,
131
134
  transformJs
package/dist/core.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-BpHxsWRd.mjs";
1
+ import { n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-CRI90iL1.mjs";
2
2
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
3
3
  //#region src/core.ts
4
4
  const DEFAULT_MAIN_CHUNK_STYLE_OPTIONS = Object.freeze({ isMainChunk: true });
@@ -105,12 +105,14 @@ function createContext(options = {}) {
105
105
  async function transformWxss(rawCss, options) {
106
106
  await runtimeState.readyPromise;
107
107
  const result = await styleHandler(rawCss, resolveTransformWxssOptions(options));
108
- runtimeSet = await ensureRuntimeClassSet(runtimeState, {
109
- forceRefresh: true,
110
- forceCollect: true
111
- });
108
+ runtimeSet = await ensureRuntimeClassSet(runtimeState);
112
109
  return result;
113
110
  }
111
+ async function getRuntimeSet(options) {
112
+ await runtimeState.readyPromise;
113
+ runtimeSet = await ensureRuntimeClassSet(runtimeState, options);
114
+ return runtimeSet;
115
+ }
114
116
  async function transformJs(rawJs, options) {
115
117
  await runtimeState.readyPromise;
116
118
  if (options?.runtimeSet) runtimeSet = options.runtimeSet;
@@ -125,6 +127,7 @@ function createContext(options = {}) {
125
127
  return templateHandler(rawWxml, resolveTransformWxmlOptions(options));
126
128
  }
127
129
  return {
130
+ getRuntimeSet,
128
131
  transformWxss,
129
132
  transformWxml,
130
133
  transformJs
package/dist/css-macro.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
2
  const require_auto = require("./auto-CTp6wE5a.js");
3
- require("./utils-Dolmt8EO.js");
3
+ require("./utils-BCa37Wqj.js");
4
4
  let tailwindcss_plugin = require("tailwindcss/plugin");
5
5
  tailwindcss_plugin = require_chunk.__toESM(tailwindcss_plugin);
6
6
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
@@ -1,5 +1,5 @@
1
1
  import { i as markCssMacroPlugin } from "./auto-Cl8_hsG6.mjs";
2
- import { t as defu } from "./utils-DsaS975I.mjs";
2
+ import { t as defu } from "./utils-DodxWHGz.mjs";
3
3
  import plugin from "tailwindcss/plugin";
4
4
  //#region src/css-macro/constants.ts
5
5
  const queryKey = "weapp-tw-platform";
@@ -1,4 +1,4 @@
1
- import { a as noop } from "./utils-DsaS975I.mjs";
1
+ import { a as noop } from "./utils-DodxWHGz.mjs";
2
2
  import { MappingChars2String, isAllowedClassName } from "@weapp-core/escape";
3
3
  //#region src/js/babel/cache-options.ts
4
4
  const DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH = 5e4;
@@ -8,29 +8,6 @@ const HARD_PARSE_CACHE_MAX_ENTRIES = 1024;
8
8
  const CSS_FILE_PATTERN = /.+\.(?:wx|ac|jx|tt|q|c|ty)ss$/;
9
9
  const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
10
10
  const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
11
- const BACKSLASH_RE = /\\/g;
12
- function normalizePath(p) {
13
- return p.replace(BACKSLASH_RE, "/");
14
- }
15
- const MPX_STYLES_DIR_PATTERN = /(?:^|\/)styles\/.*\.(?:wx|ac|jx|tt|q|c|ty)ss$/i;
16
- const KBONE_MAIN_CSS_RE = /^(?:common\/)?miniprogram-app/;
17
- const IMPLICIT_MAIN_CSS_RE = /^(?:app|common\/main|bundle)(?:\.|\/|$)/;
18
- const MAIN_CSS_CHUNK_MATCHERS = {
19
- "uni-app": (file) => file.startsWith("common/main") || file.startsWith("app"),
20
- "uni-app-vite": (file) => file.startsWith("app") || file.startsWith("common/main"),
21
- "uni-app-x": (file) => file.startsWith("app") || file.startsWith("common/main"),
22
- "mpx": (file) => {
23
- const normalized = normalizePath(file);
24
- if (normalized.startsWith("app")) return true;
25
- return MPX_STYLES_DIR_PATTERN.test(normalized);
26
- },
27
- "taro": (file) => file.startsWith("app"),
28
- "remax": (file) => file.startsWith("app"),
29
- "rax": (file) => file.startsWith("bundle"),
30
- "native": (file) => file.startsWith("app"),
31
- "weapp-vite": (file) => file.startsWith("app"),
32
- "kbone": (file) => KBONE_MAIN_CSS_RE.test(file)
33
- };
34
11
  const alwaysFalse = () => false;
35
12
  const TAILWIND_V3_CSS_PREFLIGHT = {
36
13
  "box-sizing": "border-box",
@@ -54,16 +31,6 @@ function resolveDefaultCssPreflight(cssPreflight, tailwindcssMajorVersion) {
54
31
  ...cssPreflight ?? {}
55
32
  };
56
33
  }
57
- function createMainCssChunkMatcher() {
58
- return (file, appType) => {
59
- if (!appType) {
60
- const normalized = normalizePath(file);
61
- return IMPLICIT_MAIN_CSS_RE.test(normalized) || MPX_STYLES_DIR_PATTERN.test(normalized) || KBONE_MAIN_CSS_RE.test(normalized);
62
- }
63
- const matcher = MAIN_CSS_CHUNK_MATCHERS[appType];
64
- return matcher ? matcher(file) : true;
65
- };
66
- }
67
34
  function getDefaultOptions() {
68
35
  return {
69
36
  /**
@@ -92,7 +59,7 @@ function getDefaultOptions() {
92
59
  if (file.includes("node_modules")) return false;
93
60
  return JS_FILE_PATTERN.test(file);
94
61
  },
95
- mainCssChunkMatcher: createMainCssChunkMatcher(),
62
+ mainCssChunkMatcher: alwaysFalse,
96
63
  wxsMatcher: alwaysFalse,
97
64
  cssPreflight: getDefaultCssPreflight(3),
98
65
  disabled: false,
@@ -1,4 +1,4 @@
1
- require("./utils-Dolmt8EO.js");
1
+ require("./utils-BCa37Wqj.js");
2
2
  let _weapp_core_escape = require("@weapp-core/escape");
3
3
  let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
4
4
  //#region src/js/babel/cache-options.ts
@@ -9,29 +9,6 @@ const HARD_PARSE_CACHE_MAX_ENTRIES = 1024;
9
9
  const CSS_FILE_PATTERN = /.+\.(?:wx|ac|jx|tt|q|c|ty)ss$/;
10
10
  const HTML_FILE_PATTERN = /.+\.(?:(?:wx|ax|jx|ks|tt|q|ty|xhs)ml|swan)$/;
11
11
  const JS_FILE_PATTERN = /.+\.[cm]?js?$/;
12
- const BACKSLASH_RE = /\\/g;
13
- function normalizePath(p) {
14
- return p.replace(BACKSLASH_RE, "/");
15
- }
16
- const MPX_STYLES_DIR_PATTERN = /(?:^|\/)styles\/.*\.(?:wx|ac|jx|tt|q|c|ty)ss$/i;
17
- const KBONE_MAIN_CSS_RE = /^(?:common\/)?miniprogram-app/;
18
- const IMPLICIT_MAIN_CSS_RE = /^(?:app|common\/main|bundle)(?:\.|\/|$)/;
19
- const MAIN_CSS_CHUNK_MATCHERS = {
20
- "uni-app": (file) => file.startsWith("common/main") || file.startsWith("app"),
21
- "uni-app-vite": (file) => file.startsWith("app") || file.startsWith("common/main"),
22
- "uni-app-x": (file) => file.startsWith("app") || file.startsWith("common/main"),
23
- "mpx": (file) => {
24
- const normalized = normalizePath(file);
25
- if (normalized.startsWith("app")) return true;
26
- return MPX_STYLES_DIR_PATTERN.test(normalized);
27
- },
28
- "taro": (file) => file.startsWith("app"),
29
- "remax": (file) => file.startsWith("app"),
30
- "rax": (file) => file.startsWith("bundle"),
31
- "native": (file) => file.startsWith("app"),
32
- "weapp-vite": (file) => file.startsWith("app"),
33
- "kbone": (file) => KBONE_MAIN_CSS_RE.test(file)
34
- };
35
12
  const alwaysFalse = () => false;
36
13
  const TAILWIND_V3_CSS_PREFLIGHT = {
37
14
  "box-sizing": "border-box",
@@ -55,16 +32,6 @@ function resolveDefaultCssPreflight(cssPreflight, tailwindcssMajorVersion) {
55
32
  ...cssPreflight ?? {}
56
33
  };
57
34
  }
58
- function createMainCssChunkMatcher() {
59
- return (file, appType) => {
60
- if (!appType) {
61
- const normalized = normalizePath(file);
62
- return IMPLICIT_MAIN_CSS_RE.test(normalized) || MPX_STYLES_DIR_PATTERN.test(normalized) || KBONE_MAIN_CSS_RE.test(normalized);
63
- }
64
- const matcher = MAIN_CSS_CHUNK_MATCHERS[appType];
65
- return matcher ? matcher(file) : true;
66
- };
67
- }
68
35
  function getDefaultOptions() {
69
36
  return {
70
37
  /**
@@ -93,7 +60,7 @@ function getDefaultOptions() {
93
60
  if (file.includes("node_modules")) return false;
94
61
  return JS_FILE_PATTERN.test(file);
95
62
  },
96
- mainCssChunkMatcher: createMainCssChunkMatcher(),
63
+ mainCssChunkMatcher: alwaysFalse,
97
64
  wxsMatcher: alwaysFalse,
98
65
  cssPreflight: getDefaultCssPreflight(3),
99
66
  disabled: false,
package/dist/defaults.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_defaults = require("./defaults-Boc26eel.js");
2
+ const require_defaults = require("./defaults-C_J_kBpw.js");
3
3
  exports.TAILWIND_V3_CSS_PREFLIGHT = require_defaults.TAILWIND_V3_CSS_PREFLIGHT;
4
4
  exports.TAILWIND_V4_CSS_PREFLIGHT = require_defaults.TAILWIND_V4_CSS_PREFLIGHT;
5
5
  exports.getDefaultCssPreflight = require_defaults.getDefaultCssPreflight;
package/dist/defaults.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as resolveDefaultCssPreflight, i as getDefaultOptions, n as TAILWIND_V4_CSS_PREFLIGHT, r as getDefaultCssPreflight, t as TAILWIND_V3_CSS_PREFLIGHT } from "./defaults-DH0ZQRhy.mjs";
1
+ import { a as resolveDefaultCssPreflight, i as getDefaultOptions, n as TAILWIND_V4_CSS_PREFLIGHT, r as getDefaultCssPreflight, t as TAILWIND_V3_CSS_PREFLIGHT } from "./defaults-Bqx18S1f.mjs";
2
2
  export { TAILWIND_V3_CSS_PREFLIGHT, TAILWIND_V4_CSS_PREFLIGHT, getDefaultCssPreflight, getDefaultOptions, resolveDefaultCssPreflight };