@prismicio/vue 5.3.0-pr.85.0e554a8 → 5.3.0-pr.86.81afa1a

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 (158) hide show
  1. package/dist/PrismicImage.vue.d.cts +4 -4
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +24 -104
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +27 -32
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicRichText/types.d.cts +15 -2
  8. package/dist/PrismicRichText/types.d.cts.map +1 -1
  9. package/dist/PrismicTable/PrismicTable.vue.d.cts +8 -8
  10. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  11. package/dist/PrismicTable/types.d.cts +7 -6
  12. package/dist/PrismicTable/types.d.cts.map +1 -1
  13. package/dist/PrismicText.vue.d.cts +2 -10
  14. package/dist/PrismicText.vue.d.cts.map +1 -1
  15. package/dist/SliceZone/SliceZone.vue.d.cts +2 -10
  16. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  17. package/dist/index.cjs +3 -10
  18. package/dist/index.d.cts +9 -13
  19. package/dist/index.d.ts +11 -15
  20. package/dist/index.js +3 -6
  21. package/dist/package.cjs +1 -1
  22. package/dist/package.cjs.map +1 -1
  23. package/dist/package.js +1 -1
  24. package/dist/package.js.map +1 -1
  25. package/dist/src/PrismicImage.cjs.map +1 -1
  26. package/dist/src/PrismicImage.js.map +1 -1
  27. package/dist/src/PrismicImage.vue.d.ts +4 -4
  28. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  29. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs +2 -4
  30. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  31. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js +2 -4
  32. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  33. package/dist/src/PrismicLink.cjs.map +1 -1
  34. package/dist/src/PrismicLink.js.map +1 -1
  35. package/dist/src/PrismicLink.vue.d.ts +24 -104
  36. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  37. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +3 -6
  38. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  39. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js +3 -6
  40. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  41. package/dist/src/PrismicRichText/PrismicRichText.cjs.map +1 -1
  42. package/dist/src/PrismicRichText/PrismicRichText.js.map +1 -1
  43. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +31 -36
  44. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  45. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +19 -52
  46. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  47. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +20 -53
  48. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  49. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -1
  50. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -1
  51. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +75 -35
  52. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  53. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +76 -36
  54. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  55. package/dist/src/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -1
  56. package/dist/src/PrismicRichText/PrismicRichTextSerialize.js.map +1 -1
  57. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +29 -8
  58. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  59. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +30 -9
  60. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
  61. package/dist/src/PrismicRichText/types.d.ts +15 -2
  62. package/dist/src/PrismicRichText/types.d.ts.map +1 -1
  63. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  64. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  65. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +9 -9
  66. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  67. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +5 -5
  68. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  69. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +5 -5
  70. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs +36 -18
  72. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
  73. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js +36 -18
  74. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
  75. package/dist/src/PrismicTable/types.d.ts +7 -6
  76. package/dist/src/PrismicTable/types.d.ts.map +1 -1
  77. package/dist/src/PrismicText.cjs.map +1 -1
  78. package/dist/src/PrismicText.js.map +1 -1
  79. package/dist/src/PrismicText.vue.d.ts +2 -10
  80. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  81. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs +1 -12
  82. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  83. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js +3 -14
  84. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/src/SliceZone/SliceZone.cjs.map +1 -1
  86. package/dist/src/SliceZone/SliceZone.js.map +1 -1
  87. package/dist/src/SliceZone/SliceZone.vue.d.ts +2 -10
  88. package/dist/src/SliceZone/SliceZone.vue.d.ts.map +1 -1
  89. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs +5 -17
  90. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  91. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js +6 -18
  92. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  93. package/dist/src/types.d.ts +2 -352
  94. package/dist/src/types.d.ts.map +1 -1
  95. package/dist/types.d.cts +2 -352
  96. package/dist/types.d.cts.map +1 -1
  97. package/package.json +6 -5
  98. package/src/PrismicImage.vue +2 -11
  99. package/src/PrismicLink.vue +9 -34
  100. package/src/PrismicRichText/PrismicRichText.vue +31 -101
  101. package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +46 -20
  102. package/src/PrismicRichText/PrismicRichTextSerialize.vue +31 -10
  103. package/src/PrismicRichText/types.ts +16 -1
  104. package/src/PrismicTable/PrismicTable.vue +7 -7
  105. package/src/PrismicTable/PrismicTableDefaultComponents.ts +39 -20
  106. package/src/PrismicTable/types.ts +16 -6
  107. package/src/PrismicText.vue +2 -15
  108. package/src/SliceZone/SliceZone.vue +9 -27
  109. package/src/index.ts +13 -21
  110. package/src/types.ts +1 -439
  111. package/dist/PrismicEmbed.vue.d.cts +0 -25
  112. package/dist/PrismicEmbed.vue.d.cts.map +0 -1
  113. package/dist/createPrismic.d.cts +0 -29
  114. package/dist/createPrismic.d.cts.map +0 -1
  115. package/dist/src/PrismicEmbed.cjs +0 -8
  116. package/dist/src/PrismicEmbed.cjs.map +0 -1
  117. package/dist/src/PrismicEmbed.js +0 -8
  118. package/dist/src/PrismicEmbed.js.map +0 -1
  119. package/dist/src/PrismicEmbed.vue.d.ts +0 -25
  120. package/dist/src/PrismicEmbed.vue.d.ts.map +0 -1
  121. package/dist/src/PrismicEmbed.vue_vue_type_script_setup_true_lang.cjs +0 -42
  122. package/dist/src/PrismicEmbed.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
  123. package/dist/src/PrismicEmbed.vue_vue_type_script_setup_true_lang.js +0 -42
  124. package/dist/src/PrismicEmbed.vue_vue_type_script_setup_true_lang.js.map +0 -1
  125. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.cjs +0 -8
  126. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.cjs.map +0 -1
  127. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.js +0 -8
  128. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.js.map +0 -1
  129. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.vue_vue_type_script_setup_true_lang.cjs +0 -92
  130. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
  131. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.vue_vue_type_script_setup_true_lang.js +0 -92
  132. package/dist/src/PrismicRichText/DeprecatedPrismicRichText.vue_vue_type_script_setup_true_lang.js.map +0 -1
  133. package/dist/src/createPrismic.cjs +0 -85
  134. package/dist/src/createPrismic.cjs.map +0 -1
  135. package/dist/src/createPrismic.d.ts +0 -29
  136. package/dist/src/createPrismic.d.ts.map +0 -1
  137. package/dist/src/createPrismic.js +0 -85
  138. package/dist/src/createPrismic.js.map +0 -1
  139. package/dist/src/lib/Wrapper.cjs +0 -8
  140. package/dist/src/lib/Wrapper.cjs.map +0 -1
  141. package/dist/src/lib/Wrapper.js +0 -8
  142. package/dist/src/lib/Wrapper.js.map +0 -1
  143. package/dist/src/lib/Wrapper.vue_vue_type_script_setup_true_lang.cjs +0 -22
  144. package/dist/src/lib/Wrapper.vue_vue_type_script_setup_true_lang.cjs.map +0 -1
  145. package/dist/src/lib/Wrapper.vue_vue_type_script_setup_true_lang.js +0 -22
  146. package/dist/src/lib/Wrapper.vue_vue_type_script_setup_true_lang.js.map +0 -1
  147. package/dist/src/usePrismic.cjs +0 -38
  148. package/dist/src/usePrismic.cjs.map +0 -1
  149. package/dist/src/usePrismic.d.ts +0 -36
  150. package/dist/src/usePrismic.d.ts.map +0 -1
  151. package/dist/src/usePrismic.js +0 -37
  152. package/dist/src/usePrismic.js.map +0 -1
  153. package/dist/usePrismic.d.cts +0 -36
  154. package/dist/usePrismic.d.cts.map +0 -1
  155. package/src/PrismicEmbed.vue +0 -42
  156. package/src/PrismicRichText/DeprecatedPrismicRichText.vue +0 -146
  157. package/src/createPrismic.ts +0 -154
  158. package/src/usePrismic.ts +0 -36
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t\t<component :is=\"mergedComponents.tbody\" :body=\"field.body\">\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.body.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAGd,MAAM,mBAAmB,gBAAgB;GACxC,GAAG;GACH,GAAG,MAAM;GACT,EAAC;;UAKM,MAAA,SAAQ,CAAC,MAAM,QAAA,MAAK,iBAD3B,YA0BY,wBAxBN,iBAAA,MAAiB,MAAK,EAF5B,WA0BY;;IAvBV,OAAO,QAAA;MACAA,KAAAA,OAAM,EAAA;2BAaF,CAVL,QAAA,MAAM,qBADb,YAWY,wBATN,iBAAA,MAAiB,MAAK,EAAA;;KAC1B,MAAM,QAAA,MAAM;;4BAGkB,mBAD/B,mBAKE,UAAA,MAAA,WAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAKE,yBAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;uEAGf,YAOY,wBAPI,iBAAA,MAAiB,MAAK,EAAA,EAAG,MAAM,QAAA,MAAM;4BAErB,mBAD/B,mBAKE,UAAA,MAAA,WAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAKE,yBAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;;;sCAIhB,YAAmC,wBAAZ,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.js","names":["$attrs"],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t\t<component :is=\"mergedComponents.tbody\" :body=\"field.body\">\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.body.rows\"\n\t\t\t\t:key=\"row.key\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAGd,MAAM,mBAAmB,gBAAgB;GACxC,GAAG;GACH,GAAG,MAAM;GACT,EAAC;;UAKM,MAAA,SAAQ,CAAC,MAAM,QAAA,MAAK,iBAD3B,YA0BY,wBAxBN,iBAAA,MAAiB,MAAK,EAF5B,WA0BY;;IAvBV,OAAO,QAAA;MACAA,KAAAA,OAAM,EAAA;2BAaF,CAVL,QAAA,MAAM,qBADb,YAWY,wBATN,iBAAA,MAAiB,MAAK,EAAA;;KAC1B,MAAM,QAAA,MAAM;;4BAGkB,mBAD/B,mBAKE,UAAA,MAAA,WAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAKE,yBAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;uEAGf,YAOY,wBAPI,iBAAA,MAAiB,MAAK,EAAA,EAAG,MAAM,QAAA,MAAM;4BAErB,mBAD/B,mBAKE,UAAA,MAAA,WAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAKE,yBAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;;;wBAIM,QAAA,yBAAtB,YAAiD,wBAAZ,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA"}
@@ -4,39 +4,57 @@ let vue = require("vue");
4
4
  //#region src/PrismicTable/PrismicTableDefaultComponents.ts
5
5
  const defaultTableComponents = {
6
6
  table: (0, vue.defineComponent)({
7
- props: require_getTableComponentProps.table(),
8
- setup(props, { slots }) {
9
- return () => (0, vue.h)("table", slots.default ? slots.default() : []);
7
+ props: {
8
+ ...require_getTableComponentProps.table(),
9
+ as: { type: String }
10
+ },
11
+ setup(props, { attrs, slots }) {
12
+ return () => (0, vue.h)(props.as ?? "table", attrs, slots.default ? slots.default() : []);
10
13
  }
11
14
  }),
12
15
  thead: (0, vue.defineComponent)({
13
- props: require_getTableComponentProps.thead(),
14
- setup(props, { slots }) {
15
- return () => (0, vue.h)("thead", slots.default ? slots.default() : []);
16
+ props: {
17
+ ...require_getTableComponentProps.thead(),
18
+ as: { type: String }
19
+ },
20
+ setup(props, { attrs, slots }) {
21
+ return () => (0, vue.h)(props.as ?? "thead", attrs, slots.default ? slots.default() : []);
16
22
  }
17
23
  }),
18
24
  tbody: (0, vue.defineComponent)({
19
- props: require_getTableComponentProps.tbody(),
20
- setup(props, { slots }) {
21
- return () => (0, vue.h)("tbody", slots.default ? slots.default() : []);
25
+ props: {
26
+ ...require_getTableComponentProps.tbody(),
27
+ as: { type: String }
28
+ },
29
+ setup(props, { attrs, slots }) {
30
+ return () => (0, vue.h)(props.as ?? "tbody", attrs, slots.default ? slots.default() : []);
22
31
  }
23
32
  }),
24
33
  tr: (0, vue.defineComponent)({
25
- props: require_getTableComponentProps.tr(),
26
- setup(props, { slots }) {
27
- return () => (0, vue.h)("tr", slots.default ? slots.default() : []);
34
+ props: {
35
+ ...require_getTableComponentProps.tr(),
36
+ as: { type: String }
37
+ },
38
+ setup(props, { attrs, slots }) {
39
+ return () => (0, vue.h)(props.as ?? "tr", attrs, slots.default ? slots.default() : []);
28
40
  }
29
41
  }),
30
42
  th: (0, vue.defineComponent)({
31
- props: require_getTableComponentProps.th(),
32
- setup(props, { slots }) {
33
- return () => (0, vue.h)("th", slots.default ? slots.default() : []);
43
+ props: {
44
+ ...require_getTableComponentProps.th(),
45
+ as: { type: String }
46
+ },
47
+ setup(props, { attrs, slots }) {
48
+ return () => (0, vue.h)(props.as ?? "th", attrs, slots.default ? slots.default() : []);
34
49
  }
35
50
  }),
36
51
  td: (0, vue.defineComponent)({
37
- props: require_getTableComponentProps.td(),
38
- setup(props, { slots }) {
39
- return () => (0, vue.h)("td", slots.default ? slots.default() : []);
52
+ props: {
53
+ ...require_getTableComponentProps.td(),
54
+ as: { type: String }
55
+ },
56
+ setup(props, { attrs, slots }) {
57
+ return () => (0, vue.h)(props.as ?? "td", attrs, slots.default ? slots.default() : []);
40
58
  }
41
59
  })
42
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableDefaultComponents.cjs","names":["defaultTableComponents: Required<VueTableComponents>"],"sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<VueTableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"table\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"thead\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tbody\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tr\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"th\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"td\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAMA,MAAaA,yBAAuD;CACnE,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,2BAAe,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF"}
1
+ {"version":3,"file":"PrismicTableDefaultComponents.cjs","names":["defaultTableComponents: InternalVueTableComponents"],"sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: InternalVueTableComponents = {\n\ttable: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.table(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.thead(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.tbody(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.tr(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.th(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.td(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAOA,MAAaA,yBAAqD;CACjE,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF"}
@@ -4,39 +4,57 @@ import { defineComponent, h } from "vue";
4
4
  //#region src/PrismicTable/PrismicTableDefaultComponents.ts
5
5
  const defaultTableComponents = {
6
6
  table: defineComponent({
7
- props: table(),
8
- setup(props, { slots }) {
9
- return () => h("table", slots.default ? slots.default() : []);
7
+ props: {
8
+ ...table(),
9
+ as: { type: String }
10
+ },
11
+ setup(props, { attrs, slots }) {
12
+ return () => h(props.as ?? "table", attrs, slots.default ? slots.default() : []);
10
13
  }
11
14
  }),
12
15
  thead: defineComponent({
13
- props: thead(),
14
- setup(props, { slots }) {
15
- return () => h("thead", slots.default ? slots.default() : []);
16
+ props: {
17
+ ...thead(),
18
+ as: { type: String }
19
+ },
20
+ setup(props, { attrs, slots }) {
21
+ return () => h(props.as ?? "thead", attrs, slots.default ? slots.default() : []);
16
22
  }
17
23
  }),
18
24
  tbody: defineComponent({
19
- props: tbody(),
20
- setup(props, { slots }) {
21
- return () => h("tbody", slots.default ? slots.default() : []);
25
+ props: {
26
+ ...tbody(),
27
+ as: { type: String }
28
+ },
29
+ setup(props, { attrs, slots }) {
30
+ return () => h(props.as ?? "tbody", attrs, slots.default ? slots.default() : []);
22
31
  }
23
32
  }),
24
33
  tr: defineComponent({
25
- props: tr(),
26
- setup(props, { slots }) {
27
- return () => h("tr", slots.default ? slots.default() : []);
34
+ props: {
35
+ ...tr(),
36
+ as: { type: String }
37
+ },
38
+ setup(props, { attrs, slots }) {
39
+ return () => h(props.as ?? "tr", attrs, slots.default ? slots.default() : []);
28
40
  }
29
41
  }),
30
42
  th: defineComponent({
31
- props: th(),
32
- setup(props, { slots }) {
33
- return () => h("th", slots.default ? slots.default() : []);
43
+ props: {
44
+ ...th(),
45
+ as: { type: String }
46
+ },
47
+ setup(props, { attrs, slots }) {
48
+ return () => h(props.as ?? "th", attrs, slots.default ? slots.default() : []);
34
49
  }
35
50
  }),
36
51
  td: defineComponent({
37
- props: td(),
38
- setup(props, { slots }) {
39
- return () => h("td", slots.default ? slots.default() : []);
52
+ props: {
53
+ ...td(),
54
+ as: { type: String }
55
+ },
56
+ setup(props, { attrs, slots }) {
57
+ return () => h(props.as ?? "td", attrs, slots.default ? slots.default() : []);
40
58
  }
41
59
  })
42
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableDefaultComponents.js","names":["defaultTableComponents: Required<VueTableComponents>","getTableComponentProps.table","getTableComponentProps.thead","getTableComponentProps.tbody","getTableComponentProps.tr","getTableComponentProps.th","getTableComponentProps.td"],"sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<VueTableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"table\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"thead\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tbody\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tr\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"th\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"td\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAMA,MAAaA,yBAAuD;CACnE,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,SAAS,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9D,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,SAAS;AACvB,gBAAa,EAAE,MAAM,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE3D,CAAC;CACF"}
1
+ {"version":3,"file":"PrismicTableDefaultComponents.js","names":["defaultTableComponents: InternalVueTableComponents","getTableComponentProps.table","getTableComponentProps.thead","getTableComponentProps.tbody","getTableComponentProps.tr","getTableComponentProps.th","getTableComponentProps.td"],"sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: InternalVueTableComponents = {\n\ttable: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.table(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.thead(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.tbody(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.tr(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.th(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: {\n\t\t\t...getTableComponentProps.td(),\n\t\t\tas: { type: String as PropType<string | undefined> },\n\t\t},\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(props.as ?? \"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAOA,MAAaA,yBAAqD;CACjE,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAEjF,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAE9E,CAAC;CACF"}
@@ -1,3 +1,4 @@
1
+ import { VueShorthand } from "../PrismicRichText/types.js";
1
2
  import { DefineComponent, FunctionalComponent, defineAsyncComponent } from "vue";
2
3
  import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
3
4
 
@@ -12,22 +13,22 @@ import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, Tabl
12
13
  type VueTableComponents = {
13
14
  table?: VueComponent<{
14
15
  table: TableField<"filled">;
15
- }>;
16
+ }> | VueShorthand;
16
17
  thead?: VueComponent<{
17
18
  head: TableFieldHead;
18
- }>;
19
+ }> | VueShorthand;
19
20
  tbody?: VueComponent<{
20
21
  body: TableFieldBody;
21
- }>;
22
+ }> | VueShorthand;
22
23
  tr?: VueComponent<{
23
24
  row: TableFieldBodyRow | TableFieldHeadRow;
24
- }>;
25
+ }> | VueShorthand;
25
26
  th?: VueComponent<{
26
27
  cell: TableFieldHeaderCell;
27
- }>;
28
+ }> | VueShorthand;
28
29
  td?: VueComponent<{
29
30
  cell: TableFieldDataCell;
30
- }>;
31
+ }> | VueShorthand;
31
32
  };
32
33
  type VueComponent<TProps> = ReturnType<typeof defineAsyncComponent> | DefineComponent<TProps> | FunctionalComponent<TProps>;
33
34
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqBA;;;;AAES,KAFG,kBAAA,GAEH;EACqB,KAAA,CAAA,EAFrB,YAEqB,CAAA;IAArB,KAAA,EAFsB,UAEtB,CAAA,QAAA,CAAA;EACiB,CAAA,CAAA;EAAoB,KAAA,CAAA,EAFrC,YAEqC,CAAA;IAAxC,IAAA,EAFwB,cAExB;EACqB,CAAA,CAAA;EAArB,KAAA,CAAA,EAFG,YAEH,CAAA;IACqB,IAAA,EAHG,cAGH;EAArB,CAAA,CAAA;EAAY,EAAA,CAAA,EAFZ,YAEY,CAAA;IAGb,GAAA,EALqB,iBAKT,GAL6B,iBAK7B;EACI,CAAA,CAAA;EAAlB,EAAA,CAAA,EALG,YAKH,CAAA;IACgB,IAAA,EANQ,oBAMR;EAAhB,CAAA,CAAA;EACoB,EAAA,CAAA,EANjB,YAMiB,CAAA;IAApB,IAAA,EANwB,kBAMxB;EAAmB,CAAA,CAAA;;KAHjB,uBACF,kBAAkB,wBAClB,gBAAgB,UAChB,oBAAoB"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAsBA;;;;AAE8B,KAFlB,kBAAA,GAEkB;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,KAAA,EADnB,UACmB,CAAA,QAAA,CAAA;EACpB,CAAA,CAAA,GAF2B,YAE3B;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,IAAA,EADpB,cACoB;EACxB,CAAA,CAAA,GAFwB,YAExB;EAAoB,KAAA,CAAA,EADrC,YACqC,CAAA;IAAxC,IAAA,EADwB,cACxB;EAA+D,CAAA,CAAA,GADnB,YACmB;EAC1C,EAAA,CAAA,EADrB,YACqB,CAAA;IAArB,GAAA,EADoB,iBACpB,GADwC,iBACxC;EAA+C,CAAA,CAAA,GADgB,YAChB;EAC1B,EAAA,CAAA,EADrB,YACqB,CAAA;IAArB,IAAA,EADqB,oBACrB;EAA6C,CAAA,CAAA,GADE,YACF;EAAY,EAAA,CAAA,EAAzD,YAAyD,CAAA;IAY1D,IAAA,EAZsB,kBAYV;EACI,CAAA,CAAA,GAb8B,YAa9B;CAAlB;KADE,uBACF,kBAAkB,wBAClB,gBAAgB,UAChB,oBAAoB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.cjs","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport Wrapper from \"./lib/Wrapper.vue\"\nimport { devMsg } from \"./lib/devMsg\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<PrismicText />`\n\t * is not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t<Wrapper v-if=\"isFilled.richText(field) || fallback\" :wrapper=\"wrapper\">\n\t\t{{ asText(field) || fallback }}\n\t</Wrapper>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicText.cjs","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.js","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport Wrapper from \"./lib/Wrapper.vue\"\nimport { devMsg } from \"./lib/devMsg\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<PrismicText />`\n\t * is not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t<Wrapper v-if=\"isFilled.richText(field) || fallback\" :wrapper=\"wrapper\">\n\t\t{{ asText(field) || fallback }}\n\t</Wrapper>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicText.js","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":""}
@@ -1,5 +1,4 @@
1
- import { ComponentOrTagName } from "./types.js";
2
- import * as vue31 from "vue";
1
+ import * as vue9 from "vue";
3
2
  import { RichTextField } from "@prismicio/client";
4
3
 
5
4
  //#region src/PrismicText.vue.d.ts
@@ -22,15 +21,8 @@ type PrismicTextProps = {
22
21
  * @defaultValue `" "` (a whitespace)
23
22
  */
24
23
  separator?: string;
25
- /**
26
- * An HTML tag name or a component used to wrap the output. `<PrismicText />`
27
- * is not wrapped by default.
28
- *
29
- * @defaultValue `"template"` (no wrapper)
30
- */
31
- wrapper?: ComponentOrTagName;
32
24
  };
33
- declare const __VLS_export: vue31.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue31.ComponentOptionsMixin, vue31.ComponentOptionsMixin, {}, string, vue31.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue31.ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: vue9.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue9.ComponentOptionsMixin, vue9.ComponentOptionsMixin, {}, string, vue9.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue9.ComponentProvideOptions, false, {}, any>;
34
26
  declare const _default: typeof __VLS_export;
35
27
  //#endregion
36
28
  export { PrismicTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA8EY,KAAA,gBAAA,GAAgB;EAiFtB;;;EAAY,KAAA,EA7EV,aA6EU,GAAA,IAAA,GAAA,SAAA;EAAA;;;;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA;;AAAA;;;;;;;;;;YAxDP;;cAwDL,cAAY,KAAA,CAAA,gBAAA,kCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;;;AA8DY,KAAA,gBAAA,GAAgB;EAuDtB;;;EAAY,KAAA,EAnDV,aAmDU,GAAA,IAAA,GAAA,SAAA;EAAA;;;;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA;;AAAA;;;;;cAAZ,cAAY,IAAA,CAAA,gBAAA,kCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -1,4 +1,3 @@
1
- const require_Wrapper = require('./lib/Wrapper.cjs');
2
1
  const require_devMsg = require('./lib/devMsg.cjs');
3
2
  let vue = require("vue");
4
3
  let __prismicio_client = require("@prismicio/client");
@@ -20,10 +19,6 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0
20
19
  separator: {
21
20
  type: String,
22
21
  required: false
23
- },
24
- wrapper: {
25
- type: null,
26
- required: false
27
22
  }
28
23
  },
29
24
  setup(__props) {
@@ -32,13 +27,7 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0
32
27
  if (typeof props.field === "string") throw new Error(`[PrismicText] The "field" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${require_devMsg.devMsg("prismictext-works-only-with-rich-text-and-title-fields")}`);
33
28
  }, {});
34
29
  return (_ctx, _cache) => {
35
- return (0, vue.unref)(__prismicio_client.isFilled).richText(__props.field) || __props.fallback ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_Wrapper.default, {
36
- key: 0,
37
- wrapper: __props.wrapper
38
- }, {
39
- default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(__prismicio_client.asText)(__props.field) || __props.fallback), 1)]),
40
- _: 1
41
- }, 8, ["wrapper"])) : (0, vue.createCommentVNode)("v-if", true);
30
+ return (0, vue.toDisplayString)((0, vue.unref)(__prismicio_client.asText)(__props.field) || __props.fallback || "");
42
31
  };
43
32
  }
44
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport Wrapper from \"./lib/Wrapper.vue\"\nimport { devMsg } from \"./lib/devMsg\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<PrismicText />`\n\t * is not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t<Wrapper v-if=\"isFilled.richText(field) || fallback\" :wrapper=\"wrapper\">\n\t\t{{ asText(field) || fallback }}\n\t</Wrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ;AAGd,MAAI,YACH,4BAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,sBACnR,yDACA,GACF;KAEC,EAAE,CAAA;;yBAKU,4BAAQ,CAAC,SAAS,QAAA,MAAK,IAAK,QAAA,uDAEjC,yBAAA;;IAF4C,SAAS,QAAA;;oCAC/B,kEAA5B,0BAAM,CAAC,QAAA,MAAK,IAAK,QAAA,SAAQ,EAAA,EAAA"}
1
+ {"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,QAAQ;AAGd,MAAI,YACH,4BAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,sBACnR,yDACA,GACF;KAEC,EAAE,CAAA;;kDAKF,0BAAM,CAAC,QAAA,MAAK,IAAK,QAAA,YAAQ,GAAA"}
@@ -1,7 +1,6 @@
1
- import Wrapper_default from "./lib/Wrapper.js";
2
1
  import { devMsg } from "./lib/devMsg.js";
3
- import { createBlock, createCommentVNode, createTextVNode, defineComponent, openBlock, toDisplayString, unref, watchEffect, withCtx } from "vue";
4
- import { asText, isFilled } from "@prismicio/client";
2
+ import { defineComponent, toDisplayString, unref, watchEffect } from "vue";
3
+ import { asText } from "@prismicio/client";
5
4
  import { DEV } from "esm-env";
6
5
 
7
6
  //#region src/PrismicText.vue?vue&type=script&setup=true&lang.ts
@@ -20,10 +19,6 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
20
19
  separator: {
21
20
  type: String,
22
21
  required: false
23
- },
24
- wrapper: {
25
- type: null,
26
- required: false
27
22
  }
28
23
  },
29
24
  setup(__props) {
@@ -32,13 +27,7 @@ var PrismicText_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
32
27
  if (typeof props.field === "string") throw new Error(`[PrismicText] The "field" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg("prismictext-works-only-with-rich-text-and-title-fields")}`);
33
28
  }, {});
34
29
  return (_ctx, _cache) => {
35
- return unref(isFilled).richText(__props.field) || __props.fallback ? (openBlock(), createBlock(Wrapper_default, {
36
- key: 0,
37
- wrapper: __props.wrapper
38
- }, {
39
- default: withCtx(() => [createTextVNode(toDisplayString(unref(asText)(__props.field) || __props.fallback), 1)]),
40
- _: 1
41
- }, 8, ["wrapper"])) : createCommentVNode("v-if", true);
30
+ return toDisplayString(unref(asText)(__props.field) || __props.fallback || "");
42
31
  };
43
32
  }
44
33
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText, isFilled } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport Wrapper from \"./lib/Wrapper.vue\"\nimport { devMsg } from \"./lib/devMsg\"\n\nimport type { ComponentOrTagName } from \"./types\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<PrismicText />`\n\t * is not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t<Wrapper v-if=\"isFilled.richText(field) || fallback\" :wrapper=\"wrapper\">\n\t\t{{ asText(field) || fallback }}\n\t</Wrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ;AAGd,MAAI,IACH,mBAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,OACnR,yDACA,GACF;KAEC,EAAE,CAAA;;UAKU,MAAA,SAAQ,CAAC,SAAS,QAAA,MAAK,IAAK,QAAA,yBAA3C,YAEU,iBAAA;;IAF4C,SAAS,QAAA;;2BAC/B,iCAA5B,MAAA,OAAM,CAAC,QAAA,MAAK,IAAK,QAAA,SAAQ,EAAA,EAAA"}
1
+ {"version":3,"file":"PrismicText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { RichTextField } from \"@prismicio/client\"\nimport { asText } from \"@prismicio/client\"\nimport { DEV } from \"esm-env\"\nimport { watchEffect } from \"vue\"\n\nimport { devMsg } from \"./lib/devMsg\"\n\n/**\n * Props for `<PrismicText />`.\n */\nexport type PrismicTextProps = {\n\t/**\n\t * The Prismic rich text field to render.\n\t */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The string value to be rendered when the field is empty. If a fallback is\n\t * not given, `\"\"` (nothing) will be rendered.\n\t */\n\tfallback?: string\n\n\t/**\n\t * The separator used between blocks.\n\t *\n\t * @defaultValue `\" \"` (a whitespace)\n\t */\n\tseparator?: string\n}\n\nconst props = defineProps<PrismicTextProps>()\ndefineOptions({ name: \"PrismicText\" })\n\nif (DEV) {\n\twatchEffect(() => {\n\t\tif (typeof props.field === \"string\") {\n\t\t\tthrow new Error(\n\t\t\t\t`[PrismicText] The \"field\" prop only accepts a Rich Text or title field's value but was provided a different type of field instead (e.g. a Key Text or Select field). You can resolve this error by rendering the field value inline without <PrismicText>. For more details, see ${devMsg(\n\t\t\t\t\t\"prismictext-works-only-with-rich-text-and-title-fields\",\n\t\t\t\t)}`,\n\t\t\t)\n\t\t}\n\t}, {})\n}\n</script>\n\n<template>\n\t{{ asText(field) || fallback || \"\" }}\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,QAAQ;AAGd,MAAI,IACH,mBAAkB;AACjB,OAAI,OAAO,MAAM,UAAU,SAC1B,OAAM,IAAI,MACT,oRAAoR,OACnR,yDACA,GACF;KAEC,EAAE,CAAA;;0BAKF,MAAA,OAAM,CAAC,QAAA,MAAK,IAAK,QAAA,YAAQ,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<SliceZone />` is\n\t * not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst { options } = usePrismic()\n\nconst renderedSlices = computed(() => {\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is =\n\t\t\tprops.components?.[type] ||\n\t\t\tprops.defaultComponent ||\n\t\t\toptions.components?.sliceZoneDefaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<Wrapper v-if=\"slices\" :wrapper=\"wrapper\">\n\t\t<component\n\t\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t\t:is=\"renderedSlice.is\"\n\t\t\t:key=\"renderedSlice.key\"\n\t\t\tv-bind=\"renderedSlice.props\"\n\t\t/>\n\t</Wrapper>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SliceZone.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<SliceZone />` is\n\t * not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst { options } = usePrismic()\n\nconst renderedSlices = computed(() => {\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is =\n\t\t\tprops.components?.[type] ||\n\t\t\tprops.defaultComponent ||\n\t\t\toptions.components?.sliceZoneDefaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<Wrapper v-if=\"slices\" :wrapper=\"wrapper\">\n\t\t<component\n\t\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t\t:is=\"renderedSlice.is\"\n\t\t\t:key=\"renderedSlice.key\"\n\t\t\tv-bind=\"renderedSlice.props\"\n\t\t/>\n\t</Wrapper>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SliceZone.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
@@ -1,6 +1,5 @@
1
1
  import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.js";
2
- import { ComponentOrTagName } from "../types.js";
3
- import * as vue11 from "vue";
2
+ import * as vue14 from "vue";
4
3
 
5
4
  //#region src/SliceZone/SliceZone.vue.d.ts
6
5
 
@@ -32,16 +31,9 @@ type SliceZoneProps<TContext = unknown> = {
32
31
  * Arbitrary data made available to all Slice components.
33
32
  */
34
33
  context?: TContext;
35
- /**
36
- * An HTML tag name or a component used to wrap the output. `<SliceZone />` is
37
- * not wrapped by default.
38
- *
39
- * @defaultValue `"template"` (no wrapper)
40
- */
41
- wrapper?: ComponentOrTagName;
42
34
  };
43
35
  type __VLS_Props = SliceZoneProps;
44
- declare const __VLS_export: vue11.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue11.ComponentOptionsMixin, vue11.ComponentOptionsMixin, {}, string, vue11.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue11.ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: vue14.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, false, {}, any>;
45
37
  declare const _default: typeof __VLS_export;
46
38
  //#endregion
47
39
  export { SliceZoneProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;;AAwIA;;AAIoC,KAJxB,cAIwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;;;EAiBJ,MAAA,EAjBnC,aAiBmC,CAjBrB,SAiBqB,GAAA,CAjBR,SAiBQ,GAjBI,MAiBJ,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAAxB;;;EAaS,UAAA,CAAA,EAzBf,mBAyBe;EAGxB;AAA4B;;;;;;;;EA6Ff,gBAAA,CAAA,EA7GE,kBA6GF,CAAA,GAAA,EA7G0B,QA6G1B,CAAA;EAAA;;AAAA;YAxGP;;;;;;;YAQA;;KAGN,WAAA,GAAc;cA6Fb,cAAY,KAAA,CAAA,gBAAA,6BAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,eAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AAiHA;;AAIoC,KAJxB,cAIwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;;;EAiBJ,MAAA,EAjBnC,aAiBmC,CAjBrB,SAiBqB,GAAA,CAjBR,SAiBQ,GAjBI,MAiBJ,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAAxB;;;EAQf,UAAA,CAAA,EApBS,mBAoBK;EAyEb;;;;;;;;;EAAY,gBAAA,CAAA,EAjFE,kBAiFF,CAAA,GAAA,EAjF0B,QAiF1B,CAAA;EAAA;AAAA;;YA5EP;;KAGN,WAAA,GAAc;cAyEb,cAAY,KAAA,CAAA,gBAAA,6BAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,eAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -1,5 +1,3 @@
1
- const require_Wrapper = require('../lib/Wrapper.cjs');
2
- const require_usePrismic = require('../usePrismic.cjs');
3
1
  const require_TODOSliceComponent = require('./TODOSliceComponent.cjs');
4
2
  let vue = require("vue");
5
3
 
@@ -24,20 +22,16 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
24
22
  context: {
25
23
  type: null,
26
24
  required: false
27
- },
28
- wrapper: {
29
- type: null,
30
- required: false
31
25
  }
32
26
  },
33
27
  setup(__props) {
34
28
  const props = __props;
35
- const { options } = require_usePrismic.usePrismic();
36
29
  const renderedSlices = (0, vue.computed)(() => {
30
+ if (!props.slices) return [];
37
31
  return props.slices.map((slice, index) => {
38
32
  const type = "slice_type" in slice ? slice.slice_type : slice.type;
39
33
  const key = "id" in slice && typeof slice.id === "string" ? slice.id : `${index}-${JSON.stringify(slice)}`;
40
- const is = props.components?.[type] || props.defaultComponent || options.components?.sliceZoneDefaultComponent;
34
+ const is = props.components?.[type] || props.defaultComponent;
41
35
  if (!is) return {
42
36
  is: require_TODOSliceComponent.TODOSliceComponent,
43
37
  key,
@@ -64,15 +58,9 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0,
64
58
  });
65
59
  });
66
60
  return (_ctx, _cache) => {
67
- return __props.slices ? ((0, vue.openBlock)(), (0, vue.createBlock)(require_Wrapper.default, {
68
- key: 0,
69
- wrapper: __props.wrapper
70
- }, {
71
- default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(renderedSlices.value, (renderedSlice) => {
72
- return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderedSlice.is), (0, vue.mergeProps)({ key: renderedSlice.key }, { ref_for: true }, renderedSlice.props), null, 16);
73
- }), 128))]),
74
- _: 1
75
- }, 8, ["wrapper"])) : (0, vue.createCommentVNode)("v-if", true);
61
+ return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(renderedSlices.value, (renderedSlice) => {
62
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(renderedSlice.is), (0, vue.mergeProps)({ key: renderedSlice.key }, { ref_for: true }, renderedSlice.props), null, 16);
63
+ }), 128);
76
64
  };
77
65
  }
78
66
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<SliceZone />` is\n\t * not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst { options } = usePrismic()\n\nconst renderedSlices = computed(() => {\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is =\n\t\t\tprops.components?.[type] ||\n\t\t\tprops.defaultComponent ||\n\t\t\toptions.components?.sliceZoneDefaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<Wrapper v-if=\"slices\" :wrapper=\"wrapper\">\n\t\t<component\n\t\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t\t:is=\"renderedSlice.is\"\n\t\t\t:key=\"renderedSlice.key\"\n\t\t\tv-bind=\"renderedSlice.props\"\n\t\t/>\n\t</Wrapper>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DA,MAAM,QAAQ;EAGd,MAAM,EAAE,YAAY,+BAAW;EAE/B,MAAM,yCAAgC;AACrC,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KACL,MAAM,aAAa,SACnB,MAAM,oBACN,QAAQ,YAAY;AAErB,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;UAIe,QAAA,qDAOL,yBAAA;;IAPc,SAAS,QAAA;;oCAEQ,wDAItC,cAAA,0BAJuB,eAAA,QAAjB,kBAAa;wFACf,cAAc,GAAE,sBAGpB,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
1
+ {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CA,MAAM,QAAQ;EAGd,MAAM,yCAAgC;AACrC,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;gEASE,cAAA,0BAJuB,eAAA,QAAjB,kBAAa;uFACf,cAAc,GAAE,sBAGpB,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
@@ -1,7 +1,5 @@
1
- import Wrapper_default from "../lib/Wrapper.js";
2
- import { usePrismic } from "../usePrismic.js";
3
1
  import { TODOSliceComponent } from "./TODOSliceComponent.js";
4
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
2
+ import { Fragment, computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent } from "vue";
5
3
 
6
4
  //#region src/SliceZone/SliceZone.vue?vue&type=script&setup=true&lang.ts
7
5
  var SliceZone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -24,20 +22,16 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
24
22
  context: {
25
23
  type: null,
26
24
  required: false
27
- },
28
- wrapper: {
29
- type: null,
30
- required: false
31
25
  }
32
26
  },
33
27
  setup(__props) {
34
28
  const props = __props;
35
- const { options } = usePrismic();
36
29
  const renderedSlices = computed(() => {
30
+ if (!props.slices) return [];
37
31
  return props.slices.map((slice, index) => {
38
32
  const type = "slice_type" in slice ? slice.slice_type : slice.type;
39
33
  const key = "id" in slice && typeof slice.id === "string" ? slice.id : `${index}-${JSON.stringify(slice)}`;
40
- const is = props.components?.[type] || props.defaultComponent || options.components?.sliceZoneDefaultComponent;
34
+ const is = props.components?.[type] || props.defaultComponent;
41
35
  if (!is) return {
42
36
  is: TODOSliceComponent,
43
37
  key,
@@ -64,15 +58,9 @@ var SliceZone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
64
58
  });
65
59
  });
66
60
  return (_ctx, _cache) => {
67
- return __props.slices ? (openBlock(), createBlock(Wrapper_default, {
68
- key: 0,
69
- wrapper: __props.wrapper
70
- }, {
71
- default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(renderedSlices.value, (renderedSlice) => {
72
- return openBlock(), createBlock(resolveDynamicComponent(renderedSlice.is), mergeProps({ key: renderedSlice.key }, { ref_for: true }, renderedSlice.props), null, 16);
73
- }), 128))]),
74
- _: 1
75
- }, 8, ["wrapper"])) : createCommentVNode("v-if", true);
61
+ return openBlock(true), createElementBlock(Fragment, null, renderList(renderedSlices.value, (renderedSlice) => {
62
+ return openBlock(), createBlock(resolveDynamicComponent(renderedSlice.is), mergeProps({ key: renderedSlice.key }, { ref_for: true }, renderedSlice.props), null, 16);
63
+ }), 128);
76
64
  };
77
65
  }
78
66
  });