@griddo/core 10.2.21 → 10.2.23

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.
@@ -39,69 +39,61 @@ export type Heading<HeadingTagsType = HTMLHeadingTag> = {
39
39
  };
40
40
  export type Image = {
41
41
  /** Image id */
42
- id?: number;
42
+ id: number;
43
43
  /** Original image name */
44
- name?: string;
44
+ name: string;
45
45
  /** Image name from the gallery */
46
- title?: string;
46
+ title: string;
47
47
  /** Image description from the gallery */
48
- description?: string;
48
+ description: string;
49
49
  /** Alternative text for the image */
50
- alt?: string;
50
+ alt: string;
51
51
  /** Image tags from the gallery */
52
- tags?: Array<string>;
52
+ tags: Array<string>;
53
53
  /** Griddo DAM image url */
54
- url?: string;
54
+ url: string;
55
55
  /** Griddo DAM image url thumbnail */
56
- thumb?: string;
56
+ thumb: string;
57
57
  /** Cloudinary `public-id`
58
58
  * @deprecated
59
59
  * Cloudinary will be deprecated in the future
60
60
  */
61
- publicId?: string;
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?: string;
66
+ damId: string;
67
67
  /** Image publication date */
68
- published?: string;
68
+ published: string;
69
69
  /** Original image size in bytes */
70
- size?: number;
70
+ size: number;
71
71
  /** Original image width in pixels */
72
- width?: number;
72
+ width: number;
73
73
  /** Original image height in pixels */
74
- height?: number;
74
+ height: number;
75
75
  /** Original image orientation
76
76
  * P: Portrait
77
77
  * L: Landscape
78
78
  * S: Square
79
79
  */
80
- orientation?: "P" | "L" | "S";
80
+ orientation: "P" | "L" | "S";
81
81
  /** Site to which image belongs */
82
- site?: number;
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?: Extract<ImagePosition, "bottom" | "center" | "left-bottom" | "left-top" | "left" | "right-bottom" | "right-top" | "right" | "top">;
84
+ position: ImagePosition;
85
85
  };
86
- interface LinkCommon {
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
- interface LinkUrl extends LinkCommon {
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;
@@ -10,4 +10,6 @@ export interface DamDefaults {
10
10
  readonly decoding?: ImageDecoding;
11
11
  /** Griddo cdn formats. */
12
12
  readonly formats?: Array<"webp" | "avif">;
13
+ /** Default widths for the srcset generation. */
14
+ readonly widths?: Array<string>;
13
15
  }
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.21",
5
+ "version": "10.2.23",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -81,5 +81,5 @@
81
81
  "resolutions": {
82
82
  "colors": "1.4.0"
83
83
  },
84
- "gitHead": "76f7c6804b511c785978ceb9bf94a2516c7da5bd"
84
+ "gitHead": "11929aed979e56dedf6e794d85fa73f5e3340bdd"
85
85
  }