stickers and terminal serialization (#57)

This commit is contained in:
Mike Sawka
2024-06-17 22:38:48 -07:00
committed by GitHub
parent b6c85e38f6
commit 4ded6d94b6
20 changed files with 670 additions and 147 deletions
+19
View File
@@ -201,6 +201,24 @@ type BlockDef struct {
Meta map[string]any `json:"meta,omitempty"`
}
type StickerClickOptsType struct {
SendInput string `json:"sendinput,omitempty"`
CreateBlock *BlockDef `json:"createblock,omitempty"`
}
type StickerDisplayOptsType struct {
Icon string `json:"icon"`
ImgSrc string `json:"imgsrc"`
SvgBlob string `json:"svgblob,omitempty"`
}
type StickerType struct {
StickerType string `json:"stickertype"`
Style map[string]any `json:"style"`
ClickOpts *StickerClickOptsType `json:"clickopts,omitempty"`
Display *StickerDisplayOptsType `json:"display"`
}
type RuntimeOpts struct {
TermSize shellexec.TermSize `json:"termsize,omitempty"`
WinSize WinSize `json:"winsize,omitempty"`
@@ -223,6 +241,7 @@ type Block struct {
Controller string `json:"controller"`
View string `json:"view"`
RuntimeOpts *RuntimeOpts `json:"runtimeopts,omitempty"`
Stickers []*StickerType `json:"stickers,omitempty"`
Meta map[string]any `json:"meta"`
}