diff --git a/docs/Camera.md b/docs/Camera.md index 7b7c39837..f5f34a018 100644 --- a/docs/Camera.md +++ b/docs/Camera.md @@ -12,7 +12,7 @@ | zoomLevel | `number` | `none` | `false` | The zoom level of the map. | | padding | `CameraPadding` | `none` | `false` | The viewport padding in points. | | animationDuration | `number` | `2000` | `false` | The duration the map takes to animate to a new configuration. | -| animationMode | `'flyTo' \| 'easeTo' \| 'linearTo' \| 'moveTo'` | `'easeTo'` | `false` | The easing or path the camera uses to animate to a new configuration. | +| animationMode | `"flyTo" \| "easeTo" \| "linearTo" \| "moveTo"` | `"easeTo"` | `false` | The easing or path the camera uses to animate to a new configuration. | | allowUpdates | `boolean` | `true` | `false` | If false, the camera will not send any props to the native module. Intended to be used to prevent unnecessary tile fetching and improve performance when the map is not visible. Defaults to true. | | defaultSettings | `CameraStop` | `none` | `false` | Default view settings applied on camera | | minZoomLevel | `number` | `none` | `false` | The minimun zoom level of the map | diff --git a/docs/MapView.md b/docs/MapView.md index e8a54320f..ba4de3077 100644 --- a/docs/MapView.md +++ b/docs/MapView.md @@ -6,7 +6,7 @@ | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | contentInset | `number[] \| number` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. | -| style | `ViewProps['style']` | `none` | `false` | Style for wrapping React Native View | +| style | `ViewProps["style"]` | `none` | `false` | Style for wrapping React Native View | | styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapLibreGL.StyleURL.Default` | | styleJSON | `string` | `none` | `false` | StyleJSON for map - according to TileJSON specs: https://github.com/mapbox/tilejson-spec | | preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.
The default value for this property is MLNMapViewPreferredFramesPerSecondDefault,
which will adaptively set the preferred frame rate based on the capability of
the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.

Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.
This property can be set to arbitrary integer values. | @@ -16,16 +16,16 @@ | pitchEnabled | `boolean` | `true` | `false` | Enable/Disable pitch on map | | rotateEnabled | `boolean` | `true` | `false` | Enable/Disable rotation on map | | attributionEnabled | `boolean` | `true` | `false` | Enable/Disable attribution on map.

This must be enabled for Mapbox-hosted tiles and styles. Please refer to the Mapbox Terms of Service.
Other providers do not require this. | -| attributionPosition | `\| {top?: number; left?: number} -\| {top?: number; right?: number} -\| {bottom?: number; left?: number} -\| {bottom?: number; right?: number}` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map | +| attributionPosition | `\| { top?: number; left?: number } +\| { top?: number; right?: number } +\| { bottom?: number; left?: number } +\| { bottom?: number; right?: number }` | `none` | `false` | Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map | | tintColor | `string \| unknown[]` | `none` | `false` | MapView's tintColor | | logoEnabled | `boolean` | `false` | `false` | Enable/Disable the logo on the map. | -| logoPosition | `\| {top?: number; left?: number} -\| {top?: number; right?: number} -\| {bottom?: number; left?: number} -\| {bottom?: number; right?: number}` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map | +| logoPosition | `\| { top?: number; left?: number } +\| { top?: number; right?: number } +\| { bottom?: number; left?: number } +\| { bottom?: number; right?: number }` | `none` | `false` | Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map | | compassEnabled | `boolean` | `none` | `false` | Enable/Disable the compass from appearing on the map | | compassViewPosition | `number` | `none` | `false` | Change corner of map the compass starts at. 0: TopLeft, 1: TopRight, 2: BottomLeft, 3: BottomRight | | compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values | diff --git a/docs/MarkerView.md b/docs/MarkerView.md index 1c8e68c68..7ff9d2b4e 100644 --- a/docs/MarkerView.md +++ b/docs/MarkerView.md @@ -6,7 +6,7 @@ | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the marker.
See also #anchor. | -| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
Note this is only for custom annotations not the default pin view.
Defaults to the center of the view. | +| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
Note this is only for custom annotations not the default pin view.
Defaults to the center of the view. | |   x | `number` | `none` | `true` | `x` of anchor | |   y | `number` | `none` | `true` | `y` of anchor | | allowOverlap | `boolean` | `false` | `false` | FIX ME NO DESCRIPTION | diff --git a/docs/NativeUserLocation.md b/docs/NativeUserLocation.md index 53ff35620..aac062fda 100644 --- a/docs/NativeUserLocation.md +++ b/docs/NativeUserLocation.md @@ -5,7 +5,7 @@ ### props | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | -| androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | Android render mode.

- normal: just a circle
- compass: triangle with heading
- gps: large arrow

@platform android | +| androidRenderMode | `"normal" \| "compass" \| "gps"` | `none` | `false` | Android render mode.

- normal: just a circle
- compass: triangle with heading
- gps: large arrow

@platform android | | iosShowsUserHeadingIndicator | `boolean` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.

@platform ios | diff --git a/docs/PointAnnotation.md b/docs/PointAnnotation.md index ce9328453..6466124cf 100644 --- a/docs/PointAnnotation.md +++ b/docs/PointAnnotation.md @@ -11,11 +11,11 @@ | selected | `boolean` | `none` | `false` | Manually selects/deselects annotation
@type {[type]} | | draggable | `boolean` | `false` | `false` | Enable or disable dragging. Defaults to false. | | coordinate | `Array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. | -| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
Note this is only for custom annotations not the default pin view.
Defaults to the center of the view. | +| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
Note this is only for custom annotations not the default pin view.
Defaults to the center of the view. | |   x | `number` | `none` | `true` | See anchor | |   y | `number` | `none` | `true` | See anchor | | children | `React.ReactElement \| [React.ReactElement, React.ReactElement]` | `none` | `true` | Expects one child, and an optional callout can be added as well | -| style | `ViewProps['style']` | `none` | `false` | FIX ME NO DESCRIPTION | +| style | `ViewProps["style"]` | `none` | `false` | FIX ME NO DESCRIPTION | ### methods #### refresh() diff --git a/docs/UserLocation.md b/docs/UserLocation.md index f02337fd4..4ebcfb4f4 100644 --- a/docs/UserLocation.md +++ b/docs/UserLocation.md @@ -6,8 +6,8 @@ | Prop | Type | Default | Required | Description | | ---- | :--: | :-----: | :------: | :----------: | | animated | `boolean` | `true` | `false` | Whether location icon is animated between updates | -| renderMode | `'normal' \| 'native'` | `'normal'` | `false` | Which render mode to use.
Can either be `normal` or `native` | -| androidRenderMode | `'normal' \| 'compass' \| 'gps'` | `none` | `false` | native/android only render mode

- normal: just a circle
- compass: triangle with heading
- gps: large arrow

@platform android | +| renderMode | `"normal" \| "native"` | `"normal"` | `false` | Which render mode to use.
Can either be `normal` or `native` | +| androidRenderMode | `"normal" \| "compass" \| "gps"` | `none` | `false` | native/android only render mode

- normal: just a circle
- compass: triangle with heading
- gps: large arrow

@platform android | | visible | `boolean` | `true` | `false` | Whether location icon is visible | | showsUserHeadingIndicator | `boolean` | `false` | `false` | Show or hide small arrow which indicates direction the device is pointing relative to north. | | minDisplacement | `number` | `0` | `false` | Minimum amount of movement before GPS location is updated in meters | diff --git a/docs/docs.json b/docs/docs.json index 114db3027..295604d38 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -477,8 +477,8 @@ { "name": "animationMode", "required": false, - "type": "'flyTo' \\| 'easeTo' \\| 'linearTo' \\| 'moveTo'", - "default": "'easeTo'", + "type": "\"flyTo\" \\| \"easeTo\" \\| \"linearTo\" \\| \"moveTo\"", + "default": "\"easeTo\"", "description": "The easing or path the camera uses to animate to a new configuration." }, { @@ -2415,7 +2415,7 @@ { "name": "style", "required": false, - "type": "ViewProps['style']", + "type": "ViewProps[\"style\"]", "default": "none", "description": "Style for wrapping React Native View" }, @@ -2485,7 +2485,7 @@ { "name": "attributionPosition", "required": false, - "type": "\\| {top?: number; left?: number}\n\\| {top?: number; right?: number}\n\\| {bottom?: number; left?: number}\n\\| {bottom?: number; right?: number}", + "type": "\\| { top?: number; left?: number }\n\\| { top?: number; right?: number }\n\\| { bottom?: number; left?: number }\n\\| { bottom?: number; right?: number }", "default": "none", "description": "Adds attribution offset, e.g. `{top: 8, left: 8}` will put attribution button in top-left corner of the map" }, @@ -2506,7 +2506,7 @@ { "name": "logoPosition", "required": false, - "type": "\\| {top?: number; left?: number}\n\\| {top?: number; right?: number}\n\\| {bottom?: number; left?: number}\n\\| {bottom?: number; right?: number}", + "type": "\\| { top?: number; left?: number }\n\\| { top?: number; right?: number }\n\\| { bottom?: number; left?: number }\n\\| { bottom?: number; right?: number }", "default": "none", "description": "Adds logo offset, e.g. `{top: 8, left: 8}` will put the logo in top-left corner of the map" }, @@ -2610,7 +2610,7 @@ } ] }, - "default": "{x: 0.5, y: 0.5}", + "default": "{ x: 0.5, y: 0.5 }", "description": "Specifies the anchor being set on a particular point of the annotation.\nThe anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],\nwhere (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.\nNote this is only for custom annotations not the default pin view.\nDefaults to the center of the view." }, { @@ -2649,7 +2649,7 @@ { "name": "androidRenderMode", "required": false, - "type": "'normal' \\| 'compass' \\| 'gps'", + "type": "\"normal\" \\| \"compass\" \\| \"gps\"", "default": "none", "description": "Android render mode.\n\n - normal: just a circle\n - compass: triangle with heading\n - gps: large arrow\n\n@platform android" }, @@ -2747,7 +2747,7 @@ } ] }, - "default": "{x: 0.5, y: 0.5}", + "default": "{ x: 0.5, y: 0.5 }", "description": "Specifies the anchor being set on a particular point of the annotation.\nThe anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],\nwhere (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.\nNote this is only for custom annotations not the default pin view.\nDefaults to the center of the view." }, { @@ -2760,7 +2760,7 @@ { "name": "style", "required": false, - "type": "ViewProps['style']", + "type": "ViewProps[\"style\"]", "default": "none", "description": "FIX ME NO DESCRIPTION" } @@ -4811,14 +4811,14 @@ { "name": "renderMode", "required": false, - "type": "'normal' \\| 'native'", - "default": "'normal'", + "type": "\"normal\" \\| \"native\"", + "default": "\"normal\"", "description": "Which render mode to use.\nCan either be `normal` or `native`" }, { "name": "androidRenderMode", "required": false, - "type": "'normal' \\| 'compass' \\| 'gps'", + "type": "\"normal\" \\| \"compass\" \\| \"gps\"", "default": "none", "description": "native/android only render mode\n\n - normal: just a circle\n - compass: triangle with heading\n - gps: large arrow\n\n@platform android" }, diff --git a/scripts/autogenerate.js b/scripts/autogenerate.js index 573309a31..3d5ba0296 100644 --- a/scripts/autogenerate.js +++ b/scripts/autogenerate.js @@ -8,7 +8,7 @@ const ejs = require('ejs'); const {execSync} = require('child_process'); const prettier = require('prettier'); -const prettierrc = require('../.prettierrc.js'); +const prettierrc = require('eslint-config-universe'); const styleSpecJSON = require('../style-spec/v8.json');