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,71 @@
|
|
|
1
|
+
import type { getCompilerContext } from '../../../../context';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../../../../types';
|
|
3
|
+
export declare function touchMapEntry<Key, Value>(map: Map<Key, Value>, key: Key, value: Value): void;
|
|
4
|
+
export declare function pruneGulpRuntimeSourceCaches(sourceHashByFile: Map<string, string>, sourcesByFile: Map<string, {
|
|
5
|
+
source: string;
|
|
6
|
+
type: 'html' | 'js';
|
|
7
|
+
}>): void;
|
|
8
|
+
export declare function rememberGulpProcessCacheKey(cacheKeys: Set<string>, key: string): void;
|
|
9
|
+
export declare function pruneGulpProcessCache(cache: ReturnType<typeof getCompilerContext>['cache'], cacheKeys: Set<string>): void;
|
|
10
|
+
export declare function resolveGulpMemoryDebugStats(context: {
|
|
11
|
+
cache: ReturnType<typeof getCompilerContext>['cache'];
|
|
12
|
+
defaultStyleHandlerOptionsCache: Map<number | 'unknown', Partial<IStyleHandlerOptions>>;
|
|
13
|
+
gulpProcessCacheKeys: Set<string>;
|
|
14
|
+
phase: string;
|
|
15
|
+
runtimeSet: Set<string>;
|
|
16
|
+
runtimeSourceHashByFile: Map<string, string>;
|
|
17
|
+
runtimeSourcesByFile: Map<string, {
|
|
18
|
+
source: string;
|
|
19
|
+
type: 'html' | 'js';
|
|
20
|
+
}>;
|
|
21
|
+
}): {
|
|
22
|
+
phase: string;
|
|
23
|
+
process: {
|
|
24
|
+
rssMb: number;
|
|
25
|
+
heapTotalMb: number;
|
|
26
|
+
heapUsedMb: number;
|
|
27
|
+
externalMb: number;
|
|
28
|
+
arrayBuffersMb: number;
|
|
29
|
+
};
|
|
30
|
+
runtime: {
|
|
31
|
+
runtimeSet: number;
|
|
32
|
+
runtimeSourceHashByFile: number;
|
|
33
|
+
runtimeSourcesByFile: number;
|
|
34
|
+
maxRuntimeSources: number;
|
|
35
|
+
};
|
|
36
|
+
processCache: {
|
|
37
|
+
instance: number;
|
|
38
|
+
hashMap: number;
|
|
39
|
+
activeCacheKeys: number;
|
|
40
|
+
maxCacheKeys: number;
|
|
41
|
+
};
|
|
42
|
+
gulpOptions: {
|
|
43
|
+
defaultStyleHandlerOptions: number;
|
|
44
|
+
};
|
|
45
|
+
tailwind: {
|
|
46
|
+
v4: {
|
|
47
|
+
max: number;
|
|
48
|
+
entryCandidatesMax: number;
|
|
49
|
+
entryCssBytesMax: number;
|
|
50
|
+
size: number;
|
|
51
|
+
taskMax: number;
|
|
52
|
+
taskSize: number;
|
|
53
|
+
entries: {
|
|
54
|
+
candidates: number;
|
|
55
|
+
classSet: number;
|
|
56
|
+
cssBytes: number;
|
|
57
|
+
rawCssBytes: number;
|
|
58
|
+
keyHash: string;
|
|
59
|
+
keyBytes: number;
|
|
60
|
+
}[];
|
|
61
|
+
keys: {
|
|
62
|
+
keyHash: string;
|
|
63
|
+
keyBytes: number;
|
|
64
|
+
}[];
|
|
65
|
+
taskKeys: {
|
|
66
|
+
keyHash: string;
|
|
67
|
+
keyBytes: number;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
} | undefined;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type File from 'vinyl';
|
|
2
|
+
import type { getCompilerContext } from '../../../../context';
|
|
3
|
+
import type { TailwindRuntimeState } from '../../../../tailwindcss/runtime';
|
|
4
|
+
import type { CreateJsHandlerOptions, IStyleHandlerOptions, ITemplateHandlerOptions, JsModuleGraphOptions } from '../../../../types';
|
|
5
|
+
type DebugFunction = (formatter: unknown, ...args: unknown[]) => void;
|
|
6
|
+
type RuntimeRefreshOptions = boolean | {
|
|
7
|
+
forceRefresh?: boolean;
|
|
8
|
+
forceCollect?: boolean;
|
|
9
|
+
clearCache?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export interface GulpFileTransformContext {
|
|
12
|
+
cache: ReturnType<typeof getCompilerContext>['cache'];
|
|
13
|
+
createRuntimeSetHash: (rawSource: string, nextRuntimeSet: Set<string>, sourceTraceSignature?: string, sourceCandidateSignature?: string, outputSignature?: string) => string;
|
|
14
|
+
debug: DebugFunction;
|
|
15
|
+
generatedCssPreflightModeByFile: Map<string, {
|
|
16
|
+
inject: boolean;
|
|
17
|
+
preserve: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
getSourceCandidateGetter: () => ((entries?: unknown) => Set<string>) | undefined;
|
|
20
|
+
getSourceCandidateSourceGetter: () => ((entries?: unknown) => Map<string, Set<string>>) | undefined;
|
|
21
|
+
getRuntimeSet: () => Set<string>;
|
|
22
|
+
gulpProcessCacheKeys: Set<string>;
|
|
23
|
+
opts: ReturnType<typeof getCompilerContext>;
|
|
24
|
+
refreshGulpV4SourceCandidates: (forceRefresh?: boolean) => Promise<((entries?: unknown) => Set<string>) | undefined>;
|
|
25
|
+
refreshRuntimeSet: (options?: RuntimeRefreshOptions) => Promise<Set<string>>;
|
|
26
|
+
refreshRuntimeSetForSource: (file: File, rawSource: string, type: 'html' | 'js') => Promise<Set<string>>;
|
|
27
|
+
registerAutoCssSource: (file: File, rawSource: string) => Promise<boolean>;
|
|
28
|
+
resolveGulpStyleOutputExtension: (file: File) => string | undefined;
|
|
29
|
+
resolveGulpTransformTimingDetails: (phase: string) => unknown;
|
|
30
|
+
resolveModuleGraphOptions: (moduleGraph?: JsModuleGraphOptions) => JsModuleGraphOptions;
|
|
31
|
+
resolveWxmlHandlerOptions: (options?: Partial<ITemplateHandlerOptions>) => Partial<ITemplateHandlerOptions>;
|
|
32
|
+
resolveWxssFileHandlerOptions: (file: File, rawSource: string, options?: Partial<IStyleHandlerOptions>) => Partial<IStyleHandlerOptions>;
|
|
33
|
+
resolveWxssUserHandlerOptions: (options?: Partial<IStyleHandlerOptions>) => Partial<IStyleHandlerOptions>;
|
|
34
|
+
runtimeState: TailwindRuntimeState;
|
|
35
|
+
}
|
|
36
|
+
export declare function createGulpFileTransforms(context: GulpFileTransformContext): {
|
|
37
|
+
adaptWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
38
|
+
generateWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
39
|
+
transformWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
40
|
+
transformWxml: (options?: Partial<ITemplateHandlerOptions>) => import("node:stream").Transform;
|
|
41
|
+
transformJs: (options?: Partial<CreateJsHandlerOptions>) => import("node:stream").Transform;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IStyleHandlerOptions, ITemplateHandlerOptions, UserDefinedOptions } from '../../../types';
|
|
2
2
|
export declare function createNativeGulpPlugins(options?: UserDefinedOptions): {
|
|
3
3
|
adaptWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
4
4
|
generateWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
5
5
|
transformWxss: (options?: Partial<IStyleHandlerOptions>) => import("node:stream").Transform;
|
|
6
6
|
transformWxml: (options?: Partial<ITemplateHandlerOptions>) => import("node:stream").Transform;
|
|
7
|
-
transformJs: (options?: Partial<CreateJsHandlerOptions>) => import("node:stream").Transform;
|
|
7
|
+
transformJs: (options?: Partial<import("@/types").CreateJsHandlerOptions>) => import("node:stream").Transform;
|
|
8
8
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions, LoadedPostcssOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GenerateCssByGeneratorResult } from './generator-css';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../types';
|
|
4
|
+
export declare function resolveFrameworkPostcssOptions(value: unknown): LoadedPostcssOptions | undefined;
|
|
5
|
+
export declare function collectFrameworkPostcssOptionsFromLoaderEntries(entries: unknown[], loaderContext?: unknown): LoadedPostcssOptions | undefined;
|
|
6
|
+
export declare function captureFrameworkPostcssOptions(owner: InternalUserDefinedOptions, options: unknown): LoadedPostcssOptions | undefined;
|
|
7
|
+
export declare function captureResolvedFrameworkPostcssOptions(owner: InternalUserDefinedOptions, options: LoadedPostcssOptions | undefined): LoadedPostcssOptions | undefined;
|
|
8
|
+
export declare function hasFrameworkPostcssOptions(owner: InternalUserDefinedOptions): boolean;
|
|
9
|
+
export declare function adaptGeneratedCssWithFrameworkPipeline(owner: InternalUserDefinedOptions, generated: GenerateCssByGeneratorResult, options: {
|
|
10
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
11
|
+
file: string;
|
|
12
|
+
majorVersion: number;
|
|
13
|
+
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
14
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../../../types';
|
|
3
|
+
export declare function hasMiniProgramTailwindV4PreflightReset(css: string): boolean;
|
|
4
|
+
export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, _majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
|
|
5
|
+
injectPreflight?: boolean;
|
|
6
|
+
preservePreflight?: boolean;
|
|
7
|
+
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
8
|
+
}): string;
|
|
9
|
+
export declare function resolveMiniProgramPreflightModeForGeneratorCss(opts: InternalUserDefinedOptions, options: {
|
|
10
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
11
|
+
isolateCurrentCssCandidates: boolean;
|
|
12
|
+
localImports?: string | undefined;
|
|
13
|
+
primaryCssSource?: boolean | undefined;
|
|
14
|
+
explicitCssSource?: boolean | undefined;
|
|
15
|
+
}): {
|
|
16
|
+
inject: boolean;
|
|
17
|
+
preserve: boolean;
|
|
18
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { createWeappTailwindcssGenerator } from '../../../../generator';
|
|
3
|
+
export declare function shouldFinalizeMarkedUserLayerComponentsCss(file: string): boolean;
|
|
4
|
+
export declare function splitRawSourceByGeneratedCssOrder(rawSource: string, rawTailwindCss: string): {
|
|
5
|
+
before: string;
|
|
6
|
+
after: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
export declare function shouldUseGeneratorForCurrentCss(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
9
|
+
forceGenerator?: boolean | undefined;
|
|
10
|
+
hasGeneratedCss: boolean;
|
|
11
|
+
hasGeneratedMarkers: boolean;
|
|
12
|
+
hasSourceDirectives: boolean;
|
|
13
|
+
rawSource: string;
|
|
14
|
+
runtimeCandidateCount?: number | undefined;
|
|
15
|
+
target?: string | undefined;
|
|
16
|
+
configuredCssSourceCount?: number | undefined;
|
|
17
|
+
}): boolean | undefined;
|
|
18
|
+
export declare function hasGeneratorSourceDirectives(source: string, importFallback: boolean): boolean;
|
|
19
|
+
export declare function createRuntimeWithCurrentCssCandidates(runtime: Set<string>, currentCssCandidates: string[], isolateCurrentCssCandidates: boolean): Set<string>;
|
|
20
|
+
export declare function mergeGeneratorResults(generatedResults: GeneratorResult[]): (import("@/generator").TailwindV4GenerateResult & {
|
|
21
|
+
target: import("@/generator").WeappTailwindcssGeneratorTarget;
|
|
22
|
+
rawCss: string;
|
|
23
|
+
}) | undefined;
|
|
24
|
+
type GeneratorResult = Awaited<ReturnType<ReturnType<typeof createWeappTailwindcssGenerator>['generate']>>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorResolvedSource } from '../source-resolver';
|
|
3
|
+
import type { TailwindSourceEntry } from '../../../../tailwindcss/source-scan';
|
|
4
|
+
import type { InternalUserDefinedOptions } from '../../../../types';
|
|
5
|
+
export declare function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime: Set<string>, runtime: Set<string>, options: {
|
|
6
|
+
currentCssCandidates?: string[] | undefined;
|
|
7
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
8
|
+
isolateCssSource: boolean;
|
|
9
|
+
majorVersion?: number | undefined;
|
|
10
|
+
matchedCssSourceFile: boolean;
|
|
11
|
+
}): Set<string>;
|
|
12
|
+
export declare function shouldIsolateScopedCssSource(_majorVersion: number | undefined, source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined, options: {
|
|
13
|
+
cssHandlerOptions?: IStyleHandlerOptions | undefined;
|
|
14
|
+
target: string;
|
|
15
|
+
}): boolean;
|
|
16
|
+
export declare function shouldIsolateCurrentTailwindV4CssCandidates(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
17
|
+
hasGeneratedCss: boolean;
|
|
18
|
+
hasGeneratedMarkers: boolean;
|
|
19
|
+
rawSource: string;
|
|
20
|
+
}): boolean;
|
|
21
|
+
export declare function shouldScanTailwindV4Sources(majorVersion: number | undefined, target: string, generatorRuntime: Set<string>, isolateCssSource: boolean): boolean;
|
|
22
|
+
export declare function shouldAppendWebBundleCssFallback(target: string, _options: {
|
|
23
|
+
hasSourceDirectives: boolean;
|
|
24
|
+
hasMatchedCssSourceFile: boolean;
|
|
25
|
+
}): target is "web";
|
|
26
|
+
export declare function isEmptyCssSourceOrderParts(parts: {
|
|
27
|
+
before: string;
|
|
28
|
+
after: string;
|
|
29
|
+
}): boolean;
|
|
30
|
+
export declare function resolveGeneratorStyleOptions(opts: InternalUserDefinedOptions, cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Partial<IStyleHandlerOptions>;
|
|
@@ -1,72 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import type { InternalUserDefinedOptions } from '../../../types';
|
|
6
|
-
export declare function hasMiniProgramTailwindV4PreflightReset(css: string): boolean;
|
|
7
|
-
export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, _majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
|
|
8
|
-
injectPreflight?: boolean;
|
|
9
|
-
preservePreflight?: boolean;
|
|
10
|
-
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
11
|
-
}): string;
|
|
12
|
-
export declare function resolveMiniProgramPreflightModeForGeneratorCss(opts: InternalUserDefinedOptions, options: {
|
|
13
|
-
cssHandlerOptions: IStyleHandlerOptions;
|
|
14
|
-
isolateCurrentCssCandidates: boolean;
|
|
15
|
-
localImports?: string | undefined;
|
|
16
|
-
primaryCssSource?: boolean | undefined;
|
|
17
|
-
explicitCssSource?: boolean | undefined;
|
|
18
|
-
}): {
|
|
19
|
-
inject: boolean;
|
|
20
|
-
preserve: boolean;
|
|
21
|
-
};
|
|
22
|
-
export declare function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime: Set<string>, runtime: Set<string>, options: {
|
|
23
|
-
currentCssCandidates?: string[] | undefined;
|
|
24
|
-
cssHandlerOptions: IStyleHandlerOptions;
|
|
25
|
-
isolateCssSource: boolean;
|
|
26
|
-
majorVersion?: number | undefined;
|
|
27
|
-
matchedCssSourceFile: boolean;
|
|
28
|
-
}): Set<string>;
|
|
29
|
-
export declare function shouldIsolateScopedCssSource(_majorVersion: number | undefined, source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined, options: {
|
|
30
|
-
cssHandlerOptions?: IStyleHandlerOptions | undefined;
|
|
31
|
-
target: string;
|
|
32
|
-
}): boolean;
|
|
33
|
-
export declare function shouldIsolateCurrentTailwindV4CssCandidates(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
34
|
-
hasGeneratedCss: boolean;
|
|
35
|
-
hasGeneratedMarkers: boolean;
|
|
36
|
-
rawSource: string;
|
|
37
|
-
}): boolean;
|
|
38
|
-
export declare function shouldScanTailwindV4Sources(majorVersion: number | undefined, target: string, generatorRuntime: Set<string>, isolateCssSource: boolean): boolean;
|
|
39
|
-
export declare function shouldAppendWebBundleCssFallback(target: string, _options: {
|
|
40
|
-
hasSourceDirectives: boolean;
|
|
41
|
-
hasMatchedCssSourceFile: boolean;
|
|
42
|
-
}): target is "web";
|
|
43
|
-
export declare function isEmptyCssSourceOrderParts(parts: {
|
|
44
|
-
before: string;
|
|
45
|
-
after: string;
|
|
46
|
-
}): boolean;
|
|
47
|
-
export declare function resolveGeneratorStyleOptions(opts: InternalUserDefinedOptions, cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Partial<IStyleHandlerOptions>;
|
|
48
|
-
export declare function createCssSourceOrderAppend(base: string, extra: string): string;
|
|
49
|
-
export declare function deduplicateGeneratedCssRules(css: string): string;
|
|
50
|
-
export declare function shouldFinalizeMarkedUserLayerComponentsCss(file: string): boolean;
|
|
51
|
-
export declare function splitRawSourceByGeneratedCssOrder(rawSource: string, rawTailwindCss: string): {
|
|
52
|
-
before: string;
|
|
53
|
-
after: string;
|
|
54
|
-
} | undefined;
|
|
55
|
-
export declare function shouldUseGeneratorForCurrentCss(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
56
|
-
forceGenerator?: boolean | undefined;
|
|
57
|
-
hasGeneratedCss: boolean;
|
|
58
|
-
hasGeneratedMarkers: boolean;
|
|
59
|
-
hasSourceDirectives: boolean;
|
|
60
|
-
rawSource: string;
|
|
61
|
-
runtimeCandidateCount?: number | undefined;
|
|
62
|
-
target?: string | undefined;
|
|
63
|
-
configuredCssSourceCount?: number | undefined;
|
|
64
|
-
}): boolean | undefined;
|
|
65
|
-
export declare function hasGeneratorSourceDirectives(source: string, importFallback: boolean): boolean;
|
|
66
|
-
export declare function createRuntimeWithCurrentCssCandidates(runtime: Set<string>, currentCssCandidates: string[], isolateCurrentCssCandidates: boolean): Set<string>;
|
|
67
|
-
export declare function mergeGeneratorResults(generatedResults: GeneratorResult[]): (import("@/generator").TailwindV4GenerateResult & {
|
|
68
|
-
target: import("@/generator").WeappTailwindcssGeneratorTarget;
|
|
69
|
-
rawCss: string;
|
|
70
|
-
}) | undefined;
|
|
71
|
-
type GeneratorResult = Awaited<ReturnType<ReturnType<typeof createWeappTailwindcssGenerator>['generate']>>;
|
|
72
|
-
export {};
|
|
1
|
+
export { finalizeMiniProgramGeneratorCss, hasMiniProgramTailwindV4PreflightReset, resolveMiniProgramPreflightModeForGeneratorCss } from './generation-helpers/preflight';
|
|
2
|
+
export { createRuntimeWithCurrentCssCandidates, hasGeneratorSourceDirectives, mergeGeneratorResults, shouldFinalizeMarkedUserLayerComponentsCss, shouldUseGeneratorForCurrentCss, splitRawSourceByGeneratedCssOrder } from './generation-helpers/results';
|
|
3
|
+
export { isEmptyCssSourceOrderParts, mergeScopedRuntimeWithCurrentRuntime, resolveGeneratorStyleOptions, shouldAppendWebBundleCssFallback, shouldIsolateCurrentTailwindV4CssCandidates, shouldIsolateScopedCssSource, shouldScanTailwindV4Sources } from './generation-helpers/runtime-isolation';
|
|
4
|
+
export { createCssSourceOrderAppend, deduplicateGeneratedCssRules } from './generation-helpers/source-order';
|
|
@@ -3,5 +3,7 @@ import type { TailwindResolvedSource } from '../../../generator';
|
|
|
3
3
|
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
4
|
export declare function removeTailwindApplyRules(rawSource: string): string;
|
|
5
5
|
export declare function hasConfiguredContainerCompatSources(sources: TailwindResolvedSource[]): boolean;
|
|
6
|
-
export declare function appendLegacyCompatCss(css: string, rawSource: string, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined
|
|
6
|
+
export declare function appendLegacyCompatCss(css: string, rawSource: string, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined, options?: {
|
|
7
|
+
preserveSelectorOverrides?: boolean | undefined;
|
|
8
|
+
}): Promise<string>;
|
|
7
9
|
export declare function appendLegacyContainerCompatCss(css: string, rawSource: string, file: string, runtime: Set<string>, configuredContainerCompat: boolean, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Promise<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function finalizeDeferredGeneratorCss(context: any): Promise<{
|
|
2
|
+
css: string;
|
|
3
|
+
classSet: Set<string>;
|
|
4
|
+
target: any;
|
|
5
|
+
source: string;
|
|
6
|
+
dependencies: any;
|
|
7
|
+
incremental: boolean;
|
|
8
|
+
metadata: {
|
|
9
|
+
file: any;
|
|
10
|
+
majorVersion: any;
|
|
11
|
+
preflightMode: any;
|
|
12
|
+
rawCss: any;
|
|
13
|
+
};
|
|
14
|
+
} | undefined>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare function finalizeOrderedGeneratorCss(context: any): Promise<{
|
|
2
|
+
css: string;
|
|
3
|
+
classSet: Set<string>;
|
|
4
|
+
target: any;
|
|
5
|
+
source: string;
|
|
6
|
+
dependencies: any;
|
|
7
|
+
incremental: boolean;
|
|
8
|
+
metadata: {
|
|
9
|
+
file: any;
|
|
10
|
+
majorVersion: any;
|
|
11
|
+
rawCss: any;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
css: any;
|
|
15
|
+
classSet: Set<string>;
|
|
16
|
+
target: any;
|
|
17
|
+
source: string;
|
|
18
|
+
dependencies: any;
|
|
19
|
+
metadata: {
|
|
20
|
+
file: any;
|
|
21
|
+
majorVersion: any;
|
|
22
|
+
rawCss: any;
|
|
23
|
+
};
|
|
24
|
+
incremental?: never;
|
|
25
|
+
} | undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { normalizeWeappTailwindcssGeneratorOptions } from '../../../generator';
|
|
2
|
+
import { finalizeMiniProgramGeneratorCss } from './generation-helpers';
|
|
3
|
+
export declare function isCssAlreadyRepresentedByMarkers(css: string, source: string): boolean;
|
|
4
|
+
export declare function resolveGeneratedCssClassSet(target: string, classSet: Set<string>, candidates: Iterable<string>, css: string, escapeMap: Record<string, string> | undefined, previousClassSet?: Set<string> | undefined): Set<string>;
|
|
5
|
+
export declare function finalizeWebGeneratorCss(css: string, target: string, webCompat: ReturnType<typeof normalizeWeappTailwindcssGeneratorOptions>['webCompat']): string;
|
|
6
|
+
export declare function finalizeIncrementalGeneratorCss(previousCss: string, incrementalCss: string, target: string, majorVersion: number | undefined, cssPreflight: Parameters<typeof finalizeMiniProgramGeneratorCss>[3], options: Parameters<typeof finalizeMiniProgramGeneratorCss>[4], webCompat: ReturnType<typeof normalizeWeappTailwindcssGeneratorOptions>['webCompat']): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function preferScopedGeneratedCssRules(css: string): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorResolvedSource } from './metadata';
|
|
3
|
+
import type { GeneratorSourceRuntimeState, SourceStyleMatchOptions, TailwindV4CssSource, TailwindV4SourceOptions } from './types';
|
|
4
|
+
import type { TailwindResolvedSource } from '../../../../generator';
|
|
5
|
+
export declare function createCssEntrySources(cssEntries: string[] | undefined): {
|
|
6
|
+
file: string;
|
|
7
|
+
}[] | undefined;
|
|
8
|
+
export declare function mergeCssSources(cssSources: TailwindV4CssSource[] | undefined, cssEntrySources: TailwindV4CssSource[] | undefined): import("@tailwindcss-mangle/engine").TailwindV4CssSource[] | undefined;
|
|
9
|
+
export declare function createSingleTailwindV4SourceOptions(sourceOptions: TailwindV4SourceOptions, options: {
|
|
10
|
+
base: string;
|
|
11
|
+
css: string;
|
|
12
|
+
cssEntries?: string[] | undefined;
|
|
13
|
+
}): Partial<{
|
|
14
|
+
projectRoot: string;
|
|
15
|
+
baseFallbacks: string[];
|
|
16
|
+
packageName: string;
|
|
17
|
+
base: string;
|
|
18
|
+
css: string;
|
|
19
|
+
cssEntries: string[];
|
|
20
|
+
}>;
|
|
21
|
+
export declare function resolveTailwindV4CssEntrySource(cssEntry: string, sourceOptions: TailwindV4SourceOptions, options?: {
|
|
22
|
+
candidateMatched?: boolean | undefined;
|
|
23
|
+
includesPreflight?: boolean | undefined;
|
|
24
|
+
index?: number | undefined;
|
|
25
|
+
}): Promise<GeneratorResolvedSource>;
|
|
26
|
+
export declare function canResolveSourceSideCssEntry(file: string, cssHandlerOptions: IStyleHandlerOptions, sourceOptions?: Pick<SourceStyleMatchOptions, 'sourceFile' | 'cssSources' | 'outputRoot'>): boolean;
|
|
27
|
+
export declare function shouldResolveSourceSideCssEntry(rawSource: string): boolean;
|
|
28
|
+
export declare function normalizeTailwindV4CssSourceConfig(cssSource: TailwindV4CssSource, sourceBase: string): import("@tailwindcss-mangle/engine").TailwindV4CssSource;
|
|
29
|
+
export declare function normalizeResolvedTailwindV4SourceConfig<T extends TailwindResolvedSource>(source: T, file: string | undefined, sourceOptions: TailwindV4SourceOptions | undefined): T;
|
|
30
|
+
export declare function normalizeTailwindV4CssSourceConfigs(sourceOptions: TailwindV4SourceOptions): TailwindV4SourceOptions;
|
|
31
|
+
export declare function tryResolveTailwindV4SourceOptions(runtimeState: GeneratorSourceRuntimeState): TailwindV4SourceOptions | undefined;
|
|
32
|
+
export declare function hasConfiguredTailwindV4CssSource(sourceOptions: TailwindV4SourceOptions | undefined): boolean;
|
|
33
|
+
export declare function isSameTailwindV4CssSource(a: TailwindV4CssSource | undefined, b: TailwindV4CssSource | undefined): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './types';
|
|
3
|
+
import type { NormalizedWeappTailwindcssGeneratorOptions } from '../../../../generator';
|
|
4
|
+
export declare function resolveGeneratorSource(_majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@/generator").TailwindV4ResolvedSource>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './types';
|
|
3
|
+
import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource } from '../../../../generator';
|
|
4
|
+
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { resolveSourceSideCssEntrySource } from '../source-files';
|
|
3
|
+
import type { GeneratorSourceSelectionOptions, TailwindV4CssSource, TailwindV4SourceOptions } from './types';
|
|
4
|
+
import type { NormalizedWeappTailwindcssGeneratorOptions, resolveTailwindV4SourceOptionsFromRuntime } from '../../../../generator';
|
|
5
|
+
export declare function resolveSingleTailwindV4CssSource(cssSource: TailwindV4CssSource, sourceOptions: TailwindV4SourceOptions, options?: {
|
|
6
|
+
includesPreflight?: boolean | undefined;
|
|
7
|
+
index?: number | undefined;
|
|
8
|
+
matched?: boolean;
|
|
9
|
+
primary?: boolean | undefined;
|
|
10
|
+
}): Promise<import("./metadata").GeneratorResolvedSource>;
|
|
11
|
+
export declare function resolveTailwindV4CssSourceEntries(cssSource: TailwindV4CssSource, sourceOptions: TailwindV4SourceOptions): Promise<import("@/bundlers/vite/source-scan").ResolvedTailwindV4CssEntries | undefined>;
|
|
12
|
+
export declare function resolveCandidateMatchedTailwindV4CssSource(_rawSource: string, _cssHandlerOptions: IStyleHandlerOptions, sourceOptions: TailwindV4SourceOptions, selectionOptions: GeneratorSourceSelectionOptions | undefined): Promise<import("./metadata").GeneratorResolvedSource | undefined>;
|
|
13
|
+
export declare function resolveTailwindV4CssEntryIncludesPreflight(cssEntry: string): Promise<boolean | undefined>;
|
|
14
|
+
export declare function resolveCandidateMatchedTailwindV4CssEntry(sourceOptions: TailwindV4SourceOptions, selectionOptions: GeneratorSourceSelectionOptions | undefined): Promise<import("./metadata").GeneratorResolvedSource | undefined>;
|
|
15
|
+
export declare function createTailwindV4CssSourceResolver(sourceOptions: TailwindV4SourceOptions, generatorOptions: NormalizedWeappTailwindcssGeneratorOptions | undefined): (cssSource: NonNullable<typeof sourceOptions.cssSources>[number], index: number) => Promise<import("./metadata").GeneratorResolvedSource>;
|
|
16
|
+
export declare function resolveTailwindV4SourceSideEntrySource(resolvedEntrySource: ReturnType<typeof resolveSourceSideCssEntrySource>, sourceOptions: ReturnType<typeof resolveTailwindV4SourceOptionsFromRuntime>, generatorOptions: NormalizedWeappTailwindcssGeneratorOptions | undefined, file: string): Promise<import("@/generator").TailwindV4ResolvedSource | undefined>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { GeneratorSourceRuntimeState } from './types';
|
|
2
|
+
import type { TailwindResolvedSource } from '../../../../generator';
|
|
3
|
+
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<import("../../../../tailwindcss/source-scan").TailwindSourceEntry[] | undefined>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorSourceSelectionOptions, TailwindV4SourceOptions } from './types';
|
|
3
|
+
import type { resolveTailwindV4SourceOptionsFromRuntime } from '../../../../generator';
|
|
4
|
+
export declare function resolveMatchingTailwindV4CssEntry(rawSource: string, file: string, sourceOptions: ReturnType<typeof resolveTailwindV4SourceOptionsFromRuntime>): Promise<import("./metadata").GeneratorResolvedSource | undefined>;
|
|
5
|
+
export declare function resolveMatchingTailwindV4CssSource(rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, sourceOptions: TailwindV4SourceOptions, selectionOptions?: GeneratorSourceSelectionOptions | undefined): Promise<import("./metadata").GeneratorResolvedSource | undefined>;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
-
import type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './source-resolver/types';
|
|
3
|
-
import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource } from '../../../generator';
|
|
4
1
|
export type { GeneratorResolvedSource, GeneratorSourceMetadata } from './source-resolver/metadata';
|
|
5
2
|
export { resolveCssSourceBase } from './source-resolver/postcss-source';
|
|
3
|
+
export { resolveGeneratorSource } from './source-resolver/resolve-source';
|
|
4
|
+
export { resolveGeneratorSources } from './source-resolver/resolve-sources';
|
|
5
|
+
export { resolveGeneratorSourceEntries } from './source-resolver/source-entries';
|
|
6
6
|
export type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './source-resolver/types';
|
|
7
|
-
export declare function resolveGeneratorSource(_majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@/generator").TailwindV4ResolvedSource>;
|
|
8
|
-
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
|
|
9
|
-
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<import("@/tailwindcss/source-scan").TailwindSourceEntry[] | undefined>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function normalizeEmptyTailwindCustomVariants(css: string): string;
|
|
2
|
+
export declare function filterApplyOnlyGeneratedCss(css: string, source: string, options?: {
|
|
3
|
+
preserveVariables?: boolean | undefined;
|
|
4
|
+
preferScopedRules?: boolean | undefined;
|
|
5
|
+
}): string;
|
|
6
|
+
export declare function shouldFilterApplyOnlyGeneratedCss(_majorVersion: number | undefined, target: string, source: string, options: {
|
|
7
|
+
hasGeneratedCss: boolean;
|
|
8
|
+
hasGeneratedMarkers: boolean;
|
|
9
|
+
}): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const TAILWIND_V4_GENERATOR_AT_RULES: Set<string>;
|
|
2
|
+
export declare function removeBalancedAtRuleBlock(source: string, atRuleStart: number): string;
|
|
3
|
+
export declare function removeTailwindV4GeneratorAtRulesFallback(source: string): string;
|
|
4
|
+
export declare function removeTailwindV4GeneratedUserCssArtifacts(source: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
export declare function removeTailwindV4GeneratorAtRules(source: string): string;
|
|
3
|
+
export declare function isCommentOnlyCss(source: string): boolean;
|
|
4
|
+
export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
|
|
5
|
+
export declare function removeProcessedMiniProgramUnsupportedCss(source: string, options: Partial<IStyleHandlerOptions>): string;
|
|
6
|
+
export declare function unwrapMiniProgramCascadeLayers(source: string): string;
|
|
7
|
+
export declare function collectBareSelectorUserCss(source: string): string;
|
|
8
|
+
export declare function stripTailwindSourceMediaFragments(source: string): string;
|
|
9
|
+
export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../../../types';
|
|
3
|
+
export declare function transformGeneratorUserCss(source: string, options: {
|
|
4
|
+
generatorTarget: string;
|
|
5
|
+
generatorStyleOptions: Partial<IStyleHandlerOptions>;
|
|
6
|
+
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
7
|
+
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
8
|
+
importFallback: boolean;
|
|
9
|
+
processed?: boolean | undefined;
|
|
10
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { postcss } from '@weapp-tailwindcss/postcss';
|
|
2
|
+
export declare function splitUserCssLayerBlocks(source: string): {
|
|
3
|
+
layer: string;
|
|
4
|
+
rest: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function hasUserCssLayerBlocks(source: string): boolean;
|
|
7
|
+
export declare function extractGeneratedCssForUserLayerSelectors(css: string, userLayerSource: string): {
|
|
8
|
+
layer: string;
|
|
9
|
+
rest: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function normalizeGeneratedSelector(selector: string): string;
|
|
12
|
+
export declare function collectApplyOnlySourceSelectors(source: string): Set<string>;
|
|
13
|
+
export declare function hasOnlyApplyBackedSourceRules(source: string): boolean;
|
|
14
|
+
export declare function removeCssComments(css: string): string;
|
|
15
|
+
export declare function isEmptyCustomVariantBlock(rule: postcss.AtRule): boolean;
|
|
@@ -1,33 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
|
|
7
|
-
export declare function stripTailwindSourceMediaFragments(source: string): string;
|
|
8
|
-
export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
|
|
9
|
-
export declare function splitUserCssLayerBlocks(source: string): {
|
|
10
|
-
layer: string;
|
|
11
|
-
rest: string;
|
|
12
|
-
};
|
|
13
|
-
export declare function hasUserCssLayerBlocks(source: string): boolean;
|
|
14
|
-
export declare function extractGeneratedCssForUserLayerSelectors(css: string, userLayerSource: string): {
|
|
15
|
-
layer: string;
|
|
16
|
-
rest: string;
|
|
17
|
-
};
|
|
18
|
-
export declare function normalizeEmptyTailwindCustomVariants(css: string): string;
|
|
19
|
-
export declare function filterApplyOnlyGeneratedCss(css: string, source: string, options?: {
|
|
20
|
-
preserveVariables?: boolean | undefined;
|
|
21
|
-
}): string;
|
|
22
|
-
export declare function shouldFilterApplyOnlyGeneratedCss(_majorVersion: number | undefined, target: string, source: string, options: {
|
|
23
|
-
hasGeneratedCss: boolean;
|
|
24
|
-
hasGeneratedMarkers: boolean;
|
|
25
|
-
}): boolean;
|
|
26
|
-
export declare function transformGeneratorUserCss(source: string, options: {
|
|
27
|
-
generatorTarget: string;
|
|
28
|
-
generatorStyleOptions: Partial<IStyleHandlerOptions>;
|
|
29
|
-
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
30
|
-
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
31
|
-
importFallback: boolean;
|
|
32
|
-
processed?: boolean | undefined;
|
|
33
|
-
}): Promise<string>;
|
|
1
|
+
export { filterApplyOnlyGeneratedCss, normalizeEmptyTailwindCustomVariants, shouldFilterApplyOnlyGeneratedCss } from './user-css/apply-only';
|
|
2
|
+
export { removeTailwindV4GeneratedUserCssArtifacts } from './user-css/generated-cleanup';
|
|
3
|
+
export { isCommentOnlyCss, removeMiniProgramHoverSelectors, removeTailwindV4GeneratorAtRules, stripTailwindSourceMediaFragments, stripUnmatchedTailwindSourceMediaCloseFragments } from './user-css/source-fragments';
|
|
4
|
+
export { transformGeneratorUserCss } from './user-css/transform';
|
|
5
|
+
export { extractGeneratedCssForUserLayerSelectors, hasUserCssLayerBlocks, splitUserCssLayerBlocks } from './user-css/user-layers';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css/types';
|
|
2
1
|
export { hasTailwindSourceDirectives, normalizeTailwindSourceForGenerator, removeTailwindSourceDirectives, resolveCssEntrySource, } from './generator-css/directives';
|
|
3
2
|
export { removeTailwindApplyRules, } from './generator-css/legacy-compat';
|
|
4
3
|
export { inheritLegacyUnitConvertedDeclarations, } from './generator-css/legacy-units';
|
|
5
4
|
export { isPureLocalCssImportWrapper, } from './generator-css/local-imports';
|
|
6
5
|
export { createCssAppend, hasTailwindGeneratedCss, hasTailwindGeneratedCssMarkers, removeTailwindGeneratedCssByBanner, splitGeneratorPlaceholderCssBySourceOrder, splitTailwindGeneratedCssByBanner, splitTailwindV4GeneratedCss, splitTailwindV4GeneratedCssBySourceOrder, stripGeneratorPlaceholderMarkers, stripTailwindBanner, stripTailwindBanners, } from './generator-css/markers';
|
|
6
|
+
export { generateCssByGenerator } from './generator-css/pipeline';
|
|
7
7
|
export { resolveGeneratorSource, } from './generator-css/source-resolver';
|
|
8
8
|
export type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult, } from './generator-css/types';
|
|
9
9
|
export { validateCandidatesByGenerator, } from './generator-css/validate';
|
|
10
|
-
export declare function generateCssByGenerator(options: GenerateCssByGeneratorOptions): Promise<GenerateCssByGeneratorResult | undefined>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../types';
|
|
2
3
|
export interface TailwindV4GenerationCoreInput extends GenerateCssByGeneratorOptions {
|
|
4
|
+
frameworkPostcssOwner?: InternalUserDefinedOptions | undefined;
|
|
5
|
+
frameworkPostcssStage?: 'complete' | 'pending' | undefined;
|
|
3
6
|
outputFile?: string | undefined;
|
|
4
7
|
sourceCandidates?: Set<string> | undefined;
|
|
5
8
|
}
|