markstream-react 0.0.50 → 0.0.52
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/README.md +134 -104
- package/dist/{Tooltip-D786qxIk.js → Tooltip-Ux2h3oiV.js} +125 -125
- package/dist/{codeBlockExtraProps-7n9FWJXk.js → codeBlockExtraProps-NhTjbA1T.js} +1 -1
- package/dist/{index-o_DISWz2.js → index-DdaK6qko.js} +14 -14
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/markstream-react.css +1 -1
- package/dist/next.d.ts +1 -2
- package/dist/next.js +1 -1
- package/dist/server.d.ts +41 -42
- package/dist/server.js +1 -1
- package/dist/tailwind.cjs +4 -0
- package/dist/tailwind.d.ts +2 -0
- package/dist/tailwind.js +2 -0
- package/dist/types/components/AdmonitionNode/AdmonitionNode.d.ts +2 -1
- package/dist/types/components/BlockquoteNode/BlockquoteNode.d.ts +2 -1
- package/dist/types/components/CheckboxNode/CheckboxNode.d.ts +2 -1
- package/dist/types/components/CodeBlockNode/CodeBlockNode.d.ts +2 -1
- package/dist/types/components/CodeBlockNode/PreCodeNode.d.ts +2 -1
- package/dist/types/components/D2BlockNode/D2BlockNode.d.ts +2 -1
- package/dist/types/components/DefinitionListNode/DefinitionListNode.d.ts +2 -1
- package/dist/types/components/EmojiNode/EmojiNode.d.ts +2 -1
- package/dist/types/components/EmphasisNode/EmphasisNode.d.ts +2 -1
- package/dist/types/components/FootnoteAnchorNode/FootnoteAnchorNode.d.ts +2 -1
- package/dist/types/components/FootnoteNode/FootnoteNode.d.ts +2 -1
- package/dist/types/components/FootnoteReferenceNode/FootnoteReferenceNode.d.ts +2 -1
- package/dist/types/components/HardBreakNode/HardBreakNode.d.ts +2 -1
- package/dist/types/components/HeadingNode/HeadingNode.d.ts +2 -1
- package/dist/types/components/HighlightNode/HighlightNode.d.ts +2 -1
- package/dist/types/components/HtmlBlockNode/HtmlBlockNode.d.ts +1 -1
- package/dist/types/components/HtmlInlineNode/HtmlInlineNode.d.ts +2 -1
- package/dist/types/components/ImageNode/ImageNode.d.ts +1 -1
- package/dist/types/components/InfographicBlockNode/InfographicBlockNode.d.ts +2 -1
- package/dist/types/components/InlineCodeNode/InlineCodeNode.d.ts +2 -1
- package/dist/types/components/InsertNode/InsertNode.d.ts +2 -1
- package/dist/types/components/LinkNode/LinkNode.d.ts +2 -1
- package/dist/types/components/ListItemNode/ListItemNode.d.ts +2 -1
- package/dist/types/components/ListNode/ListNode.d.ts +2 -1
- package/dist/types/components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.d.ts +2 -1
- package/dist/types/components/Math/MathBlockNode.d.ts +1 -1
- package/dist/types/components/Math/MathInlineNode.d.ts +1 -1
- package/dist/types/components/MermaidBlockNode/MermaidBlockNode.d.ts +2 -1
- package/dist/types/components/NodeRenderer/FallbackComponent.d.ts +2 -1
- package/dist/types/components/ParagraphNode/ParagraphNode.d.ts +2 -1
- package/dist/types/components/ReferenceNode/ReferenceNode.d.ts +1 -1
- package/dist/types/components/StrikethroughNode/StrikethroughNode.d.ts +2 -1
- package/dist/types/components/StrongNode/StrongNode.d.ts +2 -1
- package/dist/types/components/SubscriptNode/SubscriptNode.d.ts +2 -1
- package/dist/types/components/SuperscriptNode/SuperscriptNode.d.ts +2 -1
- package/dist/types/components/TableNode/TableNode.d.ts +2 -1
- package/dist/types/components/TextNode/TextNode.d.ts +2 -1
- package/dist/types/components/ThematicBreakNode/ThematicBreakNode.d.ts +2 -1
- package/dist/types/components/VmrContainerNode/VmrContainerNode.d.ts +2 -1
- package/dist/types/context/viewportPriority.d.ts +1 -1
- package/dist/types/renderers/renderChildren.d.ts +1 -1
- package/dist/types/renderers/renderNode.d.ts +1 -1
- package/dist/types/server-renderer/index.d.ts +41 -41
- package/dist/types/styles.d.ts +1 -0
- package/package.json +39 -40
- package/dist/tailwind.ts +0 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function CheckboxNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'checkbox' | 'checkbox_input';
|
|
4
5
|
checked?: boolean;
|
|
5
|
-
}>):
|
|
6
|
+
}>): React.JSX.Element;
|
|
6
7
|
export default CheckboxNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CodeBlockNodeProps } from '../../types/component-props';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export interface CodeBlockPreviewPayload {
|
|
3
4
|
node: CodeBlockNodeProps['node'];
|
|
4
5
|
artifactType: 'text/html' | 'image/svg+xml';
|
|
@@ -9,5 +10,5 @@ export interface CodeBlockNodeReactEvents {
|
|
|
9
10
|
onCopy?: (code: string) => void;
|
|
10
11
|
onPreviewCode?: (payload: CodeBlockPreviewPayload) => void;
|
|
11
12
|
}
|
|
12
|
-
export declare function CodeBlockNode(rawProps: CodeBlockNodeProps & CodeBlockNodeReactEvents):
|
|
13
|
+
export declare function CodeBlockNode(rawProps: CodeBlockNodeProps & CodeBlockNodeReactEvents): React.JSX.Element;
|
|
13
14
|
export default CodeBlockNode;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { PreCodeNodeProps } from '../../types/component-props';
|
|
2
|
-
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function PreCodeNode({ node, className, diffInline, showLineNumbers, style }: PreCodeNodeProps): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { D2BlockNodeProps } from '../../types/component-props';
|
|
2
|
-
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export declare function D2BlockNode(rawProps: D2BlockNodeProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DefinitionItemNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function DefinitionListNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'definition_list';
|
|
5
6
|
items?: DefinitionItemNode[];
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
7
8
|
export default DefinitionListNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function EmojiNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'emoji';
|
|
4
5
|
name: string;
|
|
5
6
|
markup?: string;
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
7
8
|
export default EmojiNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function EmphasisNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'emphasis';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default EmphasisNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function FootnoteAnchorNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'footnote_anchor';
|
|
4
5
|
id: string;
|
|
5
|
-
}>):
|
|
6
|
+
}>): React.JSX.Element;
|
|
6
7
|
export default FootnoteAnchorNode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function FootnoteNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'footnote';
|
|
5
6
|
id: string;
|
|
6
7
|
children?: ParsedNode[];
|
|
7
|
-
}>):
|
|
8
|
+
}>): React.JSX.Element;
|
|
8
9
|
export default FootnoteNode;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function FootnoteReferenceNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'footnote_reference';
|
|
4
5
|
id: string;
|
|
5
|
-
}>):
|
|
6
|
+
}>): React.JSX.Element;
|
|
6
7
|
export default FootnoteReferenceNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function HardBreakNode(_props: NodeComponentProps<{
|
|
3
4
|
type: 'hardbreak';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default HardBreakNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function HeadingNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'heading';
|
|
5
6
|
level?: number;
|
|
6
7
|
children?: ParsedNode[];
|
|
7
8
|
attrs?: Record<string, string | boolean>;
|
|
8
|
-
}>):
|
|
9
|
+
}>): React.JSX.Element;
|
|
9
10
|
export default HeadingNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function HighlightNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'highlight';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default HighlightNode;
|
|
@@ -14,5 +14,5 @@ export declare function HtmlBlockNode(props: NodeComponentProps<{
|
|
|
14
14
|
customComponents?: CustomComponentMap;
|
|
15
15
|
htmlPolicy?: HtmlPolicy;
|
|
16
16
|
placeholder?: React.ReactNode;
|
|
17
|
-
}):
|
|
17
|
+
}): React.JSX.Element;
|
|
18
18
|
export default HtmlBlockNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HtmlPolicy } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function HtmlInlineNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'html_inline';
|
|
5
6
|
content: string;
|
|
@@ -7,5 +8,5 @@ export declare function HtmlInlineNode(props: NodeComponentProps<{
|
|
|
7
8
|
autoClosed?: boolean;
|
|
8
9
|
}> & {
|
|
9
10
|
htmlPolicy?: HtmlPolicy;
|
|
10
|
-
}):
|
|
11
|
+
}): React.JSX.Element;
|
|
11
12
|
export default HtmlInlineNode;
|
|
@@ -5,5 +5,5 @@ export interface ImageNodeReactEvents {
|
|
|
5
5
|
onError?: (src: string) => void;
|
|
6
6
|
onClick?: (payload: [event: React.MouseEvent<HTMLImageElement>, src: string]) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function ImageNode(rawProps: ImageNodeProps & ImageNodeReactEvents):
|
|
8
|
+
export declare function ImageNode(rawProps: ImageNodeProps & ImageNodeReactEvents): React.JSX.Element;
|
|
9
9
|
export default ImageNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InfographicBlockNodeProps, MermaidBlockEvent } from '../../types/component-props';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export interface InfographicBlockNodeReactEvents {
|
|
3
4
|
onCopy?: (code: string) => void;
|
|
4
5
|
onExport?: (event: MermaidBlockEvent<{
|
|
@@ -12,4 +13,4 @@ export interface InfographicBlockNodeReactEvents {
|
|
|
12
13
|
target: 'preview' | 'source';
|
|
13
14
|
}>) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare function InfographicBlockNode(rawProps: InfographicBlockNodeProps & InfographicBlockNodeReactEvents):
|
|
16
|
+
export declare function InfographicBlockNode(rawProps: InfographicBlockNodeProps & InfographicBlockNodeReactEvents): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function InlineCodeNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'inline_code';
|
|
4
5
|
code: string;
|
|
5
|
-
}>):
|
|
6
|
+
}>): React.JSX.Element;
|
|
6
7
|
export default InlineCodeNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function InsertNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'insert';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default InsertNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export interface LinkNodeStyleProps {
|
|
4
5
|
showTooltip?: boolean;
|
|
5
6
|
color?: string;
|
|
@@ -17,5 +18,5 @@ export declare function LinkNode(props: NodeComponentProps<{
|
|
|
17
18
|
text: string;
|
|
18
19
|
children?: ParsedNode[];
|
|
19
20
|
loading?: boolean;
|
|
20
|
-
}> & LinkNodeStyleProps):
|
|
21
|
+
}> & LinkNodeStyleProps): React.JSX.Element;
|
|
21
22
|
export default LinkNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export interface ListItemNodeData {
|
|
4
5
|
type: 'list_item';
|
|
5
6
|
children?: ParsedNode[];
|
|
@@ -8,5 +9,5 @@ export interface ListItemNodeData {
|
|
|
8
9
|
export interface ListItemNodeProps extends NodeComponentProps<ListItemNodeData> {
|
|
9
10
|
value?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare function ListItemNode(props: ListItemNodeProps):
|
|
12
|
+
export declare function ListItemNode(props: ListItemNodeProps): React.JSX.Element;
|
|
12
13
|
export default ListItemNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ListItemNode as ParsedListItemNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function ListNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'list';
|
|
5
6
|
ordered?: boolean;
|
|
6
7
|
start?: number;
|
|
7
8
|
items?: ParsedListItemNode[];
|
|
8
|
-
}>):
|
|
9
|
+
}>): React.JSX.Element;
|
|
9
10
|
export default ListNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ShikiCodeBlockProps } from '../../types/component-props';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export interface MarkdownCodeBlockNodeProps extends ShikiCodeBlockProps {
|
|
3
4
|
node: {
|
|
4
5
|
type: 'code_block';
|
|
@@ -29,5 +30,5 @@ export interface MarkdownCodeBlockNodeProps extends ShikiCodeBlockProps {
|
|
|
29
30
|
title: string;
|
|
30
31
|
}) => void;
|
|
31
32
|
}
|
|
32
|
-
export declare function MarkdownCodeBlockNode(rawProps: MarkdownCodeBlockNodeProps):
|
|
33
|
+
export declare function MarkdownCodeBlockNode(rawProps: MarkdownCodeBlockNodeProps): React.JSX.Element;
|
|
33
34
|
export default MarkdownCodeBlockNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MathBlockNodeProps } from '../../types/component-props';
|
|
2
|
-
export declare function MathBlockNode({ node }: MathBlockNodeProps): import("react
|
|
2
|
+
export declare function MathBlockNode({ node }: MathBlockNodeProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MathInlineNodeProps } from '../../types/component-props';
|
|
2
|
-
export declare function MathInlineNode({ node }: MathInlineNodeProps): import("react
|
|
2
|
+
export declare function MathInlineNode({ node }: MathInlineNodeProps): import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { MermaidBlockEvent, MermaidBlockNodeProps } from '../../types/component-props';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export interface MermaidBlockNodeReactEvents {
|
|
3
4
|
onCopy?: (code: string) => void;
|
|
4
5
|
onExport?: (event: MermaidBlockEvent<{
|
|
@@ -12,4 +13,4 @@ export interface MermaidBlockNodeReactEvents {
|
|
|
12
13
|
target: 'preview' | 'source';
|
|
13
14
|
}>) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare function MermaidBlockNode(rawProps: MermaidBlockNodeProps & MermaidBlockNodeReactEvents):
|
|
16
|
+
export declare function MermaidBlockNode(rawProps: MermaidBlockNodeProps & MermaidBlockNodeReactEvents): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function FallbackComponent(props: NodeComponentProps<{
|
|
3
4
|
type: string;
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default FallbackComponent;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function ParagraphNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'paragraph';
|
|
5
6
|
children?: ParsedNode[];
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
7
8
|
export default ParagraphNode;
|
|
@@ -11,5 +11,5 @@ export declare function ReferenceNode(props: NodeComponentProps<{
|
|
|
11
11
|
}> & {
|
|
12
12
|
messageId?: string;
|
|
13
13
|
threadId?: string;
|
|
14
|
-
} & ReferenceNodeHandlers):
|
|
14
|
+
} & ReferenceNodeHandlers): React.JSX.Element;
|
|
15
15
|
export default ReferenceNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function StrikethroughNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'strikethrough';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default StrikethroughNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function StrongNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'strong';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default StrongNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function SubscriptNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'subscript';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default SubscriptNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function SuperscriptNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'superscript';
|
|
4
|
-
}>):
|
|
5
|
+
}>): React.JSX.Element;
|
|
5
6
|
export default SuperscriptNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TableRowNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function TableNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'table';
|
|
5
6
|
header?: TableRowNode;
|
|
6
7
|
rows?: TableRowNode[];
|
|
7
8
|
loading?: boolean;
|
|
8
|
-
}>):
|
|
9
|
+
}>): React.JSX.Element;
|
|
9
10
|
export default TableNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { NodeComponentProps } from '../../types/node-component';
|
|
2
|
+
import { default as React } from 'react';
|
|
2
3
|
export declare function TextNode(props: NodeComponentProps<{
|
|
3
4
|
type: 'text';
|
|
4
5
|
content: string;
|
|
5
6
|
center?: boolean;
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
7
8
|
export default TextNode;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { NodeComponentProps } from '../../types/node-component';
|
|
3
|
+
import { default as React } from 'react';
|
|
3
4
|
export declare function VmrContainerNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'vmr_container';
|
|
5
6
|
name: string;
|
|
6
7
|
attrs?: Record<string, string> | [string, string | null][] | null;
|
|
7
8
|
children?: ParsedNode[];
|
|
8
|
-
}>):
|
|
9
|
+
}>): React.JSX.Element;
|
|
9
10
|
export default VmrContainerNode;
|
|
@@ -13,5 +13,5 @@ export interface ViewportPriorityProviderProps {
|
|
|
13
13
|
enabled?: boolean;
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare function ViewportPriorityProvider({ getRoot, enabled, children }: ViewportPriorityProviderProps):
|
|
16
|
+
export declare function ViewportPriorityProvider({ getRoot, enabled, children }: ViewportPriorityProviderProps): React.JSX.Element;
|
|
17
17
|
export declare function useViewportPriority(): RegisterViewportFn;
|
|
@@ -4,4 +4,4 @@ import { RenderContext, RenderNodeFn } from '../types';
|
|
|
4
4
|
export declare const BLOCK_LEVEL_TYPES: Set<string>;
|
|
5
5
|
export declare function tokenAttrsToProps(attrs?: [string, string | null][]): Record<string, string | true>;
|
|
6
6
|
export declare function renderNodeChildren(children: ParsedNode[] | undefined, ctx: RenderContext, prefix: string, renderNode: RenderNodeFn): ReactNode[];
|
|
7
|
-
export declare function renderInline(children: ParsedNode[] | undefined, ctx: RenderContext, prefix: string, renderNode: RenderNodeFn): import("react
|
|
7
|
+
export declare function renderInline(children: ParsedNode[] | undefined, ctx: RenderContext, prefix: string, renderNode: RenderNodeFn): import("react").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ParsedNode } from 'stream-markdown-parser';
|
|
2
2
|
import { RenderContext } from '../types';
|
|
3
3
|
import { default as React } from 'react';
|
|
4
|
-
export declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext):
|
|
4
|
+
export declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext): React.JSX.Element;
|
|
@@ -10,56 +10,56 @@ export declare function TextNode(props: NodeComponentProps<{
|
|
|
10
10
|
type: 'text';
|
|
11
11
|
content: string;
|
|
12
12
|
center?: boolean;
|
|
13
|
-
}>):
|
|
13
|
+
}>): React.JSX.Element;
|
|
14
14
|
export declare function ParagraphNode(props: NodeComponentProps<{
|
|
15
15
|
type: 'paragraph';
|
|
16
16
|
children?: ParsedNode[];
|
|
17
|
-
}>):
|
|
17
|
+
}>): React.JSX.Element;
|
|
18
18
|
export declare function HeadingNode(props: NodeComponentProps<{
|
|
19
19
|
type: 'heading';
|
|
20
20
|
level?: number;
|
|
21
21
|
children?: ParsedNode[];
|
|
22
22
|
attrs?: Record<string, string | boolean>;
|
|
23
|
-
}>):
|
|
23
|
+
}>): React.JSX.Element;
|
|
24
24
|
export declare function BlockquoteNode(props: NodeComponentProps<{
|
|
25
25
|
type: 'blockquote';
|
|
26
26
|
children?: ParsedNode[];
|
|
27
|
-
}>):
|
|
27
|
+
}>): React.JSX.Element;
|
|
28
28
|
export declare function ListItemNode(props: NodeComponentProps<{
|
|
29
29
|
type: 'list_item';
|
|
30
30
|
children?: ParsedNode[];
|
|
31
31
|
}> & {
|
|
32
32
|
value?: number;
|
|
33
|
-
}):
|
|
33
|
+
}): React.JSX.Element;
|
|
34
34
|
export declare function ListNode(props: NodeComponentProps<{
|
|
35
35
|
type: 'list';
|
|
36
36
|
ordered?: boolean;
|
|
37
37
|
start?: number;
|
|
38
38
|
items?: ListItemNodeType[];
|
|
39
|
-
}>):
|
|
39
|
+
}>): React.JSX.Element;
|
|
40
40
|
export declare function TableNode(props: NodeComponentProps<{
|
|
41
41
|
type: 'table';
|
|
42
42
|
header?: TableRowNodeType;
|
|
43
43
|
rows?: TableRowNodeType[];
|
|
44
44
|
loading?: boolean;
|
|
45
|
-
}>):
|
|
45
|
+
}>): React.JSX.Element;
|
|
46
46
|
export declare function DefinitionListNode(props: NodeComponentProps<{
|
|
47
47
|
type: 'definition_list';
|
|
48
48
|
items?: DefinitionItemNodeType[];
|
|
49
|
-
}>):
|
|
49
|
+
}>): React.JSX.Element;
|
|
50
50
|
export declare function FootnoteNode(props: NodeComponentProps<{
|
|
51
51
|
type: 'footnote';
|
|
52
52
|
id: string;
|
|
53
53
|
children?: ParsedNode[];
|
|
54
|
-
}>):
|
|
54
|
+
}>): React.JSX.Element;
|
|
55
55
|
export declare function FootnoteReferenceNode(props: NodeComponentProps<{
|
|
56
56
|
type: 'footnote_reference';
|
|
57
57
|
id: string;
|
|
58
|
-
}>):
|
|
58
|
+
}>): React.JSX.Element;
|
|
59
59
|
export declare function FootnoteAnchorNode(props: NodeComponentProps<{
|
|
60
60
|
type: 'footnote_anchor';
|
|
61
61
|
id: string;
|
|
62
|
-
}>):
|
|
62
|
+
}>): React.JSX.Element;
|
|
63
63
|
export declare function AdmonitionNode(props: NodeComponentProps<{
|
|
64
64
|
type: 'admonition';
|
|
65
65
|
kind?: string;
|
|
@@ -67,54 +67,54 @@ export declare function AdmonitionNode(props: NodeComponentProps<{
|
|
|
67
67
|
children?: ParsedNode[];
|
|
68
68
|
collapsible?: boolean;
|
|
69
69
|
open?: boolean;
|
|
70
|
-
}>):
|
|
70
|
+
}>): React.JSX.Element;
|
|
71
71
|
export declare function CheckboxNode(props: NodeComponentProps<{
|
|
72
72
|
type: 'checkbox' | 'checkbox_input';
|
|
73
73
|
checked?: boolean;
|
|
74
|
-
}>):
|
|
74
|
+
}>): React.JSX.Element;
|
|
75
75
|
export declare function EmojiNode(props: NodeComponentProps<{
|
|
76
76
|
type: 'emoji';
|
|
77
77
|
name: string;
|
|
78
78
|
markup?: string;
|
|
79
|
-
}>):
|
|
79
|
+
}>): React.JSX.Element;
|
|
80
80
|
export declare function StrongNode(props: NodeComponentProps<{
|
|
81
81
|
type: 'strong';
|
|
82
82
|
children?: ParsedNode[];
|
|
83
|
-
}>):
|
|
83
|
+
}>): React.JSX.Element;
|
|
84
84
|
export declare function EmphasisNode(props: NodeComponentProps<{
|
|
85
85
|
type: 'emphasis';
|
|
86
86
|
children?: ParsedNode[];
|
|
87
|
-
}>):
|
|
87
|
+
}>): React.JSX.Element;
|
|
88
88
|
export declare function StrikethroughNode(props: NodeComponentProps<{
|
|
89
89
|
type: 'strikethrough';
|
|
90
90
|
children?: ParsedNode[];
|
|
91
|
-
}>):
|
|
91
|
+
}>): React.JSX.Element;
|
|
92
92
|
export declare function HighlightNode(props: NodeComponentProps<{
|
|
93
93
|
type: 'highlight';
|
|
94
94
|
children?: ParsedNode[];
|
|
95
|
-
}>):
|
|
95
|
+
}>): React.JSX.Element;
|
|
96
96
|
export declare function InsertNode(props: NodeComponentProps<{
|
|
97
97
|
type: 'insert';
|
|
98
98
|
children?: ParsedNode[];
|
|
99
|
-
}>):
|
|
99
|
+
}>): React.JSX.Element;
|
|
100
100
|
export declare function SubscriptNode(props: NodeComponentProps<{
|
|
101
101
|
type: 'subscript';
|
|
102
102
|
children?: ParsedNode[];
|
|
103
|
-
}>):
|
|
103
|
+
}>): React.JSX.Element;
|
|
104
104
|
export declare function SuperscriptNode(props: NodeComponentProps<{
|
|
105
105
|
type: 'superscript';
|
|
106
106
|
children?: ParsedNode[];
|
|
107
|
-
}>):
|
|
107
|
+
}>): React.JSX.Element;
|
|
108
108
|
export declare function HardBreakNode(_props: NodeComponentProps<{
|
|
109
109
|
type: 'hardbreak';
|
|
110
|
-
}>):
|
|
110
|
+
}>): React.JSX.Element;
|
|
111
111
|
export declare function ThematicBreakNode(_props?: NodeComponentProps<{
|
|
112
112
|
type: 'thematic_break';
|
|
113
|
-
}>):
|
|
113
|
+
}>): React.JSX.Element;
|
|
114
114
|
export declare function InlineCodeNode(props: NodeComponentProps<{
|
|
115
115
|
type: 'inline_code';
|
|
116
116
|
code: string;
|
|
117
|
-
}>):
|
|
117
|
+
}>): React.JSX.Element;
|
|
118
118
|
export declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']> & {
|
|
119
119
|
showTooltip?: boolean;
|
|
120
120
|
color?: string;
|
|
@@ -124,46 +124,46 @@ export declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']
|
|
|
124
124
|
animationOpacity?: number;
|
|
125
125
|
animationTiming?: string;
|
|
126
126
|
animationIteration?: string | number;
|
|
127
|
-
}):
|
|
128
|
-
export declare function ImageNode(rawProps: ImageNodeProps):
|
|
129
|
-
export declare function PreCodeNode({ node }: PreCodeNodeProps):
|
|
130
|
-
export declare function CodeBlockNode(props: CodeBlockNodeProps):
|
|
131
|
-
export declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps):
|
|
132
|
-
export declare function MermaidBlockNode(props: MermaidBlockNodeProps):
|
|
133
|
-
export declare function D2BlockNode(props: D2BlockNodeProps):
|
|
134
|
-
export declare function InfographicBlockNode(props: InfographicBlockNodeProps):
|
|
135
|
-
export declare function MathBlockNode({ node }: MathBlockNodeProps):
|
|
136
|
-
export declare function MathInlineNode({ node }: MathInlineNodeProps):
|
|
127
|
+
}): React.JSX.Element;
|
|
128
|
+
export declare function ImageNode(rawProps: ImageNodeProps): React.JSX.Element;
|
|
129
|
+
export declare function PreCodeNode({ node }: PreCodeNodeProps): React.JSX.Element;
|
|
130
|
+
export declare function CodeBlockNode(props: CodeBlockNodeProps): React.JSX.Element;
|
|
131
|
+
export declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): React.JSX.Element;
|
|
132
|
+
export declare function MermaidBlockNode(props: MermaidBlockNodeProps): React.JSX.Element;
|
|
133
|
+
export declare function D2BlockNode(props: D2BlockNodeProps): React.JSX.Element;
|
|
134
|
+
export declare function InfographicBlockNode(props: InfographicBlockNodeProps): React.JSX.Element;
|
|
135
|
+
export declare function MathBlockNode({ node }: MathBlockNodeProps): React.JSX.Element;
|
|
136
|
+
export declare function MathInlineNode({ node }: MathInlineNodeProps): React.JSX.Element;
|
|
137
137
|
export declare function ReferenceNode(props: NodeComponentProps<{
|
|
138
138
|
type: 'reference';
|
|
139
139
|
id: string;
|
|
140
140
|
}> & {
|
|
141
141
|
messageId?: string;
|
|
142
142
|
threadId?: string;
|
|
143
|
-
}):
|
|
143
|
+
}): React.JSX.Element;
|
|
144
144
|
export declare function HtmlBlockNode(props: NodeComponentProps<{
|
|
145
145
|
type: 'html_block';
|
|
146
146
|
content?: string;
|
|
147
147
|
tag?: string;
|
|
148
148
|
attrs?: [string, string | null][] | null;
|
|
149
149
|
children?: ParsedNode[];
|
|
150
|
-
}>):
|
|
150
|
+
}>): React.JSX.Element;
|
|
151
151
|
export declare function HtmlInlineNode(props: NodeComponentProps<{
|
|
152
152
|
type: 'html_inline';
|
|
153
153
|
content?: string;
|
|
154
|
-
}>):
|
|
154
|
+
}>): React.JSX.Element;
|
|
155
155
|
export declare function VmrContainerNode(props: NodeComponentProps<{
|
|
156
156
|
type: 'vmr_container';
|
|
157
157
|
name: string;
|
|
158
158
|
attrs?: Record<string, string> | [string, string | null][] | null;
|
|
159
159
|
children?: ParsedNode[];
|
|
160
|
-
}>):
|
|
160
|
+
}>): React.JSX.Element;
|
|
161
161
|
export declare function Tooltip(_props: TooltipProps): any;
|
|
162
162
|
export declare function HtmlPreviewFrame(_props: HtmlPreviewFrameProps): any;
|
|
163
163
|
export declare function FallbackComponent(props: NodeComponentProps<{
|
|
164
164
|
type: string;
|
|
165
|
-
}>):
|
|
166
|
-
export declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext):
|
|
167
|
-
export declare function NodeRenderer(props: NodeRendererProps):
|
|
165
|
+
}>): React.JSX.Element;
|
|
166
|
+
export declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext): React.JSX.Element;
|
|
167
|
+
export declare function NodeRenderer(props: NodeRendererProps): React.JSX.Element;
|
|
168
168
|
export { CodeBlockNode as ReactCodeBlockNode };
|
|
169
169
|
export default NodeRenderer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|