Commit graph

2009 commits

Author SHA1 Message Date
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 71cf3e5aa0
Merge pull request #410 from sadkodev/master
feat(keyboard): add Figma-style opacity shortcuts 1-9/0
2026-07-18 05:04:38 +03:00
Sadko 665e28cbaa
Merge branch 'master' into master 2026-07-17 22:03:09 -04: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 d7a27a894c fix(app): preserve compact paint field sizing
- Keep embedded number fields from crowding color values\n- Cover paint-row geometry in property-panel E2E tests\n- Refresh the reviewed typography panel snapshot for visible variable actions
2026-07-18 04:57:48 +03:00
Danila Poyarkov 45d8cd51f5 Merge branch 'master' into review-pr-410-current 2026-07-18 04:40:38 +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 585b80d023 Merge remote-tracking branch 'origin/master' into review-pr-411-current 2026-07-18 04:36:06 +03:00
Danila Poyarkov fc5cc2d4b8 fix(app): align variable-enabled panel fields
- Keep Apply variable actions visible with restrained hover treatment
- Preserve the shared 26px NumberField height in column layouts
- Anchor variable pickers to their trigger instead of the zero-size contents wrapper
- Cover control dimensions, action visibility, and popover placement end to end
2026-07-18 04:35:52 +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 8ceda4d12f docs: close Fig package boundary track
- Describe complete Fig archive, conversion, instance, and metadata ownership\n- Refresh contributor paths across localized development guides\n- Mark Track D complete in the local master plan
2026-07-18 03:41:17 +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 6c9ef9d103 fix(deps): patch collaboration websocket driver
- Pin websocket-driver 0.7.5 across the Trystero Firebase dependency chain\n- Restore a clean critical dependency audit\n- Reuse the shared font family/style shape exposed by scene-graph
2026-07-18 02:49:22 +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
Danila Poyarkov 22a160bfc3 refactor(fig): own NodeChange import conversion
- Move NodeChange-to-SceneGraph property and style-run policy into @open-pencil/fig\n- Share normalized font-style parsing and model defaults through scene-graph instead of duplicating literals\n- Preserve core compatibility exports while conversion callers migrate
2026-07-18 01:51:13 +03:00
Danila Poyarkov c2f3338877 refactor(fig): own vector blob conversion
- Move vector network blob codecs and NodeChange geometry resolution into @open-pencil/fig\n- Preserve the existing core vector compatibility exports without pass-through wrappers\n- Add package-local round-trip coverage for handle mirroring
2026-07-18 01:41:31 +03:00
Sadko 86d4167cbf
Merge branch 'master' into master 2026-07-17 18:37:59 -04:00
Sadko 6a53935af2
Update CHANGELOG.md 2026-07-17 18:36:07 -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
Sadko 6e4cff3d1f
Update CHANGELOG.md 2026-07-17 18:28:55 -04:00
Danila Poyarkov f0d10edf69 refactor(fig): own archive assembly
- Add public writeFigArchive API for canvas, thumbnail, metadata, and image entries\n- Reduce core compression to a compatibility re-export\n- Exercise archive writing through package-local and packed smoke tests
2026-07-18 01:23:06 +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 d78f4bb64e
Merge branch 'open-pencil:master' into master 2026-07-17 17:28:32 -04:00
Danila Poyarkov 0abbb839cb refactor(app): finish visual state theming
- Theme Variables, collaboration, presence, and provider status states\n- Expose semantic default, resizing, following, connection, and tone attributes\n- Remove the final dynamic-state allowlist and document enforced Vue template rules
2026-07-18 00:23:38 +03:00
Danila Poyarkov 69e39cc59e refactor(app): theme toolbar editing states
- Share typed toolbar slots across desktop, mobile, flyout, and action controls\n- Theme alignment cells, fill tabs, and gradient stop states\n- Expose semantic active and disabled state and retire migrated allowlist entries
2026-07-18 00:07:49 +03:00
Sadko 0809f26c8e
Merge branch 'master' into master 2026-07-17 16:56:39 -04:00
Danila Poyarkov 3e750383c0 test(app): add panel UI guardrails
- Lock representative property and Layer Tree states with visual snapshots\n- Cover keyboard tab order and keyboard activation for panel controls\n- Reject template-time UI hooks and raw SVG app icons through parsed Vue ASTs
2026-07-17 23:53:06 +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 80b103f408
Merge branch 'master' into master 2026-07-17 15:11:00 -04:00
Danila Poyarkov 0bd5afe784 feat(editor): add paint blend mode controls
- Expose localized blend mode selects for fills and expanded effects

- Reuse PropertyList batching for shared-style detachment and mixed-selection undo

- Share Appearance, Fill, and Effects blend mode options

- Add focused E2E and panel visual coverage
2026-07-17 22:10:27 +03: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 1ca1cbc896
refactor(keyboard): deduplicate opacity binding handler
Collapse the duplicated Digit/Numpad opacity bindings into a single
OPACITY_CODES array with one shared run handler. Digit value is
extracted via code.slice(-1), which works for both Digit0-9 and
Numpad0-9.
2026-07-17 14:49:00 -04:00
sadkodev b5de980632
fix(keyboard): treat single 0 as 100% opacity
Figma treats pressing 0 alone as 100% opacity, not 0%. The single-digit
decena rule (n * 10) would produce 0 * 10 = 0% for 0, which is wrong.
Add an explicit check: buffer '0' applies 100%, all other single
digits apply n * 10, and multi-digit buffers apply the literal value.
2026-07-17 14:41:36 -04:00
sadkodev 9d88c4f045
fix(keyboard): apply opacity immediately on each keypress
Replace the 400ms apply-timeout with immediate application on every
digit press. A separate 800ms reset timer clears the buffer between
sequences so digits typed in quick succession still compose (28→28%,
00→0%, 100→100%) but single digits no longer have a perceptible delay.
2026-07-17 14:26:45 -04: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 bec41bd0d4
Merge branch 'open-pencil:master' into master 2026-07-17 14:08:31 -04:00