buninu 0.1.2 → 0.1.3

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 ADDED
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 0.1.3 - 2026-08-16
4
+
5
+ ### Fixed
6
+
7
+ - Preserve a single canonical child-process path variable: `Path` on Windows
8
+ and `PATH` on other platforms. This ensures the Buninu `bin` directory is
9
+ available inside the shell started by jsgotty on Windows.
10
+ - Keep the jsgotty reconnect overlay clickable in WebGL mode by placing it
11
+ above the canvas and preventing Kitty image pointer handling from intercepting
12
+ its mouse and touch events.
13
+
14
+ ### Changed
15
+
16
+ - Enable jsmdcui's mdcui encoding from the Unix and Windows launchers only when
17
+ at least one command-line argument is a `.md` file. Launching without a
18
+ Markdown file now retains the editor-first behavior.
@@ -3,6 +3,10 @@
3
3
  [中文 README](README.md)
4
4
 
5
5
  ## News
6
+ ### 2026/08/16
7
+ - Fixed the disconnected-screen `Reconnect` button not being clickable in WebGL mode.
8
+ - The `Reconnect` UI now stays above the WebGL canvas and receives mouse and touch events correctly; Kitty image handling no longer intercepts right-click / long-press for entering a reconnect token or PID.
9
+
6
10
  ### 2026/07/03 - [1.1.0]
7
11
  - Unicode 11 from upstream
8
12
  - WebGL support by `--webgl` and query args
@@ -3,6 +3,10 @@
3
3
  [English README](README.en.md)
4
4
 
5
5
  ## News
6
+ ### 2026/08/16
7
+ - 修正 WebGL 模式下斷線畫面的 `Reconnect` 按鈕無法點擊。
8
+ - `Reconnect` 介面現在會正確位於 WebGL canvas 上方並接收滑鼠與觸控事件;右鍵/長按輸入 reconnect token 或 PID 也不會被 Kitty 圖片事件攔截。
9
+
6
10
  ### 2026/07/03 - [1.1.0]
7
11
  - Unicode 11 from upstream
8
12
  - WebGL support by `--webgl` & query args
@@ -17,6 +17,8 @@
17
17
  user-select: none;
18
18
  transition: opacity 180ms ease-in;
19
19
  text-align: center;
20
+ z-index: 10;
21
+ pointer-events: auto;
20
22
  }
21
23
 
22
24
  .xterm-overlay-button {
@@ -29,4 +31,5 @@
29
31
  color: white;
30
32
  font: inherit;
31
33
  cursor: pointer;
34
+ pointer-events: auto;
32
35
  }
@@ -763,6 +763,9 @@
763
763
  if (state.contextMenu && state.contextMenu.root.contains(event.target)) {
764
764
  return;
765
765
  }
766
+ if (event.target instanceof Element && event.target.closest(".xterm-overlay")) {
767
+ return;
768
+ }
766
769
  const key = placementAtPoint(event.clientX, event.clientY);
767
770
  if (!key) {
768
771
  return;
@@ -2,4 +2,10 @@
2
2
 
3
3
  sd=$(dirname "$(realpath "$0")")
4
4
 
5
- exec bun "$sd"/tui --mdcui "$@"
5
+ for arg do
6
+ case "$arg" in
7
+ *.[mM][dD]) exec bun "$sd"/tui --mdcui "$@" ;;
8
+ esac
9
+ done
10
+
11
+ exec bun "$sd"/tui "$@"
package/bin/init.js CHANGED
@@ -25,6 +25,7 @@ Init options:
25
25
  -h, --help Show this help and exit
26
26
  -V, --version Show version and runtime information, then exit
27
27
  --readme Render README.md in the terminal and exit
28
+ --changelog Render CHANGELOG.md in the terminal and exit
28
29
  --shell <path|name> Override buninu.shell for this run
29
30
  --command <command> Override buninu.command for this run
30
31
 
@@ -62,6 +63,15 @@ async function handleInformationArguments(arguments_) {
62
63
  return true;
63
64
  }
64
65
 
66
+ if (arguments_.includes("--changelog")) {
67
+ const changelogPath = resolve(REPO_ROOT, "CHANGELOG.md");
68
+ if (!await pathExists(changelogPath)) fail(`CHANGELOG not found: ${changelogPath}`);
69
+ const markdown = await Bun.file(changelogPath).text();
70
+ process.stdout.write(Bun.markdown.ansi(markdown, { hyperlinks: true }));
71
+ if (!markdown.endsWith("\n")) process.stdout.write("\n");
72
+ return true;
73
+ }
74
+
65
75
  return false;
66
76
  }
67
77
 
@@ -290,9 +300,15 @@ async function createChildEnvironment(environment) {
290
300
  binDir,
291
301
  ].filter(Boolean);
292
302
 
303
+ const childEnvironment = { ...process.env };
304
+ for (const key of Object.keys(childEnvironment)) {
305
+ if (key.toLowerCase() === "path") delete childEnvironment[key];
306
+ }
307
+ childEnvironment[environment.name === "windows" ? "Path" : "PATH"] =
308
+ pathEntries.join(delimiter);
309
+
293
310
  return {
294
- ...process.env,
295
- PATH: pathEntries.join(delimiter),
311
+ ...childEnvironment,
296
312
  HOME: homeDir,
297
313
  TMPDIR: tmpDir,
298
314
  SHELL: process.env.SHELL || environment.shell,
package/bin/jsmdcui.bat CHANGED
@@ -1,3 +1,5 @@
1
1
  @echo off
2
- call "%~dp0bun.bat" "%~dp0..\apps\jsmdcui\tui" --mdcui %*
2
+ set "JSMDCUI_ENCODING="
3
+ for %%A in (%*) do if /I "%%~xA"==".md" set "JSMDCUI_ENCODING=--mdcui"
4
+ call "%~dp0bun.bat" "%~dp0..\apps\jsmdcui\tui" %JSMDCUI_ENCODING% %*
3
5
  exit /b %ERRORLEVEL%
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buninu",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Buninu is a portable, self-bootstrapping Unix-like userspace built on Bun that runs across operating systems",
5
5
  "type": "module",
6
6
  "main": "./bin/init.js",