import type { Annotation, PinAdapter, PinCoordinates } from '@superviz/sdk'; import type { Observer as ObserverType } from '@superviz/sdk/dist/common/utils/observer'; import type { MpSdk as Matterport } from '../common/types/matterport.types'; import { ParticipantByGroupApi } from './types'; export declare class MatterportPin implements PinAdapter { private logger; private isPinsVisible; private isActive; private annotations; private pins; private matterportSdk; private cameraPose; private intersection; private intersectionObserver; private showcaseDiv; private showcaseSides; private divWrapper; private inputComponent; private temporaryPinCoordinates; private divWrapperReplacementInterval; private isSweeping; onPinFixedObserver: ObserverType; private commentsSide; private selectedPin; private participants; constructor(matterportSdk: Matterport, showcase: HTMLElement); /** * @function destroy * @description destroys the canvas pin adapter. * @returns {void} * */ destroy(): void; /** * @function setActive * @param {boolean} isOpen - Whether the canvas pin adapter is active or not. * @returns {void} */ setActive(isOpen: boolean): void; setPinsVisibility(isVisible: boolean): void; /** * @function updateAnnotations * @description updates the annotations of the canvas. * @param {Annotation[]} annotations - New annotation to be added to the canvas. * @returns {void} */ updateAnnotations(annotations: Annotation[]): void; /** * @function removeAnnotationPin * @description Removes an annotation pin from the canvas. * @param {string} uuid - The uuid of the annotation to be removed. * @returns {void} * */ removeAnnotationPin(uuid: string): void; /** * @function createTemporaryPin * @description creates a temporary pin with the id temporary-pin to mark where the annotation is being created * @param {PinCoordinates} coordinates - The coordinates of the pin to be created. */ createTemporaryPin(coordinates: PinCoordinates): void; /** * @function addListeners * @description adds event listeners to the canvas element. * @returns {void} */ private addListeners; /** * @function removeListeners * @description removes event listeners from the canvas element. * @returns {void} * */ private removeListeners; /** * @function renderAnnotationsPins * @description Renders the annotations on the canvas. * @returns {void} */ private renderAnnotationsPins; /** * @function setCommentsMetadata * @description sets the necessary data to be used by the pin element * @param {string} side - The side of the comments sidebar * @param {string} avatar - The avatar of the local user */ setCommentsMetadata: (side: "left" | "right") => void; /** * @function createPin * @description creates a temporary the actual pin * @param {Annotation} annotation - The annotation saved in the database * @param {PinCoordinates} coordinates - The coordinates of the pin to be created. */ private createPin; private removeAnnotationsPins; private hideTemporaryPin; /** * @function participantsList * @description - all participants of developer groupId * @param participants - all participants list */ set participantsList(participants: ParticipantByGroupApi[]); /** * @function resetSelectedPin * @description Unselects a pin by removing its 'active' attribute * @returns {void} * */ private resetSelectedPin; /** * @function resetPins * @description Unselects selected pin and removes temporary pin. * @param {that} this - The canvas pin adapter instance. * @param {KeyboardEvent} event - The keyboard event object. * @returns {void} * */ private resetPins; /** Callbacks */ private annotationSelected; private moveToSweep; /** * @function onClick * @description callback when user clicked on iframe * @returns {void} * */ onClick: () => void; /** * @function createDivWrapper * @description Creates a div wrapper for the pins. * @returns {HTMLElement} The newly created div wrapper. * */ private createDivWrapper; /** * @function createInputListener * @description create matterport click input listener * @returns {void} * */ private createInputListener; /** * @function position3DToScreen * @description translates a 3D coordinate to a 2D screen position * @returns 2D screen coordinate * */ private position3DToScreen; /** * @function checkIsVisible * @description check if a pin is in the cameras view * @returns boolean * */ private checkIsVisible; private onToggleAnnotationSidebar; }