Repository navigation
add the openvector-wasm npm package - #56
Conversation
|
No actionable comments were generated in the recent review. Adds AGPL-3.0-only npm package
WalkthroughThis change adds the Sequence Diagram(s)sequenceDiagram
participant BrowserWorker
participant createTracer
participant convert_image
participant EmscriptenFilesystem
BrowserWorker->>createTracer: initialize the tracer
BrowserWorker->>createTracer: call convert with image bytes and options
createTracer->>EmscriptenFilesystem: write input and options.json
createTracer->>convert_image: run conversion
convert_image->>EmscriptenFilesystem: read input and options.json
convert_image->>EmscriptenFilesystem: write output.svg or error.txt
createTracer->>EmscriptenFilesystem: read output.svg or error.txt
createTracer-->>BrowserWorker: return SVG or throw an error
Merge Risk:
|
Script Console can load libraries from a module worker, but the OpenVector npm package is native and Penpot doesn't provide cross-origin isolation.
this adds
openvector-wasmas a separate AGPLv3 package. it takes PNG, JPEG, BMP, GIF, or TIFF bytes and returns an SVG, with the CLI's SVG layout and thin stroke options. the tarball includes the source and build instructions. a caller can cancel by terminating the worker.Refs #55
Proof Chromium produced the same SVG bytes as OpenVector 0.1.8 for all five formats and the custom layout case in a module worker with
crossOriginIsolated === false. the source archive rebuilt offline.Reviewed with sol-loop: 2 rounds with GPT-6.2 Sol on medium. Sol verdict: approved.
Implemented and tested with Codex (GPT-6.2 Sol) on behalf of Microck.