mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #801] [MERGED] paste: carry raw bytes instead of decoded text #1573
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1573
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/801
Author: @simonklee
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/13/2026
Merged by: @kommander
Base:
main← Head:paste-event📝 Commits (4)
0a355c0paste: carry raw bytes instead of decoded text63dbbaedocsffb4fafdeduplicate test helperc4be7d4Merge branch 'main' into paste-event📊 Changes
21 files changed (+202 additions, -92 deletions)
View changed files
📝
packages/core/src/examples/keypress-debug-demo.ts(+14 -5)📝
packages/core/src/lib/KeyHandler.stopPropagation.test.ts(+2 -1)📝
packages/core/src/lib/KeyHandler.test.ts(+26 -24)📝
packages/core/src/lib/KeyHandler.ts(+9 -6)📝
packages/core/src/lib/index.ts(+1 -0)➕
packages/core/src/lib/paste.ts(+16 -0)📝
packages/core/src/lib/stdin-parser.test.ts(+20 -4)📝
packages/core/src/lib/stdin-parser.ts(+37 -22)📝
packages/core/src/renderables/Input.test.ts(+14 -1)📝
packages/core/src/renderables/Input.ts(+2 -1)📝
packages/core/src/renderables/Textarea.ts(+4 -3)📝
packages/core/src/renderables/__tests__/Textarea.paste.test.ts(+20 -5)📝
packages/core/src/renderer.ts(+1 -1)📝
packages/core/src/testing/mock-keys.ts(+5 -0)📝
packages/core/src/tests/renderable.test.ts(+3 -2)📝
packages/core/src/tests/renderer.input.test.ts(+6 -5)📝
packages/solid/examples/components/input-demo.tsx(+1 -1)📝
packages/solid/tests/events.test.tsx(+8 -5)📝
packages/web/src/content/docs/bindings/solid.mdx(+3 -1)📝
packages/web/src/content/docs/core-concepts/keyboard.mdx(+7 -4)...and 1 more files
📄 Description
PasteEvent carried a decoded, ANSI-stripped string which prevented
consumers from accessing the original bytes. Store a raw Uint8Array
instead and let each consumer (Textarea, Input) decide how to
decode and sanitize. This preserves binary paste content and enables
downstream libraries to implement their own understanding of the
clipboard data.
This is the refactor required for enabling us to implement the same thing https://github.com/anomalyco/opentui/pull/520 tried to add.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.