mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-15 16:42:46 +00:00
refactor: extract pkg/charset and internal/event packages
Extract ConvertChunk/FormatHexFrame into pkg/charset (zero external deps). Extract UIEvent/UIEventKind/UIPanelKind types into internal/event. Update all references across main package to use qualified imports. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// Package event defines UI event types shared between app, console, and tui packages.
|
||||
package event
|
||||
|
||||
// UIEventKind classifies a UI event.
|
||||
type UIEventKind int
|
||||
|
||||
const (
|
||||
UIEventOutput UIEventKind = iota
|
||||
UIEventStatus
|
||||
UIEventModal
|
||||
UIEventPanel
|
||||
)
|
||||
|
||||
// UIPanelKind identifies a modal panel type.
|
||||
type UIPanelKind int
|
||||
|
||||
const (
|
||||
UIPanelNone UIPanelKind = iota
|
||||
UIPanelForward
|
||||
UIPanelPlugin
|
||||
UIPanelMode
|
||||
)
|
||||
|
||||
// UIEvent is emitted by the app core and consumed by TUI or console frontends.
|
||||
type UIEvent struct {
|
||||
Kind UIEventKind
|
||||
Title string
|
||||
Text string
|
||||
Panel UIPanelKind
|
||||
}
|
||||
Reference in New Issue
Block a user