@prismicio/react 2.0.0-beta.8 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,920 +5,919 @@ import * as prismicT from '@prismicio/types';
5
5
  import * as prismicR from '@prismicio/richtext';
6
6
  export { Element } from '@prismicio/richtext';
7
7
 
8
- declare type ComponentProps<T> = T extends React.ComponentType<infer U> ? U : T extends keyof JSX.IntrinsicElements ? React.ComponentProps<T> : unknown;
9
- /**
10
- * Props provided to a component when rendered with `<PrismicLink>`.
11
- */
12
- interface LinkProps {
13
- /**
14
- * The URL to link.
15
- */
16
- href: string;
17
- /**
18
- * The `target` attribute for anchor elements. If the Prismic field is
19
- * configured to open in a new window, this prop defaults to `_blank`.
20
- */
21
- target?: string;
22
- /**
23
- * The `rel` attribute for anchor elements. If the `target` prop is set to
24
- * `"_blank"`, this prop defaults to `"noopener noreferrer"`.
25
- */
26
- rel?: string;
27
- /**
28
- * Children for the component. *
29
- */
30
- children?: React.ReactNode;
31
- }
32
- /**
33
- * Props for `<PrismicLink>`.
34
- */
35
- declare type PrismicLinkProps<InternalComponent extends string | React.ComponentType<LinkProps> = string | React.ComponentType<LinkProps>, ExternalComponent extends string | React.ComponentType<LinkProps> = string | React.ComponentType<LinkProps>, LinkResolverFunction extends prismicH.LinkResolverFunction = prismicH.LinkResolverFunction> = Omit<ComponentProps<InternalComponent> & ComponentProps<ExternalComponent>, keyof LinkProps> & {
36
- /**
37
- * The Link Resolver used to resolve links.
38
- *
39
- * @remarks
40
- * If your app uses Route Resolvers when querying for your Prismic
41
- * repository's content, a Link Resolver does not need to be provided.
42
- * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
43
- */
44
- linkResolver?: LinkResolverFunction;
45
- /**
46
- * The component rendered for internal URLs. Defaults to `<a>`.
47
- *
48
- * If your app uses a client-side router that requires a special Link
49
- * component, provide the Link component to this prop.
50
- */
51
- internalComponent?: InternalComponent;
52
- /**
53
- * The component rendered for external URLs. Defaults to `<a>`.
54
- */
55
- externalComponent?: ExternalComponent;
56
- /**
57
- * The `target` attribute for anchor elements. If the Prismic field is
58
- * configured to open in a new window, this prop defaults to `_blank`.
59
- */
60
- target?: string | null;
61
- /**
62
- * The `rel` attribute for anchor elements. If the `target` prop is set to
63
- * `"_blank"`, this prop defaults to `"noopener noreferrer"`.
64
- */
65
- rel?: string | null;
66
- /**
67
- * Children for the component. *
68
- */
69
- children?: React.ReactNode;
70
- } & ({
71
- /**
72
- * The Prismic Link field containing the URL or document to link.
73
- *
74
- * @see Learn about Prismic Link fields {@link https://prismic.io/docs/core-concepts/link-content-relationship}
75
- */
76
- field: prismicT.LinkField | null | undefined;
77
- } | {
78
- /**
79
- * The Prismic document to link.
80
- */
81
- document: prismicT.PrismicDocument | null | undefined;
82
- } | {
83
- /**
84
- * The URL to link.
85
- */
86
- href: string | null | undefined;
87
- });
88
- /**
89
- * React component that renders a link from a Prismic Link field.
90
- *
91
- * Different components can be rendered depending on whether the link is
92
- * internal or external. This is helpful when integrating with client-side
93
- * routers, such as a router-specific Link component.
94
- *
95
- * If a link is configured to open in a new window using `target="_blank"`,
96
- * `rel="noopener noreferrer"` is set by default.
97
- *
98
- * @param props - Props for the component.
99
- *
100
- * @returns The internal or external link component depending on whether the
101
- * link is internal or external.
102
- */
103
- declare const PrismicLink: <InternalComponent extends string | React.ComponentType<LinkProps> = "a", ExternalComponent extends string | React.ComponentType<LinkProps> = "a", LinkResolverFunction extends prismicH.LinkResolverFunction<string> = prismicH.LinkResolverFunction<string>>(props: PrismicLinkProps<InternalComponent, ExternalComponent, LinkResolverFunction>) => JSX.Element | null;
8
+ /**
9
+ * Props provided to a component when rendered with `<PrismicLink>`.
10
+ */
11
+ interface LinkProps {
12
+ /**
13
+ * The URL to link.
14
+ */
15
+ href: string;
16
+ /**
17
+ * The `target` attribute for anchor elements. If the Prismic field is
18
+ * configured to open in a new window, this prop defaults to `_blank`.
19
+ */
20
+ target?: string;
21
+ /**
22
+ * The `rel` attribute for anchor elements. If the `target` prop is set to
23
+ * `"_blank"`, this prop defaults to `"noopener noreferrer"`.
24
+ */
25
+ rel?: string;
26
+ /**
27
+ * Children for the component. *
28
+ */
29
+ children?: React.ReactNode;
30
+ }
31
+ /**
32
+ * Props for `<PrismicLink>`.
33
+ */
34
+ declare type PrismicLinkProps<InternalComponent extends React.ElementType<LinkProps> = React.ElementType<LinkProps>, ExternalComponent extends React.ElementType<LinkProps> = React.ElementType<LinkProps>, LinkResolverFunction extends prismicH.LinkResolverFunction = prismicH.LinkResolverFunction> = Omit<React.ComponentProps<InternalComponent> & React.ComponentProps<ExternalComponent>, keyof LinkProps> & {
35
+ /**
36
+ * The Link Resolver used to resolve links.
37
+ *
38
+ * @remarks
39
+ * If your app uses Route Resolvers when querying for your Prismic
40
+ * repository's content, a Link Resolver does not need to be provided.
41
+ * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
42
+ */
43
+ linkResolver?: LinkResolverFunction;
44
+ /**
45
+ * The component rendered for internal URLs. Defaults to `<a>`.
46
+ *
47
+ * If your app uses a client-side router that requires a special Link
48
+ * component, provide the Link component to this prop.
49
+ */
50
+ internalComponent?: InternalComponent;
51
+ /**
52
+ * The component rendered for external URLs. Defaults to `<a>`.
53
+ */
54
+ externalComponent?: ExternalComponent;
55
+ /**
56
+ * The `target` attribute for anchor elements. If the Prismic field is
57
+ * configured to open in a new window, this prop defaults to `_blank`.
58
+ */
59
+ target?: string | null;
60
+ /**
61
+ * The `rel` attribute for anchor elements. If the `target` prop is set to
62
+ * `"_blank"`, this prop defaults to `"noopener noreferrer"`.
63
+ */
64
+ rel?: string | null;
65
+ /**
66
+ * Children for the component. *
67
+ */
68
+ children?: React.ReactNode;
69
+ } & ({
70
+ /**
71
+ * The Prismic Link field containing the URL or document to link.
72
+ *
73
+ * @see Learn about Prismic Link fields {@link https://prismic.io/docs/core-concepts/link-content-relationship}
74
+ */
75
+ field: prismicT.LinkField | null | undefined;
76
+ } | {
77
+ /**
78
+ * The Prismic document to link.
79
+ */
80
+ document: prismicT.PrismicDocument | null | undefined;
81
+ } | {
82
+ /**
83
+ * The URL to link.
84
+ */
85
+ href: string | null | undefined;
86
+ });
87
+ /**
88
+ * React component that renders a link from a Prismic Link field.
89
+ *
90
+ * Different components can be rendered depending on whether the link is
91
+ * internal or external. This is helpful when integrating with client-side
92
+ * routers, such as a router-specific Link component.
93
+ *
94
+ * If a link is configured to open in a new window using `target="_blank"`,
95
+ * `rel="noopener noreferrer"` is set by default.
96
+ *
97
+ * @param props - Props for the component.
98
+ *
99
+ * @returns The internal or external link component depending on whether the
100
+ * link is internal or external.
101
+ */
102
+ declare const PrismicLink: <InternalComponent extends React.ElementType<LinkProps> = "a", ExternalComponent extends React.ElementType<LinkProps> = "a", LinkResolverFunction extends prismicH.LinkResolverFunction<string> = prismicH.LinkResolverFunction<string>>(props: PrismicLinkProps<InternalComponent, ExternalComponent, LinkResolverFunction>) => JSX.Element | null;
104
103
 
105
- /**
106
- * A function mapping Rich Text block types to React Components. It is used to
107
- * render Rich Text or Title fields.
108
- *
109
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
110
- */
111
- declare type JSXFunctionSerializer = prismicR.RichTextFunctionSerializer<JSX.Element>;
112
- /**
113
- * A map of Rich Text block types to React Components. It is used to render Rich
114
- * Text or Title fields.
115
- *
116
- * @see Templating Rich Text and Title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
117
- */
118
- declare type JSXMapSerializer = prismicR.RichTextMapSerializer<JSX.Element>;
119
- /**
120
- * States of a `@prismicio/client` hook.
121
- */
104
+ /**
105
+ * A function mapping Rich Text block types to React Components. It is used to
106
+ * render Rich Text or Title fields.
107
+ *
108
+ * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
109
+ */
110
+ declare type JSXFunctionSerializer = prismicR.RichTextFunctionSerializer<JSX.Element>;
111
+ /**
112
+ * A map of Rich Text block types to React Components. It is used to render Rich
113
+ * Text or Title fields.
114
+ *
115
+ * @see Templating Rich Text and Title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
116
+ */
117
+ declare type JSXMapSerializer = prismicR.RichTextMapSerializer<JSX.Element>;
118
+ /**
119
+ * States of a `@prismicio/client` hook.
120
+ */
122
121
  declare type PrismicClientHookState = "idle" | "loading" | "loaded" | "failed";
123
122
 
124
- /**
125
- * React context value containing shared configuration for `@prismicio/react`
126
- * components and hooks.
127
- */
128
- declare type PrismicContextValue = {
129
- /**
130
- * A `@prismicio/client` instance used to fetch content from a Prismic
131
- * repository. This is used by `@prismicio/react` hooks, such as
132
- * `usePrismicDocuments()`.
133
- */
134
- client?: _prismicio_client.Client;
135
- /**
136
- * A Link Resolver used to resolve links for `<PrismicLink>` and `<PrismicRichText>`.
137
- *
138
- * @remarks
139
- * If your app uses Route Resolvers when querying for your Prismic
140
- * repository's content, a Link Resolver does not need to be provided.
141
- * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
142
- */
143
- linkResolver?: prismicH.LinkResolverFunction;
144
- /**
145
- * A map or function that maps a Rich Text block to a React component.
146
- *
147
- * @remarks
148
- * Prefer using a map serializer over the function serializer when possible.
149
- * The map serializer is simpler to maintain.
150
- * @example A map serializer.
151
- *
152
- * ```jsx
153
- * {
154
- * heading1: ({children}) => <Heading>{children}</Heading>
155
- * }
156
- * ```
157
- *
158
- * @example A function serializer.
159
- *
160
- * ```jsx
161
- * (type, node, content, children) => {
162
- * switch (type) {
163
- * case "heading1": {
164
- * return <Heading>{chidlren}</Heading>;
165
- * }
166
- * }
167
- * };
168
- * ```
169
- */
170
- richTextComponents?: JSXMapSerializer | JSXFunctionSerializer;
171
- /**
172
- * The component rendered by `<PrismicLink>` for internal URLs. Defaults to `<a>`.
173
- */
174
- internalLinkComponent?: string | React.ComponentType<LinkProps>;
175
- /**
176
- * The component rendered by `<PrismicLink>` for external URLs. Defaults to `<a>`.
177
- */
178
- externalLinkComponent?: string | React.ComponentType<LinkProps>;
179
- /**
180
- * Children for the component.
181
- */
182
- children?: React.ReactNode;
183
- };
184
- /**
185
- * Props for `<PrismicProvider>`.
186
- */
187
- declare type PrismicProviderProps = PrismicContextValue;
188
- /**
189
- * React context provider to share configuration for `@prismicio/react`
190
- * components and hooks.
191
- *
192
- * @returns A React context provider with shared configuration.
193
- */
123
+ /**
124
+ * React context value containing shared configuration for `@prismicio/react`
125
+ * components and hooks.
126
+ */
127
+ declare type PrismicContextValue = {
128
+ /**
129
+ * A `@prismicio/client` instance used to fetch content from a Prismic
130
+ * repository. This is used by `@prismicio/react` hooks, such as
131
+ * `usePrismicDocuments()`.
132
+ */
133
+ client?: _prismicio_client.Client;
134
+ /**
135
+ * A Link Resolver used to resolve links for `<PrismicLink>` and `<PrismicRichText>`.
136
+ *
137
+ * @remarks
138
+ * If your app uses Route Resolvers when querying for your Prismic
139
+ * repository's content, a Link Resolver does not need to be provided.
140
+ * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
141
+ */
142
+ linkResolver?: prismicH.LinkResolverFunction;
143
+ /**
144
+ * A map or function that maps a Rich Text block to a React component.
145
+ *
146
+ * @remarks
147
+ * Prefer using a map serializer over the function serializer when possible.
148
+ * The map serializer is simpler to maintain.
149
+ * @example A map serializer.
150
+ *
151
+ * ```jsx
152
+ * {
153
+ * heading1: ({children}) => <Heading>{children}</Heading>
154
+ * }
155
+ * ```
156
+ *
157
+ * @example A function serializer.
158
+ *
159
+ * ```jsx
160
+ * (type, node, content, children) => {
161
+ * switch (type) {
162
+ * case "heading1": {
163
+ * return <Heading>{chidlren}</Heading>;
164
+ * }
165
+ * }
166
+ * };
167
+ * ```
168
+ */
169
+ richTextComponents?: JSXMapSerializer | JSXFunctionSerializer;
170
+ /**
171
+ * The component rendered by `<PrismicLink>` for internal URLs. Defaults to `<a>`.
172
+ */
173
+ internalLinkComponent?: React.ElementType<LinkProps>;
174
+ /**
175
+ * The component rendered by `<PrismicLink>` for external URLs. Defaults to `<a>`.
176
+ */
177
+ externalLinkComponent?: React.ElementType<LinkProps>;
178
+ /**
179
+ * Children for the component.
180
+ */
181
+ children?: React.ReactNode;
182
+ };
183
+ /**
184
+ * Props for `<PrismicProvider>`.
185
+ */
186
+ declare type PrismicProviderProps = PrismicContextValue;
187
+ /**
188
+ * React context provider to share configuration for `@prismicio/react`
189
+ * components and hooks.
190
+ *
191
+ * @returns A React context provider with shared configuration.
192
+ */
194
193
  declare const PrismicProvider: ({ client, linkResolver, richTextComponents, internalLinkComponent, externalLinkComponent, children, }: PrismicProviderProps) => JSX.Element;
195
194
 
196
- /**
197
- * React hook used to read shared configuration for `@prismicio/react`
198
- * components and hooks.
199
- *
200
- * @returns The closest `<PrismicProvider>` context value.
201
- */
195
+ /**
196
+ * React hook used to read shared configuration for `@prismicio/react`
197
+ * components and hooks.
198
+ *
199
+ * @returns The closest `<PrismicProvider>` context value.
200
+ */
202
201
  declare const usePrismicContext: () => PrismicContextValue;
203
202
 
204
- /**
205
- * Retrieve the `@prismicio/client` instance provided to `<PrismicProvider>`
206
- * higher in the React tree.
207
- *
208
- * @param explicitClient - An optional `@prismicio/client` instance to override
209
- * the Client provided to `<PrismicProvider>`.
210
- *
211
- * @returns The `@prismicio/client` instance provided to `<PrismicProvider>`.
212
- */
203
+ /**
204
+ * Retrieve the `@prismicio/client` instance provided to `<PrismicProvider>`
205
+ * higher in the React tree.
206
+ *
207
+ * @param explicitClient - An optional `@prismicio/client` instance to override
208
+ * the Client provided to `<PrismicProvider>`.
209
+ *
210
+ * @returns The `@prismicio/client` instance provided to `<PrismicProvider>`.
211
+ */
213
212
  declare const usePrismicClient: (explicitClient?: _prismicio_client.Client | undefined) => _prismicio_client.Client;
214
213
 
215
- /**
216
- * Props for `<PrismicText>`.
217
- */
218
- declare type PrismicTextProps = {
219
- /**
220
- * The Prismic Rich Text field to render.
221
- */
222
- field: prismicT.RichTextField | null | undefined;
223
- /**
224
- * The separator used between blocks. Defaults to `\n`.
225
- */
226
- separator?: string;
227
- };
228
- /**
229
- * React component that renders content from a Prismic Rich Text field as plain text.
230
- *
231
- * @remarks
232
- * This component returns a React fragment with no wrapping element around the
233
- * content. If you need a wrapper, add a component around `<PrismicText>`.
234
- * @example Rendering a Rich Text field as plain text.
235
- *
236
- * ```jsx
237
- * <PrismicText field={document.data.content} />;
238
- * ```
239
- *
240
- * @param props - Props for the component.
241
- *
242
- * @returns The Rich Text field's content as plain text.
243
- *
244
- * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
245
- */
214
+ /**
215
+ * Props for `<PrismicText>`.
216
+ */
217
+ declare type PrismicTextProps = {
218
+ /**
219
+ * The Prismic Rich Text field to render.
220
+ */
221
+ field: prismicT.RichTextField | null | undefined;
222
+ /**
223
+ * The separator used between blocks. Defaults to `\n`.
224
+ */
225
+ separator?: string;
226
+ };
227
+ /**
228
+ * React component that renders content from a Prismic Rich Text field as plain text.
229
+ *
230
+ * @remarks
231
+ * This component returns a React fragment with no wrapping element around the
232
+ * content. If you need a wrapper, add a component around `<PrismicText>`.
233
+ * @example Rendering a Rich Text field as plain text.
234
+ *
235
+ * ```jsx
236
+ * <PrismicText field={document.data.content} />;
237
+ * ```
238
+ *
239
+ * @param props - Props for the component.
240
+ *
241
+ * @returns The Rich Text field's content as plain text.
242
+ *
243
+ * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
244
+ */
246
245
  declare const PrismicText: (props: PrismicTextProps) => JSX.Element | null;
247
246
 
248
- /**
249
- * Props for `<PrismicRichText>`.
250
- */
251
- declare type PrismicRichTextProps = {
252
- /**
253
- * The Prismic Rich Text field to render.
254
- */
255
- field: prismicT.RichTextField | null | undefined;
256
- /**
257
- * The Link Resolver used to resolve links.
258
- *
259
- * @remarks
260
- * If your app uses Route Resolvers when querying for your Prismic
261
- * repository's content, a Link Resolver does not need to be provided.
262
- * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
263
- */
264
- linkResolver?: PrismicLinkProps["linkResolver"];
265
- /**
266
- * A function that maps a Rich Text block to a React component.
267
- *
268
- * @deprecated Use the `components` prop instead. Prefer using a map
269
- * serializer when possible.
270
- * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
271
- */
272
- htmlSerializer?: JSXFunctionSerializer;
273
- /**
274
- * A map or function that maps a Rich Text block to a React component.
275
- *
276
- * @remarks
277
- * Prefer using a map serializer over the function serializer when possible.
278
- * The map serializer is simpler to maintain.
279
- * @example A map serializer.
280
- *
281
- * ```jsx
282
- * {
283
- * heading1: ({children}) => <Heading>{children}</Heading>
284
- * }
285
- * ```
286
- *
287
- * @example A function serializer.
288
- *
289
- * ```jsx
290
- * (type, node, content, children) => {
291
- * switch (type) {
292
- * case "heading1": {
293
- * return <Heading>{chidlren}</Heading>;
294
- * }
295
- * }
296
- * };
297
- * ```
298
- */
299
- components?: JSXMapSerializer | JSXFunctionSerializer;
300
- /**
301
- * The React component rendered for links when the URL is internal.
302
- *
303
- * @defaultValue `<a>`
304
- */
305
- internalLinkComponent?: PrismicLinkProps["internalComponent"];
306
- /**
307
- * The React component rendered for links when the URL is external.
308
- *
309
- * @defaultValue `<a>`
310
- */
311
- externalLinkComponent?: PrismicLinkProps["externalComponent"];
312
- };
313
- /**
314
- * React component that renders content from a Prismic Rich Text field. By
315
- * default, HTML elements are rendered for each piece of content. A `heading1`
316
- * block will render an `<h1>` HTML element, for example. Links will use
317
- * `<PrismicLink>` by default which can be customized using the
318
- * `internalLinkComponent` and `externalLinkComponent` props.
319
- *
320
- * To customize the components that are rendered, provide a map or function
321
- * serializer to the `components` prop.
322
- *
323
- * Components can also be provided in a centralized location using the
324
- * `<PrismicProvider>` React context provider.
325
- *
326
- * @remarks
327
- * This component returns a React fragment with no wrapping element around the
328
- * content. If you need a wrapper, add a component around `<PrismicRichText>`.
329
- * @example Rendering a Rich Text field using the default HTMl elements.
330
- *
331
- * ```jsx
332
- * <PrismicRichText field={document.data.content} />;
333
- * ```
334
- *
335
- * @example Rendering a Rich Text field using a custom set of React components.
336
- *
337
- * ```jsx
338
- * <PrismicRichText
339
- * field={document.data.content}
340
- * components={{
341
- * heading1: ({ children }) => <Heading>{children}</Heading>,
342
- * }}
343
- * />;
344
- * ```
345
- *
346
- * @param props - Props for the component.
347
- *
348
- * @returns The Rich Text field's content as React components.
349
- *
350
- * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
351
- * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
352
- */
247
+ /**
248
+ * Props for `<PrismicRichText>`.
249
+ */
250
+ declare type PrismicRichTextProps = {
251
+ /**
252
+ * The Prismic Rich Text field to render.
253
+ */
254
+ field: prismicT.RichTextField | null | undefined;
255
+ /**
256
+ * The Link Resolver used to resolve links.
257
+ *
258
+ * @remarks
259
+ * If your app uses Route Resolvers when querying for your Prismic
260
+ * repository's content, a Link Resolver does not need to be provided.
261
+ * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
262
+ */
263
+ linkResolver?: PrismicLinkProps["linkResolver"];
264
+ /**
265
+ * A function that maps a Rich Text block to a React component.
266
+ *
267
+ * @deprecated Use the `components` prop instead. Prefer using a map
268
+ * serializer when possible.
269
+ * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
270
+ */
271
+ htmlSerializer?: JSXFunctionSerializer;
272
+ /**
273
+ * A map or function that maps a Rich Text block to a React component.
274
+ *
275
+ * @remarks
276
+ * Prefer using a map serializer over the function serializer when possible.
277
+ * The map serializer is simpler to maintain.
278
+ * @example A map serializer.
279
+ *
280
+ * ```jsx
281
+ * {
282
+ * heading1: ({children}) => <Heading>{children}</Heading>
283
+ * }
284
+ * ```
285
+ *
286
+ * @example A function serializer.
287
+ *
288
+ * ```jsx
289
+ * (type, node, content, children) => {
290
+ * switch (type) {
291
+ * case "heading1": {
292
+ * return <Heading>{chidlren}</Heading>;
293
+ * }
294
+ * }
295
+ * };
296
+ * ```
297
+ */
298
+ components?: JSXMapSerializer | JSXFunctionSerializer;
299
+ /**
300
+ * The React component rendered for links when the URL is internal.
301
+ *
302
+ * @defaultValue `<a>`
303
+ */
304
+ internalLinkComponent?: PrismicLinkProps["internalComponent"];
305
+ /**
306
+ * The React component rendered for links when the URL is external.
307
+ *
308
+ * @defaultValue `<a>`
309
+ */
310
+ externalLinkComponent?: PrismicLinkProps["externalComponent"];
311
+ };
312
+ /**
313
+ * React component that renders content from a Prismic Rich Text field. By
314
+ * default, HTML elements are rendered for each piece of content. A `heading1`
315
+ * block will render an `<h1>` HTML element, for example. Links will use
316
+ * `<PrismicLink>` by default which can be customized using the
317
+ * `internalLinkComponent` and `externalLinkComponent` props.
318
+ *
319
+ * To customize the components that are rendered, provide a map or function
320
+ * serializer to the `components` prop.
321
+ *
322
+ * Components can also be provided in a centralized location using the
323
+ * `<PrismicProvider>` React context provider.
324
+ *
325
+ * @remarks
326
+ * This component returns a React fragment with no wrapping element around the
327
+ * content. If you need a wrapper, add a component around `<PrismicRichText>`.
328
+ * @example Rendering a Rich Text field using the default HTMl elements.
329
+ *
330
+ * ```jsx
331
+ * <PrismicRichText field={document.data.content} />;
332
+ * ```
333
+ *
334
+ * @example Rendering a Rich Text field using a custom set of React components.
335
+ *
336
+ * ```jsx
337
+ * <PrismicRichText
338
+ * field={document.data.content}
339
+ * components={{
340
+ * heading1: ({ children }) => <Heading>{children}</Heading>,
341
+ * }}
342
+ * />;
343
+ * ```
344
+ *
345
+ * @param props - Props for the component.
346
+ *
347
+ * @returns The Rich Text field's content as React components.
348
+ *
349
+ * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
350
+ * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
351
+ */
353
352
  declare const PrismicRichText: (props: PrismicRichTextProps) => JSX.Element | null;
354
353
 
355
- /**
356
- * The minimum required properties to represent a Prismic Slice for the
357
- * `<SliceZone>` component.
358
- *
359
- * If using Prismic's REST API, use the `Slice` export from `@prismicio/types`
360
- * for a full interface.
361
- *
362
- * @typeParam SliceType - Type name of the Slice.
363
- */
364
- declare type SliceLike<SliceType extends string = string> = Pick<prismicT.Slice<SliceType>, "slice_type">;
365
- /**
366
- * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
367
- *
368
- * If using Prismic's REST API, use the `SliceZone` export from
369
- * `@prismicio/types` for the full type.
370
- *
371
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
372
- */
373
- declare type SliceZoneLike<TSlice extends SliceLike> = readonly TSlice[];
374
- /**
375
- * React props for a component rendering content from a Prismic Slice using the
376
- * `<SliceZone>` component.
377
- *
378
- * @typeParam TSlice - The Slice passed as a prop.
379
- * @typeParam TContext - Arbitrary data passed to `<SliceZone>` and made
380
- * available to all Slice components.
381
- */
382
- declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
383
- /**
384
- * Slice data for this component.
385
- */
386
- slice: TSlice;
387
- /**
388
- * The index of the Slice in the Slice Zone.
389
- */
390
- index: number;
391
- /**
392
- * All Slices from the Slice Zone to which the Slice belongs.
393
- */
394
- slices: SliceZoneLike<SliceLike>;
395
- /**
396
- * Arbitrary data passed to `<SliceZone>` and made available to all Slice components.
397
- */
398
- context: TContext;
399
- };
400
- /**
401
- * A React component to be rendered for each instance of its Slice.
402
- *
403
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
404
- * @typeParam TContext - Arbitrary data made available to all Slice components.
405
- */
406
- declare type SliceComponentType<TSlice extends SliceLike = SliceLike, TContext = unknown> = React.ComponentType<SliceComponentProps<TSlice, TContext>>;
407
- /**
408
- * A record of Slice types mapped to a React component. The component will be
409
- * rendered for each instance of its Slice.
410
- *
411
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
412
- * @typeParam TContext - Arbitrary data made available to all Slice components.
413
- */
414
- declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
415
- [SliceType in keyof Record<TSlice["slice_type"], never>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext>;
416
- };
417
- /**
418
- * This Slice component can be used as a reminder to provide a proper implementation.
419
- *
420
- * This is also the default React component rendered when a component mapping
421
- * cannot be found in `<SliceZone>`.
422
- */
423
- declare const TODOSliceComponent: <TSlice extends SliceLike<string>, TContext>({ slice, }: SliceComponentProps<TSlice, TContext>) => JSX.Element | null;
424
- /**
425
- * Arguments for a `<SliceZone>` `resolver` function.
426
- */
427
- declare type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
428
- /**
429
- * The Slice to resolve to a React component.
430
- */
431
- slice: TSlice;
432
- /**
433
- * The name of the Slice.
434
- */
435
- sliceName: TSlice["slice_type"];
436
- /**
437
- * The index of the Slice in the Slice Zone.
438
- */
439
- i: number;
440
- };
441
- /**
442
- * A function that determines the rendered React component for each Slice in the
443
- * Slice Zone. If a nullish value is returned, the component will fallback to
444
- * the `components` or `defaultComponent` props to determine the rendered component.
445
- *
446
- * @deprecated Use the `components` prop instead.
447
- *
448
- * @param args - Arguments for the resolver function.
449
- *
450
- * @returns The React component to render for a Slice.
451
- */
452
- declare type SliceZoneResolver<TSlice extends SliceLike = SliceLike, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<TSlice, TContext> | undefined | null;
453
- /**
454
- * React props for the `<SliceZone>` component.
455
- *
456
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
457
- * @typeParam TContext - Arbitrary data made available to all Slice components.
458
- */
459
- declare type SliceZoneProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
460
- /**
461
- * List of Slice data from the Slice Zone.
462
- */
463
- slices?: SliceZoneLike<TSlice>;
464
- /**
465
- * A record mapping Slice types to React components.
466
- */
467
- components?: SliceZoneComponents<TSlice, TContext>;
468
- /**
469
- * A function that determines the rendered React component for each Slice in
470
- * the Slice Zone.
471
- *
472
- * @deprecated Use the `components` prop instead.
473
- *
474
- * @param args - Arguments for the resolver function.
475
- *
476
- * @returns The React component to render for a Slice.
477
- */
478
- resolver?: SliceZoneResolver<TSlice, TContext>;
479
- /**
480
- * The React component rendered if a component mapping from the `components`
481
- * prop cannot be found.
482
- */
483
- defaultComponent?: SliceComponentType<TSlice, TContext>;
484
- /**
485
- * Arbitrary data made available to all Slice components.
486
- */
487
- context?: TContext;
488
- };
489
- /**
490
- * Renders content from a Prismic Slice Zone using React components for each
491
- * type of Slice.
492
- *
493
- * If a component is not provided for a type of Slice, a default component can
494
- * be provided. A fallback component is provided by default that will not be
495
- * rendered in a production build of your app.
496
- *
497
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
498
- * @typeParam TContext - Arbitrary data made available to all Slice components.
499
- *
500
- * @returns The Slice Zone's content as React components.
501
- *
502
- * @see Learn about Prismic Slices and Slice Zones {@link https://prismic.io/docs/core-concepts/slices}
503
- */
354
+ /**
355
+ * The minimum required properties to represent a Prismic Slice for the
356
+ * `<SliceZone>` component.
357
+ *
358
+ * If using Prismic's REST API, use the `Slice` export from `@prismicio/types`
359
+ * for a full interface.
360
+ *
361
+ * @typeParam SliceType - Type name of the Slice.
362
+ */
363
+ declare type SliceLike<SliceType extends string = string> = Pick<prismicT.Slice<SliceType>, "slice_type">;
364
+ /**
365
+ * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
366
+ *
367
+ * If using Prismic's REST API, use the `SliceZone` export from
368
+ * `@prismicio/types` for the full type.
369
+ *
370
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
371
+ */
372
+ declare type SliceZoneLike<TSlice extends SliceLike> = readonly TSlice[];
373
+ /**
374
+ * React props for a component rendering content from a Prismic Slice using the
375
+ * `<SliceZone>` component.
376
+ *
377
+ * @typeParam TSlice - The Slice passed as a prop.
378
+ * @typeParam TContext - Arbitrary data passed to `<SliceZone>` and made
379
+ * available to all Slice components.
380
+ */
381
+ declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
382
+ /**
383
+ * Slice data for this component.
384
+ */
385
+ slice: TSlice;
386
+ /**
387
+ * The index of the Slice in the Slice Zone.
388
+ */
389
+ index: number;
390
+ /**
391
+ * All Slices from the Slice Zone to which the Slice belongs.
392
+ */
393
+ slices: SliceZoneLike<SliceLike>;
394
+ /**
395
+ * Arbitrary data passed to `<SliceZone>` and made available to all Slice components.
396
+ */
397
+ context: TContext;
398
+ };
399
+ /**
400
+ * A React component to be rendered for each instance of its Slice.
401
+ *
402
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
403
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
404
+ */
405
+ declare type SliceComponentType<TSlice extends SliceLike = SliceLike, TContext = unknown> = React.ComponentType<SliceComponentProps<TSlice, TContext>>;
406
+ /**
407
+ * A record of Slice types mapped to a React component. The component will be
408
+ * rendered for each instance of its Slice.
409
+ *
410
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
411
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
412
+ */
413
+ declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
414
+ [SliceType in keyof Record<TSlice["slice_type"], never>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext>;
415
+ };
416
+ /**
417
+ * This Slice component can be used as a reminder to provide a proper implementation.
418
+ *
419
+ * This is also the default React component rendered when a component mapping
420
+ * cannot be found in `<SliceZone>`.
421
+ */
422
+ declare const TODOSliceComponent: <TSlice extends SliceLike<string>, TContext>({ slice, }: SliceComponentProps<TSlice, TContext>) => JSX.Element | null;
423
+ /**
424
+ * Arguments for a `<SliceZone>` `resolver` function.
425
+ */
426
+ declare type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
427
+ /**
428
+ * The Slice to resolve to a React component.
429
+ */
430
+ slice: TSlice;
431
+ /**
432
+ * The name of the Slice.
433
+ */
434
+ sliceName: TSlice["slice_type"];
435
+ /**
436
+ * The index of the Slice in the Slice Zone.
437
+ */
438
+ i: number;
439
+ };
440
+ /**
441
+ * A function that determines the rendered React component for each Slice in the
442
+ * Slice Zone. If a nullish value is returned, the component will fallback to
443
+ * the `components` or `defaultComponent` props to determine the rendered component.
444
+ *
445
+ * @deprecated Use the `components` prop instead.
446
+ *
447
+ * @param args - Arguments for the resolver function.
448
+ *
449
+ * @returns The React component to render for a Slice.
450
+ */
451
+ declare type SliceZoneResolver<TSlice extends SliceLike = SliceLike, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<TSlice, TContext> | undefined | null;
452
+ /**
453
+ * React props for the `<SliceZone>` component.
454
+ *
455
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
456
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
457
+ */
458
+ declare type SliceZoneProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
459
+ /**
460
+ * List of Slice data from the Slice Zone.
461
+ */
462
+ slices?: SliceZoneLike<TSlice>;
463
+ /**
464
+ * A record mapping Slice types to React components.
465
+ */
466
+ components?: SliceZoneComponents<TSlice, TContext>;
467
+ /**
468
+ * A function that determines the rendered React component for each Slice in
469
+ * the Slice Zone.
470
+ *
471
+ * @deprecated Use the `components` prop instead.
472
+ *
473
+ * @param args - Arguments for the resolver function.
474
+ *
475
+ * @returns The React component to render for a Slice.
476
+ */
477
+ resolver?: SliceZoneResolver<TSlice, TContext>;
478
+ /**
479
+ * The React component rendered if a component mapping from the `components`
480
+ * prop cannot be found.
481
+ */
482
+ defaultComponent?: SliceComponentType<TSlice, TContext>;
483
+ /**
484
+ * Arbitrary data made available to all Slice components.
485
+ */
486
+ context?: TContext;
487
+ };
488
+ /**
489
+ * Renders content from a Prismic Slice Zone using React components for each
490
+ * type of Slice.
491
+ *
492
+ * If a component is not provided for a type of Slice, a default component can
493
+ * be provided. A fallback component is provided by default that will not be
494
+ * rendered in a production build of your app.
495
+ *
496
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
497
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
498
+ *
499
+ * @returns The Slice Zone's content as React components.
500
+ *
501
+ * @see Learn about Prismic Slices and Slice Zones {@link https://prismic.io/docs/core-concepts/slices}
502
+ */
504
503
  declare const SliceZone: <TSlice extends SliceLike<string>, TContext>({ slices, components, resolver, defaultComponent, context, }: SliceZoneProps<TSlice, TContext>) => JSX.Element;
505
504
 
506
- /**
507
- * Props for `<PrismicToolbar>`.
508
- */
509
- declare type PrismicToolbarProps = {
510
- /**
511
- * The name of the Prismic repository. For example, `"my-repo"` if the
512
- * repository URL is `my-repo.prismic.io`.
513
- */
514
- repositoryName: string;
515
- /**
516
- * The type of toolbar needed for the repository. Defaults to `"new"`.
517
- *
518
- * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}
519
- */
520
- type?: "new" | "legacy";
521
- };
522
- /**
523
- * React component that injects the Prismic Toolbar into the app. This component
524
- * can be placed anywhere in the React tree.
525
- */
505
+ /**
506
+ * Props for `<PrismicToolbar>`.
507
+ */
508
+ declare type PrismicToolbarProps = {
509
+ /**
510
+ * The name of the Prismic repository. For example, `"my-repo"` if the
511
+ * repository URL is `my-repo.prismic.io`.
512
+ */
513
+ repositoryName: string;
514
+ /**
515
+ * The type of toolbar needed for the repository. Defaults to `"new"`.
516
+ *
517
+ * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}
518
+ */
519
+ type?: "new" | "legacy";
520
+ };
521
+ /**
522
+ * React component that injects the Prismic Toolbar into the app. This component
523
+ * can be placed anywhere in the React tree.
524
+ */
526
525
  declare const PrismicToolbar: ({ repositoryName, type, }: PrismicToolbarProps) => null;
527
526
 
528
- declare type StateMachineState<TData> = {
529
- state: PrismicClientHookState;
530
- data?: TData;
531
- error?: Error;
532
- };
533
- declare type HookOnlyParameters = {
534
- client?: _prismicio_client.Client;
535
- skip?: boolean;
536
- };
537
- /**
538
- * The return value of a `@prismicio/client` React hook.
539
- *
540
- * @typeParam TData - Data returned by the client.
541
- */
542
- declare type ClientHookReturnType<TData = unknown> = [
543
- /**
544
- * Data returned by the client.
545
- */
546
- data: TData | undefined,
547
- /**
548
- * The current state of the hook's client method call.
549
- */
550
- state: Pick<StateMachineState<TData>, "state" | "error">
527
+ declare type StateMachineState<TData> = {
528
+ state: PrismicClientHookState;
529
+ data?: TData;
530
+ error?: Error;
531
+ };
532
+ declare type HookOnlyParameters = {
533
+ client?: _prismicio_client.Client;
534
+ skip?: boolean;
535
+ };
536
+ /**
537
+ * The return value of a `@prismicio/client` React hook.
538
+ *
539
+ * @typeParam TData - Data returned by the client.
540
+ */
541
+ declare type ClientHookReturnType<TData = unknown> = [
542
+ /**
543
+ * Data returned by the client.
544
+ */
545
+ data: TData | undefined,
546
+ /**
547
+ * The current state of the hook's client method call.
548
+ */
549
+ state: Pick<StateMachineState<TData>, "state" | "error">
551
550
  ];
552
551
 
553
- declare type UsePrismicPreviewResolverArgs = {
554
- /**
555
- * An optional `@prismicio/client` instance to override the Client provided to
556
- * `<PrismicProvider>`
557
- */
558
- client?: _prismicio_client.Client;
559
- /**
560
- * A function that maps a Prismic document to a URL within your app.
561
- */
562
- linkResolver?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["linkResolver"];
563
- /**
564
- * A fallback URL if the Link Resolver does not return a value.
565
- */
566
- defaultURL?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["defaultURL"];
567
- /**
568
- * The preview token (also known as a ref) that will be used to query preview
569
- * content from the Prismic repository.
570
- */
571
- previewToken?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["previewToken"];
572
- /**
573
- * The previewed document that will be used to determine the destination URL.
574
- */
575
- documentID?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["documentID"];
576
- /**
577
- * A function to automatically navigate to the resolved URL. If a function is
578
- * not provded, `usePreviewResolver` will not navigate to the URL.
579
- *
580
- * @param url - The resolved preview URL.
581
- */
582
- navigate?: (url: string) => unknown;
583
- };
584
- /**
585
- * Resolve a preview session's URL. The resolved URL can be used to redirect to
586
- * the previewed document.
587
- *
588
- * If a `navigate` function is provided, the hook will automatically navigate to
589
- * the previewed document's URL.
590
- *
591
- * @param args - Arguments to configure how a URL is resolved.
592
- *
593
- * @returns A tuple containing the resolved URL and the hook's state.
594
- */
552
+ declare type UsePrismicPreviewResolverArgs = {
553
+ /**
554
+ * An optional `@prismicio/client` instance to override the Client provided to
555
+ * `<PrismicProvider>`
556
+ */
557
+ client?: _prismicio_client.Client;
558
+ /**
559
+ * A function that maps a Prismic document to a URL within your app.
560
+ */
561
+ linkResolver?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["linkResolver"];
562
+ /**
563
+ * A fallback URL if the Link Resolver does not return a value.
564
+ */
565
+ defaultURL?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["defaultURL"];
566
+ /**
567
+ * The preview token (also known as a ref) that will be used to query preview
568
+ * content from the Prismic repository.
569
+ */
570
+ previewToken?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["previewToken"];
571
+ /**
572
+ * The previewed document that will be used to determine the destination URL.
573
+ */
574
+ documentID?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["documentID"];
575
+ /**
576
+ * A function to automatically navigate to the resolved URL. If a function is
577
+ * not provded, `usePreviewResolver` will not navigate to the URL.
578
+ *
579
+ * @param url - The resolved preview URL.
580
+ */
581
+ navigate?: (url: string) => unknown;
582
+ };
583
+ /**
584
+ * Resolve a preview session's URL. The resolved URL can be used to redirect to
585
+ * the previewed document.
586
+ *
587
+ * If a `navigate` function is provided, the hook will automatically navigate to
588
+ * the previewed document's URL.
589
+ *
590
+ * @param args - Arguments to configure how a URL is resolved.
591
+ *
592
+ * @returns A tuple containing the resolved URL and the hook's state.
593
+ */
595
594
  declare const usePrismicPreviewResolver: (args?: UsePrismicPreviewResolverArgs) => ClientHookReturnType<string>;
596
595
 
597
- /**
598
- * A hook that queries content from the Prismic repository.
599
- *
600
- * @remarks
601
- * An additional `@prismicio/client` instance can be provided at `params.client`.
602
- *
603
- * @typeParam TDocument - Type of Prismic documents returned
604
- *
605
- * @param params - Parameters to filter, sort, and paginate results
606
- *
607
- * @returns The composable payload {@link ClientHookReturnType}
608
- *
609
- * @see Underlying `@prismicio/client` method {@link proto.get}
610
- */
611
- declare const usePrismicDocuments: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
612
- /**
613
- * A hook that queries content from the Prismic repository and returns only the
614
- * first result, if any.
615
- *
616
- * @remarks
617
- * An additional `@prismicio/client` instance can be provided at `params.client`.
618
- *
619
- * @typeParam TDocument - Type of the Prismic document returned
620
- *
621
- * @param params - Parameters to filter, sort, and paginate results
622
- *
623
- * @returns The composable payload {@link ClientHookReturnType}
624
- *
625
- * @see Underlying `@prismicio/client` method {@link proto.getFirst}
626
- */
627
- declare const useFirstPrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
628
- /**
629
- * A hook that queries content from the Prismic repository and returns all
630
- * matching content. If no predicates are provided, all documents will be fetched.
631
- *
632
- * @remarks
633
- * An additional `@prismicio/client` instance can be provided at `params.client`.
634
- *
635
- * @typeParam TDocument - Type of Prismic documents returned
636
- *
637
- * @param params - Parameters to filter and sort results
638
- *
639
- * @returns The composable payload {@link ClientHookReturnType}
640
- *
641
- * @see Underlying `@prismicio/client` method {@link proto.getAll}
642
- */
643
- declare const useAllPrismicDocumentsDangerously: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
644
- limit?: number | undefined;
645
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
646
- /**
647
- * A hook that queries a document from the Prismic repository with a specific ID.
648
- *
649
- * @remarks
650
- * An additional `@prismicio/client` instance can be provided at `params.client`.
651
- *
652
- * @typeParam TDocument - Type of the Prismic document returned
653
- *
654
- * @param id - ID of the document
655
- * @param params - Parameters to filter, sort, and paginate results
656
- *
657
- * @returns The composable payload {@link ClientHookReturnType}
658
- *
659
- * @see Underlying `@prismicio/client` method {@link proto.getByID}
660
- */
661
- declare const usePrismicDocumentByID: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
662
- /**
663
- * A hook that queries documents from the Prismic repository with specific IDs.
664
- *
665
- * @remarks
666
- * An additional `@prismicio/client` instance can be provided at `params.client`.
667
- *
668
- * @typeParam TDocument - Type of Prismic documents returned
669
- *
670
- * @param ids - A list of document IDs
671
- * @param params - Parameters to filter, sort, and paginate results
672
- *
673
- * @returns The composable payload {@link ClientHookReturnType}
674
- *
675
- * @see Underlying `@prismicio/client` method {@link proto.getByIDs}
676
- */
677
- declare const usePrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
678
- /**
679
- * A hook that queries all documents from the Prismic repository with specific IDs.
680
- *
681
- * @remarks
682
- * An additional `@prismicio/client` instance can be provided at `params.client`.
683
- *
684
- * @typeParam TDocument - Type of Prismic documents returned
685
- *
686
- * @param ids - A list of document IDs
687
- * @param params - Parameters to filter and sort results
688
- *
689
- * @returns The composable payload {@link ClientHookReturnType}
690
- *
691
- * @see Underlying `@prismicio/client` method {@link proto.getAllByIDs}
692
- */
693
- declare const useAllPrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
694
- /**
695
- * A hook that queries a document from the Prismic repository with a specific
696
- * UID and Custom Type.
697
- *
698
- * @remarks
699
- * An additional `@prismicio/client` instance can be provided at `params.client`.
700
- *
701
- * @typeParam TDocument - Type of the Prismic document returned
702
- *
703
- * @param documentType - The API ID of the document's Custom Type
704
- * @param uid - UID of the document
705
- * @param params - Parameters to filter, sort, and paginate results
706
- *
707
- * @returns The composable payload {@link ClientHookReturnType}
708
- *
709
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
710
- */
711
- declare const usePrismicDocumentByUID: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
712
- /**
713
- * A hook that queries documents from the Prismic repository with specific UIDs
714
- * of a Custom Type.
715
- *
716
- * @remarks
717
- * An additional `@prismicio/client` instance can be provided at `params.client`.
718
- *
719
- * @typeParam TDocument - Type of the Prismic document returned
720
- *
721
- * @param documentType - The API ID of the document's Custom Type
722
- * @param uids - A list of document UIDs.
723
- * @param params - Parameters to filter, sort, and paginate results
724
- *
725
- * @returns The composable payload {@link ClientHookReturnType}
726
- *
727
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
728
- */
729
- declare const usePrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
730
- /**
731
- * A hook that queries all documents from the Prismic repository with specific
732
- * UIDs of a Custom Type.
733
- *
734
- * @remarks
735
- * An additional `@prismicio/client` instance can be provided at `params.client`.
736
- *
737
- * @typeParam TDocument - Type of the Prismic document returned
738
- *
739
- * @param documentType - The API ID of the document's Custom Type
740
- * @param uids - A list of document UIDs.
741
- * @param params - Parameters to filter, sort, and paginate results
742
- *
743
- * @returns The composable payload {@link ClientHookReturnType}
744
- *
745
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
746
- */
747
- declare const useAllPrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
748
- /**
749
- * A hook that queries a singleton document from the Prismic repository for a
750
- * specific Custom Type.
751
- *
752
- * @remarks
753
- * An additional `@prismicio/client` instance can be provided at `params.client`.
754
- *
755
- * @typeParam TDocument - Type of the Prismic document returned
756
- *
757
- * @param documentType - The API ID of the singleton Custom Type
758
- * @param params - Parameters to filter, sort, and paginate results
759
- *
760
- * @returns The composable payload {@link ClientHookReturnType}
761
- *
762
- * @see Underlying `@prismicio/client` method {@link proto.getSingle}
763
- */
764
- declare const useSinglePrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
765
- /**
766
- * A hook that queries documents from the Prismic repository for a specific Custom Type.
767
- *
768
- * @remarks
769
- * An additional `@prismicio/client` instance can be provided at `params.client`.
770
- *
771
- * @typeParam TDocument - Type of Prismic documents returned
772
- *
773
- * @param documentType - The API ID of the Custom Type
774
- * @param params - Parameters to filter, sort, and paginate results
775
- *
776
- * @returns The composable payload {@link ClientHookReturnType}
777
- *
778
- * @see Underlying `@prismicio/client` method {@link proto.getByType}
779
- */
780
- declare const usePrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
781
- /**
782
- * A hook that queries all documents from the Prismic repository for a specific
783
- * Custom Type.
784
- *
785
- * @remarks
786
- * An additional `@prismicio/client` instance can be provided at `params.client`.
787
- *
788
- * @typeParam TDocument - Type of Prismic documents returned
789
- *
790
- * @param documentType - The API ID of the Custom Type
791
- * @param params - Parameters to filter and sort results
792
- *
793
- * @returns The composable payload {@link ClientHookReturnType}
794
- *
795
- * @see Underlying `@prismicio/client` method {@link proto.getAllByType}
796
- */
797
- declare const useAllPrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
798
- /**
799
- * A hook that queries documents from the Prismic repository with a specific tag.
800
- *
801
- * @remarks
802
- * An additional `@prismicio/client` instance can be provided at `params.client`.
803
- *
804
- * @typeParam TDocument - Type of Prismic documents returned
805
- *
806
- * @param tag - The tag that must be included on a document
807
- * @param params - Parameters to filter, sort, and paginate results
808
- *
809
- * @returns The composable payload {@link ClientHookReturnType}
810
- *
811
- * @see Underlying `@prismicio/client` method {@link proto.getByTag}
812
- */
813
- declare const usePrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
814
- /**
815
- * A hook that queries all documents from the Prismic repository with a specific tag.
816
- *
817
- * @remarks
818
- * An additional `@prismicio/client` instance can be provided at `params.client`.
819
- *
820
- * @typeParam TDocument - Type of Prismic documents returned
821
- *
822
- * @param tag - The tag that must be included on a document
823
- * @param params - Parameters to filter and sort results
824
- *
825
- * @returns The composable payload {@link ClientHookReturnType}
826
- *
827
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTag}
828
- */
829
- declare const useAllPrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
830
- /**
831
- * A hook that queries documents from the Prismic repository with specific tags.
832
- * A document must be tagged with at least one of the queried tags to be included.
833
- *
834
- * @remarks
835
- * An additional `@prismicio/client` instance can be provided at `params.client`.
836
- *
837
- * @typeParam TDocument - Type of Prismic documents returned
838
- *
839
- * @param tags - A list of tags that must be included on a document
840
- * @param params - Parameters to filter, sort, and paginate results
841
- *
842
- * @returns The composable payload {@link ClientHookReturnType}
843
- *
844
- * @see Underlying `@prismicio/client` method {@link proto.getByTags}
845
- */
846
- declare const usePrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
847
- /**
848
- * A hook that queries all documents from the Prismic repository with specific
849
- * tags. A document must be tagged with at least one of the queried tags to be included.
850
- *
851
- * @remarks
852
- * An additional `@prismicio/client` instance can be provided at `params.client`.
853
- *
854
- * @typeParam TDocument - Type of Prismic documents returned
855
- *
856
- * @param tags - A list of tags that must be included on a document
857
- * @param params - Parameters to filter and sort results
858
- *
859
- * @returns The composable payload {@link ClientHookReturnType}
860
- *
861
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
862
- */
863
- declare const useAllPrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
864
- /**
865
- * A hook that queries documents from the Prismic repository with specific tags.
866
- * A document must be tagged with all of the queried tags to be included.
867
- *
868
- * @remarks
869
- * An additional `@prismicio/client` instance can be provided at `params.client`.
870
- *
871
- * @typeParam TDocument - Type of Prismic documents returned
872
- *
873
- * @param tags - A list of tags that must be included on a document
874
- * @param params - Parameters to filter, sort, and paginate results
875
- *
876
- * @returns The composable payload {@link ClientHookReturnType}
877
- *
878
- * @see Underlying `@prismicio/client` method {@link proto.getByTags}
879
- */
880
- declare const usePrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
881
- /**
882
- * A hook that queries all documents from the Prismic repository with specific
883
- * tags. A document must be tagged with all of the queried tags to be included.
884
- *
885
- * @remarks
886
- * An additional `@prismicio/client` instance can be provided at `params.client`.
887
- *
888
- * @typeParam TDocument - Type of Prismic documents returned
889
- *
890
- * @param tags - A list of tags that must be included on a document
891
- * @param params - Parameters to filter and sort results
892
- *
893
- * @returns The composable payload {@link ClientHookReturnType}
894
- *
895
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
896
- */
596
+ /**
597
+ * A hook that queries content from the Prismic repository.
598
+ *
599
+ * @remarks
600
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
601
+ *
602
+ * @typeParam TDocument - Type of Prismic documents returned
603
+ *
604
+ * @param params - Parameters to filter, sort, and paginate results
605
+ *
606
+ * @returns The composable payload {@link ClientHookReturnType}
607
+ *
608
+ * @see Underlying `@prismicio/client` method {@link proto.get}
609
+ */
610
+ declare const usePrismicDocuments: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
611
+ /**
612
+ * A hook that queries content from the Prismic repository and returns only the
613
+ * first result, if any.
614
+ *
615
+ * @remarks
616
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
617
+ *
618
+ * @typeParam TDocument - Type of the Prismic document returned
619
+ *
620
+ * @param params - Parameters to filter, sort, and paginate results
621
+ *
622
+ * @returns The composable payload {@link ClientHookReturnType}
623
+ *
624
+ * @see Underlying `@prismicio/client` method {@link proto.getFirst}
625
+ */
626
+ declare const useFirstPrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
627
+ /**
628
+ * A hook that queries content from the Prismic repository and returns all
629
+ * matching content. If no predicates are provided, all documents will be fetched.
630
+ *
631
+ * @remarks
632
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
633
+ *
634
+ * @typeParam TDocument - Type of Prismic documents returned
635
+ *
636
+ * @param params - Parameters to filter and sort results
637
+ *
638
+ * @returns The composable payload {@link ClientHookReturnType}
639
+ *
640
+ * @see Underlying `@prismicio/client` method {@link proto.getAll}
641
+ */
642
+ declare const useAllPrismicDocumentsDangerously: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
643
+ limit?: number | undefined;
644
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
645
+ /**
646
+ * A hook that queries a document from the Prismic repository with a specific ID.
647
+ *
648
+ * @remarks
649
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
650
+ *
651
+ * @typeParam TDocument - Type of the Prismic document returned
652
+ *
653
+ * @param id - ID of the document
654
+ * @param params - Parameters to filter, sort, and paginate results
655
+ *
656
+ * @returns The composable payload {@link ClientHookReturnType}
657
+ *
658
+ * @see Underlying `@prismicio/client` method {@link proto.getByID}
659
+ */
660
+ declare const usePrismicDocumentByID: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
661
+ /**
662
+ * A hook that queries documents from the Prismic repository with specific IDs.
663
+ *
664
+ * @remarks
665
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
666
+ *
667
+ * @typeParam TDocument - Type of Prismic documents returned
668
+ *
669
+ * @param ids - A list of document IDs
670
+ * @param params - Parameters to filter, sort, and paginate results
671
+ *
672
+ * @returns The composable payload {@link ClientHookReturnType}
673
+ *
674
+ * @see Underlying `@prismicio/client` method {@link proto.getByIDs}
675
+ */
676
+ declare const usePrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
677
+ /**
678
+ * A hook that queries all documents from the Prismic repository with specific IDs.
679
+ *
680
+ * @remarks
681
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
682
+ *
683
+ * @typeParam TDocument - Type of Prismic documents returned
684
+ *
685
+ * @param ids - A list of document IDs
686
+ * @param params - Parameters to filter and sort results
687
+ *
688
+ * @returns The composable payload {@link ClientHookReturnType}
689
+ *
690
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByIDs}
691
+ */
692
+ declare const useAllPrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
693
+ /**
694
+ * A hook that queries a document from the Prismic repository with a specific
695
+ * UID and Custom Type.
696
+ *
697
+ * @remarks
698
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
699
+ *
700
+ * @typeParam TDocument - Type of the Prismic document returned
701
+ *
702
+ * @param documentType - The API ID of the document's Custom Type
703
+ * @param uid - UID of the document
704
+ * @param params - Parameters to filter, sort, and paginate results
705
+ *
706
+ * @returns The composable payload {@link ClientHookReturnType}
707
+ *
708
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
709
+ */
710
+ declare const usePrismicDocumentByUID: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
711
+ /**
712
+ * A hook that queries documents from the Prismic repository with specific UIDs
713
+ * of a Custom Type.
714
+ *
715
+ * @remarks
716
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
717
+ *
718
+ * @typeParam TDocument - Type of the Prismic document returned
719
+ *
720
+ * @param documentType - The API ID of the document's Custom Type
721
+ * @param uids - A list of document UIDs.
722
+ * @param params - Parameters to filter, sort, and paginate results
723
+ *
724
+ * @returns The composable payload {@link ClientHookReturnType}
725
+ *
726
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
727
+ */
728
+ declare const usePrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
729
+ /**
730
+ * A hook that queries all documents from the Prismic repository with specific
731
+ * UIDs of a Custom Type.
732
+ *
733
+ * @remarks
734
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
735
+ *
736
+ * @typeParam TDocument - Type of the Prismic document returned
737
+ *
738
+ * @param documentType - The API ID of the document's Custom Type
739
+ * @param uids - A list of document UIDs.
740
+ * @param params - Parameters to filter, sort, and paginate results
741
+ *
742
+ * @returns The composable payload {@link ClientHookReturnType}
743
+ *
744
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
745
+ */
746
+ declare const useAllPrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
747
+ /**
748
+ * A hook that queries a singleton document from the Prismic repository for a
749
+ * specific Custom Type.
750
+ *
751
+ * @remarks
752
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
753
+ *
754
+ * @typeParam TDocument - Type of the Prismic document returned
755
+ *
756
+ * @param documentType - The API ID of the singleton Custom Type
757
+ * @param params - Parameters to filter, sort, and paginate results
758
+ *
759
+ * @returns The composable payload {@link ClientHookReturnType}
760
+ *
761
+ * @see Underlying `@prismicio/client` method {@link proto.getSingle}
762
+ */
763
+ declare const useSinglePrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
764
+ /**
765
+ * A hook that queries documents from the Prismic repository for a specific Custom Type.
766
+ *
767
+ * @remarks
768
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
769
+ *
770
+ * @typeParam TDocument - Type of Prismic documents returned
771
+ *
772
+ * @param documentType - The API ID of the Custom Type
773
+ * @param params - Parameters to filter, sort, and paginate results
774
+ *
775
+ * @returns The composable payload {@link ClientHookReturnType}
776
+ *
777
+ * @see Underlying `@prismicio/client` method {@link proto.getByType}
778
+ */
779
+ declare const usePrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
780
+ /**
781
+ * A hook that queries all documents from the Prismic repository for a specific
782
+ * Custom Type.
783
+ *
784
+ * @remarks
785
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
786
+ *
787
+ * @typeParam TDocument - Type of Prismic documents returned
788
+ *
789
+ * @param documentType - The API ID of the Custom Type
790
+ * @param params - Parameters to filter and sort results
791
+ *
792
+ * @returns The composable payload {@link ClientHookReturnType}
793
+ *
794
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByType}
795
+ */
796
+ declare const useAllPrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
797
+ /**
798
+ * A hook that queries documents from the Prismic repository with a specific tag.
799
+ *
800
+ * @remarks
801
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
802
+ *
803
+ * @typeParam TDocument - Type of Prismic documents returned
804
+ *
805
+ * @param tag - The tag that must be included on a document
806
+ * @param params - Parameters to filter, sort, and paginate results
807
+ *
808
+ * @returns The composable payload {@link ClientHookReturnType}
809
+ *
810
+ * @see Underlying `@prismicio/client` method {@link proto.getByTag}
811
+ */
812
+ declare const usePrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
813
+ /**
814
+ * A hook that queries all documents from the Prismic repository with a specific tag.
815
+ *
816
+ * @remarks
817
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
818
+ *
819
+ * @typeParam TDocument - Type of Prismic documents returned
820
+ *
821
+ * @param tag - The tag that must be included on a document
822
+ * @param params - Parameters to filter and sort results
823
+ *
824
+ * @returns The composable payload {@link ClientHookReturnType}
825
+ *
826
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTag}
827
+ */
828
+ declare const useAllPrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
829
+ /**
830
+ * A hook that queries documents from the Prismic repository with specific tags.
831
+ * A document must be tagged with at least one of the queried tags to be included.
832
+ *
833
+ * @remarks
834
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
835
+ *
836
+ * @typeParam TDocument - Type of Prismic documents returned
837
+ *
838
+ * @param tags - A list of tags that must be included on a document
839
+ * @param params - Parameters to filter, sort, and paginate results
840
+ *
841
+ * @returns The composable payload {@link ClientHookReturnType}
842
+ *
843
+ * @see Underlying `@prismicio/client` method {@link proto.getByTags}
844
+ */
845
+ declare const usePrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
846
+ /**
847
+ * A hook that queries all documents from the Prismic repository with specific
848
+ * tags. A document must be tagged with at least one of the queried tags to be included.
849
+ *
850
+ * @remarks
851
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
852
+ *
853
+ * @typeParam TDocument - Type of Prismic documents returned
854
+ *
855
+ * @param tags - A list of tags that must be included on a document
856
+ * @param params - Parameters to filter and sort results
857
+ *
858
+ * @returns The composable payload {@link ClientHookReturnType}
859
+ *
860
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
861
+ */
862
+ declare const useAllPrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
863
+ /**
864
+ * A hook that queries documents from the Prismic repository with specific tags.
865
+ * A document must be tagged with all of the queried tags to be included.
866
+ *
867
+ * @remarks
868
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
869
+ *
870
+ * @typeParam TDocument - Type of Prismic documents returned
871
+ *
872
+ * @param tags - A list of tags that must be included on a document
873
+ * @param params - Parameters to filter, sort, and paginate results
874
+ *
875
+ * @returns The composable payload {@link ClientHookReturnType}
876
+ *
877
+ * @see Underlying `@prismicio/client` method {@link proto.getByTags}
878
+ */
879
+ declare const usePrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
880
+ /**
881
+ * A hook that queries all documents from the Prismic repository with specific
882
+ * tags. A document must be tagged with all of the queried tags to be included.
883
+ *
884
+ * @remarks
885
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
886
+ *
887
+ * @typeParam TDocument - Type of Prismic documents returned
888
+ *
889
+ * @param tags - A list of tags that must be included on a document
890
+ * @param params - Parameters to filter and sort results
891
+ *
892
+ * @returns The composable payload {@link ClientHookReturnType}
893
+ *
894
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
895
+ */
897
896
  declare const useAllPrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, prismicT.AnyRegularField | prismicT.GroupField<Record<string, prismicT.AnyRegularField>> | prismicT.SliceZone<prismicT.Slice<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>> | prismicT.SharedSlice<string, prismicT.SharedSliceVariation<string, Record<string, prismicT.AnyRegularField>, Record<string, prismicT.AnyRegularField>>>>>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
898
897
 
899
- /**
900
- * @deprecated Renamed to `Element` (without an "s").
901
- */
902
- declare const Elements: {
903
- readonly heading1: "heading1";
904
- readonly heading2: "heading2";
905
- readonly heading3: "heading3";
906
- readonly heading4: "heading4";
907
- readonly heading5: "heading5";
908
- readonly heading6: "heading6";
909
- readonly paragraph: "paragraph";
910
- readonly preformatted: "preformatted";
911
- readonly strong: "strong";
912
- readonly em: "em";
913
- readonly listItem: "list-item";
914
- readonly oListItem: "o-list-item";
915
- readonly list: "group-list-item";
916
- readonly oList: "group-o-list-item";
917
- readonly image: "image";
918
- readonly embed: "embed";
919
- readonly hyperlink: "hyperlink";
920
- readonly label: "label";
921
- readonly span: "span";
898
+ /**
899
+ * @deprecated Renamed to `Element` (without an "s").
900
+ */
901
+ declare const Elements: {
902
+ readonly heading1: "heading1";
903
+ readonly heading2: "heading2";
904
+ readonly heading3: "heading3";
905
+ readonly heading4: "heading4";
906
+ readonly heading5: "heading5";
907
+ readonly heading6: "heading6";
908
+ readonly paragraph: "paragraph";
909
+ readonly preformatted: "preformatted";
910
+ readonly strong: "strong";
911
+ readonly em: "em";
912
+ readonly listItem: "list-item";
913
+ readonly oListItem: "o-list-item";
914
+ readonly list: "group-list-item";
915
+ readonly oList: "group-o-list-item";
916
+ readonly image: "image";
917
+ readonly embed: "embed";
918
+ readonly hyperlink: "hyperlink";
919
+ readonly label: "label";
920
+ readonly span: "span";
922
921
  };
923
922
 
924
923
  export { Elements, JSXFunctionSerializer, JSXMapSerializer, LinkProps, PrismicClientHookState, PrismicContextValue, PrismicLink, PrismicLinkProps, PrismicProvider, PrismicProviderProps, PrismicRichText, PrismicRichTextProps, PrismicText, PrismicTextProps, PrismicToolbar, PrismicToolbarProps, SliceComponentProps, SliceComponentType, SliceLike, SliceZone, SliceZoneComponents, SliceZoneLike, SliceZoneProps, SliceZoneResolver, TODOSliceComponent, UsePrismicPreviewResolverArgs, useAllPrismicDocumentsByEveryTag, useAllPrismicDocumentsByIDs, useAllPrismicDocumentsBySomeTags, useAllPrismicDocumentsByTag, useAllPrismicDocumentsByType, useAllPrismicDocumentsByUIDs, useAllPrismicDocumentsDangerously, useFirstPrismicDocument, usePrismicClient, usePrismicContext, usePrismicDocumentByID, usePrismicDocumentByUID, usePrismicDocuments, usePrismicDocumentsByEveryTag, usePrismicDocumentsByIDs, usePrismicDocumentsBySomeTags, usePrismicDocumentsByTag, usePrismicDocumentsByType, usePrismicDocumentsByUIDs, usePrismicPreviewResolver, useSinglePrismicDocument };