Commit graph

536 commits

Author SHA1 Message Date
Danila Poyarkov 8dfed26d16 fix(fig): preserve paint variable overrides
- Carry paint bindings through symbol overrides and clone synchronization

- Keep explicit instance strokes and resolved variable opacity intact
2026-07-22 15:51:46 +03:00
Danila Poyarkov 8c31d5ed87 feat(figma-api): expose vector paths and modes
- Return SVG path data for imported vector geometry

- Report explicit and inherited variable modes on node proxies
2026-07-22 15:07:20 +03:00
Danila Poyarkov 7124d0045f fix(cli): populate lazy FIG pages
- Populate requested pages for scoped reads and all pages for document-wide operations

- Export whole FIG documents by default while keeping explicit page exports partial
2026-07-22 14:56:58 +03:00
Danila Poyarkov 072c159fdb fix(fig): preserve independent bound padding
- Treat leading-edge variable bindings as independent padding values

- Serialize trailing padding when raw layout metadata would collapse it
2026-07-21 10:49:54 +03:00
Danila Poyarkov b61957dff9 fix(fig): preserve swapped instance appearance
- Copy component visual and clipping properties during imported swaps

- Keep placed bounds and size-variable bindings authoritative
2026-07-21 10:30:58 +03:00
Danila Poyarkov 8561d73eaf fix(demo): restore showcase validation
- Replace nested tone branches with a typed color map

- Cover the rebuilt component library and analytics demo
2026-07-21 02:32:03 +03:00
Danila Poyarkov f6e4dd4c83 fix(fig): preserve derived instance geometry
- Keep placed instance bounds authoritative over root symbol overrides

- Reject size-only positions outside the target parent

- Avoid applying constraint scale twice to derived vector paths
2026-07-21 02:31:44 +03:00
Danila Poyarkov 96de4e5fdb fix(fig): preserve regenerated override lineage
- Remap descendant clone sources when instance branches are repopulated

- Keep same-name component-property siblings distinct

- Name swapped variants after their component sets
2026-07-21 01:51:27 +03:00
Danila Poyarkov 584400e017 fix(fig): preserve variable references on export
- Reuse imported collection, mode, and variable GUIDs when safe

- Keep raw paint asset refs instead of promoting incomplete library bindings

- Retain GUID conversion only for effect aliases required by Kiwi
2026-07-21 01:16:37 +03:00
Danila Poyarkov 74d662d560 fix(fig): target nested instance overrides
- Resolve repeated descendants through source-component paths

- Replay property overrides after component swaps stabilize

- Preserve clone lineage for property-only synchronization
2026-07-21 01:16:17 +03:00
Danila Poyarkov e704343f13 fix(fig): honor node-scoped variable modes
- Import and round-trip per-node variable mode overrides

- Resolve fill and stroke aliases through the nearest mode scope

- Preserve mode maps across cloning and instance synchronization
2026-07-21 00:23:00 +03:00
Danila Poyarkov 72dee43e44 fix(text): share fonts across canvas layers
- Register loaded faces with both scene and overlay renderers\n- Keep provider registration state isolated per CanvasKit provider
2026-07-20 22:19:27 +03:00
Danila Poyarkov 2086bcc3d7 test(app): isolate clipboard notification state 2026-07-20 18:24:32 +03:00
Danila Poyarkov df41f60a26 perf(fig): restore large document load performance
- Populate only the first page during initial document reads
- Avoid duplicating immutable instance payloads and opaque source metadata
- Propagate derived text through source-ordered clone chains
2026-07-20 15:36:27 +03:00
Danila Poyarkov cf857dbf80 fix(text): preserve local font rendering (#395)
- Reject text pictures captured before the current font generation
- Keep text visible when CanvasKit must synthesize a missing italic face
2026-07-20 14:07:47 +03:00
Danila Poyarkov e0d8efb2a4
Merge pull request #411 from open-pencil/figma-paste-images
fix(clipboard): fetch pasted Figma images on desktop
2026-07-18 05:04:49 +03:00
Danila Poyarkov c2812ba136 fix(tauri): preserve request and abort semantics
- Serialize bodies from the normalized Request, including Request inputs\n- Consume late transport failures after an already-aborted signal\n- Handle pre-aborted clipboard test requests
2026-07-18 05:02:51 +03:00
Danila Poyarkov a3127e716b refactor(tauri): share HTTP abort handling
- Make the desktop HTTP adapter honor standard AbortSignal cancellation
- Use AbortSignal.timeout directly for Figma batch and image requests
- Cover resolved, pre-aborted, and in-flight abort behavior
2026-07-18 04:40:15 +03:00
Danila Poyarkov 798a3c2b2c fix(editor): harden opacity shortcuts
- Match numeric keypad input by generated key so NumLock-off navigation remains available
- Coalesce buffered opacity updates into one undo interaction
- Add end-to-end coverage for digit composition, modifiers, and undo
2026-07-18 04:22:38 +03:00
Danila Poyarkov b08e199c85 fix(clipboard): finalize paste before image fetch
- Complete placement and undo registration before awaiting image hydration
- Bound Figma image requests with timeouts and use shared Tauri detection
- Localize missing-image notifications and cover stalled requests
2026-07-18 04:22:38 +03:00
Danila Poyarkov 5bcc44cc91 Merge branch 'master' into review-pr-410-current
# Conflicts:
#	CHANGELOG.md
2026-07-18 04:01:06 +03:00
Danila Poyarkov c8bbdbbb46 Merge branch 'master' into review-pr-411-current 2026-07-18 04:00:57 +03:00
Danila Poyarkov 86d6a63d0f fix(fig): restore strict parse validation
- Reject corrupt compressed Kiwi chunks instead of accepting raw garbage\n- Tolerate legacy source metadata without editedFields in renderer fallbacks\n- Align font, derived glyph, shared style, renderer mock, and ownership tests with current contracts\n- Restore clean quick and heavy unit quality gates
2026-07-18 03:58:18 +03:00
Danila Poyarkov 8b9be17a56 perf(fig): remove large fixture bottlenecks
- Index component property definitions and variable asset references once per export or override context\n- Skip converged instance fill and text propagation and use native binary hex encoding\n- Add a non-populating parse mode for raw fixture validation\n- Reduce the Material 3 round trip from minutes to about twenty seconds
2026-07-18 03:37:58 +03:00
Danila Poyarkov 85c3c8fad1 refactor(fig): own NodeChange export policy
- Move SceneGraph-to-NodeChange conversion, text payload assembly, and blob encoding into @open-pencil/fig\n- Inject core glyph outline lookup through an explicit runtime service\n- Centralize neutral font naming in scene-graph and retain core IO/runtime orchestration
2026-07-18 02:41:35 +03:00
Danila Poyarkov 02b7261c9e refactor(fig): own raw metadata invalidation
- Track normalized edited fields in SceneGraph without naming Figma payload fields\n- Preserve original raw provenance while filtering stale values through Fig-owned effective readers\n- Rewire export and renderer fallbacks and add package, SceneGraph, and exhaustive round-trip coverage
2026-07-18 02:22:01 +03:00
Danila Poyarkov 2bd2304bcb refactor(fig): own instance interpretation
- Move component properties, symbol overrides, derived symbol data, and clone synchronization into @open-pencil/fig\n- Add the public instance-overrides subpath with package tests and packed smoke coverage\n- Remove cross-package forwarding modules and enforce direct owner imports in architecture checks
2026-07-18 02:06:34 +03:00
Sadko 86d4167cbf
Merge branch 'master' into master 2026-07-17 18:37:59 -04:00
Danila Poyarkov db056317a8 refactor(fig): extract paint import policy
- Move paint/effect normalization and derived glyph conversion into the Fig package\n- Rewire core import and instance paths through the public node-change boundary\n- Keep static renderer evidence pointed at the new format-policy source
2026-07-18 01:36:00 +03:00
Danila Poyarkov a10911c772 refactor(fig): extract NodeChange policy helpers
- Move style references, plugin metadata, text values, and font feature conversion into @open-pencil/fig\n- Add a public node-change subpath with package-local and packed smoke coverage\n- Keep core conversion callers on compatibility exports during the staged migration
2026-07-18 01:32:13 +03:00
Danila Poyarkov f9e2588b84 refactor(fig): own full archive parsing
- Move ZIP canvas and image discovery from Kiwi into @open-pencil/fig\n- Keep Kiwi focused on raw fig-kiwi payload decoding\n- Rewire core and fixture consumers through the public Fig package API
2026-07-18 01:17:21 +03:00
Sadko 2b3b2dbe45
Merge branch 'open-pencil:master' into master 2026-07-17 17:55:24 -04:00
Danila Poyarkov 9ee36efa27 fix(kiwi): preserve unrelated raw metadata
- Invalidate only edited raw Figma fields and dependent geometry or text payloads\n- Prefer untouched component and layout-grid metadata during export\n- Restore exhaustive gold fixture scene parity and refresh coverage baselines
2026-07-18 00:44:49 +03:00
Sadko 1a82f84ba5
Merge branch 'open-pencil:master' into master 2026-07-17 15:44:35 -04:00
Danila Poyarkov 0bf74a418f feat(text): deepen typography controls
- Add case, justification, vertical alignment, truncation, max-lines, and OpenType controls

- Apply visual text case and measured vertical offsets in CanvasKit rendering

- Preserve nullable preview values, shared text styles, font demand, and .fig metadata

- Add panel, engine, and canvas visual coverage
2026-07-17 22:40:52 +03:00
sadkodev a5cffcc1ed
fix(editor): reject partially numeric opacity buffers
Add /^\d+$/ guard to opacityFromBuffer so strings like '12x', '5abc',
or '3.5' return 100% instead of silently parsing the numeric prefix.
Add unit tests for partial, decimal, scientific, negative, and
whitespace-prefixed buffers.
2026-07-17 15:34:00 -04:00
sadkodev d1284cd01b
fix(editor): guard setOpacity against non-finite values
Add Number.isFinite guard to editor.setOpacity so NaN, Infinity, and
-Infinity are rejected silently instead of corrupting node opacity.
Tighten opacityFromBuffer to use Number.isFinite for the same reason.
Add 3 unit tests covering NaN, Infinity, and -Infinity rejection.
2026-07-17 15:34:00 -04:00
Sadko 1151383de0
Merge branch 'open-pencil:master' into master 2026-07-17 15:09:35 -04:00
sadkodev d58cf0b9e9
test(keyboard): add unit tests for opacity buffer logic
Extract opacityFromBuffer as a pure function in core/editor and test
it directly. Covers Figma semantics: 0→100%, 5→50%, 28→28%, 00→0%,
100→100%, clamp at 100%, NaN guard. Refactor the keyboard handler to
reuse the shared function instead of inlining the buffer math.
2026-07-17 15:00:10 -04:00
Danila Poyarkov 23645d5a2d feat(editor): add component property controls
- Model typed component definitions, references, assignments, and preferred swap values

- Add SDK-owned variant, text, boolean, and nested instance-swap controls with mixed-selection undo

- Preserve assignments across variant changes and component synchronization

- Round-trip component property metadata through .fig import and export
2026-07-17 21:59:49 +03:00
sadkodev 0300cb521b
refactor(keyboard): address review feedback on opacity shortcuts
- Move setOpacity to core editor action (packages/core/src/editor/nodes.ts)
  so it is testable directly without duplicating logic in tests
- Replace external window listener with tinykeys bindings in
  registerKeyboardShortcuts, reusing shared input/focus guards
- Add 20 bindings for Digit0-9 and Numpad0-9 with modifier guards
- Implement Figma-style multi-digit buffer: 2→20%, 28→28%, 00→0%, 100→100%
  with 400ms timeout and auto-apply at 3 digits
- Simplify selection.setOpacity command to delegate to editor.setOpacity
- Rewrite unit tests to call editor.setOpacity directly
- Add ofetch to dependencies (was imported but missing from package.json)
- Update CHANGELOG
2026-07-17 14:09:46 -04:00
Sadko cb63d6f0f3
Merge branch 'open-pencil:master' into master 2026-07-17 13:57:33 -04:00
Danila Poyarkov c96f87bf9b feat(editor): add shared style bindings
- Model imported fill, stroke, text, effect, and grid style definitions and references

- Add SDK and app selectors with mixed-selection batching, detach-on-edit, and undo restoration

- Preserve style definitions through .fig export and extracted subgraphs

- Document the shared-style composable and update compatibility coverage
2026-07-17 20:28:22 +03:00
Danila Poyarkov 1d8ddd951a feat(editor): add corner smoothing control
- Expose mixed smoothing percentages through Appearance controls
- Preserve per-node corner preview values in one-step undo
- Cover CanvasKit profiles and .fig import/export with engine and visual tests
2026-07-17 19:28:34 +03:00
Danila Poyarkov 2f8d799a5f feat(editor): add stroke geometry controls
- Add mixed-selection cap, join, and miter-limit controls with one-step undo
- Apply node miter limits across CanvasKit stroke paths and vector outline caches
- Preserve imported and edited stroke geometry through Plugin API and .fig roundtrips
2026-07-17 19:01:42 +03:00
Danila Poyarkov d19c05f48e feat(editor): add resize constraints
- Add SDK-owned mixed constraint state, pin controls, and undo-aware updates
- Apply Figma constraint modes recursively during frame resize previews and commits
- Document and test the control, multi-selection behavior, and resize geometry
2026-07-17 18:32:58 +03:00
Danila Poyarkov fc85589438 fix(clipboard): fetch pasted Figma images on desktop
- Resolve Figma image hashes through the existing Tauri HTTP bridge
- Verify downloaded image bytes and report partial failures through typed editor events
- Warn web users and surface actionable desktop fetch errors
2026-07-17 18:03:00 +03:00
Danila Poyarkov 7bfebce0bf feat(editor): scale and theme Layers panel
- Add indexed visible rows, virtual scroll-to-selection, and range selection

- Move Layer Tree state styling into typed Tailwind Variants slots

- Enforce parsed Vue state-class theming and cover 5,000-node documents
2026-07-17 17:23:16 +03:00
Danila Poyarkov 9919d8710a fix(text): verify visible international font rendering
- Register CanvasKit faces under their source family names so CJK and Arabic glyphs paint instead of only shaping metrics
- Add deterministic CJK, Arabic, mixed-script, first-paint, and interactive fallback image oracles
- Cover typed and tool-created text parity with a repository-owned Noto CJK subset

Fixes #324
Fixes #291
2026-07-17 16:19:18 +03:00
Danila Poyarkov 47fe43c3ec feat(text): harden font resolution lifecycle
- Gate ingest rendering until required faces and script fallbacks resolve
- Key CanvasKit artifacts by font registration generation and invalidate affected nodes
- Load character-aware remote subsets with cumulative coverage and exact render aliases
- Use BCP-47 language hints for shaping and CJK fallback order
- Keep baked .fig glyphs as an exhaustion-only fallback
2026-07-17 14:52:35 +03:00