@monkvision/inspection-capture-web 4.5.6 → 5.0.0

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 (246) hide show
  1. package/README.md +134 -19
  2. package/lib/DamageDisclosure/DamageDisclosure.d.ts +44 -0
  3. package/lib/DamageDisclosure/DamageDisclosure.js +112 -0
  4. package/lib/DamageDisclosure/DamageDisclosure.styles.js +33 -0
  5. package/lib/DamageDisclosure/DamageDisclosureHOC.d.ts +27 -0
  6. package/lib/DamageDisclosure/DamageDisclosureHOC.js +45 -0
  7. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.d.ts +73 -0
  8. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.js +50 -0
  9. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.js +24 -0
  10. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.d.ts +52 -0
  11. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/DamageDisclosureHUDElements.js +22 -0
  12. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.d.ts +1 -0
  13. package/lib/DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUDElements/index.js +5 -0
  14. package/lib/DamageDisclosure/DamageDisclosureHUD/index.d.ts +2 -0
  15. package/lib/DamageDisclosure/DamageDisclosureHUD/index.js +20 -0
  16. package/lib/DamageDisclosure/hooks/index.d.ts +1 -0
  17. package/lib/DamageDisclosure/hooks/index.js +17 -0
  18. package/lib/DamageDisclosure/hooks/useDamageDisclosureState.d.ts +30 -0
  19. package/lib/DamageDisclosure/hooks/useDamageDisclosureState.js +55 -0
  20. package/lib/DamageDisclosure/index.d.ts +3 -0
  21. package/lib/DamageDisclosure/index.js +20 -0
  22. package/lib/PhotoCapture/PhotoCapture.d.ts +7 -5
  23. package/lib/PhotoCapture/PhotoCapture.js +27 -21
  24. package/lib/PhotoCapture/PhotoCapture.styles.js +0 -24
  25. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.d.ts +24 -7
  26. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUD.js +4 -4
  27. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.d.ts +21 -4
  28. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElements/PhotoCaptureHUDElements.js +10 -8
  29. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.d.ts +3 -4
  30. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/AddDamageButton/AddDamageButton.js +5 -4
  31. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.d.ts +1 -1
  32. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/PhotoCaptureHUDElementsSight.js +4 -3
  33. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.d.ts +3 -3
  34. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.js +5 -4
  35. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightGuideline/SightGuideline.styles.js +2 -2
  36. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/SightSlider/SightSlider.styles.js +3 -2
  37. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsSight/hooks.d.ts +2 -2
  38. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.d.ts +3 -3
  39. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.js +6 -4
  40. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/PhotoCaptureHUDTutorial.styles.js +10 -3
  41. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/hooks.d.ts +813 -0
  42. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDTutorial/hooks.js +23 -0
  43. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.d.ts +0 -1
  44. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/index.js +0 -1
  45. package/lib/PhotoCapture/PhotoCaptureHUD/index.d.ts +0 -6
  46. package/lib/PhotoCapture/PhotoCaptureHUD/index.js +0 -6
  47. package/lib/PhotoCapture/hooks/index.d.ts +0 -8
  48. package/lib/PhotoCapture/hooks/index.js +0 -8
  49. package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.d.ts +3 -0
  50. package/lib/PhotoCapture/hooks/usePhotoCaptureSightState.js +1 -1
  51. package/lib/PhotoCapture/hooks/usePhotoCaptureTutorial.d.ts +2 -2
  52. package/lib/VideoCapture/VideoCapture.d.ts +28 -0
  53. package/lib/VideoCapture/VideoCapture.js +81 -0
  54. package/lib/VideoCapture/VideoCapture.styles.js +9 -0
  55. package/lib/VideoCapture/VideoCaptureHOC.d.ts +27 -0
  56. package/lib/VideoCapture/VideoCaptureHOC.js +45 -0
  57. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.d.ts +44 -0
  58. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.js +158 -0
  59. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.js +14 -0
  60. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.d.ts +6 -0
  61. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.js +38 -0
  62. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.d.ts +33 -0
  63. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecording.types.js +2 -0
  64. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.d.ts +4873 -0
  65. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/VideoCaptureRecordingStyles.js +105 -0
  66. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.d.ts +2 -0
  67. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureRecording/index.js +5 -0
  68. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.d.ts +14 -0
  69. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/VideoCaptureTutorial.js +30 -0
  70. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.d.ts +1 -0
  71. package/lib/VideoCapture/VideoCaptureHUD/VideoCaptureTutorial/index.js +5 -0
  72. package/lib/VideoCapture/VideoCaptureHUD/index.d.ts +1 -0
  73. package/lib/VideoCapture/VideoCaptureHUD/index.js +5 -0
  74. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.d.ts +23 -0
  75. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.js +26 -0
  76. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.d.ts +12 -0
  77. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/PageLayoutItem.styles.js +72 -0
  78. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.d.ts +1 -0
  79. package/lib/VideoCapture/VideoCapturePageLayout/PageLayoutItem/index.js +5 -0
  80. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.d.ts +7 -0
  81. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.js +32 -0
  82. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.d.ts +12 -0
  83. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.styles.js +87 -0
  84. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.d.ts +22 -0
  85. package/lib/VideoCapture/VideoCapturePageLayout/VideoCapturePageLayout.types.js +2 -0
  86. package/lib/VideoCapture/VideoCapturePageLayout/index.d.ts +3 -0
  87. package/lib/VideoCapture/VideoCapturePageLayout/index.js +7 -0
  88. package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.d.ts +19 -0
  89. package/lib/VideoCapture/VideoCapturePermissions/VideoCapturePermissions.js +107 -0
  90. package/lib/VideoCapture/VideoCapturePermissions/index.d.ts +1 -0
  91. package/lib/VideoCapture/VideoCapturePermissions/index.js +5 -0
  92. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.d.ts +7 -0
  93. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.js +44 -0
  94. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.d.ts +2437 -0
  95. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.styles.js +60 -0
  96. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.d.ts +34 -0
  97. package/lib/VideoCapture/VideoCaptureProcessing/VideoCaptureProcessing.types.js +2 -0
  98. package/lib/VideoCapture/VideoCaptureProcessing/index.d.ts +2 -0
  99. package/lib/VideoCapture/VideoCaptureProcessing/index.js +5 -0
  100. package/lib/VideoCapture/hooks/index.d.ts +5 -0
  101. package/lib/VideoCapture/hooks/index.js +21 -0
  102. package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.d.ts +18 -0
  103. package/lib/VideoCapture/hooks/useFastMovementsDetection/fastMovementsDetection.js +45 -0
  104. package/lib/VideoCapture/hooks/useFastMovementsDetection/index.d.ts +2 -0
  105. package/lib/VideoCapture/hooks/useFastMovementsDetection/index.js +20 -0
  106. package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.d.ts +34 -0
  107. package/lib/VideoCapture/hooks/useFastMovementsDetection/useFastMovementsDetection.js +64 -0
  108. package/lib/VideoCapture/hooks/useFrameSelection/index.d.ts +1 -0
  109. package/lib/VideoCapture/hooks/useFrameSelection/index.js +17 -0
  110. package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.d.ts +16 -0
  111. package/lib/VideoCapture/hooks/useFrameSelection/laplaceScores.js +62 -0
  112. package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.d.ts +43 -0
  113. package/lib/VideoCapture/hooks/useFrameSelection/useFrameSelection.js +50 -0
  114. package/lib/VideoCapture/hooks/useVehicleWalkaround.d.ts +26 -0
  115. package/lib/VideoCapture/hooks/useVehicleWalkaround.js +39 -0
  116. package/lib/VideoCapture/hooks/useVideoRecording.d.ts +97 -0
  117. package/lib/VideoCapture/hooks/useVideoRecording.js +140 -0
  118. package/lib/VideoCapture/hooks/useVideoUploadQueue.d.ts +40 -0
  119. package/lib/VideoCapture/hooks/useVideoUploadQueue.js +51 -0
  120. package/lib/VideoCapture/index.d.ts +2 -0
  121. package/lib/VideoCapture/index.js +5 -0
  122. package/lib/assets/logos.asset.d.ts +1 -0
  123. package/lib/assets/logos.asset.js +4 -0
  124. package/lib/components/CancelButton/CancelButton.d.ts +14 -0
  125. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.js → components/CancelButton/CancelButton.js} +6 -6
  126. package/lib/components/CancelButton/index.d.ts +1 -0
  127. package/lib/components/CancelButton/index.js +5 -0
  128. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.d.ts → components/CloseUpShot/CloseUpShot.d.ts} +10 -4
  129. package/lib/components/CloseUpShot/CloseUpShot.js +34 -0
  130. package/lib/components/CloseUpShot/CloseUpShot.styles.d.ts +2 -0
  131. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.js → components/CloseUpShot/CloseUpShot.styles.js} +4 -3
  132. package/lib/components/CloseUpShot/hooks.d.ts +7 -0
  133. package/lib/components/CloseUpShot/hooks.js +25 -0
  134. package/lib/components/CloseUpShot/index.d.ts +1 -0
  135. package/lib/components/CloseUpShot/index.js +5 -0
  136. package/lib/components/Counter/Counter.d.ts +6 -0
  137. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.js → components/Counter/Counter.js} +9 -9
  138. package/lib/components/Counter/Counter.styles.d.ts +2 -0
  139. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.d.ts +6 -6
  140. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter → components/Counter}/hooks.js +6 -6
  141. package/lib/components/Counter/index.d.ts +2 -0
  142. package/lib/components/Counter/index.js +5 -0
  143. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.d.ts → components/HUDButtons/HUDButtons.d.ts} +4 -4
  144. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.js → components/HUDButtons/HUDButtons.js} +5 -5
  145. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons → components/HUDButtons}/hooks.d.ts +3 -3
  146. package/lib/components/HUDButtons/hooks.js +44 -0
  147. package/lib/components/HUDButtons/index.d.ts +1 -0
  148. package/lib/components/HUDButtons/index.js +5 -0
  149. package/lib/components/HUDOverlay/HUDOverlay.d.ts +7 -0
  150. package/lib/components/HUDOverlay/HUDOverlay.js +36 -0
  151. package/lib/components/HUDOverlay/HUDOverlay.styles.d.ts +2 -0
  152. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.d.ts +4 -4
  153. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay → components/HUDOverlay}/hooks.js +3 -3
  154. package/lib/components/HUDOverlay/index.d.ts +2 -0
  155. package/lib/components/HUDOverlay/index.js +5 -0
  156. package/lib/components/OrientationEnforcer/OrientationEnforcer.d.ts +16 -0
  157. package/lib/components/OrientationEnforcer/OrientationEnforcer.js +34 -0
  158. package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.d.ts +815 -0
  159. package/lib/components/OrientationEnforcer/OrientationEnforcer.styles.js +49 -0
  160. package/lib/components/OrientationEnforcer/index.d.ts +1 -0
  161. package/lib/components/OrientationEnforcer/index.js +5 -0
  162. package/lib/components/PartSelection/PartSelection.d.ts +40 -0
  163. package/lib/components/PartSelection/PartSelection.js +39 -0
  164. package/lib/components/PartSelection/PartSelection.styles.d.ts +2 -0
  165. package/lib/components/PartSelection/PartSelection.styles.js +54 -0
  166. package/lib/components/PartSelection/index.d.ts +2 -0
  167. package/lib/components/PartSelection/index.js +5 -0
  168. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.d.ts → components/ZoomOutShot/ZoomOutShot.d.ts} +3 -3
  169. package/lib/components/ZoomOutShot/ZoomOutShot.js +38 -0
  170. package/lib/components/ZoomOutShot/ZoomOutShot.styles.d.ts +2 -0
  171. package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.js → components/ZoomOutShot/ZoomOutShot.styles.js} +3 -3
  172. package/lib/components/ZoomOutShot/hooks.d.ts +6 -0
  173. package/lib/components/ZoomOutShot/hooks.js +24 -0
  174. package/lib/components/ZoomOutShot/index.d.ts +1 -0
  175. package/lib/components/ZoomOutShot/index.js +5 -0
  176. package/lib/components/index.d.ts +8 -0
  177. package/lib/components/index.js +24 -0
  178. package/lib/errors.d.ts +3 -0
  179. package/lib/errors.js +7 -0
  180. package/lib/hooks/index.d.ts +10 -0
  181. package/lib/hooks/index.js +26 -0
  182. package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.d.ts +2 -2
  183. package/lib/hooks/useAddDamageMode.d.ts +56 -0
  184. package/lib/hooks/useAddDamageMode.js +76 -0
  185. package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.d.ts +2 -2
  186. package/lib/hooks/useColorBackground.d.ts +4 -0
  187. package/lib/hooks/useColorBackground.js +15 -0
  188. package/lib/hooks/useEnforceOrientation.d.ts +6 -0
  189. package/lib/hooks/useEnforceOrientation.js +14 -0
  190. package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.js +1 -1
  191. package/lib/{PhotoCapture/hooks → hooks}/usePictureTaken.d.ts +4 -4
  192. package/lib/hooks/usePictureTaken.js +58 -0
  193. package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.d.ts +6 -6
  194. package/lib/{PhotoCapture/hooks → hooks}/useStartTasksOnComplete.js +3 -1
  195. package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.d.ts +24 -7
  196. package/lib/{PhotoCapture/hooks → hooks}/useUploadQueue.js +14 -4
  197. package/lib/index.d.ts +2 -0
  198. package/lib/index.js +2 -0
  199. package/lib/translations/de.json +64 -5
  200. package/lib/translations/en.json +64 -5
  201. package/lib/translations/fr.json +64 -5
  202. package/lib/translations/nl.json +64 -5
  203. package/lib/types.d.ts +102 -0
  204. package/lib/types.js +43 -0
  205. package/package.json +15 -15
  206. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/hooks.js +0 -44
  207. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.d.ts +0 -1
  208. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/index.js +0 -5
  209. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/PhotoCaptureHUDCancelButton.d.ts +0 -14
  210. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.d.ts +0 -1
  211. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCancelButton/index.js +0 -5
  212. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.d.ts +0 -6
  213. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.d.ts +0 -2
  214. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/index.js +0 -5
  215. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.js +0 -38
  216. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.d.ts +0 -6
  217. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/hooks.js +0 -24
  218. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.d.ts +0 -1
  219. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/index.js +0 -5
  220. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.js +0 -40
  221. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.d.ts +0 -7
  222. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/hooks.js +0 -25
  223. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.d.ts +0 -1
  224. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/index.js +0 -5
  225. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.d.ts +0 -7
  226. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.js +0 -36
  227. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.d.ts +0 -2
  228. package/lib/PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/index.js +0 -5
  229. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.d.ts +0 -4
  230. package/lib/PhotoCapture/PhotoCaptureHUD/hooks/usePhotoCaptureHUDButtonBackground.js +0 -13
  231. package/lib/PhotoCapture/hooks/useAddDamageMode.d.ts +0 -42
  232. package/lib/PhotoCapture/hooks/useAddDamageMode.js +0 -57
  233. package/lib/PhotoCapture/hooks/usePictureTaken.js +0 -46
  234. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.d.ts → DamageDisclosure/DamageDisclosure.styles.d.ts} +0 -0
  235. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage1stShot/PhotoCaptureHUDElementsAddDamage1stShot.styles.d.ts → DamageDisclosure/DamageDisclosureHUD/DamageDisclosureHUD.styles.d.ts} +0 -0
  236. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDElementsAddDamage2ndShot/PhotoCaptureHUDElementsAddDamage2ndShot.styles.d.ts → VideoCapture/VideoCapture.styles.d.ts} +0 -0
  237. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.d.ts → VideoCapture/VideoCaptureHUD/VideoCaptureHUD.styles.d.ts} +0 -0
  238. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDCounter/PhotoCaptureHUDCounter.styles.js → components/Counter/Counter.styles.js} +0 -0
  239. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.d.ts → components/HUDButtons/HUDButtons.styles.d.ts} +0 -0
  240. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDButtons/PhotoCaptureHUDButtons.styles.js → components/HUDButtons/HUDButtons.styles.js} +0 -0
  241. /package/lib/{PhotoCapture/PhotoCaptureHUD/PhotoCaptureHUDOverlay/PhotoCaptureHUDOverlay.styles.js → components/HUDOverlay/HUDOverlay.styles.js} +0 -0
  242. /package/lib/{PhotoCapture/hooks → hooks}/useAdaptiveCameraConfig.js +0 -0
  243. /package/lib/{PhotoCapture/hooks → hooks}/useBadConnectionWarning.js +0 -0
  244. /package/lib/{PhotoCapture/hooks → hooks}/usePhotoCaptureImages.d.ts +0 -0
  245. /package/lib/{PhotoCapture/hooks → hooks}/useTracking.d.ts +0 -0
  246. /package/lib/{PhotoCapture/hooks → hooks}/useTracking.js +0 -0
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useVideoCaptureRecordingStyles = exports.styles = void 0;
15
+ var common_1 = require("@monkvision/common");
16
+ var react_1 = require("react");
17
+ exports.styles = {
18
+ container: {
19
+ width: '100%',
20
+ height: '100%',
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ alignItems: 'center',
24
+ justifyContent: 'space-between',
25
+ alignSelf: 'stretch',
26
+ },
27
+ containerLandscape: {
28
+ __media: { landscape: true },
29
+ flexDirection: 'row',
30
+ },
31
+ indicators: {
32
+ alignSelf: 'stretch',
33
+ display: 'flex',
34
+ alignItems: 'center',
35
+ justifyContent: 'end',
36
+ flexDirection: 'row',
37
+ padding: 20,
38
+ },
39
+ indicatorsLandscape: {
40
+ __media: { landscape: true },
41
+ justifyContent: 'start',
42
+ flexDirection: 'column',
43
+ },
44
+ recordingDuration: {
45
+ padding: 10,
46
+ borderRadius: 9999,
47
+ },
48
+ controls: {
49
+ alignSelf: 'stretch',
50
+ display: 'flex',
51
+ alignItems: 'center',
52
+ justifyContent: 'space-between',
53
+ flexDirection: 'row',
54
+ padding: '0 20px 32px 20px',
55
+ },
56
+ controlsLandscape: {
57
+ __media: { landscape: true },
58
+ flexDirection: 'column-reverse',
59
+ padding: '20px 32px 20px 0',
60
+ },
61
+ walkaroundIndicatorDisabled: {
62
+ opacity: 0.7,
63
+ filter: 'grayscale(1)',
64
+ },
65
+ takePictureFlash: {
66
+ position: 'fixed',
67
+ inset: '0 0 0 0',
68
+ zIndex: 999,
69
+ backgroundColor: '#efefef',
70
+ opacity: 0,
71
+ transition: 'opacity 0.5s ease-out',
72
+ pointerEvents: 'none',
73
+ },
74
+ takePictureFlashVisible: {
75
+ opacity: 1,
76
+ transition: 'none',
77
+ },
78
+ };
79
+ function useVideoCaptureRecordingStyles(_a) {
80
+ var isRecording = _a.isRecording;
81
+ var _b = (0, react_1.useState)(false), isTakePictureFlashVisible = _b[0], setTakePictureFlashVisible = _b[1];
82
+ var palette = (0, common_1.useMonkTheme)().palette;
83
+ var responsive = (0, common_1.useResponsiveStyle)().responsive;
84
+ var isPortrait = (0, common_1.useWindowDimensions)().isPortrait;
85
+ var isMounted = (0, common_1.useIsMounted)();
86
+ var showTakePictureFlash = function () {
87
+ setTakePictureFlashVisible(true);
88
+ setTimeout(function () {
89
+ if (isMounted()) {
90
+ setTakePictureFlashVisible(false);
91
+ }
92
+ }, 100);
93
+ };
94
+ return {
95
+ container: __assign(__assign({}, exports.styles['container']), responsive(exports.styles['containerLandscape'])),
96
+ indicators: __assign(__assign({}, exports.styles['indicators']), responsive(exports.styles['indicatorsLandscape'])),
97
+ recordingDuration: __assign(__assign({}, exports.styles['recordingDuration']), { color: palette.text.primary, backgroundColor: palette.alert.base }),
98
+ controls: __assign(__assign({}, exports.styles['controls']), responsive(exports.styles['controlsLandscape'])),
99
+ takePictureFlash: __assign(__assign({}, exports.styles['takePictureFlash']), (isTakePictureFlashVisible ? exports.styles['takePictureFlashVisible'] : {})),
100
+ walkaroundIndicator: __assign({}, (isRecording ? {} : exports.styles['walkaroundIndicatorDisabled'])),
101
+ showTakePictureFlash: showTakePictureFlash,
102
+ tooltipPosition: (isPortrait ? 'up' : 'left'),
103
+ };
104
+ }
105
+ exports.useVideoCaptureRecordingStyles = useVideoCaptureRecordingStyles;
@@ -0,0 +1,2 @@
1
+ export { VideoCaptureRecording } from './VideoCaptureRecording';
2
+ export { type VideoCaptureRecordingProps } from './VideoCaptureRecording.types';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoCaptureRecording = void 0;
4
+ var VideoCaptureRecording_1 = require("./VideoCaptureRecording");
5
+ Object.defineProperty(exports, "VideoCaptureRecording", { enumerable: true, get: function () { return VideoCaptureRecording_1.VideoCaptureRecording; } });
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Props accepted by the VideoCaptureTutorial component.
4
+ */
5
+ export interface VideoCaptureTutorialProps {
6
+ /**
7
+ * Callback called when the user closes the tutorial by clicking on the confirm button.
8
+ */
9
+ onClose?: () => void;
10
+ }
11
+ /**
12
+ * This component is a tutorial displayed on top of the camera when the user first starts the video capture.
13
+ */
14
+ export declare function VideoCaptureTutorial({ onClose }: VideoCaptureTutorialProps): JSX.Element;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.VideoCaptureTutorial = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_i18next_1 = require("react-i18next");
17
+ var VideoCapturePageLayout_1 = require("../../VideoCapturePageLayout");
18
+ /**
19
+ * This component is a tutorial displayed on top of the camera when the user first starts the video capture.
20
+ */
21
+ function VideoCaptureTutorial(_a) {
22
+ var onClose = _a.onClose;
23
+ var t = (0, react_i18next_1.useTranslation)().t;
24
+ var confirmButtonProps = {
25
+ onClick: onClose,
26
+ children: t('video.tutorial.confirm'),
27
+ };
28
+ return ((0, jsx_runtime_1.jsxs)(VideoCapturePageLayout_1.VideoCapturePageLayout, __assign({ showBackdrop: true, confirmButtonProps: confirmButtonProps }, { children: [(0, jsx_runtime_1.jsx)(VideoCapturePageLayout_1.PageLayoutItem, { icon: 'car-arrow', title: t('video.tutorial.start.title'), description: t('video.tutorial.start.description') }), (0, jsx_runtime_1.jsx)(VideoCapturePageLayout_1.PageLayoutItem, { icon: '360', title: t('video.tutorial.finish.title'), description: t('video.tutorial.finish.description') }), (0, jsx_runtime_1.jsx)(VideoCapturePageLayout_1.PageLayoutItem, { icon: 'circle-dot', title: t('video.tutorial.photos.title'), description: t('video.tutorial.photos.description') })] })));
29
+ }
30
+ exports.VideoCaptureTutorial = VideoCaptureTutorial;
@@ -0,0 +1 @@
1
+ export { VideoCaptureTutorial, type VideoCaptureTutorialProps } from './VideoCaptureTutorial';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoCaptureTutorial = void 0;
4
+ var VideoCaptureTutorial_1 = require("./VideoCaptureTutorial");
5
+ Object.defineProperty(exports, "VideoCaptureTutorial", { enumerable: true, get: function () { return VideoCaptureTutorial_1.VideoCaptureTutorial; } });
@@ -0,0 +1 @@
1
+ export { VideoCaptureHUD, type VideoCaptureHUDProps } from './VideoCaptureHUD';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoCaptureHUD = void 0;
4
+ var VideoCaptureHUD_1 = require("./VideoCaptureHUD");
5
+ Object.defineProperty(exports, "VideoCaptureHUD", { enumerable: true, get: function () { return VideoCaptureHUD_1.VideoCaptureHUD; } });
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ import { IconName } from '@monkvision/common-ui-web';
3
+ /**
4
+ * Props accepted by the PageLayoutItem component.
5
+ */
6
+ export interface PageLayoutItemProps {
7
+ /**
8
+ * The name of the item icon.
9
+ */
10
+ icon: IconName;
11
+ /**
12
+ * The title of the item.
13
+ */
14
+ title: string;
15
+ /**
16
+ * The description of the item.
17
+ */
18
+ description: string;
19
+ }
20
+ /**
21
+ * A custom list item that is displayed in VideoCapture Intro screens.
22
+ */
23
+ export declare function PageLayoutItem({ icon, title, description }: PageLayoutItemProps): JSX.Element;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PageLayoutItem = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var common_ui_web_1 = require("@monkvision/common-ui-web");
17
+ var PageLayoutItem_styles_1 = require("./PageLayoutItem.styles");
18
+ /**
19
+ * A custom list item that is displayed in VideoCapture Intro screens.
20
+ */
21
+ function PageLayoutItem(_a) {
22
+ var icon = _a.icon, title = _a.title, description = _a.description;
23
+ var _b = (0, PageLayoutItem_styles_1.usePageLayoutItemStyles)(), iconProps = _b.iconProps, titleStyle = _b.titleStyle, descriptionStyle = _b.descriptionStyle;
24
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: PageLayoutItem_styles_1.styles['container'] }, { children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.Icon, __assign({ icon: icon }, iconProps)), (0, jsx_runtime_1.jsxs)("div", __assign({ style: PageLayoutItem_styles_1.styles['labels'] }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ style: titleStyle }, { children: title })), (0, jsx_runtime_1.jsx)("div", __assign({ style: descriptionStyle }, { children: description }))] }))] })));
25
+ }
26
+ exports.PageLayoutItem = PageLayoutItem;
@@ -0,0 +1,12 @@
1
+ import { CSSProperties } from 'react';
2
+ import { Styles } from '@monkvision/types';
3
+ import { IconProps } from '@monkvision/common-ui-web';
4
+ export declare const PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT = 600;
5
+ export declare const styles: Styles;
6
+ interface PageLayoutItemStyle {
7
+ iconProps: Partial<IconProps>;
8
+ titleStyle: CSSProperties;
9
+ descriptionStyle: CSSProperties;
10
+ }
11
+ export declare function usePageLayoutItemStyles(): PageLayoutItemStyle;
12
+ export {};
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.usePageLayoutItemStyles = exports.styles = exports.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT = void 0;
15
+ var common_1 = require("@monkvision/common");
16
+ exports.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT = 600;
17
+ exports.styles = {
18
+ container: {
19
+ alignSelf: 'stretch',
20
+ display: 'flex',
21
+ flexDirection: 'row',
22
+ alignItems: 'center',
23
+ margin: 16,
24
+ },
25
+ icon: {
26
+ marginRight: 12,
27
+ },
28
+ labels: {
29
+ flex: 1,
30
+ alignSelf: 'stretch',
31
+ display: 'flex',
32
+ flexDirection: 'column',
33
+ },
34
+ title: {
35
+ fontSize: 20,
36
+ fontWeight: 500,
37
+ },
38
+ titleSmall: {
39
+ __media: {
40
+ maxHeight: exports.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT,
41
+ },
42
+ fontSize: 14,
43
+ fontWeight: 500,
44
+ },
45
+ description: {
46
+ fontSize: 18,
47
+ paddingTop: 6,
48
+ opacity: 0.91,
49
+ fontWeight: 300,
50
+ },
51
+ descriptionSmall: {
52
+ __media: {
53
+ maxHeight: exports.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT,
54
+ },
55
+ fontSize: 12,
56
+ fontWeight: 400,
57
+ },
58
+ };
59
+ function usePageLayoutItemStyles() {
60
+ var palette = (0, common_1.useMonkTheme)().palette;
61
+ var responsive = (0, common_1.useResponsiveStyle)().responsive;
62
+ return {
63
+ iconProps: {
64
+ size: 40,
65
+ primaryColor: palette.primary.base,
66
+ style: __assign(__assign({}, exports.styles['icon']), responsive(exports.styles['iconSmall'])),
67
+ },
68
+ titleStyle: __assign(__assign({}, exports.styles['title']), responsive(exports.styles['titleSmall'])),
69
+ descriptionStyle: __assign(__assign({}, exports.styles['description']), responsive(exports.styles['descriptionSmall'])),
70
+ };
71
+ }
72
+ exports.usePageLayoutItemStyles = usePageLayoutItemStyles;
@@ -0,0 +1 @@
1
+ export { PageLayoutItem, type PageLayoutItemProps } from './PageLayoutItem';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageLayoutItem = void 0;
4
+ var PageLayoutItem_1 = require("./PageLayoutItem");
5
+ Object.defineProperty(exports, "PageLayoutItem", { enumerable: true, get: function () { return PageLayoutItem_1.PageLayoutItem; } });
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { VideoCapturePageLayoutProps } from './VideoCapturePageLayout.types';
3
+ /**
4
+ * This component is used to display the same layout for every "default" screen for the VideoCapture process (the
5
+ * premissions screen, the tutorial etc.).
6
+ */
7
+ export declare function VideoCapturePageLayout({ showBackdrop, showTitle, confirmButtonProps, children, }: PropsWithChildren<VideoCapturePageLayoutProps>): JSX.Element;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.VideoCapturePageLayout = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var common_ui_web_1 = require("@monkvision/common-ui-web");
17
+ var react_i18next_1 = require("react-i18next");
18
+ var logos_asset_1 = require("../../assets/logos.asset");
19
+ var VideoCapturePageLayout_styles_1 = require("./VideoCapturePageLayout.styles");
20
+ /**
21
+ * This component is used to display the same layout for every "default" screen for the VideoCapture process (the
22
+ * premissions screen, the tutorial etc.).
23
+ */
24
+ function VideoCapturePageLayout(_a) {
25
+ var _b = _a.showBackdrop, showBackdrop = _b === void 0 ? false : _b, _c = _a.showTitle, showTitle = _c === void 0 ? true : _c, confirmButtonProps = _a.confirmButtonProps, children = _a.children;
26
+ var t = (0, react_i18next_1.useTranslation)().t;
27
+ var _d = (0, VideoCapturePageLayout_styles_1.useVideoCapturePageLayoutStyles)({
28
+ showBackdrop: showBackdrop,
29
+ }), logoProps = _d.logoProps, containerStyle = _d.containerStyle, titleStyle = _d.titleStyle;
30
+ return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: containerStyle }, { children: [(0, jsx_runtime_1.jsx)(common_ui_web_1.DynamicSVG, __assign({ svg: logos_asset_1.monkLogoSVG }, logoProps)), showTitle && (0, jsx_runtime_1.jsx)("div", __assign({ style: titleStyle }, { children: t('video.introduction.title') })), (0, jsx_runtime_1.jsx)("div", __assign({ style: VideoCapturePageLayout_styles_1.styles['childrenContainer'] }, { children: children })), (0, jsx_runtime_1.jsx)("div", __assign({ style: VideoCapturePageLayout_styles_1.styles['confirmContainer'] }, { children: (0, jsx_runtime_1.jsx)(common_ui_web_1.Button, __assign({}, (confirmButtonProps !== null && confirmButtonProps !== void 0 ? confirmButtonProps : {}))) }))] })));
31
+ }
32
+ exports.VideoCapturePageLayout = VideoCapturePageLayout;
@@ -0,0 +1,12 @@
1
+ import { Styles } from '@monkvision/types';
2
+ import { DynamicSVGProps } from '@monkvision/common-ui-web';
3
+ import { CSSProperties } from 'react';
4
+ import { VideoCapturePageLayoutProps } from './VideoCapturePageLayout.types';
5
+ export declare const styles: Styles;
6
+ interface VideoCapturePageLayoutStyles {
7
+ logoProps: Partial<DynamicSVGProps>;
8
+ containerStyle: CSSProperties;
9
+ titleStyle: CSSProperties;
10
+ }
11
+ export declare function useVideoCapturePageLayoutStyles({ showBackdrop, }: Required<Pick<VideoCapturePageLayoutProps, 'showBackdrop'>>): VideoCapturePageLayoutStyles;
12
+ export {};
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.useVideoCapturePageLayoutStyles = exports.styles = void 0;
15
+ var react_1 = require("react");
16
+ var common_1 = require("@monkvision/common");
17
+ var PageLayoutItem_styles_1 = require("./PageLayoutItem/PageLayoutItem.styles");
18
+ exports.styles = {
19
+ container: {
20
+ height: '100%',
21
+ width: '100%',
22
+ display: 'flex',
23
+ flexDirection: 'column',
24
+ alignItems: 'center',
25
+ },
26
+ containerBackdrop: {
27
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
28
+ },
29
+ logo: {
30
+ margin: '32px 0',
31
+ width: 80,
32
+ height: 'auto',
33
+ },
34
+ logoSmall: {
35
+ __media: {
36
+ maxHeight: PageLayoutItem_styles_1.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT,
37
+ },
38
+ display: 'none',
39
+ },
40
+ title: {
41
+ fontSize: 32,
42
+ fontWeight: 700,
43
+ textAlign: 'center',
44
+ padding: '0 32px 16px 32px',
45
+ },
46
+ titleSmall: {
47
+ __media: {
48
+ maxHeight: PageLayoutItem_styles_1.PAGE_LAYOUT_MAX_HEIGHT_BREAKPOINT,
49
+ },
50
+ fontSize: 20,
51
+ fontWeight: 700,
52
+ textAlign: 'center',
53
+ padding: '10px 16px 10px 16px',
54
+ },
55
+ childrenContainer: {
56
+ flex: 1,
57
+ alignSelf: 'stretch',
58
+ display: 'flex',
59
+ flexDirection: 'column',
60
+ },
61
+ confirmContainer: {
62
+ alignSelf: 'stretch',
63
+ display: 'flex',
64
+ flexDirection: 'column',
65
+ alignItems: 'center',
66
+ padding: '0 32px 32px 32px',
67
+ },
68
+ confirmButton: {
69
+ alignSelf: 'stretch',
70
+ maxWidth: 400,
71
+ },
72
+ };
73
+ function useVideoCapturePageLayoutStyles(_a) {
74
+ var showBackdrop = _a.showBackdrop;
75
+ var palette = (0, common_1.useMonkTheme)().palette;
76
+ var responsive = (0, common_1.useResponsiveStyle)().responsive;
77
+ var getLogoAttributes = (0, react_1.useCallback)(function (element) { return (0, common_1.fullyColorSVG)(element, palette.text.primary); }, [palette]);
78
+ return {
79
+ logoProps: {
80
+ getAttributes: getLogoAttributes,
81
+ style: __assign(__assign({}, exports.styles['logo']), responsive(exports.styles['logoSmall'])),
82
+ },
83
+ containerStyle: __assign(__assign({}, exports.styles['container']), (showBackdrop ? exports.styles['containerBackdrop'] : {})),
84
+ titleStyle: __assign(__assign({}, exports.styles['title']), responsive(exports.styles['titleSmall'])),
85
+ };
86
+ }
87
+ exports.useVideoCapturePageLayoutStyles = useVideoCapturePageLayoutStyles;
@@ -0,0 +1,22 @@
1
+ import { ButtonProps } from '@monkvision/common-ui-web';
2
+ /**
3
+ * Props accepted by the VideoCapturePageLayout component.
4
+ */
5
+ export interface VideoCapturePageLayoutProps {
6
+ /**
7
+ * Boolean indicating if a black backdrop should be displayed behind the component.
8
+ *
9
+ * @default false
10
+ */
11
+ showBackdrop?: boolean;
12
+ /**
13
+ * Boolean indicating if the title of the page should be displayed or not.
14
+ *
15
+ * @default true
16
+ */
17
+ showTitle?: boolean;
18
+ /**
19
+ * Pass-through props passed down to the confirm button.
20
+ */
21
+ confirmButtonProps?: Partial<ButtonProps>;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export { VideoCapturePageLayout } from './VideoCapturePageLayout';
2
+ export { type VideoCapturePageLayoutProps } from './VideoCapturePageLayout.types';
3
+ export { PageLayoutItem, type PageLayoutItemProps } from './PageLayoutItem';
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageLayoutItem = exports.VideoCapturePageLayout = void 0;
4
+ var VideoCapturePageLayout_1 = require("./VideoCapturePageLayout");
5
+ Object.defineProperty(exports, "VideoCapturePageLayout", { enumerable: true, get: function () { return VideoCapturePageLayout_1.VideoCapturePageLayout; } });
6
+ var PageLayoutItem_1 = require("./PageLayoutItem");
7
+ Object.defineProperty(exports, "PageLayoutItem", { enumerable: true, get: function () { return PageLayoutItem_1.PageLayoutItem; } });
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Props accepted by the VideoCapturePermissions component.
4
+ */
5
+ export interface VideoCapturePermissionsProps {
6
+ /**
7
+ * Callback used to request the compass permission on the device.
8
+ */
9
+ requestCompassPermission?: () => Promise<void>;
10
+ /**
11
+ * Callback called when the user has successfully granted the required permissions to the app.
12
+ */
13
+ onSuccess?: () => void;
14
+ }
15
+ /**
16
+ * Component displayed in the Permissions view of the video capture. Used to make sure the current app has the proper
17
+ * permissions before moving forward.
18
+ */
19
+ export declare function VideoCapturePermissions({ requestCompassPermission, onSuccess, }: VideoCapturePermissionsProps): JSX.Element;
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
15
+ return new (P || (P = Promise))(function (resolve, reject) {
16
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
17
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
18
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
19
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
20
+ });
21
+ };
22
+ var __generator = (this && this.__generator) || function (thisArg, body) {
23
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
24
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
25
+ function verb(n) { return function (v) { return step([n, v]); }; }
26
+ function step(op) {
27
+ if (f) throw new TypeError("Generator is already executing.");
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
+ if (y = 0, t) op = [op[0] & 2, t.value];
31
+ switch (op[0]) {
32
+ case 0: case 1: t = op; break;
33
+ case 4: _.label++; return { value: op[1], done: false };
34
+ case 5: _.label++; y = op[1]; op = [0]; continue;
35
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
36
+ default:
37
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
38
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
39
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
40
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
41
+ if (t[2]) _.ops.pop();
42
+ _.trys.pop(); continue;
43
+ }
44
+ op = body.call(thisArg, _);
45
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
46
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
+ }
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.VideoCapturePermissions = void 0;
51
+ var jsx_runtime_1 = require("react/jsx-runtime");
52
+ var react_i18next_1 = require("react-i18next");
53
+ var common_1 = require("@monkvision/common");
54
+ var camera_web_1 = require("@monkvision/camera-web");
55
+ var monitoring_1 = require("@monkvision/monitoring");
56
+ var VideoCapturePageLayout_1 = require("../VideoCapturePageLayout");
57
+ /**
58
+ * Component displayed in the Permissions view of the video capture. Used to make sure the current app has the proper
59
+ * permissions before moving forward.
60
+ */
61
+ function VideoCapturePermissions(_a) {
62
+ var _this = this;
63
+ var requestCompassPermission = _a.requestCompassPermission, onSuccess = _a.onSuccess;
64
+ var t = (0, react_i18next_1.useTranslation)().t;
65
+ var loading = (0, common_1.useLoadingState)();
66
+ var handleError = (0, monitoring_1.useMonitoring)().handleError;
67
+ var requestCameraPermission = (0, camera_web_1.useCameraPermission)().requestCameraPermission;
68
+ var isMounted = (0, common_1.useIsMounted)();
69
+ var handleConfirm = function () { return __awaiter(_this, void 0, void 0, function () {
70
+ var err_1;
71
+ return __generator(this, function (_a) {
72
+ switch (_a.label) {
73
+ case 0:
74
+ loading.start();
75
+ _a.label = 1;
76
+ case 1:
77
+ _a.trys.push([1, 5, , 6]);
78
+ if (!requestCompassPermission) return [3 /*break*/, 3];
79
+ return [4 /*yield*/, requestCompassPermission()];
80
+ case 2:
81
+ _a.sent();
82
+ _a.label = 3;
83
+ case 3: return [4 /*yield*/, requestCameraPermission()];
84
+ case 4:
85
+ _a.sent();
86
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
87
+ if (isMounted()) {
88
+ loading.onSuccess();
89
+ }
90
+ return [3 /*break*/, 6];
91
+ case 5:
92
+ err_1 = _a.sent();
93
+ loading.onError(err_1);
94
+ handleError(err_1);
95
+ return [3 /*break*/, 6];
96
+ case 6: return [2 /*return*/];
97
+ }
98
+ });
99
+ }); };
100
+ var confirmButtonProps = {
101
+ onClick: handleConfirm,
102
+ loading: loading,
103
+ children: t('video.permissions.confirm'),
104
+ };
105
+ return ((0, jsx_runtime_1.jsxs)(VideoCapturePageLayout_1.VideoCapturePageLayout, __assign({ confirmButtonProps: confirmButtonProps }, { children: [(0, jsx_runtime_1.jsx)(VideoCapturePageLayout_1.PageLayoutItem, { icon: 'camera-outline', title: t('video.permissions.camera.title'), description: t('video.permissions.camera.description') }), (0, jsx_runtime_1.jsx)(VideoCapturePageLayout_1.PageLayoutItem, { icon: 'compass-outline', title: t('video.permissions.compass.title'), description: t('video.permissions.compass.description') })] })));
106
+ }
107
+ exports.VideoCapturePermissions = VideoCapturePermissions;
@@ -0,0 +1 @@
1
+ export { VideoCapturePermissions, type VideoCapturePermissionsProps, } from './VideoCapturePermissions';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoCapturePermissions = void 0;
4
+ var VideoCapturePermissions_1 = require("./VideoCapturePermissions");
5
+ Object.defineProperty(exports, "VideoCapturePermissions", { enumerable: true, get: function () { return VideoCapturePermissions_1.VideoCapturePermissions; } });