vue-datocms 8.1.0 → 8.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +14 -3
- package/dist/index.d.ts +42 -0
- package/dist/index.esm.mjs +14 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -346,6 +346,10 @@ const Image$1 = vue.defineComponent({
|
|
|
346
346
|
return typeof value === "number";
|
|
347
347
|
}),
|
|
348
348
|
default: () => [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4]
|
|
349
|
+
},
|
|
350
|
+
referrerPolicy: {
|
|
351
|
+
type: String,
|
|
352
|
+
default: "no-referrer-when-downgrade"
|
|
349
353
|
}
|
|
350
354
|
},
|
|
351
355
|
setup(props, { emit, expose }) {
|
|
@@ -460,7 +464,8 @@ const Image$1 = vue.defineComponent({
|
|
|
460
464
|
}, absolutePositioning), {
|
|
461
465
|
objectFit: this.objectFit,
|
|
462
466
|
objectPosition: this.objectPosition
|
|
463
|
-
}), this.imgStyle)
|
|
467
|
+
}), this.imgStyle),
|
|
468
|
+
referrerpolicy: this.referrerPolicy
|
|
464
469
|
})
|
|
465
470
|
]),
|
|
466
471
|
vue.h("noscript", {
|
|
@@ -491,7 +496,8 @@ const Image$1 = vue.defineComponent({
|
|
|
491
496
|
objectPosition: this.objectPosition
|
|
492
497
|
}), this.imgStyle)),
|
|
493
498
|
loading: this.priority ? void 0 : "lazy",
|
|
494
|
-
fetchpriority: this.priority ? "high" : void 0
|
|
499
|
+
fetchpriority: this.priority ? "high" : void 0,
|
|
500
|
+
referrerpolicy: this.referrerPolicy
|
|
495
501
|
})
|
|
496
502
|
]
|
|
497
503
|
)
|
|
@@ -561,6 +567,10 @@ const NakedImage = vue.defineComponent({
|
|
|
561
567
|
imgStyle: {
|
|
562
568
|
type: Object,
|
|
563
569
|
default: () => ({})
|
|
570
|
+
},
|
|
571
|
+
referrerPolicy: {
|
|
572
|
+
type: String,
|
|
573
|
+
default: "no-referrer-when-downgrade"
|
|
564
574
|
}
|
|
565
575
|
},
|
|
566
576
|
setup(_props, { emit, expose }) {
|
|
@@ -631,7 +641,8 @@ const NakedImage = vue.defineComponent({
|
|
|
631
641
|
fetchpriority: this.priority ? "high" : void 0,
|
|
632
642
|
loading: this.priority ? void 0 : "lazy",
|
|
633
643
|
style: __spreadValues$4(__spreadValues$4(__spreadValues$4({}, placeholderStyle), sizingStyle), this.imgStyle || {}),
|
|
634
|
-
class: this.imgClass
|
|
644
|
+
class: this.imgClass,
|
|
645
|
+
referrerpolicy: this.referrerPolicy
|
|
635
646
|
})
|
|
636
647
|
]
|
|
637
648
|
);
|
package/dist/index.d.ts
CHANGED
|
@@ -142,6 +142,16 @@ declare const Image: vue.DefineComponent<{
|
|
|
142
142
|
validator: (values: any[]) => values is number[];
|
|
143
143
|
default: () => number[];
|
|
144
144
|
};
|
|
145
|
+
/**
|
|
146
|
+
* Defines which referrer is sent when fetching the image
|
|
147
|
+
* Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy
|
|
148
|
+
*
|
|
149
|
+
* Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages
|
|
150
|
+
**/
|
|
151
|
+
referrerPolicy: {
|
|
152
|
+
type: StringConstructor;
|
|
153
|
+
default: string;
|
|
154
|
+
};
|
|
145
155
|
}, {
|
|
146
156
|
inView: vue.Ref<boolean>;
|
|
147
157
|
rootRef: vue.Ref<HTMLElement | null>;
|
|
@@ -256,6 +266,16 @@ declare const Image: vue.DefineComponent<{
|
|
|
256
266
|
validator: (values: any[]) => values is number[];
|
|
257
267
|
default: () => number[];
|
|
258
268
|
};
|
|
269
|
+
/**
|
|
270
|
+
* Defines which referrer is sent when fetching the image
|
|
271
|
+
* Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy
|
|
272
|
+
*
|
|
273
|
+
* Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages
|
|
274
|
+
**/
|
|
275
|
+
referrerPolicy: {
|
|
276
|
+
type: StringConstructor;
|
|
277
|
+
default: string;
|
|
278
|
+
};
|
|
259
279
|
}>> & {
|
|
260
280
|
onLoad?: ((...args: any[]) => any) | undefined;
|
|
261
281
|
}, {
|
|
@@ -268,6 +288,7 @@ declare const Image: vue.DefineComponent<{
|
|
|
268
288
|
layout: string;
|
|
269
289
|
usePlaceholder: boolean;
|
|
270
290
|
srcSetCandidates: unknown[];
|
|
291
|
+
referrerPolicy: string;
|
|
271
292
|
}, {}>;
|
|
272
293
|
declare const DatocmsImagePlugin: {
|
|
273
294
|
install: (Vue: any) => void;
|
|
@@ -331,6 +352,16 @@ declare const NakedImage: vue.DefineComponent<{
|
|
|
331
352
|
type: ObjectConstructor;
|
|
332
353
|
default: () => {};
|
|
333
354
|
};
|
|
355
|
+
/**
|
|
356
|
+
* Defines which referrer is sent when fetching the image
|
|
357
|
+
* Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy
|
|
358
|
+
*
|
|
359
|
+
* Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages
|
|
360
|
+
**/
|
|
361
|
+
referrerPolicy: {
|
|
362
|
+
type: StringConstructor;
|
|
363
|
+
default: string;
|
|
364
|
+
};
|
|
334
365
|
}, {
|
|
335
366
|
loaded: vue.Ref<boolean>;
|
|
336
367
|
handleLoad: () => void;
|
|
@@ -393,12 +424,23 @@ declare const NakedImage: vue.DefineComponent<{
|
|
|
393
424
|
type: ObjectConstructor;
|
|
394
425
|
default: () => {};
|
|
395
426
|
};
|
|
427
|
+
/**
|
|
428
|
+
* Defines which referrer is sent when fetching the image
|
|
429
|
+
* Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy
|
|
430
|
+
*
|
|
431
|
+
* Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages
|
|
432
|
+
**/
|
|
433
|
+
referrerPolicy: {
|
|
434
|
+
type: StringConstructor;
|
|
435
|
+
default: string;
|
|
436
|
+
};
|
|
396
437
|
}>>, {
|
|
397
438
|
priority: boolean;
|
|
398
439
|
pictureStyle: Record<string, any>;
|
|
399
440
|
imgStyle: Record<string, any>;
|
|
400
441
|
usePlaceholder: boolean;
|
|
401
442
|
srcSetCandidates: unknown[];
|
|
443
|
+
referrerPolicy: string;
|
|
402
444
|
}, {}>;
|
|
403
445
|
declare const DatocmsNakedImagePlugin: {
|
|
404
446
|
install: (Vue: any) => void;
|
package/dist/index.esm.mjs
CHANGED
|
@@ -322,6 +322,10 @@ const Image$1 = defineComponent({
|
|
|
322
322
|
return typeof value === "number";
|
|
323
323
|
}),
|
|
324
324
|
default: () => [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4]
|
|
325
|
+
},
|
|
326
|
+
referrerPolicy: {
|
|
327
|
+
type: String,
|
|
328
|
+
default: "no-referrer-when-downgrade"
|
|
325
329
|
}
|
|
326
330
|
},
|
|
327
331
|
setup(props, { emit, expose }) {
|
|
@@ -436,7 +440,8 @@ const Image$1 = defineComponent({
|
|
|
436
440
|
}, absolutePositioning), {
|
|
437
441
|
objectFit: this.objectFit,
|
|
438
442
|
objectPosition: this.objectPosition
|
|
439
|
-
}), this.imgStyle)
|
|
443
|
+
}), this.imgStyle),
|
|
444
|
+
referrerpolicy: this.referrerPolicy
|
|
440
445
|
})
|
|
441
446
|
]),
|
|
442
447
|
h("noscript", {
|
|
@@ -467,7 +472,8 @@ const Image$1 = defineComponent({
|
|
|
467
472
|
objectPosition: this.objectPosition
|
|
468
473
|
}), this.imgStyle)),
|
|
469
474
|
loading: this.priority ? void 0 : "lazy",
|
|
470
|
-
fetchpriority: this.priority ? "high" : void 0
|
|
475
|
+
fetchpriority: this.priority ? "high" : void 0,
|
|
476
|
+
referrerpolicy: this.referrerPolicy
|
|
471
477
|
})
|
|
472
478
|
]
|
|
473
479
|
)
|
|
@@ -537,6 +543,10 @@ const NakedImage = defineComponent({
|
|
|
537
543
|
imgStyle: {
|
|
538
544
|
type: Object,
|
|
539
545
|
default: () => ({})
|
|
546
|
+
},
|
|
547
|
+
referrerPolicy: {
|
|
548
|
+
type: String,
|
|
549
|
+
default: "no-referrer-when-downgrade"
|
|
540
550
|
}
|
|
541
551
|
},
|
|
542
552
|
setup(_props, { emit, expose }) {
|
|
@@ -607,7 +617,8 @@ const NakedImage = defineComponent({
|
|
|
607
617
|
fetchpriority: this.priority ? "high" : void 0,
|
|
608
618
|
loading: this.priority ? void 0 : "lazy",
|
|
609
619
|
style: __spreadValues$4(__spreadValues$4(__spreadValues$4({}, placeholderStyle), sizingStyle), this.imgStyle || {}),
|
|
610
|
-
class: this.imgClass
|
|
620
|
+
class: this.imgClass,
|
|
621
|
+
referrerpolicy: this.referrerPolicy
|
|
611
622
|
})
|
|
612
623
|
]
|
|
613
624
|
);
|