markstream-angular 2.0.12 → 2.0.14
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.css
CHANGED
|
@@ -875,9 +875,14 @@ body > div[id^="dmermaid-"] {
|
|
|
875
875
|
color: #bfdbfe;
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
/* The pan transform is applied to `.mermaid-preview` itself, and a transformed
|
|
879
|
+
element paints above the header it overlaps; the body is what clips the panned
|
|
880
|
+
diagram back into the preview area. clip (not auto/hidden) means it is not a
|
|
881
|
+
scroll container at all, so a touch swipe keeps scrolling the page. */
|
|
878
882
|
.markstream-angular .mermaid-body {
|
|
879
883
|
position: relative;
|
|
880
884
|
padding: 1rem;
|
|
885
|
+
overflow: clip;
|
|
881
886
|
}
|
|
882
887
|
|
|
883
888
|
.markstream-angular .mermaid-preview {
|
|
@@ -1536,7 +1541,9 @@ body > div[id^="dmermaid-"] {
|
|
|
1536
1541
|
position: relative;
|
|
1537
1542
|
width: 100%;
|
|
1538
1543
|
min-height: var(--ms-size-diagram-min-height);
|
|
1539
|
-
|
|
1544
|
+
/* clip, not auto — a scrollable pan surface latches touch swipes and stops
|
|
1545
|
+
the page from scrolling at fit zoom; clip is never a scroll container. */
|
|
1546
|
+
overflow: clip;
|
|
1540
1547
|
display: flex;
|
|
1541
1548
|
flex-direction: column;
|
|
1542
1549
|
}
|
|
@@ -1554,6 +1561,14 @@ body > div[id^="dmermaid-"] {
|
|
|
1554
1561
|
margin: auto;
|
|
1555
1562
|
}
|
|
1556
1563
|
|
|
1564
|
+
/* The pan transform is applied to .infographic-render itself, so the body is
|
|
1565
|
+
what clips the panned diagram back into the preview area. clip (not the base
|
|
1566
|
+
__body's auto) so it is not a scroll container a swipe could latch on — with
|
|
1567
|
+
maxHeight the auto body has a hidden scroll range that eats the gesture. */
|
|
1568
|
+
.markstream-angular .markstream-angular-enhanced-block--infographic .markstream-angular-enhanced-block__body {
|
|
1569
|
+
overflow: clip;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1557
1572
|
.markstream-angular .infographic-pending-source {
|
|
1558
1573
|
position: absolute;
|
|
1559
1574
|
inset: 0;
|
package/dist/index.d.ts
CHANGED
|
@@ -612,6 +612,9 @@ declare class InfographicBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
612
612
|
showSource: boolean;
|
|
613
613
|
modalOpen: boolean;
|
|
614
614
|
zoom: number;
|
|
615
|
+
translateX: number;
|
|
616
|
+
translateY: number;
|
|
617
|
+
isDragging: boolean;
|
|
615
618
|
error: string;
|
|
616
619
|
containerMinHeight: string;
|
|
617
620
|
svgMarkup: string;
|
|
@@ -621,6 +624,7 @@ declare class InfographicBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
621
624
|
private renderScheduled;
|
|
622
625
|
private copyTimer;
|
|
623
626
|
private infographicInstance;
|
|
627
|
+
private readonly panGesture;
|
|
624
628
|
get mergedProps(): {
|
|
625
629
|
[x: string]: any;
|
|
626
630
|
maxHeight?: string | null;
|
|
@@ -657,7 +661,23 @@ declare class InfographicBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
657
661
|
private resolveContainerMinHeight;
|
|
658
662
|
get resolvedLoading(): boolean;
|
|
659
663
|
get resolvedProgressiveRender(): boolean;
|
|
664
|
+
/**
|
|
665
|
+
* The diagram is scaled to fit the preview box, so at fit zoom nothing is
|
|
666
|
+
* off-screen and panning only shifts it inside the box. Touch therefore keeps
|
|
667
|
+
* scrolling the page at that zoom (a chat is mostly scrolling) and only claims
|
|
668
|
+
* the gesture once the diagram is zoomed in and actually overflows the box.
|
|
669
|
+
* The fullscreen modal always claims it: the surface fills the viewport, panning
|
|
670
|
+
* is the intended gesture there, and the page behind it is locked anyway.
|
|
671
|
+
*/
|
|
672
|
+
get panSurfaceClaimsTouch(): boolean;
|
|
673
|
+
get previewTransform(): string;
|
|
660
674
|
get modalTransform(): string;
|
|
675
|
+
/**
|
|
676
|
+
* Whether a pan surface holds a rendered diagram. The modal renders its own
|
|
677
|
+
* copy of the SVG, so it is checked as well: the source panel may have taken
|
|
678
|
+
* the inline preview's place while the modal is open.
|
|
679
|
+
*/
|
|
680
|
+
private hasDiagramSvg;
|
|
661
681
|
ngAfterViewInit(): void;
|
|
662
682
|
ngOnChanges(): void;
|
|
663
683
|
ngOnDestroy(): void;
|
|
@@ -671,6 +691,7 @@ declare class InfographicBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
671
691
|
toggleCollapsed(): void;
|
|
672
692
|
adjustZoom(delta: number): void;
|
|
673
693
|
resetZoom(): void;
|
|
694
|
+
onPanStart(event: PointerEvent): void;
|
|
674
695
|
private scheduleInfographicRender;
|
|
675
696
|
private renderInfographic;
|
|
676
697
|
private destroyInfographic;
|
|
@@ -817,6 +838,9 @@ declare class MermaidBlockNodeComponent implements AfterViewInit, OnChanges, OnD
|
|
|
817
838
|
showSource: boolean;
|
|
818
839
|
modalOpen: boolean;
|
|
819
840
|
zoom: number;
|
|
841
|
+
translateX: number;
|
|
842
|
+
translateY: number;
|
|
843
|
+
isDragging: boolean;
|
|
820
844
|
svgMarkup: string;
|
|
821
845
|
error: string;
|
|
822
846
|
private viewReady;
|
|
@@ -824,6 +848,7 @@ declare class MermaidBlockNodeComponent implements AfterViewInit, OnChanges, OnD
|
|
|
824
848
|
private renderToken;
|
|
825
849
|
private copyTimer;
|
|
826
850
|
private lastMermaidBindFunctions;
|
|
851
|
+
private readonly panGesture;
|
|
827
852
|
get mergedProps(): {
|
|
828
853
|
[x: string]: any;
|
|
829
854
|
maxHeight?: string | null;
|
|
@@ -870,8 +895,23 @@ declare class MermaidBlockNodeComponent implements AfterViewInit, OnChanges, OnD
|
|
|
870
895
|
get strictMode(): boolean;
|
|
871
896
|
get resolvedLoading(): boolean;
|
|
872
897
|
get resolvedProgressiveRender(): boolean;
|
|
898
|
+
/**
|
|
899
|
+
* The diagram is scaled to fit the preview box, so at fit zoom nothing is
|
|
900
|
+
* off-screen and panning only shifts it inside the box. Touch therefore keeps
|
|
901
|
+
* scrolling the page at that zoom (a chat is mostly scrolling) and only claims
|
|
902
|
+
* the gesture once the diagram is zoomed in and actually overflows the box.
|
|
903
|
+
* The fullscreen modal always claims it: the surface fills the viewport, panning
|
|
904
|
+
* is the intended gesture there, and the page behind it is locked anyway.
|
|
905
|
+
*/
|
|
906
|
+
get panSurfaceClaimsTouch(): boolean;
|
|
873
907
|
get previewTransform(): string;
|
|
874
908
|
get modalTransform(): string;
|
|
909
|
+
/**
|
|
910
|
+
* Whether a pan surface holds a rendered diagram. The modal renders its own
|
|
911
|
+
* copy of the SVG, so it is checked as well: the source panel may have taken
|
|
912
|
+
* the inline preview's place while the modal is open.
|
|
913
|
+
*/
|
|
914
|
+
private hasDiagramSvg;
|
|
875
915
|
ngAfterViewInit(): void;
|
|
876
916
|
ngOnChanges(): void;
|
|
877
917
|
ngOnDestroy(): void;
|
|
@@ -885,6 +925,7 @@ declare class MermaidBlockNodeComponent implements AfterViewInit, OnChanges, OnD
|
|
|
885
925
|
toggleCollapsed(): void;
|
|
886
926
|
adjustZoom(delta: number): void;
|
|
887
927
|
resetZoom(): void;
|
|
928
|
+
onPanStart(event: PointerEvent): void;
|
|
888
929
|
handleModalWheel(event: WheelEvent): void;
|
|
889
930
|
private renderDiagram;
|
|
890
931
|
private syncSvgHosts;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-angular",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.14",
|
|
5
5
|
"description": "Angular 20+ standalone streaming Markdown renderer for AI chat, LLM token streams, SSE/WebSocket output, incomplete Markdown, Mermaid, KaTeX, stream-diffs powered code blocks, and safe Angular component rendering.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@floating-ui/dom": "^1.8.0",
|
|
97
|
-
"markstream-core": "2.0.
|
|
98
|
-
"stream-markdown-parser": "1.2.
|
|
97
|
+
"markstream-core": "2.0.14",
|
|
98
|
+
"stream-markdown-parser": "1.2.17"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@angular/common": "^20.3.26",
|