feat(md-deck): support structured data-config with template layers

Allow md-deck layers to render markdown templates via {{var}}
substitution instead of only CSV props. Add config.ts to normalize
a JSON data-config attribute (size, grid, shape, layers) emitted by
the yaml code-block tag, taking precedence over legacy string props.
This commit is contained in:
2026-09-02 18:15:51 +08:00
parent 023d3a0cb9
commit 16dfc8a88c
12 changed files with 450 additions and 41 deletions
@@ -120,7 +120,7 @@ export function LayerRow(props: LayerRowProps) {
class="text-sm flex-1 truncate cursor-pointer hover:text-blue-600 select-none"
onClick={props.onSelect}
>
{props.layer.prop}
{props.layer.prop || (props.layer.template ? "(模板)" : "")}
</span>
<DropdownButton