@mintlify/validation 0.1.585 → 0.1.587

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 (30) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/mint-config/schemas/v2/index.d.ts +3384 -1895
  3. package/dist/mint-config/schemas/v2/index.js +2 -0
  4. package/dist/mint-config/schemas/v2/properties/contextual.d.ts +12 -6
  5. package/dist/mint-config/schemas/v2/properties/contextual.js +7 -0
  6. package/dist/mint-config/schemas/v2/properties/navigation/divisionNav.d.ts +12 -4
  7. package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +24 -717
  8. package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +362 -429
  9. package/dist/mint-config/schemas/v2/properties/navigation/index.js +1 -1
  10. package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +177 -4
  11. package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +8 -0
  12. package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +2 -0
  13. package/dist/mint-config/schemas/v2/properties/reusable/page.d.ts +101 -55
  14. package/dist/mint-config/schemas/v2/properties/reusable/page.js +12 -0
  15. package/dist/mint-config/schemas/v2/themes/almond.d.ts +152 -239
  16. package/dist/mint-config/schemas/v2/themes/aspen.d.ts +152 -239
  17. package/dist/mint-config/schemas/v2/themes/linden.d.ts +152 -239
  18. package/dist/mint-config/schemas/v2/themes/maple.d.ts +152 -239
  19. package/dist/mint-config/schemas/v2/themes/mint.d.ts +152 -239
  20. package/dist/mint-config/schemas/v2/themes/palm.d.ts +152 -239
  21. package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +100 -187
  22. package/dist/mint-config/schemas/v2/themes/sequoia.d.ts +2187 -0
  23. package/dist/mint-config/schemas/v2/themes/sequoia.js +4 -0
  24. package/dist/mint-config/schemas/v2/themes/themes.d.ts +2 -2
  25. package/dist/mint-config/schemas/v2/themes/themes.js +10 -1
  26. package/dist/mint-config/schemas/v2/themes/willow.d.ts +152 -239
  27. package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.js +7 -3
  28. package/dist/mint-config/validateConfig.d.ts +1072 -380
  29. package/dist/tsconfig.build.tsbuildinfo +1 -1
  30. package/package.json +3 -3
@@ -6,6 +6,7 @@ import { mapleConfigSchema } from './themes/maple.js';
6
6
  import { mintConfigSchema } from './themes/mint.js';
7
7
  import { palmConfigSchema } from './themes/palm.js';
8
8
  import { standardConfigSchema } from './themes/reusable/index.js';
9
+ import { sequoiaConfigSchema } from './themes/sequoia.js';
9
10
  import { themeSchema } from './themes/themes.js';
10
11
  import { willowConfigSchema } from './themes/willow.js';
11
12
  export const docsConfigSchema = z.discriminatedUnion('theme', [
@@ -16,5 +17,6 @@ export const docsConfigSchema = z.discriminatedUnion('theme', [
16
17
  lindenConfigSchema,
17
18
  almondConfigSchema,
18
19
  aspenConfigSchema,
20
+ sequoiaConfigSchema,
19
21
  ]);
20
22
  export const docsConfigUnifiedSchema = z.object(Object.assign({ theme: themeSchema }, standardConfigSchema));
@@ -1,6 +1,8 @@
1
1
  import { z } from 'zod';
2
- export declare const contextualOptions: readonly ["copy", "view", "chatgpt", "claude", "perplexity", "grok", "mcp", "cursor", "vscode"];
2
+ export declare const contextualOptions: readonly ["assistant", "copy", "view", "chatgpt", "claude", "perplexity", "grok", "mcp", "cursor", "vscode"];
3
3
  export type ContextualOption = (typeof contextualOptions)[number];
4
+ export declare const contextualDisplayOptions: readonly ["header", "toc"];
5
+ export type ContextualDisplayOption = (typeof contextualDisplayOptions)[number];
4
6
  export declare const contextualHrefPresetValues: readonly ["$page", "$path", "$mcp"];
5
7
  export type ContextualHrefPresetValue = (typeof contextualHrefPresetValues)[number];
6
8
  export declare const DetailedContextualHrefSchema: z.ZodObject<{
@@ -101,7 +103,7 @@ export declare const customContextualOption: z.ZodObject<{
101
103
  } | undefined;
102
104
  }>;
103
105
  export declare const contextualSchema: z.ZodObject<{
104
- options: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["copy", "view", "chatgpt", "claude", "perplexity", "grok", "mcp", "cursor", "vscode"]>, z.ZodObject<{
106
+ options: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["assistant", "copy", "view", "chatgpt", "claude", "perplexity", "grok", "mcp", "cursor", "vscode"]>, z.ZodObject<{
105
107
  title: z.ZodString;
106
108
  description: z.ZodString;
107
109
  icon: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodObject<{
@@ -172,7 +174,7 @@ export declare const contextualSchema: z.ZodObject<{
172
174
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
173
175
  library?: "fontawesome" | "lucide" | undefined;
174
176
  } | undefined;
175
- }>]>, "many">, ("copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
177
+ }>]>, "many">, ("assistant" | "copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
176
178
  href: string | {
177
179
  base: string;
178
180
  query?: {
@@ -187,7 +189,7 @@ export declare const contextualSchema: z.ZodObject<{
187
189
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
188
190
  library?: "fontawesome" | "lucide" | undefined;
189
191
  } | undefined;
190
- })[], ("copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
192
+ })[], ("assistant" | "copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
191
193
  href: string | {
192
194
  base: string;
193
195
  query?: {
@@ -203,8 +205,9 @@ export declare const contextualSchema: z.ZodObject<{
203
205
  library?: "fontawesome" | "lucide" | undefined;
204
206
  } | undefined;
205
207
  })[]>;
208
+ display: z.ZodDefault<z.ZodOptional<z.ZodEnum<["header", "toc"]>>>;
206
209
  }, "strip", z.ZodTypeAny, {
207
- options: ("copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
210
+ options: ("assistant" | "copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
208
211
  href: string | {
209
212
  base: string;
210
213
  query?: {
@@ -220,8 +223,9 @@ export declare const contextualSchema: z.ZodObject<{
220
223
  library?: "fontawesome" | "lucide" | undefined;
221
224
  } | undefined;
222
225
  })[];
226
+ display: "header" | "toc";
223
227
  }, {
224
- options: ("copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
228
+ options: ("assistant" | "copy" | "view" | "chatgpt" | "claude" | "perplexity" | "grok" | "mcp" | "cursor" | "vscode" | {
225
229
  href: string | {
226
230
  base: string;
227
231
  query?: {
@@ -237,7 +241,9 @@ export declare const contextualSchema: z.ZodObject<{
237
241
  library?: "fontawesome" | "lucide" | undefined;
238
242
  } | undefined;
239
243
  })[];
244
+ display?: "header" | "toc" | undefined;
240
245
  }>;
241
246
  export type CustomContextualOption = z.infer<typeof customContextualOption>;
242
247
  export type ContextualConfig = z.infer<typeof contextualSchema>;
248
+ export type ContextualDisplay = z.infer<typeof contextualSchema>['display'];
243
249
  export type DetailedContextualHref = z.infer<typeof DetailedContextualHrefSchema>;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { iconSchema } from './reusable/icon.js';
3
3
  export const contextualOptions = [
4
+ 'assistant',
4
5
  'copy',
5
6
  'view',
6
7
  'chatgpt',
@@ -11,6 +12,7 @@ export const contextualOptions = [
11
12
  'cursor',
12
13
  'vscode',
13
14
  ];
15
+ export const contextualDisplayOptions = ['header', 'toc'];
14
16
  export const contextualHrefPresetValues = ['$page', '$path', '$mcp'];
15
17
  export const DetailedContextualHrefSchema = z.object({
16
18
  base: z.string(),
@@ -40,5 +42,10 @@ export const contextualSchema = z
40
42
  }, {
41
43
  message: 'Each contextual option can only appear once',
42
44
  }),
45
+ display: z
46
+ .enum(contextualDisplayOptions)
47
+ .optional()
48
+ .default('header')
49
+ .describe('Where to display the contextual options: "header" (default) shows them in the top-of-page context menu, "toc" shows them in the table of contents sidebar'),
43
50
  })
44
51
  .describe('Contextual options');
@@ -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 { GroupsConfig, DecoratedGroupsConfig } from './groups.js';
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' ? GroupsConfig : DecoratedGroupsConfig;
82
+ groups: T extends 'default' ? GroupNavigation<'default'>[] : GroupNavigation<'decorated'>[];
83
83
  } | {
84
- pages: T extends 'default' ? PagesConfig : DecoratedPagesConfig;
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 {};