refactor: rename RenderCanvas to RenderRoot
Initial plan
refactor: rename RenderCanvas to RenderRoot
Rename the RenderCanvas class to RenderRoot throughout the codebase:
- Rename render-canvas.ts to render-root.ts
- Rename render-canvas.spec.ts to render-root.spec.ts
- Rename render-canvas.stories.tsx to render-root.stories.tsx
- Update all imports, exports, type references, and comments
Co-authored-by: zhanghaocong 180445+zhanghaocong@users.noreply.github.com
- refactor: add deprecated RenderCanvas alias for backward compatibility
Instead of removing RenderCanvas entirely, keep it as a @deprecated alias for RenderRoot so existing consumers can migrate gradually.
Co-authored-by: zhanghaocong 180445+zhanghaocong@users.noreply.github.com
- chore: enforce pnpm-only usage, add yarn.lock to .gitignore
Co-authored-by: zhanghaocong 180445+zhanghaocong@users.noreply.github.com
- revert: remove pnpm-only enforcement preinstall script
Co-authored-by: zhanghaocong 180445+zhanghaocong@users.noreply.github.com
Co-authored-by: copilot-swe-agent[bot] 198982749+Copilot@users.noreply.github.com Co-authored-by: zhanghaocong 180445+zhanghaocong@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Canvas UI is a general UI renderer runs on HTML Canvas. https://alibaba.github.io/canvas-ui/
It provides a series of React components, allowing developers to quickly build Canvas-based applications using their existing knowledge.
It also features a DOM-like scene tree, enabling developers to manipulate elements drawn in Canvas just like they would manipulate DOM elements.
Demo
https://stackblitz.com/github/alibaba/canvas-ui/tree/main/examples/kanban
Features
Manipulate elements in Canvas just like DOM elements
Seamlessly integrating with React applications
Flex layout
Animation based on motion
Basic text typography capabilities: automatic word wrapping, alignment, text overflow
CSS styles through the style attribute
Interaction events: PointerEvents and WheelEvent
Convenient layering capabilities
Fully written in TypeScript with complete type definitions
Rendering in WebWorker (WIP)
Project Structure
packages/core The core of the renderer, providing capabilities such as createElement, events, rendering pipeline, etc.
packages/react Canvas UI’s official React binding, providing components like
<View />,<Text />, etc.packages/examples Component development and testing environment based on Storybook
tools/ scripts
Development