@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/.vscode/onlymap.code-snippets +4 -4
- package/README.md +22 -2
- package/dist/attribute-resolution.d.ts +39 -0
- package/dist/{basemap-D95W0IIA.js → basemap-C0RKcLaL.js} +1 -1
- package/dist/{index-C9w78NS9.js → index-BDJ9hHXv.js} +1 -1
- package/dist/{index-Do7hmHwi.js → index-CZf9WlZe.js} +1 -1
- package/dist/{index-D74olQ9w.js → index-DeEur5Xk.js} +1 -1
- package/dist/{index-CU-iOTdr.js → index-DnvxPnDF.js} +12090 -11820
- package/dist/{index-BFjXVHly.js → index-GTGi85ZO.js} +2 -2
- package/dist/index.d.ts +5 -0
- package/dist/ir-diff.d.ts +16 -0
- package/dist/onlymapjs.js +18 -16
- package/dist/onlymapjs.umd.cjs +281 -281
- package/dist/programmatic.d.ts +176 -0
- package/dist/react/context.d.ts +25 -0
- package/dist/react/index.d.ts +20 -0
- package/dist/react/om-layer.d.ts +38 -0
- package/dist/react/om-map.d.ts +29 -0
- package/dist/react/om-overlay.d.ts +27 -0
- package/dist/react/om-widget.d.ts +9 -0
- package/dist/react/use-om-map.d.ts +2 -0
- package/dist/react.js +272 -0
- package/docs/3d-assets.md +74 -0
- package/docs/live-data.md +83 -0
- package/docs/react.md +120 -0
- package/docs/stories.md +134 -0
- package/docs/testing.md +165 -0
- package/llms.txt +5 -1
- package/package.json +36 -14
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/patterns.md +2 -2
- package/skills/onlymapjs/references/syntax.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "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
|
-
"
|
|
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",
|
|
@@ -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 "
|
|
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 "
|
|
138
|
+
import "@nika-js/onlymap/onlymapjs.css";
|
|
139
139
|
|
|
140
140
|
OmMap.registerSource("fleet", {
|
|
141
141
|
decode: (m) => m.type === "position"
|