@nika-js/onlymap 0.11.3 → 0.11.5

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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/dist/{basemap-C6Ehu6fw.js → basemap-CnjAGLZo.js} +14 -2
  4. package/dist/basemap.d.ts +9 -0
  5. package/dist/cartograph.js +231 -229
  6. package/dist/cartograph.standalone.js +361 -359
  7. package/dist/elements/om-map.d.ts +31 -1
  8. package/dist/elements/om-overlay.d.ts +0 -14
  9. package/dist/{geoparquet-3V4KrvQN.js → geoparquet-CHtunmD2.js} +1 -1
  10. package/dist/{globe-view-D4Tlyff-.js → globe-view-CgQa-07O.js} +1 -1
  11. package/dist/{hillshade-BC8QiJRP.js → hillshade-BgXgVdjg.js} +1 -1
  12. package/dist/{index-pu3BNjzA.js → index-BTTCf4nb.js} +5488 -5305
  13. package/dist/{index-BUE-VzWx.js → index-BTsRqhXB.js} +1 -1
  14. package/dist/{index-p5XXAoNa.js → index-ClLMdW3k.js} +2 -2
  15. package/dist/{index-BPCIxI1b.js → index-D4x57ql0.js} +1 -1
  16. package/dist/{index-iwTA46AA.js → index-DjtM8ecq.js} +1 -1
  17. package/dist/{index-C1f14saD.js → index-DoNtp5Nh.js} +3 -3
  18. package/dist/{index-DpUl6z5-.js → index-NCXX8bDe.js} +1 -1
  19. package/dist/{index-BqFwoWp9.js → index-aOe9cOFs.js} +1 -1
  20. package/dist/{index-DgutJ5y2.js → index-k7l7kqTk.js} +3 -3
  21. package/dist/index.d.ts +1 -1
  22. package/dist/{lerc-DWtJKNQk.js → lerc-BtdiMDO7.js} +1 -1
  23. package/dist/onlymap.standalone.js +13650 -13455
  24. package/dist/onlymapjs.js +1 -1
  25. package/dist/{post-process-effect-mQdMaWQE.js → post-process-effect-BWrq5IR8.js} +1 -1
  26. package/dist/programmatic.d.ts +10 -1
  27. package/dist/{raster-DtUDOXfy.js → raster-iGwPuAgo.js} +3 -3
  28. package/dist/{raster-pipeline-hQh5cG3e.js → raster-pipeline-Dxs9TpD6.js} +1 -1
  29. package/dist/react.js +128 -125
  30. package/dist/runtime-core.d.ts +50 -1
  31. package/dist/selection.d.ts +31 -0
  32. package/dist/{text-on-path-CcfoZqXD.js → text-on-path-C8h_3Snf.js} +1 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/viewport-cull.d.ts +15 -0
  35. package/dist/{zarr-Qo4A_t7d.js → zarr-C1zXD9VD.js} +2 -2
  36. package/docs/cartograph.md +8 -3
  37. package/llms.txt +3 -2
  38. package/onlymapjs.html-data.json +4 -0
  39. package/package.json +1 -1
  40. package/skills/onlymapjs/SKILL.md +3 -2
  41. package/skills/onlymapjs/references/syntax.md +5 -3
@@ -53,6 +53,37 @@ export interface Selection {
53
53
  featureKey?: string;
54
54
  rawMetadata?: Tile3DPickMetadata["rawMetadata"];
55
55
  }
56
+ /**
57
+ * Programmatic picking (docs/design/pick-api.md). `"authored"` picks only the
58
+ * layers the author made `pickable`; `"all"` makes every layer pickable for as
59
+ * long as it is set — every pick path, hover and click included, not only the
60
+ * query methods. A property, never an attribute: a picker tool arms it and
61
+ * restores it, and it never reaches the manifest, undo history, or a save.
62
+ */
63
+ export type PickMode = "authored" | "all";
64
+ /** `pickAt` searches this many CSS pixels around the point unless told otherwise — deck's own default of 0 misses a 2px point under a finger or a mouse. */
65
+ export declare const PICK_AT_DEFAULT_RADIUS = 4;
66
+ /** `pickRect` returns at most this many objects unless told otherwise. */
67
+ export declare const PICK_RECT_DEFAULT_MAX = 100;
68
+ export interface PickAtOptions {
69
+ /** CSS pixels around the point to search. Default {@link PICK_AT_DEFAULT_RADIUS}. */
70
+ radius?: number;
71
+ /** Restrict to these authored `<om-layer id>`s. Default: every layer. */
72
+ layers?: readonly string[];
73
+ }
74
+ export interface PickRectOptions {
75
+ /** Restrict to these authored `<om-layer id>`s. Default: every layer. */
76
+ layers?: readonly string[];
77
+ /** Upper bound on returned objects. Default {@link PICK_RECT_DEFAULT_MAX}. */
78
+ maxObjects?: number;
79
+ }
80
+ /** A screen rectangle in CSS pixels relative to the map's top-left corner. */
81
+ export interface PickRect {
82
+ x: number;
83
+ y: number;
84
+ width: number;
85
+ height: number;
86
+ }
56
87
  interface PickingInfoLike {
57
88
  layer?: {
58
89
  id: string;
@@ -1,4 +1,4 @@
1
- import { c as E, a3 as N } from "./index-pu3BNjzA.js";
1
+ import { c as E, a3 as N } from "./index-BTTCf4nb.js";
2
2
  const z = Math.PI / 180, O = 45, W = 24, T = /* @__PURE__ */ new Map();
3
3
  let b = null;
4
4
  function I(e) {
package/dist/version.d.ts CHANGED
@@ -5,4 +5,4 @@
5
5
  * the build rootDir, and a `define` would need repeating across vite/vitest/
6
6
  * vite-node configs.
7
7
  */
8
- export declare const LIBRARY_VERSION = "0.11.3";
8
+ export declare const LIBRARY_VERSION = "0.11.5";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Whether a projected anchor sits behind the camera, from the depth
3
+ * `viewport.project` returns as its third component.
4
+ *
5
+ * Only a perspective (geographic) camera has a "behind". A projected map
6
+ * (`crs=`) renders through an orthographic viewport, whose depth for every
7
+ * ground point is about -1 — read as "behind the camera", that hid every
8
+ * `<om-overlay>` on every projected map, popups included (reproduced on an
9
+ * EPSG:5070 cartograph frame, e2e/plane-pick.spec.ts). deck marks the
10
+ * orthographic viewport `isGeospatial: false`; the basemap adapter's viewport
11
+ * returns no depth at all.
12
+ */
13
+ export declare function isBehindCamera(viewport: {
14
+ isGeospatial?: boolean;
15
+ }, depth: number | undefined): boolean;
@@ -1,5 +1,5 @@
1
- import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-hQh5cG3e.js";
2
- import { c as gr } from "./index-pu3BNjzA.js";
1
+ import { A as ur, d as lr, R as zt, e as fr, m as dr, p as St, f as hr, k as pr, l as mr } from "./raster-pipeline-Dxs9TpD6.js";
2
+ import { c as gr } from "./index-BTTCf4nb.js";
3
3
  import $t from "./index-CW1n5LdO.js";
4
4
  var Et;
5
5
  function h(e, t, n) {
@@ -22,8 +22,8 @@ to PDF at true page size via CSS `@page` and exports PNG/JPEG at print DPI throu
22
22
  <html>
23
23
  <head>
24
24
  <meta charset="utf-8">
25
- <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.11.3/dist/cartograph.standalone.js"></script>
26
- <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.11.3/dist/cartograph.css">
25
+ <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.11.5/dist/cartograph.standalone.js"></script>
26
+ <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.11.5/dist/cartograph.css">
27
27
  </head>
28
28
  <body>
29
29
  <om-cartograph cartograph-id="cg-lot-12" format="cartograph/2" size="A4" theme="minimal"
@@ -85,7 +85,7 @@ The authoritative attribute lists (with editor IntelliSense) are generated from
85
85
  |---|---|---|
86
86
  | `<om-cartograph>` | Page root: `cartograph-id`, `format="cartograph/2"`, `size` (A5–A0/Letter/Legal) or `width`/`height` (mm), `orientation`, `theme` plus its per-page overrides `bg`, `color`, `font`, `title`, `attribution`; print controls `bleed`, `crop-marks`, `safe-zone`, `dpi`, `flatten`, `color-profile`; `cvd`; `allow-url-actions` | implemented |
87
87
  | `<om-frame>` | A placed map. `mode="static"`: a georeferenced `<img>` child placed by `crs` + `corners`. `mode="live"` (the default): mounts `<om-map>` from `src=`, an `<om-source>` child or an inline child with the frame's own `center/zoom/bearing/pitch`; `overview-of` draws another frame's footprint; `attribution` (static frames) carries the basemap's provider credit as text | implemented |
88
- | `<om-source>` | One place a frame's picture may come from — `src` (a map document `.html`, or a capture image), plus `corners`/`crs`/`crs-def` for a capture. A frame tries its sources in document order and shows the first that renders | implemented |
88
+ | `<om-source>` | One place a frame's picture may come from — `src` (a map document `.html`, or a capture image), plus `corners`/`crs`/`crs-def` and `attribution` for a capture. A frame tries its sources in document order and shows the first that renders | implemented |
89
89
  | `<om-text>` | Text block — `kind` (title/text/attribution), `font-size` (pt), `weight`, `align`, `font`, `color`, `bg`; body may use `{{tokens}}` | implemented |
90
90
  | `<om-scalebar>` | Scale bar — `for`, `units` (metric/imperial/nautical), `segments`, `segment-length`, `kind` (single/double/line/ticks), `color` | implemented |
91
91
  | `<om-north>` | North indicator — `for`, `kind` (arrow/rose), `color`. Direction is derived from the frame's georeference | implemented |
@@ -488,6 +488,11 @@ OpenStreetMap once, and no inset loses a corner of its map to a credit.
488
488
  frame's `attribution` attribute — `attribution="© OpenStreetMap contributors · © CARTO"`
489
489
  — so a frozen or exported sheet credits its tiles with no runtime loaded.
490
490
  Write the attribute yourself for a placed raster whose tiles need credit.
491
+ - **So do fallback captures.** A capture `<om-source>` takes the same
492
+ `attribution`, and the sheet prints it while that capture is what the frame
493
+ shows. A capture is only shown when the live map did not load, so it cannot
494
+ be asked — record the credit when the capture is taken, as you record its
495
+ `corners`. The live map's own credit applies only while the map is showing.
491
496
  - **Credit them yourself, and the line steps aside.** A provider already named
492
497
  in any `<om-text>` (case, `©` and `(c)` ignored) is left out of the page's
493
498
  line; when every provider is covered, the line disappears.
package/llms.txt CHANGED
@@ -26,7 +26,8 @@ Programmatic/native bridge rule: `MapController.setLayers()` accepts normal func
26
26
  - `id` is required on every `<om-layer>`. `label` and `color` feed the legend; an explicit `get-fill-color` overrides `color` for rendering (both together is valid and common). The legend widget also reads `get-fill-color` itself: a `sequential`/`diverging` scale renders as a gradient ramp with domain labels, a `threshold` scale as discrete class ranges, and an equality ternary chain (`$f == 'a' ? '#c1' : '#c2'`) as a category palette — write those canonical shapes and the legend describes the symbology automatically.
27
27
  - Full JavaScript in accessor blocks needs the `js` attribute on the layer (`<om-layer js>` + `<script type="om/accessors">`). Without it, blocks are restricted to `export const name = d => <expression>` — no statements, no loops, no nested functions.
28
28
  - Dashed lines are a single attribute: `dash="[6, 3]"` (or SVG-style `dash="6 3"`, plus optional `dash-justified`) on a path-stroking layer (`PathLayer`, `GeoJsonLayer`, `PolygonLayer`, `TripsLayer`). Do NOT hand-wire deck's `PathStyleExtension`/`getDashArray` — the attribute mounts it for you. Values are `[dashLength, gapLength]` in the SAME units as the line width; `dash` on a non-path layer (ScatterplotLayer, etc.) is ignored with a warning.
29
- - To capture where the user CLICKS on the map (a measure tool, drop-a-pin, a custom rectangle/circle AOI, snap-to-feature), listen for the `om-map-point` event on `<om-map>`: `mapEl.addEventListener('om-map-point', e => { const { coordinate, kind } = e.detail; })` — `coordinate` is `[lng,lat]` (or `null` off-globe), `kind` is `"click"`|`"hover"`, and it fires on every click/hover including empty-map clicks. Do NOT reach for deck.gl internals (`mapEl.getMap()`, `.deckInstance`, `.deck.viewManager`) or unproject canvas pixels — those are not exposed on `<om-map>` and return nothing. The built-in `draw` widget handles polygon/line/point sketching; `om-map-point` is for tools it doesn't cover.
29
+ - To capture where the user CLICKS on the map (a measure tool, drop-a-pin, a custom rectangle/circle AOI, snap-to-feature), listen for the `om-map-point` event on `<om-map>`: `mapEl.addEventListener('om-map-point', e => { const { coordinate, kind } = e.detail; })` — `coordinate` is `[lng,lat]` (or `null` off-globe), `kind` is `"click"`|`"hover"`, and it fires on every click/hover including empty-map clicks. Do NOT reach for deck.gl internals (`mapEl.getMap()`, `.deckInstance`, `.deck.viewManager`) — those are not exposed on `<om-map>` and return nothing — and do not unproject canvas pixels by hand: `mapEl.unproject([x, y])` returns `[lng, lat]` (0.11.5+). The built-in `draw` widget handles polygon/line/point sketching; `om-map-point` is for tools it doesn't cover.
30
+ - To ask what is UNDER a pixel or INSIDE a screen rectangle from page code (a picker that tells an assistant which feature the user means, box-select, a hit-test), call `mapEl.pickAt([x, y], {radius, layers})` → one `Selection` (`{layerId, object, index, coordinate, pixel, type}`) or `null`, searching 4px around the point; and `mapEl.pickRect({x, y, width, height}, {layers, maxObjects})` → `Selection[]` front to back, default cap 100, each `coordinate` null (0.11.5+). These are queries: they change no `ctx.selection`, fire no `om-map-point`, run no behaviors. Only `pickable` layers answer — for a tool that must see every layer set the PROPERTY `mapEl.pickMode = "all"` while armed and back to `"authored"` after; never write `pickable` attributes or fire `set-pickable` for this, which edits the author's document. While `"all"`, hover, click and `pick-cursor` also see every layer. `MapController` has the same `pickAt`/`pickRect`/`unproject`/`pickMode`.
30
31
  - `<om-widget type="draw" modes="point line polygon" target="sketch" save="both" autosave="<key>">` is the sketch-capture toolbar — `target` binds the store a `data="draw:<target>"` layer reads. Lines/polygons complete via double-click, touch double-tap (iOS WebViews never synthesize `dblclick` from taps — the library detects the tap pair itself, so touch parity is native), Enter, or the toolbar's explicit **Finish** button; Escape cancels the in-progress shape. `export-3d` (bare = GLB, `="b3dm"` for Cesium/3D-Tiles pipelines) adds an "Export 3D" button (issue #34), separate from `save` (that's the drawn shape's own GeoJSON): outline a polygon over loaded `Tile3DLayer`/`BIMLayer` content, close it, and it clips every loaded tile's triangles to that footprint (a plain 2D clip, no elevation-picking involved), re-frames them to a local coordinate frame at the footprint's centroid, and downloads it, each triangle carrying its own source color (vertex colors) — no textures (BIM/IFC materials are flat colors, not textured meshes). Only currently-VISIBLE 3D Tiles/BIM layers are included — `visible="false"` (or `toggle-layer`) excludes a layer, with distinct console warnings for "nothing loaded" vs. "everything hidden." Validation warns on an unrecognized `export-3d` value.
31
32
  - Clip box (issue #34): `<om-map clip-box-min="[lng,lat,elev]" clip-box-max="[lng,lat,elev]">` cuts a real axis-aligned 3D box through the whole scene — geometry outside it discarded, every layer clipped by default (`clip="off"` on an `<om-layer>` opts out), works on ANY layer type including georeferenced `Tile3DLayer`/`BIMLayer` content (not just flat `GeoJsonLayer` extrusions). `clip-box-invert` shows outside instead of inside; `clip-box-highlight` dims clipped-out geometry instead of discarding it (non-destructive preview). Attribute-backed (undoable, story-steppable) via `set-clip-box {min, max, invert?, highlight?}` (`{clear:true}` removes it) and `<om-widget type="clip-box">` (six number inputs + invert/highlight checkboxes + clear button). v1 is axis-aligned only — rotation is a documented follow-up.
32
33
  - `<om-widget type="measure" modes="distance area volume" units="metric|imperial|nautical">` is the geodesic ruler: click to place points, live labels + a totals panel, read the value programmatically via the `om-measure` event (`detail.mode`/`.totalMeters`/`.areaMeters2`/`.perimeterMeters`/`.cutMeters3`/`.fillMeters3`/`.netMeters3`/`.totalMeters3`/`.cutAdjustedMeters3`/`.fillAdjustedMeters3`/`.cutMassKg`/`.fillMassKg`/`.stale`/`.profileSeries` — profile points are `{x: metres from the first vertex, y: elevation}` plus `vertexIndex` on the samples that ARE drawn corners, so a chart can mark them; vertex 0 is the leftmost, and with `profile` on the map badges the first two vertices `1 · Start` and `2` in draw order so the ring's winding direction is readable at constant cost, while the chart marks every corner). `volume` outlines a footprint like `area` (close it with a double-click/double-tap/Enter — it turns solid teal, "ready"), then a fixed-screen-pixel-size double-headed arrow gizmo appears at the centroid: drag up to fill, down to cut (unbounded distance), reading Cut/Fill/Net (signed, fill−cut)/Total (unsigned, cut+fill) — always RAW geometric volumes, never altered by `swell`/`shrink`. It REQUIRES `terrain` on `<om-map>` (validation warns a `volume` mode with none — cut/fill against flat ground with no elevation surface has nothing to measure against). The math is a REAL per-cell grid integration: closing a footprint bulk-loads its covering DEM tiles and integrates terrain-vs-base per cell on a metric tangent-plane grid (cell size = the DEM's GSD, scanline point-in-polygon, bilinear seam-correct sampling, worker-offloaded) — mixed cut AND fill in one footprint on undulating ground, with `cellSizeM`/`gsdM`/`cutErrorM3`/`fillErrorM3` (± = per-cell cellArea × 1.5 × GSD, per side)/`nodataFraction` published on the readout; without terrain a flat-plane fallback runs with no error figures. `base-surface` picks the reference: `custom` (default — the gizmo's target plane) or boundary-derived stockpile strategies with no gizmo (`triangulated` boundary TIN, `plane`, `lowest`, `highest`, `average`). Five more volume-only attributes (no-ops, and validation warns, without `volume` in `modes`): `base-surface` (above); `profile` (elevation samples around the footprint's own perimeter, live while sketching, dispatched on `profileSeries` for a paired `dynamic-chart`); `deadband` (m³, zeroes a Cut/Fill figure below the threshold); `density` (t/m³ metric, lb/yd³ imperial) and `swell`/`shrink` (multipliers, default 1×) populate a separate Material section instead — Bank/Loose/Compacted convention, `cutAdjustedMeters3` = raw × swell (loose/haul, bigger), `fillAdjustedMeters3` = raw ÷ shrink (loose/borrow needed, also bigger), tonnage from the raw (mass-conserving) volume — shown only once one of the three is actually configured.
@@ -45,7 +46,7 @@ Programmatic/native bridge rule: `MapController.setLayers()` accepts normal func
45
46
  - `<om-behavior on="click|hover|drag|load|data-loaded" layer="..." action="...">` — declarative interaction (`pick="point"|"cluster"` narrows it to standalone points or count bubbles on a `cluster="true"` layer). Built-in actions: `show-overlay`, `hide-overlay`, `show-tooltip`, `hide-tooltip`, `toggle-layer`, `set-layer-attribute` (`{layer, name, value}` — write ANY layer attribute at runtime by its kebab-case name, `value: null` removes; the generic on/off switch for a widget button, e.g. `name: "cluster"`), `expand-cluster` (`{feature, layer}` or `{layer, clusterId}` — fly to where a bubble splits), `set-pickable` (`{layer, pickable: true|false|"3d"}` — runtime picking/popup toggle, story-capturable; the per-layer popup on/off switch a viewer-facing export needs), `filter-layer`, `highlight-feature`, `zoom-to-feature`, `set-basemap`, `undo`, `redo`; scene/tool actions `set-lighting`, `set-effect` (`{preset}` — swap a post-process finish; see the effects bullet), `set-terrain`, `set-clip-box` (`{min,max,invert?,highlight?}` / `{clear:true}`), `clip-box-edit` (`{editing}`), `export-region-3d` (`{target?, format?:"glb"|"b3dm"}` — what the draw widget's `export-3d` button emits), the draw actions `draw-mode` (`{target?:"sketch", mode:"point"|"line"|"polygon"|null}` — null exits drawing), `draw-commit`, `draw-cancel`, `draw-delete` (removes the last shape), `draw-clear`, `draw-config` (`{target?, autosave?, fillColor?, lineColor?}`) and `draw-save` (`{target?, format?:"download"|"file-system"|"both"}`) — every one of these drives the same store a `data="draw:<target>"` layer reads, so a custom toolbar can replace `<om-widget type="draw">` entirely; and the measure actions `measure-mode` (`{mode:"distance"|"area"|"volume"|null}`), `measure-units`, `measure-clear`, `measure-config` (`{profile?, baseSurface?, density?, swell?, shrink?, deadband?}`), `measure-flat-target-plane` (`{flat}`). One payload contract everywhere: `{ layer, target, feature, featureId, coordinate }`. A `show-tooltip` popup DISMISSES ITSELF when the selection clears — the pointer leaving the feature for a hover, or a click on empty map for a click — so you never wire `hide-tooltip` by hand for that. A tooltip whose template contains an interactive `[data-emit]` element takes pointer events and so does NOT close when clicked, which is what lets it carry its own close button.
46
47
  - Undo/redo is built in: user-facing manifest changes (layer toggles, filter changes, basemap switches, element add/remove, drawn sketches) are recorded automatically — the manifest is the state. `<om-widget type="undo-redo">` renders the buttons; Cmd/Ctrl-Z, Shift-Cmd/Ctrl-Z, and Ctrl-Y work on any map (text inputs keep their native undo). Camera moves, hover effects, and story playback are deliberately NOT undo steps. Widget scripts: `ctx.history.canUndo/canRedo` with watch token `history`; `ctx.emit("undo")`/`ctx.emit("redo")`.
47
48
  - `<om-fallback>` — static no-JS fallback, direct child of `<om-map>` (one per map, no attributes, plain HTML content — links allowed). Shown ONLY where scripts never run (chat-app/email file previews — iOS QuickLook renders HTML attachments with JS off — file managers, sandboxed webviews); hidden automatically once the map boots. GOOD PRACTICE: include one on every complete page, especially pages that may be shared as a file. To PRODUCE a shareable single file, `npx @nika-js/onlymap export map.html` embeds every relative data/src/scenegraph URL as a data: URL (format detection preserved — the original extension rides a #name.ext fragment), pins relative library refs to the CDN, adds a generic om-fallback when missing, and warns when embedded data is heavy (>1 MB per file / >5 MB total) or when a source cannot be embedded (shapefile sidecars, COG Range streams, Zarr directories, {z}/{x}/{y} templates — those need hosting) ("This interactive map requires JavaScript — open this file in a web browser", plus a hosted-version link when one exists). Without one, the stylesheet shows a generic text-only banner. The gate is pure CSS (`om-map:not(:defined)` in onlymapjs.css) refined by the `scripting` media feature on 2023+ engines: with scripting DISABLED the fallback shows instantly; with scripting ENABLED it never flashes during a slow load and only surfaces after a ~4s grace with load-failure wording (blocked/unreachable bundle). The CSS must load without JS — a real `<link rel="stylesheet">` or inlined `<style>` on no-build pages; a bundler-emitted stylesheet is fine in npm projects.
48
- - PRINT LAYOUTS (`@nika-js/onlymap/cartograph`, separate lazy entry — the core bundle does not grow): `<om-cartograph size="A3" orientation="landscape">` is a standalone page measured in MILLIMETRES carrying `<om-frame>`s (live `<om-map>` with the frame's own camera, or `mode="static"` georeferenced rasters placed by `crs`+`corners`). A frame may declare SEVERAL sources and show the first that renders: `src=` is shorthand for the first `<om-source src=>`, then each `<om-source>` child in document order, and an inline `<om-map>` outranks both. The kind comes from the extension (`.html` = map document, an image extension = capture); a capture MUST carry its own `corners` (+`crs`), because when it is what gets shown the live map did not load and its projection is unknowable. "Rendered" means one drawable thing after settle — a basemap, or rows on any layer — NOT every layer loaded; this exists because a sheet opened outside its host mounts a map whose every layer failed and still reports success, showing a blank box inside correct furniture. The frame reports its choice as `data-om-carto-source="<index>"` and an `om-frame-source` event, and fires `om-frame-view` on a switch so furniture re-places. A stored sheet is renderable IN PLACE, not portable — capture paths are relative; export inlines the map and embeds the rasters plus cartographic furniture: `<om-legend for="...">` (rows DERIVED from the live map's own symbology incl. classified breaks; author literal `<om-legend-row>`s with `derived="false"`), `<om-scalebar>` (metric|imperial|nautical), `<om-north>`, `<om-graticule>` (4326/3857/UTM), `<om-shape>`, `<om-image>`, `<om-text>` with `{{title}}`/`{{date}}`/`{{frame.<id>.scale}}`/`{{atlas.<field>}}` tokens. Look: `theme=` (default|dark|sepia|blueprint|minimal) on the page, overridden per attribute — the page's `bg`/`color`/`font`, a legend's `bg`/`color`/`stroke`/`font-size`(pt)/`padding`(mm), `color` on scale bar, north and graticule, `color`/`bg` on text, `fill`/`stroke` on shapes; there is no `background=`/`border=`/`padding=` elsewhere. `overview-of="<frame-id>"` draws a locator inset's footprint. A live frame georeferences whatever its map shows: zoomed out past the whole world, the map wraps inside the frame like any web map (the graticule labels each copy, the scale bar measures its own row) — the frame never limits or changes the camera, and once the map inside it settles after a pan/rotate/tilt the frame's georeference follows the map's own view, so north arrow, scale bar, graticule, locator and `{{frame.<id>.scale}}` describe what is on screen (and a freeze captures that view). `max-pitch` and `min-zoom` on `<om-map>` exist as author-set controls for kiosk-style maps and are never applied automatically. `<om-atlas for="<frame-id>" layer="<layer-id>">` renders one page per feature (sequentially through ONE live map — WebGL context limits make cloned pages fail at scale) and exports a ZIP; frames follow with `atlas-fit="feature"`, and `atlas-margin` is a FRACTION of the feature's extent (default 0.15, useful range 0.1–0.3) — the one spatial number here that is NOT millimetres; `atlas-margin="10"` pads each side by ten feature-widths and shows every page as a speck. A reader pages an atlas with the arrow keys / PageUp / PageDown / Home / End, or the on-sheet pager (`‹ 3 / 49 · name ›`, screen-only — never printed or exported; `pager="none"` on `<om-atlas>` removes it); a host embedding the sheet cross-origin gets `{source:"onlymap-cartograph", type:"atlas-page", index, count, name}` posted to its window and can post `{source:"onlymap-cartograph-host", type:"atlas-seek", index}` back. Print via `page.print()` or `?print=1` (true page size via @page; live frames swap to print-DPI captures first), PNG via `renderCartograph(page, {dpi})` or `?export=png&dpi=300`. `bleed`/`crop-marks`/`safe-zone` (screen-only guide)/`flatten` are press-shop attributes; `cvd="deuteranopia|protanopia|tritanopia|achromatopsia"` simulates colour-vision deficiencies page-wide and `lintLegendColours()` flags collapsing palettes. Free plan: a small foot credit is injected ON THE SHEET — suppressed by any authored `om-text` crediting OnlyMap, or by a paid key on a live frame's map. A map inside a frame carries NO badge of its own (the sheet credits the page once), so a sheet with several live frames still shows one credit. Basemap attribution moves the same way: a framed map draws no attribution control, and the sheet prints every frame's providers (OpenStreetMap, CARTO, …) ONCE at the page's bottom-right; `freeze()` records them in the frame's `attribution` attribute ("© OpenStreetMap contributors · © CARTO") so a static sheet still credits its tiles with no runtime; a provider already named in an authored `om-text` is left out of the line. Deep reference: docs/cartograph.md.
49
+ - PRINT LAYOUTS (`@nika-js/onlymap/cartograph`, separate lazy entry — the core bundle does not grow): `<om-cartograph size="A3" orientation="landscape">` is a standalone page measured in MILLIMETRES carrying `<om-frame>`s (live `<om-map>` with the frame's own camera, or `mode="static"` georeferenced rasters placed by `crs`+`corners`). A frame may declare SEVERAL sources and show the first that renders: `src=` is shorthand for the first `<om-source src=>`, then each `<om-source>` child in document order, and an inline `<om-map>` outranks both. The kind comes from the extension (`.html` = map document, an image extension = capture); a capture MUST carry its own `corners` (+`crs`), because when it is what gets shown the live map did not load and its projection is unknowable. "Rendered" means one drawable thing after settle — a basemap, or rows on any layer — NOT every layer loaded; this exists because a sheet opened outside its host mounts a map whose every layer failed and still reports success, showing a blank box inside correct furniture. The frame reports its choice as `data-om-carto-source="<index>"` and an `om-frame-source` event, and fires `om-frame-view` on a switch so furniture re-places. A stored sheet is renderable IN PLACE, not portable — capture paths are relative; export inlines the map and embeds the rasters plus cartographic furniture: `<om-legend for="...">` (rows DERIVED from the live map's own symbology incl. classified breaks; author literal `<om-legend-row>`s with `derived="false"`), `<om-scalebar>` (metric|imperial|nautical), `<om-north>`, `<om-graticule>` (4326/3857/UTM), `<om-shape>`, `<om-image>`, `<om-text>` with `{{title}}`/`{{date}}`/`{{frame.<id>.scale}}`/`{{atlas.<field>}}` tokens. Look: `theme=` (default|dark|sepia|blueprint|minimal) on the page, overridden per attribute — the page's `bg`/`color`/`font`, a legend's `bg`/`color`/`stroke`/`font-size`(pt)/`padding`(mm), `color` on scale bar, north and graticule, `color`/`bg` on text, `fill`/`stroke` on shapes; there is no `background=`/`border=`/`padding=` elsewhere. `overview-of="<frame-id>"` draws a locator inset's footprint. A live frame georeferences whatever its map shows: zoomed out past the whole world, the map wraps inside the frame like any web map (the graticule labels each copy, the scale bar measures its own row) — the frame never limits or changes the camera, and once the map inside it settles after a pan/rotate/tilt the frame's georeference follows the map's own view, so north arrow, scale bar, graticule, locator and `{{frame.<id>.scale}}` describe what is on screen (and a freeze captures that view). `max-pitch` and `min-zoom` on `<om-map>` exist as author-set controls for kiosk-style maps and are never applied automatically. `<om-atlas for="<frame-id>" layer="<layer-id>">` renders one page per feature (sequentially through ONE live map — WebGL context limits make cloned pages fail at scale) and exports a ZIP; frames follow with `atlas-fit="feature"`, and `atlas-margin` is a FRACTION of the feature's extent (default 0.15, useful range 0.1–0.3) — the one spatial number here that is NOT millimetres; `atlas-margin="10"` pads each side by ten feature-widths and shows every page as a speck. A reader pages an atlas with the arrow keys / PageUp / PageDown / Home / End, or the on-sheet pager (`‹ 3 / 49 · name ›`, screen-only — never printed or exported; `pager="none"` on `<om-atlas>` removes it); a host embedding the sheet cross-origin gets `{source:"onlymap-cartograph", type:"atlas-page", index, count, name}` posted to its window and can post `{source:"onlymap-cartograph-host", type:"atlas-seek", index}` back. Print via `page.print()` or `?print=1` (true page size via @page; live frames swap to print-DPI captures first), PNG via `renderCartograph(page, {dpi})` or `?export=png&dpi=300`. `bleed`/`crop-marks`/`safe-zone` (screen-only guide)/`flatten` are press-shop attributes; `cvd="deuteranopia|protanopia|tritanopia|achromatopsia"` simulates colour-vision deficiencies page-wide and `lintLegendColours()` flags collapsing palettes. Free plan: a small foot credit is injected ON THE SHEET — suppressed by any authored `om-text` crediting OnlyMap, or by a paid key on a live frame's map. A map inside a frame carries NO badge of its own (the sheet credits the page once), so a sheet with several live frames still shows one credit. Basemap attribution moves the same way: a framed map draws no attribution control, and the sheet prints every frame's providers (OpenStreetMap, CARTO, …) ONCE at the page's bottom-right; `freeze()` records them in the frame's `attribution` attribute ("© OpenStreetMap contributors · © CARTO") so a static sheet still credits its tiles with no runtime; a capture `<om-source>` takes the same `attribution` (credited while it is the source shown — record it with the capture's `corners`, since a shown capture means the map did not load); a provider already named in an authored `om-text` is left out of the line. Deep reference: docs/cartograph.md.
49
50
  - POST-PROCESS EFFECTS: `<om-effect>` children of `<om-map>` ARE deck's `effects` array — document order is pipeline order. Three lanes, exactly one per element: `preset="vintage|engraved|night|blueprint|riso|newsprint|muted"` (a named finish; override one knob with `<op>-<param>`, e.g. `grain-amount="0.02"`, or get the preset as markup from `OmMap.expandPreset(name)`); `op="tint|levels|saturation|posterize|vignette|grain|edges|blur|sharpen|halftone"` with that op's knobs as attributes; or an inline `<script type="application/json">` luma ShaderModule passed to deck untouched (raw GLSL, multi-pass). Spatial knobs are MILLIMETRES (`size="0.12mm"`) and resolve against the live pixel density, so a look keeps its physical size at print DPI — a pixel value is a validation error. Consecutive pointwise ops compile into ONE pass; only neighbourhood ops (edges/blur/sharpen/halftone) cost a pass each. A preset is literally a saved op list. `set-effect {preset}` swaps it live by writing the document, and `<om-widget type="effects">` renders that as preset radios plus Off, mirroring the document rather than holding state (undoable; NOT story-rewindable yet — a step can apply it, but `seek()` back will not remove it, because rewind restores `<om-map>` attributes and this adds a child element). Programmatic twin: `MapController.setEffects(effects | null)` hands deck `Effect` instances directly and outranks the document's chain while set. Deep reference: docs/effects.md. CAVEAT: a pass runs over deck's framebuffer, so with a MapLibre basemap the basemap underneath is untouched — the validator warns and suggests `basemap="none"` with the base drawn as layers.
50
51
  - Animation: `transition="get-fill-color 800ms, get-radius 400ms"` on a layer GPU-animates prop changes (also smooths streaming updates via `get-position`). Camera: the `fly-to` action takes `center`/`zoom`/`pitch`/`bearing`/`duration` (e.g. `duration="2s"`) — use it in behaviors or `data-emit` buttons; `zoom-to-feature` also accepts `duration`.
51
52
  - Pull-model frame rendering (external video frameworks such as Remotion): mark the map `data-om-recording` (the determinism switch — instant camera, no transitions/gesture interrupts, byte-stable `snapshot()`), then per frame `story.seek(t, {interpolateCamera: true})` + `await mapEl.whenSettled()` + capture; the same frame is byte-identical across processes and orderings. Story effect verbs (fade/pulse/trace/populate) evaluate as pure functions of story time under the switch — a seek landing mid-trace renders the half-drawn outline; only effects dispatched OUTSIDE a story (behaviors, ctx.emit) snap to their end state. `onlymapjs record` remains the built-in push-model path; `@nika-js/onlymap-remotion` packages the pull-model path for Remotion.
@@ -4156,6 +4156,10 @@
4156
4156
  {
4157
4157
  "name": "crs-def",
4158
4158
  "description": "Proj string (\"+proj=…\") for a CRS the library doesn't bundle."
4159
+ },
4160
+ {
4161
+ "name": "attribution",
4162
+ "description": "A capture's basemap credit as plain text, entries separated by \" · \" — printed in the sheet's corner while this capture is what the frame shows. A capture is shown because the live map did not load, so it cannot be asked; record the credit when the capture is taken."
4159
4163
  }
4160
4164
  ],
4161
4165
  "references": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nika-js/onlymap",
3
- "version": "0.11.3",
3
+ "version": "0.11.5",
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.11.3` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.11.3/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.
26
+ For no-build CDN pages, use the single-file standalone bundle from a raw-file CDN — `https://unpkg.com/@nika-js/onlymap@0.11.5` (the bare package URL serves `dist/onlymap.standalone.js`) — plus `<link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.11.5/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
 
@@ -104,7 +104,8 @@ Load the smallest reference needed for the task:
104
104
  - Measure cut/fill volume (earthworks/stockpiles — how much material a shape holds, or how much to add/remove to reach a target elevation) -> `modes="distance area volume"` on the same `measure` widget. Outline a footprint (closes like `area`); the math is a REAL per-cell grid integration against the map's terrain DEM (metric tangent-plane grid at the DEM's own GSD, scanline point-in-polygon, bilinear seam-correct sampling, worker-offloaded) — mixed cut AND fill within one footprint on undulating ground, with `cellSizeM`/`gsdM`/`cutErrorM3`/`fillErrorM3` (± = per-cell cellArea × 1.5 × GSD) and `nodataFraction` published on the readout. `base-surface` picks the reference: `custom` (default — a draggable gizmo target plane, re-summed live per drag frame) or boundary-derived stockpile strategies with NO gizmo (`triangulated` boundary TIN — recommend this for "measure this pile/mound", `plane`, `lowest`, `highest`, `average`). Reads out `cutMeters3`/`fillMeters3`/`netMeters3` (signed, fill−cut)/`totalMeters3` (unsigned, cut+fill) — always RAW geometric volumes, never altered by `swell`/`shrink`. REQUIRES `terrain` on `<om-map>` — a `volume` mode with none is a validation warning (falls back to a flat-plane approximation with no error figures). Volume-only attributes, all no-ops (validation warns) without `volume` in `modes`: `base-surface`; `profile` (elevation samples around the footprint's own perimeter, live while sketching — dispatched on `profileSeries` for a `dynamic-chart` widget to plot; each point is `{x, y}` plus `vertexIndex` on the samples that ARE the drawn corners, so a spec can mark them with `isValid(datum.vertexIndex)` — vertex 0 is the chart's leftmost point, and the map badges the FIRST TWO vertices `1 · Start` and `2` in draw order (1-based display; the field stays 0-based) so the ring's winding direction is readable rather than guessed — two badges fix a direction at constant cost, while the chart still marks every corner — that widget is generic: `<om-widget type="dynamic-chart" on="om-measure" series-field="profileSeries" width="320">` reads `event.detail[seriesField]` on every matching event and redraws, and "freezes" for free when a later event simply omits that field); `deadband` (zeroes a Cut/Fill figure below the threshold); `density`/`swell`/`shrink` populate a SEPARATE Material section (Bank/Loose/Compacted convention — `cutAdjustedMeters3` = raw × swell, `fillAdjustedMeters3` = raw ÷ shrink, `cutMassKg`/`fillMassKg` from the raw, mass-conserving volume), shown only once one of the three is configured — never baked into the primary Cut/Fill/Net/Total numbers. A `stale` readout field flags the window between a footprint committing and its integration resolving.
105
105
  - Need a real ELEVATION on a click/hover (a z readout, a tooltip showing the height of the building face under the cursor, a coordinate that lands on 3D content rather than the ground behind it) -> `pickable="3d"` on the layer instead of a bare `pickable` (issue #34): it opts the layer into deck's depth-pick pass, and the resolved coordinate carries a third component. Read it as `{{z}}` in an `<om-overlay>` / `show-tooltip` template or `ctx.selection.coordinate` in a widget script. `terrain` sets this on itself. `{{z}}` is ABSENT (not `0`) when no layer in the scene ran the depth pass for that pick — do not treat a missing elevation as sea level.
106
106
  - Small transient overlay that tracks the cursor near a map edge (a snap tip, a live readout badge) -> add `clip-to-map` to the `<om-overlay>`: it hides when the overlay's own BOX would spill past the map viewport, not just when its anchor leaves. Without it an overhanging absolutely-positioned box inflates the page's scrollable overflow and the scrollbar -> map resize -> reprojection loop shows as view jitter. Opt-in on purpose — an authored popup near an edge normally wants to keep showing its visible half.
107
- - Capture raw map clicks/hovers yourself (measure distance, drop a pin where the user clicks, a custom rectangle/circle AOI, snap-to-feature) -> listen for the **`om-map-point`** DOM event on `<om-map>`: `mapEl.addEventListener('om-map-point', e => { const { coordinate, kind } = e.detail; /* [lng,lat] or null; kind is "click"|"hover" */ })`. It fires on EVERY click/hover including empty-map clicks. NEVER read deck.gl internals (`getMap()`, `deckInstance`, `deck.viewManager`) or unproject canvas pixels by hand — those are not on `<om-map>` and will silently return nothing. The built-in `draw` widget covers polygon/line/point sketching; `om-map-point` is for tools it doesn't. (`MapController` twin: the `onMapPoint` option. See patterns.md.)
107
+ - Capture raw map clicks/hovers yourself (measure distance, drop a pin where the user clicks, a custom rectangle/circle AOI, snap-to-feature) -> listen for the **`om-map-point`** DOM event on `<om-map>`: `mapEl.addEventListener('om-map-point', e => { const { coordinate, kind } = e.detail; /* [lng,lat] or null; kind is "click"|"hover" */ })`. It fires on EVERY click/hover including empty-map clicks. NEVER read deck.gl internals (`getMap()`, `deckInstance`, `deck.viewManager`) — those are not on `<om-map>` and will silently return nothing — or unproject canvas pixels by hand: `mapEl.unproject([x, y])` does it (0.11.5+). The built-in `draw` widget covers polygon/line/point sketching; `om-map-point` is for tools it doesn't. (`MapController` twin: the `onMapPoint` option. See patterns.md.)
108
+ - Ask what is UNDER a pixel or INSIDE a screen rectangle from your own code (a picker that tells an assistant which feature the user means, a box-select, a hit-test before a custom popup) -> `mapEl.pickAt([x, y])` (one `Selection` or null, 4px search radius; `{radius, layers}`) and `mapEl.pickRect({x, y, width, height})` (front to back, `{layers, maxObjects}` default 100, each `coordinate` null), 0.11.5+. They are QUERIES: no `ctx.selection` change, no `om-map-point`, no behaviors. Layers answer only when `pickable` — for a tool that must see every layer, set the PROPERTY `mapEl.pickMode = "all"` while it is armed and `"authored"` after; never `set-pickable` or a `pickable` attribute write, which edits the author's document. `pickMode="all"` makes hover/click and `pick-cursor` see every layer too. Same four on `MapController`.
108
109
  - Page may travel as a file (shared, emailed, downloaded) or be embedded -> add an `<om-fallback>` child to `<om-map>`. Chat-app and email previews render HTML with JavaScript disabled (iOS QuickLook), so the map cannot boot there; the fallback is what recipients see instead. It is hidden automatically once the map boots. Good practice on every complete page — without one, the stylesheet shows a generic text-only banner.
109
110
 
110
111
  ## Output Expectations
@@ -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.11.3/dist/onlymapjs.css">
20
- <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.11.3"></script>
19
+ <link rel="stylesheet" href="https://unpkg.com/@nika-js/onlymap@0.11.5/dist/onlymapjs.css">
20
+ <script type="module" src="https://unpkg.com/@nika-js/onlymap@0.11.5"></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).
@@ -90,6 +90,8 @@ Events: `om-map-ready` (boot complete; `await mapEl.ready` is the promise twin),
90
90
 
91
91
  `await mapEl.snapshot()` (also on `MapController`) returns a canvas-only PNG dataURL of the scene — basemap + layers composited at device pixels (`{as: "blob"}` for files; `type`/`quality` for jpeg/webp). DOM widgets, overlays, and the provider attribution are NOT in the pixels: exports must render credits themselves. Await `ready` first; headless maps reject.
92
92
 
93
+ Programmatic picking (0.11.5+, also on `MapController`): `mapEl.pickAt([x, y], { radius?, layers? })` returns the `Selection` under a screen pixel (CSS px from the map's top-left; 4px search radius by default) or `null`; `mapEl.pickRect({ x, y, width, height }, { layers?, maxObjects? })` returns every `Selection` inside a rectangle, front to back, at most 100 by default, each with `coordinate: null` (deck reports no per-object position for a rectangle; raster layers are not sampled); `mapEl.unproject([x, y])` and `mapEl.project([lng, lat])` convert between pixels and `[lng, lat]`. All are queries — they leave `ctx.selection`, `om-map-point` and `<om-behavior>`s alone. They see only `pickable` layers unless the `pickMode` PROPERTY is `"all"`, which makes every layer pickable for every pick path (hover, click and `pick-cursor` included) until set back to `"authored"`. It is a property, not an attribute: it never reaches the document, undo history, or a save — arm it for a picker tool instead of writing `pickable`.
94
+
93
95
  Example:
94
96
 
95
97
  ```html
@@ -736,7 +738,7 @@ A separate lazy entry (`import "@nika-js/onlymap/cartograph"`; CDN: `https://unp
736
738
  - `<om-atlas for="<frame-id>" layer="<layer-id>">` renders one page per feature sequentially and exports a ZIP. Frames follow with `atlas-fit="feature"` (without it every page shows the same view). `atlas-margin` is a FRACTION of the feature's extent (default 0.15, useful range 0.1–0.3) — the one spatial number here that is NOT millimetres; `atlas-margin="10"` pads each side by ten feature-widths and shows every page as a speck — the validator warns on any margin above 2, and on a margin set without `atlas-fit="feature"`, which does nothing. Readers page with the arrow keys / PageUp / PageDown / Home / End or the on-sheet pager (screen-only, never printed or exported; `pager="none"` on `<om-atlas>` removes it); a cross-origin host gets `atlas-page` messages posted to its window and can post `{source:"onlymap-cartograph-host", type:"atlas-seek", index}` back.
737
739
  - Output: `page.print()` / `?print=1` (PDF at page size), `renderCartograph(page, {dpi})` / `?export=png&dpi=300` (PNG). Press attributes: `bleed`, `crop-marks`, `safe-zone` (screen-only), `flatten`. `cvd="deuteranopia|…"` simulates colour-vision deficiency; `lintLegendColours()` flags collapsing palettes.
738
740
  - Free plan injects a small foot credit — suppressed by an authored `om-text` crediting OnlyMap or a paid key on a live frame's map.
739
- - Basemap attribution is printed ONCE by the sheet, bottom-right — a framed map shows no attribution control. Do not add per-frame credits or hand-copy the provider list; `freeze()` records it on the frame (`attribution="© OpenStreetMap contributors · © CARTO"`). A provider your own `om-text` already names is left out of the auto line.
741
+ - Basemap attribution is printed ONCE by the sheet, bottom-right — a framed map shows no attribution control. Do not add per-frame credits or hand-copy the provider list; `freeze()` records it on the frame (`attribution="© OpenStreetMap contributors · © CARTO"`); a capture `<om-source>` takes the same attribute and is credited while it is the source shown. A provider your own `om-text` already names is left out of the auto line.
740
742
  - Deep reference: `docs/cartograph.md`.
741
743
 
742
744
  ### `<om-fallback>`