Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/apis/AccessibilityInfo.res
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ type accessibilityEventTypes = [
]

@scope("AccessibilityInfo") @module("react-native")
external sendAccessibilityEvent: (NativeElement.ref, accessibilityEventTypes) => unit =
"sendAccessibilityEvent"
external sendAccessibilityEvent: (
Ref.t<DOMAPI.element<'nativeElement>>,
accessibilityEventTypes,
) => unit = "sendAccessibilityEvent"

@scope("AccessibilityInfo") @module("react-native")
external prefersCrossFadeTransitions: unit => promise<bool> = "prefersCrossFadeTransitions"
3 changes: 2 additions & 1 deletion src/components/ActivityIndicator.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/ActivityIndicator.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asActivityIndicatorElement: DOMAPI.anyElement => element = "%identity"

@unboxed
type size = | @as("small") Small | @as("large") Large | Number(float)
Expand Down
3 changes: 2 additions & 1 deletion src/components/Button.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/Button.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asButtonElement: DOMAPI.anyElement => element = "%identity"

type props = {
ref?: ref,
Expand Down
2 changes: 2 additions & 0 deletions src/components/Image.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var Event$ReactNative = require("../apis/Event.bs.js");
var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

var Source = {};

Event$ReactNative.SyntheticEvent({});
Expand Down
8 changes: 7 additions & 1 deletion src/components/Image.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asImageElement: DOMAPI.anyElement => element = "%identity"

type cache = [
| #default
Expand Down
3 changes: 2 additions & 1 deletion src/components/ImageBackground.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/ImageBackground.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asImageBackgroundElement: DOMAPI.anyElement => element = "%identity"

type props = {
ref?: ref,
Expand Down
3 changes: 2 additions & 1 deletion src/components/KeyboardAvoidingView.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/KeyboardAvoidingView.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asKeyboardAvoidingViewElement: DOMAPI.anyElement => element = "%identity"

type behavior = [#height | #position | #padding]

Expand Down
2 changes: 2 additions & 0 deletions src/components/Modal.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var Event$ReactNative = require("../apis/Event.bs.js");
var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

Event$ReactNative.SyntheticEvent({});

var OrientationChangeEvent = {};
Expand Down
8 changes: 7 additions & 1 deletion src/components/Modal.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asModalElement: DOMAPI.anyElement => element = "%identity"

type orientation = [
| #landscape
Expand Down
3 changes: 2 additions & 1 deletion src/components/Pressable.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/Pressable.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asPressableElement: DOMAPI.anyElement => element = "%identity"

type rippleConfig = {
borderless?: bool,
Expand Down
3 changes: 2 additions & 1 deletion src/components/ProgressBarAndroid.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/ProgressBarAndroid.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asProgressBarAndroidElement: DOMAPI.anyElement => element = "%identity"

type styleAttr = [
| #Horizontal
Expand Down
3 changes: 2 additions & 1 deletion src/components/RefreshControl.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/RefreshControl.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asRefreshControlElement: DOMAPI.anyElement => element = "%identity"

type props = {
ref?: ref,
Expand Down
3 changes: 2 additions & 1 deletion src/components/SafeAreaView.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/SafeAreaView.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asSafeAreaViewElement: DOMAPI.anyElement => element = "%identity"

type props = {
ref?: ref,
Expand Down
3 changes: 2 additions & 1 deletion src/components/Switch.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/Switch.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asSwitchElement: DOMAPI.anyElement => element = "%identity"

type trackColor = {
\"true"?: Color.t,
Expand Down
3 changes: 2 additions & 1 deletion src/components/Text.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/Text.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asTextElement: DOMAPI.anyElement => element = "%identity"

type android_hyphenationFrequency = [
| #normal
Expand Down
3 changes: 2 additions & 1 deletion src/components/TouchableHighlight.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/TouchableHighlight.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asTouchableHighlightElement: DOMAPI.anyElement => element = "%identity"

type props = {
ref?: ref,
Expand Down
4 changes: 3 additions & 1 deletion src/components/TouchableNativeFeedback.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

var Background = {};

exports.Background = Background;
/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/TouchableNativeFeedback.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asTouchableNativeFeedbackElement: DOMAPI.anyElement => element = "%identity"

module Background = {
type t
Expand Down
3 changes: 2 additions & 1 deletion src/components/TouchableWithoutFeedback.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/TouchableWithoutFeedback.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asTouchableWithoutFeedbackElement: DOMAPI.anyElement => element = "%identity"

type coreProps = {
accessible?: bool,
Expand Down
3 changes: 2 additions & 1 deletion src/components/View.bs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

var NativeElement$ReactNative = require("../elements/NativeElement.bs.js");

NativeElement$ReactNative.Impl({});

/* NativeElement-ReactNative Not a pure module */
/* Not a pure module */
8 changes: 7 additions & 1 deletion src/components/View.res
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include NativeElement
type nativeElement

include NativeElement.Impl({
type t = nativeElement
})

external asViewElement: DOMAPI.anyElement => element = "%identity"

// @todo in 0.71.0
// after adding `aria-*` props, make sure `aria-checked` can be true, false or "mixed"
Expand Down
6 changes: 3 additions & 3 deletions src/elements/DrawerLayoutAndroidElement.bs.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

var NativeMethods$ReactNative = require("./NativeMethods.bs.js");
var NativeElement$ReactNative = require("./NativeElement.bs.js");
var DrawerLayoutAndroidMethods$ReactNative = require("./DrawerLayoutAndroidMethods.bs.js");

DrawerLayoutAndroidMethods$ReactNative.Make({});
NativeElement$ReactNative.Impl({});

NativeMethods$ReactNative.Make({});
DrawerLayoutAndroidMethods$ReactNative.Make({});

/* Not a pure module */
11 changes: 6 additions & 5 deletions src/elements/DrawerLayoutAndroidElement.res
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
type element
type ref = Ref.t<element>
type nativeElement

include DrawerLayoutAndroidMethods.Make({
type t = element
include NativeElement.Impl({
type t = nativeElement
})

include NativeMethods.Make({
external asDrawerLayoutAndroidElement: DOMAPI.anyElement => element = "%identity"

include DrawerLayoutAndroidMethods.Make({
type t = element
})
10 changes: 8 additions & 2 deletions src/elements/NativeElement.bs.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
'use strict';

var DOMAPI$ReactNative = require("../types/DOMAPI.bs.js");
var NativeMethods$ReactNative = require("./NativeMethods.bs.js");

NativeMethods$ReactNative.Make({});
function Impl(T) {
NativeMethods$ReactNative.Make({});
DOMAPI$ReactNative.$$Element.Impl({});
return {};
}

/* Not a pure module */
exports.Impl = Impl;
/* No side effect */
Loading
Loading