@mintlify/validation 0.1.227 → 0.1.228
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.d.ts +8 -0
- package/dist/index.js +4 -11
- package/dist/mint-config/schemas/{anchors.d.ts → v1/anchors.d.ts} +4 -4
- package/dist/mint-config/schemas/{config.d.ts → v1/config.d.ts} +8 -8
- package/dist/mint-config/schemas/{navigation.d.ts → v1/navigation.d.ts} +2 -2
- package/dist/mint-config/schemas/{navigation.js → v1/navigation.js} +1 -1
- package/dist/mint-config/schemas/{openapiString.js → v1/openapiString.js} +1 -1
- package/dist/mint-config/schemas/v2/index.d.ts +6123 -0
- package/dist/mint-config/schemas/v2/index.js +11 -0
- package/dist/mint-config/schemas/v2/properties/$schema.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/$schema.js +7 -0
- package/dist/mint-config/schemas/v2/properties/api.d.ts +36 -0
- package/dist/mint-config/schemas/v2/properties/api.js +29 -0
- package/dist/mint-config/schemas/v2/properties/appearance.d.ts +11 -0
- package/dist/mint-config/schemas/v2/properties/appearance.js +10 -0
- package/dist/mint-config/schemas/v2/properties/background.d.ts +44 -0
- package/dist/mint-config/schemas/v2/properties/background.js +21 -0
- package/dist/mint-config/schemas/v2/properties/colors.d.ts +14 -0
- package/dist/mint-config/schemas/v2/properties/colors.js +10 -0
- package/dist/mint-config/schemas/v2/properties/description.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/description.js +5 -0
- package/dist/mint-config/schemas/v2/properties/favicon.d.ts +11 -0
- package/dist/mint-config/schemas/v2/properties/favicon.js +16 -0
- package/dist/mint-config/schemas/v2/properties/feedback.d.ts +14 -0
- package/dist/mint-config/schemas/v2/properties/feedback.js +8 -0
- package/dist/mint-config/schemas/v2/properties/font.d.ts +132 -0
- package/dist/mint-config/schemas/v2/properties/font.js +33 -0
- package/dist/mint-config/schemas/v2/properties/footer.d.ts +83 -0
- package/dist/mint-config/schemas/v2/properties/footer.js +32 -0
- package/dist/mint-config/schemas/v2/properties/icons.d.ts +8 -0
- package/dist/mint-config/schemas/v2/properties/icons.js +6 -0
- package/dist/mint-config/schemas/v2/properties/integrations.d.ts +241 -0
- package/dist/mint-config/schemas/v2/properties/integrations.js +85 -0
- package/dist/mint-config/schemas/v2/properties/legacy.d.ts +11 -0
- package/dist/mint-config/schemas/v2/properties/legacy.js +9 -0
- package/dist/mint-config/schemas/v2/properties/logo.d.ts +14 -0
- package/dist/mint-config/schemas/v2/properties/logo.js +21 -0
- package/dist/mint-config/schemas/v2/properties/name.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/name.js +6 -0
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +30 -0
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/navigation/dropdown.js +28 -0
- package/dist/mint-config/schemas/v2/properties/navigation/groups.d.ts +87 -0
- package/dist/mint-config/schemas/v2/properties/navigation/groups.js +16 -0
- package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +295 -0
- package/dist/mint-config/schemas/v2/properties/navigation/index.js +19 -0
- package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +125 -0
- package/dist/mint-config/schemas/v2/properties/navigation/languages.js +32 -0
- package/dist/mint-config/schemas/v2/properties/navigation/pages.d.ts +14 -0
- package/dist/mint-config/schemas/v2/properties/navigation/pages.js +5 -0
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/navigation/tabs.js +28 -0
- package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/navigation/version.js +26 -0
- package/dist/mint-config/schemas/v2/properties/redirects.d.ts +22 -0
- package/dist/mint-config/schemas/v2/properties/redirects.js +16 -0
- package/dist/mint-config/schemas/v2/properties/reusable/color.d.ts +12 -0
- package/dist/mint-config/schemas/v2/properties/reusable/color.js +11 -0
- package/dist/mint-config/schemas/v2/properties/reusable/hidden.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/reusable/hidden.js +2 -0
- package/dist/mint-config/schemas/v2/properties/reusable/href.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/reusable/href.js +5 -0
- package/dist/mint-config/schemas/v2/properties/reusable/icon.d.ts +11 -0
- package/dist/mint-config/schemas/v2/properties/reusable/icon.js +22 -0
- package/dist/mint-config/schemas/v2/properties/reusable/openapi.d.ts +3 -0
- package/dist/mint-config/schemas/v2/properties/reusable/openapi.js +35 -0
- package/dist/mint-config/schemas/v2/properties/reusable/page.d.ts +2 -0
- package/dist/mint-config/schemas/v2/properties/reusable/page.js +7 -0
- package/dist/mint-config/schemas/v2/properties/search.d.ts +8 -0
- package/dist/mint-config/schemas/v2/properties/search.js +9 -0
- package/dist/mint-config/schemas/v2/properties/seo.d.ts +12 -0
- package/dist/mint-config/schemas/v2/properties/seo.js +14 -0
- package/dist/mint-config/schemas/v2/properties/styling.d.ts +14 -0
- package/dist/mint-config/schemas/v2/properties/styling.js +16 -0
- package/dist/mint-config/schemas/v2/properties/topbar.d.ts +61 -0
- package/dist/mint-config/schemas/v2/properties/topbar.js +22 -0
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +1532 -0
- package/dist/mint-config/schemas/v2/themes/mint.js +3 -0
- package/dist/mint-config/schemas/v2/themes/prism.d.ts +1532 -0
- package/dist/mint-config/schemas/v2/themes/prism.js +3 -0
- package/dist/mint-config/schemas/v2/themes/quill.d.ts +1532 -0
- package/dist/mint-config/schemas/v2/themes/quill.js +3 -0
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +956 -0
- package/dist/mint-config/schemas/v2/themes/reusable/index.js +46 -0
- package/dist/mint-config/schemas/v2/themes/venus.d.ts +1532 -0
- package/dist/mint-config/schemas/v2/themes/venus.js +3 -0
- package/dist/mint-config/validateMintConfig.d.ts +4 -4
- package/dist/mint-config/validateMintConfig.js +1 -1
- package/dist/mint-config/warnings/aggregateWarnings.d.ts +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- /package/dist/mint-config/schemas/{analytics.d.ts → v1/analytics.d.ts} +0 -0
- /package/dist/mint-config/schemas/{analytics.js → v1/analytics.js} +0 -0
- /package/dist/mint-config/schemas/{anchorColors.d.ts → v1/anchorColors.d.ts} +0 -0
- /package/dist/mint-config/schemas/{anchorColors.js → v1/anchorColors.js} +0 -0
- /package/dist/mint-config/schemas/{anchors.js → v1/anchors.js} +0 -0
- /package/dist/mint-config/schemas/{apiReference.d.ts → v1/apiReference.d.ts} +0 -0
- /package/dist/mint-config/schemas/{apiReference.js → v1/apiReference.js} +0 -0
- /package/dist/mint-config/schemas/{background.d.ts → v1/background.d.ts} +0 -0
- /package/dist/mint-config/schemas/{background.js → v1/background.js} +0 -0
- /package/dist/mint-config/schemas/{basics.d.ts → v1/basics.d.ts} +0 -0
- /package/dist/mint-config/schemas/{basics.js → v1/basics.js} +0 -0
- /package/dist/mint-config/schemas/{colors.d.ts → v1/colors.d.ts} +0 -0
- /package/dist/mint-config/schemas/{colors.js → v1/colors.js} +0 -0
- /package/dist/mint-config/schemas/{config.js → v1/config.js} +0 -0
- /package/dist/mint-config/schemas/{favicon.d.ts → v1/favicon.d.ts} +0 -0
- /package/dist/mint-config/schemas/{favicon.js → v1/favicon.js} +0 -0
- /package/dist/mint-config/schemas/{font.d.ts → v1/font.d.ts} +0 -0
- /package/dist/mint-config/schemas/{font.js → v1/font.js} +0 -0
- /package/dist/mint-config/schemas/{footer.d.ts → v1/footer.d.ts} +0 -0
- /package/dist/mint-config/schemas/{footer.js → v1/footer.js} +0 -0
- /package/dist/mint-config/schemas/{hexColor.d.ts → v1/hexColor.d.ts} +0 -0
- /package/dist/mint-config/schemas/{hexColor.js → v1/hexColor.js} +0 -0
- /package/dist/mint-config/schemas/{integrations.d.ts → v1/integrations.d.ts} +0 -0
- /package/dist/mint-config/schemas/{integrations.js → v1/integrations.js} +0 -0
- /package/dist/mint-config/schemas/{openapiAnchorOrTab.d.ts → v1/openapiAnchorOrTab.d.ts} +0 -0
- /package/dist/mint-config/schemas/{openapiAnchorOrTab.js → v1/openapiAnchorOrTab.js} +0 -0
- /package/dist/mint-config/schemas/{openapiString.d.ts → v1/openapiString.d.ts} +0 -0
- /package/dist/mint-config/schemas/{seo.d.ts → v1/seo.d.ts} +0 -0
- /package/dist/mint-config/schemas/{seo.js → v1/seo.js} +0 -0
- /package/dist/mint-config/schemas/{sidebar.d.ts → v1/sidebar.d.ts} +0 -0
- /package/dist/mint-config/schemas/{sidebar.js → v1/sidebar.js} +0 -0
- /package/dist/mint-config/schemas/{tabs.d.ts → v1/tabs.d.ts} +0 -0
- /package/dist/mint-config/schemas/{tabs.js → v1/tabs.js} +0 -0
- /package/dist/mint-config/schemas/{topbar.d.ts → v1/topbar.d.ts} +0 -0
- /package/dist/mint-config/schemas/{topbar.js → v1/topbar.js} +0 -0
- /package/dist/mint-config/schemas/{versions.d.ts → v1/versions.d.ts} +0 -0
- /package/dist/mint-config/schemas/{versions.js → v1/versions.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const iconTypes = [
|
|
3
|
+
'brands',
|
|
4
|
+
'duotone',
|
|
5
|
+
'light',
|
|
6
|
+
'regular',
|
|
7
|
+
'sharp-duotone-solid',
|
|
8
|
+
'sharp-light',
|
|
9
|
+
'sharp-regular',
|
|
10
|
+
'sharp-solid',
|
|
11
|
+
'sharp-thin',
|
|
12
|
+
'solid',
|
|
13
|
+
'thin',
|
|
14
|
+
];
|
|
15
|
+
const iconNameSchema = z
|
|
16
|
+
.string({
|
|
17
|
+
invalid_type_error: 'Anchor icon must be the name of a Font Awesome icon. Visit this link to see all the available icons: https://fontawesome.com/icons',
|
|
18
|
+
})
|
|
19
|
+
.refine((icon) => !icon.startsWith('fa-'), "Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name");
|
|
20
|
+
export const iconSchema = z
|
|
21
|
+
.union([iconNameSchema, z.object({ style: z.enum(iconTypes), name: iconNameSchema })])
|
|
22
|
+
.describe('The icon to be displayed in the section');
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import isAbsoluteUrl from 'is-absolute-url';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { normalizeRelativePath } from '../../../../transforms/normalizeRelativePath.js';
|
|
4
|
+
export const openapiStringSchema = z
|
|
5
|
+
.string()
|
|
6
|
+
.trim()
|
|
7
|
+
.nonempty()
|
|
8
|
+
.transform((value, ctx) => {
|
|
9
|
+
if (isAbsoluteUrl(value)) {
|
|
10
|
+
try {
|
|
11
|
+
const url = new URL(value);
|
|
12
|
+
if (url.protocol !== 'https:') {
|
|
13
|
+
ctx.addIssue({
|
|
14
|
+
code: z.ZodIssueCode.custom,
|
|
15
|
+
message: 'Must use protocol https',
|
|
16
|
+
});
|
|
17
|
+
return z.NEVER;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch (_a) {
|
|
21
|
+
ctx.addIssue({
|
|
22
|
+
code: z.ZodIssueCode.custom,
|
|
23
|
+
message: 'Invalid URL',
|
|
24
|
+
});
|
|
25
|
+
return z.NEVER;
|
|
26
|
+
}
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return normalizeRelativePath(value);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export const openApiSchema = z
|
|
34
|
+
.union([openapiStringSchema, z.array(openapiStringSchema)])
|
|
35
|
+
.describe('A string or an array of strings of absolute or relative urls pointing to the OpenAPI file(s)');
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { normalizeRelativePath } from '../../../../transforms/normalizeRelativePath.js';
|
|
3
|
+
export const pageSchema = z
|
|
4
|
+
.string()
|
|
5
|
+
.nonempty()
|
|
6
|
+
.transform(normalizeRelativePath)
|
|
7
|
+
.describe('A page in the navigation. Referenced by the path to the page. Example: path/to/page');
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const metatagsSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3
|
+
export declare const seoSchema: z.ZodObject<{
|
|
4
|
+
metatags: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
5
|
+
indexing: z.ZodDefault<z.ZodEnum<["navigable", "all"]>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
indexing: "all" | "navigable";
|
|
8
|
+
metatags?: Record<string, string> | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
metatags?: Record<string, string> | undefined;
|
|
11
|
+
indexing?: "all" | "navigable" | undefined;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const metatagsSchema = z
|
|
3
|
+
.record(z.string(), z.string().nonempty())
|
|
4
|
+
.optional()
|
|
5
|
+
.describe('Meta tags added to every page. Must be a valid key-value pair');
|
|
6
|
+
export const seoSchema = z
|
|
7
|
+
.object({
|
|
8
|
+
metatags: metatagsSchema.optional(),
|
|
9
|
+
indexing: z
|
|
10
|
+
.enum(['navigable', 'all'])
|
|
11
|
+
.default('navigable')
|
|
12
|
+
.describe('Specify which pages to be indexed by search engines. Setting "navigable" indexes pages that are set in navigation, "all" indexes all pages'),
|
|
13
|
+
})
|
|
14
|
+
.describe('SEO indexing configurations');
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const stylingSchema: z.ZodObject<{
|
|
3
|
+
rounded: z.ZodDefault<z.ZodOptional<z.ZodEnum<["regular", "sharp"]>>>;
|
|
4
|
+
eyebrows: z.ZodDefault<z.ZodOptional<z.ZodEnum<["section", "breadcrumbs"]>>>;
|
|
5
|
+
codeblocks: z.ZodDefault<z.ZodOptional<z.ZodEnum<["auto", "dark"]>>>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
rounded: "regular" | "sharp";
|
|
8
|
+
eyebrows: "section" | "breadcrumbs";
|
|
9
|
+
codeblocks: "dark" | "auto";
|
|
10
|
+
}, {
|
|
11
|
+
rounded?: "regular" | "sharp" | undefined;
|
|
12
|
+
eyebrows?: "section" | "breadcrumbs" | undefined;
|
|
13
|
+
codeblocks?: "dark" | "auto" | undefined;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const stylingSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
rounded: z
|
|
5
|
+
.enum(['regular', 'sharp'])
|
|
6
|
+
.optional()
|
|
7
|
+
.default('regular')
|
|
8
|
+
.describe('Whether corners are rounded or sharp'),
|
|
9
|
+
eyebrows: z
|
|
10
|
+
.enum(['section', 'breadcrumbs'])
|
|
11
|
+
.optional()
|
|
12
|
+
.default('section')
|
|
13
|
+
.describe('The eyebrows style of the content'),
|
|
14
|
+
codeblocks: z.enum(['auto', 'dark']).optional().default('auto').describe('The codeblock theme'),
|
|
15
|
+
})
|
|
16
|
+
.describe('Styling configurations');
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const topbarSchema: z.ZodObject<{
|
|
3
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4
|
+
label: z.ZodString;
|
|
5
|
+
href: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
href: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}, {
|
|
10
|
+
href: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>, "many">>;
|
|
13
|
+
primary: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"button">;
|
|
15
|
+
label: z.ZodString;
|
|
16
|
+
href: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
type: "button";
|
|
19
|
+
href: string;
|
|
20
|
+
label: string;
|
|
21
|
+
}, {
|
|
22
|
+
type: "button";
|
|
23
|
+
href: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"github">;
|
|
27
|
+
href: z.ZodString;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
type: "github";
|
|
30
|
+
href: string;
|
|
31
|
+
}, {
|
|
32
|
+
type: "github";
|
|
33
|
+
href: string;
|
|
34
|
+
}>]>>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
links?: {
|
|
37
|
+
href: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}[] | undefined;
|
|
40
|
+
primary?: {
|
|
41
|
+
type: "button";
|
|
42
|
+
href: string;
|
|
43
|
+
label: string;
|
|
44
|
+
} | {
|
|
45
|
+
type: "github";
|
|
46
|
+
href: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
links?: {
|
|
50
|
+
href: string;
|
|
51
|
+
label: string;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
primary?: {
|
|
54
|
+
type: "button";
|
|
55
|
+
href: string;
|
|
56
|
+
label: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "github";
|
|
59
|
+
href: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
}>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { hrefSchema } from './reusable/href.js';
|
|
3
|
+
const linkSchema = z.object({
|
|
4
|
+
label: z.string(),
|
|
5
|
+
href: hrefSchema,
|
|
6
|
+
});
|
|
7
|
+
const buttonSchema = z.object({
|
|
8
|
+
type: z.literal('button'),
|
|
9
|
+
label: z.string(),
|
|
10
|
+
href: hrefSchema,
|
|
11
|
+
});
|
|
12
|
+
const githubSchema = z.object({
|
|
13
|
+
type: z.literal('github'),
|
|
14
|
+
href: hrefSchema,
|
|
15
|
+
});
|
|
16
|
+
const primarySchema = z.discriminatedUnion('type', [buttonSchema, githubSchema]);
|
|
17
|
+
export const topbarSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
links: z.array(linkSchema).optional().describe('The links in the topbar'),
|
|
20
|
+
primary: primarySchema.optional().describe('The primary CTA in the topbar'),
|
|
21
|
+
})
|
|
22
|
+
.describe('Topbar content and settings');
|