markstream-angular 2.0.7 → 2.0.8
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
|
@@ -31,6 +31,8 @@ markstream-angular {
|
|
|
31
31
|
--ms-inset-panel-y: 0.375rem;
|
|
32
32
|
--ms-gap-header-main: 0.625rem;
|
|
33
33
|
--ms-gap-header-actions: 0.125rem;
|
|
34
|
+
--ms-size-diagram-min-height: 360px;
|
|
35
|
+
--ms-size-code-max-height: 500px;
|
|
34
36
|
/* Unified default code surface; explicit editor themes may override it. */
|
|
35
37
|
--code-bg: #fff;
|
|
36
38
|
--code-fg: hsl(0 0% 10%);
|
|
@@ -1470,16 +1472,35 @@ body > div[id^="dmermaid-"] {
|
|
|
1470
1472
|
line-height: 1.5;
|
|
1471
1473
|
}
|
|
1472
1474
|
|
|
1475
|
+
/* Center the rendered diagram like the mermaid/infographic blocks: a column
|
|
1476
|
+
flex container with margin:auto children stays centered while remaining
|
|
1477
|
+
scroll-safe when content overflows. */
|
|
1473
1478
|
.markstream-angular .d2-render {
|
|
1479
|
+
max-height: var(--ms-size-code-max-height);
|
|
1474
1480
|
overflow: auto;
|
|
1481
|
+
display: flex;
|
|
1482
|
+
flex-direction: column;
|
|
1475
1483
|
}
|
|
1476
1484
|
|
|
1477
|
-
.markstream-angular .d2-svg
|
|
1478
|
-
|
|
1485
|
+
.markstream-angular .d2-svg {
|
|
1486
|
+
margin: auto;
|
|
1487
|
+
width: 100%;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.markstream-angular .d2-render .d2-error {
|
|
1491
|
+
margin-left: auto;
|
|
1492
|
+
margin-right: auto;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/* Root svg with class .markstream-d2-root-svg: cap it with the same token as
|
|
1496
|
+
the container so tall diagrams scale down to fit, mirroring the mermaid
|
|
1497
|
+
block's max-height behavior. */
|
|
1498
|
+
.markstream-angular .d2-svg svg.markstream-d2-root-svg {
|
|
1499
|
+
width: 100%;
|
|
1479
1500
|
max-width: 100%;
|
|
1480
1501
|
height: auto;
|
|
1502
|
+
max-height: var(--ms-d2-render-max-height, var(--ms-size-code-max-height));
|
|
1481
1503
|
display: block;
|
|
1482
|
-
margin: 0 auto;
|
|
1483
1504
|
}
|
|
1484
1505
|
|
|
1485
1506
|
.markstream-angular .mode-btn {
|
|
@@ -1514,8 +1535,23 @@ body > div[id^="dmermaid-"] {
|
|
|
1514
1535
|
.markstream-angular .infographic-render {
|
|
1515
1536
|
position: relative;
|
|
1516
1537
|
width: 100%;
|
|
1517
|
-
min-height:
|
|
1538
|
+
min-height: var(--ms-size-diagram-min-height);
|
|
1518
1539
|
overflow: auto;
|
|
1540
|
+
display: flex;
|
|
1541
|
+
flex-direction: column;
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
/* Keep the diagram fully visible and centered like the mermaid block: scale
|
|
1545
|
+
down proportionally inside the preview area. Scoped to the preview host so
|
|
1546
|
+
the fullscreen modal (.fullscreen host) keeps its own sizing. The column
|
|
1547
|
+
flex container with margin:auto children stays centered while remaining
|
|
1548
|
+
scroll-safe when content overflows. */
|
|
1549
|
+
.markstream-angular .infographic-render svg {
|
|
1550
|
+
max-width: 100%;
|
|
1551
|
+
max-height: 100%;
|
|
1552
|
+
width: auto;
|
|
1553
|
+
height: auto;
|
|
1554
|
+
margin: auto;
|
|
1519
1555
|
}
|
|
1520
1556
|
|
|
1521
1557
|
.markstream-angular .infographic-pending-source {
|
package/dist/index.d.ts
CHANGED
|
@@ -446,7 +446,7 @@ declare class D2BlockNodeComponent implements AfterViewInit, OnChanges, OnDestro
|
|
|
446
446
|
get resolvedShowExportButton(): boolean;
|
|
447
447
|
get resolvedShowCollapseButton(): boolean;
|
|
448
448
|
get resolvedShowTooltips(): boolean;
|
|
449
|
-
get
|
|
449
|
+
get resolvedRenderStyle(): string;
|
|
450
450
|
get resolvedLoading(): boolean;
|
|
451
451
|
get resolvedProgressiveRender(): boolean;
|
|
452
452
|
ngAfterViewInit(): void;
|
|
@@ -645,6 +645,13 @@ declare class InfographicBlockNodeComponent implements AfterViewInit, OnChanges,
|
|
|
645
645
|
get resolvedShowTooltips(): boolean;
|
|
646
646
|
get resolvedMaxHeight(): string;
|
|
647
647
|
get estimatedPreviewHeightPx(): number;
|
|
648
|
+
/**
|
|
649
|
+
* Resolve the diagram preview minimum height from the density CSS token
|
|
650
|
+
* (--ms-size-diagram-min-height), falling back to the built-in default.
|
|
651
|
+
* Mirrors MermaidBlockNode's resolveDiagramMinHeight; SSR falls back to the
|
|
652
|
+
* constant because getComputedStyle is browser-only.
|
|
653
|
+
*/
|
|
654
|
+
private resolveDiagramMinHeight;
|
|
648
655
|
get resolvedContainerMinHeight(): string;
|
|
649
656
|
private get maxPreviewHeight();
|
|
650
657
|
private resolveContainerMinHeight;
|
|
@@ -848,6 +855,13 @@ declare class MermaidBlockNodeComponent implements AfterViewInit, OnChanges, OnD
|
|
|
848
855
|
get resolvedShowTooltips(): boolean;
|
|
849
856
|
get resolvedMaxHeight(): string;
|
|
850
857
|
get estimatedPreviewHeightPx(): number;
|
|
858
|
+
/**
|
|
859
|
+
* Resolve the diagram preview minimum height from the density CSS token
|
|
860
|
+
* (--ms-size-diagram-min-height), falling back to the built-in default.
|
|
861
|
+
* Mirrors the vue3 renderer's resolveMinContainerHeight; SSR falls back to
|
|
862
|
+
* the constant because getComputedStyle is browser-only.
|
|
863
|
+
*/
|
|
864
|
+
private resolveDiagramMinHeight;
|
|
851
865
|
private get maxPreviewHeight();
|
|
852
866
|
get resolvedWorkerTimeout(): number;
|
|
853
867
|
get resolvedParseTimeout(): number;
|
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.8",
|
|
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
|
-
"
|
|
98
|
-
"
|
|
97
|
+
"markstream-core": "2.0.8",
|
|
98
|
+
"stream-markdown-parser": "1.2.14"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@angular/common": "^20.3.26",
|