@prismicio/vue 5.3.0-canary.4c3e4ab → 5.3.0-canary.87748cc

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.
Files changed (59) hide show
  1. package/dist/PrismicImage.vue.d.cts +20 -27
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +6 -18
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +6 -9
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicTable/PrismicTable.vue.d.cts +4 -7
  8. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  9. package/dist/PrismicText.vue.d.cts +1 -3
  10. package/dist/PrismicText.vue.d.cts.map +1 -1
  11. package/dist/SliceZone/SliceZone.vue.d.cts +3 -9
  12. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  13. package/dist/package.cjs +1 -1
  14. package/dist/package.cjs.map +1 -1
  15. package/dist/package.js +1 -1
  16. package/dist/package.js.map +1 -1
  17. package/dist/src/PrismicImage.cjs.map +1 -1
  18. package/dist/src/PrismicImage.js.map +1 -1
  19. package/dist/src/PrismicImage.vue.d.ts +20 -27
  20. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  21. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  22. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/src/PrismicLink.cjs.map +1 -1
  24. package/dist/src/PrismicLink.js.map +1 -1
  25. package/dist/src/PrismicLink.vue.d.ts +6 -18
  26. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  27. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  28. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  29. package/dist/src/PrismicRichText/PrismicRichText.cjs.map +1 -1
  30. package/dist/src/PrismicRichText/PrismicRichText.js.map +1 -1
  31. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +2 -5
  32. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  33. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  34. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  36. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  37. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +2 -5
  38. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  39. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  40. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  41. package/dist/src/PrismicText.cjs.map +1 -1
  42. package/dist/src/PrismicText.js.map +1 -1
  43. package/dist/src/PrismicText.vue.d.ts +1 -3
  44. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  45. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  46. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/src/SliceZone/SliceZone.cjs.map +1 -1
  48. package/dist/src/SliceZone/SliceZone.js.map +1 -1
  49. package/dist/src/SliceZone/SliceZone.vue.d.ts +3 -9
  50. package/dist/src/SliceZone/SliceZone.vue.d.ts.map +1 -1
  51. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  52. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/PrismicImage.vue +6 -7
  55. package/src/PrismicLink.vue +2 -6
  56. package/src/PrismicRichText/PrismicRichText.vue +2 -5
  57. package/src/PrismicTable/PrismicTable.vue +2 -5
  58. package/src/PrismicText.vue +1 -3
  59. package/src/SliceZone/SliceZone.vue +3 -9
@@ -7,9 +7,7 @@ import { ImageField, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet }
7
7
  * Props for `<PrismicImage />`.
8
8
  */
9
9
  type PrismicImageProps = {
10
- /**
11
- * The Prismic image field or thumbnail to render.
12
- */
10
+ /** The Prismic image field or thumbnail to render. */
13
11
  field: ImageField | ImageField<string>;
14
12
  /**
15
13
  * An object of Imgix URL API parameters to transform the image.
@@ -48,14 +46,15 @@ type PrismicImageProps = {
48
46
  height?: number | string;
49
47
  } & ({
50
48
  /**
51
- * Widths (in pixels) used to build a `srcset` value for the image field.
49
+ * Widths (in pixels) used to build a `srcset` value for the image
50
+ * field.
52
51
  *
53
52
  * If omitted or set to `"defaults"`, the following widths will be used:
54
53
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
55
54
  *
56
- * If the image field contains responsive views, each responsive view can
57
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
58
- * as the `widths` prop.
55
+ * If the image field contains responsive views, each responsive view
56
+ * can be used as a width in the resulting `srcset` by passing
57
+ * `"thumbnails"` as the `widths` prop.
59
58
  */
60
59
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
61
60
  pixelDensities?: never;
@@ -70,9 +69,7 @@ type PrismicImageProps = {
70
69
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
71
70
  });
72
71
  declare const __VLS_export: vue11.DefineComponent<({
73
- /**
74
- * The Prismic image field or thumbnail to render.
75
- */
72
+ /** The Prismic image field or thumbnail to render. */
76
73
  field: ImageField | ImageField<string>;
77
74
  /**
78
75
  * An object of Imgix URL API parameters to transform the image.
@@ -111,21 +108,20 @@ declare const __VLS_export: vue11.DefineComponent<({
111
108
  height?: number | string;
112
109
  } & {
113
110
  /**
114
- * Widths (in pixels) used to build a `srcset` value for the image field.
111
+ * Widths (in pixels) used to build a `srcset` value for the image
112
+ * field.
115
113
  *
116
114
  * If omitted or set to `"defaults"`, the following widths will be used:
117
115
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
118
116
  *
119
- * If the image field contains responsive views, each responsive view can
120
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
121
- * as the `widths` prop.
117
+ * If the image field contains responsive views, each responsive view
118
+ * can be used as a width in the resulting `srcset` by passing
119
+ * `"thumbnails"` as the `widths` prop.
122
120
  */
123
121
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
124
122
  pixelDensities?: never;
125
123
  }) | ({
126
- /**
127
- * The Prismic image field or thumbnail to render.
128
- */
124
+ /** The Prismic image field or thumbnail to render. */
129
125
  field: ImageField | ImageField<string>;
130
126
  /**
131
127
  * An object of Imgix URL API parameters to transform the image.
@@ -172,9 +168,7 @@ declare const __VLS_export: vue11.DefineComponent<({
172
168
  */
173
169
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
174
170
  }), {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<({
175
- /**
176
- * The Prismic image field or thumbnail to render.
177
- */
171
+ /** The Prismic image field or thumbnail to render. */
178
172
  field: ImageField | ImageField<string>;
179
173
  /**
180
174
  * An object of Imgix URL API parameters to transform the image.
@@ -213,21 +207,20 @@ declare const __VLS_export: vue11.DefineComponent<({
213
207
  height?: number | string;
214
208
  } & {
215
209
  /**
216
- * Widths (in pixels) used to build a `srcset` value for the image field.
210
+ * Widths (in pixels) used to build a `srcset` value for the image
211
+ * field.
217
212
  *
218
213
  * If omitted or set to `"defaults"`, the following widths will be used:
219
214
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
220
215
  *
221
- * If the image field contains responsive views, each responsive view can
222
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
223
- * as the `widths` prop.
216
+ * If the image field contains responsive views, each responsive view
217
+ * can be used as a width in the resulting `srcset` by passing
218
+ * `"thumbnails"` as the `widths` prop.
224
219
  */
225
220
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
226
221
  pixelDensities?: never;
227
222
  }) | ({
228
- /**
229
- * The Prismic image field or thumbnail to render.
230
- */
223
+ /** The Prismic image field or thumbnail to render. */
231
224
  field: ImageField | ImageField<string>;
232
225
  /**
233
226
  * An object of Imgix URL API parameters to transform the image.
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;;;AAqNA;AAIQ,KAJI,iBAAA,GAIJ;EAAa;;;EAsDe,KAAA,EAtD5B,UAsD4B,GAtDf,UAsDe,CAAA,MAAA,CAAA;EAAlB;;;;;EAcD,WAAA,CAAA,EA7DF,UA6DE,CAAA,OA7DgB,UA6DhB,CAAA,CAAA,CAAA,CAAA;EAiIX;;;;;;EA/IY,GAAA,CAAA,EAAA,EAAA;EAAZ;;;;;;;EAcA,WAAA,CAAA,EAAA,EAAA;EAAW;;;;;;EA7DF,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EA+CqB;;;;;;EA/CrB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CA8DS,GAAA,CAAA;EAAlB;;;;;;;AAgIY;;;WA/IZ,YAAY,kBAAkB;;;;;;;;;;kBAc9B,YACA,kBAAkB;;cAgIlB,oBAAY;;;;SArMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;oBADP,KAAA,CAAA,qBAAA;;;;SApET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;;cAgIN,iBAGU"}
1
+ {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;;;AAoNA;AAEQ,KAFI,iBAAA,GAEJ;EAAa;EAOY,KAAA,EAPzB,UAOyB,GAPZ,UAOY,CAAA,MAAA,CAAA;EAAlB;;;;;EA+DT,WAAA,CAAA,EA/DS,UA+DT,CAAA,OA/D2B,UA+D3B,CAAA,CAAA,CAAA,CAAA;EADA;;AAKL;;;;EAnEc,GAAA,CAAA,EAAA,EAAA;EAgDqB;;;;;;;EAeZ,WAAA,CAAA,EAAA,EAAA;EAAlB;;;;;;EAtEe,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAOY;;;;;;EAPZ,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CAOY,GAAA,CAAA;EAAlB;;;;;;;;;AA+LG;;WA/IZ,YAAY,kBAAkB;;;;;;;;;;kBAc9B,YACA,kBAAkB;;cAgIlB,oBAAY;;SAtMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8D3B,YACA,kBAAkB;oBADP,KAAA,CAAA,qBAAA;;SArET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8D3B,YACA,kBAAkB;;cAgIN,iBAGU"}
@@ -40,15 +40,11 @@ type PrismicLinkProps = {
40
40
  */
41
41
  externalComponent?: ComponentOrTagName;
42
42
  } & ({
43
- /**
44
- * The Prismic link field to render.
45
- */
43
+ /** The Prismic link field to render. */
46
44
  field: LinkField;
47
45
  document?: never;
48
46
  } | {
49
- /**
50
- * The Prismic document to render as a link.
51
- */
47
+ /** The Prismic document to render as a link. */
52
48
  document: PrismicDocument;
53
49
  field?: never;
54
50
  });
@@ -89,9 +85,7 @@ declare const __VLS_base: vue16.DefineComponent<({
89
85
  */
90
86
  externalComponent?: ComponentOrTagName;
91
87
  } & {
92
- /**
93
- * The Prismic link field to render.
94
- */
88
+ /** The Prismic link field to render. */
95
89
  field: LinkField;
96
90
  document?: never;
97
91
  }) | ({
@@ -127,9 +121,7 @@ declare const __VLS_base: vue16.DefineComponent<({
127
121
  */
128
122
  externalComponent?: ComponentOrTagName;
129
123
  } & {
130
- /**
131
- * The Prismic document to render as a link.
132
- */
124
+ /** The Prismic document to render as a link. */
133
125
  document: PrismicDocument;
134
126
  field?: never;
135
127
  }), {}, {}, {}, {}, vue16.ComponentOptionsMixin, vue16.ComponentOptionsMixin, {}, string, vue16.PublicProps, Readonly<({
@@ -165,9 +157,7 @@ declare const __VLS_base: vue16.DefineComponent<({
165
157
  */
166
158
  externalComponent?: ComponentOrTagName;
167
159
  } & {
168
- /**
169
- * The Prismic link field to render.
170
- */
160
+ /** The Prismic link field to render. */
171
161
  field: LinkField;
172
162
  document?: never;
173
163
  }) | ({
@@ -203,9 +193,7 @@ declare const __VLS_base: vue16.DefineComponent<({
203
193
  */
204
194
  externalComponent?: ComponentOrTagName;
205
195
  } & {
206
- /**
207
- * The Prismic document to render as a link.
208
- */
196
+ /** The Prismic document to render as a link. */
209
197
  document: PrismicDocument;
210
198
  field?: never;
211
199
  })> & Readonly<{}>, {}, {}, {}, {}, string, vue16.ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue.d.cts","names":[],"sources":["../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;;;AAkKA;AAUgB,KAVJ,gBAAA,GAUI;EAOA;;;;;;AAiCf;AA0EqB;AAEc;EApHpB,YAAA,CAAA,EAAA,oBAAA;EAOA;;;;;EAAA,GAAA,CAAA,EAAA,MAAA,GAAA,iBAAA,CAAA,KAAA,CAAA;EAUK;;;;;;;;EAAA,iBAAA,CAAA,EAAA,kBAAA;EAOA;;;;;EAAA,iBAAA,CAAA,EAAA,kBAAA;CAaR,GAAA,CAAA;;;;OAoFG,EA3FN,SA2FM;EAAA,QAAA,CAAA,EAAA,KAAA;AAAA,CAAA,GAGV;EAA4C;;;EAAR,QAAA,EAvF7B,eAuF6B;EAAA,KAAA,CAAA,EAAA,KACF;AAAxC,CAAA,CAAA;YAXI;KACC,WAAA;2BACwB;;cAKvB,kBAAU;;;;;;;;;;iBAzHA;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;;;SAMX;;;;;;;;;;;;iBA9BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;;;YAaR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;;iBArCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;;;SAMX;;;;;;;;;;;;iBA9BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;;;YAaR;;;cAuFP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
1
+ {"version":3,"file":"PrismicLink.vue.d.cts","names":[],"sources":["../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA8JA;AAUgB,KAVJ,gBAAA,GAUI;EAOA;;;;;;AA6Bf;AA0EqB;AAEc;EAhHpB,YAAA,CAAA,EAAA,oBAAA;EAOA;;;;;EAAA,GAAA,CAAA,EAAA,MAAA,GAAA,iBAAA,CAAA,KAAA,CAAA;EAUK;;;;;;;;EAAA,iBAAA,CAAA,EAAA,kBAAA;EAOA;;;;;EAAA,iBAAA,CAAA,EAAA,kBAAA;CASR,GAAA,CAAA;;SALH;;;EAyFM;EAGV,QAAA,EAvFO,eAuF6D;EAAxB,KAAA,CAAA,EAAA,KAAA;CAAY,CAAA;YAV1D,OAUuB,EAAA,CAAA,CAAA;KATtB,WAAA,GASqC,CAAA,CAAA,GAAA;EAAA,OAAA,CAAA,EAAA,CACF,KAAA,EAAA,OATX,OASD,EAAA,GAAY,GAAA;AAAxC,CAAA;cAJM,kBAAU;;;;;;;;;;iBArHA;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cAuFP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
@@ -1,6 +1,6 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
2
  import { VueRichTextSerializer } from "./types.cjs";
3
- import * as vue4 from "vue";
3
+ import * as vue0 from "vue";
4
4
  import { PropType } from "vue";
5
5
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
6
 
@@ -9,9 +9,7 @@ import { LinkResolverFunction, RichTextField } from "@prismicio/client";
9
9
  * Props for `<PrismicRichText />`.
10
10
  */
11
11
  type PrismicRichTextProps = {
12
- /**
13
- * The Prismic rich text field to render.
14
- */
12
+ /** The Prismic rich text field to render. */
15
13
  field: RichTextField | null | undefined;
16
14
  /**
17
15
  * The link resolver used to resolve links.
@@ -24,8 +22,7 @@ type PrismicRichTextProps = {
24
22
  */
25
23
  linkResolver?: LinkResolverFunction;
26
24
  /**
27
- * An object that maps a rich text block type to a Vue component or a
28
- * shorthand definition.
25
+ * An object that maps a rich text block type to a Vue component or a shorthand definition.
29
26
  *
30
27
  * @example
31
28
  *
@@ -44,7 +41,7 @@ type PrismicRichTextProps = {
44
41
  */
45
42
  fallback?: ComponentOrTagName;
46
43
  };
47
- declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
44
+ declare const __VLS_export: vue0.DefineComponent<vue0.ExtractPropTypes<{
48
45
  field: {
49
46
  type: PropType<PrismicRichTextProps["field"]>;
50
47
  };
@@ -57,7 +54,7 @@ declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
57
54
  fallback: {
58
55
  type: PropType<PrismicRichTextProps["fallback"]>;
59
56
  };
60
- }>, {}, {}, {}, {}, vue4.ComponentOptionsMixin, vue4.ComponentOptionsMixin, {}, string, vue4.PublicProps, Readonly<vue4.ExtractPropTypes<{
57
+ }>, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<vue0.ExtractPropTypes<{
61
58
  field: {
62
59
  type: PropType<PrismicRichTextProps["field"]>;
63
60
  };
@@ -70,7 +67,7 @@ declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
70
67
  fallback: {
71
68
  type: PropType<PrismicRichTextProps["fallback"]>;
72
69
  };
73
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue4.ComponentProvideOptions, true, {}, any>;
70
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, true, {}, any>;
74
71
  declare const _default: typeof __VLS_export;
75
72
  //#endregion
76
73
  export { PrismicRichTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AAgKY,KAAA,oBAAA,GAAoB;EAIxB;;;EAiCI,KAAA,EAjCJ,aAiCI,GAAA,IAAA,GAAA,SAAA;EAAkB;AAC7B;;;;;;;;EA2HqC,YAAA,CAAA,EAlJtB,oBAkJsB;EAAQ;;;;;;;;;;;;;;eAlIhC;;;;AAsHI;aAhHN;;cAgHN,mBAAY,gBAY4B,IAAA,CAZ5B;;UAGU,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;oBAbe,IAAA,CAAA,qBAAA,qEAY4B,IAAA,CAAA;;UATlB,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;;cAbe,iBAkBU"}
1
+ {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AA6JY,KAAA,oBAAA,GAAoB;EAExB;EAWQ,KAAA,EAXR,aAWQ,GAAA,IAAA,GAAA,SAAA;EAeF;;;AAOb;;;;;;EAwHiB,YAAA,CAAA,EA9IF,oBA8IE;EAIf;;;;;;;;;;;;;EADmC,UAAA,CAAA,EAlIxB,qBAkIwB;EAAQ;;;;UAZ5B,CAAA,EAhHN,kBAgHM;CAAA;AAAA,cAAZ,YAkBsB,OAlBV,eAkBsB,CANM,IAAA,CAZ5B,gBAkBsB,CAAA;;UAfZ,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;oBAbe,IAAA,CAAA,qBAAA,qEAY4B,IAAA,CAAA;;UATlB,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;;cAbe,iBAkBU"}
@@ -1,7 +1,7 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
2
  import { VueRichTextSerializer } from "../PrismicRichText/types.cjs";
3
3
  import { VueTableComponents } from "./types.cjs";
4
- import * as vue0 from "vue";
4
+ import * as vue6 from "vue";
5
5
  import { TableField } from "@prismicio/client";
6
6
 
7
7
  //#region src/PrismicTable/PrismicTable.vue.d.ts
@@ -9,13 +9,10 @@ import { TableField } from "@prismicio/client";
9
9
  * Props for `<PrismicTable />`.
10
10
  */
11
11
  type PrismicTableProps = {
12
- /**
13
- * The Prismic table field to render.
14
- */
12
+ /** The Prismic table field to render. */
15
13
  field: TableField | undefined;
16
14
  /**
17
- * An object that maps a table block type to a Vue component or a shorthand
18
- * definition.
15
+ * An object that maps a table block type to a Vue component or a shorthand definition.
19
16
  *
20
17
  * @example
21
18
  *
@@ -34,7 +31,7 @@ type PrismicTableProps = {
34
31
  */
35
32
  fallback?: ComponentOrTagName;
36
33
  };
37
- declare const __VLS_export: vue0.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
34
+ declare const __VLS_export: vue6.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue6.ComponentOptionsMixin, vue6.ComponentOptionsMixin, {}, string, vue6.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue6.ComponentProvideOptions, false, {}, any>;
38
35
  declare const _default: typeof __VLS_export;
39
36
  //#endregion
40
37
  export { PrismicTableProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue.d.cts","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AA+HY,KAAA,iBAAA,GAAiB;EAIrB;;;EAsBI,KAAA,EAtBJ,UAsBI,GAAA,SAAA;EAAkB;AAC7B;;;;;;;;;;;AAkJiB;;eAzJJ,qBAAqB;;;;;aAMvB;;cAmJN,cAAY,IAAA,CAAA,gBAAA,mCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,qBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicTable.vue.d.cts","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AA4HY,KAAA,iBAAA,GAAiB;EAErB;EAeM,KAAA,EAfN,UAeM,GAAA,SAAA;EAAqB;;;AAOlC;;;;;;;;;;EAkJiB,UAAA,CAAA,EAzJJ,kBAyJI,GAzJiB,qBAyJjB;EAAA;;;;aAnJN;;cAmJN,cAAY,IAAA,CAAA,gBAAA,mCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,qBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -6,9 +6,7 @@ import { RichTextField } from "@prismicio/client";
6
6
  * Props for `<PrismicText />`.
7
7
  */
8
8
  type PrismicTextProps = {
9
- /**
10
- * The Prismic rich text field to render.
11
- */
9
+ /** The Prismic rich text field to render. */
12
10
  field: RichTextField | null | undefined;
13
11
  /**
14
12
  * The string value to be rendered when the field is empty. If a fallback is
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;;;AA8DY,KAAA,gBAAA,GAAgB;EAuDtB;;;EAAY,KAAA,EAnDV,aAmDU,GAAA,IAAA,GAAA,SAAA;EAAA;;;;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA;;AAAA;;;;;cAAZ,cAAY,KAAA,CAAA,gBAAA,kCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;;;AA4DY,KAAA,gBAAA,GAAgB;EAqDtB;EAAY,KAAA,EAnDV,aAmDU,GAAA,IAAA,GAAA,SAAA;EAAA;;;;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA;;;;AAAA;;;cAAZ,cAAY,KAAA,CAAA,gBAAA,kCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -9,22 +9,16 @@ import * as vue26 from "vue";
9
9
  * @typeParam TContext - Arbitrary data made available to all Slice components
10
10
  */
11
11
  type SliceZoneProps<TContext = unknown> = {
12
- /**
13
- * List of slice data from the slice zone.
14
- */
12
+ /** List of slice data from the slice zone. */
15
13
  slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>;
16
- /**
17
- * A record mapping slice types to React components.
18
- */
14
+ /** A record mapping slice types to React components. */
19
15
  components?: SliceZoneComponents;
20
16
  /**
21
17
  * The Vue component rendered if a component mapping from the `components`
22
18
  * prop cannot be found.
23
19
  */
24
20
  defaultComponent?: SliceComponentType<any, TContext>;
25
- /**
26
- * Arbitrary data made available to all slice components.
27
- */
21
+ /** Arbitrary data made available to all slice components. */
28
22
  context?: TContext;
29
23
  };
30
24
  type __VLS_Props = SliceZoneProps;
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA4GA;;AAIoC,KAJxB,cAIwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;;;EAYJ,MAAA,EAZnC,aAYmC,CAZrB,SAYqB,GAAA,CAZR,SAYQ,GAZI,MAYJ,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAAxB;;;EAQf,UAAA,CAAA,EAfS,mBAeK;EAyEb;;;;EAAY,gBAAA,CAAA,EAjFE,kBAiFF,CAAA,GAAA,EAjF0B,QAiF1B,CAAA;EAAA;;;EAAA,OAAA,CAAA,EA5EP,QA4EO;CAAA;KAzEb,WAAA,GAAc,cAyED;AAAA,cAAZ,YAGkC,EAHtB,KAAA,CAAA,eAGsB,CAHtB,WAGsB,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAHtB,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAGsB,CAAA,CAAA,EAAA,MAAA,EAHtB,KAAA,CAAA,WAAA,EAAA,QAGsB,CAHtB,WAGsB,CAAA,GAHtB,QAGsB,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAHtB,KAAA,CAAA,uBAAA,EAGsB,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAHtB,iBAGU"}
1
+ {"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AAsGA;;AAEoC,KAFxB,cAEwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;EAAvC,MAAA,EAAA,aAAA,CAAc,SAAd,GAAA,CAA2B,SAA3B,GAAuC,MAAvC,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAGK;EAO8B,UAAA,CAAA,EAP9B,mBAO8B;EAAxB;;;AAInB;EA2EK,gBAEJ,CAAA,EAjFkB,kBAiFlB,CAAA,GAAA,EAjF0C,QAiF1C,CAAA;EAFgB;EAAA,OAAA,CAAA,EA5EP,QA4EO;CAAA;KAzEb,WAAA,GAAc,cAyED;cAAZ,YAAY,EAAA,KAAA,CAAA,eAAA,CAAA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,WAAA,EAAA,QAAA,CAAA,WAAA,CAAA,GAAA,QAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,uBAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAAA,QAAA,EAAA,OAGU,YAHV"}
package/dist/package.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region package.json
3
- var version = "5.3.0-canary.4c3e4ab";
3
+ var version = "5.3.0-canary.87748cc";
4
4
 
5
5
  //#endregion
6
6
  Object.defineProperty(exports, 'version', {
@@ -1 +1 @@
1
- {"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@prismicio/vue\",\n\t\"version\": \"5.3.0-canary.4c3e4ab\",\n\t\"description\": \"Vue plugin, components, and composables to fetch and present Prismic content\",\n\t\"keywords\": [\n\t\t\"typescript\",\n\t\t\"prismic\",\n\t\t\"vue\",\n\t\t\"plugin\"\n\t],\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"ssh://git@github.com/prismicio/prismic-vue.git\"\n\t},\n\t\"license\": \"Apache-2.0\",\n\t\"author\": \"Prismic <contact@prismic.io> (https://prismic.io)\",\n\t\"sideEffects\": false,\n\t\"type\": \"module\",\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"require\": \"./dist/index.cjs\",\n\t\t\t\"import\": \"./dist/index.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\"\n\t},\n\t\"main\": \"./dist/index.cjs\",\n\t\"module\": \"./dist/index.js\",\n\t\"types\": \"./dist/index.d.cts\",\n\t\"files\": [\n\t\t\"./dist\",\n\t\t\"./src\"\n\t],\n\t\"scripts\": {\n\t\t\"build\": \"tsdown\",\n\t\t\"dev\": \"tsdown --watch\",\n\t\t\"format\": \"prettier --write .\",\n\t\t\"playground:build\": \"vite build playground\",\n\t\t\"playground:dev\": \"vite playground\",\n\t\t\"prepare\": \"npm run build\",\n\t\t\"lint\": \"oxlint --deny-warnings\",\n\t\t\"types\": \"vue-tsc --noEmit\",\n\t\t\"unit\": \"vitest run --coverage\",\n\t\t\"unit:watch\": \"vitest watch\",\n\t\t\"test\": \"npm run lint && npm run types && npm run unit && npm run build\"\n\t},\n\t\"dependencies\": {\n\t\t\"esm-env\": \"^1.2.2\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@prismicio/client\": \"^7.21.0\",\n\t\t\"@prismicio/mock\": \"^0.7.1\",\n\t\t\"@trivago/prettier-plugin-sort-imports\": \"^6.0.0\",\n\t\t\"@types/jsdom-global\": \"^3.0.7\",\n\t\t\"@vitejs/plugin-vue\": \"^6.0.2\",\n\t\t\"@vitest/coverage-v8\": \"^4.0.15\",\n\t\t\"@vue/test-utils\": \"^2.4.6\",\n\t\t\"jsdom\": \"^27.3.0\",\n\t\t\"jsdom-global\": \"^3.0.2\",\n\t\t\"oxlint\": \"1.32.0\",\n\t\t\"prettier\": \"^3.7.4\",\n\t\t\"prettier-plugin-jsdoc\": \"^1.8.0\",\n\t\t\"tsdown\": \"0.17.2\",\n\t\t\"typescript\": \"^5.9.3\",\n\t\t\"vite\": \"^7.2.7\",\n\t\t\"vitest\": \"^4.0.15\",\n\t\t\"vue\": \"^3.5.25\",\n\t\t\"vue-router\": \"^4.6.3\",\n\t\t\"vue-tsc\": \"^3.1.8\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@prismicio/client\": \"^7\",\n\t\t\"vue\": \"^3\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t}\n}\n"],"mappings":";;cAEY"}
1
+ {"version":3,"file":"package.cjs","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@prismicio/vue\",\n\t\"version\": \"5.3.0-canary.87748cc\",\n\t\"description\": \"Vue plugin, components, and composables to fetch and present Prismic content\",\n\t\"keywords\": [\n\t\t\"typescript\",\n\t\t\"prismic\",\n\t\t\"vue\",\n\t\t\"plugin\"\n\t],\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"ssh://git@github.com/prismicio/prismic-vue.git\"\n\t},\n\t\"license\": \"Apache-2.0\",\n\t\"author\": \"Prismic <contact@prismic.io> (https://prismic.io)\",\n\t\"sideEffects\": false,\n\t\"type\": \"module\",\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"require\": \"./dist/index.cjs\",\n\t\t\t\"import\": \"./dist/index.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\"\n\t},\n\t\"main\": \"./dist/index.cjs\",\n\t\"module\": \"./dist/index.js\",\n\t\"types\": \"./dist/index.d.cts\",\n\t\"files\": [\n\t\t\"./dist\",\n\t\t\"./src\"\n\t],\n\t\"scripts\": {\n\t\t\"build\": \"tsdown\",\n\t\t\"dev\": \"tsdown --watch\",\n\t\t\"format\": \"prettier --write .\",\n\t\t\"playground:build\": \"vite build playground\",\n\t\t\"playground:dev\": \"vite playground\",\n\t\t\"prepare\": \"npm run build\",\n\t\t\"lint\": \"oxlint --deny-warnings\",\n\t\t\"types\": \"vue-tsc --noEmit\",\n\t\t\"unit\": \"vitest run --coverage\",\n\t\t\"unit:watch\": \"vitest watch\",\n\t\t\"test\": \"npm run lint && npm run types && npm run unit && npm run build\"\n\t},\n\t\"dependencies\": {\n\t\t\"esm-env\": \"^1.2.2\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@prismicio/client\": \"^7.21.0\",\n\t\t\"@prismicio/mock\": \"^0.7.1\",\n\t\t\"@trivago/prettier-plugin-sort-imports\": \"^6.0.0\",\n\t\t\"@types/jsdom-global\": \"^3.0.7\",\n\t\t\"@vitejs/plugin-vue\": \"^6.0.2\",\n\t\t\"@vitest/coverage-v8\": \"^4.0.15\",\n\t\t\"@vue/test-utils\": \"^2.4.6\",\n\t\t\"jsdom\": \"^27.3.0\",\n\t\t\"jsdom-global\": \"^3.0.2\",\n\t\t\"oxlint\": \"1.32.0\",\n\t\t\"prettier\": \"^3.7.4\",\n\t\t\"prettier-plugin-jsdoc\": \"^1.8.0\",\n\t\t\"tsdown\": \"0.17.2\",\n\t\t\"typescript\": \"^5.9.3\",\n\t\t\"vite\": \"^7.2.7\",\n\t\t\"vitest\": \"^4.0.15\",\n\t\t\"vue\": \"^3.5.25\",\n\t\t\"vue-router\": \"^4.6.3\",\n\t\t\"vue-tsc\": \"^3.1.8\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@prismicio/client\": \"^7\",\n\t\t\"vue\": \"^3\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t}\n}\n"],"mappings":";;cAEY"}
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "5.3.0-canary.4c3e4ab";
2
+ var version = "5.3.0-canary.87748cc";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1 +1 @@
1
- {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@prismicio/vue\",\n\t\"version\": \"5.3.0-canary.4c3e4ab\",\n\t\"description\": \"Vue plugin, components, and composables to fetch and present Prismic content\",\n\t\"keywords\": [\n\t\t\"typescript\",\n\t\t\"prismic\",\n\t\t\"vue\",\n\t\t\"plugin\"\n\t],\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"ssh://git@github.com/prismicio/prismic-vue.git\"\n\t},\n\t\"license\": \"Apache-2.0\",\n\t\"author\": \"Prismic <contact@prismic.io> (https://prismic.io)\",\n\t\"sideEffects\": false,\n\t\"type\": \"module\",\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"require\": \"./dist/index.cjs\",\n\t\t\t\"import\": \"./dist/index.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\"\n\t},\n\t\"main\": \"./dist/index.cjs\",\n\t\"module\": \"./dist/index.js\",\n\t\"types\": \"./dist/index.d.cts\",\n\t\"files\": [\n\t\t\"./dist\",\n\t\t\"./src\"\n\t],\n\t\"scripts\": {\n\t\t\"build\": \"tsdown\",\n\t\t\"dev\": \"tsdown --watch\",\n\t\t\"format\": \"prettier --write .\",\n\t\t\"playground:build\": \"vite build playground\",\n\t\t\"playground:dev\": \"vite playground\",\n\t\t\"prepare\": \"npm run build\",\n\t\t\"lint\": \"oxlint --deny-warnings\",\n\t\t\"types\": \"vue-tsc --noEmit\",\n\t\t\"unit\": \"vitest run --coverage\",\n\t\t\"unit:watch\": \"vitest watch\",\n\t\t\"test\": \"npm run lint && npm run types && npm run unit && npm run build\"\n\t},\n\t\"dependencies\": {\n\t\t\"esm-env\": \"^1.2.2\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@prismicio/client\": \"^7.21.0\",\n\t\t\"@prismicio/mock\": \"^0.7.1\",\n\t\t\"@trivago/prettier-plugin-sort-imports\": \"^6.0.0\",\n\t\t\"@types/jsdom-global\": \"^3.0.7\",\n\t\t\"@vitejs/plugin-vue\": \"^6.0.2\",\n\t\t\"@vitest/coverage-v8\": \"^4.0.15\",\n\t\t\"@vue/test-utils\": \"^2.4.6\",\n\t\t\"jsdom\": \"^27.3.0\",\n\t\t\"jsdom-global\": \"^3.0.2\",\n\t\t\"oxlint\": \"1.32.0\",\n\t\t\"prettier\": \"^3.7.4\",\n\t\t\"prettier-plugin-jsdoc\": \"^1.8.0\",\n\t\t\"tsdown\": \"0.17.2\",\n\t\t\"typescript\": \"^5.9.3\",\n\t\t\"vite\": \"^7.2.7\",\n\t\t\"vitest\": \"^4.0.15\",\n\t\t\"vue\": \"^3.5.25\",\n\t\t\"vue-router\": \"^4.6.3\",\n\t\t\"vue-tsc\": \"^3.1.8\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@prismicio/client\": \"^7\",\n\t\t\"vue\": \"^3\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t}\n}\n"],"mappings":";cAEY"}
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n\t\"name\": \"@prismicio/vue\",\n\t\"version\": \"5.3.0-canary.87748cc\",\n\t\"description\": \"Vue plugin, components, and composables to fetch and present Prismic content\",\n\t\"keywords\": [\n\t\t\"typescript\",\n\t\t\"prismic\",\n\t\t\"vue\",\n\t\t\"plugin\"\n\t],\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"ssh://git@github.com/prismicio/prismic-vue.git\"\n\t},\n\t\"license\": \"Apache-2.0\",\n\t\"author\": \"Prismic <contact@prismic.io> (https://prismic.io)\",\n\t\"sideEffects\": false,\n\t\"type\": \"module\",\n\t\"exports\": {\n\t\t\".\": {\n\t\t\t\"require\": \"./dist/index.cjs\",\n\t\t\t\"import\": \"./dist/index.js\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\"\n\t},\n\t\"main\": \"./dist/index.cjs\",\n\t\"module\": \"./dist/index.js\",\n\t\"types\": \"./dist/index.d.cts\",\n\t\"files\": [\n\t\t\"./dist\",\n\t\t\"./src\"\n\t],\n\t\"scripts\": {\n\t\t\"build\": \"tsdown\",\n\t\t\"dev\": \"tsdown --watch\",\n\t\t\"format\": \"prettier --write .\",\n\t\t\"playground:build\": \"vite build playground\",\n\t\t\"playground:dev\": \"vite playground\",\n\t\t\"prepare\": \"npm run build\",\n\t\t\"lint\": \"oxlint --deny-warnings\",\n\t\t\"types\": \"vue-tsc --noEmit\",\n\t\t\"unit\": \"vitest run --coverage\",\n\t\t\"unit:watch\": \"vitest watch\",\n\t\t\"test\": \"npm run lint && npm run types && npm run unit && npm run build\"\n\t},\n\t\"dependencies\": {\n\t\t\"esm-env\": \"^1.2.2\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@prismicio/client\": \"^7.21.0\",\n\t\t\"@prismicio/mock\": \"^0.7.1\",\n\t\t\"@trivago/prettier-plugin-sort-imports\": \"^6.0.0\",\n\t\t\"@types/jsdom-global\": \"^3.0.7\",\n\t\t\"@vitejs/plugin-vue\": \"^6.0.2\",\n\t\t\"@vitest/coverage-v8\": \"^4.0.15\",\n\t\t\"@vue/test-utils\": \"^2.4.6\",\n\t\t\"jsdom\": \"^27.3.0\",\n\t\t\"jsdom-global\": \"^3.0.2\",\n\t\t\"oxlint\": \"1.32.0\",\n\t\t\"prettier\": \"^3.7.4\",\n\t\t\"prettier-plugin-jsdoc\": \"^1.8.0\",\n\t\t\"tsdown\": \"0.17.2\",\n\t\t\"typescript\": \"^5.9.3\",\n\t\t\"vite\": \"^7.2.7\",\n\t\t\"vitest\": \"^4.0.15\",\n\t\t\"vue\": \"^3.5.25\",\n\t\t\"vue-router\": \"^4.6.3\",\n\t\t\"vue-tsc\": \"^3.1.8\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@prismicio/client\": \"^7\",\n\t\t\"vue\": \"^3\"\n\t},\n\t\"engines\": {\n\t\t\"node\": \">=20\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\"\n\t}\n}\n"],"mappings":";cAEY"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.cjs","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ImageField, asImageSrc } from \"@prismicio/client\"\nimport {\n\tasImagePixelDensitySrcSet,\n\tasImageWidthSrcSet,\n\tisFilled,\n} from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { computed, watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicImage />`.\n */\nexport type PrismicImageProps = {\n\t/**\n\t * The Prismic image field or thumbnail to render.\n\t */\n\tfield: ImageField | ImageField<string>\n\n\t/**\n\t * An object of Imgix URL API parameters to transform the image.\n\t *\n\t * See: https://docs.imgix.com/apis/rendering\n\t */\n\timgixParams?: Parameters<typeof asImageSrc>[1]\n\n\t/**\n\t * Declare an image as decorative by providing `alt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\talt?: \"\"\n\n\t/**\n\t * Declare an image as decorative only if the image field does not have\n\t * alternative text by providing `fallbackAlt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\tfallbackAlt?: \"\"\n\n\t/**\n\t * The width attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width\n\t */\n\twidth?: number | string\n\n\t/**\n\t * The height attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height\n\t */\n\theight?: number | string\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Widths (in pixels) used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If omitted or set to `\"defaults\"`, the following widths will be used:\n\t\t\t * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.\n\t\t\t *\n\t\t\t * If the image field contains responsive views, each responsive view can\n\t\t\t * be used as a width in the resulting `srcset` by passing `\"thumbnails\"`\n\t\t\t * as the `widths` prop.\n\t\t\t */\n\t\t\twidths?:\n\t\t\t\t| NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>[\"widths\"]\n\t\t\t\t| \"thumbnails\"\n\t\t\t\t| \"defaults\"\n\t\t\tpixelDensities?: never\n\t }\n\t| {\n\t\t\twidths?: never\n\t\t\t/**\n\t\t\t * Pixel densities used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If a `pixelDensities` prop is passed `\"defaults\"`, the following pixel\n\t\t\t * densities will be used: 1, 2, 3.\n\t\t\t */\n\t\t\tpixelDensities:\n\t\t\t\t| NonNullable<\n\t\t\t\t\t\tParameters<typeof asImagePixelDensitySrcSet>[1]\n\t\t\t\t >[\"pixelDensities\"]\n\t\t\t\t| \"defaults\"\n\t }\n)\n\nconst props = defineProps<PrismicImageProps>()\ndefineOptions({ name: \"PrismicImage\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.alt === \"string\" && props.alt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"alt\" prop can only be used to declare an image as decorative by passing an empty string (alt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"alt\" prop or changing it to alt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (typeof props.fallbackAlt === \"string\" && props.fallbackAlt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"fallbackAlt\" prop can only be used to declare an image as decorative by passing an empty string (fallbackAlt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"fallbackAlt\" prop or changing it to fallbackAlt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (props.widths && props.pixelDensities) {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] Only one of \"widths\" or \"pixelDensities\" props can be provided. You can resolve this warning by removing either the \"widths\" or \"pixelDensities\" prop. \"widths\" will be used in this case.`,\n\t\t\t)\n\t\t}\n\t})\n}\n\nconst castInt = (input: string | number | undefined): number | undefined => {\n\tif (typeof input === \"number\" || typeof input === \"undefined\") {\n\t\treturn input\n\t} else {\n\t\tconst parsed = Number.parseInt(input)\n\n\t\tif (Number.isNaN(parsed)) {\n\t\t\treturn undefined\n\t\t} else {\n\t\t\treturn parsed\n\t\t}\n\t}\n}\n\nconst image = computed(() => {\n\tif (!isFilled.imageThumbnail(props.field)) {\n\t\treturn\n\t}\n\n\tlet src: string | undefined\n\tlet srcSet: string | undefined\n\tif (props.widths || !props.pixelDensities) {\n\t\tconst res = asImageWidthSrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\twidths: props.widths === \"defaults\" ? undefined : props.widths,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t} else if (props.pixelDensities) {\n\t\tconst res = asImagePixelDensitySrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\tpixelDensities:\n\t\t\t\tprops.pixelDensities === \"defaults\" ? undefined : props.pixelDensities,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t}\n\n\tconst ar = props.field.dimensions.width / props.field.dimensions.height\n\n\tconst castedWidth = castInt(props.width)\n\tconst castedHeight = castInt(props.height)\n\n\tlet resolvedWidth = castedWidth ?? props.field.dimensions.width\n\tlet resolvedHeight = castedHeight ?? props.field.dimensions.height\n\n\tif (castedWidth != null && castedHeight == null) {\n\t\tresolvedHeight = castedWidth / ar\n\t} else if (castedWidth == null && castedHeight != null) {\n\t\tresolvedWidth = castedHeight * ar\n\t}\n\n\treturn {\n\t\tsrc,\n\t\tsrcSet,\n\t\talt: props.alt ?? (props.field.alt || props.fallbackAlt),\n\t\twidth: Math.round(resolvedWidth),\n\t\theight: Math.round(resolvedHeight),\n\t}\n})\n</script>\n\n<template>\n\t<img\n\t\tv-if=\"image\"\n\t\t:src=\"image.src\"\n\t\t:srcset=\"image.srcSet\"\n\t\t:alt=\"image.alt\"\n\t\t:width=\"image.width\"\n\t\t:height=\"image.height\"\n\t/>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicImage.cjs","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ImageField, asImageSrc } from \"@prismicio/client\"\nimport {\n\tasImagePixelDensitySrcSet,\n\tasImageWidthSrcSet,\n\tisFilled,\n} from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { computed, watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicImage />`.\n */\nexport type PrismicImageProps = {\n\t/** The Prismic image field or thumbnail to render. */\n\tfield: ImageField | ImageField<string>\n\n\t/**\n\t * An object of Imgix URL API parameters to transform the image.\n\t *\n\t * See: https://docs.imgix.com/apis/rendering\n\t */\n\timgixParams?: Parameters<typeof asImageSrc>[1]\n\n\t/**\n\t * Declare an image as decorative by providing `alt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\talt?: \"\"\n\n\t/**\n\t * Declare an image as decorative only if the image field does not have\n\t * alternative text by providing `fallbackAlt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\tfallbackAlt?: \"\"\n\n\t/**\n\t * The width attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width\n\t */\n\twidth?: number | string\n\n\t/**\n\t * The height attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height\n\t */\n\theight?: number | string\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Widths (in pixels) used to build a `srcset` value for the image\n\t\t\t * field.\n\t\t\t *\n\t\t\t * If omitted or set to `\"defaults\"`, the following widths will be used:\n\t\t\t * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.\n\t\t\t *\n\t\t\t * If the image field contains responsive views, each responsive view\n\t\t\t * can be used as a width in the resulting `srcset` by passing\n\t\t\t * `\"thumbnails\"` as the `widths` prop.\n\t\t\t */\n\t\t\twidths?:\n\t\t\t\t| NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>[\"widths\"]\n\t\t\t\t| \"thumbnails\"\n\t\t\t\t| \"defaults\"\n\t\t\tpixelDensities?: never\n\t }\n\t| {\n\t\t\twidths?: never\n\t\t\t/**\n\t\t\t * Pixel densities used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If a `pixelDensities` prop is passed `\"defaults\"`, the following pixel\n\t\t\t * densities will be used: 1, 2, 3.\n\t\t\t */\n\t\t\tpixelDensities:\n\t\t\t\t| NonNullable<\n\t\t\t\t\t\tParameters<typeof asImagePixelDensitySrcSet>[1]\n\t\t\t\t >[\"pixelDensities\"]\n\t\t\t\t| \"defaults\"\n\t }\n)\n\nconst props = defineProps<PrismicImageProps>()\ndefineOptions({ name: \"PrismicImage\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.alt === \"string\" && props.alt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"alt\" prop can only be used to declare an image as decorative by passing an empty string (alt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"alt\" prop or changing it to alt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (typeof props.fallbackAlt === \"string\" && props.fallbackAlt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"fallbackAlt\" prop can only be used to declare an image as decorative by passing an empty string (fallbackAlt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"fallbackAlt\" prop or changing it to fallbackAlt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (props.widths && props.pixelDensities) {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] Only one of \"widths\" or \"pixelDensities\" props can be provided. You can resolve this warning by removing either the \"widths\" or \"pixelDensities\" prop. \"widths\" will be used in this case.`,\n\t\t\t)\n\t\t}\n\t})\n}\n\nconst castInt = (input: string | number | undefined): number | undefined => {\n\tif (typeof input === \"number\" || typeof input === \"undefined\") {\n\t\treturn input\n\t} else {\n\t\tconst parsed = Number.parseInt(input)\n\n\t\tif (Number.isNaN(parsed)) {\n\t\t\treturn undefined\n\t\t} else {\n\t\t\treturn parsed\n\t\t}\n\t}\n}\n\nconst image = computed(() => {\n\tif (!isFilled.imageThumbnail(props.field)) {\n\t\treturn\n\t}\n\n\tlet src: string | undefined\n\tlet srcSet: string | undefined\n\tif (props.widths || !props.pixelDensities) {\n\t\tconst res = asImageWidthSrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\twidths: props.widths === \"defaults\" ? undefined : props.widths,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t} else if (props.pixelDensities) {\n\t\tconst res = asImagePixelDensitySrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\tpixelDensities:\n\t\t\t\tprops.pixelDensities === \"defaults\" ? undefined : props.pixelDensities,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t}\n\n\tconst ar = props.field.dimensions.width / props.field.dimensions.height\n\n\tconst castedWidth = castInt(props.width)\n\tconst castedHeight = castInt(props.height)\n\n\tlet resolvedWidth = castedWidth ?? props.field.dimensions.width\n\tlet resolvedHeight = castedHeight ?? props.field.dimensions.height\n\n\tif (castedWidth != null && castedHeight == null) {\n\t\tresolvedHeight = castedWidth / ar\n\t} else if (castedWidth == null && castedHeight != null) {\n\t\tresolvedWidth = castedHeight * ar\n\t}\n\n\treturn {\n\t\tsrc,\n\t\tsrcSet,\n\t\talt: props.alt ?? (props.field.alt || props.fallbackAlt),\n\t\twidth: Math.round(resolvedWidth),\n\t\theight: Math.round(resolvedHeight),\n\t}\n})\n</script>\n\n<template>\n\t<img\n\t\tv-if=\"image\"\n\t\t:src=\"image.src\"\n\t\t:srcset=\"image.srcSet\"\n\t\t:alt=\"image.alt\"\n\t\t:width=\"image.width\"\n\t\t:height=\"image.height\"\n\t/>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.js","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ImageField, asImageSrc } from \"@prismicio/client\"\nimport {\n\tasImagePixelDensitySrcSet,\n\tasImageWidthSrcSet,\n\tisFilled,\n} from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { computed, watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicImage />`.\n */\nexport type PrismicImageProps = {\n\t/**\n\t * The Prismic image field or thumbnail to render.\n\t */\n\tfield: ImageField | ImageField<string>\n\n\t/**\n\t * An object of Imgix URL API parameters to transform the image.\n\t *\n\t * See: https://docs.imgix.com/apis/rendering\n\t */\n\timgixParams?: Parameters<typeof asImageSrc>[1]\n\n\t/**\n\t * Declare an image as decorative by providing `alt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\talt?: \"\"\n\n\t/**\n\t * Declare an image as decorative only if the image field does not have\n\t * alternative text by providing `fallbackAlt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\tfallbackAlt?: \"\"\n\n\t/**\n\t * The width attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width\n\t */\n\twidth?: number | string\n\n\t/**\n\t * The height attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height\n\t */\n\theight?: number | string\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Widths (in pixels) used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If omitted or set to `\"defaults\"`, the following widths will be used:\n\t\t\t * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.\n\t\t\t *\n\t\t\t * If the image field contains responsive views, each responsive view can\n\t\t\t * be used as a width in the resulting `srcset` by passing `\"thumbnails\"`\n\t\t\t * as the `widths` prop.\n\t\t\t */\n\t\t\twidths?:\n\t\t\t\t| NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>[\"widths\"]\n\t\t\t\t| \"thumbnails\"\n\t\t\t\t| \"defaults\"\n\t\t\tpixelDensities?: never\n\t }\n\t| {\n\t\t\twidths?: never\n\t\t\t/**\n\t\t\t * Pixel densities used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If a `pixelDensities` prop is passed `\"defaults\"`, the following pixel\n\t\t\t * densities will be used: 1, 2, 3.\n\t\t\t */\n\t\t\tpixelDensities:\n\t\t\t\t| NonNullable<\n\t\t\t\t\t\tParameters<typeof asImagePixelDensitySrcSet>[1]\n\t\t\t\t >[\"pixelDensities\"]\n\t\t\t\t| \"defaults\"\n\t }\n)\n\nconst props = defineProps<PrismicImageProps>()\ndefineOptions({ name: \"PrismicImage\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.alt === \"string\" && props.alt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"alt\" prop can only be used to declare an image as decorative by passing an empty string (alt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"alt\" prop or changing it to alt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (typeof props.fallbackAlt === \"string\" && props.fallbackAlt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"fallbackAlt\" prop can only be used to declare an image as decorative by passing an empty string (fallbackAlt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"fallbackAlt\" prop or changing it to fallbackAlt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (props.widths && props.pixelDensities) {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] Only one of \"widths\" or \"pixelDensities\" props can be provided. You can resolve this warning by removing either the \"widths\" or \"pixelDensities\" prop. \"widths\" will be used in this case.`,\n\t\t\t)\n\t\t}\n\t})\n}\n\nconst castInt = (input: string | number | undefined): number | undefined => {\n\tif (typeof input === \"number\" || typeof input === \"undefined\") {\n\t\treturn input\n\t} else {\n\t\tconst parsed = Number.parseInt(input)\n\n\t\tif (Number.isNaN(parsed)) {\n\t\t\treturn undefined\n\t\t} else {\n\t\t\treturn parsed\n\t\t}\n\t}\n}\n\nconst image = computed(() => {\n\tif (!isFilled.imageThumbnail(props.field)) {\n\t\treturn\n\t}\n\n\tlet src: string | undefined\n\tlet srcSet: string | undefined\n\tif (props.widths || !props.pixelDensities) {\n\t\tconst res = asImageWidthSrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\twidths: props.widths === \"defaults\" ? undefined : props.widths,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t} else if (props.pixelDensities) {\n\t\tconst res = asImagePixelDensitySrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\tpixelDensities:\n\t\t\t\tprops.pixelDensities === \"defaults\" ? undefined : props.pixelDensities,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t}\n\n\tconst ar = props.field.dimensions.width / props.field.dimensions.height\n\n\tconst castedWidth = castInt(props.width)\n\tconst castedHeight = castInt(props.height)\n\n\tlet resolvedWidth = castedWidth ?? props.field.dimensions.width\n\tlet resolvedHeight = castedHeight ?? props.field.dimensions.height\n\n\tif (castedWidth != null && castedHeight == null) {\n\t\tresolvedHeight = castedWidth / ar\n\t} else if (castedWidth == null && castedHeight != null) {\n\t\tresolvedWidth = castedHeight * ar\n\t}\n\n\treturn {\n\t\tsrc,\n\t\tsrcSet,\n\t\talt: props.alt ?? (props.field.alt || props.fallbackAlt),\n\t\twidth: Math.round(resolvedWidth),\n\t\theight: Math.round(resolvedHeight),\n\t}\n})\n</script>\n\n<template>\n\t<img\n\t\tv-if=\"image\"\n\t\t:src=\"image.src\"\n\t\t:srcset=\"image.srcSet\"\n\t\t:alt=\"image.alt\"\n\t\t:width=\"image.width\"\n\t\t:height=\"image.height\"\n\t/>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicImage.js","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ImageField, asImageSrc } from \"@prismicio/client\"\nimport {\n\tasImagePixelDensitySrcSet,\n\tasImageWidthSrcSet,\n\tisFilled,\n} from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { computed, watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicImage />`.\n */\nexport type PrismicImageProps = {\n\t/** The Prismic image field or thumbnail to render. */\n\tfield: ImageField | ImageField<string>\n\n\t/**\n\t * An object of Imgix URL API parameters to transform the image.\n\t *\n\t * See: https://docs.imgix.com/apis/rendering\n\t */\n\timgixParams?: Parameters<typeof asImageSrc>[1]\n\n\t/**\n\t * Declare an image as decorative by providing `alt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\talt?: \"\"\n\n\t/**\n\t * Declare an image as decorative only if the image field does not have\n\t * alternative text by providing `fallbackAlt=\"\"`.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images\n\t */\n\tfallbackAlt?: \"\"\n\n\t/**\n\t * The width attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width\n\t */\n\twidth?: number | string\n\n\t/**\n\t * The height attribute of the image element.\n\t *\n\t * See:\n\t * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height\n\t */\n\theight?: number | string\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Widths (in pixels) used to build a `srcset` value for the image\n\t\t\t * field.\n\t\t\t *\n\t\t\t * If omitted or set to `\"defaults\"`, the following widths will be used:\n\t\t\t * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.\n\t\t\t *\n\t\t\t * If the image field contains responsive views, each responsive view\n\t\t\t * can be used as a width in the resulting `srcset` by passing\n\t\t\t * `\"thumbnails\"` as the `widths` prop.\n\t\t\t */\n\t\t\twidths?:\n\t\t\t\t| NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>[\"widths\"]\n\t\t\t\t| \"thumbnails\"\n\t\t\t\t| \"defaults\"\n\t\t\tpixelDensities?: never\n\t }\n\t| {\n\t\t\twidths?: never\n\t\t\t/**\n\t\t\t * Pixel densities used to build a `srcset` value for the image field.\n\t\t\t *\n\t\t\t * If a `pixelDensities` prop is passed `\"defaults\"`, the following pixel\n\t\t\t * densities will be used: 1, 2, 3.\n\t\t\t */\n\t\t\tpixelDensities:\n\t\t\t\t| NonNullable<\n\t\t\t\t\t\tParameters<typeof asImagePixelDensitySrcSet>[1]\n\t\t\t\t >[\"pixelDensities\"]\n\t\t\t\t| \"defaults\"\n\t }\n)\n\nconst props = defineProps<PrismicImageProps>()\ndefineOptions({ name: \"PrismicImage\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.alt === \"string\" && props.alt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"alt\" prop can only be used to declare an image as decorative by passing an empty string (alt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"alt\" prop or changing it to alt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (typeof props.fallbackAlt === \"string\" && props.fallbackAlt !== \"\") {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] The \"fallbackAlt\" prop can only be used to declare an image as decorative by passing an empty string (fallbackAlt=\"\") but was provided a non-empty string. You can resolve this warning by removing the \"fallbackAlt\" prop or changing it to fallbackAlt=\"\". For more details, see ${devMsg(\n\t\t\t\t\t\"alt-must-be-an-empty-string\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\n\t\tif (props.widths && props.pixelDensities) {\n\t\t\tconsole.warn(\n\t\t\t\t`[PrismicImage] Only one of \"widths\" or \"pixelDensities\" props can be provided. You can resolve this warning by removing either the \"widths\" or \"pixelDensities\" prop. \"widths\" will be used in this case.`,\n\t\t\t)\n\t\t}\n\t})\n}\n\nconst castInt = (input: string | number | undefined): number | undefined => {\n\tif (typeof input === \"number\" || typeof input === \"undefined\") {\n\t\treturn input\n\t} else {\n\t\tconst parsed = Number.parseInt(input)\n\n\t\tif (Number.isNaN(parsed)) {\n\t\t\treturn undefined\n\t\t} else {\n\t\t\treturn parsed\n\t\t}\n\t}\n}\n\nconst image = computed(() => {\n\tif (!isFilled.imageThumbnail(props.field)) {\n\t\treturn\n\t}\n\n\tlet src: string | undefined\n\tlet srcSet: string | undefined\n\tif (props.widths || !props.pixelDensities) {\n\t\tconst res = asImageWidthSrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\twidths: props.widths === \"defaults\" ? undefined : props.widths,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t} else if (props.pixelDensities) {\n\t\tconst res = asImagePixelDensitySrcSet(props.field, {\n\t\t\t...props.imgixParams,\n\t\t\tpixelDensities:\n\t\t\t\tprops.pixelDensities === \"defaults\" ? undefined : props.pixelDensities,\n\t\t})\n\n\t\tsrc = res.src\n\t\tsrcSet = res.srcset\n\t}\n\n\tconst ar = props.field.dimensions.width / props.field.dimensions.height\n\n\tconst castedWidth = castInt(props.width)\n\tconst castedHeight = castInt(props.height)\n\n\tlet resolvedWidth = castedWidth ?? props.field.dimensions.width\n\tlet resolvedHeight = castedHeight ?? props.field.dimensions.height\n\n\tif (castedWidth != null && castedHeight == null) {\n\t\tresolvedHeight = castedWidth / ar\n\t} else if (castedWidth == null && castedHeight != null) {\n\t\tresolvedWidth = castedHeight * ar\n\t}\n\n\treturn {\n\t\tsrc,\n\t\tsrcSet,\n\t\talt: props.alt ?? (props.field.alt || props.fallbackAlt),\n\t\twidth: Math.round(resolvedWidth),\n\t\theight: Math.round(resolvedHeight),\n\t}\n})\n</script>\n\n<template>\n\t<img\n\t\tv-if=\"image\"\n\t\t:src=\"image.src\"\n\t\t:srcset=\"image.srcSet\"\n\t\t:alt=\"image.alt\"\n\t\t:width=\"image.width\"\n\t\t:height=\"image.height\"\n\t/>\n</template>\n"],"mappings":""}
@@ -7,9 +7,7 @@ import { ImageField, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet }
7
7
  * Props for `<PrismicImage />`.
8
8
  */
9
9
  type PrismicImageProps = {
10
- /**
11
- * The Prismic image field or thumbnail to render.
12
- */
10
+ /** The Prismic image field or thumbnail to render. */
13
11
  field: ImageField | ImageField<string>;
14
12
  /**
15
13
  * An object of Imgix URL API parameters to transform the image.
@@ -48,14 +46,15 @@ type PrismicImageProps = {
48
46
  height?: number | string;
49
47
  } & ({
50
48
  /**
51
- * Widths (in pixels) used to build a `srcset` value for the image field.
49
+ * Widths (in pixels) used to build a `srcset` value for the image
50
+ * field.
52
51
  *
53
52
  * If omitted or set to `"defaults"`, the following widths will be used:
54
53
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
55
54
  *
56
- * If the image field contains responsive views, each responsive view can
57
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
58
- * as the `widths` prop.
55
+ * If the image field contains responsive views, each responsive view
56
+ * can be used as a width in the resulting `srcset` by passing
57
+ * `"thumbnails"` as the `widths` prop.
59
58
  */
60
59
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
61
60
  pixelDensities?: never;
@@ -70,9 +69,7 @@ type PrismicImageProps = {
70
69
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
71
70
  });
72
71
  declare const __VLS_export: vue11.DefineComponent<({
73
- /**
74
- * The Prismic image field or thumbnail to render.
75
- */
72
+ /** The Prismic image field or thumbnail to render. */
76
73
  field: ImageField | ImageField<string>;
77
74
  /**
78
75
  * An object of Imgix URL API parameters to transform the image.
@@ -111,21 +108,20 @@ declare const __VLS_export: vue11.DefineComponent<({
111
108
  height?: number | string;
112
109
  } & {
113
110
  /**
114
- * Widths (in pixels) used to build a `srcset` value for the image field.
111
+ * Widths (in pixels) used to build a `srcset` value for the image
112
+ * field.
115
113
  *
116
114
  * If omitted or set to `"defaults"`, the following widths will be used:
117
115
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
118
116
  *
119
- * If the image field contains responsive views, each responsive view can
120
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
121
- * as the `widths` prop.
117
+ * If the image field contains responsive views, each responsive view
118
+ * can be used as a width in the resulting `srcset` by passing
119
+ * `"thumbnails"` as the `widths` prop.
122
120
  */
123
121
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
124
122
  pixelDensities?: never;
125
123
  }) | ({
126
- /**
127
- * The Prismic image field or thumbnail to render.
128
- */
124
+ /** The Prismic image field or thumbnail to render. */
129
125
  field: ImageField | ImageField<string>;
130
126
  /**
131
127
  * An object of Imgix URL API parameters to transform the image.
@@ -172,9 +168,7 @@ declare const __VLS_export: vue11.DefineComponent<({
172
168
  */
173
169
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
174
170
  }), {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<({
175
- /**
176
- * The Prismic image field or thumbnail to render.
177
- */
171
+ /** The Prismic image field or thumbnail to render. */
178
172
  field: ImageField | ImageField<string>;
179
173
  /**
180
174
  * An object of Imgix URL API parameters to transform the image.
@@ -213,21 +207,20 @@ declare const __VLS_export: vue11.DefineComponent<({
213
207
  height?: number | string;
214
208
  } & {
215
209
  /**
216
- * Widths (in pixels) used to build a `srcset` value for the image field.
210
+ * Widths (in pixels) used to build a `srcset` value for the image
211
+ * field.
217
212
  *
218
213
  * If omitted or set to `"defaults"`, the following widths will be used:
219
214
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
220
215
  *
221
- * If the image field contains responsive views, each responsive view can
222
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
223
- * as the `widths` prop.
216
+ * If the image field contains responsive views, each responsive view
217
+ * can be used as a width in the resulting `srcset` by passing
218
+ * `"thumbnails"` as the `widths` prop.
224
219
  */
225
220
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
226
221
  pixelDensities?: never;
227
222
  }) | ({
228
- /**
229
- * The Prismic image field or thumbnail to render.
230
- */
223
+ /** The Prismic image field or thumbnail to render. */
231
224
  field: ImageField | ImageField<string>;
232
225
  /**
233
226
  * An object of Imgix URL API parameters to transform the image.
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.vue.d.ts","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;;;AAqNA;AAIQ,KAJI,iBAAA,GAIJ;EAAa;;;EAsDe,KAAA,EAtD5B,UAsD4B,GAtDf,UAsDe,CAAA,MAAA,CAAA;EAAlB;;;;;EAcD,WAAA,CAAA,EA7DF,UA6DE,CAAA,OA7DgB,UA6DhB,CAAA,CAAA,CAAA,CAAA;EAiIX;;;;;;EA/IY,GAAA,CAAA,EAAA,EAAA;EAAZ;;;;;;;EAcA,WAAA,CAAA,EAAA,EAAA;EAAW;;;;;;EA7DF,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EA+CqB;;;;;;EA/CrB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CA8DS,GAAA,CAAA;EAAlB;;;;;;;AAgIY;;;WA/IZ,YAAY,kBAAkB;;;;;;;;;;kBAc9B,YACA,kBAAkB;;cAgIlB,oBAAY;;;;SArMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;oBADP,KAAA,CAAA,qBAAA;;;;SApET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;;cAgIN,iBAGU"}
1
+ {"version":3,"file":"PrismicImage.vue.d.ts","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;;;AAoNA;AAEQ,KAFI,iBAAA,GAEJ;EAAa;EAOY,KAAA,EAPzB,UAOyB,GAPZ,UAOY,CAAA,MAAA,CAAA;EAAlB;;;;;EA+DT,WAAA,CAAA,EA/DS,UA+DT,CAAA,OA/D2B,UA+D3B,CAAA,CAAA,CAAA,CAAA;EADA;;AAKL;;;;EAnEc,GAAA,CAAA,EAAA,EAAA;EAgDqB;;;;;;;EAeZ,WAAA,CAAA,EAAA,EAAA;EAAlB;;;;;;EAtEe,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAOY;;;;;;EAPZ,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CAOY,GAAA,CAAA;EAAlB;;;;;;;;;AA+LG;;WA/IZ,YAAY,kBAAkB;;;;;;;;;;kBAc9B,YACA,kBAAkB;;cAgIlB,oBAAY;;SAtMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8D3B,YACA,kBAAkB;oBADP,KAAA,CAAA,qBAAA;;SArET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8D3B,YACA,kBAAkB;;cAgIN,iBAGU"}