next-cloudinary 6.0.0-beta.1 → 6.0.0-beta.10

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.ts CHANGED
@@ -1,6 +1,9 @@
1
+ import * as _cloudinary_util_url_loader_dist_schema_OKEuUbyx from '@cloudinary-util/url-loader/dist/schema-OKEuUbyx';
1
2
  import React, { MutableRefObject } from 'react';
2
3
  import { ImageProps } from 'next/image';
3
4
  import { ImageOptions, ConfigOptions, AnalyticsOptions, VideoOptions } from '@cloudinary-util/url-loader';
5
+ import { CloudinaryUploadWidgetOptions, CloudinaryUploadWidgetError, CloudinaryUploadWidgetResults, CloudinaryUploadWidgetInstanceMethods, CloudinaryVideoPlayerOptions, CloudinaryVideoPlayer, CloudinaryVideoPlayerOptionsLogo } from '@cloudinary-util/types';
6
+ export { CloudinaryUploadWidgetError, CloudinaryUploadWidgetInfo, CloudinaryUploadWidgetInstanceMethodCloseOptions, CloudinaryUploadWidgetInstanceMethodDestroyOptions, CloudinaryUploadWidgetInstanceMethodOpenOptions, CloudinaryUploadWidgetInstanceMethodUpdateOptions, CloudinaryUploadWidgetInstanceMethods, CloudinaryUploadWidgetOptions, CloudinaryUploadWidgetResults, CloudinaryUploadWidgetSources, CloudinaryVideoPlayer, CloudinaryVideoPlayerOptions, CloudinaryVideoPlayerOptionsColors, CloudinaryVideoPlayerOptionsLogo } from '@cloudinary-util/types';
4
7
 
5
8
  type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
6
9
  config?: ConfigOptions;
@@ -8,8 +11,253 @@ type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
8
11
  src: string;
9
12
  unoptimized?: boolean;
10
13
  };
11
- declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src"> & ImageOptions & {
12
- config?: ConfigOptions | undefined;
14
+ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src"> & {
15
+ src: string;
16
+ crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | {
17
+ type: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop";
18
+ aspectRatio?: string | number | undefined;
19
+ gravity?: string | undefined;
20
+ height?: string | number | undefined;
21
+ width?: string | number | undefined;
22
+ zoom?: string | undefined;
23
+ source?: boolean | undefined;
24
+ } | {
25
+ type: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop";
26
+ aspectRatio?: string | number | undefined;
27
+ gravity?: string | undefined;
28
+ height?: string | number | undefined;
29
+ width?: string | number | undefined;
30
+ zoom?: string | undefined;
31
+ source?: boolean | undefined;
32
+ }[] | undefined;
33
+ sanitize?: boolean | undefined;
34
+ assetType?: string | undefined;
35
+ deliveryType?: string | undefined;
36
+ dpr?: string | number | undefined;
37
+ format?: string | undefined;
38
+ height?: string | number | undefined;
39
+ quality?: string | number | undefined;
40
+ strictTransformations?: boolean | undefined;
41
+ width?: string | number | undefined;
42
+ aspectRatio?: string | number | undefined;
43
+ gravity?: string | undefined;
44
+ zoom?: string | undefined;
45
+ art?: any;
46
+ autoBrightness?: any;
47
+ autoColor?: any;
48
+ autoContrast?: any;
49
+ assistColorblind?: any;
50
+ background?: any;
51
+ blackwhite?: any;
52
+ blur?: any;
53
+ blurFaces?: any;
54
+ blurRegion?: any;
55
+ border?: any;
56
+ brightness?: any;
57
+ brightnessHSB?: any;
58
+ cartoonify?: any;
59
+ color?: any;
60
+ colorize?: any;
61
+ contrast?: any;
62
+ distort?: any;
63
+ fillLight?: any;
64
+ gamma?: any;
65
+ gradientFade?: any;
66
+ grayscale?: any;
67
+ improve?: any;
68
+ multiply?: any;
69
+ negate?: any;
70
+ oilPaint?: any;
71
+ opacity?: any;
72
+ outline?: any;
73
+ pixelate?: any;
74
+ pixelateFaces?: any;
75
+ pixelateRegion?: any;
76
+ radius?: any;
77
+ redeye?: any;
78
+ replaceColor?: any;
79
+ saturation?: any;
80
+ screen?: any;
81
+ sepia?: any;
82
+ shadow?: any;
83
+ sharpen?: any;
84
+ shear?: any;
85
+ simulateColorblind?: any;
86
+ tint?: any;
87
+ trim?: any;
88
+ unsharpMask?: any;
89
+ vectorize?: any;
90
+ vibrance?: any;
91
+ vignette?: any;
92
+ effects?: {
93
+ art?: any;
94
+ autoBrightness?: any;
95
+ autoColor?: any;
96
+ autoContrast?: any;
97
+ assistColorblind?: any;
98
+ background?: any;
99
+ blackwhite?: any;
100
+ blur?: any;
101
+ blurFaces?: any;
102
+ blurRegion?: any;
103
+ border?: any;
104
+ brightness?: any;
105
+ brightnessHSB?: any;
106
+ cartoonify?: any;
107
+ color?: any;
108
+ colorize?: any;
109
+ contrast?: any;
110
+ distort?: any;
111
+ fillLight?: any;
112
+ gamma?: any;
113
+ gradientFade?: any;
114
+ grayscale?: any;
115
+ improve?: any;
116
+ multiply?: any;
117
+ negate?: any;
118
+ oilPaint?: any;
119
+ opacity?: any;
120
+ outline?: any;
121
+ pixelate?: any;
122
+ pixelateFaces?: any;
123
+ pixelateRegion?: any;
124
+ radius?: any;
125
+ redeye?: any;
126
+ replaceColor?: any;
127
+ saturation?: any;
128
+ screen?: any;
129
+ sepia?: any;
130
+ shadow?: any;
131
+ sharpen?: any;
132
+ shear?: any;
133
+ simulateColorblind?: any;
134
+ tint?: any;
135
+ trim?: any;
136
+ unsharpMask?: any;
137
+ vectorize?: any;
138
+ vibrance?: any;
139
+ vignette?: any;
140
+ }[] | undefined;
141
+ flags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
142
+ text?: string | undefined;
143
+ version?: string | number | undefined;
144
+ underlay?: string | undefined;
145
+ underlays?: {
146
+ appliedEffects?: {}[] | undefined;
147
+ appliedFlags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
148
+ effects?: {}[] | undefined;
149
+ crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
150
+ flags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
151
+ height?: string | number | undefined;
152
+ position?: {
153
+ angle?: string | number | undefined;
154
+ gravity?: string | undefined;
155
+ x?: string | number | undefined;
156
+ y?: string | number | undefined;
157
+ } | undefined;
158
+ publicId?: string | undefined;
159
+ type?: string | undefined;
160
+ url?: string | undefined;
161
+ width?: string | number | undefined;
162
+ }[] | undefined;
163
+ seoSuffix?: string | undefined;
164
+ removeBackground?: boolean | undefined;
165
+ rawTransformations?: string | string[] | undefined;
166
+ overlay?: {
167
+ appliedEffects?: {}[] | undefined;
168
+ appliedFlags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
169
+ effects?: {}[] | undefined;
170
+ crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
171
+ flags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
172
+ height?: string | number | undefined;
173
+ position?: {
174
+ angle?: string | number | undefined;
175
+ gravity?: string | undefined;
176
+ x?: string | number | undefined;
177
+ y?: string | number | undefined;
178
+ } | undefined;
179
+ publicId?: string | undefined;
180
+ text?: string | {
181
+ text: string;
182
+ alignment?: string | undefined;
183
+ antialias?: string | undefined;
184
+ border?: string | undefined;
185
+ color?: string | undefined;
186
+ fontFamily?: string | undefined;
187
+ fontSize?: number | undefined;
188
+ fontStyle?: string | number | undefined;
189
+ fontWeight?: string | undefined;
190
+ hinting?: string | number | undefined;
191
+ letterSpacing?: string | number | undefined;
192
+ lineSpacing?: string | number | undefined;
193
+ stroke?: string | undefined;
194
+ } | undefined;
195
+ url?: string | undefined;
196
+ width?: string | number | undefined;
197
+ } | undefined;
198
+ overlays?: {
199
+ appliedEffects?: {}[] | undefined;
200
+ appliedFlags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
201
+ effects?: {}[] | undefined;
202
+ crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
203
+ flags?: "animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("animated" | "any_format" | "apng" | "attachment" | "awebp" | "clip" | "clip_evenodd" | "cutter" | "force_icc" | "force_strip" | "getinfo" | "group4" | "hlsv3" | "ignore_aspect_ratio" | "ignore_mask_channels" | "immutable_cache" | "keep_attribution" | "keep_dar" | "keep_iptc" | "layer_apply" | "lossy" | "mono" | "no_overflow" | "no_stream" | "png8_fl_png24_fl_png32" | "preserve_transparency" | "progressive" | "rasterize" | "region_relative" | "relative" | "replace_image" | "sanitize" | "splice" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
204
+ height?: string | number | undefined;
205
+ position?: {
206
+ angle?: string | number | undefined;
207
+ gravity?: string | undefined;
208
+ x?: string | number | undefined;
209
+ y?: string | number | undefined;
210
+ } | undefined;
211
+ publicId?: string | undefined;
212
+ text?: string | {
213
+ text: string;
214
+ alignment?: string | undefined;
215
+ antialias?: string | undefined;
216
+ border?: string | undefined;
217
+ color?: string | undefined;
218
+ fontFamily?: string | undefined;
219
+ fontSize?: number | undefined;
220
+ fontStyle?: string | number | undefined;
221
+ fontWeight?: string | undefined;
222
+ hinting?: string | number | undefined;
223
+ letterSpacing?: string | number | undefined;
224
+ lineSpacing?: string | number | undefined;
225
+ stroke?: string | undefined;
226
+ } | undefined;
227
+ url?: string | undefined;
228
+ width?: string | number | undefined;
229
+ }[] | undefined;
230
+ namedTransformations?: string | string[] | undefined;
231
+ transformations?: string | string[] | undefined;
232
+ zoompan?: string | boolean | {
233
+ options: string;
234
+ loop: string | boolean;
235
+ } | undefined;
236
+ restore?: boolean | undefined;
237
+ replace?: string[] | boolean[] | {
238
+ to: string;
239
+ from: string;
240
+ preserveGeometry?: boolean | undefined;
241
+ } | undefined;
242
+ remove?: string | string[] | {
243
+ prompt?: string | string[] | undefined;
244
+ region?: number[] | number[][] | undefined;
245
+ multiple?: boolean | undefined;
246
+ removeShadow?: boolean | undefined;
247
+ } | undefined;
248
+ recolor?: string | string[] | {
249
+ prompt?: string | string[] | undefined;
250
+ to?: string | undefined;
251
+ multiple?: boolean | undefined;
252
+ } | undefined;
253
+ fillBackground?: boolean | {
254
+ crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
255
+ gravity?: string | undefined;
256
+ prompt?: string | undefined;
257
+ } | undefined;
258
+ defaultImage?: string | undefined;
259
+ } & {
260
+ config?: _cloudinary_util_url_loader_dist_schema_OKEuUbyx.e | undefined;
13
261
  preserveTransformations?: boolean | undefined;
14
262
  src: string;
15
263
  unoptimized?: boolean | undefined;
@@ -24,80 +272,17 @@ declare const CldOgImage: ({ excludeTags, twitterTitle, keys, ...props }: CldOgI
24
272
 
25
273
  type CldUploadWidgetCloudinaryInstance = any;
26
274
  type CldUploadWidgetWidgetInstance = any;
27
- type CustomURL = `https://${string}.${string}`;
28
- interface CldUploadWidgetResults {
29
- event?: string;
30
- info?: string | CldUploadWidgetInfo;
31
- }
32
- interface CldUploadWidgetInfo {
33
- access_mode: 'public' | 'authenticated';
34
- api_key: string;
35
- asset_id: string;
36
- batchId: string;
37
- bytes: number;
38
- context: Record<string, Record<string, string>>;
39
- created_at: string;
40
- etag: string;
41
- folder: string;
42
- format: string;
43
- height: number;
44
- hook_execution: Record<string, unknown>;
45
- id: string;
46
- info: Record<string, unknown>;
47
- original_filename: string;
48
- pages: number;
49
- path: string;
50
- placeholder: boolean;
51
- public_id: string;
52
- resource_type: 'image' | 'raw' | 'video' | 'auto';
53
- secure_url: string;
54
- signature: string;
55
- tags: string[];
56
- thumbnail_url: string;
57
- type: 'upload' | 'private' | 'authenticated';
58
- url: string;
59
- version: number;
60
- width: number;
61
- [key: string]: unknown;
62
- }
63
- type CldUploadWidgetDestroyInstanceMethodOptions = {
64
- removeThumbnails: boolean;
65
- };
66
- type CldUploadWidgetCloseInstanceMethodOptions = {
67
- quiet: boolean;
68
- };
69
- type CldUploadWidgetOpenInstanceMethodOptions = {
70
- files: CustomURL[];
71
- };
72
- type CldUploadWidgetOpenWidgetSources = 'local' | 'url' | 'camera' | 'image_search' | 'google_drive' | 'dropbox' | 'facebook' | 'instagram' | 'shutterstock' | 'getty' | 'istock' | 'unsplash' | null;
73
- type CldUploadWidgetUpdateInstanceMethodOptions = Omit<CldUploadWidgetPropsOptions, "secure" | "uploadSignature" | "getTags" | "preBatch" | "inlineContainer" | "fieldName"> & {
74
- cloudName: string;
75
- uploadPreset: string;
76
- };
77
- interface CldUploadWidgetInstanceMethods {
78
- close: (options?: CldUploadWidgetCloseInstanceMethodOptions) => void;
79
- destroy: (options?: CldUploadWidgetDestroyInstanceMethodOptions) => Promise<void>;
80
- hide: () => void;
81
- isDestroyed: () => boolean;
82
- isMinimized: () => boolean;
83
- isShowing: () => boolean;
84
- minimize: () => void;
85
- open: (widgetSource?: CldUploadWidgetOpenWidgetSources, options?: CldUploadWidgetOpenInstanceMethodOptions) => void;
86
- show: () => void;
87
- update: (options: CldUploadWidgetUpdateInstanceMethodOptions) => void;
88
- }
89
- type CldUploadWidgetError = {
90
- status: string;
91
- statusText: string;
92
- } | string | null;
93
275
  interface CldUploadWidgetProps {
94
276
  children?: ({ cloudinary, widget, open, results, error }: CldUploadWidgetPropsChildren) => JSX.Element;
95
277
  onError?: CldUploadEventCallbackError;
96
278
  onOpen?: CldUploadEventCallbackWidgetOnly;
279
+ /**
280
+ * @deprecated use onSuccess instead
281
+ */
97
282
  onUpload?: CldUploadEventCallbackNoOptions;
98
283
  onAbort?: CldUploadEventCallback;
99
284
  onBatchCancelled?: CldUploadEventCallback;
100
- onClose?: CldUploadEventCallbackWidgetOnly;
285
+ onClose?: CldUploadEventCallback;
101
286
  onDisplayChanged?: CldUploadEventCallback;
102
287
  onPublicId?: CldUploadEventCallback;
103
288
  onQueuesEnd?: CldUploadEventCallback;
@@ -108,94 +293,26 @@ interface CldUploadWidgetProps {
108
293
  onSuccess?: CldUploadEventCallback;
109
294
  onTags?: CldUploadEventCallback;
110
295
  onUploadAdded?: CldUploadEventCallback;
111
- options?: CldUploadWidgetPropsOptions;
296
+ options?: CloudinaryUploadWidgetOptions;
112
297
  signatureEndpoint?: URL | RequestInfo;
113
298
  uploadPreset?: string;
114
299
  }
115
300
  type CldUploadWidgetPropsChildren = {
116
301
  cloudinary: CldUploadWidgetCloudinaryInstance;
117
302
  widget: CldUploadWidgetWidgetInstance;
118
- error?: CldUploadWidgetError;
303
+ error?: CloudinaryUploadWidgetError;
119
304
  isLoading?: boolean;
120
- results?: CldUploadWidgetResults;
121
- } & CldUploadWidgetInstanceMethods;
122
- interface CldUploadWidgetPropsOptions {
123
- encryption?: {
124
- key: string;
125
- iv: string;
126
- };
127
- defaultSource?: string;
128
- maxFiles?: number;
129
- multiple?: boolean;
130
- sources?: Array<"camera" | "dropbox" | "facebook" | "gettyimages" | "google_drive" | "image_search" | "instagram" | "istock" | "local" | "shutterstock" | "unsplash" | "url">;
131
- cropping?: boolean;
132
- croppingAspectRatio?: number;
133
- croppingCoordinatesMode?: string;
134
- croppingDefaultSelectionRatio?: number;
135
- croppingShowBackButton?: boolean;
136
- croppingShowDimensions?: boolean;
137
- showSkipCropButton?: boolean;
138
- dropboxAppKey?: string;
139
- facebookAppId?: string;
140
- googleApiKey?: string;
141
- googleDriveClientId?: string;
142
- instagramClientId?: string;
143
- searchByRights?: boolean;
144
- searchBySites?: Array<string>;
145
- context?: object;
146
- folder?: string;
147
- publicId?: string;
148
- resourceType?: string;
149
- tags?: Array<string>;
150
- uploadSignature?: string | Function;
151
- uploadSignatureTimestamp?: number;
152
- clientAllowedFormats?: Array<string>;
153
- croppingValidateDimensions?: boolean;
154
- maxChunkSize?: number;
155
- maxImageFileSize?: number;
156
- maxImageHeight?: number;
157
- maxImageWidth?: number;
158
- maxFileSize?: number;
159
- maxRawFileSize?: number;
160
- maxVideoFileSize?: number;
161
- minImageHeight?: number;
162
- minImageWidth?: number;
163
- validateMaxWidthHeight?: boolean;
164
- fieldName?: string;
165
- form?: string;
166
- thumbnails?: string;
167
- thumbnailTransformation?: string | Array<object>;
168
- buttonCaption?: string;
169
- buttonClass?: string;
170
- text?: object;
171
- theme?: string;
172
- styles?: object;
173
- autoMinimize?: boolean;
174
- getTags?: Function;
175
- getUploadPresets?: Function;
176
- inlineContainer?: any;
177
- language?: string;
178
- preBatch?: Function;
179
- prepareUploadParams?: Function;
180
- queueViewPosition?: string;
181
- showAdvancedOptions?: boolean;
182
- showCompletedButton?: boolean;
183
- showInsecurePreview?: boolean;
184
- showPoweredBy?: boolean;
185
- showUploadMoreButton?: boolean;
186
- singleUploadAutoClose?: boolean;
187
- detection?: string;
188
- on_success?: string;
189
- }
190
- type CldUploadEventCallback = (results: CldUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
191
- type CldUploadEventCallbackNoOptions = (results: CldUploadWidgetResults, widget: CldUploadWidgetWidgetInstance) => void;
305
+ results?: CloudinaryUploadWidgetResults;
306
+ } & CloudinaryUploadWidgetInstanceMethods;
307
+ type CldUploadEventCallback = (results: CloudinaryUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
308
+ type CldUploadEventCallbackNoOptions = (results: CloudinaryUploadWidgetResults, widget: CldUploadWidgetWidgetInstance) => void;
192
309
  type CldUploadEventCallbackWidgetOnly = (widget: CldUploadWidgetWidgetInstance) => void;
193
- type CldUploadEventCallbackError = (error: CldUploadWidgetError, widget: CldUploadWidgetWidgetInstance) => void;
310
+ type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadEventCallbackWidget) => void;
194
311
  type CldUploadEventCallbackWidget = {
195
312
  widget: CldUploadWidgetWidgetInstance;
196
- } & CldUploadWidgetInstanceMethods;
313
+ } & CloudinaryUploadWidgetInstanceMethods;
197
314
 
198
- declare const CldUploadWidget: ({ children, onClose, onError, onOpen, onUpload, options, signatureEndpoint, uploadPreset, ...props }: CldUploadWidgetProps) => React.JSX.Element;
315
+ declare const CldUploadWidget: ({ children, onError, onOpen, onUpload, options, signatureEndpoint, uploadPreset, ...props }: CldUploadWidgetProps) => React.JSX.Element;
199
316
 
200
317
  interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
201
318
  className?: string;
@@ -204,109 +321,20 @@ interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
204
321
  }
205
322
  declare const CldUploadButton: ({ className, children, onClick, onError, onOpen, onUpload, onAbort, onBatchCancelled, onClose, onDisplayChanged, onPublicId, onQueuesEnd, onQueuesStart, onRetry, onShowCompleted, onSourceChanged, onSuccess, onTags, onUploadAdded, options, signatureEndpoint, uploadPreset, ...props }: CldUploadButtonProps) => React.JSX.Element;
206
323
 
207
- interface CloudinaryVideoPlayer {
208
- on: Function;
209
- }
210
- interface CloudinaryVideoPlayerOptionsLogo {
211
- logoImageUrl?: string;
212
- logoOnclickUrl?: string;
213
- showLogo?: boolean;
214
- }
215
- interface CloudinaryVideoPlayerOptions extends CloudinaryVideoPlayerOptionsLogo {
216
- aiHighlightsGraph?: boolean;
217
- bigPlayButton?: boolean | string;
218
- colors?: CloudinaryVideoPlayerOptionsColors;
219
- controlBar?: {
220
- pictureInPictureToggle?: boolean;
221
- chaptersButton?: boolean;
222
- };
223
- controls?: boolean;
224
- floatingWhenNotVisible?: string;
225
- fluid?: boolean;
226
- fontFace?: string;
227
- hideContextMenu?: boolean;
228
- interactionAreas?: any;
229
- playbackRates?: Array<any>;
230
- playlistWidget?: {
231
- direction?: string;
232
- total?: string;
233
- };
234
- posterOptions?: CloudinaryVideoPlayerOptionPosterOptions;
235
- showJumpControls?: boolean;
236
- seekThumbnails?: boolean;
237
- videoJS?: object;
238
- autoPlay?: string | boolean | undefined;
239
- autoplay?: string | boolean | undefined;
240
- autoplayMode?: string;
241
- autoShowRecommendations?: boolean;
242
- loop?: boolean;
243
- maxTries?: Number;
244
- muted?: boolean;
245
- playedEventPercents?: number[];
246
- playedEventTimes?: null | Array<any>;
247
- playsinline?: boolean;
248
- videoTimeout?: number;
249
- withCredentials?: boolean;
250
- chapters?: object;
251
- preload?: string;
252
- publicId?: string;
253
- sourceTransformation?: object;
254
- sourceTypes?: Array<string>;
255
- transformation?: Array<object> | object;
256
- ads?: {
257
- adTagUrl?: string;
258
- adsInPlaylist?: string;
259
- showCountdown?: boolean;
260
- adLabel?: string;
261
- locale?: string;
262
- prerollTimeout?: number;
263
- postrollTimeout?: number;
264
- };
265
- analytics?: boolean;
266
- allowUsageReport?: Boolean;
267
- cloud_name?: string;
268
- cname?: string;
269
- privateCdn?: boolean;
270
- queryParams?: Record<string, string | number | boolean> | string;
271
- secure?: boolean;
272
- secureDistribution?: string;
273
- language?: string;
274
- languages?: Record<string, object>;
275
- }
276
- interface CloudinaryVideoPlayerOptionsColors {
277
- accent?: string;
278
- base?: string;
279
- text?: string;
280
- }
281
- interface CloudinaryVideoPlayerOptionPosterOptions {
282
- publicId: string;
283
- }
284
-
285
324
  /**
286
325
  * getCldImageUrl
287
326
  */
288
- interface GetCldImageUrlOptions extends ImageOptions {
289
- }
290
- interface GetCldImageUrlConfig extends ConfigOptions {
291
- }
292
- interface GetCldImageUrlAnalytics extends AnalyticsOptions {
293
- }
294
- interface GetCldImageUrl {
295
- options: GetCldImageUrlOptions;
296
- config?: GetCldImageUrlConfig;
297
- analytics?: GetCldImageUrlAnalytics;
298
- }
327
+ type GetCldImageUrlOptions = ImageOptions;
328
+ type GetCldImageUrlConfig = ConfigOptions;
329
+ type GetCldImageUrlAnalytics = AnalyticsOptions;
299
330
  declare function getCldImageUrl(options: GetCldImageUrlOptions, config?: GetCldImageUrlConfig, analytics?: GetCldImageUrlAnalytics): string;
300
331
 
301
332
  /**
302
333
  * getCldVideoUrl
303
334
  */
304
- interface GetCldVideoUrlOptions extends VideoOptions {
305
- }
306
- interface GetCldVideoUrlConfig extends ConfigOptions {
307
- }
308
- interface GetCldVideoUrlAnalytics extends AnalyticsOptions {
309
- }
335
+ type GetCldVideoUrlOptions = VideoOptions;
336
+ type GetCldVideoUrlConfig = ConfigOptions;
337
+ type GetCldVideoUrlAnalytics = AnalyticsOptions;
310
338
  declare function getCldVideoUrl(options: GetCldVideoUrlOptions, config?: GetCldVideoUrlConfig, analytics?: GetCldVideoUrlAnalytics): string;
311
339
 
312
340
  type CldVideoPlayerProps = Omit<CloudinaryVideoPlayerOptions, "cloud_name" | "autoplayMode" | "publicId" | "secure" | "showLogo" | "logoImageUrl" | "logoOnclickUrl"> & {
@@ -327,8 +355,6 @@ type CldVideoPlayerProps = Omit<CloudinaryVideoPlayerOptions, "cloud_name" | "au
327
355
  quality?: string | number;
328
356
  width: string | number;
329
357
  };
330
- interface CldVideoPlayerPropsColors extends CloudinaryVideoPlayerOptionsColors {
331
- }
332
358
  interface CldVideoPlayerPropsLogo {
333
359
  imageUrl?: CloudinaryVideoPlayerOptionsLogo['logoImageUrl'];
334
360
  logo?: boolean;
@@ -338,7 +364,6 @@ interface CldVideoPlayerPropsLogo {
338
364
  declare const CldVideoPlayer: (props: CldVideoPlayerProps) => React.JSX.Element;
339
365
 
340
366
  interface CloudinaryLoaderCldOptions {
341
- widthResize?: string | number;
342
367
  }
343
368
  interface CloudinaryLoaderLoaderOptions {
344
369
  height?: string | number;
@@ -355,10 +380,7 @@ declare function cloudinaryLoader({ loaderOptions, imageProps, cldOptions, cldCo
355
380
  /**
356
381
  * getCldImageUrl
357
382
  */
358
- interface GetCldOgImageUrl extends GetCldImageUrl {
359
- }
360
- interface GetCldOgImageUrlOptions extends GetCldImageUrlOptions {
361
- }
383
+ type GetCldOgImageUrlOptions = GetCldImageUrlOptions;
362
384
  declare function getCldOgImageUrl(options: GetCldOgImageUrlOptions): string;
363
385
 
364
- export { CldImage, CldImageProps, CldOgImage, CldOgImageProps, CldUploadButton, CldUploadButtonProps, CldUploadWidget, CldUploadWidgetProps, CldUploadWidgetPropsChildren, CldUploadWidgetPropsOptions, CldUploadWidgetResults, CldVideoPlayer, CldVideoPlayerProps, CldVideoPlayerPropsColors, CldVideoPlayerPropsLogo, CloudinaryLoader, CloudinaryLoaderCldOptions, CloudinaryLoaderLoaderOptions, CloudinaryVideoPlayer, CloudinaryVideoPlayerOptions, CloudinaryVideoPlayerOptionsColors, CloudinaryVideoPlayerOptionsLogo, GetCldImageUrl, GetCldImageUrlAnalytics, GetCldImageUrlConfig, GetCldImageUrlOptions, GetCldOgImageUrl, GetCldOgImageUrlOptions, GetCldVideoUrlAnalytics, GetCldVideoUrlConfig, GetCldVideoUrlOptions, cloudinaryLoader, getCldImageUrl, getCldOgImageUrl, getCldVideoUrl };
386
+ export { CldImage, type CldImageProps, CldOgImage, type CldOgImageProps, CldUploadButton, type CldUploadButtonProps, CldUploadWidget, type CldUploadWidgetProps, type CldUploadWidgetPropsChildren, CldVideoPlayer, type CldVideoPlayerProps, type CldVideoPlayerPropsLogo, type CloudinaryLoader, type CloudinaryLoaderCldOptions, type CloudinaryLoaderLoaderOptions, type GetCldImageUrlAnalytics, type GetCldImageUrlConfig, type GetCldImageUrlOptions, type GetCldOgImageUrlOptions, type GetCldVideoUrlAnalytics, type GetCldVideoUrlConfig, type GetCldVideoUrlOptions, cloudinaryLoader, getCldImageUrl, getCldOgImageUrl, getCldVideoUrl };