UNPKG

@mcmhomes/panorama-viewer

Version:
420 lines (351 loc) 14.4 kB
import { NamedExoticComponent } from 'react'; import { ReactNode } from 'react'; export declare type AvailableNamesFunction = AvailableNamesFunction_2; declare type AvailableNamesFunction_2 = () => boolean; export declare type AvailableThumbnailFunction = AvailableThumbnailFunction_2; declare type AvailableThumbnailFunction_2 = () => boolean; export declare function getAvailableLocationIds(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; }): Promise<string[]>; export declare function getAvailableSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string[]>; export declare function getAvailableSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<any>; export declare function getAvailableStyleIds(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string[]>; export declare function getCurrentLocationId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string>; export declare function getCurrentSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; skus?: any | null; warnings?: boolean | null | undefined; }): Promise<string[]>; export declare function getCurrentSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; skus?: any | null; warnings?: boolean | null | undefined; }): Promise<any>; export declare function getCurrentStyleId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string>; export declare function getDefaultLocationId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; }): Promise<string>; export declare function getDefaultSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string[]>; export declare function getDefaultSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): Promise<any>; export declare function getDefaultStyleId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; locationId?: string | null | undefined; }): Promise<string>; export declare function getHomeRenderDate(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): Promise<Date>; export declare function getHomeVersion(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): Promise<string>; export declare function getHomeVersionDate(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): Promise<Date>; export declare function getNames(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): Promise<NamesFunctions_2>; export declare function getThumbnails(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): Promise<ThumbnailFunctions_2>; export declare type LocationNamesFunction = LocationNamesFunction_2; declare type LocationNamesFunction_2 = (params: { locationId: string; }) => string; export declare type LocationThumbnailFunction = LocationThumbnailFunction_2; declare type LocationThumbnailFunction_2 = (params: { locationId: string; } & ThumbnailOptions_2) => string; export declare type NamesFunctions = NamesFunctions_2; declare type NamesFunctions_2 = { available: AvailableNamesFunction_2; location: LocationNamesFunction_2; style: StyleNamesFunction_2; skuGroup: SkuGroupNamesFunction_2; sku: SkuNamesFunction_2; }; declare type NamesFunctions_3 = NamesFunctions_2; export declare type NamesFunctionsReact = NamesFunctions_3; /** * The PanoramaViewer component is the main component for rendering a panoramic home. * * @component * @type {import('react').NamedExoticComponent<PanoramaViewerProps>} */ export declare const PanoramaViewer: NamedExoticComponent<PanoramaViewerProps_2>; export declare type PanoramaViewerProps = PanoramaViewerProps_2; declare type PanoramaViewerProps_2 = { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; skus?: any | null; onError?: ((error: { canRetry: boolean; retry: () => void; message: string; reason: string; id: string; data: any; }) => void) | null | undefined; errorWidget?: ((error: { canRetry: boolean; retry: () => void; message: string; reason: string; id: string; data: any; }) => ReactNode) | null | undefined; loadingWidget?: (() => ReactNode) | null | undefined; minFov?: number | null | undefined; maxFov?: number | null | undefined; /** * With this you can override how the field of view is calculated from the aspect ratio, for example: (aspectRatio) => 109.22 - (16.69 * aspectRatio) */ calculateFov?: ((aspectRatio: number) => number) | null | undefined; onFovChanged?: ((newFov: number) => void) | null | undefined; initialCameraRotation?: { yaw: number; pitch: number; } | null | undefined; onCameraRotationChanged?: ((newRotation: { yaw: number; pitch: number; }) => void) | null | undefined; lookSpeed?: number | null | undefined; lookSpeedX?: number | null | undefined; lookSpeedY?: number | null | undefined; zoomSpeed?: number | null | undefined; basisTranscoderPath?: string | null | undefined; }; export declare type SkuGroupNamesFunction = SkuGroupNamesFunction_2; declare type SkuGroupNamesFunction_2 = (params: { styleId: string; groupId: string; }) => string; export declare type SkuGroupThumbnailFunction = SkuGroupThumbnailFunction_2; declare type SkuGroupThumbnailFunction_2 = (params: { styleId: string; groupId: string; } & ThumbnailOptions_2) => string; export declare type SkuNamesFunction = SkuNamesFunction_2; declare type SkuNamesFunction_2 = (params: { styleId: string; groupId: string; sku: string; }) => string; export declare type SkuThumbnailFunction = SkuThumbnailFunction_2; declare type SkuThumbnailFunction_2 = (params: { styleId: string; groupId: string; sku: string; } & ThumbnailOptions_2) => string; export declare type StyleNamesFunction = StyleNamesFunction_2; declare type StyleNamesFunction_2 = (params: { styleId: string; }) => string; export declare type StyleThumbnailFunction = StyleThumbnailFunction_2; declare type StyleThumbnailFunction_2 = (params: { styleId: string; } & ThumbnailOptions_2) => string; export declare type ThumbnailFunctions = ThumbnailFunctions_2; declare type ThumbnailFunctions_2 = { available: AvailableThumbnailFunction_2; location: LocationThumbnailFunction_2; style: StyleThumbnailFunction_2; skuGroup: SkuGroupThumbnailFunction_2; sku: SkuThumbnailFunction_2; }; declare type ThumbnailFunctions_3 = ThumbnailFunctions_2; export declare type ThumbnailFunctionsReact = ThumbnailFunctions_3; export declare type ThumbnailOptions = ThumbnailOptions_2; declare type ThumbnailOptions_2 = { /** * Ensures the thumbnail is at least this resolution. When 0 or below, or not provided, the highest quality image is used. */ resolution?: number | null | undefined; /** * Thumbnail format preference. An array uses the first available format. If none match, falls back to the default format. */ format?: string | string[] | null | undefined; /** * If true, the thumbnail URL will be returned as a srcset string. This is useful for responsive images. If the `resolution` parameter is also provided, it will return a DevicePixelRatio srcset (1x, 2x, etc), suitable for fixed-size images. If the `resolution` parameter is NOT provided, it will return a width-based srcset (320w, 640w, etc), in that case, the corresponding `<img>` element must include a `sizes` attribute to work correctly. */ srcset?: boolean | null | undefined; }; export declare function useAvailableLocationIds(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; }): [string[] | null, boolean, string | null]; export declare function useAvailableSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [string[] | null, boolean, string | null]; export declare function useAvailableSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [any | null, boolean, string | null]; export declare function useAvailableStyleIds(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; locationId?: string | null | undefined; }): [string[] | null, boolean, string | null]; export declare function useCurrentLocationId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [string | null, boolean, string | null]; export declare function useCurrentSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; skus?: any | null; warnings?: boolean | null | undefined; }): [string[] | null, boolean, string | null]; export declare function useCurrentSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; skus?: any | null; warnings?: boolean | null | undefined; }): [any | null, boolean, string | null]; export declare function useCurrentStyleId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [string | null, boolean, string | null]; export declare function useDefaultLocationId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; }): [string | null, boolean, string | null]; export declare function useDefaultSkus(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [string[] | null, boolean, string | null]; export declare function useDefaultSkusGrouped(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; styleId?: string | null | undefined; locationId?: string | null | undefined; }): [any | null, boolean, string | null]; export declare function useDefaultStyleId(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; locationId?: string | null | undefined; }): [string | null, boolean, string | null]; export declare function useHomeRenderDate(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): [Date | null, boolean, string | null]; export declare function useHomeVersion(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): [string | null, boolean, string | null]; export declare function useHomeVersionDate(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): [Date | null, boolean, string | null]; export declare function useNames(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): [NamesFunctions_3 | null, boolean, string | null]; export declare function useThumbnails(params: { homeId: string; homeVersion?: string | null | undefined; host?: string | null | undefined; }): [ThumbnailFunctions_3 | null, boolean, string | null]; export { }