refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
@@ -25,35 +25,35 @@ COMPONENT(Request& context)
<div class="ws-demo-sidebar-copy"><p>This sidebar and mobile shell pattern was extracted from the AI portal app and normalized against starter theme tokens.</p></div>
</>
sidebar_body = ob_get_close();
DTree sidebar_note;
DValue sidebar_note;
sidebar_note["icon_class"] = "fas fa-circle-info";
sidebar_note["text"] = "Use workspace/overview, workspace/projects, or workspace/activity";
sidebar_body += component("../../components/workspace/primitives:LIST_STATE", sidebar_note, context);
DTree toolbar_props;
DValue toolbar_props;
toolbar_props["action_html"] = "<a class=\"ws-sidebar-action-btn\" href=\"" + app_link("workspace/overview", context) + "\"><i class=\"fas fa-grid-2\"></i><span>Open shell</span></a>";
toolbar_props["search_input_id"] = "workspace-demo-search";
toolbar_props["search_input_name"] = "workspace_demo_search";
toolbar_props["search_placeholder"] = "Search workspace sections";
String sidebar_top = component("../../components/workspace/primitives:SIDEBAR_TOOLBAR", toolbar_props, context);
DTree sidebar_props;
DValue sidebar_props;
sidebar_props["id"] = "workspace-demo-sidebar";
sidebar_props["top_html"] = sidebar_top;
sidebar_props["body_html"] = sidebar_body;
String sidebar = component("../../components/workspace/primitives:SIDEBAR_SHELL", sidebar_props, context);
DTree mobile_props;
DValue mobile_props;
mobile_props["button_id"] = "workspace-demo-toggle";
mobile_props["title"] = "Starter Workspace";
String mobile_bar = component("../../components/workspace/primitives:MOBILE_BAR", mobile_props, context);
DTree pill_props;
DValue pill_props;
pill_props["label"] = status_label;
pill_props["variant"] = status_variant;
String status_html = component("../../components/workspace/primitives:STATUS_PILL", pill_props, context);
DTree header_props;
DValue header_props;
header_props["title"] = title;
header_props["subtitle"] = subtitle;
header_props["actions_html"] = status_html;
@@ -81,10 +81,10 @@ COMPONENT(Request& context)
</>
detail_html = ob_get_close();
DTree section_head;
DValue section_head;
section_head["title"] = "Why this belongs in the starter";
String why_head = component("../../components/workspace/primitives:SECTION_HEAD", section_head, context);
DTree section_props;
DValue section_props;
section_props["header_html"] = why_head;
section_props["body_html"] = "<p class=\"ws-section-copy\">" + html_escape(description) + "</p>" + stats_html;
String main_body = component("../../components/workspace/primitives:SECTION", section_props, context);
@@ -99,7 +99,7 @@ COMPONENT(Request& context)
if(section == "activity")
{
DTree empty_props;
DValue empty_props;
empty_props["icon_class"] = "fas fa-clock-rotate-left";
empty_props["title"] = "No live stream wired yet";
empty_props["text"] = "The shell is generic. Add your own websocket, polling, or event-driven runtime behind it when a real product needs one.";
@@ -107,12 +107,12 @@ COMPONENT(Request& context)
main_body += component("../../components/workspace/primitives:EMPTY_STATE", empty_props, context);
}
DTree panel_props;
DValue panel_props;
panel_props["header_html"] = header;
panel_props["body_html"] = main_body;
String main = mobile_bar + component("../../components/workspace/primitives:PANEL", panel_props, context);
DTree app_props;
DValue app_props;
app_props["id"] = "workspace-demo-shell";
app_props["overlay_id"] = "workspace-demo-overlay";
app_props["sidebar_html"] = sidebar;