@mintlify/common 1.0.407 → 1.0.409

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/common",
3
- "version": "1.0.407",
3
+ "version": "1.0.409",
4
4
  "description": "Commonly shared code within Mintlify",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "@mintlify/mdx": "^1.0.1",
33
33
  "@mintlify/models": "0.0.195",
34
34
  "@mintlify/openapi-parser": "^0.0.7",
35
- "@mintlify/validation": "0.1.389",
35
+ "@mintlify/validation": "0.1.390",
36
36
  "@sindresorhus/slugify": "^2.1.1",
37
37
  "acorn": "^8.11.2",
38
38
  "estree-util-to-js": "^2.0.0",
@@ -82,5 +82,5 @@
82
82
  "typescript": "^5.5.3",
83
83
  "vitest": "^2.0.4"
84
84
  },
85
- "gitHead": "bd32735db6be24c5bc36f5fc10adb6ecf5d17cc7"
85
+ "gitHead": "b4f07f73d19a1e1e43e32ff57611a47fa5440056"
86
86
  }
@@ -1,2 +0,0 @@
1
- import { MdxFlowExpression } from 'mdast-util-mdx';
2
- export declare const createCommentNode: (componentName: string) => MdxFlowExpression;
@@ -1,20 +0,0 @@
1
- export const createCommentNode = (componentName) => {
2
- const comment = ` Component ${componentName} does not exist. `;
3
- return {
4
- type: 'mdxFlowExpression',
5
- value: `/* ${comment} */`,
6
- data: {
7
- estree: {
8
- type: 'Program',
9
- body: [],
10
- comments: [
11
- {
12
- type: 'Block',
13
- value: comment,
14
- },
15
- ],
16
- sourceType: 'module',
17
- },
18
- },
19
- };
20
- };
@@ -1,2 +0,0 @@
1
- import type { Root } from 'mdast';
2
- export declare const remarkMdxRemoveUnknownJsx: (allowedComponents?: string[]) => (tree: Root) => Root | import("mdast-util-mdxjs-esm").MdxjsEsm | import("mdast-util-mdx-expression").MdxFlowExpression | import("mdast-util-mdx-expression").MdxTextExpression | import("mdast").Link | import("mdast").Delete | import("mdast").Yaml | import("mdast").Emphasis | import("mdast").Strong | import("mdast-util-mdx").MdxJsxFlowElement | import("mdast").Blockquote | import("mdast").Break | import("mdast").Code | import("mdast").Definition | import("mdast").FootnoteDefinition | import("mdast").FootnoteReference | import("mdast").Heading | import("mdast").Html | import("mdast").Image | import("mdast").ImageReference | import("mdast").InlineCode | import("mdast").LinkReference | import("mdast").List | import("mdast").ListItem | import("mdast").Paragraph | import("mdast").Table | import("mdast").TableCell | import("mdast").TableRow | import("mdast").Text | import("mdast").ThematicBreak | import("mdast-util-math").InlineMath | import("mdast-util-math").Math | import("mdast-util-mdx").MdxJsxTextElement;
@@ -1,16 +0,0 @@
1
- import { map } from 'unist-util-map';
2
- import { findExportedNodes, isMdxJsxFlowElementHast } from '../../../lib/index.js';
3
- import { createCommentNode } from './createCommentNode.js';
4
- export const remarkMdxRemoveUnknownJsx = (allowedComponents) => (tree) => {
5
- const exportedComponentNames = findExportedNodes(tree, 'ArrowFunctionExpression');
6
- return map(tree, (node) => {
7
- if (isMdxJsxFlowElementHast(node)) {
8
- if (node.name &&
9
- !(allowedComponents === null || allowedComponents === void 0 ? void 0 : allowedComponents.includes(node.name)) &&
10
- !exportedComponentNames.includes(node.name)) {
11
- return createCommentNode(node.name);
12
- }
13
- }
14
- return node;
15
- });
16
- };