weapp-tailwindcss 5.1.15 → 5.1.16
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.
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/cache-state.d.ts +71 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +43 -0
- package/dist/bundlers/gulp/shared/create-native-framework-plugins.d.ts +2 -2
- package/dist/bundlers/shared/framework-postcss.d.ts +14 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/preflight.d.ts +18 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +25 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/runtime-isolation.d.ts +30 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/source-order.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +4 -72
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +3 -1
- package/dist/bundlers/shared/generator-css/pipeline/deferred-output.d.ts +14 -0
- package/dist/bundlers/shared/generator-css/pipeline/execution.d.ts +12 -0
- package/dist/bundlers/shared/generator-css/pipeline/fallback-output.d.ts +12 -0
- package/dist/bundlers/shared/generator-css/pipeline/ordered-output.d.ts +25 -0
- package/dist/bundlers/shared/generator-css/pipeline.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/result-helpers.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/scoped-rules.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/source-resolver/configuration.d.ts +33 -0
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-source.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/source-resolver/resolve-sources.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/source-resolver/single-source.d.ts +16 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-entries.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/source-matching.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +3 -6
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/at-rules.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +9 -0
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +10 -0
- package/dist/bundlers/shared/generator-css/user-css/user-layers.d.ts +15 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -33
- package/dist/bundlers/shared/generator-css.d.ts +1 -2
- package/dist/bundlers/shared/v4-generation-core.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer/options.d.ts +54 -0
- package/dist/bundlers/vite/css-finalizer/plugin.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -43
- package/dist/bundlers/vite/generate-bundle/finalize/bundle.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/finalize/root-import-shell.d.ts +69 -0
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +2 -70
- package/dist/bundlers/vite/generate-bundle-runtime.d.ts +6 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/cleanup.d.ts +12 -0
- package/dist/bundlers/vite/processed-css-assets/collector.d.ts +4 -0
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +34 -0
- package/dist/bundlers/vite/processed-css-assets/injection-plan.d.ts +42 -0
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +89 -0
- package/dist/bundlers/vite/processed-css-assets/style-files.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +4 -71
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
- package/dist/bundlers/vite/serve-css-generation.d.ts +1 -0
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +2 -0
- package/dist/bundlers/vite/shared/create-framework-plugins.d.ts +4 -4
- package/dist/bundlers/vite/source-candidates/collector.d.ts +8 -0
- package/dist/bundlers/vite/source-candidates/store.d.ts +2 -0
- package/dist/bundlers/vite/source-candidates/types-and-cache.d.ts +69 -0
- package/dist/bundlers/vite/source-candidates.d.ts +4 -68
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/finalize-assets.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-result.d.ts +3 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/generated-css-task.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/html-js-tasks.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/finalize.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/generated-css.d.ts +8 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/memory-trace.d.ts +78 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts +43 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/resources.d.ts +30 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/runtime-candidates.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/sources.d.ts +28 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css.d.ts +21 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +9 -219
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +4 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +4 -0
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +5 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +20 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin/watch-output.d.ts +13 -0
- package/dist/bundlers/webpack/shared/create-framework-plugin.d.ts +3 -21
- package/dist/cli.js +14 -18
- package/dist/cli.mjs +14 -18
- package/dist/{context-VeFq_8vW.js → context-BtLIID4m.js} +3 -3
- package/dist/{context-BgGWVAmN.mjs → context-JzwzSX36.mjs} +3 -3
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{generator-CEnUsjed.js → generator-B91GhUJQ.js} +636 -505
- package/dist/{generator-CEo920So.mjs → generator-Bv7myuhY.mjs} +556 -431
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/{gulp-DP71z1jG.mjs → gulp-CKSklPlH.mjs} +217 -186
- package/dist/{gulp-3m1dAiig.js → gulp-Q1wITegn.js} +217 -186
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-1aS6--U7.mjs → hmr-timing-BXg7nI8N.mjs} +3411 -3276
- package/dist/{hmr-timing-B8p4f0ca.js → hmr-timing-CMPaWn9P.js} +3425 -3278
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/presets.js +1 -1
- package/dist/presets.mjs +1 -1
- package/dist/rspack.js +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/shared/mpx-plugin-owner.d.ts +2 -0
- package/dist/{source-candidate-scan-signature-BAahhiwb.js → source-candidate-scan-signature-BKZZk_e6.js} +144 -4
- package/dist/{source-candidate-scan-signature-Cf7259PR.mjs → source-candidate-scan-signature-CtK-mB_C.mjs} +127 -4
- package/dist/tailwindcss/v4-engine/generator/cache-stats.d.ts +26 -0
- package/dist/tailwindcss/v4-engine/generator/engine.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +52 -0
- package/dist/tailwindcss/v4-engine/generator.d.ts +2 -28
- package/dist/{tailwindcss-KBYPJ2DW.js → tailwindcss-B4phC0kB.js} +2 -2
- package/dist/{tailwindcss-xs704TRw.mjs → tailwindcss-BTcXX8Ka.mjs} +2 -2
- package/dist/{vite-nXZEiwG0.mjs → vite-BwQWl9ft.mjs} +806 -692
- package/dist/{vite-DUVjMduj.js → vite-DhVnXvAQ.js} +805 -691
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-generation-loader.js +1 -1
- package/dist/{weapp-tw-css-import-rewrite-loader-DNk0IxAt.js → weapp-tw-css-import-rewrite-loader-B0tVkJLH.js} +2410 -2084
- package/dist/weapp-tw-css-import-rewrite-loader.js +1 -1
- package/dist/weapp-tw-runtime-classset-loader.js +10 -4
- package/dist/{webpack-C_UUFRgj.mjs → webpack-Bo1QrFPf.mjs} +1387 -1114
- package/dist/{webpack-nppysF4B.js → webpack-kh78iMSS.js} +1386 -1113
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +9 -7
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
2
|
+
import type { ICustomAttributesEntities } from '../../../types';
|
|
3
|
+
import type { IArbitraryValues } from '../../../types/shared';
|
|
4
|
+
import { LRUCache } from 'lru-cache';
|
|
5
|
+
export interface SourceCandidateStore {
|
|
6
|
+
syncSource: (id: string, source: string) => Promise<void>;
|
|
7
|
+
sync: (id: string, source: string) => Promise<void>;
|
|
8
|
+
syncCss: (id: string, source: string) => Promise<void>;
|
|
9
|
+
merge: (id: string, source: string) => Promise<void>;
|
|
10
|
+
syncFile: (id: string) => Promise<void>;
|
|
11
|
+
syncCurrentSource: (id: string, source: string) => Promise<SourceCandidateChange>;
|
|
12
|
+
syncCurrentFile: (id: string) => Promise<SourceCandidateChange>;
|
|
13
|
+
scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
|
|
14
|
+
syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
|
|
15
|
+
remove: (id: string) => SourceCandidateChange;
|
|
16
|
+
source: (id: string) => string | undefined;
|
|
17
|
+
sources: () => IterableIterator<[string, string]>;
|
|
18
|
+
values: () => Set<string>;
|
|
19
|
+
valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
|
|
20
|
+
sourcesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>;
|
|
21
|
+
snapshot: () => SourceCandidateCollectorSnapshot;
|
|
22
|
+
restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
|
|
23
|
+
clearScan: () => void;
|
|
24
|
+
resetScan: () => void;
|
|
25
|
+
clear: () => void;
|
|
26
|
+
}
|
|
27
|
+
export interface SourceCandidateCollector extends SourceCandidateStore {
|
|
28
|
+
}
|
|
29
|
+
export interface SourceCandidateChange {
|
|
30
|
+
addedCandidates: Set<string>;
|
|
31
|
+
removedCandidates: Set<string>;
|
|
32
|
+
}
|
|
33
|
+
export interface SourceCandidateCollectorSnapshot {
|
|
34
|
+
candidatesById: Array<[string, string[]]>;
|
|
35
|
+
cssCandidatesById?: Array<[string, string[]]> | undefined;
|
|
36
|
+
cssSourceById?: Array<[string, string]> | undefined;
|
|
37
|
+
scanCandidatesById?: Array<[string, string[]]> | undefined;
|
|
38
|
+
scanSourceById?: Array<[string, string]> | undefined;
|
|
39
|
+
sourceById?: Array<[string, string]> | undefined;
|
|
40
|
+
transformCandidatesById?: Array<[string, string[]]> | undefined;
|
|
41
|
+
transformSourceById?: Array<[string, string]> | undefined;
|
|
42
|
+
inlineExcludedCandidates: string[];
|
|
43
|
+
inlineIncludedCandidates: string[];
|
|
44
|
+
}
|
|
45
|
+
export interface SourceCandidateFilterOptions {
|
|
46
|
+
excludeEntries?: TailwindSourceEntry[] | undefined;
|
|
47
|
+
}
|
|
48
|
+
export interface ScanSourceCandidateRootOptions {
|
|
49
|
+
root: string;
|
|
50
|
+
outDir?: string | undefined;
|
|
51
|
+
entries?: TailwindSourceEntry[] | undefined;
|
|
52
|
+
explicit?: boolean | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface SourceCandidateCollectorOptions {
|
|
55
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
56
|
+
customAttributesEntities?: ICustomAttributesEntities | undefined;
|
|
57
|
+
disabledDefaultTemplateHandler?: boolean | undefined;
|
|
58
|
+
extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
|
|
59
|
+
}
|
|
60
|
+
export declare const SOURCE_CANDIDATE_CONTENT_CACHE_MAX = 128;
|
|
61
|
+
export declare const sourceCandidateContentCache: LRUCache<string, string[], unknown>;
|
|
62
|
+
export declare function cleanUrl(id: string): string;
|
|
63
|
+
export declare function resolveSourceCandidateExtension(id: string): string;
|
|
64
|
+
export declare function createSourceCandidateContentCacheKey(extension: string, source: string, bareArbitraryValues: IArbitraryValues['bareArbitraryValues'] | undefined, customAttributesEntities: ICustomAttributesEntities | undefined, disabledDefaultTemplateHandler: boolean | undefined, extractor: SourceCandidateCollectorOptions['extractor']): string;
|
|
65
|
+
export declare function extractCandidates(source: string, extension: string, options: SourceCandidateCollectorOptions): Promise<Set<string>>;
|
|
66
|
+
export declare function isSourceCandidateRequest(id: string): boolean;
|
|
67
|
+
export declare function removeCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
|
|
68
|
+
export declare function addCandidateSet(candidateCount: Map<string, number>, candidates: Set<string>): void;
|
|
69
|
+
export declare function diffCandidateSets(previous: Set<string>, next: Set<string>): SourceCandidateChange;
|
|
@@ -1,68 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
syncSource: (id: string, source: string) => Promise<void>;
|
|
6
|
-
sync: (id: string, source: string) => Promise<void>;
|
|
7
|
-
syncCss: (id: string, source: string) => Promise<void>;
|
|
8
|
-
merge: (id: string, source: string) => Promise<void>;
|
|
9
|
-
syncFile: (id: string) => Promise<void>;
|
|
10
|
-
syncCurrentSource: (id: string, source: string) => Promise<SourceCandidateChange>;
|
|
11
|
-
syncCurrentFile: (id: string) => Promise<SourceCandidateChange>;
|
|
12
|
-
scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
|
|
13
|
-
syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
|
|
14
|
-
remove: (id: string) => SourceCandidateChange;
|
|
15
|
-
source: (id: string) => string | undefined;
|
|
16
|
-
sources: () => IterableIterator<[string, string]>;
|
|
17
|
-
values: () => Set<string>;
|
|
18
|
-
valuesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>;
|
|
19
|
-
sourcesForEntries: (entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>;
|
|
20
|
-
snapshot: () => SourceCandidateCollectorSnapshot;
|
|
21
|
-
restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
|
|
22
|
-
clearScan: () => void;
|
|
23
|
-
resetScan: () => void;
|
|
24
|
-
clear: () => void;
|
|
25
|
-
}
|
|
26
|
-
export interface SourceCandidateCollector extends SourceCandidateStore {
|
|
27
|
-
}
|
|
28
|
-
export interface SourceCandidateChange {
|
|
29
|
-
addedCandidates: Set<string>;
|
|
30
|
-
removedCandidates: Set<string>;
|
|
31
|
-
}
|
|
32
|
-
export interface SourceCandidateCollectorSnapshot {
|
|
33
|
-
candidatesById: Array<[string, string[]]>;
|
|
34
|
-
cssCandidatesById?: Array<[string, string[]]> | undefined;
|
|
35
|
-
cssSourceById?: Array<[string, string]> | undefined;
|
|
36
|
-
scanCandidatesById?: Array<[string, string[]]> | undefined;
|
|
37
|
-
scanSourceById?: Array<[string, string]> | undefined;
|
|
38
|
-
sourceById?: Array<[string, string]> | undefined;
|
|
39
|
-
transformCandidatesById?: Array<[string, string[]]> | undefined;
|
|
40
|
-
transformSourceById?: Array<[string, string]> | undefined;
|
|
41
|
-
inlineExcludedCandidates: string[];
|
|
42
|
-
inlineIncludedCandidates: string[];
|
|
43
|
-
}
|
|
44
|
-
export interface SourceCandidateFilterOptions {
|
|
45
|
-
excludeEntries?: TailwindSourceEntry[] | undefined;
|
|
46
|
-
}
|
|
47
|
-
interface ScanSourceCandidateRootOptions {
|
|
48
|
-
root: string;
|
|
49
|
-
outDir?: string | undefined;
|
|
50
|
-
entries?: TailwindSourceEntry[] | undefined;
|
|
51
|
-
explicit?: boolean | undefined;
|
|
52
|
-
}
|
|
53
|
-
export interface SourceCandidateCollectorOptions {
|
|
54
|
-
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
55
|
-
customAttributesEntities?: ICustomAttributesEntities | undefined;
|
|
56
|
-
disabledDefaultTemplateHandler?: boolean | undefined;
|
|
57
|
-
extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
|
|
58
|
-
}
|
|
59
|
-
export declare function isSourceCandidateRequest(id: string): boolean;
|
|
60
|
-
export declare function createSourceCandidateStore(options?: SourceCandidateCollectorOptions): SourceCandidateStore;
|
|
61
|
-
export declare function createSourceCandidateCollector(options?: SourceCandidateCollectorOptions): SourceCandidateCollector;
|
|
62
|
-
export declare function getSourceCandidateContentCacheStatsForTest(): {
|
|
63
|
-
max: number;
|
|
64
|
-
size: number;
|
|
65
|
-
keys: string[];
|
|
66
|
-
};
|
|
67
|
-
export declare function clearSourceCandidateContentCacheForTest(): void;
|
|
68
|
-
export {};
|
|
1
|
+
export { clearSourceCandidateContentCacheForTest, createSourceCandidateCollector, getSourceCandidateContentCacheStatsForTest } from './source-candidates/collector';
|
|
2
|
+
export { createSourceCandidateStore } from './source-candidates/store';
|
|
3
|
+
export { isSourceCandidateRequest } from './source-candidates/types-and-cache';
|
|
4
|
+
export type { SourceCandidateChange, SourceCandidateCollector, SourceCandidateCollectorOptions, SourceCandidateCollectorSnapshot, SourceCandidateFilterOptions, SourceCandidateStore } from './source-candidates/types-and-cache';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { createEscapeFragments } from '../../../../vite/incremental-runtime-class-set/escaped-candidates';
|
|
2
|
+
import type { SetupWebpackV5ProcessAssetsHookOptions, WebpackSourceLike } from '../helpers';
|
|
3
|
+
import type { WebpackCssHandlerOptions, WebpackSourceCandidateCache } from './preflight-runtime';
|
|
4
|
+
export declare function finalizeTracedWebpackCssAsset(css: string, cssHandlerOptions: WebpackCssHandlerOptions, options: {
|
|
5
|
+
annotateCss: (css: string) => string;
|
|
6
|
+
compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'];
|
|
7
|
+
finalized?: boolean | undefined;
|
|
8
|
+
isWebGeneratorTarget: boolean;
|
|
9
|
+
}): string;
|
|
10
|
+
export declare function finalizeWebpackCssAssetSource(source: string, compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], isWebGeneratorTarget: boolean, options?: {
|
|
11
|
+
cssPreflight?: boolean | undefined;
|
|
12
|
+
generatedCss?: boolean;
|
|
13
|
+
preserveExistingPreflight?: boolean | undefined;
|
|
14
|
+
}): string;
|
|
15
|
+
export declare function finalizeWebpackCssAssetOutputSource(source: string, compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], isWebGeneratorTarget: boolean): string;
|
|
16
|
+
export declare function collectWebpackJsRuntimeCandidatesFromAssets(options: {
|
|
17
|
+
escapeFragments: ReturnType<typeof createEscapeFragments>;
|
|
18
|
+
getAssetSource: (file: string) => WebpackSourceLike | undefined;
|
|
19
|
+
isWebGeneratorTarget: boolean;
|
|
20
|
+
jsAssets: Iterable<string>;
|
|
21
|
+
}): Set<string> | undefined;
|
|
22
|
+
export declare function collectWebpackJsRuntimeTokenSignature(options: {
|
|
23
|
+
getAssetSource: (file: string) => WebpackSourceLike | undefined;
|
|
24
|
+
isWebGeneratorTarget: boolean;
|
|
25
|
+
jsAssets: Iterable<string>;
|
|
26
|
+
}): string;
|
|
27
|
+
export declare function addRuntimeTransformCandidates(target: Set<string>, candidates: ReadonlySet<string> | undefined): void;
|
|
28
|
+
export declare function createWebpackCssSourceTraceTokenSources(compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], webpackSourceCandidates: WebpackSourceCandidateCache | undefined): import("../../../../shared/css-source-trace").CssTokenSourceMap | undefined;
|
|
29
|
+
export declare function stringifyOptionalWebpackSourceValue(value: unknown): string;
|
|
30
|
+
export declare function stringifyWebpackSourceLike(source: WebpackSourceLike): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function parseWebpackCssLayerNames(params: string): string[];
|
|
2
|
+
export declare function removeWebpackTailwindGeneratedAssetCss(source: string): string;
|
|
3
|
+
export declare function isOnlyWebpackTailwindGeneratedPreflightCss(source: string): boolean;
|
|
4
|
+
export declare function collectWebpackCssRuleIdentityMarkers(source: string): Set<string>;
|
|
5
|
+
export declare function unescapeCssIdentifier(value: string): string;
|
|
6
|
+
export declare function collectGeneratedCssRuntimeCandidates(source: string): Set<string>;
|
|
7
|
+
export declare function hasAdditionalWebpackAssetUserCssMarkers(rawSource: string, generatorRawSource: string): boolean;
|
|
8
|
+
export declare function hasWebpackTailwindSourceDirectives(source: string | undefined): boolean;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { SetupWebpackV5ProcessAssetsHookOptions } from '../helpers';
|
|
2
|
+
import type { WebpackSourceCandidateScanMemoryStats } from '../source-candidate-cache';
|
|
3
|
+
import type { WebpackCssHandlerOptions } from './preflight-runtime';
|
|
4
|
+
export declare function resolveWebpackMemoryDebugStats(context: {
|
|
5
|
+
activeAssetFiles: number;
|
|
6
|
+
activeCssFiles: number;
|
|
7
|
+
activeProcessCacheKeys: Set<string>;
|
|
8
|
+
activeProcessHashKeys: Set<string | number>;
|
|
9
|
+
cache: SetupWebpackV5ProcessAssetsHookOptions['options']['cache'];
|
|
10
|
+
cssHandlerOptionsCache: Map<string, WebpackCssHandlerOptions>;
|
|
11
|
+
cssUserHandlerOptionsCache: Map<string, WebpackCssHandlerOptions>;
|
|
12
|
+
phase: string;
|
|
13
|
+
sourceCandidateScan: WebpackSourceCandidateScanMemoryStats;
|
|
14
|
+
}): {
|
|
15
|
+
phase: string;
|
|
16
|
+
process: {
|
|
17
|
+
rssMb: number;
|
|
18
|
+
heapTotalMb: number;
|
|
19
|
+
heapUsedMb: number;
|
|
20
|
+
externalMb: number;
|
|
21
|
+
arrayBuffersMb: number;
|
|
22
|
+
};
|
|
23
|
+
assets: {
|
|
24
|
+
active: number;
|
|
25
|
+
activeCss: number;
|
|
26
|
+
};
|
|
27
|
+
processCache: {
|
|
28
|
+
instance: number;
|
|
29
|
+
hashMap: number;
|
|
30
|
+
activeCacheKeys: number;
|
|
31
|
+
activeHashKeys: number;
|
|
32
|
+
staleCacheKeys: number;
|
|
33
|
+
staleHashKeys: number;
|
|
34
|
+
pruned: boolean;
|
|
35
|
+
pruneSkipped: boolean;
|
|
36
|
+
};
|
|
37
|
+
webpackCss: {
|
|
38
|
+
handlerOptions: number;
|
|
39
|
+
userHandlerOptions: number;
|
|
40
|
+
maxHandlerOptions: number;
|
|
41
|
+
};
|
|
42
|
+
sourceCandidateScan: WebpackSourceCandidateScanMemoryStats;
|
|
43
|
+
tailwind: {
|
|
44
|
+
v4: {
|
|
45
|
+
max: number;
|
|
46
|
+
entryCandidatesMax: number;
|
|
47
|
+
entryCssBytesMax: number;
|
|
48
|
+
size: number;
|
|
49
|
+
taskMax: number;
|
|
50
|
+
taskSize: number;
|
|
51
|
+
entries: {
|
|
52
|
+
candidates: number;
|
|
53
|
+
classSet: number;
|
|
54
|
+
cssBytes: number;
|
|
55
|
+
rawCssBytes: number;
|
|
56
|
+
keyHash: string;
|
|
57
|
+
keyBytes: number;
|
|
58
|
+
}[];
|
|
59
|
+
keys: {
|
|
60
|
+
keyHash: string;
|
|
61
|
+
keyBytes: number;
|
|
62
|
+
}[];
|
|
63
|
+
taskKeys: {
|
|
64
|
+
keyHash: string;
|
|
65
|
+
keyBytes: number;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
} | undefined;
|
|
70
|
+
export declare function shouldInjectWebpackCssTracePreflight(_appType: SetupWebpackV5ProcessAssetsHookOptions['appType'], cssHandlerOptions: Pick<WebpackCssHandlerOptions, 'isMainChunk' | 'sourceOptions'>): boolean;
|
|
71
|
+
export declare function finalizeMiniProgramUserCssAssetSource(source: string, compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], isWebGeneratorTarget: boolean, options?: {
|
|
72
|
+
cssPreflight?: boolean | undefined;
|
|
73
|
+
}): string;
|
|
74
|
+
export declare function shouldFallbackToWebpackUserCssOnGeneratorError(options: {
|
|
75
|
+
configuredMainCssEntryFilesLength: number;
|
|
76
|
+
generatorRawSource: string;
|
|
77
|
+
hasExplicitTailwindV4SourceCss: boolean;
|
|
78
|
+
}): boolean;
|
package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/preflight-runtime.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { TailwindV4CssSource } from '../../../../shared/generator-css/source-resolver/types';
|
|
2
|
+
import type { SourceCandidateStore } from '../../../../vite/source-candidates';
|
|
3
|
+
import type { SetupWebpackV5ProcessAssetsHookOptions } from '../helpers';
|
|
4
|
+
import type { resolveStyleOptionsFromContext } from '../../../../../context/style-options';
|
|
5
|
+
import type { TailwindcssRuntimeLike } from '../../../../../types';
|
|
6
|
+
export { isRuntimeTransformCandidate } from './runtime-candidates';
|
|
7
|
+
export interface WebpackCssHandlerOptions {
|
|
8
|
+
isMainChunk: boolean;
|
|
9
|
+
postcssOptions: {
|
|
10
|
+
options: {
|
|
11
|
+
from: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
majorVersion?: 4 | undefined;
|
|
15
|
+
sourceOptions?: {
|
|
16
|
+
cssSources?: TailwindV4CssSource[] | undefined;
|
|
17
|
+
outputRoot?: string | undefined;
|
|
18
|
+
sourceCss?: string | undefined;
|
|
19
|
+
sourceFile?: string | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare const WEBPACK_CSS_HANDLER_OPTIONS_CACHE_MAX = 128;
|
|
23
|
+
export declare function resolveConfiguredWebpackCssPreflight(compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], styleOptions: ReturnType<typeof resolveStyleOptionsFromContext>): import("@weapp-tailwindcss/postcss").CssPreflightOptions;
|
|
24
|
+
export declare function resolveExistingWebpackCssPreflight(compilerOptions: SetupWebpackV5ProcessAssetsHookOptions['options'], styleOptions: ReturnType<typeof resolveStyleOptionsFromContext>, source: string): import("@weapp-tailwindcss/postcss").CssPreflightOptions | undefined;
|
|
25
|
+
export declare function removeMiniProgramPreflightSelectorRule(source: string): string;
|
|
26
|
+
export declare function dedupeMiniProgramPreflightSelectorRules(source: string): string;
|
|
27
|
+
export declare function hasMiniProgramPreflightSelector(source: string): boolean;
|
|
28
|
+
export declare function ensureWebpackMiniProgramTwContentInit(source: string): string;
|
|
29
|
+
export declare function removeTailwindV4StandaloneHostPreflightRule(source: string): string;
|
|
30
|
+
export interface WebpackSourceCandidateCache {
|
|
31
|
+
getSourceCandidatesForEntries: SourceCandidateStore['valuesForEntries'];
|
|
32
|
+
signatureHash: string;
|
|
33
|
+
tokenSources: ReturnType<SourceCandidateStore['sourcesForEntries']>;
|
|
34
|
+
}
|
|
35
|
+
export declare function collectRuntimeTokenSignatureParts(source: string): [] | RegExpMatchArray;
|
|
36
|
+
export declare function hasMissingRuntimeCandidates(classSet: ReadonlySet<string> | undefined, candidates: ReadonlySet<string> | undefined): boolean;
|
|
37
|
+
export declare function hasStaleRuntimeCandidates(classSet: ReadonlySet<string> | undefined, candidates: ReadonlySet<string> | undefined): boolean;
|
|
38
|
+
export declare function resolveGeneratedCssRuntimeCandidates(source: string, fallbackClassSet?: ReadonlySet<string> | undefined): ReadonlySet<string>;
|
|
39
|
+
export declare function getRuntimeClassSetSync(tailwindRuntime: TailwindcssRuntimeLike): Set<string>;
|
|
40
|
+
export declare function toMb(bytes: number): number;
|
|
41
|
+
export declare function pruneMapToMaxSize<Key, Value>(map: Map<Key, Value>, maxSize: number): void;
|
|
42
|
+
export declare function stripTrailingLineWhitespace(source: string): string;
|
|
43
|
+
export declare function pruneWebpackCssHandlerOptionCaches(cssHandlerOptionsCache: Map<string, WebpackCssHandlerOptions>, cssUserHandlerOptionsCache: Map<string, WebpackCssHandlerOptions>, activeCssFiles: Set<string>): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SetupWebpackV5ProcessAssetsHookOptions } from '../helpers';
|
|
2
|
+
import type { WebpackGeneratorUserCssSource } from './sources';
|
|
3
|
+
export declare function resolveWebpackCssAssetModuleResource(resource: string, issuer: {
|
|
4
|
+
context?: string;
|
|
5
|
+
resource?: string;
|
|
6
|
+
} | undefined, options: {
|
|
7
|
+
appType?: SetupWebpackV5ProcessAssetsHookOptions['appType'] | undefined;
|
|
8
|
+
cssMatcher: (file: string) => boolean;
|
|
9
|
+
}): string | undefined;
|
|
10
|
+
export declare function isSameWebpackCssSourceScope(options: {
|
|
11
|
+
candidateSourceFile: string;
|
|
12
|
+
currentSourceFile?: string | undefined;
|
|
13
|
+
outputFile: string;
|
|
14
|
+
resourcesByAsset: ReadonlyMap<string, ReadonlySet<string>>;
|
|
15
|
+
}): boolean;
|
|
16
|
+
export declare function shouldAppendCurrentWebpackAssetUserCss(options: {
|
|
17
|
+
currentAssetHasBundlerGeneratedMarker: boolean;
|
|
18
|
+
currentAssetHasUserCss: boolean;
|
|
19
|
+
currentAssetLooksGenerated: boolean;
|
|
20
|
+
registeredUserRawSource: WebpackGeneratorUserCssSource | undefined;
|
|
21
|
+
shouldPreserveGeneratedWebAssetUserCss: boolean;
|
|
22
|
+
sourceCssProcessed: boolean;
|
|
23
|
+
}): boolean;
|
|
24
|
+
export declare function createWebpackCurrentAssetUserRawSource(options: {
|
|
25
|
+
currentAssetHasUserCss: boolean;
|
|
26
|
+
currentAssetLooksGenerated: boolean;
|
|
27
|
+
currentAssetUserCssSource: string;
|
|
28
|
+
shouldAppendCurrentAssetUserCss: boolean;
|
|
29
|
+
sourceCssProcessed: boolean;
|
|
30
|
+
}): WebpackGeneratorUserCssSource | undefined;
|
package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/runtime-candidates.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isRuntimeTransformCandidate(candidate: string): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { TailwindV4CssSource } from '../../../../shared/generator-css/source-resolver/types';
|
|
2
|
+
import type { WebpackCssHandlerOptions } from './preflight-runtime';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../../../types';
|
|
4
|
+
export { collectWebpackAssetUserCssMarkers } from './user-css-markers';
|
|
5
|
+
export declare function resolveWebpackGeneratorRawSource(rawSource: string, cssHandlerOptions: WebpackCssHandlerOptions): string;
|
|
6
|
+
export declare function shouldConsumeWebpackLoaderGeneratedCss(options: {
|
|
7
|
+
allowMarkerlessRegistryMatch?: boolean | undefined;
|
|
8
|
+
hasBundlerGeneratedCssMarker: boolean;
|
|
9
|
+
loaderGeneratedClassSet?: Set<string> | undefined;
|
|
10
|
+
sourceCandidates?: Set<string> | undefined;
|
|
11
|
+
shouldRegenerateExplicitTailwindV4CssSource: boolean;
|
|
12
|
+
watchMode?: boolean | undefined;
|
|
13
|
+
}): boolean;
|
|
14
|
+
export declare function hasDeferredWebpackGeneratedCss(source: string, generatedClassSets: Iterable<ReadonlySet<string>>): boolean;
|
|
15
|
+
export interface WebpackGeneratorUserCssSource {
|
|
16
|
+
css: string;
|
|
17
|
+
processed: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function hasUsableWebpackGeneratorCssSources(cssSources: TailwindV4CssSource[] | undefined): cssSources is TailwindV4CssSource[];
|
|
20
|
+
export declare function normalizeWebpackGeneratorCssSources(cssSources: TailwindV4CssSource[] | undefined): import("@tailwindcss-mangle/engine").TailwindV4CssSource[] | undefined;
|
|
21
|
+
export declare function scopeWebpackGeneratorOptionsToCssSource(compilerOptions: InternalUserDefinedOptions, sourceFile: string | undefined, options?: {
|
|
22
|
+
disableUnmatchedCssEntries?: boolean | undefined;
|
|
23
|
+
}): InternalUserDefinedOptions;
|
|
24
|
+
export declare function hasProcessedCssAssetUrl(css: string): boolean;
|
|
25
|
+
export declare function shouldUseWebpackAssetAsGeneratorUserCss(rawSource: string, generatorRawSource: string, options?: {
|
|
26
|
+
processed?: boolean | undefined;
|
|
27
|
+
}): boolean;
|
|
28
|
+
export declare function collectWebpackBareSelectorUserCss(source: string): string;
|
package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers/user-css-markers.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function collectWebpackAssetUserCssMarkers(source: string): Set<string>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { WebpackGeneratorUserCssSource } from './sources';
|
|
2
|
+
export declare function isWebpackTailwindImportRequest(request: string | undefined): boolean | undefined;
|
|
3
|
+
export declare function removeWebpackGeneratorNonTailwindImports(source: string | undefined): string | undefined;
|
|
4
|
+
export declare function removeWebpackUserCssFallbackImports(source: string): string;
|
|
5
|
+
export declare function normalizeWebpackUserCssFallbackSource(source: string): string;
|
|
6
|
+
export declare function isWebpackCssSourceRepresentedInAsset(rawSource: string, sourceCss: string | undefined): boolean;
|
|
7
|
+
export declare function createWebpackGeneratorCssSource(file: string | undefined, css: string | undefined): {
|
|
8
|
+
file: string;
|
|
9
|
+
base: string;
|
|
10
|
+
css: string;
|
|
11
|
+
dependencies: string[];
|
|
12
|
+
} | undefined;
|
|
13
|
+
export declare function createWebpackUserCssSourceAppend(sources: Iterable<{
|
|
14
|
+
css: string | undefined;
|
|
15
|
+
file: string;
|
|
16
|
+
processed?: boolean | undefined;
|
|
17
|
+
}>, generatorRawSource: string, currentSourceFile?: string | undefined, shouldIncludeSource?: ((file: string) => boolean) | undefined): {
|
|
18
|
+
css: string;
|
|
19
|
+
processed: boolean;
|
|
20
|
+
} | undefined;
|
|
21
|
+
export declare function createWebpackGeneratorUserCssSourceAppend(...sources: Array<WebpackGeneratorUserCssSource | undefined>): WebpackGeneratorUserCssSource | undefined;
|