@prismicio/react 2.4.1 → 2.5.0-alpha.0

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,1283 +5,1286 @@ import * as prismicT from '@prismicio/types';
5
5
  import * as prismicR from '@prismicio/richtext';
6
6
  export { Element } from '@prismicio/richtext';
7
7
 
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> = typeof defaultInternalComponent, ExternalComponent extends React.ElementType<LinkProps> = typeof defaultInternalComponent, LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = Omit<React.ComponentPropsWithoutRef<InternalComponent> & React.ComponentPropsWithoutRef<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
- * The default component rendered for internal URLs.
89
- */
90
- declare const defaultInternalComponent = "a";
91
- /**
92
- * React component that renders a link from a Prismic Link field.
93
- *
94
- * Different components can be rendered depending on whether the link is
95
- * internal or external. This is helpful when integrating with client-side
96
- * routers, such as a router-specific Link component.
97
- *
98
- * If a link is configured to open in a new window using `target="_blank"`,
99
- * `rel="noopener noreferrer"` is set by default.
100
- *
101
- * @param props - Props for the component.
102
- *
103
- * @returns The internal or external link component depending on whether the
104
- * link is internal or external.
105
- */
106
- declare const PrismicLink: <InternalComponent extends React.ElementType<LinkProps> = "a", ExternalComponent extends React.ElementType<LinkProps> = "a", LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction<string>>(props: PrismicLinkProps<InternalComponent, ExternalComponent, LinkResolverFunction> & {
107
- ref?: React.Ref<Element> | undefined;
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> = typeof defaultInternalComponent, ExternalComponent extends React.ElementType<LinkProps> = typeof defaultInternalComponent, LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = Omit<React.ComponentPropsWithoutRef<InternalComponent> & React.ComponentPropsWithoutRef<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
+ * The default component rendered for internal URLs.
89
+ */
90
+ declare const defaultInternalComponent = "a";
91
+ /**
92
+ * React component that renders a link from a Prismic Link field.
93
+ *
94
+ * Different components can be rendered depending on whether the link is
95
+ * internal or external. This is helpful when integrating with client-side
96
+ * routers, such as a router-specific Link component.
97
+ *
98
+ * If a link is configured to open in a new window using `target="_blank"`,
99
+ * `rel="noopener noreferrer"` is set by default.
100
+ *
101
+ * @param props - Props for the component.
102
+ *
103
+ * @returns The internal or external link component depending on whether the
104
+ * link is internal or external.
105
+ */
106
+ declare const PrismicLink: <InternalComponent extends React.ElementType<LinkProps> = "a", ExternalComponent extends React.ElementType<LinkProps> = "a", LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction<string>>(props: PrismicLinkProps<InternalComponent, ExternalComponent, LinkResolverFunction> & {
107
+ ref?: React.Ref<Element> | undefined;
108
108
  }) => JSX.Element | null;
109
109
 
110
- /**
111
- * A function mapping Rich Text block types to React Components. It is used to
112
- * render Rich Text or Title fields.
113
- *
114
- * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
115
- */
116
- declare type JSXFunctionSerializer = prismicR.RichTextFunctionSerializer<JSX.Element>;
117
- /**
118
- * A map of Rich Text block types to React Components. It is used to render Rich
119
- * Text or Title fields.
120
- *
121
- * @see Templating Rich Text and Title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
122
- */
123
- declare type JSXMapSerializer = prismicR.RichTextMapSerializer<JSX.Element>;
124
- /**
125
- * States of a `@prismicio/client` hook.
126
- */
110
+ /**
111
+ * A function mapping Rich Text block types to React Components. It is used to
112
+ * render Rich Text or Title fields.
113
+ *
114
+ * @see Templating rich text and title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
115
+ */
116
+ declare type JSXFunctionSerializer = prismicR.RichTextFunctionSerializer<JSX.Element>;
117
+ /**
118
+ * A map of Rich Text block types to React Components. It is used to render Rich
119
+ * Text or Title fields.
120
+ *
121
+ * @see Templating Rich Text and Title fields from Prismic {@link https://prismic.io/docs/technologies/templating-rich-text-and-title-fields-javascript}
122
+ */
123
+ declare type JSXMapSerializer = prismicR.RichTextMapSerializer<JSX.Element>;
124
+ /**
125
+ * States of a `@prismicio/client` hook.
126
+ */
127
127
  declare type PrismicClientHookState = "idle" | "loading" | "loaded" | "failed";
128
128
 
129
- /**
130
- * React context value containing shared configuration for `@prismicio/react`
131
- * components and hooks.
132
- */
133
- declare type PrismicContextValue<LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = {
134
- /**
135
- * A `@prismicio/client` instance used to fetch content from a Prismic
136
- * repository. This is used by `@prismicio/react` hooks, such as
137
- * `usePrismicDocuments()`.
138
- */
139
- client?: _prismicio_client.Client;
140
- /**
141
- * A Link Resolver used to resolve links for `<PrismicLink>` and `<PrismicRichText>`.
142
- *
143
- * @remarks
144
- * If your app uses Route Resolvers when querying for your Prismic
145
- * repository's content, a Link Resolver does not need to be provided.
146
- * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
147
- */
148
- linkResolver?: LinkResolverFunction;
149
- /**
150
- * A map or function that maps a Rich Text block to a React component.
151
- *
152
- * @remarks
153
- * Prefer using a map serializer over the function serializer when possible.
154
- * The map serializer is simpler to maintain.
155
- * @example A map serializer.
156
- *
157
- * ```jsx
158
- * {
159
- * heading1: ({children}) => <Heading>{children}</Heading>
160
- * }
161
- * ```
162
- *
163
- * @example A function serializer.
164
- *
165
- * ```jsx
166
- * (type, node, content, children) => {
167
- * switch (type) {
168
- * case "heading1": {
169
- * return <Heading>{chidlren}</Heading>;
170
- * }
171
- * }
172
- * };
173
- * ```
174
- */
175
- richTextComponents?: JSXMapSerializer | JSXFunctionSerializer;
176
- /**
177
- * The component rendered by `<PrismicLink>` for internal URLs. Defaults to `<a>`.
178
- */
179
- internalLinkComponent?: React.ElementType<LinkProps>;
180
- /**
181
- * The component rendered by `<PrismicLink>` for external URLs. Defaults to `<a>`.
182
- */
183
- externalLinkComponent?: React.ElementType<LinkProps>;
184
- /**
185
- * Children for the component.
186
- */
187
- children?: React.ReactNode;
188
- };
189
- /**
190
- * Props for `<PrismicProvider>`.
191
- */
192
- declare type PrismicProviderProps<LinkResolverFunction extends prismicH.LinkResolverFunction> = PrismicContextValue<LinkResolverFunction>;
193
- /**
194
- * React context provider to share configuration for `@prismicio/react`
195
- * components and hooks.
196
- *
197
- * @returns A React context provider with shared configuration.
198
- */
129
+ /**
130
+ * React context value containing shared configuration for `@prismicio/react`
131
+ * components and hooks.
132
+ */
133
+ declare type PrismicContextValue<LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = {
134
+ /**
135
+ * A `@prismicio/client` instance used to fetch content from a Prismic
136
+ * repository. This is used by `@prismicio/react` hooks, such as
137
+ * `usePrismicDocuments()`.
138
+ */
139
+ client?: _prismicio_client.Client;
140
+ /**
141
+ * A Link Resolver used to resolve links for `<PrismicLink>` and `<PrismicRichText>`.
142
+ *
143
+ * @remarks
144
+ * If your app uses Route Resolvers when querying for your Prismic
145
+ * repository's content, a Link Resolver does not need to be provided.
146
+ * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
147
+ */
148
+ linkResolver?: LinkResolverFunction;
149
+ /**
150
+ * A map or function that maps a Rich Text block to a React component.
151
+ *
152
+ * @remarks
153
+ * Prefer using a map serializer over the function serializer when possible.
154
+ * The map serializer is simpler to maintain.
155
+ * @example A map serializer.
156
+ *
157
+ * ```jsx
158
+ * {
159
+ * heading1: ({children}) => <Heading>{children}</Heading>
160
+ * }
161
+ * ```
162
+ *
163
+ * @example A function serializer.
164
+ *
165
+ * ```jsx
166
+ * (type, node, content, children) => {
167
+ * switch (type) {
168
+ * case "heading1": {
169
+ * return <Heading>{chidlren}</Heading>;
170
+ * }
171
+ * }
172
+ * };
173
+ * ```
174
+ */
175
+ richTextComponents?: JSXMapSerializer | JSXFunctionSerializer;
176
+ /**
177
+ * The component rendered by `<PrismicLink>` for internal URLs. Defaults to `<a>`.
178
+ */
179
+ internalLinkComponent?: React.ElementType<LinkProps>;
180
+ /**
181
+ * The component rendered by `<PrismicLink>` for external URLs. Defaults to `<a>`.
182
+ */
183
+ externalLinkComponent?: React.ElementType<LinkProps>;
184
+ /**
185
+ * Children for the component.
186
+ */
187
+ children?: React.ReactNode;
188
+ };
189
+ /**
190
+ * Props for `<PrismicProvider>`.
191
+ */
192
+ declare type PrismicProviderProps<LinkResolverFunction extends prismicH.LinkResolverFunction> = PrismicContextValue<LinkResolverFunction>;
193
+ /**
194
+ * React context provider to share configuration for `@prismicio/react`
195
+ * components and hooks.
196
+ *
197
+ * @returns A React context provider with shared configuration.
198
+ */
199
199
  declare const PrismicProvider: <LinkResolverFunction extends prismicH.LinkResolverFunction<any>>({ client, linkResolver, richTextComponents, internalLinkComponent, externalLinkComponent, children, }: PrismicProviderProps<LinkResolverFunction>) => JSX.Element;
200
200
 
201
- /**
202
- * React hook used to read shared configuration for `@prismicio/react`
203
- * components and hooks.
204
- *
205
- * @returns The closest `<PrismicProvider>` context value.
206
- */
201
+ /**
202
+ * React hook used to read shared configuration for `@prismicio/react`
203
+ * components and hooks.
204
+ *
205
+ * @returns The closest `<PrismicProvider>` context value.
206
+ */
207
207
  declare const usePrismicContext: () => PrismicContextValue;
208
208
 
209
- /**
210
- * Retrieve the `@prismicio/client` instance provided to `<PrismicProvider>`
211
- * higher in the React tree.
212
- *
213
- * @param explicitClient - An optional `@prismicio/client` instance to override
214
- * the Client provided to `<PrismicProvider>`.
215
- *
216
- * @returns The `@prismicio/client` instance provided to `<PrismicProvider>`.
217
- */
209
+ /**
210
+ * Retrieve the `@prismicio/client` instance provided to `<PrismicProvider>`
211
+ * higher in the React tree.
212
+ *
213
+ * @param explicitClient - An optional `@prismicio/client` instance to override
214
+ * the Client provided to `<PrismicProvider>`.
215
+ *
216
+ * @returns The `@prismicio/client` instance provided to `<PrismicProvider>`.
217
+ */
218
218
  declare const usePrismicClient: (explicitClient?: _prismicio_client.Client | undefined) => _prismicio_client.Client;
219
219
 
220
- /**
221
- * Props for `<PrismicText>`.
222
- */
223
- declare type PrismicTextProps = {
224
- /**
225
- * The Prismic Rich Text field to render.
226
- */
227
- field: prismicT.RichTextField | null | undefined;
228
- /**
229
- * The string rendered when the field is empty. If a fallback is not given,
230
- * `null` will be rendered.
231
- */
232
- fallback?: string;
233
- /**
234
- * The separator used between blocks. Defaults to `\n`.
235
- */
236
- separator?: string;
237
- };
238
- /**
239
- * React component that renders content from a Prismic Rich Text field as plain text.
240
- *
241
- * @remarks
242
- * This component returns a React fragment with no wrapping element around the
243
- * content. If you need a wrapper, add a component around `<PrismicText>`.
244
- * @example Rendering a Rich Text field as plain text.
245
- *
246
- * ```jsx
247
- * <PrismicText field={document.data.content} />;
248
- * ```
249
- *
250
- * @param props - Props for the component.
251
- *
252
- * @returns The Rich Text field's content as plain text.
253
- *
254
- * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
255
- */
220
+ /**
221
+ * Props for `<PrismicText>`.
222
+ */
223
+ declare type PrismicTextProps = {
224
+ /**
225
+ * The Prismic Rich Text field to render.
226
+ */
227
+ field: prismicT.RichTextField | null | undefined;
228
+ /**
229
+ * The string rendered when the field is empty. If a fallback is not given,
230
+ * `null` will be rendered.
231
+ */
232
+ fallback?: string;
233
+ /**
234
+ * The separator used between blocks. Defaults to `\n`.
235
+ */
236
+ separator?: string;
237
+ };
238
+ /**
239
+ * React component that renders content from a Prismic Rich Text field as plain text.
240
+ *
241
+ * @remarks
242
+ * This component returns a React fragment with no wrapping element around the
243
+ * content. If you need a wrapper, add a component around `<PrismicText>`.
244
+ * @example Rendering a Rich Text field as plain text.
245
+ *
246
+ * ```jsx
247
+ * <PrismicText field={document.data.content} />;
248
+ * ```
249
+ *
250
+ * @param props - Props for the component.
251
+ *
252
+ * @returns The Rich Text field's content as plain text.
253
+ *
254
+ * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
255
+ */
256
256
  declare const PrismicText: (props: PrismicTextProps) => JSX.Element | null;
257
257
 
258
- /**
259
- * Props for `<PrismicRichText>`.
260
- */
261
- declare type PrismicRichTextProps<LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = {
262
- /**
263
- * The Prismic Rich Text field to render.
264
- */
265
- field: prismicT.RichTextField | null | undefined;
266
- /**
267
- * The Link Resolver used to resolve links.
268
- *
269
- * @remarks
270
- * If your app uses Route Resolvers when querying for your Prismic
271
- * repository's content, a Link Resolver does not need to be provided.
272
- * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
273
- */
274
- linkResolver?: LinkResolverFunction;
275
- /**
276
- * A function that maps a Rich Text block to a React component.
277
- *
278
- * @deprecated Use the `components` prop instead. Prefer using a map
279
- * serializer when possible.
280
- * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
281
- */
282
- htmlSerializer?: JSXFunctionSerializer;
283
- /**
284
- * A map or function that maps a Rich Text block to a React component.
285
- *
286
- * @remarks
287
- * Prefer using a map serializer over the function serializer when possible.
288
- * The map serializer is simpler to maintain.
289
- * @example A map serializer.
290
- *
291
- * ```jsx
292
- * {
293
- * heading1: ({children}) => <Heading>{children}</Heading>
294
- * }
295
- * ```
296
- *
297
- * @example A function serializer.
298
- *
299
- * ```jsx
300
- * (type, node, content, children) => {
301
- * switch (type) {
302
- * case "heading1": {
303
- * return <Heading>{children}</Heading>;
304
- * }
305
- * }
306
- * };
307
- * ```
308
- */
309
- components?: JSXMapSerializer | JSXFunctionSerializer;
310
- /**
311
- * The React component rendered for links when the URL is internal.
312
- *
313
- * @defaultValue `<a>`
314
- */
315
- internalLinkComponent?: PrismicLinkProps["internalComponent"];
316
- /**
317
- * The React component rendered for links when the URL is external.
318
- *
319
- * @defaultValue `<a>`
320
- */
321
- externalLinkComponent?: PrismicLinkProps["externalComponent"];
322
- /**
323
- * The value to be rendered when the field is empty. If a fallback is not
324
- * given, `null` will be rendered.
325
- */
326
- fallback?: React.ReactNode;
327
- };
328
- /**
329
- * React component that renders content from a Prismic Rich Text field. By
330
- * default, HTML elements are rendered for each piece of content. A `heading1`
331
- * block will render an `<h1>` HTML element, for example. Links will use
332
- * `<PrismicLink>` by default which can be customized using the
333
- * `internalLinkComponent` and `externalLinkComponent` props.
334
- *
335
- * To customize the components that are rendered, provide a map or function
336
- * serializer to the `components` prop.
337
- *
338
- * Components can also be provided in a centralized location using the
339
- * `<PrismicProvider>` React context provider.
340
- *
341
- * @remarks
342
- * This component returns a React fragment with no wrapping element around the
343
- * content. If you need a wrapper, add a component around `<PrismicRichText>`.
344
- * @example Rendering a Rich Text field using the default HTMl elements.
345
- *
346
- * ```jsx
347
- * <PrismicRichText field={document.data.content} />;
348
- * ```
349
- *
350
- * @example Rendering a Rich Text field using a custom set of React components.
351
- *
352
- * ```jsx
353
- * <PrismicRichText
354
- * field={document.data.content}
355
- * components={{
356
- * heading1: ({ children }) => <Heading>{children}</Heading>,
357
- * }}
358
- * />;
359
- * ```
360
- *
361
- * @param props - Props for the component.
362
- *
363
- * @returns The Rich Text field's content as React components.
364
- *
365
- * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
366
- * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
367
- */
258
+ /**
259
+ * Props for `<PrismicRichText>`.
260
+ */
261
+ declare type PrismicRichTextProps<LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction> = {
262
+ /**
263
+ * The Prismic Rich Text field to render.
264
+ */
265
+ field: prismicT.RichTextField | null | undefined;
266
+ /**
267
+ * The Link Resolver used to resolve links.
268
+ *
269
+ * @remarks
270
+ * If your app uses Route Resolvers when querying for your Prismic
271
+ * repository's content, a Link Resolver does not need to be provided.
272
+ * @see Learn about Link Resolvers and Route Resolvers {@link https://prismic.io/docs/core-concepts/link-resolver-route-resolver}
273
+ */
274
+ linkResolver?: LinkResolverFunction;
275
+ /**
276
+ * A function that maps a Rich Text block to a React component.
277
+ *
278
+ * @deprecated Use the `components` prop instead. Prefer using a map
279
+ * serializer when possible.
280
+ * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
281
+ */
282
+ htmlSerializer?: JSXFunctionSerializer;
283
+ /**
284
+ * A map or function that maps a Rich Text block to a React component.
285
+ *
286
+ * @remarks
287
+ * Prefer using a map serializer over the function serializer when possible.
288
+ * The map serializer is simpler to maintain.
289
+ * @example A map serializer.
290
+ *
291
+ * ```jsx
292
+ * {
293
+ * heading1: ({children}) => <Heading>{children}</Heading>
294
+ * }
295
+ * ```
296
+ *
297
+ * @example A function serializer.
298
+ *
299
+ * ```jsx
300
+ * (type, node, content, children) => {
301
+ * switch (type) {
302
+ * case "heading1": {
303
+ * return <Heading>{children}</Heading>;
304
+ * }
305
+ * }
306
+ * };
307
+ * ```
308
+ */
309
+ components?: JSXMapSerializer | JSXFunctionSerializer;
310
+ /**
311
+ * The React component rendered for links when the URL is internal.
312
+ *
313
+ * @defaultValue `<a>`
314
+ */
315
+ internalLinkComponent?: PrismicLinkProps["internalComponent"];
316
+ /**
317
+ * The React component rendered for links when the URL is external.
318
+ *
319
+ * @defaultValue `<a>`
320
+ */
321
+ externalLinkComponent?: PrismicLinkProps["externalComponent"];
322
+ /**
323
+ * The value to be rendered when the field is empty. If a fallback is not
324
+ * given, `null` will be rendered.
325
+ */
326
+ fallback?: React.ReactNode;
327
+ };
328
+ /**
329
+ * React component that renders content from a Prismic Rich Text field. By
330
+ * default, HTML elements are rendered for each piece of content. A `heading1`
331
+ * block will render an `<h1>` HTML element, for example. Links will use
332
+ * `<PrismicLink>` by default which can be customized using the
333
+ * `internalLinkComponent` and `externalLinkComponent` props.
334
+ *
335
+ * To customize the components that are rendered, provide a map or function
336
+ * serializer to the `components` prop.
337
+ *
338
+ * Components can also be provided in a centralized location using the
339
+ * `<PrismicProvider>` React context provider.
340
+ *
341
+ * @remarks
342
+ * This component returns a React fragment with no wrapping element around the
343
+ * content. If you need a wrapper, add a component around `<PrismicRichText>`.
344
+ * @example Rendering a Rich Text field using the default HTMl elements.
345
+ *
346
+ * ```jsx
347
+ * <PrismicRichText field={document.data.content} />;
348
+ * ```
349
+ *
350
+ * @example Rendering a Rich Text field using a custom set of React components.
351
+ *
352
+ * ```jsx
353
+ * <PrismicRichText
354
+ * field={document.data.content}
355
+ * components={{
356
+ * heading1: ({ children }) => <Heading>{children}</Heading>,
357
+ * }}
358
+ * />;
359
+ * ```
360
+ *
361
+ * @param props - Props for the component.
362
+ *
363
+ * @returns The Rich Text field's content as React components.
364
+ *
365
+ * @see Learn about Rich Text fields {@link https://prismic.io/docs/core-concepts/rich-text-title}
366
+ * @see Learn about Rich Text serializers {@link https://prismic.io/docs/core-concepts/html-serializer}
367
+ */
368
368
  declare const PrismicRichText: <LinkResolverFunction extends prismicH.LinkResolverFunction<any> = prismicH.LinkResolverFunction<string>>(props: PrismicRichTextProps<LinkResolverFunction>) => JSX.Element | null;
369
369
 
370
- /**
371
- * Props for `<PrismicImage>`.
372
- */
373
- declare type PrismicImageProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "srcset" | "alt"> & {
374
- /**
375
- * The Prismic Image field or thumbnail to render.
376
- */
377
- field: prismicT.ImageFieldImage | null | undefined;
378
- /**
379
- * An object of Imgix URL API parameters to transform the image.
380
- *
381
- * See: https://docs.imgix.com/apis/rendering
382
- */
383
- imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
384
- /**
385
- * Declare an image as decorative by providing `alt=""`.
386
- *
387
- * See:
388
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
389
- */
390
- alt?: "";
391
- /**
392
- * Declare an image as decorative only if the Image field does not have
393
- * alternative text by providing `fallbackAlt=""`.
394
- *
395
- * See:
396
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
397
- */
398
- fallbackAlt?: "";
399
- } & ({
400
- /**
401
- * Widths used to build a `srcset` value for the Image field.
402
- *
403
- * If a `widths` prop is not given or `"defaults"` is passed, the
404
- * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
405
- *
406
- * If the Image field contains responsive views, each responsive view
407
- * can be used as a width in the resulting `srcset` by passing
408
- * `"thumbnails"` as the `widths` prop.
409
- */
410
- widths?: NonNullable<Parameters<typeof prismicH.asImageWidthSrcSet>[1]>["widths"] | "defaults";
411
- /**
412
- * Not used when the `widths` prop is used.
413
- */
414
- pixelDensities?: never;
415
- } | {
416
- /**
417
- * Not used when the `widths` prop is used.
418
- */
419
- widths?: never;
420
- /**
421
- * Pixel densities used to build a `srcset` value for the Image field.
422
- *
423
- * If a `pixelDensities` prop is passed `"defaults"`, the following
424
- * pixel densities will be used: 1, 2, 3.
425
- */
426
- pixelDensities: NonNullable<Parameters<typeof prismicH.asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
427
- });
428
- /**
429
- * React component that renders an image from a Prismic Image field or one of
430
- * its thumbnails. It will automatically set the `alt` attribute using the Image
431
- * field's `alt` property.
432
- *
433
- * By default, a widths-based srcset will be used to support responsive images.
434
- * This ensures only the smallest image needed for a browser is downloaded.
435
- *
436
- * To use a pixel-density-based srcset, use the `pixelDensities` prop. Default
437
- * pixel densities can be used by using `pixelDensities="defaults"`.
438
- *
439
- * **Note**: If you are using a framework that has a native image component,
440
- * such as Next.js and Gatsby, prefer using those image components instead. They
441
- * can provide deeper framework integration than `<PrismicImage>`.
442
- *
443
- * @param props - Props for the component.
444
- *
445
- * @returns A responsive image component for the given Image field.
446
- */
447
- declare const PrismicImage: React.ForwardRefExoticComponent<(Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "alt" | "srcset"> & {
448
- /**
449
- * The Prismic Image field or thumbnail to render.
450
- */
451
- field: prismicT.ImageFieldImage | null | undefined;
452
- /**
453
- * An object of Imgix URL API parameters to transform the image.
454
- *
455
- * See: https://docs.imgix.com/apis/rendering
456
- */
457
- imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
458
- /**
459
- * Declare an image as decorative by providing `alt=""`.
460
- *
461
- * See:
462
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
463
- */
464
- alt?: "" | undefined;
465
- /**
466
- * Declare an image as decorative only if the Image field does not have
467
- * alternative text by providing `fallbackAlt=""`.
468
- *
469
- * See:
470
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
471
- */
472
- fallbackAlt?: "" | undefined;
473
- } & {
474
- /**
475
- * Widths used to build a `srcset` value for the Image field.
476
- *
477
- * If a `widths` prop is not given or `"defaults"` is passed, the
478
- * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
479
- *
480
- * If the Image field contains responsive views, each responsive view
481
- * can be used as a width in the resulting `srcset` by passing
482
- * `"thumbnails"` as the `widths` prop.
483
- */
484
- widths?: NonNullable<Parameters<typeof prismicH.asImageWidthSrcSet>[1]>["widths"] | "defaults";
485
- /**
486
- * Not used when the `widths` prop is used.
487
- */
488
- pixelDensities?: undefined;
489
- }, "children" | "slot" | "style" | "title" | "className" | "color" | "height" | "id" | "lang" | "width" | "role" | "tabIndex" | "crossOrigin" | "widths" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "useMap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "referrerPolicy" | "alt" | "loading" | "decoding" | "sizes" | "srcSet" | "field" | "pixelDensities" | "imgixParams" | "fallbackAlt"> | Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "alt" | "srcset"> & {
490
- /**
491
- * The Prismic Image field or thumbnail to render.
492
- */
493
- field: prismicT.ImageFieldImage | null | undefined;
494
- /**
495
- * An object of Imgix URL API parameters to transform the image.
496
- *
497
- * See: https://docs.imgix.com/apis/rendering
498
- */
499
- imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
500
- /**
501
- * Declare an image as decorative by providing `alt=""`.
502
- *
503
- * See:
504
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
505
- */
506
- alt?: "" | undefined;
507
- /**
508
- * Declare an image as decorative only if the Image field does not have
509
- * alternative text by providing `fallbackAlt=""`.
510
- *
511
- * See:
512
- * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
513
- */
514
- fallbackAlt?: "" | undefined;
515
- } & {
516
- /**
517
- * Not used when the `widths` prop is used.
518
- */
519
- widths?: undefined;
520
- /**
521
- * Pixel densities used to build a `srcset` value for the Image field.
522
- *
523
- * If a `pixelDensities` prop is passed `"defaults"`, the following
524
- * pixel densities will be used: 1, 2, 3.
525
- */
526
- pixelDensities: NonNullable<Parameters<typeof prismicH.asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
370
+ /**
371
+ * Props for `<PrismicImage>`.
372
+ */
373
+ declare type PrismicImageProps = Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "srcset" | "alt"> & {
374
+ /**
375
+ * The Prismic Image field or thumbnail to render.
376
+ */
377
+ field: prismicT.ImageFieldImage | null | undefined;
378
+ /**
379
+ * An object of Imgix URL API parameters to transform the image.
380
+ *
381
+ * See: https://docs.imgix.com/apis/rendering
382
+ */
383
+ imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
384
+ /**
385
+ * Declare an image as decorative by providing `alt=""`.
386
+ *
387
+ * See:
388
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
389
+ */
390
+ alt?: "";
391
+ /**
392
+ * Declare an image as decorative only if the Image field does not have
393
+ * alternative text by providing `fallbackAlt=""`.
394
+ *
395
+ * See:
396
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
397
+ */
398
+ fallbackAlt?: "";
399
+ } & ({
400
+ /**
401
+ * Widths used to build a `srcset` value for the Image field.
402
+ *
403
+ * If a `widths` prop is not given or `"defaults"` is passed, the
404
+ * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
405
+ *
406
+ * If the Image field contains responsive views, each responsive view
407
+ * can be used as a width in the resulting `srcset` by passing
408
+ * `"thumbnails"` as the `widths` prop.
409
+ */
410
+ widths?: NonNullable<Parameters<typeof prismicH.asImageWidthSrcSet>[1]>["widths"] | "defaults";
411
+ /**
412
+ * Not used when the `widths` prop is used.
413
+ */
414
+ pixelDensities?: never;
415
+ } | {
416
+ /**
417
+ * Not used when the `widths` prop is used.
418
+ */
419
+ widths?: never;
420
+ /**
421
+ * Pixel densities used to build a `srcset` value for the Image field.
422
+ *
423
+ * If a `pixelDensities` prop is passed `"defaults"`, the following
424
+ * pixel densities will be used: 1, 2, 3.
425
+ */
426
+ pixelDensities: NonNullable<Parameters<typeof prismicH.asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
427
+ });
428
+ /**
429
+ * React component that renders an image from a Prismic Image field or one of
430
+ * its thumbnails. It will automatically set the `alt` attribute using the Image
431
+ * field's `alt` property.
432
+ *
433
+ * By default, a widths-based srcset will be used to support responsive images.
434
+ * This ensures only the smallest image needed for a browser is downloaded.
435
+ *
436
+ * To use a pixel-density-based srcset, use the `pixelDensities` prop. Default
437
+ * pixel densities can be used by using `pixelDensities="defaults"`.
438
+ *
439
+ * **Note**: If you are using a framework that has a native image component,
440
+ * such as Next.js and Gatsby, prefer using those image components instead. They
441
+ * can provide deeper framework integration than `<PrismicImage>`.
442
+ *
443
+ * @param props - Props for the component.
444
+ *
445
+ * @returns A responsive image component for the given Image field.
446
+ */
447
+ declare const PrismicImage: React.ForwardRefExoticComponent<(Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "alt" | "srcset"> & {
448
+ /**
449
+ * The Prismic Image field or thumbnail to render.
450
+ */
451
+ field: prismicT.ImageFieldImage | null | undefined;
452
+ /**
453
+ * An object of Imgix URL API parameters to transform the image.
454
+ *
455
+ * See: https://docs.imgix.com/apis/rendering
456
+ */
457
+ imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
458
+ /**
459
+ * Declare an image as decorative by providing `alt=""`.
460
+ *
461
+ * See:
462
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
463
+ */
464
+ alt?: "" | undefined;
465
+ /**
466
+ * Declare an image as decorative only if the Image field does not have
467
+ * alternative text by providing `fallbackAlt=""`.
468
+ *
469
+ * See:
470
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
471
+ */
472
+ fallbackAlt?: "" | undefined;
473
+ } & {
474
+ /**
475
+ * Widths used to build a `srcset` value for the Image field.
476
+ *
477
+ * If a `widths` prop is not given or `"defaults"` is passed, the
478
+ * following widths will be used: 640, 750, 828, 1080, 1200, 1920, 2048, 3840.
479
+ *
480
+ * If the Image field contains responsive views, each responsive view
481
+ * can be used as a width in the resulting `srcset` by passing
482
+ * `"thumbnails"` as the `widths` prop.
483
+ */
484
+ widths?: NonNullable<Parameters<typeof prismicH.asImageWidthSrcSet>[1]>["widths"] | "defaults";
485
+ /**
486
+ * Not used when the `widths` prop is used.
487
+ */
488
+ pixelDensities?: undefined;
489
+ }, "children" | "slot" | "style" | "title" | "className" | "color" | "height" | "id" | "lang" | "width" | "role" | "tabIndex" | "crossOrigin" | "widths" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "useMap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "referrerPolicy" | "alt" | "loading" | "decoding" | "sizes" | "srcSet" | "field" | "pixelDensities" | "imgixParams" | "fallbackAlt"> | Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src" | "alt" | "srcset"> & {
490
+ /**
491
+ * The Prismic Image field or thumbnail to render.
492
+ */
493
+ field: prismicT.ImageFieldImage | null | undefined;
494
+ /**
495
+ * An object of Imgix URL API parameters to transform the image.
496
+ *
497
+ * See: https://docs.imgix.com/apis/rendering
498
+ */
499
+ imgixParams?: Parameters<typeof prismicH.asImageSrc>[1];
500
+ /**
501
+ * Declare an image as decorative by providing `alt=""`.
502
+ *
503
+ * See:
504
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
505
+ */
506
+ alt?: "" | undefined;
507
+ /**
508
+ * Declare an image as decorative only if the Image field does not have
509
+ * alternative text by providing `fallbackAlt=""`.
510
+ *
511
+ * See:
512
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt#decorative_images
513
+ */
514
+ fallbackAlt?: "" | undefined;
515
+ } & {
516
+ /**
517
+ * Not used when the `widths` prop is used.
518
+ */
519
+ widths?: undefined;
520
+ /**
521
+ * Pixel densities used to build a `srcset` value for the Image field.
522
+ *
523
+ * If a `pixelDensities` prop is passed `"defaults"`, the following
524
+ * pixel densities will be used: 1, 2, 3.
525
+ */
526
+ pixelDensities: NonNullable<Parameters<typeof prismicH.asImagePixelDensitySrcSet>[1]>["pixelDensities"] | "defaults";
527
527
  }, "children" | "slot" | "style" | "title" | "className" | "color" | "height" | "id" | "lang" | "width" | "role" | "tabIndex" | "crossOrigin" | "widths" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "useMap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "referrerPolicy" | "alt" | "loading" | "decoding" | "sizes" | "srcSet" | "field" | "pixelDensities" | "imgixParams" | "fallbackAlt">) & React.RefAttributes<HTMLImageElement>>;
528
528
 
529
- declare type WordSeparators = "-" | "_" | " ";
530
- declare type Split<S extends string, Delimiter extends string> = S extends `${infer Head}${Delimiter}${infer Tail}` ? [Head, ...Split<Tail, Delimiter>] : S extends Delimiter ? [] : [S];
531
- declare type InnerCamelCaseStringArray<Parts extends readonly any[], PreviousPart> = Parts extends [`${infer FirstPart}`, ...infer RemainingParts] ? FirstPart extends undefined ? "" : FirstPart extends "" ? InnerCamelCaseStringArray<RemainingParts, PreviousPart> : `${PreviousPart extends "" ? FirstPart : Capitalize<FirstPart>}${InnerCamelCaseStringArray<RemainingParts, FirstPart>}` : "";
532
- declare type CamelCaseStringArray<Parts extends readonly string[]> = Parts extends [
533
- `${infer FirstPart}`,
534
- ...infer RemainingParts
535
- ] ? Uncapitalize<`${FirstPart}${InnerCamelCaseStringArray<RemainingParts, FirstPart>}`> : never;
536
- declare type CamelCase<K> = K extends string ? CamelCaseStringArray<Split<K extends Uppercase<K> ? Lowercase<K> : K, WordSeparators>> : K;
537
- /**
538
- * Converts a string literal to Pascal case.
539
- *
540
- * Taken from the `type-fest` package.
541
- *
542
- * See:
543
- * https://github.com/sindresorhus/type-fest/blob/61c35052f09caa23de5eef96d95196375d8ed498/source/pascal-case.d.ts
544
- */
529
+ declare type WordSeparators = "-" | "_" | " ";
530
+ declare type Split<S extends string, Delimiter extends string> = S extends `${infer Head}${Delimiter}${infer Tail}` ? [Head, ...Split<Tail, Delimiter>] : S extends Delimiter ? [] : [S];
531
+ declare type InnerCamelCaseStringArray<Parts extends readonly any[], PreviousPart> = Parts extends [`${infer FirstPart}`, ...infer RemainingParts] ? FirstPart extends undefined ? "" : FirstPart extends "" ? InnerCamelCaseStringArray<RemainingParts, PreviousPart> : `${PreviousPart extends "" ? FirstPart : Capitalize<FirstPart>}${InnerCamelCaseStringArray<RemainingParts, FirstPart>}` : "";
532
+ declare type CamelCaseStringArray<Parts extends readonly string[]> = Parts extends [
533
+ `${infer FirstPart}`,
534
+ ...infer RemainingParts
535
+ ] ? Uncapitalize<`${FirstPart}${InnerCamelCaseStringArray<RemainingParts, FirstPart>}`> : never;
536
+ declare type CamelCase<K> = K extends string ? CamelCaseStringArray<Split<K extends Uppercase<K> ? Lowercase<K> : K, WordSeparators>> : K;
537
+ /**
538
+ * Converts a string literal to Pascal case.
539
+ *
540
+ * Taken from the `type-fest` package.
541
+ *
542
+ * See:
543
+ * https://github.com/sindresorhus/type-fest/blob/61c35052f09caa23de5eef96d95196375d8ed498/source/pascal-case.d.ts
544
+ */
545
545
  declare type PascalCase<Value> = CamelCase<Value> extends string ? Capitalize<CamelCase<Value>> : CamelCase<Value>;
546
546
 
547
- /**
548
- * Returns the type of a `SliceLike` type.
549
- *
550
- * @typeParam Slice - The Slice from which the type will be extracted.
551
- */
552
- declare type ExtractSliceType<Slice extends SliceLike> = Slice extends SliceLikeRestV2 ? Slice["slice_type"] : Slice extends SliceLikeGraphQL ? Slice["type"] : never;
553
- /**
554
- * The minimum required properties to represent a Prismic Slice from the Prismic
555
- * Rest API V2 for the `<SliceZone>` component.
556
- *
557
- * If using Prismic's Rest API V2, use the `Slice` export from
558
- * `@prismicio/types` for a full interface.
559
- *
560
- * @typeParam SliceType - Type name of the Slice.
561
- */
562
- declare type SliceLikeRestV2<SliceType extends string = string> = {
563
- slice_type: prismicT.Slice<SliceType>["slice_type"];
564
- };
565
- /**
566
- * The minimum required properties to represent a Prismic Slice from the Prismic
567
- * GraphQL API for the `<SliceZone>` component.
568
- *
569
- * @typeParam SliceType - Type name of the Slice.
570
- */
571
- declare type SliceLikeGraphQL<SliceType extends string = string> = {
572
- type: prismicT.Slice<SliceType>["slice_type"];
573
- };
574
- /**
575
- * The minimum required properties to represent a Prismic Slice for the
576
- * `<SliceZone>` component.
577
- *
578
- * If using Prismic's Rest API V2, use the `Slice` export from
579
- * `@prismicio/types` for a full interface.
580
- *
581
- * @typeParam SliceType - Type name of the Slice.
582
- */
583
- declare type SliceLike<SliceType extends string = string> = SliceLikeRestV2<SliceType> | SliceLikeGraphQL<SliceType>;
584
- /**
585
- * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
586
- *
587
- * If using Prismic's Rest API V2, use the `SliceZone` export from
588
- * `@prismicio/types` for the full type.
589
- *
590
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
591
- */
592
- declare type SliceZoneLike<TSlice extends SliceLike> = readonly TSlice[];
593
- /**
594
- * React props for a component rendering content from a Prismic Slice using the
595
- * `<SliceZone>` component.
596
- *
597
- * @typeParam TSlice - The Slice passed as a prop.
598
- * @typeParam TContext - Arbitrary data passed to `<SliceZone>` and made
599
- * available to all Slice components.
600
- */
601
- declare type SliceComponentProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
602
- /**
603
- * Slice data for this component.
604
- */
605
- slice: TSlice;
606
- /**
607
- * The index of the Slice in the Slice Zone.
608
- */
609
- index: number;
610
- /**
611
- * All Slices from the Slice Zone to which the Slice belongs.
612
- */
613
- slices: SliceZoneLike<SliceLike>;
614
- /**
615
- * Arbitrary data passed to `<SliceZone>` and made available to all Slice components.
616
- */
617
- context: TContext;
618
- };
619
- /**
620
- * A React component to be rendered for each instance of its Slice.
621
- *
622
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
623
- * @typeParam TContext - Arbitrary data made available to all Slice components.
624
- */
625
- declare type SliceComponentType<TSlice extends SliceLike = SliceLike, TContext = unknown> = React.ComponentType<SliceComponentProps<TSlice, TContext>>;
626
- /**
627
- * A record of Slice types mapped to a React component. The component will be
628
- * rendered for each instance of its Slice.
629
- *
630
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
631
- * @typeParam TContext - Arbitrary data made available to all Slice components.
632
- */
633
- declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
634
- [SliceType in ExtractSliceType<TSlice>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext>;
635
- };
636
- /**
637
- * This Slice component can be used as a reminder to provide a proper implementation.
638
- *
639
- * This is also the default React component rendered when a component mapping
640
- * cannot be found in `<SliceZone>`.
641
- */
642
- declare const TODOSliceComponent: <TSlice extends SliceLike<string>, TContext>({ slice, }: SliceComponentProps<TSlice, TContext>) => JSX.Element | null;
643
- /**
644
- * Arguments for a `<SliceZone>` `resolver` function.
645
- */
646
- declare type SliceZoneResolverArgs<TSlice extends SliceLike = SliceLike> = {
647
- /**
648
- * The Slice to resolve to a React component.
649
- */
650
- slice: TSlice;
651
- /**
652
- * The name of the Slice.
653
- */
654
- sliceName: PascalCase<ExtractSliceType<TSlice>>;
655
- /**
656
- * The index of the Slice in the Slice Zone.
657
- */
658
- i: number;
659
- };
660
- /**
661
- * A function that determines the rendered React component for each Slice in the
662
- * Slice Zone. If a nullish value is returned, the component will fallback to
663
- * the `components` or `defaultComponent` props to determine the rendered component.
664
- *
665
- * @deprecated Use the `components` prop instead.
666
- *
667
- * @param args - Arguments for the resolver function.
668
- *
669
- * @returns The React component to render for a Slice.
670
- */
671
- declare type SliceZoneResolver<TSlice extends SliceLike = SliceLike, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<TSlice, TContext> | undefined | null;
672
- /**
673
- * React props for the `<SliceZone>` component.
674
- *
675
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
676
- * @typeParam TContext - Arbitrary data made available to all Slice components.
677
- */
678
- declare type SliceZoneProps<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
679
- /**
680
- * List of Slice data from the Slice Zone.
681
- */
682
- slices?: SliceZoneLike<TSlice>;
683
- /**
684
- * A record mapping Slice types to React components.
685
- */
686
- components?: SliceZoneComponents<TSlice, TContext>;
687
- /**
688
- * A function that determines the rendered React component for each Slice in
689
- * the Slice Zone.
690
- *
691
- * @deprecated Use the `components` prop instead.
692
- *
693
- * @param args - Arguments for the resolver function.
694
- *
695
- * @returns The React component to render for a Slice.
696
- */
697
- resolver?: SliceZoneResolver<TSlice, TContext>;
698
- /**
699
- * The React component rendered if a component mapping from the `components`
700
- * prop cannot be found.
701
- */
702
- defaultComponent?: SliceComponentType<TSlice, TContext>;
703
- /**
704
- * Arbitrary data made available to all Slice components.
705
- */
706
- context?: TContext;
707
- };
708
- /**
709
- * Renders content from a Prismic Slice Zone using React components for each
710
- * type of Slice.
711
- *
712
- * If a component is not provided for a type of Slice, a default component can
713
- * be provided. A fallback component is provided by default that will not be
714
- * rendered in a production build of your app.
715
- *
716
- * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
717
- * @typeParam TContext - Arbitrary data made available to all Slice components.
718
- *
719
- * @returns The Slice Zone's content as React components.
720
- *
721
- * @see Learn about Prismic Slices and Slice Zones {@link https://prismic.io/docs/core-concepts/slices}
722
- */
723
- declare const SliceZone: <TSlice extends SliceLike<string>, TContext>({ slices, components, resolver, defaultComponent, context, }: SliceZoneProps<TSlice, TContext>) => JSX.Element;
547
+ /**
548
+ * Returns the type of a `SliceLike` type.
549
+ *
550
+ * @typeParam Slice - The Slice from which the type will be extracted.
551
+ */
552
+ declare type ExtractSliceType<Slice extends SliceLike> = Slice extends SliceLikeRestV2 ? Slice["slice_type"] : Slice extends SliceLikeGraphQL ? Slice["type"] : never;
553
+ /**
554
+ * The minimum required properties to represent a Prismic Slice from the Prismic
555
+ * Rest API V2 for the `<SliceZone>` component.
556
+ *
557
+ * If using Prismic's Rest API V2, use the `Slice` export from
558
+ * `@prismicio/types` for a full interface.
559
+ *
560
+ * @typeParam SliceType - Type name of the Slice.
561
+ */
562
+ declare type SliceLikeRestV2<SliceType extends string = string> = {
563
+ slice_type: prismicT.Slice<SliceType>["slice_type"];
564
+ slice_id?: string;
565
+ };
566
+ /**
567
+ * The minimum required properties to represent a Prismic Slice from the Prismic
568
+ * GraphQL API for the `<SliceZone>` component.
569
+ *
570
+ * @typeParam SliceType - Type name of the Slice.
571
+ */
572
+ declare type SliceLikeGraphQL<SliceType extends string = string> = {
573
+ type: prismicT.Slice<SliceType>["slice_type"];
574
+ };
575
+ /**
576
+ * The minimum required properties to represent a Prismic Slice for the
577
+ * `<SliceZone>` component.
578
+ *
579
+ * If using Prismic's Rest API V2, use the `Slice` export from
580
+ * `@prismicio/types` for a full interface.
581
+ *
582
+ * @typeParam SliceType - Type name of the Slice.
583
+ */
584
+ declare type SliceLike<SliceType extends string = string> = SliceLikeRestV2<SliceType> | SliceLikeGraphQL<SliceType>;
585
+ /**
586
+ * A looser version of the `SliceZone` type from `@prismicio/types` using `SliceLike`.
587
+ *
588
+ * If using Prismic's Rest API V2, use the `SliceZone` export from
589
+ * `@prismicio/types` for the full type.
590
+ *
591
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
592
+ */
593
+ declare type SliceZoneLike<TSlice extends SliceLike = SliceLike> = readonly TSlice[];
594
+ /**
595
+ * React props for a component rendering content from a Prismic Slice using the
596
+ * `<SliceZone>` component.
597
+ *
598
+ * @typeParam TSlice - The Slice passed as a prop.
599
+ * @typeParam TContext - Arbitrary data passed to `<SliceZone>` and made
600
+ * available to all Slice components.
601
+ */
602
+ declare type SliceComponentProps<TSlice extends SliceLike = any, TContext = unknown> = {
603
+ /**
604
+ * Slice data for this component.
605
+ */
606
+ slice: TSlice;
607
+ /**
608
+ * The index of the Slice in the Slice Zone.
609
+ */
610
+ index: number;
611
+ /**
612
+ * All Slices from the Slice Zone to which the Slice belongs.
613
+ */
614
+ slices: SliceZoneLike<SliceLike>;
615
+ /**
616
+ * Arbitrary data passed to `<SliceZone>` and made available to all Slice components.
617
+ */
618
+ context: TContext;
619
+ };
620
+ /**
621
+ * A React component to be rendered for each instance of its Slice.
622
+ *
623
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
624
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
625
+ */
626
+ declare type SliceComponentType<TSlice extends SliceLike = any, TContext = unknown> = React.ComponentType<SliceComponentProps<TSlice, TContext>>;
627
+ /**
628
+ * A record of Slice types mapped to a React component. The component will be
629
+ * rendered for each instance of its Slice.
630
+ *
631
+ * @deprecated This type is no longer used by `@prismicio/react`. Prefer using
632
+ * `Record<string, SliceComponentType<any>>` instead.
633
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
634
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
635
+ */
636
+ declare type SliceZoneComponents<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
637
+ [SliceType in ExtractSliceType<TSlice>]: SliceComponentType<Extract<TSlice, SliceLike<SliceType>> extends never ? SliceLike : Extract<TSlice, SliceLike<SliceType>>, TContext>;
638
+ };
639
+ /**
640
+ * This Slice component can be used as a reminder to provide a proper implementation.
641
+ *
642
+ * This is also the default React component rendered when a component mapping
643
+ * cannot be found in `<SliceZone>`.
644
+ */
645
+ declare const TODOSliceComponent: <TSlice extends SliceLike<string>, TContext>({ slice, }: SliceComponentProps<TSlice, TContext>) => JSX.Element | null;
646
+ /**
647
+ * Arguments for a `<SliceZone>` `resolver` function.
648
+ */
649
+ declare type SliceZoneResolverArgs<TSlice extends SliceLike = any> = {
650
+ /**
651
+ * The Slice to resolve to a React component.
652
+ */
653
+ slice: TSlice;
654
+ /**
655
+ * The name of the Slice.
656
+ */
657
+ sliceName: PascalCase<ExtractSliceType<TSlice>>;
658
+ /**
659
+ * The index of the Slice in the Slice Zone.
660
+ */
661
+ i: number;
662
+ };
663
+ /**
664
+ * A function that determines the rendered React component for each Slice in the
665
+ * Slice Zone. If a nullish value is returned, the component will fallback to
666
+ * the `components` or `defaultComponent` props to determine the rendered component.
667
+ *
668
+ * @deprecated Use the `components` prop instead.
669
+ *
670
+ * @param args - Arguments for the resolver function.
671
+ *
672
+ * @returns The React component to render for a Slice.
673
+ */
674
+ declare type SliceZoneResolver<TSlice extends SliceLike = any, TContext = unknown> = (args: SliceZoneResolverArgs<TSlice>) => SliceComponentType<any, TContext> | undefined | null;
675
+ /**
676
+ * React props for the `<SliceZone>` component.
677
+ *
678
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
679
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
680
+ */
681
+ declare type SliceZoneProps<TContext = unknown> = {
682
+ /**
683
+ * List of Slice data from the Slice Zone.
684
+ */
685
+ slices?: SliceZoneLike;
686
+ /**
687
+ * A record mapping Slice types to React components.
688
+ */
689
+ components?: Record<string, SliceComponentType<any, TContext>>;
690
+ /**
691
+ * A function that determines the rendered React component for each Slice in
692
+ * the Slice Zone.
693
+ *
694
+ * @deprecated Use the `components` prop instead.
695
+ *
696
+ * @param args - Arguments for the resolver function.
697
+ *
698
+ * @returns The React component to render for a Slice.
699
+ */
700
+ resolver?: SliceZoneResolver<any, TContext>;
701
+ /**
702
+ * The React component rendered if a component mapping from the `components`
703
+ * prop cannot be found.
704
+ */
705
+ defaultComponent?: SliceComponentType<any, TContext>;
706
+ /**
707
+ * Arbitrary data made available to all Slice components.
708
+ */
709
+ context?: TContext;
710
+ };
711
+ /**
712
+ * Renders content from a Prismic Slice Zone using React components for each
713
+ * type of Slice.
714
+ *
715
+ * If a component is not provided for a type of Slice, a default component can
716
+ * be provided. A fallback component is provided by default that will not be
717
+ * rendered in a production build of your app.
718
+ *
719
+ * @typeParam TSlice - The type(s) of a Slice in the Slice Zone.
720
+ * @typeParam TContext - Arbitrary data made available to all Slice components.
721
+ *
722
+ * @returns The Slice Zone's content as React components.
723
+ *
724
+ * @see Learn about Prismic Slices and Slice Zones {@link https://prismic.io/docs/core-concepts/slices}
725
+ */
726
+ declare const SliceZone: <TContext>({ slices, components, resolver, defaultComponent, context, }: SliceZoneProps<TContext>) => JSX.Element;
724
727
 
725
- /**
726
- * Props for `<PrismicToolbar>`.
727
- */
728
- declare type PrismicToolbarProps = {
729
- /**
730
- * The name of the Prismic repository. For example, `"my-repo"` if the
731
- * repository URL is `my-repo.prismic.io`.
732
- */
733
- repositoryName: string;
734
- /**
735
- * The type of toolbar needed for the repository. Defaults to `"new"`.
736
- *
737
- * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}
738
- */
739
- type?: "new" | "legacy";
740
- };
741
- /**
742
- * React component that injects the Prismic Toolbar into the app. This component
743
- * can be placed anywhere in the React tree.
744
- */
728
+ /**
729
+ * Props for `<PrismicToolbar>`.
730
+ */
731
+ declare type PrismicToolbarProps = {
732
+ /**
733
+ * The name of the Prismic repository. For example, `"my-repo"` if the
734
+ * repository URL is `my-repo.prismic.io`.
735
+ */
736
+ repositoryName: string;
737
+ /**
738
+ * The type of toolbar needed for the repository. Defaults to `"new"`.
739
+ *
740
+ * @see To check which version you need, view the Prismic Toolbar documentation {@link https://prismic.io/docs/technologies/previews-and-the-prismic-toolbar-reactjs}
741
+ */
742
+ type?: "new" | "legacy";
743
+ };
744
+ /**
745
+ * React component that injects the Prismic Toolbar into the app. This component
746
+ * can be placed anywhere in the React tree.
747
+ */
745
748
  declare const PrismicToolbar: ({ repositoryName, type, }: PrismicToolbarProps) => null;
746
749
 
747
- declare type StateMachineState<TData> = {
748
- state: PrismicClientHookState;
749
- data?: TData;
750
- error?: Error;
751
- };
752
- declare type HookOnlyParameters = {
753
- client?: _prismicio_client.Client;
754
- skip?: boolean;
755
- };
756
- /**
757
- * The return value of a `@prismicio/client` React hook.
758
- *
759
- * @typeParam TData - Data returned by the client.
760
- */
761
- declare type ClientHookReturnType<TData = unknown> = [
762
- /**
763
- * Data returned by the client.
764
- */
765
- data: TData | undefined,
766
- /**
767
- * The current state of the hook's client method call.
768
- */
769
- state: Pick<StateMachineState<TData>, "state" | "error">
750
+ declare type StateMachineState<TData> = {
751
+ state: PrismicClientHookState;
752
+ data?: TData;
753
+ error?: Error;
754
+ };
755
+ declare type HookOnlyParameters = {
756
+ client?: _prismicio_client.Client;
757
+ skip?: boolean;
758
+ };
759
+ /**
760
+ * The return value of a `@prismicio/client` React hook.
761
+ *
762
+ * @typeParam TData - Data returned by the client.
763
+ */
764
+ declare type ClientHookReturnType<TData = unknown> = [
765
+ /**
766
+ * Data returned by the client.
767
+ */
768
+ data: TData | undefined,
769
+ /**
770
+ * The current state of the hook's client method call.
771
+ */
772
+ state: Pick<StateMachineState<TData>, "state" | "error">
770
773
  ];
771
774
 
772
- declare type UsePrismicPreviewResolverArgs = {
773
- /**
774
- * An optional `@prismicio/client` instance to override the Client provided to
775
- * `<PrismicProvider>`
776
- */
777
- client?: _prismicio_client.Client;
778
- /**
779
- * A function that maps a Prismic document to a URL within your app.
780
- */
781
- linkResolver?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["linkResolver"];
782
- /**
783
- * A fallback URL if the Link Resolver does not return a value.
784
- */
785
- defaultURL?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["defaultURL"];
786
- /**
787
- * The preview token (also known as a ref) that will be used to query preview
788
- * content from the Prismic repository.
789
- */
790
- previewToken?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["previewToken"];
791
- /**
792
- * The previewed document that will be used to determine the destination URL.
793
- */
794
- documentID?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["documentID"];
795
- /**
796
- * A function to automatically navigate to the resolved URL. If a function is
797
- * not provded, `usePreviewResolver` will not navigate to the URL.
798
- *
799
- * @param url - The resolved preview URL.
800
- */
801
- navigate?: (url: string) => unknown;
802
- };
803
- /**
804
- * Resolve a preview session's URL. The resolved URL can be used to redirect to
805
- * the previewed document.
806
- *
807
- * If a `navigate` function is provided, the hook will automatically navigate to
808
- * the previewed document's URL.
809
- *
810
- * @param args - Arguments to configure how a URL is resolved.
811
- *
812
- * @returns A tuple containing the resolved URL and the hook's state.
813
- */
775
+ declare type UsePrismicPreviewResolverArgs = {
776
+ /**
777
+ * An optional `@prismicio/client` instance to override the Client provided to
778
+ * `<PrismicProvider>`
779
+ */
780
+ client?: _prismicio_client.Client;
781
+ /**
782
+ * A function that maps a Prismic document to a URL within your app.
783
+ */
784
+ linkResolver?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["linkResolver"];
785
+ /**
786
+ * A fallback URL if the Link Resolver does not return a value.
787
+ */
788
+ defaultURL?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["defaultURL"];
789
+ /**
790
+ * The preview token (also known as a ref) that will be used to query preview
791
+ * content from the Prismic repository.
792
+ */
793
+ previewToken?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["previewToken"];
794
+ /**
795
+ * The previewed document that will be used to determine the destination URL.
796
+ */
797
+ documentID?: Parameters<_prismicio_client.Client["resolvePreviewURL"]>[0]["documentID"];
798
+ /**
799
+ * A function to automatically navigate to the resolved URL. If a function is
800
+ * not provded, `usePreviewResolver` will not navigate to the URL.
801
+ *
802
+ * @param url - The resolved preview URL.
803
+ */
804
+ navigate?: (url: string) => unknown;
805
+ };
806
+ /**
807
+ * Resolve a preview session's URL. The resolved URL can be used to redirect to
808
+ * the previewed document.
809
+ *
810
+ * If a `navigate` function is provided, the hook will automatically navigate to
811
+ * the previewed document's URL.
812
+ *
813
+ * @param args - Arguments to configure how a URL is resolved.
814
+ *
815
+ * @returns A tuple containing the resolved URL and the hook's state.
816
+ */
814
817
  declare const usePrismicPreviewResolver: (args?: UsePrismicPreviewResolverArgs) => ClientHookReturnType<string>;
815
818
 
816
- /**
817
- * A hook that queries content from the Prismic repository.
818
- *
819
- * @remarks
820
- * An additional `@prismicio/client` instance can be provided at `params.client`.
821
- *
822
- * @typeParam TDocument - Type of Prismic documents returned
823
- *
824
- * @param params - Parameters to filter, sort, and paginate results
825
- *
826
- * @returns The composable payload {@link ClientHookReturnType}
827
- *
828
- * @see Underlying `@prismicio/client` method {@link proto.get}
829
- */
830
- declare const usePrismicDocuments: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
831
- signal?: {
832
- aborted: any;
833
- addEventListener: any;
834
- removeEventListener: any;
835
- dispatchEvent: any;
836
- onabort: any;
837
- } | undefined;
838
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
839
- /**
840
- * A hook that queries content from the Prismic repository and returns only the
841
- * first result, if any.
842
- *
843
- * @remarks
844
- * An additional `@prismicio/client` instance can be provided at `params.client`.
845
- *
846
- * @typeParam TDocument - Type of the Prismic document returned
847
- *
848
- * @param params - Parameters to filter, sort, and paginate results
849
- *
850
- * @returns The composable payload {@link ClientHookReturnType}
851
- *
852
- * @see Underlying `@prismicio/client` method {@link proto.getFirst}
853
- */
854
- declare const useFirstPrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
855
- signal?: {
856
- aborted: any;
857
- addEventListener: any;
858
- removeEventListener: any;
859
- dispatchEvent: any;
860
- onabort: any;
861
- } | undefined;
862
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
863
- /**
864
- * A hook that queries content from the Prismic repository and returns all
865
- * matching content. If no predicates are provided, all documents will be fetched.
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 params - Parameters to filter and sort results
873
- *
874
- * @returns The composable payload {@link ClientHookReturnType}
875
- *
876
- * @see Underlying `@prismicio/client` method {@link proto.getAll}
877
- */
878
- declare const useAllPrismicDocumentsDangerously: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
879
- limit?: number | undefined;
880
- } & {
881
- signal?: {
882
- aborted: any;
883
- addEventListener: any;
884
- removeEventListener: any;
885
- dispatchEvent: any;
886
- onabort: any;
887
- } | undefined;
888
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
889
- /**
890
- * A hook that queries a document from the Prismic repository with a specific ID.
891
- *
892
- * @remarks
893
- * An additional `@prismicio/client` instance can be provided at `params.client`.
894
- *
895
- * @typeParam TDocument - Type of the Prismic document returned
896
- *
897
- * @param id - ID of the document
898
- * @param params - Parameters to filter, sort, and paginate results
899
- *
900
- * @returns The composable payload {@link ClientHookReturnType}
901
- *
902
- * @see Underlying `@prismicio/client` method {@link proto.getByID}
903
- */
904
- declare const usePrismicDocumentByID: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
905
- signal?: {
906
- aborted: any;
907
- addEventListener: any;
908
- removeEventListener: any;
909
- dispatchEvent: any;
910
- onabort: any;
911
- } | undefined;
912
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
913
- /**
914
- * A hook that queries documents from the Prismic repository with specific IDs.
915
- *
916
- * @remarks
917
- * An additional `@prismicio/client` instance can be provided at `params.client`.
918
- *
919
- * @typeParam TDocument - Type of Prismic documents returned
920
- *
921
- * @param ids - A list of document IDs
922
- * @param params - Parameters to filter, sort, and paginate results
923
- *
924
- * @returns The composable payload {@link ClientHookReturnType}
925
- *
926
- * @see Underlying `@prismicio/client` method {@link proto.getByIDs}
927
- */
928
- declare const usePrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
929
- signal?: {
930
- aborted: any;
931
- addEventListener: any;
932
- removeEventListener: any;
933
- dispatchEvent: any;
934
- onabort: any;
935
- } | undefined;
936
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
937
- /**
938
- * A hook that queries all documents from the Prismic repository with specific IDs.
939
- *
940
- * @remarks
941
- * An additional `@prismicio/client` instance can be provided at `params.client`.
942
- *
943
- * @typeParam TDocument - Type of Prismic documents returned
944
- *
945
- * @param ids - A list of document IDs
946
- * @param params - Parameters to filter and sort results
947
- *
948
- * @returns The composable payload {@link ClientHookReturnType}
949
- *
950
- * @see Underlying `@prismicio/client` method {@link proto.getAllByIDs}
951
- */
952
- declare const useAllPrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
953
- signal?: {
954
- aborted: any;
955
- addEventListener: any;
956
- removeEventListener: any;
957
- dispatchEvent: any;
958
- onabort: any;
959
- } | undefined;
960
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
961
- /**
962
- * A hook that queries a document from the Prismic repository with a specific
963
- * UID and Custom Type.
964
- *
965
- * @remarks
966
- * An additional `@prismicio/client` instance can be provided at `params.client`.
967
- *
968
- * @typeParam TDocument - Type of the Prismic document returned
969
- *
970
- * @param documentType - The API ID of the document's Custom Type
971
- * @param uid - UID of the document
972
- * @param params - Parameters to filter, sort, and paginate results
973
- *
974
- * @returns The composable payload {@link ClientHookReturnType}
975
- *
976
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
977
- */
978
- declare const usePrismicDocumentByUID: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
979
- signal?: {
980
- aborted: any;
981
- addEventListener: any;
982
- removeEventListener: any;
983
- dispatchEvent: any;
984
- onabort: any;
985
- } | undefined;
986
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
987
- /**
988
- * A hook that queries documents from the Prismic repository with specific UIDs
989
- * of a Custom Type.
990
- *
991
- * @remarks
992
- * An additional `@prismicio/client` instance can be provided at `params.client`.
993
- *
994
- * @typeParam TDocument - Type of the Prismic document returned
995
- *
996
- * @param documentType - The API ID of the document's Custom Type
997
- * @param uids - A list of document UIDs.
998
- * @param params - Parameters to filter, sort, and paginate results
999
- *
1000
- * @returns The composable payload {@link ClientHookReturnType}
1001
- *
1002
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
1003
- */
1004
- declare const usePrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1005
- signal?: {
1006
- aborted: any;
1007
- addEventListener: any;
1008
- removeEventListener: any;
1009
- dispatchEvent: any;
1010
- onabort: any;
1011
- } | undefined;
1012
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1013
- /**
1014
- * A hook that queries all documents from the Prismic repository with specific
1015
- * UIDs of a Custom Type.
1016
- *
1017
- * @remarks
1018
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1019
- *
1020
- * @typeParam TDocument - Type of the Prismic document returned
1021
- *
1022
- * @param documentType - The API ID of the document's Custom Type
1023
- * @param uids - A list of document UIDs.
1024
- * @param params - Parameters to filter, sort, and paginate results
1025
- *
1026
- * @returns The composable payload {@link ClientHookReturnType}
1027
- *
1028
- * @see Underlying `@prismicio/client` method {@link proto.getByUID}
1029
- */
1030
- declare const useAllPrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1031
- signal?: {
1032
- aborted: any;
1033
- addEventListener: any;
1034
- removeEventListener: any;
1035
- dispatchEvent: any;
1036
- onabort: any;
1037
- } | undefined;
1038
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1039
- /**
1040
- * A hook that queries a singleton document from the Prismic repository for a
1041
- * specific Custom Type.
1042
- *
1043
- * @remarks
1044
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1045
- *
1046
- * @typeParam TDocument - Type of the Prismic document returned
1047
- *
1048
- * @param documentType - The API ID of the singleton Custom Type
1049
- * @param params - Parameters to filter, sort, and paginate results
1050
- *
1051
- * @returns The composable payload {@link ClientHookReturnType}
1052
- *
1053
- * @see Underlying `@prismicio/client` method {@link proto.getSingle}
1054
- */
1055
- declare const useSinglePrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1056
- signal?: {
1057
- aborted: any;
1058
- addEventListener: any;
1059
- removeEventListener: any;
1060
- dispatchEvent: any;
1061
- onabort: any;
1062
- } | undefined;
1063
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
1064
- /**
1065
- * A hook that queries documents from the Prismic repository for a specific Custom Type.
1066
- *
1067
- * @remarks
1068
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1069
- *
1070
- * @typeParam TDocument - Type of Prismic documents returned
1071
- *
1072
- * @param documentType - The API ID of the Custom Type
1073
- * @param params - Parameters to filter, sort, and paginate results
1074
- *
1075
- * @returns The composable payload {@link ClientHookReturnType}
1076
- *
1077
- * @see Underlying `@prismicio/client` method {@link proto.getByType}
1078
- */
1079
- declare const usePrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1080
- signal?: {
1081
- aborted: any;
1082
- addEventListener: any;
1083
- removeEventListener: any;
1084
- dispatchEvent: any;
1085
- onabort: any;
1086
- } | undefined;
1087
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1088
- /**
1089
- * A hook that queries all documents from the Prismic repository for a specific
1090
- * Custom Type.
1091
- *
1092
- * @remarks
1093
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1094
- *
1095
- * @typeParam TDocument - Type of Prismic documents returned
1096
- *
1097
- * @param documentType - The API ID of the Custom Type
1098
- * @param params - Parameters to filter and sort results
1099
- *
1100
- * @returns The composable payload {@link ClientHookReturnType}
1101
- *
1102
- * @see Underlying `@prismicio/client` method {@link proto.getAllByType}
1103
- */
1104
- declare const useAllPrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1105
- signal?: {
1106
- aborted: any;
1107
- addEventListener: any;
1108
- removeEventListener: any;
1109
- dispatchEvent: any;
1110
- onabort: any;
1111
- } | undefined;
1112
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1113
- /**
1114
- * A hook that queries documents from the Prismic repository with a specific tag.
1115
- *
1116
- * @remarks
1117
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1118
- *
1119
- * @typeParam TDocument - Type of Prismic documents returned
1120
- *
1121
- * @param tag - The tag that must be included on a document
1122
- * @param params - Parameters to filter, sort, and paginate results
1123
- *
1124
- * @returns The composable payload {@link ClientHookReturnType}
1125
- *
1126
- * @see Underlying `@prismicio/client` method {@link proto.getByTag}
1127
- */
1128
- declare const usePrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1129
- signal?: {
1130
- aborted: any;
1131
- addEventListener: any;
1132
- removeEventListener: any;
1133
- dispatchEvent: any;
1134
- onabort: any;
1135
- } | undefined;
1136
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1137
- /**
1138
- * A hook that queries all documents from the Prismic repository with a specific tag.
1139
- *
1140
- * @remarks
1141
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1142
- *
1143
- * @typeParam TDocument - Type of Prismic documents returned
1144
- *
1145
- * @param tag - The tag that must be included on a document
1146
- * @param params - Parameters to filter and sort results
1147
- *
1148
- * @returns The composable payload {@link ClientHookReturnType}
1149
- *
1150
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTag}
1151
- */
1152
- declare const useAllPrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1153
- signal?: {
1154
- aborted: any;
1155
- addEventListener: any;
1156
- removeEventListener: any;
1157
- dispatchEvent: any;
1158
- onabort: any;
1159
- } | undefined;
1160
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1161
- /**
1162
- * A hook that queries documents from the Prismic repository with specific tags.
1163
- * A document must be tagged with at least one of the queried tags to be included.
1164
- *
1165
- * @remarks
1166
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1167
- *
1168
- * @typeParam TDocument - Type of Prismic documents returned
1169
- *
1170
- * @param tags - A list of tags that must be included on a document
1171
- * @param params - Parameters to filter, sort, and paginate results
1172
- *
1173
- * @returns The composable payload {@link ClientHookReturnType}
1174
- *
1175
- * @see Underlying `@prismicio/client` method {@link proto.getByTags}
1176
- */
1177
- declare const usePrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1178
- signal?: {
1179
- aborted: any;
1180
- addEventListener: any;
1181
- removeEventListener: any;
1182
- dispatchEvent: any;
1183
- onabort: any;
1184
- } | undefined;
1185
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1186
- /**
1187
- * A hook that queries all documents from the Prismic repository with specific
1188
- * tags. A document must be tagged with at least one of the queried tags to be included.
1189
- *
1190
- * @remarks
1191
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1192
- *
1193
- * @typeParam TDocument - Type of Prismic documents returned
1194
- *
1195
- * @param tags - A list of tags that must be included on a document
1196
- * @param params - Parameters to filter and sort results
1197
- *
1198
- * @returns The composable payload {@link ClientHookReturnType}
1199
- *
1200
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
1201
- */
1202
- declare const useAllPrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1203
- signal?: {
1204
- aborted: any;
1205
- addEventListener: any;
1206
- removeEventListener: any;
1207
- dispatchEvent: any;
1208
- onabort: any;
1209
- } | undefined;
1210
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1211
- /**
1212
- * A hook that queries documents from the Prismic repository with specific tags.
1213
- * A document must be tagged with all of the queried tags to be included.
1214
- *
1215
- * @remarks
1216
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1217
- *
1218
- * @typeParam TDocument - Type of Prismic documents returned
1219
- *
1220
- * @param tags - A list of tags that must be included on a document
1221
- * @param params - Parameters to filter, sort, and paginate results
1222
- *
1223
- * @returns The composable payload {@link ClientHookReturnType}
1224
- *
1225
- * @see Underlying `@prismicio/client` method {@link proto.getByTags}
1226
- */
1227
- declare const usePrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1228
- signal?: {
1229
- aborted: any;
1230
- addEventListener: any;
1231
- removeEventListener: any;
1232
- dispatchEvent: any;
1233
- onabort: any;
1234
- } | undefined;
1235
- } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1236
- /**
1237
- * A hook that queries all documents from the Prismic repository with specific
1238
- * tags. A document must be tagged with all of the queried tags to be included.
1239
- *
1240
- * @remarks
1241
- * An additional `@prismicio/client` instance can be provided at `params.client`.
1242
- *
1243
- * @typeParam TDocument - Type of Prismic documents returned
1244
- *
1245
- * @param tags - A list of tags that must be included on a document
1246
- * @param params - Parameters to filter and sort results
1247
- *
1248
- * @returns The composable payload {@link ClientHookReturnType}
1249
- *
1250
- * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
1251
- */
1252
- declare const useAllPrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1253
- signal?: {
1254
- aborted: any;
1255
- addEventListener: any;
1256
- removeEventListener: any;
1257
- dispatchEvent: any;
1258
- onabort: any;
1259
- } | undefined;
819
+ /**
820
+ * A hook that queries content from the Prismic repository.
821
+ *
822
+ * @remarks
823
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
824
+ *
825
+ * @typeParam TDocument - Type of Prismic documents returned
826
+ *
827
+ * @param params - Parameters to filter, sort, and paginate results
828
+ *
829
+ * @returns The composable payload {@link ClientHookReturnType}
830
+ *
831
+ * @see Underlying `@prismicio/client` method {@link proto.get}
832
+ */
833
+ declare const usePrismicDocuments: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
834
+ signal?: {
835
+ aborted: any;
836
+ addEventListener: any;
837
+ removeEventListener: any;
838
+ dispatchEvent: any;
839
+ onabort: any;
840
+ } | undefined;
841
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
842
+ /**
843
+ * A hook that queries content from the Prismic repository and returns only the
844
+ * first result, if any.
845
+ *
846
+ * @remarks
847
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
848
+ *
849
+ * @typeParam TDocument - Type of the Prismic document returned
850
+ *
851
+ * @param params - Parameters to filter, sort, and paginate results
852
+ *
853
+ * @returns The composable payload {@link ClientHookReturnType}
854
+ *
855
+ * @see Underlying `@prismicio/client` method {@link proto.getFirst}
856
+ */
857
+ declare const useFirstPrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
858
+ signal?: {
859
+ aborted: any;
860
+ addEventListener: any;
861
+ removeEventListener: any;
862
+ dispatchEvent: any;
863
+ onabort: any;
864
+ } | undefined;
865
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
866
+ /**
867
+ * A hook that queries content from the Prismic repository and returns all
868
+ * matching content. If no predicates are provided, all documents will be fetched.
869
+ *
870
+ * @remarks
871
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
872
+ *
873
+ * @typeParam TDocument - Type of Prismic documents returned
874
+ *
875
+ * @param params - Parameters to filter and sort results
876
+ *
877
+ * @returns The composable payload {@link ClientHookReturnType}
878
+ *
879
+ * @see Underlying `@prismicio/client` method {@link proto.getAll}
880
+ */
881
+ declare const useAllPrismicDocumentsDangerously: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
882
+ limit?: number | undefined;
883
+ } & {
884
+ signal?: {
885
+ aborted: any;
886
+ addEventListener: any;
887
+ removeEventListener: any;
888
+ dispatchEvent: any;
889
+ onabort: any;
890
+ } | undefined;
891
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
892
+ /**
893
+ * A hook that queries a document from the Prismic repository with a specific ID.
894
+ *
895
+ * @remarks
896
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
897
+ *
898
+ * @typeParam TDocument - Type of the Prismic document returned
899
+ *
900
+ * @param id - ID of the document
901
+ * @param params - Parameters to filter, sort, and paginate results
902
+ *
903
+ * @returns The composable payload {@link ClientHookReturnType}
904
+ *
905
+ * @see Underlying `@prismicio/client` method {@link proto.getByID}
906
+ */
907
+ declare const usePrismicDocumentByID: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
908
+ signal?: {
909
+ aborted: any;
910
+ addEventListener: any;
911
+ removeEventListener: any;
912
+ dispatchEvent: any;
913
+ onabort: any;
914
+ } | undefined;
915
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
916
+ /**
917
+ * A hook that queries documents from the Prismic repository with specific IDs.
918
+ *
919
+ * @remarks
920
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
921
+ *
922
+ * @typeParam TDocument - Type of Prismic documents returned
923
+ *
924
+ * @param ids - A list of document IDs
925
+ * @param params - Parameters to filter, sort, and paginate results
926
+ *
927
+ * @returns The composable payload {@link ClientHookReturnType}
928
+ *
929
+ * @see Underlying `@prismicio/client` method {@link proto.getByIDs}
930
+ */
931
+ declare const usePrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
932
+ signal?: {
933
+ aborted: any;
934
+ addEventListener: any;
935
+ removeEventListener: any;
936
+ dispatchEvent: any;
937
+ onabort: any;
938
+ } | undefined;
939
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
940
+ /**
941
+ * A hook that queries all documents from the Prismic repository with specific IDs.
942
+ *
943
+ * @remarks
944
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
945
+ *
946
+ * @typeParam TDocument - Type of Prismic documents returned
947
+ *
948
+ * @param ids - A list of document IDs
949
+ * @param params - Parameters to filter and sort results
950
+ *
951
+ * @returns The composable payload {@link ClientHookReturnType}
952
+ *
953
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByIDs}
954
+ */
955
+ declare const useAllPrismicDocumentsByIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(id: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
956
+ signal?: {
957
+ aborted: any;
958
+ addEventListener: any;
959
+ removeEventListener: any;
960
+ dispatchEvent: any;
961
+ onabort: any;
962
+ } | undefined;
963
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
964
+ /**
965
+ * A hook that queries a document from the Prismic repository with a specific
966
+ * UID and Custom Type.
967
+ *
968
+ * @remarks
969
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
970
+ *
971
+ * @typeParam TDocument - Type of the Prismic document returned
972
+ *
973
+ * @param documentType - The API ID of the document's Custom Type
974
+ * @param uid - UID of the document
975
+ * @param params - Parameters to filter, sort, and paginate results
976
+ *
977
+ * @returns The composable payload {@link ClientHookReturnType}
978
+ *
979
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
980
+ */
981
+ declare const usePrismicDocumentByUID: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uid: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
982
+ signal?: {
983
+ aborted: any;
984
+ addEventListener: any;
985
+ removeEventListener: any;
986
+ dispatchEvent: any;
987
+ onabort: any;
988
+ } | undefined;
989
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
990
+ /**
991
+ * A hook that queries documents from the Prismic repository with specific UIDs
992
+ * of a Custom Type.
993
+ *
994
+ * @remarks
995
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
996
+ *
997
+ * @typeParam TDocument - Type of the Prismic document returned
998
+ *
999
+ * @param documentType - The API ID of the document's Custom Type
1000
+ * @param uids - A list of document UIDs.
1001
+ * @param params - Parameters to filter, sort, and paginate results
1002
+ *
1003
+ * @returns The composable payload {@link ClientHookReturnType}
1004
+ *
1005
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
1006
+ */
1007
+ declare const usePrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1008
+ signal?: {
1009
+ aborted: any;
1010
+ addEventListener: any;
1011
+ removeEventListener: any;
1012
+ dispatchEvent: any;
1013
+ onabort: any;
1014
+ } | undefined;
1015
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1016
+ /**
1017
+ * A hook that queries all documents from the Prismic repository with specific
1018
+ * UIDs of a Custom Type.
1019
+ *
1020
+ * @remarks
1021
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1022
+ *
1023
+ * @typeParam TDocument - Type of the Prismic document returned
1024
+ *
1025
+ * @param documentType - The API ID of the document's Custom Type
1026
+ * @param uids - A list of document UIDs.
1027
+ * @param params - Parameters to filter, sort, and paginate results
1028
+ *
1029
+ * @returns The composable payload {@link ClientHookReturnType}
1030
+ *
1031
+ * @see Underlying `@prismicio/client` method {@link proto.getByUID}
1032
+ */
1033
+ declare const useAllPrismicDocumentsByUIDs: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, uids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1034
+ signal?: {
1035
+ aborted: any;
1036
+ addEventListener: any;
1037
+ removeEventListener: any;
1038
+ dispatchEvent: any;
1039
+ onabort: any;
1040
+ } | undefined;
1041
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1042
+ /**
1043
+ * A hook that queries a singleton document from the Prismic repository for a
1044
+ * specific Custom Type.
1045
+ *
1046
+ * @remarks
1047
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1048
+ *
1049
+ * @typeParam TDocument - Type of the Prismic document returned
1050
+ *
1051
+ * @param documentType - The API ID of the singleton Custom Type
1052
+ * @param params - Parameters to filter, sort, and paginate results
1053
+ *
1054
+ * @returns The composable payload {@link ClientHookReturnType}
1055
+ *
1056
+ * @see Underlying `@prismicio/client` method {@link proto.getSingle}
1057
+ */
1058
+ declare const useSinglePrismicDocument: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1059
+ signal?: {
1060
+ aborted: any;
1061
+ addEventListener: any;
1062
+ removeEventListener: any;
1063
+ dispatchEvent: any;
1064
+ onabort: any;
1065
+ } | undefined;
1066
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument>;
1067
+ /**
1068
+ * A hook that queries documents from the Prismic repository for a specific Custom Type.
1069
+ *
1070
+ * @remarks
1071
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1072
+ *
1073
+ * @typeParam TDocument - Type of Prismic documents returned
1074
+ *
1075
+ * @param documentType - The API ID of the Custom Type
1076
+ * @param params - Parameters to filter, sort, and paginate results
1077
+ *
1078
+ * @returns The composable payload {@link ClientHookReturnType}
1079
+ *
1080
+ * @see Underlying `@prismicio/client` method {@link proto.getByType}
1081
+ */
1082
+ declare const usePrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1083
+ signal?: {
1084
+ aborted: any;
1085
+ addEventListener: any;
1086
+ removeEventListener: any;
1087
+ dispatchEvent: any;
1088
+ onabort: any;
1089
+ } | undefined;
1090
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1091
+ /**
1092
+ * A hook that queries all documents from the Prismic repository for a specific
1093
+ * Custom Type.
1094
+ *
1095
+ * @remarks
1096
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1097
+ *
1098
+ * @typeParam TDocument - Type of Prismic documents returned
1099
+ *
1100
+ * @param documentType - The API ID of the Custom Type
1101
+ * @param params - Parameters to filter and sort results
1102
+ *
1103
+ * @returns The composable payload {@link ClientHookReturnType}
1104
+ *
1105
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByType}
1106
+ */
1107
+ declare const useAllPrismicDocumentsByType: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1108
+ signal?: {
1109
+ aborted: any;
1110
+ addEventListener: any;
1111
+ removeEventListener: any;
1112
+ dispatchEvent: any;
1113
+ onabort: any;
1114
+ } | undefined;
1115
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1116
+ /**
1117
+ * A hook that queries documents from the Prismic repository with a specific tag.
1118
+ *
1119
+ * @remarks
1120
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1121
+ *
1122
+ * @typeParam TDocument - Type of Prismic documents returned
1123
+ *
1124
+ * @param tag - The tag that must be included on a document
1125
+ * @param params - Parameters to filter, sort, and paginate results
1126
+ *
1127
+ * @returns The composable payload {@link ClientHookReturnType}
1128
+ *
1129
+ * @see Underlying `@prismicio/client` method {@link proto.getByTag}
1130
+ */
1131
+ declare const usePrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string, params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1132
+ signal?: {
1133
+ aborted: any;
1134
+ addEventListener: any;
1135
+ removeEventListener: any;
1136
+ dispatchEvent: any;
1137
+ onabort: any;
1138
+ } | undefined;
1139
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1140
+ /**
1141
+ * A hook that queries all documents from the Prismic repository with a specific tag.
1142
+ *
1143
+ * @remarks
1144
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1145
+ *
1146
+ * @typeParam TDocument - Type of Prismic documents returned
1147
+ *
1148
+ * @param tag - The tag that must be included on a document
1149
+ * @param params - Parameters to filter and sort results
1150
+ *
1151
+ * @returns The composable payload {@link ClientHookReturnType}
1152
+ *
1153
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTag}
1154
+ */
1155
+ declare const useAllPrismicDocumentsByTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1156
+ signal?: {
1157
+ aborted: any;
1158
+ addEventListener: any;
1159
+ removeEventListener: any;
1160
+ dispatchEvent: any;
1161
+ onabort: any;
1162
+ } | undefined;
1163
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1164
+ /**
1165
+ * A hook that queries documents from the Prismic repository with specific tags.
1166
+ * A document must be tagged with at least one of the queried tags to be included.
1167
+ *
1168
+ * @remarks
1169
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1170
+ *
1171
+ * @typeParam TDocument - Type of Prismic documents returned
1172
+ *
1173
+ * @param tags - A list of tags that must be included on a document
1174
+ * @param params - Parameters to filter, sort, and paginate results
1175
+ *
1176
+ * @returns The composable payload {@link ClientHookReturnType}
1177
+ *
1178
+ * @see Underlying `@prismicio/client` method {@link proto.getByTags}
1179
+ */
1180
+ declare const usePrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1181
+ signal?: {
1182
+ aborted: any;
1183
+ addEventListener: any;
1184
+ removeEventListener: any;
1185
+ dispatchEvent: any;
1186
+ onabort: any;
1187
+ } | undefined;
1188
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1189
+ /**
1190
+ * A hook that queries all documents from the Prismic repository with specific
1191
+ * tags. A document must be tagged with at least one of the queried tags to be included.
1192
+ *
1193
+ * @remarks
1194
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1195
+ *
1196
+ * @typeParam TDocument - Type of Prismic documents returned
1197
+ *
1198
+ * @param tags - A list of tags that must be included on a document
1199
+ * @param params - Parameters to filter and sort results
1200
+ *
1201
+ * @returns The composable payload {@link ClientHookReturnType}
1202
+ *
1203
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
1204
+ */
1205
+ declare const useAllPrismicDocumentsBySomeTags: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1206
+ signal?: {
1207
+ aborted: any;
1208
+ addEventListener: any;
1209
+ removeEventListener: any;
1210
+ dispatchEvent: any;
1211
+ onabort: any;
1212
+ } | undefined;
1213
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1214
+ /**
1215
+ * A hook that queries documents from the Prismic repository with specific tags.
1216
+ * A document must be tagged with all of the queried tags to be included.
1217
+ *
1218
+ * @remarks
1219
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1220
+ *
1221
+ * @typeParam TDocument - Type of Prismic documents returned
1222
+ *
1223
+ * @param tags - A list of tags that must be included on a document
1224
+ * @param params - Parameters to filter, sort, and paginate results
1225
+ *
1226
+ * @returns The composable payload {@link ClientHookReturnType}
1227
+ *
1228
+ * @see Underlying `@prismicio/client` method {@link proto.getByTags}
1229
+ */
1230
+ declare const usePrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
1231
+ signal?: {
1232
+ aborted: any;
1233
+ addEventListener: any;
1234
+ removeEventListener: any;
1235
+ dispatchEvent: any;
1236
+ onabort: any;
1237
+ } | undefined;
1238
+ } & HookOnlyParameters) | undefined) => ClientHookReturnType<prismicT.Query<TDocument>>;
1239
+ /**
1240
+ * A hook that queries all documents from the Prismic repository with specific
1241
+ * tags. A document must be tagged with all of the queried tags to be included.
1242
+ *
1243
+ * @remarks
1244
+ * An additional `@prismicio/client` instance can be provided at `params.client`.
1245
+ *
1246
+ * @typeParam TDocument - Type of Prismic documents returned
1247
+ *
1248
+ * @param tags - A list of tags that must be included on a document
1249
+ * @param params - Parameters to filter and sort results
1250
+ *
1251
+ * @returns The composable payload {@link ClientHookReturnType}
1252
+ *
1253
+ * @see Underlying `@prismicio/client` method {@link proto.getAllByTags}
1254
+ */
1255
+ declare const useAllPrismicDocumentsByEveryTag: <TDocument extends prismicT.PrismicDocument<Record<string, any>, string, string>>(tag: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
1256
+ signal?: {
1257
+ aborted: any;
1258
+ addEventListener: any;
1259
+ removeEventListener: any;
1260
+ dispatchEvent: any;
1261
+ onabort: any;
1262
+ } | undefined;
1260
1263
  } & HookOnlyParameters) | undefined) => ClientHookReturnType<TDocument[]>;
1261
1264
 
1262
- /**
1263
- * @deprecated Renamed to `Element` (without an "s").
1264
- */
1265
- declare const Elements: {
1266
- readonly heading1: "heading1";
1267
- readonly heading2: "heading2";
1268
- readonly heading3: "heading3";
1269
- readonly heading4: "heading4";
1270
- readonly heading5: "heading5";
1271
- readonly heading6: "heading6";
1272
- readonly paragraph: "paragraph";
1273
- readonly preformatted: "preformatted";
1274
- readonly strong: "strong";
1275
- readonly em: "em";
1276
- readonly listItem: "list-item";
1277
- readonly oListItem: "o-list-item";
1278
- readonly list: "group-list-item";
1279
- readonly oList: "group-o-list-item";
1280
- readonly image: "image";
1281
- readonly embed: "embed";
1282
- readonly hyperlink: "hyperlink";
1283
- readonly label: "label";
1284
- readonly span: "span";
1265
+ /**
1266
+ * @deprecated Renamed to `Element` (without an "s").
1267
+ */
1268
+ declare const Elements: {
1269
+ readonly heading1: "heading1";
1270
+ readonly heading2: "heading2";
1271
+ readonly heading3: "heading3";
1272
+ readonly heading4: "heading4";
1273
+ readonly heading5: "heading5";
1274
+ readonly heading6: "heading6";
1275
+ readonly paragraph: "paragraph";
1276
+ readonly preformatted: "preformatted";
1277
+ readonly strong: "strong";
1278
+ readonly em: "em";
1279
+ readonly listItem: "list-item";
1280
+ readonly oListItem: "o-list-item";
1281
+ readonly list: "group-list-item";
1282
+ readonly oList: "group-o-list-item";
1283
+ readonly image: "image";
1284
+ readonly embed: "embed";
1285
+ readonly hyperlink: "hyperlink";
1286
+ readonly label: "label";
1287
+ readonly span: "span";
1285
1288
  };
1286
1289
 
1287
- export { Elements, JSXFunctionSerializer, JSXMapSerializer, LinkProps, PrismicClientHookState, PrismicContextValue, PrismicImage, PrismicImageProps, 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 };
1290
+ export { Elements, JSXFunctionSerializer, JSXMapSerializer, LinkProps, PrismicClientHookState, PrismicContextValue, PrismicImage, PrismicImageProps, PrismicLink, PrismicLinkProps, PrismicProvider, PrismicProviderProps, PrismicRichText, PrismicRichTextProps, PrismicText, PrismicTextProps, PrismicToolbar, PrismicToolbarProps, SliceComponentProps, SliceComponentType, SliceLike, SliceLikeGraphQL, SliceLikeRestV2, 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 };