@prismicio/vue 5.3.0-pr.89.235a3d3 → 5.3.0-pr.89.b55bfe4

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 (40) hide show
  1. package/README.md +8 -10
  2. package/dist/PrismicImage.vue.d.cts +4 -4
  3. package/dist/PrismicImage.vue.d.cts.map +1 -1
  4. package/dist/PrismicLink.vue.d.cts +4 -4
  5. package/dist/PrismicLink.vue.d.cts.map +1 -1
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +4 -4
  7. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  8. package/dist/PrismicTable/PrismicTable.vue.d.cts +2 -2
  9. package/dist/PrismicText.vue.d.cts +2 -2
  10. package/dist/PrismicText.vue.d.cts.map +1 -1
  11. package/dist/SliceZone/SliceZone.vue.d.cts +2 -2
  12. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  13. package/dist/createPrismic.d.cts +12 -3
  14. package/dist/createPrismic.d.cts.map +1 -1
  15. package/dist/package.cjs +1 -1
  16. package/dist/package.js +1 -1
  17. package/dist/src/PrismicImage.vue.d.ts +4 -4
  18. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  19. package/dist/src/PrismicLink.cjs.map +1 -1
  20. package/dist/src/PrismicLink.js.map +1 -1
  21. package/dist/src/PrismicLink.vue.d.ts +4 -4
  22. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  23. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +1 -1
  24. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  25. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js +1 -1
  26. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +4 -4
  28. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  29. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +2 -2
  30. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  31. package/dist/src/PrismicText.vue.d.ts +2 -2
  32. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  33. package/dist/src/SliceZone/SliceZone.vue.d.ts +2 -2
  34. package/dist/src/createPrismic.cjs.map +1 -1
  35. package/dist/src/createPrismic.d.ts +12 -3
  36. package/dist/src/createPrismic.d.ts.map +1 -1
  37. package/dist/src/createPrismic.js.map +1 -1
  38. package/package.json +1 -1
  39. package/src/PrismicLink.vue +1 -1
  40. package/src/createPrismic.ts +13 -3
package/README.md CHANGED
@@ -15,11 +15,11 @@ Replace all on all files (README.md, CONTRIBUTING.md, bug_report.md, package.jso
15
15
 
16
16
  <!-- Replacing link to Prismic with [Prismic][prismic] is useful here -->
17
17
 
18
- [Vue][vue] plugin, components, and composables to fetch and present [Prismic][prismic] content.
18
+ [Vue][vue-docs] plugin, components, and composables to fetch and present [Prismic][prismic] content.
19
19
 
20
- - 📝 &nbsp;Display content from Prismic like [Rich Text][prismic-rich-text] and [Link][prismic-link] fields;
21
- - 🍡 &nbsp;Render Prismic [Slice Zones][prismic-slices] declaratively with Vue components;
22
- - 🎣 &nbsp;Fetch Prismic content using Vue [composition API][vue-composition] or [vue-options].
20
+ - 📝 &nbsp;Display content from Prismic like [rich text][prismic-rich-text] and [link][prismic-link] fields.
21
+ - 🍡 &nbsp;Render Prismic [slice zones][prismic-slices] declaratively with Vue components.
22
+ - 🎣 &nbsp;Fetch Prismic content throughout your Vue application.
23
23
 
24
24
  ## Install
25
25
 
@@ -70,14 +70,12 @@ For more clarity on this project and its structure you can also check out the de
70
70
  <!-- Replace link with a more useful one if available -->
71
71
 
72
72
  [prismic-docs]: https://prismic.io/docs/technical-reference/prismicio-vue/v5
73
+ [vue-docs]: https://vuejs.org
73
74
  [changelog]: ./CHANGELOG.md
74
75
  [contributing]: ./CONTRIBUTING.md
75
- [vue]: https://v3.vuejs.org
76
- [prismic-rich-text]: https://prismic.io/docs/core-concepts/rich-text-title
77
- [prismic-link]: https://prismic.io/docs/core-concepts/link-content-relationship
78
- [prismic-slices]: https://prismic.io/docs/core-concepts/slices
79
- [vue-composition]: https://v3.vuejs.org/guide/composition-api-introduction.html
80
- [vue-options]: https://v3.vuejs.org/guide/introduction.html
76
+ [prismic-rich-text]: https://prismic.io/docs/fields/rich-text
77
+ [prismic-link]: https://prismic.io/docs/fields/link
78
+ [prismic-slices]: https://prismic.io/docs/slices
81
79
 
82
80
  <!-- Replace link with a more useful one if available -->
83
81
 
@@ -1,4 +1,4 @@
1
- import * as vue0 from "vue";
1
+ import * as vue19 from "vue";
2
2
  import { ImageField, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicImage.vue.d.ts
@@ -64,7 +64,7 @@ type PrismicImageProps = {
64
64
  */
65
65
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
66
66
  });
67
- declare const __VLS_export: vue0.DefineComponent<({
67
+ declare const __VLS_export: vue19.DefineComponent<({
68
68
  /** The Prismic image field or thumbnail to render. */
69
69
  field: ImageField | ImageField<string>;
70
70
  /**
@@ -162,7 +162,7 @@ declare const __VLS_export: vue0.DefineComponent<({
162
162
  * densities will be used: 1, 2, 3.
163
163
  */
164
164
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
165
- }), {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<({
165
+ }), {}, {}, {}, {}, vue19.ComponentOptionsMixin, vue19.ComponentOptionsMixin, {}, string, vue19.PublicProps, Readonly<({
166
166
  /** The Prismic image field or thumbnail to render. */
167
167
  field: ImageField | ImageField<string>;
168
168
  /**
@@ -260,7 +260,7 @@ declare const __VLS_export: vue0.DefineComponent<({
260
260
  * densities will be used: 1, 2, 3.
261
261
  */
262
262
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
263
- })> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
263
+ })> & Readonly<{}>, {}, {}, {}, {}, string, vue19.ComponentProvideOptions, false, {}, any>;
264
264
  declare const _default: typeof __VLS_export;
265
265
  //#endregion
266
266
  export { PrismicImageProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;KAgNY,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;;;;;;;;;;EAsMH,MAAA,CAAA,EAhJZ,WAgJY,CAhJA,UAgJA,CAAA,OAhJkB,kBAgJlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,GAAA,YAAA,GAAA,UAAA;EAAA,cAGsB,CAAA,EAAA,KAAZ;;;;;;;;;kBArItB,YACA,kBAAkB;;cAiIlB,mBAAY;;SAtMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;oBADP,IAAA,CAAA,qBAAA;;SApET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;;cAiIN,iBAGU"}
1
+ {"version":3,"file":"PrismicImage.vue.d.cts","names":[],"sources":["../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;KAgNY,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;;;;;;;;;;EAsMH,MAAA,CAAA,EAhJZ,WAgJY,CAhJA,UAgJA,CAAA,OAhJkB,kBAgJlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,GAAA,YAAA,GAAA,UAAA;EAAA,cAGsB,CAAA,EAAA,KAAA;;;;;;;;;kBArIlC,YACA,kBAAkB;;cAiIlB,oBAAY;;SAtMV,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;;cAiIN,iBAGU"}
@@ -1,5 +1,5 @@
1
1
  import { ComponentOrTagName } from "./types.cjs";
2
- import * as vue11 from "vue";
2
+ import * as vue9 from "vue";
3
3
  import { AsLinkAttrsConfig, LinkField, LinkResolverFunction, PrismicDocument } from "@prismicio/client";
4
4
 
5
5
  //#region src/PrismicLink.vue.d.ts
@@ -49,7 +49,7 @@ declare var __VLS_8: {};
49
49
  type __VLS_Slots = {} & {
50
50
  default?: (props: typeof __VLS_8) => any;
51
51
  };
52
- declare const __VLS_base: vue11.DefineComponent<({
52
+ declare const __VLS_base: vue9.DefineComponent<({
53
53
  /**
54
54
  * The link resolver used to resolve links.
55
55
  *
@@ -121,7 +121,7 @@ declare const __VLS_base: vue11.DefineComponent<({
121
121
  /** The Prismic document to render as a link. */
122
122
  document: PrismicDocument;
123
123
  field?: never;
124
- }), {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<({
124
+ }), {}, {}, {}, {}, vue9.ComponentOptionsMixin, vue9.ComponentOptionsMixin, {}, string, vue9.PublicProps, Readonly<({
125
125
  /**
126
126
  * The link resolver used to resolve links.
127
127
  *
@@ -193,7 +193,7 @@ declare const __VLS_base: vue11.DefineComponent<({
193
193
  /** The Prismic document to render as a link. */
194
194
  document: PrismicDocument;
195
195
  field?: never;
196
- })> & Readonly<{}>, {}, {}, {}, {}, string, vue11.ComponentProvideOptions, false, {}, any>;
196
+ })> & Readonly<{}>, {}, {}, {}, {}, string, vue9.ComponentProvideOptions, false, {}, any>;
197
197
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
198
198
  declare const _default: typeof __VLS_export;
199
199
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue.d.cts","names":[],"sources":["../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;KAyJY,gBAAA;EAAA;;;;;;;;AA8CX;EAkFI,YAAA,CAAA,EAtHW,oBAuHoB;EAK9B;;;;;EAhGI,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;;;;UA2FG,EA3FH,eA2FG;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;;;;;;;;;iBAjIW;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cA8FP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
1
+ {"version":3,"file":"PrismicLink.vue.d.cts","names":[],"sources":["../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;KAyJY,gBAAA;EAAA;;;;;;;;AA8CX;EAkFI,YAAA,CAAA,EAtHW,oBAuHoB;EAK9B;;;;;EAhGI,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;;;;UA2FG,EA3FH,eA2FG;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,OAJxB,eAIwB,CAAA,CAAA;EACnC;;;;;;;;;iBAjIW;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,IAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cA8FP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
@@ -1,6 +1,6 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
2
  import { VueRichTextComponents } from "./types.cjs";
3
- import * as vue4 from "vue";
3
+ import * as vue24 from "vue";
4
4
  import { PropType } from "vue";
5
5
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
6
 
@@ -40,7 +40,7 @@ type PrismicRichTextProps = {
40
40
  */
41
41
  fallback?: ComponentOrTagName;
42
42
  };
43
- declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
43
+ declare const __VLS_export: vue24.DefineComponent<vue24.ExtractPropTypes<{
44
44
  field: {
45
45
  type: PropType<PrismicRichTextProps["field"]>;
46
46
  };
@@ -53,7 +53,7 @@ declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
53
53
  fallback: {
54
54
  type: PropType<PrismicRichTextProps["fallback"]>;
55
55
  };
56
- }>, {}, {}, {}, {}, vue4.ComponentOptionsMixin, vue4.ComponentOptionsMixin, {}, string, vue4.PublicProps, Readonly<vue4.ExtractPropTypes<{
56
+ }>, {}, {}, {}, {}, vue24.ComponentOptionsMixin, vue24.ComponentOptionsMixin, {}, string, vue24.PublicProps, Readonly<vue24.ExtractPropTypes<{
57
57
  field: {
58
58
  type: PropType<PrismicRichTextProps["field"]>;
59
59
  };
@@ -66,7 +66,7 @@ declare const __VLS_export: vue4.DefineComponent<vue4.ExtractPropTypes<{
66
66
  fallback: {
67
67
  type: PropType<PrismicRichTextProps["fallback"]>;
68
68
  };
69
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue4.ComponentProvideOptions, true, {}, any>;
69
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue24.ComponentProvideOptions, true, {}, any>;
70
70
  declare const _default: typeof __VLS_export;
71
71
  //#endregion
72
72
  export { PrismicRichTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;KAwKY,oBAAA;;EAAA,KAAA,EAEJ,aAFI,GAAoB,IAAA,GAAA,SAAA;EAExB;;;;;AAkCP;;;;EA6HmB,YAAA,CAAA,EApJJ,oBAoJI;EAGO;;;;;;;;;;;;;;EAIxB,UAAA,CAAA,EA3IW,qBA2IX;EADmC;;;;aApI1B;;cAwHN,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":";;;;;;;;KAwKY,oBAAA;;EAAA,KAAA,EAEJ,aAFI,GAAoB,IAAA,GAAA,SAAA;EAExB;;;;;AAkCP;;;;EA6HmB,YAAA,CAAA,EApJJ,oBAoJI;EAGO;;;;;;;;;;;;;;EAIxB,UAAA,CAAA,EA3IW,qBA2IX;EADmC;;;;aApI1B;;cAwHN,YAAY,QAAA,eAAA,CAY4B,KAAA,CAZ5B,gBAAA,CAAA;EAAA,KAAA,EAAA;UAGU,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;oBAbe,KAAA,CAAA,qBAAA,uEAY4B,KAAA,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 { VueRichTextComponents } from "../PrismicRichText/types.cjs";
3
3
  import { VueTableComponents } from "./types.cjs";
4
- import * as vue21 from "vue";
4
+ import * as vue14 from "vue";
5
5
  import { TableField } from "@prismicio/client";
6
6
 
7
7
  //#region src/PrismicTable/PrismicTable.vue.d.ts
@@ -30,7 +30,7 @@ type PrismicTableProps = {
30
30
  */
31
31
  fallback?: ComponentOrTagName;
32
32
  };
33
- declare const __VLS_export: vue21.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue21.ComponentOptionsMixin, vue21.ComponentOptionsMixin, {}, string, vue21.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue21.ComponentProvideOptions, false, {}, any>;
33
+ declare const __VLS_export: vue14.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, false, {}, any>;
34
34
  declare const _default: typeof __VLS_export;
35
35
  //#endregion
36
36
  export { PrismicTableProps, _default };
@@ -1,4 +1,4 @@
1
- import * as vue16 from "vue";
1
+ import * as vue0 from "vue";
2
2
  import { RichTextField } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicText.vue.d.ts
@@ -18,7 +18,7 @@ type PrismicTextProps = {
18
18
  */
19
19
  separator?: string;
20
20
  };
21
- declare const __VLS_export: vue16.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue16.ComponentOptionsMixin, vue16.ComponentOptionsMixin, {}, string, vue16.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue16.ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: vue0.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  //#endregion
24
24
  export { PrismicTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAyDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAoDF;;;;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"}
1
+ {"version":3,"file":"PrismicText.vue.d.cts","names":[],"sources":["../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAyDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAEpB,SAAA;EAoDF;;;;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA;;;;;EAAA,SAAA,CAAA,EAAA,MAAA;AAAA,CAAA;cAAZ,cAAY,IAAA,CAAA,gBAAA,kCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -1,5 +1,5 @@
1
1
  import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.cjs";
2
- import * as vue26 from "vue";
2
+ import * as vue4 from "vue";
3
3
 
4
4
  //#region src/SliceZone/SliceZone.vue.d.ts
5
5
 
@@ -22,7 +22,7 @@ type SliceZoneProps<TContext = unknown> = {
22
22
  context?: TContext;
23
23
  };
24
24
  type __VLS_Props = SliceZoneProps;
25
- declare const __VLS_export: vue26.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue26.ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: vue4.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue4.ComponentOptionsMixin, vue4.ComponentOptionsMixin, {}, string, vue4.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue4.ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  //#endregion
28
28
  export { SliceZoneProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA+GA;;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;EAkFK,gBAEJ,CAAA,EAxFkB,kBAwFlB,CAAA,GAAA,EAxF0C,QAwF1C,CAAA;EAFgB;EAAA,OAAA,CAAA,EAnFP,QAmFO;CAAA;KAhFb,WAAA,GAAc,cAgFD;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"}
1
+ {"version":3,"file":"SliceZone.vue.d.cts","names":[],"sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA+GA;;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;EAkFK,gBAEJ,CAAA,EAxFkB,kBAwFlB,CAAA,GAAA,EAxF0C,QAwF1C,CAAA;EAFgB;EAAA,OAAA,CAAA,EAnFP,QAmFO;CAAA;KAhFb,WAAA,GAAc,cAgFD;cAAZ,YAAY,EAAA,IAAA,CAAA,eAAA,CAAA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,IAAA,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,IAAA,CAAA,uBAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAAA,QAAA,EAAA,OAGU,YAHV"}
@@ -2,18 +2,27 @@ import { ComponentOrTagName } from "./types.cjs";
2
2
  import { VueRichTextComponents } from "./PrismicRichText/types.cjs";
3
3
  import { VueTableComponents } from "./PrismicTable/types.cjs";
4
4
  import { App } from "vue";
5
- import { CreateClient, isFilled } from "@prismicio/client";
5
+ import { CreateClient, LinkResolverFunction, isFilled } from "@prismicio/client";
6
6
 
7
7
  //#region src/createPrismic.d.ts
8
8
  /** Components configuration. */
9
9
  type ComponentsConfig = {
10
+ /**
11
+ * The default link resolver used to resolve links.
12
+ *
13
+ * @see {@link https://prismic.io/docs/routes}
14
+ */
15
+ linkResolver?: LinkResolverFunction;
10
16
  /** The default component rendered for internal URLs. */
11
17
  linkInternalComponent?: ComponentOrTagName;
12
18
  /** The default component rendered for external URLs. */
13
19
  linkExternalComponent?: ComponentOrTagName;
14
20
  /**
15
- * The default components or shorthand definitions for Rich Text and Table
16
- * fields.
21
+ * The default components or shorthand definitions for rich text and table
22
+ * components.
23
+ *
24
+ * @see {@link https://prismic.io/docs/fields/rich-text}
25
+ * @see {@link https://prismic.io/docs/fields/table}
17
26
  */
18
27
  defaultComponents?: VueRichTextComponents & VueTableComponents;
19
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createPrismic.d.cts","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAQwD,KAOnD,gBAAA,GAAgB;EAEI;EAGA,qBAAA,CAAA,EAHA,kBAGA;EAMJ;EAAwB,qBAAA,CAAA,EANpB,kBAMoB;EAAkB;AAO/D;;;EAKkB,iBAAA,CAAA,EAZG,qBAYH,GAZ2B,kBAY3B;CAGW;;;AAO7B;;AAES,KAjBG,aAAA,GAiBH;EAGW;EAAgB,MAAA,EAlB3B,UAkB2B,CAlBhB,YAkBgB,CAAA;EAIvB;EAoBA,QAAA,EAAA,OAvCK,QAuCY;EAE7B;EAAA,SAAA,gBAAA,CAAA,EAtC4B,gBAsC5B;;EAKwB,OAAA,EAAA,CAAA,GAAA,EAxCT,GAwCS,EAAA,GAAA,IAAA;CAAA;;KApCb,mBAAA;;UAEH,WAAW;;qBAGA;;;cAIP,wBAAyB,wBAAsB;;;;;;;;;;cAoB/C,kBAAiB;;;;cAOlB"}
1
+ {"version":3,"file":"createPrismic.d.cts","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAQwD,KAOnD,gBAAA,GAAgB;EAML;;;;;EAe+C,YAAA,CAAA,EAf/C,oBAe+C;EAOnD;EAEQ,qBAAA,CAAA,EArBK,kBAqBL;EAAX;EAGS,qBAAA,CAAA,EArBO,kBAqBP;EAGW;;;AAO7B;;;;EAKoC,iBAAA,CAAA,EA3Bf,qBA2Be,GA3BS,kBA2BT;AAIpC,CAAA;AAoBA;AAEC;;;AAKwB,KAnDb,aAAA,GAmDa;EAAA;UAjDhB,WAAW;;mBAGF;;8BAGW;;iBAGb;;;KAIJ,mBAAA;;UAEH,WAAW;;qBAGA;;;cAIP,wBAAyB,wBAAsB;;;;;;;;;;cAoB/C,kBAAiB;;;;cAOlB"}
package/dist/package.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region package.json
3
- var version = "5.3.0-pr.89.235a3d3";
3
+ var version = "5.3.0-pr.89.b55bfe4";
4
4
 
5
5
  //#endregion
6
6
  Object.defineProperty(exports, 'version', {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "5.3.0-pr.89.235a3d3";
2
+ var version = "5.3.0-pr.89.b55bfe4";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1,4 +1,4 @@
1
- import * as vue9 from "vue";
1
+ 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
@@ -64,7 +64,7 @@ type PrismicImageProps = {
64
64
  */
65
65
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
66
66
  });
67
- declare const __VLS_export: vue9.DefineComponent<({
67
+ declare const __VLS_export: vue11.DefineComponent<({
68
68
  /** The Prismic image field or thumbnail to render. */
69
69
  field: ImageField | ImageField<string>;
70
70
  /**
@@ -162,7 +162,7 @@ declare const __VLS_export: vue9.DefineComponent<({
162
162
  * densities will be used: 1, 2, 3.
163
163
  */
164
164
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
165
- }), {}, {}, {}, {}, vue9.ComponentOptionsMixin, vue9.ComponentOptionsMixin, {}, string, vue9.PublicProps, Readonly<({
165
+ }), {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<({
166
166
  /** The Prismic image field or thumbnail to render. */
167
167
  field: ImageField | ImageField<string>;
168
168
  /**
@@ -260,7 +260,7 @@ declare const __VLS_export: vue9.DefineComponent<({
260
260
  * densities will be used: 1, 2, 3.
261
261
  */
262
262
  pixelDensities: NonNullable<Parameters<typeof asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
263
- })> & Readonly<{}>, {}, {}, {}, {}, string, vue9.ComponentProvideOptions, false, {}, any>;
263
+ })> & Readonly<{}>, {}, {}, {}, {}, string, vue11.ComponentProvideOptions, false, {}, any>;
264
264
  declare const _default: typeof __VLS_export;
265
265
  //#endregion
266
266
  export { PrismicImageProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicImage.vue.d.ts","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;KAgNY,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;;;;;;;;;;EAsMH,MAAA,CAAA,EAhJZ,WAgJY,CAhJA,UAgJA,CAAA,OAhJkB,kBAgJlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,GAAA,YAAA,GAAA,UAAA;EAAA,cAGsB,CAAA,EAAA,KAAA;;;;;;;;;kBArIlC,YACA,kBAAkB;;cAiIlB,mBAAY;;SAtMV,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;oBADP,IAAA,CAAA,qBAAA;;SApET,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+C3B,YAAY,kBAAkB;;;;SAtD5B,aAAa;;;;;;gBAON,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA6D3B,YACA,kBAAkB;;cAiIN,iBAGU"}
1
+ {"version":3,"file":"PrismicImage.vue.d.ts","names":[],"sources":["../../src/PrismicImage.vue"],"sourcesContent":[],"mappings":";;;;;KAgNY,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;;;;;;;;;;EAsMH,MAAA,CAAA,EAhJZ,WAgJY,CAhJA,UAgJA,CAAA,OAhJkB,kBAgJlB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,GAAA,YAAA,GAAA,UAAA;EAAA,cAGsB,CAAA,EAAA,KAAA;;;;;;;;;kBArIlC,YACA,kBAAkB;;cAiIlB,oBAAY;;SAtMV,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;;cAiIN,iBAGU"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.cjs","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicLink.cjs","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || componentsConfig?.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.js","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicLink.js","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || componentsConfig?.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { ComponentOrTagName } from "./types.js";
2
- import * as vue0 from "vue";
2
+ 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
@@ -49,7 +49,7 @@ declare var __VLS_8: {};
49
49
  type __VLS_Slots = {} & {
50
50
  default?: (props: typeof __VLS_8) => any;
51
51
  };
52
- declare const __VLS_base: vue0.DefineComponent<({
52
+ declare const __VLS_base: vue16.DefineComponent<({
53
53
  /**
54
54
  * The link resolver used to resolve links.
55
55
  *
@@ -121,7 +121,7 @@ declare const __VLS_base: vue0.DefineComponent<({
121
121
  /** The Prismic document to render as a link. */
122
122
  document: PrismicDocument;
123
123
  field?: never;
124
- }), {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<({
124
+ }), {}, {}, {}, {}, vue16.ComponentOptionsMixin, vue16.ComponentOptionsMixin, {}, string, vue16.PublicProps, Readonly<({
125
125
  /**
126
126
  * The link resolver used to resolve links.
127
127
  *
@@ -193,7 +193,7 @@ declare const __VLS_base: vue0.DefineComponent<({
193
193
  /** The Prismic document to render as a link. */
194
194
  document: PrismicDocument;
195
195
  field?: never;
196
- })> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
196
+ })> & Readonly<{}>, {}, {}, {}, {}, string, vue16.ComponentProvideOptions, false, {}, any>;
197
197
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
198
198
  declare const _default: typeof __VLS_export;
199
199
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue.d.ts","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;KAyJY,gBAAA;EAAA;;;;;;;;AA8CX;EAkFI,YAAA,CAAA,EAtHW,oBAuHoB;EAK9B;;;;;EAhGI,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;;;;UA2FG,EA3FH,eA2FG;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,OAJxB,eAIwB,CAAA,CAAA;EACnC;;;;;;;;;iBAjIW;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,IAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cA8FP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
1
+ {"version":3,"file":"PrismicLink.vue.d.ts","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":[],"mappings":";;;;;;KAyJY,gBAAA;EAAA;;;;;;;;AA8CX;EAkFI,YAAA,CAAA,EAtHW,oBAuHoB;EAK9B;;;;;EAhGI,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;;;;UA2FG,EA3FH,eA2FG;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;;;;;;;;;iBAjIW;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;oBAAe,KAAA,CAAA,qBAAA;;;;;;;;;;iBAjCZ;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;SAIX;;;;;;;;;;;;iBA5BM;;;;;;iBAOA;;;;;;;;;sBAUK;;;;;;sBAOA;;;YASR;;;cA8FP,cAAqB,uBAAuB,YAAY;cAApB,iBACd;KACvB,wBAAwB;;YAEnB"}
@@ -44,7 +44,7 @@ var PrismicLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0
44
44
  const { componentsConfig } = require_createPrismic.usePrismic();
45
45
  const rawAttrs = (0, vue.computed)(() => {
46
46
  return (0, _prismicio_client.asLinkAttrs)(props.field || props.document, {
47
- linkResolver: props.linkResolver,
47
+ linkResolver: props.linkResolver || componentsConfig?.linkResolver,
48
48
  rel(args) {
49
49
  if (props.rel) return typeof props.rel === "function" ? props.rel(args) : props.rel;
50
50
  return args.isExternal ? defaultExternalRelAttribute : void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;;AAiBA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,qBAAqB,kCAAW;EAExC,MAAM,mCAA0B;AAC/B,6CAAmB,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM;IACpB,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B;;IAExD,CAAA;IACD;EAED,MAAM,oCAA2B;AAChC,UAAO,oCAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBACN,kBAAkB,yBAClB,2BACA,MAAM,qBACN,kBAAkB,yBAClB;IACH;EAGD,MAAM,gCAAuB;AAC5B,UAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB,GACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB;IACF;;sFAIgB,UAAA,MAAS,sDAAU,MAAA,MAAK,CAAA,EAAA;oCAGhC,qBAAA,KAAA,QAAA,WAAA,EAAA,QAAA,mDADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,OAAS,EAAA,EAAA"}
1
+ {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || componentsConfig?.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;;AAiBA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,qBAAqB,kCAAW;EAExC,MAAM,mCAA0B;AAC/B,6CAAmB,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB,kBAAkB;IACtD,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B;;IAExD,CAAA;IACD;EAED,MAAM,oCAA2B;AAChC,UAAO,oCAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBACN,kBAAkB,yBAClB,2BACA,MAAM,qBACN,kBAAkB,yBAClB;IACH;EAGD,MAAM,gCAAuB;AAC5B,UAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB,GACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB;IACF;;sFAIgB,UAAA,MAAS,sDAAU,MAAA,MAAK,CAAA,EAAA;oCAGhC,qBAAA,KAAA,QAAA,WAAA,EAAA,QAAA,mDADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,OAAS,EAAA,EAAA"}
@@ -44,7 +44,7 @@ var PrismicLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
44
44
  const { componentsConfig } = usePrismic();
45
45
  const rawAttrs = computed(() => {
46
46
  return asLinkAttrs(props.field || props.document, {
47
- linkResolver: props.linkResolver,
47
+ linkResolver: props.linkResolver || componentsConfig?.linkResolver,
48
48
  rel(args) {
49
49
  if (props.rel) return typeof props.rel === "function" ? props.rel(args) : props.rel;
50
50
  return args.isExternal ? defaultExternalRelAttribute : void 0;
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;;AAiBA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,qBAAqB,YAAW;EAExC,MAAM,WAAW,eAAe;AAC/B,UAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM;IACpB,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B;;IAExD,CAAA;IACD;EAED,MAAM,YAAY,eAAe;AAChC,UAAO,cAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBACN,kBAAkB,yBAClB,2BACA,MAAM,qBACN,kBAAkB,yBAClB;IACH;EAGD,MAAM,QAAQ,eAAe;AAC5B,UAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB,GACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB;IACF;;uBAIA,YAIY,wBAJI,UAAA,MAAS,EAAA,eAAA,mBAAU,MAAA,MAAK,CAAA,EAAA;2BAGhC,CAFP,WAEO,KAAA,QAAA,WAAA,EAAA,QAAA,iCADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,OAAS,EAAA,EAAA"}
1
+ {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { isInternalURL } from \"./lib/isInternalURL\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport { usePrismic } from \"./createPrismic\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic\n\t * repository's content, a link resolver does not need to be provided.\n\t *\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if\n\t * the link's URL is external. This prop can be provided a function to use the\n\t * link's metadata to determine the `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link\n\t * component, provide the Link component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { componentsConfig } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || componentsConfig?.linkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent ||\n\t\t\t\tcomponentsConfig?.linkInternalComponent ||\n\t\t\t\tdefaultInternalComponent\n\t\t: props.externalComponent ||\n\t\t\t\tcomponentsConfig?.linkExternalComponent ||\n\t\t\t\tdefaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;;AAiBA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,qBAAqB,YAAW;EAExC,MAAM,WAAW,eAAe;AAC/B,UAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB,kBAAkB;IACtD,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B;;IAExD,CAAA;IACD;EAED,MAAM,YAAY,eAAe;AAChC,UAAO,cAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBACN,kBAAkB,yBAClB,2BACA,MAAM,qBACN,kBAAkB,yBAClB;IACH;EAGD,MAAM,QAAQ,eAAe;AAC5B,UAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB,GACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;IACrB;IACF;;uBAIA,YAIY,wBAJI,UAAA,MAAS,EAAA,eAAA,mBAAU,MAAA,MAAK,CAAA,EAAA;2BAGhC,CAFP,WAEO,KAAA,QAAA,WAAA,EAAA,QAAA,iCADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,OAAS,EAAA,EAAA"}
@@ -1,6 +1,6 @@
1
1
  import { ComponentOrTagName } from "../types.js";
2
2
  import { VueRichTextComponents } from "./types.js";
3
- import * as vue19 from "vue";
3
+ import * as vue0 from "vue";
4
4
  import { PropType } from "vue";
5
5
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
6
 
@@ -40,7 +40,7 @@ type PrismicRichTextProps = {
40
40
  */
41
41
  fallback?: ComponentOrTagName;
42
42
  };
43
- declare const __VLS_export: vue19.DefineComponent<vue19.ExtractPropTypes<{
43
+ declare const __VLS_export: vue0.DefineComponent<vue0.ExtractPropTypes<{
44
44
  field: {
45
45
  type: PropType<PrismicRichTextProps["field"]>;
46
46
  };
@@ -53,7 +53,7 @@ declare const __VLS_export: vue19.DefineComponent<vue19.ExtractPropTypes<{
53
53
  fallback: {
54
54
  type: PropType<PrismicRichTextProps["fallback"]>;
55
55
  };
56
- }>, {}, {}, {}, {}, vue19.ComponentOptionsMixin, vue19.ComponentOptionsMixin, {}, string, vue19.PublicProps, Readonly<vue19.ExtractPropTypes<{
56
+ }>, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<vue0.ExtractPropTypes<{
57
57
  field: {
58
58
  type: PropType<PrismicRichTextProps["field"]>;
59
59
  };
@@ -66,7 +66,7 @@ declare const __VLS_export: vue19.DefineComponent<vue19.ExtractPropTypes<{
66
66
  fallback: {
67
67
  type: PropType<PrismicRichTextProps["fallback"]>;
68
68
  };
69
- }>> & Readonly<{}>, {}, {}, {}, {}, string, vue19.ComponentProvideOptions, true, {}, any>;
69
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, true, {}, any>;
70
70
  declare const _default: typeof __VLS_export;
71
71
  //#endregion
72
72
  export { PrismicRichTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.ts","names":[],"sources":["../../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;KAwKY,oBAAA;;EAAA,KAAA,EAEJ,aAFI,GAAoB,IAAA,GAAA,SAAA;EAExB;;;;;AAkCP;;;;EA6HmB,YAAA,CAAA,EApJJ,oBAoJI;EAGO;;;;;;;;;;;;;;EAIxB,UAAA,CAAA,EA3IW,qBA2IX;EADmC;;;;aApI1B;;cAwHN,YAAY,QAAA,eAAA,CAY4B,KAAA,CAZ5B,gBAAA,CAAA;EAAA,KAAA,EAAA;UAGU,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;oBAbe,KAAA,CAAA,qBAAA,uEAY4B,KAAA,CAAA;;UATlB,SAAS;;;UAGjB,SAAS;;;UAGX,SAAS;;;UAGW,SACnC;;;cAbe,iBAkBU"}
1
+ {"version":3,"file":"PrismicRichText.vue.d.ts","names":[],"sources":["../../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":[],"mappings":";;;;;;;;KAwKY,oBAAA;;EAAA,KAAA,EAEJ,aAFI,GAAoB,IAAA,GAAA,SAAA;EAExB;;;;;AAkCP;;;;EA6HmB,YAAA,CAAA,EApJJ,oBAoJI;EAGO;;;;;;;;;;;;;;EAIxB,UAAA,CAAA,EA3IW,qBA2IX;EADmC;;;;aApI1B;;cAwHN,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"}
@@ -2,7 +2,7 @@ import { ComponentOrTagName } from "../types.js";
2
2
  import { VueRichTextComponents } from "../PrismicRichText/types.js";
3
3
  import "../PrismicRichText/index.js";
4
4
  import { VueTableComponents } from "./types.js";
5
- import * as vue26 from "vue";
5
+ import * as vue6 from "vue";
6
6
  import { TableField } from "@prismicio/client";
7
7
 
8
8
  //#region src/PrismicTable/PrismicTable.vue.d.ts
@@ -31,7 +31,7 @@ type PrismicTableProps = {
31
31
  */
32
32
  fallback?: ComponentOrTagName;
33
33
  };
34
- declare const __VLS_export: vue26.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue26.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>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  //#endregion
37
37
  export { PrismicTableProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue.d.ts","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;KAoIY,iBAAA;;SAEJ;EAFI;;;;;;AAyBX;;;;;;;;EA2JiB,UAAA,CAAA,EAlKJ,kBAkKI,GAlKiB,qBAkKjB;EAAA;;AAAA;;aA5JN;;cA4JN,cAAY,KAAA,CAAA,gBAAA,mCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,qBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicTable.vue.d.ts","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;KAoIY,iBAAA;;SAEJ;EAFI;;;;;;AAyBX;;;;;;;;EA2JiB,UAAA,CAAA,EAlKJ,kBAkKI,GAlKiB,qBAkKjB;EAAA;;AAAA;;aA5JN;;cA4JN,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,4 +1,4 @@
1
- import * as vue4 from "vue";
1
+ import * as vue21 from "vue";
2
2
  import { RichTextField } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicText.vue.d.ts
@@ -18,7 +18,7 @@ type PrismicTextProps = {
18
18
  */
19
19
  separator?: string;
20
20
  };
21
- declare const __VLS_export: vue4.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue4.ComponentOptionsMixin, vue4.ComponentOptionsMixin, {}, string, vue4.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue4.ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: vue21.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue21.ComponentOptionsMixin, vue21.ComponentOptionsMixin, {}, string, vue21.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue21.ComponentProvideOptions, false, {}, any>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  //#endregion
24
24
  export { PrismicTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAyDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAoDF;;;;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA;;;;;EAAA,SAAA,CAAA,EAAA,MAAA;AAAA,CAAA;cAAZ,cAAY,IAAA,CAAA,gBAAA,kCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAyDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAoDF;;;;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"}
@@ -1,5 +1,5 @@
1
1
  import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.js";
2
- import * as vue14 from "vue";
2
+ import * as vue26 from "vue";
3
3
 
4
4
  //#region src/SliceZone/SliceZone.vue.d.ts
5
5
 
@@ -22,7 +22,7 @@ type SliceZoneProps<TContext = unknown> = {
22
22
  context?: TContext;
23
23
  };
24
24
  type __VLS_Props = SliceZoneProps;
25
- declare const __VLS_export: vue14.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: vue26.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue26.ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  //#endregion
28
28
  export { SliceZoneProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"createPrismic.cjs","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport type { VueRichTextComponents } from \"./PrismicRichText\"\nimport type { VueTableComponents } from \"./PrismicTable\"\n\nconst prismicKey = Symbol.for(\n\t\"@prismicio/vue/plugin\",\n) as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for Rich Text and Table\n\t * fields.\n\t */\n\tdefaultComponents?: VueRichTextComponents & VueTableComponents\n}\n\n/**\n * Prismic Vue plugin interface accessible through `usePrismic()` and\n * `$prismic`.\n */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/** @internal */\n\treadonly componentsConfig?: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Components configuration. */\n\tcomponentsConfig?: ComponentsConfig\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n *\n * ```typescript\n * const { client, isFilled } = usePrismic()\n * ```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { componentsConfig: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;;AAUA,MAAM,aAAa,OAAO,IACzB,wBACA;;AA6CD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;;AAYF,MAAa,mBAAkC;AAC9C,wBAAc,YAAY,EAAE,kBAAkB,EAAE,EAAE,CAAkB"}
1
+ {"version":3,"file":"createPrismic.cjs","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport type { VueRichTextComponents } from \"./PrismicRichText\"\nimport type { VueTableComponents } from \"./PrismicTable\"\n\nconst prismicKey = Symbol.for(\n\t\"@prismicio/vue/plugin\",\n) as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/**\n\t * The default link resolver used to resolve links.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table\n\t * components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\tdefaultComponents?: VueRichTextComponents & VueTableComponents\n}\n\n/**\n * Prismic Vue plugin interface accessible through `usePrismic()` and\n * `$prismic`.\n */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/** @internal */\n\treadonly componentsConfig?: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Components configuration. */\n\tcomponentsConfig?: ComponentsConfig\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n *\n * ```typescript\n * const { client, isFilled } = usePrismic()\n * ```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { componentsConfig: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;;AAUA,MAAM,aAAa,OAAO,IACzB,wBACA;;AAuDD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;;AAYF,MAAa,mBAAkC;AAC9C,wBAAc,YAAY,EAAE,kBAAkB,EAAE,EAAE,CAAkB"}
@@ -4,18 +4,27 @@ import "./PrismicRichText/index.js";
4
4
  import { VueTableComponents } from "./PrismicTable/types.js";
5
5
  import "./PrismicTable/index.js";
6
6
  import { App } from "vue";
7
- import { CreateClient, isFilled } from "@prismicio/client";
7
+ import { CreateClient, LinkResolverFunction, isFilled } from "@prismicio/client";
8
8
 
9
9
  //#region src/createPrismic.d.ts
10
10
  /** Components configuration. */
11
11
  type ComponentsConfig = {
12
+ /**
13
+ * The default link resolver used to resolve links.
14
+ *
15
+ * @see {@link https://prismic.io/docs/routes}
16
+ */
17
+ linkResolver?: LinkResolverFunction;
12
18
  /** The default component rendered for internal URLs. */
13
19
  linkInternalComponent?: ComponentOrTagName;
14
20
  /** The default component rendered for external URLs. */
15
21
  linkExternalComponent?: ComponentOrTagName;
16
22
  /**
17
- * The default components or shorthand definitions for Rich Text and Table
18
- * fields.
23
+ * The default components or shorthand definitions for rich text and table
24
+ * components.
25
+ *
26
+ * @see {@link https://prismic.io/docs/fields/rich-text}
27
+ * @see {@link https://prismic.io/docs/fields/table}
19
28
  */
20
29
  defaultComponents?: VueRichTextComponents & VueTableComponents;
21
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"createPrismic.d.ts","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAeK,gBAAA;;EAAA,qBAAgB,CAAA,EAEI,kBAFJ;EAEI;EAGA,qBAAA,CAAA,EAAA,kBAAA;EAMJ;;;AAOrB;EAEoB,iBAAA,CAAA,EATC,qBASD,GATyB,kBASzB;CAAX;;;;;AAaG,KAfA,aAAA,GAemB;EAEX;EAAX,MAAA,EAfA,UAeA,CAfW,YAeX,CAAA;EAGW;EAAgB,QAAA,EAAA,OAflB,QAekB;EAIvB;EAoBA,SAAA,gBAAiB,CAAA,EApCD,gBAsC5B;EAAA;EAAA,OAAA,EAAA,CAAA,GAAA,EAnCe,GAmCf,EAAA,GAAA,IAAA;;;AAKwB,KApCb,mBAAA,GAoCa;;UAlChB,WAAW;;qBAGA;;;cAIP,wBAAyB,wBAAsB;;;;;;;;;;cAoB/C,kBAAiB;;;;cAOlB"}
1
+ {"version":3,"file":"createPrismic.d.ts","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAeK,gBAAA;;AAPmD;;;;EA4BnC,YAAA,CAAA,EAfL,oBAeK;EAAwB;EAAkB,qBAAA,CAAA,EAZtC,kBAYsC;EAOnD;EAEQ,qBAAA,CAAA,EAlBK,kBAkBL;EAAX;;;;;AAaT;;EAES,iBAAA,CAAA,EAxBY,qBAwBZ,GAxBoC,kBAwBpC;CAGW;;AAIpB;AAoBA;AAEC;AAAA,KA9CW,aAAA,GA8CX;;EAKwB,MAAA,EAjDhB,UAiDgB,CAjDL,YAiDK,CAAA;EAAA;mBA9CP;;8BAGW;;iBAGb;;;KAIJ,mBAAA;;UAEH,WAAW;;qBAGA;;;cAIP,wBAAyB,wBAAsB;;;;;;;;;;cAoB/C,kBAAiB;;;;cAOlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"createPrismic.js","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport type { VueRichTextComponents } from \"./PrismicRichText\"\nimport type { VueTableComponents } from \"./PrismicTable\"\n\nconst prismicKey = Symbol.for(\n\t\"@prismicio/vue/plugin\",\n) as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for Rich Text and Table\n\t * fields.\n\t */\n\tdefaultComponents?: VueRichTextComponents & VueTableComponents\n}\n\n/**\n * Prismic Vue plugin interface accessible through `usePrismic()` and\n * `$prismic`.\n */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/** @internal */\n\treadonly componentsConfig?: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Components configuration. */\n\tcomponentsConfig?: ComponentsConfig\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n *\n * ```typescript\n * const { client, isFilled } = usePrismic()\n * ```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { componentsConfig: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;;AAUA,MAAM,aAAa,OAAO,IACzB,wBACA;;AA6CD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;;AAYF,MAAa,mBAAkC;AAC9C,QAAO,OAAO,YAAY,EAAE,kBAAkB,EAAE,EAAE,CAAkB"}
1
+ {"version":3,"file":"createPrismic.js","names":[],"sources":["../../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\nimport type { VueRichTextComponents } from \"./PrismicRichText\"\nimport type { VueTableComponents } from \"./PrismicTable\"\n\nconst prismicKey = Symbol.for(\n\t\"@prismicio/vue/plugin\",\n) as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/**\n\t * The default link resolver used to resolve links.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table\n\t * components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\tdefaultComponents?: VueRichTextComponents & VueTableComponents\n}\n\n/**\n * Prismic Vue plugin interface accessible through `usePrismic()` and\n * `$prismic`.\n */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/** @internal */\n\treadonly componentsConfig?: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Components configuration. */\n\tcomponentsConfig?: ComponentsConfig\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n *\n * ```typescript\n * const { client, isFilled } = usePrismic()\n * ```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { componentsConfig: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;;AAUA,MAAM,aAAa,OAAO,IACzB,wBACA;;AAuDD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;;AAYF,MAAa,mBAAkC;AAC9C,QAAO,OAAO,YAAY,EAAE,kBAAkB,EAAE,EAAE,CAAkB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/vue",
3
- "version": "5.3.0-pr.89.235a3d3",
3
+ "version": "5.3.0-pr.89.b55bfe4",
4
4
  "description": "Vue plugin, components, and composables to fetch and present Prismic content",
5
5
  "keywords": [
6
6
  "typescript",
@@ -79,7 +79,7 @@ const { componentsConfig } = usePrismic()
79
79
 
80
80
  const rawAttrs = computed(() => {
81
81
  return asLinkAttrs(props.field || props.document, {
82
- linkResolver: props.linkResolver,
82
+ linkResolver: props.linkResolver || componentsConfig?.linkResolver,
83
83
  rel(args) {
84
84
  if (props.rel) {
85
85
  return typeof props.rel === "function" ? props.rel(args) : props.rel
@@ -1,4 +1,4 @@
1
- import type { CreateClient } from "@prismicio/client"
1
+ import type { CreateClient, LinkResolverFunction } from "@prismicio/client"
2
2
  import { isFilled } from "@prismicio/client"
3
3
  import type { App, InjectionKey } from "vue"
4
4
  import { inject } from "vue"
@@ -14,6 +14,13 @@ const prismicKey = Symbol.for(
14
14
 
15
15
  /** Components configuration. */
16
16
  type ComponentsConfig = {
17
+ /**
18
+ * The default link resolver used to resolve links.
19
+ *
20
+ * @see {@link https://prismic.io/docs/routes}
21
+ */
22
+ linkResolver?: LinkResolverFunction
23
+
17
24
  /** The default component rendered for internal URLs. */
18
25
  linkInternalComponent?: ComponentOrTagName
19
26
 
@@ -21,8 +28,11 @@ type ComponentsConfig = {
21
28
  linkExternalComponent?: ComponentOrTagName
22
29
 
23
30
  /**
24
- * The default components or shorthand definitions for Rich Text and Table
25
- * fields.
31
+ * The default components or shorthand definitions for rich text and table
32
+ * components.
33
+ *
34
+ * @see {@link https://prismic.io/docs/fields/rich-text}
35
+ * @see {@link https://prismic.io/docs/fields/table}
26
36
  */
27
37
  defaultComponents?: VueRichTextComponents & VueTableComponents
28
38
  }