npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@univerjs-pro/engine-shape

v0.19.0

Published

preset shape library for Univer.

Readme

@univerjs-pro/engine-shape

npm version license

Introduction

Engine Shape is the core shape definition and rendering engine for Univer. It provides 180+ preset shapes compatible with Excel/OOXML, covering basic shapes, arrows, flowcharts, callouts, connectors, and more. This package handles shape geometry computation, path rendering, fill/stroke styling, adjust points, connection sites, and connector routing.

Usage

Installation

# Using npm
npm install @univerjs-pro/engine-shape

# Using pnpm
pnpm add @univerjs-pro/engine-shape

Features

Preset Shapes

The library provides 180+ preset shape types organized into the following categories:

| Category | Examples | |---|---| | Basic Shapes | Rectangle, RoundRectangle, Ellipse, Diamond, Triangle, Hexagon, Octagon, Star, etc. | | Arrows | RightArrow, LeftArrow, UpArrow, BentArrow, CurvedArrow, StripedRightArrow, Chevron, etc. | | Flowcharts | Process, Decision, InputOutput, Document, Terminator, Preparation, ManualInput, etc. | | Callouts | WedgeRectCallout, WedgeEllipseCallout, CloudCallout, BorderCallout, AccentCallout, etc. | | Stars & Ribbons | Star4–Star32, Ribbon, EllipseRibbon, VerticalScroll, HorizontalScroll, Wave, etc. | | Math | MathPlus, MathMinus, MathMultiply, MathDivide, MathEqual, MathNotEqual | | Connectors | StraightConnector, BentConnector (2–5), CurvedConnector (2–5), Line | | Action Buttons | Home, Help, Information, Return, BackPrevious, ForwardNext, etc. | | Others | Cube, Can, Heart, Sun, Moon, SmileyFace, Cloud, Funnel, Gear, etc. |

Fill & Stroke

All shapes support three fill modes:

  • No fill — transparent background.
  • Solid fill — a single solid color.
  • Gradient fill — linear or radial gradients.

Stroke styling is fully configurable, including color, width, dash patterns (solid, dash, dot, etc.), and line join/cap styles.

Text in Shapes

Most shapes support inline text editing via double-click. Rich text formatting is supported within shape text, including font size, color, bold, italic, and alignment.

Adjust Points

Adjust points provide parameterized editing of shape geometry. Each shape may have zero or more adjust points, which fall into the following types:

  • XY adjust points — control position offsets along the X/Y axes.
  • Angle adjust points — control angular parameters.
  • Radius adjust points — control radial dimensions.

Adjust points can be manipulated through the UI (drag handles) or programmatically via API. For example, the SmileyFace shape has an adjust point that controls the mouth curvature — dragging it can turn a smile into a frown.

Connection Sites

Connection sites are predefined anchor points on a shape's boundary, used for snapping connectors. When a connector is attached to a connection site, moving the shape automatically updates the connector's path.

Connectors

Three connector line types are supported:

  • Straight — a direct line between two points.
  • Bent (elbow) — an orthogonal polyline with right-angle bends.
  • Curved — a smooth Bezier curve.

All connectors feature:

  • Auto-routing — automatically computes the optimal path around obstacles, similar to Excel.
  • Shape binding — attach connector endpoints to connection sites on shapes; moving the shape updates the connector path automatically. Dragging the connector itself detaches it from the bound shape.
  • Arrow heads — configurable start and end arrow styles.
  • Dash styles — solid, dashed, dotted, and other dash patterns.
  • Adjust points — fine-tune the connector path by dragging intermediate control points.