@draftbit/core 54.0.2 → 54.0.4-11e01d.2
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/lib/commonjs/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlaybackWrapper.js +1 -1
- package/lib/commonjs/components/MediaPlayer/MediaPlayerCommon.js +1 -1
- package/lib/commonjs/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.d.ts +3 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +69 -54
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.d.ts +3 -2
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js +19 -21
- package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.d.ts +5 -4
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js +3 -26
- package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.d.ts +14 -4
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +125 -62
- package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.d.ts +3 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +11 -9
- package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -5
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.tsx +84 -72
- package/src/components/MediaPlayer/MediaPlaybackWrapper.tsx +21 -24
- package/src/components/MediaPlayer/MediaPlayerCommon.ts +8 -34
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx +213 -86
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +4 -2
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx +4 -2
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +4 -2
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +4 -2
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +4 -2
- package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts +14 -9
- package/src/Provider.js +0 -10
- package/src/Provider.js.map +0 -1
- package/src/components/AccordionGroup.js +0 -51
- package/src/components/AccordionGroup.js.map +0 -1
- package/src/components/ActionSheet/ActionSheet.js +0 -46
- package/src/components/ActionSheet/ActionSheet.js.map +0 -1
- package/src/components/ActionSheet/ActionSheetCancel.js +0 -7
- package/src/components/ActionSheet/ActionSheetCancel.js.map +0 -1
- package/src/components/ActionSheet/ActionSheetItem.js +0 -31
- package/src/components/ActionSheet/ActionSheetItem.js.map +0 -1
- package/src/components/ActionSheet/index.js +0 -4
- package/src/components/ActionSheet/index.js.map +0 -1
- package/src/components/AspectRatio.js +0 -19
- package/src/components/AspectRatio.js.map +0 -1
- package/src/components/BottomSheet/BottomSheet.js +0 -76
- package/src/components/BottomSheet/BottomSheet.js.map +0 -1
- package/src/components/BottomSheet/index.js +0 -2
- package/src/components/BottomSheet/index.js.map +0 -1
- package/src/components/Button.js +0 -119
- package/src/components/Button.js.map +0 -1
- package/src/components/Checkbox/Checkbox.js +0 -63
- package/src/components/Checkbox/Checkbox.js.map +0 -1
- package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
- package/src/components/Checkbox/CheckboxGroupRow.js.map +0 -1
- package/src/components/Checkbox/CheckboxRow.js +0 -79
- package/src/components/Checkbox/CheckboxRow.js.map +0 -1
- package/src/components/Checkbox/context.js +0 -15
- package/src/components/Checkbox/context.js.map +0 -1
- package/src/components/Checkbox/index.js +0 -3
- package/src/components/Checkbox/index.js.map +0 -1
- package/src/components/Config.js +0 -65
- package/src/components/Config.js.map +0 -1
- package/src/components/DatePicker/DatePicker.js +0 -418
- package/src/components/DatePicker/DatePicker.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.js +0 -17
- package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponent.web.js +0 -57
- package/src/components/DatePicker/DatePickerComponent.web.js.map +0 -1
- package/src/components/DatePicker/DatePickerComponentType.js +0 -2
- package/src/components/DatePicker/DatePickerComponentType.js.map +0 -1
- package/src/components/DatePicker/parseDate.js +0 -12
- package/src/components/DatePicker/parseDate.js.map +0 -1
- package/src/components/DeckSwiper/DeckSwiper.js +0 -116
- package/src/components/DeckSwiper/DeckSwiper.js.map +0 -1
- package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
- package/src/components/DeckSwiper/DeckSwiperCard.js.map +0 -1
- package/src/components/DeckSwiper/index.js +0 -3
- package/src/components/DeckSwiper/index.js.map +0 -1
- package/src/components/Divider.js +0 -14
- package/src/components/Divider.js.map +0 -1
- package/src/components/Elevation.js +0 -20
- package/src/components/Elevation.js.map +0 -1
- package/src/components/ExpoImage.js +0 -44
- package/src/components/ExpoImage.js.map +0 -1
- package/src/components/FlatList.js +0 -7
- package/src/components/FlatList.js.map +0 -1
- package/src/components/FormRow.js +0 -20
- package/src/components/FormRow.js.map +0 -1
- package/src/components/IconButton.js +0 -36
- package/src/components/IconButton.js.map +0 -1
- package/src/components/Image.js +0 -48
- package/src/components/Image.js.map +0 -1
- package/src/components/KeyboardAvoidingView.js +0 -29
- package/src/components/KeyboardAvoidingView.js.map +0 -1
- package/src/components/Layout/AspectRatio.js +0 -7
- package/src/components/Layout/AspectRatio.js.map +0 -1
- package/src/components/Layout/Center.js +0 -15
- package/src/components/Layout/Center.js.map +0 -1
- package/src/components/Layout/Circle.js +0 -16
- package/src/components/Layout/Circle.js.map +0 -1
- package/src/components/Layout/HStack.js +0 -12
- package/src/components/Layout/HStack.js.map +0 -1
- package/src/components/Layout/LayoutCommon.js +0 -8
- package/src/components/Layout/LayoutCommon.js.map +0 -1
- package/src/components/Layout/Spacer.js +0 -15
- package/src/components/Layout/Spacer.js.map +0 -1
- package/src/components/Layout/Square.js +0 -25
- package/src/components/Layout/Square.js.map +0 -1
- package/src/components/Layout/VStack.js +0 -12
- package/src/components/Layout/VStack.js.map +0 -1
- package/src/components/Layout/ZStack.js +0 -58
- package/src/components/Layout/ZStack.js.map +0 -1
- package/src/components/Layout/index.js +0 -9
- package/src/components/Layout/index.js.map +0 -1
- package/src/components/LoadingIndicator.js +0 -38
- package/src/components/LoadingIndicator.js.map +0 -1
- package/src/components/LottieAnimation.js +0 -12
- package/src/components/LottieAnimation.js.map +0 -1
- package/src/components/Markdown.js +0 -33
- package/src/components/Markdown.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +0 -2
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +0 -123
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -90
- package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
- package/src/components/MediaPlayer/AudioPlayer/index.js +0 -13
- package/src/components/MediaPlayer/AudioPlayer/index.js.map +0 -1
- package/src/components/MediaPlayer/MediaPlaybackWrapper.js +0 -42
- package/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +0 -1
- package/src/components/MediaPlayer/MediaPlayerCommon.js +0 -71
- package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -109
- package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +0 -1
- package/src/components/MediaPlayer/VideoPlayer/index.js +0 -2
- package/src/components/MediaPlayer/VideoPlayer/index.js.map +0 -1
- package/src/components/NumberInput.js +0 -63
- package/src/components/NumberInput.js.map +0 -1
- package/src/components/Picker/NativePicker.ios.js +0 -77
- package/src/components/Picker/NativePicker.ios.js.map +0 -1
- package/src/components/Picker/NativePicker.js +0 -73
- package/src/components/Picker/NativePicker.js.map +0 -1
- package/src/components/Picker/PickerCommon.js +0 -36
- package/src/components/Picker/PickerCommon.js.map +0 -1
- package/src/components/Picker/PickerInputContainer.js +0 -36
- package/src/components/Picker/PickerInputContainer.js.map +0 -1
- package/src/components/Picker/dropdown/DropDownModalPicker.js +0 -70
- package/src/components/Picker/dropdown/DropDownModalPicker.js.map +0 -1
- package/src/components/Picker/dropdown/DropDownPicker.js +0 -61
- package/src/components/Picker/dropdown/DropDownPicker.js.map +0 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.js +0 -9
- package/src/components/Picker/dropdown/MultiSelectPicker.js.map +0 -1
- package/src/components/Picker/dropdown/PickerItem.js +0 -9
- package/src/components/Picker/dropdown/PickerItem.js.map +0 -1
- package/src/components/Picker/index.js +0 -22
- package/src/components/Picker/index.js.map +0 -1
- package/src/components/PinInput/CustomPinInputCell.js +0 -11
- package/src/components/PinInput/CustomPinInputCell.js.map +0 -1
- package/src/components/PinInput/PinInput.js +0 -89
- package/src/components/PinInput/PinInput.js.map +0 -1
- package/src/components/PinInput/PinInputText.js +0 -14
- package/src/components/PinInput/PinInputText.js.map +0 -1
- package/src/components/PinInput/index.js +0 -4
- package/src/components/PinInput/index.js.map +0 -1
- package/src/components/Portal/Portal.js +0 -34
- package/src/components/Portal/Portal.js.map +0 -1
- package/src/components/Portal/PortalConsumer.js +0 -28
- package/src/components/Portal/PortalConsumer.js.map +0 -1
- package/src/components/Portal/PortalHost.js +0 -109
- package/src/components/Portal/PortalHost.js.map +0 -1
- package/src/components/Portal/PortalManager.js +0 -33
- package/src/components/Portal/PortalManager.js.map +0 -1
- package/src/components/Pressable.js +0 -23
- package/src/components/Pressable.js.map +0 -1
- package/src/components/Progress/CircularProgress/CircularProgress.js +0 -103
- package/src/components/Progress/CircularProgress/CircularProgress.js.map +0 -1
- package/src/components/Progress/CircularProgress/index.js +0 -14
- package/src/components/Progress/CircularProgress/index.js.map +0 -1
- package/src/components/Progress/IndeterminateProgress.js +0 -39
- package/src/components/Progress/IndeterminateProgress.js.map +0 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js +0 -57
- package/src/components/Progress/LinearProgress/LinearProgress.js.map +0 -1
- package/src/components/Progress/LinearProgress/index.js +0 -14
- package/src/components/Progress/LinearProgress/index.js.map +0 -1
- package/src/components/Progress/ProgressCommon.js +0 -2
- package/src/components/Progress/ProgressCommon.js.map +0 -1
- package/src/components/ProgressIndicator.js +0 -28
- package/src/components/ProgressIndicator.js.map +0 -1
- package/src/components/RadioButton/RadioButton.js +0 -18
- package/src/components/RadioButton/RadioButton.js.map +0 -1
- package/src/components/RadioButton/RadioButtonGroup.js +0 -44
- package/src/components/RadioButton/RadioButtonGroup.js.map +0 -1
- package/src/components/RadioButton/RadioButtonRow.js +0 -79
- package/src/components/RadioButton/RadioButtonRow.js.map +0 -1
- package/src/components/RadioButton/context.js +0 -15
- package/src/components/RadioButton/context.js.map +0 -1
- package/src/components/RadioButton/index.js +0 -4
- package/src/components/RadioButton/index.js.map +0 -1
- package/src/components/Row.js +0 -49
- package/src/components/Row.js.map +0 -1
- package/src/components/SVG.js +0 -8
- package/src/components/SVG.js.map +0 -1
- package/src/components/SVG.native.js +0 -10
- package/src/components/SVG.native.js.map +0 -1
- package/src/components/ScreenContainer.js +0 -42
- package/src/components/ScreenContainer.js.map +0 -1
- package/src/components/SectionList/SectionHeader.js +0 -14
- package/src/components/SectionList/SectionHeader.js.map +0 -1
- package/src/components/SectionList/SectionList.js +0 -111
- package/src/components/SectionList/SectionList.js.map +0 -1
- package/src/components/SectionList/index.js +0 -3
- package/src/components/SectionList/index.js.map +0 -1
- package/src/components/Shadow.js +0 -26
- package/src/components/Shadow.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +0 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +0 -15
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +0 -15
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +0 -1
- package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +0 -89
- package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +0 -1
- package/src/components/Slider.js +0 -84
- package/src/components/Slider.js.map +0 -1
- package/src/components/StarRating.js +0 -51
- package/src/components/StarRating.js.map +0 -1
- package/src/components/StepIndicator.js +0 -347
- package/src/components/StepIndicator.js.map +0 -1
- package/src/components/Stepper.js +0 -43
- package/src/components/Stepper.js.map +0 -1
- package/src/components/Surface.js +0 -55
- package/src/components/Surface.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItem.js +0 -124
- package/src/components/SwipeableItem/SwipeableItem.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItemButton.js +0 -6
- package/src/components/SwipeableItem/SwipeableItemButton.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableItemCommon.js +0 -44
- package/src/components/SwipeableItem/SwipeableItemCommon.js.map +0 -1
- package/src/components/SwipeableItem/SwipeableList.js +0 -29
- package/src/components/SwipeableItem/SwipeableList.js.map +0 -1
- package/src/components/SwipeableItem/index.js +0 -4
- package/src/components/SwipeableItem/index.js.map +0 -1
- package/src/components/Swiper/Swiper.js +0 -99
- package/src/components/Swiper/Swiper.js.map +0 -1
- package/src/components/Swiper/SwiperItem.js +0 -10
- package/src/components/Swiper/SwiperItem.js.map +0 -1
- package/src/components/Swiper/index.js +0 -3
- package/src/components/Swiper/index.js.map +0 -1
- package/src/components/Switch.js +0 -56
- package/src/components/Switch.js.map +0 -1
- package/src/components/TabView/TabView.js +0 -65
- package/src/components/TabView/TabView.js.map +0 -1
- package/src/components/TabView/TabViewItem.js +0 -12
- package/src/components/TabView/TabViewItem.js.map +0 -1
- package/src/components/TabView/index.js +0 -3
- package/src/components/TabView/index.js.map +0 -1
- package/src/components/Table/Table.js +0 -94
- package/src/components/Table/Table.js.map +0 -1
- package/src/components/Table/TableCell.js +0 -34
- package/src/components/Table/TableCell.js.map +0 -1
- package/src/components/Table/TableCommon.js +0 -13
- package/src/components/Table/TableCommon.js.map +0 -1
- package/src/components/Table/TableRow.js +0 -42
- package/src/components/Table/TableRow.js.map +0 -1
- package/src/components/Table/index.js +0 -4
- package/src/components/Table/index.js.map +0 -1
- package/src/components/Text.js +0 -25
- package/src/components/Text.js.map +0 -1
- package/src/components/TextField.js +0 -411
- package/src/components/TextField.js.map +0 -1
- package/src/components/TextInput.js +0 -25
- package/src/components/TextInput.js.map +0 -1
- package/src/components/Timer.js +0 -87
- package/src/components/Timer.js.map +0 -1
- package/src/components/Touchable.js +0 -13
- package/src/components/Touchable.js.map +0 -1
- package/src/components/Touchable.web.js +0 -3
- package/src/components/Touchable.web.js.map +0 -1
- package/src/components/Typography.js +0 -37
- package/src/components/Typography.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayer.js +0 -21
- package/src/components/YoutubePlayer/YoutubePlayer.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayer.native.js +0 -36
- package/src/components/YoutubePlayer/YoutubePlayer.native.js.map +0 -1
- package/src/components/YoutubePlayer/YoutubePlayerProps.js +0 -2
- package/src/components/YoutubePlayer/YoutubePlayerProps.js.map +0 -1
- package/src/components/YoutubePlayer/index.js +0 -2
- package/src/components/YoutubePlayer/index.js.map +0 -1
- package/src/components/useAuthState.js +0 -35
- package/src/components/useAuthState.js.map +0 -1
- package/src/constants.js +0 -11
- package/src/constants.js.map +0 -1
- package/src/deprecated-components/AccordionItem.js +0 -36
- package/src/deprecated-components/AccordionItem.js.map +0 -1
- package/src/deprecated-components/AnimatedCircularProgress.js +0 -47
- package/src/deprecated-components/AnimatedCircularProgress.js.map +0 -1
- package/src/deprecated-components/AvatarEdit.js +0 -34
- package/src/deprecated-components/AvatarEdit.js.map +0 -1
- package/src/deprecated-components/AvoidKeyboardView.js +0 -36
- package/src/deprecated-components/AvoidKeyboardView.js.map +0 -1
- package/src/deprecated-components/Banner.js +0 -112
- package/src/deprecated-components/Banner.js.map +0 -1
- package/src/deprecated-components/Card.js +0 -61
- package/src/deprecated-components/Card.js.map +0 -1
- package/src/deprecated-components/CheckboxGroup.js +0 -25
- package/src/deprecated-components/CheckboxGroup.js.map +0 -1
- package/src/deprecated-components/CircleImage.js +0 -12
- package/src/deprecated-components/CircleImage.js.map +0 -1
- package/src/deprecated-components/CircularProgress.js +0 -85
- package/src/deprecated-components/CircularProgress.js.map +0 -1
- package/src/deprecated-components/Container.js +0 -46
- package/src/deprecated-components/Container.js.map +0 -1
- package/src/deprecated-components/DeprecatedButton.js +0 -87
- package/src/deprecated-components/DeprecatedButton.js.map +0 -1
- package/src/deprecated-components/DeprecatedCardWrapper.js +0 -22
- package/src/deprecated-components/DeprecatedCardWrapper.js.map +0 -1
- package/src/deprecated-components/DeprecatedFAB.js +0 -111
- package/src/deprecated-components/DeprecatedFAB.js.map +0 -1
- package/src/deprecated-components/FAB.js +0 -50
- package/src/deprecated-components/FAB.js.map +0 -1
- package/src/deprecated-components/FieldSearchBarFull.js +0 -57
- package/src/deprecated-components/FieldSearchBarFull.js.map +0 -1
- package/src/deprecated-components/Layout.js +0 -69
- package/src/deprecated-components/Layout.js.map +0 -1
- package/src/deprecated-components/ProgressBar.js +0 -122
- package/src/deprecated-components/ProgressBar.js.map +0 -1
- package/src/deprecated-components/ProgressCircle.js +0 -17
- package/src/deprecated-components/ProgressCircle.js.map +0 -1
- package/src/deprecated-components/RadioButtonFieldGroup.js +0 -21
- package/src/deprecated-components/RadioButtonFieldGroup.js.map +0 -1
- package/src/deprecated-components/RowBodyIcon.js +0 -12
- package/src/deprecated-components/RowBodyIcon.js.map +0 -1
- package/src/deprecated-components/RowHeadlineImageCaption.js +0 -16
- package/src/deprecated-components/RowHeadlineImageCaption.js.map +0 -1
- package/src/deprecated-components/RowHeadlineImageIcon.js +0 -18
- package/src/deprecated-components/RowHeadlineImageIcon.js.map +0 -1
- package/src/deprecated-components/ToggleButton.js +0 -43
- package/src/deprecated-components/ToggleButton.js.map +0 -1
- package/src/hooks.js +0 -35
- package/src/hooks.js.map +0 -1
- package/src/index.js +0 -77
- package/src/index.js.map +0 -1
- package/src/interfaces/Icon.js +0 -9
- package/src/interfaces/Icon.js.map +0 -1
- package/src/utilities.js +0 -223
- package/src/utilities.js.map +0 -1
|
@@ -1,83 +1,131 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Image, StyleSheet, View, } from "react-native";
|
|
3
|
+
import { VideoView as VideoPlayerComponent, useVideoPlayer, } from "expo-video";
|
|
4
|
+
import { setAudioModeAsync } from "expo-audio";
|
|
4
5
|
import { extractSizeStyles } from "../../../utilities";
|
|
5
6
|
import MediaPlaybackWrapper from "../MediaPlaybackWrapper";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const VideoPlayer = React.forwardRef(({ style, resizeMode = "contain", posterResizeMode = "cover", onPlaybackStatusUpdate: onPlaybackStatusUpdateProp, onPlaybackFinish, source, playsInSilentModeIOS = false, ...rest }, ref) => {
|
|
19
|
-
const [videoMediaObject, setVideoMediaObject] = React.useState();
|
|
7
|
+
import { normalizeBase64Source, useSourceDeepCompareEffect, useSourceDeepCompareMemoize, } from "../MediaPlayerCommon";
|
|
8
|
+
const VideoPlayer = React.forwardRef(({ style, resizeMode = "contain", posterResizeMode = "cover", posterSource, usePoster = false, onPlaybackStatusUpdate: onPlaybackStatusUpdateProp, onPlaybackFinish, source, playsInSilentModeIOS = false, isMuted = false, useNativeControls = true, shouldPlay = false, isLooping = false, positionMillis, allowsFullscreen = true, rate = 1, volume = 1, ...rest }, ref) => {
|
|
9
|
+
const stableSource = useSourceDeepCompareMemoize(normalizeBase64Source(source, "video"));
|
|
10
|
+
const player = useVideoPlayer(stableSource, (p) => {
|
|
11
|
+
p.loop = isLooping;
|
|
12
|
+
p.muted = isMuted;
|
|
13
|
+
p.volume = volume;
|
|
14
|
+
p.playbackRate = rate;
|
|
15
|
+
});
|
|
16
|
+
const videoPlayerRef = React.useRef(null);
|
|
20
17
|
const [isPlaying, setIsPlaying] = React.useState(false);
|
|
21
18
|
const [isFullscreen, setIsFullscreen] = React.useState(false);
|
|
22
|
-
const [
|
|
19
|
+
const [showPoster, setShowPoster] = React.useState(usePoster && !!posterSource);
|
|
23
20
|
const mediaPlaybackWrapperRef = React.useRef(null);
|
|
24
21
|
const sizeStyles = extractSizeStyles(style);
|
|
25
|
-
|
|
22
|
+
React.useEffect(() => {
|
|
23
|
+
player.muted = isMuted;
|
|
24
|
+
}, [player, isMuted]);
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
player.loop = isLooping;
|
|
27
|
+
}, [player, isLooping]);
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
player.volume = volume;
|
|
30
|
+
}, [player, volume]);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
player.playbackRate = rate;
|
|
33
|
+
}, [player, rate]);
|
|
34
|
+
// Refs so statusChange can read latest shouldPlay/positionMillis
|
|
35
|
+
const shouldPlayRef = React.useRef(shouldPlay);
|
|
36
|
+
const positionMillisRef = React.useRef(positionMillis);
|
|
37
|
+
shouldPlayRef.current = shouldPlay;
|
|
38
|
+
positionMillisRef.current = positionMillis;
|
|
39
|
+
const hasAppliedInitialState = React.useRef(false);
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
const timeUpdateSub = player.addListener("timeUpdate", (status) => {
|
|
42
|
+
onPlaybackStatusUpdateProp === null || onPlaybackStatusUpdateProp === void 0 ? void 0 : onPlaybackStatusUpdateProp(mapToMediaPlayerStatus(status, player));
|
|
43
|
+
});
|
|
44
|
+
const playingChangeSub = player.addListener("playingChange", ({ isPlaying: playing }) => {
|
|
45
|
+
setIsPlaying(playing);
|
|
46
|
+
onPlaybackStatusUpdateProp === null || onPlaybackStatusUpdateProp === void 0 ? void 0 : onPlaybackStatusUpdateProp(mapPlayerToMediaPlayerStatus(player));
|
|
47
|
+
});
|
|
48
|
+
const playToEndSub = player.addListener("playToEnd", () => {
|
|
49
|
+
onPlaybackFinish === null || onPlaybackFinish === void 0 ? void 0 : onPlaybackFinish();
|
|
50
|
+
});
|
|
51
|
+
const statusChangeSub = player.addListener("statusChange", ({ status, error }) => {
|
|
52
|
+
if (status === "readyToPlay") {
|
|
53
|
+
setShowPoster(false);
|
|
54
|
+
if (!hasAppliedInitialState.current) {
|
|
55
|
+
hasAppliedInitialState.current = true;
|
|
56
|
+
if (positionMillisRef.current) {
|
|
57
|
+
player.currentTime = positionMillisRef.current / 1000;
|
|
58
|
+
}
|
|
59
|
+
if (shouldPlayRef.current) {
|
|
60
|
+
player.play();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const mappedStatus = mapPlayerToMediaPlayerStatus(player);
|
|
65
|
+
onPlaybackStatusUpdateProp === null || onPlaybackStatusUpdateProp === void 0 ? void 0 : onPlaybackStatusUpdateProp(status === "error" && error
|
|
66
|
+
? { ...mappedStatus, isError: true, error: error.message }
|
|
67
|
+
: mappedStatus);
|
|
68
|
+
});
|
|
69
|
+
return () => {
|
|
70
|
+
timeUpdateSub.remove();
|
|
71
|
+
playingChangeSub.remove();
|
|
72
|
+
playToEndSub.remove();
|
|
73
|
+
statusChangeSub.remove();
|
|
74
|
+
};
|
|
75
|
+
}, []);
|
|
76
|
+
// Replace video source when it changes (deep comparison on URI to avoid unnecessary reloads)
|
|
77
|
+
const isFirstSourceRender = React.useRef(true);
|
|
78
|
+
useSourceDeepCompareEffect(() => {
|
|
79
|
+
if (isFirstSourceRender.current) {
|
|
80
|
+
isFirstSourceRender.current = false;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
hasAppliedInitialState.current = false;
|
|
84
|
+
player.replace(normalizeBase64Source(source, "video"));
|
|
85
|
+
}, [source]);
|
|
86
|
+
let mappedVideoContentFit;
|
|
26
87
|
switch (resizeMode) {
|
|
27
88
|
case "contain":
|
|
28
|
-
|
|
89
|
+
mappedVideoContentFit = "contain";
|
|
29
90
|
break;
|
|
30
91
|
case "cover":
|
|
31
|
-
|
|
92
|
+
mappedVideoContentFit = "cover";
|
|
32
93
|
break;
|
|
33
94
|
case "stretch":
|
|
34
|
-
|
|
95
|
+
mappedVideoContentFit = "fill";
|
|
35
96
|
break;
|
|
36
97
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (status.isLoaded) {
|
|
41
|
-
if (status.didJustFinish) {
|
|
42
|
-
onPlaybackFinish === null || onPlaybackFinish === void 0 ? void 0 : onPlaybackFinish();
|
|
43
|
-
}
|
|
44
|
-
setIsPlaying(status.isPlaying);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const onFullscreenUpdate = (fullscreenUpdate) => {
|
|
48
|
-
switch (fullscreenUpdate) {
|
|
49
|
-
case VideoFullscreenUpdate.PLAYER_DID_PRESENT:
|
|
50
|
-
case VideoFullscreenUpdate.PLAYER_WILL_PRESENT:
|
|
98
|
+
const onFullscreenUpdate = (type) => {
|
|
99
|
+
switch (type) {
|
|
100
|
+
case "entered":
|
|
51
101
|
setIsFullscreen(true);
|
|
52
102
|
break;
|
|
53
|
-
case
|
|
54
|
-
case VideoFullscreenUpdate.PLAYER_WILL_DISMISS:
|
|
103
|
+
case "exited":
|
|
55
104
|
setIsFullscreen(false);
|
|
56
105
|
break;
|
|
57
106
|
}
|
|
58
107
|
};
|
|
59
108
|
const toggleFullscreen = React.useCallback(async () => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
109
|
+
var _a, _b;
|
|
110
|
+
if (videoPlayerRef) {
|
|
111
|
+
if (isFullscreen) {
|
|
112
|
+
await ((_a = videoPlayerRef.current) === null || _a === void 0 ? void 0 : _a.exitFullscreen());
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
await ((_b = videoPlayerRef.current) === null || _b === void 0 ? void 0 : _b.enterFullscreen());
|
|
116
|
+
}
|
|
65
117
|
}
|
|
66
|
-
}, [isFullscreen
|
|
118
|
+
}, [isFullscreen]);
|
|
67
119
|
const updateAudioMode = React.useCallback(async () => {
|
|
68
120
|
try {
|
|
69
|
-
await
|
|
70
|
-
playsInSilentModeIOS,
|
|
121
|
+
await setAudioModeAsync({
|
|
122
|
+
playsInSilentMode: playsInSilentModeIOS,
|
|
71
123
|
});
|
|
72
124
|
}
|
|
73
125
|
catch (e) {
|
|
74
126
|
console.error("Failed to set audio mode. Error details:", e);
|
|
75
127
|
}
|
|
76
128
|
}, [playsInSilentModeIOS]);
|
|
77
|
-
React.useEffect(() => {
|
|
78
|
-
if (isPlaying)
|
|
79
|
-
triggerAudio(mediaPlaybackWrapperRef);
|
|
80
|
-
}, [mediaPlaybackWrapperRef, isPlaying]);
|
|
81
129
|
React.useImperativeHandle(ref, () => {
|
|
82
130
|
var _a, _b, _c, _d;
|
|
83
131
|
return ({
|
|
@@ -91,19 +139,34 @@ const VideoPlayer = React.forwardRef(({ style, resizeMode = "contain", posterRes
|
|
|
91
139
|
// Include 'isPlaying' as dependency because 'togglePlayback' changes when it changes
|
|
92
140
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
141
|
[toggleFullscreen, isPlaying]);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
updateSource();
|
|
100
|
-
}, [source]);
|
|
101
|
-
return (React.createElement(MediaPlaybackWrapper, { media: videoMediaObject, isPlaying: isPlaying, ref: mediaPlaybackWrapperRef, onTogglePlayback: updateAudioMode },
|
|
102
|
-
React.createElement(VideoPlayerComponent
|
|
103
|
-
// https://docs.expo.dev/versions/latest/sdk/av/#example-video to see why ref is handled this way
|
|
104
|
-
, {
|
|
105
|
-
// https://docs.expo.dev/versions/latest/sdk/av/#example-video to see why ref is handled this way
|
|
106
|
-
ref: (component) => setVideoMediaObject(component), style: style, videoStyle: sizeStyles, resizeMode: mappedResizeMode, posterStyle: [sizeStyles, { resizeMode: posterResizeMode }], onPlaybackStatusUpdate: onPlaybackStatusUpdate, onFullscreenUpdate: (e) => onFullscreenUpdate(e.fullscreenUpdate), source: currentSource, ...rest })));
|
|
142
|
+
return (React.createElement(MediaPlaybackWrapper, { player: player, isPlaying: isPlaying, ref: mediaPlaybackWrapperRef, onTogglePlayback: updateAudioMode },
|
|
143
|
+
React.createElement(View, { style: [style, styles.container] },
|
|
144
|
+
React.createElement(VideoPlayerComponent, { ref: videoPlayerRef, player: player, nativeControls: useNativeControls, style: sizeStyles, contentFit: mappedVideoContentFit, onFullscreenEnter: () => onFullscreenUpdate("entered"), onFullscreenExit: () => onFullscreenUpdate("exited"), allowsFullscreen: allowsFullscreen, ...rest }),
|
|
145
|
+
showPoster && posterSource && (React.createElement(View, { style: StyleSheet.absoluteFill, pointerEvents: "none" },
|
|
146
|
+
React.createElement(Image, { source: posterSource, resizeMode: posterResizeMode, style: [StyleSheet.absoluteFill, sizeStyles] }))))));
|
|
107
147
|
});
|
|
148
|
+
const styles = StyleSheet.create({
|
|
149
|
+
container: {
|
|
150
|
+
overflow: "hidden",
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
function mapPlayerToMediaPlayerStatus(player) {
|
|
154
|
+
return {
|
|
155
|
+
isPlaying: player.playing,
|
|
156
|
+
isLoading: player.status === "loading",
|
|
157
|
+
isBuffering: player.status === "loading",
|
|
158
|
+
currentPositionMillis: player.currentTime * 1000,
|
|
159
|
+
durationMillis: player.duration * 1000,
|
|
160
|
+
bufferedDurationMillis: player.bufferedPosition * 1000,
|
|
161
|
+
isError: player.status === "error",
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export function mapToMediaPlayerStatus(status, player) {
|
|
165
|
+
return {
|
|
166
|
+
...mapPlayerToMediaPlayerStatus(player),
|
|
167
|
+
currentPositionMillis: status.currentTime * 1000,
|
|
168
|
+
bufferedDurationMillis: status.bufferedPosition * 1000,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
108
171
|
export default VideoPlayer;
|
|
109
172
|
//# sourceMappingURL=VideoPlayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoPlayer.js","sourceRoot":"","sources":["../../../../../../src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"VideoPlayer.js","sourceRoot":"","sources":["../../../../../../src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,EAGL,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,SAAS,IAAI,oBAAoB,EAGjC,cAAc,GAIf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3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,CAAC,WAAW,GAAG,IAAI;QAChD,cAAc,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;QACtC,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,GAAG,IAAI;QACtD,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,OAAO;KACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,MAA8B,EAC9B,MAAuB;IAEvB,OAAO;QACL,GAAG,4BAA4B,CAAC,MAAM,CAAC;QACvC,qBAAqB,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QAChD,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,GAAG,IAAI;KACvD,CAAC;AACJ,CAAC;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -6,7 +6,7 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
8
|
const SimpleStyleFlatList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
|
|
9
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
9
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, { isFlashList: false });
|
|
10
10
|
return (React.createElement(FlatList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default SimpleStyleFlatList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAGnC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAClD,GAAiC,EACjC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleStyleFlatList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,aAAa,CAAC;AAGnC,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU,CAC1C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EACyC,EAClD,GAAiC,EACjC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;IAEF,OAAO,CACL,oBAAC,QAAQ,IACP,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js
CHANGED
|
@@ -6,7 +6,7 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
8
|
const SimpleStyleKeyboardAwareScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
|
|
9
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
9
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, { isFlashList: false });
|
|
10
10
|
return (React.createElement(KeyboardAwareScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default SimpleStyleKeyboardAwareScrollView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAAG,KAAK,CAAC,UAAU,CACzD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACqD,EAC9D,GAAuC,EACvC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleStyleKeyboardAwareScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAE9E;;;GAGG;AACH,MAAM,kCAAkC,GAAG,KAAK,CAAC,UAAU,CACzD,CACE,EACE,KAAK,EAAE,SAAS,EAChB,GAAG,IAAI,EACqD,EAC9D,GAAuC,EACvC,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;IAEF,OAAO,CACL,oBAAC,uBAAuB,IACtB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,KACxC,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kCAAkC,CAAC"}
|
|
@@ -6,7 +6,7 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
8
|
const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, onRefresh, refreshing = false, ...rest }, ref) => {
|
|
9
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
9
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, { isFlashList: false });
|
|
10
10
|
return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, refreshControl: onRefresh ? (React.createElement(RefreshControl, { refreshing: refreshing, onRefresh: onRefresh })) : undefined, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default SimpleStyleScrollView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAO9E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,EAAS,EACnE,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAO9E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,EAAS,EACnE,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,cAAc,EACZ,SAAS,CAAC,CAAC,CAAC,CACV,oBAAC,cAAc,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAI,CACjE,CAAC,CAAC,CAAC,SAAS,KAEX,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
8
|
const SimpleStyleSectionList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
|
|
9
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
9
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, { isFlashList: rest.listComponent === "FlashList" });
|
|
10
10
|
return (
|
|
11
11
|
//@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
|
|
12
12
|
React.createElement(SectionList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAC7C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyD,EACzD,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleStyleSectionList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAC7C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyD,EACzD,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,EAAE,WAAW,EAAE,IAAI,CAAC,aAAa,KAAK,WAAW,EAAE,CACpD,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,WAAW,IACV,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -6,7 +6,7 @@ import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
8
|
const SimpleStyleSwipeableList = React.forwardRef(({ style: styleProp, data, ...rest }, ref) => {
|
|
9
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
9
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp, { isFlashList: rest.listComponent === "FlashList" });
|
|
10
10
|
return (
|
|
11
11
|
//@ts-ignore contentContainerStyle has different types for FlashList and FlatList implmentations and confuses TS
|
|
12
12
|
React.createElement(SwipeableList, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, data: data, ...rest }));
|
package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,KAAK,CAAC,UAAU,CAC/C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyD,EACzD,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,
|
|
1
|
+
{"version":3,"file":"SimpleStyleSwipeableList.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKjD,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAI9E;;;GAGG;AACH,MAAM,wBAAwB,GAAG,KAAK,CAAC,UAAU,CAC/C,CACE,EACE,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,GAAG,IAAI,EAIR,EACD,GAAyD,EACzD,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,8BAA8B,CACrE,SAAS,EACT,EAAE,WAAW,EAAE,IAAI,CAAC,aAAa,KAAK,WAAW,EAAE,CACpD,CAAC;IAEF,OAAO;IACL,gHAAgH;IAChH,oBAAC,aAAa,IACZ,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,IAAI,EAAE,IAAI,KACN,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
|
package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ interface Styles {
|
|
|
4
4
|
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
5
5
|
}
|
|
6
6
|
export declare const contentContainerStyleNames: string[];
|
|
7
|
-
export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle
|
|
7
|
+
export default function useSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>, options: {
|
|
8
|
+
isFlashList: boolean;
|
|
9
|
+
}): Styles;
|
|
8
10
|
export declare function useFlashListSplitContentContainerStyles(originalStyle: StyleProp<ViewStyle>): Styles;
|
|
9
11
|
export {};
|
package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js
CHANGED
|
@@ -22,20 +22,22 @@ export const contentContainerStyleNames = [
|
|
|
22
22
|
"columnGap",
|
|
23
23
|
"rowGap",
|
|
24
24
|
];
|
|
25
|
-
export default function useSplitContentContainerStyles(originalStyle) {
|
|
25
|
+
export default function useSplitContentContainerStyles(originalStyle, options) {
|
|
26
26
|
return useDeepCompareMemo(() => {
|
|
27
27
|
const flattenedStyle = StyleSheet.flatten(originalStyle);
|
|
28
28
|
const contentContainerStyle = pick(flattenedStyle, contentContainerStyleNames);
|
|
29
29
|
// contentContainerStyle should always at least fill the parent to ensure sizing changes reflects properly on component and children.
|
|
30
30
|
contentContainerStyle.flexGrow = 1;
|
|
31
31
|
let style = omit(flattenedStyle, contentContainerStyleNames);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
style
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
if (!options.isFlashList) {
|
|
33
|
+
// ScrollView's implementation defaults flexGrow to 1, which prevents the ability to set a static size or use a flex larger than 1
|
|
34
|
+
// See: https://github.com/facebook/react-native/issues/3422
|
|
35
|
+
if (style.flex === undefined) {
|
|
36
|
+
style = { flexGrow: 0, ...style };
|
|
37
|
+
}
|
|
38
|
+
else if (style.flexGrow === undefined) {
|
|
39
|
+
style = { flexGrow: style.flex, ...style };
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
return {
|
|
41
43
|
style,
|
|
@@ -44,7 +46,7 @@ export default function useSplitContentContainerStyles(originalStyle) {
|
|
|
44
46
|
}, [originalStyle]);
|
|
45
47
|
}
|
|
46
48
|
export function useFlashListSplitContentContainerStyles(originalStyle) {
|
|
47
|
-
const { style, contentContainerStyle } = useSplitContentContainerStyles(originalStyle);
|
|
49
|
+
const { style, contentContainerStyle } = useSplitContentContainerStyles(originalStyle, { isFlashList: true });
|
|
48
50
|
// FlashList only supports a subset of contentContainerStyles
|
|
49
51
|
// See https://shopify.github.io/flash-list/docs/usage/#contentcontainerstyle
|
|
50
52
|
const flashListContentContainerStyle = pick(contentContainerStyle, [
|
package/lib/typescript/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSplitContentContainerStyles.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;AACpD,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAOtD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,cAAc;IACd,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,eAAe;IACf,UAAU;IACV,KAAK;IACL,WAAW;IACX,QAAQ;CACT,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,aAAmC;
|
|
1
|
+
{"version":3,"file":"useSplitContentContainerStyles.js","sourceRoot":"","sources":["../../../../../src/components/SimpleStyleScrollables/useSplitContentContainerStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;AACpD,MAAM,aAAa,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAOtD,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,SAAS;IACT,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,cAAc;IACd,cAAc;IACd,YAAY;IACZ,iBAAiB;IACjB,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,eA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