@prismicio/vue 6.1.2-canary.169b473 → 6.1.2
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.
- package/dist/PrismicRichText/PrismicRichText.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.js.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.cts +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue.d.ts +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicRichText/PrismicRichText.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.cjs +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.cjs.map +1 -1
- package/dist/PrismicRichText/getRichTextComponentProps.d.cts +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.d.ts +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.js +2 -2
- package/dist/PrismicRichText/getRichTextComponentProps.js.map +1 -1
- package/dist/PrismicTable/PrismicTable.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.js.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.cts +1 -1
- package/dist/PrismicTable/PrismicTable.vue.d.ts +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.cjs.map +1 -1
- package/dist/PrismicTable/PrismicTable.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.cjs +6 -6
- package/dist/PrismicTable/getTableComponentProps.cjs.map +1 -1
- package/dist/PrismicTable/getTableComponentProps.d.cts +6 -6
- package/dist/PrismicTable/getTableComponentProps.d.ts +6 -6
- package/dist/PrismicTable/getTableComponentProps.js +6 -6
- package/dist/PrismicTable/getTableComponentProps.js.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.cjs +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.cjs.map +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.cts +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.d.ts +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.js +1 -1
- package/dist/SliceZone/defineSliceZoneComponents.js.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.cjs +2 -2
- package/dist/SliceZone/getSliceComponentProps.cjs.map +1 -1
- package/dist/SliceZone/getSliceComponentProps.d.cts +2 -2
- package/dist/SliceZone/getSliceComponentProps.d.ts +2 -2
- package/dist/SliceZone/getSliceComponentProps.js +2 -2
- package/dist/SliceZone/getSliceComponentProps.js.map +1 -1
- package/dist/createPrismic.cjs +1 -1
- package/dist/createPrismic.cjs.map +1 -1
- package/dist/createPrismic.d.cts +1 -1
- package/dist/createPrismic.d.ts +1 -1
- package/dist/createPrismic.js +1 -1
- package/dist/createPrismic.js.map +1 -1
- package/dist/lib/devMsg.cjs +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/package.json +10 -10
- package/src/PrismicRichText/PrismicRichText.vue +1 -1
- package/src/PrismicRichText/getRichTextComponentProps.ts +2 -2
- package/src/PrismicTable/PrismicTable.vue +1 -1
- package/src/PrismicTable/getTableComponentProps.ts +6 -6
- package/src/SliceZone/defineSliceZoneComponents.ts +1 -1
- package/src/SliceZone/getSliceComponentProps.ts +2 -2
- package/src/createPrismic.ts +1 -1
- package/src/lib/devMsg.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichText.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicRichText.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichText.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicRichText.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.cjs","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,sBAAA,YAAW;EAEf,MAAM,sBAAA,GAAA,IAAA,gBAAwD;AAC7D,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,MAAM,YAAA,GAAA,IAAA,gBAA0B;AAC/B,WAAA,GAAA,2BAAA,QAAc,MAAM,SAAS,EAAE,CAAC,CAAC;IACjC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;AAK7D,OAAI,cAAA,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,wCAAA;IACJ,cAAc,MAAM;IACpB,WAAW;IACZ;;EAGD,MAAM,sBAAA,GAAA,IAAA,gBAAgE;AACrE,UAAO;IACN,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,WAAW,qBAAqB,YAAY;IAC5C,cAAc,qBAAqB,eAAe;IAClD,QAAQ,qBAAqB,SAAS;IACtC,IAAI,qBAAqB,KAAK;IAC9B,aAAa,qBAAqB,WAAW;IAC7C,eAAe,qBAAqB,YAAY;IAChD,mBAAmB,qBAAqB,OAAO;IAC/C,qBAAqB,qBAAqB,QAAQ;IAClD,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,WAAW,qBAAqB,YAAY;IAC5C,OAAO,qBAAqB,QAAQ;IACpC,MAAM,qBAAqB,OAAO;IACnC;IACA;;UAKO,SAAA,MAAS,WAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,aAGd,iCAAA,SAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;uDAED,QAAA,aAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBAAe,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/PrismicRichText/PrismicRichText.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction, RichTextField, RichTextNodeType } from \"@prismicio/client\"\nimport { asTree } from \"@prismicio/client/richtext\"\nimport type { PropType } from \"vue\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport PrismicRichTextDefaultComponent from \"./PrismicRichTextDefaultComponent.vue\"\nimport PrismicRichTextSerialize from \"./PrismicRichTextSerialize.vue\"\nimport type { InternalRichTextComponents, RichTextComponent, RichTextComponents } from \"./types\"\n\n/** Props for `<PrismicRichText />`. */\nexport type PrismicRichTextProps = {\n\t/** The Prismic rich text field to render. */\n\tfield: RichTextField | null | undefined\n\n\t/**\n\t * The link resolver used to resolve links.\n\t *\n\t * @remarks\n\t * If your app uses route resolvers when querying for your Prismic repository's content, a link\n\t * resolver does not need to be provided.\n\t * @see Learn about link resolvers and route resolvers {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * An object that maps a rich text block type to a Vue component or a shorthand definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\theading1: Heading1,\n\t * \t\tparagraph: { class: \"prose\" },\n\t * \t\tstrong: { as: \"em\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` will be\n\t * rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\n// We're forced to declare props using the JavaScript syntax because `@vue/compiler-sfc`\n// has limitations for inferring types from complex objects.\nconst props = defineProps({\n\tfield: {\n\t\ttype: Array as unknown as PropType<PrismicRichTextProps[\"field\"]>,\n\t},\n\tlinkResolver: {\n\t\ttype: Function as PropType<PrismicRichTextProps[\"linkResolver\"]>,\n\t},\n\tcomponents: {\n\t\ttype: Object as PropType<PrismicRichTextProps[\"components\"]>,\n\t},\n\tfallback: {\n\t\ttype: [String, Object, Function] as PropType<PrismicRichTextProps[\"fallback\"]>,\n\t},\n})\ndefineOptions({ name: \"PrismicRichText\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nconst children = computed(() => {\n\treturn asTree(props.field || []).children\n})\n\nfunction getInternalComponent(type: keyof typeof RichTextNodeType) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type] as\n\t\t| RichTextComponent\n\t\t| ComponentShorthand\n\t\t| undefined\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: PrismicRichTextDefaultComponent,\n\t\tlinkResolver: props.linkResolver,\n\t\tshorthand: maybeComponentOrShorthand,\n\t}\n}\n\nconst internalComponents = computed<InternalRichTextComponents>(() => {\n\treturn {\n\t\theading1: getInternalComponent(\"heading1\"),\n\t\theading2: getInternalComponent(\"heading2\"),\n\t\theading3: getInternalComponent(\"heading3\"),\n\t\theading4: getInternalComponent(\"heading4\"),\n\t\theading5: getInternalComponent(\"heading5\"),\n\t\theading6: getInternalComponent(\"heading6\"),\n\t\tparagraph: getInternalComponent(\"paragraph\"),\n\t\tpreformatted: getInternalComponent(\"preformatted\"),\n\t\tstrong: getInternalComponent(\"strong\"),\n\t\tem: getInternalComponent(\"em\"),\n\t\t\"list-item\": getInternalComponent(\"listItem\"),\n\t\t\"o-list-item\": getInternalComponent(\"oListItem\"),\n\t\t\"group-list-item\": getInternalComponent(\"list\"),\n\t\t\"group-o-list-item\": getInternalComponent(\"oList\"),\n\t\timage: getInternalComponent(\"image\"),\n\t\tembed: getInternalComponent(\"embed\"),\n\t\thyperlink: getInternalComponent(\"hyperlink\"),\n\t\tlabel: getInternalComponent(\"label\"),\n\t\tspan: getInternalComponent(\"span\"),\n\t}\n})\n</script>\n\n<template>\n\t<PrismicRichTextSerialize\n\t\tv-if=\"children.length\"\n\t\t:children=\"children\"\n\t\t:internal-components=\"internalComponents\"\n\t/>\n\t<component v-else-if=\"fallback\" :is=\"fallback\" />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAmDA,MAAM,QAAQ;EAgBd,MAAM,EACL,YAAY,EAAE,yBACX,YAAW;EAEf,MAAM,qBAAqB,eAAmC;AAC7D,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,MAAM,WAAW,eAAe;AAC/B,UAAO,OAAO,MAAM,SAAS,EAAE,CAAC,CAAC;IACjC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;AAK7D,OAAI,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI;IACJ,cAAc,MAAM;IACpB,WAAW;IACZ;;EAGD,MAAM,qBAAqB,eAA2C;AACrE,UAAO;IACN,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,UAAU,qBAAqB,WAAW;IAC1C,WAAW,qBAAqB,YAAY;IAC5C,cAAc,qBAAqB,eAAe;IAClD,QAAQ,qBAAqB,SAAS;IACtC,IAAI,qBAAqB,KAAK;IAC9B,aAAa,qBAAqB,WAAW;IAC7C,eAAe,qBAAqB,YAAY;IAChD,mBAAmB,qBAAqB,OAAO;IAC/C,qBAAqB,qBAAqB,QAAQ;IAClD,OAAO,qBAAqB,QAAQ;IACpC,OAAO,qBAAqB,QAAQ;IACpC,WAAW,qBAAqB,YAAY;IAC5C,OAAO,qBAAqB,QAAQ;IACpC,MAAM,qBAAqB,OAAO;IACnC;IACA;;UAKO,SAAA,MAAS,UAAA,WAAA,EADhB,YAIE,kCAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;uDAED,QAAA,YAAA,WAAA,EAAtB,YAAiD,wBAAZ,QAAA,SAAQ,EAAA,EAAA,KAAA,GAAA,CAAA,IAAA,mBAAA,QAAA,KAAA"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Props are: `["node"]`
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
*
|
|
9
|
+
* ```javascript
|
|
10
10
|
* // Defining a new rich text component
|
|
11
11
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* ```typescript
|
|
18
18
|
* // Defining a new rich text component for a specific node type
|
|
19
19
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRichTextComponentProps.cjs","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getRichTextComponentProps.cjs","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps())\n * \t```\n *\n * @example\n * \t```typescript\n * \t// Defining a new rich text component for a specific node type\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps(\"heading1\"))\n * \t```\n *\n * @typeParam TRTType - The type of rich text node(s) this component handles\n * @param type - The type of rich text node this component handles\n * @returns Props object to use with `defineProps()`\n */\nexport const getRichTextComponentProps = <TRTType extends RTAnyNode[\"type\"]>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\ttype?: TRTType,\n): DefineComponentRichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>> => ({\n\tnode: {\n\t\ttype: Object as PropType<RichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>>[\"node\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,6BAEZ,UACmF,EACnF,MAAM;CACL,MAAM;CACN,UAAU;CACV,EACD"}
|
|
@@ -22,7 +22,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
22
22
|
* Props are: `["node"]`
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
*
|
|
25
|
+
* ```javascript
|
|
26
26
|
* // Defining a new rich text component
|
|
27
27
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
*
|
|
33
|
+
* ```typescript
|
|
34
34
|
* // Defining a new rich text component for a specific node type
|
|
35
35
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
36
36
|
*
|
|
@@ -22,7 +22,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
22
22
|
* Props are: `["node"]`
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
|
-
*
|
|
25
|
+
* ```javascript
|
|
26
26
|
* // Defining a new rich text component
|
|
27
27
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
|
-
*
|
|
33
|
+
* ```typescript
|
|
34
34
|
* // Defining a new rich text component for a specific node type
|
|
35
35
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
36
36
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Props are: `["node"]`
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
*
|
|
9
|
+
* ```javascript
|
|
10
10
|
* // Defining a new rich text component
|
|
11
11
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* ```typescript
|
|
18
18
|
* // Defining a new rich text component for a specific node type
|
|
19
19
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRichTextComponentProps.js","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getRichTextComponentProps.js","names":[],"sources":["../../src/PrismicRichText/getRichTextComponentProps.ts"],"sourcesContent":["import type { RTAnyNode } from \"@prismicio/client\"\nimport type { PropType } from \"vue\"\n\nimport type { RichTextComponentProps } from \"./types\"\n\n/**\n * Native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * @typeParam TRTNode - The type of rich text node(s) this component handles\n */\ntype DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode> = {\n\tnode: {\n\t\ttype: PropType<RichTextComponentProps<TRTNode>[\"node\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering nodes from a Prismic rich text field using the\n * `<PrismicRichText />` component.\n *\n * Props are: `[\"node\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps())\n * \t```\n *\n * @example\n * \t```typescript\n * \t// Defining a new rich text component for a specific node type\n * \timport { getRichTextComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getRichTextComponentProps(\"heading1\"))\n * \t```\n *\n * @typeParam TRTType - The type of rich text node(s) this component handles\n * @param type - The type of rich text node this component handles\n * @returns Props object to use with `defineProps()`\n */\nexport const getRichTextComponentProps = <TRTType extends RTAnyNode[\"type\"]>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\ttype?: TRTType,\n): DefineComponentRichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>> => ({\n\tnode: {\n\t\ttype: Object as PropType<RichTextComponentProps<Extract<RTAnyNode, { type: TRTType }>>[\"node\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,MAAa,6BAEZ,UACmF,EACnF,MAAM;CACL,MAAM;CACN,UAAU;CACV,EACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTable.cjs","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicTable.cjs","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\ttable: Table,\n\t * \t\tthead: { class: \"bg-black text-white\" },\n\t * \t\tth: { as: \"td\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: TableComponents & RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` (nothing)\n\t * will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<TableComponents & RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nfunction getInternalComponent(type: keyof TableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type]\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as ComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = computed<InternalTableComponents>(() => {\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":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrismicTable.js","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t
|
|
1
|
+
{"version":3,"file":"PrismicTable.js","names":[],"sources":["../../src/PrismicTable/PrismicTable.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { type TableField, isFilled } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\ttable: Table,\n\t * \t\tthead: { class: \"bg-black text-white\" },\n\t * \t\tth: { as: \"td\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: TableComponents & RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` (nothing)\n\t * will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<TableComponents & RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nfunction getInternalComponent(type: keyof TableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type]\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as ComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = computed<InternalTableComponents>(() => {\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":""}
|
|
@@ -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 { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t
|
|
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 { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\ttable: Table,\n\t * \t\tthead: { class: \"bg-black text-white\" },\n\t * \t\tth: { as: \"td\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: TableComponents & RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` (nothing)\n\t * will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<TableComponents & RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nfunction getInternalComponent(type: keyof TableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type]\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as ComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = computed<InternalTableComponents>(() => {\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":";;;;;;;;;;;;;;;;;;;;;;;;;EAsCA,MAAM,QAAQ;EAGd,MAAM,EACL,YAAY,EAAE,yBACX,sBAAA,YAAW;EAEf,MAAM,sBAAA,GAAA,IAAA,gBAA0E;AAC/E,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;AAE7D,OAAI,cAAA,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,sCAAA,uBAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,2BAAA,GAAA,IAAA,gBAAkE;AACvE,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,kBAAA,SAAQ,CAAC,MAAM,QAAA,MAAK,KAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBACrB,wBAAA,MAAwB,MAAM,GAAE,GAAA,GAAA,IAAA,YA+B1B;;IA9BV,OAAO,QAAA;;OACKA,KAAAA;IAAM,GAAK,wBAAA,MAAwB,MAAM;IAAS,CAAA,EAAA;oCAenD,CAZL,QAAA,MAAM,SAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBACP,wBAAA,MAAwB,MAAM,GAAE,GAAA,GAAA,IAAA,YAW1B;;KAVV,MAAM,QAAA,MAAM;OACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;qCAGhB,GAAA,GAAA,IAAA,WAAA,KAAA,GAAA,GAAA,IAAA,oBAK7B,IAAA,UAAA,OAAA,GAAA,IAAA,YALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,wBAAA,SAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;gJAIT,wBAAA,MAAwB,MAAM,GAAE,GAAA,GAAA,IAAA,YAW1B,EAVV,MAAM,QAAA,MAAM,MAAA,EACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;qCAGhB,GAAA,GAAA,IAAA,WAAA,KAAA,GAAA,GAAA,IAAA,oBAK7B,IAAA,UAAA,OAAA,GAAA,IAAA,YALa,QAAA,MAAM,KAAK,OAAlB,QAAG;wDAKT,wBAAA,SAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;wBAIM,QAAA,aAAA,GAAA,IAAA,YAAA,GAAA,GAAA,IAAA,cAAA,GAAA,IAAA,yBAAe,QAAA,SAAQ,GAAA,GAAA,IAAA,iBAAA,GAAA,IAAA,YAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA,KAAA,GAAA,IAAA,oBAAA,QAAA,KAAA"}
|
|
@@ -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 { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t
|
|
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 { usePrismic } from \"../createPrismic\"\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport type { ComponentOrTagName, ComponentShorthand } from \"../types\"\nimport { isComponent } from \"../types\"\nimport { defaultTableComponents } from \"./PrismicTableDefaultComponents\"\nimport PrismicTableRow from \"./PrismicTableRow.vue\"\nimport type { InternalTableComponents, TableComponents } from \"./types\"\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 definition.\n\t *\n\t * @example\n\t * \t```javascript\n\t * \t;({\n\t * \t\ttable: Table,\n\t * \t\tthead: { class: \"bg-black text-white\" },\n\t * \t\tth: { as: \"td\", class: \"font-bold\" }\n\t * \t})\n\t * \t```\n\t */\n\tcomponents?: TableComponents & RichTextComponents\n\n\t/**\n\t * The value to be rendered when the field is empty. If a fallback is not given, `null` (nothing)\n\t * will be rendered.\n\t */\n\tfallback?: ComponentOrTagName\n}\n\nconst props = defineProps<PrismicTableProps>()\ndefineOptions({ name: \"PrismicTable\" })\n\nconst {\n\tcomponents: { richTextComponents },\n} = usePrismic()\n\nconst resolvedComponents = computed<TableComponents & RichTextComponents>(() => {\n\treturn { ...richTextComponents, ...props.components }\n})\n\nfunction getInternalComponent(type: keyof TableComponents) {\n\tconst maybeComponentOrShorthand = resolvedComponents.value?.[type]\n\n\tif (isComponent(maybeComponentOrShorthand)) {\n\t\treturn { is: maybeComponentOrShorthand }\n\t}\n\n\treturn {\n\t\tis: defaultTableComponents[type],\n\t\tshorthand: maybeComponentOrShorthand as ComponentShorthand,\n\t}\n}\n\nconst internalTableComponents = computed<InternalTableComponents>(() => {\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":";;;;;;;;;;;;;;;;;;;;;;;;;EAsCA,MAAM,QAAQ;EAGd,MAAM,EACL,YAAY,EAAE,yBACX,YAAW;EAEf,MAAM,qBAAqB,eAAqD;AAC/E,UAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;IAAW;IACpD;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;AAE7D,OAAI,YAAY,0BAA0B,CACzC,QAAO,EAAE,IAAI,2BAA0B;AAGxC,UAAO;IACN,IAAI,uBAAuB;IAC3B,WAAW;IACZ;;EAGD,MAAM,0BAA0B,eAAwC;AACvE,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,IAAA,WAAA,EAD3B,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,QAAA,WAAA,EADb,YAaY,wBAXN,wBAAA,MAAwB,MAAM,GAAE,EAFtC,WAaY;;KAVV,MAAM,QAAA,MAAM;OACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,EAAA,UAAA,KAAA,EAD/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,MAAA,EACL,wBAAA,MAAwB,MAAM,UAAS,EAAA;4BAGhB,EAAA,UAAA,KAAA,EAD/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,YAAA,WAAA,EAAtB,YAAiE,wBAA5B,QAAA,SAAQ,EAAA,eAAA,WAAA,EAAA,KAAA,GAAA,EAAUA,KAAAA,OAAM,CAAA,EAAA,MAAA,GAAA,IAAA,mBAAA,QAAA,KAAA"}
|
|
@@ -14,7 +14,7 @@ var getTableComponentProps_exports = /* @__PURE__ */ require("../_virtual/_rolld
|
|
|
14
14
|
* Props are: `["table"]`
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* ```javascript
|
|
18
18
|
* // Defining a new rich text component
|
|
19
19
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
20
20
|
*
|
|
@@ -32,7 +32,7 @@ const table = () => ({ table: {
|
|
|
32
32
|
* Props are: `["head"]`
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
*
|
|
35
|
+
* ```javascript
|
|
36
36
|
* // Defining a new rich text component
|
|
37
37
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
38
38
|
*
|
|
@@ -50,7 +50,7 @@ const thead = () => ({ head: {
|
|
|
50
50
|
* Props are: `["body"]`
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
*
|
|
53
|
+
* ```javascript
|
|
54
54
|
* // Defining a new rich text component
|
|
55
55
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
56
56
|
*
|
|
@@ -68,7 +68,7 @@ const tbody = () => ({ body: {
|
|
|
68
68
|
* Props are: `["row"]`
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
|
-
*
|
|
71
|
+
* ```javascript
|
|
72
72
|
* // Defining a new rich text component
|
|
73
73
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
74
74
|
*
|
|
@@ -86,7 +86,7 @@ const tr = () => ({ row: {
|
|
|
86
86
|
* Props are: `["cell"]`
|
|
87
87
|
*
|
|
88
88
|
* @example
|
|
89
|
-
*
|
|
89
|
+
* ```javascript
|
|
90
90
|
* // Defining a new rich text component
|
|
91
91
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
92
92
|
*
|
|
@@ -104,7 +104,7 @@ const th = () => ({ cell: {
|
|
|
104
104
|
* Props are: `["cell"]`
|
|
105
105
|
*
|
|
106
106
|
* @example
|
|
107
|
-
*
|
|
107
|
+
* ```javascript
|
|
108
108
|
* // Defining a new rich text component
|
|
109
109
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
110
110
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTableComponentProps.cjs","names":[],"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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getTableComponentProps.cjs","names":[],"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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.table())\n * \t```\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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"head\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.thead())\n * \t```\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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"body\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.body())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"row\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.tr())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.th())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.td())\n * \t```\n */\nexport const td = (): {\n\tcell: { type: PropType<TableFieldDataCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldDataCell>, required: true },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,eAEP,EACL,OAAO;CAAE,MAAM;CAA0C,UAAU;CAAM,EACzE;;;;;;;;;;;;;;;AAgBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;AAgBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;AAgBD,MAAa,YAKP,EACL,KAAK;CACJ,MAAM;CACN,UAAU;CACV,EACD;;;;;;;;;;;;;;;AAgBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAA0C,UAAU;CAAM,EACxE;;;;;;;;;;;;;;;AAgBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAAwC,UAAU;CAAM,EACtE"}
|
|
@@ -12,7 +12,7 @@ declare namespace getTableComponentProps_d_exports {
|
|
|
12
12
|
* Props are: `["table"]`
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
|
-
*
|
|
15
|
+
* ```javascript
|
|
16
16
|
* // Defining a new rich text component
|
|
17
17
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
18
18
|
*
|
|
@@ -32,7 +32,7 @@ declare const table: () => {
|
|
|
32
32
|
* Props are: `["head"]`
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
*
|
|
35
|
+
* ```javascript
|
|
36
36
|
* // Defining a new rich text component
|
|
37
37
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
38
38
|
*
|
|
@@ -52,7 +52,7 @@ declare const thead: () => {
|
|
|
52
52
|
* Props are: `["body"]`
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
*
|
|
55
|
+
* ```javascript
|
|
56
56
|
* // Defining a new rich text component
|
|
57
57
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
58
58
|
*
|
|
@@ -72,7 +72,7 @@ declare const tbody: () => {
|
|
|
72
72
|
* Props are: `["row"]`
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
|
-
*
|
|
75
|
+
* ```javascript
|
|
76
76
|
* // Defining a new rich text component
|
|
77
77
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
78
78
|
*
|
|
@@ -92,7 +92,7 @@ declare const tr: () => {
|
|
|
92
92
|
* Props are: `["cell"]`
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
|
-
*
|
|
95
|
+
* ```javascript
|
|
96
96
|
* // Defining a new rich text component
|
|
97
97
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
98
98
|
*
|
|
@@ -112,7 +112,7 @@ declare const th: () => {
|
|
|
112
112
|
* Props are: `["cell"]`
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
|
-
*
|
|
115
|
+
* ```javascript
|
|
116
116
|
* // Defining a new rich text component
|
|
117
117
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
118
118
|
*
|
|
@@ -12,7 +12,7 @@ declare namespace getTableComponentProps_d_exports {
|
|
|
12
12
|
* Props are: `["table"]`
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
|
-
*
|
|
15
|
+
* ```javascript
|
|
16
16
|
* // Defining a new rich text component
|
|
17
17
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
18
18
|
*
|
|
@@ -32,7 +32,7 @@ declare const table: () => {
|
|
|
32
32
|
* Props are: `["head"]`
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
|
-
*
|
|
35
|
+
* ```javascript
|
|
36
36
|
* // Defining a new rich text component
|
|
37
37
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
38
38
|
*
|
|
@@ -52,7 +52,7 @@ declare const thead: () => {
|
|
|
52
52
|
* Props are: `["body"]`
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
*
|
|
55
|
+
* ```javascript
|
|
56
56
|
* // Defining a new rich text component
|
|
57
57
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
58
58
|
*
|
|
@@ -72,7 +72,7 @@ declare const tbody: () => {
|
|
|
72
72
|
* Props are: `["row"]`
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
|
-
*
|
|
75
|
+
* ```javascript
|
|
76
76
|
* // Defining a new rich text component
|
|
77
77
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
78
78
|
*
|
|
@@ -92,7 +92,7 @@ declare const tr: () => {
|
|
|
92
92
|
* Props are: `["cell"]`
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
|
-
*
|
|
95
|
+
* ```javascript
|
|
96
96
|
* // Defining a new rich text component
|
|
97
97
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
98
98
|
*
|
|
@@ -112,7 +112,7 @@ declare const th: () => {
|
|
|
112
112
|
* Props are: `["cell"]`
|
|
113
113
|
*
|
|
114
114
|
* @example
|
|
115
|
-
*
|
|
115
|
+
* ```javascript
|
|
116
116
|
* // Defining a new rich text component
|
|
117
117
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
118
118
|
*
|
|
@@ -15,7 +15,7 @@ var getTableComponentProps_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
15
|
* Props are: `["table"]`
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
*
|
|
18
|
+
* ```javascript
|
|
19
19
|
* // Defining a new rich text component
|
|
20
20
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
21
21
|
*
|
|
@@ -33,7 +33,7 @@ const table = () => ({ table: {
|
|
|
33
33
|
* Props are: `["head"]`
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
*
|
|
36
|
+
* ```javascript
|
|
37
37
|
* // Defining a new rich text component
|
|
38
38
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
39
39
|
*
|
|
@@ -51,7 +51,7 @@ const thead = () => ({ head: {
|
|
|
51
51
|
* Props are: `["body"]`
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
|
-
*
|
|
54
|
+
* ```javascript
|
|
55
55
|
* // Defining a new rich text component
|
|
56
56
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
57
57
|
*
|
|
@@ -69,7 +69,7 @@ const tbody = () => ({ body: {
|
|
|
69
69
|
* Props are: `["row"]`
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
|
-
*
|
|
72
|
+
* ```javascript
|
|
73
73
|
* // Defining a new rich text component
|
|
74
74
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
75
75
|
*
|
|
@@ -87,7 +87,7 @@ const tr = () => ({ row: {
|
|
|
87
87
|
* Props are: `["cell"]`
|
|
88
88
|
*
|
|
89
89
|
* @example
|
|
90
|
-
*
|
|
90
|
+
* ```javascript
|
|
91
91
|
* // Defining a new rich text component
|
|
92
92
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
93
93
|
*
|
|
@@ -105,7 +105,7 @@ const th = () => ({ cell: {
|
|
|
105
105
|
* Props are: `["cell"]`
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
|
-
*
|
|
108
|
+
* ```javascript
|
|
109
109
|
* // Defining a new rich text component
|
|
110
110
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
111
111
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTableComponentProps.js","names":[],"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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getTableComponentProps.js","names":[],"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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"table\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.table())\n * \t```\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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"head\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.thead())\n * \t```\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 Prismic table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"body\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.body())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"row\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.tr())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.th())\n * \t```\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 table field with\n * `<PrismicTable />`.\n *\n * Props are: `[\"cell\"]`\n *\n * @example\n * \t```javascript\n * \t// Defining a new rich text component\n * \timport { getTableComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getTableComponentProps.td())\n * \t```\n */\nexport const td = (): {\n\tcell: { type: PropType<TableFieldDataCell>; required: true }\n} => ({\n\tcell: { type: Object as PropType<TableFieldDataCell>, required: true },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,eAEP,EACL,OAAO;CAAE,MAAM;CAA0C,UAAU;CAAM,EACzE;;;;;;;;;;;;;;;AAgBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;AAgBD,MAAa,eAEP,EACL,MAAM;CAAE,MAAM;CAAoC,UAAU;CAAM,EAClE;;;;;;;;;;;;;;;AAgBD,MAAa,YAKP,EACL,KAAK;CACJ,MAAM;CACN,UAAU;CACV,EACD;;;;;;;;;;;;;;;AAgBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAA0C,UAAU;CAAM,EACxE;;;;;;;;;;;;;;;AAgBD,MAAa,YAEP,EACL,MAAM;CAAE,MAAM;CAAwC,UAAU;CAAM,EACtE"}
|
|
@@ -8,7 +8,7 @@ let vue = require("vue");
|
|
|
8
8
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
9
9
|
* components, improving performances.
|
|
10
10
|
* @example
|
|
11
|
-
*
|
|
11
|
+
* ```javascript
|
|
12
12
|
* // Defining a slice components
|
|
13
13
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
14
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineSliceZoneComponents.cjs","names":[],"sources":["../../src/SliceZone/defineSliceZoneComponents.ts"],"sourcesContent":["import { markRaw } from \"vue\"\n\nimport type { SliceComponentType, SliceLike, SliceZoneComponents } from \"./types\"\n\n/**\n * Gets an optimized record of Slice types mapped to Vue components. Each components will be\n * rendered for each instance of their Slice type.\n *\n * @remarks\n * This is essentially an helper function to ensure {@link markRaw} is correctly applied on each\n * components, improving performances.\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"defineSliceZoneComponents.cjs","names":[],"sources":["../../src/SliceZone/defineSliceZoneComponents.ts"],"sourcesContent":["import { markRaw } from \"vue\"\n\nimport type { SliceComponentType, SliceLike, SliceZoneComponents } from \"./types\"\n\n/**\n * Gets an optimized record of Slice types mapped to Vue components. Each components will be\n * rendered for each instance of their Slice type.\n *\n * @remarks\n * This is essentially an helper function to ensure {@link markRaw} is correctly applied on each\n * components, improving performances.\n * @example\n * \t```javascript\n * \t// Defining a slice components\n * \timport { defineSliceZoneComponents } from \"@prismicio/vue\";\n *\n * \texport default {\n * \tdata() {\n * \tcomponents: defineSliceZoneComponents({\n * \tfoo: Foo,\n * \tbar: defineAsyncComponent(\n * \t() => new Promise((res) => res(Bar)),\n * \t),\n * \tbaz: \"Baz\",\n * \t}),\n * \t}\n * \t};\n * \t```\n *\n * @typeParam TSlice - The type(s) of slices in the Slice Zone\n * @typeParam TContext - Arbitrary data made available to all Slice components\n * @param components - {@link SliceZoneComponents}\n * @returns A new optimized record of {@link SliceZoneComponents}\n */\nexport const defineSliceZoneComponents = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\tcomponents: SliceZoneComponents<TSlice, TContext>,\n): SliceZoneComponents<TSlice, TContext> => {\n\tconst result = {} as SliceZoneComponents<TSlice, TContext>\n\n\tlet type: keyof typeof components\n\tfor (type in components) {\n\t\tconst component = components[type]\n\t\tresult[type] =\n\t\t\ttypeof component === \"string\"\n\t\t\t\t? component\n\t\t\t\t: markRaw(\n\t\t\t\t\t\tcomponent as SliceComponentType<Extract<TSlice, SliceLike<typeof type>>, TContext>,\n\t\t\t\t\t)\n\t}\n\n\treturn result\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,6BAKZ,eAC2C;CAC3C,MAAM,SAAS,EAAE;CAEjB,IAAI;AACJ,MAAK,QAAQ,YAAY;EACxB,MAAM,YAAY,WAAW;AAC7B,SAAO,QACN,OAAO,cAAc,WAClB,aAAA,GAAA,IAAA,SAEA,UACA;;AAGL,QAAO"}
|
|
@@ -9,7 +9,7 @@ import { SliceLike, SliceZoneComponents } from "./types.cjs";
|
|
|
9
9
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
10
10
|
* components, improving performances.
|
|
11
11
|
* @example
|
|
12
|
-
*
|
|
12
|
+
* ```javascript
|
|
13
13
|
* // Defining a slice components
|
|
14
14
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
15
15
|
*
|
|
@@ -9,7 +9,7 @@ import { SliceLike, SliceZoneComponents } from "./types.js";
|
|
|
9
9
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
10
10
|
* components, improving performances.
|
|
11
11
|
* @example
|
|
12
|
-
*
|
|
12
|
+
* ```javascript
|
|
13
13
|
* // Defining a slice components
|
|
14
14
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
15
15
|
*
|
|
@@ -8,7 +8,7 @@ import { markRaw } from "vue";
|
|
|
8
8
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
9
9
|
* components, improving performances.
|
|
10
10
|
* @example
|
|
11
|
-
*
|
|
11
|
+
* ```javascript
|
|
12
12
|
* // Defining a slice components
|
|
13
13
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
14
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineSliceZoneComponents.js","names":[],"sources":["../../src/SliceZone/defineSliceZoneComponents.ts"],"sourcesContent":["import { markRaw } from \"vue\"\n\nimport type { SliceComponentType, SliceLike, SliceZoneComponents } from \"./types\"\n\n/**\n * Gets an optimized record of Slice types mapped to Vue components. Each components will be\n * rendered for each instance of their Slice type.\n *\n * @remarks\n * This is essentially an helper function to ensure {@link markRaw} is correctly applied on each\n * components, improving performances.\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"defineSliceZoneComponents.js","names":[],"sources":["../../src/SliceZone/defineSliceZoneComponents.ts"],"sourcesContent":["import { markRaw } from \"vue\"\n\nimport type { SliceComponentType, SliceLike, SliceZoneComponents } from \"./types\"\n\n/**\n * Gets an optimized record of Slice types mapped to Vue components. Each components will be\n * rendered for each instance of their Slice type.\n *\n * @remarks\n * This is essentially an helper function to ensure {@link markRaw} is correctly applied on each\n * components, improving performances.\n * @example\n * \t```javascript\n * \t// Defining a slice components\n * \timport { defineSliceZoneComponents } from \"@prismicio/vue\";\n *\n * \texport default {\n * \tdata() {\n * \tcomponents: defineSliceZoneComponents({\n * \tfoo: Foo,\n * \tbar: defineAsyncComponent(\n * \t() => new Promise((res) => res(Bar)),\n * \t),\n * \tbaz: \"Baz\",\n * \t}),\n * \t}\n * \t};\n * \t```\n *\n * @typeParam TSlice - The type(s) of slices in the Slice Zone\n * @typeParam TContext - Arbitrary data made available to all Slice components\n * @param components - {@link SliceZoneComponents}\n * @returns A new optimized record of {@link SliceZoneComponents}\n */\nexport const defineSliceZoneComponents = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\tcomponents: SliceZoneComponents<TSlice, TContext>,\n): SliceZoneComponents<TSlice, TContext> => {\n\tconst result = {} as SliceZoneComponents<TSlice, TContext>\n\n\tlet type: keyof typeof components\n\tfor (type in components) {\n\t\tconst component = components[type]\n\t\tresult[type] =\n\t\t\ttypeof component === \"string\"\n\t\t\t\t? component\n\t\t\t\t: markRaw(\n\t\t\t\t\t\tcomponent as SliceComponentType<Extract<TSlice, SliceLike<typeof type>>, TContext>,\n\t\t\t\t\t)\n\t}\n\n\treturn result\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,6BAKZ,eAC2C;CAC3C,MAAM,SAAS,EAAE;CAEjB,IAAI;AACJ,MAAK,QAAQ,YAAY;EACxB,MAAM,YAAY,WAAW;AAC7B,SAAO,QACN,OAAO,cAAc,WAClB,YACA,QACA,UACA;;AAGL,QAAO"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
*
|
|
9
|
+
* ```typescript
|
|
10
10
|
* // Defining a new slice component
|
|
11
11
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* ```typescript
|
|
18
18
|
* // Defining a new slice component with visual hint
|
|
19
19
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSliceComponentProps.cjs","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using the `<SliceZone />`\n * component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice using the\n * `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.cjs","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using the `<SliceZone />`\n * component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice using the\n * `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n * \t```typescript\n * \t// Defining a new slice component\n * \timport { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getSliceComponentProps())\n * \t```\n *\n * @example\n * \t```typescript\n * \t// Defining a new slice component with visual hint\n * \timport { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getSliceComponentProps([\"slice\", \"index\", \"slices\", \"context\"]))\n * \t```\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n * @param propsHint - An optional array of prop names used for the sole purpose of having a visual\n * hint of which props are made available to the slice, this parameters doesn't have any effect\n * @returns Props object to use with `defineProps()`\n */\nexport const getSliceComponentProps = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tpropsHint?: [\"slice\", \"index\", \"slices\", \"context\"],\n): DefineComponentSliceComponentProps<TSlice, TContext> => ({\n\tslice: {\n\t\ttype: Object as PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>,\n\t\trequired: true,\n\t},\n\tindex: {\n\t\ttype: Number as PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>,\n\t\trequired: true,\n\t},\n\tslices: {\n\t\ttype: Array as PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>,\n\t\trequired: true,\n\t},\n\tcontext: {\n\t\ttype: null as unknown as PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAa,0BAMZ,eAC2D;CAC3D,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,SAAS;EACR,MAAM;EACN,UAAU;EACV;CACD"}
|
|
@@ -35,7 +35,7 @@ type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext
|
|
|
35
35
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
*
|
|
38
|
+
* ```typescript
|
|
39
39
|
* // Defining a new slice component
|
|
40
40
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@ type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext
|
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
|
-
*
|
|
46
|
+
* ```typescript
|
|
47
47
|
* // Defining a new slice component with visual hint
|
|
48
48
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
49
49
|
*
|
|
@@ -35,7 +35,7 @@ type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext
|
|
|
35
35
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
36
36
|
*
|
|
37
37
|
* @example
|
|
38
|
-
*
|
|
38
|
+
* ```typescript
|
|
39
39
|
* // Defining a new slice component
|
|
40
40
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@ type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext
|
|
|
43
43
|
* ```
|
|
44
44
|
*
|
|
45
45
|
* @example
|
|
46
|
-
*
|
|
46
|
+
* ```typescript
|
|
47
47
|
* // Defining a new slice component with visual hint
|
|
48
48
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
49
49
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
*
|
|
9
|
+
* ```typescript
|
|
10
10
|
* // Defining a new slice component
|
|
11
11
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
|
-
*
|
|
17
|
+
* ```typescript
|
|
18
18
|
* // Defining a new slice component with visual hint
|
|
19
19
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
20
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSliceComponentProps.js","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using the `<SliceZone />`\n * component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice using the\n * `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"getSliceComponentProps.js","names":[],"sources":["../../src/SliceZone/getSliceComponentProps.ts"],"sourcesContent":["import type { PropType } from \"vue\"\n\nimport type { SliceComponentProps, SliceLike } from \"./types\"\n\n/**\n * Native Vue props for a component rendering content from a Prismic Slice using the `<SliceZone />`\n * component.\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n */\ntype DefineComponentSliceComponentProps<\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n> = {\n\tslice: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>\n\t\trequired: true\n\t}\n\tindex: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>\n\t\trequired: true\n\t}\n\tslices: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>\n\t\trequired: true\n\t}\n\tcontext: {\n\t\ttype: PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>\n\t\trequired: true\n\t}\n}\n\n/**\n * Gets native Vue props for a component rendering content from a Prismic Slice using the\n * `<SliceZone />` component.\n *\n * Props are: `[\"slice\", \"index\", \"slices\", \"context\"]`\n *\n * @example\n * \t```typescript\n * \t// Defining a new slice component\n * \timport { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getSliceComponentProps())\n * \t```\n *\n * @example\n * \t```typescript\n * \t// Defining a new slice component with visual hint\n * \timport { getSliceComponentProps } from \"@prismicio/vue\"\n *\n * \tdefineProps(getSliceComponentProps([\"slice\", \"index\", \"slices\", \"context\"]))\n * \t```\n *\n * @typeParam TSlice - The Slice type\n * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made available to all Slice\n * components\n * @param propsHint - An optional array of prop names used for the sole purpose of having a visual\n * hint of which props are made available to the slice, this parameters doesn't have any effect\n * @returns Props object to use with `defineProps()`\n */\nexport const getSliceComponentProps = <\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tTSlice extends SliceLike = any,\n\tTContext = unknown,\n>(\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\tpropsHint?: [\"slice\", \"index\", \"slices\", \"context\"],\n): DefineComponentSliceComponentProps<TSlice, TContext> => ({\n\tslice: {\n\t\ttype: Object as PropType<SliceComponentProps<TSlice, TContext>[\"slice\"]>,\n\t\trequired: true,\n\t},\n\tindex: {\n\t\ttype: Number as PropType<SliceComponentProps<TSlice, TContext>[\"index\"]>,\n\t\trequired: true,\n\t},\n\tslices: {\n\t\ttype: Array as PropType<SliceComponentProps<TSlice, TContext>[\"slices\"]>,\n\t\trequired: true,\n\t},\n\tcontext: {\n\t\ttype: null as unknown as PropType<SliceComponentProps<TSlice, TContext>[\"context\"]>,\n\t\trequired: true,\n\t},\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEA,MAAa,0BAMZ,eAC2D;CAC3D,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,OAAO;EACN,MAAM;EACN,UAAU;EACV;CACD,QAAQ;EACP,MAAM;EACN,UAAU;EACV;CACD,SAAS;EACR,MAAM;EACN,UAAU;EACV;CACD"}
|
package/dist/createPrismic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrismic.cjs","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"createPrismic.cjs","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t```typescript\n * \tconst { client, isFilled } = usePrismic()\n * \t```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { components: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;AASA,MAAM,aAAa,OAAO,IAAI,wBAAwB;;AA0DtD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH,YAAY,OAAO,cAAc,EAAE;EACnC,UAAA,kBAAA;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;AAWF,MAAa,mBAAkC;AAC9C,SAAA,GAAA,IAAA,QAAc,YAAY,EAAE,YAAY,EAAE,EAAE,CAAkB"}
|
package/dist/createPrismic.d.cts
CHANGED
package/dist/createPrismic.d.ts
CHANGED
package/dist/createPrismic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPrismic.js","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"createPrismic.js","names":[],"sources":["../src/createPrismic.ts"],"sourcesContent":["import type { CreateClient, LinkResolverFunction } from \"@prismicio/client\"\nimport { isFilled } from \"@prismicio/client\"\nimport type { App, InjectionKey } from \"vue\"\nimport { inject } from \"vue\"\n\nimport type { RichTextComponents } from \"./PrismicRichText\"\nimport type { TableComponents } from \"./PrismicTable\"\nimport type { ComponentOrTagName } from \"./types\"\n\nconst prismicKey = Symbol.for(\"@prismicio/vue/plugin\") as InjectionKey<PrismicPlugin>\n\n/** Components configuration. */\ntype ComponentsConfig = {\n\t/** The default component rendered for internal URLs. */\n\tlinkInternalComponent?: ComponentOrTagName\n\n\t/** The default component rendered for external URLs. */\n\tlinkExternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The default components or shorthand definitions for rich text and table components.\n\t *\n\t * @see {@link https://prismic.io/docs/fields/rich-text}\n\t * @see {@link https://prismic.io/docs/fields/table}\n\t */\n\trichTextComponents?: RichTextComponents & TableComponents\n}\n\n/** Prismic Vue plugin configuration. */\nexport type PrismicPluginConfig = {\n\t/** A Prismic client instance to inject into the Vue app. */\n\tclient: ReturnType<CreateClient>\n\n\t/**\n\t * A default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** Components configuration. */\n\tcomponents?: ComponentsConfig\n}\n\n/** Prismic Vue plugin interface accessible through `usePrismic()` and `$prismic`. */\nexport type PrismicPlugin = {\n\t/** A Prismic client that can be used to query content from a repository. */\n\tclient: ReturnType<CreateClient>\n\n\t/** Helpers to determine if a field is filled. */\n\tisFilled: typeof isFilled\n\n\t/**\n\t * The default link resolver used to resolve links when route resolvers cannot be used.\n\t *\n\t * @see {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/** @internal */\n\treadonly components: ComponentsConfig\n\n\t/** @internal */\n\tinstall: (app: App) => void\n}\n\n/** Creates a Prismic Vue plugin instance that can be used by a Vue app. */\nexport const createPrismic = (config: PrismicPluginConfig): PrismicPlugin => {\n\treturn {\n\t\t...config,\n\t\tcomponents: config.components || {},\n\t\tisFilled,\n\t\tinstall(app: App): void {\n\t\t\tapp.provide(prismicKey, this)\n\t\t\tapp.config.globalProperties.$prismic = this\n\t\t},\n\t}\n}\n\n/**\n * Access the Prismic Vue plugin interface.\n *\n * @example\n * \t```typescript\n * \tconst { client, isFilled } = usePrismic()\n * \t```\n */\nexport const usePrismic = (): PrismicPlugin => {\n\treturn inject(prismicKey, { components: {} } as PrismicPlugin)\n}\n\ndeclare module \"vue\" {\n\texport interface ComponentCustomProperties {\n\t\t/** The Prismic Vue plugin interface. */\n\t\t$prismic: PrismicPlugin\n\t}\n}\n"],"mappings":";;;AASA,MAAM,aAAa,OAAO,IAAI,wBAAwB;;AA0DtD,MAAa,iBAAiB,WAA+C;AAC5E,QAAO;EACN,GAAG;EACH,YAAY,OAAO,cAAc,EAAE;EACnC;EACA,QAAQ,KAAgB;AACvB,OAAI,QAAQ,YAAY,KAAK;AAC7B,OAAI,OAAO,iBAAiB,WAAW;;EAExC;;;;;;;;;;AAWF,MAAa,mBAAkC;AAC9C,QAAO,OAAO,YAAY,EAAE,YAAY,EAAE,EAAE,CAAkB"}
|
package/dist/lib/devMsg.cjs
CHANGED
package/dist/lib/devMsg.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/svelte/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/vue/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,gCAAgCA,gBAAAA,QAAQ,GAAG"}
|
package/dist/lib/devMsg.js
CHANGED
package/dist/lib/devMsg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t
|
|
1
|
+
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/svelte/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/vue/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,gCAAgC,QAAQ,GAAG"}
|
package/dist/package.cjs
CHANGED
package/dist/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "6.1.2
|
|
3
|
+
"version": "6.1.2",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plugin",
|
|
@@ -52,24 +52,24 @@
|
|
|
52
52
|
"test": "npm run lint && npm run types && npm run unit && npm run build"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@prismicio/simulator": "^0.2.
|
|
55
|
+
"@prismicio/simulator": "^0.2.0",
|
|
56
56
|
"esm-env": "^1.2.2"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@prismicio/client": "^7.21.
|
|
60
|
-
"@prismicio/mock": "^0.7.
|
|
59
|
+
"@prismicio/client": "^7.21.3",
|
|
60
|
+
"@prismicio/mock": "^0.7.1",
|
|
61
61
|
"@types/jsdom-global": "^3.0.7",
|
|
62
62
|
"@vitejs/plugin-vue": "^6.0.5",
|
|
63
|
-
"@vitest/coverage-v8": "^4.1.
|
|
63
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
64
64
|
"@vue/test-utils": "^2.4.6",
|
|
65
|
-
"jsdom": "^29.0.
|
|
65
|
+
"jsdom": "^29.0.1",
|
|
66
66
|
"jsdom-global": "^3.0.2",
|
|
67
|
-
"oxfmt": "^0.
|
|
68
|
-
"oxlint": "1.
|
|
67
|
+
"oxfmt": "^0.43.0",
|
|
68
|
+
"oxlint": "1.58.0",
|
|
69
69
|
"tsdown": "^0.21.7",
|
|
70
70
|
"typescript": "^6.0.2",
|
|
71
|
-
"vite": "^8.0.
|
|
72
|
-
"vitest": "^4.1.
|
|
71
|
+
"vite": "^8.0.3",
|
|
72
|
+
"vitest": "^4.1.2",
|
|
73
73
|
"vue": "^3.5.26",
|
|
74
74
|
"vue-router": "^5.0.4",
|
|
75
75
|
"vue-tsc": "^3.2.6"
|
|
@@ -23,7 +23,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
23
23
|
* Props are: `["node"]`
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
*
|
|
26
|
+
* ```javascript
|
|
27
27
|
* // Defining a new rich text component
|
|
28
28
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
29
29
|
*
|
|
@@ -31,7 +31,7 @@ type DefineComponentRichTextComponentProps<TRTNode extends RTAnyNode = RTAnyNode
|
|
|
31
31
|
* ```
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
|
-
*
|
|
34
|
+
* ```typescript
|
|
35
35
|
* // Defining a new rich text component for a specific node type
|
|
36
36
|
* import { getRichTextComponentProps } from "@prismicio/vue"
|
|
37
37
|
*
|
|
@@ -16,7 +16,7 @@ import type { PropType } from "vue"
|
|
|
16
16
|
* Props are: `["table"]`
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
|
-
*
|
|
19
|
+
* ```javascript
|
|
20
20
|
* // Defining a new rich text component
|
|
21
21
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
22
22
|
*
|
|
@@ -36,7 +36,7 @@ export const table = (): {
|
|
|
36
36
|
* Props are: `["head"]`
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
|
-
*
|
|
39
|
+
* ```javascript
|
|
40
40
|
* // Defining a new rich text component
|
|
41
41
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
42
42
|
*
|
|
@@ -56,7 +56,7 @@ export const thead = (): {
|
|
|
56
56
|
* Props are: `["body"]`
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
*
|
|
59
|
+
* ```javascript
|
|
60
60
|
* // Defining a new rich text component
|
|
61
61
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
62
62
|
*
|
|
@@ -76,7 +76,7 @@ export const tbody = (): {
|
|
|
76
76
|
* Props are: `["row"]`
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
|
-
*
|
|
79
|
+
* ```javascript
|
|
80
80
|
* // Defining a new rich text component
|
|
81
81
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
82
82
|
*
|
|
@@ -102,7 +102,7 @@ export const tr = (): {
|
|
|
102
102
|
* Props are: `["cell"]`
|
|
103
103
|
*
|
|
104
104
|
* @example
|
|
105
|
-
*
|
|
105
|
+
* ```javascript
|
|
106
106
|
* // Defining a new rich text component
|
|
107
107
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
108
108
|
*
|
|
@@ -122,7 +122,7 @@ export const th = (): {
|
|
|
122
122
|
* Props are: `["cell"]`
|
|
123
123
|
*
|
|
124
124
|
* @example
|
|
125
|
-
*
|
|
125
|
+
* ```javascript
|
|
126
126
|
* // Defining a new rich text component
|
|
127
127
|
* import { getTableComponentProps } from "@prismicio/vue"
|
|
128
128
|
*
|
|
@@ -10,7 +10,7 @@ import type { SliceComponentType, SliceLike, SliceZoneComponents } from "./types
|
|
|
10
10
|
* This is essentially an helper function to ensure {@link markRaw} is correctly applied on each
|
|
11
11
|
* components, improving performances.
|
|
12
12
|
* @example
|
|
13
|
-
*
|
|
13
|
+
* ```javascript
|
|
14
14
|
* // Defining a slice components
|
|
15
15
|
* import { defineSliceZoneComponents } from "@prismicio/vue";
|
|
16
16
|
*
|
|
@@ -40,7 +40,7 @@ type DefineComponentSliceComponentProps<
|
|
|
40
40
|
* Props are: `["slice", "index", "slices", "context"]`
|
|
41
41
|
*
|
|
42
42
|
* @example
|
|
43
|
-
*
|
|
43
|
+
* ```typescript
|
|
44
44
|
* // Defining a new slice component
|
|
45
45
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
46
46
|
*
|
|
@@ -48,7 +48,7 @@ type DefineComponentSliceComponentProps<
|
|
|
48
48
|
* ```
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
|
-
*
|
|
51
|
+
* ```typescript
|
|
52
52
|
* // Defining a new slice component with visual hint
|
|
53
53
|
* import { getSliceComponentProps } from "@prismicio/vue"
|
|
54
54
|
*
|
package/src/createPrismic.ts
CHANGED
package/src/lib/devMsg.ts
CHANGED