ui

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	Severity string
	Path     string
	Message  string
}

Diagnostic is a single validation finding for an admin theme

type Manager

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

func NewManager

func NewManager(cfg *config.Config) *Manager

func (*Manager) AssetHandler

func (m *Manager) AssetHandler() http.Handler

func (*Manager) RenderIndex

func (m *Manager) RenderIndex() ([]byte, error)

type Manifest

type Manifest struct {
	Name                 string   `yaml:"name"`
	Title                string   `yaml:"title"`
	Version              string   `yaml:"version"`
	Description          string   `yaml:"description"`
	Author               string   `yaml:"author"`
	License              string   `yaml:"license"`
	Repo                 string   `yaml:"repo,omitempty"`
	AdminAPI             string   `yaml:"admin_api"`
	SDKVersion           string   `yaml:"sdk_version,omitempty"`
	CompatibilityVersion string   `yaml:"compatibility_version,omitempty"`
	Components           []string `yaml:"components"`
	WidgetSlots          []string `yaml:"widget_slots,omitempty"`
	Screenshots          []string `yaml:"screenshots,omitempty"`
}

Manifest is the contract Foundry reads from an admin theme's admin-theme.yaml.

Admin themes should declare the admin API version, SDK version, shell components, and widget slots they support so alternate admin frontends remain compatible with Foundry's extension system.

func LoadManifest

func LoadManifest(themesDir, name string) (*Manifest, error)

LoadManifest reads and normalizes admin-theme.yaml for an admin theme.

When the manifest is missing, Foundry synthesizes a default contract so the built-in admin theme can still work

type ThemeInfo

type ThemeInfo struct {
	Name string
	Path string
}

ThemeInfo identifies an installed admin theme directory

func ListInstalled

func ListInstalled(themesDir string) ([]ThemeInfo, error)

ListInstalled returns all admin themes under themesDir/admin-themes.

type ValidationResult

type ValidationResult struct {
	Valid       bool
	Diagnostics []Diagnostic
}

ValidationResult summarizes admin theme validation

func ValidateTheme

func ValidateTheme(themesDir, name string) (*ValidationResult, error)

ValidateTheme validates an installed admin theme against Foundry's required contract

Jump to

Keyboard shortcuts

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