@prismicio/vue 3.0.0-beta.5 → 3.0.0-beta.6

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.
@@ -59,8 +59,8 @@ export type PrismicImageProps = {
59
59
  * Adds an additional `srcset` attribute to the image following given widths.
60
60
  *
61
61
  * @remarks
62
- * A special value of `"auto"` is accepted to automatically use image widths
63
- * coming from the API.
62
+ * A special value of `"thumbnails"` is accepted to automatically use image
63
+ * widths coming from the API.
64
64
  * @remarks
65
65
  * A special value of `"defaults"` is accepted to automatically use image
66
66
  * widths coming from the plugin configuration.
@@ -70,7 +70,7 @@ export type PrismicImageProps = {
70
70
  */
71
71
  widths?:
72
72
  | NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"]
73
- | "auto"
73
+ | "thumbnails"
74
74
  | "defaults";
75
75
 
76
76
  /**
@@ -156,23 +156,13 @@ export const usePrismicImage = (
156
156
  );
157
157
  }
158
158
 
159
- if (widths === "auto") {
160
- return asImageWidthSrcSet(field, imgixParams);
161
- } else {
162
- // Remove potential thumbnails when using manual widths
163
- const { url, dimensions, alt, copyright } = field;
164
-
165
- return asImageWidthSrcSet(
166
- { url, dimensions, alt, copyright },
167
- {
168
- ...imgixParams,
169
- widths:
170
- widths === "defaults"
171
- ? options.components?.imageWidthSrcSetDefaults
172
- : widths,
173
- },
174
- );
175
- }
159
+ return asImageWidthSrcSet(field, {
160
+ ...imgixParams,
161
+ widths:
162
+ widths === "defaults"
163
+ ? options.components?.imageWidthSrcSetDefaults
164
+ : widths,
165
+ });
176
166
  } else if (pixelDensities) {
177
167
  return asImagePixelDensitySrcSet(field, {
178
168
  ...imgixParams,
@@ -235,7 +225,7 @@ export const PrismicImageImpl = /*#__PURE__*/ defineComponent({
235
225
  widths: {
236
226
  type: [String, Object] as PropType<
237
227
  | NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"]
238
- | "auto"
228
+ | "thumbnails"
239
229
  | "defaults"
240
230
  >,
241
231
  default: undefined,