layout

package module
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 0 Imported by: 0

README

layout

Predefined UI layouts for tinywasm modules

Docs

Packages

platformd

The platform shell, providing the header, navigation rail, and module hosting.

  • NewUIModule(id, label, iconID, view): helper to create modules.
  • CanView: function field to gate module access.
crudview

A standard two-column CRUD layout (form left, list right) that replicates the Pa100T experience.

  • Preconfigure, don't assemble: The composition root should use the high-level constructor crudview.New(crudview.Config) to wire the entire form↔list↔transport cycle once per module.
  • Async Source: Uses router.Caller for asynchronous data fetching.
view, err := crudview.New(crudview.Config{
    ParentID: "my-module",
    Caller:   routerCaller,
    Title:    "Devices",
    Record:   deviceRecord,
    ListOp:   "list_devices",
    SaveOp:   "save_device",
    DeleteOp: "delete_device",
    Decode:   decodeDevices,
    Fill:     fillDevice,
})

Documentation

Overview

Package layout provides pre-built, consistent, reusable UI layout skeletons for tinywasm modules. A layout defines WHERE elements are placed (structure, grid, spacing) but NOT what those elements contain — that is the consumer's responsibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module added in v0.0.7

type Module interface {
	ModelName() string
}

Module is the identity contract for the ecosystem. Any component that can be identified by a slug (for routing or keys) implements this interface.

Directories

Path Synopsis
web command

Jump to

Keyboard shortcuts

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