@mintlify/common 1.0.744 → 1.0.746

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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * MDX components known to NOT pass their `id` prop down to a DOM element.
3
+ * Links to anchors on these components will be treated as broken by link-rot.
4
+ *
5
+ * When modifying this list, update the corresponding render test in
6
+ * apps/client/test/components/id-passthrough.test.tsx.
7
+ */
8
+ export declare const COMPONENTS_WITHOUT_ID: Set<string>;
9
+ /**
10
+ * MDX components that call `cleanHeadingId` on their `id` prop at render time.
11
+ * link-rot must apply the same normalization when storing anchor ids for these components.
12
+ */
13
+ export declare const COMPONENTS_WITH_CLEANED_ID: Set<string>;
14
+ /**
15
+ * MDX components that forward their `id` prop to a DOM element without normalization.
16
+ * Links to anchors on these components are valid targets; no transformation is applied.
17
+ *
18
+ * When modifying this list, update the corresponding render test in
19
+ * apps/client/test/components/id-passthrough.test.tsx.
20
+ */
21
+ export declare const COMPONENTS_WITH_RAW_ID: Set<string>;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * MDX components known to NOT pass their `id` prop down to a DOM element.
3
+ * Links to anchors on these components will be treated as broken by link-rot.
4
+ *
5
+ * When modifying this list, update the corresponding render test in
6
+ * apps/client/test/components/id-passthrough.test.tsx.
7
+ */
8
+ export const COMPONENTS_WITHOUT_ID = new Set([
9
+ 'Info',
10
+ 'Warning',
11
+ 'Note',
12
+ 'Tip',
13
+ 'Check',
14
+ 'Danger',
15
+ 'Callout',
16
+ 'AccordionGroup',
17
+ 'Card',
18
+ 'CardGroup',
19
+ 'Tabs',
20
+ 'CodeGroup',
21
+ 'Columns',
22
+ 'CustomCode',
23
+ 'CustomComponent',
24
+ 'DynamicCustomComponent',
25
+ 'Expandable',
26
+ 'Frame',
27
+ 'Icon',
28
+ 'Latex',
29
+ 'Mermaid',
30
+ 'Panel',
31
+ 'Popup',
32
+ 'Prompt',
33
+ 'RequestExample',
34
+ 'ResponseExample',
35
+ 'SnippetGroup',
36
+ 'Steps',
37
+ 'Tile',
38
+ 'Tooltip',
39
+ 'Tree',
40
+ 'Badge',
41
+ 'Color',
42
+ 'ZoomImage',
43
+ ]);
44
+ /**
45
+ * MDX components that call `cleanHeadingId` on their `id` prop at render time.
46
+ * link-rot must apply the same normalization when storing anchor ids for these components.
47
+ */
48
+ export const COMPONENTS_WITH_CLEANED_ID = new Set(['Heading', 'Step', 'Update']);
49
+ /**
50
+ * MDX components that forward their `id` prop to a DOM element without normalization.
51
+ * Links to anchors on these components are valid targets; no transformation is applied.
52
+ *
53
+ * When modifying this list, update the corresponding render test in
54
+ * apps/client/test/components/id-passthrough.test.tsx.
55
+ */
56
+ export const COMPONENTS_WITH_RAW_ID = new Set([
57
+ 'Accordion', // id from remarkComponentIds (title slug) or explicit
58
+ 'Tab', // formatTabIds returns child.props.id directly without normalization
59
+ 'CodeBlock', // spreads props to outer <div>
60
+ 'Table', // spreads props to outer <div>
61
+ 'OptimizedFrame', // spreads props to <iframe>
62
+ 'OptimizedImage', // spreads props to <img>
63
+ 'View', // spreads props to outer <div>
64
+ ]);
@@ -8,3 +8,4 @@ export * from './astUtils.js';
8
8
  export * from './getS3ImageUri.js';
9
9
  export * from './getCodeStyling.js';
10
10
  export * from './replaceVariables.js';
11
+ export * from './componentIds.js';
package/dist/mdx/index.js CHANGED
@@ -8,3 +8,4 @@ export * from './astUtils.js';
8
8
  export * from './getS3ImageUri.js';
9
9
  export * from './getCodeStyling.js';
10
10
  export * from './replaceVariables.js';
11
+ export * from './componentIds.js';