Files

23 lines
1.2 KiB
Go
Raw Permalink Normal View History

// Package gui is the native WebView host shared by Yetano desktop
// programs: a native window with a WebView that shows embedded HTML/CSS/JS
// and routes the page's fetch/XHR to Go handlers -- without any local web
// server, port or localhost listener.
//
// The host lives in four subpackages:
//
// - [yetano.dev/yetano/core/gui/assets]: asset resolver over embed.FS,
// a directory (os.Root), a ZIP file or ZIP bytes; path rules, MIME.
// - [yetano.dev/yetano/core/gui/document]: prepares the entry HTML and
// CSS (link mode: /assets/ URLs, validated; inline mode: data: URLs).
// - [yetano.dev/yetano/core/gui/bridge]: the page script (fetch/XHR
// replacement), protocol v1 with chunked streams, Session, Router and
// ServeNative for the native resource handler.
// - [yetano.dev/yetano/core/gui/window]: the native window: macOS
// (Cocoa + WKWebView, cgo, scheme yetano://app) and Windows (Win32 +
// WebView2, pure Go, https://yetano.invalid). Other platforms return
// window.ErrUnsupported.
//
// This is a separate Go module (yetano.dev/yetano/core/gui, tags gui/vX.Y.Z)
// so the main core module stays free of cgo and WebView dependencies. See
// README.md for wiring, invariants and the platform pitfalls.
package gui