@mintlify/validation 0.1.899 → 0.1.901
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/editor-navigation/conversion/common.d.ts +9 -9
- package/dist/editor-navigation/conversion/common.js +2 -0
- package/dist/editor-navigation/conversion/docsjson-to-tree.js +9 -0
- package/dist/mint-config/schemas/v2/index.d.ts +1413 -573
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +100 -0
- package/dist/mint-config/schemas/v2/properties/navigation/groups.js +5 -4
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +112 -0
- package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/languages.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/menu.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/menu.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +28 -0
- package/dist/mint-config/schemas/v2/properties/navigation/products.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/products.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +2 -1
- package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +144 -0
- package/dist/mint-config/schemas/v2/properties/navigation/version.js +2 -1
- package/dist/mint-config/schemas/v2/properties/thumbnails.d.ts +126 -7
- package/dist/mint-config/schemas/v2/properties/thumbnails.js +14 -4
- package/dist/mint-config/schemas/v2/themes/almond.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/aspen.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/linden.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/luma.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/maple.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/palm.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +63 -7
- package/dist/mint-config/schemas/v2/themes/sequoia.d.ts +139 -55
- package/dist/mint-config/schemas/v2/themes/willow.d.ts +139 -55
- package/dist/mint-config/validateConfig.d.ts +714 -462
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { AnchorNavigation } from './divisionNav.js';
|
|
3
3
|
export declare const baseAnchorSchema: z.ZodObject<{
|
|
4
|
+
thumbnail: z.ZodOptional<z.ZodObject<Pick<{
|
|
5
|
+
preset: z.ZodOptional<z.ZodEnum<["classic", "headline", "minimal"]>>;
|
|
6
|
+
appearance: z.ZodOptional<z.ZodEnum<[import("../thumbnails.js").ThumbnailAppearance.Light, import("../thumbnails.js").ThumbnailAppearance.Dark]>>;
|
|
7
|
+
surface: z.ZodOptional<z.ZodEnum<["neutral", "brand"]>>;
|
|
8
|
+
background: z.ZodOptional<z.ZodString>;
|
|
9
|
+
fonts: z.ZodOptional<z.ZodEffects<z.ZodObject<Pick<{
|
|
10
|
+
family: z.ZodString;
|
|
11
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
13
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
|
|
14
|
+
}, "family"> & {
|
|
15
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "ttf", "otf"]>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
family: string;
|
|
19
|
+
source?: string | undefined;
|
|
20
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
family: string;
|
|
23
|
+
source?: string | undefined;
|
|
24
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
family: string;
|
|
27
|
+
source?: string | undefined;
|
|
28
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
family: string;
|
|
31
|
+
source?: string | undefined;
|
|
32
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
33
|
+
}>>;
|
|
34
|
+
eyebrow: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
source: z.ZodOptional<z.ZodEnum<["group", "tab", "dropdown", "anchor", "language", "product", "version", "item", "none"]>>;
|
|
36
|
+
style: z.ZodOptional<z.ZodEnum<["plain", "bar", "pill"]>>;
|
|
37
|
+
color: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
color?: string | undefined;
|
|
40
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
41
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
color?: string | undefined;
|
|
44
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
45
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
}, "background" | "preset" | "appearance" | "surface"> & {
|
|
48
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
background?: string | undefined;
|
|
51
|
+
eyebrow?: string | undefined;
|
|
52
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
53
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
54
|
+
surface?: "neutral" | "brand" | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
background?: string | undefined;
|
|
57
|
+
eyebrow?: string | undefined;
|
|
58
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
59
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
60
|
+
surface?: "neutral" | "brand" | undefined;
|
|
61
|
+
}>>;
|
|
4
62
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
5
63
|
anchor: z.ZodString;
|
|
6
64
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
@@ -44,6 +102,13 @@ export declare const baseAnchorSchema: z.ZodObject<{
|
|
|
44
102
|
graphql?: undefined;
|
|
45
103
|
hidden?: boolean | undefined;
|
|
46
104
|
sdk?: undefined;
|
|
105
|
+
thumbnail?: {
|
|
106
|
+
background?: string | undefined;
|
|
107
|
+
eyebrow?: string | undefined;
|
|
108
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
109
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
110
|
+
surface?: "neutral" | "brand" | undefined;
|
|
111
|
+
} | undefined;
|
|
47
112
|
}, {
|
|
48
113
|
anchor: string;
|
|
49
114
|
icon?: string | {
|
|
@@ -59,9 +124,74 @@ export declare const baseAnchorSchema: z.ZodObject<{
|
|
|
59
124
|
graphql?: undefined;
|
|
60
125
|
hidden?: boolean | undefined;
|
|
61
126
|
sdk?: undefined;
|
|
127
|
+
thumbnail?: {
|
|
128
|
+
background?: string | undefined;
|
|
129
|
+
eyebrow?: string | undefined;
|
|
130
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
131
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
132
|
+
surface?: "neutral" | "brand" | undefined;
|
|
133
|
+
} | undefined;
|
|
62
134
|
}>;
|
|
63
135
|
export type BaseAnchorSchema = z.infer<typeof baseAnchorSchema>;
|
|
64
136
|
export declare const nonRecursiveAnchorSchema: z.ZodObject<{
|
|
137
|
+
thumbnail: z.ZodOptional<z.ZodObject<Pick<{
|
|
138
|
+
preset: z.ZodOptional<z.ZodEnum<["classic", "headline", "minimal"]>>;
|
|
139
|
+
appearance: z.ZodOptional<z.ZodEnum<[import("../thumbnails.js").ThumbnailAppearance.Light, import("../thumbnails.js").ThumbnailAppearance.Dark]>>;
|
|
140
|
+
surface: z.ZodOptional<z.ZodEnum<["neutral", "brand"]>>;
|
|
141
|
+
background: z.ZodOptional<z.ZodString>;
|
|
142
|
+
fonts: z.ZodOptional<z.ZodEffects<z.ZodObject<Pick<{
|
|
143
|
+
family: z.ZodString;
|
|
144
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
146
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
|
|
147
|
+
}, "family"> & {
|
|
148
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
149
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "ttf", "otf"]>>;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
family: string;
|
|
152
|
+
source?: string | undefined;
|
|
153
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
154
|
+
}, {
|
|
155
|
+
family: string;
|
|
156
|
+
source?: string | undefined;
|
|
157
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
158
|
+
}>, {
|
|
159
|
+
family: string;
|
|
160
|
+
source?: string | undefined;
|
|
161
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
162
|
+
}, {
|
|
163
|
+
family: string;
|
|
164
|
+
source?: string | undefined;
|
|
165
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
166
|
+
}>>;
|
|
167
|
+
eyebrow: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
source: z.ZodOptional<z.ZodEnum<["group", "tab", "dropdown", "anchor", "language", "product", "version", "item", "none"]>>;
|
|
169
|
+
style: z.ZodOptional<z.ZodEnum<["plain", "bar", "pill"]>>;
|
|
170
|
+
color: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
color?: string | undefined;
|
|
173
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
174
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
175
|
+
}, {
|
|
176
|
+
color?: string | undefined;
|
|
177
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
178
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
179
|
+
}>>;
|
|
180
|
+
}, "background" | "preset" | "appearance" | "surface"> & {
|
|
181
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
background?: string | undefined;
|
|
184
|
+
eyebrow?: string | undefined;
|
|
185
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
186
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
187
|
+
surface?: "neutral" | "brand" | undefined;
|
|
188
|
+
}, {
|
|
189
|
+
background?: string | undefined;
|
|
190
|
+
eyebrow?: string | undefined;
|
|
191
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
192
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
193
|
+
surface?: "neutral" | "brand" | undefined;
|
|
194
|
+
}>>;
|
|
65
195
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
66
196
|
anchor: z.ZodString;
|
|
67
197
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
@@ -108,6 +238,13 @@ export declare const nonRecursiveAnchorSchema: z.ZodObject<{
|
|
|
108
238
|
graphql?: undefined;
|
|
109
239
|
hidden?: boolean | undefined;
|
|
110
240
|
sdk?: undefined;
|
|
241
|
+
thumbnail?: {
|
|
242
|
+
background?: string | undefined;
|
|
243
|
+
eyebrow?: string | undefined;
|
|
244
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
245
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
246
|
+
surface?: "neutral" | "brand" | undefined;
|
|
247
|
+
} | undefined;
|
|
111
248
|
}, {
|
|
112
249
|
href: string;
|
|
113
250
|
anchor: string;
|
|
@@ -124,6 +261,13 @@ export declare const nonRecursiveAnchorSchema: z.ZodObject<{
|
|
|
124
261
|
graphql?: undefined;
|
|
125
262
|
hidden?: boolean | undefined;
|
|
126
263
|
sdk?: undefined;
|
|
264
|
+
thumbnail?: {
|
|
265
|
+
background?: string | undefined;
|
|
266
|
+
eyebrow?: string | undefined;
|
|
267
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
268
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
269
|
+
surface?: "neutral" | "brand" | undefined;
|
|
270
|
+
} | undefined;
|
|
127
271
|
}>;
|
|
128
272
|
export declare const anchorSchema: z.ZodType<AnchorNavigation<'default'>>;
|
|
129
273
|
export declare const decoratedAnchorSchema: z.ZodType<AnchorNavigation<'decorated'>>;
|
|
@@ -7,6 +7,7 @@ import { hrefSchema } from '../reusable/href.js';
|
|
|
7
7
|
import { iconSchema } from '../reusable/icon.js';
|
|
8
8
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
9
9
|
import { sdkNotSupportedSchema } from '../reusable/sdk.js';
|
|
10
|
+
import { thumbnailField } from '../thumbnails.js';
|
|
10
11
|
import { decoratedDropdownsSchema, dropdownsSchema } from './dropdown.js';
|
|
11
12
|
import { globalSchema } from './global.js';
|
|
12
13
|
import { decoratedGroupsSchema, directoryField, groupsSchema } from './groups.js';
|
|
@@ -15,7 +16,7 @@ import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
|
15
16
|
import { decoratedProductsSchema, productsSchema } from './products.js';
|
|
16
17
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
17
18
|
import { decoratedVersionsSchema, versionsSchema } from './version.js';
|
|
18
|
-
export const baseAnchorSchema = z.object(Object.assign({ anchor: z.string().nonempty().describe('The name of the anchor'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), hidden: hiddenSchema.optional() }, directoryField));
|
|
19
|
+
export const baseAnchorSchema = z.object(Object.assign(Object.assign({ anchor: z.string().nonempty().describe('The name of the anchor'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), hidden: hiddenSchema.optional() }, directoryField), thumbnailField));
|
|
19
20
|
export const nonRecursiveAnchorSchema = baseAnchorSchema.extend({ href: hrefSchema });
|
|
20
21
|
export const anchorSchema = z.union([
|
|
21
22
|
baseAnchorSchema.extend({
|
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DropdownNavigation } from './divisionNav.js';
|
|
3
3
|
export declare const baseDropdownSchema: z.ZodObject<{
|
|
4
|
+
thumbnail: z.ZodOptional<z.ZodObject<Pick<{
|
|
5
|
+
preset: z.ZodOptional<z.ZodEnum<["classic", "headline", "minimal"]>>;
|
|
6
|
+
appearance: z.ZodOptional<z.ZodEnum<[import("../thumbnails.js").ThumbnailAppearance.Light, import("../thumbnails.js").ThumbnailAppearance.Dark]>>;
|
|
7
|
+
surface: z.ZodOptional<z.ZodEnum<["neutral", "brand"]>>;
|
|
8
|
+
background: z.ZodOptional<z.ZodString>;
|
|
9
|
+
fonts: z.ZodOptional<z.ZodEffects<z.ZodObject<Pick<{
|
|
10
|
+
family: z.ZodString;
|
|
11
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
13
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
|
|
14
|
+
}, "family"> & {
|
|
15
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
16
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "ttf", "otf"]>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
family: string;
|
|
19
|
+
source?: string | undefined;
|
|
20
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
family: string;
|
|
23
|
+
source?: string | undefined;
|
|
24
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
family: string;
|
|
27
|
+
source?: string | undefined;
|
|
28
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
family: string;
|
|
31
|
+
source?: string | undefined;
|
|
32
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
33
|
+
}>>;
|
|
34
|
+
eyebrow: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
source: z.ZodOptional<z.ZodEnum<["group", "tab", "dropdown", "anchor", "language", "product", "version", "item", "none"]>>;
|
|
36
|
+
style: z.ZodOptional<z.ZodEnum<["plain", "bar", "pill"]>>;
|
|
37
|
+
color: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
color?: string | undefined;
|
|
40
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
41
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
color?: string | undefined;
|
|
44
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
45
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
}, "background" | "preset" | "appearance" | "surface"> & {
|
|
48
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
background?: string | undefined;
|
|
51
|
+
eyebrow?: string | undefined;
|
|
52
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
53
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
54
|
+
surface?: "neutral" | "brand" | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
background?: string | undefined;
|
|
57
|
+
eyebrow?: string | undefined;
|
|
58
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
59
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
60
|
+
surface?: "neutral" | "brand" | undefined;
|
|
61
|
+
}>>;
|
|
4
62
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
5
63
|
dropdown: z.ZodString;
|
|
6
64
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
@@ -46,6 +104,13 @@ export declare const baseDropdownSchema: z.ZodObject<{
|
|
|
46
104
|
graphql?: undefined;
|
|
47
105
|
hidden?: boolean | undefined;
|
|
48
106
|
sdk?: undefined;
|
|
107
|
+
thumbnail?: {
|
|
108
|
+
background?: string | undefined;
|
|
109
|
+
eyebrow?: string | undefined;
|
|
110
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
111
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
112
|
+
surface?: "neutral" | "brand" | undefined;
|
|
113
|
+
} | undefined;
|
|
49
114
|
}, {
|
|
50
115
|
dropdown: string;
|
|
51
116
|
icon?: string | {
|
|
@@ -62,9 +127,74 @@ export declare const baseDropdownSchema: z.ZodObject<{
|
|
|
62
127
|
graphql?: undefined;
|
|
63
128
|
hidden?: boolean | undefined;
|
|
64
129
|
sdk?: undefined;
|
|
130
|
+
thumbnail?: {
|
|
131
|
+
background?: string | undefined;
|
|
132
|
+
eyebrow?: string | undefined;
|
|
133
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
134
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
135
|
+
surface?: "neutral" | "brand" | undefined;
|
|
136
|
+
} | undefined;
|
|
65
137
|
}>;
|
|
66
138
|
export type BaseDropdownSchema = z.infer<typeof baseDropdownSchema>;
|
|
67
139
|
export declare const nonRecursiveDropdownSchema: z.ZodObject<{
|
|
140
|
+
thumbnail: z.ZodOptional<z.ZodObject<Pick<{
|
|
141
|
+
preset: z.ZodOptional<z.ZodEnum<["classic", "headline", "minimal"]>>;
|
|
142
|
+
appearance: z.ZodOptional<z.ZodEnum<[import("../thumbnails.js").ThumbnailAppearance.Light, import("../thumbnails.js").ThumbnailAppearance.Dark]>>;
|
|
143
|
+
surface: z.ZodOptional<z.ZodEnum<["neutral", "brand"]>>;
|
|
144
|
+
background: z.ZodOptional<z.ZodString>;
|
|
145
|
+
fonts: z.ZodOptional<z.ZodEffects<z.ZodObject<Pick<{
|
|
146
|
+
family: z.ZodString;
|
|
147
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
149
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
|
|
150
|
+
}, "family"> & {
|
|
151
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
152
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "ttf", "otf"]>>;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
family: string;
|
|
155
|
+
source?: string | undefined;
|
|
156
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
family: string;
|
|
159
|
+
source?: string | undefined;
|
|
160
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
161
|
+
}>, {
|
|
162
|
+
family: string;
|
|
163
|
+
source?: string | undefined;
|
|
164
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
family: string;
|
|
167
|
+
source?: string | undefined;
|
|
168
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
169
|
+
}>>;
|
|
170
|
+
eyebrow: z.ZodOptional<z.ZodObject<{
|
|
171
|
+
source: z.ZodOptional<z.ZodEnum<["group", "tab", "dropdown", "anchor", "language", "product", "version", "item", "none"]>>;
|
|
172
|
+
style: z.ZodOptional<z.ZodEnum<["plain", "bar", "pill"]>>;
|
|
173
|
+
color: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, "strip", z.ZodTypeAny, {
|
|
175
|
+
color?: string | undefined;
|
|
176
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
177
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
color?: string | undefined;
|
|
180
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
181
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
182
|
+
}>>;
|
|
183
|
+
}, "background" | "preset" | "appearance" | "surface"> & {
|
|
184
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, "strip", z.ZodTypeAny, {
|
|
186
|
+
background?: string | undefined;
|
|
187
|
+
eyebrow?: string | undefined;
|
|
188
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
189
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
190
|
+
surface?: "neutral" | "brand" | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
background?: string | undefined;
|
|
193
|
+
eyebrow?: string | undefined;
|
|
194
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
195
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
196
|
+
surface?: "neutral" | "brand" | undefined;
|
|
197
|
+
}>>;
|
|
68
198
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
69
199
|
dropdown: z.ZodString;
|
|
70
200
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
@@ -113,6 +243,13 @@ export declare const nonRecursiveDropdownSchema: z.ZodObject<{
|
|
|
113
243
|
graphql?: undefined;
|
|
114
244
|
hidden?: boolean | undefined;
|
|
115
245
|
sdk?: undefined;
|
|
246
|
+
thumbnail?: {
|
|
247
|
+
background?: string | undefined;
|
|
248
|
+
eyebrow?: string | undefined;
|
|
249
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
250
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
251
|
+
surface?: "neutral" | "brand" | undefined;
|
|
252
|
+
} | undefined;
|
|
116
253
|
}, {
|
|
117
254
|
href: string;
|
|
118
255
|
dropdown: string;
|
|
@@ -130,6 +267,13 @@ export declare const nonRecursiveDropdownSchema: z.ZodObject<{
|
|
|
130
267
|
graphql?: undefined;
|
|
131
268
|
hidden?: boolean | undefined;
|
|
132
269
|
sdk?: undefined;
|
|
270
|
+
thumbnail?: {
|
|
271
|
+
background?: string | undefined;
|
|
272
|
+
eyebrow?: string | undefined;
|
|
273
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
274
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
275
|
+
surface?: "neutral" | "brand" | undefined;
|
|
276
|
+
} | undefined;
|
|
133
277
|
}>;
|
|
134
278
|
export declare const dropdownSchema: z.ZodType<DropdownNavigation<'default'>>;
|
|
135
279
|
export declare const decoratedDropdownSchema: z.ZodType<DropdownNavigation<'decorated'>>;
|
|
@@ -7,6 +7,7 @@ import { hrefSchema } from '../reusable/href.js';
|
|
|
7
7
|
import { iconSchema } from '../reusable/icon.js';
|
|
8
8
|
import { openApiSchema } from '../reusable/openapi.js';
|
|
9
9
|
import { sdkNotSupportedSchema } from '../reusable/sdk.js';
|
|
10
|
+
import { thumbnailField } from '../thumbnails.js';
|
|
10
11
|
import { anchorsSchema, decoratedAnchorsSchema } from './anchors.js';
|
|
11
12
|
import { globalSchema } from './global.js';
|
|
12
13
|
import { decoratedGroupsSchema, directoryField, groupsSchema } from './groups.js';
|
|
@@ -15,7 +16,7 @@ import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
|
15
16
|
import { decoratedProductsSchema, productsSchema } from './products.js';
|
|
16
17
|
import { decoratedTabsSchema, tabsSchema } from './tabs.js';
|
|
17
18
|
import { decoratedVersionsSchema, versionsSchema } from './version.js';
|
|
18
|
-
export const baseDropdownSchema = z.object(Object.assign({ dropdown: z.string().nonempty().describe('The name of the dropdown'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), description: z.string().optional().describe('The description of the dropdown'), hidden: hiddenSchema.optional() }, directoryField));
|
|
19
|
+
export const baseDropdownSchema = z.object(Object.assign(Object.assign({ dropdown: z.string().nonempty().describe('The name of the dropdown'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, icon: iconSchema.optional(), color: colorSchemaWithOptionalLightAndDark.optional(), description: z.string().optional().describe('The description of the dropdown'), hidden: hiddenSchema.optional() }, directoryField), thumbnailField));
|
|
19
20
|
export const nonRecursiveDropdownSchema = baseDropdownSchema.extend({ href: hrefSchema });
|
|
20
21
|
export const dropdownSchema = z.union([
|
|
21
22
|
baseDropdownSchema.extend({
|
|
@@ -9,6 +9,64 @@ export declare const directoryField: {
|
|
|
9
9
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
10
10
|
};
|
|
11
11
|
export declare const baseGroupSchema: z.ZodObject<{
|
|
12
|
+
thumbnail: z.ZodOptional<z.ZodObject<Pick<{
|
|
13
|
+
preset: z.ZodOptional<z.ZodEnum<["classic", "headline", "minimal"]>>;
|
|
14
|
+
appearance: z.ZodOptional<z.ZodEnum<[import("../thumbnails.js").ThumbnailAppearance.Light, import("../thumbnails.js").ThumbnailAppearance.Dark]>>;
|
|
15
|
+
surface: z.ZodOptional<z.ZodEnum<["neutral", "brand"]>>;
|
|
16
|
+
background: z.ZodOptional<z.ZodString>;
|
|
17
|
+
fonts: z.ZodOptional<z.ZodEffects<z.ZodObject<Pick<{
|
|
18
|
+
family: z.ZodString;
|
|
19
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
21
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "woff2"]>>;
|
|
22
|
+
}, "family"> & {
|
|
23
|
+
source: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
24
|
+
format: z.ZodOptional<z.ZodEnum<["woff", "ttf", "otf"]>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
family: string;
|
|
27
|
+
source?: string | undefined;
|
|
28
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
family: string;
|
|
31
|
+
source?: string | undefined;
|
|
32
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
family: string;
|
|
35
|
+
source?: string | undefined;
|
|
36
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
family: string;
|
|
39
|
+
source?: string | undefined;
|
|
40
|
+
format?: "woff" | "ttf" | "otf" | undefined;
|
|
41
|
+
}>>;
|
|
42
|
+
eyebrow: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
source: z.ZodOptional<z.ZodEnum<["group", "tab", "dropdown", "anchor", "language", "product", "version", "item", "none"]>>;
|
|
44
|
+
style: z.ZodOptional<z.ZodEnum<["plain", "bar", "pill"]>>;
|
|
45
|
+
color: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
color?: string | undefined;
|
|
48
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
49
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
color?: string | undefined;
|
|
52
|
+
style?: "pill" | "plain" | "bar" | undefined;
|
|
53
|
+
source?: "version" | "none" | "group" | "tab" | "dropdown" | "anchor" | "language" | "product" | "item" | undefined;
|
|
54
|
+
}>>;
|
|
55
|
+
}, "background" | "preset" | "appearance" | "surface"> & {
|
|
56
|
+
eyebrow: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
background?: string | undefined;
|
|
59
|
+
eyebrow?: string | undefined;
|
|
60
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
61
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
62
|
+
surface?: "neutral" | "brand" | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
background?: string | undefined;
|
|
65
|
+
eyebrow?: string | undefined;
|
|
66
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
67
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
68
|
+
surface?: "neutral" | "brand" | undefined;
|
|
69
|
+
}>>;
|
|
12
70
|
directory: z.ZodOptional<z.ZodEnum<["none", "accordion", "card"]>>;
|
|
13
71
|
group: z.ZodString;
|
|
14
72
|
graphql: z.ZodOptional<z.ZodNever>;
|
|
@@ -50,6 +108,13 @@ export declare const baseGroupSchema: z.ZodObject<{
|
|
|
50
108
|
hidden?: boolean | undefined;
|
|
51
109
|
sdk?: undefined;
|
|
52
110
|
root?: string | undefined;
|
|
111
|
+
thumbnail?: {
|
|
112
|
+
background?: string | undefined;
|
|
113
|
+
eyebrow?: string | undefined;
|
|
114
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
115
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
116
|
+
surface?: "neutral" | "brand" | undefined;
|
|
117
|
+
} | undefined;
|
|
53
118
|
}, {
|
|
54
119
|
group: string;
|
|
55
120
|
icon?: string | {
|
|
@@ -67,6 +132,13 @@ export declare const baseGroupSchema: z.ZodObject<{
|
|
|
67
132
|
hidden?: boolean | undefined;
|
|
68
133
|
sdk?: undefined;
|
|
69
134
|
root?: string | undefined;
|
|
135
|
+
thumbnail?: {
|
|
136
|
+
background?: string | undefined;
|
|
137
|
+
eyebrow?: string | undefined;
|
|
138
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
139
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
140
|
+
surface?: "neutral" | "brand" | undefined;
|
|
141
|
+
} | undefined;
|
|
70
142
|
}>;
|
|
71
143
|
export type BaseGroupSchema = z.infer<typeof baseGroupSchema>;
|
|
72
144
|
export declare const groupSchema: z.ZodType<GroupNavigation<'default'>>;
|
|
@@ -88,6 +160,13 @@ export declare const groupsSchema: z.ZodArray<z.ZodType<Omit<{
|
|
|
88
160
|
hidden?: boolean | undefined;
|
|
89
161
|
sdk?: undefined;
|
|
90
162
|
root?: string | undefined;
|
|
163
|
+
thumbnail?: {
|
|
164
|
+
background?: string | undefined;
|
|
165
|
+
eyebrow?: string | undefined;
|
|
166
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
167
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
168
|
+
surface?: "neutral" | "brand" | undefined;
|
|
169
|
+
} | undefined;
|
|
91
170
|
}, "graphql" | "sdk"> & {
|
|
92
171
|
openapi?: string | {
|
|
93
172
|
source: string;
|
|
@@ -123,6 +202,13 @@ export declare const groupsSchema: z.ZodArray<z.ZodType<Omit<{
|
|
|
123
202
|
hidden?: boolean | undefined;
|
|
124
203
|
sdk?: undefined;
|
|
125
204
|
root?: string | undefined;
|
|
205
|
+
thumbnail?: {
|
|
206
|
+
background?: string | undefined;
|
|
207
|
+
eyebrow?: string | undefined;
|
|
208
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
209
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
210
|
+
surface?: "neutral" | "brand" | undefined;
|
|
211
|
+
} | undefined;
|
|
126
212
|
}, "graphql" | "sdk"> & {
|
|
127
213
|
openapi?: string | {
|
|
128
214
|
source: string;
|
|
@@ -159,6 +245,13 @@ export declare const decoratedGroupsSchema: z.ZodArray<z.ZodType<Omit<{
|
|
|
159
245
|
hidden?: boolean | undefined;
|
|
160
246
|
sdk?: undefined;
|
|
161
247
|
root?: string | undefined;
|
|
248
|
+
thumbnail?: {
|
|
249
|
+
background?: string | undefined;
|
|
250
|
+
eyebrow?: string | undefined;
|
|
251
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
252
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
253
|
+
surface?: "neutral" | "brand" | undefined;
|
|
254
|
+
} | undefined;
|
|
162
255
|
}, "sdk" | "root"> & {
|
|
163
256
|
pages: import("./divisionNav.js").PageOrGroupNavigation<"decorated">[];
|
|
164
257
|
root?: import("../reusable/page.js").DecoratedPageConfig;
|
|
@@ -179,6 +272,13 @@ export declare const decoratedGroupsSchema: z.ZodArray<z.ZodType<Omit<{
|
|
|
179
272
|
hidden?: boolean | undefined;
|
|
180
273
|
sdk?: undefined;
|
|
181
274
|
root?: string | undefined;
|
|
275
|
+
thumbnail?: {
|
|
276
|
+
background?: string | undefined;
|
|
277
|
+
eyebrow?: string | undefined;
|
|
278
|
+
preset?: "classic" | "headline" | "minimal" | undefined;
|
|
279
|
+
appearance?: import("../thumbnails.js").ThumbnailAppearance | undefined;
|
|
280
|
+
surface?: "neutral" | "brand" | undefined;
|
|
281
|
+
} | undefined;
|
|
182
282
|
}, "sdk" | "root"> & {
|
|
183
283
|
pages: import("./divisionNav.js").PageOrGroupNavigation<"decorated">[];
|
|
184
284
|
root?: import("../reusable/page.js").DecoratedPageConfig;
|
|
@@ -18,6 +18,7 @@ import { openApiSchema } from '../reusable/openapi.js';
|
|
|
18
18
|
import { decoratedPageSchema, pageSchema } from '../reusable/page.js';
|
|
19
19
|
import { sdkNotSupportedSchema, sdkSchema } from '../reusable/sdk.js';
|
|
20
20
|
import { searchableSchema } from '../reusable/searchable.js';
|
|
21
|
+
import { thumbnailField } from '../thumbnails.js';
|
|
21
22
|
import { decoratedPagesSchema, pagesSchema } from './pages.js';
|
|
22
23
|
/** How automatic directory UI is shown for group roots under this navigation node. Inherits through `navigation`. */
|
|
23
24
|
export const NAVIGATION_DIRECTORY = ['none', 'accordion', 'card'];
|
|
@@ -27,10 +28,10 @@ export const directoryField = {
|
|
|
27
28
|
.optional()
|
|
28
29
|
.describe('Directory layout for this navigation node and its descendants. "accordion" and "card" show automatic directory UI on eligible root pages; "none" disables it. Inherits recursively; descendants can override.'),
|
|
29
30
|
};
|
|
30
|
-
export const baseGroupSchema = z.object(Object.assign({ group: z.string().nonempty().describe('The name of the group'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, public: z.boolean().optional().describe('Whether the group is public'), boost: z
|
|
31
|
+
export const baseGroupSchema = z.object(Object.assign(Object.assign({ group: z.string().nonempty().describe('The name of the group'), graphql: graphqlNotSupportedSchema, sdk: sdkNotSupportedSchema, public: z.boolean().optional().describe('Whether the group is public'), boost: z
|
|
31
32
|
.number()
|
|
32
33
|
.optional()
|
|
33
|
-
.describe('Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)'), icon: iconSchema.optional(), hidden: hiddenSchema.optional(), searchable: searchableSchema.optional(), root: pageSchema.optional(), tag: z.string().optional().describe('Tag for the group'), expanded: z.boolean().optional().describe('Whether the group is expanded by default') }, directoryField));
|
|
34
|
+
.describe('Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)'), icon: iconSchema.optional(), hidden: hiddenSchema.optional(), searchable: searchableSchema.optional(), root: pageSchema.optional(), tag: z.string().optional().describe('Tag for the group'), expanded: z.boolean().optional().describe('Whether the group is expanded by default') }, directoryField), thumbnailField));
|
|
34
35
|
// .catch(undefined) has incorrect types
|
|
35
36
|
const silentlyDropInvalid = (schema) =>
|
|
36
37
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
@@ -51,10 +52,10 @@ export const groupSchema = baseGroupSchema
|
|
|
51
52
|
})
|
|
52
53
|
.describe('Organizing by groups');
|
|
53
54
|
export const decoratedGroupSchema = z
|
|
54
|
-
.object(Object.assign({ group: z.string().nonempty().describe('The name of the group'), public: z.boolean().optional().describe('Whether the group is public'), boost: z
|
|
55
|
+
.object(Object.assign(Object.assign({ group: z.string().nonempty().describe('The name of the group'), public: z.boolean().optional().describe('Whether the group is public'), boost: z
|
|
55
56
|
.number()
|
|
56
57
|
.optional()
|
|
57
|
-
.describe('Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)'), icon: iconSchema.optional(), hidden: hiddenSchema.optional(), searchable: searchableSchema.optional(), root: decoratedPageSchema.optional(), pages: z.lazy(() => decoratedPagesSchema), tag: z.string().optional().describe('Tag for the group'), expanded: z.boolean().optional().describe('Whether the group is expanded by default') }, directoryField))
|
|
58
|
+
.describe('Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)'), icon: iconSchema.optional(), hidden: hiddenSchema.optional(), searchable: searchableSchema.optional(), root: decoratedPageSchema.optional(), pages: z.lazy(() => decoratedPagesSchema), tag: z.string().optional().describe('Tag for the group'), expanded: z.boolean().optional().describe('Whether the group is expanded by default') }, directoryField), thumbnailField))
|
|
58
59
|
.describe('Organizing by groups');
|
|
59
60
|
export const groupsSchema = z
|
|
60
61
|
.array(groupSchema)
|