@prismicio/vue 5.3.0-pr.88.ee9acb6 → 5.3.0-pr.89.d0f4ac2

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 (134) hide show
  1. package/dist/PrismicImage.vue.d.cts +15 -49
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +57 -52
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +14 -14
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicRichText/types.d.cts +25 -26
  8. package/dist/PrismicRichText/types.d.cts.map +1 -1
  9. package/dist/PrismicTable/PrismicTable.vue.d.cts +8 -9
  10. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  11. package/dist/PrismicTable/types.d.cts +7 -8
  12. package/dist/PrismicTable/types.d.cts.map +1 -1
  13. package/dist/PrismicText.vue.d.cts +2 -6
  14. package/dist/PrismicText.vue.d.cts.map +1 -1
  15. package/dist/SliceZone/SliceZone.vue.d.cts +3 -14
  16. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  17. package/dist/SliceZone/types.d.cts +3 -9
  18. package/dist/SliceZone/types.d.cts.map +1 -1
  19. package/dist/createPrismic.d.cts +61 -0
  20. package/dist/createPrismic.d.cts.map +1 -0
  21. package/dist/index.cjs +4 -1
  22. package/dist/index.d.cts +4 -2
  23. package/dist/index.d.ts +4 -2
  24. package/dist/index.js +2 -1
  25. package/dist/package.cjs +1 -1
  26. package/dist/package.cjs.map +1 -1
  27. package/dist/package.js +1 -1
  28. package/dist/package.js.map +1 -1
  29. package/dist/src/PrismicImage.cjs.map +1 -1
  30. package/dist/src/PrismicImage.js.map +1 -1
  31. package/dist/src/PrismicImage.vue.d.ts +15 -49
  32. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  33. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  34. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/src/PrismicLink.cjs.map +1 -1
  36. package/dist/src/PrismicLink.js.map +1 -1
  37. package/dist/src/PrismicLink.vue.d.ts +57 -52
  38. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  39. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +6 -10
  40. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  41. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js +6 -10
  42. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  43. package/dist/src/PrismicRichText/PrismicRichText.cjs.map +1 -1
  44. package/dist/src/PrismicRichText/PrismicRichText.js.map +1 -1
  45. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +18 -18
  46. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  47. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +11 -5
  48. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  49. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +11 -5
  50. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  51. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -1
  52. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -1
  53. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +2 -2
  54. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  55. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +2 -2
  56. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  57. package/dist/src/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -1
  58. package/dist/src/PrismicRichText/PrismicRichTextSerialize.js.map +1 -1
  59. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +10 -4
  60. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  61. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +11 -5
  62. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/src/PrismicRichText/index.d.ts +1 -1
  64. package/dist/src/PrismicRichText/types.d.ts +25 -26
  65. package/dist/src/PrismicRichText/types.d.ts.map +1 -1
  66. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  67. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  68. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +10 -11
  69. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  70. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +18 -10
  71. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  72. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +19 -11
  73. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  74. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs +12 -30
  75. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
  76. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js +12 -30
  77. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
  78. package/dist/src/PrismicTable/PrismicTableRow.cjs.map +1 -1
  79. package/dist/src/PrismicTable/PrismicTableRow.js.map +1 -1
  80. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  81. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  82. package/dist/src/PrismicTable/index.d.ts +1 -0
  83. package/dist/src/PrismicTable/types.d.ts +7 -8
  84. package/dist/src/PrismicTable/types.d.ts.map +1 -1
  85. package/dist/src/PrismicText.cjs.map +1 -1
  86. package/dist/src/PrismicText.js.map +1 -1
  87. package/dist/src/PrismicText.vue.d.ts +2 -6
  88. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  89. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  90. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/src/SliceZone/SliceZone.cjs.map +1 -1
  92. package/dist/src/SliceZone/SliceZone.js.map +1 -1
  93. package/dist/src/SliceZone/SliceZone.vue.d.ts +3 -14
  94. package/dist/src/SliceZone/SliceZone.vue.d.ts.map +1 -1
  95. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  96. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  97. package/dist/src/SliceZone/types.d.ts +3 -9
  98. package/dist/src/SliceZone/types.d.ts.map +1 -1
  99. package/dist/src/createPrismic.cjs +33 -0
  100. package/dist/src/createPrismic.cjs.map +1 -0
  101. package/dist/src/createPrismic.d.ts +63 -0
  102. package/dist/src/createPrismic.d.ts.map +1 -0
  103. package/dist/src/createPrismic.js +32 -0
  104. package/dist/src/createPrismic.js.map +1 -0
  105. package/dist/src/lib/isInternalURL.cjs +2 -6
  106. package/dist/src/lib/isInternalURL.cjs.map +1 -1
  107. package/dist/src/lib/isInternalURL.js +2 -6
  108. package/dist/src/lib/isInternalURL.js.map +1 -1
  109. package/dist/src/types.cjs.map +1 -1
  110. package/dist/src/types.d.ts +11 -1
  111. package/dist/src/types.d.ts.map +1 -1
  112. package/dist/src/types.js.map +1 -1
  113. package/dist/types.d.cts +11 -1
  114. package/dist/types.d.cts.map +1 -1
  115. package/package.json +1 -3
  116. package/src/PrismicImage.vue +5 -16
  117. package/src/PrismicLink.vue +26 -26
  118. package/src/PrismicRichText/PrismicRichText.vue +33 -23
  119. package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +8 -4
  120. package/src/PrismicRichText/PrismicRichTextSerialize.vue +4 -3
  121. package/src/PrismicRichText/index.ts +1 -1
  122. package/src/PrismicRichText/types.ts +57 -29
  123. package/src/PrismicTable/PrismicTable.vue +31 -23
  124. package/src/PrismicTable/PrismicTableDefaultComponents.ts +14 -39
  125. package/src/PrismicTable/PrismicTableRow.vue +2 -2
  126. package/src/PrismicTable/index.ts +2 -0
  127. package/src/PrismicTable/types.ts +41 -23
  128. package/src/PrismicText.vue +2 -6
  129. package/src/SliceZone/SliceZone.vue +3 -14
  130. package/src/SliceZone/types.ts +3 -9
  131. package/src/createPrismic.ts +86 -0
  132. package/src/index.ts +5 -1
  133. package/src/lib/isInternalURL.ts +2 -6
  134. package/src/types.ts +13 -1
@@ -2,14 +2,9 @@ import * as vue11 from "vue";
2
2
  import { ImageField, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicImage.vue.d.ts
5
-
6
- /**
7
- * Props for `<PrismicImage />`.
8
- */
5
+ /** Props for `<PrismicImage />`. */
9
6
  type PrismicImageProps = {
10
- /**
11
- * The Prismic image field or thumbnail to render.
12
- */
7
+ /** The Prismic image field or thumbnail to render. */
13
8
  field: ImageField | ImageField<string>;
14
9
  /**
15
10
  * An object of Imgix URL API parameters to transform the image.
@@ -48,25 +43,18 @@ type PrismicImageProps = {
48
43
  height?: number | string;
49
44
  } & ({
50
45
  /**
51
- * Widths used to build a `srcset` value for the image field.
46
+ * Widths (in pixels) used to build a `srcset` value for the image field.
52
47
  *
53
- * If a `widths` prop is not given or `"defaults"` is passed, the
54
- * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048,
55
- * 3840.
48
+ * If omitted or set to `"defaults"`, the following widths will be used:
49
+ * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
56
50
  *
57
51
  * If the image field contains responsive views, each responsive view can
58
52
  * be used as a width in the resulting `srcset` by passing `"thumbnails"`
59
53
  * as the `widths` prop.
60
54
  */
61
55
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
62
- /**
63
- * Not used when the `widths` prop is used.
64
- */
65
56
  pixelDensities?: never;
66
57
  } | {
67
- /**
68
- * Not used when the `widths` prop is used.
69
- */
70
58
  widths?: never;
71
59
  /**
72
60
  * Pixel densities used to build a `srcset` value for the image field.
@@ -77,9 +65,7 @@ type PrismicImageProps = {
77
65
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
78
66
  });
79
67
  declare const __VLS_export: vue11.DefineComponent<({
80
- /**
81
- * The Prismic image field or thumbnail to render.
82
- */
68
+ /** The Prismic image field or thumbnail to render. */
83
69
  field: ImageField | ImageField<string>;
84
70
  /**
85
71
  * An object of Imgix URL API parameters to transform the image.
@@ -118,25 +104,19 @@ declare const __VLS_export: vue11.DefineComponent<({
118
104
  height?: number | string;
119
105
  } & {
120
106
  /**
121
- * Widths used to build a `srcset` value for the image field.
107
+ * Widths (in pixels) used to build a `srcset` value for the image field.
122
108
  *
123
- * If a `widths` prop is not given or `"defaults"` is passed, the
124
- * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048,
125
- * 3840.
109
+ * If omitted or set to `"defaults"`, the following widths will be used:
110
+ * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
126
111
  *
127
112
  * If the image field contains responsive views, each responsive view can
128
113
  * be used as a width in the resulting `srcset` by passing `"thumbnails"`
129
114
  * as the `widths` prop.
130
115
  */
131
116
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
132
- /**
133
- * Not used when the `widths` prop is used.
134
- */
135
117
  pixelDensities?: never;
136
118
  }) | ({
137
- /**
138
- * The Prismic image field or thumbnail to render.
139
- */
119
+ /** The Prismic image field or thumbnail to render. */
140
120
  field: ImageField | ImageField<string>;
141
121
  /**
142
122
  * An object of Imgix URL API parameters to transform the image.
@@ -174,9 +154,6 @@ declare const __VLS_export: vue11.DefineComponent<({
174
154
  */
175
155
  height?: number | string;
176
156
  } & {
177
- /**
178
- * Not used when the `widths` prop is used.
179
- */
180
157
  widths?: never;
181
158
  /**
182
159
  * Pixel densities used to build a `srcset` value for the image field.
@@ -186,9 +163,7 @@ declare const __VLS_export: vue11.DefineComponent<({
186
163
  */
187
164
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
188
165
  }), {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<({
189
- /**
190
- * The Prismic image field or thumbnail to render.
191
- */
166
+ /** The Prismic image field or thumbnail to render. */
192
167
  field: ImageField | ImageField<string>;
193
168
  /**
194
169
  * An object of Imgix URL API parameters to transform the image.
@@ -227,25 +202,19 @@ declare const __VLS_export: vue11.DefineComponent<({
227
202
  height?: number | string;
228
203
  } & {
229
204
  /**
230
- * Widths used to build a `srcset` value for the image field.
205
+ * Widths (in pixels) used to build a `srcset` value for the image field.
231
206
  *
232
- * If a `widths` prop is not given or `"defaults"` is passed, the
233
- * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048,
234
- * 3840.
207
+ * If omitted or set to `"defaults"`, the following widths will be used:
208
+ * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
235
209
  *
236
210
  * If the image field contains responsive views, each responsive view can
237
211
  * be used as a width in the resulting `srcset` by passing `"thumbnails"`
238
212
  * as the `widths` prop.
239
213
  */
240
214
  widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
241
- /**
242
- * Not used when the `widths` prop is used.
243
- */
244
215
  pixelDensities?: never;
245
216
  }) | ({
246
- /**
247
- * The Prismic image field or thumbnail to render.
248
- */
217
+ /** The Prismic image field or thumbnail to render. */
249
218
  field: ImageField | ImageField<string>;
250
219
  /**
251
220
  * An object of Imgix URL API parameters to transform the image.
@@ -283,9 +252,6 @@ declare const __VLS_export: vue11.DefineComponent<({
283
252
  */
284
253
  height?: number | string;
285
254
  } & {
286
- /**
287
- * Not used when the `widths` prop is used.
288
- */
289
255
  widths?: never;
290
256
  /**
291
257
  * Pixel densities used to build a `srcset` value for the image field.
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;;;AA4NA;AAIQ,KAJI,iBAAA,GAIJ;EAAa;;;EAuDe,KAAA,EAvD5B,UAuD4B,GAvDf,UAuDe,CAAA,MAAA,CAAA;EAAlB;;;;;EAoBD,WAAA,CAAA,EApEF,UAoEE,CAAA,OApEgB,UAoEhB,CAAA,CAAA,CAAA,CAAA;EAiIX;;;;;;EArJY,GAAA,CAAA,EAAA,EAAA;EAAZ;;;;;;;EAoBA,WAAA,CAAA,EAAA,EAAA;EAAW;;;;;;EApEF,KAAA,CAAA,EAAA,MAAA,GAAA,MAAA;EAgDqB;;;;;;EAhDrB,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CAqES,GAAA,CAAA;EAAlB;;;;;;;AAgIY;;;;WArJZ,YAAY,kBAAkB;;;;;;;;;;;;;;;;kBAoB9B,YACA,kBAAkB;;cAgIlB,oBAAY;;;;SA5MV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;;;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoE3B,YACA,kBAAkB;oBADP,KAAA,CAAA,qBAAA;;;;SA3ET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAgD3B,YAAY,kBAAkB;;;;;;;;;SAvD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoE3B,YACA,kBAAkB;;cAgIN,iBAGU"}
1
+ {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;KA+MY,iBAAA;EAAA;EAEJ,KAAA,EAAA,UAAA,GAAa,UAAb,CAAA,MAAA,CAAA;EAAa;;;;;EAsDf,WAAA,CAAA,EA/CS,UA+CT,CAAA,OA/C2B,UA+C3B,CAAA,CAAA,CAAA,CAAA;EAekB;;;;AAIvB;;EAzEoB,GAAA,CAAA,EAAA,EAAA;EAOY;;;;;;;EAAA,WAAA,CAAA,EAAA,EAAA;EAAlB;;;;;;;EAPP;;;;;;EAsDF,MAAA,CAAA,EAAA,MAAA,GAAA,MAAA;CAtDE,GAAA,CAAA;EAAa;;;;;;;;;;EAqMH,MAAA,CAAA,EA/IZ,WA+IY,CA/IA,UA+IA,CAAA,OA/IkB,kBA+IlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,GAAA,YAAA,GAAA,UAAA;EAAA,cAGsB,CAAA,EAAA,KAAA;;;;;;;;;kBApIlC,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"}
@@ -3,18 +3,16 @@ import * as vue16 from "vue";
3
3
  import { AsLinkAttrsConfig, LinkField, LinkResolverFunction, PrismicDocument } from "@prismicio/client";
4
4
 
5
5
  //#region src/PrismicLink.vue.d.ts
6
-
7
- /**
8
- * Props for `<PrismicLink />`.
9
- */
6
+ /** Props for `<PrismicLink />`. */
10
7
  type PrismicLinkProps = {
11
8
  /**
12
- * A link resolver function used to resolve links when not using the route
13
- * resolver parameter with `@prismicio/client`.
9
+ * The link resolver used to resolve links.
14
10
  *
15
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
11
+ * @remarks
12
+ * If your app uses route resolvers when querying for your Prismic
13
+ * repository's content, a link resolver does not need to be provided.
16
14
  *
17
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
15
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
18
16
  */
19
17
  linkResolver?: LinkResolverFunction;
20
18
  /**
@@ -24,27 +22,26 @@ type PrismicLinkProps = {
24
22
  */
25
23
  rel?: string | AsLinkAttrsConfig["rel"];
26
24
  /**
27
- * The Vue component rendered for links when the URL is internal.
25
+ * The component rendered for internal URLs.
26
+ *
27
+ * If your app uses a client-side router that requires a special Link
28
+ * component, provide the Link component to this prop.
28
29
  *
29
30
  * @defaultValue `<RouterLink>`
30
31
  */
31
32
  internalComponent?: ComponentOrTagName;
32
33
  /**
33
- * The Vue component rendered for links when the URL is external.
34
+ * The component rendered for external URLs.
34
35
  *
35
36
  * @defaultValue `<a>`
36
37
  */
37
38
  externalComponent?: ComponentOrTagName;
38
39
  } & ({
39
- /**
40
- * The Prismic link field to render.
41
- */
40
+ /** The Prismic link field to render. */
42
41
  field: LinkField;
43
42
  document?: never;
44
43
  } | {
45
- /**
46
- * The Prismic document to render as a link.
47
- */
44
+ /** The Prismic document to render as a link. */
48
45
  document: PrismicDocument;
49
46
  field?: never;
50
47
  });
@@ -54,12 +51,13 @@ type __VLS_Slots = {} & {
54
51
  };
55
52
  declare const __VLS_base: vue16.DefineComponent<({
56
53
  /**
57
- * A link resolver function used to resolve links when not using the route
58
- * resolver parameter with `@prismicio/client`.
54
+ * The link resolver used to resolve links.
59
55
  *
60
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
56
+ * @remarks
57
+ * If your app uses route resolvers when querying for your Prismic
58
+ * repository's content, a link resolver does not need to be provided.
61
59
  *
62
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
60
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
63
61
  */
64
62
  linkResolver?: LinkResolverFunction;
65
63
  /**
@@ -69,31 +67,33 @@ declare const __VLS_base: vue16.DefineComponent<({
69
67
  */
70
68
  rel?: string | AsLinkAttrsConfig["rel"];
71
69
  /**
72
- * The Vue component rendered for links when the URL is internal.
70
+ * The component rendered for internal URLs.
71
+ *
72
+ * If your app uses a client-side router that requires a special Link
73
+ * component, provide the Link component to this prop.
73
74
  *
74
75
  * @defaultValue `<RouterLink>`
75
76
  */
76
77
  internalComponent?: ComponentOrTagName;
77
78
  /**
78
- * The Vue component rendered for links when the URL is external.
79
+ * The component rendered for external URLs.
79
80
  *
80
81
  * @defaultValue `<a>`
81
82
  */
82
83
  externalComponent?: ComponentOrTagName;
83
84
  } & {
84
- /**
85
- * The Prismic link field to render.
86
- */
85
+ /** The Prismic link field to render. */
87
86
  field: LinkField;
88
87
  document?: never;
89
88
  }) | ({
90
89
  /**
91
- * A link resolver function used to resolve links when not using the route
92
- * resolver parameter with `@prismicio/client`.
90
+ * The link resolver used to resolve links.
93
91
  *
94
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
92
+ * @remarks
93
+ * If your app uses route resolvers when querying for your Prismic
94
+ * repository's content, a link resolver does not need to be provided.
95
95
  *
96
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
96
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
97
97
  */
98
98
  linkResolver?: LinkResolverFunction;
99
99
  /**
@@ -103,31 +103,33 @@ declare const __VLS_base: vue16.DefineComponent<({
103
103
  */
104
104
  rel?: string | AsLinkAttrsConfig["rel"];
105
105
  /**
106
- * The Vue component rendered for links when the URL is internal.
106
+ * The component rendered for internal URLs.
107
+ *
108
+ * If your app uses a client-side router that requires a special Link
109
+ * component, provide the Link component to this prop.
107
110
  *
108
111
  * @defaultValue `<RouterLink>`
109
112
  */
110
113
  internalComponent?: ComponentOrTagName;
111
114
  /**
112
- * The Vue component rendered for links when the URL is external.
115
+ * The component rendered for external URLs.
113
116
  *
114
117
  * @defaultValue `<a>`
115
118
  */
116
119
  externalComponent?: ComponentOrTagName;
117
120
  } & {
118
- /**
119
- * The Prismic document to render as a link.
120
- */
121
+ /** The Prismic document to render as a link. */
121
122
  document: PrismicDocument;
122
123
  field?: never;
123
124
  }), {}, {}, {}, {}, vue16.ComponentOptionsMixin, vue16.ComponentOptionsMixin, {}, string, vue16.PublicProps, Readonly<({
124
125
  /**
125
- * A link resolver function used to resolve links when not using the route
126
- * resolver parameter with `@prismicio/client`.
126
+ * The link resolver used to resolve links.
127
127
  *
128
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
128
+ * @remarks
129
+ * If your app uses route resolvers when querying for your Prismic
130
+ * repository's content, a link resolver does not need to be provided.
129
131
  *
130
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
132
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
131
133
  */
132
134
  linkResolver?: LinkResolverFunction;
133
135
  /**
@@ -137,31 +139,33 @@ declare const __VLS_base: vue16.DefineComponent<({
137
139
  */
138
140
  rel?: string | AsLinkAttrsConfig["rel"];
139
141
  /**
140
- * The Vue component rendered for links when the URL is internal.
142
+ * The component rendered for internal URLs.
143
+ *
144
+ * If your app uses a client-side router that requires a special Link
145
+ * component, provide the Link component to this prop.
141
146
  *
142
147
  * @defaultValue `<RouterLink>`
143
148
  */
144
149
  internalComponent?: ComponentOrTagName;
145
150
  /**
146
- * The Vue component rendered for links when the URL is external.
151
+ * The component rendered for external URLs.
147
152
  *
148
153
  * @defaultValue `<a>`
149
154
  */
150
155
  externalComponent?: ComponentOrTagName;
151
156
  } & {
152
- /**
153
- * The Prismic link field to render.
154
- */
157
+ /** The Prismic link field to render. */
155
158
  field: LinkField;
156
159
  document?: never;
157
160
  }) | ({
158
161
  /**
159
- * A link resolver function used to resolve links when not using the route
160
- * resolver parameter with `@prismicio/client`.
162
+ * The link resolver used to resolve links.
161
163
  *
162
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
164
+ * @remarks
165
+ * If your app uses route resolvers when querying for your Prismic
166
+ * repository's content, a link resolver does not need to be provided.
163
167
  *
164
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
168
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
165
169
  */
166
170
  linkResolver?: LinkResolverFunction;
167
171
  /**
@@ -171,21 +175,22 @@ declare const __VLS_base: vue16.DefineComponent<({
171
175
  */
172
176
  rel?: string | AsLinkAttrsConfig["rel"];
173
177
  /**
174
- * The Vue component rendered for links when the URL is internal.
178
+ * The component rendered for internal URLs.
179
+ *
180
+ * If your app uses a client-side router that requires a special Link
181
+ * component, provide the Link component to this prop.
175
182
  *
176
183
  * @defaultValue `<RouterLink>`
177
184
  */
178
185
  internalComponent?: ComponentOrTagName;
179
186
  /**
180
- * The Vue component rendered for links when the URL is external.
187
+ * The component rendered for external URLs.
181
188
  *
182
189
  * @defaultValue `<a>`
183
190
  */
184
191
  externalComponent?: ComponentOrTagName;
185
192
  } & {
186
- /**
187
- * The Prismic document to render as a link.
188
- */
193
+ /** The Prismic document to render as a link. */
189
194
  document: PrismicDocument;
190
195
  field?: never;
191
196
  })> & Readonly<{}>, {}, {}, {}, {}, string, vue16.ComponentProvideOptions, false, {}, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue.d.cts","names":[],"sources":["../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA8JA;AASgB,KATJ,gBAAA,GASI;EAOA;;;;;;AA8Bf;AA0EqB;EAOhB,YAAA,CAEJ,EAxHc,oBAwHd;EAxHc;;;;;EAAA,GAAA,CAAA,EAAA,MAAA,GAOA,iBAPA,CAAA,KAAA,CAAA;EAOA;;;;;sBAOK;;;;;;EAaX,iBAAA,CAAA,EANW,kBAMX;CA3BM,GAAA,CAAA;EAOA;;;EA2BH,KAAA,EAPH,SAOG;;;;;;EAuFP,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;;;;;;;;;iBAtHA;;;;;;iBAOA;;;;;;sBAOK;;;;;;sBAOA;;;;;SAMX;;;;;;;;;;;iBA3BM;;;;;;iBAOA;;;;;;sBAOK;;;;;;sBAOA;;;;;YAaR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;iBAlCZ;;;;;;iBAOA;;;;;;sBAOK;;;;;;sBAOA;;;;;SAMX;;;;;;;;;;;iBA3BM;;;;;;iBAOA;;;;;;sBAOK;;;;;;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":";;;;;;KAwJY,gBAAA;EAAA;;;;;;;;AA8CX;EAiFI,YAAA,CAAA,EArHW,oBAsHoB;EAK9B;;;;;EA/FI,GAAA,CAAA,EAAA,MAAA,GArBM,iBAqBN,CAAA,KAAA,CAAA;EA5BM;;;;;;;;EAAA,iBAAA,CAAA,EAiBK,kBAjBL;EAOA;;;;;EAAA,iBAAA,CAAA,EAiBK,kBAjBL;CAUK,GAAA,CAAA;EAOA;EASR,KAAA,EALH,SAKG;;;;UA0FG,EA1FH,eA0FG;EAAA,KAAA,CAAA,EAAA,KAAA;AAAA,CAAA,CAAA;YAPZ,OAU8C,EAAA,CAAA,CAAA;KAT7C,WAAA,GASyD,CAAA,CAAA,GAAA;EAAnC,OAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OARE,OAQF,EAAA,GAAA,GAAA;CAAe;AAAA,cAHpC,UAIkC,QAJxB,eAIwB,CAAA,CAAA;EACnC;;;;;;;;;iBAhIW;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cA6FP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
@@ -1,42 +1,42 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
- import { VueRichTextSerializer } from "./types.cjs";
2
+ import { VueRichTextComponents } from "./types.cjs";
3
3
  import * as vue0 from "vue";
4
4
  import { PropType } from "vue";
5
5
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
6
 
7
7
  //#region src/PrismicRichText/PrismicRichText.vue.d.ts
8
- /**
9
- * Props for `<PrismicRichText />`.
10
- */
8
+ /** Props for `<PrismicRichText />`. */
11
9
  type PrismicRichTextProps = {
12
- /**
13
- * The Prismic rich text or title field to render.
14
- */
10
+ /** The Prismic rich text field to render. */
15
11
  field: RichTextField | null | undefined;
16
12
  /**
17
- * A link resolver function used to resolve link when not using the route
18
- * resolver parameter with `@prismicio/client`.
13
+ * The link resolver used to resolve links.
19
14
  *
20
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
15
+ * @remarks
16
+ * If your app uses route resolvers when querying for your Prismic
17
+ * repository's content, a link resolver does not need to be provided.
21
18
  *
22
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
19
+ * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}
23
20
  */
24
21
  linkResolver?: LinkResolverFunction;
25
22
  /**
26
- * An object that maps a rich text block type to a Vue component.
23
+ * An object that maps a rich text block type to a Vue component or a
24
+ * shorthand definition.
27
25
  *
28
26
  * @example
29
27
  *
30
28
  * ```javascript
31
29
  * {
32
30
  * heading1: Heading1,
31
+ * paragraph: { class: 'prose'},
32
+ * strong: { as: 'em', class: 'font-bold' },
33
33
  * }
34
34
  * ```
35
35
  */
36
- components?: VueRichTextSerializer;
36
+ components?: VueRichTextComponents;
37
37
  /**
38
38
  * The value to be rendered when the field is empty. If a fallback is not
39
- * given, `null` (nothing) will be rendered.
39
+ * given, `null` will be rendered.
40
40
  */
41
41
  fallback?: ComponentOrTagName;
42
42
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AA4JY,KAAA,oBAAA,GAAoB;EAIxB;;;EA6BI,KAAA,EA7BJ,aA6BI,GAAA,IAAA,GAAA,SAAA;EAAkB;AAC7B;;;;;;;EA4HE,YAAA,CAAA,EAhJa,oBAgJb;EADmC;;;;;;;;;;;EACnC,UAAA,CAAA,EAnIW,qBAmIX;EADmC;;;;aA5H1B;;cAgHN,YAAY,OAAA,eAAA,CAY4B,IAAA,CAZ5B,gBAAA,CAAA;EAAA,KAAA,EAAA;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":";;;;;;;;KAuKY,oBAAA;;EAAA,KAAA,EAEJ,aAFI,GAAoB,IAAA,GAAA,SAAA;EAExB;;;;;AAkCP;;;;EA4HmB,YAAA,CAAA,EAnJJ,oBAmJI;EAGO;;;;;;;;;;;;;;EAIxB,UAAA,CAAA,EA1IW,qBA0IX;EADmC;;;;aAnI1B;;cAuHN,YAAY,OAAA,eAAA,CAY4B,IAAA,CAZ5B,gBAAA,CAAA;EAAA,KAAA,EAAA;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,5 +1,5 @@
1
- import { VueComponent } from "../types.cjs";
2
- import { LinkResolverFunction, RTAnyNode, RichTextNodeType } from "@prismicio/client";
1
+ import { VueComponentShorthand } from "../types.cjs";
2
+ import { LinkResolverFunction, RTAnyNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTStrongNode } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicRichText/types.d.ts
5
5
 
@@ -9,32 +9,31 @@ import { LinkResolverFunction, RTAnyNode, RichTextNodeType } from "@prismicio/cl
9
9
  *
10
10
  * @see Templating Rich Text and title fields from Prismic {@link https://prismic.io/docs/rich-text}
11
11
  */
12
- type VueRichTextSerializer = Partial<Record<keyof typeof RichTextNodeType, VueRichTextComponent | VueShorthand>>;
13
- /**
14
- * Props for a component rendering nodes from a Prismic rich text field.
15
- */
12
+ type VueRichTextComponents = {
13
+ heading1?: RichTextComponentProps<RTHeading1Node> | VueComponentShorthand;
14
+ heading2?: RichTextComponentProps<RTHeading2Node> | VueComponentShorthand;
15
+ heading3?: RichTextComponentProps<RTHeading3Node> | VueComponentShorthand;
16
+ heading4?: RichTextComponentProps<RTHeading4Node> | VueComponentShorthand;
17
+ heading5?: RichTextComponentProps<RTHeading5Node> | VueComponentShorthand;
18
+ heading6?: RichTextComponentProps<RTHeading6Node> | VueComponentShorthand;
19
+ paragraph?: RichTextComponentProps<RTParagraphNode> | VueComponentShorthand;
20
+ preformatted?: RichTextComponentProps<RTPreformattedNode> | VueComponentShorthand;
21
+ strong?: RichTextComponentProps<RTStrongNode> | VueComponentShorthand;
22
+ em?: RichTextComponentProps<RTEmNode> | VueComponentShorthand;
23
+ listItem?: RichTextComponentProps<RTListItemNode> | VueComponentShorthand;
24
+ oListItem?: RichTextComponentProps<RTOListItemNode> | VueComponentShorthand;
25
+ list?: RichTextComponentProps<RTListNode> | VueComponentShorthand;
26
+ oList?: RichTextComponentProps<RTOListNode> | VueComponentShorthand;
27
+ image?: RichTextComponentProps<RTImageNode> | Omit<VueComponentShorthand, "as">;
28
+ embed?: RichTextComponentProps<RTEmbedNode> | VueComponentShorthand;
29
+ hyperlink?: RichTextComponentProps<RTLinkNode> | Omit<VueComponentShorthand, "as">;
30
+ label?: RichTextComponentProps<RTLabelNode> | Omit<VueComponentShorthand, "as">;
31
+ span?: RichTextComponentProps<RTSpanNode>;
32
+ };
33
+ /** Props for a component rendering nodes from a Prismic rich text field. */
16
34
  type RichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {
17
35
  node: TRTNode;
18
36
  };
19
- /**
20
- * A Vue component rendering a node from a Prismic rich text field.
21
- *
22
- * @typeParam TRTNode - The type of rich text node(s) this component handles
23
- */
24
- type VueRichTextComponent<TRTNode extends RTAnyNode = RTAnyNode> = VueComponent<RichTextComponentProps<TRTNode>>;
25
- /**
26
- * A shorthand definition for {@link VueRichTextSerializer} component types.
27
- */
28
- type VueShorthand = {
29
- /**
30
- * The HTML element type rendered for this node type.
31
- */
32
- as?: string;
33
- /**
34
- * Other attributes to apply to the element type.
35
- */
36
- [Attribute: string]: string | boolean | null | undefined;
37
- };
38
37
  //#endregion
39
- export { RichTextComponentProps, VueRichTextSerializer, VueShorthand };
38
+ export { RichTextComponentProps, VueRichTextComponents };
40
39
  //# sourceMappingURL=types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/PrismicRichText/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;AACC,KADW,qBAAA,GAAwB,OACnC,CAAA,MAAA,CAAA,MAAA,OAAoB,gBAApB,EAAsC,oBAAtC,GAA6D,YAA7D,CAAA,CAAA;;;AAMD;AAAmD,KAAvC,sBAAuC,CAAA,gBAAA,SAAA,GAAY,SAAZ,CAAA,GAAA;EAAY,IAAA,EACxD,OADwD;CACxD;;AACN;;;;KAOI,oBACJ,CAAA,gBADyC,SACzC,GADqD,SACrD,CAAA,GADkE,YAClE,CAAA,sBAAA,CAAuB,OAAvB,CAAA,CAAA;;;AAMD;KAAY,YAAA"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/PrismicRichText/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAiCA;;;;AAEmC,KAFvB,qBAAA,GAEuB;EAAvB,QAAA,CAAA,EADA,sBACA,CADuB,cACvB,CAAA,GADyC,qBACzC;EAAyC,QAAA,CAAA,EAAzC,sBAAyC,CAAlB,cAAkB,CAAA,GAAA,qBAAA;EAClB,QAAA,CAAA,EAAvB,sBAAuB,CAAA,cAAA,CAAA,GAAkB,qBAAlB;EAAvB,QAAA,CAAA,EACA,sBADA,CACuB,cADvB,CAAA,GACyC,qBADzC;EAAyC,QAAA,CAAA,EAEzC,sBAFyC,CAElB,cAFkB,CAAA,GAEA,qBAFA;EAClB,QAAA,CAAA,EAEvB,sBAFuB,CAEA,cAFA,CAAA,GAEkB,qBAFlB;EAAvB,SAAA,CAAA,EAGC,sBAHD,CAGwB,eAHxB,CAAA,GAG2C,qBAH3C;EAAyC,YAAA,CAAA,EAKjD,sBALiD,CAK1B,kBAL0B,CAAA,GAMjD,qBANiD;EAClB,MAAA,CAAA,EAMzB,sBANyB,CAMF,YANE,CAAA,GAMc,qBANd;EAAvB,EAAA,CAAA,EAON,sBAPM,CAOiB,QAPjB,CAAA,GAO6B,qBAP7B;EAAyC,QAAA,CAAA,EAQzC,sBARyC,CAQlB,cARkB,CAAA,GAQA,qBARA;EAClB,SAAA,CAAA,EAQtB,sBARsB,CAQC,eARD,CAAA,GAQoB,qBARpB;EAAvB,IAAA,CAAA,EASJ,sBATI,CASmB,UATnB,CAAA,GASiC,qBATjC;EAAyC,KAAA,CAAA,EAU5C,sBAV4C,CAUrB,WAVqB,CAAA,GAUN,qBAVM;EACjB,KAAA,CAAA,EAWhC,sBAXgC,CAWT,WAXS,CAAA,GAYhC,IAZgC,CAY3B,qBAZ2B,EAAA,IAAA,CAAA;EAAvB,KAAA,CAAA,EAaJ,sBAbI,CAamB,WAbnB,CAAA,GAakC,qBAblC;EAA0C,SAAA,CAAA,EAenD,sBAfmD,CAe5B,UAf4B,CAAA,GAgBnD,IAhBmD,CAgB9C,qBAhB8C,EAAA,IAAA,CAAA;EAE5B,KAAA,CAAA,EAgBvB,sBAhBuB,CAgBA,WAhBA,CAAA,GAiBvB,IAjBuB,CAiBlB,qBAjBkB,EAAA,IAAA,CAAA;EAAvB,IAAA,CAAA,EAkBI,sBAlBJ,CAkB2B,UAlB3B,CAAA;CACA;;AACM,KAoBE,sBApBF,CAAA,gBAoByC,SApBzC,GAoBqD,SApBrD,CAAA,GAAA;EAAuC,IAAA,EAqB1C,OArB0C;CACpB"}
@@ -1,30 +1,29 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
- import { VueRichTextSerializer } from "../PrismicRichText/types.cjs";
2
+ import { VueRichTextComponents } from "../PrismicRichText/types.cjs";
3
3
  import { VueTableComponents } from "./types.cjs";
4
4
  import * as vue6 from "vue";
5
5
  import { TableField } from "@prismicio/client";
6
6
 
7
7
  //#region src/PrismicTable/PrismicTable.vue.d.ts
8
- /**
9
- * Props for `<PrismicTable />`.
10
- */
8
+ /** Props for `<PrismicTable />`. */
11
9
  type PrismicTableProps = {
12
- /**
13
- * The Prismic table field to render.
14
- */
10
+ /** The Prismic table field to render. */
15
11
  field: TableField | undefined;
16
12
  /**
17
- * An object that maps a table block type to a Vue component.
13
+ * An object that maps a table block type to a Vue component or a shorthand
14
+ * definition.
18
15
  *
19
16
  * @example
20
17
  *
21
18
  * ```javascript
22
19
  * {
23
20
  * table: Table,
21
+ * thead: { class: 'bg-black text-white' },
22
+ * th: { as: 'td', class: 'font-bold' },
24
23
  * }
25
24
  * ```
26
25
  */
27
- components?: VueTableComponents & VueRichTextSerializer;
26
+ components?: VueTableComponents & VueRichTextComponents;
28
27
  /**
29
28
  * The value to be rendered when the field is empty. If a fallback is not
30
29
  * given, `null` (nothing) will be rendered.
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue.d.cts","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;AA4HY,KAAA,iBAAA,GAAiB;EAIrB;;;EAmBI,KAAA,EAnBJ,UAmBI,GAAA,SAAA;EAAkB;AAC7B;;;;;;;;;;EAiJiB,UAAA,CAAA,EAxJJ,kBAwJI,GAxJiB,qBAwJjB;EAAA;;;;aAlJN;;cAkJN,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":";;;;;;;;KAmIY,iBAAA;;EAAA,KAAA,EAEJ,UAFI,GAAiB,SAAA;EAErB;;;;;AAuBP;;;;;;;;;EA0JiB,UAAA,CAAA,EAjKJ,kBAiKI,GAjKiB,qBAiKjB;EAAA;AAAA;;;aA3JN;;cA2JN,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,5 +1,4 @@
1
- import { VueComponent } from "../types.cjs";
2
- import { VueShorthand } from "../PrismicRichText/types.cjs";
1
+ import { VueComponent, VueComponentShorthand } from "../types.cjs";
3
2
  import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
4
3
 
5
4
  //#region src/PrismicTable/types.d.ts
@@ -13,22 +12,22 @@ import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, Tabl
13
12
  type VueTableComponents = {
14
13
  table?: VueComponent<{
15
14
  table: TableField<"filled">;
16
- }> | VueShorthand;
15
+ }> | Omit<VueComponentShorthand, "as">;
17
16
  thead?: VueComponent<{
18
17
  head: TableFieldHead;
19
- }> | VueShorthand;
18
+ }> | Omit<VueComponentShorthand, "as">;
20
19
  tbody?: VueComponent<{
21
20
  body: TableFieldBody;
22
- }> | VueShorthand;
21
+ }> | Omit<VueComponentShorthand, "as">;
23
22
  tr?: VueComponent<{
24
23
  row: TableFieldBodyRow | TableFieldHeadRow;
25
- }> | VueShorthand;
24
+ }> | Omit<VueComponentShorthand, "as">;
26
25
  th?: VueComponent<{
27
26
  cell: TableFieldHeaderCell;
28
- }> | VueShorthand;
27
+ }> | Omit<VueComponentShorthand, "as">;
29
28
  td?: VueComponent<{
30
29
  cell: TableFieldDataCell;
31
- }> | VueShorthand;
30
+ }> | Omit<VueComponentShorthand, "as">;
32
31
  };
33
32
  //#endregion
34
33
  export { VueTableComponents };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBA;;;;AAE8B,KAFlB,kBAAA,GAEkB;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,KAAA,EADnB,UACmB,CAAA,QAAA,CAAA;EACpB,CAAA,CAAA,GAF2B,YAE3B;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,IAAA,EADpB,cACoB;EAE1B,CAAA,CAAA,GAH0B,YAG1B;EAAoB,KAAA,CAAA,EAFnC,YAEmC,CAAA;IAAxC,IAAA,EAF0B,cAE1B;EACA,CAAA,CAAA,GAH8C,YAG9C;EACuB,EAAA,CAAA,EAFvB,YAEuB,CAAA;IAArB,GAAA,EAFkB,iBAElB,GAFsC,iBAEtC;EAA+C,CAAA,CAAA,GADjD,YACiD;EAC1B,EAAA,CAAA,EADrB,YACqB,CAAA;IAArB,IAAA,EADqB,oBACrB;EAA6C,CAAA,CAAA,GADE,YACF;EAAY,EAAA,CAAA,EAAzD,YAAyD,CAAA;UAApC;OAAwB"}
1
+ {"version":3,"file":"types.d.cts","names":[],"sources":["../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkBA;;;;AAGI,KAHQ,kBAAA,GAGR;EAEqB,KAAA,CAAA,EAHrB,YAGqB,CAAA;IAArB,KAAA,EAHsB,UAGtB,CAAA,QAAA,CAAA;EACK,CAAA,CAAA,GAHL,IAGK,CAHA,qBAGA,EAAA,IAAA,CAAA;EAAL,KAAA,CAAA,EADA,YACA,CAAA;IAEqB,IAAA,EAHA,cAGA;EAArB,CAAA,CAAA,GAFA,IAEA,CAFK,qBAEL,EAAA,IAAA,CAAA;EACK,KAAA,CAAA,EADL,YACK,CAAA;IAAL,IAAA,EADqB,cACrB;EAEoB,CAAA,CAAA,GAFpB,IAEoB,CAFf,qBAEe,EAAA,IAAA,CAAA;EAAoB,EAAA,CAAA,EAAxC,YAAwC,CAAA;IAAxC,GAAA,EAAoB,iBAApB,GAAwC,iBAAxC;EACK,CAAA,CAAA,GAAL,IAAK,CAAA,qBAAA,EAAA,IAAA,CAAA;EAAL,EAAA,CAAA,EAEA,YAFA,CAAA;IAEqB,IAAA,EAAA,oBAAA;EAArB,CAAA,CAAA,GACA,IADA,CACK,qBADL,EAAA,IAAA,CAAA;EACK,EAAA,CAAA,EAEL,YAFK,CAAA;IAAL,IAAA,EAEqB,kBAFrB;EAEqB,CAAA,CAAA,GACrB,IADqB,CAChB,qBADgB,EAAA,IAAA,CAAA;CAArB"}
@@ -2,13 +2,9 @@ import * as vue21 from "vue";
2
2
  import { RichTextField } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicText.vue.d.ts
5
- /**
6
- * Props for `<PrismicText />`.
7
- */
5
+ /** Props for `<PrismicText />`. */
8
6
  type PrismicTextProps = {
9
- /**
10
- * The Prismic rich text field to render.
11
- */
7
+ /** The Prismic rich text field to render. */
12
8
  field: RichTextField | null | undefined;
13
9
  /**
14
10
  * 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":";;;;;KAwDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAmDF;;;;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA;;;;;EAAA,SAAA,CAAA,EAAA,MAAA;AAAA,CAAA;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"}