weapp-tailwindcss
Version:
把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!
59 lines (58 loc) • 2.88 kB
TypeScript
import type { RememberedCssSource } from './types.js';
export interface CssCompositionHandlerOptions {
isMainChunk?: boolean | undefined;
sourceOptions?: {
cssEntries?: string[] | undefined;
sourceFile?: string | undefined;
} | undefined;
}
export interface ResolveViteCssCompositionPlanOptions<HandlerOptions extends CssCompositionHandlerOptions> {
assetSourceFile: string;
configuredSourceFileKeys: ReadonlySet<string>;
cssEntries: string[] | undefined;
cssMatcher: (file: string) => boolean;
explicitSourceFileKeys: ReadonlySet<string>;
file: string;
getCssHandlerOptions: (file: string) => HandlerOptions;
getOriginalCssLayerSource: ((file: string) => string | undefined) | undefined;
isRootStyleOutputFile: (file: string) => boolean;
isWebGeneratorTarget: boolean;
normalizeConfiguredSourceFile: (file: string) => string;
normalizeGeneratorSource: (source: string, outputFile: string) => string;
normalizeGeneratorUserSource: (source: string, sourceFile: string, fallbackFile: string) => string;
outputCssHandlerOptions: HandlerOptions;
outputFile: string;
rawSource: string;
rememberedSources: RememberedCssSource[];
resolveConfiguredRootInjectionTarget: (sourceFile: string, outputFile: string) => string | undefined;
resolveMatchedOutputFile: (sourceFile: string) => string | undefined;
resolvedFromTemporarySource: boolean;
rootImportShellOutputFile: string;
shouldKeepImportedCssShell: boolean;
shouldKeepRootImportShell: boolean;
shouldMoveRootImportShellToOrigin: boolean;
shouldSkipRememberedSource: (source: RememberedCssSource) => boolean;
viteProcessedCssAsset: boolean;
}
export interface ViteCssCompositionPlan<HandlerOptions extends CssCompositionHandlerOptions> {
cssHandlerOptions: HandlerOptions;
generatorCssHandlerOptions: HandlerOptions;
generatorRawSource: string;
generatorSourceFile: string;
generatorUserLayerRawSource: string | undefined;
hasCurrentTailwindGenerationDirective: boolean;
hasRememberedApplySource: boolean;
hasSameOutputRememberedTailwindGenerationSource: boolean;
hasStaleViteProcessedCssSource: boolean;
outputCssHandlerOptions: HandlerOptions;
outputFile: string;
preserveImportedCssShell: boolean;
rememberedSource: RememberedCssSource | undefined;
rememberedSources: RememberedCssSource[];
rootImportShellTarget: string | undefined;
usedConfiguredSourceFile: string | undefined;
usesConfiguredTailwindV4FallbackSource: boolean;
vitePipelineCssAsset: boolean;
webviewRootCssInjectionTarget: string | undefined;
}
export declare function resolveViteCssCompositionPlan<HandlerOptions extends CssCompositionHandlerOptions>(options: ResolveViteCssCompositionPlanOptions<HandlerOptions>): ViteCssCompositionPlan<HandlerOptions>;