@readme/markdown 14.11.2 → 14.11.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.
@@ -23,7 +23,7 @@ const Tabs = ({ children }: TabsProps) => {
23
23
  <nav className="TabGroup-nav">
24
24
  {tabs.map((tab, index: number) => (
25
25
  <button
26
- key={tab.props.title}
26
+ key={tab.key}
27
27
  className={`TabGroup-tab${activeTab === index ? '_active' : ''}`}
28
28
  onClick={() => setActiveTab(index)}
29
29
  >
@@ -35,7 +35,14 @@ const Tabs = ({ children }: TabsProps) => {
35
35
  ))}
36
36
  </nav>
37
37
  </header>
38
- <section>{tabs[activeTab]}</section>
38
+ <section>
39
+ {/* Keep every panel mounted so runtime Tailwind can scan inactive tabs' classes on first paint */}
40
+ {tabs.map((tab, index: number) => (
41
+ <div key={tab.key} hidden={index !== activeTab}>
42
+ {tab}
43
+ </div>
44
+ ))}
45
+ </section>
39
46
  </div>
40
47
  );
41
48
  };
@@ -0,0 +1,2 @@
1
+ import type { Extension as FromMarkdownExtension } from 'mdast-util-from-markdown';
2
+ export declare function htmlBlockComponentFromMarkdown(): FromMarkdownExtension;
@@ -0,0 +1 @@
1
+ export { htmlBlockComponent } from './syntax';
@@ -0,0 +1,8 @@
1
+ import type { Extension } from 'micromark-util-types';
2
+ declare module 'micromark-util-types' {
3
+ interface TokenTypeMap {
4
+ htmlBlockComponent: 'htmlBlockComponent';
5
+ htmlBlockComponentData: 'htmlBlockComponentData';
6
+ }
7
+ }
8
+ export declare function htmlBlockComponent(): Extension;