File parser: - .fig files are ZIP archives with Kiwi-encoded canvas data - Detects canvas blob by name (canvas.fig) or largest binary entry - Decodes Kiwi Message → NodeChange[] → SceneGraph Node conversion: - Maps Figma types to OpenPencil types (COMPONENT → FRAME, etc.) - Extracts position from transform matrix (m02, m12) - Extracts rotation from transform matrix (atan2) - Converts fillPaints/strokePaints to Fill[]/Stroke[] - Converts effects (shadows, blurs) - Handles independent corner radii - Preserves text properties (font, size, alignment, spacing) - Builds parent-child tree from parentIndex GUIDs - Sorts children by parentIndex.position Browser compatibility: - fzstd for Zstd decompression (replaces Bun.zstd*) - fflate for ZIP extraction - Cmd+O opens file dialog for .fig files - UndoManager.clear() for resetting on file open
41 lines
1 KiB
JSON
41 lines
1 KiB
JSON
{
|
|
"name": "open-pencil-app",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"tauri": "tauri",
|
|
"lint": "oxlint -c oxlint.json src/",
|
|
"format": "oxfmt --write src/",
|
|
"typecheck": "tsgo --noEmit",
|
|
"check": "bun run lint && bun run typecheck"
|
|
},
|
|
"dependencies": {
|
|
"@tauri-apps/api": "^2",
|
|
"@tauri-apps/plugin-opener": "^2",
|
|
"@vueuse/core": "^14.2.1",
|
|
"canvaskit-wasm": "^0.40.0",
|
|
"fflate": "^0.8.2",
|
|
"fzstd": "^0.1.1",
|
|
"kiwi-schema": "^0.5.0",
|
|
"reka-ui": "^2.8.2",
|
|
"vue": "^3.5.29",
|
|
"yoga-layout": "^3.2.1"
|
|
},
|
|
"devDependencies": {
|
|
"@tauri-apps/cli": "^2",
|
|
"@typescript/native-preview": "^7.0.0-dev.20260227.1",
|
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
"oxfmt": "^0.35.0",
|
|
"oxlint": "^1.50.0",
|
|
"typescript": "~5.8.3",
|
|
"vite": "^7.0.4"
|
|
},
|
|
"patchedDependencies": {
|
|
"kiwi-schema@0.5.0": "patches/kiwi-schema@0.5.0.patch"
|
|
}
|
|
}
|