@prismicio/vue 5.0.2 → 5.1.0

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 (50) hide show
  1. package/dist/PrismicTable/PrismicTable.vue.cjs +62 -0
  2. package/dist/PrismicTable/PrismicTable.vue.cjs.map +1 -0
  3. package/dist/PrismicTable/PrismicTable.vue.d.ts +32 -0
  4. package/dist/PrismicTable/PrismicTable.vue.js +63 -0
  5. package/dist/PrismicTable/PrismicTable.vue.js.map +1 -0
  6. package/dist/PrismicTable/PrismicTable.vue2.cjs +4 -0
  7. package/dist/PrismicTable/PrismicTable.vue2.cjs.map +1 -0
  8. package/dist/PrismicTable/PrismicTable.vue2.js +5 -0
  9. package/dist/PrismicTable/PrismicTable.vue2.js.map +1 -0
  10. package/dist/PrismicTable/PrismicTableDefaultComponents.cjs +44 -0
  11. package/dist/PrismicTable/PrismicTableDefaultComponents.cjs.map +1 -0
  12. package/dist/PrismicTable/PrismicTableDefaultComponents.d.ts +2 -0
  13. package/dist/PrismicTable/PrismicTableDefaultComponents.js +44 -0
  14. package/dist/PrismicTable/PrismicTableDefaultComponents.js.map +1 -0
  15. package/dist/PrismicTable/PrismicTableRow.vue.cjs +52 -0
  16. package/dist/PrismicTable/PrismicTableRow.vue.cjs.map +1 -0
  17. package/dist/PrismicTable/PrismicTableRow.vue.d.ts +26 -0
  18. package/dist/PrismicTable/PrismicTableRow.vue.js +53 -0
  19. package/dist/PrismicTable/PrismicTableRow.vue.js.map +1 -0
  20. package/dist/PrismicTable/PrismicTableRow.vue2.cjs +4 -0
  21. package/dist/PrismicTable/PrismicTableRow.vue2.cjs.map +1 -0
  22. package/dist/PrismicTable/PrismicTableRow.vue2.js +5 -0
  23. package/dist/PrismicTable/PrismicTableRow.vue2.js.map +1 -0
  24. package/dist/PrismicTable/getTableComponentProps.cjs +30 -0
  25. package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -0
  26. package/dist/PrismicTable/getTableComponentProps.d.ts +128 -0
  27. package/dist/PrismicTable/getTableComponentProps.js +30 -0
  28. package/dist/PrismicTable/getTableComponentProps.js.map +1 -0
  29. package/dist/PrismicTable/index.d.ts +1 -0
  30. package/dist/PrismicTable/types.d.ts +30 -0
  31. package/dist/createPrismic.cjs +2 -0
  32. package/dist/createPrismic.cjs.map +1 -1
  33. package/dist/createPrismic.js +5 -3
  34. package/dist/createPrismic.js.map +1 -1
  35. package/dist/index.cjs +4 -0
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.ts +4 -1
  38. package/dist/index.js +14 -10
  39. package/dist/index.js.map +1 -1
  40. package/dist/package.json.cjs +1 -1
  41. package/dist/package.json.js +1 -1
  42. package/package.json +3 -3
  43. package/src/PrismicTable/PrismicTable.vue +80 -0
  44. package/src/PrismicTable/PrismicTableDefaultComponents.ts +44 -0
  45. package/src/PrismicTable/PrismicTableRow.vue +51 -0
  46. package/src/PrismicTable/getTableComponentProps.ts +142 -0
  47. package/src/PrismicTable/index.ts +1 -0
  48. package/src/PrismicTable/types.ts +34 -0
  49. package/src/createPrismic.ts +2 -0
  50. package/src/index.ts +5 -0
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const client = require("@prismicio/client");
4
+ const PrismicTableDefaultComponents = require("./PrismicTableDefaultComponents.cjs");
5
+ const PrismicTableRow_vue_vue_type_script_setup_true_lang = require("./PrismicTableRow.vue.cjs");
6
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
7
+ ...{ name: "PrismicTable" },
8
+ __name: "PrismicTable",
9
+ props: {
10
+ field: {},
11
+ fallback: {},
12
+ components: {}
13
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const mergedComponents = vue.computed(() => ({
17
+ ...PrismicTableDefaultComponents.defaultTableComponents,
18
+ ...props.components
19
+ }));
20
+ return (_ctx, _cache) => {
21
+ return vue.unref(client.isFilled).table(_ctx.field) ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(mergedComponents.value.table), vue.mergeProps({
22
+ key: 0,
23
+ table: _ctx.field
24
+ }, _ctx.$attrs), {
25
+ default: vue.withCtx(() => [
26
+ _ctx.field.head ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(mergedComponents.value.thead), {
27
+ key: 0,
28
+ head: _ctx.field.head
29
+ }, {
30
+ default: vue.withCtx(() => [
31
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.head.rows, (row) => {
32
+ return vue.openBlock(), vue.createBlock(PrismicTableRow_vue_vue_type_script_setup_true_lang, {
33
+ key: JSON.stringify(row),
34
+ row,
35
+ components: mergedComponents.value
36
+ }, null, 8, ["row", "components"]);
37
+ }), 128))
38
+ ]),
39
+ _: 1
40
+ }, 8, ["head"])) : vue.createCommentVNode("", true),
41
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(mergedComponents.value.tbody), {
42
+ body: _ctx.field.body
43
+ }, {
44
+ default: vue.withCtx(() => [
45
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.field.body.rows, (row) => {
46
+ return vue.openBlock(), vue.createBlock(PrismicTableRow_vue_vue_type_script_setup_true_lang, {
47
+ key: JSON.stringify(row),
48
+ row,
49
+ components: mergedComponents.value
50
+ }, null, 8, ["row", "components"]);
51
+ }), 128))
52
+ ]),
53
+ _: 1
54
+ }, 8, ["body"]))
55
+ ]),
56
+ _: 1
57
+ }, 16, ["table"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.fallback), { key: 1 }));
58
+ };
59
+ }
60
+ });
61
+ module.exports = _sfc_main;
62
+ //# sourceMappingURL=PrismicTable.vue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTable.vue.cjs","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"JSON.stringify(row)\"\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=\"JSON.stringify(row)\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else :is=\"fallback\" />\n</template>\n"],"names":["computed","defaultTableComponents"],"mappings":";;;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AAGR,UAAA,mBAAmBA,IAAAA,SAAS,OAAO;AAAA,MACxC,GAAGC,8BAAA;AAAA,MACH,GAAG,MAAM;AAAA,IAAA,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,32 @@
1
+ import { TableField } from '@prismicio/client';
2
+ import { ComponentOrTagName } from '../types';
3
+ import { VueTableComponents } from './types';
4
+ import { VueRichTextSerializer } from '../PrismicRichText';
5
+ /**
6
+ * Props for `<PrismicTable />`.
7
+ */
8
+ export type PrismicTableProps = {
9
+ /**
10
+ * The Prismic table field to render.
11
+ */
12
+ field: TableField | undefined;
13
+ /**
14
+ * The value to be rendered when the field is empty. If a fallback is not
15
+ * given, `null` (nothing) will be rendered.
16
+ */
17
+ fallback?: ComponentOrTagName;
18
+ /**
19
+ * An object that maps a table block type to a Vue component.
20
+ *
21
+ * @example
22
+ *
23
+ * ```javascript
24
+ * {
25
+ * table: Table,
26
+ * }
27
+ * ```
28
+ */
29
+ components?: VueTableComponents & VueRichTextSerializer;
30
+ };
31
+ declare const _default: import('vue').DefineComponent<PrismicTableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PrismicTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
32
+ export default _default;
@@ -0,0 +1,63 @@
1
+ import { defineComponent, computed, unref, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementBlock, Fragment, renderList, createCommentVNode } from "vue";
2
+ import { isFilled } from "@prismicio/client";
3
+ import { defaultTableComponents } from "./PrismicTableDefaultComponents.js";
4
+ import _sfc_main$1 from "./PrismicTableRow.vue.js";
5
+ const _sfc_main = /* @__PURE__ */ defineComponent({
6
+ ...{ name: "PrismicTable" },
7
+ __name: "PrismicTable",
8
+ props: {
9
+ field: {},
10
+ fallback: {},
11
+ components: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const mergedComponents = computed(() => ({
16
+ ...defaultTableComponents,
17
+ ...props.components
18
+ }));
19
+ return (_ctx, _cache) => {
20
+ return unref(isFilled).table(_ctx.field) ? (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.table), mergeProps({
21
+ key: 0,
22
+ table: _ctx.field
23
+ }, _ctx.$attrs), {
24
+ default: withCtx(() => [
25
+ _ctx.field.head ? (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.thead), {
26
+ key: 0,
27
+ head: _ctx.field.head
28
+ }, {
29
+ default: withCtx(() => [
30
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.head.rows, (row) => {
31
+ return openBlock(), createBlock(_sfc_main$1, {
32
+ key: JSON.stringify(row),
33
+ row,
34
+ components: mergedComponents.value
35
+ }, null, 8, ["row", "components"]);
36
+ }), 128))
37
+ ]),
38
+ _: 1
39
+ }, 8, ["head"])) : createCommentVNode("", true),
40
+ (openBlock(), createBlock(resolveDynamicComponent(mergedComponents.value.tbody), {
41
+ body: _ctx.field.body
42
+ }, {
43
+ default: withCtx(() => [
44
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.field.body.rows, (row) => {
45
+ return openBlock(), createBlock(_sfc_main$1, {
46
+ key: JSON.stringify(row),
47
+ row,
48
+ components: mergedComponents.value
49
+ }, null, 8, ["row", "components"]);
50
+ }), 128))
51
+ ]),
52
+ _: 1
53
+ }, 8, ["body"]))
54
+ ]),
55
+ _: 1
56
+ }, 16, ["table"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.fallback), { key: 1 }));
57
+ };
58
+ }
59
+ });
60
+ export {
61
+ _sfc_main as default
62
+ };
63
+ //# sourceMappingURL=PrismicTable.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTable.vue.js","sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type { VueTableComponents } from \"./types\"\n\nimport type { VueRichTextSerializer } from \"../PrismicRichText\"\n\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\n\n/**\n * Props for `<PrismicTable />`.\n */\nexport type PrismicTableProps = {\n\t/**\n\t * The Prismic table field to render.\n\t */\n\tfield: TableField | undefined\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not\n\t * given, `null` (nothing) will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n\n\t/**\n\t * An object that maps a table block type to a Vue component.\n\t *\n\t * @example\n\t *\n\t * ```javascript\n\t * {\n\t * table: Table,\n\t * }\n\t * ```\n\t */\n\tcomponents?: VueTableComponents & VueRichTextSerializer\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst mergedComponents = computed(() => ({\n\t...defaultTableComponents,\n\t...props.components,\n}))\n</script>\n\n<template>\n\t<component\n\t\tv-if=\"isFilled.table(field)\"\n\t\t:is=\"mergedComponents.table\"\n\t\t:table=\"field\"\n\t\tv-bind=\"$attrs\"\n\t>\n\t\t<component\n\t\t\tv-if=\"field.head\"\n\t\t\t:is=\"mergedComponents.thead\"\n\t\t\t:head=\"field.head\"\n\t\t>\n\t\t\t<PrismicTableRow\n\t\t\t\tv-for=\"row in field.head.rows\"\n\t\t\t\t:key=\"JSON.stringify(row)\"\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=\"JSON.stringify(row)\"\n\t\t\t\t:row=\"row\"\n\t\t\t\t:components=\"mergedComponents\"\n\t\t\t/>\n\t\t</component>\n\t</component>\n\t<component v-else :is=\"fallback\" />\n</template>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyCA,UAAM,QAAQ;AAGR,UAAA,mBAAmB,SAAS,OAAO;AAAA,MACxC,GAAG;AAAA,MACH,GAAG,MAAM;AAAA,IAAA,EACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ const PrismicTable_vue_vue_type_script_setup_true_lang = require("./PrismicTable.vue.cjs");
3
+ module.exports = PrismicTable_vue_vue_type_script_setup_true_lang;
4
+ //# sourceMappingURL=PrismicTable.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTable.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PrismicTable.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=PrismicTable.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTable.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const vue = require("vue");
4
+ const getTableComponentProps = require("./getTableComponentProps.cjs");
5
+ const defaultTableComponents = {
6
+ table: vue.defineComponent({
7
+ props: getTableComponentProps.table(),
8
+ setup(props, { slots }) {
9
+ return () => vue.h("table", slots.default ? slots.default() : []);
10
+ }
11
+ }),
12
+ thead: vue.defineComponent({
13
+ props: getTableComponentProps.thead(),
14
+ setup(props, { slots }) {
15
+ return () => vue.h("thead", slots.default ? slots.default() : []);
16
+ }
17
+ }),
18
+ tbody: vue.defineComponent({
19
+ props: getTableComponentProps.tbody(),
20
+ setup(props, { slots }) {
21
+ return () => vue.h("tbody", slots.default ? slots.default() : []);
22
+ }
23
+ }),
24
+ tr: vue.defineComponent({
25
+ props: getTableComponentProps.tr(),
26
+ setup(props, { slots }) {
27
+ return () => vue.h("tr", slots.default ? slots.default() : []);
28
+ }
29
+ }),
30
+ th: vue.defineComponent({
31
+ props: getTableComponentProps.th(),
32
+ setup(props, { slots }) {
33
+ return () => vue.h("th", slots.default ? slots.default() : []);
34
+ }
35
+ }),
36
+ td: vue.defineComponent({
37
+ props: getTableComponentProps.td(),
38
+ setup(props, { slots }) {
39
+ return () => vue.h("td", slots.default ? slots.default() : []);
40
+ }
41
+ })
42
+ };
43
+ exports.defaultTableComponents = defaultTableComponents;
44
+ //# sourceMappingURL=PrismicTableDefaultComponents.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableDefaultComponents.cjs","sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<VueTableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"table\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"thead\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tbody\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tr\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"th\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"td\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"names":["defineComponent","getTableComponentProps.table","h","getTableComponentProps.thead","getTableComponentProps.tbody","getTableComponentProps.tr","getTableComponentProps.th","getTableComponentProps.td"],"mappings":";;;;AAMO,MAAM,yBAAuD;AAAA,EACnE,OAAOA,IAAAA,gBAAgB;AAAA,IACtB,OAAOC,uBAAAA,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAMC,IAAAA,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,OAAOF,IAAAA,gBAAgB;AAAA,IACtB,OAAOG,uBAAAA,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAMD,IAAAA,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,OAAOF,IAAAA,gBAAgB;AAAA,IACtB,OAAOI,uBAAAA,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAMF,IAAAA,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,IAAIF,IAAAA,gBAAgB;AAAA,IACnB,OAAOK,uBAAAA,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAMH,IAAAA,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC1D,CACA;AAAA,EACD,IAAIF,IAAAA,gBAAgB;AAAA,IACnB,OAAOM,uBAAAA,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAMJ,IAAAA,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC1D,CACA;AAAA,EACD,IAAIF,IAAAA,gBAAgB;AAAA,IACnB,OAAOO,uBAAAA,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAML,IAAAA,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAE1D,CAAA;;;"}
@@ -0,0 +1,2 @@
1
+ import type { VueTableComponents } from "./types";
2
+ export declare const defaultTableComponents: Required<VueTableComponents>;
@@ -0,0 +1,44 @@
1
+ import { defineComponent, h } from "vue";
2
+ import { table, thead, tbody, tr, th, td } from "./getTableComponentProps.js";
3
+ const defaultTableComponents = {
4
+ table: defineComponent({
5
+ props: table(),
6
+ setup(props, { slots }) {
7
+ return () => h("table", slots.default ? slots.default() : []);
8
+ }
9
+ }),
10
+ thead: defineComponent({
11
+ props: thead(),
12
+ setup(props, { slots }) {
13
+ return () => h("thead", slots.default ? slots.default() : []);
14
+ }
15
+ }),
16
+ tbody: defineComponent({
17
+ props: tbody(),
18
+ setup(props, { slots }) {
19
+ return () => h("tbody", slots.default ? slots.default() : []);
20
+ }
21
+ }),
22
+ tr: defineComponent({
23
+ props: tr(),
24
+ setup(props, { slots }) {
25
+ return () => h("tr", slots.default ? slots.default() : []);
26
+ }
27
+ }),
28
+ th: defineComponent({
29
+ props: th(),
30
+ setup(props, { slots }) {
31
+ return () => h("th", slots.default ? slots.default() : []);
32
+ }
33
+ }),
34
+ td: defineComponent({
35
+ props: td(),
36
+ setup(props, { slots }) {
37
+ return () => h("td", slots.default ? slots.default() : []);
38
+ }
39
+ })
40
+ };
41
+ export {
42
+ defaultTableComponents
43
+ };
44
+ //# sourceMappingURL=PrismicTableDefaultComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableDefaultComponents.js","sources":["../../../src/PrismicTable/PrismicTableDefaultComponents.ts"],"sourcesContent":["import { defineComponent, h } from \"vue\"\n\nimport type { VueTableComponents } from \"./types\"\n\nimport * as getTableComponentProps from \"./getTableComponentProps\"\n\nexport const defaultTableComponents: Required<VueTableComponents> = {\n\ttable: defineComponent({\n\t\tprops: getTableComponentProps.table(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"table\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tthead: defineComponent({\n\t\tprops: getTableComponentProps.thead(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"thead\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttbody: defineComponent({\n\t\tprops: getTableComponentProps.tbody(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tbody\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttr: defineComponent({\n\t\tprops: getTableComponentProps.tr(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"tr\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\tth: defineComponent({\n\t\tprops: getTableComponentProps.th(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"th\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n\ttd: defineComponent({\n\t\tprops: getTableComponentProps.td(),\n\t\tsetup(props, { slots }) {\n\t\t\treturn () => h(\"td\", slots.default ? slots.default() : [])\n\t\t},\n\t}),\n}\n"],"names":["getTableComponentProps.table","getTableComponentProps.thead","getTableComponentProps.tbody","getTableComponentProps.tr","getTableComponentProps.th","getTableComponentProps.td"],"mappings":";;AAMO,MAAM,yBAAuD;AAAA,EACnE,OAAO,gBAAgB;AAAA,IACtB,OAAOA,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,OAAO,gBAAgB;AAAA,IACtB,OAAOC,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,OAAO,gBAAgB;AAAA,IACtB,OAAOC,MAA8B;AAAA,IACrC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,SAAS,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC7D,CACA;AAAA,EACD,IAAI,gBAAgB;AAAA,IACnB,OAAOC,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC1D,CACA;AAAA,EACD,IAAI,gBAAgB;AAAA,IACnB,OAAOC,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAC1D,CACA;AAAA,EACD,IAAI,gBAAgB;AAAA,IACnB,OAAOC,GAA2B;AAAA,IAClC,MAAM,OAAO,EAAE,SAAO;AACd,aAAA,MAAM,EAAE,MAAM,MAAM,UAAU,MAAM,QAAY,IAAA,EAAE;AAAA,IAAA;AAAA,EAE1D,CAAA;;"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ const vue = require("vue");
3
+ const PrismicRichText_vue_vue_type_script_setup_true_lang = require("../PrismicRichText/PrismicRichText.vue.cjs");
4
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
5
+ ...{ name: "PrismicTableRow" },
6
+ __name: "PrismicTableRow",
7
+ props: {
8
+ row: {},
9
+ components: {}
10
+ },
11
+ setup(__props) {
12
+ const props = __props;
13
+ return (_ctx, _cache) => {
14
+ return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.components.tr), { row: _ctx.row }, {
15
+ default: vue.withCtx(() => [
16
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.row.cells, (cell) => {
17
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
18
+ key: JSON.stringify(cell)
19
+ }, [
20
+ cell.type === "header" ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.components.th), {
21
+ key: 0,
22
+ cell
23
+ }, {
24
+ default: vue.withCtx(() => [
25
+ vue.createVNode(PrismicRichText_vue_vue_type_script_setup_true_lang, {
26
+ field: cell.content,
27
+ components: _ctx.components
28
+ }, null, 8, ["field", "components"])
29
+ ]),
30
+ _: 2
31
+ }, 1032, ["cell"])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(props.components.td), {
32
+ key: 1,
33
+ cell
34
+ }, {
35
+ default: vue.withCtx(() => [
36
+ vue.createVNode(PrismicRichText_vue_vue_type_script_setup_true_lang, {
37
+ field: cell.content,
38
+ components: props.components
39
+ }, null, 8, ["field", "components"])
40
+ ]),
41
+ _: 2
42
+ }, 1032, ["cell"]))
43
+ ], 64);
44
+ }), 128))
45
+ ]),
46
+ _: 1
47
+ }, 8, ["row"]);
48
+ };
49
+ }
50
+ });
51
+ module.exports = _sfc_main;
52
+ //# sourceMappingURL=PrismicTableRow.vue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableRow.vue.cjs","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=\"JSON.stringify(cell)\">\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"],"names":[],"mappings":";;;;;;;;;;;AA+BA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,26 @@
1
+ import { TableFieldBodyRow, TableFieldHeadRow } from '@prismicio/client';
2
+ import { VueTableComponents } from './types';
3
+ import { VueRichTextSerializer } from '../PrismicRichText';
4
+ /**
5
+ * Props for `<PrismicRowTable />`.
6
+ */
7
+ export type PrismicTableRowProps = {
8
+ /**
9
+ * The Prismic table row to render.
10
+ */
11
+ row: TableFieldHeadRow | TableFieldBodyRow;
12
+ /**
13
+ * An object that maps a table block type to a Vue component.
14
+ *
15
+ * @example
16
+ *
17
+ * ```javascript
18
+ * {
19
+ * tr: TableRow,
20
+ * }
21
+ * ```
22
+ */
23
+ components: VueTableComponents & VueRichTextSerializer;
24
+ };
25
+ declare const _default: import('vue').DefineComponent<PrismicTableRowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PrismicTableRowProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
26
+ export default _default;
@@ -0,0 +1,53 @@
1
+ import { defineComponent, openBlock, createBlock, resolveDynamicComponent, withCtx, createElementBlock, Fragment, renderList, createVNode } from "vue";
2
+ import _sfc_main$1 from "../PrismicRichText/PrismicRichText.vue.js";
3
+ const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{ name: "PrismicTableRow" },
5
+ __name: "PrismicTableRow",
6
+ props: {
7
+ row: {},
8
+ components: {}
9
+ },
10
+ setup(__props) {
11
+ const props = __props;
12
+ return (_ctx, _cache) => {
13
+ return openBlock(), createBlock(resolveDynamicComponent(props.components.tr), { row: _ctx.row }, {
14
+ default: withCtx(() => [
15
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row.cells, (cell) => {
16
+ return openBlock(), createElementBlock(Fragment, {
17
+ key: JSON.stringify(cell)
18
+ }, [
19
+ cell.type === "header" ? (openBlock(), createBlock(resolveDynamicComponent(props.components.th), {
20
+ key: 0,
21
+ cell
22
+ }, {
23
+ default: withCtx(() => [
24
+ createVNode(_sfc_main$1, {
25
+ field: cell.content,
26
+ components: _ctx.components
27
+ }, null, 8, ["field", "components"])
28
+ ]),
29
+ _: 2
30
+ }, 1032, ["cell"])) : (openBlock(), createBlock(resolveDynamicComponent(props.components.td), {
31
+ key: 1,
32
+ cell
33
+ }, {
34
+ default: withCtx(() => [
35
+ createVNode(_sfc_main$1, {
36
+ field: cell.content,
37
+ components: props.components
38
+ }, null, 8, ["field", "components"])
39
+ ]),
40
+ _: 2
41
+ }, 1032, ["cell"]))
42
+ ], 64);
43
+ }), 128))
44
+ ]),
45
+ _: 1
46
+ }, 8, ["row"]);
47
+ };
48
+ }
49
+ });
50
+ export {
51
+ _sfc_main as default
52
+ };
53
+ //# sourceMappingURL=PrismicTableRow.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableRow.vue.js","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=\"JSON.stringify(cell)\">\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"],"names":[],"mappings":";;;;;;;;;;AA+BA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ const PrismicTableRow_vue_vue_type_script_setup_true_lang = require("./PrismicTableRow.vue.cjs");
3
+ module.exports = PrismicTableRow_vue_vue_type_script_setup_true_lang;
4
+ //# sourceMappingURL=PrismicTableRow.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableRow.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./PrismicTableRow.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=PrismicTableRow.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrismicTableRow.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const table = () => ({
4
+ table: { type: Object, required: true }
5
+ });
6
+ const thead = () => ({
7
+ head: { type: Object, required: true }
8
+ });
9
+ const tbody = () => ({
10
+ body: { type: Object, required: true }
11
+ });
12
+ const tr = () => ({
13
+ row: {
14
+ type: Object,
15
+ required: true
16
+ }
17
+ });
18
+ const th = () => ({
19
+ cell: { type: Object, required: true }
20
+ });
21
+ const td = () => ({
22
+ cell: { type: Object, required: true }
23
+ });
24
+ exports.table = table;
25
+ exports.tbody = tbody;
26
+ exports.td = td;
27
+ exports.th = th;
28
+ exports.thead = thead;
29
+ exports.tr = tr;
30
+ //# sourceMappingURL=getTableComponentProps.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTableComponentProps.cjs","sources":["../../../src/PrismicTable/getTableComponentProps.ts"],"sourcesContent":["import type {\n\tTableField,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldDataCell,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldHeaderCell,\n} from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\n/**\n * Gets native Vue props for a component rendering `table` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.table())\n * ```\n */\nexport const table = (): {\n\ttable: { type: PropType<TableField<\"filled\">>; required: true }\n} => ({\n\ttable: { type: Object as PropType<TableField<\"filled\">>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `thead` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"head\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.thead())\n * ```\n */\nexport const thead = (): {\n\thead: { type: PropType<TableFieldHead>; required: true }\n} => ({\n\thead: { type: Object as PropType<TableFieldHead>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tbody` elements from a\n * Prismic table field with `<PrismicTable />`.\n *\n * Props are: `[\"body\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.body())\n * ```\n */\nexport const tbody = (): {\n\tbody: { type: PropType<TableFieldBody>; required: true }\n} => ({\n\tbody: { type: Object as PropType<TableFieldBody>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `tr` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"row\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.tr())\n * ```\n */\nexport const tr = (): {\n\trow: {\n\t\ttype: PropType<TableFieldHeadRow | TableFieldBodyRow>\n\t\trequired: true\n\t}\n} => ({\n\trow: {\n\t\ttype: Object as PropType<TableFieldHeadRow | TableFieldBodyRow>,\n\t\trequired: true,\n\t},\n})\n\n/**\n * Gets native Vue props for a component rendering `th` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.th())\n * ```\n */\nexport const th = (): {\n\tcell: { type: PropType<TableFieldHeaderCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldHeaderCell>, required: true },\n})\n\n/**\n * Gets native Vue props for a component rendering `td` elements from a Prismic\n * table field with `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n *\n * ```javascript\n * // Defining a new rich text component\n * import { getTableComponentProps } from \"@prismicio/vue\"\n *\n * defineProps(getTableComponentProps.td())\n * ```\n */\nexport const td = (): {\n\tcell: { type: PropType<TableFieldDataCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldDataCell>, required: true },\n})\n"],"names":[],"mappings":";;AA0BO,MAAM,QAAQ,OAEf;AAAA,EACL,OAAO,EAAE,MAAM,QAA0C,UAAU,KAAM;AACzE;AAiBM,MAAM,QAAQ,OAEf;AAAA,EACL,MAAM,EAAE,MAAM,QAAoC,UAAU,KAAM;AAClE;AAiBM,MAAM,QAAQ,OAEf;AAAA,EACL,MAAM,EAAE,MAAM,QAAoC,UAAU,KAAM;AAClE;AAiBM,MAAM,KAAK,OAKZ;AAAA,EACL,KAAK;AAAA,IACJ,MAAM;AAAA,IACN,UAAU;AAAA,EAAA;AAEX;AAiBM,MAAM,KAAK,OAEZ;AAAA,EACL,MAAM,EAAE,MAAM,QAA0C,UAAU,KAAM;AACxE;AAiBM,MAAM,KAAK,OAEZ;AAAA,EACL,MAAM,EAAE,MAAM,QAAwC,UAAU,KAAM;AACtE;;;;;;;"}
@@ -0,0 +1,128 @@
1
+ import type { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "@prismicio/client";
2
+ import type { PropType } from "vue";
3
+ /**
4
+ * Gets native Vue props for a component rendering `table` elements from a
5
+ * Prismic table field with `<PrismicTable />`.
6
+ *
7
+ * Props are: `["table"]`
8
+ *
9
+ * @example
10
+ *
11
+ * ```javascript
12
+ * // Defining a new rich text component
13
+ * import { getTableComponentProps } from "@prismicio/vue"
14
+ *
15
+ * defineProps(getTableComponentProps.table())
16
+ * ```
17
+ */
18
+ export declare const table: () => {
19
+ table: {
20
+ type: PropType<TableField<"filled">>;
21
+ required: true;
22
+ };
23
+ };
24
+ /**
25
+ * Gets native Vue props for a component rendering `thead` elements from a
26
+ * Prismic table field with `<PrismicTable />`.
27
+ *
28
+ * Props are: `["head"]`
29
+ *
30
+ * @example
31
+ *
32
+ * ```javascript
33
+ * // Defining a new rich text component
34
+ * import { getTableComponentProps } from "@prismicio/vue"
35
+ *
36
+ * defineProps(getTableComponentProps.thead())
37
+ * ```
38
+ */
39
+ export declare const thead: () => {
40
+ head: {
41
+ type: PropType<TableFieldHead>;
42
+ required: true;
43
+ };
44
+ };
45
+ /**
46
+ * Gets native Vue props for a component rendering `tbody` elements from a
47
+ * Prismic table field with `<PrismicTable />`.
48
+ *
49
+ * Props are: `["body"]`
50
+ *
51
+ * @example
52
+ *
53
+ * ```javascript
54
+ * // Defining a new rich text component
55
+ * import { getTableComponentProps } from "@prismicio/vue"
56
+ *
57
+ * defineProps(getTableComponentProps.body())
58
+ * ```
59
+ */
60
+ export declare const tbody: () => {
61
+ body: {
62
+ type: PropType<TableFieldBody>;
63
+ required: true;
64
+ };
65
+ };
66
+ /**
67
+ * Gets native Vue props for a component rendering `tr` elements from a Prismic
68
+ * table field with `<PrismicTable />`.
69
+ *
70
+ * Props are: `["row"]`
71
+ *
72
+ * @example
73
+ *
74
+ * ```javascript
75
+ * // Defining a new rich text component
76
+ * import { getTableComponentProps } from "@prismicio/vue"
77
+ *
78
+ * defineProps(getTableComponentProps.tr())
79
+ * ```
80
+ */
81
+ export declare const tr: () => {
82
+ row: {
83
+ type: PropType<TableFieldHeadRow | TableFieldBodyRow>;
84
+ required: true;
85
+ };
86
+ };
87
+ /**
88
+ * Gets native Vue props for a component rendering `th` elements from a Prismic
89
+ * table field with `<PrismicTable />`.
90
+ *
91
+ * Props are: `["cell"]`
92
+ *
93
+ * @example
94
+ *
95
+ * ```javascript
96
+ * // Defining a new rich text component
97
+ * import { getTableComponentProps } from "@prismicio/vue"
98
+ *
99
+ * defineProps(getTableComponentProps.th())
100
+ * ```
101
+ */
102
+ export declare const th: () => {
103
+ cell: {
104
+ type: PropType<TableFieldHeaderCell>;
105
+ required: true;
106
+ };
107
+ };
108
+ /**
109
+ * Gets native Vue props for a component rendering `td` elements from a Prismic
110
+ * table field with `<PrismicTable />`.
111
+ *
112
+ * Props are: `["cell"]`
113
+ *
114
+ * @example
115
+ *
116
+ * ```javascript
117
+ * // Defining a new rich text component
118
+ * import { getTableComponentProps } from "@prismicio/vue"
119
+ *
120
+ * defineProps(getTableComponentProps.td())
121
+ * ```
122
+ */
123
+ export declare const td: () => {
124
+ cell: {
125
+ type: PropType<TableFieldDataCell>;
126
+ required: true;
127
+ };
128
+ };