@nika-js/onlymap 0.10.9 → 0.11.0
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 +18 -0
- package/README.md +15 -3
- package/dist/{basemap-B2VvspL4.js → basemap-Bg73oXUb.js} +2 -2
- package/dist/cartograph/element-base.d.ts +9 -0
- package/dist/cartograph/elements/om-legend.d.ts +4 -0
- package/dist/cartograph.js +517 -495
- package/dist/cartograph.standalone.js +1307 -1285
- package/dist/cluster-index.d.ts +77 -0
- package/dist/cluster-options.d.ts +92 -0
- package/dist/ctx.d.ts +2 -0
- package/dist/elements/om-map.d.ts +6 -0
- package/dist/{geoparquet-BJQC6zwS.js → geoparquet-BASBa9tf.js} +1 -1
- package/dist/{globe-view-C3Gaf--d.js → globe-view-CTkofOiM.js} +1 -1
- package/dist/{hillshade-CNtzlYlz.js → hillshade-DdVEO8lc.js} +1 -1
- package/dist/html-data.d.ts +1 -1
- package/dist/{index-CQdTYZ08.js → index-BCDmJfeb.js} +3 -3
- package/dist/{index-j_Ojvo4x.js → index-BLfj5bIo.js} +1 -1
- package/dist/{index-Cp2kquh5.js → index-BOjo5N6i.js} +1 -1
- package/dist/{index-DPEWcZeV.js → index-C-YAnesV.js} +17527 -16473
- package/dist/{index-CI0vdi2E.js → index-C7CNrOGW.js} +1 -1
- package/dist/{index-a-wOE5hE.js → index-CVAyXg52.js} +1 -1
- package/dist/{index-D2RzlXff.js → index-DbfTOgYl.js} +1 -1
- package/dist/{index-m3UsmxCq.js → index-DsLNa_IB.js} +2 -2
- package/dist/{index-C3S0FWlc.js → index-FtNZZGWv.js} +3 -3
- package/dist/ir-snapshot.d.ts +10 -0
- package/dist/ir.d.ts +9 -0
- package/dist/layer-registry.d.ts +8 -0
- package/dist/layers/cluster-layer.d.ts +111 -0
- package/dist/{lerc-Bv4RLXha.js → lerc-CoNq0xxX.js} +1 -1
- package/dist/onlymap.standalone.js +35944 -34890
- package/dist/onlymapjs.js +1 -1
- package/dist/{post-process-effect-Cpbyy4I3.js → post-process-effect-CrZoIEYa.js} +1 -1
- package/dist/programmatic.d.ts +6 -0
- package/dist/{raster-D_HU2WuR.js → raster-CZMdghdy.js} +3 -3
- package/dist/{raster-pipeline-BmcWLImS.js → raster-pipeline-n2wrLc9r.js} +1 -1
- package/dist/runtime-core.d.ts +24 -0
- package/dist/{text-on-path-ClLwT2eS.js → text-on-path-CHkHjky-.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-CCCIYwWt.js → zarr-DRBhsEZZ.js} +2 -2
- package/docs/cartograph.md +13 -7
- package/llms.txt +3 -2
- package/onlymapjs.attributes.json +33 -0
- package/onlymapjs.html-data.json +113 -1
- package/package.json +7 -3
- package/skills/onlymapjs/SKILL.md +3 -2
- package/skills/onlymapjs/references/react.md +1 -0
- package/skills/onlymapjs/references/syntax.md +48 -2
- package/docs/design/arrows.md +0 -182
- package/docs/design/carto-substrate.md +0 -1067
- package/docs/design/cog-v2.md +0 -223
- package/docs/design/extensions.md +0 -250
- package/docs/design/frame-sources.md +0 -229
- package/docs/design/hillshade.md +0 -290
- package/docs/design/paced-flyby.md +0 -42
- package/docs/design/trace-link-failure.md +0 -20
|
@@ -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-
|
|
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";
|
|
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,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-
|
|
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-
|
|
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";
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { ac as j, ad as S, ae as A, af as M, ag as L } from "./index-
|
|
2
|
-
import { ah as H, ai as V, aj as X, ak as K } from "./index-
|
|
3
|
-
import { P as h } from "./post-process-effect-
|
|
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";
|
|
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); }
|
package/dist/ir-snapshot.d.ts
CHANGED
|
@@ -43,6 +43,16 @@ export interface LayerIRSnapshot {
|
|
|
43
43
|
terrain?: "drape" | "offset" | "off";
|
|
44
44
|
/** Per-layer zoom visibility (`visible-zoom-range`) when authored — hidden outside min ≤ zoom < max. */
|
|
45
45
|
visibleZoomRange?: [number, number];
|
|
46
|
+
/** The `cluster` toggle's options when on (docs/design/clustering.md) — the JSON-safe part; its accessors appear under `clusterAccessors` as fingerprints. */
|
|
47
|
+
cluster?: {
|
|
48
|
+
radius: number;
|
|
49
|
+
maxZoom: number;
|
|
50
|
+
minPoints: number;
|
|
51
|
+
properties?: string;
|
|
52
|
+
click: string;
|
|
53
|
+
label: boolean;
|
|
54
|
+
};
|
|
55
|
+
clusterAccessors?: Record<string, string>;
|
|
46
56
|
/**
|
|
47
57
|
* Resolved deck.gl props, made JSON-safe: compiled accessors appear as
|
|
48
58
|
* their updateTrigger fingerprint (`[accessor <shape>|<source>]`), other
|
package/dist/ir.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export interface LayerMeta {
|
|
|
15
15
|
export type { Shape } from "./expr";
|
|
16
16
|
import type { Shape } from "./expr";
|
|
17
17
|
import type { LegendSpec } from "./legend-spec";
|
|
18
|
+
import type { ClusterOptions } from "./cluster-options";
|
|
18
19
|
/**
|
|
19
20
|
* Columnar (GeoArrow-style) data: one array per field instead of one object
|
|
20
21
|
* per row (spec: "Columnar / GeoArrow Ingestion"). Produced by the Data
|
|
@@ -144,4 +145,12 @@ export interface LayerIR {
|
|
|
144
145
|
* fall back to deck.gl's default (no-recompute-on-identity-change) behaviour.
|
|
145
146
|
*/
|
|
146
147
|
updateTriggers: Record<string, string>;
|
|
148
|
+
/**
|
|
149
|
+
* The `cluster` toggle's resolved options (docs/design/clustering.md) —
|
|
150
|
+
* present only when `cluster="true"` on a point-capable type. `props` and
|
|
151
|
+
* `updateTriggers` never contain the `cluster-*` props: both front-ends
|
|
152
|
+
* route them here, and the renderer swaps in `ClusterLayer` around the
|
|
153
|
+
* host class when this is set.
|
|
154
|
+
*/
|
|
155
|
+
cluster?: ClusterOptions;
|
|
147
156
|
}
|
package/dist/layer-registry.d.ts
CHANGED
|
@@ -93,6 +93,14 @@ export interface LayerSchema {
|
|
|
93
93
|
* a type-name check in the renderer.
|
|
94
94
|
*/
|
|
95
95
|
warpsInPlane?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Point-capable type that accepts the `cluster` toggle
|
|
98
|
+
* (docs/design/clustering.md): its schema carries the `cluster-*`
|
|
99
|
+
* descriptors and the runtime swaps in `ClusterLayer` when
|
|
100
|
+
* `LayerIR.cluster` is set — a flag here for the same reason
|
|
101
|
+
* `carriesTileset` is one, so "which types cluster" has a single home.
|
|
102
|
+
*/
|
|
103
|
+
clusters?: boolean;
|
|
96
104
|
}
|
|
97
105
|
/**
|
|
98
106
|
* Layer types whose geometry comes from a WEB MERCATOR TILE PYRAMID.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ClusterLayer — what a point layer becomes when `cluster="true"` is set
|
|
3
|
+
* (docs/design/clustering.md). A `CompositeLayer` in the RouteLayer /
|
|
4
|
+
* TrackingLayer mould: it wraps REAL deck layers rather than adding a
|
|
5
|
+
* rendering path.
|
|
6
|
+
*
|
|
7
|
+
* leaves the host class (Scatterplot/GeoJson/Icon) drawing the points that
|
|
8
|
+
* stand alone at this zoom, with the host's own props verbatim —
|
|
9
|
+
* so `get-fill-color`, `radius`, `filter-*`, transitions all apply
|
|
10
|
+
* to unclustered points exactly as they would without the toggle;
|
|
11
|
+
* bubbles a ScatterplotLayer per cluster, styled by `get-cluster-*`;
|
|
12
|
+
* labels a TextLayer with the count.
|
|
13
|
+
*
|
|
14
|
+
* The index (src/cluster-index.ts) is rebuilt only when the data, the
|
|
15
|
+
* position accessor or a clustering option changes; the visible set is
|
|
16
|
+
* re-queried when the integer zoom changes or the viewport leaves the last
|
|
17
|
+
* padded query box. Cluster rows are re-shaped to the host's data shape
|
|
18
|
+
* (flat object, GeoJSON Feature, or columnar) so the SAME expression
|
|
19
|
+
* compiler serves `$count` on a bubble and `$mag` on a point.
|
|
20
|
+
*
|
|
21
|
+
* Picking: a leaf pick is remapped to the ORIGINAL row and index (the host's
|
|
22
|
+
* index space, so `highlighted-id`, columnar materialisation and
|
|
23
|
+
* `zoom-to-feature` keep working); a bubble pick returns the cluster row with
|
|
24
|
+
* `cluster: true`, `cluster_id`, `count` and the aggregates. The runtime's
|
|
25
|
+
* default click-to-expand and `expand-cluster` read `expansionZoom()` here.
|
|
26
|
+
*/
|
|
27
|
+
import { CompositeLayer } from "@deck.gl/core";
|
|
28
|
+
import type { Layer, UpdateParameters, GetPickingInfoParams, PickingInfo } from "@deck.gl/core";
|
|
29
|
+
import { ClusterIndex, type ClusterRow, type ClusterAggregate } from "../cluster-index";
|
|
30
|
+
import type { Shape } from "../expr";
|
|
31
|
+
import type { LayerData, ColumnarData } from "../ir";
|
|
32
|
+
type Bbox = [number, number, number, number];
|
|
33
|
+
export interface ClusterLayerProps {
|
|
34
|
+
data: LayerData;
|
|
35
|
+
shape: Shape;
|
|
36
|
+
/** The layer type the toggle sits on; draws the leaves. */
|
|
37
|
+
hostClass: new (props: Record<string, unknown>) => Layer;
|
|
38
|
+
/** The host's fully resolved props (accessors compiled, defaults applied) — never includes the cluster props. */
|
|
39
|
+
hostProps: Record<string, unknown>;
|
|
40
|
+
hostUpdateTriggers: Record<string, string>;
|
|
41
|
+
clusterRadius: number;
|
|
42
|
+
clusterMaxZoom: number;
|
|
43
|
+
clusterMinPoints: number;
|
|
44
|
+
aggregates: readonly ClusterAggregate[];
|
|
45
|
+
clusterLabel: boolean;
|
|
46
|
+
getClusterRadius?: unknown;
|
|
47
|
+
getClusterFillColor?: unknown;
|
|
48
|
+
getClusterLineColor?: unknown;
|
|
49
|
+
getClusterLabel?: unknown;
|
|
50
|
+
clusterUpdateTriggers: Record<string, string>;
|
|
51
|
+
/** Fired after each index build — the dev panel reports rows the index could not place. */
|
|
52
|
+
onClusterIndex?: (info: {
|
|
53
|
+
total: number;
|
|
54
|
+
skipped: number;
|
|
55
|
+
}) => void;
|
|
56
|
+
[prop: string]: unknown;
|
|
57
|
+
}
|
|
58
|
+
interface ClusterState {
|
|
59
|
+
/** deck's `SharedLayerState` index signature — the fields below are the ones this layer owns. */
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
index?: ClusterIndex;
|
|
62
|
+
/** The integer zoom and padded bbox the current visible set was queried for. */
|
|
63
|
+
z?: number;
|
|
64
|
+
bbox?: Bbox;
|
|
65
|
+
clusters: ClusterRow[];
|
|
66
|
+
leaves: number[];
|
|
67
|
+
/** `clusters` re-shaped to the host's data shape, and the leaf rows/columns the host sublayer draws. */
|
|
68
|
+
clusterData: unknown[] | ColumnarData;
|
|
69
|
+
leafData: unknown[] | ColumnarData;
|
|
70
|
+
}
|
|
71
|
+
/** Position of row `i` — through the host's accessor when it has one, else the feature's own Point geometry. */
|
|
72
|
+
export declare function positionLookup(data: LayerData, shape: Shape, getPosition: unknown): (i: number) => readonly number[] | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Cluster rows in the host's data shape, so the host-shaped `get-cluster-*`
|
|
75
|
+
* accessors read them: GeoJSON hosts get Features (`$count` →
|
|
76
|
+
* `properties.count`), columnar hosts get columns, flat hosts the rows as-is.
|
|
77
|
+
*/
|
|
78
|
+
export declare function toHostShape(clusters: readonly ClusterRow[], shape: Shape): unknown[] | ColumnarData;
|
|
79
|
+
/** The rows at `indices`, keeping the host's shape (a columnar host gets sliced columns). */
|
|
80
|
+
export declare function sliceRows(data: LayerData, indices: readonly number[]): unknown[] | ColumnarData;
|
|
81
|
+
/** The bubble fill when no `get-cluster-fill-color` is authored: the host's constant fill, else a flat blue. */
|
|
82
|
+
export declare function fallbackClusterFill(hostProps: Record<string, unknown>): number[];
|
|
83
|
+
export declare class ClusterLayer extends CompositeLayer<ClusterLayerProps> {
|
|
84
|
+
static layerName: string;
|
|
85
|
+
static defaultProps: {
|
|
86
|
+
clusterRadius: number;
|
|
87
|
+
clusterMaxZoom: number;
|
|
88
|
+
clusterMinPoints: number;
|
|
89
|
+
aggregates: never[];
|
|
90
|
+
clusterLabel: boolean;
|
|
91
|
+
hostProps: {};
|
|
92
|
+
hostUpdateTriggers: {};
|
|
93
|
+
clusterUpdateTriggers: {};
|
|
94
|
+
};
|
|
95
|
+
state: ClusterState;
|
|
96
|
+
initializeState(): void;
|
|
97
|
+
/** The default only reacts to props/data; the visible set depends on the viewport too. */
|
|
98
|
+
shouldUpdateState({ changeFlags }: UpdateParameters<this>): boolean;
|
|
99
|
+
updateState({ props, oldProps, changeFlags }: UpdateParameters<this>): void;
|
|
100
|
+
/** Re-query only when the integer zoom changed or the view left the last padded box. */
|
|
101
|
+
private refreshVisible;
|
|
102
|
+
/** The zoom a cluster splits at — read by click-to-expand. */
|
|
103
|
+
expansionZoom(clusterId: number): number | undefined;
|
|
104
|
+
/** Original row indices inside a cluster. */
|
|
105
|
+
clusterLeaves(clusterId: number, limit?: number, offset?: number): number[];
|
|
106
|
+
getPickingInfo({ info, sourceLayer }: GetPickingInfoParams): PickingInfo;
|
|
107
|
+
renderLayers(): Layer[];
|
|
108
|
+
/** The count text when no `get-cluster-label` compiled (any shape). */
|
|
109
|
+
private labelOf;
|
|
110
|
+
}
|
|
111
|
+
export {};
|