@griddo/core 10.2.20 → 10.2.22
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/README.md +15 -19
- package/dist/autotypes.cjs.js.map +1 -1
- package/dist/autotypes.js.map +1 -1
- package/dist/components/GriddoImageExp/GriddoImageExp.stories.d.ts +13 -2
- package/dist/components/GriddoImageExp/index.d.ts +2 -42
- package/dist/components/GriddoImageExp/types.d.ts +55 -0
- package/dist/components/GriddoImageExp/utils.d.ts +97 -0
- package/dist/hooks/useGriddoImageExp.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/api-response-fields/index.d.ts +22 -30
- package/dist/types/core/index.d.ts +3 -2
- package/dist/types/schemas/DamDefaults.d.ts +2 -0
- package/package.json +4 -3
|
@@ -39,69 +39,61 @@ export type Heading<HeadingTagsType = HTMLHeadingTag> = {
|
|
|
39
39
|
};
|
|
40
40
|
export type Image = {
|
|
41
41
|
/** Image id */
|
|
42
|
-
id
|
|
42
|
+
id: number;
|
|
43
43
|
/** Original image name */
|
|
44
|
-
name
|
|
44
|
+
name: string;
|
|
45
45
|
/** Image name from the gallery */
|
|
46
|
-
title
|
|
46
|
+
title: string;
|
|
47
47
|
/** Image description from the gallery */
|
|
48
|
-
description
|
|
48
|
+
description: string;
|
|
49
49
|
/** Alternative text for the image */
|
|
50
|
-
alt
|
|
50
|
+
alt: string;
|
|
51
51
|
/** Image tags from the gallery */
|
|
52
|
-
tags
|
|
52
|
+
tags: Array<string>;
|
|
53
53
|
/** Griddo DAM image url */
|
|
54
|
-
url
|
|
54
|
+
url: string;
|
|
55
55
|
/** Griddo DAM image url thumbnail */
|
|
56
|
-
thumb
|
|
56
|
+
thumb: string;
|
|
57
57
|
/** Cloudinary `public-id`
|
|
58
58
|
* @deprecated
|
|
59
59
|
* Cloudinary will be deprecated in the future
|
|
60
60
|
*/
|
|
61
|
-
publicId
|
|
61
|
+
publicId: string;
|
|
62
62
|
/** Griddo DAM image id
|
|
63
63
|
* @deprecated
|
|
64
64
|
* This id is internal and should not be used
|
|
65
65
|
*/
|
|
66
|
-
damId
|
|
66
|
+
damId: string;
|
|
67
67
|
/** Image publication date */
|
|
68
|
-
published
|
|
68
|
+
published: string;
|
|
69
69
|
/** Original image size in bytes */
|
|
70
|
-
size
|
|
70
|
+
size: number;
|
|
71
71
|
/** Original image width in pixels */
|
|
72
|
-
width
|
|
72
|
+
width: number;
|
|
73
73
|
/** Original image height in pixels */
|
|
74
|
-
height
|
|
74
|
+
height: number;
|
|
75
75
|
/** Original image orientation
|
|
76
76
|
* P: Portrait
|
|
77
77
|
* L: Landscape
|
|
78
78
|
* S: Square
|
|
79
79
|
*/
|
|
80
|
-
orientation
|
|
80
|
+
orientation: "P" | "L" | "S";
|
|
81
81
|
/** Site to which image belongs */
|
|
82
|
-
site
|
|
82
|
+
site: number;
|
|
83
83
|
/** The alignment in a 3x3 grid for the image, for example to use in <GriddoImage> with the `position` prop */
|
|
84
|
-
position
|
|
84
|
+
position: ImagePosition;
|
|
85
85
|
};
|
|
86
|
-
|
|
86
|
+
/** Field of type where you can add a white list of modules to open them in a modal. */
|
|
87
|
+
export type Link<ModalComponents = unknown> = {
|
|
87
88
|
/** Link text */
|
|
88
89
|
text?: string;
|
|
89
90
|
/** Type of link */
|
|
90
91
|
linkType: "url" | "modal";
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
linkType: "url";
|
|
92
|
+
/** Object with the component or modules props response */
|
|
93
|
+
modal: ModalComponents;
|
|
94
94
|
/** UrlField response */
|
|
95
95
|
url?: Url;
|
|
96
|
-
}
|
|
97
|
-
interface LinkModal<ModalComponents> extends LinkCommon {
|
|
98
|
-
linkType: "modal";
|
|
99
|
-
/** Object with the component or modules props response */
|
|
100
|
-
modal?: ModalComponents;
|
|
101
|
-
}
|
|
102
|
-
/** Field of type where you can add a white list of modules to open them in a
|
|
103
|
-
* modal. */
|
|
104
|
-
export type Link<ModalComponents = unknown> = LinkModal<ModalComponents> | LinkUrl;
|
|
96
|
+
};
|
|
105
97
|
type MultiCheckSelectWithRelations<FromDistributor, RelatedContentType> = FromDistributor extends true ? QueriedDataItem<RelatedContentType> : {
|
|
106
98
|
name?: number;
|
|
107
99
|
value?: number;
|
|
@@ -195,7 +195,8 @@ export type GriddoDamDefaults = {
|
|
|
195
195
|
crop?: ImageCropType;
|
|
196
196
|
loading?: ImageLoading;
|
|
197
197
|
decoding?: ImageDecoding;
|
|
198
|
-
formats?: Array<ImageFormats
|
|
198
|
+
formats?: Array<Extract<ImageFormats, "avif" | "webp">>;
|
|
199
|
+
widths?: Array<string>;
|
|
199
200
|
};
|
|
200
201
|
/** Describe a Griddo site object for final Gatsby template */
|
|
201
202
|
export interface Site {
|
|
@@ -252,7 +253,7 @@ export type ImageFormats = "avif" | "webp" | "jpeg" | "jpg" | "png" | "gif" | "s
|
|
|
252
253
|
/** Kind of browser image load method */
|
|
253
254
|
export type ImageLoading = "lazy" | "eager";
|
|
254
255
|
/** Image transforms for the Griddo cdn image provider */
|
|
255
|
-
export type ImageTransform = "grayscale" | "flip" | "flop" |
|
|
256
|
+
export type ImageTransform = "grayscale" | "flip" | "flop" | `blur(${string})`;
|
|
256
257
|
/** Background image type */
|
|
257
258
|
export type BackgroundImageSizesProps = {
|
|
258
259
|
/** Breakpoint in px */
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@griddo/core",
|
|
3
3
|
"description": "Reload version of Griddo Core",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
|
-
"version": "10.2.
|
|
5
|
+
"version": "10.2.22",
|
|
6
6
|
"authors": [
|
|
7
7
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
8
8
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"prepare": "yarn build",
|
|
29
29
|
"start:storybook": "start-storybook -p 6006",
|
|
30
30
|
"test": "jest",
|
|
31
|
-
"watch
|
|
31
|
+
"test:watch": "jest --watch",
|
|
32
|
+
"test:watch-all": "jest --watch",
|
|
32
33
|
"test:coverage": "jest --coverage",
|
|
33
34
|
"test:clear": "jest --clearCache"
|
|
34
35
|
},
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
"resolutions": {
|
|
81
82
|
"colors": "1.4.0"
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "9816323e3b6056b4978f41803c23ca8b86b901a8"
|
|
84
85
|
}
|