@mintlify/common 1.0.608 → 1.0.610
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.
|
@@ -36,7 +36,7 @@ export const codeStylingToThemeOrThemes = (codeStylingFromConfig) => {
|
|
|
36
36
|
}
|
|
37
37
|
if (typeof codeStylingFromConfig === 'object' &&
|
|
38
38
|
'theme' in codeStylingFromConfig &&
|
|
39
|
-
|
|
39
|
+
typeof codeStylingFromConfig.theme === 'string') {
|
|
40
40
|
return {
|
|
41
41
|
themes: {
|
|
42
42
|
light: codeStylingFromConfig.theme,
|
|
@@ -70,7 +70,7 @@ export const getCodeStylingEnum = (codeStylingFromConfig) => {
|
|
|
70
70
|
}
|
|
71
71
|
if (typeof codeStylingFromConfig === 'object' &&
|
|
72
72
|
'theme' in codeStylingFromConfig &&
|
|
73
|
-
|
|
73
|
+
typeof codeStylingFromConfig.theme === 'string') {
|
|
74
74
|
return getThemeModeFromTheme(codeStylingFromConfig.theme);
|
|
75
75
|
}
|
|
76
76
|
return 'system';
|
|
@@ -11,7 +11,7 @@ export type GetMdxType = {
|
|
|
11
11
|
panelMdxSource?: SerializeSuccess;
|
|
12
12
|
panelMdxSourceWithNoJs?: SerializeSuccess;
|
|
13
13
|
};
|
|
14
|
-
export declare function getMdx({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors, pageType, trace, }: {
|
|
14
|
+
export declare function getMdx({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors, pageType, trace, customLanguages, }: {
|
|
15
15
|
path: string;
|
|
16
16
|
content: string;
|
|
17
17
|
metadata: PageMetaTags;
|
|
@@ -13,7 +13,7 @@ import { getMDXOptions, remarkMdxRemoveJs, remarkExpandContent, remarkSplitCodeG
|
|
|
13
13
|
import { codeStylingToThemeOrThemes } from '../getCodeStyling.js';
|
|
14
14
|
import { createSnippetTreeMap } from './getMdx/snippets.js';
|
|
15
15
|
export function getMdx(_a) {
|
|
16
|
-
return __awaiter(this, arguments, void 0, function* ({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors = undefined, pageType = 'default', trace = undefined, }) {
|
|
16
|
+
return __awaiter(this, arguments, void 0, function* ({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors = undefined, pageType = 'default', trace = undefined, customLanguages = [], }) {
|
|
17
17
|
const traceFn = trace !== null && trace !== void 0 ? trace : ((_name, fn) => fn());
|
|
18
18
|
if (!tailwindSelectors)
|
|
19
19
|
tailwindSelectors = yield traceFn('getMdx.getTailwindSelectors', () => __awaiter(this, void 0, void 0, function* () { return getTailwindSelectors({ content }); }));
|
|
@@ -41,7 +41,18 @@ export function getMdx(_a) {
|
|
|
41
41
|
config,
|
|
42
42
|
pageMetadata: metadata,
|
|
43
43
|
};
|
|
44
|
-
const { mdxSource, mdxSourceWithNoJs } = yield traceFn('getMdx.compileMdx.mainContent', () => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
const { mdxSource, mdxSourceWithNoJs } = yield traceFn('getMdx.compileMdx.mainContent', () => __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
return compileMdx({
|
|
46
|
+
content,
|
|
47
|
+
scope,
|
|
48
|
+
mdxOptions,
|
|
49
|
+
mdxOptionsNoJs,
|
|
50
|
+
codeStyling,
|
|
51
|
+
path,
|
|
52
|
+
traceFn,
|
|
53
|
+
customLanguages,
|
|
54
|
+
});
|
|
55
|
+
}));
|
|
45
56
|
const originalMdxExtracts = structuredClone(mdxExtracts);
|
|
46
57
|
let panelMdxSource;
|
|
47
58
|
let panelMdxSourceWithNoJs;
|
|
@@ -56,6 +67,7 @@ export function getMdx(_a) {
|
|
|
56
67
|
codeStyling,
|
|
57
68
|
path,
|
|
58
69
|
traceFn,
|
|
70
|
+
customLanguages,
|
|
59
71
|
});
|
|
60
72
|
}));
|
|
61
73
|
panelMdxSource = compiledMdx.mdxSource;
|