-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3e76c3e
Showing
26 changed files
with
465 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# macOS Finder artifacts | ||
.DS_Store | ||
|
||
# node | ||
node_modules | ||
|
||
# ocaml/reason build artifacts | ||
.bsb.lock | ||
**/lib/bs | ||
**/lib/ocaml | ||
**/.merlin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# BuckleScript bindings to React Native Maps | ||
|
||
[![Version](https://img.shields.io/npm/v/reason-react-native-maps.svg)](https://www.npmjs.com/package/reason-react-native-maps) | ||
|
||
These are complete BuckleScript bindings to [`React Native Maps`](react-native-community/react-native-maps), in Reason syntax. | ||
|
||
Version of these bindings follow that of the `React Native Maps` package. | ||
|
||
Documentation will be added later. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "reason-react-native-maps", | ||
"namespace": "react-native-maps", | ||
"refmt": 3, | ||
"reason": { | ||
"react-jsx": 3 | ||
}, | ||
"package-specs": { | ||
"module": "commonjs", | ||
"in-source": true | ||
}, | ||
"suffix": ".bs.js", | ||
"sources": [ | ||
{ | ||
"dir": "src", | ||
"subdirs": false | ||
} | ||
], | ||
"bsc-flags": ["-bs-no-version-header", "-warn-error @a"], | ||
"bs-dependencies": ["reason-react", "reason-react-native"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "reason-react-native-maps", | ||
"version": "0.24.0", | ||
"author": "sgny (https://github.com/sgny)", | ||
"repository": "https://github.com/sgny/reason-react-native-maps.git", | ||
"license": "MIT", | ||
"keywords": [ | ||
"reason", | ||
"reasonml", | ||
"bucklescript", | ||
"react-native", | ||
"react-native-maps" | ||
], | ||
"scripts": { | ||
"clean": "bsb -clean-world", | ||
"start": "bsb -make-world -w", | ||
"build": "bsb -make-world", | ||
"clean-build": "bsb -clean-world -make-world" | ||
}, | ||
"peerDependencies": { | ||
"bs-platform": "~5.0.4", | ||
"react-native": "~0.59.9", | ||
"reason-react": "^0.7.0", | ||
"reason-react-native": "^0.60.0" | ||
}, | ||
"dependencies": { | ||
"react-native-maps": "~0.24.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[@react.component] [@bs.module "react-native-maps/lib/components/MapCallout"] | ||
// supports view props | ||
external make: | ||
( | ||
~tooltip: bool=?, | ||
~alphaHitTest: bool=?, | ||
~onPress: unit => unit=?, | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[@react.component] | ||
[@bs.module "react-native-maps/lib/components/MapCalloutSubview"] | ||
// supports view props | ||
external make: | ||
( | ||
~onPress: unit => unit=?, | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[@react.component] [@bs.module "react-native-maps/lib/components/MapCircle"] | ||
external make: | ||
( | ||
~center: LatLng.t, | ||
~radius: float, | ||
~strokeWidth: float=?, | ||
~strokeColor: ReactNative.Color.t=?, | ||
~fillColor: ReactNative.Color.t=?, | ||
~zIndex: int=?, | ||
~lineCap: [@bs.string] [ | `butt | `round | `square]=?, | ||
~lineJoin: [@bs.string] [ | `bevel | `miter | `round]=?, | ||
~miterLimit: int=?, | ||
~geodesic: bool=?, | ||
~lineDashPhase: int=?, | ||
~lineDashPattern: array(int)=?, | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type t; | ||
|
||
[@bs.obj] external create: (~latitude: float, ~longitude: float) => t = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
include Shared; | ||
|
||
type element; | ||
|
||
type camera; | ||
[@bs.obj] | ||
external camera: | ||
( | ||
~center: LatLng.t, | ||
~pitch: float, | ||
~heading: float, | ||
~altitude: float=?, | ||
~zoom: int=?, | ||
unit | ||
) => | ||
camera = | ||
""; | ||
|
||
type edgePadding; | ||
[@bs.obj] | ||
external edgePadding: | ||
(~top: float, ~right: float, ~bottom: float, ~left: float) => edgePadding = | ||
""; | ||
|
||
type edgeInsets; | ||
[@bs.obj] | ||
external edgeInsets: | ||
(~top: float, ~left: float, ~bottom: float, ~right: float) => edgeInsets = | ||
""; | ||
|
||
type marker; | ||
[@bs.obj] | ||
external marker: | ||
(~id: string, ~coordinate: LatLng.t, ~title: string, ~description: string) => | ||
marker = | ||
""; | ||
|
||
type kmlContainer = {. "markers": array(marker)}; | ||
|
||
type indoorLevel = { | ||
. | ||
"activeLevelIndex": int, | ||
"name": string, | ||
"shortName": string, | ||
}; | ||
|
||
type indoorBuilding = { | ||
. | ||
"underground": bool, | ||
"activeLevelIndex": int, | ||
"levels": array(indoorLevel), | ||
}; | ||
|
||
type frame = { | ||
. | ||
"x": float, | ||
"y": float, | ||
"width": float, | ||
"height": float, | ||
}; | ||
|
||
[@bs.send] external getCamera: (element, unit) => unit = ""; | ||
[@bs.send] | ||
external animateCamera: (element, camera, {. "duration": float}) => unit = ""; | ||
[@bs.send] | ||
external setCamera: (element, camera, {. "duration": float}) => unit = ""; | ||
[@bs.send] external animateToRegion: (element, Region.t, float) => unit = ""; | ||
[@bs.send] | ||
external getMapBoundaries: | ||
(element, unit) => | ||
Js.Promise.t({ | ||
. | ||
"northEast": LatLng.t, | ||
"southWest": LatLng.t, | ||
}) = | ||
""; | ||
[@bs.send] | ||
external setMapBoundaries: | ||
( | ||
element, | ||
{ | ||
. | ||
"northEast": LatLng.t, | ||
"southWest": LatLng.t, | ||
} | ||
) => | ||
unit = | ||
""; | ||
[@bs.send] external setIndoorActiveLevelIndex: (element, int) => unit = ""; | ||
[@bs.send] external fitToElements: (element, bool) => unit = ""; | ||
[@bs.send] | ||
external fitToSuppliedMarkers: | ||
( | ||
element, | ||
array(string), | ||
{ | ||
. | ||
"edgePadding": edgePadding, | ||
"animated": bool, | ||
} | ||
) => | ||
unit = | ||
""; | ||
[@bs.send] | ||
external fitToCoordinates: | ||
( | ||
element, | ||
array(LatLng.t), | ||
{ | ||
. | ||
"edgePadding": edgePadding, | ||
"animated": bool, | ||
} | ||
) => | ||
unit = | ||
""; | ||
[@bs.send] | ||
external pointForCoordinate: (element, LatLng.t) => Js.Promise.t(point) = ""; | ||
[@bs.send] | ||
external coordinateForPoint: (element, point) => Js.Promise.t(LatLng.t) = ""; | ||
[@bs.send] | ||
external getMarkersFrames: | ||
(element, bool) => | ||
Js.Promise.t({ | ||
. | ||
"markerID": { | ||
. | ||
"point": point, | ||
"frame": frame, | ||
}, | ||
}) = | ||
""; | ||
|
||
[@react.component] [@bs.module "react-native-maps/lib/components/MapView"] | ||
external make: | ||
( | ||
~provider: [@bs.string] [ | `google]=?, | ||
~region: Region.t, | ||
~initialRegion: Region.t, | ||
~camera: camera=?, | ||
~initialCamera: camera=?, | ||
~mapPadding: edgePadding=?, | ||
~paddingAdjustmentBehavior: [@bs.string] [ | `always | `automatic | `never] | ||
=?, | ||
~liteMode: bool=?, | ||
~mapType: [@bs.string] [ | ||
| `standard | ||
| `satellite | ||
| `hybrid | ||
| `none | ||
| `terrain | ||
| `mutedStandard | ||
] | ||
=?, | ||
~showsUserLocation: bool=?, | ||
~userLocationAnnotationTitle: string=?, | ||
~followsUserLocation: bool=?, | ||
~showsMyLocationButton: bool=?, | ||
~showsPointsOfInterest: bool=?, | ||
~showsCompass: bool=?, | ||
~showsScale: bool=?, | ||
~showsBuildings: bool=?, | ||
~showsTraffic: bool=?, | ||
~showsIndoors: bool=?, | ||
~showsIndoorLevelPicker: bool=?, | ||
~zoomEnabled: bool=?, | ||
~zoomControlEnabled: bool=?, | ||
~minZoomLevel: int=?, | ||
~maxZoomLevel: int=?, | ||
~rotateEnabled: bool=?, | ||
~scrollEnabled: bool=?, | ||
~pitchEnabled: bool=?, | ||
~toolbarEnabled: bool=?, | ||
~cacheEnabled: bool=?, | ||
~loadingEnabled: bool=?, | ||
~loadingIndicatorColor: ReactNative.Color.t=?, | ||
~loadingBackgroundColor: ReactNative.Color.t=?, | ||
~moveOnMarkerPress: bool=?, | ||
~onRegionChange: ReactNative.Event.syntheticEvent(Region.t) => unit=?, | ||
~onRegionChangeComplete: ReactNative.Event.syntheticEvent(Region.t) => | ||
unit | ||
=?, | ||
~onPress: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onLongPress: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onPanDrag: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onPoiClick: ReactNative.Event.syntheticEvent(poi) => unit=?, | ||
~onMapReady: unit => unit=?, | ||
~onKmlReady: ReactNative.Event.syntheticEvent(kmlContainer) => unit=?, | ||
~onIndoorLevelActivated: ReactNative.Event.syntheticEvent(indoorLevel) => | ||
unit | ||
=?, | ||
~onIndoorBuildingFocused: ReactNative.Event.syntheticEvent( | ||
indoorBuilding, | ||
) => | ||
unit | ||
=?, | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
include Shared; | ||
|
||
type element; | ||
|
||
[@react.component] [@bs.module "react-native-maps/lib/components/MapMarker"] | ||
external make: | ||
( | ||
~title: string=?, | ||
~description: string=?, | ||
~image: ReactNative.Image.Source.t=?, | ||
~icon: ReactNative.Image.Source.t=?, | ||
~pinColor: string=?, | ||
~coordinate: LatLng.t, | ||
~centerOffset: point=?, | ||
~calloutOffset: point=?, | ||
~anchor: point=?, | ||
~calloutAnchor: point=?, | ||
~flat: bool=?, | ||
~identifier: string=?, | ||
~rotation: float=?, | ||
~draggable: bool=?, | ||
~tracksViewChanges: bool=?, | ||
~tracksInfoWindowChanges: bool=?, | ||
~stopPropagation: bool=?, | ||
~opacity: float=?, | ||
~onPress: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onSelect: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onDeselect: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onCalloutPress: unit => unit=?, | ||
~onDragStart: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onDrag: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~onDragEnd: ReactNative.Event.syntheticEvent(copos) => unit=?, | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; | ||
|
||
[@bs.send] external showCallout: (element, unit) => unit = ""; | ||
[@bs.send] external hideCallout: (element, unit) => unit = ""; | ||
[@bs.send] external redrawCallout: (element, unit) => unit = ""; | ||
[@bs.send] | ||
external animateMarkerToCoordinate: (element, LatLng.t, float) => unit = ""; | ||
[@bs.send] external redraw: (element, unit) => unit = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[@react.component] [@bs.module "react-native-maps/lib/components/MapOverlay"] | ||
// supports view props | ||
external make: | ||
( | ||
~image: ReactNative.Image.Source.t=?, | ||
~bounds: array(LatLng.t), | ||
~style: ReactNative.Style.t=?, | ||
~children: React.element=? | ||
) => | ||
React.element = | ||
"default"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ |
Oops, something went wrong.