@nika-js/onlymap 0.10.9 → 0.10.10

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +1 -1
  3. package/dist/{basemap-B2VvspL4.js → basemap-BH76eQA0.js} +2 -2
  4. package/dist/cartograph/element-base.d.ts +9 -0
  5. package/dist/cartograph/elements/om-legend.d.ts +4 -0
  6. package/dist/cartograph.js +517 -495
  7. package/dist/cartograph.standalone.js +1307 -1285
  8. package/dist/{geoparquet-BJQC6zwS.js → geoparquet-DzKLe-0r.js} +1 -1
  9. package/dist/{globe-view-C3Gaf--d.js → globe-view-B-prUQFh.js} +1 -1
  10. package/dist/{hillshade-CNtzlYlz.js → hillshade-CDng2Jsi.js} +1 -1
  11. package/dist/{index-m3UsmxCq.js → index-8Fj-yh7f.js} +2 -2
  12. package/dist/{index-C3S0FWlc.js → index-CIo8LgRZ.js} +3 -3
  13. package/dist/{index-CI0vdi2E.js → index-CpLydTmE.js} +1 -1
  14. package/dist/{index-Cp2kquh5.js → index-D86S8KJ1.js} +1 -1
  15. package/dist/{index-j_Ojvo4x.js → index-DOfIeNux.js} +1 -1
  16. package/dist/{index-DPEWcZeV.js → index-DvEcTZ4i.js} +18 -18
  17. package/dist/{index-a-wOE5hE.js → index-Rvd-zFrS.js} +1 -1
  18. package/dist/{index-D2RzlXff.js → index-cwieLGSg.js} +1 -1
  19. package/dist/{index-CQdTYZ08.js → index-laD2SEAB.js} +3 -3
  20. package/dist/{lerc-Bv4RLXha.js → lerc-BJB4-X6n.js} +1 -1
  21. package/dist/onlymap.standalone.js +1 -1
  22. package/dist/onlymapjs.js +1 -1
  23. package/dist/{post-process-effect-Cpbyy4I3.js → post-process-effect-Bd5plkno.js} +1 -1
  24. package/dist/{raster-D_HU2WuR.js → raster-DJ6vvro6.js} +3 -3
  25. package/dist/{raster-pipeline-BmcWLImS.js → raster-pipeline-BQhNhrPq.js} +1 -1
  26. package/dist/{text-on-path-ClLwT2eS.js → text-on-path-CrqchF3O.js} +1 -1
  27. package/dist/version.d.ts +1 -1
  28. package/dist/{zarr-CCCIYwWt.js → zarr-oAkG7ZLM.js} +2 -2
  29. package/docs/cartograph.md +13 -7
  30. package/llms.txt +1 -1
  31. package/onlymapjs.html-data.json +45 -1
  32. package/package.json +1 -1
  33. package/skills/onlymapjs/SKILL.md +1 -1
  34. package/skills/onlymapjs/references/syntax.md +3 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,11 @@ Note: npm collapsed a few closely-spaced releases — the GPX/FlatGeobuf (0.5.4)
8
8
  and GeoParquet (0.5.5) work shipped to npm together as **0.5.6**, so npm's
9
9
  version list jumps 0.5.3 → 0.5.6. Each logical version is listed here regardless.
10
10
 
11
+ ## 0.10.10 — 2026-09-29
12
+
13
+ ### Added
14
+ - **A print sheet's colours can now be set attribute by attribute, not only by theme.** The page takes `bg`, `color` and `font`; a legend takes `bg`, `color`, `stroke`, `font-size` and `padding`; the scale bar, north indicator and graticule take `color` — beside the `color`/`bg` text and `fill`/`stroke` shapes always had. Until now a sheet had five themes and a `<style>` block, and an author who wrote `background=` on the page got a warning and no change. Each override is the theme's own property scoped to that element, so the sheet on screen, the printed page and the exported image agree.
15
+
11
16
  ## 0.10.9 — 2026-09-29
12
17
 
13
18
  ### Added
package/README.md CHANGED
@@ -149,7 +149,7 @@ Hovering a pickable feature shows a pointer cursor automatically, so recipients
149
149
 
150
150
  **Animation:** camera moves accept a duration — `map.flyTo(coords, zoom, { duration: 1200, curve: true })`, or the `fly-to` action (`center`/`zoom`/`pitch`/`bearing`/`duration`) from any behavior or button; `prefers-reduced-motion` is honored (moves become instant, final state identical). Per-prop GPU transitions via the `transition` attribute: `transition="get-fill-color 800ms"` fades color changes; on a streaming layer, `transition="get-position 300ms"` makes entities glide between updates.
151
151
 
152
- **Print layouts (cartographs):** the `@nika-js/onlymap/cartograph` entry renders standalone pages measured in millimetres — `<om-cartograph>` holds live or static-georeferenced `<om-frame>`s plus derived legends, graticules, scale bars, north roses, shapes, images and token-driven text; `<om-atlas>` renders one page per feature and exports a ZIP. A frame can name SEVERAL sources (`<om-source>`) and shows the first that actually renders, so a sheet whose live map cannot load where it is opened falls through to a georeferenced capture instead of a blank box, and says which one it chose. Sheets print at true page size (`@page` + print-DPI frame captures) or export as 300 dpi PNG, with bleed/crop-marks/safe-zone press attributes and page-wide colour-vision simulation. It is a separate lazy build entry: the core bundle does not grow, and a static-only sheet never loads the map runtime. Guide: [docs/cartograph.md](docs/cartograph.md).
152
+ **Print layouts (cartographs):** the `@nika-js/onlymap/cartograph` entry renders standalone pages measured in millimetres — `<om-cartograph>` holds live or static-georeferenced `<om-frame>`s plus derived legends, graticules, scale bars, north roses, shapes, images and token-driven text; `<om-atlas>` renders one page per feature and exports a ZIP. A frame can name SEVERAL sources (`<om-source>`) and shows the first that actually renders, so a sheet whose live map cannot load where it is opened falls through to a georeferenced capture instead of a blank box, and says which one it chose. Sheets print at true page size (`@page` + print-DPI frame captures) or export as 300 dpi PNG, with bleed/crop-marks/safe-zone press attributes and page-wide colour-vision simulation. Five built-in themes set the look, and any of it is overridable attribute by attribute — the page's ground, ink and font, a legend's panel colours and text size, the colour of a scale bar, north arrow or graticule — with screen, print and export agreeing. It is a separate lazy build entry: the core bundle does not grow, and a static-only sheet never loads the map runtime. Guide: [docs/cartograph.md](docs/cartograph.md).
153
153
 
154
154
  **Map stories:** a guided tour as markup — `<om-story>` holds `<om-step>` children that fire the same actions behaviors use, on a timeline (`duration`, `delay`, `parallel`); the built-in `type="player"` widget gives play/pause/scrub, seeking restores the scene's captured initial state, one story is active per map, and grabbing the map pauses playback. Effect verbs — `fade`, `pulse`, `trace` (progressive TripsLayer draw-on; with `feature-id`, a single polygon draws itself on inside its own layer), and `populate` (rows drop in one by one via a GPU filter sweep) — work as step shorthands or plain actions. The story is a sibling that references layers by id — delete it and the map is unchanged. For flybys over 3D tilesets, `warm-tiles` pre-loads the route's tiles in the background before playback, and `paced` goes further: the story steps its own clock and never advances a frame while a tileset is still refining, so no frame ever shows unrefined tiles — wall-clock stretches instead (built for recorded takes; emits `om-paced-tick {t, waitedMs}` per frame, and the two compose — warm first, wait less). `npx @nika-js/onlymap record map.html --out flyby.mp4` turns that guarantee into an actual video: one screenshot per paced frame in headless Chromium (widgets and attribution included), assembled with ffmpeg — and effect verbs animate on the story clock, so recorded traces draw on frame by frame exactly as authored. Guide: [docs/stories.md](docs/stories.md).
155
155
 
@@ -1,5 +1,5 @@
1
- import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-DPEWcZeV.js";
2
- import { a as ty } from "./globe-view-C3Gaf--d.js";
1
+ import { aJ as Y_, N as Bu, H as Pd, k as K_, aK as J_, aL as Q_, D as Xf, Z as ey } from "./index-DvEcTZ4i.js";
2
+ import { a as ty } from "./globe-view-B-prUQFh.js";
3
3
  var Ou = { exports: {} };
4
4
  /**
5
5
  * MapLibre GL JS
@@ -21,6 +21,15 @@ export declare abstract class CartographElementBase extends HTMLElementBase {
21
21
  protected scheduleRender(): void;
22
22
  /** One coalesced render per microtask — subclasses re-read their attributes here. */
23
23
  protected abstract renderNow(): void;
24
+ /**
25
+ * Apply an authored colour or font override to the theme property the
26
+ * element's styling reads. Written as the custom property itself — on this
27
+ * element, so it scopes to it — which is what lets one attribute reach the
28
+ * SVG the element draws, its computed style, and so the canvas exporter,
29
+ * which reads computed colour and keeps no second theme table. `alsoColor`
30
+ * writes the element's own `color` too, for painters that read that.
31
+ */
32
+ protected applyThemeOverride(attr: string, property: string, alsoColor?: boolean): void;
24
33
  /** Write the placed-element inline styles from the mm placement attributes. */
25
34
  protected applyPlacement(): void;
26
35
  }
@@ -6,6 +6,10 @@ export declare class OmLegendElement extends CartographElementBase implements Ca
6
6
  get derived(): boolean;
7
7
  /** The rows this legend currently shows — recomputed on demand, never stored. */
8
8
  get rows(): LegendRow[];
9
+ /** Inner padding in mm — authored, else the 2 mm the theme always used. */
10
+ private get paddingMm();
11
+ /** Row text size in mm — `font-size` is authored in points, like <om-text>. */
12
+ private get fontMm();
9
13
  protected renderNow(): void;
10
14
  private renderRows;
11
15
  private buildRow;