zhangheng f76d341501 feat(terminal): Chinese / IME input (P3)
Implement IME composition support and migrate regular character input to
a hidden textarea, matching the xterm.js approach.

Key changes:
- Add a hidden, absolutely-positioned `<textarea>` inside `.terminal-screen`
  that follows the terminal cursor cell. It receives focus on click, connect,
  and resize so the OS/browser IME candidate window appears at the cursor.
- `on:input` now sends regular printable characters; `on:keydown` only handles
  special keys (arrows, Enter, Esc, Backspace, F-keys, Ctrl combos).
- `on:compositionstart/end` track IME sessions and send the final composed
  string at the end, avoiding partial pinyin/jamo/kana leaks.
- Move `on:paste` and `on:keydown` from `.terminal-screen` to the textarea so
  focus stays on the IME target.
- Replace `.terminal-screen:focus` with `:focus-within` since the screen div
  no longer holds focus.
- Add `is_regular_text_input` helper and unit test.

Web-sys features extended with `InputEvent` and `CompositionEvent`.

Tests: 24/24 pass, clippy clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 16:09:45 +08:00

BASE_PATH Demo

Minimal Leptos SSR project that reuses a few components from ui to validate SiteConfig::BASE_PATH.

The public app path is /rustui, while Leptos SSR routes are still declared as /, /check, and /deep/nested. The server strips /rustui before route matching, and the client router uses /rustui as its base.

cargo leptos watch

Then open:

  • http://127.0.0.1:3100/rustui
  • http://127.0.0.1:3100/rustui/check
  • http://127.0.0.1:3100/rustui/deep/nested

Change app_config/src/lib.rs to test another base path.

Description
No description provided
Readme 5.1 MiB
Languages
Rust 88.8%
CSS 7.6%
JavaScript 3.6%