refactor(engine): simplify asset and code generation helpers

This commit is contained in:
Dylan M. Taylor
2026-10-28 16:00:36 +00:00
parent 5e16683963
commit d87f9effe1
36 changed files with 1062 additions and 849 deletions
+2 -2
View File
@@ -10,14 +10,14 @@
//! keeps JSX's braces: `size={size}` → `size="Large"`, `{label}` → `{"Buy"}`), and
//! `{prop ? "a" : "b"}` picks one of two strings. Any other `{…}` stays as written.
use figcraft_doc::*;
use figcraft_doc::{CodeLink, Document, NodeId, NodeKind};
use serde_json::{Value, json};
use crate::cmd::CommandSpec;
use crate::codegen::{CodeLang, Ctx};
use crate::component_codegen::{Component, Param, ParamKind, describe, instance_values, js_string, main_of, value_expr};
use crate::components::{slots_of, variant_set};
use crate::params::*;
use crate::params::{get, id_of, targets};
use crate::{EngineError, Result, Session, bad, spec};
/// Longest template (chars).