import { Viewer3d, Plugin, PluginConfig, THREE } from "@x-viewer/core"; import { BasePanel } from "@x-viewer/ui"; import { captureSceneMaterialSnapshot } from "../scene-edit/SceneMeshSnapshotUtils"; import { captureSceneTransformState } from "../scene-edit/commands/TransformSceneObjectCommand"; /** * Tree view plugin config. */ export interface PropertyPluginConfig extends Partial { /** * Container div id. */ containerId?: string; /** * If panel is visible. It is visible by default. */ visible?: boolean; } /** * Tree view plugin events. */ type PropertyPluginEvents = { /** * Panel visibility change event. */ visibilitychange: boolean; }; /** * Tree view plugin. */ export declare class PropertyPlugin extends Plugin { static readonly DEFAULT_ID = "PropertyPlugin"; protected cfg: PropertyPluginConfig; protected basePanel?: BasePanel; protected container?: HTMLDivElement; protected content?: HTMLDivElement; protected details?: HTMLDivElement; protected selectedObject: THREE.Object3D | undefined; protected lastActiveTabIdx: number; protected nodePanel?: HTMLDivElement; /** Camera / light / animation blocks; cleared on each {@link renderNode}. */ protected nodeExtrasContainer?: HTMLDivElement; protected nodeModeButtons?: { local: HTMLButtonElement; global: HTMLButtonElement; }; protected nodeInputs?: { translation: HTMLInputElement[]; rotation: HTMLInputElement[]; scale: HTMLInputElement[]; }; protected geometrySection?: HTMLDivElement; protected boundingBoxSection?: HTMLDivElement; protected boundingBoxGeometrySizeInputs?: [HTMLInputElement, HTMLInputElement, HTMLInputElement]; protected boundingBoxSizeInputs?: [HTMLInputElement, HTMLInputElement, HTMLInputElement]; /** Multi-material Material tab: selected slot index (clamped when re-rendering). */ protected materialSlotIndex: number; /** Reset material slot when the highlighted mesh changes. */ protected materialPanelMeshUuid?: string; /** Transform state captured when editing Node TRS fields (undo). */ protected propertyTransformBefore?: ReturnType; /** Material snapshot for debounced undo while editing the Material tab. */ protected materialEditBefore?: ReturnType; protected materialEditDebounce?: ReturnType; constructor(viewer: Viewer3d, cfg?: PropertyPluginConfig); private onLanguageChange; protected applyLocalizedChrome(): void; protected updateContent(): void; setVisible(visible: boolean): void; isVisible(): boolean; protected onObjectSelected: () => void; protected onObjectDeselected: () => void; protected onObjectTransformed: (object: THREE.Object3D) => void; destroy(): void; protected addContent(): void; /** * Selection can be a {@link THREE.Group} or other {@link THREE.Object3D}; the material panel * needs a concrete {@link THREE.Mesh}. Uses the first visible mesh in subtree (depth-first). */ private resolveMeshForMaterialPanel; renderTab(idx: number): void; private scheduleMaterialUndoRecord; private syncOriginalMaterialAfterDuplicate; private renderEnvironment; private renderNode; protected updateNodeInputs(target: THREE.Object3D): void; protected applyNodeInputs(target: THREE.Object3D): void; private appendGeometryAttrRow; private openGeometryAttributeViewer; private appendMeshToolButton; private runRecordedGeometryEdit; private updateMeshTools; private updateGeometryInfo; private updateBoundingBoxInfo; } export {};