Files
john-okeefe bd79aae3d5 chore: vendor ML/CV libraries for panel detection
Add machine learning and computer vision libraries to vendor/ directory
to support panel detection feature. Following foliate-js's existing pattern
of vendoring large dependencies (similar to pdf.js at 13MB).

Vendored libraries (~12.5MB):
- vendor/tfjs/tf.min.js (1.5MB): TensorFlow.js UMD build
  * Downloaded from unpkg.com during build via custom Rollup plugin
  * Required runtime for COCO-SSD model

- vendor/opencv/opencv.js (~11MB): OpenCV.js UMD build
  * Copied from @techstark/opencv-js npm package
  * Provides edge detection and image processing
  * Requires 'unsafe-eval' CSP directive due to eval() usage

- vendor/coco-ssd/coco-ssd.min.js (~9KB): COCO-SSD model
  * Copied from @tensorflow-models/coco-ssd npm package
  * Pre-trained object detection for irregular panel layouts

Total vendor size: ~25MB (was 13MB, added 12.5MB)

These UMD/global builds ensure browser compatibility without requiring
ES module imports, which would cause bare specifier errors in browsers.
All libraries are loaded dynamically via script injection when panel
detection is first used, minimizing initial load time.
2026-04-13 19:14:51 -04:00
..
2024-09-28 17:41:38 +08:00
2024-09-28 17:41:38 +08:00
2026-03-05 15:52:38 +08:00
2026-03-05 15:52:38 +08:00
2026-03-05 15:52:38 +08:00
2026-03-05 15:52:38 +08:00