@prismicio/vue 5.0.0-alpha.0 → 5.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PrismicLink.vue.d.ts +2 -1
- package/dist/PrismicRichText/DeprecatedPrismicRichText.vue.d.ts +5 -4
- package/dist/PrismicRichText/PrismicRichTextDefaultComponent.vue.d.ts +6 -6
- package/dist/SliceZone/SliceZone.vue.cjs.map +1 -1
- package/dist/SliceZone/SliceZone.vue.d.ts +3 -2
- package/dist/SliceZone/SliceZone.vue.js.map +1 -1
- package/dist/lib/Wrapper.vue.d.ts +12 -18
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/types.d.ts +5 -4
- package/package.json +16 -16
- package/src/SliceZone/SliceZone.vue +1 -1
- package/src/types.ts +5 -5
|
@@ -61,11 +61,12 @@ export type PrismicLinkProps = {
|
|
|
61
61
|
field?: never;
|
|
62
62
|
});
|
|
63
63
|
declare function __VLS_template(): {
|
|
64
|
+
attrs: Partial<{}>;
|
|
64
65
|
slots: {
|
|
65
66
|
default?(_: {}): any;
|
|
66
67
|
};
|
|
67
68
|
refs: {};
|
|
68
|
-
|
|
69
|
+
rootEl: any;
|
|
69
70
|
};
|
|
70
71
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
71
72
|
declare const __VLS_component: import('vue').DefineComponent<({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PrismicRichTextProps } from './PrismicRichText.vue';
|
|
2
|
-
|
|
2
|
+
type __VLS_Props = Pick<PrismicRichTextProps, "field" | "linkResolver" | "serializer" | "wrapper"> & {
|
|
3
3
|
fallback?: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
6
|
+
root: unknown;
|
|
7
|
+
}, any>;
|
|
7
8
|
export default _default;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LinkResolverFunction } from '@prismicio/client';
|
|
2
2
|
import { RichTextComponentProps } from './types';
|
|
3
|
+
type __VLS_Props = RichTextComponentProps & {
|
|
4
|
+
linkResolver?: LinkResolverFunction;
|
|
5
|
+
};
|
|
3
6
|
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
4
8
|
slots: {
|
|
5
9
|
default?(_: {}): any;
|
|
6
10
|
default?(_: {}): any;
|
|
@@ -20,14 +24,10 @@ declare function __VLS_template(): {
|
|
|
20
24
|
default?(_: {}): any;
|
|
21
25
|
};
|
|
22
26
|
refs: {};
|
|
23
|
-
|
|
27
|
+
rootEl: any;
|
|
24
28
|
};
|
|
25
29
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
27
|
-
linkResolver?: LinkResolverFunction;
|
|
28
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<RichTextComponentProps & {
|
|
29
|
-
linkResolver?: LinkResolverFunction;
|
|
30
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
32
32
|
export default _default;
|
|
33
33
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceZone.vue.cjs","sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike & Record<string, unknown
|
|
1
|
+
{"version":3,"file":"SliceZone.vue.cjs","sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<SliceZone />` is\n\t * not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst { options } = usePrismic()\n\nconst renderedSlices = computed(() => {\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is =\n\t\t\tprops.components?.[type] ||\n\t\t\tprops.defaultComponent ||\n\t\t\toptions.components?.sliceZoneDefaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<Wrapper v-if=\"slices\" :wrapper=\"wrapper\">\n\t\t<component\n\t\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t\t:is=\"renderedSlice.is\"\n\t\t\t:key=\"renderedSlice.key\"\n\t\t\tv-bind=\"renderedSlice.props\"\n\t\t/>\n\t</Wrapper>\n</template>\n"],"names":["usePrismic","computed","TODOSliceComponent"],"mappings":";;;;;;;;;;;;;;;;AA2DA,UAAM,QAAQ;AAGR,UAAA,EAAE,QAAQ,IAAIA,sBAAW;AAEzB,UAAA,iBAAiBC,IAAAA,SAAS,MAAM;AACrC,aAAO,MAAM,OAAO,IAAI,CAAC,OAAO,UAAU;;AACzC,cAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;AAE9D,cAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,KAAK,IAAI,KAAK,UAAU,KAAK,CAAC;AAE/B,cAAA,OACL,WAAM,eAAN,mBAAmB,UACnB,MAAM,sBACN,aAAQ,eAAR,mBAAoB;AAErB,YAAI,CAAC,IAAI;AACR,iBAAO,EAAE,IAAIC,mBAAA,oBAAoB,KAAK,OAAO,EAAE,QAAQ;AAAA,QAAA;AAGxD,YAAI,MAAM,UAAU;AACnB,gBAAM,EAAE,UAAU,GAAG,YAAA,IAAgB;AAErC,iBAAO,EAAE,IAAI,KAAK,OAAO,YAAY;AAAA,QAAA;AAG/B,eAAA;AAAA,UACN;AAAA,UACA;AAAA,UACA,OAAO;AAAA,YACN;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AAAA,YACf,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEhB;AAAA,MAAA,CACA;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ export type SliceZoneProps<TContext = unknown> = {
|
|
|
9
9
|
/**
|
|
10
10
|
* List of Slice data from the Slice Zone.
|
|
11
11
|
*/
|
|
12
|
-
slices: SliceZoneLike<SliceLike & Record<string, unknown
|
|
12
|
+
slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>;
|
|
13
13
|
/**
|
|
14
14
|
* A record mapping Slice types to Vue components.
|
|
15
15
|
*/
|
|
@@ -36,5 +36,6 @@ export type SliceZoneProps<TContext = unknown> = {
|
|
|
36
36
|
*/
|
|
37
37
|
wrapper?: ComponentOrTagName;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
type __VLS_Props = SliceZoneProps;
|
|
40
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
41
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SliceZone.vue.js","sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike & Record<string, unknown
|
|
1
|
+
{"version":3,"file":"SliceZone.vue.js","sources":["../../src/SliceZone/SliceZone.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { computed } from \"vue\"\n\nimport Wrapper from \"../lib/Wrapper.vue\"\n\nimport type { ComponentOrTagName } from \"../types\"\nimport type {\n\tSliceComponentType,\n\tSliceLike,\n\tSliceZoneComponents,\n\tSliceZoneLike,\n} from \"./types\"\n\nimport { usePrismic } from \"../usePrismic\"\n\nimport { TODOSliceComponent } from \"./TODOSliceComponent\"\n\n/**\n * Props for `<SliceZone />`.\n *\n * @typeParam TContext - Arbitrary data made available to all Slice components\n */\nexport type SliceZoneProps<TContext = unknown> = {\n\t/**\n\t * List of Slice data from the Slice Zone.\n\t */\n\tslices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>\n\n\t/**\n\t * A record mapping Slice types to Vue components.\n\t */\n\tcomponents?: SliceZoneComponents\n\n\t/**\n\t * The Vue component rendered if a component mapping from the `components`\n\t * prop cannot be found.\n\t *\n\t * @remarks\n\t * Components will be rendered using the {@link SliceComponentProps} interface.\n\t *\n\t * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === \"production\"` else {@link TODOSliceComponent}.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tdefaultComponent?: SliceComponentType<any, TContext>\n\n\t/**\n\t * Arbitrary data made available to all Slice components.\n\t */\n\tcontext?: TContext\n\n\t/**\n\t * An HTML tag name or a component used to wrap the output. `<SliceZone />` is\n\t * not wrapped by default.\n\t *\n\t * @defaultValue `\"template\"` (no wrapper)\n\t */\n\twrapper?: ComponentOrTagName\n}\n\nconst props = defineProps<SliceZoneProps>()\ndefineOptions({ name: \"SliceZone\" })\n\nconst { options } = usePrismic()\n\nconst renderedSlices = computed(() => {\n\treturn props.slices.map((slice, index) => {\n\t\tconst type =\n\t\t\t\"slice_type\" in slice ? (slice.slice_type as string) : slice.type\n\n\t\tconst key =\n\t\t\t\"id\" in slice && typeof slice.id === \"string\"\n\t\t\t\t? slice.id\n\t\t\t\t: `${index}-${JSON.stringify(slice)}`\n\n\t\tconst is =\n\t\t\tprops.components?.[type] ||\n\t\t\tprops.defaultComponent ||\n\t\t\toptions.components?.sliceZoneDefaultComponent\n\n\t\tif (!is) {\n\t\t\treturn { is: TODOSliceComponent, key, props: { slice } }\n\t\t}\n\n\t\tif (slice.__mapped) {\n\t\t\tconst { __mapped, ...mappedProps } = slice\n\n\t\t\treturn { is, key, props: mappedProps }\n\t\t}\n\n\t\treturn {\n\t\t\tis,\n\t\t\tkey,\n\t\t\tprops: {\n\t\t\t\tslice,\n\t\t\t\tindex,\n\t\t\t\tcontext: props.context,\n\t\t\t\tslices: props.slices,\n\t\t\t},\n\t\t}\n\t})\n})\n</script>\n\n<template>\n\t<Wrapper v-if=\"slices\" :wrapper=\"wrapper\">\n\t\t<component\n\t\t\tv-for=\"renderedSlice in renderedSlices\"\n\t\t\t:is=\"renderedSlice.is\"\n\t\t\t:key=\"renderedSlice.key\"\n\t\t\tv-bind=\"renderedSlice.props\"\n\t\t/>\n\t</Wrapper>\n</template>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA2DA,UAAM,QAAQ;AAGR,UAAA,EAAE,QAAQ,IAAI,WAAW;AAEzB,UAAA,iBAAiB,SAAS,MAAM;AACrC,aAAO,MAAM,OAAO,IAAI,CAAC,OAAO,UAAU;;AACzC,cAAM,OACL,gBAAgB,QAAS,MAAM,aAAwB,MAAM;AAE9D,cAAM,MACL,QAAQ,SAAS,OAAO,MAAM,OAAO,WAClC,MAAM,KACN,GAAG,KAAK,IAAI,KAAK,UAAU,KAAK,CAAC;AAE/B,cAAA,OACL,WAAM,eAAN,mBAAmB,UACnB,MAAM,sBACN,aAAQ,eAAR,mBAAoB;AAErB,YAAI,CAAC,IAAI;AACR,iBAAO,EAAE,IAAI,oBAAoB,KAAK,OAAO,EAAE,QAAQ;AAAA,QAAA;AAGxD,YAAI,MAAM,UAAU;AACnB,gBAAM,EAAE,UAAU,GAAG,YAAA,IAAgB;AAErC,iBAAO,EAAE,IAAI,KAAK,OAAO,YAAY;AAAA,QAAA;AAG/B,eAAA;AAAA,UACN;AAAA,UACA;AAAA,UACA,OAAO;AAAA,YACN;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AAAA,YACf,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEhB;AAAA,MAAA,CACA;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
import { ComponentOrTagName } from '../types';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/**
|
|
4
|
+
* An HTML tag name or a component used to wrap the output. Output is not
|
|
5
|
+
* wrapped by default.
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue `"template"` (no wrapper)
|
|
8
|
+
*/
|
|
9
|
+
wrapper?: ComponentOrTagName;
|
|
10
|
+
};
|
|
2
11
|
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
3
13
|
slots: {
|
|
4
14
|
default?(_: {}): any;
|
|
5
15
|
default?(_: {}): any;
|
|
6
16
|
};
|
|
7
17
|
refs: {};
|
|
8
|
-
|
|
18
|
+
rootEl: any;
|
|
9
19
|
};
|
|
10
20
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<{
|
|
12
|
-
/**
|
|
13
|
-
* An HTML tag name or a component used to wrap the output. Output is not
|
|
14
|
-
* wrapped by default.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue `"template"` (no wrapper)
|
|
17
|
-
*/
|
|
18
|
-
wrapper?: ComponentOrTagName;
|
|
19
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
20
|
-
/**
|
|
21
|
-
* An HTML tag name or a component used to wrap the output. Output is not
|
|
22
|
-
* wrapped by default.
|
|
23
|
-
*
|
|
24
|
-
* @defaultValue `"template"` (no wrapper)
|
|
25
|
-
*/
|
|
26
|
-
wrapper?: ComponentOrTagName;
|
|
27
|
-
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
22
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
29
23
|
export default _default;
|
|
30
24
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -7,11 +7,10 @@ import type { SliceComponentType } from "./SliceZone";
|
|
|
7
7
|
*/
|
|
8
8
|
type PrismicPluginComponentsOptions = {
|
|
9
9
|
/**
|
|
10
|
-
* The `rel` attribute
|
|
11
|
-
* the link's
|
|
12
|
-
* link's metadata to determine the `rel` value.
|
|
10
|
+
* The `rel` attribute to apply on links. This prop can be provided a function
|
|
11
|
+
* to use the link's metadata to determine the `rel` value.
|
|
13
12
|
*
|
|
14
|
-
* @defaultValue `"noreferrer"`
|
|
13
|
+
* @defaultValue `"noreferrer"` for external links.
|
|
15
14
|
*/
|
|
16
15
|
linkRel?: AsLinkAttrsConfig["rel"];
|
|
17
16
|
/**
|
|
@@ -96,6 +95,8 @@ type PrismicPluginOptionsBase = {
|
|
|
96
95
|
* To provide global components for the `<PrismicRichText />` component, use
|
|
97
96
|
* the `components.richTextComponents` option instead.
|
|
98
97
|
*
|
|
98
|
+
* @deprecated Use `components.richTextComponents` instead.
|
|
99
|
+
*
|
|
99
100
|
* @see HTML serializer documentation {@link https://prismic.io/docs/core-concepts/html-serializer}
|
|
100
101
|
*/
|
|
101
102
|
richTextSerializer?: HTMLRichTextFunctionSerializer | HTMLRichTextMapSerializer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/vue",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.1",
|
|
4
4
|
"description": "Vue plugin, components, and composables to fetch and present Prismic content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -57,39 +57,39 @@
|
|
|
57
57
|
"test": "npm run lint && npm run types && npm run unit && npm run build && npm run size"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@prismicio/client": "^7.
|
|
61
|
-
"esm-env": "^1.2.
|
|
60
|
+
"@prismicio/client": "^7.14.0",
|
|
61
|
+
"esm-env": "^1.2.2",
|
|
62
62
|
"vue-router": "^4.5.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@eslint/js": "^9.
|
|
66
|
-
"@prismicio/mock": "^0.
|
|
65
|
+
"@eslint/js": "^9.18.0",
|
|
66
|
+
"@prismicio/mock": "^0.6.0",
|
|
67
67
|
"@size-limit/preset-small-lib": "^11.1.6",
|
|
68
|
-
"@trivago/prettier-plugin-sort-imports": "^
|
|
68
|
+
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
|
|
69
69
|
"@types/jsdom-global": "^3.0.7",
|
|
70
70
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
71
71
|
"@vitest/coverage-v8": "^2.1.8",
|
|
72
|
-
"@vue/eslint-config-typescript": "^14.
|
|
72
|
+
"@vue/eslint-config-typescript": "^14.2.0",
|
|
73
73
|
"@vue/test-utils": "^2.4.6",
|
|
74
|
-
"eslint": "^9.
|
|
75
|
-
"eslint-config-prettier": "^
|
|
74
|
+
"eslint": "^9.18.0",
|
|
75
|
+
"eslint-config-prettier": "^10.0.1",
|
|
76
76
|
"eslint-plugin-prettier": "^5.2.1",
|
|
77
77
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
78
78
|
"eslint-plugin-vue": "^9.32.0",
|
|
79
|
-
"jsdom": "^
|
|
79
|
+
"jsdom": "^26.0.0",
|
|
80
80
|
"jsdom-global": "^3.0.2",
|
|
81
81
|
"prettier": "^3.4.2",
|
|
82
|
-
"prettier-plugin-jsdoc": "^1.3.
|
|
82
|
+
"prettier-plugin-jsdoc": "^1.3.2",
|
|
83
83
|
"size-limit": "^11.1.6",
|
|
84
84
|
"standard-version": "^9.5.0",
|
|
85
|
-
"typescript": "~5.
|
|
86
|
-
"typescript-eslint": "^8.
|
|
87
|
-
"vite": "^6.0.
|
|
88
|
-
"vite-plugin-dts": "^4.
|
|
85
|
+
"typescript": "~5.7.3",
|
|
86
|
+
"typescript-eslint": "^8.20.0",
|
|
87
|
+
"vite": "^6.0.7",
|
|
88
|
+
"vite-plugin-dts": "^4.5.0",
|
|
89
89
|
"vite-plugin-sdk": "^0.1.3",
|
|
90
90
|
"vitest": "^2.1.8",
|
|
91
91
|
"vue": "^3.5.13",
|
|
92
|
-
"vue-tsc": "^2.
|
|
92
|
+
"vue-tsc": "^2.2.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"vue": "^3.0.0"
|
|
@@ -24,7 +24,7 @@ export type SliceZoneProps<TContext = unknown> = {
|
|
|
24
24
|
/**
|
|
25
25
|
* List of Slice data from the Slice Zone.
|
|
26
26
|
*/
|
|
27
|
-
slices: SliceZoneLike<SliceLike & Record<string, unknown
|
|
27
|
+
slices: SliceZoneLike<SliceLike | (SliceLike & Record<string, unknown>)>
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* A record mapping Slice types to Vue components.
|
package/src/types.ts
CHANGED
|
@@ -19,7 +19,6 @@ import type {
|
|
|
19
19
|
isFilled,
|
|
20
20
|
} from "@prismicio/client"
|
|
21
21
|
import type { App, ConcreteComponent, DefineComponent, Raw, Ref } from "vue"
|
|
22
|
-
|
|
23
22
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
24
23
|
// Imports for @link references:
|
|
25
24
|
import type { RouterLink } from "vue-router"
|
|
@@ -39,11 +38,10 @@ import type {
|
|
|
39
38
|
*/
|
|
40
39
|
type PrismicPluginComponentsOptions = {
|
|
41
40
|
/**
|
|
42
|
-
* The `rel` attribute
|
|
43
|
-
* the link's
|
|
44
|
-
* link's metadata to determine the `rel` value.
|
|
41
|
+
* The `rel` attribute to apply on links. This prop can be provided a function
|
|
42
|
+
* to use the link's metadata to determine the `rel` value.
|
|
45
43
|
*
|
|
46
|
-
* @defaultValue `"noreferrer"`
|
|
44
|
+
* @defaultValue `"noreferrer"` for external links.
|
|
47
45
|
*/
|
|
48
46
|
linkRel?: AsLinkAttrsConfig["rel"]
|
|
49
47
|
|
|
@@ -136,6 +134,8 @@ type PrismicPluginOptionsBase = {
|
|
|
136
134
|
* To provide global components for the `<PrismicRichText />` component, use
|
|
137
135
|
* the `components.richTextComponents` option instead.
|
|
138
136
|
*
|
|
137
|
+
* @deprecated Use `components.richTextComponents` instead.
|
|
138
|
+
*
|
|
139
139
|
* @see HTML serializer documentation {@link https://prismic.io/docs/core-concepts/html-serializer}
|
|
140
140
|
*/
|
|
141
141
|
richTextSerializer?:
|