@nika-js/onlymap 0.11.0 → 0.11.2

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 (35) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +1 -1
  3. package/dist/{basemap-Bg73oXUb.js → basemap-BlMlSRTo.js} +2 -2
  4. package/dist/cluster-index.d.ts +1 -1
  5. package/dist/cluster-options.d.ts +15 -1
  6. package/dist/cluster-thumbs.d.ts +68 -0
  7. package/dist/{geoparquet-BASBa9tf.js → geoparquet-Bqhh_idk.js} +1 -1
  8. package/dist/{globe-view-CTkofOiM.js → globe-view-DQ0GLKSn.js} +1 -1
  9. package/dist/{hillshade-DdVEO8lc.js → hillshade-CxMG6ocE.js} +1 -1
  10. package/dist/{index-BLfj5bIo.js → index-9W2ZrRyF.js} +1 -1
  11. package/dist/{index-C-YAnesV.js → index-CE3n5pQz.js} +12546 -12328
  12. package/dist/{index-DsLNa_IB.js → index-CF7q_mKH.js} +2 -2
  13. package/dist/{index-C7CNrOGW.js → index-CdAb2VR8.js} +1 -1
  14. package/dist/{index-FtNZZGWv.js → index-DBYIrdvb.js} +3 -3
  15. package/dist/{index-BCDmJfeb.js → index-DO3-mfIk.js} +3 -3
  16. package/dist/{index-CVAyXg52.js → index-DklXFu6D.js} +1 -1
  17. package/dist/{index-BOjo5N6i.js → index-aoMhS8VK.js} +1 -1
  18. package/dist/{index-DbfTOgYl.js → index-m-7enOKi.js} +1 -1
  19. package/dist/layers/cluster-layer.d.ts +32 -0
  20. package/dist/{lerc-CoNq0xxX.js → lerc-vNjPdkTs.js} +1 -1
  21. package/dist/onlymap.standalone.js +22417 -22199
  22. package/dist/onlymapjs.js +1 -1
  23. package/dist/{post-process-effect-CrZoIEYa.js → post-process-effect-eVlcdR0m.js} +1 -1
  24. package/dist/{raster-CZMdghdy.js → raster-8iVEbDdp.js} +3 -3
  25. package/dist/{raster-pipeline-n2wrLc9r.js → raster-pipeline-OqdVks6Y.js} +1 -1
  26. package/dist/{text-on-path-CHkHjky-.js → text-on-path-C34MMnKY.js} +1 -1
  27. package/dist/version.d.ts +1 -1
  28. package/dist/{zarr-DRBhsEZZ.js → zarr-Dla-EY4o.js} +2 -2
  29. package/docs/cartograph.md +2 -2
  30. package/llms.txt +2 -2
  31. package/onlymapjs.attributes.json +21 -0
  32. package/onlymapjs.html-data.json +28 -0
  33. package/package.json +1 -1
  34. package/skills/onlymapjs/SKILL.md +1 -1
  35. package/skills/onlymapjs/references/syntax.md +8 -3
@@ -1,5 +1,5 @@
1
- import { aM as R, aN as S, aO as E, aP as N, aQ as h, aR as w, aS as W, aT as O, aU as x, aV as I, aW as B, aX as _, aY as P, aZ as k, a_ as $, a$ as z, b0 as C, b1 as F, b2 as v, b3 as M, b4 as p, b5 as U } from "./index-C-YAnesV.js";
2
- import { b6 as $e, b7 as ze, b8 as Ce, b9 as ve, ba as Me, bb as Ue, bc as je, bd as De, be as qe, bf as Je, bg as Ve, bh as Ge, bi as He, bj as Qe, bk as Xe, bl as Ye, bm as Ze, bn as Ke, bo as et, bp as tt, bq as nt, br as rt, bs as at, bt as st, bu as ot } from "./index-C-YAnesV.js";
1
+ import { aM as R, aN as S, aO as E, aP as N, aQ as h, aR as w, aS as W, aT as O, aU as x, aV as I, aW as B, aX as _, aY as P, aZ as k, a_ as $, a$ as z, b0 as C, b1 as F, b2 as v, b3 as M, b4 as p, b5 as U } from "./index-CE3n5pQz.js";
2
+ import { b6 as $e, b7 as ze, b8 as Ce, b9 as ve, ba as Me, bb as Ue, bc as je, bd as De, be as qe, bf as Je, bg as Ve, bh as Ge, bi as He, bj as Qe, bk as Xe, bl as Ye, bm as Ze, bn as Ke, bo as et, bp as tt, bq as nt, br as rt, bs as at, bt as st, bu as ot } from "./index-CE3n5pQz.js";
3
3
  import { g as j, i as D } from "./table-accessors-CYWTzpQI.js";
4
4
  async function q(t, e, n = {}, r = {}) {
5
5
  const a = R(t), s = S.getWorkerFarm(n), { source: o } = n, c = { name: a, source: o };
@@ -1,4 +1,4 @@
1
- import { bx as Be, by as le, bz as ce, bA as De, bB as Oe, bC as ke } from "./index-C-YAnesV.js";
1
+ import { bx as Be, by as le, bz as ce, bA as De, bB as Oe, bC as ke } from "./index-CE3n5pQz.js";
2
2
  import { y as ve, a as he, z as G, R as J, A as ue, C as Fe, F as xe, n as je, S as Ie, E as Ne } from "./recordbatch-Bpc0uxFn.js";
3
3
  import { g as V, a as fe, b as Le, c as Ue, d as Me, e as qe, m as Ve } from "./table-accessors-CYWTzpQI.js";
4
4
  import { c as $e } from "./convert-arrow-schema-DrAihRf9.js";
@@ -1,6 +1,6 @@
1
- import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-C-YAnesV.js";
2
- import { ah as H, ai as V, aj as X, ak as K } from "./index-C-YAnesV.js";
3
- import { P as h } from "./post-process-effect-CrZoIEYa.js";
1
+ import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-CE3n5pQz.js";
2
+ import { ah as H, ai as V, aj as X, ak as K } from "./index-CE3n5pQz.js";
3
+ import { P as h } from "./post-process-effect-eVlcdR0m.js";
4
4
  const O = `
5
5
  float omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
6
6
  float omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
@@ -1,6 +1,6 @@
1
- import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-C-YAnesV.js";
2
- import { P as s } from "./post-process-effect-CrZoIEYa.js";
3
- import { G as pa, a as na } from "./globe-view-CTkofOiM.js";
1
+ import { A as t, a as o, b as i, C as l, c as p, d as n, D as _, e as c, f as g, F as h, L as m, g as L, h as y, i as f, j as w, M as S, k as V, O as b, l as C, m as E, P as I, T as P, n as T, o as M, U as d, V as A, p as O, q as u, W as N, r as k, s as x, t as D, u as G, G as R, v as j, w as W, x as q, y as v, z, B as F, E as U, H as Y, I as B, J as H, K as J, N as K, Q, R as X, S as Z, X as $, Y as aa, Z as sa, _ as ea, $ as ra, a0 as ta, a1 as oa, a2 as ia } from "./index-CE3n5pQz.js";
2
+ import { P as s } from "./post-process-effect-eVlcdR0m.js";
3
+ import { G as pa, a as na } from "./globe-view-DQ0GLKSn.js";
4
4
  export {
5
5
  t as AmbientLight,
6
6
  o as Attribute,
@@ -1,4 +1,4 @@
1
- import { aA as B } from "./index-C-YAnesV.js";
1
+ import { aA as B } from "./index-CE3n5pQz.js";
2
2
  const V = /* @__PURE__ */ new Set([
3
3
  "GeoJsonLayer",
4
4
  "PolygonLayer",
@@ -1,4 +1,4 @@
1
- import { bB as Bt, bM as Xt, bN as Yt, bO as Us } from "./index-C-YAnesV.js";
1
+ import { bB as Bt, bM as Xt, bN as Yt, bO as Us } from "./index-CE3n5pQz.js";
2
2
  import { w as gs, t as Hs, f as Ws, m as Qs } from "./mgrs-BY9bIvp4.js";
3
3
  import { c as Xs } from "./convert-arrow-schema-DrAihRf9.js";
4
4
  import { y as Ys, A as bt, a as Ks, z as Vs, R as Zs } from "./recordbatch-Bpc0uxFn.js";
@@ -1,4 +1,4 @@
1
- import { bv as _t, bw as Ct } from "./index-C-YAnesV.js";
1
+ import { bv as _t, bw as Ct } from "./index-CE3n5pQz.js";
2
2
  function Yt(e, r, t = 2, i, o = "xy") {
3
3
  const s = r && r.length, l = s ? r[0] * t : e.length;
4
4
  let c = Ut(e, 0, l, t, !0, i && i[0], o);
@@ -27,6 +27,7 @@
27
27
  import { CompositeLayer } from "@deck.gl/core";
28
28
  import type { Layer, UpdateParameters, GetPickingInfoParams, PickingInfo } from "@deck.gl/core";
29
29
  import { ClusterIndex, type ClusterRow, type ClusterAggregate } from "../cluster-index";
30
+ import { ThumbnailCache } from "../cluster-thumbs";
30
31
  import type { Shape } from "../expr";
31
32
  import type { LayerData, ColumnarData } from "../ir";
32
33
  type Bbox = [number, number, number, number];
@@ -43,10 +44,25 @@ export interface ClusterLayerProps {
43
44
  clusterMinPoints: number;
44
45
  aggregates: readonly ClusterAggregate[];
45
46
  clusterLabel: boolean;
47
+ /** The count as a badge (0.11.2): edge/corner placement, a pill behind it, its colour and size. */
48
+ clusterLabelPosition?: string;
49
+ clusterLabelBackground?: number[];
50
+ clusterLabelColor?: number[];
51
+ clusterLabelSize?: number;
46
52
  getClusterRadius?: unknown;
47
53
  getClusterFillColor?: unknown;
48
54
  getClusterLineColor?: unknown;
49
55
  getClusterLabel?: unknown;
56
+ /**
57
+ * An image on the bubble (0.11.1): a URL → a circular thumbnail ringed in
58
+ * the bubble's fill (cluster-thumbs.ts); a name → a glyph from
59
+ * `clusterIconAtlas`/`clusterIconMapping`, or the host's own atlas on an
60
+ * IconLayer; an `{url, width, height}` object → handed to deck as is.
61
+ * A bubble whose image is still loading, or failed, draws as the circle.
62
+ */
63
+ getClusterIcon?: unknown;
64
+ clusterIconAtlas?: string;
65
+ clusterIconMapping?: Record<string, unknown>;
50
66
  clusterUpdateTriggers: Record<string, string>;
51
67
  /** Fired after each index build — the dev panel reports rows the index could not place. */
52
68
  onClusterIndex?: (info: {
@@ -67,6 +83,11 @@ interface ClusterState {
67
83
  /** `clusters` re-shaped to the host's data shape, and the leaf rows/columns the host sublayer draws. */
68
84
  clusterData: unknown[] | ColumnarData;
69
85
  leafData: unknown[] | ColumnarData;
86
+ /** Thumbnail renders for `getClusterIcon` URLs; bumped `thumbsVersion` is the icon sublayer's update trigger. */
87
+ thumbs?: ThumbnailCache;
88
+ thumbsVersion?: number;
89
+ /** For a bubble pick: the circle sublayer draws a SUBSET once some bubbles carry images, so its index maps back here. */
90
+ circleClusterIndex?: number[];
70
91
  }
71
92
  /** Position of row `i` — through the host's accessor when it has one, else the feature's own Point geometry. */
72
93
  export declare function positionLookup(data: LayerData, shape: Shape, getPosition: unknown): (i: number) => readonly number[] | undefined;
@@ -78,6 +99,8 @@ export declare function positionLookup(data: LayerData, shape: Shape, getPositio
78
99
  export declare function toHostShape(clusters: readonly ClusterRow[], shape: Shape): unknown[] | ColumnarData;
79
100
  /** The rows at `indices`, keeping the host's shape (a columnar host gets sliced columns). */
80
101
  export declare function sliceRows(data: LayerData, indices: readonly number[]): unknown[] | ColumnarData;
102
+ /** Unit direction of a `cluster-label-position` in screen space (y down): `top-right` → [1, -1]. */
103
+ export declare function labelOffsetUnits(position: string | undefined): [number, number];
81
104
  /** The bubble fill when no `get-cluster-fill-color` is authored: the host's constant fill, else a flat blue. */
82
105
  export declare function fallbackClusterFill(hostProps: Record<string, unknown>): number[];
83
106
  export declare class ClusterLayer extends CompositeLayer<ClusterLayerProps> {
@@ -94,6 +117,15 @@ export declare class ClusterLayer extends CompositeLayer<ClusterLayerProps> {
94
117
  };
95
118
  state: ClusterState;
96
119
  initializeState(): void;
120
+ /** The per-cluster value of a `get-cluster-*` accessor (or its constant), read in the host's data shape. */
121
+ private clusterValue;
122
+ /**
123
+ * What `get-cluster-icon` gives cluster `i`, resolved: a ready thumbnail
124
+ * for a URL, an atlas glyph name, a raw icon object — or undefined when the
125
+ * bubble should draw as a circle (no accessor, no value, image not ready).
126
+ */
127
+ private iconFor;
128
+ private hasGlyphAtlas;
97
129
  /** The default only reacts to props/data; the visible set depends on the viewport too. */
98
130
  shouldUpdateState({ changeFlags }: UpdateParameters<this>): boolean;
99
131
  updateState({ props, oldProps, changeFlags }: UpdateParameters<this>): void;
@@ -1,4 +1,4 @@
1
- import { C as o, D as s } from "./raster-CZMdghdy.js";
1
+ import { C as o, D as s } from "./raster-8iVEbDdp.js";
2
2
  var t;
3
3
  (function(e) {
4
4
  e[e.None = 0] = "None", e[e.Deflate = 1] = "Deflate", e[e.Zstd = 2] = "Zstd";