@prismicio/vue 6.1.5-pr.112.3f254cf → 6.1.5-pr.113.a4bc448

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.
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.cjs","names":["usePrismic","computed","asLinkAttrs","isInternalURL","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"sources":["../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\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 {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link component, provide the Link\n\t * component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2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,gBAAAA,CAAA,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.cjs","names":["usePrismic","computed","asLinkAttrs","isInternalURL","_openBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"sources":["../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\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 {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link component, provide the Link\n\t * component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;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MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"sources":["../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\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 {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link component, provide the Link\n\t * component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,oBAAoB,eAAe,WAAW;EAEpE,MAAM,WAAW,eAAe;GAC/B,OAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;KACT,IAAI,MAAM,KACT,OAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,IAAI,IAAI,MAAM;KAGlE,OAAO,KAAK,aAAa,8BAA8B,KAAA;IACxD;GACD,CAAC;EACF,CAAC;EAED,MAAM,YAAY,eAAe;GAChC,OAAO,cAAc,SAAS,MAAM,QAAQ,EAAE,IAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;EACpE,CAAC;EAGD,MAAM,QAAQ,eAAe;GAC5B,OAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB,IACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB;EACH,CAAC;;GAIA,OAAAA,UAAA,GAAAC,YAIYC,wBAJI,UAAA,KAAS,GAAAC,eAAAC,mBAAU,MAAA,KAAK,CAAA,GAAA;IACvC,SAAAC,cAEO,CAFPC,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADHC,gBAAAC,gBAAA,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PrismicLink.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createTextVNode","_toDisplayString"],"sources":["../src/PrismicLink.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { AsLinkAttrsConfig } from \"@prismicio/client\"\nimport {\n\ttype LinkField,\n\ttype LinkResolverFunction,\n\ttype PrismicDocument,\n\tasLinkAttrs,\n} from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport { usePrismic } from \"./createPrismic\"\nimport { isInternalURL } from \"./lib/isInternalURL\"\nimport type { ComponentOrTagName } from \"./types\"\n\n/** The default component rendered for internal URLs. */\nconst defaultInternalComponent = \"router-link\"\n\n/** The default component rendered for external URLs. */\nconst defaultExternalComponent = \"a\"\n\n/** The default rel attribute rendered for external URLs. */\nconst defaultExternalRelAttribute = \"noreferrer\"\n\n/** Props for `<PrismicLink />`. */\nexport type PrismicLinkProps = {\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 {@link https://prismic.io/docs/routes}\n\t */\n\tlinkResolver?: LinkResolverFunction\n\n\t/**\n\t * The `rel` attribute for the link. By default, `\"noreferrer\"` is provided if the link's URL is\n\t * external. This prop can be provided a function to use the link's metadata to determine the\n\t * `rel` value.\n\t */\n\trel?: string | AsLinkAttrsConfig[\"rel\"]\n\n\t/**\n\t * The component rendered for internal URLs.\n\t *\n\t * If your app uses a client-side router that requires a special Link component, provide the Link\n\t * component to this prop.\n\t *\n\t * @defaultValue `<RouterLink>`\n\t */\n\tinternalComponent?: ComponentOrTagName\n\n\t/**\n\t * The component rendered for external URLs.\n\t *\n\t * @defaultValue `<a>`\n\t */\n\texternalComponent?: ComponentOrTagName\n} & (\n\t| {\n\t\t\t/** The Prismic link field to render. */\n\t\t\tfield: LinkField\n\t\t\tdocument?: never\n\t }\n\t| {\n\t\t\t/** The Prismic document to render as a link. */\n\t\t\tdocument: PrismicDocument\n\t\t\tfield?: never\n\t }\n)\n\nconst props = defineProps<PrismicLinkProps>()\ndefineOptions({ name: \"PrismicLink\" })\n\nconst { linkResolver: pluginLinkResolver, components } = usePrismic()\n\nconst rawAttrs = computed(() => {\n\treturn asLinkAttrs(props.field || props.document, {\n\t\tlinkResolver: props.linkResolver || pluginLinkResolver,\n\t\trel(args) {\n\t\t\tif (props.rel) {\n\t\t\t\treturn typeof props.rel === \"function\" ? props.rel(args) : props.rel\n\t\t\t}\n\n\t\t\treturn args.isExternal ? defaultExternalRelAttribute : undefined\n\t\t},\n\t})\n})\n\nconst component = computed(() => {\n\treturn isInternalURL(rawAttrs.value.href || \"\")\n\t\t? props.internalComponent || components?.linkInternalComponent || defaultInternalComponent\n\t\t: props.externalComponent || components?.linkExternalComponent || defaultExternalComponent\n})\n\n// Match Vue Router's `<RouterLink />` interface unless the component is an anchor tag.\nconst attrs = computed(() => {\n\treturn component.value === \"a\"\n\t\t? {\n\t\t\t\thref: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n\t\t: {\n\t\t\t\tto: rawAttrs.value.href,\n\t\t\t\ttarget: rawAttrs.value.target,\n\t\t\t\trel: rawAttrs.value.rel,\n\t\t\t}\n})\n</script>\n\n<template>\n\t<component :is=\"component\" v-bind=\"attrs\">\n\t\t<slot>\n\t\t\t{{ props.field && \"text\" in props.field ? props.field.text : undefined }}\n\t\t</slot>\n\t</component>\n</template>\n"],"mappings":";;;;;;AAeA,MAAM,2BAA2B;;AAGjC,MAAM,2BAA2B;;AAGjC,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDpC,MAAM,QAAQ;EAGd,MAAM,EAAE,cAAc,oBAAoB,eAAe,WAAW;EAEpE,MAAM,WAAW,eAAe;GAC/B,OAAO,YAAY,MAAM,SAAS,MAAM,UAAU;IACjD,cAAc,MAAM,gBAAgB;IACpC,IAAI,MAAM;KACT,IAAI,MAAM,KACT,OAAO,OAAO,MAAM,QAAQ,aAAa,MAAM,IAAI,IAAI,IAAI,MAAM;KAGlE,OAAO,KAAK,aAAa,8BAA8B,KAAA;IACxD;GACD,CAAC;EACF,CAAC;EAED,MAAM,YAAY,eAAe;GAChC,OAAO,cAAc,SAAS,MAAM,QAAQ,EAAE,IAC3C,MAAM,qBAAqB,YAAY,yBAAyB,2BAChE,MAAM,qBAAqB,YAAY,yBAAyB;EACpE,CAAC;EAGD,MAAM,QAAQ,eAAe;GAC5B,OAAO,UAAU,UAAU,MACxB;IACA,MAAM,SAAS,MAAM;IACrB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB,IACC;IACA,IAAI,SAAS,MAAM;IACnB,QAAQ,SAAS,MAAM;IACvB,KAAK,SAAS,MAAM;GACrB;EACH,CAAC;;GAIA,OAAAA,UAAA,GAAAC,YAIYC,wBAJI,UAAA,KAAS,GAAAC,eAAAC,mBAAU,MAAA,KAAK,CAAA,GAAA;IACvC,SAAAC,cAEO,CAFPC,WAEO,KAAA,QAAA,WAAA,CAAA,SAAA,CADHC,gBAAAC,gBAAA,MAAM,SAAK,UAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,KAAA,CAAS,GAAA,CAAA,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.cjs","names":["usePrismic","computed","asTree","isComponent","PrismicRichTextDefaultComponent","_openBlock","_createBlock","PrismicRichTextSerialize","_resolveDynamicComponent","_createCommentVNode"],"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,yBACXA,sBAAAA,WAAW;EAEf,MAAM,sBAAA,GAAqBC,IAAAA,SAAAA,OAAmC;GAC7D,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,MAAM,YAAA,GAAWA,IAAAA,SAAAA,OAAe;GAC/B,QAAA,GAAOC,2BAAAA,OAAAA,CAAO,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;EAClC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vue_vue_type_script_setup_true_lang.cjs","names":["usePrismic","computed","asTree","isComponent","PrismicRichTextDefaultComponent","_openBlock","_createBlock","PrismicRichTextSerialize","_resolveDynamicComponent","_createCommentVNode"],"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,yBACXA,sBAAAA,WAAW;EAEf,MAAM,sBAAA,GAAqBC,IAAAA,SAAAA,OAAmC;GAC7D,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,MAAM,YAAA,GAAWA,IAAAA,SAAAA,OAAe;GAC/B,QAAA,GAAOC,2BAAAA,OAAAA,CAAO,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;EAClC,CAAC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;GAK7D,IAAIC,cAAAA,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAIC,wCAAAA;IACJ,cAAc,MAAM;IACpB,WAAW;GACZ;EACD;EAEA,MAAM,sBAAA,GAAqBH,IAAAA,SAAAA,OAA2C;GACrE,OAAO;IACN,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,WAAW,qBAAqB,WAAW;IAC3C,cAAc,qBAAqB,cAAc;IACjD,QAAQ,qBAAqB,QAAQ;IACrC,IAAI,qBAAqB,IAAI;IAC7B,aAAa,qBAAqB,UAAU;IAC5C,eAAe,qBAAqB,WAAW;IAC/C,mBAAmB,qBAAqB,MAAM;IAC9C,qBAAqB,qBAAqB,OAAO;IACjD,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,WAAW,qBAAqB,WAAW;IAC3C,OAAO,qBAAqB,OAAO;IACnC,MAAM,qBAAqB,MAAM;GAClC;EACD,CAAC;;GAKO,OAAA,SAAA,MAAS,WAAA,GADhBI,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,CAIEC,iCAAAA,SAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;G,oDAED,QAAA,aAAA,GAAtBF,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAAiDE,IAAAA,wBAAAA,CAAZ,QAAA,QAAQ,GAAA,EAAA,KAAA,EAAA,CAAA,MAAA,G"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":["PrismicRichTextDefaultComponent","_openBlock","_createBlock","PrismicRichTextSerialize","_resolveDynamicComponent","_createCommentVNode"],"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,WAAW;EAEf,MAAM,qBAAqB,eAAmC;GAC7D,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,MAAM,WAAW,eAAe;GAC/B,OAAO,OAAO,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC;EAClC,CAAC;EAED,SAAS,qBAAqB,MAAqC;GAClE,MAAM,4BAA4B,mBAAmB,QAAQ;GAK7D,IAAI,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAIA;IACJ,cAAc,MAAM;IACpB,WAAW;GACZ;EACD;EAEA,MAAM,qBAAqB,eAA2C;GACrE,OAAO;IACN,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,UAAU,qBAAqB,UAAU;IACzC,WAAW,qBAAqB,WAAW;IAC3C,cAAc,qBAAqB,cAAc;IACjD,QAAQ,qBAAqB,QAAQ;IACrC,IAAI,qBAAqB,IAAI;IAC7B,aAAa,qBAAqB,UAAU;IAC5C,eAAe,qBAAqB,WAAW;IAC/C,mBAAmB,qBAAqB,MAAM;IAC9C,qBAAqB,qBAAqB,OAAO;IACjD,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,WAAW,qBAAqB,WAAW;IAC3C,OAAO,qBAAqB,OAAO;IACnC,MAAM,qBAAqB,MAAM;GAClC;EACD,CAAC;;GAKO,OAAA,SAAA,MAAS,UADhBC,UAAA,GAAAC,YAIEC,kCAAA;;IAFA,UAAU,SAAA;IACV,uBAAqB,mBAAA;GAED,GAAA,MAAA,GAAA,CAAA,YAAA,qBAAA,CAAA,KAAA,QAAA,YAAtBF,UAAA,GAAAC,YAAiDE,wBAAZ,QAAA,QAAQ,GAAA,EAAA,KAAA,EAAA,CAAA,KAAA,mBAAA,QAAA,IAAA"}
1
+ {"version":3,"file":"PrismicRichText.vue_vue_type_script_setup_true_lang.js","names":["PrismicRichTextDefaultComponent","_openBlock","_createBlock","PrismicRichTextSerialize","_resolveDynamicComponent","_createCommentVNode"],"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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Component.vue_vue_type_script_setup_true_lang.cjs","names":["computed","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot","_createElementBlock","_normalizeProps","PrismicLink","_createVNode","PrismicImage","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_toDisplayString"],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,QAAQ;EAQd,MAAM,MAAA,GAAKA,IAAAA,SAAAA,OAAe;GACzB,OAAO,MAAM,KAAK,SAAS,WAC1B,MAAM,KAAK,SAAS,eACpB,MAAM,KAAK,SAAS,WACpB,MAAM,KAAK,SAAS,SAClB,MAAM,WAAW,KACjB,KAAA;EACJ,CAAC;EAED,MAAM,SAAA,GAAQA,IAAAA,SAAAA,OAAe;GAC5B,MAAM,EAAE,IAAI,GAAG,UAAU,MAAM,aAAa,CAAC;GAE7C,OAAO;EACR,CAAC;EAED,MAAM,OAAA,GAAMA,IAAAA,SAAAA,OAAe;GAC1B,OAAO,eAAe,MAAM,QAAQ,MAAM,KAAK,cAAc,QAAQ,QAAQ,KAAA;EAC9E,CAAC;;GAIiB,OAAA,GAAA,UAAA,GAAjBC,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAA4EC,IAAAA,wBAAAA,CAAlD,GAAA,KAAE,IAAA,GAA5BC,IAAAA,WAAAA,CAA4E;;IAA7C,KAAK,IAAA;GAAa,GAAA,MAAA,KAAK,GAAA;IAAE,UAAA,GAAAC,IAAAA,QAAAA,OAAQ,EAAA,GAARC,IAAAA,WAAAA,CAAQ,KAAA,QAAA,SAAA,CAAA,CAAA;;GACjD,GAAA,IAAA,CAAA,KAAA,CAAA,KAAA,QAAA,KAAK,SAAI,eAAA,GAAxBL,IAAAA,UAAAA,CAAA,IAAA,GAAAM,IAAAA,mBAAAA,CAEK,OAAA,GAFLH,IAAAA,WAAAA,CAEK;;IAFqC,KAAK,IAAA;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YAAA,GAA1BL,IAAAA,UAAAA,CAAA,IAAA,GAAAM,IAAAA,mBAAAA,CAA+F,SAAA,GAA/FH,IAAAA,WAAAA,CAA+F;;IAAtD,OAAO,QAAA,KAAK,KAAK;GAAe,GAAA,MAAA,KAAK,GAAA,EAAA,GAAEE,IAAAA,WAAAA,CAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA,OAAA,GACxFL,IAAAA,UAAAA,CAAA,IAAA,IAAA,GAAAM,IAAAA,mBAAAA,CAECK,IAAAA,UAAA,EAAA,KAAA,GAAA,IAAA,GAAAC,IAAAA,WAAAA,CAFwC,QAAA,KAAK,KAAK,MAAK,IAAA,IAA/B,MAAM,UAAK;IAAkC,QAAA,GAAAZ,IAAAA,UAAAA,CAAA,IAAA,GAAAM,IAAAA,mBAAAA,CAAAK,IAAAA,UAAA,EAAA,KAAA,KAAI,GAAA,CAC9D,QAAK,MAAA,GAAfX,IAAAA,UAAAA,CAAA,IAAA,GAAAM,IAAAA,mBAAAA,CAAuB,MAAA,WAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA,IAAA,GAAGQ,IAAAA,gBAAAA,EAAAA,GAAAC,IAAAA,gBAAAA,CAAA,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.cjs","names":["computed","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot","_createElementBlock","_normalizeProps","PrismicLink","_createVNode","PrismicImage","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_toDisplayString"],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{ line }}</template\n\t>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASA,MAAM,QAAQ;EAQd,MAAM,MAAA,GAAKA,IAAAA,SAAAA,OAAe;GACzB,OAAO,MAAM,KAAK,SAAS,WAC1B,MAAM,KAAK,SAAS,eACpB,MAAM,KAAK,SAAS,WACpB,MA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tx","_renderSlot","_createElementBlock","_normalizeProps","PrismicLink","_createVNode","PrismicImage","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_toDisplayString"],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\"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AAA,OAAA,CAAA,EAAA,CAAA,KAGrC,QAAA,KAAK,SAAI,WADrBH,UAAA,GAAAM,mBAOE,OAPFH,WAOE;;IALA,eAAa,QAAA,KAAK,OAAO;IACzB,oBAAkB,QAAA,KAAK,OAAO;IAC9B,wBAAsB,QAAA,KAAK,OAAO;IACnC,WAAQ,QAAA,KAAK,OAAO;GACZ,GAAA,MAAA,KAAK,GAAA,MAAA,IAAA,WAAA,KAGF,QAAA,KAAK,SAAI,eADrBH,UAAA,GAAAC,YAMgBO,qBANhBL,WAMgB;;IAJd,OAAO,QAAA,KAAK;IACZ,iBAAe,QAAA;GACR,GAAA,MAAA,KAAK,GAAA;IACZ,SAAAC,cACA,CADAC,WACA,KAAA,QAAA,SAAA,CAAA,CAAA;;GACe,GAAA,IAAA,CAAA,SAAA,eAAA,CAAA,KAAA,QAAA,KAAK,SAAI,WAA1BL,UAAA,GAAAM,mBAA+F,QAA/FH,WAA+F;;IAAtD,OAAO,QAAA,KAAK,KAAK;GAAe,GAAA,MAAA,KAAK,GAAA,CAAEE,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA,MACxFL,UAAA,IAAA,GAAAM,mBAECK,UAAA,EAAA,KAAA,GAAA,GAAAC,WAFwC,QAAA,KAAK,KAAK,MAAK,IAAA,IAA/B,MAAM,UAAK;IAAkC,OAAAZ,UAAA,GAAAM,mBAAAK,UAAA,EAAA,KAAA,KAAI,GAAA,CAC9D,QAAK,KAAfX,UAAA,GAAAM,mBAAuB,MAAA,WAAA,KAAA,mBAAA,QAAA,IAAA,GAAGQ,gBAAAC,gBAAA,IAAI,GAAA,CAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"PrismicRichTextDefaultComponent.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot","_createElementBlock","_normalizeProps","PrismicLink","_createVNode","PrismicImage","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_toDisplayString"],"sources":["../../src/PrismicRichText/PrismicRichTextDefaultComponent.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { LinkResolverFunction } from \"@prismicio/client\"\nimport { computed } from \"vue\"\n\nimport PrismicImage from \"../PrismicImage.vue\"\nimport PrismicLink from \"../PrismicLink.vue\"\nimport type { ComponentShorthand } from \"../types\"\nimport type { RichTextComponentProps } from \"./types\"\n\nconst props = defineProps<\n\tRichTextComponentProps & {\n\t\tlinkResolver?: LinkResolverFunction\n\t\tshorthand?: ComponentShorthand\n\t}\n>()\ndefineOptions({ name: \"PrismicRichTextDefaultComponent\" })\n\nconst as = computed(() => {\n\treturn props.node.type !== \"image\" &&\n\t\tprops.node.type !== \"hyperlink\" &&\n\t\tprops.node.type !== \"label\" &&\n\t\tprops.node.type !== \"span\"\n\t\t? props.shorthand?.as\n\t\t: undefined\n})\n\nconst attrs = computed(() => {\n\tconst { as, ...attrs } = props.shorthand ?? {}\n\n\treturn attrs\n})\n\nconst dir = computed(() => {\n\treturn \"direction\" in props.node && props.node.direction === \"rtl\" ? \"rtl\" : undefined\n})\n</script>\n\n<template>\n\t<component v-if=\"as\" :is=\"as\" :dir=\"dir\" v-bind=\"attrs\"><slot /></component>\n\t<h1 v-else-if=\"node.type === 'heading1'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h1>\n\t<h2 v-else-if=\"node.type === 'heading2'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h2>\n\t<h3 v-else-if=\"node.type === 'heading3'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h3>\n\t<h4 v-else-if=\"node.type === 'heading4'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h4>\n\t<h5 v-else-if=\"node.type === 'heading5'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h5>\n\t<h6 v-else-if=\"node.type === 'heading6'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</h6>\n\t<p v-else-if=\"node.type === 'paragraph'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</p>\n\t<pre v-else-if=\"node.type === 'preformatted'\" v-bind=\"attrs\"><slot /></pre>\n\t<strong v-else-if=\"node.type === 'strong'\" v-bind=\"attrs\"><slot /></strong>\n\t<em v-else-if=\"node.type === 'em'\" v-bind=\"attrs\"><slot /></em>\n\t<li v-else-if=\"node.type === 'list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<li v-else-if=\"node.type === 'o-list-item'\" :dir=\"dir\" v-bind=\"attrs\">\n\t\t<slot />\n\t</li>\n\t<ul v-else-if=\"node.type === 'group-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ul>\n\t<ol v-else-if=\"node.type === 'group-o-list-item'\" v-bind=\"attrs\">\n\t\t<slot />\n\t</ol>\n\t<p class=\"block-img\" v-else-if=\"node.type === 'image'\">\n\t\t<PrismicLink v-if=\"node.linkTo\" :field=\"node.linkTo\"\n\t\t\t><PrismicImage :field=\"node\" v-bind=\"attrs\"\n\t\t/></PrismicLink>\n\t\t<PrismicImage v-else :field=\"node\" v-bind=\"attrs\" />\n\t</p>\n\t<div\n\t\tv-else-if=\"node.type === 'embed'\"\n\t\t:data-oembed=\"node.oembed.embed_url\"\n\t\t:data-oembed-type=\"node.oembed.type\"\n\t\t:data-oembed-provider=\"node.oembed.provider_name\"\n\t\tv-html=\"node.oembed.html\"\n\t\tv-bind=\"attrs\"\n\t/>\n\t<PrismicLink\n\t\tv-else-if=\"node.type === 'hyperlink'\"\n\t\t:field=\"node.data\"\n\t\t:link-resolver=\"linkResolver\"\n\t\tv-bind=\"attrs\"\n\t\t><slot\n\t/></PrismicLink>\n\t<span v-else-if=\"node.type === 'label'\" :class=\"node.data.label\" v-bind=\"attrs\"><slot /></span>\n\t<template v-else v-for=\"(line, index) in node.text.split('\\n')\" :key=\"line\"\n\t\t><br v-if=\"index > 0\" />{{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G,sCACe,QAAA,KAAK,SAAI,WAA1BL,UAAA,GAAAM,mBAA+F,QAA/FH,WAA+F;;IAAtD,OAAO,QAAA,KAAK,KAAK;GAAe,GAAA,MAAA,KAAK,GAAA,CAAEE,WAAQ,KAAA,QAAA,SAAA,C,WACxFL,UAAA,IAAA,GAAAM,mBAECK,UAAA,EAAA,KAAA,GAAA,GAAAC,WAFwC,QAAA,KAAK,KAAK,MAAK,IAAA,IAA/B,MAAM,UAAK;IAAkC,OAAAZ,UAAA,GAAAM,mBAAAK,UAAA,EAAA,KAAA,KAAI,GAAA,CAC9D,QAAK,KAAfX,UAAA,GAAAM,mBAAuB,MAAA,WAAA,K,kCAAGQ,gBAAAC,gBAAA,IAAI,GAAA,CAAA,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.cjs","names":["$attrs","usePrismic","computed","isComponent","defaultTableComponents","_unref","isFilled","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","PrismicTableRow","_createCommentVNode","_normalizeProps"],"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,yBACXC,sBAAAA,WAAW;EAEf,MAAM,sBAAA,GAAqBC,IAAAA,SAAAA,OAAqD;GAC/E,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;GAE7D,IAAIC,cAAAA,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAIC,sCAAAA,uBAAuB;IAC3B,WAAW;GACZ;EACD;EAEA,MAAM,2BAAA,GAA0BF,IAAAA,SAAAA,OAAwC;GACvE,OAAO;IACN,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;GAC9B;EACD,CAAC;;GAKO,QAAA,GAAAG,IAAAA,MAAAA,CAAAC,kBAAAA,QAAA,CAAQ,CAAC,MAAM,QAAA,KAAK,MAAA,GAD3BC,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAiCYC,IAAAA,wBAAAA,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AAK,IAAAA,mBAAAA,CAMEC,IAAAA,UAAA,OAAA,GAAAC,IAAAA,WAAAA,CALa,QAAA,MAAM,KAAK,OAAlB,QAAG;MADX,QAAA,GAAAP,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,CAMEO,wBAAAA,SAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;GAIM,GAAA,IAAA,CAAA,OAAA,CAAA,KAAA,QAAA,aAAA,GAAtBR,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAAiEC,IAAAA,wBAAAA,CAA5B,QAAA,QAAQ,IAAA,GAAAQ,IAAAA,eAAAA,EAAAA,GAAAP,IAAAA,WAAAA,CAAA,EAAA,KAAA,EAAA,GAAUV,KAAAA,MAAM,CAAA,GAAA,MAAA,EAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA"}
1
+ {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.cjs","names":["$attrs","usePrismic","computed","isComponent","defaultTableComponents","_unref","isFilled","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","PrismicTableRow","_createCommentVNode","_normalizeProps"],"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,yBACXC,sBAAAA,WAAW;EAEf,MAAM,sBAAA,GAAqBC,IAAAA,SAAAA,OAAqD;GAC/E,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;GAE7D,IAAIC,cAAAA,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAIC,sCAAAA,uBAAuB;IAC3B,WAAW;GACZ;EACD;EAEA,MAAM,2BAAA,GAA0BF,IAAAA,SAAAA,OAAwC;GACvE,OAAO;IACN,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;GAC9B;EACD,CAAC;;GAKO,QAAA,GAAAG,IAAAA,MAAAA,CAAAC,kBAAAA,QAAA,C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AAA,CAAA,IAAA,IAAA,GAAAK,IAAAA,mBAAAA,CAMEC,IAAAA,UAAA,OAAA,GAAAC,IAAAA,WAAAA,CALa,QAAA,MAAM,KAAK,OAAlB,QAAG;MADX,QAAA,GAAAP,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,CAMEO,wBAAAA,SAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;G,qBAIM,QAAA,aAAA,GAAtBR,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAAiEC,IAAAA,wBAAAA,CAA5B,QAAA,QAAQ,IAAA,GAAAQ,IAAAA,eAAAA,EAAAA,GAAAP,IAAAA,WAAAA,CAAA,EAAA,KAAA,EAAA,GAAUV,KAAAA,MAAM,CAAA,GAAA,MAAA,EAAA,MAAA,G"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.js","names":["$attrs","_unref","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","PrismicTableRow","_createCommentVNode","_normalizeProps"],"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,WAAW;EAEf,MAAM,qBAAqB,eAAqD;GAC/E,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ;GAE7D,IAAI,YAAY,yBAAyB,GACxC,OAAO,EAAE,IAAI,0BAA0B;GAGxC,OAAO;IACN,IAAI,uBAAuB;IAC3B,WAAW;GACZ;EACD;EAEA,MAAM,0BAA0B,eAAwC;GACvE,OAAO;IACN,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,OAAO,qBAAqB,OAAO;IACnC,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;IAC7B,IAAI,qBAAqB,IAAI;GAC9B;EACD,CAAC;;GAKO,OAAAC,MAAA,QAAA,CAAQ,CAAC,MAAM,QAAA,KAAK,KAD3BC,UAAA,GAAAC,YAiCYC,wBA/BN,wBAAA,MAAwB,MAAM,EAAE,GAFtCC,WAiCY;;IA9BV,OAAO,QAAA;GACKL,GAAAA;IAAAA,GAAAA,KAAAA;IAAM,GAAK,wBAAA,MAAwB,MAAM;GAAS,CAAA,GAAA;IAE/D,SAAAM,cAaY,CAZL,QAAA,MAAM,QADbJ,UAAA,GAAAC,YAaYC,wBAXN,wBAAA,MAAwB,MAAM,EAAE,GAFtCC,WAaY;;KAVV,MAAM,QAAA,MAAM;IACL,GAAA,wBAAA,MAAwB,MAAM,SAAS,GAAA;KAG9C,SAAAC,cAA8B,EAD/BJ,UAAA,IAAA,GAAAK,mBAMEC,UAAA,MAAAC,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;MADX,OAAAP,UAAA,GAAAC,YAMEO,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;IAGfR,GAAAA,IAAAA,CAAAA,MAAAA,CAAAA,KAAAA,mBAAAA,QAAAA,IAAAA,IAAAA,UAAA,GAAAC,YAYYC,wBAXN,wBAAA,MAAwB,MAAM,EAAE,GADtCC,WAYY,EAVV,MAAM,QAAA,MAAM,KACL,GAAA,wBAAA,MAAwB,MAAM,SAAS,GAAA;KAG9C,SAAAC,cAA8B,EAD/BJ,UAAA,IAAA,GAAAK,mBAMEC,UAAA,MAAAC,WALa,QAAA,MAAM,KAAK,OAAlB,QAAG;MADX,OAAAP,UAAA,GAAAC,YAMEO,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;GAIM,GAAA,IAAA,CAAA,OAAA,CAAA,KAAA,QAAA,YAAtBR,UAAA,GAAAC,YAAiEC,wBAA5B,QAAA,QAAQ,GAAAQ,eAAAP,WAAA,EAAA,KAAA,EAAA,GAAUL,KAAAA,MAAM,CAAA,GAAA,MAAA,EAAA,KAAA,mBAAA,QAAA,IAAA"}
1
+ {"version":3,"file":"PrismicTable.vue_vue_type_script_setup_true_lang.js","names":["$attrs","_unref","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","PrismicTableRow","_createCommentVNode","_normalizeProps"],"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,WAAW;EAEf,MAAM,qBAAqB,eAAqD;GAC/E,OAAO;IAAE,GAAG;IAAoB,GAAG,MAAM;GAAW;EACrD,CAAC;EAED,SAAS,qBAAqB,MAA6B;GAC1D,MAAM,4BAA4B,mBAAmB,QAAQ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AG;MADX,OAAAP,UAAA,GAAAC,YAMEO,yBAAA;OAJA,KAAK,IAAI;OACJ;OACL,yBAAyB,wBAAA;OACzB,YAAY,QAAA;;;;;;;;;;G,qBAIM,QAAA,YAAtBR,UAAA,GAAAC,YAAiEC,wBAA5B,QAAA,QAAQ,GAAAQ,eAAAP,WAAA,EAAA,KAAA,EAAA,GAAUL,KAAAA,MAAM,CAAA,GAAA,MAAA,EAAA,K"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","_createVNode","PrismicRichText"],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\nimport type { InternalTableComponents } from \"./types\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAkBC,QAAA,GAAAA,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAuBYC,IAAAA,wBAAAA,CAtBN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GADnCC,IAAAA,WAAAA,CAuBY,EArBV,KAAK,QAAA,IAAG,GACD,QAAA,wBAAwB,GAAG,SAAS,GAAA;IAElC,UAAA,GAAAC,IAAAA,QAAAA,OAAyB,GAAA,GAAnCJ,IAAAA,UAAAA,CAAA,IAAA,IAAA,GAAAK,IAAAA,mBAAAA,CAiBWC,IAAAA,UAAA,OAAA,GAAAC,IAAAA,WAAAA,CAjBc,QAAA,IAAI,QAAZ,SAAI;KAAqB,QAAA,GAAA,IAAA,UAAA,CAAA,IAAA,GAAA,IAAA,mBAAA,CAAA,IAAA,UAAA,EAAA,KAAA,KAAK,IAAA,GAAA,CAEvC,KAAK,SAAI,aAAA,GADhBP,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAOYC,IAAAA,wBAAAA,CALN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GAFnCC,IAAAA,WAAAA,CAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,UAAA,GAAAC,IAAAA,QAAAA,OAAkE,EAAA,GAAlEI,IAAAA,YAAAA,CAAkEC,wBAAAA,SAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;KAErDT,GAAAA,MAAAA,CAAAA,MAAAA,CAAAA,OAAAA,GAAAA,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAOYC,IAAAA,wBAAAA,CALN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GAFnCC,IAAAA,WAAAA,CAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,UAAA,GAAAC,IAAAA,QAAAA,OAAkE,EAAA,GAAlEI,IAAAA,YAAAA,CAAkEC,wBAAAA,SAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
1
+ {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.cjs","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","_createVNode","PrismicRichText"],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\nimport type { InternalTableComponents } from \"./types\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAkBC,QAAA,GAAAA,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAuBYC,IAAAA,wBAAAA,CAtBN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GADnCC,IAAAA,WAAAA,CAuBY,EArBV,KAAK,QAAA,IAAG,GACD,QAAA,wBAAwB,GAAG,SAAS,GAAA;IAElC,UAAA,GAAAC,IAAAA,QAAAA,OAAyB,GAAA,GAAnCJ,IAAAA,UAAAA,CAAA,IAAA,IAAA,GAAAK,IAAAA,mBAAAA,CAiBWC,IAAAA,UAAA,OAAA,GAAAC,IAAAA,WAAAA,CAjBc,QAAA,IAAI,QAAZ,SAAI;K,yEAAqB,KAAA,KAAK,I,IAEvC,KAAK,SAAI,aAAA,GADhBP,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAOYC,IAAAA,wBAAAA,CALN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GAFnCC,IAAAA,WAAAA,CAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,UAAA,GAAAC,IAAAA,QAAAA,OAAkE,EAAA,GAAlEI,IAAAA,YAAAA,CAAkEC,wBAAAA,SAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;K,2BAErDT,IAAAA,UAAAA,CAAA,IAAA,GAAAC,IAAAA,YAAAA,EAAAA,GAOYC,IAAAA,wBAAAA,CALN,QAAA,wBAAwB,GAAG,EAAE,IAAA,GAFnCC,IAAAA,WAAAA,CAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,UAAA,GAAAC,IAAAA,QAAAA,OAAkE,EAAA,GAAlEI,IAAAA,YAAAA,CAAkEC,wBAAAA,SAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","_createVNode","PrismicRichText"],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\nimport type { InternalTableComponents } from \"./types\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAkBC,OAAAA,UAAA,GAAAC,YAuBYC,wBAtBN,QAAA,wBAAwB,GAAG,EAAE,GADnCC,WAuBY,EArBV,KAAK,QAAA,IAAG,GACD,QAAA,wBAAwB,GAAG,SAAS,GAAA;IAElC,SAAAC,cAAyB,EAAnCJ,UAAA,IAAA,GAAAK,mBAiBWC,UAAA,MAAAC,WAjBc,QAAA,IAAI,QAAZ,SAAI;KAAqB,OAAA,UAAA,GAAA,mBAAA,UAAA,EAAA,KAAA,KAAK,IAAA,GAAA,CAEvC,KAAK,SAAI,YADhBP,UAAA,GAAAC,YAOYC,wBALN,QAAA,wBAAwB,GAAG,EAAE,GAFnCC,WAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,SAAAC,cAAkE,CAAlEI,YAAkEC,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;KAErDT,GAAAA,MAAAA,CAAAA,MAAAA,CAAAA,MAAAA,UAAA,GAAAC,YAOYC,wBALN,QAAA,wBAAwB,GAAG,EAAE,GAFnCC,WAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,SAAAC,cAAkE,CAAlEI,YAAkEC,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
1
+ {"version":3,"file":"PrismicTableRow.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_Fragment","_renderList","_createVNode","PrismicRichText"],"sources":["../../src/PrismicTable/PrismicTableRow.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { TableFieldBodyRow, TableFieldHeadRow } from \"@prismicio/client\"\n\nimport type { RichTextComponents } from \"../PrismicRichText\"\nimport PrismicRichText from \"../PrismicRichText/PrismicRichText.vue\"\nimport type { InternalTableComponents } from \"./types\"\n\nexport type PrismicTableRowProps = {\n\trow: TableFieldHeadRow | TableFieldBodyRow\n\tinternalTableComponents: InternalTableComponents\n\tcomponents?: RichTextComponents\n}\n\nconst props = defineProps<PrismicTableRowProps>()\ndefineOptions({ name: \"PrismicTableRow\" })\n</script>\n\n<template>\n\t<component\n\t\t:is=\"internalTableComponents.tr.is\"\n\t\t:row=\"row\"\n\t\tv-bind=\"internalTableComponents.tr.shorthand\"\n\t>\n\t\t<template v-for=\"cell in row.cells\" :key=\"cell.key\">\n\t\t\t<component\n\t\t\t\tv-if=\"cell.type === 'header'\"\n\t\t\t\t:is=\"internalTableComponents.th.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.th.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t\t<component\n\t\t\t\tv-else\n\t\t\t\t:is=\"internalTableComponents.td.is\"\n\t\t\t\t:cell=\"cell\"\n\t\t\t\tv-bind=\"internalTableComponents.td.shorthand\"\n\t\t\t>\n\t\t\t\t<PrismicRichText :field=\"cell.content\" :components=\"components\" />\n\t\t\t</component>\n\t\t</template>\n\t</component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;GAkBC,OAAAA,UAAA,GAAAC,YAuBYC,wBAtBN,QAAA,wBAAwB,GAAG,EAAE,GADnCC,WAuBY,EArBV,KAAK,QAAA,IAAG,GACD,QAAA,wBAAwB,GAAG,SAAS,GAAA;IAElC,SAAAC,cAAyB,EAAnCJ,UAAA,IAAA,GAAAK,mBAiBWC,UAAA,MAAAC,WAjBc,QAAA,IAAI,QAAZ,SAAI;K,mDAAqB,KAAA,KAAK,I,IAEvC,KAAK,SAAI,YADhBP,UAAA,GAAAC,YAOYC,wBALN,QAAA,wBAAwB,GAAG,EAAE,GAFnCC,WAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,SAAAC,cAAkE,CAAlEI,YAAkEC,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA;;;K,uBAErDT,UAAA,GAAAC,YAOYC,wBALN,QAAA,wBAAwB,GAAG,EAAE,GAFnCC,WAOY;;MAJJ;KACC,GAAA,EAAA,SAAA,KAAA,GAAA,QAAA,wBAAwB,GAAG,SAAS,GAAA;MAE5C,SAAAC,cAAkE,CAAlEI,YAAkEC,yBAAA;OAAhD,OAAO,KAAK;OAAU,YAAY,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.cjs","names":["ref","getDefaultSlices","getDefaultMessage","SimulatorManager","StateEventType","_openBlock","_createElementBlock","_normalizeClass","_unref","simulatorClass","_normalizeStyle","getDefaultProps","simulatorRootClass","onClickHandler","disableEventHandler","_renderSlot","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices())\nconst message = ref(getDefaultMessage())\n\nconst simulatorManager = new SimulatorManager()\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\n\t\t\"simulator-message\",\n\t)\n\n\tsimulatorManager.init()\n})\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\")\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\")\n})\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,UAAA,GAASA,IAAAA,IAAAA,EAAAA,GAAIC,yBAAAA,iBAAAA,CAAiB,CAAC;EACrC,MAAM,WAAA,GAAUD,IAAAA,IAAAA,EAAAA,GAAIE,yBAAAA,kBAAAA,CAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAIC,yBAAAA,iBAAiB;EAE9C,CAAA,GAAA,IAAA,UAAA,OAAgB;GACf,iBAAiB,MAAM,GACtBC,yBAAAA,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtBA,yBAAAA,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBAC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AA,MAAAA,CAAAM,yBAAAA,mBAAA,CAAA,CAAA,GAAA,IAAA;GAEjBC,GAAAA,EAAAA,GAAAA,IAAAA,WAAAA,CAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,MAAM,CAAA,CAAA,GAAA,EAAA,MAAA,GAAA,IAAA,mBAAA,CAAA,QAAA,IAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.cjs","names":["ref","getDefaultSlices","getDefaultMessage","SimulatorManager","StateEventType","_openBlock","_createElementBlock","_normalizeClass","_unref","simulatorClass","_normalizeStyle","getDefaultProps","simulatorRootClass","onClickHandler","disableEventHandler","_renderSlot","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices())\nconst message = ref(getDefaultMessage())\n\nconst simulatorManager = new SimulatorManager()\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\n\t\t\"simulator-message\",\n\t)\n\n\tsimulatorManager.init()\n})\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\")\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\")\n})\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,UAAA,GAASA,IAAAA,IAAAA,EAAAA,GAAIC,yBAAAA,iBAAAA,CAAiB,CAAC;EACrC,MAAM,WAAA,GAAUD,IAAAA,IAAAA,EAAAA,GAAIE,yBAAAA,kBAAAA,CAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAIC,yBAAAA,iBAAiB;EAE9C,CAAA,GAAA,IAAA,UAAA,OAAgB;GACf,iBAAiB,MAAM,GACtBC,yBAAAA,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtBA,yBAAAA,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,CAAA,GAAA,IAAA,YAAA,OAAkB;GACjB,iBAAiB,MAAM,IAAIA,yBAAAA,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAIA,yBAAAA,eAAe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","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices())\nconst message = ref(getDefaultMessage())\n\nconst simulatorManager = new SimulatorManager()\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\n\t\t\"simulator-message\",\n\t)\n\n\tsimulatorManager.init()\n})\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\")\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\")\n})\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,SAAS,IAAI,iBAAiB,CAAC;EACrC,MAAM,UAAU,IAAI,kBAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAI,iBAAiB;EAE9C,gBAAgB;GACf,iBAAiB,MAAM,GACtB,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtB,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,kBAAkB;GACjB,iBAAiB,MAAM,IAAI,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAI,eAAe,SAAS,mBAAmB;EACvE,CAAC;;GAIA,OAAAA,UAAA,GAAAC,mBAuBM,OAAA;IAtBJ,OAAKC,eAAEC,MAAA,cAAA,CAAc;IACrB,OAAKC,eAAA;KAAe,QAAA,MAAM,UAAUD,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;;;;;;KAA+H,YAAA,MAAM,cAAcA,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;GAW7M,GAAA,CAAA,QAAA,SAAfH,UAAA,GAAAC,mBAA2C,WAAA;;IAAnB,WAAQ,QAAA;GAEpB,GAAA,MAAA,GAAA,UAAA,KAAA,OAAA,MAAO,UADnBD,UAAA,GAAAC,mBAQM,OAAA;;IANL,IAAG;IACF,OAAKC,eAAEC,MAAA,kBAAA,CAAkB;IACV,gBAAA,OAAA,OAAA,OAAA,MAAA,GAAA,SAAAA,MAAA,cAAA,KAAAA,MAAA,cAAA,CAAA,CAAA,GAAA,IAAA;IACC,iBAAA,OAAA,OAAA,OAAA,MAAA,GAAA,SAAAA,MAAA,mBAAA,KAAAA,MAAA,mBAAA,CAAA,CAAA,GAAA,IAAA;GAEjBE,GAAAA,CAAAA,WAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,MAAM,CAAA,CAAA,GAAA,EAAA,KAAA,mBAAA,QAAA,IAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"SliceSimulator.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_renderSlot","_createCommentVNode"],"sources":["../src/SliceSimulator.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport {\n\tgetDefaultProps,\n\tgetDefaultSlices,\n\tgetDefaultMessage,\n\tonClickHandler,\n\tdisableEventHandler,\n\tsimulatorClass,\n\tsimulatorRootClass,\n\tStateEventType,\n\tSimulatorManager,\n} from \"@prismicio/simulator/kit\"\nimport { ref, onMounted, onUnmounted } from \"vue\"\n\n/** Props for `<SliceSimulator />`. */\nexport type SliceSimulatorProps = {\n\t/** The z-index value of the simulator so that it's displayed above layout elements. */\n\tzIndex?: number\n\t/** The background color of the simulator to match website design. */\n\tbackground?: string\n}\n\nconst props = defineProps<SliceSimulatorProps>()\ndefineOptions({ name: \"SliceSimulator\" })\n\nconst slices = ref(getDefaultSlices())\nconst message = ref(getDefaultMessage())\n\nconst simulatorManager = new SimulatorManager()\n\nonMounted(() => {\n\tsimulatorManager.state.on(\n\t\tStateEventType.Slices,\n\t\t(_slices) => {\n\t\t\tslices.value = _slices\n\t\t},\n\t\t\"simulator-slices\",\n\t)\n\tsimulatorManager.state.on(\n\t\tStateEventType.Message,\n\t\t(_message) => {\n\t\t\tmessage.value = _message\n\t\t},\n\t\t\"simulator-message\",\n\t)\n\n\tsimulatorManager.init()\n})\n\nonUnmounted(() => {\n\tsimulatorManager.state.off(StateEventType.Slices, \"simulator-slices\")\n\n\tsimulatorManager.state.off(StateEventType.Message, \"simulator-message\")\n})\n</script>\n\n<template>\n\t<div\n\t\t:class=\"simulatorClass\"\n\t\t:style=\"{\n\t\t\tzIndex: props.zIndex || getDefaultProps().zIndex,\n\t\t\tposition: 'fixed',\n\t\t\ttop: 0,\n\t\t\tleft: 0,\n\t\t\twidth: '100%',\n\t\t\theight: '100vh',\n\t\t\toverflow: 'auto',\n\t\t\tbackground: props.background || getDefaultProps().background,\n\t\t}\"\n\t>\n\t\t<article v-if=\"message\" v-html=\"message\" />\n\t\t<div\n\t\t\tv-else-if=\"slices.length\"\n\t\t\tid=\"root\"\n\t\t\t:class=\"simulatorRootClass\"\n\t\t\t@click.capture=\"onClickHandler\"\n\t\t\t@submit.capture=\"disableEventHandler\"\n\t\t>\n\t\t\t<slot :slices=\"slices\" />\n\t\t</div>\n\t</div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAsBA,MAAM,QAAQ;EAGd,MAAM,SAAS,IAAI,iBAAiB,CAAC;EACrC,MAAM,UAAU,IAAI,kBAAkB,CAAC;EAEvC,MAAM,mBAAmB,IAAI,iBAAiB;EAE9C,gBAAgB;GACf,iBAAiB,MAAM,GACtB,eAAe,SACd,YAAY;IACZ,OAAO,QAAQ;GAChB,GACA,kBACD;GACA,iBAAiB,MAAM,GACtB,eAAe,UACd,aAAa;IACb,QAAQ,QAAQ;GACjB,GACA,mBACD;GAEA,iBAAiB,KAAK;EACvB,CAAC;EAED,kBAAkB;GACjB,iBAAiB,MAAM,IAAI,eAAe,QAAQ,kBAAkB;GAEpE,iBAAiB,MAAM,IAAI,eAAe,SAAS,mBAAmB;EACvE,CAAC;;GAIA,OAAAA,UAAA,GAAAC,mBAuBM,OAAA;IAtBJ,OAAKC,eAAEC,MAAA,cAAA,CAAc;IACrB,OAAKC,eAAA;KAAe,QAAA,MAAM,UAAUD,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;;;;;;KAA+H,YAAA,MAAM,cAAcA,MAAA,eAAA,CAAe,CAAA,CAAA,CAAG;;G,IAW7M,QAAA,SAAfH,UAAA,GAAAC,mBAA2C,WAAA;;IAAnB,WAAQ,QAAA;G,2BAEpB,OAAA,MAAO,UADnBD,UAAA,GAAAC,mBAQM,OAAA;;IANL,IAAG;IACF,OAAKC,eAAEC,MAAA,kBAAA,CAAkB;I,2CACV,GAAA,SAAAA,MAAA,cAAA,KAAAA,MAAA,cAAA,CAAA,CAAA,GAAA,IAAA;I,4CACC,GAAA,SAAAA,MAAA,mBAAA,KAAAA,MAAA,mBAAA,CAAA,CAAA,GAAA,IAAA;G,IAEjBE,WAAyB,KAAA,QAAA,WAAA,EAAlB,QAAQ,OAAA,MAAM,CAAA,C"}
@@ -1 +1 @@
1
- {"version":3,"file":"TODOSliceComponent.cjs","names":["DEV","computed","h"],"sources":["../../src/SliceZone/TODOSliceComponent.ts"],"sourcesContent":["import { DEV } from \"esm-env\"\nimport { computed, defineComponent, h, watchEffect } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { SliceComponentType, SliceLike } from \"./types\"\n\n/**\n * This Slice component can be used as a reminder to provide a proper implementation.\n *\n * This is also the default Vue component rendered when a component mapping cannot be found in\n * `<SliceZone />`.\n */\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const TODOSliceComponent = DEV\n\t? /*#__PURE__*/ (defineComponent({\n\t\t\tname: \"TODOSliceComponent\",\n\t\t\tprops: {\n\t\t\t\tslice: {\n\t\t\t\t\ttype: Object as PropType<SliceLike>,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsetup(props) {\n\t\t\t\tconst type = computed(() => {\n\t\t\t\t\treturn \"slice_type\" in props.slice ? props.slice.slice_type : props.slice.type\n\t\t\t\t})\n\n\t\t\t\twatchEffect(() => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[SliceZone] Could not find a component for Slice type \"${type.value}\"`,\n\t\t\t\t\t\tprops.slice,\n\t\t\t\t\t)\n\t\t\t\t})\n\n\t\t\t\treturn () => {\n\t\t\t\t\treturn h(\n\t\t\t\t\t\t\"section\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"data-slice-zone-todo-component\": \"\",\n\t\t\t\t\t\t\t\"data-slice-type\": type.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[`Could not find a component for Slice type \"${type.value}\"`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t}) as SliceComponentType)\n\t: ((() => null) as SliceComponentType)\n"],"mappings":";;;;;;;;AAaA,MAAa,sCAAqBA,CAAAA,CAAAA,MAChB,iBAAA,GAAA,IAAA,gBAAA,CAAgB;CAC/B,MAAM;CACN,OAAO,EACN,OAAO;EACN,MAAM;EACN,UAAU;CACX,EACD;CACA,MAAM,OAAO;EACZ,MAAM,QAAA,GAAOC,IAAAA,SAAAA,OAAe;GAC3B,OAAO,gBAAgB,MAAM,QAAQ,MAAM,MAAM,aAAa,MAAM,MAAM;EAC3E,CAAC;EAED,CAAA,GAAA,IAAA,YAAA,OAAkB;GACjB,QAAQ,KACP,0DAA0D,KAAK,MAAM,IACrE,MAAM,KACP;EACD,CAAC;EAED,aAAa;GACZ,QAAA,GAAOC,IAAAA,EAAAA,CACN,WACA;IACC,kCAAkC;IAClC,mBAAmB,KAAK;GACzB,GACA,CAAC,8CAA8C,KAAK,MAAM,EAAE,CAC7D;EACD;CACD;AACD,CAAC,WACQ"}
1
+ {"version":3,"file":"TODOSliceComponent.cjs","names":["DEV","computed","h"],"sources":["../../src/SliceZone/TODOSliceComponent.ts"],"sourcesContent":["import { DEV } from \"esm-env\"\nimport { computed, defineComponent, h, watchEffect } from \"vue\"\nimport type { PropType } from \"vue\"\n\nimport type { SliceComponentType, SliceLike } from \"./types\"\n\n/**\n * This Slice component can be used as a reminder to provide a proper implementation.\n *\n * This is also the default Vue component rendered when a component mapping cannot be found in\n * `<SliceZone />`.\n */\n// oxlint-disable-next-line explicit-module-boundary-types\nexport const TODOSliceComponent = DEV\n\t? /*#__PURE__*/ (defineComponent({\n\t\t\tname: \"TODOSliceComponent\",\n\t\t\tprops: {\n\t\t\t\tslice: {\n\t\t\t\t\ttype: Object as PropType<SliceLike>,\n\t\t\t\t\trequired: true,\n\t\t\t\t},\n\t\t\t},\n\t\t\tsetup(props) {\n\t\t\t\tconst type = computed(() => {\n\t\t\t\t\treturn \"slice_type\" in props.slice ? props.slice.slice_type : props.slice.type\n\t\t\t\t})\n\n\t\t\t\twatchEffect(() => {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t`[SliceZone] Could not find a component for Slice type \"${type.value}\"`,\n\t\t\t\t\t\tprops.slice,\n\t\t\t\t\t)\n\t\t\t\t})\n\n\t\t\t\treturn () => {\n\t\t\t\t\treturn h(\n\t\t\t\t\t\t\"section\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"data-slice-zone-todo-component\": \"\",\n\t\t\t\t\t\t\t\"data-slice-type\": type.value,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t[`Could not find a component for Slice type \"${type.value}\"`],\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\t\t}) as SliceComponentType)\n\t: ((() => null) as SliceComponentType)\n"],"mappings":";;;;;;;;AAaA,MAAa,qB,iBAAqBA,CAAAA,CAAAA,MAChB,iBAAA,GAAA,IAAA,gBAAA,CAAgB;CAC/B,MAAM;CACN,OAAO,EACN,OAAO;EACN,MAAM;EACN,UAAU;CACX,EACD;CACA,MAAM,OAAO;EACZ,MAAM,QAAA,GAAOC,IAAAA,SAAAA,OAAe;GAC3B,OAAO,gBAAgB,MAAM,QAAQ,MAAM,MAAM,aAAa,MAAM,MAAM;EAC3E,CAAC;EAED,CAAA,GAAA,IAAA,YAAA,OAAkB;GACjB,QAAQ,KACP,0DAA0D,KAAK,MAAM,IACrE,MAAM,KACP;EACD,CAAC;EAED,aAAa;GACZ,QAAA,GAAOC,IAAAA,EAAAA,CACN,WACA;IACC,kCAAkC;IAClC,mBAAmB,KAAK;GACzB,GACA,CAAC,8CAA8C,KAAK,MAAM,EAAE,CAC7D;EACD;CACD;AACD,CAAC,WACQ"}
package/dist/package.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "6.1.5-pr.112.3f254cf";
2
+ var version = "6.1.5-pr.113.a4bc448";
3
3
  //#endregion
4
4
  Object.defineProperty(exports, "version", {
5
5
  enumerable: true,
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "6.1.5-pr.112.3f254cf";
2
+ var version = "6.1.5-pr.113.a4bc448";
3
3
  //#endregion
4
4
  export { version };
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/vue",
3
- "version": "6.1.5-pr.112.3f254cf",
3
+ "version": "6.1.5-pr.113.a4bc448",
4
4
  "description": "Vue plugin, components, and composables to fetch and present Prismic content",
5
5
  "keywords": [
6
6
  "plugin",
@@ -60,16 +60,16 @@
60
60
  "@prismicio/mock": "^0.7.2",
61
61
  "@types/jsdom-global": "^3.0.7",
62
62
  "@vitejs/plugin-vue": "^6.0.10",
63
- "@vitest/coverage-v8": "^5.0.4",
63
+ "@vitest/coverage-v8": "^5.0.5",
64
64
  "@vue/test-utils": "^2.5.1",
65
65
  "jsdom": "^30.1.0",
66
66
  "jsdom-global": "^3.0.2",
67
- "oxfmt": "0.72.0",
68
- "oxlint": "1.87.0",
67
+ "oxfmt": "0.73.0",
68
+ "oxlint": "1.88.0",
69
69
  "tsdown": "^0.23.1",
70
70
  "typescript": "^6.0.3",
71
71
  "vite": "^8.3.4",
72
- "vitest": "^5.0.4",
72
+ "vitest": "^5.0.5",
73
73
  "vue": "^3.5.43",
74
74
  "vue-router": "^5.4.0",
75
75
  "vue-tsc": "^3.3.13"