@univerjs-pro/ink-ui
@univerjs-pro/ink-ui provides ink toolbar and UI state integration for Univer.
Package Overview
| Package | UMD global | CSS | Locales | Facade entry |
|---|---|---|---|---|
@univerjs-pro/ink-ui |
UniverProInkUi |
Yes | Yes | No |
Capabilities
- Registers ink UI state services for active sessions, selected tool, stroke style, and host interaction state.
- Provides outside interaction handling so ink sessions can commit or cancel consistently when focus changes.
- Mounts the ink floating toolbar into the Univer UI content layer.
- Works with host adapters from
@univerjs-pro/inkso board and other hosts can provide concrete insertion behavior. - Exposes localized UI text for ink controls.
Installation
pnpm add @univerjs-pro/ink-ui
# or
npm install @univerjs-pro/ink-ui
Keep all @univerjs/* and @univerjs-pro/* packages on the same version.
Usage
import '@univerjs-pro/ink-ui/lib/index.css';
import EnUS from '@univerjs-pro/ink-ui/locale/en-US';
import { UniverInkPlugin } from '@univerjs-pro/ink';
import { UniverInkUIPlugin } from '@univerjs-pro/ink-ui';
univer.registerPlugin(UniverInkPlugin);
univer.registerPlugin(UniverInkUIPlugin);
// Merge EnUS into your Univer locale map when this package contributes UI text.
Integration Notes
Register @univerjs-pro/ink before this package. A host package must provide an ink adapter for concrete drawing behavior; for board scenarios this is wired through @univerjs-pro/boards-ui.