@arenarium/maps 1.0.19 → 1.0.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/README.md CHANGED
@@ -4,30 +4,30 @@
4
4
 
5
5
  ```html
6
6
  <html lang="en">
7
- <head>
8
- <script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
9
- <link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet" />
10
- </head>
11
- <body>
12
- <div id="map"></div>
13
- <script>
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
18
- position: {
19
- center: { lat: 51.505, lng: -0.09 },
20
- zoom: 13
21
- },
22
- // The initial theme of the map
23
- theme: 'light'
24
- });
25
- </script>
26
- </body>
7
+ <head>
8
+ <script src="https://unpkg.com/@arenarium/maps@latest/dist/index.js"></script>
9
+ <link href="https://unpkg.com/@arenarium/maps@latest/dist/style.css" rel="stylesheet" />
10
+ </head>
11
+ <body>
12
+ <div id="map"></div>
13
+ <script>
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
18
+ position: {
19
+ center: { lat: 51.505, lng: -0.09 },
20
+ zoom: 13
21
+ },
22
+ // The initial theme of the map
23
+ theme: 'light'
24
+ });
25
+ </script>
26
+ </body>
27
27
  </html>
28
28
  ```
29
29
 
30
- #### Module
30
+ #### Svelte
31
31
 
32
32
  ```bash
33
33
  npm install @arenarium/maps
@@ -35,19 +35,19 @@ npm install @arenarium/maps
35
35
 
36
36
  ```svelte
37
37
  <script lang="ts">
38
- import { onMount } from 'svelte';
39
- import { mountMap } from '$lib/index.js';
40
-
41
- onMount(() => {
42
- const map = mountMap({
43
- container: 'map',
44
- position: {
45
- center: { lat: 51.505, lng: -0.09 },
46
- zoom: 13
47
- },
48
- theme: 'light'
38
+ import { onMount } from 'svelte';
39
+ import { mountMap } from '$lib/index.js';
40
+
41
+ onMount(() => {
42
+ const map = mountMap({
43
+ container: 'map',
44
+ position: {
45
+ center: { lat: 51.505, lng: -0.09 },
46
+ zoom: 13
47
+ },
48
+ theme: 'light'
49
+ });
49
50
  });
50
- });
51
51
  </script>
52
52
 
53
53
  <div id="map"></div>
package/dist/index.d.ts CHANGED
@@ -29,10 +29,39 @@ declare const mapOptionsSchema: z.ZodObject<{
29
29
  };
30
30
  zoom: number;
31
31
  }>;
32
- theme: z.ZodUnion<[
33
- z.ZodLiteral<"dark">,
34
- z.ZodLiteral<"light">
35
- ]>;
32
+ theme: z.ZodObject<{
33
+ name: z.ZodUnion<[
34
+ z.ZodLiteral<"dark">,
35
+ z.ZodLiteral<"light">
36
+ ]>;
37
+ colors: z.ZodObject<{
38
+ primary: z.ZodString;
39
+ background: z.ZodString;
40
+ text: z.ZodString;
41
+ }, "strip", z.ZodTypeAny, {
42
+ primary: string;
43
+ background: string;
44
+ text: string;
45
+ }, {
46
+ primary: string;
47
+ background: string;
48
+ text: string;
49
+ }>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ name: "dark" | "light";
52
+ colors: {
53
+ primary: string;
54
+ background: string;
55
+ text: string;
56
+ };
57
+ }, {
58
+ name: "dark" | "light";
59
+ colors: {
60
+ primary: string;
61
+ background: string;
62
+ text: string;
63
+ };
64
+ }>;
36
65
  }, "strip", z.ZodTypeAny, {
37
66
  container: string;
38
67
  position: {
@@ -42,7 +71,14 @@ declare const mapOptionsSchema: z.ZodObject<{
42
71
  };
43
72
  zoom: number;
44
73
  };
45
- theme: "dark" | "light";
74
+ theme: {
75
+ name: "dark" | "light";
76
+ colors: {
77
+ primary: string;
78
+ background: string;
79
+ text: string;
80
+ };
81
+ };
46
82
  }, {
47
83
  container: string;
48
84
  position: {
@@ -52,7 +88,14 @@ declare const mapOptionsSchema: z.ZodObject<{
52
88
  };
53
89
  zoom: number;
54
90
  };
55
- theme: "dark" | "light";
91
+ theme: {
92
+ name: "dark" | "light";
93
+ colors: {
94
+ primary: string;
95
+ background: string;
96
+ text: string;
97
+ };
98
+ };
56
99
  }>;
57
100
  export type MapOptions = z.infer<typeof mapOptionsSchema>;
58
101
  export declare function mountMap(options: MapOptions): {