diff --git a/future-plans.md b/future-plans.md index 55cd8b0..586cd06 100644 --- a/future-plans.md +++ b/future-plans.md @@ -224,21 +224,31 @@ experience for JS snippets. ## Template system -### Rich return values from templates -Currently formatters can only return a plain string. It would be useful to return -richer output — e.g. styled text, multiple values, or structured data. Options: +### Unified formatter → template pipeline and terminology revision +The current system conflates several distinct concepts under the word "template", +creating ambiguity: -- Return an object with named slots: `{ label: "100kΩ", sublabel: "0603", badge: "low stock" }` - which the renderer maps to specific DOM locations -- Return an HTML string rendered via `innerHTML` (simple but XSS risk if data is - user-controlled, and ties templates to DOM structure) -- Return a DOM node or a lightweight virtual-DOM descriptor +- The HTML `