next-cloudinary 6.0.0-beta.7 → 6.0.0-beta.9

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/README.md CHANGED
@@ -12,7 +12,8 @@
12
12
 
13
13
  ######
14
14
 
15
- <a href="https://github.com/cloudinary-community/next-cloudinary/actions/workflows/test_and_release.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/cloudinary-community/next-cloudinary/test_and_release.yml?branch=main&label=Test%20%26%20Release&style=flat-square"></a> <a href="https://www.npmjs.com/package/next-cloudinary"><img alt="npm" src="https://img.shields.io/npm/v/next-cloudinary?style=flat-square"></a> <a href="https://github.com/cloudinary-community/next-cloudinary/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/cloudinary-community/next-cloudinary?label=License&style=flat-square"></a>
15
+ <a href="https://github.com/cloudinary-community/next-cloudinary/actions/workflows/test_and_release.yml"><img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/cloudinary-community/next-cloudinary/test_and_release.yml?branch=main&label=Test%20%26%20Release&style=flat-square"></a> <a href="https://www.npmjs.com/package/next-cloudinary"><img alt="npm" src="https://img.shields.io/npm/v/next-cloudinary?style=flat-square"></a> <a href="https://bundlephobia.com/package/next-cloudinary"><img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/next-cloudinary?style=flat-square&label=Minified%20Size"></a> <a href="https://github.com/cloudinary-community/next-cloudinary/blob/main/LICENSE"><img alt="GitHub" src="https://img.shields.io/github/license/cloudinary-community/next-cloudinary?label=License&style=flat-square"></a>
16
+
16
17
 
17
18
  # Next Cloudinary
18
19
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _cloudinary_util_url_loader_dist_schema_UX7RRFIR from '@cloudinary-util/url-loader/dist/schema-UX7RRFIR';
1
+ import * as _cloudinary_util_url_loader_dist_schema_OKEuUbyx from '@cloudinary-util/url-loader/dist/schema-OKEuUbyx';
2
2
  import React, { MutableRefObject } from 'react';
3
3
  import { ImageProps } from 'next/image';
4
4
  import { ImageOptions, ConfigOptions, AnalyticsOptions, VideoOptions } from '@cloudinary-util/url-loader';
@@ -13,7 +13,23 @@ type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
13
13
  };
14
14
  declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src"> & {
15
15
  src: string;
16
- crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
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;
17
33
  sanitize?: boolean | undefined;
18
34
  assetType?: string | undefined;
19
35
  deliveryType?: string | undefined;
@@ -23,6 +39,9 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
23
39
  quality?: string | number | undefined;
24
40
  strictTransformations?: boolean | undefined;
25
41
  width?: string | number | undefined;
42
+ aspectRatio?: string | number | undefined;
43
+ gravity?: string | undefined;
44
+ zoom?: string | undefined;
26
45
  art?: any;
27
46
  autoBrightness?: any;
28
47
  autoColor?: any;
@@ -119,17 +138,16 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
119
138
  vibrance?: any;
120
139
  vignette?: any;
121
140
  }[] | undefined;
122
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
123
- gravity?: string | 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;
124
142
  text?: string | undefined;
125
143
  version?: string | number | undefined;
126
144
  underlay?: string | undefined;
127
145
  underlays?: {
128
146
  appliedEffects?: {}[] | undefined;
129
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
130
148
  effects?: {}[] | undefined;
131
149
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
132
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
133
151
  height?: string | number | undefined;
134
152
  position?: {
135
153
  angle?: string | number | undefined;
@@ -147,10 +165,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
147
165
  rawTransformations?: string | string[] | undefined;
148
166
  overlay?: {
149
167
  appliedEffects?: {}[] | undefined;
150
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
151
169
  effects?: {}[] | undefined;
152
170
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
153
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
154
172
  height?: string | number | undefined;
155
173
  position?: {
156
174
  angle?: string | number | undefined;
@@ -179,10 +197,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
179
197
  } | undefined;
180
198
  overlays?: {
181
199
  appliedEffects?: {}[] | undefined;
182
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
183
201
  effects?: {}[] | undefined;
184
202
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
185
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
186
204
  height?: string | number | undefined;
187
205
  position?: {
188
206
  angle?: string | number | undefined;
@@ -211,9 +229,6 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
211
229
  }[] | undefined;
212
230
  namedTransformations?: string | string[] | undefined;
213
231
  transformations?: string | string[] | undefined;
214
- aspectRatio?: string | number | undefined;
215
- widthResize?: string | number | undefined;
216
- zoom?: string | undefined;
217
232
  zoompan?: string | boolean | {
218
233
  options: string;
219
234
  loop: string | boolean;
@@ -242,7 +257,7 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
242
257
  } | undefined;
243
258
  defaultImage?: string | undefined;
244
259
  } & {
245
- config?: _cloudinary_util_url_loader_dist_schema_UX7RRFIR.g | undefined;
260
+ config?: _cloudinary_util_url_loader_dist_schema_OKEuUbyx.e | undefined;
246
261
  preserveTransformations?: boolean | undefined;
247
262
  src: string;
248
263
  unoptimized?: boolean | undefined;
@@ -261,10 +276,13 @@ interface CldUploadWidgetProps {
261
276
  children?: ({ cloudinary, widget, open, results, error }: CldUploadWidgetPropsChildren) => JSX.Element;
262
277
  onError?: CldUploadEventCallbackError;
263
278
  onOpen?: CldUploadEventCallbackWidgetOnly;
279
+ /**
280
+ * @deprecated use onSuccess instead
281
+ */
264
282
  onUpload?: CldUploadEventCallbackNoOptions;
265
283
  onAbort?: CldUploadEventCallback;
266
284
  onBatchCancelled?: CldUploadEventCallback;
267
- onClose?: CldUploadEventCallbackWidgetOnly;
285
+ onClose?: CldUploadEventCallback;
268
286
  onDisplayChanged?: CldUploadEventCallback;
269
287
  onPublicId?: CldUploadEventCallback;
270
288
  onQueuesEnd?: CldUploadEventCallback;
@@ -289,12 +307,12 @@ type CldUploadWidgetPropsChildren = {
289
307
  type CldUploadEventCallback = (results: CloudinaryUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
290
308
  type CldUploadEventCallbackNoOptions = (results: CloudinaryUploadWidgetResults, widget: CldUploadWidgetWidgetInstance) => void;
291
309
  type CldUploadEventCallbackWidgetOnly = (widget: CldUploadWidgetWidgetInstance) => void;
292
- type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadWidgetWidgetInstance) => void;
310
+ type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadEventCallbackWidget) => void;
293
311
  type CldUploadEventCallbackWidget = {
294
312
  widget: CldUploadWidgetWidgetInstance;
295
313
  } & CloudinaryUploadWidgetInstanceMethods;
296
314
 
297
- 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;
298
316
 
299
317
  interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
300
318
  className?: string;
@@ -346,7 +364,6 @@ interface CldVideoPlayerPropsLogo {
346
364
  declare const CldVideoPlayer: (props: CldVideoPlayerProps) => React.JSX.Element;
347
365
 
348
366
  interface CloudinaryLoaderCldOptions {
349
- widthResize?: string | number;
350
367
  }
351
368
  interface CloudinaryLoaderLoaderOptions {
352
369
  height?: string | number;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as _cloudinary_util_url_loader_dist_schema_UX7RRFIR from '@cloudinary-util/url-loader/dist/schema-UX7RRFIR';
1
+ import * as _cloudinary_util_url_loader_dist_schema_OKEuUbyx from '@cloudinary-util/url-loader/dist/schema-OKEuUbyx';
2
2
  import React, { MutableRefObject } from 'react';
3
3
  import { ImageProps } from 'next/image';
4
4
  import { ImageOptions, ConfigOptions, AnalyticsOptions, VideoOptions } from '@cloudinary-util/url-loader';
@@ -13,7 +13,23 @@ type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
13
13
  };
14
14
  declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src"> & {
15
15
  src: string;
16
- crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
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;
17
33
  sanitize?: boolean | undefined;
18
34
  assetType?: string | undefined;
19
35
  deliveryType?: string | undefined;
@@ -23,6 +39,9 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
23
39
  quality?: string | number | undefined;
24
40
  strictTransformations?: boolean | undefined;
25
41
  width?: string | number | undefined;
42
+ aspectRatio?: string | number | undefined;
43
+ gravity?: string | undefined;
44
+ zoom?: string | undefined;
26
45
  art?: any;
27
46
  autoBrightness?: any;
28
47
  autoColor?: any;
@@ -119,17 +138,16 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
119
138
  vibrance?: any;
120
139
  vignette?: any;
121
140
  }[] | undefined;
122
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | undefined;
123
- gravity?: string | 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;
124
142
  text?: string | undefined;
125
143
  version?: string | number | undefined;
126
144
  underlay?: string | undefined;
127
145
  underlays?: {
128
146
  appliedEffects?: {}[] | undefined;
129
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
130
148
  effects?: {}[] | undefined;
131
149
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
132
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
133
151
  height?: string | number | undefined;
134
152
  position?: {
135
153
  angle?: string | number | undefined;
@@ -147,10 +165,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
147
165
  rawTransformations?: string | string[] | undefined;
148
166
  overlay?: {
149
167
  appliedEffects?: {}[] | undefined;
150
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
151
169
  effects?: {}[] | undefined;
152
170
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
153
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
154
172
  height?: string | number | undefined;
155
173
  position?: {
156
174
  angle?: string | number | undefined;
@@ -179,10 +197,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
179
197
  } | undefined;
180
198
  overlays?: {
181
199
  appliedEffects?: {}[] | undefined;
182
- appliedFlags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
183
201
  effects?: {}[] | undefined;
184
202
  crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
185
- flags?: "splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform" | ("splice" | "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" | "streaming_attachment" | "strip_profile" | "text_disallow_overflow" | "text_no_trim" | "tiff8_lzw" | "tiled" | "truncate_ts" | "waveform")[] | 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;
186
204
  height?: string | number | undefined;
187
205
  position?: {
188
206
  angle?: string | number | undefined;
@@ -211,9 +229,6 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
211
229
  }[] | undefined;
212
230
  namedTransformations?: string | string[] | undefined;
213
231
  transformations?: string | string[] | undefined;
214
- aspectRatio?: string | number | undefined;
215
- widthResize?: string | number | undefined;
216
- zoom?: string | undefined;
217
232
  zoompan?: string | boolean | {
218
233
  options: string;
219
234
  loop: string | boolean;
@@ -242,7 +257,7 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
242
257
  } | undefined;
243
258
  defaultImage?: string | undefined;
244
259
  } & {
245
- config?: _cloudinary_util_url_loader_dist_schema_UX7RRFIR.g | undefined;
260
+ config?: _cloudinary_util_url_loader_dist_schema_OKEuUbyx.e | undefined;
246
261
  preserveTransformations?: boolean | undefined;
247
262
  src: string;
248
263
  unoptimized?: boolean | undefined;
@@ -261,10 +276,13 @@ interface CldUploadWidgetProps {
261
276
  children?: ({ cloudinary, widget, open, results, error }: CldUploadWidgetPropsChildren) => JSX.Element;
262
277
  onError?: CldUploadEventCallbackError;
263
278
  onOpen?: CldUploadEventCallbackWidgetOnly;
279
+ /**
280
+ * @deprecated use onSuccess instead
281
+ */
264
282
  onUpload?: CldUploadEventCallbackNoOptions;
265
283
  onAbort?: CldUploadEventCallback;
266
284
  onBatchCancelled?: CldUploadEventCallback;
267
- onClose?: CldUploadEventCallbackWidgetOnly;
285
+ onClose?: CldUploadEventCallback;
268
286
  onDisplayChanged?: CldUploadEventCallback;
269
287
  onPublicId?: CldUploadEventCallback;
270
288
  onQueuesEnd?: CldUploadEventCallback;
@@ -289,12 +307,12 @@ type CldUploadWidgetPropsChildren = {
289
307
  type CldUploadEventCallback = (results: CloudinaryUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
290
308
  type CldUploadEventCallbackNoOptions = (results: CloudinaryUploadWidgetResults, widget: CldUploadWidgetWidgetInstance) => void;
291
309
  type CldUploadEventCallbackWidgetOnly = (widget: CldUploadWidgetWidgetInstance) => void;
292
- type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadWidgetWidgetInstance) => void;
310
+ type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadEventCallbackWidget) => void;
293
311
  type CldUploadEventCallbackWidget = {
294
312
  widget: CldUploadWidgetWidgetInstance;
295
313
  } & CloudinaryUploadWidgetInstanceMethods;
296
314
 
297
- 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;
298
316
 
299
317
  interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
300
318
  className?: string;
@@ -346,7 +364,6 @@ interface CldVideoPlayerPropsLogo {
346
364
  declare const CldVideoPlayer: (props: CldVideoPlayerProps) => React.JSX.Element;
347
365
 
348
366
  interface CloudinaryLoaderCldOptions {
349
- widthResize?: string | number;
350
367
  }
351
368
  interface CloudinaryLoaderLoaderOptions {
352
369
  height?: string | number;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var ve=Object.create;var q=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var We=Object.getOwnPropertyNames;var Ve=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var Se=(e,t)=>{for(var d in t)q(e,d,{get:t[d],enumerable:!0})},fe=(e,t,d,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of We(t))!De.call(e,o)&&o!==d&&q(e,o,{get:()=>t[o],enumerable:!(i=Me(t,o))||i.enumerable});return e};var E=(e,t,d)=>(d=e!=null?ve(Ve(e)):{},fe(t||!e||!e.__esModule?q(d,"default",{value:e,enumerable:!0}):d,e)),ke=e=>fe(q({},"__esModule",{value:!0}),e);var ze={};Se(ze,{CldImage:()=>ae,CldOgImage:()=>se,CldUploadButton:()=>pe,CldUploadWidget:()=>Y,CldVideoPlayer:()=>ce,cloudinaryLoader:()=>ee,getCldImageUrl:()=>y,getCldOgImageUrl:()=>Te,getCldVideoUrl:()=>te});module.exports=ke(ze);var T=E(require("react")),Ie=E(require("next/image")),Ue=require("@cloudinary-util/util"),Oe=require("@cloudinary-util/url-loader");async function K(e){let{src:t}=e;try{await new Promise((d,i)=>{fetch(t).then(o=>{if(!o.ok){i(o);return}d(o)})})}catch(d){return d.status===423?await K(e):!1}return!0}function x(e){if(!e)throw new Error("A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.")}var he=require("@cloudinary-util/url-loader");var Ce=E(require("next/package.json"));var ye={name:"next-cloudinary",version:"6.0.0-beta.7",license:"MIT",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",source:"src/index.ts",scripts:{build:"tsup",dev:"tsup --watch",prepublishOnly:"cp ../README.md . && cp ../LICENSE . && pnpm build",postpublish:"rm ./README.md && rm ./LICENSE",test:"jest","test:app":'NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="test" pnpm build && cd tests/nextjs-app && pnpm build'},dependencies:{"@cloudinary-util/types":"1.0.0","@cloudinary-util/url-loader":"4.2.0","@cloudinary-util/util":"^2.3.0"},devDependencies:{"@babel/core":"^7.23.2","@babel/preset-env":"^7.23.2","@types/jest":"^29.5.6","@types/node":"^20.11.5","@types/react":"^18.2.33","@types/react-dom":"^18.2.14","babel-jest":"^29.7.0",dotenv:"^16.3.1",jest:"^29.7.0","jest-environment-jsdom":"^29.7.0",mkdirp:"^3.0.1","ts-jest":"^29.1.1",tsup:"^7.2.0",typescript:"^5.2.2"},peerDependencies:{next:"^12 || ^13 || ^14",react:"^17 || ^18"}};var Q="V",J=ye.version,Z=Ce.default.version;function y(e,t,d){var o,n;let i=(n=(o=t==null?void 0:t.cloud)==null?void 0:o.cloudName)!=null?n:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME;return x(i),(0,he.constructCloudinaryUrl)({options:e,config:Object.assign({cloud:{cloudName:i}},t),analytics:Object.assign({sdkCode:Q,sdkSemver:J,techVersion:Z,feature:""},d)})}function ee({loaderOptions:e,imageProps:t,cldOptions:d,cldConfig:i={}}){let o={...t,...d};o.width=typeof o.width=="string"?parseInt(o.width):o.width,o.height=typeof o.height=="string"?parseInt(o.height):o.height;let n;return typeof(e==null?void 0:e.width)=="number"&&typeof o.width=="number"&&e.width!==o.width?n=e.width:typeof(e==null?void 0:e.width)=="number"&&typeof(o==null?void 0:o.width)!="number"&&(n=e.width,o.width=n),o.width&&n&&n<o.width&&(o.widthResize=e.width),y(o,i)}var je=(0,T.forwardRef)(function(t,d){let i=!1,o=["deliveryType","preserveTransformations","strictTransformations","assetType"];Oe.transformationPlugins.forEach(({props:a})=>{Object.keys(a).forEach(O=>{if(o.includes(O))throw new Error(`Option ${O} already exists!`);o.push(O)})});let n={alt:t.alt,src:t.src};Object.keys(t).filter(a=>!o.includes(a)).forEach(a=>n[a]=t[a]);let c=Object.keys(n).map(a=>`${a}:${n[a]}`).join(";"),[C,h]=(0,T.useState)(c),u={};if(o.forEach(a=>{t[a]&&(u[a]=t[a]||void 0)}),t.preserveTransformations)try{let a=(0,Ue.getTransformations)(t.src).map(I=>I.join(","));u.rawTransformations=[...a.flat(),...t.rawTransformations||[]]}catch(a){console.warn(`Failed to preserve transformations: ${a.message}`)}let r=process.env.__NEXT_IMAGE_OPTS||{};(t.unoptimized===!0||(r==null?void 0:r.unoptimized)===!0)&&(n.src=y({...u,width:n.width,height:n.height,src:n.src,format:"default",quality:"default"},t.config));async function A(a){let I=!0;if(i)return;if(i=!0,typeof t.onError=="function"){let _=t.onError(a);typeof _=="boolean"&&_===!1&&(I=!1)}else typeof t.onError=="boolean"&&t.onError===!1&&(I=!1);if(I===!1)return;let O=a.target;await K({src:O.src})&&h(`${c};${Date.now()}`)}let w=(0,T.useCallback)(A,[K,c]),P=Ie.default;return"default"in P&&(P=P.default),T.default.createElement(P,{key:C,...n,loader:a=>ee({loaderOptions:a,imageProps:n,cldOptions:u,cldConfig:t.config}),onError:w,ref:d})}),ae=je;var b=E(require("react")),Ee=E(require("next/head"));var Re="summary_large_image",He=({excludeTags:e=[],twitterTitle:t,keys:d={},...i})=>{let{alt:o}=i,n={...i,crop:i.crop||"fill",gravity:i.gravity||"center",height:i.height||1254,src:i.src,width:i.width||2400,widthResize:i.width||1200},c=typeof n.width=="string"?parseInt(n.width):n.width,C=typeof n.height=="string"?parseInt(n.height):n.height;typeof C=="number"&&typeof c=="number"&&(C=1200/c*C),c=1200;let h=y({...n,format:i.format||"jpg"}),u=y({...n,format:i.format||"webp"}),r={"og:image":"og-image","og:image:secure_url":"og-image-secureurl","og:image:width":"og-image-width","og:image:height":"og-image-height","og:image:alt":"og-image-alt","twitter:title":"twitter-title","twitter:card":"twitter-card","twitter:image":"twitter-image",...d};return b.default.createElement(Ee.default,null,b.default.createElement("meta",{key:r["og:image"],property:"og:image",content:h}),b.default.createElement("meta",{key:r["og:image:secure_url"],property:"og:image:secure_url",content:h}),b.default.createElement("meta",{key:r["og:image:width"],property:"og:image:width",content:`${c}`}),b.default.createElement("meta",{key:r["og:image:height"],property:"og:image:height",content:`${C}`}),o&&b.default.createElement("meta",{key:r["og:image:alt"],property:"og:image:alt",content:o}),!e.includes("twitter:title")&&b.default.createElement("meta",{key:r["twitter:title"],property:"twitter:title",content:t||" "}),b.default.createElement("meta",{key:r["twitter:card"],property:"twitter:card",content:Re}),b.default.createElement("meta",{key:r["twitter:image"],property:"twitter:image",content:u}))},se=He;var $=E(require("react"));var g=E(require("react")),Pe=E(require("next/script"));function we(e){return window&&"requestIdleCallback"in window?requestIdleCallback(e):setTimeout(()=>e(),1)}var Xe=["success","display-changed"],Be={abort:"onAbort","batch-cancelled":"onBatchCancelled","display-changed":"onDisplayChanged",publicid:"onPublicId","queues-end":"onQueuesEnd","queues-start":"onQueuesStart",retry:"onRetry","show-completed":"onShowCompleted","source-changed":"onSourceChanged",success:"onSuccess",tags:"onTags","upload-added":"onUploadAdded"},Fe=({children:e,onClose:t,onError:d,onOpen:i,onUpload:o,options:n,signatureEndpoint:c,uploadPreset:C,...h})=>{let u=(0,g.useRef)(),r=(0,g.useRef)(),A=!!c,[w,P]=(0,g.useState)(void 0),[a,I]=(0,g.useState)(void 0),[O,S]=(0,g.useState)(!0),_={cloudName:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,uploadPreset:C||process.env.NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET,apiKey:process.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,...n};x(process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME),A&&(_.uploadSignature=k,_.apiKey||console.warn("Missing dependency: Signed Upload requires an API key")),(0,g.useEffect)(()=>{if(typeof a=="undefined")return;let l=a.event==="success",U=a.event==="display-changed"&&a.info==="hidden";l&&typeof o=="function"&&o(a,r.current),U&&typeof t=="function"&&t(r.current)},[a]),(0,g.useEffect)(()=>{w&&typeof d=="function"&&d(w,r.current)},[w]);function L(){S(!1),u.current||(u.current=window.cloudinary),we(()=>{r.current||(r.current=N())})}(0,g.useEffect)(()=>()=>{var l;(l=r.current)==null||l.destroy(),r.current=void 0},[]);function k(l,U){if(typeof c=="undefined")throw Error("Failed to generate signature: signatureEndpoint undefined.");fetch(c,{method:"POST",body:JSON.stringify({paramsToSign:U}),headers:{"Content-Type":"application/json"}}).then(p=>p.json()).then(({signature:p})=>{l(p)})}function m(l,U=[]){if(r.current||(r.current=N()),typeof(r==null?void 0:r.current[l])=="function")return r.current[l](...U)}function v(l){m("close",[l])}function R(l){return m("destroy",[l])}function H(){m("hide")}function X(){return m("isDestroyed")}function M(){return m("isMinimized")}function W(){return m("isShowing")}function z(){m("minimize")}function re(l,U){m("open",[l,U]),typeof i=="function"&&i(r.current)}function B(){m("show")}function ne(){m("update")}let V={close:v,destroy:R,hide:H,isDestroyed:X,isMinimized:M,isShowing:W,minimize:z,open:re,show:B,update:ne};function N(){var l;return(l=u.current)==null?void 0:l.createUploadWidget(_,(U,p)=>{if(U&&U!==null&&P(U),typeof(p==null?void 0:p.event)=="string"){Xe.includes(p==null?void 0:p.event)&&I(p);let G=Be[p.event];if(typeof G=="string"&&typeof h[G]=="function"&&typeof h[G]){let ie=h[G];ie(p,{widget:r.current,...V})}}})}return g.default.createElement(g.default.Fragment,null,typeof e=="function"&&e({cloudinary:u.current,widget:r.current,results:a,error:w,isLoading:O,...V}),g.default.createElement(Pe.default,{id:`cloudinary-uploadwidget-${Math.floor(Math.random()*100)}`,src:"https://upload-widget.cloudinary.com/global/all.js",onLoad:L,onError:l=>console.error(`Failed to load Cloudinary Upload Widget: ${l.message}`)}))},Y=Fe;var Ye=({className:e,children:t,onClick:d,onError:i,onOpen:o,onUpload:n,onAbort:c,onBatchCancelled:C,onClose:h,onDisplayChanged:u,onPublicId:r,onQueuesEnd:A,onQueuesStart:w,onRetry:P,onShowCompleted:a,onSourceChanged:I,onSuccess:O,onTags:S,onUploadAdded:_,options:L,signatureEndpoint:k,uploadPreset:m,...v})=>$.default.createElement($.default.Fragment,null,$.default.createElement(Y,{onError:i,onOpen:o,onUpload:n,onAbort:c,onBatchCancelled:C,onClose:h,onDisplayChanged:u,onPublicId:r,onQueuesEnd:A,onQueuesStart:w,onRetry:P,onShowCompleted:a,onSourceChanged:I,onSuccess:O,onTags:S,onUploadAdded:_,options:L,signatureEndpoint:k,uploadPreset:m},({open:R,isLoading:H})=>{function X(M){M.preventDefault(),R(),typeof d=="function"&&d(M)}return $.default.createElement("button",{...v,className:e||"",onClick:X,disabled:H},t||"Upload")})),pe=Ye;var f=E(require("react")),be=E(require("next/script")),Ne=E(require("next/head")),xe=require("@cloudinary-util/util");var _e=require("@cloudinary-util/url-loader");function te(e,t,d){var o,n;let i=(n=(o=t==null?void 0:t.cloud)==null?void 0:o.cloudName)!=null?n:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME;return x(i),(0,_e.constructCloudinaryUrl)({options:{assetType:"video",...e},config:Object.assign({cloud:{cloudName:i}},t),analytics:Object.assign({sdkCode:Q,sdkSemver:J,techVersion:Z,feature:""},d)})}var oe=[],Le="1.10.4",$e=e=>{let{autoplay:t,className:d,colors:i,controls:o=!0,fontFace:n,height:c,id:C,language:h,languages:u,logo:r=!0,loop:A=!1,muted:w=!1,onDataLoad:P,onError:a,onMetadataLoad:I,onPause:O,onPlay:S,onEnded:_,poster:L,src:k,sourceTypes:m,transformation:v,quality:R="auto",width:H,...X}=e,M=Array.isArray(v)?v:[v],W=k||"";if(W.startsWith("http"))try{let s=(0,xe.parseUrl)(k);typeof(s==null?void 0:s.publicId)=="string"&&(W=s==null?void 0:s.publicId)}catch(s){}M.unshift({quality:R});let z=(0,f.useRef)(),re=(0,f.useRef)(),B=e.videoRef||re,ne=(0,f.useRef)(),V=e.playerRef||ne,N=C||`player-${W.replace("/","-")}`,l="cld-video-player cld-fluid";d&&(l=`${l} ${d}`),oe.filter(s=>s===N).length>1?console.warn(`Multiple instances of the same video detected on the
1
+ "use strict";var Ae=Object.create;var q=Object.defineProperty;var Me=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var We=Object.getPrototypeOf,Ve=Object.prototype.hasOwnProperty;var De=(e,t)=>{for(var i in t)q(e,i,{get:t[i],enumerable:!0})},ge=(e,t,i,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ve(t))!Ve.call(e,o)&&o!==i&&q(e,o,{get:()=>t[o],enumerable:!(a=Me(t,o))||a.enumerable});return e};var P=(e,t,i)=>(i=e!=null?Ae(We(e)):{},ge(t||!e||!e.__esModule?q(i,"default",{value:e,enumerable:!0}):i,e)),Se=e=>ge(q({},"__esModule",{value:!0}),e);var He={};De(He,{CldImage:()=>ie,CldOgImage:()=>le,CldUploadButton:()=>se,CldUploadWidget:()=>Y,CldVideoPlayer:()=>pe,cloudinaryLoader:()=>Z,getCldImageUrl:()=>U,getCldOgImageUrl:()=>ee,getCldVideoUrl:()=>te});module.exports=Se(He);var T=P(require("react")),he=P(require("next/image")),Ie=require("@cloudinary-util/util"),Ue=require("@cloudinary-util/url-loader");async function z(e){let{src:t}=e;try{await new Promise((i,a)=>{fetch(t).then(o=>{if(!o.ok){a(o);return}i(o)})})}catch(i){return i.status===423?(await new Promise(a=>setTimeout(()=>a(void 0),200)),await z(e)):!1}return!0}function b(e){if(!e)throw new Error("A Cloudinary Cloud name is required, please make sure NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME is set and configured in your environment.")}var Ce=require("@cloudinary-util/url-loader");var ye=P(require("next/package.json"));var fe={name:"next-cloudinary",version:"6.0.0-beta.9",license:"MIT",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",source:"src/index.ts",scripts:{build:"tsup",dev:"tsup --watch",prepublishOnly:"cp ../README.md . && cp ../LICENSE . && pnpm build",postpublish:"rm ./README.md && rm ./LICENSE",test:"jest","test:app":'NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="test" pnpm build && cd tests/nextjs-app && npm install && npm run build'},dependencies:{"@cloudinary-util/types":"1.0.0","@cloudinary-util/url-loader":"5.0.0-beta.3","@cloudinary-util/util":"^2.3.0"},devDependencies:{"@babel/core":"^7.23.2","@babel/preset-env":"^7.23.2","@types/jest":"^29.5.6","@types/node":"^20.11.5","@types/react":"^18.2.33","@types/react-dom":"^18.2.14","babel-jest":"^29.7.0",dotenv:"^16.3.1",jest:"^29.7.0","jest-environment-jsdom":"^29.7.0",mkdirp:"^3.0.1","ts-jest":"^29.1.1",tsup:"^7.2.0",typescript:"^5.2.2"},peerDependencies:{next:"^12 || ^13 || ^14",react:"^17 || ^18"}};var K="V",Q=fe.version,J=ye.default.version;function U(e,t,i){var o,r;let a=(r=(o=t==null?void 0:t.cloud)==null?void 0:o.cloudName)!=null?r:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME;return b(a),(0,Ce.constructCloudinaryUrl)({options:e,config:Object.assign({cloud:{cloudName:a}},t),analytics:Object.assign({sdkCode:K,sdkSemver:Q,techVersion:J,feature:""},i)})}function Z({loaderOptions:e,imageProps:t,cldOptions:i,cldConfig:a={}}){let o={...t,...i};if(o.width=typeof o.width=="string"?parseInt(o.width):o.width,o.height=typeof o.height=="string"?parseInt(o.height):o.height,typeof(e==null?void 0:e.width)=="number"&&typeof o.width=="number"&&e.width!==o.width){let r=e.width/o.width;o.width=e.width,typeof o.height=="number"&&(o.height=Math.floor(o.height*r))}else typeof(e==null?void 0:e.width)=="number"&&typeof(o==null?void 0:o.width)!="number"&&(o.width=e==null?void 0:e.width);return U(o,a)}var Ge=(0,T.forwardRef)(function(t,i){let a=!1,o=["deliveryType","preserveTransformations","strictTransformations","assetType"];Ue.transformationPlugins.forEach(({props:d})=>{Object.keys(d).forEach(E=>{if(o.includes(E))throw new Error(`Option ${E} already exists!`);o.push(E)})});let r={alt:t.alt,src:t.src};Object.keys(t).filter(d=>!o.includes(d)).forEach(d=>r[d]=t[d]);let p=Object.keys(r).map(d=>`${d}:${r[d]}`).join(";"),[O,h]=(0,T.useState)(p),n={};if(o.forEach(d=>{t[d]&&(n[d]=t[d]||void 0)}),t.preserveTransformations)try{let d=(0,Ie.getTransformations)(t.src).map(I=>I.join(","));n.rawTransformations=[...d.flat(),...t.rawTransformations||[]]}catch(d){console.warn(`Failed to preserve transformations: ${d.message}`)}let C=process.env.__NEXT_IMAGE_OPTS||{};(t.unoptimized===!0||(C==null?void 0:C.unoptimized)===!0)&&(r.src=U({...n,width:r.width,height:r.height,src:r.src,format:"default",quality:"default"},t.config));async function x(d){let I=!0;if(a)return;if(a=!0,typeof t.onError=="function"){let L=t.onError(d);typeof L=="boolean"&&L===!1&&(I=!1)}else typeof t.onError=="boolean"&&t.onError===!1&&(I=!1);if(I===!1)return;let E=d.target;await z({src:E.src})&&h(`${p};${Date.now()}`)}let A=(0,T.useCallback)(x,[z,p]),u=he.default;return"default"in u&&(u=u.default),T.default.createElement(u,{key:O,...r,loader:d=>Z({loaderOptions:d,imageProps:r,cldOptions:n,cldConfig:t.config}),onError:A,ref:i})}),ie=Ge;var _=P(require("react")),Oe=P(require("next/head"));function ee(e){return U({...e,format:e.format||"jpg",width:e.width||1200,height:e.height||627,crop:e.crop||{type:"fill",gravity:"center",source:!0}})}var je="summary_large_image",Re=({excludeTags:e=[],twitterTitle:t,keys:i={},...a})=>{let{alt:o}=a,{width:r=1200,height:p=627}=a;r=typeof r=="string"?parseInt(r):r,p=typeof p=="string"?parseInt(p):p;let O=ee({...a,width:r,height:p}),h=U({...a,width:r,height:p,format:a.format||"webp"}),n={"og:image":"og-image","og:image:secure_url":"og-image-secureurl","og:image:width":"og-image-width","og:image:height":"og-image-height","og:image:alt":"og-image-alt","twitter:title":"twitter-title","twitter:card":"twitter-card","twitter:image":"twitter-image",...i};return _.default.createElement(Oe.default,null,_.default.createElement("meta",{key:n["og:image"],property:"og:image",content:O}),_.default.createElement("meta",{key:n["og:image:secure_url"],property:"og:image:secure_url",content:O}),_.default.createElement("meta",{key:n["og:image:width"],property:"og:image:width",content:`${r}`}),_.default.createElement("meta",{key:n["og:image:height"],property:"og:image:height",content:`${p}`}),o&&_.default.createElement("meta",{key:n["og:image:alt"],property:"og:image:alt",content:o}),!e.includes("twitter:title")&&_.default.createElement("meta",{key:n["twitter:title"],property:"twitter:title",content:t||" "}),_.default.createElement("meta",{key:n["twitter:card"],property:"twitter:card",content:je}),_.default.createElement("meta",{key:n["twitter:image"],property:"twitter:image",content:h}))},le=Re;var $=P(require("react"));var f=P(require("react")),Pe=P(require("next/script"));function Ee(e){return window&&"requestIdleCallback"in window?requestIdleCallback(e):setTimeout(()=>e(),1)}var Xe=["success"],Be={abort:"onAbort","batch-cancelled":"onBatchCancelled",close:"onClose","display-changed":"onDisplayChanged",publicid:"onPublicId","queues-end":"onQueuesEnd","queues-start":"onQueuesStart",retry:"onRetry","show-completed":"onShowCompleted","source-changed":"onSourceChanged",success:"onSuccess",tags:"onTags","upload-added":"onUploadAdded"},Fe=({children:e,onError:t,onOpen:i,onUpload:a,options:o,signatureEndpoint:r,uploadPreset:p,...O})=>{let h=(0,f.useRef)(),n=(0,f.useRef)(),C=!!r,[x,A]=(0,f.useState)(void 0),[u,d]=(0,f.useState)(void 0),[I,E]=(0,f.useState)(!0),N={cloudName:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,uploadPreset:p||process.env.NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET,apiKey:process.env.NEXT_PUBLIC_CLOUDINARY_API_KEY,...o};b(process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME),C&&(N.uploadSignature=w,N.apiKey||console.warn("Missing dependency: Signed Upload requires an API key")),(0,f.useEffect)(()=>{if(typeof u=="undefined")return;u.event==="success"&&typeof a=="function"&&(process.env.NODE_ENVIRONMENT==="development"&&console.warn("The onUpload callback is deprecated. Please use onSuccess instead."),a(u,n.current))},[u]);function L(){E(!1),h.current||(h.current=window.cloudinary),Ee(()=>{n.current||(n.current=V())})}(0,f.useEffect)(()=>()=>{var l;(l=n.current)==null||l.destroy(),n.current=void 0},[]);function w(l,m){if(typeof r=="undefined")throw Error("Failed to generate signature: signatureEndpoint undefined.");fetch(r,{method:"POST",body:JSON.stringify({paramsToSign:m}),headers:{"Content-Type":"application/json"}}).then(g=>g.json()).then(({signature:g})=>{l(g)})}function c(l,m=[]){if(n.current||(n.current=V()),typeof(n==null?void 0:n.current[l])=="function")return n.current[l](...m)}function k(l){c("close",[l])}function M(l){return c("destroy",[l])}function j(){c("hide")}function R(){return c("isDestroyed")}function X(){return c("isMinimized")}function v(){return c("isShowing")}function W(){c("minimize")}function H(l,m){c("open",[l,m]),typeof i=="function"&&i(n.current)}function re(){c("show")}function B(){c("update")}let F={close:k,destroy:M,hide:j,isDestroyed:R,isMinimized:X,isShowing:v,minimize:W,open:H,show:re,update:B};function V(){var l;return(l=h.current)==null?void 0:l.createUploadWidget(N,(m,g)=>{if(m&&m!==null&&(A(m),typeof t=="function"&&t(m,{widget:n.current,...F})),typeof(g==null?void 0:g.event)=="string"){Xe.includes(g==null?void 0:g.event)&&d(g);let D=Be[g.event];if(typeof D=="string"&&typeof O[D]=="function"){let ne=O[D];ne(g,{widget:n.current,...F})}}})}return f.default.createElement(f.default.Fragment,null,typeof e=="function"&&e({cloudinary:h.current,widget:n.current,results:u,error:x,isLoading:I,...F}),f.default.createElement(Pe.default,{id:`cloudinary-uploadwidget-${Math.floor(Math.random()*100)}`,src:"https://upload-widget.cloudinary.com/global/all.js",onLoad:L,onError:l=>console.error(`Failed to load Cloudinary Upload Widget: ${l.message}`)}))},Y=Fe;var Ye=({className:e,children:t,onClick:i,onError:a,onOpen:o,onUpload:r,onAbort:p,onBatchCancelled:O,onClose:h,onDisplayChanged:n,onPublicId:C,onQueuesEnd:x,onQueuesStart:A,onRetry:u,onShowCompleted:d,onSourceChanged:I,onSuccess:E,onTags:N,onUploadAdded:L,options:w,signatureEndpoint:c,uploadPreset:k,...M})=>$.default.createElement($.default.Fragment,null,$.default.createElement(Y,{onError:a,onOpen:o,onUpload:r,onAbort:p,onBatchCancelled:O,onClose:h,onDisplayChanged:n,onPublicId:C,onQueuesEnd:x,onQueuesStart:A,onRetry:u,onShowCompleted:d,onSourceChanged:I,onSuccess:E,onTags:N,onUploadAdded:L,options:w,signatureEndpoint:c,uploadPreset:k},({open:j,isLoading:R})=>{function X(v){v.preventDefault(),j(),typeof i=="function"&&i(v)}return $.default.createElement("button",{...M,className:e||"",onClick:X,disabled:R},t||"Upload")})),se=Ye;var y=P(require("react")),Ne=P(require("next/script")),Le=P(require("next/head")),be=require("@cloudinary-util/util");var we=require("@cloudinary-util/url-loader");function te(e,t,i){var o,r;let a=(r=(o=t==null?void 0:t.cloud)==null?void 0:o.cloudName)!=null?r:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME;return b(a),(0,we.constructCloudinaryUrl)({options:{assetType:"video",...e},config:Object.assign({cloud:{cloudName:a}},t),analytics:Object.assign({sdkCode:K,sdkSemver:Q,techVersion:J,feature:""},i)})}var oe=[],_e="1.10.4",$e=e=>{let{autoplay:t,className:i,colors:a,controls:o=!0,fontFace:r,height:p,id:O,language:h,languages:n,logo:C=!0,loop:x=!1,muted:A=!1,onDataLoad:u,onError:d,onMetadataLoad:I,onPause:E,onPlay:N,onEnded:L,poster:w,src:c,sourceTypes:k,transformation:M,quality:j="auto",width:R,...X}=e,v=Array.isArray(M)?M:[M],W=c||"";if(W.startsWith("http"))try{let s=(0,be.parseUrl)(c);typeof(s==null?void 0:s.publicId)=="string"&&(W=s==null?void 0:s.publicId)}catch(s){}v.unshift({quality:j});let H=(0,y.useRef)(),re=(0,y.useRef)(),B=e.videoRef||re,F=(0,y.useRef)(),V=e.playerRef||F,l=O||`player-${W.replace("/","-")}`,m="cld-video-player cld-fluid";i&&(m=`${m} ${i}`),oe.filter(s=>s===l).length>1?console.warn(`Multiple instances of the same video detected on the
2
2
  page which may cause some features to not work.
3
- Try adding a unique id to each player.`):oe.push(N);let p={error:a,loadeddata:P,loadedmetadata:I,pause:O,play:S,ended:_};function G(s){let D=p[s.type];typeof D=="function"&&D(Ae())}x(process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME);function ie(){if("cloudinary"in window){z.current=window.cloudinary;let s={};typeof r=="boolean"?s.showLogo=r:typeof r=="object"&&(s={...s,showLogo:!0,logoImageUrl:r.imageUrl,logoOnclickUrl:r.onClickUrl});let D=!1,ue;(typeof t=="boolean"||t==="true"||t==="false")&&(D=t),typeof t=="string"&&t!=="true"&&t!=="false"&&(ue=t);let j={autoplayMode:ue,autoplay:D,cloud_name:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,controls:o,fontFace:n||"",language:h,languages:u,loop:A,muted:w,publicId:W,transformation:M,...s,...X};Array.isArray(m)&&(j.sourceTypes=m),typeof i=="object"&&(j.colors=i),typeof L=="string"?j.posterOptions={publicId:L}:typeof L=="object"&&(typeof L.src!="string"?j.posterOptions={publicId:te({...L,src:W,format:"auto:image"})}:j.posterOptions={publicId:y(L)}),V.current=z.current.videoPlayer(B.current,j),Object.keys(p).forEach(me=>{var ge;typeof p[me]=="function"&&((ge=V.current)==null||ge.on(me,G))})}}(0,f.useEffect)(()=>()=>{var s;(s=V.current)==null||s.videojs.cloudinary.dispose(),oe=oe.filter(D=>D!==N)},[]);function Ae(){return{player:V.current,video:B.current}}return f.default.createElement(f.default.Fragment,null,f.default.createElement(Ne.default,null,f.default.createElement("link",{href:`https://unpkg.com/cloudinary-video-player@${Le}/dist/cld-video-player.min.css`,rel:"stylesheet"})),f.default.createElement("div",{style:{width:"100%",aspectRatio:`${e.width} / ${e.height}`}},f.default.createElement("video",{ref:B,id:N,className:l,width:H,height:c}),f.default.createElement(be.default,{id:`cloudinary-videoplayer-${N}-${Math.floor(Math.random()*100)}`,src:`https://unpkg.com/cloudinary-video-player@${Le}/dist/cld-video-player.min.js`,onLoad:ie,onError:s=>console.error(`Failed to load Cloudinary Video Player: ${s.message}`)})))},ce=$e;function Te(e){return y({...e,crop:e.crop||"fill",format:e.format||"jpg",gravity:e.gravity||"center",height:e.height||1254,width:e.width||2400,widthResize:e.width||1200})}0&&(module.exports={CldImage,CldOgImage,CldUploadButton,CldUploadWidget,CldVideoPlayer,cloudinaryLoader,getCldImageUrl,getCldOgImageUrl,getCldVideoUrl});
3
+ Try adding a unique id to each player.`):oe.push(l);let D={error:d,loadeddata:u,loadedmetadata:I,pause:E,play:N,ended:L};function ne(s){let S=D[s.type];typeof S=="function"&&S(xe())}b(process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME);function Te(){if("cloudinary"in window){H.current=window.cloudinary;let s={};typeof C=="boolean"?s.showLogo=C:typeof C=="object"&&(s={...s,showLogo:!0,logoImageUrl:C.imageUrl,logoOnclickUrl:C.onClickUrl});let S=!1,ce;(typeof t=="boolean"||t==="true"||t==="false")&&(S=t),typeof t=="string"&&t!=="true"&&t!=="false"&&(ce=t);let G={autoplayMode:ce,autoplay:S,cloud_name:process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME,controls:o,fontFace:r||"",language:h,languages:n,loop:x,muted:A,publicId:W,transformation:v,...s,...X};Array.isArray(k)&&(G.sourceTypes=k),typeof a=="object"&&(G.colors=a),typeof w=="string"?G.posterOptions={publicId:w}:typeof w=="object"&&(typeof w.src!="string"?G.posterOptions={publicId:te({...w,src:W,format:"auto:image"})}:G.posterOptions={publicId:U(w)}),V.current=H.current.videoPlayer(B.current,G),Object.keys(D).forEach(ue=>{var me;typeof D[ue]=="function"&&((me=V.current)==null||me.on(ue,ne))})}}(0,y.useEffect)(()=>()=>{var s;(s=V.current)==null||s.videojs.cloudinary.dispose(),oe=oe.filter(S=>S!==l)},[]);function xe(){return{player:V.current,video:B.current}}return y.default.createElement(y.default.Fragment,null,y.default.createElement(Le.default,null,y.default.createElement("link",{href:`https://unpkg.com/cloudinary-video-player@${_e}/dist/cld-video-player.min.css`,rel:"stylesheet"})),y.default.createElement("div",{style:{width:"100%",aspectRatio:`${e.width} / ${e.height}`}},y.default.createElement("video",{ref:B,id:l,className:m,width:R,height:p}),y.default.createElement(Ne.default,{id:`cloudinary-videoplayer-${l}-${Math.floor(Math.random()*100)}`,src:`https://unpkg.com/cloudinary-video-player@${_e}/dist/cld-video-player.min.js`,onLoad:Te,onError:s=>console.error(`Failed to load Cloudinary Video Player: ${s.message}`)})))},pe=$e;0&&(module.exports={CldImage,CldOgImage,CldUploadButton,CldUploadWidget,CldVideoPlayer,cloudinaryLoader,getCldImageUrl,getCldOgImageUrl,getCldVideoUrl});
4
4
  //# sourceMappingURL=index.js.map