@prismicio/vue 3.0.0-beta.1 → 3.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts CHANGED
@@ -15,6 +15,9 @@ import type {
15
15
  HTMLFunctionSerializer,
16
16
  HTMLMapSerializer,
17
17
  LinkResolverFunction,
18
+ asImageSrc,
19
+ asImageWidthSrcSet,
20
+ asImagePixelDensitySrcSet,
18
21
  } from "@prismicio/helpers";
19
22
 
20
23
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -89,6 +92,7 @@ type PrismicPluginComponentsOptions = {
89
92
  *
90
93
  * @remarks
91
94
  * Components will be rendered using the {@link SliceComponentProps} interface.
95
+ *
92
96
  * @defaultValue `null` when `process.env.NODE_ENV === "production"` else {@link TODOSliceComponent}
93
97
  */
94
98
  sliceZoneDefaultComponent?: SliceComponentType;
@@ -308,6 +312,26 @@ export type PrismicPluginHelpers = {
308
312
  */
309
313
  asDate: typeof asDate;
310
314
 
315
+ /**
316
+ * Returns the URL of an Image field with optional image transformations (via
317
+ * Imgix URL parameters). This is `@prismicio/helpers` {@link asImageSrc} function.
318
+ */
319
+ asImageSrc: typeof asImageSrc;
320
+
321
+ /**
322
+ * Creates a width-based `srcset` from an Image field with optional image
323
+ * transformations (via Imgix URL parameters). This is `@prismicio/helpers`
324
+ * {@link asImageWidthSrcSet} function.
325
+ */
326
+ asImageWidthSrcSet: typeof asImageWidthSrcSet;
327
+
328
+ /**
329
+ * Creates a pixel-density-based `srcset` from an Image field with optional
330
+ * image transformations (via Imgix URL parameters). This is
331
+ * `@prismicio/helpers` {@link asImagePixelDensitySrcSet} function.
332
+ */
333
+ asImagePixelDensitySrcSet: typeof asImagePixelDensitySrcSet;
334
+
311
335
  /**
312
336
  * Converts a document into a link field. This is `@prismicio/helpers`
313
337
  * {@link documentToLinkField} function.
@@ -91,10 +91,12 @@ const isParams = (
91
91
  * @typeParam TClientMethodName - A method name from `@prismicio/client`
92
92
  * @typeParam TClientMethodArguments - The method expected arguments
93
93
  * @typeParam TClientMethodReturnType - The method expected return type
94
+ *
94
95
  * @param method - The `@prismicio/client` method name to use
95
96
  * @param args - The arguments to use with requested method
96
97
  *
97
98
  * @returns The composable payload {@link ClientComposableReturnType}
99
+ *
98
100
  * @internal
99
101
  */
100
102
  export const useStatefulPrismicClientMethod = <
@@ -16,9 +16,17 @@
16
16
  "type": "string | object | function",
17
17
  "description": "An HTML tag name, a component, or a functional component used to render images. Defaults to the one provided to `@prismicio/vue` plugin if configured, `\"img\"` otherwise."
18
18
  },
19
- "prismic-image/image-component-additional-props": {
19
+ "prismic-image/imgix-params": {
20
20
  "type": "object",
21
- "description": "A map of additional props to pass to the component used to render images when using one."
21
+ "description": "An object of Imgix URL API parameters."
22
+ },
23
+ "prismic-image/widths": {
24
+ "type": "array | string",
25
+ "description": "Adds an additional `srcset` attribute to the image following given widths."
26
+ },
27
+ "prismic-image/pixel-densities": {
28
+ "type": "array | string",
29
+ "description": "Adds an additional `srcset` attribute to the image following giving pixel densities."
22
30
  },
23
31
 
24
32
  "prismic-link/field": {
package/vetur/tags.json CHANGED
@@ -7,7 +7,9 @@
7
7
  "attributes": [
8
8
  "field",
9
9
  "image-component",
10
- "image-component-additional-props"
10
+ "imgix-params",
11
+ "widths",
12
+ "pixel-densities"
11
13
  ],
12
14
  "description": "Component to render a Prismic image field."
13
15
  },