@octanejs/streamdown 0.1.41 → 0.1.43
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/client/chunks/{chunk-BZ3EPYN5.js → chunk-2AYEXR7J.js} +60 -60
- package/dist/client/chunks/{highlighted-body-YMSJOAAW.js → highlighted-body-A6GZWVZM.js} +2 -2
- package/dist/{server/chunks/mermaid-2V227HSV.js → client/chunks/mermaid-DWIHGMIY.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/server/chunks/{chunk-GRC6QORD.js → chunk-I47FP67C.js} +60 -60
- package/dist/server/chunks/{highlighted-body-QPG662A4.js → highlighted-body-B55AKMAD.js} +2 -2
- package/dist/{client/chunks/mermaid-TMTPUHUW.js → server/chunks/mermaid-44UWZQZF.js} +1 -1
- package/dist/server/index.js +1 -1
- package/dist/types/hooks/use-deferred-render.d.ts +12 -12
- package/dist/types/index.d.ts +17 -17
- package/dist/types/lib/components.d.ts +1 -1
- package/package.json +5 -5
|
@@ -655,7 +655,7 @@ var trimTrailingNewlines = (str) => {
|
|
|
655
655
|
}
|
|
656
656
|
return str.slice(0, end);
|
|
657
657
|
};
|
|
658
|
-
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-
|
|
658
|
+
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-A6GZWVZM.js").then((mod) => ({ default: mod.HighlightedCodeBlockBody })));
|
|
659
659
|
var CodeBlock = ({
|
|
660
660
|
code,
|
|
661
661
|
language,
|
|
@@ -693,7 +693,7 @@ var CodeBlock = ({
|
|
|
693
693
|
CodeBlockContainer,
|
|
694
694
|
{ isIncomplete, language },
|
|
695
695
|
() => _$positionalChildren([
|
|
696
|
-
_$createScopedValue4(() => _$createElementFromConfig("c:
|
|
696
|
+
_$createScopedValue4(() => _$createElementFromConfig("c:c6187711", CodeBlockHeader, { language })),
|
|
697
697
|
children ? _$createScopedValue4(() => _$createScopedElement3(
|
|
698
698
|
"div",
|
|
699
699
|
{
|
|
@@ -711,7 +711,7 @@ var CodeBlock = ({
|
|
|
711
711
|
_$createScopedValue4(() => _$createScopedElement3(
|
|
712
712
|
Suspense,
|
|
713
713
|
{
|
|
714
|
-
fallback: _$createScopedValue4(() => _$createElementFromConfig("c:
|
|
714
|
+
fallback: _$createScopedValue4(() => _$createElementFromConfig("c:983e10df", CodeBlockBody, {
|
|
715
715
|
className,
|
|
716
716
|
language,
|
|
717
717
|
lineNumbers,
|
|
@@ -720,7 +720,7 @@ var CodeBlock = ({
|
|
|
720
720
|
...rest
|
|
721
721
|
}))
|
|
722
722
|
},
|
|
723
|
-
() => _$createScopedValue4(() => _$createElementFromConfig("c:
|
|
723
|
+
() => _$createScopedValue4(() => _$createElementFromConfig("c:8cd7c3c7", HighlightedCodeBlockBody, {
|
|
724
724
|
className,
|
|
725
725
|
code: trimmedCode,
|
|
726
726
|
language,
|
|
@@ -729,12 +729,12 @@ var CodeBlock = ({
|
|
|
729
729
|
startLine,
|
|
730
730
|
...rest
|
|
731
731
|
})),
|
|
732
|
-
"c:
|
|
732
|
+
"c:08b85a99"
|
|
733
733
|
))
|
|
734
734
|
]),
|
|
735
|
-
"c:
|
|
735
|
+
"c:21f13952"
|
|
736
736
|
)),
|
|
737
|
-
"c:
|
|
737
|
+
"c:24a175f6"
|
|
738
738
|
));
|
|
739
739
|
};
|
|
740
740
|
|
|
@@ -1132,7 +1132,7 @@ var CodeBlockCopyButton = ({
|
|
|
1132
1132
|
type: "button",
|
|
1133
1133
|
...props
|
|
1134
1134
|
},
|
|
1135
|
-
() => children ?? _$createElementFromConfig2("c:
|
|
1135
|
+
() => children ?? _$createElementFromConfig2("c:22ced093", Icon, { size: 14 })
|
|
1136
1136
|
));
|
|
1137
1137
|
};
|
|
1138
1138
|
|
|
@@ -1499,7 +1499,7 @@ var CodeBlockDownloadButton = ({
|
|
|
1499
1499
|
type: "button",
|
|
1500
1500
|
...props
|
|
1501
1501
|
},
|
|
1502
|
-
() => children ?? _$createScopedValue8(() => _$createElementFromConfig3("c:
|
|
1502
|
+
() => children ?? _$createScopedValue8(() => _$createElementFromConfig3("c:10f97a77", icons.DownloadIcon, { size: 14 }))
|
|
1503
1503
|
));
|
|
1504
1504
|
};
|
|
1505
1505
|
|
|
@@ -1528,7 +1528,7 @@ var CodeBlockSkeleton = () => {
|
|
|
1528
1528
|
},
|
|
1529
1529
|
() => _$positionalChildren2([
|
|
1530
1530
|
_$createScopedValue9(() => _$createHostElement3("div", { className: cn2("h-[46px] w-full bg-muted/80") })),
|
|
1531
|
-
_$createScopedValue9(() => _$createScopedElement7("div", { className: cn2("flex w-full items-center justify-center p-4") }, () => _$createScopedValue9(() => _$createElementFromConfig4("c:
|
|
1531
|
+
_$createScopedValue9(() => _$createScopedElement7("div", { className: cn2("flex w-full items-center justify-center p-4") }, () => _$createScopedValue9(() => _$createElementFromConfig4("c:fec3914b", Loader2Icon2, { className: cn2("size-4 animate-spin") }))))
|
|
1532
1532
|
])
|
|
1533
1533
|
));
|
|
1534
1534
|
};
|
|
@@ -1689,7 +1689,7 @@ var ImageComponent = ({
|
|
|
1689
1689
|
title: t.downloadImage,
|
|
1690
1690
|
type: "button"
|
|
1691
1691
|
},
|
|
1692
|
-
() => _$createElementFromConfig5("c:
|
|
1692
|
+
() => _$createElementFromConfig5("c:b9480d23", DownloadIcon2, { size: 14 })
|
|
1693
1693
|
))
|
|
1694
1694
|
])
|
|
1695
1695
|
));
|
|
@@ -1850,10 +1850,10 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
|
|
|
1850
1850
|
type: "button"
|
|
1851
1851
|
},
|
|
1852
1852
|
() => copied ? _$createScopedElement9(_$Fragment, {}, () => _$positionalChildren4([
|
|
1853
|
-
_$createElementFromConfig6("c:
|
|
1853
|
+
_$createElementFromConfig6("c:e389f6c3", CheckIcon2, { size: 14 }),
|
|
1854
1854
|
_$createScopedElement9("span", {}, () => t.copied)
|
|
1855
1855
|
])) : _$createScopedElement9(_$Fragment, {}, () => _$positionalChildren4([
|
|
1856
|
-
_$createElementFromConfig6("c:
|
|
1856
|
+
_$createElementFromConfig6("c:0ddacc99", CopyIcon2, { size: 14 }),
|
|
1857
1857
|
_$createScopedElement9("span", {}, () => t.copyLink)
|
|
1858
1858
|
]))
|
|
1859
1859
|
)),
|
|
@@ -1865,7 +1865,7 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
|
|
|
1865
1865
|
type: "button"
|
|
1866
1866
|
},
|
|
1867
1867
|
() => _$positionalChildren4([
|
|
1868
|
-
_$createElementFromConfig6("c:
|
|
1868
|
+
_$createElementFromConfig6("c:abc70429", ExternalLinkIcon2, { size: 14 }),
|
|
1869
1869
|
_$createScopedElement9("span", {}, () => t.openLink)
|
|
1870
1870
|
])
|
|
1871
1871
|
))
|
|
@@ -2041,7 +2041,7 @@ var MermaidDownloadDropdown = ({ chart, children, className, onDownload, config,
|
|
|
2041
2041
|
title: t.downloadDiagram,
|
|
2042
2042
|
type: "button"
|
|
2043
2043
|
},
|
|
2044
|
-
() => children ?? _$createScopedValue12(() => _$createElementFromConfig7("c:
|
|
2044
|
+
() => children ?? _$createScopedValue12(() => _$createElementFromConfig7("c:5351371a", icons.DownloadIcon, { size: 14 }))
|
|
2045
2045
|
)),
|
|
2046
2046
|
isOpen ? _$createScopedValue12(() => _$createScopedElement10(
|
|
2047
2047
|
"div",
|
|
@@ -2172,7 +2172,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2172
2172
|
type: "button",
|
|
2173
2173
|
...props
|
|
2174
2174
|
},
|
|
2175
|
-
() => _$createElementFromConfig8("c:
|
|
2175
|
+
() => _$createElementFromConfig8("c:139080f4", Maximize2Icon2, { size: 14 })
|
|
2176
2176
|
)),
|
|
2177
2177
|
isFullscreen ? /* @__PURE__ */ createPortal(
|
|
2178
2178
|
_$createScopedValue13(() => _$createScopedElement11(
|
|
@@ -2197,7 +2197,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2197
2197
|
title: t.exitFullscreen,
|
|
2198
2198
|
type: "button"
|
|
2199
2199
|
},
|
|
2200
|
-
() => _$createElementFromConfig8("c:
|
|
2200
|
+
() => _$createElementFromConfig8("c:a4287e1a", XIcon2, { size: 20 })
|
|
2201
2201
|
)),
|
|
2202
2202
|
_$createScopedValue13(() => _$createScopedElement11(
|
|
2203
2203
|
"div",
|
|
@@ -2207,7 +2207,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2207
2207
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2208
2208
|
role: "presentation"
|
|
2209
2209
|
},
|
|
2210
|
-
() => _$createScopedValue13(() => _$createElementFromConfig8("c:
|
|
2210
|
+
() => _$createScopedValue13(() => _$createElementFromConfig8("c:6459f4e2", Mermaid, {
|
|
2211
2211
|
chart,
|
|
2212
2212
|
className: cn2("size-full [&_svg]:h-auto [&_svg]:w-auto"),
|
|
2213
2213
|
config,
|
|
@@ -2481,7 +2481,7 @@ var TableCopyDropdown = ({ children, className, onCopy, onError, timeout = 2e3 }
|
|
|
2481
2481
|
title: t.copyTable,
|
|
2482
2482
|
type: "button"
|
|
2483
2483
|
},
|
|
2484
|
-
() => children ?? _$createElementFromConfig9("c:
|
|
2484
|
+
() => children ?? _$createElementFromConfig9("c:3efe74da", Icon, { height: 14, width: 14 })
|
|
2485
2485
|
)),
|
|
2486
2486
|
isOpen ? _$createScopedValue14(() => _$createScopedElement12(
|
|
2487
2487
|
"div",
|
|
@@ -2601,7 +2601,7 @@ var TableDownloadButton = ({
|
|
|
2601
2601
|
title: format === "csv" ? t.downloadTableAsCsv : t.downloadTableAsMarkdown,
|
|
2602
2602
|
type: "button"
|
|
2603
2603
|
},
|
|
2604
|
-
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:
|
|
2604
|
+
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:400aafbe", icons.DownloadIcon, { size: 14 }))
|
|
2605
2605
|
));
|
|
2606
2606
|
};
|
|
2607
2607
|
var TableDownloadDropdown = ({ children, className, onDownload, onError }) => {
|
|
@@ -2656,7 +2656,7 @@ var TableDownloadDropdown = ({ children, className, onDownload, onError }) => {
|
|
|
2656
2656
|
title: t.downloadTable,
|
|
2657
2657
|
type: "button"
|
|
2658
2658
|
},
|
|
2659
|
-
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:
|
|
2659
|
+
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:c335522d", icons.DownloadIcon, { size: 14 }))
|
|
2660
2660
|
)),
|
|
2661
2661
|
isOpen ? _$createScopedValue15(() => _$createScopedElement13(
|
|
2662
2662
|
"div",
|
|
@@ -2750,7 +2750,7 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2750
2750
|
title: t.viewFullscreen,
|
|
2751
2751
|
type: "button"
|
|
2752
2752
|
},
|
|
2753
|
-
() => _$createElementFromConfig11("c:
|
|
2753
|
+
() => _$createElementFromConfig11("c:821be74a", Maximize2Icon2, { size: 14 })
|
|
2754
2754
|
)),
|
|
2755
2755
|
isFullscreen ? /* @__PURE__ */ createPortal2(
|
|
2756
2756
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
@@ -2778,8 +2778,8 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2778
2778
|
},
|
|
2779
2779
|
() => _$positionalChildren9([
|
|
2780
2780
|
_$createScopedValue16(() => _$createScopedElement14("div", { className: cn2("flex items-center justify-end gap-1 p-4") }, () => _$positionalChildren9([
|
|
2781
|
-
showCopy ? _$createElementFromConfig11("c:
|
|
2782
|
-
showDownload ? _$createElementFromConfig11("c:
|
|
2781
|
+
showCopy ? _$createElementFromConfig11("c:270c351e", TableCopyDropdown, {}) : null,
|
|
2782
|
+
showDownload ? _$createElementFromConfig11("c:3123815a", TableDownloadDropdown, {}) : null,
|
|
2783
2783
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
2784
2784
|
"button",
|
|
2785
2785
|
{
|
|
@@ -2788,7 +2788,7 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2788
2788
|
title: t.exitFullscreen,
|
|
2789
2789
|
type: "button"
|
|
2790
2790
|
},
|
|
2791
|
-
() => _$createElementFromConfig11("c:
|
|
2791
|
+
() => _$createElementFromConfig11("c:58e6c9c7", XIcon2, { size: 20 })
|
|
2792
2792
|
))
|
|
2793
2793
|
]))),
|
|
2794
2794
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
@@ -2841,7 +2841,7 @@ var Table = ({
|
|
|
2841
2841
|
hasAnyControl ? _$createScopedValue17(() => _$createScopedElement15("div", { className: cn2("flex items-center justify-end gap-1") }, () => _$positionalChildren10([
|
|
2842
2842
|
hasCopy ? _$createElementFromConfig12("c:ab0b713f", TableCopyDropdown, {}) : null,
|
|
2843
2843
|
hasDownload ? _$createElementFromConfig12("c:c7fc1643", TableDownloadDropdown, {}) : null,
|
|
2844
|
-
hasFullscreen ? _$createScopedValue17(() => _$createScopedElement15(TableFullscreenButton, { showCopy: hasCopy, showDownload: hasDownload }, () => children, "c:
|
|
2844
|
+
hasFullscreen ? _$createScopedValue17(() => _$createScopedElement15(TableFullscreenButton, { showCopy: hasCopy, showDownload: hasDownload }, () => children, "c:5f47f3f9")) : null
|
|
2845
2845
|
]))) : null,
|
|
2846
2846
|
_$createScopedValue17(() => _$createScopedElement15(
|
|
2847
2847
|
"div",
|
|
@@ -2896,7 +2896,7 @@ var _h$262 = /* @__PURE__ */ Symbol(_hs$19 + 26);
|
|
|
2896
2896
|
var _h$272 = /* @__PURE__ */ Symbol(_hs$19 + 27);
|
|
2897
2897
|
var START_LINE_PATTERN = /startLine=(\d+)/;
|
|
2898
2898
|
var NO_LINE_NUMBERS_PATTERN = /\bnoLineNumbers\b/;
|
|
2899
|
-
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-
|
|
2899
|
+
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-DWIHGMIY.js").then((mod) => ({ default: mod.Mermaid })));
|
|
2900
2900
|
var LANGUAGE_REGEX = /language-([^\s]+)/;
|
|
2901
2901
|
function sameNodePosition(prev, next) {
|
|
2902
2902
|
if (!(prev?.position || next?.position)) {
|
|
@@ -3092,7 +3092,7 @@ var LinkComponent = ({ children, className, href, node, ...props }) => {
|
|
|
3092
3092
|
},
|
|
3093
3093
|
() => children
|
|
3094
3094
|
)),
|
|
3095
|
-
linkSafety.renderModal ? linkSafety.renderModal(modalProps) : _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3095
|
+
linkSafety.renderModal ? linkSafety.renderModal(modalProps) : _$createScopedValue18(() => _$createElementFromConfig13("c:4d70554d", LinkSafetyModal, { ...modalProps }))
|
|
3096
3096
|
]));
|
|
3097
3097
|
}
|
|
3098
3098
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
@@ -3225,7 +3225,7 @@ var MemoTable = /* @__PURE__ */ memo2(
|
|
|
3225
3225
|
...props
|
|
3226
3226
|
},
|
|
3227
3227
|
() => children,
|
|
3228
|
-
"c:
|
|
3228
|
+
"c:914e0089"
|
|
3229
3229
|
));
|
|
3230
3230
|
},
|
|
3231
3231
|
(p, n) => sameClassAndNode(p, n)
|
|
@@ -3464,15 +3464,15 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3464
3464
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
3465
3465
|
Suspense2,
|
|
3466
3466
|
{
|
|
3467
|
-
fallback: _$createElementFromConfig13("c:
|
|
3467
|
+
fallback: _$createElementFromConfig13("c:e609faab", CodeBlockSkeleton, {})
|
|
3468
3468
|
},
|
|
3469
|
-
() => _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3469
|
+
() => _$createScopedValue18(() => _$createElementFromConfig13("c:ac373e28", CustomComponent, {
|
|
3470
3470
|
code,
|
|
3471
3471
|
isIncomplete: isBlockIncomplete,
|
|
3472
3472
|
language,
|
|
3473
3473
|
meta: metastring
|
|
3474
3474
|
})),
|
|
3475
|
-
"c:
|
|
3475
|
+
"c:7af44593"
|
|
3476
3476
|
));
|
|
3477
3477
|
}
|
|
3478
3478
|
if (language === "mermaid" && mermaidPlugin) {
|
|
@@ -3485,7 +3485,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3485
3485
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
3486
3486
|
Suspense2,
|
|
3487
3487
|
{
|
|
3488
|
-
fallback: _$createElementFromConfig13("c:
|
|
3488
|
+
fallback: _$createElementFromConfig13("c:ef4f5e7a", CodeBlockSkeleton, {})
|
|
3489
3489
|
},
|
|
3490
3490
|
() => _$createScopedValue18(() => _$createScopedElement16(
|
|
3491
3491
|
"div",
|
|
@@ -3513,9 +3513,9 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3513
3513
|
"data-streamdown": "mermaid-block-actions"
|
|
3514
3514
|
},
|
|
3515
3515
|
() => _$positionalChildren11([
|
|
3516
|
-
showDownload2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3517
|
-
showCopy2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3518
|
-
showFullscreen ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3516
|
+
showDownload2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:c48a59b4", MermaidDownloadDropdown, { chart: code, config: mermaidContext?.config })) : null,
|
|
3517
|
+
showCopy2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:ad930fad", CodeBlockCopyButton, { code })) : null,
|
|
3518
|
+
showFullscreen ? _$createScopedValue18(() => _$createElementFromConfig13("c:67e03c37", MermaidFullscreenButton, { chart: code, config: mermaidContext?.config })) : null
|
|
3519
3519
|
])
|
|
3520
3520
|
))
|
|
3521
3521
|
)) : null,
|
|
@@ -3524,7 +3524,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3524
3524
|
{
|
|
3525
3525
|
className: cn2("rounded-md border border-border bg-background")
|
|
3526
3526
|
},
|
|
3527
|
-
() => _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3527
|
+
() => _$createScopedValue18(() => _$createElementFromConfig13("c:5a2446a4", Mermaid2, {
|
|
3528
3528
|
chart: code,
|
|
3529
3529
|
config: mermaidContext?.config,
|
|
3530
3530
|
showControls: showPanZoomControls
|
|
@@ -3532,7 +3532,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3532
3532
|
))
|
|
3533
3533
|
])
|
|
3534
3534
|
)),
|
|
3535
|
-
"c:
|
|
3535
|
+
"c:d15fcedc"
|
|
3536
3536
|
));
|
|
3537
3537
|
}
|
|
3538
3538
|
const showCodeControls = shouldShowControls(controlsConfig, "code");
|
|
@@ -3550,10 +3550,10 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3550
3550
|
startLine
|
|
3551
3551
|
},
|
|
3552
3552
|
() => shouldShowCodeControls ? _$createScopedElement16(_$Fragment4, {}, () => _$positionalChildren11([
|
|
3553
|
-
showDownload ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3554
|
-
showCopy ? _$createElementFromConfig13("c:
|
|
3553
|
+
showDownload ? _$createScopedValue18(() => _$createElementFromConfig13("c:24ccf80c", CodeBlockDownloadButton, { code, language })) : null,
|
|
3554
|
+
showCopy ? _$createElementFromConfig13("c:d86969ef", CodeBlockCopyButton, {}) : null
|
|
3555
3555
|
])) : null,
|
|
3556
|
-
"c:
|
|
3556
|
+
"c:e81b8b3b"
|
|
3557
3557
|
));
|
|
3558
3558
|
};
|
|
3559
3559
|
var MemoCode = /* @__PURE__ */ memo2(CodeComponent, (p, n) => p.className === n.className && sameNodePosition(p.node, n.node));
|
|
@@ -4189,12 +4189,12 @@ var Block = /* @__PURE__ */ memo3(({
|
|
|
4189
4189
|
animatePluginProp.setPrevContentLength(prevCount);
|
|
4190
4190
|
}
|
|
4191
4191
|
const normalizedContent = typeof content === "string" && shouldNormalizeHtmlIndentation ? normalizeHtmlIndentation(content) : content;
|
|
4192
|
-
const inner = _$createScopedValue19(() => _$createScopedElement17(Markdown, { ...props }, () => normalizedContent, "c:
|
|
4192
|
+
const inner = _$createScopedValue19(() => _$createScopedElement17(Markdown, { ...props }, () => normalizedContent, "c:622d64f2"));
|
|
4193
4193
|
return _$createScopedValue19(() => _$createScopedElement17(
|
|
4194
4194
|
BlockIncompleteContext,
|
|
4195
4195
|
{ value: isIncomplete },
|
|
4196
4196
|
() => dir ? _$createScopedValue19(() => _$createScopedElement17("div", { dir, style: { display: "contents" } }, () => inner)) : inner,
|
|
4197
|
-
"c:
|
|
4197
|
+
"c:2b817f44"
|
|
4198
4198
|
));
|
|
4199
4199
|
});
|
|
4200
4200
|
Object.assign(Block, { displayName: "Block" });
|
|
@@ -4533,18 +4533,18 @@ var Streamdown = /* @__PURE__ */ memo3(({
|
|
|
4533
4533
|
...props
|
|
4534
4534
|
},
|
|
4535
4535
|
() => processedChildren,
|
|
4536
|
-
"c:
|
|
4536
|
+
"c:91da1958"
|
|
4537
4537
|
))
|
|
4538
4538
|
)),
|
|
4539
|
-
"c:
|
|
4539
|
+
"c:1bf57c87"
|
|
4540
4540
|
)),
|
|
4541
|
-
"c:
|
|
4541
|
+
"c:993f24c2"
|
|
4542
4542
|
)),
|
|
4543
|
-
"c:
|
|
4543
|
+
"c:cfad592c"
|
|
4544
4544
|
)),
|
|
4545
|
-
"c:
|
|
4545
|
+
"c:d58fdb6e"
|
|
4546
4546
|
)),
|
|
4547
|
-
"c:
|
|
4547
|
+
"c:aeb3da35"
|
|
4548
4548
|
));
|
|
4549
4549
|
}
|
|
4550
4550
|
return _$createScopedValue19(() => _$createScopedElement17(
|
|
@@ -4577,7 +4577,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
|
|
|
4577
4577
|
blocksToRender.map((block, index) => {
|
|
4578
4578
|
const isLastBlock = index === blocksToRender.length - 1;
|
|
4579
4579
|
const isIncomplete = isAnimating && isLastBlock && hasIncompleteCodeFence(block);
|
|
4580
|
-
return _$createElementFromConfig14("c:
|
|
4580
|
+
return _$createElementFromConfig14("c:179c5e6a", BlockComponent, {
|
|
4581
4581
|
animatePlugin,
|
|
4582
4582
|
components: mergedComponents,
|
|
4583
4583
|
content: block,
|
|
@@ -4594,15 +4594,15 @@ var Streamdown = /* @__PURE__ */ memo3(({
|
|
|
4594
4594
|
})
|
|
4595
4595
|
])
|
|
4596
4596
|
)),
|
|
4597
|
-
"c:
|
|
4597
|
+
"c:55e15beb"
|
|
4598
4598
|
)),
|
|
4599
|
-
"c:
|
|
4599
|
+
"c:9786493d"
|
|
4600
4600
|
)),
|
|
4601
|
-
"c:
|
|
4601
|
+
"c:c528da5c"
|
|
4602
4602
|
)),
|
|
4603
|
-
"c:
|
|
4603
|
+
"c:647d160a"
|
|
4604
4604
|
)),
|
|
4605
|
-
"c:
|
|
4605
|
+
"c:a93feeec"
|
|
4606
4606
|
));
|
|
4607
4607
|
});
|
|
4608
4608
|
Object.assign(Streamdown, { displayName: "Streamdown" });
|
|
@@ -4813,7 +4813,7 @@ var PanZoom = ({
|
|
|
4813
4813
|
title: "Zoom in",
|
|
4814
4814
|
type: "button"
|
|
4815
4815
|
},
|
|
4816
|
-
() => _$createElementFromConfig15("c:
|
|
4816
|
+
() => _$createElementFromConfig15("c:a260aaad", ZoomInIcon2, { size: 16 })
|
|
4817
4817
|
)),
|
|
4818
4818
|
_$createScopedValue20(() => _$createScopedElement18(
|
|
4819
4819
|
"button",
|
|
@@ -4824,7 +4824,7 @@ var PanZoom = ({
|
|
|
4824
4824
|
title: "Zoom out",
|
|
4825
4825
|
type: "button"
|
|
4826
4826
|
},
|
|
4827
|
-
() => _$createElementFromConfig15("c:
|
|
4827
|
+
() => _$createElementFromConfig15("c:e2f907b4", ZoomOutIcon2, { size: 16 })
|
|
4828
4828
|
)),
|
|
4829
4829
|
_$createScopedValue20(() => _$createScopedElement18(
|
|
4830
4830
|
"button",
|
|
@@ -4834,7 +4834,7 @@ var PanZoom = ({
|
|
|
4834
4834
|
title: "Reset zoom and pan",
|
|
4835
4835
|
type: "button"
|
|
4836
4836
|
},
|
|
4837
|
-
() => _$createElementFromConfig15("c:
|
|
4837
|
+
() => _$createElementFromConfig15("c:fd51a99f", RotateCcwIcon2, { size: 16 })
|
|
4838
4838
|
))
|
|
4839
4839
|
])
|
|
4840
4840
|
)) : null,
|
|
@@ -4973,7 +4973,7 @@ var Mermaid = ({
|
|
|
4973
4973
|
if (error && !svgContent && !lastValidSvg) {
|
|
4974
4974
|
const retry = () => setRetryCount((count) => count + 1);
|
|
4975
4975
|
if (ErrorComponent) {
|
|
4976
|
-
return _$createScopedValue21(() => _$createScopedElement19("div", { ref: containerRef }, () => _$createScopedValue21(() => _$createElementFromConfig16("c:
|
|
4976
|
+
return _$createScopedValue21(() => _$createScopedElement19("div", { ref: containerRef }, () => _$createScopedValue21(() => _$createElementFromConfig16("c:fd8785e4", ErrorComponent, { chart, error, retry }))));
|
|
4977
4977
|
}
|
|
4978
4978
|
return _$createScopedValue21(() => _$createScopedElement19(
|
|
4979
4979
|
"div",
|
|
@@ -5020,7 +5020,7 @@ var Mermaid = ({
|
|
|
5020
5020
|
dangerouslySetInnerHTML: { __html: displaySvg },
|
|
5021
5021
|
role: "img"
|
|
5022
5022
|
})),
|
|
5023
|
-
"c:
|
|
5023
|
+
"c:94a18558"
|
|
5024
5024
|
))
|
|
5025
5025
|
));
|
|
5026
5026
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CodeBlockBody,
|
|
4
4
|
StreamdownContext,
|
|
5
5
|
useCodePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2AYEXR7J.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/code-block/highlighted-body.tsrx
|
|
9
9
|
import {
|
|
@@ -72,7 +72,7 @@ var HighlightedCodeBlockBody = ({
|
|
|
72
72
|
[request, raw],
|
|
73
73
|
_h$4
|
|
74
74
|
);
|
|
75
|
-
return _$createScopedValue(() => _$createElementFromConfig("c:
|
|
75
|
+
return _$createScopedValue(() => _$createElementFromConfig("c:077ea921", CodeBlockBody, { className, language, lineNumbers, result, startLine, ...rest }));
|
|
76
76
|
};
|
|
77
77
|
export {
|
|
78
78
|
HighlightedCodeBlockBody
|
package/dist/client/index.js
CHANGED
|
@@ -603,7 +603,7 @@ var trimTrailingNewlines = (str) => {
|
|
|
603
603
|
}
|
|
604
604
|
return str.slice(0, end);
|
|
605
605
|
};
|
|
606
|
-
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-
|
|
606
|
+
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-B55AKMAD.js").then((mod) => ({ default: mod.HighlightedCodeBlockBody })));
|
|
607
607
|
var CodeBlock = ({
|
|
608
608
|
code,
|
|
609
609
|
language,
|
|
@@ -640,7 +640,7 @@ var CodeBlock = ({
|
|
|
640
640
|
CodeBlockContainer,
|
|
641
641
|
{ isIncomplete, language },
|
|
642
642
|
() => _$positionalChildren([
|
|
643
|
-
_$createScopedValue4(() => _$createElementFromConfig("c:
|
|
643
|
+
_$createScopedValue4(() => _$createElementFromConfig("c:c6187711", CodeBlockHeader, { language })),
|
|
644
644
|
children ? _$createScopedValue4(() => _$createScopedElement3(
|
|
645
645
|
"div",
|
|
646
646
|
{
|
|
@@ -658,7 +658,7 @@ var CodeBlock = ({
|
|
|
658
658
|
_$createScopedValue4(() => _$createScopedElement3(
|
|
659
659
|
Suspense,
|
|
660
660
|
{
|
|
661
|
-
fallback: _$createScopedValue4(() => _$createElementFromConfig("c:
|
|
661
|
+
fallback: _$createScopedValue4(() => _$createElementFromConfig("c:983e10df", CodeBlockBody, {
|
|
662
662
|
className,
|
|
663
663
|
language,
|
|
664
664
|
lineNumbers,
|
|
@@ -667,7 +667,7 @@ var CodeBlock = ({
|
|
|
667
667
|
...rest
|
|
668
668
|
}))
|
|
669
669
|
},
|
|
670
|
-
() => _$createScopedValue4(() => _$createElementFromConfig("c:
|
|
670
|
+
() => _$createScopedValue4(() => _$createElementFromConfig("c:8cd7c3c7", HighlightedCodeBlockBody, {
|
|
671
671
|
className,
|
|
672
672
|
code: trimmedCode,
|
|
673
673
|
language,
|
|
@@ -676,12 +676,12 @@ var CodeBlock = ({
|
|
|
676
676
|
startLine,
|
|
677
677
|
...rest
|
|
678
678
|
})),
|
|
679
|
-
"c:
|
|
679
|
+
"c:08b85a99"
|
|
680
680
|
))
|
|
681
681
|
]),
|
|
682
|
-
"c:
|
|
682
|
+
"c:21f13952"
|
|
683
683
|
)),
|
|
684
|
-
"c:
|
|
684
|
+
"c:24a175f6"
|
|
685
685
|
));
|
|
686
686
|
};
|
|
687
687
|
|
|
@@ -1073,7 +1073,7 @@ var CodeBlockCopyButton = ({
|
|
|
1073
1073
|
type: "button",
|
|
1074
1074
|
...props
|
|
1075
1075
|
},
|
|
1076
|
-
() => children ?? _$createElementFromConfig2("c:
|
|
1076
|
+
() => children ?? _$createElementFromConfig2("c:22ced093", Icon, { size: 14 })
|
|
1077
1077
|
));
|
|
1078
1078
|
};
|
|
1079
1079
|
|
|
@@ -1436,7 +1436,7 @@ var CodeBlockDownloadButton = ({
|
|
|
1436
1436
|
type: "button",
|
|
1437
1437
|
...props
|
|
1438
1438
|
},
|
|
1439
|
-
() => children ?? _$createScopedValue8(() => _$createElementFromConfig3("c:
|
|
1439
|
+
() => children ?? _$createScopedValue8(() => _$createElementFromConfig3("c:10f97a77", icons.DownloadIcon, { size: 14 }))
|
|
1440
1440
|
));
|
|
1441
1441
|
};
|
|
1442
1442
|
|
|
@@ -1463,7 +1463,7 @@ var CodeBlockSkeleton = () => {
|
|
|
1463
1463
|
},
|
|
1464
1464
|
() => _$positionalChildren2([
|
|
1465
1465
|
_$createScopedValue9(() => _$createElement3("div", { className: cn2("h-[46px] w-full bg-muted/80") })),
|
|
1466
|
-
_$createScopedValue9(() => _$createScopedElement7("div", { className: cn2("flex w-full items-center justify-center p-4") }, () => _$createScopedValue9(() => _$createElementFromConfig4("c:
|
|
1466
|
+
_$createScopedValue9(() => _$createScopedElement7("div", { className: cn2("flex w-full items-center justify-center p-4") }, () => _$createScopedValue9(() => _$createElementFromConfig4("c:fec3914b", Loader2Icon2, { className: cn2("size-4 animate-spin") }))))
|
|
1467
1467
|
])
|
|
1468
1468
|
));
|
|
1469
1469
|
};
|
|
@@ -1616,7 +1616,7 @@ var ImageComponent = ({
|
|
|
1616
1616
|
title: t.downloadImage,
|
|
1617
1617
|
type: "button"
|
|
1618
1618
|
},
|
|
1619
|
-
() => _$createElementFromConfig5("c:
|
|
1619
|
+
() => _$createElementFromConfig5("c:b9480d23", DownloadIcon2, { size: 14 })
|
|
1620
1620
|
))
|
|
1621
1621
|
])
|
|
1622
1622
|
));
|
|
@@ -1769,10 +1769,10 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
|
|
|
1769
1769
|
type: "button"
|
|
1770
1770
|
},
|
|
1771
1771
|
() => copied ? _$createScopedElement9(_$Fragment, {}, () => _$positionalChildren4([
|
|
1772
|
-
_$createElementFromConfig6("c:
|
|
1772
|
+
_$createElementFromConfig6("c:e389f6c3", CheckIcon2, { size: 14 }),
|
|
1773
1773
|
_$createScopedElement9("span", {}, () => t.copied)
|
|
1774
1774
|
])) : _$createScopedElement9(_$Fragment, {}, () => _$positionalChildren4([
|
|
1775
|
-
_$createElementFromConfig6("c:
|
|
1775
|
+
_$createElementFromConfig6("c:0ddacc99", CopyIcon2, { size: 14 }),
|
|
1776
1776
|
_$createScopedElement9("span", {}, () => t.copyLink)
|
|
1777
1777
|
]))
|
|
1778
1778
|
)),
|
|
@@ -1784,7 +1784,7 @@ var LinkSafetyModal = ({ url, isOpen, onClose, onConfirm }) => {
|
|
|
1784
1784
|
type: "button"
|
|
1785
1785
|
},
|
|
1786
1786
|
() => _$positionalChildren4([
|
|
1787
|
-
_$createElementFromConfig6("c:
|
|
1787
|
+
_$createElementFromConfig6("c:abc70429", ExternalLinkIcon2, { size: 14 }),
|
|
1788
1788
|
_$createScopedElement9("span", {}, () => t.openLink)
|
|
1789
1789
|
])
|
|
1790
1790
|
))
|
|
@@ -1960,7 +1960,7 @@ var MermaidDownloadDropdown = ({ chart, children, className, onDownload, config,
|
|
|
1960
1960
|
title: t.downloadDiagram,
|
|
1961
1961
|
type: "button"
|
|
1962
1962
|
},
|
|
1963
|
-
() => children ?? _$createScopedValue12(() => _$createElementFromConfig7("c:
|
|
1963
|
+
() => children ?? _$createScopedValue12(() => _$createElementFromConfig7("c:5351371a", icons.DownloadIcon, { size: 14 }))
|
|
1964
1964
|
)),
|
|
1965
1965
|
isOpen ? _$createScopedValue12(() => _$createScopedElement10(
|
|
1966
1966
|
"div",
|
|
@@ -2087,7 +2087,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2087
2087
|
type: "button",
|
|
2088
2088
|
...props
|
|
2089
2089
|
},
|
|
2090
|
-
() => _$createElementFromConfig8("c:
|
|
2090
|
+
() => _$createElementFromConfig8("c:139080f4", Maximize2Icon2, { size: 14 })
|
|
2091
2091
|
)),
|
|
2092
2092
|
isFullscreen ? createPortal(
|
|
2093
2093
|
_$createScopedValue13(() => _$createScopedElement11(
|
|
@@ -2112,7 +2112,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2112
2112
|
title: t.exitFullscreen,
|
|
2113
2113
|
type: "button"
|
|
2114
2114
|
},
|
|
2115
|
-
() => _$createElementFromConfig8("c:
|
|
2115
|
+
() => _$createElementFromConfig8("c:a4287e1a", XIcon2, { size: 20 })
|
|
2116
2116
|
)),
|
|
2117
2117
|
_$createScopedValue13(() => _$createScopedElement11(
|
|
2118
2118
|
"div",
|
|
@@ -2122,7 +2122,7 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2122
2122
|
onKeyDown: (e) => e.stopPropagation(),
|
|
2123
2123
|
role: "presentation"
|
|
2124
2124
|
},
|
|
2125
|
-
() => _$createScopedValue13(() => _$createElementFromConfig8("c:
|
|
2125
|
+
() => _$createScopedValue13(() => _$createElementFromConfig8("c:6459f4e2", Mermaid, {
|
|
2126
2126
|
chart,
|
|
2127
2127
|
className: cn2("size-full [&_svg]:h-auto [&_svg]:w-auto"),
|
|
2128
2128
|
config,
|
|
@@ -2393,7 +2393,7 @@ var TableCopyDropdown = ({ children, className, onCopy, onError, timeout = 2e3 }
|
|
|
2393
2393
|
title: t.copyTable,
|
|
2394
2394
|
type: "button"
|
|
2395
2395
|
},
|
|
2396
|
-
() => children ?? _$createElementFromConfig9("c:
|
|
2396
|
+
() => children ?? _$createElementFromConfig9("c:3efe74da", Icon, { height: 14, width: 14 })
|
|
2397
2397
|
)),
|
|
2398
2398
|
isOpen ? _$createScopedValue14(() => _$createScopedElement12(
|
|
2399
2399
|
"div",
|
|
@@ -2513,7 +2513,7 @@ var TableDownloadButton = ({
|
|
|
2513
2513
|
title: format === "csv" ? t.downloadTableAsCsv : t.downloadTableAsMarkdown,
|
|
2514
2514
|
type: "button"
|
|
2515
2515
|
},
|
|
2516
|
-
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:
|
|
2516
|
+
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:400aafbe", icons.DownloadIcon, { size: 14 }))
|
|
2517
2517
|
));
|
|
2518
2518
|
};
|
|
2519
2519
|
var TableDownloadDropdown = ({ children, className, onDownload, onError }) => {
|
|
@@ -2568,7 +2568,7 @@ var TableDownloadDropdown = ({ children, className, onDownload, onError }) => {
|
|
|
2568
2568
|
title: t.downloadTable,
|
|
2569
2569
|
type: "button"
|
|
2570
2570
|
},
|
|
2571
|
-
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:
|
|
2571
|
+
() => children ?? _$createScopedValue15(() => _$createElementFromConfig10("c:c335522d", icons.DownloadIcon, { size: 14 }))
|
|
2572
2572
|
)),
|
|
2573
2573
|
isOpen ? _$createScopedValue15(() => _$createScopedElement13(
|
|
2574
2574
|
"div",
|
|
@@ -2662,7 +2662,7 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2662
2662
|
title: t.viewFullscreen,
|
|
2663
2663
|
type: "button"
|
|
2664
2664
|
},
|
|
2665
|
-
() => _$createElementFromConfig11("c:
|
|
2665
|
+
() => _$createElementFromConfig11("c:821be74a", Maximize2Icon2, { size: 14 })
|
|
2666
2666
|
)),
|
|
2667
2667
|
isFullscreen ? createPortal2(
|
|
2668
2668
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
@@ -2690,8 +2690,8 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2690
2690
|
},
|
|
2691
2691
|
() => _$positionalChildren9([
|
|
2692
2692
|
_$createScopedValue16(() => _$createScopedElement14("div", { className: cn2("flex items-center justify-end gap-1 p-4") }, () => _$positionalChildren9([
|
|
2693
|
-
showCopy ? _$createElementFromConfig11("c:
|
|
2694
|
-
showDownload ? _$createElementFromConfig11("c:
|
|
2693
|
+
showCopy ? _$createElementFromConfig11("c:270c351e", TableCopyDropdown, {}) : null,
|
|
2694
|
+
showDownload ? _$createElementFromConfig11("c:3123815a", TableDownloadDropdown, {}) : null,
|
|
2695
2695
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
2696
2696
|
"button",
|
|
2697
2697
|
{
|
|
@@ -2700,7 +2700,7 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2700
2700
|
title: t.exitFullscreen,
|
|
2701
2701
|
type: "button"
|
|
2702
2702
|
},
|
|
2703
|
-
() => _$createElementFromConfig11("c:
|
|
2703
|
+
() => _$createElementFromConfig11("c:58e6c9c7", XIcon2, { size: 20 })
|
|
2704
2704
|
))
|
|
2705
2705
|
]))),
|
|
2706
2706
|
_$createScopedValue16(() => _$createScopedElement14(
|
|
@@ -2752,7 +2752,7 @@ var Table = ({
|
|
|
2752
2752
|
hasAnyControl ? _$createScopedValue17(() => _$createScopedElement15("div", { className: cn2("flex items-center justify-end gap-1") }, () => _$positionalChildren10([
|
|
2753
2753
|
hasCopy ? _$createElementFromConfig12("c:ab0b713f", TableCopyDropdown, {}) : null,
|
|
2754
2754
|
hasDownload ? _$createElementFromConfig12("c:c7fc1643", TableDownloadDropdown, {}) : null,
|
|
2755
|
-
hasFullscreen ? _$createScopedValue17(() => _$createScopedElement15(TableFullscreenButton, { showCopy: hasCopy, showDownload: hasDownload }, () => children, "c:
|
|
2755
|
+
hasFullscreen ? _$createScopedValue17(() => _$createScopedElement15(TableFullscreenButton, { showCopy: hasCopy, showDownload: hasDownload }, () => children, "c:5f47f3f9")) : null
|
|
2756
2756
|
]))) : null,
|
|
2757
2757
|
_$createScopedValue17(() => _$createScopedElement15(
|
|
2758
2758
|
"div",
|
|
@@ -2805,7 +2805,7 @@ var _h$262 = /* @__PURE__ */ Symbol(_hs$19 + 26);
|
|
|
2805
2805
|
var _h$272 = /* @__PURE__ */ Symbol(_hs$19 + 27);
|
|
2806
2806
|
var START_LINE_PATTERN = /startLine=(\d+)/;
|
|
2807
2807
|
var NO_LINE_NUMBERS_PATTERN = /\bnoLineNumbers\b/;
|
|
2808
|
-
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-
|
|
2808
|
+
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-44UWZQZF.js").then((mod) => ({ default: mod.Mermaid })));
|
|
2809
2809
|
var LANGUAGE_REGEX = /language-([^\s]+)/;
|
|
2810
2810
|
function sameNodePosition(prev, next) {
|
|
2811
2811
|
if (!(prev?.position || next?.position)) {
|
|
@@ -3002,7 +3002,7 @@ var LinkComponent = ({ children, className, href, node, ...props }) => {
|
|
|
3002
3002
|
},
|
|
3003
3003
|
() => children
|
|
3004
3004
|
)),
|
|
3005
|
-
linkSafety.renderModal ? linkSafety.renderModal(modalProps) : _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3005
|
+
linkSafety.renderModal ? linkSafety.renderModal(modalProps) : _$createScopedValue18(() => _$createElementFromConfig13("c:4d70554d", LinkSafetyModal, { ...modalProps }))
|
|
3006
3006
|
]));
|
|
3007
3007
|
}
|
|
3008
3008
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
@@ -3135,7 +3135,7 @@ var MemoTable = memo2(
|
|
|
3135
3135
|
...props
|
|
3136
3136
|
},
|
|
3137
3137
|
() => children,
|
|
3138
|
-
"c:
|
|
3138
|
+
"c:914e0089"
|
|
3139
3139
|
));
|
|
3140
3140
|
},
|
|
3141
3141
|
(p, n) => sameClassAndNode(p, n)
|
|
@@ -3374,15 +3374,15 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3374
3374
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
3375
3375
|
Suspense2,
|
|
3376
3376
|
{
|
|
3377
|
-
fallback: _$createElementFromConfig13("c:
|
|
3377
|
+
fallback: _$createElementFromConfig13("c:e609faab", CodeBlockSkeleton, {})
|
|
3378
3378
|
},
|
|
3379
|
-
() => _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3379
|
+
() => _$createScopedValue18(() => _$createElementFromConfig13("c:ac373e28", CustomComponent, {
|
|
3380
3380
|
code,
|
|
3381
3381
|
isIncomplete: isBlockIncomplete,
|
|
3382
3382
|
language,
|
|
3383
3383
|
meta: metastring
|
|
3384
3384
|
})),
|
|
3385
|
-
"c:
|
|
3385
|
+
"c:7af44593"
|
|
3386
3386
|
));
|
|
3387
3387
|
}
|
|
3388
3388
|
if (language === "mermaid" && mermaidPlugin) {
|
|
@@ -3395,7 +3395,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3395
3395
|
return _$createScopedValue18(() => _$createScopedElement16(
|
|
3396
3396
|
Suspense2,
|
|
3397
3397
|
{
|
|
3398
|
-
fallback: _$createElementFromConfig13("c:
|
|
3398
|
+
fallback: _$createElementFromConfig13("c:ef4f5e7a", CodeBlockSkeleton, {})
|
|
3399
3399
|
},
|
|
3400
3400
|
() => _$createScopedValue18(() => _$createScopedElement16(
|
|
3401
3401
|
"div",
|
|
@@ -3423,9 +3423,9 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3423
3423
|
"data-streamdown": "mermaid-block-actions"
|
|
3424
3424
|
},
|
|
3425
3425
|
() => _$positionalChildren11([
|
|
3426
|
-
showDownload2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3427
|
-
showCopy2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3428
|
-
showFullscreen ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3426
|
+
showDownload2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:c48a59b4", MermaidDownloadDropdown, { chart: code, config: mermaidContext?.config })) : null,
|
|
3427
|
+
showCopy2 ? _$createScopedValue18(() => _$createElementFromConfig13("c:ad930fad", CodeBlockCopyButton, { code })) : null,
|
|
3428
|
+
showFullscreen ? _$createScopedValue18(() => _$createElementFromConfig13("c:67e03c37", MermaidFullscreenButton, { chart: code, config: mermaidContext?.config })) : null
|
|
3429
3429
|
])
|
|
3430
3430
|
))
|
|
3431
3431
|
)) : null,
|
|
@@ -3434,7 +3434,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3434
3434
|
{
|
|
3435
3435
|
className: cn2("rounded-md border border-border bg-background")
|
|
3436
3436
|
},
|
|
3437
|
-
() => _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3437
|
+
() => _$createScopedValue18(() => _$createElementFromConfig13("c:5a2446a4", Mermaid2, {
|
|
3438
3438
|
chart: code,
|
|
3439
3439
|
config: mermaidContext?.config,
|
|
3440
3440
|
showControls: showPanZoomControls
|
|
@@ -3442,7 +3442,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3442
3442
|
))
|
|
3443
3443
|
])
|
|
3444
3444
|
)),
|
|
3445
|
-
"c:
|
|
3445
|
+
"c:d15fcedc"
|
|
3446
3446
|
));
|
|
3447
3447
|
}
|
|
3448
3448
|
const showCodeControls = shouldShowControls(controlsConfig, "code");
|
|
@@ -3460,10 +3460,10 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3460
3460
|
startLine
|
|
3461
3461
|
},
|
|
3462
3462
|
() => shouldShowCodeControls ? _$createScopedElement16(_$Fragment4, {}, () => _$positionalChildren11([
|
|
3463
|
-
showDownload ? _$createScopedValue18(() => _$createElementFromConfig13("c:
|
|
3464
|
-
showCopy ? _$createElementFromConfig13("c:
|
|
3463
|
+
showDownload ? _$createScopedValue18(() => _$createElementFromConfig13("c:24ccf80c", CodeBlockDownloadButton, { code, language })) : null,
|
|
3464
|
+
showCopy ? _$createElementFromConfig13("c:d86969ef", CodeBlockCopyButton, {}) : null
|
|
3465
3465
|
])) : null,
|
|
3466
|
-
"c:
|
|
3466
|
+
"c:e81b8b3b"
|
|
3467
3467
|
));
|
|
3468
3468
|
};
|
|
3469
3469
|
var MemoCode = memo2(CodeComponent, (p, n) => p.className === n.className && sameNodePosition(p.node, n.node));
|
|
@@ -4097,12 +4097,12 @@ var Block = memo3(({
|
|
|
4097
4097
|
animatePluginProp.setPrevContentLength(prevCount);
|
|
4098
4098
|
}
|
|
4099
4099
|
const normalizedContent = typeof content === "string" && shouldNormalizeHtmlIndentation ? normalizeHtmlIndentation(content) : content;
|
|
4100
|
-
const inner = _$createScopedValue19(() => _$createScopedElement17(Markdown, { ...props }, () => normalizedContent, "c:
|
|
4100
|
+
const inner = _$createScopedValue19(() => _$createScopedElement17(Markdown, { ...props }, () => normalizedContent, "c:622d64f2"));
|
|
4101
4101
|
return _$createScopedValue19(() => _$createScopedElement17(
|
|
4102
4102
|
BlockIncompleteContext,
|
|
4103
4103
|
{ value: isIncomplete },
|
|
4104
4104
|
() => dir ? _$createScopedValue19(() => _$createScopedElement17("div", { dir, style: { display: "contents" } }, () => inner)) : inner,
|
|
4105
|
-
"c:
|
|
4105
|
+
"c:2b817f44"
|
|
4106
4106
|
));
|
|
4107
4107
|
});
|
|
4108
4108
|
Object.assign(Block, { displayName: "Block" });
|
|
@@ -4384,18 +4384,18 @@ var Streamdown = memo3(({
|
|
|
4384
4384
|
...props
|
|
4385
4385
|
},
|
|
4386
4386
|
() => processedChildren,
|
|
4387
|
-
"c:
|
|
4387
|
+
"c:91da1958"
|
|
4388
4388
|
))
|
|
4389
4389
|
)),
|
|
4390
|
-
"c:
|
|
4390
|
+
"c:1bf57c87"
|
|
4391
4391
|
)),
|
|
4392
|
-
"c:
|
|
4392
|
+
"c:993f24c2"
|
|
4393
4393
|
)),
|
|
4394
|
-
"c:
|
|
4394
|
+
"c:cfad592c"
|
|
4395
4395
|
)),
|
|
4396
|
-
"c:
|
|
4396
|
+
"c:d58fdb6e"
|
|
4397
4397
|
)),
|
|
4398
|
-
"c:
|
|
4398
|
+
"c:aeb3da35"
|
|
4399
4399
|
));
|
|
4400
4400
|
}
|
|
4401
4401
|
return _$createScopedValue19(() => _$createScopedElement17(
|
|
@@ -4428,7 +4428,7 @@ var Streamdown = memo3(({
|
|
|
4428
4428
|
blocksToRender.map((block, index) => {
|
|
4429
4429
|
const isLastBlock = index === blocksToRender.length - 1;
|
|
4430
4430
|
const isIncomplete = isAnimating && isLastBlock && hasIncompleteCodeFence(block);
|
|
4431
|
-
return _$createElementFromConfig14("c:
|
|
4431
|
+
return _$createElementFromConfig14("c:179c5e6a", BlockComponent, {
|
|
4432
4432
|
animatePlugin,
|
|
4433
4433
|
components: mergedComponents,
|
|
4434
4434
|
content: block,
|
|
@@ -4445,15 +4445,15 @@ var Streamdown = memo3(({
|
|
|
4445
4445
|
})
|
|
4446
4446
|
])
|
|
4447
4447
|
)),
|
|
4448
|
-
"c:
|
|
4448
|
+
"c:55e15beb"
|
|
4449
4449
|
)),
|
|
4450
|
-
"c:
|
|
4450
|
+
"c:9786493d"
|
|
4451
4451
|
)),
|
|
4452
|
-
"c:
|
|
4452
|
+
"c:c528da5c"
|
|
4453
4453
|
)),
|
|
4454
|
-
"c:
|
|
4454
|
+
"c:647d160a"
|
|
4455
4455
|
)),
|
|
4456
|
-
"c:
|
|
4456
|
+
"c:a93feeec"
|
|
4457
4457
|
));
|
|
4458
4458
|
});
|
|
4459
4459
|
Object.assign(Streamdown, { displayName: "Streamdown" });
|
|
@@ -4653,7 +4653,7 @@ var PanZoom = ({
|
|
|
4653
4653
|
title: "Zoom in",
|
|
4654
4654
|
type: "button"
|
|
4655
4655
|
},
|
|
4656
|
-
() => _$createElementFromConfig15("c:
|
|
4656
|
+
() => _$createElementFromConfig15("c:a260aaad", ZoomInIcon2, { size: 16 })
|
|
4657
4657
|
)),
|
|
4658
4658
|
_$createScopedValue20(() => _$createScopedElement18(
|
|
4659
4659
|
"button",
|
|
@@ -4664,7 +4664,7 @@ var PanZoom = ({
|
|
|
4664
4664
|
title: "Zoom out",
|
|
4665
4665
|
type: "button"
|
|
4666
4666
|
},
|
|
4667
|
-
() => _$createElementFromConfig15("c:
|
|
4667
|
+
() => _$createElementFromConfig15("c:e2f907b4", ZoomOutIcon2, { size: 16 })
|
|
4668
4668
|
)),
|
|
4669
4669
|
_$createScopedValue20(() => _$createScopedElement18(
|
|
4670
4670
|
"button",
|
|
@@ -4674,7 +4674,7 @@ var PanZoom = ({
|
|
|
4674
4674
|
title: "Reset zoom and pan",
|
|
4675
4675
|
type: "button"
|
|
4676
4676
|
},
|
|
4677
|
-
() => _$createElementFromConfig15("c:
|
|
4677
|
+
() => _$createElementFromConfig15("c:fd51a99f", RotateCcwIcon2, { size: 16 })
|
|
4678
4678
|
))
|
|
4679
4679
|
])
|
|
4680
4680
|
)) : null,
|
|
@@ -4813,7 +4813,7 @@ var Mermaid = ({
|
|
|
4813
4813
|
if (error && !svgContent && !lastValidSvg) {
|
|
4814
4814
|
const retry = () => setRetryCount((count) => count + 1);
|
|
4815
4815
|
if (ErrorComponent) {
|
|
4816
|
-
return _$createScopedValue21(() => _$createScopedElement19("div", { ref: containerRef }, () => _$createScopedValue21(() => _$createElementFromConfig16("c:
|
|
4816
|
+
return _$createScopedValue21(() => _$createScopedElement19("div", { ref: containerRef }, () => _$createScopedValue21(() => _$createElementFromConfig16("c:fd8785e4", ErrorComponent, { chart, error, retry }))));
|
|
4817
4817
|
}
|
|
4818
4818
|
return _$createScopedValue21(() => _$createScopedElement19(
|
|
4819
4819
|
"div",
|
|
@@ -4860,7 +4860,7 @@ var Mermaid = ({
|
|
|
4860
4860
|
dangerouslySetInnerHTML: { __html: displaySvg },
|
|
4861
4861
|
role: "img"
|
|
4862
4862
|
})),
|
|
4863
|
-
"c:
|
|
4863
|
+
"c:94a18558"
|
|
4864
4864
|
))
|
|
4865
4865
|
));
|
|
4866
4866
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CodeBlockBody,
|
|
4
4
|
StreamdownContext,
|
|
5
5
|
useCodePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I47FP67C.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/code-block/highlighted-body.tsrx
|
|
9
9
|
import { createElementFromConfig as _$createElementFromConfig } from "octane/internal/server";
|
|
@@ -62,7 +62,7 @@ var HighlightedCodeBlockBody = ({
|
|
|
62
62
|
[request, raw],
|
|
63
63
|
_h$4
|
|
64
64
|
);
|
|
65
|
-
return _$createScopedValue(() => _$createElementFromConfig("c:
|
|
65
|
+
return _$createScopedValue(() => _$createElementFromConfig("c:077ea921", CodeBlockBody, { className, language, lineNumbers, result, startLine, ...rest }));
|
|
66
66
|
};
|
|
67
67
|
export {
|
|
68
68
|
HighlightedCodeBlockBody
|
package/dist/server/index.js
CHANGED
|
@@ -14,24 +14,24 @@ export declare const DEFERRED_RENDER_ROOT_MARGIN = "300px";
|
|
|
14
14
|
export declare const DEFERRED_RENDER_IDLE_TIMEOUT = 500;
|
|
15
15
|
export interface UseDeferredRenderOptions {
|
|
16
16
|
/**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
* Debounce delay in milliseconds before checking if still in view
|
|
18
|
+
* @default DEFERRED_RENDER_DEBOUNCE_DELAY
|
|
19
|
+
*/
|
|
20
20
|
debounceDelay?: number;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
* Timeout for requestIdleCallback in milliseconds
|
|
23
|
+
* @default DEFERRED_RENDER_IDLE_TIMEOUT
|
|
24
|
+
*/
|
|
25
25
|
idleTimeout?: number;
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* If true, render immediately without waiting for intersection
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
30
|
immediate?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
* Root margin for Intersection Observer (e.g., '200px' to start rendering 200px before entering viewport)
|
|
33
|
+
* @default DEFERRED_RENDER_ROOT_MARGIN
|
|
34
|
+
*/
|
|
35
35
|
rootMargin?: string;
|
|
36
36
|
}
|
|
37
37
|
/**
|
package/dist/types/index.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ export type { IconMap } from './lib/icon-context.js';
|
|
|
23
23
|
export type { AllowElement, Components, ExtraProps, UrlTransform } from './lib/markdown.js';
|
|
24
24
|
export { defaultUrlTransform } from './lib/markdown.js';
|
|
25
25
|
export { parseMarkdownIntoBlocks } from './lib/parse-blocks.js';
|
|
26
|
-
export type { CjkPlugin, CodeHighlighterPlugin, CustomRenderer, CustomRendererProps, DiagramPlugin, HighlightOptions, MathPlugin, PluginConfig, ThemeInput } from './lib/plugin-types';
|
|
26
|
+
export type { CjkPlugin, CodeHighlighterPlugin, CustomRenderer, CustomRendererProps, DiagramPlugin, HighlightOptions, MathPlugin, PluginConfig, ThemeInput, } from './lib/plugin-types';
|
|
27
27
|
export { TableCopyDropdown, type TableCopyDropdownProps } from './lib/table/copy-dropdown.js';
|
|
28
|
-
export { TableDownloadButton, type TableDownloadButtonProps, TableDownloadDropdown, type TableDownloadDropdownProps } from './lib/table/download-dropdown.js';
|
|
29
|
-
export { escapeMarkdownTableCell, extractTableDataFromElement, type TableData, tableDataToCSV, tableDataToMarkdown, tableDataToTSV } from './lib/table/utils';
|
|
28
|
+
export { TableDownloadButton, type TableDownloadButtonProps, TableDownloadDropdown, type TableDownloadDropdownProps, } from './lib/table/download-dropdown.js';
|
|
29
|
+
export { escapeMarkdownTableCell, extractTableDataFromElement, type TableData, tableDataToCSV, tableDataToMarkdown, tableDataToTSV, } from './lib/table/utils';
|
|
30
30
|
export type { StreamdownTranslations } from './lib/translations-context.js';
|
|
31
31
|
export { defaultTranslations } from './lib/translations-context.js';
|
|
32
32
|
/**
|
|
@@ -100,20 +100,20 @@ export type StreamdownProps = Options & {
|
|
|
100
100
|
/** Custom tags to allow through sanitization with their permitted attributes */
|
|
101
101
|
allowedTags?: AllowedTags;
|
|
102
102
|
/**
|
|
103
|
-
* Tags whose children should be treated as plain text (no markdown parsing).
|
|
104
|
-
* Useful for mention/entity tags in AI UIs where child content is a data
|
|
105
|
-
* label rather than prose. Requires the tag to also be listed in `allowedTags`.
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```tsx
|
|
109
|
-
* <Streamdown
|
|
110
|
-
* allowedTags={{ mention: ['user_id'] }}
|
|
111
|
-
* literalTagContent={['mention']}
|
|
112
|
-
* >
|
|
113
|
-
* {`<mention user_id="123">@_some_username_</mention>`}
|
|
114
|
-
* </Streamdown>
|
|
115
|
-
* ```
|
|
116
|
-
*/
|
|
103
|
+
* Tags whose children should be treated as plain text (no markdown parsing).
|
|
104
|
+
* Useful for mention/entity tags in AI UIs where child content is a data
|
|
105
|
+
* label rather than prose. Requires the tag to also be listed in `allowedTags`.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```tsx
|
|
109
|
+
* <Streamdown
|
|
110
|
+
* allowedTags={{ mention: ['user_id'] }}
|
|
111
|
+
* literalTagContent={['mention']}
|
|
112
|
+
* >
|
|
113
|
+
* {`<mention user_id="123">@_some_username_</mention>`}
|
|
114
|
+
* </Streamdown>
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
117
|
literalTagContent?: string[];
|
|
118
118
|
/** Override UI strings for i18n / custom labels */
|
|
119
119
|
translations?: Partial<StreamdownTranslations>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/streamdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.43",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -92,16 +92,16 @@
|
|
|
92
92
|
"unist-util-visit-parents": "^6.0.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"octane": "^0.
|
|
95
|
+
"octane": "^0.12.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@octanejs/testing-library": "0.1.
|
|
98
|
+
"@octanejs/testing-library": "0.1.62",
|
|
99
99
|
"@testing-library/jest-dom": "^6.9.1",
|
|
100
|
-
"@tsrx/react": "^0.
|
|
100
|
+
"@tsrx/react": "^0.4.5",
|
|
101
101
|
"@types/react": "^19.2.17",
|
|
102
102
|
"@types/react-dom": "^19.2.3",
|
|
103
103
|
"esbuild": "^0.28.1",
|
|
104
|
-
"octane": "0.
|
|
104
|
+
"octane": "0.12.0",
|
|
105
105
|
"react": "19.2.7",
|
|
106
106
|
"react-dom": "19.2.7",
|
|
107
107
|
"streamdown": "2.5.0",
|