|
| 1 | +export interface CloudinaryProductGallery { |
| 2 | + // Required parameters |
| 3 | + cloudName?: string; |
| 4 | + mediaAssets?: |
| 5 | + | { |
| 6 | + publicId?: string; |
| 7 | + tag?: string; |
| 8 | + mediaType?: string; |
| 9 | + resourceType?: string; |
| 10 | + transformation?: object; |
| 11 | + thumbnailTransformation?: object; |
| 12 | + altText?: string; |
| 13 | + videoPlayerSource?: object; |
| 14 | + }[] |
| 15 | + | string[]; // string[] is a list of publicIDs |
| 16 | + container?: string | HTMLElement; |
| 17 | + |
| 18 | + // Widget |
| 19 | + analytics?: boolean; |
| 20 | + displayProps?: { |
| 21 | + mode?: "classic" | "expanded"; |
| 22 | + spacing?: number; |
| 23 | + columns?: number; |
| 24 | + topOffset?: number; |
| 25 | + bottomOffset?: number; |
| 26 | + }; |
| 27 | + focus?: boolean; |
| 28 | + loaderProps?: { |
| 29 | + color?: string; |
| 30 | + opacity?: number; |
| 31 | + style?: "cloudinary" | "circle" | "custom"; |
| 32 | + url?: string; |
| 33 | + }; |
| 34 | + placeholderImage?: boolean; |
| 35 | + sort?: "none" | "asc" | "desc"; |
| 36 | + sortProps?: { |
| 37 | + source?: string; |
| 38 | + id?: string; |
| 39 | + direction?: string; |
| 40 | + }; |
| 41 | + themeProps?: { |
| 42 | + primary?: string; // Default: "#FFFFFF" |
| 43 | + onPrimary?: string; // Default: "#000000" |
| 44 | + active?: string; // Default: "#0078FF" |
| 45 | + }; |
| 46 | + viewportBreakpoints?: { |
| 47 | + breakpoint: number; // Required |
| 48 | + [key: string]: any; // Other configuration parameters to override |
| 49 | + }[]; |
| 50 | + |
| 51 | + // Main viewer parameters |
| 52 | + accessibilityProps?: { |
| 53 | + mediaAltSource?: string; |
| 54 | + mediaAltId?: string; |
| 55 | + }; |
| 56 | + ar3dProps?: { |
| 57 | + shadows?: boolean; |
| 58 | + showAR?: boolean; |
| 59 | + }; |
| 60 | + aspectRatio?: |
| 61 | + | "square" |
| 62 | + | "1:1" |
| 63 | + | "3:4" |
| 64 | + | "4:3" |
| 65 | + | "4:6" |
| 66 | + | "6:4" |
| 67 | + | "5:7" |
| 68 | + | "7:5" |
| 69 | + | "5:8" |
| 70 | + | "8:5" |
| 71 | + | "9:16" |
| 72 | + | "16:9"; |
| 73 | + borderColor?: string; |
| 74 | + borderWidth?: number; |
| 75 | + imageBreakpoint?: number; |
| 76 | + videoBreakpoint?: number; |
| 77 | + preload?: string[]; |
| 78 | + radius?: number; |
| 79 | + spinProps?: { |
| 80 | + animate?: "none" | "start" | "end" | "both"; |
| 81 | + spinDirection?: "clockwise" | "counter-clockwise"; |
| 82 | + disableZoom?: boolean; |
| 83 | + showTip?: "always" | "never" | "touch"; |
| 84 | + tipPosition?: "top" | "center" | "bottom"; |
| 85 | + tipText?: string; // Default: "Drag to rotate" |
| 86 | + tipTouchText?: string; // Default: "Swipe to rotate" |
| 87 | + }; |
| 88 | + startIndex?: number; |
| 89 | + tipProps?: { |
| 90 | + textColor?: string; |
| 91 | + color?: string; |
| 92 | + radius?: number; |
| 93 | + opacity?: number; |
| 94 | + }; |
| 95 | + transition?: "slide" | "fade" | "none"; |
| 96 | + videoProps?: { |
| 97 | + controls?: string; |
| 98 | + sound?: boolean; |
| 99 | + autoplay?: boolean; |
| 100 | + loop?: boolean; |
| 101 | + playerType?: string; |
| 102 | + }; |
| 103 | + zoom?: boolean; |
| 104 | + zoomProps?: any; |
| 105 | + zoomPopupProps?: { |
| 106 | + backdropColor?: string; |
| 107 | + backdropOpacity?: number; |
| 108 | + zIndex?: number; |
| 109 | + }; |
| 110 | + |
| 111 | + // Carousel parameters |
| 112 | + carouselLocation?: "left" | "right" | "top" | "bottom"; |
| 113 | + carouselOffset?: number; |
| 114 | + carouselStyle?: "none" | "thumbnails" | "indicators"; |
| 115 | + indicatorProps?: { |
| 116 | + color?: string; |
| 117 | + selectedColor?: string; |
| 118 | + shape?: "round" | "square" | "radius"; |
| 119 | + size?: number; |
| 120 | + spacing?: number; |
| 121 | + sticky?: boolean; |
| 122 | + }; |
| 123 | + thumbnailProps?: any; |
| 124 | + |
| 125 | + // Navigation parameters |
| 126 | + navigation?: "none" | "always" | "mouseover"; |
| 127 | + navigationButtonProps?: { |
| 128 | + shape?: "none" | "round" | "square" | "radius" | "rectangle"; |
| 129 | + iconColor?: string; |
| 130 | + color?: string; |
| 131 | + size?: number; |
| 132 | + }; |
| 133 | + navigationOffset?: number; |
| 134 | + navigationPosition?: "inside" | "outside" | "offset"; |
| 135 | +} |
0 commit comments