Skip to content

About

No description, website, or topics provided.

Resources

Stars

19 stars

Watchers

2 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Snap Shapes

Snap Shapes is a Supernote plugin that turns rough lasso-selected ink into clean geometry. It is designed for fast notebook use, conservative no-match behavior on non-shapes, and local write-back that avoids full-page flashing in ordinary cases.

Example

Rough hand-drawn circle and rectangle before snapping Snapped clean circle and rectangle after running Snap Shapes

Left: rough input. Right: snapped result.

Supported Shapes

  • line
  • circle
  • ellipse
  • triangle
  • rectangle
  • square
  • pentagon
  • hexagon
  • heptagon
  • octagon

Current Behavior

  • Works on lasso selections in NOTE and DOC
  • Can snap multiple independent shapes inside one lasso
  • Prefers local lasso replacement over full-page rewrite
  • Ignores many text-like and scribbly selections instead of forcing a snap
  • Regularizes near-horizontal and near-vertical geometry

Download

The latest compiled Supernote plugin package is tracked in the repo:

Current packaged version:

  • versionName: 0.1.0
  • versionCode: 7
  • SHA-256: 9ef4a13763179e43e22bcccbba19497fcb64182a0bb96fc9eb1dd085d4234967

Repo Layout

Key implementation files:

Build

From the repo root:

npm install
npm run typecheck
npx jest __tests__/shapeMatching.test.ts __tests__/shapeSnap.test.ts --runInBand --watchman=false
bash ./buildPlugin.sh

The packaged plugin is written to:

build/outputs/supernote_shape_snap.snplg

Install on Supernote

  1. Copy dist/supernote_shape_snap.snplg to MyStyle/
  2. On device, open Settings -> Apps -> Plugins -> Add Plugin
  3. Install the package

Release Notes

  • The current packaged release is 0.1.0, built against sn-plugin-lib 0.1.65.
  • The package passes the 19 automated shape-matching and write-path regression tests. Physical-device validation on current firmware is still recommended.
  • When testing a fix on-device, always ship a higher versionCode than the currently installed package. Otherwise the device may keep the older broken install and make a working revert look broken.

Notes

  • The displayed plugin name is Snap Shapes
  • The internal plugin key remains supernote_shape_snap for compatibility
  • The package filename remains supernote_shape_snap.snplg

About

No description, website, or topics provided.

Resources

Stars

19 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages