Commit graph

492 commits

Author SHA1 Message Date
Anton A S 8a486d5307 Sync docs with v0.5.0–v0.6.0: full locale translations, 75 tools
- Update tool count from 29 to 75 across all docs and locales
- Expand all locale pages (de/es/fr/it/pl) to full translations
- Add missing German sections: Advanced Rendering, Z-Order, ScrubInput,
  CI/CD, JSX Renderer, Code Panel, full figma-comparison matrix
- Write complete figma-comparison (152-row matrix) for all locales
- Expand comparison, features, tech-stack, contributing for es/fr/it/pl
- Fix garbled text in locale mcp-tools reference pages
- Architecture diagrams use '75+ tools' to avoid staleness
2026-03-04 18:12:01 +03:00
Anton A S bb028fb088 Merge remote-tracking branch 'origin/master' into add-vitepress-docs 2026-03-04 17:06:40 +03:00
Danila Poyarkov 8d22415ceb Update changelog with unreleased fixes 2026-03-04 02:33:30 +03:00
Danila Poyarkov 038c876bc6 Fix horizontal scrollbar on pages panel 2026-03-04 02:27:09 +03:00
Danila Poyarkov e17b3f3851 Enable watch feature for tauri-plugin-fs 2026-03-04 02:23:32 +03:00
Danila Poyarkov c40c6c78a8 Fix horizontal scrollbar on right panel, style scrollbars for Tauri 2026-03-04 02:21:06 +03:00
Danila Poyarkov b38d088383 Fix core tsconfig: add ESNext and DOM libs for npm publish 2026-03-04 01:58:37 +03:00
Danila Poyarkov 7ad4116860 Release v0.6.0 2026-03-04 01:47:37 +03:00
Danila Poyarkov 698ffe389a Remove Gatekeeper workaround — app is now code-signed 2026-03-04 01:45:29 +03:00
Danila Poyarkov 630e18a869 Merge branch 'fix-paste-layout' 2026-03-04 01:43:56 +03:00
Danila Poyarkov 6c87cf1a74 Update changelog with remaining paste fixes and infra changes 2026-03-04 01:43:52 +03:00
Danila Poyarkov 0b56cc1e70 Set up Apple code signing and notarization 2026-03-04 01:40:19 +03:00
Danila Poyarkov 101ce6a79e Fix broken MCP and eval-cli tests
MCP test: find_nodes searches currentPage only — switch to
FOUNDATIONS page where Button components live.
eval-cli test: material3.fig first page has 1 TEXT node, not 3 —
assert >0 instead of ==3.
2026-03-04 01:38:26 +03:00
Danila Poyarkov f23acb968f Use Cloudflare R2 for Git LFS storage 2026-03-04 01:25:33 +03:00
Danila Poyarkov 81ef1fbc45 Enable halfLeading for text rendering only, not measurement
Figma distributes leading equally above and below text. CanvasKit
defaults to ascent-biased leading. halfLeading: true fixes this but
must only apply to rendering (drawParagraph), not measureTextNode —
otherwise measured sizes change and break grid layouts.
2026-03-04 01:15:44 +03:00
Danila Poyarkov 8a13c5ffb6 Load all font weight/style variants needed by pasted text nodes
loadFontsForNodes only loaded the Regular style for each family.
Now collects fontWeight and italic from each text node and style
run, converts to style name via weightToStyle, and loads each
variant separately (e.g. Medium, Bold, Bold Italic).
2026-03-04 01:15:44 +03:00
Danila Poyarkov 26ed064b07 Fix InvalidCharacterError when copying nodes with non-ASCII text
btoa() only handles Latin-1. Use TextEncoder + binaryToBase64 for
encoding and TextDecoder + base64ToBinary for decoding the internal
OpenPencil clipboard format.
2026-03-04 01:15:44 +03:00
Danila Poyarkov af9a0ebb5a Fix PERCENT line height conversion — was stored as raw value instead of pixels
Figma's lineHeight with units=PERCENT stores e.g. 100 meaning 100%
of fontSize. We stored the raw value (100) which the renderer
interpreted as 100px, producing ~6x line height. Now properly
converts: PERCENT → value/100 * fontSize, PIXELS → value as-is.
2026-03-04 00:20:43 +03:00
Danila Poyarkov 9c82cba672 Fix font loading not registering in core cache, add layout text measurement tests
Tauri's loadFont registered fonts with the CanvasKit provider but
not in core's loadedFamilies cache, so isFontLoaded returned false
and measureTextNode returned null during layout recomputation.

Add markFontLoaded() to core and call it from Tauri font loader.
Add tests verifying text measurement integrates with auto-layout
centering.
2026-03-04 00:16:15 +03:00
Danila Poyarkov bf83118f96 Recompute layouts after font loading completes 2026-03-04 00:13:24 +03:00
Danila Poyarkov d8c1610d9a Update changelog with clipboard paste fixes 2026-03-04 00:12:33 +03:00
Danila Poyarkov d7e2015967 Estimate text width for WIDTH_AND_HEIGHT auto-resize in layout
Text nodes with textAutoResize=WIDTH_AND_HEIGHT now use an estimated
content width instead of the node's current width when computing
auto-layout. Fixes month headers (and similar centered text in
auto-layout) appearing left-aligned after paste.
2026-03-04 00:11:48 +03:00
Danila Poyarkov 9eaab86733 Apply layout overrides (layoutGrow, textAutoResize) to instance children 2026-03-04 00:04:07 +03:00
Danila Poyarkov 809a1dfe75 Clear hover on zoom/pinch to keep scene picture cache valid 2026-03-03 23:58:46 +03:00
Danila Poyarkov 534a7b298e Add DEFAULT_FONT_FAMILY constant, load fonts on paste and .fig import
Replace all 'Inter' string literals with DEFAULT_FONT_FAMILY from
constants. Add loadFontsForNodes() that collects font families from
text nodes and loads them into CanvasKit, called after clipboard
paste and .fig file import.
2026-03-03 23:56:21 +03:00
Danila Poyarkov da2df1296b Extract shared sortChildren, reduce kiwi-convert export surface 2026-03-03 23:34:02 +03:00
Danila Poyarkov 9044b1b183 Sort auto-layout children by geometric position on import
Figma's parentIndex.position strings represent z-order, not visual
layout order. In auto-layout frames, children must be sorted by their
x (horizontal) or y (vertical) coordinate to match the visual order.
Fixes scrambled calendar dates and other auto-layout child ordering.
2026-03-03 23:31:23 +03:00
Danila Poyarkov 157c776c0c Apply instance symbolOverrides on clipboard paste
Each instance in Figma's clipboard carries symbolData.symbolOverrides
with per-child property changes (text, fills, visibility). The override
targets a child via guidPath which matches the overrideKey field on the
component's child node.

After cloning component children into instances, overrides are resolved
through the overrideKey→figmaId→internalId→clonedChild chain and applied
to the instance's children.
2026-03-03 23:26:29 +03:00
Danila Poyarkov 3eb3a921a0 Detect component sets and skip internal canvas on paste
FRAME nodes with VARIANT componentPropDefs are now promoted to
COMPONENT_SET on import (both .fig files and clipboard paste).

Clipboard paste now respects the Internal Only Canvas: components
on it are used to populate instance children but are not pasted
as visible nodes, matching Figma's behavior.
2026-03-03 23:20:55 +03:00
Danila Poyarkov 3d4f083d5e Populate instance children from component on clipboard paste
When pasting from Figma, INSTANCE nodes reference their component via
symbolData.symbolID but have no children in the clipboard. If the
component was also pasted, clone its children into the instance using
the componentId mapping (cloneChildrenWithMapping).
2026-03-03 21:20:31 +03:00
Danila Poyarkov e737ee5c13 Scale vector paths from normalizedSize to node size on import
Figma vectors use a normalized coordinate space (vectorData.normalizedSize)
that can differ from the node's actual size. The decoded path vertices and
tangents must be scaled to fit the node bounds, otherwise vectors render
at the wrong size (e.g. 16×16 path in a 12×12 node).
2026-03-03 21:19:35 +03:00
Danila Poyarkov 22e9553b30 Fix Figma clipboard paste: broken layout and missing properties
Extract shared kiwi→SceneNode conversion into kiwi-convert.ts, used by
both fig-import.ts (.fig file opening) and clipboard.ts (Figma paste).

The clipboard import was a simplified copy that diverged over time:
- Missing SYMBOL→COMPONENT type mapping (Figma's kiwi name for components)
- textAutoResize hardcoded to NONE instead of using clipboard value
- No gradient/image fill support, no effects, no style runs
- Missing flipX/flipY, constraints, text decorations, arc data, etc.
- Percent letter spacing not converted to pixels

Now both paths use nodeChangeToProps() with identical conversion logic.
2026-03-03 21:19:35 +03:00
Danila Poyarkov 3f4169e32d Add macOS Gatekeeper workaround to README and docs 2026-03-03 21:19:07 +03:00
Danila Poyarkov f8218623ac Update changelog 2026-03-03 20:36:58 +03:00
Danila Poyarkov 7e06969ab5 Multi-selection properties panel with tests
Show position, appearance, fill, stroke, and effects sections
when multiple nodes are selected. Shared values display normally,
differing values show 'Mixed'. Editing applies to all selected.

- Shared composable (use-multi-props) for isMulti, active, activeNode
- ScrubInput supports MIXED symbol as model-value
- Per-node previous values for correct undo on multi-edit
- Fix flip transform encoding (scale first column only)
- Fix npm publish auth for MCP package
- 22 new tests: flip, alignment, multi-node merging, kiwi roundtrip
2026-03-03 20:35:51 +03:00
Danila Poyarkov 5a77f2c1cc Fix flip and single-node alignment
Flip horizontal/vertical now toggles flipX/flipY with scale
transform instead of manipulating rotation. Import detects flip
from negative transform determinant. Single-node alignment uses
parent frame bounds instead of bailing out.
2026-03-03 18:35:30 +03:00
Danila Poyarkov 264bc7fe2a Fix build workflow: only create releases and publish npm from version tags 2026-03-03 18:29:56 +03:00
Danila Poyarkov 2ad76108f0 Fix npm publish: run from repo root with dir argument 2026-03-03 18:13:52 +03:00
Danila Poyarkov 0c3cfcd1cc Update roadmap: .fig compatibility, shaders, component libraries 2026-03-03 18:08:03 +03:00
Danila Poyarkov 734612cab3 Fix npm auth: write .npmrc to home dir for subshell publish 2026-03-03 17:57:55 +03:00
Danila Poyarkov 90b92b4fb5 Fix npm publish: use npm instead of pnpm for auth compatibility 2026-03-03 17:44:19 +03:00
Danila Poyarkov 9c9bfc38b2 Release v0.5.1 2026-03-03 17:30:09 +03:00
Danila Poyarkov 06fb0a3e7a Fix save: map LAYER_BLUR to FOREGROUND_BLUR for kiwi export 2026-03-03 17:29:43 +03:00
Danila Poyarkov 8e234d7bb5 Add CI for PRs, issue/PR templates, CONTRIBUTING and SECURITY docs 2026-03-03 17:24:45 +03:00
Danila Poyarkov 601dc85aa8 Fix fileRoot test: await async exportFigFile 2026-03-03 17:19:49 +03:00
Peter 31d614a272
fix(mcp): harden HTTP transport defaults (#26) 2026-03-03 17:19:08 +03:00
Danila Poyarkov fcb244f02a Cache Rust and Bun dependencies in CI 2026-03-03 17:11:33 +03:00
Danila Poyarkov 79eff7c0a8 Fix npm publish: run cd in subshell to preserve working directory 2026-03-03 16:55:36 +03:00
Danila Poyarkov 5eac653f4c Release v0.5.0 2026-03-03 14:51:56 +03:00
Danila Poyarkov 299d9b73b8 Auto-expand layers tree to reveal selected node 2026-03-03 14:48:51 +03:00