import type * as CSS from 'csstype'; import type { IOps, IScheduler, IStream, ITask } from '../stream/index.js'; import type { SettableDisposable } from '../stream/utils/SettableDisposable.js'; export type IStyleCSS = CSS.Properties; export type IAttributeProperties = { [P in keyof T]: string | number | boolean | null | undefined; }; export interface ITextNode { kind: 'text'; value: string | IStream | null; } export interface ISlottable { element: TElement; disposable: SettableDisposable; } export type ISlotChild = ITextNode | ISlottable | null; export interface IStaticStyleEntry { pseudo: string | null; style: IStyleCSS; } export interface INode extends ISlottable { $segments: I$Slottable[]; staticStyles: IStaticStyleEntry[]; styleBehavior: IStream[]; styleInline: IStream[]; propBehavior: Array<{ key: string; value: IStream; }>; attributes: any; attributesBehavior: IStream[]; } export type I$Slottable = IStream>; export type I$Node = IStream>; export type I$Op = IOps, INode>; export interface IMutator { (source: I$Node): I$Node; __mutate: (node: INode) => INode; } export interface INodeCompose { (): I$Node; (op1: I$Op, ...ops: I$Op[]): INodeCompose; (...$leafs: Array | I$Node>): I$Node; } export type I$Text = IStream; export interface I$Scheduler extends IScheduler { paint(task: ITask): Disposable; } export type IOutputTethers = { [P in keyof A]?: IOps; }; export type IComponentBehavior = { [P in keyof T]: IStream; };