next-cloudinary 0.2.0 → 0.4.0

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.
@@ -1,784 +0,0 @@
1
- import Image from 'next/image';
2
- import { Cloudinary } from '@cloudinary/url-gen';
3
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import { useRef } from 'react';
5
- import Script from 'next/script';
6
-
7
- function _extends() {
8
- _extends = Object.assign ? Object.assign.bind() : function (target) {
9
- for (var i = 1; i < arguments.length; i++) {
10
- var source = arguments[i];
11
-
12
- for (var key in source) {
13
- if (Object.prototype.hasOwnProperty.call(source, key)) {
14
- target[key] = source[key];
15
- }
16
- }
17
- }
18
-
19
- return target;
20
- };
21
- return _extends.apply(this, arguments);
22
- }
23
-
24
- function _objectWithoutPropertiesLoose(source, excluded) {
25
- if (source == null) return {};
26
- var target = {};
27
- var sourceKeys = Object.keys(source);
28
- var key, i;
29
-
30
- for (i = 0; i < sourceKeys.length; i++) {
31
- key = sourceKeys[i];
32
- if (excluded.indexOf(key) >= 0) continue;
33
- target[key] = source[key];
34
- }
35
-
36
- return target;
37
- }
38
-
39
- const cld$1 = new Cloudinary({
40
- cloud: {
41
- cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
42
- },
43
- url: {
44
- // Used to avoid issues with SSR particularly for the blurred placeholder
45
- analytics: false
46
- }
47
- });
48
- /**
49
- * Retrieves the public id of a cloudiary image url. If no url is recognized it returns the parameter it self.
50
- * If it's recognized that is a url and it's not possible to get the public id, it warns the user.
51
- *
52
- * @param {string} src The cloudiary url or public id.
53
- *
54
- * @return {string} The images public id
55
- */
56
-
57
- function getPublicId(src) {
58
- if (src.includes('res.cloudinary.com')) {
59
- const regexWithTransformations = /(https?)\:\/\/(res.cloudinary.com)\/([^\/]+)\/(image|video|raw)\/(upload|authenticated)\/(.*)\/(v[0-9]+)\/(.+)(?:\.[a-z]{3})?/;
60
- const regexWithoutTransformations = /(https?)\:\/\/(res.cloudinary.com)\/([^\/]+)\/(image|video|raw)\/(upload|authenticated)\/(v[0-9]+)\/(.+)(?:\.[a-z]{3})?/;
61
- const withTransformations = src.match(regexWithTransformations);
62
- const withoutTransformations = src.match(regexWithoutTransformations);
63
-
64
- if (withTransformations) {
65
- return withTransformations[withTransformations.length - 1];
66
- } else if (withoutTransformations) {
67
- return withoutTransformations[withoutTransformations.length - 1];
68
- } else {
69
- console.warn(`Not possible to retrieve the publicUrl from ${src}, make sure it's a valid cloudinary image url.`);
70
- }
71
- }
72
-
73
- return src;
74
- }
75
- /**
76
- * createPlaceholderUrl
77
- */
78
-
79
- function createPlaceholderUrl({
80
- src,
81
- placeholder
82
- }) {
83
- const cldImage = cld$1.image(src).resize('c_limit,w_100').delivery('q_1').format('auto');
84
-
85
- if (placeholder === 'grayscale') {
86
- cldImage.effect('e_grayscale');
87
- }
88
-
89
- if (placeholder.includes('color:')) {
90
- const color = placeholder.split(':').splice(1).join(':');
91
- cldImage.effect('e_grayscale');
92
- cldImage.effect(`e_colorize:60,co_${color}`);
93
- }
94
-
95
- return cldImage.toURL();
96
- }
97
-
98
- const cropsGravityAuto = ['crop', 'fill', 'lfill', 'fill_pad', 'thumb'];
99
- const props$6 = ['crop', 'gravity'];
100
- function plugin$6({
101
- cldImage,
102
- options,
103
- cldOptions
104
- } = {}) {
105
- const {
106
- width,
107
- height
108
- } = options;
109
- const {
110
- crop = 'limit',
111
- gravity
112
- } = cldOptions;
113
- let transformationString = `c_${crop},w_${width}`;
114
-
115
- if (!gravity && cropsGravityAuto.includes(crop)) {
116
- gravity = 'auto';
117
- }
118
-
119
- if (!['limit'].includes(crop)) {
120
- transformationString = `${transformationString},h_${height}`;
121
- }
122
-
123
- if (gravity) {
124
- if (gravity === 'auto' && !cropsGravityAuto.includes(crop)) {
125
- console.warn('Auto gravity can only be used with crop, fill, lfill, fill_pad or thumb. Not applying gravity.');
126
- } else {
127
- transformationString = `${transformationString},g_${gravity}`;
128
- }
129
- }
130
-
131
- cldImage.resize(transformationString);
132
- }
133
-
134
- var croppingPlugin = {
135
- __proto__: null,
136
- props: props$6,
137
- plugin: plugin$6
138
- };
139
-
140
- const params = ['art', {
141
- prop: 'autoBrightness',
142
- effect: 'auto_brightness'
143
- }, {
144
- prop: 'autoColor',
145
- effect: 'auto_color'
146
- }, {
147
- prop: 'autoContrast',
148
- effect: 'auto_contrast'
149
- }, {
150
- prop: 'assistColorblind',
151
- effect: 'assist_colorblind'
152
- }, 'blackwhite', 'blur', {
153
- prop: 'blurFaces',
154
- effect: 'blur_faces'
155
- }, {
156
- prop: 'blurRegion',
157
- effect: 'blur_region'
158
- }, 'brightness', {
159
- prop: 'brightnessHSB',
160
- effect: 'brightness_hsb'
161
- }, 'cartoonify', 'colorize', 'contrast', 'distort', {
162
- prop: 'fillLight',
163
- effect: 'fill_light'
164
- }, 'gamma', {
165
- prop: 'gradientFade',
166
- effect: 'gradient_fade'
167
- }, 'grayscale', 'improve', 'negate', {
168
- prop: 'oilPaint',
169
- effect: 'oil_paint'
170
- }, 'outline', 'pixelate', {
171
- prop: 'pixelateFaces',
172
- effect: 'pixelate_faces'
173
- }, {
174
- prop: 'pixelateRegion',
175
- effect: 'pixelate_region'
176
- }, 'redeye', {
177
- prop: 'replaceColor',
178
- effect: 'replace_color'
179
- }, 'saturation', 'sepia', 'shadow', 'sharpen', 'shear', {
180
- prop: 'simulateColorblind',
181
- effect: 'simulate_colorblind'
182
- }, 'tint', {
183
- prop: 'unsharpMask',
184
- effect: 'unsharp_mask'
185
- }, 'vectorize', 'vibrance', 'vignette'];
186
- const props$5 = params.map(param => param.prop || param);
187
- function plugin$5({
188
- cldImage,
189
- cldOptions
190
- } = {}) {
191
- params.forEach(key => {
192
- const prop = key.prop || key;
193
- const effect = key.effect || key;
194
-
195
- if (prop === 'oilPaint' && cldOptions[prop]) {
196
- console.log('cldOptions[prop]', cldOptions[prop]);
197
- }
198
-
199
- if (cldOptions[prop] === true) {
200
- cldImage.effect(`e_${effect}`);
201
- } else if (typeof cldOptions[prop] === 'string') {
202
- cldImage.effect(`e_${effect}:${cldOptions[prop]}`);
203
- }
204
- });
205
- }
206
-
207
- var effectsPlugin = {
208
- __proto__: null,
209
- props: props$5,
210
- plugin: plugin$5
211
- };
212
-
213
- // aspectRatio
214
- const primary = {
215
- aspectRatio: {
216
- qualifier: 'ar'
217
- },
218
- crop: {
219
- qualifier: 'c'
220
- },
221
- gravity: {
222
- qualifier: 'g'
223
- },
224
- height: {
225
- qualifier: 'h'
226
- },
227
- width: {
228
- qualifier: 'w'
229
- }
230
- };
231
- const position = {
232
- angle: {
233
- qualifier: 'a'
234
- },
235
- gravity: {
236
- qualifier: 'g'
237
- },
238
- x: {
239
- qualifier: 'x'
240
- },
241
- y: {
242
- qualifier: 'y'
243
- }
244
- };
245
- const text = {
246
- color: {
247
- qualifier: 'co',
248
- location: 'primary'
249
- },
250
- fontFamily: {
251
- qualifier: false
252
- },
253
- fontSize: {
254
- qualifier: false
255
- },
256
- fontWeight: {
257
- qualifier: false
258
- },
259
- letterSpacing: {
260
- qualifier: 'letter_spacing'
261
- },
262
- textDecoration: {
263
- qualifier: false
264
- }
265
- };
266
-
267
- const _excluded$2 = ["publicId", "position", "text", "effects"];
268
- const props$4 = ['overlays'];
269
- function plugin$4({
270
- cldImage,
271
- options,
272
- cldOptions
273
- } = {}) {
274
- const {
275
- overlays = []
276
- } = cldOptions;
277
- const type = 'overlay';
278
- const typeQualifier = 'l';
279
- overlays.forEach(_ref => {
280
- let {
281
- publicId,
282
- position: position$1,
283
- text: text$1,
284
- effects: layerEffects = []
285
- } = _ref,
286
- options = _objectWithoutPropertiesLoose(_ref, _excluded$2);
287
-
288
- const hasPublicId = typeof publicId === 'string';
289
- const hasText = typeof text$1 === 'object';
290
- const hasPosition = typeof position$1 === 'object';
291
-
292
- if (!hasPublicId && !hasText) {
293
- console.warn(`An ${type} is missing Public ID or Text`);
294
- return;
295
- } // Start to construct the transformation string using text or the public ID
296
- // if it's image-based
297
-
298
-
299
- let layerTransformation;
300
-
301
- if (hasText) {
302
- layerTransformation = `${typeQualifier}_text`;
303
- } else {
304
- layerTransformation = `${typeQualifier}_${publicId.replace(/\//g, ':')}`;
305
- } // Begin organizing transformations based on what it is and the location
306
- // it needs to be placed in the URL
307
-
308
-
309
- const primary$1 = [];
310
- const applied = []; // Gemeral options
311
-
312
- Object.keys(options).forEach(key => {
313
- if (!primary[key]) return;
314
- const {
315
- qualifier
316
- } = primary[key];
317
- primary$1.push(`${qualifier}_${options[key]}`);
318
- }); // Layer effects
319
-
320
- layerEffects.forEach(effect => {
321
- Object.keys(effect).forEach(key => {
322
- if (!primary[key]) return;
323
- const {
324
- qualifier
325
- } = primary[key];
326
- primary$1.push(`${qualifier}_${effect[key]}`);
327
- });
328
- }); // Text styling
329
-
330
- if (hasText) {
331
- const textTransformations = [];
332
- Object.keys(text$1).forEach(key => {
333
- if (!text[key]) return;
334
- const {
335
- qualifier,
336
- location
337
- } = text[key];
338
-
339
- if (location === 'primary') {
340
- primary$1.push(`${qualifier}_${text$1[key]}`);
341
- } else {
342
- textTransformations.push(text$1[key]);
343
- }
344
- });
345
- layerTransformation = `${layerTransformation}:${textTransformations.join('_')}:${text$1.text}`;
346
- } // Positioning
347
-
348
-
349
- if (hasPosition) {
350
- Object.keys(position$1).forEach(key => {
351
- if (!position[key]) return;
352
- const {
353
- qualifier
354
- } = position[key];
355
- applied.push(`${qualifier}_${position$1[key]}`);
356
- });
357
- } // Add all primary transformations
358
-
359
-
360
- layerTransformation = `${layerTransformation},${primary$1.join(',')}`; // Add all applied transformations
361
-
362
- layerTransformation = `${layerTransformation}/fl_layer_apply`;
363
-
364
- if (applied.length > 0) {
365
- layerTransformation = `${layerTransformation},${applied.join(',')}`;
366
- } // Finally add it to the image
367
-
368
-
369
- cldImage.addTransformation(layerTransformation);
370
- });
371
- }
372
-
373
- var overlaysPlugin = {
374
- __proto__: null,
375
- props: props$4,
376
- plugin: plugin$4
377
- };
378
-
379
- const props$3 = ['rawTransformations'];
380
- function plugin$3({
381
- cldImage,
382
- cldOptions
383
- } = {}) {
384
- const {
385
- rawTransformations = []
386
- } = cldOptions;
387
- rawTransformations.forEach(transformation => {
388
- cldImage.addTransformation(transformation);
389
- });
390
- }
391
-
392
- var rawTransformationsPlugin = {
393
- __proto__: null,
394
- props: props$3,
395
- plugin: plugin$3
396
- };
397
-
398
- const props$2 = ['removeBackground'];
399
- function plugin$2({
400
- cldImage,
401
- options,
402
- cldOptions
403
- } = {}) {
404
- const {
405
- removeBackground = false
406
- } = cldOptions;
407
-
408
- if (removeBackground) {
409
- cldImage.effect('e_background_removal');
410
- }
411
- }
412
-
413
- var removeBackgroundPlugin = {
414
- __proto__: null,
415
- props: props$2,
416
- plugin: plugin$2
417
- };
418
-
419
- const _excluded$1 = ["publicId", "type", "position", "text", "effects"];
420
- const props$1 = ['underlays'];
421
- function plugin$1({
422
- cldImage,
423
- options,
424
- cldOptions
425
- } = {}) {
426
- const {
427
- underlays = []
428
- } = cldOptions;
429
- const typeQualifier = 'u';
430
- underlays.forEach(_ref => {
431
- let {
432
- publicId,
433
- type,
434
- position: position$1,
435
- effects: layerEffects = []
436
- } = _ref,
437
- options = _objectWithoutPropertiesLoose(_ref, _excluded$1);
438
-
439
- const hasPublicId = typeof publicId === 'string';
440
- const hasPosition = typeof position$1 === 'object';
441
-
442
- if (!hasPublicId) {
443
- console.warn(`An ${type} is missing a Public ID`);
444
- return;
445
- } // Start to construct the transformation string using text or the public ID
446
- // if it's image-based
447
-
448
-
449
- let layerTransformation = `${typeQualifier}_${publicId.replace(/\//g, ':')}`; // Begin organizing transformations based on what it is and the location
450
- // it needs to be placed in the URL
451
-
452
- const primary$1 = [];
453
- const applied = []; // Gemeral options
454
-
455
- Object.keys(options).forEach(key => {
456
- if (!primary[key]) return;
457
- const {
458
- qualifier
459
- } = primary[key];
460
- primary$1.push(`${qualifier}_${options[key]}`);
461
- }); // Layer effects
462
-
463
- layerEffects.forEach(effect => {
464
- Object.keys(effect).forEach(key => {
465
- if (!primary[key]) return;
466
- const {
467
- qualifier
468
- } = primary[key];
469
- primary$1.push(`${qualifier}_${effect[key]}`);
470
- });
471
- }); // Positioning
472
-
473
- if (hasPosition) {
474
- Object.keys(position$1).forEach(key => {
475
- if (!position[key]) return;
476
- const {
477
- qualifier
478
- } = position[key];
479
- applied.push(`${qualifier}_${position$1[key]}`);
480
- });
481
- } // Add all primary transformations
482
-
483
-
484
- layerTransformation = `${layerTransformation},${primary$1.join(',')}`; // Add all applied transformations
485
-
486
- layerTransformation = `${layerTransformation}/fl_layer_apply`;
487
-
488
- if (applied.length > 0) {
489
- layerTransformation = `${layerTransformation},${applied.join(',')}`;
490
- } // Finally add it to the image
491
-
492
-
493
- cldImage.addTransformation(layerTransformation);
494
- });
495
- }
496
-
497
- var underlaysPlugin = {
498
- __proto__: null,
499
- props: props$1,
500
- plugin: plugin$1
501
- };
502
-
503
- const props = ['zoompan'];
504
- function plugin({
505
- cldImage,
506
- cldOptions
507
- } = {}) {
508
- const {
509
- zoompan = false
510
- } = cldOptions;
511
- const options = {};
512
-
513
- if (zoompan === true) {
514
- cldImage.effect('e_zoompan');
515
- } else if (typeof zoompan === 'string') {
516
- if (zoompan === 'loop') {
517
- cldImage.effect('e_zoompan');
518
- cldImage.effect('e_loop');
519
- } else {
520
- cldImage.effect(`e_zoompan:${zoompan}`);
521
- }
522
- } else if (typeof zoompan === 'object') {
523
- let zoompanEffect = 'e_zoompan';
524
-
525
- if (typeof zoompan.options === 'string') {
526
- zoompanEffect = `${zoompanEffect}${zoompan.options}`;
527
- }
528
-
529
- cldImage.effect(zoompanEffect);
530
- let loopEffect;
531
-
532
- if (zoompan.loop === true) {
533
- loopEffect = 'e_loop';
534
- } else if (typeof zoompan.loop === 'string') {
535
- loopEffect = `e_loop${zoompan.loop}`;
536
- }
537
-
538
- if (loopEffect) {
539
- cldImage.effect(loopEffect);
540
- }
541
- }
542
-
543
- if (zoompan !== false) {
544
- options.format = 'gif';
545
- }
546
-
547
- return {
548
- options
549
- };
550
- }
551
-
552
- var zoompanPlugin = {
553
- __proto__: null,
554
- props: props,
555
- plugin: plugin
556
- };
557
-
558
- let cld;
559
- const transformationPlugins = [// Background Removal must always come first
560
- removeBackgroundPlugin, croppingPlugin, effectsPlugin, overlaysPlugin, underlaysPlugin, zoompanPlugin, // Raw transformations needs to be last simply to make sure
561
- // it's always expected to applied the same way
562
- rawTransformationsPlugin];
563
- function cloudinaryLoader(defaultOptions, cldOptions, cldConfig = {}) {
564
- if (!cld) {
565
- cld = new Cloudinary(_extends({
566
- cloud: {
567
- cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
568
- },
569
- url: {
570
- // Used to avoid issues with SSR particularly for the blurred placeholder
571
- analytics: false
572
- }
573
- }, cldConfig));
574
- }
575
-
576
- const options = _extends({
577
- format: 'auto',
578
- quality: 'auto'
579
- }, defaultOptions);
580
-
581
- const publicId = getPublicId(options.src);
582
- const cldImage = cld.image(publicId);
583
- transformationPlugins.forEach(({
584
- plugin
585
- }) => {
586
- const {
587
- options: pluginOptions
588
- } = plugin({
589
- cldImage,
590
- options,
591
- cldOptions
592
- }) || {};
593
-
594
- if (pluginOptions != null && pluginOptions.format) {
595
- options.format = pluginOptions.format;
596
- }
597
- });
598
- return cldImage.format(options.format).delivery(`q_${options.quality}`).toURL();
599
- }
600
-
601
- const CldImage = props => {
602
- const CLD_OPTIONS = [];
603
- transformationPlugins.forEach(({
604
- props: _props = []
605
- }) => {
606
- _props.forEach(prop => {
607
- if (CLD_OPTIONS.includes(prop)) {
608
- throw new Error(`Option ${prop} already exists!`);
609
- }
610
-
611
- CLD_OPTIONS.push(prop);
612
- });
613
- }); // Construct the base Image component props by filtering out Cloudinary-specific props
614
-
615
- const imageProps = {};
616
- Object.keys(props).filter(key => !CLD_OPTIONS.includes(key)).forEach(key => imageProps[key] = props[key]); // Construct Cloudinary-specific props by looking for values for any of the supported prop keys
617
-
618
- const cldOptions = {};
619
- CLD_OPTIONS.forEach(key => {
620
- if (props[key]) {
621
- cldOptions[key] = props[key];
622
- }
623
- }); // If we see a placeholder option, configure a Cloudinary-based URL.
624
- // The resulting image will always be blurred per Next.js, so we're
625
- // limited on options for placeholders.
626
- //
627
- // We need to do this logic here as we potentially need to mutate
628
- // an Image component prop as opposed to simply the URL
629
- //
630
- // https://nextjs.org/docs/api-reference/next/image#blurdataurl
631
-
632
- if (imageProps.placeholder) {
633
- const publicId = getPublicId(props.src);
634
- imageProps.blurDataURL = createPlaceholderUrl({
635
- src: publicId,
636
- placeholder: props.placeholder
637
- });
638
-
639
- if (imageProps.placeholder !== 'blur') {
640
- imageProps.placeholder = 'blur';
641
- }
642
- }
643
-
644
- return /*#__PURE__*/jsx(Image, _extends({}, imageProps, {
645
- loader: options => cloudinaryLoader(_extends({}, imageProps, {
646
- options
647
- }), cldOptions)
648
- }));
649
- };
650
-
651
- const CldUploadWidget = ({
652
- children,
653
- onUpload,
654
- options,
655
- signed,
656
- signatureEndpoint
657
- }) => {
658
- const cloudinary = useRef();
659
- const widget = useRef();
660
- /**
661
- * generateSignature
662
- * @description Makes a request to an endpoint to sign Cloudinary parameters as part of widget creation
663
- */
664
-
665
- function generateSignature(callback, paramsToSign) {
666
- fetch(signatureEndpoint, {
667
- method: "POST",
668
- body: JSON.stringify({
669
- paramsToSign
670
- })
671
- }).then(r => r.json()).then(({
672
- signature
673
- }) => {
674
- callback(signature);
675
- });
676
- }
677
- /**
678
- * createWidget
679
- * @description Creates a new instance of the Cloudinary widget and stores in a ref
680
- */
681
-
682
-
683
- function createWidget() {
684
- var _cloudinary$current;
685
-
686
- // When creating a signed upload, you need to provide both your Cloudinary API Key
687
- // as well as a signature generator function that will sign any paramters
688
- // either on page load or during the upload process. Read more about signed uploads at:
689
- // https://cloudinary.com/documentation/upload_widget#signed_uploads
690
- const totalOptions = _extends({}, options, !!signed && {
691
- uploadSignature: generateSignature
692
- }); // no need for apiSecret because of api/sign-cloudinary-params
693
-
694
-
695
- if (signed && !totalOptions.apiKey) {
696
- return new Error("Signed Upload needs apiKey!");
697
- }
698
-
699
- return (_cloudinary$current = cloudinary.current) == null ? void 0 : _cloudinary$current.createUploadWidget(totalOptions, function (error, result) {
700
- // The callback is a bit more chatty than failed or success so
701
- // only trigger when one of those are the case. You can additionally
702
- // create a separate handler such as onEvent and trigger it on
703
- // ever occurance
704
- if (error || result.event === "success") {
705
- onUpload(error, result, widget == null ? void 0 : widget.current);
706
- }
707
- });
708
- }
709
- /**
710
- * open
711
- * @description When triggered, uses the current widget instance to open the upload modal
712
- */
713
-
714
-
715
- function open() {
716
- if (!(widget != null && widget.current)) {
717
- widget.current = createWidget();
718
- }
719
-
720
- (widget == null ? void 0 : widget.current) && widget.current.open();
721
- }
722
- /**
723
- * handleOnLoad
724
- * @description Stores the Cloudinary window instance to a ref when the widget script loads
725
- */
726
-
727
-
728
- function handleOnLoad() {
729
- cloudinary.current = window.cloudinary;
730
- }
731
-
732
- return /*#__PURE__*/jsxs(Fragment, {
733
- children: [children({
734
- cloudinary: cloudinary.current,
735
- widget: widget.current,
736
- open
737
- }), /*#__PURE__*/jsx(Script, {
738
- id: `cloudinary-${Math.floor(Math.random() * 100)}`,
739
- src: "https://widget.cloudinary.com/v2.0/global/all.js",
740
- onLoad: handleOnLoad,
741
- onError: e => {
742
- console.error("Script failed to load", e);
743
- }
744
- })]
745
- });
746
- };
747
-
748
- const _excluded = ["onUpload", "options", "signed", "label", "children"];
749
-
750
- const CldUploadButton = _ref => {
751
- let {
752
- onUpload,
753
- options,
754
- signed,
755
- children
756
- } = _ref,
757
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
758
-
759
- return /*#__PURE__*/jsx(Fragment, {
760
- children: /*#__PURE__*/jsx(CldUploadWidget, {
761
- signed: signed,
762
- options: options,
763
- onUpload: onUpload,
764
- signatureEndpoint: signed != null ? signed : props.signatureEndpoint,
765
- children: ({
766
- open
767
- }) => {
768
- function handleOnClick(e) {
769
- e.preventDefault();
770
- open();
771
- }
772
-
773
- return /*#__PURE__*/jsx("button", _extends({
774
- onClick: handleOnClick
775
- }, props, {
776
- children: children
777
- }));
778
- }
779
- })
780
- });
781
- };
782
-
783
- export { CldImage, CldUploadButton, CldUploadWidget, cloudinaryLoader, position, primary, text };
784
- //# sourceMappingURL=next-cloudinary.modern.mjs.map