Files
rustui-playground/Cargo.toml
zhangheng c886befac7 feat(terminal): clipboard paste with bracketed-paste support
Pasting (Ctrl-V or browser menu) now sends clipboard text to the PTY.

- on:paste reads clipboard_data().get_data("text"); newlines normalized
  to CR (the line-submit byte) via the pure, unit-tested prepare_paste()
- when the app enabled bracketed paste (DECSET 2004, exposed via the new
  TerminalCore::bracketed_paste() proxy), the text is wrapped in
  ESC[200~ / ESC[201~ so vim et al. don't auto-indent each pasted line
- pasting returns the view to live mode + scrolls to bottom, matching the
  keydown handler
- Cargo.toml: add ClipboardEvent/DataTransfer (and explicit WheelEvent)
  to the web-sys feature allowlist
- right-click is left to the browser's default menu (avoids requiring
  clipboard-read permission); Ctrl-V is the primary path

Adds a prepare_paste unit test (14 terminal tests total) and marks paste
done in TERMINAL_ROADMAP.md. Also fixes a clippy manual_contains lint in
an existing test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 20:59:03 +08:00

78 lines
2.2 KiB
TOML

[workspace]
resolver = "2"
members = ["app", "server", "app_config"]
[workspace.dependencies]
app_config = { path = "app_config" }
icons = { path = "../ui/crates/icons", features = ["leptos"] }
registry = { path = "../ui/app_crates/registry" }
leptos_ui = { path = "../ui/crates/leptos_ui" }
tw_merge = { path = "../ui/crates/tw_merge/tw_merge", features = ["variant"] }
tw_merge_variants = { path = "../ui/crates/tw_merge/tw_merge_variants" }
axum = { version = "0.8", features = ["ws"] }
console_error_panic_hook = "0.1"
console_log = "1"
futures-util = "0.3"
leptos = { version = "0.8", features = ["nightly"] }
leptos_axum = "0.8"
leptos_meta = "0.8"
leptos_router = { version = "0.8", features = ["nightly"] }
log = "0.4"
portable-pty = "0.9"
redis = { version = "0.32", features = ["tokio-comp"] }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
strum = { version = "0.27", features = ["derive"] }
time = { version = "0.3", features = ["serde", "wasm-bindgen"] }
tokio = { version = "1", features = ["rt-multi-thread", "sync"] }
tower = "0.5"
tower-http = { version = "0.6", features = ["fs"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
validator = { version = "0.20", features = ["derive"] }
vt100 = "0.15"
heck = "0.5"
js-sys = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", default-features = false, features = [
"BinaryType",
"ClipboardEvent",
"CloseEvent",
"console",
"DataTransfer",
"Document",
"DomRectReadOnly",
"Element",
"ErrorEvent",
"Event",
"EventTarget",
"HtmlElement",
"KeyboardEvent",
"Location",
"MessageEvent",
"ResizeObserver",
"ResizeObserverEntry",
"WebSocket",
"WheelEvent",
"Window",
] }
[[workspace.metadata.leptos]]
name = "base_path_demo"
bin-package = "server"
lib-package = "app"
site-root = "target/site"
site-pkg-dir = "pkg"
tailwind-input-file = "style/tailwind.css"
assets-dir = "public"
site-addr = "127.0.0.1:3100"
reload-port = 3101
browserquery = "defaults"
bin-features = []
bin-default-features = false
lib-features = ["hydrate"]
lib-default-features = false