Repository navigation
uSpec V2.3
The Figma plugin now captures every placed instance's full typed componentProperties surface (booleans, instance-swaps, text overrides, variant choices) and threads that snapshot end-to-end through the extraction pipeline so the create-component-md renderer's "Referenced components" override table reads typed values directly instead of guessing from a value-only booleanOverrides projection. The same release fixes a long-standing SLOT-binding bug where the plugin was matching SLOT nodes via the wrong componentPropertyReferences key and silently dropping default-child instances from the classification UI.
Typed componentProperties snapshot (Figma plugin 2.4.0)
- Phase E captures
componentPropertieson every walked INSTANCE via the newsnapshotComponentPropertieshelper infigma-plugin/src/safe.ts. The snapshot mirrors Figma'sInstanceNode.componentPropertiesAPI exactly — every entry carries{ type, value }withtypetyped toBOOLEAN | INSTANCE_SWAP | TEXT | VARIANT | SLOT— and strips Figma's#…clean-key suffix from each property name - Phase F' (
childComposition.ts) forwards the snapshot into every_childComposition.children[*]entry, and the plugin UI round-trips it back into the sandbox so theextractmerge can attach it to slot-origin entries that bypass the first-guess builder.nullfor non-INSTANCE entries (FRAMEs, vectors, layout wrappers) and for slot-preferred entries booleanOverridesis now legacy. The field is still emitted on every entry — it's used by the first-guess fingerprinting that groups identical sub-component placements — but it's now a booleans-only projection over the typed snapshot instead of an independent read. Slot-default-child entries that previously carried an emptybooleanOverridesnow carry the projected booleans correctly
SLOT-binding bug fix (Figma plugin 2.4.0)
- SLOT nodes are now matched to their declared slot property via the new
getSlotPropNamehelper, which prefers the authoritativecomponentPropertyReferences.mainComponentbinding (per Figma's SlotNode docs) and falls back to the SLOT node's ownnamewhen that binding is absent — the common case in real files, where SLOTs typically only carry thevisiblebinding to a separate BOOLEAN prop - This replaces a buggy
Object.values(cpRefs)[0]lookup inphaseA.tsandcode.tsthat was picking up thevisiblebinding (e.g., "show leading slot") instead of the slot binding (e.g., "leading slot"), causing every later lookup-by-slot-prop-name to miss - The plugin now also logs a soft
console.warnwhen a declared slot property has no matching SLOT node in the default variant
Renderer rewrite for Referenced components (uspec-skills 0.2.11)
- New
displayName(child),slug(child), andslotSuffix(child)helpers shared across the Composition bullet rules and the API "Referenced components"####block.displayNameprefersparentSetNameover the variant-identifiermainComponentName— when a referenced child is a variant of a COMPONENT_SET, Figma'smainComponentNameis the variant identifier ("layout=icon-only, size=small"), useful as a configuration but useless as a component name - The "Referenced components" override table now reads
child.componentPropertiesexclusively, with per-typevalue formatting:BOOLEAN→true/falseINSTANCE_SWAP→(instance \{nodeId}`)`TEXT→ the literal string in backticksVARIANT→ the bare option, with"Variant axis on the placed instance."in the Notes column
- The legacy
booleanOverridesfield remains on every entry for backward compatibility but is no longer the source of truth for the rendered table.subCompVariantAxesis also explicitly demoted from the table — it lists what axes the child exposes, not what the parent's placement chose - Slot context is folded into the lead paragraph as a participle clause ("…as the default fill of the {slotName} slot") so the engineer can locate the referenced component in the parent's anatomy without cross-referencing the API's slot table
- Decorative-children rollup is now scoped to top-level entries only
Documentation
implementation.mdnow documents the two newsafe.tsexports (snapshotComponentProperties,getSlotPropName), the SLOT-binding bug fix, and the Phase F' → renderer flow for the typed snapshotfigma-plugin/docs/base-json-schema.mddocuments the newcomponentPropertiesfield on_childComposition.children[], demotesbooleanOverridesto a backward-compat projection, and adds the field to the post-change checklist
Run npx uspec-skills update to pick up the renderer change. To get the new Figma plugin behavior, rebuild figma-plugin/ locally (cd figma-plugin && npm install && npm run build) and re-import the manifest in Figma Desktop. The plugin doesn't ship via npm — it's built per-machine.