@nika-js/onlymap 0.6.20 → 0.6.22
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/CHANGELOG.md +19 -0
- package/README.md +2 -2
- package/dist/{LercDecode.es-DiDn51b8.js → LercDecode.es-Cm-Ah1Pr.js} +1 -1
- package/dist/actions.d.ts +94 -1
- package/dist/attribute-resolution.d.ts +55 -1
- package/dist/{basemap-Bvtudw-w.js → basemap-BCZ-MbEU.js} +2 -2
- package/dist/declarative-filter.d.ts +2 -16
- package/dist/effect-track.d.ts +94 -0
- package/dist/effects.d.ts +2 -0
- package/dist/elements/om-map.d.ts +9 -8
- package/dist/elements/om-story.d.ts +18 -0
- package/dist/{geoparquet-DFfq6-JJ.js → geoparquet-BaYtod1j.js} +1 -1
- package/dist/html-data.d.ts +14 -0
- package/dist/{index-DIHnIeho.js → index-BlUSpugF.js} +1 -1
- package/dist/{index-Cq0qmoDj.js → index-C2DPJtsQ.js} +2 -2
- package/dist/{index-CPthQWzC.js → index-Ddn4yvyL.js} +14997 -14636
- package/dist/{index-ZDGLuUoq.js → index-GkhsIJWB.js} +1 -1
- package/dist/{index-AlG5NjjQ.js → index-Qza7MX_l.js} +1 -1
- package/dist/internal-ids.d.ts +2 -0
- package/dist/ir-snapshot.d.ts +2 -0
- package/dist/ir.d.ts +8 -0
- package/dist/{lerc-C3kqqJ1B.js → lerc-Dt2MXtZG.js} +2 -2
- package/dist/onlymap.standalone.js +24234 -23873
- package/dist/onlymapjs.js +1 -1
- package/dist/parse-manifest.d.ts +8 -0
- package/dist/programmatic.d.ts +3 -2
- package/dist/{raster-6tndfpHv.js → raster-DBB0kjvs.js} +2 -2
- package/dist/{raster-pipeline-DVLch-nI.js → raster-pipeline-C9FDdaMd.js} +1 -1
- package/dist/react.js +18 -17
- package/dist/runtime-core.d.ts +34 -0
- package/dist/snapshot.d.ts +15 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-D5UCDgG7.js → zarr-9LzdL7Zm.js} +2 -2
- package/docs/stories.md +2 -0
- package/llms.txt +3 -2
- package/onlymapjs.attributes.json +1582 -0
- package/onlymapjs.html-data.json +282 -278
- package/package.json +2 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.22",
|
|
4
4
|
"description": "Declarative deck.gl maps for HTML and React — interactive WebGL mapping with GeoJSON/CSV/Arrow data, MapLibre basemaps, widgets, popups, and live streams from a custom-element manifest or typed React components. TypeScript, no build step.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"publishConfig": {
|
|
@@ -103,6 +103,7 @@
|
|
|
103
103
|
"docs",
|
|
104
104
|
"llms.txt",
|
|
105
105
|
"onlymapjs.html-data.json",
|
|
106
|
+
"onlymapjs.attributes.json",
|
|
106
107
|
"skills/onlymapjs"
|
|
107
108
|
],
|
|
108
109
|
"scripts": {
|
|
@@ -23,7 +23,7 @@ Use OnlyMapJS as a declarative HTML map library. Write custom elements such as `
|
|
|
23
23
|
</script>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.6.
|
|
26
|
+
For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.6.22` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.22/dist/onlymapjs.css">`. Never a rebundling CDN (esm.sh, skypack): re-bundling duplicates the deck.gl/luma.gl runtime and every layer fails shader compilation.
|
|
27
27
|
|
|
28
28
|
## React Projects
|
|
29
29
|
|
|
@@ -16,8 +16,8 @@ Vite/npm project:
|
|
|
16
16
|
Static CDN page (raw-file CDNs only — unpkg/jsDelivr; never esm.sh or another rebundling CDN, which duplicates the WebGL runtime and breaks layer shaders):
|
|
17
17
|
|
|
18
18
|
```html
|
|
19
|
-
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.
|
|
20
|
-
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.
|
|
19
|
+
<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.22/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.22"></script>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Always include `onlymapjs.css` — it carries the MapLibre basemap styles and the no-JS fallback rules (`<om-fallback>` / default banner). For the fallback to work in script-disabled previews it must load without JavaScript: a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages (a bundler-emitted stylesheet is fine in npm projects).
|
|
@@ -125,6 +125,12 @@ Multi-dimension filtering (up to 4, AND'd together — a row must pass every dim
|
|
|
125
125
|
|
|
126
126
|
One `<om-widget type="filter">` per dimension — each moves its own field's range independently; `filter-layer` merges the update onto the matching dimension rather than replacing the whole filter. A dimension can't be added live through the widget/action — the full set of fields a layer filters on must be declared up front in `filter-fields`.
|
|
127
127
|
|
|
128
|
+
## Zoom visibility (any layer type)
|
|
129
|
+
|
|
130
|
+
`visible-zoom-range="[8, 14]"` — scale-dependent visibility, the QGIS/ArcGIS/Mapbox everyday pattern: the layer renders only at min ≤ zoom < max (min inclusive, max exclusive — the minzoom/maxzoom convention). Universal: valid on every layer type, unlike the tile-only `visible-min-zoom`/`visible-max-zoom` deck props. Composes with `visible` (both must allow); a zoom-hidden layer stays a full scene member — legend, layer-switcher, and `ctx` still list it. Malformed values are ignored with a warning (`validate` reports them structurally).
|
|
131
|
+
|
|
132
|
+
Attribute-contract tooling: the package also ships `onlymapjs.attributes.json` — a machine-readable per-layer-type attribute list generated from the same registry the runtime validates against. CI checks that emit `<om-layer>` markup should validate attributes per `type=` against it, NOT against the editor IntelliSense file (`onlymapjs.html-data.json`), which is a flat per-tag union and cannot express "valid on TileLayer, not GeoJsonLayer". An attribute is accepted on a type iff it appears in the contract's `universal` list or `layers[<type>]`.
|
|
133
|
+
|
|
128
134
|
Categorical filtering is a SEPARATE mechanism from numeric (deck.gl's own `categorySize`, a discrete keep-list test, not a range) — same shape, own attributes, and combines with an active numeric filter (a row must pass both):
|
|
129
135
|
|
|
130
136
|
```html
|
|
@@ -674,7 +680,7 @@ Add `warm-tiles` on `<om-story>` to pre-load 3D tilesets along the story's fly-t
|
|
|
674
680
|
|
|
675
681
|
Add `paced` on `<om-story>` for load-paced playback: the story steps its own clock frame by frame (optionally `paced="60"` story-fps, default 30), drives the camera itself along the fly-to route, and never advances a frame while any 3D tileset is still refining — no frame ever shows unrefined tiles, at the cost of wall-clock time (playback is not real-time; use it for recorded takes or heavy tilesets like Google Photorealistic 3D Tiles, where no amount of pre-warming fits the flight in cache). Emits `om-paced-tick` (`detail = {t, waitedMs}`) on the story per frame; `waitedMs > 0` means that frame paused for tiles. Composes with `warm-tiles` (warm first → far shorter waits). During a paced run only `fly-to` steps steer the camera (data-dependent camera steps like `zoom-to-feature` are skipped with a warning) and user gestures don't pause playback — pause via the player widget or `story-pause`.
|
|
676
682
|
|
|
677
|
-
To output an actual video: `npx onlymapjs record map.html --out flyby.mp4` (playwright dev-installed; ffmpeg assembles, else you get PNG frames + the command) plays the story paced in isolated headless Chromium and screenshots every frame — widgets, overlays, and attribution included, every frame fully refined. Options: `--story <id>`, `--fps <n>`, `--width/--height/--scale`, `--gpu` (hardware rendering; ~3× shorter tile holds on heavy 3D scenes — recommended), `--keep-frames`, `--timeout <s>` (frames survive a deadline hit in `<out>.frames/`), `--max-hold <s|none>` (per-frame tile-wait cap, default 10s — also authorable as `paced-max-hold` on `<om-story>`; frames that keep hitting the cap may stay slightly blurry — raise it, or `none` makes the gate absolute for guaranteed-sharp takes). It executes the page's scripts — trusted, browser-runnable manifests only. For custom recorders in-page, `storyEl.setPacedCapture(async (tick) => {...})` is awaited per frame before that frame's `om-paced-tick` (capture race-free; the ended-state tick = all frames captured).
|
|
683
|
+
To output an actual video: `npx onlymapjs record map.html --out flyby.mp4` (playwright dev-installed; ffmpeg assembles, else you get PNG frames + the command) plays the story paced in isolated headless Chromium and screenshots every frame — widgets, overlays, and attribution included, every frame fully refined. Options: `--story <id>`, `--fps <n>`, `--width/--height/--scale`, `--gpu` (hardware rendering; ~3× shorter tile holds on heavy 3D scenes — recommended), `--keep-frames`, `--timeout <s>` (frames survive a deadline hit in `<out>.frames/`), `--max-hold <s|none>` (per-frame tile-wait cap, default 10s — also authorable as `paced-max-hold` on `<om-story>`; frames that keep hitting the cap may stay slightly blurry — raise it, or `none` makes the gate absolute for guaranteed-sharp takes). It executes the page's scripts — trusted, browser-runnable manifests only. Effect verbs (fade/pulse/trace/populate) animate on the story clock during paced/recorded runs, so frames capture traces half-drawn and fades mid-flight exactly as authored (`trace follow` is skipped — the paced route owns the camera). For custom recorders in-page, `storyEl.setPacedCapture(async (tick) => {...})` is awaited per frame before that frame's `om-paced-tick` (capture race-free; the ended-state tick = all frames captured).
|
|
678
684
|
|
|
679
685
|
Use `<om-story>` with `<om-step>` children. Stories are siblings of layers/overlays, not containers.
|
|
680
686
|
|