npm.io
1.0.0-insiders.20260707-70502d7 • Published 2 weeks ago

@univerjs-pro/ink

Licence
Version
1.0.0-insiders.20260707-70502d7
Deps
3
Size
137 kB
Vulns
0
Weekly
0
Stars
13.9K

@univerjs-pro/ink

npm version downloads

@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 StartInkOperation and 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.

Resources

Keywords