@mintlify/validation 0.1.585 → 0.1.586
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/mint-config/schemas/v2/index.d.ts +1138 -1874
- package/dist/mint-config/schemas/v2/properties/navigation/divisionNav.d.ts +12 -4
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +24 -717
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +360 -428
- package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +177 -4
- package/dist/mint-config/schemas/v2/properties/reusable/page.d.ts +101 -55
- package/dist/mint-config/schemas/v2/properties/reusable/page.js +12 -0
- package/dist/mint-config/schemas/v2/themes/almond.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/aspen.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/linden.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/maple.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/palm.d.ts +140 -232
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +92 -182
- package/dist/mint-config/schemas/v2/themes/willow.d.ts +140 -232
- package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.js +7 -3
- package/dist/mint-config/validateConfig.d.ts +336 -350
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Division } from '../reusable/divisions.js';
|
|
3
|
+
import { DecoratedPageConfig } from '../reusable/page.js';
|
|
3
4
|
import { BaseAnchorSchema } from './anchors.js';
|
|
4
5
|
import { BaseDropdownSchema } from './dropdown.js';
|
|
5
|
-
import {
|
|
6
|
+
import { BaseGroupSchema } from './groups.js';
|
|
6
7
|
import { BaseLanguageSchema } from './languages.js';
|
|
7
8
|
import { BaseMenuItemSchema } from './menu.js';
|
|
8
|
-
import { PagesConfig, DecoratedPagesConfig } from './pages.js';
|
|
9
9
|
import { BaseProductSchema } from './products.js';
|
|
10
10
|
import { BaseTabSchema } from './tabs.js';
|
|
11
11
|
import { BaseVersionSchema } from './version.js';
|
|
@@ -79,9 +79,9 @@ type BaseNavigation<T extends NavigationType, K extends Division> = {
|
|
|
79
79
|
} | {
|
|
80
80
|
menu: K extends ExcludedDivisions['menu'] ? never : MenuItemNavigation<T>[];
|
|
81
81
|
} | {
|
|
82
|
-
groups: T extends 'default' ?
|
|
82
|
+
groups: T extends 'default' ? GroupNavigation<'default'>[] : GroupNavigation<'decorated'>[];
|
|
83
83
|
} | {
|
|
84
|
-
pages: T extends 'default' ?
|
|
84
|
+
pages: T extends 'default' ? PageOrGroupNavigation<'default'>[] : PageOrGroupNavigation<'decorated'>[];
|
|
85
85
|
} | {
|
|
86
86
|
href: string;
|
|
87
87
|
};
|
|
@@ -112,4 +112,12 @@ export type GlobalNavigation = {
|
|
|
112
112
|
href: string;
|
|
113
113
|
})[];
|
|
114
114
|
};
|
|
115
|
+
export type PageNavigation<T extends NavigationType> = T extends 'default' ? string : DecoratedPageConfig;
|
|
116
|
+
export type PageOrGroupNavigation<T extends NavigationType> = T extends 'default' ? PageNavigation<'default'> | GroupNavigation<'default'> : PageNavigation<'decorated'> | GroupNavigation<'decorated'>;
|
|
117
|
+
export type GroupNavigation<T extends NavigationType> = T extends 'default' ? BaseGroupSchema & z.infer<typeof SomeApiSchema> & {
|
|
118
|
+
pages?: PageOrGroupNavigation<'default'>[];
|
|
119
|
+
} : Omit<BaseGroupSchema, 'root'> & {
|
|
120
|
+
pages: PageOrGroupNavigation<'decorated'>[];
|
|
121
|
+
root?: DecoratedPageConfig;
|
|
122
|
+
};
|
|
115
123
|
export {};
|