@stream-mdx/react 0.2.0 → 0.4.0
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 +4 -3
- package/dist/components/index.cjs +8 -4
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.mjs +8 -4
- package/dist/{index-D0akq48G.d.cts → index-D2MYusAM.d.cts} +4 -1
- package/dist/{index-D0akq48G.d.ts → index-D2MYusAM.d.ts} +4 -1
- package/dist/index.cjs +2543 -2522
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2757 -2736
- package/dist/renderer/node-views.cjs +4 -0
- package/dist/renderer/node-views.d.cts +1 -1
- package/dist/renderer/node-views.d.ts +1 -1
- package/dist/renderer/node-views.mjs +4 -0
- package/dist/renderer.cjs +2740 -2719
- package/dist/renderer.d.cts +13 -12
- package/dist/renderer.d.ts +13 -12
- package/dist/renderer.mjs +2749 -2728
- package/dist/server.cjs +4244 -0
- package/dist/server.d.cts +249 -0
- package/dist/server.d.ts +249 -0
- package/dist/server.mjs +4226 -0
- package/dist/{streaming-markdown-Ch6PwjAa.d.cts → streaming-markdown-D-JcByd9.d.cts} +4 -1
- package/dist/{streaming-markdown-tca-Mf8D.d.ts → streaming-markdown-DOc2uLiP.d.ts} +4 -1
- package/dist/streaming-markdown.cjs +2793 -2772
- package/dist/streaming-markdown.d.cts +2 -2
- package/dist/streaming-markdown.d.ts +2 -2
- package/dist/streaming-markdown.mjs +2759 -2738
- package/dist/utils/inline-html.d.cts +1 -1
- package/dist/utils/inline-html.d.ts +1 -1
- package/package.json +8 -3
|
@@ -1534,6 +1534,10 @@ var CodeBlockView = import_react8.default.memo(({ store, blockId, registry }) =>
|
|
|
1534
1534
|
return node.block.payload.highlightedHtml;
|
|
1535
1535
|
}
|
|
1536
1536
|
if (lines.length > 0) {
|
|
1537
|
+
const hasLineHtml = lines.some((line) => typeof line.html === "string" && line.html.length > 0);
|
|
1538
|
+
if (!hasLineHtml && node.block?.payload.highlightedHtml) {
|
|
1539
|
+
return node.block.payload.highlightedHtml;
|
|
1540
|
+
}
|
|
1537
1541
|
if (shouldVirtualize) {
|
|
1538
1542
|
return composeHighlightedHtml(virtualization.window.visibleLines, preAttrs, codeAttrs);
|
|
1539
1543
|
}
|
|
@@ -1509,6 +1509,10 @@ var CodeBlockView = React5.memo(({ store, blockId, registry }) => {
|
|
|
1509
1509
|
return node.block.payload.highlightedHtml;
|
|
1510
1510
|
}
|
|
1511
1511
|
if (lines.length > 0) {
|
|
1512
|
+
const hasLineHtml = lines.some((line) => typeof line.html === "string" && line.html.length > 0);
|
|
1513
|
+
if (!hasLineHtml && node.block?.payload.highlightedHtml) {
|
|
1514
|
+
return node.block.payload.highlightedHtml;
|
|
1515
|
+
}
|
|
1512
1516
|
if (shouldVirtualize) {
|
|
1513
1517
|
return composeHighlightedHtml(virtualization.window.visibleLines, preAttrs, codeAttrs);
|
|
1514
1518
|
}
|