markstream

package module
v0.0.0-...-2154282 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 34 Imported by: 0

README

markstream-go

Streaming Markdown components for MyGo, with an independent Go renderer.

中文说明 · API · markstream-vue comparison · Performance · Demo

Native dark playground

A component library for LLM conversations, streamed documents and long Markdown files. The streaming behavior and feature set follow markstream-vue; the native component approach is informed by Lobe MyGo.

This library does not import or copy MyGo's Markdown widget. Markstream owns its node model, renderer, streaming projection, reveal animation, code surfaces, virtual document state and extension registry. It reuses MyGo's low-level CommonMark/GFM parser, native UI primitives and editor/diff primitives.

Features

  • CommonMark/GFM, nested/task lists, tables, alerts, footnotes, definitions, ::: containers and details.
  • Incomplete-inline repair while receiving, strict EOF finalization, incremental parsing, cached completed nodes and stable identities across edits/prepends.
  • Thread-safe io.Writer sessions: UTF-8 chunk buffering, limits, immutable snapshots, coalesced notifications, cancellation and generation-safe reset.
  • Grapheme-aware character reveal, word/sentence/line/paragraph pacing, visible fade, reduced-motion support and completion events that wait for background work.
  • Native highlighted code, filename headers, copy, collapse, wrap, size controls and custom header slots.
  • File / FileDiff / Compare: line virtualization, split/unified layouts, word/character highlights, original patch line numbers, context expansion, selections, gutter actions and annotations. Diff fences have a streaming surface and a final native editor surface.
  • Single-document virtualization and virtualized message histories, variable-height measurement, stable row keys, scroll anchors, follow-end and serializable position/height snapshots.
  • Real Mermaid, KaTeX, D2 and AntV Infographic renderers, progressive valid-prefix previews, source mode, pan/zoom, fullscreen and SVG/PNG export.
  • Bounded image loading, SVG, native image previews, safe links, heading/footnote anchors, extended inline syntax, emoji and sanitized HTML.
  • Per-view node/tag/language overrides, parsed-node input, parse transforms, light/dark themes and localized control labels.
  • A native desktop demo with five pages: streaming playground, rich-content gallery, 5,000-node document, FileDiff and 1,000-message history.

The application window uses native MyGo controls, without a WebView. Core Markdown, code and diff need only Go. The optional rich package embeds the actual rendering engines/fonts and uses a shared headless Chromium worker for graphics and HTML layout. It requires a locally installed Chromium/Chrome executable; it does not download assets at runtime. Node is needed only to rebuild bundled assets. See architecture and compatibility.

Install

Requires Go 1.27.3+, matching the pinned MyGo dependency.

go get github.com/zerob13/markstream-go@main

MyGo supports Linux, macOS and Windows without cgo. A desktop window needs the platform libraries and a display; software-rendered native tests and PNG snapshots work without a display server.

Quick start

package main

import (
    "log"

    "github.com/egoist/mygo"
    "github.com/egoist/mygo/ui"
    ms "github.com/zerob13/markstream-go"
)

func main() {
    reply := ms.NewSession(1 << 20)
    mygo.App.WhenReady(func() {
        mygo.NewWindow(mygo.WindowOptions{
            Title: "Streaming Markdown", Width: 800, Height: 600,
            Content: ui.View(func(c *ui.Context) {
                ui.Scroll(c).Fill().Children(func() {
                    ms.Stream(c, reply, ms.Props{})
                })
            }),
        })
        go func() {
            if err := reply.Append("# Hello\n\nNative **streaming** Markdown."); err != nil {
                reply.Fail(err)
                return
            }
            _ = reply.Finish()
        }()
    })
    if err := mygo.App.Run(); err != nil { log.Fatal(err) }
}

Write chunks from a producer goroutine; build UI on the UI thread. Use Finish, Cancel or Fail at the end. Consume(ctx, reader) accepts raw Markdown; decode SSE/provider JSON before appending text deltas. Keep repeated views keyed with c.Key(messageID).

For source already in application state:

ms.View(c, sourceSoFar, ms.Props{
    Streaming: receiving,
    Emoji: true,
    CodeOptions: &ms.CodeOptions{
        Collapsible: true, ShowFontSize: true,
        MaxHeight: 360, Filename: ms.FenceFilename,
    },
    OnFinal: func(status ms.RenderStatus) {
        // EOF, reveal/fade and outstanding mounted graphics/images have settled.
    },
})

Enable the bundled rich renderers with one shared engine, retained for the application's lifetime:

import "github.com/zerob13/markstream-go/rich"

engine := rich.New(rich.Options{}) // optionally set BrowserPath
// Close engine when the application exits.
props := ms.Props{Rich: &ms.RichOptions{
    Renderer: engine, Progressive: true, MaxHeight: 500,
}}
// Inside a UI frame:
ms.View(c, source, props)

Without an engine, math/diagram/HTML source remains readable. Invalid progressive diagram input keeps the last successful preview and exposes an error/source view. Applications can replace the backend through RichRenderer.

For a long document, retain a VirtualState and give its view a bounded viewport:

// Application state:
virtual := &ms.VirtualState{}
// Inside a filling native container:
ms.View(c, source, ms.Props{Virtual: virtual})
// virtual.Capture() / virtual.Restore(snapshot) preserve a compatible position.

Automatic block virtualization starts above 220 top-level nodes; use MaxLiveNodes to change the threshold or DisableVirtualization to opt out. Explicit Virtual gives the host control of viewport sizing and navigation.

Run the demo

git clone https://github.com/zerob13/markstream-go.git
cd markstream-go
go run ./examples/demo

Install Chromium/Chrome for the rich-content gallery. Set MARKSTREAM_CHROME_PATH when it is not discoverable. MARKSTREAM_CHROME_NO_SANDBOX=1 is available for isolated test containers that cannot run Chromium's sandbox; desktop use keeps the sandbox enabled.

go run ./examples/demo -smoke
go run ./examples/demo -snapshot artifacts/demo-light.png
go run ./examples/demo -dark -snapshot artifacts/demo-dark.png
go run ./examples/demo -page 'Rich content' -snapshot artifacts/gallery.png
go run ./examples/demo -page 'File diff' -snapshot artifacts/diff.png

These PNGs come from MyGo's native software renderer. The rich engines generate graphics in the background; the component controls, layout and window are native.

Develop

go mod download
go test ./...
go test -race ./...
go vet ./...
go build ./examples/demo
go test -run '^$' -bench . -benchmem

The rich tests use an installed Chromium and skip when none is present. CI has a separate required rich-engine job with Chromium installed and mandatory browser detection. To rebuild the committed offline assets:

npm ci --prefix tools/renderer
npm run build --prefix tools/renderer

See CONTRIBUTING.md and the API guide.

License

The Go library is MIT. Bundled third-party engines retain their own licenses, including D2's MPL-2.0; all notices and the corresponding-source reference are in THIRD_PARTY.md. No Vue or Lobe component implementation is vendored.

Documentation

Overview

Package markstream provides independent native MyGo components for streaming Markdown. Session is the concurrent UTF-8 transport; Parser owns incremental syntax and immutable Markstream nodes; View and Stream build native controls. VirtualState virtualizes individual documents, while Messages virtualizes conversations. File, FileDiff and Compare expose native code/diff surfaces.

The optional rich subpackage provides offline math/diagram/HTML engines using a background Chromium process. The application window has no WebView.

Package markstream provides native MyGo components for streaming Markdown.

Index

Examples

Constants

View Source
const (
	GFM               = parser.GFM
	DefaultExtensions = parser.Default | parser.ExtDollarMath
	Tables            = parser.ExtTables
	TaskLists         = parser.ExtTaskLists
	Strikethrough     = parser.ExtStrikethrough
	Autolinks         = parser.ExtAutolinks
	Footnotes         = parser.ExtFootnotes
	Math              = parser.ExtMath
	DollarMath        = parser.ExtDollarMath
	Alerts            = parser.ExtAlerts
)

Variables

View Source
var (
	ErrClosed      = errors.New("markstream: stream is closed")
	ErrInvalidUTF8 = errors.New("markstream: invalid or incomplete UTF-8")
	ErrLimit       = errors.New("markstream: source byte limit exceeded")
	ErrReset       = errors.New("markstream: session reset during read")
)

Functions

func Compare

func Compare(c *ui.Context, old, new FileData, o CompareOptions) ui.Element

Compare is the full native FileDiff surface for original/updated files: virtualized syntax highlighting, word/character diffs, split/unified layout, line selections, gutter actions, annotations and context expansion.

func FenceFilename

func FenceFilename(b *CodeBlock) string

FenceFilename returns filename metadata from a fence such as ```go title=main.go or ```go filename="hello world.go". It does not read files.

func File

func File(c *ui.Context, data FileData, o FileOptions) ui.Element

File is a native, line-virtualized highlighted file, with a stable gutter, per-line interactions and annotations. Its copy action copies all source.

func FileDiff

func FileDiff(c *ui.Context, source string, o FileOptions) ui.Element

FileDiff displays unified patches with native unified/split switching and expandable unchanged regions. Its internal list only builds visible rows.

func ImageLoader

func ImageLoader(o ImageOptions, renderer RichRenderer) func(string) (ui.ImageSource, error)

ImageLoader loads bounded HTTP(S)/data images off the UI thread. Native MyGo decodes raster formats; a configured rich renderer handles full SVG layout.

func Messages

func Messages(c *ui.Context, state *ui.ListState, messages []Message, p Props) ui.Element

func RenderCode

func RenderCode(c *ui.Context, b *CodeBlock, o CodeOptions) ui.Element

RenderCode draws the same native code surface used by View when CodeOptions is set. Custom renderers can call it for fallback without losing copy behavior.

func Revealed

func Revealed(el ui.Element) bool

func RichView

func RichView(c *ui.Context, r RichRequest, o RichOptions) ui.Element

RichView displays an actual rendered graphic in native controls. Parsing and layout happen in the configured background renderer. Invalid progressive input keeps the most recent valid preview and exposes its source and error.

func SafeLink(dest string) bool

func Stream

func Stream(c *ui.Context, s *Session, p Props) ui.Element

func View

func View(c *ui.Context, source string, p Props) ui.Element

Types

type CodeBlock

type CodeBlock struct {
	Language, Info string
	Open           bool
	Index          int
	// contains filtered or unexported fields
}

func (*CodeBlock) Body

func (b *CodeBlock) Body(c *ui.Context) ui.Element

func (*CodeBlock) Code

func (b *CodeBlock) Code() string

func (*CodeBlock) CopyButton

func (b *CodeBlock) CopyButton(c *ui.Context) ui.Element

func (*CodeBlock) NoteElement

func (b *CodeBlock) NoteElement(el ui.Element, line int)

type CodeOptions

type CodeOptions struct {
	ShowFontSize            bool
	HeaderLeft, HeaderRight func(*ui.Context, *CodeBlock)
	Labels                  Labels
	File                    *FileOptions

	Collapsible      bool
	DefaultCollapsed bool
	// MaxHeight bounds the body with a vertical scroll container (DIPs).
	MaxHeight    float32
	HideCopy     bool
	HideLanguage bool
	// Filename is optional metadata computed from a fence's Info string.
	Filename func(*CodeBlock) string
}

CodeOptions configures the native code surface. Zero values retain the built-in highlighted, selectable body and Copy action. Language renderers take priority.

type CompareOptions

type CompareOptions struct {
	FileOptions
	Inline           editor.DiffInline
	Indicators       editor.DiffIndicators
	TabSize          int
	FontFamily       string
	NoBackground     bool
	ExpansionLines   int
	LineSelection    bool
	OnLineSelection  func(editor.DiffLineRange)
	OnGutterUtility  func(editor.DiffLineRange)
	Annotations      []editor.DiffAnnotation
	RenderAnnotation func(*ui.Context, editor.DiffAnnotation)
	Controller       func(*editor.DiffState)
}

type DiffKind

type DiffKind uint8
const (
	DiffContext DiffKind = iota
	DiffAdded
	DiffRemoved
	DiffMeta
	DiffHunk
)

type DiffLine

type DiffLine struct {
	Kind       DiffKind
	Text       string
	Old, New   int
	SourceLine int
}

type DiffMode

type DiffMode uint8
const (
	Unified DiffMode = iota
	Split
)

type Document

type Document = parser.Document

Document is MyGo's incremental Markdown syntax tree. Block indices and spans remain valid until the next mutation. It is owned by one goroutine; Session is the concurrent transport. Reusing a document preserves completed-block caches.

func NewDocument

func NewDocument(extensions Extensions) *Document
Example
package main

import (
	"fmt"
	markstream "github.com/zerob13/markstream-go"
)

func main() {
	doc := markstream.NewDocument(0)
	doc.SetStreaming(true)
	doc.Append("Hello **wor")
	doc.Append("ld**")
	doc.SetStreaming(false)
	fmt.Println(doc.Source())
}
Output:
Hello **world**

func Parse

func Parse(source string) *Document

type Export

type Export struct {
	Kind, Format, Source string
	Data                 []byte
}

type Extensions

type Extensions = parser.Extensions

Extensions selects syntax beyond CommonMark. NewDocument(0) uses the defaults.

type FileData

type FileData struct {
	Name, Language, Content string
	Streaming               bool
}

type FileOptions

type FileOptions struct {
	Labels    Labels
	TabSize   int
	Font      string
	Theme     *editor.Theme
	Streaming bool
	Language  string
	Compare   *CompareOptions

	FontSize, LineHeight, MaxHeight float32
	HideLineNumbers                 bool
	Wrap                            bool
	DiffMode                        DiffMode
	HideUnchanged                   bool
	ContextLines                    int
	OnLineClick                     func(LineEvent)
	// Annotation builds an optional native annotation following a file line.
	Annotation func(*ui.Context, LineEvent)
}

type FilePatch

type FilePatch struct {
	OldName, NewName string
	Lines            []DiffLine
	Binary           bool
}

func ParseDiff

func ParseDiff(source string) []FilePatch

ParseDiff accepts multi-file unified/Git patches, including partial streamed hunks, zero-length ranges, rename metadata and no-newline markers. It preserves source line identity so a growing patch can update its native rows in place.

type HeadingStyle

type HeadingStyle struct {
	Size        float32
	Weight      int
	Color       ui.Color
	Top, Bottom float32
	Rule        bool
}

type HeightEntry

type HeightEntry struct {
	Index     int
	Height    float32
	Signature string
}

type ImageOptions

type ImageOptions struct {
	BaseURL  string
	Client   *http.Client
	MaxBytes int64
	// AllowURL can apply an application-specific host policy before every fetch.
	AllowURL func(string) bool
}

type InlineObject

type InlineObject struct {
	Width, Height, Depth float32
	Draw                 func(*ui.Painter, ui.Rect)
}

type Labels

type Labels map[string]string

Labels overrides built-in control text. Keys are the default English labels. Native editor menus additionally follow MyGo's platform locale.

type LineEvent

type LineEvent struct {
	Number, Old, New int
	Text             string
	Kind             DiffKind
}

type Message

type Message struct {
	ID, Source string
	Session    *Session
}

type Node

type Node struct {
	ID, Type, Raw, Content, Language, Info, URL, Title, Label, LocalSource string
	Attributes                                                             map[string]string
	Start, End, Index, Level, Number                                       int
	Loading, Ordered, Header                                               bool
	Task                                                                   int
	Align                                                                  []int
	Children                                                               []*Node
}

Node is Markstream's renderer-independent tree. MyGo's low-level CommonMark parser is only a tokenizer dependency; no MyGo Markdown widget is used.

func ParseNodes

func ParseNodes(source string) []*Node

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser owns the incremental low-level syntax document and Markstream node cache. It is single-goroutine state; returned nodes are immutable snapshots and may be handed to the UI through Props.Nodes without using a Markdown widget.

func NewParser

func NewParser(extensions Extensions) *Parser

func (*Parser) Append

func (p *Parser) Append(chunk string, final bool) []*Node

func (*Parser) Set

func (p *Parser) Set(source string, final bool) []*Node

func (*Parser) Source

func (p *Parser) Source() string

type Props

type Props struct {
	Pending int
	Locale  string
	Labels  Labels

	MaxLiveNodes          int
	DisableVirtualization bool

	Nodes          []*Node
	TransformNodes func([]*Node) []*Node

	NodeRenderers map[string]func(*ui.Context, *Node)
	CustomHTML    map[string]func(*ui.Context, *Node)
	OnTaskToggle  func(*Node, bool)

	OnUpdate  func(RenderStatus)
	OnSettled func(RenderStatus)
	OnFinal   func(RenderStatus)

	ParseRevision uint64

	ImageOptions  *ImageOptions
	DisableImages bool

	Emoji             bool
	EmojiAliases      map[string]string
	SourceTransform   func(string) string
	DocumentTransform func(*Document)
	Document          *Document

	Rich           *RichOptions
	MeasurementKey string

	Virtual    *VirtualState
	Streaming  bool
	Variant    Variant
	Theme      *Theme
	Reveal     *Reveal
	Extensions Extensions
	OnLink     func(string)
	LoadImage  func(string) (ui.ImageSource, error)
	WrapCode   bool
	// PlainCode omits the enhanced language/copy header. Body remains selectable.
	PlainCode   bool
	CodeOptions *CodeOptions
	CodeBlock   func(*ui.Context, *CodeBlock)
	// Code provides per-language renderers, e.g. mermaid, d2, or infographic.
	// While a fence is open, the default code surface is retained. Finalization
	// also releases an unclosed fence. RenderOpenCode opts into incomplete input.
	Code           map[string]func(*ui.Context, *CodeBlock)
	RenderOpenCode bool
	Math           func(*ui.Context, string)
	InlineMath     func(string, float32) (InlineObject, bool)
	HTML           func(*ui.Context, string)
	Block          func(*ui.Context, *Document, int) bool
	Anchor         string
	AnchorVersion  uint64
	ShareSelection bool
}

type RenderStatus

type RenderStatus struct {
	Receiving, Revealing, Settled, Final bool
	Pending                              int
	Metrics                              VirtualMetrics
}

type Reveal

type Reveal struct {
	Unit          RevealUnit
	CatchUp, Fade time.Duration
}

type RevealUnit

type RevealUnit uint8
const (
	ByWord RevealUnit = iota
	ByCharacter
	BySentence
	ByLine
	ByParagraph
	AtOnce
)
type RichLink struct {
	URL                 string `json:"url"`
	Label               string `json:"label"`
	X, Y, Width, Height float32
}

type RichOptions

type RichOptions struct {
	// Config contains per-kind engine options (e.g. math macros or Mermaid themeVariables).
	// Sandbox, sanitization and resource limits remain enforced by the bundled engine.
	Config map[string]map[string]any
	Labels Labels

	OnRender func(RichRenderState)

	Renderer  RichRenderer
	Width     int
	MaxHeight float32
	// Progressive renders valid diagram prefixes while a fence is still open.
	Progressive bool
	// OnExport receives the real SVG or PNG. A nil handler opens the native Save dialog.
	OnExport func(Export)
	// contains filtered or unexported fields
}

type RichRenderState

type RichRenderState struct {
	Kind, Source  string
	Width, Height float32
	Err           error
}

RichRenderState is delivered on the UI thread after a render completes.

type RichRenderer

type RichRenderer interface {
	Render(context.Context, RichRequest) (RichResult, error)
}

RichRenderer computes a graphic away from MyGo's UI thread. The rich package provides the bundled Mermaid/KaTeX/D2/Infographic/HTML implementation.

type RichRequest

type RichRequest struct {
	Config   map[string]any `json:"config,omitempty"`
	Kind     string         `json:"kind"`
	Source   string         `json:"source"`
	Dark     bool           `json:"dark"`
	Width    int            `json:"width"`
	FontSize float32        `json:"fontSize"`
}

type RichResult

type RichResult struct {
	Source string     `json:"-"`
	PNG    []byte     `json:"-"`
	SVG    string     `json:"svg"`
	Plain  string     `json:"plain"`
	Width  float32    `json:"width"`
	Height float32    `json:"height"`
	Depth  float32    `json:"depth"`
	Links  []RichLink `json:"links"`
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session accepts io.Writer chunks from background goroutines. Render calls Snapshot once per frame, coalescing multiple writes into one UI invalidation. The zero value is ready to use. Do not copy a Session after use.

Example
package main

import (
	"fmt"
	markstream "github.com/zerob13/markstream-go"
)

func main() {
	reply := markstream.NewSession(1024)
	_ = reply.Append("Hello **世界**")
	_ = reply.Finish()
	snapshot := reply.Snapshot()
	fmt.Println(snapshot.Source)
	fmt.Println(snapshot.State)
}
Output:
Hello **世界**
completed

func NewSession

func NewSession(maxBytes int) *Session

NewSession limits incoming bytes when maxBytes > 0. Zero means unlimited.

func (*Session) Append

func (s *Session) Append(chunk string) error

func (*Session) Cancel

func (s *Session) Cancel()

Cancel stops receiving while retaining all complete text. It is idempotent.

func (*Session) Consume

func (s *Session) Consume(ctx context.Context, r io.Reader) error

Consume reads raw Markdown (not SSE framing) until EOF, then calls Finish. Cancellation is checked between reads: to interrupt a blocked Read, cancel the HTTP request context or close the reader. The reader is owned by the caller.

func (*Session) Fail

func (s *Session) Fail(err error)

Fail reports a producer error while retaining all complete text.

func (*Session) Finish

func (s *Session) Finish() error

Finish marks EOF and flushes the parser to strict Markdown on the next frame. An incomplete final UTF-8 rune fails the stream instead of displaying corruption.

func (*Session) Reset

func (s *Session) Reset()

Reset starts a new reply. Reads started for an older generation cannot write to it.

func (*Session) Snapshot

func (s *Session) Snapshot() Snapshot

func (*Session) Subscribe

func (s *Session) Subscribe(wake func()) func()

Subscribe registers a nonblocking wake-up callback. It may run on the writer's goroutine and must not build UI. MyGo Services.Invalidate is suitable. The returned function removes the subscription; an already-running call may finish.

func (*Session) Write

func (s *Session) Write(p []byte) (int, error)

type Snapshot

type Snapshot struct {
	Source       string
	State        State
	Err          error
	Revision     uint64
	Generation   uint64
	PendingBytes int
}

Snapshot is immutable and safe to retain while a producer writes more data. Source contains complete UTF-8 only; PendingBytes counts a split rune held back.

func (Snapshot) Done

func (s Snapshot) Done() bool

type State

type State uint8

State is the lifecycle of a streaming reply. Its zero value is Receiving.

const (
	Receiving State = iota
	Completed
	Canceled
	Failed
)

func (State) String

func (s State) String() string

type Theme

type Theme struct {
	FontSize                                        float32
	Font, CodeFont                                  string
	LineHeight, CodeLineHeight                      float32
	Text, Muted, Link, Strong                       ui.Color
	StrongWeight, LinkWeight                        int
	Code, CodeBackground                            ui.Color
	CodeSize, BlockSpacing, ItemSpacing, ListIndent float32
	Headings                                        [6]HeadingStyle
	QuoteBar, QuoteText                             ui.Color
	QuoteBarWidth                                   float32
	Alerts                                          [5]ui.Color
	Rule                                            ui.Color
	CodeBlockBackground, CodeBlockBorder            ui.Color
	CodeBlockRadius, CodeBlockPadding               float32
	CodeColors                                      *editor.Theme
	TableBorder, TableHeader, TableStripe           ui.Color
	TableCellPadding                                [2]float32
	TableMaxColumn                                  float32
	Mark, Checkbox                                  ui.Color
}

type Variant

type Variant uint8
const (
	DocumentStyle Variant = iota
	ChatStyle
)

type VirtualMetrics

type VirtualMetrics struct {
	NodeCount, RenderedCount, First, Last, MeasuredCount, EstimatedCount int
	Width, TotalHeight                                                   float32
	Final, Stable                                                        bool
	Phase                                                                string
}

type VirtualSnapshot

type VirtualSnapshot struct {
	ContentHash    string
	Width          float32
	Anchor         int
	Offset         float32
	Heights        []HeightEntry
	MeasurementKey string
}

type VirtualState

type VirtualState struct {
	List           ui.ListState
	Scroll         ui.ScrollState
	MeasurementKey string
	// contains filtered or unexported fields
}

VirtualState owns Markstream's block-level virtual document viewport. Its cache and anchors are independent from the low-level syntax parser.

func (*VirtualState) Capture

func (v *VirtualState) Capture() VirtualSnapshot

func (*VirtualState) Metrics

func (v *VirtualState) Metrics() VirtualMetrics

func (*VirtualState) Reset

func (v *VirtualState) Reset()

func (*VirtualState) Restore

func (v *VirtualState) Restore(s VirtualSnapshot)

func (*VirtualState) ScrollTo

func (v *VirtualState) ScrollTo(index int, align ui.Align)

func (*VirtualState) ScrollToEnd

func (v *VirtualState) ScrollToEnd()

Directories

Path Synopsis
examples
demo command
Demo is a native MyGo app.
Demo is a native MyGo app.
Package rich provides bundled, offline renderers for Mermaid, KaTeX, D2, AntV Infographic and sanitized HTML.
Package rich provides bundled, offline renderers for Mermaid, KaTeX, D2, AntV Infographic and sanitized HTML.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL