feat(qr-scanner): Add camera state management to CapacitorQRScanner

- Add camera state tracking and listener management
- Implement addCameraStateListener and removeCameraStateListener methods
- Add state transitions during scanning operations
- Improve error handling with state updates
- Add proper type imports for CameraState and CameraStateListener

This change ensures CapacitorQRScanner fully implements the QRScannerService
interface and provides proper camera state feedback to consumers. Camera state
is now tracked through the entire lifecycle of scanning operations, with
appropriate state transitions for initialization, active scanning, errors,
and cleanup.
This commit is contained in:
Matthew Raymer
2025-05-28 08:37:02 +00:00
parent 7ff9ef04ae
commit 7dbfc4eaa2
5 changed files with 39 additions and 9 deletions

View File

@@ -1,4 +1,3 @@
// Remove inline declarations since they are now in src/types/absurd-sql.d.ts
import initSqlJs from "@jlongster/sql.js";
import { SQLiteFS } from "absurd-sql";
import IndexedDBBackend from "absurd-sql/dist/indexeddb-backend";