UNPKG

@pmndrs/uikit

Version:

Build performant 3D user interfaces with Three.js and yoga.

28 lines (27 loc) 1.66 kB
import { ReadonlySignal, Signal } from '@preact/signals-core'; import { Matrix4 } from 'three'; import { ClippingRect } from '../../clipping.js'; import { OrderInfo } from '../../order.js'; import { PanelProperties } from '../../panel/instance/panel.js'; import { ColorRepresentation } from '../../utils.js'; import { PanelGroupProperties } from '../../panel/instance/index.js'; import { Properties } from '../../properties/index.js'; import { RootContext } from '../../context.js'; import { type AbsoluteLengthValue } from '../../properties/values.js'; import type { CaretTransformation } from '../layout/index.js'; export type { CaretTransformation } from '../layout/index.js'; type CaretWidthProperties = { caretWidth?: AbsoluteLengthValue; }; type CaretBorderSizeProperties = { caretBorderRightWidth?: AbsoluteLengthValue; caretBorderTopWidth?: AbsoluteLengthValue; caretBorderLeftWidth?: AbsoluteLengthValue; caretBorderBottomWidth?: AbsoluteLengthValue; }; export type CaretProperties = { caretColor?: ColorRepresentation; } & CaretWidthProperties & CaretBorderSizeProperties & { [Key in Exclude<keyof PanelProperties, 'opacity'> as `caret${Capitalize<Key>}`]?: PanelProperties[Key]; }; export declare function setupCaret(properties: Properties, globalMatrix: Signal<Matrix4 | undefined>, caretTransformation: ReadonlySignal<CaretTransformation | undefined>, isVisible: Signal<boolean>, parentOrderInfo: Signal<OrderInfo | undefined>, parentGroupDeps: ReadonlySignal<Required<PanelGroupProperties>>, parentClippingRect: Signal<ClippingRect | undefined> | undefined, root: Signal<RootContext>, abortSignal: AbortSignal): void;