next-cloudinary 7.0.0-beta.1 → 7.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.
Files changed (53) hide show
  1. package/README.md +15 -6
  2. package/dist/{CldImage-68dff3e6.cjs.js → CldImage-841d87c1.cjs.js} +12 -37
  3. package/dist/{CldImage-4b579fe8.esm.js → CldImage-c9af4fd9.esm.js} +13 -38
  4. package/dist/CldUploadButton-196b419b.esm.js +1 -1
  5. package/dist/CldUploadButton-db9b095b.cjs.js +1 -1
  6. package/dist/{CldUploadWidget-a9c04a78.esm.js → CldUploadWidget-77f44ab3.esm.js} +2 -2
  7. package/dist/{CldUploadWidget-e39838cc.cjs.js → CldUploadWidget-cdb65b22.cjs.js} +2 -2
  8. package/dist/{CldVideoPlayer-7b1734a7.esm.js → CldVideoPlayer-4db49132.esm.js} +5 -5
  9. package/dist/{CldVideoPlayer-49ac4380.cjs.js → CldVideoPlayer-a6525186.cjs.js} +4 -4
  10. package/dist/{cloudinary-1cbbab64.cjs.js → cloudinary-1f1b51af.cjs.js} +9 -6
  11. package/dist/{cloudinary-9437f0ad.esm.js → cloudinary-cb3c790a.esm.js} +9 -6
  12. package/dist/{cloudinary-loader-1863f0f4.esm.js → cloudinary-loader-ad7ad702.esm.js} +1 -3
  13. package/dist/{cloudinary-loader-80d421f0.cjs.js → cloudinary-loader-c87ac9ae.cjs.js} +1 -3
  14. package/dist/declarations/src/components/CldImage/CldImage.d.ts +14 -0
  15. package/dist/declarations/src/components/CldImage/CldImage.d.ts.map +1 -0
  16. package/dist/declarations/src/components/CldImage/index.d.ts +3 -0
  17. package/dist/declarations/src/components/CldImage/index.d.ts.map +1 -0
  18. package/dist/declarations/src/components/CldOgImage/CldOgImage.d.ts +9 -0
  19. package/dist/declarations/src/components/CldOgImage/CldOgImage.d.ts.map +1 -0
  20. package/dist/declarations/src/components/CldOgImage/index.d.ts +3 -0
  21. package/dist/declarations/src/components/CldOgImage/index.d.ts.map +1 -0
  22. package/dist/declarations/src/components/CldUploadButton/CldUploadButton.d.ts +9 -0
  23. package/dist/declarations/src/components/CldUploadButton/CldUploadButton.d.ts.map +1 -0
  24. package/dist/declarations/src/components/CldUploadButton/index.d.ts +3 -0
  25. package/dist/declarations/src/components/CldUploadButton/index.d.ts.map +1 -0
  26. package/dist/declarations/src/components/CldUploadWidget/CldUploadWidget.d.ts +4 -0
  27. package/dist/declarations/src/components/CldUploadWidget/CldUploadWidget.d.ts.map +1 -0
  28. package/dist/declarations/src/components/CldUploadWidget/CldUploadWidget.types.d.ts +59 -0
  29. package/dist/declarations/src/components/CldUploadWidget/CldUploadWidget.types.d.ts.map +1 -0
  30. package/dist/declarations/src/components/CldUploadWidget/index.d.ts +3 -0
  31. package/dist/declarations/src/components/CldUploadWidget/index.d.ts.map +1 -0
  32. package/dist/declarations/src/components/CldVideoPlayer/CldVideoPlayer.d.ts +4 -0
  33. package/dist/declarations/src/components/CldVideoPlayer/CldVideoPlayer.d.ts.map +1 -0
  34. package/dist/declarations/src/components/CldVideoPlayer/CldVideoPlayer.types.d.ts +28 -0
  35. package/dist/declarations/src/components/CldVideoPlayer/CldVideoPlayer.types.d.ts.map +1 -0
  36. package/dist/declarations/src/components/CldVideoPlayer/index.d.ts +3 -0
  37. package/dist/declarations/src/components/CldVideoPlayer/index.d.ts.map +1 -0
  38. package/dist/declarations/src/helpers/getCldImageUrl.d.ts +9 -0
  39. package/dist/declarations/src/helpers/getCldImageUrl.d.ts.map +1 -0
  40. package/dist/declarations/src/helpers/getCldOgImageUrl.d.ts +7 -0
  41. package/dist/declarations/src/helpers/getCldOgImageUrl.d.ts.map +1 -0
  42. package/dist/declarations/src/helpers/getCldVideoUrl.d.ts +9 -0
  43. package/dist/declarations/src/helpers/getCldVideoUrl.d.ts.map +1 -0
  44. package/dist/declarations/src/index.d.ts +21 -0
  45. package/dist/declarations/src/index.d.ts.map +1 -0
  46. package/dist/declarations/src/loaders/cloudinary-loader.d.ts +16 -0
  47. package/dist/declarations/src/loaders/cloudinary-loader.d.ts.map +1 -0
  48. package/dist/fonts/cloudinary_icon_for_white_bg.svg +1 -1
  49. package/dist/next-cloudinary.cjs.js +5 -5
  50. package/dist/next-cloudinary.esm.js +6 -6
  51. package/package.json +9 -6
  52. package/scripts/copy-assets.ts +0 -78
  53. package/tsconfig.json +0 -23
package/README.md CHANGED
@@ -4,19 +4,17 @@
4
4
  <img alt="Cloudinary" src="https://user-images.githubusercontent.com/62209650/196528761-a815025a-271a-4d8e-ac7e-cea833728bf9.png" align="center" height=30>
5
5
  </picture>
6
6
  &ensp;&ensp;
7
- <picture style="padding: 30px">
8
- <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/62209650/196529551-917766a7-6d73-4a0b-9f80-db31ac62358f.png" align="center" height=30>
9
- <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/62209650/196529695-8c260b0b-b5e6-44ae-bf71-db3c28534b20.png" align="center" height=30>
10
- <img alt="Nextjs" src="https://user-images.githubusercontent.com/62209650/196529695-8c260b0b-b5e6-44ae-bf71-db3c28534b20.png" align="center" height=30>
11
- </picture>
12
7
 
13
8
  ######
14
9
 
15
10
  <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
11
 
17
-
18
12
  # Next Cloudinary
19
13
 
14
+ <!-- doc-gen PKGJSON optionOne="hey" -->
15
+ undefined
16
+ <!-- end-doc-gen -->
17
+
20
18
  High-performance image delivery and uploading at scale in Next.js powered by Cloudinary.
21
19
 
22
20
  <a href="#-features">Features</a> • <a href="#-getting-started">Getting Started</a> • <a href="#%EF%B8%8F-community--support">Community & Support</a> • <a href="#-contributing">Contributing</a>
@@ -197,6 +195,17 @@ pnpm test
197
195
  <td align="center" valign="top" width="14.28%"><a href="http://www.simonbukin.com"><img src="https://avatars.githubusercontent.com/u/8992420?v=4?s=100" width="100px;" alt="Simon"/><br /><sub><b>Simon</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=simonbukin" title="Documentation">📖</a></td>
198
196
  <td align="center" valign="top" width="14.28%"><a href="https://robray.dev/"><img src="https://avatars.githubusercontent.com/u/1377253?v=4?s=100" width="100px;" alt="Richard Oliver Bray"/><br /><sub><b>Richard Oliver Bray</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=RichardBray" title="Code">💻</a></td>
199
197
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/zecka"><img src="https://avatars.githubusercontent.com/u/18116930?v=4?s=100" width="100px;" alt="zecka"/><br /><sub><b>zecka</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=zecka" title="Code">💻</a></td>
198
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/HarshitVashisht11"><img src="https://avatars.githubusercontent.com/u/120767685?v=4?s=100" width="100px;" alt="Harshit Vashisht"/><br /><sub><b>Harshit Vashisht</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=HarshitVashisht11" title="Documentation">📖</a></td>
199
+ <td align="center" valign="top" width="14.28%"><a href="http://sahil9001.github.io"><img src="https://avatars.githubusercontent.com/u/32628578?v=4?s=100" width="100px;" alt="Sahil Silare"/><br /><sub><b>Sahil Silare</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=sahil9001" title="Code">💻</a></td>
200
+ </tr>
201
+ <tr>
202
+ <td align="center" valign="top" width="14.28%"><a href="http://yashmathur.live"><img src="https://avatars.githubusercontent.com/u/69838816?v=4?s=100" width="100px;" alt="Yash Mathur"/><br /><sub><b>Yash Mathur</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=Yash-sudo-web" title="Code">💻</a></td>
203
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/mr-loop-1"><img src="https://avatars.githubusercontent.com/u/62374784?v=4?s=100" width="100px;" alt="Abdul Samad"/><br /><sub><b>Abdul Samad</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=mr-loop-1" title="Documentation">📖</a></td>
204
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/DevRish"><img src="https://avatars.githubusercontent.com/u/78094670?v=4?s=100" width="100px;" alt="Rishav Chattopadhyay"/><br /><sub><b>Rishav Chattopadhyay</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=DevRish" title="Documentation">📖</a></td>
205
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Prathamesh010"><img src="https://avatars.githubusercontent.com/u/41731424?v=4?s=100" width="100px;" alt="Prathamesh Gawas"/><br /><sub><b>Prathamesh Gawas</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=Prathamesh010" title="Documentation">📖</a></td>
206
+ <td align="center" valign="top" width="14.28%"><a href="https://victory-nwani.dev"><img src="https://avatars.githubusercontent.com/u/29664439?v=4?s=100" width="100px;" alt="Nwani Victory"/><br /><sub><b>Nwani Victory</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=vickywane" title="Documentation">📖</a></td>
207
+ <td align="center" valign="top" width="14.28%"><a href="http://neilblaze.live"><img src="https://avatars.githubusercontent.com/u/48355572?v=4?s=100" width="100px;" alt="Pratyay Banerjee"/><br /><sub><b>Pratyay Banerjee</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=Neilblaze" title="Documentation">📖</a></td>
208
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/saai-syvendra"><img src="https://avatars.githubusercontent.com/u/157691467?v=4?s=100" width="100px;" alt="Saai Syvendra"/><br /><sub><b>Saai Syvendra</b></sub></a><br /><a href="https://github.com/cloudinary-community/next-cloudinary/commits?author=saai-syvendra" title="Documentation">📖</a></td>
200
209
  </tr>
201
210
  </tbody>
202
211
  </table>
@@ -7,9 +7,9 @@ var react = require('react');
7
7
  var Image = require('next/image');
8
8
  var util = require('@cloudinary-util/util');
9
9
  var urlLoader = require('@cloudinary-util/url-loader');
10
- var cloudinaryLoader = require('./cloudinary-loader-80d421f0.cjs.js');
10
+ var cloudinaryLoader = require('./cloudinary-loader-c87ac9ae.cjs.js');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
- require('./cloudinary-1cbbab64.cjs.js');
12
+ require('./cloudinary-1f1b51af.cjs.js');
13
13
  require('next/package.json');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -23,48 +23,20 @@ const CldImage = /*#__PURE__*/react.forwardRef(function CldImage(props, ref) {
23
23
  // Cloudinary URL construction to avoid them being forwarded
24
24
  // to the DOM
25
25
 
26
- const CLD_OPTIONS = ['assetType', 'config', 'deliveryType', 'strictTransformations'];
27
-
28
- // Loop through all of the props available on the transformation plugins and verify
29
- // that we're not accientally applying the same prop twice
30
-
31
- // We're also using those props to push into CLD_OPTIONS which helps us filter what
32
- // props are applied to the underlaying Image component vs what's being sent
33
- // to Cloudinary URL construction
34
-
35
- urlLoader.transformationPlugins.forEach(({
36
- props
37
- }) => {
38
- const pluginProps = Object.keys(props);
39
- pluginProps.forEach(prop => {
40
- if (CLD_OPTIONS.includes(prop)) {
41
- throw new Error(`Option ${prop} already exists!`);
42
- }
43
- CLD_OPTIONS.push(prop);
44
- });
45
- });
26
+ const CLD_OPTIONS = ['assetType', 'config', 'deliveryType', 'strictTransformations', ...urlLoader.cloudinaryPluginKeys];
46
27
 
47
28
  // Construct the base Image component props by filtering out Cloudinary-specific props
48
29
 
49
30
  const imageProps = {
50
31
  alt: props.alt,
51
- src: props.src
32
+ height: props.height,
33
+ src: props.src,
34
+ width: props.width
52
35
  };
53
36
  Object.keys(props).filter(key => typeof key === 'string' && !CLD_OPTIONS.includes(key)).forEach(key => imageProps[key] = props[key]);
54
37
  const defaultImgKey = Object.keys(imageProps).map(key => `${key}:${imageProps[key]}`).join(';');
55
38
  const [imgKey, setImgKey] = react.useState(defaultImgKey);
56
39
 
57
- // Construct Cloudinary-specific props by looking for values for any of the supported prop keys
58
-
59
- const cldOptions = {};
60
- CLD_OPTIONS.forEach(key => {
61
- const prop = props[key];
62
- if (prop) {
63
- // @ts-expect-error
64
- cldOptions[key] = prop;
65
- }
66
- });
67
-
68
40
  // The unoptimized flag is intended to remove all optimizations including quality, format, and sizing
69
41
  // via responsive sizing. When passing this in, it also prevents the `loader` from running, thus
70
42
  // breaking this component. This rewrites the `src` to construct a fully formed Cloudinary URL
@@ -74,7 +46,7 @@ const CldImage = /*#__PURE__*/react.forwardRef(function CldImage(props, ref) {
74
46
  const IMAGE_OPTIONS = process.env.__NEXT_IMAGE_OPTS || {};
75
47
  if (props.unoptimized === true || IMAGE_OPTIONS?.unoptimized === true) {
76
48
  imageProps.src = cloudinaryLoader.getCldImageUrl({
77
- ...cldOptions,
49
+ ...props,
78
50
  width: imageProps.width,
79
51
  height: imageProps.height,
80
52
  src: imageProps.src,
@@ -116,7 +88,10 @@ const CldImage = /*#__PURE__*/react.forwardRef(function CldImage(props, ref) {
116
88
  const result = await util.pollForProcessingImage({
117
89
  src: image.src
118
90
  });
119
- if (result) {
91
+ if (typeof result.error === 'string' && process.env.NODE_ENV === 'development') {
92
+ console.error(`[CldImage] Failed to load image ${props.src}: ${result.error}`);
93
+ }
94
+ if (result.success) {
120
95
  setImgKey(`${defaultImgKey};${Date.now()}`);
121
96
  }
122
97
  }
@@ -135,7 +110,7 @@ const CldImage = /*#__PURE__*/react.forwardRef(function CldImage(props, ref) {
135
110
  loader: loaderOptions => cloudinaryLoader.cloudinaryLoader({
136
111
  loaderOptions,
137
112
  imageProps,
138
- cldOptions,
113
+ cldOptions: props,
139
114
  cldConfig: props.config
140
115
  }),
141
116
  onError: handleOnError,
@@ -2,10 +2,10 @@
2
2
  import { forwardRef, useState, useCallback } from 'react';
3
3
  import Image from 'next/image';
4
4
  import { pollForProcessingImage } from '@cloudinary-util/util';
5
- import { transformationPlugins } from '@cloudinary-util/url-loader';
6
- import { g as getCldImageUrl, c as cloudinaryLoader } from './cloudinary-loader-1863f0f4.esm.js';
5
+ import { cloudinaryPluginKeys } from '@cloudinary-util/url-loader';
6
+ import { g as getCldImageUrl, c as cloudinaryLoader } from './cloudinary-loader-ad7ad702.esm.js';
7
7
  import { jsx } from 'react/jsx-runtime';
8
- import './cloudinary-9437f0ad.esm.js';
8
+ import './cloudinary-cb3c790a.esm.js';
9
9
  import 'next/package.json';
10
10
 
11
11
  const CldImage = /*#__PURE__*/forwardRef(function CldImage(props, ref) {
@@ -15,48 +15,20 @@ const CldImage = /*#__PURE__*/forwardRef(function CldImage(props, ref) {
15
15
  // Cloudinary URL construction to avoid them being forwarded
16
16
  // to the DOM
17
17
 
18
- const CLD_OPTIONS = ['assetType', 'config', 'deliveryType', 'strictTransformations'];
19
-
20
- // Loop through all of the props available on the transformation plugins and verify
21
- // that we're not accientally applying the same prop twice
22
-
23
- // We're also using those props to push into CLD_OPTIONS which helps us filter what
24
- // props are applied to the underlaying Image component vs what's being sent
25
- // to Cloudinary URL construction
26
-
27
- transformationPlugins.forEach(({
28
- props
29
- }) => {
30
- const pluginProps = Object.keys(props);
31
- pluginProps.forEach(prop => {
32
- if (CLD_OPTIONS.includes(prop)) {
33
- throw new Error(`Option ${prop} already exists!`);
34
- }
35
- CLD_OPTIONS.push(prop);
36
- });
37
- });
18
+ const CLD_OPTIONS = ['assetType', 'config', 'deliveryType', 'strictTransformations', ...cloudinaryPluginKeys];
38
19
 
39
20
  // Construct the base Image component props by filtering out Cloudinary-specific props
40
21
 
41
22
  const imageProps = {
42
23
  alt: props.alt,
43
- src: props.src
24
+ height: props.height,
25
+ src: props.src,
26
+ width: props.width
44
27
  };
45
28
  Object.keys(props).filter(key => typeof key === 'string' && !CLD_OPTIONS.includes(key)).forEach(key => imageProps[key] = props[key]);
46
29
  const defaultImgKey = Object.keys(imageProps).map(key => `${key}:${imageProps[key]}`).join(';');
47
30
  const [imgKey, setImgKey] = useState(defaultImgKey);
48
31
 
49
- // Construct Cloudinary-specific props by looking for values for any of the supported prop keys
50
-
51
- const cldOptions = {};
52
- CLD_OPTIONS.forEach(key => {
53
- const prop = props[key];
54
- if (prop) {
55
- // @ts-expect-error
56
- cldOptions[key] = prop;
57
- }
58
- });
59
-
60
32
  // The unoptimized flag is intended to remove all optimizations including quality, format, and sizing
61
33
  // via responsive sizing. When passing this in, it also prevents the `loader` from running, thus
62
34
  // breaking this component. This rewrites the `src` to construct a fully formed Cloudinary URL
@@ -66,7 +38,7 @@ const CldImage = /*#__PURE__*/forwardRef(function CldImage(props, ref) {
66
38
  const IMAGE_OPTIONS = process.env.__NEXT_IMAGE_OPTS || {};
67
39
  if (props.unoptimized === true || IMAGE_OPTIONS?.unoptimized === true) {
68
40
  imageProps.src = getCldImageUrl({
69
- ...cldOptions,
41
+ ...props,
70
42
  width: imageProps.width,
71
43
  height: imageProps.height,
72
44
  src: imageProps.src,
@@ -108,7 +80,10 @@ const CldImage = /*#__PURE__*/forwardRef(function CldImage(props, ref) {
108
80
  const result = await pollForProcessingImage({
109
81
  src: image.src
110
82
  });
111
- if (result) {
83
+ if (typeof result.error === 'string' && process.env.NODE_ENV === 'development') {
84
+ console.error(`[CldImage] Failed to load image ${props.src}: ${result.error}`);
85
+ }
86
+ if (result.success) {
112
87
  setImgKey(`${defaultImgKey};${Date.now()}`);
113
88
  }
114
89
  }
@@ -127,7 +102,7 @@ const CldImage = /*#__PURE__*/forwardRef(function CldImage(props, ref) {
127
102
  loader: loaderOptions => cloudinaryLoader({
128
103
  loaderOptions,
129
104
  imageProps,
130
- cldOptions,
105
+ cldOptions: props,
131
106
  cldConfig: props.config
132
107
  }),
133
108
  onError: handleOnError,
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import 'react';
3
- import CldUploadWidget from './CldUploadWidget-a9c04a78.esm.js';
3
+ import CldUploadWidget from './CldUploadWidget-77f44ab3.esm.js';
4
4
  import { jsx, Fragment } from 'react/jsx-runtime';
5
5
 
6
6
  const CldUploadButton = ({
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  require('react');
7
- var CldUploadWidget = require('./CldUploadWidget-e39838cc.cjs.js');
7
+ var CldUploadWidget = require('./CldUploadWidget-cdb65b22.cjs.js');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
 
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -2,7 +2,7 @@
2
2
  import { useRef, useState, useEffect } from 'react';
3
3
  import Script from 'next/script';
4
4
  import { generateSignatureCallback, getUploadWidgetOptions, generateUploadWidgetResultCallback, UPLOAD_WIDGET_EVENTS } from '@cloudinary-util/url-loader';
5
- import { g as getCloudinaryConfig } from './cloudinary-9437f0ad.esm.js';
5
+ import { g as getCloudinaryConfig } from './cloudinary-cb3c790a.esm.js';
6
6
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
7
  import 'next/package.json';
8
8
 
@@ -85,7 +85,7 @@ const CldUploadWidget = ({
85
85
  if (typeof results === 'undefined') return;
86
86
  const isSuccess = results.event === 'success';
87
87
  if (isSuccess && typeof onUpload === 'function') {
88
- if (process.env.NODE_ENVIRONMENT === 'development') {
88
+ if (process.env.NODE_ENV === 'development') {
89
89
  console.warn('The onUpload callback is deprecated. Please use onSuccess instead.');
90
90
  }
91
91
  onUpload(results, widget.current);
@@ -6,7 +6,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var react = require('react');
7
7
  var Script = require('next/script');
8
8
  var urlLoader = require('@cloudinary-util/url-loader');
9
- var cloudinary = require('./cloudinary-1cbbab64.cjs.js');
9
+ var cloudinary = require('./cloudinary-1f1b51af.cjs.js');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  require('next/package.json');
12
12
 
@@ -93,7 +93,7 @@ const CldUploadWidget = ({
93
93
  if (typeof results === 'undefined') return;
94
94
  const isSuccess = results.event === 'success';
95
95
  if (isSuccess && typeof onUpload === 'function') {
96
- if (process.env.NODE_ENVIRONMENT === 'development') {
96
+ if (process.env.NODE_ENV === 'development') {
97
97
  console.warn('The onUpload callback is deprecated. Please use onSuccess instead.');
98
98
  }
99
99
  onUpload(results, widget.current);
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import { useRef, useEffect } from 'react';
2
+ import { useId, useRef, useEffect } from 'react';
3
3
  import Script from 'next/script';
4
4
  import Head from 'next/head';
5
5
  import { getVideoPlayerOptions } from '@cloudinary-util/url-loader';
6
- import { g as getCloudinaryConfig } from './cloudinary-9437f0ad.esm.js';
6
+ import { g as getCloudinaryConfig } from './cloudinary-cb3c790a.esm.js';
7
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
8
8
  import 'next/package.json';
9
9
 
@@ -23,6 +23,7 @@ const CldVideoPlayer = props => {
23
23
  onEnded,
24
24
  width
25
25
  } = props;
26
+ const uniqueId = useId();
26
27
  const cloudinaryConfig = getCloudinaryConfig(config);
27
28
  const playerOptions = getVideoPlayerOptions(props, cloudinaryConfig);
28
29
  const {
@@ -40,7 +41,7 @@ const CldVideoPlayer = props => {
40
41
  const videoRef = props.videoRef || defaultVideoRef;
41
42
  const defaultPlayerRef = useRef();
42
43
  const playerRef = props.playerRef || defaultPlayerRef;
43
- const playerId = id || `player-${publicId.replace('/', '-')}`;
44
+ const playerId = id || `player-${uniqueId.replace(/:/g, '')}`;
44
45
  let playerClassName = 'cld-video-player cld-fluid';
45
46
  if (className) {
46
47
  playerClassName = `${playerClassName} ${className}`;
@@ -94,7 +95,6 @@ const CldVideoPlayer = props => {
94
95
  }
95
96
  useEffect(() => {
96
97
  return () => {
97
- //@ts-ignore
98
98
  playerRef.current?.videojs.cloudinary.dispose();
99
99
  playerInstances = playerInstances.filter(id => id !== playerId);
100
100
  };
@@ -128,7 +128,7 @@ const CldVideoPlayer = props => {
128
128
  width: width,
129
129
  height: height
130
130
  }), /*#__PURE__*/jsx(Script, {
131
- id: `cloudinary-videoplayer-${playerId}-${Math.floor(Math.random() * 100)}`,
131
+ id: `cloudinary-videoplayer-${playerId}`,
132
132
  src: `https://unpkg.com/cloudinary-video-player@${PLAYER_VERSION}/dist/cld-video-player.min.js`,
133
133
  onLoad: handleOnLoad,
134
134
  onError: e => console.error(`Failed to load Cloudinary Video Player: ${e.message}`)
@@ -7,7 +7,7 @@ var react = require('react');
7
7
  var Script = require('next/script');
8
8
  var Head = require('next/head');
9
9
  var urlLoader = require('@cloudinary-util/url-loader');
10
- var cloudinary = require('./cloudinary-1cbbab64.cjs.js');
10
+ var cloudinary = require('./cloudinary-1f1b51af.cjs.js');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  require('next/package.json');
13
13
 
@@ -32,6 +32,7 @@ const CldVideoPlayer = props => {
32
32
  onEnded,
33
33
  width
34
34
  } = props;
35
+ const uniqueId = react.useId();
35
36
  const cloudinaryConfig = cloudinary.getCloudinaryConfig(config);
36
37
  const playerOptions = urlLoader.getVideoPlayerOptions(props, cloudinaryConfig);
37
38
  const {
@@ -49,7 +50,7 @@ const CldVideoPlayer = props => {
49
50
  const videoRef = props.videoRef || defaultVideoRef;
50
51
  const defaultPlayerRef = react.useRef();
51
52
  const playerRef = props.playerRef || defaultPlayerRef;
52
- const playerId = id || `player-${publicId.replace('/', '-')}`;
53
+ const playerId = id || `player-${uniqueId.replace(/:/g, '')}`;
53
54
  let playerClassName = 'cld-video-player cld-fluid';
54
55
  if (className) {
55
56
  playerClassName = `${playerClassName} ${className}`;
@@ -103,7 +104,6 @@ const CldVideoPlayer = props => {
103
104
  }
104
105
  react.useEffect(() => {
105
106
  return () => {
106
- //@ts-ignore
107
107
  playerRef.current?.videojs.cloudinary.dispose();
108
108
  playerInstances = playerInstances.filter(id => id !== playerId);
109
109
  };
@@ -137,7 +137,7 @@ const CldVideoPlayer = props => {
137
137
  width: width,
138
138
  height: height
139
139
  }), /*#__PURE__*/jsxRuntime.jsx(Script__default["default"], {
140
- id: `cloudinary-videoplayer-${playerId}-${Math.floor(Math.random() * 100)}`,
140
+ id: `cloudinary-videoplayer-${playerId}`,
141
141
  src: `https://unpkg.com/cloudinary-video-player@${PLAYER_VERSION}/dist/cld-video-player.min.js`,
142
142
  onLoad: handleOnLoad,
143
143
  onError: e => console.error(`Failed to load Cloudinary Video Player: ${e.message}`)
@@ -8,7 +8,7 @@ var nextPkg__default = /*#__PURE__*/_interopDefault(nextPkg);
8
8
 
9
9
  var pkg = {
10
10
  name: "next-cloudinary",
11
- version: "7.0.0-beta.1",
11
+ version: "7.0.0-beta.10",
12
12
  license: "MIT",
13
13
  main: "dist/next-cloudinary.cjs.js",
14
14
  module: "dist/next-cloudinary.esm.js",
@@ -31,6 +31,9 @@ var pkg = {
31
31
  "./dist/cloudinary_icon_for_white_bg.svg": "./dist/cloudinary_icon_for_white_bg.svg"
32
32
  },
33
33
  types: "./dist/next-cloudinary.cjs.d.ts",
34
+ files: [
35
+ "dist"
36
+ ],
34
37
  scripts: {
35
38
  build: "preconstruct build && tsx scripts/copy-assets.ts",
36
39
  dev: "preconstruct watch",
@@ -41,9 +44,9 @@ var pkg = {
41
44
  "test:watch": "vitest"
42
45
  },
43
46
  dependencies: {
44
- "@cloudinary-util/types": "1.5.8",
45
- "@cloudinary-util/url-loader": "5.10.3",
46
- "@cloudinary-util/util": "^3.3.2"
47
+ "@cloudinary-util/types": "1.6.0",
48
+ "@cloudinary-util/url-loader": "6.0.0",
49
+ "@cloudinary-util/util": "4.1.0"
47
50
  },
48
51
  devDependencies: {
49
52
  "@babel/core": "^7.25.2",
@@ -61,8 +64,8 @@ var pkg = {
61
64
  vitest: "^2.0.5"
62
65
  },
63
66
  peerDependencies: {
64
- next: "^12 || ^13 || ^14 || >=15.0.0-rc",
65
- react: "^17 || ^18 || >=19.0.0-beta"
67
+ next: "^12 || ^13 || ^14 || >=15.0.0-rc || ^15",
68
+ react: "^17 || ^18 || >=19.0.0-beta || ^19"
66
69
  },
67
70
  preconstruct: {
68
71
  exports: {
@@ -2,7 +2,7 @@ import nextPkg from 'next/package.json';
2
2
 
3
3
  var pkg = {
4
4
  name: "next-cloudinary",
5
- version: "7.0.0-beta.1",
5
+ version: "7.0.0-beta.10",
6
6
  license: "MIT",
7
7
  main: "dist/next-cloudinary.cjs.js",
8
8
  module: "dist/next-cloudinary.esm.js",
@@ -25,6 +25,9 @@ var pkg = {
25
25
  "./dist/cloudinary_icon_for_white_bg.svg": "./dist/cloudinary_icon_for_white_bg.svg"
26
26
  },
27
27
  types: "./dist/next-cloudinary.cjs.d.ts",
28
+ files: [
29
+ "dist"
30
+ ],
28
31
  scripts: {
29
32
  build: "preconstruct build && tsx scripts/copy-assets.ts",
30
33
  dev: "preconstruct watch",
@@ -35,9 +38,9 @@ var pkg = {
35
38
  "test:watch": "vitest"
36
39
  },
37
40
  dependencies: {
38
- "@cloudinary-util/types": "1.5.8",
39
- "@cloudinary-util/url-loader": "5.10.3",
40
- "@cloudinary-util/util": "^3.3.2"
41
+ "@cloudinary-util/types": "1.6.0",
42
+ "@cloudinary-util/url-loader": "6.0.0",
43
+ "@cloudinary-util/util": "4.1.0"
41
44
  },
42
45
  devDependencies: {
43
46
  "@babel/core": "^7.25.2",
@@ -55,8 +58,8 @@ var pkg = {
55
58
  vitest: "^2.0.5"
56
59
  },
57
60
  peerDependencies: {
58
- next: "^12 || ^13 || ^14 || >=15.0.0-rc",
59
- react: "^17 || ^18 || >=19.0.0-beta"
61
+ next: "^12 || ^13 || ^14 || >=15.0.0-rc || ^15",
62
+ react: "^17 || ^18 || >=19.0.0-beta || ^19"
60
63
  },
61
64
  preconstruct: {
62
65
  exports: {
@@ -1,5 +1,5 @@
1
1
  import { constructCloudinaryUrl } from '@cloudinary-util/url-loader';
2
- import { g as getCloudinaryConfig, a as getCloudinaryAnalytics } from './cloudinary-9437f0ad.esm.js';
2
+ import { g as getCloudinaryConfig, a as getCloudinaryAnalytics } from './cloudinary-cb3c790a.esm.js';
3
3
 
4
4
  /**
5
5
  * getCldImageUrl
@@ -51,8 +51,6 @@ function cloudinaryLoader({
51
51
  // for responsive sizing to take effect, so we can utilize the loader width for the base width
52
52
  options.width = loaderOptions?.width;
53
53
  }
54
-
55
- // @ts-ignore
56
54
  return getCldImageUrl(options, cldConfig);
57
55
  }
58
56
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var urlLoader = require('@cloudinary-util/url-loader');
4
- var cloudinary = require('./cloudinary-1cbbab64.cjs.js');
4
+ var cloudinary = require('./cloudinary-1f1b51af.cjs.js');
5
5
 
6
6
  /**
7
7
  * getCldImageUrl
@@ -53,8 +53,6 @@ function cloudinaryLoader({
53
53
  // for responsive sizing to take effect, so we can utilize the loader width for the base width
54
54
  options.width = loaderOptions?.width;
55
55
  }
56
-
57
- // @ts-ignore
58
56
  return getCldImageUrl(options, cldConfig);
59
57
  }
60
58
 
@@ -0,0 +1,14 @@
1
+ import { ImageProps } from 'next/image';
2
+ import type { ImageOptions, ConfigOptions } from '@cloudinary-util/url-loader';
3
+ export type CldImageProps = Omit<ImageProps, 'src' | 'quality'> & ImageOptions & {
4
+ config?: ConfigOptions;
5
+ src: string;
6
+ unoptimized?: boolean;
7
+ };
8
+ declare const CldImage: import("react").ForwardRefExoticComponent<Omit<ImageProps, "src" | "quality"> & ImageOptions & {
9
+ config?: ConfigOptions;
10
+ src: string;
11
+ unoptimized?: boolean;
12
+ } & import("react").RefAttributes<HTMLImageElement>>;
13
+ export default CldImage;
14
+ //# sourceMappingURL=CldImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldImage.d.ts","sourceRoot":"../../../../../src/components/CldImage","sources":["CldImage.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAM/E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,SAAS,CAAC,GAAG,YAAY,GAAG;IAC/E,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,QAAA,MAAM,QAAQ;aALH,aAAa;SACjB,MAAM;kBACG,OAAO;oDAuHrB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./CldImage.js";
2
+ export type { CldImageProps } from "./CldImage.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/components/CldImage","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,sBAAmB;AACrC,YAAY,EAAE,aAAa,EAAE,sBAAmB"}
@@ -0,0 +1,9 @@
1
+ import { CldImageProps } from "../CldImage/CldImage.js";
2
+ export type CldOgImageProps = CldImageProps & {
3
+ excludeTags?: Array<string>;
4
+ keys?: object;
5
+ twitterTitle?: string;
6
+ };
7
+ declare const CldOgImage: ({ excludeTags, twitterTitle, keys, ...props }: CldOgImageProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default CldOgImage;
9
+ //# sourceMappingURL=CldOgImage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldOgImage.d.ts","sourceRoot":"../../../../../src/components/CldOgImage","sources":["CldOgImage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,gCAA6B;AAMrD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG;IAC5C,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,QAAA,MAAM,UAAU,kDAA6D,eAAe,4CAuE3F,CAAA;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./CldOgImage.js";
2
+ export type { CldOgImageProps } from "./CldOgImage.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/components/CldOgImage","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,wBAAqB;AACvC,YAAY,EAAE,eAAe,EAAE,wBAAqB"}
@@ -0,0 +1,9 @@
1
+ import { CldUploadWidgetProps } from "../CldUploadWidget/index.js";
2
+ export interface CldUploadButtonProps extends Omit<CldUploadWidgetProps, 'children'> {
3
+ className?: string;
4
+ children?: JSX.Element | string | Array<JSX.Element | string>;
5
+ onClick?: Function;
6
+ }
7
+ 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, onAbortAction, onBatchCancelledAction, onCloseAction, onDisplayChangedAction, onPublicIdAction, onQueuesEndAction, onQueuesStartAction, onRetryAction, onShowCompletedAction, onSourceChangedAction, onSuccessAction, onTagsAction, onUploadAddedAction, ...props }: CldUploadButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default CldUploadButton;
9
+ //# sourceMappingURL=CldUploadButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldUploadButton.d.ts","sourceRoot":"../../../../../src/components/CldUploadButton","sources":["CldUploadButton.tsx"],"names":[],"mappings":"AAEA,OAAwB,EAAE,oBAAoB,EAAE,oCAA2B;AAE3E,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAC,MAAM,CAAC,CAAC;IAC5D,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,whBAqClB,oBAAoB,4CAyDtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./CldUploadButton.js";
2
+ export type { CldUploadButtonProps } from "./CldUploadButton.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/components/CldUploadButton","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,YAAY,EAAE,oBAAoB,EAAE,6BAA0B"}
@@ -0,0 +1,4 @@
1
+ import { CldUploadWidgetProps } from "./CldUploadWidget.types.js";
2
+ declare const CldUploadWidget: ({ children, config, onError, onOpen, onUpload, options, signatureEndpoint, uploadPreset, ...props }: CldUploadWidgetProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CldUploadWidget;
4
+ //# sourceMappingURL=CldUploadWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldUploadWidget.d.ts","sourceRoot":"../../../../../src/components/CldUploadWidget","sources":["CldUploadWidget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAIL,oBAAoB,EAErB,mCAAgC;AAIjC,QAAA,MAAM,eAAe,wGAUlB,oBAAoB,4CAqNtB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { CloudinaryUploadWidgetOptions, CloudinaryUploadWidgetResults, CloudinaryUploadWidgetInstanceMethods, CloudinaryUploadWidgetError } from '@cloudinary-util/types';
2
+ import { ConfigOptions } from "@cloudinary-util/url-loader";
3
+ export type CldUploadWidgetCloudinaryInstance = any;
4
+ export type CldUploadWidgetWidgetInstance = any;
5
+ export interface CldUploadWidgetProps {
6
+ children?: ({ cloudinary, widget, open, results, error }: CldUploadWidgetPropsChildren) => JSX.Element;
7
+ config?: ConfigOptions;
8
+ onError?: CldUploadEventCallbackError;
9
+ onOpen?: CldUploadEventCallbackWidgetOnly;
10
+ /**
11
+ * @deprecated use onSuccess instead
12
+ */
13
+ onUpload?: CldUploadEventCallbackNoOptions;
14
+ onAbort?: CldUploadEventCallback;
15
+ onBatchCancelled?: CldUploadEventCallback;
16
+ onClose?: CldUploadEventCallback;
17
+ onDisplayChanged?: CldUploadEventCallback;
18
+ onPublicId?: CldUploadEventCallback;
19
+ onQueuesEnd?: CldUploadEventCallback;
20
+ onQueuesStart?: CldUploadEventCallback;
21
+ onRetry?: CldUploadEventCallback;
22
+ onShowCompleted?: CldUploadEventCallback;
23
+ onSourceChanged?: CldUploadEventCallback;
24
+ onSuccess?: CldUploadEventCallback;
25
+ onTags?: CldUploadEventCallback;
26
+ onUploadAdded?: CldUploadEventCallback;
27
+ options?: CloudinaryUploadWidgetOptions;
28
+ signatureEndpoint?: URL | RequestInfo;
29
+ uploadPreset?: string;
30
+ onAbortAction?: CldUploadEventAction;
31
+ onBatchCancelledAction?: CldUploadEventAction;
32
+ onCloseAction?: CldUploadEventAction;
33
+ onDisplayChangedAction?: CldUploadEventAction;
34
+ onPublicIdAction?: CldUploadEventAction;
35
+ onQueuesEndAction?: CldUploadEventAction;
36
+ onQueuesStartAction?: CldUploadEventAction;
37
+ onRetryAction?: CldUploadEventAction;
38
+ onShowCompletedAction?: CldUploadEventAction;
39
+ onSourceChangedAction?: CldUploadEventAction;
40
+ onSuccessAction?: CldUploadEventAction;
41
+ onTagsAction?: CldUploadEventAction;
42
+ onUploadAddedAction?: CldUploadEventAction;
43
+ }
44
+ export type CldUploadWidgetPropsChildren = {
45
+ cloudinary: CldUploadWidgetCloudinaryInstance;
46
+ widget: CldUploadWidgetWidgetInstance;
47
+ error?: CloudinaryUploadWidgetError;
48
+ isLoading?: boolean;
49
+ results?: CloudinaryUploadWidgetResults;
50
+ } & CloudinaryUploadWidgetInstanceMethods;
51
+ export type CldUploadEventCallback = (results: CloudinaryUploadWidgetResults, widget: CldUploadEventCallbackWidget) => void;
52
+ export type CldUploadEventAction = (results: CloudinaryUploadWidgetResults) => void;
53
+ export type CldUploadEventCallbackNoOptions = (results: CloudinaryUploadWidgetResults, widget: CldUploadWidgetWidgetInstance) => void;
54
+ export type CldUploadEventCallbackWidgetOnly = (widget: CldUploadWidgetWidgetInstance) => void;
55
+ export type CldUploadEventCallbackError = (error: CloudinaryUploadWidgetError, widget: CldUploadEventCallbackWidget) => void;
56
+ export type CldUploadEventCallbackWidget = {
57
+ widget: CldUploadWidgetWidgetInstance;
58
+ } & CloudinaryUploadWidgetInstanceMethods;
59
+ //# sourceMappingURL=CldUploadWidget.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldUploadWidget.types.d.ts","sourceRoot":"../../../../../src/components/CldUploadWidget","sources":["CldUploadWidget.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,qCAAqC,EACrC,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,MAAM,iCAAiC,GAAG,GAAG,CAAC;AACpD,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEhD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,4BAA4B,KAAK,GAAG,CAAC,OAAO,CAAC;IACvG,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,OAAO,CAAC,EAAE,2BAA2B,CAAC;IACtC,MAAM,CAAC,EAAE,gCAAgC,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,+BAA+B,CAAC;IAC3C,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,iBAAiB,CAAC,EAAE,GAAG,GAAG,WAAW,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,sBAAsB,CAAC,EAAE,oBAAoB,CAAC;IAC9C,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,sBAAsB,CAAC,EAAE,oBAAoB,CAAC;IAC9C,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,qBAAqB,CAAC,EAAE,oBAAoB,CAAC;IAC7C,qBAAqB,CAAC,EAAE,oBAAoB,CAAC;IAC7C,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;CAC5C;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,EAAE,iCAAiC,CAAC;IAC9C,MAAM,EAAE,6BAA6B,CAAC;IACtC,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,6BAA6B,CAAC;CACzC,GAAG,qCAAqC,CAAC;AAE1C,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;AAC5H,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,6BAA6B,KAAK,IAAI,CAAC;AACpF,MAAM,MAAM,+BAA+B,GAAG,CAAC,OAAO,EAAE,6BAA6B,EAAE,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAC;AACtI,MAAM,MAAM,gCAAgC,GAAG,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAC;AAC/F,MAAM,MAAM,2BAA2B,GAAG,CAAC,KAAK,EAAE,2BAA2B,EAAE,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;AAE7H,MAAM,MAAM,4BAA4B,GAAG;IACzC,MAAM,EAAE,6BAA6B,CAAC;CACvC,GAAG,qCAAqC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./CldUploadWidget.js";
2
+ export type { CldUploadWidgetProps, CldUploadWidgetPropsChildren } from "./CldUploadWidget.types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/components/CldUploadWidget","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,YAAY,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,mCAAgC"}
@@ -0,0 +1,4 @@
1
+ import { CldVideoPlayerProps } from "./CldVideoPlayer.types.js";
2
+ declare const CldVideoPlayer: (props: CldVideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default CldVideoPlayer;
4
+ //# sourceMappingURL=CldVideoPlayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldVideoPlayer.d.ts","sourceRoot":"../../../../../src/components/CldVideoPlayer","sources":["CldVideoPlayer.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,kCAA+B;AAQ7D,QAAA,MAAM,cAAc,UAAW,mBAAmB,4CAoIjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { CloudinaryVideoPlayer, CloudinaryVideoPlayerOptionsLogo } from '@cloudinary-util/types';
3
+ import { ConfigOptions, GetVideoPlayerOptions } from "@cloudinary-util/url-loader";
4
+ import { GetCldImageUrlOptions } from "../../helpers/getCldImageUrl.js";
5
+ import { GetCldVideoUrlOptions } from "../../helpers/getCldVideoUrl.js";
6
+ export type CldVideoPlayerProps = Omit<GetVideoPlayerOptions, "cloud_name" | "autoplayMode" | "publicId" | "secure" | "showLogo" | "logoImageUrl" | "logoOnclickUrl"> & {
7
+ className?: string;
8
+ config?: ConfigOptions;
9
+ id?: string;
10
+ logo?: boolean | CldVideoPlayerPropsLogo;
11
+ onDataLoad?: Function;
12
+ onError?: Function;
13
+ onMetadataLoad?: Function;
14
+ onPause?: Function;
15
+ onPlay?: Function;
16
+ onEnded?: Function;
17
+ playerRef?: MutableRefObject<CloudinaryVideoPlayer | null>;
18
+ poster?: string | GetCldImageUrlOptions | GetCldVideoUrlOptions;
19
+ src: string;
20
+ videoRef?: MutableRefObject<HTMLVideoElement | null>;
21
+ quality?: string | number;
22
+ };
23
+ export interface CldVideoPlayerPropsLogo {
24
+ imageUrl?: CloudinaryVideoPlayerOptionsLogo['logoImageUrl'];
25
+ logo?: boolean;
26
+ onClickUrl?: CloudinaryVideoPlayerOptionsLogo['logoOnclickUrl'];
27
+ }
28
+ //# sourceMappingURL=CldVideoPlayer.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CldVideoPlayer.types.d.ts","sourceRoot":"../../../../../src/components/CldVideoPlayer","sources":["CldVideoPlayer.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,wCAAqC;AACrE,OAAO,EAAE,qBAAqB,EAAE,wCAAqC;AAErE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,gBAAgB,CAAC,GAAG;IACtK,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IACzC,UAAU,CAAC,EAAE,QAAQ,CAAC;IACtB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,SAAS,CAAC,EAAE,gBAAgB,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,EAAE,MAAM,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;IAChE,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAA;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,gCAAgC,CAAC,cAAc,CAAC,CAAC;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,gCAAgC,CAAC,gBAAgB,CAAC,CAAC;CACjE"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./CldVideoPlayer.js";
2
+ export type { CldVideoPlayerProps, CldVideoPlayerPropsLogo } from "./CldVideoPlayer.types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../../../src/components/CldVideoPlayer","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,4BAAyB;AAC3C,YAAY,EAAG,mBAAmB,EAAE,uBAAuB,EAAE,kCAA+B"}
@@ -0,0 +1,9 @@
1
+ import type { ImageOptions, ConfigOptions, AnalyticsOptions } from '@cloudinary-util/url-loader';
2
+ /**
3
+ * getCldImageUrl
4
+ */
5
+ export type GetCldImageUrlOptions = ImageOptions;
6
+ export type GetCldImageUrlConfig = ConfigOptions;
7
+ export type GetCldImageUrlAnalytics = AnalyticsOptions;
8
+ export declare function getCldImageUrl(options: GetCldImageUrlOptions, config?: GetCldImageUrlConfig, analytics?: GetCldImageUrlAnalytics): string;
9
+ //# sourceMappingURL=getCldImageUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCldImageUrl.d.ts","sourceRoot":"../../../../src/helpers","sources":["getCldImageUrl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAIjG;;GAEG;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AACjD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC;AACjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,oBAAoB,EAAE,SAAS,CAAC,EAAE,uBAAuB,UAMhI"}
@@ -0,0 +1,7 @@
1
+ import type { GetCldImageUrlOptions } from "./getCldImageUrl.js";
2
+ /**
3
+ * getCldImageUrl
4
+ */
5
+ export type GetCldOgImageUrlOptions = GetCldImageUrlOptions;
6
+ export declare function getCldOgImageUrl(options: GetCldOgImageUrlOptions): string;
7
+ //# sourceMappingURL=getCldOgImageUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCldOgImageUrl.d.ts","sourceRoot":"../../../../src/helpers","sources":["getCldOgImageUrl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,4BAAyB;AAE9D;;GAEG;AAEH,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,UAYhE"}
@@ -0,0 +1,9 @@
1
+ import type { VideoOptions, ConfigOptions, AnalyticsOptions } from '@cloudinary-util/url-loader';
2
+ /**
3
+ * getCldVideoUrl
4
+ */
5
+ export type GetCldVideoUrlOptions = VideoOptions;
6
+ export type GetCldVideoUrlConfig = ConfigOptions;
7
+ export type GetCldVideoUrlAnalytics = AnalyticsOptions;
8
+ export declare function getCldVideoUrl(options: GetCldVideoUrlOptions, config?: GetCldVideoUrlConfig, analytics?: GetCldVideoUrlAnalytics): string;
9
+ //# sourceMappingURL=getCldVideoUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCldVideoUrl.d.ts","sourceRoot":"../../../../src/helpers","sources":["getCldVideoUrl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAIjG;;GAEG;AAEH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AACjD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC;AACjD,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC;AAEvD,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,EAAE,MAAM,CAAC,EAAE,oBAAoB,EAAE,SAAS,CAAC,EAAE,uBAAuB,UAUhI"}
@@ -0,0 +1,21 @@
1
+ export { default as CldImage } from "./components/CldImage/index.js";
2
+ export type { CldImageProps } from "./components/CldImage/index.js";
3
+ export { default as CldOgImage } from "./components/CldOgImage/index.js";
4
+ export type { CldOgImageProps } from "./components/CldOgImage/index.js";
5
+ export { default as CldUploadButton } from "./components/CldUploadButton/index.js";
6
+ export type { CldUploadButtonProps } from "./components/CldUploadButton/index.js";
7
+ export { default as CldUploadWidget } from "./components/CldUploadWidget/index.js";
8
+ export type { CldUploadWidgetProps, CldUploadWidgetPropsChildren } from "./components/CldUploadWidget/index.js";
9
+ export type { CloudinaryUploadWidgetOptions, CloudinaryUploadWidgetResults, CloudinaryUploadWidgetInfo, CloudinaryUploadWidgetInstanceMethods, CloudinaryUploadWidgetInstanceMethodCloseOptions, CloudinaryUploadWidgetInstanceMethodDestroyOptions, CloudinaryUploadWidgetInstanceMethodOpenOptions, CloudinaryUploadWidgetInstanceMethodUpdateOptions, CloudinaryUploadWidgetSources, CloudinaryUploadWidgetError } from '@cloudinary-util/types';
10
+ export { default as CldVideoPlayer } from "./components/CldVideoPlayer/index.js";
11
+ export type { CldVideoPlayerProps, CldVideoPlayerPropsLogo } from "./components/CldVideoPlayer/index.js";
12
+ export type { CloudinaryVideoPlayer, CloudinaryVideoPlayerOptions, CloudinaryVideoPlayerOptionsColors, CloudinaryVideoPlayerOptionsLogo } from '@cloudinary-util/types';
13
+ export { cloudinaryLoader } from "./loaders/cloudinary-loader.js";
14
+ export type { CloudinaryLoader, CloudinaryLoaderLoaderOptions, CloudinaryLoaderCldOptions } from "./loaders/cloudinary-loader.js";
15
+ export { getCldImageUrl } from "./helpers/getCldImageUrl.js";
16
+ export type { GetCldImageUrlOptions, GetCldImageUrlConfig, GetCldImageUrlAnalytics } from "./helpers/getCldImageUrl.js";
17
+ export { getCldOgImageUrl } from "./helpers/getCldOgImageUrl.js";
18
+ export type { GetCldOgImageUrlOptions } from "./helpers/getCldOgImageUrl.js";
19
+ export { getCldVideoUrl } from "./helpers/getCldVideoUrl.js";
20
+ export type { GetCldVideoUrlOptions, GetCldVideoUrlConfig, GetCldVideoUrlAnalytics } from "./helpers/getCldVideoUrl.js";
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uCAA8B;AAC5D,YAAY,EAAE,aAAa,EAAE,uCAA8B;AAE3D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,yCAAgC;AAChE,YAAY,EAAE,eAAe,EAAE,yCAAgC;AAE/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,8CAAqC;AAC1E,YAAY,EAAE,oBAAoB,EAAE,8CAAqC;AAEzE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,8CAAqC;AAC1E,YAAY,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,8CAAqC;AACvG,YAAY,EACV,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,qCAAqC,EACrC,gDAAgD,EAChD,kDAAkD,EAClD,+CAA+C,EAC/C,iDAAiD,EACjD,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,6CAAoC;AACxE,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,6CAAoC;AAChG,YAAY,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,kCAAkC,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAExK,OAAO,EAAE,gBAAgB,EAAE,uCAAoC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,0BAA0B,EAAE,uCAAoC;AAE/H,OAAO,EAAE,cAAc,EAAE,oCAAiC;AAC1D,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,oCAAiC;AAErH,OAAO,EAAE,gBAAgB,EAAE,sCAAmC;AAC9D,YAAY,EAAE,uBAAuB,EAAE,sCAAmC;AAE1E,OAAO,EAAE,cAAc,EAAE,oCAAiC;AAC1D,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,oCAAiC"}
@@ -0,0 +1,16 @@
1
+ import { ImageProps } from 'next/image';
2
+ export interface CloudinaryLoaderCldOptions {
3
+ src: string;
4
+ }
5
+ export interface CloudinaryLoaderLoaderOptions {
6
+ height?: string | number;
7
+ width?: string | number;
8
+ }
9
+ export interface CloudinaryLoader {
10
+ loaderOptions: CloudinaryLoaderLoaderOptions;
11
+ imageProps: ImageProps;
12
+ cldOptions: CloudinaryLoaderCldOptions;
13
+ cldConfig?: object;
14
+ }
15
+ export declare function cloudinaryLoader({ loaderOptions, imageProps, cldOptions, cldConfig }: CloudinaryLoader): string;
16
+ //# sourceMappingURL=cloudinary-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudinary-loader.d.ts","sourceRoot":"../../../../src/loaders","sources":["cloudinary-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,6BAA6B,CAAC;IAC7C,UAAU,EAAE,UAAU,CAAC;IACvB,UAAU,EAAE,0BAA0B,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,SAAc,EAAE,EAAE,gBAAgB,UAqC3G"}
@@ -1 +1 @@
1
- Cannot find "/dist/fonts/cloudinary_icon_for_white_bg.svg" in cloudinary-video-player@1.11.1
1
+ error code: 502
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var CldImage = require('./CldImage-68dff3e6.cjs.js');
5
+ var CldImage = require('./CldImage-841d87c1.cjs.js');
6
6
  var Head = require('next/head');
7
- var cloudinaryLoader = require('./cloudinary-loader-80d421f0.cjs.js');
7
+ var cloudinaryLoader = require('./cloudinary-loader-c87ac9ae.cjs.js');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
  var CldUploadButton = require('./CldUploadButton-db9b095b.cjs.js');
10
- var CldUploadWidget = require('./CldUploadWidget-e39838cc.cjs.js');
11
- var CldVideoPlayer = require('./CldVideoPlayer-49ac4380.cjs.js');
10
+ var CldUploadWidget = require('./CldUploadWidget-cdb65b22.cjs.js');
11
+ var CldVideoPlayer = require('./CldVideoPlayer-a6525186.cjs.js');
12
12
  var urlLoader = require('@cloudinary-util/url-loader');
13
- var cloudinary = require('./cloudinary-1cbbab64.cjs.js');
13
+ var cloudinary = require('./cloudinary-1f1b51af.cjs.js');
14
14
  require('next/package.json');
15
15
 
16
16
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
@@ -1,13 +1,13 @@
1
- export { default as CldImage } from './CldImage-4b579fe8.esm.js';
1
+ export { default as CldImage } from './CldImage-c9af4fd9.esm.js';
2
2
  import Head from 'next/head';
3
- import { g as getCldImageUrl } from './cloudinary-loader-1863f0f4.esm.js';
4
- export { c as cloudinaryLoader, g as getCldImageUrl } from './cloudinary-loader-1863f0f4.esm.js';
3
+ import { g as getCldImageUrl } from './cloudinary-loader-ad7ad702.esm.js';
4
+ export { c as cloudinaryLoader, g as getCldImageUrl } from './cloudinary-loader-ad7ad702.esm.js';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
  export { default as CldUploadButton } from './CldUploadButton-196b419b.esm.js';
7
- export { default as CldUploadWidget } from './CldUploadWidget-a9c04a78.esm.js';
8
- export { default as CldVideoPlayer } from './CldVideoPlayer-7b1734a7.esm.js';
7
+ export { default as CldUploadWidget } from './CldUploadWidget-77f44ab3.esm.js';
8
+ export { default as CldVideoPlayer } from './CldVideoPlayer-4db49132.esm.js';
9
9
  import { constructCloudinaryUrl } from '@cloudinary-util/url-loader';
10
- import { g as getCloudinaryConfig, a as getCloudinaryAnalytics } from './cloudinary-9437f0ad.esm.js';
10
+ import { g as getCloudinaryConfig, a as getCloudinaryAnalytics } from './cloudinary-cb3c790a.esm.js';
11
11
  import 'next/package.json';
12
12
 
13
13
  const OG_IMAGE_WIDTH = 1200;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-cloudinary",
3
- "version": "7.0.0-beta.1",
3
+ "version": "7.0.0-beta.10",
4
4
  "license": "MIT",
5
5
  "main": "dist/next-cloudinary.cjs.js",
6
6
  "module": "dist/next-cloudinary.esm.js",
@@ -23,10 +23,13 @@
23
23
  "./dist/cloudinary_icon_for_white_bg.svg": "./dist/cloudinary_icon_for_white_bg.svg"
24
24
  },
25
25
  "types": "./dist/next-cloudinary.cjs.d.ts",
26
+ "files": [
27
+ "dist"
28
+ ],
26
29
  "dependencies": {
27
- "@cloudinary-util/types": "1.5.8",
28
- "@cloudinary-util/url-loader": "5.10.3",
29
- "@cloudinary-util/util": "^3.3.2"
30
+ "@cloudinary-util/types": "1.6.0",
31
+ "@cloudinary-util/url-loader": "6.0.0",
32
+ "@cloudinary-util/util": "4.1.0"
30
33
  },
31
34
  "devDependencies": {
32
35
  "@babel/core": "^7.25.2",
@@ -44,8 +47,8 @@
44
47
  "vitest": "^2.0.5"
45
48
  },
46
49
  "peerDependencies": {
47
- "next": "^12 || ^13 || ^14 || >=15.0.0-rc",
48
- "react": "^17 || ^18 || >=19.0.0-beta"
50
+ "next": "^12 || ^13 || ^14 || >=15.0.0-rc || ^15",
51
+ "react": "^17 || ^18 || >=19.0.0-beta || ^19"
49
52
  },
50
53
  "preconstruct": {
51
54
  "exports": {
@@ -1,78 +0,0 @@
1
- import path from 'path';
2
- import { createWriteStream } from 'fs';
3
- import { mkdirp } from 'mkdirp';
4
- import https from 'https';
5
-
6
- const PLAYER_VERSION = '1.11.1';
7
-
8
- const assets = [
9
- {
10
- uri: `https://unpkg.com/cloudinary-video-player@${PLAYER_VERSION}/dist/cld-video-player.min.css`,
11
- name: 'cld-video-player.css'
12
- },
13
- {
14
- directory: 'fonts',
15
- assets: [
16
- `https://unpkg.com/cloudinary-video-player@${PLAYER_VERSION}/dist/fonts/cloudinary_icon_for_black_bg.svg`,
17
- `https://unpkg.com/cloudinary-video-player@${PLAYER_VERSION}/dist/fonts/cloudinary_icon_for_white_bg.svg`,
18
- ]
19
- }
20
- ];
21
-
22
- let hasWrittenAssets = false;
23
-
24
- async function copyAssets() {
25
- const rootPath = path.join(__dirname, '../');
26
- const distPath = path.join(rootPath, 'dist');
27
-
28
- if ( hasWrittenAssets ) return;
29
-
30
- await mkdirp(distPath);
31
-
32
- for ( const asset of assets ) {
33
- if ( typeof asset === 'string' || typeof asset.uri === 'string' ) {
34
-
35
- let name = asset.name;
36
- let uri = asset.uri;
37
-
38
- if ( typeof asset === 'string' ) {
39
- name = path.basename(asset);
40
- uri = asset;
41
- }
42
-
43
- const writePath = path.join(distPath, name);
44
- await downloadFile(uri, writePath);
45
-
46
- console.log(`Wrote ${uri} to ${writePath}`);
47
- } else if ( typeof asset.directory === 'string' ) {
48
- await mkdirp(path.join(distPath, asset.directory));
49
-
50
- for ( const dirAsset of asset.assets ) {
51
- const writePath = path.join(distPath, asset.directory, path.basename(dirAsset));
52
- await downloadFile(dirAsset, writePath);
53
- console.log(`Wrote ${dirAsset} to ${writePath}`);
54
- }
55
- }
56
- }
57
-
58
- hasWrittenAssets = true;
59
- }
60
-
61
- /**
62
- * downloadFile
63
- */
64
-
65
- function downloadFile(assetUrl: string, writePath: string) {
66
- return new Promise<void>((resolve) => {
67
- const file = createWriteStream(writePath);
68
- https.get(assetUrl, function(response) {
69
- response.pipe(file);
70
- file.on('finish', () => {
71
- file.close();
72
- resolve();
73
- });
74
- });
75
- })
76
- }
77
-
78
- copyAssets();
package/tsconfig.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "extends": "@tsconfig/recommended/tsconfig.json",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "declarationMap": true,
6
- "emitDeclarationOnly": true,
7
- "esModuleInterop": true,
8
- "jsx": "react-jsx",
9
- "lib": ["dom", "esnext"],
10
- "module": "nodenext",
11
- "moduleResolution": "nodenext",
12
- "noEmit": false,
13
- "resolveJsonModule": true,
14
- "sourceMap": true,
15
- "target": "esnext",
16
- "plugins": [
17
- {
18
- "name": "next"
19
- }
20
- ]
21
- },
22
- "exclude": ["node_modules"]
23
- }