@arenarium/maps 1.0.15 → 1.0.17
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/README.md +17 -20
- package/package.json +73 -73
package/README.md
CHANGED
|
@@ -1,48 +1,45 @@
|
|
|
1
|
-
# Arenarium Maps
|
|
2
|
-
|
|
3
|
-
## Installation
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
npm install @arenarium/maps
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
```script
|
|
10
|
-
<script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
|
|
11
|
-
<link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet"/>
|
|
12
|
-
```
|
|
13
|
-
|
|
14
1
|
## Usage
|
|
15
2
|
|
|
16
|
-
|
|
3
|
+
#### Web
|
|
4
|
+
|
|
5
|
+
```html
|
|
17
6
|
<html lang="en">
|
|
18
7
|
<head>
|
|
19
8
|
<script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
|
|
20
|
-
<link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet"/>
|
|
9
|
+
<link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet" />
|
|
21
10
|
</head>
|
|
22
11
|
<body>
|
|
23
12
|
<div id="map"></div>
|
|
24
13
|
<script>
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
const map = arenarium.mountMap({
|
|
15
|
+
// Id of the HTML element that contains the map,
|
|
16
|
+
container: 'map'
|
|
17
|
+
// The initial position and zoomof the map
|
|
27
18
|
position: {
|
|
28
19
|
center: { lat: 51.505, lng: -0.09 },
|
|
29
20
|
zoom: 13
|
|
30
21
|
},
|
|
22
|
+
// The initial theme of the map
|
|
31
23
|
theme: 'light'
|
|
32
24
|
});
|
|
33
|
-
|
|
25
|
+
</script>
|
|
34
26
|
</body>
|
|
35
27
|
</html>
|
|
36
28
|
```
|
|
37
29
|
|
|
30
|
+
#### Module
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install @arenarium/maps
|
|
34
|
+
```
|
|
35
|
+
|
|
38
36
|
```svelte
|
|
39
37
|
<script lang="ts">
|
|
40
38
|
import { onMount } from 'svelte';
|
|
41
|
-
|
|
42
39
|
import { mountMap } from '$lib/index.js';
|
|
43
40
|
|
|
44
41
|
onMount(() => {
|
|
45
|
-
mountMap({
|
|
42
|
+
const map = mountMap({
|
|
46
43
|
container: 'map',
|
|
47
44
|
position: {
|
|
48
45
|
center: { lat: 51.505, lng: -0.09 },
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
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
|
-
}
|
|
2
|
+
"name": "@arenarium/maps",
|
|
3
|
+
"version": "1.0.17",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"arenarium",
|
|
6
|
+
"maps",
|
|
7
|
+
"svelte"
|
|
8
|
+
],
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"!dist/**/*.test.*",
|
|
12
|
+
"!dist/**/*.spec.*"
|
|
13
|
+
],
|
|
14
|
+
"sideEffects": [
|
|
15
|
+
"**/*.css"
|
|
16
|
+
],
|
|
17
|
+
"svelte": "./dist/index.js",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"type": "module",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"svelte": "./dist/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./dist/style.css": {
|
|
26
|
+
"import": "./dist/style.css",
|
|
27
|
+
"require": "./dist/style.css"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"svelte": "^5.0.0"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@eslint/compat": "^1.2.5",
|
|
35
|
+
"@eslint/js": "^9.18.0",
|
|
36
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
37
|
+
"@sveltejs/adapter-auto": "^4.0.0",
|
|
38
|
+
"@sveltejs/kit": "^2.16.0",
|
|
39
|
+
"@sveltejs/package": "^2.0.0",
|
|
40
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
|
41
|
+
"dts-bundle-generator": "^9.5.1",
|
|
42
|
+
"eslint": "^9.18.0",
|
|
43
|
+
"eslint-config-prettier": "^10.0.1",
|
|
44
|
+
"eslint-plugin-svelte": "^3.0.0",
|
|
45
|
+
"globals": "^16.0.0",
|
|
46
|
+
"less": "^4.2.2",
|
|
47
|
+
"prettier": "^3.4.2",
|
|
48
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
49
|
+
"publint": "^0.3.2",
|
|
50
|
+
"svelte": "^5.0.0",
|
|
51
|
+
"svelte-check": "^4.0.0",
|
|
52
|
+
"typescript": "^5.0.0",
|
|
53
|
+
"typescript-eslint": "^8.20.0",
|
|
54
|
+
"vite": "^6.0.0",
|
|
55
|
+
"vite-plugin-dts": "^4.5.3"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"maplibre-gl": "^5.3.0",
|
|
59
|
+
"zod": "^3.24.2",
|
|
60
|
+
"@workspace/shared": "1.0.0"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"dev": "vite dev",
|
|
64
|
+
"build:vite": "vite build -c vite.build.config.ts",
|
|
65
|
+
"build:types": "dts-bundle-generator --export-referenced-types --umd-module-name=arenarium -o ./dist/index.d.ts ./src/lib/index.ts",
|
|
66
|
+
"build": "pnpm run build:vite && pnpm run build:types",
|
|
67
|
+
"preview": "vite preview",
|
|
68
|
+
"build-patch-commit-publish": "pnpm run build && pnpm version patch && git add * && git commit -m 'Publish' && pnpm publish --access public",
|
|
69
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
70
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
71
|
+
"format": "prettier --write .",
|
|
72
|
+
"lint": "prettier --check . && eslint ."
|
|
73
|
+
}
|
|
74
|
+
}
|