@maplibre/maplibre-react-native 10.0.0-alpha.7 → 10.0.0-alpha.9

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 (151) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +1 -1
  3. package/android/build.gradle +1 -1
  4. package/android/rctmln/build.gradle +5 -5
  5. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerView.java +2 -2
  6. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/MarkerViewManager.java +6 -6
  7. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNMarkerView.java +5 -5
  8. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/annotation/RCTMLNPointAnnotation.java +9 -8
  9. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraStop.java +14 -12
  10. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateItem.java +10 -10
  11. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/CameraUpdateQueue.java +1 -1
  12. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCamera.java +26 -26
  13. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/camera/RCTMLNCameraManager.java +1 -1
  14. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/images/RCTMLNImages.java +12 -12
  15. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/LocationComponentManager.java +9 -9
  16. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocation.java +7 -7
  17. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/location/RCTMLNNativeUserLocationManager.java +1 -1
  18. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/LayerSourceInfo.java +9 -9
  19. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapView.java +2 -2
  20. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNAndroidTextureMapViewManager.java +2 -2
  21. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapView.java +43 -43
  22. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/mapview/RCTMLNMapViewManager.java +6 -6
  23. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyle.java +3 -3
  24. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFactory.java +14 -14
  25. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleFunctionParser.java +2 -2
  26. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/RCTMLNStyleValue.java +2 -2
  27. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTLayer.java +8 -8
  28. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNBackgroundLayer.java +1 -1
  29. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNCircleLayer.java +2 -2
  30. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillExtrusionLayer.java +2 -2
  31. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNFillLayer.java +2 -2
  32. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNHeatmapLayer.java +2 -2
  33. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNLineLayer.java +2 -2
  34. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNRasterLayer.java +1 -1
  35. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/layers/RCTMLNSymbolLayer.java +2 -2
  36. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/light/RCTMLNLight.java +6 -6
  37. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSource.java +3 -3
  38. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNImageSourceManager.java +1 -1
  39. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNRasterSource.java +3 -3
  40. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSource.java +9 -9
  41. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNShapeSourceManager.java +1 -1
  42. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNTileSource.java +2 -2
  43. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTMLNVectorSource.java +4 -4
  44. package/android/rctmln/src/main/java/com/maplibre/rctmln/components/styles/sources/RCTSource.java +7 -7
  45. package/android/rctmln/src/main/java/com/maplibre/rctmln/events/FeatureClickEvent.java +2 -2
  46. package/android/rctmln/src/main/java/com/maplibre/rctmln/events/MapClickEvent.java +1 -1
  47. package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationClickEvent.java +2 -2
  48. package/android/rctmln/src/main/java/com/maplibre/rctmln/events/PointAnnotationDragEvent.java +2 -2
  49. package/android/rctmln/src/main/java/com/maplibre/rctmln/location/LocationManager.java +6 -6
  50. package/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserLocation.java +1 -1
  51. package/android/rctmln/src/main/java/com/maplibre/rctmln/location/UserTrackingMode.java +3 -3
  52. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLocationModule.java +2 -2
  53. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNLogging.java +2 -2
  54. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNModule.java +8 -8
  55. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNOfflineModule.java +11 -11
  56. package/android/rctmln/src/main/java/com/maplibre/rctmln/modules/RCTMLNSnapshotModule.java +7 -7
  57. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ClusterPropertyEntry.java +1 -1
  58. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/DownloadMapImageTask.java +5 -5
  59. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/ExpressionParser.java +2 -2
  60. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoJSONUtils.java +13 -13
  61. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/GeoViewport.java +3 -3
  62. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SimpleEventCallback.java +2 -2
  63. package/android/rctmln/src/main/java/com/maplibre/rctmln/utils/SphericalMercator.java +1 -1
  64. package/docs/Camera.md +1 -1
  65. package/docs/MapView.md +9 -9
  66. package/docs/MarkerView.md +1 -1
  67. package/docs/NativeUserLocation.md +1 -1
  68. package/docs/PointAnnotation.md +2 -2
  69. package/docs/UserLocation.md +2 -2
  70. package/docs/docs.json +12 -12
  71. package/javascript/@types/assets.d.ts +1 -1
  72. package/javascript/MLNModule.ts +2 -2
  73. package/javascript/Maplibre.ts +37 -42
  74. package/javascript/components/BackgroundLayer.tsx +9 -9
  75. package/javascript/components/Callout.tsx +19 -19
  76. package/javascript/components/Camera.tsx +29 -29
  77. package/javascript/components/CircleLayer.tsx +9 -9
  78. package/javascript/components/FillExtrusionLayer.tsx +9 -9
  79. package/javascript/components/FillLayer.tsx +9 -9
  80. package/javascript/components/HeadingIndicator.tsx +7 -8
  81. package/javascript/components/HeatmapLayer.tsx +10 -10
  82. package/javascript/components/ImageSource.tsx +8 -8
  83. package/javascript/components/Images.tsx +19 -20
  84. package/javascript/components/Light.tsx +15 -15
  85. package/javascript/components/LineLayer.tsx +9 -9
  86. package/javascript/components/MapView.tsx +74 -70
  87. package/javascript/components/MarkerView.tsx +9 -10
  88. package/javascript/components/NativeUserLocation.tsx +4 -4
  89. package/javascript/components/PointAnnotation.tsx +17 -17
  90. package/javascript/components/RasterLayer.tsx +9 -9
  91. package/javascript/components/RasterSource.tsx +10 -10
  92. package/javascript/components/ShapeSource.tsx +63 -61
  93. package/javascript/components/Style.tsx +69 -59
  94. package/javascript/components/SymbolLayer.tsx +10 -10
  95. package/javascript/components/UserLocation.tsx +23 -23
  96. package/javascript/components/VectorSource.tsx +19 -19
  97. package/javascript/components/annotations/Annotation.tsx +16 -15
  98. package/javascript/hooks/useAbstractLayer.ts +15 -12
  99. package/javascript/hooks/useAbstractSource.ts +2 -2
  100. package/javascript/hooks/useNativeBridge.ts +7 -7
  101. package/javascript/hooks/useNativeRef.ts +2 -2
  102. package/javascript/hooks/useOnce.ts +1 -1
  103. package/javascript/index.ts +2 -2
  104. package/javascript/modules/location/locationManager.ts +4 -4
  105. package/javascript/modules/offline/OfflineCreatePackOptions.ts +5 -5
  106. package/javascript/modules/offline/OfflinePack.ts +3 -3
  107. package/javascript/modules/offline/offlineManager.ts +11 -12
  108. package/javascript/modules/snapshot/SnapshotOptions.ts +4 -4
  109. package/javascript/modules/snapshot/snapshotManager.ts +2 -2
  110. package/javascript/requestAndroidLocationPermissions.ts +3 -3
  111. package/javascript/types/OnPressEvent.ts +1 -1
  112. package/javascript/types/index.ts +6 -2
  113. package/javascript/utils/BridgeValue.ts +20 -20
  114. package/javascript/utils/Logger.ts +14 -14
  115. package/javascript/utils/MaplibreStyles.d.ts +359 -359
  116. package/javascript/utils/StyleValue.ts +12 -12
  117. package/javascript/utils/animated/AbstractAnimatedCoordinates.ts +6 -6
  118. package/javascript/utils/animated/Animated.ts +38 -16
  119. package/javascript/utils/animated/AnimatedCoordinatesArray.ts +7 -11
  120. package/javascript/utils/animated/AnimatedExtractCoordinateFromArray.ts +3 -3
  121. package/javascript/utils/animated/AnimatedPoint.ts +7 -7
  122. package/javascript/utils/animated/AnimatedRouteCoordinatesArray.ts +16 -20
  123. package/javascript/utils/animated/AnimatedShape.ts +15 -15
  124. package/javascript/utils/deprecation.ts +6 -3
  125. package/javascript/utils/filterUtils.ts +1 -1
  126. package/javascript/utils/geoUtils.ts +8 -8
  127. package/javascript/utils/index.ts +14 -14
  128. package/javascript/utils/styleMap.ts +18 -18
  129. package/package.json +28 -15
  130. package/plugin/build/withMapLibre.d.ts +2 -2
  131. package/plugin/build/withMapLibre.js +24 -24
  132. package/scripts/autogenerate.js +1 -1
  133. package/scripts/templates/RCTMLNStyleFactory.java.ejs +14 -14
  134. package/.eslintignore +0 -3
  135. package/.eslintrc.js +0 -169
  136. package/.prettierrc.js +0 -7
  137. package/.yarn/sdks/eslint/bin/eslint.js +0 -27
  138. package/.yarn/sdks/eslint/lib/api.js +0 -27
  139. package/.yarn/sdks/eslint/lib/unsupported-api.js +0 -27
  140. package/.yarn/sdks/eslint/package.json +0 -14
  141. package/.yarn/sdks/integrations.yml +0 -5
  142. package/.yarn/sdks/prettier/bin/prettier.cjs +0 -27
  143. package/.yarn/sdks/prettier/index.cjs +0 -27
  144. package/.yarn/sdks/prettier/package.json +0 -7
  145. package/.yarn/sdks/typescript/bin/tsc +0 -27
  146. package/.yarn/sdks/typescript/bin/tsserver +0 -27
  147. package/.yarn/sdks/typescript/lib/tsc.js +0 -27
  148. package/.yarn/sdks/typescript/lib/tsserver.js +0 -239
  149. package/.yarn/sdks/typescript/lib/tsserverlibrary.js +0 -239
  150. package/.yarn/sdks/typescript/lib/typescript.js +0 -27
  151. package/.yarn/sdks/typescript/package.json +0 -10
@@ -2,16 +2,16 @@
2
2
  // DO NOT MODIFY
3
3
  // THIS FILE IS AUTOGENERATED
4
4
 
5
- import {isAndroid} from './index';
5
+ import { isAndroid } from "./index";
6
6
 
7
7
  export const StyleTypes = {
8
- Constant: 'constant',
9
- Color: 'color',
10
- Transition: 'transition',
11
- Translation: 'translation',
12
- Function: 'function',
13
- Image: 'image',
14
- Enum: 'enum',
8
+ Constant: "constant",
9
+ Color: "color",
10
+ Transition: "transition",
11
+ Translation: "translation",
12
+ Function: "function",
13
+ Image: "image",
14
+ Enum: "enum",
15
15
  };
16
16
 
17
17
  export function getStyleType(styleProp: keyof typeof styleExtras): string {
@@ -226,38 +226,38 @@ const styleMap = {
226
226
  export const styleExtras = {
227
227
  // padding
228
228
  iconTextFitPadding: {
229
- iosType: 'edgeinsets',
229
+ iosType: "edgeinsets",
230
230
  },
231
231
 
232
232
  // offsets
233
233
  iconOffset: {
234
- iosType: 'vector',
234
+ iosType: "vector",
235
235
  },
236
236
  textOffset: {
237
- iosType: 'vector',
237
+ iosType: "vector",
238
238
  },
239
239
  lineOffset: {
240
- iosType: 'vector',
240
+ iosType: "vector",
241
241
  },
242
242
 
243
243
  // translates
244
244
  fillTranslate: {
245
- iosType: 'vector',
245
+ iosType: "vector",
246
246
  },
247
247
  lineTranslate: {
248
- iosType: 'vector',
248
+ iosType: "vector",
249
249
  },
250
250
  iconTranslate: {
251
- iosType: 'vector',
251
+ iosType: "vector",
252
252
  },
253
253
  textTranslate: {
254
- iosType: 'vector',
254
+ iosType: "vector",
255
255
  },
256
256
  circleTranslate: {
257
- iosType: 'vector',
257
+ iosType: "vector",
258
258
  },
259
259
  fillExtrusionTranslate: {
260
- iosType: 'vector',
260
+ iosType: "vector",
261
261
  },
262
262
  };
263
263
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maplibre/maplibre-react-native",
3
3
  "description": "A MapLibre GL Native plugin for creating maps in React Native",
4
- "version": "10.0.0-alpha.7",
4
+ "version": "10.0.0-alpha.9",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -33,7 +33,8 @@
33
33
  "test:plugin": "jest plugin",
34
34
  "build:plugin": "tsc --build plugin",
35
35
  "lint:plugin": "eslint plugin/src/*",
36
- "postpack": "pinst --enable"
36
+ "postpack": "pinst --enable",
37
+ "typescript:check": "tsc -p ./tsconfig.json --noEmit"
37
38
  },
38
39
  "peerDependenciesMeta": {
39
40
  "@expo/config-plugins": {
@@ -73,23 +74,17 @@
73
74
  "@types/mapbox__geo-viewport": "^0.4.1",
74
75
  "@types/node": "^18.11.18",
75
76
  "@types/react": "^18.2.15",
76
- "@typescript-eslint/eslint-plugin": "^7.1.0",
77
- "@typescript-eslint/parser": "^7.1.0",
77
+ "@typescript-eslint/eslint-plugin": "^7.16.0",
78
+ "@typescript-eslint/parser": "^7.16.0",
78
79
  "babel-jest": "^29.6.0",
79
80
  "documentation": "^14.0.0",
80
81
  "ejs": "^3.1.3",
81
82
  "ejs-lint": "^2.0.0",
82
- "eslint": "^8.56.0",
83
+ "eslint": "^8.57.0",
83
84
  "eslint-config-prettier": "^9.1.0",
84
- "eslint-plugin-eslint-comments": "^3.2.0",
85
- "eslint-plugin-fp": "^2.3.0",
86
- "eslint-plugin-ft-flow": "^3.0.3",
87
- "eslint-plugin-import": "2.29.1",
88
- "eslint-plugin-jest": "^27.6.3",
85
+ "eslint-config-universe": "13.0.0",
86
+ "eslint-plugin-import": "^2.29.1",
89
87
  "eslint-plugin-prettier": "^5.1.3",
90
- "eslint-plugin-react": "^7.33.2",
91
- "eslint-plugin-react-hooks": "^4.6.0",
92
- "eslint-plugin-react-native": "^4.1.0",
93
88
  "expo-module-scripts": "^3.1.0",
94
89
  "husky": "^9.0.10",
95
90
  "jest": "^29.7.0",
@@ -98,12 +93,11 @@
98
93
  "metro-react-native-babel-preset": "^0.76.7",
99
94
  "node-dir": "0.1.17",
100
95
  "pinst": "^3.0.0",
101
- "prettier": "^3.2.5",
96
+ "prettier": "^3.3.3",
102
97
  "react": "^18.2.0",
103
98
  "react-docgen": "rnmapbox/react-docgen#rnmapbox-dist",
104
99
  "react-native": "0.72.1",
105
100
  "react-test-renderer": "^18.2.0",
106
- "standard": "*",
107
101
  "typescript": "^5.3.3"
108
102
  },
109
103
  "jest": {
@@ -124,5 +118,24 @@
124
118
  "lint-staged": {
125
119
  "*.{js,jsx,ts,tsx}": "yarn lint"
126
120
  },
121
+ "eslintConfig": {
122
+ "root": true,
123
+ "extends": [
124
+ "prettier",
125
+ "universe/native"
126
+ ],
127
+ "ignorePatterns": [
128
+ "node_modules/*",
129
+ "*.js",
130
+ "**/dist/*.js",
131
+ "/plugin/build"
132
+ ],
133
+ "plugins": [
134
+ "prettier"
135
+ ],
136
+ "rules": {
137
+ "prettier/prettier": "error"
138
+ }
139
+ },
127
140
  "packageManager": "yarn@4.1.0"
128
141
  }
@@ -1,5 +1,5 @@
1
- import { ConfigPlugin, XcodeProject } from '@expo/config-plugins';
2
- type InstallerBlockName = 'pre' | 'post';
1
+ import { ConfigPlugin, XcodeProject } from "@expo/config-plugins";
2
+ type InstallerBlockName = "pre" | "post";
3
3
  export declare function applyCocoaPodsModifications(contents: string): string;
4
4
  export declare function addInstallerBlock(src: string, blockName: InstallerBlockName): string;
5
5
  export declare function addMapLibreInstallerBlock(src: string, blockName: InstallerBlockName): string;
@@ -4,15 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.setExcludedArchitectures = exports.addMapLibreInstallerBlock = exports.addInstallerBlock = exports.applyCocoaPodsModifications = void 0;
7
- const fs_1 = require("fs");
8
- const path_1 = __importDefault(require("path"));
9
7
  const config_plugins_1 = require("@expo/config-plugins");
10
8
  const generateCode_1 = require("@expo/config-plugins/build/utils/generateCode");
9
+ const fs_1 = require("fs");
10
+ const path_1 = __importDefault(require("path"));
11
11
  let pkg = {
12
- name: '@maplibre/maplibre-react-native',
12
+ name: "@maplibre/maplibre-react-native",
13
13
  };
14
14
  try {
15
- pkg = require('@maplibre/maplibre-react-native/package.json');
15
+ pkg = require("@maplibre/maplibre-react-native/package.json");
16
16
  }
17
17
  catch {
18
18
  // empty catch block
@@ -25,14 +25,14 @@ catch {
25
25
  * @param config
26
26
  * @returns
27
27
  */
28
- const withCocoaPodsInstallerBlocks = c => {
28
+ const withCocoaPodsInstallerBlocks = (c) => {
29
29
  return (0, config_plugins_1.withDangerousMod)(c, [
30
- 'ios',
30
+ "ios",
31
31
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
32
32
  async (config) => {
33
- const file = path_1.default.join(config.modRequest.platformProjectRoot, 'Podfile');
34
- const contents = await fs_1.promises.readFile(file, 'utf8');
35
- await fs_1.promises.writeFile(file, applyCocoaPodsModifications(contents), 'utf-8');
33
+ const file = path_1.default.join(config.modRequest.platformProjectRoot, "Podfile");
34
+ const contents = await fs_1.promises.readFile(file, "utf8");
35
+ await fs_1.promises.writeFile(file, applyCocoaPodsModifications(contents), "utf-8");
36
36
  return config;
37
37
  },
38
38
  ]);
@@ -42,19 +42,19 @@ const withCocoaPodsInstallerBlocks = c => {
42
42
  function applyCocoaPodsModifications(contents) {
43
43
  // Ensure installer blocks exist
44
44
  // let src = addInstallerBlock(contents, 'pre');
45
- let src = addInstallerBlock(contents, 'post');
45
+ let src = addInstallerBlock(contents, "post");
46
46
  // src = addMapLibreInstallerBlock(src, 'pre');
47
- src = addMapLibreInstallerBlock(src, 'post');
47
+ src = addMapLibreInstallerBlock(src, "post");
48
48
  return src;
49
49
  }
50
50
  exports.applyCocoaPodsModifications = applyCocoaPodsModifications;
51
51
  function addInstallerBlock(src, blockName) {
52
52
  const matchBlock = new RegExp(`${blockName}_install do \\|installer\\|`);
53
53
  const tag = `${blockName}_installer`;
54
- for (const line of src.split('\n')) {
54
+ for (const line of src.split("\n")) {
55
55
  const contents = line.trim();
56
56
  // Ignore comments
57
- if (!contents.startsWith('#')) {
57
+ if (!contents.startsWith("#")) {
58
58
  // Prevent adding the block if it exists outside of comments.
59
59
  if (contents.match(matchBlock)) {
60
60
  // This helps to still allow revisions, since we enabled the block previously.
@@ -69,11 +69,11 @@ function addInstallerBlock(src, blockName) {
69
69
  return (0, generateCode_1.mergeContents)({
70
70
  tag,
71
71
  src,
72
- newSrc: [` ${blockName}_install do |installer|`, ' end'].join('\n'),
72
+ newSrc: [` ${blockName}_install do |installer|`, " end"].join("\n"),
73
73
  anchor: /use_react_native/,
74
74
  // We can't go after the use_react_native block because it might have parameters, causing it to be multi-line (see react-native template).
75
75
  offset: 0,
76
- comment: '#',
76
+ comment: "#",
77
77
  }).contents;
78
78
  }
79
79
  exports.addInstallerBlock = addInstallerBlock;
@@ -84,7 +84,7 @@ function addMapLibreInstallerBlock(src, blockName) {
84
84
  newSrc: ` $RCTMLN.${blockName}_install(installer)`,
85
85
  anchor: new RegExp(`${blockName}_install do \\|installer\\|`),
86
86
  offset: 1,
87
- comment: '#',
87
+ comment: "#",
88
88
  }).contents;
89
89
  }
90
90
  exports.addMapLibreInstallerBlock = addMapLibreInstallerBlock;
@@ -99,35 +99,35 @@ function setExcludedArchitectures(project) {
99
99
  for (const { name, buildSettings } of Object.values(configurations || {})) {
100
100
  // Guessing that this is the best way to emulate Xcode.
101
101
  // Using `project.addToBuildSettings` modifies too many targets.
102
- if (name === 'Release' &&
103
- typeof buildSettings?.PRODUCT_NAME !== 'undefined') {
102
+ if (name === "Release" &&
103
+ typeof buildSettings?.PRODUCT_NAME !== "undefined") {
104
104
  buildSettings['"EXCLUDED_ARCHS[sdk=iphonesimulator*]"'] = '"arm64"';
105
105
  }
106
106
  }
107
107
  return project;
108
108
  }
109
109
  exports.setExcludedArchitectures = setExcludedArchitectures;
110
- const withoutSignatures = config => {
110
+ const withoutSignatures = (config) => {
111
111
  const shellScript = `if [ "$XCODE_VERSION_MAJOR" = "1500" ]; then
112
112
  echo "Remove signature files (Xcode 15 workaround)";
113
113
  rm -rf "$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature";
114
114
  fi`;
115
115
  return (0, config_plugins_1.withXcodeProject)(config, async (config) => {
116
116
  const xcodeProject = config.modResults;
117
- xcodeProject.addBuildPhase([], 'PBXShellScriptBuildPhase', 'Remove signature files (Xcode 15 workaround)', null, {
118
- shellPath: '/bin/sh',
117
+ xcodeProject.addBuildPhase([], "PBXShellScriptBuildPhase", "Remove signature files (Xcode 15 workaround)", null, {
118
+ shellPath: "/bin/sh",
119
119
  shellScript,
120
120
  });
121
121
  return config;
122
122
  });
123
123
  };
124
- const withExcludedSimulatorArchitectures = c => {
125
- return (0, config_plugins_1.withXcodeProject)(c, config => {
124
+ const withExcludedSimulatorArchitectures = (c) => {
125
+ return (0, config_plugins_1.withXcodeProject)(c, (config) => {
126
126
  config.modResults = setExcludedArchitectures(config.modResults);
127
127
  return config;
128
128
  });
129
129
  };
130
- const withMapLibre = config => {
130
+ const withMapLibre = (config) => {
131
131
  config = withoutSignatures(withExcludedSimulatorArchitectures(config));
132
132
  return withCocoaPodsInstallerBlocks(config);
133
133
  };
@@ -8,7 +8,7 @@ const ejs = require('ejs');
8
8
  const {execSync} = require('child_process');
9
9
 
10
10
  const prettier = require('prettier');
11
- const prettierrc = require('../.prettierrc.js');
11
+ const prettierrc = require('eslint-config-universe');
12
12
 
13
13
  const styleSpecJSON = require('../style-spec/v8.json');
14
14
 
@@ -6,20 +6,20 @@
6
6
 
7
7
  package com.maplibre.rctmln.components.styles;
8
8
 
9
- import com.mapbox.mapboxsdk.style.layers.BackgroundLayer;
10
- import com.mapbox.mapboxsdk.style.layers.CircleLayer;
11
- import com.mapbox.mapboxsdk.style.layers.FillExtrusionLayer;
12
- import com.mapbox.mapboxsdk.style.layers.FillLayer;
13
- import com.mapbox.mapboxsdk.style.layers.LineLayer;
14
- import com.mapbox.mapboxsdk.style.layers.PropertyFactory;
15
- import com.mapbox.mapboxsdk.style.layers.PropertyValue;
16
- import com.mapbox.mapboxsdk.style.layers.RasterLayer;
17
- import com.mapbox.mapboxsdk.style.layers.SymbolLayer;
18
- import com.mapbox.mapboxsdk.style.layers.HeatmapLayer;
19
- import com.mapbox.mapboxsdk.style.layers.HillshadeLayer;
20
- import com.mapbox.mapboxsdk.style.layers.TransitionOptions;
21
- import com.mapbox.mapboxsdk.style.light.Light;
22
- import com.mapbox.mapboxsdk.style.light.Position;
9
+ import org.maplibre.android.style.layers.BackgroundLayer;
10
+ import org.maplibre.android.style.layers.CircleLayer;
11
+ import org.maplibre.android.style.layers.FillExtrusionLayer;
12
+ import org.maplibre.android.style.layers.FillLayer;
13
+ import org.maplibre.android.style.layers.LineLayer;
14
+ import org.maplibre.android.style.layers.PropertyFactory;
15
+ import org.maplibre.android.style.layers.PropertyValue;
16
+ import org.maplibre.android.style.layers.RasterLayer;
17
+ import org.maplibre.android.style.layers.SymbolLayer;
18
+ import org.maplibre.android.style.layers.HeatmapLayer;
19
+ import org.maplibre.android.style.layers.HillshadeLayer;
20
+ import org.maplibre.android.style.layers.TransitionOptions;
21
+ import org.maplibre.android.style.light.Light;
22
+ import org.maplibre.android.style.light.Position;
23
23
  import com.maplibre.rctmln.utils.DownloadMapImageTask;
24
24
 
25
25
  import java.util.List;
package/.eslintignore DELETED
@@ -1,3 +0,0 @@
1
- index.d.ts
2
- scripts/
3
- /plugin/build
package/.eslintrc.js DELETED
@@ -1,169 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- parser: '@babel/eslint-parser',
4
- plugins: ['react', 'react-native', 'fp', 'import', 'prettier', 'jest'],
5
- env: {
6
- jest: true,
7
- },
8
- settings: {
9
- react: {
10
- version: require('./package.json').dependencies.react,
11
- pragma: 'React',
12
- },
13
- 'import/resolver': {
14
- node: {
15
- extensions: ['.js', '.jsx'],
16
- },
17
- },
18
- 'import/ignore': ['react-native'],
19
- parserOptions: {
20
- ecmaFeatures: {
21
- jsx: true,
22
- modules: true,
23
- },
24
- },
25
- },
26
- globals: {
27
- fetch: true,
28
- FormData: true,
29
- GeoJSON: true,
30
- requestAnimationFrame: true,
31
- cancelAnimationFrame: true,
32
- WebSocket: true,
33
- __DEV__: true,
34
- window: true,
35
- document: true,
36
- navigator: true,
37
- XMLSerializer: true,
38
- },
39
- extends: [
40
- 'eslint:recommended',
41
- 'plugin:react/recommended',
42
- 'plugin:jest/recommended',
43
- 'prettier',
44
- '@react-native',
45
- ],
46
- rules: {
47
- 'react/no-deprecated': 'warn',
48
- 'react/no-string-refs': 'warn',
49
- 'import/named': [2],
50
- 'import/no-named-default': [0],
51
- 'import/order': [
52
- 'error',
53
- {
54
- groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
55
- 'newlines-between': 'always',
56
- },
57
- ],
58
- 'import/exports-last': [0],
59
- 'import/no-useless-path-segments': [2],
60
- camelcase: [0],
61
- 'no-console': [0],
62
- 'import/prefer-default-export': 'off',
63
- 'jsx-a11y/href-no-hash': 'off',
64
- 'react/prop-types': [2],
65
- quotes: [2, 'single'],
66
- 'eol-last': [0],
67
- 'no-continue': [1],
68
- 'class-methods-use-this': [0],
69
- 'no-bitwise': [1],
70
- 'prefer-destructuring': [1],
71
- 'consistent-return': [0],
72
- 'no-warning-comments': [1],
73
- 'no-mixed-requires': [0],
74
- 'no-return-assign': 0,
75
- 'no-underscore-dangle': [0],
76
- 'no-await-in-loop': 0,
77
- 'no-restricted-syntax': 0,
78
- 'no-use-before-define': ['error', {functions: false}],
79
- 'no-unused-expressions': ['error', {allowTaggedTemplates: true}],
80
- 'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
81
- 'prettier/prettier': [
82
- 'error',
83
- {
84
- singleQuote: true,
85
- trailingComma: 'all',
86
- bracketSpacing: false,
87
- },
88
- ],
89
- 'fp/no-mutating-methods': 'warn',
90
- },
91
- overrides: [
92
- // Match TypeScript Files
93
- // =================================
94
- {
95
- files: ['**/*.{ts,tsx}'],
96
-
97
- // Global ESLint Settings
98
- // =================================
99
- env: {
100
- jest: true,
101
- es6: true,
102
- browser: true,
103
- node: true,
104
- },
105
- globals: {
106
- __DEV__: true,
107
- element: true,
108
- by: true,
109
- waitFor: true, // detox e2e
110
- },
111
- settings: {
112
- 'import/resolver': {
113
- node: {
114
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
115
- },
116
- },
117
- react: {
118
- version: 'detect', // React version. "detect" automatically picks the version you have installed.
119
- // You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
120
- // default to latest and warns if missing
121
- // It will default to "detect" in the future
122
- },
123
- },
124
-
125
- // Parser Settings
126
- parser: '@typescript-eslint/parser',
127
- parserOptions: {
128
- project: [
129
- './tsconfig.json',
130
- './example/tsconfig.json',
131
- './plugin/src/__tests__/tsconfig.eslint.json',
132
- ],
133
- // Lint with Type Information
134
- // https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/TYPED_LINTING.md
135
- tsconfigRootDir: __dirname,
136
- ecmaFeatures: {
137
- experimentalObjectRestSpread: true,
138
- jsx: true,
139
- },
140
- sourceType: 'module',
141
- },
142
-
143
- // Extend Other Configs
144
- // =================================
145
- extends: [
146
- 'plugin:@typescript-eslint/recommended',
147
- '@react-native',
148
- 'eslint:recommended',
149
- 'plugin:react/recommended',
150
- 'prettier',
151
- ],
152
- plugins: ['react', 'react-hooks', '@typescript-eslint', 'prettier'],
153
- rules: {
154
- // turn these one to check where all the return types are missing
155
- // and where arguments of functions are not typed
156
- '@typescript-eslint/explicit-function-return-type': ['error'],
157
- '@typescript-eslint/explicit-module-boundary-types': ['error'],
158
- '@typescript-eslint/no-unused-vars': ['error'],
159
- '@typescript-eslint/no-explicit-any': 'off',
160
- 'no-unused-vars': 'off',
161
- 'no-use-before-define': 'off',
162
- '@typescript-eslint/no-use-before-define': 'off',
163
- 'react/prop-types': 'off',
164
- 'react-hooks/rules-of-hooks': 'error',
165
- 'react-hooks/exhaustive-deps': 'warn',
166
- },
167
- },
168
- ],
169
- };
package/.prettierrc.js DELETED
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- bracketSpacing: false,
3
- jsxBracketSameLine: true,
4
- singleQuote: true,
5
- trailingComma: 'all',
6
- arrowParens: 'avoid',
7
- };
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {existsSync} = require(`fs`);
4
- const {createRequire, register} = require(`module`);
5
- const {resolve} = require(`path`);
6
- const {pathToFileURL} = require(`url`);
7
-
8
- const relPnpApiPath = "../../../../.pnp.cjs";
9
-
10
- const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11
- const absRequire = createRequire(absPnpApiPath);
12
-
13
- const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14
- const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15
-
16
- if (existsSync(absPnpApiPath)) {
17
- if (!process.versions.pnp) {
18
- // Setup the environment to be able to require eslint/bin/eslint.js
19
- require(absPnpApiPath).setup();
20
- if (isPnpLoaderEnabled && register) {
21
- register(pathToFileURL(absPnpLoaderPath));
22
- }
23
- }
24
- }
25
-
26
- // Defer to the real eslint/bin/eslint.js your application uses
27
- module.exports = absRequire(`eslint/bin/eslint.js`);
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {existsSync} = require(`fs`);
4
- const {createRequire, register} = require(`module`);
5
- const {resolve} = require(`path`);
6
- const {pathToFileURL} = require(`url`);
7
-
8
- const relPnpApiPath = "../../../../.pnp.cjs";
9
-
10
- const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11
- const absRequire = createRequire(absPnpApiPath);
12
-
13
- const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14
- const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15
-
16
- if (existsSync(absPnpApiPath)) {
17
- if (!process.versions.pnp) {
18
- // Setup the environment to be able to require eslint
19
- require(absPnpApiPath).setup();
20
- if (isPnpLoaderEnabled && register) {
21
- register(pathToFileURL(absPnpLoaderPath));
22
- }
23
- }
24
- }
25
-
26
- // Defer to the real eslint your application uses
27
- module.exports = absRequire(`eslint`);
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {existsSync} = require(`fs`);
4
- const {createRequire, register} = require(`module`);
5
- const {resolve} = require(`path`);
6
- const {pathToFileURL} = require(`url`);
7
-
8
- const relPnpApiPath = "../../../../.pnp.cjs";
9
-
10
- const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11
- const absRequire = createRequire(absPnpApiPath);
12
-
13
- const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14
- const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15
-
16
- if (existsSync(absPnpApiPath)) {
17
- if (!process.versions.pnp) {
18
- // Setup the environment to be able to require eslint/use-at-your-own-risk
19
- require(absPnpApiPath).setup();
20
- if (isPnpLoaderEnabled && register) {
21
- register(pathToFileURL(absPnpLoaderPath));
22
- }
23
- }
24
- }
25
-
26
- // Defer to the real eslint/use-at-your-own-risk your application uses
27
- module.exports = absRequire(`eslint/use-at-your-own-risk`);
@@ -1,14 +0,0 @@
1
- {
2
- "name": "eslint",
3
- "version": "8.56.0-sdk",
4
- "main": "./lib/api.js",
5
- "type": "commonjs",
6
- "bin": {
7
- "eslint": "./bin/eslint.js"
8
- },
9
- "exports": {
10
- "./package.json": "./package.json",
11
- ".": "./lib/api.js",
12
- "./use-at-your-own-risk": "./lib/unsupported-api.js"
13
- }
14
- }
@@ -1,5 +0,0 @@
1
- # This file is automatically generated by @yarnpkg/sdks.
2
- # Manual changes might be lost!
3
-
4
- integrations:
5
- - vscode
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const {existsSync} = require(`fs`);
4
- const {createRequire, register} = require(`module`);
5
- const {resolve} = require(`path`);
6
- const {pathToFileURL} = require(`url`);
7
-
8
- const relPnpApiPath = "../../../../.pnp.cjs";
9
-
10
- const absPnpApiPath = resolve(__dirname, relPnpApiPath);
11
- const absRequire = createRequire(absPnpApiPath);
12
-
13
- const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
14
- const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);
15
-
16
- if (existsSync(absPnpApiPath)) {
17
- if (!process.versions.pnp) {
18
- // Setup the environment to be able to require prettier/bin/prettier.cjs
19
- require(absPnpApiPath).setup();
20
- if (isPnpLoaderEnabled && register) {
21
- register(pathToFileURL(absPnpLoaderPath));
22
- }
23
- }
24
- }
25
-
26
- // Defer to the real prettier/bin/prettier.cjs your application uses
27
- module.exports = absRequire(`prettier/bin/prettier.cjs`);