@oh-my-pi/pi-tui 14.2.1 → 14.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +6 -6
- package/src/components/markdown.ts +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [14.3.0] - 2026-04-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed shared Markdown Mermaid fenced-block rendering to resolve diagrams from fenced source text instead of external prerender state
|
|
10
|
+
|
|
5
11
|
## [14.1.1] - 2026-04-14
|
|
6
12
|
|
|
7
13
|
### Breaking Changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-tui",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.4.0",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://github.com/can1357/oh-my-pi",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"fmt": "biome format --write ."
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oh-my-pi/pi-natives": "14.
|
|
41
|
-
"@oh-my-pi/pi-utils": "14.
|
|
42
|
-
"marked": "^
|
|
40
|
+
"@oh-my-pi/pi-natives": "14.4.0",
|
|
41
|
+
"@oh-my-pi/pi-utils": "14.4.0",
|
|
42
|
+
"marked": "^18.0.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"chalk": "^5.6",
|
|
46
|
-
"@xterm/headless": "^6.0"
|
|
45
|
+
"chalk": "^5.6.2",
|
|
46
|
+
"@xterm/headless": "^6.0.0"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"bun": ">=1.3.7"
|
|
@@ -44,10 +44,10 @@ export interface MarkdownTheme {
|
|
|
44
44
|
underline: (text: string) => string;
|
|
45
45
|
highlightCode?: (code: string, lang?: string) => string[];
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Resolve a mermaid ASCII rendering by fenced block source text.
|
|
48
48
|
* Return null to fall back to fenced code rendering.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
resolveMermaidAscii?: (source: string) => string | null;
|
|
51
51
|
symbols: SymbolTheme;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -323,9 +323,8 @@ export class Markdown implements Component {
|
|
|
323
323
|
|
|
324
324
|
case "code": {
|
|
325
325
|
// Handle mermaid diagrams with ASCII rendering when available
|
|
326
|
-
if (token.lang === "mermaid" && this.#theme.
|
|
327
|
-
const
|
|
328
|
-
const ascii = this.#theme.getMermaidAscii(hash);
|
|
326
|
+
if (token.lang === "mermaid" && this.#theme.resolveMermaidAscii) {
|
|
327
|
+
const ascii = this.#theme.resolveMermaidAscii(token.text);
|
|
329
328
|
|
|
330
329
|
if (ascii) {
|
|
331
330
|
for (const asciiLine of Bun.stripANSI(ascii).split("\n")) {
|