@maplibre/maplibre-react-native 10.0.0-alpha.21 → 10.0.0-alpha.23
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.
- package/.eslintrc.js +5 -0
- package/.git-blame-ignore-revs +3 -0
- package/CHANGELOG.md +21 -0
- package/CONTRIBUTING.md +20 -14
- package/README.md +12 -13
- package/android/install.md +3 -2
- package/app.plugin.js +1 -1
- package/babel.config.js +6 -3
- package/docs/Camera.md +1 -1
- package/docs/GettingStarted.md +3 -4
- package/docs/MapView.md +1 -1
- package/docs/ShapeSource.md +3 -3
- package/docs/docs.json +15 -15
- package/ios/RCTMLN.xcodeproj/project.pbxproj +1 -775
- package/ios/install.md +1 -1
- package/javascript/components/Camera.tsx +8 -8
- package/javascript/components/MapView.tsx +4 -6
- package/javascript/components/MarkerView.tsx +2 -2
- package/javascript/components/PointAnnotation.tsx +2 -2
- package/javascript/components/ShapeSource.tsx +29 -28
- package/javascript/components/Style.tsx +1 -1
- package/javascript/modules/offline/OfflineCreatePackOptions.ts +2 -9
- package/javascript/modules/snapshot/SnapshotOptions.ts +4 -5
- package/javascript/utils/StyleValue.ts +3 -1
- package/javascript/utils/makeNativeBounds.ts +5 -0
- package/jest-setup.ts +113 -0
- package/jest.config.js +8 -0
- package/maplibre-react-native.podspec +7 -7
- package/package.json +30 -73
- package/plugin/build/withMapLibre.js +16 -1
- package/plugin/install.md +1 -8
- package/react-native.config.js +1 -1
- package/scripts/.eslintrc.js +3 -0
- package/scripts/{autogenerate.js → generate-docs.js} +144 -137
- package/scripts/templates/MaplibreStyles.ts.ejs +5 -5
- package/scripts/templates/RCTMLNStyle.h.ejs +2 -2
- package/scripts/templates/RCTMLNStyle.m.ejs +6 -6
- package/scripts/templates/RCTMLNStyleFactory.java.ejs +8 -8
- package/scripts/{autogenHelpers → utils}/DocJSONBuilder.js +70 -70
- package/scripts/{autogenHelpers → utils}/JSDocNodeTree.js +33 -30
- package/scripts/utils/MarkdownBuilder.js +37 -0
- package/scripts/utils/template-globals.js +528 -0
- package/style-spec/v8.json +32 -1
- package/tsconfig.json +2 -2
- package/assets/mapbox_logo.png +0 -0
- package/javascript/utils/geoUtils.ts +0 -79
- package/scripts/autogenHelpers/MarkdownBuilder.js +0 -29
- package/scripts/autogenHelpers/globals.js +0 -508
- package/setup-jest.js +0 -108
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maplibre/maplibre-react-native",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "10.0.0-alpha.
|
|
3
|
+
"description": "React Native library for creating maps with MapLibre Native for Android & iOS",
|
|
4
|
+
"version": "10.0.0-alpha.23",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -21,20 +21,19 @@
|
|
|
21
21
|
"url": "https://github.com/maplibre/maplibre-react-native"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"generate
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"lint": "eslint .",
|
|
30
|
-
"lint:fix": "eslint . --fix",
|
|
31
|
-
"lint:
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"postpack": "pinst --enable"
|
|
37
|
-
"typescript:check": "tsc -p ./tsconfig.json --noEmit"
|
|
24
|
+
"generate": "yarn generate:fetch-style-spec && yarn generate:docs",
|
|
25
|
+
"generate:fetch-style-spec": "./scripts/download-style-spec.sh",
|
|
26
|
+
"generate:docs": "yarn node ./scripts/generate-docs",
|
|
27
|
+
"test": "jest",
|
|
28
|
+
"lint": "yarn lint:eslint && yarn lint:tsc",
|
|
29
|
+
"lint:eslint": "eslint .",
|
|
30
|
+
"lint:eslint:fix": "eslint . --fix",
|
|
31
|
+
"lint:tsc": "tsc --project . --noEmit && tsc --project ./packages/examples",
|
|
32
|
+
"plugin:build": "tsc --build plugin",
|
|
33
|
+
"plugin:lint": "eslint plugin/src/*",
|
|
34
|
+
"plugin:test": "jest plugin",
|
|
35
|
+
"prepack": "pinst --disable && yarn plugin:build",
|
|
36
|
+
"postpack": "pinst --enable"
|
|
38
37
|
},
|
|
39
38
|
"peerDependenciesMeta": {
|
|
40
39
|
"@expo/config-plugins": {
|
|
@@ -47,18 +46,15 @@
|
|
|
47
46
|
"react-native": ">=0.59.9"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
|
-
"@
|
|
51
|
-
"@turf/
|
|
52
|
-
"@turf/
|
|
53
|
-
"@turf/
|
|
54
|
-
"@turf/length": "6.5.0",
|
|
55
|
-
"@turf/nearest-point-on-line": "6.5.0",
|
|
49
|
+
"@turf/distance": "^7.1.0",
|
|
50
|
+
"@turf/helpers": "^7.1.0",
|
|
51
|
+
"@turf/length": "^7.1.0",
|
|
52
|
+
"@turf/nearest-point-on-line": "^7.1.0",
|
|
56
53
|
"@types/debounce": "^1.2.1",
|
|
57
|
-
"@types/geojson": "^7946.0.
|
|
54
|
+
"@types/geojson": "^7946.0.14",
|
|
58
55
|
"@types/jest": "^29.5.12",
|
|
59
|
-
"@types/mapbox__geo-viewport": "^0.4.1",
|
|
60
56
|
"@types/node": "^18.11.18",
|
|
61
|
-
"@types/react": "^18.2.
|
|
57
|
+
"@types/react": "^18.2.79",
|
|
62
58
|
"@types/react-native": "0.67.8",
|
|
63
59
|
"debounce": "^2.0.0"
|
|
64
60
|
},
|
|
@@ -68,78 +64,39 @@
|
|
|
68
64
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
69
65
|
"@babel/runtime": "7.17.2",
|
|
70
66
|
"@expo/config-plugins": "^7.2.5",
|
|
71
|
-
"@react-native/
|
|
72
|
-
"@react-native/
|
|
73
|
-
"@react-native/metro-config": "^0.72.7",
|
|
67
|
+
"@react-native/babel-preset": "^0.74.88",
|
|
68
|
+
"@react-native/metro-config": "^0.74.88",
|
|
74
69
|
"@sinonjs/fake-timers": "^11.2.2",
|
|
75
70
|
"@testing-library/react-native": "^12.4.3",
|
|
76
71
|
"@tsconfig/node14": "^14.1.0",
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
78
|
-
"@typescript-eslint/parser": "^7.
|
|
72
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
73
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
79
74
|
"babel-jest": "^29.6.0",
|
|
80
75
|
"documentation": "^14.0.0",
|
|
81
76
|
"ejs": "^3.1.3",
|
|
82
77
|
"ejs-lint": "^2.0.0",
|
|
83
|
-
"eslint": "^8.57.
|
|
84
|
-
"eslint-config-prettier": "^9.1.0",
|
|
78
|
+
"eslint": "^8.57.1",
|
|
85
79
|
"eslint-config-universe": "13.0.0",
|
|
86
|
-
"eslint-plugin-import": "^2.29.1",
|
|
87
|
-
"eslint-plugin-prettier": "^5.1.3",
|
|
88
80
|
"expo-module-scripts": "^3.1.0",
|
|
89
81
|
"husky": "^9.0.10",
|
|
90
82
|
"jest": "^29.7.0",
|
|
91
83
|
"jest-cli": "^29.7.0",
|
|
92
84
|
"lint-staged": "^15.2.2",
|
|
93
|
-
"metro-react-native-babel-preset": "^0.76.7",
|
|
94
85
|
"node-dir": "0.1.17",
|
|
95
86
|
"pinst": "^3.0.0",
|
|
96
|
-
"prettier": "
|
|
97
|
-
"react": "
|
|
87
|
+
"prettier": "3.3.3",
|
|
88
|
+
"react": "18.2.0",
|
|
98
89
|
"react-docgen": "rnmapbox/react-docgen#rnmapbox-dist",
|
|
99
|
-
"react-native": "0.
|
|
100
|
-
"react-test-renderer": "
|
|
90
|
+
"react-native": "^0.74.6",
|
|
91
|
+
"react-test-renderer": "18.2.0",
|
|
101
92
|
"typescript": "^5.3.3"
|
|
102
93
|
},
|
|
103
94
|
"resolutions": {
|
|
104
95
|
"typescript": "5.5.3"
|
|
105
96
|
},
|
|
106
|
-
"jest": {
|
|
107
|
-
"preset": "react-native",
|
|
108
|
-
"collectCoverageFrom": [
|
|
109
|
-
"javascript/**/*.js"
|
|
110
|
-
],
|
|
111
|
-
"setupFiles": [
|
|
112
|
-
"./setup-jest.js",
|
|
113
|
-
"./__tests__/__mocks__/react-native.mock.js"
|
|
114
|
-
],
|
|
115
|
-
"modulePathIgnorePatterns": [
|
|
116
|
-
"example",
|
|
117
|
-
"__tests__/__mocks__",
|
|
118
|
-
"fixtures"
|
|
119
|
-
]
|
|
120
|
-
},
|
|
121
97
|
"lint-staged": {
|
|
122
98
|
"*.{js,jsx,ts,tsx}": "yarn lint"
|
|
123
99
|
},
|
|
124
|
-
"eslintConfig": {
|
|
125
|
-
"root": true,
|
|
126
|
-
"extends": [
|
|
127
|
-
"prettier",
|
|
128
|
-
"universe/native"
|
|
129
|
-
],
|
|
130
|
-
"ignorePatterns": [
|
|
131
|
-
"node_modules/*",
|
|
132
|
-
"*.js",
|
|
133
|
-
"**/dist/*.js",
|
|
134
|
-
"/plugin/build"
|
|
135
|
-
],
|
|
136
|
-
"plugins": [
|
|
137
|
-
"prettier"
|
|
138
|
-
],
|
|
139
|
-
"rules": {
|
|
140
|
-
"prettier/prettier": "error"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
100
|
"packageManager": "yarn@4.1.0",
|
|
144
101
|
"workspaces": [
|
|
145
102
|
"apps/*",
|
|
@@ -120,6 +120,21 @@ const withoutSignatures = (config) => {
|
|
|
120
120
|
return config;
|
|
121
121
|
});
|
|
122
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Set the Debug Information Format to DWARF with dSYM File during EAS Build for Managed App
|
|
125
|
+
* https://github.com/expo/eas-cli/issues/968
|
|
126
|
+
* // Set artifactPath in eas.json
|
|
127
|
+
* "ios": {
|
|
128
|
+
* "artifactPath": "ios/build/*"
|
|
129
|
+
* }
|
|
130
|
+
*/
|
|
131
|
+
const withDwarfDsym = (config) => {
|
|
132
|
+
return (0, config_plugins_1.withXcodeProject)(config, async (config) => {
|
|
133
|
+
const xcodeProject = config.modResults;
|
|
134
|
+
xcodeProject.debugInformationFormat = "dwarf-with-dsym";
|
|
135
|
+
return config;
|
|
136
|
+
});
|
|
137
|
+
};
|
|
123
138
|
const withExcludedSimulatorArchitectures = (c) => {
|
|
124
139
|
return (0, config_plugins_1.withXcodeProject)(c, (config) => {
|
|
125
140
|
config.modResults = setExcludedArchitectures(config.modResults);
|
|
@@ -127,7 +142,7 @@ const withExcludedSimulatorArchitectures = (c) => {
|
|
|
127
142
|
});
|
|
128
143
|
};
|
|
129
144
|
const withMapLibre = (config) => {
|
|
130
|
-
config = withoutSignatures(withExcludedSimulatorArchitectures(config));
|
|
145
|
+
config = withoutSignatures(withDwarfDsym(withExcludedSimulatorArchitectures(config)));
|
|
131
146
|
return withCocoaPodsInstallerBlocks(config);
|
|
132
147
|
};
|
|
133
148
|
exports.default = (0, config_plugins_1.createRunOncePlugin)(withMapLibre, pkg.name, pkg.version);
|
package/plugin/install.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Expo
|
|
1
|
+
# Expo Installation
|
|
2
2
|
|
|
3
3
|
NOTE: This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).
|
|
4
4
|
|
|
@@ -23,10 +23,3 @@ Next, rebuild your app as described in the ["Adding custom native code"](https:/
|
|
|
23
23
|
## API
|
|
24
24
|
|
|
25
25
|
This plugin doesn't currently provide any additional properties for customization. The plugin simply generates the pre-install block in the `ios/Podfile` (the post-install block is not required for Expo support). No additional changes are done on Android.
|
|
26
|
-
|
|
27
|
-
## Manual Setup
|
|
28
|
-
|
|
29
|
-
For bare workflow projects, you can follow the manual setup guides:
|
|
30
|
-
|
|
31
|
-
- [iOS](/ios/install.md)
|
|
32
|
-
- [Android](/android/install.md)
|
package/react-native.config.js
CHANGED