library

package
v0.0.0-...-de13f5b Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

library provides an API for defining component catalogs that can be registered with modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentID

func ComponentID(v any) string

when adding components to raw nodes, there is no catalog just consistent component IDs, so we make this available

func Filepath

func Filepath(subpaths ...string) string

Filepath returns the file path of the calling source file with an optional subpath

Types

type Catalog

type Catalog []Item
var DefaultCatalog Catalog

func (*Catalog) Register

func (b *Catalog) Register(items ...Item) error

type Component

type Component struct {
	Value  any
	Prefix string
	Source string
	Icon   string
	Desc   string
}

func (Component) ID

func (c Component) ID() string

func (Component) Name

func (c Component) Name() string

func (Component) New

func (c Component) New() any

type Item

type Item any

Jump to

Keyboard shortcuts

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