@nika-js/onlymap 0.11.2 → 0.11.3
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 +10 -0
- package/README.md +2 -2
- package/dist/attribution.d.ts +27 -0
- package/dist/{basemap-BlMlSRTo.js → basemap-C6Ehu6fw.js} +923 -878
- package/dist/basemap.d.ts +11 -0
- package/dist/cartograph/elements/om-cartograph.d.ts +22 -0
- package/dist/cartograph/elements/om-frame.d.ts +8 -0
- package/dist/cartograph.js +1139 -1058
- package/dist/cartograph.standalone.js +1595 -1514
- package/dist/elements/om-map.d.ts +6 -0
- package/dist/{geoparquet-Bqhh_idk.js → geoparquet-3V4KrvQN.js} +1 -1
- package/dist/{globe-view-DQ0GLKSn.js → globe-view-D4Tlyff-.js} +1 -1
- package/dist/{hillshade-CxMG6ocE.js → hillshade-BC8QiJRP.js} +1 -1
- package/dist/{index-m-7enOKi.js → index-BPCIxI1b.js} +1 -1
- package/dist/{index-9W2ZrRyF.js → index-BUE-VzWx.js} +1 -1
- package/dist/{index-DklXFu6D.js → index-BqFwoWp9.js} +1 -1
- package/dist/{index-DO3-mfIk.js → index-C1f14saD.js} +3 -3
- package/dist/{index-DBYIrdvb.js → index-DgutJ5y2.js} +3 -3
- package/dist/{index-CdAb2VR8.js → index-DpUl6z5-.js} +1 -1
- package/dist/{index-aoMhS8VK.js → index-iwTA46AA.js} +1 -1
- package/dist/{index-CF7q_mKH.js → index-p5XXAoNa.js} +2 -2
- package/dist/{index-CE3n5pQz.js → index-pu3BNjzA.js} +51 -20
- package/dist/{lerc-vNjPdkTs.js → lerc-DWtJKNQk.js} +1 -1
- package/dist/onlymap.standalone.js +306 -231
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-eVlcdR0m.js → post-process-effect-mQdMaWQE.js} +1 -1
- package/dist/{raster-8iVEbDdp.js → raster-DtUDOXfy.js} +3 -3
- package/dist/{raster-pipeline-OqdVks6Y.js → raster-pipeline-hQh5cG3e.js} +1 -1
- package/dist/runtime-core.d.ts +22 -0
- package/dist/{text-on-path-C34MMnKY.js → text-on-path-CcfoZqXD.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-Dla-EY4o.js → zarr-Qo4A_t7d.js} +2 -2
- package/docs/cartograph.md +27 -3
- package/llms.txt +2 -2
- package/onlymapjs.html-data.json +4 -0
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +1 -1
- package/skills/onlymapjs/references/syntax.md +4 -3
package/dist/basemap.d.ts
CHANGED
|
@@ -136,6 +136,17 @@ export declare class MapLibreBasemapAdapter {
|
|
|
136
136
|
* internally when the diff fails (the cross-provider case).
|
|
137
137
|
*/
|
|
138
138
|
setStyle(resolved: ResolvedBasemap): void;
|
|
139
|
+
/**
|
|
140
|
+
* This basemap's attribution as plain text: every source's declared
|
|
141
|
+
* attribution plus the preset's own line, de-duplicated.
|
|
142
|
+
*
|
|
143
|
+
* Every source the style DECLARES, not only the ones currently drawn — the
|
|
144
|
+
* superset MapLibre's control narrows to. On a printed sheet an extra credit
|
|
145
|
+
* costs nothing; a missing one is a licence breach.
|
|
146
|
+
*/
|
|
147
|
+
attributions(): string[];
|
|
148
|
+
/** Called whenever a (new) style has loaded — the moment its sources' attributions are known. */
|
|
149
|
+
onAttributionsChange(callback: () => void): void;
|
|
139
150
|
/**
|
|
140
151
|
* (Re)mounts the compact attribution control. Source-declared attributions
|
|
141
152
|
* (what OpenFreeMap/CARTO/OSM styles carry) are read live by the control on
|
|
@@ -26,6 +26,21 @@ export declare class OmCartographElement extends CartographElementBase {
|
|
|
26
26
|
* runtime's job (issue #41 §9: the om-map carries the key).
|
|
27
27
|
*/
|
|
28
28
|
private renderCredit;
|
|
29
|
+
/**
|
|
30
|
+
* Basemap attribution, moved off the maps and onto the sheet.
|
|
31
|
+
*
|
|
32
|
+
* A frame's map draws no attribution of its own — the same rule as the
|
|
33
|
+
* badge, and for the same reasons: the sheet is the published artefact, a
|
|
34
|
+
* line per frame credits one provider several times, and on a small inset
|
|
35
|
+
* the control covers the map it credits. So the page prints every frame's
|
|
36
|
+
* providers once, bottom-right (the credit has bottom-left).
|
|
37
|
+
*
|
|
38
|
+
* A provider the author already credits in their own text is left out:
|
|
39
|
+
* the obligation is the credit, not this element. Static frames contribute
|
|
40
|
+
* through their `attribution` attribute, so a page that never loads the
|
|
41
|
+
* runtime still credits the tiles in its pictures.
|
|
42
|
+
*/
|
|
43
|
+
private renderAttribution;
|
|
29
44
|
/**
|
|
30
45
|
* Which credit this sheet carries, from the core's own predicate so the
|
|
31
46
|
* license decision is never re-implemented here — only the print wording
|
|
@@ -34,6 +49,13 @@ export declare class OmCartographElement extends CartographElementBase {
|
|
|
34
49
|
private creditMode;
|
|
35
50
|
/** Give the runtime-owned DOM credit the same canvas paint contract as authored furniture. */
|
|
36
51
|
private armCreditPainter;
|
|
52
|
+
/**
|
|
53
|
+
* The canvas twin of a runtime-owned foot line — the credit (left) or the
|
|
54
|
+
* basemap attribution (right) — so the exported raster carries what the
|
|
55
|
+
* screen and the printed page carry. One painter for both, so the two lines
|
|
56
|
+
* cannot drift apart in size, ground or inset.
|
|
57
|
+
*/
|
|
58
|
+
private armFootPainter;
|
|
37
59
|
/**
|
|
38
60
|
* Print this page at `dpi`.
|
|
39
61
|
*
|
|
@@ -216,6 +216,14 @@ export declare class OmFrameElement extends CartographElementBase implements Car
|
|
|
216
216
|
scale?: number;
|
|
217
217
|
effectDpi?: number;
|
|
218
218
|
}): Promise<boolean>;
|
|
219
|
+
/**
|
|
220
|
+
* The basemap attribution this frame owes the sheet, as text.
|
|
221
|
+
*
|
|
222
|
+
* A live frame asks its map. A static one reads `attribution`, which
|
|
223
|
+
* `freeze()` writes and an author may write by hand for a placed raster —
|
|
224
|
+
* the only source a page without the runtime has.
|
|
225
|
+
*/
|
|
226
|
+
attributions(): string[];
|
|
219
227
|
/**
|
|
220
228
|
* Point this frame's camera at a lon/lat box — the atlas's per-page refit.
|
|
221
229
|
* Solves for the zoom that fits the box in the frame's own pixel size, in
|