feat: navigation
This commit is contained in:
@@ -361,6 +361,36 @@ class StateDecl(IRNode):
|
||||
# Components (Phase 8)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Navigation nodes
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@dataclass
|
||||
class NavItem:
|
||||
"""A single item in a navigation bar."""
|
||||
kind: str = "item" # "item", "separator", "heading"
|
||||
label: str = ""
|
||||
dest: str = ""
|
||||
active: bool = False
|
||||
children: list["NavItem"] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass
|
||||
class HNav(IRNode):
|
||||
"""Horizontal navigation bar."""
|
||||
nav_style: str = "bar" # bar, tabs, pills, breadcrumb, underline
|
||||
items: list[NavItem] = field(default_factory=list)
|
||||
compact: bool = False
|
||||
|
||||
|
||||
@dataclass
|
||||
class VNav(IRNode):
|
||||
"""Vertical navigation panel."""
|
||||
nav_style: str = "list" # list, boxed, tree, sidebar, minimal
|
||||
nav_width: int = 0 # 0 = auto-fit
|
||||
items: list[NavItem] = field(default_factory=list)
|
||||
|
||||
|
||||
@dataclass
|
||||
class ImageNode(IRNode):
|
||||
"""Image converted to character art."""
|
||||
|
||||
Reference in New Issue
Block a user