@nika-js/onlymap 0.1.0 → 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.0",
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,9 +45,27 @@
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
- "./onlymap.code-snippets": "./.vscode/onlymap.code-snippets"
55
+ "./onlymap.code-snippets": "./.vscode/onlymap.code-snippets",
56
+ "./package.json": "./package.json"
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
+ }
51
69
  },
52
70
  "files": [
53
71
  ".vscode/onlymap.code-snippets",
@@ -55,13 +73,14 @@
55
73
  "dist",
56
74
  "README.md",
57
75
  "LICENSE.md",
76
+ "docs",
58
77
  "llms.txt",
59
78
  "onlymapjs.html-data.json",
60
79
  "skills/onlymapjs"
61
80
  ],
62
81
  "scripts": {
63
82
  "dev": "vite",
64
- "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",
65
84
  "build:types": "tsc -p tsconfig.build.json --emitDeclarationOnly",
66
85
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.e2e.json --noEmit",
67
86
  "test": "vitest run",
@@ -72,7 +91,8 @@
72
91
  "gen:public": "npm run gen:html-data && vite-node dev/build-public.ts",
73
92
  "test:public": "npm run gen:public -- --dry-run --strict"
74
93
  },
75
- "dependencies": {
94
+ "comment:deps": "This library ships a fully self-contained bundle in dist/ (verified: zero external bare imports), so it has NO runtime dependencies — deck.gl, loaders.gl, MapLibre, Arrow, d3, acorn, etc. are build-time-only and get bundled by Vite. Keeping them here (not in dependencies) is what stops every consumer install from pulling ~250 MB it never uses.",
95
+ "devDependencies": {
76
96
  "@deck.gl/aggregation-layers": "^9.3.5",
77
97
  "@deck.gl/core": "^9.3.5",
78
98
  "@deck.gl/extensions": "^9.3.5",
@@ -83,25 +103,27 @@
83
103
  "@loaders.gl/csv": "^4.4.3",
84
104
  "@loaders.gl/kml": "^4.4.3",
85
105
  "@loaders.gl/shapefile": "^4.4.3",
86
- "acorn": "^8.17.0",
87
- "apache-arrow": "^21.1.0",
88
- "d3-array": "^3.2.4",
89
- "d3-color": "^3.1.0",
90
- "d3-interpolate": "^3.0.1",
91
- "d3-scale": "^4.0.2",
92
- "fzstd": "^0.1.1",
93
- "maplibre-gl": "^5.24.0"
94
- },
95
- "devDependencies": {
96
106
  "@playwright/test": "^1.61.1",
97
107
  "@types/d3-array": "^3.2.2",
98
108
  "@types/d3-color": "^3.1.3",
99
109
  "@types/d3-interpolate": "^3.0.4",
100
110
  "@types/d3-scale": "^4.0.9",
101
111
  "@types/estree": "^1.0.9",
112
+ "@types/react": "^19.2.17",
113
+ "@types/react-dom": "^19.2.3",
102
114
  "@types/ws": "^8.18.1",
115
+ "acorn": "^8.17.0",
116
+ "apache-arrow": "^21.1.0",
117
+ "d3-array": "^3.2.4",
118
+ "d3-color": "^3.1.0",
119
+ "d3-interpolate": "^3.0.1",
120
+ "d3-scale": "^4.0.2",
121
+ "fzstd": "^0.1.1",
103
122
  "happy-dom": "^20.10.6",
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