@one-am/react-native-simple-image-slider 0.16.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +616 -19
- package/lib/commonjs/constants/layout.js +11 -0
- package/lib/commonjs/constants/layout.js.map +1 -0
- package/lib/commonjs/context/slider-context.js +47 -0
- package/lib/commonjs/context/slider-context.js.map +1 -0
- package/lib/commonjs/{utils/renderProp.js → context/slider-full-screen-context.js} +15 -8
- package/lib/commonjs/context/slider-full-screen-context.js.map +1 -0
- package/lib/commonjs/hooks/index.js +13 -0
- package/lib/commonjs/hooks/index.js.map +1 -0
- package/lib/commonjs/hooks/slider-state/index.js +40 -0
- package/lib/commonjs/hooks/slider-state/index.js.map +1 -0
- package/lib/commonjs/hooks/slider-state/use-slider-callbacks.js +63 -0
- package/lib/commonjs/hooks/slider-state/use-slider-callbacks.js.map +1 -0
- package/lib/commonjs/hooks/slider-state/use-slider-full-screen.js +24 -0
- package/lib/commonjs/hooks/slider-state/use-slider-full-screen.js.map +1 -0
- package/lib/commonjs/hooks/slider-state/use-slider-navigation.js +29 -0
- package/lib/commonjs/hooks/slider-state/use-slider-navigation.js.map +1 -0
- package/lib/commonjs/hooks/use-image-aspect-ratio.js +68 -0
- package/lib/commonjs/hooks/use-image-aspect-ratio.js.map +1 -0
- package/lib/commonjs/hooks/use-registered-callback.js +29 -0
- package/lib/commonjs/hooks/use-registered-callback.js.map +1 -0
- package/lib/commonjs/hooks/use-slider-state.js +72 -0
- package/lib/commonjs/hooks/use-slider-state.js.map +1 -0
- package/lib/commonjs/icons/{IconX.js → icon-x.js} +20 -26
- package/lib/commonjs/icons/icon-x.js.map +1 -0
- package/lib/commonjs/index.js +18 -47
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/internal/pinch-to-zoom.js +207 -0
- package/lib/commonjs/internal/pinch-to-zoom.js.map +1 -0
- package/lib/commonjs/primitives/index.js +62 -0
- package/lib/commonjs/primitives/index.js.map +1 -0
- package/lib/commonjs/primitives/slider-close-button.js +45 -0
- package/lib/commonjs/primitives/slider-close-button.js.map +1 -0
- package/lib/commonjs/primitives/slider-content.js +170 -0
- package/lib/commonjs/primitives/slider-content.js.map +1 -0
- package/lib/commonjs/{AbsoluteComponentContainer.js → primitives/slider-corner.js} +19 -19
- package/lib/commonjs/primitives/slider-corner.js.map +1 -0
- package/lib/commonjs/{PageCounter.js → primitives/slider-description.js} +22 -31
- package/lib/commonjs/primitives/slider-description.js.map +1 -0
- package/lib/commonjs/primitives/slider-empty.js +32 -0
- package/lib/commonjs/primitives/slider-empty.js.map +1 -0
- package/lib/commonjs/primitives/slider-full-screen.js +114 -0
- package/lib/commonjs/primitives/slider-full-screen.js.map +1 -0
- package/lib/commonjs/primitives/slider-page-counter.js +63 -0
- package/lib/commonjs/primitives/slider-page-counter.js.map +1 -0
- package/lib/commonjs/primitives/slider.js +31 -0
- package/lib/commonjs/primitives/slider.js.map +1 -0
- package/lib/{module/@types → commonjs/types}/common.js.map +1 -1
- package/lib/commonjs/{@types/slider.js → types/context.js} +1 -1
- package/lib/commonjs/{@types/slider.js.map → types/context.js.map} +1 -1
- package/lib/{module/@types → commonjs/types}/icons.js.map +1 -1
- package/lib/commonjs/types/index.js +2 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/types/pinch-to-zoom.js.map +1 -0
- package/lib/commonjs/types/slider-state.js +6 -0
- package/lib/commonjs/types/slider-state.js.map +1 -0
- package/lib/commonjs/utils/capitalize.js +10 -0
- package/lib/commonjs/utils/capitalize.js.map +1 -0
- package/lib/commonjs/utils/clamp.js.map +1 -1
- package/lib/module/constants/layout.js +7 -0
- package/lib/module/constants/layout.js.map +1 -0
- package/lib/module/context/slider-context.js +40 -0
- package/lib/module/context/slider-context.js.map +1 -0
- package/lib/module/context/slider-full-screen-context.js +19 -0
- package/lib/module/context/slider-full-screen-context.js.map +1 -0
- package/lib/module/hooks/index.js +4 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/slider-state/index.js +7 -0
- package/lib/module/hooks/slider-state/index.js.map +1 -0
- package/lib/module/hooks/slider-state/use-slider-callbacks.js +60 -0
- package/lib/module/hooks/slider-state/use-slider-callbacks.js.map +1 -0
- package/lib/module/hooks/slider-state/use-slider-full-screen.js +21 -0
- package/lib/module/hooks/slider-state/use-slider-full-screen.js.map +1 -0
- package/lib/module/hooks/slider-state/use-slider-navigation.js +25 -0
- package/lib/module/hooks/slider-state/use-slider-navigation.js.map +1 -0
- package/lib/module/hooks/use-image-aspect-ratio.js +64 -0
- package/lib/module/hooks/use-image-aspect-ratio.js.map +1 -0
- package/lib/module/hooks/use-registered-callback.js +26 -0
- package/lib/module/hooks/use-registered-callback.js.map +1 -0
- package/lib/module/hooks/use-slider-state.js +68 -0
- package/lib/module/hooks/use-slider-state.js.map +1 -0
- package/lib/module/icons/icon-x.js +32 -0
- package/lib/module/icons/icon-x.js.map +1 -0
- package/lib/module/index.js +2 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal/pinch-to-zoom.js +202 -0
- package/lib/module/internal/pinch-to-zoom.js.map +1 -0
- package/lib/module/primitives/index.js +11 -0
- package/lib/module/primitives/index.js.map +1 -0
- package/lib/module/primitives/slider-close-button.js +40 -0
- package/lib/module/primitives/slider-close-button.js.map +1 -0
- package/lib/module/primitives/slider-content.js +165 -0
- package/lib/module/primitives/slider-content.js.map +1 -0
- package/lib/module/{AbsoluteComponentContainer.js → primitives/slider-corner.js} +19 -18
- package/lib/module/primitives/slider-corner.js.map +1 -0
- package/lib/module/primitives/slider-description.js +31 -0
- package/lib/module/primitives/slider-description.js.map +1 -0
- package/lib/module/primitives/slider-empty.js +28 -0
- package/lib/module/primitives/slider-empty.js.map +1 -0
- package/lib/module/primitives/slider-full-screen.js +109 -0
- package/lib/module/primitives/slider-full-screen.js.map +1 -0
- package/lib/module/primitives/slider-page-counter.js +59 -0
- package/lib/module/primitives/slider-page-counter.js.map +1 -0
- package/lib/module/primitives/slider.js +27 -0
- package/lib/module/primitives/slider.js.map +1 -0
- package/lib/{commonjs/@types → module/types}/common.js.map +1 -1
- package/lib/module/types/context.js +4 -0
- package/lib/module/types/context.js.map +1 -0
- package/lib/{commonjs/@types → module/types}/icons.js.map +1 -1
- package/lib/module/types/index.js +2 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/pinch-to-zoom.js.map +1 -0
- package/lib/module/types/slider-state.js +4 -0
- package/lib/module/types/slider-state.js.map +1 -0
- package/lib/module/utils/capitalize.js +7 -0
- package/lib/module/utils/capitalize.js.map +1 -0
- package/lib/module/utils/clamp.js +2 -1
- package/lib/module/utils/clamp.js.map +1 -1
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts +1 -0
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/constants/layout.d.ts +5 -0
- package/lib/typescript/commonjs/src/constants/layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/context/slider-context.d.ts +8 -0
- package/lib/typescript/commonjs/src/context/slider-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/context/slider-full-screen-context.d.ts +6 -0
- package/lib/typescript/commonjs/src/context/slider-full-screen-context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-callbacks.d.ts +6 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-callbacks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-full-screen.d.ts +8 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-full-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-navigation.d.ts +5 -0
- package/lib/typescript/commonjs/src/hooks/slider-state/use-slider-navigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/use-image-aspect-ratio.d.ts +6 -0
- package/lib/typescript/commonjs/src/hooks/use-image-aspect-ratio.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/use-registered-callback.d.ts +8 -0
- package/lib/typescript/commonjs/src/hooks/use-registered-callback.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hooks/use-slider-state.d.ts +4 -0
- package/lib/typescript/commonjs/src/hooks/use-slider-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/icons/icon-x.d.ts +6 -0
- package/lib/typescript/commonjs/src/icons/icon-x.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/{src/PinchToZoom.d.ts → commonjs/src/internal/pinch-to-zoom.d.ts} +9 -6
- package/lib/typescript/commonjs/src/internal/pinch-to-zoom.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/index.d.ts +17 -0
- package/lib/typescript/commonjs/src/primitives/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-close-button.d.ts +12 -0
- package/lib/typescript/commonjs/src/primitives/slider-close-button.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-content.d.ts +15 -0
- package/lib/typescript/commonjs/src/primitives/slider-content.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-corner.d.ts +12 -0
- package/lib/typescript/commonjs/src/primitives/slider-corner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-description.d.ts +10 -0
- package/lib/typescript/commonjs/src/primitives/slider-description.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-empty.d.ts +10 -0
- package/lib/typescript/commonjs/src/primitives/slider-empty.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-full-screen.d.ts +10 -0
- package/lib/typescript/commonjs/src/primitives/slider-full-screen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider-page-counter.d.ts +14 -0
- package/lib/typescript/commonjs/src/primitives/slider-page-counter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/primitives/slider.d.ts +30 -0
- package/lib/typescript/commonjs/src/primitives/slider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/common.d.ts +15 -0
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/context.d.ts +25 -0
- package/lib/typescript/commonjs/src/types/context.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/icons.d.ts +8 -0
- package/lib/typescript/commonjs/src/types/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/pinch-to-zoom.d.ts +9 -0
- package/lib/typescript/commonjs/src/types/pinch-to-zoom.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/slider-state.d.ts +39 -0
- package/lib/typescript/commonjs/src/types/slider-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/capitalize.d.ts +3 -0
- package/lib/typescript/commonjs/src/utils/capitalize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/utils/clamp.d.ts +3 -0
- package/lib/typescript/commonjs/src/utils/clamp.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/__tests__/index.test.d.ts +1 -0
- package/lib/typescript/module/src/__tests__/index.test.d.ts.map +1 -0
- package/lib/typescript/module/src/constants/layout.d.ts +5 -0
- package/lib/typescript/module/src/constants/layout.d.ts.map +1 -0
- package/lib/typescript/module/src/context/slider-context.d.ts +8 -0
- package/lib/typescript/module/src/context/slider-context.d.ts.map +1 -0
- package/lib/typescript/module/src/context/slider-full-screen-context.d.ts +6 -0
- package/lib/typescript/module/src/context/slider-full-screen-context.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/index.d.ts +2 -0
- package/lib/typescript/module/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/slider-state/index.d.ts +5 -0
- package/lib/typescript/module/src/hooks/slider-state/index.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-callbacks.d.ts +6 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-callbacks.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-full-screen.d.ts +8 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-full-screen.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-navigation.d.ts +5 -0
- package/lib/typescript/module/src/hooks/slider-state/use-slider-navigation.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/use-image-aspect-ratio.d.ts +6 -0
- package/lib/typescript/module/src/hooks/use-image-aspect-ratio.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/use-registered-callback.d.ts +8 -0
- package/lib/typescript/module/src/hooks/use-registered-callback.d.ts.map +1 -0
- package/lib/typescript/module/src/hooks/use-slider-state.d.ts +4 -0
- package/lib/typescript/module/src/hooks/use-slider-state.d.ts.map +1 -0
- package/lib/typescript/module/src/icons/icon-x.d.ts +6 -0
- package/lib/typescript/module/src/icons/icon-x.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +4 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/internal/pinch-to-zoom.d.ts +51 -0
- package/lib/typescript/module/src/internal/pinch-to-zoom.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/index.d.ts +17 -0
- package/lib/typescript/module/src/primitives/index.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-close-button.d.ts +12 -0
- package/lib/typescript/module/src/primitives/slider-close-button.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-content.d.ts +15 -0
- package/lib/typescript/module/src/primitives/slider-content.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-corner.d.ts +12 -0
- package/lib/typescript/module/src/primitives/slider-corner.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-description.d.ts +10 -0
- package/lib/typescript/module/src/primitives/slider-description.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-empty.d.ts +10 -0
- package/lib/typescript/module/src/primitives/slider-empty.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-full-screen.d.ts +10 -0
- package/lib/typescript/module/src/primitives/slider-full-screen.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider-page-counter.d.ts +14 -0
- package/lib/typescript/module/src/primitives/slider-page-counter.d.ts.map +1 -0
- package/lib/typescript/module/src/primitives/slider.d.ts +30 -0
- package/lib/typescript/module/src/primitives/slider.d.ts.map +1 -0
- package/lib/typescript/module/src/types/common.d.ts +15 -0
- package/lib/typescript/module/src/types/common.d.ts.map +1 -0
- package/lib/typescript/module/src/types/context.d.ts +25 -0
- package/lib/typescript/module/src/types/context.d.ts.map +1 -0
- package/lib/typescript/module/src/types/icons.d.ts +8 -0
- package/lib/typescript/module/src/types/icons.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +6 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/pinch-to-zoom.d.ts +9 -0
- package/lib/typescript/module/src/types/pinch-to-zoom.d.ts.map +1 -0
- package/lib/typescript/module/src/types/slider-state.d.ts +39 -0
- package/lib/typescript/module/src/types/slider-state.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/capitalize.d.ts +3 -0
- package/lib/typescript/module/src/utils/capitalize.d.ts.map +1 -0
- package/lib/typescript/module/src/utils/clamp.d.ts +3 -0
- package/lib/typescript/module/src/utils/clamp.d.ts.map +1 -0
- package/package.json +79 -91
- package/lib/commonjs/@types/pinch-to-zoom.js.map +0 -1
- package/lib/commonjs/AbsoluteComponentContainer.js.map +0 -1
- package/lib/commonjs/BaseSimpleImageSlider.js +0 -209
- package/lib/commonjs/BaseSimpleImageSlider.js.map +0 -1
- package/lib/commonjs/FullScreenImageSlider.js +0 -132
- package/lib/commonjs/FullScreenImageSlider.js.map +0 -1
- package/lib/commonjs/PageCounter.js.map +0 -1
- package/lib/commonjs/PinchToZoom.js +0 -174
- package/lib/commonjs/PinchToZoom.js.map +0 -1
- package/lib/commonjs/SimpleImageSlider.js +0 -79
- package/lib/commonjs/SimpleImageSlider.js.map +0 -1
- package/lib/commonjs/SimpleImageSliderThemeProvider.js +0 -40
- package/lib/commonjs/SimpleImageSliderThemeProvider.js.map +0 -1
- package/lib/commonjs/icons/IconX.js.map +0 -1
- package/lib/commonjs/utils/renderProp.js.map +0 -1
- package/lib/module/@types/pinch-to-zoom.js.map +0 -1
- package/lib/module/@types/slider.js +0 -4
- package/lib/module/@types/slider.js.map +0 -1
- package/lib/module/AbsoluteComponentContainer.js.map +0 -1
- package/lib/module/BaseSimpleImageSlider.js +0 -202
- package/lib/module/BaseSimpleImageSlider.js.map +0 -1
- package/lib/module/FullScreenImageSlider.js +0 -125
- package/lib/module/FullScreenImageSlider.js.map +0 -1
- package/lib/module/PageCounter.js +0 -39
- package/lib/module/PageCounter.js.map +0 -1
- package/lib/module/PinchToZoom.js +0 -168
- package/lib/module/PinchToZoom.js.map +0 -1
- package/lib/module/SimpleImageSlider.js +0 -72
- package/lib/module/SimpleImageSlider.js.map +0 -1
- package/lib/module/SimpleImageSliderThemeProvider.js +0 -33
- package/lib/module/SimpleImageSliderThemeProvider.js.map +0 -1
- package/lib/module/icons/IconX.js +0 -37
- package/lib/module/icons/IconX.js.map +0 -1
- package/lib/module/utils/renderProp.js +0 -12
- package/lib/module/utils/renderProp.js.map +0 -1
- package/lib/typescript/src/@types/common.d.ts +0 -1
- package/lib/typescript/src/@types/common.d.ts.map +0 -1
- package/lib/typescript/src/@types/icons.d.ts +0 -6
- package/lib/typescript/src/@types/icons.d.ts.map +0 -1
- package/lib/typescript/src/@types/pinch-to-zoom.d.ts +0 -8
- package/lib/typescript/src/@types/pinch-to-zoom.d.ts.map +0 -1
- package/lib/typescript/src/@types/slider.d.ts +0 -5
- package/lib/typescript/src/@types/slider.d.ts.map +0 -1
- package/lib/typescript/src/AbsoluteComponentContainer.d.ts +0 -7
- package/lib/typescript/src/AbsoluteComponentContainer.d.ts.map +0 -1
- package/lib/typescript/src/BaseSimpleImageSlider.d.ts +0 -126
- package/lib/typescript/src/BaseSimpleImageSlider.d.ts.map +0 -1
- package/lib/typescript/src/FullScreenImageSlider.d.ts +0 -58
- package/lib/typescript/src/FullScreenImageSlider.d.ts.map +0 -1
- package/lib/typescript/src/PageCounter.d.ts +0 -22
- package/lib/typescript/src/PageCounter.d.ts.map +0 -1
- package/lib/typescript/src/PinchToZoom.d.ts.map +0 -1
- package/lib/typescript/src/SimpleImageSlider.d.ts +0 -52
- package/lib/typescript/src/SimpleImageSlider.d.ts.map +0 -1
- package/lib/typescript/src/SimpleImageSliderThemeProvider.d.ts +0 -17
- package/lib/typescript/src/SimpleImageSliderThemeProvider.d.ts.map +0 -1
- package/lib/typescript/src/icons/IconX.d.ts +0 -5
- package/lib/typescript/src/icons/IconX.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -9
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/utils/clamp.d.ts +0 -2
- package/lib/typescript/src/utils/clamp.d.ts.map +0 -1
- package/lib/typescript/src/utils/renderProp.d.ts +0 -4
- package/lib/typescript/src/utils/renderProp.d.ts.map +0 -1
- package/src/@types/common.ts +0 -0
- package/src/@types/icons.ts +0 -6
- package/src/@types/pinch-to-zoom.ts +0 -7
- package/src/@types/slider.ts +0 -5
- package/src/AbsoluteComponentContainer.tsx +0 -30
- package/src/BaseSimpleImageSlider.tsx +0 -384
- package/src/FullScreenImageSlider.tsx +0 -203
- package/src/PageCounter.tsx +0 -67
- package/src/PinchToZoom.tsx +0 -345
- package/src/SimpleImageSlider.tsx +0 -110
- package/src/SimpleImageSliderThemeProvider.tsx +0 -49
- package/src/icons/IconX.tsx +0 -24
- package/src/index.tsx +0 -29
- package/src/utils/clamp.ts +0 -4
- package/src/utils/renderProp.tsx +0 -22
- /package/lib/commonjs/{@types → types}/common.js +0 -0
- /package/lib/commonjs/{@types → types}/icons.js +0 -0
- /package/lib/commonjs/{@types → types}/pinch-to-zoom.js +0 -0
- /package/lib/module/{@types → types}/common.js +0 -0
- /package/lib/module/{@types → types}/icons.js +0 -0
- /package/lib/module/{@types → types}/pinch-to-zoom.js +0 -0
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import React, { type ReactElement } from 'react';
|
|
2
|
-
import { FlashList } from '@shopify/flash-list';
|
|
3
|
-
import { type ImageStyle } from 'expo-image';
|
|
4
|
-
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
5
|
-
import { type PageCounterProps } from './PageCounter';
|
|
6
|
-
import { type PinchToZoomProps } from './PinchToZoom';
|
|
7
|
-
import { type RenderProp } from './utils/renderProp';
|
|
8
|
-
import type { SimpleImageSliderItem } from './@types/slider';
|
|
9
|
-
export type BaseSimpleImageSliderProps = {
|
|
10
|
-
/**
|
|
11
|
-
* @description The list of images to be displayed.
|
|
12
|
-
*/
|
|
13
|
-
data: SimpleImageSliderItem[];
|
|
14
|
-
/**
|
|
15
|
-
* @description The style of the container.
|
|
16
|
-
*/
|
|
17
|
-
style?: StyleProp<ViewStyle>;
|
|
18
|
-
/**
|
|
19
|
-
* @description The width of the images. If not provided, the image will take the full width of the container.
|
|
20
|
-
* Will be calculated automatically if `imageHeight` and `imageAspectRatio` are provided.
|
|
21
|
-
*/
|
|
22
|
-
imageWidth?: number;
|
|
23
|
-
/**
|
|
24
|
-
* @description The height of the images. If not provided, the image will take the full height of the container.
|
|
25
|
-
* Will be calculated automatically if `imageWidth` and `imageAspectRatio` are provided.
|
|
26
|
-
*/
|
|
27
|
-
imageHeight?: number;
|
|
28
|
-
/**
|
|
29
|
-
* @description The aspect ratio of the images. Will be ignored if `imageWidth` and `imageHeight` are provided.
|
|
30
|
-
* @default 4 / 3
|
|
31
|
-
*/
|
|
32
|
-
imageAspectRatio?: number;
|
|
33
|
-
/**
|
|
34
|
-
* @description Callback that is called when an item is pressed.
|
|
35
|
-
* @param item The item that was pressed.
|
|
36
|
-
* @param index The index of the item that was pressed.
|
|
37
|
-
*/
|
|
38
|
-
onItemPress?: (item: SimpleImageSliderItem, index: number) => void;
|
|
39
|
-
/**
|
|
40
|
-
* @description The maximum number of items to be displayed.
|
|
41
|
-
*/
|
|
42
|
-
maxItems?: number;
|
|
43
|
-
/**
|
|
44
|
-
* @description Whether the page counter should be displayed or not.
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
|
-
showPageCounter?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* @description The position of the page counter.
|
|
50
|
-
* @default 'bottom-left'
|
|
51
|
-
*/
|
|
52
|
-
pageCounterPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
53
|
-
/**
|
|
54
|
-
* @description The style of the page counter.
|
|
55
|
-
*/
|
|
56
|
-
pageCounterStyle?: StyleProp<ViewStyle>;
|
|
57
|
-
/**
|
|
58
|
-
* @description The style of the text of the page counter.
|
|
59
|
-
*/
|
|
60
|
-
pageCounterTextStyle?: StyleProp<TextStyle>;
|
|
61
|
-
/**
|
|
62
|
-
* @description A component to be displayed in place of the default page counter.
|
|
63
|
-
*/
|
|
64
|
-
PageCounterComponent?: React.FunctionComponent<PageCounterProps>;
|
|
65
|
-
/**
|
|
66
|
-
* @description Callback that renders the page counter. Overrides `PageCounterComponent` if provided.
|
|
67
|
-
* @param currentPage The current page number.
|
|
68
|
-
* @param totalPages The total number of pages.
|
|
69
|
-
*/
|
|
70
|
-
renderPageCounter?: (currentPage: number, totalPages: number) => ReactElement;
|
|
71
|
-
/**
|
|
72
|
-
* @description A component to be displayed in the top right corner.
|
|
73
|
-
*/
|
|
74
|
-
TopRightComponent?: RenderProp;
|
|
75
|
-
/**
|
|
76
|
-
* @description A component to be displayed in the top left corner.
|
|
77
|
-
*/
|
|
78
|
-
TopLeftComponent?: RenderProp;
|
|
79
|
-
/**
|
|
80
|
-
* @description A component to be displayed in the bottom right corner.
|
|
81
|
-
*/
|
|
82
|
-
BottomRightComponent?: RenderProp;
|
|
83
|
-
/**
|
|
84
|
-
* @description A component to be displayed in the bottom left corner.
|
|
85
|
-
*/
|
|
86
|
-
BottomLeftComponent?: RenderProp;
|
|
87
|
-
/**
|
|
88
|
-
* @description The index of the item to be displayed initially.
|
|
89
|
-
*/
|
|
90
|
-
indexOverride?: number;
|
|
91
|
-
/**
|
|
92
|
-
* @description Callback that is called when the viewable item changes.
|
|
93
|
-
* @param index The index of the new viewable item.
|
|
94
|
-
*/
|
|
95
|
-
onViewableItemChange?: (index: number) => void;
|
|
96
|
-
/**
|
|
97
|
-
* @description Whether the pinch to zoom feature is enabled or not.
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
enablePinchToZoom?: boolean;
|
|
101
|
-
/**
|
|
102
|
-
* @description Callback that is called when the pinch to zoom status changes.
|
|
103
|
-
* @param status The new status of the pinch to zoom.
|
|
104
|
-
*/
|
|
105
|
-
onPinchToZoomStatusChange?: PinchToZoomProps['onStatusChange'];
|
|
106
|
-
/**
|
|
107
|
-
* @description Callback that is called when gestures should lead to a dismissal.
|
|
108
|
-
*/
|
|
109
|
-
onPinchToZoomRequestClose?: PinchToZoomProps['onDismiss'];
|
|
110
|
-
/**
|
|
111
|
-
* @description The tag to be used for shared transitions. This is applied to the current image in the list.
|
|
112
|
-
*/
|
|
113
|
-
sharedTransitionTag?: string;
|
|
114
|
-
/**
|
|
115
|
-
* @description Style that will be applied to every image in the slider.
|
|
116
|
-
*/
|
|
117
|
-
imageStyle?: StyleProp<ImageStyle>;
|
|
118
|
-
};
|
|
119
|
-
/**
|
|
120
|
-
* @description A simple image slider that displays a list of images. This is the component
|
|
121
|
-
* that {@link SimpleImageSlider} and {@link FullScreenImageSlider}
|
|
122
|
-
* are built upon. You should normally use one of those two components instead of this one.
|
|
123
|
-
*/
|
|
124
|
-
declare const BaseSimpleImageSlider: React.ForwardRefExoticComponent<BaseSimpleImageSliderProps & React.RefAttributes<FlashList<SimpleImageSliderItem>>>;
|
|
125
|
-
export default BaseSimpleImageSlider;
|
|
126
|
-
//# sourceMappingURL=BaseSimpleImageSlider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSimpleImageSlider.d.ts","sourceRoot":"","sources":["../../../src/BaseSimpleImageSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEV,KAAK,YAAY,EAMpB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAA2B,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAIH,KAAK,SAAS,EAEd,KAAK,SAAS,EACd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAEtB,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAK7D,MAAM,MAAM,0BAA0B,GAAG;IACrC;;OAEG;IACH,IAAI,EAAE,qBAAqB,EAAE,CAAC;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnE;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;IAChF;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IACjE;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,YAAY,CAAC;IAC9E;;OAEG;IACH,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B;;OAEG;IACH,oBAAoB,CAAC,EAAE,UAAU,CAAC;IAClC;;OAEG;IACH,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAC/D;;OAEG;IACH,yBAAyB,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1D;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAIF;;;;GAIG;AACH,QAAA,MAAM,qBAAqB,qHA+MzB,CAAC;AA2BH,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { FlashList } from '@shopify/flash-list';
|
|
3
|
-
import { type BaseSimpleImageSliderProps } from './BaseSimpleImageSlider';
|
|
4
|
-
import type { SimpleImageSliderItem } from './@types/slider';
|
|
5
|
-
import { type RenderProp } from './utils/renderProp';
|
|
6
|
-
export type FullScreenImageSliderProps = Omit<BaseSimpleImageSliderProps, 'imageWidth'> & {
|
|
7
|
-
/**
|
|
8
|
-
* @description Whether the modal is open or not.
|
|
9
|
-
*/
|
|
10
|
-
open?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* @description Callback that is called when the modal is requested to be closed.
|
|
13
|
-
*/
|
|
14
|
-
onRequestClose?: () => void;
|
|
15
|
-
/**
|
|
16
|
-
* @description Callback that renders an element to be displayed as the description of the current image.
|
|
17
|
-
* @param item The current item being displayed.
|
|
18
|
-
* @param index The index of the current item being displayed.
|
|
19
|
-
*/
|
|
20
|
-
renderDescription?: (item: SimpleImageSliderItem, index: number) => ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* @description Item to be rendered in place of the default close button icon.
|
|
23
|
-
*/
|
|
24
|
-
CloseButtonIcon?: RenderProp;
|
|
25
|
-
/**
|
|
26
|
-
* @description Callback that is called when the modal begins to fade out.
|
|
27
|
-
*/
|
|
28
|
-
onFadeOut?: () => void;
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* @description A full screen image slider that displays images in a modal.
|
|
32
|
-
*/
|
|
33
|
-
declare const FullScreenImageSlider: React.ForwardRefExoticComponent<Omit<BaseSimpleImageSliderProps, "imageWidth"> & {
|
|
34
|
-
/**
|
|
35
|
-
* @description Whether the modal is open or not.
|
|
36
|
-
*/
|
|
37
|
-
open?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* @description Callback that is called when the modal is requested to be closed.
|
|
40
|
-
*/
|
|
41
|
-
onRequestClose?: () => void;
|
|
42
|
-
/**
|
|
43
|
-
* @description Callback that renders an element to be displayed as the description of the current image.
|
|
44
|
-
* @param item The current item being displayed.
|
|
45
|
-
* @param index The index of the current item being displayed.
|
|
46
|
-
*/
|
|
47
|
-
renderDescription?: (item: SimpleImageSliderItem, index: number) => ReactNode;
|
|
48
|
-
/**
|
|
49
|
-
* @description Item to be rendered in place of the default close button icon.
|
|
50
|
-
*/
|
|
51
|
-
CloseButtonIcon?: RenderProp;
|
|
52
|
-
/**
|
|
53
|
-
* @description Callback that is called when the modal begins to fade out.
|
|
54
|
-
*/
|
|
55
|
-
onFadeOut?: () => void;
|
|
56
|
-
} & React.RefAttributes<FlashList<SimpleImageSliderItem>>>;
|
|
57
|
-
export default FullScreenImageSlider;
|
|
58
|
-
//# sourceMappingURL=FullScreenImageSlider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FullScreenImageSlider.d.ts","sourceRoot":"","sources":["../../../src/FullScreenImageSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAEV,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAiBf,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAA4B,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMjE,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,0BAA0B,EAAE,YAAY,CAAC,GAAG;IACtF;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC9E;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,qBAAqB;IA3BvB;;OAEG;WACI,OAAO;IACd;;OAEG;qBACc,MAAM,IAAI;IAC3B;;;;OAIG;wBACiB,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS;IAC7E;;OAEG;sBACe,UAAU;IAC5B;;OAEG;gBACS,MAAM,IAAI;0DA+GxB,CAAC;AAEH,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
|
|
3
|
-
export type PageCounterProps = {
|
|
4
|
-
/**
|
|
5
|
-
* @description The current page number (**counting from 1**).
|
|
6
|
-
*/
|
|
7
|
-
currentPage: number;
|
|
8
|
-
/**
|
|
9
|
-
* @description The total number of pages.
|
|
10
|
-
*/
|
|
11
|
-
totalPages: number;
|
|
12
|
-
/**
|
|
13
|
-
* @description Additional styles or styles to override default style of the container View.
|
|
14
|
-
*/
|
|
15
|
-
style?: StyleProp<ViewStyle>;
|
|
16
|
-
/**
|
|
17
|
-
* @description Additional styles or styles to override default style of the Text component.
|
|
18
|
-
*/
|
|
19
|
-
textStyle?: StyleProp<TextStyle>;
|
|
20
|
-
};
|
|
21
|
-
export default function PageCounter({ currentPage, totalPages, style, textStyle, }: PageCounterProps): React.JSX.Element;
|
|
22
|
-
//# sourceMappingURL=PageCounter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageCounter.d.ts","sourceRoot":"","sources":["../../../src/PageCounter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EACH,KAAK,SAAS,EAGd,KAAK,SAAS,EAEd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAMtB,MAAM,MAAM,gBAAgB,GAAG;IAC3B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACpC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,WAAW,EACX,UAAU,EACV,KAAK,EACL,SAAS,GACZ,EAAE,gBAAgB,qBAWlB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PinchToZoom.d.ts","sourceRoot":"","sources":["../../../src/PinchToZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAC5E,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AAYtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;IAC7C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,gBAAoB,EACpB,gBAAoB,EACpB,KAAK,EAAE,SAAS,EAChB,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,SAAS,GACZ,EAAE,gBAAgB,qBA6QlB"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FlashList } from '@shopify/flash-list';
|
|
3
|
-
import { type FullScreenImageSliderProps } from './FullScreenImageSlider';
|
|
4
|
-
import { type BaseSimpleImageSliderProps } from './BaseSimpleImageSlider';
|
|
5
|
-
import type { SimpleImageSliderItem } from './@types/slider';
|
|
6
|
-
export type SimpleImageSliderProps = BaseSimpleImageSliderProps & {
|
|
7
|
-
/**
|
|
8
|
-
* @description Whether the full screen mode is enabled or not. **Caution:** when this is enabled, the `onItemPress` prop will be ignored.
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
fullScreenEnabled?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* @description Passed to the {@link FullScreenImageSlider} component.
|
|
14
|
-
*/
|
|
15
|
-
renderFullScreenDescription?: FullScreenImageSliderProps['renderDescription'];
|
|
16
|
-
/**
|
|
17
|
-
* @description Passed to the {@link FullScreenImageSlider} component.
|
|
18
|
-
*/
|
|
19
|
-
FullScreenCloseButtonIcon?: FullScreenImageSliderProps['CloseButtonIcon'];
|
|
20
|
-
/**
|
|
21
|
-
* @description The aspect ratio of the images when full screen.
|
|
22
|
-
*
|
|
23
|
-
* @default {@link FullScreenImageSliderProps.imageAspectRatio}
|
|
24
|
-
*/
|
|
25
|
-
fullScreenImageAspectRatio?: number;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* @description A simple image slider that displays images in a list and can show a {@link FullScreenImageSlider} on press.
|
|
29
|
-
*/
|
|
30
|
-
declare const SimpleImageSlider: React.ForwardRefExoticComponent<BaseSimpleImageSliderProps & {
|
|
31
|
-
/**
|
|
32
|
-
* @description Whether the full screen mode is enabled or not. **Caution:** when this is enabled, the `onItemPress` prop will be ignored.
|
|
33
|
-
* @default false
|
|
34
|
-
*/
|
|
35
|
-
fullScreenEnabled?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* @description Passed to the {@link FullScreenImageSlider} component.
|
|
38
|
-
*/
|
|
39
|
-
renderFullScreenDescription?: FullScreenImageSliderProps["renderDescription"];
|
|
40
|
-
/**
|
|
41
|
-
* @description Passed to the {@link FullScreenImageSlider} component.
|
|
42
|
-
*/
|
|
43
|
-
FullScreenCloseButtonIcon?: FullScreenImageSliderProps["CloseButtonIcon"];
|
|
44
|
-
/**
|
|
45
|
-
* @description The aspect ratio of the images when full screen.
|
|
46
|
-
*
|
|
47
|
-
* @default {@link FullScreenImageSliderProps.imageAspectRatio}
|
|
48
|
-
*/
|
|
49
|
-
fullScreenImageAspectRatio?: number;
|
|
50
|
-
} & React.RefAttributes<FlashList<SimpleImageSliderItem>>>;
|
|
51
|
-
export default SimpleImageSlider;
|
|
52
|
-
//# sourceMappingURL=SimpleImageSlider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleImageSlider.d.ts","sourceRoot":"","sources":["../../../src/SimpleImageSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAA8B,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAA4B,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,GAAG;IAC9D;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,2BAA2B,CAAC,EAAE,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;IAC9E;;OAEG;IACH,yBAAyB,CAAC,EAAE,0BAA0B,CAAC,iBAAiB,CAAC,CAAC;IAC1E;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,iBAAiB;IAxBnB;;;OAGG;wBACiB,OAAO;IAC3B;;OAEG;kCAC2B,0BAA0B,CAAC,mBAAmB,CAAC;IAC7E;;OAEG;gCACyB,0BAA0B,CAAC,iBAAiB,CAAC;IACzE;;;;OAIG;iCAC0B,MAAM;0DAiFtC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
export type SimpleImageSliderTheme = {
|
|
3
|
-
colors: {
|
|
4
|
-
pageCounterBackground: string;
|
|
5
|
-
pageCounterBorder: string;
|
|
6
|
-
fullScreenCloseButton: string;
|
|
7
|
-
descriptionContainerBorder: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export type SimpleImageSliderThemeProviderProps = PropsWithChildren<{
|
|
11
|
-
overrides?: {
|
|
12
|
-
colors: Partial<SimpleImageSliderTheme['colors']>;
|
|
13
|
-
};
|
|
14
|
-
}>;
|
|
15
|
-
export declare function useSimpleImageSliderTheme(): SimpleImageSliderTheme;
|
|
16
|
-
export default function SimpleImageSliderThemeProvider({ overrides, children, }: SimpleImageSliderThemeProviderProps): React.JSX.Element;
|
|
17
|
-
//# sourceMappingURL=SimpleImageSliderThemeProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleImageSliderThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/SimpleImageSliderThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiB,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAE1F,MAAM,MAAM,sBAAsB,GAAG;IACjC,MAAM,EAAE;QACJ,qBAAqB,EAAE,MAAM,CAAC;QAC9B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,0BAA0B,EAAE,MAAM,CAAC;KACtC,CAAC;CACL,CAAC;AAaF,MAAM,MAAM,mCAAmC,GAAG,iBAAiB,CAAC;IAChE,SAAS,CAAC,EAAE;QACR,MAAM,EAAE,OAAO,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC,CAAC;KACrD,CAAC;CACL,CAAC,CAAC;AAEH,wBAAgB,yBAAyB,2BAExC;AAED,MAAM,CAAC,OAAO,UAAU,8BAA8B,CAAC,EACnD,SAAS,EACT,QAAQ,GACX,EAAE,mCAAmC,qBAarC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconX.d.ts","sourceRoot":"","sources":["../../../../src/icons/IconX.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,iBAAS,KAAK,CAAC,EAAE,IAAS,EAAE,KAAiB,EAAE,MAAU,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAkBhF;AACD,eAAe,KAAK,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import SimpleImageSliderThemeProvider, { useSimpleImageSliderTheme, type SimpleImageSliderTheme, type SimpleImageSliderThemeProviderProps } from './SimpleImageSliderThemeProvider';
|
|
2
|
-
import BaseListImageSlider, { type BaseSimpleImageSliderProps } from './BaseSimpleImageSlider';
|
|
3
|
-
import SimpleImageSlider, { type SimpleImageSliderProps } from './SimpleImageSlider';
|
|
4
|
-
import FullScreenImageSlider, { type FullScreenImageSliderProps } from './FullScreenImageSlider';
|
|
5
|
-
import PinchToZoom, { type PinchToZoomProps } from './PinchToZoom';
|
|
6
|
-
import type { SimpleImageSliderItem } from './@types/slider';
|
|
7
|
-
import PageCounter, { type PageCounterProps } from './PageCounter';
|
|
8
|
-
export { SimpleImageSliderThemeProvider, useSimpleImageSliderTheme, type SimpleImageSliderTheme, type SimpleImageSliderThemeProviderProps, BaseListImageSlider, type BaseSimpleImageSliderProps, SimpleImageSlider, type SimpleImageSliderProps, FullScreenImageSlider, type FullScreenImageSliderProps, PinchToZoom, type PinchToZoomProps, type SimpleImageSliderItem, PageCounter, type PageCounterProps, };
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,EAAE,EACnC,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,mCAAmC,EAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,mBAAmB,EAAE,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,iBAAiB,EAAE,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,qBAAqB,EAAE,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,WAAW,EAAE,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,WAAW,EAAE,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EACH,8BAA8B,EAC9B,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,mCAAmC,EACxC,mBAAmB,EACnB,KAAK,0BAA0B,EAC/B,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,WAAW,EACX,KAAK,gBAAgB,GACxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../../../../src/utils/clamp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WAG5D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderProp.d.ts","sourceRoot":"","sources":["../../../../src/utils/renderProp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,MAAM,MAAM,UAAU,GAChB,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,GAC5B,KAAK,CAAC,YAAY,GAClB,MAAM,GACN,SAAS,GACT,IAAI,CAAC;AAEX,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,SAAS,EAAE,UAAU,qCAYvD"}
|
package/src/@types/common.ts
DELETED
|
File without changes
|
package/src/@types/icons.ts
DELETED
package/src/@types/slider.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
2
|
-
|
|
3
|
-
import type { PropsWithChildren } from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
5
|
-
|
|
6
|
-
export type AbsoluteComponentContainerProps = PropsWithChildren<{
|
|
7
|
-
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
8
|
-
}>;
|
|
9
|
-
|
|
10
|
-
export function AbsoluteComponentContainer({
|
|
11
|
-
position,
|
|
12
|
-
children,
|
|
13
|
-
}: AbsoluteComponentContainerProps) {
|
|
14
|
-
const styles = useMemo(() => makeStyles(position), [position]);
|
|
15
|
-
|
|
16
|
-
return <View style={styles.container}>{children}</View>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const makeStyles = (position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right') => {
|
|
20
|
-
return StyleSheet.create({
|
|
21
|
-
container: {
|
|
22
|
-
zIndex: 1000,
|
|
23
|
-
position: 'absolute',
|
|
24
|
-
bottom: position === 'bottom-left' || position === 'bottom-right' ? 16 : 'auto',
|
|
25
|
-
top: position === 'top-left' || position === 'top-right' ? 16 : 'auto',
|
|
26
|
-
left: position === 'top-left' || position === 'bottom-left' ? 16 : 'auto',
|
|
27
|
-
right: position === 'top-right' || position === 'bottom-right' ? 16 : 'auto',
|
|
28
|
-
},
|
|
29
|
-
});
|
|
30
|
-
};
|