@readme/markdown 13.7.0 → 13.7.2
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/components/TailwindStyle/index.tsx +14 -4
- package/dist/index.d.ts +1 -0
- package/dist/lib/mdxish.d.ts +1 -1
- package/dist/main.js +1949 -1023
- package/dist/main.node.js +1949 -1023
- package/dist/main.node.js.map +1 -1
- package/dist/processor/compile/anchor.d.ts +3 -0
- package/dist/processor/transform/mdxish/magic-blocks/types.d.ts +4 -0
- package/dist/processor/transform/mdxish/mdxish-self-closing-blocks.d.ts +21 -0
- package/dist/processor/transform/mdxish/mdxish-tables-to-jsx.d.ts +11 -0
- package/enums.ts +20 -0
- package/package.json +13 -11
- package/types.d.ts +281 -0
|
@@ -75,10 +75,20 @@ const TailwindStyle = ({ children, darkModeDataAttribute }: Props) => {
|
|
|
75
75
|
records.forEach(record => {
|
|
76
76
|
if (record.type === 'childList') {
|
|
77
77
|
record.addedNodes.forEach(node => {
|
|
78
|
-
if (!(node instanceof HTMLElement)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
if (!(node instanceof HTMLElement)) return;
|
|
79
|
+
|
|
80
|
+
// Check the added node itself
|
|
81
|
+
if (node.classList.contains(tailwindPrefix)) {
|
|
82
|
+
traverse(node, addClasses);
|
|
83
|
+
shouldUpdate = true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Also check descendants — React may insert a parent node
|
|
87
|
+
// whose children contain TailwindRoot elements
|
|
88
|
+
node.querySelectorAll(`.${tailwindPrefix}`).forEach(child => {
|
|
89
|
+
traverse(child, addClasses);
|
|
90
|
+
shouldUpdate = true;
|
|
91
|
+
});
|
|
82
92
|
});
|
|
83
93
|
} else if (record.type === 'attributes') {
|
|
84
94
|
if (record.attributeName !== 'class' || !(record.target instanceof HTMLElement)) return;
|
package/dist/index.d.ts
CHANGED
package/dist/lib/mdxish.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare function mdxishAstProcessor(mdContent: string, opts?: MdxishOpts)
|
|
|
29
29
|
parserReadyContent: string;
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Serializes an Mdast back into a markdown string.
|
|
33
33
|
*/
|
|
34
34
|
export declare function mdxishMdastToMd(mdast: MdastRoot): string;
|
|
35
35
|
/**
|