fix(studio): resolve flat-inspector review defects

This commit is contained in:
Vance Ingalls
2026-07-14 15:51:57 -07:00
parent a1fccfa748
commit 6062d3b31c
15 changed files with 390 additions and 48 deletions
@@ -29,6 +29,22 @@ export function isSelectedElementHidden(
);
}
/**
* 4-part element identity for keying panel remounts on selection change —
* id or selector alone collides for id-less same-selector siblings, leaving
* mount-initialized state pointed at the previous element.
*/
export function selectionIdentityKey(
element: Pick<DomEditSelection, "id" | "hfId" | "selector" | "selectorIndex">,
): string {
return [
element.id ?? "",
element.hfId ?? "",
element.selector ?? "",
String(element.selectorIndex ?? ""),
].join("|");
}
/* ------------------------------------------------------------------ */
/* Font types & constants (shared by font and section modules) */
/* ------------------------------------------------------------------ */