@incremark/react 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IncremarkParserOptions, AnimationEffect, TransformerPlugin, ParsedBlock
|
|
|
2
2
|
export { AnimationEffect, BlockTransformer, DisplayBlock, IncrementalUpdate, ParsedBlock, ParserOptions, Root, RootContent, SourceBlock, TransformerOptions, TransformerPlugin, TransformerState, allPlugins, cloneNode, codeBlockPlugin, countChars, createBlockTransformer, createPlugin, defaultPlugins, imagePlugin, mathPlugin, mermaidPlugin, sliceAst, thematicBreakPlugin } from '@incremark/core';
|
|
3
3
|
import React$1, { ReactNode, ComponentType } from 'react';
|
|
4
4
|
import { Definition, FootnoteDefinition, RootContent, PhrasingContent } from 'mdast';
|
|
5
|
+
export { Blockquote, Code, Definition, FootnoteDefinition, HTML, Heading, Image, ImageReference, InlineCode, Link, LinkReference, List, ListItem, Root as MdastRoot, Paragraph, Parent, PhrasingContent, Table, TableCell, Text, ThematicBreak } from 'mdast';
|
|
5
6
|
import * as _incremark_devtools from '@incremark/devtools';
|
|
6
7
|
import { DevToolsOptions } from '@incremark/devtools';
|
|
7
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -799,7 +799,7 @@ import { useState as useState5, useEffect as useEffect5, useRef as useRef5, useC
|
|
|
799
799
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
800
800
|
var IncremarkMath = ({
|
|
801
801
|
node,
|
|
802
|
-
renderDelay =
|
|
802
|
+
renderDelay = 0
|
|
803
803
|
}) => {
|
|
804
804
|
const [renderedHtml, setRenderedHtml] = useState5("");
|
|
805
805
|
const [isLoading, setIsLoading] = useState5(false);
|
|
@@ -1985,7 +1985,7 @@ var CachedCodeRenderer = forwardRef(
|
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
}, [code, hasStreamError]);
|
|
1988
|
-
if (hasStreamError) {
|
|
1988
|
+
if (hasStreamError || tokens.length === 0) {
|
|
1989
1989
|
return /* @__PURE__ */ jsx10("pre", { className: "shiki incremark-code-stream", children: /* @__PURE__ */ jsx10("code", { children: code }) });
|
|
1990
1990
|
}
|
|
1991
1991
|
return /* @__PURE__ */ jsx10("pre", { className: "shiki incremark-code-stream", children: /* @__PURE__ */ jsx10("code", { children: tokens.map((token) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incremark/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "High-performance streaming markdown renderer for React ecosystem.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"mermaid": "^10.0.0 || ^11.0.0",
|
|
22
22
|
"katex": "^0.16.0",
|
|
23
23
|
"react": ">=18.0.0",
|
|
24
|
-
"@incremark/core": "0.3.
|
|
24
|
+
"@incremark/core": "0.3.3"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@antfu/utils": "^9.3.0",
|
|
28
28
|
"shiki": "^3.20.0",
|
|
29
29
|
"shiki-stream": "^0.1.4",
|
|
30
|
-
"@incremark/
|
|
31
|
-
"@incremark/
|
|
32
|
-
"@incremark/
|
|
33
|
-
"@incremark/
|
|
30
|
+
"@incremark/devtools": "0.3.3",
|
|
31
|
+
"@incremark/icons": "0.3.3",
|
|
32
|
+
"@incremark/theme": "0.3.3",
|
|
33
|
+
"@incremark/shared": "0.3.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@shikijs/core": "^3.21.0",
|