import type { ExpressionValue, Location, WYWEvalMeta } from '@wyw-in-js/shared'; import type { Expression, Identifier, MemberExpression, TemplateElement } from './ast.js'; export type CSSPropertyValue = string | number; export type ObjectWithSelectors = { [key: string]: ObjectWithSelectors | CSSPropertyValue | (ObjectWithSelectors | CSSPropertyValue)[]; }; export type CSSable = ObjectWithSelectors[string]; export type Value = (() => void) | WYWEvalMeta | CSSable; export type ValueCache = Map; export interface ICSSRule { atom?: boolean; className: string; cssText: string; displayName: string; start: Location | null | undefined; } export interface IInterpolation { id: string; node: Expression; source: string; unit: string; } export type ProcessorDiagnosticSeverity = 'error' | 'warning'; export type ProcessorDiagnostic = { category: string; end?: Location | null; message: string; severity: ProcessorDiagnosticSeverity; start?: Location | null; }; export type Rules = Record; export type CalleeParam = readonly ['callee', Identifier | MemberExpression]; export type CallParam = readonly ['call', ...ExpressionValue[]]; export type MemberParam = readonly ['member', string]; export type TemplateParam = readonly [ 'template', (TemplateElement | ExpressionValue)[] ]; export type Param = CalleeParam | CallParam | MemberParam | TemplateParam; export type Params = readonly Param[];