@nika-js/onlymap 0.10.7 → 0.10.9
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 +14 -0
- package/dist/{basemap-BLkOm29L.js → basemap-B2VvspL4.js} +2 -2
- package/dist/cartograph/elements/om-atlas.d.ts +24 -0
- package/dist/cartograph/render.d.ts +12 -0
- package/dist/cartograph.js +712 -592
- package/dist/cartograph.standalone.js +1362 -1242
- package/dist/{geoparquet-DbbUXVXd.js → geoparquet-BJQC6zwS.js} +1 -1
- package/dist/{globe-view-n8TPYgZe.js → globe-view-C3Gaf--d.js} +1 -1
- package/dist/{hillshade-B6l8L37H.js → hillshade-CNtzlYlz.js} +1 -1
- package/dist/{index-CbOQw_BV.js → index-C3S0FWlc.js} +3 -3
- package/dist/{index-BLAVlsST.js → index-CI0vdi2E.js} +1 -1
- package/dist/{index-NAbQYGbu.js → index-CQdTYZ08.js} +3 -3
- package/dist/{index-Dhx6gjQz.js → index-Cp2kquh5.js} +1 -1
- package/dist/{index-sBhuo23e.js → index-D2RzlXff.js} +1 -1
- package/dist/{index-WHzuElLB.js → index-DPEWcZeV.js} +19 -19
- package/dist/{index-B0tkvD0x.js → index-a-wOE5hE.js} +1 -1
- package/dist/{index-mjadez7s.js → index-j_Ojvo4x.js} +1 -1
- package/dist/{index-Bl4588NA.js → index-m3UsmxCq.js} +2 -2
- package/dist/{lerc-C5Oz68We.js → lerc-Bv4RLXha.js} +1 -1
- package/dist/onlymap.standalone.js +2 -2
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-D_esTgsv.js → post-process-effect-Cpbyy4I3.js} +1 -1
- package/dist/{raster-9bYuOeFR.js → raster-D_HU2WuR.js} +3 -3
- package/dist/{raster-pipeline-DxRvTCIO.js → raster-pipeline-BmcWLImS.js} +1 -1
- package/dist/{text-on-path-BGsF6paj.js → text-on-path-ClLwT2eS.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-aO_vxY6e.js → zarr-CCCIYwWt.js} +2 -2
- package/docs/cartograph.md +32 -4
- package/llms.txt +1 -1
- package/onlymapjs.html-data.json +12 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ 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.9 — 2026-09-29
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **An atlas can now be paged by whoever is reading it.** Open a multi-page atlas anywhere — a browser, an app's preview, an exported file — and turn the pages with `←`/`→`, `PageUp`/`PageDown`, `Home` and `End`, or with the small page control at the foot of the sheet (`‹ 3 / 49 · Alabama ›`). Until now a 49-page atlas showed page one everywhere except an editor with its own controls. The control is on-screen only: it never appears in print or in an exported image, and `pager="none"` on `<om-atlas>` removes it for an app that draws its own.
|
|
15
|
+
- **An app embedding a sheet can drive its atlas from outside.** The sheet posts which page is showing to the window that embeds it, and accepts a page to jump to in return — so a host that shows the sheet in an iframe it cannot reach into can still build a pager for it. Details in the atlas section of the cartograph guide.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Validation now catches an `atlas-margin` written in millimetres.** It is a fraction of the feature's extent, the one spatial number in the sheet vocabulary that is not millimetres, and `atlas-margin="10"` pads each page by ten feature-widths — every page a speck. A margin above 2 now warns and names the fix; so does a margin that is not a number, or one set on a frame without `atlas-fit="feature"`, where it does nothing.
|
|
19
|
+
|
|
20
|
+
## 0.10.8 — 2026-09-28
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- **A print sheet credits itself once, not once per map on it.** Every live frame used to carry the corner badge a standalone map carries, so a plate with a main map and two locator insets credited itself three times — and because the badge has a minimum size while a frame does not, on a small inset the badge came out bigger than the frame holding it. The sheet's own foot credit is unchanged, and a map on its own page still carries its badge exactly as before.
|
|
24
|
+
|
|
11
25
|
## 0.10.7 — 2026-09-28
|
|
12
26
|
|
|
13
27
|
### Fixed
|
|
@@ -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-
|
|
2
|
-
import { a as ty } from "./globe-view-
|
|
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";
|
|
3
3
|
var Ou = { exports: {} };
|
|
4
4
|
/**
|
|
5
5
|
* MapLibre GL JS
|
|
@@ -11,6 +11,21 @@ export declare class OmAtlasElement extends CartographElementBase {
|
|
|
11
11
|
private pages;
|
|
12
12
|
private currentIndex;
|
|
13
13
|
private rejection;
|
|
14
|
+
private pager;
|
|
15
|
+
/**
|
|
16
|
+
* Arrow keys page the atlas. This element had `seek()`, `next()` and an
|
|
17
|
+
* event, and no way for a READER to use any of them: a 49-page atlas opened
|
|
18
|
+
* in a preview, a browser or an exported file showed page one and could not
|
|
19
|
+
* be moved off it. Bound as fields so the exact function is removed again.
|
|
20
|
+
*/
|
|
21
|
+
private readonly onKeyDown;
|
|
22
|
+
/**
|
|
23
|
+
* A parent window may drive the atlas: `{ source: "onlymap-cartograph-host",
|
|
24
|
+
* type: "atlas-seek", index }`. This is what lets a host that shows the
|
|
25
|
+
* sheet in a CROSS-ORIGIN iframe — where it cannot reach `seek()` — page it
|
|
26
|
+
* anyway. Any window can post this; the worst it can do is turn a page.
|
|
27
|
+
*/
|
|
28
|
+
private readonly onHostMessage;
|
|
14
29
|
/** The frame whose layer drives the iteration — the same `for=` rule every furniture element follows. */
|
|
15
30
|
get frame(): OmFrameElement | null;
|
|
16
31
|
get count(): number;
|
|
@@ -43,5 +58,14 @@ export declare class OmAtlasElement extends CartographElementBase {
|
|
|
43
58
|
seek(index: number): void;
|
|
44
59
|
next(): void;
|
|
45
60
|
private applyPage;
|
|
61
|
+
/**
|
|
62
|
+
* Draw (or update) the reader's page control on the owning sheet:
|
|
63
|
+
* `‹ 3 / 49 · Alabama ›`. Find-or-create, like the page's own overlays, so
|
|
64
|
+
* paging updates one element rather than stacking them. `pager="none"`
|
|
65
|
+
* removes it for a host that draws its own.
|
|
66
|
+
*/
|
|
67
|
+
private renderPager;
|
|
68
|
+
connectedCallback(): void;
|
|
69
|
+
disconnectedCallback(): void;
|
|
46
70
|
protected renderNow(): void;
|
|
47
71
|
}
|
|
@@ -34,6 +34,18 @@ export interface RenderCartographResult {
|
|
|
34
34
|
/** Non-fatal problems worth surfacing to the user (clamping, skipped frames). */
|
|
35
35
|
warnings: string[];
|
|
36
36
|
}
|
|
37
|
+
/** Document order, with `z` as an override — the same rule the DOM paints by. */
|
|
38
|
+
/**
|
|
39
|
+
* Does this page child belong in an exported image?
|
|
40
|
+
*
|
|
41
|
+
* Anything marked screen-only does not: the atlas pager, and any future
|
|
42
|
+
* on-screen control. The rule used to be enforced only for the safe-zone
|
|
43
|
+
* guide, by skipping the whole marks overlay it lives in; a screen-only node
|
|
44
|
+
* placed directly on the page would have been painted into a PNG regardless of
|
|
45
|
+
* the mark it carried. The print stylesheet and the host's persistence filter
|
|
46
|
+
* already honour the mark; now the exporter does too.
|
|
47
|
+
*/
|
|
48
|
+
export declare function paintsInExport(el: Element): boolean;
|
|
37
49
|
export declare function renderCartograph(page?: OmCartographElement | null, options?: RenderCartographOptions): Promise<RenderCartographResult>;
|
|
38
50
|
export interface RenderAtlasOptions extends RenderCartographOptions {
|
|
39
51
|
/** Render only this page (0-based) — the host contract for `?export=&page=i`. */
|