weapp-tailwindcss
Version:
把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!
29 lines (28 loc) • 1.58 kB
TypeScript
import type { RefreshTailwindcssRuntimeOptions, TailwindcssRuntimeLike } from '../types/index.js';
import { invalidateRuntimeClassSet } from './runtime/cache.js';
export declare const refreshTailwindcssRuntimeSymbol: unique symbol;
export interface CollectRuntimeClassSetOptions {
force?: boolean | undefined;
skipRefresh?: boolean | undefined;
clearCache?: boolean | undefined;
}
export interface RefreshTailwindRuntimeStateOptions {
force: boolean;
clearCache?: boolean | undefined;
}
export declare function createTailwindRuntimeReadyPromise(tailwindRuntime: TailwindcssRuntimeLike): Promise<void>;
export interface TailwindRuntimeState {
tailwindRuntime: TailwindcssRuntimeLike;
readyPromise: Promise<void>;
refreshTailwindcssRuntime?: ((options?: RefreshTailwindcssRuntimeOptions) => Promise<TailwindcssRuntimeLike>) | undefined;
}
export declare function refreshTailwindRuntimeState(state: TailwindRuntimeState, forceOrOptions: boolean | RefreshTailwindRuntimeStateOptions): Promise<boolean>;
export interface EnsureRuntimeClassSetOptions {
forceRefresh?: boolean | undefined;
forceCollect?: boolean | undefined;
clearCache?: boolean | undefined;
allowEmpty?: boolean | undefined;
}
export declare function ensureRuntimeClassSet(state: TailwindRuntimeState, options?: EnsureRuntimeClassSetOptions): Promise<Set<string>>;
declare function collectRuntimeClassSet(tailwindRuntime: TailwindcssRuntimeLike, options?: CollectRuntimeClassSetOptions): Promise<Set<string>>;
export { collectRuntimeClassSet, invalidateRuntimeClassSet };