@mintlify/validation 0.1.244 → 0.1.246
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 +124 -12
- package/dist/mint-config/schemas/v2/properties/api.d.ts +21 -0
- package/dist/mint-config/schemas/v2/properties/api.js +15 -0
- package/dist/mint-config/schemas/v2/themes/mint.d.ts +31 -3
- package/dist/mint-config/schemas/v2/themes/prism.d.ts +31 -3
- package/dist/mint-config/schemas/v2/themes/quill.d.ts +31 -3
- package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +21 -1
- package/dist/mint-config/schemas/v2/themes/reusable/index.js +0 -2
- package/dist/mint-config/schemas/v2/themes/venus.d.ts +31 -3
- package/dist/mint-config/upgrades/upgradeToDocsConfig.js +53 -36
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -39,8 +39,8 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
39
39
|
light: string;
|
|
40
40
|
dark: string;
|
|
41
41
|
}>]>>;
|
|
42
|
-
openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
|
|
43
42
|
api: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
|
|
44
44
|
playground: z.ZodOptional<z.ZodObject<{
|
|
45
45
|
display: z.ZodDefault<z.ZodOptional<z.ZodEnum<["interactive", "simple", "none"]>>>;
|
|
46
46
|
proxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -58,7 +58,18 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
58
58
|
}, {
|
|
59
59
|
languages?: string[] | undefined;
|
|
60
60
|
}>>;
|
|
61
|
+
mdx: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
auth: z.ZodOptional<z.ZodEnum<["bearer", "basic", "key", "cobo"]>>;
|
|
63
|
+
base: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
66
|
+
base?: string | string[] | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
69
|
+
base?: string | string[] | undefined;
|
|
70
|
+
}>>;
|
|
61
71
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
openapi?: string | string[] | undefined;
|
|
62
73
|
playground?: {
|
|
63
74
|
display: "simple" | "none" | "interactive";
|
|
64
75
|
proxy: boolean;
|
|
@@ -66,7 +77,12 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
66
77
|
examples?: {
|
|
67
78
|
languages?: string[] | undefined;
|
|
68
79
|
} | undefined;
|
|
80
|
+
mdx?: {
|
|
81
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
82
|
+
base?: string | string[] | undefined;
|
|
83
|
+
} | undefined;
|
|
69
84
|
}, {
|
|
85
|
+
openapi?: string | string[] | undefined;
|
|
70
86
|
playground?: {
|
|
71
87
|
display?: "simple" | "none" | "interactive" | undefined;
|
|
72
88
|
proxy?: boolean | undefined;
|
|
@@ -74,6 +90,10 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
74
90
|
examples?: {
|
|
75
91
|
languages?: string[] | undefined;
|
|
76
92
|
} | undefined;
|
|
93
|
+
mdx?: {
|
|
94
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
95
|
+
base?: string | string[] | undefined;
|
|
96
|
+
} | undefined;
|
|
77
97
|
}>>;
|
|
78
98
|
appearance: z.ZodOptional<z.ZodObject<{
|
|
79
99
|
default: z.ZodDefault<z.ZodEnum<["system", "light", "dark"]>>;
|
|
@@ -1511,8 +1531,8 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
1511
1531
|
light: string;
|
|
1512
1532
|
dark: string;
|
|
1513
1533
|
} | undefined;
|
|
1514
|
-
openapi?: string | string[] | undefined;
|
|
1515
1534
|
api?: {
|
|
1535
|
+
openapi?: string | string[] | undefined;
|
|
1516
1536
|
playground?: {
|
|
1517
1537
|
display: "simple" | "none" | "interactive";
|
|
1518
1538
|
proxy: boolean;
|
|
@@ -1520,6 +1540,10 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
1520
1540
|
examples?: {
|
|
1521
1541
|
languages?: string[] | undefined;
|
|
1522
1542
|
} | undefined;
|
|
1543
|
+
mdx?: {
|
|
1544
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
1545
|
+
base?: string | string[] | undefined;
|
|
1546
|
+
} | undefined;
|
|
1523
1547
|
} | undefined;
|
|
1524
1548
|
appearance?: {
|
|
1525
1549
|
strict: boolean;
|
|
@@ -1887,8 +1911,8 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
1887
1911
|
light: string;
|
|
1888
1912
|
dark: string;
|
|
1889
1913
|
} | undefined;
|
|
1890
|
-
openapi?: string | string[] | undefined;
|
|
1891
1914
|
api?: {
|
|
1915
|
+
openapi?: string | string[] | undefined;
|
|
1892
1916
|
playground?: {
|
|
1893
1917
|
display?: "simple" | "none" | "interactive" | undefined;
|
|
1894
1918
|
proxy?: boolean | undefined;
|
|
@@ -1896,6 +1920,10 @@ export declare const quillConfigSchema: z.ZodObject<{
|
|
|
1896
1920
|
examples?: {
|
|
1897
1921
|
languages?: string[] | undefined;
|
|
1898
1922
|
} | undefined;
|
|
1923
|
+
mdx?: {
|
|
1924
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
1925
|
+
base?: string | string[] | undefined;
|
|
1926
|
+
} | undefined;
|
|
1899
1927
|
} | undefined;
|
|
1900
1928
|
appearance?: {
|
|
1901
1929
|
default?: "light" | "dark" | "system" | undefined;
|
|
@@ -38,8 +38,8 @@ export declare const standardConfigSchema: {
|
|
|
38
38
|
light: string;
|
|
39
39
|
dark: string;
|
|
40
40
|
}>]>>;
|
|
41
|
-
openapi: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodArray<import("zod").ZodEffects<import("zod").ZodString, string, string>, "many">]>>;
|
|
42
41
|
api: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
42
|
+
openapi: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodString, string, string>, import("zod").ZodArray<import("zod").ZodEffects<import("zod").ZodString, string, string>, "many">]>>;
|
|
43
43
|
playground: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
44
44
|
display: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<["interactive", "simple", "none"]>>>;
|
|
45
45
|
proxy: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
@@ -57,7 +57,18 @@ export declare const standardConfigSchema: {
|
|
|
57
57
|
}, {
|
|
58
58
|
languages?: string[] | undefined;
|
|
59
59
|
}>>;
|
|
60
|
+
mdx: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
61
|
+
auth: import("zod").ZodOptional<import("zod").ZodEnum<["bearer", "basic", "key", "cobo"]>>;
|
|
62
|
+
base: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodArray<import("zod").ZodString, "many">]>>;
|
|
63
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
64
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
65
|
+
base?: string | string[] | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
68
|
+
base?: string | string[] | undefined;
|
|
69
|
+
}>>;
|
|
60
70
|
}, "strip", import("zod").ZodTypeAny, {
|
|
71
|
+
openapi?: string | string[] | undefined;
|
|
61
72
|
playground?: {
|
|
62
73
|
display: "simple" | "none" | "interactive";
|
|
63
74
|
proxy: boolean;
|
|
@@ -65,7 +76,12 @@ export declare const standardConfigSchema: {
|
|
|
65
76
|
examples?: {
|
|
66
77
|
languages?: string[] | undefined;
|
|
67
78
|
} | undefined;
|
|
79
|
+
mdx?: {
|
|
80
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
81
|
+
base?: string | string[] | undefined;
|
|
82
|
+
} | undefined;
|
|
68
83
|
}, {
|
|
84
|
+
openapi?: string | string[] | undefined;
|
|
69
85
|
playground?: {
|
|
70
86
|
display?: "simple" | "none" | "interactive" | undefined;
|
|
71
87
|
proxy?: boolean | undefined;
|
|
@@ -73,6 +89,10 @@ export declare const standardConfigSchema: {
|
|
|
73
89
|
examples?: {
|
|
74
90
|
languages?: string[] | undefined;
|
|
75
91
|
} | undefined;
|
|
92
|
+
mdx?: {
|
|
93
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
94
|
+
base?: string | string[] | undefined;
|
|
95
|
+
} | undefined;
|
|
76
96
|
}>>;
|
|
77
97
|
appearance: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
78
98
|
default: import("zod").ZodDefault<import("zod").ZodEnum<["system", "light", "dark"]>>;
|
|
@@ -13,7 +13,6 @@ import { integrationsSchema } from '../../properties/integrations.js';
|
|
|
13
13
|
import { logoSchema } from '../../properties/logo.js';
|
|
14
14
|
import { nameSchema } from '../../properties/name.js';
|
|
15
15
|
import { navigationSchema } from '../../properties/navigation/index.js';
|
|
16
|
-
import { openApiSchema } from '../../properties/reusable/openapi.js';
|
|
17
16
|
import { searchSchema } from '../../properties/search.js';
|
|
18
17
|
import { seoSchema } from '../../properties/seo.js';
|
|
19
18
|
import { stylingSchema } from '../../properties/styling.js';
|
|
@@ -25,7 +24,6 @@ export const standardConfigSchema = {
|
|
|
25
24
|
colors: colorsSchema,
|
|
26
25
|
logo: logoSchema.optional(),
|
|
27
26
|
favicon: faviconSchema.optional(),
|
|
28
|
-
openapi: openApiSchema.optional(),
|
|
29
27
|
api: apiSchema.optional(),
|
|
30
28
|
appearance: appearanceSchema.optional(),
|
|
31
29
|
background: backgroundSchema.optional(),
|
|
@@ -39,8 +39,8 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
39
39
|
light: string;
|
|
40
40
|
dark: string;
|
|
41
41
|
}>]>>;
|
|
42
|
-
openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
|
|
43
42
|
api: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
openapi: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">]>>;
|
|
44
44
|
playground: z.ZodOptional<z.ZodObject<{
|
|
45
45
|
display: z.ZodDefault<z.ZodOptional<z.ZodEnum<["interactive", "simple", "none"]>>>;
|
|
46
46
|
proxy: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -58,7 +58,18 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
58
58
|
}, {
|
|
59
59
|
languages?: string[] | undefined;
|
|
60
60
|
}>>;
|
|
61
|
+
mdx: z.ZodOptional<z.ZodObject<{
|
|
62
|
+
auth: z.ZodOptional<z.ZodEnum<["bearer", "basic", "key", "cobo"]>>;
|
|
63
|
+
base: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
66
|
+
base?: string | string[] | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
69
|
+
base?: string | string[] | undefined;
|
|
70
|
+
}>>;
|
|
61
71
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
openapi?: string | string[] | undefined;
|
|
62
73
|
playground?: {
|
|
63
74
|
display: "simple" | "none" | "interactive";
|
|
64
75
|
proxy: boolean;
|
|
@@ -66,7 +77,12 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
66
77
|
examples?: {
|
|
67
78
|
languages?: string[] | undefined;
|
|
68
79
|
} | undefined;
|
|
80
|
+
mdx?: {
|
|
81
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
82
|
+
base?: string | string[] | undefined;
|
|
83
|
+
} | undefined;
|
|
69
84
|
}, {
|
|
85
|
+
openapi?: string | string[] | undefined;
|
|
70
86
|
playground?: {
|
|
71
87
|
display?: "simple" | "none" | "interactive" | undefined;
|
|
72
88
|
proxy?: boolean | undefined;
|
|
@@ -74,6 +90,10 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
74
90
|
examples?: {
|
|
75
91
|
languages?: string[] | undefined;
|
|
76
92
|
} | undefined;
|
|
93
|
+
mdx?: {
|
|
94
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
95
|
+
base?: string | string[] | undefined;
|
|
96
|
+
} | undefined;
|
|
77
97
|
}>>;
|
|
78
98
|
appearance: z.ZodOptional<z.ZodObject<{
|
|
79
99
|
default: z.ZodDefault<z.ZodEnum<["system", "light", "dark"]>>;
|
|
@@ -1511,8 +1531,8 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
1511
1531
|
light: string;
|
|
1512
1532
|
dark: string;
|
|
1513
1533
|
} | undefined;
|
|
1514
|
-
openapi?: string | string[] | undefined;
|
|
1515
1534
|
api?: {
|
|
1535
|
+
openapi?: string | string[] | undefined;
|
|
1516
1536
|
playground?: {
|
|
1517
1537
|
display: "simple" | "none" | "interactive";
|
|
1518
1538
|
proxy: boolean;
|
|
@@ -1520,6 +1540,10 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
1520
1540
|
examples?: {
|
|
1521
1541
|
languages?: string[] | undefined;
|
|
1522
1542
|
} | undefined;
|
|
1543
|
+
mdx?: {
|
|
1544
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
1545
|
+
base?: string | string[] | undefined;
|
|
1546
|
+
} | undefined;
|
|
1523
1547
|
} | undefined;
|
|
1524
1548
|
appearance?: {
|
|
1525
1549
|
strict: boolean;
|
|
@@ -1887,8 +1911,8 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
1887
1911
|
light: string;
|
|
1888
1912
|
dark: string;
|
|
1889
1913
|
} | undefined;
|
|
1890
|
-
openapi?: string | string[] | undefined;
|
|
1891
1914
|
api?: {
|
|
1915
|
+
openapi?: string | string[] | undefined;
|
|
1892
1916
|
playground?: {
|
|
1893
1917
|
display?: "simple" | "none" | "interactive" | undefined;
|
|
1894
1918
|
proxy?: boolean | undefined;
|
|
@@ -1896,6 +1920,10 @@ export declare const venusConfigSchema: z.ZodObject<{
|
|
|
1896
1920
|
examples?: {
|
|
1897
1921
|
languages?: string[] | undefined;
|
|
1898
1922
|
} | undefined;
|
|
1923
|
+
mdx?: {
|
|
1924
|
+
auth?: "key" | "bearer" | "basic" | "cobo" | undefined;
|
|
1925
|
+
base?: string | string[] | undefined;
|
|
1926
|
+
} | undefined;
|
|
1899
1927
|
} | undefined;
|
|
1900
1928
|
appearance?: {
|
|
1901
1929
|
default?: "light" | "dark" | "system" | undefined;
|
|
@@ -44,11 +44,13 @@ function updateApiPlayground(config) {
|
|
|
44
44
|
}
|
|
45
45
|
function updateTopbarPrimary(config) {
|
|
46
46
|
const ctaButton = config.topbarCtaButton;
|
|
47
|
-
if (
|
|
47
|
+
if (!ctaButton)
|
|
48
|
+
return undefined;
|
|
49
|
+
if (ctaButton.type === undefined || ctaButton.type === 'link') {
|
|
48
50
|
return {
|
|
49
51
|
type: 'button',
|
|
50
|
-
label: ctaButton
|
|
51
|
-
href: ctaButton
|
|
52
|
+
label: ctaButton.name,
|
|
53
|
+
href: ctaButton.url,
|
|
52
54
|
};
|
|
53
55
|
}
|
|
54
56
|
return {
|
|
@@ -90,7 +92,7 @@ function updateFooterSocials(config) {
|
|
|
90
92
|
return footerSocials;
|
|
91
93
|
}
|
|
92
94
|
export function upgradeToDocsConfig(config) {
|
|
93
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
95
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
94
96
|
const fonts = updateFont(config);
|
|
95
97
|
const playground = updateApiPlayground(config);
|
|
96
98
|
const rounded = updateRounded(config);
|
|
@@ -100,7 +102,7 @@ export function upgradeToDocsConfig(config) {
|
|
|
100
102
|
primary: config.colors.primary,
|
|
101
103
|
light: config.colors.light,
|
|
102
104
|
dark: config.colors.dark,
|
|
103
|
-
}, favicon: config.favicon, navigation: updateNavigationToDocsConfig(config) }, (config.
|
|
105
|
+
}, favicon: config.favicon, navigation: updateNavigationToDocsConfig(config) }, (config.rounded || config.eyebrow || config.codeBlock
|
|
104
106
|
? {
|
|
105
107
|
styling: {
|
|
106
108
|
rounded,
|
|
@@ -108,27 +110,38 @@ export function upgradeToDocsConfig(config) {
|
|
|
108
110
|
codeblocks,
|
|
109
111
|
},
|
|
110
112
|
}
|
|
111
|
-
: {})), { logo: config.logo }), (playground ||
|
|
113
|
+
: {})), { logo: config.logo }), (playground ||
|
|
114
|
+
((_c = (_b = (_a = config.api) === null || _a === void 0 ? void 0 : _a.request) === null || _b === void 0 ? void 0 : _b.example) === null || _c === void 0 ? void 0 : _c.languages) ||
|
|
115
|
+
((_d = config.api) === null || _d === void 0 ? void 0 : _d.baseUrl) ||
|
|
116
|
+
((_f = (_e = config.api) === null || _e === void 0 ? void 0 : _e.auth) === null || _f === void 0 ? void 0 : _f.method) ||
|
|
117
|
+
config.openapi
|
|
112
118
|
? {
|
|
113
|
-
api: Object.assign(Object.assign({}, (playground
|
|
114
|
-
? Object.assign({ display: playground.display }, (playground.proxy !== undefined ? { proxy: playground.proxy } : {})) : {})), (((
|
|
119
|
+
api: Object.assign(Object.assign(Object.assign(Object.assign({}, (config.openapi ? { openapi: config.openapi } : {})), (playground
|
|
120
|
+
? Object.assign({ display: playground.display }, (playground.proxy !== undefined ? { proxy: playground.proxy } : {})) : {})), (((_j = (_h = (_g = config.api) === null || _g === void 0 ? void 0 : _g.request) === null || _h === void 0 ? void 0 : _h.example) === null || _j === void 0 ? void 0 : _j.languages)
|
|
115
121
|
? {
|
|
116
122
|
examples: {
|
|
117
123
|
languages: config.api.request.example.languages,
|
|
118
124
|
},
|
|
119
125
|
}
|
|
126
|
+
: {})), (((_k = config.api) === null || _k === void 0 ? void 0 : _k.baseUrl) || ((_m = (_l = config.api) === null || _l === void 0 ? void 0 : _l.auth) === null || _m === void 0 ? void 0 : _m.method)
|
|
127
|
+
? {
|
|
128
|
+
mdx: {
|
|
129
|
+
base: config.api.baseUrl,
|
|
130
|
+
auth: (_o = config.api.auth) === null || _o === void 0 ? void 0 : _o.method,
|
|
131
|
+
},
|
|
132
|
+
}
|
|
120
133
|
: {})),
|
|
121
134
|
}
|
|
122
135
|
: {})), (config.modeToggle
|
|
123
136
|
? {
|
|
124
137
|
appearance: {
|
|
125
|
-
default: (
|
|
126
|
-
strict: (
|
|
138
|
+
default: (_p = config.modeToggle.default) !== null && _p !== void 0 ? _p : 'system',
|
|
139
|
+
strict: (_q = config.modeToggle.isHidden) !== null && _q !== void 0 ? _q : false,
|
|
127
140
|
},
|
|
128
141
|
}
|
|
129
142
|
: {})), (config.background || config.backgroundImage || config.colors.background
|
|
130
143
|
? {
|
|
131
|
-
background: Object.assign(Object.assign(Object.assign({}, (config.backgroundImage ? { image: config.backgroundImage } : {})), { decoration: (
|
|
144
|
+
background: Object.assign(Object.assign(Object.assign({}, (config.backgroundImage ? { image: config.backgroundImage } : {})), { decoration: (_r = config.background) === null || _r === void 0 ? void 0 : _r.style }), (config.colors.background
|
|
132
145
|
? {
|
|
133
146
|
color: {
|
|
134
147
|
light: config.colors.background.light,
|
|
@@ -137,37 +150,41 @@ export function upgradeToDocsConfig(config) {
|
|
|
137
150
|
}
|
|
138
151
|
: {})),
|
|
139
152
|
}
|
|
140
|
-
: {})),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
: {})), (config.topbarLinks
|
|
154
|
+
? {
|
|
155
|
+
topbar: {
|
|
156
|
+
links: config.topbarLinks.map((item) => {
|
|
157
|
+
if (item.type === 'link' || item.type === undefined) {
|
|
158
|
+
return {
|
|
159
|
+
label: item.name,
|
|
160
|
+
href: item.url,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return {
|
|
165
|
+
label: _.capitalize(item.type),
|
|
166
|
+
href: item.url,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}),
|
|
170
|
+
primary: updateTopbarPrimary(config),
|
|
171
|
+
},
|
|
172
|
+
}
|
|
173
|
+
: {})), (((_s = config.search) === null || _s === void 0 ? void 0 : _s.prompt)
|
|
157
174
|
? {
|
|
158
175
|
search: {
|
|
159
176
|
prompt: config.search.prompt,
|
|
160
177
|
},
|
|
161
178
|
}
|
|
162
|
-
: {})), (config.metadata || ((
|
|
179
|
+
: {})), (config.metadata || ((_t = config.seo) === null || _t === void 0 ? void 0 : _t.indexHiddenPages) !== undefined
|
|
163
180
|
? {
|
|
164
|
-
seo: Object.assign(Object.assign({}, (config.metadata ? { metatags: config.metadata } : {})), { indexing: ((
|
|
181
|
+
seo: Object.assign(Object.assign({}, (config.metadata ? { metatags: config.metadata } : {})), { indexing: ((_u = config.seo) === null || _u === void 0 ? void 0 : _u.indexHiddenPages) ? 'navigable' : 'all' }),
|
|
165
182
|
}
|
|
166
183
|
: {})), (config.footer || config.footerSocials
|
|
167
184
|
? {
|
|
168
|
-
footer: Object.assign(Object.assign({}, (((
|
|
185
|
+
footer: Object.assign(Object.assign({}, (((_v = config.footer) === null || _v === void 0 ? void 0 : _v.socials) || config.footerSocials
|
|
169
186
|
? { socials: updateFooterSocials(config) }
|
|
170
|
-
: {})), (((
|
|
187
|
+
: {})), (((_w = config.footer) === null || _w === void 0 ? void 0 : _w.links)
|
|
171
188
|
? {
|
|
172
189
|
links: config.footer.links.map((group) => {
|
|
173
190
|
return {
|
|
@@ -185,19 +202,19 @@ export function upgradeToDocsConfig(config) {
|
|
|
185
202
|
}
|
|
186
203
|
: {})), (config.integrations || config.analytics
|
|
187
204
|
? {
|
|
188
|
-
integrations: Object.assign(Object.assign(Object.assign(Object.assign({}, config.analytics), (((
|
|
205
|
+
integrations: Object.assign(Object.assign(Object.assign(Object.assign({}, config.analytics), (((_x = config.integrations) === null || _x === void 0 ? void 0 : _x.intercom)
|
|
189
206
|
? {
|
|
190
207
|
intercom: {
|
|
191
208
|
appId: config.integrations.intercom,
|
|
192
209
|
},
|
|
193
210
|
}
|
|
194
|
-
: {})), (((
|
|
211
|
+
: {})), (((_y = config.integrations) === null || _y === void 0 ? void 0 : _y.frontchat)
|
|
195
212
|
? {
|
|
196
213
|
frontchat: {
|
|
197
214
|
snippetId: config.integrations.frontchat,
|
|
198
215
|
},
|
|
199
216
|
}
|
|
200
|
-
: {})), (((
|
|
217
|
+
: {})), (((_z = config.integrations) === null || _z === void 0 ? void 0 : _z.osano)
|
|
201
218
|
? {
|
|
202
219
|
osano: {
|
|
203
220
|
scriptSource: config.integrations.osano,
|
|
@@ -205,6 +222,6 @@ export function upgradeToDocsConfig(config) {
|
|
|
205
222
|
}
|
|
206
223
|
: {})),
|
|
207
224
|
}
|
|
208
|
-
: {})), (fonts ? { fonts } : {}));
|
|
225
|
+
: {})), (fonts ? { fonts } : {})), (config.redirects ? { redirects: config.redirects } : {}));
|
|
209
226
|
return v2Config;
|
|
210
227
|
}
|