react-isoform 0.0.0-stage → 0.1.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 (353) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +104 -2
  3. package/android/build.gradle +212 -0
  4. package/android/consumer-rules.pro +10 -0
  5. package/android/src/audio/java/com/isoform/IsoAudioControls.kt +531 -0
  6. package/android/src/audio/java/com/isoform/IsoAudioView.kt +328 -0
  7. package/android/src/audio/java/com/isoform/IsoAudioViewManager.kt +88 -0
  8. package/android/src/camera/AndroidManifest.xml +6 -0
  9. package/android/src/camera/java/com/isoform/IsoCamera.kt +99 -0
  10. package/android/src/camera/java/com/isoform/IsoCameraController.kt +232 -0
  11. package/android/src/camera/java/com/isoform/IsoCameraLifecycle.kt +26 -0
  12. package/android/src/camera/java/com/isoform/IsoCameraView.kt +392 -0
  13. package/android/src/camera/java/com/isoform/IsoCameraViewManager.kt +76 -0
  14. package/android/src/cameraCodes/java/com/isoform/IsoCodeScanner.kt +90 -0
  15. package/android/src/cameraCodesOff/java/com/isoform/IsoCodeScanner.kt +17 -0
  16. package/android/src/cameraVideo/AndroidManifest.xml +4 -0
  17. package/android/src/cameraVideo/java/com/isoform/IsoCameraRecorder.kt +83 -0
  18. package/android/src/cameraVideoOff/java/com/isoform/IsoCameraRecorder.kt +22 -0
  19. package/android/src/datePicker/java/com/isoform/IsoDatePicker.kt +724 -0
  20. package/android/src/datePicker/java/com/isoform/IsoDatePickerView.kt +137 -0
  21. package/android/src/datePicker/java/com/isoform/IsoDatePickerViewManager.kt +56 -0
  22. package/android/src/image/java/com/isoform/IsoImageModule.kt +33 -0
  23. package/android/src/image/java/com/isoform/IsoImagePipeline.kt +516 -0
  24. package/android/src/image/java/com/isoform/IsoImageView.kt +573 -0
  25. package/android/src/image/java/com/isoform/IsoImageViewManager.kt +119 -0
  26. package/android/src/main/AndroidManifest.xml +4 -0
  27. package/android/src/main/java/com/isoform/IsoformPackage.kt +52 -0
  28. package/android/src/mediaSession/AndroidManifest.xml +18 -0
  29. package/android/src/mediaSession/java/com/isoform/IsoMediaService.kt +21 -0
  30. package/android/src/mediaSession/java/com/isoform/IsoMediaSession.kt +92 -0
  31. package/android/src/mediaSessionOff/java/com/isoform/IsoMediaSession.kt +18 -0
  32. package/android/src/modal/java/com/isoform/IsoModal.kt +182 -0
  33. package/android/src/modal/java/com/isoform/IsoModalView.kt +137 -0
  34. package/android/src/modal/java/com/isoform/IsoModalViewManager.kt +70 -0
  35. package/android/src/pdf/java/com/isoform/IsoPdfDocument.kt +157 -0
  36. package/android/src/pdf/java/com/isoform/IsoPdfEngine.kt +161 -0
  37. package/android/src/pdf/java/com/isoform/IsoPdfIcons.kt +76 -0
  38. package/android/src/pdf/java/com/isoform/IsoPdfReader.kt +176 -0
  39. package/android/src/pdf/java/com/isoform/IsoPdfView.kt +372 -0
  40. package/android/src/pdf/java/com/isoform/IsoPdfViewManager.kt +100 -0
  41. package/android/src/pdf/java/com/isoform/IsoPdfViewer.kt +849 -0
  42. package/android/src/sheet/java/com/isoform/IsoSheet.kt +247 -0
  43. package/android/src/sheet/java/com/isoform/IsoSheetView.kt +188 -0
  44. package/android/src/sheet/java/com/isoform/IsoSheetViewManager.kt +76 -0
  45. package/android/src/video/java/com/isoform/IsoVideoControls.kt +921 -0
  46. package/android/src/video/java/com/isoform/IsoVideoPlaylistPanel.kt +247 -0
  47. package/android/src/video/java/com/isoform/IsoVideoView.kt +324 -0
  48. package/android/src/video/java/com/isoform/IsoVideoViewManager.kt +84 -0
  49. package/babel.js +133 -0
  50. package/dist/adapters/react-dom/adapter.d.ts +3 -0
  51. package/dist/adapters/react-dom/adapter.js +108 -0
  52. package/dist/adapters/react-dom/camera/CameraElement.d.ts +15 -0
  53. package/dist/adapters/react-dom/camera/CameraElement.js +293 -0
  54. package/dist/adapters/react-dom/camera/LazyCamera.d.ts +4 -0
  55. package/dist/adapters/react-dom/camera/LazyCamera.js +21 -0
  56. package/dist/adapters/react-dom/camera/webCamera.d.ts +27 -0
  57. package/dist/adapters/react-dom/camera/webCamera.js +51 -0
  58. package/dist/adapters/react-dom/css/sheet.d.ts +43 -0
  59. package/dist/adapters/react-dom/css/sheet.js +183 -0
  60. package/dist/adapters/react-dom/datePicker/DatePicker.d.ts +19 -0
  61. package/dist/adapters/react-dom/datePicker/DatePicker.js +31 -0
  62. package/dist/adapters/react-dom/image/Image.d.ts +23 -0
  63. package/dist/adapters/react-dom/image/Image.js +256 -0
  64. package/dist/adapters/react-dom/media/audio/AudioControls.d.ts +44 -0
  65. package/dist/adapters/react-dom/media/audio/AudioControls.js +53 -0
  66. package/dist/adapters/react-dom/media/audio/AudioElement.d.ts +18 -0
  67. package/dist/adapters/react-dom/media/audio/AudioElement.js +139 -0
  68. package/dist/adapters/react-dom/media/audio/LazyAudio.d.ts +3 -0
  69. package/dist/adapters/react-dom/media/audio/LazyAudio.js +22 -0
  70. package/dist/adapters/react-dom/media/audio/audioStyles.d.ts +3 -0
  71. package/dist/adapters/react-dom/media/audio/audioStyles.js +52 -0
  72. package/dist/adapters/react-dom/media/index.d.ts +4 -0
  73. package/dist/adapters/react-dom/media/index.js +10 -0
  74. package/dist/adapters/react-dom/media/pdf/LazyPdf.d.ts +4 -0
  75. package/dist/adapters/react-dom/media/pdf/LazyPdf.js +22 -0
  76. package/dist/adapters/react-dom/media/pdf/PdfElement.d.ts +20 -0
  77. package/dist/adapters/react-dom/media/pdf/PdfElement.js +622 -0
  78. package/dist/adapters/react-dom/media/pdf/PdfPage.d.ts +31 -0
  79. package/dist/adapters/react-dom/media/pdf/PdfPage.js +154 -0
  80. package/dist/adapters/react-dom/media/pdf/PdfThumbnails.d.ts +12 -0
  81. package/dist/adapters/react-dom/media/pdf/PdfThumbnails.js +56 -0
  82. package/dist/adapters/react-dom/media/pdf/PdfToolbar.d.ts +82 -0
  83. package/dist/adapters/react-dom/media/pdf/PdfToolbar.js +92 -0
  84. package/dist/adapters/react-dom/media/pdf/pdfDocument.d.ts +90 -0
  85. package/dist/adapters/react-dom/media/pdf/pdfDocument.js +118 -0
  86. package/dist/adapters/react-dom/media/pdf/pdfStyles.d.ts +3 -0
  87. package/dist/adapters/react-dom/media/pdf/pdfStyles.js +107 -0
  88. package/dist/adapters/react-dom/media/pdf/pdfjs.d.ts +12 -0
  89. package/dist/adapters/react-dom/media/pdf/pdfjs.js +31 -0
  90. package/dist/adapters/react-dom/media/pdf/readAloud.d.ts +27 -0
  91. package/dist/adapters/react-dom/media/pdf/readAloud.js +136 -0
  92. package/dist/adapters/react-dom/media/pdf/search.d.ts +48 -0
  93. package/dist/adapters/react-dom/media/pdf/search.js +57 -0
  94. package/dist/adapters/react-dom/media/shared/Playlist.d.ts +21 -0
  95. package/dist/adapters/react-dom/media/shared/Playlist.js +240 -0
  96. package/dist/adapters/react-dom/media/shared/Track.d.ts +21 -0
  97. package/dist/adapters/react-dom/media/shared/Track.js +47 -0
  98. package/dist/adapters/react-dom/media/shared/controlStyles.d.ts +3 -0
  99. package/dist/adapters/react-dom/media/shared/controlStyles.js +46 -0
  100. package/dist/adapters/react-dom/media/shared/helpers.d.ts +22 -0
  101. package/dist/adapters/react-dom/media/shared/helpers.js +46 -0
  102. package/dist/adapters/react-dom/media/shared/icons.d.ts +49 -0
  103. package/dist/adapters/react-dom/media/shared/icons.js +52 -0
  104. package/dist/adapters/react-dom/media/shared/playlistHandle.d.ts +13 -0
  105. package/dist/adapters/react-dom/media/shared/playlistHandle.js +17 -0
  106. package/dist/adapters/react-dom/media/shared/withPlaylist.d.ts +4 -0
  107. package/dist/adapters/react-dom/media/shared/withPlaylist.js +24 -0
  108. package/dist/adapters/react-dom/media/video/LazyVideo.d.ts +4 -0
  109. package/dist/adapters/react-dom/media/video/LazyVideo.js +22 -0
  110. package/dist/adapters/react-dom/media/video/VideoControls.d.ts +43 -0
  111. package/dist/adapters/react-dom/media/video/VideoControls.js +89 -0
  112. package/dist/adapters/react-dom/media/video/VideoElement.d.ts +19 -0
  113. package/dist/adapters/react-dom/media/video/VideoElement.js +161 -0
  114. package/dist/adapters/react-dom/media/video/fullscreen.d.ts +17 -0
  115. package/dist/adapters/react-dom/media/video/fullscreen.js +43 -0
  116. package/dist/adapters/react-dom/media/video/pictureInPicture.d.ts +11 -0
  117. package/dist/adapters/react-dom/media/video/pictureInPicture.js +34 -0
  118. package/dist/adapters/react-dom/media/video/videoStyles.d.ts +3 -0
  119. package/dist/adapters/react-dom/media/video/videoStyles.js +49 -0
  120. package/dist/adapters/react-dom/modal/LazyModal.d.ts +8 -0
  121. package/dist/adapters/react-dom/modal/LazyModal.js +22 -0
  122. package/dist/adapters/react-dom/modal/Modal.d.ts +16 -0
  123. package/dist/adapters/react-dom/modal/Modal.js +101 -0
  124. package/dist/adapters/react-dom/normalize/domProps.d.ts +9 -0
  125. package/dist/adapters/react-dom/normalize/domProps.js +279 -0
  126. package/dist/adapters/react-dom/normalize/props.d.ts +5 -0
  127. package/dist/adapters/react-dom/normalize/props.js +258 -0
  128. package/dist/adapters/react-dom/normalize/style.d.ts +14 -0
  129. package/dist/adapters/react-dom/normalize/style.js +165 -0
  130. package/dist/adapters/react-dom/primitives.d.ts +6 -0
  131. package/dist/adapters/react-dom/primitives.js +37 -0
  132. package/dist/adapters/react-dom/sheet/LazySheet.d.ts +7 -0
  133. package/dist/adapters/react-dom/sheet/LazySheet.js +26 -0
  134. package/dist/adapters/react-dom/sheet/SheetElement.d.ts +17 -0
  135. package/dist/adapters/react-dom/sheet/SheetElement.js +223 -0
  136. package/dist/adapters/react-dom/sheet/sheetStyles.d.ts +3 -0
  137. package/dist/adapters/react-dom/sheet/sheetStyles.js +36 -0
  138. package/dist/adapters/react-dom/svg/elements.d.ts +5 -0
  139. package/dist/adapters/react-dom/svg/elements.js +32 -0
  140. package/dist/adapters/react-dom/themeToggle.bench.d.ts +2 -0
  141. package/dist/adapters/react-dom/themeToggle.bench.js +111 -0
  142. package/dist/adapters/react-native/adapter.d.ts +24 -0
  143. package/dist/adapters/react-native/adapter.js +356 -0
  144. package/dist/adapters/react-native/animatedHost.d.ts +21 -0
  145. package/dist/adapters/react-native/animatedHost.js +84 -0
  146. package/dist/adapters/react-native/animation.d.ts +63 -0
  147. package/dist/adapters/react-native/animation.js +340 -0
  148. package/dist/adapters/react-native/breakpoint.bench.d.ts +2 -0
  149. package/dist/adapters/react-native/breakpoint.bench.js +112 -0
  150. package/dist/adapters/react-native/camera/Camera.d.ts +12 -0
  151. package/dist/adapters/react-native/camera/Camera.disabled.d.ts +8 -0
  152. package/dist/adapters/react-native/camera/Camera.disabled.js +14 -0
  153. package/dist/adapters/react-native/camera/Camera.js +103 -0
  154. package/dist/adapters/react-native/camera/native/IsoCameraViewNativeComponent.d.ts +83 -0
  155. package/dist/adapters/react-native/camera/native/IsoCameraViewNativeComponent.js +6 -0
  156. package/dist/adapters/react-native/datePicker/DatePicker.d.ts +16 -0
  157. package/dist/adapters/react-native/datePicker/DatePicker.disabled.d.ts +10 -0
  158. package/dist/adapters/react-native/datePicker/DatePicker.disabled.js +13 -0
  159. package/dist/adapters/react-native/datePicker/DatePicker.js +43 -0
  160. package/dist/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.d.ts +35 -0
  161. package/dist/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.js +13 -0
  162. package/dist/adapters/react-native/image/Image.d.ts +26 -0
  163. package/dist/adapters/react-native/image/Image.disabled.d.ts +7 -0
  164. package/dist/adapters/react-native/image/Image.disabled.js +7 -0
  165. package/dist/adapters/react-native/image/Image.js +56 -0
  166. package/dist/adapters/react-native/image/PlainImage.d.ts +18 -0
  167. package/dist/adapters/react-native/image/PlainImage.js +18 -0
  168. package/dist/adapters/react-native/image/imageCache.d.ts +4 -0
  169. package/dist/adapters/react-native/image/imageCache.js +17 -0
  170. package/dist/adapters/react-native/image/native/IsoImageViewNativeComponent.d.ts +86 -0
  171. package/dist/adapters/react-native/image/native/IsoImageViewNativeComponent.js +14 -0
  172. package/dist/adapters/react-native/image/native/NativeIsoImageModule.d.ts +17 -0
  173. package/dist/adapters/react-native/image/native/NativeIsoImageModule.js +9 -0
  174. package/dist/adapters/react-native/media/audio/Audio.d.ts +19 -0
  175. package/dist/adapters/react-native/media/audio/Audio.disabled.d.ts +8 -0
  176. package/dist/adapters/react-native/media/audio/Audio.disabled.js +16 -0
  177. package/dist/adapters/react-native/media/audio/Audio.js +40 -0
  178. package/dist/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.d.ts +77 -0
  179. package/dist/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.js +6 -0
  180. package/dist/adapters/react-native/media/index.d.ts +4 -0
  181. package/dist/adapters/react-native/media/index.js +9 -0
  182. package/dist/adapters/react-native/media/pdf/Pdf.d.ts +19 -0
  183. package/dist/adapters/react-native/media/pdf/Pdf.disabled.d.ts +9 -0
  184. package/dist/adapters/react-native/media/pdf/Pdf.disabled.js +16 -0
  185. package/dist/adapters/react-native/media/pdf/Pdf.js +46 -0
  186. package/dist/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.d.ts +77 -0
  187. package/dist/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.js +6 -0
  188. package/dist/adapters/react-native/media/shared/Playlist.d.ts +18 -0
  189. package/dist/adapters/react-native/media/shared/Playlist.js +242 -0
  190. package/dist/adapters/react-native/media/video/Video.d.ts +25 -0
  191. package/dist/adapters/react-native/media/video/Video.disabled.d.ts +9 -0
  192. package/dist/adapters/react-native/media/video/Video.disabled.js +16 -0
  193. package/dist/adapters/react-native/media/video/Video.js +46 -0
  194. package/dist/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.d.ts +87 -0
  195. package/dist/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.js +6 -0
  196. package/dist/adapters/react-native/miss.bench.d.ts +2 -0
  197. package/dist/adapters/react-native/miss.bench.js +78 -0
  198. package/dist/adapters/react-native/modal/Modal.d.ts +18 -0
  199. package/dist/adapters/react-native/modal/Modal.disabled.d.ts +7 -0
  200. package/dist/adapters/react-native/modal/Modal.disabled.js +7 -0
  201. package/dist/adapters/react-native/modal/Modal.js +71 -0
  202. package/dist/adapters/react-native/modal/PlainModal.d.ts +16 -0
  203. package/dist/adapters/react-native/modal/PlainModal.js +26 -0
  204. package/dist/adapters/react-native/modal/native/IsoModalViewNativeComponent.d.ts +35 -0
  205. package/dist/adapters/react-native/modal/native/IsoModalViewNativeComponent.js +14 -0
  206. package/dist/adapters/react-native/normalize.d.ts +13 -0
  207. package/dist/adapters/react-native/normalize.js +221 -0
  208. package/dist/adapters/react-native/pseudo.d.ts +27 -0
  209. package/dist/adapters/react-native/pseudo.js +39 -0
  210. package/dist/adapters/react-native/sheet/BottomSheet.d.ts +12 -0
  211. package/dist/adapters/react-native/sheet/BottomSheet.disabled.d.ts +8 -0
  212. package/dist/adapters/react-native/sheet/BottomSheet.disabled.js +14 -0
  213. package/dist/adapters/react-native/sheet/BottomSheet.js +89 -0
  214. package/dist/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.d.ts +40 -0
  215. package/dist/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.js +14 -0
  216. package/dist/adapters/react-native/styleHost.d.ts +21 -0
  217. package/dist/adapters/react-native/styleHost.js +72 -0
  218. package/dist/adapters/react-native/svg/Svg.d.ts +5 -0
  219. package/dist/adapters/react-native/svg/Svg.disabled.d.ts +5 -0
  220. package/dist/adapters/react-native/svg/Svg.disabled.js +18 -0
  221. package/dist/adapters/react-native/svg/Svg.js +60 -0
  222. package/dist/adapters/react-native/transition.d.ts +41 -0
  223. package/dist/adapters/react-native/transition.js +145 -0
  224. package/dist/adapters/react-native/transitionHost.d.ts +11 -0
  225. package/dist/adapters/react-native/transitionHost.js +147 -0
  226. package/dist/adapters/react-native/windowWidth.d.ts +15 -0
  227. package/dist/adapters/react-native/windowWidth.js +49 -0
  228. package/dist/cache/lru.d.ts +11 -0
  229. package/dist/cache/lru.js +32 -0
  230. package/dist/config/index.d.ts +239 -0
  231. package/dist/config/index.js +161 -0
  232. package/dist/core/adapter.d.ts +72 -0
  233. package/dist/core/adapter.js +2 -0
  234. package/dist/core/builder.d.ts +95 -0
  235. package/dist/core/builder.js +431 -0
  236. package/dist/core/camera.d.ts +142 -0
  237. package/dist/core/camera.js +43 -0
  238. package/dist/core/cameraRequests.d.ts +18 -0
  239. package/dist/core/cameraRequests.js +44 -0
  240. package/dist/core/conditions.d.ts +54 -0
  241. package/dist/core/conditions.js +123 -0
  242. package/dist/core/datePicker.d.ts +92 -0
  243. package/dist/core/datePicker.js +92 -0
  244. package/dist/core/dev.d.ts +5 -0
  245. package/dist/core/dev.js +18 -0
  246. package/dist/core/engine.d.ts +62 -0
  247. package/dist/core/engine.js +26 -0
  248. package/dist/core/flatten.d.ts +6 -0
  249. package/dist/core/flatten.js +22 -0
  250. package/dist/core/image.d.ts +246 -0
  251. package/dist/core/image.js +171 -0
  252. package/dist/core/inline.d.ts +33 -0
  253. package/dist/core/inline.js +25 -0
  254. package/dist/core/keyframes.d.ts +40 -0
  255. package/dist/core/keyframes.js +38 -0
  256. package/dist/core/media.d.ts +118 -0
  257. package/dist/core/media.js +2 -0
  258. package/dist/core/modal.d.ts +76 -0
  259. package/dist/core/modal.js +35 -0
  260. package/dist/core/modules.d.ts +7 -0
  261. package/dist/core/modules.js +9 -0
  262. package/dist/core/pdf.d.ts +133 -0
  263. package/dist/core/pdf.js +2 -0
  264. package/dist/core/playlist.d.ts +97 -0
  265. package/dist/core/playlist.js +58 -0
  266. package/dist/core/primitives.d.ts +410 -0
  267. package/dist/core/primitives.js +2 -0
  268. package/dist/core/proxy.d.ts +2 -0
  269. package/dist/core/proxy.js +25 -0
  270. package/dist/core/sheet.d.ts +95 -0
  271. package/dist/core/sheet.js +71 -0
  272. package/dist/core/style/types.d.ts +88 -0
  273. package/dist/core/style/types.js +2 -0
  274. package/dist/core/svg.d.ts +121 -0
  275. package/dist/core/svg.js +76 -0
  276. package/dist/core/testing/benchHarness.d.ts +42 -0
  277. package/dist/core/testing/benchHarness.js +75 -0
  278. package/dist/core/types.d.ts +222 -0
  279. package/dist/core/types.js +2 -0
  280. package/dist/hash/optimizedHash.d.ts +10 -0
  281. package/dist/hash/optimizedHash.js +63 -0
  282. package/dist/hash/stringHash.d.ts +6 -0
  283. package/dist/hash/stringHash.js +17 -0
  284. package/dist/hash/trackReads.d.ts +20 -0
  285. package/dist/hash/trackReads.js +49 -0
  286. package/dist/index.d.ts +31 -0
  287. package/dist/index.js +21 -0
  288. package/dist/jsx-dev-runtime.d.ts +7 -0
  289. package/dist/jsx-dev-runtime.js +13 -0
  290. package/dist/jsx-runtime.d.ts +19 -0
  291. package/dist/jsx-runtime.js +25 -0
  292. package/dist/providers/index.d.ts +2 -0
  293. package/dist/providers/index.js +5 -0
  294. package/dist/providers/index.native.d.ts +2 -0
  295. package/dist/providers/index.native.js +5 -0
  296. package/dist/theme/index.d.ts +46 -0
  297. package/dist/theme/index.js +51 -0
  298. package/dist/theme/store/helpers.d.ts +50 -0
  299. package/dist/theme/store/helpers.js +116 -0
  300. package/dist/theme/store/index.d.ts +196 -0
  301. package/dist/theme/store/index.js +259 -0
  302. package/dist/theme/variables.d.ts +23 -0
  303. package/dist/theme/variables.js +127 -0
  304. package/ios/audio/IsoAudioCard.swift +471 -0
  305. package/ios/audio/IsoAudioPlayer.swift +326 -0
  306. package/ios/audio/IsoAudioView.mm +173 -0
  307. package/ios/camera/IsoCamera.swift +682 -0
  308. package/ios/camera/IsoCameraView.mm +206 -0
  309. package/ios/datePicker/IsoDatePicker.swift +826 -0
  310. package/ios/datePicker/IsoDatePickerView.mm +118 -0
  311. package/ios/datePicker/IsoWheelView.swift +190 -0
  312. package/ios/image/IsoImage.swift +568 -0
  313. package/ios/image/IsoImageModule.mm +45 -0
  314. package/ios/image/IsoImagePipeline.swift +612 -0
  315. package/ios/image/IsoImageView.mm +173 -0
  316. package/ios/mediaSession/IsoNowPlaying.swift +150 -0
  317. package/ios/mediaSessionOff/IsoNowPlaying.swift +18 -0
  318. package/ios/modal/IsoModal.swift +301 -0
  319. package/ios/modal/IsoModalView.mm +132 -0
  320. package/ios/pdf/IsoPdfSupport.swift +247 -0
  321. package/ios/pdf/IsoPdfToolbar.swift +403 -0
  322. package/ios/pdf/IsoPdfView.mm +194 -0
  323. package/ios/pdf/IsoPdfViewer.swift +547 -0
  324. package/ios/shared/IsoAudioSession.swift +42 -0
  325. package/ios/sheet/IsoSheet.swift +259 -0
  326. package/ios/sheet/IsoSheetView.mm +143 -0
  327. package/ios/stubs/audio/IsoAudioViewStub.mm +32 -0
  328. package/ios/stubs/camera/IsoCameraViewStub.mm +32 -0
  329. package/ios/stubs/datePicker/IsoDatePickerViewStub.mm +32 -0
  330. package/ios/stubs/image/IsoImageViewStub.mm +62 -0
  331. package/ios/stubs/modal/IsoModalViewStub.mm +32 -0
  332. package/ios/stubs/pdf/IsoPdfViewStub.mm +32 -0
  333. package/ios/stubs/sheet/IsoSheetViewStub.mm +32 -0
  334. package/ios/stubs/video/IsoVideoViewStub.mm +32 -0
  335. package/ios/video/IsoVideoControls.swift +569 -0
  336. package/ios/video/IsoVideoFullscreen.swift +280 -0
  337. package/ios/video/IsoVideoPlayer.swift +421 -0
  338. package/ios/video/IsoVideoPlaylistPanel.swift +360 -0
  339. package/ios/video/IsoVideoView.mm +187 -0
  340. package/isoform.podspec +132 -0
  341. package/metro.js +81 -0
  342. package/package.json +180 -4
  343. package/react-native.config.js +12 -0
  344. package/scripts/setup-ios.js +85 -0
  345. package/src/adapters/react-native/camera/native/IsoCameraViewNativeComponent.ts +79 -0
  346. package/src/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.ts +44 -0
  347. package/src/adapters/react-native/image/native/IsoImageViewNativeComponent.ts +90 -0
  348. package/src/adapters/react-native/image/native/NativeIsoImageModule.ts +24 -0
  349. package/src/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.ts +69 -0
  350. package/src/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.ts +71 -0
  351. package/src/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.ts +74 -0
  352. package/src/adapters/react-native/modal/native/IsoModalViewNativeComponent.ts +47 -0
  353. package/src/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.ts +50 -0
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Spec of the native camera (New Architecture / Fabric).
3
+ *
4
+ * The React Native Codegen reads THIS file when the app is built and generates
5
+ * the native interfaces (props, events and commands) used by:
6
+ * · iOS: ios/camera/IsoCameraView.mm + ios/camera/IsoCamera.swift (AVFoundation)
7
+ * · Android: android/src/camera/.../IsoCameraViewManager.kt + IsoCameraView.kt (CameraX + Compose)
8
+ *
9
+ * Captures answer through events carrying the `requestId` of the command, which
10
+ * the JS side turns back into promises.
11
+ */
12
+ import type * as React from 'react';
13
+ import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
14
+ type EmptyEvent = Readonly<{}>;
15
+ type ErrorEvent = Readonly<{
16
+ message: string;
17
+ }>;
18
+ type PermissionEvent = Readonly<{
19
+ camera: string;
20
+ microphone: string;
21
+ }>;
22
+ type ZoomEvent = Readonly<{
23
+ zoom: CodegenTypes.Double;
24
+ }>;
25
+ type CodesEvent = Readonly<{
26
+ codes: {
27
+ value: string;
28
+ type: string;
29
+ }[];
30
+ }>;
31
+ type PhotoEvent = Readonly<{
32
+ requestId: CodegenTypes.Int32;
33
+ uri: string;
34
+ width: CodegenTypes.Int32;
35
+ height: CodegenTypes.Int32;
36
+ error: string;
37
+ }>;
38
+ type RecordStartEvent = Readonly<{
39
+ requestId: CodegenTypes.Int32;
40
+ error: string;
41
+ }>;
42
+ type RecordEndEvent = Readonly<{
43
+ requestId: CodegenTypes.Int32;
44
+ uri: string;
45
+ duration: CodegenTypes.Double;
46
+ error: string;
47
+ }>;
48
+ export interface NativeProps extends ViewProps {
49
+ facing?: CodegenTypes.WithDefault<'back' | 'front', 'back'>;
50
+ active?: CodegenTypes.WithDefault<boolean, true>;
51
+ flash?: CodegenTypes.WithDefault<'off' | 'on' | 'auto', 'off'>;
52
+ torch?: CodegenTypes.WithDefault<boolean, false>;
53
+ zoom?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
54
+ zoomGesture?: CodegenTypes.WithDefault<boolean, true>;
55
+ focusGesture?: CodegenTypes.WithDefault<boolean, true>;
56
+ /** Binds the video output and asks for the microphone. */
57
+ video?: CodegenTypes.WithDefault<boolean, false>;
58
+ /** Records sound with the video. */
59
+ audio?: CodegenTypes.WithDefault<boolean, true>;
60
+ /** Runs the code scanner. */
61
+ codeScanner?: CodegenTypes.WithDefault<boolean, false>;
62
+ /** Code kinds (`qr`, `ean-13`…). */
63
+ codeTypes?: ReadonlyArray<string>;
64
+ onCameraReady?: CodegenTypes.DirectEventHandler<EmptyEvent>;
65
+ onCameraError?: CodegenTypes.DirectEventHandler<ErrorEvent>;
66
+ onCameraPermission?: CodegenTypes.DirectEventHandler<PermissionEvent>;
67
+ onCameraZoom?: CodegenTypes.DirectEventHandler<ZoomEvent>;
68
+ onCameraCodes?: CodegenTypes.DirectEventHandler<CodesEvent>;
69
+ onCameraPhoto?: CodegenTypes.DirectEventHandler<PhotoEvent>;
70
+ onCameraRecordStart?: CodegenTypes.DirectEventHandler<RecordStartEvent>;
71
+ onCameraRecordEnd?: CodegenTypes.DirectEventHandler<RecordEndEvent>;
72
+ }
73
+ type ComponentType = HostComponent<NativeProps>;
74
+ interface NativeCommands {
75
+ takePhoto: (viewRef: React.ElementRef<ComponentType>, requestId: CodegenTypes.Int32, flash: string) => void;
76
+ startRecording: (viewRef: React.ElementRef<ComponentType>, requestId: CodegenTypes.Int32) => void;
77
+ stopRecording: (viewRef: React.ElementRef<ComponentType>, requestId: CodegenTypes.Int32) => void;
78
+ requestPermission: (viewRef: React.ElementRef<ComponentType>) => void;
79
+ }
80
+ export declare const Commands: NativeCommands;
81
+ declare const _default: ComponentType;
82
+ export default _default;
83
+ //# sourceMappingURL=IsoCameraViewNativeComponent.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
2
+ export const Commands = codegenNativeCommands({
3
+ supportedCommands: ['takePhoto', 'startRecording', 'stopRecording', 'requestPermission'],
4
+ });
5
+ export default codegenNativeComponent('IsoCameraView');
6
+ //# sourceMappingURL=IsoCameraViewNativeComponent.js.map
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { type DatePickerOwnProps } from '../../../core/datePicker';
3
+ type Props = DatePickerOwnProps & {
4
+ style?: any;
5
+ testID?: string;
6
+ };
7
+ /**
8
+ * Entry point of `DatePicker` on mobile. With `modules.datePicker` off nothing is
9
+ * rendered (and a dev warning is shown), instead of "native component not found".
10
+ */
11
+ export declare const DatePicker: {
12
+ (props: Props): React.JSX.Element;
13
+ displayName: string;
14
+ };
15
+ export {};
16
+ //# sourceMappingURL=DatePicker.d.ts.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * `DatePicker` without the native picker: `react-isoform/metro` uses this file instead of
3
+ * `DatePicker.tsx` when the date picker is off in `isoform.config.json`, so neither the
4
+ * picker nor its native spec enter the JS bundle.
5
+ */
6
+ export declare const DatePicker: {
7
+ (_props: any): any;
8
+ displayName: string;
9
+ };
10
+ //# sourceMappingURL=DatePicker.disabled.d.ts.map
@@ -0,0 +1,13 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { warnModuleDisabled } from '../../../core/modules';
3
+ /**
4
+ * `DatePicker` without the native picker: `react-isoform/metro` uses this file instead of
5
+ * `DatePicker.tsx` when the date picker is off in `isoform.config.json`, so neither the
6
+ * picker nor its native spec enter the JS bundle.
7
+ */
8
+ export const DatePicker = (_props) => {
9
+ warnModuleDisabled('datePicker');
10
+ return null;
11
+ };
12
+ DatePicker.displayName = 'DatePicker';
13
+ //# sourceMappingURL=DatePicker.disabled.js.map
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import { useMemo, useState } from 'react';
4
+ import { StyleSheet } from 'react-native';
5
+ import { isModuleEnabled } from '../../../config';
6
+ import { clampDate, defaultHeight, hourCycle, maximumMillis, minimumMillis, sameMoment, toMillis, } from '../../../core/datePicker';
7
+ import { warnModuleDisabled } from '../../../core/modules';
8
+ let spec;
9
+ const nativeSpec = () => (spec ??= require('./native/IsoDatePickerViewNativeComponent'));
10
+ /**
11
+ * Entry point of `DatePicker` on mobile. With `modules.datePicker` off nothing is
12
+ * rendered (and a dev warning is shown), instead of "native component not found".
13
+ */
14
+ export const DatePicker = (props) => {
15
+ if (!isModuleEnabled('datePicker')) {
16
+ warnModuleDisabled('datePicker');
17
+ return null;
18
+ }
19
+ return _jsx(NativeDatePicker, { ...props });
20
+ };
21
+ DatePicker.displayName = 'DatePicker';
22
+ /**
23
+ * The picker: the native view is sized to what it reports (a calendar is taller than
24
+ * a pill), unless the style gives a `height`. Changes are clamped to the limits here,
25
+ * so every platform follows the same rule, and reported only when they are new.
26
+ */
27
+ function NativeDatePicker({ value, onValueChange, mode = 'date', display = 'inline', minimumDate, maximumDate, locale, is24Hour, tintColor, disabled = false, label, style, testID, }) {
28
+ const { default: NativePicker } = nativeSpec();
29
+ const [size, setSize] = useState(null);
30
+ // "now" until the app passes a value; frozen so a re-render does not move the picker
31
+ const fallback = useMemo(() => Date.now(), []);
32
+ const current = toMillis(value, fallback);
33
+ return (_jsx(NativePicker, { style: [{ height: size?.height ?? defaultHeight(mode, display) }, styles.fill, style], value: current, mode: mode, display: display, minimumDate: minimumMillis(minimumDate), maximumDate: maximumMillis(maximumDate), locale: locale ?? '', hourCycle: hourCycle(is24Hour), tintColor: tintColor, disabled: disabled, accessibilityLabel: label, testID: testID, onPickerSize: ({ nativeEvent }) => setSize({ width: nativeEvent.width, height: nativeEvent.height }), onPickerChange: ({ nativeEvent }) => {
34
+ const next = clampDate(new Date(nativeEvent.value), minimumDate, maximumDate);
35
+ if (!sameMoment(next, new Date(current)))
36
+ onValueChange?.(next);
37
+ } }));
38
+ }
39
+ const styles = StyleSheet.create({
40
+ // wide by default, like the web input's block; a `width` in the style wins
41
+ fill: { alignSelf: 'stretch' },
42
+ });
43
+ //# sourceMappingURL=DatePicker.js.map
@@ -0,0 +1,35 @@
1
+ import type { CodegenTypes, ColorValue, HostComponent, ViewProps } from 'react-native';
2
+ type ValueEvent = Readonly<{
3
+ value: CodegenTypes.Double;
4
+ }>;
5
+ type SizeEvent = Readonly<{
6
+ width: CodegenTypes.Double;
7
+ height: CodegenTypes.Double;
8
+ }>;
9
+ export interface NativeProps extends ViewProps {
10
+ /** The selected moment (ms since the epoch). */
11
+ value?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
12
+ /** What it edits. */
13
+ mode?: CodegenTypes.WithDefault<'date' | 'time' | 'datetime', 'date'>;
14
+ /** How it is drawn. */
15
+ display?: CodegenTypes.WithDefault<'inline' | 'wheel' | 'compact', 'inline'>;
16
+ /** Earliest moment (ms); `-8.64e15` means no limit. */
17
+ minimumDate?: CodegenTypes.WithDefault<CodegenTypes.Double, -8640000000000000>;
18
+ /** Latest moment (ms); `8.64e15` means no limit. */
19
+ maximumDate?: CodegenTypes.WithDefault<CodegenTypes.Double, 8640000000000000>;
20
+ /** BCP 47 language tag; empty = the device's. */
21
+ locale?: string;
22
+ /** `auto` follows the locale; `h12` / `h24` force the clock. */
23
+ hourCycle?: CodegenTypes.WithDefault<'auto' | 'h12' | 'h24', 'auto'>;
24
+ /** Accent color (unset = the platform's). */
25
+ tintColor?: ColorValue;
26
+ /** Blocks the picker. */
27
+ disabled?: CodegenTypes.WithDefault<boolean, false>;
28
+ /** The user picked a moment. */
29
+ onPickerChange?: CodegenTypes.DirectEventHandler<ValueEvent>;
30
+ /** Natural size of the picker (the view is sized to it). */
31
+ onPickerSize?: CodegenTypes.DirectEventHandler<SizeEvent>;
32
+ }
33
+ declare const _default: HostComponent<NativeProps>;
34
+ export default _default;
35
+ //# sourceMappingURL=IsoDatePickerViewNativeComponent.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Spec of the native date picker (New Architecture / Fabric).
3
+ *
4
+ * The React Native Codegen reads THIS file when the app is built and generates
5
+ * the native interfaces (props and events) used by:
6
+ * · iOS: ios/datePicker/IsoDatePickerView.mm + ios/datePicker/IsoDatePicker.swift (SwiftUI `DatePicker`)
7
+ * · Android: android/src/datePicker/.../IsoDatePickerViewManager.kt + IsoDatePickerView.kt (Jetpack Compose, Material 3)
8
+ *
9
+ * Moments travel as milliseconds since the epoch (UTC); each side shows them in the device's time zone.
10
+ */
11
+ import { codegenNativeComponent } from 'react-native';
12
+ export default codegenNativeComponent('IsoDatePickerView');
13
+ //# sourceMappingURL=IsoDatePickerViewNativeComponent.js.map
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { type ImageOwnProps, type ImageSourceInput } from '../../../core/image';
3
+ type Props = ImageOwnProps & {
4
+ src?: ImageSourceInput;
5
+ /** @deprecated React Native's name for `src`. */
6
+ source?: any;
7
+ alt?: string;
8
+ width?: number;
9
+ height?: number;
10
+ style?: any;
11
+ testID?: string;
12
+ [key: string]: any;
13
+ };
14
+ /** A source as the native view reads it: the URL (a `require` resolved by Metro), the cache key and the headers. */
15
+ export declare function nativeSource(src: ImageSourceInput | undefined): {
16
+ uri: string;
17
+ cacheKey: string;
18
+ headers: string[];
19
+ };
20
+ /**
21
+ * Entry point of `Image` on mobile: the lib's own image with `modules.image` on,
22
+ * React Native's `Image` otherwise (so turning the module off never breaks a screen).
23
+ */
24
+ export declare const Image: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<any>>;
25
+ export {};
26
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `Image` without the lib's pipeline: `react-isoform/metro` uses this file instead of
3
+ * `Image.tsx` when the image module is off in `isoform.config.json`, so neither the
4
+ * pipeline's JS nor its native spec enter the bundle. It is React Native's `Image`.
5
+ */
6
+ export { PlainImage as Image } from './PlainImage';
7
+ //# sourceMappingURL=Image.disabled.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `Image` without the lib's pipeline: `react-isoform/metro` uses this file instead of
3
+ * `Image.tsx` when the image module is off in `isoform.config.json`, so neither the
4
+ * pipeline's JS nor its native spec enter the bundle. It is React Native's `Image`.
5
+ */
6
+ export { PlainImage as Image } from './PlainImage';
7
+ //# sourceMappingURL=Image.disabled.js.map
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports */
3
+ import { forwardRef, useImperativeHandle, useRef } from 'react';
4
+ import { Image as RNImage, StyleSheet } from 'react-native';
5
+ import { isModuleEnabled } from '../../../config';
6
+ import { DEFAULT_DOUBLE_TAP_ZOOM, DEFAULT_MAX_ZOOM, DEFAULT_TRANSITION, flatHeaders, isBlurhash, nativeContentFit, positionFractions, } from '../../../core/image';
7
+ import { warnOnce } from '../../../core/dev';
8
+ import { PlainImage } from './PlainImage';
9
+ let spec;
10
+ const nativeSpec = () => (spec ??= require('./native/IsoImageViewNativeComponent'));
11
+ /** A source as the native view reads it: the URL (a `require` resolved by Metro), the cache key and the headers. */
12
+ export function nativeSource(src) {
13
+ if (typeof src === 'number')
14
+ return { uri: RNImage.resolveAssetSource(src)?.uri ?? '', cacheKey: '', headers: [] };
15
+ if (typeof src === 'string')
16
+ return { uri: src, cacheKey: '', headers: [] };
17
+ return { uri: src?.uri ?? '', cacheKey: src?.cacheKey ?? '', headers: flatHeaders(src?.headers) };
18
+ }
19
+ /**
20
+ * Entry point of `Image` on mobile: the lib's own image with `modules.image` on,
21
+ * React Native's `Image` otherwise (so turning the module off never breaks a screen).
22
+ */
23
+ export const Image = forwardRef((props, ref) => isModuleEnabled('image') ? _jsx(NativeImage, { ref: ref, ...props }) : _jsx(PlainImage, { ref: ref, ...props }));
24
+ Image.displayName = 'Image';
25
+ /**
26
+ * The lib's image: the native view loads, caches and draws the picture; this side only
27
+ * resolves the sources and maps the events to the documented payloads.
28
+ */
29
+ const NativeImage = forwardRef(({ src, source, alt, width, height, contentFit, contentPosition, placeholder, blurhash, transition = DEFAULT_TRANSITION, tintColor, blurRadius = 0, cachePolicy = 'memory-disk', priority = 'normal', autoplay = true, zoomable = false, maxZoom = DEFAULT_MAX_ZOOM, doubleTapZoom = DEFAULT_DOUBLE_TAP_ZOOM, rotatable = false, onZoomChange, onLoadStart, onProgress, onLoad, onError, style, testID, ...rest }, ref) => {
30
+ const { default: NativeView, Commands } = nativeSpec();
31
+ const view = useRef(null);
32
+ // the handle sends commands to the native view (a no-op until it is mounted)
33
+ useImperativeHandle(ref, () => {
34
+ const send = (run) => view.current && run(view.current);
35
+ return {
36
+ zoomTo: (scale, options = {}) => send((target) => Commands.zoomTo(target, scale, options.focusX ?? -1, options.focusY ?? -1, options.animated ?? true)),
37
+ resetZoom: (animated = true) => send((target) => Commands.resetZoom(target, animated)),
38
+ rotateTo: (degrees, animated = true) => send((target) => Commands.rotateTo(target, degrees, animated)),
39
+ play: () => send((target) => Commands.play(target)),
40
+ pause: () => send((target) => Commands.pause(target)),
41
+ reload: () => send((target) => Commands.reload(target)),
42
+ };
43
+ }, [Commands]);
44
+ const picture = nativeSource(src ?? source);
45
+ const position = positionFractions(contentPosition);
46
+ if (blurhash && !isBlurhash(blurhash))
47
+ warnOnce(`image-blurhash:${blurhash}`, `invalid blurhash: "${blurhash}".`);
48
+ const radius = StyleSheet.flatten(style)?.borderRadius;
49
+ return (_jsx(NativeView, { ref: view, ...rest, style: [width !== undefined || height !== undefined ? { width, height } : null, style], uri: picture.uri, cacheKey: picture.cacheKey, headers: picture.headers, placeholderUri: placeholder === undefined ? '' : nativeSource(placeholder).uri, blurhash: isBlurhash(blurhash) ? blurhash : '', contentFit: nativeContentFit(contentFit), positionX: position.x, positionY: position.y, transition: Math.max(0, transition), tintColor: tintColor, blurRadius: Math.max(0, blurRadius), cachePolicy: cachePolicy === 'memory-disk' ? 'memoryDisk' : cachePolicy, priority: priority, autoplay: autoplay, zoomable: zoomable, maxZoom: Math.max(1, maxZoom), doubleTapZoom: Math.max(1, doubleTapZoom), rotatable: rotatable, cornerRadius: typeof radius === 'number' ? radius : 0, accessible: alt !== undefined && alt !== '', accessibilityRole: "image", accessibilityLabel: rest.accessibilityLabel ?? alt, testID: testID, onImageLoadStart: onLoadStart ? () => onLoadStart() : undefined, onImageProgress: onProgress ? ({ nativeEvent }) => onProgress({ loaded: nativeEvent.loaded, total: nativeEvent.total }) : undefined, onImageLoad: onLoad
50
+ ? ({ nativeEvent }) => onLoad({ width: nativeEvent.width, height: nativeEvent.height, cacheType: nativeEvent.cacheType })
51
+ : undefined, onImageError: onError ? ({ nativeEvent }) => onError({ message: nativeEvent.message }) : undefined, onImageZoom: onZoomChange
52
+ ? ({ nativeEvent }) => onZoomChange({ scale: nativeEvent.scale, x: nativeEvent.x, y: nativeEvent.y, rotation: nativeEvent.rotation })
53
+ : undefined }));
54
+ });
55
+ NativeImage.displayName = 'NativeImage';
56
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { type ImageOwnProps, type ImageSourceInput } from '../../../core/image';
3
+ /** Props the plain image reads; the rest goes straight to React Native's `Image`. */
4
+ type Props = ImageOwnProps & {
5
+ src?: ImageSourceInput;
6
+ source?: any;
7
+ alt?: string;
8
+ [key: string]: any;
9
+ };
10
+ /**
11
+ * `Image` with the `image` module off: React Native's own `Image`, with the module's
12
+ * props it understands mapped onto it (`contentFit` → `resizeMode`, `tintColor`,
13
+ * `blurRadius`, a local `placeholder` → `defaultSource`, the same event payloads).
14
+ * Blurhash, crossfade, cache policies, priorities, zoom gestures and the `ref` commands need the module.
15
+ */
16
+ export declare const PlainImage: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<any>>;
17
+ export {};
18
+ //# sourceMappingURL=PlainImage.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import { forwardRef } from 'react';
4
+ import { Image as RNImage } from 'react-native';
5
+ import { resizeModeOf } from '../../../core/image';
6
+ /** `src` as React Native's `source` (`{ uri, headers }` or the `require` number). */
7
+ const toSource = (src) => typeof src === 'string' ? { uri: src } : typeof src === 'object' && src ? { uri: src.uri, headers: src.headers } : src;
8
+ /**
9
+ * `Image` with the `image` module off: React Native's own `Image`, with the module's
10
+ * props it understands mapped onto it (`contentFit` → `resizeMode`, `tintColor`,
11
+ * `blurRadius`, a local `placeholder` → `defaultSource`, the same event payloads).
12
+ * Blurhash, crossfade, cache policies, priorities, zoom gestures and the `ref` commands need the module.
13
+ */
14
+ export const PlainImage = forwardRef(({ src, source, alt, contentFit, contentPosition: _position, placeholder, blurhash: _blurhash, transition: _transition, tintColor, blurRadius, cachePolicy: _cachePolicy, priority: _priority, autoplay: _autoplay, zoomable: _zoomable, maxZoom: _maxZoom, doubleTapZoom: _doubleTapZoom, rotatable: _rotatable, onZoomChange: _onZoomChange, onLoadStart, onProgress, onLoad, onError, style, ...rest }, ref) => (_jsx(RNImage, { ref: ref, ...rest, source: src !== undefined ? toSource(src) : source, alt: alt, accessibilityLabel: rest.accessibilityLabel ?? alt, resizeMode: rest.resizeMode ?? (contentFit ? resizeModeOf(contentFit) : undefined), defaultSource: typeof placeholder === 'number' ? placeholder : undefined, tintColor: tintColor, blurRadius: blurRadius, style: style, onLoadStart: onLoadStart, onProgress: onProgress ? (e) => onProgress({ loaded: e.nativeEvent.loaded, total: e.nativeEvent.total }) : undefined, onLoad: onLoad
15
+ ? (e) => onLoad({ width: e.nativeEvent.source?.width ?? 0, height: e.nativeEvent.source?.height ?? 0, cacheType: 'none' })
16
+ : undefined, onError: onError ? (e) => onError({ message: String(e.nativeEvent?.error ?? 'Image failed to load') }) : undefined })));
17
+ PlainImage.displayName = 'Image';
18
+ //# sourceMappingURL=PlainImage.js.map
@@ -0,0 +1,4 @@
1
+ import { type ImageCacheApi } from '../../../core/image';
2
+ /** `prefetchImages` and `clearImageCache` on iOS and Android. */
3
+ export declare const nativeImageCache: ImageCacheApi;
4
+ //# sourceMappingURL=imageCache.d.ts.map
@@ -0,0 +1,17 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports */
2
+ import { flatHeaders } from '../../../core/image';
3
+ /** The TurboModule, looked up on first use (`null` when the app was built without the image module). */
4
+ const nativeModule = () => {
5
+ try {
6
+ return require('./native/NativeIsoImageModule').default;
7
+ }
8
+ catch {
9
+ return null;
10
+ }
11
+ };
12
+ /** `prefetchImages` and `clearImageCache` on iOS and Android. */
13
+ export const nativeImageCache = {
14
+ prefetch: (urls, { cachePolicy = 'disk', headers }) => nativeModule()?.prefetch(urls, flatHeaders(headers), cachePolicy !== 'disk', cachePolicy !== 'memory') ?? Promise.resolve(false),
15
+ clear: (options) => nativeModule()?.clear(options.memory, options.disk) ?? Promise.resolve(),
16
+ };
17
+ //# sourceMappingURL=imageCache.js.map
@@ -0,0 +1,86 @@
1
+ import type * as React from 'react';
2
+ import type { CodegenTypes, ColorValue, HostComponent, ViewProps } from 'react-native';
3
+ type EmptyEvent = Readonly<{}>;
4
+ type ProgressEvent = Readonly<{
5
+ loaded: CodegenTypes.Double;
6
+ total: CodegenTypes.Double;
7
+ }>;
8
+ type LoadEvent = Readonly<{
9
+ width: CodegenTypes.Double;
10
+ height: CodegenTypes.Double;
11
+ cacheType: string;
12
+ }>;
13
+ type ErrorEvent = Readonly<{
14
+ message: string;
15
+ }>;
16
+ type ZoomEvent = Readonly<{
17
+ scale: CodegenTypes.Double;
18
+ x: CodegenTypes.Double;
19
+ y: CodegenTypes.Double;
20
+ rotation: CodegenTypes.Double;
21
+ }>;
22
+ export interface NativeProps extends ViewProps {
23
+ /** The picture: `https://`, `file://`, `data:` (and `content://` or a resource name on Android). */
24
+ uri?: string;
25
+ /** Cache key instead of the URL (empty = the URL). */
26
+ cacheKey?: string;
27
+ /** HTTP headers as `[name, value, name, value…]`. */
28
+ headers?: ReadonlyArray<string>;
29
+ /** A picture shown until `uri` loads (empty = none). */
30
+ placeholderUri?: string;
31
+ /** A blurhash shown until `uri` loads (empty = none; wins over `placeholderUri`). */
32
+ blurhash?: string;
33
+ /** How the picture fills the view. */
34
+ contentFit?: CodegenTypes.WithDefault<'cover' | 'contain' | 'fill' | 'none' | 'scaleDown', 'cover'>;
35
+ /** Horizontal position of the picture in the free space: 0 left, 0.5 center, 1 right. */
36
+ positionX?: CodegenTypes.WithDefault<CodegenTypes.Double, 0.5>;
37
+ /** Vertical position of the picture in the free space: 0 top, 0.5 center, 1 bottom. */
38
+ positionY?: CodegenTypes.WithDefault<CodegenTypes.Double, 0.5>;
39
+ /** Crossfade from the placeholder, in ms. */
40
+ transition?: CodegenTypes.WithDefault<CodegenTypes.Double, 250>;
41
+ /** Paints the non-transparent pixels. */
42
+ tintColor?: ColorValue;
43
+ /** Gaussian blur radius, in points. */
44
+ blurRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
45
+ /** Which caches keep the picture. */
46
+ cachePolicy?: CodegenTypes.WithDefault<'memoryDisk' | 'memory' | 'disk' | 'none', 'memoryDisk'>;
47
+ /** Download order. */
48
+ priority?: CodegenTypes.WithDefault<'low' | 'normal' | 'high', 'normal'>;
49
+ /** Plays animated pictures. */
50
+ autoplay?: CodegenTypes.WithDefault<boolean, true>;
51
+ /** Pinch, drag and double-tap gestures. */
52
+ zoomable?: CodegenTypes.WithDefault<boolean, false>;
53
+ /** Largest zoom. */
54
+ maxZoom?: CodegenTypes.WithDefault<CodegenTypes.Double, 4>;
55
+ /** Zoom of a double tap. */
56
+ doubleTapZoom?: CodegenTypes.WithDefault<CodegenTypes.Double, 2.5>;
57
+ /** Two-finger rotation (with `zoomable`). */
58
+ rotatable?: CodegenTypes.WithDefault<boolean, false>;
59
+ /** Corner radius the picture is clipped to (the view's `borderRadius`). */
60
+ cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
61
+ /** The download started. */
62
+ onImageLoadStart?: CodegenTypes.DirectEventHandler<EmptyEvent>;
63
+ /** Bytes received. */
64
+ onImageProgress?: CodegenTypes.DirectEventHandler<ProgressEvent>;
65
+ /** The picture is on screen (`cacheType`: `memory`, `disk` or `none`). */
66
+ onImageLoad?: CodegenTypes.DirectEventHandler<LoadEvent>;
67
+ /** The picture could not be loaded or decoded. */
68
+ onImageError?: CodegenTypes.DirectEventHandler<ErrorEvent>;
69
+ /** Zoom, offset or rotation changed. */
70
+ onImageZoom?: CodegenTypes.DirectEventHandler<ZoomEvent>;
71
+ }
72
+ type ComponentType = HostComponent<NativeProps>;
73
+ /** Commands sent from the `ref` (`ImageHandle`). */
74
+ interface NativeCommands {
75
+ /** Zooms to `scale`; `focusX`/`focusY` in points (negative = the center). */
76
+ zoomTo: (view: React.ElementRef<ComponentType>, scale: CodegenTypes.Double, focusX: CodegenTypes.Double, focusY: CodegenTypes.Double, animated: boolean) => void;
77
+ resetZoom: (view: React.ElementRef<ComponentType>, animated: boolean) => void;
78
+ rotateTo: (view: React.ElementRef<ComponentType>, degrees: CodegenTypes.Double, animated: boolean) => void;
79
+ play: (view: React.ElementRef<ComponentType>) => void;
80
+ pause: (view: React.ElementRef<ComponentType>) => void;
81
+ reload: (view: React.ElementRef<ComponentType>) => void;
82
+ }
83
+ export declare const Commands: NativeCommands;
84
+ declare const _default: HostComponent<NativeProps>;
85
+ export default _default;
86
+ //# sourceMappingURL=IsoImageViewNativeComponent.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Spec of the native image view (New Architecture / Fabric).
3
+ *
4
+ * The React Native Codegen reads THIS file when the app is built and generates
5
+ * the native interfaces (props and events) used by:
6
+ * · iOS: ios/image/IsoImageView.mm + ios/image/IsoImage.swift (UIKit + the lib's pipeline)
7
+ * · Android: android/src/image/.../IsoImageViewManager.kt + IsoImageView.kt
8
+ */
9
+ import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
10
+ export const Commands = codegenNativeCommands({
11
+ supportedCommands: ['zoomTo', 'resetZoom', 'rotateTo', 'play', 'pause', 'reload'],
12
+ });
13
+ export default codegenNativeComponent('IsoImageView');
14
+ //# sourceMappingURL=IsoImageViewNativeComponent.js.map
@@ -0,0 +1,17 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ /**
4
+ * Downloads the pictures into the cache.
5
+ * @param urls The pictures.
6
+ * @param headers HTTP headers as `[name, value, name, value…]`.
7
+ * @param memory Decodes them into the memory cache.
8
+ * @param disk Keeps the files in the disk cache.
9
+ * @returns `true` when every picture was cached.
10
+ */
11
+ prefetch(urls: ReadonlyArray<string>, headers: ReadonlyArray<string>, memory: boolean, disk: boolean): Promise<boolean>;
12
+ /** Empties the memory cache, the disk cache or both. */
13
+ clear(memory: boolean, disk: boolean): Promise<void>;
14
+ }
15
+ declare const _default: any;
16
+ export default _default;
17
+ //# sourceMappingURL=NativeIsoImageModule.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Spec of the image cache module (TurboModule): `prefetchImages` and `clearImageCache`.
3
+ * Implemented by ios/image/IsoImageModule.mm and android/src/image/.../IsoImageModule.kt;
4
+ * with the `image` module off the native side is an empty shell and `get` returns `null`
5
+ * on Android (the iOS shell resolves `false`).
6
+ */
7
+ import { TurboModuleRegistry } from 'react-native';
8
+ export default TurboModuleRegistry.get('IsoImageModule');
9
+ //# sourceMappingURL=NativeIsoImageModule.js.map
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { WithoutPlaylist } from '../../../../core/playlist';
3
+ import type { AudioOwnProps } from '../../../../core/media';
4
+ /**
5
+ * Entry point of `Audio` on mobile. With `modules.audio` off not even the native
6
+ * spec is loaded: an empty box with the same style stays (and a dev warning),
7
+ * instead of the "native component not found" error.
8
+ */
9
+ export declare const Audio: React.ForwardRefExoticComponent<Partial<AudioOwnProps> & {
10
+ style?: any;
11
+ testID?: string; /** Drawn over the player (the playlist button and panel). */
12
+ overlay?: React.ReactNode; /** List position for the playlist button in the native controls (set by the playlist wrapper). */
13
+ playlist?: {
14
+ index: number;
15
+ count: number;
16
+ onPress(): void;
17
+ };
18
+ } & React.RefAttributes<WithoutPlaylist<import("../../../../core/media").MediaHandle>>>;
19
+ //# sourceMappingURL=Audio.d.ts.map
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /**
3
+ * `Audio` without a player: `react-isoform/metro` uses this file instead of
4
+ * `Audio.tsx` when audio is off in `isoform.config.json`, so neither the
5
+ * player nor the native spec enter the JS bundle.
6
+ */
7
+ export declare const Audio: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<import("../../../../core/media").MediaHandle>>;
8
+ //# sourceMappingURL=Audio.disabled.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import { forwardRef } from 'react';
4
+ import { View } from 'react-native';
5
+ import { warnModuleDisabled } from '../../../../core/modules';
6
+ /**
7
+ * `Audio` without a player: `react-isoform/metro` uses this file instead of
8
+ * `Audio.tsx` when audio is off in `isoform.config.json`, so neither the
9
+ * player nor the native spec enter the JS bundle.
10
+ */
11
+ export const Audio = forwardRef(({ style, testID }, _ref) => {
12
+ warnModuleDisabled('audio');
13
+ return _jsx(View, { style: style, testID: testID });
14
+ });
15
+ Audio.displayName = 'Audio';
16
+ //# sourceMappingURL=Audio.disabled.js.map
@@ -0,0 +1,40 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports */
3
+ import { forwardRef, useImperativeHandle, useRef } from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import { isModuleEnabled } from '../../../../config';
6
+ import { warnModuleDisabled } from '../../../../core/modules';
7
+ let spec;
8
+ const nativeSpec = () => (spec ??= require('./native/IsoAudioViewNativeComponent'));
9
+ /**
10
+ * Entry point of `Audio` on mobile. With `modules.audio` off not even the native
11
+ * spec is loaded: an empty box with the same style stays (and a dev warning),
12
+ * instead of the "native component not found" error.
13
+ */
14
+ export const Audio = forwardRef((props, ref) => {
15
+ if (!isModuleEnabled('audio')) {
16
+ warnModuleDisabled('audio');
17
+ return _jsx(View, { style: props.style, testID: props.testID });
18
+ }
19
+ return _jsx(AudioPlayer, { ref: ref, ...props });
20
+ });
21
+ Audio.displayName = 'Audio';
22
+ /**
23
+ * The player: the lib's native component (AVPlayer + UIKit on iOS, Media3 +
24
+ * Compose on Android). It only translates the isoform contract to the native
25
+ * props and events. The card draws its own background, so the style just sizes it.
26
+ */
27
+ const AudioPlayer = forwardRef(({ src, controls = true, title, artist, artwork, autoPlay = false, loop = false, muted = false, rate = 1, volume = 1, onPlay, onPause, onEnded, onTimeUpdate, onLoad, onError, onSeek, onBuffering, onBufferedChange, onVolumeChange, onRateChange, style, testID, overlay, playlist, }, ref) => {
28
+ const { default: NativeAudio, Commands } = nativeSpec();
29
+ const native = useRef(null);
30
+ useImperativeHandle(ref, () => ({
31
+ play: () => native.current && Commands.play(native.current),
32
+ pause: () => native.current && Commands.pause(native.current),
33
+ seekTo: (seconds) => native.current && Commands.seekTo(native.current, seconds),
34
+ }), [Commands]);
35
+ return (_jsxs(View, { style: [styles.container, style], testID: testID, children: [_jsx(NativeAudio, { ref: native, playlistIndex: playlist?.index ?? -1, playlistCount: playlist?.count ?? 0, onPlayerPlaylist: () => playlist?.onPress(), style: StyleSheet.absoluteFill, src: src, controls: controls, title: title, artist: artist, artwork: artwork, autoPlay: autoPlay, loop: loop, muted: muted, rate: rate, volume: volume, onPlayerPlay: () => onPlay?.(), onPlayerPause: () => onPause?.(), onPlayerEnd: () => onEnded?.(), onPlayerTime: (e) => onTimeUpdate?.({ currentTime: e.nativeEvent.currentTime, duration: e.nativeEvent.duration }), onPlayerLoad: ({ nativeEvent: { duration } }) => onLoad?.({ duration, width: 0, height: 0 }), onPlayerError: (e) => onError?.(e.nativeEvent.message), onPlayerSeek: (e) => onSeek?.({ from: e.nativeEvent.from, to: e.nativeEvent.to }), onPlayerBuffering: (e) => onBuffering?.(e.nativeEvent.buffering), onPlayerBuffered: (e) => onBufferedChange?.(e.nativeEvent.buffered), onPlayerVolume: (e) => onVolumeChange?.({ volume: e.nativeEvent.volume, muted: e.nativeEvent.muted }), onPlayerRate: (e) => onRateChange?.(e.nativeEvent.rate) }), overlay] }));
36
+ });
37
+ AudioPlayer.displayName = 'AudioPlayer';
38
+ /** Default card height (padding + title row + seek bar with times + play row), so an unsized `Audio` is neither collapsed nor clipped. */
39
+ const styles = StyleSheet.create({ container: { minHeight: 180, overflow: 'hidden' } });
40
+ //# sourceMappingURL=Audio.js.map