definitions

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package definitions is the standard SDUI component library as data — one JSON file per component, each a name, its default params and a template of primitives (ADR 0024).

**This is the only place a component is authored.** A component is data, not code: the Platform serves this library to every client over the session (ADR 0040), and a client renders it by expanding the template against the primitives it implements natively. A component written as code in a client repository is renderable by that client alone, which is the whole thing the definition model exists to prevent — so it is a bug, not a shortcut.

The package exists because Go cannot embed across a directory boundary: the accessor has to live beside the data it embeds. `Library` is what the Platform pushes on connect; the npm package exports the same files under `./definitions/*` for JavaScript clients and the storybook.

Index

Constants

This section is empty.

Variables

View Source
var FS fs.FS = files

FS is the raw definition files, for a consumer that wants them one at a time.

Functions

func Count

func Count() int

Count reports how many components the library carries.

func Library

func Library() ([]byte, error)

Library returns the whole component library as the JSON array a client registers: `[{name, params, template}, …]`, ordered by file name so the bytes are stable between builds and a diff of what the Platform serves is readable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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