@readme/markdown 13.7.3 → 13.7.4

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.
@@ -12,6 +12,9 @@ interface Props extends React.PropsWithChildren {
12
12
 
13
13
  const Glossary = ({ children, term: termProp, terms }: Props) => {
14
14
  const term = (Array.isArray(children) ? children[0] : children) || termProp;
15
+
16
+ if (!term) return null;
17
+
15
18
  const foundTerm = terms.find(i => term.toLowerCase() === i?.term?.toLowerCase());
16
19
 
17
20
  if (!foundTerm) return <span>{term}</span>;
@@ -75,20 +75,10 @@ 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)) 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
- });
78
+ if (!(node instanceof HTMLElement) || !node.classList.contains(tailwindPrefix)) return;
79
+
80
+ traverse(node, addClasses);
81
+ shouldUpdate = true;
92
82
  });
93
83
  } else if (record.type === 'attributes') {
94
84
  if (record.attributeName !== 'class' || !(record.target instanceof HTMLElement)) return;
@@ -0,0 +1,2 @@
1
+ import type { Extension as FromMarkdownExtension } from 'mdast-util-from-markdown';
2
+ export declare function gemojiFromMarkdown(): FromMarkdownExtension;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Micromark extension for :emoji: inline syntax.
3
+ */
4
+ export { gemoji } from './syntax';
@@ -0,0 +1,9 @@
1
+ import type { Extension } from 'micromark-util-types';
2
+ declare module 'micromark-util-types' {
3
+ interface TokenTypeMap {
4
+ gemoji: 'gemoji';
5
+ gemojiMarker: 'gemojiMarker';
6
+ gemojiName: 'gemojiName';
7
+ }
8
+ }
9
+ export declare function gemoji(): Extension;