@mintlify/common 1.0.500 → 1.0.502

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.
@@ -7,7 +7,7 @@ import { MdxExtracts } from '../types/mdx/MdxExtracts.js';
7
7
  type MDXOptionsData = {
8
8
  snippetTreeMap: Record<string, Root>;
9
9
  pageMetadata: PageMetaTags;
10
- config?: DocsConfig | MintConfig;
10
+ config?: Pick<DocsConfig, 'api' | '$schema'> | Pick<MintConfig, 'api' | '$schema'>;
11
11
  subdomain?: string;
12
12
  tailwindSelectors?: string[];
13
13
  };
@@ -1,6 +1,6 @@
1
1
  import { type SerializeSuccess } from '@mintlify/mdx';
2
2
  import type { PageMetaTags } from '@mintlify/models';
3
- import { CodeStyling } from '@mintlify/validation/dist/mint-config/schemas/v2/index.js';
3
+ import { CodeStyling, DocsConfig } from '@mintlify/validation/dist/mint-config/schemas/v2/index.js';
4
4
  import { MdxExtracts } from '../../index.js';
5
5
  import { createSnippetTreeMap, type Snippet } from './getMdx/snippets.js';
6
6
  export type GetMdxType = {
@@ -10,13 +10,14 @@ export type GetMdxType = {
10
10
  panelMdxSource?: SerializeSuccess;
11
11
  panelMdxSourceWithNoJs?: SerializeSuccess;
12
12
  };
13
- export declare function getMdx({ path, content, metadata, snippets, subdomain, codeStyling, tailwindSelectors, pageType, }: {
13
+ export declare function getMdx({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors, pageType, }: {
14
14
  path: string;
15
15
  content: string;
16
16
  metadata: PageMetaTags;
17
17
  snippets: Snippet[];
18
18
  subdomain: string;
19
19
  codeStyling: CodeStyling;
20
+ config?: Pick<DocsConfig, 'api' | '$schema'>;
20
21
  tailwindSelectors?: string[] | undefined;
21
22
  pageType?: 'default' | 'pdf';
22
23
  }): Promise<GetMdxType>;
@@ -12,7 +12,7 @@ import { getTailwindSelectors } from '../../css/tailwind.js';
12
12
  import { getMDXOptions, remarkMdxRemoveJs, remarkExpandContent, remarkSplitCodeGroup, remarkSplitTabs, remarkValidateSteps, remarkValidateTabs, } from '../../index.js';
13
13
  import { createSnippetTreeMap } from './getMdx/snippets.js';
14
14
  export function getMdx(_a) {
15
- return __awaiter(this, arguments, void 0, function* ({ path, content, metadata, snippets, subdomain, codeStyling, tailwindSelectors = undefined, pageType = 'default', }) {
15
+ return __awaiter(this, arguments, void 0, function* ({ path, content, metadata, snippets, subdomain, codeStyling, config, tailwindSelectors = undefined, pageType = 'default', }) {
16
16
  if (!tailwindSelectors)
17
17
  tailwindSelectors = yield getTailwindSelectors({ content });
18
18
  const snippetTreeMap = yield createSnippetTreeMap(snippets);
@@ -20,6 +20,7 @@ export function getMdx(_a) {
20
20
  subdomain,
21
21
  snippetTreeMap,
22
22
  pageMetadata: metadata,
23
+ config,
23
24
  codeStyling,
24
25
  tailwindSelectors,
25
26
  };
@@ -35,6 +36,7 @@ export function getMdx(_a) {
35
36
  });
36
37
  const scope = {
37
38
  codeStyling,
39
+ config,
38
40
  pageMetadata: metadata,
39
41
  };
40
42
  const { mdxSource, mdxSourceWithNoJs } = yield compileMdx(content, scope, mdxOptions, mdxOptionsNoJs, codeStyling, path);