markstream-vue 0.0.10 → 0.0.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/README.md +21 -0
- package/README.zh-CN.md +21 -0
- package/dist/CodeBlockNode.js +1 -1
- package/dist/exports.js +1 -1
- package/dist/extended.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1635 -98
- package/dist/index.js +1 -1
- package/dist/index.px.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/dist/index2.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/index5.js +1 -1
- package/dist/index6.js +1 -1
- package/dist/tailwind.ts +0 -0
- package/package.json +2 -1
- package/dist/languageIconExtended.js +0 -1
- package/dist/types/components/AdmonitionNode/AdmonitionNode.vue.d.ts +0 -26
- package/dist/types/components/AdmonitionNode/index.d.ts +0 -2
- package/dist/types/components/BlockquoteNode/BlockquoteNode.vue.d.ts +0 -23
- package/dist/types/components/BlockquoteNode/index.d.ts +0 -2
- package/dist/types/components/CheckboxNode/CheckboxNode.vue.d.ts +0 -9
- package/dist/types/components/CheckboxNode/index.d.ts +0 -2
- package/dist/types/components/CodeBlockNode/CodeBlockNode.vue.d.ts +0 -55
- package/dist/types/components/CodeBlockNode/HtmlPreviewFrame.vue.d.ts +0 -8
- package/dist/types/components/CodeBlockNode/index.d.ts +0 -2
- package/dist/types/components/CodeBlockNode/monaco.d.ts +0 -57
- package/dist/types/components/CodeBlockNode/monacoThemeScheduler.d.ts +0 -4
- package/dist/types/components/D2BlockNode/D2BlockNode.vue.d.ts +0 -16
- package/dist/types/components/D2BlockNode/d2.d.ts +0 -6
- package/dist/types/components/D2BlockNode/index.d.ts +0 -2
- package/dist/types/components/DefinitionListNode/DefinitionListNode.vue.d.ts +0 -29
- package/dist/types/components/DefinitionListNode/index.d.ts +0 -2
- package/dist/types/components/EmojiNode/EmojiNode.vue.d.ts +0 -10
- package/dist/types/components/EmojiNode/index.d.ts +0 -2
- package/dist/types/components/EmphasisNode/EmphasisNode.vue.d.ts +0 -16
- package/dist/types/components/EmphasisNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteAnchorNode/FootnoteAnchorNode.vue.d.ts +0 -9
- package/dist/types/components/FootnoteAnchorNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteNode/FootnoteNode.vue.d.ts +0 -21
- package/dist/types/components/FootnoteNode/index.d.ts +0 -2
- package/dist/types/components/FootnoteReferenceNode/FootnoteReferenceNode.vue.d.ts +0 -10
- package/dist/types/components/FootnoteReferenceNode/index.d.ts +0 -2
- package/dist/types/components/HardBreakNode/HardBreakNode.vue.d.ts +0 -9
- package/dist/types/components/HardBreakNode/index.d.ts +0 -2
- package/dist/types/components/HeadingNode/HeadingNode.vue.d.ts +0 -19
- package/dist/types/components/HeadingNode/index.d.ts +0 -2
- package/dist/types/components/HighlightNode/HighlightNode.vue.d.ts +0 -16
- package/dist/types/components/HighlightNode/index.d.ts +0 -2
- package/dist/types/components/HtmlBlockNode/HtmlBlockNode.vue.d.ts +0 -39
- package/dist/types/components/HtmlBlockNode/index.d.ts +0 -2
- package/dist/types/components/HtmlInlineNode/HtmlInlineNode.vue.d.ts +0 -12
- package/dist/types/components/HtmlInlineNode/index.d.ts +0 -2
- package/dist/types/components/ImageNode/ImageNode.vue.d.ts +0 -59
- package/dist/types/components/ImageNode/index.d.ts +0 -2
- package/dist/types/components/InfographicBlockNode/InfographicBlockNode.vue.d.ts +0 -46
- package/dist/types/components/InfographicBlockNode/index.d.ts +0 -2
- package/dist/types/components/InfographicBlockNode/infographic.d.ts +0 -3
- package/dist/types/components/InlineCodeNode/InlineCodeNode.vue.d.ts +0 -9
- package/dist/types/components/InlineCodeNode/index.d.ts +0 -2
- package/dist/types/components/InsertNode/InsertNode.vue.d.ts +0 -16
- package/dist/types/components/InsertNode/index.d.ts +0 -2
- package/dist/types/components/LinkNode/LinkNode.vue.d.ts +0 -5
- package/dist/types/components/LinkNode/index.d.ts +0 -2
- package/dist/types/components/ListItemNode/ListItemNode.vue.d.ts +0 -30
- package/dist/types/components/ListItemNode/index.d.ts +0 -2
- package/dist/types/components/ListNode/ListNode.vue.d.ts +0 -29
- package/dist/types/components/ListNode/index.d.ts +0 -2
- package/dist/types/components/MarkdownCodeBlockNode/MarkdownCodeBlockNode.vue.d.ts +0 -90
- package/dist/types/components/MarkdownCodeBlockNode/index.d.ts +0 -2
- package/dist/types/components/MathBlockNode/MathBlockNode.vue.d.ts +0 -5
- package/dist/types/components/MathBlockNode/index.d.ts +0 -2
- package/dist/types/components/MathInlineNode/MathInlineNode.vue.d.ts +0 -24
- package/dist/types/components/MathInlineNode/index.d.ts +0 -2
- package/dist/types/components/MathInlineNode/katex.d.ts +0 -7
- package/dist/types/components/MermaidBlockNode/MermaidBlockNode.vue.d.ts +0 -62
- package/dist/types/components/MermaidBlockNode/index.d.ts +0 -2
- package/dist/types/components/MermaidBlockNode/mermaid.d.ts +0 -6
- package/dist/types/components/NodeRenderer/FallbackComponent.vue.d.ts +0 -7
- package/dist/types/components/NodeRenderer/NodeRenderer.vue.d.ts +0 -34
- package/dist/types/components/NodeRenderer/asyncComponent.d.ts +0 -32
- package/dist/types/components/NodeRenderer/index.d.ts +0 -2
- package/dist/types/components/NodeRenderer/preloadMonaco.d.ts +0 -1
- package/dist/types/components/ParagraphNode/ParagraphNode.vue.d.ts +0 -17
- package/dist/types/components/ParagraphNode/index.d.ts +0 -2
- package/dist/types/components/PreCodeNode/PreCodeNode.vue.d.ts +0 -3
- package/dist/types/components/PreCodeNode/index.d.ts +0 -2
- package/dist/types/components/ReferenceNode/ReferenceNode.vue.d.ts +0 -19
- package/dist/types/components/ReferenceNode/index.d.ts +0 -2
- package/dist/types/components/StrikethroughNode/StrikethroughNode.vue.d.ts +0 -16
- package/dist/types/components/StrikethroughNode/index.d.ts +0 -2
- package/dist/types/components/StrongNode/StrongNode.vue.d.ts +0 -16
- package/dist/types/components/StrongNode/index.d.ts +0 -2
- package/dist/types/components/SubscriptNode/SubscriptNode.vue.d.ts +0 -16
- package/dist/types/components/SubscriptNode/index.d.ts +0 -2
- package/dist/types/components/SuperscriptNode/SuperscriptNode.vue.d.ts +0 -16
- package/dist/types/components/SuperscriptNode/index.d.ts +0 -2
- package/dist/types/components/TableNode/TableNode.vue.d.ts +0 -52
- package/dist/types/components/TableNode/index.d.ts +0 -2
- package/dist/types/components/TextNode/TextNode.vue.d.ts +0 -14
- package/dist/types/components/TextNode/index.d.ts +0 -2
- package/dist/types/components/ThematicBreakNode/ThematicBreakNode.vue.d.ts +0 -2
- package/dist/types/components/ThematicBreakNode/index.d.ts +0 -2
- package/dist/types/components/Tooltip/Tooltip.vue.d.ts +0 -15
- package/dist/types/components/Tooltip/index.d.ts +0 -2
- package/dist/types/components/VmrContainerNode/VmrContainerNode.vue.d.ts +0 -20
- package/dist/types/components/VmrContainerNode/index.d.ts +0 -2
- package/dist/types/components/__tests__/htmlNodes.integration.test.d.ts +0 -4
- package/dist/types/composables/rendererContext.d.ts +0 -19
- package/dist/types/composables/useKatexReady.d.ts +0 -1
- package/dist/types/composables/useSafeI18n.d.ts +0 -10
- package/dist/types/composables/useSingletonTooltip.d.ts +0 -11
- package/dist/types/composables/viewportPriority.d.ts +0 -21
- package/dist/types/exports.d.ts +0 -381
- package/dist/types/internal/heightEstimationExperiment.d.ts +0 -84
- package/dist/types/types/component-props.d.ts +0 -305
- package/dist/types/types/index.d.ts +0 -272
- package/dist/types/types/node-renderer-props.d.ts +0 -81
- package/dist/types/utils/__tests__/htmlRenderer.test.d.ts +0 -4
- package/dist/types/utils/htmlRenderer.d.ts +0 -20
- package/dist/types/utils/index.d.ts +0 -6
- package/dist/types/utils/katex-threshold.d.ts +0 -20
- package/dist/types/utils/languageIcon.d.ts +0 -8
- package/dist/types/utils/languageIconExtended.d.ts +0 -1
- package/dist/types/utils/nodeComponents.d.ts +0 -20
- package/dist/types/utils/performance-monitor.d.ts +0 -121
- package/dist/types/utils/safeRaf.d.ts +0 -2
- package/dist/types/workers/katexCdnWorker.d.ts +0 -52
- package/dist/types/workers/katexRenderer.worker.d.ts +0 -0
- package/dist/types/workers/katexWorkerClient.d.ts +0 -48
- package/dist/types/workers/mermaidCdnWorker.d.ts +0 -35
- package/dist/types/workers/mermaidParser.worker.d.ts +0 -1
- package/dist/types/workers/mermaidWorkerClient.d.ts +0 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,1607 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { Component, Plugin } from 'vue';
|
|
3
|
+
import { CodeBlockNode as CodeBlockNode$1, BaseNode, ParseOptions, MarkdownIt } from 'stream-markdown-parser';
|
|
4
|
+
export * from 'stream-markdown-parser';
|
|
5
|
+
export { KATEX_COMMANDS, MathOptions, normalizeStandaloneBackslashT, setDefaultMathOptions } from 'stream-markdown-parser';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Monaco theme name or a lightweight theme object accepted by `stream-monaco`.
|
|
9
|
+
*
|
|
10
|
+
* Keep this intentionally local so `markstream-vue` does not force consumers to
|
|
11
|
+
* install `stream-monaco` just to resolve exported types.
|
|
12
|
+
*/
|
|
13
|
+
interface CodeBlockMonacoThemeObject {
|
|
14
|
+
name: string;
|
|
15
|
+
base?: string;
|
|
16
|
+
inherit?: boolean;
|
|
17
|
+
colors?: Record<string, string>;
|
|
18
|
+
rules?: Array<Record<string, unknown>>;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Theme entries forwarded to Monaco-backed code blocks.
|
|
23
|
+
*/
|
|
24
|
+
type CodeBlockMonacoTheme = string | CodeBlockMonacoThemeObject;
|
|
25
|
+
/**
|
|
26
|
+
* Unified theme prop for code blocks.
|
|
27
|
+
*
|
|
28
|
+
* - `string` or `CodeBlockMonacoThemeObject`: fixed theme, ignores page dark/light
|
|
29
|
+
* - `{ light, dark }`: auto-switches based on page isDark
|
|
30
|
+
*/
|
|
31
|
+
type CodeBlockThemeProp = CodeBlockMonacoTheme | {
|
|
32
|
+
light: CodeBlockMonacoTheme;
|
|
33
|
+
dark: CodeBlockMonacoTheme;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Common language entry accepted by `stream-monaco`.
|
|
37
|
+
*
|
|
38
|
+
* The runtime also supports advanced lazy-loader signatures; keep the union
|
|
39
|
+
* broad here so hover remains useful without depending on `stream-monaco`.
|
|
40
|
+
*/
|
|
41
|
+
type CodeBlockMonacoLanguage = string | ((...args: any[]) => unknown);
|
|
42
|
+
/**
|
|
43
|
+
* Object form of Monaco's unchanged-region folding settings.
|
|
44
|
+
*/
|
|
45
|
+
interface CodeBlockDiffHideUnchangedRegionsOptions {
|
|
46
|
+
/** Enable unchanged-region folding for diff editors. */
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
/** Number of context lines to keep visible around each change. */
|
|
49
|
+
contextLineCount?: number;
|
|
50
|
+
/** Minimum unchanged span required before a region can collapse. */
|
|
51
|
+
minimumLineCount?: number;
|
|
52
|
+
/** Number of lines to reveal when the user expands a collapsed region. */
|
|
53
|
+
revealLineCount?: number;
|
|
54
|
+
}
|
|
55
|
+
type CodeBlockDiffHideUnchangedRegions = boolean | CodeBlockDiffHideUnchangedRegionsOptions;
|
|
56
|
+
/**
|
|
57
|
+
* Visual treatment for changed diff lines.
|
|
58
|
+
*/
|
|
59
|
+
type CodeBlockDiffLineStyle = 'background' | 'bar';
|
|
60
|
+
/**
|
|
61
|
+
* Shell appearance for the Monaco diff surface.
|
|
62
|
+
*/
|
|
63
|
+
type CodeBlockDiffAppearance = 'auto' | 'light' | 'dark';
|
|
64
|
+
/**
|
|
65
|
+
* Rendering style for collapsed unchanged diff regions.
|
|
66
|
+
*/
|
|
67
|
+
type CodeBlockDiffUnchangedRegionStyle = 'line-info' | 'line-info-basic' | 'metadata' | 'simple';
|
|
68
|
+
/**
|
|
69
|
+
* Action names emitted by Monaco diff hunk hover controls.
|
|
70
|
+
*/
|
|
71
|
+
type CodeBlockDiffHunkActionKind = 'revert' | 'stage';
|
|
72
|
+
/**
|
|
73
|
+
* Which half of the diff hunk triggered the action.
|
|
74
|
+
*/
|
|
75
|
+
type CodeBlockDiffHunkSide = 'upper' | 'lower';
|
|
76
|
+
/**
|
|
77
|
+
* Minimal action context forwarded from `stream-monaco`.
|
|
78
|
+
*
|
|
79
|
+
* Use `action` and `side` for the stable contract. The model payloads are kept
|
|
80
|
+
* intentionally loose to avoid introducing `stream-monaco` or Monaco types into
|
|
81
|
+
* `markstream-vue`'s public declarations.
|
|
82
|
+
*/
|
|
83
|
+
interface CodeBlockDiffHunkActionContext {
|
|
84
|
+
/** The requested hunk action. */
|
|
85
|
+
action: CodeBlockDiffHunkActionKind;
|
|
86
|
+
/** Which hunk half triggered the action. */
|
|
87
|
+
side: CodeBlockDiffHunkSide;
|
|
88
|
+
/** Raw Monaco diff metadata for the current hunk. */
|
|
89
|
+
lineChange: unknown;
|
|
90
|
+
/** Original Monaco model for the diff editor. */
|
|
91
|
+
originalModel: unknown;
|
|
92
|
+
/** Modified Monaco model for the diff editor. */
|
|
93
|
+
modifiedModel: unknown;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Monaco editor options forwarded by `CodeBlockNode`.
|
|
97
|
+
*
|
|
98
|
+
* This mirrors the most common `stream-monaco` options used in markstream-vue's
|
|
99
|
+
* docs and examples while leaving the index signature available for advanced
|
|
100
|
+
* options not modeled here yet.
|
|
101
|
+
*/
|
|
102
|
+
interface CodeBlockMonacoOptions {
|
|
103
|
+
/** Maximum editor height before the code block starts scrolling internally. */
|
|
104
|
+
MAX_HEIGHT?: number | string;
|
|
105
|
+
/** Base font size for Monaco-rendered code. */
|
|
106
|
+
fontSize?: number;
|
|
107
|
+
/** Explicit line height for the Monaco editor. */
|
|
108
|
+
lineHeight?: number;
|
|
109
|
+
/** Font family override applied to the Monaco editor surface. */
|
|
110
|
+
fontFamily?: string;
|
|
111
|
+
/** Tab width forwarded to Monaco. */
|
|
112
|
+
tabSize?: number;
|
|
113
|
+
/** Render the Monaco editor in read-only mode. */
|
|
114
|
+
readOnly?: boolean;
|
|
115
|
+
/** Monaco word-wrap mode for long lines. */
|
|
116
|
+
wordWrap?: 'off' | 'on' | 'wordWrapColumn' | 'bounded' | string;
|
|
117
|
+
/** Indentation strategy used when wrapping long lines. */
|
|
118
|
+
wrappingIndent?: 'none' | 'same' | 'indent' | 'deepIndent' | string;
|
|
119
|
+
/** Monaco theme name to apply on initial render. */
|
|
120
|
+
theme?: string;
|
|
121
|
+
/** Theme names or theme objects available for this code block. */
|
|
122
|
+
themes?: CodeBlockMonacoTheme[];
|
|
123
|
+
/**
|
|
124
|
+
* Language ids or lazy loaders to register with `stream-monaco`.
|
|
125
|
+
*
|
|
126
|
+
* Supplying this array replaces the default built-in language list.
|
|
127
|
+
*/
|
|
128
|
+
languages?: CodeBlockMonacoLanguage[];
|
|
129
|
+
/** Render diff editors side-by-side instead of inline. */
|
|
130
|
+
renderSideBySide?: boolean;
|
|
131
|
+
/** Allow resizing the split handle in side-by-side diff mode. */
|
|
132
|
+
enableSplitViewResizing?: boolean;
|
|
133
|
+
/** Keep whitespace-only changes visible in Monaco diff editors. */
|
|
134
|
+
ignoreTrimWhitespace?: boolean;
|
|
135
|
+
/** Disable Monaco's diff computation timeout for large diffs when needed. */
|
|
136
|
+
maxComputationTime?: number;
|
|
137
|
+
/** Choose Monaco's diff algorithm. */
|
|
138
|
+
diffAlgorithm?: string;
|
|
139
|
+
/** Show change indicators in the gutter. */
|
|
140
|
+
renderIndicators?: boolean;
|
|
141
|
+
/** Allow editing the original side of a diff editor. */
|
|
142
|
+
originalEditable?: boolean;
|
|
143
|
+
/** Debounce repeated reveal requests while content is streaming. */
|
|
144
|
+
revealDebounceMs?: number;
|
|
145
|
+
/** How Monaco should reveal the active line while auto-scrolling. */
|
|
146
|
+
revealStrategy?: 'bottom' | 'centerIfOutside' | 'center';
|
|
147
|
+
/** Delay a final reveal until streaming settles for this many milliseconds. */
|
|
148
|
+
revealBatchOnIdleMs?: number;
|
|
149
|
+
/** Extra throttle window for normal `updateCode` calls. */
|
|
150
|
+
updateThrottleMs?: number;
|
|
151
|
+
/** Extra throttle window for diff streaming updates. */
|
|
152
|
+
diffUpdateThrottleMs?: number;
|
|
153
|
+
/** Enable automatic scrolling on the modified side of diff editors. */
|
|
154
|
+
diffAutoScroll?: boolean;
|
|
155
|
+
/** Fold unchanged diff regions with Monaco's diff viewer. */
|
|
156
|
+
diffHideUnchangedRegions?: CodeBlockDiffHideUnchangedRegions;
|
|
157
|
+
/** Visual emphasis used for changed diff lines. */
|
|
158
|
+
diffLineStyle?: CodeBlockDiffLineStyle;
|
|
159
|
+
/** Light/dark chrome mode for Monaco's diff shell. */
|
|
160
|
+
diffAppearance?: CodeBlockDiffAppearance;
|
|
161
|
+
/** Visual style used for collapsed unchanged diff regions. */
|
|
162
|
+
diffUnchangedRegionStyle?: CodeBlockDiffUnchangedRegionStyle;
|
|
163
|
+
/** Show per-hunk hover actions such as `revert` and `stage`. */
|
|
164
|
+
diffHunkActionsOnHover?: boolean;
|
|
165
|
+
/** Delay before diff hover action widgets hide after mouse leave. */
|
|
166
|
+
diffHunkHoverHideDelayMs?: number;
|
|
167
|
+
/**
|
|
168
|
+
* Intercept diff hunk hover actions before `stream-monaco` applies its
|
|
169
|
+
* default local model edits. Return `false` to skip the built-in behavior.
|
|
170
|
+
*/
|
|
171
|
+
onDiffHunkAction?: (context: CodeBlockDiffHunkActionContext) => void | boolean | Promise<void | boolean>;
|
|
172
|
+
scrollbar?: Record<string, any>;
|
|
173
|
+
[key: string]: any;
|
|
174
|
+
}
|
|
175
|
+
interface CodeBlockNodeProps {
|
|
176
|
+
node: CodeBlockNode$1;
|
|
177
|
+
isDark?: boolean;
|
|
178
|
+
loading?: boolean;
|
|
179
|
+
stream?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Unified theme configuration.
|
|
182
|
+
* - `string` or theme object: fixed theme, ignores page dark/light switch
|
|
183
|
+
* - `{ light, dark }`: auto-switches based on `isDark`
|
|
184
|
+
* - When omitted, falls back to `darkTheme`/`lightTheme` props
|
|
185
|
+
*/
|
|
186
|
+
theme?: CodeBlockThemeProp;
|
|
187
|
+
/** @deprecated Use `theme` prop instead. Kept for backward compatibility. */
|
|
188
|
+
darkTheme?: CodeBlockMonacoTheme;
|
|
189
|
+
/** @deprecated Use `theme` prop instead. Kept for backward compatibility. */
|
|
190
|
+
lightTheme?: CodeBlockMonacoTheme;
|
|
191
|
+
isShowPreview?: boolean;
|
|
192
|
+
/** Monaco editor and diff behavior forwarded to `stream-monaco`. */
|
|
193
|
+
monacoOptions?: CodeBlockMonacoOptions;
|
|
194
|
+
enableFontSizeControl?: boolean;
|
|
195
|
+
minWidth?: string | number;
|
|
196
|
+
maxWidth?: string | number;
|
|
197
|
+
/** Theme names or theme objects preloaded for this code block instance. */
|
|
198
|
+
themes?: CodeBlockMonacoTheme[];
|
|
199
|
+
showHeader?: boolean;
|
|
200
|
+
showCopyButton?: boolean;
|
|
201
|
+
showExpandButton?: boolean;
|
|
202
|
+
showPreviewButton?: boolean;
|
|
203
|
+
showCollapseButton?: boolean;
|
|
204
|
+
showFontSizeButtons?: boolean;
|
|
205
|
+
showTooltips?: boolean;
|
|
206
|
+
/** Scope key used by `setCustomComponents()` and `data-custom-id` style overrides. */
|
|
207
|
+
customId?: string;
|
|
208
|
+
}
|
|
209
|
+
interface ImageNodeProps {
|
|
210
|
+
node: {
|
|
211
|
+
type: 'image';
|
|
212
|
+
src: string;
|
|
213
|
+
alt: string;
|
|
214
|
+
title: string | null;
|
|
215
|
+
raw: string;
|
|
216
|
+
loading?: boolean;
|
|
217
|
+
};
|
|
218
|
+
fallbackSrc?: string;
|
|
219
|
+
lazy?: boolean;
|
|
220
|
+
usePlaceholder?: boolean;
|
|
221
|
+
}
|
|
222
|
+
interface LinkNodeProps {
|
|
223
|
+
node: {
|
|
224
|
+
type: 'link';
|
|
225
|
+
href: string;
|
|
226
|
+
title: string | null;
|
|
227
|
+
text: string;
|
|
228
|
+
attrs?: [string, string][];
|
|
229
|
+
children: {
|
|
230
|
+
type: string;
|
|
231
|
+
raw: string;
|
|
232
|
+
}[];
|
|
233
|
+
raw: string;
|
|
234
|
+
loading?: boolean;
|
|
235
|
+
};
|
|
236
|
+
indexKey: number | string;
|
|
237
|
+
customId?: string;
|
|
238
|
+
showTooltip?: boolean;
|
|
239
|
+
color?: string;
|
|
240
|
+
underlineHeight?: number;
|
|
241
|
+
underlineBottom?: number | string;
|
|
242
|
+
animationDuration?: number;
|
|
243
|
+
animationOpacity?: number;
|
|
244
|
+
animationTiming?: string;
|
|
245
|
+
animationIteration?: string | number;
|
|
246
|
+
}
|
|
247
|
+
interface PreCodeNodeProps {
|
|
248
|
+
node: CodeBlockNode$1;
|
|
249
|
+
}
|
|
250
|
+
interface MermaidBlockNodeProps {
|
|
251
|
+
node: CodeBlockNode$1;
|
|
252
|
+
maxHeight?: string | null;
|
|
253
|
+
loading?: boolean;
|
|
254
|
+
isDark?: boolean;
|
|
255
|
+
workerTimeoutMs?: number;
|
|
256
|
+
parseTimeoutMs?: number;
|
|
257
|
+
renderTimeoutMs?: number;
|
|
258
|
+
fullRenderTimeoutMs?: number;
|
|
259
|
+
renderDebounceMs?: number;
|
|
260
|
+
contentStableDelayMs?: number;
|
|
261
|
+
previewPollDelayMs?: number;
|
|
262
|
+
previewPollMaxDelayMs?: number;
|
|
263
|
+
previewPollMaxAttempts?: number;
|
|
264
|
+
showHeader?: boolean;
|
|
265
|
+
showModeToggle?: boolean;
|
|
266
|
+
showCopyButton?: boolean;
|
|
267
|
+
showExportButton?: boolean;
|
|
268
|
+
showFullscreenButton?: boolean;
|
|
269
|
+
showCollapseButton?: boolean;
|
|
270
|
+
showZoomControls?: boolean;
|
|
271
|
+
enableWheelZoom?: boolean;
|
|
272
|
+
isStrict?: boolean;
|
|
273
|
+
showTooltips?: boolean;
|
|
274
|
+
onRenderError?: (error: unknown, code: string, container: HTMLElement) => boolean | void;
|
|
275
|
+
}
|
|
276
|
+
interface MermaidBlockEvent<TPayload = any> {
|
|
277
|
+
payload?: TPayload;
|
|
278
|
+
defaultPrevented: boolean;
|
|
279
|
+
preventDefault: () => void;
|
|
280
|
+
svgElement?: SVGElement | null;
|
|
281
|
+
svgString?: string | null;
|
|
282
|
+
}
|
|
283
|
+
interface D2BlockNodeProps {
|
|
284
|
+
node: CodeBlockNode$1;
|
|
285
|
+
maxHeight?: string | null;
|
|
286
|
+
loading?: boolean;
|
|
287
|
+
isDark?: boolean;
|
|
288
|
+
progressiveRender?: boolean;
|
|
289
|
+
progressiveIntervalMs?: number;
|
|
290
|
+
themeId?: number | null;
|
|
291
|
+
darkThemeId?: number | null;
|
|
292
|
+
showHeader?: boolean;
|
|
293
|
+
showModeToggle?: boolean;
|
|
294
|
+
showCopyButton?: boolean;
|
|
295
|
+
showExportButton?: boolean;
|
|
296
|
+
showCollapseButton?: boolean;
|
|
297
|
+
}
|
|
298
|
+
interface InfographicBlockNodeProps {
|
|
299
|
+
node: CodeBlockNode$1;
|
|
300
|
+
maxHeight?: string | null;
|
|
301
|
+
loading?: boolean;
|
|
302
|
+
isDark?: boolean;
|
|
303
|
+
showHeader?: boolean;
|
|
304
|
+
showModeToggle?: boolean;
|
|
305
|
+
showCopyButton?: boolean;
|
|
306
|
+
showCollapseButton?: boolean;
|
|
307
|
+
showExportButton?: boolean;
|
|
308
|
+
showFullscreenButton?: boolean;
|
|
309
|
+
showZoomControls?: boolean;
|
|
310
|
+
}
|
|
311
|
+
interface MathBlockNodeProps {
|
|
312
|
+
node: {
|
|
313
|
+
type: 'math_block';
|
|
314
|
+
content: string;
|
|
315
|
+
raw: string;
|
|
316
|
+
loading?: boolean;
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
interface MathInlineNodeProps {
|
|
320
|
+
node: {
|
|
321
|
+
type: 'math_inline';
|
|
322
|
+
content: string;
|
|
323
|
+
raw: string;
|
|
324
|
+
loading?: boolean;
|
|
325
|
+
markup?: string;
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
interface CustomComponents$1 {
|
|
330
|
+
text?: Component;
|
|
331
|
+
paragraph?: Component;
|
|
332
|
+
heading?: Component;
|
|
333
|
+
code_block?: Component;
|
|
334
|
+
list?: Component;
|
|
335
|
+
list_item?: Component;
|
|
336
|
+
blockquote?: Component;
|
|
337
|
+
table?: Component;
|
|
338
|
+
definition_list?: Component;
|
|
339
|
+
footnote?: Component;
|
|
340
|
+
footnote_reference?: Component;
|
|
341
|
+
footnote_anchor?: Component;
|
|
342
|
+
admonition?: Component;
|
|
343
|
+
hardbreak?: Component;
|
|
344
|
+
link?: Component;
|
|
345
|
+
image?: Component;
|
|
346
|
+
thematic_break?: Component;
|
|
347
|
+
math_inline?: Component;
|
|
348
|
+
math_block?: Component;
|
|
349
|
+
strong?: Component;
|
|
350
|
+
emphasis?: Component;
|
|
351
|
+
strikethrough?: Component;
|
|
352
|
+
highlight?: Component;
|
|
353
|
+
insert?: Component;
|
|
354
|
+
subscript?: Component;
|
|
355
|
+
superscript?: Component;
|
|
356
|
+
emoji?: Component;
|
|
357
|
+
checkbox?: Component;
|
|
358
|
+
inline_code?: Component;
|
|
359
|
+
html_inline?: Component;
|
|
360
|
+
html_block?: Component;
|
|
361
|
+
reference?: Component;
|
|
362
|
+
mermaid?: Component;
|
|
363
|
+
infographic?: Component;
|
|
364
|
+
d2?: Component;
|
|
365
|
+
vmr_container?: Component;
|
|
366
|
+
[key: string]: Component | undefined;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
type AdmonitionKind = 'note' | 'info' | 'tip' | 'warning' | 'danger' | 'caution' | 'error';
|
|
370
|
+
interface AdmonitionNode {
|
|
371
|
+
type: 'admonition';
|
|
372
|
+
kind: AdmonitionKind;
|
|
373
|
+
title?: string;
|
|
374
|
+
children: {
|
|
375
|
+
type: string;
|
|
376
|
+
raw: string;
|
|
377
|
+
}[];
|
|
378
|
+
raw: string;
|
|
379
|
+
collapsible?: boolean;
|
|
380
|
+
open?: boolean;
|
|
381
|
+
}
|
|
382
|
+
type __VLS_Props$r = {
|
|
383
|
+
node: AdmonitionNode;
|
|
384
|
+
indexKey: number | string;
|
|
385
|
+
isDark?: boolean;
|
|
386
|
+
typewriter?: boolean;
|
|
387
|
+
customId?: string;
|
|
388
|
+
};
|
|
389
|
+
declare const _default$w: vue.DefineComponent<__VLS_Props$r, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
390
|
+
copy: (...args: any[]) => void;
|
|
391
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$r> & Readonly<{
|
|
392
|
+
onCopy?: (...args: any[]) => any;
|
|
393
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
394
|
+
|
|
395
|
+
interface NodeChild$a {
|
|
396
|
+
type: string;
|
|
397
|
+
raw: string;
|
|
398
|
+
[key: string]: unknown;
|
|
399
|
+
}
|
|
400
|
+
interface BlockquoteNode {
|
|
401
|
+
type: 'blockquote';
|
|
402
|
+
children: NodeChild$a[];
|
|
403
|
+
raw: string;
|
|
404
|
+
cite?: string;
|
|
405
|
+
}
|
|
406
|
+
type __VLS_Props$q = {
|
|
407
|
+
node: BlockquoteNode;
|
|
408
|
+
indexKey: string | number;
|
|
409
|
+
typewriter?: boolean;
|
|
410
|
+
customId?: string;
|
|
411
|
+
};
|
|
412
|
+
declare const _default$v: vue.DefineComponent<__VLS_Props$q, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
413
|
+
copy: (text: string) => any;
|
|
414
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$q> & Readonly<{
|
|
415
|
+
onCopy?: (text: string) => any;
|
|
416
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLQuoteElement>;
|
|
417
|
+
|
|
418
|
+
type __VLS_Props$p = {
|
|
419
|
+
node: {
|
|
420
|
+
type: 'checkbox';
|
|
421
|
+
checked: boolean;
|
|
422
|
+
raw: string;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
declare const _default$u: vue.DefineComponent<__VLS_Props$p, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$p> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
426
|
+
|
|
427
|
+
type D2Loader = () => Promise<any> | any;
|
|
428
|
+
declare function setD2Loader(loader: D2Loader | null): void;
|
|
429
|
+
declare function enableD2(loader?: D2Loader): void;
|
|
430
|
+
declare function disableD2(): void;
|
|
431
|
+
declare function isD2Enabled(): boolean;
|
|
432
|
+
|
|
433
|
+
interface DefinitionItemNode {
|
|
434
|
+
type: 'definition_item';
|
|
435
|
+
term: {
|
|
436
|
+
type: string;
|
|
437
|
+
raw: string;
|
|
438
|
+
}[];
|
|
439
|
+
definition: {
|
|
440
|
+
type: string;
|
|
441
|
+
raw: string;
|
|
442
|
+
}[];
|
|
443
|
+
raw: string;
|
|
444
|
+
}
|
|
445
|
+
interface DefinitionListNode {
|
|
446
|
+
type: 'definition_list';
|
|
447
|
+
items: DefinitionItemNode[];
|
|
448
|
+
raw: string;
|
|
449
|
+
}
|
|
450
|
+
type __VLS_Props$o = {
|
|
451
|
+
node: DefinitionListNode;
|
|
452
|
+
indexKey: string | number;
|
|
453
|
+
typewriter?: boolean;
|
|
454
|
+
customId?: string;
|
|
455
|
+
};
|
|
456
|
+
declare const _default$t: vue.DefineComponent<__VLS_Props$o, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
457
|
+
copy: (...args: any[]) => void;
|
|
458
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$o> & Readonly<{
|
|
459
|
+
onCopy?: (...args: any[]) => any;
|
|
460
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDListElement>;
|
|
461
|
+
|
|
462
|
+
type __VLS_Props$n = {
|
|
463
|
+
node: {
|
|
464
|
+
type: 'emoji';
|
|
465
|
+
name: string;
|
|
466
|
+
markup: string;
|
|
467
|
+
raw: string;
|
|
468
|
+
};
|
|
469
|
+
};
|
|
470
|
+
declare const _default$s: vue.DefineComponent<__VLS_Props$n, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$n> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
471
|
+
|
|
472
|
+
interface NodeChild$9 {
|
|
473
|
+
type: string;
|
|
474
|
+
raw: string;
|
|
475
|
+
[key: string]: unknown;
|
|
476
|
+
}
|
|
477
|
+
type __VLS_Props$m = {
|
|
478
|
+
node: {
|
|
479
|
+
type: 'emphasis';
|
|
480
|
+
children: NodeChild$9[];
|
|
481
|
+
raw: string;
|
|
482
|
+
};
|
|
483
|
+
customId?: string;
|
|
484
|
+
indexKey?: number | string;
|
|
485
|
+
};
|
|
486
|
+
declare const _default$r: vue.DefineComponent<__VLS_Props$m, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$m> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
487
|
+
|
|
488
|
+
type __VLS_Props$l = {
|
|
489
|
+
node: {
|
|
490
|
+
type: 'footnote_anchor';
|
|
491
|
+
id: string;
|
|
492
|
+
raw?: string;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
declare const _default$q: vue.DefineComponent<__VLS_Props$l, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$l> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLAnchorElement>;
|
|
496
|
+
|
|
497
|
+
interface FootnoteNode {
|
|
498
|
+
type: 'footnote';
|
|
499
|
+
id: string;
|
|
500
|
+
children: {
|
|
501
|
+
type: string;
|
|
502
|
+
raw: string;
|
|
503
|
+
}[];
|
|
504
|
+
raw: string;
|
|
505
|
+
}
|
|
506
|
+
type __VLS_Props$k = {
|
|
507
|
+
node: FootnoteNode;
|
|
508
|
+
indexKey: string | number;
|
|
509
|
+
typewriter?: boolean;
|
|
510
|
+
customId?: string;
|
|
511
|
+
};
|
|
512
|
+
declare const _default$p: vue.DefineComponent<__VLS_Props$k, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
513
|
+
copy: (...args: any[]) => void;
|
|
514
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$k> & Readonly<{
|
|
515
|
+
onCopy?: (...args: any[]) => any;
|
|
516
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
517
|
+
|
|
518
|
+
interface FootnoteReferenceNode {
|
|
519
|
+
type: 'footnote_reference';
|
|
520
|
+
id: string;
|
|
521
|
+
raw: string;
|
|
522
|
+
}
|
|
523
|
+
type __VLS_Props$j = {
|
|
524
|
+
node: FootnoteReferenceNode;
|
|
525
|
+
};
|
|
526
|
+
declare const _default$o: vue.DefineComponent<__VLS_Props$j, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$j> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
527
|
+
|
|
528
|
+
interface HardBreakNode {
|
|
529
|
+
type: 'hardbreak';
|
|
530
|
+
raw: string;
|
|
531
|
+
}
|
|
532
|
+
type __VLS_Props$i = {
|
|
533
|
+
node: HardBreakNode;
|
|
534
|
+
};
|
|
535
|
+
declare const _default$n: vue.DefineComponent<__VLS_Props$i, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$i> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLBRElement>;
|
|
536
|
+
|
|
537
|
+
declare const _HeadingNode: any;
|
|
538
|
+
|
|
539
|
+
interface NodeChild$8 {
|
|
540
|
+
type: string;
|
|
541
|
+
raw: string;
|
|
542
|
+
[key: string]: unknown;
|
|
543
|
+
}
|
|
544
|
+
type __VLS_Props$h = {
|
|
545
|
+
node: {
|
|
546
|
+
type: 'highlight';
|
|
547
|
+
children: NodeChild$8[];
|
|
548
|
+
raw: string;
|
|
549
|
+
};
|
|
550
|
+
customId?: string;
|
|
551
|
+
indexKey?: number | string;
|
|
552
|
+
};
|
|
553
|
+
declare const _default$m: vue.DefineComponent<__VLS_Props$h, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$h> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
554
|
+
|
|
555
|
+
type __VLS_Props$g = {
|
|
556
|
+
node: {
|
|
557
|
+
content: string;
|
|
558
|
+
raw?: string;
|
|
559
|
+
tag?: string;
|
|
560
|
+
attrs?: [string, string][] | null;
|
|
561
|
+
loading?: boolean;
|
|
562
|
+
};
|
|
563
|
+
customId?: string;
|
|
564
|
+
};
|
|
565
|
+
declare function __VLS_template$3(): {
|
|
566
|
+
attrs: Partial<{}>;
|
|
567
|
+
slots: {
|
|
568
|
+
placeholder?(_: {
|
|
569
|
+
node: {
|
|
570
|
+
content: string;
|
|
571
|
+
raw?: string;
|
|
572
|
+
tag?: string;
|
|
573
|
+
attrs?: [string, string][] | null;
|
|
574
|
+
loading?: boolean;
|
|
575
|
+
};
|
|
576
|
+
}): any;
|
|
577
|
+
};
|
|
578
|
+
refs: {
|
|
579
|
+
htmlRef: HTMLDivElement;
|
|
580
|
+
};
|
|
581
|
+
rootEl: HTMLDivElement;
|
|
582
|
+
};
|
|
583
|
+
type __VLS_TemplateResult$3 = ReturnType<typeof __VLS_template$3>;
|
|
584
|
+
declare const __VLS_component$3: vue.DefineComponent<__VLS_Props$g, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$g> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
585
|
+
htmlRef: HTMLDivElement;
|
|
586
|
+
}, HTMLDivElement>;
|
|
587
|
+
declare const _default$l: __VLS_WithTemplateSlots$3<typeof __VLS_component$3, __VLS_TemplateResult$3["slots"]>;
|
|
588
|
+
|
|
589
|
+
type __VLS_WithTemplateSlots$3<T, S> = T & {
|
|
590
|
+
new (): {
|
|
591
|
+
$slots: S;
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
type __VLS_Props$f = {
|
|
596
|
+
node: {
|
|
597
|
+
type: 'html_inline';
|
|
598
|
+
tag?: string;
|
|
599
|
+
content: string;
|
|
600
|
+
loading?: boolean;
|
|
601
|
+
autoClosed?: boolean;
|
|
602
|
+
};
|
|
603
|
+
customId?: string;
|
|
604
|
+
};
|
|
605
|
+
declare const _default$k: vue.DefineComponent<__VLS_Props$f, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$f> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
606
|
+
|
|
607
|
+
declare function __VLS_template$2(): {
|
|
608
|
+
attrs: Partial<{}>;
|
|
609
|
+
slots: {
|
|
610
|
+
placeholder?(_: {
|
|
611
|
+
node: {
|
|
612
|
+
type: "image";
|
|
613
|
+
src: string;
|
|
614
|
+
alt: string;
|
|
615
|
+
title: string | null;
|
|
616
|
+
raw: string;
|
|
617
|
+
loading?: boolean;
|
|
618
|
+
};
|
|
619
|
+
displaySrc: string;
|
|
620
|
+
imageLoaded: boolean;
|
|
621
|
+
hasError: boolean;
|
|
622
|
+
fallbackSrc: string;
|
|
623
|
+
lazy: boolean;
|
|
624
|
+
}): any;
|
|
625
|
+
error?(_: {
|
|
626
|
+
node: {
|
|
627
|
+
type: "image";
|
|
628
|
+
src: string;
|
|
629
|
+
alt: string;
|
|
630
|
+
title: string | null;
|
|
631
|
+
raw: string;
|
|
632
|
+
loading?: boolean;
|
|
633
|
+
};
|
|
634
|
+
displaySrc: string;
|
|
635
|
+
imageLoaded: boolean;
|
|
636
|
+
hasError: true;
|
|
637
|
+
fallbackSrc: string;
|
|
638
|
+
lazy: boolean;
|
|
639
|
+
}): any;
|
|
640
|
+
};
|
|
641
|
+
refs: {};
|
|
642
|
+
rootEl: HTMLSpanElement;
|
|
643
|
+
};
|
|
644
|
+
type __VLS_TemplateResult$2 = ReturnType<typeof __VLS_template$2>;
|
|
645
|
+
declare const __VLS_component$2: vue.DefineComponent<ImageNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
646
|
+
click: (payload: [Event, string]) => any;
|
|
647
|
+
error: (src: string) => any;
|
|
648
|
+
load: (src: string) => any;
|
|
649
|
+
}, string, vue.PublicProps, Readonly<ImageNodeProps> & Readonly<{
|
|
650
|
+
onClick?: (payload: [Event, string]) => any;
|
|
651
|
+
onError?: (src: string) => any;
|
|
652
|
+
onLoad?: (src: string) => any;
|
|
653
|
+
}>, {
|
|
654
|
+
fallbackSrc: string;
|
|
655
|
+
lazy: boolean;
|
|
656
|
+
usePlaceholder: boolean;
|
|
657
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
658
|
+
declare const _default$j: __VLS_WithTemplateSlots$2<typeof __VLS_component$2, __VLS_TemplateResult$2["slots"]>;
|
|
659
|
+
|
|
660
|
+
type __VLS_WithTemplateSlots$2<T, S> = T & {
|
|
661
|
+
new (): {
|
|
662
|
+
$slots: S;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
|
|
666
|
+
type __VLS_Props$e = {
|
|
667
|
+
node: {
|
|
668
|
+
type: 'inline_code';
|
|
669
|
+
code: string;
|
|
670
|
+
raw: string;
|
|
671
|
+
};
|
|
672
|
+
};
|
|
673
|
+
declare const _default$i: vue.DefineComponent<__VLS_Props$e, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$e> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
674
|
+
|
|
675
|
+
interface NodeChild$7 {
|
|
676
|
+
type: string;
|
|
677
|
+
raw: string;
|
|
678
|
+
[key: string]: unknown;
|
|
679
|
+
}
|
|
680
|
+
type __VLS_Props$d = {
|
|
681
|
+
node: {
|
|
682
|
+
type: 'insert';
|
|
683
|
+
children: NodeChild$7[];
|
|
684
|
+
raw: string;
|
|
685
|
+
};
|
|
686
|
+
customId?: string;
|
|
687
|
+
indexKey?: number | string;
|
|
688
|
+
};
|
|
689
|
+
declare const _default$h: vue.DefineComponent<__VLS_Props$d, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$d> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLModElement>;
|
|
690
|
+
|
|
691
|
+
declare const _default$g: vue.DefineComponent<LinkNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<LinkNodeProps> & Readonly<{}>, {
|
|
692
|
+
showTooltip: boolean;
|
|
693
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
694
|
+
|
|
695
|
+
interface NodeChild$6 {
|
|
696
|
+
type: string;
|
|
697
|
+
raw: string;
|
|
698
|
+
[key: string]: unknown;
|
|
699
|
+
}
|
|
700
|
+
interface ListItem$1 {
|
|
701
|
+
type: 'list_item';
|
|
702
|
+
children: NodeChild$6[];
|
|
703
|
+
raw: string;
|
|
704
|
+
}
|
|
705
|
+
type __VLS_Props$c = {
|
|
706
|
+
/**
|
|
707
|
+
* Preferred prop name for consistency with other node components.
|
|
708
|
+
* `item` is kept for backward compatibility.
|
|
709
|
+
*/
|
|
710
|
+
node?: ListItem$1;
|
|
711
|
+
item?: ListItem$1;
|
|
712
|
+
indexKey?: number | string;
|
|
713
|
+
value?: number;
|
|
714
|
+
customId?: string;
|
|
715
|
+
/** Forwarded flag to enable/disable non-code node enter transition */
|
|
716
|
+
typewriter?: boolean;
|
|
717
|
+
showTooltips?: boolean;
|
|
718
|
+
};
|
|
719
|
+
declare const _default$f: vue.DefineComponent<__VLS_Props$c, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
720
|
+
copy: (text: string) => any;
|
|
721
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$c> & Readonly<{
|
|
722
|
+
onCopy?: (text: string) => any;
|
|
723
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, HTMLLIElement>;
|
|
724
|
+
|
|
725
|
+
interface NodeChild$5 {
|
|
726
|
+
type: string;
|
|
727
|
+
raw: string;
|
|
728
|
+
[key: string]: unknown;
|
|
729
|
+
}
|
|
730
|
+
interface ListItem {
|
|
731
|
+
type: 'list_item';
|
|
732
|
+
children: NodeChild$5[];
|
|
733
|
+
raw: string;
|
|
734
|
+
}
|
|
735
|
+
type __VLS_Props$b = {
|
|
736
|
+
node: {
|
|
737
|
+
type: 'list';
|
|
738
|
+
ordered: boolean;
|
|
739
|
+
start?: number;
|
|
740
|
+
items: ListItem[];
|
|
741
|
+
raw: string;
|
|
742
|
+
};
|
|
743
|
+
customId?: string;
|
|
744
|
+
indexKey?: number | string;
|
|
745
|
+
typewriter?: boolean;
|
|
746
|
+
showTooltips?: boolean;
|
|
747
|
+
};
|
|
748
|
+
declare const _default$e: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
749
|
+
copy: (...args: any[]) => void;
|
|
750
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{
|
|
751
|
+
onCopy?: (...args: any[]) => any;
|
|
752
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
753
|
+
|
|
754
|
+
type __VLS_Props$a = {
|
|
755
|
+
node: {
|
|
756
|
+
type: 'code_block';
|
|
757
|
+
language: string;
|
|
758
|
+
code: string;
|
|
759
|
+
raw: string;
|
|
760
|
+
diff?: boolean;
|
|
761
|
+
originalCode?: string;
|
|
762
|
+
updatedCode?: string;
|
|
763
|
+
};
|
|
764
|
+
loading?: boolean;
|
|
765
|
+
/**
|
|
766
|
+
* If true, update and render code content as it streams in.
|
|
767
|
+
* If false, keep a lightweight loading state and create the editor only when loading becomes false.
|
|
768
|
+
*/
|
|
769
|
+
stream?: boolean;
|
|
770
|
+
darkTheme?: string;
|
|
771
|
+
lightTheme?: string;
|
|
772
|
+
isDark?: boolean;
|
|
773
|
+
isShowPreview?: boolean;
|
|
774
|
+
enableFontSizeControl?: boolean;
|
|
775
|
+
/** Minimum width for the code block container (px or CSS unit string) */
|
|
776
|
+
minWidth?: string | number;
|
|
777
|
+
/** Maximum width for the code block container (px or CSS unit string) */
|
|
778
|
+
maxWidth?: string | number;
|
|
779
|
+
themes?: string[];
|
|
780
|
+
/** Header visibility and controls */
|
|
781
|
+
showHeader?: boolean;
|
|
782
|
+
showCopyButton?: boolean;
|
|
783
|
+
showExpandButton?: boolean;
|
|
784
|
+
showPreviewButton?: boolean;
|
|
785
|
+
showCollapseButton?: boolean;
|
|
786
|
+
showFontSizeButtons?: boolean;
|
|
787
|
+
/** Toggle singleton tooltips for header action buttons */
|
|
788
|
+
showTooltips?: boolean;
|
|
789
|
+
estimatedHeightPx?: number;
|
|
790
|
+
estimatedContentHeightPx?: number;
|
|
791
|
+
};
|
|
792
|
+
declare function __VLS_template$1(): {
|
|
793
|
+
attrs: Partial<{}>;
|
|
794
|
+
slots: {
|
|
795
|
+
'header-left'?(_: {}): any;
|
|
796
|
+
'header-right'?(_: {}): any;
|
|
797
|
+
loading?(_: {
|
|
798
|
+
loading: boolean;
|
|
799
|
+
stream: boolean;
|
|
800
|
+
}): any;
|
|
801
|
+
};
|
|
802
|
+
refs: {
|
|
803
|
+
container: HTMLDivElement;
|
|
804
|
+
codeBlockContent: HTMLDivElement;
|
|
805
|
+
rendererTarget: HTMLDivElement;
|
|
806
|
+
};
|
|
807
|
+
rootEl: HTMLDivElement;
|
|
808
|
+
};
|
|
809
|
+
type __VLS_TemplateResult$1 = ReturnType<typeof __VLS_template$1>;
|
|
810
|
+
declare const __VLS_component$1: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
811
|
+
copy: (...args: any[]) => void;
|
|
812
|
+
previewCode: (...args: any[]) => void;
|
|
813
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{
|
|
814
|
+
onCopy?: (...args: any[]) => any;
|
|
815
|
+
onPreviewCode?: (...args: any[]) => any;
|
|
816
|
+
}>, {
|
|
817
|
+
isDark: boolean;
|
|
818
|
+
loading: boolean;
|
|
819
|
+
stream: boolean;
|
|
820
|
+
darkTheme: string;
|
|
821
|
+
lightTheme: string;
|
|
822
|
+
isShowPreview: boolean;
|
|
823
|
+
enableFontSizeControl: boolean;
|
|
824
|
+
minWidth: string | number;
|
|
825
|
+
maxWidth: string | number;
|
|
826
|
+
showHeader: boolean;
|
|
827
|
+
showCopyButton: boolean;
|
|
828
|
+
showExpandButton: boolean;
|
|
829
|
+
showPreviewButton: boolean;
|
|
830
|
+
showCollapseButton: boolean;
|
|
831
|
+
showFontSizeButtons: boolean;
|
|
832
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
833
|
+
container: HTMLDivElement;
|
|
834
|
+
codeBlockContent: HTMLDivElement;
|
|
835
|
+
rendererTarget: HTMLDivElement;
|
|
836
|
+
}, HTMLDivElement>;
|
|
837
|
+
declare const _default$d: __VLS_WithTemplateSlots$1<typeof __VLS_component$1, __VLS_TemplateResult$1["slots"]>;
|
|
838
|
+
|
|
839
|
+
type __VLS_WithTemplateSlots$1<T, S> = T & {
|
|
840
|
+
new (): {
|
|
841
|
+
$slots: S;
|
|
842
|
+
};
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
type KatexLoader = () => Promise<any> | any;
|
|
846
|
+
declare function setKatexLoader(loader: KatexLoader | null): void;
|
|
847
|
+
declare function enableKatex(loader?: KatexLoader): void;
|
|
848
|
+
declare function disableKatex(): void;
|
|
849
|
+
declare function isKatexEnabled(): boolean;
|
|
850
|
+
|
|
851
|
+
type MermaidLoader = () => Promise<any> | any;
|
|
852
|
+
declare function setMermaidLoader(loader: MermaidLoader | null): void;
|
|
853
|
+
declare function enableMermaid(loader?: MermaidLoader): void;
|
|
854
|
+
declare function disableMermaid(): void;
|
|
855
|
+
declare function isMermaidEnabled(): boolean;
|
|
856
|
+
|
|
857
|
+
type NodeRendererCodeBlockProps = Partial<Omit<CodeBlockNodeProps, 'node'>> & Record<string, unknown>;
|
|
858
|
+
interface NodeRendererProps {
|
|
859
|
+
/** Raw Markdown input. Omit this when you pass pre-parsed nodes instead. */
|
|
860
|
+
content?: string;
|
|
861
|
+
/** Pre-parsed Markdown nodes to render without running the internal parser. */
|
|
862
|
+
nodes?: BaseNode[];
|
|
863
|
+
/**
|
|
864
|
+
* Whether the input stream is complete (end-of-stream). When true, the parser
|
|
865
|
+
* will stop emitting streaming "loading" nodes for unfinished constructs.
|
|
866
|
+
*/
|
|
867
|
+
final?: boolean;
|
|
868
|
+
/** Options forwarded to parseMarkdownToStructure when content is provided */
|
|
869
|
+
parseOptions?: ParseOptions;
|
|
870
|
+
customMarkdownIt?: (md: MarkdownIt) => MarkdownIt;
|
|
871
|
+
/** Log parse/render timing and virtualization stats (dev only) */
|
|
872
|
+
debugPerformance?: boolean;
|
|
873
|
+
/**
|
|
874
|
+
* Custom HTML-like tags that participate in streaming mid-state handling
|
|
875
|
+
* and are emitted as custom nodes (e.g. ['thinking']). Forwarded to `getMarkdown()`.
|
|
876
|
+
*/
|
|
877
|
+
customHtmlTags?: readonly string[];
|
|
878
|
+
/** Enable priority rendering for visible viewport area */
|
|
879
|
+
viewportPriority?: boolean;
|
|
880
|
+
/**
|
|
881
|
+
* Whether code_block renders should stream updates.
|
|
882
|
+
* When false, code blocks stay in a loading state and render once when final content is ready.
|
|
883
|
+
* Default: true
|
|
884
|
+
*/
|
|
885
|
+
codeBlockStream?: boolean;
|
|
886
|
+
/** Preferred dark Monaco theme forwarded to every code block renderer. */
|
|
887
|
+
codeBlockDarkTheme?: CodeBlockMonacoTheme;
|
|
888
|
+
/** Preferred light Monaco theme forwarded to every code block renderer. */
|
|
889
|
+
codeBlockLightTheme?: CodeBlockMonacoTheme;
|
|
890
|
+
/** Monaco editor options forwarded to every `CodeBlockNode`. */
|
|
891
|
+
codeBlockMonacoOptions?: CodeBlockMonacoOptions;
|
|
892
|
+
/** If true, render all `code_block` nodes as plain <pre><code> blocks instead of the full CodeBlockNode */
|
|
893
|
+
renderCodeBlocksAsPre?: boolean;
|
|
894
|
+
/** Minimum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
895
|
+
codeBlockMinWidth?: string | number;
|
|
896
|
+
/** Maximum width forwarded to CodeBlockNode (px or CSS unit) */
|
|
897
|
+
codeBlockMaxWidth?: string | number;
|
|
898
|
+
/** Arbitrary props to forward to every CodeBlockNode */
|
|
899
|
+
codeBlockProps?: NodeRendererCodeBlockProps;
|
|
900
|
+
/** Props forwarded to MermaidBlockNode for mermaid fences */
|
|
901
|
+
mermaidProps?: Partial<Omit<MermaidBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
902
|
+
/** Props forwarded to D2BlockNode for d2/d2lang fences */
|
|
903
|
+
d2Props?: Partial<Omit<D2BlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
904
|
+
/** Props forwarded to InfographicBlockNode for infographic fences */
|
|
905
|
+
infographicProps?: Partial<Omit<InfographicBlockNodeProps, 'node' | 'loading' | 'isDark'>>;
|
|
906
|
+
/** Global tooltip toggle for link/code-block renderers (default: true) */
|
|
907
|
+
showTooltips?: boolean;
|
|
908
|
+
/** Theme names or theme objects preloaded for Monaco-backed code blocks. */
|
|
909
|
+
themes?: CodeBlockMonacoTheme[];
|
|
910
|
+
/** Forces dark mode for built-in renderers such as Mermaid, D2, KaTeX, and code blocks. */
|
|
911
|
+
isDark?: boolean;
|
|
912
|
+
/** Scope key used by `setCustomComponents()` and `data-custom-id` style overrides. */
|
|
913
|
+
customId?: string;
|
|
914
|
+
indexKey?: number | string;
|
|
915
|
+
/** Enable/disable the non-code-node enter transition (typewriter). Default: true */
|
|
916
|
+
typewriter?: boolean;
|
|
917
|
+
/** Enable incremental/batched rendering of nodes to avoid large single flush costs. Default: true */
|
|
918
|
+
batchRendering?: boolean;
|
|
919
|
+
/** How many nodes to render immediately before batching kicks in. Default: 40 */
|
|
920
|
+
initialRenderBatchSize?: number;
|
|
921
|
+
/** How many additional nodes to render per batch tick. Default: 80 */
|
|
922
|
+
renderBatchSize?: number;
|
|
923
|
+
/** Extra delay (ms) before each batch after rAF; helps yield to input. Default: 16 */
|
|
924
|
+
renderBatchDelay?: number;
|
|
925
|
+
/** Target budget (ms) for each batch before we shrink subsequent batch sizes. Default: 6 */
|
|
926
|
+
renderBatchBudgetMs?: number;
|
|
927
|
+
/** Timeout (ms) for requestIdleCallback slices. Default: 120 */
|
|
928
|
+
renderBatchIdleTimeoutMs?: number;
|
|
929
|
+
/** Defer rendering nodes until they are near the viewport */
|
|
930
|
+
deferNodesUntilVisible?: boolean;
|
|
931
|
+
/** Maximum number of fully rendered nodes kept in DOM. Default: 320 */
|
|
932
|
+
maxLiveNodes?: number;
|
|
933
|
+
/** Number of nodes to keep before/after focus. Default: 60 */
|
|
934
|
+
liveNodeBuffer?: number;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
declare const _default$c: vue.DefineComponent<NodeRendererProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
938
|
+
copy: (...args: any[]) => void;
|
|
939
|
+
handleArtifactClick: (...args: any[]) => void;
|
|
940
|
+
click: (...args: any[]) => void;
|
|
941
|
+
mouseover: (...args: any[]) => void;
|
|
942
|
+
mouseout: (...args: any[]) => void;
|
|
943
|
+
}, string, vue.PublicProps, Readonly<NodeRendererProps> & Readonly<{
|
|
944
|
+
onCopy?: (...args: any[]) => any;
|
|
945
|
+
onHandleArtifactClick?: (...args: any[]) => any;
|
|
946
|
+
onClick?: (...args: any[]) => any;
|
|
947
|
+
onMouseover?: (...args: any[]) => any;
|
|
948
|
+
onMouseout?: (...args: any[]) => any;
|
|
949
|
+
}>, {
|
|
950
|
+
showTooltips: boolean;
|
|
951
|
+
typewriter: boolean;
|
|
952
|
+
codeBlockStream: boolean;
|
|
953
|
+
batchRendering: boolean;
|
|
954
|
+
debugPerformance: boolean;
|
|
955
|
+
initialRenderBatchSize: number;
|
|
956
|
+
renderBatchSize: number;
|
|
957
|
+
renderBatchDelay: number;
|
|
958
|
+
renderBatchBudgetMs: number;
|
|
959
|
+
renderBatchIdleTimeoutMs: number;
|
|
960
|
+
deferNodesUntilVisible: boolean;
|
|
961
|
+
maxLiveNodes: number;
|
|
962
|
+
liveNodeBuffer: number;
|
|
963
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {
|
|
964
|
+
containerRef: HTMLDivElement;
|
|
965
|
+
paragraphProbeWrapperRef: HTMLDivElement;
|
|
966
|
+
listItemProbeWrapperRef: HTMLDivElement;
|
|
967
|
+
listProbeWrapperRef: HTMLDivElement;
|
|
968
|
+
}, HTMLDivElement>;
|
|
969
|
+
|
|
970
|
+
interface NodeChild$4 {
|
|
971
|
+
type: string;
|
|
972
|
+
raw: string;
|
|
973
|
+
[key: string]: unknown;
|
|
974
|
+
}
|
|
975
|
+
type __VLS_Props$9 = {
|
|
976
|
+
node: {
|
|
977
|
+
type: 'paragraph';
|
|
978
|
+
children: NodeChild$4[];
|
|
979
|
+
raw: string;
|
|
980
|
+
};
|
|
981
|
+
customId?: string;
|
|
982
|
+
indexKey?: number | string;
|
|
983
|
+
customHtmlTags?: readonly string[];
|
|
984
|
+
};
|
|
985
|
+
declare const _default$b: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLParagraphElement>;
|
|
986
|
+
|
|
987
|
+
declare const _default$a: vue.DefineComponent<PreCodeNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<PreCodeNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLPreElement>;
|
|
988
|
+
|
|
989
|
+
type __VLS_Props$8 = {
|
|
990
|
+
node: {
|
|
991
|
+
type: 'reference';
|
|
992
|
+
id: string;
|
|
993
|
+
raw: string;
|
|
994
|
+
};
|
|
995
|
+
messageId?: string;
|
|
996
|
+
threadId?: string;
|
|
997
|
+
};
|
|
998
|
+
declare const _default$9: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
999
|
+
click: (...args: any[]) => void;
|
|
1000
|
+
mouseEnter: (...args: any[]) => void;
|
|
1001
|
+
mouseLeave: (...args: any[]) => void;
|
|
1002
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{
|
|
1003
|
+
onClick?: (...args: any[]) => any;
|
|
1004
|
+
onMouseEnter?: (...args: any[]) => any;
|
|
1005
|
+
onMouseLeave?: (...args: any[]) => any;
|
|
1006
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
1007
|
+
|
|
1008
|
+
interface NodeChild$3 {
|
|
1009
|
+
type: string;
|
|
1010
|
+
raw: string;
|
|
1011
|
+
[key: string]: unknown;
|
|
1012
|
+
}
|
|
1013
|
+
type __VLS_Props$7 = {
|
|
1014
|
+
node: {
|
|
1015
|
+
type: 'strikethrough';
|
|
1016
|
+
children: NodeChild$3[];
|
|
1017
|
+
raw: string;
|
|
1018
|
+
};
|
|
1019
|
+
customId?: string;
|
|
1020
|
+
indexKey?: string | number;
|
|
1021
|
+
};
|
|
1022
|
+
declare const _default$8: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLModElement>;
|
|
1023
|
+
|
|
1024
|
+
interface NodeChild$2 {
|
|
1025
|
+
type: string;
|
|
1026
|
+
raw: string;
|
|
1027
|
+
[key: string]: unknown;
|
|
1028
|
+
}
|
|
1029
|
+
type __VLS_Props$6 = {
|
|
1030
|
+
node: {
|
|
1031
|
+
type: 'strong';
|
|
1032
|
+
children: NodeChild$2[];
|
|
1033
|
+
raw: string;
|
|
1034
|
+
};
|
|
1035
|
+
customId?: string;
|
|
1036
|
+
indexKey?: number | string;
|
|
1037
|
+
};
|
|
1038
|
+
declare const _default$7: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
1039
|
+
|
|
1040
|
+
interface NodeChild$1 {
|
|
1041
|
+
type: string;
|
|
1042
|
+
raw: string;
|
|
1043
|
+
[key: string]: unknown;
|
|
1044
|
+
}
|
|
1045
|
+
type __VLS_Props$5 = {
|
|
1046
|
+
node: {
|
|
1047
|
+
type: 'subscript';
|
|
1048
|
+
children: NodeChild$1[];
|
|
1049
|
+
raw: string;
|
|
1050
|
+
};
|
|
1051
|
+
customId?: string;
|
|
1052
|
+
indexKey?: number | string;
|
|
1053
|
+
};
|
|
1054
|
+
declare const _default$6: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
1055
|
+
|
|
1056
|
+
interface NodeChild {
|
|
1057
|
+
type: string;
|
|
1058
|
+
raw: string;
|
|
1059
|
+
[key: string]: unknown;
|
|
1060
|
+
}
|
|
1061
|
+
type __VLS_Props$4 = {
|
|
1062
|
+
node: {
|
|
1063
|
+
type: 'superscript';
|
|
1064
|
+
children: NodeChild[];
|
|
1065
|
+
raw: string;
|
|
1066
|
+
};
|
|
1067
|
+
customId?: string;
|
|
1068
|
+
indexKey?: number | string;
|
|
1069
|
+
};
|
|
1070
|
+
declare const _default$5: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLElement>;
|
|
1071
|
+
|
|
1072
|
+
interface TableCellNode {
|
|
1073
|
+
type: 'table_cell';
|
|
1074
|
+
header: boolean;
|
|
1075
|
+
children: {
|
|
1076
|
+
type: string;
|
|
1077
|
+
raw: string;
|
|
1078
|
+
}[];
|
|
1079
|
+
raw: string;
|
|
1080
|
+
align?: 'left' | 'right' | 'center';
|
|
1081
|
+
}
|
|
1082
|
+
interface TableRowNode {
|
|
1083
|
+
type: 'table_row';
|
|
1084
|
+
cells: TableCellNode[];
|
|
1085
|
+
raw: string;
|
|
1086
|
+
}
|
|
1087
|
+
interface TableNode {
|
|
1088
|
+
type: 'table';
|
|
1089
|
+
header: TableRowNode;
|
|
1090
|
+
rows: TableRowNode[];
|
|
1091
|
+
raw: string;
|
|
1092
|
+
loading: boolean;
|
|
1093
|
+
}
|
|
1094
|
+
type __VLS_Props$3 = {
|
|
1095
|
+
node: TableNode;
|
|
1096
|
+
indexKey: string | number;
|
|
1097
|
+
isDark?: boolean;
|
|
1098
|
+
typewriter?: boolean;
|
|
1099
|
+
customId?: string;
|
|
1100
|
+
};
|
|
1101
|
+
declare function __VLS_template(): {
|
|
1102
|
+
attrs: Partial<{}>;
|
|
1103
|
+
slots: {
|
|
1104
|
+
loading?(_: {
|
|
1105
|
+
isLoading: true;
|
|
1106
|
+
}): any;
|
|
1107
|
+
};
|
|
1108
|
+
refs: {};
|
|
1109
|
+
rootEl: HTMLDivElement;
|
|
1110
|
+
};
|
|
1111
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
1112
|
+
declare const __VLS_component: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1113
|
+
copy: (...args: any[]) => void;
|
|
1114
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{
|
|
1115
|
+
onCopy?: (...args: any[]) => any;
|
|
1116
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1117
|
+
declare const _default$4: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
1118
|
+
|
|
1119
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
1120
|
+
new (): {
|
|
1121
|
+
$slots: S;
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
type __VLS_Props$2 = {
|
|
1126
|
+
node: {
|
|
1127
|
+
type: 'text';
|
|
1128
|
+
content: string;
|
|
1129
|
+
raw: string;
|
|
1130
|
+
center?: boolean;
|
|
1131
|
+
};
|
|
1132
|
+
};
|
|
1133
|
+
declare const _default$3: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
1134
|
+
copy: (...args: any[]) => void;
|
|
1135
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
1136
|
+
onCopy?: (...args: any[]) => any;
|
|
1137
|
+
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
1138
|
+
|
|
1139
|
+
declare const _default$2: vue.DefineComponent<{}, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, HTMLHRElement>;
|
|
1140
|
+
|
|
1141
|
+
type __VLS_Props$1 = {
|
|
1142
|
+
visible: boolean;
|
|
1143
|
+
anchorEl: HTMLElement | null;
|
|
1144
|
+
content: string;
|
|
1145
|
+
placement?: 'top' | 'bottom' | 'left' | 'right';
|
|
1146
|
+
offset?: number;
|
|
1147
|
+
originX?: number | null;
|
|
1148
|
+
originY?: number | null;
|
|
1149
|
+
id?: string | null;
|
|
1150
|
+
/** @deprecated Dark mode is now handled via semantic CSS tokens. */
|
|
1151
|
+
isDark?: boolean | null;
|
|
1152
|
+
};
|
|
1153
|
+
declare const _default$1: vue.DefineComponent<__VLS_Props$1, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$1> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
1154
|
+
tooltip: HTMLDivElement;
|
|
1155
|
+
arrowEl: HTMLDivElement;
|
|
1156
|
+
}, any>;
|
|
1157
|
+
|
|
1158
|
+
interface VmrContainerNode {
|
|
1159
|
+
type: 'vmr_container';
|
|
1160
|
+
name: string;
|
|
1161
|
+
loading?: boolean;
|
|
1162
|
+
attrs?: Record<string, string>;
|
|
1163
|
+
children: {
|
|
1164
|
+
type: string;
|
|
1165
|
+
raw: string;
|
|
1166
|
+
}[];
|
|
1167
|
+
raw: string;
|
|
1168
|
+
}
|
|
1169
|
+
type __VLS_Props = {
|
|
1170
|
+
node: VmrContainerNode;
|
|
1171
|
+
indexKey: number | string;
|
|
1172
|
+
isDark?: boolean;
|
|
1173
|
+
typewriter?: boolean;
|
|
1174
|
+
customId?: string;
|
|
1175
|
+
};
|
|
1176
|
+
declare const _default: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
1177
|
+
|
|
1178
|
+
declare const defaultMap: Record<string, string>;
|
|
1179
|
+
/**
|
|
1180
|
+
* Replace the entire default translation map.
|
|
1181
|
+
* Consumers can call this to provide their own fallback translations (e.g. Chinese).
|
|
1182
|
+
*/
|
|
1183
|
+
declare function setDefaultI18nMap(map: Record<keyof typeof defaultMap, string>): void;
|
|
1184
|
+
|
|
1185
|
+
declare function setCustomComponents(id: string, mapping: Partial<CustomComponents$1>): void;
|
|
1186
|
+
declare function setCustomComponents(mapping: Partial<CustomComponents$1>): void;
|
|
1187
|
+
/**
|
|
1188
|
+
* Retrieve custom components for a given scope id.
|
|
1189
|
+
* If no id is provided, returns the legacy/global mapping (if any).
|
|
1190
|
+
*/
|
|
1191
|
+
declare function getCustomNodeComponents(customId?: string): Partial<CustomComponents$1>;
|
|
1192
|
+
/**
|
|
1193
|
+
* Remove a scoped custom components mapping.
|
|
1194
|
+
* Use this to clean up mappings for dynamic or temporary renderers.
|
|
1195
|
+
*/
|
|
1196
|
+
declare function removeCustomComponents(id: string): void;
|
|
1197
|
+
/**
|
|
1198
|
+
* Clear the legacy/global custom components mapping.
|
|
1199
|
+
* Use this when you want to remove the single-argument mapping set by
|
|
1200
|
+
* `setCustomComponents(mapping)`.
|
|
1201
|
+
*/
|
|
1202
|
+
declare function clearGlobalCustomComponents(): void;
|
|
1203
|
+
|
|
1204
|
+
interface MonacoDisposableLike {
|
|
1205
|
+
dispose?: () => void;
|
|
1206
|
+
}
|
|
1207
|
+
interface MonacoModelLike {
|
|
1208
|
+
getLineCount?: () => number;
|
|
1209
|
+
}
|
|
1210
|
+
interface MonacoEditorViewLike {
|
|
1211
|
+
getModel?: () => MonacoModelLike | null | undefined;
|
|
1212
|
+
getOption?: (option: unknown) => unknown;
|
|
1213
|
+
updateOptions?: (options: Record<string, unknown>) => void;
|
|
1214
|
+
layout?: () => void;
|
|
1215
|
+
getContentHeight?: () => number;
|
|
1216
|
+
onDidContentSizeChange?: (listener: () => void) => MonacoDisposableLike | void;
|
|
1217
|
+
onDidLayoutChange?: (listener: () => void) => MonacoDisposableLike | void;
|
|
1218
|
+
}
|
|
1219
|
+
interface MonacoDiffLineChangeLike {
|
|
1220
|
+
originalStartLineNumber?: number;
|
|
1221
|
+
originalEndLineNumber?: number;
|
|
1222
|
+
modifiedStartLineNumber?: number;
|
|
1223
|
+
modifiedEndLineNumber?: number;
|
|
1224
|
+
}
|
|
1225
|
+
interface MonacoDiffEditorViewLike extends MonacoEditorViewLike {
|
|
1226
|
+
getOriginalEditor?: () => MonacoEditorViewLike | null | undefined;
|
|
1227
|
+
getModifiedEditor?: () => MonacoEditorViewLike | null | undefined;
|
|
1228
|
+
getLineChanges?: () => MonacoDiffLineChangeLike[] | null | undefined;
|
|
1229
|
+
onDidUpdateDiff?: (listener: () => void) => MonacoDisposableLike | void;
|
|
1230
|
+
}
|
|
1231
|
+
interface MonacoNamespaceLike {
|
|
1232
|
+
EditorOption?: {
|
|
1233
|
+
fontInfo?: unknown;
|
|
1234
|
+
lineHeight?: unknown;
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
interface MonacoRuntimeOptions extends Omit<CodeBlockMonacoOptions, 'theme'> {
|
|
1238
|
+
theme?: CodeBlockMonacoTheme;
|
|
1239
|
+
themes?: CodeBlockMonacoTheme[];
|
|
1240
|
+
onThemeChange?: () => void;
|
|
1241
|
+
}
|
|
1242
|
+
interface MonacoHelpers {
|
|
1243
|
+
createEditor?: (container: HTMLElement, code: string, language: string) => Promise<unknown> | unknown;
|
|
1244
|
+
createDiffEditor?: (container: HTMLElement, original: string, modified: string, language: string) => Promise<unknown> | unknown;
|
|
1245
|
+
updateCode?: (code: string, language: string) => Promise<unknown> | unknown;
|
|
1246
|
+
updateDiff?: (original: string, modified: string, language: string) => Promise<unknown> | unknown;
|
|
1247
|
+
getEditor?: () => MonacoNamespaceLike | null;
|
|
1248
|
+
getEditorView?: () => MonacoEditorViewLike | null;
|
|
1249
|
+
getDiffEditorView?: () => MonacoDiffEditorViewLike | null;
|
|
1250
|
+
cleanupEditor?: () => void;
|
|
1251
|
+
safeClean?: () => void;
|
|
1252
|
+
refreshDiffPresentation?: () => void;
|
|
1253
|
+
setTheme?: (theme: CodeBlockMonacoTheme | undefined) => Promise<void> | void;
|
|
1254
|
+
}
|
|
1255
|
+
interface MonacoModule {
|
|
1256
|
+
useMonaco?: (options: MonacoRuntimeOptions) => MonacoHelpers | null | undefined;
|
|
1257
|
+
detectLanguage?: (code: string) => string;
|
|
1258
|
+
}
|
|
1259
|
+
declare function getUseMonaco(): Promise<MonacoModule | null>;
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Recommend when to use Worker based on formula count and complexity.
|
|
1263
|
+
*
|
|
1264
|
+
* N_threshold ≈ floor(B / (R × (1 - H)))
|
|
1265
|
+
* - B: main-thread budget (ms), e.g. 50ms or a stricter 16.7ms
|
|
1266
|
+
* - R: avg render time per unique formula (ms)
|
|
1267
|
+
* - H: cache hit rate (0~1)
|
|
1268
|
+
*/
|
|
1269
|
+
interface ThresholdInput {
|
|
1270
|
+
R: number;
|
|
1271
|
+
H?: number;
|
|
1272
|
+
B?: number;
|
|
1273
|
+
}
|
|
1274
|
+
declare function recommendWorkerThreshold({ R, H, B }: ThresholdInput): number;
|
|
1275
|
+
declare function estimateRByFormula(sample: string): 'simple' | 'medium' | 'complex';
|
|
1276
|
+
declare function defaultRByClass(cls: 'simple' | 'medium' | 'complex'): number;
|
|
1277
|
+
declare function recommendNForSamples(formulas: string[], opts?: {
|
|
1278
|
+
H?: number;
|
|
1279
|
+
B?: number;
|
|
1280
|
+
}): number;
|
|
1281
|
+
|
|
1282
|
+
type LanguageIconResolver = (lang: string) => string | undefined | null;
|
|
1283
|
+
declare const languageIconsRevision: vue.ShallowRef<number, number>;
|
|
1284
|
+
declare function setLanguageIconResolver(resolver?: LanguageIconResolver | null): void;
|
|
1285
|
+
declare function normalizeLanguageIdentifier(lang?: string | null): string;
|
|
1286
|
+
declare function resolveMonacoLanguageId(lang?: string | null): string;
|
|
1287
|
+
declare function preloadExtendedLanguageIcons(): Promise<void>;
|
|
1288
|
+
declare function getLanguageIcon(lang: string): string;
|
|
1289
|
+
declare const languageMap: Record<string, string>;
|
|
1290
|
+
|
|
1291
|
+
type LanguageIconMap = Record<string, string>;
|
|
1292
|
+
interface IconTheme {
|
|
1293
|
+
/** Unique identifier, e.g. 'default', 'material' */
|
|
1294
|
+
readonly id: string;
|
|
1295
|
+
/** Core icons — statically imported, always available */
|
|
1296
|
+
readonly core: LanguageIconMap;
|
|
1297
|
+
/** Default/fallback icon SVG string */
|
|
1298
|
+
readonly fallback: string;
|
|
1299
|
+
/** Lazy loader for extended icons. Called at most once; result is cached. */
|
|
1300
|
+
loadExtended?: () => Promise<LanguageIconMap>;
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
declare function registerIconTheme(theme: IconTheme): void;
|
|
1304
|
+
declare function setIconTheme(id: string): void;
|
|
1305
|
+
declare function getRegisteredThemes(): string[];
|
|
1306
|
+
|
|
1307
|
+
/**
|
|
1308
|
+
* Performance monitoring utility for KaTeX rendering
|
|
1309
|
+
* Helps determine if Worker is beneficial in production
|
|
1310
|
+
*/
|
|
1311
|
+
interface RenderMetrics {
|
|
1312
|
+
type: 'worker' | 'direct' | 'cache-hit';
|
|
1313
|
+
duration: number;
|
|
1314
|
+
formulaLength: number;
|
|
1315
|
+
timestamp: number;
|
|
1316
|
+
success: boolean;
|
|
1317
|
+
error?: string;
|
|
1318
|
+
}
|
|
1319
|
+
declare class PerformanceMonitor {
|
|
1320
|
+
private metrics;
|
|
1321
|
+
private enabled;
|
|
1322
|
+
private maxMetrics;
|
|
1323
|
+
enable(): void;
|
|
1324
|
+
disable(): void;
|
|
1325
|
+
recordRender(metrics: RenderMetrics): void;
|
|
1326
|
+
getStats(): {
|
|
1327
|
+
totalRenders: number;
|
|
1328
|
+
cacheHitRate: number;
|
|
1329
|
+
averageWorkerTime: number;
|
|
1330
|
+
averageDirectTime: number;
|
|
1331
|
+
averageCacheHitTime: number;
|
|
1332
|
+
workerSavings: number;
|
|
1333
|
+
recommendation: string;
|
|
1334
|
+
cacheHits?: undefined;
|
|
1335
|
+
workerCalls?: undefined;
|
|
1336
|
+
directCalls?: undefined;
|
|
1337
|
+
} | {
|
|
1338
|
+
totalRenders: number;
|
|
1339
|
+
cacheHits: number;
|
|
1340
|
+
cacheHitRate: string;
|
|
1341
|
+
workerCalls: number;
|
|
1342
|
+
directCalls: number;
|
|
1343
|
+
averageWorkerTime: string;
|
|
1344
|
+
averageDirectTime: string;
|
|
1345
|
+
averageCacheHitTime: string;
|
|
1346
|
+
workerSavings: string;
|
|
1347
|
+
recommendation: string;
|
|
1348
|
+
};
|
|
1349
|
+
printReport(): {
|
|
1350
|
+
totalRenders: number;
|
|
1351
|
+
cacheHitRate: number;
|
|
1352
|
+
averageWorkerTime: number;
|
|
1353
|
+
averageDirectTime: number;
|
|
1354
|
+
averageCacheHitTime: number;
|
|
1355
|
+
workerSavings: number;
|
|
1356
|
+
recommendation: string;
|
|
1357
|
+
cacheHits?: undefined;
|
|
1358
|
+
workerCalls?: undefined;
|
|
1359
|
+
directCalls?: undefined;
|
|
1360
|
+
} | {
|
|
1361
|
+
totalRenders: number;
|
|
1362
|
+
cacheHits: number;
|
|
1363
|
+
cacheHitRate: string;
|
|
1364
|
+
workerCalls: number;
|
|
1365
|
+
directCalls: number;
|
|
1366
|
+
averageWorkerTime: string;
|
|
1367
|
+
averageDirectTime: string;
|
|
1368
|
+
averageCacheHitTime: string;
|
|
1369
|
+
workerSavings: string;
|
|
1370
|
+
recommendation: string;
|
|
1371
|
+
};
|
|
1372
|
+
reset(): void;
|
|
1373
|
+
exportMetrics(): {
|
|
1374
|
+
metrics: RenderMetrics[];
|
|
1375
|
+
stats: {
|
|
1376
|
+
totalRenders: number;
|
|
1377
|
+
cacheHitRate: number;
|
|
1378
|
+
averageWorkerTime: number;
|
|
1379
|
+
averageDirectTime: number;
|
|
1380
|
+
averageCacheHitTime: number;
|
|
1381
|
+
workerSavings: number;
|
|
1382
|
+
recommendation: string;
|
|
1383
|
+
cacheHits?: undefined;
|
|
1384
|
+
workerCalls?: undefined;
|
|
1385
|
+
directCalls?: undefined;
|
|
1386
|
+
} | {
|
|
1387
|
+
totalRenders: number;
|
|
1388
|
+
cacheHits: number;
|
|
1389
|
+
cacheHitRate: string;
|
|
1390
|
+
workerCalls: number;
|
|
1391
|
+
directCalls: number;
|
|
1392
|
+
averageWorkerTime: string;
|
|
1393
|
+
averageDirectTime: string;
|
|
1394
|
+
averageCacheHitTime: string;
|
|
1395
|
+
workerSavings: string;
|
|
1396
|
+
recommendation: string;
|
|
1397
|
+
};
|
|
1398
|
+
timestamp: number;
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
declare const perfMonitor: PerformanceMonitor;
|
|
1402
|
+
declare function enablePerfMonitoring(): void;
|
|
1403
|
+
declare function disablePerfMonitoring(): void;
|
|
1404
|
+
declare function getPerfReport(): {
|
|
1405
|
+
totalRenders: number;
|
|
1406
|
+
cacheHitRate: number;
|
|
1407
|
+
averageWorkerTime: number;
|
|
1408
|
+
averageDirectTime: number;
|
|
1409
|
+
averageCacheHitTime: number;
|
|
1410
|
+
workerSavings: number;
|
|
1411
|
+
recommendation: string;
|
|
1412
|
+
cacheHits?: undefined;
|
|
1413
|
+
workerCalls?: undefined;
|
|
1414
|
+
directCalls?: undefined;
|
|
1415
|
+
} | {
|
|
1416
|
+
totalRenders: number;
|
|
1417
|
+
cacheHits: number;
|
|
1418
|
+
cacheHitRate: string;
|
|
1419
|
+
workerCalls: number;
|
|
1420
|
+
directCalls: number;
|
|
1421
|
+
averageWorkerTime: string;
|
|
1422
|
+
averageDirectTime: string;
|
|
1423
|
+
averageCacheHitTime: string;
|
|
1424
|
+
workerSavings: string;
|
|
1425
|
+
recommendation: string;
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1428
|
+
declare function safeRaf(cb: FrameRequestCallback): any;
|
|
1429
|
+
declare function safeCancelRaf(id: number | null): void;
|
|
1430
|
+
|
|
1431
|
+
type KaTeXCDNWorkerMode = 'classic' | 'module';
|
|
1432
|
+
interface KaTeXCDNWorkerOptions {
|
|
1433
|
+
/**
|
|
1434
|
+
* Where to load KaTeX from inside the worker.
|
|
1435
|
+
* - classic mode: UMD build (used via importScripts)
|
|
1436
|
+
* - module mode: ESM build (used via dynamic import(url))
|
|
1437
|
+
*/
|
|
1438
|
+
katexUrl: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* Optional mhchem plugin URL to load in the worker (recommended).
|
|
1441
|
+
* - classic mode: UMD build (importScripts)
|
|
1442
|
+
* - module mode: ESM build (dynamic import(url))
|
|
1443
|
+
*/
|
|
1444
|
+
mhchemUrl?: string;
|
|
1445
|
+
/**
|
|
1446
|
+
* - classic: widest compatibility, uses importScripts()
|
|
1447
|
+
* - module: requires { type: 'module' } workers, uses import(url)
|
|
1448
|
+
*/
|
|
1449
|
+
mode?: KaTeXCDNWorkerMode;
|
|
1450
|
+
/**
|
|
1451
|
+
* If set, worker prints verbose logs.
|
|
1452
|
+
*/
|
|
1453
|
+
debug?: boolean;
|
|
1454
|
+
/**
|
|
1455
|
+
* Worker constructor options (name/type/credentials).
|
|
1456
|
+
* Note: for module mode you should pass { type: 'module' }.
|
|
1457
|
+
*/
|
|
1458
|
+
workerOptions?: WorkerOptions;
|
|
1459
|
+
/**
|
|
1460
|
+
* KaTeX render options used in the worker.
|
|
1461
|
+
* Keep this minimal and stable for caching and predictable output.
|
|
1462
|
+
*/
|
|
1463
|
+
renderOptions?: {
|
|
1464
|
+
throwOnError?: boolean;
|
|
1465
|
+
output?: string;
|
|
1466
|
+
strict?: string;
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
interface KaTeXCDNWorkerHandle {
|
|
1470
|
+
worker: Worker | null;
|
|
1471
|
+
/**
|
|
1472
|
+
* Revoke the generated Blob URL. Call this when you no longer need the worker.
|
|
1473
|
+
* This does not terminate the worker automatically.
|
|
1474
|
+
*/
|
|
1475
|
+
dispose: () => void;
|
|
1476
|
+
/**
|
|
1477
|
+
* The generated worker source code (useful for debugging/tests).
|
|
1478
|
+
*/
|
|
1479
|
+
source: string;
|
|
1480
|
+
}
|
|
1481
|
+
declare function buildKaTeXCDNWorkerSource(options: KaTeXCDNWorkerOptions): string;
|
|
1482
|
+
declare function createKaTeXWorkerFromCDN(options: KaTeXCDNWorkerOptions): KaTeXCDNWorkerHandle;
|
|
1483
|
+
|
|
1484
|
+
/**
|
|
1485
|
+
* Allow user to inject a Worker instance, e.g. from Vite ?worker import.
|
|
1486
|
+
*/
|
|
1487
|
+
declare function setKaTeXWorker(w: Worker): void;
|
|
1488
|
+
/**
|
|
1489
|
+
* Remove the current worker instance (for cleanup or SSR).
|
|
1490
|
+
*/
|
|
1491
|
+
declare function clearKaTeXWorker(): void;
|
|
1492
|
+
declare function setKaTeXWorkerDebug(enabled: boolean): void;
|
|
1493
|
+
declare function renderKaTeXInWorker(content: string, displayMode?: boolean, timeout?: number, signal?: AbortSignal): Promise<string>;
|
|
1494
|
+
declare function setKaTeXCache(content: string, displayMode: boolean, html: string): void;
|
|
1495
|
+
/**
|
|
1496
|
+
* Utilities for clients to inspect/adjust worker load behavior
|
|
1497
|
+
*/
|
|
1498
|
+
declare function getKaTeXWorkerLoad(): {
|
|
1499
|
+
inFlight: number;
|
|
1500
|
+
max: number;
|
|
1501
|
+
};
|
|
1502
|
+
declare function setKaTeXWorkerMaxConcurrency(n: number): void;
|
|
1503
|
+
declare const WORKER_BUSY_CODE = "WORKER_BUSY";
|
|
1504
|
+
declare function isKaTeXWorkerBusy(): boolean;
|
|
1505
|
+
declare function waitForKaTeXWorkerSlot(timeout?: number, signal?: AbortSignal): Promise<void>;
|
|
1506
|
+
interface BackpressureOptions {
|
|
1507
|
+
timeout?: number;
|
|
1508
|
+
waitTimeout?: number;
|
|
1509
|
+
backoffMs?: number;
|
|
1510
|
+
maxRetries?: number;
|
|
1511
|
+
signal?: AbortSignal;
|
|
1512
|
+
}
|
|
1513
|
+
declare const defaultBackpressure: {
|
|
1514
|
+
timeout: number;
|
|
1515
|
+
waitTimeout: number;
|
|
1516
|
+
backoffMs: number;
|
|
1517
|
+
maxRetries: number;
|
|
1518
|
+
};
|
|
1519
|
+
declare function setKaTeXBackpressureDefaults(opts: Partial<typeof defaultBackpressure>): void;
|
|
1520
|
+
declare function getKaTeXBackpressureDefaults(): {
|
|
1521
|
+
timeout: number;
|
|
1522
|
+
waitTimeout: number;
|
|
1523
|
+
backoffMs: number;
|
|
1524
|
+
maxRetries: number;
|
|
1525
|
+
};
|
|
1526
|
+
/**
|
|
1527
|
+
* Convenience wrapper: when worker reports busy, wait for a slot and retry.
|
|
1528
|
+
* Does not implement fallback-to-main-thread; leave that to the caller.
|
|
1529
|
+
*/
|
|
1530
|
+
declare function renderKaTeXWithBackpressure(content: string, displayMode?: boolean, opts?: BackpressureOptions): Promise<string>;
|
|
1531
|
+
|
|
1532
|
+
type MermaidCDNWorkerMode = 'classic' | 'module';
|
|
1533
|
+
interface MermaidCDNWorkerOptions {
|
|
1534
|
+
/**
|
|
1535
|
+
* Where to load mermaid from inside the worker.
|
|
1536
|
+
* - classic mode: non-module build (used via importScripts)
|
|
1537
|
+
* - module mode: ESM build (used via dynamic import(url))
|
|
1538
|
+
*/
|
|
1539
|
+
mermaidUrl: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* - classic: widest compatibility, uses importScripts()
|
|
1542
|
+
* - module: requires { type: 'module' } workers, uses import(url)
|
|
1543
|
+
*/
|
|
1544
|
+
mode?: MermaidCDNWorkerMode;
|
|
1545
|
+
/**
|
|
1546
|
+
* If set, worker prints verbose logs.
|
|
1547
|
+
*/
|
|
1548
|
+
debug?: boolean;
|
|
1549
|
+
/**
|
|
1550
|
+
* Worker constructor options (name/type/credentials).
|
|
1551
|
+
* Note: for module mode you should pass { type: 'module' }.
|
|
1552
|
+
*/
|
|
1553
|
+
workerOptions?: WorkerOptions;
|
|
1554
|
+
/**
|
|
1555
|
+
* Mermaid initialize options used in the worker.
|
|
1556
|
+
* This worker is used for parsing only; keep options minimal.
|
|
1557
|
+
*/
|
|
1558
|
+
initializeOptions?: Record<string, any>;
|
|
1559
|
+
}
|
|
1560
|
+
interface MermaidCDNWorkerHandle {
|
|
1561
|
+
worker: Worker | null;
|
|
1562
|
+
dispose: () => void;
|
|
1563
|
+
source: string;
|
|
1564
|
+
}
|
|
1565
|
+
declare function buildMermaidCDNWorkerSource(options: MermaidCDNWorkerOptions): string;
|
|
1566
|
+
declare function createMermaidWorkerFromCDN(options: MermaidCDNWorkerOptions): MermaidCDNWorkerHandle;
|
|
1567
|
+
|
|
1568
|
+
type Theme = 'light' | 'dark';
|
|
1569
|
+
declare function setMermaidWorkerClientDebug(enabled: boolean): void;
|
|
1570
|
+
declare function setMermaidWorkerMaxConcurrency(n: number): void;
|
|
1571
|
+
declare function getMermaidWorkerLoad(): {
|
|
1572
|
+
inFlight: number;
|
|
1573
|
+
max: number;
|
|
1574
|
+
};
|
|
1575
|
+
declare const MERMAID_WORKER_BUSY_CODE = "WORKER_BUSY";
|
|
1576
|
+
declare const MERMAID_DISABLED_CODE = "MERMAID_DISABLED";
|
|
1577
|
+
/**
|
|
1578
|
+
* Allow user to inject a Worker instance, e.g. from Vite ?worker import.
|
|
1579
|
+
*/
|
|
1580
|
+
declare function setMermaidWorker(w: Worker): void;
|
|
1581
|
+
/**
|
|
1582
|
+
* Remove the current worker instance (for cleanup or SSR).
|
|
1583
|
+
*/
|
|
1584
|
+
declare function clearMermaidWorker(): void;
|
|
1585
|
+
declare function canParseOffthread(code: string, theme: Theme, timeout?: number): Promise<boolean>;
|
|
1586
|
+
declare function findPrefixOffthread(code: string, theme: Theme, timeout?: number): Promise<string>;
|
|
1587
|
+
declare function terminateWorker(): void;
|
|
1588
|
+
|
|
42
1589
|
declare const CodeBlockNode: {
|
|
43
|
-
new (...args: any[]):
|
|
1590
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<CodeBlockNodeProps & {
|
|
44
1591
|
estimatedHeightPx?: number;
|
|
45
1592
|
estimatedContentHeightPx?: number;
|
|
46
1593
|
}> & Readonly<{
|
|
47
1594
|
onCopy?: (...args: any[]) => any;
|
|
48
1595
|
onPreviewCode?: (...args: any[]) => any;
|
|
49
|
-
}>, {}, {}, {}, {},
|
|
1596
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
50
1597
|
copy: (...args: any[]) => void;
|
|
51
1598
|
previewCode: (...args: any[]) => void;
|
|
52
|
-
},
|
|
1599
|
+
}, vue.PublicProps, {
|
|
53
1600
|
isDark: boolean;
|
|
54
1601
|
loading: boolean;
|
|
55
1602
|
stream: boolean;
|
|
56
|
-
darkTheme:
|
|
57
|
-
lightTheme:
|
|
1603
|
+
darkTheme: CodeBlockMonacoTheme;
|
|
1604
|
+
lightTheme: CodeBlockMonacoTheme;
|
|
58
1605
|
isShowPreview: boolean;
|
|
59
1606
|
enableFontSizeControl: boolean;
|
|
60
1607
|
minWidth: string | number;
|
|
@@ -65,17 +1612,17 @@ declare const CodeBlockNode: {
|
|
|
65
1612
|
showPreviewButton: boolean;
|
|
66
1613
|
showCollapseButton: boolean;
|
|
67
1614
|
showFontSizeButtons: boolean;
|
|
68
|
-
}, false, {}, {},
|
|
1615
|
+
}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {
|
|
69
1616
|
container: HTMLDivElement;
|
|
70
1617
|
codeEditor: HTMLDivElement;
|
|
71
|
-
}, any,
|
|
1618
|
+
}, any, vue.ComponentProvideOptions, {
|
|
72
1619
|
P: {};
|
|
73
1620
|
B: {};
|
|
74
1621
|
D: {};
|
|
75
1622
|
C: {};
|
|
76
1623
|
M: {};
|
|
77
1624
|
Defaults: {};
|
|
78
|
-
}, Readonly<
|
|
1625
|
+
}, Readonly<CodeBlockNodeProps & {
|
|
79
1626
|
estimatedHeightPx?: number;
|
|
80
1627
|
estimatedContentHeightPx?: number;
|
|
81
1628
|
}> & Readonly<{
|
|
@@ -85,8 +1632,8 @@ declare const CodeBlockNode: {
|
|
|
85
1632
|
isDark: boolean;
|
|
86
1633
|
loading: boolean;
|
|
87
1634
|
stream: boolean;
|
|
88
|
-
darkTheme:
|
|
89
|
-
lightTheme:
|
|
1635
|
+
darkTheme: CodeBlockMonacoTheme;
|
|
1636
|
+
lightTheme: CodeBlockMonacoTheme;
|
|
90
1637
|
isShowPreview: boolean;
|
|
91
1638
|
enableFontSizeControl: boolean;
|
|
92
1639
|
minWidth: string | number;
|
|
@@ -101,21 +1648,21 @@ declare const CodeBlockNode: {
|
|
|
101
1648
|
__isFragment?: never;
|
|
102
1649
|
__isTeleport?: never;
|
|
103
1650
|
__isSuspense?: never;
|
|
104
|
-
} &
|
|
1651
|
+
} & vue.ComponentOptionsBase<Readonly<CodeBlockNodeProps & {
|
|
105
1652
|
estimatedHeightPx?: number;
|
|
106
1653
|
estimatedContentHeightPx?: number;
|
|
107
1654
|
}> & Readonly<{
|
|
108
1655
|
onCopy?: (...args: any[]) => any;
|
|
109
1656
|
onPreviewCode?: (...args: any[]) => any;
|
|
110
|
-
}>, {}, {}, {}, {},
|
|
1657
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
111
1658
|
copy: (...args: any[]) => void;
|
|
112
1659
|
previewCode: (...args: any[]) => void;
|
|
113
1660
|
}, string, {
|
|
114
1661
|
isDark: boolean;
|
|
115
1662
|
loading: boolean;
|
|
116
1663
|
stream: boolean;
|
|
117
|
-
darkTheme:
|
|
118
|
-
lightTheme:
|
|
1664
|
+
darkTheme: CodeBlockMonacoTheme;
|
|
1665
|
+
lightTheme: CodeBlockMonacoTheme;
|
|
119
1666
|
isShowPreview: boolean;
|
|
120
1667
|
enableFontSizeControl: boolean;
|
|
121
1668
|
minWidth: string | number;
|
|
@@ -126,7 +1673,7 @@ declare const CodeBlockNode: {
|
|
|
126
1673
|
showPreviewButton: boolean;
|
|
127
1674
|
showCollapseButton: boolean;
|
|
128
1675
|
showFontSizeButtons: boolean;
|
|
129
|
-
}, {}, string, {},
|
|
1676
|
+
}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
130
1677
|
$slots: {
|
|
131
1678
|
'header-left'?(_: {}): any;
|
|
132
1679
|
'header-right'?(_: {}): any;
|
|
@@ -136,24 +1683,24 @@ declare const CodeBlockNode: {
|
|
|
136
1683
|
}): any;
|
|
137
1684
|
};
|
|
138
1685
|
});
|
|
139
|
-
declare const MathBlockNode:
|
|
1686
|
+
declare const MathBlockNode: vue.DefineComponent<MathBlockNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<MathBlockNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
140
1687
|
containerEl: HTMLDivElement;
|
|
141
1688
|
}, HTMLDivElement>;
|
|
142
1689
|
declare const MathInlineNode: {
|
|
143
|
-
new (...args: any[]):
|
|
1690
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<MathInlineNodeProps> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, vue.PublicProps, {}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {
|
|
144
1691
|
containerEl: HTMLSpanElement;
|
|
145
|
-
}, HTMLSpanElement,
|
|
1692
|
+
}, HTMLSpanElement, vue.ComponentProvideOptions, {
|
|
146
1693
|
P: {};
|
|
147
1694
|
B: {};
|
|
148
1695
|
D: {};
|
|
149
1696
|
C: {};
|
|
150
1697
|
M: {};
|
|
151
1698
|
Defaults: {};
|
|
152
|
-
}, Readonly<
|
|
1699
|
+
}, Readonly<MathInlineNodeProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
|
|
153
1700
|
__isFragment?: never;
|
|
154
1701
|
__isTeleport?: never;
|
|
155
1702
|
__isSuspense?: never;
|
|
156
|
-
} &
|
|
1703
|
+
} & vue.ComponentOptionsBase<Readonly<MathInlineNodeProps> & Readonly<{}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, {}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
157
1704
|
$slots: {
|
|
158
1705
|
loading?(_: {
|
|
159
1706
|
isLoading: true;
|
|
@@ -161,17 +1708,17 @@ declare const MathInlineNode: {
|
|
|
161
1708
|
};
|
|
162
1709
|
});
|
|
163
1710
|
declare const MermaidBlockNode: {
|
|
164
|
-
new (...args: any[]):
|
|
1711
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<MermaidBlockNodeProps> & Readonly<{
|
|
165
1712
|
onCopy?: (...args: any[]) => any;
|
|
166
1713
|
onExport?: (...args: any[]) => any;
|
|
167
1714
|
onOpenModal?: (...args: any[]) => any;
|
|
168
1715
|
onToggleMode?: (...args: any[]) => any;
|
|
169
|
-
}>, {}, {}, {}, {},
|
|
1716
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
170
1717
|
copy: (...args: any[]) => void;
|
|
171
1718
|
export: (...args: any[]) => void;
|
|
172
1719
|
openModal: (...args: any[]) => void;
|
|
173
1720
|
toggleMode: (...args: any[]) => void;
|
|
174
|
-
},
|
|
1721
|
+
}, vue.PublicProps, {
|
|
175
1722
|
loading: boolean;
|
|
176
1723
|
showHeader: boolean;
|
|
177
1724
|
showCopyButton: boolean;
|
|
@@ -193,19 +1740,19 @@ declare const MermaidBlockNode: {
|
|
|
193
1740
|
showZoomControls: boolean;
|
|
194
1741
|
enableWheelZoom: boolean;
|
|
195
1742
|
isStrict: boolean;
|
|
196
|
-
}, false, {}, {},
|
|
1743
|
+
}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {
|
|
197
1744
|
modeContainerRef: HTMLDivElement;
|
|
198
1745
|
mermaidContainer: HTMLDivElement;
|
|
199
1746
|
mermaidContent: HTMLDivElement;
|
|
200
1747
|
modalContent: HTMLDivElement;
|
|
201
|
-
}, HTMLDivElement,
|
|
1748
|
+
}, HTMLDivElement, vue.ComponentProvideOptions, {
|
|
202
1749
|
P: {};
|
|
203
1750
|
B: {};
|
|
204
1751
|
D: {};
|
|
205
1752
|
C: {};
|
|
206
1753
|
M: {};
|
|
207
1754
|
Defaults: {};
|
|
208
|
-
}, Readonly<
|
|
1755
|
+
}, Readonly<MermaidBlockNodeProps> & Readonly<{
|
|
209
1756
|
onCopy?: (...args: any[]) => any;
|
|
210
1757
|
onExport?: (...args: any[]) => any;
|
|
211
1758
|
onOpenModal?: (...args: any[]) => any;
|
|
@@ -236,12 +1783,12 @@ declare const MermaidBlockNode: {
|
|
|
236
1783
|
__isFragment?: never;
|
|
237
1784
|
__isTeleport?: never;
|
|
238
1785
|
__isSuspense?: never;
|
|
239
|
-
} &
|
|
1786
|
+
} & vue.ComponentOptionsBase<Readonly<MermaidBlockNodeProps> & Readonly<{
|
|
240
1787
|
onCopy?: (...args: any[]) => any;
|
|
241
1788
|
onExport?: (...args: any[]) => any;
|
|
242
1789
|
onOpenModal?: (...args: any[]) => any;
|
|
243
1790
|
onToggleMode?: (...args: any[]) => any;
|
|
244
|
-
}>, {}, {}, {}, {},
|
|
1791
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
245
1792
|
copy: (...args: any[]) => void;
|
|
246
1793
|
export: (...args: any[]) => void;
|
|
247
1794
|
openModal: (...args: any[]) => void;
|
|
@@ -268,7 +1815,7 @@ declare const MermaidBlockNode: {
|
|
|
268
1815
|
showZoomControls: boolean;
|
|
269
1816
|
enableWheelZoom: boolean;
|
|
270
1817
|
isStrict: boolean;
|
|
271
|
-
}, {}, string, {},
|
|
1818
|
+
}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
272
1819
|
$slots: {
|
|
273
1820
|
'header-left'?(_: {}): any;
|
|
274
1821
|
'header-center'?(_: {}): any;
|
|
@@ -276,15 +1823,15 @@ declare const MermaidBlockNode: {
|
|
|
276
1823
|
};
|
|
277
1824
|
});
|
|
278
1825
|
declare const InfographicBlockNode: {
|
|
279
|
-
new (...args: any[]):
|
|
1826
|
+
new (...args: any[]): vue.CreateComponentPublicInstanceWithMixins<Readonly<InfographicBlockNodeProps> & Readonly<{
|
|
280
1827
|
onCopy?: (...args: any[]) => any;
|
|
281
1828
|
onExport?: (...args: any[]) => any;
|
|
282
1829
|
onOpenModal?: (...args: any[]) => any;
|
|
283
|
-
}>, {}, {}, {}, {},
|
|
1830
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
284
1831
|
copy: (...args: any[]) => void;
|
|
285
1832
|
export: (...args: any[]) => void;
|
|
286
1833
|
openModal: (...args: any[]) => void;
|
|
287
|
-
},
|
|
1834
|
+
}, vue.PublicProps, {
|
|
288
1835
|
loading: boolean;
|
|
289
1836
|
showHeader: boolean;
|
|
290
1837
|
showCopyButton: boolean;
|
|
@@ -294,18 +1841,18 @@ declare const InfographicBlockNode: {
|
|
|
294
1841
|
showExportButton: boolean;
|
|
295
1842
|
showFullscreenButton: boolean;
|
|
296
1843
|
showZoomControls: boolean;
|
|
297
|
-
}, false, {}, {},
|
|
1844
|
+
}, false, {}, {}, vue.GlobalComponents, vue.GlobalDirectives, string, {
|
|
298
1845
|
viewportTarget: HTMLDivElement;
|
|
299
1846
|
infographicContainer: HTMLDivElement;
|
|
300
1847
|
modalContent: HTMLDivElement;
|
|
301
|
-
}, HTMLDivElement,
|
|
1848
|
+
}, HTMLDivElement, vue.ComponentProvideOptions, {
|
|
302
1849
|
P: {};
|
|
303
1850
|
B: {};
|
|
304
1851
|
D: {};
|
|
305
1852
|
C: {};
|
|
306
1853
|
M: {};
|
|
307
1854
|
Defaults: {};
|
|
308
|
-
}, Readonly<
|
|
1855
|
+
}, Readonly<InfographicBlockNodeProps> & Readonly<{
|
|
309
1856
|
onCopy?: (...args: any[]) => any;
|
|
310
1857
|
onExport?: (...args: any[]) => any;
|
|
311
1858
|
onOpenModal?: (...args: any[]) => any;
|
|
@@ -323,11 +1870,11 @@ declare const InfographicBlockNode: {
|
|
|
323
1870
|
__isFragment?: never;
|
|
324
1871
|
__isTeleport?: never;
|
|
325
1872
|
__isSuspense?: never;
|
|
326
|
-
} &
|
|
1873
|
+
} & vue.ComponentOptionsBase<Readonly<InfographicBlockNodeProps> & Readonly<{
|
|
327
1874
|
onCopy?: (...args: any[]) => any;
|
|
328
1875
|
onExport?: (...args: any[]) => any;
|
|
329
1876
|
onOpenModal?: (...args: any[]) => any;
|
|
330
|
-
}>, {}, {}, {}, {},
|
|
1877
|
+
}>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
331
1878
|
copy: (...args: any[]) => void;
|
|
332
1879
|
export: (...args: any[]) => void;
|
|
333
1880
|
openModal: (...args: any[]) => void;
|
|
@@ -341,14 +1888,14 @@ declare const InfographicBlockNode: {
|
|
|
341
1888
|
showExportButton: boolean;
|
|
342
1889
|
showFullscreenButton: boolean;
|
|
343
1890
|
showZoomControls: boolean;
|
|
344
|
-
}, {}, string, {},
|
|
1891
|
+
}, {}, string, {}, vue.GlobalComponents, vue.GlobalDirectives, string, vue.ComponentProvideOptions> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new () => {
|
|
345
1892
|
$slots: {
|
|
346
1893
|
'header-left'?(_: {}): any;
|
|
347
1894
|
'header-center'?(_: {}): any;
|
|
348
1895
|
'header-right'?(_: {}): any;
|
|
349
1896
|
};
|
|
350
1897
|
});
|
|
351
|
-
declare const D2BlockNode:
|
|
1898
|
+
declare const D2BlockNode: vue.DefineComponent<D2BlockNodeProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<D2BlockNodeProps> & Readonly<{}>, {
|
|
352
1899
|
loading: boolean;
|
|
353
1900
|
showHeader: boolean;
|
|
354
1901
|
showCopyButton: boolean;
|
|
@@ -358,24 +1905,14 @@ declare const D2BlockNode: import('vue').DefineComponent<import('./types/types/c
|
|
|
358
1905
|
showExportButton: boolean;
|
|
359
1906
|
progressiveRender: boolean;
|
|
360
1907
|
progressiveIntervalMs: number;
|
|
361
|
-
}, {}, {}, {}, string,
|
|
1908
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {
|
|
362
1909
|
viewportTarget: HTMLDivElement;
|
|
363
1910
|
bodyRef: HTMLDivElement;
|
|
364
1911
|
}, HTMLDivElement>;
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
export
|
|
372
|
-
export * from './types/workers/katexWorkerClient';
|
|
373
|
-
export * from './types/workers/mermaidCdnWorker';
|
|
374
|
-
export * from './types/workers/mermaidWorkerClient';
|
|
375
|
-
export { KATEX_COMMANDS, normalizeStandaloneBackslashT, setDefaultMathOptions } from 'stream-markdown-parser';
|
|
376
|
-
export type { MathOptions } from 'stream-markdown-parser';
|
|
377
|
-
export interface CustomComponents extends MarkstreamCustomComponents {
|
|
378
|
-
}
|
|
379
|
-
export { AdmonitionNode, BlockquoteNode, CheckboxNode, clearGlobalCustomComponents, CodeBlockNode, D2BlockNode, DefinitionListNode, disableD2, disableKatex, disableMermaid, EmojiNode, EmphasisNode, enableD2, enableKatex, enableMermaid, FootnoteAnchorNode, FootnoteNode, FootnoteReferenceNode, getCustomNodeComponents, HardBreakNode, HeadingNode, HighlightNode, HtmlBlockNode, HtmlInlineNode, ImageNode, InfographicBlockNode, InlineCodeNode, InsertNode, isD2Enabled, isKatexEnabled, isMermaidEnabled, LinkNode, ListItemNode, ListNode, MarkdownCodeBlockNode, MarkdownRender, MathBlockNode, MathInlineNode, MermaidBlockNode, ParagraphNode, PreCodeNode, ReferenceNode, removeCustomComponents, setCustomComponents, setD2Loader, setDefaultI18nMap, setKatexLoader, setMermaidLoader, StrikethroughNode, StrongNode, SubscriptNode, SuperscriptNode, TableNode, TextNode, ThematicBreakNode, Tooltip, VmrContainerNode, };
|
|
380
|
-
export default MarkdownRender;
|
|
381
|
-
export declare const VueRendererMarkdown: Plugin;
|
|
1912
|
+
|
|
1913
|
+
interface CustomComponents extends CustomComponents$1 {
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
declare const VueRendererMarkdown: Plugin;
|
|
1917
|
+
|
|
1918
|
+
export { _default$w as AdmonitionNode, BackpressureOptions, _default$v as BlockquoteNode, _default$u as CheckboxNode, CodeBlockDiffAppearance, CodeBlockDiffHideUnchangedRegions, CodeBlockDiffHideUnchangedRegionsOptions, CodeBlockDiffHunkActionContext, CodeBlockDiffHunkActionKind, CodeBlockDiffHunkSide, CodeBlockDiffLineStyle, CodeBlockDiffUnchangedRegionStyle, CodeBlockMonacoLanguage, CodeBlockMonacoOptions, CodeBlockMonacoTheme, CodeBlockMonacoThemeObject, CodeBlockNode, CodeBlockNodeProps, CodeBlockThemeProp, CustomComponents, D2BlockNode, D2BlockNodeProps, D2Loader, _default$t as DefinitionListNode, _default$s as EmojiNode, _default$r as EmphasisNode, _default$q as FootnoteAnchorNode, _default$p as FootnoteNode, _default$o as FootnoteReferenceNode, _default$n as HardBreakNode, _HeadingNode as HeadingNode, _default$m as HighlightNode, _default$l as HtmlBlockNode, _default$k as HtmlInlineNode, IconTheme, _default$j as ImageNode, ImageNodeProps, InfographicBlockNode, InfographicBlockNodeProps, _default$i as InlineCodeNode, _default$h as InsertNode, KaTeXCDNWorkerHandle, KaTeXCDNWorkerMode, KaTeXCDNWorkerOptions, KatexLoader, LanguageIconResolver, _default$g as LinkNode, LinkNodeProps, _default$f as ListItemNode, _default$e as ListNode, MERMAID_DISABLED_CODE, MERMAID_WORKER_BUSY_CODE, _default$d as MarkdownCodeBlockNode, _default$c as MarkdownRender, MathBlockNode, MathBlockNodeProps, MathInlineNode, MathInlineNodeProps, MermaidBlockEvent, MermaidBlockNode, MermaidBlockNodeProps, MermaidCDNWorkerHandle, MermaidCDNWorkerMode, MermaidCDNWorkerOptions, MermaidLoader, MonacoDiffEditorViewLike, MonacoDiffLineChangeLike, MonacoDisposableLike, MonacoEditorViewLike, MonacoHelpers, MonacoModelLike, MonacoModule, MonacoNamespaceLike, MonacoRuntimeOptions, NodeRendererProps, _default$b as ParagraphNode, _default$a as PreCodeNode, PreCodeNodeProps, _default$9 as ReferenceNode, _default$8 as StrikethroughNode, _default$7 as StrongNode, _default$6 as SubscriptNode, _default$5 as SuperscriptNode, _default$4 as TableNode, _default$3 as TextNode, _default$2 as ThematicBreakNode, ThresholdInput, _default$1 as Tooltip, _default as VmrContainerNode, VueRendererMarkdown, WORKER_BUSY_CODE, buildKaTeXCDNWorkerSource, buildMermaidCDNWorkerSource, canParseOffthread, clearGlobalCustomComponents, clearKaTeXWorker, clearMermaidWorker, createKaTeXWorkerFromCDN, createMermaidWorkerFromCDN, _default$c as default, defaultRByClass, disableD2, disableKatex, disableMermaid, disablePerfMonitoring, enableD2, enableKatex, enableMermaid, enablePerfMonitoring, estimateRByFormula, findPrefixOffthread, getCustomNodeComponents, getKaTeXBackpressureDefaults, getKaTeXWorkerLoad, getLanguageIcon, getMermaidWorkerLoad, getPerfReport, getRegisteredThemes, getUseMonaco, isD2Enabled, isKaTeXWorkerBusy, isKatexEnabled, isMermaidEnabled, languageIconsRevision, languageMap, normalizeLanguageIdentifier, perfMonitor, preloadExtendedLanguageIcons, recommendNForSamples, recommendWorkerThreshold, registerIconTheme, removeCustomComponents, renderKaTeXInWorker, renderKaTeXWithBackpressure, resolveMonacoLanguageId, safeCancelRaf, safeRaf, setCustomComponents, setD2Loader, setDefaultI18nMap, setIconTheme, setKaTeXBackpressureDefaults, setKaTeXCache, setKaTeXWorker, setKaTeXWorkerDebug, setKaTeXWorkerMaxConcurrency, setKatexLoader, setLanguageIconResolver, setMermaidLoader, setMermaidWorker, setMermaidWorkerClientDebug, setMermaidWorkerMaxConcurrency, terminateWorker, waitForKaTeXWorkerSlot };
|