astro-ghostcms/.pnpm-store/v3/files/fa/cdea2d5eafb1bbf66e999b5252e...

24 lines
783 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
import type { StringValue, NumberValue, ColorValue, Literal, AllTokens, Field, CustomProperty } from '../tokenizer/tokens.js';
export type Value = StringValue | NumberValue | ColorValue | Literal | FunctionCall | Field | CustomProperty;
export interface FunctionCall {
type: 'FunctionCall';
name: string;
arguments: CSSValue[];
}
export interface CSSValue {
type: 'CSSValue';
value: Value[];
}
export interface CSSProperty {
name?: string;
value: CSSValue[];
important: boolean;
/** Snippet matched with current property */
snippet?: any;
}
export interface ParseOptions {
/** Consumes given abbreviation tokens as value */
value?: boolean;
}
export default function parser(tokens: AllTokens[], options?: ParseOptions): CSSProperty[];