11@file:JsModule(" react-native" )
22@file:Suppress(" unused" )
33
4- package ojaynico.kotlin.react.native
4+ package ojaynico.kotlin.react.native.api
55
66import ojaynico.kotlin.react.ComponentProvider
7+ import ojaynico.kotlin.react.native.component.*
78import react.Component
9+ import react.FC
810import react.Props
911import react.State
1012import kotlin.js.Promise
@@ -24,6 +26,8 @@ external class Alert: Component<Props, State> {
2426 }
2527}
2628
29+ external val AnimatedView : FC <ViewProps >
30+
2731external class Animated : Component <Props , State > {
2832
2933 class View : Component <ViewProps , State > {
@@ -330,3 +334,86 @@ external object AccessibilityInfo {
330334 fun addEventListener (eventName : String , handler : (args: dynamic ) -> Unit ): dynamic
331335 fun removeEventListener (eventName : String , handler : (args: dynamic ) -> Unit )
332336}
337+
338+ external object Image {
339+ fun getSize (uri : String , success : () -> Unit , failure : () -> Unit ): dynamic
340+ fun getSizeWithHeaders (uri : String , headers : dynamic , success : () -> Unit , failure : () -> Unit ): dynamic
341+ fun prefetch (uri : String ): dynamic
342+ fun abortPrefetch (requestId : Number ): dynamic
343+ fun queryCache (vararg urls : String ): dynamic
344+ fun resolveAssetSource (source : dynamic ): dynamic
345+ }
346+
347+ external object TextInput {
348+ fun focus ()
349+ fun blur ()
350+ fun clear ()
351+ fun isFocused (): dynamic
352+ }
353+
354+ external object FlatList {
355+ fun scrollToEnd (params : dynamic )
356+ fun scrollToIndex (params : dynamic )
357+ fun scrollToItem (params : dynamic )
358+ fun scrollToOffset (params : dynamic )
359+ fun recordInteraction ()
360+ fun flashScrollIndicators ()
361+ fun getNativeScrollRef ()
362+ fun getScrollResponder ()
363+ fun getScrollableNode ()
364+ }
365+
366+ external object ScrollView {
367+ fun flashScrollIndicators ()
368+ fun scrollTo (vararg options : dynamic )
369+ fun scrollToEnd (vararg options : dynamic )
370+ fun scrollWithoutAnimationTo (y : dynamic , x : dynamic )
371+ }
372+
373+ external object SectionList {
374+ fun scrollToLocation (params : dynamic )
375+ fun recordInteraction ()
376+ fun flashScrollIndicators ()
377+ }
378+
379+ external object StatusBar {
380+ fun popStackEntry (entry : dynamic ): dynamic
381+ fun pushStackEntry (entry : dynamic ): dynamic
382+ fun replaceStackEntry (entry : dynamic , props : dynamic ): dynamic
383+ fun setBackgroundColor (color : String , animated : Boolean )
384+ fun setBarStyle (style : dynamic , animated : Boolean )
385+ fun setHidden (hidden : Boolean , animation : dynamic )
386+ fun setNetworkActivityIndicatorVisible (visible : Boolean )
387+ fun setTranslucent (translucent : Boolean )
388+ }
389+
390+ external object TouchableOpacity {
391+ fun setOpacityTo (value : Number , duration : Number )
392+ }
393+
394+ external object VirtualizedList {
395+ fun scrollToEnd (params : dynamic )
396+ fun scrollToIndex (params : dynamic )
397+ fun scrollToItem (params : dynamic )
398+ fun scrollToOffset (params : dynamic )
399+ fun recordInteraction ()
400+ fun flashScrollIndicators ()
401+ fun getScrollRef ()
402+ fun getScrollResponder ()
403+ fun getScrollableNode ()
404+ fun setNativeProps (params : dynamic )
405+ fun getChildContext () : dynamic
406+ fun hasMore (): Boolean
407+ }
408+
409+ external object DrawerLayoutAndroid {
410+ fun closeDrawer ()
411+ fun openDrawer ()
412+ }
413+
414+ external object TouchableNativeFeedback {
415+ fun SelectableBackground (rippleRadius : Number )
416+ fun SelectableBackgroundBorderless (rippleRadius : Number )
417+ fun Ripple (color : String , borderless : Boolean , rippleRadius : Number )
418+ fun canUseNativeForeground ()
419+ }
0 commit comments