From f4b45d4f13aaf4ecb91dca3f0cc853c3fcd8cf3b Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Mon, 2 Mar 2026 15:31:25 +0300 Subject: [PATCH] Replace "fig-kiwi" format name with "Kiwi binary" in docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fig-kiwi is the magic header string in .fig files, not a format name. The format is Kiwi binary — used for both .fig files and clipboard. --- .../2026-02-28-document-project-history/proposal.md | 2 +- .../specs/figma-clipboard/spec.md | 8 ++++---- .../specs/fig-import/spec.md | 2 +- .../specs/kiwi-codec/spec.md | 2 +- openspec/specs/fig-import/spec.md | 2 +- openspec/specs/figma-clipboard/spec.md | 10 +++++----- openspec/specs/kiwi-codec/spec.md | 2 +- packages/core/src/kiwi/schema.ts | 2 +- packages/docs/development/openspec.md | 2 +- packages/docs/development/roadmap.md | 2 +- packages/docs/guide/architecture.md | 2 +- packages/docs/guide/comparison.md | 2 +- packages/docs/guide/figma-comparison.md | 6 +++--- packages/docs/reference/file-format.md | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/openspec/changes/archive/2026-02-28-document-project-history/proposal.md b/openspec/changes/archive/2026-02-28-document-project-history/proposal.md index ac9ba88a9..d99260ed0 100644 --- a/openspec/changes/archive/2026-02-28-document-project-history/proposal.md +++ b/openspec/changes/archive/2026-02-28-document-project-history/proposal.md @@ -22,7 +22,7 @@ Additionally, we need to assess the current state of documentation tooling — s - `text-editing`: Inline text editing with CanvasKit Paragraph API, textarea overlay, font loading (Inter default + Local Font Access API for system fonts), font weight, auto-width text boxes - `pen-tool`: Pen tool with vector network model, bezier curves, open/closed paths, vectorNetworkBlob binary encode/decode - `auto-layout`: Yoga WASM integration, horizontal/vertical/wrap, gap, padding, justify, align, child sizing, Shift+A toggle, drag reordering with insertion indicator, wrap selected nodes in auto-layout -- `figma-clipboard`: Bidirectional Figma clipboard — paste from Figma (fig-kiwi binary decode), copy for Figma (fig-kiwi binary encode), cut/copy between OpenPencil instances +- `figma-clipboard`: Bidirectional Figma clipboard — paste from Figma (Kiwi binary decode), copy for Figma (Kiwi binary encode), cut/copy between OpenPencil instances - `fig-import`: .fig file import via Kiwi codec — header parsing, Zstd decompression, schema decode, NodeChange[] extraction, scene graph population - `kiwi-codec`: Vendored kiwi-schema, Kiwi binary codec for Figma's 194-definition schema, ESM/CLI patching for sparse field IDs - `editor-ui`: Vue 3 + Reka UI panels — toolbar (bottom), layers panel (tree with expand/collapse, drag reorder, visibility toggle), properties panel (appearance, fill, stroke, typography, layout, position sections), color picker (HSV, hex, opacity, alpha) diff --git a/openspec/changes/archive/2026-02-28-document-project-history/specs/figma-clipboard/spec.md b/openspec/changes/archive/2026-02-28-document-project-history/specs/figma-clipboard/spec.md index 92e6f2326..28735d7ae 100644 --- a/openspec/changes/archive/2026-02-28-document-project-history/specs/figma-clipboard/spec.md +++ b/openspec/changes/archive/2026-02-28-document-project-history/specs/figma-clipboard/spec.md @@ -1,25 +1,25 @@ ## ADDED Requirements ### Requirement: Paste from Figma -The editor SHALL accept paste events containing fig-kiwi binary data from Figma's clipboard. Pasted nodes SHALL be decoded and added to the scene graph. +The editor SHALL accept paste events containing Kiwi binary data from Figma's clipboard. Pasted nodes SHALL be decoded and added to the scene graph. #### Scenario: Paste Figma nodes - **WHEN** user copies a frame in Figma and pastes in OpenPencil - **THEN** the frame and its children appear on the canvas with preserved properties ### Requirement: Copy for Figma compatibility -The editor SHALL encode selected nodes as fig-kiwi binary on copy, allowing paste into Figma or other OpenPencil instances. +The editor SHALL encode selected nodes as Kiwi binary on copy, allowing paste into Figma or other OpenPencil instances. #### Scenario: Copy to Figma - **WHEN** user copies a rectangle in OpenPencil and pastes in Figma - **THEN** the rectangle appears in Figma with preserved fill, stroke, and dimensions ### Requirement: Native copy/paste events -Clipboard operations SHALL use native copy/paste browser events (not async Clipboard API) and build the fig-kiwi binary synchronously in the event handler. +Clipboard operations SHALL use native copy/paste browser events (not async Clipboard API) and build the Kiwi binary synchronously in the event handler. #### Scenario: Synchronous clipboard encoding - **WHEN** user presses ⌘C with a node selected -- **THEN** the fig-kiwi binary is built synchronously within the copy event handler +- **THEN** the Kiwi binary is built synchronously within the copy event handler ### Requirement: Cut operation Cut SHALL copy nodes to clipboard and delete them from the scene graph. diff --git a/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/fig-import/spec.md b/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/fig-import/spec.md index 562e1b09d..48300c46b 100644 --- a/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/fig-import/spec.md +++ b/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/fig-import/spec.md @@ -1,7 +1,7 @@ ## ADDED Requirements ### Requirement: .fig file export -The editor SHALL export documents as .fig files. The pipeline: scene graph → Kiwi encode NodeChange[] → compress → write ZIP with fig-kiwi header, schema, message, and thumbnail. +The editor SHALL export documents as .fig files. The pipeline: scene graph → Kiwi encode NodeChange[] → compress → write ZIP with Kiwi header, schema, message, and thumbnail. #### Scenario: Save As .fig - **WHEN** user selects File → Save As diff --git a/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/kiwi-codec/spec.md b/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/kiwi-codec/spec.md index 87016aeca..92cc3c5f4 100644 --- a/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/kiwi-codec/spec.md +++ b/openspec/changes/archive/2026-02-28-update-specs-and-docs-feb28/specs/kiwi-codec/spec.md @@ -5,7 +5,7 @@ The Kiwi codec SHALL support encoding NodeChange[] back to Kiwi binary format fo #### Scenario: Encode scene graph to Kiwi binary - **WHEN** the editor exports a document -- **THEN** all nodes are encoded as NodeChange messages using the Kiwi schema and the binary output is a valid fig-kiwi payload +- **THEN** all nodes are encoded as NodeChange messages using the Kiwi schema and the binary output is a valid Kiwi payload ### Requirement: .fig ZIP built in Rust On the desktop app, the .fig ZIP archive SHALL be assembled in Rust instead of JavaScript (fflate) for better performance and correct Zstd framing (content size in header). diff --git a/openspec/specs/fig-import/spec.md b/openspec/specs/fig-import/spec.md index 8fbfb9ab9..5deabad0b 100644 --- a/openspec/specs/fig-import/spec.md +++ b/openspec/specs/fig-import/spec.md @@ -25,7 +25,7 @@ The import pipeline SHALL resolve blob references (images, vector networks, font - **THEN** the vector paths are correctly decoded and renderable ### Requirement: .fig file export -The editor SHALL export documents as .fig files. The pipeline: scene graph → Kiwi encode NodeChange[] → compress → write ZIP with fig-kiwi header, schema, message, and thumbnail. +The editor SHALL export documents as .fig files. The pipeline: scene graph → Kiwi encode NodeChange[] → compress → write ZIP with Kiwi header, schema, message, and thumbnail. #### Scenario: Save As .fig - **WHEN** user selects File → Save As diff --git a/openspec/specs/figma-clipboard/spec.md b/openspec/specs/figma-clipboard/spec.md index cf577011d..469d088a8 100644 --- a/openspec/specs/figma-clipboard/spec.md +++ b/openspec/specs/figma-clipboard/spec.md @@ -1,28 +1,28 @@ # figma-clipboard Specification ## Purpose -Bidirectional clipboard compatibility with Figma. Decodes fig-kiwi binary on paste, encodes fig-kiwi binary on copy, supports cut, and works across OpenPencil instances. +Bidirectional clipboard compatibility with Figma. Decodes Kiwi binary on paste, encodes Kiwi binary on copy, supports cut, and works across OpenPencil instances. ## Requirements ### Requirement: Paste from Figma -The editor SHALL accept paste events containing fig-kiwi binary data from Figma's clipboard. Pasted nodes SHALL be decoded and added to the scene graph. +The editor SHALL accept paste events containing Kiwi binary data from Figma's clipboard. Pasted nodes SHALL be decoded and added to the scene graph. #### Scenario: Paste Figma nodes - **WHEN** user copies a frame in Figma and pastes in OpenPencil - **THEN** the frame and its children appear on the canvas with preserved properties ### Requirement: Copy for Figma compatibility -The editor SHALL encode selected nodes as fig-kiwi binary on copy, allowing paste into Figma or other OpenPencil instances. +The editor SHALL encode selected nodes as Kiwi binary on copy, allowing paste into Figma or other OpenPencil instances. #### Scenario: Copy to Figma - **WHEN** user copies a rectangle in OpenPencil and pastes in Figma - **THEN** the rectangle appears in Figma with preserved fill, stroke, and dimensions ### Requirement: Native copy/paste events -Clipboard operations SHALL use native copy/paste browser events (not async Clipboard API) and build the fig-kiwi binary synchronously in the event handler. +Clipboard operations SHALL use native copy/paste browser events (not async Clipboard API) and build the Kiwi binary synchronously in the event handler. #### Scenario: Synchronous clipboard encoding - **WHEN** user presses ⌘C with a node selected -- **THEN** the fig-kiwi binary is built synchronously within the copy event handler +- **THEN** the Kiwi binary is built synchronously within the copy event handler ### Requirement: Cut operation Cut SHALL copy nodes to clipboard and delete them from the scene graph. diff --git a/openspec/specs/kiwi-codec/spec.md b/openspec/specs/kiwi-codec/spec.md index 052aa70d5..bd1175eb5 100644 --- a/openspec/specs/kiwi-codec/spec.md +++ b/openspec/specs/kiwi-codec/spec.md @@ -40,7 +40,7 @@ The Kiwi codec SHALL support encoding NodeChange[] back to Kiwi binary format fo #### Scenario: Encode scene graph to Kiwi binary - **WHEN** the editor exports a document -- **THEN** all nodes are encoded as NodeChange messages using the Kiwi schema and the binary output is a valid fig-kiwi payload +- **THEN** all nodes are encoded as NodeChange messages using the Kiwi schema and the binary output is a valid Kiwi payload ### Requirement: .fig ZIP built in Rust On the desktop app, the .fig ZIP archive SHALL be assembled in Rust instead of JavaScript (fflate) for better performance and correct Zstd framing (content size in header). diff --git a/packages/core/src/kiwi/schema.ts b/packages/core/src/kiwi/schema.ts index c9d56990d..84e807347 100644 --- a/packages/core/src/kiwi/schema.ts +++ b/packages/core/src/kiwi/schema.ts @@ -833,7 +833,7 @@ message Paint { Video video = 18; uint originalImageWidth = 19; uint originalImageHeight = 20; - PaintVariableBinding variableBinding = 21; // Not in fig-kiwi. Discovered via WS sniffing 2026-01 + PaintVariableBinding variableBinding = 21; // Not in .fig files. Discovered via WS sniffing 2026-01 } message FontMetaData { diff --git a/packages/docs/development/openspec.md b/packages/docs/development/openspec.md index 47f0ee8bd..a9eb48b9f 100644 --- a/packages/docs/development/openspec.md +++ b/packages/docs/development/openspec.md @@ -31,7 +31,7 @@ openspec/ | text-editing | Text tool, Paragraph API, font loading | | pen-tool | Vector network model, bezier curves | | auto-layout | Yoga WASM flexbox, Shift+A toggle | -| figma-clipboard | Bidirectional fig-kiwi clipboard | +| figma-clipboard | Bidirectional Kiwi binary clipboard | | fig-import | .fig file import pipeline | | kiwi-codec | Kiwi binary codec, sparse field IDs | | editor-ui | Vue 3 panels, toolbar, color picker | diff --git a/packages/docs/development/roadmap.md b/packages/docs/development/roadmap.md index fb0d835f6..5c9d3753f 100644 --- a/packages/docs/development/roadmap.md +++ b/packages/docs/development/roadmap.md @@ -39,7 +39,7 @@ Properties panel, layers panel, toolbar, Yoga layout integration, text editing. - Save (⌘S) and Save As (⇧⌘S) with native OS dialogs - Zstd compression via Tauri Rust command (deflate fallback in browser) - Vendored kiwi-schema with ESM + sparse field ID patches -- Figma-compatible clipboard (bidirectional fig-kiwi binary) +- Figma-compatible clipboard (bidirectional Kiwi binary) - Pen tool with vector network model - vectorNetworkBlob binary encode/decode - Group/ungroup (⌘G/⇧⌘G) diff --git a/packages/docs/guide/architecture.md b/packages/docs/guide/architecture.md index d63458498..f17a651e1 100644 --- a/packages/docs/guide/architecture.md +++ b/packages/docs/guide/architecture.md @@ -85,4 +85,4 @@ Inverse-command pattern. Before applying any change, affected fields are snapsho ### Clipboard -Figma-compatible bidirectional clipboard. Encodes/decodes fig-kiwi binary using native browser copy/paste events (synchronous, not async Clipboard API). +Figma-compatible bidirectional clipboard. Encodes/decodes Kiwi binary (same format as .fig files) using native browser copy/paste events (synchronous, not async Clipboard API). diff --git a/packages/docs/guide/comparison.md b/packages/docs/guide/comparison.md index b6ccd9c5a..86216aef7 100644 --- a/packages/docs/guide/comparison.md +++ b/packages/docs/guide/comparison.md @@ -201,7 +201,7 @@ Open Pencil delegates to a battle-tested library (Yoga, used by React Native on - **Native Kiwi binary format** — same serialization as Figma uses internally - Direct `.fig` file import via extracted Kiwi codec (2,178 LOC schema + 551 LOC codec) -- Figma clipboard paste support (reads Figma's `fig-kiwi` binary clipboard format) +- Figma clipboard paste support (reads Figma's Kiwi binary from the clipboard) - Wire-compatible with Figma's multiplayer protocol ### Penpot diff --git a/packages/docs/guide/figma-comparison.md b/packages/docs/guide/figma-comparison.md index 0e47aaf6b..920bf6c57 100644 --- a/packages/docs/guide/figma-comparison.md +++ b/packages/docs/guide/figma-comparison.md @@ -43,7 +43,7 @@ Feature-by-feature comparison of Figma Design capabilities with Open Pencil's cu | Layer types & hierarchy | ✅ | 17 node types, flat Map + parent-child tree | | Select layers | ✅ | Click, shift-click, marquee selection | | Alignment & position | ✅ | Position, rotation, dimensions in properties panel | -| Copy & paste objects | ✅ | Standard clipboard + Figma fig-kiwi binary format | +| Copy & paste objects | ✅ | Standard clipboard + Figma Kiwi binary format | | Scale layers proportionally | 🟡 | Shift-resize constrains proportions; no dedicated Scale tool (K) | | Lock & unlock layers | ✅ | ⇧⌘L toggles lock; locked nodes can't be selected/moved from canvas | | Toggle layer visibility | ✅ | Eye icon in layers panel + ⇧⌘H keyboard shortcut | @@ -189,8 +189,8 @@ Feature-by-feature comparison of Figma Design capabilities with Open Pencil's cu | .fig file import | ✅ | Full Kiwi codec: 194 definitions, ~390 fields per NodeChange | | .fig file export | ✅ | Kiwi encoding + Zstd compression + thumbnail generation | | Save / Save As | ✅ | ⌘S / ⇧⌘S with native OS dialogs (Tauri) | -| Figma clipboard (paste) | ✅ | Decode fig-kiwi binary from Figma clipboard | -| Figma clipboard (copy) | ✅ | Encode fig-kiwi binary that Figma can read | +| Figma clipboard (paste) | ✅ | Decode Kiwi binary from Figma clipboard | +| Figma clipboard (copy) | ✅ | Encode Kiwi binary that Figma can read | | Sketch file import | 🔲 | .sketch file parsing | | Image/SVG export | 🟡 | PNG/JPG/WEBP with scale selector and live preview; SVG/PDF not yet | | Version history | 🔲 | Browse and restore previous versions | diff --git a/packages/docs/reference/file-format.md b/packages/docs/reference/file-format.md index 6d1dc7710..b1d880894 100644 --- a/packages/docs/reference/file-format.md +++ b/packages/docs/reference/file-format.md @@ -62,7 +62,7 @@ See [Roadmap](/development/roadmap) for planned format support timeline. ## Clipboard Format -Copy/paste uses the same fig-kiwi binary encoding: +Copy/paste uses the same Kiwi binary encoding: 1. **Copy** — encode selected NodeChange[] to Kiwi binary, compress, write to clipboard as `application/x-figma-design` MIME type 2. **Paste** — read clipboard, decompress, decode Kiwi binary, create nodes in scene graph