import type { SourceLocation } from 'sfc-composer' import type { ASTNode, namedTypes } from 'ast-types' import type { NodePath } from 'ast-types/lib/node-path' import type { PathMatch, PropMatch } from '@pinceau/core' import type { ComputedStyleContext } from './computed-styles' import type { Variants } from './variants' import type { SupportedHTMLElements } from './dom-elements' export type CSSFunctionArgAST = NodePath & ASTNode & { loc: namedTypes.SourceLocation } export interface RuntimeParts { staticClass?: string computedStyles?: string | undefined variants?: string | undefined propNames?: string[] } export interface PinceauStyleFunctionContext { // Source id: string type: 'css' | 'styled' | '$styled' element?: SupportedHTMLElements helpers: ('withVariants' | 'withAttrs' | 'withProps')[] pointer: string callee: PathMatch | PropMatch arg: CSSFunctionArgAST loc: SourceLocation declaration: any // Compiled className?: string css: string propNames: string[] variants: Variants localTokens: { [key: string]: NodePath & ASTNode } computedStyles: ComputedStyleContext[] applied: { static: boolean runtime: boolean } }