fix(studio): read z-index from live iframe DOM, rename Layer to Z-index

Replace fragile regex z-index parsing with getComputedStyle on the
preview iframe elements — the same source of truth the inspector uses.

Rename "Layer" to "Z-index" in the design panel for clarity.
This commit is contained in:
Miguel Ángel
2026-05-21 18:28:17 -04:00
parent 0999ed56e6
commit 34a4ad2ed3
3 changed files with 21 additions and 7 deletions
@@ -323,7 +323,7 @@ export const PropertyPanel = memo(function PropertyPanel({
</div>
<div className="mt-3">
<MetricField
label="Layer"
label="Z-index"
value={String(parseInt(styles["z-index"] || "auto", 10) || 0)}
scrub
onCommit={(next) => onSetStyle("z-index", next)}