js-cloudimage-360-view 4.8.0 → 4.9.2

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("react/jsx-runtime"),n=require("react");let R=null;function I(f,t){const[v,y]=n.useState(!1),a=n.useRef(null),l=n.useRef(null),m=n.useId();n.useEffect(()=>{if(typeof window>"u"||!f.current||t.autoInit===!1)return;let u=!0;const s=f.current;return(async()=>{try{if(R||(R=(await Promise.resolve().then(()=>require("./ci360-DdSVW_xW.js"))).default),!s||!u)return;s.id||(s.id=`ci360-${m.replace(/:/g,"")}`);const i={...t,onReady:c=>{var p;u&&(y(!0),(p=t.onReady)==null||p.call(t,c))}};l.current=new R,a.current=l.current.init(s,i)}catch(i){console.error("Failed to initialize CI360 viewer:",i)}})(),()=>{if(u=!1,a.current){try{a.current.destroy()}catch{}a.current=null}l.current=null,y(!1)}},[t.folder,t.filenameX,t.filenameY,t.imageListX,t.imageListY,t.amountX,t.amountY,t.hotspots,t.theme,t.aspectRatio,t.cropAspectRatio,t.cropGravity,m]);const C=n.useCallback(()=>a.current,[]);return{viewer:a.current,isReady:v,getViewer:C}}const Ze=(f,t)=>{const{id:v,className:y,style:a,folder:l,apiVersion:m,filenameX:C,filenameY:u,imageListX:s,imageListY:w,indexZeroBase:i,amountX:c,amountY:p,draggable:z,swipeable:S,keys:V,keysReverse:g,autoplay:T,autoplayBehavior:O,playOnce:P,speed:Z,autoplayReverse:b,dragSpeed:L,dragReverse:k,stopAtEdges:A,inertia:F,fullscreen:X,magnifier:Y,pointerZoom:q,pinchZoom:x,zoomMax:B,zoomStep:D,zoomControls:E,zoomControlsPosition:H,scrollHint:M,bottomCircle:j,bottomCircleOffset:G,initialIconShown:N,hide360Logo:$,logoSrc:J,imageInfo:K,hints:Q,theme:U,markerTheme:W,brandColor:_,ciToken:ee,ciFilters:oe,ciTransformation:te,cropAspectRatio:re,cropGravity:ne,lazyload:ae,hotspots:se,hotspotTrigger:ie,hotspotTimelineOnClick:le,aspectRatio:ue,onReady:me,onLoad:ce,onSpin:pe,onAutoplayStart:de,onAutoplayStop:fe,onFullscreenOpen:ye,onFullscreenClose:Ce,onZoomIn:ve,onZoomOut:we,onDragStart:Re,onDragEnd:Ie,onHotspotOpen:he,onHotspotClose:ze,onProductClick:Se,onError:Ve,...Te}=f,ge=n.useRef(null),Oe=n.useMemo(()=>({folder:l,apiVersion:m,filenameX:C,filenameY:u,imageListX:s,imageListY:w,indexZeroBase:i,amountX:c,amountY:p,draggable:z,swipeable:S,keys:V,keysReverse:g,autoplay:T,autoplayBehavior:O,playOnce:P,speed:Z,autoplayReverse:b,dragSpeed:L,dragReverse:k,stopAtEdges:A,inertia:F,fullscreen:X,magnifier:Y,pointerZoom:q,pinchZoom:x,zoomMax:B,zoomStep:D,zoomControls:E,zoomControlsPosition:H,scrollHint:M,bottomCircle:j,bottomCircleOffset:G,initialIconShown:N,hide360Logo:$,logoSrc:J,imageInfo:K,hints:Q,theme:U,markerTheme:W,brandColor:_,ciToken:ee,ciFilters:oe,ciTransformation:te,cropAspectRatio:re,cropGravity:ne,lazyload:ae,hotspots:se,hotspotTrigger:ie,hotspotTimelineOnClick:le,aspectRatio:ue,onReady:me,onLoad:ce,onSpin:pe,onAutoplayStart:de,onAutoplayStop:fe,onFullscreenOpen:ye,onFullscreenClose:Ce,onZoomIn:ve,onZoomOut:we,onDragStart:Re,onDragEnd:Ie,onHotspotOpen:he,onHotspotClose:ze,onProductClick:Se,onError:Ve}),[l,m,C,u,s,w,i,c,p,z,S,V,g,T,O,P,Z,b,L,k,A,F,X,Y,q,x,B,D,E,H,M,j,G,N,$,J,K,Q,U,W,_,ee,oe,te,re,ne,ae,se,ie,le,ue,me,ce,pe,de,fe,ye,Ce,ve,we,Re,Ie,he,ze,Se,Ve]),{getViewer:r}=I(ge,Oe);return n.useImperativeHandle(t,()=>({moveLeft:(e=1)=>{var o;return(o=r())==null?void 0:o.moveLeft(!1,e)},moveRight:(e=1)=>{var o;return(o=r())==null?void 0:o.moveRight(!1,e)},moveTop:(e=1)=>{var o;return(o=r())==null?void 0:o.moveTop(!1,e)},moveBottom:(e=1)=>{var o;return(o=r())==null?void 0:o.moveBottom(!1,e)},play:()=>{var e;return(e=r())==null?void 0:e.play()},stop:()=>{var e;return(e=r())==null?void 0:e.stopAutoplay()},zoomIn:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.zoomIn()},zoomOut:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.zoomOut()},resetZoom:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.resetZoom()},setZoom:e=>{var o,d;return(d=(o=r())==null?void 0:o.zoomPan)==null?void 0:d.setZoom(e)},goToFrame:(e,o)=>{var d;return(d=r())==null?void 0:d.animateToFrame(e,o)},getViewer:()=>r()}),[r]),Pe.jsx("div",{ref:ge,id:v,className:y,style:a,...Te})},h=n.forwardRef(Ze);h.displayName="CI360Viewer";exports.CI360Viewer=h;exports.CI360ViewerDefault=h;exports.useCI360=I;exports.useCI360Default=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("react/jsx-runtime"),n=require("react");let R=null;function I(f,t){const[v,y]=n.useState(!1),a=n.useRef(null),l=n.useRef(null),m=n.useId();n.useEffect(()=>{if(typeof window>"u"||!f.current||t.autoInit===!1)return;let u=!0;const s=f.current;return(async()=>{try{if(R||(R=(await Promise.resolve().then(()=>require("./ci360-B2r9u7br.js"))).default),!s||!u)return;s.id||(s.id=`ci360-${m.replace(/:/g,"")}`);const i={...t,onReady:c=>{var p;u&&(y(!0),(p=t.onReady)==null||p.call(t,c))}};l.current=new R,a.current=l.current.init(s,i)}catch(i){console.error("Failed to initialize CI360 viewer:",i)}})(),()=>{if(u=!1,a.current){try{a.current.destroy()}catch{}a.current=null}l.current=null,y(!1)}},[t.folder,t.filenameX,t.filenameY,t.filenameGrid,t.imageListX,t.imageListY,t.imageListGrid,t.amountX,t.amountY,t.hotspots,t.theme,t.aspectRatio,t.cropAspectRatio,t.cropGravity,m]);const C=n.useCallback(()=>a.current,[]);return{viewer:a.current,isReady:v,getViewer:C}}const Xe=(f,t)=>{const{id:v,className:y,style:a,folder:l,apiVersion:m,filenameX:C,filenameY:u,filenameGrid:s,imageListX:w,imageListY:i,imageListGrid:c,indexZeroBase:p,amountX:z,amountY:g,draggable:S,swipeable:V,keys:L,keysReverse:T,autoplay:O,autoplayBehavior:P,playOnce:Z,speed:b,autoplayReverse:A,dragSpeed:k,dragReverse:X,stopAtEdges:Y,stopAtEdgesX:E,stopAtEdgesY:F,inertia:G,fullscreen:q,magnifier:x,pointerZoom:B,pinchZoom:D,zoomMax:H,zoomStep:M,zoomControls:j,zoomControlsPosition:N,scrollHint:$,bottomCircle:J,bottomCircleOffset:K,initialIconShown:Q,hide360Logo:U,logoSrc:W,imageInfo:_,hints:ee,theme:oe,markerTheme:te,brandColor:re,ciToken:ne,ciFilters:ae,ciTransformation:se,cropAspectRatio:ie,cropGravity:le,lazyload:ue,hotspots:me,hotspotTrigger:ce,hotspotTimelineOnClick:pe,aspectRatio:de,onReady:fe,onLoad:ye,onSpin:Ce,onAutoplayStart:ve,onAutoplayStop:we,onFullscreenOpen:Re,onFullscreenClose:Ie,onZoomIn:he,onZoomOut:ze,onDragStart:ge,onDragEnd:Se,onHotspotOpen:Ve,onHotspotClose:Le,onProductClick:Te,onNavigate:Oe,onError:Pe,...be}=f,Ze=n.useRef(null),Ae=n.useMemo(()=>({folder:l,apiVersion:m,filenameX:C,filenameY:u,filenameGrid:s,imageListX:w,imageListY:i,imageListGrid:c,indexZeroBase:p,amountX:z,amountY:g,draggable:S,swipeable:V,keys:L,keysReverse:T,autoplay:O,autoplayBehavior:P,playOnce:Z,speed:b,autoplayReverse:A,dragSpeed:k,dragReverse:X,stopAtEdges:Y,stopAtEdgesX:E,stopAtEdgesY:F,inertia:G,fullscreen:q,magnifier:x,pointerZoom:B,pinchZoom:D,zoomMax:H,zoomStep:M,zoomControls:j,zoomControlsPosition:N,scrollHint:$,bottomCircle:J,bottomCircleOffset:K,initialIconShown:Q,hide360Logo:U,logoSrc:W,imageInfo:_,hints:ee,theme:oe,markerTheme:te,brandColor:re,ciToken:ne,ciFilters:ae,ciTransformation:se,cropAspectRatio:ie,cropGravity:le,lazyload:ue,hotspots:me,hotspotTrigger:ce,hotspotTimelineOnClick:pe,aspectRatio:de,onReady:fe,onLoad:ye,onSpin:Ce,onAutoplayStart:ve,onAutoplayStop:we,onFullscreenOpen:Re,onFullscreenClose:Ie,onZoomIn:he,onZoomOut:ze,onDragStart:ge,onDragEnd:Se,onHotspotOpen:Ve,onHotspotClose:Le,onProductClick:Te,onNavigate:Oe,onError:Pe}),[l,m,C,u,s,w,i,c,p,z,g,S,V,L,T,O,P,Z,b,A,k,X,Y,E,F,G,q,x,B,D,H,M,j,N,$,J,K,Q,U,W,_,ee,oe,te,re,ne,ae,se,ie,le,ue,me,ce,pe,de,fe,ye,Ce,ve,we,Re,Ie,he,ze,ge,Se,Ve,Le,Te,Oe,Pe]),{getViewer:r}=I(Ze,Ae);return n.useImperativeHandle(t,()=>({moveLeft:(e=1)=>{var o;return(o=r())==null?void 0:o.moveLeft(!1,e)},moveRight:(e=1)=>{var o;return(o=r())==null?void 0:o.moveRight(!1,e)},moveTop:(e=1)=>{var o;return(o=r())==null?void 0:o.moveTop(!1,e)},moveBottom:(e=1)=>{var o;return(o=r())==null?void 0:o.moveBottom(!1,e)},play:()=>{var e;return(e=r())==null?void 0:e.play()},stop:()=>{var e;return(e=r())==null?void 0:e.stopAutoplay()},zoomIn:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.zoomIn()},zoomOut:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.zoomOut()},resetZoom:()=>{var e,o;return(o=(e=r())==null?void 0:e.zoomPan)==null?void 0:o.resetZoom()},setZoom:e=>{var o,d;return(d=(o=r())==null?void 0:o.zoomPan)==null?void 0:d.setZoom(e)},goToFrame:(e,o)=>{var d;return(d=r())==null?void 0:d.animateToFrame(e,o)},getViewer:()=>r()}),[r]),ke.jsx("div",{ref:Ze,id:v,className:y,style:a,...be})},h=n.forwardRef(Xe);h.displayName="CI360Viewer";exports.CI360Viewer=h;exports.CI360ViewerDefault=h;exports.useCI360=I;exports.useCI360Default=I;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/react/useCI360.ts","../../src/react/CI360Viewer.tsx"],"sourcesContent":["import { useEffect, useRef, useState, useId, useCallback, type RefObject } from 'react';\nimport type {\n CI360Config,\n CI360ViewerInstance,\n UseCI360Return,\n UseCI360Options,\n} from './types';\n\n// Import CI360 class dynamically to avoid SSR issues\nlet CI360Class: any = null;\n\n/**\n * Custom hook for integrating CI360 viewer with React\n *\n * @param containerRef - React ref to the container element\n * @param config - CI360 configuration options\n * @returns Object containing viewer instance and ready state\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const containerRef = useRef<HTMLDivElement>(null);\n * const { viewer, isReady } = useCI360(containerRef, {\n * folder: 'https://example.com/images/',\n * filenameX: 'image-{index}.jpg',\n * amountX: 36,\n * });\n *\n * return <div ref={containerRef} />;\n * }\n * ```\n */\nexport function useCI360(\n containerRef: RefObject<HTMLDivElement | null>,\n config: UseCI360Options\n): UseCI360Return {\n const [isReady, setIsReady] = useState(false);\n const viewerRef = useRef<CI360ViewerInstance | null>(null);\n const ci360Ref = useRef<any>(null);\n const uniqueId = useId();\n\n // Initialize viewer\n useEffect(() => {\n // SSR guard\n if (typeof window === 'undefined') return;\n if (!containerRef.current) return;\n if (config.autoInit === false) return;\n\n let isMounted = true;\n const container = containerRef.current;\n\n const initViewer = async () => {\n try {\n // Dynamically import CI360 to avoid SSR issues\n if (!CI360Class) {\n const module = await import('../ci360');\n CI360Class = module.default;\n }\n\n if (!container || !isMounted) return;\n\n // Set a unique ID on the container if not present\n if (!container.id) {\n container.id = `ci360-${uniqueId.replace(/:/g, '')}`;\n }\n\n // Wrap user callbacks to update React state\n const wrappedConfig: CI360Config = {\n ...config,\n onReady: (data) => {\n if (isMounted) {\n setIsReady(true);\n config.onReady?.(data);\n }\n },\n };\n\n // Create CI360 instance and initialize viewer\n ci360Ref.current = new CI360Class();\n viewerRef.current = ci360Ref.current.init(container, wrappedConfig);\n } catch (error) {\n console.error('Failed to initialize CI360 viewer:', error);\n }\n };\n\n initViewer();\n\n // Cleanup on unmount or when dependencies change\n return () => {\n isMounted = false;\n if (viewerRef.current) {\n try {\n viewerRef.current.destroy();\n } catch (e) {\n // Ignore errors during cleanup - element may already be detached\n }\n viewerRef.current = null;\n }\n ci360Ref.current = null;\n setIsReady(false);\n };\n }, [\n config.folder,\n config.filenameX,\n config.filenameY,\n config.imageListX,\n config.imageListY,\n config.amountX,\n config.amountY,\n config.hotspots,\n config.theme,\n config.aspectRatio,\n config.cropAspectRatio,\n config.cropGravity,\n uniqueId,\n ]);\n\n // Stable getter to always return current viewer (avoids stale closures)\n const getViewer = useCallback(() => viewerRef.current, []);\n\n return {\n viewer: viewerRef.current,\n isReady,\n getViewer,\n };\n}\n\nexport default useCI360;\n","import {\n useRef,\n useImperativeHandle,\n forwardRef,\n useMemo,\n type ForwardRefRenderFunction,\n} from 'react';\nimport { useCI360 } from './useCI360';\nimport type {\n CI360ViewerProps,\n CI360ViewerRef,\n CI360Config,\n} from './types';\n\n/**\n * CI360Viewer React Component\n *\n * A declarative React wrapper for the CI360 360-degree image viewer.\n *\n * @example\n * ```tsx\n * import { CI360Viewer } from 'js-cloudimage-360-view/react';\n * import 'js-cloudimage-360-view/css';\n *\n * function ProductView() {\n * return (\n * <CI360Viewer\n * folder=\"https://example.com/images/\"\n * filenameX=\"product-{index}.jpg\"\n * amountX={36}\n * autoplay\n * fullscreen\n * />\n * );\n * }\n * ```\n *\n * @example With ref for imperative control\n * ```tsx\n * import { useRef } from 'react';\n * import { CI360Viewer, CI360ViewerRef } from 'js-cloudimage-360-view/react';\n *\n * function ProductView() {\n * const viewerRef = useRef<CI360ViewerRef>(null);\n *\n * return (\n * <>\n * <CI360Viewer\n * ref={viewerRef}\n * folder=\"https://example.com/images/\"\n * filenameX=\"{index}.jpg\"\n * amountX={36}\n * onSpin={(e) => console.log(`Frame: ${e.activeImageX}`)}\n * />\n * <button onClick={() => viewerRef.current?.play()}>Play</button>\n * <button onClick={() => viewerRef.current?.stop()}>Stop</button>\n * </>\n * );\n * }\n * ```\n */\nconst CI360ViewerComponent: ForwardRefRenderFunction<\n CI360ViewerRef,\n CI360ViewerProps\n> = (props, ref) => {\n const {\n // Container props\n id,\n className,\n style,\n\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n imageListX,\n imageListY,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onError,\n\n ...restProps\n } = props;\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Memoize config to prevent unnecessary re-initializations\n const config = useMemo<CI360Config>(\n () => ({\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n imageListX,\n imageListY,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onError,\n }),\n [\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n imageListX,\n imageListY,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onError,\n ]\n );\n\n const { getViewer } = useCI360(containerRef, config);\n\n // Expose imperative methods via ref\n // Use getViewer() inside methods to always get the current viewer instance,\n // avoiding stale closure issues when the viewer initializes after first render\n useImperativeHandle(\n ref,\n () => ({\n moveLeft: (steps = 1) => getViewer()?.moveLeft(false, steps),\n moveRight: (steps = 1) => getViewer()?.moveRight(false, steps),\n moveTop: (steps = 1) => getViewer()?.moveTop(false, steps),\n moveBottom: (steps = 1) => getViewer()?.moveBottom(false, steps),\n play: () => getViewer()?.play(),\n stop: () => getViewer()?.stopAutoplay(),\n zoomIn: () => getViewer()?.zoomPan?.zoomIn(),\n zoomOut: () => getViewer()?.zoomPan?.zoomOut(),\n resetZoom: () => getViewer()?.zoomPan?.resetZoom(),\n setZoom: (level: number) => getViewer()?.zoomPan?.setZoom(level),\n goToFrame: (frame: number, hotspotId?: string) =>\n getViewer()?.animateToFrame(frame, hotspotId),\n getViewer: () => getViewer(),\n }),\n [getViewer]\n );\n\n return (\n <div\n ref={containerRef}\n id={id}\n className={className}\n style={style}\n {...restProps}\n />\n );\n};\n\nexport const CI360Viewer = forwardRef(CI360ViewerComponent);\nCI360Viewer.displayName = 'CI360Viewer';\n\nexport default CI360Viewer;\n"],"names":["CI360Class","useCI360","containerRef","config","isReady","setIsReady","useState","viewerRef","useRef","ci360Ref","uniqueId","useId","useEffect","isMounted","container","wrappedConfig","data","_a","error","getViewer","useCallback","CI360ViewerComponent","props","ref","id","className","style","folder","apiVersion","filenameX","filenameY","imageListX","imageListY","indexZeroBase","amountX","amountY","draggable","swipeable","keys","keysReverse","autoplay","autoplayBehavior","playOnce","speed","autoplayReverse","dragSpeed","dragReverse","stopAtEdges","inertia","fullscreen","magnifier","pointerZoom","pinchZoom","zoomMax","zoomStep","zoomControls","zoomControlsPosition","scrollHint","bottomCircle","bottomCircleOffset","initialIconShown","hide360Logo","logoSrc","imageInfo","hints","theme","markerTheme","brandColor","ciToken","ciFilters","ciTransformation","cropAspectRatio","cropGravity","lazyload","hotspots","hotspotTrigger","hotspotTimelineOnClick","aspectRatio","onReady","onLoad","onSpin","onAutoplayStart","onAutoplayStop","onFullscreenOpen","onFullscreenClose","onZoomIn","onZoomOut","onDragStart","onDragEnd","onHotspotOpen","onHotspotClose","onProductClick","onError","restProps","useMemo","useImperativeHandle","steps","_b","level","frame","hotspotId","jsx","CI360Viewer","forwardRef"],"mappings":"yIASA,IAAIA,EAAkB,KAuBf,SAASC,EACdC,EACAC,EACgB,CAChB,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EACtCC,EAAYC,EAAAA,OAAmC,IAAI,EACnDC,EAAWD,EAAAA,OAAY,IAAI,EAC3BE,EAAWC,EAAAA,MAAA,EAGjBC,EAAAA,UAAU,IAAM,CAId,GAFI,OAAO,OAAW,KAClB,CAACV,EAAa,SACdC,EAAO,WAAa,GAAO,OAE/B,IAAIU,EAAY,GAChB,MAAMC,EAAYZ,EAAa,QAoC/B,OAlCmB,SAAY,CAC7B,GAAI,CAOF,GALKF,IAEHA,GADe,MAAM,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,qBAAU,CAAA,GAClB,SAGlB,CAACc,GAAa,CAACD,EAAW,OAGzBC,EAAU,KACbA,EAAU,GAAK,SAASJ,EAAS,QAAQ,KAAM,EAAE,CAAC,IAIpD,MAAMK,EAA6B,CACjC,GAAGZ,EACH,QAAUa,GAA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AAF,EAAa,UAAb,YAAAgF,EAAsB,WACrC,UAAW,IAAA,SAAM,OAAAA,GAAAhF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAgF,EAAsB,aACvC,QAAUC,GAAA,SAAkB,OAAAD,GAAAhF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAgF,EAAsB,QAAQC,IAC1D,UAAW,CAACC,EAAeC,IAAA,OACzB,OAAAnF,EAAAE,MAAA,YAAAF,EAAa,eAAekF,EAAOC,IACrC,UAAW,IAAMjF,EAAA,CAAU,GAE7B,CAACA,CAAS,CAAA,EAIVkF,GAAAA,IAAC,MAAA,CACC,IAAKnG,GACL,GAAAsB,EACA,UAAAC,EACA,MAAAC,EACC,GAAGmE,EAAA,CAAA,CAGV,EAEaS,EAAcC,EAAAA,WAAWlF,EAAoB,EAC1DiF,EAAY,YAAc"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/react/useCI360.ts","../../src/react/CI360Viewer.tsx"],"sourcesContent":["import { useEffect, useRef, useState, useId, useCallback, type RefObject } from 'react';\nimport type {\n CI360Config,\n CI360ViewerInstance,\n UseCI360Return,\n UseCI360Options,\n} from './types';\n\n// Import CI360 class dynamically to avoid SSR issues\nlet CI360Class: any = null;\n\n/**\n * Custom hook for integrating CI360 viewer with React\n *\n * @param containerRef - React ref to the container element\n * @param config - CI360 configuration options\n * @returns Object containing viewer instance and ready state\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const containerRef = useRef<HTMLDivElement>(null);\n * const { viewer, isReady } = useCI360(containerRef, {\n * folder: 'https://example.com/images/',\n * filenameX: 'image-{index}.jpg',\n * amountX: 36,\n * });\n *\n * return <div ref={containerRef} />;\n * }\n * ```\n */\nexport function useCI360(\n containerRef: RefObject<HTMLDivElement | null>,\n config: UseCI360Options\n): UseCI360Return {\n const [isReady, setIsReady] = useState(false);\n const viewerRef = useRef<CI360ViewerInstance | null>(null);\n const ci360Ref = useRef<any>(null);\n const uniqueId = useId();\n\n // Initialize viewer\n useEffect(() => {\n // SSR guard\n if (typeof window === 'undefined') return;\n if (!containerRef.current) return;\n if (config.autoInit === false) return;\n\n let isMounted = true;\n const container = containerRef.current;\n\n const initViewer = async () => {\n try {\n // Dynamically import CI360 to avoid SSR issues\n if (!CI360Class) {\n const module = await import('../ci360');\n CI360Class = module.default;\n }\n\n if (!container || !isMounted) return;\n\n // Set a unique ID on the container if not present\n if (!container.id) {\n container.id = `ci360-${uniqueId.replace(/:/g, '')}`;\n }\n\n // Wrap user callbacks to update React state\n const wrappedConfig: CI360Config = {\n ...config,\n onReady: (data) => {\n if (isMounted) {\n setIsReady(true);\n config.onReady?.(data);\n }\n },\n };\n\n // Create CI360 instance and initialize viewer\n ci360Ref.current = new CI360Class();\n viewerRef.current = ci360Ref.current.init(container, wrappedConfig);\n } catch (error) {\n console.error('Failed to initialize CI360 viewer:', error);\n }\n };\n\n initViewer();\n\n // Cleanup on unmount or when dependencies change\n return () => {\n isMounted = false;\n if (viewerRef.current) {\n try {\n viewerRef.current.destroy();\n } catch (e) {\n // Ignore errors during cleanup - element may already be detached\n }\n viewerRef.current = null;\n }\n ci360Ref.current = null;\n setIsReady(false);\n };\n }, [\n config.folder,\n config.filenameX,\n config.filenameY,\n config.filenameGrid,\n config.imageListX,\n config.imageListY,\n config.imageListGrid,\n config.amountX,\n config.amountY,\n config.hotspots,\n config.theme,\n config.aspectRatio,\n config.cropAspectRatio,\n config.cropGravity,\n uniqueId,\n ]);\n\n // Stable getter to always return current viewer (avoids stale closures)\n const getViewer = useCallback(() => viewerRef.current, []);\n\n return {\n viewer: viewerRef.current,\n isReady,\n getViewer,\n };\n}\n\nexport default useCI360;\n","import {\n useRef,\n useImperativeHandle,\n forwardRef,\n useMemo,\n type ForwardRefRenderFunction,\n} from 'react';\nimport { useCI360 } from './useCI360';\nimport type {\n CI360ViewerProps,\n CI360ViewerRef,\n CI360Config,\n} from './types';\n\n/**\n * CI360Viewer React Component\n *\n * A declarative React wrapper for the CI360 360-degree image viewer.\n *\n * @example\n * ```tsx\n * import { CI360Viewer } from 'js-cloudimage-360-view/react';\n * import 'js-cloudimage-360-view/css';\n *\n * function ProductView() {\n * return (\n * <CI360Viewer\n * folder=\"https://example.com/images/\"\n * filenameX=\"product-{index}.jpg\"\n * amountX={36}\n * autoplay\n * fullscreen\n * />\n * );\n * }\n * ```\n *\n * @example With ref for imperative control\n * ```tsx\n * import { useRef } from 'react';\n * import { CI360Viewer, CI360ViewerRef } from 'js-cloudimage-360-view/react';\n *\n * function ProductView() {\n * const viewerRef = useRef<CI360ViewerRef>(null);\n *\n * return (\n * <>\n * <CI360Viewer\n * ref={viewerRef}\n * folder=\"https://example.com/images/\"\n * filenameX=\"{index}.jpg\"\n * amountX={36}\n * onSpin={(e) => console.log(`Frame: ${e.activeImageX}`)}\n * />\n * <button onClick={() => viewerRef.current?.play()}>Play</button>\n * <button onClick={() => viewerRef.current?.stop()}>Stop</button>\n * </>\n * );\n * }\n * ```\n */\nconst CI360ViewerComponent: ForwardRefRenderFunction<\n CI360ViewerRef,\n CI360ViewerProps\n> = (props, ref) => {\n const {\n // Container props\n id,\n className,\n style,\n\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n filenameGrid,\n imageListX,\n imageListY,\n imageListGrid,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n stopAtEdgesX,\n stopAtEdgesY,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onNavigate,\n onError,\n\n ...restProps\n } = props;\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Memoize config to prevent unnecessary re-initializations\n const config = useMemo<CI360Config>(\n () => ({\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n filenameGrid,\n imageListX,\n imageListY,\n imageListGrid,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n stopAtEdgesX,\n stopAtEdgesY,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onNavigate,\n onError,\n }),\n [\n // Image source\n folder,\n apiVersion,\n filenameX,\n filenameY,\n filenameGrid,\n imageListX,\n imageListY,\n imageListGrid,\n indexZeroBase,\n amountX,\n amountY,\n\n // Behavior\n draggable,\n swipeable,\n keys,\n keysReverse,\n autoplay,\n autoplayBehavior,\n playOnce,\n speed,\n autoplayReverse,\n dragSpeed,\n dragReverse,\n stopAtEdges,\n stopAtEdgesX,\n stopAtEdgesY,\n inertia,\n\n // UI Features\n fullscreen,\n magnifier,\n pointerZoom,\n pinchZoom,\n zoomMax,\n zoomStep,\n zoomControls,\n zoomControlsPosition,\n scrollHint,\n bottomCircle,\n bottomCircleOffset,\n initialIconShown,\n hide360Logo,\n logoSrc,\n imageInfo,\n hints,\n theme,\n markerTheme,\n brandColor,\n\n // Cloudimage CDN\n ciToken,\n ciFilters,\n ciTransformation,\n cropAspectRatio,\n cropGravity,\n\n // Loading\n lazyload,\n\n // Hotspots\n hotspots,\n hotspotTrigger,\n hotspotTimelineOnClick,\n\n // Container\n aspectRatio,\n\n // Event callbacks\n onReady,\n onLoad,\n onSpin,\n onAutoplayStart,\n onAutoplayStop,\n onFullscreenOpen,\n onFullscreenClose,\n onZoomIn,\n onZoomOut,\n onDragStart,\n onDragEnd,\n onHotspotOpen,\n onHotspotClose,\n onProductClick,\n onNavigate,\n onError,\n ]\n );\n\n const { getViewer } = useCI360(containerRef, config);\n\n // Expose imperative methods via ref\n // Use getViewer() inside methods to always get the current viewer instance,\n // avoiding stale closure issues when the viewer initializes after first render\n useImperativeHandle(\n ref,\n () => ({\n moveLeft: (steps = 1) => getViewer()?.moveLeft(false, steps),\n moveRight: (steps = 1) => getViewer()?.moveRight(false, steps),\n moveTop: (steps = 1) => getViewer()?.moveTop(false, steps),\n moveBottom: (steps = 1) => getViewer()?.moveBottom(false, steps),\n play: () => getViewer()?.play(),\n stop: () => getViewer()?.stopAutoplay(),\n zoomIn: () => getViewer()?.zoomPan?.zoomIn(),\n zoomOut: () => getViewer()?.zoomPan?.zoomOut(),\n resetZoom: () => getViewer()?.zoomPan?.resetZoom(),\n setZoom: (level: number) => getViewer()?.zoomPan?.setZoom(level),\n goToFrame: (frame: number, hotspotId?: string) =>\n getViewer()?.animateToFrame(frame, hotspotId),\n getViewer: () => getViewer(),\n }),\n [getViewer]\n );\n\n return (\n <div\n ref={containerRef}\n id={id}\n className={className}\n style={style}\n {...restProps}\n />\n );\n};\n\nexport const CI360Viewer = forwardRef(CI360ViewerComponent);\nCI360Viewer.displayName = 'CI360Viewer';\n\nexport default CI360Viewer;\n"],"names":["CI360Class","useCI360","containerRef","config","isReady","setIsReady","useState","viewerRef","useRef","ci360Ref","uniqueId","useId","useEffect","isMounted","container","wrappedConfig","data","_a","error","getViewer","useCallback","CI360ViewerComponent","props","ref","id","className","style","folder","apiVersion","filenameX","filenameY","filenameGrid","imageListX","imageListY","imageListGrid","indexZeroBase","amountX","amountY","draggable","swipeable","keys","keysReverse","autoplay","autoplayBehavior","playOnce","speed","autoplayReverse","dragSpeed","dragReverse","stopAtEdges","stopAtEdgesX","stopAtEdgesY","inertia","fullscreen","magnifier","pointerZoom","pinchZoom","zoomMax","zoomStep","zoomControls","zoomControlsPosition","scrollHint","bottomCircle","bottomCircleOffset","initialIconShown","hide360Logo","logoSrc","imageInfo","hints","theme","markerTheme","brandColor","ciToken","ciFilters","ciTransformation","cropAspectRatio","cropGravity","lazyload","hotspots","hotspotTrigger","hotspotTimelineOnClick","aspectRatio","onReady","onLoad","onSpin","onAutoplayStart","onAutoplayStop","onFullscreenOpen","onFullscreenClose","onZoomIn","onZoomOut","onDragStart","onDragEnd","onHotspotOpen","onHotspotClose","onProductClick","onNavigate","onError","restProps","useMemo","useImperativeHandle","steps","_b","level","frame","hotspotId","jsx","CI360Viewer","forwardRef"],"mappings":"yIASA,IAAIA,EAAkB,KAuBf,SAASC,EACdC,EACAC,EACgB,CAChB,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EACtCC,EAAYC,EAAAA,OAAmC,IAAI,EACnDC,EAAWD,EAAAA,OAAY,IAAI,EAC3BE,E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AC,EACA,MAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,YAAAC,EACA,YAAAC,EACF,aAAAC,EACA,aAAAC,EACE,QAAAC,EAGA,WAAAC,EACA,UAAAC,EACA,YAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,EACA,aAAAC,EACA,qBAAAC,EACA,WAAAC,EACA,aAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,QAAAC,EACA,UAAAC,EACA,MAAAC,GACA,MAAAC,GACA,YAAAC,GACA,WAAAC,GAGA,QAAAC,GACA,UAAAC,GACA,iBAAAC,GACA,gBAAAC,GACA,YAAAC,GAGA,SAAAC,GAGA,SAAAC,GACA,eAAAC,GACA,uBAAAC,GAGA,YAAAC,GAGA,QAAAC,GACA,OAAAC,GACA,OAAAC,GACA,gBAAAC,GACA,eAAAC,GACA,iBAAAC,GACA,kBAAAC,GACA,SAAAC,GACA,UAAAC,GACA,YAAAC,GACA,UAAAC,GACA,cAAAC,GACA,eAAAC,GACA,eAAAC,GACA,WAAAC,GACA,QAAAC,EAAA,GAEF,CAEEtE,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACFC,EACAC,EACEC,EAGAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GACAC,GACAC,GACAC,GAGAC,GACAC,GACAC,GACAC,GACAC,GAGAC,GAGAC,GACAC,GACAC,GAGAC,GAGAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,EAAA,CACF,EAGI,CAAE,UAAA9E,CAAA,EAAclB,EAASC,GAAcC,EAAM,EAKnDiG,OAAAA,EAAAA,oBACE7E,EACA,KAAO,CACL,SAAU,CAAC8E,EAAQ,IAAA,OAAM,OAAApF,EAAAE,MAAA,YAAAF,EAAa,SAAS,GAAOoF,IACtD,UAAW,CAACA,EAAQ,IAAA,OAAM,OAAApF,EAAAE,MAAA,YAAAF,EAAa,UAAU,GAAOoF,IACxD,QAAS,CAACA,EAAQ,IAAA,OAAM,OAAApF,EAAAE,MAAA,YAAAF,EAAa,QAAQ,GAAOoF,IACpD,WAAY,CAACA,EAAQ,IAAA,OAAM,OAAApF,EAAAE,MAAA,YAAAF,EAAa,WAAW,GAAOoF,IAC1D,KAAM,IAAA,OAAM,OAAApF,EAAAE,EAAA,IAAA,YAAAF,EAAa,QACzB,KAAM,IAAA,OAAM,OAAAA,EAAAE,EAAA,IAAA,YAAAF,EAAa,gBACzB,OAAQ,IAAA,SAAM,OAAAqF,GAAArF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAqF,EAAsB,UACpC,QAAS,IAAA,SAAM,OAAAA,GAAArF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAqF,EAAsB,WACrC,UAAW,IAAA,SAAM,OAAAA,GAAArF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAqF,EAAsB,aACvC,QAAUC,GAAA,SAAkB,OAAAD,GAAArF,EAAAE,MAAA,YAAAF,EAAa,UAAb,YAAAqF,EAAsB,QAAQC,IAC1D,UAAW,CAACC,EAAeC,IAAA,OACzB,OAAAxF,EAAAE,MAAA,YAAAF,EAAa,eAAeuF,EAAOC,IACrC,UAAW,IAAMtF,EAAA,CAAU,GAE7B,CAACA,CAAS,CAAA,EAIVuF,GAAAA,IAAC,MAAA,CACC,IAAKxG,GACL,GAAAsB,EACA,UAAAC,EACA,MAAAC,EACC,GAAGwE,EAAA,CAAA,CAGV,EAEaS,EAAcC,EAAAA,WAAWvF,EAAoB,EAC1DsF,EAAY,YAAc"}
@@ -76,6 +76,8 @@ export interface Hotspot {
76
76
  content?: string;
77
77
  data?: PopoverData;
78
78
  className?: string;
79
+ /** Scene ID to navigate to when this hotspot is clicked. */
80
+ navigateTo?: string;
79
81
  }
80
82
 
81
83
  /**
@@ -93,6 +95,7 @@ export interface SpinEventData {
93
95
  activeImageY: number;
94
96
  amountX: number;
95
97
  amountY: number;
98
+ isGridMode: boolean;
96
99
  }
97
100
 
98
101
  /**
@@ -102,6 +105,7 @@ export interface LoadEventData {
102
105
  viewerId: string;
103
106
  imagesX: number;
104
107
  imagesY: number;
108
+ imagesGrid?: number;
105
109
  }
106
110
 
107
111
  /**
@@ -140,6 +144,8 @@ export interface CI360Config {
140
144
  filenameY?: string | null;
141
145
  imageListX?: string | string[] | null;
142
146
  imageListY?: string | string[] | null;
147
+ filenameGrid?: string | null;
148
+ imageListGrid?: string | string[] | string[][] | null;
143
149
  indexZeroBase?: number;
144
150
  amountX?: number;
145
151
  amountY?: number;
@@ -155,6 +161,8 @@ export interface CI360Config {
155
161
  dragSpeed?: number;
156
162
  dragReverse?: boolean;
157
163
  stopAtEdges?: boolean;
164
+ stopAtEdgesX?: boolean | null;
165
+ stopAtEdgesY?: boolean | null;
158
166
  inertia?: boolean;
159
167
  fullscreen?: boolean;
160
168
  /** @deprecated Use zoomMax instead. Will be ignored. */
@@ -201,6 +209,7 @@ export interface CI360Config {
201
209
  onHotspotOpen?: (hotspotId: string) => void;
202
210
  onHotspotClose?: (hotspotId: string) => void;
203
211
  onProductClick?: (productId: string, hotspotId: string) => void;
212
+ onNavigate?: (targetSceneId: string) => void;
204
213
  onError?: (data: ErrorEventData) => void;
205
214
  }
206
215
 
@@ -234,6 +243,7 @@ export interface CI360ViewerInstance {
234
243
  amountX: number;
235
244
  amountY: number;
236
245
  isZoomed: boolean;
246
+ isGridMode: boolean;
237
247
  viewerConfig: CI360Config;
238
248
  }
239
249
 
@@ -1,16 +1,16 @@
1
- import { jsx as Ze } from "react/jsx-runtime";
2
- import { useState as ge, useRef as I, useId as Le, useEffect as Oe, useCallback as ke, forwardRef as Pe, useMemo as be, useImperativeHandle as Ae } from "react";
3
- let v = null;
4
- function Fe(d, t) {
5
- const [C, f] = ge(!1), n = I(null), i = I(null), m = Le();
6
- Oe(() => {
1
+ import { jsx as ke } from "react/jsx-runtime";
2
+ import { useState as Pe, useRef as I, useId as Xe, useEffect as Ye, useCallback as be, forwardRef as Ee, useMemo as Fe, useImperativeHandle as Ge } from "react";
3
+ let w = null;
4
+ function xe(d, t) {
5
+ const [C, f] = Pe(!1), a = I(null), i = I(null), m = Xe();
6
+ Ye(() => {
7
7
  if (typeof window > "u" || !d.current || t.autoInit === !1) return;
8
8
  let l = !0;
9
- const a = d.current;
9
+ const n = d.current;
10
10
  return (async () => {
11
11
  try {
12
- if (v || (v = (await import("./ci360-BJ_JCEiA.mjs")).default), !a || !l) return;
13
- a.id || (a.id = `ci360-${m.replace(/:/g, "")}`);
12
+ if (w || (w = (await import("./ci360-BFobl9uu.mjs")).default), !n || !l) return;
13
+ n.id || (n.id = `ci360-${m.replace(/:/g, "")}`);
14
14
  const s = {
15
15
  ...t,
16
16
  onReady: (u) => {
@@ -18,17 +18,17 @@ function Fe(d, t) {
18
18
  l && (f(!0), (p = t.onReady) == null || p.call(t, u));
19
19
  }
20
20
  };
21
- i.current = new v(), n.current = i.current.init(a, s);
21
+ i.current = new w(), a.current = i.current.init(n, s);
22
22
  } catch (s) {
23
23
  console.error("Failed to initialize CI360 viewer:", s);
24
24
  }
25
25
  })(), () => {
26
- if (l = !1, n.current) {
26
+ if (l = !1, a.current) {
27
27
  try {
28
- n.current.destroy();
28
+ a.current.destroy();
29
29
  } catch {
30
30
  }
31
- n.current = null;
31
+ a.current = null;
32
32
  }
33
33
  i.current = null, f(!1);
34
34
  };
@@ -36,8 +36,10 @@ function Fe(d, t) {
36
36
  t.folder,
37
37
  t.filenameX,
38
38
  t.filenameY,
39
+ t.filenameGrid,
39
40
  t.imageListX,
40
41
  t.imageListY,
42
+ t.imageListGrid,
41
43
  t.amountX,
42
44
  t.amountY,
43
45
  t.hotspots,
@@ -47,170 +49,180 @@ function Fe(d, t) {
47
49
  t.cropGravity,
48
50
  m
49
51
  ]);
50
- const y = ke(() => n.current, []);
52
+ const y = be(() => a.current, []);
51
53
  return {
52
- viewer: n.current,
54
+ viewer: a.current,
53
55
  isReady: C,
54
56
  getViewer: y
55
57
  };
56
58
  }
57
- const Xe = (d, t) => {
59
+ const Be = (d, t) => {
58
60
  const {
59
61
  // Container props
60
62
  id: C,
61
63
  className: f,
62
- style: n,
64
+ style: a,
63
65
  // Image source
64
66
  folder: i,
65
67
  apiVersion: m,
66
68
  filenameX: y,
67
69
  filenameY: l,
68
- imageListX: a,
69
- imageListY: w,
70
- indexZeroBase: s,
71
- amountX: u,
72
- amountY: p,
70
+ filenameGrid: n,
71
+ imageListX: v,
72
+ imageListY: s,
73
+ imageListGrid: u,
74
+ indexZeroBase: p,
75
+ amountX: R,
76
+ amountY: h,
73
77
  // Behavior
74
- draggable: R,
75
- swipeable: h,
76
- keys: z,
78
+ draggable: z,
79
+ swipeable: g,
80
+ keys: L,
77
81
  keysReverse: V,
78
82
  autoplay: S,
79
83
  autoplayBehavior: T,
80
84
  playOnce: Z,
81
- speed: g,
82
- autoplayReverse: L,
83
- dragSpeed: O,
84
- dragReverse: k,
85
- stopAtEdges: P,
86
- inertia: b,
85
+ speed: A,
86
+ autoplayReverse: O,
87
+ dragSpeed: k,
88
+ dragReverse: P,
89
+ stopAtEdges: X,
90
+ stopAtEdgesX: Y,
91
+ stopAtEdgesY: b,
92
+ inertia: E,
87
93
  // UI Features
88
- fullscreen: A,
89
- magnifier: F,
90
- pointerZoom: X,
91
- pinchZoom: Y,
92
- zoomMax: x,
93
- zoomStep: B,
94
- zoomControls: D,
95
- zoomControlsPosition: E,
96
- scrollHint: H,
97
- bottomCircle: M,
98
- bottomCircleOffset: G,
99
- initialIconShown: N,
100
- hide360Logo: j,
101
- logoSrc: q,
102
- imageInfo: $,
103
- hints: J,
104
- theme: K,
105
- markerTheme: Q,
106
- brandColor: U,
94
+ fullscreen: F,
95
+ magnifier: G,
96
+ pointerZoom: x,
97
+ pinchZoom: B,
98
+ zoomMax: D,
99
+ zoomStep: H,
100
+ zoomControls: M,
101
+ zoomControlsPosition: N,
102
+ scrollHint: j,
103
+ bottomCircle: q,
104
+ bottomCircleOffset: $,
105
+ initialIconShown: J,
106
+ hide360Logo: K,
107
+ logoSrc: Q,
108
+ imageInfo: U,
109
+ hints: W,
110
+ theme: _,
111
+ markerTheme: ee,
112
+ brandColor: oe,
107
113
  // Cloudimage CDN
108
- ciToken: W,
109
- ciFilters: _,
110
- ciTransformation: ee,
111
- cropAspectRatio: oe,
112
- cropGravity: te,
114
+ ciToken: te,
115
+ ciFilters: re,
116
+ ciTransformation: ae,
117
+ cropAspectRatio: ne,
118
+ cropGravity: se,
113
119
  // Loading
114
- lazyload: re,
120
+ lazyload: ie,
115
121
  // Hotspots
116
- hotspots: ne,
117
- hotspotTrigger: ae,
118
- hotspotTimelineOnClick: se,
122
+ hotspots: le,
123
+ hotspotTrigger: me,
124
+ hotspotTimelineOnClick: ue,
119
125
  // Container
120
- aspectRatio: ie,
126
+ aspectRatio: pe,
121
127
  // Event callbacks
122
- onReady: le,
123
- onLoad: me,
124
- onSpin: ue,
125
- onAutoplayStart: pe,
126
- onAutoplayStop: ce,
127
- onFullscreenOpen: de,
128
- onFullscreenClose: fe,
129
- onZoomIn: ye,
130
- onZoomOut: Ce,
131
- onDragStart: we,
132
- onDragEnd: ve,
133
- onHotspotOpen: Ie,
134
- onHotspotClose: Re,
135
- onProductClick: he,
136
- onError: ze,
137
- ...Se
138
- } = d, Ve = I(null), Te = be(
128
+ onReady: ce,
129
+ onLoad: de,
130
+ onSpin: fe,
131
+ onAutoplayStart: ye,
132
+ onAutoplayStop: Ce,
133
+ onFullscreenOpen: ve,
134
+ onFullscreenClose: we,
135
+ onZoomIn: Ie,
136
+ onZoomOut: Re,
137
+ onDragStart: he,
138
+ onDragEnd: ze,
139
+ onHotspotOpen: ge,
140
+ onHotspotClose: Le,
141
+ onProductClick: Ve,
142
+ onNavigate: Se,
143
+ onError: Te,
144
+ ...Ae
145
+ } = d, Ze = I(null), Oe = Fe(
139
146
  () => ({
140
147
  // Image source
141
148
  folder: i,
142
149
  apiVersion: m,
143
150
  filenameX: y,
144
151
  filenameY: l,
145
- imageListX: a,
146
- imageListY: w,
147
- indexZeroBase: s,
148
- amountX: u,
149
- amountY: p,
152
+ filenameGrid: n,
153
+ imageListX: v,
154
+ imageListY: s,
155
+ imageListGrid: u,
156
+ indexZeroBase: p,
157
+ amountX: R,
158
+ amountY: h,
150
159
  // Behavior
151
- draggable: R,
152
- swipeable: h,
153
- keys: z,
160
+ draggable: z,
161
+ swipeable: g,
162
+ keys: L,
154
163
  keysReverse: V,
155
164
  autoplay: S,
156
165
  autoplayBehavior: T,
157
166
  playOnce: Z,
158
- speed: g,
159
- autoplayReverse: L,
160
- dragSpeed: O,
161
- dragReverse: k,
162
- stopAtEdges: P,
163
- inertia: b,
167
+ speed: A,
168
+ autoplayReverse: O,
169
+ dragSpeed: k,
170
+ dragReverse: P,
171
+ stopAtEdges: X,
172
+ stopAtEdgesX: Y,
173
+ stopAtEdgesY: b,
174
+ inertia: E,
164
175
  // UI Features
165
- fullscreen: A,
166
- magnifier: F,
167
- pointerZoom: X,
168
- pinchZoom: Y,
169
- zoomMax: x,
170
- zoomStep: B,
171
- zoomControls: D,
172
- zoomControlsPosition: E,
173
- scrollHint: H,
174
- bottomCircle: M,
175
- bottomCircleOffset: G,
176
- initialIconShown: N,
177
- hide360Logo: j,
178
- logoSrc: q,
179
- imageInfo: $,
180
- hints: J,
181
- theme: K,
182
- markerTheme: Q,
183
- brandColor: U,
176
+ fullscreen: F,
177
+ magnifier: G,
178
+ pointerZoom: x,
179
+ pinchZoom: B,
180
+ zoomMax: D,
181
+ zoomStep: H,
182
+ zoomControls: M,
183
+ zoomControlsPosition: N,
184
+ scrollHint: j,
185
+ bottomCircle: q,
186
+ bottomCircleOffset: $,
187
+ initialIconShown: J,
188
+ hide360Logo: K,
189
+ logoSrc: Q,
190
+ imageInfo: U,
191
+ hints: W,
192
+ theme: _,
193
+ markerTheme: ee,
194
+ brandColor: oe,
184
195
  // Cloudimage CDN
185
- ciToken: W,
186
- ciFilters: _,
187
- ciTransformation: ee,
188
- cropAspectRatio: oe,
189
- cropGravity: te,
196
+ ciToken: te,
197
+ ciFilters: re,
198
+ ciTransformation: ae,
199
+ cropAspectRatio: ne,
200
+ cropGravity: se,
190
201
  // Loading
191
- lazyload: re,
202
+ lazyload: ie,
192
203
  // Hotspots
193
- hotspots: ne,
194
- hotspotTrigger: ae,
195
- hotspotTimelineOnClick: se,
204
+ hotspots: le,
205
+ hotspotTrigger: me,
206
+ hotspotTimelineOnClick: ue,
196
207
  // Container
197
- aspectRatio: ie,
208
+ aspectRatio: pe,
198
209
  // Event callbacks
199
- onReady: le,
200
- onLoad: me,
201
- onSpin: ue,
202
- onAutoplayStart: pe,
203
- onAutoplayStop: ce,
204
- onFullscreenOpen: de,
205
- onFullscreenClose: fe,
206
- onZoomIn: ye,
207
- onZoomOut: Ce,
208
- onDragStart: we,
209
- onDragEnd: ve,
210
- onHotspotOpen: Ie,
211
- onHotspotClose: Re,
212
- onProductClick: he,
213
- onError: ze
210
+ onReady: ce,
211
+ onLoad: de,
212
+ onSpin: fe,
213
+ onAutoplayStart: ye,
214
+ onAutoplayStop: Ce,
215
+ onFullscreenOpen: ve,
216
+ onFullscreenClose: we,
217
+ onZoomIn: Ie,
218
+ onZoomOut: Re,
219
+ onDragStart: he,
220
+ onDragEnd: ze,
221
+ onHotspotOpen: ge,
222
+ onHotspotClose: Le,
223
+ onProductClick: Ve,
224
+ onNavigate: Se,
225
+ onError: Te
214
226
  }),
215
227
  [
216
228
  // Image source
@@ -218,37 +230,37 @@ const Xe = (d, t) => {
218
230
  m,
219
231
  y,
220
232
  l,
221
- a,
222
- w,
233
+ n,
234
+ v,
223
235
  s,
224
236
  u,
225
237
  p,
226
- // Behavior
227
238
  R,
228
239
  h,
240
+ // Behavior
229
241
  z,
242
+ g,
243
+ L,
230
244
  V,
231
245
  S,
232
246
  T,
233
247
  Z,
234
- g,
235
- L,
248
+ A,
236
249
  O,
237
250
  k,
238
251
  P,
252
+ X,
253
+ Y,
239
254
  b,
255
+ E,
240
256
  // UI Features
241
- A,
242
257
  F,
243
- X,
244
- Y,
258
+ G,
245
259
  x,
246
260
  B,
247
261
  D,
248
- E,
249
262
  H,
250
263
  M,
251
- G,
252
264
  N,
253
265
  j,
254
266
  q,
@@ -257,39 +269,44 @@ const Xe = (d, t) => {
257
269
  K,
258
270
  Q,
259
271
  U,
260
- // Cloudimage CDN
261
272
  W,
262
273
  _,
263
274
  ee,
264
275
  oe,
276
+ // Cloudimage CDN
265
277
  te,
266
- // Loading
267
278
  re,
268
- // Hotspots
269
- ne,
270
279
  ae,
280
+ ne,
271
281
  se,
272
- // Container
282
+ // Loading
273
283
  ie,
274
- // Event callbacks
284
+ // Hotspots
275
285
  le,
276
286
  me,
277
287
  ue,
288
+ // Container
278
289
  pe,
290
+ // Event callbacks
279
291
  ce,
280
292
  de,
281
293
  fe,
282
294
  ye,
283
295
  Ce,
284
- we,
285
296
  ve,
297
+ we,
286
298
  Ie,
287
299
  Re,
288
300
  he,
289
- ze
301
+ ze,
302
+ ge,
303
+ Le,
304
+ Ve,
305
+ Se,
306
+ Te
290
307
  ]
291
- ), { getViewer: r } = Fe(Ve, Te);
292
- return Ae(
308
+ ), { getViewer: r } = xe(Ze, Oe);
309
+ return Ge(
293
310
  t,
294
311
  () => ({
295
312
  moveLeft: (e = 1) => {
@@ -339,22 +356,22 @@ const Xe = (d, t) => {
339
356
  getViewer: () => r()
340
357
  }),
341
358
  [r]
342
- ), /* @__PURE__ */ Ze(
359
+ ), /* @__PURE__ */ ke(
343
360
  "div",
344
361
  {
345
- ref: Ve,
362
+ ref: Ze,
346
363
  id: C,
347
364
  className: f,
348
- style: n,
349
- ...Se
365
+ style: a,
366
+ ...Ae
350
367
  }
351
368
  );
352
- }, Ye = Pe(Xe);
353
- Ye.displayName = "CI360Viewer";
369
+ }, De = Ee(Be);
370
+ De.displayName = "CI360Viewer";
354
371
  export {
355
- Ye as CI360Viewer,
356
- Ye as CI360ViewerDefault,
357
- Fe as useCI360,
358
- Fe as useCI360Default
372
+ De as CI360Viewer,
373
+ De as CI360ViewerDefault,
374
+ xe as useCI360,
375
+ xe as useCI360Default
359
376
  };
360
377
  //# sourceMappingURL=index.js.map