The core domain object abstraction, object graph hierarchy, and subnode management in Strvct.
Nodes (SvNode) are the fundamental domain abstraction in Strvct. Every piece of application state—a document, a user profile, a RPG character sheet, a project folder, or a settings item—is represented as an object inheriting from SvNode.
Nodes form a hierarchical object graph: every node holds an ordered array of child subnodes and a reference to its parentNode. The framework automatically derives the complete user interface from this object graph without hand-authored UI components.
| Class Name | Key Capability Added | Usage |
|---|---|---|
SvNode | Subnode management, parent/owner references | Root base class |
SvTitledNode | Title, subtitle, note, ARIA accessibility, navigation path | Labeled nodes |
SvTranslatableNode | Per-node translation string cache for i18n | Internationalization |
SvInspectableNode | Property Inspector field generation from slot metadata | Live debugging |
SvViewableNode | View class selection, layout orientation, tile settings | Visual UI presentation |
SvStyledNode | Theme class name resolution | Programmatic styling |
SvStorableNode | Persistence dirty tracking & IndexedDB serialization | Persistent models |
SvSummaryNode | Configurable summary tile formatting | Standard app model base |
The primary structural relationship in Strvct is the parent-child node tree managed via subnodes():
// Adding subnodes
parentNode.addSubnode(childNode);
parentNode.addSubnodeAt(childNode, 0);
// Querying subnodes
parentNode.subnodeCount();
parentNode.subnodeAt(index);
parentNode.hasSubnode(childNode);
// Removing subnodes
parentNode.removeSubnode(childNode);
// Reordering subnodes
parentNode.moveSubnodesToIndex([nodeA, nodeB], 2);When addSubnode() or removeSubnode() is called, the node automatically posts a change notification ("didChangeSubnodes"), causing active views (SvNavView, SvTilesView) to update smoothly without manual page refreshes.