Scaling a subtree now gives the scale factor only to instances with no instance above them in the subtree (scale_of already multiplies the outer factor, so nested ones drew at k x k and jumped back on rebuild).
Detach's baking moved to styles::bake_scale; bake_stale_scales runs it after a library import turns an instance with a missing main into a frame, after cycle-breaking detach, and after Restore main component (by analogy with Detach, not measured in Figma).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove; Fable 5.1 reviewed; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
Measured in Figma: detaching a 0.5x instance whose gap is bound leaves a plain frame with the gap
at the scaled value and no variable. component.detach kept the bindings but dropped the factor,
so the gap jumped back to the variable's value. Now the detached frame's own layers drop the
bindings of their length fields, the instances inside it take its factor on, and its own factor
goes back to 1. Test detaching_a_scaled_instance_keeps_its_lengths_and_drops_their_variables
(gap 8 before, 4 now).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove, measured and wrote
* M3: team library analytics count detached instances
Detaching an instance of a library component counts it in the file (libraries.detached, saved with it, capped). The background library check reports the counts after its fetch (ReportDetached); the server keeps them per file beside the file's usage report in usage.json (same caps) and answers Detached with them. Show usage and library.usage list detaches per component and per file (detached, detachesKnown). The new request and reply variants are appended, so every older library message keeps its bytes; an older server refuses the new requests, which the app ignores. Gap 10.
* M3: the detach test waits for the instance count too (the two arrive in separate reports)
Properties were listed by name, so a rename moved one. Components now keep prop_order (the names as they were made; a rename keeps the place) and every listing follows it. Make slot opens a name field under the frame's Slot row; Enter makes the slot, Escape cancels, a taken name keeps the field open.
* M2: components can't contain their own instances (#1084)
Edits that would make a component hold an instance of itself, directly, through other components or through another variant of its set, are refused with the loop named. Files holding such a loop open with one instance per loop detached and a note; a rebuild never expands an instance inside a copy of itself, so a loop merged in a live session stops growing.
* M2: a variant may hold a sibling variant's instance; only true loops are refused (#1084)
Each variant counts as its own component: refusals and open-time repairs apply only to a component leading back to itself through instances (an instance-swap value included), so files with nested sibling variants open unchanged. sync_instance_depth is split into match_layers and copy_layers.