@nika-js/onlymap 0.1.1 → 0.2.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nika-js/onlymap",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Interactive WebGL maps from declarative HTML — a custom-element manifest drives deck.gl: rendering, data loading, live updates, picking, widgets, and validation. No build step.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "publishConfig": {
@@ -45,24 +45,42 @@
45
45
  "require": "./dist/onlymapjs.umd.cjs",
46
46
  "default": "./dist/onlymapjs.js"
47
47
  },
48
+ "./react": {
49
+ "types": "./dist/react/index.d.ts",
50
+ "import": "./dist/react.js",
51
+ "default": "./dist/react.js"
52
+ },
48
53
  "./onlymapjs.css": "./dist/onlymapjs.css",
49
54
  "./onlymapjs.html-data.json": "./onlymapjs.html-data.json",
50
55
  "./onlymap.code-snippets": "./.vscode/onlymap.code-snippets",
51
56
  "./package.json": "./package.json"
52
57
  },
58
+ "peerDependencies": {
59
+ "react": ">=18",
60
+ "react-dom": ">=18"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "react": {
64
+ "optional": true
65
+ },
66
+ "react-dom": {
67
+ "optional": true
68
+ }
69
+ },
53
70
  "files": [
54
71
  ".vscode/onlymap.code-snippets",
55
72
  "bin/onlymapjs.mjs",
56
73
  "dist",
57
74
  "README.md",
58
75
  "LICENSE.md",
76
+ "docs",
59
77
  "llms.txt",
60
78
  "onlymapjs.html-data.json",
61
79
  "skills/onlymapjs"
62
80
  ],
63
81
  "scripts": {
64
82
  "dev": "vite",
65
- "build": "npm run typecheck && vite build && npm run build:types",
83
+ "build": "npm run typecheck && vite build && vite build --config vite.react.config.ts && npm run build:types",
66
84
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
67
85
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.e2e.json --noEmit",
68
86
  "test": "vitest run",
@@ -91,6 +109,8 @@
91
109
  "@types/d3-interpolate": "^3.0.4",
92
110
  "@types/d3-scale": "^4.0.9",
93
111
  "@types/estree": "^1.0.9",
112
+ "@types/react": "^19.2.17",
113
+ "@types/react-dom": "^19.2.3",
94
114
  "@types/ws": "^8.18.1",
95
115
  "acorn": "^8.17.0",
96
116
  "apache-arrow": "^21.1.0",
@@ -102,6 +122,8 @@
102
122
  "happy-dom": "^20.10.6",
103
123
  "maplibre-gl": "^5.24.0",
104
124
  "playwright": "^1.61.1",
125
+ "react": "^19.2.7",
126
+ "react-dom": "^19.2.7",
105
127
  "typescript": "^5.6.0",
106
128
  "vite": "^6.0.0",
107
129
  "vite-node": "^6.0.0",
@@ -19,7 +19,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
19
19
  ```html
20
20
  <script type="module">
21
21
  import "@nika-js/onlymap";
22
- import "onlymapjs/onlymapjs.css";
22
+ import "@nika-js/onlymap/onlymapjs.css";
23
23
  </script>
24
24
  ```
25
25
 
@@ -12,7 +12,7 @@ Use these patterns as starting points. Replace data URLs, layer ids, fields, cen
12
12
  <title>OnlyMapJS map</title>
13
13
  <script type="module">
14
14
  import "@nika-js/onlymap";
15
- import "onlymapjs/onlymapjs.css";
15
+ import "@nika-js/onlymap/onlymapjs.css";
16
16
  </script>
17
17
  <style>
18
18
  html, body { margin: 0; height: 100%; }
@@ -135,7 +135,7 @@ Use `PopupLayer` instead of many `<om-overlay>` elements for labels/badges at sc
135
135
  ```html
136
136
  <script type="module">
137
137
  import { OmMap } from "@nika-js/onlymap";
138
- import "onlymapjs/onlymapjs.css";
138
+ import "@nika-js/onlymap/onlymapjs.css";
139
139
 
140
140
  OmMap.registerSource("fleet", {
141
141
  decode: (m) => m.type === "position"
@@ -9,7 +9,7 @@ Vite/npm project:
9
9
  ```html
10
10
  <script type="module">
11
11
  import "@nika-js/onlymap";
12
- import "onlymapjs/onlymapjs.css";
12
+ import "@nika-js/onlymap/onlymapjs.css";
13
13
  </script>
14
14
  ```
15
15