import { Point } from '../maths/point/Point';
import { ViewContainer, type ViewContainerOptions } from '../scene/view/ViewContainer';
import type { PointData } from '../maths/point/PointData';
/**
* Options for configuring a {@link DOMContainer}.
* Controls how DOM elements are integrated into the PixiJS scene graph.
* @example
* ```ts
* // Create with a custom element
* const domContainer = new DOMContainer({
* element: document.createElement('input'),
* anchor: { x: 0.5, y: 0.5 } // or anchor: 0.5 to center both x and y
* });
* ```
* @category scene
* @standard
* @noInheritDoc
*/
export interface DOMContainerOptions extends ViewContainerOptions {
/**
* The DOM element to use for the container.
* Can be any HTML element like div, input, textarea, etc.
*
* If not provided, creates a new div element.
* @default document.createElement('div')
*/
element?: HTMLElement;
/**
* The anchor point of the container.
* - Can be a single number to set both x and y
* - Can be a point-like object with x,y coordinates
* - (0,0) is top-left
* - (1,1) is bottom-right
* - (0.5,0.5) is center
* @default 0
*/
anchor?: PointData | number;
}
/**
* The DOMContainer object is used to render DOM elements within the PixiJS scene graph.
* It allows you to integrate HTML elements into your PixiJS application while maintaining
* proper transform hierarchy and visibility.
*
* DOMContainer is especially useful for rendering standard DOM elements
* that handle user input, such as `` or `