Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

UnoGenerator

class UnoGenerator<Theme extends {} = {}> {
constructor(userConfig?: UserConfig<Theme>, defaults?: UserConfigDefaults<Theme>);
private _cache;
private applyVariants;
blocked: Set<string>;
config: ResolvedConfig<Theme>;
defaults: UserConfigDefaults<Theme>;
events: Emitter<{
config: (config: ResolvedConfig<Theme>) => void;
}
>
;
parentOrders: Map<string, number>;
userConfig: UserConfig<Theme>;
version: string;
 
applyExtractors(
code: string,
id?: string,
set?: Set<string>,
): Promise<Set<string>>;
constructCustomCSS(
context: Readonly<RuleContext<Theme>>,
overrideSelector?: string,
): string;
expandShortcut(
input: string,
context: RuleContext<Theme>,
depth?: number,
): [ShortcutValue[], RuleMeta | undefined] | undefined;
generate(input: string | Set<string> | string[], options?: GenerateOptions): Promise<GenerateResult>;
isBlocked(raw: string): boolean;
makeContext(raw: string, applied: VariantMatchedResult<Theme>): RuleContext<Theme>;
matchVariants(raw: string, current?: string): VariantMatchedResult<Theme>;
parseToken(raw: string, alias?: string): Promise<StringifiedUtil<Theme>[] | null | undefined>;
parseUtil(
input: string | VariantMatchedResult<Theme>,
context: RuleContext<Theme>,
internal?: boolean,
shortcutPrefix?: string | string[] | undefined,
): Promise<(ParsedUtil | RawUtil)[] | undefined>;
setConfig(userConfig?: UserConfig<Theme>, defaults?: UserConfigDefaults<Theme>): void;
stringifyShortcuts(
parent: VariantMatchedResult<Theme>,
context: RuleContext<Theme>,
expanded: ShortcutValue[],
meta?: RuleMeta,
): Promise<StringifiedUtil<Theme>[] | undefined>;
stringifyUtil(parsed?: ParsedUtil | RawUtil, context?: RuleContext<Theme>): StringifiedUtil<Theme> | undefined;
}

§Type Parameters

§
Theme extends {} = {}
[src]

§Constructors

§
new UnoGenerator(userConfig?: UserConfig<Theme>, defaults?: UserConfigDefaults<Theme>)
[src]

§Properties

§
_cache
[src]
§
applyVariants
[src]
§
blocked: Set<string>
[src]
§
config: ResolvedConfig<Theme>
[src]
§
defaults: UserConfigDefaults<Theme>
[src]
§
events: Emitter<{
config: (config: ResolvedConfig<Theme>) => void;
}
>
[src]
§
parentOrders: Map<string, number>
[src]
§
userConfig: UserConfig<Theme>
[src]
§
version: string
[src]

§Methods

§
applyExtractors(code: string, id?: string, set?: Set<string>): Promise<Set<string>>
[src]
§
constructCustomCSS(context: Readonly<RuleContext<Theme>>, body: CSSObject | CSSEntries, overrideSelector?: string): string
[src]
§
expandShortcut(input: string, context: RuleContext<Theme>, depth?: number): [ShortcutValue[], RuleMeta | undefined] | undefined
[src]
§
generate(input: string | Set<string> | string[], options?: GenerateOptions): Promise<GenerateResult>
[src]
§
isBlocked(raw: string): boolean
[src]
§
makeContext(raw: string, applied: VariantMatchedResult<Theme>): RuleContext<Theme>
[src]
§
matchVariants(raw: string, current?: string): VariantMatchedResult<Theme>
[src]
§
parseToken(raw: string, alias?: string): Promise<StringifiedUtil<Theme>[] | null | undefined>
[src]
§
parseUtil(input: string | VariantMatchedResult<Theme>, context: RuleContext<Theme>, internal?: boolean, shortcutPrefix?: string | string[] | undefined): Promise<(ParsedUtil | RawUtil)[] | undefined>
[src]
§
setConfig(userConfig?: UserConfig<Theme>, defaults?: UserConfigDefaults<Theme>): void
[src]
§
stringifyShortcuts(parent: VariantMatchedResult<Theme>, context: RuleContext<Theme>, expanded: ShortcutValue[], meta?: RuleMeta): Promise<StringifiedUtil<Theme>[] | undefined>
[src]
§
stringifyUtil(parsed?: ParsedUtil | RawUtil, context?: RuleContext<Theme>): StringifiedUtil<Theme> | undefined
[src]