@ericchen1990/pano-view 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, ComponentPropsWithoutRef, IframeHTMLAttributes, RefObject } from 'react';
2
+ import { CSSProperties, ReactNode, Ref, RefObject, ComponentPropsWithoutRef, IframeHTMLAttributes, ComponentProps } from 'react';
3
3
  import { Texture, ColorRepresentation, Vector3 } from 'three';
4
4
 
5
5
  /** Camera-center limits in degrees. A yaw min greater than max crosses ±180°. */
@@ -34,6 +34,7 @@ type HotspotPosition = {
34
34
  type HotspotMode = "surface" | "billboard";
35
35
  /** Whether a hotspot grows with panorama zoom or preserves its screen size. */
36
36
  type HotspotScaleMode = "fov" | "fixed";
37
+ type HotspotTooltipScaleMode = "inherit" | HotspotScaleMode;
37
38
  type HotspotInputSource = "pointer" | "keyboard";
38
39
  type HotspotInteractionEvent = {
39
40
  id: string;
@@ -87,6 +88,10 @@ type HotspotCommonProps = {
87
88
  tooltipTrigger?: HotspotTooltipTrigger;
88
89
  /** Screen direction for the tooltip. Defaults to `"top"`. */
89
90
  tooltipPlacement?: HotspotTooltipPlacement;
91
+ /** Defaults to billboard, independently of the hotspot orientation. */
92
+ tooltipMode?: HotspotMode;
93
+ /** Defaults to inherit. Surface tooltips always scale with FOV. */
94
+ tooltipScaleMode?: HotspotTooltipScaleMode;
90
95
  /**
91
96
  * Screen-space gap in CSS pixels between the hotspot edge and the tooltip.
92
97
  * Defaults to 12.
@@ -107,9 +112,9 @@ type HotspotCommonProps = {
107
112
  * when needed so the full hotspot remains inside the panorama shell.
108
113
  */
109
114
  distance?: number;
110
- /** FOV grows/shrinks with zoom; fixed preserves the reference screen size. */
115
+ /** Billboard defaults to fixed. Surface always uses fov, ignoring fixed. */
111
116
  scaleMode?: HotspotScaleMode;
112
- /** Reference FOV in degrees used when scaleMode is "fixed". Defaults to 75. */
117
+ /** Reference FOV for fixed hotspot size and tooltip styling. Defaults to 75. */
113
118
  referenceFov?: number;
114
119
  /** Clockwise rotation around the hotspot normal in degrees. */
115
120
  rotation?: number;
@@ -234,6 +239,34 @@ declare function cycleSceneId(scenes: readonly {
234
239
  */
235
240
  declare function KeyboardControls({ enabled, keys, rotateSpeed, zoomSpeed, shiftMultiplier, invert, fovSpeed, onPreviousScene, onNextScene, }: KeyboardControlsProps): null;
236
241
 
242
+ type PanoSpatialControlAdapter = {
243
+ /** Degrees. Update the existing model viewing controls, not the panorama camera. */
244
+ rotateBy?: (yaw: number, pitch: number) => void;
245
+ /** Multiplicative viewing scale; values above one zoom in. */
246
+ zoomBy?: (factor: number) => void;
247
+ resetView?: () => void;
248
+ canExecute?: (action: string) => boolean;
249
+ /** Canvas frames must be copied after the host renderer finishes rendering. */
250
+ subscribeFrame?: (invalidate: () => void) => () => void;
251
+ /** A texture must belong to this viewer's WebGL context. */
252
+ texture?: Texture;
253
+ };
254
+
255
+ type PanoMediaController = Pick<PanoVideoController, "subscribe" | "play" | "pause" | "seek" | "setVolume" | "setMuted"> & {
256
+ getSnapshot: () => Pick<PanoVideoPlaybackSnapshot, "ready" | "playing" | "currentTime" | "duration" | "volume" | "volumeAdjustable" | "muted">;
257
+ };
258
+ type PanoControlAction = {
259
+ id: string;
260
+ label: string;
261
+ icon?: ReactNode;
262
+ disabled?: boolean;
263
+ enabled?: () => boolean;
264
+ activate?: () => void;
265
+ update?: (seconds: number) => void;
266
+ repeatIntervalMs?: number;
267
+ end?: () => void;
268
+ };
269
+
237
270
  type VideoPlaybackState = "playing" | "paused" | "ended" | "blocked";
238
271
  type VideoHotspotErrorEvent = {
239
272
  id: string;
@@ -241,6 +274,7 @@ type VideoHotspotErrorEvent = {
241
274
  error: unknown;
242
275
  };
243
276
  type VideoHotspotProps = HotspotCommonProps & {
277
+ ref?: Ref<PanoMediaController>;
244
278
  src: string;
245
279
  playing: boolean;
246
280
  poster?: string;
@@ -259,7 +293,7 @@ type VideoHotspotProps = HotspotCommonProps & {
259
293
  onEnded?: () => void;
260
294
  onError?: (event: VideoHotspotErrorEvent) => void;
261
295
  };
262
- declare function VideoHotspot({ id, src, playing, poster, loop, muted, volume, playsInline, preload, crossOrigin, width, height, opacity, onPlaybackStateChange, onPlaybackError, onEnded, onError, ...anchorProps }: VideoHotspotProps): react.JSX.Element;
296
+ declare function VideoHotspot({ ref, id, src, playing, poster, loop, muted, volume, playsInline, preload, crossOrigin, width, height, opacity, onPlaybackStateChange, onPlaybackError, onEnded, onError, ...anchorProps }: VideoHotspotProps): react.JSX.Element;
263
297
 
264
298
  type PanoVideoSource = {
265
299
  src: string;
@@ -451,7 +485,8 @@ type WebVRProps = {
451
485
  wakelock?: boolean;
452
486
  /**
453
487
  * Lock the mouse in simulated desktop VR so movement looks around with
454
- * no visible cursor. Click the view to re-lock after Escape. Defaults to true.
488
+ * no visible cursor. Right-click to release; left-click the view to re-lock.
489
+ * While unlocked, the reticle and gaze actions are paused. Defaults to true.
455
490
  */
456
491
  mousePointerLock?: boolean;
457
492
  onAvailable?: () => void;
@@ -471,7 +506,7 @@ type WebVRHandle = {
471
506
  getState: () => WebVRState;
472
507
  subscribe: (onStoreChange: () => void) => () => void;
473
508
  requestPermission: () => Promise<boolean>;
474
- /** Clear stored MobileVR settings and restore prop / built-in defaults. */
509
+ /** Reset the active fallback mode, or both modes outside VR; explicit props still apply. */
475
510
  resetSettings: () => void;
476
511
  };
477
512
  type WebVRSettings = {
@@ -837,7 +872,9 @@ type PanoOverlayProps = {
837
872
  /**
838
873
  * Screen-plane DOM UI for PanoViewer. Place it as a direct child of PanoViewer
839
874
  * (or inside a Fragment under PanoViewer). It stays outside the panorama sphere
840
- * and remains visible in fullscreen. Interactive children need `pointerEvents: "auto"`.
875
+ * and remains visible in fullscreen, but is hidden during VR sessions. Dialogs
876
+ * portaled to the viewer host can still render spatially. Interactive children
877
+ * need `pointerEvents: "auto"`.
841
878
  */
842
879
  declare function PanoOverlay({ children }: PanoOverlayProps): react.JSX.Element;
843
880
  /** Read inside PanoOverlay, renderOverlay, or their DOM descendants. */
@@ -849,6 +886,61 @@ declare function PanoOverlayPortalProvider({ container, children, }: {
849
886
  container: HTMLDivElement | null;
850
887
  children: ReactNode;
851
888
  }): react.JSX.Element;
889
+ /** Shared portal/ref adapter for package and third-party dialogs. */
890
+ declare function usePanoDialogSurface({ open, onOpenChange, scrollTargetRef, }: {
891
+ open: boolean;
892
+ onOpenChange: (open: boolean) => void;
893
+ scrollTargetRef?: RefObject<HTMLElement | null>;
894
+ }): {
895
+ presentation: "screen" | "spatial";
896
+ contentRef: (node: HTMLElement | null) => void;
897
+ onInteractOutside: (event: {
898
+ detail: {
899
+ originalEvent: Event;
900
+ };
901
+ preventDefault: () => void;
902
+ }) => void;
903
+ visibleRect: {
904
+ left: number;
905
+ top: number;
906
+ width: number;
907
+ height: number;
908
+ };
909
+ /** Stable viewer-local portal target; null until the DOM has mounted. */
910
+ portalContainer: HTMLDivElement | null;
911
+ /** Available viewer space in CSS pixels, independent of nested portal targets. */
912
+ size: {
913
+ width: number;
914
+ height: number;
915
+ };
916
+ isFullscreen: boolean;
917
+ };
918
+ declare function usePanoSpatialControls(ref: RefObject<HTMLElement | null>, adapter: PanoSpatialControlAdapter): void;
919
+ /** @internal Shared by ESM/CJS dialog parts; owned by the viewer runtime. */
920
+ declare const PanoDialogSurfaceContext: react.Context<{
921
+ presentation: "screen" | "spatial";
922
+ contentRef: (node: HTMLElement | null) => void;
923
+ onInteractOutside: (event: {
924
+ detail: {
925
+ originalEvent: Event;
926
+ };
927
+ preventDefault: () => void;
928
+ }) => void;
929
+ visibleRect: {
930
+ left: number;
931
+ top: number;
932
+ width: number;
933
+ height: number;
934
+ };
935
+ /** Stable viewer-local portal target; null until the DOM has mounted. */
936
+ portalContainer: HTMLDivElement | null;
937
+ /** Available viewer space in CSS pixels, independent of nested portal targets. */
938
+ size: {
939
+ width: number;
940
+ height: number;
941
+ };
942
+ isFullscreen: boolean;
943
+ } | null>;
852
944
 
853
945
  type PanoViewerProps = Omit<ComponentPropsWithoutRef<"div">, "children" | "onChange" | "contextMenu"> & {
854
946
  children?: ReactNode;
@@ -888,7 +980,7 @@ type PanoViewerProps = Omit<ComponentPropsWithoutRef<"div">, "children" | "onCha
888
980
  /** Canvas pixel ratio. Defaults to a capped range of 1–2. */
889
981
  dpr?: number | [number, number];
890
982
  };
891
- declare const PanoViewer: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onChange" | "contextMenu"> & {
983
+ declare const PanoViewer: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "contextMenu" | "onChange"> & {
892
984
  children?: ReactNode;
893
985
  /** Viewer-local DOM UI, rendered outside the Three.js tree, including in fullscreen. */
894
986
  renderOverlay?: (context: PanoOverlayRenderContext) => ReactNode;
@@ -1353,6 +1445,10 @@ type HotspotDefinitionBase = {
1353
1445
  tooltip?: string | HotspotTooltipContent;
1354
1446
  tooltipTrigger?: HotspotTooltipTrigger;
1355
1447
  tooltipPlacement?: HotspotTooltipPlacement;
1448
+ /** Defaults to billboard, independently of the hotspot orientation. */
1449
+ tooltipMode?: HotspotMode;
1450
+ /** Defaults to inherit. Surface tooltips always scale with FOV. */
1451
+ tooltipScaleMode?: HotspotTooltipScaleMode;
1356
1452
  tooltipOffset?: number;
1357
1453
  tooltipAppearance?: HotspotTooltipAppearance;
1358
1454
  };
@@ -2484,4 +2580,47 @@ declare function containerPointToImage(point: MapPoint, viewport: MapViewport):
2484
2580
  /** Clockwise degrees from image up for a vector in container space. */
2485
2581
  declare function headingFromVector(dx: number, dy: number): number;
2486
2582
 
2487
- export { type ArrowGraphic, type AssetUrlContext, type AssetUrlResolver, AudioHotspot, type AudioHotspotDefinition, type AudioHotspotErrorEvent, type AudioHotspotProps, type AudioPlaybackState, AutoRotate, type AutoRotateProps, BackgroundAudio, type BackgroundAudioController, type BackgroundAudioErrorEvent, type BackgroundAudioProps, type BackgroundAudioSnapshot, type BackgroundAudioSource, type CircleGraphic, type CubeFaceCode, type CubemapViewerConfig, DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE, DEFAULT_HOTSPOT_TOOLTIP_OFFSET, DEFAULT_PANO_CURSORS, DEFAULT_PANO_SCENE_MENU_APPEARANCE, DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE, DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE, DEFAULT_PANO_VIDEO_PLAYBACK_RATES, DEFAULT_WEBVR_CHROME_APPEARANCE, DEFAULT_WEBVR_CURSOR_DWELL_MS, type DiamondGraphic, EMPTY_WEBVR_STATE, type GraphicDefinition, GraphicHotspot, type GraphicHotspotDefinition, type GraphicHotspotProps, Gyro, type GyroHandle, type GyroProps, type GyroTouchMode, type HotspotCommonProps, type HotspotDefinition, type HotspotDefinitionBase, type HotspotDragEvent, type HotspotInputSource, type HotspotInteractionEvent, type HotspotMode, type HotspotPointerEvents, type HotspotPosition, type HotspotScaleMode, type HotspotTooltipAppearance, type HotspotTooltipContent, type HotspotTooltipPlacement, type HotspotTooltipTrigger, IframeHotspot, type IframeHotspotDefinition, type IframeHotspotProps, type IframePointerPolicy, ImageHotspot, type ImageHotspotDefinition, type ImageHotspotProps, type JsonObject, type JsonRequestOptions, type JsonValue, type KeyboardControlAction, type KeyboardControlKeys, KeyboardControls, type KeyboardControlsProps, type LoadPanoProjectOptions, type LoadSceneFromJsonOptions, type LoadedPanoProject, type LoadedProjectScene, MAX_HOTSPOT_PITCH, MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY, type MouseControlButton, MouseControls, type MouseControlsOptions, type MouseControlsProps, PANO_FILTER_PRESETS, PANO_OVERLAY_ALIGNS, type PanoColorMatrix, PanoContextMenu, type PanoContextMenuActionItem, type PanoContextMenuAppearance, type PanoContextMenuEntry, type PanoContextMenuItem, type PanoContextMenuPresetActions, type PanoContextMenuPresetId, type PanoContextMenuPresetRef, type PanoContextMenuPresets, type PanoContextMenuProps, type PanoContextMenuRenderProps, type PanoContextMenuSelectContext, type PanoContextMenuSeparatorItem, type PanoCursor, type PanoCursors, PanoDataError, type PanoDataErrorCode, type PanoDragMotion, type PanoEventBus, type PanoEventListener, type PanoEventMap, type PanoEventType, PanoEvents, type PanoEventsProps, PanoFilter, type PanoFilterPreset, type PanoFilterProps, PanoMap, type PanoMapControlsDefinition, type PanoMapDefinition, type PanoMapDialogPresentation, type PanoMapEditChange, type PanoMapGradientStop, PanoMapOverlay, type PanoMapOverlayProps, type PanoMapPanelPresentation, type PanoMapPresentation, type PanoMapProps, type PanoMapSectorDefinition, type PanoMapSectorGradient, type PanoMapSpotDefinition, type PanoMediaActivationControls, type PanoMediaActivationOptions, PanoOverlay, type PanoOverlayAlign, type PanoOverlayAnchor, type PanoOverlayAxis, type PanoOverlayChevron, type PanoOverlayCollapseEdge, type PanoOverlayContentAlign, type PanoOverlayInset, PanoOverlayPortalProvider, type PanoOverlayProps, type PanoOverlayRenderContext, type PanoOverlayToggle, type PanoOverlayToggleState, type PanoProjectDefinition, type PanoProjectSceneDefinition, type PanoResizeEvent, PanoSceneMenu, type PanoSceneMenuAppearance, type PanoSceneMenuItem, type PanoSceneMenuLabelAlign, type PanoSceneMenuProps, PanoVideo, type PanoVideoCaptionAppearance, type PanoVideoController, PanoVideoControls, type PanoVideoControlsAppearance, type PanoVideoControlsProps, type PanoVideoErrorEvent, type PanoVideoErrorSource, type PanoVideoPlaybackSnapshot, type PanoVideoProps, type PanoVideoSource, type PanoVideoTrack, type PanoVideoTrackKind, type PanoVideoVariant, type PanoViewEasing, type PanoViewLimits, type PanoViewLookToOptions, type PanoViewNavigationOptions, type PanoViewNavigationResult, PanoViewer, type PanoViewerHandle, type PanoViewerProps, type PanoViewerState, type PanoWheelEvent, type PanoramaControlsOptions, type PanoramaPointerEvent, type PointHotspotDefinition, type PointHotspotDefinitionBase, PolygonHotspot, type PolygonHotspotDefinition, type PolygonHotspotProps, type PolygonValidationCode, type PolygonValidationIssue, type PolygonVerticesChangeEvent, PolylineHotspot, type PolylineHotspotDefinition, type PolylineHotspotProps, type PolylineValidationIssue, type PolylineVerticesChangeEvent, type PopupAssetUrlContext, type PopupAssetUrlResolver, type ProjectCustomActionEvent, type ProjectCustomHotspotAction, type ProjectHotspotAction, type ProjectHotspotClickEvent, type ProjectHotspotDefinition, type ProjectHotspotErrorEvent, type ProjectHotspotEvent, type ProjectHotspotRenderContext, type ProjectHotspotTrigger, type ProjectPopupBlock, type ProjectPopupDefinition, type ProjectPopupRequestEvent, ProjectScenes, type ProjectScenesProps, type RectangleGraphic, type ResolvedOverlayAnchor, type RingGraphic, type Scene, type SceneFromViewerConfigOptions, type SceneTransition, type SceneTransitionEndEvent, type SceneTransitionErrorEvent, type SceneTransitionPreset, Scenes, type ScenesController, type ScenesProps, type SequenceFrameDirection, type SequenceFrameEvent, SequenceHotspot, type SequenceHotspotDefinition, type SequenceHotspotErrorEvent, type SequenceHotspotProps, type SequenceLoadProgress, type SequencePlaybackState, type SetPanoViewerOptions, Sphere, type SphereProps, type SphereScene, SphereTile, type SphereTileAddress, type SphereTileLevel, type SphereTileLoadError, type SphereTileMultiresConfig, type SphereTileProps, type SphereTileScene, type SphereViewerConfig, type StarGraphic, type SvgGraphic, type SvgPathGraphic, TextHotspot, type TextHotspotAlign, type TextHotspotDefinition, type TextHotspotFontStyle, type TextHotspotProps, type TextHotspotStyle, type TextHotspotVerticalAlign, type TextHotspotWhiteSpace, Tile, type TileAddress, type TileLoadError, type TileLoadProgress, type TileMultiresConfig, type TileProps, type TileScene, TouchControls, type TouchControlsOptions, type TouchControlsProps, type TriangleGraphic, type UsePanoViewerResult, VideoHotspot, type VideoHotspotDefinition, type VideoHotspotErrorEvent, type VideoHotspotProps, type VideoPlaybackState, type ViewInteractionEvent, type ViewInteractionSource, type ViewerConfig, type ViewerDocument, WEBVR_PROFILES, WEBVR_PROFILE_IDS, WebVR, type WebVRChrome, type WebVRChromeAppearance, type WebVRFrameRate, type WebVRHandle, type WebVRMode, type WebVRProfile, type WebVRProfileId, type WebVRProps, type WebVRSettings, type WebVRState, clampPanoPitch, composePanoContextMenuItems, containRect, containerPointToImage, createDefaultPanoContextMenuItems, createPanoContextMenuPresets, cycleSceneId, headingFromVector, horizontalFov, hotspotAction, imagePointToContainer, isOverlayCorner, loadPanoProject, loadSceneFromJson, normalizePanoPosition, normalizePanoYaw, panoPositionToVector3, parseOverlayAnchor, parsePanoMap, parsePanoProject, projectHotspotTriggers, resolveOverlayAnchor, resolveOverlayToggleIcon, resolvePanoContextMenuEntries, resolvePanoMapAssets, resolveHotspotAssets as resolveProjectHotspotAssets, resolveProjectPopupAssets, sceneFromViewerConfig, sectorRotation, setHotspotAction, unwrapPolygonVertices, usePanoEvents, usePanoModal, usePanoOverlay, usePanoViewer, validatePolygonVertices, validatePolylineVertices, vector3ToPanoPosition };
2583
+ declare function PanoControlButton({ action, children, ...props }: Omit<ComponentProps<"button">, "ref"> & {
2584
+ action: PanoControlAction;
2585
+ }): react.JSX.Element | null;
2586
+ type PanoControlGroupProps = Omit<ComponentProps<"div">, "children"> & {
2587
+ actions: readonly PanoControlAction[];
2588
+ children?: (actions: readonly PanoControlAction[]) => ReactNode;
2589
+ };
2590
+ declare function PanoControlGroup({ actions, children, ...props }: PanoControlGroupProps): react.JSX.Element | null;
2591
+ type Options = Omit<PanoControlGroupProps, "actions"> & {
2592
+ actions?: readonly (string | PanoControlAction)[];
2593
+ };
2594
+ declare function PanoMediaControls({ controller, seekSpeed, volumeSpeed, actions, ...props }: Options & {
2595
+ controller: PanoMediaController | null;
2596
+ seekSpeed?: number;
2597
+ volumeSpeed?: number;
2598
+ }): react.JSX.Element;
2599
+ declare function PanoModelControls({ adapter, rotateSpeed, zoomSpeed, actions, ...props }: Options & {
2600
+ adapter: PanoSpatialControlAdapter;
2601
+ rotateSpeed?: number;
2602
+ zoomSpeed?: number;
2603
+ }): react.JSX.Element;
2604
+ declare function PanoScrollControls({ targetRef, speed, repeatIntervalMs, actions, ...props }: Options & {
2605
+ targetRef: RefObject<HTMLElement | null>;
2606
+ speed?: number;
2607
+ repeatIntervalMs?: number;
2608
+ }): react.ReactPortal | null;
2609
+ type PanoSpatialControlsProps = {
2610
+ children: ReactNode;
2611
+ position?: {
2612
+ yaw: number;
2613
+ pitch: number;
2614
+ };
2615
+ width?: number;
2616
+ distance?: number;
2617
+ className?: string;
2618
+ style?: ComponentProps<"div">["style"];
2619
+ };
2620
+ /** Render inside PanoOverlay. The measured DOM stays in the viewer's fullscreen host. */
2621
+ declare function PanoSpatialControls({ children, position, width, distance, className, style, }: PanoSpatialControlsProps): react.ReactPortal | null;
2622
+
2623
+ /** Adapts an existing media element without owning its source or playback lifetime. */
2624
+ declare function usePanoMediaController(ref: RefObject<HTMLMediaElement | null>): PanoMediaController;
2625
+
2626
+ export { type ArrowGraphic, type AssetUrlContext, type AssetUrlResolver, AudioHotspot, type AudioHotspotDefinition, type AudioHotspotErrorEvent, type AudioHotspotProps, type AudioPlaybackState, AutoRotate, type AutoRotateProps, BackgroundAudio, type BackgroundAudioController, type BackgroundAudioErrorEvent, type BackgroundAudioProps, type BackgroundAudioSnapshot, type BackgroundAudioSource, type CircleGraphic, type CubeFaceCode, type CubemapViewerConfig, DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE, DEFAULT_HOTSPOT_TOOLTIP_OFFSET, DEFAULT_PANO_CURSORS, DEFAULT_PANO_SCENE_MENU_APPEARANCE, DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE, DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE, DEFAULT_PANO_VIDEO_PLAYBACK_RATES, DEFAULT_WEBVR_CHROME_APPEARANCE, DEFAULT_WEBVR_CURSOR_DWELL_MS, type DiamondGraphic, EMPTY_WEBVR_STATE, type GraphicDefinition, GraphicHotspot, type GraphicHotspotDefinition, type GraphicHotspotProps, Gyro, type GyroHandle, type GyroProps, type GyroTouchMode, type HotspotCommonProps, type HotspotDefinition, type HotspotDefinitionBase, type HotspotDragEvent, type HotspotInputSource, type HotspotInteractionEvent, type HotspotMode, type HotspotPointerEvents, type HotspotPosition, type HotspotScaleMode, type HotspotTooltipAppearance, type HotspotTooltipContent, type HotspotTooltipPlacement, type HotspotTooltipScaleMode, type HotspotTooltipTrigger, IframeHotspot, type IframeHotspotDefinition, type IframeHotspotProps, type IframePointerPolicy, ImageHotspot, type ImageHotspotDefinition, type ImageHotspotProps, type JsonObject, type JsonRequestOptions, type JsonValue, type KeyboardControlAction, type KeyboardControlKeys, KeyboardControls, type KeyboardControlsProps, type LoadPanoProjectOptions, type LoadSceneFromJsonOptions, type LoadedPanoProject, type LoadedProjectScene, MAX_HOTSPOT_PITCH, MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY, type MouseControlButton, MouseControls, type MouseControlsOptions, type MouseControlsProps, PANO_FILTER_PRESETS, PANO_OVERLAY_ALIGNS, type PanoColorMatrix, PanoContextMenu, type PanoContextMenuActionItem, type PanoContextMenuAppearance, type PanoContextMenuEntry, type PanoContextMenuItem, type PanoContextMenuPresetActions, type PanoContextMenuPresetId, type PanoContextMenuPresetRef, type PanoContextMenuPresets, type PanoContextMenuProps, type PanoContextMenuRenderProps, type PanoContextMenuSelectContext, type PanoContextMenuSeparatorItem, type PanoControlAction, PanoControlButton, PanoControlGroup, type PanoControlGroupProps, type PanoCursor, type PanoCursors, PanoDataError, type PanoDataErrorCode, PanoDialogSurfaceContext, type PanoDragMotion, type PanoEventBus, type PanoEventListener, type PanoEventMap, type PanoEventType, PanoEvents, type PanoEventsProps, PanoFilter, type PanoFilterPreset, type PanoFilterProps, PanoMap, type PanoMapControlsDefinition, type PanoMapDefinition, type PanoMapDialogPresentation, type PanoMapEditChange, type PanoMapGradientStop, PanoMapOverlay, type PanoMapOverlayProps, type PanoMapPanelPresentation, type PanoMapPresentation, type PanoMapProps, type PanoMapSectorDefinition, type PanoMapSectorGradient, type PanoMapSpotDefinition, type PanoMediaActivationControls, type PanoMediaActivationOptions, type PanoMediaController, PanoMediaControls, PanoModelControls, PanoOverlay, type PanoOverlayAlign, type PanoOverlayAnchor, type PanoOverlayAxis, type PanoOverlayChevron, type PanoOverlayCollapseEdge, type PanoOverlayContentAlign, type PanoOverlayInset, PanoOverlayPortalProvider, type PanoOverlayProps, type PanoOverlayRenderContext, type PanoOverlayToggle, type PanoOverlayToggleState, type PanoProjectDefinition, type PanoProjectSceneDefinition, type PanoResizeEvent, PanoSceneMenu, type PanoSceneMenuAppearance, type PanoSceneMenuItem, type PanoSceneMenuLabelAlign, type PanoSceneMenuProps, PanoScrollControls, type PanoSpatialControlAdapter, PanoSpatialControls, type PanoSpatialControlsProps, PanoVideo, type PanoVideoCaptionAppearance, type PanoVideoController, PanoVideoControls, type PanoVideoControlsAppearance, type PanoVideoControlsProps, type PanoVideoErrorEvent, type PanoVideoErrorSource, type PanoVideoPlaybackSnapshot, type PanoVideoProps, type PanoVideoSource, type PanoVideoTrack, type PanoVideoTrackKind, type PanoVideoVariant, type PanoViewEasing, type PanoViewLimits, type PanoViewLookToOptions, type PanoViewNavigationOptions, type PanoViewNavigationResult, PanoViewer, type PanoViewerHandle, type PanoViewerProps, type PanoViewerState, type PanoWheelEvent, type PanoramaControlsOptions, type PanoramaPointerEvent, type PointHotspotDefinition, type PointHotspotDefinitionBase, PolygonHotspot, type PolygonHotspotDefinition, type PolygonHotspotProps, type PolygonValidationCode, type PolygonValidationIssue, type PolygonVerticesChangeEvent, PolylineHotspot, type PolylineHotspotDefinition, type PolylineHotspotProps, type PolylineValidationIssue, type PolylineVerticesChangeEvent, type PopupAssetUrlContext, type PopupAssetUrlResolver, type ProjectCustomActionEvent, type ProjectCustomHotspotAction, type ProjectHotspotAction, type ProjectHotspotClickEvent, type ProjectHotspotDefinition, type ProjectHotspotErrorEvent, type ProjectHotspotEvent, type ProjectHotspotRenderContext, type ProjectHotspotTrigger, type ProjectPopupBlock, type ProjectPopupDefinition, type ProjectPopupRequestEvent, ProjectScenes, type ProjectScenesProps, type RectangleGraphic, type ResolvedOverlayAnchor, type RingGraphic, type Scene, type SceneFromViewerConfigOptions, type SceneTransition, type SceneTransitionEndEvent, type SceneTransitionErrorEvent, type SceneTransitionPreset, Scenes, type ScenesController, type ScenesProps, type SequenceFrameDirection, type SequenceFrameEvent, SequenceHotspot, type SequenceHotspotDefinition, type SequenceHotspotErrorEvent, type SequenceHotspotProps, type SequenceLoadProgress, type SequencePlaybackState, type SetPanoViewerOptions, Sphere, type SphereProps, type SphereScene, SphereTile, type SphereTileAddress, type SphereTileLevel, type SphereTileLoadError, type SphereTileMultiresConfig, type SphereTileProps, type SphereTileScene, type SphereViewerConfig, type StarGraphic, type SvgGraphic, type SvgPathGraphic, TextHotspot, type TextHotspotAlign, type TextHotspotDefinition, type TextHotspotFontStyle, type TextHotspotProps, type TextHotspotStyle, type TextHotspotVerticalAlign, type TextHotspotWhiteSpace, Tile, type TileAddress, type TileLoadError, type TileLoadProgress, type TileMultiresConfig, type TileProps, type TileScene, TouchControls, type TouchControlsOptions, type TouchControlsProps, type TriangleGraphic, type UsePanoViewerResult, VideoHotspot, type VideoHotspotDefinition, type VideoHotspotErrorEvent, type VideoHotspotProps, type VideoPlaybackState, type ViewInteractionEvent, type ViewInteractionSource, type ViewerConfig, type ViewerDocument, WEBVR_PROFILES, WEBVR_PROFILE_IDS, WebVR, type WebVRChrome, type WebVRChromeAppearance, type WebVRFrameRate, type WebVRHandle, type WebVRMode, type WebVRProfile, type WebVRProfileId, type WebVRProps, type WebVRSettings, type WebVRState, clampPanoPitch, composePanoContextMenuItems, containRect, containerPointToImage, createDefaultPanoContextMenuItems, createPanoContextMenuPresets, cycleSceneId, headingFromVector, horizontalFov, hotspotAction, imagePointToContainer, isOverlayCorner, loadPanoProject, loadSceneFromJson, normalizePanoPosition, normalizePanoYaw, panoPositionToVector3, parseOverlayAnchor, parsePanoMap, parsePanoProject, projectHotspotTriggers, resolveOverlayAnchor, resolveOverlayToggleIcon, resolvePanoContextMenuEntries, resolvePanoMapAssets, resolveHotspotAssets as resolveProjectHotspotAssets, resolveProjectPopupAssets, sceneFromViewerConfig, sectorRotation, setHotspotAction, unwrapPolygonVertices, usePanoDialogSurface, usePanoEvents, usePanoMediaController, usePanoModal, usePanoOverlay, usePanoSpatialControls, usePanoViewer, validatePolygonVertices, validatePolylineVertices, vector3ToPanoPosition };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, ComponentPropsWithoutRef, IframeHTMLAttributes, RefObject } from 'react';
2
+ import { CSSProperties, ReactNode, Ref, RefObject, ComponentPropsWithoutRef, IframeHTMLAttributes, ComponentProps } from 'react';
3
3
  import { Texture, ColorRepresentation, Vector3 } from 'three';
4
4
 
5
5
  /** Camera-center limits in degrees. A yaw min greater than max crosses ±180°. */
@@ -34,6 +34,7 @@ type HotspotPosition = {
34
34
  type HotspotMode = "surface" | "billboard";
35
35
  /** Whether a hotspot grows with panorama zoom or preserves its screen size. */
36
36
  type HotspotScaleMode = "fov" | "fixed";
37
+ type HotspotTooltipScaleMode = "inherit" | HotspotScaleMode;
37
38
  type HotspotInputSource = "pointer" | "keyboard";
38
39
  type HotspotInteractionEvent = {
39
40
  id: string;
@@ -87,6 +88,10 @@ type HotspotCommonProps = {
87
88
  tooltipTrigger?: HotspotTooltipTrigger;
88
89
  /** Screen direction for the tooltip. Defaults to `"top"`. */
89
90
  tooltipPlacement?: HotspotTooltipPlacement;
91
+ /** Defaults to billboard, independently of the hotspot orientation. */
92
+ tooltipMode?: HotspotMode;
93
+ /** Defaults to inherit. Surface tooltips always scale with FOV. */
94
+ tooltipScaleMode?: HotspotTooltipScaleMode;
90
95
  /**
91
96
  * Screen-space gap in CSS pixels between the hotspot edge and the tooltip.
92
97
  * Defaults to 12.
@@ -107,9 +112,9 @@ type HotspotCommonProps = {
107
112
  * when needed so the full hotspot remains inside the panorama shell.
108
113
  */
109
114
  distance?: number;
110
- /** FOV grows/shrinks with zoom; fixed preserves the reference screen size. */
115
+ /** Billboard defaults to fixed. Surface always uses fov, ignoring fixed. */
111
116
  scaleMode?: HotspotScaleMode;
112
- /** Reference FOV in degrees used when scaleMode is "fixed". Defaults to 75. */
117
+ /** Reference FOV for fixed hotspot size and tooltip styling. Defaults to 75. */
113
118
  referenceFov?: number;
114
119
  /** Clockwise rotation around the hotspot normal in degrees. */
115
120
  rotation?: number;
@@ -234,6 +239,34 @@ declare function cycleSceneId(scenes: readonly {
234
239
  */
235
240
  declare function KeyboardControls({ enabled, keys, rotateSpeed, zoomSpeed, shiftMultiplier, invert, fovSpeed, onPreviousScene, onNextScene, }: KeyboardControlsProps): null;
236
241
 
242
+ type PanoSpatialControlAdapter = {
243
+ /** Degrees. Update the existing model viewing controls, not the panorama camera. */
244
+ rotateBy?: (yaw: number, pitch: number) => void;
245
+ /** Multiplicative viewing scale; values above one zoom in. */
246
+ zoomBy?: (factor: number) => void;
247
+ resetView?: () => void;
248
+ canExecute?: (action: string) => boolean;
249
+ /** Canvas frames must be copied after the host renderer finishes rendering. */
250
+ subscribeFrame?: (invalidate: () => void) => () => void;
251
+ /** A texture must belong to this viewer's WebGL context. */
252
+ texture?: Texture;
253
+ };
254
+
255
+ type PanoMediaController = Pick<PanoVideoController, "subscribe" | "play" | "pause" | "seek" | "setVolume" | "setMuted"> & {
256
+ getSnapshot: () => Pick<PanoVideoPlaybackSnapshot, "ready" | "playing" | "currentTime" | "duration" | "volume" | "volumeAdjustable" | "muted">;
257
+ };
258
+ type PanoControlAction = {
259
+ id: string;
260
+ label: string;
261
+ icon?: ReactNode;
262
+ disabled?: boolean;
263
+ enabled?: () => boolean;
264
+ activate?: () => void;
265
+ update?: (seconds: number) => void;
266
+ repeatIntervalMs?: number;
267
+ end?: () => void;
268
+ };
269
+
237
270
  type VideoPlaybackState = "playing" | "paused" | "ended" | "blocked";
238
271
  type VideoHotspotErrorEvent = {
239
272
  id: string;
@@ -241,6 +274,7 @@ type VideoHotspotErrorEvent = {
241
274
  error: unknown;
242
275
  };
243
276
  type VideoHotspotProps = HotspotCommonProps & {
277
+ ref?: Ref<PanoMediaController>;
244
278
  src: string;
245
279
  playing: boolean;
246
280
  poster?: string;
@@ -259,7 +293,7 @@ type VideoHotspotProps = HotspotCommonProps & {
259
293
  onEnded?: () => void;
260
294
  onError?: (event: VideoHotspotErrorEvent) => void;
261
295
  };
262
- declare function VideoHotspot({ id, src, playing, poster, loop, muted, volume, playsInline, preload, crossOrigin, width, height, opacity, onPlaybackStateChange, onPlaybackError, onEnded, onError, ...anchorProps }: VideoHotspotProps): react.JSX.Element;
296
+ declare function VideoHotspot({ ref, id, src, playing, poster, loop, muted, volume, playsInline, preload, crossOrigin, width, height, opacity, onPlaybackStateChange, onPlaybackError, onEnded, onError, ...anchorProps }: VideoHotspotProps): react.JSX.Element;
263
297
 
264
298
  type PanoVideoSource = {
265
299
  src: string;
@@ -451,7 +485,8 @@ type WebVRProps = {
451
485
  wakelock?: boolean;
452
486
  /**
453
487
  * Lock the mouse in simulated desktop VR so movement looks around with
454
- * no visible cursor. Click the view to re-lock after Escape. Defaults to true.
488
+ * no visible cursor. Right-click to release; left-click the view to re-lock.
489
+ * While unlocked, the reticle and gaze actions are paused. Defaults to true.
455
490
  */
456
491
  mousePointerLock?: boolean;
457
492
  onAvailable?: () => void;
@@ -471,7 +506,7 @@ type WebVRHandle = {
471
506
  getState: () => WebVRState;
472
507
  subscribe: (onStoreChange: () => void) => () => void;
473
508
  requestPermission: () => Promise<boolean>;
474
- /** Clear stored MobileVR settings and restore prop / built-in defaults. */
509
+ /** Reset the active fallback mode, or both modes outside VR; explicit props still apply. */
475
510
  resetSettings: () => void;
476
511
  };
477
512
  type WebVRSettings = {
@@ -837,7 +872,9 @@ type PanoOverlayProps = {
837
872
  /**
838
873
  * Screen-plane DOM UI for PanoViewer. Place it as a direct child of PanoViewer
839
874
  * (or inside a Fragment under PanoViewer). It stays outside the panorama sphere
840
- * and remains visible in fullscreen. Interactive children need `pointerEvents: "auto"`.
875
+ * and remains visible in fullscreen, but is hidden during VR sessions. Dialogs
876
+ * portaled to the viewer host can still render spatially. Interactive children
877
+ * need `pointerEvents: "auto"`.
841
878
  */
842
879
  declare function PanoOverlay({ children }: PanoOverlayProps): react.JSX.Element;
843
880
  /** Read inside PanoOverlay, renderOverlay, or their DOM descendants. */
@@ -849,6 +886,61 @@ declare function PanoOverlayPortalProvider({ container, children, }: {
849
886
  container: HTMLDivElement | null;
850
887
  children: ReactNode;
851
888
  }): react.JSX.Element;
889
+ /** Shared portal/ref adapter for package and third-party dialogs. */
890
+ declare function usePanoDialogSurface({ open, onOpenChange, scrollTargetRef, }: {
891
+ open: boolean;
892
+ onOpenChange: (open: boolean) => void;
893
+ scrollTargetRef?: RefObject<HTMLElement | null>;
894
+ }): {
895
+ presentation: "screen" | "spatial";
896
+ contentRef: (node: HTMLElement | null) => void;
897
+ onInteractOutside: (event: {
898
+ detail: {
899
+ originalEvent: Event;
900
+ };
901
+ preventDefault: () => void;
902
+ }) => void;
903
+ visibleRect: {
904
+ left: number;
905
+ top: number;
906
+ width: number;
907
+ height: number;
908
+ };
909
+ /** Stable viewer-local portal target; null until the DOM has mounted. */
910
+ portalContainer: HTMLDivElement | null;
911
+ /** Available viewer space in CSS pixels, independent of nested portal targets. */
912
+ size: {
913
+ width: number;
914
+ height: number;
915
+ };
916
+ isFullscreen: boolean;
917
+ };
918
+ declare function usePanoSpatialControls(ref: RefObject<HTMLElement | null>, adapter: PanoSpatialControlAdapter): void;
919
+ /** @internal Shared by ESM/CJS dialog parts; owned by the viewer runtime. */
920
+ declare const PanoDialogSurfaceContext: react.Context<{
921
+ presentation: "screen" | "spatial";
922
+ contentRef: (node: HTMLElement | null) => void;
923
+ onInteractOutside: (event: {
924
+ detail: {
925
+ originalEvent: Event;
926
+ };
927
+ preventDefault: () => void;
928
+ }) => void;
929
+ visibleRect: {
930
+ left: number;
931
+ top: number;
932
+ width: number;
933
+ height: number;
934
+ };
935
+ /** Stable viewer-local portal target; null until the DOM has mounted. */
936
+ portalContainer: HTMLDivElement | null;
937
+ /** Available viewer space in CSS pixels, independent of nested portal targets. */
938
+ size: {
939
+ width: number;
940
+ height: number;
941
+ };
942
+ isFullscreen: boolean;
943
+ } | null>;
852
944
 
853
945
  type PanoViewerProps = Omit<ComponentPropsWithoutRef<"div">, "children" | "onChange" | "contextMenu"> & {
854
946
  children?: ReactNode;
@@ -888,7 +980,7 @@ type PanoViewerProps = Omit<ComponentPropsWithoutRef<"div">, "children" | "onCha
888
980
  /** Canvas pixel ratio. Defaults to a capped range of 1–2. */
889
981
  dpr?: number | [number, number];
890
982
  };
891
- declare const PanoViewer: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "onChange" | "contextMenu"> & {
983
+ declare const PanoViewer: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "contextMenu" | "onChange"> & {
892
984
  children?: ReactNode;
893
985
  /** Viewer-local DOM UI, rendered outside the Three.js tree, including in fullscreen. */
894
986
  renderOverlay?: (context: PanoOverlayRenderContext) => ReactNode;
@@ -1353,6 +1445,10 @@ type HotspotDefinitionBase = {
1353
1445
  tooltip?: string | HotspotTooltipContent;
1354
1446
  tooltipTrigger?: HotspotTooltipTrigger;
1355
1447
  tooltipPlacement?: HotspotTooltipPlacement;
1448
+ /** Defaults to billboard, independently of the hotspot orientation. */
1449
+ tooltipMode?: HotspotMode;
1450
+ /** Defaults to inherit. Surface tooltips always scale with FOV. */
1451
+ tooltipScaleMode?: HotspotTooltipScaleMode;
1356
1452
  tooltipOffset?: number;
1357
1453
  tooltipAppearance?: HotspotTooltipAppearance;
1358
1454
  };
@@ -2484,4 +2580,47 @@ declare function containerPointToImage(point: MapPoint, viewport: MapViewport):
2484
2580
  /** Clockwise degrees from image up for a vector in container space. */
2485
2581
  declare function headingFromVector(dx: number, dy: number): number;
2486
2582
 
2487
- export { type ArrowGraphic, type AssetUrlContext, type AssetUrlResolver, AudioHotspot, type AudioHotspotDefinition, type AudioHotspotErrorEvent, type AudioHotspotProps, type AudioPlaybackState, AutoRotate, type AutoRotateProps, BackgroundAudio, type BackgroundAudioController, type BackgroundAudioErrorEvent, type BackgroundAudioProps, type BackgroundAudioSnapshot, type BackgroundAudioSource, type CircleGraphic, type CubeFaceCode, type CubemapViewerConfig, DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE, DEFAULT_HOTSPOT_TOOLTIP_OFFSET, DEFAULT_PANO_CURSORS, DEFAULT_PANO_SCENE_MENU_APPEARANCE, DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE, DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE, DEFAULT_PANO_VIDEO_PLAYBACK_RATES, DEFAULT_WEBVR_CHROME_APPEARANCE, DEFAULT_WEBVR_CURSOR_DWELL_MS, type DiamondGraphic, EMPTY_WEBVR_STATE, type GraphicDefinition, GraphicHotspot, type GraphicHotspotDefinition, type GraphicHotspotProps, Gyro, type GyroHandle, type GyroProps, type GyroTouchMode, type HotspotCommonProps, type HotspotDefinition, type HotspotDefinitionBase, type HotspotDragEvent, type HotspotInputSource, type HotspotInteractionEvent, type HotspotMode, type HotspotPointerEvents, type HotspotPosition, type HotspotScaleMode, type HotspotTooltipAppearance, type HotspotTooltipContent, type HotspotTooltipPlacement, type HotspotTooltipTrigger, IframeHotspot, type IframeHotspotDefinition, type IframeHotspotProps, type IframePointerPolicy, ImageHotspot, type ImageHotspotDefinition, type ImageHotspotProps, type JsonObject, type JsonRequestOptions, type JsonValue, type KeyboardControlAction, type KeyboardControlKeys, KeyboardControls, type KeyboardControlsProps, type LoadPanoProjectOptions, type LoadSceneFromJsonOptions, type LoadedPanoProject, type LoadedProjectScene, MAX_HOTSPOT_PITCH, MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY, type MouseControlButton, MouseControls, type MouseControlsOptions, type MouseControlsProps, PANO_FILTER_PRESETS, PANO_OVERLAY_ALIGNS, type PanoColorMatrix, PanoContextMenu, type PanoContextMenuActionItem, type PanoContextMenuAppearance, type PanoContextMenuEntry, type PanoContextMenuItem, type PanoContextMenuPresetActions, type PanoContextMenuPresetId, type PanoContextMenuPresetRef, type PanoContextMenuPresets, type PanoContextMenuProps, type PanoContextMenuRenderProps, type PanoContextMenuSelectContext, type PanoContextMenuSeparatorItem, type PanoCursor, type PanoCursors, PanoDataError, type PanoDataErrorCode, type PanoDragMotion, type PanoEventBus, type PanoEventListener, type PanoEventMap, type PanoEventType, PanoEvents, type PanoEventsProps, PanoFilter, type PanoFilterPreset, type PanoFilterProps, PanoMap, type PanoMapControlsDefinition, type PanoMapDefinition, type PanoMapDialogPresentation, type PanoMapEditChange, type PanoMapGradientStop, PanoMapOverlay, type PanoMapOverlayProps, type PanoMapPanelPresentation, type PanoMapPresentation, type PanoMapProps, type PanoMapSectorDefinition, type PanoMapSectorGradient, type PanoMapSpotDefinition, type PanoMediaActivationControls, type PanoMediaActivationOptions, PanoOverlay, type PanoOverlayAlign, type PanoOverlayAnchor, type PanoOverlayAxis, type PanoOverlayChevron, type PanoOverlayCollapseEdge, type PanoOverlayContentAlign, type PanoOverlayInset, PanoOverlayPortalProvider, type PanoOverlayProps, type PanoOverlayRenderContext, type PanoOverlayToggle, type PanoOverlayToggleState, type PanoProjectDefinition, type PanoProjectSceneDefinition, type PanoResizeEvent, PanoSceneMenu, type PanoSceneMenuAppearance, type PanoSceneMenuItem, type PanoSceneMenuLabelAlign, type PanoSceneMenuProps, PanoVideo, type PanoVideoCaptionAppearance, type PanoVideoController, PanoVideoControls, type PanoVideoControlsAppearance, type PanoVideoControlsProps, type PanoVideoErrorEvent, type PanoVideoErrorSource, type PanoVideoPlaybackSnapshot, type PanoVideoProps, type PanoVideoSource, type PanoVideoTrack, type PanoVideoTrackKind, type PanoVideoVariant, type PanoViewEasing, type PanoViewLimits, type PanoViewLookToOptions, type PanoViewNavigationOptions, type PanoViewNavigationResult, PanoViewer, type PanoViewerHandle, type PanoViewerProps, type PanoViewerState, type PanoWheelEvent, type PanoramaControlsOptions, type PanoramaPointerEvent, type PointHotspotDefinition, type PointHotspotDefinitionBase, PolygonHotspot, type PolygonHotspotDefinition, type PolygonHotspotProps, type PolygonValidationCode, type PolygonValidationIssue, type PolygonVerticesChangeEvent, PolylineHotspot, type PolylineHotspotDefinition, type PolylineHotspotProps, type PolylineValidationIssue, type PolylineVerticesChangeEvent, type PopupAssetUrlContext, type PopupAssetUrlResolver, type ProjectCustomActionEvent, type ProjectCustomHotspotAction, type ProjectHotspotAction, type ProjectHotspotClickEvent, type ProjectHotspotDefinition, type ProjectHotspotErrorEvent, type ProjectHotspotEvent, type ProjectHotspotRenderContext, type ProjectHotspotTrigger, type ProjectPopupBlock, type ProjectPopupDefinition, type ProjectPopupRequestEvent, ProjectScenes, type ProjectScenesProps, type RectangleGraphic, type ResolvedOverlayAnchor, type RingGraphic, type Scene, type SceneFromViewerConfigOptions, type SceneTransition, type SceneTransitionEndEvent, type SceneTransitionErrorEvent, type SceneTransitionPreset, Scenes, type ScenesController, type ScenesProps, type SequenceFrameDirection, type SequenceFrameEvent, SequenceHotspot, type SequenceHotspotDefinition, type SequenceHotspotErrorEvent, type SequenceHotspotProps, type SequenceLoadProgress, type SequencePlaybackState, type SetPanoViewerOptions, Sphere, type SphereProps, type SphereScene, SphereTile, type SphereTileAddress, type SphereTileLevel, type SphereTileLoadError, type SphereTileMultiresConfig, type SphereTileProps, type SphereTileScene, type SphereViewerConfig, type StarGraphic, type SvgGraphic, type SvgPathGraphic, TextHotspot, type TextHotspotAlign, type TextHotspotDefinition, type TextHotspotFontStyle, type TextHotspotProps, type TextHotspotStyle, type TextHotspotVerticalAlign, type TextHotspotWhiteSpace, Tile, type TileAddress, type TileLoadError, type TileLoadProgress, type TileMultiresConfig, type TileProps, type TileScene, TouchControls, type TouchControlsOptions, type TouchControlsProps, type TriangleGraphic, type UsePanoViewerResult, VideoHotspot, type VideoHotspotDefinition, type VideoHotspotErrorEvent, type VideoHotspotProps, type VideoPlaybackState, type ViewInteractionEvent, type ViewInteractionSource, type ViewerConfig, type ViewerDocument, WEBVR_PROFILES, WEBVR_PROFILE_IDS, WebVR, type WebVRChrome, type WebVRChromeAppearance, type WebVRFrameRate, type WebVRHandle, type WebVRMode, type WebVRProfile, type WebVRProfileId, type WebVRProps, type WebVRSettings, type WebVRState, clampPanoPitch, composePanoContextMenuItems, containRect, containerPointToImage, createDefaultPanoContextMenuItems, createPanoContextMenuPresets, cycleSceneId, headingFromVector, horizontalFov, hotspotAction, imagePointToContainer, isOverlayCorner, loadPanoProject, loadSceneFromJson, normalizePanoPosition, normalizePanoYaw, panoPositionToVector3, parseOverlayAnchor, parsePanoMap, parsePanoProject, projectHotspotTriggers, resolveOverlayAnchor, resolveOverlayToggleIcon, resolvePanoContextMenuEntries, resolvePanoMapAssets, resolveHotspotAssets as resolveProjectHotspotAssets, resolveProjectPopupAssets, sceneFromViewerConfig, sectorRotation, setHotspotAction, unwrapPolygonVertices, usePanoEvents, usePanoModal, usePanoOverlay, usePanoViewer, validatePolygonVertices, validatePolylineVertices, vector3ToPanoPosition };
2583
+ declare function PanoControlButton({ action, children, ...props }: Omit<ComponentProps<"button">, "ref"> & {
2584
+ action: PanoControlAction;
2585
+ }): react.JSX.Element | null;
2586
+ type PanoControlGroupProps = Omit<ComponentProps<"div">, "children"> & {
2587
+ actions: readonly PanoControlAction[];
2588
+ children?: (actions: readonly PanoControlAction[]) => ReactNode;
2589
+ };
2590
+ declare function PanoControlGroup({ actions, children, ...props }: PanoControlGroupProps): react.JSX.Element | null;
2591
+ type Options = Omit<PanoControlGroupProps, "actions"> & {
2592
+ actions?: readonly (string | PanoControlAction)[];
2593
+ };
2594
+ declare function PanoMediaControls({ controller, seekSpeed, volumeSpeed, actions, ...props }: Options & {
2595
+ controller: PanoMediaController | null;
2596
+ seekSpeed?: number;
2597
+ volumeSpeed?: number;
2598
+ }): react.JSX.Element;
2599
+ declare function PanoModelControls({ adapter, rotateSpeed, zoomSpeed, actions, ...props }: Options & {
2600
+ adapter: PanoSpatialControlAdapter;
2601
+ rotateSpeed?: number;
2602
+ zoomSpeed?: number;
2603
+ }): react.JSX.Element;
2604
+ declare function PanoScrollControls({ targetRef, speed, repeatIntervalMs, actions, ...props }: Options & {
2605
+ targetRef: RefObject<HTMLElement | null>;
2606
+ speed?: number;
2607
+ repeatIntervalMs?: number;
2608
+ }): react.ReactPortal | null;
2609
+ type PanoSpatialControlsProps = {
2610
+ children: ReactNode;
2611
+ position?: {
2612
+ yaw: number;
2613
+ pitch: number;
2614
+ };
2615
+ width?: number;
2616
+ distance?: number;
2617
+ className?: string;
2618
+ style?: ComponentProps<"div">["style"];
2619
+ };
2620
+ /** Render inside PanoOverlay. The measured DOM stays in the viewer's fullscreen host. */
2621
+ declare function PanoSpatialControls({ children, position, width, distance, className, style, }: PanoSpatialControlsProps): react.ReactPortal | null;
2622
+
2623
+ /** Adapts an existing media element without owning its source or playback lifetime. */
2624
+ declare function usePanoMediaController(ref: RefObject<HTMLMediaElement | null>): PanoMediaController;
2625
+
2626
+ export { type ArrowGraphic, type AssetUrlContext, type AssetUrlResolver, AudioHotspot, type AudioHotspotDefinition, type AudioHotspotErrorEvent, type AudioHotspotProps, type AudioPlaybackState, AutoRotate, type AutoRotateProps, BackgroundAudio, type BackgroundAudioController, type BackgroundAudioErrorEvent, type BackgroundAudioProps, type BackgroundAudioSnapshot, type BackgroundAudioSource, type CircleGraphic, type CubeFaceCode, type CubemapViewerConfig, DEFAULT_HOTSPOT_TOOLTIP_APPEARANCE, DEFAULT_HOTSPOT_TOOLTIP_OFFSET, DEFAULT_PANO_CURSORS, DEFAULT_PANO_SCENE_MENU_APPEARANCE, DEFAULT_PANO_VIDEO_CAPTION_APPEARANCE, DEFAULT_PANO_VIDEO_CONTROLS_APPEARANCE, DEFAULT_PANO_VIDEO_PLAYBACK_RATES, DEFAULT_WEBVR_CHROME_APPEARANCE, DEFAULT_WEBVR_CURSOR_DWELL_MS, type DiamondGraphic, EMPTY_WEBVR_STATE, type GraphicDefinition, GraphicHotspot, type GraphicHotspotDefinition, type GraphicHotspotProps, Gyro, type GyroHandle, type GyroProps, type GyroTouchMode, type HotspotCommonProps, type HotspotDefinition, type HotspotDefinitionBase, type HotspotDragEvent, type HotspotInputSource, type HotspotInteractionEvent, type HotspotMode, type HotspotPointerEvents, type HotspotPosition, type HotspotScaleMode, type HotspotTooltipAppearance, type HotspotTooltipContent, type HotspotTooltipPlacement, type HotspotTooltipScaleMode, type HotspotTooltipTrigger, IframeHotspot, type IframeHotspotDefinition, type IframeHotspotProps, type IframePointerPolicy, ImageHotspot, type ImageHotspotDefinition, type ImageHotspotProps, type JsonObject, type JsonRequestOptions, type JsonValue, type KeyboardControlAction, type KeyboardControlKeys, KeyboardControls, type KeyboardControlsProps, type LoadPanoProjectOptions, type LoadSceneFromJsonOptions, type LoadedPanoProject, type LoadedProjectScene, MAX_HOTSPOT_PITCH, MIN_PANO_CONTEXT_MENU_BACKGROUND_OPACITY, type MouseControlButton, MouseControls, type MouseControlsOptions, type MouseControlsProps, PANO_FILTER_PRESETS, PANO_OVERLAY_ALIGNS, type PanoColorMatrix, PanoContextMenu, type PanoContextMenuActionItem, type PanoContextMenuAppearance, type PanoContextMenuEntry, type PanoContextMenuItem, type PanoContextMenuPresetActions, type PanoContextMenuPresetId, type PanoContextMenuPresetRef, type PanoContextMenuPresets, type PanoContextMenuProps, type PanoContextMenuRenderProps, type PanoContextMenuSelectContext, type PanoContextMenuSeparatorItem, type PanoControlAction, PanoControlButton, PanoControlGroup, type PanoControlGroupProps, type PanoCursor, type PanoCursors, PanoDataError, type PanoDataErrorCode, PanoDialogSurfaceContext, type PanoDragMotion, type PanoEventBus, type PanoEventListener, type PanoEventMap, type PanoEventType, PanoEvents, type PanoEventsProps, PanoFilter, type PanoFilterPreset, type PanoFilterProps, PanoMap, type PanoMapControlsDefinition, type PanoMapDefinition, type PanoMapDialogPresentation, type PanoMapEditChange, type PanoMapGradientStop, PanoMapOverlay, type PanoMapOverlayProps, type PanoMapPanelPresentation, type PanoMapPresentation, type PanoMapProps, type PanoMapSectorDefinition, type PanoMapSectorGradient, type PanoMapSpotDefinition, type PanoMediaActivationControls, type PanoMediaActivationOptions, type PanoMediaController, PanoMediaControls, PanoModelControls, PanoOverlay, type PanoOverlayAlign, type PanoOverlayAnchor, type PanoOverlayAxis, type PanoOverlayChevron, type PanoOverlayCollapseEdge, type PanoOverlayContentAlign, type PanoOverlayInset, PanoOverlayPortalProvider, type PanoOverlayProps, type PanoOverlayRenderContext, type PanoOverlayToggle, type PanoOverlayToggleState, type PanoProjectDefinition, type PanoProjectSceneDefinition, type PanoResizeEvent, PanoSceneMenu, type PanoSceneMenuAppearance, type PanoSceneMenuItem, type PanoSceneMenuLabelAlign, type PanoSceneMenuProps, PanoScrollControls, type PanoSpatialControlAdapter, PanoSpatialControls, type PanoSpatialControlsProps, PanoVideo, type PanoVideoCaptionAppearance, type PanoVideoController, PanoVideoControls, type PanoVideoControlsAppearance, type PanoVideoControlsProps, type PanoVideoErrorEvent, type PanoVideoErrorSource, type PanoVideoPlaybackSnapshot, type PanoVideoProps, type PanoVideoSource, type PanoVideoTrack, type PanoVideoTrackKind, type PanoVideoVariant, type PanoViewEasing, type PanoViewLimits, type PanoViewLookToOptions, type PanoViewNavigationOptions, type PanoViewNavigationResult, PanoViewer, type PanoViewerHandle, type PanoViewerProps, type PanoViewerState, type PanoWheelEvent, type PanoramaControlsOptions, type PanoramaPointerEvent, type PointHotspotDefinition, type PointHotspotDefinitionBase, PolygonHotspot, type PolygonHotspotDefinition, type PolygonHotspotProps, type PolygonValidationCode, type PolygonValidationIssue, type PolygonVerticesChangeEvent, PolylineHotspot, type PolylineHotspotDefinition, type PolylineHotspotProps, type PolylineValidationIssue, type PolylineVerticesChangeEvent, type PopupAssetUrlContext, type PopupAssetUrlResolver, type ProjectCustomActionEvent, type ProjectCustomHotspotAction, type ProjectHotspotAction, type ProjectHotspotClickEvent, type ProjectHotspotDefinition, type ProjectHotspotErrorEvent, type ProjectHotspotEvent, type ProjectHotspotRenderContext, type ProjectHotspotTrigger, type ProjectPopupBlock, type ProjectPopupDefinition, type ProjectPopupRequestEvent, ProjectScenes, type ProjectScenesProps, type RectangleGraphic, type ResolvedOverlayAnchor, type RingGraphic, type Scene, type SceneFromViewerConfigOptions, type SceneTransition, type SceneTransitionEndEvent, type SceneTransitionErrorEvent, type SceneTransitionPreset, Scenes, type ScenesController, type ScenesProps, type SequenceFrameDirection, type SequenceFrameEvent, SequenceHotspot, type SequenceHotspotDefinition, type SequenceHotspotErrorEvent, type SequenceHotspotProps, type SequenceLoadProgress, type SequencePlaybackState, type SetPanoViewerOptions, Sphere, type SphereProps, type SphereScene, SphereTile, type SphereTileAddress, type SphereTileLevel, type SphereTileLoadError, type SphereTileMultiresConfig, type SphereTileProps, type SphereTileScene, type SphereViewerConfig, type StarGraphic, type SvgGraphic, type SvgPathGraphic, TextHotspot, type TextHotspotAlign, type TextHotspotDefinition, type TextHotspotFontStyle, type TextHotspotProps, type TextHotspotStyle, type TextHotspotVerticalAlign, type TextHotspotWhiteSpace, Tile, type TileAddress, type TileLoadError, type TileLoadProgress, type TileMultiresConfig, type TileProps, type TileScene, TouchControls, type TouchControlsOptions, type TouchControlsProps, type TriangleGraphic, type UsePanoViewerResult, VideoHotspot, type VideoHotspotDefinition, type VideoHotspotErrorEvent, type VideoHotspotProps, type VideoPlaybackState, type ViewInteractionEvent, type ViewInteractionSource, type ViewerConfig, type ViewerDocument, WEBVR_PROFILES, WEBVR_PROFILE_IDS, WebVR, type WebVRChrome, type WebVRChromeAppearance, type WebVRFrameRate, type WebVRHandle, type WebVRMode, type WebVRProfile, type WebVRProfileId, type WebVRProps, type WebVRSettings, type WebVRState, clampPanoPitch, composePanoContextMenuItems, containRect, containerPointToImage, createDefaultPanoContextMenuItems, createPanoContextMenuPresets, cycleSceneId, headingFromVector, horizontalFov, hotspotAction, imagePointToContainer, isOverlayCorner, loadPanoProject, loadSceneFromJson, normalizePanoPosition, normalizePanoYaw, panoPositionToVector3, parseOverlayAnchor, parsePanoMap, parsePanoProject, projectHotspotTriggers, resolveOverlayAnchor, resolveOverlayToggleIcon, resolvePanoContextMenuEntries, resolvePanoMapAssets, resolveHotspotAssets as resolveProjectHotspotAssets, resolveProjectPopupAssets, sceneFromViewerConfig, sectorRotation, setHotspotAction, unwrapPolygonVertices, usePanoDialogSurface, usePanoEvents, usePanoMediaController, usePanoModal, usePanoOverlay, usePanoSpatialControls, usePanoViewer, validatePolygonVertices, validatePolylineVertices, vector3ToPanoPosition };