@prismicio/vue 5.3.0-canary.4c3e4ab → 5.3.0-canary.87748cc

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 (59) hide show
  1. package/dist/PrismicImage.vue.d.cts +20 -27
  2. package/dist/PrismicImage.vue.d.cts.map +1 -1
  3. package/dist/PrismicLink.vue.d.cts +6 -18
  4. package/dist/PrismicLink.vue.d.cts.map +1 -1
  5. package/dist/PrismicRichText/PrismicRichText.vue.d.cts +6 -9
  6. package/dist/PrismicRichText/PrismicRichText.vue.d.cts.map +1 -1
  7. package/dist/PrismicTable/PrismicTable.vue.d.cts +4 -7
  8. package/dist/PrismicTable/PrismicTable.vue.d.cts.map +1 -1
  9. package/dist/PrismicText.vue.d.cts +1 -3
  10. package/dist/PrismicText.vue.d.cts.map +1 -1
  11. package/dist/SliceZone/SliceZone.vue.d.cts +3 -9
  12. package/dist/SliceZone/SliceZone.vue.d.cts.map +1 -1
  13. package/dist/package.cjs +1 -1
  14. package/dist/package.cjs.map +1 -1
  15. package/dist/package.js +1 -1
  16. package/dist/package.js.map +1 -1
  17. package/dist/src/PrismicImage.cjs.map +1 -1
  18. package/dist/src/PrismicImage.js.map +1 -1
  19. package/dist/src/PrismicImage.vue.d.ts +20 -27
  20. package/dist/src/PrismicImage.vue.d.ts.map +1 -1
  21. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  22. package/dist/src/PrismicImage.vue_vue_type_script_setup_true_lang.js.map +1 -1
  23. package/dist/src/PrismicLink.cjs.map +1 -1
  24. package/dist/src/PrismicLink.js.map +1 -1
  25. package/dist/src/PrismicLink.vue.d.ts +6 -18
  26. package/dist/src/PrismicLink.vue.d.ts.map +1 -1
  27. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  28. package/dist/src/PrismicLink.vue_vue_type_script_setup_true_lang.js.map +1 -1
  29. package/dist/src/PrismicRichText/PrismicRichText.cjs.map +1 -1
  30. package/dist/src/PrismicRichText/PrismicRichText.js.map +1 -1
  31. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts +2 -5
  32. package/dist/src/PrismicRichText/PrismicRichText.vue.d.ts.map +1 -1
  33. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  34. package/dist/src/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  35. package/dist/src/PrismicTable/PrismicTable.cjs.map +1 -1
  36. package/dist/src/PrismicTable/PrismicTable.js.map +1 -1
  37. package/dist/src/PrismicTable/PrismicTable.vue.d.ts +2 -5
  38. package/dist/src/PrismicTable/PrismicTable.vue.d.ts.map +1 -1
  39. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  40. package/dist/src/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
  41. package/dist/src/PrismicText.cjs.map +1 -1
  42. package/dist/src/PrismicText.js.map +1 -1
  43. package/dist/src/PrismicText.vue.d.ts +1 -3
  44. package/dist/src/PrismicText.vue.d.ts.map +1 -1
  45. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  46. package/dist/src/PrismicText.vue_vue_type_script_setup_true_lang.js.map +1 -1
  47. package/dist/src/SliceZone/SliceZone.cjs.map +1 -1
  48. package/dist/src/SliceZone/SliceZone.js.map +1 -1
  49. package/dist/src/SliceZone/SliceZone.vue.d.ts +3 -9
  50. package/dist/src/SliceZone/SliceZone.vue.d.ts.map +1 -1
  51. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
  52. package/dist/src/SliceZone/SliceZone.vue_vue_type_script_setup_true_lang.js.map +1 -1
  53. package/package.json +1 -1
  54. package/src/PrismicImage.vue +6 -7
  55. package/src/PrismicLink.vue +2 -6
  56. package/src/PrismicRichText/PrismicRichText.vue +2 -5
  57. package/src/PrismicTable/PrismicTable.vue +2 -5
  58. package/src/PrismicText.vue +1 -3
  59. package/src/SliceZone/SliceZone.vue +3 -9
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of slice data from the slice zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping slice types to React components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SliceZone.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of slice data from the slice zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping slice types to React components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SliceZone.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":""}
@@ -9,22 +9,16 @@ import * as vue26 from "vue";
9
9
  * @typeParam TContext - Arbitrary data made available to all Slice components
10
10
  */
11
11
  type SliceZoneProps<TContext = unknown> = {
12
- /**
13
- * List of slice data from the slice zone.
14
- */
12
+ /** List of slice data from the slice zone. */
15
13
  slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>;
16
- /**
17
- * A record mapping slice types to React components.
18
- */
14
+ /** A record mapping slice types to React components. */
19
15
  components?: SliceZoneComponents;
20
16
  /**
21
17
  * The Vue component rendered if a component mapping from the `components`
22
18
  * prop cannot be found.
23
19
  */
24
20
  defaultComponent?: SliceComponentType<any, TContext>;
25
- /**
26
- * Arbitrary data made available to all slice components.
27
- */
21
+ /** Arbitrary data made available to all slice components. */
28
22
  context?: TContext;
29
23
  };
30
24
  type __VLS_Props = SliceZoneProps;
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AA4GA;;AAIoC,KAJxB,cAIwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;;;EAYJ,MAAA,EAZnC,aAYmC,CAZrB,SAYqB,GAAA,CAZR,SAYQ,GAZI,MAYJ,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAAxB;;;EAQf,UAAA,CAAA,EAfS,mBAeK;EAyEb;;;;EAAY,gBAAA,CAAA,EAjFE,kBAiFF,CAAA,GAAA,EAjF0B,QAiF1B,CAAA;EAAA;;;EAAA,OAAA,CAAA,EA5EP,QA4EO;CAAA;KAzEb,WAAA,GAAc,cAyED;AAAA,cAAZ,YAGkC,EAHtB,KAAA,CAAA,eAGsB,CAHtB,WAGsB,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAHtB,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAGsB,CAAA,CAAA,EAAA,MAAA,EAHtB,KAAA,CAAA,WAAA,EAAA,QAGsB,CAHtB,WAGsB,CAAA,GAHtB,QAGsB,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAHtB,KAAA,CAAA,uBAAA,EAGsB,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAHtB,iBAGU"}
1
+ {"version":3,"file":"SliceZone.vue.d.ts","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":[],"mappings":";;;;;;;;AAsGA;;AAEoC,KAFxB,cAEwB,CAAA,WAAA,OAAA,CAAA,GAAA;EAAY;EAAvC,MAAA,EAAA,aAAA,CAAc,SAAd,GAAA,CAA2B,SAA3B,GAAuC,MAAvC,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA,CAAA;EAGK;EAO8B,UAAA,CAAA,EAP9B,mBAO8B;EAAxB;;;AAInB;EA2EK,gBAEJ,CAAA,EAjFkB,kBAiFlB,CAAA,GAAA,EAjF0C,QAiF1C,CAAA;EAFgB;EAAA,OAAA,CAAA,EA5EP,QA4EO;CAAA;KAzEb,WAAA,GAAc,cAyED;cAAZ,YAAY,EAAA,KAAA,CAAA,eAAA,CAAA,WAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,KAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,WAAA,EAAA,QAAA,CAAA,WAAA,CAAA,GAAA,QAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,MAAA,EAAA,KAAA,CAAA,uBAAA,EAAA,KAAA,EAAA,CAAA,CAAA,EAAA,GAAA,CAAA;cAAA,QAAA,EAAA,OAGU,YAHV"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of slice data from the slice zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping slice types to React components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAGd,MAAM,yCAAgC;AACrC,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;gEASE,cAAA,0BAJuB,eAAA,QAAjB,kBAAa;uFACf,cAAc,GAAE,sBAGpB,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
1
+ {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,QAAQ;EAGd,MAAM,yCAAgC;AACrC,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;gEASE,cAAA,0BAJuB,eAAA,QAAjB,kBAAa;uFACf,cAAc,GAAE,sBAGpB,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of slice data from the slice zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping slice types to React components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all slice components.\n\t */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAGd,MAAM,iBAAiB,eAAe;AACrC,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;2BAIA,mBAKE,UAAA,MAAA,WAJuB,eAAA,QAAjB,kBAAa;wBADrB,YAKE,wBAHI,cAAc,GAAE,EAFtB,WAKE,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
1
+ {"version":3,"file":"SliceZone.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/** List of slice data from the slice zone. */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/** A record mapping slice types to React components. */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/** Arbitrary data made available to all slice components. */\n\tcontext?: TContext\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst renderedSlices = computed(() => {\n\tif (!props.slices) return []\n\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is = props.components?.[type] || props.defaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<component\n\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t:is=\"renderedSlice.is\"\n\t\t:key=\"renderedSlice.key\"\n\t\tv-bind=\"renderedSlice.props\"\n\t/>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCA,MAAM,QAAQ;EAGd,MAAM,iBAAiB,eAAe;AACrC,OAAI,CAAC,MAAM,OAAQ,QAAO,EAAC;AAE3B,UAAO,MAAM,OAAO,KAAK,OAAO,UAAU;IACzC,MAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;IAE9D,MAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,MAAM,GAAG,KAAK,UAAU,MAAM;IAErC,MAAM,KAAK,MAAM,aAAa,SAAS,MAAM;AAE7C,QAAI,CAAC,GACJ,QAAO;KAAE,IAAI;KAAoB;KAAK,OAAO,EAAE,OAAO;KAAC;AAGxD,QAAI,MAAM,UAAU;KACnB,MAAM,EAAE,UAAU,GAAG,gBAAgB;AAErC,YAAO;MAAE;MAAI;MAAK,OAAO;MAAY;;AAGtC,WAAO;KACN;KACA;KACA,OAAO;MACN;MACA;MACA,SAAS,MAAM;MACf,QAAQ,MAAM;MACd;KACF;KACA;IACD;;2BAIA,mBAKE,UAAA,MAAA,WAJuB,eAAA,QAAjB,kBAAa;wBADrB,YAKE,wBAHI,cAAc,GAAE,EAFtB,WAKE,EAFA,KAAK,cAAc,0BACZ,cAAc,MAAK,EAAA,MAAA,GAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/vue",
3
- "version": "5.3.0-canary.4c3e4ab",
3
+ "version": "5.3.0-canary.87748cc",
4
4
  "description": "Vue plugin, components, and composables to fetch and present Prismic content",
5
5
  "keywords": [
6
6
  "typescript",
@@ -14,9 +14,7 @@ import { devMsg } from "./lib/devMsg"
14
14
  * Props for `<PrismicImage />`.
15
15
  */
16
16
  export type PrismicImageProps = {
17
- /**
18
- * The Prismic image field or thumbnail to render.
19
- */
17
+ /** The Prismic image field or thumbnail to render. */
20
18
  field: ImageField | ImageField<string>
21
19
 
22
20
  /**
@@ -61,14 +59,15 @@ export type PrismicImageProps = {
61
59
  } & (
62
60
  | {
63
61
  /**
64
- * Widths (in pixels) used to build a `srcset` value for the image field.
62
+ * Widths (in pixels) used to build a `srcset` value for the image
63
+ * field.
65
64
  *
66
65
  * If omitted or set to `"defaults"`, the following widths will be used:
67
66
  * 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
68
67
  *
69
- * If the image field contains responsive views, each responsive view can
70
- * be used as a width in the resulting `srcset` by passing `"thumbnails"`
71
- * as the `widths` prop.
68
+ * If the image field contains responsive views, each responsive view
69
+ * can be used as a width in the resulting `srcset` by passing
70
+ * `"thumbnails"` as the `widths` prop.
72
71
  */
73
72
  widths?:
74
73
  | NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"]
@@ -67,16 +67,12 @@ export type PrismicLinkProps = {
67
67
  externalComponent?: ComponentOrTagName
68
68
  } & (
69
69
  | {
70
- /**
71
- * The Prismic link field to render.
72
- */
70
+ /** The Prismic link field to render. */
73
71
  field: LinkField
74
72
  document?: never
75
73
  }
76
74
  | {
77
- /**
78
- * The Prismic document to render as a link.
79
- */
75
+ /** The Prismic document to render as a link. */
80
76
  document: PrismicDocument
81
77
  field?: never
82
78
  }
@@ -22,9 +22,7 @@ import PrismicRichTextSerialize from "./PrismicRichTextSerialize.vue"
22
22
  * Props for `<PrismicRichText />`.
23
23
  */
24
24
  export type PrismicRichTextProps = {
25
- /**
26
- * The Prismic rich text field to render.
27
- */
25
+ /** The Prismic rich text field to render. */
28
26
  field: RichTextField | null | undefined
29
27
 
30
28
  /**
@@ -39,8 +37,7 @@ export type PrismicRichTextProps = {
39
37
  linkResolver?: LinkResolverFunction
40
38
 
41
39
  /**
42
- * An object that maps a rich text block type to a Vue component or a
43
- * shorthand definition.
40
+ * An object that maps a rich text block type to a Vue component or a shorthand definition.
44
41
  *
45
42
  * @example
46
43
  *
@@ -15,14 +15,11 @@ import PrismicTableRow from "./PrismicTableRow.vue"
15
15
  * Props for `<PrismicTable />`.
16
16
  */
17
17
  export type PrismicTableProps = {
18
- /**
19
- * The Prismic table field to render.
20
- */
18
+ /** The Prismic table field to render. */
21
19
  field: TableField | undefined
22
20
 
23
21
  /**
24
- * An object that maps a table block type to a Vue component or a shorthand
25
- * definition.
22
+ * An object that maps a table block type to a Vue component or a shorthand definition.
26
23
  *
27
24
  * @example
28
25
  *
@@ -10,9 +10,7 @@ import { devMsg } from "./lib/devMsg"
10
10
  * Props for `<PrismicText />`.
11
11
  */
12
12
  export type PrismicTextProps = {
13
- /**
14
- * The Prismic rich text field to render.
15
- */
13
+ /** The Prismic rich text field to render. */
16
14
  field: RichTextField | null | undefined
17
15
 
18
16
  /**
@@ -16,14 +16,10 @@ import { TODOSliceComponent } from "./TODOSliceComponent"
16
16
  * @typeParam TContext - Arbitrary data made available to all Slice components
17
17
  */
18
18
  export type SliceZoneProps<TContext = unknown> = {
19
- /**
20
- * List of slice data from the slice zone.
21
- */
19
+ /** List of slice data from the slice zone. */
22
20
  slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>
23
21
 
24
- /**
25
- * A record mapping slice types to React components.
26
- */
22
+ /** A record mapping slice types to React components. */
27
23
  components?: SliceZoneComponents
28
24
 
29
25
  /**
@@ -33,9 +29,7 @@ export type SliceZoneProps<TContext = unknown> = {
33
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
30
  defaultComponent?: SliceComponentType<any, TContext>
35
31
 
36
- /**
37
- * Arbitrary data made available to all slice components.
38
- */
32
+ /** Arbitrary data made available to all slice components. */
39
33
  context?: TContext
40
34
  }
41
35