next-cloudinary 0.0.3 → 0.0.4

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.
@@ -34,7 +34,79 @@ function _objectWithoutPropertiesLoose(source, excluded) {
34
34
  return target;
35
35
  }
36
36
 
37
+ function _readOnlyError(name) {
38
+ throw new TypeError("\"" + name + "\" is read-only");
39
+ }
40
+
41
+ var cld$1 = new Cloudinary({
42
+ cloud: {
43
+ cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
44
+ },
45
+ url: {
46
+ // Used to avoid issues with SSR particularly for the blurred placeholder
47
+ analytics: false
48
+ }
49
+ });
50
+ /**
51
+ * createPlaceholderUrl
52
+ */
53
+
54
+ function createPlaceholderUrl(_ref) {
55
+ var src = _ref.src,
56
+ placeholder = _ref.placeholder;
57
+ var cldImage = cld$1.image(src).resize('c_limit,w_100').delivery('q_1').format('auto');
58
+
59
+ if (placeholder === 'grayscale') {
60
+ cldImage.effect('e_grayscale');
61
+ }
62
+
63
+ if (placeholder.includes('color:')) {
64
+ var color = placeholder.split(':').splice(1).join(':');
65
+ cldImage.effect('e_grayscale');
66
+ cldImage.effect("e_colorize:60,co_" + color);
67
+ }
68
+
69
+ return cldImage.toURL();
70
+ }
71
+
72
+ var cropsGravityAuto = ['crop', 'fill', 'lfill', 'fill_pad', 'thumb'];
73
+ function croppingPlugin(_temp) {
74
+ var _ref = _temp === void 0 ? {} : _temp,
75
+ cldImage = _ref.cldImage,
76
+ options = _ref.options,
77
+ cldOptions = _ref.cldOptions;
78
+
79
+ var width = options.width,
80
+ height = options.height;
81
+ var _cldOptions$crop = cldOptions.crop,
82
+ crop = _cldOptions$crop === void 0 ? 'limit' : _cldOptions$crop,
83
+ gravity = cldOptions.gravity;
84
+ var transformationString = "c_" + crop + ",w_" + width;
85
+
86
+ if (!gravity && cropsGravityAuto.includes(crop)) {
87
+ _readOnlyError("gravity");
88
+ }
89
+
90
+ if (!['limit'].includes(crop)) {
91
+ transformationString = transformationString + ",h_" + height;
92
+ }
93
+
94
+ if (gravity) {
95
+ if (gravity === 'auto' && !cropsGravityAuto.includes(crop)) {
96
+ console.warn('Auto gravity can only be used with crop, fill, lfill, fill_pad or thumb. Not applying gravity.');
97
+ } else {
98
+ transformationString = transformationString + ",g_" + gravity;
99
+ }
100
+ }
101
+
102
+ cldImage.resize(transformationString);
103
+ }
104
+
105
+ // aspectRatio
37
106
  var primary = {
107
+ aspectRatio: {
108
+ qualifier: 'ar'
109
+ },
38
110
  crop: {
39
111
  qualifier: 'c'
40
112
  },
@@ -84,70 +156,31 @@ var text = {
84
156
  }
85
157
  };
86
158
 
87
- var _excluded$1 = ["publicId", "type", "position", "text", "effects"];
88
- var cld$1 = new Cloudinary({
89
- cloud: {
90
- cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
91
- }
92
- });
93
- function cloudinaryLoader(options, cldOptions) {
94
- var src = options.src,
95
- width = options.width,
96
- _options$format = options.format,
97
- format = _options$format === void 0 ? 'auto' : _options$format,
98
- _options$quality = options.quality,
99
- quality = _options$quality === void 0 ? 'auto' : _options$quality;
100
- var _cldOptions$overlays = cldOptions.overlays,
101
- overlays = _cldOptions$overlays === void 0 ? [] : _cldOptions$overlays,
102
- _cldOptions$removeBac = cldOptions.removeBackground,
103
- removeBackground = _cldOptions$removeBac === void 0 ? false : _cldOptions$removeBac,
104
- _cldOptions$underlays = cldOptions.underlays,
105
- underlays = _cldOptions$underlays === void 0 ? [] : _cldOptions$underlays;
106
- var cldImage = cld$1.image(src);
107
-
108
- if (removeBackground) {
109
- cldImage.effect('e_background_removal');
110
- } // Adding overlays and underlays allows you to compose your image
111
- // by using layering with overlays appearing on top of and udnerlays
112
- // appearing below your base image layer
113
- //
114
- // Learn more: https://cloudinary.com/documentation/layers
159
+ var _excluded$2 = ["publicId", "position", "text", "effects"];
160
+ function overlaysPlugin(_temp) {
161
+ var _ref = _temp === void 0 ? {} : _temp,
162
+ cldImage = _ref.cldImage,
163
+ cldOptions = _ref.cldOptions;
115
164
 
116
-
117
- var layers = [].concat(overlays.map(function (overlay) {
118
- return _extends({}, overlay, {
119
- type: 'overlay'
120
- });
121
- }), underlays.map(function (underlay) {
122
- return _extends({}, underlay, {
123
- type: 'underlay'
124
- });
125
- }));
126
- layers.forEach(function (_ref) {
127
- var publicId = _ref.publicId,
128
- type = _ref.type,
129
- position$1 = _ref.position,
130
- text$1 = _ref.text,
131
- _ref$effects = _ref.effects,
132
- layerEffects = _ref$effects === void 0 ? [] : _ref$effects,
133
- options = _objectWithoutPropertiesLoose(_ref, _excluded$1);
165
+ var _cldOptions$overlays = cldOptions.overlays,
166
+ overlays = _cldOptions$overlays === void 0 ? [] : _cldOptions$overlays;
167
+ var type = 'overlay';
168
+ var typeQualifier = 'l';
169
+ overlays.forEach(function (_ref2) {
170
+ var publicId = _ref2.publicId,
171
+ position$1 = _ref2.position,
172
+ text$1 = _ref2.text,
173
+ _ref2$effects = _ref2.effects,
174
+ layerEffects = _ref2$effects === void 0 ? [] : _ref2$effects,
175
+ options = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
134
176
 
135
177
  var hasPublicId = typeof publicId === 'string';
136
178
  var hasText = typeof text$1 === 'object';
137
179
  var hasPosition = typeof position$1 === 'object';
138
180
 
139
181
  if (!hasPublicId && !hasText) {
140
- console.warn(type + " is missing Public ID or Text");
182
+ console.warn("An " + type + " is missing Public ID or Text");
141
183
  return;
142
- } // Determine the qualifier for the type of layer
143
-
144
-
145
- var typeQualifier;
146
-
147
- if (type === 'overlay') {
148
- typeQualifier = 'l';
149
- } else if (type === 'underlay') {
150
- typeQualifier = 'u';
151
184
  } // Start to construct the transformation string using text or the public ID
152
185
  // if it's image-based
153
186
 
@@ -217,27 +250,127 @@ function cloudinaryLoader(options, cldOptions) {
217
250
 
218
251
  cldImage.addTransformation(layerTransformation);
219
252
  });
220
- return cldImage.resize("c_limit,w_" + width).format(format).delivery("q_" + quality).toURL();
221
253
  }
222
254
 
223
- var _excluded = ["overlays", "removeBackground", "underlays"];
255
+ function removeBackgroundPlugin(_temp) {
256
+ var _ref = _temp === void 0 ? {} : _temp,
257
+ cldImage = _ref.cldImage,
258
+ cldOptions = _ref.cldOptions;
259
+
260
+ var _cldOptions$removeBac = cldOptions.removeBackground,
261
+ removeBackground = _cldOptions$removeBac === void 0 ? false : _cldOptions$removeBac;
262
+
263
+ if (removeBackground) {
264
+ cldImage.effect('e_background_removal');
265
+ }
266
+ }
267
+
268
+ var _excluded$1 = ["publicId", "type", "position", "text", "effects"];
269
+ function underlaysPlugin(_temp) {
270
+ var _ref = _temp === void 0 ? {} : _temp,
271
+ cldImage = _ref.cldImage,
272
+ cldOptions = _ref.cldOptions;
273
+
274
+ var _cldOptions$underlays = cldOptions.underlays,
275
+ underlays = _cldOptions$underlays === void 0 ? [] : _cldOptions$underlays;
276
+ var typeQualifier = 'u';
277
+ underlays.forEach(function (_ref2) {
278
+ var publicId = _ref2.publicId,
279
+ type = _ref2.type,
280
+ position$1 = _ref2.position,
281
+ _ref2$effects = _ref2.effects,
282
+ layerEffects = _ref2$effects === void 0 ? [] : _ref2$effects,
283
+ options = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
284
+
285
+ var hasPublicId = typeof publicId === 'string';
286
+ var hasPosition = typeof position$1 === 'object';
287
+
288
+ if (!hasPublicId) {
289
+ console.warn("An " + type + " is missing a Public ID");
290
+ return;
291
+ } // Start to construct the transformation string using text or the public ID
292
+ // if it's image-based
293
+
294
+
295
+ var layerTransformation = typeQualifier + "_" + publicId.replace(/\//g, ':'); // Begin organizing transformations based on what it is and the location
296
+ // it needs to be placed in the URL
297
+
298
+ var primary$1 = [];
299
+ var applied = []; // Gemeral options
300
+
301
+ Object.keys(options).forEach(function (key) {
302
+ if (!primary[key]) return;
303
+ var qualifier = primary[key].qualifier;
304
+ primary$1.push(qualifier + "_" + options[key]);
305
+ }); // Layer effects
306
+
307
+ layerEffects.forEach(function (effect) {
308
+ Object.keys(effect).forEach(function (key) {
309
+ if (!primary[key]) return;
310
+ var qualifier = primary[key].qualifier;
311
+ primary$1.push(qualifier + "_" + effect[key]);
312
+ });
313
+ }); // Positioning
314
+
315
+ if (hasPosition) {
316
+ Object.keys(position$1).forEach(function (key) {
317
+ if (!position[key]) return;
318
+ var qualifier = position[key].qualifier;
319
+ applied.push(qualifier + "_" + position$1[key]);
320
+ });
321
+ } // Add all primary transformations
322
+
323
+
324
+ layerTransformation = layerTransformation + "," + primary$1.join(','); // Add all applied transformations
325
+
326
+ layerTransformation = layerTransformation + "/fl_layer_apply";
327
+
328
+ if (applied.length > 0) {
329
+ layerTransformation = layerTransformation + "," + applied.join(',');
330
+ } // Finally add it to the image
331
+
332
+
333
+ cldImage.addTransformation(layerTransformation);
334
+ });
335
+ }
336
+
224
337
  var cld = new Cloudinary({
225
338
  cloud: {
226
339
  cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
227
- },
228
- url: {
229
- // Used to avoid issues with SSR particularly for the blurred placeholder
230
- analytics: false
231
340
  }
232
341
  });
342
+ var transformationPlugins = [// Background Removal must always come first
343
+ removeBackgroundPlugin, croppingPlugin, overlaysPlugin, underlaysPlugin];
344
+ function cloudinaryLoader(options, cldOptions) {
345
+ var src = options.src,
346
+ _options$format = options.format,
347
+ format = _options$format === void 0 ? 'auto' : _options$format,
348
+ _options$quality = options.quality,
349
+ quality = _options$quality === void 0 ? 'auto' : _options$quality;
350
+ var cldImage = cld.image(src);
351
+ transformationPlugins.forEach(function (plugin) {
352
+ plugin({
353
+ cldImage: cldImage,
354
+ options: options,
355
+ cldOptions: cldOptions
356
+ });
357
+ });
358
+ return cldImage.format(format).delivery("q_" + quality).toURL();
359
+ }
360
+
361
+ var _excluded = ["crop", "gravity", "overlays", "removeBackground", "underlays"];
233
362
 
234
363
  var CldImage = function CldImage(_ref) {
235
- var overlays = _ref.overlays,
364
+ var crop = _ref.crop,
365
+ gravity = _ref.gravity,
366
+ overlays = _ref.overlays,
236
367
  removeBackground = _ref.removeBackground,
237
368
  underlays = _ref.underlays,
238
369
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
239
370
 
240
371
  var cldOptions = {
372
+ crop: crop,
373
+ gravity: gravity,
241
374
  overlays: overlays,
242
375
  removeBackground: removeBackground,
243
376
  underlays: underlays
@@ -248,19 +381,10 @@ var CldImage = function CldImage(_ref) {
248
381
  // https://nextjs.org/docs/api-reference/next/image#blurdataurl
249
382
 
250
383
  if (props.placeholder) {
251
- var cldBlurredImage = cld.image(props.src).resize('c_limit,w_100').delivery('q_1').format('auto');
252
-
253
- if (props.placeholder === 'grayscale') {
254
- cldBlurredImage.effect('e_grayscale');
255
- }
256
-
257
- if (props.placeholder.includes('color:')) {
258
- var color = props.placeholder.split(':').splice(1).join(':');
259
- cldBlurredImage.effect('e_grayscale');
260
- cldBlurredImage.effect("e_colorize:60,co_" + color);
261
- }
262
-
263
- imageProps.blurDataURL = cldBlurredImage.toURL();
384
+ imageProps.blurDataURL = createPlaceholderUrl({
385
+ src: props.src,
386
+ placeholder: props.placeholder
387
+ });
264
388
 
265
389
  if (props.placeholder !== 'blur') {
266
390
  props.placeholder = 'blur';
@@ -269,7 +393,9 @@ var CldImage = function CldImage(_ref) {
269
393
 
270
394
  return /*#__PURE__*/jsx(Image, _extends({}, imageProps, props, {
271
395
  loader: function loader(options) {
272
- return cloudinaryLoader(options, cldOptions);
396
+ return cloudinaryLoader(_extends({}, props, {
397
+ options: options
398
+ }), cldOptions);
273
399
  }
274
400
  }));
275
401
  };
@@ -1 +1 @@
1
- {"version":3,"file":"next-cloudinary.module.js","sources":["../src/constants/qualifiers.js","../src/loaders/cloudinary-loader.js","../src/components/CldImage/CldImage.js"],"sourcesContent":["export const primary = {\n crop: {\n qualifier: 'c'\n },\n gravity: {\n qualifier: 'g'\n },\n height: {\n qualifier: 'h'\n },\n width: {\n qualifier: 'w'\n },\n};\n\nexport const position = {\n angle: {\n qualifier: 'a'\n },\n gravity: {\n qualifier: 'g'\n },\n x: {\n qualifier: 'x'\n },\n y: {\n qualifier: 'y'\n },\n}\n\nexport const text = {\n color: {\n qualifier: 'co',\n location: 'primary'\n },\n textDecoration: {\n qualifier: false\n },\n fontFamily: {\n qualifier: false\n },\n fontSize: {\n qualifier: false\n },\n fontWeight: {\n qualifier: false\n },\n letterSpacing: {\n qualifier: 'letter_spacing'\n }\n}","import { Cloudinary } from '@cloudinary/url-gen';\n\nimport {\n primary as qualifiersPrimary,\n text as qualifiersText,\n position as qualifiersPosition\n} from '../constants/qualifiers';\n\nconst cld = new Cloudinary({\n cloud: {\n cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME\n }\n});\n\nexport function cloudinaryLoader(options, cldOptions) {\n const {\n src,\n width,\n format = 'auto',\n quality = 'auto',\n } = options;\n\n const {\n overlays = [],\n effects = [],\n removeBackground = false,\n underlays = []\n } = cldOptions;\n\n const cldImage = cld.image(src);\n\n if ( removeBackground ) {\n cldImage.effect('e_background_removal');\n }\n\n // Adding overlays and underlays allows you to compose your image\n // by using layering with overlays appearing on top of and udnerlays\n // appearing below your base image layer\n //\n // Learn more: https://cloudinary.com/documentation/layers\n\n const layers = [\n ...overlays.map(overlay => ({ ...overlay, type: 'overlay' })),\n ...underlays.map(underlay => ({ ...underlay, type: 'underlay' })),\n ];\n\n layers.forEach(({ publicId, type, position, text, effects: layerEffects = [], ...options }) => {\n const hasPublicId = typeof publicId === 'string';\n const hasText = typeof text === 'object';\n const hasPosition = typeof position === 'object';\n\n if ( !hasPublicId && !hasText ) {\n console.warn(`${type} is missing Public ID or Text`);\n return;\n }\n\n // Determine the qualifier for the type of layer\n\n let typeQualifier;\n\n if ( type === 'overlay' ) {\n typeQualifier = 'l';\n } else if ( type === 'underlay' ) {\n typeQualifier = 'u';\n }\n\n // Start to construct the transformation string using text or the public ID\n // if it's image-based\n\n let layerTransformation;\n\n if ( hasText ) {\n layerTransformation = `${typeQualifier}_text`;\n } else {\n layerTransformation = `${typeQualifier}_${publicId.replace(/\\//g, ':')}`;\n }\n\n // Begin organizing transformations based on what it is and the location\n // it needs to be placed in the URL\n\n const primary = [];\n const applied = [];\n\n // Gemeral options\n\n Object.keys(options).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${options[key]}`);\n });\n\n // Layer effects\n\n layerEffects.forEach(effect => {\n Object.keys(effect).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${effect[key]}`);\n });\n });\n\n // Text styling\n\n if ( hasText ) {\n const textTransformations = [];\n\n Object.keys(text).forEach(key => {\n if ( !qualifiersText[key] ) return;\n\n const { qualifier, location } = qualifiersText[key];\n\n if ( location === 'primary' ) {\n primary.push(`${qualifier}_${text[key]}`);\n } else {\n textTransformations.push(text[key]);\n }\n });\n\n layerTransformation = `${layerTransformation}:${textTransformations.join('_')}:${text.text}`\n }\n\n // Positioning\n\n if ( hasPosition ) {\n Object.keys(position).forEach(key => {\n if ( !qualifiersPosition[key] ) return;\n\n const { qualifier } = qualifiersPosition[key];\n\n applied.push(`${qualifier}_${position[key]}`);\n });\n }\n\n // Add all primary transformations\n\n layerTransformation = `${layerTransformation},${primary.join(',')}`;\n\n // Add all applied transformations\n\n layerTransformation = `${layerTransformation}/fl_layer_apply`;\n\n if ( applied.length > 0 ) {\n layerTransformation = `${layerTransformation},${applied.join(',')}`;\n }\n\n // Finally add it to the image\n\n cldImage.addTransformation(layerTransformation);\n });\n\n return cldImage.resize(`c_limit,w_${width}`).format(format).delivery(`q_${quality}`).toURL();\n}","import Image from 'next/image';\nimport { Cloudinary } from '@cloudinary/url-gen';\n\nimport { cloudinaryLoader } from '../../loaders/cloudinary-loader';\n\nconst cld = new Cloudinary({\n cloud: {\n cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME\n },\n url: {\n // Used to avoid issues with SSR particularly for the blurred placeholder\n analytics: false\n }\n});\n\nconst CldImage = ({ overlays, removeBackground, underlays, ...props }) => {\n const cldOptions = {\n overlays,\n removeBackground,\n underlays,\n };\n\n const imageProps = {};\n\n // If we see a placeholder option, configure a Cloudinary-based URL.\n // The resulting image will always be blurred per Next.js, so we're\n // limited on options for placeholders.\n // https://nextjs.org/docs/api-reference/next/image#blurdataurl\n\n if ( props.placeholder ) {\n const cldBlurredImage = cld.image(props.src)\n .resize('c_limit,w_100')\n .delivery('q_1')\n .format('auto');\n\n if ( props.placeholder === 'grayscale' ) {\n cldBlurredImage.effect('e_grayscale');\n }\n\n if ( props.placeholder.includes('color:') ) {\n const color = props.placeholder.split(':').splice(1).join(':')\n cldBlurredImage.effect('e_grayscale');\n cldBlurredImage.effect(`e_colorize:60,co_${color}`);\n }\n\n imageProps.blurDataURL = cldBlurredImage.toURL();\n\n if ( props.placeholder !== 'blur' ) {\n props.placeholder = 'blur';\n }\n }\n\n return (\n <Image\n {...imageProps}\n {...props}\n loader={(options) => cloudinaryLoader(options, cldOptions)}\n />\n );\n}\n\nexport default CldImage;"],"names":["primary","crop","qualifier","gravity","height","width","position","angle","x","y","text","color","location","textDecoration","fontFamily","fontSize","fontWeight","letterSpacing","cld","Cloudinary","cloud","cloudName","process","env","NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME","cloudinaryLoader","options","cldOptions","src","format","quality","overlays","removeBackground","underlays","cldImage","image","effect","layers","map","overlay","type","underlay","forEach","publicId","effects","layerEffects","_excluded","hasPublicId","hasText","hasPosition","console","warn","typeQualifier","layerTransformation","replace","applied","Object","keys","key","qualifiersPrimary","push","textTransformations","qualifiersText","join","qualifiersPosition","length","addTransformation","resize","delivery","toURL","url","analytics","CldImage","props","imageProps","placeholder","cldBlurredImage","includes","split","splice","blurDataURL","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,OAAO,GAAG;AACrBC,EAAAA,IAAI,EAAE;AACJC,IAAAA,SAAS,EAAE,GAAA;GAFQ;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AAN,CAAkBG,KAAlB,CAAwB,GAAxB,CAAA,CAA6BC,MAA7B,CAAoC,CAApC,EAAuChB,IAAvC,CAA4C,GAA5C,CAAd,CAAA;MACAa,eAAe,CAACxC,MAAhB,CAAuB,aAAvB,CAAA,CAAA;MACAwC,eAAe,CAACxC,MAAhB,CAAA,mBAAA,GAA2CzB,KAA3C,CAAA,CAAA;AACD,KAAA;;AAED+D,IAAAA,UAAU,CAACM,WAAX,GAAyBJ,eAAe,CAACP,KAAhB,EAAzB,CAAA;;AAEA,IAAA,IAAKI,KAAK,CAACE,WAAN,KAAsB,MAA3B,EAAoC;MAClCF,KAAK,CAACE,WAAN,GAAoB,MAApB,CAAA;AACD,KAAA;AACF,GAAA;;AAED,EAAA,oBACEM,GAAC,CAAA,KAAD,EACMP,QAAAA,CAAAA,EAAAA,EAAAA,UADN,EAEMD,KAFN,EAAA;IAGE,MAAM,EAAE,gBAAC/C,OAAD,EAAA;AAAA,MAAA,OAAaD,gBAAgB,CAACC,OAAD,EAAUC,UAAV,CAA7B,CAAA;AAAA,KAAA;GAJZ,CAAA,CAAA,CAAA;AAOD;;;;"}
1
+ {"version":3,"file":"next-cloudinary.module.js","sources":["../src/lib/cloudinary.js","../src/plugins/cropping.js","../src/constants/qualifiers.js","../src/plugins/overlays.js","../src/plugins/remove-background.js","../src/plugins/underlays.js","../src/loaders/cloudinary-loader.js","../src/components/CldImage/CldImage.js"],"sourcesContent":["import { Cloudinary } from '@cloudinary/url-gen';\n\nconst cld = new Cloudinary({\n cloud: {\n cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME\n },\n url: {\n // Used to avoid issues with SSR particularly for the blurred placeholder\n analytics: false\n }\n});\n\n/**\n * createPlaceholderUrl\n */\n\nexport function createPlaceholderUrl({ src, placeholder }) {\n const cldImage = cld.image(src)\n .resize('c_limit,w_100')\n .delivery('q_1')\n .format('auto');\n\n if ( placeholder === 'grayscale' ) {\n cldImage.effect('e_grayscale');\n }\n\n if ( placeholder.includes('color:') ) {\n const color = placeholder.split(':').splice(1).join(':')\n cldImage.effect('e_grayscale');\n cldImage.effect(`e_colorize:60,co_${color}`);\n }\n\n return cldImage.toURL();\n}","const cropsGravityAuto = [ 'crop', 'fill', 'lfill', 'fill_pad', 'thumb' ];\n\nexport function croppingPlugin({ cldImage, options, cldOptions } = {}) {\n const { width, height } = options;\n const { crop = 'limit', gravity } = cldOptions;\n\n let transformationString = `c_${crop},w_${width}`;\n\n if ( !gravity && cropsGravityAuto.includes(crop) ) {\n gravity = 'auto';\n }\n\n if ( !['limit'].includes(crop) ) {\n transformationString = `${transformationString},h_${height}`;\n }\n\n if ( gravity ) {\n if ( gravity === 'auto' && !cropsGravityAuto.includes(crop) ) {\n console.warn('Auto gravity can only be used with crop, fill, lfill, fill_pad or thumb. Not applying gravity.');\n } else {\n transformationString = `${transformationString},g_${gravity}`;\n }\n }\n\n cldImage.resize(transformationString);\n}","// aspectRatio\n\nexport const primary = {\n aspectRatio: {\n qualifier: 'ar'\n },\n crop: {\n qualifier: 'c'\n },\n gravity: {\n qualifier: 'g'\n },\n height: {\n qualifier: 'h'\n },\n width: {\n qualifier: 'w'\n },\n};\n\nexport const position = {\n angle: {\n qualifier: 'a'\n },\n gravity: {\n qualifier: 'g'\n },\n x: {\n qualifier: 'x'\n },\n y: {\n qualifier: 'y'\n },\n}\n\nexport const text = {\n color: {\n qualifier: 'co',\n location: 'primary'\n },\n textDecoration: {\n qualifier: false\n },\n fontFamily: {\n qualifier: false\n },\n fontSize: {\n qualifier: false\n },\n fontWeight: {\n qualifier: false\n },\n letterSpacing: {\n qualifier: 'letter_spacing'\n }\n}","import {\n primary as qualifiersPrimary,\n text as qualifiersText,\n position as qualifiersPosition\n} from '../constants/qualifiers';\n\nexport function overlaysPlugin({ cldImage, options, cldOptions } = {}) {\n const { overlays = [] } = cldOptions;\n\n const type = 'overlay';\n const typeQualifier = 'l';\n\n overlays.forEach(({ publicId, position, text, effects: layerEffects = [], ...options }) => {\n const hasPublicId = typeof publicId === 'string';\n const hasText = typeof text === 'object';\n const hasPosition = typeof position === 'object';\n\n if ( !hasPublicId && !hasText ) {\n console.warn(`An ${type} is missing Public ID or Text`);\n return;\n }\n\n // Start to construct the transformation string using text or the public ID\n // if it's image-based\n\n let layerTransformation;\n\n if ( hasText ) {\n layerTransformation = `${typeQualifier}_text`;\n } else {\n layerTransformation = `${typeQualifier}_${publicId.replace(/\\//g, ':')}`;\n }\n\n // Begin organizing transformations based on what it is and the location\n // it needs to be placed in the URL\n\n const primary = [];\n const applied = [];\n\n // Gemeral options\n\n Object.keys(options).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${options[key]}`);\n });\n\n // Layer effects\n\n layerEffects.forEach(effect => {\n Object.keys(effect).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${effect[key]}`);\n });\n });\n\n // Text styling\n\n if ( hasText ) {\n const textTransformations = [];\n\n Object.keys(text).forEach(key => {\n if ( !qualifiersText[key] ) return;\n\n const { qualifier, location } = qualifiersText[key];\n\n if ( location === 'primary' ) {\n primary.push(`${qualifier}_${text[key]}`);\n } else {\n textTransformations.push(text[key]);\n }\n });\n\n layerTransformation = `${layerTransformation}:${textTransformations.join('_')}:${text.text}`\n }\n\n // Positioning\n\n if ( hasPosition ) {\n Object.keys(position).forEach(key => {\n if ( !qualifiersPosition[key] ) return;\n\n const { qualifier } = qualifiersPosition[key];\n\n applied.push(`${qualifier}_${position[key]}`);\n });\n }\n\n // Add all primary transformations\n\n layerTransformation = `${layerTransformation},${primary.join(',')}`;\n\n // Add all applied transformations\n\n layerTransformation = `${layerTransformation}/fl_layer_apply`;\n\n if ( applied.length > 0 ) {\n layerTransformation = `${layerTransformation},${applied.join(',')}`;\n }\n\n // Finally add it to the image\n\n cldImage.addTransformation(layerTransformation);\n });\n}","export function removeBackgroundPlugin({ cldImage, options, cldOptions } = {}) {\n const { removeBackground = false } = cldOptions;\n if ( removeBackground ) {\n cldImage.effect('e_background_removal');\n }\n}","import {\n primary as qualifiersPrimary,\n text as qualifiersText,\n position as qualifiersPosition\n} from '../constants/qualifiers';\n\nexport function underlaysPlugin({ cldImage, options, cldOptions } = {}) {\n const { underlays = [] } = cldOptions;\n\n const type = 'underlay';\n const typeQualifier = 'u';\n\n underlays.forEach(({ publicId, type, position, text, effects: layerEffects = [], ...options }) => {\n const hasPublicId = typeof publicId === 'string';\n const hasPosition = typeof position === 'object';\n\n if ( !hasPublicId ) {\n console.warn(`An ${type} is missing a Public ID`);\n return;\n }\n\n // Start to construct the transformation string using text or the public ID\n // if it's image-based\n\n let layerTransformation = `${typeQualifier}_${publicId.replace(/\\//g, ':')}`;\n\n // Begin organizing transformations based on what it is and the location\n // it needs to be placed in the URL\n\n const primary = [];\n const applied = [];\n\n // Gemeral options\n\n Object.keys(options).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${options[key]}`);\n });\n\n // Layer effects\n\n layerEffects.forEach(effect => {\n Object.keys(effect).forEach(key => {\n if ( !qualifiersPrimary[key] ) return;\n const { qualifier } = qualifiersPrimary[key];\n primary.push(`${qualifier}_${effect[key]}`);\n });\n });\n\n // Positioning\n\n if ( hasPosition ) {\n Object.keys(position).forEach(key => {\n if ( !qualifiersPosition[key] ) return;\n\n const { qualifier } = qualifiersPosition[key];\n\n applied.push(`${qualifier}_${position[key]}`);\n });\n }\n\n // Add all primary transformations\n\n layerTransformation = `${layerTransformation},${primary.join(',')}`;\n\n // Add all applied transformations\n\n layerTransformation = `${layerTransformation}/fl_layer_apply`;\n\n if ( applied.length > 0 ) {\n layerTransformation = `${layerTransformation},${applied.join(',')}`;\n }\n\n // Finally add it to the image\n\n cldImage.addTransformation(layerTransformation);\n });\n}","import { Cloudinary } from '@cloudinary/url-gen';\n\nimport { croppingPlugin } from '../plugins/cropping';\nimport { overlaysPlugin } from '../plugins/overlays';\nimport { removeBackgroundPlugin } from '../plugins/remove-background';\nimport { underlaysPlugin } from '../plugins/underlays';\n\nimport {\n primary as qualifiersPrimary,\n text as qualifiersText,\n position as qualifiersPosition\n} from '../constants/qualifiers';\n\nconst cld = new Cloudinary({\n cloud: {\n cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME\n },\n});\n\nconst transformationPlugins = [\n // Background Removal must always come first\n removeBackgroundPlugin,\n\n croppingPlugin,\n overlaysPlugin,\n underlaysPlugin\n];\n\nexport function cloudinaryLoader(options, cldOptions) {\n const {\n src,\n width,\n format = 'auto',\n quality = 'auto',\n } = options;\n\n const cldImage = cld.image(src);\n\n transformationPlugins.forEach(plugin => {\n plugin({\n cldImage,\n options,\n cldOptions\n });\n });\n\n return cldImage.format(format).delivery(`q_${quality}`).toURL();\n}","import Image from 'next/image';\n\nimport { createPlaceholderUrl } from '../../lib/cloudinary';\nimport { cloudinaryLoader } from '../../loaders/cloudinary-loader';\n\nconst CldImage = ({ crop, gravity, overlays, removeBackground, underlays, ...props }) => {\n const cldOptions = {\n crop,\n gravity,\n overlays,\n removeBackground,\n underlays,\n };\n\n const imageProps = {};\n\n // If we see a placeholder option, configure a Cloudinary-based URL.\n // The resulting image will always be blurred per Next.js, so we're\n // limited on options for placeholders.\n // https://nextjs.org/docs/api-reference/next/image#blurdataurl\n\n if ( props.placeholder ) {\n imageProps.blurDataURL = createPlaceholderUrl({\n src: props.src,\n placeholder: props.placeholder\n });\n\n if ( props.placeholder !== 'blur' ) {\n props.placeholder = 'blur';\n }\n }\n\n return (\n <Image\n {...imageProps}\n {...props}\n loader={(options) => cloudinaryLoader({ ...props, options }, cldOptions)}\n />\n );\n}\n\nexport default CldImage;"],"names":["cld","Cloudinary","cloud","cloudName","process","env","NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME","url","analytics","createPlaceholderUrl","src","placeholder","cldImage","image","resize","delivery","format","effect","includes","color","split","splice","join","toURL","cropsGravityAuto","croppingPlugin","options","cldOptions","width","height","crop","gravity","transformationString","console","warn","primary","aspectRatio","qualifier","position","angle","x","y","text","location","textDecoration","fontFamily","fontSize","fontWeight","letterSpacing","overlaysPlugin","overlays","type","typeQualifier","forEach","publicId","effects","layerEffects","_excluded","hasPublicId","hasText","hasPosition","layerTransformation","replace","applied","Object","keys","key","qualifiersPrimary","push","textTransformations","qualifiersText","qualifiersPosition","length","addTransformation","removeBackgroundPlugin","removeBackground","underlaysPlugin","underlays","transformationPlugins","cloudinaryLoader","quality","plugin","CldImage","props","imageProps","blurDataURL","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,KAAG,GAAG,IAAIC,UAAJ,CAAe;AACzBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAEC,OAAO,CAACC,GAAR,CAAYC,iCAAAA;GAFA;AAIzBC,EAAAA,GAAG,EAAE;AACH;AACAC,IAAAA,SAAS,EAAE,KAAA;AAFR,GAAA;AAJoB,CAAf,CAAZ,CAAA;AAUA;AACA;AACA;;AAEO,SAASC,oBAAT,CAAoD,IAAA,EAAA;EAAA,IAApBC,GAAoB,QAApBA,GAAoB;MAAfC,WAAe,QAAfA,WAAe,CAAA;AACzD,EAAA,IAAMC,QAAQ,GAAGZ,KAAG,CAACa,KAAJ,CAAUH,GAAV,CACII,CAAAA,MADJ,CACW,eADX,CAAA,CAEIC,QAFJ,CAEa,KAFb,EAGIC,MAHJ,CAGW,MAHX,CAAjB,CAAA;;EAKA,IAAKL,WAAW,KAAK,WAArB,EAAmC;IACjCC,QAAQ,CAACK,MAAT,CAAgB,aAAhB,CAAA,CAAA;AACD,GAAA;;AAED,EAAA,IAAKN,WAAW,CAACO,QAAZ,CAAqB,QAArB,CAAL,EAAsC;AACpC,IAAA,IAAMC,KAAK,GAAGR,WAAW,CAACS,KAAZ,CAAkB,GAAlB,CAAuBC,CAAAA,MAAvB,CAA8B,CAA9B,C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