Skip to content

feat: upgrade supernote-typescript 0.3.0 -> 0.7.3 - #24

Open
pgebheim wants to merge 1 commit into
raaneem:mainfrom
lilco-dev:pr/parser-upgrade
Open

pgebheim wants to merge 1 commit into
raaneem:mainfrom
lilco-dev:pr/parser-upgrade

Conversation

@pgebheim

Copy link
Copy Markdown

Upgrade supernote-typescript 0.3.0 → 0.7.3

Bumps the .note parsing library and adapts the rasterizer to 0.7.3's swapped
grayscale pen palette (darkGray = 128, gray = 169; they were reversed in
0.3.0). Both test fixtures are updated to the corrected RGBA values.

This is a standalone maintenance upgrade, and it's the foundation for a
follow-up PR that renders pages with crisp canvas vector strokes (which needs
0.7.3's vector-ink API).

Test plan: pnpm test — rasterizer tests updated for the new palette and
pass; full suite green (460 passed, 8 pre-existing private-fixture skips).


Extracted from the
Supernote Sync & Transcribe
fork, where it's been in use.

The parser is two major lines newer (0.3.0 -> 0.7.3), bringing the
stroke-decoding improvements the newer renderer is known for (eraser
gestures no longer drawn, recognition/textbox improvements, and the
deliberate gray-level swap so darkGray < gray in lightness, matching the
device). The plugin's parser surface is just two files, and the vendored
Ratta RLE compositor in notebook-rasterizer.ts is byte-compatible with
0.7.3's _walkRuns — the only sync needed was the palette swap.

- package.json + lockfile: 0.7.3; the image-js exclusion override is
  re-pinned to supernote-typescript@0.7.3 (the parser itself stays
  image-js-free, verified — the worker-ownership lockfile test passes).
- notebook-rasterizer: vendored palette updated to 0.7.3's gray levels
  with a comment pointing at the upstream change.
- tests: two synthetic fixtures updated to the new gray values.

NOTE: real-note rendering changes intentionally (grays shift to the
0.7.x levels). The skipped real-note RGBA-hash test (private fixture)
will need its recorded hash regenerated by someone with the fixture.

pnpm format/lint/typecheck/460 tests/build green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant