@mintlify/validation 0.1.270 → 0.1.272

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 (29) 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 +110 -0
  4. package/dist/mint-config/schemas/v2/properties/navigation/global.d.ts +10 -0
  5. package/dist/mint-config/schemas/v2/properties/navigation/index.d.ts +28 -0
  6. package/dist/mint-config/schemas/v2/properties/navigation/languages.d.ts +6 -0
  7. package/dist/mint-config/schemas/v2/properties/navigation/languages.js +1 -0
  8. package/dist/mint-config/schemas/v2/properties/navigation/version.d.ts +6 -0
  9. package/dist/mint-config/schemas/v2/properties/navigation/version.js +1 -0
  10. package/dist/mint-config/schemas/v2/properties/reusable/color.d.ts +1 -0
  11. package/dist/mint-config/schemas/v2/properties/reusable/index.d.ts +1 -0
  12. package/dist/mint-config/schemas/v2/properties/reusable/index.js +1 -0
  13. package/dist/mint-config/schemas/v2/themes/linden.d.ts +22 -0
  14. package/dist/mint-config/schemas/v2/themes/maple.d.ts +22 -0
  15. package/dist/mint-config/schemas/v2/themes/mint.d.ts +22 -0
  16. package/dist/mint-config/schemas/v2/themes/palm.d.ts +22 -0
  17. package/dist/mint-config/schemas/v2/themes/reusable/index.d.ts +14 -0
  18. package/dist/mint-config/schemas/v2/themes/willow.d.ts +22 -0
  19. package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.d.ts +3 -2
  20. package/dist/mint-config/upgrades/convertMintDecoratedNavToDocsDecoratedNav.js +7 -5
  21. package/dist/mint-config/upgrades/updateNavigationToDocsConfig.d.ts +0 -7
  22. package/dist/mint-config/upgrades/updateNavigationToDocsConfig.js +152 -51
  23. package/dist/mint-config/validateConfig.d.ts +40 -0
  24. package/dist/tsconfig.build.tsbuildinfo +1 -1
  25. package/dist/types/index.d.ts +1 -0
  26. package/dist/types/index.js +1 -0
  27. package/dist/types/serverStaticProps.d.ts +21 -0
  28. package/dist/types/serverStaticProps.js +1 -0
  29. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import isAbsoluteUrl from 'is-absolute-url';
1
2
  import _ from 'lodash';
2
3
  const DEFAULT_TAB = {
3
4
  tab: 'Documentation',
@@ -52,8 +53,8 @@ const findPagesForPrefix = (groups, division, versionName, ignoredDivisions = []
52
53
  if (isGroupVersionMatch) {
53
54
  group.pages.forEach((page) => {
54
55
  if (typeof page === 'string') {
55
- if ((!prefix || page.startsWith(prefix)) &&
56
- !ignoredDivisions.some((d) => page.startsWith(d.url))) {
56
+ if ((!prefix || ensureLeadingSlash(page).startsWith(ensureLeadingSlash(prefix))) &&
57
+ !ignoredDivisions.some((d) => ensureLeadingSlash(page).startsWith(ensureLeadingSlash(d.url)))) {
57
58
  groupPages.push(page);
58
59
  }
59
60
  else {
@@ -78,8 +79,7 @@ const findPagesForPrefix = (groups, division, versionName, ignoredDivisions = []
78
79
  });
79
80
  return { matchedGroups, unmatchedGroups };
80
81
  };
81
- const processDivisions = (type, divisions = [], navigationGroups = [], shouldInsertRemainingGroups = false, versionName, config) => {
82
- var _a, _b;
82
+ const processDivisions = (type, divisions = [], navigationGroups = [], shouldInsertRemainingGroups = false, versionName, config, otherDivisions) => {
83
83
  let remainingGroups = filterGroupsByVersion(navigationGroups, versionName);
84
84
  const result = divisions
85
85
  .map((division) => {
@@ -100,26 +100,42 @@ const processDivisions = (type, divisions = [], navigationGroups = [], shouldIns
100
100
  };
101
101
  }
102
102
  }
103
- const ignoredDivisions = divisions.filter((d) => d.url && d.url.startsWith(division.url) && d.url !== division.url);
103
+ const ignoredDivisions = divisions.filter((d) => d.url &&
104
+ ensureLeadingSlash(d.url).startsWith(ensureLeadingSlash(division.url)) &&
105
+ d.url !== division.url);
106
+ let moreTabs = [];
107
+ let moreAnchors = [];
108
+ // process the other divisions
109
+ if (otherDivisions === null || otherDivisions === void 0 ? void 0 : otherDivisions.length) {
110
+ const matchedDivisions = otherDivisions.filter((d) => {
111
+ return ensureLeadingSlash(d.url).startsWith(ensureLeadingSlash(division.url));
112
+ });
113
+ if (matchedDivisions.length) {
114
+ const { tabs, anchors } = processDivisions(type === 'tabs' ? 'anchors' : 'tabs', matchedDivisions, navigationGroups, false, versionName, config);
115
+ moreTabs = tabs;
116
+ moreAnchors = anchors;
117
+ }
118
+ }
104
119
  const { matchedGroups, unmatchedGroups } = findPagesForPrefix(remainingGroups, division, versionName, ignoredDivisions);
105
120
  remainingGroups = unmatchedGroups;
106
121
  if (matchedGroups.length) {
107
- return Object.assign(Object.assign({}, _.omit(baseDivision, 'href')), { groups: matchedGroups });
122
+ if (matchedGroups.length) {
123
+ const divisionWithoutHref = _.omit(baseDivision, 'href');
124
+ if (moreTabs.length)
125
+ return Object.assign(Object.assign({}, divisionWithoutHref), { tabs: moreTabs });
126
+ if (moreAnchors.length)
127
+ return Object.assign(Object.assign({}, divisionWithoutHref), { anchors: moreAnchors });
128
+ return Object.assign(Object.assign({}, divisionWithoutHref), { groups: matchedGroups });
129
+ }
108
130
  }
131
+ if (!matchedGroups.length && !isAbsoluteUrl(division.url))
132
+ return undefined;
109
133
  return baseDivision;
110
134
  })
111
135
  .filter(Boolean);
112
136
  if (remainingGroups.length && shouldInsertRemainingGroups) {
113
137
  const { matchedGroups } = findPagesForPrefix(remainingGroups, undefined, versionName, []);
114
- if (type === 'tabs') {
115
- result.unshift(Object.assign(Object.assign({}, (((_a = config === null || config === void 0 ? void 0 : config.primaryTab) === null || _a === void 0 ? void 0 : _a.name)
116
- ? Object.assign({ tab: config.primaryTab.name }, (config.primaryTab.isDefaultHidden !== undefined && {
117
- hidden: config.primaryTab.isDefaultHidden,
118
- })) : DEFAULT_TAB)), { groups: matchedGroups }));
119
- }
120
- else {
121
- 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 }));
122
- }
138
+ result.unshift(Object.assign(Object.assign({}, getPrimaryConfig(type === 'tabs' ? 'tab' : 'anchor', config)), { groups: matchedGroups }));
123
139
  }
124
140
  if (type === 'tabs') {
125
141
  return { tabs: result, anchors: [], remainingGroups };
@@ -134,7 +150,9 @@ const findPagesForVersionOrLanguage = (groups, version, prefixes) => {
134
150
  group.pages.forEach((page) => {
135
151
  if (typeof page === 'string') {
136
152
  const isGatedByDivision = Object.entries(prefixes).some(([href, versions]) => versions.includes(version) && page.startsWith(href));
137
- if (isGatedByDivision || Object.keys(prefixes).some((href) => !page.startsWith(href))) {
153
+ const isNotIncludedInAnyVersion = Object.keys(prefixes).every((href) => !page.startsWith(href));
154
+ // we want to include the page if it's gated by a version or it's not included in any version
155
+ if (isGatedByDivision || isNotIncludedInAnyVersion) {
138
156
  groupPages.push(page);
139
157
  }
140
158
  }
@@ -154,18 +172,28 @@ const processVersionsOrLanguages = (versions = [], navigationGroups = [], prefix
154
172
  const isLocale = versions.every((version) => typeof version === 'object' && version.locale);
155
173
  const result = versions.map((version) => {
156
174
  if (isLocale && typeof version === 'object' && version.locale) {
157
- const baseLanguage = {
158
- language: version.locale,
159
- };
175
+ const baseLanguage = Object.assign({ language: version.locale }, (version.default ? { default: version.default } : {}));
176
+ if (version.url)
177
+ return Object.assign(Object.assign({}, baseLanguage), { href: version.url });
160
178
  const { matchedGroups } = findPagesForVersionOrLanguage(navigationGroups, version.name, prefixes);
161
179
  return Object.assign(Object.assign({}, baseLanguage), { groups: matchedGroups });
162
180
  }
163
181
  else {
164
- const versionName = typeof version === 'string' ? version : version.name;
165
- const baseVersion = {
166
- version: versionName,
167
- };
168
- const { matchedGroups } = findPagesForVersionOrLanguage(navigationGroups, versionName, prefixes);
182
+ let baseVersion;
183
+ if (typeof version === 'object') {
184
+ baseVersion = {
185
+ version: version.name,
186
+ default: version.default,
187
+ };
188
+ if (version.url)
189
+ return Object.assign(Object.assign({}, baseVersion), { href: version.url });
190
+ }
191
+ else {
192
+ baseVersion = {
193
+ version,
194
+ };
195
+ }
196
+ const { matchedGroups } = findPagesForVersionOrLanguage(navigationGroups, baseVersion.version, prefixes);
169
197
  return Object.assign(Object.assign({}, baseVersion), { groups: matchedGroups });
170
198
  }
171
199
  });
@@ -174,36 +202,57 @@ const processVersionsOrLanguages = (versions = [], navigationGroups = [], prefix
174
202
  versions: result,
175
203
  };
176
204
  };
177
- /**
178
- * Priority
179
- * 1. versions (including locales)
180
- * 2. anchors (global anchors)
181
- * 3. tabs (tabs)
182
- * 4. groups
183
- */
184
205
  export const updateNavigationToDocsConfig = (config) => {
185
- const { navigation: groups, tabs, anchors, versions } = config;
206
+ let { tabs, anchors, versions } = config;
207
+ const groups = config.navigation;
186
208
  const { tabs: globalTabs, anchors: globalAnchors, versions: globalVersions, } = getGlobalDivisions(config);
209
+ const hasTabs = tabs === null || tabs === void 0 ? void 0 : tabs.length;
210
+ const hasAnchors = anchors === null || anchors === void 0 ? void 0 : anchors.length;
211
+ tabs = (globalTabs === null || globalTabs === void 0 ? void 0 : globalTabs.length) ? [] : tabs;
212
+ anchors = (globalAnchors === null || globalAnchors === void 0 ? void 0 : globalAnchors.length) ? [] : anchors;
213
+ versions = (globalVersions === null || globalVersions === void 0 ? void 0 : globalVersions.length) ? [] : versions;
187
214
  // process divisions
188
- const getUpdatedNavigation = (groups, tabs, anchors, versionName, config) => {
189
- var _a, _b;
190
- if ((anchors === null || anchors === void 0 ? void 0 : anchors.length) && !(globalAnchors === null || globalAnchors === void 0 ? void 0 : globalAnchors.length)) {
191
- const { anchors: anchorsResult, remainingGroups } = processDivisions('anchors', anchors, groups, false, versionName, config);
192
- if (remainingGroups.length || (tabs === null || tabs === void 0 ? void 0 : tabs.length)) {
193
- if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) && !(globalTabs === null || globalTabs === void 0 ? void 0 : globalTabs.length)) {
194
- const { tabs: tabsResult } = processDivisions('tabs', tabs, remainingGroups.length ? remainingGroups : groups, true, versionName, config);
195
- anchorsResult.push(Object.assign(Object.assign({}, (((_a = config === null || config === void 0 ? void 0 : config.topAnchor) === null || _a === void 0 ? void 0 : _a.name) ? { anchor: config.topAnchor.name } : DEFAULT_ANCHOR)), { tabs: tabsResult }));
196
- }
197
- else {
198
- const { matchedGroups } = findPagesForPrefix(remainingGroups, undefined, versionName);
199
- anchorsResult.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 }));
215
+ const getUpdatedNavigation = (groups, config, versionName) => {
216
+ const topLevelDivision = findMostInclusiveDivision(tabs, anchors);
217
+ if (topLevelDivision === 'anchors') {
218
+ if (hasAnchors) {
219
+ const { anchors: anchorsResult, remainingGroups } = processDivisions('anchors', anchors, groups, false, versionName, config, tabs);
220
+ if (remainingGroups.length || (tabs === null || tabs === void 0 ? void 0 : tabs.length)) {
221
+ if (tabs === null || tabs === void 0 ? void 0 : tabs.length) {
222
+ const { tabs: tabsResult } = processDivisions('tabs', tabs, remainingGroups.length ? remainingGroups : groups, true, versionName, config);
223
+ anchorsResult.unshift(Object.assign(Object.assign({}, getPrimaryConfig('anchor', config)), { tabs: tabsResult }));
224
+ }
225
+ else {
226
+ const { matchedGroups } = findPagesForPrefix(remainingGroups, undefined, versionName);
227
+ anchorsResult.unshift(Object.assign(Object.assign({}, getPrimaryConfig('anchor', config)), { groups: matchedGroups }));
228
+ }
200
229
  }
230
+ return { anchors: anchorsResult };
231
+ }
232
+ if (hasTabs) {
233
+ const { tabs: tabsResult } = processDivisions('tabs', tabs, groups, true, versionName, config);
234
+ return { tabs: tabsResult };
201
235
  }
202
- return { anchors: anchorsResult };
203
236
  }
204
- if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) && !(globalTabs === null || globalTabs === void 0 ? void 0 : globalTabs.length)) {
205
- const { tabs: tabsResult } = processDivisions('tabs', tabs, groups, true, versionName, config);
206
- return { tabs: tabsResult };
237
+ else {
238
+ if (hasTabs) {
239
+ const { tabs: tabsResult, remainingGroups } = processDivisions('tabs', tabs, groups, false, versionName, config, anchors);
240
+ if (remainingGroups.length || (anchors === null || anchors === void 0 ? void 0 : anchors.length)) {
241
+ if (anchors === null || anchors === void 0 ? void 0 : anchors.length) {
242
+ const { anchors: anchorsResult } = processDivisions('anchors', anchors, remainingGroups.length ? remainingGroups : groups, true, versionName, config);
243
+ tabsResult.unshift(Object.assign(Object.assign({}, getPrimaryConfig('tab', config)), { anchors: anchorsResult }));
244
+ }
245
+ else {
246
+ const { matchedGroups } = findPagesForPrefix(remainingGroups, undefined, versionName);
247
+ tabsResult.unshift(Object.assign(Object.assign({}, getPrimaryConfig('tab', config)), { groups: matchedGroups }));
248
+ }
249
+ }
250
+ return { tabs: tabsResult };
251
+ }
252
+ if (hasAnchors) {
253
+ const { anchors: anchorsResult } = processDivisions('anchors', anchors, groups, true, versionName, config);
254
+ return { anchors: anchorsResult };
255
+ }
207
256
  }
208
257
  if (groups.length) {
209
258
  const parsedGroups = filterGroupsByVersion(groups, versionName).map((group) => (Object.assign({ group: group.group, pages: group.pages }, (group.icon ? { icon: formatIcon(group.icon, group.iconType) } : {}))));
@@ -212,6 +261,7 @@ export const updateNavigationToDocsConfig = (config) => {
212
261
  return undefined;
213
262
  };
214
263
  if ((versions === null || versions === void 0 ? void 0 : versions.length) && !(globalVersions === null || globalVersions === void 0 ? void 0 : globalVersions.length)) {
264
+ // divisions that match the versions
215
265
  const prefixes = versions.reduce((acc, version) => {
216
266
  const versionName = typeof version === 'string' ? version : version.name;
217
267
  const anchorPrefixes = anchors === null || anchors === void 0 ? void 0 : anchors.filter((anchor) => anchor.version === versionName && !isRemoteUrl(anchor.url));
@@ -223,11 +273,21 @@ export const updateNavigationToDocsConfig = (config) => {
223
273
  const { versions: versionsResult, isLocale } = processVersionsOrLanguages(versions, groups, prefixes);
224
274
  versionsResult.forEach((version, index) => {
225
275
  var _a;
276
+ // if version is an external link, skip it
277
+ if (typeof version === 'object' && 'href' in version) {
278
+ return;
279
+ }
226
280
  const versionName = typeof versions[index] === 'string'
227
281
  ? version.version
228
282
  : ((_a = versions[index]) === null || _a === void 0 ? void 0 : _a.name) || version.language;
229
- if ('groups' in version) {
230
- const updatedNavigationPerVersion = getUpdatedNavigation(version.groups, tabs, anchors, versionName, config);
283
+ if ('groups' in version && version.groups.length) {
284
+ const updatedNavigationPerVersion = getUpdatedNavigation(version.groups, config, versionName);
285
+ if (updatedNavigationPerVersion) {
286
+ versionsResult[index] = Object.assign(Object.assign({}, _.omit(version, 'groups')), updatedNavigationPerVersion);
287
+ }
288
+ }
289
+ else {
290
+ const updatedNavigationPerVersion = getUpdatedNavigation(groups, config, versionName);
231
291
  if (updatedNavigationPerVersion) {
232
292
  versionsResult[index] = Object.assign(Object.assign({}, _.omit(version, 'groups')), updatedNavigationPerVersion);
233
293
  }
@@ -239,7 +299,7 @@ export const updateNavigationToDocsConfig = (config) => {
239
299
  }
240
300
  return navigationConfig;
241
301
  }
242
- const navigationConfig = (getUpdatedNavigation(groups, tabs, anchors, undefined, config) || {
302
+ const navigationConfig = (getUpdatedNavigation(groups, config) || {
243
303
  groups: [],
244
304
  });
245
305
  if ((globalTabs === null || globalTabs === void 0 ? void 0 : globalTabs.length) || (globalAnchors === null || globalAnchors === void 0 ? void 0 : globalAnchors.length)) {
@@ -247,3 +307,44 @@ export const updateNavigationToDocsConfig = (config) => {
247
307
  }
248
308
  return navigationConfig;
249
309
  };
310
+ /**
311
+ * Decide which division is most relevant to the top level navigation
312
+ * 1. if tabs doesn't exist, return anchors, vice versa
313
+ * 2. if both exist, return the most inclusive division
314
+ * 2.1 if tabs are more inclusive, return tabs
315
+ * 2.2 if anchors are more inclusive, return anchors
316
+ */
317
+ function findMostInclusiveDivision(tabs, anchors) {
318
+ if (!(tabs === null || tabs === void 0 ? void 0 : tabs.length))
319
+ return 'anchors';
320
+ if (!(anchors === null || anchors === void 0 ? void 0 : anchors.length))
321
+ return 'tabs';
322
+ const inclusiveTabs = tabs.filter((tab) => {
323
+ return anchors.some((anchor) => ensureLeadingSlash(tab.url).startsWith(ensureLeadingSlash(anchor.url)));
324
+ });
325
+ const inclusiveAnchors = anchors.filter((anchor) => {
326
+ return tabs.some((tab) => ensureLeadingSlash(anchor.url).startsWith(ensureLeadingSlash(tab.url)));
327
+ });
328
+ // this means that there is a division that covers all paths
329
+ if (inclusiveTabs.length === tabs.length)
330
+ return 'tabs';
331
+ if (inclusiveAnchors.length === anchors.length)
332
+ return 'anchors';
333
+ // compare the number of inclusive divisions
334
+ return inclusiveTabs.length > inclusiveAnchors.length ? 'tabs' : 'anchors';
335
+ }
336
+ function ensureLeadingSlash(path) {
337
+ return path.startsWith('/') ? path : `/${path}`;
338
+ }
339
+ const getPrimaryConfig = (type, config) => {
340
+ var _a, _b;
341
+ if (type === 'anchor') {
342
+ return Object.assign(Object.assign({}, (((_a = config === null || config === void 0 ? void 0 : config.topAnchor) === null || _a === void 0 ? void 0 : _a.name) ? { anchor: config.topAnchor.name } : DEFAULT_ANCHOR)), (((_b = config === null || config === void 0 ? void 0 : config.topAnchor) === null || _b === void 0 ? void 0 : _b.icon)
343
+ ? { icon: formatIcon(config.topAnchor.icon, config.topAnchor.iconType) }
344
+ : {}));
345
+ }
346
+ return Object.assign({}, ((config === null || config === void 0 ? void 0 : config.primaryTab)
347
+ ? Object.assign({ tab: config.primaryTab.name }, (config.primaryTab.isDefaultHidden !== undefined && {
348
+ hidden: config.primaryTab.isDefaultHidden,
349
+ })) : DEFAULT_TAB));
350
+ };
@@ -526,12 +526,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
526
526
  global?: {
527
527
  languages?: ({
528
528
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
529
+ default?: boolean | undefined;
529
530
  hidden?: boolean | undefined;
530
531
  } & {
531
532
  href: string;
532
533
  })[] | undefined;
533
534
  versions?: ({
534
535
  version: string;
536
+ default?: boolean | undefined;
535
537
  hidden?: boolean | undefined;
536
538
  } & {
537
539
  href: string;
@@ -613,12 +615,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
613
615
  global?: {
614
616
  languages?: ({
615
617
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
618
+ default?: boolean | undefined;
616
619
  hidden?: boolean | undefined;
617
620
  } & {
618
621
  href: string;
619
622
  })[] | undefined;
620
623
  versions?: ({
621
624
  version: string;
625
+ default?: boolean | undefined;
622
626
  hidden?: boolean | undefined;
623
627
  } & {
624
628
  href: string;
@@ -871,12 +875,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
871
875
  global?: {
872
876
  languages?: ({
873
877
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
878
+ default?: boolean | undefined;
874
879
  hidden?: boolean | undefined;
875
880
  } & {
876
881
  href: string;
877
882
  })[] | undefined;
878
883
  versions?: ({
879
884
  version: string;
885
+ default?: boolean | undefined;
880
886
  hidden?: boolean | undefined;
881
887
  } & {
882
888
  href: string;
@@ -958,12 +964,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
958
964
  global?: {
959
965
  languages?: ({
960
966
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
967
+ default?: boolean | undefined;
961
968
  hidden?: boolean | undefined;
962
969
  } & {
963
970
  href: string;
964
971
  })[] | undefined;
965
972
  versions?: ({
966
973
  version: string;
974
+ default?: boolean | undefined;
967
975
  hidden?: boolean | undefined;
968
976
  } & {
969
977
  href: string;
@@ -1216,12 +1224,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1216
1224
  global?: {
1217
1225
  languages?: ({
1218
1226
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
1227
+ default?: boolean | undefined;
1219
1228
  hidden?: boolean | undefined;
1220
1229
  } & {
1221
1230
  href: string;
1222
1231
  })[] | undefined;
1223
1232
  versions?: ({
1224
1233
  version: string;
1234
+ default?: boolean | undefined;
1225
1235
  hidden?: boolean | undefined;
1226
1236
  } & {
1227
1237
  href: string;
@@ -1303,12 +1313,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1303
1313
  global?: {
1304
1314
  languages?: ({
1305
1315
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
1316
+ default?: boolean | undefined;
1306
1317
  hidden?: boolean | undefined;
1307
1318
  } & {
1308
1319
  href: string;
1309
1320
  })[] | undefined;
1310
1321
  versions?: ({
1311
1322
  version: string;
1323
+ default?: boolean | undefined;
1312
1324
  hidden?: boolean | undefined;
1313
1325
  } & {
1314
1326
  href: string;
@@ -1561,12 +1573,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1561
1573
  global?: {
1562
1574
  languages?: ({
1563
1575
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
1576
+ default?: boolean | undefined;
1564
1577
  hidden?: boolean | undefined;
1565
1578
  } & {
1566
1579
  href: string;
1567
1580
  })[] | undefined;
1568
1581
  versions?: ({
1569
1582
  version: string;
1583
+ default?: boolean | undefined;
1570
1584
  hidden?: boolean | undefined;
1571
1585
  } & {
1572
1586
  href: string;
@@ -1648,12 +1662,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1648
1662
  global?: {
1649
1663
  languages?: ({
1650
1664
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
1665
+ default?: boolean | undefined;
1651
1666
  hidden?: boolean | undefined;
1652
1667
  } & {
1653
1668
  href: string;
1654
1669
  })[] | undefined;
1655
1670
  versions?: ({
1656
1671
  version: string;
1672
+ default?: boolean | undefined;
1657
1673
  hidden?: boolean | undefined;
1658
1674
  } & {
1659
1675
  href: string;
@@ -1906,12 +1922,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1906
1922
  global?: {
1907
1923
  languages?: ({
1908
1924
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
1925
+ default?: boolean | undefined;
1909
1926
  hidden?: boolean | undefined;
1910
1927
  } & {
1911
1928
  href: string;
1912
1929
  })[] | undefined;
1913
1930
  versions?: ({
1914
1931
  version: string;
1932
+ default?: boolean | undefined;
1915
1933
  hidden?: boolean | undefined;
1916
1934
  } & {
1917
1935
  href: string;
@@ -1993,12 +2011,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
1993
2011
  global?: {
1994
2012
  languages?: ({
1995
2013
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2014
+ default?: boolean | undefined;
1996
2015
  hidden?: boolean | undefined;
1997
2016
  } & {
1998
2017
  href: string;
1999
2018
  })[] | undefined;
2000
2019
  versions?: ({
2001
2020
  version: string;
2021
+ default?: boolean | undefined;
2002
2022
  hidden?: boolean | undefined;
2003
2023
  } & {
2004
2024
  href: string;
@@ -2255,12 +2275,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
2255
2275
  global?: {
2256
2276
  languages?: ({
2257
2277
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2278
+ default?: boolean | undefined;
2258
2279
  hidden?: boolean | undefined;
2259
2280
  } & {
2260
2281
  href: string;
2261
2282
  })[] | undefined;
2262
2283
  versions?: ({
2263
2284
  version: string;
2285
+ default?: boolean | undefined;
2264
2286
  hidden?: boolean | undefined;
2265
2287
  } & {
2266
2288
  href: string;
@@ -2342,12 +2364,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
2342
2364
  global?: {
2343
2365
  languages?: ({
2344
2366
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2367
+ default?: boolean | undefined;
2345
2368
  hidden?: boolean | undefined;
2346
2369
  } & {
2347
2370
  href: string;
2348
2371
  })[] | undefined;
2349
2372
  versions?: ({
2350
2373
  version: string;
2374
+ default?: boolean | undefined;
2351
2375
  hidden?: boolean | undefined;
2352
2376
  } & {
2353
2377
  href: string;
@@ -2600,12 +2624,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
2600
2624
  global?: {
2601
2625
  languages?: ({
2602
2626
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2627
+ default?: boolean | undefined;
2603
2628
  hidden?: boolean | undefined;
2604
2629
  } & {
2605
2630
  href: string;
2606
2631
  })[] | undefined;
2607
2632
  versions?: ({
2608
2633
  version: string;
2634
+ default?: boolean | undefined;
2609
2635
  hidden?: boolean | undefined;
2610
2636
  } & {
2611
2637
  href: string;
@@ -2687,12 +2713,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
2687
2713
  global?: {
2688
2714
  languages?: ({
2689
2715
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2716
+ default?: boolean | undefined;
2690
2717
  hidden?: boolean | undefined;
2691
2718
  } & {
2692
2719
  href: string;
2693
2720
  })[] | undefined;
2694
2721
  versions?: ({
2695
2722
  version: string;
2723
+ default?: boolean | undefined;
2696
2724
  hidden?: boolean | undefined;
2697
2725
  } & {
2698
2726
  href: string;
@@ -2945,12 +2973,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
2945
2973
  global?: {
2946
2974
  languages?: ({
2947
2975
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
2976
+ default?: boolean | undefined;
2948
2977
  hidden?: boolean | undefined;
2949
2978
  } & {
2950
2979
  href: string;
2951
2980
  })[] | undefined;
2952
2981
  versions?: ({
2953
2982
  version: string;
2983
+ default?: boolean | undefined;
2954
2984
  hidden?: boolean | undefined;
2955
2985
  } & {
2956
2986
  href: string;
@@ -3032,12 +3062,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
3032
3062
  global?: {
3033
3063
  languages?: ({
3034
3064
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
3065
+ default?: boolean | undefined;
3035
3066
  hidden?: boolean | undefined;
3036
3067
  } & {
3037
3068
  href: string;
3038
3069
  })[] | undefined;
3039
3070
  versions?: ({
3040
3071
  version: string;
3072
+ default?: boolean | undefined;
3041
3073
  hidden?: boolean | undefined;
3042
3074
  } & {
3043
3075
  href: string;
@@ -3290,12 +3322,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
3290
3322
  global?: {
3291
3323
  languages?: ({
3292
3324
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
3325
+ default?: boolean | undefined;
3293
3326
  hidden?: boolean | undefined;
3294
3327
  } & {
3295
3328
  href: string;
3296
3329
  })[] | undefined;
3297
3330
  versions?: ({
3298
3331
  version: string;
3332
+ default?: boolean | undefined;
3299
3333
  hidden?: boolean | undefined;
3300
3334
  } & {
3301
3335
  href: string;
@@ -3377,12 +3411,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
3377
3411
  global?: {
3378
3412
  languages?: ({
3379
3413
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
3414
+ default?: boolean | undefined;
3380
3415
  hidden?: boolean | undefined;
3381
3416
  } & {
3382
3417
  href: string;
3383
3418
  })[] | undefined;
3384
3419
  versions?: ({
3385
3420
  version: string;
3421
+ default?: boolean | undefined;
3386
3422
  hidden?: boolean | undefined;
3387
3423
  } & {
3388
3424
  href: string;
@@ -3635,12 +3671,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
3635
3671
  global?: {
3636
3672
  languages?: ({
3637
3673
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
3674
+ default?: boolean | undefined;
3638
3675
  hidden?: boolean | undefined;
3639
3676
  } & {
3640
3677
  href: string;
3641
3678
  })[] | undefined;
3642
3679
  versions?: ({
3643
3680
  version: string;
3681
+ default?: boolean | undefined;
3644
3682
  hidden?: boolean | undefined;
3645
3683
  } & {
3646
3684
  href: string;
@@ -3722,12 +3760,14 @@ export declare function validateDocsConfig(value: unknown): z.SafeParseError<{
3722
3760
  global?: {
3723
3761
  languages?: ({
3724
3762
  language: "en" | "cn" | "es" | "fr" | "jp" | "pt" | "pt-BR" | "de";
3763
+ default?: boolean | undefined;
3725
3764
  hidden?: boolean | undefined;
3726
3765
  } & {
3727
3766
  href: string;
3728
3767
  })[] | undefined;
3729
3768
  versions?: ({
3730
3769
  version: string;
3770
+ default?: boolean | undefined;
3731
3771
  hidden?: boolean | undefined;
3732
3772
  } & {
3733
3773
  href: string;