@mintlify/validation 0.1.246 → 0.1.248

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 (56) hide show
  1. package/dist/mint-config/schemas/v2/index.d.ts +5215 -2155
  2. package/dist/mint-config/schemas/v2/index.js +8 -6
  3. package/dist/mint-config/schemas/v2/properties/api.d.ts +11 -11
  4. package/dist/mint-config/schemas/v2/properties/api.js +3 -5
  5. package/dist/mint-config/schemas/v2/properties/appearance.d.ts +4 -4
  6. package/dist/mint-config/schemas/v2/properties/appearance.js +6 -3
  7. package/dist/mint-config/schemas/v2/properties/icons.d.ts +2 -2
  8. package/dist/mint-config/schemas/v2/properties/icons.js +3 -1
  9. package/dist/mint-config/schemas/v2/properties/index.d.ts +9 -0
  10. package/dist/mint-config/schemas/v2/properties/index.js +9 -0
  11. package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +225 -2
  12. package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +10 -16
  13. package/dist/mint-config/schemas/v2/properties/navigation/divisionSchemas.d.ts +7 -0
  14. package/dist/mint-config/schemas/v2/properties/navigation/divisionSchemas.js +26 -0
  15. package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +155 -2
  16. package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +10 -16
  17. package/dist/mint-config/schemas/v2/properties/navigation/global.d.ts +25 -0
  18. package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +638 -6
  19. package/dist/mint-config/schemas/v2/properties/navigation/groups.js +15 -7
  20. package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +1338 -295
  21. package/dist/mint-config/schemas/v2/properties/navigation/index.js +20 -18
  22. package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +47 -214
  23. package/dist/mint-config/schemas/v2/properties/navigation/languages.js +10 -18
  24. package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +4 -0
  25. package/dist/mint-config/schemas/v2/properties/navigation/pages.js +6 -2
  26. package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +153 -2
  27. package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +8 -16
  28. package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +81 -2
  29. package/dist/mint-config/schemas/v2/properties/navigation/version.js +10 -16
  30. package/dist/mint-config/schemas/v2/properties/reusable/divisions.d.ts +2 -0
  31. package/dist/mint-config/schemas/v2/properties/reusable/divisions.js +1 -0
  32. package/dist/mint-config/schemas/v2/properties/reusable/index.d.ts +4 -0
  33. package/dist/mint-config/schemas/v2/properties/reusable/index.js +4 -0
  34. package/dist/mint-config/schemas/v2/properties/reusable/page.d.ts +86 -0
  35. package/dist/mint-config/schemas/v2/properties/reusable/page.js +27 -0
  36. package/dist/mint-config/schemas/v2/properties/seo.d.ts +2 -2
  37. package/dist/mint-config/schemas/v2/properties/seo.js +1 -2
  38. package/dist/mint-config/schemas/v2/properties/styling.d.ts +6 -6
  39. package/dist/mint-config/schemas/v2/properties/styling.js +3 -6
  40. package/dist/mint-config/schemas/v2/themes/{quill.d.ts → linden.d.ts} +740 -540
  41. package/dist/mint-config/schemas/v2/themes/linden.js +3 -0
  42. package/dist/mint-config/schemas/v2/themes/{venus.d.ts → maple.d.ts} +740 -540
  43. package/dist/mint-config/schemas/v2/themes/maple.js +3 -0
  44. package/dist/mint-config/schemas/v2/themes/mint.d.ts +736 -536
  45. package/dist/mint-config/schemas/v2/themes/{prism.d.ts → palm.d.ts} +740 -540
  46. package/dist/mint-config/schemas/v2/themes/palm.js +3 -0
  47. package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +520 -320
  48. package/dist/mint-config/schemas/v2/themes/willow.d.ts +2262 -0
  49. package/dist/mint-config/schemas/v2/themes/willow.js +3 -0
  50. package/dist/mint-config/upgrades/upgradeToDocsConfig.d.ts +2 -5
  51. package/dist/mint-config/upgrades/upgradeToDocsConfig.js +47 -29
  52. package/dist/tsconfig.build.tsbuildinfo +1 -1
  53. package/package.json +2 -2
  54. package/dist/mint-config/schemas/v2/themes/prism.js +0 -3
  55. package/dist/mint-config/schemas/v2/themes/quill.js +0 -3
  56. package/dist/mint-config/schemas/v2/themes/venus.js +0 -3
@@ -1,21 +1,23 @@
1
1
  import { z } from 'zod';
2
- import { anchorsSchema } from './anchors.js';
3
- import { dropdownsSchema } from './dropdown.js';
2
+ import { anchorsSchema, decoratedAnchorsSchema } from './anchors.js';
3
+ import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
4
4
  import { globalSchema } from './global.js';
5
- import { groupsSchema } from './groups.js';
6
- import { languagesSchema } from './languages.js';
7
- import { pagesSchema } from './pages.js';
8
- import { tabsSchema } from './tabs.js';
9
- import { versionsSchema } from './version.js';
10
- export const navigationSchema = z
11
- .union([
12
- z.object({ languages: languagesSchema }),
13
- z.object({ versions: versionsSchema }),
14
- z.object({ tabs: tabsSchema }),
15
- z.object({ dropdowns: dropdownsSchema }),
16
- z.object({ anchors: anchorsSchema }),
17
- z.object({ groups: groupsSchema }),
18
- z.object({ pages: pagesSchema }),
19
- ])
20
- .and(z.object({ global: globalSchema.optional() }))
5
+ import { decoratedGroupsSchema, groupsSchema } from './groups.js';
6
+ import { decoratedLanguagesSchema, languagesSchema } from './languages.js';
7
+ import { decoratedPagesSchema, pagesSchema } from './pages.js';
8
+ import { decoratedTabsSchema, tabsSchema } from './tabs.js';
9
+ import { decoratedVersionsSchema, versionsSchema } from './version.js';
10
+ const baseNavigationSchema = z.object({ global: globalSchema.optional() });
11
+ const createNavigationSchema = (type) => baseNavigationSchema
12
+ .and(z.union([
13
+ z.object({ languages: type === 'default' ? languagesSchema : decoratedLanguagesSchema }),
14
+ z.object({ versions: type === 'default' ? versionsSchema : decoratedVersionsSchema }),
15
+ z.object({ tabs: type === 'default' ? tabsSchema : decoratedTabsSchema }),
16
+ z.object({ dropdowns: type === 'default' ? dropdownsSchema : decoratedDropdownsSchema }),
17
+ z.object({ anchors: type === 'default' ? anchorsSchema : decoratedAnchorsSchema }),
18
+ z.object({ groups: type === 'default' ? groupsSchema : decoratedGroupsSchema }),
19
+ z.object({ pages: type === 'default' ? pagesSchema : decoratedPagesSchema }),
20
+ ]))
21
21
  .describe('The navigation structure of the content');
22
+ export const navigationSchema = createNavigationSchema('default');
23
+ export const decoratedNavigationSchema = createNavigationSchema('decorated');
@@ -1,267 +1,100 @@
1
1
  import { z } from 'zod';
2
- export declare const languageSchema: z.ZodIntersection<z.ZodObject<{
2
+ export declare const nonRecursiveLanguageSchema: z.ZodIntersection<z.ZodObject<{
3
3
  language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
4
4
  hidden: z.ZodOptional<z.ZodBoolean>;
5
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
5
6
  }, "strip", z.ZodTypeAny, {
6
7
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
7
8
  hidden?: boolean | undefined;
9
+ openapi?: string | string[] | undefined;
8
10
  }, {
9
11
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
10
12
  hidden?: boolean | undefined;
11
- }>, z.ZodUnion<[z.ZodObject<{
12
- openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>;
13
- }, "strip", z.ZodTypeAny, {
14
- openapi: (string | string[]) & (string | string[] | undefined);
15
- }, {
16
- openapi: (string | string[]) & (string | string[] | undefined);
13
+ openapi?: string | string[] | undefined;
17
14
  }>, z.ZodObject<{
18
15
  href: z.ZodString;
19
16
  }, "strip", z.ZodTypeAny, {
20
17
  href: string;
21
18
  }, {
22
19
  href: string;
23
- }>, z.ZodLazy<z.ZodObject<{
24
- versions: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
25
- }, "strip", z.ZodTypeAny, {
26
- versions: any[];
27
- }, {
28
- versions: any[];
29
- }>>, z.ZodLazy<z.ZodObject<{
30
- tabs: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
31
- }, "strip", z.ZodTypeAny, {
32
- tabs: any[];
33
- }, {
34
- tabs: any[];
35
- }>>, z.ZodLazy<z.ZodObject<{
36
- dropdowns: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
37
- }, "strip", z.ZodTypeAny, {
38
- dropdowns: any[];
39
- }, {
40
- dropdowns: any[];
41
- }>>, z.ZodLazy<z.ZodObject<{
42
- anchors: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
43
- }, "strip", z.ZodTypeAny, {
44
- anchors: any[];
45
- }, {
46
- anchors: any[];
47
- }>>, z.ZodLazy<z.ZodObject<{
48
- groups: z.ZodArray<z.ZodIntersection<z.ZodObject<{
49
- group: z.ZodString;
50
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
51
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
52
- name: z.ZodEffects<z.ZodString, string, string>;
53
- }, "strip", z.ZodTypeAny, {
54
- name: string;
55
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
56
- }, {
57
- name: string;
58
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
59
- }>]>>;
60
- hidden: z.ZodOptional<z.ZodBoolean>;
61
- root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
62
- }, "strip", z.ZodTypeAny, {
63
- group: string;
64
- icon?: string | {
65
- name: string;
66
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
67
- } | undefined;
68
- hidden?: boolean | undefined;
69
- root?: string | undefined;
70
- }, {
71
- group: string;
72
- icon?: string | {
73
- name: string;
74
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
75
- } | undefined;
76
- hidden?: boolean | undefined;
77
- root?: string | undefined;
78
- }>, z.ZodUnion<[z.ZodObject<{
79
- openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>;
80
- }, "strip", z.ZodTypeAny, {
81
- openapi: (string | string[]) & (string | string[] | undefined);
82
- }, {
83
- openapi: (string | string[]) & (string | string[] | undefined);
84
- }>, z.ZodLazy<z.ZodObject<{
85
- pages: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
86
- }, "strip", z.ZodTypeAny, {
87
- pages: any[];
88
- }, {
89
- pages: any[];
90
- }>>]>>, "many">;
20
+ }>>;
21
+ export declare const languageSchema: z.ZodIntersection<z.ZodObject<{
22
+ language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
23
+ hidden: z.ZodOptional<z.ZodBoolean>;
24
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
91
25
  }, "strip", z.ZodTypeAny, {
92
- groups: ({
93
- group: string;
94
- icon?: string | {
95
- name: string;
96
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
97
- } | undefined;
98
- hidden?: boolean | undefined;
99
- root?: string | undefined;
100
- } & ({
101
- openapi: (string | string[]) & (string | string[] | undefined);
102
- } | {
103
- pages: any[];
104
- }))[];
26
+ language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
27
+ hidden?: boolean | undefined;
28
+ openapi?: string | string[] | undefined;
105
29
  }, {
106
- groups: ({
107
- group: string;
108
- icon?: string | {
109
- name: string;
110
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
111
- } | undefined;
112
- hidden?: boolean | undefined;
113
- root?: string | undefined;
114
- } & ({
115
- openapi: (string | string[]) & (string | string[] | undefined);
116
- } | {
117
- pages: any[];
118
- }))[];
119
- }>>, z.ZodLazy<z.ZodObject<{
120
- pages: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
30
+ language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
31
+ hidden?: boolean | undefined;
32
+ openapi?: string | string[] | undefined;
33
+ }>, z.ZodUnion<[z.ZodObject<{
34
+ href: z.ZodString;
121
35
  }, "strip", z.ZodTypeAny, {
122
- pages: any[];
36
+ href: string;
123
37
  }, {
124
- pages: any[];
125
- }>>]>>;
126
- export declare const nonRecursiveLanguageSchema: z.ZodIntersection<z.ZodObject<{
38
+ href: string;
39
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>;
40
+ export declare const decoratedLanguageSchema: z.ZodIntersection<z.ZodObject<{
127
41
  language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
128
42
  hidden: z.ZodOptional<z.ZodBoolean>;
43
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
129
44
  }, "strip", z.ZodTypeAny, {
130
45
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
131
46
  hidden?: boolean | undefined;
47
+ openapi?: string | string[] | undefined;
132
48
  }, {
133
49
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
134
50
  hidden?: boolean | undefined;
135
- }>, z.ZodObject<{
51
+ openapi?: string | string[] | undefined;
52
+ }>, z.ZodUnion<[z.ZodObject<{
136
53
  href: z.ZodString;
137
54
  }, "strip", z.ZodTypeAny, {
138
55
  href: string;
139
56
  }, {
140
57
  href: string;
141
- }>>;
58
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>;
142
59
  export declare const languagesSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
143
60
  language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
144
61
  hidden: z.ZodOptional<z.ZodBoolean>;
62
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
145
63
  }, "strip", z.ZodTypeAny, {
146
64
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
147
65
  hidden?: boolean | undefined;
66
+ openapi?: string | string[] | undefined;
148
67
  }, {
149
68
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
150
69
  hidden?: boolean | undefined;
70
+ openapi?: string | string[] | undefined;
151
71
  }>, z.ZodUnion<[z.ZodObject<{
152
- openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>;
153
- }, "strip", z.ZodTypeAny, {
154
- openapi: (string | string[]) & (string | string[] | undefined);
155
- }, {
156
- openapi: (string | string[]) & (string | string[] | undefined);
157
- }>, z.ZodObject<{
158
72
  href: z.ZodString;
159
73
  }, "strip", z.ZodTypeAny, {
160
74
  href: string;
161
75
  }, {
162
76
  href: string;
163
- }>, z.ZodLazy<z.ZodObject<{
164
- versions: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
165
- }, "strip", z.ZodTypeAny, {
166
- versions: any[];
167
- }, {
168
- versions: any[];
169
- }>>, z.ZodLazy<z.ZodObject<{
170
- tabs: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
171
- }, "strip", z.ZodTypeAny, {
172
- tabs: any[];
173
- }, {
174
- tabs: any[];
175
- }>>, z.ZodLazy<z.ZodObject<{
176
- dropdowns: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
177
- }, "strip", z.ZodTypeAny, {
178
- dropdowns: any[];
179
- }, {
180
- dropdowns: any[];
181
- }>>, z.ZodLazy<z.ZodObject<{
182
- anchors: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
183
- }, "strip", z.ZodTypeAny, {
184
- anchors: any[];
185
- }, {
186
- anchors: any[];
187
- }>>, z.ZodLazy<z.ZodObject<{
188
- groups: z.ZodArray<z.ZodIntersection<z.ZodObject<{
189
- group: z.ZodString;
190
- icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
191
- style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
192
- name: z.ZodEffects<z.ZodString, string, string>;
193
- }, "strip", z.ZodTypeAny, {
194
- name: string;
195
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
196
- }, {
197
- name: string;
198
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
199
- }>]>>;
200
- hidden: z.ZodOptional<z.ZodBoolean>;
201
- root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
202
- }, "strip", z.ZodTypeAny, {
203
- group: string;
204
- icon?: string | {
205
- name: string;
206
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
207
- } | undefined;
208
- hidden?: boolean | undefined;
209
- root?: string | undefined;
210
- }, {
211
- group: string;
212
- icon?: string | {
213
- name: string;
214
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
215
- } | undefined;
216
- hidden?: boolean | undefined;
217
- root?: string | undefined;
218
- }>, z.ZodUnion<[z.ZodObject<{
219
- openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>;
220
- }, "strip", z.ZodTypeAny, {
221
- openapi: (string | string[]) & (string | string[] | undefined);
222
- }, {
223
- openapi: (string | string[]) & (string | string[] | undefined);
224
- }>, z.ZodLazy<z.ZodObject<{
225
- pages: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
226
- }, "strip", z.ZodTypeAny, {
227
- pages: any[];
228
- }, {
229
- pages: any[];
230
- }>>]>>, "many">;
77
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, "many">;
78
+ export declare const decoratedLanguagesSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
79
+ language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
80
+ hidden: z.ZodOptional<z.ZodBoolean>;
81
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
231
82
  }, "strip", z.ZodTypeAny, {
232
- groups: ({
233
- group: string;
234
- icon?: string | {
235
- name: string;
236
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
237
- } | undefined;
238
- hidden?: boolean | undefined;
239
- root?: string | undefined;
240
- } & ({
241
- openapi: (string | string[]) & (string | string[] | undefined);
242
- } | {
243
- pages: any[];
244
- }))[];
83
+ language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
84
+ hidden?: boolean | undefined;
85
+ openapi?: string | string[] | undefined;
245
86
  }, {
246
- groups: ({
247
- group: string;
248
- icon?: string | {
249
- name: string;
250
- style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
251
- } | undefined;
252
- hidden?: boolean | undefined;
253
- root?: string | undefined;
254
- } & ({
255
- openapi: (string | string[]) & (string | string[] | undefined);
256
- } | {
257
- pages: any[];
258
- }))[];
259
- }>>, z.ZodLazy<z.ZodObject<{
260
- pages: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
87
+ language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
88
+ hidden?: boolean | undefined;
89
+ openapi?: string | string[] | undefined;
90
+ }>, z.ZodUnion<[z.ZodObject<{
91
+ href: z.ZodString;
261
92
  }, "strip", z.ZodTypeAny, {
262
- pages: any[];
93
+ href: string;
263
94
  }, {
264
- pages: any[];
265
- }>>]>>, "many">;
95
+ href: string;
96
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, "many">;
266
97
  export type LanguagesConfig = z.infer<typeof languagesSchema>;
267
98
  export type LanguageConfig = z.infer<typeof languageSchema>;
99
+ export type DecoratedLanguagesConfig = z.infer<typeof decoratedLanguagesSchema>;
100
+ export type DecoratedLanguageConfig = z.infer<typeof decoratedLanguageSchema>;
@@ -2,32 +2,24 @@ import { z } from 'zod';
2
2
  import { hiddenSchema } from '../reusable/hidden.js';
3
3
  import { hrefSchema } from '../reusable/href.js';
4
4
  import { openApiSchema } from '../reusable/openapi.js';
5
- import { anchorsSchema } from './anchors.js';
6
- import { dropdownsSchema } from './dropdown.js';
7
- import { groupsSchema } from './groups.js';
8
- import { pagesSchema } from './pages.js';
9
- import { tabsSchema } from './tabs.js';
10
- import { versionsSchema } from './version.js';
5
+ import { getDivisionSchemasExcluding, registerDivisionSchema } from './divisionSchemas.js';
11
6
  const baseLanguageSchema = z.object({
12
7
  language: z
13
8
  .enum(['en', 'cn', 'es', 'fr', 'jp', 'pt', 'pt-BR', 'de'])
14
9
  .describe('The name of the language in the ISO 639-1 format'),
15
10
  hidden: hiddenSchema.optional(),
11
+ openapi: openApiSchema.optional(),
16
12
  });
17
- export const languageSchema = baseLanguageSchema
18
- .and(z.union([
19
- z.object({ openapi: openApiSchema }),
20
- z.object({ href: hrefSchema }),
21
- z.lazy(() => z.object({ versions: versionsSchema })),
22
- z.lazy(() => z.object({ tabs: tabsSchema })),
23
- z.lazy(() => z.object({ dropdowns: dropdownsSchema })),
24
- z.lazy(() => z.object({ anchors: anchorsSchema })),
25
- z.lazy(() => z.object({ groups: groupsSchema })),
26
- z.lazy(() => z.object({ pages: pagesSchema })),
27
- ]))
28
- .describe('Organizing by languages');
13
+ const createLanguageSchema = (type) => baseLanguageSchema.and(z.union([z.object({ href: hrefSchema }), ...getDivisionSchemasExcluding('languages', type)]));
29
14
  export const nonRecursiveLanguageSchema = baseLanguageSchema.and(z.object({ href: hrefSchema }));
15
+ export const languageSchema = createLanguageSchema('default');
16
+ export const decoratedLanguageSchema = createLanguageSchema('decorated');
30
17
  export const languagesSchema = z
31
18
  .array(languageSchema)
32
19
  .min(1, 'At least one language must be specified')
33
20
  .describe('Organizing by languages');
21
+ export const decoratedLanguagesSchema = z
22
+ .array(decoratedLanguageSchema)
23
+ .describe('Organizing by languages');
24
+ registerDivisionSchema('languages', languagesSchema, 'default');
25
+ registerDivisionSchema('languages', decoratedLanguagesSchema, 'decorated');
@@ -1,3 +1,7 @@
1
1
  import { z } from 'zod';
2
+ import { pageSchema } from '../reusable/page.js';
2
3
  export declare const pagesSchema: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
4
+ export declare const decoratedPagesSchema: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
5
+ export type PageConfig = z.infer<typeof pageSchema>;
3
6
  export type PagesConfig = z.infer<typeof pagesSchema>;
7
+ export type DecoratedPagesConfig = z.infer<typeof decoratedPagesSchema>;
@@ -1,5 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { pageSchema } from '../reusable/page.js';
3
- import { groupSchema } from './groups.js';
2
+ import { decoratedPageSchema, pageSchema } from '../reusable/page.js';
3
+ import { decoratedGroupSchema, groupSchema } from './groups.js';
4
4
  const pageOrGroupSchema = z.lazy(() => z.union([pageSchema, groupSchema]));
5
+ const decoratedPageOrGroupSchema = z.lazy(() => z.union([decoratedPageSchema, decoratedGroupSchema]));
5
6
  export const pagesSchema = z.array(pageOrGroupSchema).describe('An array of page paths or groups');
7
+ export const decoratedPagesSchema = z
8
+ .array(decoratedPageOrGroupSchema)
9
+ .describe('An array of page metadata or groups');
@@ -1,5 +1,4 @@
1
1
  import { z } from 'zod';
2
- export declare const tabSchema: z.ZodType;
3
2
  export declare const nonRecursiveTabSchema: z.ZodIntersection<z.ZodObject<{
4
3
  tab: z.ZodString;
5
4
  icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
@@ -13,6 +12,7 @@ export declare const nonRecursiveTabSchema: z.ZodIntersection<z.ZodObject<{
13
12
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
14
13
  }>]>>;
15
14
  hidden: z.ZodOptional<z.ZodBoolean>;
15
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  tab: string;
18
18
  icon?: string | {
@@ -20,6 +20,7 @@ export declare const nonRecursiveTabSchema: z.ZodIntersection<z.ZodObject<{
20
20
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
21
21
  } | undefined;
22
22
  hidden?: boolean | undefined;
23
+ openapi?: string | string[] | undefined;
23
24
  }, {
24
25
  tab: string;
25
26
  icon?: string | {
@@ -27,6 +28,7 @@ export declare const nonRecursiveTabSchema: z.ZodIntersection<z.ZodObject<{
27
28
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
28
29
  } | undefined;
29
30
  hidden?: boolean | undefined;
31
+ openapi?: string | string[] | undefined;
30
32
  }>, z.ZodObject<{
31
33
  href: z.ZodString;
32
34
  }, "strip", z.ZodTypeAny, {
@@ -34,6 +36,155 @@ export declare const nonRecursiveTabSchema: z.ZodIntersection<z.ZodObject<{
34
36
  }, {
35
37
  href: string;
36
38
  }>>;
37
- export declare const tabsSchema: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
39
+ export declare const tabSchema: z.ZodIntersection<z.ZodObject<{
40
+ tab: z.ZodString;
41
+ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
42
+ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
43
+ name: z.ZodEffects<z.ZodString, string, string>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ name: string;
46
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
47
+ }, {
48
+ name: string;
49
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
50
+ }>]>>;
51
+ hidden: z.ZodOptional<z.ZodBoolean>;
52
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ tab: string;
55
+ icon?: string | {
56
+ name: string;
57
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
58
+ } | undefined;
59
+ hidden?: boolean | undefined;
60
+ openapi?: string | string[] | undefined;
61
+ }, {
62
+ tab: string;
63
+ icon?: string | {
64
+ name: string;
65
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
66
+ } | undefined;
67
+ hidden?: boolean | undefined;
68
+ openapi?: string | string[] | undefined;
69
+ }>, z.ZodUnion<[z.ZodObject<{
70
+ href: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ href: string;
73
+ }, {
74
+ href: string;
75
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>;
76
+ export declare const decoratedTabSchema: z.ZodIntersection<z.ZodObject<{
77
+ tab: z.ZodString;
78
+ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
79
+ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
80
+ name: z.ZodEffects<z.ZodString, string, string>;
81
+ }, "strip", z.ZodTypeAny, {
82
+ name: string;
83
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
84
+ }, {
85
+ name: string;
86
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
87
+ }>]>>;
88
+ hidden: z.ZodOptional<z.ZodBoolean>;
89
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ tab: string;
92
+ icon?: string | {
93
+ name: string;
94
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
95
+ } | undefined;
96
+ hidden?: boolean | undefined;
97
+ openapi?: string | string[] | undefined;
98
+ }, {
99
+ tab: string;
100
+ icon?: string | {
101
+ name: string;
102
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
103
+ } | undefined;
104
+ hidden?: boolean | undefined;
105
+ openapi?: string | string[] | undefined;
106
+ }>, z.ZodUnion<[z.ZodObject<{
107
+ href: z.ZodString;
108
+ }, "strip", z.ZodTypeAny, {
109
+ href: string;
110
+ }, {
111
+ href: string;
112
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>;
113
+ export declare const tabsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
114
+ tab: z.ZodString;
115
+ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
116
+ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
117
+ name: z.ZodEffects<z.ZodString, string, string>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ name: string;
120
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
121
+ }, {
122
+ name: string;
123
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
124
+ }>]>>;
125
+ hidden: z.ZodOptional<z.ZodBoolean>;
126
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ tab: string;
129
+ icon?: string | {
130
+ name: string;
131
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
132
+ } | undefined;
133
+ hidden?: boolean | undefined;
134
+ openapi?: string | string[] | undefined;
135
+ }, {
136
+ tab: string;
137
+ icon?: string | {
138
+ name: string;
139
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
140
+ } | undefined;
141
+ hidden?: boolean | undefined;
142
+ openapi?: string | string[] | undefined;
143
+ }>, z.ZodUnion<[z.ZodObject<{
144
+ href: z.ZodString;
145
+ }, "strip", z.ZodTypeAny, {
146
+ href: string;
147
+ }, {
148
+ href: string;
149
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, "many">;
150
+ export declare const decoratedTabsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
151
+ tab: z.ZodString;
152
+ icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
153
+ style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
154
+ name: z.ZodEffects<z.ZodString, string, string>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ name: string;
157
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
158
+ }, {
159
+ name: string;
160
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
161
+ }>]>>;
162
+ hidden: z.ZodOptional<z.ZodBoolean>;
163
+ openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ tab: string;
166
+ icon?: string | {
167
+ name: string;
168
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
169
+ } | undefined;
170
+ hidden?: boolean | undefined;
171
+ openapi?: string | string[] | undefined;
172
+ }, {
173
+ tab: string;
174
+ icon?: string | {
175
+ name: string;
176
+ style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
177
+ } | undefined;
178
+ hidden?: boolean | undefined;
179
+ openapi?: string | string[] | undefined;
180
+ }>, z.ZodUnion<[z.ZodObject<{
181
+ href: z.ZodString;
182
+ }, "strip", z.ZodTypeAny, {
183
+ href: string;
184
+ }, {
185
+ href: string;
186
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, ...z.ZodType<any, z.ZodTypeDef, any>[]]>>, "many">;
38
187
  export type TabsConfig = z.infer<typeof tabsSchema>;
39
188
  export type TabConfig = z.infer<typeof tabSchema>;
189
+ export type DecoratedTabsConfig = z.infer<typeof decoratedTabsSchema>;
190
+ export type DecoratedTabConfig = z.infer<typeof decoratedTabSchema>;
@@ -3,26 +3,18 @@ import { hiddenSchema } from '../reusable/hidden.js';
3
3
  import { hrefSchema } from '../reusable/href.js';
4
4
  import { iconSchema } from '../reusable/icon.js';
5
5
  import { openApiSchema } from '../reusable/openapi.js';
6
- import { anchorsSchema } from './anchors.js';
7
- import { dropdownsSchema } from './dropdown.js';
8
- import { groupsSchema } from './groups.js';
9
- import { languagesSchema } from './languages.js';
10
- import { pagesSchema } from './pages.js';
11
- import { versionsSchema } from './version.js';
6
+ import { getDivisionSchemasExcluding, registerDivisionSchema } from './divisionSchemas.js';
12
7
  const baseTabSchema = z.object({
13
8
  tab: z.string().nonempty().describe('The name of the tab'),
14
9
  icon: iconSchema.optional(),
15
10
  hidden: hiddenSchema.optional(),
11
+ openapi: openApiSchema.optional(),
16
12
  });
17
- export const tabSchema = baseTabSchema.and(z.union([
18
- z.object({ openapi: openApiSchema }),
19
- z.object({ href: hrefSchema }),
20
- z.lazy(() => z.object({ languages: languagesSchema })),
21
- z.lazy(() => z.object({ versions: versionsSchema })),
22
- z.lazy(() => z.object({ dropdowns: dropdownsSchema })),
23
- z.lazy(() => z.object({ anchors: anchorsSchema })),
24
- z.lazy(() => z.object({ groups: groupsSchema })),
25
- z.lazy(() => z.object({ pages: pagesSchema })),
26
- ]));
13
+ const createTabSchema = (type) => baseTabSchema.and(z.union([z.object({ href: hrefSchema }), ...getDivisionSchemasExcluding('tabs', type)]));
27
14
  export const nonRecursiveTabSchema = baseTabSchema.and(z.object({ href: hrefSchema }));
15
+ export const tabSchema = createTabSchema('default');
16
+ export const decoratedTabSchema = createTabSchema('decorated');
28
17
  export const tabsSchema = z.array(tabSchema).describe('Organizing by tabs');
18
+ export const decoratedTabsSchema = z.array(decoratedTabSchema).describe('Organizing by tabs');
19
+ registerDivisionSchema('tabs', tabsSchema, 'default');
20
+ registerDivisionSchema('tabs', decoratedTabsSchema, 'decorated');