tsx

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 52 Imported by: 1 module, 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 tsx runs TSX apps: bundles of what tsx/bundler emits, on the goja JavaScript engine, or the page's own on the web (internal/js), rendered by core as Go apps are. It is a port of NSH's nsh-js: reactive.go of reactive.rs, dom.go of dom.rs, protocol.go of protocol.rs and modules.go of modules.rs, so a change there ports here (docs/architecture/tsx.md).

A bundle is a script: imports of NSGo's modules (nsgo, nsgo/base, nsgo:rt) are calls of require.

Index

Constants

This section is empty.

Variables

View Source
var DefaultLimits = Limits{Load: 10 * time.Second, Call: 2 * time.Second, Stack: 1000, Harden: true,
	Nodes: 200_000, Timers: 10_000, Requests: 32, Sounds: 256, Body: 64 << 20, Memory: 64 << 20, Storage: 1 << 20}

DefaultLimits are NSH's, 10 seconds to load, 2 per call, 1000 frames, hardened, 200 000 nodes, 10 000 timers, 32 requests, 64 MiB bodies and 1 MiB of storage, and NSGo's 256 sounds and 64 MiB of memory.

View Source
var ErrBudget = errors.New("tsx: the script ran past its time budget")

ErrBudget is what a call cut at its time budget fails with.

View Source
var ErrInterrupted = errors.New("tsx: the plugin was interrupted")

ErrInterrupted is used when a host interrupts a sandboxed runtime without supplying its own error.

View Source
var ErrNoExport = errors.New("tsx: the plugin exports no such function")

ErrNoExport is the failure of a call of a name the plugin does not export as a function.

View Source
var ErrNoTree = errors.New("tsx: Load needs a scope attached to a view tree")

ErrNoTree is what Load reports when its scope has no view tree.

View Source
var ErrNoViewExport = errors.New("tsx: the view exports no such component")

ErrNoViewExport is the failure of a View.Export name the package does not export.

View Source
var ErrPluginClosed = errors.New("tsx: the plugin was closed")

ErrPluginClosed is the stop reason when a plugin closes normally.

View Source
var ErrUnisolated = errors.New("tsx: the web cannot isolate a sandboxed package from the page, so its capabilities would not hold; set Sandbox.WebUnisolated to run it with the page's authority")

ErrUnisolated is what a sandbox with Capabilities or Grant fails with on the web unless Sandbox.WebUnisolated is set: the page's engine cannot isolate a package's realm from the page, so what it declares would not hold.

View Source
var ErrViewClosed = errors.New("tsx: the view was closed")

ErrViewClosed is the stop reason when a view's scope is disposed normally.

View Source
var ErrViewExportNotComponent = errors.New("tsx: the view export is not a component")

ErrViewExportNotComponent is the failure of a View.Export the package exports as something other than a function.

View Source
var SandboxModules = []string{"nsgo", "nsgo:rt", "nsgo/base", "nsgo/base/plot", "nsgo/ui", "nsgo/ui/chat", "nsgo/mobile", "nsgo/gamepad", "nsgo/audio"}

SandboxModules are the modules a sandboxed bundle imports without Sandbox.Modules naming them: NSGo's own, with what is registered into them SandboxSafe, none of the Go functions registered with RegisterFunctions, and none of their exports that act on the whole app (setColorScheme, BackHandler.exitApp).

Functions

func App

func App(name, src string) func(cx *core.Scope) core.Node

App returns the app of a bundle, for nsgo.Run and nsgotest.Start: it runs the bundle, and what the bundle mounts is the app. name names the bundle in stacks.

func Convert

func Convert[T any](name, decl string, read func(any) T, write func(T) any)

Convert gives the values of T a JS form that need not be an object, as a date is a string: read makes one from what JS gives (exported, its numbers float64 or int64), and write, when set, the value JS gets. decl, a TypeScript declaration of name, declares it.

func Declarations

func Declarations() map[string]string

Declarations returns the TypeScript declarations of the modules TSX imports, by path under .nsgo/: types/nsgo/*.d.ts for NSGo's, a types/<module>.d.ts for each module registered (tsx.Register), and tsconfig.json, which an app's tsconfig.json extends.

func Fields

func Fields[T any](names map[string]string)

Fields names fields of the data struct T in JS by names, NSH's where its fields' names differ: a bool NoX field named x is negated, true unless set ({"NoResize": "resizable"}).

func Hot

func Hot(name, src string) (app func(cx *core.Scope) core.Node, update func(src string))

Hot returns the app of a hot bundle (bundler.CompileHot), as App does, and what runs a newer one in the same VM: the modules whose code changed run again and their components' instances render again, while the rest of the app keeps its state. update runs on the engine goroutine, as from Scope.Post.

func Optional

func Optional[T any](fields ...string)

Optional declares the named fields of T optional, an object may leave them out, its zero value read in their place.

func Register

func Register(module string, components map[string]core.Node, opts ...Option)

Register makes Go components importable from module in TSX: each value of components is a component's zero value, a struct implementing core.Node, exported under its key. Sandboxed bundles import them only with SandboxSafe or as Sandbox.Modules names them. Register them in an init function: it panics once an app has started, and into NSGo's own modules (nsgo/...) from packages outside NSGo.

func RegisterClass

func RegisterClass[T any](module, name string, c Class[T], opts ...Option)

RegisterClass makes *T the class name, importable from module in TSX: its exported methods are the class's methods, under their names in lower camel case, but for its getters and their setters, and Close, which dispose() calls. JS holds a *T for each instance, the same object while it lives, and dispose() lets it go, after which the object throws. A member's or function's parameter of type *T takes an instance and a result of type *T gives one. Sandboxed bundles import it, with its statics, only with SandboxSafe, the one option it takes, or as Sandbox.Modules names it. Register classes as Register does components.

func RegisterFunctions

func RegisterFunctions(module string, funcs map[string]any)

RegisterFunctions makes Go functions importable from module in TSX, and nativeModule(module) gives them too, as an embedding app's UI set exports its functions: each value of funcs is a func, exported under its key. Sandboxed bundles get them only as Sandbox.Modules says. JS's arguments convert to its parameters and its result back, structs as objects with lower-camel keys; a non-nil error it returns last throws. A func taking a context.Context first is async: it runs on a goroutine and JS gets a promise (classes.go). Register them as Register does components.

func RegisterMessages

func RegisterMessages[M any](module string, in func(locale string) M, params map[string][]string)

RegisterMessages makes a package of catalogs' messages importable from module in TSX, as typed functions: in is the package's In, and params its Parameters, which name each message's parameters in the declarations. The module exports messages, whose methods say each message in the language the app shows and follow it as it changes, messagesIn(locale) for a language of the caller's choice, and language(), the language the app shows. Sandboxed bundles get them only as Sandbox.Modules says. Register them as Register does components:

tsx.RegisterMessages("app/locales", locales.In, locales.Parameters)

func RegisterStatics

func RegisterStatics(module, component string, funcs map[string]any, opts ...Option)

RegisterStatics gives component, which Register made importable from module, static functions, as NSH's TextView.parse: each value of funcs is a func, called with JS's arguments read as its parameters' types and its results given back as the component's props and events cross. Sandboxed bundles get them only with SandboxSafe, the one option they take, or as Sandbox.Modules names them ("nsgo/base.TextView.parse"), and only on a component they import. Register them as Register does components.

func Required

func Required[T any](fields ...string)

Required declares the named fields of T required, which TypeScript asks an object to give: by default numbers and structs are, and every field of an event or a request Go hands JS (a type named …Event or …Request) but pointers.

func Sandboxed

func Sandboxed(name, src string, s Sandbox, options ...ViewOptions) func(cx *core.Scope) core.Node

Sandboxed returns the app of a bundle, as App does, run within s, in a view of its own: its frame, which fills the room its parent gives it, no more, so the bundle cannot grow over the host's views, and clips what the bundle shows, overlays included (core.Scope.Confine). In a scroll view that room is the scroll view's height: a host that wants the bundle as tall as its content puts it in a view of its own. On the web it panics with ErrUnisolated when s has Capabilities or Grant, unless s.WebUnisolated. When options has an Export, that named component, which runs within s as the rest of the bundle does, is rendered instead of the entry-mounted root; a missing one panics with ErrNoViewExport and one that is not a function with ErrViewExportNotComponent.

func Shape

func Shape[T any](name, decl string, encode func(T) map[string]any, decode func(map[string]any) T)

Shape gives the values of T a JS shape of their own, NSH's where T's fields differ from it: encode makes the object JS gets, its values crossing as any Go value does, decode, when set, reads one JS gives (exported, its numbers float64), and decl, a TypeScript declaration of name, declares it.

func SplitApp

func SplitApp(name, src string, chunk func(key string) (string, error)) func(cx *core.Scope) core.Node

SplitApp returns the app of a split bundle (bundler.CompileSplit), as App does: an import() of one of its chunks calls chunk, on a goroutine of its own, for the chunk's script by its key, and runs it.

func TokenDeclarations

func TokenDeclarations(t *core.Theme) string

TokenDeclarations declares the names token() reads in theme t, for .nsgo/types/nsgo/tokens.d.ts: its colors, as strings, and its tokens, lengths as numbers. The nsgo tool writes it from the app's theme.

func WithFetcher

func WithFetcher(app func(cx *core.Scope) core.Node, f Fetcher) func(cx *core.Scope) core.Node

WithFetcher returns app, its fetches answered by f.

func WriteDeclarations

func WriteDeclarations(dir string) error

WriteDeclarations writes Declarations under dir, an app's .nsgo.

Types

type CallBudget

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

CallBudget controls one waiting Plugin.Call's total deadline. It is safe to keep after a call settles.

func (*CallBudget) Extend

func (b *CallBudget) Extend(extra time.Duration) bool

Extend adds time to a pending call's total budget before it expires. Call it on the engine goroutine between JavaScript entries, for example in a Scope.Post from a worker. It reports whether the deadline moved.

type Class

type Class[T any] struct {
	// New, a func returning a *T and optionally an error, is the
	// constructor. Without it JS gets instances only from members and
	// functions that return them.
	New any
	// Getters are methods of *T without parameters read as properties,
	// in Go's names; a method SetX beside the getter X sets X.
	Getters []string
	// Statics are functions on the class, by their JS names.
	Statics map[string]any
}

Class says how RegisterClass shows a Go type T to TSX.

type Fetcher

type Fetcher func(req *http.Request) (*http.Response, error)

A Fetcher answers an app's http and https requests in place of the network: a test's stand-in network.

type JSError

type JSError struct{ Name, Message string }

JSError is an error JS throws as the built-in error Name names, a TypeError or a RangeError, rather than an Error.

func (*JSError) Error

func (e *JSError) Error() string

type Limits

type Limits struct {
	// Load limits the entry script and Call limits each slice of JS. On goja, a Plugin.Call whose slice is cut fails with ErrBudget even after it has awaited. CallTotal limits the wall time of a plugin call or sandboxed view event and its work. At the deadline, pending work is dropped and a waiting call fails with ErrBudget. When CallTotal is set, work begun by the entry module is held to Load, or CallTotal when Load is zero.
	Load, Call, CallTotal time.Duration
	// Stack is the call depth in frames on native targets. Values at or below zero or above 10,000 use 10,000, so a plugin's recursion throws a catchable RangeError rather than overflowing the goroutine's stack. DefaultLimits uses 1,000. The web uses the browser's stack limit.
	Stack int
	// Harden deletes eval, makes the Function constructors throw and freezes the constructors and prototypes of the realm's built-ins, including typed arrays and DataView.
	Harden bool
	// Nodes is how many elements the bundle may hold at once, each of
	// which may hold a native view; past it the bundle stops.
	Nodes int
	// Timers is how many timers and frame callbacks may wait at once, Requests how many fetches may be under way, and Sounds how many nsgo/audio sounds may be loading or open, each loadSound counting until it fails or its sound closes: one more fails.
	Timers, Requests, Sounds int
	// Body is the most bytes a request's or a response's body may hold.
	Body int
	// Storage is the most bytes its partition of the app's storage may
	// hold (Sandbox.Storage).
	Storage int
	// Memory limits metered allocation on goja, including buffers, large array stores and strings built by concatenation or replacement. Checks precede allocation and collected stores release their charge. It does not cap the whole heap: ordinary objects, closures, small allocations and other unmetered storage can still grow, and it does not apply in the browser. Zero leaves it unlimited; DefaultLimits holds 64 MiB.
	Memory int
}

Limits are what a bundle may use. Zero time budgets and quotas leave them unlimited.

func ParseLimits

func ParseLimits(spec string) (Limits, error)

ParseLimits reads limits as nsgo dev -limits writes them: DefaultLimits with the fields spec names set, as "nodes=1000,call=500ms". Its keys are load, call, call-total, stack, nodes, timers, requests, sounds, body, storage and memory; "default" or "" is DefaultLimits.

type Option

type Option func(*faceSpec)

Option adjusts how a Go component's props are named, or, SandboxSafe, who may import it.

func Default added in v0.2.0

func Default(field string, value any) Option

Default gives field the value it has while its TSX prop is absent or undefined, for a field whose default is not its type's zero. For a getter, or an XFunc twin named X or XFunc, value is what the getter returns while the prop reads undefined, so a reactive prop goes back to the default in place.

func DockOptions

func DockOptions() []Option

typed declares the types field's custom declarations name. DockOptions are DockArea's props, for a package that registers a form of it.

func Enum

func Enum[T ~int | ~uint8 | ~uint16 | ~int32 | ~uint32](names map[string]T) Option

Enum names the values of an integer type for the props of its type, which read and report them by name.

func Event

func Event(field string, names ...string) Option

Event names the fields of the one object event field passes its handler, a name for each of its arguments, as NSH's #[args] does: Event("OnOpenChange", "open", "reason"). An event of no name given passes the event struct it has as it is, and a bare value as { value }; Bounds, what every OnLayout has, as { bounds }.

func Flag

func Flag(field, prop, on, choices string) Option

Flag sets the bool field from prop, a choice of names: true when it is on. It is declared as choices, a TypeScript union of the names: Flag("Unified", "layout", "unified", `"split" | "unified"`).

func Omit

func Omit(fields ...string) Option

Omit leaves fields out of a Go component's TSX face: what JS has no use for, as a Go function of Go values.

func Preset

func Preset(field string, value any) Option

Preset sets field to value in every element of the component and leaves it out of its TSX face, as a Go function a face gives a TSX component: Preset("StyleOf", typography).

func Rename

func Rename(field, prop string) Option

Rename names field's prop prop.

func SandboxSafe

func SandboxSafe() Option

SandboxSafe gives what Register, RegisterClass, RegisterStatics or a part registers to the bundles a Sandbox runs, such as plugins, in the modules they import: only what reaches nothing past the sandbox's capabilities and acts on nothing outside the view that shows it. What is registered without it they import only as Sandbox.Modules names it, as a terminal, which starts programs, or a scroll bar theme, which restyles the whole window.

func Union

func Union[T any](members map[string]any) Option

Union names the types implementing interface type T for the props that hold one: a JS object's type tag picks its member, and a member given to JS carries its tag.

type Plugin

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

Plugin is a package that gives the Go app functions rather than a view: what its entry module exports, which Call calls. It runs sandboxed as View does, under the scope that loaded it, until Close or that scope's end.

// search.tsx
export async function search(query: string) { ... }

plugin, err := tsx.Load(cx, p, tsx.Sandbox{})
plugin.Call("search", []any{"query"}, func(result any, err error) { ... })

func Load

func Load(cx *core.Scope, p *pkg.Package, s Sandbox) (plugin *Plugin, err error)

Load runs package p as a plugin under cx, within s as View runs it, and returns it once its entry module ran, or a nil Plugin and what that threw, which goes to no Catch above cx and not to the app's report, or ErrNoTree when cx is not attached to a view tree, or ErrUnisolated on the web as View panics with it. It runs synchronously on the caller's goroutine. Call it on the engine's goroutine.

func (*Plugin) Call

func (p *Plugin) Call(name string, args []any, done func(result any, err error))

Call calls the plugin's export name with JSON arguments and passes its result to done on the engine's goroutine, awaiting a returned promise. The error is what the export threw or rejected with (a *core.Error when it carries a code), ErrNoExport, ErrBudget for a cut slice or expired total budget, or why the plugin stopped or closed. Call it on the engine's goroutine.

func (*Plugin) CallWithBudget

func (p *Plugin) CallWithBudget(name string, args []any, done func(result any, err error)) *CallBudget

CallWithBudget starts a call like Call and returns a handle while its total deadline can still be extended. It returns nil for a call that has already completed or has no total deadline.

func (*Plugin) Close

func (p *Plugin) Close()

Close runs the plugin's cleanups and fails waiting calls with its stop reason. Call it on the engine's goroutine.

func (*Plugin) Err

func (p *Plugin) Err() error

Err returns the plugin's first stop reason, or nil while it runs. Closing the plugin or disposing its owner normally gives ErrPluginClosed. Err is safe to call from any goroutine.

func (*Plugin) Exports

func (p *Plugin) Exports() []string

Exports are the names of the functions the plugin exports.

func (*Plugin) Interrupt

func (p *Plugin) Interrupt(err error)

Interrupt stops the plugin for err, ErrInterrupted when nil, from any goroutine: the JS running is cut and none runs after, its waiting timers and promise continuations are dropped, and the calls under way and every Call after fail with err.

func (*Plugin) JSTime

func (p *Plugin) JSTime() (time.Duration, bool)

JSTime reports the same native execution time as ViewRuntime.JSTime. It is safe to call from any goroutine.

func (*Plugin) Stopped

func (p *Plugin) Stopped() bool

Stopped reports whether the plugin has stopped. It is safe to call from any goroutine.

type Sandbox

type Sandbox struct {

	// Limits are what it may use, DefaultLimits when nil.
	Limits *Limits
	// Capabilities are what its code may reach (a package's own); nil
	// reaches what the app's code does. Grant, when set, narrows them to
	// what it also allows: what the host gives this view.
	Capabilities, Grant *pkg.Capabilities
	// Modules are what it may import beyond SandboxModules and what is registered SandboxSafe into them: a module ("myapp"), one export ("nsgo/base.Terminal", "nsgo.setColorScheme") or static or member ("nsgo/base.Scrollbar.setTheme", "nsgo/mobile.BackHandler.exitApp"), a native component ("native:MapView"), or "*" for everything.
	Modules []string
	// Host is the channel its host module reaches, for the Go app to
	// answer its calls and send it events; nil gives it none.
	Host *core.Host
	// OnViewRuntime receives a view's handle on the engine goroutine
	// before the entry module runs. Load does not use it.
	OnViewRuntime func(*ViewRuntime)
	// OnStop runs once on the engine goroutine when the runtime stops,
	// after any waiting plugin calls fail.
	OnStop func(error)
	// OnError receives a plugin's uncaught callback errors outside a waiting Call, on the engine goroutine. Nil keeps core's report or boundary behavior. Load errors and Call results return to their callers; views keep their core.Catch boundary.
	OnError func(error)
	// Storage names its partition of the app's storage and of its secrets (core.Scope.ProvideSecrets), which no one else's code sees; "" leaves it the app's.
	Storage string
	// WebUnisolated runs it on the web with the page's authority. The page's engine runs it in a realm of the page's origin, which reaches the page's own APIs (XMLHttpRequest, WebSocket, navigator, localStorage, the page's window) past Go, so there Capabilities and Grant hold only the requests the runtime and core make, and Storage's partition and a pkg.Trust kept in the page's storage are open to its code. Without it, a sandbox with Capabilities or Grant refuses to start on the web with ErrUnisolated. Other targets isolate it and ignore this.
	WebUnisolated bool
	// contains filtered or unexported fields
}

Sandbox is what a bundle runs within: its limits, what it may reach and import, the host it talks to and the storage it keeps.

type View

type View struct {
	Package *pkg.Package
	// Export names a component the package's entry module exports, which the view renders in place of the root the entry mounts, whose mount then neither renders nor runs its component; empty keeps that root.
	Export string
	// Props are Export's props object, as JSON encodes them.
	Props map[string]any
	// Sandbox's Capabilities are the package's and its Storage its app
	// ID when unset.
	Sandbox
}

View runs the app of a package a pkg.Trust verified where it is placed in a Go app, sandboxed: the app's own screens delivered anew, or a plugin. The package's capabilities hold it, narrowed by Grant; it keeps a partition of the app's storage of its app ID's, and its host module reaches Host alone. A package that throws as it loads, or stops at a quota, panics, as any component does; place it under a core.Catch to show something else. Export names a component the package's entry module exports, which it shows in place of the root the entry mounts, with Props, so one package provides several views, each with state of its own; it runs within the same sandbox, capabilities and limits. The web cannot isolate a package from the page, so there it panics with ErrUnisolated unless Sandbox.WebUnisolated.

p, err := trust.Verify(data) // off the engine's goroutine
...
core.Catch{Try: tsx.View{Package: p}.Render, Fallback: failed}

func (View) Render

func (v View) Render(cx *core.Scope) core.Node

Render implements core.Node.

type ViewOptions

type ViewOptions struct {
	Export string
	Props  map[string]any
}

ViewOptions selects an exported component to render from a bundle. An empty Export keeps the bundle's entry-mounted root. Props are the component's props object, as JSON encodes and decodes them, so each view gets a copy of its own and the bundle reaches no Go value through them.

type ViewRuntime

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

ViewRuntime is a handle to one mounted sandboxed view. Sandbox.OnViewRuntime supplies it before the view's entry starts. The handle's methods are safe from any goroutine.

func (*ViewRuntime) EngineTime

func (v *ViewRuntime) EngineTime() (time.Duration, bool)

EngineTime reports elapsed engine work owned by the native view, including its JavaScript, synchronous Go calls and scoped commit and layout work. Like JSTime, it includes an active span and is safe from any goroutine. Waiting between entries, host and sibling work, shared commit bookkeeping and native drawing are excluded; the browser reports false.

func (*ViewRuntime) Err

func (v *ViewRuntime) Err() error

Err returns the view's first stop reason, or nil while it runs. Normal disposal reports ErrViewClosed.

func (*ViewRuntime) Interrupt

func (v *ViewRuntime) Interrupt(err error)

Interrupt stops the view for err, or ErrInterrupted when err is nil. Its last views remain until removed by the owner. The web stops future NSGo callbacks once control returns to the host.

func (*ViewRuntime) JSTime

func (v *ViewRuntime) JSTime() (time.Duration, bool)

JSTime reports accumulated elapsed time in native JavaScript entries, including the active entry. It excludes time between entries and inside registered synchronous Go functions. The browser reports false because its own JavaScript turns are outside the runtime's measurement.

func (*ViewRuntime) Stopped

func (v *ViewRuntime) Stopped() bool

Stopped reports whether the view's runtime has stopped or been disposed.

Directories

Path Synopsis
Package bundler compiles TSX apps into the scripts the tsx package runs, as NSH's bundler does (nsh-bundler): esbuild strips TypeScript, lowers syntax goja lacks and bundles the app's modules into one script, and jsx.go compiles the JSX into calls of the renderer, as NSH's compiler does.
Package bundler compiles TSX apps into the scripts the tsx package runs, as NSH's bundler does (nsh-bundler): esbuild strips TypeScript, lowers syntax goja lacks and bundles the app's modules into one script, and jsx.go compiles the JSX into calls of the renderer, as NSH's compiler does.
Package compiler runs TSX apps: App runs the bundle the nsgo tool compiled ahead (package bundler), or under go run and go test compiles the app's sources as it starts, and under nsgo dev follows the dev server's new bundles.
Package compiler runs TSX apps: App runs the bundle the nsgo tool compiled ahead (package bundler), or under go run and go test compiles the app's sources as it starts, and under nsgo dev follows the dev server's new bundles.
Package diagram gives TSX nsgo/base's Diagram, base/diagram's View, which links limu: an app whose TSX uses it imports this package for its effect.
Package diagram gives TSX nsgo/base's Diagram, base/diagram's View, which links limu: an app whose TSX uses it imports this package for its effect.
Package diff gives TSX nsgo/base's DiffView, the changes between texts, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package diff gives TSX nsgo/base's DiffView, the changes between texts, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package editor gives TSX nsgo/base's Editor, a code editor, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package editor gives TSX nsgo/base's Editor, a code editor, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package formula gives TSX nsgo/base's Formula, base/formula's View, which links Untie and its bundled math font.
Package formula gives TSX nsgo/base's Formula, base/formula's View, which links Untie and its bundled math font.
internal
js
Package js defines the JavaScript API TSX shares between Goja and the browser.
Package js defines the JavaScript API TSX shares between Goja and the browser.
Package pkg signs TSX apps into packages and verifies them, for code an app downloads: its own screens updated, or plugins.
Package pkg signs TSX apps into packages and verifies them, for code an app downloads: its own screens updated, or plugins.
Package richeditor gives TSX nsgo/base's RichEditor and its sessions, which link packages other apps should not: an app whose TSX uses them imports this package for its effect.
Package richeditor gives TSX nsgo/base's RichEditor and its sessions, which link packages other apps should not: an app whose TSX uses them imports this package for its effect.
Package terminal gives TSX nsgo/base's Terminal, base/terminal's View over a session of its own, which links libghostty-vt's binding: an app whose TSX uses it imports this package for its effect.
Package terminal gives TSX nsgo/base's Terminal, base/terminal's View over a session of its own, which links libghostty-vt's binding: an app whose TSX uses it imports this package for its effect.
Package textview gives TSX nsgo/base's TextView, Markdown and HTML documents, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package textview gives TSX nsgo/base's TextView, Markdown and HTML documents, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package tsxtest runs a TSX app's tests, its *.test.tsx files, as Go tests (NSH's nsh/test): each file imports nsgo/test, whose open starts the app headless, or on a platform under nsgo test -target, through nsgotest, and whose App acts as a user does.
Package tsxtest runs a TSX app's tests, its *.test.tsx files, as Go tests (NSH's nsh/test): each file imports nsgo/test, whose open starts the app headless, or on a platform under nsgo test -target, through nsgotest, and whose App acts as a user does.
ui
Package ui gives TSX nsgo/ui, package ui's components as Go components, for an app that imports this package for its effect; a theme of its own needs ui's roles, as core.DefaultTheme and ui.WarmDuskTheme have.
Package ui gives TSX nsgo/ui, package ui's components as Go components, for an app that imports this package for its effect; a theme of its own needs ui's roles, as core.DefaultTheme and ui.WarmDuskTheme have.
chat
Package chat gives TSX nsgo/ui/chat, ui/chat's conversation components, for an app that imports this package for its effect beside tsx/ui.
Package chat gives TSX nsgo/ui/chat, ui/chat's conversation components, for an app that imports this package for its effect beside tsx/ui.
richeditor
Package richeditor gives TSX nsgo/ui's RichEditor, ui/richeditor's View over a RichEditorSession, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package richeditor gives TSX nsgo/ui's RichEditor, ui/richeditor's View over a RichEditorSession, which links packages other apps should not: an app whose TSX uses it imports this package for its effect.
Package websrc holds the scripts a page's realm runs: the realm's helpers and the sources of the runtime's programs.
Package websrc holds the scripts a page's realm runs: the realm's helpers and the sources of the runtime's programs.

Jump to

Keyboard shortcuts

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