Module: Magik::Render

Defined in:
lib/magik/render.rb

Overview

The UI DSL. Compiles components and screens to server-rendered HTML plus htmx attributes. There is no SPA framework and there never will be.

Implements: Phase 2 — Rendering & Actions of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

* `component :Name do prop; body do ... end end`
* `screen :Name do state/body end`
* `kit: button, form, field, data_table, modal, toast, card, list, grid, tabs, stat, chart`
* `theme system: design tokens, light/dark mode via CSS vars`

Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.

See Also:

Constant Summary collapse

SPEC_PHASE =

The build-spec phase this subsystem implements.

Returns:

  • (String)
"Phase 2 — Rendering & Actions"
DSL_SURFACE =

The DSL this subsystem will expose, verbatim from the spec.

Returns:

  • (Array<String>)
[
  "component :Name do prop; body do ... end end",
  "screen :Name do state/body end",
  "kit: button, form, field, data_table, modal, toast, card, list, grid, tabs, stat, chart",
  "theme system: design tokens, light/dark mode via CSS vars"
].freeze
STATUS =

Implementation status of this subsystem.

Returns:

  • (String)
"Not implemented — spec only"

Class Method Summary collapse

Class Method Details

.define(*_args, **_options) ⇒ void

This method returns an undefined value.

Entry point for the Render DSL.

Parameters:

  • _args (Array)

    ignored

  • _options (Hash)

    ignored

Raises:

  • (NotImplementedError)

    always, until Phase 2 lands



45
46
47
# File 'lib/magik/render.rb', line 45

def self.define(*_args, **_options)
  raise NotImplementedError, "Magik::Render is spec-only; see docs/idea/00-build-spec.md"
end