@nika-js/onlymap 0.6.16 → 0.6.18
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 +25 -1
- package/README.md +1 -1
- package/bin/onlymapjs.mjs +287 -24
- package/dist/{LercDecode.es-Dk9wels3.js → LercDecode.es-CFkuAghv.js} +1 -1
- package/dist/actions.d.ts +0 -9
- package/dist/{basemap-BA1ZJlLK.js → basemap-BYsWqrqp.js} +9 -1
- package/dist/basemap.d.ts +6 -0
- package/dist/declarative-filter.d.ts +1 -0
- package/dist/effects.d.ts +14 -2
- package/dist/elements/om-map.d.ts +22 -0
- package/dist/elements/om-story.d.ts +32 -1
- package/dist/{geoparquet-8OqhWIi0.js → geoparquet-C5ezOpDN.js} +1 -1
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-CHMnADf_.js → index-B0qtzfOX.js} +1 -1
- package/dist/{index-Bfr8mB8a.js → index-C7pRTBjN.js} +2 -2
- package/dist/{index-DbfeUg8P.js → index-PHDt5jos.js} +1 -1
- package/dist/{index-BVwjHomd.js → index-T1jT84TY.js} +1 -1
- package/dist/{index-CfSUY_BJ.js → index-h5A4LBtR.js} +48812 -48302
- package/dist/layers/feature-mesh-layer.d.ts +7 -7
- package/dist/layers/warm-tile3d-layer.d.ts +24 -0
- package/dist/{lerc-YYE0CLud.js → lerc-B8gvl7FV.js} +2 -2
- package/dist/onlymap.standalone.js +63372 -62854
- package/dist/onlymapjs.js +1 -1
- package/dist/paced-flyby.d.ts +69 -0
- package/dist/programmatic.d.ts +9 -0
- package/dist/{raster-BRQWdAhD.js → raster-B8bDaA3c.js} +2 -2
- package/dist/{raster-pipeline-zQdEkSvr.js → raster-pipeline-BLKrUZxU.js} +1 -1
- package/dist/runtime-core.d.ts +21 -0
- package/dist/surface-anchor.d.ts +17 -0
- package/dist/tile-warm.d.ts +144 -0
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-BV0RmDUH.js → zarr-Y8OewWSs.js} +2 -2
- package/docs/design/paced-flyby.md +42 -0
- package/docs/design/trace-link-failure.md +20 -0
- package/docs/stories.md +22 -0
- package/llms.txt +6 -2
- package/onlymapjs.html-data.json +49 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +14 -2
package/onlymapjs.html-data.json
CHANGED
|
@@ -546,6 +546,15 @@
|
|
|
546
546
|
"name": "site-scale",
|
|
547
547
|
"description": "Georeferencing: uniform scale multiplier (default 1)."
|
|
548
548
|
},
|
|
549
|
+
{
|
|
550
|
+
"name": "anchor",
|
|
551
|
+
"description": "anchor=\"surface\": anchor each row INSIDE its own polygon (point-on-surface) — on-map labels/annotations with no authored coordinates. An authored get-position wins.",
|
|
552
|
+
"values": [
|
|
553
|
+
{
|
|
554
|
+
"name": "surface"
|
|
555
|
+
}
|
|
556
|
+
]
|
|
557
|
+
},
|
|
549
558
|
{
|
|
550
559
|
"name": "get-position",
|
|
551
560
|
"description": "Accessor for deck.gl getPosition — expression language: $field, scale(), formatDate(), arithmetic."
|
|
@@ -1916,6 +1925,9 @@
|
|
|
1916
1925
|
},
|
|
1917
1926
|
{
|
|
1918
1927
|
"name": "redo"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
"name": "warm-tiles"
|
|
1919
1931
|
}
|
|
1920
1932
|
]
|
|
1921
1933
|
},
|
|
@@ -2357,6 +2369,18 @@
|
|
|
2357
2369
|
"name": "id",
|
|
2358
2370
|
"description": "Story id — referenced by the player widget and story-* actions."
|
|
2359
2371
|
},
|
|
2372
|
+
{
|
|
2373
|
+
"name": "warm-tiles",
|
|
2374
|
+
"description": "Pre-load every 3D tileset along this story's camera route in the background as soon as the story connects — flyby pop-in / LOD refinement blur becomes a sub-frame re-upload. Completion announced via the om-tiles-warmed event on <om-map>."
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
"name": "paced",
|
|
2378
|
+
"description": "Load-paced playback: the story steps its own clock frame by frame (optionally paced=\"60\" story-fps, default 30), owns the camera along the fly-to route, and never advances while a 3D tileset is still refining — no frame ever shows unrefined tiles. Wall-clock stretches; emits om-paced-tick {t, waitedMs} per frame. Composes with warm-tiles (warm first → far shorter waits)."
|
|
2379
|
+
},
|
|
2380
|
+
{
|
|
2381
|
+
"name": "paced-max-hold",
|
|
2382
|
+
"description": "Per-frame tile-wait cap for paced playback (duration grammar, default 10s): a frame still waiting past the cap advances anyway, so a dead tile server degrades to ordinary pop-in instead of freezing the story. Heavy tilesets (Google Photorealistic 3D Tiles) can be tile-bound longer than 10s per frame — raise it (e.g. \"30s\"), or set \"none\" to wait unconditionally for full refinement (guaranteed-sharp recorded takes; only pause can then unstick a dead server)."
|
|
2383
|
+
},
|
|
2360
2384
|
{
|
|
2361
2385
|
"name": "autoplay",
|
|
2362
2386
|
"description": "Start after om-map-ready."
|
|
@@ -2503,6 +2527,9 @@
|
|
|
2503
2527
|
},
|
|
2504
2528
|
{
|
|
2505
2529
|
"name": "redo"
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
"name": "warm-tiles"
|
|
2506
2533
|
}
|
|
2507
2534
|
]
|
|
2508
2535
|
},
|
|
@@ -2514,6 +2541,28 @@
|
|
|
2514
2541
|
"name": "delay",
|
|
2515
2542
|
"description": "Stagger before the step starts."
|
|
2516
2543
|
},
|
|
2544
|
+
{
|
|
2545
|
+
"name": "follow",
|
|
2546
|
+
"description": "trace steps: lock the camera to the line's drawing tip for the step's duration (the travel-map move)."
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
"name": "easing",
|
|
2550
|
+
"description": "trace steps: clock curve for the draw.",
|
|
2551
|
+
"values": [
|
|
2552
|
+
{
|
|
2553
|
+
"name": "linear"
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
"name": "ease-in"
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
"name": "ease-out"
|
|
2560
|
+
},
|
|
2561
|
+
{
|
|
2562
|
+
"name": "ease-in-out"
|
|
2563
|
+
}
|
|
2564
|
+
]
|
|
2565
|
+
},
|
|
2517
2566
|
{
|
|
2518
2567
|
"name": "parallel",
|
|
2519
2568
|
"description": "Start with the previous step instead of after everything before it."
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nika-js/onlymap",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
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": {
|
|
@@ -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.18` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.6.18/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.18/dist/onlymapjs.css">
|
|
20
|
+
<script type="module" src="https://unpkg.com/@nika-js/onlymap@0.6.18"></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).
|
|
@@ -573,6 +573,10 @@ duration?}`, `zoom-to-feature` `{layer, featureId, duration?}`, `set-basemap`
|
|
|
573
573
|
|
|
574
574
|
Rich sparse HTML anchored to the map.
|
|
575
575
|
|
|
576
|
+
**Styling — overlay content renders inside a shadow root (style isolation, same as widgets), so page stylesheets and their classes DO NOT reach it.** Style overlay content with inline `style="…"` attributes, or put a `<style>` element INSIDE the overlay (children are moved into the shadow root wholesale, so it applies there). Inheritable properties and CSS custom properties set on `om-overlay`/`om-map` do pierce the boundary. A `.card` class defined in the page's `<head>` will silently not apply — the content renders unstyled.
|
|
577
|
+
|
|
578
|
+
Also note for story "cards": an overlay is geo-anchored, and by default it HIDES whenever its anchor leaves the viewport — on a moving story camera an anchored card can vanish mid-step. Pin narrative cards that must persist across camera motion in a widget slot (custom `<om-widget position="bottom-center">`) instead; use anchored overlays for cards that belong to a place (they track it and legitimately go away when it leaves frame).
|
|
579
|
+
|
|
576
580
|
Anchors:
|
|
577
581
|
|
|
578
582
|
- `anchor="[lng, lat]"`
|
|
@@ -664,6 +668,14 @@ Example:
|
|
|
664
668
|
|
|
665
669
|
### Stories
|
|
666
670
|
|
|
671
|
+
Trace steps take `follow` (camera rides the line's drawing tip — the travel-map move) and `easing="linear|ease-in|ease-out|ease-in-out"`. On-map annotations without popups: `anchor="surface"` on a `TextLayer` over polygon GeoJSON anchors each row's text inside its own shape (`get-text="$name"`); pair with `font-settings='{"sdf":true}' outline-width="4" outline-color="..."` for a legible halo.
|
|
672
|
+
|
|
673
|
+
Add `warm-tiles` on `<om-story>` to pre-load 3D tilesets along the story's fly-to route in the background at load — flybys play sharp instead of refining from blurry. Manual form: the `warm-tiles` action (`{story?, samples?, budget?}`); completion fires `om-tiles-warmed` on `<om-map>`. Persistent knob: `load-options='{"tileset":{"maximumMemoryUsage":512}}'` on the tiles layer.
|
|
674
|
+
|
|
675
|
+
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
|
+
|
|
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).
|
|
678
|
+
|
|
667
679
|
Use `<om-story>` with `<om-step>` children. Stories are siblings of layers/overlays, not containers.
|
|
668
680
|
|
|
669
681
|
```html
|