@nika-js/onlymap 0.11.2 → 0.11.4

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 (38) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/dist/attribution.d.ts +27 -0
  4. package/dist/{basemap-BlMlSRTo.js → basemap-UE11uf6w.js} +923 -878
  5. package/dist/basemap.d.ts +11 -0
  6. package/dist/cartograph/elements/om-cartograph.d.ts +22 -0
  7. package/dist/cartograph/elements/om-frame.d.ts +8 -0
  8. package/dist/cartograph.js +1143 -1060
  9. package/dist/cartograph.standalone.js +1599 -1516
  10. package/dist/elements/om-map.d.ts +6 -0
  11. package/dist/{geoparquet-Bqhh_idk.js → geoparquet-D7ZKVPDh.js} +1 -1
  12. package/dist/{globe-view-DQ0GLKSn.js → globe-view-B7Yn2BbK.js} +1 -1
  13. package/dist/{hillshade-CxMG6ocE.js → hillshade-tQaqlPhn.js} +1 -1
  14. package/dist/{index-DklXFu6D.js → index-B_L_7lV0.js} +1 -1
  15. package/dist/{index-m-7enOKi.js → index-C09RUa1s.js} +1 -1
  16. package/dist/{index-DBYIrdvb.js → index-C8a3EKM8.js} +3 -3
  17. package/dist/{index-CdAb2VR8.js → index-CFWt9qS0.js} +1 -1
  18. package/dist/{index-DO3-mfIk.js → index-CWtaL88w.js} +3 -3
  19. package/dist/{index-9W2ZrRyF.js → index-DIoKYXlh.js} +1 -1
  20. package/dist/{index-CF7q_mKH.js → index-DPV7mwIc.js} +2 -2
  21. package/dist/{index-CE3n5pQz.js → index-DzxpYTfi.js} +51 -20
  22. package/dist/{index-aoMhS8VK.js → index-N5acD4ii.js} +1 -1
  23. package/dist/{lerc-vNjPdkTs.js → lerc-BDcZeX07.js} +1 -1
  24. package/dist/onlymap.standalone.js +306 -231
  25. package/dist/onlymapjs.js +1 -1
  26. package/dist/{post-process-effect-eVlcdR0m.js → post-process-effect-C1iDE90L.js} +1 -1
  27. package/dist/{raster-8iVEbDdp.js → raster-D4nwLneR.js} +3 -3
  28. package/dist/{raster-pipeline-OqdVks6Y.js → raster-pipeline-DX-rZjRG.js} +1 -1
  29. package/dist/runtime-core.d.ts +22 -0
  30. package/dist/{text-on-path-C34MMnKY.js → text-on-path-onhHN4AZ.js} +1 -1
  31. package/dist/version.d.ts +1 -1
  32. package/dist/{zarr-Dla-EY4o.js → zarr-CBGaInwF.js} +2 -2
  33. package/docs/cartograph.md +33 -4
  34. package/llms.txt +2 -2
  35. package/onlymapjs.html-data.json +8 -0
  36. package/package.json +1 -1
  37. package/skills/onlymapjs/SKILL.md +1 -1
  38. 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