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 endscreen :Name do state/body endlayout :Name do sidebar / topbar / content / responsive end— the shellkit: button, form, field, data_table, modal, toast, card, list, grid, tabs, stat, chart, sidebar, topbar, nav_item, breadcrumbs, account_menu, dashboard_gridtheme system: design tokens, light/dark mode via CSS vars
Every kit component is responsive by construction; data_table on a narrow
screen becomes a card list, never a horizontal scroll.
Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.
Constant Summary collapse
- SPEC_PHASE =
The build-spec phase this subsystem implements.
"Phase 2 — Rendering & Actions"- DSL_SURFACE =
The DSL this subsystem will expose, verbatim from the spec.
[ "component :Name do prop; body do ... end end", "screen :Name do state/body end", "layout :Name do sidebar / topbar / content / responsive end", "kit: button, form, field, data_table, modal, toast, card, list, grid, tabs, stat, chart, " \ "sidebar, topbar, nav_item, breadcrumbs, account_menu, dashboard_grid", "theme system: design tokens, light/dark mode via CSS vars" ].freeze
- STATUS =
Implementation status of this subsystem.
"Not implemented — spec only"
Class Method Summary collapse
-
.define(*_args, **_options) ⇒ void
Entry point for the Render DSL.
Class Method Details
.define(*_args, **_options) ⇒ void
This method returns an undefined value.
Entry point for the Render DSL.
53 54 55 |
# File 'lib/magik/render.rb', line 53 def self.define(*_args, **) raise NotImplementedError, "Magik::Render is spec-only; see docs/idea/00-build-spec.md" end |