@record-evolution/widget-mapbox 1.4.18 → 1.4.19

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/package.json CHANGED
@@ -1,69 +1,70 @@
1
1
  {
2
- "name": "@record-evolution/widget-mapbox",
3
- "description": "REWidget widget-mapbox",
4
- "license": "MIT",
5
- "author": "widget-mapbox",
6
- "version": "1.4.18",
7
- "type": "module",
8
- "main": "dist/widget-mapbox.js",
9
- "types": "dist/src/widget-mapbox.d.ts",
10
- "files": [
11
- "dist",
12
- "src"
13
- ],
14
- "scripts": {
15
- "analyze": "cem analyze --litelement",
16
- "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
17
- "build": "rollup -c rollup.config.js",
18
- "watch": "rollup -w -c rollup.config.js",
19
- "types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
20
- "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
21
- "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
22
- "release": "npm version patch --tag-version-prefix='' && git push && git push --tag"
23
- },
24
- "dependencies": {
25
- "@types/geojson": "^7946.0.12",
26
- "@types/mapbox-gl": "^2.7.18",
27
- "lit": "^3.0.2",
28
- "mapbox-gl": "^2.15.0",
29
- "tinycolor2": "^1.6.0"
30
- },
31
- "devDependencies": {
32
- "@babel/plugin-syntax-import-assertions": "^7.22.5",
33
- "@custom-elements-manifest/analyzer": "^0.9.0",
34
- "@open-wc/eslint-config": "^12.0.2",
35
- "@rollup/plugin-babel": "^6.0.4",
36
- "@rollup/plugin-commonjs": "^25.0.7",
37
- "@rollup/plugin-json": "^6.0.1",
38
- "@rollup/plugin-node-resolve": "^15.2.3",
39
- "@rollup/plugin-replace": "^5.0.5",
40
- "@rollup/plugin-typescript": "^11.1.5",
41
- "@types/tinycolor2": "^1.4.6",
42
- "@typescript-eslint/eslint-plugin": "^6.9.1",
43
- "@typescript-eslint/parser": "^6.9.1",
44
- "@web/dev-server": "^0.4.0",
45
- "concurrently": "^8.2.2",
46
- "eslint": "^8.53.0",
47
- "eslint-config-prettier": "^9.0.0",
48
- "husky": "^8.0.3",
49
- "json-schema-to-typescript": "^13.1.1",
50
- "lint-staged": "^15.0.2",
51
- "prettier": "^3.0.3",
52
- "rollup": "^3.21.0",
53
- "rollup-plugin-copy": "^3.5.0",
54
- "tslib": "^2.6.2",
55
- "typescript": "^5.2.2"
56
- },
57
- "repository": {
58
- "type": "git",
59
- "url": "git+https://github.com/RecordEvolution/widget-mapbox.git"
60
- },
61
- "keywords": [
62
- "widget",
63
- "mapbox"
64
- ],
65
- "bugs": {
66
- "url": "https://github.com/RecordEvolution/widget-mapbox/issues"
67
- },
68
- "homepage": "https://github.com/RecordEvolution/widget-mapbox#readme"
2
+ "name": "@record-evolution/widget-mapbox",
3
+ "description": "REWidget widget-mapbox",
4
+ "license": "MIT",
5
+ "author": "widget-mapbox",
6
+ "version": "1.4.19",
7
+ "type": "module",
8
+ "main": "dist/widget-mapbox.js",
9
+ "types": "dist/src/widget-mapbox.d.ts",
10
+ "files": [
11
+ "dist",
12
+ "src"
13
+ ],
14
+ "scripts": {
15
+ "analyze": "cem analyze --litelement",
16
+ "start": "tsc && concurrently -k -r \"tsc --watch --preserveWatchOutput\" \"wds\"",
17
+ "build": "rollup -c rollup.config.js",
18
+ "watch": "rollup -w -c rollup.config.js",
19
+ "types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
20
+ "lint": "eslint --ext .ts,.html . --ignore-path .gitignore && prettier \"**/*.ts\" --check --ignore-path .gitignore",
21
+ "format": "eslint --ext .ts,.html . --fix --ignore-path .gitignore && prettier \"**/*.ts\" --write --ignore-path .gitignore",
22
+ "release": "npm version patch --tag-version-prefix='' && git push && git push --tag",
23
+ "cors": "gcloud storage buckets update gs://reswarm-images --cors-file=src/cors-config.json"
24
+ },
25
+ "dependencies": {
26
+ "@types/geojson": "^7946.0.12",
27
+ "@types/mapbox-gl": "^2.7.18",
28
+ "lit": "^3.0.2",
29
+ "mapbox-gl": "^2.15.0",
30
+ "tinycolor2": "^1.6.0"
31
+ },
32
+ "devDependencies": {
33
+ "@babel/plugin-syntax-import-assertions": "^7.22.5",
34
+ "@custom-elements-manifest/analyzer": "^0.9.0",
35
+ "@open-wc/eslint-config": "^12.0.2",
36
+ "@rollup/plugin-babel": "^6.0.4",
37
+ "@rollup/plugin-commonjs": "^25.0.7",
38
+ "@rollup/plugin-json": "^6.0.1",
39
+ "@rollup/plugin-node-resolve": "^15.2.3",
40
+ "@rollup/plugin-replace": "^5.0.5",
41
+ "@rollup/plugin-typescript": "^11.1.5",
42
+ "@types/tinycolor2": "^1.4.6",
43
+ "@typescript-eslint/eslint-plugin": "^6.9.1",
44
+ "@typescript-eslint/parser": "^6.9.1",
45
+ "@web/dev-server": "^0.4.0",
46
+ "concurrently": "^8.2.2",
47
+ "eslint": "^8.53.0",
48
+ "eslint-config-prettier": "^9.0.0",
49
+ "husky": "^8.0.3",
50
+ "json-schema-to-typescript": "^13.1.1",
51
+ "lint-staged": "^15.0.2",
52
+ "prettier": "^3.0.3",
53
+ "rollup": "^3.21.0",
54
+ "rollup-plugin-copy": "^3.5.0",
55
+ "tslib": "^2.6.2",
56
+ "typescript": "^5.2.2"
57
+ },
58
+ "repository": {
59
+ "type": "git",
60
+ "url": "git+https://github.com/RecordEvolution/widget-mapbox.git"
61
+ },
62
+ "keywords": [
63
+ "widget",
64
+ "mapbox"
65
+ ],
66
+ "bugs": {
67
+ "url": "https://github.com/RecordEvolution/widget-mapbox/issues"
68
+ },
69
+ "homepage": "https://github.com/RecordEvolution/widget-mapbox#readme"
69
70
  }
@@ -0,0 +1,8 @@
1
+ [
2
+ {
3
+ "origin": ["*"],
4
+ "method": ["GET"],
5
+ "responseHeader": ["*"],
6
+ "maxAgeSeconds": 3600
7
+ }
8
+ ]
@@ -387,7 +387,9 @@ export class WidgetMapbox extends LitElement {
387
387
  if (['line', 'symbol'].includes(ds.type ?? '') && !this.imageList.includes(imageName)) {
388
388
  const img = new Image(24 * sz, 24 * sz) as HTMLImageElement
389
389
  img.onload = () => this.map.addImage(imageName, img, { sdf: true })
390
- img.src = `/icons/${_imageName}.svg`
390
+ img.crossOrigin = 'anonymous'
391
+ img.referrerPolicy = 'no-referrer'
392
+ img.src = `https://storage.googleapis.com/reswarm-images/${_imageName}.svg`
391
393
  this.imageList.push(imageName)
392
394
  }
393
395
  const fc = this.dataSources.get('input:' + ds.label)