@univerjs-pro/ink
@univerjs-pro/ink provides shared ink model, geometry, shape payload, and host adapter support for Univer.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
|---|---|---|---|---|
@univerjs-pro/ink |
UniverProInk |
No | No | No |
Capabilities
- Registers
StartInkOperationand the ink host adapter service. - Provides brush and pen model types for sampled paths, anchor points, handles, styles, and bounds.
- Builds SVG paths and custom shape payloads for ink content that needs to be stored or rendered by a host package.
- Provides pen editing helpers for inserting, deleting, moving, converting, and hit-testing anchors and handles.
- Keeps ink host integration reusable so board UI and future host packages can share the same ink core.
Installation
pnpm add @univerjs-pro/ink
# or
npm install @univerjs-pro/ink
Keep all @univerjs/* and @univerjs-pro/* packages on the same version.
Usage
import { UniverInkPlugin } from '@univerjs-pro/ink';
univer.registerPlugin(UniverInkPlugin);
Integration Notes
This package provides the model and command layer. Register @univerjs-pro/ink-ui for toolbar state, floating UI, outside interaction handling, and host-driven user interactions.