@mintlify/validation 0.1.240 → 0.1.242

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 (25) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +1 -0
  3. package/dist/mint-config/schemas/v2/index.d.ts +180 -180
  4. package/dist/mint-config/schemas/v2/properties/background.d.ts +10 -10
  5. package/dist/mint-config/schemas/v2/properties/background.js +2 -2
  6. package/dist/mint-config/schemas/v2/properties/font.d.ts +2 -0
  7. package/dist/mint-config/schemas/v2/properties/index.d.ts +1 -0
  8. package/dist/mint-config/schemas/v2/properties/index.js +1 -0
  9. package/dist/mint-config/schemas/v2/properties/navigation/anchors.d.ts +10 -10
  10. package/dist/mint-config/schemas/v2/properties/navigation/anchors.js +2 -2
  11. package/dist/mint-config/schemas/v2/properties/navigation/global.d.ts +14 -14
  12. package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +18 -18
  13. package/dist/mint-config/schemas/v2/properties/reusable/color.d.ts +7 -7
  14. package/dist/mint-config/schemas/v2/properties/reusable/color.js +3 -3
  15. package/dist/mint-config/schemas/v2/properties/styling.d.ts +3 -3
  16. package/dist/mint-config/schemas/v2/properties/styling.js +5 -1
  17. package/dist/mint-config/schemas/v2/themes/mint.d.ts +45 -45
  18. package/dist/mint-config/schemas/v2/themes/prism.d.ts +45 -45
  19. package/dist/mint-config/schemas/v2/themes/quill.d.ts +45 -45
  20. package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +31 -31
  21. package/dist/mint-config/schemas/v2/themes/venus.d.ts +45 -45
  22. package/dist/mint-config/upgrades/updateNavigationToDocsConfig.js +3 -2
  23. package/dist/mint-config/upgrades/upgradeToDocsConfig.js +23 -20
  24. package/dist/tsconfig.build.tsbuildinfo +1 -1
  25. package/package.json +2 -2
@@ -111,14 +111,14 @@ export declare const venusConfigSchema: z.ZodObject<{
111
111
  }>]>>;
112
112
  decoration: z.ZodDefault<z.ZodEnum<["gradient", "grid", "windows", "none"]>>;
113
113
  color: z.ZodOptional<z.ZodObject<{
114
- light: z.ZodString;
115
- dark: z.ZodString;
114
+ light: z.ZodOptional<z.ZodString>;
115
+ dark: z.ZodOptional<z.ZodString>;
116
116
  }, "strict", z.ZodTypeAny, {
117
- light: string;
118
- dark: string;
117
+ light?: string | undefined;
118
+ dark?: string | undefined;
119
119
  }, {
120
- light: string;
121
- dark: string;
120
+ light?: string | undefined;
121
+ dark?: string | undefined;
122
122
  }>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
124
  decoration: "none" | "gradient" | "grid" | "windows";
@@ -127,8 +127,8 @@ export declare const venusConfigSchema: z.ZodObject<{
127
127
  dark: string;
128
128
  } | undefined;
129
129
  color?: {
130
- light: string;
131
- dark: string;
130
+ light?: string | undefined;
131
+ dark?: string | undefined;
132
132
  } | undefined;
133
133
  }, {
134
134
  image?: string | {
@@ -137,8 +137,8 @@ export declare const venusConfigSchema: z.ZodObject<{
137
137
  } | undefined;
138
138
  decoration?: "none" | "gradient" | "grid" | "windows" | undefined;
139
139
  color?: {
140
- light: string;
141
- dark: string;
140
+ light?: string | undefined;
141
+ dark?: string | undefined;
142
142
  } | undefined;
143
143
  }>>;
144
144
  topbar: z.ZodOptional<z.ZodObject<{
@@ -609,14 +609,14 @@ export declare const venusConfigSchema: z.ZodObject<{
609
609
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
610
610
  }>]>>;
611
611
  color: z.ZodOptional<z.ZodObject<{
612
- light: z.ZodString;
613
- dark: z.ZodString;
612
+ light: z.ZodOptional<z.ZodString>;
613
+ dark: z.ZodOptional<z.ZodString>;
614
614
  }, "strict", z.ZodTypeAny, {
615
- light: string;
616
- dark: string;
615
+ light?: string | undefined;
616
+ dark?: string | undefined;
617
617
  }, {
618
- light: string;
619
- dark: string;
618
+ light?: string | undefined;
619
+ dark?: string | undefined;
620
620
  }>>;
621
621
  hidden: z.ZodOptional<z.ZodBoolean>;
622
622
  }, "strip", z.ZodTypeAny, {
@@ -626,8 +626,8 @@ export declare const venusConfigSchema: z.ZodObject<{
626
626
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
627
627
  } | undefined;
628
628
  color?: {
629
- light: string;
630
- dark: string;
629
+ light?: string | undefined;
630
+ dark?: string | undefined;
631
631
  } | undefined;
632
632
  hidden?: boolean | undefined;
633
633
  }, {
@@ -637,8 +637,8 @@ export declare const venusConfigSchema: z.ZodObject<{
637
637
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
638
638
  } | undefined;
639
639
  color?: {
640
- light: string;
641
- dark: string;
640
+ light?: string | undefined;
641
+ dark?: string | undefined;
642
642
  } | undefined;
643
643
  hidden?: boolean | undefined;
644
644
  }>, z.ZodObject<{
@@ -688,8 +688,8 @@ export declare const venusConfigSchema: z.ZodObject<{
688
688
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
689
689
  } | undefined;
690
690
  color?: {
691
- light: string;
692
- dark: string;
691
+ light?: string | undefined;
692
+ dark?: string | undefined;
693
693
  } | undefined;
694
694
  hidden?: boolean | undefined;
695
695
  } & {
@@ -735,8 +735,8 @@ export declare const venusConfigSchema: z.ZodObject<{
735
735
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
736
736
  } | undefined;
737
737
  color?: {
738
- light: string;
739
- dark: string;
738
+ light?: string | undefined;
739
+ dark?: string | undefined;
740
740
  } | undefined;
741
741
  hidden?: boolean | undefined;
742
742
  } & {
@@ -784,8 +784,8 @@ export declare const venusConfigSchema: z.ZodObject<{
784
784
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
785
785
  } | undefined;
786
786
  color?: {
787
- light: string;
788
- dark: string;
787
+ light?: string | undefined;
788
+ dark?: string | undefined;
789
789
  } | undefined;
790
790
  hidden?: boolean | undefined;
791
791
  } & {
@@ -833,8 +833,8 @@ export declare const venusConfigSchema: z.ZodObject<{
833
833
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
834
834
  } | undefined;
835
835
  color?: {
836
- light: string;
837
- dark: string;
836
+ light?: string | undefined;
837
+ dark?: string | undefined;
838
838
  } | undefined;
839
839
  hidden?: boolean | undefined;
840
840
  } & {
@@ -1020,15 +1020,15 @@ export declare const venusConfigSchema: z.ZodObject<{
1020
1020
  styling: z.ZodOptional<z.ZodObject<{
1021
1021
  rounded: z.ZodDefault<z.ZodOptional<z.ZodEnum<["regular", "sharp"]>>>;
1022
1022
  eyebrows: z.ZodDefault<z.ZodOptional<z.ZodEnum<["section", "breadcrumbs"]>>>;
1023
- codeblocks: z.ZodDefault<z.ZodOptional<z.ZodEnum<["auto", "dark"]>>>;
1023
+ codeblocks: z.ZodDefault<z.ZodOptional<z.ZodEnum<["system", "dark"]>>>;
1024
1024
  }, "strip", z.ZodTypeAny, {
1025
1025
  rounded: "regular" | "sharp";
1026
1026
  eyebrows: "section" | "breadcrumbs";
1027
- codeblocks: "dark" | "auto";
1027
+ codeblocks: "dark" | "system";
1028
1028
  }, {
1029
1029
  rounded?: "regular" | "sharp" | undefined;
1030
1030
  eyebrows?: "section" | "breadcrumbs" | undefined;
1031
- codeblocks?: "dark" | "auto" | undefined;
1031
+ codeblocks?: "dark" | "system" | undefined;
1032
1032
  }>>;
1033
1033
  redirects: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
1034
1034
  source: z.ZodString;
@@ -1399,8 +1399,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1399
1399
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1400
1400
  } | undefined;
1401
1401
  color?: {
1402
- light: string;
1403
- dark: string;
1402
+ light?: string | undefined;
1403
+ dark?: string | undefined;
1404
1404
  } | undefined;
1405
1405
  hidden?: boolean | undefined;
1406
1406
  } & {
@@ -1505,8 +1505,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1505
1505
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1506
1506
  } | undefined;
1507
1507
  color?: {
1508
- light: string;
1509
- dark: string;
1508
+ light?: string | undefined;
1509
+ dark?: string | undefined;
1510
1510
  } | undefined;
1511
1511
  hidden?: boolean | undefined;
1512
1512
  } & {
@@ -1550,8 +1550,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1550
1550
  dark: string;
1551
1551
  } | undefined;
1552
1552
  color?: {
1553
- light: string;
1554
- dark: string;
1553
+ light?: string | undefined;
1554
+ dark?: string | undefined;
1555
1555
  } | undefined;
1556
1556
  } | undefined;
1557
1557
  topbar?: {
@@ -1610,7 +1610,7 @@ export declare const venusConfigSchema: z.ZodObject<{
1610
1610
  styling?: {
1611
1611
  rounded: "regular" | "sharp";
1612
1612
  eyebrows: "section" | "breadcrumbs";
1613
- codeblocks: "dark" | "auto";
1613
+ codeblocks: "dark" | "system";
1614
1614
  } | undefined;
1615
1615
  redirects?: {
1616
1616
  source: string;
@@ -1779,8 +1779,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1779
1779
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1780
1780
  } | undefined;
1781
1781
  color?: {
1782
- light: string;
1783
- dark: string;
1782
+ light?: string | undefined;
1783
+ dark?: string | undefined;
1784
1784
  } | undefined;
1785
1785
  hidden?: boolean | undefined;
1786
1786
  } & {
@@ -1885,8 +1885,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1885
1885
  style?: "brands" | "duotone" | "light" | "regular" | "sharp-duotone-solid" | "sharp-light" | "sharp-regular" | "sharp-solid" | "sharp-thin" | "solid" | "thin" | undefined;
1886
1886
  } | undefined;
1887
1887
  color?: {
1888
- light: string;
1889
- dark: string;
1888
+ light?: string | undefined;
1889
+ dark?: string | undefined;
1890
1890
  } | undefined;
1891
1891
  hidden?: boolean | undefined;
1892
1892
  } & {
@@ -1931,8 +1931,8 @@ export declare const venusConfigSchema: z.ZodObject<{
1931
1931
  } | undefined;
1932
1932
  decoration?: "none" | "gradient" | "grid" | "windows" | undefined;
1933
1933
  color?: {
1934
- light: string;
1935
- dark: string;
1934
+ light?: string | undefined;
1935
+ dark?: string | undefined;
1936
1936
  } | undefined;
1937
1937
  } | undefined;
1938
1938
  topbar?: {
@@ -1991,7 +1991,7 @@ export declare const venusConfigSchema: z.ZodObject<{
1991
1991
  styling?: {
1992
1992
  rounded?: "regular" | "sharp" | undefined;
1993
1993
  eyebrows?: "section" | "breadcrumbs" | undefined;
1994
- codeblocks?: "dark" | "auto" | undefined;
1994
+ codeblocks?: "dark" | "system" | undefined;
1995
1995
  } | undefined;
1996
1996
  redirects?: {
1997
1997
  source: string;
@@ -107,8 +107,9 @@ const processDivisions = (type, divisions = [], navigationGroups = [], shouldIns
107
107
  const { matchedGroups } = findPagesForPrefix(remainingGroups, undefined, versionName);
108
108
  if (type === 'tabs') {
109
109
  result.unshift(Object.assign(Object.assign({}, (((_a = config === null || config === void 0 ? void 0 : config.primaryTab) === null || _a === void 0 ? void 0 : _a.name)
110
- ? { tab: config.primaryTab.name, hidden: config.primaryTab.isDefaultHidden }
111
- : DEFAULT_TAB)), { groups: matchedGroups }));
110
+ ? Object.assign({ tab: config.primaryTab.name }, (config.primaryTab.isDefaultHidden !== undefined && {
111
+ hidden: config.primaryTab.isDefaultHidden,
112
+ })) : DEFAULT_TAB)), { groups: matchedGroups }));
112
113
  }
113
114
  else {
114
115
  result.push(Object.assign(Object.assign({}, (((_b = config === null || config === void 0 ? void 0 : config.topAnchor) === null || _b === void 0 ? void 0 : _b.name) ? { anchor: config.topAnchor.name } : DEFAULT_ANCHOR)), { groups: matchedGroups }));
@@ -20,7 +20,7 @@ function updateEyebrows(config) {
20
20
  }
21
21
  function updateCodeblocks(config) {
22
22
  var _a;
23
- return ((_a = config.codeBlock) === null || _a === void 0 ? void 0 : _a.mode) === 'dark' ? 'dark' : 'auto';
23
+ return ((_a = config.codeBlock) === null || _a === void 0 ? void 0 : _a.mode) === 'dark' ? 'dark' : 'system';
24
24
  }
25
25
  function updateApiPlayground(config) {
26
26
  var _a, _b, _c, _d;
@@ -58,6 +58,7 @@ function updateTopbarPrimary(config) {
58
58
  }
59
59
  function updateFont(config) {
60
60
  const font = config.font;
61
+ const result = {};
61
62
  if (!font)
62
63
  return undefined;
63
64
  if ('family' in font) {
@@ -67,13 +68,13 @@ function updateFont(config) {
67
68
  const { url } = details, rest = __rest(details, ["url"]);
68
69
  return Object.assign(Object.assign({}, rest), (url ? { source: url } : {}));
69
70
  }
70
- if ('headings' in font) {
71
- font.headings = transformFontDetails(font.headings);
71
+ if (font.headings) {
72
+ result.heading = transformFontDetails(font.headings);
72
73
  }
73
- if ('body' in font) {
74
- font.body = transformFontDetails(font.body);
74
+ if (font.body) {
75
+ result.body = transformFontDetails(font.body);
75
76
  }
76
- return font;
77
+ return result;
77
78
  }
78
79
  function updateFooterSocials(config) {
79
80
  var _a, _b, _c;
@@ -89,7 +90,7 @@ function updateFooterSocials(config) {
89
90
  return footerSocials;
90
91
  }
91
92
  export function upgradeToDocsConfig(config) {
92
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
93
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
93
94
  const fonts = updateFont(config);
94
95
  const playground = updateApiPlayground(config);
95
96
  const rounded = updateRounded(config);
@@ -130,14 +131,14 @@ export function upgradeToDocsConfig(config) {
130
131
  background: Object.assign(Object.assign(Object.assign({}, (config.backgroundImage ? { image: config.backgroundImage } : {})), { decoration: (_k = (_j = config.background) === null || _j === void 0 ? void 0 : _j.style) !== null && _k !== void 0 ? _k : 'none' }), (config.colors.background
131
132
  ? {
132
133
  color: {
133
- light: (_l = config.colors.background.light) !== null && _l !== void 0 ? _l : '',
134
- dark: (_m = config.colors.background.dark) !== null && _m !== void 0 ? _m : '',
134
+ light: config.colors.background.light,
135
+ dark: config.colors.background.dark,
135
136
  },
136
137
  }
137
138
  : {})),
138
139
  }
139
140
  : {})), { topbar: {
140
- links: (_o = config.topbarLinks) === null || _o === void 0 ? void 0 : _o.map((item) => {
141
+ links: (_l = config.topbarLinks) === null || _l === void 0 ? void 0 : _l.map((item) => {
141
142
  if (item.type === 'link' || item.type === undefined) {
142
143
  return {
143
144
  label: item.name,
@@ -168,19 +169,21 @@ export function upgradeToDocsConfig(config) {
168
169
  }
169
170
  : {})),
170
171
  }
171
- : {})), (config.search
172
+ : {})), (((_m = config.search) === null || _m === void 0 ? void 0 : _m.prompt)
172
173
  ? {
173
- search: config.search,
174
+ search: {
175
+ prompt: config.search.prompt,
176
+ },
174
177
  }
175
- : {})), (config.metadata || ((_p = config.seo) === null || _p === void 0 ? void 0 : _p.indexHiddenPages) !== undefined
178
+ : {})), (config.metadata || ((_o = config.seo) === null || _o === void 0 ? void 0 : _o.indexHiddenPages) !== undefined
176
179
  ? {
177
- seo: Object.assign(Object.assign({}, (config.metadata ? { metatags: config.metadata } : {})), { indexing: ((_q = config.seo) === null || _q === void 0 ? void 0 : _q.indexHiddenPages) ? 'navigable' : 'all' }),
180
+ seo: Object.assign(Object.assign({}, (config.metadata ? { metatags: config.metadata } : {})), { indexing: ((_p = config.seo) === null || _p === void 0 ? void 0 : _p.indexHiddenPages) ? 'navigable' : 'all' }),
178
181
  }
179
182
  : {})), (config.footer || config.footerSocials
180
183
  ? {
181
- footer: Object.assign(Object.assign({}, (((_r = config.footer) === null || _r === void 0 ? void 0 : _r.socials) || config.footerSocials
184
+ footer: Object.assign(Object.assign({}, (((_q = config.footer) === null || _q === void 0 ? void 0 : _q.socials) || config.footerSocials
182
185
  ? { socials: updateFooterSocials(config) }
183
- : {})), (((_s = config.footer) === null || _s === void 0 ? void 0 : _s.links)
186
+ : {})), (((_r = config.footer) === null || _r === void 0 ? void 0 : _r.links)
184
187
  ? {
185
188
  links: config.footer.links.map((group) => {
186
189
  return {
@@ -198,19 +201,19 @@ export function upgradeToDocsConfig(config) {
198
201
  }
199
202
  : {})), (config.integrations || config.analytics
200
203
  ? {
201
- integrations: Object.assign(Object.assign(Object.assign(Object.assign({}, config.analytics), (((_t = config.integrations) === null || _t === void 0 ? void 0 : _t.intercom)
204
+ integrations: Object.assign(Object.assign(Object.assign(Object.assign({}, config.analytics), (((_s = config.integrations) === null || _s === void 0 ? void 0 : _s.intercom)
202
205
  ? {
203
206
  intercom: {
204
207
  appId: config.integrations.intercom,
205
208
  },
206
209
  }
207
- : {})), (((_u = config.integrations) === null || _u === void 0 ? void 0 : _u.frontchat)
210
+ : {})), (((_t = config.integrations) === null || _t === void 0 ? void 0 : _t.frontchat)
208
211
  ? {
209
212
  frontchat: {
210
213
  snippetId: config.integrations.frontchat,
211
214
  },
212
215
  }
213
- : {})), (((_v = config.integrations) === null || _v === void 0 ? void 0 : _v.osano)
216
+ : {})), (((_u = config.integrations) === null || _u === void 0 ? void 0 : _u.osano)
214
217
  ? {
215
218
  osano: {
216
219
  scriptSource: config.integrations.osano,
@@ -218,6 +221,6 @@ export function upgradeToDocsConfig(config) {
218
221
  }
219
222
  : {})),
220
223
  }
221
- : {})), (fonts ? fonts : {}));
224
+ : {})), (fonts ? { fonts } : {}));
222
225
  return v2Config;
223
226
  }