mirror of
https://github.com/ZSeven-W/openpencil.git
synced 2026-06-01 03:14:29 +07:00
* feat(mcp): enhance document management and design tools - Updated `openDocument` to always re-fetch the live canvas, ensuring user edits are captured. - Introduced new tools: `get_design_prompt` for retrieving design guidelines and `batch_design` for executing multiple design operations using a DSL. - Improved `handleInsertNode` and `handleUpdateNode` to include validation for node data and return the final node state after operations. - Enhanced design prompt with detailed PenNode schema and layout rules for better AI-generated designs. - Added validation functions to ensure node data integrity during CRUD operations. - Updated `handleOpenDocument` to provide context-aware design prompts based on document content. * feat(electron): enhance build configuration and auto-update functionality - Updated `electron-builder.yml` to include artifact naming conventions for Windows and Linux builds. - Enhanced NSIS installer settings to create desktop and start menu shortcuts. - Improved path handling for GUI applications on Windows to ensure proper environment variable inheritance. - Refactored auto-update logic in `main.ts` to streamline update checks and improve error handling. - Added new IPC handlers for managing pending file paths and improved file handling during application startup. - Updated `use-electron-menu` hook to handle additional menu structures and improve document loading logic. * chore: bump version to 0.3.1 and update project description - Updated version in package.json to 0.3.1. - Enhanced project description to highlight OpenPencil as the world's first open-source AI-native vector design tool featuring concurrent Agent Teams and Design-as-Code capabilities. - Refactored auto-updater to utilize constants for GitHub repository details, improving maintainability. - Introduced a new constants file to centralize shared values for the Electron application, enhancing code clarity and reducing duplication. - Updated various components to use new constants for port file handling and window dimensions, ensuring consistency across the application. * feat(ai): clarify mobile design guidelines and mockup usage - Updated design guidelines to emphasize that "mobile" requests should generate actual mobile-sized screens (375x812) instead of desktop mockups. - Added critical notes regarding the use of phone mockups, specifying they should only be used for marketing showcases and not for functional mobile screens. - Enhanced clarity on sizing and layout rules for mobile and web designs to ensure consistent application of design principles. * fix(canvas): improve text centering, layout inference, and Pencil format rendering - Resolve fit-content parent dimensions in computeLayoutPositions instead of using 0 (which caused negative available space and broken child positioning) - Reduce text width estimation minimum from 20px to 1px to fix centering of narrow single-character text in fixed-size centered frames - Add inferLayout() to detect padding-only frames as layout containers, so padding offsets are applied to children (fixes badge text ignoring padding) - Use Fabric's fontSize * 1.13 for single-line text height in centering calculations instead of fontSize * lineHeight - Add fontWeight propagation to text width/height estimation functions - Refine defaultLineHeight() tiers for better Pencil format compatibility - Support Pencil's singular `effect` property alongside `effects` array - Handle plain color strings in fill/stroke resolution for Pencil format - Add directional stroke rendering as synthetic border rectangles - Add icon_font node type rendering via lookupIconByName - Fix z-order reconciliation to use fresh canvas object map after text recreation - Fix canvas initialization race: defer reference tracking until canvas is ready - Resolve $variable references with circular reference guards * feat(types): add icon_font node type with panel and store support - Add IconFontNode type to pen.ts for icon_font nodes storing iconFontName - Extend property panel and icon section to recognize icon_font nodes - Add icon_font type icon in layer panel - Support icon_font in document tree utilities * feat(ai): improve design generation accuracy and validation - Add pre-validation pass to fix text with explicit pixel height to fit_content - Enhance validation tree dump with textGrowth and lineHeight fields - Update orchestrator prompts with structural patterns from Pencil analysis - Simplify role-resolver defaults to match Pencil conventions - Only force textGrowth=fixed-width on text >15 chars in streaming insertion * feat(ai): optimize generation pipeline and fix streaming layout - Disable LLM validation layer (pre-validation heuristics still run) - Remove visual-ref pipeline (3 fewer LLM calls per generation) - Compress sub-agent prompt and design principles (~70% smaller) - Remove width>480 guards so mobile gets root frame height expansion - Add gap field to orchestrator rootFrame format and guidance - Default icon_font nodes to lucide family in generation heuristics * feat(ai): load full Lucide icon set and default icon_font to lucide - Load all 1,729 Lucide icons as primary set (replaces 286 hand-picked) - Keep Feather as fallback for unmatched names - Default iconFontFamily to 'lucide' during .pen file normalization * feat(codegen): add icon_font support to all 8 code generators Output Lucide icon references instead of 'Unknown node' comments. React/RN use component syntax, HTML/Vue/Svelte use data-lucide, Flutter/SwiftUI/Compose use framework-native icon APIs. * feat(panels): replace product card quick action with food app homepage * feat(electron): implement preferences management and app storage abstraction - Introduced a new preferences management system in Electron, replacing localStorage with a JSON-based preferences file. - Added IPC handlers for getting, setting, and removing preferences, ensuring data persistence across sessions. - Created an app storage utility to provide a consistent API for accessing preferences in both Electron and web environments. - Updated various components and stores to utilize the new app storage system for improved data handling and synchronization. - Enhanced the initialization process to load preferences at startup, ensuring a seamless user experience. --------- Co-authored-by: Fini <fini.yang@gmail.com>
91 lines
No EOL
4.4 KiB
JSON
91 lines
No EOL
4.4 KiB
JSON
{
|
|
"name": "openpencil",
|
|
"version": "0.3.1",
|
|
"description": "The world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.",
|
|
"author": {
|
|
"name": "ZSeven-W",
|
|
"email": "xkayshen@gmail.com"
|
|
},
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "electron-dist/main.cjs",
|
|
"bin": {
|
|
"openpencil-mcp": "dist/mcp-server.cjs"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun --bun vite dev --port 3000",
|
|
"build": "bun --bun vite build",
|
|
"preview": "bun --bun vite preview",
|
|
"test": "bun --bun vitest run --passWithNoTests",
|
|
"mcp:compile": "esbuild src/mcp/server.ts --bundle --platform=node --target=node20 --outfile=dist/mcp-server.cjs --format=cjs --sourcemap --alias:@=src",
|
|
"mcp:dev": "bun run src/mcp/server.ts",
|
|
"electron:dev": "bun run scripts/electron-dev.ts",
|
|
"electron:compile": "esbuild electron/main.ts electron/preload.ts --bundle --platform=node --target=node20 --outdir=electron-dist --external:electron --format=cjs --out-extension:.js=.cjs --sourcemap",
|
|
"electron:build": "BUILD_TARGET=electron bun --bun run build && bun run electron:compile && bun run mcp:compile && npx electron-builder --config electron-builder.yml",
|
|
"electron:build:mac-arm64": "BUILD_TARGET=electron bun --bun run build && bun run electron:compile && bun run mcp:compile && npx electron-builder --config electron-builder.yml --mac --arm64 && if [ -f dist-electron/latest-mac.yml ]; then mv dist-electron/latest-mac.yml dist-electron/latest-mac-arm64.yml; fi",
|
|
"electron:build:mac-x64": "BUILD_TARGET=electron bun --bun run build && bun run electron:compile && bun run mcp:compile && npx electron-builder --config electron-builder.yml --mac --x64",
|
|
"electron:build:mac-universal": "BUILD_TARGET=electron bun --bun run build && bun run electron:compile && bun run mcp:compile && npx electron-builder --config electron-builder.yml --mac --arm64 --x64",
|
|
"electron:build:mac-both": "bun run electron:build:mac-arm64 && bun run electron:build:mac-x64"
|
|
},
|
|
"dependencies": {
|
|
"@anthropic-ai/claude-agent-sdk": "^0.2.47",
|
|
"@anthropic-ai/sdk": "^0.77.0",
|
|
"@github/copilot-sdk": "^0.1.30",
|
|
"@iconify-json/feather": "^1.2.1",
|
|
"@iconify-json/lucide": "^1.2.93",
|
|
"@iconify-json/simple-icons": "^1.2.71",
|
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
"@opencode-ai/sdk": "1.2.6",
|
|
"@radix-ui/react-select": "^2.2.6",
|
|
"@radix-ui/react-separator": "^1.1.8",
|
|
"@radix-ui/react-slider": "^1.3.6",
|
|
"@radix-ui/react-switch": "^1.2.6",
|
|
"@radix-ui/react-toggle": "^1.1.10",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@tailwindcss/vite": "^4.1.18",
|
|
"@tanstack/react-devtools": "^0.7.0",
|
|
"@tanstack/react-router": "^1.132.0",
|
|
"@tanstack/react-router-devtools": "^1.132.0",
|
|
"@tanstack/react-router-ssr-query": "^1.131.7",
|
|
"@tanstack/react-start": "^1.132.0",
|
|
"@tanstack/router-plugin": "^1.132.0",
|
|
"class-variance-authority": "^0.7.1",
|
|
"clsx": "^2.1.1",
|
|
"electron-updater": "^6.6.2",
|
|
"fabric": "^7.1.0",
|
|
"fzstd": "^0.1.1",
|
|
"html2canvas": "^1.4.1",
|
|
"i18next": "^25.8.14",
|
|
"i18next-browser-languagedetector": "^8.2.1",
|
|
"kiwi-schema": "^0.5.0",
|
|
"lucide-react": "^0.545.0",
|
|
"nanoid": "^5.1.6",
|
|
"nitro": "npm:nitro-nightly@latest",
|
|
"paper": "^0.12.18",
|
|
"react": "^19.2.0",
|
|
"react-dom": "^19.2.0",
|
|
"react-i18next": "^16.5.4",
|
|
"tailwind-merge": "^3.4.1",
|
|
"tailwindcss": "^4.1.18",
|
|
"uzip": "^0.20201231.0",
|
|
"vite-tsconfig-paths": "^5.1.4",
|
|
"zustand": "^5.0.11"
|
|
},
|
|
"devDependencies": {
|
|
"@tanstack/devtools-vite": "^0.3.11",
|
|
"@testing-library/dom": "^10.4.0",
|
|
"@testing-library/react": "^16.2.0",
|
|
"@types/node": "^22.10.2",
|
|
"@types/react": "^19.2.0",
|
|
"@types/react-dom": "^19.2.0",
|
|
"@types/uzip": "^0.20201231.2",
|
|
"@vitejs/plugin-react": "^5.0.4",
|
|
"electron": "^35.0.0",
|
|
"electron-builder": "^26.0.0",
|
|
"esbuild": "^0.25.0",
|
|
"jsdom": "^27.0.0",
|
|
"typescript": "^5.7.2",
|
|
"vite": "^7.1.7",
|
|
"vitest": "^3.0.5"
|
|
}
|
|
} |