import { type Container, type Graphics } from 'pixi.js'; import { type Key, type Ref } from 'react'; import { type PixiToReactEventPropNames } from '../constants/EventPropNames'; import { type ConstructorOptions } from './ConstructorOptions'; import { type DrawCallback } from './DrawCallback'; import { type EventHandlers } from './EventHandlers'; import { type InstanceState } from './InstanceState'; import { type PixiReactChildNode } from './PixiReactChildNode'; import { type ExcludeFunctionProps, type OmitKeys } from './UtilityTypes'; export interface BaseNodeProps any = typeof Container> { children?: T extends Container ? PixiReactChildNode : never; key?: Key; ref?: Ref; } export type GraphicsProps = T extends Graphics ? { draw: DrawCallback; } : unknown; export interface NodeProps any = typeof Container> extends BaseNodeProps { __pixireact: InstanceState; parent?: PixiReactNode; } export type PixiReactNode any = typeof Container> = NodeProps> & EventHandlers & { [K in keyof InstanceType as K]: K extends keyof NodeProps> ? NodeProps>[K] : InstanceType[K]; }; export type PixiReactElementProps any = typeof Container> = BaseNodeProps> & GraphicsProps> & OmitKeys>, NodeProps & typeof PixiToReactEventPropNames> & EventHandlers;