@mintlify/validation 0.1.254 → 0.1.256

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.
Files changed (35) hide show
  1. package/dist/mint-config/schemas/v2/index.d.ts +3922 -7432
  2. package/dist/mint-config/schemas/v2/properties/index.d.ts +1 -0
  3. package/dist/mint-config/schemas/v2/properties/index.js +1 -0
  4. package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +12 -455
  5. package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +28 -11
  6. package/dist/mint-config/schemas/v2/properties/navigation/divisionNav.d.ts +56 -0
  7. package/dist/mint-config/schemas/v2/properties/navigation/divisionNav.js +5 -0
  8. package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +13 -330
  9. package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +28 -11
  10. package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +22 -646
  11. package/dist/mint-config/schemas/v2/properties/navigation/groups.js +15 -13
  12. package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +258 -1495
  13. package/dist/mint-config/schemas/v2/properties/navigation/index.js +23 -13
  14. package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +11 -202
  15. package/dist/mint-config/schemas/v2/properties/navigation/languages.js +33 -11
  16. package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +2 -3
  17. package/dist/mint-config/schemas/v2/properties/navigation/pages.js +2 -2
  18. package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +11 -328
  19. package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +28 -11
  20. package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +12 -203
  21. package/dist/mint-config/schemas/v2/properties/navigation/version.js +28 -11
  22. package/dist/mint-config/schemas/v2/themes/linden.d.ts +253 -955
  23. package/dist/mint-config/schemas/v2/themes/maple.d.ts +253 -955
  24. package/dist/mint-config/schemas/v2/themes/mint.d.ts +253 -955
  25. package/dist/mint-config/schemas/v2/themes/palm.d.ts +253 -955
  26. package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +143 -737
  27. package/dist/mint-config/schemas/v2/themes/willow.d.ts +253 -955
  28. package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.d.ts +14 -0
  29. package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.js +98 -0
  30. package/dist/mint-config/upgrades/updateNavigationToDocsConfig.js +14 -8
  31. package/dist/mint-config/validateConfig.d.ts +420 -960
  32. package/dist/tsconfig.build.tsbuildinfo +1 -1
  33. package/package.json +2 -2
  34. package/dist/mint-config/schemas/v2/properties/navigation/divisionSchemas.d.ts +0 -7
  35. package/dist/mint-config/schemas/v2/properties/navigation/divisionSchemas.js +0 -26
@@ -7,4 +7,5 @@ export * from './navigation/languages.js';
7
7
  export * from './navigation/pages.js';
8
8
  export * from './navigation/tabs.js';
9
9
  export * from './navigation/version.js';
10
+ export * from './navigation/dropdown.js';
10
11
  export * from './reusable/index.js';
@@ -7,4 +7,5 @@ export * from './navigation/languages.js';
7
7
  export * from './navigation/pages.js';
8
8
  export * from './navigation/tabs.js';
9
9
  export * from './navigation/version.js';
10
+ export * from './navigation/dropdown.js';
10
11
  export * from './reusable/index.js';
@@ -1,181 +1,6 @@
1
1
  import { z } from 'zod';
2
- export declare const nonRecursiveAnchorSchema: z.ZodIntersection<z.ZodObject<{
3
- anchor: z.ZodString;
4
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
5
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
6
- name: z.ZodEffects<z.ZodString, string, string>;
7
- }, "strip", z.ZodTypeAny, {
8
- name: string;
9
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
10
- }, {
11
- name: string;
12
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
13
- }>]>>;
14
- color: z.ZodOptional<z.ZodObject<{
15
- light: z.ZodOptional<z.ZodString>;
16
- dark: z.ZodOptional<z.ZodString>;
17
- }, "strict", z.ZodTypeAny, {
18
- light?: string | undefined;
19
- dark?: string | undefined;
20
- }, {
21
- light?: string | undefined;
22
- dark?: string | undefined;
23
- }>>;
24
- hidden: z.ZodOptional<z.ZodBoolean>;
25
- }, "strip", z.ZodTypeAny, {
26
- anchor: string;
27
- icon?: string | {
28
- name: string;
29
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
30
- } | undefined;
31
- color?: {
32
- light?: string | undefined;
33
- dark?: string | undefined;
34
- } | undefined;
35
- hidden?: boolean | undefined;
36
- }, {
37
- anchor: string;
38
- icon?: string | {
39
- name: string;
40
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
41
- } | undefined;
42
- color?: {
43
- light?: string | undefined;
44
- dark?: string | undefined;
45
- } | undefined;
46
- hidden?: boolean | undefined;
47
- }>, z.ZodObject<{
48
- href: z.ZodString;
49
- }, "strip", z.ZodTypeAny, {
50
- href: string;
51
- }, {
52
- href: string;
53
- }>>;
54
- export declare const anchorSchema: z.ZodIntersection<z.ZodObject<{
55
- anchor: z.ZodString;
56
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
57
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
58
- name: z.ZodEffects<z.ZodString, string, string>;
59
- }, "strip", z.ZodTypeAny, {
60
- name: string;
61
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
62
- }, {
63
- name: string;
64
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
65
- }>]>>;
66
- color: z.ZodOptional<z.ZodObject<{
67
- light: z.ZodOptional<z.ZodString>;
68
- dark: z.ZodOptional<z.ZodString>;
69
- }, "strict", z.ZodTypeAny, {
70
- light?: string | undefined;
71
- dark?: string | undefined;
72
- }, {
73
- light?: string | undefined;
74
- dark?: string | undefined;
75
- }>>;
76
- hidden: z.ZodOptional<z.ZodBoolean>;
77
- }, "strip", z.ZodTypeAny, {
78
- anchor: string;
79
- icon?: string | {
80
- name: string;
81
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
82
- } | undefined;
83
- color?: {
84
- light?: string | undefined;
85
- dark?: string | undefined;
86
- } | undefined;
87
- hidden?: boolean | undefined;
88
- }, {
89
- anchor: string;
90
- icon?: string | {
91
- name: string;
92
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
93
- } | undefined;
94
- color?: {
95
- light?: string | undefined;
96
- dark?: string | undefined;
97
- } | undefined;
98
- hidden?: boolean | undefined;
99
- }>, z.ZodUnion<[z.ZodObject<{
100
- href: z.ZodString;
101
- }, "strip", z.ZodTypeAny, {
102
- href: string;
103
- }, {
104
- href: string;
105
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>> | z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
106
- anchor: z.ZodString;
107
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
108
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
109
- name: z.ZodEffects<z.ZodString, string, string>;
110
- }, "strip", z.ZodTypeAny, {
111
- name: string;
112
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
113
- }, {
114
- name: string;
115
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
116
- }>]>>;
117
- color: z.ZodOptional<z.ZodObject<{
118
- light: z.ZodOptional<z.ZodString>;
119
- dark: z.ZodOptional<z.ZodString>;
120
- }, "strict", z.ZodTypeAny, {
121
- light?: string | undefined;
122
- dark?: string | undefined;
123
- }, {
124
- light?: string | undefined;
125
- dark?: string | undefined;
126
- }>>;
127
- hidden: z.ZodOptional<z.ZodBoolean>;
128
- }, "strip", z.ZodTypeAny, {
129
- anchor: string;
130
- icon?: string | {
131
- name: string;
132
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
133
- } | undefined;
134
- color?: {
135
- light?: string | undefined;
136
- dark?: string | undefined;
137
- } | undefined;
138
- hidden?: boolean | undefined;
139
- }, {
140
- anchor: string;
141
- icon?: string | {
142
- name: string;
143
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
144
- } | undefined;
145
- color?: {
146
- light?: string | undefined;
147
- dark?: string | undefined;
148
- } | undefined;
149
- hidden?: boolean | undefined;
150
- }>, z.ZodUnion<[z.ZodObject<{
151
- href: z.ZodString;
152
- }, "strip", z.ZodTypeAny, {
153
- href: string;
154
- }, {
155
- href: string;
156
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, z.ZodObject<{
157
- openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
158
- source: z.ZodEffects<z.ZodString, string, string>;
159
- directory: z.ZodOptional<z.ZodString>;
160
- }, "strict", z.ZodTypeAny, {
161
- source: string;
162
- directory?: string | undefined;
163
- }, {
164
- source: string;
165
- directory?: string | undefined;
166
- }>]>>;
167
- }, "strip", z.ZodTypeAny, {
168
- openapi?: string | string[] | {
169
- source: string;
170
- directory?: string | undefined;
171
- } | undefined;
172
- }, {
173
- openapi?: string | string[] | {
174
- source: string;
175
- directory?: string | undefined;
176
- } | undefined;
177
- }>>;
178
- export declare const decoratedAnchorSchema: z.ZodIntersection<z.ZodObject<{
2
+ import { AnchorNavigation } from './divisionNav.js';
3
+ declare const baseAnchorSchema: z.ZodObject<{
179
4
  anchor: z.ZodString;
180
5
  icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
181
6
  style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
@@ -220,13 +45,11 @@ export declare const decoratedAnchorSchema: z.ZodIntersection<z.ZodObject<{
220
45
  dark?: string | undefined;
221
46
  } | undefined;
222
47
  hidden?: boolean | undefined;
223
- }>, z.ZodUnion<[z.ZodObject<{
224
- href: z.ZodString;
225
- }, "strip", z.ZodTypeAny, {
226
- href: string;
227
- }, {
228
- href: string;
229
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>> | z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
48
+ }>;
49
+ export type BaseAnchorSchema = z.infer<typeof baseAnchorSchema>;
50
+ export declare const anchorSchema: z.ZodType<AnchorNavigation<'default'>>;
51
+ export declare const decoratedAnchorSchema: z.ZodType<AnchorNavigation<'decorated'>>;
52
+ export declare const nonRecursiveAnchorSchema: z.ZodIntersection<z.ZodObject<{
230
53
  anchor: z.ZodString;
231
54
  icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
232
55
  style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
@@ -271,283 +94,17 @@ export declare const decoratedAnchorSchema: z.ZodIntersection<z.ZodObject<{
271
94
  dark?: string | undefined;
272
95
  } | undefined;
273
96
  hidden?: boolean | undefined;
274
- }>, z.ZodUnion<[z.ZodObject<{
97
+ }>, z.ZodObject<{
275
98
  href: z.ZodString;
276
99
  }, "strip", z.ZodTypeAny, {
277
100
  href: string;
278
101
  }, {
279
102
  href: string;
280
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, z.ZodObject<{
281
- openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
282
- source: z.ZodEffects<z.ZodString, string, string>;
283
- directory: z.ZodOptional<z.ZodString>;
284
- }, "strict", z.ZodTypeAny, {
285
- source: string;
286
- directory?: string | undefined;
287
- }, {
288
- source: string;
289
- directory?: string | undefined;
290
- }>]>>;
291
- }, "strip", z.ZodTypeAny, {
292
- openapi?: string | string[] | {
293
- source: string;
294
- directory?: string | undefined;
295
- } | undefined;
296
- }, {
297
- openapi?: string | string[] | {
298
- source: string;
299
- directory?: string | undefined;
300
- } | undefined;
301
103
  }>>;
302
- export declare const anchorsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
303
- anchor: z.ZodString;
304
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
305
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
306
- name: z.ZodEffects<z.ZodString, string, string>;
307
- }, "strip", z.ZodTypeAny, {
308
- name: string;
309
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
310
- }, {
311
- name: string;
312
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
313
- }>]>>;
314
- color: z.ZodOptional<z.ZodObject<{
315
- light: z.ZodOptional<z.ZodString>;
316
- dark: z.ZodOptional<z.ZodString>;
317
- }, "strict", z.ZodTypeAny, {
318
- light?: string | undefined;
319
- dark?: string | undefined;
320
- }, {
321
- light?: string | undefined;
322
- dark?: string | undefined;
323
- }>>;
324
- hidden: z.ZodOptional<z.ZodBoolean>;
325
- }, "strip", z.ZodTypeAny, {
326
- anchor: string;
327
- icon?: string | {
328
- name: string;
329
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
330
- } | undefined;
331
- color?: {
332
- light?: string | undefined;
333
- dark?: string | undefined;
334
- } | undefined;
335
- hidden?: boolean | undefined;
336
- }, {
337
- anchor: string;
338
- icon?: string | {
339
- name: string;
340
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
341
- } | undefined;
342
- color?: {
343
- light?: string | undefined;
344
- dark?: string | undefined;
345
- } | undefined;
346
- hidden?: boolean | undefined;
347
- }>, z.ZodUnion<[z.ZodObject<{
348
- href: z.ZodString;
349
- }, "strip", z.ZodTypeAny, {
350
- href: string;
351
- }, {
352
- href: string;
353
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>> | z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
354
- anchor: z.ZodString;
355
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
356
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
357
- name: z.ZodEffects<z.ZodString, string, string>;
358
- }, "strip", z.ZodTypeAny, {
359
- name: string;
360
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
361
- }, {
362
- name: string;
363
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
364
- }>]>>;
365
- color: z.ZodOptional<z.ZodObject<{
366
- light: z.ZodOptional<z.ZodString>;
367
- dark: z.ZodOptional<z.ZodString>;
368
- }, "strict", z.ZodTypeAny, {
369
- light?: string | undefined;
370
- dark?: string | undefined;
371
- }, {
372
- light?: string | undefined;
373
- dark?: string | undefined;
374
- }>>;
375
- hidden: z.ZodOptional<z.ZodBoolean>;
376
- }, "strip", z.ZodTypeAny, {
377
- anchor: string;
378
- icon?: string | {
379
- name: string;
380
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
381
- } | undefined;
382
- color?: {
383
- light?: string | undefined;
384
- dark?: string | undefined;
385
- } | undefined;
386
- hidden?: boolean | undefined;
387
- }, {
388
- anchor: string;
389
- icon?: string | {
390
- name: string;
391
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
392
- } | undefined;
393
- color?: {
394
- light?: string | undefined;
395
- dark?: string | undefined;
396
- } | undefined;
397
- hidden?: boolean | undefined;
398
- }>, z.ZodUnion<[z.ZodObject<{
399
- href: z.ZodString;
400
- }, "strip", z.ZodTypeAny, {
401
- href: string;
402
- }, {
403
- href: string;
404
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, z.ZodObject<{
405
- openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
406
- source: z.ZodEffects<z.ZodString, string, string>;
407
- directory: z.ZodOptional<z.ZodString>;
408
- }, "strict", z.ZodTypeAny, {
409
- source: string;
410
- directory?: string | undefined;
411
- }, {
412
- source: string;
413
- directory?: string | undefined;
414
- }>]>>;
415
- }, "strip", z.ZodTypeAny, {
416
- openapi?: string | string[] | {
417
- source: string;
418
- directory?: string | undefined;
419
- } | undefined;
420
- }, {
421
- openapi?: string | string[] | {
422
- source: string;
423
- directory?: string | undefined;
424
- } | undefined;
425
- }>>, "many">;
426
- export declare const decoratedAnchorsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
427
- anchor: z.ZodString;
428
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
429
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
430
- name: z.ZodEffects<z.ZodString, string, string>;
431
- }, "strip", z.ZodTypeAny, {
432
- name: string;
433
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
434
- }, {
435
- name: string;
436
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
437
- }>]>>;
438
- color: z.ZodOptional<z.ZodObject<{
439
- light: z.ZodOptional<z.ZodString>;
440
- dark: z.ZodOptional<z.ZodString>;
441
- }, "strict", z.ZodTypeAny, {
442
- light?: string | undefined;
443
- dark?: string | undefined;
444
- }, {
445
- light?: string | undefined;
446
- dark?: string | undefined;
447
- }>>;
448
- hidden: z.ZodOptional<z.ZodBoolean>;
449
- }, "strip", z.ZodTypeAny, {
450
- anchor: string;
451
- icon?: string | {
452
- name: string;
453
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
454
- } | undefined;
455
- color?: {
456
- light?: string | undefined;
457
- dark?: string | undefined;
458
- } | undefined;
459
- hidden?: boolean | undefined;
460
- }, {
461
- anchor: string;
462
- icon?: string | {
463
- name: string;
464
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
465
- } | undefined;
466
- color?: {
467
- light?: string | undefined;
468
- dark?: string | undefined;
469
- } | undefined;
470
- hidden?: boolean | undefined;
471
- }>, z.ZodUnion<[z.ZodObject<{
472
- href: z.ZodString;
473
- }, "strip", z.ZodTypeAny, {
474
- href: string;
475
- }, {
476
- href: string;
477
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>> | z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
478
- anchor: z.ZodString;
479
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
480
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
481
- name: z.ZodEffects<z.ZodString, string, string>;
482
- }, "strip", z.ZodTypeAny, {
483
- name: string;
484
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
485
- }, {
486
- name: string;
487
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
488
- }>]>>;
489
- color: z.ZodOptional<z.ZodObject<{
490
- light: z.ZodOptional<z.ZodString>;
491
- dark: z.ZodOptional<z.ZodString>;
492
- }, "strict", z.ZodTypeAny, {
493
- light?: string | undefined;
494
- dark?: string | undefined;
495
- }, {
496
- light?: string | undefined;
497
- dark?: string | undefined;
498
- }>>;
499
- hidden: z.ZodOptional<z.ZodBoolean>;
500
- }, "strip", z.ZodTypeAny, {
501
- anchor: string;
502
- icon?: string | {
503
- name: string;
504
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
505
- } | undefined;
506
- color?: {
507
- light?: string | undefined;
508
- dark?: string | undefined;
509
- } | undefined;
510
- hidden?: boolean | undefined;
511
- }, {
512
- anchor: string;
513
- icon?: string | {
514
- name: string;
515
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
516
- } | undefined;
517
- color?: {
518
- light?: string | undefined;
519
- dark?: string | undefined;
520
- } | undefined;
521
- hidden?: boolean | undefined;
522
- }>, z.ZodUnion<[z.ZodObject<{
523
- href: z.ZodString;
524
- }, "strip", z.ZodTypeAny, {
525
- href: string;
526
- }, {
527
- href: string;
528
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, z.ZodObject<{
529
- openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
530
- source: z.ZodEffects<z.ZodString, string, string>;
531
- directory: z.ZodOptional<z.ZodString>;
532
- }, "strict", z.ZodTypeAny, {
533
- source: string;
534
- directory?: string | undefined;
535
- }, {
536
- source: string;
537
- directory?: string | undefined;
538
- }>]>>;
539
- }, "strip", z.ZodTypeAny, {
540
- openapi?: string | string[] | {
541
- source: string;
542
- directory?: string | undefined;
543
- } | undefined;
544
- }, {
545
- openapi?: string | string[] | {
546
- source: string;
547
- directory?: string | undefined;
548
- } | undefined;
549
- }>>, "many">;
104
+ export declare const anchorsSchema: z.ZodArray<z.ZodType<AnchorNavigation<"default">, z.ZodTypeDef, AnchorNavigation<"default">>, "many">;
105
+ export declare const decoratedAnchorsSchema: z.ZodArray<z.ZodType<AnchorNavigation<"decorated">, z.ZodTypeDef, AnchorNavigation<"decorated">>, "many">;
550
106
  export type AnchorsConfig = z.infer<typeof anchorsSchema>;
551
107
  export type AnchorConfig = z.infer<typeof anchorSchema>;
552
- export type DecoratedAnchorsConfig = z.infer<typeof decoratedAnchorsSchema>;
553
108
  export type DecoratedAnchorConfig = z.infer<typeof decoratedAnchorSchema>;
109
+ export type DecoratedAnchorsConfig = z.infer<typeof decoratedAnchorsSchema>;
110
+ export {};
@@ -4,25 +4,42 @@ import { hiddenSchema } from '../reusable/hidden.js';
4
4
  import { hrefSchema } from '../reusable/href.js';
5
5
  import { iconSchema } from '../reusable/icon.js';
6
6
  import { openApiSchema } from '../reusable/openapi.js';
7
- import { getDivisionSchemasExcluding, registerDivisionSchema } from './divisionSchemas.js';
7
+ import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
8
+ import { decoratedGroupsSchema, groupsSchema } from './groups.js';
9
+ import { decoratedLanguagesSchema, languagesSchema } from './languages.js';
10
+ import { decoratedPagesSchema, pagesSchema } from './pages.js';
11
+ import { decoratedTabsSchema, tabsSchema } from './tabs.js';
12
+ import { decoratedVersionsSchema, versionsSchema } from './version.js';
8
13
  const baseAnchorSchema = z.object({
9
14
  anchor: z.string().nonempty().describe('The name of the anchor'),
10
15
  icon: iconSchema.optional(),
11
16
  color: colorSchemaWithOptionalLightAndDark.optional(),
12
17
  hidden: hiddenSchema.optional(),
13
18
  });
14
- const createAnchorSchema = (type) => {
15
- const baseSchema = baseAnchorSchema.and(z.union([z.object({ href: hrefSchema }), ...getDivisionSchemasExcluding('anchors', type)]));
16
- return type === 'decorated'
17
- ? baseSchema
18
- : baseSchema.and(z.object({ openapi: openApiSchema.optional() }));
19
- };
19
+ export const anchorSchema = baseAnchorSchema.and(z
20
+ .object({ openapi: openApiSchema })
21
+ .or(z
22
+ .union([
23
+ z.object({ href: hrefSchema }),
24
+ z.lazy(() => z.object({ languages: languagesSchema })),
25
+ z.lazy(() => z.object({ versions: versionsSchema })),
26
+ z.lazy(() => z.object({ dropdowns: dropdownsSchema })),
27
+ z.lazy(() => z.object({ tabs: tabsSchema })),
28
+ z.lazy(() => z.object({ groups: groupsSchema })),
29
+ z.lazy(() => z.object({ pages: pagesSchema })),
30
+ ])
31
+ .and(z.object({ openapi: openApiSchema.optional() }))));
32
+ export const decoratedAnchorSchema = baseAnchorSchema.and(z.union([
33
+ z.object({ href: hrefSchema }),
34
+ z.lazy(() => z.object({ languages: decoratedLanguagesSchema })),
35
+ z.lazy(() => z.object({ versions: decoratedVersionsSchema })),
36
+ z.lazy(() => z.object({ dropdowns: decoratedDropdownsSchema })),
37
+ z.lazy(() => z.object({ tabs: decoratedTabsSchema })),
38
+ z.lazy(() => z.object({ groups: decoratedGroupsSchema })),
39
+ z.lazy(() => z.object({ pages: decoratedPagesSchema })),
40
+ ]));
20
41
  export const nonRecursiveAnchorSchema = baseAnchorSchema.and(z.object({ href: hrefSchema }));
21
- export const anchorSchema = createAnchorSchema('default');
22
- export const decoratedAnchorSchema = createAnchorSchema('decorated');
23
42
  export const anchorsSchema = z.array(anchorSchema).describe('Organizing by anchors');
24
43
  export const decoratedAnchorsSchema = z
25
44
  .array(decoratedAnchorSchema)
26
45
  .describe('Organizing by anchors');
27
- registerDivisionSchema('anchors', anchorsSchema, 'default');
28
- registerDivisionSchema('anchors', decoratedAnchorsSchema, 'decorated');
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { Division } from '../reusable/divisions.js';
3
+ import { BaseAnchorSchema } from './anchors.js';
4
+ import { BaseDropdownSchema } from './dropdown.js';
5
+ import { GroupsConfig, DecoratedGroupsConfig } from './groups.js';
6
+ import { BaseLanguageSchema } from './languages.js';
7
+ import { PagesConfig, DecoratedPagesConfig } from './pages.js';
8
+ import { BaseTabSchema } from './tabs.js';
9
+ import { BaseVersionSchema } from './version.js';
10
+ type NavigationType = 'default' | 'decorated';
11
+ declare const OpenApiSchema: z.ZodObject<{
12
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
13
+ source: z.ZodEffects<z.ZodString, string, string>;
14
+ directory: z.ZodOptional<z.ZodString>;
15
+ }, "strict", z.ZodTypeAny, {
16
+ source: string;
17
+ directory?: string | undefined;
18
+ }, {
19
+ source: string;
20
+ directory?: string | undefined;
21
+ }>]>>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ openapi?: string | string[] | {
24
+ source: string;
25
+ directory?: string | undefined;
26
+ } | undefined;
27
+ }, {
28
+ openapi?: string | string[] | {
29
+ source: string;
30
+ directory?: string | undefined;
31
+ } | undefined;
32
+ }>;
33
+ type OpenApiSchema<T extends NavigationType> = T extends 'default' ? z.infer<typeof OpenApiSchema> : object;
34
+ type BaseNavigation<T extends NavigationType, K extends Division> = {
35
+ languages: K extends 'languages' ? never : LanguageNavigation<T>[];
36
+ } | {
37
+ versions: K extends 'versions' ? never : VersionNavigation<T>[];
38
+ } | {
39
+ dropdowns: K extends 'dropdowns' ? never : DropdownNavigation<T>[];
40
+ } | {
41
+ tabs: K extends 'tabs' ? never : TabNavigation<T>[];
42
+ } | {
43
+ anchors: K extends 'anchors' ? never : AnchorNavigation<T>[];
44
+ } | {
45
+ groups: T extends 'default' ? GroupsConfig : DecoratedGroupsConfig;
46
+ } | {
47
+ pages: T extends 'default' ? PagesConfig : DecoratedPagesConfig;
48
+ } | {
49
+ href: string;
50
+ };
51
+ export type AnchorNavigation<T extends NavigationType> = BaseAnchorSchema & (OpenApiSchema<T> | (BaseNavigation<T, 'anchors'> & OpenApiSchema<T>));
52
+ export type LanguageNavigation<T extends NavigationType> = BaseLanguageSchema & (OpenApiSchema<T> | (BaseNavigation<T, 'languages'> & OpenApiSchema<T>));
53
+ export type VersionNavigation<T extends NavigationType> = BaseVersionSchema & (OpenApiSchema<T> | (BaseNavigation<T, 'versions'> & OpenApiSchema<T>));
54
+ export type DropdownNavigation<T extends NavigationType> = BaseDropdownSchema & (OpenApiSchema<T> | (BaseNavigation<T, 'dropdowns'> & OpenApiSchema<T>));
55
+ export type TabNavigation<T extends NavigationType> = BaseTabSchema & (OpenApiSchema<T> | (BaseNavigation<T, 'tabs'> & OpenApiSchema<T>));
56
+ export {};
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ import { openApiSchema } from '../reusable/openapi.js';
3
+ const OpenApiSchema = z.object({
4
+ openapi: openApiSchema.optional(),
5
+ });