@copio/sdk 0.1.2 → 0.1.3

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 (96) hide show
  1. package/LICENSE +661 -0
  2. package/LICENSE-COMMERCIAL.md +43 -0
  3. package/README.md +6 -1
  4. package/THIRD_PARTY_NOTICES.md +416 -0
  5. package/dist/adapters/image/canvas2d-adapter.js +1 -1
  6. package/dist/adapters/image/index.js +1 -1
  7. package/dist/adapters/image/null-image-processor-adapter.js +1 -1
  8. package/dist/adapters/index.js +1 -1
  9. package/dist/adapters/indexeddb-adapter.js +1 -1
  10. package/dist/adapters/memory-adapter.js +1 -1
  11. package/dist/adapters/ocr/index.js +1 -1
  12. package/dist/adapters/ocr/null-ocr-adapter.js +1 -1
  13. package/dist/adapters/ocr/tesseract-wasm-adapter.js +1 -1
  14. package/dist/adapters/pdf/index.js +1 -1
  15. package/dist/adapters/pdf/null-pdf-adapter.js +1 -1
  16. package/dist/adapters/pdf/pdfkit-adapter.js +1 -1
  17. package/dist/adapters/storage/index.js +1 -1
  18. package/dist/adapters/storage/indexeddb-adapter.js +1 -1
  19. package/dist/adapters/storage/memory-adapter.js +1 -1
  20. package/dist/adapters/sync/index.js +1 -1
  21. package/dist/adapters/sync/null-sync-adapter.js +1 -1
  22. package/dist/adapters/sync/peerjs-adapter.js +1 -1
  23. package/dist/cdn.js +106 -249
  24. package/dist/{chunk-A5G52Q2W.js → chunk-2AB5L3Y2.js} +2 -2
  25. package/dist/{chunk-DGGK5KEX.js → chunk-4ICUYKSR.js} +2 -2
  26. package/dist/{chunk-IZOWC74B.js → chunk-4XWSVHFW.js} +69 -198
  27. package/dist/{chunk-IUBYFIV6.js → chunk-4YYY7PHH.js} +2 -2
  28. package/dist/{chunk-N7Q34F2P.js → chunk-534NMCRQ.js} +4 -4
  29. package/dist/{chunk-UCV3MQ6I.js → chunk-5KUKBKWL.js} +1 -1
  30. package/dist/{chunk-E7JYVRJA.js → chunk-5OTO5WFV.js} +2 -2
  31. package/dist/{chunk-N4R55VRR.js → chunk-6DSLE3AY.js} +1 -1
  32. package/dist/chunk-DIU5BGU5.js +2 -0
  33. package/dist/chunk-DOKG4LX2.js +2 -0
  34. package/dist/{chunk-B2EK6INF.js → chunk-DY5ZSP4Q.js} +2 -2
  35. package/dist/chunk-FAVTIE3M.js +8 -0
  36. package/dist/chunk-FQRADJY6.js +2 -0
  37. package/dist/chunk-IH2AI54D.js +2 -0
  38. package/dist/{chunk-PVNRK4OH.js → chunk-J7HWZNIP.js} +2 -2
  39. package/dist/{chunk-SH4P4XSZ.js → chunk-KH5JE65X.js} +2 -2
  40. package/dist/chunk-MEE2NNYB.js +2 -0
  41. package/dist/{chunk-KIMVF5UG.js → chunk-NEEWG3OP.js} +1 -1
  42. package/dist/{chunk-YHLOPPXM.js → chunk-O6FQFVKY.js} +1 -1
  43. package/dist/chunk-RDCHJL6F.js +2 -0
  44. package/dist/{chunk-B7HT2X67.js → chunk-U3V3VZGO.js} +2 -2
  45. package/dist/{chunk-HN3336JN.js → chunk-ULTSZWZO.js} +1 -1
  46. package/dist/{chunk-BKZEOOH4.js → chunk-WETG2JD7.js} +2 -2
  47. package/dist/{chunk-V2FP4EEH.js → chunk-YNY65JUJ.js} +1 -1
  48. package/dist/chunk-ZT72PD2C.js +2 -0
  49. package/dist/core.js +1 -1
  50. package/dist/custom-elements.json +264 -102
  51. package/dist/export.js +1 -1
  52. package/dist/index.js +11 -19
  53. package/dist/ocr.js +1 -1
  54. package/dist/scanner.js +88 -217
  55. package/dist/sync.js +1 -1
  56. package/dist/types/js/adapters/storage/blob-store.d.ts +48 -0
  57. package/dist/types/js/adapters/storage/index.d.ts +11 -4
  58. package/dist/types/js/adapters/storage/indexeddb-adapter.d.ts +46 -9
  59. package/dist/types/js/adapters/storage/memory-adapter.d.ts +7 -0
  60. package/dist/types/js/adapters/storage/opfs-adapter.d.ts +160 -0
  61. package/dist/types/js/adapters/storage/storage-port.d.ts +7 -0
  62. package/dist/types/js/components/copio-header.d.ts +4 -0
  63. package/dist/types/js/routes/doc/copio-carousel.d.ts +1 -2
  64. package/dist/types/js/routes/doc/copio-images.d.ts +0 -4
  65. package/dist/types/js/routes/home/copio-row.d.ts +2 -2
  66. package/dist/types/js/routes/ocr/copio-doc-ocr-dialog.d.ts +0 -2
  67. package/dist/types/js/services/doc-repository.d.ts +1 -0
  68. package/dist/types/js/services/export-utils.d.ts +8 -12
  69. package/dist/types/js/services/ocr-service.d.ts +2 -1
  70. package/dist/types/js/utils/module-loader.d.ts +0 -6
  71. package/dist/types/js/utils/utils.d.ts +5 -3
  72. package/dist/types/sdk/core.d.ts +13 -2
  73. package/dist/types/sdk/events.d.ts +4 -4
  74. package/dist/types/sdk/index.d.ts +3 -3
  75. package/dist/types/sdk/models.d.ts +66 -0
  76. package/dist/types/sdk/styles.d.ts +1 -1
  77. package/dist/types/sdk/version.d.ts +1 -1
  78. package/package.json +4 -3
  79. package/sdk/cdn.js +1 -0
  80. package/sdk/core.js +60 -0
  81. package/sdk/events.js +3 -2
  82. package/sdk/index.js +4 -3
  83. package/sdk/license.js +1 -0
  84. package/sdk/models.js +79 -3
  85. package/sdk/scanner.js +45 -7
  86. package/sdk/styles.js +12 -5
  87. package/sdk/sync.js +1 -0
  88. package/sdk/version.js +2 -1
  89. package/dist/chunk-36F637QU.js +0 -2
  90. package/dist/chunk-4JPEWIT4.js +0 -2
  91. package/dist/chunk-B5BEYYR2.js +0 -8
  92. package/dist/chunk-G65H4ZTJ.js +0 -2
  93. package/dist/chunk-HS6GDZIS.js +0 -2
  94. package/dist/chunk-K6YP7EET.js +0 -8
  95. package/dist/chunk-LI54F6PA.js +0 -2
  96. package/dist/chunk-OI4WCW7E.js +0 -2
@@ -479,6 +479,30 @@
479
479
  }
480
480
  ]
481
481
  },
482
+ {
483
+ "kind": "method",
484
+ "name": "renderEdits",
485
+ "parameters": [
486
+ {
487
+ "name": "src",
488
+ "type": {
489
+ "text": "string"
490
+ }
491
+ },
492
+ {
493
+ "name": "edits",
494
+ "type": {
495
+ "text": "Object"
496
+ }
497
+ }
498
+ ],
499
+ "description": "Renders edits against an image source using the configured ImageProcessorPort.",
500
+ "return": {
501
+ "type": {
502
+ "text": "Promise<string>"
503
+ }
504
+ }
505
+ },
482
506
  {
483
507
  "kind": "field",
484
508
  "name": "docs",
@@ -795,7 +819,7 @@
795
819
  "default": "{}",
796
820
  "optional": true,
797
821
  "type": {
798
- "text": "@param {boolean} [options.download=false] - Whether to trigger browser download\n * @param {Function} [options.onProgress] - Progress callback (done, total)\n * "
822
+ "text": "@param {boolean} [options.download=false] - Whether to trigger browser download\n * @param {boolean} [options.searchable=false] - Whether to generate searchable PDF with invisible OCR text layer\n * @param {Function} [options.onProgress] - Progress callback (done, total)\n * "
799
823
  }
800
824
  }
801
825
  ],
@@ -822,7 +846,7 @@
822
846
  "default": "{}",
823
847
  "optional": true,
824
848
  "type": {
825
- "text": "@param {boolean} [options.download=false] - Whether to trigger browser download\n * @param {Function} [options.onProgress] - Progress callback (done, total)\n * "
849
+ "text": "@param {boolean} [options.download=false] - Whether to trigger browser download\n * @param {boolean} [options.searchable=false] - Whether to generate searchable PDF with invisible OCR text layer\n * @param {Function} [options.onProgress] - Progress callback (done, total)\n * "
826
850
  }
827
851
  }
828
852
  ],
@@ -1069,6 +1093,30 @@
1069
1093
  "module": "sdk/core.js"
1070
1094
  }
1071
1095
  },
1096
+ {
1097
+ "kind": "js",
1098
+ "name": "rotateCrop",
1099
+ "declaration": {
1100
+ "name": "rotateCrop",
1101
+ "module": "sdk/core.js"
1102
+ }
1103
+ },
1104
+ {
1105
+ "kind": "js",
1106
+ "name": "cropRotatedToOriginal",
1107
+ "declaration": {
1108
+ "name": "cropRotatedToOriginal",
1109
+ "module": "sdk/core.js"
1110
+ }
1111
+ },
1112
+ {
1113
+ "kind": "js",
1114
+ "name": "cropOriginalToRotated",
1115
+ "declaration": {
1116
+ "name": "cropOriginalToRotated",
1117
+ "module": "sdk/core.js"
1118
+ }
1119
+ },
1072
1120
  {
1073
1121
  "kind": "js",
1074
1122
  "name": "randomId",
@@ -1465,14 +1513,6 @@
1465
1513
  "module": "../js/services/export-utils.js"
1466
1514
  }
1467
1515
  },
1468
- {
1469
- "kind": "js",
1470
- "name": "exportDocumentAsMarkdown",
1471
- "declaration": {
1472
- "name": "exportDocumentAsMarkdown",
1473
- "module": "../js/services/export-utils.js"
1474
- }
1475
- },
1476
1516
  {
1477
1517
  "kind": "js",
1478
1518
  "name": "notify",
@@ -1617,14 +1657,6 @@
1617
1657
  "module": "../js/utils/module-loader.js"
1618
1658
  }
1619
1659
  },
1620
- {
1621
- "kind": "js",
1622
- "name": "loadMarked",
1623
- "declaration": {
1624
- "name": "loadMarked",
1625
- "module": "../js/utils/module-loader.js"
1626
- }
1627
- },
1628
1660
  {
1629
1661
  "kind": "js",
1630
1662
  "name": "loadPeerJs",
@@ -1689,6 +1721,22 @@
1689
1721
  "module": "../js/adapters/storage/index.js"
1690
1722
  }
1691
1723
  },
1724
+ {
1725
+ "kind": "js",
1726
+ "name": "OpfsStorageAdapter",
1727
+ "declaration": {
1728
+ "name": "OpfsStorageAdapter",
1729
+ "module": "../js/adapters/storage/index.js"
1730
+ }
1731
+ },
1732
+ {
1733
+ "kind": "js",
1734
+ "name": "probeOpfs",
1735
+ "declaration": {
1736
+ "name": "probeOpfs",
1737
+ "module": "../js/adapters/storage/index.js"
1738
+ }
1739
+ },
1692
1740
  {
1693
1741
  "kind": "js",
1694
1742
  "name": "createDefaultAdapter",
@@ -1943,6 +1991,85 @@
1943
1991
  }
1944
1992
  }
1945
1993
  },
1994
+ {
1995
+ "kind": "function",
1996
+ "name": "rotateCrop",
1997
+ "parameters": [
1998
+ {
1999
+ "name": "crop",
2000
+ "type": {
2001
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2002
+ }
2003
+ },
2004
+ {
2005
+ "name": "rotation",
2006
+ "default": "0",
2007
+ "description": "Clockwise rotation angle in degrees",
2008
+ "optional": true,
2009
+ "type": {
2010
+ "text": "number"
2011
+ }
2012
+ }
2013
+ ],
2014
+ "description": "Transforms normalized crop coordinates through a clockwise rotation angle (0, 90, 180, 270).",
2015
+ "return": {
2016
+ "type": {
2017
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2018
+ }
2019
+ }
2020
+ },
2021
+ {
2022
+ "kind": "function",
2023
+ "name": "cropOriginalToRotated",
2024
+ "parameters": [
2025
+ {
2026
+ "name": "crop",
2027
+ "type": {
2028
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2029
+ }
2030
+ },
2031
+ {
2032
+ "name": "rotation",
2033
+ "default": "0",
2034
+ "optional": true,
2035
+ "type": {
2036
+ "text": "number"
2037
+ }
2038
+ }
2039
+ ],
2040
+ "description": "Maps normalized crop coordinates on an original unrotated image to a rotated canvas coordinate frame.",
2041
+ "return": {
2042
+ "type": {
2043
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2044
+ }
2045
+ }
2046
+ },
2047
+ {
2048
+ "kind": "function",
2049
+ "name": "cropRotatedToOriginal",
2050
+ "parameters": [
2051
+ {
2052
+ "name": "crop",
2053
+ "type": {
2054
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2055
+ }
2056
+ },
2057
+ {
2058
+ "name": "rotation",
2059
+ "default": "0",
2060
+ "optional": true,
2061
+ "type": {
2062
+ "text": "number"
2063
+ }
2064
+ }
2065
+ ],
2066
+ "description": "Maps normalized crop coordinates on a rotated canvas back to original unrotated image coordinates.",
2067
+ "return": {
2068
+ "type": {
2069
+ "text": "{ x: number, y: number, w: number, h: number } | null"
2070
+ }
2071
+ }
2072
+ },
1946
2073
  {
1947
2074
  "kind": "class",
1948
2075
  "description": "Page domain entity.",
@@ -1992,6 +2119,18 @@
1992
2119
  {
1993
2120
  "kind": "field",
1994
2121
  "name": "ocrConfidence"
2122
+ },
2123
+ {
2124
+ "kind": "field",
2125
+ "name": "ocrWords"
2126
+ },
2127
+ {
2128
+ "kind": "field",
2129
+ "name": "ocrWidth"
2130
+ },
2131
+ {
2132
+ "kind": "field",
2133
+ "name": "ocrHeight"
1995
2134
  }
1996
2135
  ]
1997
2136
  },
@@ -2121,6 +2260,30 @@
2121
2260
  "module": "sdk/models.js"
2122
2261
  }
2123
2262
  },
2263
+ {
2264
+ "kind": "js",
2265
+ "name": "rotateCrop",
2266
+ "declaration": {
2267
+ "name": "rotateCrop",
2268
+ "module": "sdk/models.js"
2269
+ }
2270
+ },
2271
+ {
2272
+ "kind": "js",
2273
+ "name": "cropOriginalToRotated",
2274
+ "declaration": {
2275
+ "name": "cropOriginalToRotated",
2276
+ "module": "sdk/models.js"
2277
+ }
2278
+ },
2279
+ {
2280
+ "kind": "js",
2281
+ "name": "cropRotatedToOriginal",
2282
+ "declaration": {
2283
+ "name": "cropRotatedToOriginal",
2284
+ "module": "sdk/models.js"
2285
+ }
2286
+ },
2124
2287
  {
2125
2288
  "kind": "js",
2126
2289
  "name": "Page",
@@ -2772,7 +2935,7 @@
2772
2935
  {
2773
2936
  "kind": "variable",
2774
2937
  "name": "scannerCss",
2775
- "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; } .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: #000; border: 2px solid var(--copio-color-border); cursor: pointer; transition: all var(--copio-transition-fast); } .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 { width: 100%; height: 100%; object-fit: cover; } /* 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: 84px; } .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; } } `",
2938
+ "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; } } `",
2776
2939
  "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."
2777
2940
  },
2778
2941
  {
@@ -2876,7 +3039,7 @@
2876
3039
  "type": {
2877
3040
  "text": "string"
2878
3041
  },
2879
- "default": "'0.1.2'"
3042
+ "default": "'0.1.3'"
2880
3043
  }
2881
3044
  ],
2882
3045
  "exports": [
@@ -2995,7 +3158,7 @@
2995
3158
  },
2996
3159
  {
2997
3160
  "kind": "field",
2998
- "name": "hasMarkdown",
3161
+ "name": "visiblePages",
2999
3162
  "readonly": true
3000
3163
  },
3001
3164
  {
@@ -3081,11 +3244,11 @@
3081
3244
  },
3082
3245
  {
3083
3246
  "kind": "method",
3084
- "name": "handleDownloadImages"
3247
+ "name": "handleDownloadSearchablePdf"
3085
3248
  },
3086
3249
  {
3087
3250
  "kind": "method",
3088
- "name": "handleDownloadMarkdown"
3251
+ "name": "handleDownloadImages"
3089
3252
  },
3090
3253
  {
3091
3254
  "kind": "field",
@@ -3190,12 +3353,6 @@
3190
3353
  "type": {
3191
3354
  "text": "CustomEvent"
3192
3355
  }
3193
- },
3194
- {
3195
- "name": "doc:download-markdown",
3196
- "type": {
3197
- "text": "CustomEvent"
3198
- }
3199
3356
  }
3200
3357
  ],
3201
3358
  "attributes": [
@@ -3286,12 +3443,12 @@
3286
3443
  "members": [
3287
3444
  {
3288
3445
  "kind": "field",
3289
- "name": "hasImages",
3446
+ "name": "visibleImages",
3290
3447
  "readonly": true
3291
3448
  },
3292
3449
  {
3293
3450
  "kind": "field",
3294
- "name": "hasMarkdown",
3451
+ "name": "hasImages",
3295
3452
  "readonly": true
3296
3453
  },
3297
3454
  {
@@ -3419,12 +3576,6 @@
3419
3576
  "type": {
3420
3577
  "text": "CustomEvent"
3421
3578
  }
3422
- },
3423
- {
3424
- "name": "doc:download-markdown",
3425
- "type": {
3426
- "text": "CustomEvent"
3427
- }
3428
3579
  }
3429
3580
  ],
3430
3581
  "attributes": [
@@ -3549,15 +3700,6 @@
3549
3700
  },
3550
3701
  "default": "null"
3551
3702
  },
3552
- {
3553
- "kind": "field",
3554
- "name": "#textIndex",
3555
- "privacy": "private",
3556
- "type": {
3557
- "text": "null"
3558
- },
3559
- "default": "null"
3560
- },
3561
3703
  {
3562
3704
  "kind": "field",
3563
3705
  "name": "#isInitialized",
@@ -3711,10 +3853,6 @@
3711
3853
  }
3712
3854
  ]
3713
3855
  },
3714
- {
3715
- "kind": "method",
3716
- "name": "addBlankNote"
3717
- },
3718
3856
  {
3719
3857
  "kind": "method",
3720
3858
  "name": "downloadImage",
@@ -3724,23 +3862,6 @@
3724
3862
  }
3725
3863
  ]
3726
3864
  },
3727
- {
3728
- "kind": "method",
3729
- "name": "openTextDialog",
3730
- "parameters": [
3731
- {
3732
- "name": "index"
3733
- }
3734
- ]
3735
- },
3736
- {
3737
- "kind": "method",
3738
- "name": "applyTextEdit"
3739
- },
3740
- {
3741
- "kind": "method",
3742
- "name": "closeTextDialog"
3743
- },
3744
3865
  {
3745
3866
  "kind": "method",
3746
3867
  "name": "showImageData",
@@ -3955,18 +4076,10 @@
3955
4076
  "kind": "field",
3956
4077
  "name": "copyText"
3957
4078
  },
3958
- {
3959
- "kind": "field",
3960
- "name": "downloadMarkdown"
3961
- },
3962
4079
  {
3963
4080
  "kind": "field",
3964
4081
  "name": "downloadText"
3965
4082
  },
3966
- {
3967
- "kind": "field",
3968
- "name": "saveAsNote"
3969
- },
3970
4083
  {
3971
4084
  "kind": "field",
3972
4085
  "name": "_isSinglePage",
@@ -4312,6 +4425,20 @@
4312
4425
  },
4313
4426
  "default": "null"
4314
4427
  },
4428
+ {
4429
+ "kind": "field",
4430
+ "name": "#readyResolver",
4431
+ "privacy": "private",
4432
+ "type": {
4433
+ "text": "null"
4434
+ },
4435
+ "default": "null"
4436
+ },
4437
+ {
4438
+ "kind": "field",
4439
+ "name": "ready",
4440
+ "default": "new Promise((resolve) => { this.#readyResolver = resolve; })"
4441
+ },
4315
4442
  {
4316
4443
  "kind": "field",
4317
4444
  "name": "store",
@@ -4457,15 +4584,6 @@
4457
4584
  }
4458
4585
  ]
4459
4586
  },
4460
- {
4461
- "kind": "method",
4462
- "name": "handleRowDownloadMarkdown",
4463
- "parameters": [
4464
- {
4465
- "name": "e"
4466
- }
4467
- ]
4468
- },
4469
4587
  {
4470
4588
  "kind": "method",
4471
4589
  "name": "handleCarouselDownloadPdf",
@@ -4484,15 +4602,6 @@
4484
4602
  }
4485
4603
  ]
4486
4604
  },
4487
- {
4488
- "kind": "method",
4489
- "name": "handleCarouselDownloadMarkdown",
4490
- "parameters": [
4491
- {
4492
- "name": "e"
4493
- }
4494
- ]
4495
- },
4496
4605
  {
4497
4606
  "kind": "method",
4498
4607
  "name": "handleRowExtractOcr",
@@ -4512,15 +4621,6 @@
4512
4621
  ],
4513
4622
  "description": "Handle copio:ocr-page — fired by copio-images (page grid) or copio-carousel.\nDetermines the current document from the active route and opens the shared\nOCR dialog in single-page mode via openPage()."
4514
4623
  },
4515
- {
4516
- "kind": "method",
4517
- "name": "handleOcrSaveNote",
4518
- "parameters": [
4519
- {
4520
- "name": "e"
4521
- }
4522
- ]
4523
- },
4524
4624
  {
4525
4625
  "kind": "method",
4526
4626
  "name": "handleCarouselClose"
@@ -4545,6 +4645,18 @@
4545
4645
  "kind": "method",
4546
4646
  "name": "renderRows"
4547
4647
  },
4648
+ {
4649
+ "kind": "field",
4650
+ "name": "handleDismissDurabilityNotice"
4651
+ },
4652
+ {
4653
+ "kind": "method",
4654
+ "name": "handleExportAll"
4655
+ },
4656
+ {
4657
+ "kind": "method",
4658
+ "name": "renderDurabilityNotice"
4659
+ },
4548
4660
  {
4549
4661
  "kind": "field",
4550
4662
  "name": "docsData",
@@ -4583,10 +4695,29 @@
4583
4695
  },
4584
4696
  "default": "null"
4585
4697
  },
4698
+ {
4699
+ "kind": "field",
4700
+ "name": "storageInfo",
4701
+ "privacy": "public",
4702
+ "type": {
4703
+ "text": "null"
4704
+ },
4705
+ "default": "null",
4706
+ "attribute": "storageInfo"
4707
+ },
4586
4708
  {
4587
4709
  "kind": "field",
4588
4710
  "name": "docRepo",
4589
4711
  "default": "docRepository"
4712
+ },
4713
+ {
4714
+ "kind": "field",
4715
+ "name": "_durabilityNoticeDismissed",
4716
+ "privacy": "public",
4717
+ "type": {
4718
+ "text": "boolean"
4719
+ },
4720
+ "attribute": "_durabilityNoticeDismissed"
4590
4721
  }
4591
4722
  ],
4592
4723
  "attributes": [
@@ -4613,6 +4744,21 @@
4613
4744
  },
4614
4745
  "default": "null",
4615
4746
  "fieldName": "syncState"
4747
+ },
4748
+ {
4749
+ "name": "storageInfo",
4750
+ "type": {
4751
+ "text": "null"
4752
+ },
4753
+ "default": "null",
4754
+ "fieldName": "storageInfo"
4755
+ },
4756
+ {
4757
+ "name": "_durabilityNoticeDismissed",
4758
+ "type": {
4759
+ "text": "boolean"
4760
+ },
4761
+ "fieldName": "_durabilityNoticeDismissed"
4616
4762
  }
4617
4763
  ],
4618
4764
  "superclass": {
@@ -4686,6 +4832,15 @@
4686
4832
  "name": "_isPersisted",
4687
4833
  "privacy": "public",
4688
4834
  "attribute": "_isPersisted"
4835
+ },
4836
+ {
4837
+ "kind": "field",
4838
+ "name": "storageKind",
4839
+ "privacy": "public",
4840
+ "type": {
4841
+ "text": "string"
4842
+ },
4843
+ "attribute": "storageKind"
4689
4844
  }
4690
4845
  ],
4691
4846
  "events": [
@@ -4710,6 +4865,13 @@
4710
4865
  {
4711
4866
  "name": "_isPersisted",
4712
4867
  "fieldName": "_isPersisted"
4868
+ },
4869
+ {
4870
+ "name": "storageKind",
4871
+ "type": {
4872
+ "text": "string"
4873
+ },
4874
+ "fieldName": "storageKind"
4713
4875
  }
4714
4876
  ],
4715
4877
  "superclass": {