export interface AssetOptions { /** * @assetUrl - URL of the asset to be displayed in the viewer. */ assetUrl: string; /** * @assetType - Type of the asset being displayed. * This is used to determine how the asset should be rendered. */ assetType: AssetType; /** * @paddingAroundAsset - Optional padding value to apply around the asset, should be sent in px * Default is 0, which means no padding. */ paddingAroundAsset?: number; /** * @assetTitle - Optional title for the asset, used for display purposes. * If not provided, it will default to an empty string. */ assetTitle?: string; /** * @assetAltText - Optional alternative text for the asset, used for accessibility. * If not provided, it will default to an empty string. */ assetAltText?: string; } export interface PreviewIconOptions { /** * @showPreviewIcon - Flag to indicate if a custom preview icon should be rendered. * If true, the custom preview icon will be displayed instead of the default asset display. */ showPreviewIcon: boolean; /** * @url - URL of the custom preview icon to be displayed. * This is used when `showPreviewIcon` is true. */ url: string; } export interface ZoomOptions { /** * @zoomValue - zoom value to control the zoom level of the asset. * Value should be between 0 (natural size) and 100 (300% zoom). */ zoomValue?: number; /** * @maxZoomMultiplier * - Optional multiplier for zoom scaling. * - If provided, it will adjust the zoom level based on the natural scale. * - eg: If set to 3, a zoomValue of 100 will result in a zoom level of 300% of the natural size. */ maxZoomMultiplier?: number; } export interface ContainerOptions { /** * @width - Optional container width in pixels. If not set, it is auto-calculated. */ width?: number; /** * @height - Optional container height in pixels. If not set, it is auto-calculated. */ height?: number; } export interface AssetZoomableViewerProps { assetOptions: AssetOptions; previewIconOptions?: PreviewIconOptions; /** * @zoomOptions - Optional zoom options to control the zoom level and behavior. */ zoomOptions?: ZoomOptions; /** * @isError - Optional flag to indicate if there was an error loading the asset. * If true, the broken State will be displayed. */ isError?: boolean; /** * @containerOptions - Optional container options to control the size of the viewer. */ containerOptions?: ContainerOptions; /** * @brokenAssetSvg - Optional SVG content to display when asset fails to load. * If not provided, a default 'NoAssetsSuggestionsDataState' icon will be used. */ brokenAssetSvg?: string; /** * @className - Optional CSS class name to apply to the component. */ className?: string; testId?: string; } export type AssetType = 'image' | 'folder' | 'code' | 'pdf' | 'excel' | 'presentation' | 'document' | 'json' | 'text/plain' | 'zip' | 'video' | 'audio' | 'imageBroken' | 'image/tiff';