Skip to content

fix(deep): handle figma.mixed in deep component extraction - #85

Open
DarWiM wants to merge 1 commit into
southleft:mainfrom
DarWiM:fix/figma-mixed
Open

fix(deep): handle figma.mixed in deep component extraction#85
DarWiM wants to merge 1 commit into
southleft:mainfrom
DarWiM:fix/figma-mixed

Conversation

@DarWiM

@DarWiM DarWiM commented Jun 21, 2026

Copy link
Copy Markdown

Serialize the deep tree with a JSON replacer that maps Symbol (figma.mixed) to the string "MIXED" and post the parsed clone. This fixes the "Cannot unwrap symbol" crash that aborted the whole deep extraction on text with mixed character styles.

Also expand mixed values into full data instead of dropping them:

  • mixed per-character text -> styledSegments[] (per-range fontName, fontSize, fontWeight, textDecoration, textCase, lineHeight, letterSpacing, fills, textStyleId, fillStyleId)
  • mixed cornerRadius -> cornerRadiuses (per corner)
  • mixed strokeWeight -> strokeWeights (per side)
  • fix missing braces so fontStyle is not read off a mixed fontName

Serialize the deep tree with a JSON replacer that maps Symbol
(figma.mixed) to the string "MIXED" and post the parsed clone. This
fixes the "Cannot unwrap symbol" crash that aborted the whole deep
extraction on text with mixed character styles.

Also expand mixed values into full data instead of dropping them:
- mixed per-character text -> styledSegments[] (per-range fontName,
  fontSize, fontWeight, textDecoration, textCase, lineHeight,
  letterSpacing, fills, textStyleId, fillStyleId)
- mixed cornerRadius -> cornerRadiuses (per corner)
- mixed strokeWeight -> strokeWeights (per side)
- fix missing braces so fontStyle is not read off a mixed fontName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant