@prismicio/vue 5.3.0-pr.86.915aa0e → 5.3.0-pr.88.72388e2

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 (107) hide show
  1. package/dist/PrismicImage.vue.d.cts +26 -54
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +56 -48
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +18 -41
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicRichText/types.d.cts +3 -3
  8. package/dist/PrismicRichText/types.d.cts.map +1 -1
  9. package/dist/PrismicTable/PrismicTable.vue.d.cts +4 -4
  10. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  11. package/dist/PrismicTable/types.d.cts +1 -2
  12. package/dist/PrismicTable/types.d.cts.map +1 -1
  13. package/dist/PrismicText.vue.d.cts +1 -3
  14. package/dist/PrismicText.vue.d.cts.map +1 -1
  15. package/dist/SliceZone/SliceZone.vue.d.cts +3 -14
  16. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  17. package/dist/package.cjs +1 -1
  18. package/dist/package.cjs.map +1 -1
  19. package/dist/package.js +1 -1
  20. package/dist/package.js.map +1 -1
  21. package/dist/src/PrismicImage.cjs.map +1 -1
  22. package/dist/src/PrismicImage.js.map +1 -1
  23. package/dist/src/PrismicImage.vue.d.ts +30 -58
  24. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  25. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  26. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  27. package/dist/src/PrismicLink.cjs.map +1 -1
  28. package/dist/src/PrismicLink.js.map +1 -1
  29. package/dist/src/PrismicLink.vue.d.ts +60 -52
  30. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  31. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  32. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  33. package/dist/src/PrismicRichText/PrismicRichText.cjs.map +1 -1
  34. package/dist/src/PrismicRichText/PrismicRichText.js.map +1 -1
  35. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +22 -45
  36. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  37. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs +39 -22
  38. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  39. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js +39 -22
  40. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  41. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.cjs.map +1 -1
  42. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.js.map +1 -1
  43. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs +6 -26
  44. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  45. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js +6 -26
  46. package/dist/src/PrismicRichText/PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/src/PrismicRichText/PrismicRichTextSerialize.cjs.map +1 -1
  48. package/dist/src/PrismicRichText/PrismicRichTextSerialize.js.map +1 -1
  49. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs +7 -48
  50. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  51. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js +7 -48
  52. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/dist/src/PrismicRichText/types.d.ts +3 -3
  54. package/dist/src/PrismicRichText/types.d.ts.map +1 -1
  55. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  56. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  57. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +6 -6
  58. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  59. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +43 -15
  60. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  61. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +44 -16
  62. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  63. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
  64. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
  65. package/dist/src/PrismicTable/PrismicTableRow.cjs.map +1 -1
  66. package/dist/src/PrismicTable/PrismicTableRow.js.map +1 -1
  67. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs +13 -10
  68. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  69. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js +14 -11
  70. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  71. package/dist/src/PrismicTable/types.d.ts +1 -2
  72. package/dist/src/PrismicTable/types.d.ts.map +1 -1
  73. package/dist/src/PrismicText.cjs.map +1 -1
  74. package/dist/src/PrismicText.js.map +1 -1
  75. package/dist/src/PrismicText.vue.d.ts +3 -5
  76. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  77. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  78. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  79. package/dist/src/SliceZone/SliceZone.cjs.map +1 -1
  80. package/dist/src/SliceZone/SliceZone.js.map +1 -1
  81. package/dist/src/SliceZone/SliceZone.vue.d.ts +5 -16
  82. package/dist/src/SliceZone/SliceZone.vue.d.ts.map +1 -1
  83. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  84. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  85. package/dist/src/types.cjs +9 -0
  86. package/dist/src/types.cjs.map +1 -0
  87. package/dist/src/types.d.ts +3 -2
  88. package/dist/src/types.d.ts.map +1 -1
  89. package/dist/src/types.js +8 -0
  90. package/dist/src/types.js.map +1 -0
  91. package/dist/types.d.cts +3 -2
  92. package/dist/types.d.cts.map +1 -1
  93. package/package.json +1 -1
  94. package/src/PrismicImage.vue +8 -16
  95. package/src/PrismicLink.vue +12 -12
  96. package/src/PrismicRichText/PrismicRichText.vue +69 -49
  97. package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +38 -22
  98. package/src/PrismicRichText/PrismicRichTextSerialize.vue +5 -51
  99. package/src/PrismicRichText/types.ts +17 -13
  100. package/src/PrismicTable/PrismicTable.vue +44 -17
  101. package/src/PrismicTable/PrismicTableDefaultComponents.ts +14 -8
  102. package/src/PrismicTable/PrismicTableRow.vue +17 -24
  103. package/src/PrismicTable/types.ts +14 -11
  104. package/src/PrismicText.vue +1 -3
  105. package/src/SliceZone/SliceZone.vue +3 -14
  106. package/src/types.ts +31 -1
  107. package/src/lib/Wrapper.vue +0 -22
@@ -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 { LinkResolverFunction } from \"@prismicio/client\"\nimport type { asTree } from \"@prismicio/client/richtext\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueRichTextSerializer, VueShorthand } from \"./types\"\n\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\n\nconst CHILD_TYPE_RENAMES = {\n\t\"list-item\": \"listItem\",\n\t\"o-list-item\": \"oListItem\",\n\t\"group-list-item\": \"list\",\n\t\"group-o-list-item\": \"oList\",\n} as const\n\ntype PrismicRichTextSerializeProps = {\n\tcomponents?: VueRichTextSerializer\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tlinkResolver?: LinkResolverFunction\n\tinternalLinkComponent?: ComponentOrTagName\n\texternalLinkComponent?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicRichTextSerializeProps>()\ndefineOptions({ name: \"PrismicRichTextSerialize\" })\n\nfunction getComponent(child: ReturnType<typeof asTree>[\"children\"][number]) {\n\tconst maybeComponentOrShorthand =\n\t\tprops.components?.[\n\t\t\tCHILD_TYPE_RENAMES[child.type as keyof typeof CHILD_TYPE_RENAMES] ||\n\t\t\t\t(child.type as keyof typeof props.components)\n\t\t]\n\n\tif (\n\t\ttypeof maybeComponentOrShorthand === \"function\" ||\n\t\t(typeof maybeComponentOrShorthand === \"object\" &&\n\t\t\t(typeof maybeComponentOrShorthand.render === \"function\" ||\n\t\t\t\ttypeof maybeComponentOrShorthand.setup === \"function\" ||\n\t\t\t\t!!maybeComponentOrShorthand.__file ||\n\t\t\t\t!!maybeComponentOrShorthand.__name) || typeof maybeComponentOrShorthand?.props === \"object\")\n\t) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tprops: {\n\t\t\tlinkResolver: props.linkResolver,\n\t\t\tinternalLinkComponent: props.internalLinkComponent,\n\t\t\texternalLinkComponent: props.externalLinkComponent,\n\t\t\tshorthand: maybeComponentOrShorthand,\n\t\t},\n\t}\n}\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"child in props.children\"\n\t\t:key=\"JSON.stringify(child)\"\n\t\t:is=\"getComponent(child).is\"\n\t\t:node=\"child.node\"\n\t\tv-bind=\"getComponent(child).props\"\n\t\t><PrismicRichTextSerialize\n\t\t\tv-if=\"child.children.length\"\n\t\t\t:children=\"child.children\"\n\t\t\t:components=\"components\"\n\t\t\t:link-resolver=\"linkResolver\"\n\t\t\t:internal-link-component=\"internalLinkComponent\"\n\t\t\t:external-link-component=\"externalLinkComponent\"\n\t/></component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,qBAAqB;GAC1B,aAAa;GACb,eAAe;GACf,mBAAmB;GACnB,qBAAqB;GACrB;EAUD,MAAM,QAAQ;EAGd,SAAS,aAAa,OAAsD;GAC3E,MAAM,4BACL,MAAM,aACL,mBAAmB,MAAM,SACvB,MAAM;AAGV,OACC,OAAO,8BAA8B,cACpC,OAAO,8BAA8B,aACpC,OAAO,0BAA0B,WAAW,cAC5C,OAAO,0BAA0B,UAAU,cAC3C,CAAC,CAAC,0BAA0B,UAC5B,CAAC,CAAC,0BAA0B,WAAW,OAAO,2BAA2B,UAAU,SAErF,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI;IACJ,OAAO;KACN,cAAc,MAAM;KACpB,uBAAuB,MAAM;KAC7B,uBAAuB,MAAM;KAC7B,WAAW;KACX;IACF;;;;2BAKA,mBAac,UAAA,MAAA,WAZG,MAAM,WAAf,UAAK;wBADb,YAac,wBAVR,aAAa,MAAK,CAAE,GAAE,EAH5B,WAac;KAXZ,KAAK,KAAK,UAAU,MAAK;KAEzB,MAAM,MAAM;0BACL,aAAa,MAAK,CAAE,MAAK,EAAA;4BAQhC,CANM,MAAM,SAAS,uBADrB,YAOA,qCAAA;;MALC,UAAU,MAAM;MAChB,YAAY,QAAA;MACZ,iBAAe,QAAA;MACf,2BAAyB,QAAA;MACzB,2BAAyB,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 { InternalVueRichTextComponent } from \"./types\"\n\ntype PrismicRichTextSerializeProps = {\n\tchildren: ReturnType<typeof asTree>[\"children\"]\n\tinternalComponents: InternalVueRichTextComponent\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=\"JSON.stringify(child)\"\n\t\t:is=\"internalComponents[child.type].is\"\n\t\t:node=\"child.node\"\n\t\tv-bind=\"internalComponents[child.type].props\"\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,mBAUc,UAAA,MAAA,WATG,MAAM,WAAf,UAAK;wBADb,YAUc,wBAPR,QAAA,mBAAmB,MAAM,MAAM,GAAE,EAHvC,WAUc;KARZ,KAAK,KAAK,UAAU,MAAK;KAEzB,MAAM,MAAM;0BACL,QAAA,mBAAmB,MAAM,MAAM,MAAK,EAAA;4BAK3C,CAHM,MAAM,SAAS,uBADrB,YAIA,qCAAA;;MAFC,UAAU,MAAM;MAChB,uBAAqB,QAAA"}
@@ -1,5 +1,5 @@
1
- import { DefineComponent, FunctionalComponent, defineAsyncComponent } from "vue";
2
- import { RTAnyNode, RichTextNodeType } from "@prismicio/client";
1
+ import { VueComponent } from "../types.js";
2
+ import { LinkResolverFunction, RTAnyNode, RichTextNodeType } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicRichText/types.d.ts
5
5
 
@@ -21,7 +21,7 @@ type RichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {
21
21
  *
22
22
  * @typeParam TRTNode - The type of rich text node(s) this component handles
23
23
  */
24
- type VueRichTextComponent<TRTNode extends RTAnyNode = RTAnyNode> = DefineComponent<{}, {}, any> | ReturnType<typeof defineAsyncComponent> | DefineComponent<RichTextComponentProps<TRTNode>> | FunctionalComponent<RichTextComponentProps<TRTNode>>;
24
+ type VueRichTextComponent<TRTNode extends RTAnyNode = RTAnyNode> = VueComponent<RichTextComponentProps<TRTNode>>;
25
25
  /**
26
26
  * A shorthand definition for {@link VueRichTextSerializer} component types.
27
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicRichText/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAaA;;;;AACC,KADW,qBAAA,GAAwB,OACnC,CAAA,MAAA,CAAA,MAAA,OAAoB,gBAApB,EAAsC,oBAAtC,GAA6D,YAA7D,CAAA,CAAA;;;AAMD;AAAmD,KAAvC,sBAAuC,CAAA,gBAAA,SAAA,GAAY,SAAZ,CAAA,GAAA;EAAY,IAAA,EACxD,OADwD;CACxD;;AACN;;;;KAOI,oBAKgB,CAAA,gBALqB,SAKrB,GALiC,SAKjC,CAAA,GAFlB,eAEkB,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA,GAAlB,UAAkB,CAAA,OAAA,oBAAA,CAAA,GAClB,eADkB,CACF,sBADE,CACqB,OADrB,CAAA,CAAA,GAElB,mBAFkB,CAEE,sBAFF,CAEyB,OAFzB,CAAA,CAAA;;;;AAClB,KAMS,YAAA,GANT;EAC2C;;;EAAxB,EAAA,CAAA,EAAA,MAAA;EAKV"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicRichText/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAcA;;;;AACC,KADW,qBAAA,GAAwB,OACnC,CAAA,MAAA,CAAA,MAAA,OAAoB,gBAApB,EAAsC,oBAAtC,GAA6D,YAA7D,CAAA,CAAA;;;AAMD;AAAmD,KAAvC,sBAAuC,CAAA,gBAAA,SAAA,GAAY,SAAZ,CAAA,GAAA;EAAY,IAAA,EACxD,OADwD;CACxD;;AACN;;;;KAOI,oBACJ,CAAA,gBADyC,SACzC,GADqD,SACrD,CAAA,GADkE,YAClE,CAAA,sBAAA,CAAuB,OAAvB,CAAA,CAAA;;;AAMD;KAAY,YAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.cjs","names":[],"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":""}
1
+ {"version":3,"file":"PrismicTable.cjs","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { VueShorthand } from \"../PrismicRichText/types\"\nimport { type ComponentOrTagName, isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, 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/** The Prismic table field to render. */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * thead: { class: 'bg-black text-white' },\n\t * th: { as: 'td', class: 'font-bold' },\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\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = props.components?.[type]\n\n\tif (isVueComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as VueShorthand,\n\t}\n}\n\nconst tableComponents = computed<InternalVueTableComponents>(() => {\n\treturn {\n\t\ttable: getInternalComponent(\"table\"),\n\t\tthead: getInternalComponent(\"thead\"),\n\t\ttbody: getInternalComponent(\"tbody\"),\n\t\ttr: getInternalComponent(\"tr\"),\n\t\tth: getInternalComponent(\"th\"),\n\t\ttd: getInternalComponent(\"td\"),\n\t}\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"tableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...tableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"tableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"tableComponents.thead.shorthand\"\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"tableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"tableComponents.tbody.shorthand\"\n\t\t>\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" v-bind=\"$attrs\" />\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.js","names":[],"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":""}
1
+ {"version":3,"file":"PrismicTable.js","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { VueShorthand } from \"../PrismicRichText/types\"\nimport { type ComponentOrTagName, isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, 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/** The Prismic table field to render. */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * thead: { class: 'bg-black text-white' },\n\t * th: { as: 'td', class: 'font-bold' },\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\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = props.components?.[type]\n\n\tif (isVueComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as VueShorthand,\n\t}\n}\n\nconst tableComponents = computed<InternalVueTableComponents>(() => {\n\treturn {\n\t\ttable: getInternalComponent(\"table\"),\n\t\tthead: getInternalComponent(\"thead\"),\n\t\ttbody: getInternalComponent(\"tbody\"),\n\t\ttr: getInternalComponent(\"tr\"),\n\t\tth: getInternalComponent(\"th\"),\n\t\ttd: getInternalComponent(\"td\"),\n\t}\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"tableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...tableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"tableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"tableComponents.thead.shorthand\"\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"tableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"tableComponents.tbody.shorthand\"\n\t\t>\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" v-bind=\"$attrs\" />\n</template>\n"],"mappings":""}
@@ -2,7 +2,7 @@ import { ComponentOrTagName } from "../types.js";
2
2
  import { VueRichTextSerializer } from "../PrismicRichText/types.js";
3
3
  import "../PrismicRichText/index.js";
4
4
  import { VueTableComponents } from "./types.js";
5
- import * as vue6 from "vue";
5
+ import * as vue0 from "vue";
6
6
  import { TableField } from "@prismicio/client";
7
7
 
8
8
  //#region src/PrismicTable/PrismicTable.vue.d.ts
@@ -10,18 +10,18 @@ import { TableField } from "@prismicio/client";
10
10
  * Props for `<PrismicTable />`.
11
11
  */
12
12
  type PrismicTableProps = {
13
- /**
14
- * The Prismic table field to render.
15
- */
13
+ /** The Prismic table field to render. */
16
14
  field: TableField | undefined;
17
15
  /**
18
- * An object that maps a table block type to a Vue component.
16
+ * An object that maps a table block type to a Vue component or a shorthand definition.
19
17
  *
20
18
  * @example
21
19
  *
22
20
  * ```javascript
23
21
  * {
24
22
  * table: Table,
23
+ * thead: { class: 'bg-black text-white' },
24
+ * th: { as: 'td', class: 'font-bold' },
25
25
  * }
26
26
  * ```
27
27
  */
@@ -32,7 +32,7 @@ type PrismicTableProps = {
32
32
  */
33
33
  fallback?: ComponentOrTagName;
34
34
  };
35
- declare const __VLS_export: vue6.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue6.ComponentOptionsMixin, vue6.ComponentOptionsMixin, {}, string, vue6.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue6.ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: vue0.DefineComponent<PrismicTableProps, {}, {}, {}, {}, vue0.ComponentOptionsMixin, vue0.ComponentOptionsMixin, {}, string, vue0.PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, vue0.ComponentProvideOptions, false, {}, any>;
36
36
  declare const _default: typeof __VLS_export;
37
37
  //#endregion
38
38
  export { PrismicTableProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue.d.ts","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAgGY,iBAAA;EAAA;;;EAiBuB,KAAA,EAb3B,UAa2B,GAAA,SAAA;EAMvB;;AACX;;;;;;;;;EAqHiB,UAAA,CAAA,EA5HJ,kBA4HI,GA5HiB,qBA4HjB;EAAA;AAAA;;;aAtHN;;cAsHN,cAAY,IAAA,CAAA,gBAAA,mCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,qBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicTable.vue.d.ts","names":[],"sources":["../../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":[],"mappings":";;;;;;;;;;;KA4HY,iBAAA;EAAA;EAEJ,KAAA,EAAA,UAAA,GAAA,SAAA;EAeM;;;;AAOb;;;;;;;;;EAkJiB,UAAA,CAAA,EAzJJ,kBAyJI,GAzJiB,qBAyJjB;EAAA;AAAA;;;aAnJN;;cAmJN,cAAY,IAAA,CAAA,gBAAA,mCAAA,IAAA,CAAA,qBAAA,EAAA,IAAA,CAAA,qBAAA,cAAA,IAAA,CAAA,WAAA,EAAA,SAAA,qBAAA,sCAAA,IAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -1,3 +1,4 @@
1
+ const require_types = require('../types.cjs');
1
2
  const require_PrismicTableDefaultComponents = require('./PrismicTableDefaultComponents.cjs');
2
3
  const require_PrismicTableRow = require('./PrismicTableRow.cjs');
3
4
  let vue = require("vue");
@@ -23,39 +24,66 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (
23
24
  },
24
25
  setup(__props) {
25
26
  const props = __props;
26
- const mergedComponents = (0, vue.computed)(() => ({
27
- ...require_PrismicTableDefaultComponents.defaultTableComponents,
28
- ...props.components
29
- }));
27
+ function getInternalComponent(type) {
28
+ const maybeComponentOrShorthand = props.components?.[type];
29
+ if (require_types.isVueComponent(maybeComponentOrShorthand)) return { is: maybeComponentOrShorthand };
30
+ return {
31
+ is: require_PrismicTableDefaultComponents.defaultTableComponents[type],
32
+ shorthand: maybeComponentOrShorthand
33
+ };
34
+ }
35
+ const tableComponents = (0, vue.computed)(() => {
36
+ return {
37
+ table: getInternalComponent("table"),
38
+ thead: getInternalComponent("thead"),
39
+ tbody: getInternalComponent("tbody"),
40
+ tr: getInternalComponent("tr"),
41
+ th: getInternalComponent("th"),
42
+ td: getInternalComponent("td")
43
+ };
44
+ });
30
45
  return (_ctx, _cache) => {
31
- return (0, vue.unref)(__prismicio_client.isFilled).table(__props.field) ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(mergedComponents.value.table), (0, vue.mergeProps)({
46
+ return (0, vue.unref)(__prismicio_client.isFilled).table(__props.field) ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(tableComponents.value.table.is), (0, vue.mergeProps)({
32
47
  key: 0,
33
48
  table: __props.field
34
- }, _ctx.$attrs), {
35
- default: (0, vue.withCtx)(() => [__props.field.head ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(mergedComponents.value.thead), {
49
+ }, {
50
+ ..._ctx.$attrs,
51
+ ...tableComponents.value.table.shorthand
52
+ }), {
53
+ default: (0, vue.withCtx)(() => [__props.field.head ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(tableComponents.value.thead.is), (0, vue.mergeProps)({
36
54
  key: 0,
37
55
  head: __props.field.head
38
- }, {
56
+ }, tableComponents.value.thead.shorthand), {
39
57
  default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.field.head.rows, (row) => {
40
58
  return (0, vue.openBlock)(), (0, vue.createBlock)(require_PrismicTableRow.default, {
41
59
  key: row.key,
42
60
  row,
43
- components: mergedComponents.value
44
- }, null, 8, ["row", "components"]);
61
+ internalTableComponents: tableComponents.value,
62
+ components: __props.components
63
+ }, null, 8, [
64
+ "row",
65
+ "internalTableComponents",
66
+ "components"
67
+ ]);
45
68
  }), 128))]),
46
69
  _: 1
47
- }, 8, ["head"])) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(mergedComponents.value.tbody), { body: __props.field.body }, {
70
+ }, 16, ["head"])) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(tableComponents.value.tbody.is), (0, vue.mergeProps)({ body: __props.field.body }, tableComponents.value.tbody.shorthand), {
48
71
  default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.field.body.rows, (row) => {
49
72
  return (0, vue.openBlock)(), (0, vue.createBlock)(require_PrismicTableRow.default, {
50
73
  key: row.key,
51
74
  row,
52
- components: mergedComponents.value
53
- }, null, 8, ["row", "components"]);
75
+ internalTableComponents: tableComponents.value,
76
+ components: __props.components
77
+ }, null, 8, [
78
+ "row",
79
+ "internalTableComponents",
80
+ "components"
81
+ ]);
54
82
  }), 128))]),
55
83
  _: 1
56
- }, 8, ["body"]))]),
84
+ }, 16, ["body"]))]),
57
85
  _: 1
58
- }, 16, ["table"])) : __props.fallback ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.fallback), { key: 1 })) : (0, vue.createCommentVNode)("v-if", true);
86
+ }, 16, ["table"])) : __props.fallback ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.fallback), (0, vue.normalizeProps)((0, vue.mergeProps)({ key: 1 }, _ctx.$attrs)), null, 16)) : (0, vue.createCommentVNode)("v-if", true);
59
87
  };
60
88
  }
61
89
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.cjs","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,4CAAmC;GACxC,GAAG;GACH,GAAG,MAAM;GACT,EAAC;;yBAKM,4BAAQ,CAAC,MAAM,QAAA,MAAK,gFACrB,iBAAA,MAAiB,MAAK,sBAwBhB;;IAvBV,OAAO,QAAA;MACAA,KAAAA,OAAM,EAAA;oCAaF,CAVL,QAAA,MAAM,oFACP,iBAAA,MAAiB,MAAK,EAAA;;KAC1B,MAAM,QAAA,MAAM;;qCAGkB,wDAI7B,cAAA,0BAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAIT,iCAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;+IAGC,iBAAA,MAAiB,MAAK,EAAA,EAAG,MAAM,QAAA,MAAM;qCAErB,wDAI7B,cAAA,0BAJa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAIT,iCAAA;OAHA,KAAK,IAAI;OACJ;OACL,YAAY,iBAAA;;;;;;wBAIM,QAAA,wFAAe,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.cjs","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 { VueShorthand } from \"../PrismicRichText/types\"\nimport { type ComponentOrTagName, isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, 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/** The Prismic table field to render. */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * thead: { class: 'bg-black text-white' },\n\t * th: { as: 'td', class: 'font-bold' },\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\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = props.components?.[type]\n\n\tif (isVueComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as VueShorthand,\n\t}\n}\n\nconst tableComponents = computed<InternalVueTableComponents>(() => {\n\treturn {\n\t\ttable: getInternalComponent(\"table\"),\n\t\tthead: getInternalComponent(\"thead\"),\n\t\ttbody: getInternalComponent(\"tbody\"),\n\t\ttr: getInternalComponent(\"tr\"),\n\t\tth: getInternalComponent(\"th\"),\n\t\ttd: getInternalComponent(\"td\"),\n\t}\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"tableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...tableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"tableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"tableComponents.thead.shorthand\"\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"tableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"tableComponents.tbody.shorthand\"\n\t\t>\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" v-bind=\"$attrs\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ;EAGd,SAAS,qBAAqB,MAAgC;GAC7D,MAAM,4BAA4B,MAAM,aAAa;AAErD,OAAI,6BAAe,0BAA0B,CAC5C,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,6DAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,0CAA6D;AAClE,UAAO;IACN,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC/B;IACA;;yBAKO,4BAAQ,CAAC,MAAM,QAAA,MAAK,gFACrB,gBAAA,MAAgB,MAAM,GAAE,sBA+BlB;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,gBAAA,MAAgB,MAAM;IAAS,CAAA,EAAA;oCAe3C,CAZL,QAAA,MAAM,oFACP,gBAAA,MAAgB,MAAM,GAAE,sBAWlB;;KAVV,MAAM,QAAA,MAAM;OACL,gBAAA,MAAgB,MAAM,UAAS,EAAA;qCAGR,wDAK7B,cAAA,0BALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,iCAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,gBAAA;OACzB,YAAY,QAAA;;;;;;;;gJAIT,gBAAA,MAAgB,MAAM,GAAE,sBAWlB,EAVV,MAAM,QAAA,MAAM,QACL,gBAAA,MAAgB,MAAM,UAAS,EAAA;qCAGR,wDAK7B,cAAA,0BALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,iCAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,gBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,wFAAe,QAAA,SAAQ,8CAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA"}
@@ -1,6 +1,7 @@
1
+ import { isVueComponent } from "../types.js";
1
2
  import { defaultTableComponents } from "./PrismicTableDefaultComponents.js";
2
3
  import PrismicTableRow_default from "./PrismicTableRow.js";
3
- import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, unref, withCtx } from "vue";
4
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, normalizeProps, openBlock, renderList, resolveDynamicComponent, unref, withCtx } from "vue";
4
5
  import { isFilled } from "@prismicio/client";
5
6
 
6
7
  //#region src/PrismicTable/PrismicTable.vue?vue&type=script&setup=true&lang.ts
@@ -23,39 +24,66 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
23
24
  },
24
25
  setup(__props) {
25
26
  const props = __props;
26
- const mergedComponents = computed(() => ({
27
- ...defaultTableComponents,
28
- ...props.components
29
- }));
27
+ function getInternalComponent(type) {
28
+ const maybeComponentOrShorthand = props.components?.[type];
29
+ if (isVueComponent(maybeComponentOrShorthand)) return { is: maybeComponentOrShorthand };
30
+ return {
31
+ is: defaultTableComponents[type],
32
+ shorthand: maybeComponentOrShorthand
33
+ };
34
+ }
35
+ const tableComponents = computed(() => {
36
+ return {
37
+ table: getInternalComponent("table"),
38
+ thead: getInternalComponent("thead"),
39
+ tbody: getInternalComponent("tbody"),
40
+ tr: getInternalComponent("tr"),
41
+ th: getInternalComponent("th"),
42
+ td: getInternalComponent("td")
43
+ };
44
+ });
30
45
  return (_ctx, _cache) => {
31
- return unref(isFilled).table(__props.field) ? (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.table), mergeProps({
46
+ return unref(isFilled).table(__props.field) ? (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.table.is), mergeProps({
32
47
  key: 0,
33
48
  table: __props.field
34
- }, _ctx.$attrs), {
35
- default: withCtx(() => [__props.field.head ? (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.thead), {
49
+ }, {
50
+ ..._ctx.$attrs,
51
+ ...tableComponents.value.table.shorthand
52
+ }), {
53
+ default: withCtx(() => [__props.field.head ? (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.thead.is), mergeProps({
36
54
  key: 0,
37
55
  head: __props.field.head
38
- }, {
56
+ }, tableComponents.value.thead.shorthand), {
39
57
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.field.head.rows, (row) => {
40
58
  return openBlock(), createBlock(PrismicTableRow_default, {
41
59
  key: row.key,
42
60
  row,
43
- components: mergedComponents.value
44
- }, null, 8, ["row", "components"]);
61
+ internalTableComponents: tableComponents.value,
62
+ components: __props.components
63
+ }, null, 8, [
64
+ "row",
65
+ "internalTableComponents",
66
+ "components"
67
+ ]);
45
68
  }), 128))]),
46
69
  _: 1
47
- }, 8, ["head"])) : createCommentVNode("v-if", true), (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.tbody), { body: __props.field.body }, {
70
+ }, 16, ["head"])) : createCommentVNode("v-if", true), (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.tbody.is), mergeProps({ body: __props.field.body }, tableComponents.value.tbody.shorthand), {
48
71
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.field.body.rows, (row) => {
49
72
  return openBlock(), createBlock(PrismicTableRow_default, {
50
73
  key: row.key,
51
74
  row,
52
- components: mergedComponents.value
53
- }, null, 8, ["row", "components"]);
75
+ internalTableComponents: tableComponents.value,
76
+ components: __props.components
77
+ }, null, 8, [
78
+ "row",
79
+ "internalTableComponents",
80
+ "components"
81
+ ]);
54
82
  }), 128))]),
55
83
  _: 1
56
- }, 8, ["body"]))]),
84
+ }, 16, ["body"]))]),
57
85
  _: 1
58
- }, 16, ["table"])) : __props.fallback ? (openBlock(), createBlock(resolveDynamicComponent(__props.fallback), { key: 1 })) : createCommentVNode("v-if", true);
86
+ }, 16, ["table"])) : __props.fallback ? (openBlock(), createBlock(resolveDynamicComponent(__props.fallback), normalizeProps(mergeProps({ key: 1 }, _ctx.$attrs)), null, 16)) : createCommentVNode("v-if", true);
59
87
  };
60
88
  }
61
89
  });
@@ -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 * 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"}
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 { VueShorthand } from \"../PrismicRichText/types\"\nimport { type ComponentOrTagName, isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, 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/** The Prismic table field to render. */\n\tfield: TableField | undefined\n\n\t/**\n\t * An object that maps a table block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * thead: { class: 'bg-black text-white' },\n\t * th: { as: 'td', class: 'font-bold' },\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\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = props.components?.[type]\n\n\tif (isVueComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as VueShorthand,\n\t}\n}\n\nconst tableComponents = computed<InternalVueTableComponents>(() => {\n\treturn {\n\t\ttable: getInternalComponent(\"table\"),\n\t\tthead: getInternalComponent(\"thead\"),\n\t\ttbody: getInternalComponent(\"tbody\"),\n\t\ttr: getInternalComponent(\"tr\"),\n\t\tth: getInternalComponent(\"th\"),\n\t\ttd: getInternalComponent(\"td\"),\n\t}\n})\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"tableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...tableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"tableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"tableComponents.thead.shorthand\"\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"tableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"tableComponents.tbody.shorthand\"\n\t\t>\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:internalTableComponents=\"tableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" v-bind=\"$attrs\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,MAAM,QAAQ;EAGd,SAAS,qBAAqB,MAAgC;GAC7D,MAAM,4BAA4B,MAAM,aAAa;AAErD,OAAI,eAAe,0BAA0B,CAC5C,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,uBAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,kBAAkB,eAA2C;AAClE,UAAO;IACN,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC9B,IAAI,qBAAqB,KAAK;IAC/B;IACA;;UAKO,MAAA,SAAQ,CAAC,MAAM,QAAA,MAAK,iBAD3B,YAiCY,wBA/BN,gBAAA,MAAgB,MAAM,GAAE,EAF9B,WAiCY;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,gBAAA,MAAgB,MAAM;IAAS,CAAA,EAAA;2BAe3C,CAZL,QAAA,MAAM,qBADb,YAaY,wBAXN,gBAAA,MAAgB,MAAM,GAAE,EAF9B,WAaY;;KAVV,MAAM,QAAA,MAAM;OACL,gBAAA,MAAgB,MAAM,UAAS,EAAA;4BAGR,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,gBAAA;OACzB,YAAY,QAAA;;;;;;;;wEAGf,YAYY,wBAXN,gBAAA,MAAgB,MAAM,GAAE,EAD9B,WAYY,EAVV,MAAM,QAAA,MAAM,QACL,gBAAA,MAAgB,MAAM,UAAS,EAAA;4BAGR,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,gBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,yBAAtB,YAAiE,wBAA5B,QAAA,SAAQ,EAAA,eAAA,WAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"PrismicTableDefaultComponents.cjs","names":["defaultTableComponents: DefaultVueTableComponents"],"sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { DefaultVueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: DefaultVueTableComponents = {\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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(props.as ?? \"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAOA,MAAaA,yBAAoD;CAChE,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,OAAO;GACN,yCAAiC;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,OAAO;GACN,sCAA8B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BACG,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF"}
@@ -1 +1 @@
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
+ {"version":3,"file":"PrismicTableDefaultComponents.js","names":["defaultTableComponents: DefaultVueTableComponents","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 { DefaultVueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: DefaultVueTableComponents = {\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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(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 () =>\n\t\t\t\th(props.as ?? \"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAOA,MAAaA,yBAAoD;CAChE,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAO;GACN,GAAGC,OAA8B;GACjC,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAO;GACN,GAAGC,IAA2B;GAC9B,IAAI,EAAE,MAAM,QAAwC;GACpD;EACD,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBACC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.cjs","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\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 * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicTableRow.cjs","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.js","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\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 * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PrismicTableRow.js","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":""}
@@ -10,38 +10,41 @@ var PrismicTableRow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
10
10
  type: Object,
11
11
  required: true
12
12
  },
13
- components: {
13
+ internalTableComponents: {
14
14
  type: Object,
15
15
  required: true
16
+ },
17
+ components: {
18
+ type: Object,
19
+ required: false
16
20
  }
17
21
  },
18
22
  setup(__props) {
19
- const props = __props;
20
23
  return (_ctx, _cache) => {
21
- return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(props.components.tr), { row: __props.row }, {
24
+ return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.internalTableComponents.tr.is), (0, vue.mergeProps)({ row: __props.row }, __props.internalTableComponents.tr.shorthand), {
22
25
  default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.row.cells, (cell) => {
23
- return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: cell.key }, [cell.type === "header" ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(props.components.th), {
26
+ return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: cell.key }, [cell.type === "header" ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.internalTableComponents.th.is), (0, vue.mergeProps)({
24
27
  key: 0,
25
28
  cell
26
- }, {
29
+ }, { ref_for: true }, __props.internalTableComponents.th.shorthand), {
27
30
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)(require_PrismicRichText.default, {
28
31
  field: cell.content,
29
32
  components: __props.components
30
33
  }, null, 8, ["field", "components"])]),
31
34
  _: 2
32
- }, 1032, ["cell"])) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(props.components.td), {
35
+ }, 1040, ["cell"])) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(__props.internalTableComponents.td.is), (0, vue.mergeProps)({
33
36
  key: 1,
34
37
  cell
35
- }, {
38
+ }, { ref_for: true }, __props.internalTableComponents.td.shorthand), {
36
39
  default: (0, vue.withCtx)(() => [(0, vue.createVNode)(require_PrismicRichText.default, {
37
40
  field: cell.content,
38
- components: props.components
41
+ components: __props.components
39
42
  }, null, 8, ["field", "components"])]),
40
43
  _: 2
41
- }, 1032, ["cell"]))], 64);
44
+ }, 1040, ["cell"]))], 64);
42
45
  }), 128))]),
43
46
  _: 1
44
- }, 8, ["row"]);
47
+ }, 16, ["row"]);
45
48
  };
46
49
  }
47
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\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 * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,QAAQ;;sFAKG,MAAM,WAAW,GAAE,EAAA,EAAG,KAAK,QAAA,KAAG,EAAA;oCACV,wDAWxB,cAAA,0BAXc,QAAA,IAAI,QAAZ,SAAI;mFAAqB,KAAK,QAEvC,KAAK,SAAI,wFACV,MAAM,WAAW,GAAE,EAAA;;MACjB;;sCAE2D,sBAAA,iCAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;wGAE9B,MAAM,WAAW,GAAE,EAAA;;MAAS;;sCACsB,sBAAA,iCAAA;OAAtD,OAAO,KAAK;OAAU,YAAY,MAAM"}
1
+ {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;sFAoBO,QAAA,wBAAwB,GAAG,GAAE,sBAsBvB,EArBV,KAAK,QAAA,KAAG,EACD,QAAA,wBAAwB,GAAG,UAAS,EAAA;oCAET,wDAiBxB,cAAA,0BAjBc,QAAA,IAAI,QAAZ,SAAI;mFAAqB,KAAK,QAEvC,KAAK,SAAI,wFACV,QAAA,wBAAwB,GAAG,GAAE,sBAKvB;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;sCAEsB,sBAAA,iCAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;wGAI/C,QAAA,wBAAwB,GAAG,GAAE,sBAKvB;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;sCAEsB,sBAAA,iCAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
@@ -1,5 +1,5 @@
1
1
  import PrismicRichText_default from "../PrismicRichText/PrismicRichText.js";
2
- import { Fragment, createBlock, createElementBlock, createVNode, defineComponent, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
2
+ import { Fragment, createBlock, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, renderList, resolveDynamicComponent, withCtx } from "vue";
3
3
 
4
4
  //#region src/PrismicTable/PrismicTableRow.vue?vue&type=script&setup=true&lang.ts
5
5
  var PrismicTableRow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
@@ -10,38 +10,41 @@ var PrismicTableRow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
10
10
  type: Object,
11
11
  required: true
12
12
  },
13
- components: {
13
+ internalTableComponents: {
14
14
  type: Object,
15
15
  required: true
16
+ },
17
+ components: {
18
+ type: Object,
19
+ required: false
16
20
  }
17
21
  },
18
22
  setup(__props) {
19
- const props = __props;
20
23
  return (_ctx, _cache) => {
21
- return openBlock(), createBlock(resolveDynamicComponent(props.components.tr), { row: __props.row }, {
24
+ return openBlock(), createBlock(resolveDynamicComponent(__props.internalTableComponents.tr.is), mergeProps({ row: __props.row }, __props.internalTableComponents.tr.shorthand), {
22
25
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.row.cells, (cell) => {
23
- return openBlock(), createElementBlock(Fragment, { key: cell.key }, [cell.type === "header" ? (openBlock(), createBlock(resolveDynamicComponent(props.components.th), {
26
+ return openBlock(), createElementBlock(Fragment, { key: cell.key }, [cell.type === "header" ? (openBlock(), createBlock(resolveDynamicComponent(__props.internalTableComponents.th.is), mergeProps({
24
27
  key: 0,
25
28
  cell
26
- }, {
29
+ }, { ref_for: true }, __props.internalTableComponents.th.shorthand), {
27
30
  default: withCtx(() => [createVNode(PrismicRichText_default, {
28
31
  field: cell.content,
29
32
  components: __props.components
30
33
  }, null, 8, ["field", "components"])]),
31
34
  _: 2
32
- }, 1032, ["cell"])) : (openBlock(), createBlock(resolveDynamicComponent(props.components.td), {
35
+ }, 1040, ["cell"])) : (openBlock(), createBlock(resolveDynamicComponent(__props.internalTableComponents.td.is), mergeProps({
33
36
  key: 1,
34
37
  cell
35
- }, {
38
+ }, { ref_for: true }, __props.internalTableComponents.td.shorthand), {
36
39
  default: withCtx(() => [createVNode(PrismicRichText_default, {
37
40
  field: cell.content,
38
- components: props.components
41
+ components: __props.components
39
42
  }, null, 8, ["field", "components"])]),
40
43
  _: 2
41
- }, 1032, ["cell"]))], 64);
44
+ }, 1040, ["cell"]))], 64);
42
45
  }), 128))]),
43
46
  _: 1
44
- }, 8, ["row"]);
47
+ }, 16, ["row"]);
45
48
  };
46
49
  }
47
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\n/**\n * Props for `<PrismicRowTable />`.\n */\nexport type PrismicTableRowProps = {\n\t/**\n\t * The Prismic table row to render.\n\t */\n\trow: TableFieldHeadRow | TableFieldBodyRow\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 * tr: TableRow,\n\t * }\n\t * ```\n\t */\n\tcomponents: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component :is=\"props.components.tr\" :row=\"row\">\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"props.components.th\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component v-else :is=\"props.components.td\" :cell=\"cell\">\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"props.components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EA+BA,MAAM,QAAQ;;uBAKb,YAaY,wBAbI,MAAM,WAAW,GAAE,EAAA,EAAG,KAAK,QAAA,KAAG,EAAA;2BACV,mBAAnC,mBAWW,UAAA,MAAA,WAXc,QAAA,IAAI,QAAZ,SAAI;6DAAqB,KAAK,QAEvC,KAAK,SAAI,yBADhB,YAMY,wBAJN,MAAM,WAAW,GAAE,EAAA;;MACjB;;6BAE2D,CAAlE,YAAkE,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;yCAErD,YAEY,wBAFW,MAAM,WAAW,GAAE,EAAA;;MAAS;;6BACsB,CAAxE,YAAwE,yBAAA;OAAtD,OAAO,KAAK;OAAU,YAAY,MAAM"}
1
+ {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { InternalVueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;uBAmBC,YAuBY,wBAtBN,QAAA,wBAAwB,GAAG,GAAE,EADnC,WAuBY,EArBV,KAAK,QAAA,KAAG,EACD,QAAA,wBAAwB,GAAG,UAAS,EAAA;2BAET,mBAAnC,mBAiBW,UAAA,MAAA,WAjBc,QAAA,IAAI,QAAZ,SAAI;6DAAqB,KAAK,QAEvC,KAAK,SAAI,yBADhB,YAOY,wBALN,QAAA,wBAAwB,GAAG,GAAE,EAFnC,WAOY;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;6BAEsB,CAAlE,YAAkE,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;yCAErD,YAOY,wBALN,QAAA,wBAAwB,GAAG,GAAE,EAFnC,WAOY;;MAJJ;2BACC,QAAA,wBAAwB,GAAG,UAAS,EAAA;6BAEsB,CAAlE,YAAkE,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
@@ -1,5 +1,5 @@
1
+ import { VueComponent } from "../types.js";
1
2
  import { VueShorthand } from "../PrismicRichText/types.js";
2
- import { DefineComponent, FunctionalComponent, defineAsyncComponent } from "vue";
3
3
  import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
4
4
 
5
5
  //#region src/PrismicTable/types.d.ts
@@ -30,7 +30,6 @@ type VueTableComponents = {
30
30
  cell: TableFieldDataCell;
31
31
  }> | VueShorthand;
32
32
  };
33
- type VueComponent<TProps> = ReturnType<typeof defineAsyncComponent> | DefineComponent<TProps> | FunctionalComponent<TProps>;
34
33
  //#endregion
35
34
  export { VueTableComponents };
36
35
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAmBA;;;;AAE8B,KAFlB,kBAAA,GAEkB;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,KAAA,EADnB,UACmB,CAAA,QAAA,CAAA;EACpB,CAAA,CAAA,GAF2B,YAE3B;EAArB,KAAA,CAAA,EADA,YACA,CAAA;IAAyC,IAAA,EADpB,cACoB;EAE1B,CAAA,CAAA,GAH0B,YAG1B;EAAoB,KAAA,CAAA,EAFnC,YAEmC,CAAA;IAAxC,IAAA,EAF0B,cAE1B;EACA,CAAA,CAAA,GAH8C,YAG9C;EACuB,EAAA,CAAA,EAFvB,YAEuB,CAAA;IAArB,GAAA,EAFkB,iBAElB,GAFsC,iBAEtC;EAA+C,CAAA,CAAA,GADjD,YACiD;EAC1B,EAAA,CAAA,EADrB,YACqB,CAAA;IAArB,IAAA,EADqB,oBACrB;EAA6C,CAAA,CAAA,GADE,YACF;EAAY,EAAA,CAAA,EAAzD,YAAyD,CAAA;UAApC;OAAwB"}