render

package
v0.41.0 Latest Latest
Warning

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

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

Documentation

Overview

Package render bridges the Kiln world IR to a runnable framework.App.

Apply walks a *world.World and registers every surface — entities, pages, custom routes, hooks, seeds, middleware — onto an existing *framework.App. Phase 1 covers entities, pages, seeds, and middleware; hooks and custom routes carry declarative actions whose evaluator lands in Phase 3 and are stubbed with logged warnings until then.

The package is the bridge: callers compose a framework.App as usual and pass it through Apply. No reflection; conversions are explicit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(app *framework.App, w *world.World) error

Apply registers every world surface onto app. Equivalent to calling ApplyDetailed and discarding the deferred report.

func ApplySeeds

func ApplySeeds(db *sql.DB, w *world.World) error

ApplySeeds inserts the world's seed rows into db. It's a separate call because seeding requires migrations to have run first, and Kiln owns the migration step (Phase 4) — Apply registers the entities, the caller migrates, the caller seeds.

func RenderNode

func RenderNode(n world.Node) render.HTML

RenderNode renders current design-system component kinds directly and falls back to the leaf noderender package for one-to-one semantic HTML nodes. This keeps Kiln's live preview on the same component/CSS surface as generated Go without pulling the authoring engine into generated apps.

Types

type Deferred

type Deferred struct {
	Hooks  []*world.Hook
	Routes []*world.Route
}

Deferred reports any surfaces Apply skipped or downgraded. Reserved for future cases (e.g., unsupported action kinds); Phase 3 wires hooks and routes through the expression evaluator so a full world is rendered.

func ApplyDetailed

func ApplyDetailed(app *framework.App, w *world.World) (Deferred, error)

ApplyDetailed is Apply but returns the Deferred report.

Jump to

Keyboard shortcuts

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