markstream-angular 0.0.2-beta.1 → 0.0.2-beta.11
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/dist/index.css +1 -1
- package/dist/index.js +2623 -2184
- package/dist/types/index.d.ts +6 -73
- package/dist/types/{components → markstream-angular/src/components}/CodeBlockNode/CodeBlockNode.component.d.ts +57 -4
- package/dist/types/{components → markstream-angular/src/components}/CodeBlockNode/HtmlPreviewFrame.component.d.ts +3 -0
- package/dist/types/{components → markstream-angular/src/components}/D2BlockNode/D2BlockNode.component.d.ts +8 -0
- package/dist/types/{components → markstream-angular/src/components}/FootnoteReferenceNode/FootnoteReferenceNode.component.d.ts +1 -0
- package/dist/types/{components → markstream-angular/src/components}/InfographicBlockNode/InfographicBlockNode.component.d.ts +12 -0
- package/dist/types/{components → markstream-angular/src/components}/InlineCodeNode/InlineCodeNode.component.d.ts +2 -0
- package/dist/types/{components → markstream-angular/src/components}/MermaidBlockNode/MermaidBlockNode.component.d.ts +17 -0
- package/dist/types/{components → markstream-angular/src/components}/NestedRenderer/NestedRenderer.component.d.ts +1 -1
- package/dist/types/{components → markstream-angular/src/components}/NodeOutlet/NodeOutlet.component.d.ts +5 -3
- package/dist/types/{components → markstream-angular/src/components}/NodeRenderer/NodeRenderer.component.d.ts +48 -9
- package/dist/types/markstream-angular/src/components/TableNode/TableNode.component.d.ts +29 -0
- package/dist/types/{components → markstream-angular/src/components}/TextNode/TextNode.component.d.ts +2 -0
- package/dist/types/markstream-angular/src/components/TextNode/streamingTextState.d.ts +2 -0
- package/dist/types/markstream-angular/src/components/shared/diagram-height.d.ts +9 -0
- package/dist/types/{components → markstream-angular/src/components}/shared/node-helpers.d.ts +84 -13
- package/dist/types/{components → markstream-angular/src/components}/shared/node-outlet-helpers.d.ts +4 -1
- package/dist/types/markstream-angular/src/components/shared/smooth-streaming-scope.d.ts +5 -0
- package/dist/types/{customComponents.d.ts → markstream-angular/src/customComponents.d.ts} +1 -1
- package/dist/types/{enhanceRenderedHtml.d.ts → markstream-angular/src/enhanceRenderedHtml.d.ts} +7 -5
- package/dist/types/{hydrateCustomTagContent.d.ts → markstream-angular/src/hydrateCustomTagContent.d.ts} +1 -1
- package/dist/types/markstream-angular/src/index.d.ts +77 -0
- package/dist/types/markstream-angular/src/optional/d2.d.ts +17 -0
- package/dist/types/markstream-angular/src/optional/infographic.d.ts +13 -0
- package/dist/types/markstream-angular/src/optional/katex.d.ts +9 -0
- package/dist/types/markstream-angular/src/optional/mermaid.d.ts +27 -0
- package/dist/types/markstream-angular/src/optional/monaco.d.ts +18 -0
- package/dist/types/{parseNestedMarkdownToNodes.d.ts → markstream-angular/src/parseNestedMarkdownToNodes.d.ts} +7 -2
- package/dist/types/{renderMarkdownHtml.d.ts → markstream-angular/src/renderMarkdownHtml.d.ts} +3 -1
- package/dist/types/markstream-angular/src/sanitizeHtmlContent.d.ts +2 -0
- package/dist/types/markstream-angular/src/services/smooth-markdown-stream.service.d.ts +33 -0
- package/dist/types/{types → markstream-angular/src/types}/monaco.d.ts +3 -3
- package/dist/workers/mermaidParser.worker.js +8 -8
- package/package.json +7 -5
- package/dist/types/components/TableNode/TableNode.component.d.ts +0 -14
- package/dist/types/components/TextNode/streamingTextState.d.ts +0 -11
- package/dist/types/optional/d2.d.ts +0 -6
- package/dist/types/optional/infographic.d.ts +0 -1
- package/dist/types/optional/katex.d.ts +0 -6
- package/dist/types/optional/mermaid.d.ts +0 -6
- package/dist/types/optional/monaco.d.ts +0 -1
- package/dist/types/sanitizeHtmlContent.d.ts +0 -1
- /package/dist/types/{components → markstream-angular/src/components}/AdmonitionNode/AdmonitionNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/BlockquoteNode/BlockquoteNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/CheckboxNode/CheckboxNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/DefinitionListNode/DefinitionListNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/DynamicNodeHost/DynamicNodeHost.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/EmojiNode/EmojiNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/EmphasisNode/EmphasisNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/FallbackComponent/FallbackComponent.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/FootnoteAnchorNode/FootnoteAnchorNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/FootnoteNode/FootnoteNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/HardBreakNode/HardBreakNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/HeadingNode/HeadingNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/HighlightNode/HighlightNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/HtmlBlockNode/HtmlBlockNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/HtmlInlineNode/HtmlInlineNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ImageNode/ImageNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/InsertNode/InsertNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/LinkNode/LinkNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ListItemNode/ListItemNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ListNode/ListNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/MathBlockNode/MathBlockNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/MathInlineNode/MathInlineNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ParagraphNode/ParagraphNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/PreCodeNode/PreCodeNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ReferenceNode/ReferenceNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/StrikethroughNode/StrikethroughNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/StrongNode/StrongNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/SubscriptNode/SubscriptNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/SuperscriptNode/SuperscriptNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/ThematicBreakNode/ThematicBreakNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/VmrContainerNode/VmrContainerNode.component.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/shared/render-window.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/shared/rich-block-helpers.d.ts +0 -0
- /package/dist/types/{components → markstream-angular/src/components}/shared/safe-attrs.directive.d.ts +0 -0
- /package/dist/types/{i18n → markstream-angular/src/i18n}/useSafeI18n.d.ts +0 -0
- /package/dist/types/{markstream-angular.component.d.ts → markstream-angular/src/markstream-angular.component.d.ts} +0 -0
- /package/dist/types/{sanitizeSvg.d.ts → markstream-angular/src/sanitizeSvg.d.ts} +0 -0
- /package/dist/types/{tooltip → markstream-angular/src/tooltip}/singletonTooltip.d.ts +0 -0
- /package/dist/types/{utils → markstream-angular/src/utils}/languageIcon.d.ts +0 -0
- /package/dist/types/{utils → markstream-angular/src/utils}/normalizeKaTeXRenderInput.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/katexCdnWorker.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/katexRenderer.worker.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/katexWorkerClient.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/mermaidCdnWorker.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/mermaidParser.worker.d.ts +0 -0
- /package/dist/types/{workers → markstream-angular/src/workers}/mermaidWorkerClient.d.ts +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -1,73 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export {
|
|
7
|
-
export { HtmlPreviewFrameComponent as HtmlPreviewFrame } from './components/CodeBlockNode/HtmlPreviewFrame.component';
|
|
8
|
-
export { D2BlockNodeComponent as D2BlockNode } from './components/D2BlockNode/D2BlockNode.component';
|
|
9
|
-
export { DefinitionListNodeComponent as DefinitionListNode } from './components/DefinitionListNode/DefinitionListNode.component';
|
|
10
|
-
export { EmojiNodeComponent as EmojiNode } from './components/EmojiNode/EmojiNode.component';
|
|
11
|
-
export { EmphasisNodeComponent as EmphasisNode } from './components/EmphasisNode/EmphasisNode.component';
|
|
12
|
-
export { FallbackComponent } from './components/FallbackComponent/FallbackComponent.component';
|
|
13
|
-
export { FootnoteAnchorNodeComponent as FootnoteAnchorNode } from './components/FootnoteAnchorNode/FootnoteAnchorNode.component';
|
|
14
|
-
export { FootnoteNodeComponent as FootnoteNode } from './components/FootnoteNode/FootnoteNode.component';
|
|
15
|
-
export { FootnoteReferenceNodeComponent as FootnoteReferenceNode } from './components/FootnoteReferenceNode/FootnoteReferenceNode.component';
|
|
16
|
-
export { HardBreakNodeComponent as HardBreakNode } from './components/HardBreakNode/HardBreakNode.component';
|
|
17
|
-
export { HeadingNodeComponent as HeadingNode } from './components/HeadingNode/HeadingNode.component';
|
|
18
|
-
export { HighlightNodeComponent as HighlightNode } from './components/HighlightNode/HighlightNode.component';
|
|
19
|
-
export { HtmlBlockNodeComponent as HtmlBlockNode } from './components/HtmlBlockNode/HtmlBlockNode.component';
|
|
20
|
-
export { HtmlInlineNodeComponent as HtmlInlineNode } from './components/HtmlInlineNode/HtmlInlineNode.component';
|
|
21
|
-
export { ImageNodeComponent as ImageNode } from './components/ImageNode/ImageNode.component';
|
|
22
|
-
export { InfographicBlockNodeComponent as InfographicBlockNode } from './components/InfographicBlockNode/InfographicBlockNode.component';
|
|
23
|
-
export { InlineCodeNodeComponent as InlineCodeNode } from './components/InlineCodeNode/InlineCodeNode.component';
|
|
24
|
-
export { InsertNodeComponent as InsertNode } from './components/InsertNode/InsertNode.component';
|
|
25
|
-
export { LinkNodeComponent as LinkNode } from './components/LinkNode/LinkNode.component';
|
|
26
|
-
export { ListItemNodeComponent as ListItemNode } from './components/ListItemNode/ListItemNode.component';
|
|
27
|
-
export { ListNodeComponent as ListNode } from './components/ListNode/ListNode.component';
|
|
28
|
-
export { MathBlockNodeComponent as MathBlockNode } from './components/MathBlockNode/MathBlockNode.component';
|
|
29
|
-
export { MathInlineNodeComponent as MathInlineNode } from './components/MathInlineNode/MathInlineNode.component';
|
|
30
|
-
export { MermaidBlockNodeComponent as MermaidBlockNode } from './components/MermaidBlockNode/MermaidBlockNode.component';
|
|
31
|
-
export { NestedRendererComponent as NestedRenderer } from './components/NestedRenderer/NestedRenderer.component';
|
|
32
|
-
export { NodeRendererComponent as NodeRenderer } from './components/NodeRenderer/NodeRenderer.component';
|
|
33
|
-
export { ParagraphNodeComponent as ParagraphNode } from './components/ParagraphNode/ParagraphNode.component';
|
|
34
|
-
export { PreCodeNodeComponent as PreCodeNode } from './components/PreCodeNode/PreCodeNode.component';
|
|
35
|
-
export { ReferenceNodeComponent as ReferenceNode } from './components/ReferenceNode/ReferenceNode.component';
|
|
36
|
-
export type { AngularRenderableNode, AngularRenderContext, NodeRendererEvents, NodeRendererProps, } from './components/shared/node-helpers';
|
|
37
|
-
export { buildRenderContext, resolveParsedNodes, } from './components/shared/node-helpers';
|
|
38
|
-
export { SafeAttrsDirective } from './components/shared/safe-attrs.directive';
|
|
39
|
-
export { StrikethroughNodeComponent as StrikethroughNode } from './components/StrikethroughNode/StrikethroughNode.component';
|
|
40
|
-
export { StrongNodeComponent as StrongNode } from './components/StrongNode/StrongNode.component';
|
|
41
|
-
export { SubscriptNodeComponent as SubscriptNode } from './components/SubscriptNode/SubscriptNode.component';
|
|
42
|
-
export { SuperscriptNodeComponent as SuperscriptNode } from './components/SuperscriptNode/SuperscriptNode.component';
|
|
43
|
-
export { TableNodeComponent as TableNode } from './components/TableNode/TableNode.component';
|
|
44
|
-
export { TextNodeComponent as TextNode } from './components/TextNode/TextNode.component';
|
|
45
|
-
export { ThematicBreakNodeComponent as ThematicBreakNode } from './components/ThematicBreakNode/ThematicBreakNode.component';
|
|
46
|
-
export { VmrContainerNodeComponent as VmrContainerNode } from './components/VmrContainerNode/VmrContainerNode.component';
|
|
47
|
-
export { clearGlobalCustomComponents, getCustomComponentsRevision, getCustomNodeComponents, removeCustomComponents, setCustomComponents, subscribeCustomComponents, } from './customComponents';
|
|
48
|
-
export type { CustomComponentMap } from './customComponents';
|
|
49
|
-
export { disposeRenderedHtmlEnhancements, enhanceRenderedHtml, } from './enhanceRenderedHtml';
|
|
50
|
-
export type { EnhanceRenderedHtmlOptions, RenderedHtmlEnhancementHandle } from './enhanceRenderedHtml';
|
|
51
|
-
export { setDefaultI18nMap, useSafeI18n } from './i18n/useSafeI18n';
|
|
52
|
-
export { MarkstreamAngularComponent } from './markstream-angular.component';
|
|
53
|
-
export { MarkstreamAngularComponent as MarkdownRenderComponent } from './markstream-angular.component';
|
|
54
|
-
export { MarkstreamAngularComponent as default } from './markstream-angular.component';
|
|
55
|
-
export type { MarkstreamAngularComponentProps } from './markstream-angular.component';
|
|
56
|
-
export type { D2Loader } from './optional/d2';
|
|
57
|
-
export { disableD2, enableD2, isD2Enabled, setD2Loader, } from './optional/d2';
|
|
58
|
-
export type { KatexLoader } from './optional/katex';
|
|
59
|
-
export { disableKatex, enableKatex, getKatex, isKatexEnabled, setKatexLoader, } from './optional/katex';
|
|
60
|
-
export type { MermaidLoader } from './optional/mermaid';
|
|
61
|
-
export { disableMermaid, enableMermaid, getMermaid, isMermaidEnabled, setMermaidLoader, } from './optional/mermaid';
|
|
62
|
-
export { parseNestedMarkdownToNodes, } from './parseNestedMarkdownToNodes';
|
|
63
|
-
export type { NestedMarkdownNodesInput, NestedMarkdownNodesOptions, } from './parseNestedMarkdownToNodes';
|
|
64
|
-
export { renderMarkdownNodesToHtml, renderMarkdownNodeToHtml, renderMarkdownToHtml, renderNestedMarkdownToHtml, } from './renderMarkdownHtml';
|
|
65
|
-
export type { MarkstreamAngularRenderOptions, NestedMarkdownHtmlInput, NestedMarkdownHtmlOptions, RenderableMarkdownNode, } from './renderMarkdownHtml';
|
|
66
|
-
export { sanitizeHtmlContent } from './sanitizeHtmlContent';
|
|
67
|
-
export type { CodeBlockDiffAppearance, CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockDiffHunkActionContext, CodeBlockDiffHunkActionKind, CodeBlockDiffHunkSide, CodeBlockDiffLineStyle, CodeBlockDiffUnchangedRegionStyle, CodeBlockMonacoLanguage, CodeBlockMonacoOptions, CodeBlockMonacoTheme, CodeBlockMonacoThemeObject, } from './types/monaco';
|
|
68
|
-
export { getLanguageIcon, languageMap, normalizeLanguageIdentifier, resolveMonacoLanguageId, setLanguageIconResolver, } from './utils/languageIcon';
|
|
69
|
-
export type { LanguageIconResolver } from './utils/languageIcon';
|
|
70
|
-
export * from './workers/katexCdnWorker';
|
|
71
|
-
export * from './workers/katexWorkerClient';
|
|
72
|
-
export * from './workers/mermaidCdnWorker';
|
|
73
|
-
export * from './workers/mermaidWorkerClient';
|
|
1
|
+
export * from './markstream-angular/src/index'
|
|
2
|
+
export {}
|
|
3
|
+
import MarkstreamAngular from './markstream-angular/src/index'
|
|
4
|
+
export default MarkstreamAngular
|
|
5
|
+
export * from './markstream-angular/src/index'
|
|
6
|
+
export {}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AfterViewInit, OnChanges, OnDestroy } from '@angular/core';
|
|
2
|
+
import { CodeBlockMonacoTheme } from '../../types/monaco';
|
|
2
3
|
import { AngularRenderableNode, AngularRenderContext } from '../shared/node-helpers';
|
|
3
4
|
export declare class CodeBlockNodeComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
4
5
|
private readonly cdr;
|
|
@@ -26,14 +27,66 @@ export declare class CodeBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
26
27
|
get t(): (key: string) => string;
|
|
27
28
|
get mergedProps(): {
|
|
28
29
|
[x: string]: any;
|
|
30
|
+
stream?: boolean;
|
|
31
|
+
darkTheme?: CodeBlockMonacoTheme;
|
|
32
|
+
lightTheme?: CodeBlockMonacoTheme;
|
|
33
|
+
themes?: CodeBlockMonacoTheme[];
|
|
34
|
+
monacoOptions?: import('../..').CodeBlockMonacoOptions;
|
|
35
|
+
minWidth?: string | number;
|
|
36
|
+
maxWidth?: string | number;
|
|
37
|
+
isShowPreview?: boolean;
|
|
38
|
+
enableFontSizeControl?: boolean;
|
|
39
|
+
showHeader?: boolean;
|
|
40
|
+
showCopyButton?: boolean;
|
|
41
|
+
showExpandButton?: boolean;
|
|
42
|
+
showPreviewButton?: boolean;
|
|
43
|
+
showCollapseButton?: boolean;
|
|
44
|
+
showFontSizeButtons?: boolean;
|
|
45
|
+
htmlPreviewAllowScripts?: boolean;
|
|
46
|
+
htmlPreviewSandbox?: string;
|
|
29
47
|
};
|
|
30
48
|
get resolvedLoading(): boolean;
|
|
31
49
|
get resolvedStream(): boolean;
|
|
32
50
|
get resolvedIsDark(): boolean;
|
|
33
|
-
get resolvedDarkTheme():
|
|
34
|
-
get resolvedLightTheme():
|
|
35
|
-
get resolvedThemes():
|
|
36
|
-
get resolvedMonacoOptions():
|
|
51
|
+
get resolvedDarkTheme(): CodeBlockMonacoTheme;
|
|
52
|
+
get resolvedLightTheme(): CodeBlockMonacoTheme;
|
|
53
|
+
get resolvedThemes(): CodeBlockMonacoTheme[];
|
|
54
|
+
get resolvedMonacoOptions(): {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
MAX_HEIGHT?: number | string;
|
|
57
|
+
fontSize?: number;
|
|
58
|
+
lineHeight?: number;
|
|
59
|
+
fontFamily?: string;
|
|
60
|
+
tabSize?: number;
|
|
61
|
+
readOnly?: boolean;
|
|
62
|
+
wordWrap?: "off" | "on" | "wordWrapColumn" | "bounded" | string;
|
|
63
|
+
wrappingIndent?: "none" | "same" | "indent" | "deepIndent" | string;
|
|
64
|
+
theme?: string;
|
|
65
|
+
themes?: CodeBlockMonacoTheme[];
|
|
66
|
+
languages?: import('../..').CodeBlockMonacoLanguage[];
|
|
67
|
+
renderSideBySide?: boolean;
|
|
68
|
+
useInlineViewWhenSpaceIsLimited?: boolean;
|
|
69
|
+
enableSplitViewResizing?: boolean;
|
|
70
|
+
ignoreTrimWhitespace?: boolean;
|
|
71
|
+
maxComputationTime?: number;
|
|
72
|
+
diffAlgorithm?: string;
|
|
73
|
+
renderIndicators?: boolean;
|
|
74
|
+
originalEditable?: boolean;
|
|
75
|
+
revealDebounceMs?: number;
|
|
76
|
+
revealStrategy?: "bottom" | "centerIfOutside" | "center";
|
|
77
|
+
revealBatchOnIdleMs?: number;
|
|
78
|
+
updateThrottleMs?: number;
|
|
79
|
+
diffUpdateThrottleMs?: number;
|
|
80
|
+
diffAutoScroll?: boolean;
|
|
81
|
+
diffHideUnchangedRegions?: import('../..').CodeBlockDiffHideUnchangedRegions;
|
|
82
|
+
diffLineStyle?: import('../..').CodeBlockDiffLineStyle;
|
|
83
|
+
diffAppearance?: import('../..').CodeBlockDiffAppearance;
|
|
84
|
+
diffUnchangedRegionStyle?: import('../..').CodeBlockDiffUnchangedRegionStyle;
|
|
85
|
+
diffHunkActionsOnHover?: boolean;
|
|
86
|
+
diffHunkHoverHideDelayMs?: number;
|
|
87
|
+
onDiffHunkAction?: (context: import('../..').CodeBlockDiffHunkActionContext) => void | boolean | Promise<void | boolean>;
|
|
88
|
+
scrollbar?: Record<string, unknown>;
|
|
89
|
+
};
|
|
37
90
|
get resolvedEnableFontSizeControl(): boolean;
|
|
38
91
|
get resolvedShowHeader(): boolean;
|
|
39
92
|
get resolvedShowCopyButton(): boolean;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
export declare class HtmlPreviewFrameComponent {
|
|
2
2
|
code: string;
|
|
3
3
|
isDark: boolean;
|
|
4
|
+
htmlPreviewAllowScripts: boolean;
|
|
5
|
+
htmlPreviewSandbox?: string;
|
|
4
6
|
title?: string;
|
|
5
7
|
onClose?: () => void;
|
|
6
8
|
private readonly i18n;
|
|
7
9
|
get resolvedTitle(): string;
|
|
10
|
+
get sandboxValue(): string;
|
|
8
11
|
get srcdoc(): string;
|
|
9
12
|
}
|
|
@@ -18,6 +18,14 @@ export declare class D2BlockNodeComponent implements AfterViewInit, OnChanges, O
|
|
|
18
18
|
private copyTimer;
|
|
19
19
|
get mergedProps(): {
|
|
20
20
|
[x: string]: any;
|
|
21
|
+
maxHeight?: string | null;
|
|
22
|
+
themeId?: number | null;
|
|
23
|
+
darkThemeId?: number | null;
|
|
24
|
+
showHeader?: boolean;
|
|
25
|
+
showModeToggle?: boolean;
|
|
26
|
+
showCopyButton?: boolean;
|
|
27
|
+
showExportButton?: boolean;
|
|
28
|
+
showCollapseButton?: boolean;
|
|
21
29
|
};
|
|
22
30
|
get code(): string;
|
|
23
31
|
get resolvedIsDark(): boolean;
|
|
@@ -23,6 +23,15 @@ export declare class InfographicBlockNodeComponent implements AfterViewInit, OnC
|
|
|
23
23
|
private infographicInstance;
|
|
24
24
|
get mergedProps(): {
|
|
25
25
|
[x: string]: any;
|
|
26
|
+
maxHeight?: string | null;
|
|
27
|
+
estimatedPreviewHeightPx?: number;
|
|
28
|
+
showHeader?: boolean;
|
|
29
|
+
showModeToggle?: boolean;
|
|
30
|
+
showCopyButton?: boolean;
|
|
31
|
+
showCollapseButton?: boolean;
|
|
32
|
+
showExportButton?: boolean;
|
|
33
|
+
showFullscreenButton?: boolean;
|
|
34
|
+
showZoomControls?: boolean;
|
|
26
35
|
};
|
|
27
36
|
get code(): string;
|
|
28
37
|
get resolvedIsDark(): boolean;
|
|
@@ -35,6 +44,9 @@ export declare class InfographicBlockNodeComponent implements AfterViewInit, OnC
|
|
|
35
44
|
get resolvedShowZoomControls(): boolean;
|
|
36
45
|
get resolvedShowTooltips(): boolean;
|
|
37
46
|
get resolvedMaxHeight(): string;
|
|
47
|
+
get estimatedPreviewHeightPx(): number;
|
|
48
|
+
get resolvedContainerMinHeight(): string;
|
|
49
|
+
private get maxPreviewHeight();
|
|
38
50
|
private resolveContainerMinHeight;
|
|
39
51
|
get resolvedLoading(): boolean;
|
|
40
52
|
get resolvedProgressiveRender(): boolean;
|
|
@@ -5,11 +5,13 @@ export declare class InlineCodeNodeComponent implements OnChanges {
|
|
|
5
5
|
context?: AngularRenderContext;
|
|
6
6
|
indexKey?: string;
|
|
7
7
|
typewriter?: boolean;
|
|
8
|
+
fade?: boolean;
|
|
8
9
|
settledCode: string;
|
|
9
10
|
streamedDelta: string;
|
|
10
11
|
private streamFadeVersion;
|
|
11
12
|
ngOnChanges(): void;
|
|
12
13
|
get streamedDeltaClass(): "markstream-angular-text__stream-delta--a" | "markstream-angular-text__stream-delta--b";
|
|
14
|
+
get fadeEnabled(): boolean;
|
|
13
15
|
get typewriterEnabled(): boolean;
|
|
14
16
|
settleStreamedDelta(): void;
|
|
15
17
|
}
|
|
@@ -21,6 +21,21 @@ export declare class MermaidBlockNodeComponent implements AfterViewInit, OnChang
|
|
|
21
21
|
private copyTimer;
|
|
22
22
|
get mergedProps(): {
|
|
23
23
|
[x: string]: any;
|
|
24
|
+
maxHeight?: string | null;
|
|
25
|
+
estimatedPreviewHeightPx?: number;
|
|
26
|
+
workerTimeoutMs?: number;
|
|
27
|
+
parseTimeoutMs?: number;
|
|
28
|
+
renderTimeoutMs?: number;
|
|
29
|
+
fullRenderTimeoutMs?: number;
|
|
30
|
+
renderDebounceMs?: number;
|
|
31
|
+
showHeader?: boolean;
|
|
32
|
+
showModeToggle?: boolean;
|
|
33
|
+
showCopyButton?: boolean;
|
|
34
|
+
showExportButton?: boolean;
|
|
35
|
+
showFullscreenButton?: boolean;
|
|
36
|
+
showCollapseButton?: boolean;
|
|
37
|
+
showZoomControls?: boolean;
|
|
38
|
+
isStrict?: boolean;
|
|
24
39
|
};
|
|
25
40
|
get code(): string;
|
|
26
41
|
get resolvedIsDark(): boolean;
|
|
@@ -33,6 +48,8 @@ export declare class MermaidBlockNodeComponent implements AfterViewInit, OnChang
|
|
|
33
48
|
get resolvedShowZoomControls(): boolean;
|
|
34
49
|
get resolvedShowTooltips(): boolean;
|
|
35
50
|
get resolvedMaxHeight(): string;
|
|
51
|
+
get estimatedPreviewHeightPx(): number;
|
|
52
|
+
private get maxPreviewHeight();
|
|
36
53
|
get resolvedWorkerTimeout(): number;
|
|
37
54
|
get resolvedParseTimeout(): number;
|
|
38
55
|
get resolvedRenderTimeout(): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnChanges } from '@angular/core';
|
|
2
|
-
import { MarkdownIt, ParseOptions } from '
|
|
2
|
+
import { MarkdownIt, ParseOptions } from '../../../../markdown-parser/src/index.ts';
|
|
3
3
|
import { AngularRenderableNode, AngularRenderContext } from '../shared/node-helpers';
|
|
4
4
|
type NestedRenderItem = {
|
|
5
5
|
kind: 'label';
|
|
@@ -4,8 +4,8 @@ export declare class NodeOutletComponent {
|
|
|
4
4
|
context?: AngularRenderContext;
|
|
5
5
|
indexKey?: string;
|
|
6
6
|
get resolvedType(): string;
|
|
7
|
-
get customComponentMap():
|
|
8
|
-
get resolvedCustomComponent():
|
|
7
|
+
get customComponentMap(): import('../..').CustomComponentMap;
|
|
8
|
+
get resolvedCustomComponent(): any;
|
|
9
9
|
get customNode(): AngularRenderableNode;
|
|
10
10
|
get codeMode(): import('../shared/node-outlet-helpers').CodeBlockMode;
|
|
11
11
|
get htmlTag(): string;
|
|
@@ -25,5 +25,7 @@ export declare class NodeOutletComponent {
|
|
|
25
25
|
get escapedTextNode(): AngularRenderableNode;
|
|
26
26
|
get htmlRenderNode(): AngularRenderableNode;
|
|
27
27
|
get fallbackNode(): AngularRenderableNode;
|
|
28
|
-
get resolvedComponentInputs():
|
|
28
|
+
get resolvedComponentInputs(): {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
};
|
|
29
31
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AfterViewInit, OnChanges, OnDestroy, OnInit, SimpleChanges, EventEmitter } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { SmoothMarkdownStreamOptions } from '../../../../markstream-core/src/index.ts';
|
|
3
|
+
import { AngularRenderableNode, AngularRenderContext, CodeBlockPreviewPayload, NodeRendererProps } from '../shared/node-helpers';
|
|
3
4
|
interface VisibleNodeEntry {
|
|
4
5
|
node: AngularRenderableNode;
|
|
5
6
|
index: number;
|
|
@@ -10,7 +11,10 @@ interface VisibleNodeEntry {
|
|
|
10
11
|
export declare class NodeRendererComponent implements NodeRendererProps, OnChanges, OnInit, AfterViewInit, OnDestroy {
|
|
11
12
|
private readonly cdr;
|
|
12
13
|
private readonly hostRef;
|
|
14
|
+
private readonly smoothStream;
|
|
15
|
+
private readonly parentSmoothStreamingScope;
|
|
13
16
|
private rootRef?;
|
|
17
|
+
private typewriterCursorRef?;
|
|
14
18
|
content: string;
|
|
15
19
|
nodes?: readonly AngularRenderableNode[] | null;
|
|
16
20
|
final?: boolean;
|
|
@@ -18,25 +22,29 @@ export declare class NodeRendererComponent implements NodeRendererProps, OnChang
|
|
|
18
22
|
customMarkdownIt?: NodeRendererProps['customMarkdownIt'];
|
|
19
23
|
debugPerformance?: boolean;
|
|
20
24
|
customHtmlTags?: readonly string[];
|
|
25
|
+
htmlPolicy: NodeRendererProps['htmlPolicy'];
|
|
21
26
|
viewportPriority?: boolean;
|
|
22
27
|
codeBlockStream: boolean;
|
|
23
|
-
codeBlockDarkTheme?:
|
|
24
|
-
codeBlockLightTheme?:
|
|
25
|
-
codeBlockMonacoOptions?:
|
|
28
|
+
codeBlockDarkTheme?: NodeRendererProps['codeBlockDarkTheme'];
|
|
29
|
+
codeBlockLightTheme?: NodeRendererProps['codeBlockLightTheme'];
|
|
30
|
+
codeBlockMonacoOptions?: NodeRendererProps['codeBlockMonacoOptions'];
|
|
26
31
|
renderCodeBlocksAsPre: boolean;
|
|
27
32
|
codeBlockMinWidth?: string | number;
|
|
28
33
|
codeBlockMaxWidth?: string | number;
|
|
29
|
-
codeBlockProps?:
|
|
30
|
-
mermaidProps?:
|
|
31
|
-
d2Props?:
|
|
32
|
-
infographicProps?:
|
|
34
|
+
codeBlockProps?: NodeRendererProps['codeBlockProps'];
|
|
35
|
+
mermaidProps?: NodeRendererProps['mermaidProps'];
|
|
36
|
+
d2Props?: NodeRendererProps['d2Props'];
|
|
37
|
+
infographicProps?: NodeRendererProps['infographicProps'];
|
|
33
38
|
customComponents?: NodeRendererProps['customComponents'];
|
|
34
39
|
showTooltips: boolean;
|
|
35
40
|
themes?: string[];
|
|
36
41
|
isDark: boolean;
|
|
37
42
|
customId?: string;
|
|
38
43
|
indexKey?: number | string;
|
|
44
|
+
/** Show a blinking typewriter cursor while streamed content grows. Default: false */
|
|
39
45
|
typewriter: boolean;
|
|
46
|
+
/** Enable/disable non-code-node enter and streamed-text fade animations. Default: true */
|
|
47
|
+
fade: boolean;
|
|
40
48
|
batchRendering: boolean;
|
|
41
49
|
initialRenderBatchSize: number;
|
|
42
50
|
renderBatchSize: number;
|
|
@@ -47,8 +55,10 @@ export declare class NodeRendererComponent implements NodeRendererProps, OnChang
|
|
|
47
55
|
maxLiveNodes: number;
|
|
48
56
|
liveNodeBuffer: number;
|
|
49
57
|
allowHtml: boolean;
|
|
58
|
+
smoothStreaming: boolean | 'auto';
|
|
59
|
+
smoothStreamingOptions?: SmoothMarkdownStreamOptions;
|
|
50
60
|
copy: EventEmitter<string>;
|
|
51
|
-
handleArtifactClick: EventEmitter<
|
|
61
|
+
handleArtifactClick: EventEmitter<CodeBlockPreviewPayload>;
|
|
52
62
|
click: EventEmitter<MouseEvent>;
|
|
53
63
|
mouseover: EventEmitter<MouseEvent>;
|
|
54
64
|
mouseout: EventEmitter<MouseEvent>;
|
|
@@ -79,7 +89,26 @@ export declare class NodeRendererComponent implements NodeRendererProps, OnChang
|
|
|
79
89
|
private enhancementHandle;
|
|
80
90
|
private postRenderTimer;
|
|
81
91
|
private unsubscribeCustomComponents?;
|
|
92
|
+
private isSyncingSmoothStream;
|
|
93
|
+
private hasMountedForSmoothStreaming;
|
|
94
|
+
private unsubscribeSmoothStream?;
|
|
95
|
+
private previousRenderContent;
|
|
96
|
+
private previousEffectiveFinal;
|
|
97
|
+
private previousRenderVersionSource;
|
|
98
|
+
showTypewriterCursor: boolean;
|
|
99
|
+
private typewriterCursorTimeout;
|
|
100
|
+
private lastTypewriterContentLength;
|
|
101
|
+
private static readonly TYPEWRITER_CURSOR_EXCLUDED_NODE_TYPES;
|
|
102
|
+
get hasNodes(): boolean;
|
|
103
|
+
get smoothStreamingEligible(): boolean;
|
|
104
|
+
get smoothStreamingEnabled(): boolean;
|
|
105
|
+
get renderContent(): string;
|
|
106
|
+
get rawContent(): string;
|
|
107
|
+
get smoothSourceSynced(): boolean;
|
|
108
|
+
get requestedFinal(): boolean | undefined;
|
|
109
|
+
get effectiveFinal(): boolean | undefined;
|
|
82
110
|
get resolvedIndexPrefix(): string;
|
|
111
|
+
isSmoothStreamingEnabled(): boolean;
|
|
83
112
|
get resolvedInitialBatchSize(): number;
|
|
84
113
|
get resolvedRenderBatchSize(): number;
|
|
85
114
|
get resolvedMaxLiveNodes(): number;
|
|
@@ -98,6 +127,8 @@ export declare class NodeRendererComponent implements NodeRendererProps, OnChang
|
|
|
98
127
|
entryIndexKey(index: number): string;
|
|
99
128
|
handleMouseOver(event: MouseEvent): void;
|
|
100
129
|
handleMouseOut(event: MouseEvent): void;
|
|
130
|
+
private ensureSmoothStreamInitialized;
|
|
131
|
+
private syncSmoothStream;
|
|
101
132
|
private rebuild;
|
|
102
133
|
private cleanupTransientState;
|
|
103
134
|
private trimMeasuredState;
|
|
@@ -118,5 +149,13 @@ export declare class NodeRendererComponent implements NodeRendererProps, OnChang
|
|
|
118
149
|
private scheduleEnhancements;
|
|
119
150
|
private applyEnhancements;
|
|
120
151
|
private disposeEnhancements;
|
|
152
|
+
private shouldSkipTypewriterCursorForNode;
|
|
153
|
+
private shouldShowTypewriterCursorForCurrentNodes;
|
|
154
|
+
private getNodeTextLength;
|
|
155
|
+
private getTypewriterContentLength;
|
|
156
|
+
private clearTypewriterCursorTimeout;
|
|
157
|
+
private getLastTextNode;
|
|
158
|
+
private updateTypewriterCursorPosition;
|
|
159
|
+
private updateTypewriterCursorState;
|
|
121
160
|
}
|
|
122
161
|
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { AngularRenderableNode, AngularRenderContext } from '../shared/node-helpers';
|
|
3
|
+
export declare class TableNodeComponent implements OnDestroy {
|
|
4
|
+
tableElement?: ElementRef<HTMLTableElement>;
|
|
5
|
+
private readonly cdr;
|
|
6
|
+
private currentHeaderCellCount;
|
|
7
|
+
private readonly minColumnWidth;
|
|
8
|
+
private resizeState;
|
|
9
|
+
columnWidths: number[];
|
|
10
|
+
private _node;
|
|
11
|
+
set node(value: AngularRenderableNode);
|
|
12
|
+
get node(): AngularRenderableNode;
|
|
13
|
+
context?: AngularRenderContext;
|
|
14
|
+
indexKey?: string;
|
|
15
|
+
get headerRow(): AngularRenderableNode;
|
|
16
|
+
get headerCells(): AngularRenderableNode[];
|
|
17
|
+
get rows(): AngularRenderableNode[];
|
|
18
|
+
cellsFor(row: AngularRenderableNode): AngularRenderableNode[];
|
|
19
|
+
childrenFor(cell: AngularRenderableNode): AngularRenderableNode[];
|
|
20
|
+
alignment(cell: AngularRenderableNode): string;
|
|
21
|
+
trackRow: (index: number) => string;
|
|
22
|
+
trackCell: (index: number) => number;
|
|
23
|
+
cellPrefix(rowIndex: string | number, cellIndex: number): string;
|
|
24
|
+
startColumnResize(index: number, event: PointerEvent): void;
|
|
25
|
+
ngOnDestroy(): void;
|
|
26
|
+
private measureHeaderWidths;
|
|
27
|
+
private onColumnResizeMove;
|
|
28
|
+
private stopColumnResize;
|
|
29
|
+
}
|
package/dist/types/{components → markstream-angular/src/components}/TextNode/TextNode.component.d.ts
RENAMED
|
@@ -5,6 +5,7 @@ export declare class TextNodeComponent implements OnChanges {
|
|
|
5
5
|
context?: AngularRenderContext;
|
|
6
6
|
indexKey?: string;
|
|
7
7
|
typewriter?: boolean;
|
|
8
|
+
fade?: boolean;
|
|
8
9
|
settledText: string;
|
|
9
10
|
streamedDelta: string;
|
|
10
11
|
private streamFadeVersion;
|
|
@@ -12,6 +13,7 @@ export declare class TextNodeComponent implements OnChanges {
|
|
|
12
13
|
ngOnChanges(): void;
|
|
13
14
|
get centered(): boolean;
|
|
14
15
|
get streamedDeltaClass(): "markstream-angular-text__stream-delta--a" | "markstream-angular-text__stream-delta--b";
|
|
16
|
+
get fadeEnabled(): boolean;
|
|
15
17
|
get typewriterEnabled(): boolean;
|
|
16
18
|
settleStreamedDelta(): void;
|
|
17
19
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const MERMAID_PREVIEW_MIN_HEIGHT = 360;
|
|
2
|
+
export declare const MERMAID_PREVIEW_MAX_HEIGHT = 500;
|
|
3
|
+
export declare const INFOGRAPHIC_PREVIEW_MIN_HEIGHT = 360;
|
|
4
|
+
export declare const INFOGRAPHIC_PREVIEW_MAX_HEIGHT = 500;
|
|
5
|
+
export declare function parsePositiveNumber(value: unknown): number;
|
|
6
|
+
export declare function getMermaidDiagramKind(code: string): string;
|
|
7
|
+
export declare function estimateMermaidPreviewHeight(code: string): number;
|
|
8
|
+
export declare function estimateInfographicPreviewHeight(code: string): number;
|
|
9
|
+
export declare function clampPreviewHeight(height: number, minHeight?: number, maxHeight?: number | null): number;
|
package/dist/types/{components → markstream-angular/src/components}/shared/node-helpers.d.ts
RENAMED
|
@@ -1,11 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseNode, MarkdownIt, ParsedNode, ParseOptions, getHtmlTagFromContent, hasCompleteHtmlTagContent, normalizeCustomHtmlTags, normalizeCustomHtmlTagName as normalizeTagName, stripCustomHtmlWrapper } from '
|
|
1
|
+
import { SmoothMarkdownStreamOptions } from '../../../../markstream-core/src/index.ts';
|
|
2
|
+
import { BaseNode, HtmlPolicy, MarkdownIt, ParsedNode, ParseOptions, getHtmlTagFromContent, hasCompleteHtmlTagContent, normalizeCustomHtmlTags, normalizeCustomHtmlTagName as normalizeTagName, stripCustomHtmlWrapper } from '../../../../markdown-parser/src/index.ts';
|
|
3
|
+
import { CustomComponentMap } from '../../customComponents';
|
|
3
4
|
import { CodeBlockMonacoOptions, CodeBlockMonacoTheme } from '../../types/monaco';
|
|
4
5
|
export { getHtmlTagFromContent, hasCompleteHtmlTagContent, normalizeCustomHtmlTags, normalizeTagName, stripCustomHtmlWrapper, };
|
|
5
6
|
export type AngularRenderableNode = (ParsedNode | BaseNode) & Record<string, unknown>;
|
|
7
|
+
export interface CodeBlockPreviewPayload {
|
|
8
|
+
node: AngularRenderableNode;
|
|
9
|
+
artifactType: 'text/html' | 'image/svg+xml';
|
|
10
|
+
artifactTitle: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
export type NodeRendererCodeBlockProps = Partial<{
|
|
14
|
+
stream: boolean;
|
|
15
|
+
darkTheme: CodeBlockMonacoTheme;
|
|
16
|
+
lightTheme: CodeBlockMonacoTheme;
|
|
17
|
+
themes: CodeBlockMonacoTheme[];
|
|
18
|
+
monacoOptions: CodeBlockMonacoOptions;
|
|
19
|
+
minWidth: string | number;
|
|
20
|
+
maxWidth: string | number;
|
|
21
|
+
isShowPreview: boolean;
|
|
22
|
+
enableFontSizeControl: boolean;
|
|
23
|
+
showHeader: boolean;
|
|
24
|
+
showCopyButton: boolean;
|
|
25
|
+
showExpandButton: boolean;
|
|
26
|
+
showPreviewButton: boolean;
|
|
27
|
+
showCollapseButton: boolean;
|
|
28
|
+
showFontSizeButtons: boolean;
|
|
29
|
+
htmlPreviewAllowScripts: boolean;
|
|
30
|
+
htmlPreviewSandbox: string;
|
|
31
|
+
}> & Record<string, unknown>;
|
|
32
|
+
export type NodeRendererMermaidProps = Partial<{
|
|
33
|
+
maxHeight: string | null;
|
|
34
|
+
estimatedPreviewHeightPx: number;
|
|
35
|
+
workerTimeoutMs: number;
|
|
36
|
+
parseTimeoutMs: number;
|
|
37
|
+
renderTimeoutMs: number;
|
|
38
|
+
fullRenderTimeoutMs: number;
|
|
39
|
+
renderDebounceMs: number;
|
|
40
|
+
showHeader: boolean;
|
|
41
|
+
showModeToggle: boolean;
|
|
42
|
+
showCopyButton: boolean;
|
|
43
|
+
showExportButton: boolean;
|
|
44
|
+
showFullscreenButton: boolean;
|
|
45
|
+
showCollapseButton: boolean;
|
|
46
|
+
showZoomControls: boolean;
|
|
47
|
+
isStrict: boolean;
|
|
48
|
+
}> & Record<string, unknown>;
|
|
49
|
+
export type NodeRendererD2Props = Partial<{
|
|
50
|
+
maxHeight: string | null;
|
|
51
|
+
themeId: number | null;
|
|
52
|
+
darkThemeId: number | null;
|
|
53
|
+
showHeader: boolean;
|
|
54
|
+
showModeToggle: boolean;
|
|
55
|
+
showCopyButton: boolean;
|
|
56
|
+
showExportButton: boolean;
|
|
57
|
+
showCollapseButton: boolean;
|
|
58
|
+
}> & Record<string, unknown>;
|
|
59
|
+
export type NodeRendererInfographicProps = Partial<{
|
|
60
|
+
maxHeight: string | null;
|
|
61
|
+
estimatedPreviewHeightPx: number;
|
|
62
|
+
showHeader: boolean;
|
|
63
|
+
showModeToggle: boolean;
|
|
64
|
+
showCopyButton: boolean;
|
|
65
|
+
showCollapseButton: boolean;
|
|
66
|
+
showExportButton: boolean;
|
|
67
|
+
showFullscreenButton: boolean;
|
|
68
|
+
showZoomControls: boolean;
|
|
69
|
+
}> & Record<string, unknown>;
|
|
6
70
|
export interface NodeRendererEvents {
|
|
7
71
|
onCopy?: (code: string) => void;
|
|
8
|
-
onHandleArtifactClick?: (payload:
|
|
72
|
+
onHandleArtifactClick?: (payload: CodeBlockPreviewPayload) => void;
|
|
9
73
|
}
|
|
10
74
|
export interface NodeRendererProps {
|
|
11
75
|
content?: string;
|
|
@@ -15,6 +79,7 @@ export interface NodeRendererProps {
|
|
|
15
79
|
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
16
80
|
debugPerformance?: boolean;
|
|
17
81
|
customHtmlTags?: readonly string[];
|
|
82
|
+
htmlPolicy?: HtmlPolicy;
|
|
18
83
|
viewportPriority?: boolean;
|
|
19
84
|
codeBlockStream?: boolean;
|
|
20
85
|
codeBlockDarkTheme?: CodeBlockMonacoTheme;
|
|
@@ -23,17 +88,19 @@ export interface NodeRendererProps {
|
|
|
23
88
|
renderCodeBlocksAsPre?: boolean;
|
|
24
89
|
codeBlockMinWidth?: string | number;
|
|
25
90
|
codeBlockMaxWidth?: string | number;
|
|
26
|
-
codeBlockProps?:
|
|
27
|
-
mermaidProps?:
|
|
28
|
-
d2Props?:
|
|
29
|
-
infographicProps?:
|
|
30
|
-
customComponents?:
|
|
91
|
+
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
92
|
+
mermaidProps?: NodeRendererMermaidProps;
|
|
93
|
+
d2Props?: NodeRendererD2Props;
|
|
94
|
+
infographicProps?: NodeRendererInfographicProps;
|
|
95
|
+
customComponents?: CustomComponentMap;
|
|
31
96
|
showTooltips?: boolean;
|
|
32
97
|
themes?: CodeBlockMonacoTheme[];
|
|
33
98
|
isDark?: boolean;
|
|
34
99
|
customId?: string;
|
|
35
100
|
indexKey?: number | string;
|
|
36
101
|
typewriter?: boolean;
|
|
102
|
+
/** Enable/disable non-code-node enter and streamed-text fade animations. Default: true */
|
|
103
|
+
fade?: boolean;
|
|
37
104
|
batchRendering?: boolean;
|
|
38
105
|
initialRenderBatchSize?: number;
|
|
39
106
|
renderBatchSize?: number;
|
|
@@ -44,6 +111,8 @@ export interface NodeRendererProps {
|
|
|
44
111
|
maxLiveNodes?: number;
|
|
45
112
|
liveNodeBuffer?: number;
|
|
46
113
|
allowHtml?: boolean;
|
|
114
|
+
smoothStreaming?: boolean | 'auto';
|
|
115
|
+
smoothStreamingOptions?: SmoothMarkdownStreamOptions;
|
|
47
116
|
}
|
|
48
117
|
export interface AngularRenderContext {
|
|
49
118
|
customId?: string;
|
|
@@ -51,20 +120,22 @@ export interface AngularRenderContext {
|
|
|
51
120
|
indexKey?: string;
|
|
52
121
|
final?: boolean;
|
|
53
122
|
typewriter?: boolean;
|
|
123
|
+
fade?: boolean;
|
|
54
124
|
textStreamState?: Map<string, string>;
|
|
55
125
|
streamRenderVersion?: number;
|
|
56
126
|
showTooltips?: boolean;
|
|
57
127
|
codeBlockStream?: boolean;
|
|
58
128
|
renderCodeBlocksAsPre?: boolean;
|
|
59
129
|
allowHtml?: boolean;
|
|
130
|
+
htmlPolicy?: HtmlPolicy;
|
|
60
131
|
customHtmlTags?: readonly string[];
|
|
61
132
|
parseOptions?: ParseOptions;
|
|
62
133
|
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
63
|
-
codeBlockProps?:
|
|
64
|
-
mermaidProps?:
|
|
65
|
-
d2Props?:
|
|
66
|
-
infographicProps?:
|
|
67
|
-
customComponents?:
|
|
134
|
+
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
135
|
+
mermaidProps?: NodeRendererMermaidProps;
|
|
136
|
+
d2Props?: NodeRendererD2Props;
|
|
137
|
+
infographicProps?: NodeRendererInfographicProps;
|
|
138
|
+
customComponents?: CustomComponentMap;
|
|
68
139
|
codeBlockThemes?: {
|
|
69
140
|
themes?: CodeBlockMonacoTheme[];
|
|
70
141
|
darkTheme?: CodeBlockMonacoTheme;
|
package/dist/types/{components → markstream-angular/src/components}/shared/node-outlet-helpers.d.ts
RENAMED
|
@@ -4,4 +4,7 @@ export declare function resolveNodeOutletCodeMode(node: AngularRenderableNode, c
|
|
|
4
4
|
export declare function resolveHtmlTag(node: AngularRenderableNode): string;
|
|
5
5
|
export declare function coerceCustomHtmlNode(node: AngularRenderableNode): AngularRenderableNode;
|
|
6
6
|
export declare function coerceBuiltinHtmlNode(node: AngularRenderableNode, resolvedType: string): AngularRenderableNode;
|
|
7
|
-
export declare function resolveNodeOutletCustomInputs(node: AngularRenderableNode, context?: AngularRenderContext):
|
|
7
|
+
export declare function resolveNodeOutletCustomInputs(node: AngularRenderableNode, context?: AngularRenderContext): {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export declare function resolveNodeOutletCustomComponent(node: AngularRenderableNode, context?: AngularRenderContext, customComponents?: Record<string, any> | null): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from '@angular/core';
|
|
2
|
-
export type CustomComponentMap = Record<string, Type<
|
|
2
|
+
export type CustomComponentMap = Record<string, Type<unknown>>;
|
|
3
3
|
export declare function subscribeCustomComponents(listener: () => void): () => void;
|
|
4
4
|
export declare function getCustomComponentsRevision(): number;
|
|
5
5
|
export declare function setCustomComponents(id: string, mapping: CustomComponentMap): void;
|