@prismicio/vue 5.3.0-pr.88.72388e2 → 5.3.0-pr.89.d0f4ac2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/PrismicImage.vue.d.cts +13 -19
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +1 -4
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +5 -6
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicRichText/types.d.cts +25 -26
  8. package/dist/PrismicRichText/types.d.cts.map +1 -1
  9. package/dist/PrismicTable/PrismicTable.vue.d.cts +5 -6
  10. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  11. package/dist/PrismicTable/types.d.cts +7 -8
  12. package/dist/PrismicTable/types.d.cts.map +1 -1
  13. package/dist/PrismicText.vue.d.cts +1 -3
  14. package/dist/PrismicText.vue.d.cts.map +1 -1
  15. package/dist/SliceZone/types.d.cts +3 -9
  16. package/dist/SliceZone/types.d.cts.map +1 -1
  17. package/dist/createPrismic.d.cts +61 -0
  18. package/dist/createPrismic.d.cts.map +1 -0
  19. package/dist/index.cjs +4 -1
  20. package/dist/index.d.cts +4 -2
  21. package/dist/index.d.ts +4 -2
  22. package/dist/index.js +2 -1
  23. package/dist/package.cjs +1 -1
  24. package/dist/package.cjs.map +1 -1
  25. package/dist/package.js +1 -1
  26. package/dist/package.js.map +1 -1
  27. package/dist/src/PrismicImage.cjs.map +1 -1
  28. package/dist/src/PrismicImage.js.map +1 -1
  29. package/dist/src/PrismicImage.vue.d.ts +17 -23
  30. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  31. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  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 +5 -8
  36. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  37. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs +6 -10
  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 +6 -10
  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 +9 -10
  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 +11 -5
  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 +11 -5
  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 +2 -2
  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 +2 -2
  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 +10 -4
  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 +11 -5
  60. package/dist/src/PrismicRichText/PrismicRichTextSerialize.vue_vue_type_script_setup_true_lang.js.map +1 -1
  61. package/dist/src/PrismicRichText/index.d.ts +1 -1
  62. package/dist/src/PrismicRichText/types.d.ts +25 -26
  63. package/dist/src/PrismicRichText/types.d.ts.map +1 -1
  64. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  65. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  66. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +5 -6
  67. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  68. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs +17 -9
  69. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  70. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js +17 -9
  71. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  72. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs +12 -30
  73. package/dist/src/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -1
  74. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js +12 -30
  75. package/dist/src/PrismicTable/PrismicTableDefaultComponents.js.map +1 -1
  76. package/dist/src/PrismicTable/PrismicTableRow.cjs.map +1 -1
  77. package/dist/src/PrismicTable/PrismicTableRow.js.map +1 -1
  78. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  79. package/dist/src/PrismicTable/PrismicTableRow.vue_vue_type_script_setup_true_lang.js.map +1 -1
  80. package/dist/src/PrismicTable/index.d.ts +1 -0
  81. package/dist/src/PrismicTable/types.d.ts +7 -8
  82. package/dist/src/PrismicTable/types.d.ts.map +1 -1
  83. package/dist/src/PrismicText.cjs.map +1 -1
  84. package/dist/src/PrismicText.js.map +1 -1
  85. package/dist/src/PrismicText.vue.d.ts +3 -5
  86. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  87. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  88. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  89. package/dist/src/SliceZone/SliceZone.vue.d.ts +2 -2
  90. package/dist/src/SliceZone/types.d.ts +3 -9
  91. package/dist/src/SliceZone/types.d.ts.map +1 -1
  92. package/dist/src/createPrismic.cjs +33 -0
  93. package/dist/src/createPrismic.cjs.map +1 -0
  94. package/dist/src/createPrismic.d.ts +63 -0
  95. package/dist/src/createPrismic.d.ts.map +1 -0
  96. package/dist/src/createPrismic.js +32 -0
  97. package/dist/src/createPrismic.js.map +1 -0
  98. package/dist/src/lib/isInternalURL.cjs +2 -6
  99. package/dist/src/lib/isInternalURL.cjs.map +1 -1
  100. package/dist/src/lib/isInternalURL.js +2 -6
  101. package/dist/src/lib/isInternalURL.js.map +1 -1
  102. package/dist/src/types.cjs.map +1 -1
  103. package/dist/src/types.d.ts +11 -1
  104. package/dist/src/types.d.ts.map +1 -1
  105. package/dist/src/types.js.map +1 -1
  106. package/dist/types.d.cts +11 -1
  107. package/dist/types.d.cts.map +1 -1
  108. package/package.json +1 -3
  109. package/src/PrismicImage.vue +5 -8
  110. package/src/PrismicLink.vue +14 -14
  111. package/src/PrismicRichText/PrismicRichText.vue +24 -15
  112. package/src/PrismicRichText/PrismicRichTextDefaultComponent.vue +8 -4
  113. package/src/PrismicRichText/PrismicRichTextSerialize.vue +4 -3
  114. package/src/PrismicRichText/index.ts +1 -1
  115. package/src/PrismicRichText/types.ts +57 -29
  116. package/src/PrismicTable/PrismicTable.vue +27 -19
  117. package/src/PrismicTable/PrismicTableDefaultComponents.ts +14 -39
  118. package/src/PrismicTable/PrismicTableRow.vue +2 -2
  119. package/src/PrismicTable/index.ts +2 -0
  120. package/src/PrismicTable/types.ts +41 -23
  121. package/src/PrismicText.vue +1 -3
  122. package/src/SliceZone/types.ts +3 -9
  123. package/src/createPrismic.ts +86 -0
  124. package/src/index.ts +5 -1
  125. package/src/lib/isInternalURL.ts +2 -6
  126. package/src/types.ts +13 -1
@@ -1,4 +1,5 @@
1
1
  const require_types = require('../types.cjs');
2
+ const require_createPrismic = require('../createPrismic.cjs');
2
3
  const require_PrismicTableDefaultComponents = require('./PrismicTableDefaultComponents.cjs');
3
4
  const require_PrismicTableRow = require('./PrismicTableRow.cjs');
4
5
  let vue = require("vue");
@@ -24,15 +25,22 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (
24
25
  },
25
26
  setup(__props) {
26
27
  const props = __props;
28
+ const { componentsConfig } = require_createPrismic.usePrismic();
29
+ const resolvedComponents = (0, vue.computed)(() => {
30
+ return {
31
+ ...componentsConfig?.defaultComponents,
32
+ ...props.components
33
+ };
34
+ });
27
35
  function getInternalComponent(type) {
28
- const maybeComponentOrShorthand = props.components?.[type];
36
+ const maybeComponentOrShorthand = resolvedComponents.value?.[type];
29
37
  if (require_types.isVueComponent(maybeComponentOrShorthand)) return { is: maybeComponentOrShorthand };
30
38
  return {
31
39
  is: require_PrismicTableDefaultComponents.defaultTableComponents[type],
32
40
  shorthand: maybeComponentOrShorthand
33
41
  };
34
42
  }
35
- const tableComponents = (0, vue.computed)(() => {
43
+ const internalTableComponents = (0, vue.computed)(() => {
36
44
  return {
37
45
  table: getInternalComponent("table"),
38
46
  thead: getInternalComponent("thead"),
@@ -43,22 +51,22 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (
43
51
  };
44
52
  });
45
53
  return (_ctx, _cache) => {
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)({
54
+ return (0, vue.unref)(__prismicio_client.isFilled).table(__props.field) ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(internalTableComponents.value.table.is), (0, vue.mergeProps)({
47
55
  key: 0,
48
56
  table: __props.field
49
57
  }, {
50
58
  ..._ctx.$attrs,
51
- ...tableComponents.value.table.shorthand
59
+ ...internalTableComponents.value.table.shorthand
52
60
  }), {
53
- default: (0, vue.withCtx)(() => [__props.field.head ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(tableComponents.value.thead.is), (0, vue.mergeProps)({
61
+ default: (0, vue.withCtx)(() => [__props.field.head ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(internalTableComponents.value.thead.is), (0, vue.mergeProps)({
54
62
  key: 0,
55
63
  head: __props.field.head
56
- }, tableComponents.value.thead.shorthand), {
64
+ }, internalTableComponents.value.thead.shorthand), {
57
65
  default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.field.head.rows, (row) => {
58
66
  return (0, vue.openBlock)(), (0, vue.createBlock)(require_PrismicTableRow.default, {
59
67
  key: row.key,
60
68
  row,
61
- internalTableComponents: tableComponents.value,
69
+ internalTableComponents: internalTableComponents.value,
62
70
  components: __props.components
63
71
  }, null, 8, [
64
72
  "row",
@@ -67,12 +75,12 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (
67
75
  ]);
68
76
  }), 128))]),
69
77
  _: 1
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), {
78
+ }, 16, ["head"])) : (0, vue.createCommentVNode)("v-if", true), ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(internalTableComponents.value.tbody.is), (0, vue.mergeProps)({ body: __props.field.body }, internalTableComponents.value.tbody.shorthand), {
71
79
  default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.field.body.rows, (row) => {
72
80
  return (0, vue.openBlock)(), (0, vue.createBlock)(require_PrismicTableRow.default, {
73
81
  key: row.key,
74
82
  row,
75
- internalTableComponents: tableComponents.value,
83
+ internalTableComponents: internalTableComponents.value,
76
84
  components: __props.components
77
85
  }, null, 8, [
78
86
  "row",
@@ -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 { 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
+ {"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, VueComponentShorthand } from \"../types\"\nimport { isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, VueTableComponents } from \"./types\"\n\nimport type { VueRichTextComponents } from \"../PrismicRichText\"\nimport { usePrismic } from \"../createPrismic\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/** Props for `<PrismicTable />`. */\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\n\t * 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 & VueRichTextComponents\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 { componentsConfig } = usePrismic()\n\nconst resolvedComponents = computed<VueTableComponents & VueRichTextComponents>(\n\t() => {\n\t\treturn { ...componentsConfig?.defaultComponents, ...props.components }\n\t},\n)\n\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[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 VueComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = 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=\"internalTableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...internalTableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"internalTableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"internalTableComponents.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=\"internalTableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"internalTableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"internalTableComponents.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=\"internalTableComponents\"\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,MAAM,EAAE,qBAAqB,kCAAW;EAExC,MAAM,6CACC;AACL,UAAO;IAAE,GAAG,kBAAkB;IAAmB,GAAG,MAAM;IAAW;IAEvE;EAEA,SAAS,qBAAqB,MAAgC;GAC7D,MAAM,4BAA4B,mBAAmB,QAAQ;AAE7D,OAAI,6BAAe,0BAA0B,CAC5C,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,6DAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,kDAAqE;AAC1E,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,wBAAA,MAAwB,MAAM,GAAE,sBA+B1B;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,wBAAA,MAAwB,MAAM;IAAS,CAAA,EAAA;oCAenD,CAZL,QAAA,MAAM,oFACP,wBAAA,MAAwB,MAAM,GAAE,sBAW1B;;KAVV,MAAM,QAAA,MAAM;OACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;qCAGhB,wDAK7B,cAAA,0BALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,iCAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;gJAIT,wBAAA,MAAwB,MAAM,GAAE,sBAW1B,EAVV,MAAM,QAAA,MAAM,QACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;qCAGhB,wDAK7B,cAAA,0BALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,iCAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,wFAAe,QAAA,SAAQ,8CAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA"}
@@ -1,4 +1,5 @@
1
1
  import { isVueComponent } from "../types.js";
2
+ import { usePrismic } from "../createPrismic.js";
2
3
  import { defaultTableComponents } from "./PrismicTableDefaultComponents.js";
3
4
  import PrismicTableRow_default from "./PrismicTableRow.js";
4
5
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, defineComponent, mergeProps, normalizeProps, openBlock, renderList, resolveDynamicComponent, unref, withCtx } from "vue";
@@ -24,15 +25,22 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
24
25
  },
25
26
  setup(__props) {
26
27
  const props = __props;
28
+ const { componentsConfig } = usePrismic();
29
+ const resolvedComponents = computed(() => {
30
+ return {
31
+ ...componentsConfig?.defaultComponents,
32
+ ...props.components
33
+ };
34
+ });
27
35
  function getInternalComponent(type) {
28
- const maybeComponentOrShorthand = props.components?.[type];
36
+ const maybeComponentOrShorthand = resolvedComponents.value?.[type];
29
37
  if (isVueComponent(maybeComponentOrShorthand)) return { is: maybeComponentOrShorthand };
30
38
  return {
31
39
  is: defaultTableComponents[type],
32
40
  shorthand: maybeComponentOrShorthand
33
41
  };
34
42
  }
35
- const tableComponents = computed(() => {
43
+ const internalTableComponents = computed(() => {
36
44
  return {
37
45
  table: getInternalComponent("table"),
38
46
  thead: getInternalComponent("thead"),
@@ -43,22 +51,22 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
43
51
  };
44
52
  });
45
53
  return (_ctx, _cache) => {
46
- return unref(isFilled).table(__props.field) ? (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.table.is), mergeProps({
54
+ return unref(isFilled).table(__props.field) ? (openBlock(), createBlock(resolveDynamicComponent(internalTableComponents.value.table.is), mergeProps({
47
55
  key: 0,
48
56
  table: __props.field
49
57
  }, {
50
58
  ..._ctx.$attrs,
51
- ...tableComponents.value.table.shorthand
59
+ ...internalTableComponents.value.table.shorthand
52
60
  }), {
53
- default: withCtx(() => [__props.field.head ? (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.thead.is), mergeProps({
61
+ default: withCtx(() => [__props.field.head ? (openBlock(), createBlock(resolveDynamicComponent(internalTableComponents.value.thead.is), mergeProps({
54
62
  key: 0,
55
63
  head: __props.field.head
56
- }, tableComponents.value.thead.shorthand), {
64
+ }, internalTableComponents.value.thead.shorthand), {
57
65
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.field.head.rows, (row) => {
58
66
  return openBlock(), createBlock(PrismicTableRow_default, {
59
67
  key: row.key,
60
68
  row,
61
- internalTableComponents: tableComponents.value,
69
+ internalTableComponents: internalTableComponents.value,
62
70
  components: __props.components
63
71
  }, null, 8, [
64
72
  "row",
@@ -67,12 +75,12 @@ var PrismicTable_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
67
75
  ]);
68
76
  }), 128))]),
69
77
  _: 1
70
- }, 16, ["head"])) : createCommentVNode("v-if", true), (openBlock(), createBlock(resolveDynamicComponent(tableComponents.value.tbody.is), mergeProps({ body: __props.field.body }, tableComponents.value.tbody.shorthand), {
78
+ }, 16, ["head"])) : createCommentVNode("v-if", true), (openBlock(), createBlock(resolveDynamicComponent(internalTableComponents.value.tbody.is), mergeProps({ body: __props.field.body }, internalTableComponents.value.tbody.shorthand), {
71
79
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.field.body.rows, (row) => {
72
80
  return openBlock(), createBlock(PrismicTableRow_default, {
73
81
  key: row.key,
74
82
  row,
75
- internalTableComponents: tableComponents.value,
83
+ internalTableComponents: internalTableComponents.value,
76
84
  components: __props.components
77
85
  }, null, 8, [
78
86
  "row",
@@ -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 { 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
+ {"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, VueComponentShorthand } from \"../types\"\nimport { isVueComponent } from \"../types\"\nimport type { InternalVueTableComponents, VueTableComponents } from \"./types\"\n\nimport type { VueRichTextComponents } from \"../PrismicRichText\"\nimport { usePrismic } from \"../createPrismic\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/** Props for `<PrismicTable />`. */\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\n\t * 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 & VueRichTextComponents\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 { componentsConfig } = usePrismic()\n\nconst resolvedComponents = computed<VueTableComponents & VueRichTextComponents>(\n\t() => {\n\t\treturn { ...componentsConfig?.defaultComponents, ...props.components }\n\t},\n)\n\nfunction getInternalComponent(type: keyof VueTableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[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 VueComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = 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=\"internalTableComponents.table.is\"\n\t\t:table=\"field\"\n\t\tv-bind=\"{ ...$attrs, ...internalTableComponents.table.shorthand }\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"internalTableComponents.thead.is\"\n\t\t\t:head=\"field.head\"\n\t\t\tv-bind=\"internalTableComponents.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=\"internalTableComponents\"\n\t\t\t\t:components=\"components\"\n\t\t\t/>\n\t\t</component>\n\t\t<component\n\t\t\t:is=\"internalTableComponents.tbody.is\"\n\t\t\t:body=\"field.body\"\n\t\t\tv-bind=\"internalTableComponents.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=\"internalTableComponents\"\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,MAAM,EAAE,qBAAqB,YAAW;EAExC,MAAM,qBAAqB,eACpB;AACL,UAAO;IAAE,GAAG,kBAAkB;IAAmB,GAAG,MAAM;IAAW;IAEvE;EAEA,SAAS,qBAAqB,MAAgC;GAC7D,MAAM,4BAA4B,mBAAmB,QAAQ;AAE7D,OAAI,eAAe,0BAA0B,CAC5C,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,uBAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,0BAA0B,eAA2C;AAC1E,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,wBAAA,MAAwB,MAAM,GAAE,EAFtC,WAiCY;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,wBAAA,MAAwB,MAAM;IAAS,CAAA,EAAA;2BAenD,CAZL,QAAA,MAAM,qBADb,YAaY,wBAXN,wBAAA,MAAwB,MAAM,GAAE,EAFtC,WAaY;;KAVV,MAAM,QAAA,MAAM;OACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;wEAGf,YAYY,wBAXN,wBAAA,MAAwB,MAAM,GAAE,EADtC,WAYY,EAVV,MAAM,QAAA,MAAM,QACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,mBAD/B,mBAME,UAAA,MAAA,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;0BADX,YAME,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,yBAAtB,YAAiE,wBAA5B,QAAA,SAAQ,EAAA,eAAA,WAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA"}
@@ -4,57 +4,39 @@ let vue = require("vue");
4
4
  //#region src/PrismicTable/PrismicTableDefaultComponents.ts
5
5
  const defaultTableComponents = {
6
6
  table: (0, vue.defineComponent)({
7
- props: {
8
- ...require_getTableComponentProps.table(),
9
- as: { type: String }
10
- },
7
+ props: require_getTableComponentProps.table(),
11
8
  setup(props, { attrs, slots }) {
12
- return () => (0, vue.h)(props.as ?? "table", attrs, slots.default ? slots.default() : []);
9
+ return () => (0, vue.h)("table", attrs, slots.default ? slots.default() : []);
13
10
  }
14
11
  }),
15
12
  thead: (0, vue.defineComponent)({
16
- props: {
17
- ...require_getTableComponentProps.thead(),
18
- as: { type: String }
19
- },
13
+ props: require_getTableComponentProps.thead(),
20
14
  setup(props, { attrs, slots }) {
21
- return () => (0, vue.h)(props.as ?? "thead", attrs, slots.default ? slots.default() : []);
15
+ return () => (0, vue.h)("thead", attrs, slots.default ? slots.default() : []);
22
16
  }
23
17
  }),
24
18
  tbody: (0, vue.defineComponent)({
25
- props: {
26
- ...require_getTableComponentProps.tbody(),
27
- as: { type: String }
28
- },
19
+ props: require_getTableComponentProps.tbody(),
29
20
  setup(props, { attrs, slots }) {
30
- return () => (0, vue.h)(props.as ?? "tbody", attrs, slots.default ? slots.default() : []);
21
+ return () => (0, vue.h)("tbody", attrs, slots.default ? slots.default() : []);
31
22
  }
32
23
  }),
33
24
  tr: (0, vue.defineComponent)({
34
- props: {
35
- ...require_getTableComponentProps.tr(),
36
- as: { type: String }
37
- },
25
+ props: require_getTableComponentProps.tr(),
38
26
  setup(props, { attrs, slots }) {
39
- return () => (0, vue.h)(props.as ?? "tr", attrs, slots.default ? slots.default() : []);
27
+ return () => (0, vue.h)("tr", attrs, slots.default ? slots.default() : []);
40
28
  }
41
29
  }),
42
30
  th: (0, vue.defineComponent)({
43
- props: {
44
- ...require_getTableComponentProps.th(),
45
- as: { type: String }
46
- },
31
+ props: require_getTableComponentProps.th(),
47
32
  setup(props, { attrs, slots }) {
48
- return () => (0, vue.h)(props.as ?? "th", attrs, slots.default ? slots.default() : []);
33
+ return () => (0, vue.h)("th", attrs, slots.default ? slots.default() : []);
49
34
  }
50
35
  }),
51
36
  td: (0, vue.defineComponent)({
52
- props: {
53
- ...require_getTableComponentProps.td(),
54
- as: { type: String }
55
- },
37
+ props: require_getTableComponentProps.td(),
56
38
  setup(props, { attrs, slots }) {
57
- return () => (0, vue.h)(props.as ?? "td", attrs, slots.default ? slots.default() : []);
39
+ return () => (0, vue.h)("td", attrs, slots.default ? slots.default() : []);
58
40
  }
59
41
  })
60
42
  };
@@ -1 +1 @@
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
+ {"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, { attrs, slots }) {\n\t\t\treturn () => h(\"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"td\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"mappings":";;;;AAMA,MAAaA,yBAAuD;CACnE,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,gCAAuB;EACtB,6CAAqC;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,6BAAoB;EACnB,0CAAkC;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,2BAAe,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF"}
@@ -4,57 +4,39 @@ import { defineComponent, h } from "vue";
4
4
  //#region src/PrismicTable/PrismicTableDefaultComponents.ts
5
5
  const defaultTableComponents = {
6
6
  table: defineComponent({
7
- props: {
8
- ...table(),
9
- as: { type: String }
10
- },
7
+ props: table(),
11
8
  setup(props, { attrs, slots }) {
12
- return () => h(props.as ?? "table", attrs, slots.default ? slots.default() : []);
9
+ return () => h("table", attrs, slots.default ? slots.default() : []);
13
10
  }
14
11
  }),
15
12
  thead: defineComponent({
16
- props: {
17
- ...thead(),
18
- as: { type: String }
19
- },
13
+ props: thead(),
20
14
  setup(props, { attrs, slots }) {
21
- return () => h(props.as ?? "thead", attrs, slots.default ? slots.default() : []);
15
+ return () => h("thead", attrs, slots.default ? slots.default() : []);
22
16
  }
23
17
  }),
24
18
  tbody: defineComponent({
25
- props: {
26
- ...tbody(),
27
- as: { type: String }
28
- },
19
+ props: tbody(),
29
20
  setup(props, { attrs, slots }) {
30
- return () => h(props.as ?? "tbody", attrs, slots.default ? slots.default() : []);
21
+ return () => h("tbody", attrs, slots.default ? slots.default() : []);
31
22
  }
32
23
  }),
33
24
  tr: defineComponent({
34
- props: {
35
- ...tr(),
36
- as: { type: String }
37
- },
25
+ props: tr(),
38
26
  setup(props, { attrs, slots }) {
39
- return () => h(props.as ?? "tr", attrs, slots.default ? slots.default() : []);
27
+ return () => h("tr", attrs, slots.default ? slots.default() : []);
40
28
  }
41
29
  }),
42
30
  th: defineComponent({
43
- props: {
44
- ...th(),
45
- as: { type: String }
46
- },
31
+ props: th(),
47
32
  setup(props, { attrs, slots }) {
48
- return () => h(props.as ?? "th", attrs, slots.default ? slots.default() : []);
33
+ return () => h("th", attrs, slots.default ? slots.default() : []);
49
34
  }
50
35
  }),
51
36
  td: defineComponent({
52
- props: {
53
- ...td(),
54
- as: { type: String }
55
- },
37
+ props: td(),
56
38
  setup(props, { attrs, slots }) {
57
- return () => h(props.as ?? "td", attrs, slots.default ? slots.default() : []);
39
+ return () => h("td", attrs, slots.default ? slots.default() : []);
58
40
  }
59
41
  })
60
42
  };
@@ -1 +1 @@
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
+ {"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, { attrs, slots }) {\n\t\t\treturn () => h(\"table\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"thead\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tbody\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"tr\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"th\", attrs, slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => h(\"td\", attrs, 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,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,OAAO,gBAAgB;EACtB,OAAOC,OAA8B;EACrC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,SAAS,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAErE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,MAAM,OAAO,MAAM,UAAU,MAAM,SAAS,GAAG,EAAE,CAAC;;EAElE,CAAC;CACF,IAAI,gBAAgB;EACnB,OAAOC,IAA2B;EAClC,MAAM,OAAO,EAAE,OAAO,SAAS;AAC9B,gBAAa,EAAE,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 { 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
+ {"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 { VueRichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextComponents\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 { 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
+ {"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 { VueRichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextComponents\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.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
+ {"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 { VueRichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextComponents\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 +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 { 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
+ {"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 { VueRichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalVueTableComponents\n\tcomponents?: VueRichTextComponents\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 +1,2 @@
1
+ import { VueTableComponents } from "./types.js";
1
2
  import { getTableComponentProps_d_exports } from "./getTableComponentProps.js";
@@ -1,5 +1,4 @@
1
- import { VueComponent } from "../types.js";
2
- import { VueShorthand } from "../PrismicRichText/types.js";
1
+ import { VueComponent, VueComponentShorthand } from "../types.js";
3
2
  import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
4
3
 
5
4
  //#region src/PrismicTable/types.d.ts
@@ -13,22 +12,22 @@ import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, Tabl
13
12
  type VueTableComponents = {
14
13
  table?: VueComponent<{
15
14
  table: TableField<"filled">;
16
- }> | VueShorthand;
15
+ }> | Omit<VueComponentShorthand, "as">;
17
16
  thead?: VueComponent<{
18
17
  head: TableFieldHead;
19
- }> | VueShorthand;
18
+ }> | Omit<VueComponentShorthand, "as">;
20
19
  tbody?: VueComponent<{
21
20
  body: TableFieldBody;
22
- }> | VueShorthand;
21
+ }> | Omit<VueComponentShorthand, "as">;
23
22
  tr?: VueComponent<{
24
23
  row: TableFieldBodyRow | TableFieldHeadRow;
25
- }> | VueShorthand;
24
+ }> | Omit<VueComponentShorthand, "as">;
26
25
  th?: VueComponent<{
27
26
  cell: TableFieldHeaderCell;
28
- }> | VueShorthand;
27
+ }> | Omit<VueComponentShorthand, "as">;
29
28
  td?: VueComponent<{
30
29
  cell: TableFieldDataCell;
31
- }> | VueShorthand;
30
+ }> | Omit<VueComponentShorthand, "as">;
32
31
  };
33
32
  //#endregion
34
33
  export { VueTableComponents };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.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"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/PrismicTable/types.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkBA;;;;AAGI,KAHQ,kBAAA,GAGR;EAEqB,KAAA,CAAA,EAHrB,YAGqB,CAAA;IAArB,KAAA,EAHsB,UAGtB,CAAA,QAAA,CAAA;EACK,CAAA,CAAA,GAHL,IAGK,CAHA,qBAGA,EAAA,IAAA,CAAA;EAAL,KAAA,CAAA,EADA,YACA,CAAA;IAEqB,IAAA,EAHA,cAGA;EAArB,CAAA,CAAA,GAFA,IAEA,CAFK,qBAEL,EAAA,IAAA,CAAA;EACK,KAAA,CAAA,EADL,YACK,CAAA;IAAL,IAAA,EADqB,cACrB;EAEoB,CAAA,CAAA,GAFpB,IAEoB,CAFf,qBAEe,EAAA,IAAA,CAAA;EAAoB,EAAA,CAAA,EAAxC,YAAwC,CAAA;IAAxC,GAAA,EAAoB,iBAApB,GAAwC,iBAAxC;EACK,CAAA,CAAA,GAAL,IAAK,CAAA,qBAAA,EAAA,IAAA,CAAA;EAAL,EAAA,CAAA,EAEA,YAFA,CAAA;IAEqB,IAAA,EAAA,oBAAA;EAArB,CAAA,CAAA,GACA,IADA,CACK,qBADL,EAAA,IAAA,CAAA;EACK,EAAA,CAAA,EAEL,YAFK,CAAA;IAAL,IAAA,EAEqB,kBAFrB;EAEqB,CAAA,CAAA,GACrB,IADqB,CAChB,qBADgB,EAAA,IAAA,CAAA;CAArB"}
@@ -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 } 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/** The Prismic rich text field to render. */\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
+ {"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/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\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 } 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/** The Prismic rich text field to render. */\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
+ {"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/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\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,10 +1,8 @@
1
- import * as vue14 from "vue";
1
+ import * as vue21 from "vue";
2
2
  import { RichTextField } from "@prismicio/client";
3
3
 
4
4
  //#region src/PrismicText.vue.d.ts
5
- /**
6
- * Props for `<PrismicText />`.
7
- */
5
+ /** Props for `<PrismicText />`. */
8
6
  type PrismicTextProps = {
9
7
  /** The Prismic rich text field to render. */
10
8
  field: RichTextField | null | undefined;
@@ -20,7 +18,7 @@ type PrismicTextProps = {
20
18
  */
21
19
  separator?: string;
22
20
  };
23
- declare const __VLS_export: vue14.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue14.ComponentOptionsMixin, vue14.ComponentOptionsMixin, {}, string, vue14.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue14.ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: vue21.DefineComponent<PrismicTextProps, {}, {}, {}, {}, vue21.ComponentOptionsMixin, vue21.ComponentOptionsMixin, {}, string, vue21.PublicProps, Readonly<PrismicTextProps> & Readonly<{}>, {}, {}, {}, {}, string, vue21.ComponentProvideOptions, false, {}, any>;
24
22
  declare const _default: typeof __VLS_export;
25
23
  //#endregion
26
24
  export { PrismicTextProps, _default };
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;;;AA4DY,KAAA,gBAAA,GAAgB;EAqDtB;EAAY,KAAA,EAnDV,aAmDU,GAAA,IAAA,GAAA,SAAA;EAAA;;;;EAAA,QAAA,CAAA,EAAA,MAAA;EAAA;;;;AAAA;;;cAAZ,cAAY,KAAA,CAAA,gBAAA,kCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
1
+ {"version":3,"file":"PrismicText.vue.d.ts","names":[],"sources":["../../src/PrismicText.vue"],"sourcesContent":[],"mappings":";;;;;KAwDY,gBAAA;;EAAA,KAAA,EAEJ,aAFoB,GAAA,IAAA,GAAA,SAEpB;EAmDF;;;;EAAY,QAAA,CAAA,EAAA,MAAA;EAAA;;;;;EAAA,SAAA,CAAA,EAAA,MAAA;AAAA,CAAA;cAAZ,cAAY,KAAA,CAAA,gBAAA,kCAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,cAAA,KAAA,CAAA,WAAA,EAAA,SAAA,oBAAA,sCAAA,KAAA,CAAA,uBAAA;cAAA,iBAGU"}
@@ -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 } 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/** The Prismic rich text field to render. */\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":";;;;;;;;;;;;;;;;;;;;;;;;EA6BA,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
+ {"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/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\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":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,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 +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 } 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/** The Prismic rich text field to render. */\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":";;;;;;;;;;;;;;;;;;;;;;;;EA6BA,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
+ {"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/** Props for `<PrismicText />`. */\nexport type PrismicTextProps = {\n\t/** The Prismic rich text field to render. */\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":";;;;;;;;;;;;;;;;;;;;;;;;EA2BA,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,5 +1,5 @@
1
1
  import { SliceComponentType, SliceLike, SliceZoneComponents, SliceZoneLike } from "./types.js";
2
- import * as vue19 from "vue";
2
+ import * as vue26 from "vue";
3
3
 
4
4
  //#region src/SliceZone/SliceZone.vue.d.ts
5
5
 
@@ -22,7 +22,7 @@ type SliceZoneProps<TContext = unknown> = {
22
22
  context?: TContext;
23
23
  };
24
24
  type __VLS_Props = SliceZoneProps;
25
- declare const __VLS_export: vue19.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue19.ComponentOptionsMixin, vue19.ComponentOptionsMixin, {}, string, vue19.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue19.ComponentProvideOptions, false, {}, any>;
25
+ declare const __VLS_export: vue26.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue26.ComponentOptionsMixin, vue26.ComponentOptionsMixin, {}, string, vue26.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue26.ComponentProvideOptions, false, {}, any>;
26
26
  declare const _default: typeof __VLS_export;
27
27
  //#endregion
28
28
  export { SliceZoneProps, _default };
@@ -62,17 +62,11 @@ type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[];
62
62
  * available to all Slice components
63
63
  */
64
64
  type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
65
- /**
66
- * Slice data for this component.
67
- */
65
+ /** Slice data for this component. */
68
66
  slice: TSlice;
69
- /**
70
- * The index of the Slice in the Slice Zone.
71
- */
67
+ /** The index of the Slice in the Slice Zone. */
72
68
  index: number;
73
- /**
74
- * All Slices from the Slice Zone to which the Slice belongs.
75
- */
69
+ /** All Slices from the Slice Zone to which the Slice belongs. */
76
70
  slices: SliceZoneLike<TSlice extends SliceLikeGraphQL ? SliceLikeGraphQL : SliceLikeRestV2>;
77
71
  /**
78
72
  * Arbitrary data passed to `<SliceZone />` and made available to all Slice