@draftbit/core 54.0.3 → 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.
Files changed (346) hide show
  1. package/lib/commonjs/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +1 -1
  2. package/lib/commonjs/components/MediaPlayer/MediaPlaybackWrapper.js +1 -1
  3. package/lib/commonjs/components/MediaPlayer/MediaPlayerCommon.js +1 -1
  4. package/lib/commonjs/components/MediaPlayer/VideoPlayer/VideoPlayer.js +1 -1
  5. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.d.ts +3 -1
  6. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +69 -54
  7. package/lib/typescript/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +1 -1
  8. package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.d.ts +3 -2
  9. package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js +19 -21
  10. package/lib/typescript/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +1 -1
  11. package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.d.ts +5 -4
  12. package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js +3 -26
  13. package/lib/typescript/src/components/MediaPlayer/MediaPlayerCommon.js.map +1 -1
  14. package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.d.ts +14 -4
  15. package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +125 -62
  16. package/lib/typescript/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +1 -1
  17. package/lib/typescript/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +8 -5
  19. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.tsx +84 -72
  20. package/src/components/MediaPlayer/MediaPlaybackWrapper.tsx +21 -24
  21. package/src/components/MediaPlayer/MediaPlayerCommon.ts +8 -34
  22. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.tsx +213 -86
  23. package/src/Provider.js +0 -10
  24. package/src/Provider.js.map +0 -1
  25. package/src/components/AccordionGroup.js +0 -51
  26. package/src/components/AccordionGroup.js.map +0 -1
  27. package/src/components/ActionSheet/ActionSheet.js +0 -46
  28. package/src/components/ActionSheet/ActionSheet.js.map +0 -1
  29. package/src/components/ActionSheet/ActionSheetCancel.js +0 -7
  30. package/src/components/ActionSheet/ActionSheetCancel.js.map +0 -1
  31. package/src/components/ActionSheet/ActionSheetItem.js +0 -31
  32. package/src/components/ActionSheet/ActionSheetItem.js.map +0 -1
  33. package/src/components/ActionSheet/index.js +0 -4
  34. package/src/components/ActionSheet/index.js.map +0 -1
  35. package/src/components/AspectRatio.js +0 -19
  36. package/src/components/AspectRatio.js.map +0 -1
  37. package/src/components/BottomSheet/BottomSheet.js +0 -76
  38. package/src/components/BottomSheet/BottomSheet.js.map +0 -1
  39. package/src/components/BottomSheet/index.js +0 -2
  40. package/src/components/BottomSheet/index.js.map +0 -1
  41. package/src/components/Button.js +0 -119
  42. package/src/components/Button.js.map +0 -1
  43. package/src/components/Checkbox/Checkbox.js +0 -63
  44. package/src/components/Checkbox/Checkbox.js.map +0 -1
  45. package/src/components/Checkbox/CheckboxGroupRow.js +0 -77
  46. package/src/components/Checkbox/CheckboxGroupRow.js.map +0 -1
  47. package/src/components/Checkbox/CheckboxRow.js +0 -79
  48. package/src/components/Checkbox/CheckboxRow.js.map +0 -1
  49. package/src/components/Checkbox/context.js +0 -15
  50. package/src/components/Checkbox/context.js.map +0 -1
  51. package/src/components/Checkbox/index.js +0 -3
  52. package/src/components/Checkbox/index.js.map +0 -1
  53. package/src/components/Config.js +0 -65
  54. package/src/components/Config.js.map +0 -1
  55. package/src/components/DatePicker/DatePicker.js +0 -418
  56. package/src/components/DatePicker/DatePicker.js.map +0 -1
  57. package/src/components/DatePicker/DatePickerComponent.js +0 -17
  58. package/src/components/DatePicker/DatePickerComponent.js.map +0 -1
  59. package/src/components/DatePicker/DatePickerComponent.web.js +0 -57
  60. package/src/components/DatePicker/DatePickerComponent.web.js.map +0 -1
  61. package/src/components/DatePicker/DatePickerComponentType.js +0 -2
  62. package/src/components/DatePicker/DatePickerComponentType.js.map +0 -1
  63. package/src/components/DatePicker/parseDate.js +0 -12
  64. package/src/components/DatePicker/parseDate.js.map +0 -1
  65. package/src/components/DeckSwiper/DeckSwiper.js +0 -116
  66. package/src/components/DeckSwiper/DeckSwiper.js.map +0 -1
  67. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -21
  68. package/src/components/DeckSwiper/DeckSwiperCard.js.map +0 -1
  69. package/src/components/DeckSwiper/index.js +0 -3
  70. package/src/components/DeckSwiper/index.js.map +0 -1
  71. package/src/components/Divider.js +0 -14
  72. package/src/components/Divider.js.map +0 -1
  73. package/src/components/Elevation.js +0 -20
  74. package/src/components/Elevation.js.map +0 -1
  75. package/src/components/ExpoImage.js +0 -44
  76. package/src/components/ExpoImage.js.map +0 -1
  77. package/src/components/FlatList.js +0 -7
  78. package/src/components/FlatList.js.map +0 -1
  79. package/src/components/FormRow.js +0 -20
  80. package/src/components/FormRow.js.map +0 -1
  81. package/src/components/IconButton.js +0 -36
  82. package/src/components/IconButton.js.map +0 -1
  83. package/src/components/Image.js +0 -48
  84. package/src/components/Image.js.map +0 -1
  85. package/src/components/KeyboardAvoidingView.js +0 -29
  86. package/src/components/KeyboardAvoidingView.js.map +0 -1
  87. package/src/components/Layout/AspectRatio.js +0 -7
  88. package/src/components/Layout/AspectRatio.js.map +0 -1
  89. package/src/components/Layout/Center.js +0 -15
  90. package/src/components/Layout/Center.js.map +0 -1
  91. package/src/components/Layout/Circle.js +0 -16
  92. package/src/components/Layout/Circle.js.map +0 -1
  93. package/src/components/Layout/HStack.js +0 -12
  94. package/src/components/Layout/HStack.js.map +0 -1
  95. package/src/components/Layout/LayoutCommon.js +0 -8
  96. package/src/components/Layout/LayoutCommon.js.map +0 -1
  97. package/src/components/Layout/Spacer.js +0 -15
  98. package/src/components/Layout/Spacer.js.map +0 -1
  99. package/src/components/Layout/Square.js +0 -25
  100. package/src/components/Layout/Square.js.map +0 -1
  101. package/src/components/Layout/VStack.js +0 -12
  102. package/src/components/Layout/VStack.js.map +0 -1
  103. package/src/components/Layout/ZStack.js +0 -58
  104. package/src/components/Layout/ZStack.js.map +0 -1
  105. package/src/components/Layout/index.js +0 -9
  106. package/src/components/Layout/index.js.map +0 -1
  107. package/src/components/LoadingIndicator.js +0 -38
  108. package/src/components/LoadingIndicator.js.map +0 -1
  109. package/src/components/LottieAnimation.js +0 -12
  110. package/src/components/LottieAnimation.js.map +0 -1
  111. package/src/components/Markdown.js +0 -33
  112. package/src/components/Markdown.js.map +0 -1
  113. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js +0 -2
  114. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.js.map +0 -1
  115. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +0 -123
  116. package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +0 -1
  117. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js +0 -90
  118. package/src/components/MediaPlayer/AudioPlayer/HeadlessAudioPlayer.js.map +0 -1
  119. package/src/components/MediaPlayer/AudioPlayer/index.js +0 -13
  120. package/src/components/MediaPlayer/AudioPlayer/index.js.map +0 -1
  121. package/src/components/MediaPlayer/MediaPlaybackWrapper.js +0 -42
  122. package/src/components/MediaPlayer/MediaPlaybackWrapper.js.map +0 -1
  123. package/src/components/MediaPlayer/MediaPlayerCommon.js +0 -71
  124. package/src/components/MediaPlayer/MediaPlayerCommon.js.map +0 -1
  125. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js +0 -109
  126. package/src/components/MediaPlayer/VideoPlayer/VideoPlayer.js.map +0 -1
  127. package/src/components/MediaPlayer/VideoPlayer/index.js +0 -2
  128. package/src/components/MediaPlayer/VideoPlayer/index.js.map +0 -1
  129. package/src/components/NumberInput.js +0 -63
  130. package/src/components/NumberInput.js.map +0 -1
  131. package/src/components/Picker/NativePicker.ios.js +0 -77
  132. package/src/components/Picker/NativePicker.ios.js.map +0 -1
  133. package/src/components/Picker/NativePicker.js +0 -73
  134. package/src/components/Picker/NativePicker.js.map +0 -1
  135. package/src/components/Picker/PickerCommon.js +0 -36
  136. package/src/components/Picker/PickerCommon.js.map +0 -1
  137. package/src/components/Picker/PickerInputContainer.js +0 -36
  138. package/src/components/Picker/PickerInputContainer.js.map +0 -1
  139. package/src/components/Picker/dropdown/DropDownModalPicker.js +0 -70
  140. package/src/components/Picker/dropdown/DropDownModalPicker.js.map +0 -1
  141. package/src/components/Picker/dropdown/DropDownPicker.js +0 -61
  142. package/src/components/Picker/dropdown/DropDownPicker.js.map +0 -1
  143. package/src/components/Picker/dropdown/MultiSelectPicker.js +0 -9
  144. package/src/components/Picker/dropdown/MultiSelectPicker.js.map +0 -1
  145. package/src/components/Picker/dropdown/PickerItem.js +0 -9
  146. package/src/components/Picker/dropdown/PickerItem.js.map +0 -1
  147. package/src/components/Picker/index.js +0 -22
  148. package/src/components/Picker/index.js.map +0 -1
  149. package/src/components/PinInput/CustomPinInputCell.js +0 -11
  150. package/src/components/PinInput/CustomPinInputCell.js.map +0 -1
  151. package/src/components/PinInput/PinInput.js +0 -89
  152. package/src/components/PinInput/PinInput.js.map +0 -1
  153. package/src/components/PinInput/PinInputText.js +0 -14
  154. package/src/components/PinInput/PinInputText.js.map +0 -1
  155. package/src/components/PinInput/index.js +0 -4
  156. package/src/components/PinInput/index.js.map +0 -1
  157. package/src/components/Portal/Portal.js +0 -34
  158. package/src/components/Portal/Portal.js.map +0 -1
  159. package/src/components/Portal/PortalConsumer.js +0 -28
  160. package/src/components/Portal/PortalConsumer.js.map +0 -1
  161. package/src/components/Portal/PortalHost.js +0 -109
  162. package/src/components/Portal/PortalHost.js.map +0 -1
  163. package/src/components/Portal/PortalManager.js +0 -33
  164. package/src/components/Portal/PortalManager.js.map +0 -1
  165. package/src/components/Pressable.js +0 -23
  166. package/src/components/Pressable.js.map +0 -1
  167. package/src/components/Progress/CircularProgress/CircularProgress.js +0 -103
  168. package/src/components/Progress/CircularProgress/CircularProgress.js.map +0 -1
  169. package/src/components/Progress/CircularProgress/index.js +0 -14
  170. package/src/components/Progress/CircularProgress/index.js.map +0 -1
  171. package/src/components/Progress/IndeterminateProgress.js +0 -39
  172. package/src/components/Progress/IndeterminateProgress.js.map +0 -1
  173. package/src/components/Progress/LinearProgress/LinearProgress.js +0 -57
  174. package/src/components/Progress/LinearProgress/LinearProgress.js.map +0 -1
  175. package/src/components/Progress/LinearProgress/index.js +0 -14
  176. package/src/components/Progress/LinearProgress/index.js.map +0 -1
  177. package/src/components/Progress/ProgressCommon.js +0 -2
  178. package/src/components/Progress/ProgressCommon.js.map +0 -1
  179. package/src/components/ProgressIndicator.js +0 -28
  180. package/src/components/ProgressIndicator.js.map +0 -1
  181. package/src/components/RadioButton/RadioButton.js +0 -18
  182. package/src/components/RadioButton/RadioButton.js.map +0 -1
  183. package/src/components/RadioButton/RadioButtonGroup.js +0 -44
  184. package/src/components/RadioButton/RadioButtonGroup.js.map +0 -1
  185. package/src/components/RadioButton/RadioButtonRow.js +0 -79
  186. package/src/components/RadioButton/RadioButtonRow.js.map +0 -1
  187. package/src/components/RadioButton/context.js +0 -15
  188. package/src/components/RadioButton/context.js.map +0 -1
  189. package/src/components/RadioButton/index.js +0 -4
  190. package/src/components/RadioButton/index.js.map +0 -1
  191. package/src/components/Row.js +0 -49
  192. package/src/components/Row.js.map +0 -1
  193. package/src/components/SVG.js +0 -8
  194. package/src/components/SVG.js.map +0 -1
  195. package/src/components/SVG.native.js +0 -10
  196. package/src/components/SVG.native.js.map +0 -1
  197. package/src/components/ScreenContainer.js +0 -42
  198. package/src/components/ScreenContainer.js.map +0 -1
  199. package/src/components/SectionList/SectionHeader.js +0 -14
  200. package/src/components/SectionList/SectionHeader.js.map +0 -1
  201. package/src/components/SectionList/SectionList.js +0 -111
  202. package/src/components/SectionList/SectionList.js.map +0 -1
  203. package/src/components/SectionList/index.js +0 -3
  204. package/src/components/SectionList/index.js.map +0 -1
  205. package/src/components/Shadow.js +0 -26
  206. package/src/components/Shadow.js.map +0 -1
  207. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +0 -13
  208. package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +0 -1
  209. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +0 -13
  210. package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +0 -1
  211. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +0 -13
  212. package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +0 -1
  213. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +0 -13
  214. package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +0 -1
  215. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +0 -13
  216. package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +0 -1
  217. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +0 -15
  218. package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +0 -1
  219. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +0 -15
  220. package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +0 -1
  221. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js +0 -91
  222. package/src/components/SimpleStyleScrollables/useSplitContentContainerStyles.js.map +0 -1
  223. package/src/components/Slider.js +0 -84
  224. package/src/components/Slider.js.map +0 -1
  225. package/src/components/StarRating.js +0 -51
  226. package/src/components/StarRating.js.map +0 -1
  227. package/src/components/StepIndicator.js +0 -347
  228. package/src/components/StepIndicator.js.map +0 -1
  229. package/src/components/Stepper.js +0 -43
  230. package/src/components/Stepper.js.map +0 -1
  231. package/src/components/Surface.js +0 -55
  232. package/src/components/Surface.js.map +0 -1
  233. package/src/components/SwipeableItem/SwipeableItem.js +0 -124
  234. package/src/components/SwipeableItem/SwipeableItem.js.map +0 -1
  235. package/src/components/SwipeableItem/SwipeableItemButton.js +0 -6
  236. package/src/components/SwipeableItem/SwipeableItemButton.js.map +0 -1
  237. package/src/components/SwipeableItem/SwipeableItemCommon.js +0 -44
  238. package/src/components/SwipeableItem/SwipeableItemCommon.js.map +0 -1
  239. package/src/components/SwipeableItem/SwipeableList.js +0 -29
  240. package/src/components/SwipeableItem/SwipeableList.js.map +0 -1
  241. package/src/components/SwipeableItem/index.js +0 -4
  242. package/src/components/SwipeableItem/index.js.map +0 -1
  243. package/src/components/Swiper/Swiper.js +0 -99
  244. package/src/components/Swiper/Swiper.js.map +0 -1
  245. package/src/components/Swiper/SwiperItem.js +0 -10
  246. package/src/components/Swiper/SwiperItem.js.map +0 -1
  247. package/src/components/Swiper/index.js +0 -3
  248. package/src/components/Swiper/index.js.map +0 -1
  249. package/src/components/Switch.js +0 -56
  250. package/src/components/Switch.js.map +0 -1
  251. package/src/components/TabView/TabView.js +0 -65
  252. package/src/components/TabView/TabView.js.map +0 -1
  253. package/src/components/TabView/TabViewItem.js +0 -12
  254. package/src/components/TabView/TabViewItem.js.map +0 -1
  255. package/src/components/TabView/index.js +0 -3
  256. package/src/components/TabView/index.js.map +0 -1
  257. package/src/components/Table/Table.js +0 -94
  258. package/src/components/Table/Table.js.map +0 -1
  259. package/src/components/Table/TableCell.js +0 -34
  260. package/src/components/Table/TableCell.js.map +0 -1
  261. package/src/components/Table/TableCommon.js +0 -13
  262. package/src/components/Table/TableCommon.js.map +0 -1
  263. package/src/components/Table/TableRow.js +0 -42
  264. package/src/components/Table/TableRow.js.map +0 -1
  265. package/src/components/Table/index.js +0 -4
  266. package/src/components/Table/index.js.map +0 -1
  267. package/src/components/Text.js +0 -25
  268. package/src/components/Text.js.map +0 -1
  269. package/src/components/TextField.js +0 -411
  270. package/src/components/TextField.js.map +0 -1
  271. package/src/components/TextInput.js +0 -25
  272. package/src/components/TextInput.js.map +0 -1
  273. package/src/components/Timer.js +0 -87
  274. package/src/components/Timer.js.map +0 -1
  275. package/src/components/Touchable.js +0 -13
  276. package/src/components/Touchable.js.map +0 -1
  277. package/src/components/Touchable.web.js +0 -3
  278. package/src/components/Touchable.web.js.map +0 -1
  279. package/src/components/Typography.js +0 -37
  280. package/src/components/Typography.js.map +0 -1
  281. package/src/components/YoutubePlayer/YoutubePlayer.js +0 -21
  282. package/src/components/YoutubePlayer/YoutubePlayer.js.map +0 -1
  283. package/src/components/YoutubePlayer/YoutubePlayer.native.js +0 -36
  284. package/src/components/YoutubePlayer/YoutubePlayer.native.js.map +0 -1
  285. package/src/components/YoutubePlayer/YoutubePlayerProps.js +0 -2
  286. package/src/components/YoutubePlayer/YoutubePlayerProps.js.map +0 -1
  287. package/src/components/YoutubePlayer/index.js +0 -2
  288. package/src/components/YoutubePlayer/index.js.map +0 -1
  289. package/src/components/useAuthState.js +0 -35
  290. package/src/components/useAuthState.js.map +0 -1
  291. package/src/constants.js +0 -11
  292. package/src/constants.js.map +0 -1
  293. package/src/deprecated-components/AccordionItem.js +0 -36
  294. package/src/deprecated-components/AccordionItem.js.map +0 -1
  295. package/src/deprecated-components/AnimatedCircularProgress.js +0 -47
  296. package/src/deprecated-components/AnimatedCircularProgress.js.map +0 -1
  297. package/src/deprecated-components/AvatarEdit.js +0 -34
  298. package/src/deprecated-components/AvatarEdit.js.map +0 -1
  299. package/src/deprecated-components/AvoidKeyboardView.js +0 -36
  300. package/src/deprecated-components/AvoidKeyboardView.js.map +0 -1
  301. package/src/deprecated-components/Banner.js +0 -112
  302. package/src/deprecated-components/Banner.js.map +0 -1
  303. package/src/deprecated-components/Card.js +0 -61
  304. package/src/deprecated-components/Card.js.map +0 -1
  305. package/src/deprecated-components/CheckboxGroup.js +0 -25
  306. package/src/deprecated-components/CheckboxGroup.js.map +0 -1
  307. package/src/deprecated-components/CircleImage.js +0 -12
  308. package/src/deprecated-components/CircleImage.js.map +0 -1
  309. package/src/deprecated-components/CircularProgress.js +0 -85
  310. package/src/deprecated-components/CircularProgress.js.map +0 -1
  311. package/src/deprecated-components/Container.js +0 -46
  312. package/src/deprecated-components/Container.js.map +0 -1
  313. package/src/deprecated-components/DeprecatedButton.js +0 -87
  314. package/src/deprecated-components/DeprecatedButton.js.map +0 -1
  315. package/src/deprecated-components/DeprecatedCardWrapper.js +0 -22
  316. package/src/deprecated-components/DeprecatedCardWrapper.js.map +0 -1
  317. package/src/deprecated-components/DeprecatedFAB.js +0 -111
  318. package/src/deprecated-components/DeprecatedFAB.js.map +0 -1
  319. package/src/deprecated-components/FAB.js +0 -50
  320. package/src/deprecated-components/FAB.js.map +0 -1
  321. package/src/deprecated-components/FieldSearchBarFull.js +0 -57
  322. package/src/deprecated-components/FieldSearchBarFull.js.map +0 -1
  323. package/src/deprecated-components/Layout.js +0 -69
  324. package/src/deprecated-components/Layout.js.map +0 -1
  325. package/src/deprecated-components/ProgressBar.js +0 -122
  326. package/src/deprecated-components/ProgressBar.js.map +0 -1
  327. package/src/deprecated-components/ProgressCircle.js +0 -17
  328. package/src/deprecated-components/ProgressCircle.js.map +0 -1
  329. package/src/deprecated-components/RadioButtonFieldGroup.js +0 -21
  330. package/src/deprecated-components/RadioButtonFieldGroup.js.map +0 -1
  331. package/src/deprecated-components/RowBodyIcon.js +0 -12
  332. package/src/deprecated-components/RowBodyIcon.js.map +0 -1
  333. package/src/deprecated-components/RowHeadlineImageCaption.js +0 -16
  334. package/src/deprecated-components/RowHeadlineImageCaption.js.map +0 -1
  335. package/src/deprecated-components/RowHeadlineImageIcon.js +0 -18
  336. package/src/deprecated-components/RowHeadlineImageIcon.js.map +0 -1
  337. package/src/deprecated-components/ToggleButton.js +0 -43
  338. package/src/deprecated-components/ToggleButton.js.map +0 -1
  339. package/src/hooks.js +0 -35
  340. package/src/hooks.js.map +0 -1
  341. package/src/index.js +0 -77
  342. package/src/index.js.map +0 -1
  343. package/src/interfaces/Icon.js +0 -9
  344. package/src/interfaces/Icon.js.map +0 -1
  345. package/src/utilities.js +0 -223
  346. package/src/utilities.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "54.0.3",
3
+ "version": "54.0.4-11e01d.2+11e01d6",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "types": "lib/typescript/src/index.d.ts",
@@ -25,7 +25,9 @@
25
25
  "android"
26
26
  ],
27
27
  "publishConfig": {
28
- "access": "public"
28
+ "access": "public",
29
+ "registry": "https://registry.npmjs.org/",
30
+ "provenance": true
29
31
  },
30
32
  "repository": {
31
33
  "type": "git",
@@ -40,7 +42,7 @@
40
42
  "homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
41
43
  "dependencies": {
42
44
  "@draftbit/react-theme-provider": "^2.1.1",
43
- "@draftbit/theme": "54.0.3",
45
+ "@draftbit/theme": "^54.0.4-11e01d.2+11e01d6",
44
46
  "@emotion/react": "^11.13.5",
45
47
  "@emotion/styled": "^11.13.5",
46
48
  "@expo/vector-icons": "^15.0.3",
@@ -55,8 +57,9 @@
55
57
  "color": "^4.2.3",
56
58
  "date-fns": "^4.1.0",
57
59
  "dateformat": "^5.0.3",
58
- "expo-av": "~16.0.8",
60
+ "expo-audio": "~1.1.1",
59
61
  "expo-image": "~3.0.11",
62
+ "expo-video": "~3.0.16",
60
63
  "lodash.isequal": "^4.5.0",
61
64
  "lodash.isnumber": "^3.0.3",
62
65
  "lodash.omit": "^4.5.0",
@@ -120,5 +123,5 @@
120
123
  ],
121
124
  "testEnvironment": "node"
122
125
  },
123
- "gitHead": "eceef38dbc6dc703d1f555fa2cdfd2cebd82a8ef"
126
+ "gitHead": "11e01d6ca5cc2e0e1cdeca926659e65fbe55cca2"
124
127
  }
@@ -1,17 +1,12 @@
1
1
  import * as React from "react";
2
- import {
3
- Audio,
4
- AVPlaybackStatus,
5
- InterruptionModeIOS,
6
- InterruptionModeAndroid,
7
- } from "expo-av";
2
+ import { useAudioPlayer, setAudioModeAsync, AudioStatus } from "expo-audio";
8
3
  import { HeadlessAudioPlayerProps } from "./AudioPlayerCommon";
9
4
  import {
10
- mapToMediaPlayerStatus,
11
5
  normalizeBase64Source,
6
+ useSourceDeepCompareMemoize,
12
7
  useSourceDeepCompareEffect,
13
8
  } from "../MediaPlayerCommon";
14
- import type { MediaPlayerRef } from "../MediaPlayerCommon";
9
+ import type { MediaPlayerRef, MediaPlayerStatus } from "../MediaPlayerCommon";
15
10
  import MediaPlaybackWrapper from "../MediaPlaybackWrapper";
16
11
 
17
12
  /**
@@ -36,38 +31,70 @@ const HeadlessAudioPlayer = React.forwardRef<
36
31
  },
37
32
  ref
38
33
  ) => {
39
- const [currentSound, setCurrentSound] = React.useState<Audio.Sound>();
34
+ const stableSource = useSourceDeepCompareMemoize(
35
+ normalizeBase64Source(source, "audio")
36
+ );
37
+ const player = useAudioPlayer(stableSource);
38
+
40
39
  const [isPlaying, setIsPlaying] = React.useState(false);
41
40
 
42
41
  React.useEffect(() => {
43
- if (
44
- currentSound &&
45
- typeof currentSound?.setIsLoopingAsync === "function"
46
- ) {
47
- currentSound.setIsLoopingAsync(isLooping);
48
- }
49
- }, [currentSound, isLooping]);
42
+ player.loop = isLooping;
43
+ }, [player, isLooping]);
50
44
 
51
45
  React.useEffect(() => {
52
- if (currentSound && typeof currentSound?.setVolumeAsync === "function") {
53
- currentSound.setVolumeAsync(volume);
46
+ player.volume = volume;
47
+ }, [player, volume]);
48
+
49
+ // Emit loading state immediately
50
+ React.useEffect(() => {
51
+ onPlaybackStatusUpdateProp?.({
52
+ isPlaying: false,
53
+ isLoading: true,
54
+ isBuffering: false,
55
+ currentPositionMillis: 0,
56
+ durationMillis: 0,
57
+ bufferedDurationMillis: 0,
58
+ isError: false,
59
+ });
60
+ }, []);
61
+
62
+ React.useEffect(() => {
63
+ const subscription = player.addListener(
64
+ "playbackStatusUpdate",
65
+ (status) => {
66
+ const mappedStatus = mapToMediaPlayerStatus(status);
67
+ onPlaybackStatusUpdateProp?.(mappedStatus);
68
+
69
+ if (status.isLoaded) {
70
+ if (status.didJustFinish && !isLooping) {
71
+ onPlaybackFinish?.();
72
+ }
73
+ setIsPlaying(status.playing);
74
+ }
75
+ }
76
+ );
77
+ return () => subscription.remove();
78
+ }, []);
79
+
80
+ // Replace source when it changes (deep comparison on URI to avoid unnecessary reloads)
81
+ const isFirstSourceRender = React.useRef(true);
82
+ useSourceDeepCompareEffect(() => {
83
+ if (isFirstSourceRender.current) {
84
+ isFirstSourceRender.current = false;
85
+ return;
54
86
  }
55
- }, [currentSound, volume]);
87
+ player.replace(normalizeBase64Source(source, "audio") as any);
88
+ }, [source]);
56
89
 
57
90
  const updateAudioMode = React.useCallback(async () => {
58
91
  try {
59
- await Audio.setAudioModeAsync({
60
- staysActiveInBackground: playsInBackground,
61
- interruptionModeIOS:
62
- interruptionMode === "lower volume"
63
- ? InterruptionModeIOS.DuckOthers
64
- : InterruptionModeIOS.DoNotMix,
65
- interruptionModeAndroid:
66
- interruptionMode === "lower volume"
67
- ? InterruptionModeAndroid.DuckOthers
68
- : InterruptionModeAndroid.DoNotMix,
69
- playsInSilentModeIOS,
70
- playThroughEarpieceAndroid,
92
+ await setAudioModeAsync({
93
+ shouldPlayInBackground: playsInBackground,
94
+ interruptionMode:
95
+ interruptionMode === "lower volume" ? "duckOthers" : "doNotMix",
96
+ playsInSilentMode: playsInSilentModeIOS,
97
+ shouldRouteThroughEarpiece: playThroughEarpieceAndroid,
71
98
  });
72
99
  } catch (e) {
73
100
  if ((e as { code?: string })?.code === "E_AUDIO_AUDIOMODE") {
@@ -88,59 +115,44 @@ const HeadlessAudioPlayer = React.forwardRef<
88
115
  playThroughEarpieceAndroid,
89
116
  ]);
90
117
 
91
- const onPlaybackStatusUpdate = (status: AVPlaybackStatus) => {
92
- const mappedStatus = mapToMediaPlayerStatus(status);
93
- onPlaybackStatusUpdateProp?.(mappedStatus);
94
-
95
- if (status.isLoaded) {
96
- if (status.didJustFinish) {
97
- if (isLooping) {
98
- return;
99
- }
100
- onPlaybackFinish?.();
101
- }
102
- setIsPlaying(status.isPlaying);
103
- }
104
- };
105
-
106
118
  const onTogglePlayback = () => {
107
- //Has to be called everytime a player is played to reconfigure the global Audio config based on each player's configuration
119
+ // Has to be called everytime a player is played to reconfigure the global Audio config based on each player's configuration
108
120
  updateAudioMode();
109
121
  };
110
122
 
111
- const loadAudio = async () => {
112
- onPlaybackStatusUpdateProp?.({
113
- isPlaying: false,
114
- isLoading: true,
115
- isBuffering: false,
116
- currentPositionMillis: 0,
117
- durationMillis: 0,
118
- bufferedDurationMillis: 0,
119
- isError: false,
120
- });
121
-
122
- const finalSource = await normalizeBase64Source(source, "audio");
123
-
124
- const { sound } = await Audio.Sound.createAsync(finalSource);
125
- setCurrentSound(sound);
126
- sound.setOnPlaybackStatusUpdate(onPlaybackStatusUpdate);
127
- };
128
-
129
- useSourceDeepCompareEffect(() => {
130
- loadAudio();
131
-
132
- // Ignore dependency of loadAudio
133
- }, [source]);
134
-
135
123
  return (
136
124
  <MediaPlaybackWrapper
137
125
  ref={ref}
138
126
  isPlaying={isPlaying}
139
- media={currentSound}
127
+ player={player}
140
128
  onTogglePlayback={onTogglePlayback}
141
129
  />
142
130
  );
143
131
  }
144
132
  );
145
133
 
134
+ export function mapToMediaPlayerStatus(status: AudioStatus): MediaPlayerStatus {
135
+ if (status.isLoaded) {
136
+ return {
137
+ isPlaying: status.playing,
138
+ isLoading: false,
139
+ isBuffering: status.isBuffering,
140
+ currentPositionMillis: status.currentTime * 1000,
141
+ durationMillis: status.duration * 1000,
142
+ bufferedDurationMillis: status.duration * 1000,
143
+ isError: false,
144
+ };
145
+ }
146
+
147
+ return {
148
+ isPlaying: false,
149
+ isLoading: true,
150
+ isBuffering: false,
151
+ currentPositionMillis: 0,
152
+ durationMillis: 0,
153
+ bufferedDurationMillis: 0,
154
+ isError: false,
155
+ };
156
+ }
157
+
146
158
  export default HeadlessAudioPlayer;
@@ -1,10 +1,11 @@
1
1
  import * as React from "react";
2
- import type { Playback } from "expo-av/src/AV";
2
+ import type { AudioPlayer } from "expo-audio";
3
+ import type { VideoPlayer } from "expo-video";
3
4
 
4
5
  import type { MediaPlayerRef } from "./MediaPlayerCommon";
5
6
 
6
7
  interface MediaPlaybackWrapperProps {
7
- media?: Playback;
8
+ player?: AudioPlayer | VideoPlayer;
8
9
  isPlaying?: boolean;
9
10
  onTogglePlayback?: () => void;
10
11
  }
@@ -15,42 +16,38 @@ interface MediaPlaybackWrapperProps {
15
16
  const MediaPlaybackWrapper = React.forwardRef<
16
17
  MediaPlayerRef,
17
18
  React.PropsWithChildren<MediaPlaybackWrapperProps>
18
- >(({ media, isPlaying, onTogglePlayback, children }, ref) => {
19
- const togglePlayback = React.useCallback(async () => {
19
+ >(({ player, isPlaying, onTogglePlayback, children }, ref) => {
20
+ const togglePlayback = React.useCallback(() => {
20
21
  onTogglePlayback?.();
21
22
 
22
23
  if (isPlaying) {
23
- await media?.pauseAsync();
24
+ player?.pause();
24
25
  } else {
25
- await media?.playAsync();
26
+ player?.play();
26
27
  }
27
- }, [media, isPlaying, onTogglePlayback]);
28
+ }, [isPlaying, onTogglePlayback]);
28
29
 
29
- const pause = React.useCallback(async () => {
30
+ const pause = React.useCallback(() => {
30
31
  onTogglePlayback?.();
31
- await media?.pauseAsync();
32
- }, [media, onTogglePlayback]);
32
+ player?.pause();
33
+ }, [player, onTogglePlayback]);
33
34
 
34
- const play = React.useCallback(async () => {
35
+ const play = React.useCallback(() => {
35
36
  onTogglePlayback?.();
36
- await media?.playAsync();
37
- }, [media, onTogglePlayback]);
37
+ player?.play();
38
+ }, [player, onTogglePlayback]);
38
39
 
39
40
  const seekToPosition = React.useCallback(
40
- async (positionMillis: number) => {
41
- await media?.setPositionAsync(positionMillis);
41
+ (positionMillis: number) => {
42
+ if (typeof (player as any)?.seekTo === "function") {
43
+ (player as AudioPlayer).seekTo(positionMillis / 1000);
44
+ } else if (player) {
45
+ player.currentTime = positionMillis / 1000;
46
+ }
42
47
  },
43
- [media]
48
+ [player]
44
49
  );
45
50
 
46
- React.useEffect(() => {
47
- return media
48
- ? () => {
49
- media.unloadAsync();
50
- }
51
- : undefined;
52
- }, [media]);
53
-
54
51
  React.useImperativeHandle(
55
52
  ref,
56
53
  () => ({
@@ -1,4 +1,5 @@
1
- import { AVPlaybackSource, AVPlaybackStatus } from "expo-av";
1
+ import { AudioSource } from "expo-audio";
2
+ import { VideoSource } from "expo-video";
2
3
  import { v4 as uuid } from "uuid";
3
4
  import { Platform } from "react-native";
4
5
  import React from "react";
@@ -24,34 +25,7 @@ export interface MediaPlayerRef {
24
25
  export interface MediaPlayerProps {
25
26
  onPlaybackStatusUpdate?: (status: MediaPlayerStatus) => void;
26
27
  onPlaybackFinish?: () => void;
27
- source: AVPlaybackSource;
28
- }
29
-
30
- export function mapToMediaPlayerStatus(
31
- status: AVPlaybackStatus
32
- ): MediaPlayerStatus {
33
- if (status.isLoaded) {
34
- return {
35
- isPlaying: status.isPlaying,
36
- isLoading: false,
37
- isBuffering: status.isBuffering,
38
- currentPositionMillis: status.positionMillis || 0,
39
- durationMillis: status.durationMillis || 0,
40
- bufferedDurationMillis: status.playableDurationMillis || 0,
41
- isError: false,
42
- };
43
- }
44
-
45
- return {
46
- isPlaying: false,
47
- isLoading: false,
48
- isBuffering: false,
49
- currentPositionMillis: 0,
50
- durationMillis: 0,
51
- bufferedDurationMillis: 0,
52
- isError: true,
53
- error: status.error,
54
- };
28
+ source: AudioSource | VideoSource;
55
29
  }
56
30
 
57
31
  const URL_REGEX =
@@ -60,14 +34,14 @@ const URL_REGEX =
60
34
  /**
61
35
  * Base64 strings are not playable on iOS and needs to be saved to a file before playing
62
36
  */
63
- export async function normalizeBase64Source(
64
- source: AVPlaybackSource,
37
+ export function normalizeBase64Source(
38
+ source: AudioSource | VideoSource,
65
39
  type: "audio" | "video"
66
- ): Promise<AVPlaybackSource> {
40
+ ): AudioSource | VideoSource {
67
41
  const uri: string | undefined = (source as any)?.uri;
68
42
 
69
43
  if (Platform.OS === "ios" && uri && !uri.match(URL_REGEX)) {
70
- const { File, Paths } = await import("expo-file-system");
44
+ const { File, Paths } = require("expo-file-system");
71
45
 
72
46
  const defaultMimeType = type === "audio" ? "wav" : "mp4";
73
47
  const mimeType = uri.startsWith(`data:${type}/`)
@@ -100,7 +74,7 @@ function sourceDeepCompareEquals(a: any, b: any) {
100
74
  return a === b;
101
75
  }
102
76
 
103
- function useSourceDeepCompareMemoize(value: any) {
77
+ export function useSourceDeepCompareMemoize(value: any) {
104
78
  const ref = React.useRef<any>(undefined);
105
79
  if (!sourceDeepCompareEquals(value, ref.current)) {
106
80
  ref.current = value;