terra-draw 0.0.1-alpha.17 → 0.0.1-alpha.18
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/CHANGELOG.md +13 -0
- package/dist/adapters/common/adapter-listener.d.ts +1 -1
- package/dist/adapters/openlayers.adapter.d.ts +7 -7
- package/dist/geometry/shape/great-circle-line.d.ts +1 -1
- package/dist/modes/linestring/linestring.mode.d.ts +1 -0
- package/dist/modes/polygon/polygon.mode.d.ts +1 -1
- package/dist/terra-draw.cjs +1 -1
- package/dist/terra-draw.cjs.map +1 -1
- package/dist/terra-draw.d.ts +1 -1
- package/dist/terra-draw.modern.js +1 -1
- package/dist/terra-draw.modern.js.map +1 -1
- package/dist/terra-draw.module.js +1 -1
- package/dist/terra-draw.module.js.map +1 -1
- package/dist/terra-draw.umd.js +1 -1
- package/dist/terra-draw.umd.js.map +1 -1
- package/jest.config.ts +22 -25
- package/package.json +150 -155
- package/tsconfig.json +22 -28
package/jest.config.ts
CHANGED
|
@@ -1,30 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
let options = {}
|
|
1
|
+
let options = {};
|
|
3
2
|
|
|
4
3
|
if (process.env.NO_CHECK) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
4
|
+
options = {
|
|
5
|
+
transform: {
|
|
6
|
+
"^.+\\.(t|j)sx?$": "@swc/jest",
|
|
7
|
+
},
|
|
8
|
+
coveragePathIgnorePatterns: ["<rootDir>/src/test/"],
|
|
9
|
+
setupFilesAfterEnv: ["<rootDir>/src/test/jest.matchers.ts"],
|
|
10
|
+
};
|
|
13
11
|
} else {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
12
|
+
options = {
|
|
13
|
+
preset: "ts-jest",
|
|
14
|
+
testEnvironment: "node",
|
|
15
|
+
coveragePathIgnorePatterns: ["<rootDir>/src/test/"],
|
|
16
|
+
setupFilesAfterEnv: ["<rootDir>/src/test/jest.matchers.ts"],
|
|
17
|
+
collectCoverage: true,
|
|
18
|
+
collectCoverageFrom: ["./src/**"],
|
|
19
|
+
coverageThreshold: {
|
|
20
|
+
global: {
|
|
21
|
+
lines: 65,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
module.exports = options
|
|
27
|
+
module.exports = options;
|
package/package.json
CHANGED
|
@@ -1,157 +1,152 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
"type": "revert",
|
|
153
|
-
"section": "Reverts"
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
}
|
|
2
|
+
"name": "terra-draw",
|
|
3
|
+
"version": "0.0.1-alpha.18",
|
|
4
|
+
"description": "Frictionless map drawing across mapping provider",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"docs": "typedoc",
|
|
7
|
+
"docs:serve": "serve ./docs",
|
|
8
|
+
"release": "standard-version",
|
|
9
|
+
"build": "microbundle",
|
|
10
|
+
"watch": "microbundle --watch --format modern",
|
|
11
|
+
"test": "jest --config jest.config.ts",
|
|
12
|
+
"test:coverage": "jest --config jest.config.ts --coverage",
|
|
13
|
+
"test:nocheck": "NO_CHECK=true jest --config jest.config.ts",
|
|
14
|
+
"test:nocheck:coverage": "NO_CHECK=true jest --config jest.config.ts --coverage",
|
|
15
|
+
"lint": "eslint --ext .ts src/",
|
|
16
|
+
"lint:quiet": "eslint --ext .ts --quiet src/",
|
|
17
|
+
"lint:fix": "eslint --fix --ext .ts src/",
|
|
18
|
+
"lint:fix:quiet": "eslint --fix --quiet --ext .ts src/",
|
|
19
|
+
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",
|
|
20
|
+
"format:quiet": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\" --loglevel=silent",
|
|
21
|
+
"prepare": "husky install"
|
|
22
|
+
},
|
|
23
|
+
"type": "module",
|
|
24
|
+
"source": "src/terra-draw.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
"types": "./dist/terra-draw.d.ts",
|
|
27
|
+
"require": "./dist/terra-draw.cjs",
|
|
28
|
+
"default": "./dist/terra-draw.modern.js"
|
|
29
|
+
},
|
|
30
|
+
"types": "./dist/terra-draw.d.ts",
|
|
31
|
+
"main": "./dist/terra-draw.cjs",
|
|
32
|
+
"module": "./dist/terra-draw.module.js",
|
|
33
|
+
"unpkg": "./dist/terra-draw.umd.js",
|
|
34
|
+
"author": "James Milner",
|
|
35
|
+
"license": "MIT",
|
|
36
|
+
"repository": "JamesLMilner/terra-draw",
|
|
37
|
+
"keywords": [
|
|
38
|
+
"map",
|
|
39
|
+
"drawing",
|
|
40
|
+
"draw",
|
|
41
|
+
"map drawing",
|
|
42
|
+
"geometry",
|
|
43
|
+
"leaflet",
|
|
44
|
+
"leafletjs",
|
|
45
|
+
"mapbox",
|
|
46
|
+
"mapboxgl",
|
|
47
|
+
"google maps",
|
|
48
|
+
"openlayers",
|
|
49
|
+
"maplibre"
|
|
50
|
+
],
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@commitlint/cli": "^17.1.2",
|
|
53
|
+
"@commitlint/config-conventional": "^17.1.0",
|
|
54
|
+
"@googlemaps/js-api-loader": "^1.14.3",
|
|
55
|
+
"@swc/jest": "^0.2.24",
|
|
56
|
+
"@types/geojson": "^7946.0.8",
|
|
57
|
+
"@types/google.maps": "^3.49.2",
|
|
58
|
+
"@types/jest": "^28.1.5",
|
|
59
|
+
"@types/leaflet": "^1.7.11",
|
|
60
|
+
"@types/mapbox-gl": "^2.7.3",
|
|
61
|
+
"@types/rbush": "^3.0.0",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^5.48.0",
|
|
63
|
+
"@typescript-eslint/parser": "^5.48.0",
|
|
64
|
+
"eslint": "^8.24.0",
|
|
65
|
+
"eslint-config-prettier": "^8.5.0",
|
|
66
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
67
|
+
"husky": "^7.0.0",
|
|
68
|
+
"jest": "^29.3.1",
|
|
69
|
+
"leaflet": "^1.8.0",
|
|
70
|
+
"mapbox-gl": "^2.9.1",
|
|
71
|
+
"maplibre-gl": "^2.4.0",
|
|
72
|
+
"microbundle": "^0.15.0",
|
|
73
|
+
"ol": "^7.1.0",
|
|
74
|
+
"serve": "^14.1.2",
|
|
75
|
+
"standard-version": "^9.5.0",
|
|
76
|
+
"ts-jest": "^29.0.3",
|
|
77
|
+
"ts-loader": "^9.4.2",
|
|
78
|
+
"typedoc": "^0.23.21",
|
|
79
|
+
"typescript": "^4.9.4"
|
|
80
|
+
},
|
|
81
|
+
"commitlint": {
|
|
82
|
+
"extends": [
|
|
83
|
+
"@commitlint/config-conventional"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
"eslintConfig": {
|
|
87
|
+
"parser": "@typescript-eslint/parser",
|
|
88
|
+
"plugins": [
|
|
89
|
+
"@typescript-eslint"
|
|
90
|
+
],
|
|
91
|
+
"rules": {
|
|
92
|
+
"@typescript-eslint/no-empty-function": "warn"
|
|
93
|
+
},
|
|
94
|
+
"extends": [
|
|
95
|
+
"plugin:@typescript-eslint/recommended",
|
|
96
|
+
"prettier"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"prettier": {
|
|
100
|
+
"printWidth": 80,
|
|
101
|
+
"semi": true,
|
|
102
|
+
"useTabs": true
|
|
103
|
+
},
|
|
104
|
+
"standard-version": {
|
|
105
|
+
"types": [
|
|
106
|
+
{
|
|
107
|
+
"type": "feat",
|
|
108
|
+
"section": "Features"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "fix",
|
|
112
|
+
"section": "Bug Fixes"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "docs",
|
|
116
|
+
"section": "Documentation"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "style",
|
|
120
|
+
"section": "Styling"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "refactor",
|
|
124
|
+
"section": "Refactors"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "perf",
|
|
128
|
+
"section": "Performance"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "test",
|
|
132
|
+
"section": "Tests"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"type": "build",
|
|
136
|
+
"section": "Build System"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "ci",
|
|
140
|
+
"section": "CI"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "chore",
|
|
144
|
+
"section": "Chore"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "revert",
|
|
148
|
+
"section": "Reverts"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
157
152
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"skipErrorChecking": true
|
|
25
|
-
// "compilerOptions": {
|
|
26
|
-
// "skipLibCheck": true
|
|
27
|
-
// }
|
|
28
|
-
}
|
|
29
|
-
}
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./dist/",
|
|
4
|
+
"strict": true,
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"module": "es6",
|
|
7
|
+
"target": "es6",
|
|
8
|
+
"jsx": "react",
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"allowSyntheticDefaultImports": true
|
|
13
|
+
},
|
|
14
|
+
"typedocOptions": {
|
|
15
|
+
"entryPoints": ["src/terra-draw.ts"],
|
|
16
|
+
"exclude": ["src/geometry/**/*.ts", "src/test/**/*.ts", "src/util/**/*.ts"],
|
|
17
|
+
"out": "docs",
|
|
18
|
+
"skipErrorChecking": true
|
|
19
|
+
// "compilerOptions": {
|
|
20
|
+
// "skipLibCheck": true
|
|
21
|
+
// }
|
|
22
|
+
}
|
|
23
|
+
}
|