@mintlify/validation 0.1.263 → 0.1.265
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.
- package/dist/index.js +42 -1
- package/dist/mint-config/schemas/v2/index.d.ts +640 -340
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +1 -2
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +33 -15
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +1 -2
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +30 -14
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +96 -17
- package/dist/mint-config/schemas/v2/properties/navigation/groups.js +15 -6
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +68 -32
- package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +1 -2
- package/dist/mint-config/schemas/v2/properties/navigation/languages.js +28 -13
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +1 -2
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +37 -16
- package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +1 -2
- package/dist/mint-config/schemas/v2/properties/navigation/version.js +34 -15
- package/dist/mint-config/schemas/v2/themes/linden.d.ts +128 -68
- package/dist/mint-config/schemas/v2/themes/maple.d.ts +128 -68
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +128 -68
- package/dist/mint-config/schemas/v2/themes/palm.d.ts +128 -68
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +68 -32
- package/dist/mint-config/schemas/v2/themes/willow.d.ts +128 -68
- package/dist/mint-config/validateConfig.d.ts +300 -180
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AnchorNavigation } from './divisionNav.js';
|
|
3
|
-
declare const baseAnchorSchema: z.ZodObject<{
|
|
3
|
+
export declare const baseAnchorSchema: z.ZodObject<{
|
|
4
4
|
anchor: z.ZodString;
|
|
5
5
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
6
6
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -107,4 +107,3 @@ export type AnchorsConfig = z.infer<typeof anchorsSchema>;
|
|
|
107
107
|
export type AnchorConfig = z.infer<typeof anchorSchema>;
|
|
108
108
|
export type DecoratedAnchorConfig = z.infer<typeof decoratedAnchorSchema>;
|
|
109
109
|
export type DecoratedAnchorsConfig = z.infer<typeof decoratedAnchorsSchema>;
|
|
110
|
-
export {};
|
|
@@ -10,25 +10,40 @@ import { decoratedLanguagesSchema, languagesSchema } from './languages.js';
|
|
|
10
10
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
11
11
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
12
12
|
import { decoratedVersionsSchema, versionsSchema } from './version.js';
|
|
13
|
-
const baseAnchorSchema = z.object({
|
|
13
|
+
export const baseAnchorSchema = z.object({
|
|
14
14
|
anchor: z.string().nonempty().describe('The name of the anchor'),
|
|
15
15
|
icon: iconSchema.optional(),
|
|
16
16
|
color: colorSchemaWithOptionalLightAndDark.optional(),
|
|
17
17
|
hidden: hiddenSchema.optional(),
|
|
18
18
|
});
|
|
19
|
-
export const anchorSchema =
|
|
20
|
-
.
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
export const anchorSchema = z.union([
|
|
20
|
+
baseAnchorSchema.extend({ openapi: openApiSchema }),
|
|
21
|
+
baseAnchorSchema.extend({ href: hrefSchema, openapi: openApiSchema.optional() }),
|
|
22
|
+
baseAnchorSchema.extend({
|
|
23
|
+
languages: z.lazy(() => languagesSchema),
|
|
24
|
+
openapi: openApiSchema.optional(),
|
|
25
|
+
}),
|
|
26
|
+
baseAnchorSchema.extend({
|
|
27
|
+
versions: z.lazy(() => versionsSchema),
|
|
28
|
+
openapi: openApiSchema.optional(),
|
|
29
|
+
}),
|
|
30
|
+
baseAnchorSchema.extend({
|
|
31
|
+
dropdowns: z.lazy(() => dropdownsSchema),
|
|
32
|
+
openapi: openApiSchema.optional(),
|
|
33
|
+
}),
|
|
34
|
+
baseAnchorSchema.extend({
|
|
35
|
+
tabs: z.lazy(() => tabsSchema),
|
|
36
|
+
openapi: openApiSchema.optional(),
|
|
37
|
+
}),
|
|
38
|
+
baseAnchorSchema.extend({
|
|
39
|
+
groups: z.lazy(() => groupsSchema),
|
|
40
|
+
openapi: openApiSchema.optional(),
|
|
41
|
+
}),
|
|
42
|
+
baseAnchorSchema.extend({
|
|
43
|
+
pages: z.lazy(() => pagesSchema),
|
|
44
|
+
openapi: openApiSchema.optional(),
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
32
47
|
export const decoratedAnchorSchema = baseAnchorSchema.and(z.union([
|
|
33
48
|
z.object({ href: hrefSchema }),
|
|
34
49
|
z.lazy(() => z.object({ languages: decoratedLanguagesSchema })),
|
|
@@ -39,7 +54,10 @@ export const decoratedAnchorSchema = baseAnchorSchema.and(z.union([
|
|
|
39
54
|
z.lazy(() => z.object({ pages: decoratedPagesSchema })),
|
|
40
55
|
]));
|
|
41
56
|
export const nonRecursiveAnchorSchema = baseAnchorSchema.and(z.object({ href: hrefSchema }));
|
|
42
|
-
export const anchorsSchema = z
|
|
57
|
+
export const anchorsSchema = z
|
|
58
|
+
.array(anchorSchema)
|
|
59
|
+
.min(1, 'At least one anchor must be specified')
|
|
60
|
+
.describe('Organizing by anchors');
|
|
43
61
|
export const decoratedAnchorsSchema = z
|
|
44
62
|
.array(decoratedAnchorSchema)
|
|
45
63
|
.describe('Organizing by anchors');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DropdownNavigation } from './divisionNav.js';
|
|
3
|
-
declare const baseDropdownSchema: z.ZodObject<{
|
|
3
|
+
export declare const baseDropdownSchema: z.ZodObject<{
|
|
4
4
|
dropdown: z.ZodString;
|
|
5
5
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
6
6
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -71,4 +71,3 @@ export type DropdownConfig = z.infer<typeof dropdownSchema>;
|
|
|
71
71
|
export type DropdownsConfig = z.infer<typeof dropdownsSchema>;
|
|
72
72
|
export type DecoratedDropdownConfig = z.infer<typeof decoratedDropdownSchema>;
|
|
73
73
|
export type DecoratedDropdownsConfig = z.infer<typeof decoratedDropdownsSchema>;
|
|
74
|
-
export {};
|
|
@@ -9,24 +9,39 @@ import { decoratedLanguagesSchema, languagesSchema } from './languages.js';
|
|
|
9
9
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
10
10
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
11
11
|
import { decoratedVersionsSchema, versionsSchema } from './version.js';
|
|
12
|
-
const baseDropdownSchema = z.object({
|
|
12
|
+
export const baseDropdownSchema = z.object({
|
|
13
13
|
dropdown: z.string().nonempty().describe('The name of the dropdown'),
|
|
14
14
|
icon: iconSchema.optional(),
|
|
15
15
|
hidden: hiddenSchema.optional(),
|
|
16
16
|
});
|
|
17
|
-
export const dropdownSchema =
|
|
18
|
-
.
|
|
19
|
-
.
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
export const dropdownSchema = z.union([
|
|
18
|
+
baseDropdownSchema.extend({ openapi: openApiSchema }),
|
|
19
|
+
baseDropdownSchema.extend({ href: hrefSchema, openapi: openApiSchema.optional() }),
|
|
20
|
+
baseDropdownSchema.extend({
|
|
21
|
+
languages: z.lazy(() => languagesSchema),
|
|
22
|
+
openapi: openApiSchema.optional(),
|
|
23
|
+
}),
|
|
24
|
+
baseDropdownSchema.extend({
|
|
25
|
+
versions: z.lazy(() => versionsSchema),
|
|
26
|
+
openapi: openApiSchema.optional(),
|
|
27
|
+
}),
|
|
28
|
+
baseDropdownSchema.extend({
|
|
29
|
+
tabs: z.lazy(() => tabsSchema),
|
|
30
|
+
openapi: openApiSchema.optional(),
|
|
31
|
+
}),
|
|
32
|
+
baseDropdownSchema.extend({
|
|
33
|
+
anchors: z.lazy(() => anchorsSchema),
|
|
34
|
+
openapi: openApiSchema.optional(),
|
|
35
|
+
}),
|
|
36
|
+
baseDropdownSchema.extend({
|
|
37
|
+
groups: z.lazy(() => groupsSchema),
|
|
38
|
+
openapi: openApiSchema.optional(),
|
|
39
|
+
}),
|
|
40
|
+
baseDropdownSchema.extend({
|
|
41
|
+
pages: z.lazy(() => pagesSchema),
|
|
42
|
+
openapi: openApiSchema.optional(),
|
|
43
|
+
}),
|
|
44
|
+
]);
|
|
30
45
|
export const decoratedDropdownSchema = baseDropdownSchema.and(z.union([
|
|
31
46
|
z.object({ href: hrefSchema }),
|
|
32
47
|
z.lazy(() => z.object({ languages: decoratedLanguagesSchema })),
|
|
@@ -40,4 +55,5 @@ export const nonRecursiveDropdownSchema = baseDropdownSchema.and(z.object({ href
|
|
|
40
55
|
export const dropdownsSchema = z.array(dropdownSchema).describe('Organizing by dropdowns');
|
|
41
56
|
export const decoratedDropdownsSchema = z
|
|
42
57
|
.array(decoratedDropdownSchema)
|
|
58
|
+
.min(1, 'At least one dropdown must be specified')
|
|
43
59
|
.describe('Organizing by dropdowns');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const baseGroupSchema: z.ZodObject<{
|
|
3
3
|
group: z.ZodString;
|
|
4
4
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
5
5
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -29,7 +29,21 @@ export declare const groupSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
29
29
|
} | undefined;
|
|
30
30
|
hidden?: boolean | undefined;
|
|
31
31
|
root?: string | undefined;
|
|
32
|
-
}
|
|
32
|
+
}>;
|
|
33
|
+
export declare const groupSchema: z.ZodUnion<[z.ZodObject<{
|
|
34
|
+
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
35
|
+
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
36
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
name: string;
|
|
39
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
40
|
+
}, {
|
|
41
|
+
name: string;
|
|
42
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
43
|
+
}>]>>;
|
|
44
|
+
group: z.ZodString;
|
|
45
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
33
47
|
openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
|
|
34
48
|
source: z.ZodEffects<z.ZodString, string, string>;
|
|
35
49
|
directory: z.ZodOptional<z.ZodString>;
|
|
@@ -48,6 +62,13 @@ export declare const groupSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
48
62
|
source: string;
|
|
49
63
|
directory?: string | undefined;
|
|
50
64
|
} | undefined);
|
|
65
|
+
group: string;
|
|
66
|
+
icon?: string | {
|
|
67
|
+
name: string;
|
|
68
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
69
|
+
} | undefined;
|
|
70
|
+
hidden?: boolean | undefined;
|
|
71
|
+
root?: string | undefined;
|
|
51
72
|
}, {
|
|
52
73
|
openapi: (string | string[] | {
|
|
53
74
|
source: string;
|
|
@@ -56,15 +77,14 @@ export declare const groupSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
56
77
|
source: string;
|
|
57
78
|
directory?: string | undefined;
|
|
58
79
|
} | undefined);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
group: z.ZodString;
|
|
80
|
+
group: string;
|
|
81
|
+
icon?: string | {
|
|
82
|
+
name: string;
|
|
83
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
hidden?: boolean | undefined;
|
|
86
|
+
root?: string | undefined;
|
|
87
|
+
}>, z.ZodObject<{
|
|
68
88
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
69
89
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
70
90
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -75,6 +95,7 @@ export declare const decoratedGroupSchema: z.ZodObject<{
|
|
|
75
95
|
name: string;
|
|
76
96
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
77
97
|
}>]>>;
|
|
98
|
+
group: z.ZodString;
|
|
78
99
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
79
100
|
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
80
101
|
pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
@@ -96,8 +117,8 @@ export declare const decoratedGroupSchema: z.ZodObject<{
|
|
|
96
117
|
} | undefined;
|
|
97
118
|
hidden?: boolean | undefined;
|
|
98
119
|
root?: string | undefined;
|
|
99
|
-
}>;
|
|
100
|
-
export declare const
|
|
120
|
+
}>]>;
|
|
121
|
+
export declare const decoratedGroupSchema: z.ZodObject<{
|
|
101
122
|
group: z.ZodString;
|
|
102
123
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
103
124
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -111,8 +132,10 @@ export declare const groupsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
|
111
132
|
}>]>>;
|
|
112
133
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
113
134
|
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
135
|
+
pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
114
136
|
}, "strip", z.ZodTypeAny, {
|
|
115
137
|
group: string;
|
|
138
|
+
pages: any[];
|
|
116
139
|
icon?: string | {
|
|
117
140
|
name: string;
|
|
118
141
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
@@ -121,13 +144,28 @@ export declare const groupsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
|
121
144
|
root?: string | undefined;
|
|
122
145
|
}, {
|
|
123
146
|
group: string;
|
|
147
|
+
pages: any[];
|
|
124
148
|
icon?: string | {
|
|
125
149
|
name: string;
|
|
126
150
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
127
151
|
} | undefined;
|
|
128
152
|
hidden?: boolean | undefined;
|
|
129
153
|
root?: string | undefined;
|
|
130
|
-
}
|
|
154
|
+
}>;
|
|
155
|
+
export declare const groupsSchema: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
156
|
+
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
157
|
+
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
158
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
name: string;
|
|
161
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
162
|
+
}, {
|
|
163
|
+
name: string;
|
|
164
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
165
|
+
}>]>>;
|
|
166
|
+
group: z.ZodString;
|
|
167
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
131
169
|
openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
|
|
132
170
|
source: z.ZodEffects<z.ZodString, string, string>;
|
|
133
171
|
directory: z.ZodOptional<z.ZodString>;
|
|
@@ -146,6 +184,13 @@ export declare const groupsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
|
146
184
|
source: string;
|
|
147
185
|
directory?: string | undefined;
|
|
148
186
|
} | undefined);
|
|
187
|
+
group: string;
|
|
188
|
+
icon?: string | {
|
|
189
|
+
name: string;
|
|
190
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
191
|
+
} | undefined;
|
|
192
|
+
hidden?: boolean | undefined;
|
|
193
|
+
root?: string | undefined;
|
|
149
194
|
}, {
|
|
150
195
|
openapi: (string | string[] | {
|
|
151
196
|
source: string;
|
|
@@ -154,13 +199,47 @@ export declare const groupsSchema: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
|
154
199
|
source: string;
|
|
155
200
|
directory?: string | undefined;
|
|
156
201
|
} | undefined);
|
|
157
|
-
|
|
158
|
-
|
|
202
|
+
group: string;
|
|
203
|
+
icon?: string | {
|
|
204
|
+
name: string;
|
|
205
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
hidden?: boolean | undefined;
|
|
208
|
+
root?: string | undefined;
|
|
209
|
+
}>, z.ZodObject<{
|
|
210
|
+
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
211
|
+
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
212
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
213
|
+
}, "strip", z.ZodTypeAny, {
|
|
214
|
+
name: string;
|
|
215
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
name: string;
|
|
218
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
219
|
+
}>]>>;
|
|
220
|
+
group: z.ZodString;
|
|
221
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
223
|
+
pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
159
224
|
}, "strip", z.ZodTypeAny, {
|
|
225
|
+
group: string;
|
|
160
226
|
pages: any[];
|
|
227
|
+
icon?: string | {
|
|
228
|
+
name: string;
|
|
229
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
230
|
+
} | undefined;
|
|
231
|
+
hidden?: boolean | undefined;
|
|
232
|
+
root?: string | undefined;
|
|
161
233
|
}, {
|
|
234
|
+
group: string;
|
|
162
235
|
pages: any[];
|
|
163
|
-
|
|
236
|
+
icon?: string | {
|
|
237
|
+
name: string;
|
|
238
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
239
|
+
} | undefined;
|
|
240
|
+
hidden?: boolean | undefined;
|
|
241
|
+
root?: string | undefined;
|
|
242
|
+
}>]>, "many">;
|
|
164
243
|
export declare const decoratedGroupsSchema: z.ZodArray<z.ZodObject<{
|
|
165
244
|
group: z.ZodString;
|
|
166
245
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
@@ -4,14 +4,17 @@ import { iconSchema } from '../reusable/icon.js';
|
|
|
4
4
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
5
5
|
import { pageSchema } from '../reusable/page.js';
|
|
6
6
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
7
|
-
export const
|
|
8
|
-
.object({
|
|
7
|
+
export const baseGroupSchema = z.object({
|
|
9
8
|
group: z.string().nonempty().describe('The name of the group'),
|
|
10
9
|
icon: iconSchema.optional(),
|
|
11
10
|
hidden: hiddenSchema.optional(),
|
|
12
11
|
root: pageSchema.optional(),
|
|
13
|
-
})
|
|
14
|
-
|
|
12
|
+
});
|
|
13
|
+
export const groupSchema = z
|
|
14
|
+
.union([
|
|
15
|
+
baseGroupSchema.extend({ openapi: openApiSchema }),
|
|
16
|
+
baseGroupSchema.extend({ pages: z.lazy(() => pagesSchema) }),
|
|
17
|
+
])
|
|
15
18
|
.describe('Organizing by groups');
|
|
16
19
|
export const decoratedGroupSchema = z
|
|
17
20
|
.object({
|
|
@@ -22,5 +25,11 @@ export const decoratedGroupSchema = z
|
|
|
22
25
|
pages: z.lazy(() => decoratedPagesSchema),
|
|
23
26
|
})
|
|
24
27
|
.describe('Organizing by groups');
|
|
25
|
-
export const groupsSchema = z
|
|
26
|
-
|
|
28
|
+
export const groupsSchema = z
|
|
29
|
+
.array(groupSchema)
|
|
30
|
+
.min(1, 'At least one group must be specified')
|
|
31
|
+
.describe('Organizing by groups');
|
|
32
|
+
export const decoratedGroupsSchema = z
|
|
33
|
+
.array(decoratedGroupSchema)
|
|
34
|
+
.min(1, 'At least one group must be specified')
|
|
35
|
+
.describe('Organizing by groups');
|
|
@@ -36,8 +36,7 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
36
36
|
}, {
|
|
37
37
|
anchors: import("./divisionNav.js").AnchorNavigation<"default">[];
|
|
38
38
|
}>, z.ZodObject<{
|
|
39
|
-
groups: z.ZodArray<z.
|
|
40
|
-
group: z.ZodString;
|
|
39
|
+
groups: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
41
40
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
42
41
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
43
42
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -48,25 +47,9 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
48
47
|
name: string;
|
|
49
48
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
50
49
|
}>]>>;
|
|
50
|
+
group: z.ZodString;
|
|
51
51
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
52
52
|
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
group: 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
|
-
root?: string | undefined;
|
|
61
|
-
}, {
|
|
62
|
-
group: 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
|
-
root?: string | undefined;
|
|
69
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
70
53
|
openapi: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, z.ZodObject<{
|
|
71
54
|
source: z.ZodEffects<z.ZodString, string, string>;
|
|
72
55
|
directory: z.ZodOptional<z.ZodString>;
|
|
@@ -85,6 +68,13 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
85
68
|
source: string;
|
|
86
69
|
directory?: string | undefined;
|
|
87
70
|
} | undefined);
|
|
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;
|
|
88
78
|
}, {
|
|
89
79
|
openapi: (string | string[] | {
|
|
90
80
|
source: string;
|
|
@@ -93,23 +83,49 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
93
83
|
source: string;
|
|
94
84
|
directory?: string | undefined;
|
|
95
85
|
} | undefined);
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
group: string;
|
|
87
|
+
icon?: string | {
|
|
88
|
+
name: string;
|
|
89
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
90
|
+
} | undefined;
|
|
91
|
+
hidden?: boolean | undefined;
|
|
92
|
+
root?: string | undefined;
|
|
93
|
+
}>, z.ZodObject<{
|
|
94
|
+
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
95
|
+
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
96
|
+
name: z.ZodEffects<z.ZodString, string, string>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
name: string;
|
|
99
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
100
|
+
}, {
|
|
101
|
+
name: string;
|
|
102
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
103
|
+
}>]>>;
|
|
104
|
+
group: z.ZodString;
|
|
105
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
root: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
107
|
+
pages: z.ZodLazy<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
98
108
|
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
group: string;
|
|
99
110
|
pages: any[];
|
|
111
|
+
icon?: string | {
|
|
112
|
+
name: string;
|
|
113
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
114
|
+
} | undefined;
|
|
115
|
+
hidden?: boolean | undefined;
|
|
116
|
+
root?: string | undefined;
|
|
100
117
|
}, {
|
|
101
|
-
pages: any[];
|
|
102
|
-
}>>]>>, "many">;
|
|
103
|
-
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
groups: ({
|
|
105
118
|
group: string;
|
|
119
|
+
pages: any[];
|
|
106
120
|
icon?: string | {
|
|
107
121
|
name: string;
|
|
108
122
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
109
123
|
} | undefined;
|
|
110
124
|
hidden?: boolean | undefined;
|
|
111
125
|
root?: string | undefined;
|
|
112
|
-
}
|
|
126
|
+
}>]>, "many">;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
groups: ({
|
|
113
129
|
openapi: (string | string[] | {
|
|
114
130
|
source: string;
|
|
115
131
|
directory?: string | undefined;
|
|
@@ -117,19 +133,25 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
117
133
|
source: string;
|
|
118
134
|
directory?: string | undefined;
|
|
119
135
|
} | undefined);
|
|
136
|
+
group: 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
|
+
root?: string | undefined;
|
|
120
143
|
} | {
|
|
121
|
-
pages: any[];
|
|
122
|
-
}))[];
|
|
123
|
-
}, {
|
|
124
|
-
groups: ({
|
|
125
144
|
group: string;
|
|
145
|
+
pages: any[];
|
|
126
146
|
icon?: string | {
|
|
127
147
|
name: string;
|
|
128
148
|
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
129
149
|
} | undefined;
|
|
130
150
|
hidden?: boolean | undefined;
|
|
131
151
|
root?: string | undefined;
|
|
132
|
-
}
|
|
152
|
+
})[];
|
|
153
|
+
}, {
|
|
154
|
+
groups: ({
|
|
133
155
|
openapi: (string | string[] | {
|
|
134
156
|
source: string;
|
|
135
157
|
directory?: string | undefined;
|
|
@@ -137,9 +159,23 @@ export declare const navigationSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject
|
|
|
137
159
|
source: string;
|
|
138
160
|
directory?: string | undefined;
|
|
139
161
|
} | undefined);
|
|
162
|
+
group: string;
|
|
163
|
+
icon?: string | {
|
|
164
|
+
name: string;
|
|
165
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
166
|
+
} | undefined;
|
|
167
|
+
hidden?: boolean | undefined;
|
|
168
|
+
root?: string | undefined;
|
|
140
169
|
} | {
|
|
170
|
+
group: string;
|
|
141
171
|
pages: any[];
|
|
142
|
-
|
|
172
|
+
icon?: string | {
|
|
173
|
+
name: string;
|
|
174
|
+
style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
|
|
175
|
+
} | undefined;
|
|
176
|
+
hidden?: boolean | undefined;
|
|
177
|
+
root?: string | undefined;
|
|
178
|
+
})[];
|
|
143
179
|
}>, z.ZodObject<{
|
|
144
180
|
pages: z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">;
|
|
145
181
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { LanguageNavigation } from './divisionNav.js';
|
|
3
|
-
declare const baseLanguageSchema: z.ZodObject<{
|
|
3
|
+
export declare const baseLanguageSchema: z.ZodObject<{
|
|
4
4
|
language: z.ZodEnum<["en", "cn", "es", "fr", "jp", "pt", "pt-BR", "de"]>;
|
|
5
5
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -35,4 +35,3 @@ export type LanguagesConfig = z.infer<typeof languagesSchema>;
|
|
|
35
35
|
export type LanguageConfig = z.infer<typeof languageSchema>;
|
|
36
36
|
export type DecoratedLanguagesConfig = z.infer<typeof decoratedLanguagesSchema>;
|
|
37
37
|
export type DecoratedLanguageConfig = z.infer<typeof decoratedLanguageSchema>;
|
|
38
|
-
export {};
|
|
@@ -8,26 +8,41 @@ import { decoratedGroupsSchema, groupsSchema } from './groups.js';
|
|
|
8
8
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
9
9
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
10
10
|
import { decoratedVersionsSchema, versionsSchema } from './version.js';
|
|
11
|
-
const baseLanguageSchema = z.object({
|
|
11
|
+
export const baseLanguageSchema = z.object({
|
|
12
12
|
language: z
|
|
13
13
|
.enum(['en', 'cn', 'es', 'fr', 'jp', 'pt', 'pt-BR', 'de'])
|
|
14
14
|
.describe('The name of the language in the ISO 639-1 format'),
|
|
15
15
|
hidden: hiddenSchema.optional(),
|
|
16
16
|
});
|
|
17
|
-
export const languageSchema =
|
|
18
|
-
.and(z
|
|
19
|
-
.object({ openapi: openApiSchema })
|
|
20
|
-
.or(z
|
|
17
|
+
export const languageSchema = z
|
|
21
18
|
.union([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
baseLanguageSchema.extend({ openapi: openApiSchema }),
|
|
20
|
+
baseLanguageSchema.extend({ href: hrefSchema, openapi: openApiSchema.optional() }),
|
|
21
|
+
baseLanguageSchema.extend({
|
|
22
|
+
versions: z.lazy(() => versionsSchema),
|
|
23
|
+
openapi: openApiSchema.optional(),
|
|
24
|
+
}),
|
|
25
|
+
baseLanguageSchema.extend({
|
|
26
|
+
tabs: z.lazy(() => tabsSchema),
|
|
27
|
+
openapi: openApiSchema.optional(),
|
|
28
|
+
}),
|
|
29
|
+
baseLanguageSchema.extend({
|
|
30
|
+
dropdowns: z.lazy(() => dropdownsSchema),
|
|
31
|
+
openapi: openApiSchema.optional(),
|
|
32
|
+
}),
|
|
33
|
+
baseLanguageSchema.extend({
|
|
34
|
+
anchors: z.lazy(() => anchorsSchema),
|
|
35
|
+
openapi: openApiSchema.optional(),
|
|
36
|
+
}),
|
|
37
|
+
baseLanguageSchema.extend({
|
|
38
|
+
groups: z.lazy(() => groupsSchema),
|
|
39
|
+
openapi: openApiSchema.optional(),
|
|
40
|
+
}),
|
|
41
|
+
baseLanguageSchema.extend({
|
|
42
|
+
pages: z.lazy(() => pagesSchema),
|
|
43
|
+
openapi: openApiSchema.optional(),
|
|
44
|
+
}),
|
|
29
45
|
])
|
|
30
|
-
.and(z.object({ openapi: openApiSchema.optional() }))))
|
|
31
46
|
.describe('Organizing by languages');
|
|
32
47
|
export const decoratedLanguageSchema = baseLanguageSchema
|
|
33
48
|
.and(z.union([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TabNavigation } from './divisionNav.js';
|
|
3
|
-
declare const baseTabSchema: z.ZodObject<{
|
|
3
|
+
export declare const baseTabSchema: z.ZodObject<{
|
|
4
4
|
tab: z.ZodString;
|
|
5
5
|
icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
|
|
6
6
|
style: z.ZodOptional<z.ZodEnum<["brands", "duotone", "light", "regular", "sharp-duotone-solid", "sharp-light", "sharp-regular", "sharp-solid", "sharp-thin", "solid", "thin"]>>;
|
|
@@ -71,4 +71,3 @@ export type TabsConfig = z.infer<typeof tabsSchema>;
|
|
|
71
71
|
export type TabConfig = z.infer<typeof tabSchema>;
|
|
72
72
|
export type DecoratedTabsConfig = z.infer<typeof decoratedTabsSchema>;
|
|
73
73
|
export type DecoratedTabConfig = z.infer<typeof decoratedTabSchema>;
|
|
74
|
-
export {};
|