@mintlify/common 1.0.424 → 1.0.425
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/dist/mdx/plugins/remark/index.d.ts +2 -0
- package/dist/mdx/plugins/remark/index.js +2 -0
- package/dist/mdx/plugins/remark/remarkValidateSteps.d.ts +2 -0
- package/dist/mdx/plugins/remark/remarkValidateSteps.js +11 -0
- package/dist/mdx/plugins/remark/remarkValidateTabs.d.ts +2 -0
- package/dist/mdx/plugins/remark/remarkValidateTabs.js +11 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { visit } from 'unist-util-visit';
|
|
2
|
+
export const remarkValidateSteps = () => (tree) => {
|
|
3
|
+
visit(tree, 'mdxJsxFlowElement', (node, _idx, parent) => {
|
|
4
|
+
if (node.name === 'Step') {
|
|
5
|
+
const parentElement = parent;
|
|
6
|
+
if (!parentElement || parentElement.name !== 'Steps') {
|
|
7
|
+
console.warn('Please ensure that all <Step> components are direct children of <Steps>.');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { visit } from 'unist-util-visit';
|
|
2
|
+
export const remarkValidateTabs = () => (tree) => {
|
|
3
|
+
visit(tree, 'mdxJsxFlowElement', (node, _idx, parent) => {
|
|
4
|
+
if (node.name === 'Tab') {
|
|
5
|
+
const parentElement = parent;
|
|
6
|
+
if (!parentElement || parentElement.name !== 'Tabs') {
|
|
7
|
+
console.warn('Please ensure that all <Tab> components are direct children of <Tabs>.');
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
};
|