@prismicio/vue 3.0.0-beta.5 → 3.0.0-beta.6
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.cjs +12 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -3
- package/dist/index.js +7 -12
- package/dist/index.js.map +1 -1
- package/package.json +21 -21
- package/src/components/PrismicImage.ts +11 -21
package/dist/index.d.ts
CHANGED
|
@@ -677,8 +677,8 @@ declare type PrismicImageProps = {
|
|
|
677
677
|
* Adds an additional `srcset` attribute to the image following given widths.
|
|
678
678
|
*
|
|
679
679
|
* @remarks
|
|
680
|
-
* A special value of `"
|
|
681
|
-
* coming from the API.
|
|
680
|
+
* A special value of `"thumbnails"` is accepted to automatically use image
|
|
681
|
+
* widths coming from the API.
|
|
682
682
|
* @remarks
|
|
683
683
|
* A special value of `"defaults"` is accepted to automatically use image
|
|
684
684
|
* widths coming from the plugin configuration.
|
|
@@ -686,7 +686,7 @@ declare type PrismicImageProps = {
|
|
|
686
686
|
* This prop is not compatible with the `pixelDensities` prop. When both are
|
|
687
687
|
* used the `pixelDensities` prop will be ignored.
|
|
688
688
|
*/
|
|
689
|
-
widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "
|
|
689
|
+
widths?: NonNullable<Parameters<typeof asImageWidthSrcSet>[1]>["widths"] | "thumbnails" | "defaults";
|
|
690
690
|
/**
|
|
691
691
|
* Adds an additional `srcset` attribute to the image following giving pixel densities.
|
|
692
692
|
*
|
|
@@ -1100,6 +1100,8 @@ declare const usePrismicDocumentsByIDs: <TDocument extends PrismicDocument<Recor
|
|
|
1100
1100
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
|
|
1101
1101
|
*/
|
|
1102
1102
|
declare const useAllPrismicDocumentsByIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(ids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
|
|
1103
|
+
limit?: number | undefined;
|
|
1104
|
+
} & {
|
|
1103
1105
|
signal?: {
|
|
1104
1106
|
aborted: any;
|
|
1105
1107
|
addEventListener: any;
|
|
@@ -1176,6 +1178,8 @@ declare const usePrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Reco
|
|
|
1176
1178
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByIDs}
|
|
1177
1179
|
*/
|
|
1178
1180
|
declare const useAllPrismicDocumentsByUIDs: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, ids: string[], params?: (Partial<_prismicio_client.BuildQueryURLArgs> & {
|
|
1181
|
+
limit?: number | undefined;
|
|
1182
|
+
} & {
|
|
1179
1183
|
signal?: {
|
|
1180
1184
|
aborted: any;
|
|
1181
1185
|
addEventListener: any;
|
|
@@ -1251,6 +1255,8 @@ declare const usePrismicDocumentsByType: <TDocument extends PrismicDocument<Reco
|
|
|
1251
1255
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByType}
|
|
1252
1256
|
*/
|
|
1253
1257
|
declare const useAllPrismicDocumentsByType: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(documentType: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
|
|
1258
|
+
limit?: number | undefined;
|
|
1259
|
+
} & {
|
|
1254
1260
|
signal?: {
|
|
1255
1261
|
aborted: any;
|
|
1256
1262
|
addEventListener: any;
|
|
@@ -1300,6 +1306,8 @@ declare const usePrismicDocumentsByTag: <TDocument extends PrismicDocument<Recor
|
|
|
1300
1306
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByTag}
|
|
1301
1307
|
*/
|
|
1302
1308
|
declare const useAllPrismicDocumentsByTag: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(tag: string, params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
|
|
1309
|
+
limit?: number | undefined;
|
|
1310
|
+
} & {
|
|
1303
1311
|
signal?: {
|
|
1304
1312
|
aborted: any;
|
|
1305
1313
|
addEventListener: any;
|
|
@@ -1350,6 +1358,8 @@ declare const usePrismicDocumentsByEveryTag: <TDocument extends PrismicDocument<
|
|
|
1350
1358
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
|
|
1351
1359
|
*/
|
|
1352
1360
|
declare const useAllPrismicDocumentsByEveryTag: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(tags: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
|
|
1361
|
+
limit?: number | undefined;
|
|
1362
|
+
} & {
|
|
1353
1363
|
signal?: {
|
|
1354
1364
|
aborted: any;
|
|
1355
1365
|
addEventListener: any;
|
|
@@ -1401,6 +1411,8 @@ declare const usePrismicDocumentsBySomeTags: <TDocument extends PrismicDocument<
|
|
|
1401
1411
|
* @see Underlying `@prismicio/client` method {@link Client.getAllByTags}
|
|
1402
1412
|
*/
|
|
1403
1413
|
declare const useAllPrismicDocumentsBySomeTags: <TDocument extends PrismicDocument<Record<string, any>, string, string>>(tags: string[], params?: (Partial<Omit<_prismicio_client.BuildQueryURLArgs, "page">> & {
|
|
1414
|
+
limit?: number | undefined;
|
|
1415
|
+
} & {
|
|
1404
1416
|
signal?: {
|
|
1405
1417
|
aborted: any;
|
|
1406
1418
|
addEventListener: any;
|
package/dist/index.js
CHANGED
|
@@ -62,15 +62,10 @@ const usePrismicImage = (props) => {
|
|
|
62
62
|
if (pixelDensities) {
|
|
63
63
|
console.warn("[PrismicImage] `widths` and `pixelDensities` props should not be use alongside each others, only `widths` will be applied", props);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return asImageWidthSrcSet({ url, dimensions, alt: alt2, copyright: copyright2 }, {
|
|
70
|
-
...imgixParams,
|
|
71
|
-
widths: widths === "defaults" ? (_a = options.components) == null ? void 0 : _a.imageWidthSrcSetDefaults : widths
|
|
72
|
-
});
|
|
73
|
-
}
|
|
65
|
+
return asImageWidthSrcSet(field, {
|
|
66
|
+
...imgixParams,
|
|
67
|
+
widths: widths === "defaults" ? (_a = options.components) == null ? void 0 : _a.imageWidthSrcSetDefaults : widths
|
|
68
|
+
});
|
|
74
69
|
} else if (pixelDensities) {
|
|
75
70
|
return asImagePixelDensitySrcSet(field, {
|
|
76
71
|
...imgixParams,
|
|
@@ -599,13 +594,13 @@ const createPrismic = (options) => {
|
|
|
599
594
|
return prismic;
|
|
600
595
|
};
|
|
601
596
|
|
|
602
|
-
var PrismicClientComposableState
|
|
603
|
-
(function(PrismicClientComposableState2) {
|
|
597
|
+
var PrismicClientComposableState = /* @__PURE__ */ ((PrismicClientComposableState2) => {
|
|
604
598
|
PrismicClientComposableState2["Idle"] = "idle";
|
|
605
599
|
PrismicClientComposableState2["Pending"] = "pending";
|
|
606
600
|
PrismicClientComposableState2["Success"] = "success";
|
|
607
601
|
PrismicClientComposableState2["Error"] = "error";
|
|
608
|
-
|
|
602
|
+
return PrismicClientComposableState2;
|
|
603
|
+
})(PrismicClientComposableState || {});
|
|
609
604
|
|
|
610
605
|
const isParams = (value) => {
|
|
611
606
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|