@octanejs/streamdown 0.1.39 → 0.1.41
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-3ZWXIWBP.js → chunk-BZ3EPYN5.js} +97 -57
- package/dist/client/chunks/{highlighted-body-ERU3INRP.js → highlighted-body-YMSJOAAW.js} +5 -1
- package/dist/client/chunks/{mermaid-CFBTUSI4.js → mermaid-TMTPUHUW.js} +1 -1
- package/dist/client/index.js +1 -1
- package/package.json +5 -5
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
// src/lib/mermaid/index.tsrx
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
createElementFromConfig as _$createElementFromConfig16,
|
|
6
|
+
createHostElement as _$createHostElement7
|
|
7
|
+
} from "octane/internal/client";
|
|
8
|
+
import {
|
|
6
9
|
createScopedElement as _$createScopedElement19,
|
|
7
10
|
createScopedValue as _$createScopedValue21,
|
|
8
11
|
hookSlots as _$hookSlots22,
|
|
@@ -13,7 +16,6 @@ import {
|
|
|
13
16
|
useState as useState13,
|
|
14
17
|
withSlot as _$withSlot19
|
|
15
18
|
} from "octane";
|
|
16
|
-
import { createElementFromConfig as _$createElementFromConfig16 } from "octane/internal/client";
|
|
17
19
|
|
|
18
20
|
// src/hooks/use-deferred-render.tsrx
|
|
19
21
|
import {
|
|
@@ -179,7 +181,6 @@ function useDeferredRender(options = {}) {
|
|
|
179
181
|
import {
|
|
180
182
|
createContext as createContext7,
|
|
181
183
|
createElement as createElement3,
|
|
182
|
-
createElement as _$createElement6,
|
|
183
184
|
createScopedElement as _$createScopedElement17,
|
|
184
185
|
createScopedValue as _$createScopedValue19,
|
|
185
186
|
hookSlots as _$hookSlots20,
|
|
@@ -194,6 +195,9 @@ import {
|
|
|
194
195
|
} from "octane";
|
|
195
196
|
import {
|
|
196
197
|
createElementFromConfig as _$createElementFromConfig14,
|
|
198
|
+
createHostElement as _$createHostElement6,
|
|
199
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions10,
|
|
200
|
+
enableDescriptorFragmentRefs as _$enableDescriptorFragmentRefs3,
|
|
197
201
|
memoPublish as _$memoPublish7,
|
|
198
202
|
memoSlot as _$memoSlot7,
|
|
199
203
|
memoTake1 as _$memoTake15,
|
|
@@ -366,7 +370,6 @@ import {
|
|
|
366
370
|
Fragment as _$Fragment4,
|
|
367
371
|
Suspense as Suspense2,
|
|
368
372
|
cloneElement,
|
|
369
|
-
createElement as _$createElement5,
|
|
370
373
|
createScopedElement as _$createScopedElement16,
|
|
371
374
|
createScopedValue as _$createScopedValue18,
|
|
372
375
|
hookSlots as _$hookSlots19,
|
|
@@ -381,6 +384,9 @@ import {
|
|
|
381
384
|
} from "octane";
|
|
382
385
|
import {
|
|
383
386
|
createElementFromConfig as _$createElementFromConfig13,
|
|
387
|
+
createHostElement as _$createHostElement5,
|
|
388
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions9,
|
|
389
|
+
enableDescriptorFragmentRefs as _$enableDescriptorFragmentRefs2,
|
|
384
390
|
memoPublish as _$memoPublish6,
|
|
385
391
|
memoSlot as _$memoSlot6,
|
|
386
392
|
memoTake0 as _$memoTake02,
|
|
@@ -401,6 +407,8 @@ import {
|
|
|
401
407
|
} from "octane";
|
|
402
408
|
import {
|
|
403
409
|
createElementFromConfig as _$createElementFromConfig,
|
|
410
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions3,
|
|
411
|
+
enableDescriptorFragmentRefs as _$enableDescriptorFragmentRefs,
|
|
404
412
|
memoPublish as _$memoPublish3,
|
|
405
413
|
memoSlot as _$memoSlot3,
|
|
406
414
|
memoTake1 as _$memoTake12
|
|
@@ -449,11 +457,13 @@ import {
|
|
|
449
457
|
withSlot as _$withSlot
|
|
450
458
|
} from "octane";
|
|
451
459
|
import {
|
|
460
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions,
|
|
452
461
|
memoPublish as _$memoPublish2,
|
|
453
462
|
memoSlot as _$memoSlot2,
|
|
454
463
|
memoTake2 as _$memoTake2,
|
|
455
464
|
memoTake3 as _$memoTake3
|
|
456
465
|
} from "octane/internal/client";
|
|
466
|
+
_$enableDescriptorFormActions();
|
|
457
467
|
var _hs$2 = /* @__PURE__ */ _$hookSlots2(3);
|
|
458
468
|
var _h$02 = /* @__PURE__ */ Symbol(_hs$2);
|
|
459
469
|
var _h$12 = /* @__PURE__ */ Symbol(_hs$2 + 1);
|
|
@@ -577,16 +587,20 @@ var CodeBlockBody = /* @__PURE__ */ memo(
|
|
|
577
587
|
|
|
578
588
|
// src/lib/code-block/container.tsrx
|
|
579
589
|
import {
|
|
580
|
-
|
|
590
|
+
createHostElement as _$createHostElement,
|
|
591
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions2
|
|
592
|
+
} from "octane/internal/client";
|
|
593
|
+
import {
|
|
581
594
|
createScopedValue as _$createScopedValue2,
|
|
582
595
|
hookSlots as _$hookSlots3,
|
|
583
596
|
withSlot as _$withSlot2
|
|
584
597
|
} from "octane";
|
|
598
|
+
_$enableDescriptorFormActions2();
|
|
585
599
|
var _hs$3 = /* @__PURE__ */ _$hookSlots3(1);
|
|
586
600
|
var _h$03 = /* @__PURE__ */ Symbol(_hs$3);
|
|
587
601
|
var CodeBlockContainer = ({ className, language, style, isIncomplete, ...props }) => {
|
|
588
602
|
const cn2 = _$withSlot2(_h$03, useCn);
|
|
589
|
-
return _$createScopedValue2(() => _$
|
|
603
|
+
return _$createScopedValue2(() => _$createHostElement("div", {
|
|
590
604
|
className: cn2("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", className),
|
|
591
605
|
"data-incomplete": isIncomplete || void 0,
|
|
592
606
|
"data-language": language,
|
|
@@ -628,6 +642,8 @@ var CodeBlockHeader = ({ language }) => {
|
|
|
628
642
|
};
|
|
629
643
|
|
|
630
644
|
// src/lib/code-block/index.tsrx
|
|
645
|
+
_$enableDescriptorFormActions3();
|
|
646
|
+
_$enableDescriptorFragmentRefs();
|
|
631
647
|
var _hs$5 = /* @__PURE__ */ _$hookSlots5(3);
|
|
632
648
|
var _h$05 = /* @__PURE__ */ Symbol(_hs$5);
|
|
633
649
|
var _h$13 = /* @__PURE__ */ Symbol(_hs$5 + 1);
|
|
@@ -639,7 +655,7 @@ var trimTrailingNewlines = (str) => {
|
|
|
639
655
|
}
|
|
640
656
|
return str.slice(0, end);
|
|
641
657
|
};
|
|
642
|
-
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-
|
|
658
|
+
var HighlightedCodeBlockBody = /* @__PURE__ */ lazy(() => import("./highlighted-body-YMSJOAAW.js").then((mod) => ({ default: mod.HighlightedCodeBlockBody })));
|
|
643
659
|
var CodeBlock = ({
|
|
644
660
|
code,
|
|
645
661
|
language,
|
|
@@ -723,7 +739,10 @@ var CodeBlock = ({
|
|
|
723
739
|
};
|
|
724
740
|
|
|
725
741
|
// src/lib/code-block/copy-button.tsrx
|
|
726
|
-
import {
|
|
742
|
+
import {
|
|
743
|
+
createElementFromConfig as _$createElementFromConfig2,
|
|
744
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions5
|
|
745
|
+
} from "octane/internal/client";
|
|
727
746
|
import {
|
|
728
747
|
createScopedElement as _$createScopedElement5,
|
|
729
748
|
createScopedValue as _$createScopedValue7,
|
|
@@ -747,10 +766,12 @@ import {
|
|
|
747
766
|
|
|
748
767
|
// src/lib/icons.tsrx
|
|
749
768
|
import {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
} from "octane";
|
|
753
|
-
|
|
769
|
+
createHostElement as _$createHostElement2,
|
|
770
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions4
|
|
771
|
+
} from "octane/internal/client";
|
|
772
|
+
import { createScopedValue as _$createScopedValue5 } from "octane";
|
|
773
|
+
_$enableDescriptorFormActions4();
|
|
774
|
+
var CheckIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
754
775
|
"svg",
|
|
755
776
|
{
|
|
756
777
|
color: "currentColor",
|
|
@@ -760,14 +781,14 @@ var CheckIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$create
|
|
|
760
781
|
width: size,
|
|
761
782
|
...props
|
|
762
783
|
},
|
|
763
|
-
_$
|
|
784
|
+
_$createHostElement2("path", {
|
|
764
785
|
clipRule: "evenodd",
|
|
765
786
|
d: "M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",
|
|
766
787
|
fill: "currentColor",
|
|
767
788
|
fillRule: "evenodd"
|
|
768
789
|
})
|
|
769
790
|
));
|
|
770
|
-
var CopyIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
791
|
+
var CopyIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
771
792
|
"svg",
|
|
772
793
|
{
|
|
773
794
|
color: "currentColor",
|
|
@@ -777,14 +798,14 @@ var CopyIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createE
|
|
|
777
798
|
width: size,
|
|
778
799
|
...props
|
|
779
800
|
},
|
|
780
|
-
_$
|
|
801
|
+
_$createHostElement2("path", {
|
|
781
802
|
clipRule: "evenodd",
|
|
782
803
|
d: "M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",
|
|
783
804
|
fill: "currentColor",
|
|
784
805
|
fillRule: "evenodd"
|
|
785
806
|
})
|
|
786
807
|
));
|
|
787
|
-
var DownloadIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
808
|
+
var DownloadIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
788
809
|
"svg",
|
|
789
810
|
{
|
|
790
811
|
color: "currentColor",
|
|
@@ -794,14 +815,14 @@ var DownloadIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$cre
|
|
|
794
815
|
width: size,
|
|
795
816
|
...props
|
|
796
817
|
},
|
|
797
|
-
_$
|
|
818
|
+
_$createHostElement2("path", {
|
|
798
819
|
clipRule: "evenodd",
|
|
799
820
|
d: "M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",
|
|
800
821
|
fill: "currentColor",
|
|
801
822
|
fillRule: "evenodd"
|
|
802
823
|
})
|
|
803
824
|
));
|
|
804
|
-
var Loader2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
825
|
+
var Loader2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
805
826
|
"svg",
|
|
806
827
|
{
|
|
807
828
|
color: "currentColor",
|
|
@@ -811,63 +832,63 @@ var Loader2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$crea
|
|
|
811
832
|
width: size,
|
|
812
833
|
...props
|
|
813
834
|
},
|
|
814
|
-
_$
|
|
815
|
-
_$
|
|
835
|
+
_$createHostElement2("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
836
|
+
_$createHostElement2("path", {
|
|
816
837
|
d: "M8 16V12",
|
|
817
838
|
opacity: "0.5",
|
|
818
839
|
stroke: "currentColor",
|
|
819
840
|
strokeWidth: "1.5"
|
|
820
841
|
}),
|
|
821
|
-
_$
|
|
842
|
+
_$createHostElement2("path", {
|
|
822
843
|
d: "M3.29773 1.52783L5.64887 4.7639",
|
|
823
844
|
opacity: "0.9",
|
|
824
845
|
stroke: "currentColor",
|
|
825
846
|
strokeWidth: "1.5"
|
|
826
847
|
}),
|
|
827
|
-
_$
|
|
848
|
+
_$createHostElement2("path", {
|
|
828
849
|
d: "M12.7023 1.52783L10.3511 4.7639",
|
|
829
850
|
opacity: "0.1",
|
|
830
851
|
stroke: "currentColor",
|
|
831
852
|
strokeWidth: "1.5"
|
|
832
853
|
}),
|
|
833
|
-
_$
|
|
854
|
+
_$createHostElement2("path", {
|
|
834
855
|
d: "M12.7023 14.472L10.3511 11.236",
|
|
835
856
|
opacity: "0.4",
|
|
836
857
|
stroke: "currentColor",
|
|
837
858
|
strokeWidth: "1.5"
|
|
838
859
|
}),
|
|
839
|
-
_$
|
|
860
|
+
_$createHostElement2("path", {
|
|
840
861
|
d: "M3.29773 14.472L5.64887 11.236",
|
|
841
862
|
opacity: "0.6",
|
|
842
863
|
stroke: "currentColor",
|
|
843
864
|
strokeWidth: "1.5"
|
|
844
865
|
}),
|
|
845
|
-
_$
|
|
866
|
+
_$createHostElement2("path", {
|
|
846
867
|
d: "M15.6085 5.52783L11.8043 6.7639",
|
|
847
868
|
opacity: "0.2",
|
|
848
869
|
stroke: "currentColor",
|
|
849
870
|
strokeWidth: "1.5"
|
|
850
871
|
}),
|
|
851
|
-
_$
|
|
872
|
+
_$createHostElement2("path", {
|
|
852
873
|
d: "M0.391602 10.472L4.19583 9.23598",
|
|
853
874
|
opacity: "0.7",
|
|
854
875
|
stroke: "currentColor",
|
|
855
876
|
strokeWidth: "1.5"
|
|
856
877
|
}),
|
|
857
|
-
_$
|
|
878
|
+
_$createHostElement2("path", {
|
|
858
879
|
d: "M15.6085 10.4722L11.8043 9.2361",
|
|
859
880
|
opacity: "0.3",
|
|
860
881
|
stroke: "currentColor",
|
|
861
882
|
strokeWidth: "1.5"
|
|
862
883
|
}),
|
|
863
|
-
_$
|
|
884
|
+
_$createHostElement2("path", {
|
|
864
885
|
d: "M0.391602 5.52783L4.19583 6.7639",
|
|
865
886
|
opacity: "0.8",
|
|
866
887
|
stroke: "currentColor",
|
|
867
888
|
strokeWidth: "1.5"
|
|
868
889
|
})
|
|
869
890
|
));
|
|
870
|
-
var Maximize2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
891
|
+
var Maximize2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
871
892
|
"svg",
|
|
872
893
|
{
|
|
873
894
|
color: "currentColor",
|
|
@@ -877,14 +898,14 @@ var Maximize2Icon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$cr
|
|
|
877
898
|
width: size,
|
|
878
899
|
...props
|
|
879
900
|
},
|
|
880
|
-
_$
|
|
901
|
+
_$createHostElement2("path", {
|
|
881
902
|
clipRule: "evenodd",
|
|
882
903
|
d: "M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",
|
|
883
904
|
fill: "currentColor",
|
|
884
905
|
fillRule: "evenodd"
|
|
885
906
|
})
|
|
886
907
|
));
|
|
887
|
-
var RotateCcwIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
908
|
+
var RotateCcwIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
888
909
|
"svg",
|
|
889
910
|
{
|
|
890
911
|
color: "currentColor",
|
|
@@ -894,14 +915,14 @@ var RotateCcwIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$cr
|
|
|
894
915
|
width: size,
|
|
895
916
|
...props
|
|
896
917
|
},
|
|
897
|
-
_$
|
|
918
|
+
_$createHostElement2("path", {
|
|
898
919
|
clipRule: "evenodd",
|
|
899
920
|
d: "M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",
|
|
900
921
|
fill: "currentColor",
|
|
901
922
|
fillRule: "evenodd"
|
|
902
923
|
})
|
|
903
924
|
));
|
|
904
|
-
var XIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
925
|
+
var XIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
905
926
|
"svg",
|
|
906
927
|
{
|
|
907
928
|
color: "currentColor",
|
|
@@ -911,14 +932,14 @@ var XIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createElem
|
|
|
911
932
|
width: size,
|
|
912
933
|
...props
|
|
913
934
|
},
|
|
914
|
-
_$
|
|
935
|
+
_$createHostElement2("path", {
|
|
915
936
|
clipRule: "evenodd",
|
|
916
937
|
d: "M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",
|
|
917
938
|
fill: "currentColor",
|
|
918
939
|
fillRule: "evenodd"
|
|
919
940
|
})
|
|
920
941
|
));
|
|
921
|
-
var ExternalLinkIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
942
|
+
var ExternalLinkIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
922
943
|
"svg",
|
|
923
944
|
{
|
|
924
945
|
color: "currentColor",
|
|
@@ -928,14 +949,14 @@ var ExternalLinkIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _
|
|
|
928
949
|
width: size,
|
|
929
950
|
...props
|
|
930
951
|
},
|
|
931
|
-
_$
|
|
952
|
+
_$createHostElement2("path", {
|
|
932
953
|
clipRule: "evenodd",
|
|
933
954
|
d: "M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",
|
|
934
955
|
fill: "currentColor",
|
|
935
956
|
fillRule: "evenodd"
|
|
936
957
|
})
|
|
937
958
|
));
|
|
938
|
-
var ZoomInIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
959
|
+
var ZoomInIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
939
960
|
"svg",
|
|
940
961
|
{
|
|
941
962
|
color: "currentColor",
|
|
@@ -945,14 +966,14 @@ var ZoomInIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$creat
|
|
|
945
966
|
width: size,
|
|
946
967
|
...props
|
|
947
968
|
},
|
|
948
|
-
_$
|
|
969
|
+
_$createHostElement2("path", {
|
|
949
970
|
clipRule: "evenodd",
|
|
950
971
|
d: "M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",
|
|
951
972
|
fill: "currentColor",
|
|
952
973
|
fillRule: "evenodd"
|
|
953
974
|
})
|
|
954
975
|
));
|
|
955
|
-
var ZoomOutIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$
|
|
976
|
+
var ZoomOutIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$createHostElement2(
|
|
956
977
|
"svg",
|
|
957
978
|
{
|
|
958
979
|
color: "currentColor",
|
|
@@ -962,7 +983,7 @@ var ZoomOutIcon = ({ size = 16, ...props }) => _$createScopedValue5(() => _$crea
|
|
|
962
983
|
width: size,
|
|
963
984
|
...props
|
|
964
985
|
},
|
|
965
|
-
_$
|
|
986
|
+
_$createHostElement2("path", {
|
|
966
987
|
clipRule: "evenodd",
|
|
967
988
|
d: "M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",
|
|
968
989
|
fill: "currentColor",
|
|
@@ -1050,6 +1071,7 @@ var TranslationsContext = /* @__PURE__ */ createContext5(defaultTranslations);
|
|
|
1050
1071
|
var useTranslations = () => useContext5(TranslationsContext);
|
|
1051
1072
|
|
|
1052
1073
|
// src/lib/code-block/copy-button.tsrx
|
|
1074
|
+
_$enableDescriptorFormActions5();
|
|
1053
1075
|
var _hs$7 = /* @__PURE__ */ _$hookSlots7(7);
|
|
1054
1076
|
var _h$07 = /* @__PURE__ */ Symbol(_hs$7);
|
|
1055
1077
|
var _h$15 = /* @__PURE__ */ Symbol(_hs$7 + 1);
|
|
@@ -1115,7 +1137,10 @@ var CodeBlockCopyButton = ({
|
|
|
1115
1137
|
};
|
|
1116
1138
|
|
|
1117
1139
|
// src/lib/code-block/download-button.tsrx
|
|
1118
|
-
import {
|
|
1140
|
+
import {
|
|
1141
|
+
createElementFromConfig as _$createElementFromConfig3,
|
|
1142
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions6
|
|
1143
|
+
} from "octane/internal/client";
|
|
1119
1144
|
import {
|
|
1120
1145
|
createScopedElement as _$createScopedElement6,
|
|
1121
1146
|
createScopedValue as _$createScopedValue8,
|
|
@@ -1123,6 +1148,7 @@ import {
|
|
|
1123
1148
|
useContext as useContext7,
|
|
1124
1149
|
withSlot as _$withSlot6
|
|
1125
1150
|
} from "octane";
|
|
1151
|
+
_$enableDescriptorFormActions6();
|
|
1126
1152
|
var _hs$8 = /* @__PURE__ */ _$hookSlots8(4);
|
|
1127
1153
|
var _h$08 = /* @__PURE__ */ Symbol(_hs$8);
|
|
1128
1154
|
var _h$16 = /* @__PURE__ */ Symbol(_hs$8 + 1);
|
|
@@ -1479,14 +1505,16 @@ var CodeBlockDownloadButton = ({
|
|
|
1479
1505
|
|
|
1480
1506
|
// src/lib/code-block/skeleton.tsrx
|
|
1481
1507
|
import {
|
|
1482
|
-
|
|
1508
|
+
createElementFromConfig as _$createElementFromConfig4,
|
|
1509
|
+
createHostElement as _$createHostElement3
|
|
1510
|
+
} from "octane/internal/client";
|
|
1511
|
+
import {
|
|
1483
1512
|
createScopedElement as _$createScopedElement7,
|
|
1484
1513
|
createScopedValue as _$createScopedValue9,
|
|
1485
1514
|
hookSlots as _$hookSlots9,
|
|
1486
1515
|
positionalChildren as _$positionalChildren2,
|
|
1487
1516
|
withSlot as _$withSlot7
|
|
1488
1517
|
} from "octane";
|
|
1489
|
-
import { createElementFromConfig as _$createElementFromConfig4 } from "octane/internal/client";
|
|
1490
1518
|
var _hs$9 = /* @__PURE__ */ _$hookSlots9(2);
|
|
1491
1519
|
var _h$09 = /* @__PURE__ */ Symbol(_hs$9);
|
|
1492
1520
|
var _h$17 = /* @__PURE__ */ Symbol(_hs$9 + 1);
|
|
@@ -1499,7 +1527,7 @@ var CodeBlockSkeleton = () => {
|
|
|
1499
1527
|
className: cn2("w-full divide-y divide-border overflow-hidden rounded-xl border border-border")
|
|
1500
1528
|
},
|
|
1501
1529
|
() => _$positionalChildren2([
|
|
1502
|
-
_$createScopedValue9(() => _$
|
|
1530
|
+
_$createScopedValue9(() => _$createHostElement3("div", { className: cn2("h-[46px] w-full bg-muted/80") })),
|
|
1503
1531
|
_$createScopedValue9(() => _$createScopedElement7("div", { className: cn2("flex w-full items-center justify-center p-4") }, () => _$createScopedValue9(() => _$createElementFromConfig4("c:3a952379", Loader2Icon2, { className: cn2("size-4 animate-spin") }))))
|
|
1504
1532
|
])
|
|
1505
1533
|
));
|
|
@@ -1508,7 +1536,6 @@ var CodeBlockSkeleton = () => {
|
|
|
1508
1536
|
// src/lib/image.tsrx
|
|
1509
1537
|
import {
|
|
1510
1538
|
createElement,
|
|
1511
|
-
createElement as _$createElement4,
|
|
1512
1539
|
createScopedElement as _$createScopedElement8,
|
|
1513
1540
|
createScopedValue as _$createScopedValue10,
|
|
1514
1541
|
hookSlots as _$hookSlots10,
|
|
@@ -1521,6 +1548,7 @@ import {
|
|
|
1521
1548
|
} from "octane";
|
|
1522
1549
|
import {
|
|
1523
1550
|
createElementFromConfig as _$createElementFromConfig5,
|
|
1551
|
+
createHostElement as _$createHostElement4,
|
|
1524
1552
|
memoPublish as _$memoPublish4,
|
|
1525
1553
|
memoSlot as _$memoSlot4,
|
|
1526
1554
|
memoTake2 as _$memoTake22
|
|
@@ -1650,7 +1678,7 @@ var ImageComponent = ({
|
|
|
1650
1678
|
},
|
|
1651
1679
|
() => t.imageNotAvailable
|
|
1652
1680
|
)),
|
|
1653
|
-
_$createScopedValue10(() => _$
|
|
1681
|
+
_$createScopedValue10(() => _$createHostElement4("div", {
|
|
1654
1682
|
className: cn2("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")
|
|
1655
1683
|
})),
|
|
1656
1684
|
showDownload && _$createScopedValue10(() => _$createScopedElement8(
|
|
@@ -2069,7 +2097,11 @@ import {
|
|
|
2069
2097
|
useState as useState6,
|
|
2070
2098
|
withSlot as _$withSlot12
|
|
2071
2099
|
} from "octane";
|
|
2072
|
-
import {
|
|
2100
|
+
import {
|
|
2101
|
+
createElementFromConfig as _$createElementFromConfig8,
|
|
2102
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions7
|
|
2103
|
+
} from "octane/internal/client";
|
|
2104
|
+
_$enableDescriptorFormActions7();
|
|
2073
2105
|
var _hs$14 = /* @__PURE__ */ _$hookSlots14(6);
|
|
2074
2106
|
var _h$014 = /* @__PURE__ */ Symbol(_hs$14);
|
|
2075
2107
|
var _h$112 = /* @__PURE__ */ Symbol(_hs$14 + 1);
|
|
@@ -2191,7 +2223,10 @@ var MermaidFullscreenButton = ({ chart, config, onFullscreen, onExit, className,
|
|
|
2191
2223
|
};
|
|
2192
2224
|
|
|
2193
2225
|
// src/lib/table/index.tsrx
|
|
2194
|
-
import {
|
|
2226
|
+
import {
|
|
2227
|
+
createElementFromConfig as _$createElementFromConfig12,
|
|
2228
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions8
|
|
2229
|
+
} from "octane/internal/client";
|
|
2195
2230
|
import {
|
|
2196
2231
|
createScopedElement as _$createScopedElement15,
|
|
2197
2232
|
createScopedValue as _$createScopedValue17,
|
|
@@ -2779,6 +2814,7 @@ var TableFullscreenButton = ({ children, className, showCopy = true, showDownloa
|
|
|
2779
2814
|
};
|
|
2780
2815
|
|
|
2781
2816
|
// src/lib/table/index.tsrx
|
|
2817
|
+
_$enableDescriptorFormActions8();
|
|
2782
2818
|
var _hs$18 = /* @__PURE__ */ _$hookSlots18(1);
|
|
2783
2819
|
var _h$018 = /* @__PURE__ */ Symbol(_hs$18);
|
|
2784
2820
|
var Table = ({
|
|
@@ -2827,6 +2863,8 @@ var Table = ({
|
|
|
2827
2863
|
};
|
|
2828
2864
|
|
|
2829
2865
|
// src/lib/components.tsrx
|
|
2866
|
+
_$enableDescriptorFormActions9();
|
|
2867
|
+
_$enableDescriptorFragmentRefs2();
|
|
2830
2868
|
var _hs$19 = /* @__PURE__ */ _$hookSlots19(28);
|
|
2831
2869
|
var _h$019 = /* @__PURE__ */ Symbol(_hs$19);
|
|
2832
2870
|
var _h$116 = /* @__PURE__ */ Symbol(_hs$19 + 1);
|
|
@@ -2858,7 +2896,7 @@ var _h$262 = /* @__PURE__ */ Symbol(_hs$19 + 26);
|
|
|
2858
2896
|
var _h$272 = /* @__PURE__ */ Symbol(_hs$19 + 27);
|
|
2859
2897
|
var START_LINE_PATTERN = /startLine=(\d+)/;
|
|
2860
2898
|
var NO_LINE_NUMBERS_PATTERN = /\bnoLineNumbers\b/;
|
|
2861
|
-
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-
|
|
2899
|
+
var Mermaid2 = /* @__PURE__ */ lazy2(() => import("./mermaid-TMTPUHUW.js").then((mod) => ({ default: mod.Mermaid })));
|
|
2862
2900
|
var LANGUAGE_REGEX = /language-([^\s]+)/;
|
|
2863
2901
|
function sameNodePosition(prev, next) {
|
|
2864
2902
|
if (!(prev?.position || next?.position)) {
|
|
@@ -2972,7 +3010,7 @@ Object.assign(MemoUl, { displayName: "MarkdownUl" });
|
|
|
2972
3010
|
var MemoHr = /* @__PURE__ */ memo2(
|
|
2973
3011
|
({ className, node, ...props }) => {
|
|
2974
3012
|
const cn2 = _$withSlot17(_h$312, useCn);
|
|
2975
|
-
return _$createScopedValue18(() => _$
|
|
3013
|
+
return _$createScopedValue18(() => _$createHostElement5("hr", {
|
|
2976
3014
|
className: cn2("my-6 border-border", className),
|
|
2977
3015
|
"data-streamdown": "horizontal-rule",
|
|
2978
3016
|
...props
|
|
@@ -3461,7 +3499,7 @@ var CodeComponent = ({ node, className, children, ...props }) => {
|
|
|
3461
3499
|
{
|
|
3462
3500
|
className: cn2("flex h-8 items-center text-muted-foreground text-xs")
|
|
3463
3501
|
},
|
|
3464
|
-
() => _$createScopedValue18(() => _$
|
|
3502
|
+
() => _$createScopedValue18(() => _$createHostElement5("span", { className: cn2("ml-1 font-mono lowercase") }, "mermaid"))
|
|
3465
3503
|
)),
|
|
3466
3504
|
shouldShowMermaidControls ? _$createScopedValue18(() => _$createScopedElement16(
|
|
3467
3505
|
"div",
|
|
@@ -4056,6 +4094,8 @@ var remarkCodeMeta = () => (tree) => {
|
|
|
4056
4094
|
};
|
|
4057
4095
|
|
|
4058
4096
|
// src/index.tsrx
|
|
4097
|
+
_$enableDescriptorFormActions10();
|
|
4098
|
+
_$enableDescriptorFragmentRefs3();
|
|
4059
4099
|
var _hs$20 = /* @__PURE__ */ _$hookSlots20(24);
|
|
4060
4100
|
var _h$020 = /* @__PURE__ */ Symbol(_hs$20);
|
|
4061
4101
|
var _h$117 = /* @__PURE__ */ Symbol(_hs$20 + 1);
|
|
@@ -4533,7 +4573,7 @@ var Streamdown = /* @__PURE__ */ memo3(({
|
|
|
4533
4573
|
style
|
|
4534
4574
|
},
|
|
4535
4575
|
() => _$positionalChildren12([
|
|
4536
|
-
blocksToRender.length === 0 && caret && isAnimating && _$
|
|
4576
|
+
blocksToRender.length === 0 && caret && isAnimating && _$createHostElement6("span", {}),
|
|
4537
4577
|
blocksToRender.map((block, index) => {
|
|
4538
4578
|
const isLastBlock = index === blocksToRender.length - 1;
|
|
4539
4579
|
const isIncomplete = isAnimating && isLastBlock && hasIncompleteCodeFence(block);
|
|
@@ -4904,7 +4944,7 @@ var Mermaid = ({
|
|
|
4904
4944
|
_h$94
|
|
4905
4945
|
);
|
|
4906
4946
|
if (!(shouldRender || svgContent || lastValidSvg)) {
|
|
4907
|
-
return _$createScopedValue21(() => _$
|
|
4947
|
+
return _$createScopedValue21(() => _$createHostElement7("div", {
|
|
4908
4948
|
className: cn2("my-4 min-h-[200px]", className),
|
|
4909
4949
|
ref: containerRef
|
|
4910
4950
|
}));
|
|
@@ -4922,10 +4962,10 @@ var Mermaid = ({
|
|
|
4922
4962
|
className: cn2("flex items-center space-x-2 text-muted-foreground")
|
|
4923
4963
|
},
|
|
4924
4964
|
() => _$positionalChildren14([
|
|
4925
|
-
_$createScopedValue21(() => _$
|
|
4965
|
+
_$createScopedValue21(() => _$createHostElement7("div", {
|
|
4926
4966
|
className: cn2("h-4 w-4 animate-spin rounded-full border-current border-b-2")
|
|
4927
4967
|
})),
|
|
4928
|
-
_$createScopedValue21(() => _$
|
|
4968
|
+
_$createScopedValue21(() => _$createHostElement7("span", { className: cn2("text-sm") }, "Loading diagram..."))
|
|
4929
4969
|
])
|
|
4930
4970
|
))
|
|
4931
4971
|
));
|
|
@@ -4944,7 +4984,7 @@ var Mermaid = ({
|
|
|
4944
4984
|
() => _$positionalChildren14([
|
|
4945
4985
|
_$createScopedValue21(() => _$createScopedElement19("p", { className: cn2("font-mono text-red-700 text-sm") }, () => _$positionalChildren14(["Mermaid Error:", error]))),
|
|
4946
4986
|
_$createScopedValue21(() => _$createScopedElement19("details", { className: cn2("mt-2") }, () => _$positionalChildren14([
|
|
4947
|
-
_$createScopedValue21(() => _$
|
|
4987
|
+
_$createScopedValue21(() => _$createHostElement7("summary", { className: cn2("cursor-pointer text-red-600 text-xs") }, "Show Code")),
|
|
4948
4988
|
_$createScopedValue21(() => _$createScopedElement19(
|
|
4949
4989
|
"pre",
|
|
4950
4990
|
{
|
|
@@ -4974,7 +5014,7 @@ var Mermaid = ({
|
|
|
4974
5014
|
showControls,
|
|
4975
5015
|
zoomStep: 0.1
|
|
4976
5016
|
},
|
|
4977
|
-
() => _$createScopedValue21(() => _$
|
|
5017
|
+
() => _$createScopedValue21(() => _$createHostElement7("div", {
|
|
4978
5018
|
"aria-label": "Mermaid chart",
|
|
4979
5019
|
className: cn2("flex justify-center", fullscreen ? "size-full items-center" : null),
|
|
4980
5020
|
dangerouslySetInnerHTML: { __html: displaySvg },
|
|
@@ -3,11 +3,13 @@ import {
|
|
|
3
3
|
CodeBlockBody,
|
|
4
4
|
StreamdownContext,
|
|
5
5
|
useCodePlugin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BZ3EPYN5.js";
|
|
7
7
|
|
|
8
8
|
// src/lib/code-block/highlighted-body.tsrx
|
|
9
9
|
import {
|
|
10
10
|
createElementFromConfig as _$createElementFromConfig,
|
|
11
|
+
enableDescriptorFormActions as _$enableDescriptorFormActions,
|
|
12
|
+
enableDescriptorFragmentRefs as _$enableDescriptorFragmentRefs,
|
|
11
13
|
memoPublish as _$memoPublish,
|
|
12
14
|
memoSlot as _$memoSlot,
|
|
13
15
|
memoTake4 as _$memoTake4
|
|
@@ -22,6 +24,8 @@ import {
|
|
|
22
24
|
useState,
|
|
23
25
|
withSlot as _$withSlot
|
|
24
26
|
} from "octane";
|
|
27
|
+
_$enableDescriptorFormActions();
|
|
28
|
+
_$enableDescriptorFragmentRefs();
|
|
25
29
|
var _hs$ = /* @__PURE__ */ _$hookSlots(5);
|
|
26
30
|
var _h$0 = /* @__PURE__ */ Symbol(_hs$);
|
|
27
31
|
var _h$1 = /* @__PURE__ */ Symbol(_hs$ + 1);
|
package/dist/client/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/streamdown",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -92,14 +92,16 @@
|
|
|
92
92
|
"unist-util-visit-parents": "^6.0.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"octane": "^0.
|
|
95
|
+
"octane": "^0.10.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
+
"@octanejs/testing-library": "0.1.60",
|
|
98
99
|
"@testing-library/jest-dom": "^6.9.1",
|
|
99
100
|
"@tsrx/react": "^0.3.7",
|
|
100
101
|
"@types/react": "^19.2.17",
|
|
101
102
|
"@types/react-dom": "^19.2.3",
|
|
102
103
|
"esbuild": "^0.28.1",
|
|
104
|
+
"octane": "0.10.2",
|
|
103
105
|
"react": "19.2.7",
|
|
104
106
|
"react-dom": "19.2.7",
|
|
105
107
|
"streamdown": "2.5.0",
|
|
@@ -107,9 +109,7 @@
|
|
|
107
109
|
"@streamdown/math": "1.0.2",
|
|
108
110
|
"@streamdown/mermaid": "1.0.2",
|
|
109
111
|
"@streamdown/cjk": "1.0.3",
|
|
110
|
-
"vitest": "^4.1.10"
|
|
111
|
-
"@octanejs/testing-library": "0.1.58",
|
|
112
|
-
"octane": "0.9.0"
|
|
112
|
+
"vitest": "^4.1.10"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|
|
115
115
|
"build": "node scripts/build.mjs",
|