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.
- package/LICENSE +21 -0
- package/README.md +104 -2
- package/android/build.gradle +212 -0
- package/android/consumer-rules.pro +10 -0
- package/android/src/audio/java/com/isoform/IsoAudioControls.kt +531 -0
- package/android/src/audio/java/com/isoform/IsoAudioView.kt +328 -0
- package/android/src/audio/java/com/isoform/IsoAudioViewManager.kt +88 -0
- package/android/src/camera/AndroidManifest.xml +6 -0
- package/android/src/camera/java/com/isoform/IsoCamera.kt +99 -0
- package/android/src/camera/java/com/isoform/IsoCameraController.kt +232 -0
- package/android/src/camera/java/com/isoform/IsoCameraLifecycle.kt +26 -0
- package/android/src/camera/java/com/isoform/IsoCameraView.kt +392 -0
- package/android/src/camera/java/com/isoform/IsoCameraViewManager.kt +76 -0
- package/android/src/cameraCodes/java/com/isoform/IsoCodeScanner.kt +90 -0
- package/android/src/cameraCodesOff/java/com/isoform/IsoCodeScanner.kt +17 -0
- package/android/src/cameraVideo/AndroidManifest.xml +4 -0
- package/android/src/cameraVideo/java/com/isoform/IsoCameraRecorder.kt +83 -0
- package/android/src/cameraVideoOff/java/com/isoform/IsoCameraRecorder.kt +22 -0
- package/android/src/datePicker/java/com/isoform/IsoDatePicker.kt +724 -0
- package/android/src/datePicker/java/com/isoform/IsoDatePickerView.kt +137 -0
- package/android/src/datePicker/java/com/isoform/IsoDatePickerViewManager.kt +56 -0
- package/android/src/image/java/com/isoform/IsoImageModule.kt +33 -0
- package/android/src/image/java/com/isoform/IsoImagePipeline.kt +516 -0
- package/android/src/image/java/com/isoform/IsoImageView.kt +573 -0
- package/android/src/image/java/com/isoform/IsoImageViewManager.kt +119 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/isoform/IsoformPackage.kt +52 -0
- package/android/src/mediaSession/AndroidManifest.xml +18 -0
- package/android/src/mediaSession/java/com/isoform/IsoMediaService.kt +21 -0
- package/android/src/mediaSession/java/com/isoform/IsoMediaSession.kt +92 -0
- package/android/src/mediaSessionOff/java/com/isoform/IsoMediaSession.kt +18 -0
- package/android/src/modal/java/com/isoform/IsoModal.kt +182 -0
- package/android/src/modal/java/com/isoform/IsoModalView.kt +137 -0
- package/android/src/modal/java/com/isoform/IsoModalViewManager.kt +70 -0
- package/android/src/pdf/java/com/isoform/IsoPdfDocument.kt +157 -0
- package/android/src/pdf/java/com/isoform/IsoPdfEngine.kt +161 -0
- package/android/src/pdf/java/com/isoform/IsoPdfIcons.kt +76 -0
- package/android/src/pdf/java/com/isoform/IsoPdfReader.kt +176 -0
- package/android/src/pdf/java/com/isoform/IsoPdfView.kt +372 -0
- package/android/src/pdf/java/com/isoform/IsoPdfViewManager.kt +100 -0
- package/android/src/pdf/java/com/isoform/IsoPdfViewer.kt +849 -0
- package/android/src/sheet/java/com/isoform/IsoSheet.kt +247 -0
- package/android/src/sheet/java/com/isoform/IsoSheetView.kt +188 -0
- package/android/src/sheet/java/com/isoform/IsoSheetViewManager.kt +76 -0
- package/android/src/video/java/com/isoform/IsoVideoControls.kt +921 -0
- package/android/src/video/java/com/isoform/IsoVideoPlaylistPanel.kt +247 -0
- package/android/src/video/java/com/isoform/IsoVideoView.kt +324 -0
- package/android/src/video/java/com/isoform/IsoVideoViewManager.kt +84 -0
- package/babel.js +133 -0
- package/dist/adapters/react-dom/adapter.d.ts +3 -0
- package/dist/adapters/react-dom/adapter.js +108 -0
- package/dist/adapters/react-dom/camera/CameraElement.d.ts +15 -0
- package/dist/adapters/react-dom/camera/CameraElement.js +293 -0
- package/dist/adapters/react-dom/camera/LazyCamera.d.ts +4 -0
- package/dist/adapters/react-dom/camera/LazyCamera.js +21 -0
- package/dist/adapters/react-dom/camera/webCamera.d.ts +27 -0
- package/dist/adapters/react-dom/camera/webCamera.js +51 -0
- package/dist/adapters/react-dom/css/sheet.d.ts +43 -0
- package/dist/adapters/react-dom/css/sheet.js +183 -0
- package/dist/adapters/react-dom/datePicker/DatePicker.d.ts +19 -0
- package/dist/adapters/react-dom/datePicker/DatePicker.js +31 -0
- package/dist/adapters/react-dom/image/Image.d.ts +23 -0
- package/dist/adapters/react-dom/image/Image.js +256 -0
- package/dist/adapters/react-dom/media/audio/AudioControls.d.ts +44 -0
- package/dist/adapters/react-dom/media/audio/AudioControls.js +53 -0
- package/dist/adapters/react-dom/media/audio/AudioElement.d.ts +18 -0
- package/dist/adapters/react-dom/media/audio/AudioElement.js +139 -0
- package/dist/adapters/react-dom/media/audio/LazyAudio.d.ts +3 -0
- package/dist/adapters/react-dom/media/audio/LazyAudio.js +22 -0
- package/dist/adapters/react-dom/media/audio/audioStyles.d.ts +3 -0
- package/dist/adapters/react-dom/media/audio/audioStyles.js +52 -0
- package/dist/adapters/react-dom/media/index.d.ts +4 -0
- package/dist/adapters/react-dom/media/index.js +10 -0
- package/dist/adapters/react-dom/media/pdf/LazyPdf.d.ts +4 -0
- package/dist/adapters/react-dom/media/pdf/LazyPdf.js +22 -0
- package/dist/adapters/react-dom/media/pdf/PdfElement.d.ts +20 -0
- package/dist/adapters/react-dom/media/pdf/PdfElement.js +622 -0
- package/dist/adapters/react-dom/media/pdf/PdfPage.d.ts +31 -0
- package/dist/adapters/react-dom/media/pdf/PdfPage.js +154 -0
- package/dist/adapters/react-dom/media/pdf/PdfThumbnails.d.ts +12 -0
- package/dist/adapters/react-dom/media/pdf/PdfThumbnails.js +56 -0
- package/dist/adapters/react-dom/media/pdf/PdfToolbar.d.ts +82 -0
- package/dist/adapters/react-dom/media/pdf/PdfToolbar.js +92 -0
- package/dist/adapters/react-dom/media/pdf/pdfDocument.d.ts +90 -0
- package/dist/adapters/react-dom/media/pdf/pdfDocument.js +118 -0
- package/dist/adapters/react-dom/media/pdf/pdfStyles.d.ts +3 -0
- package/dist/adapters/react-dom/media/pdf/pdfStyles.js +107 -0
- package/dist/adapters/react-dom/media/pdf/pdfjs.d.ts +12 -0
- package/dist/adapters/react-dom/media/pdf/pdfjs.js +31 -0
- package/dist/adapters/react-dom/media/pdf/readAloud.d.ts +27 -0
- package/dist/adapters/react-dom/media/pdf/readAloud.js +136 -0
- package/dist/adapters/react-dom/media/pdf/search.d.ts +48 -0
- package/dist/adapters/react-dom/media/pdf/search.js +57 -0
- package/dist/adapters/react-dom/media/shared/Playlist.d.ts +21 -0
- package/dist/adapters/react-dom/media/shared/Playlist.js +240 -0
- package/dist/adapters/react-dom/media/shared/Track.d.ts +21 -0
- package/dist/adapters/react-dom/media/shared/Track.js +47 -0
- package/dist/adapters/react-dom/media/shared/controlStyles.d.ts +3 -0
- package/dist/adapters/react-dom/media/shared/controlStyles.js +46 -0
- package/dist/adapters/react-dom/media/shared/helpers.d.ts +22 -0
- package/dist/adapters/react-dom/media/shared/helpers.js +46 -0
- package/dist/adapters/react-dom/media/shared/icons.d.ts +49 -0
- package/dist/adapters/react-dom/media/shared/icons.js +52 -0
- package/dist/adapters/react-dom/media/shared/playlistHandle.d.ts +13 -0
- package/dist/adapters/react-dom/media/shared/playlistHandle.js +17 -0
- package/dist/adapters/react-dom/media/shared/withPlaylist.d.ts +4 -0
- package/dist/adapters/react-dom/media/shared/withPlaylist.js +24 -0
- package/dist/adapters/react-dom/media/video/LazyVideo.d.ts +4 -0
- package/dist/adapters/react-dom/media/video/LazyVideo.js +22 -0
- package/dist/adapters/react-dom/media/video/VideoControls.d.ts +43 -0
- package/dist/adapters/react-dom/media/video/VideoControls.js +89 -0
- package/dist/adapters/react-dom/media/video/VideoElement.d.ts +19 -0
- package/dist/adapters/react-dom/media/video/VideoElement.js +161 -0
- package/dist/adapters/react-dom/media/video/fullscreen.d.ts +17 -0
- package/dist/adapters/react-dom/media/video/fullscreen.js +43 -0
- package/dist/adapters/react-dom/media/video/pictureInPicture.d.ts +11 -0
- package/dist/adapters/react-dom/media/video/pictureInPicture.js +34 -0
- package/dist/adapters/react-dom/media/video/videoStyles.d.ts +3 -0
- package/dist/adapters/react-dom/media/video/videoStyles.js +49 -0
- package/dist/adapters/react-dom/modal/LazyModal.d.ts +8 -0
- package/dist/adapters/react-dom/modal/LazyModal.js +22 -0
- package/dist/adapters/react-dom/modal/Modal.d.ts +16 -0
- package/dist/adapters/react-dom/modal/Modal.js +101 -0
- package/dist/adapters/react-dom/normalize/domProps.d.ts +9 -0
- package/dist/adapters/react-dom/normalize/domProps.js +279 -0
- package/dist/adapters/react-dom/normalize/props.d.ts +5 -0
- package/dist/adapters/react-dom/normalize/props.js +258 -0
- package/dist/adapters/react-dom/normalize/style.d.ts +14 -0
- package/dist/adapters/react-dom/normalize/style.js +165 -0
- package/dist/adapters/react-dom/primitives.d.ts +6 -0
- package/dist/adapters/react-dom/primitives.js +37 -0
- package/dist/adapters/react-dom/sheet/LazySheet.d.ts +7 -0
- package/dist/adapters/react-dom/sheet/LazySheet.js +26 -0
- package/dist/adapters/react-dom/sheet/SheetElement.d.ts +17 -0
- package/dist/adapters/react-dom/sheet/SheetElement.js +223 -0
- package/dist/adapters/react-dom/sheet/sheetStyles.d.ts +3 -0
- package/dist/adapters/react-dom/sheet/sheetStyles.js +36 -0
- package/dist/adapters/react-dom/svg/elements.d.ts +5 -0
- package/dist/adapters/react-dom/svg/elements.js +32 -0
- package/dist/adapters/react-dom/themeToggle.bench.d.ts +2 -0
- package/dist/adapters/react-dom/themeToggle.bench.js +111 -0
- package/dist/adapters/react-native/adapter.d.ts +24 -0
- package/dist/adapters/react-native/adapter.js +356 -0
- package/dist/adapters/react-native/animatedHost.d.ts +21 -0
- package/dist/adapters/react-native/animatedHost.js +84 -0
- package/dist/adapters/react-native/animation.d.ts +63 -0
- package/dist/adapters/react-native/animation.js +340 -0
- package/dist/adapters/react-native/breakpoint.bench.d.ts +2 -0
- package/dist/adapters/react-native/breakpoint.bench.js +112 -0
- package/dist/adapters/react-native/camera/Camera.d.ts +12 -0
- package/dist/adapters/react-native/camera/Camera.disabled.d.ts +8 -0
- package/dist/adapters/react-native/camera/Camera.disabled.js +14 -0
- package/dist/adapters/react-native/camera/Camera.js +103 -0
- package/dist/adapters/react-native/camera/native/IsoCameraViewNativeComponent.d.ts +83 -0
- package/dist/adapters/react-native/camera/native/IsoCameraViewNativeComponent.js +6 -0
- package/dist/adapters/react-native/datePicker/DatePicker.d.ts +16 -0
- package/dist/adapters/react-native/datePicker/DatePicker.disabled.d.ts +10 -0
- package/dist/adapters/react-native/datePicker/DatePicker.disabled.js +13 -0
- package/dist/adapters/react-native/datePicker/DatePicker.js +43 -0
- package/dist/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.d.ts +35 -0
- package/dist/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.js +13 -0
- package/dist/adapters/react-native/image/Image.d.ts +26 -0
- package/dist/adapters/react-native/image/Image.disabled.d.ts +7 -0
- package/dist/adapters/react-native/image/Image.disabled.js +7 -0
- package/dist/adapters/react-native/image/Image.js +56 -0
- package/dist/adapters/react-native/image/PlainImage.d.ts +18 -0
- package/dist/adapters/react-native/image/PlainImage.js +18 -0
- package/dist/adapters/react-native/image/imageCache.d.ts +4 -0
- package/dist/adapters/react-native/image/imageCache.js +17 -0
- package/dist/adapters/react-native/image/native/IsoImageViewNativeComponent.d.ts +86 -0
- package/dist/adapters/react-native/image/native/IsoImageViewNativeComponent.js +14 -0
- package/dist/adapters/react-native/image/native/NativeIsoImageModule.d.ts +17 -0
- package/dist/adapters/react-native/image/native/NativeIsoImageModule.js +9 -0
- package/dist/adapters/react-native/media/audio/Audio.d.ts +19 -0
- package/dist/adapters/react-native/media/audio/Audio.disabled.d.ts +8 -0
- package/dist/adapters/react-native/media/audio/Audio.disabled.js +16 -0
- package/dist/adapters/react-native/media/audio/Audio.js +40 -0
- package/dist/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.d.ts +77 -0
- package/dist/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.js +6 -0
- package/dist/adapters/react-native/media/index.d.ts +4 -0
- package/dist/adapters/react-native/media/index.js +9 -0
- package/dist/adapters/react-native/media/pdf/Pdf.d.ts +19 -0
- package/dist/adapters/react-native/media/pdf/Pdf.disabled.d.ts +9 -0
- package/dist/adapters/react-native/media/pdf/Pdf.disabled.js +16 -0
- package/dist/adapters/react-native/media/pdf/Pdf.js +46 -0
- package/dist/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.d.ts +77 -0
- package/dist/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.js +6 -0
- package/dist/adapters/react-native/media/shared/Playlist.d.ts +18 -0
- package/dist/adapters/react-native/media/shared/Playlist.js +242 -0
- package/dist/adapters/react-native/media/video/Video.d.ts +25 -0
- package/dist/adapters/react-native/media/video/Video.disabled.d.ts +9 -0
- package/dist/adapters/react-native/media/video/Video.disabled.js +16 -0
- package/dist/adapters/react-native/media/video/Video.js +46 -0
- package/dist/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.d.ts +87 -0
- package/dist/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.js +6 -0
- package/dist/adapters/react-native/miss.bench.d.ts +2 -0
- package/dist/adapters/react-native/miss.bench.js +78 -0
- package/dist/adapters/react-native/modal/Modal.d.ts +18 -0
- package/dist/adapters/react-native/modal/Modal.disabled.d.ts +7 -0
- package/dist/adapters/react-native/modal/Modal.disabled.js +7 -0
- package/dist/adapters/react-native/modal/Modal.js +71 -0
- package/dist/adapters/react-native/modal/PlainModal.d.ts +16 -0
- package/dist/adapters/react-native/modal/PlainModal.js +26 -0
- package/dist/adapters/react-native/modal/native/IsoModalViewNativeComponent.d.ts +35 -0
- package/dist/adapters/react-native/modal/native/IsoModalViewNativeComponent.js +14 -0
- package/dist/adapters/react-native/normalize.d.ts +13 -0
- package/dist/adapters/react-native/normalize.js +221 -0
- package/dist/adapters/react-native/pseudo.d.ts +27 -0
- package/dist/adapters/react-native/pseudo.js +39 -0
- package/dist/adapters/react-native/sheet/BottomSheet.d.ts +12 -0
- package/dist/adapters/react-native/sheet/BottomSheet.disabled.d.ts +8 -0
- package/dist/adapters/react-native/sheet/BottomSheet.disabled.js +14 -0
- package/dist/adapters/react-native/sheet/BottomSheet.js +89 -0
- package/dist/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.d.ts +40 -0
- package/dist/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.js +14 -0
- package/dist/adapters/react-native/styleHost.d.ts +21 -0
- package/dist/adapters/react-native/styleHost.js +72 -0
- package/dist/adapters/react-native/svg/Svg.d.ts +5 -0
- package/dist/adapters/react-native/svg/Svg.disabled.d.ts +5 -0
- package/dist/adapters/react-native/svg/Svg.disabled.js +18 -0
- package/dist/adapters/react-native/svg/Svg.js +60 -0
- package/dist/adapters/react-native/transition.d.ts +41 -0
- package/dist/adapters/react-native/transition.js +145 -0
- package/dist/adapters/react-native/transitionHost.d.ts +11 -0
- package/dist/adapters/react-native/transitionHost.js +147 -0
- package/dist/adapters/react-native/windowWidth.d.ts +15 -0
- package/dist/adapters/react-native/windowWidth.js +49 -0
- package/dist/cache/lru.d.ts +11 -0
- package/dist/cache/lru.js +32 -0
- package/dist/config/index.d.ts +239 -0
- package/dist/config/index.js +161 -0
- package/dist/core/adapter.d.ts +72 -0
- package/dist/core/adapter.js +2 -0
- package/dist/core/builder.d.ts +95 -0
- package/dist/core/builder.js +431 -0
- package/dist/core/camera.d.ts +142 -0
- package/dist/core/camera.js +43 -0
- package/dist/core/cameraRequests.d.ts +18 -0
- package/dist/core/cameraRequests.js +44 -0
- package/dist/core/conditions.d.ts +54 -0
- package/dist/core/conditions.js +123 -0
- package/dist/core/datePicker.d.ts +92 -0
- package/dist/core/datePicker.js +92 -0
- package/dist/core/dev.d.ts +5 -0
- package/dist/core/dev.js +18 -0
- package/dist/core/engine.d.ts +62 -0
- package/dist/core/engine.js +26 -0
- package/dist/core/flatten.d.ts +6 -0
- package/dist/core/flatten.js +22 -0
- package/dist/core/image.d.ts +246 -0
- package/dist/core/image.js +171 -0
- package/dist/core/inline.d.ts +33 -0
- package/dist/core/inline.js +25 -0
- package/dist/core/keyframes.d.ts +40 -0
- package/dist/core/keyframes.js +38 -0
- package/dist/core/media.d.ts +118 -0
- package/dist/core/media.js +2 -0
- package/dist/core/modal.d.ts +76 -0
- package/dist/core/modal.js +35 -0
- package/dist/core/modules.d.ts +7 -0
- package/dist/core/modules.js +9 -0
- package/dist/core/pdf.d.ts +133 -0
- package/dist/core/pdf.js +2 -0
- package/dist/core/playlist.d.ts +97 -0
- package/dist/core/playlist.js +58 -0
- package/dist/core/primitives.d.ts +410 -0
- package/dist/core/primitives.js +2 -0
- package/dist/core/proxy.d.ts +2 -0
- package/dist/core/proxy.js +25 -0
- package/dist/core/sheet.d.ts +95 -0
- package/dist/core/sheet.js +71 -0
- package/dist/core/style/types.d.ts +88 -0
- package/dist/core/style/types.js +2 -0
- package/dist/core/svg.d.ts +121 -0
- package/dist/core/svg.js +76 -0
- package/dist/core/testing/benchHarness.d.ts +42 -0
- package/dist/core/testing/benchHarness.js +75 -0
- package/dist/core/types.d.ts +222 -0
- package/dist/core/types.js +2 -0
- package/dist/hash/optimizedHash.d.ts +10 -0
- package/dist/hash/optimizedHash.js +63 -0
- package/dist/hash/stringHash.d.ts +6 -0
- package/dist/hash/stringHash.js +17 -0
- package/dist/hash/trackReads.d.ts +20 -0
- package/dist/hash/trackReads.js +49 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +21 -0
- package/dist/jsx-dev-runtime.d.ts +7 -0
- package/dist/jsx-dev-runtime.js +13 -0
- package/dist/jsx-runtime.d.ts +19 -0
- package/dist/jsx-runtime.js +25 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +5 -0
- package/dist/providers/index.native.d.ts +2 -0
- package/dist/providers/index.native.js +5 -0
- package/dist/theme/index.d.ts +46 -0
- package/dist/theme/index.js +51 -0
- package/dist/theme/store/helpers.d.ts +50 -0
- package/dist/theme/store/helpers.js +116 -0
- package/dist/theme/store/index.d.ts +196 -0
- package/dist/theme/store/index.js +259 -0
- package/dist/theme/variables.d.ts +23 -0
- package/dist/theme/variables.js +127 -0
- package/ios/audio/IsoAudioCard.swift +471 -0
- package/ios/audio/IsoAudioPlayer.swift +326 -0
- package/ios/audio/IsoAudioView.mm +173 -0
- package/ios/camera/IsoCamera.swift +682 -0
- package/ios/camera/IsoCameraView.mm +206 -0
- package/ios/datePicker/IsoDatePicker.swift +826 -0
- package/ios/datePicker/IsoDatePickerView.mm +118 -0
- package/ios/datePicker/IsoWheelView.swift +190 -0
- package/ios/image/IsoImage.swift +568 -0
- package/ios/image/IsoImageModule.mm +45 -0
- package/ios/image/IsoImagePipeline.swift +612 -0
- package/ios/image/IsoImageView.mm +173 -0
- package/ios/mediaSession/IsoNowPlaying.swift +150 -0
- package/ios/mediaSessionOff/IsoNowPlaying.swift +18 -0
- package/ios/modal/IsoModal.swift +301 -0
- package/ios/modal/IsoModalView.mm +132 -0
- package/ios/pdf/IsoPdfSupport.swift +247 -0
- package/ios/pdf/IsoPdfToolbar.swift +403 -0
- package/ios/pdf/IsoPdfView.mm +194 -0
- package/ios/pdf/IsoPdfViewer.swift +547 -0
- package/ios/shared/IsoAudioSession.swift +42 -0
- package/ios/sheet/IsoSheet.swift +259 -0
- package/ios/sheet/IsoSheetView.mm +143 -0
- package/ios/stubs/audio/IsoAudioViewStub.mm +32 -0
- package/ios/stubs/camera/IsoCameraViewStub.mm +32 -0
- package/ios/stubs/datePicker/IsoDatePickerViewStub.mm +32 -0
- package/ios/stubs/image/IsoImageViewStub.mm +62 -0
- package/ios/stubs/modal/IsoModalViewStub.mm +32 -0
- package/ios/stubs/pdf/IsoPdfViewStub.mm +32 -0
- package/ios/stubs/sheet/IsoSheetViewStub.mm +32 -0
- package/ios/stubs/video/IsoVideoViewStub.mm +32 -0
- package/ios/video/IsoVideoControls.swift +569 -0
- package/ios/video/IsoVideoFullscreen.swift +280 -0
- package/ios/video/IsoVideoPlayer.swift +421 -0
- package/ios/video/IsoVideoPlaylistPanel.swift +360 -0
- package/ios/video/IsoVideoView.mm +187 -0
- package/isoform.podspec +132 -0
- package/metro.js +81 -0
- package/package.json +180 -4
- package/react-native.config.js +12 -0
- package/scripts/setup-ios.js +85 -0
- package/src/adapters/react-native/camera/native/IsoCameraViewNativeComponent.ts +79 -0
- package/src/adapters/react-native/datePicker/native/IsoDatePickerViewNativeComponent.ts +44 -0
- package/src/adapters/react-native/image/native/IsoImageViewNativeComponent.ts +90 -0
- package/src/adapters/react-native/image/native/NativeIsoImageModule.ts +24 -0
- package/src/adapters/react-native/media/audio/native/IsoAudioViewNativeComponent.ts +69 -0
- package/src/adapters/react-native/media/pdf/native/IsoPdfViewNativeComponent.ts +71 -0
- package/src/adapters/react-native/media/video/native/IsoVideoViewNativeComponent.ts +74 -0
- package/src/adapters/react-native/modal/native/IsoModalViewNativeComponent.ts +47 -0
- package/src/adapters/react-native/sheet/native/IsoSheetViewNativeComponent.ts +50 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spec of the native audio component (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/audio/IsoAudioView.mm + ios/audio/IsoAudioPlayer.swift (AVPlayer + UIKit)
|
|
7
|
+
* · Android: android/src/audio/.../IsoAudioViewManager.kt + IsoAudioView.kt (Media3 + Compose)
|
|
8
|
+
*
|
|
9
|
+
* Codegen rules: the file name ends in `NativeComponent.ts`, types come from
|
|
10
|
+
* `CodegenTypes`, and the `export default` calls `codegenNativeComponent`.
|
|
11
|
+
*/
|
|
12
|
+
import type * as React from 'react';
|
|
13
|
+
import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
|
|
14
|
+
type EmptyEvent = Readonly<{}>;
|
|
15
|
+
type TimeEvent = Readonly<{
|
|
16
|
+
currentTime: CodegenTypes.Double;
|
|
17
|
+
duration: CodegenTypes.Double;
|
|
18
|
+
}>;
|
|
19
|
+
type LoadEvent = Readonly<{
|
|
20
|
+
duration: CodegenTypes.Double;
|
|
21
|
+
}>;
|
|
22
|
+
type ErrorEvent = Readonly<{
|
|
23
|
+
message: string;
|
|
24
|
+
}>;
|
|
25
|
+
type SeekEvent = Readonly<{
|
|
26
|
+
from: CodegenTypes.Double;
|
|
27
|
+
to: CodegenTypes.Double;
|
|
28
|
+
}>;
|
|
29
|
+
type BufferingEvent = Readonly<{
|
|
30
|
+
buffering: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
type BufferedEvent = Readonly<{
|
|
33
|
+
buffered: CodegenTypes.Double;
|
|
34
|
+
}>;
|
|
35
|
+
type VolumeEvent = Readonly<{
|
|
36
|
+
volume: CodegenTypes.Double;
|
|
37
|
+
muted: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
type RateEvent = Readonly<{
|
|
40
|
+
rate: CodegenTypes.Double;
|
|
41
|
+
}>;
|
|
42
|
+
export interface NativeProps extends ViewProps {
|
|
43
|
+
src?: string;
|
|
44
|
+
controls?: CodegenTypes.WithDefault<boolean, true>;
|
|
45
|
+
autoPlay?: CodegenTypes.WithDefault<boolean, false>;
|
|
46
|
+
loop?: CodegenTypes.WithDefault<boolean, false>;
|
|
47
|
+
muted?: CodegenTypes.WithDefault<boolean, false>;
|
|
48
|
+
rate?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
|
|
49
|
+
volume?: CodegenTypes.WithDefault<CodegenTypes.Float, 1.0>;
|
|
50
|
+
title?: string;
|
|
51
|
+
artist?: string;
|
|
52
|
+
artwork?: string;
|
|
53
|
+
playlistIndex?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
54
|
+
playlistCount?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
|
|
55
|
+
onPlayerPlay?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
56
|
+
onPlayerPause?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
57
|
+
onPlayerEnd?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
58
|
+
onPlayerTime?: CodegenTypes.DirectEventHandler<TimeEvent>;
|
|
59
|
+
onPlayerLoad?: CodegenTypes.DirectEventHandler<LoadEvent>;
|
|
60
|
+
onPlayerError?: CodegenTypes.DirectEventHandler<ErrorEvent>;
|
|
61
|
+
onPlayerSeek?: CodegenTypes.DirectEventHandler<SeekEvent>;
|
|
62
|
+
onPlayerBuffering?: CodegenTypes.DirectEventHandler<BufferingEvent>;
|
|
63
|
+
onPlayerBuffered?: CodegenTypes.DirectEventHandler<BufferedEvent>;
|
|
64
|
+
onPlayerVolume?: CodegenTypes.DirectEventHandler<VolumeEvent>;
|
|
65
|
+
onPlayerRate?: CodegenTypes.DirectEventHandler<RateEvent>;
|
|
66
|
+
onPlayerPlaylist?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
67
|
+
}
|
|
68
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
69
|
+
interface NativeCommands {
|
|
70
|
+
play: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
71
|
+
pause: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
72
|
+
seekTo: (viewRef: React.ElementRef<ComponentType>, seconds: CodegenTypes.Double) => void;
|
|
73
|
+
}
|
|
74
|
+
export declare const Commands: NativeCommands;
|
|
75
|
+
declare const _default: ComponentType;
|
|
76
|
+
export default _default;
|
|
77
|
+
//# sourceMappingURL=IsoAudioViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
2
|
+
export const Commands = codegenNativeCommands({
|
|
3
|
+
supportedCommands: ['play', 'pause', 'seekTo'],
|
|
4
|
+
});
|
|
5
|
+
export default codegenNativeComponent('IsoAudioView');
|
|
6
|
+
//# sourceMappingURL=IsoAudioViewNativeComponent.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const Video: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
|
|
2
|
+
export declare const Audio: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
|
|
3
|
+
export declare const Pdf: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Audio as SingleAudio } from './audio/Audio';
|
|
2
|
+
import { Pdf as SinglePdf } from './pdf/Pdf';
|
|
3
|
+
import { withPlaylist } from './shared/Playlist';
|
|
4
|
+
import { Video as SingleVideo } from './video/Video';
|
|
5
|
+
// each player also accepts an `items` list, shown as a carousel below it (see `shared/Playlist`)
|
|
6
|
+
export const Video = withPlaylist('Video', SingleVideo);
|
|
7
|
+
export const Audio = withPlaylist('Audio', SingleAudio);
|
|
8
|
+
export const Pdf = withPlaylist('Pdf', SinglePdf);
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithoutPlaylist } from '../../../../core/playlist';
|
|
3
|
+
import type { PdfHandle, PdfOwnProps } from '../../../../core/pdf';
|
|
4
|
+
/**
|
|
5
|
+
* Entry point of `Pdf` on mobile. With `modules.pdf` 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 Pdf: React.ForwardRefExoticComponent<Partial<PdfOwnProps> & {
|
|
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<PdfHandle>>>;
|
|
19
|
+
//# sourceMappingURL=Pdf.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PdfHandle } from '../../../../core/pdf';
|
|
3
|
+
/**
|
|
4
|
+
* `Pdf` without a viewer: `react-isoform/metro` uses this file instead of
|
|
5
|
+
* `Pdf.tsx` when pdf is off in `isoform.config.json`, so neither the
|
|
6
|
+
* viewer nor the native spec enter the JS bundle.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Pdf: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<PdfHandle>>;
|
|
9
|
+
//# sourceMappingURL=Pdf.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
|
+
* `Pdf` without a viewer: `react-isoform/metro` uses this file instead of
|
|
8
|
+
* `Pdf.tsx` when pdf is off in `isoform.config.json`, so neither the
|
|
9
|
+
* viewer nor the native spec enter the JS bundle.
|
|
10
|
+
*/
|
|
11
|
+
export const Pdf = forwardRef(({ style, testID }, _ref) => {
|
|
12
|
+
warnModuleDisabled('pdf');
|
|
13
|
+
return _jsx(View, { style: style, testID: testID });
|
|
14
|
+
});
|
|
15
|
+
Pdf.displayName = 'Pdf';
|
|
16
|
+
//# sourceMappingURL=Pdf.disabled.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
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/IsoPdfViewNativeComponent'));
|
|
9
|
+
/**
|
|
10
|
+
* Entry point of `Pdf` on mobile. With `modules.pdf` 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 Pdf = forwardRef((props, ref) => {
|
|
15
|
+
if (!isModuleEnabled('pdf')) {
|
|
16
|
+
warnModuleDisabled('pdf');
|
|
17
|
+
return _jsx(View, { style: props.style, testID: props.testID });
|
|
18
|
+
}
|
|
19
|
+
return _jsx(PdfViewer, { ref: ref, ...props });
|
|
20
|
+
});
|
|
21
|
+
Pdf.displayName = 'Pdf';
|
|
22
|
+
/**
|
|
23
|
+
* The viewer: the lib's native component (PDFKit + UIKit on iOS, PdfRenderer +
|
|
24
|
+
* Compose on Android). It only translates the isoform contract to the native
|
|
25
|
+
* props and events.
|
|
26
|
+
*/
|
|
27
|
+
const PdfViewer = forwardRef(({ src, password, initialPage = 1, controls = true, nightMode = false, fit = 'width', direction = 'vertical', maxZoom = 5, speechLanguage, speechVoice, onLoad, onPageChange, onSearch, onError, onPasswordRequired, onLinkPress, onFullscreenChange, onReadAloudChange, style, testID, overlay, playlist, }, ref) => {
|
|
28
|
+
const { default: NativePdf, Commands } = nativeSpec();
|
|
29
|
+
const native = useRef(null);
|
|
30
|
+
useImperativeHandle(ref, () => ({
|
|
31
|
+
goToPage: (page) => native.current && Commands.goToPage(native.current, Math.round(page)),
|
|
32
|
+
search: (query) => native.current && Commands.search(native.current, query),
|
|
33
|
+
searchNext: () => native.current && Commands.searchNext(native.current),
|
|
34
|
+
searchPrevious: () => native.current && Commands.searchPrevious(native.current),
|
|
35
|
+
clearSearch: () => native.current && Commands.clearSearch(native.current),
|
|
36
|
+
setZoom: (scale) => native.current && Commands.setZoom(native.current, scale),
|
|
37
|
+
setFullscreen: (fullscreen) => native.current && Commands.setFullscreen(native.current, fullscreen),
|
|
38
|
+
startReadAloud: () => native.current && Commands.startReadAloud(native.current),
|
|
39
|
+
stopReadAloud: () => native.current && Commands.stopReadAloud(native.current),
|
|
40
|
+
}), [Commands]);
|
|
41
|
+
return (_jsxs(View, { style: [styles.container, style], testID: testID, children: [_jsx(NativePdf, { ref: native, playlistIndex: playlist?.index ?? -1, playlistCount: playlist?.count ?? 0, onPdfPlaylist: () => playlist?.onPress(), style: StyleSheet.absoluteFill, src: src, password: password, initialPage: Math.max(1, Math.round(initialPage)), controls: controls, nightMode: nightMode, fit: fit, direction: direction, maxZoom: maxZoom, speechLanguage: speechLanguage, speechVoice: speechVoice, onPdfLoad: (e) => onLoad?.({ pageCount: e.nativeEvent.pageCount }), onPdfPage: (e) => onPageChange?.({ page: e.nativeEvent.page, pageCount: e.nativeEvent.pageCount }), onPdfSearch: ({ nativeEvent: { query, total, current } }) => onSearch?.({ query, total, current }), onPdfError: (e) => onError?.(e.nativeEvent.message), onPdfPassword: () => onPasswordRequired?.(), onPdfLink: (e) => onLinkPress?.(e.nativeEvent.url), onPdfFullscreen: (e) => onFullscreenChange?.(e.nativeEvent.fullscreen), onPdfReadAloud: (e) => onReadAloudChange?.(e.nativeEvent.reading) }), overlay] }));
|
|
42
|
+
});
|
|
43
|
+
PdfViewer.displayName = 'PdfViewer';
|
|
44
|
+
/** Default height, so an unsized `Pdf` still shows a page and the toolbar. */
|
|
45
|
+
const styles = StyleSheet.create({ container: { minHeight: 420, overflow: 'hidden' } });
|
|
46
|
+
//# sourceMappingURL=Pdf.js.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spec of the native PDF component (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/pdf/IsoPdfView.mm + ios/pdf/IsoPdfViewer.swift (PDFKit + UIKit)
|
|
7
|
+
* · Android: android/src/pdf/.../IsoPdfViewManager.kt + IsoPdfView.kt (PdfRenderer + Compose)
|
|
8
|
+
*
|
|
9
|
+
* Codegen rules: the file name ends in `NativeComponent.ts`, types come from
|
|
10
|
+
* `CodegenTypes`, and the `export default` calls `codegenNativeComponent`.
|
|
11
|
+
*/
|
|
12
|
+
import type * as React from 'react';
|
|
13
|
+
import type { CodegenTypes, HostComponent, ViewProps } from 'react-native';
|
|
14
|
+
type EmptyEvent = Readonly<{}>;
|
|
15
|
+
type LoadEvent = Readonly<{
|
|
16
|
+
pageCount: CodegenTypes.Int32;
|
|
17
|
+
}>;
|
|
18
|
+
type PageEvent = Readonly<{
|
|
19
|
+
page: CodegenTypes.Int32;
|
|
20
|
+
pageCount: CodegenTypes.Int32;
|
|
21
|
+
}>;
|
|
22
|
+
type SearchEvent = Readonly<{
|
|
23
|
+
query: string;
|
|
24
|
+
total: CodegenTypes.Int32;
|
|
25
|
+
current: CodegenTypes.Int32;
|
|
26
|
+
}>;
|
|
27
|
+
type ErrorEvent = Readonly<{
|
|
28
|
+
message: string;
|
|
29
|
+
}>;
|
|
30
|
+
type LinkEvent = Readonly<{
|
|
31
|
+
url: string;
|
|
32
|
+
}>;
|
|
33
|
+
type FullscreenEvent = Readonly<{
|
|
34
|
+
fullscreen: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
type ReadAloudEvent = Readonly<{
|
|
37
|
+
reading: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
export interface NativeProps extends ViewProps {
|
|
40
|
+
src?: string;
|
|
41
|
+
password?: string;
|
|
42
|
+
initialPage?: CodegenTypes.WithDefault<CodegenTypes.Int32, 1>;
|
|
43
|
+
controls?: CodegenTypes.WithDefault<boolean, true>;
|
|
44
|
+
nightMode?: CodegenTypes.WithDefault<boolean, false>;
|
|
45
|
+
fit?: CodegenTypes.WithDefault<'width' | 'page', 'width'>;
|
|
46
|
+
direction?: CodegenTypes.WithDefault<'vertical' | 'horizontal', 'vertical'>;
|
|
47
|
+
maxZoom?: CodegenTypes.WithDefault<CodegenTypes.Float, 5.0>;
|
|
48
|
+
speechLanguage?: string;
|
|
49
|
+
speechVoice?: string;
|
|
50
|
+
playlistIndex?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
51
|
+
playlistCount?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
|
|
52
|
+
onPdfLoad?: CodegenTypes.DirectEventHandler<LoadEvent>;
|
|
53
|
+
onPdfPage?: CodegenTypes.DirectEventHandler<PageEvent>;
|
|
54
|
+
onPdfSearch?: CodegenTypes.DirectEventHandler<SearchEvent>;
|
|
55
|
+
onPdfError?: CodegenTypes.DirectEventHandler<ErrorEvent>;
|
|
56
|
+
onPdfPassword?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
57
|
+
onPdfLink?: CodegenTypes.DirectEventHandler<LinkEvent>;
|
|
58
|
+
onPdfFullscreen?: CodegenTypes.DirectEventHandler<FullscreenEvent>;
|
|
59
|
+
onPdfReadAloud?: CodegenTypes.DirectEventHandler<ReadAloudEvent>;
|
|
60
|
+
onPdfPlaylist?: CodegenTypes.DirectEventHandler<EmptyEvent>;
|
|
61
|
+
}
|
|
62
|
+
type ComponentType = HostComponent<NativeProps>;
|
|
63
|
+
interface NativeCommands {
|
|
64
|
+
goToPage: (viewRef: React.ElementRef<ComponentType>, page: CodegenTypes.Int32) => void;
|
|
65
|
+
search: (viewRef: React.ElementRef<ComponentType>, query: string) => void;
|
|
66
|
+
searchNext: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
67
|
+
searchPrevious: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
68
|
+
clearSearch: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
69
|
+
setZoom: (viewRef: React.ElementRef<ComponentType>, scale: CodegenTypes.Float) => void;
|
|
70
|
+
setFullscreen: (viewRef: React.ElementRef<ComponentType>, fullscreen: boolean) => void;
|
|
71
|
+
startReadAloud: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
72
|
+
stopReadAloud: (viewRef: React.ElementRef<ComponentType>) => void;
|
|
73
|
+
}
|
|
74
|
+
export declare const Commands: NativeCommands;
|
|
75
|
+
declare const _default: ComponentType;
|
|
76
|
+
export default _default;
|
|
77
|
+
//# sourceMappingURL=IsoPdfViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
2
|
+
export const Commands = codegenNativeCommands({
|
|
3
|
+
supportedCommands: ['goToPage', 'search', 'searchNext', 'searchPrevious', 'clearSearch', 'setZoom', 'setFullscreen', 'startReadAloud', 'stopReadAloud'],
|
|
4
|
+
});
|
|
5
|
+
export default codegenNativeComponent('IsoPdfView');
|
|
6
|
+
//# sourceMappingURL=IsoPdfViewNativeComponent.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Lists on mobile: `Video`, `Audio` and `Pdf` with `items` get a "playlist" button
|
|
4
|
+
* inside the native player. It opens a dark panel over the player with a
|
|
5
|
+
* center-focused carousel: the card in the middle is full size and highlighted,
|
|
6
|
+
* its neighbors shrink and fade with the distance (animated on the native thread
|
|
7
|
+
* while scrolling), it snaps to a card, and the card it stops on becomes the
|
|
8
|
+
* selected entry. Tapping a card picks it and closes the panel.
|
|
9
|
+
* The player itself is unchanged, and the component's style still goes to it.
|
|
10
|
+
*/
|
|
11
|
+
type Kind = 'Video' | 'Audio' | 'Pdf';
|
|
12
|
+
/**
|
|
13
|
+
* Adds `items` support to a mobile player. Without a list it renders the player
|
|
14
|
+
* as before (the `ref` still has `next`/`previous`/`goTo`, as no-ops).
|
|
15
|
+
*/
|
|
16
|
+
export declare function withPlaylist(kind: Kind, Player: React.ComponentType<any>): React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<any>>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Playlist.d.ts.map
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Animated, Easing, Image, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { ITEM_PROPS, usePlaylist, useRestartOnSameSource } from '../../../../core/playlist';
|
|
6
|
+
const LIST_PROPS = ['items', 'initialIndex', 'carousel', 'autoAdvance', 'onItemChange'];
|
|
7
|
+
const withoutList = (props) => {
|
|
8
|
+
const rest = { ...props };
|
|
9
|
+
LIST_PROPS.forEach((key) => delete rest[key]);
|
|
10
|
+
return rest;
|
|
11
|
+
};
|
|
12
|
+
const NO_LIST = { next: () => undefined, previous: () => undefined, goTo: () => undefined };
|
|
13
|
+
/** A `ref` that has the list methods and forwards everything else to the player. */
|
|
14
|
+
const handleOf = (inner, list) => new Proxy(list, {
|
|
15
|
+
get: (target, key) => target[key] ?? ((...args) => inner.current?.[key]?.(...args)),
|
|
16
|
+
});
|
|
17
|
+
/** Card width and image shape per kind. */
|
|
18
|
+
const CARD = {
|
|
19
|
+
Video: { width: 150, ratio: 16 / 9, radius: 12 },
|
|
20
|
+
Audio: { width: 76, ratio: 1, radius: 10 },
|
|
21
|
+
Pdf: { width: 84, ratio: 3 / 4, radius: 7 },
|
|
22
|
+
};
|
|
23
|
+
const GAP = 14;
|
|
24
|
+
/** The panel is always dark glass (it sits over videos, covers and pages). */
|
|
25
|
+
const PANEL = { fg: '#ffffff', muted: 'rgba(235,235,245,0.62)', card: 'rgba(255,255,255,0.12)', ring: '#ffffff', nav: 'rgba(255,255,255,0.14)' };
|
|
26
|
+
const imageOf = (kind, item) => ({ Video: item.poster, Audio: item.artwork, Pdf: item.thumbnail })[kind];
|
|
27
|
+
/** Placeholder art when the entry has no image. */
|
|
28
|
+
function Fallback({ kind, color }) {
|
|
29
|
+
const art = {
|
|
30
|
+
Video: _jsx(Text, { style: [styles.glyph, { color }], children: "\u25B6" }),
|
|
31
|
+
Audio: _jsx(Text, { style: [styles.glyph, { color }], children: "\u266A" }),
|
|
32
|
+
Pdf: (_jsx(View, { style: styles.doc, children: [1, 1, 1, 0.6].map((width, i) => (_jsx(View, { style: [styles.docLine, { backgroundColor: color, width: `${width * 100}%` }] }, i))) })),
|
|
33
|
+
};
|
|
34
|
+
return _jsx(_Fragment, { children: art[kind] });
|
|
35
|
+
}
|
|
36
|
+
/** Three bars that bounce while the current entry plays ("now playing"). */
|
|
37
|
+
function NowPlaying({ playing }) {
|
|
38
|
+
const bars = useMemo(() => [0, 1, 2].map(() => new Animated.Value(0.4)), []);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
if (!playing) {
|
|
41
|
+
bars.forEach((bar) => bar.setValue(0.4));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const loops = bars.map((bar, i) => Animated.loop(Animated.sequence([
|
|
45
|
+
Animated.delay(i * 150),
|
|
46
|
+
Animated.timing(bar, { toValue: 1, duration: 380, easing: Easing.inOut(Easing.quad), useNativeDriver: true }),
|
|
47
|
+
Animated.timing(bar, { toValue: 0.35, duration: 380, easing: Easing.inOut(Easing.quad), useNativeDriver: true }),
|
|
48
|
+
])));
|
|
49
|
+
loops.forEach((loop) => loop.start());
|
|
50
|
+
return () => loops.forEach((loop) => loop.stop());
|
|
51
|
+
}, [playing, bars]);
|
|
52
|
+
return (_jsx(View, { style: styles.now, pointerEvents: "none", children: bars.map((bar, i) => (_jsx(Animated.View, { style: [styles.bar, { transform: [{ translateY: 5 }, { scaleY: bar }, { translateY: -5 }] }] }, i))) }));
|
|
53
|
+
}
|
|
54
|
+
function Strip({ kind, items, index, playing, onSelect, onPick, onClose }) {
|
|
55
|
+
const colors = PANEL;
|
|
56
|
+
const card = CARD[kind];
|
|
57
|
+
const step = card.width + GAP;
|
|
58
|
+
const [width, setWidth] = useState(0);
|
|
59
|
+
const [focus, setFocus] = useState(index);
|
|
60
|
+
const scroll = useRef(null);
|
|
61
|
+
const x = useRef(new Animated.Value(index * step)).current;
|
|
62
|
+
const side = Math.max(0, (width - card.width) / 2);
|
|
63
|
+
// the selected entry (from anywhere) glides to the center
|
|
64
|
+
const ready = useRef(false);
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!width)
|
|
67
|
+
return;
|
|
68
|
+
setFocus(index);
|
|
69
|
+
scroll.current?.scrollTo({ x: index * step, animated: ready.current });
|
|
70
|
+
ready.current = true;
|
|
71
|
+
}, [index, width, step]);
|
|
72
|
+
const centered = (offset) => Math.min(items.length - 1, Math.max(0, Math.round(offset / step)));
|
|
73
|
+
const onScroll = useMemo(() => Animated.event([{ nativeEvent: { contentOffset: { x } } }], {
|
|
74
|
+
useNativeDriver: true,
|
|
75
|
+
listener: (event) => setFocus(centered(event.nativeEvent.contentOffset.x)),
|
|
76
|
+
}),
|
|
77
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
|
+
[x, step, items.length]);
|
|
79
|
+
return (_jsxs(View, { style: styles.strip, onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: [_jsxs(View, { style: styles.head, children: [_jsx(Text, { style: [styles.headTitle, { color: colors.fg }], numberOfLines: 1, children: items[focus]?.title ?? `Item ${focus + 1}` }), _jsxs(Text, { style: [styles.headCount, { color: colors.muted }], children: [focus + 1, " / ", items.length] }), _jsx(View, { style: styles.flex }), _jsx(NavButton, { label: "Previous", glyph: "\u2039", colors: colors, disabled: index === 0, onPress: () => onSelect(index - 1) }), _jsx(NavButton, { label: "Next", glyph: "\u203A", colors: colors, disabled: index === items.length - 1, onPress: () => onSelect(index + 1) }), _jsx(NavButton, { label: "Close playlist", glyph: "\u2715", colors: colors, disabled: false, onPress: onClose, small: true })] }), _jsx(Animated.ScrollView, { ref: scroll, horizontal: true, showsHorizontalScrollIndicator: false, snapToInterval: step, decelerationRate: "fast", disableIntervalMomentum: true, scrollEventThrottle: 16, onScroll: onScroll, onMomentumScrollEnd: (e) => onSelect(centered(e.nativeEvent.contentOffset.x)), contentContainerStyle: { paddingHorizontal: side, paddingVertical: 12, gap: GAP }, accessibilityRole: "adjustable", accessibilityLabel: "Playlist", children: items.map((item, i) => {
|
|
80
|
+
const range = [(i - 1) * step, i * step, (i + 1) * step];
|
|
81
|
+
const scale = x.interpolate({ inputRange: range, outputRange: [0.84, 1, 0.84], extrapolate: 'clamp' });
|
|
82
|
+
const opacity = x.interpolate({ inputRange: range, outputRange: [0.5, 1, 0.5], extrapolate: 'clamp' });
|
|
83
|
+
const image = imageOf(kind, item);
|
|
84
|
+
const focused = i === focus;
|
|
85
|
+
return (_jsx(Pressable, { onPress: () => onPick(i), accessibilityRole: "button", accessibilityLabel: item.title ?? `Item ${i + 1}`, accessibilityState: { selected: i === index }, children: _jsxs(Animated.View, { style: [styles.card, { width: card.width, opacity, transform: [{ scale }] }], children: [_jsxs(View, { style: [
|
|
86
|
+
styles.thumb,
|
|
87
|
+
{ aspectRatio: card.ratio, borderRadius: card.radius, backgroundColor: colors.card },
|
|
88
|
+
focused ? [styles.thumbFocused, { borderColor: colors.ring }] : null,
|
|
89
|
+
], children: [_jsx(Fallback, { kind: kind, color: colors.muted }), image ? _jsx(Image, { source: { uri: image }, style: StyleSheet.absoluteFill, resizeMode: "cover" }) : null, i === index && kind !== 'Pdf' ? _jsx(NowPlaying, { playing: playing }) : null] }), item.title ? (_jsx(Text, { numberOfLines: 2, style: [styles.title, { color: focused ? colors.fg : colors.muted }, focused ? styles.titleFocused : null], children: item.title })) : null] }) }, `${i}:${item.src}`));
|
|
90
|
+
}) })] }));
|
|
91
|
+
}
|
|
92
|
+
function NavButton({ label, glyph, colors, disabled, onPress, small = false }) {
|
|
93
|
+
return (_jsx(Pressable, { onPress: onPress, disabled: disabled, accessibilityRole: "button", accessibilityLabel: label, hitSlop: 6, style: ({ pressed }) => [styles.nav, { backgroundColor: colors.nav, opacity: disabled ? 0.3 : pressed ? 0.6 : 1 }], children: _jsx(Text, { style: [small ? styles.closeGlyph : styles.navGlyph, { color: colors.fg }], children: glyph }) }));
|
|
94
|
+
}
|
|
95
|
+
/** Where the playlist button sits inside each player (clear of the native controls). */
|
|
96
|
+
const BUTTON_PLACE = {
|
|
97
|
+
// video: top center (the native controls use the corners and the bottom)
|
|
98
|
+
Video: { top: 10, left: 0, right: 0, alignItems: 'center' },
|
|
99
|
+
// audio: a badge on the corner of the cover
|
|
100
|
+
Audio: { top: 38, left: 18 },
|
|
101
|
+
// PDF: top right of the pages, below the toolbar
|
|
102
|
+
Pdf: { top: 62, right: 12 },
|
|
103
|
+
};
|
|
104
|
+
/** Idle time after which the video's controls (and our button) hide while playing. */
|
|
105
|
+
const HIDE_AFTER = 3000;
|
|
106
|
+
/**
|
|
107
|
+
* Whether the button is shown, like the native video controls: always while paused;
|
|
108
|
+
* while playing, for a few seconds after each touch. `touches` changes on every touch.
|
|
109
|
+
*/
|
|
110
|
+
function useControlsVisible(enabled, playing, touches) {
|
|
111
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
112
|
+
// a hidden button must not take taps (the tap only brings the controls back)
|
|
113
|
+
const [shown, setShown] = useState(true);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
setShown(true);
|
|
116
|
+
Animated.timing(opacity, { toValue: 1, duration: 160, useNativeDriver: true }).start();
|
|
117
|
+
if (!enabled || !playing)
|
|
118
|
+
return;
|
|
119
|
+
const timer = setTimeout(() => {
|
|
120
|
+
setShown(false);
|
|
121
|
+
Animated.timing(opacity, { toValue: 0, duration: 260, useNativeDriver: true }).start();
|
|
122
|
+
}, HIDE_AFTER);
|
|
123
|
+
return () => clearTimeout(timer);
|
|
124
|
+
}, [enabled, playing, touches, opacity]);
|
|
125
|
+
return { opacity, shown };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The button is part of each player's native controls (iOS and Android, video,
|
|
129
|
+
* audio and PDF). It only floats over the player when its controls are off.
|
|
130
|
+
*/
|
|
131
|
+
const floats = (controls) => controls === false;
|
|
132
|
+
/** The carousel panel over the player (and, on the iOS video, the floating button). */
|
|
133
|
+
function PlaylistOverlay({ kind, items, index, playing, touches, onSelect, open, setOpen, floatingButton }) {
|
|
134
|
+
// only the video hides its controls; the audio card and the PDF toolbar stay
|
|
135
|
+
const visible = useControlsVisible(kind === 'Video', playing, touches);
|
|
136
|
+
const rise = useRef(new Animated.Value(0)).current;
|
|
137
|
+
useEffect(() => {
|
|
138
|
+
if (!open)
|
|
139
|
+
return;
|
|
140
|
+
rise.setValue(0);
|
|
141
|
+
Animated.timing(rise, { toValue: 1, duration: 240, easing: Easing.out(Easing.cubic), useNativeDriver: true }).start();
|
|
142
|
+
}, [open, rise]);
|
|
143
|
+
const compact = kind === 'Audio';
|
|
144
|
+
return (_jsx(View, { style: StyleSheet.absoluteFill, pointerEvents: "box-none", children: open ? (_jsx(Animated.View, { style: [
|
|
145
|
+
styles.panel,
|
|
146
|
+
compact ? styles.panelFull : null,
|
|
147
|
+
{ opacity: rise, transform: [{ translateY: rise.interpolate({ inputRange: [0, 1], outputRange: [24, 0] }) }] },
|
|
148
|
+
], accessibilityViewIsModal: true, children: _jsx(Strip, { kind: kind, items: items, index: index, playing: playing, onSelect: onSelect, onPick: (i) => {
|
|
149
|
+
onSelect(i);
|
|
150
|
+
setOpen(false);
|
|
151
|
+
}, onClose: () => setOpen(false) }) })) : floatingButton ? (_jsx(Animated.View, { style: [styles.place, BUTTON_PLACE[kind], { opacity: visible.opacity }], pointerEvents: visible.shown ? 'box-none' : 'none', children: _jsxs(Pressable, { onPress: () => setOpen(true), accessibilityRole: "button", accessibilityLabel: `Playlist, item ${index + 1} of ${items.length}`, hitSlop: 8, style: ({ pressed }) => [styles.open, compact ? styles.openSmall : null, { transform: [{ scale: pressed ? 0.94 : 1 }] }], children: [_jsx(View, { style: styles.listIcon, children: [0, 1, 2].map((row) => (_jsxs(View, { style: styles.listRow, children: [_jsx(View, { style: styles.listDot }), _jsx(View, { style: styles.listLine })] }, row))) }), _jsxs(Text, { style: [styles.openText, compact ? styles.openTextSmall : null], children: [index + 1, "/", items.length] })] }) })) : null }));
|
|
152
|
+
}
|
|
153
|
+
/** The player with its list: current entry, carousel and auto-advance. */
|
|
154
|
+
function ListPlayer({ kind, Player, props, handle }) {
|
|
155
|
+
const { items, initialIndex, carousel = true, autoAdvance = true, onItemChange, ...rest } = props;
|
|
156
|
+
const list = usePlaylist(items, initialIndex, onItemChange);
|
|
157
|
+
const inner = useRef(null);
|
|
158
|
+
const playing = useRef(false);
|
|
159
|
+
useRestartOnSameSource(items, list.index, list.autoPlay, inner);
|
|
160
|
+
const [isPlaying, setPlaying] = useState(false);
|
|
161
|
+
const [touches, setTouches] = useState(0);
|
|
162
|
+
const [open, setOpen] = useState(false);
|
|
163
|
+
useImperativeHandle(handle, () => handleOf(inner, { next: () => list.next(playing.current), previous: () => list.previous(playing.current), goTo: (i) => list.goTo(i, playing.current) }), [list]);
|
|
164
|
+
const media = {
|
|
165
|
+
autoPlay: list.autoPlay || rest.autoPlay,
|
|
166
|
+
onPlay: () => {
|
|
167
|
+
playing.current = true;
|
|
168
|
+
setPlaying(true);
|
|
169
|
+
rest.onPlay?.();
|
|
170
|
+
},
|
|
171
|
+
onPause: () => {
|
|
172
|
+
playing.current = false;
|
|
173
|
+
setPlaying(false);
|
|
174
|
+
rest.onPause?.();
|
|
175
|
+
},
|
|
176
|
+
onEnded: () => {
|
|
177
|
+
playing.current = false;
|
|
178
|
+
setPlaying(false);
|
|
179
|
+
rest.onEnded?.();
|
|
180
|
+
if (autoAdvance && list.index < items.length - 1)
|
|
181
|
+
list.next(true);
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
return (_jsx(Player, { ref: inner, ...rest, ...(kind === 'Pdf' ? {} : media), ...ITEM_PROPS[kind](list.item), onPlayerTouch: floats(rest.controls) ? () => setTouches((n) => n + 1) : undefined, playlist: carousel
|
|
185
|
+
? {
|
|
186
|
+
index: list.index,
|
|
187
|
+
count: items.length,
|
|
188
|
+
onPress: () => setOpen(true),
|
|
189
|
+
// for the carousel the video draws itself in fullscreen
|
|
190
|
+
items: items.map((item) => ({ title: item.title ?? '', image: imageOf(kind, item) ?? '' })),
|
|
191
|
+
onSelect: (i) => list.goTo(i, playing.current),
|
|
192
|
+
}
|
|
193
|
+
: undefined, overlay: carousel ? (_jsx(PlaylistOverlay, { kind: kind, items: items, index: list.index, playing: isPlaying, touches: touches, onSelect: (i) => list.goTo(i, playing.current), open: open, setOpen: setOpen, floatingButton: floats(rest.controls) })) : null }));
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Adds `items` support to a mobile player. Without a list it renders the player
|
|
197
|
+
* as before (the `ref` still has `next`/`previous`/`goTo`, as no-ops).
|
|
198
|
+
*/
|
|
199
|
+
export function withPlaylist(kind, Player) {
|
|
200
|
+
const Listed = forwardRef((props, ref) => {
|
|
201
|
+
const inner = useRef(null);
|
|
202
|
+
const hasList = Array.isArray(props.items) && props.items.length > 0;
|
|
203
|
+
useImperativeHandle(hasList ? null : ref, () => handleOf(inner, NO_LIST), []);
|
|
204
|
+
if (hasList)
|
|
205
|
+
return _jsx(ListPlayer, { kind: kind, Player: Player, props: props, handle: ref });
|
|
206
|
+
return _jsx(Player, { ref: inner, ...withoutList(props) });
|
|
207
|
+
});
|
|
208
|
+
Listed.displayName = kind;
|
|
209
|
+
return Listed;
|
|
210
|
+
}
|
|
211
|
+
const styles = StyleSheet.create({
|
|
212
|
+
strip: { gap: 2 },
|
|
213
|
+
place: { position: 'absolute' },
|
|
214
|
+
open: { flexDirection: 'row', alignItems: 'center', gap: 6, height: 30, paddingLeft: 9, paddingRight: 11, borderRadius: 15, backgroundColor: 'rgba(20,20,22,0.62)', shadowColor: '#000', shadowOpacity: 0.25, shadowRadius: 8, shadowOffset: { width: 0, height: 2 }, elevation: 4 },
|
|
215
|
+
openSmall: { height: 24, paddingLeft: 6, paddingRight: 7, gap: 4, borderRadius: 12 },
|
|
216
|
+
openText: { color: '#fff', fontSize: 12, fontWeight: '600', fontVariant: ['tabular-nums'] },
|
|
217
|
+
openTextSmall: { fontSize: 11 },
|
|
218
|
+
listIcon: { gap: 2.5 },
|
|
219
|
+
listRow: { flexDirection: 'row', alignItems: 'center', gap: 2.5 },
|
|
220
|
+
listDot: { width: 2.5, height: 2.5, borderRadius: 1.25, backgroundColor: '#fff' },
|
|
221
|
+
listLine: { width: 9, height: 1.8, borderRadius: 1, backgroundColor: '#fff' },
|
|
222
|
+
panel: { position: 'absolute', left: 0, right: 0, bottom: 0, maxHeight: '100%', paddingTop: 10, paddingBottom: 6, backgroundColor: 'rgba(16,16,18,0.88)' },
|
|
223
|
+
panelFull: { top: 0, justifyContent: 'center' },
|
|
224
|
+
closeGlyph: { fontSize: 14, fontWeight: '600' },
|
|
225
|
+
head: { flexDirection: 'row', alignItems: 'center', gap: 6, paddingLeft: 14, paddingRight: 8 },
|
|
226
|
+
headTitle: { fontSize: 14, fontWeight: '600', flexShrink: 1 },
|
|
227
|
+
headCount: { fontSize: 13, fontVariant: ['tabular-nums'] },
|
|
228
|
+
flex: { flex: 1 },
|
|
229
|
+
nav: { width: 32, height: 32, borderRadius: 16, alignItems: 'center', justifyContent: 'center' },
|
|
230
|
+
navGlyph: { fontSize: 22, lineHeight: 24, marginTop: -2, fontWeight: '500' },
|
|
231
|
+
card: { alignItems: 'center', gap: 8 },
|
|
232
|
+
thumb: { width: '100%', overflow: 'hidden', alignItems: 'center', justifyContent: 'center', borderWidth: 2.5, borderColor: 'transparent' },
|
|
233
|
+
thumbFocused: { shadowColor: '#000', shadowOpacity: 0.25, shadowRadius: 14, shadowOffset: { width: 0, height: 8 }, elevation: 8 },
|
|
234
|
+
glyph: { fontSize: 26 },
|
|
235
|
+
doc: { width: '46%', gap: 5 },
|
|
236
|
+
docLine: { height: 3, borderRadius: 2, opacity: 0.55 },
|
|
237
|
+
title: { fontSize: 12.5, lineHeight: 16, textAlign: 'center' },
|
|
238
|
+
titleFocused: { fontWeight: '600' },
|
|
239
|
+
now: { position: 'absolute', left: 8, bottom: 8, flexDirection: 'row', alignItems: 'flex-end', gap: 2, height: 22, paddingHorizontal: 6, paddingVertical: 4, borderRadius: 11, backgroundColor: 'rgba(0,0,0,0.55)' },
|
|
240
|
+
bar: { width: 3, height: 14, borderRadius: 2, backgroundColor: '#fff' },
|
|
241
|
+
});
|
|
242
|
+
//# sourceMappingURL=Playlist.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithoutPlaylist } from '../../../../core/playlist';
|
|
3
|
+
import type { VideoHandle, VideoOwnProps } from '../../../../core/media';
|
|
4
|
+
/**
|
|
5
|
+
* Porta de entrada do `Video` no mobile. Com `modules.video` desligado, nem a
|
|
6
|
+
* spec nativa é carregada: fica só um espaço vazio com o mesmo estilo (e um
|
|
7
|
+
* aviso em dev), em vez do erro "componente nativo não encontrado".
|
|
8
|
+
*/
|
|
9
|
+
export declare const Video: React.ForwardRefExoticComponent<Partial<VideoOwnProps> & {
|
|
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; /** Entries for the carousel the fullscreen draws natively. */
|
|
17
|
+
items?: Array<{
|
|
18
|
+
title: string;
|
|
19
|
+
image: string;
|
|
20
|
+
}>; /** An entry picked in that carousel. */
|
|
21
|
+
onSelect?(index: number): void;
|
|
22
|
+
}; /** Any touch on the player (also on the native controls): the overlay uses it to show itself like the controls do. */
|
|
23
|
+
onPlayerTouch?: () => void;
|
|
24
|
+
} & React.RefAttributes<WithoutPlaylist<VideoHandle>>>;
|
|
25
|
+
//# sourceMappingURL=Video.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VideoHandle } from '../../../../core/media';
|
|
3
|
+
/**
|
|
4
|
+
* `Video` sem player: o `react-isoform/metro` usa este arquivo no lugar de
|
|
5
|
+
* `Video.tsx` quando o vídeo está desligado no `isoform.config.json`.
|
|
6
|
+
* Assim nem o player nem a spec nativa entram no bundle JS.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Video: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<VideoHandle>>;
|
|
9
|
+
//# sourceMappingURL=Video.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
|
+
* `Video` sem player: o `react-isoform/metro` usa este arquivo no lugar de
|
|
8
|
+
* `Video.tsx` quando o vídeo está desligado no `isoform.config.json`.
|
|
9
|
+
* Assim nem o player nem a spec nativa entram no bundle JS.
|
|
10
|
+
*/
|
|
11
|
+
export const Video = forwardRef(({ style, testID }, _ref) => {
|
|
12
|
+
warnModuleDisabled('video');
|
|
13
|
+
return _jsx(View, { style: [{ backgroundColor: '#000' }, style], testID: testID });
|
|
14
|
+
});
|
|
15
|
+
Video.displayName = 'Video';
|
|
16
|
+
//# sourceMappingURL=Video.disabled.js.map
|