vue-datocms 4.0.4 → 4.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.
- package/dist/index.cjs.js +78 -49
- package/dist/index.esm.mjs +78 -49
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -50,19 +50,19 @@ const useInView = ({ threshold, rootMargin }) => {
|
|
|
50
50
|
return { inView, elRef };
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
var __defProp$
|
|
54
|
-
var __getOwnPropSymbols$
|
|
55
|
-
var __hasOwnProp$
|
|
56
|
-
var __propIsEnum$
|
|
57
|
-
var __defNormalProp$
|
|
58
|
-
var __spreadValues$
|
|
53
|
+
var __defProp$5 = Object.defineProperty;
|
|
54
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
55
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
56
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
57
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
58
|
+
var __spreadValues$5 = (a, b) => {
|
|
59
59
|
for (var prop in b || (b = {}))
|
|
60
|
-
if (__hasOwnProp$
|
|
61
|
-
__defNormalProp$
|
|
62
|
-
if (__getOwnPropSymbols$
|
|
63
|
-
for (var prop of __getOwnPropSymbols$
|
|
64
|
-
if (__propIsEnum$
|
|
65
|
-
__defNormalProp$
|
|
60
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
61
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
62
|
+
if (__getOwnPropSymbols$5)
|
|
63
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
64
|
+
if (__propIsEnum$5.call(b, prop))
|
|
65
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
66
66
|
}
|
|
67
67
|
return a;
|
|
68
68
|
};
|
|
@@ -79,7 +79,7 @@ const Source = vueDemi.defineComponent({
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
setup({ srcset, sizes, type }) {
|
|
82
|
-
return () => vueDemi.h("source", __spreadValues$
|
|
82
|
+
return () => vueDemi.h("source", __spreadValues$5(__spreadValues$5({}, vueDemi.isVue2 && {
|
|
83
83
|
attrs: {
|
|
84
84
|
srcset,
|
|
85
85
|
sizes,
|
|
@@ -93,19 +93,19 @@ const Source = vueDemi.defineComponent({
|
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
|
|
96
|
-
var __defProp$
|
|
97
|
-
var __getOwnPropSymbols$
|
|
98
|
-
var __hasOwnProp$
|
|
99
|
-
var __propIsEnum$
|
|
100
|
-
var __defNormalProp$
|
|
101
|
-
var __spreadValues$
|
|
96
|
+
var __defProp$4 = Object.defineProperty;
|
|
97
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
98
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
99
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
100
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
101
|
+
var __spreadValues$4 = (a, b) => {
|
|
102
102
|
for (var prop in b || (b = {}))
|
|
103
|
-
if (__hasOwnProp$
|
|
104
|
-
__defNormalProp$
|
|
105
|
-
if (__getOwnPropSymbols$
|
|
106
|
-
for (var prop of __getOwnPropSymbols$
|
|
107
|
-
if (__propIsEnum$
|
|
108
|
-
__defNormalProp$
|
|
103
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
104
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
105
|
+
if (__getOwnPropSymbols$4)
|
|
106
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
107
|
+
if (__propIsEnum$4.call(b, prop))
|
|
108
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
109
109
|
}
|
|
110
110
|
return a;
|
|
111
111
|
};
|
|
@@ -131,9 +131,9 @@ const Sizer = vueDemi.defineComponent({
|
|
|
131
131
|
},
|
|
132
132
|
setup({ sizerClass, sizerStyle, width, height, explicitWidth }) {
|
|
133
133
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}"></svg>`;
|
|
134
|
-
return () => vueDemi.h("img", __spreadValues$
|
|
134
|
+
return () => vueDemi.h("img", __spreadValues$4(__spreadValues$4({
|
|
135
135
|
class: sizerClass,
|
|
136
|
-
style: __spreadValues$
|
|
136
|
+
style: __spreadValues$4({
|
|
137
137
|
display: "block",
|
|
138
138
|
width: explicitWidth ? `${width}px` : "100%"
|
|
139
139
|
}, sizerStyle)
|
|
@@ -149,21 +149,21 @@ const Sizer = vueDemi.defineComponent({
|
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
var __defProp$
|
|
152
|
+
var __defProp$3 = Object.defineProperty;
|
|
153
153
|
var __defProps$2 = Object.defineProperties;
|
|
154
154
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
155
|
-
var __getOwnPropSymbols$
|
|
156
|
-
var __hasOwnProp$
|
|
157
|
-
var __propIsEnum$
|
|
158
|
-
var __defNormalProp$
|
|
159
|
-
var __spreadValues$
|
|
155
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
156
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
157
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
158
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
159
|
+
var __spreadValues$3 = (a, b) => {
|
|
160
160
|
for (var prop in b || (b = {}))
|
|
161
|
-
if (__hasOwnProp$
|
|
162
|
-
__defNormalProp$
|
|
163
|
-
if (__getOwnPropSymbols$
|
|
164
|
-
for (var prop of __getOwnPropSymbols$
|
|
165
|
-
if (__propIsEnum$
|
|
166
|
-
__defNormalProp$
|
|
161
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
162
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
163
|
+
if (__getOwnPropSymbols$3)
|
|
164
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
165
|
+
if (__propIsEnum$3.call(b, prop))
|
|
166
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
167
167
|
}
|
|
168
168
|
return a;
|
|
169
169
|
};
|
|
@@ -374,7 +374,7 @@ const Image = vueDemi.defineComponent({
|
|
|
374
374
|
inView: this.inView,
|
|
375
375
|
loaded: this.loaded
|
|
376
376
|
});
|
|
377
|
-
const webpSource = this.data.webpSrcSet && vueDemi.h(Source, __spreadValues$
|
|
377
|
+
const webpSource = this.data.webpSrcSet && vueDemi.h(Source, __spreadValues$3(__spreadValues$3({}, vueDemi.isVue2 && {
|
|
378
378
|
props: {
|
|
379
379
|
srcset: this.data.webpSrcSet,
|
|
380
380
|
sizes: (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : void 0,
|
|
@@ -385,7 +385,7 @@ const Image = vueDemi.defineComponent({
|
|
|
385
385
|
sizes: (_d = (_c = this.sizes) != null ? _c : this.data.sizes) != null ? _d : void 0,
|
|
386
386
|
type: "image/webp"
|
|
387
387
|
}));
|
|
388
|
-
const regularSource = this.data.srcSet && vueDemi.h(Source, __spreadValues$
|
|
388
|
+
const regularSource = this.data.srcSet && vueDemi.h(Source, __spreadValues$3(__spreadValues$3({}, vueDemi.isVue2 && {
|
|
389
389
|
props: {
|
|
390
390
|
srcset: (_e = this.data.srcSet) != null ? _e : buildSrcSet(this.data.src, this.data.width, this.srcSetCandidates),
|
|
391
391
|
sizes: (_g = (_f = this.sizes) != null ? _f : this.data.sizes) != null ? _g : void 0
|
|
@@ -414,7 +414,7 @@ const Image = vueDemi.defineComponent({
|
|
|
414
414
|
}) : null;
|
|
415
415
|
const { width, aspectRatio } = this.data;
|
|
416
416
|
const height = (_k = this.data.height) != null ? _k : aspectRatio ? width / aspectRatio : 0;
|
|
417
|
-
const sizer = this.layout !== "fill" ? vueDemi.h(Sizer, __spreadValues$
|
|
417
|
+
const sizer = this.layout !== "fill" ? vueDemi.h(Sizer, __spreadValues$3(__spreadValues$3({}, vueDemi.isVue2 && {
|
|
418
418
|
props: {
|
|
419
419
|
sizerClass: this.pictureClass,
|
|
420
420
|
sizerStyle: this.pictureStyle,
|
|
@@ -432,7 +432,7 @@ const Image = vueDemi.defineComponent({
|
|
|
432
432
|
return vueDemi.h(
|
|
433
433
|
"div",
|
|
434
434
|
{
|
|
435
|
-
style: __spreadValues$
|
|
435
|
+
style: __spreadValues$3(__spreadValues$3({
|
|
436
436
|
display: this.explicitWidth ? "inline-block" : "block",
|
|
437
437
|
overflow: "hidden"
|
|
438
438
|
}, this.layout === "fill" ? absolutePositioning : this.layout === "intrinsic" ? { position: "relative", width: "100%", maxWidth: `${width}px` } : this.layout === "fixed" ? { position: "relative", width: `${width}px` } : { position: "relative" }), this.rootStyle),
|
|
@@ -444,7 +444,7 @@ const Image = vueDemi.defineComponent({
|
|
|
444
444
|
addImage && vueDemi.h("picture", null, [
|
|
445
445
|
webpSource,
|
|
446
446
|
regularSource,
|
|
447
|
-
this.data.src && vueDemi.h("img", __spreadProps$2(__spreadValues$
|
|
447
|
+
this.data.src && vueDemi.h("img", __spreadProps$2(__spreadValues$3(__spreadValues$3({}, vueDemi.isVue2 && {
|
|
448
448
|
attrs: {
|
|
449
449
|
src: this.data.src,
|
|
450
450
|
alt: this.data.alt,
|
|
@@ -463,7 +463,7 @@ const Image = vueDemi.defineComponent({
|
|
|
463
463
|
}), {
|
|
464
464
|
ref: "imageRef",
|
|
465
465
|
class: this.pictureClass,
|
|
466
|
-
style: __spreadValues$
|
|
466
|
+
style: __spreadValues$3(__spreadProps$2(__spreadValues$3({
|
|
467
467
|
opacity: showImage ? 1 : 0,
|
|
468
468
|
transition
|
|
469
469
|
}, absolutePositioning), {
|
|
@@ -472,7 +472,7 @@ const Image = vueDemi.defineComponent({
|
|
|
472
472
|
}), this.pictureStyle)
|
|
473
473
|
}))
|
|
474
474
|
]),
|
|
475
|
-
vueDemi.h("noscript", __spreadValues$
|
|
475
|
+
vueDemi.h("noscript", __spreadValues$3(__spreadValues$3({}, vueDemi.isVue2 && {
|
|
476
476
|
domProps: {
|
|
477
477
|
innerHTML: tag("picture", {}, [
|
|
478
478
|
this.data.webpSrcSet && tag("source", {
|
|
@@ -489,7 +489,7 @@ const Image = vueDemi.defineComponent({
|
|
|
489
489
|
alt: this.data.alt,
|
|
490
490
|
title: this.data.title,
|
|
491
491
|
class: this.pictureClass,
|
|
492
|
-
style: toCss(__spreadValues$
|
|
492
|
+
style: toCss(__spreadValues$3(__spreadProps$2(__spreadValues$3({}, absolutePositioning), {
|
|
493
493
|
objectFit: this.objectFit,
|
|
494
494
|
objectPosition: this.objectPosition
|
|
495
495
|
}), this.pictureStyle)),
|
|
@@ -514,7 +514,7 @@ const Image = vueDemi.defineComponent({
|
|
|
514
514
|
alt: this.data.alt,
|
|
515
515
|
title: this.data.title,
|
|
516
516
|
class: this.pictureClass,
|
|
517
|
-
style: toCss(__spreadValues$
|
|
517
|
+
style: toCss(__spreadValues$3(__spreadValues$3({}, this.pictureStyle), absolutePositioning)),
|
|
518
518
|
loading: this.computedLazyLoad ? "lazy" : void 0,
|
|
519
519
|
fetchpriority: this.priority ? "high" : void 0
|
|
520
520
|
})
|
|
@@ -530,10 +530,39 @@ const DatocmsImagePlugin = {
|
|
|
530
530
|
}
|
|
531
531
|
};
|
|
532
532
|
|
|
533
|
+
var __defProp$2 = Object.defineProperty;
|
|
534
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
535
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
536
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
537
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
538
|
+
var __spreadValues$2 = (a, b) => {
|
|
539
|
+
for (var prop in b || (b = {}))
|
|
540
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
541
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
542
|
+
if (__getOwnPropSymbols$2)
|
|
543
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
544
|
+
if (__propIsEnum$2.call(b, prop))
|
|
545
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
546
|
+
}
|
|
547
|
+
return a;
|
|
548
|
+
};
|
|
549
|
+
var __objRest$1 = (source, exclude) => {
|
|
550
|
+
var target = {};
|
|
551
|
+
for (var prop in source)
|
|
552
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
553
|
+
target[prop] = source[prop];
|
|
554
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
555
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
556
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
557
|
+
target[prop] = source[prop];
|
|
558
|
+
}
|
|
559
|
+
return target;
|
|
560
|
+
};
|
|
533
561
|
const hAdapter = (tagName, props, childOrChildren) => {
|
|
562
|
+
const _a = props || {}, { href } = _a, rest = __objRest$1(_a, ["href"]);
|
|
534
563
|
return vueDemi.h(
|
|
535
564
|
tagName,
|
|
536
|
-
props,
|
|
565
|
+
__spreadValues$2(__spreadValues$2({}, vueDemi.isVue2 && __spreadValues$2({ attrs: { href } }, rest)), vueDemi.isVue3 && props),
|
|
537
566
|
typeof childOrChildren === "undefined" || Array.isArray(childOrChildren) ? childOrChildren : [childOrChildren]
|
|
538
567
|
);
|
|
539
568
|
};
|
package/dist/index.esm.mjs
CHANGED
|
@@ -44,19 +44,19 @@ const useInView = ({ threshold, rootMargin }) => {
|
|
|
44
44
|
return { inView, elRef };
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
var __defProp$
|
|
48
|
-
var __getOwnPropSymbols$
|
|
49
|
-
var __hasOwnProp$
|
|
50
|
-
var __propIsEnum$
|
|
51
|
-
var __defNormalProp$
|
|
52
|
-
var __spreadValues$
|
|
47
|
+
var __defProp$5 = Object.defineProperty;
|
|
48
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
49
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
50
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
51
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
52
|
+
var __spreadValues$5 = (a, b) => {
|
|
53
53
|
for (var prop in b || (b = {}))
|
|
54
|
-
if (__hasOwnProp$
|
|
55
|
-
__defNormalProp$
|
|
56
|
-
if (__getOwnPropSymbols$
|
|
57
|
-
for (var prop of __getOwnPropSymbols$
|
|
58
|
-
if (__propIsEnum$
|
|
59
|
-
__defNormalProp$
|
|
54
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
55
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
56
|
+
if (__getOwnPropSymbols$5)
|
|
57
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
58
|
+
if (__propIsEnum$5.call(b, prop))
|
|
59
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
60
60
|
}
|
|
61
61
|
return a;
|
|
62
62
|
};
|
|
@@ -73,7 +73,7 @@ const Source = defineComponent({
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
setup({ srcset, sizes, type }) {
|
|
76
|
-
return () => h("source", __spreadValues$
|
|
76
|
+
return () => h("source", __spreadValues$5(__spreadValues$5({}, isVue2 && {
|
|
77
77
|
attrs: {
|
|
78
78
|
srcset,
|
|
79
79
|
sizes,
|
|
@@ -87,19 +87,19 @@ const Source = defineComponent({
|
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
var __defProp$
|
|
91
|
-
var __getOwnPropSymbols$
|
|
92
|
-
var __hasOwnProp$
|
|
93
|
-
var __propIsEnum$
|
|
94
|
-
var __defNormalProp$
|
|
95
|
-
var __spreadValues$
|
|
90
|
+
var __defProp$4 = Object.defineProperty;
|
|
91
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
92
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
93
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
94
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
95
|
+
var __spreadValues$4 = (a, b) => {
|
|
96
96
|
for (var prop in b || (b = {}))
|
|
97
|
-
if (__hasOwnProp$
|
|
98
|
-
__defNormalProp$
|
|
99
|
-
if (__getOwnPropSymbols$
|
|
100
|
-
for (var prop of __getOwnPropSymbols$
|
|
101
|
-
if (__propIsEnum$
|
|
102
|
-
__defNormalProp$
|
|
97
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
98
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
99
|
+
if (__getOwnPropSymbols$4)
|
|
100
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
101
|
+
if (__propIsEnum$4.call(b, prop))
|
|
102
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
103
103
|
}
|
|
104
104
|
return a;
|
|
105
105
|
};
|
|
@@ -125,9 +125,9 @@ const Sizer = defineComponent({
|
|
|
125
125
|
},
|
|
126
126
|
setup({ sizerClass, sizerStyle, width, height, explicitWidth }) {
|
|
127
127
|
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}"></svg>`;
|
|
128
|
-
return () => h("img", __spreadValues$
|
|
128
|
+
return () => h("img", __spreadValues$4(__spreadValues$4({
|
|
129
129
|
class: sizerClass,
|
|
130
|
-
style: __spreadValues$
|
|
130
|
+
style: __spreadValues$4({
|
|
131
131
|
display: "block",
|
|
132
132
|
width: explicitWidth ? `${width}px` : "100%"
|
|
133
133
|
}, sizerStyle)
|
|
@@ -143,21 +143,21 @@ const Sizer = defineComponent({
|
|
|
143
143
|
}
|
|
144
144
|
});
|
|
145
145
|
|
|
146
|
-
var __defProp$
|
|
146
|
+
var __defProp$3 = Object.defineProperty;
|
|
147
147
|
var __defProps$2 = Object.defineProperties;
|
|
148
148
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
149
|
-
var __getOwnPropSymbols$
|
|
150
|
-
var __hasOwnProp$
|
|
151
|
-
var __propIsEnum$
|
|
152
|
-
var __defNormalProp$
|
|
153
|
-
var __spreadValues$
|
|
149
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
150
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
151
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
152
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
153
|
+
var __spreadValues$3 = (a, b) => {
|
|
154
154
|
for (var prop in b || (b = {}))
|
|
155
|
-
if (__hasOwnProp$
|
|
156
|
-
__defNormalProp$
|
|
157
|
-
if (__getOwnPropSymbols$
|
|
158
|
-
for (var prop of __getOwnPropSymbols$
|
|
159
|
-
if (__propIsEnum$
|
|
160
|
-
__defNormalProp$
|
|
155
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
156
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
157
|
+
if (__getOwnPropSymbols$3)
|
|
158
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
159
|
+
if (__propIsEnum$3.call(b, prop))
|
|
160
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
161
161
|
}
|
|
162
162
|
return a;
|
|
163
163
|
};
|
|
@@ -368,7 +368,7 @@ const Image = defineComponent({
|
|
|
368
368
|
inView: this.inView,
|
|
369
369
|
loaded: this.loaded
|
|
370
370
|
});
|
|
371
|
-
const webpSource = this.data.webpSrcSet && h(Source, __spreadValues$
|
|
371
|
+
const webpSource = this.data.webpSrcSet && h(Source, __spreadValues$3(__spreadValues$3({}, isVue2 && {
|
|
372
372
|
props: {
|
|
373
373
|
srcset: this.data.webpSrcSet,
|
|
374
374
|
sizes: (_b = (_a = this.sizes) != null ? _a : this.data.sizes) != null ? _b : void 0,
|
|
@@ -379,7 +379,7 @@ const Image = defineComponent({
|
|
|
379
379
|
sizes: (_d = (_c = this.sizes) != null ? _c : this.data.sizes) != null ? _d : void 0,
|
|
380
380
|
type: "image/webp"
|
|
381
381
|
}));
|
|
382
|
-
const regularSource = this.data.srcSet && h(Source, __spreadValues$
|
|
382
|
+
const regularSource = this.data.srcSet && h(Source, __spreadValues$3(__spreadValues$3({}, isVue2 && {
|
|
383
383
|
props: {
|
|
384
384
|
srcset: (_e = this.data.srcSet) != null ? _e : buildSrcSet(this.data.src, this.data.width, this.srcSetCandidates),
|
|
385
385
|
sizes: (_g = (_f = this.sizes) != null ? _f : this.data.sizes) != null ? _g : void 0
|
|
@@ -408,7 +408,7 @@ const Image = defineComponent({
|
|
|
408
408
|
}) : null;
|
|
409
409
|
const { width, aspectRatio } = this.data;
|
|
410
410
|
const height = (_k = this.data.height) != null ? _k : aspectRatio ? width / aspectRatio : 0;
|
|
411
|
-
const sizer = this.layout !== "fill" ? h(Sizer, __spreadValues$
|
|
411
|
+
const sizer = this.layout !== "fill" ? h(Sizer, __spreadValues$3(__spreadValues$3({}, isVue2 && {
|
|
412
412
|
props: {
|
|
413
413
|
sizerClass: this.pictureClass,
|
|
414
414
|
sizerStyle: this.pictureStyle,
|
|
@@ -426,7 +426,7 @@ const Image = defineComponent({
|
|
|
426
426
|
return h(
|
|
427
427
|
"div",
|
|
428
428
|
{
|
|
429
|
-
style: __spreadValues$
|
|
429
|
+
style: __spreadValues$3(__spreadValues$3({
|
|
430
430
|
display: this.explicitWidth ? "inline-block" : "block",
|
|
431
431
|
overflow: "hidden"
|
|
432
432
|
}, this.layout === "fill" ? absolutePositioning : this.layout === "intrinsic" ? { position: "relative", width: "100%", maxWidth: `${width}px` } : this.layout === "fixed" ? { position: "relative", width: `${width}px` } : { position: "relative" }), this.rootStyle),
|
|
@@ -438,7 +438,7 @@ const Image = defineComponent({
|
|
|
438
438
|
addImage && h("picture", null, [
|
|
439
439
|
webpSource,
|
|
440
440
|
regularSource,
|
|
441
|
-
this.data.src && h("img", __spreadProps$2(__spreadValues$
|
|
441
|
+
this.data.src && h("img", __spreadProps$2(__spreadValues$3(__spreadValues$3({}, isVue2 && {
|
|
442
442
|
attrs: {
|
|
443
443
|
src: this.data.src,
|
|
444
444
|
alt: this.data.alt,
|
|
@@ -457,7 +457,7 @@ const Image = defineComponent({
|
|
|
457
457
|
}), {
|
|
458
458
|
ref: "imageRef",
|
|
459
459
|
class: this.pictureClass,
|
|
460
|
-
style: __spreadValues$
|
|
460
|
+
style: __spreadValues$3(__spreadProps$2(__spreadValues$3({
|
|
461
461
|
opacity: showImage ? 1 : 0,
|
|
462
462
|
transition
|
|
463
463
|
}, absolutePositioning), {
|
|
@@ -466,7 +466,7 @@ const Image = defineComponent({
|
|
|
466
466
|
}), this.pictureStyle)
|
|
467
467
|
}))
|
|
468
468
|
]),
|
|
469
|
-
h("noscript", __spreadValues$
|
|
469
|
+
h("noscript", __spreadValues$3(__spreadValues$3({}, isVue2 && {
|
|
470
470
|
domProps: {
|
|
471
471
|
innerHTML: tag("picture", {}, [
|
|
472
472
|
this.data.webpSrcSet && tag("source", {
|
|
@@ -483,7 +483,7 @@ const Image = defineComponent({
|
|
|
483
483
|
alt: this.data.alt,
|
|
484
484
|
title: this.data.title,
|
|
485
485
|
class: this.pictureClass,
|
|
486
|
-
style: toCss(__spreadValues$
|
|
486
|
+
style: toCss(__spreadValues$3(__spreadProps$2(__spreadValues$3({}, absolutePositioning), {
|
|
487
487
|
objectFit: this.objectFit,
|
|
488
488
|
objectPosition: this.objectPosition
|
|
489
489
|
}), this.pictureStyle)),
|
|
@@ -508,7 +508,7 @@ const Image = defineComponent({
|
|
|
508
508
|
alt: this.data.alt,
|
|
509
509
|
title: this.data.title,
|
|
510
510
|
class: this.pictureClass,
|
|
511
|
-
style: toCss(__spreadValues$
|
|
511
|
+
style: toCss(__spreadValues$3(__spreadValues$3({}, this.pictureStyle), absolutePositioning)),
|
|
512
512
|
loading: this.computedLazyLoad ? "lazy" : void 0,
|
|
513
513
|
fetchpriority: this.priority ? "high" : void 0
|
|
514
514
|
})
|
|
@@ -524,10 +524,39 @@ const DatocmsImagePlugin = {
|
|
|
524
524
|
}
|
|
525
525
|
};
|
|
526
526
|
|
|
527
|
+
var __defProp$2 = Object.defineProperty;
|
|
528
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
529
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
530
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
531
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
532
|
+
var __spreadValues$2 = (a, b) => {
|
|
533
|
+
for (var prop in b || (b = {}))
|
|
534
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
535
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
536
|
+
if (__getOwnPropSymbols$2)
|
|
537
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
538
|
+
if (__propIsEnum$2.call(b, prop))
|
|
539
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
540
|
+
}
|
|
541
|
+
return a;
|
|
542
|
+
};
|
|
543
|
+
var __objRest$1 = (source, exclude) => {
|
|
544
|
+
var target = {};
|
|
545
|
+
for (var prop in source)
|
|
546
|
+
if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
547
|
+
target[prop] = source[prop];
|
|
548
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
549
|
+
for (var prop of __getOwnPropSymbols$2(source)) {
|
|
550
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))
|
|
551
|
+
target[prop] = source[prop];
|
|
552
|
+
}
|
|
553
|
+
return target;
|
|
554
|
+
};
|
|
527
555
|
const hAdapter = (tagName, props, childOrChildren) => {
|
|
556
|
+
const _a = props || {}, { href } = _a, rest = __objRest$1(_a, ["href"]);
|
|
528
557
|
return h(
|
|
529
558
|
tagName,
|
|
530
|
-
props,
|
|
559
|
+
__spreadValues$2(__spreadValues$2({}, isVue2 && __spreadValues$2({ attrs: { href } }, rest)), isVue3 && props),
|
|
531
560
|
typeof childOrChildren === "undefined" || Array.isArray(childOrChildren) ? childOrChildren : [childOrChildren]
|
|
532
561
|
);
|
|
533
562
|
};
|