@oh-my-pi/pi-tui 18.1.13 → 18.1.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/CHANGELOG.md CHANGED
@@ -2,11 +2,22 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [18.1.12] - 2026-09-06
5
+ ## [18.1.14] - 2026-09-07
6
+
7
+ ### Fixed
8
+
9
+ - `extractMarkdownLinks()` now returns one-row visible labels for formatted and multiline links ([#11086](https://github.com/can1357/oh-my-pi/pull/11086) by [@mustafaabidali](https://github.com/mustafaabidali)).
10
+
11
+ ## [18.1.13] - 2026-09-07
6
12
 
7
13
  ### Fixed
8
14
 
9
15
  - Fixed notifications never arriving in a Herdr pane. Herdr multiplexes panes like tmux but swallows bare OSC 9 / OSC 99 and has no passthrough envelope, so a backgrounded pane got no signal at all; delivery now goes through `herdr notification show` (a waiting question or an error rings `request`, a settled turn rings `done`), and the in-band write stays as the fallback when the pane id or the `herdr` binary is missing.
16
+
17
+ ## [18.1.12] - 2026-09-06
18
+
19
+ ### Fixed
20
+
10
21
  - Avoid inserting a trailing space when auto-completing directory paths with `@`, and keep autocomplete open when accepting a directory with Tab or Enter.
11
22
  - Horizontal wheel reports (the sideways drift of a two-finger trackpad scroll) no longer decode as a vertical wheel direction, so fullscreen selectors such as `/copy` and the rewind picker stop jumping up and back down at the end of a scroll gesture.
12
23
 
@@ -14,7 +14,7 @@ export declare function resetFastTailSplices(): void;
14
14
  export declare function fastLineStartHazard(grownLine: string): boolean;
15
15
  /** A hyperlink as the renderer sees it: inline `[text](href)`, `<autolink>`, bare GFM URL, or reference link. */
16
16
  export interface MarkdownLink {
17
- /** Visible link text (equals `href` for autolinks and bare URLs). */
17
+ /** Flattened visible label with whitespace collapsed to one row; falls back to `href` when empty. */
18
18
  text: string;
19
19
  /** Destination exactly as marked resolved it (references resolved, no normalization). */
20
20
  href: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-tui",
4
- "version": "18.1.13",
4
+ "version": "18.1.14",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Stencil Labs, Inc.",
@@ -37,8 +37,8 @@
37
37
  "fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
38
38
  },
39
39
  "dependencies": {
40
- "@oh-my-pi/pi-natives": "18.1.13",
41
- "@oh-my-pi/pi-utils": "18.1.13"
40
+ "@oh-my-pi/pi-natives": "18.1.14",
41
+ "@oh-my-pi/pi-utils": "18.1.14"
42
42
  },
43
43
  "devDependencies": {
44
44
  "kitty-vt-wasm": "^0.2.0"
@@ -1256,7 +1256,7 @@ function lexDocument(text: string): Token[] {
1256
1256
 
1257
1257
  /** A hyperlink as the renderer sees it: inline `[text](href)`, `<autolink>`, bare GFM URL, or reference link. */
1258
1258
  export interface MarkdownLink {
1259
- /** Visible link text (equals `href` for autolinks and bare URLs). */
1259
+ /** Flattened visible label with whitespace collapsed to one row; falls back to `href` when empty. */
1260
1260
  text: string;
1261
1261
  /** Destination exactly as marked resolved it (references resolved, no normalization). */
1262
1262
  href: string;
@@ -1276,10 +1276,8 @@ export function extractMarkdownLinks(text: string): MarkdownLink[] {
1276
1276
  if (token.type === "link") {
1277
1277
  const link = token as Tokens.Link;
1278
1278
  if (typeof link.href === "string" && link.href.length > 0) {
1279
- links.push({
1280
- text: typeof link.text === "string" && link.text.length > 0 ? link.text : link.href,
1281
- href: link.href,
1282
- });
1279
+ const label = plainInlineTokens(link.tokens).replace(/\s+/g, " ").trim();
1280
+ links.push({ text: label || link.href, href: link.href });
1283
1281
  }
1284
1282
  continue;
1285
1283
  }
@@ -1497,6 +1495,9 @@ function plainInlineTokens(tokens: Token[]): string {
1497
1495
  case "codespan":
1498
1496
  result += token.text;
1499
1497
  break;
1498
+ case "br":
1499
+ result += "\n";
1500
+ break;
1500
1501
  default:
1501
1502
  if ("text" in token && typeof token.text === "string") result += token.text;
1502
1503
  break;