@copio/sdk 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/THIRD_PARTY_NOTICES.md +34 -0
  2. package/dist/adapters/edge/index.js +2 -0
  3. package/dist/adapters/edge/index.js.map +7 -0
  4. package/dist/adapters/edge/null-edge-detector-adapter.js +2 -0
  5. package/dist/adapters/edge/null-edge-detector-adapter.js.map +7 -0
  6. package/dist/adapters/edge/scanic-wasm-adapter.js +2 -0
  7. package/dist/adapters/edge/scanic-wasm-adapter.js.map +7 -0
  8. package/dist/adapters/image/canvas2d-adapter.js +1 -1
  9. package/dist/adapters/image/index.js +1 -1
  10. package/dist/adapters/image/null-image-processor-adapter.js +1 -1
  11. package/dist/adapters/index.js +1 -1
  12. package/dist/adapters/indexeddb-adapter.js +1 -1
  13. package/dist/adapters/memory-adapter.js +1 -1
  14. package/dist/adapters/ocr/index.js +1 -1
  15. package/dist/adapters/ocr/null-ocr-adapter.js +1 -1
  16. package/dist/adapters/ocr/tesseract-wasm-adapter.js +1 -1
  17. package/dist/adapters/pdf/index.js +1 -1
  18. package/dist/adapters/pdf/null-pdf-adapter.js +1 -1
  19. package/dist/adapters/pdf/pdfkit-adapter.js +1 -1
  20. package/dist/adapters/storage/index.js +1 -1
  21. package/dist/adapters/storage/indexeddb-adapter.js +1 -1
  22. package/dist/adapters/storage/memory-adapter.js +1 -1
  23. package/dist/adapters/sync/index.js +1 -1
  24. package/dist/adapters/sync/null-sync-adapter.js +1 -1
  25. package/dist/adapters/sync/peerjs-adapter.js +1 -1
  26. package/dist/canvas-GKLGWNAJ.js +2 -0
  27. package/dist/cdn.js +189 -1409
  28. package/dist/chunk-25WAHT3G.js +2 -0
  29. package/dist/chunk-2VH2NPXW.js +175 -0
  30. package/dist/{chunk-DIU5BGU5.js → chunk-4D6GC55I.js} +2 -2
  31. package/dist/chunk-6QK7337A.js +2 -0
  32. package/dist/chunk-GLY5CGCY.js +2 -0
  33. package/dist/chunk-GU6OQMYK.js +4 -0
  34. package/dist/chunk-HCCNUPKB.js +2 -0
  35. package/dist/chunk-JIPKWRBK.js +2 -0
  36. package/dist/{chunk-GGERQ3CJ.js → chunk-NM4YYZYB.js} +3 -3
  37. package/dist/chunk-NNSM2I5L.js +2 -0
  38. package/dist/chunk-PBF7V4Z6.js +2 -0
  39. package/dist/chunk-PSGIWIRH.js +2 -0
  40. package/dist/chunk-Q3AWHANC.js +2 -0
  41. package/dist/chunk-R6Q4OXDG.js +2 -0
  42. package/dist/chunk-SZHKZARU.js +2 -0
  43. package/dist/{chunk-J7HWZNIP.js → chunk-T5CPA7B2.js} +2 -2
  44. package/dist/chunk-TK5N67RB.js +2 -0
  45. package/dist/chunk-V2D55DVU.js +1 -0
  46. package/dist/chunk-VPSUKD6F.js +2 -0
  47. package/dist/chunk-ZILTJGT2.js +2 -0
  48. package/dist/core.js +1 -1
  49. package/dist/custom-elements.json +2316 -135
  50. package/dist/export.js +1 -1
  51. package/dist/fs-Y7NMZRBK.js +2 -0
  52. package/dist/handoff-transport-7YFK4RYL.js +2 -0
  53. package/dist/handoff.js +2 -0
  54. package/dist/http-CYZIMVXQ.js +2 -0
  55. package/dist/https-OLG7KUSR.js +2 -0
  56. package/dist/index.js +11 -11
  57. package/dist/ocr.js +1 -1
  58. package/dist/path2d-HD3LU76S.js +2 -0
  59. package/dist/scanic-mlDetector-BCSVQYFV.js +2 -0
  60. package/dist/scanic-ort.wasm.min-MU4NYSP2.js +2 -0
  61. package/dist/scanner.js +3 -1396
  62. package/dist/sync.js +1 -1
  63. package/dist/types/js/adapters/edge/edge-detector-port.d.ts +183 -0
  64. package/dist/types/js/adapters/edge/index.d.ts +3 -0
  65. package/dist/types/js/adapters/edge/null-edge-detector-adapter.d.ts +35 -0
  66. package/dist/types/js/adapters/edge/scanic-wasm-adapter.d.ts +54 -0
  67. package/dist/types/js/adapters/storage/indexeddb-adapter.d.ts +11 -0
  68. package/dist/types/js/adapters/storage/memory-adapter.d.ts +11 -0
  69. package/dist/types/js/adapters/storage/opfs-adapter.d.ts +11 -0
  70. package/dist/types/js/adapters/storage/storage-port.d.ts +27 -0
  71. package/dist/types/js/services/doc-repository.d.ts +6 -1
  72. package/dist/types/js/services/handoff-crypto.d.ts +84 -0
  73. package/dist/types/js/services/handoff-session.d.ts +257 -0
  74. package/dist/types/js/services/handoff-transport.d.ts +51 -0
  75. package/dist/types/js/services/ice-servers.d.ts +33 -1
  76. package/dist/types/js/services/migration-runner.d.ts +100 -0
  77. package/dist/types/js/utils/perspective.d.ts +70 -0
  78. package/dist/types/js/utils/utils.d.ts +19 -1
  79. package/dist/types/sdk/core.d.ts +52 -6
  80. package/dist/types/sdk/elements.d.ts +2 -0
  81. package/dist/types/sdk/events.d.ts +42 -0
  82. package/dist/types/sdk/handoff-session.d.ts +4 -0
  83. package/dist/types/sdk/handoff-styles.d.ts +9 -0
  84. package/dist/types/sdk/handoff.d.ts +108 -0
  85. package/dist/types/sdk/index.d.ts +5 -1
  86. package/dist/types/sdk/models.d.ts +248 -1
  87. package/dist/types/sdk/scanner.d.ts +94 -1
  88. package/dist/types/sdk/styles.d.ts +1 -1
  89. package/dist/types/sdk/version.d.ts +1 -1
  90. package/dist/url-NYR4TEJV.js +2 -0
  91. package/package.json +9 -2
  92. package/sdk/core.js +219 -12
  93. package/sdk/events.js +14 -0
  94. package/sdk/handoff-session.js +26 -0
  95. package/sdk/handoff-styles.js +531 -0
  96. package/sdk/handoff.js +1079 -0
  97. package/sdk/index.js +38 -1
  98. package/sdk/models.js +116 -4
  99. package/sdk/scanner.js +1517 -151
  100. package/sdk/styles.js +297 -17
  101. package/sdk/version.js +1 -1
  102. package/dist/canvas-FAXPLPXN.js +0 -2
  103. package/dist/chunk-4C666HHU.js +0 -2
  104. package/dist/chunk-FFRDPFTS.js +0 -1395
  105. package/dist/chunk-FQRADJY6.js +0 -2
  106. package/dist/chunk-G5EUMLYT.js +0 -4
  107. package/dist/chunk-IBF5HCYT.js +0 -2
  108. package/dist/chunk-K4NR6OAC.js +0 -2
  109. package/dist/chunk-L4OVZN23.js +0 -2
  110. package/dist/chunk-MEE2NNYB.js +0 -2
  111. package/dist/chunk-WETG2JD7.js +0 -2
  112. package/dist/fs-HJ6WWW73.js +0 -2
  113. package/dist/http-FKJJMT2N.js +0 -2
  114. package/dist/https-MUBFLDZM.js +0 -2
  115. package/dist/path2d-QWN6DFCC.js +0 -2
  116. package/dist/url-ABJ6S2Y6.js +0 -2
@@ -203,13 +203,93 @@
203
203
  "privacy": "private",
204
204
  "default": "new Map()"
205
205
  },
206
+ {
207
+ "kind": "field",
208
+ "name": "#migrations",
209
+ "privacy": "private",
210
+ "type": {
211
+ "text": "array"
212
+ },
213
+ "default": "[...DEFAULT_MIGRATIONS]"
214
+ },
215
+ {
216
+ "kind": "field",
217
+ "name": "#targetSchemaVersion",
218
+ "privacy": "private",
219
+ "default": "CURRENT_SCHEMA_VERSION"
220
+ },
221
+ {
222
+ "kind": "field",
223
+ "name": "#relayUrl",
224
+ "privacy": "private",
225
+ "type": {
226
+ "text": "string"
227
+ },
228
+ "default": "''"
229
+ },
230
+ {
231
+ "kind": "field",
232
+ "name": "#signalingUrl",
233
+ "privacy": "private",
234
+ "type": {
235
+ "text": "string"
236
+ },
237
+ "default": "''"
238
+ },
239
+ {
240
+ "kind": "field",
241
+ "name": "#iceServers",
242
+ "privacy": "private",
243
+ "type": {
244
+ "text": "null"
245
+ },
246
+ "default": "null"
247
+ },
248
+ {
249
+ "kind": "field",
250
+ "name": "#iceTransportPolicy",
251
+ "privacy": "private",
252
+ "type": {
253
+ "text": "string"
254
+ },
255
+ "default": "'all'"
256
+ },
257
+ {
258
+ "kind": "field",
259
+ "name": "#initPromise",
260
+ "privacy": "private",
261
+ "type": {
262
+ "text": "null"
263
+ },
264
+ "default": "null"
265
+ },
206
266
  {
207
267
  "kind": "method",
208
268
  "name": "init",
209
- "description": "Initializes the underlying storage adapter.",
269
+ "description": "Initializes the underlying storage adapter and executes any pending schema migrations (CPO-013).",
270
+ "return": {
271
+ "type": {
272
+ "text": "Promise<{ kind: string, persistent: boolean, migration: any }>"
273
+ }
274
+ }
275
+ },
276
+ {
277
+ "kind": "method",
278
+ "name": "#runMigrations",
279
+ "privacy": "private"
280
+ },
281
+ {
282
+ "kind": "method",
283
+ "name": "#ensureReady",
284
+ "privacy": "private"
285
+ },
286
+ {
287
+ "kind": "method",
288
+ "name": "getSchemaVersion",
289
+ "description": "Retrieves the current schema version from storage (CPO-013).",
210
290
  "return": {
211
291
  "type": {
212
- "text": "Promise<{ kind: string, persistent: boolean }>"
292
+ "text": "Promise<number|null>"
213
293
  }
214
294
  }
215
295
  },
@@ -424,6 +504,59 @@
424
504
  }
425
505
  ]
426
506
  },
507
+ {
508
+ "kind": "field",
509
+ "name": "relayUrl"
510
+ },
511
+ {
512
+ "kind": "field",
513
+ "name": "signalingUrl"
514
+ },
515
+ {
516
+ "kind": "field",
517
+ "name": "iceServers"
518
+ },
519
+ {
520
+ "kind": "field",
521
+ "name": "iceTransportPolicy"
522
+ },
523
+ {
524
+ "kind": "field",
525
+ "name": "edgeDetector",
526
+ "description": "Configured EdgeDetectorPort instance.",
527
+ "return": {
528
+ "type": {
529
+ "text": "EdgeDetectorPort"
530
+ }
531
+ },
532
+ "readonly": true
533
+ },
534
+ {
535
+ "kind": "method",
536
+ "name": "detectEdges",
537
+ "parameters": [
538
+ {
539
+ "name": "image",
540
+ "type": {
541
+ "text": "any"
542
+ }
543
+ },
544
+ {
545
+ "name": "options",
546
+ "default": "{}",
547
+ "optional": true,
548
+ "type": {
549
+ "text": "EdgeDetectOptions"
550
+ }
551
+ }
552
+ ],
553
+ "description": "Detect document boundaries in an image or video frame.",
554
+ "return": {
555
+ "type": {
556
+ "text": "Promise<EdgeDetectionResult|null>"
557
+ }
558
+ }
559
+ },
427
560
  {
428
561
  "kind": "field",
429
562
  "name": "storage",
@@ -743,6 +876,15 @@
743
876
  "type": {
744
877
  "text": "string"
745
878
  }
879
+ },
880
+ {
881
+ "name": "options",
882
+ "default": "{}",
883
+ "description": "Ingest options (e.g. prefilledQuad, autoCrop)",
884
+ "optional": true,
885
+ "type": {
886
+ "text": "Object"
887
+ }
746
888
  }
747
889
  ],
748
890
  "description": "Ingest and process an array of File or Blob objects, converting them to document pages.\nHandles images (with EXIF extraction) and PDF files (rendering pages to data URLs).",
@@ -913,7 +1055,22 @@
913
1055
  }
914
1056
  }
915
1057
  }
916
- ]
1058
+ ],
1059
+ "events": [
1060
+ {
1061
+ "type": {
1062
+ "text": "CustomEvent"
1063
+ }
1064
+ }
1065
+ ],
1066
+ "superclass": {
1067
+ "name": "EventTarget",
1068
+ "module": "sdk/core.js"
1069
+ }
1070
+ },
1071
+ {
1072
+ "kind": "variable",
1073
+ "name": "originalSrc"
917
1074
  }
918
1075
  ],
919
1076
  "exports": [
@@ -1013,6 +1170,30 @@
1013
1170
  "module": "sdk/core.js"
1014
1171
  }
1015
1172
  },
1173
+ {
1174
+ "kind": "js",
1175
+ "name": "MigrationRunner",
1176
+ "declaration": {
1177
+ "name": "MigrationRunner",
1178
+ "module": "sdk/core.js"
1179
+ }
1180
+ },
1181
+ {
1182
+ "kind": "js",
1183
+ "name": "CURRENT_SCHEMA_VERSION",
1184
+ "declaration": {
1185
+ "name": "CURRENT_SCHEMA_VERSION",
1186
+ "module": "sdk/core.js"
1187
+ }
1188
+ },
1189
+ {
1190
+ "kind": "js",
1191
+ "name": "DEFAULT_MIGRATIONS",
1192
+ "declaration": {
1193
+ "name": "DEFAULT_MIGRATIONS",
1194
+ "module": "sdk/core.js"
1195
+ }
1196
+ },
1016
1197
  {
1017
1198
  "kind": "js",
1018
1199
  "name": "ImageProcessorPort",
@@ -1053,6 +1234,46 @@
1053
1234
  "module": "sdk/core.js"
1054
1235
  }
1055
1236
  },
1237
+ {
1238
+ "kind": "js",
1239
+ "name": "EdgeDetectorPort",
1240
+ "declaration": {
1241
+ "name": "EdgeDetectorPort",
1242
+ "module": "sdk/core.js"
1243
+ }
1244
+ },
1245
+ {
1246
+ "kind": "js",
1247
+ "name": "DEFAULT_FALLBACK_QUAD",
1248
+ "declaration": {
1249
+ "name": "DEFAULT_FALLBACK_QUAD",
1250
+ "module": "sdk/core.js"
1251
+ }
1252
+ },
1253
+ {
1254
+ "kind": "js",
1255
+ "name": "cloneQuad",
1256
+ "declaration": {
1257
+ "name": "cloneQuad",
1258
+ "module": "sdk/core.js"
1259
+ }
1260
+ },
1261
+ {
1262
+ "kind": "js",
1263
+ "name": "quadToCropRect",
1264
+ "declaration": {
1265
+ "name": "quadToCropRect",
1266
+ "module": "sdk/core.js"
1267
+ }
1268
+ },
1269
+ {
1270
+ "kind": "js",
1271
+ "name": "NullEdgeDetectorAdapter",
1272
+ "declaration": {
1273
+ "name": "NullEdgeDetectorAdapter",
1274
+ "module": "sdk/core.js"
1275
+ }
1276
+ },
1056
1277
  {
1057
1278
  "kind": "js",
1058
1279
  "name": "Document",
@@ -1085,6 +1306,22 @@
1085
1306
  "module": "sdk/core.js"
1086
1307
  }
1087
1308
  },
1309
+ {
1310
+ "kind": "js",
1311
+ "name": "normalizeQuad",
1312
+ "declaration": {
1313
+ "name": "normalizeQuad",
1314
+ "module": "sdk/core.js"
1315
+ }
1316
+ },
1317
+ {
1318
+ "kind": "js",
1319
+ "name": "cropRectToQuad",
1320
+ "declaration": {
1321
+ "name": "cropRectToQuad",
1322
+ "module": "sdk/core.js"
1323
+ }
1324
+ },
1088
1325
  {
1089
1326
  "kind": "js",
1090
1327
  "name": "hasActiveEdits",
@@ -1117,6 +1354,30 @@
1117
1354
  "module": "sdk/core.js"
1118
1355
  }
1119
1356
  },
1357
+ {
1358
+ "kind": "js",
1359
+ "name": "rotateQuad",
1360
+ "declaration": {
1361
+ "name": "rotateQuad",
1362
+ "module": "sdk/core.js"
1363
+ }
1364
+ },
1365
+ {
1366
+ "kind": "js",
1367
+ "name": "quadRotatedToOriginal",
1368
+ "declaration": {
1369
+ "name": "quadRotatedToOriginal",
1370
+ "module": "sdk/core.js"
1371
+ }
1372
+ },
1373
+ {
1374
+ "kind": "js",
1375
+ "name": "quadOriginalToRotated",
1376
+ "declaration": {
1377
+ "name": "quadOriginalToRotated",
1378
+ "module": "sdk/core.js"
1379
+ }
1380
+ },
1120
1381
  {
1121
1382
  "kind": "js",
1122
1383
  "name": "randomId",
@@ -1241,7 +1502,7 @@
1241
1502
  "type": {
1242
1503
  "text": "object"
1243
1504
  },
1244
- "default": "{ PAGE_ADDED: 'copio:page-added', PAGE_REMOVED: 'copio:page-removed', PAGES_CHANGED: 'copio:pages-changed', SCAN_COMPLETE: 'copio:scan-complete', EXPORT_PROGRESS: 'copio:export-progress', EXPORT_COMPLETE: 'copio:export-complete', OCR_COMPLETE: 'copio:ocr-complete', SYNC_CONNECTED: 'copio:sync-connected', ERROR: 'copio:error', }",
1505
+ "default": "{ PAGE_ADDED: 'copio:page-added', PAGE_REMOVED: 'copio:page-removed', PAGES_CHANGED: 'copio:pages-changed', SCAN_COMPLETE: 'copio:scan-complete', EXPORT_PROGRESS: 'copio:export-progress', EXPORT_COMPLETE: 'copio:export-complete', OCR_COMPLETE: 'copio:ocr-complete', SYNC_CONNECTED: 'copio:sync-connected', HANDOFF_CONNECTED: 'copio:handoff-connected', CONNECTION_INFO: 'copio:connection-info', EDGE_DETECTED: 'copio:edge-detected', MIGRATION: 'copio:migration', ERROR: 'copio:error', }",
1245
1506
  "description": "Public event name constants.",
1246
1507
  "readonly": true
1247
1508
  },
@@ -1302,142 +1563,1110 @@
1302
1563
  },
1303
1564
  {
1304
1565
  "kind": "javascript-module",
1305
- "path": "sdk/index.js",
1566
+ "path": "sdk/handoff-session.js",
1306
1567
  "declarations": [],
1307
1568
  "exports": [
1308
1569
  {
1309
1570
  "kind": "js",
1310
- "name": "CopioScanner",
1571
+ "name": "CopioHandoff",
1311
1572
  "declaration": {
1312
- "name": "CopioScanner",
1313
- "module": "./scanner.js"
1573
+ "name": "CopioHandoff",
1574
+ "module": "./handoff.js"
1314
1575
  }
1315
1576
  },
1316
1577
  {
1317
1578
  "kind": "js",
1318
- "name": "scannerCss",
1579
+ "name": "handoffCss",
1319
1580
  "declaration": {
1320
- "name": "scannerCss",
1321
- "module": "./scanner.js"
1581
+ "name": "handoffCss",
1582
+ "module": "./handoff.js"
1322
1583
  }
1323
1584
  },
1324
1585
  {
1325
1586
  "kind": "js",
1326
- "name": "getScannerStyleSheet",
1587
+ "name": "getHandoffStyleSheet",
1327
1588
  "declaration": {
1328
- "name": "getScannerStyleSheet",
1329
- "module": "./scanner.js"
1589
+ "name": "getHandoffStyleSheet",
1590
+ "module": "./handoff.js"
1330
1591
  }
1331
1592
  },
1332
1593
  {
1333
1594
  "kind": "js",
1334
- "name": "adoptScannerStyles",
1595
+ "name": "adoptHandoffStyles",
1335
1596
  "declaration": {
1336
- "name": "adoptScannerStyles",
1337
- "module": "./scanner.js"
1597
+ "name": "adoptHandoffStyles",
1598
+ "module": "./handoff.js"
1338
1599
  }
1339
1600
  },
1340
1601
  {
1341
1602
  "kind": "js",
1342
- "name": "CopioDocOcrDialog",
1603
+ "name": "HandoffSession",
1343
1604
  "declaration": {
1344
- "name": "CopioDocOcrDialog",
1345
- "module": "../js/routes/ocr/copio-doc-ocr-dialog.js"
1605
+ "name": "HandoffSession",
1606
+ "module": "./handoff.js"
1346
1607
  }
1347
1608
  },
1348
1609
  {
1349
1610
  "kind": "js",
1350
- "name": "CopioSyncDialog",
1611
+ "name": "LoopbackTransport",
1351
1612
  "declaration": {
1352
- "name": "CopioSyncDialog",
1353
- "module": "../js/routes/sync/copio-sync-dialog.js"
1613
+ "name": "LoopbackTransport",
1614
+ "module": "./handoff.js"
1354
1615
  }
1355
1616
  },
1356
1617
  {
1357
1618
  "kind": "js",
1358
- "name": "CopioEngine",
1619
+ "name": "randomHandoffId",
1359
1620
  "declaration": {
1360
- "name": "CopioEngine",
1361
- "module": "./core.js"
1621
+ "name": "randomHandoffId",
1622
+ "module": "./handoff.js"
1362
1623
  }
1363
1624
  },
1364
1625
  {
1365
1626
  "kind": "js",
1366
- "name": "COPIO_EVENTS",
1627
+ "name": "encodeSessionToken",
1367
1628
  "declaration": {
1368
- "name": "COPIO_EVENTS",
1369
- "module": "./events.js"
1629
+ "name": "encodeSessionToken",
1630
+ "module": "./handoff.js"
1370
1631
  }
1371
1632
  },
1372
1633
  {
1373
1634
  "kind": "js",
1374
- "name": "dispatchCopioEvent",
1635
+ "name": "decodeSessionToken",
1375
1636
  "declaration": {
1376
- "name": "dispatchCopioEvent",
1377
- "module": "./events.js"
1637
+ "name": "decodeSessionToken",
1638
+ "module": "./handoff.js"
1378
1639
  }
1379
1640
  },
1380
1641
  {
1381
1642
  "kind": "js",
1382
- "name": "LicenseManager",
1643
+ "name": "buildHandoffUrl",
1383
1644
  "declaration": {
1384
- "name": "LicenseManager",
1385
- "module": "./license.js"
1645
+ "name": "buildHandoffUrl",
1646
+ "module": "./handoff.js"
1386
1647
  }
1387
1648
  },
1388
1649
  {
1389
1650
  "kind": "js",
1390
- "name": "BUILD_DATE",
1651
+ "name": "parseHandoffUrl",
1391
1652
  "declaration": {
1392
- "name": "BUILD_DATE",
1393
- "module": "./version.js"
1653
+ "name": "parseHandoffUrl",
1654
+ "module": "./handoff.js"
1394
1655
  }
1395
1656
  },
1396
1657
  {
1397
1658
  "kind": "js",
1398
- "name": "VERSION",
1659
+ "name": "HANDOFF_DEFAULT_CHUNK_SIZE",
1399
1660
  "declaration": {
1400
- "name": "VERSION",
1401
- "module": "./version.js"
1661
+ "name": "HANDOFF_DEFAULT_CHUNK_SIZE",
1662
+ "module": "./handoff.js"
1402
1663
  }
1403
1664
  },
1404
1665
  {
1405
1666
  "kind": "js",
1406
- "name": "recognizeImageText",
1667
+ "name": "HANDOFF_DEFAULT_TTL_MS",
1407
1668
  "declaration": {
1408
- "name": "recognizeImageText",
1409
- "module": "../js/services/ocr-service.js"
1669
+ "name": "HANDOFF_DEFAULT_TTL_MS",
1670
+ "module": "./handoff.js"
1410
1671
  }
1411
1672
  },
1412
1673
  {
1413
1674
  "kind": "js",
1414
- "name": "recognizeDocumentPages",
1675
+ "name": "generateEcdhKeyPair",
1415
1676
  "declaration": {
1416
- "name": "recognizeDocumentPages",
1417
- "module": "../js/services/ocr-service.js"
1677
+ "name": "generateEcdhKeyPair",
1678
+ "module": "./handoff.js"
1418
1679
  }
1419
1680
  },
1420
1681
  {
1421
1682
  "kind": "js",
1422
- "name": "getOcrWorker",
1683
+ "name": "exportPublicKey",
1423
1684
  "declaration": {
1424
- "name": "getOcrWorker",
1425
- "module": "../js/services/ocr-service.js"
1685
+ "name": "exportPublicKey",
1686
+ "module": "./handoff.js"
1426
1687
  }
1427
1688
  },
1428
1689
  {
1429
1690
  "kind": "js",
1430
- "name": "terminateOcrWorker",
1691
+ "name": "importPublicKey",
1431
1692
  "declaration": {
1432
- "name": "terminateOcrWorker",
1433
- "module": "../js/services/ocr-service.js"
1693
+ "name": "importPublicKey",
1694
+ "module": "./handoff.js"
1434
1695
  }
1435
1696
  },
1436
1697
  {
1437
1698
  "kind": "js",
1438
- "name": "SUPPORTED_LANGUAGES",
1699
+ "name": "deriveSharedKey",
1439
1700
  "declaration": {
1440
- "name": "SUPPORTED_LANGUAGES",
1701
+ "name": "deriveSharedKey",
1702
+ "module": "./handoff.js"
1703
+ }
1704
+ },
1705
+ {
1706
+ "kind": "js",
1707
+ "name": "encryptPayload",
1708
+ "declaration": {
1709
+ "name": "encryptPayload",
1710
+ "module": "./handoff.js"
1711
+ }
1712
+ },
1713
+ {
1714
+ "kind": "js",
1715
+ "name": "decryptPayload",
1716
+ "declaration": {
1717
+ "name": "decryptPayload",
1718
+ "module": "./handoff.js"
1719
+ }
1720
+ }
1721
+ ]
1722
+ },
1723
+ {
1724
+ "kind": "javascript-module",
1725
+ "path": "sdk/handoff-styles.js",
1726
+ "declarations": [
1727
+ {
1728
+ "kind": "variable",
1729
+ "name": "handoffCss",
1730
+ "default": "` :host { all: initial; display: block; position: relative; width: 100%; height: 100%; min-height: 280px; box-sizing: border-box; container-type: inline-size; container-name: copio-handoff; overflow-y: auto; overflow-x: hidden; text-align: left; direction: ltr; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; --copio-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --copio-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; --copio-color-bg: #0b0f17; --copio-color-surface: #131b26; --copio-color-surface-elevated: #1c2736; --copio-color-surface-overlay: rgba(15, 22, 32, 0.88); --copio-color-text: #f1f5f9; --copio-color-text-muted: #94a3b8; --copio-color-text-inverse: #090d14; --copio-color-primary: #38bdf8; --copio-color-primary-hover: #7dd3fc; --copio-color-primary-contrast: #06131f; --copio-color-success: #22c55e; --copio-color-warning: #f59e0b; --copio-color-danger: #ef4444; --copio-color-border: rgba(148, 163, 184, 0.18); --copio-color-border-strong: rgba(148, 163, 184, 0.34); --copio-focus-ring: 0 0 0 2px #0b0f17, 0 0 0 4px #38bdf8; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-radius-pill: 9999px; --copio-spacing-xs: 4px; --copio-spacing-sm: 8px; --copio-spacing-md: 12px; --copio-spacing-lg: 16px; --copio-spacing-xl: 24px; --copio-touch-target-min: 44px; --copio-shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.55); --copio-transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1); --copio-transition-normal: 240ms cubic-bezier(0.22, 1, 0.36, 1); font-family: var(--copio-font-family); font-size: 14px; line-height: 1.5; color: var(--copio-color-text); background-color: var(--copio-color-bg); color-scheme: dark; } :host([theme=\"light\"]), :host(.copio-theme-light), :host-context([data-theme=\"light\"]), :host-context(.sl-theme-light), :host-context(.theme-light) { --copio-color-bg: #f8fafc; --copio-color-surface: #ffffff; --copio-color-surface-elevated: #f1f5f9; --copio-color-surface-overlay: rgba(255, 255, 255, 0.92); --copio-color-text: #0f172a; --copio-color-text-muted: #64748b; --copio-color-text-inverse: #ffffff; --copio-color-border: rgba(15, 23, 42, 0.12); --copio-color-border-strong: rgba(15, 23, 42, 0.24); --copio-color-primary: #0284c7; --copio-color-primary-hover: #0369a1; --copio-color-primary-contrast: #ffffff; --copio-shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.12); color-scheme: light; } *, *::before, *::after { box-sizing: border-box; } .copio-handoff-root { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; min-height: 100%; padding: var(--copio-spacing-xl); background-color: var(--copio-color-bg); color: var(--copio-color-text); text-align: center; } /* Card Container */ .copio-handoff-card { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 440px; background-color: var(--copio-color-surface); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-lg); padding: var(--copio-spacing-xl); box-shadow: var(--copio-shadow-elevated); transition: transform var(--copio-transition-fast), border-color var(--copio-transition-fast); } /* Typography */ .copio-handoff-title { font-size: 18px; font-weight: 600; margin: 0 0 var(--copio-spacing-xs); color: var(--copio-color-text); } .copio-handoff-desc { font-size: 13px; color: var(--copio-color-text-muted); margin: 0 0 var(--copio-spacing-lg); max-width: 320px; line-height: 1.4; } /* QR Code Box */ .copio-handoff-qr-box { display: flex; align-items: center; justify-content: center; width: 220px; height: 220px; background-color: #ffffff; border-radius: var(--copio-radius-md); padding: var(--copio-spacing-md); margin-bottom: var(--copio-spacing-md); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); position: relative; overflow: hidden; } .copio-handoff-qr-box svg { width: 100%; height: 100%; display: block; } .copio-handoff-qr-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--copio-spacing-sm); color: #64748b; font-size: 12px; } /* Timer and Refresh Meta */ .copio-handoff-meta-row { display: flex; align-items: center; justify-content: center; gap: var(--copio-spacing-sm); margin-bottom: var(--copio-spacing-lg); font-size: 12px; color: var(--copio-color-text-muted); } .copio-handoff-timer-badge { display: inline-flex; align-items: center; gap: 5px; background-color: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-border); padding: 4px 10px; border-radius: var(--copio-radius-pill); font-family: var(--copio-font-mono); font-weight: 500; } .copio-handoff-icon-btn { background: transparent; border: none; color: var(--copio-color-text-muted); cursor: pointer; padding: 6px; border-radius: var(--copio-radius-pill); display: inline-flex; align-items: center; justify-content: center; transition: color var(--copio-transition-fast), background-color var(--copio-transition-fast); } .copio-handoff-icon-btn:hover { color: var(--copio-color-primary); background-color: var(--copio-color-surface-elevated); } /* Divider */ .copio-handoff-divider { display: flex; align-items: center; width: 100%; margin: var(--copio-spacing-sm) 0 var(--copio-spacing-md); color: var(--copio-color-text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; } .copio-handoff-divider::before, .copio-handoff-divider::after { content: ''; flex: 1; height: 1px; background-color: var(--copio-color-border); } .copio-handoff-divider span { padding: 0 var(--copio-spacing-sm); } /* Buttons */ .copio-handoff-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--copio-spacing-sm); width: 100%; min-height: var(--copio-touch-target-min); padding: 10px 16px; font-size: 13px; font-weight: 500; border-radius: var(--copio-radius-md); cursor: pointer; border: 1px solid transparent; transition: background-color var(--copio-transition-fast), border-color var(--copio-transition-fast), color var(--copio-transition-fast); } .copio-handoff-btn-secondary { background-color: var(--copio-color-surface-elevated); border-color: var(--copio-color-border); color: var(--copio-color-text); } .copio-handoff-btn-secondary:hover { border-color: var(--copio-color-border-strong); color: var(--copio-color-primary); background-color: var(--copio-color-surface); } .copio-handoff-btn-primary { background-color: var(--copio-color-primary); color: var(--copio-color-primary-contrast); font-weight: 600; } .copio-handoff-btn-primary:hover { background-color: var(--copio-color-primary-hover); } /* Status Indicators */ .copio-handoff-status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--copio-radius-pill); font-size: 13px; font-weight: 500; margin-bottom: var(--copio-spacing-md); border: 1px solid var(--copio-color-border); background-color: var(--copio-color-surface-elevated); } .copio-handoff-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--copio-color-success); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); animation: copio-handoff-pulse 2s infinite; } @keyframes copio-handoff-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } } .copio-handoff-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: var(--copio-radius-pill); background-color: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-border); font-size: 12px; color: var(--copio-color-text-muted); font-weight: 500; margin-bottom: var(--copio-spacing-lg); } /* Progress Bar (Receiving State) */ .copio-handoff-progress-wrap { width: 100%; margin-bottom: var(--copio-spacing-lg); } .copio-handoff-progress-bar { width: 100%; height: 8px; background-color: var(--copio-color-surface-elevated); border-radius: var(--copio-radius-pill); overflow: hidden; border: 1px solid var(--copio-color-border); } .copio-handoff-progress-fill { height: 100%; background: linear-gradient(90deg, var(--copio-color-primary) 0%, #38bdf8 100%); border-radius: var(--copio-radius-pill); transition: width 150ms ease-out; } .copio-handoff-progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--copio-color-text-muted); margin-top: 6px; } /* Thumbnail Grid */ .copio-handoff-thumbnails { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: var(--copio-spacing-sm); width: 100%; max-height: 240px; overflow-y: auto; padding: 4px; margin-bottom: var(--copio-spacing-lg); } .copio-handoff-thumb-card { position: relative; aspect-ratio: 3 / 4; background-color: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-sm); overflow: hidden; display: flex; align-items: center; justify-content: center; } .copio-handoff-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; } .copio-handoff-thumb-label { position: absolute; bottom: 4px; right: 4px; background-color: rgba(0, 0, 0, 0.7); color: #ffffff; font-size: 10px; padding: 2px 5px; border-radius: 4px; font-family: var(--copio-font-mono); } .copio-handoff-thumb-shimmer { width: 100%; height: 100%; background: linear-gradient(90deg, var(--copio-color-surface-elevated) 0%, rgba(56, 189, 248, 0.15) 50%, var(--copio-color-surface-elevated) 100%); background-size: 200% 100%; animation: copio-shimmer 1.5s infinite; display: flex; align-items: center; justify-content: center; color: var(--copio-color-primary); } @keyframes copio-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } } /* Complete State */ .copio-handoff-success-icon { width: 48px; height: 48px; border-radius: 50%; background-color: rgba(34, 197, 94, 0.15); color: var(--copio-color-success); display: flex; align-items: center; justify-content: center; margin-bottom: var(--copio-spacing-md); } /* Error / Expired State */ .copio-handoff-alert { display: flex; flex-direction: column; align-items: center; width: 100%; margin-bottom: var(--copio-spacing-lg); } .copio-handoff-alert-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: var(--copio-spacing-md); } .copio-handoff-alert-icon.warning { background-color: rgba(245, 158, 11, 0.15); color: var(--copio-color-warning); } .copio-handoff-alert-icon.danger { background-color: rgba(239, 68, 68, 0.15); color: var(--copio-color-danger); } /* Spinner */ .copio-handoff-spinner { width: 24px; height: 24px; border: 2px solid rgba(148, 163, 184, 0.2); border-top-color: var(--copio-color-primary); border-radius: 50%; animation: copio-spin 0.8s linear infinite; } @keyframes copio-spin { to { transform: rotate(360deg); } } /* Responsive Container Queries */ @container copio-handoff (max-width: 400px) { .copio-handoff-root { padding: var(--copio-spacing-md); } .copio-handoff-card { padding: var(--copio-spacing-md); } .copio-handoff-qr-box { width: 170px; height: 170px; } .copio-handoff-title { font-size: 16px; } .copio-handoff-desc { font-size: 12px; } } @container copio-handoff (min-width: 600px) { .copio-handoff-card { max-width: 520px; } .copio-handoff-qr-box { width: 240px; height: 240px; } } `",
1731
+ "description": "Copio Handoff Encapsulated Styles & Design Tokens (CPO-091)\n\nProvides constructable stylesheets and adoptedStyleSheets architecture for <copio-handoff>\nwith complete Shadow DOM style encapsulation, zero global leakage, and container query support."
1732
+ },
1733
+ {
1734
+ "kind": "function",
1735
+ "name": "getHandoffStyleSheet"
1736
+ },
1737
+ {
1738
+ "kind": "function",
1739
+ "name": "adoptHandoffStyles",
1740
+ "parameters": [
1741
+ {
1742
+ "name": "shadowRoot"
1743
+ }
1744
+ ]
1745
+ }
1746
+ ],
1747
+ "exports": [
1748
+ {
1749
+ "kind": "js",
1750
+ "name": "handoffCss",
1751
+ "declaration": {
1752
+ "name": "handoffCss",
1753
+ "module": "sdk/handoff-styles.js"
1754
+ }
1755
+ },
1756
+ {
1757
+ "kind": "js",
1758
+ "name": "getHandoffStyleSheet",
1759
+ "declaration": {
1760
+ "name": "getHandoffStyleSheet",
1761
+ "module": "sdk/handoff-styles.js"
1762
+ }
1763
+ },
1764
+ {
1765
+ "kind": "js",
1766
+ "name": "adoptHandoffStyles",
1767
+ "declaration": {
1768
+ "name": "adoptHandoffStyles",
1769
+ "module": "sdk/handoff-styles.js"
1770
+ }
1771
+ }
1772
+ ]
1773
+ },
1774
+ {
1775
+ "kind": "javascript-module",
1776
+ "path": "sdk/handoff.js",
1777
+ "declarations": [
1778
+ {
1779
+ "kind": "class",
1780
+ "description": "",
1781
+ "name": "CopioHandoff",
1782
+ "members": [
1783
+ {
1784
+ "kind": "field",
1785
+ "name": "#session",
1786
+ "privacy": "private",
1787
+ "type": {
1788
+ "text": "null"
1789
+ },
1790
+ "default": "null"
1791
+ },
1792
+ {
1793
+ "kind": "field",
1794
+ "name": "#state",
1795
+ "privacy": "private",
1796
+ "type": {
1797
+ "text": "string"
1798
+ },
1799
+ "default": "'waiting'"
1800
+ },
1801
+ {
1802
+ "kind": "field",
1803
+ "name": "#token",
1804
+ "privacy": "private",
1805
+ "type": {
1806
+ "text": "null"
1807
+ },
1808
+ "default": "null"
1809
+ },
1810
+ {
1811
+ "kind": "field",
1812
+ "name": "#url",
1813
+ "privacy": "private",
1814
+ "type": {
1815
+ "text": "string"
1816
+ },
1817
+ "default": "''"
1818
+ },
1819
+ {
1820
+ "kind": "field",
1821
+ "name": "#qrSvg",
1822
+ "privacy": "private",
1823
+ "type": {
1824
+ "text": "null"
1825
+ },
1826
+ "default": "null"
1827
+ },
1828
+ {
1829
+ "kind": "field",
1830
+ "name": "#pages",
1831
+ "privacy": "private",
1832
+ "type": {
1833
+ "text": "array"
1834
+ },
1835
+ "default": "[]"
1836
+ },
1837
+ {
1838
+ "kind": "field",
1839
+ "name": "#activeProgress",
1840
+ "privacy": "private",
1841
+ "type": {
1842
+ "text": "null"
1843
+ },
1844
+ "default": "null"
1845
+ },
1846
+ {
1847
+ "kind": "field",
1848
+ "name": "#errorMessage",
1849
+ "privacy": "private",
1850
+ "type": {
1851
+ "text": "string"
1852
+ },
1853
+ "default": "''"
1854
+ },
1855
+ {
1856
+ "kind": "field",
1857
+ "name": "#remainingSeconds",
1858
+ "privacy": "private",
1859
+ "type": {
1860
+ "text": "number"
1861
+ },
1862
+ "default": "600"
1863
+ },
1864
+ {
1865
+ "kind": "field",
1866
+ "name": "#countdownInterval",
1867
+ "privacy": "private",
1868
+ "type": {
1869
+ "text": "null"
1870
+ },
1871
+ "default": "null"
1872
+ },
1873
+ {
1874
+ "kind": "field",
1875
+ "name": "#sessionDocId",
1876
+ "privacy": "private",
1877
+ "type": {
1878
+ "text": "null"
1879
+ },
1880
+ "default": "null"
1881
+ },
1882
+ {
1883
+ "kind": "field",
1884
+ "name": "#unsubs",
1885
+ "privacy": "private",
1886
+ "type": {
1887
+ "text": "array"
1888
+ },
1889
+ "default": "[]"
1890
+ },
1891
+ {
1892
+ "kind": "field",
1893
+ "name": "#autoStart",
1894
+ "privacy": "private",
1895
+ "type": {
1896
+ "text": "boolean"
1897
+ },
1898
+ "default": "true"
1899
+ },
1900
+ {
1901
+ "kind": "field",
1902
+ "name": "#relayUrl",
1903
+ "privacy": "private",
1904
+ "type": {
1905
+ "text": "string"
1906
+ },
1907
+ "default": "''"
1908
+ },
1909
+ {
1910
+ "kind": "field",
1911
+ "name": "#signalingUrl",
1912
+ "privacy": "private",
1913
+ "type": {
1914
+ "text": "string"
1915
+ },
1916
+ "default": "''"
1917
+ },
1918
+ {
1919
+ "kind": "field",
1920
+ "name": "#iceServers",
1921
+ "privacy": "private",
1922
+ "type": {
1923
+ "text": "null"
1924
+ },
1925
+ "default": "null"
1926
+ },
1927
+ {
1928
+ "kind": "field",
1929
+ "name": "#iceTransportPolicy",
1930
+ "privacy": "private",
1931
+ "type": {
1932
+ "text": "string"
1933
+ },
1934
+ "default": "'all'"
1935
+ },
1936
+ {
1937
+ "kind": "field",
1938
+ "name": "#customTransport",
1939
+ "privacy": "private",
1940
+ "type": {
1941
+ "text": "null"
1942
+ },
1943
+ "default": "null"
1944
+ },
1945
+ {
1946
+ "kind": "field",
1947
+ "name": "#connectionInfo",
1948
+ "privacy": "private",
1949
+ "type": {
1950
+ "text": "null"
1951
+ },
1952
+ "default": "null"
1953
+ },
1954
+ {
1955
+ "kind": "field",
1956
+ "name": "#targetDocId",
1957
+ "privacy": "private",
1958
+ "readonly": true
1959
+ },
1960
+ {
1961
+ "kind": "field",
1962
+ "name": "state"
1963
+ },
1964
+ {
1965
+ "kind": "field",
1966
+ "name": "session"
1967
+ },
1968
+ {
1969
+ "kind": "field",
1970
+ "name": "receiverUrl"
1971
+ },
1972
+ {
1973
+ "kind": "field",
1974
+ "name": "docId"
1975
+ },
1976
+ {
1977
+ "kind": "field",
1978
+ "name": "theme"
1979
+ },
1980
+ {
1981
+ "kind": "field",
1982
+ "name": "ttlMs"
1983
+ },
1984
+ {
1985
+ "kind": "field",
1986
+ "name": "mode"
1987
+ },
1988
+ {
1989
+ "kind": "field",
1990
+ "name": "aspect"
1991
+ },
1992
+ {
1993
+ "kind": "field",
1994
+ "name": "pages",
1995
+ "readonly": true
1996
+ },
1997
+ {
1998
+ "kind": "field",
1999
+ "name": "token",
2000
+ "readonly": true
2001
+ },
2002
+ {
2003
+ "kind": "field",
2004
+ "name": "url",
2005
+ "readonly": true
2006
+ },
2007
+ {
2008
+ "kind": "field",
2009
+ "name": "relayUrl"
2010
+ },
2011
+ {
2012
+ "kind": "field",
2013
+ "name": "signalingUrl"
2014
+ },
2015
+ {
2016
+ "kind": "field",
2017
+ "name": "iceServers"
2018
+ },
2019
+ {
2020
+ "kind": "field",
2021
+ "name": "iceTransportPolicy"
2022
+ },
2023
+ {
2024
+ "kind": "field",
2025
+ "name": "transport"
2026
+ },
2027
+ {
2028
+ "kind": "field",
2029
+ "name": "connectionInfo",
2030
+ "readonly": true
2031
+ },
2032
+ {
2033
+ "kind": "method",
2034
+ "name": "getConnectionInfo",
2035
+ "description": "Retrieves connection diagnostics for the active session.",
2036
+ "return": {
2037
+ "type": {
2038
+ "text": "Promise<{ transport: 'direct'|'turn', rttMs: number }>"
2039
+ }
2040
+ }
2041
+ },
2042
+ {
2043
+ "kind": "method",
2044
+ "name": "start",
2045
+ "parameters": [
2046
+ {
2047
+ "name": "options",
2048
+ "default": "{}",
2049
+ "optional": true,
2050
+ "type": {
2051
+ "text": "@param {string} [options.baseUrl]\n * @param {string} [options.peerId]\n * @param {boolean} [options.peer]\n * @param {Object} [options.transport]\n * "
2052
+ }
2053
+ }
2054
+ ],
2055
+ "description": "Starts a new host session and generates a fresh optical QR token.",
2056
+ "return": {
2057
+ "type": {
2058
+ "text": "Promise<{ token: Object, url: string }>"
2059
+ }
2060
+ }
2061
+ },
2062
+ {
2063
+ "kind": "method",
2064
+ "name": "attachSession",
2065
+ "parameters": [
2066
+ {
2067
+ "name": "session",
2068
+ "type": {
2069
+ "text": "HandoffSession"
2070
+ }
2071
+ },
2072
+ {
2073
+ "name": "token",
2074
+ "default": "null",
2075
+ "optional": true,
2076
+ "type": {
2077
+ "text": "Object"
2078
+ }
2079
+ }
2080
+ ],
2081
+ "description": "Attaches an existing HandoffSession (e.g. LoopbackTransport in automated tests)."
2082
+ },
2083
+ {
2084
+ "kind": "method",
2085
+ "name": "refresh",
2086
+ "description": "Regenerates a new QR code and session."
2087
+ },
2088
+ {
2089
+ "kind": "method",
2090
+ "name": "clear",
2091
+ "description": "Clears all received pages and resets back to waiting."
2092
+ },
2093
+ {
2094
+ "kind": "method",
2095
+ "name": "getPages",
2096
+ "description": "Returns copy of received page entities.",
2097
+ "return": {
2098
+ "type": {
2099
+ "text": "Array<Object>"
2100
+ }
2101
+ }
2102
+ },
2103
+ {
2104
+ "kind": "method",
2105
+ "name": "dispatch",
2106
+ "parameters": [
2107
+ {
2108
+ "name": "eventName",
2109
+ "type": {
2110
+ "text": "string"
2111
+ }
2112
+ },
2113
+ {
2114
+ "name": "detail",
2115
+ "default": "{}",
2116
+ "optional": true,
2117
+ "type": {
2118
+ "text": "Object"
2119
+ }
2120
+ }
2121
+ ],
2122
+ "description": "Dispatches a public Copio event."
2123
+ },
2124
+ {
2125
+ "kind": "method",
2126
+ "name": "#getDefaultBaseUrl",
2127
+ "privacy": "private"
2128
+ },
2129
+ {
2130
+ "kind": "method",
2131
+ "name": "#bindSessionEvents",
2132
+ "privacy": "private",
2133
+ "parameters": [
2134
+ {
2135
+ "name": "session"
2136
+ }
2137
+ ]
2138
+ },
2139
+ {
2140
+ "kind": "method",
2141
+ "name": "#handleIncomingPage",
2142
+ "privacy": "private",
2143
+ "parameters": [
2144
+ {
2145
+ "name": "pageData"
2146
+ }
2147
+ ]
2148
+ },
2149
+ {
2150
+ "kind": "method",
2151
+ "name": "#handleSessionComplete",
2152
+ "privacy": "private",
2153
+ "parameters": [
2154
+ {
2155
+ "name": "details",
2156
+ "default": "{}"
2157
+ }
2158
+ ]
2159
+ },
2160
+ {
2161
+ "kind": "method",
2162
+ "name": "#fail",
2163
+ "privacy": "private",
2164
+ "parameters": [
2165
+ {
2166
+ "name": "err"
2167
+ }
2168
+ ]
2169
+ },
2170
+ {
2171
+ "kind": "method",
2172
+ "name": "#startCountdown",
2173
+ "privacy": "private",
2174
+ "parameters": [
2175
+ {
2176
+ "name": "expiresAt"
2177
+ }
2178
+ ]
2179
+ },
2180
+ {
2181
+ "kind": "method",
2182
+ "name": "#stopCountdown",
2183
+ "privacy": "private"
2184
+ },
2185
+ {
2186
+ "kind": "method",
2187
+ "name": "#cleanupSession",
2188
+ "privacy": "private"
2189
+ },
2190
+ {
2191
+ "kind": "method",
2192
+ "name": "#formatTime",
2193
+ "privacy": "private",
2194
+ "parameters": [
2195
+ {
2196
+ "name": "totalSec"
2197
+ }
2198
+ ]
2199
+ },
2200
+ {
2201
+ "kind": "method",
2202
+ "name": "#handleLocalFileUpload",
2203
+ "privacy": "private",
2204
+ "parameters": [
2205
+ {
2206
+ "name": "files"
2207
+ }
2208
+ ]
2209
+ },
2210
+ {
2211
+ "kind": "method",
2212
+ "name": "#updateProgressDom",
2213
+ "privacy": "private"
2214
+ },
2215
+ {
2216
+ "kind": "method",
2217
+ "name": "#render",
2218
+ "privacy": "private"
2219
+ },
2220
+ {
2221
+ "kind": "method",
2222
+ "name": "#renderWaitingState",
2223
+ "privacy": "private"
2224
+ },
2225
+ {
2226
+ "kind": "method",
2227
+ "name": "#renderConnectedState",
2228
+ "privacy": "private"
2229
+ },
2230
+ {
2231
+ "kind": "method",
2232
+ "name": "#renderReceivingState",
2233
+ "privacy": "private"
2234
+ },
2235
+ {
2236
+ "kind": "method",
2237
+ "name": "#renderCompleteState",
2238
+ "privacy": "private"
2239
+ },
2240
+ {
2241
+ "kind": "method",
2242
+ "name": "#renderExpiredState",
2243
+ "privacy": "private"
2244
+ },
2245
+ {
2246
+ "kind": "method",
2247
+ "name": "#renderErrorState",
2248
+ "privacy": "private"
2249
+ },
2250
+ {
2251
+ "kind": "method",
2252
+ "name": "#renderThumbnails",
2253
+ "privacy": "private",
2254
+ "parameters": [
2255
+ {
2256
+ "name": "showShimmerPlaceholder",
2257
+ "default": "false"
2258
+ }
2259
+ ]
2260
+ },
2261
+ {
2262
+ "kind": "method",
2263
+ "name": "#attachListeners",
2264
+ "privacy": "private"
2265
+ }
2266
+ ],
2267
+ "attributes": [
2268
+ {
2269
+ "name": "state"
2270
+ },
2271
+ {
2272
+ "name": "receiver-url"
2273
+ },
2274
+ {
2275
+ "name": "doc-id"
2276
+ },
2277
+ {
2278
+ "name": "theme"
2279
+ },
2280
+ {
2281
+ "name": "ttl"
2282
+ },
2283
+ {
2284
+ "name": "mode"
2285
+ },
2286
+ {
2287
+ "name": "aspect"
2288
+ },
2289
+ {
2290
+ "name": "relay-url"
2291
+ },
2292
+ {
2293
+ "name": "ice-servers"
2294
+ },
2295
+ {
2296
+ "name": "signaling-url"
2297
+ },
2298
+ {
2299
+ "name": "ice-transport-policy"
2300
+ },
2301
+ {
2302
+ "name": "transport"
2303
+ }
2304
+ ],
2305
+ "superclass": {
2306
+ "name": "BaseElement",
2307
+ "module": "sdk/handoff.js"
2308
+ },
2309
+ "tagName": "copio-handoff",
2310
+ "customElement": true
2311
+ },
2312
+ {
2313
+ "kind": "variable",
2314
+ "name": "pageIndex"
2315
+ },
2316
+ {
2317
+ "kind": "variable",
2318
+ "name": "pageNumber"
2319
+ }
2320
+ ],
2321
+ "exports": [
2322
+ {
2323
+ "kind": "js",
2324
+ "name": "CopioHandoff",
2325
+ "declaration": {
2326
+ "name": "CopioHandoff",
2327
+ "module": "sdk/handoff.js"
2328
+ }
2329
+ },
2330
+ {
2331
+ "kind": "custom-element-definition",
2332
+ "name": "copio-handoff",
2333
+ "declaration": {
2334
+ "name": "CopioHandoff",
2335
+ "module": "sdk/handoff.js"
2336
+ }
2337
+ },
2338
+ {
2339
+ "kind": "js",
2340
+ "name": "COPIO_EVENTS",
2341
+ "declaration": {
2342
+ "name": "COPIO_EVENTS",
2343
+ "module": "sdk/handoff.js"
2344
+ }
2345
+ },
2346
+ {
2347
+ "kind": "js",
2348
+ "name": "dispatchCopioEvent",
2349
+ "declaration": {
2350
+ "name": "dispatchCopioEvent",
2351
+ "module": "sdk/handoff.js"
2352
+ }
2353
+ },
2354
+ {
2355
+ "kind": "js",
2356
+ "name": "handoffCss",
2357
+ "declaration": {
2358
+ "name": "handoffCss",
2359
+ "module": "sdk/handoff.js"
2360
+ }
2361
+ },
2362
+ {
2363
+ "kind": "js",
2364
+ "name": "getHandoffStyleSheet",
2365
+ "declaration": {
2366
+ "name": "getHandoffStyleSheet",
2367
+ "module": "sdk/handoff.js"
2368
+ }
2369
+ },
2370
+ {
2371
+ "kind": "js",
2372
+ "name": "adoptHandoffStyles",
2373
+ "declaration": {
2374
+ "name": "adoptHandoffStyles",
2375
+ "module": "sdk/handoff.js"
2376
+ }
2377
+ },
2378
+ {
2379
+ "kind": "js",
2380
+ "name": "HandoffSession",
2381
+ "declaration": {
2382
+ "name": "HandoffSession",
2383
+ "module": "sdk/handoff.js"
2384
+ }
2385
+ },
2386
+ {
2387
+ "kind": "js",
2388
+ "name": "LoopbackTransport",
2389
+ "declaration": {
2390
+ "name": "LoopbackTransport",
2391
+ "module": "sdk/handoff.js"
2392
+ }
2393
+ },
2394
+ {
2395
+ "kind": "js",
2396
+ "name": "randomHandoffId",
2397
+ "declaration": {
2398
+ "name": "randomHandoffId",
2399
+ "module": "sdk/handoff.js"
2400
+ }
2401
+ },
2402
+ {
2403
+ "kind": "js",
2404
+ "name": "encodeSessionToken",
2405
+ "declaration": {
2406
+ "name": "encodeSessionToken",
2407
+ "module": "sdk/handoff.js"
2408
+ }
2409
+ },
2410
+ {
2411
+ "kind": "js",
2412
+ "name": "decodeSessionToken",
2413
+ "declaration": {
2414
+ "name": "decodeSessionToken",
2415
+ "module": "sdk/handoff.js"
2416
+ }
2417
+ },
2418
+ {
2419
+ "kind": "js",
2420
+ "name": "buildHandoffUrl",
2421
+ "declaration": {
2422
+ "name": "buildHandoffUrl",
2423
+ "module": "sdk/handoff.js"
2424
+ }
2425
+ },
2426
+ {
2427
+ "kind": "js",
2428
+ "name": "parseHandoffUrl",
2429
+ "declaration": {
2430
+ "name": "parseHandoffUrl",
2431
+ "module": "sdk/handoff.js"
2432
+ }
2433
+ },
2434
+ {
2435
+ "kind": "js",
2436
+ "name": "HANDOFF_DEFAULT_CHUNK_SIZE",
2437
+ "declaration": {
2438
+ "name": "HANDOFF_DEFAULT_CHUNK_SIZE",
2439
+ "module": "sdk/handoff.js"
2440
+ }
2441
+ },
2442
+ {
2443
+ "kind": "js",
2444
+ "name": "HANDOFF_DEFAULT_TTL_MS",
2445
+ "declaration": {
2446
+ "name": "HANDOFF_DEFAULT_TTL_MS",
2447
+ "module": "sdk/handoff.js"
2448
+ }
2449
+ },
2450
+ {
2451
+ "kind": "js",
2452
+ "name": "generateEcdhKeyPair",
2453
+ "declaration": {
2454
+ "name": "generateEcdhKeyPair",
2455
+ "module": "sdk/handoff.js"
2456
+ }
2457
+ },
2458
+ {
2459
+ "kind": "js",
2460
+ "name": "exportPublicKey",
2461
+ "declaration": {
2462
+ "name": "exportPublicKey",
2463
+ "module": "sdk/handoff.js"
2464
+ }
2465
+ },
2466
+ {
2467
+ "kind": "js",
2468
+ "name": "importPublicKey",
2469
+ "declaration": {
2470
+ "name": "importPublicKey",
2471
+ "module": "sdk/handoff.js"
2472
+ }
2473
+ },
2474
+ {
2475
+ "kind": "js",
2476
+ "name": "deriveSharedKey",
2477
+ "declaration": {
2478
+ "name": "deriveSharedKey",
2479
+ "module": "sdk/handoff.js"
2480
+ }
2481
+ },
2482
+ {
2483
+ "kind": "js",
2484
+ "name": "encryptPayload",
2485
+ "declaration": {
2486
+ "name": "encryptPayload",
2487
+ "module": "sdk/handoff.js"
2488
+ }
2489
+ },
2490
+ {
2491
+ "kind": "js",
2492
+ "name": "decryptPayload",
2493
+ "declaration": {
2494
+ "name": "decryptPayload",
2495
+ "module": "sdk/handoff.js"
2496
+ }
2497
+ }
2498
+ ]
2499
+ },
2500
+ {
2501
+ "kind": "javascript-module",
2502
+ "path": "sdk/index.js",
2503
+ "declarations": [],
2504
+ "exports": [
2505
+ {
2506
+ "kind": "js",
2507
+ "name": "CopioScanner",
2508
+ "declaration": {
2509
+ "name": "CopioScanner",
2510
+ "module": "./scanner.js"
2511
+ }
2512
+ },
2513
+ {
2514
+ "kind": "js",
2515
+ "name": "scannerCss",
2516
+ "declaration": {
2517
+ "name": "scannerCss",
2518
+ "module": "./scanner.js"
2519
+ }
2520
+ },
2521
+ {
2522
+ "kind": "js",
2523
+ "name": "getScannerStyleSheet",
2524
+ "declaration": {
2525
+ "name": "getScannerStyleSheet",
2526
+ "module": "./scanner.js"
2527
+ }
2528
+ },
2529
+ {
2530
+ "kind": "js",
2531
+ "name": "adoptScannerStyles",
2532
+ "declaration": {
2533
+ "name": "adoptScannerStyles",
2534
+ "module": "./scanner.js"
2535
+ }
2536
+ },
2537
+ {
2538
+ "kind": "js",
2539
+ "name": "CopioHandoff",
2540
+ "declaration": {
2541
+ "name": "CopioHandoff",
2542
+ "module": "./handoff.js"
2543
+ }
2544
+ },
2545
+ {
2546
+ "kind": "js",
2547
+ "name": "handoffCss",
2548
+ "declaration": {
2549
+ "name": "handoffCss",
2550
+ "module": "./handoff.js"
2551
+ }
2552
+ },
2553
+ {
2554
+ "kind": "js",
2555
+ "name": "getHandoffStyleSheet",
2556
+ "declaration": {
2557
+ "name": "getHandoffStyleSheet",
2558
+ "module": "./handoff.js"
2559
+ }
2560
+ },
2561
+ {
2562
+ "kind": "js",
2563
+ "name": "adoptHandoffStyles",
2564
+ "declaration": {
2565
+ "name": "adoptHandoffStyles",
2566
+ "module": "./handoff.js"
2567
+ }
2568
+ },
2569
+ {
2570
+ "kind": "js",
2571
+ "name": "CopioDocOcrDialog",
2572
+ "declaration": {
2573
+ "name": "CopioDocOcrDialog",
2574
+ "module": "../js/routes/ocr/copio-doc-ocr-dialog.js"
2575
+ }
2576
+ },
2577
+ {
2578
+ "kind": "js",
2579
+ "name": "CopioSyncDialog",
2580
+ "declaration": {
2581
+ "name": "CopioSyncDialog",
2582
+ "module": "../js/routes/sync/copio-sync-dialog.js"
2583
+ }
2584
+ },
2585
+ {
2586
+ "kind": "js",
2587
+ "name": "CopioEngine",
2588
+ "declaration": {
2589
+ "name": "CopioEngine",
2590
+ "module": "./core.js"
2591
+ }
2592
+ },
2593
+ {
2594
+ "kind": "js",
2595
+ "name": "COPIO_EVENTS",
2596
+ "declaration": {
2597
+ "name": "COPIO_EVENTS",
2598
+ "module": "./events.js"
2599
+ }
2600
+ },
2601
+ {
2602
+ "kind": "js",
2603
+ "name": "dispatchCopioEvent",
2604
+ "declaration": {
2605
+ "name": "dispatchCopioEvent",
2606
+ "module": "./events.js"
2607
+ }
2608
+ },
2609
+ {
2610
+ "kind": "js",
2611
+ "name": "LicenseManager",
2612
+ "declaration": {
2613
+ "name": "LicenseManager",
2614
+ "module": "./license.js"
2615
+ }
2616
+ },
2617
+ {
2618
+ "kind": "js",
2619
+ "name": "BUILD_DATE",
2620
+ "declaration": {
2621
+ "name": "BUILD_DATE",
2622
+ "module": "./version.js"
2623
+ }
2624
+ },
2625
+ {
2626
+ "kind": "js",
2627
+ "name": "VERSION",
2628
+ "declaration": {
2629
+ "name": "VERSION",
2630
+ "module": "./version.js"
2631
+ }
2632
+ },
2633
+ {
2634
+ "kind": "js",
2635
+ "name": "recognizeImageText",
2636
+ "declaration": {
2637
+ "name": "recognizeImageText",
2638
+ "module": "../js/services/ocr-service.js"
2639
+ }
2640
+ },
2641
+ {
2642
+ "kind": "js",
2643
+ "name": "recognizeDocumentPages",
2644
+ "declaration": {
2645
+ "name": "recognizeDocumentPages",
2646
+ "module": "../js/services/ocr-service.js"
2647
+ }
2648
+ },
2649
+ {
2650
+ "kind": "js",
2651
+ "name": "getOcrWorker",
2652
+ "declaration": {
2653
+ "name": "getOcrWorker",
2654
+ "module": "../js/services/ocr-service.js"
2655
+ }
2656
+ },
2657
+ {
2658
+ "kind": "js",
2659
+ "name": "terminateOcrWorker",
2660
+ "declaration": {
2661
+ "name": "terminateOcrWorker",
2662
+ "module": "../js/services/ocr-service.js"
2663
+ }
2664
+ },
2665
+ {
2666
+ "kind": "js",
2667
+ "name": "SUPPORTED_LANGUAGES",
2668
+ "declaration": {
2669
+ "name": "SUPPORTED_LANGUAGES",
1441
2670
  "module": "../js/services/ocr-service.js"
1442
2671
  }
1443
2672
  },
@@ -1449,6 +2678,62 @@
1449
2678
  "module": "../js/services/sync-service.js"
1450
2679
  }
1451
2680
  },
2681
+ {
2682
+ "kind": "js",
2683
+ "name": "HandoffSession",
2684
+ "declaration": {
2685
+ "name": "HandoffSession",
2686
+ "module": "./handoff-session.js"
2687
+ }
2688
+ },
2689
+ {
2690
+ "kind": "js",
2691
+ "name": "LoopbackTransport",
2692
+ "declaration": {
2693
+ "name": "LoopbackTransport",
2694
+ "module": "./handoff-session.js"
2695
+ }
2696
+ },
2697
+ {
2698
+ "kind": "js",
2699
+ "name": "randomHandoffId",
2700
+ "declaration": {
2701
+ "name": "randomHandoffId",
2702
+ "module": "./handoff-session.js"
2703
+ }
2704
+ },
2705
+ {
2706
+ "kind": "js",
2707
+ "name": "encodeSessionToken",
2708
+ "declaration": {
2709
+ "name": "encodeSessionToken",
2710
+ "module": "./handoff-session.js"
2711
+ }
2712
+ },
2713
+ {
2714
+ "kind": "js",
2715
+ "name": "decodeSessionToken",
2716
+ "declaration": {
2717
+ "name": "decodeSessionToken",
2718
+ "module": "./handoff-session.js"
2719
+ }
2720
+ },
2721
+ {
2722
+ "kind": "js",
2723
+ "name": "buildHandoffUrl",
2724
+ "declaration": {
2725
+ "name": "buildHandoffUrl",
2726
+ "module": "./handoff-session.js"
2727
+ }
2728
+ },
2729
+ {
2730
+ "kind": "js",
2731
+ "name": "parseHandoffUrl",
2732
+ "declaration": {
2733
+ "name": "parseHandoffUrl",
2734
+ "module": "./handoff-session.js"
2735
+ }
2736
+ },
1452
2737
  {
1453
2738
  "kind": "js",
1454
2739
  "name": "exportDocumentAsPdf",
@@ -1649,6 +2934,30 @@
1649
2934
  "module": "../js/services/doc-repository.js"
1650
2935
  }
1651
2936
  },
2937
+ {
2938
+ "kind": "js",
2939
+ "name": "MigrationRunner",
2940
+ "declaration": {
2941
+ "name": "MigrationRunner",
2942
+ "module": "../js/services/migration-runner.js"
2943
+ }
2944
+ },
2945
+ {
2946
+ "kind": "js",
2947
+ "name": "CURRENT_SCHEMA_VERSION",
2948
+ "declaration": {
2949
+ "name": "CURRENT_SCHEMA_VERSION",
2950
+ "module": "../js/services/migration-runner.js"
2951
+ }
2952
+ },
2953
+ {
2954
+ "kind": "js",
2955
+ "name": "DEFAULT_MIGRATIONS",
2956
+ "declaration": {
2957
+ "name": "DEFAULT_MIGRATIONS",
2958
+ "module": "../js/services/migration-runner.js"
2959
+ }
2960
+ },
1652
2961
  {
1653
2962
  "kind": "js",
1654
2963
  "name": "StoragePort",
@@ -1789,39 +3098,127 @@
1789
3098
  "kind": "js",
1790
3099
  "name": "NullSyncAdapter",
1791
3100
  "declaration": {
1792
- "name": "NullSyncAdapter",
1793
- "module": "../js/adapters/sync/index.js"
3101
+ "name": "NullSyncAdapter",
3102
+ "module": "../js/adapters/sync/index.js"
3103
+ }
3104
+ },
3105
+ {
3106
+ "kind": "js",
3107
+ "name": "EdgeDetectorPort",
3108
+ "declaration": {
3109
+ "name": "EdgeDetectorPort",
3110
+ "module": "../js/adapters/edge/index.js"
3111
+ }
3112
+ },
3113
+ {
3114
+ "kind": "js",
3115
+ "name": "DEFAULT_FALLBACK_QUAD",
3116
+ "declaration": {
3117
+ "name": "DEFAULT_FALLBACK_QUAD",
3118
+ "module": "../js/adapters/edge/index.js"
3119
+ }
3120
+ },
3121
+ {
3122
+ "kind": "js",
3123
+ "name": "cloneQuad",
3124
+ "declaration": {
3125
+ "name": "cloneQuad",
3126
+ "module": "../js/adapters/edge/index.js"
3127
+ }
3128
+ },
3129
+ {
3130
+ "kind": "js",
3131
+ "name": "quadToCropRect",
3132
+ "declaration": {
3133
+ "name": "quadToCropRect",
3134
+ "module": "../js/adapters/edge/index.js"
3135
+ }
3136
+ },
3137
+ {
3138
+ "kind": "js",
3139
+ "name": "NullEdgeDetectorAdapter",
3140
+ "declaration": {
3141
+ "name": "NullEdgeDetectorAdapter",
3142
+ "module": "../js/adapters/edge/index.js"
3143
+ }
3144
+ },
3145
+ {
3146
+ "kind": "js",
3147
+ "name": "ScanicWasmEdgeAdapter",
3148
+ "declaration": {
3149
+ "name": "ScanicWasmEdgeAdapter",
3150
+ "module": "../js/adapters/edge/index.js"
3151
+ }
3152
+ },
3153
+ {
3154
+ "kind": "js",
3155
+ "name": "Document",
3156
+ "declaration": {
3157
+ "name": "Document",
3158
+ "module": "./models.js"
3159
+ }
3160
+ },
3161
+ {
3162
+ "kind": "js",
3163
+ "name": "Page",
3164
+ "declaration": {
3165
+ "name": "Page",
3166
+ "module": "./models.js"
3167
+ }
3168
+ },
3169
+ {
3170
+ "kind": "js",
3171
+ "name": "ScanSession",
3172
+ "declaration": {
3173
+ "name": "ScanSession",
3174
+ "module": "./models.js"
3175
+ }
3176
+ },
3177
+ {
3178
+ "kind": "js",
3179
+ "name": "normalizeEditStack",
3180
+ "declaration": {
3181
+ "name": "normalizeEditStack",
3182
+ "module": "./models.js"
3183
+ }
3184
+ },
3185
+ {
3186
+ "kind": "js",
3187
+ "name": "normalizeQuad",
3188
+ "declaration": {
3189
+ "name": "normalizeQuad",
3190
+ "module": "./models.js"
1794
3191
  }
1795
3192
  },
1796
3193
  {
1797
3194
  "kind": "js",
1798
- "name": "Document",
3195
+ "name": "cropRectToQuad",
1799
3196
  "declaration": {
1800
- "name": "Document",
3197
+ "name": "cropRectToQuad",
1801
3198
  "module": "./models.js"
1802
3199
  }
1803
3200
  },
1804
3201
  {
1805
3202
  "kind": "js",
1806
- "name": "Page",
3203
+ "name": "rotateQuad",
1807
3204
  "declaration": {
1808
- "name": "Page",
3205
+ "name": "rotateQuad",
1809
3206
  "module": "./models.js"
1810
3207
  }
1811
3208
  },
1812
3209
  {
1813
3210
  "kind": "js",
1814
- "name": "ScanSession",
3211
+ "name": "quadOriginalToRotated",
1815
3212
  "declaration": {
1816
- "name": "ScanSession",
3213
+ "name": "quadOriginalToRotated",
1817
3214
  "module": "./models.js"
1818
3215
  }
1819
3216
  },
1820
3217
  {
1821
3218
  "kind": "js",
1822
- "name": "normalizeEditStack",
3219
+ "name": "quadRotatedToOriginal",
1823
3220
  "declaration": {
1824
- "name": "normalizeEditStack",
3221
+ "name": "quadRotatedToOriginal",
1825
3222
  "module": "./models.js"
1826
3223
  }
1827
3224
  },
@@ -1904,6 +3301,42 @@
1904
3301
  "kind": "javascript-module",
1905
3302
  "path": "sdk/models.js",
1906
3303
  "declarations": [
3304
+ {
3305
+ "kind": "function",
3306
+ "name": "normalizeQuad",
3307
+ "parameters": [
3308
+ {
3309
+ "name": "quad",
3310
+ "type": {
3311
+ "text": "Object|null|undefined"
3312
+ }
3313
+ }
3314
+ ],
3315
+ "description": "Normalizes a 4-corner quadrilateral to clamped [0, 1] coordinates.",
3316
+ "return": {
3317
+ "type": {
3318
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3319
+ }
3320
+ }
3321
+ },
3322
+ {
3323
+ "kind": "function",
3324
+ "name": "cropRectToQuad",
3325
+ "parameters": [
3326
+ {
3327
+ "name": "crop",
3328
+ "type": {
3329
+ "text": "{ x: number, y: number, w: number, h: number } | null"
3330
+ }
3331
+ }
3332
+ ],
3333
+ "description": "Converts a normalized { x, y, w, h } rectangle to a 4-corner quadrilateral.",
3334
+ "return": {
3335
+ "type": {
3336
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3337
+ }
3338
+ }
3339
+ },
1907
3340
  {
1908
3341
  "kind": "function",
1909
3342
  "name": "normalizeEditStack",
@@ -1920,7 +3353,7 @@
1920
3353
  "description": "Normalizes an edit stack object with safe defaults.",
1921
3354
  "return": {
1922
3355
  "type": {
1923
- "text": "{ crop: { x: number, y: number, w: number, h: number } | null, rotate: 0|90|180|270, filter: 'none'|'bw' }"
3356
+ "text": "{ crop: { x: number, y: number, w: number, h: number } | null, quad: { topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null, rotate: 0|90|180|270, filter: 'none'|'bw' }"
1924
3357
  }
1925
3358
  }
1926
3359
  },
@@ -2022,6 +3455,84 @@
2022
3455
  }
2023
3456
  }
2024
3457
  },
3458
+ {
3459
+ "kind": "function",
3460
+ "name": "rotateQuad",
3461
+ "parameters": [
3462
+ {
3463
+ "name": "quad",
3464
+ "type": {
3465
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3466
+ }
3467
+ },
3468
+ {
3469
+ "name": "rotation",
3470
+ "default": "0",
3471
+ "optional": true,
3472
+ "type": {
3473
+ "text": "number"
3474
+ }
3475
+ }
3476
+ ],
3477
+ "description": "Transforms normalized quadrilateral coordinates through a clockwise rotation angle (0, 90, 180, 270),\nremapping corner keys so topLeft/topRight/bottomRight/bottomLeft stay in canonical order.",
3478
+ "return": {
3479
+ "type": {
3480
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3481
+ }
3482
+ }
3483
+ },
3484
+ {
3485
+ "kind": "function",
3486
+ "name": "quadOriginalToRotated",
3487
+ "parameters": [
3488
+ {
3489
+ "name": "quad",
3490
+ "type": {
3491
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3492
+ }
3493
+ },
3494
+ {
3495
+ "name": "rotation",
3496
+ "default": "0",
3497
+ "optional": true,
3498
+ "type": {
3499
+ "text": "number"
3500
+ }
3501
+ }
3502
+ ],
3503
+ "description": "Maps normalized quad coordinates on an original unrotated image to a rotated canvas coordinate frame.",
3504
+ "return": {
3505
+ "type": {
3506
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3507
+ }
3508
+ }
3509
+ },
3510
+ {
3511
+ "kind": "function",
3512
+ "name": "quadRotatedToOriginal",
3513
+ "parameters": [
3514
+ {
3515
+ "name": "quad",
3516
+ "type": {
3517
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3518
+ }
3519
+ },
3520
+ {
3521
+ "name": "rotation",
3522
+ "default": "0",
3523
+ "optional": true,
3524
+ "type": {
3525
+ "text": "number"
3526
+ }
3527
+ }
3528
+ ],
3529
+ "description": "Maps normalized quad coordinates on a rotated canvas back to original unrotated image coordinates.",
3530
+ "return": {
3531
+ "type": {
3532
+ "text": "{ topLeft: { x: number, y: number }, topRight: { x: number, y: number }, bottomRight: { x: number, y: number }, bottomLeft: { x: number, y: number } } | null"
3533
+ }
3534
+ }
3535
+ },
2025
3536
  {
2026
3537
  "kind": "class",
2027
3538
  "description": "Page domain entity.",
@@ -2196,6 +3707,22 @@
2196
3707
  }
2197
3708
  ],
2198
3709
  "exports": [
3710
+ {
3711
+ "kind": "js",
3712
+ "name": "normalizeQuad",
3713
+ "declaration": {
3714
+ "name": "normalizeQuad",
3715
+ "module": "sdk/models.js"
3716
+ }
3717
+ },
3718
+ {
3719
+ "kind": "js",
3720
+ "name": "cropRectToQuad",
3721
+ "declaration": {
3722
+ "name": "cropRectToQuad",
3723
+ "module": "sdk/models.js"
3724
+ }
3725
+ },
2199
3726
  {
2200
3727
  "kind": "js",
2201
3728
  "name": "normalizeEditStack",
@@ -2236,6 +3763,30 @@
2236
3763
  "module": "sdk/models.js"
2237
3764
  }
2238
3765
  },
3766
+ {
3767
+ "kind": "js",
3768
+ "name": "rotateQuad",
3769
+ "declaration": {
3770
+ "name": "rotateQuad",
3771
+ "module": "sdk/models.js"
3772
+ }
3773
+ },
3774
+ {
3775
+ "kind": "js",
3776
+ "name": "quadOriginalToRotated",
3777
+ "declaration": {
3778
+ "name": "quadOriginalToRotated",
3779
+ "module": "sdk/models.js"
3780
+ }
3781
+ },
3782
+ {
3783
+ "kind": "js",
3784
+ "name": "quadRotatedToOriginal",
3785
+ "declaration": {
3786
+ "name": "quadRotatedToOriginal",
3787
+ "module": "sdk/models.js"
3788
+ }
3789
+ },
2239
3790
  {
2240
3791
  "kind": "js",
2241
3792
  "name": "Page",
@@ -2273,7 +3824,133 @@
2273
3824
  "members": [
2274
3825
  {
2275
3826
  "kind": "field",
2276
- "name": "#engine",
3827
+ "name": "#engine",
3828
+ "privacy": "private",
3829
+ "type": {
3830
+ "text": "null"
3831
+ },
3832
+ "default": "null"
3833
+ },
3834
+ {
3835
+ "kind": "field",
3836
+ "name": "#storage",
3837
+ "privacy": "private",
3838
+ "type": {
3839
+ "text": "null"
3840
+ },
3841
+ "default": "null"
3842
+ },
3843
+ {
3844
+ "kind": "field",
3845
+ "name": "#unsubscribeRepo",
3846
+ "privacy": "private",
3847
+ "type": {
3848
+ "text": "null"
3849
+ },
3850
+ "default": "null"
3851
+ },
3852
+ {
3853
+ "kind": "field",
3854
+ "name": "#isOpen",
3855
+ "privacy": "private",
3856
+ "type": {
3857
+ "text": "boolean"
3858
+ },
3859
+ "default": "false"
3860
+ },
3861
+ {
3862
+ "kind": "field",
3863
+ "name": "#stage",
3864
+ "privacy": "private",
3865
+ "type": {
3866
+ "text": "string"
3867
+ },
3868
+ "default": "'viewfinder'"
3869
+ },
3870
+ {
3871
+ "kind": "field",
3872
+ "name": "#activePageIndex",
3873
+ "privacy": "private",
3874
+ "type": {
3875
+ "text": "number"
3876
+ },
3877
+ "default": "0"
3878
+ },
3879
+ {
3880
+ "kind": "field",
3881
+ "name": "#pageCount",
3882
+ "privacy": "private",
3883
+ "type": {
3884
+ "text": "number"
3885
+ },
3886
+ "default": "0"
3887
+ },
3888
+ {
3889
+ "kind": "field",
3890
+ "name": "#retaking",
3891
+ "privacy": "private",
3892
+ "type": {
3893
+ "text": "boolean"
3894
+ },
3895
+ "default": "false"
3896
+ },
3897
+ {
3898
+ "kind": "field",
3899
+ "name": "#cropMode",
3900
+ "privacy": "private",
3901
+ "type": {
3902
+ "text": "boolean"
3903
+ },
3904
+ "default": "false"
3905
+ },
3906
+ {
3907
+ "kind": "field",
3908
+ "name": "#draftQuad",
3909
+ "privacy": "private",
3910
+ "type": {
3911
+ "text": "null"
3912
+ },
3913
+ "default": "null"
3914
+ },
3915
+ {
3916
+ "kind": "field",
3917
+ "name": "#undoTimer",
3918
+ "privacy": "private",
3919
+ "type": {
3920
+ "text": "null"
3921
+ },
3922
+ "default": "null"
3923
+ },
3924
+ {
3925
+ "kind": "field",
3926
+ "name": "#undoRemaining",
3927
+ "privacy": "private",
3928
+ "type": {
3929
+ "text": "number"
3930
+ },
3931
+ "default": "0"
3932
+ },
3933
+ {
3934
+ "kind": "field",
3935
+ "name": "#renderPromise",
3936
+ "privacy": "private",
3937
+ "type": {
3938
+ "text": "null"
3939
+ },
3940
+ "default": "null"
3941
+ },
3942
+ {
3943
+ "kind": "field",
3944
+ "name": "#sessionDocId",
3945
+ "privacy": "private",
3946
+ "type": {
3947
+ "text": "null"
3948
+ },
3949
+ "default": "null"
3950
+ },
3951
+ {
3952
+ "kind": "field",
3953
+ "name": "#cameraStream",
2277
3954
  "privacy": "private",
2278
3955
  "type": {
2279
3956
  "text": "null"
@@ -2282,16 +3959,16 @@
2282
3959
  },
2283
3960
  {
2284
3961
  "kind": "field",
2285
- "name": "#storage",
3962
+ "name": "#wasStreamingBeforeHide",
2286
3963
  "privacy": "private",
2287
3964
  "type": {
2288
- "text": "null"
3965
+ "text": "boolean"
2289
3966
  },
2290
- "default": "null"
3967
+ "default": "false"
2291
3968
  },
2292
3969
  {
2293
3970
  "kind": "field",
2294
- "name": "#unsubscribeRepo",
3971
+ "name": "#grabCanvas",
2295
3972
  "privacy": "private",
2296
3973
  "type": {
2297
3974
  "text": "null"
@@ -2300,52 +3977,52 @@
2300
3977
  },
2301
3978
  {
2302
3979
  "kind": "field",
2303
- "name": "#isOpen",
3980
+ "name": "#edgeDetection",
2304
3981
  "privacy": "private",
2305
3982
  "type": {
2306
3983
  "text": "boolean"
2307
3984
  },
2308
- "default": "false"
3985
+ "default": "true"
2309
3986
  },
2310
3987
  {
2311
3988
  "kind": "field",
2312
- "name": "#stage",
3989
+ "name": "#edgeModel",
2313
3990
  "privacy": "private",
2314
3991
  "type": {
2315
3992
  "text": "string"
2316
3993
  },
2317
- "default": "'viewfinder'"
3994
+ "default": "'ml'"
2318
3995
  },
2319
3996
  {
2320
3997
  "kind": "field",
2321
- "name": "#activePageIndex",
3998
+ "name": "#autoCrop",
2322
3999
  "privacy": "private",
2323
4000
  "type": {
2324
- "text": "number"
4001
+ "text": "boolean"
2325
4002
  },
2326
- "default": "0"
4003
+ "default": "true"
2327
4004
  },
2328
4005
  {
2329
4006
  "kind": "field",
2330
- "name": "#pageCount",
4007
+ "name": "#autoCapture",
2331
4008
  "privacy": "private",
2332
4009
  "type": {
2333
- "text": "number"
4010
+ "text": "boolean"
2334
4011
  },
2335
- "default": "0"
4012
+ "default": "false"
2336
4013
  },
2337
4014
  {
2338
4015
  "kind": "field",
2339
- "name": "#retaking",
4016
+ "name": "#liveEdgeRafId",
2340
4017
  "privacy": "private",
2341
4018
  "type": {
2342
- "text": "boolean"
4019
+ "text": "null"
2343
4020
  },
2344
- "default": "false"
4021
+ "default": "null"
2345
4022
  },
2346
4023
  {
2347
4024
  "kind": "field",
2348
- "name": "#cropMode",
4025
+ "name": "#isDetectingEdge",
2349
4026
  "privacy": "private",
2350
4027
  "type": {
2351
4028
  "text": "boolean"
@@ -2354,7 +4031,16 @@
2354
4031
  },
2355
4032
  {
2356
4033
  "kind": "field",
2357
- "name": "#draftCrop",
4034
+ "name": "#lastEdgeDetectTime",
4035
+ "privacy": "private",
4036
+ "type": {
4037
+ "text": "number"
4038
+ },
4039
+ "default": "0"
4040
+ },
4041
+ {
4042
+ "kind": "field",
4043
+ "name": "#smoothedQuad",
2358
4044
  "privacy": "private",
2359
4045
  "type": {
2360
4046
  "text": "null"
@@ -2363,7 +4049,7 @@
2363
4049
  },
2364
4050
  {
2365
4051
  "kind": "field",
2366
- "name": "#undoTimer",
4052
+ "name": "#latestDetectionResult",
2367
4053
  "privacy": "private",
2368
4054
  "type": {
2369
4055
  "text": "null"
@@ -2372,7 +4058,7 @@
2372
4058
  },
2373
4059
  {
2374
4060
  "kind": "field",
2375
- "name": "#undoRemaining",
4061
+ "name": "#consecutiveMisses",
2376
4062
  "privacy": "private",
2377
4063
  "type": {
2378
4064
  "text": "number"
@@ -2381,7 +4067,25 @@
2381
4067
  },
2382
4068
  {
2383
4069
  "kind": "field",
2384
- "name": "#renderPromise",
4070
+ "name": "#lastValidDetectionTime",
4071
+ "privacy": "private",
4072
+ "type": {
4073
+ "text": "number"
4074
+ },
4075
+ "default": "0"
4076
+ },
4077
+ {
4078
+ "kind": "field",
4079
+ "name": "#stableQuadStartTime",
4080
+ "privacy": "private",
4081
+ "type": {
4082
+ "text": "number"
4083
+ },
4084
+ "default": "0"
4085
+ },
4086
+ {
4087
+ "kind": "field",
4088
+ "name": "#lastStableQuad",
2385
4089
  "privacy": "private",
2386
4090
  "type": {
2387
4091
  "text": "null"
@@ -2390,7 +4094,7 @@
2390
4094
  },
2391
4095
  {
2392
4096
  "kind": "field",
2393
- "name": "#sessionDocId",
4097
+ "name": "#handoffSession",
2394
4098
  "privacy": "private",
2395
4099
  "type": {
2396
4100
  "text": "null"
@@ -2399,139 +4103,468 @@
2399
4103
  },
2400
4104
  {
2401
4105
  "kind": "field",
2402
- "name": "#cameraStream",
4106
+ "name": "#handoffToken",
4107
+ "privacy": "private",
4108
+ "type": {
4109
+ "text": "null"
4110
+ },
4111
+ "default": "null"
4112
+ },
4113
+ {
4114
+ "kind": "field",
4115
+ "name": "#handoffState",
4116
+ "privacy": "private",
4117
+ "type": {
4118
+ "text": "string"
4119
+ },
4120
+ "default": "'idle'"
4121
+ },
4122
+ {
4123
+ "kind": "field",
4124
+ "name": "#handoffUnsubs",
4125
+ "privacy": "private",
4126
+ "type": {
4127
+ "text": "array"
4128
+ },
4129
+ "default": "[]"
4130
+ },
4131
+ {
4132
+ "kind": "field",
4133
+ "name": "#handoffProgress",
4134
+ "privacy": "private",
4135
+ "type": {
4136
+ "text": "null"
4137
+ },
4138
+ "default": "null"
4139
+ },
4140
+ {
4141
+ "kind": "field",
4142
+ "name": "#handoffRetryCount",
2403
4143
  "privacy": "private",
4144
+ "type": {
4145
+ "text": "number"
4146
+ },
4147
+ "default": "0"
4148
+ },
4149
+ {
4150
+ "kind": "field",
4151
+ "name": "onShutter",
2404
4152
  "type": {
2405
4153
  "text": "null"
2406
4154
  },
2407
4155
  "default": "null"
2408
4156
  },
2409
4157
  {
2410
- "kind": "field",
2411
- "name": "onShutter",
2412
- "type": {
2413
- "text": "null"
2414
- },
2415
- "default": "null"
4158
+ "kind": "field",
4159
+ "name": "#targetDocId",
4160
+ "privacy": "private",
4161
+ "readonly": true
4162
+ },
4163
+ {
4164
+ "kind": "method",
4165
+ "name": "#initEngine",
4166
+ "privacy": "private"
4167
+ },
4168
+ {
4169
+ "kind": "field",
4170
+ "name": "#onVisibilityChange",
4171
+ "privacy": "private"
4172
+ },
4173
+ {
4174
+ "kind": "field",
4175
+ "name": "#onPageHide",
4176
+ "privacy": "private"
4177
+ },
4178
+ {
4179
+ "kind": "method",
4180
+ "name": "#updateChildViews",
4181
+ "privacy": "private"
4182
+ },
4183
+ {
4184
+ "kind": "method",
4185
+ "name": "#buildInitialDom",
4186
+ "privacy": "private"
4187
+ },
4188
+ {
4189
+ "kind": "method",
4190
+ "name": "#bindEventListeners",
4191
+ "privacy": "private"
4192
+ },
4193
+ {
4194
+ "kind": "method",
4195
+ "name": "#bindCropHandles",
4196
+ "privacy": "private"
4197
+ },
4198
+ {
4199
+ "kind": "method",
4200
+ "name": "#updateCropBoxUi",
4201
+ "privacy": "private"
4202
+ },
4203
+ {
4204
+ "kind": "method",
4205
+ "name": "#syncView",
4206
+ "privacy": "private"
4207
+ },
4208
+ {
4209
+ "kind": "method",
4210
+ "name": "#doSyncView",
4211
+ "privacy": "private"
4212
+ },
4213
+ {
4214
+ "kind": "method",
4215
+ "name": "#renderFilmstrip",
4216
+ "privacy": "private",
4217
+ "parameters": [
4218
+ {
4219
+ "name": "pages"
4220
+ }
4221
+ ]
4222
+ },
4223
+ {
4224
+ "kind": "method",
4225
+ "name": "#movePage",
4226
+ "privacy": "private",
4227
+ "parameters": [
4228
+ {
4229
+ "name": "fromIdx"
4230
+ },
4231
+ {
4232
+ "name": "toIdx"
4233
+ }
4234
+ ]
4235
+ },
4236
+ {
4237
+ "kind": "method",
4238
+ "name": "#showToast",
4239
+ "privacy": "private",
4240
+ "parameters": [
4241
+ {
4242
+ "name": "message"
4243
+ },
4244
+ {
4245
+ "name": "variant",
4246
+ "default": "'warning'"
4247
+ },
4248
+ {
4249
+ "name": "duration",
4250
+ "default": "4000"
4251
+ }
4252
+ ]
4253
+ },
4254
+ {
4255
+ "kind": "method",
4256
+ "name": "#handleCameraFailure",
4257
+ "privacy": "private",
4258
+ "parameters": [
4259
+ {
4260
+ "name": "error"
4261
+ },
4262
+ {
4263
+ "name": "message"
4264
+ }
4265
+ ]
4266
+ },
4267
+ {
4268
+ "kind": "method",
4269
+ "name": "#stopCameraStream",
4270
+ "privacy": "private"
4271
+ },
4272
+ {
4273
+ "kind": "method",
4274
+ "name": "startCamera",
4275
+ "parameters": [
4276
+ {
4277
+ "name": "options",
4278
+ "default": "{}"
4279
+ }
4280
+ ]
4281
+ },
4282
+ {
4283
+ "kind": "method",
4284
+ "name": "stopCamera"
4285
+ },
4286
+ {
4287
+ "kind": "method",
4288
+ "name": "_grabFrame",
4289
+ "parameters": [
4290
+ {
4291
+ "name": "options",
4292
+ "default": "{}",
4293
+ "optional": true,
4294
+ "type": {
4295
+ "text": "@param {number} [options.maxWidth=640] - Downscale max width for lightweight processing\n * @param {number} [options.maxHeight=480] - Downscale max height for lightweight processing\n * @param {'imageData'|'canvas'} [options.format='imageData']\n * "
4296
+ }
4297
+ }
4298
+ ],
4299
+ "description": "Internal hook for auto edge detection (CPO-074 / CPO-076).\nGrabs the current frame from the active camera video element as an ImageData or Canvas.\nNot exposed in the stable public API docs.",
4300
+ "return": {
4301
+ "type": {
4302
+ "text": "ImageData|HTMLCanvasElement|null"
4303
+ }
4304
+ }
4305
+ },
4306
+ {
4307
+ "kind": "method",
4308
+ "name": "_isCameraActive",
4309
+ "description": "Internal inspection helper for test suites and adapter readiness.",
4310
+ "return": {
4311
+ "type": {
4312
+ "text": "boolean"
4313
+ }
4314
+ }
4315
+ },
4316
+ {
4317
+ "kind": "method",
4318
+ "name": "#startLiveEdgeDetection",
4319
+ "privacy": "private"
4320
+ },
4321
+ {
4322
+ "kind": "method",
4323
+ "name": "#stopLiveEdgeDetection",
4324
+ "privacy": "private"
4325
+ },
4326
+ {
4327
+ "kind": "method",
4328
+ "name": "#hideLiveQuadOverlay",
4329
+ "privacy": "private"
4330
+ },
4331
+ {
4332
+ "kind": "method",
4333
+ "name": "#renderLiveQuadOverlay",
4334
+ "privacy": "private",
4335
+ "parameters": [
4336
+ {
4337
+ "name": "quad"
4338
+ },
4339
+ {
4340
+ "name": "confidence"
4341
+ }
4342
+ ]
4343
+ },
4344
+ {
4345
+ "kind": "method",
4346
+ "name": "#processLiveViewfinderFrame",
4347
+ "privacy": "private",
4348
+ "parameters": [
4349
+ {
4350
+ "name": "timestamp"
4351
+ }
4352
+ ]
2416
4353
  },
2417
4354
  {
2418
- "kind": "field",
2419
- "name": "#targetDocId",
4355
+ "kind": "method",
4356
+ "name": "#checkSmartShutter",
2420
4357
  "privacy": "private",
2421
- "readonly": true
4358
+ "parameters": [
4359
+ {
4360
+ "name": "quad"
4361
+ },
4362
+ {
4363
+ "name": "timestamp"
4364
+ }
4365
+ ]
2422
4366
  },
2423
4367
  {
2424
4368
  "kind": "method",
2425
- "name": "#initEngine",
4369
+ "name": "#handleShutterClick",
2426
4370
  "privacy": "private"
2427
4371
  },
2428
4372
  {
2429
4373
  "kind": "method",
2430
- "name": "#updateChildViews",
4374
+ "name": "#rotateActivePage",
2431
4375
  "privacy": "private"
2432
4376
  },
2433
4377
  {
2434
4378
  "kind": "method",
2435
- "name": "#buildInitialDom",
4379
+ "name": "#toggleActivePageBw",
2436
4380
  "privacy": "private"
2437
4381
  },
2438
4382
  {
2439
4383
  "kind": "method",
2440
- "name": "#bindEventListeners",
4384
+ "name": "#toggleCropMode",
2441
4385
  "privacy": "private"
2442
4386
  },
2443
4387
  {
2444
4388
  "kind": "method",
2445
- "name": "#bindCropHandles",
4389
+ "name": "#deleteActivePageWithUndo",
2446
4390
  "privacy": "private"
2447
4391
  },
2448
4392
  {
2449
4393
  "kind": "method",
2450
- "name": "#updateCropBoxUi",
4394
+ "name": "#showUndoToast",
2451
4395
  "privacy": "private"
2452
4396
  },
2453
4397
  {
2454
4398
  "kind": "method",
2455
- "name": "#syncView",
4399
+ "name": "#openOcrSheet",
2456
4400
  "privacy": "private"
2457
4401
  },
2458
4402
  {
2459
4403
  "kind": "method",
2460
- "name": "#doSyncView",
4404
+ "name": "#closeOcrSheet",
2461
4405
  "privacy": "private"
2462
4406
  },
2463
4407
  {
2464
4408
  "kind": "method",
2465
- "name": "#renderFilmstrip",
2466
- "privacy": "private",
4409
+ "name": "#handlePrimaryCtaClick",
4410
+ "privacy": "private"
4411
+ },
4412
+ {
4413
+ "kind": "method",
4414
+ "name": "completeScan"
4415
+ },
4416
+ {
4417
+ "kind": "field",
4418
+ "name": "handoff",
4419
+ "return": {
4420
+ "type": {
4421
+ "text": "string|null"
4422
+ }
4423
+ },
2467
4424
  "parameters": [
2468
4425
  {
2469
- "name": "pages"
4426
+ "name": "val",
4427
+ "type": {
4428
+ "text": "string|boolean|null"
4429
+ }
2470
4430
  }
2471
4431
  ]
2472
4432
  },
4433
+ {
4434
+ "kind": "field",
4435
+ "name": "isHandoff",
4436
+ "readonly": true
4437
+ },
4438
+ {
4439
+ "kind": "field",
4440
+ "name": "handoffSession",
4441
+ "readonly": true
4442
+ },
4443
+ {
4444
+ "kind": "field",
4445
+ "name": "handoffState",
4446
+ "readonly": true
4447
+ },
4448
+ {
4449
+ "kind": "field",
4450
+ "name": "handoffProgress",
4451
+ "readonly": true
4452
+ },
4453
+ {
4454
+ "kind": "field",
4455
+ "name": "handoffRetryCount",
4456
+ "readonly": true
4457
+ },
2473
4458
  {
2474
4459
  "kind": "method",
2475
- "name": "#movePage",
2476
- "privacy": "private",
4460
+ "name": "attachHandoffSession",
2477
4461
  "parameters": [
2478
4462
  {
2479
- "name": "fromIdx"
4463
+ "name": "session",
4464
+ "type": {
4465
+ "text": "HandoffSession"
4466
+ }
2480
4467
  },
2481
4468
  {
2482
- "name": "toIdx"
4469
+ "name": "token",
4470
+ "default": "null",
4471
+ "optional": true,
4472
+ "type": {
4473
+ "text": "Object"
4474
+ }
2483
4475
  }
2484
- ]
4476
+ ],
4477
+ "description": "Attaches an existing HandoffSession (e.g. LoopbackTransport in automated tests)."
2485
4478
  },
2486
4479
  {
2487
4480
  "kind": "method",
2488
- "name": "#stopCameraStream",
2489
- "privacy": "private"
4481
+ "name": "reconnectHandoff",
4482
+ "description": "Reconnects to desktop host session."
2490
4483
  },
2491
4484
  {
2492
4485
  "kind": "method",
2493
- "name": "#handleShutterClick",
2494
- "privacy": "private"
4486
+ "name": "resetHandoff",
4487
+ "description": "Resets handoff sender view and confirmation screen to allow scanning more documents."
2495
4488
  },
2496
4489
  {
2497
4490
  "kind": "method",
2498
- "name": "#rotateActivePage",
4491
+ "name": "#isHandoffMode",
2499
4492
  "privacy": "private"
2500
4493
  },
2501
4494
  {
2502
4495
  "kind": "method",
2503
- "name": "#toggleActivePageBw",
4496
+ "name": "#initHandoffMode",
2504
4497
  "privacy": "private"
2505
4498
  },
2506
4499
  {
2507
4500
  "kind": "method",
2508
- "name": "#toggleCropMode",
2509
- "privacy": "private"
4501
+ "name": "#bindHandoffSessionEvents",
4502
+ "privacy": "private",
4503
+ "parameters": [
4504
+ {
4505
+ "name": "session"
4506
+ }
4507
+ ]
2510
4508
  },
2511
4509
  {
2512
4510
  "kind": "method",
2513
- "name": "#deleteActivePageWithUndo",
4511
+ "name": "#cleanupHandoff",
2514
4512
  "privacy": "private"
2515
4513
  },
2516
4514
  {
2517
4515
  "kind": "method",
2518
- "name": "#showUndoToast",
2519
- "privacy": "private"
4516
+ "name": "#syncHandoffDom",
4517
+ "privacy": "private",
4518
+ "parameters": [
4519
+ {
4520
+ "name": "errorMsg",
4521
+ "default": "''"
4522
+ }
4523
+ ]
2520
4524
  },
2521
4525
  {
2522
4526
  "kind": "method",
2523
- "name": "#openOcrSheet",
2524
- "privacy": "private"
4527
+ "name": "#updateHandoffProgressDom",
4528
+ "privacy": "private",
4529
+ "parameters": [
4530
+ {
4531
+ "name": "progress"
4532
+ }
4533
+ ]
2525
4534
  },
2526
4535
  {
2527
4536
  "kind": "method",
2528
- "name": "#closeOcrSheet",
2529
- "privacy": "private"
4537
+ "name": "#streamHandoffPages",
4538
+ "privacy": "private",
4539
+ "parameters": [
4540
+ {
4541
+ "name": "pages"
4542
+ },
4543
+ {
4544
+ "name": "payload"
4545
+ }
4546
+ ]
2530
4547
  },
2531
4548
  {
2532
4549
  "kind": "method",
2533
- "name": "#handlePrimaryCtaClick",
2534
- "privacy": "private"
4550
+ "name": "#waitForHandoffConnected",
4551
+ "privacy": "private",
4552
+ "parameters": [
4553
+ {
4554
+ "name": "timeoutMs",
4555
+ "default": "6000"
4556
+ }
4557
+ ]
4558
+ },
4559
+ {
4560
+ "kind": "method",
4561
+ "name": "#ensureBlobForPage",
4562
+ "privacy": "private",
4563
+ "parameters": [
4564
+ {
4565
+ "name": "page"
4566
+ }
4567
+ ]
2535
4568
  },
2536
4569
  {
2537
4570
  "kind": "field",
@@ -2619,6 +4652,35 @@
2619
4652
  "kind": "field",
2620
4653
  "name": "licenseKey"
2621
4654
  },
4655
+ {
4656
+ "kind": "method",
4657
+ "name": "#syncAttr",
4658
+ "privacy": "private",
4659
+ "parameters": [
4660
+ {
4661
+ "name": "name"
4662
+ },
4663
+ {
4664
+ "name": "val"
4665
+ }
4666
+ ]
4667
+ },
4668
+ {
4669
+ "kind": "field",
4670
+ "name": "relayUrl"
4671
+ },
4672
+ {
4673
+ "kind": "field",
4674
+ "name": "signalingUrl"
4675
+ },
4676
+ {
4677
+ "kind": "field",
4678
+ "name": "iceServers"
4679
+ },
4680
+ {
4681
+ "kind": "field",
4682
+ "name": "iceTransportPolicy"
4683
+ },
2622
4684
  {
2623
4685
  "kind": "field",
2624
4686
  "name": "storage"
@@ -2663,6 +4725,10 @@
2663
4725
  "parameters": [
2664
4726
  {
2665
4727
  "name": "files"
4728
+ },
4729
+ {
4730
+ "name": "options",
4731
+ "default": "{}"
2666
4732
  }
2667
4733
  ]
2668
4734
  },
@@ -2731,6 +4797,94 @@
2731
4797
  "default": "{}"
2732
4798
  }
2733
4799
  ]
4800
+ },
4801
+ {
4802
+ "kind": "field",
4803
+ "name": "edgeDetection",
4804
+ "parameters": [
4805
+ {
4806
+ "name": "val",
4807
+ "type": {
4808
+ "text": "boolean|string|null|undefined"
4809
+ }
4810
+ }
4811
+ ]
4812
+ },
4813
+ {
4814
+ "kind": "field",
4815
+ "name": "edgeModel",
4816
+ "parameters": [
4817
+ {
4818
+ "name": "val",
4819
+ "type": {
4820
+ "text": "'classical'|'ml'|string|null|undefined"
4821
+ }
4822
+ }
4823
+ ]
4824
+ },
4825
+ {
4826
+ "kind": "field",
4827
+ "name": "autoCrop",
4828
+ "parameters": [
4829
+ {
4830
+ "name": "val",
4831
+ "type": {
4832
+ "text": "boolean|string|null|undefined"
4833
+ }
4834
+ }
4835
+ ]
4836
+ },
4837
+ {
4838
+ "kind": "field",
4839
+ "name": "autoCapture",
4840
+ "parameters": [
4841
+ {
4842
+ "name": "val",
4843
+ "type": {
4844
+ "text": "boolean|string|null|undefined"
4845
+ }
4846
+ }
4847
+ ]
4848
+ },
4849
+ {
4850
+ "kind": "method",
4851
+ "name": "getLiveQuad",
4852
+ "description": "Returns the current normalized quadrilateral tracked by live edge detection, or null.",
4853
+ "return": {
4854
+ "type": {
4855
+ "text": "EdgeQuad|null"
4856
+ }
4857
+ }
4858
+ },
4859
+ {
4860
+ "kind": "method",
4861
+ "name": "getLatestDetection",
4862
+ "description": "Returns the latest edge detection result payload, or null.",
4863
+ "return": {
4864
+ "type": {
4865
+ "text": "{ quad: EdgeQuad, confidence: number, durationMs?: number, isFallback: boolean }|null"
4866
+ }
4867
+ }
4868
+ },
4869
+ {
4870
+ "kind": "method",
4871
+ "name": "detectCurrentFrame",
4872
+ "parameters": [
4873
+ {
4874
+ "name": "options",
4875
+ "default": "{}",
4876
+ "optional": true,
4877
+ "type": {
4878
+ "text": "EdgeDetectOptions"
4879
+ }
4880
+ }
4881
+ ],
4882
+ "description": "Run edge detection on the current camera video frame.",
4883
+ "return": {
4884
+ "type": {
4885
+ "text": "Promise<EdgeDetectionResult|null>"
4886
+ }
4887
+ }
2734
4888
  }
2735
4889
  ],
2736
4890
  "attributes": [
@@ -2772,6 +4926,33 @@
2772
4926
  },
2773
4927
  {
2774
4928
  "name": "pdf"
4929
+ },
4930
+ {
4931
+ "name": "handoff"
4932
+ },
4933
+ {
4934
+ "name": "relay-url"
4935
+ },
4936
+ {
4937
+ "name": "ice-servers"
4938
+ },
4939
+ {
4940
+ "name": "signaling-url"
4941
+ },
4942
+ {
4943
+ "name": "ice-transport-policy"
4944
+ },
4945
+ {
4946
+ "name": "edge-detection"
4947
+ },
4948
+ {
4949
+ "name": "edge-model"
4950
+ },
4951
+ {
4952
+ "name": "auto-crop"
4953
+ },
4954
+ {
4955
+ "name": "auto-capture"
2775
4956
  }
2776
4957
  ],
2777
4958
  "superclass": {
@@ -2848,7 +5029,7 @@
2848
5029
  {
2849
5030
  "kind": "variable",
2850
5031
  "name": "scannerCss",
2851
- "default": "` :host { all: initial; display: block; position: relative; width: 100%; height: 100%; min-height: 200px; container-type: size; container-name: copio-scanner; overflow: hidden; contain: layout; box-sizing: border-box; text-align: left; direction: ltr; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; --copio-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --copio-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; --copio-color-bg: #0b0f17; --copio-color-surface: #131b26; --copio-color-surface-elevated: #1c2736; --copio-color-surface-overlay: rgba(15, 22, 32, 0.88); --copio-color-stage-bg: #070a0f; --copio-color-text: #f1f5f9; --copio-color-text-muted: #94a3b8; --copio-color-text-inverse: #090d14; --copio-color-primary: #38bdf8; --copio-color-primary-hover: #7dd3fc; --copio-color-primary-contrast: #06131f; --copio-color-success: #22c55e; --copio-color-warning: #f59e0b; --copio-color-danger: #ef4444; --copio-color-border: rgba(148, 163, 184, 0.18); --copio-color-border-strong: rgba(148, 163, 184, 0.34); --copio-focus-ring: 0 0 0 2px #0b0f17, 0 0 0 4px #38bdf8; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-radius-pill: 9999px; --copio-spacing-xs: 4px; --copio-spacing-sm: 8px; --copio-spacing-md: 12px; --copio-spacing-lg: 16px; --copio-spacing-xl: 24px; --copio-touch-target-min: 44px; --copio-crop-handle-hit: 48px; --copio-crop-handle-visual: 16px; --copio-shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.55); --copio-transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1); --copio-transition-normal: 240ms cubic-bezier(0.22, 1, 0.36, 1); --sl-font-sans: var(--copio-font-family); --sl-font-mono: var(--copio-font-mono); --sl-color-primary-50: #f0f9ff; --sl-color-primary-100: #e0f2fe; --sl-color-primary-200: #bae6fd; --sl-color-primary-300: #7dd3fc; --sl-color-primary-400: #38bdf8; --sl-color-primary-500: #0ea5e9; --sl-color-primary-600: var(--copio-color-primary); --sl-color-primary-700: #0369a1; --sl-color-primary-800: #075985; --sl-color-primary-900: #0c4a6e; --sl-color-primary-950: #082f49; font-family: var(--copio-font-family); font-size: 14px; line-height: 1.5; color: var(--copio-color-text); background-color: var(--copio-color-bg); color-scheme: dark; } :host([theme=\"dark\"]), :host(.copio-theme-dark), :host-context([data-theme=\"dark\"]), :host-context(.sl-theme-dark), :host-context(.theme-dark) { color-scheme: dark; } /* Light Theme Override */ :host([theme=\"light\"]), :host(.copio-theme-light), :host-context([data-theme=\"light\"]), :host-context(.sl-theme-light), :host-context(.theme-light) { --copio-color-bg: #f8fafc; --copio-color-surface: #ffffff; --copio-color-surface-elevated: #f1f5f9; --copio-color-surface-overlay: rgba(255, 255, 255, 0.92); --copio-color-stage-bg: #1e293b; --copio-color-text: #0f172a; --copio-color-text-muted: #475569; --copio-color-text-inverse: #ffffff; --copio-color-primary: #0284c7; --copio-color-primary-hover: #0369a1; --copio-color-primary-contrast: #ffffff; --copio-color-success: #16a34a; --copio-color-warning: #d97706; --copio-color-danger: #dc2626; --copio-color-border: rgba(15, 23, 42, 0.12); --copio-color-border-strong: rgba(15, 23, 42, 0.26); --copio-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.18); color-scheme: light; } /* Brand Theme Override (Emerald) */ :host([theme=\"brand\"]), :host(.copio-theme-brand), :host-context([data-theme=\"brand\"]), :host-context(.theme-brand) { --copio-color-bg: #0f111a; --copio-color-surface: #181b28; --copio-color-surface-elevated: #23273a; --copio-color-surface-overlay: rgba(24, 27, 40, 0.90); --copio-color-stage-bg: #090a10; --copio-color-text: #f8fafc; --copio-color-text-muted: #9ca3af; --copio-color-text-inverse: #ffffff; --copio-color-primary: #10b981; --copio-color-primary-hover: #34d399; --copio-color-primary-contrast: #042f2e; --copio-color-success: #10b981; --copio-color-warning: #f59e0b; --copio-color-danger: #ef4444; --copio-color-border: rgba(16, 185, 129, 0.22); --copio-color-border-strong: rgba(16, 185, 129, 0.42); --copio-focus-ring: 0 0 0 2px #0f111a, 0 0 0 4px #10b981; --copio-radius-sm: 4px; --copio-radius-md: 8px; --copio-radius-lg: 12px; --copio-shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.65); color-scheme: dark; } /* Auto Theme: follows prefers-color-scheme when theme is auto */ @media (prefers-color-scheme: light) { :host([theme=\"auto\"]), :host(.copio-theme-auto) { --copio-color-bg: #f8fafc; --copio-color-surface: #ffffff; --copio-color-surface-elevated: #f1f5f9; --copio-color-surface-overlay: rgba(255, 255, 255, 0.92); --copio-color-stage-bg: #1e293b; --copio-color-text: #0f172a; --copio-color-text-muted: #475569; --copio-color-text-inverse: #ffffff; --copio-color-primary: #0284c7; --copio-color-primary-hover: #0369a1; --copio-color-primary-contrast: #ffffff; --copio-color-success: #16a34a; --copio-color-warning: #d97706; --copio-color-danger: #dc2626; --copio-color-border: rgba(15, 23, 42, 0.12); --copio-color-border-strong: rgba(15, 23, 42, 0.26); --copio-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.18); color-scheme: light; } } /* ========================================================================== 2. INTERNAL ELEMENT RESET (Scoped to Shadow DOM) ========================================================================== */ *, *::before, *::after { box-sizing: border-box; } ::slotted(*) { box-sizing: border-box; } /* ========================================================================== 3. ROOT CONTAINER & COMPONENT SHELL ========================================================================== */ .copio-scanner-container { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; container-type: size; container-name: copio-scanner; contain: layout; background: var(--copio-color-bg); color: var(--copio-color-text); font-family: var(--copio-font-family); font-size: 14px; line-height: 1.5; text-align: left; direction: ltr; user-select: none; } /* Header (Shadow Part: header) */ .copio-header { display: flex; align-items: center; justify-content: space-between; gap: var(--copio-spacing-sm); padding: var(--copio-spacing-sm) var(--copio-spacing-md); background: var(--copio-color-surface); border-bottom: 1px solid var(--copio-color-border); min-height: 52px; flex-shrink: 0; z-index: 5; box-sizing: border-box; } .copio-header-left { display: flex; align-items: center; gap: var(--copio-spacing-sm); min-width: 0; } .copio-mode-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: var(--copio-radius-pill); background: var(--copio-color-surface-elevated); color: var(--copio-color-primary); border: 1px solid var(--copio-color-border); white-space: nowrap; } .copio-title-group { display: flex; flex-direction: column; min-width: 0; } .copio-title { font-size: 13px; font-weight: 600; color: var(--copio-color-text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .copio-subtitle { font-size: 11px; color: var(--copio-color-text-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .copio-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } /* Interactive Stage Switcher Pill (Viewfinder vs Workbench) */ .copio-stage-tabs { display: inline-flex; background: var(--copio-color-bg); padding: 2px; border-radius: var(--copio-radius-md); border: 1px solid var(--copio-color-border); } .copio-stage-tab { appearance: none; border: none; background: transparent; color: var(--copio-color-text-muted); font-family: inherit; font-size: 11px; font-weight: 600; padding: 6px 10px; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); border-radius: var(--copio-radius-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background var(--copio-transition-fast), color var(--copio-transition-fast); } .copio-stage-tab[aria-selected=\"true\"] { background: var(--copio-color-surface-elevated); color: var(--copio-color-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); } /* Touch-Safe Interactive Buttons (>=44px touch invariant) */ .copio-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text); font-family: inherit; font-size: 13px; font-weight: 600; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 0 12px; border-radius: var(--copio-radius-md); display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: all var(--copio-transition-fast); white-space: nowrap; text-decoration: none; box-sizing: border-box; } .copio-btn:hover { background: var(--copio-color-primary-hover); color: var(--copio-color-primary-contrast); border-color: var(--copio-color-primary); } .copio-btn-primary { background: var(--copio-color-primary); color: var(--copio-color-primary-contrast); border-color: var(--copio-color-primary); } .copio-btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--copio-color-danger); border-color: rgba(239, 68, 68, 0.35); } .copio-btn-danger:hover { background: var(--copio-color-danger); color: #fff; } /* Viewfinder (Shadow Part: viewfinder) */ .copio-viewfinder, .copio-viewfinder-stage { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; background: var(--copio-color-stage-bg); overflow: hidden; min-height: 0; width: 100%; } .copio-viewfinder-feed, .copio-camera-feed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 20px 104px 20px; background: radial-gradient(circle at 50% 45%, #1e293b 0%, #090d14 75%); } /* Framing Guide Overlay (receipt | card | a4 | auto) */ .copio-framing-guide { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; border: 1.5px dashed rgba(56, 189, 248, 0.55); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(4, 7, 12, 0.52); transition: all var(--copio-transition-normal); overflow: hidden; } .copio-framing-guide[data-aspect=\"receipt\"] { aspect-ratio: 1 / 2.1; height: 100%; } .copio-framing-guide[data-aspect=\"card\"] { aspect-ratio: 1.586 / 1; width: 92%; max-height: 82%; } .copio-framing-guide[data-aspect=\"a4\"] { aspect-ratio: 1 / 1.414; height: 96%; } .copio-framing-guide[data-aspect=\"auto\"] { width: 94%; height: 94%; } /* Corner Targeting Brackets */ .copio-corner { position: absolute; width: 22px; height: 22px; border-color: var(--copio-color-primary); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; } .copio-corner.tl { top: 6px; left: 6px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; } .copio-corner.tr { top: 6px; right: 6px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; } .copio-corner.bl { bottom: 6px; left: 6px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; } .copio-corner.br { bottom: 6px; right: 6px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; } .copio-edge-quad { position: absolute; inset: 12px; border: 1px solid rgba(56, 189, 248, 0.28); border-radius: 8px; background: rgba(56, 189, 248, 0.04); pointer-events: none; z-index: 1; } .copio-camera-placeholder { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--copio-color-text-muted); font-size: 12px; font-weight: 500; } .copio-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copio-color-primary); box-shadow: 0 0 8px var(--copio-color-primary); flex-shrink: 0; } /* Top Viewfinder HUD Overlay (Step Pill + Privacy Assurance Badge) */ .copio-viewfinder-hud-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: linear-gradient(to bottom, rgba(7, 10, 15, 0.85), transparent); } .copio-step-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--copio-radius-pill); background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(56, 189, 248, 0.45); color: #f8fafc; font-size: 12px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); } .copio-privacy-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--copio-radius-pill); background: rgba(22, 101, 52, 0.35); border: 1px solid rgba(34, 197, 94, 0.4); color: #86efac; font-size: 11px; font-weight: 500; } /* Shutter Dock (Shadow Part: shutter-dock) */ .copio-shutter-dock { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); min-height: 84px; flex-shrink: 0; } .copio-shutter-side { flex: 1; display: flex; align-items: center; } .copio-shutter-side.right { justify-content: flex-end; } .copio-shutter-btn { appearance: none; width: 64px; height: 64px; border-radius: var(--copio-radius-pill); border: 4px solid var(--copio-color-primary); background: transparent; padding: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--copio-transition-fast), border-color 150ms ease; flex-shrink: 0; } .copio-shutter-btn:hover { transform: scale(1.04); } .copio-shutter-btn:active { transform: scale(0.94); } .copio-shutter-btn-inner, .copio-shutter-inner { width: 100%; height: 100%; border-radius: var(--copio-radius-pill); background: var(--copio-color-primary); display: flex; align-items: center; justify-content: center; color: var(--copio-color-primary-contrast); transition: transform var(--copio-transition-fast); } .copio-shutter-btn:active .copio-shutter-btn-inner, .copio-shutter-btn:active .copio-shutter-inner { transform: scale(0.88); } /* Stacking Thumbnail Counter Pill in Viewfinder */ .copio-stack-pill { display: inline-flex; align-items: center; gap: 8px; min-height: var(--copio-touch-target-min); padding: 4px 12px 4px 6px; border-radius: var(--copio-radius-md); background: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-primary); color: var(--copio-color-text); font-size: 12px; font-weight: 600; cursor: pointer; } .copio-stack-thumb { width: 30px; height: 36px; border-radius: 4px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.35); background: #000; } /* Workbench & Filmstrip (Shadow Part: workbench) */ .copio-workbench, .copio-workbench-stage { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; background: var(--copio-color-bg); overflow: hidden; min-height: 0; width: 100%; } .copio-workbench-main { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; overflow: hidden; } .copio-stage-canvas, .copio-canvas-viewport { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 16px 20px 44px 20px; background: var(--copio-color-stage-bg); min-height: 180px; } .copio-canvas-viewport.has-card-switcher { padding-top: 66px; } .copio-canvas-viewport.is-cropping { padding: 74px 26px 26px 26px; } /* Card Side Switcher */ .copio-card-side-switcher { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; gap: 4px; padding: 3px; background: var(--copio-color-surface-overlay, rgba(15, 22, 32, 0.88)); border: 1px solid var(--copio-color-border-strong); border-radius: var(--copio-radius-pill); backdrop-filter: blur(8px); } .copio-side-pill { appearance: none; border: none; background: transparent; color: var(--copio-color-text-muted); font-family: inherit; font-size: 11px; font-weight: 600; padding: 6px 12px; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); border-radius: var(--copio-radius-pill); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; } .copio-side-pill[aria-selected=\"true\"] { background: var(--copio-color-primary); color: var(--copio-color-primary-contrast); } .copio-stage-figure, .copio-canvas-wrapper { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; } .copio-stage-canvas img, .copio-stage-img, .copio-stage-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: var(--copio-shadow-elevated); border-radius: var(--copio-radius-sm); user-select: none; } .copio-crop-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; z-index: 8; touch-action: none; } .copio-crop-box { position: absolute; border: 2px solid var(--copio-color-primary); box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.68); cursor: move; touch-action: none; box-sizing: border-box; } /* Rule-of-thirds crop grid */ .copio-crop-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(56, 189, 248, 0.28) 1px, transparent 1px), linear-gradient(to bottom, rgba(56, 189, 248, 0.28) 1px, transparent 1px); background-size: 33.333% 33.333%; } /* 48px x 48px Touch Target Handles (exceeds 44px requirement) */ .copio-crop-handle { position: absolute; width: var(--copio-crop-handle-hit); height: var(--copio-crop-handle-hit); min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; z-index: 10; touch-action: none; box-sizing: border-box; } .copio-crop-handle::after { content: ''; width: var(--copio-crop-handle-visual); height: var(--copio-crop-handle-visual); border-radius: 50%; background: var(--copio-color-primary); border: 2.5px solid #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 120ms ease; box-sizing: border-box; } .copio-crop-handle:hover::after, .copio-crop-handle:active::after { transform: scale(1.25); background: var(--copio-color-success, #22c55e); } .copio-crop-handle.nw { top: -24px; left: -24px; cursor: nwse-resize; } .copio-crop-handle.ne { top: -24px; right: -24px; cursor: nesw-resize; } .copio-crop-handle.sw { bottom: -24px; left: -24px; cursor: nesw-resize; } .copio-crop-handle.se { bottom: -24px; right: -24px; cursor: nwse-resize; } .copio-crop-handle.n, .copio-crop-handle.edge-n { top: -24px; left: calc(50% - 24px); cursor: ns-resize; } .copio-crop-handle.s, .copio-crop-handle.edge-s { bottom: -24px; left: calc(50% - 24px); cursor: ns-resize; } .copio-crop-handle.w, .copio-crop-handle.edge-w { left: -24px; top: calc(50% - 24px); cursor: ew-resize; } .copio-crop-handle.e, .copio-crop-handle.edge-e { right: -24px; top: calc(50% - 24px); cursor: ew-resize; } /* Filmstrip & Reorder Tray */ .copio-filmstrip, .copio-filmstrip-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); overflow-x: auto; min-height: 80px; flex-shrink: 0; scrollbar-width: thin; } .copio-filmstrip-scroll { display: flex; align-items: center; gap: 8px; } .copio-filmstrip-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; } .copio-thumb-container { position: relative; width: 56px; height: 70px; border-radius: var(--copio-radius-sm); overflow: hidden; background: var(--copio-color-surface-elevated, #1c2736); border: 2px solid var(--copio-color-border); cursor: pointer; transition: all var(--copio-transition-fast); display: flex; align-items: center; justify-content: center; } .copio-filmstrip-item.is-active .copio-thumb-container { border-color: var(--copio-color-primary); box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25); } .copio-thumb-num { position: absolute; bottom: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: rgba(15, 23, 42, 0.85); color: #f8fafc; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; } .copio-thumb-reorder { display: flex; align-items: center; gap: 4px; } .copio-reorder-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text-muted); border-radius: 4px; font-size: 9px; padding: 2px 5px; cursor: pointer; } .copio-reorder-btn:disabled { opacity: 0.35; cursor: not-allowed; } .copio-thumb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; } /* Edit Action Toolbar & Primary Completion Dock */ .copio-toolbar, .copio-controls-dock { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); min-height: 56px; flex-shrink: 0; z-index: 6; } .copio-edit-toolbar, .copio-toolbar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; } .copio-toolbar-tools .copio-tool-btn { flex: 1 1 56px; } .copio-toolbar-actions { display: flex; align-items: center; gap: 8px; width: 100%; } .copio-toolbar-actions .copio-btn-primary { width: 100%; } .copio-tool-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text); font-family: inherit; font-size: 11px; font-weight: 600; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 4px 6px; border-radius: var(--copio-radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: all var(--copio-transition-fast); } .copio-tool-btn:hover:not(:disabled) { border-color: var(--copio-color-border-strong); background: rgba(255, 255, 255, 0.06); } .copio-tool-btn[aria-pressed=\"true\"] { background: rgba(56, 189, 248, 0.16); color: var(--copio-color-primary); border-color: var(--copio-color-primary); } .copio-tool-btn.danger { color: #fca5a5; } .copio-tool-btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.45); } .copio-toast-region { position: absolute; bottom: 124px; left: 12px; right: 12px; z-index: 30; display: flex; flex-direction: column; gap: 8px; pointer-events: none; } .copio-toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--copio-radius-md); background: #0f172a; color: #f8fafc; border: 1px solid var(--copio-color-primary); box-shadow: var(--copio-shadow-elevated); font-size: 12px; font-weight: 500; position: relative; overflow: hidden; } .copio-toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--copio-color-primary); transition: width 100ms linear; } .copio-toast-undo-btn, .copio-btn-toast-undo { appearance: none; border: 1px solid rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.16); color: #38bdf8; font-family: inherit; font-size: 12px; font-weight: 700; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 0 12px; border-radius: var(--copio-radius-sm); cursor: pointer; flex-shrink: 0; } .copio-ocr-content { display: flex; flex-direction: column; gap: 8px; } .copio-ocr-text { margin: 0; padding: 10px; max-height: 180px; overflow: auto; background: var(--copio-color-bg); color: var(--copio-color-text); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-sm); font-family: var(--copio-font-mono); font-size: 11px; line-height: 1.5; white-space: pre-wrap; } .copio-ocr-meta { font-size: 11px; color: var(--copio-color-text-muted); } /* Slide-up OCR Extraction Sheet */ .copio-ocr-sheet { position: absolute; inset: auto 0 0 0; max-height: 78%; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-primary); border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.65); z-index: 25; display: flex; flex-direction: column; padding: 14px; gap: 10px; } .copio-ocr-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .copio-ocr-textarea { width: 100%; min-height: 130px; flex: 1; resize: none; background: var(--copio-color-bg); color: var(--copio-color-text); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-sm); padding: 10px; font-family: var(--copio-font-mono); font-size: 11px; line-height: 1.5; } /* Container-Scoped Toast Stack */ .sl-toast-stack, .copio-toast-stack-scoped { position: absolute !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; max-width: 100% !important; padding: var(--copio-spacing-md) !important; box-sizing: border-box !important; z-index: 1000 !important; pointer-events: none; } .sl-toast-stack sl-alert, .copio-toast-stack-scoped sl-alert { pointer-events: auto; margin-top: var(--copio-spacing-sm); } /* ========================================================================== 4. @container BREAKPOINTS (Strictly Container Queries) ========================================================================== */ @container copio-scanner (max-width: 400px) { .copio-header { padding: 6px 10px; min-height: 52px; } .copio-header-left { flex-direction: column; align-items: flex-start; gap: 2px; } .copio-mode-badge { font-size: 10px; padding: 2px 6px; } .copio-subtitle { display: none; } .copio-filmstrip, .copio-filmstrip-bar { gap: 6px; padding: 6px 8px; } .copio-tool-btn { font-size: 10px; padding: 3px 4px; } .copio-btn { padding: 0 8px; font-size: 12px; } } @container copio-scanner (min-width: 401px) and (max-width: 767px) { .copio-header { padding: var(--copio-spacing-sm) var(--copio-spacing-md); } .copio-tool-btn { flex-direction: row; font-size: 12px; gap: 6px; } } @container copio-scanner (min-width: 768px) { .copio-header { padding: var(--copio-spacing-md) var(--copio-spacing-lg); } .copio-workbench-main { flex-direction: row; } .copio-filmstrip, .copio-filmstrip-bar { order: -1; flex-direction: column; width: 168px; height: 100%; border-top: none; border-right: 1px solid var(--copio-color-border); overflow-y: auto; overflow-x: hidden; padding: 12px; } .copio-filmstrip-scroll { flex-direction: column; width: 100%; } .copio-thumb-container { width: 112px; height: 140px; } .copio-toolbar, .copio-controls-dock { flex-direction: row; align-items: center; justify-content: space-between; } .copio-toolbar-tools { width: auto; flex: 1; } .copio-toolbar-actions { width: auto; min-width: 200px; } } `",
5032
+ "default": "` :host { all: initial; display: block; position: relative; width: 100%; height: 100%; min-height: 200px; container-type: size; container-name: copio-scanner; overflow: hidden; contain: layout; box-sizing: border-box; text-align: left; direction: ltr; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; --copio-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; --copio-font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; --copio-color-bg: #0b0f17; --copio-color-surface: #131b26; --copio-color-surface-elevated: #1c2736; --copio-color-surface-overlay: rgba(15, 22, 32, 0.88); --copio-color-stage-bg: #070a0f; --copio-color-text: #f1f5f9; --copio-color-text-muted: #94a3b8; --copio-color-text-inverse: #090d14; --copio-color-primary: #38bdf8; --copio-color-primary-hover: #7dd3fc; --copio-color-primary-contrast: #06131f; --copio-color-success: #22c55e; --copio-color-warning: #f59e0b; --copio-color-danger: #ef4444; --copio-color-border: rgba(148, 163, 184, 0.18); --copio-color-border-strong: rgba(148, 163, 184, 0.34); --copio-focus-ring: 0 0 0 2px #0b0f17, 0 0 0 4px #38bdf8; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-radius-pill: 9999px; --copio-spacing-xs: 4px; --copio-spacing-sm: 8px; --copio-spacing-md: 12px; --copio-spacing-lg: 16px; --copio-spacing-xl: 24px; --copio-touch-target-min: 44px; --copio-crop-handle-hit: 48px; --copio-crop-handle-visual: 16px; --copio-shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.55); --copio-transition-fast: 150ms cubic-bezier(0.22, 1, 0.36, 1); --copio-transition-normal: 240ms cubic-bezier(0.22, 1, 0.36, 1); font-family: var(--copio-font-family); font-size: 14px; line-height: 1.5; color: var(--copio-color-text); background-color: var(--copio-color-bg); color-scheme: dark; } :host([theme=\"dark\"]), :host(.copio-theme-dark), :host-context([data-theme=\"dark\"]), :host-context(.sl-theme-dark), :host-context(.theme-dark) { color-scheme: dark; } /* Light Theme Override */ :host([theme=\"light\"]), :host(.copio-theme-light), :host-context([data-theme=\"light\"]), :host-context(.sl-theme-light), :host-context(.theme-light) { --copio-color-bg: #f8fafc; --copio-color-surface: #ffffff; --copio-color-surface-elevated: #f1f5f9; --copio-color-surface-overlay: rgba(255, 255, 255, 0.92); --copio-color-stage-bg: #1e293b; --copio-color-text: #0f172a; --copio-color-text-muted: #475569; --copio-color-text-inverse: #ffffff; --copio-color-primary: #0284c7; --copio-color-primary-hover: #0369a1; --copio-color-primary-contrast: #ffffff; --copio-color-success: #16a34a; --copio-color-warning: #d97706; --copio-color-danger: #dc2626; --copio-color-border: rgba(15, 23, 42, 0.12); --copio-color-border-strong: rgba(15, 23, 42, 0.26); --copio-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.18); color-scheme: light; } /* Brand Theme Override (Emerald) */ :host([theme=\"brand\"]), :host(.copio-theme-brand), :host-context([data-theme=\"brand\"]), :host-context(.theme-brand) { --copio-color-bg: #0f111a; --copio-color-surface: #181b28; --copio-color-surface-elevated: #23273a; --copio-color-surface-overlay: rgba(24, 27, 40, 0.90); --copio-color-stage-bg: #090a10; --copio-color-text: #f8fafc; --copio-color-text-muted: #9ca3af; --copio-color-text-inverse: #ffffff; --copio-color-primary: #10b981; --copio-color-primary-hover: #34d399; --copio-color-primary-contrast: #042f2e; --copio-color-success: #10b981; --copio-color-warning: #f59e0b; --copio-color-danger: #ef4444; --copio-color-border: rgba(16, 185, 129, 0.22); --copio-color-border-strong: rgba(16, 185, 129, 0.42); --copio-focus-ring: 0 0 0 2px #0f111a, 0 0 0 4px #10b981; --copio-radius-sm: 4px; --copio-radius-md: 8px; --copio-radius-lg: 12px; --copio-shadow-elevated: 0 12px 32px -4px rgba(0, 0, 0, 0.65); color-scheme: dark; } /* Auto Theme: follows prefers-color-scheme when theme is auto */ @media (prefers-color-scheme: light) { :host([theme=\"auto\"]), :host(.copio-theme-auto) { --copio-color-bg: #f8fafc; --copio-color-surface: #ffffff; --copio-color-surface-elevated: #f1f5f9; --copio-color-surface-overlay: rgba(255, 255, 255, 0.92); --copio-color-stage-bg: #1e293b; --copio-color-text: #0f172a; --copio-color-text-muted: #475569; --copio-color-text-inverse: #ffffff; --copio-color-primary: #0284c7; --copio-color-primary-hover: #0369a1; --copio-color-primary-contrast: #ffffff; --copio-color-success: #16a34a; --copio-color-warning: #d97706; --copio-color-danger: #dc2626; --copio-color-border: rgba(15, 23, 42, 0.12); --copio-color-border-strong: rgba(15, 23, 42, 0.26); --copio-focus-ring: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7; --copio-radius-sm: 6px; --copio-radius-md: 10px; --copio-radius-lg: 14px; --copio-shadow-elevated: 0 12px 28px -4px rgba(15, 23, 42, 0.18); color-scheme: light; } } /* ========================================================================== 2. INTERNAL ELEMENT RESET (Scoped to Shadow DOM) ========================================================================== */ *, *::before, *::after { box-sizing: border-box; } ::slotted(*) { box-sizing: border-box; } /* ========================================================================== 3. ROOT CONTAINER & COMPONENT SHELL ========================================================================== */ .copio-scanner-container { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; container-type: size; container-name: copio-scanner; contain: layout; background: var(--copio-color-bg); color: var(--copio-color-text); font-family: var(--copio-font-family); font-size: 14px; line-height: 1.5; text-align: left; direction: ltr; user-select: none; } /* Header (Shadow Part: header) */ .copio-header { display: flex; align-items: center; justify-content: space-between; gap: var(--copio-spacing-sm); padding: var(--copio-spacing-sm) var(--copio-spacing-md); background: var(--copio-color-surface); border-bottom: 1px solid var(--copio-color-border); min-height: 52px; flex-shrink: 0; z-index: 5; box-sizing: border-box; } .copio-header-left { display: flex; align-items: center; gap: var(--copio-spacing-sm); min-width: 0; } .copio-mode-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: var(--copio-radius-pill); background: var(--copio-color-surface-elevated); color: var(--copio-color-primary); border: 1px solid var(--copio-color-border); white-space: nowrap; } .copio-title-group { display: flex; flex-direction: column; min-width: 0; } .copio-title { font-size: 13px; font-weight: 600; color: var(--copio-color-text); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .copio-subtitle { font-size: 11px; color: var(--copio-color-text-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .copio-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; } /* Interactive Stage Switcher Pill (Viewfinder vs Workbench) */ .copio-stage-tabs { display: inline-flex; background: var(--copio-color-bg); padding: 2px; border-radius: var(--copio-radius-md); border: 1px solid var(--copio-color-border); } .copio-stage-tab { appearance: none; border: none; background: transparent; color: var(--copio-color-text-muted); font-family: inherit; font-size: 11px; font-weight: 600; padding: 6px 10px; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); border-radius: var(--copio-radius-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background var(--copio-transition-fast), color var(--copio-transition-fast); } .copio-stage-tab[aria-selected=\"true\"] { background: var(--copio-color-surface-elevated); color: var(--copio-color-text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); } /* Touch-Safe Interactive Buttons (>=44px touch invariant) */ .copio-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text); font-family: inherit; font-size: 13px; font-weight: 600; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 0 12px; border-radius: var(--copio-radius-md); display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; transition: all var(--copio-transition-fast); white-space: nowrap; text-decoration: none; box-sizing: border-box; } .copio-btn:hover { background: var(--copio-color-primary-hover); color: var(--copio-color-primary-contrast); border-color: var(--copio-color-primary); } .copio-btn-primary { background: var(--copio-color-primary); color: var(--copio-color-primary-contrast); border-color: var(--copio-color-primary); } .copio-btn-danger { background: rgba(239, 68, 68, 0.15); color: var(--copio-color-danger); border-color: rgba(239, 68, 68, 0.35); } .copio-btn-danger:hover { background: var(--copio-color-danger); color: #fff; } /* Viewfinder (Shadow Part: viewfinder) */ .copio-viewfinder, .copio-viewfinder-stage { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-between; background: var(--copio-color-stage-bg); overflow: hidden; min-height: 0; width: 100%; } .copio-viewfinder-feed, .copio-camera-feed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 56px 20px 104px 20px; background: radial-gradient(circle at 50% 45%, #1e293b 0%, #090d14 75%); } .copio-camera-feed.is-shutter-flash::after { content: ''; position: absolute; inset: 0; background: #ffffff; opacity: 0.75; pointer-events: none; z-index: 5; animation: copio-shutter-flash 150ms ease-out forwards; } @keyframes copio-shutter-flash { 0% { opacity: 0.75; } 100% { opacity: 0; } } /* Framing Guide Overlay (receipt | card | a4 | auto) */ .copio-framing-guide { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; border: 1.5px dashed rgba(56, 189, 248, 0.55); border-radius: 12px; box-shadow: 0 0 0 9999px rgba(4, 7, 12, 0.52); transition: all var(--copio-transition-normal); overflow: hidden; } .copio-framing-guide[data-aspect=\"receipt\"] { aspect-ratio: 1 / 2.1; height: 100%; } .copio-framing-guide[data-aspect=\"card\"] { aspect-ratio: 1.586 / 1; width: 92%; max-height: 82%; } .copio-framing-guide[data-aspect=\"a4\"] { aspect-ratio: 1 / 1.414; height: 96%; } .copio-framing-guide[data-aspect=\"auto\"] { width: 94%; height: 94%; } /* Corner Targeting Brackets */ .copio-corner { position: absolute; width: 22px; height: 22px; border-color: var(--copio-color-primary); border-style: solid; border-width: 0; pointer-events: none; z-index: 2; } .copio-corner.tl { top: 6px; left: 6px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: 6px; } .copio-corner.tr { top: 6px; right: 6px; border-top-width: 3px; border-right-width: 3px; border-top-right-radius: 6px; } .copio-corner.bl { bottom: 6px; left: 6px; border-bottom-width: 3px; border-left-width: 3px; border-bottom-left-radius: 6px; } .copio-corner.br { bottom: 6px; right: 6px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: 6px; } .copio-edge-quad { position: absolute; inset: 12px; border: 1px solid rgba(56, 189, 248, 0.28); border-radius: 8px; background: rgba(56, 189, 248, 0.04); pointer-events: none; z-index: 1; } /* Live Viewfinder SVG Quad Overlay (CPO-076) */ .copio-live-quad-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; overflow: visible; } .copio-live-quad-polygon { fill: rgba(56, 189, 248, 0.18); stroke: var(--copio-color-primary, #38bdf8); stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45)); } .copio-live-quad-corner { fill: #ffffff; stroke: var(--copio-color-primary, #38bdf8); stroke-width: 2.5; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4)); } .copio-camera-feed.is-detected .copio-live-quad-polygon { fill: rgba(34, 197, 94, 0.22); stroke: #22c55e; filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.6)); } .copio-camera-feed.is-detected .copio-live-quad-corner { stroke: #22c55e; } .copio-camera-feed.is-tracking .copio-edge-quad { opacity: 0.1; transition: opacity var(--copio-transition-fast); } .copio-camera-placeholder { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; color: var(--copio-color-text-muted); font-size: 12px; font-weight: 500; cursor: pointer; user-select: none; transition: color var(--copio-transition-fast), transform var(--copio-transition-fast); } .copio-camera-placeholder:hover { color: var(--copio-color-text); transform: scale(1.02); } .copio-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--copio-color-primary); box-shadow: 0 0 8px var(--copio-color-primary); flex-shrink: 0; } /* Top Viewfinder HUD Overlay (Step Pill + Privacy Assurance Badge) */ .copio-viewfinder-hud-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; background: linear-gradient(to bottom, rgba(7, 10, 15, 0.85), transparent); } .copio-step-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--copio-radius-pill); background: rgba(15, 23, 42, 0.88); border: 1px solid rgba(56, 189, 248, 0.45); color: #f8fafc; font-size: 12px; font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35); } .copio-privacy-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--copio-radius-pill); background: rgba(22, 101, 52, 0.35); border: 1px solid rgba(34, 197, 94, 0.4); color: #86efac; font-size: 11px; font-weight: 500; } /* Shutter Dock (Shadow Part: shutter-dock) */ .copio-shutter-dock { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); min-height: 84px; flex-shrink: 0; } .copio-shutter-side { flex: 1; display: flex; align-items: center; } .copio-shutter-side.right { justify-content: flex-end; } .copio-shutter-btn { appearance: none; width: 64px; height: 64px; border-radius: var(--copio-radius-pill); border: 4px solid var(--copio-color-primary); background: transparent; padding: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform var(--copio-transition-fast), border-color 150ms ease; flex-shrink: 0; } .copio-shutter-btn:hover { transform: scale(1.04); } .copio-shutter-btn:active { transform: scale(0.94); } .copio-shutter-btn-inner, .copio-shutter-inner { width: 100%; height: 100%; border-radius: var(--copio-radius-pill); background: var(--copio-color-primary); display: flex; align-items: center; justify-content: center; color: var(--copio-color-primary-contrast); transition: transform var(--copio-transition-fast); } .copio-shutter-btn:active .copio-shutter-btn-inner, .copio-shutter-btn:active .copio-shutter-inner { transform: scale(0.88); } /* Stacking Thumbnail Counter Pill in Viewfinder */ .copio-stack-pill { display: inline-flex; align-items: center; gap: 8px; min-height: var(--copio-touch-target-min); padding: 4px 12px 4px 6px; border-radius: var(--copio-radius-md); background: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-primary); color: var(--copio-color-text); font-size: 12px; font-weight: 600; cursor: pointer; } .copio-stack-thumb { width: 30px; height: 36px; border-radius: 4px; object-fit: cover; border: 1px solid rgba(255, 255, 255, 0.35); background: #000; } /* Workbench & Filmstrip (Shadow Part: workbench) */ .copio-workbench, .copio-workbench-stage { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; background: var(--copio-color-bg); overflow: hidden; min-height: 0; width: 100%; } .copio-workbench-main { flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%; overflow: hidden; } .copio-stage-canvas, .copio-canvas-viewport { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: 16px 20px 44px 20px; background: var(--copio-color-stage-bg); min-height: 180px; } .copio-canvas-viewport.has-card-switcher { padding-top: 66px; } .copio-canvas-viewport.is-cropping { padding: 74px 26px 26px 26px; } /* Card Side Switcher */ .copio-card-side-switcher { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; display: inline-flex; gap: 4px; padding: 3px; background: var(--copio-color-surface-overlay, rgba(15, 22, 32, 0.88)); border: 1px solid var(--copio-color-border-strong); border-radius: var(--copio-radius-pill); backdrop-filter: blur(8px); } .copio-side-pill { appearance: none; border: none; background: transparent; color: var(--copio-color-text-muted); font-family: inherit; font-size: 11px; font-weight: 600; padding: 6px 12px; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); border-radius: var(--copio-radius-pill); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; } .copio-side-pill[aria-selected=\"true\"] { background: var(--copio-color-primary); color: var(--copio-color-primary-contrast); } .copio-stage-figure, .copio-canvas-wrapper { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; } .copio-stage-canvas img, .copio-stage-img, .copio-stage-image { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: var(--copio-shadow-elevated); border-radius: var(--copio-radius-sm); user-select: none; } .copio-crop-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; z-index: 8; touch-action: none; } .copio-crop-box { position: absolute; border: 2px solid var(--copio-color-primary); box-shadow: 0 0 0 9999px rgba(5, 8, 14, 0.68); cursor: move; touch-action: none; box-sizing: border-box; } /* Rule-of-thirds crop grid */ .copio-crop-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, rgba(56, 189, 248, 0.28) 1px, transparent 1px), linear-gradient(to bottom, rgba(56, 189, 248, 0.28) 1px, transparent 1px); background-size: 33.333% 33.333%; } /* 48px x 48px Touch Target Handles (exceeds 44px requirement) */ .copio-crop-handle { position: absolute; width: var(--copio-crop-handle-hit); height: var(--copio-crop-handle-hit); min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; z-index: 10; touch-action: none; box-sizing: border-box; } .copio-crop-handle::after { content: ''; width: var(--copio-crop-handle-visual); height: var(--copio-crop-handle-visual); border-radius: 50%; background: var(--copio-color-primary); border: 2.5px solid #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); transition: transform 120ms ease; box-sizing: border-box; } .copio-crop-handle:hover::after, .copio-crop-handle:active::after { transform: scale(1.25); background: var(--copio-color-success, #22c55e); } .copio-crop-handle.nw { top: -24px; left: -24px; cursor: nwse-resize; } .copio-crop-handle.ne { top: -24px; right: -24px; cursor: nesw-resize; } .copio-crop-handle.sw { bottom: -24px; left: -24px; cursor: nesw-resize; } .copio-crop-handle.se { bottom: -24px; right: -24px; cursor: nwse-resize; } .copio-crop-handle.n, .copio-crop-handle.edge-n { top: -24px; left: calc(50% - 24px); cursor: ns-resize; } .copio-crop-handle.s, .copio-crop-handle.edge-s { bottom: -24px; left: calc(50% - 24px); cursor: ns-resize; } .copio-crop-handle.w, .copio-crop-handle.edge-w { left: -24px; top: calc(50% - 24px); cursor: ew-resize; } .copio-crop-handle.e, .copio-crop-handle.edge-e { right: -24px; top: calc(50% - 24px); cursor: ew-resize; } /* 4-Corner Perspective Quad Crop (CPO-075) */ .copio-crop-quad-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; } .copio-crop-mask { fill: rgba(5, 8, 14, 0.68); } .copio-crop-quad-outline { fill: rgba(56, 189, 248, 0.06); stroke: var(--copio-color-primary); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: auto; cursor: move; } .copio-crop-quad-grid { stroke: rgba(56, 189, 248, 0.35); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; } .copio-quad-handle { transform: translate(-50%, -50%); cursor: grab; } .copio-quad-handle:active { cursor: grabbing; } .copio-crop-magnifier { position: absolute; width: 96px; height: 96px; border-radius: 50%; border: 2.5px solid var(--copio-color-primary); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55); pointer-events: none; z-index: 20; display: none; background: #0b0f17; transform: translate(-50%, -125%); } /* Filmstrip & Reorder Tray */ .copio-filmstrip, .copio-filmstrip-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); overflow-x: auto; min-height: 80px; flex-shrink: 0; scrollbar-width: thin; } .copio-filmstrip-scroll { display: flex; align-items: center; gap: 8px; } .copio-filmstrip-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; } .copio-thumb-container { position: relative; width: 56px; height: 70px; border-radius: var(--copio-radius-sm); overflow: hidden; background: var(--copio-color-surface-elevated, #1c2736); border: 2px solid var(--copio-color-border); cursor: pointer; transition: all var(--copio-transition-fast); display: flex; align-items: center; justify-content: center; } .copio-filmstrip-item.is-active .copio-thumb-container { border-color: var(--copio-color-primary); box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25); } .copio-thumb-num { position: absolute; bottom: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: rgba(15, 23, 42, 0.85); color: #f8fafc; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; } .copio-thumb-reorder { display: flex; align-items: center; gap: 4px; } .copio-reorder-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text-muted); border-radius: 4px; font-size: 9px; padding: 2px 5px; cursor: pointer; } .copio-reorder-btn:disabled { opacity: 0.35; cursor: not-allowed; } .copio-thumb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; } /* Edit Action Toolbar & Primary Completion Dock */ .copio-toolbar, .copio-controls-dock { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-border); min-height: 56px; flex-shrink: 0; z-index: 6; } .copio-edit-toolbar, .copio-toolbar-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; width: 100%; } .copio-toolbar-tools .copio-tool-btn { flex: 1 1 0; min-width: 0; } .copio-toolbar-actions { display: flex; align-items: center; gap: 8px; width: 100%; flex-shrink: 0; } .copio-toolbar-actions .copio-btn-primary { width: 100%; } .copio-tool-btn { appearance: none; border: 1px solid var(--copio-color-border); background: var(--copio-color-surface-elevated); color: var(--copio-color-text); font-family: inherit; font-size: 11px; font-weight: 600; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 4px 6px; border-radius: var(--copio-radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; transition: all var(--copio-transition-fast); } .copio-tool-btn:hover:not(:disabled) { border-color: var(--copio-color-border-strong); background: rgba(255, 255, 255, 0.06); } .copio-tool-btn[aria-pressed=\"true\"] { background: rgba(56, 189, 248, 0.16); color: var(--copio-color-primary); border-color: var(--copio-color-primary); } .copio-tool-btn.danger { color: #fca5a5; } .copio-tool-btn.danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.45); } .copio-toast-region { position: absolute; bottom: 124px; left: 12px; right: 12px; z-index: 30; display: flex; flex-direction: column; gap: 8px; pointer-events: none; } .copio-toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--copio-radius-md); background: #0f172a; color: #f8fafc; border: 1px solid var(--copio-color-primary); box-shadow: var(--copio-shadow-elevated); font-size: 12px; font-weight: 500; position: relative; overflow: hidden; transition: opacity 200ms ease-out; } .copio-toast-warning { border-color: #f59e0b; background: #1c1917; color: #fef3c7; } .copio-toast-info { border-color: var(--copio-color-primary); background: #0f172a; color: #f8fafc; } .copio-toast-fade-out { opacity: 0; } .copio-toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--copio-color-primary); transition: width 100ms linear; } .copio-toast-undo-btn, .copio-btn-toast-undo { appearance: none; border: 1px solid rgba(56, 189, 248, 0.45); background: rgba(56, 189, 248, 0.16); color: #38bdf8; font-family: inherit; font-size: 12px; font-weight: 700; min-height: var(--copio-touch-target-min); min-width: var(--copio-touch-target-min); padding: 0 12px; border-radius: var(--copio-radius-sm); cursor: pointer; flex-shrink: 0; } .copio-ocr-content { display: flex; flex-direction: column; gap: 8px; } .copio-ocr-text { margin: 0; padding: 10px; max-height: 180px; overflow: auto; background: var(--copio-color-bg); color: var(--copio-color-text); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-sm); font-family: var(--copio-font-mono); font-size: 11px; line-height: 1.5; white-space: pre-wrap; } .copio-ocr-meta { font-size: 11px; color: var(--copio-color-text-muted); } /* Slide-up OCR Extraction Sheet */ .copio-ocr-sheet { position: absolute; inset: auto 0 0 0; max-height: 78%; background: var(--copio-color-surface); border-top: 1px solid var(--copio-color-primary); border-radius: 16px 16px 0 0; box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.65); z-index: 25; display: flex; flex-direction: column; padding: 14px; gap: 10px; } .copio-ocr-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .copio-ocr-textarea { width: 100%; min-height: 130px; flex: 1; resize: none; background: var(--copio-color-bg); color: var(--copio-color-text); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-sm); padding: 10px; font-family: var(--copio-font-mono); font-size: 11px; line-height: 1.5; } /* Container-Scoped Toast Stack */ .sl-toast-stack, .copio-toast-stack-scoped { position: absolute !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; width: 100% !important; max-width: 100% !important; padding: var(--copio-spacing-md) !important; box-sizing: border-box !important; z-index: 1000 !important; pointer-events: none; } .sl-toast-stack sl-alert, .copio-toast-stack-scoped sl-alert { pointer-events: auto; margin-top: var(--copio-spacing-sm); } /* ========================================================================== 4. @container BREAKPOINTS (Strictly Container Queries) ========================================================================== */ @container copio-scanner (max-width: 400px) { .copio-header { padding: 6px 10px; min-height: 52px; } .copio-header-left { flex-direction: column; align-items: flex-start; gap: 2px; } .copio-mode-badge { font-size: 10px; padding: 2px 6px; } .copio-subtitle { display: none; } .copio-stage-canvas, .copio-canvas-viewport { min-height: 120px; padding: 10px 12px 24px 12px; } .copio-filmstrip, .copio-filmstrip-bar { gap: 6px; padding: 6px 8px; min-height: 64px; } .copio-toolbar, .copio-controls-dock { gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)) 10px; } .copio-tool-btn { font-size: 10px; padding: 3px 4px; } .copio-btn { padding: 0 8px; font-size: 12px; } } @container copio-scanner (min-width: 401px) and (max-width: 767px) { .copio-header { padding: var(--copio-spacing-sm) var(--copio-spacing-md); } .copio-tool-btn { flex-direction: row; font-size: 12px; gap: 6px; } } @container copio-scanner (min-width: 768px) { .copio-header { padding: var(--copio-spacing-md) var(--copio-spacing-lg); } .copio-workbench-main { flex-direction: row; } .copio-filmstrip, .copio-filmstrip-bar { order: -1; flex-direction: column; width: 168px; height: 100%; border-top: none; border-right: 1px solid var(--copio-color-border); overflow-y: auto; overflow-x: hidden; padding: 12px; } .copio-filmstrip-scroll { flex-direction: column; width: 100%; } .copio-thumb-container { width: 112px; height: 140px; } .copio-toolbar, .copio-controls-dock { flex-direction: row; align-items: center; justify-content: space-between; } .copio-toolbar-tools { width: auto; flex: 1; gap: 6px; } .copio-toolbar-tools .copio-tool-btn { flex: 1 1 56px; min-width: var(--copio-touch-target-min); } .copio-toolbar-actions { width: auto; min-width: 200px; } } /* Mobile Handoff Sender Mode (CPO-094) */ .copio-handoff-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(2, 132, 199, 0.16); border: 1px solid rgba(56, 189, 248, 0.35); border-radius: var(--copio-radius-pill); font-size: 11px; font-weight: 600; color: var(--copio-color-text); backdrop-filter: blur(8px); } .copio-handoff-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--copio-color-warning); display: inline-block; flex-shrink: 0; } .copio-handoff-dot.connected { background: var(--copio-color-success); box-shadow: 0 0 8px rgba(34, 197, 94, 0.6); } .copio-handoff-dot.connecting, .copio-handoff-dot.reconnecting { background: var(--copio-color-warning); animation: copio-pulse 1.4s ease-in-out infinite; } .copio-handoff-dot.disconnected, .copio-handoff-dot.error { background: var(--copio-color-danger); } .copio-handoff-retry-btn { appearance: none; border: none; background: var(--copio-color-surface-elevated); color: var(--copio-color-text); font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: var(--copio-radius-sm); cursor: pointer; } .copio-handoff-progress-view, .copio-handoff-confirm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--copio-spacing-xl); } .copio-handoff-progress-view { z-index: 50; background: var(--copio-color-surface-overlay, rgba(15, 22, 32, 0.92)); backdrop-filter: blur(12px); } .copio-handoff-confirm { z-index: 60; background: var(--copio-color-bg); } .copio-handoff-progress-card, .copio-handoff-confirm-card { width: 100%; max-width: 340px; background: var(--copio-color-surface); border: 1px solid var(--copio-color-border-strong); border-radius: var(--copio-radius-lg); padding: var(--copio-spacing-xl); display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--copio-spacing-md); box-shadow: var(--copio-shadow-elevated); } .copio-handoff-spinner { width: 32px; height: 32px; border: 3px solid rgba(148, 163, 184, 0.2); border-top-color: var(--copio-color-primary); border-radius: 50%; animation: copio-spin 0.8s linear infinite; } .copio-handoff-progress-title, .copio-handoff-confirm-title { font-size: 16px; font-weight: 700; color: var(--copio-color-text); margin: 0; } .copio-handoff-progress-track { width: 100%; height: 8px; background: var(--copio-color-surface-elevated); border-radius: var(--copio-radius-pill); overflow: hidden; border: 1px solid var(--copio-color-border); } .copio-handoff-progress-bar { height: 100%; background: linear-gradient(90deg, var(--copio-color-primary), #0284c7); border-radius: var(--copio-radius-pill); transition: width var(--copio-transition-fast); } .copio-handoff-progress-desc, .copio-handoff-confirm-subtitle { font-size: 12px; color: var(--copio-color-text-muted); margin: 0; } .copio-handoff-confirm-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(34, 197, 94, 0.15); color: var(--copio-color-success); border: 1px solid rgba(34, 197, 94, 0.35); display: flex; align-items: center; justify-content: center; } .copio-handoff-confirm-badge { display: inline-flex; align-items: center; padding: 4px 12px; background: var(--copio-color-surface-elevated); border: 1px solid var(--copio-color-border); border-radius: var(--copio-radius-pill); font-size: 12px; font-weight: 600; color: var(--copio-color-primary); } .copio-handoff-confirm-actions { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } `",
2852
5033
  "description": "Copio Scanner Encapsulated Styles & Design Tokens (CPO-032 / CPO-038)\n\nProvides constructable stylesheets and adoptedStyleSheets architecture for <copio-scanner>\nwith complete Shadow DOM style encapsulation, zero global leakage, and hostile host immunity."
2853
5034
  },
2854
5035
  {
@@ -2952,7 +5133,7 @@
2952
5133
  "type": {
2953
5134
  "text": "string"
2954
5135
  },
2955
- "default": "'0.1.4'"
5136
+ "default": "'0.1.6'"
2956
5137
  }
2957
5138
  ],
2958
5139
  "exports": [