ui

package
v0.1.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ui embeds Sweef's own browser UI: the chrome page, the overlay, the new tab page, onboarding and the internal pages (settings, history, ...). Everything is plain HTML/CSS/JS served from FS; there is no bundler and no network access.

Index

Constants

This section is empty.

Variables

View Source
var FS fs.FS = &zpack.FS{Z: webZ}

FS is the UI asset tree. Its root holds chrome/, newtab/, onboarding/, settings/, history/, downloads/, bookmarks/, error/ and shared/. The app serves it as sweef://chrome/..., sweef://newtab/... and so on (the first path segment is the page directory).

View Source
var Pages = map[string]bool{"chrome": true, "newtab": true, "settings": true, "history": true, "downloads": true, "bookmarks": true, "onboarding": true, "error": true, "datastop": true}

Pages are the internal page hosts. sweef://<page> serves <page>/index.html.

Functions

func Route

func Route(u *url.URL) (string, bool)

Route maps a sweef:// URL to a path inside FS.

sweef://newtab                  -> newtab/index.html
sweef://settings/               -> settings/index.html
sweef://chrome/overlay.html     -> chrome/overlay.html
sweef://settings/settings.js    -> settings/settings.js   (page-local asset)
sweef://<any page>/shared/x.css -> shared/x.css           (shared assets from any page host)
sweef://ui/<path>               -> <path>

Query strings and fragments are ignored (the page reads them itself). Paths are cleaned and rooted, so they cannot escape the tree. It returns ok=false for unknown hosts.

Types

This section is empty.

Directories

Path Synopsis
cmd
uipreview command
Command uipreview renders every Sweef UI page through the real engine and writes PNG previews.
Command uipreview renders every Sweef UI page through the real engine and writes PNG previews.
Package preview renders every Sweef UI page through the real Sweef engine (the same Tab and paintPage path that `sweef screenshot` uses) with a mocked window.sweef and sample state.
Package preview renders every Sweef UI page through the real Sweef engine (the same Tab and paintPage path that `sweef screenshot` uses) with a mocked window.sweef and sample state.

Jump to

Keyboard shortcuts

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