@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.
@@ -13,3 +13,5 @@ export * from './remarkSplitCodeGroup.js';
13
13
  export * from './remarkSplitTabs.js';
14
14
  export * from './remarkHeadingIds.js';
15
15
  export * from './remarkMdxExtractPanel.js';
16
+ export * from './remarkValidateSteps.js';
17
+ export * from './remarkValidateTabs.js';
@@ -13,3 +13,5 @@ export * from './remarkSplitCodeGroup.js';
13
13
  export * from './remarkSplitTabs.js';
14
14
  export * from './remarkHeadingIds.js';
15
15
  export * from './remarkMdxExtractPanel.js';
16
+ export * from './remarkValidateSteps.js';
17
+ export * from './remarkValidateTabs.js';
@@ -0,0 +1,2 @@
1
+ import type { Root } from 'mdast';
2
+ export declare const remarkValidateSteps: () => (tree: Root) => void;
@@ -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,2 @@
1
+ import type { Root } from 'mdast';
2
+ export declare const remarkValidateTabs: () => (tree: Root) => void;
@@ -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
+ };