@prismicio/vue 6.1.3 → 6.1.4-pr.98.764fac2

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 (170) hide show
  1. package/dist/PrismicImage.cjs.map +1 -1
  2. package/dist/PrismicImage.js.map +1 -1
  3. package/dist/PrismicImage.vue.d.cts +14 -11
  4. package/dist/PrismicImage.vue.d.cts.map +1 -1
  5. package/dist/PrismicImage.vue.d.ts +14 -11
  6. package/dist/PrismicImage.vue.d.ts.map +1 -1
  7. package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs +1 -1
  8. package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  9. package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js +1 -1
  10. package/dist/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  11. package/dist/PrismicLink.cjs.map +1 -1
  12. package/dist/PrismicLink.js.map +1 -1
  13. package/dist/PrismicLink.vue.d.cts +17 -13
  14. package/dist/PrismicLink.vue.d.cts.map +1 -1
  15. package/dist/PrismicLink.vue.d.ts +17 -13
  16. package/dist/PrismicLink.vue.d.ts.map +1 -1
  17. package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +3 -3
  18. package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  19. package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js +3 -3
  20. package/dist/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  21. package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -1
  22. package/dist/PrismicRichText/PrismicRichText.js.map +1 -1
  23. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +8 -9
  24. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  25. package/dist/PrismicRichText/PrismicRichText.vue.d.ts +7 -8
  26. package/dist/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  27. package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +1 -1
  28. package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  29. package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +1 -1
  30. package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  31. package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +1 -1
  32. package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  33. package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +1 -1
  34. package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +1 -1
  36. package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  37. package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +1 -1
  38. package/dist/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
  39. package/dist/PrismicRichText/getRichTextComponentProps.cjs +2 -2
  40. package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -1
  41. package/dist/PrismicRichText/getRichTextComponentProps.d.cts +3 -4
  42. package/dist/PrismicRichText/getRichTextComponentProps.d.cts.map +1 -1
  43. package/dist/PrismicRichText/getRichTextComponentProps.d.ts +2 -3
  44. package/dist/PrismicRichText/getRichTextComponentProps.d.ts.map +1 -1
  45. package/dist/PrismicRichText/getRichTextComponentProps.js +2 -2
  46. package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -1
  47. package/dist/PrismicRichText/index.d.cts +2 -1
  48. package/dist/PrismicRichText/index.d.ts +2 -1
  49. package/dist/PrismicRichText/types.d.cts +1 -2
  50. package/dist/PrismicRichText/types.d.cts.map +1 -1
  51. package/dist/PrismicRichText/types.d.ts +1 -2
  52. package/dist/PrismicRichText/types.d.ts.map +1 -1
  53. package/dist/PrismicTable/PrismicTable.cjs.map +1 -1
  54. package/dist/PrismicTable/PrismicTable.js.map +1 -1
  55. package/dist/PrismicTable/PrismicTable.vue.d.cts +6 -6
  56. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  57. package/dist/PrismicTable/PrismicTable.vue.d.ts +6 -6
  58. package/dist/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  59. package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +1 -1
  60. package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  61. package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +1 -1
  62. package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
  64. package/dist/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
  65. package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +1 -1
  66. package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  67. package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js +1 -1
  68. package/dist/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  69. package/dist/PrismicTable/getTableComponentProps.cjs +6 -6
  70. package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -1
  71. package/dist/PrismicTable/getTableComponentProps.d.cts +8 -10
  72. package/dist/PrismicTable/getTableComponentProps.d.cts.map +1 -1
  73. package/dist/PrismicTable/getTableComponentProps.d.ts +7 -9
  74. package/dist/PrismicTable/getTableComponentProps.d.ts.map +1 -1
  75. package/dist/PrismicTable/getTableComponentProps.js +6 -6
  76. package/dist/PrismicTable/getTableComponentProps.js.map +1 -1
  77. package/dist/PrismicTable/index.d.cts +2 -1
  78. package/dist/PrismicTable/index.d.ts +2 -1
  79. package/dist/PrismicTable/types.d.cts +0 -1
  80. package/dist/PrismicTable/types.d.cts.map +1 -1
  81. package/dist/PrismicTable/types.d.ts +0 -1
  82. package/dist/PrismicTable/types.d.ts.map +1 -1
  83. package/dist/PrismicText.vue.d.cts +4 -5
  84. package/dist/PrismicText.vue.d.cts.map +1 -1
  85. package/dist/PrismicText.vue.d.ts +4 -5
  86. package/dist/PrismicText.vue.d.ts.map +1 -1
  87. package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs +1 -1
  88. package/dist/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  89. package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js +1 -1
  90. package/dist/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  91. package/dist/SliceSimulator.vue.d.cts +14 -15
  92. package/dist/SliceSimulator.vue.d.cts.map +1 -1
  93. package/dist/SliceSimulator.vue.d.ts +14 -15
  94. package/dist/SliceSimulator.vue.d.ts.map +1 -1
  95. package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs +1 -1
  96. package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  97. package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js +1 -1
  98. package/dist/SliceSimulator.vue_vue_type_script_setup_true_lang.js.map +1 -1
  99. package/dist/SliceZone/SliceZone.vue.d.cts +9 -7
  100. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  101. package/dist/SliceZone/SliceZone.vue.d.ts +9 -7
  102. package/dist/SliceZone/SliceZone.vue.d.ts.map +1 -1
  103. package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs +1 -1
  104. package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  105. package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js +1 -1
  106. package/dist/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  107. package/dist/SliceZone/TODOSliceComponent.cjs.map +1 -1
  108. package/dist/SliceZone/TODOSliceComponent.d.cts +0 -1
  109. package/dist/SliceZone/TODOSliceComponent.d.cts.map +1 -1
  110. package/dist/SliceZone/TODOSliceComponent.d.ts +0 -1
  111. package/dist/SliceZone/TODOSliceComponent.d.ts.map +1 -1
  112. package/dist/SliceZone/TODOSliceComponent.js.map +1 -1
  113. package/dist/SliceZone/defineSliceZoneComponents.cjs +1 -1
  114. package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -1
  115. package/dist/SliceZone/defineSliceZoneComponents.d.cts +1 -2
  116. package/dist/SliceZone/defineSliceZoneComponents.d.cts.map +1 -1
  117. package/dist/SliceZone/defineSliceZoneComponents.d.ts +1 -2
  118. package/dist/SliceZone/defineSliceZoneComponents.d.ts.map +1 -1
  119. package/dist/SliceZone/defineSliceZoneComponents.js +1 -1
  120. package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -1
  121. package/dist/SliceZone/getSliceComponentProps.cjs +2 -2
  122. package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -1
  123. package/dist/SliceZone/getSliceComponentProps.d.cts +2 -3
  124. package/dist/SliceZone/getSliceComponentProps.d.cts.map +1 -1
  125. package/dist/SliceZone/getSliceComponentProps.d.ts +2 -3
  126. package/dist/SliceZone/getSliceComponentProps.d.ts.map +1 -1
  127. package/dist/SliceZone/getSliceComponentProps.js +2 -2
  128. package/dist/SliceZone/getSliceComponentProps.js.map +1 -1
  129. package/dist/SliceZone/index.d.cts +2 -1
  130. package/dist/SliceZone/index.d.ts +2 -1
  131. package/dist/SliceZone/types.d.cts +8 -5
  132. package/dist/SliceZone/types.d.cts.map +1 -1
  133. package/dist/SliceZone/types.d.ts +8 -5
  134. package/dist/SliceZone/types.d.ts.map +1 -1
  135. package/dist/createPrismic.cjs +1 -1
  136. package/dist/createPrismic.cjs.map +1 -1
  137. package/dist/createPrismic.d.cts +18 -9
  138. package/dist/createPrismic.d.cts.map +1 -1
  139. package/dist/createPrismic.d.ts +17 -8
  140. package/dist/createPrismic.d.ts.map +1 -1
  141. package/dist/createPrismic.js +1 -1
  142. package/dist/createPrismic.js.map +1 -1
  143. package/dist/index.cjs +7 -7
  144. package/dist/index.d.cts +10 -7
  145. package/dist/index.d.ts +10 -7
  146. package/dist/lib/devMsg.cjs +1 -1
  147. package/dist/lib/devMsg.cjs.map +1 -1
  148. package/dist/lib/devMsg.js +1 -1
  149. package/dist/lib/devMsg.js.map +1 -1
  150. package/dist/lib/isInternalURL.cjs.map +1 -1
  151. package/dist/lib/isInternalURL.js.map +1 -1
  152. package/dist/package.cjs +1 -1
  153. package/dist/package.js +1 -1
  154. package/dist/types.cjs.map +1 -1
  155. package/dist/types.d.cts +3 -2
  156. package/dist/types.d.cts.map +1 -1
  157. package/dist/types.d.ts +3 -2
  158. package/dist/types.d.ts.map +1 -1
  159. package/dist/types.js.map +1 -1
  160. package/package.json +17 -17
  161. package/src/PrismicImage.vue +1 -1
  162. package/src/PrismicLink.vue +2 -2
  163. package/src/PrismicRichText/PrismicRichText.vue +1 -1
  164. package/src/PrismicRichText/getRichTextComponentProps.ts +2 -2
  165. package/src/PrismicTable/PrismicTable.vue +1 -1
  166. package/src/PrismicTable/getTableComponentProps.ts +6 -6
  167. package/src/SliceZone/defineSliceZoneComponents.ts +1 -1
  168. package/src/SliceZone/getSliceComponentProps.ts +2 -2
  169. package/src/createPrismic.ts +1 -1
  170. package/src/lib/devMsg.ts +1 -1
@@ -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 { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\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 repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see {@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 the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `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 component, provide the Link\n\t * 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 { linkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || 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 || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\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":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,eAAe,sBAAA,YAAW;EAEhD,MAAM,YAAA,GAAA,IAAA,gBAA0B;AAC/B,WAAA,GAAA,kBAAA,aAAmB,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B,KAAA;;IAExD,CAAA;IACD;EAED,MAAM,aAAA,GAAA,IAAA,gBAA2B;AAChC,UAAO,sBAAA,cAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;IACnE;EAGD,MAAM,SAAA,GAAA,IAAA,gBAAuB;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,GAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,oBAAU,MAAA,MAAK,CAAA,EAAA;oCAGhC,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,WAAA,EAAA,QAAA,EAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,EAAS,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
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 { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\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 repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see {@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 the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `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 component, provide the Link\n\t * 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 { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\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 || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\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":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,oBAAoB,eAAe,sBAAA,WAAW;EAEpE,MAAM,YAAA,GAAW,IAAA,SAAA,OAAe;GAC/B,QAAA,GAAO,kBAAA,YAAA,CAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;KACT,IAAI,MAAM,KACT,OAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,IAAI,IAAI,MAAM;KAGlE,OAAO,KAAK,aAAa,8BAA8B,KAAA;IACxD;GACD,CAAC;EACF,CAAC;EAED,MAAM,aAAA,GAAY,IAAA,SAAA,OAAe;GAChC,OAAO,sBAAA,cAAc,SAAS,MAAM,QAAQ,EAAE,IAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;EACpE,CAAC;EAGD,MAAM,SAAA,GAAQ,IAAA,SAAA,OAAe;GAC5B,OAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB,IACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB;EACH,CAAC;;GAIA,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAIY,IAAA,wBAAA,CAJI,UAAA,KAAS,IAAA,GAAA,IAAA,eAAA,EAAA,GAAA,IAAA,mBAAA,CAAU,MAAA,KAAK,CAAA,GAAA;IACvC,UAAA,GAAA,IAAA,QAAA,OAEO,EAAA,GAFP,IAAA,WAAA,CAEO,KAAA,QAAA,WAAA,CAAA,SAAA,EAAA,GADH,IAAA,gBAAA,EAAA,GAAA,IAAA,gBAAA,CAAA,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -9,7 +9,7 @@ const defaultInternalComponent = "router-link";
9
9
  const defaultExternalComponent = "a";
10
10
  /** The default rel attribute rendered for external URLs. */
11
11
  const defaultExternalRelAttribute = "noreferrer";
12
- var PrismicLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
12
+ var PrismicLink_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
13
13
  name: "PrismicLink",
14
14
  __name: "PrismicLink",
15
15
  props: {
@@ -40,10 +40,10 @@ var PrismicLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
40
40
  },
41
41
  setup(__props) {
42
42
  const props = __props;
43
- const { linkResolver, components } = usePrismic();
43
+ const { linkResolver: pluginLinkResolver, components } = usePrismic();
44
44
  const rawAttrs = computed(() => {
45
45
  return asLinkAttrs(props.field || props.document, {
46
- linkResolver: props.linkResolver || linkResolver,
46
+ linkResolver: props.linkResolver || pluginLinkResolver,
47
47
  rel(args) {
48
48
  if (props.rel) return typeof props.rel === "function" ? props.rel(args) : props.rel;
49
49
  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 { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\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 repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see {@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 the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `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 component, provide the Link\n\t * 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 { linkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || 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 || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\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":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,eAAe,YAAW;EAEhD,MAAM,WAAW,eAAe;AAC/B,UAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;AACT,SAAI,MAAM,IACT,QAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,KAAK,GAAG,MAAM;AAGlE,YAAO,KAAK,aAAa,8BAA8B,KAAA;;IAExD,CAAA;IACD;EAED,MAAM,YAAY,eAAe;AAChC,UAAO,cAAc,SAAS,MAAM,QAAQ,GAAE,GAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;IACnE;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,CAAA,gBAAA,gBADH,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,EAAS,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
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 { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\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 repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see {@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 the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `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 component, provide the Link\n\t * 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 { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\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 || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\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":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,oBAAoB,eAAe,WAAW;EAEpE,MAAM,WAAW,eAAe;GAC/B,OAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;KACT,IAAI,MAAM,KACT,OAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,IAAI,IAAI,MAAM;KAGlE,OAAO,KAAK,aAAa,8BAA8B,KAAA;IACxD;GACD,CAAC;EACF,CAAC;EAED,MAAM,YAAY,eAAe;GAChC,OAAO,cAAc,SAAS,MAAM,QAAQ,EAAE,IAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;EACpE,CAAC;EAGD,MAAM,QAAQ,eAAe;GAC5B,OAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB,IACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB;EACH,CAAC;;GAIA,OAAA,UAAA,GAAA,YAIY,wBAJI,UAAA,KAAS,GAAA,eAAA,mBAAU,MAAA,KAAK,CAAA,GAAA;IACvC,SAAA,cAEO,CAFP,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADH,gBAAA,gBAAA,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t;```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicRichText.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t;```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicRichText.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
@@ -1,13 +1,12 @@
1
1
  import { ComponentOrTagName } from "../types.cjs";
2
2
  import { RichTextComponents } from "./types.cjs";
3
- import * as _$vue from "vue";
4
- import { PropType } from "vue";
5
3
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
-
4
+ import { PropType } from "vue";
7
5
  //#region src/PrismicRichText/PrismicRichText.vue.d.ts
8
6
  /** Props for `<PrismicRichText />`. */
9
7
  type PrismicRichTextProps = {
10
- /** The Prismic rich text field to render. */field: RichTextField | null | undefined;
8
+ /** The Prismic rich text field to render. */
9
+ field: RichTextField | null | undefined;
11
10
  /**
12
11
  * The link resolver used to resolve links.
13
12
  *
@@ -21,7 +20,7 @@ type PrismicRichTextProps = {
21
20
  * An object that maps a rich text block type to a Vue component or a shorthand definition.
22
21
  *
23
22
  * @example
24
- * ;```javascript
23
+ * ```javascript
25
24
  * ;({
26
25
  * heading1: Heading1,
27
26
  * paragraph: { class: "prose" },
@@ -36,7 +35,7 @@ type PrismicRichTextProps = {
36
35
  */
37
36
  fallback?: ComponentOrTagName;
38
37
  };
39
- declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
40
39
  field: {
41
40
  type: PropType<PrismicRichTextProps["field"]>;
42
41
  };
@@ -49,7 +48,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
49
48
  fallback: {
50
49
  type: PropType<PrismicRichTextProps["fallback"]>;
51
50
  };
52
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
51
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
53
52
  field: {
54
53
  type: PropType<PrismicRichTextProps["field"]>;
55
54
  };
@@ -62,8 +61,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
62
61
  fallback: {
63
62
  type: PropType<PrismicRichTextProps["fallback"]>;
64
63
  };
65
- }>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
64
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
66
65
  declare const _default: typeof __VLS_export;
67
66
  //#endregion
68
- export { PrismicRichTextProps, _default };
67
+ export { PrismicRichTextProps, _default as default };
69
68
  //# sourceMappingURL=PrismicRichText.vue.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"mappings":";;;;;;;;KAiJY,oBAAA;+CAEX,KAAA,EAAO,aAAA;EAFwB;;;;;;;;EAY/B,YAAA,GAAe,oBAAA;EAVR;;;;;;;;;AA+BP;;;EAPA,UAAA,GAAa,kBAAA;EAiIc;;;;EA3H3B,QAAA,GAAW,kBAAA;AAAA;AAAA,cAwHN,YAAA,QAAY,eAAA,CAY4B,KAAA,CAZ5B,gBAAA;;UAGU,QAAA,CAAS,oBAAA;EAAA;;UAGjB,QAAA,CAAS,oBAAA;EAAA;;UAGX,QAAA,CAAS,oBAAA;EAAA;;UAGW,QAAA,CAAS,oBAAA;EAAA;AAAA,oBAZ7B,KAAA,CAAA,qBAAA,uEAY4B,KAAA,CAAA,gBAAA;;UATlB,QAAA,CAAS,oBAAA;EAAA;;UAGjB,QAAA,CAAS,oBAAA;EAAA;;UAGX,QAAA,CAAS,oBAAA;EAAA;;UAGW,QAAA,CAAS,oBAAA;EAAA;AAAA;+BAInB,YAAA"}
1
+ {"version":3,"file":"PrismicRichText.vue.d.cts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"mappings":";;;;;;KAiJY;;EAEX,OAAO;;;;;;;;;EAUP,eAAe;;;;;;;;;;;;;EAcf,aAAa;;;;;EAMb,WAAW;;cAwHN,4BAAY,8BAAA;;IAGU,MAAA,SAAS;;;IAGjB,MAAA,SAAS;;;IAGX,MAAA,SAAS;;;IAGW,MAAA,SAAS;;;;IATnB,MAAA,SAAS;;;IAGjB,MAAA,SAAS;;;IAGX,MAAA,SAAS;;;IAGW,MAAA,SAAS;;MAG7C,oDAAA;cACmB,iBAAO"}
@@ -1,13 +1,12 @@
1
1
  import { ComponentOrTagName } from "../types.js";
2
2
  import { RichTextComponents } from "./types.js";
3
- import * as _$vue from "vue";
4
3
  import { PropType } from "vue";
5
4
  import { LinkResolverFunction, RichTextField } from "@prismicio/client";
6
-
7
5
  //#region src/PrismicRichText/PrismicRichText.vue.d.ts
8
6
  /** Props for `<PrismicRichText />`. */
9
7
  type PrismicRichTextProps = {
10
- /** The Prismic rich text field to render. */field: RichTextField | null | undefined;
8
+ /** The Prismic rich text field to render. */
9
+ field: RichTextField | null | undefined;
11
10
  /**
12
11
  * The link resolver used to resolve links.
13
12
  *
@@ -21,7 +20,7 @@ type PrismicRichTextProps = {
21
20
  * An object that maps a rich text block type to a Vue component or a shorthand definition.
22
21
  *
23
22
  * @example
24
- * ;```javascript
23
+ * ```javascript
25
24
  * ;({
26
25
  * heading1: Heading1,
27
26
  * paragraph: { class: "prose" },
@@ -36,7 +35,7 @@ type PrismicRichTextProps = {
36
35
  */
37
36
  fallback?: ComponentOrTagName;
38
37
  };
39
- declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
38
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
40
39
  field: {
41
40
  type: PropType<PrismicRichTextProps["field"]>;
42
41
  };
@@ -49,7 +48,7 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
49
48
  fallback: {
50
49
  type: PropType<PrismicRichTextProps["fallback"]>;
51
50
  };
52
- }>, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<_$vue.ExtractPropTypes<{
51
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
53
52
  field: {
54
53
  type: PropType<PrismicRichTextProps["field"]>;
55
54
  };
@@ -62,8 +61,8 @@ declare const __VLS_export: _$vue.DefineComponent<_$vue.ExtractPropTypes<{
62
61
  fallback: {
63
62
  type: PropType<PrismicRichTextProps["fallback"]>;
64
63
  };
65
- }>> & Readonly<{}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, true, {}, any>;
64
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
66
65
  declare const _default: typeof __VLS_export;
67
66
  //#endregion
68
- export { PrismicRichTextProps, _default };
67
+ export { PrismicRichTextProps, _default as default };
69
68
  //# sourceMappingURL=PrismicRichText.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue.d.ts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"mappings":";;;;;;;;KAiJY,oBAAA;+CAEX,KAAA,EAAO,aAAA;EAFwB;;;;;;;;EAY/B,YAAA,GAAe,oBAAA;EAVR;;;;;;;;;AA+BP;;;EAPA,UAAA,GAAa,kBAAA;EAiIc;;;;EA3H3B,QAAA,GAAW,kBAAA;AAAA;AAAA,cAwHN,YAAA,QAAY,eAAA,CAY4B,KAAA,CAZ5B,gBAAA;;UAGU,QAAA,CAAS,oBAAA;EAAA;;UAGjB,QAAA,CAAS,oBAAA;EAAA;;UAGX,QAAA,CAAS,oBAAA;EAAA;;UAGW,QAAA,CAAS,oBAAA;EAAA;AAAA,oBAZ7B,KAAA,CAAA,qBAAA,uEAY4B,KAAA,CAAA,gBAAA;;UATlB,QAAA,CAAS,oBAAA;EAAA;;UAGjB,QAAA,CAAS,oBAAA;EAAA;;UAGX,QAAA,CAAS,oBAAA;EAAA;;UAGW,QAAA,CAAS,oBAAA;EAAA;AAAA;+BAInB,YAAA"}
1
+ {"version":3,"file":"PrismicRichText.vue.d.ts","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"mappings":";;;;;;KAiJY;;EAEX,OAAO;;;;;;;;;EAUP,eAAe;;;;;;;;;;;;;EAcf,aAAa;;;;;EAMb,WAAW;;cAwHN,4BAAY,8BAAA;;IAGU,MAAA,SAAS;;;IAGjB,MAAA,SAAS;;;IAGX,MAAA,SAAS;;;IAGW,MAAA,SAAS;;;;IATnB,MAAA,SAAS;;;IAGjB,MAAA,SAAS;;;IAGX,MAAA,SAAS;;;IAGW,MAAA,SAAS;;MAG7C,oDAAA;cACmB,iBAAO"}
@@ -5,7 +5,7 @@ const require_PrismicRichTextSerialize = require("./PrismicRichTextSerialize.cjs
5
5
  let vue = require("vue");
6
6
  let _prismicio_client_richtext = require("@prismicio/client/richtext");
7
7
  //#region src/PrismicRichText/PrismicRichText.vue?vue&type=script&setup=true&lang.ts
8
- var PrismicRichText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
8
+ var PrismicRichText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
9
9
  name: "PrismicRichText",
10
10
  __name: "PrismicRichText",
11
11
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t;```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,sBAAA,YAAW;EAEf,MAAM,sBAAA,GAAA,IAAA,gBAAwD;AAC7D,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,MAAM,YAAA,GAAA,IAAA,gBAA0B;AAC/B,WAAA,GAAA,2BAAA,QAAc,MAAM,SAAS,EAAE,CAAC,CAAC;IACjC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;AAK7D,OAAI,cAAA,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,wCAAA;IACJ,cAAc,MAAM;IACpB,WAAW;IACZ;;EAGD,MAAM,sBAAA,GAAA,IAAA,gBAAgE;AACrE,UAAO;IACN,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,WAAW,qBAAqB,YAAY;IAC5C,cAAc,qBAAqB,eAAe;IAClD,QAAQ,qBAAqB,SAAS;IACtC,IAAI,qBAAqB,KAAK;IAC9B,aAAa,qBAAqB,WAAW;IAC7C,eAAe,qBAAqB,YAAY;IAChD,mBAAmB,qBAAqB,OAAO;IAC/C,qBAAqB,qBAAqB,QAAQ;IAClD,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,WAAW,qBAAqB,YAAY;IAC5C,OAAO,qBAAqB,QAAQ;IACpC,MAAM,qBAAqB,OAAO;IACnC;IACA;;UAKO,SAAA,MAAS,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAGd,iCAAA,SAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;uDAED,QAAA,aAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBAAe,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA"}
1
+ {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,sBAAA,WAAW;EAEf,MAAM,sBAAA,GAAqB,IAAA,SAAA,OAAmC;GAC7D,OAAO;IA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,IAAA,wBAAA,CAAZ,QAAA,QAAQ,GAAA,EAAA,KAAA,EAAA,CAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA"}
@@ -5,7 +5,7 @@ import PrismicRichTextSerialize_default from "./PrismicRichTextSerialize.js";
5
5
  import { computed, createBlock, createCommentVNode, defineComponent, openBlock, resolveDynamicComponent } from "vue";
6
6
  import { asTree } from "@prismicio/client/richtext";
7
7
  //#region src/PrismicRichText/PrismicRichText.vue?vue&type=script&setup=true&lang.ts
8
- var PrismicRichText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
+ var PrismicRichText_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
9
9
  name: "PrismicRichText",
10
10
  __name: "PrismicRichText",
11
11
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t;```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,YAAW;EAEf,MAAM,qBAAqB,eAAmC;AAC7D,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,MAAM,WAAW,eAAe;AAC/B,UAAO,OAAO,MAAM,SAAS,EAAE,CAAC,CAAC;IACjC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;AAK7D,OAAI,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI;IACJ,cAAc,MAAM;IACpB,WAAW;IACZ;;EAGD,MAAM,qBAAqB,eAA2C;AACrE,UAAO;IACN,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,WAAW,qBAAqB,YAAY;IAC5C,cAAc,qBAAqB,eAAe;IAClD,QAAQ,qBAAqB,SAAS;IACtC,IAAI,qBAAqB,KAAK;IAC9B,aAAa,qBAAqB,WAAW;IAC7C,eAAe,qBAAqB,YAAY;IAChD,mBAAmB,qBAAqB,OAAO;IAC/C,qBAAqB,qBAAqB,QAAQ;IAClD,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,WAAW,qBAAqB,YAAY;IAC5C,OAAO,qBAAqB,QAAQ;IACpC,MAAM,qBAAqB,OAAO;IACnC;IACA;;UAKO,SAAA,MAAS,UAAA,WAAA,EADhB,YAIE,kCAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;uDAED,QAAA,YAAA,WAAA,EAAtB,YAAiD,wBAAZ,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,QAAA,KAAA"}
1
+ {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\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 repository's content, a link\n\t * resolver does not need to be provided.\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 * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,WAAW;EAEf,MAAM,qBAAqB,eAAmC;GAC7D,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,MAAM,WAAW,eAAe;GAC/B,OAAO,OAAO,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;EAClC,CAAC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;GAK7D,IAAI,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAI;IACJ,cAAc,MAAM;IACpB,WAAW;GACZ;EACD;EAEA,MAAM,qBAAqB,eAA2C;GACrE,OAAO;IACN,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,WAAW,qBAAqB,WAAW;IAC3C,cAAc,qBAAqB,cAAc;IACjD,QAAQ,qBAAqB,QAAQ;IACrC,IAAI,qBAAqB,IAAI;IAC7B,aAAa,qBAAqB,UAAU;IAC5C,eAAe,qBAAqB,WAAW;IAC/C,mBAAmB,qBAAqB,MAAM;IAC9C,qBAAqB,qBAAqB,OAAO;IACjD,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,WAAW,qBAAqB,WAAW;IAC3C,OAAO,qBAAqB,OAAO;IACnC,MAAM,qBAAqB,MAAM;GAClC;EACD,CAAC;;GAKO,OAAA,SAAA,MAAS,UADhB,UAAA,GAAA,YAIE,kCAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;GAED,GAAA,MAAA,GAAA,CAAA,YAAA,qBAAA,CAAA,KAAA,QAAA,YAAtB,UAAA,GAAA,YAAiD,wBAAZ,QAAA,QAAQ,GAAA,EAAA,KAAA,EAAA,CAAA,KAAA,mBAAA,QAAA,IAAA"}
@@ -22,7 +22,7 @@ const _hoisted_11 = [
22
22
  "innerHTML"
23
23
  ];
24
24
  const _hoisted_12 = { key: 0 };
25
- var PrismicRichTextDefaultComponent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
25
+ var PrismicRichTextDefaultComponent_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
26
26
  name: "PrismicRichTextDefaultComponent",
27
27
  __name: "PrismicRichTextDefaultComponent",
28
28
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,QAAQ;EAQd,MAAM,MAAA,GAAA,IAAA,gBAAoB;AACzB,UAAO,MAAM,KAAK,SAAS,WAC1B,MAAM,KAAK,SAAS,eACpB,MAAM,KAAK,SAAS,WACpB,MAAM,KAAK,SAAS,SAClB,MAAM,WAAW,KACjB,KAAA;IACH;EAED,MAAM,SAAA,GAAA,IAAA,gBAAuB;GAC5B,MAAM,EAAE,IAAI,GAAG,UAAU,MAAM,aAAa,EAAC;AAE7C,UAAO;IACP;EAED,MAAM,OAAA,GAAA,IAAA,gBAAqB;AAC1B,UAAO,eAAe,MAAM,QAAQ,MAAM,KAAK,cAAc,QAAQ,QAAQ,KAAA;IAC7E;;UAIiB,GAAA,UAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBAAS,GAAA,MAAE,GAAA,GAAA,IAAA,YAAgD;;IAA7C,KAAK,IAAA;MAAa,MAAA,MAAK,EAAA;oCAAU,EAAA,GAAA,IAAA,YAAA,KAAA,QAAA,UAAA,CAAA,CAAA;;sBACjD,QAAA,KAAK,SAAI,eAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAEnB,OAAA,GAAA,IAAA,YAAA;;IAFqC,KAAK,IAAA;MAAa,MAAA,MAAK,EAAA,EAAA,GAAA,IAAA,YACxD,KAAA,QAAA,UAAA,CAAA,EAAA,IAAA,WAAA,IAEM,QAAA,KAAK,SAAI,eAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAEnB,OAAA,GAAA,IAAA,YAAA;;IAFqC,KAAK,IAAA;MAAa,MAAA,MAAK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,IAAA,YAAA,GAAA,GAAA,IAAA,oBAAqE,SAAA,GAAA,IAAA,YAAA;;IAAtD,OAAO,QAAA,KAAK,KAAK;MAAe,MAAA,MAAK,EAAA,EAAA,GAAA,IAAA,YAAU,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA,MAAA,GAAA,IAAA,WAAA,KAAA,GAAA,GAAA,IAAA,oBAGvF,IAAA,UAAA,EAAA,KAAA,IAAA,GAAA,GAAA,IAAA,YAFwC,QAAA,KAAK,KAAK,MAAK,KAAA,GAA/B,MAAM,UAAK;kFAAkC,MAAI,EAAA,CAC9D,QAAK,MAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,oBAAQ,MAAA,YAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA,GAAA,GAAA,IAAA,kBAAA,GAAA,IAAA,iBAAG,KAAI,EAAA,EAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,QAAQ;EAQd,MAAM,MAAA,GAAK,IAAA,SAAA,OAAe;GACzB,OAAO,MAAM,KAAK,SAAS,WAC1B,MAAM,KAAK,SAAS,eACpB,MAAM,KAAK,SAAS,WACpB,MAAM,KAAK,SAAS,SAClB,MAAM,WAAW,KACjB,KAAA;EACJ,CAAC;EAED,MAAM,SAAA,GAAQ,IAAA,SAAA,OAAe;GAC5B,MAAM,EAAE,IAAI,GAAG,UAAU,MAAM,aAAa,CAAC;GAE7C,OAAO;EACR,CAAC;EAED,MAAM,OAAA,GAAM,IAAA,SAAA,OAAe;GAC1B,OAAO,eAAe,MAAM,QAAQ,MAAM,KAAK,cAAc,QAAQ,QAAQ,KAAA;EAC9E,CAAC;;GAIiB,OAAA,GAAA,UAAA,GAAjB,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAA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KAAA,QAAA,SAAA,CAAA,CAAA;;GACe,GAAA,IAAA,CAAA,SAAA,eAAA,CAAA,KAAA,QAAA,KAAK,SAAI,YAAA,GAA1B,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,mBAAA,CAA+F,SAAA,GAA/F,IAAA,WAAA,CAA+F;;IAAtD,OAAO,QAAA,KAAK,KAAK;GAAe,GAAA,MAAA,KAAK,GAAA,EAAA,GAAE,IAAA,WAAA,CAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA,OAAA,GACxF,IAAA,UAAA,CAAA,IAAA,IAAA,GAAA,IAAA,mBAAA,CAEC,IAAA,UAAA,EAAA,KAAA,GAAA,IAAA,GAAA,IAAA,WAAA,CAFwC,QAAA,KAAK,KAAK,MAAK,IAAA,IAA/B,MAAM,UAAK;IAAkC,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,mBAAA,CAAA,IAAA,UAAA,EAAA,KAAA,KAAI,GAAA,CAC9D,QAAK,MAAA,GAAf,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,mBAAA,CAAuB,MAAA,WAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA,IAAA,GAAG,IAAA,gBAAA,EAAA,GAAA,IAAA,gBAAA,CAAA,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA"}
@@ -22,7 +22,7 @@ const _hoisted_11 = [
22
22
  "innerHTML"
23
23
  ];
24
24
  const _hoisted_12 = { key: 0 };
25
- var PrismicRichTextDefaultComponent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
25
+ var PrismicRichTextDefaultComponent_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
26
26
  name: "PrismicRichTextDefaultComponent",
27
27
  __name: "PrismicRichTextDefaultComponent",
28
28
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"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A,CAAA,CAAA;;yCACe,QAAA,KAAK,SAAI,WAAA,WAAA,EAA1B,mBAA+F,QAA/F,WAA+F;;IAAtD,OAAO,QAAA,KAAK,KAAK;MAAe,MAAA,MAAK,EAAA,CAAE,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA,KAAA,UAAA,KAAA,EACxF,mBAEC,UAAA,EAAA,KAAA,IAAA,EAAA,WAFwC,QAAA,KAAK,KAAK,MAAK,KAAA,GAA/B,MAAM,UAAK;4DAAkC,MAAI,EAAA,CAC9D,QAAK,KAAA,WAAA,EAAf,mBAAuB,MAAA,YAAA,IAAA,mBAAA,QAAA,KAAA,EAAA,gBAAA,gBAAG,KAAI,EAAA,EAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,QAAQ;EAQd,MAAM,KAAK,eAAe;GACzB,OAAO,MAAM,KAAK,SAAS,WAC1B,MAAM,KAAK,SAAS,eACpB,MAAM,KAAK,SAAS,WACpB,MAAM,KAAK,SAAS,SAClB,MAAM,WAAW,KACjB,KAAA;EACJ,CAAC;EAED,MAAM,QAAQ,eAAe;GAC5B,MAAM,EAAE,IAAI,GAAG,UAAU,MAAM,aAAa,CAAC;GAE7C,OAAO;EACR,CAAC;EAED,MAAM,MAAM,eAAe;GAC1B,OAAO,eAAe,MAAM,QAAQ,MAAM,KAAK,cAAc,QAAQ,QAAQ,KAAA;EAC9E,CAAC;;GAIiB,OAAA,GAAA,SAAjB,UAAA,GAAA,YAA4E,wBAAlD,GAAA,KAAE,GAA5B,WAA4E;;IAA7C,KAAK,IAAA;GAAa,GAAA,MAAA,KAAK,GAAA;IAAE,SAAA,cAAQ,CAAR,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;GACjD,GAAA,IAAA,CAAA,KAAA,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KAAA,mBAAA,QAAA,IAAA,GAAG,gBAAA,gBAAA,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA"}
@@ -1,6 +1,6 @@
1
1
  let vue = require("vue");
2
2
  //#region src/PrismicRichText/PrismicRichTextSerialize.vue?vue&type=script&setup=true&lang.ts
3
- var PrismicRichTextSerialize_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
3
+ var PrismicRichTextSerialize_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
4
4
  name: "PrismicRichTextSerialize",
5
5
  __name: "PrismicRichTextSerialize",
6
6
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextSerialize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { asTree } from \"@prismicio/client/richtext\"\n\nimport type { InternalRichTextComponents } from \"./types\"\n\ntype PrismicRichTextSerializeProps = {\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tinternalComponents: InternalRichTextComponents\n}\n\nconst props = defineProps<PrismicRichTextSerializeProps>()\ndefineOptions({ name: \"PrismicRichTextSerialize\" })\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"child in props.children\"\n\t\t:key=\"child.key\"\n\t\t:is=\"internalComponents[child.type].is\"\n\t\t:node=\"child.node\"\n\t\t:link-resolver=\"internalComponents[child.type].linkResolver\"\n\t\t:shorthand=\"internalComponents[child.type].shorthand\"\n\t\t><PrismicRichTextSerialize\n\t\t\tv-if=\"child.children.length\"\n\t\t\t:children=\"child.children\"\n\t\t\t:internal-components=\"internalComponents\"\n\t/></component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;;;gEAgBC,IAAA,UAAA,OAAA,GAAA,IAAA,YAVG,MAAM,WAAf,UAAK;uFAEP,QAAA,mBAAmB,MAAM,MAAM,GAAE,EAAA;KADrC,KAAK,MAAM;KAEX,MAAM,MAAM;KACZ,iBAAe,QAAA,mBAAmB,MAAM,MAAM;KAC9C,WAAW,QAAA,mBAAmB,MAAM,MAAM;;qCAK1C,CAHM,MAAM,SAAS,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAGrB,qCAAA;;MAFC,UAAU,MAAM;MAChB,uBAAqB,QAAA"}
1
+ {"version":3,"file":"PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextSerialize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { asTree } from \"@prismicio/client/richtext\"\n\nimport type { InternalRichTextComponents } from \"./types\"\n\ntype PrismicRichTextSerializeProps = {\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tinternalComponents: InternalRichTextComponents\n}\n\nconst props = defineProps<PrismicRichTextSerializeProps>()\ndefineOptions({ name: \"PrismicRichTextSerialize\" })\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"child in props.children\"\n\t\t:key=\"child.key\"\n\t\t:is=\"internalComponents[child.type].is\"\n\t\t:node=\"child.node\"\n\t\t:link-resolver=\"internalComponents[child.type].linkResolver\"\n\t\t:shorthand=\"internalComponents[child.type].shorthand\"\n\t\t><PrismicRichTextSerialize\n\t\t\tv-if=\"child.children.length\"\n\t\t\t:children=\"child.children\"\n\t\t\t:internal-components=\"internalComponents\"\n\t/></component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;;;GAKb,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,IAAA,GAAA,IAAA,mBAAA,CAWc,IAAA,UAAA,OAAA,GAAA,IAAA,WAAA,CAVG,MAAM,WAAf,UAAK;IADb,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,EAAA,GAWc,IAAA,wBAAA,CARR,QAAA,mBAAmB,MAAM,KAAI,CAAE,EAAE,GAAA;KADrC,KAAK,MAAM;KAEX,MAAM,MAAM;KACZ,iBAAe,QAAA,mBAAmB,MAAM,KAAI,CAAE;KAC9C,WAAW,QAAA,mBAAmB,MAAM,KAAI,CAAE;;KAC1C,UAAA,GAAA,IAAA,QAAA,OAIA,CAHM,MAAM,SAAS,WAAA,GADrB,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,YAAA,CAIA,qCAAA;;MAFC,UAAU,MAAM;MAChB,uBAAqB,QAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Fragment, createBlock, createCommentVNode, createElementBlock, defineComponent, openBlock, renderList, resolveComponent, resolveDynamicComponent, withCtx } from "vue";
2
2
  //#region src/PrismicRichText/PrismicRichTextSerialize.vue?vue&type=script&setup=true&lang.ts
3
- var PrismicRichTextSerialize_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
3
+ var PrismicRichTextSerialize_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
4
4
  name: "PrismicRichTextSerialize",
5
5
  __name: "PrismicRichTextSerialize",
6
6
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextSerialize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { asTree } from \"@prismicio/client/richtext\"\n\nimport type { InternalRichTextComponents } from \"./types\"\n\ntype PrismicRichTextSerializeProps = {\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tinternalComponents: InternalRichTextComponents\n}\n\nconst props = defineProps<PrismicRichTextSerializeProps>()\ndefineOptions({ name: \"PrismicRichTextSerialize\" })\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"child in props.children\"\n\t\t:key=\"child.key\"\n\t\t:is=\"internalComponents[child.type].is\"\n\t\t:node=\"child.node\"\n\t\t:link-resolver=\"internalComponents[child.type].linkResolver\"\n\t\t:shorthand=\"internalComponents[child.type].shorthand\"\n\t\t><PrismicRichTextSerialize\n\t\t\tv-if=\"child.children.length\"\n\t\t\t:children=\"child.children\"\n\t\t\t:internal-components=\"internalComponents\"\n\t/></component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;;;2BAKb,mBAWc,UAAA,MAAA,WAVG,MAAM,WAAf,UAAK;wBADb,YAWc,wBARR,QAAA,mBAAmB,MAAM,MAAM,GAAE,EAAA;KADrC,KAAK,MAAM;KAEX,MAAM,MAAM;KACZ,iBAAe,QAAA,mBAAmB,MAAM,MAAM;KAC9C,WAAW,QAAA,mBAAmB,MAAM,MAAM;;4BAK1C,CAHM,MAAM,SAAS,UAAA,WAAA,EADrB,YAIA,qCAAA;;MAFC,UAAU,MAAM;MAChB,uBAAqB,QAAA"}
1
+ {"version":3,"file":"PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichTextSerialize.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { asTree } from \"@prismicio/client/richtext\"\n\nimport type { InternalRichTextComponents } from \"./types\"\n\ntype PrismicRichTextSerializeProps = {\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tinternalComponents: InternalRichTextComponents\n}\n\nconst props = defineProps<PrismicRichTextSerializeProps>()\ndefineOptions({ name: \"PrismicRichTextSerialize\" })\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"child in props.children\"\n\t\t:key=\"child.key\"\n\t\t:is=\"internalComponents[child.type].is\"\n\t\t:node=\"child.node\"\n\t\t:link-resolver=\"internalComponents[child.type].linkResolver\"\n\t\t:shorthand=\"internalComponents[child.type].shorthand\"\n\t\t><PrismicRichTextSerialize\n\t\t\tv-if=\"child.children.length\"\n\t\t\t:children=\"child.children\"\n\t\t\t:internal-components=\"internalComponents\"\n\t/></component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAUA,MAAM,QAAQ;;;GAKb,OAAA,UAAA,IAAA,GAAA,mBAWc,UAAA,MAAA,WAVG,MAAM,WAAf,UAAK;IADb,OAAA,UAAA,GAAA,YAWc,wBARR,QAAA,mBAAmB,MAAM,KAAI,CAAE,EAAE,GAAA;KADrC,KAAK,MAAM;KAEX,MAAM,MAAM;KACZ,iBAAe,QAAA,mBAAmB,MAAM,KAAI,CAAE;KAC9C,WAAW,QAAA,mBAAmB,MAAM,KAAI,CAAE;;KAC1C,SAAA,cAIA,CAHM,MAAM,SAAS,UADrB,UAAA,GAAA,YAIA,qCAAA;;MAFC,UAAU,MAAM;MAChB,uBAAqB,QAAA"}
@@ -6,7 +6,7 @@
6
6
  * Props are: `["node"]`
7
7
  *
8
8
  * @example
9
- * ;```javascript
9
+ * ```javascript
10
10
  * // Defining a new rich text component
11
11
  * import { getRichTextComponentProps } from "@prismicio/vue"
12
12
  *
@@ -14,7 +14,7 @@
14
14
  * ```
15
15
  *
16
16
  * @example
17
- * ;```typescript
17
+ * ```typescript
18
18
  * // Defining a new rich text component for a specific node type
19
19
  * import { getRichTextComponentProps } from "@prismicio/vue"
20
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"getRichTextComponentProps.cjs","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t;```javascript\n * \t// Defining a new rich text component\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps())\n * \t```\n *\n * @example\n * \t;```typescript\n * \t// Defining a new rich text component for a specific node type\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps(\"heading1\"))\n * \t```\n *\n * @typeParam TRTType - The type of rich text node(s) this component handles\n * @param type - The type of rich text node this component handles\n * @returns Props object to use with `defineProps()`\n */\nexport const getRichTextComponentProps = <TRTType extends RTAnyNode[\"type\"]>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\ttype?: TRTType,\n): DefineComponentRichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>> => ({\n\tnode: {\n\t\ttype: Object as PropType<RichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>>[\"node\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,6BAEZ,UACmF,EACnF,MAAM;CACL,MAAM;CACN,UAAU;CACV,EACD"}
1
+ {"version":3,"file":"getRichTextComponentProps.cjs","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps())\n * \t```\n *\n * @example\n * \t```typescript\n * \t// Defining a new rich text component for a specific node type\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps(\"heading1\"))\n * \t```\n *\n * @typeParam TRTType - The type of rich text node(s) this component handles\n * @param type - The type of rich text node this component handles\n * @returns Props object to use with `defineProps()`\n */\nexport const getRichTextComponentProps = <TRTType extends RTAnyNode[\"type\"]>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\ttype?: TRTType,\n): DefineComponentRichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>> => ({\n\tnode: {\n\t\ttype: Object as PropType<RichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>>[\"node\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,6BAEZ,UACmF,EACnF,MAAM;CACL,MAAM;CACN,UAAU;AACX,EACD"}