markstream-react 0.0.50 → 0.0.53
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 +173 -106
- package/dist/Tooltip-DSM4ImfZ.js +207 -0
- package/dist/codeBlockExtraProps-RaPzFq78.js +3 -0
- package/dist/index-D0DspXy9.js +85 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -2
- 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 +41 -19
- package/dist/next.js +1 -1
- package/dist/server.d.ts +67 -45
- 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 +6 -2
- 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/NodeRenderer.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/customComponents.d.ts +20 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/next.d.ts +7 -3
- 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 +45 -41
- package/dist/types/server.d.ts +2 -2
- package/dist/types/styles.d.ts +1 -0
- package/dist/types/types.d.ts +8 -3
- package/dist/types/utils/customHtmlTag.d.ts +5 -4
- package/dist/types/utils/htmlToReact.d.ts +17 -6
- package/package.json +41 -42
- package/dist/Tooltip-D786qxIk.js +0 -207
- package/dist/codeBlockExtraProps-7n9FWJXk.js +0 -3
- package/dist/index-o_DISWz2.js +0 -85
- package/dist/tailwind.ts +0 -3
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CodeBlockNode as CodeBlockNode$1, BaseNode, ParseOptions, MarkdownIt, HtmlPolicy, ParsedNode, ListItemNode as ListItemNode$1, TableRowNode, DefinitionItemNode } from 'stream-markdown-parser';
|
|
2
|
-
import React, { ComponentType, CSSProperties } from 'react';
|
|
2
|
+
import React, { ComponentType, PropsWithChildren, CSSProperties } from 'react';
|
|
3
3
|
import { SmoothMarkdownStreamOptions } from 'markstream-core';
|
|
4
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
4
|
|
|
6
5
|
interface HtmlPreviewFrameProps {
|
|
7
6
|
code: string;
|
|
@@ -17,6 +16,19 @@ type MarkstreamCustomComponent<P = never> = ComponentType<P> & {
|
|
|
17
16
|
markstreamDisplay?: CustomComponentDisplayMode;
|
|
18
17
|
};
|
|
19
18
|
type CustomComponentMap = Record<string, MarkstreamCustomComponent>;
|
|
19
|
+
type StreamingComponent<TNode = any> = ComponentType<NodeComponentProps<TNode>>;
|
|
20
|
+
type StreamingComponentMap = Record<string, StreamingComponent<any>>;
|
|
21
|
+
type HtmlComponent<P extends object = any> = ComponentType<PropsWithChildren<P>>;
|
|
22
|
+
type HtmlComponentMap = Record<string, HtmlComponent<any>>;
|
|
23
|
+
type IsAny<T> = 0 extends (1 & T) ? true : false;
|
|
24
|
+
type ComponentProps<T> = T extends ComponentType<infer P> ? P : T extends (props: infer P) => any ? P : never;
|
|
25
|
+
type StreamingComponentDefinitions<T extends Record<string, any>> = {
|
|
26
|
+
[K in keyof T]: ComponentProps<T[K]> extends infer P ? IsAny<P> extends true ? T[K] : P extends NodeComponentProps<any> ? NodeComponentProps<any> extends P ? T[K] : never : never : never;
|
|
27
|
+
};
|
|
28
|
+
type ParserComponentOnlyProp = Exclude<keyof NodeComponentProps<any>, 'children' | 'node'>;
|
|
29
|
+
type HtmlComponentDefinitions<T extends Record<string, any>> = {
|
|
30
|
+
[K in keyof T]: ComponentProps<T[K]> extends infer P ? IsAny<P> extends true ? T[K] : Extract<keyof P, ParserComponentOnlyProp> extends never ? T[K] : never : never;
|
|
31
|
+
};
|
|
20
32
|
declare function setCustomComponents(id: string, mapping: CustomComponentMap): void;
|
|
21
33
|
declare function setCustomComponents(mapping: CustomComponentMap): void;
|
|
22
34
|
declare function getCustomNodeComponents(customId?: string): CustomComponentMap;
|
|
@@ -26,6 +38,8 @@ declare function getCustomComponentDisplay(component: ComponentType<never> | nul
|
|
|
26
38
|
declare function withMarkstreamComponentDisplay<T extends ComponentType<never>>(component: T, display: CustomComponentDisplayMode): T & {
|
|
27
39
|
markstreamDisplay: CustomComponentDisplayMode;
|
|
28
40
|
};
|
|
41
|
+
declare function defineStreamingComponents<const T extends Record<string, ComponentType<any>>>(components: T & StreamingComponentDefinitions<T>): T & StreamingComponentDefinitions<T>;
|
|
42
|
+
declare function defineHtmlComponents<const T extends Record<string, ComponentType<any>>>(components: T & HtmlComponentDefinitions<T>): T & HtmlComponentDefinitions<T>;
|
|
29
43
|
|
|
30
44
|
interface CodeBlockMonacoThemeObject {
|
|
31
45
|
name: string;
|
|
@@ -263,7 +277,7 @@ type NodeRendererCodeBlockThemes = CodeBlockNodeProps['themes'] | ShikiCodeBlock
|
|
|
263
277
|
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node' | 'themes'>> & Partial<Omit<ShikiCodeBlockProps, 'themes'>> & {
|
|
264
278
|
themes?: NodeRendererCodeBlockThemes;
|
|
265
279
|
} & Record<string, unknown>;
|
|
266
|
-
interface NodeRendererProps {
|
|
280
|
+
interface NodeRendererProps<TStreamingComponents extends Record<string, ComponentType<any>> = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap> {
|
|
267
281
|
content?: string;
|
|
268
282
|
nodes?: readonly BaseNode[] | null;
|
|
269
283
|
/**
|
|
@@ -273,6 +287,8 @@ interface NodeRendererProps {
|
|
|
273
287
|
final?: boolean;
|
|
274
288
|
parseOptions?: ParseOptions;
|
|
275
289
|
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
290
|
+
streamingComponents?: TStreamingComponents & StreamingComponentDefinitions<TStreamingComponents>;
|
|
291
|
+
htmlComponents?: THtmlComponents & HtmlComponentDefinitions<THtmlComponents>;
|
|
276
292
|
/** Log parse/render timing stats (dev only). */
|
|
277
293
|
debugPerformance?: boolean;
|
|
278
294
|
/**
|
|
@@ -342,6 +358,7 @@ interface NodeRendererProps {
|
|
|
342
358
|
interface RenderContext {
|
|
343
359
|
customId?: string;
|
|
344
360
|
isDark?: boolean;
|
|
361
|
+
final?: boolean;
|
|
345
362
|
indexKey?: string;
|
|
346
363
|
typewriter?: boolean;
|
|
347
364
|
/** Enable/disable fade animations. Default: true */
|
|
@@ -349,6 +366,8 @@ interface RenderContext {
|
|
|
349
366
|
textStreamState?: Map<string, string>;
|
|
350
367
|
streamRenderVersion?: number;
|
|
351
368
|
customComponents?: CustomComponentMap;
|
|
369
|
+
streamingComponents?: StreamingComponentMap;
|
|
370
|
+
htmlComponents?: HtmlComponentMap;
|
|
352
371
|
customHtmlTags?: readonly string[];
|
|
353
372
|
htmlPolicy?: HtmlPolicy;
|
|
354
373
|
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
@@ -455,56 +474,56 @@ declare function TextNode(props: NodeComponentProps<{
|
|
|
455
474
|
type: 'text';
|
|
456
475
|
content: string;
|
|
457
476
|
center?: boolean;
|
|
458
|
-
}>):
|
|
477
|
+
}>): React.JSX.Element;
|
|
459
478
|
declare function ParagraphNode(props: NodeComponentProps<{
|
|
460
479
|
type: 'paragraph';
|
|
461
480
|
children?: ParsedNode[];
|
|
462
|
-
}>):
|
|
481
|
+
}>): React.JSX.Element;
|
|
463
482
|
declare function HeadingNode(props: NodeComponentProps<{
|
|
464
483
|
type: 'heading';
|
|
465
484
|
level?: number;
|
|
466
485
|
children?: ParsedNode[];
|
|
467
486
|
attrs?: Record<string, string | boolean>;
|
|
468
|
-
}>):
|
|
487
|
+
}>): React.JSX.Element;
|
|
469
488
|
declare function BlockquoteNode(props: NodeComponentProps<{
|
|
470
489
|
type: 'blockquote';
|
|
471
490
|
children?: ParsedNode[];
|
|
472
|
-
}>):
|
|
491
|
+
}>): React.JSX.Element;
|
|
473
492
|
declare function ListItemNode(props: NodeComponentProps<{
|
|
474
493
|
type: 'list_item';
|
|
475
494
|
children?: ParsedNode[];
|
|
476
495
|
}> & {
|
|
477
496
|
value?: number;
|
|
478
|
-
}):
|
|
497
|
+
}): React.JSX.Element;
|
|
479
498
|
declare function ListNode(props: NodeComponentProps<{
|
|
480
499
|
type: 'list';
|
|
481
500
|
ordered?: boolean;
|
|
482
501
|
start?: number;
|
|
483
502
|
items?: ListItemNode$1[];
|
|
484
|
-
}>):
|
|
503
|
+
}>): React.JSX.Element;
|
|
485
504
|
declare function TableNode(props: NodeComponentProps<{
|
|
486
505
|
type: 'table';
|
|
487
506
|
header?: TableRowNode;
|
|
488
507
|
rows?: TableRowNode[];
|
|
489
508
|
loading?: boolean;
|
|
490
|
-
}>):
|
|
509
|
+
}>): React.JSX.Element;
|
|
491
510
|
declare function DefinitionListNode(props: NodeComponentProps<{
|
|
492
511
|
type: 'definition_list';
|
|
493
512
|
items?: DefinitionItemNode[];
|
|
494
|
-
}>):
|
|
513
|
+
}>): React.JSX.Element;
|
|
495
514
|
declare function FootnoteNode(props: NodeComponentProps<{
|
|
496
515
|
type: 'footnote';
|
|
497
516
|
id: string;
|
|
498
517
|
children?: ParsedNode[];
|
|
499
|
-
}>):
|
|
518
|
+
}>): React.JSX.Element;
|
|
500
519
|
declare function FootnoteReferenceNode(props: NodeComponentProps<{
|
|
501
520
|
type: 'footnote_reference';
|
|
502
521
|
id: string;
|
|
503
|
-
}>):
|
|
522
|
+
}>): React.JSX.Element;
|
|
504
523
|
declare function FootnoteAnchorNode(props: NodeComponentProps<{
|
|
505
524
|
type: 'footnote_anchor';
|
|
506
525
|
id: string;
|
|
507
|
-
}>):
|
|
526
|
+
}>): React.JSX.Element;
|
|
508
527
|
declare function AdmonitionNode(props: NodeComponentProps<{
|
|
509
528
|
type: 'admonition';
|
|
510
529
|
kind?: string;
|
|
@@ -512,54 +531,54 @@ declare function AdmonitionNode(props: NodeComponentProps<{
|
|
|
512
531
|
children?: ParsedNode[];
|
|
513
532
|
collapsible?: boolean;
|
|
514
533
|
open?: boolean;
|
|
515
|
-
}>):
|
|
534
|
+
}>): React.JSX.Element;
|
|
516
535
|
declare function CheckboxNode(props: NodeComponentProps<{
|
|
517
536
|
type: 'checkbox' | 'checkbox_input';
|
|
518
537
|
checked?: boolean;
|
|
519
|
-
}>):
|
|
538
|
+
}>): React.JSX.Element;
|
|
520
539
|
declare function EmojiNode(props: NodeComponentProps<{
|
|
521
540
|
type: 'emoji';
|
|
522
541
|
name: string;
|
|
523
542
|
markup?: string;
|
|
524
|
-
}>):
|
|
543
|
+
}>): React.JSX.Element;
|
|
525
544
|
declare function StrongNode(props: NodeComponentProps<{
|
|
526
545
|
type: 'strong';
|
|
527
546
|
children?: ParsedNode[];
|
|
528
|
-
}>):
|
|
547
|
+
}>): React.JSX.Element;
|
|
529
548
|
declare function EmphasisNode(props: NodeComponentProps<{
|
|
530
549
|
type: 'emphasis';
|
|
531
550
|
children?: ParsedNode[];
|
|
532
|
-
}>):
|
|
551
|
+
}>): React.JSX.Element;
|
|
533
552
|
declare function StrikethroughNode(props: NodeComponentProps<{
|
|
534
553
|
type: 'strikethrough';
|
|
535
554
|
children?: ParsedNode[];
|
|
536
|
-
}>):
|
|
555
|
+
}>): React.JSX.Element;
|
|
537
556
|
declare function HighlightNode(props: NodeComponentProps<{
|
|
538
557
|
type: 'highlight';
|
|
539
558
|
children?: ParsedNode[];
|
|
540
|
-
}>):
|
|
559
|
+
}>): React.JSX.Element;
|
|
541
560
|
declare function InsertNode(props: NodeComponentProps<{
|
|
542
561
|
type: 'insert';
|
|
543
562
|
children?: ParsedNode[];
|
|
544
|
-
}>):
|
|
563
|
+
}>): React.JSX.Element;
|
|
545
564
|
declare function SubscriptNode(props: NodeComponentProps<{
|
|
546
565
|
type: 'subscript';
|
|
547
566
|
children?: ParsedNode[];
|
|
548
|
-
}>):
|
|
567
|
+
}>): React.JSX.Element;
|
|
549
568
|
declare function SuperscriptNode(props: NodeComponentProps<{
|
|
550
569
|
type: 'superscript';
|
|
551
570
|
children?: ParsedNode[];
|
|
552
|
-
}>):
|
|
571
|
+
}>): React.JSX.Element;
|
|
553
572
|
declare function HardBreakNode(_props: NodeComponentProps<{
|
|
554
573
|
type: 'hardbreak';
|
|
555
|
-
}>):
|
|
574
|
+
}>): React.JSX.Element;
|
|
556
575
|
declare function ThematicBreakNode(_props?: NodeComponentProps<{
|
|
557
576
|
type: 'thematic_break';
|
|
558
|
-
}>):
|
|
577
|
+
}>): React.JSX.Element;
|
|
559
578
|
declare function InlineCodeNode(props: NodeComponentProps<{
|
|
560
579
|
type: 'inline_code';
|
|
561
580
|
code: string;
|
|
562
|
-
}>):
|
|
581
|
+
}>): React.JSX.Element;
|
|
563
582
|
declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']> & {
|
|
564
583
|
showTooltip?: boolean;
|
|
565
584
|
color?: string;
|
|
@@ -569,46 +588,49 @@ declare function LinkNode(props: NodeComponentProps<LinkNodeProps['node']> & {
|
|
|
569
588
|
animationOpacity?: number;
|
|
570
589
|
animationTiming?: string;
|
|
571
590
|
animationIteration?: string | number;
|
|
572
|
-
}):
|
|
573
|
-
declare function ImageNode(rawProps: ImageNodeProps):
|
|
574
|
-
declare function PreCodeNode({ node }: PreCodeNodeProps):
|
|
575
|
-
declare function CodeBlockNode(props: CodeBlockNodeProps):
|
|
576
|
-
declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps):
|
|
577
|
-
declare function MermaidBlockNode(props: MermaidBlockNodeProps):
|
|
578
|
-
declare function D2BlockNode(props: D2BlockNodeProps):
|
|
579
|
-
declare function InfographicBlockNode(props: InfographicBlockNodeProps):
|
|
580
|
-
declare function MathBlockNode({ node }: MathBlockNodeProps):
|
|
581
|
-
declare function MathInlineNode({ node }: MathInlineNodeProps):
|
|
591
|
+
}): React.JSX.Element;
|
|
592
|
+
declare function ImageNode(rawProps: ImageNodeProps): React.JSX.Element;
|
|
593
|
+
declare function PreCodeNode({ node }: PreCodeNodeProps): React.JSX.Element;
|
|
594
|
+
declare function CodeBlockNode(props: CodeBlockNodeProps): React.JSX.Element;
|
|
595
|
+
declare function MarkdownCodeBlockNode(props: MarkdownCodeBlockNodeProps): React.JSX.Element;
|
|
596
|
+
declare function MermaidBlockNode(props: MermaidBlockNodeProps): React.JSX.Element;
|
|
597
|
+
declare function D2BlockNode(props: D2BlockNodeProps): React.JSX.Element;
|
|
598
|
+
declare function InfographicBlockNode(props: InfographicBlockNodeProps): React.JSX.Element;
|
|
599
|
+
declare function MathBlockNode({ node }: MathBlockNodeProps): React.JSX.Element;
|
|
600
|
+
declare function MathInlineNode({ node }: MathInlineNodeProps): React.JSX.Element;
|
|
582
601
|
declare function ReferenceNode(props: NodeComponentProps<{
|
|
583
602
|
type: 'reference';
|
|
584
603
|
id: string;
|
|
585
604
|
}> & {
|
|
586
605
|
messageId?: string;
|
|
587
606
|
threadId?: string;
|
|
588
|
-
}):
|
|
607
|
+
}): React.JSX.Element;
|
|
589
608
|
declare function HtmlBlockNode(props: NodeComponentProps<{
|
|
590
609
|
type: 'html_block';
|
|
591
610
|
content?: string;
|
|
592
611
|
tag?: string;
|
|
593
612
|
attrs?: [string, string | null][] | null;
|
|
594
613
|
children?: ParsedNode[];
|
|
595
|
-
}>):
|
|
614
|
+
}>): React.JSX.Element;
|
|
596
615
|
declare function HtmlInlineNode(props: NodeComponentProps<{
|
|
597
616
|
type: 'html_inline';
|
|
598
617
|
content?: string;
|
|
599
|
-
|
|
618
|
+
tag?: string;
|
|
619
|
+
attrs?: [string, string | null][] | null;
|
|
620
|
+
children?: ParsedNode[];
|
|
621
|
+
}>): React.JSX.Element;
|
|
600
622
|
declare function VmrContainerNode(props: NodeComponentProps<{
|
|
601
623
|
type: 'vmr_container';
|
|
602
624
|
name: string;
|
|
603
625
|
attrs?: Record<string, string> | [string, string | null][] | null;
|
|
604
626
|
children?: ParsedNode[];
|
|
605
|
-
}>):
|
|
627
|
+
}>): React.JSX.Element;
|
|
606
628
|
declare function Tooltip(_props: TooltipProps): any;
|
|
607
629
|
declare function HtmlPreviewFrame(_props: HtmlPreviewFrameProps): any;
|
|
608
630
|
declare function FallbackComponent(props: NodeComponentProps<{
|
|
609
631
|
type: string;
|
|
610
|
-
}>):
|
|
611
|
-
declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext):
|
|
612
|
-
declare function NodeRenderer(props: NodeRendererProps):
|
|
632
|
+
}>): React.JSX.Element;
|
|
633
|
+
declare function renderNode(node: ParsedNode, key: React.Key, ctx: RenderContext): any;
|
|
634
|
+
declare function NodeRenderer<TStreamingComponents extends StreamingComponentMap = StreamingComponentMap, THtmlComponents extends Record<string, any> = HtmlComponentMap>(props: NodeRendererProps<TStreamingComponents, THtmlComponents>): React.JSX.Element;
|
|
613
635
|
|
|
614
|
-
export { AdmonitionNode, BlockquoteNode, CheckboxNode, CodeBlockDiffAppearance, CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockDiffHunkActionContext, CodeBlockDiffHunkActionKind, CodeBlockDiffHunkSide, CodeBlockDiffLineStyle, CodeBlockDiffUnchangedRegionStyle, CodeBlockMonacoLanguage, CodeBlockMonacoOptions, CodeBlockMonacoTheme, CodeBlockMonacoThemeObject, CodeBlockNode, CodeBlockNodeProps, CodeBlockPreviewPayload, CommonCodeBlockProps, CustomComponentDisplayMode, D2BlockNode, D2BlockNodeProps, DefinitionListNode, EmojiNode, EmphasisNode, FallbackComponent, FootnoteAnchorNode, FootnoteNode, FootnoteReferenceNode, HardBreakNode, HeadingNode, HighlightNode, HtmlBlockNode, HtmlInlineNode, HtmlPreviewFrame, HtmlPreviewFrameProps, ImageNode, ImageNodeProps, InfographicBlockNode, InfographicBlockNodeProps, InlineCodeNode, InsertNode, LinkNode, LinkNodeProps, LinkNodeStyleProps, ListItemNode, ListItemNodeProps, ListNode, MarkdownCodeBlockNode, MarkdownCodeBlockNodeProps, MarkstreamCustomComponent, MathBlockNode, MathBlockNodeProps, MathInlineNode, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNode, MermaidBlockNodeProps, NodeComponentProps, NodeRenderer, NodeRendererCodeBlockProps, NodeRendererProps, ParagraphNode, PreCodeNode, PreCodeNodeProps, CodeBlockNode as ReactCodeBlockNode, ReferenceNode, ShikiCodeBlockProps, StrikethroughNode, StrongNode, SubscriptNode, SuperscriptNode, TableNode, TextNode, ThematicBreakNode, Tooltip, TooltipPlacement, TooltipProps, VmrContainerNode, clearGlobalCustomComponents, NodeRenderer as default, getCustomComponentDisplay, getCustomNodeComponents, removeCustomComponents, renderNode, setCustomComponents, withMarkstreamComponentDisplay };
|
|
636
|
+
export { AdmonitionNode, BlockquoteNode, CheckboxNode, CodeBlockDiffAppearance, CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockDiffHunkActionContext, CodeBlockDiffHunkActionKind, CodeBlockDiffHunkSide, CodeBlockDiffLineStyle, CodeBlockDiffUnchangedRegionStyle, CodeBlockMonacoLanguage, CodeBlockMonacoOptions, CodeBlockMonacoTheme, CodeBlockMonacoThemeObject, CodeBlockNode, CodeBlockNodeProps, CodeBlockPreviewPayload, CommonCodeBlockProps, CustomComponentDisplayMode, D2BlockNode, D2BlockNodeProps, DefinitionListNode, EmojiNode, EmphasisNode, FallbackComponent, FootnoteAnchorNode, FootnoteNode, FootnoteReferenceNode, HardBreakNode, HeadingNode, HighlightNode, HtmlBlockNode, HtmlComponent, HtmlComponentMap, HtmlInlineNode, HtmlPreviewFrame, HtmlPreviewFrameProps, ImageNode, ImageNodeProps, InfographicBlockNode, InfographicBlockNodeProps, InlineCodeNode, InsertNode, LinkNode, LinkNodeProps, LinkNodeStyleProps, ListItemNode, ListItemNodeProps, ListNode, MarkdownCodeBlockNode, MarkdownCodeBlockNodeProps, MarkstreamCustomComponent, MathBlockNode, MathBlockNodeProps, MathInlineNode, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNode, MermaidBlockNodeProps, NodeComponentProps, NodeRenderer, NodeRendererCodeBlockProps, NodeRendererProps, ParagraphNode, PreCodeNode, PreCodeNodeProps, CodeBlockNode as ReactCodeBlockNode, ReferenceNode, ShikiCodeBlockProps, StreamingComponent, StreamingComponentMap, StrikethroughNode, StrongNode, SubscriptNode, SuperscriptNode, TableNode, TextNode, ThematicBreakNode, Tooltip, TooltipPlacement, TooltipProps, VmrContainerNode, clearGlobalCustomComponents, NodeRenderer as default, defineHtmlComponents, defineStreamingComponents, getCustomComponentDisplay, getCustomNodeComponents, removeCustomComponents, renderNode, setCustomComponents, withMarkstreamComponentDisplay };
|
package/dist/server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as e,d as o,e as a,i as s,k as d,z as t,G as n,N}from"./codeBlockExtraProps-RaPzFq78.js";import{A as r,B as i,C as m,a as l,D as c,b as p,E as C,c as k,F as h,d as B,e as g,f as u,H as f,g as H,h as I,i as b,j as x,k as F,I as M,l as S,m as D,n as L,L as P,o as R,p as T,M as j,q as w,r as E,s as v,N as y,P as A,t as G,a as q,R as z,S as V,u as J,v as K,w as O,T as Q,x as U,y as W,z as X,V as Y,N as Z,G as $}from"./index-D0DspXy9.js";export{r as AdmonitionNode,i as BlockquoteNode,m as CheckboxNode,l as CodeBlockNode,c as D2BlockNode,p as DefinitionListNode,C as EmojiNode,k as EmphasisNode,h as FallbackComponent,B as FootnoteAnchorNode,g as FootnoteNode,u as FootnoteReferenceNode,f as HardBreakNode,H as HeadingNode,I as HighlightNode,b as HtmlBlockNode,x as HtmlInlineNode,F as HtmlPreviewFrame,M as ImageNode,S as InfographicBlockNode,D as InlineCodeNode,L as InsertNode,P as LinkNode,R as ListItemNode,T as ListNode,j as MarkdownCodeBlockNode,w as MathBlockNode,E as MathInlineNode,v as MermaidBlockNode,y as NodeRenderer,A as ParagraphNode,G as PreCodeNode,q as ReactCodeBlockNode,z as ReferenceNode,V as StrikethroughNode,J as StrongNode,K as SubscriptNode,O as SuperscriptNode,Q as TableNode,U as TextNode,W as ThematicBreakNode,X as Tooltip,Y as VmrContainerNode,e as clearGlobalCustomComponents,Z as default,o as defineHtmlComponents,a as defineStreamingComponents,s as getCustomComponentDisplay,d as getCustomNodeComponents,t as removeCustomComponents,$ as renderNode,n as setCustomComponents,N as withMarkstreamComponentDisplay};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents checkbox-node checkbox checkbox-input note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby blockquote-node auto code_block next.type typeof window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image object [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid theme name markdown-renderer boolean safe smooth footnote-reference handleScroll footnote-link cursor-pointer mark highlight-node footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 emphasis-node dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode ?? definition dd definition-desc ml-4 dependency is not install it to enable hard-break emoji-node footnote-anchor hover:underline ↩︎ clsx heading-node html-block-node escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes href xlink:href markstream-d2-root-svg number window.requestAnimationFrame instance.render instance missing render returned empty top d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 font-medium font-mono gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs rounded !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 style.visibility hidden line-info legacy off never background night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus plaintext diff important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class explicit fontSize lineHeight paddingBottom paddingTop tabSize on same helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-fallback-plain m-0 code-block-container is-rendering is-diff is-plain-text code-block-header space-x-2 icon-slot h-4 w-4 flex-shrink-0 truncate code-action-btn copied m14 evenodd code-block-body--collapsed code-block-body--expanded code-editor-layer code-height-placeholder aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status list-item pl-1.5 my-2 valueAttr children primary fallback failed is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load ease-in-out infinite node.title link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer markstream-core inline-code inline text-[85%] px-1 py-0.5 bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b insert-node list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list react-dom library text-red-500 p-4">Failed instanceof error.message error keydown transform ease center fullscreen touches text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasPreview preview pending bg-gray-800 bg-gray-50 px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview min-h-[360px] transition-all duration-100 block inset-0 cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 p-4 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing hr-node thematic-break strikethrough-node vitesse-dark vitesse-light shiki shiki-fallback [MarkdownCodeBlockNode] dispose stream-markdown stream-markdown.createShikiStreamRenderer available stale ready requires with ignoring and using default language register configured retrying without code-block-content rendererTargetRef code-block-render containerClass vmr-container window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 tooltip superscript-node unknown-node italic node strong-node paragraph-node paragraph child.type html_inline reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] event.key right text-right text-left pointermove pointerup pointercancel table-node-wrapper my-8 table-node table-node--loading aria-busy colgroup border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] table-node__resize-handle table-node__loading table-node__spinner subscript-node text-node text-node-center [mermaidWorkerClient] messageerror cleared worker inject via busy timed out canParse findPrefix in zoom loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content abort javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin node.type infographic d2lang langs text_special node.content heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close stream-monaco thinking htmlFor className data-ssr-fallback normalizedLanguage data-language no renderNodeProp classAttr node.cite value void rowIdx bodyRows.length isOpen thematic-break-node cssVars image-node__img code-block-node code-block markdown-code-block-node markdown-code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] $$ math-inline-wrapper math-inline data-reference-id customComponents html-inline server-renderer node-content [markstream-react] htmlPreviewSandbox contains both allow-scripts this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank document child key ref ms-html self_closing tag_open token.type tag_close parse dynamic template html-inline-node html-inline-node--loading role aria-describedby hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner mathRef math-inline--hidden math-inline__loading math-inline__spinner rendering math-rendering npm development process normalizedType [katexWorkerClient] init cache-hit timeout waiting slot sequencediagram classdiagram kind statediagram erdiagram flowchart graph globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected existingEnv.getWorkerUrl prototype constructor katex °C`;
|
|
2
|
+
module.exports = safeList;
|
|
3
|
+
module.exports.safeList = safeList;
|
|
4
|
+
module.exports.default = safeList;
|
package/dist/tailwind.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const safeList = `use client react stream-markdown-parser string cannot delete global call clearGlobalCustomComponents checkbox-node checkbox checkbox-input note is-dark data-index-key headerId admonition-header admonition-icon admonition-title admonition-toggle aria-expanded aria-controls collapsed admonition-content aria-labelledby blockquote-node auto code_block next.type typeof window.requestIdleCallback [data-node-index] node-spacer dark virtualized data-custom-id node-slot data-node-index data-node-type fade-node typewriter-node node-placeholder typewriterCursorRef typewriter-cursor admonition math_block html_block image object [data-node-type="code_block"] [data-node-type="admonition"] [data-node-type="table"] [data-node-type="math_block"] [data-node-type="html_block"] [data-node-type="image"] performance [markstream-react][perf] mermaid theme name markdown-renderer boolean safe smooth footnote-reference handleScroll footnote-link cursor-pointer mark highlight-node footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2 flex-1 emphasis-node dl definition-list indexKey mb-4 dt definition-term font-semibold ctx renderNode ?? definition dd definition-desc ml-4 dependency is not install it to enable hard-break emoji-node footnote-anchor hover:underline ↩︎ clsx heading-node html-block-node escape html-block html-block-node__placeholder html-block-node__placeholder-bar w-4/5 w-2/3 setHostEl shouldRender useDynamic reactNodes href xlink:href markstream-d2-root-svg number window.requestAnimationFrame instance.render instance missing render returned empty top d2-block my-4 rounded-lg border overflow-hidden shadow-sm border-gray-700/30 bg-gray-900 text-gray-100 border-gray-200 bg-white text-gray-900 d2-block-header justify-between items-center px-4 py-2.5 border-b border-gray-400/5 gap-x-2 font-medium font-mono gap-x-1 rounded-md p-0.5 bg-gray-700 bg-gray-100 mode-btn px-2 py-1 text-xs rounded !showSource is-active showSource d2-action-btn p-2 transition-colors hover:bg-[var(--vscode-editor-selectionBackground)] copying w-3 h-3 none currentColor round aria-pressed m9 bodyRef d2-block-body bodyStyle !hasPreview d2-source py-4 d2-code d2-error mt-2 d2-render d2-svg pb-3 style.visibility hidden line-info legacy off never background night moon black dracula mocha frappe macchiato palenight ocean poimandres monokai laserwave tokyo slack-dark rose-pine github-dark material-theme one-dark catppuccin-mocha catppuccin-frappe catppuccin-macchiato light latte dawn lotus plaintext diff important max-height visible height onDidUpdateDiff onDidContentSizeChange onDidLayoutChange window.MutationObserver childList record.type attributes class explicit fontSize lineHeight paddingBottom paddingTop tabSize on same helpers.cleanupEditor canonicalLanguage single window.cancelAnimationFrame clientX navigator.clipboard navigator.clipboard.writeText code-fallback-plain m-0 code-block-container is-rendering is-diff is-plain-text code-block-header space-x-2 icon-slot h-4 w-4 flex-shrink-0 truncate code-action-btn copied m14 evenodd code-block-body--collapsed code-block-body--expanded code-editor-layer code-height-placeholder aria-hidden code-editor-fallback-surface code-loading-placeholder loading-skeleton skeleton-line short sr-only polite status list-item pl-1.5 my-2 valueAttr children primary fallback failed is-loaded lazy eager async image-node__placeholder image-node__spinner image-node__placeholder-text image… placeholder image-node__error load ease-in-out infinite node.title link-loading inline-flex items-baseline gap-1.5 link-text-wrapper relative leading-[normal] link-text text link-loading-indicator link-node aria-label noopener noreferrer markstream-core inline-code inline text-[85%] px-1 py-0.5 bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full text-node-stream-delta text-node-stream-delta--a text-node-stream-delta--b insert-node list-node my-5 pl-[calc(13/8*1em)] list-decimal list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)] list react-dom library text-red-500 p-4">Failed instanceof error.message error keydown transform ease center fullscreen touches text-gray-400 hover:bg-gray-700 hover:text-gray-200 text-gray-600 hover:bg-gray-200 hover:text-gray-700 source hasPreview preview pending bg-gray-800 bg-gray-50 px-2.5 bg-gray-600 text-gray-200 text-gray-700 text-gray-500 m16 isCollapsed opacity-50 cursor-not-allowed m7 whitespace-pre-wrap text-gray-300 baseCode absolute top-2 right-2 z-10 gap-2 backdrop-blur infographic-preview min-h-[360px] transition-all duration-100 block inset-0 cursor-grab isDragging containerRef w-full text-center justify-center min-h-full markstream-react fixed z-50 bg-black/70 p-4 closeModal dialog h-full max-h-full shadow-lg top-6 right-6 !isDragging cursor-grabbing hr-node thematic-break strikethrough-node vitesse-dark vitesse-light shiki shiki-fallback [MarkdownCodeBlockNode] dispose stream-markdown stream-markdown.createShikiStreamRenderer available stale ready requires with ignoring and using default language register configured retrying without code-block-content rendererTargetRef code-block-render containerClass vmr-container window.matchMedia ms-tooltip z-[9999] inline-block text-base py-2 px-3 shadow-md whitespace-nowrap pointer-events-none tooltip-element text-white border-gray-700 tooltip superscript-node unknown-node italic node strong-node paragraph-node paragraph child.type html_inline reference-node bg-[hsl(var(--muted))] px-1.5 mx-0.5 hover:bg-[hsl(var(--secondary))] event.key right text-right text-left pointermove pointerup pointercancel table-node-wrapper my-8 table-node table-node--loading aria-busy colgroup border-[var(--table-border,#cbd5e1)] p-[calc(4/7*1em)] table-node__resize-handle table-node__loading table-node__spinner subscript-node text-node text-node-center [mermaidWorkerClient] messageerror cleared worker inject via busy timed out canParse findPrefix in zoom loose strict viewBox gantt open-modal [data-mermaid-wrapper] mermaid-action-btn toggle-mode common.zoomIn common.zoomOut common.resetZoom transition-[height] duration-150 ease-out data-mermaid-wrapper mermaid-loading mermaid-spinner diagram… mermaid-block-header space-x-1 common.preview common.source common.export mermaid-error hasRenderedOnce mermaid-block modeContainerRef mermaid-modal-overlay mermaid-modal-panel mermaid-modal-header mermaid-modal-title mermaid-modal-close mermaid-modal-body modalContentRef mermaid-modal-content abort javascript typescript go python ruby shell powershell d2 plain cpp csharp objectivec objectivecpp yaml markdown rust kotlin node.type infographic d2lang langs text_special node.content heading list_item definition_list footnote footnote_reference footnote_anchor hardbreak inline_code emphasis strikethrough highlight insert subscript superscript checkbox_input emoji thematic_break math_inline reference vmr_container label_open label_close stream-monaco thinking htmlFor className data-ssr-fallback normalizedLanguage data-language no renderNodeProp classAttr node.cite value void rowIdx bodyRows.length isOpen thematic-break-node cssVars image-node__img code-block-node code-block markdown-code-block-node markdown-code-block mermaid-block-node d2-block-node infographic-block-node math-block overflow-x-auto min-h-[40px] $$ math-inline-wrapper math-inline data-reference-id customComponents html-inline server-renderer node-content [markstream-react] htmlPreviewSandbox contains both allow-scripts this only fully trusted content served an isolated en utf-8 viewport content="width=device-width initial-scale=1 html-preview-frame__backdrop--dark html-preview-frame--dark html-preview-frame__header html-preview-frame__title html-preview-frame__dot html-preview-frame__label html-preview-frame__close--dark html-preview-frame__iframe no-referrer about:blank document child key ref ms-html self_closing tag_open token.type tag_close parse dynamic template html-inline-node html-inline-node--loading role aria-describedby hunk !options.preserveBlankKind context removed added markstream-pre__diff-pane--inline original markstream-pre__diff-pane--original modified markstream-pre__diff-pane--modified markstream-pre--line-numbers markstream-pre--diff-preview markstream-pre--diff-inline showLineNumbers markstream-pre__diff-code line.empty markstream-pre__diff-line--empty markstream-pre__diff-rail markstream-pre__diff-number markstream-pre__diff-content markstream-pre__diff-content-inner mathRef math-inline--hidden math-inline__loading math-inline__spinner rendering math-rendering npm development process normalizedType [katexWorkerClient] init cache-hit timeout waiting slot sequencediagram classdiagram kind statediagram erdiagram flowchart graph globalThis.requestAnimationFrame globalThis.cancelAnimationFrame module did expected existingEnv.getWorkerUrl prototype constructor katex °C`;
|
|
2
|
+
export default safeList;
|
|
@@ -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 declare function AdmonitionNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'admonition';
|
|
5
6
|
kind?: string;
|
|
@@ -7,5 +8,5 @@ export declare function AdmonitionNode(props: NodeComponentProps<{
|
|
|
7
8
|
children?: ParsedNode[];
|
|
8
9
|
collapsible?: boolean;
|
|
9
10
|
open?: boolean;
|
|
10
|
-
}>):
|
|
11
|
+
}>): React.JSX.Element;
|
|
11
12
|
export default AdmonitionNode;
|
|
@@ -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 BlockquoteNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'blockquote';
|
|
5
6
|
children?: ParsedNode[];
|
|
6
|
-
}>):
|
|
7
|
+
}>): React.JSX.Element;
|
|
7
8
|
export default BlockquoteNode;
|
|
@@ -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,11 +1,15 @@
|
|
|
1
|
-
import { HtmlPolicy } from 'stream-markdown-parser';
|
|
1
|
+
import { HtmlPolicy, 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 HtmlInlineNode(props: NodeComponentProps<{
|
|
4
5
|
type: 'html_inline';
|
|
5
6
|
content: string;
|
|
7
|
+
tag?: string;
|
|
8
|
+
attrs?: [string, string | null][] | null;
|
|
9
|
+
children?: ParsedNode[];
|
|
6
10
|
loading?: boolean;
|
|
7
11
|
autoClosed?: boolean;
|
|
8
12
|
}> & {
|
|
9
13
|
htmlPolicy?: HtmlPolicy;
|
|
10
|
-
}):
|
|
14
|
+
}): React.JSX.Element;
|
|
11
15
|
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;
|