@mintlify/common 1.0.1253 → 1.0.1254
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.
|
@@ -11,9 +11,14 @@ export declare function packagePageStylesheets(baseUrl: string, pagePath: string
|
|
|
11
11
|
}[];
|
|
12
12
|
}>>;
|
|
13
13
|
}): string[];
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
type PackageBuildWithOptionalIslands = {
|
|
15
|
+
buildId: string;
|
|
16
|
+
islands?: Readonly<Record<string, unknown>>;
|
|
17
|
+
};
|
|
18
|
+
type WithIslands<T extends PackageBuildWithOptionalIslands> = T & {
|
|
19
|
+
islands: NonNullable<T['islands']>;
|
|
20
|
+
};
|
|
21
|
+
export declare function compilePackageBuild<T extends PackageBuildWithOptionalIslands>(packageBuild: T | undefined): WithIslands<T> | undefined;
|
|
17
22
|
export declare function withPackageGlobalStylesheets<T extends {
|
|
18
23
|
packageCssFiles?: string[];
|
|
19
24
|
}>(mdxExtracts: T, packageBuild: {
|
|
@@ -22,3 +27,4 @@ export declare function withPackageGlobalStylesheets<T extends {
|
|
|
22
27
|
path: string;
|
|
23
28
|
}[];
|
|
24
29
|
} | undefined, pagePath: string): T;
|
|
30
|
+
export {};
|
|
@@ -47,8 +47,9 @@ export function packagePageStylesheets(baseUrl, pagePath, islandIds, manifest) {
|
|
|
47
47
|
}
|
|
48
48
|
return [...paths].map((path) => `${pageBaseUrl}/${path}`);
|
|
49
49
|
}
|
|
50
|
+
const hasIslands = (packageBuild) => packageBuild.islands !== undefined && Object.keys(packageBuild.islands).length > 0;
|
|
50
51
|
export function compilePackageBuild(packageBuild) {
|
|
51
|
-
return packageBuild &&
|
|
52
|
+
return packageBuild && hasIslands(packageBuild) ? packageBuild : undefined;
|
|
52
53
|
}
|
|
53
54
|
export function withPackageGlobalStylesheets(mdxExtracts, packageBuild, pagePath) {
|
|
54
55
|
var _a, _b;
|