@mintlify/common 1.0.660 → 1.0.662
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.
|
@@ -4,5 +4,6 @@ import { DecoratedNavigationConfig } from '@mintlify/validation';
|
|
|
4
4
|
* A page is public if it or any parent group/division has public: true.
|
|
5
5
|
* Assumes page hrefs in navWithPageContext have a leading / but config page paths do not.
|
|
6
6
|
* Outputted dictionary will NOT have a leading / in the dictionary keys.
|
|
7
|
+
* @param rootPublic - The default public status for pages not explicitly set in navigation
|
|
7
8
|
*/
|
|
8
|
-
export declare function generatePathToPublicDict(decoratedNav: DecoratedNavigationConfig): Map<string, boolean>;
|
|
9
|
+
export declare function generatePathToPublicDict(decoratedNav: DecoratedNavigationConfig, rootPublic?: boolean): Map<string, boolean>;
|
|
@@ -6,10 +6,11 @@ import { optionallyRemoveLeadingSlash } from '../optionallyRemoveLeadingSlash.js
|
|
|
6
6
|
* A page is public if it or any parent group/division has public: true.
|
|
7
7
|
* Assumes page hrefs in navWithPageContext have a leading / but config page paths do not.
|
|
8
8
|
* Outputted dictionary will NOT have a leading / in the dictionary keys.
|
|
9
|
+
* @param rootPublic - The default public status for pages not explicitly set in navigation
|
|
9
10
|
*/
|
|
10
|
-
export function generatePathToPublicDict(decoratedNav) {
|
|
11
|
+
export function generatePathToPublicDict(decoratedNav, rootPublic) {
|
|
11
12
|
const pathToPublicDict = new Map();
|
|
12
|
-
generatePathToPublicDictRecursive(pathToPublicDict, decoratedNav, false);
|
|
13
|
+
generatePathToPublicDictRecursive(pathToPublicDict, decoratedNav, rootPublic !== null && rootPublic !== void 0 ? rootPublic : false);
|
|
13
14
|
return pathToPublicDict;
|
|
14
15
|
}
|
|
15
16
|
function generatePathToPublicDictRecursive(pathToPublicDict, nav, parentPublic) {
|