@empathyco/x-components 10.4.0 → 10.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/docs/API-reference/api/x-components.baseresultimage.md +39 -5
- package/docs/API-reference/api/x-components.md +2 -0
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +161 -6
- package/js/components/base-teleport.vue.js.map +1 -1
- package/js/components/base-teleport.vue2.js +4 -2
- package/js/components/base-teleport.vue2.js.map +1 -1
- package/js/components/result/base-result-image.vue.js +18 -15
- package/js/components/result/base-result-image.vue.js.map +1 -1
- package/js/components/result/base-result-image.vue2.js +125 -9
- package/js/components/result/base-result-image.vue2.js.map +1 -1
- package/package.json +7 -7
- package/report/x-components.api.json +155 -11
- package/report/x-components.api.md +39 -5
- package/types/src/components/base-teleport.vue.d.ts.map +1 -1
- package/types/src/components/result/base-result-image.vue.d.ts +105 -6
- package/types/src/components/result/base-result-image.vue.d.ts.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, watch
|
|
1
|
+
import { defineComponent, useAttrs, computed, ref, watch } from 'vue';
|
|
2
2
|
import { AnimationProp } from '../../types/animation-prop.js';
|
|
3
3
|
import '../animations/animate-clip-path.vue2.js';
|
|
4
4
|
import '../animations/animate-scale.vue2.js';
|
|
@@ -24,10 +24,17 @@ import '../animations/staggered-fade-and-slide.vue3.js';
|
|
|
24
24
|
/**
|
|
25
25
|
* Component to be reused that renders an `<img>`.
|
|
26
26
|
*
|
|
27
|
+
* Additional `<img>` attributes passed to the component (e.g. `decoding`, `crossorigin`,
|
|
28
|
+
* `referrerpolicy`, `fetchpriority`, `width` and `height`) are forwarded to the rendered
|
|
29
|
+
* images, while `class`, `style` and event listeners keep falling through to the root
|
|
30
|
+
* element, as before. Use the `imageLoaded` and `imageError` events to observe the image
|
|
31
|
+
* loading state.
|
|
32
|
+
*
|
|
27
33
|
* @public
|
|
28
34
|
*/
|
|
29
35
|
var _sfc_main = defineComponent({
|
|
30
36
|
name: 'BaseResultImage',
|
|
37
|
+
inheritAttrs: false,
|
|
31
38
|
props: {
|
|
32
39
|
/** (Required) The {@link @empathyco/x-types#Result} information. */
|
|
33
40
|
result: {
|
|
@@ -55,8 +62,69 @@ var _sfc_main = defineComponent({
|
|
|
55
62
|
type: Boolean,
|
|
56
63
|
default: false,
|
|
57
64
|
},
|
|
65
|
+
/**
|
|
66
|
+
* Responsive image candidates (`srcset`).
|
|
67
|
+
*
|
|
68
|
+
* - A single string is applied to every image of the result (e.g.
|
|
69
|
+
* `"image-480.jpg 480w, image-1024.jpg 1024w"`).
|
|
70
|
+
* - An array is parallel to `result.images`, so each image can have its own candidates.
|
|
71
|
+
*
|
|
72
|
+
* When provided, the `src` is kept as a fallback for browsers without `srcset` support.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
srcset: {
|
|
77
|
+
type: [String, Array],
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* The sizes of the image for different page layouts (`sizes`).
|
|
81
|
+
*
|
|
82
|
+
* It is shared by all the images of the result, since it depends on the layout and not on
|
|
83
|
+
* the image. Pass it together with `srcset`, since it is ignored otherwise.
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
sizes: {
|
|
88
|
+
type: String,
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Image loading mode.
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
loading: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'lazy',
|
|
98
|
+
},
|
|
58
99
|
},
|
|
59
|
-
|
|
100
|
+
emits: ['imageLoaded', 'imageError'],
|
|
101
|
+
setup(props, { emit }) {
|
|
102
|
+
const attrs = useAttrs();
|
|
103
|
+
/**
|
|
104
|
+
* Additional `<img>` attributes passed to the component (e.g. `decoding`,
|
|
105
|
+
* `crossorigin`, `fetchpriority`, `width`, `height`), forwarded to the rendered images.
|
|
106
|
+
*
|
|
107
|
+
* Event listeners are excluded so they don't reach the hidden loader: they keep
|
|
108
|
+
* falling through to the root element, and the image loading state is exposed through
|
|
109
|
+
* the `imageLoaded` and `imageError` events.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
const imageAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => !key.startsWith('on'))));
|
|
114
|
+
/**
|
|
115
|
+
* The consumer's `class`, `style` and event listeners, applied to the root element.
|
|
116
|
+
*
|
|
117
|
+
* The component uses `inheritAttrs: false` so the remaining attributes (e.g.
|
|
118
|
+
* `decoding`, `crossorigin`, `fetchpriority`, `width`, `height`) only reach the
|
|
119
|
+
* rendered images through `imageAttrs` and don't leak to the wrapper div.
|
|
120
|
+
*
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
const rootAttrs = computed(() => ({
|
|
124
|
+
class: attrs.class,
|
|
125
|
+
style: attrs.style,
|
|
126
|
+
...Object.fromEntries(Object.entries(attrs).filter(([key]) => key.startsWith('on'))),
|
|
127
|
+
}));
|
|
60
128
|
/**
|
|
61
129
|
* Copy of the images of the result.
|
|
62
130
|
*
|
|
@@ -99,14 +167,28 @@ var _sfc_main = defineComponent({
|
|
|
99
167
|
pointerEvents: 'none !important',
|
|
100
168
|
visibility: 'hidden !important',
|
|
101
169
|
};
|
|
170
|
+
/**
|
|
171
|
+
* Resolves the `srcset` to use for the image at the given index.
|
|
172
|
+
*
|
|
173
|
+
* @param index - Index of the image inside `result.images`.
|
|
174
|
+
*
|
|
175
|
+
* @returns The `srcset` for that image, if any.
|
|
176
|
+
*
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
const resolveSrcset = (index) => Array.isArray(props.srcset) ? props.srcset[index] : props.srcset;
|
|
102
180
|
/**
|
|
103
181
|
* Initializes images state and resets when the result's images change.
|
|
104
182
|
*
|
|
105
183
|
* @internal
|
|
106
184
|
*/
|
|
107
185
|
watch(() => props.result.images, () => {
|
|
108
|
-
pendingImages.value =
|
|
109
|
-
|
|
186
|
+
pendingImages.value = (props.result.images ?? []).map((src, index) => ({
|
|
187
|
+
index,
|
|
188
|
+
src,
|
|
189
|
+
srcset: resolveSrcset(index),
|
|
190
|
+
}));
|
|
191
|
+
loadedImages.value = pendingImages.value.filter(image => loadedImages.value.some(loadedImage => loadedImage.src === image.src));
|
|
110
192
|
}, { immediate: true });
|
|
111
193
|
/**
|
|
112
194
|
* Animation to be used.
|
|
@@ -121,15 +203,31 @@ var _sfc_main = defineComponent({
|
|
|
121
203
|
: props.loadAnimation;
|
|
122
204
|
});
|
|
123
205
|
/**
|
|
124
|
-
* Gets the
|
|
206
|
+
* Gets the currently loaded image.
|
|
125
207
|
*
|
|
126
|
-
* @returns The
|
|
208
|
+
* @returns The currently loaded image entry, or undefined if none has been loaded.
|
|
127
209
|
*
|
|
128
210
|
* @internal
|
|
129
211
|
*/
|
|
130
|
-
const
|
|
212
|
+
const currentImage = computed(() => {
|
|
131
213
|
return loadedImages.value[!props.showNextImageOnHover || !isHovering.value ? 0 : loadedImages.value.length - 1];
|
|
132
214
|
});
|
|
215
|
+
/**
|
|
216
|
+
* Gets the src of the currently loaded image.
|
|
217
|
+
*
|
|
218
|
+
* @returns The current image src.
|
|
219
|
+
*
|
|
220
|
+
* @internal
|
|
221
|
+
*/
|
|
222
|
+
const imageSrc = computed(() => currentImage.value?.src);
|
|
223
|
+
/**
|
|
224
|
+
* Gets the srcset of the currently loaded image.
|
|
225
|
+
*
|
|
226
|
+
* @returns The current image srcset, if any.
|
|
227
|
+
*
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
const imageSrcset = computed(() => currentImage.value?.srcset);
|
|
133
231
|
/**
|
|
134
232
|
* Indicates if the loader should try to load the next image.
|
|
135
233
|
*
|
|
@@ -144,23 +242,40 @@ var _sfc_main = defineComponent({
|
|
|
144
242
|
/**
|
|
145
243
|
* Sets an image as failed.
|
|
146
244
|
*
|
|
245
|
+
* @param event - The error event of the loader image.
|
|
246
|
+
*
|
|
147
247
|
* @internal
|
|
148
248
|
*/
|
|
149
249
|
const flagImageAsFailed = () => {
|
|
150
|
-
pendingImages.value.shift();
|
|
250
|
+
const image = pendingImages.value.shift();
|
|
251
|
+
if (image) {
|
|
252
|
+
emit('imageError', { index: image.index, src: image.src, srcset: image.srcset });
|
|
253
|
+
}
|
|
151
254
|
};
|
|
152
255
|
/**
|
|
153
256
|
* Sets an image as loaded.
|
|
154
257
|
*
|
|
258
|
+
* @param event - The load event of the loader image.
|
|
259
|
+
*
|
|
155
260
|
* @internal
|
|
156
261
|
*/
|
|
157
|
-
const flagImageLoaded = () => {
|
|
262
|
+
const flagImageLoaded = (event) => {
|
|
158
263
|
const image = pendingImages.value.shift();
|
|
159
264
|
if (image) {
|
|
160
265
|
loadedImages.value.push(image);
|
|
266
|
+
const element = event.target;
|
|
267
|
+
emit('imageLoaded', {
|
|
268
|
+
index: image.index,
|
|
269
|
+
src: image.src,
|
|
270
|
+
srcset: image.srcset,
|
|
271
|
+
currentSrc: element.currentSrc || image.src,
|
|
272
|
+
element,
|
|
273
|
+
});
|
|
161
274
|
}
|
|
162
275
|
};
|
|
163
276
|
return {
|
|
277
|
+
imageAttrs,
|
|
278
|
+
rootAttrs,
|
|
164
279
|
pendingImages,
|
|
165
280
|
loadedImages,
|
|
166
281
|
isHovering,
|
|
@@ -168,6 +283,7 @@ var _sfc_main = defineComponent({
|
|
|
168
283
|
loaderStyles,
|
|
169
284
|
animation,
|
|
170
285
|
imageSrc,
|
|
286
|
+
imageSrcset,
|
|
171
287
|
shouldLoadNextImage,
|
|
172
288
|
flagImageAsFailed,
|
|
173
289
|
flagImageLoaded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-result-image.vue2.js","sources":["../../../../src/components/result/base-result-image.vue"],"sourcesContent":["<template>\n <!-- This is a div because using a picture causes the onload event of the image to fire twice. -->\n <!-- eslint-disable-next-line vuejs-accessibility/mouse-events-have-key-events -->\n <div\n class=\"x-result-picture xds:picture\"\n data-test=\"result-picture\"\n @mouseenter.once=\"userHasHoveredImage = true\"\n @mouseenter=\"isHovering = true\"\n @mouseleave=\"isHovering = false\"\n >\n <img\n v-if=\"shouldLoadNextImage\"\n loading=\"lazy\"\n :src=\"pendingImages[0]\"\n :style=\"loaderStyles\"\n class=\"xds:picture-image\"\n data-test=\"result-picture-loader\"\n alt=\"\"\n role=\"presentation\"\n @load=\"flagImageLoaded\"\n @error=\"flagImageAsFailed\"\n />\n <component :is=\"animation\" class=\"xds:picture-image\" :appear=\"false\">\n <!-- @slot Fallback image content. It will be rendered when all the images failed -->\n <slot v-if=\"!loadedImages.length && !pendingImages.length\" name=\"fallback\" />\n\n <!-- @slot Loading image content. It will be rendered while the real image is not loaded -->\n <slot v-else-if=\"!loadedImages.length\" name=\"placeholder\" />\n\n <img\n v-else\n :key=\"imageSrc\"\n :alt=\"result.name\"\n :src=\"imageSrc\"\n class=\"x-result-picture-image\"\n data-test=\"result-picture-image\"\n />\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType, Ref, StyleValue } from 'vue'\nimport { computed, defineComponent, ref, watch } from 'vue'\nimport { AnimationProp } from '../../types'\nimport { NoAnimation } from '../animations'\n\n/**\n * Component to be reused that renders an `<img>`.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseResultImage',\n props: {\n /** (Required) The {@link @empathyco/x-types#Result} information. */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Animation to use when switching between the placeholder, the loaded image, or the failed\n * image fallback.\n */\n loadAnimation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Animation to use when switching between the loaded image and the hover image. */\n hoverAnimation: {\n type: AnimationProp,\n },\n /**\n * Indicates if the next valid image should be displayed on hover.\n *\n * @public\n */\n showNextImageOnHover: {\n type: Boolean,\n default: false,\n },\n },\n setup(props) {\n /**\n * Copy of the images of the result.\n *\n * It is used as a queue of images to load, once an image loads/fails to load, it is removed\n * from this array.\n *\n * @internal\n */\n const pendingImages: Ref<string[]> = ref([])\n\n /**\n * Contains the images that have been loaded successfully.\n *\n * @internal\n */\n const loadedImages: Ref<string[]> = ref([])\n\n /**\n * Indicates if the user is hovering the image.\n *\n * @internal\n */\n const isHovering = ref(false)\n\n /**\n * Indicates if the user has hovered the image.\n *\n * @internal\n */\n const userHasHoveredImage = ref(false)\n\n /**\n * Styles to use inline in the image loader, to prevent override from CSS\n *\n * @internal\n */\n const loaderStyles: StyleValue = {\n // csstype issue: https://github.com/frenic/csstype/issues/160\n position: 'absolute !important' as 'absolute',\n top: '0 !important' as '0',\n left: '0 !important' as '0',\n width: '100% !important' as '100%',\n height: '100% !important' as '100%',\n pointerEvents: 'none !important' as 'none',\n visibility: 'hidden !important' as 'hidden',\n }\n\n /**\n * Initializes images state and resets when the result's images change.\n *\n * @internal\n */\n watch(\n () => props.result.images,\n () => {\n pendingImages.value = [...(props.result.images ?? [])]\n loadedImages.value = pendingImages.value.filter(image => loadedImages.value.includes(image))\n },\n { immediate: true },\n )\n\n /**\n * Animation to be used.\n *\n * @returns The animation to be used, taking into account if the user has hovered the image.\n *\n * @internal\n */\n const animation = computed(() => {\n return userHasHoveredImage.value\n ? (props.hoverAnimation ?? props.loadAnimation)\n : props.loadAnimation\n })\n\n /**\n * Gets the src from the result image.\n *\n * @returns The result image src.\n *\n * @internal\n */\n const imageSrc = computed(() => {\n return loadedImages.value[\n !props.showNextImageOnHover || !isHovering.value ? 0 : loadedImages.value.length - 1\n ]\n })\n\n /**\n * Indicates if the loader should try to load the next image.\n *\n * @returns True if it should try to load the next image.\n *\n * @internal\n */\n const shouldLoadNextImage = computed(() => {\n const numImagesToLoad = props.showNextImageOnHover && userHasHoveredImage.value ? 2 : 1\n return !!pendingImages.value.length && loadedImages.value.length < numImagesToLoad\n })\n\n /**\n * Sets an image as failed.\n *\n * @internal\n */\n const flagImageAsFailed = () => {\n pendingImages.value.shift()\n }\n\n /**\n * Sets an image as loaded.\n *\n * @internal\n */\n const flagImageLoaded = () => {\n const image = pendingImages.value.shift()\n if (image) {\n loadedImages.value.push(image)\n }\n }\n\n return {\n pendingImages,\n loadedImages,\n isHovering,\n userHasHoveredImage,\n loaderStyles,\n animation,\n imageSrc,\n shouldLoadNextImage,\n flagImageAsFailed,\n flagImageLoaded,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-result-picture {\n position: relative;\n min-width: 1px;\n min-height: 1px;\n}\n\n.x-result-picture-image {\n max-width: 100%;\n max-height: 100%;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component is for the result image. It may be part of the search result page, recommendations or\nother section which needs to include results.\n\nThe result prop is required. It will render a `<img/>` with the result image:\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Showing the next image on hover\n\nIf a result has multiple images, it can show the next one on hover.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" showNextImageOnHover />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n\n### Customizing slots content\n\nFallback and placeholder contents can be customized.\n\nThe fallback slot allows you to replace the content of the fallback image.\n\nThe other slot is called `placeholder`, and allows you to set the image that its going to be\ndisplayed while the real one is loaded.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\">\n <template #placeholder>\n <img alt=\"Placeholder image\" src=\"./placeholder-image.svg\" />\n </template>\n <template #fallback>\n <img alt=\"Fallback image\" src=\"./fallback-image.svg\" />\n </template>\n </BaseResultImage>\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Customizing the animations\n\nTwo animations can be used in this component.\n\nThe `loadAnimation` is used to transition between the placeholder, the fallback and the image.\n\nThe `hoverAnimation` is used to transition between the image and the hover image, if the\n`showNextImageOnHover` prop is `true`.\n\n`hoverAnimation` will default to `loadAnimation` if it is not provided.\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n :loadAnimation=\"loadAnimation\"\n :hoverAnimation=\"hoverAnimation\"\n showNextImageOnHover\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nimport { CrossFade, CollapseHeight } from '@empathyco/x-components/animations'\nconst loadAnimation = CrossFade\nconst hoverAnimation = CollapseHeight\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgDA;;;;AAIE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,KAAK,EAAE;;AAEL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;AAGE;AACF,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,OAAO,EAAE,MAAMA,WAAW;AAC3B,SAAA;;AAED,QAAA,cAAc,EAAE;AACd,YAAA,IAAI,EAAE,aAAa;AACpB,SAAA;AACD;;;;AAIE;AACF,QAAA,oBAAoB,EAAE;AACpB,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,OAAO,EAAE,KAAK;AACf,SAAA;AACF,KAAA;AACD,IAAA,KAAK,CAAC,KAAK,EAAA;AACT;;;;;;;AAOE;AACF,QAAA,MAAM,aAAa,GAAkB,GAAG,CAAC,EAAE,CAAA;A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I,YAAY,CAAC,KAAK,CAAC,SAAS,CAAA,CACrF;AACF,QAAA,CAAC,CAAA;AAED;;;;;;AAME;AACF,QAAA,MAAM,mBAAkB,GAAI,QAAQ,CAAC,MAAI;AACvC,YAAA,MAAM,eAAc,GAAI,KAAK,CAAC,oBAAmB,IAAK,mBAAmB,CAAC,KAAI,GAAI,IAAI,CAAA;AACtF,YAAA,OAAO,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,MAAK,IAAK,YAAY,CAAC,KAAK,CAAC,MAAK,GAAI,eAAc;AACnF,QAAA,CAAC,CAAA;AAED;;;;AAIE;QACF,MAAM,iBAAgB,GAAI,MAAI;AAC5B,YAAA,aAAa,CAAC,KAAK,CAAC,KAAK,EAAC;AAC5B,QAAA,CAAA;AAEA;;;;AAIE;QACF,MAAM,kBAAkB,MAAI;YAC1B,MAAM,KAAI,GAAI,aAAa,CAAC,KAAK,CAAC,KAAK,EAAC;YACxC,IAAI,KAAK,EAAE;AACT,gBAAA,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAA;YAC/B;AACF,QAAA,CAAA;QAEA,OAAO;YACL,aAAa;YACb,YAAY;YACZ,UAAU;YACV,mBAAmB;YACnB,YAAY;YACZ,SAAS;YACT,QAAQ;YACR,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;SACjB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"base-result-image.vue2.js","sources":["../../../../src/components/result/base-result-image.vue"],"sourcesContent":["<template>\n <!-- This is a div because using a picture causes the onload event of the image to fire twice. -->\n <!-- eslint-disable-next-line vuejs-accessibility/mouse-events-have-key-events -->\n <div\n v-bind=\"rootAttrs\"\n class=\"x-result-picture xds:picture\"\n data-test=\"result-picture\"\n @mouseenter.once=\"userHasHoveredImage = true\"\n @mouseenter=\"isHovering = true\"\n @mouseleave=\"isHovering = false\"\n >\n <img\n v-if=\"shouldLoadNextImage\"\n v-bind=\"imageAttrs\"\n :loading=\"loading\"\n :src=\"pendingImages[0].src\"\n :srcset=\"pendingImages[0].srcset\"\n :sizes=\"sizes\"\n :style=\"loaderStyles\"\n class=\"xds:picture-image\"\n data-test=\"result-picture-loader\"\n alt=\"\"\n role=\"presentation\"\n @load=\"flagImageLoaded\"\n @error=\"flagImageAsFailed\"\n />\n <component :is=\"animation\" class=\"xds:picture-image\" :appear=\"false\">\n <!-- @slot Fallback image content. It will be rendered when all the images failed -->\n <slot v-if=\"!loadedImages.length && !pendingImages.length\" name=\"fallback\" />\n\n <!-- @slot Loading image content. It will be rendered while the real image is not loaded -->\n <slot v-else-if=\"!loadedImages.length\" name=\"placeholder\" />\n\n <img\n v-else\n v-bind=\"imageAttrs\"\n :key=\"imageSrc\"\n :alt=\"result.name\"\n :src=\"imageSrc\"\n :srcset=\"imageSrcset\"\n :sizes=\"sizes\"\n class=\"x-result-picture-image\"\n data-test=\"result-picture-image\"\n />\n </component>\n </div>\n</template>\n\n<script lang=\"ts\">\nimport type { Result } from '@empathyco/x-types'\nimport type { PropType, Ref, StyleValue } from 'vue'\nimport { computed, defineComponent, ref, useAttrs, watch } from 'vue'\n\nimport { AnimationProp } from '../../types'\nimport { NoAnimation } from '../animations'\n\n/**\n * An entry of the images queue: the image `src` and its optional `srcset`.\n *\n * @internal\n */\ninterface ImageEntry {\n /** Index of the image inside `result.images`. */\n index: number\n /** The image URL. */\n src: string\n /** Responsive candidates for the image, if provided. */\n srcset?: string\n}\n\n/**\n * Component to be reused that renders an `<img>`.\n *\n * Additional `<img>` attributes passed to the component (e.g. `decoding`, `crossorigin`,\n * `referrerpolicy`, `fetchpriority`, `width` and `height`) are forwarded to the rendered\n * images, while `class`, `style` and event listeners keep falling through to the root\n * element, as before. Use the `imageLoaded` and `imageError` events to observe the image\n * loading state.\n *\n * @public\n */\nexport default defineComponent({\n name: 'BaseResultImage',\n inheritAttrs: false,\n props: {\n /** (Required) The {@link @empathyco/x-types#Result} information. */\n result: {\n type: Object as PropType<Result>,\n required: true,\n },\n /**\n * Animation to use when switching between the placeholder, the loaded image, or the failed\n * image fallback.\n */\n loadAnimation: {\n type: AnimationProp,\n default: () => NoAnimation,\n },\n /** Animation to use when switching between the loaded image and the hover image. */\n hoverAnimation: {\n type: AnimationProp,\n },\n /**\n * Indicates if the next valid image should be displayed on hover.\n *\n * @public\n */\n showNextImageOnHover: {\n type: Boolean,\n default: false,\n },\n /**\n * Responsive image candidates (`srcset`).\n *\n * - A single string is applied to every image of the result (e.g.\n * `\"image-480.jpg 480w, image-1024.jpg 1024w\"`).\n * - An array is parallel to `result.images`, so each image can have its own candidates.\n *\n * When provided, the `src` is kept as a fallback for browsers without `srcset` support.\n *\n * @public\n */\n srcset: {\n type: [String, Array] as PropType<string | (string | undefined)[]>,\n },\n /**\n * The sizes of the image for different page layouts (`sizes`).\n *\n * It is shared by all the images of the result, since it depends on the layout and not on\n * the image. Pass it together with `srcset`, since it is ignored otherwise.\n *\n * @public\n */\n sizes: {\n type: String,\n },\n /**\n * Image loading mode.\n *\n * @public\n */\n loading: {\n type: String as PropType<'lazy' | 'eager'>,\n default: 'lazy',\n },\n },\n emits: ['imageLoaded', 'imageError'],\n setup(props, { emit }) {\n const attrs = useAttrs()\n\n /**\n * Additional `<img>` attributes passed to the component (e.g. `decoding`,\n * `crossorigin`, `fetchpriority`, `width`, `height`), forwarded to the rendered images.\n *\n * Event listeners are excluded so they don't reach the hidden loader: they keep\n * falling through to the root element, and the image loading state is exposed through\n * the `imageLoaded` and `imageError` events.\n *\n * @internal\n */\n const imageAttrs = computed(() =>\n Object.fromEntries(Object.entries(attrs).filter(([key]) => !key.startsWith('on'))),\n )\n\n /**\n * The consumer's `class`, `style` and event listeners, applied to the root element.\n *\n * The component uses `inheritAttrs: false` so the remaining attributes (e.g.\n * `decoding`, `crossorigin`, `fetchpriority`, `width`, `height`) only reach the\n * rendered images through `imageAttrs` and don't leak to the wrapper div.\n *\n * @internal\n */\n const rootAttrs = computed(() => ({\n class: attrs.class,\n style: attrs.style,\n ...Object.fromEntries(Object.entries(attrs).filter(([key]) => key.startsWith('on'))),\n }))\n\n /**\n * Copy of the images of the result.\n *\n * It is used as a queue of images to load, once an image loads/fails to load, it is removed\n * from this array.\n *\n * @internal\n */\n const pendingImages: Ref<ImageEntry[]> = ref([])\n\n /**\n * Contains the images that have been loaded successfully.\n *\n * @internal\n */\n const loadedImages: Ref<ImageEntry[]> = ref([])\n\n /**\n * Indicates if the user is hovering the image.\n *\n * @internal\n */\n const isHovering = ref(false)\n\n /**\n * Indicates if the user has hovered the image.\n *\n * @internal\n */\n const userHasHoveredImage = ref(false)\n\n /**\n * Styles to use inline in the image loader, to prevent override from CSS\n *\n * @internal\n */\n const loaderStyles: StyleValue = {\n // csstype issue: https://github.com/frenic/csstype/issues/160\n position: 'absolute !important' as 'absolute',\n top: '0 !important' as '0',\n left: '0 !important' as '0',\n width: '100% !important' as '100%',\n height: '100% !important' as '100%',\n pointerEvents: 'none !important' as 'none',\n visibility: 'hidden !important' as 'hidden',\n }\n\n /**\n * Resolves the `srcset` to use for the image at the given index.\n *\n * @param index - Index of the image inside `result.images`.\n *\n * @returns The `srcset` for that image, if any.\n *\n * @internal\n */\n const resolveSrcset = (index: number): string | undefined =>\n Array.isArray(props.srcset) ? props.srcset[index] : props.srcset\n\n /**\n * Initializes images state and resets when the result's images change.\n *\n * @internal\n */\n watch(\n () => props.result.images,\n () => {\n pendingImages.value = (props.result.images ?? []).map((src, index) => ({\n index,\n src,\n srcset: resolveSrcset(index),\n }))\n loadedImages.value = pendingImages.value.filter(image =>\n loadedImages.value.some(loadedImage => loadedImage.src === image.src),\n )\n },\n { immediate: true },\n )\n\n /**\n * Animation to be used.\n *\n * @returns The animation to be used, taking into account if the user has hovered the image.\n *\n * @internal\n */\n const animation = computed(() => {\n return userHasHoveredImage.value\n ? (props.hoverAnimation ?? props.loadAnimation)\n : props.loadAnimation\n })\n\n /**\n * Gets the currently loaded image.\n *\n * @returns The currently loaded image entry, or undefined if none has been loaded.\n *\n * @internal\n */\n const currentImage = computed(() => {\n return loadedImages.value[\n !props.showNextImageOnHover || !isHovering.value ? 0 : loadedImages.value.length - 1\n ]\n })\n\n /**\n * Gets the src of the currently loaded image.\n *\n * @returns The current image src.\n *\n * @internal\n */\n const imageSrc = computed(() => currentImage.value?.src)\n\n /**\n * Gets the srcset of the currently loaded image.\n *\n * @returns The current image srcset, if any.\n *\n * @internal\n */\n const imageSrcset = computed(() => currentImage.value?.srcset)\n\n /**\n * Indicates if the loader should try to load the next image.\n *\n * @returns True if it should try to load the next image.\n *\n * @internal\n */\n const shouldLoadNextImage = computed(() => {\n const numImagesToLoad = props.showNextImageOnHover && userHasHoveredImage.value ? 2 : 1\n return !!pendingImages.value.length && loadedImages.value.length < numImagesToLoad\n })\n\n /**\n * Sets an image as failed.\n *\n * @param event - The error event of the loader image.\n *\n * @internal\n */\n const flagImageAsFailed = () => {\n const image = pendingImages.value.shift()\n if (image) {\n emit('imageError', { index: image.index, src: image.src, srcset: image.srcset })\n }\n }\n\n /**\n * Sets an image as loaded.\n *\n * @param event - The load event of the loader image.\n *\n * @internal\n */\n const flagImageLoaded = (event: Event) => {\n const image = pendingImages.value.shift()\n if (image) {\n loadedImages.value.push(image)\n const element = event.target as HTMLImageElement\n emit('imageLoaded', {\n index: image.index,\n src: image.src,\n srcset: image.srcset,\n currentSrc: element.currentSrc || image.src,\n element,\n })\n }\n }\n\n return {\n imageAttrs,\n rootAttrs,\n pendingImages,\n loadedImages,\n isHovering,\n userHasHoveredImage,\n loaderStyles,\n animation,\n imageSrc,\n imageSrcset,\n shouldLoadNextImage,\n flagImageAsFailed,\n flagImageLoaded,\n }\n },\n})\n</script>\n\n<style lang=\"css\" scoped>\n.x-result-picture {\n position: relative;\n min-width: 1px;\n min-height: 1px;\n}\n\n.x-result-picture-image {\n max-width: 100%;\n max-height: 100%;\n}\n</style>\n\n<docs lang=\"mdx\">\n## Examples\n\n### Basic example\n\nThis component is for the result image. It may be part of the search result page, recommendations or\nother section which needs to include results.\n\nThe result prop is required. It will render a `<img/>` with the result image:\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Responsive images with `srcset` and `sizes`\n\nThe `srcset` and `sizes` props are used to deliver the right image candidate according to the\ndevice and the layout (like the native `<img>` attributes).\n\n`srcset` can be a single string, applied to all the images of the result, or an array parallel to\n`result.images`, so each image can have its own candidates.\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n srcset=\"image1-480.jpg?width=400 480w, image1-1024.jpg?width=1024 1024w\"\n sizes=\"(min-width: 600px) 33vw, 100vw\"\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\nThe `src` of the image is always kept, so it works as a fallback when `srcset` is not supported.\n\n### Showing the next image on hover\n\nIf a result has multiple images, it can show the next one on hover.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" showNextImageOnHover />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n\n### Customizing slots content\n\nFallback and placeholder contents can be customized.\n\nThe fallback slot allows you to replace the content of the fallback image.\n\nThe other slot is called `placeholder`, and allows you to set the image that its going to be\ndisplayed while the real one is loaded.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\">\n <template #placeholder>\n <img alt=\"Placeholder image\" src=\"./placeholder-image.svg\" />\n </template>\n <template #fallback>\n <img alt=\"Fallback image\" src=\"./fallback-image.svg\" />\n </template>\n </BaseResultImage>\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\n</script>\n```\n\n### Customizing the animations\n\nTwo animations can be used in this component.\n\nThe `loadAnimation` is used to transition between the placeholder, the fallback and the image.\n\nThe `hoverAnimation` is used to transition between the image and the hover image, if the\n`showNextImageOnHover` prop is `true`.\n\n`hoverAnimation` will default to `loadAnimation` if it is not provided.\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n :loadAnimation=\"loadAnimation\"\n :hoverAnimation=\"hoverAnimation\"\n showNextImageOnHover\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nimport { CrossFade, CollapseHeight } from '@empathyco/x-components/animations'\nconst loadAnimation = CrossFade\nconst hoverAnimation = CollapseHeight\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],\n}\n</script>\n```\n\n### Optimizing the first result for LCP\n\nBy default, images are loaded lazily. For the first (above-the-fold) result of the search results\npage, the image is usually the **Largest Contentful Paint (LCP)** element: eager-loading it with\na high fetch priority avoids waiting for the lazy-load viewport check and lets the browser start\nthe request immediately.\n\nCombine it with `width` and `height` so the browser can prioritize and reserve the space of the\nLCP element from the start:\n\n```vue\n<template>\n <!-- First, above-the-fold result -->\n <BaseResultImage\n :result=\"firstResult\"\n loading=\"eager\"\n fetchPriority=\"high\"\n :width=\"256\"\n :height=\"371\"\n />\n <!-- All the remaining results keep the default lazy loading -->\n <BaseResultImage v-for=\"result in otherResults\" :key=\"result.id\" :result=\"result\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\n</script>\n```\n\nOnly the above-the-fold results should use `loading=\"eager\"`; keep the rest lazy to avoid\nrequesting more images than needed.\n\n### Avoiding layout shift (CLS)\n\nPassing `width` and `height` (the intrinsic dimensions of the image) helps the browser reserve\nthe right space before the image is loaded, preventing the layout shift caused by the image\nreplacing the placeholder.\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" :width=\"256\" :height=\"371\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\n</script>\n```\n\n### Passing additional image attributes\n\nAny additional `<img>` attribute passed to the component is forwarded to the rendered images\n(the hidden preload image and the visible one), so there is no need for a specific prop per\nattribute:\n\n```vue\n<template>\n <BaseResultImage\n :result=\"result\"\n decoding=\"async\"\n crossorigin=\"anonymous\"\n fetchpriority=\"high\"\n referrerpolicy=\"no-referrer\"\n :width=\"256\"\n :height=\"371\"\n />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\n</script>\n```\n\n`class`, `style` and event listeners keep being applied to the root element, so the wrapper\ncan still be styled and listened to. Any other additional attribute is only applied to the\nrendered images, never to the wrapper div. Observe the image loading state with the\n`imageLoaded` and `imageError` events instead.\n\n### Image loading events\n\nThe component emits `imageLoaded` when an image finishes loading, and `imageError` when an image\nfails to load (the next one of the queue will be tried).\n\n```vue\n<template>\n <BaseResultImage :result=\"result\" @imageLoaded=\"imageLoaded\" @imageError=\"imageError\" />\n</template>\n\n<script setup>\nimport { BaseResultImage } from '@empathyco/x-components'\nconst result = {\n name: 'Jacket',\n images: ['https://some-image-url.com/image1.jpg'],\n}\nconst imageLoaded = ({ index, src, currentSrc }) => {\n // For example, track the candidate actually downloaded by the browser\n console.log(`Image ${index} loaded: ${src} (downloaded ${currentSrc})`)\n}\nconst imageError = ({ index, src }) => {\n console.log(`Image ${index} failed: ${src}`)\n}\n</script>\n```\n</docs>\n"],"names":["NoAnimation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsEA;;;;;;;;;;AAUE;AACF,gBAAe,eAAe,CAAC;AAC7B,IAAA,IAAI,EAAE,iBAAiB;AACvB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,KAAK,EAAE;;AAEL,QAAA,MAAM,EAAE;AACN,YAAA,IAAI,EAAE,MAA0B;AAChC,YAAA,QAAQ,EAAE,IAAI;AACf,SAAA;AACD;;;AAGE;AACF,QAAA,aAAa,EAAE;AACb,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,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K,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAA;YACjF;AACF,QAAA,CAAA;AAEA;;;;;;AAME;AACF,QAAA,MAAM,eAAc,GAAI,CAAC,KAAY,KAAG;YACtC,MAAM,KAAI,GAAI,aAAa,CAAC,KAAK,CAAC,KAAK,EAAC;YACxC,IAAI,KAAK,EAAE;AACT,gBAAA,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAA;AAC7B,gBAAA,MAAM,OAAM,GAAI,KAAK,CAAC,MAAyB;gBAC/C,IAAI,CAAC,aAAa,EAAE;oBAClB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,GAAG,EAAE,KAAK,CAAC,GAAG;oBACd,MAAM,EAAE,KAAK,CAAC,MAAM;AACpB,oBAAA,UAAU,EAAE,OAAO,CAAC,UAAS,IAAK,KAAK,CAAC,GAAG;oBAC3C,OAAO;AACR,iBAAA,CAAA;YACH;AACF,QAAA,CAAA;QAEA,OAAO;YACL,UAAU;YACV,SAAS;YACT,aAAa;YACb,YAAY;YACZ,UAAU;YACV,mBAAmB;YACnB,YAAY;YACZ,SAAS;YACT,QAAQ;YACR,WAAW;YACX,mBAAmB;YACnB,iBAAiB;YACjB,eAAe;SACjB;IACF,CAAC;AACF,CAAA,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empathyco/x-components",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.0",
|
|
4
4
|
"description": "Empathy X Components",
|
|
5
5
|
"author": "Empathy Systems Corporation S.L.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"vuex": "4.0.2"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@empathyco/x-adapter": "8.2.
|
|
71
|
-
"@empathyco/x-adapter-platform": "2.0.
|
|
72
|
-
"@empathyco/x-types": "11.0.
|
|
73
|
-
"@empathyco/x-utils": "1.1.
|
|
70
|
+
"@empathyco/x-adapter": "8.2.3",
|
|
71
|
+
"@empathyco/x-adapter-platform": "2.0.3",
|
|
72
|
+
"@empathyco/x-types": "11.0.3",
|
|
73
|
+
"@empathyco/x-utils": "1.1.3",
|
|
74
74
|
"@vue/devtools-api": "~6.6.4",
|
|
75
75
|
"@vueuse/core": "~12.8.2",
|
|
76
76
|
"js-md5": "~0.9.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@babel/preset-env": "8.0.7",
|
|
85
|
-
"@empathyco/x-design-system": "1.2.
|
|
85
|
+
"@empathyco/x-design-system": "1.2.3",
|
|
86
86
|
"@microsoft/api-documenter": "7.30.19",
|
|
87
87
|
"@microsoft/api-extractor": "7.60.0",
|
|
88
88
|
"@tailwindcss/vite": "4.3.3",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"access": "public",
|
|
118
118
|
"directory": "dist"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "9183b67b7d4afc39b9eb333ff3d99f6f92c05919"
|
|
121
121
|
}
|
|
@@ -11322,7 +11322,7 @@
|
|
|
11322
11322
|
{
|
|
11323
11323
|
"kind": "Variable",
|
|
11324
11324
|
"canonicalReference": "@empathyco/x-components!BaseResultImage:var",
|
|
11325
|
-
"docComment": "/**\n * Component to be reused that renders an `<img>`.\n *\n * @public\n */\n",
|
|
11325
|
+
"docComment": "/**\n * Component to be reused that renders an `<img>`.\n *\n * Additional `<img>` attributes passed to the component (e.g. `decoding`, `crossorigin`,\n * `referrerpolicy`, `fetchpriority`, `width` and `height`) are forwarded to the rendered\n * images, while `class`, `style` and event listeners keep falling through to the root\n * element, as before. Use the `imageLoaded` and `imageError` events to observe the image\n * loading state.\n *\n * @public\n */\n",
|
|
11326
11326
|
"excerptTokens": [
|
|
11327
11327
|
{
|
|
11328
11328
|
"kind": "Content",
|
|
@@ -11438,7 +11438,70 @@
|
|
|
11438
11438
|
},
|
|
11439
11439
|
{
|
|
11440
11440
|
"kind": "Content",
|
|
11441
|
-
"text": ";\n default: boolean;\n };\n
|
|
11441
|
+
"text": ";\n default: boolean;\n };\n srcset: {\n type: "
|
|
11442
|
+
},
|
|
11443
|
+
{
|
|
11444
|
+
"kind": "Reference",
|
|
11445
|
+
"text": "PropType",
|
|
11446
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
11447
|
+
},
|
|
11448
|
+
{
|
|
11449
|
+
"kind": "Content",
|
|
11450
|
+
"text": "<string | (string | undefined)[]>;\n };\n sizes: {\n type: "
|
|
11451
|
+
},
|
|
11452
|
+
{
|
|
11453
|
+
"kind": "Reference",
|
|
11454
|
+
"text": "StringConstructor",
|
|
11455
|
+
"canonicalReference": "!StringConstructor:interface"
|
|
11456
|
+
},
|
|
11457
|
+
{
|
|
11458
|
+
"kind": "Content",
|
|
11459
|
+
"text": ";\n };\n loading: {\n type: "
|
|
11460
|
+
},
|
|
11461
|
+
{
|
|
11462
|
+
"kind": "Reference",
|
|
11463
|
+
"text": "PropType",
|
|
11464
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
11465
|
+
},
|
|
11466
|
+
{
|
|
11467
|
+
"kind": "Content",
|
|
11468
|
+
"text": "<\"lazy\" | \"eager\">;\n default: string;\n };\n}>, {\n imageAttrs: import(\"vue\")."
|
|
11469
|
+
},
|
|
11470
|
+
{
|
|
11471
|
+
"kind": "Reference",
|
|
11472
|
+
"text": "ComputedRef",
|
|
11473
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
11474
|
+
},
|
|
11475
|
+
{
|
|
11476
|
+
"kind": "Content",
|
|
11477
|
+
"text": "<{\n [k: string]: unknown;\n }>;\n rootAttrs: import(\"vue\")."
|
|
11478
|
+
},
|
|
11479
|
+
{
|
|
11480
|
+
"kind": "Reference",
|
|
11481
|
+
"text": "ComputedRef",
|
|
11482
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
11483
|
+
},
|
|
11484
|
+
{
|
|
11485
|
+
"kind": "Content",
|
|
11486
|
+
"text": "<{\n class: import(\"vue\")."
|
|
11487
|
+
},
|
|
11488
|
+
{
|
|
11489
|
+
"kind": "Reference",
|
|
11490
|
+
"text": "ClassValue",
|
|
11491
|
+
"canonicalReference": "@vue/runtime-dom!ClassValue:type"
|
|
11492
|
+
},
|
|
11493
|
+
{
|
|
11494
|
+
"kind": "Content",
|
|
11495
|
+
"text": ";\n style: "
|
|
11496
|
+
},
|
|
11497
|
+
{
|
|
11498
|
+
"kind": "Reference",
|
|
11499
|
+
"text": "StyleValue",
|
|
11500
|
+
"canonicalReference": "@vue/runtime-dom!StyleValue:type"
|
|
11501
|
+
},
|
|
11502
|
+
{
|
|
11503
|
+
"kind": "Content",
|
|
11504
|
+
"text": ";\n }>;\n pendingImages: "
|
|
11442
11505
|
},
|
|
11443
11506
|
{
|
|
11444
11507
|
"kind": "Reference",
|
|
@@ -11447,7 +11510,25 @@
|
|
|
11447
11510
|
},
|
|
11448
11511
|
{
|
|
11449
11512
|
"kind": "Content",
|
|
11450
|
-
"text": "<
|
|
11513
|
+
"text": "<"
|
|
11514
|
+
},
|
|
11515
|
+
{
|
|
11516
|
+
"kind": "Reference",
|
|
11517
|
+
"text": "ImageEntry",
|
|
11518
|
+
"canonicalReference": "@empathyco/x-components!~ImageEntry:interface"
|
|
11519
|
+
},
|
|
11520
|
+
{
|
|
11521
|
+
"kind": "Content",
|
|
11522
|
+
"text": "[], "
|
|
11523
|
+
},
|
|
11524
|
+
{
|
|
11525
|
+
"kind": "Reference",
|
|
11526
|
+
"text": "ImageEntry",
|
|
11527
|
+
"canonicalReference": "@empathyco/x-components!~ImageEntry:interface"
|
|
11528
|
+
},
|
|
11529
|
+
{
|
|
11530
|
+
"kind": "Content",
|
|
11531
|
+
"text": "[]>;\n loadedImages: "
|
|
11451
11532
|
},
|
|
11452
11533
|
{
|
|
11453
11534
|
"kind": "Reference",
|
|
@@ -11456,7 +11537,25 @@
|
|
|
11456
11537
|
},
|
|
11457
11538
|
{
|
|
11458
11539
|
"kind": "Content",
|
|
11459
|
-
"text": "<
|
|
11540
|
+
"text": "<"
|
|
11541
|
+
},
|
|
11542
|
+
{
|
|
11543
|
+
"kind": "Reference",
|
|
11544
|
+
"text": "ImageEntry",
|
|
11545
|
+
"canonicalReference": "@empathyco/x-components!~ImageEntry:interface"
|
|
11546
|
+
},
|
|
11547
|
+
{
|
|
11548
|
+
"kind": "Content",
|
|
11549
|
+
"text": "[], "
|
|
11550
|
+
},
|
|
11551
|
+
{
|
|
11552
|
+
"kind": "Reference",
|
|
11553
|
+
"text": "ImageEntry",
|
|
11554
|
+
"canonicalReference": "@empathyco/x-components!~ImageEntry:interface"
|
|
11555
|
+
},
|
|
11556
|
+
{
|
|
11557
|
+
"kind": "Content",
|
|
11558
|
+
"text": "[]>;\n isHovering: "
|
|
11460
11559
|
},
|
|
11461
11560
|
{
|
|
11462
11561
|
"kind": "Reference",
|
|
@@ -11519,7 +11618,7 @@
|
|
|
11519
11618
|
},
|
|
11520
11619
|
{
|
|
11521
11620
|
"kind": "Content",
|
|
11522
|
-
"text": "<string>;\n
|
|
11621
|
+
"text": "<string>;\n imageSrcset: import(\"vue\")."
|
|
11523
11622
|
},
|
|
11524
11623
|
{
|
|
11525
11624
|
"kind": "Reference",
|
|
@@ -11528,7 +11627,25 @@
|
|
|
11528
11627
|
},
|
|
11529
11628
|
{
|
|
11530
11629
|
"kind": "Content",
|
|
11531
|
-
"text": "<
|
|
11630
|
+
"text": "<string | undefined>;\n shouldLoadNextImage: import(\"vue\")."
|
|
11631
|
+
},
|
|
11632
|
+
{
|
|
11633
|
+
"kind": "Reference",
|
|
11634
|
+
"text": "ComputedRef",
|
|
11635
|
+
"canonicalReference": "@vue/reactivity!ComputedRef:interface"
|
|
11636
|
+
},
|
|
11637
|
+
{
|
|
11638
|
+
"kind": "Content",
|
|
11639
|
+
"text": "<boolean>;\n flagImageAsFailed: () => void;\n flagImageLoaded: (event: "
|
|
11640
|
+
},
|
|
11641
|
+
{
|
|
11642
|
+
"kind": "Reference",
|
|
11643
|
+
"text": "Event",
|
|
11644
|
+
"canonicalReference": "!Event:interface"
|
|
11645
|
+
},
|
|
11646
|
+
{
|
|
11647
|
+
"kind": "Content",
|
|
11648
|
+
"text": ") => void;\n}, {}, {}, {}, import(\"vue\")."
|
|
11532
11649
|
},
|
|
11533
11650
|
{
|
|
11534
11651
|
"kind": "Reference",
|
|
@@ -11546,7 +11663,7 @@
|
|
|
11546
11663
|
},
|
|
11547
11664
|
{
|
|
11548
11665
|
"kind": "Content",
|
|
11549
|
-
"text": ",
|
|
11666
|
+
"text": ", (\"imageLoaded\" | \"imageError\")[], \"imageLoaded\" | \"imageError\", import(\"vue\")."
|
|
11550
11667
|
},
|
|
11551
11668
|
{
|
|
11552
11669
|
"kind": "Reference",
|
|
@@ -11663,7 +11780,34 @@
|
|
|
11663
11780
|
},
|
|
11664
11781
|
{
|
|
11665
11782
|
"kind": "Content",
|
|
11666
|
-
"text": ";\n default: boolean;\n };\n
|
|
11783
|
+
"text": ";\n default: boolean;\n };\n srcset: {\n type: "
|
|
11784
|
+
},
|
|
11785
|
+
{
|
|
11786
|
+
"kind": "Reference",
|
|
11787
|
+
"text": "PropType",
|
|
11788
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
11789
|
+
},
|
|
11790
|
+
{
|
|
11791
|
+
"kind": "Content",
|
|
11792
|
+
"text": "<string | (string | undefined)[]>;\n };\n sizes: {\n type: "
|
|
11793
|
+
},
|
|
11794
|
+
{
|
|
11795
|
+
"kind": "Reference",
|
|
11796
|
+
"text": "StringConstructor",
|
|
11797
|
+
"canonicalReference": "!StringConstructor:interface"
|
|
11798
|
+
},
|
|
11799
|
+
{
|
|
11800
|
+
"kind": "Content",
|
|
11801
|
+
"text": ";\n };\n loading: {\n type: "
|
|
11802
|
+
},
|
|
11803
|
+
{
|
|
11804
|
+
"kind": "Reference",
|
|
11805
|
+
"text": "PropType",
|
|
11806
|
+
"canonicalReference": "@vue/runtime-core!PropType:type"
|
|
11807
|
+
},
|
|
11808
|
+
{
|
|
11809
|
+
"kind": "Content",
|
|
11810
|
+
"text": "<\"lazy\" | \"eager\">;\n default: string;\n };\n}>> & "
|
|
11667
11811
|
},
|
|
11668
11812
|
{
|
|
11669
11813
|
"kind": "Reference",
|
|
@@ -11672,7 +11816,7 @@
|
|
|
11672
11816
|
},
|
|
11673
11817
|
{
|
|
11674
11818
|
"kind": "Content",
|
|
11675
|
-
"text": "<{}>, {\n loadAnimation: string | "
|
|
11819
|
+
"text": "<{\n onImageLoaded?: ((...args: any[]) => any) | undefined;\n onImageError?: ((...args: any[]) => any) | undefined;\n}>, {\n loadAnimation: string | "
|
|
11676
11820
|
},
|
|
11677
11821
|
{
|
|
11678
11822
|
"kind": "Reference",
|
|
@@ -11690,7 +11834,7 @@
|
|
|
11690
11834
|
},
|
|
11691
11835
|
{
|
|
11692
11836
|
"kind": "Content",
|
|
11693
|
-
"text": "<string, any>;\n showNextImageOnHover: boolean;\n}, {}, {}, {}, string, import(\"vue\")."
|
|
11837
|
+
"text": "<string, any>;\n showNextImageOnHover: boolean;\n loading: \"lazy\" | \"eager\";\n}, {}, {}, {}, string, import(\"vue\")."
|
|
11694
11838
|
},
|
|
11695
11839
|
{
|
|
11696
11840
|
"kind": "Reference",
|
|
@@ -11708,7 +11852,7 @@
|
|
|
11708
11852
|
"name": "BaseResultImage",
|
|
11709
11853
|
"variableTypeTokenRange": {
|
|
11710
11854
|
"startIndex": 1,
|
|
11711
|
-
"endIndex":
|
|
11855
|
+
"endIndex": 116
|
|
11712
11856
|
}
|
|
11713
11857
|
},
|
|
11714
11858
|
{
|
|
@@ -34,6 +34,7 @@ import { default as ChevronTinyLeftIcon } from './chevron-tiny-left.vue';
|
|
|
34
34
|
import { default as ChevronTinyRightIcon } from './chevron-tiny-right.vue';
|
|
35
35
|
import { default as ChevronTinyUpIcon } from './chevron-tiny-up.vue';
|
|
36
36
|
import { default as ChevronUpIcon } from './chevron-up.vue';
|
|
37
|
+
import { ClassValue } from 'vue';
|
|
37
38
|
import type { Component } from 'vue';
|
|
38
39
|
import { ComponentOptionsMixin } from 'vue';
|
|
39
40
|
import { ComponentProvideOptions } from 'vue';
|
|
@@ -1424,18 +1425,36 @@ showNextImageOnHover: {
|
|
|
1424
1425
|
type: BooleanConstructor;
|
|
1425
1426
|
default: boolean;
|
|
1426
1427
|
};
|
|
1428
|
+
srcset: {
|
|
1429
|
+
type: PropType<string | (string | undefined)[]>;
|
|
1430
|
+
};
|
|
1431
|
+
sizes: {
|
|
1432
|
+
type: StringConstructor;
|
|
1433
|
+
};
|
|
1434
|
+
loading: {
|
|
1435
|
+
type: PropType<"lazy" | "eager">;
|
|
1436
|
+
default: string;
|
|
1437
|
+
};
|
|
1427
1438
|
}>, {
|
|
1428
|
-
|
|
1429
|
-
|
|
1439
|
+
imageAttrs: ComputedRef< {
|
|
1440
|
+
[k: string]: unknown;
|
|
1441
|
+
}>;
|
|
1442
|
+
rootAttrs: ComputedRef< {
|
|
1443
|
+
class: ClassValue;
|
|
1444
|
+
style: StyleValue;
|
|
1445
|
+
}>;
|
|
1446
|
+
pendingImages: Ref<ImageEntry[], ImageEntry[]>;
|
|
1447
|
+
loadedImages: Ref<ImageEntry[], ImageEntry[]>;
|
|
1430
1448
|
isHovering: Ref<boolean, boolean>;
|
|
1431
1449
|
userHasHoveredImage: Ref<boolean, boolean>;
|
|
1432
1450
|
loaderStyles: CSSProperties;
|
|
1433
1451
|
animation: ComputedRef<string | Function | Record<string, any>>;
|
|
1434
1452
|
imageSrc: ComputedRef<string>;
|
|
1453
|
+
imageSrcset: ComputedRef<string | undefined>;
|
|
1435
1454
|
shouldLoadNextImage: ComputedRef<boolean>;
|
|
1436
1455
|
flagImageAsFailed: () => void;
|
|
1437
|
-
flagImageLoaded: () => void;
|
|
1438
|
-
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin,
|
|
1456
|
+
flagImageLoaded: (event: Event) => void;
|
|
1457
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("imageLoaded" | "imageError")[], "imageLoaded" | "imageError", PublicProps, Readonly<ExtractPropTypes< {
|
|
1439
1458
|
result: {
|
|
1440
1459
|
type: PropType<Result>;
|
|
1441
1460
|
required: true;
|
|
@@ -1451,9 +1470,23 @@ showNextImageOnHover: {
|
|
|
1451
1470
|
type: BooleanConstructor;
|
|
1452
1471
|
default: boolean;
|
|
1453
1472
|
};
|
|
1454
|
-
|
|
1473
|
+
srcset: {
|
|
1474
|
+
type: PropType<string | (string | undefined)[]>;
|
|
1475
|
+
};
|
|
1476
|
+
sizes: {
|
|
1477
|
+
type: StringConstructor;
|
|
1478
|
+
};
|
|
1479
|
+
loading: {
|
|
1480
|
+
type: PropType<"lazy" | "eager">;
|
|
1481
|
+
default: string;
|
|
1482
|
+
};
|
|
1483
|
+
}>> & Readonly<{
|
|
1484
|
+
onImageLoaded?: ((...args: any[]) => any) | undefined;
|
|
1485
|
+
onImageError?: ((...args: any[]) => any) | undefined;
|
|
1486
|
+
}>, {
|
|
1455
1487
|
loadAnimation: string | Function | Record<string, any>;
|
|
1456
1488
|
showNextImageOnHover: boolean;
|
|
1489
|
+
loading: "lazy" | "eager";
|
|
1457
1490
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
1458
1491
|
|
|
1459
1492
|
// @public
|
|
@@ -10767,6 +10800,7 @@ export type XStoreModuleOptions<StoreModule extends AnyXStoreModule> = StoreModu
|
|
|
10767
10800
|
// dist/types/src/components/filters/labels/base-price-filter-label.vue.d.ts:13:13 - (ae-forgotten-export) The symbol "RangeValue" needs to be exported by the entry point index.d.ts
|
|
10768
10801
|
// dist/types/src/components/filters/labels/base-rating-filter-label.vue.d.ts:16:9 - (ae-forgotten-export) The symbol "BooleanFilter" needs to be exported by the entry point index.d.ts
|
|
10769
10802
|
// dist/types/src/components/page-selector.vue.d.ts:71:5 - (ae-forgotten-export) The symbol "PageItem" needs to be exported by the entry point index.d.ts
|
|
10803
|
+
// dist/types/src/components/result/base-result-image.vue.d.ts:96:5 - (ae-forgotten-export) The symbol "ImageEntry" needs to be exported by the entry point index.d.ts
|
|
10770
10804
|
// dist/types/src/components/sort/sort-list.vue.d.ts:41:5 - (ae-forgotten-export) The symbol "SortListItem" needs to be exported by the entry point index.d.ts
|
|
10771
10805
|
// dist/types/src/components/sort/sort-picker-list.vue.d.ts:44:5 - (ae-forgotten-export) The symbol "SortPickerItem" needs to be exported by the entry point index.d.ts
|
|
10772
10806
|
// dist/types/src/components/suggestions/base-suggestion.vue.d.ts:31:9 - (ae-forgotten-export) The symbol "Suggestion" needs to be exported by the entry point index.d.ts
|