New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@prismicio/vue

Package Overview
Dependencies
Maintainers
28
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prismicio/vue - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

0

dist/components/index.d.ts

@@ -0,0 +0,0 @@ export { PrismicEmbedImpl, PrismicEmbed } from "./PrismicEmbed";

18

dist/components/PrismicEmbed.d.ts

@@ -6,3 +6,3 @@ import { EmbedField } from "@prismicio/client";

*/
export declare type PrismicEmbedProps = {
export type PrismicEmbedProps = {
/**

@@ -27,10 +27,7 @@ * The Prismic embed field to render.

field: {
type: PropType<import("@prismicio/client/dist/types/value/types").EmptyObjectField | ((import("@prismicio/client").AnyOEmbed & import("@prismicio/client").OEmbedExtra) & {
embed_url: string;
html: string | null;
})>;
type: PropType<EmbedField>;
required: true;
};
wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -43,10 +40,7 @@ required: false;

field: {
type: PropType<import("@prismicio/client/dist/types/value/types").EmptyObjectField | ((import("@prismicio/client").AnyOEmbed & import("@prismicio/client").OEmbedExtra) & {
embed_url: string;
html: string | null;
})>;
type: PropType<EmbedField>;
required: true;
};
wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -56,3 +50,3 @@ required: false;

}>>, {
wrapper: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
wrapper: string | ConcreteComponent | Raw<DefineComponent>;
}, {}>;

@@ -59,0 +53,0 @@ /**

@@ -7,3 +7,3 @@ import { ImageField, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet } from "@prismicio/client";

*/
export declare type PrismicImageProps = {
export type PrismicImageProps = {
/**

@@ -60,7 +60,7 @@ * The Prismic image field to render.

*/
export declare type UsePrismicImageOptions = VueUseOptions<Omit<PrismicImageProps, "imageComponent">>;
export type UsePrismicImageOptions = VueUseOptions<Omit<PrismicImageProps, "imageComponent">>;
/**
* Return type of {@link usePrismicImage}.
*/
export declare type UsePrismicImageReturnType = {
export type UsePrismicImageReturnType = {
/**

@@ -99,7 +99,7 @@ * Resolved image `src` value.

field: {
type: PropType<import("@prismicio/client/dist/types/value/types").Simplify<(import("@prismicio/client").EmptyImageFieldImage & Record<never, import("@prismicio/client").EmptyImageFieldImage>) | (import("@prismicio/client").FilledImageFieldImage & Record<never, import("@prismicio/client").FilledImageFieldImage>)> | import("@prismicio/client/dist/types/value/types").Simplify<(import("@prismicio/client").EmptyImageFieldImage & Record<string, import("@prismicio/client").EmptyImageFieldImage>) | (import("@prismicio/client").FilledImageFieldImage & Record<string, import("@prismicio/client").FilledImageFieldImage>)>>;
type: PropType<ImageField | ImageField<string>>;
required: true;
};
imageComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -127,7 +127,7 @@ required: false;

field: {
type: PropType<import("@prismicio/client/dist/types/value/types").Simplify<(import("@prismicio/client").EmptyImageFieldImage & Record<never, import("@prismicio/client").EmptyImageFieldImage>) | (import("@prismicio/client").FilledImageFieldImage & Record<never, import("@prismicio/client").FilledImageFieldImage>)> | import("@prismicio/client/dist/types/value/types").Simplify<(import("@prismicio/client").EmptyImageFieldImage & Record<string, import("@prismicio/client").EmptyImageFieldImage>) | (import("@prismicio/client").FilledImageFieldImage & Record<string, import("@prismicio/client").FilledImageFieldImage>)>>;
type: PropType<ImageField | ImageField<string>>;
required: true;
};
imageComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -154,3 +154,3 @@ required: false;

pixelDensities: number[] | "defaults" | undefined;
imageComponent: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
imageComponent: string | ConcreteComponent | Raw<DefineComponent>;
imgixParams: import("imgix-url-builder").ImgixURLParams | undefined;

@@ -157,0 +157,0 @@ }, {}>;

@@ -7,3 +7,3 @@ import { LinkField, LinkResolverFunction, PrismicDocument } from "@prismicio/client";

*/
export declare type PrismicLinkProps = {
export type PrismicLinkProps = {
/**

@@ -67,7 +67,7 @@ * The Prismic link field or document to render.

*/
export declare type UsePrismicLinkOptions = VueUseOptions<PrismicLinkProps>;
export type UsePrismicLinkOptions = VueUseOptions<PrismicLinkProps>;
/**
* Return type of {@link usePrismicLink}.
*/
export declare type UsePrismicLinkReturnType = {
export type UsePrismicLinkReturnType = {
/**

@@ -106,7 +106,7 @@ * Suggested component to render for provided link field.

field: {
type: PropType<PrismicDocument<Record<string, any>, string, string> | import("@prismicio/client").FilledContentRelationshipField<string, string, unknown> | import("@prismicio/client").EmptyLinkField<"Any"> | import("@prismicio/client").FilledLinkToWebField | import("@prismicio/client").FilledLinkToMediaField>;
type: PropType<PrismicDocument<Record<string, any>, string, string> | LinkField>;
required: true;
};
linkResolver: {
type: PropType<LinkResolverFunction<string | null | undefined>>;
type: PropType<LinkResolverFunction>;
default: undefined;

@@ -131,3 +131,3 @@ required: false;

internalComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -137,3 +137,3 @@ required: false;

externalComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -146,7 +146,7 @@ required: false;

field: {
type: PropType<PrismicDocument<Record<string, any>, string, string> | import("@prismicio/client").FilledContentRelationshipField<string, string, unknown> | import("@prismicio/client").EmptyLinkField<"Any"> | import("@prismicio/client").FilledLinkToWebField | import("@prismicio/client").FilledLinkToMediaField>;
type: PropType<PrismicDocument<Record<string, any>, string, string> | LinkField>;
required: true;
};
linkResolver: {
type: PropType<LinkResolverFunction<string | null | undefined>>;
type: PropType<LinkResolverFunction>;
default: undefined;

@@ -171,3 +171,3 @@ required: false;

internalComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -177,3 +177,3 @@ required: false;

externalComponent: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -184,7 +184,7 @@ required: false;

target: string | null;
linkResolver: LinkResolverFunction<string | null | undefined>;
linkResolver: LinkResolverFunction;
rel: string | null;
blankTargetRelAttribute: string | null;
internalComponent: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
externalComponent: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
internalComponent: string | ConcreteComponent | Raw<DefineComponent>;
externalComponent: string | ConcreteComponent | Raw<DefineComponent>;
}, {}>;

@@ -191,0 +191,0 @@ /**

@@ -7,3 +7,3 @@ import { HTMLFunctionSerializer, HTMLMapSerializer, LinkResolverFunction, RichTextField } from "@prismicio/client";

*/
export declare type PrismicRichTextProps = {
export type PrismicRichTextProps = {
/**

@@ -56,7 +56,7 @@ * The Prismic rich text or title field to render.

*/
export declare type UsePrismicRichTextOptions = VueUseOptions<Omit<PrismicRichTextProps, "wrapper">>;
export type UsePrismicRichTextOptions = VueUseOptions<Omit<PrismicRichTextProps, "wrapper">>;
/**
* Return type of {@link usePrismicRichText}.
*/
export declare type UsePrismicRichTextReturnType = {
export type UsePrismicRichTextReturnType = {
/**

@@ -83,3 +83,3 @@ * Serialized rich text field as HTML.

field: {
type: PropType<[] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined>;
type: PropType<RichTextField | null | undefined>;
default: undefined;

@@ -89,3 +89,3 @@ required: false;

linkResolver: {
type: PropType<LinkResolverFunction<string | null | undefined>>;
type: PropType<LinkResolverFunction>;
default: undefined;

@@ -105,3 +105,3 @@ required: false;

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -119,3 +119,3 @@ required: false;

field: {
type: PropType<[] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined>;
type: PropType<RichTextField | null | undefined>;
default: undefined;

@@ -125,3 +125,3 @@ required: false;

linkResolver: {
type: PropType<LinkResolverFunction<string | null | undefined>>;
type: PropType<LinkResolverFunction>;
default: undefined;

@@ -141,3 +141,3 @@ required: false;

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -152,5 +152,5 @@ required: false;

}>>, {
wrapper: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
field: [] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined;
linkResolver: LinkResolverFunction<string | null | undefined>;
wrapper: string | ConcreteComponent | Raw<DefineComponent>;
field: RichTextField | null | undefined;
linkResolver: LinkResolverFunction;
fallback: string;

@@ -157,0 +157,0 @@ serializer: import("@prismicio/client").HTMLRichTextFunctionSerializer | import("@prismicio/client").HTMLRichTextMapSerializer;

@@ -7,3 +7,3 @@ import { RichTextField } from "@prismicio/client";

*/
export declare type PrismicTextProps = {
export type PrismicTextProps = {
/**

@@ -35,7 +35,7 @@ * The Prismic rich text or title field to render.

*/
export declare type UsePrismicTextOptions = VueUseOptions<Omit<PrismicTextProps, "wrapper">>;
export type UsePrismicTextOptions = VueUseOptions<Omit<PrismicTextProps, "wrapper">>;
/**
* Return type of {@link usePrismicText}.
*/
export declare type UsePrismicTextReturnType = {
export type UsePrismicTextReturnType = {
/**

@@ -63,3 +63,3 @@ * Serialized rich text field as plain text.

field: {
type: PropType<[] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined>;
type: PropType<RichTextField | null | undefined>;
default: undefined;

@@ -74,3 +74,3 @@ required: false;

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -88,3 +88,3 @@ required: false;

field: {
type: PropType<[] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined>;
type: PropType<RichTextField | null | undefined>;
default: undefined;

@@ -99,3 +99,3 @@ required: false;

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -110,4 +110,4 @@ required: false;

}>>, {
wrapper: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
field: [] | [import("@prismicio/client").RTNode, ...import("@prismicio/client").RTNode[]] | null | undefined;
wrapper: string | ConcreteComponent | Raw<DefineComponent>;
field: RichTextField | null | undefined;
separator: string;

@@ -114,0 +114,0 @@ fallback: string;

@@ -8,3 +8,3 @@ import { Slice } from "@prismicio/client";

*/
declare type ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2 ? TSlice["slice_type"] : TSlice extends SliceLikeGraphQL ? TSlice["type"] : never;
type ExtractSliceType<TSlice extends SliceLike> = TSlice extends SliceLikeRestV2 ? TSlice["slice_type"] : TSlice extends SliceLikeGraphQL ? TSlice["type"] : never;
/**

@@ -19,3 +19,3 @@ * The minimum required properties to represent a Prismic Slice from the Prismic

*/
export declare type SliceLikeRestV2<TSliceType extends string = string> = Pick<Slice<TSliceType>, "id" | "slice_type">;
export type SliceLikeRestV2<TSliceType extends string = string> = Pick<Slice<TSliceType>, "id" | "slice_type">;
/**

@@ -27,3 +27,3 @@ * The minimum required properties to represent a Prismic Slice from the Prismic

*/
export declare type SliceLikeGraphQL<TSliceType extends string = string> = {
export type SliceLikeGraphQL<TSliceType extends string = string> = {
type: Slice<TSliceType>["slice_type"];

@@ -40,3 +40,3 @@ };

*/
export declare type SliceLike<TSliceType extends string = string> = (SliceLikeRestV2<TSliceType> | SliceLikeGraphQL<TSliceType>) & {
export type SliceLike<TSliceType extends string = string> = (SliceLikeRestV2<TSliceType> | SliceLikeGraphQL<TSliceType>) & {
/**

@@ -59,3 +59,3 @@ * If `true`, this Slice has been modified from its original value using a

*/
export declare type SliceZoneLike<TSlice extends SliceLike = SliceLike & Record<string, unknown>> = readonly TSlice[];
export type SliceZoneLike<TSlice extends SliceLike = SliceLike & Record<string, unknown>> = readonly TSlice[];
/**

@@ -69,3 +69,3 @@ * Vue props for a component rendering content from a Prismic Slice using the

*/
export declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
export type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
/**

@@ -97,3 +97,3 @@ * Slice data for this component.

*/
export declare type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
export type DefineComponentSliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
slice: {

@@ -160,3 +160,3 @@ type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;

*/
export declare type SliceComponentType<TSlice extends SliceLike = any, TContext = unknown> = DefineComponent<{}, {}, any> | ReturnType<typeof defineAsyncComponent> | DefineComponent<SliceComponentProps<TSlice, TContext>> | FunctionalComponent<SliceComponentProps<TSlice, TContext>>;
export type SliceComponentType<TSlice extends SliceLike = any, TContext = unknown> = DefineComponent<{}, {}, any> | ReturnType<typeof defineAsyncComponent> | DefineComponent<SliceComponentProps<TSlice, TContext>> | FunctionalComponent<SliceComponentProps<TSlice, TContext>>;
/**

@@ -174,3 +174,5 @@ * This Slice component can be used as a reminder to provide a proper

__isSuspense?: undefined;
} | FunctionalComponent<SliceComponentProps<SliceLike<string>, unknown>, {}, any, {}> | FunctionalComponent<SliceComponentProps<any, unknown>, {}, any, {}>;
} | FunctionalComponent<{
slice: SliceLike;
}, {}, any, {}> | FunctionalComponent<SliceComponentProps<any, unknown>, {}, any, {}>;
/**

@@ -183,3 +185,3 @@ * A record of Slice types mapped to Vue components. Each components will be

*/
export declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
export type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
[SliceType in ExtractSliceType<TSlice>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>>, TContext> | string;

@@ -224,3 +226,3 @@ };

*/
export declare type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
export type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
/**

@@ -251,3 +253,3 @@ * The Slice to resolve to a Vue component..

*/
export declare type SliceZoneResolver<TSlice extends SliceLike = any, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<any, TContext> | string | undefined | null;
export type SliceZoneResolver<TSlice extends SliceLike = any, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<any, TContext> | string | undefined | null;
/**

@@ -258,3 +260,3 @@ * Props for `<SliceZone />`.

*/
export declare type SliceZoneProps<TContext = unknown> = {
export type SliceZoneProps<TContext = unknown> = {
/**

@@ -330,3 +332,3 @@ * List of Slice data from the Slice Zone.

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -365,3 +367,3 @@ required: false;

wrapper: {
type: PropType<string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>>;
type: PropType<string | ConcreteComponent | Raw<DefineComponent>>;
default: undefined;

@@ -375,3 +377,3 @@ required: false;

defaultComponent: SliceComponentType<any, unknown>;
wrapper: string | ConcreteComponent<{}, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any> | Raw<DefineComponent<{}, {}, {}, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>>;
wrapper: string | ConcreteComponent | Raw<DefineComponent>;
}, {}>;

@@ -378,0 +380,0 @@ /**

@@ -25,8 +25,14 @@ import { defineComponent, computed, watchEffect, h, markRaw } from "vue";

name: "TODOSliceComponent",
props: [],
inheritAttrs: false,
setup(_props, { attrs }) {
const type = computed(() => attrs.slice && typeof attrs.slice === "object" ? "slice_type" in attrs.slice ? attrs.slice.slice_type : "type" in attrs.slice ? attrs.slice.type : null : null);
props: {
slice: {
type: Object,
required: true
}
},
setup(props) {
const type = computed(() => {
return "slice_type" in props.slice ? props.slice.slice_type : props.slice.type;
});
watchEffect(() => {
type.value ? console.warn(`[SliceZone] Could not find a component for Slice type "${type.value}"`, attrs.slice) : console.warn("[SliceZone] Could not find a component for mapped Slice", attrs);
console.warn(`[SliceZone] Could not find a component for Slice type "${type.value}"`, props.slice);
});

@@ -36,6 +42,4 @@ return () => {

"data-slice-zone-todo-component": "",
"data-slice-type": type.value ? type.value : null
}, [
type.value ? `Could not find a component for Slice type "${type.value}"` : "Could not find a component for mapped Slice"
]);
"data-slice-type": type.value
}, [`Could not find a component for Slice type "${type.value}"`]);
};

@@ -100,3 +104,3 @@ }

const type = "slice_type" in slice ? slice.slice_type : slice.type;
let component = props.components && type in props.components ? props.components[type] : props.defaultComponent || ((_a = options.components) == null ? void 0 : _a.sliceZoneDefaultComponent) || TODOSliceComponent;
let component = props.components && type in props.components ? props.components[type] : props.defaultComponent || ((_a = options.components) == null ? void 0 : _a.sliceZoneDefaultComponent);
if (props.resolver) {

@@ -113,8 +117,11 @@ const resolvedComponent = props.resolver({

const key = "id" in slice && typeof slice.id === "string" ? slice.id : `${index}-${JSON.stringify(slice)}`;
let p;
if (slice.__mapped) {
const { __mapped, ...mappedProps } = slice;
p = { key, ...mappedProps };
} else {
p = {
if (component) {
if (slice.__mapped) {
const { __mapped, ...mappedProps } = slice;
return h(simplyResolveComponent(component), {
key,
...mappedProps
});
}
return h(simplyResolveComponent(component), {
key,

@@ -125,5 +132,6 @@ slice,

slices: props.slices
};
});
} else {
return h(simplyResolveComponent(TODOSliceComponent), { key, slice });
}
return h(simplyResolveComponent(component), p);
});

@@ -130,0 +138,0 @@ });

@@ -0,0 +0,0 @@ import { PrismicDocument, Query } from "@prismicio/client";

@@ -0,0 +0,0 @@ import type { PrismicPlugin, PrismicPluginOptions } from "./types";

@@ -0,0 +0,0 @@ import type { PrismicPlugin } from "./types";

@@ -0,0 +0,0 @@ export { createPrismic } from "./createPrismic";

@@ -0,0 +0,0 @@ import type { InjectionKey } from "vue";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import { ConcreteComponent, Slots, VNode } from "vue";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import { ConcreteComponent, DefineComponent, Raw, VNode } from "vue";

@@ -7,3 +7,3 @@ import type { ClientConfig, CreateClient, HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer, LinkResolverFunction, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, cookie, documentToLinkField, filter, isFilled } from "@prismicio/client";

*/
declare type PrismicPluginComponentsOptions = {
type PrismicPluginComponentsOptions = {
/**

@@ -84,3 +84,3 @@ * Value of the `rel` attribute to use on links rendered with

*/
declare type PrismicPluginOptionsBase = {
type PrismicPluginOptionsBase = {
/**

@@ -128,3 +128,3 @@ * An optional link resolver function used to resolve links to Prismic

*/
declare type PrismicPluginOptionsWithClient = PrismicPluginOptionsBase & {
type PrismicPluginOptionsWithClient = PrismicPluginOptionsBase & {
/**

@@ -159,3 +159,3 @@ * A `@prismicio/client` instance used to fetch content from a Prismic

*/
declare type PrismicPluginOptionsWithEndpoint = PrismicPluginOptionsBase & {
type PrismicPluginOptionsWithEndpoint = PrismicPluginOptionsBase & {
/**

@@ -231,3 +231,3 @@ * A Prismic repository endpoint to init the plugin's `@prismicio/client`

*/
export declare type PrismicPluginOptions = PrismicPluginOptionsWithClient | PrismicPluginOptionsWithEndpoint;
export type PrismicPluginOptions = PrismicPluginOptionsWithClient | PrismicPluginOptionsWithEndpoint;
/**

@@ -238,3 +238,3 @@ * `@prismicio/client` related methods and properties exposed by

*/
export declare type PrismicPluginClient = {
export type PrismicPluginClient = {
/**

@@ -257,3 +257,3 @@ * A `@prismicio/client` instance.

*/
export declare type PrismicPluginHelpers = {
export type PrismicPluginHelpers = {
/**

@@ -339,3 +339,3 @@ * Serializes a rich text or title field to a plain text string. This is

*/
export declare type PrismicPlugin = {
export type PrismicPlugin = {
/**

@@ -381,3 +381,3 @@ * Options uses to initialize the plugin.

*/
export declare type VueUseOptions<T> = {
export type VueUseOptions<T> = {
[K in keyof T]: Ref<T[K]> | T[K];

@@ -390,5 +390,5 @@ };

*/
export declare type VueUseParameters<T> = {
export type VueUseParameters<T> = {
[K in keyof T]: T extends number ? Ref<T[K]> | T[K] : T[K];
};
export {};

@@ -0,0 +0,0 @@ import { PrismicPlugin } from "./types";

import { Client, ForbiddenError, ParsingError, PrismicError } from "@prismicio/client";
import { Ref } from "vue";
import { PrismicClientComposableState, VueUseParameters } from "./types";
declare type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
declare type ClientMethodLike = (...args: any[]) => Promise<any> | any;
declare type ClientMethods = typeof Client.prototype;
declare type ClientError = PrismicError<unknown> | ParsingError | ForbiddenError;
type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;
type ClientMethodLike = (...args: any[]) => Promise<any> | any;
type ClientMethods = typeof Client.prototype;
type ClientError = PrismicError<unknown> | ParsingError | ForbiddenError;
/**
* @internal
*/
export declare type ClientMethodParameters<TMethodName extends keyof ClientMethods> = ClientMethods[TMethodName] extends ClientMethodLike ? VueUseParameters<Parameters<ClientMethods[TMethodName]>> : never;
export type ClientMethodParameters<TMethodName extends keyof ClientMethods> = ClientMethods[TMethodName] extends ClientMethodLike ? VueUseParameters<Parameters<ClientMethods[TMethodName]>> : never;
/**
* @internal
*/
export declare type ClientMethodReturnType<TMethodName extends keyof ClientMethods> = ClientMethods[TMethodName] extends ClientMethodLike ? ReturnType<ClientMethods[TMethodName]> : never;
export type ClientMethodReturnType<TMethodName extends keyof ClientMethods> = ClientMethods[TMethodName] extends ClientMethodLike ? ReturnType<ClientMethods[TMethodName]> : never;
/**
* @internal
*/
export declare type ComposableOnlyParameters = {
export type ComposableOnlyParameters = {
client?: Ref<Client> | Client;

@@ -28,3 +28,3 @@ };

*/
export declare type ClientComposableReturnType<TData = unknown> = {
export type ClientComposableReturnType<TData = unknown> = {
/**

@@ -31,0 +31,0 @@ * The current state of the composable's client method call.

{
"name": "@prismicio/vue",
"version": "4.2.0",
"version": "4.2.1",
"description": "Vue plugin, components, and composables to fetch and present Prismic content",

@@ -5,0 +5,0 @@ "keywords": [

@@ -257,28 +257,25 @@ import { Slice } from "@prismicio/client";

export const TODOSliceComponent = __PRODUCTION__
? ((() => null) as FunctionalComponent<SliceComponentProps>)
? ((() => null) as FunctionalComponent<{
slice: SliceLike;
}>)
: /*#__PURE__*/ (defineComponent({
name: "TODOSliceComponent",
props: [],
inheritAttrs: false,
setup(_props, { attrs }) {
const type = computed(() =>
attrs.slice && typeof attrs.slice === "object"
? "slice_type" in attrs.slice
? (attrs.slice as Record<string, unknown>).slice_type
: "type" in attrs.slice
? (attrs.slice as Record<string, unknown>).type
: null
: null,
);
props: {
slice: {
type: Object as PropType<SliceLike>,
required: true,
},
},
setup(props) {
const type = computed(() => {
return "slice_type" in props.slice
? props.slice.slice_type
: props.slice.type;
});
watchEffect(() => {
type.value
? console.warn(
`[SliceZone] Could not find a component for Slice type "${type.value}"`,
attrs.slice,
)
: console.warn(
"[SliceZone] Could not find a component for mapped Slice",
attrs,
);
console.warn(
`[SliceZone] Could not find a component for Slice type "${type.value}"`,
props.slice,
);
});

@@ -291,9 +288,5 @@

"data-slice-zone-todo-component": "",
"data-slice-type": type.value ? type.value : null,
"data-slice-type": type.value,
},
[
type.value
? `Could not find a component for Slice type "${type.value}"`
: "Could not find a component for mapped Slice",
],
[`Could not find a component for Slice type "${type.value}"`],
);

@@ -550,4 +543,3 @@ };

: props.defaultComponent ||
options.components?.sliceZoneDefaultComponent ||
TODOSliceComponent;
options.components?.sliceZoneDefaultComponent;

@@ -572,8 +564,13 @@ // TODO: Remove `resolver` in v5 in favor of `components`.

let p;
if (slice.__mapped) {
const { __mapped, ...mappedProps } = slice;
p = { key, ...mappedProps };
} else {
p = {
if (component) {
if (slice.__mapped) {
const { __mapped, ...mappedProps } = slice;
return h(simplyResolveComponent(component as ConcreteComponent), {
key,
...mappedProps,
});
}
return h(simplyResolveComponent(component as ConcreteComponent), {
key,

@@ -584,6 +581,9 @@ slice,

slices: props.slices,
};
});
} else {
return h(
simplyResolveComponent(TODOSliceComponent as ConcreteComponent),
{ key, slice },
);
}
return h(simplyResolveComponent(component as ConcreteComponent), p);
});

@@ -590,0 +590,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc