@mintlify/validation 0.1.351 → 0.1.353

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.
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const footerSchema: z.ZodObject<{
3
+ href: z.ZodString;
4
+ message: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ message: string;
7
+ href: string;
8
+ }, {
9
+ message: string;
10
+ href: string;
11
+ }>;
12
+ export type FooterSchema = z.infer<typeof footerSchema>;
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export const footerSchema = z.object({
3
+ href: z.string(),
4
+ message: z.string(),
5
+ });
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const heroSchema: z.ZodObject<{
3
- message: z.ZodOptional<z.ZodString>;
3
+ prompt: z.ZodOptional<z.ZodString>;
4
4
  examples: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
5
5
  icon: z.ZodOptional<z.ZodString>;
6
6
  title: z.ZodString;
@@ -15,14 +15,14 @@ export declare const heroSchema: z.ZodObject<{
15
15
  icon?: string | undefined;
16
16
  }>, "many">]>>;
17
17
  }, "strip", z.ZodTypeAny, {
18
- message?: string | undefined;
18
+ prompt?: string | undefined;
19
19
  examples?: string[] | {
20
20
  prompt: string;
21
21
  title: string;
22
22
  icon?: string | undefined;
23
23
  }[] | undefined;
24
24
  }, {
25
- message?: string | undefined;
25
+ prompt?: string | undefined;
26
26
  examples?: string[] | {
27
27
  prompt: string;
28
28
  title: string;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export const heroSchema = z.object({
3
- message: z.string().optional(),
3
+ prompt: z.string().optional(),
4
4
  examples: z
5
5
  .union([
6
6
  z.array(z.string()),
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { FooterSchema } from './footer.js';
2
3
  import { heroSchema, HeroSchema } from './hero.js';
3
4
  export declare const chatConfigSchema: z.ZodObject<{
4
5
  name: z.ZodOptional<z.ZodString>;
@@ -25,21 +26,8 @@ export declare const chatConfigSchema: z.ZodObject<{
25
26
  dark: string;
26
27
  href?: string | undefined;
27
28
  }>]>>;
28
- wordmark: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
29
- light: z.ZodString;
30
- dark: z.ZodString;
31
- href: z.ZodOptional<z.ZodString>;
32
- }, "strip", z.ZodTypeAny, {
33
- light: string;
34
- dark: string;
35
- href?: string | undefined;
36
- }, {
37
- light: string;
38
- dark: string;
39
- href?: string | undefined;
40
- }>]>>;
41
29
  hero: z.ZodOptional<z.ZodObject<{
42
- message: z.ZodOptional<z.ZodString>;
30
+ prompt: z.ZodOptional<z.ZodString>;
43
31
  examples: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
44
32
  icon: z.ZodOptional<z.ZodString>;
45
33
  title: z.ZodString;
@@ -54,21 +42,21 @@ export declare const chatConfigSchema: z.ZodObject<{
54
42
  icon?: string | undefined;
55
43
  }>, "many">]>>;
56
44
  }, "strip", z.ZodTypeAny, {
57
- message?: string | undefined;
45
+ prompt?: string | undefined;
58
46
  examples?: string[] | {
59
47
  prompt: string;
60
48
  title: string;
61
49
  icon?: string | undefined;
62
50
  }[] | undefined;
63
51
  }, {
64
- message?: string | undefined;
52
+ prompt?: string | undefined;
65
53
  examples?: string[] | {
66
54
  prompt: string;
67
55
  title: string;
68
56
  icon?: string | undefined;
69
57
  }[] | undefined;
70
58
  }>>;
71
- colors: z.ZodOptional<z.ZodObject<{
59
+ colors: z.ZodEffects<z.ZodOptional<z.ZodObject<{
72
60
  primary: z.ZodString;
73
61
  light: z.ZodOptional<z.ZodString>;
74
62
  dark: z.ZodOptional<z.ZodString>;
@@ -80,8 +68,146 @@ export declare const chatConfigSchema: z.ZodObject<{
80
68
  primary: string;
81
69
  light?: string | undefined;
82
70
  dark?: string | undefined;
71
+ }>>, {
72
+ primary: string;
73
+ light?: string | undefined;
74
+ dark?: string | undefined;
75
+ }, {
76
+ primary: string;
77
+ light?: string | undefined;
78
+ dark?: string | undefined;
79
+ } | undefined>;
80
+ fonts: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
81
+ family: z.ZodString;
82
+ weight: z.ZodOptional<z.ZodNumber>;
83
+ source: z.ZodOptional<z.ZodString>;
84
+ format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ family: string;
87
+ weight?: number | undefined;
88
+ source?: string | undefined;
89
+ format?: "woff" | "woff2" | undefined;
90
+ }, {
91
+ family: string;
92
+ weight?: number | undefined;
93
+ source?: string | undefined;
94
+ format?: "woff" | "woff2" | undefined;
95
+ }>, {
96
+ family: string;
97
+ weight?: number | undefined;
98
+ source?: string | undefined;
99
+ format?: "woff" | "woff2" | undefined;
100
+ }, {
101
+ family: string;
102
+ weight?: number | undefined;
103
+ source?: string | undefined;
104
+ format?: "woff" | "woff2" | undefined;
105
+ }>, z.ZodObject<{
106
+ heading: z.ZodOptional<z.ZodEffects<z.ZodObject<{
107
+ family: z.ZodString;
108
+ weight: z.ZodOptional<z.ZodNumber>;
109
+ source: z.ZodOptional<z.ZodString>;
110
+ format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ family: string;
113
+ weight?: number | undefined;
114
+ source?: string | undefined;
115
+ format?: "woff" | "woff2" | undefined;
116
+ }, {
117
+ family: string;
118
+ weight?: number | undefined;
119
+ source?: string | undefined;
120
+ format?: "woff" | "woff2" | undefined;
121
+ }>, {
122
+ family: string;
123
+ weight?: number | undefined;
124
+ source?: string | undefined;
125
+ format?: "woff" | "woff2" | undefined;
126
+ }, {
127
+ family: string;
128
+ weight?: number | undefined;
129
+ source?: string | undefined;
130
+ format?: "woff" | "woff2" | undefined;
131
+ }>>;
132
+ body: z.ZodOptional<z.ZodEffects<z.ZodObject<{
133
+ family: z.ZodString;
134
+ weight: z.ZodOptional<z.ZodNumber>;
135
+ source: z.ZodOptional<z.ZodString>;
136
+ format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
137
+ }, "strip", z.ZodTypeAny, {
138
+ family: string;
139
+ weight?: number | undefined;
140
+ source?: string | undefined;
141
+ format?: "woff" | "woff2" | undefined;
142
+ }, {
143
+ family: string;
144
+ weight?: number | undefined;
145
+ source?: string | undefined;
146
+ format?: "woff" | "woff2" | undefined;
147
+ }>, {
148
+ family: string;
149
+ weight?: number | undefined;
150
+ source?: string | undefined;
151
+ format?: "woff" | "woff2" | undefined;
152
+ }, {
153
+ family: string;
154
+ weight?: number | undefined;
155
+ source?: string | undefined;
156
+ format?: "woff" | "woff2" | undefined;
157
+ }>>;
158
+ }, "strict", z.ZodTypeAny, {
159
+ heading?: {
160
+ family: string;
161
+ weight?: number | undefined;
162
+ source?: string | undefined;
163
+ format?: "woff" | "woff2" | undefined;
164
+ } | undefined;
165
+ body?: {
166
+ family: string;
167
+ weight?: number | undefined;
168
+ source?: string | undefined;
169
+ format?: "woff" | "woff2" | undefined;
170
+ } | undefined;
171
+ }, {
172
+ heading?: {
173
+ family: string;
174
+ weight?: number | undefined;
175
+ source?: string | undefined;
176
+ format?: "woff" | "woff2" | undefined;
177
+ } | undefined;
178
+ body?: {
179
+ family: string;
180
+ weight?: number | undefined;
181
+ source?: string | undefined;
182
+ format?: "woff" | "woff2" | undefined;
183
+ } | undefined;
184
+ }>]>>;
185
+ appearance: z.ZodOptional<z.ZodObject<{
186
+ default: z.ZodOptional<z.ZodEnum<["system", "light", "dark"]>>;
187
+ strict: z.ZodOptional<z.ZodBoolean>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ default?: "light" | "dark" | "system" | undefined;
190
+ strict?: boolean | undefined;
191
+ }, {
192
+ default?: "light" | "dark" | "system" | undefined;
193
+ strict?: boolean | undefined;
194
+ }>>;
195
+ footer: z.ZodOptional<z.ZodObject<{
196
+ href: z.ZodString;
197
+ message: z.ZodString;
198
+ }, "strip", z.ZodTypeAny, {
199
+ message: string;
200
+ href: string;
201
+ }, {
202
+ message: string;
203
+ href: string;
83
204
  }>>;
84
205
  }, "strip", z.ZodTypeAny, {
206
+ colors: {
207
+ primary: string;
208
+ light?: string | undefined;
209
+ dark?: string | undefined;
210
+ };
85
211
  name?: string | undefined;
86
212
  favicon?: string | {
87
213
  light: string;
@@ -92,23 +218,40 @@ export declare const chatConfigSchema: z.ZodObject<{
92
218
  dark: string;
93
219
  href?: string | undefined;
94
220
  } | undefined;
95
- wordmark?: string | {
96
- light: string;
97
- dark: string;
98
- href?: string | undefined;
99
- } | undefined;
100
221
  hero?: {
101
- message?: string | undefined;
222
+ prompt?: string | undefined;
102
223
  examples?: string[] | {
103
224
  prompt: string;
104
225
  title: string;
105
226
  icon?: string | undefined;
106
227
  }[] | undefined;
107
228
  } | undefined;
108
- colors?: {
109
- primary: string;
110
- light?: string | undefined;
111
- dark?: string | undefined;
229
+ fonts?: {
230
+ family: string;
231
+ weight?: number | undefined;
232
+ source?: string | undefined;
233
+ format?: "woff" | "woff2" | undefined;
234
+ } | {
235
+ heading?: {
236
+ family: string;
237
+ weight?: number | undefined;
238
+ source?: string | undefined;
239
+ format?: "woff" | "woff2" | undefined;
240
+ } | undefined;
241
+ body?: {
242
+ family: string;
243
+ weight?: number | undefined;
244
+ source?: string | undefined;
245
+ format?: "woff" | "woff2" | undefined;
246
+ } | undefined;
247
+ } | undefined;
248
+ appearance?: {
249
+ default?: "light" | "dark" | "system" | undefined;
250
+ strict?: boolean | undefined;
251
+ } | undefined;
252
+ footer?: {
253
+ message: string;
254
+ href: string;
112
255
  } | undefined;
113
256
  }, {
114
257
  name?: string | undefined;
@@ -121,13 +264,8 @@ export declare const chatConfigSchema: z.ZodObject<{
121
264
  dark: string;
122
265
  href?: string | undefined;
123
266
  } | undefined;
124
- wordmark?: string | {
125
- light: string;
126
- dark: string;
127
- href?: string | undefined;
128
- } | undefined;
129
267
  hero?: {
130
- message?: string | undefined;
268
+ prompt?: string | undefined;
131
269
  examples?: string[] | {
132
270
  prompt: string;
133
271
  title: string;
@@ -139,6 +277,33 @@ export declare const chatConfigSchema: z.ZodObject<{
139
277
  light?: string | undefined;
140
278
  dark?: string | undefined;
141
279
  } | undefined;
280
+ fonts?: {
281
+ family: string;
282
+ weight?: number | undefined;
283
+ source?: string | undefined;
284
+ format?: "woff" | "woff2" | undefined;
285
+ } | {
286
+ heading?: {
287
+ family: string;
288
+ weight?: number | undefined;
289
+ source?: string | undefined;
290
+ format?: "woff" | "woff2" | undefined;
291
+ } | undefined;
292
+ body?: {
293
+ family: string;
294
+ weight?: number | undefined;
295
+ source?: string | undefined;
296
+ format?: "woff" | "woff2" | undefined;
297
+ } | undefined;
298
+ } | undefined;
299
+ appearance?: {
300
+ default?: "light" | "dark" | "system" | undefined;
301
+ strict?: boolean | undefined;
302
+ } | undefined;
303
+ footer?: {
304
+ message: string;
305
+ href: string;
306
+ } | undefined;
142
307
  }>;
143
308
  export type ChatProjectConfigSchema = z.infer<typeof chatConfigSchema>;
144
- export { heroSchema, type HeroSchema };
309
+ export { heroSchema, type HeroSchema, type FooterSchema };
@@ -1,15 +1,39 @@
1
1
  import { z } from 'zod';
2
+ import { appearanceSchema } from '../mint-config/schemas/v2/properties/appearance.js';
2
3
  import { colorsSchema } from '../mint-config/schemas/v2/properties/colors.js';
3
4
  import { faviconSchema } from '../mint-config/schemas/v2/properties/favicon.js';
5
+ import { fontsSchema } from '../mint-config/schemas/v2/properties/font.js';
4
6
  import { logoSchema } from '../mint-config/schemas/v2/properties/logo.js';
5
7
  import { nameSchema } from '../mint-config/schemas/v2/properties/name.js';
8
+ import { footerSchema } from './footer.js';
6
9
  import { heroSchema } from './hero.js';
7
10
  export const chatConfigSchema = z.object({
8
11
  name: nameSchema.optional(),
9
12
  favicon: faviconSchema.optional(),
10
13
  logo: logoSchema.optional(),
11
- wordmark: logoSchema.optional(),
12
14
  hero: heroSchema.optional(),
13
- colors: colorsSchema.optional(),
15
+ colors: colorsSchema.optional().transform((arg) => {
16
+ if (arg === undefined) {
17
+ return {
18
+ primary: '#16A34A',
19
+ light: '#4ADE80',
20
+ dark: '#166534',
21
+ };
22
+ }
23
+ else if (arg.dark === undefined && arg.light !== undefined) {
24
+ arg.dark = arg.light;
25
+ }
26
+ else if (arg.light === undefined && arg.dark !== undefined) {
27
+ arg.light = arg.dark;
28
+ }
29
+ else if (arg.dark === undefined && arg.light === undefined) {
30
+ arg.dark = '#166534';
31
+ arg.light = '#4ADE80';
32
+ }
33
+ return arg;
34
+ }),
35
+ fonts: fontsSchema.optional(),
36
+ appearance: appearanceSchema.optional(),
37
+ footer: footerSchema.optional(),
14
38
  });
15
39
  export { heroSchema };