@prismicio/vue 3.0.0-alpha.4 → 3.0.0-beta.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/index.d.ts CHANGED
@@ -1,10 +1,315 @@
1
1
  import * as vue from 'vue';
2
- import { App, Ref, ConcreteComponent, AllowedComponentProps, ComponentCustomProps, VNodeProps, ComputedRef, PropType, DefineComponent, FunctionalComponent, InjectionKey } from 'vue';
2
+ import { PropType, DefineComponent, FunctionalComponent, VNodeProps, AllowedComponentProps, ComponentCustomProps, ConcreteComponent, App, Ref, ComputedRef, InjectionKey } from 'vue';
3
3
  import * as _prismicio_client from '@prismicio/client';
4
4
  import { Client, ClientConfig, predicate, cookie, PrismicError, ParsingError, ForbiddenError } from '@prismicio/client';
5
5
  import { asText, asHTML, asLink, LinkResolverFunction, asDate, documentToLinkField, HTMLFunctionSerializer, HTMLMapSerializer } from '@prismicio/helpers';
6
6
  import * as _prismicio_types from '@prismicio/types';
7
- import { EmbedField, ImageField, LinkField, PrismicDocument, RichTextField, Slice, Query } from '@prismicio/types';
7
+ import { Slice, EmbedField, ImageField, LinkField, PrismicDocument, RichTextField, Query } from '@prismicio/types';
8
+
9
+ /**
10
+ * The minimum required properties to represent a Prismic Slice for the
11
+ * `<SliceZone />` component.
12
+ *
13
+ * If using Prismic's REST API, use the `Slice` export from `@prismicio/types`
14
+ * for a full interface.
15
+ *
16
+ * @typeParam TSliceType - Type name of the Slice
17
+ */
18
+ declare type SliceLike<TSliceType extends string = string> = Pick<Slice<TSliceType>, "slice_type">;
19
+ /**
20
+ * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
21
+ *
22
+ * If using Prismic's REST API, use the `SliceZone` export from
23
+ * `@prismicio/types` for the full type.
24
+ *
25
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
26
+ */
27
+ declare type SliceZoneLike<TSlice extends SliceLike> = readonly TSlice[];
28
+ /**
29
+ * Vue props for a component rendering content from a Prismic Slice using the
30
+ * `<SliceZone />` component.
31
+ *
32
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
33
+ * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
34
+ * available to all Slice components
35
+ */
36
+ declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
37
+ /**
38
+ * Slice data for this component.
39
+ */
40
+ slice: TSlice;
41
+ /**
42
+ * The index of the Slice in the Slice Zone.
43
+ */
44
+ index: number;
45
+ /**
46
+ * All Slices from the Slice Zone to which the Slice belongs.
47
+ */
48
+ slices: SliceZoneLike<SliceLike>;
49
+ /**
50
+ * Arbitrary data passed to `<SliceZone />` and made available to all Slice components.
51
+ */
52
+ context: TContext;
53
+ };
54
+ /**
55
+ * Native Vue props for a component rendering content from a Prismic Slice using
56
+ * the `<SliceZone />` component.
57
+ *
58
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
59
+ * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
60
+ * available to all Slice components
61
+ */
62
+ declare type DefineComponentSliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
63
+ slice: {
64
+ type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;
65
+ required: true;
66
+ };
67
+ index: {
68
+ type: PropType<SliceComponentProps<TSlice, TContext>["index"]>;
69
+ required: true;
70
+ };
71
+ slices: {
72
+ type: PropType<SliceComponentProps<TSlice, TContext>["slices"]>;
73
+ required: true;
74
+ };
75
+ context: {
76
+ type: PropType<SliceComponentProps<TSlice, TContext>["context"]>;
77
+ required: true;
78
+ };
79
+ };
80
+ /**
81
+ * Gets native Vue props for a component rendering content from a Prismic Slice
82
+ * using the `<SliceZone />` component. Props are: `["slice", "index", "slices",
83
+ * "context"]`
84
+ *
85
+ * @example Defining a new slice component:
86
+ *
87
+ * ```javascript
88
+ * import { getSliceComponentProps } from "@prismicio/vue";
89
+ *
90
+ * export default {
91
+ * props: getSliceComponentProps(),
92
+ * };
93
+ * ```
94
+ *
95
+ * @example Defining a new slice component with visual hint:
96
+ *
97
+ * ```javascript
98
+ * import { getSliceComponentProps } from "@prismicio/vue";
99
+ *
100
+ * export default {
101
+ * props: getSliceComponentProps(["slice", "index", "slices", "context"]),
102
+ * };
103
+ * ```
104
+ *
105
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
106
+ * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
107
+ * available to all Slice components
108
+ * @param propsHint - An optional array of prop names used for the sole purpose
109
+ * of having a visual hint of which props are made available to the slice,
110
+ * this parameters doesn't have any effect
111
+ *
112
+ * @returns Props object to use with {@link defineComponent}
113
+ */
114
+ declare const getSliceComponentProps: <TSlice extends SliceLike<string> = SliceLike<string>, TContext = unknown>(propsHint?: string[] | undefined) => DefineComponentSliceComponentProps<TSlice, TContext>;
115
+ /**
116
+ * A Vue component to be rendered for each instance of its Slice.
117
+ *
118
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
119
+ * @typeParam TContext - Arbitrary data made available to all Slice components
120
+ */
121
+ declare type SliceComponentType<TSlice extends SliceLike = SliceLike, TContext = unknown> = DefineComponent<SliceComponentProps<TSlice, TContext>> | FunctionalComponent<SliceComponentProps<TSlice, TContext>>;
122
+ /**
123
+ * This Slice component can be used as a reminder to provide a proper implementation.
124
+ *
125
+ * This is also the default Vue component rendered when a component mapping
126
+ * cannot be found in `<SliceZone />`.
127
+ */
128
+ declare const TODOSliceComponent: FunctionalComponent<SliceComponentProps<SliceLike<string>, unknown>, {}> | DefineComponent<SliceComponentProps<SliceLike<string>, unknown>, {}, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<SliceComponentProps<SliceLike<string>, unknown>>, {}>;
129
+ /**
130
+ * A record of Slice types mapped to Vue components. Each components will be
131
+ * rendered for each instance of their Slice type.
132
+ *
133
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
134
+ * @typeParam TContext - Arbitrary data made available to all Slice components
135
+ */
136
+ declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
137
+ [SliceType in keyof Record<TSlice["slice_type"], never>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>>, TContext> | string;
138
+ };
139
+ /**
140
+ * Gets an optimized record of Slice types mapped to Vue components. Each
141
+ * components will be rendered for each instance of their Slice type.
142
+ *
143
+ * @remarks
144
+ * This is essentially an helper function to ensure {@link markRaw} is correctly
145
+ * applied on each components, improving performances.
146
+ * @example Defining a slice components:
147
+ *
148
+ * ```javascript
149
+ * import { defineSliceZoneComponents } from "@prismicio/vue";
150
+ *
151
+ * export default {
152
+ * data() {
153
+ * components: defineSliceZoneComponents({
154
+ * foo: Foo,
155
+ * bar: defineAsyncComponent(
156
+ * () => new Promise((res) => res(Bar)),
157
+ * ),
158
+ * baz: "Baz",
159
+ * }),
160
+ * }
161
+ * };
162
+ * ```
163
+ *
164
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
165
+ * @typeParam TContext - Arbitrary data made available to all Slice components
166
+ * @param components - {@link SliceZoneComponents}
167
+ *
168
+ * @returns A new optimized record of {@link SliceZoneComponents}
169
+ */
170
+ declare const defineSliceZoneComponents: <TSlice extends SliceLike<string> = SliceLike<string>, TContext = unknown>(components: SliceZoneComponents<TSlice, TContext>) => SliceZoneComponents<TSlice, TContext>;
171
+ /**
172
+ * Arguments for a `<SliceZone>` `resolver` function.
173
+ */
174
+ declare type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
175
+ /**
176
+ * The Slice to resolve to a Vue component..
177
+ */
178
+ slice: TSlice;
179
+ /**
180
+ * The name of the Slice.
181
+ */
182
+ sliceName: TSlice["slice_type"];
183
+ /**
184
+ * The index of the Slice in the Slice Zone.
185
+ */
186
+ i: number;
187
+ };
188
+ /**
189
+ * A function that determines the rendered Vue component for each Slice in the
190
+ * Slice Zone. If a nullish value is returned, the component will fallback to
191
+ * the `components` or `defaultComponent` props to determine the rendered component.
192
+ *
193
+ * @deprecated Use the `components` prop instead.
194
+ * @param args - Arguments for the resolver function.
195
+ *
196
+ * @returns The Vue component to render for a Slice.
197
+ */
198
+ declare type SliceZoneResolver<TSlice extends SliceLike = SliceLike, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<TSlice, TContext> | string | undefined | null;
199
+ /**
200
+ * Props for `<SliceZone />`.
201
+ *
202
+ * @typeParam TSlice - The type(s) of slices in the Slice Zone
203
+ * @typeParam TContext - Arbitrary data made available to all Slice components
204
+ */
205
+ declare type SliceZoneProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
206
+ /**
207
+ * List of Slice data from the Slice Zone.
208
+ */
209
+ slices: SliceZoneLike<TSlice>;
210
+ /**
211
+ * A record mapping Slice types to Vue components.
212
+ */
213
+ components?: SliceZoneComponents;
214
+ /**
215
+ * A function that determines the rendered Vue component for each Slice in the
216
+ * Slice Zone.
217
+ *
218
+ * @deprecated Use the `components` prop instead.
219
+ * @param args - Arguments for the resolver function.
220
+ *
221
+ * @returns The Vue component to render for a Slice.
222
+ */
223
+ resolver?: SliceZoneResolver<TSlice, TContext>;
224
+ /**
225
+ * Arbitrary data made available to all Slice components.
226
+ */
227
+ context?: TContext;
228
+ /**
229
+ * A component or a functional component rendered if a component mapping from
230
+ * the `components` prop cannot be found.
231
+ *
232
+ * @remarks
233
+ * Components will be rendered using the {@link SliceComponentProps} interface.
234
+ * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === "production"` else {@link TODOSliceComponent}.
235
+ */
236
+ defaultComponent?: SliceComponentType<TSlice, TContext>;
237
+ /**
238
+ * An HTML tag name, a component, or a functional component used to wrap the
239
+ * output. The Slice Zone is not wrapped by default.
240
+ */
241
+ wrapper?: string | ConcreteComponent;
242
+ };
243
+ /**
244
+ * `<SliceZone />` implementation.
245
+ *
246
+ * @internal
247
+ */
248
+ declare const SliceZoneImpl: DefineComponent<{
249
+ slices: {
250
+ type: PropType<SliceZoneLike<SliceLike<string>>>;
251
+ required: true;
252
+ };
253
+ components: {
254
+ type: PropType<SliceZoneComponents<SliceLike<string>, unknown>>;
255
+ default: undefined;
256
+ required: false;
257
+ };
258
+ resolver: {
259
+ type: PropType<SliceZoneResolver<SliceLike<string>, unknown>>;
260
+ default: undefined;
261
+ required: false;
262
+ };
263
+ context: {
264
+ type: null;
265
+ default: undefined;
266
+ required: false;
267
+ };
268
+ defaultComponent: {
269
+ type: PropType<SliceComponentType<SliceLike<string>, unknown>>;
270
+ default: undefined;
271
+ required: false;
272
+ };
273
+ wrapper: {
274
+ type: PropType<string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions>>;
275
+ default: undefined;
276
+ required: false;
277
+ };
278
+ }, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
279
+ [key: string]: any;
280
+ }> | vue.VNode<vue.RendererNode, vue.RendererElement, {
281
+ [key: string]: any;
282
+ }>[]), unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
283
+ slices?: unknown;
284
+ components?: unknown;
285
+ resolver?: unknown;
286
+ context?: unknown;
287
+ defaultComponent?: unknown;
288
+ wrapper?: unknown;
289
+ } & {
290
+ slices: SliceZoneLike<SliceLike<string>>;
291
+ } & {
292
+ wrapper?: string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions> | undefined;
293
+ context?: any;
294
+ components?: SliceZoneComponents<SliceLike<string>, unknown> | undefined;
295
+ resolver?: SliceZoneResolver<SliceLike<string>, unknown> | undefined;
296
+ defaultComponent?: SliceComponentType<SliceLike<string>, unknown> | undefined;
297
+ }>, {
298
+ wrapper: string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions>;
299
+ context: any;
300
+ components: SliceZoneComponents<SliceLike<string>, unknown>;
301
+ resolver: SliceZoneResolver<SliceLike<string>, unknown>;
302
+ defaultComponent: SliceComponentType<SliceLike<string>, unknown>;
303
+ }>;
304
+ /**
305
+ * Component to render a Prismic Slice Zone.
306
+ *
307
+ * @see Component props {@link SliceZoneProps}
308
+ * @see Templating Slice Zones {@link https://prismic.io/docs/technologies/vue-template-content#slices-and-groups}
309
+ */
310
+ declare const SliceZone: new () => {
311
+ $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & SliceZoneProps;
312
+ };
8
313
 
9
314
  /**
10
315
  * Options used by `@prismicio/vue` components.
@@ -60,7 +365,7 @@ declare type PrismicPluginComponentsOptions = {
60
365
  * Components will be rendered using the {@link SliceComponentProps} interface.
61
366
  * @defaultValue `null` when `process.env.NODE_ENV === "production"` else {@link TODOSliceComponent}
62
367
  */
63
- sliceZoneDefaultComponent?: string | ConcreteComponent;
368
+ sliceZoneDefaultComponent?: SliceComponentType;
64
369
  };
65
370
  /**
66
371
  * Common options supported by `@prismicio/vue` plugin.
@@ -370,23 +675,6 @@ declare const PrismicEmbed: new () => {
370
675
  * Props for `<PrismicImage />`.
371
676
  */
372
677
  declare type PrismicImageProps = {
373
- /**
374
- * The Prismic image field to render.
375
- */
376
- field: ImageField;
377
- /**
378
- * Ensures type union is a strict or.
379
- *
380
- * @internal
381
- */
382
- imageComponent?: never;
383
- /**
384
- * Ensures type union is a strict or.
385
- *
386
- * @internal
387
- */
388
- imageComponentAdditionalProps?: never;
389
- } | {
390
678
  /**
391
679
  * The Prismic image field to render.
392
680
  */
@@ -400,10 +688,10 @@ declare type PrismicImageProps = {
400
688
  * additional `copyright` props.
401
689
  * @defaultValue The one provided to `@prismicio/vue` plugin if configured, `"img"` otherwise.
402
690
  */
403
- imageComponent: string | ConcreteComponent;
691
+ imageComponent?: string | ConcreteComponent;
404
692
  /**
405
- * A map of additional props to pass to the component used to render
406
- * images when using one.
693
+ * A map of additional props to pass to the component used to render images
694
+ * when using one.
407
695
  */
408
696
  imageComponentAdditionalProps?: Record<string, unknown>;
409
697
  };
@@ -436,17 +724,17 @@ declare type PrismicLinkProps = {
436
724
  /**
437
725
  * An explicit `target` attribute to apply to the rendered link.
438
726
  */
439
- target?: string;
727
+ target?: string | null;
440
728
  /**
441
729
  * An explicit `rel` attribute to apply to the rendered link.
442
730
  */
443
- rel?: string;
731
+ rel?: string | null;
444
732
  /**
445
733
  * Value of the `rel` attribute to use on links rendered with `target="_blank"`.
446
734
  *
447
735
  * @defaultValue The one provided to `@prismicio/vue` plugin if configured, `"noopener noreferrer"` otherwise.
448
736
  */
449
- blankTargetRelAttribute?: string;
737
+ blankTargetRelAttribute?: string | null;
450
738
  /**
451
739
  * An HTML tag name, a component, or a functional component used to render
452
740
  * internal links.
@@ -521,373 +809,116 @@ declare const PrismicLink: new () => {
521
809
  * Props for `<PrismicText />`.
522
810
  */
523
811
  declare type PrismicTextProps = {
524
- /**
525
- * The Prismic rich text or title field to render.
526
- */
527
- field: RichTextField;
528
- /**
529
- * Separator used to join each element.
530
- *
531
- * @defaultValue `" "` (a space)
532
- */
533
- separator?: string;
534
- /**
535
- * An HTML tag name, a component, or a functional component used to wrap the output.
536
- *
537
- * @defaultValue `"div"`
538
- */
539
- wrapper?: string | ConcreteComponent;
540
- };
541
- /**
542
- * Options for {@link usePrismicText}.
543
- */
544
- declare type UsePrismicTextOptions = VueUseOptions<Omit<PrismicTextProps, "wrapper">>;
545
- /**
546
- * Return type of {@link usePrismicText}.
547
- */
548
- declare type UsePrismicTextReturnType = {
549
- /**
550
- * Serialized rich text field as plain text.
551
- */
552
- text: ComputedRef<string>;
553
- };
554
- /**
555
- * A low level composable that returns a serialized rich text field as plain text.
556
- *
557
- * @param props - {@link UsePrismicTextOptions}
558
- *
559
- * @returns - Serialized rich text field as plain text {@link UsePrismicTextReturnType}
560
- */
561
- declare const usePrismicText: (props: UsePrismicTextOptions) => UsePrismicTextReturnType;
562
- /**
563
- * Component to render a Prismic rich text field as plain text.
564
- *
565
- * @see Component props {@link PrismicTextProps}
566
- * @see Templating rich text and title fields {@link https://prismic.io/docs/technologies/vue-template-content#rich-text-and-titles}
567
- */
568
- declare const PrismicText: new () => {
569
- $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & PrismicTextProps;
570
- };
571
-
572
- /**
573
- * Props for `<PrismicRichText />`.
574
- */
575
- declare type PrismicRichTextProps = {
576
- /**
577
- * The Prismic rich text or title field to render.
578
- */
579
- field: RichTextField;
580
- /**
581
- * A link resolver function used to resolve link when not using the route
582
- * resolver parameter with `@prismicio/client`.
583
- *
584
- * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
585
- * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
586
- */
587
- linkResolver?: LinkResolverFunction;
588
- /**
589
- * An HTML serializer to customize the way rich text fields are rendered.
590
- *
591
- * @defaultValue The HTML serializer provided to `@prismicio/vue` plugin if configured.
592
- * @see HTML serializer documentation {@link https://prismic.io/docs/core-concepts/html-serializer}
593
- */
594
- htmlSerializer?: HTMLFunctionSerializer | HTMLMapSerializer;
595
- /**
596
- * An HTML tag name, a component, or a functional component used to wrap the output.
597
- *
598
- * @defaultValue `"div"`
599
- */
600
- wrapper?: string | ConcreteComponent;
601
- };
602
- /**
603
- * Options for {@link usePrismicRichText}.
604
- */
605
- declare type UsePrismicRichTextOptions = VueUseOptions<Omit<PrismicRichTextProps, "wrapper">>;
606
- /**
607
- * Return type of {@link usePrismicRichText}.
608
- */
609
- declare type UsePrismicRichTextReturnType = {
610
- /**
611
- * Serialized rich text field as HTML.
612
- */
613
- html: ComputedRef<string>;
614
- };
615
- /**
616
- * A low level composable that returns a serialized rich text field as HTML.
617
- *
618
- * @param props - {@link UsePrismicRichTextOptions}
619
- *
620
- * @returns - Serialized rich text field as HTML {@link UsePrismicRichTextReturnType}
621
- */
622
- declare const usePrismicRichText: (props: UsePrismicRichTextOptions) => UsePrismicRichTextReturnType;
623
- /**
624
- * Component to render a Prismic rich text field as HTML.
625
- *
626
- * @see Component props {@link PrismicRichTextProps}
627
- * @see Templating rich text and title fields {@link https://prismic.io/docs/technologies/vue-template-content#rich-text-and-titles}
628
- */
629
- declare const PrismicRichText: new () => {
630
- $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & PrismicRichTextProps;
631
- };
632
-
633
- /**
634
- * The minimum required properties to represent a Prismic Slice for the
635
- * `<SliceZone />` component.
636
- *
637
- * If using Prismic's REST API, use the `Slice` export from `@prismicio/types`
638
- * for a full interface.
639
- *
640
- * @typeParam TSliceType - Type name of the Slice
641
- */
642
- declare type SliceLike<TSliceType extends string = string> = Pick<Slice<TSliceType>, "slice_type">;
643
- /**
644
- * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
645
- *
646
- * If using Prismic's REST API, use the `SliceZone` export from
647
- * `@prismicio/types` for the full type.
648
- *
649
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
650
- */
651
- declare type SliceZoneLike<TSlice extends SliceLike> = readonly TSlice[];
652
- /**
653
- * Vue props for a component rendering content from a Prismic Slice using the
654
- * `<SliceZone />` component.
655
- *
656
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
657
- * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
658
- * available to all Slice components
659
- */
660
- declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
661
- /**
662
- * Slice data for this component.
663
- */
664
- slice: TSlice;
665
- /**
666
- * The index of the Slice in the Slice Zone.
667
- */
668
- index: number;
669
- /**
670
- * All Slices from the Slice Zone to which the Slice belongs.
671
- */
672
- slices: SliceZoneLike<SliceLike>;
673
- /**
674
- * Arbitrary data passed to `<SliceZone />` and made available to all Slice components.
675
- */
676
- context: TContext;
677
- };
678
- /**
679
- * Native Vue props for a component rendering content from a Prismic Slice using
680
- * the `<SliceZone />` component.
681
- *
682
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
683
- * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
684
- * available to all Slice components
685
- */
686
- declare type DefineComponentSliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
687
- slice: {
688
- type: PropType<SliceComponentProps<TSlice, TContext>["slice"]>;
689
- required: true;
690
- };
691
- index: {
692
- type: PropType<SliceComponentProps<TSlice, TContext>["index"]>;
693
- required: true;
694
- };
695
- slices: {
696
- type: PropType<SliceComponentProps<TSlice, TContext>["slices"]>;
697
- required: true;
698
- };
699
- context: {
700
- type: PropType<SliceComponentProps<TSlice, TContext>["context"]>;
701
- required: true;
702
- };
703
- };
704
- /**
705
- * Gets native Vue props for a component rendering content from a Prismic Slice
706
- * using the `<SliceZone />` component. Props are: `["slice", "index", "slices",
707
- * "context"]`
708
- *
709
- * @example Defining a new slice component:
710
- *
711
- * ```javascript
712
- * import { getSliceComponentProps } from "@prismicio/vue";
713
- *
714
- * export default {
715
- * props: getSliceComponentProps(),
716
- * };
717
- * ```
718
- *
719
- * @example Defining a new slice component with visual hint:
720
- *
721
- * ```javascript
722
- * import { getSliceComponentProps } from "@prismicio/vue";
723
- *
724
- * export default {
725
- * props: getSliceComponentProps(["slice", "index", "slices", "context"]),
726
- * };
727
- * ```
728
- *
729
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
730
- * @typeParam TContext - Arbitrary data passed to `<SliceZone />` and made
731
- * available to all Slice components
732
- * @param propsHint - An optional array of prop names used for the sole purpose
733
- * of having a visual hint of which props are made available to the slice,
734
- * this parameters doesn't have any effect
735
- *
736
- * @returns Props object to use with {@link defineComponent}
737
- */
738
- declare const getSliceComponentProps: <TSlice extends SliceLike<string> = SliceLike<string>, TContext = unknown>(propsHint?: string[] | undefined) => DefineComponentSliceComponentProps<TSlice, TContext>;
739
- /**
740
- * A Vue component to be rendered for each instance of its Slice.
741
- *
742
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
743
- * @typeParam TContext - Arbitrary data made available to all Slice components
744
- */
745
- declare type SliceComponentType<TSlice extends SliceLike = SliceLike, TContext = unknown> = DefineComponent<SliceComponentProps<TSlice, TContext>> | FunctionalComponent<SliceComponentProps<TSlice, TContext>>;
812
+ /**
813
+ * The Prismic rich text or title field to render.
814
+ */
815
+ field: RichTextField;
816
+ /**
817
+ * Separator used to join each element.
818
+ *
819
+ * @defaultValue `" "` (a space)
820
+ */
821
+ separator?: string;
822
+ /**
823
+ * An HTML tag name, a component, or a functional component used to wrap the output.
824
+ *
825
+ * @defaultValue `"div"`
826
+ */
827
+ wrapper?: string | ConcreteComponent;
828
+ };
746
829
  /**
747
- * This Slice component can be used as a reminder to provide a proper implementation.
748
- *
749
- * This is also the default Vue component rendered when a component mapping
750
- * cannot be found in `<SliceZone />`.
830
+ * Options for {@link usePrismicText}.
751
831
  */
752
- declare const TODOSliceComponent: FunctionalComponent<SliceComponentProps<SliceLike<string>, unknown>, {}> | DefineComponent<SliceComponentProps<SliceLike<string>, unknown>, {}, {}, vue.ComputedOptions, vue.MethodOptions, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<SliceComponentProps<SliceLike<string>, unknown>>, {}>;
832
+ declare type UsePrismicTextOptions = VueUseOptions<Omit<PrismicTextProps, "wrapper">>;
753
833
  /**
754
- * A record of Slice types mapped to Vue components. Each components will be
755
- * rendered for each instance of their Slice type.
756
- *
757
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
758
- * @typeParam TContext - Arbitrary data made available to all Slice components
834
+ * Return type of {@link usePrismicText}.
759
835
  */
760
- declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
761
- [SliceType in keyof Record<TSlice["slice_type"], never>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>>, TContext> | string;
836
+ declare type UsePrismicTextReturnType = {
837
+ /**
838
+ * Serialized rich text field as plain text.
839
+ */
840
+ text: ComputedRef<string>;
762
841
  };
763
842
  /**
764
- * Gets an optimized record of Slice types mapped to Vue components. Each
765
- * components will be rendered for each instance of their Slice type.
766
- *
767
- * @remarks
768
- * This is essentially an helper function to ensure {@link markRaw} is correctly
769
- * applied on each components, improving performances.
770
- * @example Defining a slice components:
771
- *
772
- * ```javascript
773
- * import { getSliceZoneComponents } from "@prismicio/vue";
774
- *
775
- * export default {
776
- * data() {
777
- * components: getSliceZoneComponents({
778
- * foo: Foo,
779
- * bar: defineAsyncComponent(
780
- * () => new Promise((res) => res(Bar)),
781
- * ),
782
- * baz: "Baz",
783
- * }),
784
- * }
785
- * };
786
- * ```
843
+ * A low level composable that returns a serialized rich text field as plain text.
787
844
  *
788
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
789
- * @typeParam TContext - Arbitrary data made available to all Slice components
790
- * @param components - {@link SliceZoneComponents}
845
+ * @param props - {@link UsePrismicTextOptions}
791
846
  *
792
- * @returns A new optimized record of {@link SliceZoneComponents}
847
+ * @returns - Serialized rich text field as plain text {@link UsePrismicTextReturnType}
793
848
  */
794
- declare const getSliceZoneComponents: <TSlice extends SliceLike<string> = SliceLike<string>, TContext = unknown>(components: SliceZoneComponents<TSlice, TContext>) => SliceZoneComponents<TSlice, TContext>;
849
+ declare const usePrismicText: (props: UsePrismicTextOptions) => UsePrismicTextReturnType;
795
850
  /**
796
- * Props for `<SliceZone />`.
851
+ * Component to render a Prismic rich text field as plain text.
797
852
  *
798
- * @typeParam TSlice - The type(s) of slices in the Slice Zone
799
- * @typeParam TContext - Arbitrary data made available to all Slice components
853
+ * @see Component props {@link PrismicTextProps}
854
+ * @see Templating rich text and title fields {@link https://prismic.io/docs/technologies/vue-template-content#rich-text-and-titles}
800
855
  */
801
- declare type SliceZoneProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
856
+ declare const PrismicText: new () => {
857
+ $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & PrismicTextProps;
858
+ };
859
+
860
+ /**
861
+ * Props for `<PrismicRichText />`.
862
+ */
863
+ declare type PrismicRichTextProps = {
802
864
  /**
803
- * List of Slice data from the Slice Zone.
865
+ * The Prismic rich text or title field to render.
804
866
  */
805
- slices: SliceZoneLike<TSlice>;
867
+ field: RichTextField;
806
868
  /**
807
- * A record mapping Slice types to Vue components.
869
+ * A link resolver function used to resolve link when not using the route
870
+ * resolver parameter with `@prismicio/client`.
871
+ *
872
+ * @defaultValue The link resolver provided to `@prismicio/vue` plugin if configured.
873
+ * @see Link resolver documentation {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver#link-resolver}
808
874
  */
809
- components: SliceZoneComponents;
875
+ linkResolver?: LinkResolverFunction;
810
876
  /**
811
- * Arbitrary data made available to all Slice components.
877
+ * An HTML serializer to customize the way rich text fields are rendered.
878
+ *
879
+ * @defaultValue The HTML serializer provided to `@prismicio/vue` plugin if configured.
880
+ * @see HTML serializer documentation {@link https://prismic.io/docs/core-concepts/html-serializer}
812
881
  */
813
- context?: TContext;
882
+ htmlSerializer?: HTMLFunctionSerializer | HTMLMapSerializer;
814
883
  /**
815
- * A component or a functional component rendered if a component mapping from
816
- * the `components` prop cannot be found.
884
+ * An HTML tag name, a component, or a functional component used to wrap the output.
817
885
  *
818
- * @remarks
819
- * Components will be rendered using the {@link SliceComponentProps} interface.
820
- * @defaultValue The Slice Zone default component provided to `@prismicio/vue` plugin if configured, otherwise `null` when `process.env.NODE_ENV === "production"` else {@link TODOSliceComponent}.
886
+ * @defaultValue `"div"`
821
887
  */
822
- defaultComponent?: SliceComponentType<TSlice, TContext>;
888
+ wrapper?: string | ConcreteComponent;
889
+ };
890
+ /**
891
+ * Options for {@link usePrismicRichText}.
892
+ */
893
+ declare type UsePrismicRichTextOptions = VueUseOptions<Omit<PrismicRichTextProps, "wrapper">>;
894
+ /**
895
+ * Return type of {@link usePrismicRichText}.
896
+ */
897
+ declare type UsePrismicRichTextReturnType = {
823
898
  /**
824
- * An HTML tag name, a component, or a functional component used to wrap the
825
- * output. The Slice Zone is not wrapped by default.
899
+ * Serialized rich text field as HTML.
826
900
  */
827
- wrapper?: string | ConcreteComponent;
901
+ html: ComputedRef<string>;
828
902
  };
829
903
  /**
830
- * `<SliceZone />` implementation.
904
+ * A low level composable that returns a serialized rich text field as HTML.
831
905
  *
832
- * @internal
906
+ * @param props - {@link UsePrismicRichTextOptions}
907
+ *
908
+ * @returns - Serialized rich text field as HTML {@link UsePrismicRichTextReturnType}
833
909
  */
834
- declare const SliceZoneImpl: DefineComponent<{
835
- slices: {
836
- type: PropType<SliceZoneLike<SliceLike<string>>>;
837
- required: true;
838
- };
839
- components: {
840
- type: PropType<SliceZoneComponents<SliceLike<string>, unknown>>;
841
- required: true;
842
- };
843
- context: {
844
- type: null;
845
- default: undefined;
846
- required: false;
847
- };
848
- defaultComponent: {
849
- type: PropType<SliceComponentType<SliceLike<string>, unknown>>;
850
- default: undefined;
851
- required: false;
852
- };
853
- wrapper: {
854
- type: PropType<string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions>>;
855
- default: undefined;
856
- required: false;
857
- };
858
- }, (() => null) | (() => vue.VNode<vue.RendererNode, vue.RendererElement, {
859
- [key: string]: any;
860
- }> | vue.VNode<vue.RendererNode, vue.RendererElement, {
861
- [key: string]: any;
862
- }>[]), unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<{
863
- slices?: unknown;
864
- components?: unknown;
865
- context?: unknown;
866
- defaultComponent?: unknown;
867
- wrapper?: unknown;
868
- } & {
869
- slices: SliceZoneLike<SliceLike<string>>;
870
- components: SliceZoneComponents<SliceLike<string>, unknown>;
871
- } & {
872
- wrapper?: string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions> | undefined;
873
- context?: any;
874
- defaultComponent?: SliceComponentType<SliceLike<string>, unknown> | undefined;
875
- }>, {
876
- wrapper: string | ConcreteComponent<{}, any, any, vue.ComputedOptions, vue.MethodOptions>;
877
- context: any;
878
- defaultComponent: SliceComponentType<SliceLike<string>, unknown>;
879
- }>;
910
+ declare const usePrismicRichText: (props: UsePrismicRichTextOptions) => UsePrismicRichTextReturnType;
880
911
  /**
881
- * Component to render a Prismic Slice Zone.
912
+ * Component to render a Prismic rich text field as HTML.
882
913
  *
883
- * @see Component props {@link SliceZoneProps}
884
- * @see Templating Slice Zones {@link https://prismic.io/docs/technologies/vue-template-content#slices-and-groups}
914
+ * @see Component props {@link PrismicRichTextProps}
915
+ * @see Templating rich text and title fields {@link https://prismic.io/docs/technologies/vue-template-content#rich-text-and-titles}
885
916
  */
886
- declare const SliceZone: new () => {
887
- $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & SliceZoneProps;
917
+ declare const PrismicRichText: new () => {
918
+ $props: AllowedComponentProps & ComponentCustomProps & VNodeProps & PrismicRichTextProps;
888
919
  };
889
920
 
890
- declare type ClientError = PrismicError | ParsingError | ForbiddenError;
921
+ declare type ClientError = PrismicError<unknown> | ParsingError | ForbiddenError;
891
922
  /**
892
923
  * @internal
893
924
  */
@@ -943,21 +974,6 @@ declare const usePrismicDocuments: <TDocument extends PrismicDocument<Record<str
943
974
  * @see Underlying `@prismicio/client` method {@link Client.getFirst}
944
975
  */
945
976
  declare const useFirstPrismicDocument: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
946
- /**
947
- * A composable that queries content from the Prismic repository and returns all
948
- * matching content. If no predicates are provided, all documents will be fetched.
949
- *
950
- * @remarks
951
- * An additional `@prismicio/client` instance can be provided at `params.client`.
952
- * @typeParam TDocument - Type of Prismic documents returned
953
- * @param params - Parameters to filter and sort results
954
- *
955
- * @returns The composable payload {@link ClientComposableReturnType}
956
- * @see Underlying `@prismicio/client` method {@link Client.getAll}
957
- */
958
- declare const useAllPrismicDocuments: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
959
- limit?: number | undefined;
960
- } & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
961
977
  /**
962
978
  * A composable that queries a document from the Prismic repository with a specific ID.
963
979
  *
@@ -1012,6 +1028,34 @@ declare const useAllPrismicDocumentsByIDs: <TDocument extends PrismicDocument<Re
1012
1028
  * @see Underlying `@prismicio/client` method {@link Client.getByUID}
1013
1029
  */
1014
1030
  declare const usePrismicDocumentByUID: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument>;
1031
+ /**
1032
+ * A composable that queries documents from the Prismic repository with specific UIDs.
1033
+ *
1034
+ * @remarks
1035
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1036
+ * @typeParam TDocument - Type of Prismic documents returned
1037
+ * @param documentType - The API ID of the document's Custom Type
1038
+ * @param uids - A list of document UIDs
1039
+ * @param params - Parameters to filter, sort, and paginate results
1040
+ *
1041
+ * @returns The composable payload {@link ClientComposableReturnType}
1042
+ * @see Underlying `@prismicio/client` method {@link Client.getByIDs}
1043
+ */
1044
+ declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
1045
+ /**
1046
+ * A composable that queries all documents from the Prismic repository with specific UIDs.
1047
+ *
1048
+ * @remarks
1049
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1050
+ * @typeParam TDocument - Type of Prismic documents returned
1051
+ * @param documentType - The API ID of the document's Custom Type
1052
+ * @param uids - A list of document UIDs
1053
+ * @param params - Parameters to filter and sort results
1054
+ *
1055
+ * @returns The composable payload {@link ClientComposableReturnType}
1056
+ * @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
1057
+ */
1058
+ declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(documentType: string, ids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1015
1059
  /**
1016
1060
  * A composable that queries a singleton document from the Prismic repository
1017
1061
  * for a specific Custom Type.
@@ -1082,7 +1126,36 @@ declare const usePrismicDocumentsByTag: <TDocument extends PrismicDocument<Recor
1082
1126
  */
1083
1127
  declare const useAllPrismicDocumentsByTag: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1084
1128
  /**
1085
- * A composable that queries documents from the Prismic repository with specific tags.
1129
+ * A composable that queries documents from the Prismic repository with specific
1130
+ * tags. A document must be tagged with all of the queried tags to be included.
1131
+ *
1132
+ * @remarks
1133
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1134
+ * @typeParam TDocument - Type of Prismic documents returned
1135
+ * @param tags - A list of tags that must be included on a document
1136
+ * @param params - Parameters to filter, sort, and paginate results
1137
+ *
1138
+ * @returns The composable payload {@link ClientComposableReturnType}
1139
+ * @see Underlying `@prismicio/client` method {@link Client.getByTags}
1140
+ */
1141
+ declare const usePrismicDocumentsByEveryTag: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
1142
+ /**
1143
+ * A composable that queries all documents from the Prismic repository with
1144
+ * specific tags. A document must be tagged with all of the queried tags to be included.
1145
+ *
1146
+ * @remarks
1147
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1148
+ * @typeParam TDocument - Type of Prismic documents returned
1149
+ * @param tags - A list of tags that must be included on a document
1150
+ * @param params - Parameters to filter and sort results
1151
+ *
1152
+ * @returns The composable payload {@link ClientComposableReturnType}
1153
+ * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
1154
+ */
1155
+ declare const useAllPrismicDocumentsByEveryTag: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1156
+ /**
1157
+ * A composable that queries documents from the Prismic repository with specific
1158
+ * tags. A document must be tagged with at least one of the queried tags to be included.
1086
1159
  *
1087
1160
  * @remarks
1088
1161
  * An additional `@prismicio/client` instance can be provided at `params.client`.
@@ -1093,9 +1166,11 @@ declare const useAllPrismicDocumentsByTag: <TDocument extends PrismicDocument<Re
1093
1166
  * @returns The composable payload {@link ClientComposableReturnType}
1094
1167
  * @see Underlying `@prismicio/client` method {@link Client.getByTags}
1095
1168
  */
1096
- declare const usePrismicDocumentsByTags: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
1169
+ declare const usePrismicDocumentsBySomeTags: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<Query<TDocument>>;
1097
1170
  /**
1098
- * A composable that queries all documents from the Prismic repository with specific tags.
1171
+ * A composable that queries all documents from the Prismic repository with
1172
+ * specific tags. A document must be tagged with at least one of the queried
1173
+ * tags to be included.
1099
1174
  *
1100
1175
  * @remarks
1101
1176
  * An additional `@prismicio/client` instance can be provided at `params.client`.
@@ -1106,7 +1181,26 @@ declare const usePrismicDocumentsByTags: <TDocument extends PrismicDocument<Reco
1106
1181
  * @returns The composable payload {@link ClientComposableReturnType}
1107
1182
  * @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
1108
1183
  */
1109
- declare const useAllPrismicDocumentsByTags: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1184
+ declare const useAllPrismicDocumentsBySomeTags: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(tags: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1185
+ /**
1186
+ * **IMPORTANT**: Avoid using `dangerouslyUseAllPrismicDocuments` as it may be
1187
+ * slower and require more resources than other composables. Prefer using other
1188
+ * composables that filter by predicates such as `useAllPrismicDocumentsByType`.
1189
+ *
1190
+ * A composable that queries content from the Prismic repository and returns all
1191
+ * matching content. If no predicates are provided, all documents will be fetched.
1192
+ *
1193
+ * @remarks
1194
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1195
+ * @typeParam TDocument - Type of Prismic documents returned
1196
+ * @param params - Parameters to filter and sort results
1197
+ *
1198
+ * @returns The composable payload {@link ClientComposableReturnType}
1199
+ * @see Underlying `@prismicio/client` method {@link Client.getAll}
1200
+ */
1201
+ declare const dangerouslyUseAllPrismicDocuments: <TDocument extends PrismicDocument<Record<string, _prismicio_types.AnyRegularField | _prismicio_types.GroupField<Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SliceZone<_prismicio_types.Slice<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>> | _prismicio_types.SharedSlice<string, _prismicio_types.SharedSliceVariation<string, Record<string, _prismicio_types.AnyRegularField>, Record<string, _prismicio_types.AnyRegularField>>>>>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1202
+ limit?: number | undefined;
1203
+ } & ComposableOnlyParameters) | undefined) => ClientComposableReturnType<TDocument[]>;
1110
1204
 
1111
1205
  /**
1112
1206
  * `@prismicio/vue` plugin interface interface location used for {@link usePrismic}.
@@ -1126,4 +1220,4 @@ declare module "@vue/runtime-core" {
1126
1220
  }
1127
1221
  }
1128
1222
 
1129
- export { ClientComposableReturnType, DefineComponentSliceComponentProps, PrismicClientComposableState, PrismicEmbed, PrismicEmbedProps, PrismicImage, PrismicImageProps, PrismicLink, PrismicLinkProps, PrismicPlugin, PrismicPluginOptions, PrismicRichText, PrismicRichTextProps, PrismicText, PrismicTextProps, SliceComponentProps, SliceComponentType, SliceLike, SliceZone, SliceZoneComponents, SliceZoneImpl, SliceZoneLike, SliceZoneProps, TODOSliceComponent, UsePrismicLinkOptions, UsePrismicRichTextOptions, UsePrismicTextOptions, createPrismic, getSliceComponentProps, getSliceZoneComponents, prismicKey, useAllPrismicDocuments, useAllPrismicDocumentsByIDs, useAllPrismicDocumentsByTag, useAllPrismicDocumentsByTags, useAllPrismicDocumentsByType, useFirstPrismicDocument, usePrismic, usePrismicDocumentByID, usePrismicDocumentByUID, usePrismicDocuments, usePrismicDocumentsByIDs, usePrismicDocumentsByTag, usePrismicDocumentsByTags, usePrismicDocumentsByType, usePrismicLink, usePrismicRichText, usePrismicText, useSinglePrismicDocument };
1223
+ export { ClientComposableReturnType, DefineComponentSliceComponentProps, PrismicClientComposableState, PrismicEmbed, PrismicEmbedProps, PrismicImage, PrismicImageProps, PrismicLink, PrismicLinkProps, PrismicPlugin, PrismicPluginOptions, PrismicRichText, PrismicRichTextProps, PrismicText, PrismicTextProps, SliceComponentProps, SliceComponentType, SliceLike, SliceZone, SliceZoneComponents, SliceZoneImpl, SliceZoneLike, SliceZoneProps, SliceZoneResolver, TODOSliceComponent, UsePrismicLinkOptions, UsePrismicRichTextOptions, UsePrismicTextOptions, createPrismic, dangerouslyUseAllPrismicDocuments, defineSliceZoneComponents, getSliceComponentProps, prismicKey, useAllPrismicDocumentsByEveryTag, useAllPrismicDocumentsByIDs, useAllPrismicDocumentsBySomeTags, useAllPrismicDocumentsByTag, useAllPrismicDocumentsByType, useAllPrismicDocumentsByUIDs, useFirstPrismicDocument, usePrismic, usePrismicDocumentByID, usePrismicDocumentByUID, usePrismicDocuments, usePrismicDocumentsByEveryTag, usePrismicDocumentsByIDs, usePrismicDocumentsBySomeTags, usePrismicDocumentsByTag, usePrismicDocumentsByType, usePrismicDocumentsByUIDs, usePrismicLink, usePrismicRichText, usePrismicText, useSinglePrismicDocument };