next-cloudinary 0.0.2 → 0.0.5

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.
@@ -39,29 +39,104 @@
39
39
  return target;
40
40
  }
41
41
 
42
+ function _readOnlyError(name) {
43
+ throw new TypeError("\"" + name + "\" is read-only");
44
+ }
45
+
46
+ var cld$1 = new urlGen.Cloudinary({
47
+ cloud: {
48
+ cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
49
+ },
50
+ url: {
51
+ // Used to avoid issues with SSR particularly for the blurred placeholder
52
+ analytics: false
53
+ }
54
+ });
55
+ /**
56
+ * createPlaceholderUrl
57
+ */
58
+
59
+ function createPlaceholderUrl(_ref) {
60
+ var src = _ref.src,
61
+ placeholder = _ref.placeholder;
62
+ var cldImage = cld$1.image(src).resize('c_limit,w_100').delivery('q_1').format('auto');
63
+
64
+ if (placeholder === 'grayscale') {
65
+ cldImage.effect('e_grayscale');
66
+ }
67
+
68
+ if (placeholder.includes('color:')) {
69
+ var color = placeholder.split(':').splice(1).join(':');
70
+ cldImage.effect('e_grayscale');
71
+ cldImage.effect("e_colorize:60,co_" + color);
72
+ }
73
+
74
+ return cldImage.toURL();
75
+ }
76
+
77
+ var cropsGravityAuto = ['crop', 'fill', 'lfill', 'fill_pad', 'thumb'];
78
+ function croppingPlugin(_temp) {
79
+ var _ref = _temp === void 0 ? {} : _temp,
80
+ cldImage = _ref.cldImage,
81
+ options = _ref.options,
82
+ cldOptions = _ref.cldOptions;
83
+
84
+ var width = options.width,
85
+ height = options.height;
86
+ var _cldOptions$crop = cldOptions.crop,
87
+ crop = _cldOptions$crop === void 0 ? 'limit' : _cldOptions$crop,
88
+ gravity = cldOptions.gravity;
89
+ var transformationString = "c_" + crop + ",w_" + width;
90
+
91
+ if (!gravity && cropsGravityAuto.includes(crop)) {
92
+ _readOnlyError("gravity");
93
+ }
94
+
95
+ if (!['limit'].includes(crop)) {
96
+ transformationString = transformationString + ",h_" + height;
97
+ }
98
+
99
+ if (gravity) {
100
+ if (gravity === 'auto' && !cropsGravityAuto.includes(crop)) {
101
+ console.warn('Auto gravity can only be used with crop, fill, lfill, fill_pad or thumb. Not applying gravity.');
102
+ } else {
103
+ transformationString = transformationString + ",g_" + gravity;
104
+ }
105
+ }
106
+
107
+ cldImage.resize(transformationString);
108
+ }
109
+
110
+ // aspectRatio
42
111
  var primary = {
43
- gravity: {
44
- qualifier: 'g'
112
+ aspectRatio: {
113
+ qualifier: 'ar'
45
114
  },
46
115
  crop: {
47
116
  qualifier: 'c'
48
117
  },
49
- width: {
50
- qualifier: 'w'
118
+ gravity: {
119
+ qualifier: 'g'
51
120
  },
52
121
  height: {
53
122
  qualifier: 'h'
123
+ },
124
+ width: {
125
+ qualifier: 'w'
54
126
  }
55
127
  };
56
128
  var position = {
129
+ angle: {
130
+ qualifier: 'a'
131
+ },
132
+ gravity: {
133
+ qualifier: 'g'
134
+ },
57
135
  x: {
58
136
  qualifier: 'x'
59
137
  },
60
138
  y: {
61
139
  qualifier: 'y'
62
- },
63
- gravity: {
64
- qualifier: 'g'
65
140
  }
66
141
  };
67
142
  var text = {
@@ -69,79 +144,48 @@
69
144
  qualifier: 'co',
70
145
  location: 'primary'
71
146
  },
72
- fontFamily: {},
73
- fontSize: {},
74
- fontWeight: {},
75
- textDecoration: {},
147
+ textDecoration: {
148
+ qualifier: false
149
+ },
150
+ fontFamily: {
151
+ qualifier: false
152
+ },
153
+ fontSize: {
154
+ qualifier: false
155
+ },
156
+ fontWeight: {
157
+ qualifier: false
158
+ },
76
159
  letterSpacing: {
77
160
  qualifier: 'letter_spacing'
78
161
  }
79
162
  };
80
163
 
81
- var _excluded$1 = ["publicId", "type", "position", "text", "effects"];
82
- var cld = new urlGen.Cloudinary({
83
- cloud: {
84
- cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
85
- }
86
- });
87
- function cloudinaryLoader(options, cldOptions) {
88
- var src = options.src,
89
- width = options.width,
90
- _options$format = options.format,
91
- format = _options$format === void 0 ? 'auto' : _options$format,
92
- _options$quality = options.quality,
93
- quality = _options$quality === void 0 ? 'auto' : _options$quality;
94
- var _cldOptions$overlays = cldOptions.overlays,
95
- overlays = _cldOptions$overlays === void 0 ? [] : _cldOptions$overlays,
96
- _cldOptions$removeBac = cldOptions.removeBackground,
97
- removeBackground = _cldOptions$removeBac === void 0 ? false : _cldOptions$removeBac,
98
- _cldOptions$underlays = cldOptions.underlays,
99
- underlays = _cldOptions$underlays === void 0 ? [] : _cldOptions$underlays;
100
- var cldImage = cld.image(src);
101
-
102
- if (removeBackground) {
103
- cldImage.effect('e_background_removal');
104
- } // Adding overlays and underlays allows you to compose your image
105
- // by using layering with overlays appearing on top of and udnerlays
106
- // appearing below your base image layer
107
- //
108
- // Learn more: https://cloudinary.com/documentation/layers
109
-
164
+ var _excluded$2 = ["publicId", "position", "text", "effects"];
165
+ function overlaysPlugin(_temp) {
166
+ var _ref = _temp === void 0 ? {} : _temp,
167
+ cldImage = _ref.cldImage,
168
+ cldOptions = _ref.cldOptions;
110
169
 
111
- var layers = [].concat(overlays.map(function (overlay) {
112
- return _extends({}, overlay, {
113
- type: 'overlay'
114
- });
115
- }), underlays.map(function (underlay) {
116
- return _extends({}, underlay, {
117
- type: 'underlay'
118
- });
119
- }));
120
- layers.forEach(function (_ref) {
121
- var publicId = _ref.publicId,
122
- type = _ref.type,
123
- position$1 = _ref.position,
124
- text$1 = _ref.text,
125
- _ref$effects = _ref.effects,
126
- layerEffects = _ref$effects === void 0 ? [] : _ref$effects,
127
- options = _objectWithoutPropertiesLoose(_ref, _excluded$1);
170
+ var _cldOptions$overlays = cldOptions.overlays,
171
+ overlays = _cldOptions$overlays === void 0 ? [] : _cldOptions$overlays;
172
+ var type = 'overlay';
173
+ var typeQualifier = 'l';
174
+ overlays.forEach(function (_ref2) {
175
+ var publicId = _ref2.publicId,
176
+ position$1 = _ref2.position,
177
+ text$1 = _ref2.text,
178
+ _ref2$effects = _ref2.effects,
179
+ layerEffects = _ref2$effects === void 0 ? [] : _ref2$effects,
180
+ options = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
128
181
 
129
182
  var hasPublicId = typeof publicId === 'string';
130
183
  var hasText = typeof text$1 === 'object';
131
184
  var hasPosition = typeof position$1 === 'object';
132
185
 
133
186
  if (!hasPublicId && !hasText) {
134
- console.warn(type + " is missing Public ID or Text");
187
+ console.warn("An " + type + " is missing Public ID or Text");
135
188
  return;
136
- } // Determine the qualifier for the type of layer
137
-
138
-
139
- var typeQualifier;
140
-
141
- if (type === 'overlay') {
142
- typeQualifier = 'l';
143
- } else if (type === 'underlay') {
144
- typeQualifier = 'u';
145
189
  } // Start to construct the transformation string using text or the public ID
146
190
  // if it's image-based
147
191
 
@@ -211,25 +255,166 @@
211
255
 
212
256
  cldImage.addTransformation(layerTransformation);
213
257
  });
214
- return cldImage.resize("c_limit,w_" + width).format(format).delivery("q_" + quality).toURL();
215
258
  }
216
259
 
217
- var _excluded = ["overlays", "removeBackground", "underlays"];
260
+ function removeBackgroundPlugin(_temp) {
261
+ var _ref = _temp === void 0 ? {} : _temp,
262
+ cldImage = _ref.cldImage,
263
+ cldOptions = _ref.cldOptions;
264
+
265
+ var _cldOptions$removeBac = cldOptions.removeBackground,
266
+ removeBackground = _cldOptions$removeBac === void 0 ? false : _cldOptions$removeBac;
267
+
268
+ if (removeBackground) {
269
+ cldImage.effect('e_background_removal');
270
+ }
271
+ }
272
+
273
+ function tintPlugin(_temp) {
274
+ var _ref = _temp === void 0 ? {} : _temp,
275
+ cldImage = _ref.cldImage,
276
+ cldOptions = _ref.cldOptions;
277
+
278
+ var tint = cldOptions.tint;
279
+
280
+ if (tint) {
281
+ cldImage.effect("e_tint:" + tint);
282
+ }
283
+ }
284
+
285
+ var _excluded$1 = ["publicId", "type", "position", "text", "effects"];
286
+ function underlaysPlugin(_temp) {
287
+ var _ref = _temp === void 0 ? {} : _temp,
288
+ cldImage = _ref.cldImage,
289
+ cldOptions = _ref.cldOptions;
290
+
291
+ var _cldOptions$underlays = cldOptions.underlays,
292
+ underlays = _cldOptions$underlays === void 0 ? [] : _cldOptions$underlays;
293
+ var typeQualifier = 'u';
294
+ underlays.forEach(function (_ref2) {
295
+ var publicId = _ref2.publicId,
296
+ type = _ref2.type,
297
+ position$1 = _ref2.position,
298
+ _ref2$effects = _ref2.effects,
299
+ layerEffects = _ref2$effects === void 0 ? [] : _ref2$effects,
300
+ options = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
301
+
302
+ var hasPublicId = typeof publicId === 'string';
303
+ var hasPosition = typeof position$1 === 'object';
304
+
305
+ if (!hasPublicId) {
306
+ console.warn("An " + type + " is missing a Public ID");
307
+ return;
308
+ } // Start to construct the transformation string using text or the public ID
309
+ // if it's image-based
310
+
311
+
312
+ var layerTransformation = typeQualifier + "_" + publicId.replace(/\//g, ':'); // Begin organizing transformations based on what it is and the location
313
+ // it needs to be placed in the URL
314
+
315
+ var primary$1 = [];
316
+ var applied = []; // Gemeral options
317
+
318
+ Object.keys(options).forEach(function (key) {
319
+ if (!primary[key]) return;
320
+ var qualifier = primary[key].qualifier;
321
+ primary$1.push(qualifier + "_" + options[key]);
322
+ }); // Layer effects
323
+
324
+ layerEffects.forEach(function (effect) {
325
+ Object.keys(effect).forEach(function (key) {
326
+ if (!primary[key]) return;
327
+ var qualifier = primary[key].qualifier;
328
+ primary$1.push(qualifier + "_" + effect[key]);
329
+ });
330
+ }); // Positioning
331
+
332
+ if (hasPosition) {
333
+ Object.keys(position$1).forEach(function (key) {
334
+ if (!position[key]) return;
335
+ var qualifier = position[key].qualifier;
336
+ applied.push(qualifier + "_" + position$1[key]);
337
+ });
338
+ } // Add all primary transformations
339
+
340
+
341
+ layerTransformation = layerTransformation + "," + primary$1.join(','); // Add all applied transformations
342
+
343
+ layerTransformation = layerTransformation + "/fl_layer_apply";
344
+
345
+ if (applied.length > 0) {
346
+ layerTransformation = layerTransformation + "," + applied.join(',');
347
+ } // Finally add it to the image
348
+
349
+
350
+ cldImage.addTransformation(layerTransformation);
351
+ });
352
+ }
353
+
354
+ var cld = new urlGen.Cloudinary({
355
+ cloud: {
356
+ cloudName: process.env.NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
357
+ }
358
+ });
359
+ var transformationPlugins = [// Background Removal must always come first
360
+ removeBackgroundPlugin, croppingPlugin, tintPlugin, overlaysPlugin, underlaysPlugin];
361
+ function cloudinaryLoader(options, cldOptions) {
362
+ var src = options.src,
363
+ _options$format = options.format,
364
+ format = _options$format === void 0 ? 'auto' : _options$format,
365
+ _options$quality = options.quality,
366
+ quality = _options$quality === void 0 ? 'auto' : _options$quality;
367
+ var cldImage = cld.image(src);
368
+ transformationPlugins.forEach(function (plugin) {
369
+ plugin({
370
+ cldImage: cldImage,
371
+ options: options,
372
+ cldOptions: cldOptions
373
+ });
374
+ });
375
+ return cldImage.format(format).delivery("q_" + quality).toURL();
376
+ }
377
+
378
+ var _excluded = ["crop", "gravity", "overlays", "removeBackground", "tint", "underlays"];
218
379
 
219
380
  var CldImage = function CldImage(_ref) {
220
- var overlays = _ref.overlays,
381
+ var crop = _ref.crop,
382
+ gravity = _ref.gravity,
383
+ overlays = _ref.overlays,
221
384
  removeBackground = _ref.removeBackground,
385
+ tint = _ref.tint,
222
386
  underlays = _ref.underlays,
223
387
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
224
388
 
225
389
  var cldOptions = {
390
+ crop: crop,
391
+ gravity: gravity,
226
392
  overlays: overlays,
227
393
  removeBackground: removeBackground,
394
+ tint: tint,
228
395
  underlays: underlays
229
396
  };
230
- return /*#__PURE__*/jsxRuntime.jsx(Image__default["default"], _extends({}, props, {
397
+ var imageProps = {}; // If we see a placeholder option, configure a Cloudinary-based URL.
398
+ // The resulting image will always be blurred per Next.js, so we're
399
+ // limited on options for placeholders.
400
+ // https://nextjs.org/docs/api-reference/next/image#blurdataurl
401
+
402
+ if (props.placeholder) {
403
+ imageProps.blurDataURL = createPlaceholderUrl({
404
+ src: props.src,
405
+ placeholder: props.placeholder
406
+ });
407
+
408
+ if (props.placeholder !== 'blur') {
409
+ props.placeholder = 'blur';
410
+ }
411
+ }
412
+
413
+ return /*#__PURE__*/jsxRuntime.jsx(Image__default["default"], _extends({}, imageProps, props, {
231
414
  loader: function loader(options) {
232
- return cloudinaryLoader(options, cldOptions);
415
+ return cloudinaryLoader(_extends({}, props, {
416
+ options: options
417
+ }), cldOptions);
233
418
  }
234
419
  }));
235
420
  };
@@ -1 +1 @@
1
- {"version":3,"file":"next-cloudinary.umd.js","sources":["../src/constants/qualifiers.js","../src/loaders/cloudinary-loader.js","../src/components/CldImage/CldImage.js"],"sourcesContent":["export const primary = {\n gravity: {\n qualifier: 'g'\n },\n crop: {\n qualifier: 'c'\n },\n width: {\n qualifier: 'w'\n },\n height: {\n qualifier: 'h'\n }\n};\n\nexport const position = {\n x: {\n qualifier: 'x'\n },\n y: {\n qualifier: 'y'\n },\n gravity: {\n qualifier: 'g'\n },\n}\n\nexport const text = {\n color: {\n qualifier: 'co',\n location: 'primary'\n },\n fontFamily: {\n },\n fontSize: {\n },\n fontWeight: {\n },\n textDecoration: {\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}","\nimport Image from 'next/image';\n\nimport { cloudinaryLoader } from '../../loaders/cloudinary-loader';\n\nconst CldImage = ({ overlays, removeBackground, underlays, ...props }) => {\n const cldOptions = {\n overlays,\n removeBackground,\n underlays,\n };\n return <Image {...props} loader={(options) => cloudinaryLoader(options, cldOptions)} />\n}\n\nexport default CldImage;"],"names":["primary","gravity","qualifier","crop","width","height","position","x","y","text","color","location","fontFamily","fontSize","fontWeight","textDecoration","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","CldImage","props","_jsx","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG;EACrBC,EAAAA,OAAO,EAAE;EACPC,IAAAA,SAAS,EAAE,GAAA;KAFQ;EAIrBC,EAAAA,IAAI,EAAE;EACJD,IAAAA,SAAS,EAAE,GAAA;KALQ;EAOrBE,EAAAA,KAAK,EAAE;EACLF,IAAAA,SAAS,EAAE,GAAA;KARQ;EAUrBG,EAAAA,MAAM,EAAE;EACNH,IAAAA,SAAS,EAAE,GAAA;EADL,GA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EAAhBA,gBAFiB;EAGjBC,IAAAA,SAAS,EAATA,SAAAA;KAHF,CAAA;IAKA,oBAAOuC,cAAA,CAACC,yBAAD,EAAA,QAAA,CAAA,EAAA,EAAWF,KAAX,EAAA;MAAkB,MAAM,EAAE,gBAAC7C,OAAD,EAAA;EAAA,MAAA,OAAaD,gBAAgB,CAACC,OAAD,EAAUC,UAAV,CAA7B,CAAA;EAAA,KAAA;KAAjC,CAAA,CAAA,CAAA;EACD;;;;;;;;;;;;"}
1
+ {"version":3,"file":"next-cloudinary.umd.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/tint.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}","export function tintPlugin({ cldImage, options, cldOptions } = {}) {\n const { tint } = cldOptions;\n\n if ( tint ) {\n cldImage.effect(`e_tint:${tint}`);\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 { tintPlugin } from '../plugins/tint';\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 tintPlugin,\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, tint, underlays, ...props }) => {\n const cldOptions = {\n crop,\n gravity,\n overlays,\n removeBackground,\n tint,\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","tintPlugin","tint","underlaysPlugin","underlays","transformationPlugins","cloudinaryLoader","quality","plugin","CldImage","props","imageProps","blurDataURL","_jsx","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEA,IAAMA,KAAG,GAAG,IAAIC,iBAAJ,CAAe;EACzBC,EAAAA,KAAK,EAAE;EACLC,IAAAA,SAAS,EAAEC,OAAO,CAACC,GAAR,CAAYC,iCAAAA;KAFA;EAIzBC,EAAAA,GAAG,EAAE;EACH;EACAC,IAAAA,SAAS,EAAE,KAAA;EAFR,GAAA;EAJoB,CAAf,CAAZ,CAAA;EAUA;EACA;EACA;;EAEO,SAASC,oBAAT,CAAoD,IAAA,EAAA;IAAA,IAApBC,GAAoB,QAApBA,GAAoB;QAAfC,WAAe,QAAfA,WAAe,CAAA;EACzD,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;;IAKA,IAAKL,WAAW,KAAK,WAArB,EAAmC;MACjCC,QAAQ,CAACK,MAAT,CAAgB,aAAhB,CAAA,CAAA;EACD,GAAA;;EAED,EAAA,IAAKN,WAAW,CAACO,QAAZ,CAAqB,QAArB,CAAL,EAAsC;EACpC,IAAA,IAAMC,KAAK,GAAGR,WAAW,CAACS,KAAZ,CAAkB,GAAlB,CAAuBC,CAAAA,MAAvB,CAA8B,CAA9B,CAAA,CAAiCC,IAAjC,CAAsC,GAAtC,CAAd,CAAA;MACAV,QAAQ,CAACK,MAAT,CAAgB,aAAhB,CAAA,CAAA;MACAL,QAAQ,CAACK,MAAT,CAAA,mBAAA,GAAoCE,KAApC,CAAA,CAAA;EACD,GAAA;;IAED,OAAOP,QAAQ,CAACW,KAAT,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AA,MAAZM,KAAY,GAAA,6BAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;;EAC7F,EAAA,IAAM1D,UAAU,GAAG;EACjBG,IAAAA,IAAI,EAAJA,IADiB;EAEjBC,IAAAA,OAAO,EAAPA,OAFiB;EAGjBmB,IAAAA,QAAQ,EAARA,QAHiB;EAIjByB,IAAAA,gBAAgB,EAAhBA,gBAJiB;EAKjBE,IAAAA,IAAI,EAAJA,IALiB;EAMjBE,IAAAA,SAAS,EAATA,SAAAA;KANF,CAAA;EASA,EAAA,IAAMO,UAAU,GAAG,EAAnB,CAV6F;EAa7F;EACA;EACA;;IAEA,IAAKD,KAAK,CAAC1E,WAAX,EAAyB;EACvB2E,IAAAA,UAAU,CAACC,WAAX,GAAyB9E,oBAAoB,CAAC;QAC5CC,GAAG,EAAE2E,KAAK,CAAC3E,GADiC;QAE5CC,WAAW,EAAE0E,KAAK,CAAC1E,WAAAA;EAFyB,KAAD,CAA7C,CAAA;;EAKA,IAAA,IAAK0E,KAAK,CAAC1E,WAAN,KAAsB,MAA3B,EAAoC;QAClC0E,KAAK,CAAC1E,WAAN,GAAoB,MAApB,CAAA;EACD,KAAA;EACF,GAAA;;EAED,EAAA,oBACE6E,cAAC,CAAAC,yBAAD,EACMH,QAAAA,CAAAA,EAAAA,EAAAA,UADN,EAEMD,KAFN,EAAA;MAGE,MAAM,EAAE,gBAAC3D,OAAD,EAAA;QAAA,OAAauD,gBAAgB,cAAMI,KAAN,EAAA;EAAa3D,QAAAA,OAAO,EAAPA,OAAAA;EAAb,OAAA,CAAA,EAAwBC,UAAxB,CAA7B,CAAA;EAAA,KAAA;KAJZ,CAAA,CAAA,CAAA;EAOD;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-cloudinary",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "main": "dist/next-cloudinary.umd.js",
5
5
  "module": "dist/next-cloudinary.module.js",
6
6
  "umd:main": "dist/next-cloudinary.umd.js",