next-cloudinary 5.20.0 → 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/README.md +8 -8
- package/dist/index.d.mts +45 -246
- package/dist/index.d.ts +45 -246
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
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
|
|
|
@@ -39,9 +40,8 @@ High-performance image delivery and uploading at scale in Next.js powered by Clo
|
|
|
39
40
|
### Installation
|
|
40
41
|
|
|
41
42
|
* Install `next-cloudinary` with:
|
|
43
|
+
|
|
42
44
|
```
|
|
43
|
-
yarn add next-cloudinary
|
|
44
|
-
# or
|
|
45
45
|
npm install next-cloudinary
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -91,12 +91,12 @@ Please read [CONTRIBUTING.md](https://github.com/cloudinary-community/next-cloud
|
|
|
91
91
|
|
|
92
92
|
#### Installation
|
|
93
93
|
|
|
94
|
-
This project is using [
|
|
94
|
+
This project is using [pnpm](https://pnpm.io/) as a way to manage dependencies and workspaces.
|
|
95
95
|
|
|
96
96
|
With the project cloned, install the dependencies from the root of the project with:
|
|
97
97
|
|
|
98
98
|
```
|
|
99
|
-
|
|
99
|
+
pnpm install
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
#### Configuration
|
|
@@ -128,7 +128,7 @@ CLOUDINARY_API_SECRET="<Your API Secret>"
|
|
|
128
128
|
Then run the upload script with:
|
|
129
129
|
|
|
130
130
|
```
|
|
131
|
-
|
|
131
|
+
pnpm upload
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
By default, the images inside of `scripts/images.json` will be uploaded to the "images" directory inside of your Cloudinary account. To change the location, add the `CLOUDINARY_IMAGES_DIRECTORY` environment variable with your preferred directory:
|
|
@@ -142,7 +142,7 @@ CLOUDINARY_IMAGES_DIRECTORY="<Your Directory>"
|
|
|
142
142
|
Once installed and configured, open two terminal tabs, navigating one to `next-cloudinary` and one to `docs`, running the following command in each:
|
|
143
143
|
|
|
144
144
|
```
|
|
145
|
-
|
|
145
|
+
pnpm dev
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
The project will now be available at <https://localhost:3000> or the configured local port.
|
|
@@ -154,7 +154,7 @@ All tests are located inside of `next-cloudinary/tests` with a directory structu
|
|
|
154
154
|
While inside `next-cloudinary`, run tests with:
|
|
155
155
|
|
|
156
156
|
```
|
|
157
|
-
|
|
157
|
+
pnpm test
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
## Contributors
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import * as
|
|
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';
|
|
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';
|
|
5
7
|
|
|
6
8
|
type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
|
|
7
9
|
config?: ConfigOptions;
|
|
@@ -11,7 +13,23 @@ type CldImageProps = Omit<ImageProps, 'src'> & ImageOptions & {
|
|
|
11
13
|
};
|
|
12
14
|
declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src"> & {
|
|
13
15
|
src: string;
|
|
14
|
-
crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" |
|
|
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;
|
|
15
33
|
sanitize?: boolean | undefined;
|
|
16
34
|
assetType?: string | undefined;
|
|
17
35
|
deliveryType?: string | undefined;
|
|
@@ -21,6 +39,9 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
21
39
|
quality?: string | number | undefined;
|
|
22
40
|
strictTransformations?: boolean | undefined;
|
|
23
41
|
width?: string | number | undefined;
|
|
42
|
+
aspectRatio?: string | number | undefined;
|
|
43
|
+
gravity?: string | undefined;
|
|
44
|
+
zoom?: string | undefined;
|
|
24
45
|
art?: any;
|
|
25
46
|
autoBrightness?: any;
|
|
26
47
|
autoColor?: any;
|
|
@@ -117,17 +138,16 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
117
138
|
vibrance?: any;
|
|
118
139
|
vignette?: any;
|
|
119
140
|
}[] | undefined;
|
|
120
|
-
flags?: "
|
|
121
|
-
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;
|
|
122
142
|
text?: string | undefined;
|
|
123
143
|
version?: string | number | undefined;
|
|
124
144
|
underlay?: string | undefined;
|
|
125
145
|
underlays?: {
|
|
126
146
|
appliedEffects?: {}[] | undefined;
|
|
127
|
-
appliedFlags?: "
|
|
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;
|
|
128
148
|
effects?: {}[] | undefined;
|
|
129
149
|
crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
|
|
130
|
-
flags?: "
|
|
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;
|
|
131
151
|
height?: string | number | undefined;
|
|
132
152
|
position?: {
|
|
133
153
|
angle?: string | number | undefined;
|
|
@@ -145,10 +165,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
145
165
|
rawTransformations?: string | string[] | undefined;
|
|
146
166
|
overlay?: {
|
|
147
167
|
appliedEffects?: {}[] | undefined;
|
|
148
|
-
appliedFlags?: "
|
|
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;
|
|
149
169
|
effects?: {}[] | undefined;
|
|
150
170
|
crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
|
|
151
|
-
flags?: "
|
|
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;
|
|
152
172
|
height?: string | number | undefined;
|
|
153
173
|
position?: {
|
|
154
174
|
angle?: string | number | undefined;
|
|
@@ -177,10 +197,10 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
177
197
|
} | undefined;
|
|
178
198
|
overlays?: {
|
|
179
199
|
appliedEffects?: {}[] | undefined;
|
|
180
|
-
appliedFlags?: "
|
|
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;
|
|
181
201
|
effects?: {}[] | undefined;
|
|
182
202
|
crop?: "fill" | "lfill" | "fill_pad" | "crop" | "thumb" | "scale" | "fit" | "limit" | "mfit" | "pad" | "lpad" | "mpad" | "imagga_scale" | "imagga_crop" | undefined;
|
|
183
|
-
flags?: "
|
|
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;
|
|
184
204
|
height?: string | number | undefined;
|
|
185
205
|
position?: {
|
|
186
206
|
angle?: string | number | undefined;
|
|
@@ -209,9 +229,6 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
209
229
|
}[] | undefined;
|
|
210
230
|
namedTransformations?: string | string[] | undefined;
|
|
211
231
|
transformations?: string | string[] | undefined;
|
|
212
|
-
aspectRatio?: string | number | undefined;
|
|
213
|
-
widthResize?: string | number | undefined;
|
|
214
|
-
zoom?: string | undefined;
|
|
215
232
|
zoompan?: string | boolean | {
|
|
216
233
|
options: string;
|
|
217
234
|
loop: string | boolean;
|
|
@@ -240,7 +257,7 @@ declare const CldImage: React.ForwardRefExoticComponent<Omit<ImageProps, "src">
|
|
|
240
257
|
} | undefined;
|
|
241
258
|
defaultImage?: string | undefined;
|
|
242
259
|
} & {
|
|
243
|
-
config?:
|
|
260
|
+
config?: _cloudinary_util_url_loader_dist_schema_OKEuUbyx.e | undefined;
|
|
244
261
|
preserveTransformations?: boolean | undefined;
|
|
245
262
|
src: string;
|
|
246
263
|
unoptimized?: boolean | undefined;
|
|
@@ -255,80 +272,17 @@ declare const CldOgImage: ({ excludeTags, twitterTitle, keys, ...props }: CldOgI
|
|
|
255
272
|
|
|
256
273
|
type CldUploadWidgetCloudinaryInstance = any;
|
|
257
274
|
type CldUploadWidgetWidgetInstance = any;
|
|
258
|
-
type CustomURL = `https://${string}.${string}`;
|
|
259
|
-
interface CldUploadWidgetResults {
|
|
260
|
-
event?: string;
|
|
261
|
-
info?: string | CldUploadWidgetInfo;
|
|
262
|
-
}
|
|
263
|
-
interface CldUploadWidgetInfo {
|
|
264
|
-
access_mode: 'public' | 'authenticated';
|
|
265
|
-
api_key: string;
|
|
266
|
-
asset_id: string;
|
|
267
|
-
batchId: string;
|
|
268
|
-
bytes: number;
|
|
269
|
-
context: Record<string, Record<string, string>>;
|
|
270
|
-
created_at: string;
|
|
271
|
-
etag: string;
|
|
272
|
-
folder: string;
|
|
273
|
-
format: string;
|
|
274
|
-
height: number;
|
|
275
|
-
hook_execution: Record<string, unknown>;
|
|
276
|
-
id: string;
|
|
277
|
-
info: Record<string, unknown>;
|
|
278
|
-
original_filename: string;
|
|
279
|
-
pages: number;
|
|
280
|
-
path: string;
|
|
281
|
-
placeholder: boolean;
|
|
282
|
-
public_id: string;
|
|
283
|
-
resource_type: 'image' | 'raw' | 'video' | 'auto';
|
|
284
|
-
secure_url: string;
|
|
285
|
-
signature: string;
|
|
286
|
-
tags: string[];
|
|
287
|
-
thumbnail_url: string;
|
|
288
|
-
type: 'upload' | 'private' | 'authenticated';
|
|
289
|
-
url: string;
|
|
290
|
-
version: number;
|
|
291
|
-
width: number;
|
|
292
|
-
[key: string]: unknown;
|
|
293
|
-
}
|
|
294
|
-
type CldUploadWidgetDestroyInstanceMethodOptions = {
|
|
295
|
-
removeThumbnails: boolean;
|
|
296
|
-
};
|
|
297
|
-
type CldUploadWidgetCloseInstanceMethodOptions = {
|
|
298
|
-
quiet: boolean;
|
|
299
|
-
};
|
|
300
|
-
type CldUploadWidgetOpenInstanceMethodOptions = {
|
|
301
|
-
files: CustomURL[];
|
|
302
|
-
};
|
|
303
|
-
type CldUploadWidgetOpenWidgetSources = 'local' | 'url' | 'camera' | 'image_search' | 'google_drive' | 'dropbox' | 'facebook' | 'instagram' | 'shutterstock' | 'getty' | 'istock' | 'unsplash' | null;
|
|
304
|
-
type CldUploadWidgetUpdateInstanceMethodOptions = Omit<CldUploadWidgetPropsOptions, "secure" | "uploadSignature" | "getTags" | "preBatch" | "inlineContainer" | "fieldName"> & {
|
|
305
|
-
cloudName: string;
|
|
306
|
-
uploadPreset: string;
|
|
307
|
-
};
|
|
308
|
-
interface CldUploadWidgetInstanceMethods {
|
|
309
|
-
close: (options?: CldUploadWidgetCloseInstanceMethodOptions) => void;
|
|
310
|
-
destroy: (options?: CldUploadWidgetDestroyInstanceMethodOptions) => Promise<void>;
|
|
311
|
-
hide: () => void;
|
|
312
|
-
isDestroyed: () => boolean;
|
|
313
|
-
isMinimized: () => boolean;
|
|
314
|
-
isShowing: () => boolean;
|
|
315
|
-
minimize: () => void;
|
|
316
|
-
open: (widgetSource?: CldUploadWidgetOpenWidgetSources, options?: CldUploadWidgetOpenInstanceMethodOptions) => void;
|
|
317
|
-
show: () => void;
|
|
318
|
-
update: (options: CldUploadWidgetUpdateInstanceMethodOptions) => void;
|
|
319
|
-
}
|
|
320
|
-
type CldUploadWidgetError = {
|
|
321
|
-
status: string;
|
|
322
|
-
statusText: string;
|
|
323
|
-
} | string | null;
|
|
324
275
|
interface CldUploadWidgetProps {
|
|
325
276
|
children?: ({ cloudinary, widget, open, results, error }: CldUploadWidgetPropsChildren) => JSX.Element;
|
|
326
277
|
onError?: CldUploadEventCallbackError;
|
|
327
278
|
onOpen?: CldUploadEventCallbackWidgetOnly;
|
|
279
|
+
/**
|
|
280
|
+
* @deprecated use onSuccess instead
|
|
281
|
+
*/
|
|
328
282
|
onUpload?: CldUploadEventCallbackNoOptions;
|
|
329
283
|
onAbort?: CldUploadEventCallback;
|
|
330
284
|
onBatchCancelled?: CldUploadEventCallback;
|
|
331
|
-
onClose?:
|
|
285
|
+
onClose?: CldUploadEventCallback;
|
|
332
286
|
onDisplayChanged?: CldUploadEventCallback;
|
|
333
287
|
onPublicId?: CldUploadEventCallback;
|
|
334
288
|
onQueuesEnd?: CldUploadEventCallback;
|
|
@@ -339,94 +293,26 @@ interface CldUploadWidgetProps {
|
|
|
339
293
|
onSuccess?: CldUploadEventCallback;
|
|
340
294
|
onTags?: CldUploadEventCallback;
|
|
341
295
|
onUploadAdded?: CldUploadEventCallback;
|
|
342
|
-
options?:
|
|
296
|
+
options?: CloudinaryUploadWidgetOptions;
|
|
343
297
|
signatureEndpoint?: URL | RequestInfo;
|
|
344
298
|
uploadPreset?: string;
|
|
345
299
|
}
|
|
346
300
|
type CldUploadWidgetPropsChildren = {
|
|
347
301
|
cloudinary: CldUploadWidgetCloudinaryInstance;
|
|
348
302
|
widget: CldUploadWidgetWidgetInstance;
|
|
349
|
-
error?:
|
|
303
|
+
error?: CloudinaryUploadWidgetError;
|
|
350
304
|
isLoading?: boolean;
|
|
351
|
-
results?:
|
|
352
|
-
} &
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
key: string;
|
|
356
|
-
iv: string;
|
|
357
|
-
};
|
|
358
|
-
defaultSource?: string;
|
|
359
|
-
maxFiles?: number;
|
|
360
|
-
multiple?: boolean;
|
|
361
|
-
sources?: Array<"camera" | "dropbox" | "facebook" | "gettyimages" | "google_drive" | "image_search" | "instagram" | "istock" | "local" | "shutterstock" | "unsplash" | "url">;
|
|
362
|
-
cropping?: boolean;
|
|
363
|
-
croppingAspectRatio?: number;
|
|
364
|
-
croppingCoordinatesMode?: string;
|
|
365
|
-
croppingDefaultSelectionRatio?: number;
|
|
366
|
-
croppingShowBackButton?: boolean;
|
|
367
|
-
croppingShowDimensions?: boolean;
|
|
368
|
-
showSkipCropButton?: boolean;
|
|
369
|
-
dropboxAppKey?: string;
|
|
370
|
-
facebookAppId?: string;
|
|
371
|
-
googleApiKey?: string;
|
|
372
|
-
googleDriveClientId?: string;
|
|
373
|
-
instagramClientId?: string;
|
|
374
|
-
searchByRights?: boolean;
|
|
375
|
-
searchBySites?: Array<string>;
|
|
376
|
-
context?: object;
|
|
377
|
-
folder?: string;
|
|
378
|
-
publicId?: string;
|
|
379
|
-
resourceType?: string;
|
|
380
|
-
tags?: Array<string>;
|
|
381
|
-
uploadSignature?: string | Function;
|
|
382
|
-
uploadSignatureTimestamp?: number;
|
|
383
|
-
clientAllowedFormats?: Array<string>;
|
|
384
|
-
croppingValidateDimensions?: boolean;
|
|
385
|
-
maxChunkSize?: number;
|
|
386
|
-
maxImageFileSize?: number;
|
|
387
|
-
maxImageHeight?: number;
|
|
388
|
-
maxImageWidth?: number;
|
|
389
|
-
maxFileSize?: number;
|
|
390
|
-
maxRawFileSize?: number;
|
|
391
|
-
maxVideoFileSize?: number;
|
|
392
|
-
minImageHeight?: number;
|
|
393
|
-
minImageWidth?: number;
|
|
394
|
-
validateMaxWidthHeight?: boolean;
|
|
395
|
-
fieldName?: string;
|
|
396
|
-
form?: string;
|
|
397
|
-
thumbnails?: string;
|
|
398
|
-
thumbnailTransformation?: string | Array<object>;
|
|
399
|
-
buttonCaption?: string;
|
|
400
|
-
buttonClass?: string;
|
|
401
|
-
text?: object;
|
|
402
|
-
theme?: string;
|
|
403
|
-
styles?: object;
|
|
404
|
-
autoMinimize?: boolean;
|
|
405
|
-
getTags?: Function;
|
|
406
|
-
getUploadPresets?: Function;
|
|
407
|
-
inlineContainer?: any;
|
|
408
|
-
language?: string;
|
|
409
|
-
preBatch?: Function;
|
|
410
|
-
prepareUploadParams?: Function;
|
|
411
|
-
queueViewPosition?: string;
|
|
412
|
-
showAdvancedOptions?: boolean;
|
|
413
|
-
showCompletedButton?: boolean;
|
|
414
|
-
showInsecurePreview?: boolean;
|
|
415
|
-
showPoweredBy?: boolean;
|
|
416
|
-
showUploadMoreButton?: boolean;
|
|
417
|
-
singleUploadAutoClose?: boolean;
|
|
418
|
-
detection?: string;
|
|
419
|
-
on_success?: string;
|
|
420
|
-
}
|
|
421
|
-
type CldUploadEventCallback = (results: CldUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
|
|
422
|
-
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;
|
|
423
309
|
type CldUploadEventCallbackWidgetOnly = (widget: CldUploadWidgetWidgetInstance) => void;
|
|
424
|
-
type CldUploadEventCallbackError = (error:
|
|
310
|
+
type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadEventCallbackWidget) => void;
|
|
425
311
|
type CldUploadEventCallbackWidget = {
|
|
426
312
|
widget: CldUploadWidgetWidgetInstance;
|
|
427
|
-
} &
|
|
313
|
+
} & CloudinaryUploadWidgetInstanceMethods;
|
|
428
314
|
|
|
429
|
-
declare const CldUploadWidget: ({ children,
|
|
315
|
+
declare const CldUploadWidget: ({ children, onError, onOpen, onUpload, options, signatureEndpoint, uploadPreset, ...props }: CldUploadWidgetProps) => React.JSX.Element;
|
|
430
316
|
|
|
431
317
|
interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
|
|
432
318
|
className?: string;
|
|
@@ -435,95 +321,12 @@ interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
|
|
|
435
321
|
}
|
|
436
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;
|
|
437
323
|
|
|
438
|
-
interface CloudinaryVideoPlayer {
|
|
439
|
-
on: Function;
|
|
440
|
-
}
|
|
441
|
-
interface CloudinaryVideoPlayerOptionsLogo {
|
|
442
|
-
logoImageUrl?: string;
|
|
443
|
-
logoOnclickUrl?: string;
|
|
444
|
-
showLogo?: boolean;
|
|
445
|
-
}
|
|
446
|
-
interface CloudinaryVideoPlayerOptions extends CloudinaryVideoPlayerOptionsLogo {
|
|
447
|
-
aiHighlightsGraph?: boolean;
|
|
448
|
-
bigPlayButton?: boolean | string;
|
|
449
|
-
colors?: CloudinaryVideoPlayerOptionsColors;
|
|
450
|
-
controlBar?: {
|
|
451
|
-
pictureInPictureToggle?: boolean;
|
|
452
|
-
chaptersButton?: boolean;
|
|
453
|
-
};
|
|
454
|
-
controls?: boolean;
|
|
455
|
-
floatingWhenNotVisible?: string;
|
|
456
|
-
fluid?: boolean;
|
|
457
|
-
fontFace?: string;
|
|
458
|
-
hideContextMenu?: boolean;
|
|
459
|
-
interactionAreas?: any;
|
|
460
|
-
playbackRates?: Array<any>;
|
|
461
|
-
playlistWidget?: {
|
|
462
|
-
direction?: string;
|
|
463
|
-
total?: string;
|
|
464
|
-
};
|
|
465
|
-
posterOptions?: CloudinaryVideoPlayerOptionPosterOptions;
|
|
466
|
-
showJumpControls?: boolean;
|
|
467
|
-
seekThumbnails?: boolean;
|
|
468
|
-
videoJS?: object;
|
|
469
|
-
autoPlay?: string | boolean | undefined;
|
|
470
|
-
autoplay?: string | boolean | undefined;
|
|
471
|
-
autoplayMode?: string;
|
|
472
|
-
autoShowRecommendations?: boolean;
|
|
473
|
-
loop?: boolean;
|
|
474
|
-
maxTries?: Number;
|
|
475
|
-
muted?: boolean;
|
|
476
|
-
playedEventPercents?: number[];
|
|
477
|
-
playedEventTimes?: null | Array<any>;
|
|
478
|
-
playsinline?: boolean;
|
|
479
|
-
videoTimeout?: number;
|
|
480
|
-
withCredentials?: boolean;
|
|
481
|
-
chapters?: object;
|
|
482
|
-
preload?: string;
|
|
483
|
-
publicId?: string;
|
|
484
|
-
sourceTransformation?: object;
|
|
485
|
-
sourceTypes?: Array<string>;
|
|
486
|
-
transformation?: Array<object> | object;
|
|
487
|
-
ads?: {
|
|
488
|
-
adTagUrl?: string;
|
|
489
|
-
adsInPlaylist?: string;
|
|
490
|
-
showCountdown?: boolean;
|
|
491
|
-
adLabel?: string;
|
|
492
|
-
locale?: string;
|
|
493
|
-
prerollTimeout?: number;
|
|
494
|
-
postrollTimeout?: number;
|
|
495
|
-
};
|
|
496
|
-
analytics?: boolean;
|
|
497
|
-
allowUsageReport?: Boolean;
|
|
498
|
-
cloud_name?: string;
|
|
499
|
-
cname?: string;
|
|
500
|
-
privateCdn?: boolean;
|
|
501
|
-
queryParams?: Record<string, string | number | boolean> | string;
|
|
502
|
-
secure?: boolean;
|
|
503
|
-
secureDistribution?: string;
|
|
504
|
-
language?: string;
|
|
505
|
-
languages?: Record<string, object>;
|
|
506
|
-
}
|
|
507
|
-
interface CloudinaryVideoPlayerOptionsColors {
|
|
508
|
-
accent?: string;
|
|
509
|
-
base?: string;
|
|
510
|
-
text?: string;
|
|
511
|
-
}
|
|
512
|
-
interface CloudinaryVideoPlayerOptionPosterOptions {
|
|
513
|
-
publicId: string;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
324
|
/**
|
|
517
325
|
* getCldImageUrl
|
|
518
326
|
*/
|
|
519
327
|
type GetCldImageUrlOptions = ImageOptions;
|
|
520
328
|
type GetCldImageUrlConfig = ConfigOptions;
|
|
521
329
|
type GetCldImageUrlAnalytics = AnalyticsOptions;
|
|
522
|
-
interface GetCldImageUrl {
|
|
523
|
-
options: GetCldImageUrlOptions;
|
|
524
|
-
config?: GetCldImageUrlConfig;
|
|
525
|
-
analytics?: GetCldImageUrlAnalytics;
|
|
526
|
-
}
|
|
527
330
|
declare function getCldImageUrl(options: GetCldImageUrlOptions, config?: GetCldImageUrlConfig, analytics?: GetCldImageUrlAnalytics): string;
|
|
528
331
|
|
|
529
332
|
/**
|
|
@@ -552,8 +355,6 @@ type CldVideoPlayerProps = Omit<CloudinaryVideoPlayerOptions, "cloud_name" | "au
|
|
|
552
355
|
quality?: string | number;
|
|
553
356
|
width: string | number;
|
|
554
357
|
};
|
|
555
|
-
interface CldVideoPlayerPropsColors extends CloudinaryVideoPlayerOptionsColors {
|
|
556
|
-
}
|
|
557
358
|
interface CldVideoPlayerPropsLogo {
|
|
558
359
|
imageUrl?: CloudinaryVideoPlayerOptionsLogo['logoImageUrl'];
|
|
559
360
|
logo?: boolean;
|
|
@@ -563,7 +364,6 @@ interface CldVideoPlayerPropsLogo {
|
|
|
563
364
|
declare const CldVideoPlayer: (props: CldVideoPlayerProps) => React.JSX.Element;
|
|
564
365
|
|
|
565
366
|
interface CloudinaryLoaderCldOptions {
|
|
566
|
-
widthResize?: string | number;
|
|
567
367
|
}
|
|
568
368
|
interface CloudinaryLoaderLoaderOptions {
|
|
569
369
|
height?: string | number;
|
|
@@ -580,8 +380,7 @@ declare function cloudinaryLoader({ loaderOptions, imageProps, cldOptions, cldCo
|
|
|
580
380
|
/**
|
|
581
381
|
* getCldImageUrl
|
|
582
382
|
*/
|
|
583
|
-
type GetCldOgImageUrl = GetCldImageUrl;
|
|
584
383
|
type GetCldOgImageUrlOptions = GetCldImageUrlOptions;
|
|
585
384
|
declare function getCldOgImageUrl(options: GetCldOgImageUrlOptions): string;
|
|
586
385
|
|
|
587
|
-
export { CldImage, CldImageProps, CldOgImage, CldOgImageProps, CldUploadButton, CldUploadButtonProps, CldUploadWidget,
|
|
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 };
|