@griddo/core 10.6.18 → 10.6.19

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./styles.css";
3
2
  /**
4
3
  * `<CloudinaryBackgroundImage>`
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./style.css";
3
2
  /**
4
3
  * `<Wrapper>`
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * `<Component>`
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Fields } from "../..";
3
2
  import { FetchPriority, ImageCropType, ImageDecoding, ImageFormats, ImageLoading, ImagePosition, ImageTransform } from "../../types/core";
4
3
  export interface Source {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * `<LdJson>`
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Url } from "../../types/api-response-fields";
3
2
  /**
4
3
  * `<Link>`
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ModulePreviewProps } from "../ModulePreview";
3
2
  import { PageProps } from "../Page";
4
3
  /**
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { ComponentProps } from "../components/Component";
3
3
  declare const getComponent: (components: Record<string, React.FC<Omit<ComponentProps, "libComponents">>>, props: {
4
- [key: string]: unknown;
5
4
  component: string;
5
+ [key: string]: unknown;
6
6
  }) => React.FC<Omit<ComponentProps, "libComponents">> | null;
7
7
  export { getComponent };
@@ -14,23 +14,23 @@ declare function useThemeColors(themeFile: Theme.GriddoTheme, props?: UseThemeCo
14
14
  id: string;
15
15
  name: string;
16
16
  selector: string;
17
- description?: string | undefined;
17
+ description?: string;
18
18
  } | {
19
19
  primitives: Theme.Primitives;
20
- preferColorScheme?: false | undefined;
20
+ preferColorScheme?: false;
21
21
  id: string;
22
22
  name: string;
23
23
  selector: string;
24
- description?: string | undefined;
24
+ description?: string;
25
25
  })[];
26
26
  preferColorScheme: true;
27
27
  id: string;
28
28
  name: string;
29
29
  selector: string;
30
- description?: string | undefined;
30
+ description?: string;
31
31
  customMedia?: {
32
32
  [key: `--${string}`]: string;
33
- } | undefined;
33
+ };
34
34
  } | {
35
35
  primitives: Theme.Primitives;
36
36
  subthemes: ({
@@ -39,23 +39,23 @@ declare function useThemeColors(themeFile: Theme.GriddoTheme, props?: UseThemeCo
39
39
  id: string;
40
40
  name: string;
41
41
  selector: string;
42
- description?: string | undefined;
42
+ description?: string;
43
43
  } | {
44
44
  primitives: Theme.Primitives;
45
- preferColorScheme?: false | undefined;
45
+ preferColorScheme?: false;
46
46
  id: string;
47
47
  name: string;
48
48
  selector: string;
49
- description?: string | undefined;
49
+ description?: string;
50
50
  })[];
51
- preferColorScheme?: false | undefined;
51
+ preferColorScheme?: false;
52
52
  id: string;
53
53
  name: string;
54
54
  selector: string;
55
- description?: string | undefined;
55
+ description?: string;
56
56
  customMedia?: {
57
57
  [key: `--${string}`]: string;
58
- } | undefined;
58
+ };
59
59
  } | {
60
60
  primitives: Theme.Primitives;
61
61
  subthemes: ({
@@ -64,20 +64,20 @@ declare function useThemeColors(themeFile: Theme.GriddoTheme, props?: UseThemeCo
64
64
  id: string;
65
65
  name: string;
66
66
  selector: string;
67
- description?: string | undefined;
67
+ description?: string;
68
68
  } | {
69
69
  primitives: Theme.Primitives;
70
- preferColorScheme?: false | undefined;
70
+ preferColorScheme?: false;
71
71
  id: string;
72
72
  name: string;
73
73
  selector: string;
74
- description?: string | undefined;
74
+ description?: string;
75
75
  })[];
76
76
  preferColorScheme: true;
77
77
  id: string;
78
78
  name: string;
79
79
  selector: string;
80
- description?: string | undefined;
80
+ description?: string;
81
81
  } | {
82
82
  primitives: Theme.Primitives;
83
83
  subthemes: ({
@@ -86,19 +86,19 @@ declare function useThemeColors(themeFile: Theme.GriddoTheme, props?: UseThemeCo
86
86
  id: string;
87
87
  name: string;
88
88
  selector: string;
89
- description?: string | undefined;
89
+ description?: string;
90
90
  } | {
91
91
  primitives: Theme.Primitives;
92
- preferColorScheme?: false | undefined;
92
+ preferColorScheme?: false;
93
93
  id: string;
94
94
  name: string;
95
95
  selector: string;
96
- description?: string | undefined;
96
+ description?: string;
97
97
  })[];
98
- preferColorScheme?: false | undefined;
98
+ preferColorScheme?: false;
99
99
  id: string;
100
100
  name: string;
101
101
  selector: string;
102
- description?: string | undefined;
102
+ description?: string;
103
103
  })[];
104
104
  export { useThemeColors };
@@ -14,23 +14,23 @@ declare function useThemeFont(themeFile: Theme.GriddoTheme, props?: UseThemeFont
14
14
  id: string;
15
15
  name: string;
16
16
  selector: string;
17
- description?: string | undefined;
17
+ description?: string;
18
18
  } | {
19
19
  primitives: Theme.Primitives;
20
- preferColorScheme?: false | undefined;
20
+ preferColorScheme?: false;
21
21
  id: string;
22
22
  name: string;
23
23
  selector: string;
24
- description?: string | undefined;
24
+ description?: string;
25
25
  })[];
26
26
  preferColorScheme: true;
27
27
  id: string;
28
28
  name: string;
29
29
  selector: string;
30
- description?: string | undefined;
30
+ description?: string;
31
31
  customMedia?: {
32
32
  [key: `--${string}`]: string;
33
- } | undefined;
33
+ };
34
34
  } | {
35
35
  primitives: Theme.Primitives;
36
36
  subthemes: ({
@@ -39,23 +39,23 @@ declare function useThemeFont(themeFile: Theme.GriddoTheme, props?: UseThemeFont
39
39
  id: string;
40
40
  name: string;
41
41
  selector: string;
42
- description?: string | undefined;
42
+ description?: string;
43
43
  } | {
44
44
  primitives: Theme.Primitives;
45
- preferColorScheme?: false | undefined;
45
+ preferColorScheme?: false;
46
46
  id: string;
47
47
  name: string;
48
48
  selector: string;
49
- description?: string | undefined;
49
+ description?: string;
50
50
  })[];
51
- preferColorScheme?: false | undefined;
51
+ preferColorScheme?: false;
52
52
  id: string;
53
53
  name: string;
54
54
  selector: string;
55
- description?: string | undefined;
55
+ description?: string;
56
56
  customMedia?: {
57
57
  [key: `--${string}`]: string;
58
- } | undefined;
58
+ };
59
59
  } | {
60
60
  primitives: Theme.Primitives;
61
61
  subthemes: ({
@@ -64,20 +64,20 @@ declare function useThemeFont(themeFile: Theme.GriddoTheme, props?: UseThemeFont
64
64
  id: string;
65
65
  name: string;
66
66
  selector: string;
67
- description?: string | undefined;
67
+ description?: string;
68
68
  } | {
69
69
  primitives: Theme.Primitives;
70
- preferColorScheme?: false | undefined;
70
+ preferColorScheme?: false;
71
71
  id: string;
72
72
  name: string;
73
73
  selector: string;
74
- description?: string | undefined;
74
+ description?: string;
75
75
  })[];
76
76
  preferColorScheme: true;
77
77
  id: string;
78
78
  name: string;
79
79
  selector: string;
80
- description?: string | undefined;
80
+ description?: string;
81
81
  } | {
82
82
  primitives: Theme.Primitives;
83
83
  subthemes: ({
@@ -86,19 +86,19 @@ declare function useThemeFont(themeFile: Theme.GriddoTheme, props?: UseThemeFont
86
86
  id: string;
87
87
  name: string;
88
88
  selector: string;
89
- description?: string | undefined;
89
+ description?: string;
90
90
  } | {
91
91
  primitives: Theme.Primitives;
92
- preferColorScheme?: false | undefined;
92
+ preferColorScheme?: false;
93
93
  id: string;
94
94
  name: string;
95
95
  selector: string;
96
- description?: string | undefined;
96
+ description?: string;
97
97
  })[];
98
- preferColorScheme?: false | undefined;
98
+ preferColorScheme?: false;
99
99
  id: string;
100
100
  name: string;
101
101
  selector: string;
102
- description?: string | undefined;
102
+ description?: string;
103
103
  })[];
104
104
  export { useThemeFont };
@@ -14,23 +14,23 @@ declare function useThemePrimitives(themeFile: Theme.GriddoTheme, props: UseThem
14
14
  id: string;
15
15
  name: string;
16
16
  selector: string;
17
- description?: string | undefined;
17
+ description?: string;
18
18
  } | {
19
19
  primitives: Theme.Primitives;
20
- preferColorScheme?: false | undefined;
20
+ preferColorScheme?: false;
21
21
  id: string;
22
22
  name: string;
23
23
  selector: string;
24
- description?: string | undefined;
24
+ description?: string;
25
25
  })[];
26
26
  preferColorScheme: true;
27
27
  id: string;
28
28
  name: string;
29
29
  selector: string;
30
- description?: string | undefined;
30
+ description?: string;
31
31
  customMedia?: {
32
32
  [key: `--${string}`]: string;
33
- } | undefined;
33
+ };
34
34
  } | {
35
35
  primitives: Theme.Primitives;
36
36
  subthemes: ({
@@ -39,23 +39,23 @@ declare function useThemePrimitives(themeFile: Theme.GriddoTheme, props: UseThem
39
39
  id: string;
40
40
  name: string;
41
41
  selector: string;
42
- description?: string | undefined;
42
+ description?: string;
43
43
  } | {
44
44
  primitives: Theme.Primitives;
45
- preferColorScheme?: false | undefined;
45
+ preferColorScheme?: false;
46
46
  id: string;
47
47
  name: string;
48
48
  selector: string;
49
- description?: string | undefined;
49
+ description?: string;
50
50
  })[];
51
- preferColorScheme?: false | undefined;
51
+ preferColorScheme?: false;
52
52
  id: string;
53
53
  name: string;
54
54
  selector: string;
55
- description?: string | undefined;
55
+ description?: string;
56
56
  customMedia?: {
57
57
  [key: `--${string}`]: string;
58
- } | undefined;
58
+ };
59
59
  } | {
60
60
  primitives: Theme.Primitives;
61
61
  subthemes: ({
@@ -64,20 +64,20 @@ declare function useThemePrimitives(themeFile: Theme.GriddoTheme, props: UseThem
64
64
  id: string;
65
65
  name: string;
66
66
  selector: string;
67
- description?: string | undefined;
67
+ description?: string;
68
68
  } | {
69
69
  primitives: Theme.Primitives;
70
- preferColorScheme?: false | undefined;
70
+ preferColorScheme?: false;
71
71
  id: string;
72
72
  name: string;
73
73
  selector: string;
74
- description?: string | undefined;
74
+ description?: string;
75
75
  })[];
76
76
  preferColorScheme: true;
77
77
  id: string;
78
78
  name: string;
79
79
  selector: string;
80
- description?: string | undefined;
80
+ description?: string;
81
81
  } | {
82
82
  primitives: Theme.Primitives;
83
83
  subthemes: ({
@@ -86,19 +86,19 @@ declare function useThemePrimitives(themeFile: Theme.GriddoTheme, props: UseThem
86
86
  id: string;
87
87
  name: string;
88
88
  selector: string;
89
- description?: string | undefined;
89
+ description?: string;
90
90
  } | {
91
91
  primitives: Theme.Primitives;
92
- preferColorScheme?: false | undefined;
92
+ preferColorScheme?: false;
93
93
  id: string;
94
94
  name: string;
95
95
  selector: string;
96
- description?: string | undefined;
96
+ description?: string;
97
97
  })[];
98
- preferColorScheme?: false | undefined;
98
+ preferColorScheme?: false;
99
99
  id: string;
100
100
  name: string;
101
101
  selector: string;
102
- description?: string | undefined;
102
+ description?: string;
103
103
  })[];
104
104
  export { useThemePrimitives };
@@ -7,23 +7,23 @@ export declare const filterThemePrimitivesByType: (themes: Array<Theme.GlobalThe
7
7
  id: string;
8
8
  name: string;
9
9
  selector: string;
10
- description?: string | undefined;
10
+ description?: string;
11
11
  } | {
12
12
  primitives: Theme.Primitives;
13
- preferColorScheme?: false | undefined;
13
+ preferColorScheme?: false;
14
14
  id: string;
15
15
  name: string;
16
16
  selector: string;
17
- description?: string | undefined;
17
+ description?: string;
18
18
  })[];
19
19
  preferColorScheme: true;
20
20
  id: string;
21
21
  name: string;
22
22
  selector: string;
23
- description?: string | undefined;
23
+ description?: string;
24
24
  customMedia?: {
25
25
  [key: `--${string}`]: string;
26
- } | undefined;
26
+ };
27
27
  } | {
28
28
  primitives: Theme.Primitives;
29
29
  subthemes: ({
@@ -32,23 +32,23 @@ export declare const filterThemePrimitivesByType: (themes: Array<Theme.GlobalThe
32
32
  id: string;
33
33
  name: string;
34
34
  selector: string;
35
- description?: string | undefined;
35
+ description?: string;
36
36
  } | {
37
37
  primitives: Theme.Primitives;
38
- preferColorScheme?: false | undefined;
38
+ preferColorScheme?: false;
39
39
  id: string;
40
40
  name: string;
41
41
  selector: string;
42
- description?: string | undefined;
42
+ description?: string;
43
43
  })[];
44
- preferColorScheme?: false | undefined;
44
+ preferColorScheme?: false;
45
45
  id: string;
46
46
  name: string;
47
47
  selector: string;
48
- description?: string | undefined;
48
+ description?: string;
49
49
  customMedia?: {
50
50
  [key: `--${string}`]: string;
51
- } | undefined;
51
+ };
52
52
  } | {
53
53
  primitives: Theme.Primitives;
54
54
  subthemes: ({
@@ -57,20 +57,20 @@ export declare const filterThemePrimitivesByType: (themes: Array<Theme.GlobalThe
57
57
  id: string;
58
58
  name: string;
59
59
  selector: string;
60
- description?: string | undefined;
60
+ description?: string;
61
61
  } | {
62
62
  primitives: Theme.Primitives;
63
- preferColorScheme?: false | undefined;
63
+ preferColorScheme?: false;
64
64
  id: string;
65
65
  name: string;
66
66
  selector: string;
67
- description?: string | undefined;
67
+ description?: string;
68
68
  })[];
69
69
  preferColorScheme: true;
70
70
  id: string;
71
71
  name: string;
72
72
  selector: string;
73
- description?: string | undefined;
73
+ description?: string;
74
74
  } | {
75
75
  primitives: Theme.Primitives;
76
76
  subthemes: ({
@@ -79,20 +79,20 @@ export declare const filterThemePrimitivesByType: (themes: Array<Theme.GlobalThe
79
79
  id: string;
80
80
  name: string;
81
81
  selector: string;
82
- description?: string | undefined;
82
+ description?: string;
83
83
  } | {
84
84
  primitives: Theme.Primitives;
85
- preferColorScheme?: false | undefined;
85
+ preferColorScheme?: false;
86
86
  id: string;
87
87
  name: string;
88
88
  selector: string;
89
- description?: string | undefined;
89
+ description?: string;
90
90
  })[];
91
- preferColorScheme?: false | undefined;
91
+ preferColorScheme?: false;
92
92
  id: string;
93
93
  name: string;
94
94
  selector: string;
95
- description?: string | undefined;
95
+ description?: string;
96
96
  })[];
97
97
  export declare const filterThemePrimitivesByColor: (themes: Array<Theme.GlobalTheme | Theme.Theme>, subtheme?: string) => ({
98
98
  primitives: Theme.Primitives;
@@ -102,23 +102,23 @@ export declare const filterThemePrimitivesByColor: (themes: Array<Theme.GlobalTh
102
102
  id: string;
103
103
  name: string;
104
104
  selector: string;
105
- description?: string | undefined;
105
+ description?: string;
106
106
  } | {
107
107
  primitives: Theme.Primitives;
108
- preferColorScheme?: false | undefined;
108
+ preferColorScheme?: false;
109
109
  id: string;
110
110
  name: string;
111
111
  selector: string;
112
- description?: string | undefined;
112
+ description?: string;
113
113
  })[];
114
114
  preferColorScheme: true;
115
115
  id: string;
116
116
  name: string;
117
117
  selector: string;
118
- description?: string | undefined;
118
+ description?: string;
119
119
  customMedia?: {
120
120
  [key: `--${string}`]: string;
121
- } | undefined;
121
+ };
122
122
  } | {
123
123
  primitives: Theme.Primitives;
124
124
  subthemes: ({
@@ -127,23 +127,23 @@ export declare const filterThemePrimitivesByColor: (themes: Array<Theme.GlobalTh
127
127
  id: string;
128
128
  name: string;
129
129
  selector: string;
130
- description?: string | undefined;
130
+ description?: string;
131
131
  } | {
132
132
  primitives: Theme.Primitives;
133
- preferColorScheme?: false | undefined;
133
+ preferColorScheme?: false;
134
134
  id: string;
135
135
  name: string;
136
136
  selector: string;
137
- description?: string | undefined;
137
+ description?: string;
138
138
  })[];
139
- preferColorScheme?: false | undefined;
139
+ preferColorScheme?: false;
140
140
  id: string;
141
141
  name: string;
142
142
  selector: string;
143
- description?: string | undefined;
143
+ description?: string;
144
144
  customMedia?: {
145
145
  [key: `--${string}`]: string;
146
- } | undefined;
146
+ };
147
147
  } | {
148
148
  primitives: Theme.Primitives;
149
149
  subthemes: ({
@@ -152,20 +152,20 @@ export declare const filterThemePrimitivesByColor: (themes: Array<Theme.GlobalTh
152
152
  id: string;
153
153
  name: string;
154
154
  selector: string;
155
- description?: string | undefined;
155
+ description?: string;
156
156
  } | {
157
157
  primitives: Theme.Primitives;
158
- preferColorScheme?: false | undefined;
158
+ preferColorScheme?: false;
159
159
  id: string;
160
160
  name: string;
161
161
  selector: string;
162
- description?: string | undefined;
162
+ description?: string;
163
163
  })[];
164
164
  preferColorScheme: true;
165
165
  id: string;
166
166
  name: string;
167
167
  selector: string;
168
- description?: string | undefined;
168
+ description?: string;
169
169
  } | {
170
170
  primitives: Theme.Primitives;
171
171
  subthemes: ({
@@ -174,18 +174,18 @@ export declare const filterThemePrimitivesByColor: (themes: Array<Theme.GlobalTh
174
174
  id: string;
175
175
  name: string;
176
176
  selector: string;
177
- description?: string | undefined;
177
+ description?: string;
178
178
  } | {
179
179
  primitives: Theme.Primitives;
180
- preferColorScheme?: false | undefined;
180
+ preferColorScheme?: false;
181
181
  id: string;
182
182
  name: string;
183
183
  selector: string;
184
- description?: string | undefined;
184
+ description?: string;
185
185
  })[];
186
- preferColorScheme?: false | undefined;
186
+ preferColorScheme?: false;
187
187
  id: string;
188
188
  name: string;
189
189
  selector: string;
190
- description?: string | undefined;
190
+ description?: string;
191
191
  })[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * `useLink()`
4
3
  *
@@ -0,0 +1,2 @@
1
+ import { createThemes } from "./theme-parser";
2
+ export { createThemes };
@@ -0,0 +1,31 @@
1
+ "use strict";var b=Object.create;var m=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var k=(e,r)=>{for(var t in r)m(e,t,{get:r[t],enumerable:!0})},d=(e,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of v(r))!j.call(e,i)&&i!==t&&m(e,i,{get:()=>r[i],enumerable:!(s=A(r,i))||s.enumerable});return e};var w=(e,r,t)=>(t=e!=null?b(C(e)):{},d(r||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),x=e=>d(m({},"__esModule",{value:!0}),e);var D={};k(D,{createThemes:()=>g});module.exports=x(D);var n=w(require("node:fs"));function u(e){return`/*
2
+ ---------------------------------------------------
3
+ This file was generated by the Griddo theme parser.
4
+ Do not edit this file directly.
5
+ ---------------------------------------------------
6
+
7
+ Theme: ${e}
8
+
9
+ */
10
+ `}function c(e){return e==null?void 0:e.map(({name:r,values:t})=>`
11
+ /* ${r} */
12
+ ${t.map(({cssVar:s,value:i})=>`${s}: ${i};`).join("")}`).join("")}function p(e){return Object.keys(e).map(r=>`@custom-media ${r} ${e[r]};`).join("")}function $(e){if(Array.isArray(e))return c(e);if(!Array.isArray(e)){let{common:r,light:t,dark:s}=e,i=r&&c(r),a=c(t),o=c(s);return`
13
+ ${i?`/* Common */ ${i}`:""}
14
+
15
+ /* \u{1F315} Light color scheme */
16
+ @media (prefers-color-scheme: light) {
17
+ ${a}
18
+ }
19
+
20
+ /* \u{1F311} Dark color scheme */
21
+ @media (prefers-color-scheme: dark) {
22
+ ${o}
23
+ }`}return[]}function f(e,r){return`${r?`${r}${e.selector}, ${r}`:""} ${e.selector} {
24
+ ${$(e.primitives)}
25
+ }`}function T(e){return`${e.selector} { ${$(e.primitives)} }`}function g(e,r){let t=e.global,s=e.themes,{outputDir:i}=r;if(!e||!r.outputDir)throw new Error("Set input theme and options");n.default.existsSync(i)||n.default.mkdirSync(i);let a=`${u(t.name)}
26
+ ${t.customMedia?p(t.customMedia):""}
27
+
28
+ ${T(t)}
29
+ `;n.default.writeFileSync(`${i}/${t.id}.css`,a);for(let o of s){let h=[],S=`${u(o.name)}
30
+ ${f(o)}
31
+ `;h.push(S);let l=[];if(o.subthemes)for(let y of o.subthemes){let P=f(y,o.selector);l.push(P)}n.default.writeFileSync(`${i}/${o.id}.css`,[...h,...l].join(""))}}0&&(module.exports={createThemes});
@@ -0,0 +1,15 @@
1
+ import type { GriddoTheme } from "../../types/theme";
2
+ /**
3
+ * Creates theme files for Griddo
4
+ *
5
+ * It takes an GriddoTheme object and options with the output directory
6
+ * and creates the theme files.
7
+ *
8
+ * @param input - The theme object containing global and sites themes
9
+ * @param options - The options object with the output directory
10
+ * @param options.outputDir - The output directory where the theme files will be created
11
+ */
12
+ declare function createThemes(input: GriddoTheme, options: {
13
+ outputDir: string;
14
+ }): void;
15
+ export { createThemes };
@@ -0,0 +1,9 @@
1
+ import { Theme } from "../..";
2
+ declare function printHeaderFileInfo(themeName: string): string;
3
+ declare function parseCustomMedia(customMedia: {
4
+ [key: string]: string;
5
+ }): string;
6
+ declare function parseThemePrimitives(theme: Theme.BaseTheme, parentSelector?: string): string;
7
+ declare function parseRootPrimitives(global: Theme.BaseTheme): string;
8
+ declare function getUnexportedThemes(themePath: string, themes: Array<Theme.Theme>, global: Theme.GlobalTheme): string[];
9
+ export { getUnexportedThemes, parseCustomMedia, parseRootPrimitives, parseThemePrimitives, printHeaderFileInfo, };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CloudinaryImageProps } from "../../components/CloudinaryImage";
3
2
  import { GriddoLinkProps } from "../../components/GriddoLink";
4
3
  import { Image, Menu } from "../api-response-fields";
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.6.18",
5
+ "version": "10.6.19",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -19,10 +19,26 @@
19
19
  "main": "dist/index.js",
20
20
  "types": "dist/index.d.ts",
21
21
  "bin": {
22
- "griddo-autotypes": "dist/autotypes.cjs.js"
22
+ "griddo-autotypes": "dist/autotypes.js"
23
+ },
24
+ "exports": {
25
+ ".": {
26
+ "import": "./dist/index.js",
27
+ "require": "./dist/index.js",
28
+ "types": "./dist/index.d.ts"
29
+ },
30
+ "./node": {
31
+ "import": "./dist/node/index.js",
32
+ "require": "./dist/node/index.js",
33
+ "types": "./dist/node/index.d.ts"
34
+ }
23
35
  },
24
36
  "scripts": {
25
- "build": "rollup -c --sourcemap --bundleConfigAsCjs",
37
+ "build:node-types": "../../node_modules/.bin/tsc --emitDeclarationOnly --declaration --outDir dist --project ./tsconfig.node.json",
38
+ "build:node-js": "npx esbuild ./src/node/index.ts --bundle --platform=node --minify --outfile=./dist/node/index.js",
39
+ "build:node": "npm run build:node-js && npm run build:node-types",
40
+ "build:core": "rollup -c --sourcemap --bundleConfigAsCjs",
41
+ "build": "npm run build:core && npm run build:node",
26
42
  "watch": "rollup -cw --bundleConfigAsCjs",
27
43
  "clean": "rm -rf ./dist",
28
44
  "prepare": "yarn build",
@@ -75,5 +91,5 @@
75
91
  "publishConfig": {
76
92
  "access": "public"
77
93
  },
78
- "gitHead": "6450c9a2a8820f718fa3ac656bf75401807aa3ae"
94
+ "gitHead": "92b2da3974ba50064e2c9b33f9b5dc752da7a33e"
79
95
  }
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("path"),t=require("node:path"),n=require("node:url"),i=require("node:process"),o=require("node:fs"),r=require("fs"),s=require("prettier");const l={directory:"isDirectory",file:"isFile"};const a=(e,t)=>t[l[e]](),p=e=>e instanceof URL?n.fileURLToPath(e):e;function c(e,{cwd:n=i.cwd(),type:r="file",allowSymlinks:s=!0}={}){!function(e){if(!Object.hasOwnProperty.call(l,e))throw new Error(`Invalid type specified: ${e}`)}(r),n=p(n);const c=s?o.statSync:o.lstatSync;for(const i of e)try{const e=c(t.resolve(n,i),{throwIfNoEntry:!1});if(!e)continue;if(a(r,e))return i}catch{}}const u=e=>e instanceof URL?n.fileURLToPath(e):e,d=Symbol("findUpStop");function m(e,n={}){const i=function(e,n={}){let i=t.resolve(u(n.cwd)||"");const{root:o}=t.parse(i),r=n.stopAt||o,s=n.limit||Number.POSITIVE_INFINITY,l=[e].flat(),a=t=>{if("function"!=typeof e)return c(l,t);const n=e(t.cwd);return"string"==typeof n?c([n],t):n},p=[];for(;;){const e=a({...n,cwd:i});if(e===d)break;if(e&&p.push(t.resolve(i,e)),i===r||p.length>=s)break;i=t.dirname(i)}return p}(e,{...n,limit:1});return i[0]}function y({cwd:e}={}){const n=m("package.json",{cwd:e});return n&&t.dirname(n)}function f(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{a(i.next(e))}catch(e){r(e)}}function l(e){try{a(i.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,l)}a((i=i.apply(e,t||[])).next())}))}const h="/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// º / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;·;______ ) AutoTypes\n// O º, | , , \\ \\\\ ·..~~.·~.·\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' ⎩, <\\/\\ \\ \\\n// \\_/ /\\_____⎩/ > > >\n// '___' <_(_)__> / \\ <\n// / / ´ \\ | \\___//\\\\\n// / / | / > > \\\\\n// · ··~~~~·~·~~~~~~~·~··~~~~~·~·~~·~~~~·~~~~~·· · ·\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n",$="autotypes.d.ts",g="Props",F="ContentType",T="List",C=/[\p{Lu}]/u,v=/[\p{Ll}]/u,b=/^[\p{Lu}](?![\p{Lu}])/gu,_=/([\p{Alpha}\p{N}_]|$)/u,j=/[_.\- ]+/,k=new RegExp("^"+j.source),x=new RegExp(j.source+_.source,"gu"),w=new RegExp("\\d+"+_.source,"gu"),S=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const n=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),i=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return t.pascalCase?i(e):n(e);return e!==n(e)&&(e=((e,t,n)=>{let i=!1,o=!1,r=!1;for(let s=0;s<e.length;s++){const l=e[s];i&&C.test(l)?(e=e.slice(0,s)+"-"+e.slice(s),i=!1,r=o,o=!0,s++):o&&r&&v.test(l)?(e=e.slice(0,s-1)+"-"+e.slice(s-1),r=o,o=!1,i=!0):(i=t(l)===l&&n(l)!==l,r=o,o=n(l)===l&&t(l)!==l)}return e})(e,n,i)),e=e.replace(k,""),e=t.preserveConsecutiveUppercase?((e,t)=>(b.lastIndex=0,e.replace(b,(e=>t(e)))))(e,n):n(e),t.pascalCase&&(e=i(e.charAt(0))+e.slice(1)),((e,t)=>(x.lastIndex=0,w.lastIndex=0,e.replace(x,((e,n)=>t(n))).replace(w,(e=>t(e)))))(e,i)};var A=S,L=S;function P(e,t){var n;const{returnTypeName:i,generic:o}=t||{},r="hideable"in e&&Boolean(e.hideable),s=o?`<${o}>`:"",l=`${i||I(e.type)}${s}`,a=r?`Hideable<${l}>`:`${l}`;return`\n\t\t${(null===(n=e._autoType)||void 0===n?void 0:n.doc)||""}\n\t\t${`${e.key}?: ${a}`}\n\t`}function D(e,t){const n=(null==t?void 0:t.interfaceSuffix)||g;return e.length>1?`{\n\t\t\t${e.map((e=>`${A(e)}?: ${e}${n}`)).join(",")}\n\t\t\t}`:e.map((e=>`${e}${n}`)).join("")}function I(e){return{ArrayFieldGroup:"Fields.ArrayFieldGroup",AsyncCheckGroup:"Fields.AsyncCheckGroup",AsyncSelect:"Fields.AsyncSelect",CheckGroup:"Fields.CheckGroup",ColorPicker:"Fields.ColorPicker",ComponentArray:"Fields.ComponentArray",ComponentContainer:"Fields.ComponentContainer",ConditionalField:"Fields.Conditional",DateField:"Fields.Date",FieldGroup:"Fields.FieldGroup",FieldsDivider:"Fields.FieldsDivider",FileField:"Fields.File",HeadingField:"Fields.Heading",ImageField:"Fields.Image",LinkField:"Fields.Link",MultiCheckSelect:"Fields.MultiCheckSelect",MultiCheckSelectGroup:"Fields.MultiCheckSelectGroup",NoteField:"Fields.Note",NumberField:"Fields.Number",RadioGroup:"Fields.RadioGroup",ReferenceField:"Fields.Reference",RichText:"Fields.RichText",Select:"Fields.Select",SliderField:"Fields.Slider",TagsField:"Fields.Tags",TextArea:"Fields.TextArea",TextField:"Fields.Text",TimeField:"Fields.Time",ToggleField:"Fields.Toggle",UniqueCheck:"Fields.UniqueCheck",UrlField:"Fields.Url",VisualUniqueSelection:"Fields.VisualUniqueSelection",Wysiwyg:"Fields.Wysiwyg"}[e]}A.default=L;const R=__dirname.includes("node_modules");function G(e,t,n,i){var o,r;const s=(null==i?void 0:i.interfaceSuffix)||g;if("FieldsDivider"===e.type)return;if(null===(o=e._autoType)||void 0===o?void 0:o.ignore)return;const{type:l,_autoType:a,key:p}=e,{hasDistributorData:c}=n;if(!l||!p)return"\n\t\t\t/** · (ノ-_-)ノ ミ ┴┴ You forgot to write the `type` | `key` or some mandatory prop */\n\t\t";if("DateField"===l||"FileField"===l||"ImageField"===l||"NoteField"===l||"NumberField"===l||"RichText"===l||"SliderField"===l||"TagsField"===l||"TextArea"===l||"TextField"===l||"TimeField"===l||"ToggleField"===l||"UniqueCheck"===l||"UrlField"===l||"Wysiwyg"===l)return P(e);if("MultiCheckSelect"===l){if("pageContentType"===t||"simpleContentType"===t){return P(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return P(e,{generic:"true"})}if("AsyncCheckGroup"===l){if("pageContentType"===t||"simpleContentType"===t){return P(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return P(e,{generic:"true"})}if("MultiCheckSelectGroup"===l){const t=e.elements.map((e=>`"${e.key}"`)).join("|");return P(e,{generic:[t,null===(r=e._autoType)||void 0===r?void 0:r.relations].join(",")})}if("ColorPicker"===l)return e.isThemePalette?P(e,{returnTypeName:"Fields.ColorPickerFixed"}):P(e);if("HeadingField"===l||"RadioGroup"===l||"Select"===l){const{options:t}=e,n=function(e){return e.map((({value:e})=>"string"==typeof e?`"${e}"`:e)).join("|")}(t);return P(e,{generic:n})}if("CheckGroup"===l){const{options:t}=e,n=function(e){return e.map((({name:e})=>"string"==typeof e?`"${e}"`:e)).join("|")}(t);return P(e,{generic:n})}if("LinkField"===l){const{whiteList:t}=e;return P(e,{generic:D(t,i)})}if("AsyncSelect"===l){if("entity"in e&&"menu_containers"===e.entity)return`\n${p}?: Menu`;if("pageContentType"===t||"simpleContentType"===t){return P(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return`\n${p}?: Fields.AsyncSelect;`}if("FieldGroup"===l)return`\n\t\t\t// << ${l}\n\t\t\t${e.fields.map((e=>G(e,t,n))).join("")}\n\t\t\t// end >>\n\t\t`;if("ArrayFieldGroup"===l){return`\n\t\t\t\n${(null==a?void 0:a.doc)||""}\n${p}?: Fields.ArrayFieldGroup<{${e.fields.map((e=>G(e,t,n))).join(",")}}>\n\t\t`}if("ConditionalField"===l){const i=e.fields.map((e=>G(e,t,n))),o=(null==a?void 0:a.doc)||"",r="hideable"in e&&e.hideable,s=r?">":"";return`\n\t\t\t// << ${l}\n\t\t\t\n${o}\n${p}?: ${r?"Hideable<":""}${I(l)}<${e.options.map((e=>"string"==typeof e.value?`"${e.value}"`:e.value)).join("|")}>${s};\n\t\t\t${i.join("")}\n\t\t\t// end >>\n\t\t`}if("ComponentArray"===l){const i="template"===t||"pageContentType"===t?"TemplateSection":"ComponentArray",o="template"===t?"":"?",r=e,{key:l,_autoType:a,whiteList:p}=r,c=(null==a?void 0:a.doc)||"",u=(e,t,n)=>e.filter((e=>e&&"schemaType"in e&&"module"===(null==e?void 0:e.schemaType)?(null==e?void 0:e.sectionList)&&!!(null==e?void 0:e.sectionList[t]):void 0)).map((e=>({t:null==e?void 0:e.sectionList[t].filter((e=>e===n)),m:null==e?void 0:e.component}))).filter((e=>{var t;return null===(t=null==e?void 0:e.t)||void 0===t?void 0:t.length})).map((e=>null==e?void 0:e.m)).filter(Boolean);let d="";"template"===t&&(d=u(n.moduleSchemas,n.schema.component,l).join("|"));return`\n${c}\n${l}${o}: Fields.${i}<${[...new Set([...d.split("|"),...p])].filter(Boolean).map((e=>`${e}${s}`)).join("|")}>;`}if("ComponentContainer"===l&&("object"===t||"component"===t||"module"===t||"template"===t)){const t=e,{whiteList:n}=t;return P(e,{generic:D(n,i)})}if("ReferenceField"===l){const t=e.sources||[{structuredData:void 0}],n=Array.isArray(t)&&t.map((e=>e.structuredData?`${e.structuredData}ContentType${s}`:"unknown")).join("|")||"";return`\n\t\t \t${P(e,{generic:n})}\n\t\t \t${c?`queriedItems?: Fields.QueriedData<${n}>;`:""}\n\t\t `}if("VisualUniqueSelection"===l){const t=e.options[0],n=e.options[0];let i="";if(t.value){i=e.options.map((e=>`"${e.value}"`)).join("|")}if(n.theme){i=e.options[0].options.map((e=>`"${e.value}"`)).join("|")}return P(e,{generic:i})}return console.warn(`The field ${e.type} has not been implemented yeti ㅠ.ㅠ`),""}function M(e){return e?e.map((e=>G(e,"object",{hasDistributorData:!1,moduleSchemas:[],schema:{}}))).join(""):""}function E(e,t){const n=(null==t?void 0:t.contentTypeSuffix)||F,i=(null==t?void 0:t.interfaceSuffix)||g,o=(null==t?void 0:t.publicApiSuffix)||T,r=[],s=[],l=[];return`\n${e.map((t=>{var a;let p,c,u="",d="",m="",y="",f="",h=!1,$="";const{component:g}=t;c=(null===(a=t._autoType)||void 0===a?void 0:a.relations)||!1?"<Relations = unknown, FromList = unknown, FromDistributor = true>":"";const F=e.map((e=>{if("schemaType"in e&&"module"===e.schemaType)return e})).filter(Boolean);if("fromPage"in t){if(p=t.fromPage?"pageContentType":"simpleContentType",u=n,d=`__contentTypeName: "${t.component}";`,m=`__contentTypeKind: "${p}";`,"pageContentType"===p&&r.push(`"${t.component}"`),"simpleContentType"!==p||t.taxonomy||s.push(`"${t.component}"`),"simpleContentType"===p&&t.taxonomy&&l.push(`"${t.component}"`),"schema"in t){const e=t.schema.fields.map((e=>"source"in e&&(null==e?void 0:e.source))).filter(Boolean);y=e.length?`__relatedContentTypeNames: ${JSON.stringify(e)}`:""}c="<Relations = unknown, FromList = unknown, FromDistributor = true>",$=`\n\t\t\t\t/** Type to be consumed by public API: useList(), etc.. */\n\t\t\t\texport type ${g}${u}${o}${i}<R extends Core.ContentTypeRelations = false> = ${g}${u}${i}<R, true>;\n\t\t\t\t`}"schemaType"in t&&(p=t.schemaType,f=`component: "${g}";`,"template"!==t.schemaType&&"module"!==t.schemaType&&"component"!==t.schemaType||(h=t.default.hasDistributorData));const T="fromPage"in t&&!1===t.fromPage&&!0===t.taxonomy,C="schemaType"in t&&"template"===t.schemaType&&"list"===t.type.mode,v=(b=[C?"Fields.ExtraListTemplateProps":""]).filter((e=>e.length)).length<1?"":`extends ${b.join(", ")}`;var b;const _=function(e){if("fromPage"in e)return e.taxonomy?[]:e.schema.fields;if("template"===e.schemaType)return[...e.content||[],...e.config||[]];if("component"===e.schemaType||"module"===e.schemaType)return e.configTabs.map((e=>e.fields)).flat();throw new Error(`Wrong schema ${JSON.stringify(e,null,2)}`)}(t).map((e=>G(e,p,{hasDistributorData:h,moduleSchemas:F,schema:t}))).filter(Boolean).join("");return`\n\t\t\t\texport interface ${g}${u}${i}${c} ${v} {\n\t\t\t\t\t${d}\n\t\t\t\t\t${m}\n\t\t\t\t\t${y}\n\t\t\t\t\t${f}\n\t\t\t\t\t${_}\n\t\t\t\t\t${T?"title?: string; code?: string":""}\n\t\t\t\t}\n\t\t\t\t${$}\n\t\t\t\t`})).join("")}\n${r&&r.length?`export type PageContentTypes = ${r.join("|")};`:""}\n${s&&s.length?`export type SimpleContentTypes = ${s.join("|")};`:""}\n${l&&l.length?`export type TaxonomyContentTypes = ${l.join("|")};`:""}\n`}const O=e.join(y({cwd:__dirname})||"","../ax/scripts/__griddo_config_parsed__.js"),N=require(O);!function(t,n,i,o,l,a,p,c,u){var d,m;f(this,void 0,void 0,(function*(){const f=$,g=(F=t,Object.keys(F).map((e=>Object.assign(Object.assign({},F[e]),{component:e}))));var F;const T=function(e){const t=[],n=[],i=[],o=[];for(let r=e.length,s=0;s<r;++s){const r=e[s];if("component"in r){const e=r.component;"component"===r.schemaType&&t.push(`"${e}"`),"module"===r.schemaType&&n.push(`"${e}"`),"template"===r.schemaType&&(i.push(`"${e}"`),"detail"===r.type.mode&&o.push(`"${e}"`))}}return`\n\t\t\n\t\texport type Components =\n\t\t\t${t.join("|")}\n\t\n\t\t\n\t\texport type Modules =\n\t\t\t${n.join("|")}\n\t\n\t\t\n\t\texport type Templates =\n\t\t\t${i.join("|")}\n\t\n\t\t\n\t\texport type DetailTemplates =\n\t\t\t${o.join("|")}\n\t\n\t`}(g),C=function(e){return`export type SectionList = { ${e.filter((e=>"schemaType"in e&&"template"===e.schemaType)).map((e=>{const t=e,n=t.content.filter((e=>"ComponentArray"===e.type)).map((({key:e})=>`"${e}"`)).filter(Boolean);return n&&(null==n?void 0:n.length)>0?`${t.component}?: NonEmptyArray<${n.join("|")}>;`:""})).join("")} }`}(g),v=E(g,u),b=null===(d=null==n?void 0:n.link)||void 0===d?void 0:d.fields,_=null===(m=null==n?void 0:n.group)||void 0===m?void 0:m.fields,j=`\n\t\texport interface InstanceMenuItems {\n\t\t\tlink:{\n\t\t\t\t${M(b)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "link";\n\t\t\t\t};\n\t\t\t};\n\t\t\tgroup: {\n\t\t\t\turl?: null;\n\t\t\t\t${M(_)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "group";\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\texport type LinkMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["link"];\n\t\texport type GroupMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["group"];\n\t\texport type MenuElement = LinkMenuElement | GroupMenuElement;\n\t\texport type Menu = Fields.Menu<InstanceMenuItems>;\n\t`,k=`\n\t\t// Type for the language schema\n\t\texport interface SiteLanguage {\n\t\t\tdomain: { id: number; url: string; slug: string };\n\t\t\thome: string;\n\t\t\tid: number;\n\t\t\tisDefault: boolean;\n\t\t\tlabel: ${Object.keys(i).map((e=>`"${i[e].label}"`)).join("|")};\n\t\t\tlanguage: ${Object.keys(i).map((e=>`"${i[e].name}"`)).join("|")};\n\t\t\tlocale: ${Object.keys(i).map((e=>`"${e}"`)).join("|")};\n\t\t\tpath: string;\n\t\t}\n\t`,x=o?`type ModuleCategories = ${o.map((e=>`"${e.value}"`)).join("|")}`:"",w=l?`type Datapacks = ${Object.keys(l).map((e=>`"${e}"`)).join("|")}`:"",S=a?`type DatapacksCategories = ${Object.keys(a).map((e=>`"${e}"`)).join("|")}`:"",A="type AllTaxonomyContentTypeProps = "+function(e){return e.map((e=>{if("taxonomy"in e&&e.taxonomy)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(g),L="type AllPageContentTypeProps = "+function(e){return e.map((e=>{if("fromPage"in e&&!e.fromPage&&!e.taxonomy)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(g),P="type AllSimpleContentTypeProps = "+function(e){return e.map((e=>{if("fromPage"in e&&e.fromPage)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(g),D=p?`type Themes = ${p.map((e=>`"${e.value}"`)).join("|")}`:"",I=c?`type Subthemes = ${c.map((e=>`"${e}"`)).join("|")}`:"",G=yield s.resolveConfigFile(),O=(yield s.resolveConfig(G))||{useTabs:!0},N=`\n\t\t${h}\n\t\t${j}\n\t\t${k}\n\t\t${v}\n\t\t${T}\n\t\t${C}\n\t\t${x}\n\t\t${w}\n\t\t${S}\n\t\t${A}\n\t\t${L}\n\t\t${P}\n\t\t${D}\n\t\t${I}\n\t\t`,U=Object.assign(Object.assign({},O),{parser:"typescript"}),q=(yield s.format(N,U)).replace(/^\s*\n/gm,"");r.writeFile(`${e.join(function(){const t=__dirname,n=R?"../../../":"../griddo-components";return e.resolve(y({cwd:t}),n)}(),f)}`,q,(e=>{if(e)throw e})),console.log("🤖 AutoTypes ✓")}))}(Object.assign(Object.assign(Object.assign({},N.schemas.all),N.schemas.templates),N.schemas.structuredData),N.schemas.menuItems,N.schemas.languages,N.moduleCategories,N.schemas.dataPacks,N.schemas.dataPacksCategories,N.themes,N.subthemes,N.autotypes);
2
- //# sourceMappingURL=autotypes.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autotypes.cjs.js","sources":["../node_modules/locate-path/index.js","../node_modules/find-up/index.js","../node_modules/pkg-dir/index.js","../../../node_modules/tslib/tslib.es6.js","../src/functions/autotypes/ascii.ts","../src/functions/autotypes/constants.ts","../node_modules/camelcase/index.js","../src/functions/autotypes/utils.ts","../src/functions/autotypes/getTypeFromField.ts","../src/functions/autotypes/getMenuItemsProps.ts","../src/functions/autotypes/getTypesFromSchemas.ts","../src/functions/autotypes/index.cjs.ts","../src/functions/autotypes/main.ts"],"sourcesContent":["import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import path from 'node:path';\nimport {findUp, findUpSync} from 'find-up';\n\nexport async function packageDirectory({cwd} = {}) {\n\tconst filePath = await findUp('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n\nexport function packageDirectorySync({cwd} = {}) {\n\tconst filePath = findUpSync('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","/* eslint-disable no-useless-escape */\nexport const HEAD_DESIGN = `/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\\\ \\\\\n// º / /\\\\ \\\\\n// ' / / \\\\ _>\n// ' _\\\\ \\\\__> \\\\__\n// ' O ( __;·;______ ) AutoTypes\n// O º, | , , \\\\ \\\\\\\\ ·..~~.·~.·\n// ,,, /| , , /\\\\ <\\\\\\\\\n// \\\\''\\\\-' ⎩, <\\\\/\\\\ \\\\ \\\\\n// \\\\_/ /\\\\_____⎩/ > > >\n// '___' <_(_)__> / \\\\ <\n// / / ´ \\\\ | \\\\___//\\\\\\\\\n// / / | / > > \\\\\\\\\n// · ··~~~~·~·~~~~~~~·~··~~~~~·~·~~·~~~~·~~~~~·· · ·\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n`;\n\nexport const FOOTER_DESIGN = `\n//\n// . + . . . . . . . ..\n// . . . *\n// . * . . . . . . + . +\n// . . . . + . . .\n// . . . . . . .\n// . . . . . +. + . *\n// + . . . .\n// . . . * . . . . + . .\n// + . . . + . .\n// . . + .+. . .\n// . . . + . . . . .\n// . . . . . . . . ! / +\n// * . . . + . . - O -\n// . . . + . . * . . / | . .\n// . + . . . .. + .\n// . . . . * . * . +.. . * +\n// . . . . . . . . + . . +\n//\n//\n// The beauty of a living thing is not the atoms that go into it,\n// but the way those atoms are put together\n//\n// Carl Sagan\n//\n`;\n","const TYPE_FILE_NAME = \"autotypes.d.ts\";\nconst INTERFACE_SUFFIX = \"Props\";\nconst CONTENT_TYPE_SUFFIX = \"ContentType\";\nconst PUBLIC_API_SUFFIX = \"List\";\n\nexport {\n\tTYPE_FILE_NAME,\n\tINTERFACE_SUFFIX,\n\tCONTENT_TYPE_SUFFIX,\n\tPUBLIC_API_SUFFIX,\n};\n","'use strict';\n\nconst UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\n\tfor (let i = 0; i < string.length; i++) {\n\t\tconst character = string[i];\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i) + '-' + string.slice(i);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\ti++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {\n\t\t\tstring = string.slice(0, i - 1) + '-' + string.slice(i - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replace(LEADING_CAPITAL, m1 => toLowerCase(m1));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input.replace(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier))\n\t\t.replace(NUMBERS_AND_IDENTIFIER, m => toUpperCase(m));\n};\n\nconst camelCase = (input, options) => {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false ?\n\t\tstring => string.toLowerCase() :\n\t\tstring => string.toLocaleLowerCase(options.locale);\n\tconst toUpperCase = options.locale === false ?\n\t\tstring => string.toUpperCase() :\n\t\tstring => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\n\tif (options.preserveConsecutiveUppercase) {\n\t\tinput = preserveConsecutiveUppercase(input, toLowerCase);\n\t} else {\n\t\tinput = toLowerCase(input);\n\t}\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n};\n\nmodule.exports = camelCase;\n// TODO: Remove this for the next major release\nmodule.exports.default = camelCase;\n","import type {\n\tFieldReturnTypes,\n\tFields,\n\tSchemaFieldTypes,\n\tSchemaType,\n\tSchemaTypeWithComponentProp,\n} from \"./types\";\nimport type { UITemplateFields } from \"../../types/schema-fields/ui-template-fields\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport path from \"path\";\n\nimport camelcase from \"camelcase\";\nimport { packageDirectorySync } from \"pkg-dir\";\n\nimport { INTERFACE_SUFFIX } from \"./constants\";\nimport { Schema } from \"../..\";\n\n/** Get all fields from one schema */\nfunction getAllFields(schema: SchemaType) {\n\t// ContentType\n\t// Simple, Page\n\tif (\"fromPage\" in schema) {\n\t\t// AutoTypes doesn't generate types from categories\n\t\tif (!schema.taxonomy) {\n\t\t\treturn schema.schema.fields;\n\t\t}\n\t\t// hack???\n\t\treturn [];\n\t}\n\n\t// Templates\n\tif (schema.schemaType === \"template\") {\n\t\tconst content = (schema.content as Array<UITemplateFields>) || [];\n\t\tconst config = (schema.config as Array<UITemplateFields>) || [];\n\t\treturn [...content, ...config];\n\t}\n\n\t// Objects, components and modules\n\tif (schema.schemaType === \"component\" || schema.schemaType === \"module\") {\n\t\treturn schema.configTabs.map((tab) => tab.fields).flat();\n\t}\n\n\tthrow new Error(`Wrong schema ${JSON.stringify(schema, null, 2)}`);\n}\n\n/** Build a interface prop based on the field from the schema.\n * Optionally it can receives a custom value for the type and a generic string to use as generic value\n *\n * @example\n * getInterfacePropType(TextFieldObjectFromSchema)\n * // -> TextFieldObjectFromSchema.key: Fields.TextField\n * getInterfacePropType(TextFieldObjectFromSchema, 'MyCustomValue', 'foo')\n * // -> TextFieldObjectFromSchema.key: MyCustomValue<foo>\n */\ntype GetInterfacePropTypeOptions = {\n\treturnTypeName?: FieldReturnTypes;\n\tgeneric?: string;\n};\n\n/**\n * Return a serialized type from a Griddo schema field.\n *\n * @param Fields A Griddo field object\n * @param options An options object\n * @returns A string that represent a interface prop type.\n * @example\n * interface SomeInterface {\n * \tprop: boolean; // this function returns a string for this: `prop: boolean`\n * }\n */\nfunction getInterfacePropType(\n\tfield: Fields,\n\toptions?: GetInterfacePropTypeOptions,\n) {\n\tconst { returnTypeName, generic } = options || {};\n\n\t// The field has `hideable: true`\n\tconst hasHideable = \"hideable\" in field ? Boolean(field.hideable) : false;\n\t// Generic part\n\tconst genericStr = generic ? `<${generic}>` : \"\";\n\t// The field type is from field.type prop or custom\n\tconst returnTypeNameStr = returnTypeName || returnType(field.type);\n\t// Field type with generic: field<generic>\n\tconst returnTypeNameWithGeneriStr = `${returnTypeNameStr}${genericStr}`;\n\t// Field type wrapped in Hideable helper type: Hideable<field<generic>>\n\tconst typeWrappedWithHideable = hasHideable\n\t\t? `Hideable<${returnTypeNameWithGeneriStr}>`\n\t\t: `${returnTypeNameWithGeneriStr}`;\n\n\t// JSDoc\n\tconst jsDocString = field._autoType?.doc || \"\";\n\t// prop?: Type\n\tconst typeString = `${field.key}?: ${typeWrappedWithHideable}`;\n\n\treturn `\n\t\t${jsDocString}\n\t\t${typeString}\n\t`;\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `value` from object array.\n */\nfunction getGenericFromOptions<T = unknown>(options: Array<{ value: T }>) {\n\treturn options\n\t\t.map(({ value }) => (typeof value === \"string\" ? `\"${value}\"` : value))\n\t\t.join(\"|\");\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `name` from object array.\n */\nfunction getGenericFromCheckBoxOptions<T>(options: Array<{ name: T }>) {\n\treturn options\n\t\t.map(({ name }) => (typeof name === \"string\" ? `\"${name}\"` : name))\n\t\t.join(\"|\");\n}\n\n// for components containers\n// whitelist.length = 1\n// whitelist.length > 1\nfunction getGenericFromWhitelist(\n\twhiteList: Array<string>,\n\tconfig?: AutoTypesConfig,\n) {\n\t// Config\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\n\tif (whiteList.length > 1) {\n\t\treturn `{\n\t\t\t${whiteList\n\t\t\t\t.map((whiteListItem) => {\n\t\t\t\t\treturn `${camelcase(\n\t\t\t\t\t\twhiteListItem,\n\t\t\t\t\t)}?: ${whiteListItem}${interfaceSuffix}`;\n\t\t\t\t})\n\t\t\t\t.join(\",\")}\n\t\t\t}`;\n\t} else {\n\t\t// Si solo hay un elemento\n\t\treturn whiteList.map((item) => `${item}${interfaceSuffix}`).join(\"\");\n\t}\n}\n\n/**\n * Convert an object of schemas into an array of objects of these schemas.\n *\n * @example\n * input:\n * `schemas` is an object of schemas like so:\n *\t{\n *\t\tBasicContent: {\n *\t\t\tcomponent: \"BasicContent\",\n *\t\t\t...\n *\t\t},\n *\t\t...\n *\t}\n *\n * output:\n * [ {component: \"BasicContent\"}, {component: \"NewsTemplate\"}, ... ]\n */\nfunction schemasToArray(\n\tobjectSchemas: Record<string, SchemaType>,\n): Array<SchemaTypeWithComponentProp> {\n\treturn (Object.keys(objectSchemas) as Array<Capitalize<string>>).map(\n\t\t(componentName) => ({\n\t\t\t// This component prop is for the ContentType schemas,\n\t\t\t// ui schemas have already one.\n\t\t\t...objectSchemas[componentName],\n\t\t\tcomponent: componentName,\n\t\t}),\n\t);\n}\n\nfunction returnType(type: SchemaFieldTypes) {\n\tconst typeObj: Record<SchemaFieldTypes, FieldReturnTypes> = {\n\t\tArrayFieldGroup: \"Fields.ArrayFieldGroup\",\n\t\tAsyncCheckGroup: \"Fields.AsyncCheckGroup\",\n\t\tAsyncSelect: \"Fields.AsyncSelect\",\n\t\tCheckGroup: \"Fields.CheckGroup\",\n\t\tColorPicker: \"Fields.ColorPicker\",\n\t\tComponentArray: \"Fields.ComponentArray\",\n\t\tComponentContainer: \"Fields.ComponentContainer\",\n\t\tConditionalField: \"Fields.Conditional\",\n\t\tDateField: \"Fields.Date\",\n\t\tFieldGroup: \"Fields.FieldGroup\",\n\t\tFieldsDivider: \"Fields.FieldsDivider\",\n\t\tFileField: \"Fields.File\",\n\t\tHeadingField: \"Fields.Heading\",\n\t\tImageField: \"Fields.Image\",\n\t\tLinkField: \"Fields.Link\",\n\t\tMultiCheckSelect: \"Fields.MultiCheckSelect\",\n\t\tMultiCheckSelectGroup: \"Fields.MultiCheckSelectGroup\",\n\t\tNoteField: \"Fields.Note\",\n\t\tNumberField: \"Fields.Number\",\n\t\tRadioGroup: \"Fields.RadioGroup\",\n\t\tReferenceField: \"Fields.Reference\",\n\t\tRichText: \"Fields.RichText\",\n\t\tSelect: \"Fields.Select\",\n\t\tSliderField: \"Fields.Slider\",\n\t\tTagsField: \"Fields.Tags\",\n\t\tTextArea: \"Fields.TextArea\",\n\t\tTextField: \"Fields.Text\",\n\t\tTimeField: \"Fields.Time\",\n\t\tToggleField: \"Fields.Toggle\",\n\t\tUniqueCheck: \"Fields.UniqueCheck\",\n\t\tUrlField: \"Fields.Url\",\n\t\tVisualUniqueSelection: \"Fields.VisualUniqueSelection\",\n\t\tWysiwyg: \"Fields.Wysiwyg\",\n\t};\n\treturn typeObj[type];\n}\n\nfunction extendsType(types: Array<string>) {\n\treturn types.filter((typeStr) => typeStr.length).length < 1\n\t\t? \"\"\n\t\t: `extends ${types.join(\", \")}`;\n}\n\nfunction getPageContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && schema.fromPage) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getSimpleContentTypeUnionProps(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && !schema.fromPage && !schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getTaxonomyContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"taxonomy\" in schema && schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\n/**\n * Get union types for components, modules and tempaltes like so:\n *\n * @example\n * type Components = \"ComponentA\" | \"ComponentB\"\n * type Modules = \"ModuleA\" | \"ModuleB\"\n * type Templates = \"TemplateA\" | \"TemplateB\"\n */\nfunction getElementsUnionType(schemas: Array<SchemaType>) {\n\tconst unionOfComponents = [];\n\tconst unionOfModules = [];\n\tconst unionOfTemplates = [];\n\tconst detailTemplates = [];\n\tfor (let length = schemas.length, i = 0; i < length; ++i) {\n\t\tconst schema = schemas[i];\n\t\t// `in` to narrow only schemas with `component` prop\n\t\tif (\"component\" in schema) {\n\t\t\tconst componentName = schema.component;\n\t\t\tif (schema.schemaType === \"component\") {\n\t\t\t\tunionOfComponents.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"module\") {\n\t\t\t\tunionOfModules.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"template\") {\n\t\t\t\tunionOfTemplates.push(`\"${componentName}\"`);\n\t\t\t\tif (schema.type.mode === \"detail\") {\n\t\t\t\t\tdetailTemplates.push(`\"${componentName}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst ComponentsUnion = `\n\t\texport type Components =\n\t\t\t${unionOfComponents.join(\"|\")}\n\t`;\n\n\tconst ModulesUnion = `\n\t\texport type Modules =\n\t\t\t${unionOfModules.join(\"|\")}\n\t`;\n\n\tconst TemplatesUnion = `\n\t\texport type Templates =\n\t\t\t${unionOfTemplates.join(\"|\")}\n\t`;\n\n\tconst DetailTemplatesUnion = `\n\t\texport type DetailTemplates =\n\t\t\t${detailTemplates.join(\"|\")}\n\t`;\n\n\treturn `\n\t\t${ComponentsUnion}\n\t\t${ModulesUnion}\n\t\t${TemplatesUnion}\n\t\t${DetailTemplatesUnion}\n\t`;\n}\n\n/**\n * Lista de templates y sus secciones\n * Esto es algo que se usa en los schemas de Griddo. Es como el inverso a un\n * whitelist donde indicamos en qué secciones de qué templates puede\n * aparecer un módulo.\n */\nfunction getSectionList(schemas: Array<SchemaType>) {\n\tconst names = schemas\n\t\t.filter((schema) => {\n\t\t\tif (\"schemaType\" in schema) {\n\t\t\t\treturn schema.schemaType === \"template\";\n\t\t\t}\n\t\t\treturn false;\n\t\t})\n\t\t.map((schema) => {\n\t\t\tconst templateSchema = schema as Schema.Template;\n\t\t\tconst sectionNames = templateSchema.content\n\t\t\t\t.filter((field) => field.type === \"ComponentArray\")\n\t\t\t\t.map(({ key }) => `\"${key}\"`)\n\t\t\t\t.filter(Boolean);\n\t\t\treturn sectionNames && sectionNames?.length > 0\n\t\t\t\t? `${templateSchema.component}?: NonEmptyArray<${sectionNames.join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t )}>;`\n\t\t\t\t: \"\";\n\t\t})\n\t\t.join(\"\");\n\n\treturn `export type SectionList = { ${names} }`;\n}\n\nconst IS_COMPONENT_LIBRARY = __dirname.includes(\"node_modules\");\n\n/**\n * Returns the instance or monorepo paths.\n *\n * @param customPath The path for the instance components\n */\nfunction resolveComponentsPath() {\n\tconst cwd = __dirname;\n\tconst componentsPath = IS_COMPONENT_LIBRARY\n\t\t? \"../../../\"\n\t\t: \"../griddo-components\";\n\n\treturn path.resolve(packageDirectorySync({ cwd }), componentsPath);\n}\n\nexport {\n\textendsType,\n\tgetAllFields,\n\tgetElementsUnionType,\n\tgetGenericFromCheckBoxOptions,\n\tgetGenericFromOptions,\n\tgetGenericFromWhitelist,\n\tgetInterfacePropType,\n\tgetPageContentTypesUnionType,\n\tgetSectionList,\n\tgetSimpleContentTypeUnionProps,\n\tgetTaxonomyContentTypesUnionType,\n\tresolveComponentsPath,\n\treturnType,\n\tschemasToArray,\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { KindSchema, SchemaTypeWithComponentProp } from \"./types\";\nimport type * as PageContentType_Fields from \"../../types/schema-fields/page-content-type-fields\";\nimport type {\n\tThemeVisualUniqueSelection,\n\tThumbnailOption,\n} from \"../../types/schema-fields/props\";\nimport type * as UI_Fields from \"../../types/schema-fields/ui-fields\";\nimport type { UIFields } from \"../../types/schema-fields/ui-fields\";\nimport type { UITemplateFields } from \"../../types/schema-fields/ui-template-fields\";\nimport type { Module } from \"../../types/schemas\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport { INTERFACE_SUFFIX } from \"./constants\";\nimport {\n\tgetGenericFromCheckBoxOptions,\n\tgetGenericFromOptions,\n\tgetGenericFromWhitelist,\n\tgetInterfacePropType,\n\treturnType,\n} from \"./utils\";\nimport { PageContentTypeFields } from \"../../types/schema-fields/page-content-type-fields\";\nimport { SimpleContentTypeFields } from \"../../types/schema-fields/simple-content-type-fields\";\n\n/**\n * Return a property with a Griddo type (serialized) based on a schema field.\n *\n * @param field A Griddo field object\n * @param kind Schema type in order to later do some operations with fields\n * @param options Object options\n * @example\n * { type: 'TextField', key: 'name' } => \"name?: Fields.Text\"\n * { type: 'UrlField', key: 'image' } => \"name?: Fields.Url\"\n */\nfunction getTypeFromField(\n\tfield:\n\t\t| UIFields\n\t\t| UITemplateFields\n\t\t| SimpleContentTypeFields\n\t\t| PageContentTypeFields,\n\tkind: KindSchema,\n\toptions: {\n\t\thasDistributorData: boolean;\n\t\tmoduleSchemas: Array<Module | undefined>;\n\t\tschema: SchemaTypeWithComponentProp;\n\t},\n\tconfig?: AutoTypesConfig\n): string | undefined {\n\t// Config\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\n\t//\n\t// Ignore - Bypass\n\t//\n\t// Empezamos ignorando ciertos fields que no necesitamos que generen types\n\t// aunque estén en los schemas. De esta manera los quitamos del proceso en\n\t// primera instancia y evitamos errores en los types de esta función.\n\tif (field.type === \"FieldsDivider\") {\n\t\treturn undefined;\n\t}\n\n\t// Ignore type generation from schema _autoType prop\n\tif (field._autoType?.ignore) {\n\t\treturn undefined;\n\t}\n\n\t//\n\t// Go!\n\t//\n\tconst { type, _autoType, key } = field;\n\tconst { hasDistributorData } = options;\n\n\t// If the field is missing the prop key or type, return an \"error\" string.\n\tif (!type || !key) {\n\t\treturn `\n\t\t\t/** · (ノ-_-)ノ ミ ┴┴ You forgot to write the \\`type\\` | \\`key\\` or some mandatory prop */\n\t\t`;\n\t}\n\n\t// Simple fields\n\t// { type: \"TextField\", key: \"foo\" } --> \"foo?: Fields.Text\"\n\tif (\n\t\ttype === \"DateField\" ||\n\t\ttype === \"FileField\" ||\n\t\ttype === \"ImageField\" ||\n\t\ttype === \"NoteField\" ||\n\t\ttype === \"NumberField\" ||\n\t\ttype === \"RichText\" ||\n\t\ttype === \"SliderField\" ||\n\t\ttype === \"TagsField\" ||\n\t\ttype === \"TextArea\" ||\n\t\ttype === \"TextField\" ||\n\t\ttype === \"TimeField\" ||\n\t\ttype === \"ToggleField\" ||\n\t\ttype === \"UniqueCheck\" ||\n\t\ttype === \"UrlField\" ||\n\t\ttype === \"Wysiwyg\"\n\t) {\n\t\treturn getInterfacePropType(field);\n\t}\n\n\t// MultiCheckSelect\n\t// { type: \"MultiCheckSelect\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<Relations, true>\"\n\tif (type === \"MultiCheckSelect\") {\n\t\t// - MultiCheckSelect in a ContentType schema (page or simple)\n\t\t//\n\t\t// Cuando está dentro de un ContentType el field devuelve cosas\n\t\t// distintas a cuando está dentro de un schema de UI y tiene en cuenta:\n\t\t// - Si está siendo requerido por API pública (useList)\n\t\t// - Si tiene relations\n\t\t// - Se añade el contentType relacionado para poder hacera autocomplete\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\t// - Rest of schemas\n\t\t//\n\t\t// { type: \"MultiCheckSelect\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<Relations>\"\n\t\treturn getInterfacePropType(field, {\n\t\t\tgeneric: \"true\",\n\t\t});\n\t}\n\n\t// AsyncCheckGroup\n\t// Duplicate from MultiCheckSelect\n\tif (type === \"AsyncCheckGroup\") {\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\treturn getInterfacePropType(field, {\n\t\t\tgeneric: \"true\",\n\t\t});\n\t}\n\n\t// MultiCheckSelectGroup\n\t// { type: \"MultiCheckSelectGroup\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<>\"\n\tif (type === \"MultiCheckSelectGroup\") {\n\t\tconst keys = field.elements.map((element) => `\"${element.key}\"`).join(\"|\");\n\t\tconst relations = field._autoType?.relations;\n\t\tconst generic = [keys, relations].join(\",\");\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// ColorPicker\n\t// { type: \"ColorPickerFixed\", key: \"foo\" } --> \"foo?: Fields.ColorPickerFixed<>\"\n\tif (type === \"ColorPicker\") {\n\t\tif (field.isThemePalette) {\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\treturnTypeName: \"Fields.ColorPickerFixed\",\n\t\t\t});\n\t\t}\n\n\t\treturn getInterfacePropType(field);\n\t}\n\n\t// HeadingField, RadioGroup, Select\n\t// Generic from options.values\n\t// { type: \"HeadingField\", key: \"foo\" } --> \"foo?: Fields.Heading<>\"\n\tif (type === \"HeadingField\" || type === \"RadioGroup\" || type === \"Select\") {\n\t\tconst { options } = field;\n\t\tconst generic = getGenericFromOptions(options);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// CheckGroup\n\t// Generic from options.name\n\t// { type: \"CheckGroup\", key: \"foo\" } --> \"Fields.CheckGroup<>\n\tif (type === \"CheckGroup\") {\n\t\tconst { options } = field;\n\t\tconst generic = getGenericFromCheckBoxOptions(options);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// LinkField\n\t// Generic from whitelist\n\t// type === \"LinkField\" --> key: Fields.Link<{video:Video, image:Image}>\n\tif (type === \"LinkField\") {\n\t\tconst { whiteList } = field;\n\t\tconst generic = getGenericFromWhitelist(whiteList as Array<string>, config);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// AsyncSelect\n\t// { type: \"AsyncSelect\", key: \"foo\" } --> \"foo?: Fields.{AsyncSelectType}\"\n\t// TODO: waiting for the field documentation\n\tif (type === \"AsyncSelect\") {\n\t\t// Entities\n\t\tif (\"entity\" in field) {\n\t\t\t// Menu\n\t\t\tif (field.entity === \"menu_containers\") {\n\t\t\t\treturn `\\n${key}?: Menu`;\n\t\t\t}\n\t\t\t// // Pages\n\t\t\t// if (field.entity === \"sites\") {\n\t\t\t// \treturn `${key}?: Fields.Menu;`;\n\t\t\t// }\n\t\t\t// // Sites\n\t\t\t// if (field.entity === \"pages\") {\n\t\t\t// \treturn `${key}?: Fields.Menu;`;\n\t\t\t// }\n\t\t}\n\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\treturn `\\n${key}?: Fields.AsyncSelect;`;\n\t}\n\n\t// FieldGroup\n\t// { type: \"FieldGroup\", key: \"foo\" } --> \"foo?: Fields.???\"\n\t// <Recursive>\n\tif (type === \"FieldGroup\") {\n\t\treturn `\n\t\t\t// << ${type}\n\t\t\t${field.fields.map((field) => getTypeFromField(field, kind, options)).join(\"\")}\n\t\t\t// end >>\n\t\t`;\n\t}\n\n\t// ArrayFieldGroup\n\tif (type === \"ArrayFieldGroup\") {\n\t\tconst doc = _autoType?.doc || \"\";\n\n\t\treturn `\n\t\t\t\\n${doc}\\n${key}?: Fields.ArrayFieldGroup<{${field.fields\n\t\t\t.map((childField) => getTypeFromField(childField, kind, options))\n\t\t\t.join(\",\")}}>\n\t\t`;\n\t}\n\n\t// ConditionalField\n\t// <Recursive>\n\tif (type === \"ConditionalField\") {\n\t\tconst conditionalChildrenFields = field.fields.map((field) => {\n\t\t\treturn getTypeFromField(field, kind, options);\n\t\t});\n\t\tconst doc = _autoType?.doc || \"\";\n\t\tconst conditionalHasHideable = \"hideable\" in field ? field.hideable : false;\n\t\tconst startHideable = conditionalHasHideable ? \"Hideable<\" : \"\";\n\t\tconst endHideable = conditionalHasHideable ? \">\" : \"\";\n\n\t\treturn `\n\t\t\t// << ${type}\n\t\t\t\\n${doc}\\n${key}?: ${startHideable}${returnType(type)}<${field.options\n\t\t\t.map((option) => {\n\t\t\t\treturn typeof option.value === \"string\"\n\t\t\t\t\t? `\"${option.value}\"`\n\t\t\t\t\t: option.value;\n\t\t\t})\n\t\t\t.join(\"|\")}>${endHideable};\n\t\t\t${conditionalChildrenFields.join(\"\")}\n\t\t\t// end >>\n\t\t`;\n\t}\n\n\t// ComponentArray\n\t// <Complex>\n\tif (type === \"ComponentArray\") {\n\t\t// El type de Griddo es dinstinto para un ComponentArray si este está\n\t\t// dentro de un template.\n\t\tconst returnTypeName =\n\t\t\tkind === \"template\" || kind === \"pageContentType\"\n\t\t\t\t? \"TemplateSection\"\n\t\t\t\t: \"ComponentArray\";\n\n\t\tconst optional = kind === \"template\" ? \"\" : \"?\";\n\n\t\t// Type assertion, el field ComponentArray solo puede ser UI o Page\n\t\tconst fieldCasted = field as\n\t\t\t| UI_Fields.ComponentArray\n\t\t\t| PageContentType_Fields.ComponentArray;\n\n\t\tconst { key, _autoType, whiteList } = fieldCasted;\n\t\tconst doc = _autoType?.doc || \"\";\n\n\t\t// TODO: Research to compute this with type itself.\n\t\t// SHAME: Remove anys!!\n\t\tconst getModulesFromTemplateSectionList = (\n\t\t\tmodules: Array<Module | undefined>,\n\t\t\ttemplateName: string,\n\t\t\ttemplateSection: string\n\t\t): Array<Module | undefined> => {\n\t\t\treturn modules\n\t\t\t\t.filter((entry: any) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentry &&\n\t\t\t\t\t\t\"schemaType\" in entry &&\n\t\t\t\t\t\tentry?.schemaType === \"module\"\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn entry?.sectionList && !!entry?.sectionList[templateName];\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.map((entry: any) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tt: entry?.sectionList[templateName].filter(\n\t\t\t\t\t\t\t(s: any) => s === templateSection\n\t\t\t\t\t\t),\n\t\t\t\t\t\tm: entry?.component,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((entry: any) => entry?.t?.length)\n\t\t\t\t.map((entry: any) => entry?.m)\n\t\t\t\t.filter(Boolean);\n\t\t};\n\n\t\t// BasicTemplate -> mainSection\n\t\tlet modulesInSectionLists = \"\";\n\t\tif (kind === \"template\") {\n\t\t\tmodulesInSectionLists = getModulesFromTemplateSectionList(\n\t\t\t\toptions.moduleSchemas,\n\t\t\t\toptions.schema.component,\n\t\t\t\tkey\n\t\t\t).join(\"|\");\n\t\t}\n\n\t\t// 1 - Mix whitelist and sectionList\n\t\t// 2 - Remove duplicate modules due to mixing between sectionList and whiteList\n\t\tconst everyModuleInTemplateSection = [\n\t\t\t...new Set([...modulesInSectionLists.split(\"|\"), ...whiteList]),\n\t\t].filter(Boolean);\n\n\t\treturn `\\n${doc}\\n${key}${optional}: Fields.${returnTypeName}<${everyModuleInTemplateSection\n\t\t\t.map((component) => `${component}${interfaceSuffix}`)\n\t\t\t.join(\"|\")}>;`;\n\t}\n\n\t// ComponentContainer\n\t// <Complex>\n\tif (type === \"ComponentContainer\") {\n\t\t// UI\n\t\tif (\n\t\t\tkind === \"object\" ||\n\t\t\tkind === \"component\" ||\n\t\t\tkind === \"module\" ||\n\t\t\tkind === \"template\"\n\t\t) {\n\t\t\tconst FieldCasted = field as UI_Fields.ComponentContainer;\n\t\t\tconst { whiteList } = FieldCasted;\n\n\t\t\tconst generic = getGenericFromWhitelist(\n\t\t\t\twhiteList as Array<string>,\n\t\t\t\tconfig\n\t\t\t);\n\n\t\t\treturn getInterfacePropType(field, { generic });\n\t\t}\n\t}\n\n\t// ReferenceField\n\t// TODO: Create correct generic using from/key values\n\tif (type === \"ReferenceField\") {\n\t\tconst sources = field.sources || [{ structuredData: undefined }];\n\t\tconst generic =\n\t\t\t(Array.isArray(sources) &&\n\t\t\t\tsources\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.structuredData\n\t\t\t\t\t\t\t? `${item.structuredData}ContentType${interfaceSuffix}`\n\t\t\t\t\t\t\t: \"unknown\"\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"|\")) ||\n\t\t\t\"\";\n\t\tconst referenceField = getInterfacePropType(field, { generic });\n\t\tconst queriedItems = hasDistributorData\n\t\t\t? `queriedItems?: Fields.QueriedData<${generic}>;`\n\t\t\t: \"\";\n\n\t\treturn `\n\t\t \t${referenceField}\n\t\t \t${queriedItems}\n\t\t `;\n\n\t\t// const { source } = field;\n\t\t// const generic = source\n\t\t// \t.map((item) => `${item}ContentType${interfaceSuffix}`)\n\t\t// \t.join(\"|\");\n\t\t// const referenceField = getInterfacePropType(field, { generic });\n\t\t// const queriedItems = hasDistributorData\n\t\t// \t? `queriedItems?: Fields.QueriedData<${generic}>;`\n\t\t// \t: \"\";\n\n\t\t// return `\n\t\t// \t${referenceField}\n\t\t// \t${queriedItems}\n\t\t// `;\n\t}\n\n\t// VisualUniqueSelection\n\tif (type === \"VisualUniqueSelection\") {\n\t\tconst withValue = field.options[0] as ThumbnailOption;\n\t\tconst withTheme = field.options[0] as ThemeVisualUniqueSelection;\n\t\tlet generic = \"\";\n\n\t\t// ThumbnailOption\n\t\tif (withValue.value) {\n\t\t\tconst all = field.options as Array<ThumbnailOption>;\n\t\t\tgeneric = all.map((item) => `\"${item.value}\"`).join(\"|\");\n\t\t}\n\n\t\t// ThemeVisualUniqueSelection\n\t\tif (withTheme.theme) {\n\t\t\tconst all = field.options as Array<ThemeVisualUniqueSelection>;\n\t\t\tgeneric = all[0].options.map((i) => `\"${i.value}\"`).join(\"|\");\n\t\t}\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\tconsole.warn(`The field ${field.type} has not been implemented yeti ㅠ.ㅠ`);\n\n\treturn \"\";\n\n\t// throw new Error(`Wrong schema field! ${JSON.stringify(field, null, 2)}`);\n}\n\nexport { getTypeFromField };\n","import type { Fields, SchemaTypeWithComponentProp } from \"./types\";\n\nimport { getTypeFromField } from \"./getTypeFromField\";\n\nfunction getMenuItemsProps(fields?: Array<Fields>) {\n\tif (!fields) {\n\t\treturn \"\";\n\t}\n\n\treturn fields\n\t\t.map((field) =>\n\t\t\tgetTypeFromField(field, \"object\", {\n\t\t\t\thasDistributorData: false,\n\t\t\t\tmoduleSchemas: [],\n\t\t\t\tschema: {} as SchemaTypeWithComponentProp,\n\t\t\t})\n\t\t)\n\t\t.join(\"\");\n}\n\nexport { getMenuItemsProps };\n","import type { KindSchema, SchemaTypeWithComponentProp } from \"./types\";\nimport type { Module } from \"../../types/schemas\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport {\n\tCONTENT_TYPE_SUFFIX,\n\tINTERFACE_SUFFIX,\n\tPUBLIC_API_SUFFIX,\n} from \"./constants\";\nimport { getTypeFromField } from \"./getTypeFromField\";\nimport { extendsType, getAllFields } from \"./utils\";\n\n/**\n * Return an interface for every schema in the prop schemas.\n *\n * @example\n * interface SchemaProps {\n * \t\tschemaFieldKey: apiResponsveFieldType\n * \t\ttitle: Fields.Heading\n *\t\titemsPerPage: Fields.Number\n *\t\t...\n * }\n */\nfunction getTypesFromSchemas(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n\tconfig?: AutoTypesConfig\n) {\n\t// Config\n\tconst contentTypeSuffix = config?.contentTypeSuffix || CONTENT_TYPE_SUFFIX;\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\tconst publicApiSuffix = config?.publicApiSuffix || PUBLIC_API_SUFFIX;\n\n\t// ContentType names list\n\tconst contentTypePageListNames: Array<string> = [];\n\tconst contentTypeSimpleListNames: Array<string> = [];\n\tconst contentTypeTaxonomyListNames: Array<string> = [];\n\n\t// Map over every schema\n\tconst autoTypesSchemas = schemas\n\t\t.map((schema) => {\n\t\t\tlet kind: KindSchema;\n\t\t\tlet contentTypeSuffixStr = \"\";\n\t\t\tlet contentTypeName = \"\";\n\t\t\tlet contentTypeKind = \"\";\n\t\t\tlet relatedContentTypeNames = \"\";\n\t\t\tlet componentName = \"\";\n\t\t\tlet relationsGeneric;\n\t\t\tlet hasDistributorData = false;\n\t\t\tlet interfaceForPublicAPI = \"\";\n\n\t\t\tconst { component } = schema;\n\t\t\tconst hasRelations = schema._autoType?.relations || false;\n\n\t\t\t// Si el schema va a tener un field al que se le pueda pasar un\n\t\t\t// relations este es pasado por un genérico en la `interface` que se\n\t\t\t// pondrá si `schema._autoType === true`.\n\t\t\trelationsGeneric = hasRelations\n\t\t\t\t? \"<Relations = unknown, FromList = unknown, FromDistributor = true>\"\n\t\t\t\t: \"\";\n\n\t\t\t// Array of module schemas\n\t\t\tconst MODULE_SCHEMAS: Array<Module | undefined> = schemas\n\t\t\t\t.map((schema) => {\n\t\t\t\t\tif (\"schemaType\" in schema && schema.schemaType === \"module\") {\n\t\t\t\t\t\treturn schema;\n\t\t\t\t\t}\n\t\t\t\t\treturn undefined;\n\t\t\t\t})\n\t\t\t\t.filter(Boolean);\n\n\t\t\t//\n\t\t\t// ContentType schema\n\t\t\t//\n\t\t\tif (\"fromPage\" in schema) {\n\t\t\t\tkind = schema.fromPage ? \"pageContentType\" : \"simpleContentType\";\n\t\t\t\tcontentTypeSuffixStr = contentTypeSuffix;\n\t\t\t\tcontentTypeName = `__contentTypeName: \"${schema.component}\";`;\n\t\t\t\tcontentTypeKind = `__contentTypeKind: \"${kind}\";`;\n\n\t\t\t\t// Add page ContentType name to the array\n\t\t\t\tif (kind === \"pageContentType\") {\n\t\t\t\t\tcontentTypePageListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\t\t\t\t// Add simple ContentType name to the array\n\t\t\t\tif (kind === \"simpleContentType\" && !schema.taxonomy) {\n\t\t\t\t\tcontentTypeSimpleListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\t\t\t\t// Add taxonomy (category) ContentType name to the array\n\t\t\t\tif (kind === \"simpleContentType\" && schema.taxonomy) {\n\t\t\t\t\tcontentTypeTaxonomyListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\n\t\t\t\tif (\"schema\" in schema) {\n\t\t\t\t\tconst relatedContentTypeNamesValues = schema.schema.fields\n\t\t\t\t\t\t.map((field) => {\n\t\t\t\t\t\t\tif (\"source\" in field) {\n\t\t\t\t\t\t\t\treturn field?.source;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter(Boolean);\n\n\t\t\t\t\trelatedContentTypeNames = relatedContentTypeNamesValues.length\n\t\t\t\t\t\t? `__relatedContentTypeNames: ${JSON.stringify(\n\t\t\t\t\t\t\t\trelatedContentTypeNamesValues\n\t\t\t\t\t\t )}`\n\t\t\t\t\t\t: \"\";\n\t\t\t\t}\n\n\t\t\t\t// En el caso de los schemas de ContentType se pondrá siempre el\n\t\t\t\t// genérico a unknown para así poder pasarle el relations en el\n\t\t\t\t// componente de React, por ejemplo cuando se utilice el Type en\n\t\t\t\t// un hook como `useContentType`\n\t\t\t\t// `useList<AutoTypes.MEMBERContentType<true>>()`\n\t\t\t\t// ^\n\t\t\t\t// relations\n\t\t\t\trelationsGeneric =\n\t\t\t\t\t\"<Relations = unknown, FromList = unknown, FromDistributor = true>\";\n\n\t\t\t\tinterfaceForPublicAPI = `\n\t\t\t\t/** Type to be consumed by public API: useList(), etc.. */\n\t\t\t\texport type ${component}${contentTypeSuffixStr}${publicApiSuffix}${interfaceSuffix}<R extends Core.ContentTypeRelations = false> = ${component}${contentTypeSuffixStr}${interfaceSuffix}<R, true>;\n\t\t\t\t`;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// UI schema - ALL\n\t\t\t// set:\n\t\t\t// kind, componentName and hasDistributorData\n\t\t\tif (\"schemaType\" in schema) {\n\t\t\t\tkind = schema.schemaType;\n\t\t\t\tcomponentName = `component: \"${component}\";`;\n\n\t\t\t\t// Handle hasDistributorData to create the prop/type queriedData\n\t\t\t\t// automatically.\n\t\t\t\tif (\n\t\t\t\t\tschema.schemaType === \"template\" ||\n\t\t\t\t\tschema.schemaType === \"module\" ||\n\t\t\t\t\tschema.schemaType === \"component\"\n\t\t\t\t) {\n\t\t\t\t\thasDistributorData = schema.default.hasDistributorData as boolean;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\n\t\t\t// Is a Category (Simple ContentType) interface\n\t\t\t// TODO: Total SHAME!\n\t\t\tconst isACategoryInterface =\n\t\t\t\t\"fromPage\" in schema &&\n\t\t\t\tschema.fromPage === false &&\n\t\t\t\tschema.taxonomy === true;\n\n\t\t\t//\n\t\t\t// UI Schemas - List templates\n\t\t\t// This kind of templates return several extra properties from the build phase.\n\t\t\t//\n\t\t\tconst isListTemplate =\n\t\t\t\t\"schemaType\" in schema &&\n\t\t\t\tschema.schemaType === \"template\" &&\n\t\t\t\tschema.type.mode === \"list\";\n\n\t\t\tconst extraListTemplateProps = isListTemplate\n\t\t\t\t? `Fields.ExtraListTemplateProps`\n\t\t\t\t: \"\";\n\n\t\t\t//\n\t\t\t// Extra extends for the final interface\n\t\t\t//\n\t\t\tconst extendsString = extendsType([extraListTemplateProps]);\n\n\t\t\t//\n\t\t\t// Props for the interface\n\t\t\t//\n\t\t\tconst propsFromFields = getAllFields(schema)\n\t\t\t\t.map((field) => {\n\t\t\t\t\treturn getTypeFromField(field, kind, {\n\t\t\t\t\t\thasDistributorData,\n\t\t\t\t\t\tmoduleSchemas: MODULE_SCHEMAS,\n\t\t\t\t\t\tschema,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\"\");\n\n\t\t\t//\n\t\t\t// Compose the final interface string\n\t\t\t//\n\t\t\treturn `\n\t\t\t\texport interface ${component}${contentTypeSuffixStr}${interfaceSuffix}${relationsGeneric} ${extendsString} {\n\t\t\t\t\t${contentTypeName}\n\t\t\t\t\t${contentTypeKind}\n\t\t\t\t\t${relatedContentTypeNames}\n\t\t\t\t\t${componentName}\n\t\t\t\t\t${propsFromFields}\n\t\t\t\t\t${isACategoryInterface ? `title?: string; code?: string` : \"\"}\n\t\t\t\t}\n\t\t\t\t${interfaceForPublicAPI}\n\t\t\t\t`;\n\t\t})\n\t\t.join(\"\");\n\n\tconst pageContentTypesStr =\n\t\tcontentTypePageListNames && contentTypePageListNames.length\n\t\t\t? `export type PageContentTypes = ${contentTypePageListNames.join(\"|\")};`\n\t\t\t: \"\";\n\tconst simpleContentTypesStr =\n\t\tcontentTypeSimpleListNames && contentTypeSimpleListNames.length\n\t\t\t? `export type SimpleContentTypes = ${contentTypeSimpleListNames.join(\n\t\t\t\t\t\"|\"\n\t\t\t )};`\n\t\t\t: \"\";\n\tconst taxonomyContentTypesStr =\n\t\tcontentTypeTaxonomyListNames && contentTypeTaxonomyListNames.length\n\t\t\t? `export type TaxonomyContentTypes = ${contentTypeTaxonomyListNames.join(\n\t\t\t\t\t\"|\"\n\t\t\t )};`\n\t\t\t: \"\";\n\n\treturn `\n${autoTypesSchemas}\n${pageContentTypesStr}\n${simpleContentTypesStr}\n${taxonomyContentTypesStr}\n`;\n}\n\nexport { getTypesFromSchemas };\n","/* eslint-disable @typescript-eslint/no-var-requires */\nimport path from \"path\";\n\nimport { packageDirectorySync } from \"pkg-dir\";\n\nimport { main } from \"./main\";\n\nconst parsedSchemasFromAX = path.join(\n\tpackageDirectorySync({ cwd: __dirname }) || \"\",\n\t\"../ax/scripts/__griddo_config_parsed__.js\",\n);\n\nconst schemas = require(parsedSchemasFromAX);\n\nmain(\n\t{\n\t\t...schemas.schemas.all,\n\t\t...schemas.schemas.templates,\n\t\t...schemas.schemas.structuredData,\n\t},\n\tschemas.schemas.menuItems,\n\tschemas.schemas.languages,\n\tschemas.moduleCategories,\n\tschemas.schemas.dataPacks,\n\tschemas.schemas.dataPacksCategories,\n\tschemas.themes,\n\tschemas.subthemes,\n\tschemas.autotypes,\n);\n","/* eslint-disable @typescript-eslint/no-var-requires */\nimport type { LanguagesSchema, MenuItemsSchema, SchemaType } from \"./types\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport { writeFile } from \"fs\";\nimport path from \"path\";\n\nimport prettier from \"prettier\";\n\nimport { HEAD_DESIGN } from \"./ascii\";\nimport { TYPE_FILE_NAME } from \"./constants\";\nimport { getMenuItemsProps } from \"./getMenuItemsProps\";\nimport { getTypesFromSchemas } from \"./getTypesFromSchemas\";\nimport {\n\tgetElementsUnionType,\n\tgetPageContentTypesUnionType,\n\tgetSectionList,\n\tgetSimpleContentTypeUnionProps,\n\tgetTaxonomyContentTypesUnionType,\n\tresolveComponentsPath,\n\tschemasToArray,\n} from \"./utils\";\nimport {\n\tDataPack,\n\tDataPackCategory,\n\tModuleCategories,\n} from \"../../types/schemas\";\nimport { ThemeEntry } from \"../../types/schemas/Themes\";\n\n//\n// Main function\n//\nexport async function main(\n\tinputSchemas: Record<string, SchemaType>,\n\tmenuItemsSchemas: MenuItemsSchema,\n\tlanguagesSchemas: LanguagesSchema,\n\tmoduleCategoriesSchema: ModuleCategories,\n\tdatapacksSchema: Record<string, DataPack>,\n\tdatapacksCategoriesSchema: Record<string, DataPackCategory>,\n\tthemesSchema: Array<ThemeEntry>,\n\tsubthemesSchema: Array<string>,\n\tconfig?: AutoTypesConfig\n) {\n\t// Config\n\tconst typeFileName = TYPE_FILE_NAME;\n\n\t// Schemas\n\tconst schemas = schemasToArray(inputSchemas);\n\n\t// Types\n\tconst elementsUnionTypes = getElementsUnionType(schemas);\n\tconst templateSectionList = getSectionList(schemas);\n\tconst allTypes = getTypesFromSchemas(schemas, config);\n\n\t// Menu items types Griddo + Instance\n\tconst linkFields = menuItemsSchemas?.link?.fields as any;\n\tconst groupFields = menuItemsSchemas?.group?.fields as any;\n\tconst menuItemsLinksProps = getMenuItemsProps(linkFields);\n\tconst menuItemsGroupProps = getMenuItemsProps(groupFields);\n\tconst menuItemsInterface = `\n\t\texport interface InstanceMenuItems {\n\t\t\tlink:{\n\t\t\t\t${menuItemsLinksProps}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: \"link\";\n\t\t\t\t};\n\t\t\t};\n\t\t\tgroup: {\n\t\t\t\turl?: null;\n\t\t\t\t${menuItemsGroupProps}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: \"group\";\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\texport type LinkMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems[\"link\"];\n\t\texport type GroupMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems[\"group\"];\n\t\texport type MenuElement = LinkMenuElement | GroupMenuElement;\n\t\texport type Menu = Fields.Menu<InstanceMenuItems>;\n\t`;\n\n\t// ${JSON.stringify(languagesSchemas)}\n\n\tconst languagesInterface = `\n\t\t// Type for the language schema\n\t\texport interface SiteLanguage {\n\t\t\tdomain: { id: number; url: string; slug: string };\n\t\t\thome: string;\n\t\t\tid: number;\n\t\t\tisDefault: boolean;\n\t\t\tlabel: ${(Object.keys(languagesSchemas) as Array<keyof typeof languagesSchemas>)\n\t\t\t\t.map((loc) => `\"${languagesSchemas[loc].label}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tlanguage: ${(\n\t\t\t\tObject.keys(languagesSchemas) as Array<keyof typeof languagesSchemas>\n\t\t\t)\n\t\t\t\t.map((loc) => `\"${languagesSchemas[loc].name}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tlocale: ${Object.keys(languagesSchemas)\n\t\t\t\t.map((loc) => `\"${loc}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tpath: string;\n\t\t}\n\t`;\n\n\tconst moduleCategories = moduleCategoriesSchema\n\t\t? `type ModuleCategories = ${moduleCategoriesSchema\n\t\t\t\t.map((entry) => `\"${entry.value}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst datapacks = datapacksSchema\n\t\t? `type Datapacks = ${Object.keys(datapacksSchema)\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst datapacksCategories = datapacksCategoriesSchema\n\t\t? `type DatapacksCategories = ${Object.keys(datapacksCategoriesSchema)\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst allTaxonomyContentTypeProps =\n\t\t\"type AllTaxonomyContentTypeProps = \" +\n\t\tgetTaxonomyContentTypesUnionType(schemas);\n\tconst allSimpleContentTypeProps =\n\t\t\"type AllPageContentTypeProps = \" + getSimpleContentTypeUnionProps(schemas);\n\tconst allPageContentTypeProps =\n\t\t\"type AllSimpleContentTypeProps = \" + getPageContentTypesUnionType(schemas);\n\n\tconst themes = themesSchema\n\t\t? `type Themes = ${themesSchema\n\t\t\t\t.map((entry) => `\"${entry.value}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst subthemes = subthemesSchema\n\t\t? `type Subthemes = ${subthemesSchema\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\t// Prettier\n\tconst localConfFile = await prettier.resolveConfigFile();\n\tconst localConf = await prettier.resolveConfig(localConfFile as string);\n\tconst autoTypesConfig = { useTabs: true };\n\tconst prettierConfig = localConf || autoTypesConfig;\n\n\tconst stringToPrettify = `\n\t\t${HEAD_DESIGN}\n\t\t${menuItemsInterface}\n\t\t${languagesInterface}\n\t\t${allTypes}\n\t\t${elementsUnionTypes}\n\t\t${templateSectionList}\n\t\t${moduleCategories}\n\t\t${datapacks}\n\t\t${datapacksCategories}\n\t\t${allTaxonomyContentTypeProps}\n\t\t${allSimpleContentTypeProps}\n\t\t${allPageContentTypeProps}\n\t\t${themes}\n\t\t${subthemes}\n\t\t`;\n\n\tconst prettierConfigProps = {\n\t\t...prettierConfig,\n\t\tparser: \"typescript\",\n\t};\n\n\tconst allTypesPrettify = await prettier.format(\n\t\tstringToPrettify,\n\t\tprettierConfigProps\n\t);\n\n\t// Remove extra new lines\n\tconst stringData = allTypesPrettify.replace(/^\\s*\\n/gm, \"\");\n\n\t// Write it out!\n\n\t// const dstPath = path.resolve(pkgDir.sync(__dirname) || \"\", \"../../..\");\n\twriteFile(\n\t\t`${path.join(resolveComponentsPath(), typeFileName)}`,\n\t\tstringData,\n\t\t(err) => {\n\t\t\tif (err) throw err;\n\t\t}\n\t);\n\n\t// :)\n\tconsole.log(\"🤖 AutoTypes ✓\");\n}\n"],"names":["typeMappings","directory","file","matchType","type","stat","toPath","urlOrPath","URL","fileURLToPath","locatePathSync","paths","cwd","process","allowSymlinks","Object","hasOwnProperty","call","Error","checkType","statFunction","fs","statSync","lstatSync","path_","path","resolve","throwIfNoEntry","findUpStop","Symbol","findUpSync","name","options","matches","root","parse","stopAt","limit","Number","POSITIVE_INFINITY","flat","runMatcher","locateOptions","foundPath","push","length","dirname","findUpMultipleSync","packageDirectorySync","filePath","__awaiter","thisArg","_arguments","P","generator","Promise","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","HEAD_DESIGN","TYPE_FILE_NAME","INTERFACE_SUFFIX","CONTENT_TYPE_SUFFIX","PUBLIC_API_SUFFIX","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","camelCase","input","Array","isArray","TypeError","pascalCase","preserveConsecutiveUppercase","map","x","trim","filter","join","toLowerCase","locale","string","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","isLastCharLower","isLastCharUpper","isLastLastCharUpper","i","character","test","slice","preserveCamelCase","replace","lastIndex","m1","charAt","_","identifier","m","postProcess","camelcase","default_1","getInterfacePropType","field","returnTypeName","generic","hasHideable","Boolean","hideable","genericStr","returnTypeNameWithGeneriStr","returnType","typeWrappedWithHideable","_a","_autoType","doc","key","getGenericFromWhitelist","whiteList","config","interfaceSuffix","whiteListItem","item","ArrayFieldGroup","AsyncCheckGroup","AsyncSelect","CheckGroup","ColorPicker","ComponentArray","ComponentContainer","ConditionalField","DateField","FieldGroup","FieldsDivider","FileField","HeadingField","ImageField","LinkField","MultiCheckSelect","MultiCheckSelectGroup","NoteField","NumberField","RadioGroup","ReferenceField","RichText","Select","SliderField","TagsField","TextArea","TextField","TimeField","ToggleField","UniqueCheck","UrlField","VisualUniqueSelection","Wysiwyg","IS_COMPONENT_LIBRARY","__dirname","includes","getTypeFromField","kind","ignore","hasDistributorData","keys","elements","element","_b","relations","isThemePalette","getGenericFromOptions","getGenericFromCheckBoxOptions","entity","fields","childField","conditionalChildrenFields","conditionalHasHideable","endHideable","option","optional","fieldCasted","getModulesFromTemplateSectionList","modules","templateName","templateSection","entry","schemaType","sectionList","t","s","component","modulesInSectionLists","moduleSchemas","schema","Set","split","FieldCasted","sources","structuredData","undefined","withValue","withTheme","theme","console","warn","getMenuItemsProps","getTypesFromSchemas","schemas","contentTypeSuffix","publicApiSuffix","contentTypePageListNames","contentTypeSimpleListNames","contentTypeTaxonomyListNames","relationsGeneric","contentTypeSuffixStr","contentTypeName","contentTypeKind","relatedContentTypeNames","componentName","interfaceForPublicAPI","MODULE_SCHEMAS","fromPage","taxonomy","relatedContentTypeNamesValues","JSON","stringify","default","isACategoryInterface","isListTemplate","mode","extendsString","types","typeStr","propsFromFields","content","configTabs","tab","getAllFields","parsedSchemasFromAX","require","inputSchemas","menuItemsSchemas","languagesSchemas","moduleCategoriesSchema","datapacksSchema","datapacksCategoriesSchema","themesSchema","subthemesSchema","typeFileName","objectSchemas","assign","elementsUnionTypes","unionOfComponents","unionOfModules","unionOfTemplates","detailTemplates","getElementsUnionType","templateSectionList","templateSchema","sectionNames","getSectionList","allTypes","linkFields","link","groupFields","group","menuItemsInterface","languagesInterface","loc","label","moduleCategories","datapacks","datapacksCategories","allTaxonomyContentTypeProps","getTaxonomyContentTypesUnionType","allSimpleContentTypeProps","getSimpleContentTypeUnionProps","allPageContentTypeProps","getPageContentTypesUnionType","themes","subthemes","localConfFile","prettier","resolveConfigFile","prettierConfig","resolveConfig","useTabs","stringToPrettify","prettierConfigProps","parser","stringData","format","writeFile","componentsPath","resolveComponentsPath","err","log","main","all","templates","menuItems","languages","dataPacks","dataPacksCategories","autotypes"],"mappings":"qKAMA,MAAMA,EAAe,CACpBC,UAAW,cACXC,KAAM,UAWP,MAAMC,EAAY,CAACC,EAAMC,IAASA,EAAKL,EAAaI,MAE9CE,EAASC,GAAaA,aAAqBC,IAAMC,EAAAA,cAAcF,GAAaA,EA2B3E,SAASG,EACfC,GACAC,IACCA,EAAMC,EAAQD,MAAKR,KACnBA,EAAO,OAAMU,cACbA,GAAgB,GACb,CAAE,IA3CP,SAAmBV,GAClB,IAAIW,OAAOC,eAAeC,KAAKjB,EAAcI,GAI7C,MAAM,IAAIc,MAAM,2BAA2Bd,IAC5C,CAuCCe,CAAUf,GACVQ,EAAMN,EAAOM,GAEb,MAAMQ,EAAeN,EAAgBO,EAAGC,SAAWD,EAAGE,UAEtD,IAAK,MAAMC,KAASb,EACnB,IACC,MAAMN,EAAOe,EAAa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