@octostar/map-component 0.2.19 → 0.2.21
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/dist/index.cjs +651 -472
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +677 -497
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +2 -0
- package/dist/types/components/layers-panel.d.ts +2 -2
- package/dist/types/components/layers-panel.d.ts.map +1 -1
- package/dist/types/components/map-editor-canvas.d.ts.map +1 -1
- package/dist/types/lib/feature-cap.d.ts +14 -0
- package/dist/types/lib/feature-cap.d.ts.map +1 -1
- package/dist/types/lib/geojson-serialize.d.ts +8 -18
- package/dist/types/lib/geojson-serialize.d.ts.map +1 -1
- package/dist/types/lib/label-pinning.d.ts.map +1 -1
- package/dist/types/lib/paint-feature.d.ts +65 -0
- package/dist/types/lib/paint-feature.d.ts.map +1 -0
- package/dist/types/lib/tooltip-feature.d.ts +36 -0
- package/dist/types/lib/tooltip-feature.d.ts.map +1 -0
- package/dist/types/lib/trace-groups.d.ts +82 -0
- package/dist/types/lib/trace-groups.d.ts.map +1 -0
- package/dist/types/lib/trace-timeline.d.ts +75 -0
- package/dist/types/lib/trace-timeline.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -319,6 +319,7 @@ body{--tw-bg-opacity:1;background-color:hsl(var(--background) / var(--tw-bg-opac
|
|
|
319
319
|
.h-8{height:2rem}
|
|
320
320
|
.h-9{height:2.25rem}
|
|
321
321
|
.h-\[18px\]{height:18px}
|
|
322
|
+
.h-\[360px\]{height:360px}
|
|
322
323
|
.h-\[400px\]{height:400px}
|
|
323
324
|
.h-\[600px\]{height:600px}
|
|
324
325
|
.h-\[calc\(100vh-60px\)\]{height:calc(100vh - 60px)}
|
|
@@ -375,6 +376,7 @@ body{--tw-bg-opacity:1;background-color:hsl(var(--background) / var(--tw-bg-opac
|
|
|
375
376
|
.max-w-48{max-width:12rem}
|
|
376
377
|
.max-w-4xl{max-width:56rem}
|
|
377
378
|
.max-w-5xl{max-width:64rem}
|
|
379
|
+
.max-w-7xl{max-width:80rem}
|
|
378
380
|
.max-w-md{max-width:28rem}
|
|
379
381
|
.flex-1{flex:1 1 0%}
|
|
380
382
|
.flex-shrink-0{flex-shrink:0}
|
|
@@ -116,10 +116,10 @@ interface LayersPanelProps {
|
|
|
116
116
|
getMapUnsavedCount?: () => number;
|
|
117
117
|
activeEditingLayerId: string;
|
|
118
118
|
onSetActiveEditingLayer: (layerId: string) => void;
|
|
119
|
-
onSaveLayerGeoJSON: (layerId: string) => void
|
|
119
|
+
onSaveLayerGeoJSON: (layerId: string) => Promise<void>;
|
|
120
120
|
onLoadLayerGeoJSON: (layerId: string) => void;
|
|
121
121
|
onLoadNewLayerGeoJSON: () => void;
|
|
122
|
-
onSaveAllGeoJSON: () => void
|
|
122
|
+
onSaveAllGeoJSON: () => Promise<void>;
|
|
123
123
|
onSearchAndAddToNewLayer?: () => Promise<void>;
|
|
124
124
|
onWorkspaceLoad?: () => Promise<void>;
|
|
125
125
|
onWorkspaceSave?: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers-panel.d.ts","sourceRoot":"","sources":["../../../client/src/components/layers-panel.tsx"],"names":[],"mappings":"AACA,OAAO,EAA0G,GAAG,EAA0E,MAAM,cAAc,CAAC;AAYnN,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;AAC/D,MAAM,MAAM,QAAQ,GAAG,eAAe,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE;IAAE,EAAE,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,GAAG,CAAA;CAAE,EAIxE,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,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CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACpE;AAiJD,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,UAAU,EACV,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,kBAA0B,EAC1B,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,aAAqB,EACrB,QAAgB,EAChB,WAAmB,EACnB,mBAA2B,EAC3B,mBAA2B,EAC3B,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,GACrB,EAAE,gBAAgB,+BAskClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"AA2FA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"AA2FA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AAsRxD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAkH5E,eAAO,MAAM,eAAe,4GAgmS1B,CAAC"}
|
|
@@ -54,6 +54,14 @@ export interface FeaturesTruncatedInfo {
|
|
|
54
54
|
* `layerName` is only the first of them.
|
|
55
55
|
*/
|
|
56
56
|
layerCount?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Features the layer already held when this append was capped. Set it on
|
|
59
|
+
* append paths: the survivors are then not "the first `kept`" of the
|
|
60
|
+
* source — the layer's remaining room was the binding constraint, and on
|
|
61
|
+
* a two-stage cap (pipeline capped the file, the append capped again) they
|
|
62
|
+
* are a prefix of an already-truncated prefix.
|
|
63
|
+
*/
|
|
64
|
+
existing?: number;
|
|
57
65
|
}
|
|
58
66
|
/** Truncation detail attached to an ingest result so hosts can report it. */
|
|
59
67
|
export interface IngestTruncation {
|
|
@@ -61,6 +69,12 @@ export interface IngestTruncation {
|
|
|
61
69
|
sourceFeatureCount: number;
|
|
62
70
|
maxFeatures: number;
|
|
63
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* The same three numbers under this file's other set of names. One converter
|
|
74
|
+
* so no call site has to rename `droppedCount`/`sourceFeatureCount`/
|
|
75
|
+
* `maxFeatures` by hand and get a pair of them the wrong way round.
|
|
76
|
+
*/
|
|
77
|
+
export declare function truncationToCapInfo(truncation: IngestTruncation, rest: Omit<FeaturesTruncatedInfo, 'dropped' | 'sourceCount' | 'max'>): FeaturesTruncatedInfo;
|
|
64
78
|
export declare function formatFeatureCapToast(info: FeaturesTruncatedInfo): {
|
|
65
79
|
title: string;
|
|
66
80
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-cap.d.ts","sourceRoot":"","sources":["../../../client/src/lib/feature-cap.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,SAAU,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAWnE;AAED,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,GAAG,EAAE,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 +5,6 @@
|
|
|
5
5
|
* for exactly the exports big enough to also risk the string cap.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PRETTY_EXPORT_MAX_FEATURES = 10000;
|
|
8
|
-
/**
|
|
9
|
-
* Serialize a FeatureCollection into Blob parts without ever materializing
|
|
10
|
-
* the whole document as one string — a single `JSON.stringify` of a large
|
|
11
|
-
* collection throws RangeError near V8's string length cap (~290k typical
|
|
12
|
-
* features).
|
|
13
|
-
*
|
|
14
|
-
* Extra top-level members (`octostar:map`, `properties`, `crs`, …) are
|
|
15
|
-
* preserved; in the compact form `features` is emitted last.
|
|
16
|
-
*/
|
|
17
|
-
export declare function featureCollectionBlobParts(collection: GeoJSON.FeatureCollection, options?: {
|
|
18
|
-
targetPartChars?: number;
|
|
19
|
-
prettyMaxFeatures?: number;
|
|
20
|
-
}): string[];
|
|
21
8
|
export interface AsyncSerializeOptions {
|
|
22
9
|
targetPartChars?: number;
|
|
23
10
|
prettyMaxFeatures?: number;
|
|
@@ -35,11 +22,14 @@ export interface AsyncSerializeOptions {
|
|
|
35
22
|
sliceBudgetMs?: number;
|
|
36
23
|
}
|
|
37
24
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
25
|
+
* Serialize a FeatureCollection into Blob parts without ever materializing
|
|
26
|
+
* the whole document as one string — a single `JSON.stringify` of a large
|
|
27
|
+
* collection throws RangeError near V8's string length cap (~290k typical
|
|
28
|
+
* features) — and hand the main thread back every few milliseconds so a
|
|
29
|
+
* large export does not freeze the page. Extra top-level members
|
|
30
|
+
* (`octostar:map`, `properties`, `crs`, …) are preserved; in the compact
|
|
31
|
+
* form `features` is emitted last. Exports at or below `prettyMaxFeatures`
|
|
32
|
+
* stay synchronous; they would only pay for the scheduling.
|
|
43
33
|
*/
|
|
44
34
|
export declare function featureCollectionBlobPartsAsync(collection: GeoJSON.FeatureCollection, options?: AsyncSerializeOptions): Promise<string[]>;
|
|
45
35
|
//# sourceMappingURL=geojson-serialize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geojson-serialize.d.ts","sourceRoot":"","sources":["../../../client/src/lib/geojson-serialize.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"geojson-serialize.d.ts","sourceRoot":"","sources":["../../../client/src/lib/geojson-serialize.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,QAAS,CAAC;AAgDjD,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC;IAC1E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAKD;;;;;;;;;GASG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,OAAO,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,MAAM,EAAE,CAAC,CAmCnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label-pinning.d.ts","sourceRoot":"","sources":["../../../client/src/lib/label-pinning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;;GAKG;AAEH,mHAAmH;AACnH,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,EAAE,mBAA+D,CAAC;AAElG;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAA+D,CAAC;AAEpG,gFAAgF;AAChF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAC3D,CAAC,GAAG,CAAC,CAEP;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"label-pinning.d.ts","sourceRoot":"","sources":["../../../client/src/lib/label-pinning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;;GAKG;AAEH,mHAAmH;AACnH,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,mEAAmE;AACnE,eAAO,MAAM,mBAAmB,EAAE,mBAA+D,CAAC;AAElG;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAA+D,CAAC;AAEpG,gFAAgF;AAChF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,GAC3D,CAAC,GAAG,CAAC,CAEP;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,WAAW,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAmCxF;AAED,2DAA2D;AAC3D,wBAAgB,qBAAqB,IAAI,WAAW,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAgBtF"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Layer } from '@/components/layers-panel';
|
|
2
|
+
import { type GradientRange } from './color-utils';
|
|
3
|
+
import { type TracePointPaint } from './trace-timeline';
|
|
4
|
+
/** Everything the full sync computes once per rebuild and the per-feature body reads. */
|
|
5
|
+
export interface PaintContext {
|
|
6
|
+
/** null = no timeline filter active. */
|
|
7
|
+
timelineVisibleIds: ReadonlySet<string> | null;
|
|
8
|
+
/** Ids selected in draw union the component selection, already String()-normalized. */
|
|
9
|
+
selectedIds: ReadonlySet<string>;
|
|
10
|
+
/** `enableSelection || enableDrawing`: selection styling is inert without one of them. */
|
|
11
|
+
selectionEnabled: boolean;
|
|
12
|
+
sizeFieldRanges: ReadonlyMap<string, {
|
|
13
|
+
min: number;
|
|
14
|
+
max: number;
|
|
15
|
+
}>;
|
|
16
|
+
colorFieldRanges: ReadonlyMap<string, GradientRange>;
|
|
17
|
+
tracePointIds: ReadonlySet<string>;
|
|
18
|
+
lastTracePointIds: ReadonlySet<string>;
|
|
19
|
+
lastTracePointLabels: ReadonlyMap<string, string>;
|
|
20
|
+
tracePointColors: ReadonlyMap<string, string>;
|
|
21
|
+
}
|
|
22
|
+
/** What the sync records into the paint caches after styling one feature. */
|
|
23
|
+
export interface PaintedFeatureRecord {
|
|
24
|
+
featureId: string;
|
|
25
|
+
/** `_labelPriority` as if the feature were unselected. */
|
|
26
|
+
basePriority: number;
|
|
27
|
+
selected: boolean;
|
|
28
|
+
/** As-if-timeline-visible opacity; 0 when the feature is 3D-only-hidden. */
|
|
29
|
+
visibleStrokeOpacity: number;
|
|
30
|
+
visibleFillOpacity: number;
|
|
31
|
+
timelineHidden: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface StyledFeature {
|
|
34
|
+
/** What goes into the `custom-features` source. */
|
|
35
|
+
feature: GeoJSON.Feature;
|
|
36
|
+
paint: PaintedFeatureRecord;
|
|
37
|
+
/** Non-null only for trace points, which the trace timeline fast path repaints. */
|
|
38
|
+
tracePaint: TracePointPaint | null;
|
|
39
|
+
}
|
|
40
|
+
/** Every key the render source needs on a read-only feature: read by a style
|
|
41
|
+
* expression (the canvas `custom-*` layers, `label-pinning.ts`), a fast-path
|
|
42
|
+
* diff (`selection-diff`, `timeline-diff`, `trace-timeline`) or an interaction
|
|
43
|
+
* handler (click-select, context menu, tooltip key). Adding a key here costs
|
|
44
|
+
* one serialize and one tile copy per feature; remove keys before adding. */
|
|
45
|
+
export declare const RENDER_PROPERTY_KEYS: readonly string[];
|
|
46
|
+
/** Host keys copied verbatim onto read-only features. `_dvl_h3`: Map NT's DVL
|
|
47
|
+
* hex bins, whose tooltip identity key reads it off the rendered feature. */
|
|
48
|
+
export declare const RENDER_PASSTHROUGH_KEYS: readonly string[];
|
|
49
|
+
/** Draw-annotation keys the label layout and the arrow overlay read, so
|
|
50
|
+
* annotations exported from one map and imported into another as a read-only
|
|
51
|
+
* layer keep rendering. These are the names MapboxDraw already persists into
|
|
52
|
+
* saved maps and exported GeoJSON -- `kind` (the annotation's shape: `text`,
|
|
53
|
+
* `arrow`, `circle`, `rectangle`) included -- so they are matched verbatim
|
|
54
|
+
* rather than renamed. The gate below reads `kind` for the same reason. */
|
|
55
|
+
export declare const ANNOTATION_PASSTHROUGH_KEYS: readonly string[];
|
|
56
|
+
/**
|
|
57
|
+
* Style one feature for the `custom-features` render source.
|
|
58
|
+
*
|
|
59
|
+
* `slim` picks the payload: read-only features emit only
|
|
60
|
+
* `RENDER_PROPERTY_KEYS` plus the passthroughs, draw features keep every record
|
|
61
|
+
* field. Inputs are never slimmed -- the branches below all still read the
|
|
62
|
+
* feature's own properties; only the emitted `properties` object is reduced.
|
|
63
|
+
*/
|
|
64
|
+
export declare function styleFeatureForPaint(f: GeoJSON.Feature, layer: Layer | undefined, ctx: PaintContext, slim: boolean): StyledFeature;
|
|
65
|
+
//# sourceMappingURL=paint-feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paint-feature.d.ts","sourceRoot":"","sources":["../../../client/src/lib/paint-feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,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eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAmBjD,CAAC;AAEF;6EAC6E;AAC7E,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAgB,CAAC;AAEtE;;;;;2EAK2E;AAC3E,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAQxD,CAAC;AAUF;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,OAAO,CAAC,OAAO,EAClB,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,OAAO,GACZ,aAAa,CAkNf"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tooltip is the one consumer that used to read record fields straight off
|
|
3
|
+
* the rendered feature. Since TEAM-7584 a read-only feature's payload is the
|
|
4
|
+
* paint keep-list, so the tooltip resolves the record by id in the feature
|
|
5
|
+
* stores instead -- the same move click-select and the context menu already
|
|
6
|
+
* make.
|
|
7
|
+
*/
|
|
8
|
+
/** The part of `maplibregl.MapGeoJSONFeature` this module needs, kept
|
|
9
|
+
* structural so there is no maplibre value import and the tests run in node. */
|
|
10
|
+
export interface RenderedFeatureLike {
|
|
11
|
+
id?: string | number;
|
|
12
|
+
geometry: GeoJSON.Geometry;
|
|
13
|
+
properties: Record<string, unknown> | null;
|
|
14
|
+
}
|
|
15
|
+
export type FeatureLookup = (id: string) => GeoJSON.Feature | null;
|
|
16
|
+
/** `properties.id` is the sync's canonical string id; MapLibre's own `id` may
|
|
17
|
+
* be absent or numeric. Null when neither is usable. */
|
|
18
|
+
export declare function renderedFeatureId(f: RenderedFeatureLike): string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The feature the tooltip should describe: the stored record when the rendered
|
|
21
|
+
* id resolves, otherwise a copy of the rendered feature -- overlays and DVL
|
|
22
|
+
* bins have no store record and must still tooltip.
|
|
23
|
+
*
|
|
24
|
+
* The resolved record is deep-cloned, so a host provider cannot reach the
|
|
25
|
+
* feature stores through a nested value or the geometry. A shallow copy would
|
|
26
|
+
* not be enough here: records carry arbitrary host fields, and before the
|
|
27
|
+
* render source was slimmed the tooltip saw only throwaway tile-clipped
|
|
28
|
+
* geometry and sanitized primitives. The resolved case uses the *stored*
|
|
29
|
+
* geometry -- the rendered one is tile-clipped, and a host reading geometry
|
|
30
|
+
* wants the whole shape.
|
|
31
|
+
*
|
|
32
|
+
* Only ever called for the handful of features under the cursor, so the clone
|
|
33
|
+
* is not on a hot path.
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveTooltipFeature(rendered: RenderedFeatureLike, lookup: FeatureLookup): GeoJSON.Feature;
|
|
36
|
+
//# sourceMappingURL=tooltip-feature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-feature.d.ts","sourceRoot":"","sources":["../../../client/src/lib/tooltip-feature.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;gFACgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC5C;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;AAEnE;wDACwD;AACxD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,mBAAmB,GAAG,MAAM,GAAG,IAAI,CAKvE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,OAAO,CAiBjB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memoized trace grouping.
|
|
3
|
+
*
|
|
4
|
+
* A trace layer's three consumers — the properties-panel colour resolver,
|
|
5
|
+
* the full sync's point styling and its segment builder — each regrouped
|
|
6
|
+
* the layer's timed points by `groupByField` and re-sorted every group with
|
|
7
|
+
* `new Date(startDate).getTime()` inside the comparator: three groupings and
|
|
8
|
+
* two O(n log n) sorts per rebuild, every comparison parsing two dates. On a
|
|
9
|
+
* 200k-point trace layer that sort alone dominated the rebuild.
|
|
10
|
+
*
|
|
11
|
+
* Here each (feature array, groupByField) pair is grouped and sorted once:
|
|
12
|
+
* `startDate` is parsed once per point and the sort compares numbers.
|
|
13
|
+
* Invalidation is array identity — the read-only store is copy-on-write
|
|
14
|
+
* (read-only-feature-index.ts, and the setFeatureProperty comment in the
|
|
15
|
+
* canvas), so a WeakMap keyed by the array caches one index per snapshot
|
|
16
|
+
* and lets it go with the layer. Draw-backed layers hand in a fresh array
|
|
17
|
+
* per rebuild and simply miss (small sets; same trade as
|
|
18
|
+
* selection-spatial-index).
|
|
19
|
+
*
|
|
20
|
+
* The WeakMap is what bounds the cache's lifetime, not a leak around it:
|
|
21
|
+
* an entry is reachable only through its key, so it is collected the moment
|
|
22
|
+
* the store drops that snapshot (a property edit, a layer removal, an
|
|
23
|
+
* unmounted map). A size-bounded LRU would be the retaining structure here,
|
|
24
|
+
* since it holds each keyed array strongly until eviction: N snapshots of a
|
|
25
|
+
* 200k-point layer instead of the live one. The map is module-scoped, so
|
|
26
|
+
* every canvas on the page shares it, but keys are the per-layer store
|
|
27
|
+
* arrays, which no two canvases ever hold in common, so nothing is shared
|
|
28
|
+
* between maps beyond the object itself.
|
|
29
|
+
*
|
|
30
|
+
* The timeline filter is applied by the consumers AFTER the sort (filtering
|
|
31
|
+
* preserves order), so the index is filter-independent: group membership,
|
|
32
|
+
* group order and therefore group colours no longer shift while the timebar
|
|
33
|
+
* scrubs, and the timeline fast path can keep trace layers on the O(delta)
|
|
34
|
+
* route (trace-timeline.ts).
|
|
35
|
+
*
|
|
36
|
+
* Per-pair segment stats (distance / duration / speed — the trace hover
|
|
37
|
+
* popup reads them) are cached lazily on the group by the pair's positions
|
|
38
|
+
* in the sorted order, so a scrub that reconnects the same two points does
|
|
39
|
+
* not re-run the geodesic distance.
|
|
40
|
+
*/
|
|
41
|
+
export declare const TRACE_DEFAULT_COLOR = "#3b82f6";
|
|
42
|
+
export declare const TRACE_UNGROUPED_KEY = "__all__";
|
|
43
|
+
export interface TraceSegmentStats {
|
|
44
|
+
duration: string;
|
|
45
|
+
distance: string;
|
|
46
|
+
avgSpeed: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TraceGroup {
|
|
49
|
+
key: string;
|
|
50
|
+
/** Timed Point features of the group in ascending `startDate` order. */
|
|
51
|
+
points: GeoJSON.Feature[];
|
|
52
|
+
/** `String(feature.id)` per point, parallel to `points`. */
|
|
53
|
+
ids: string[];
|
|
54
|
+
/** `startDate` parsed once per point, parallel to `points` (NaN when unparsable). */
|
|
55
|
+
times: number[];
|
|
56
|
+
color: string;
|
|
57
|
+
/** Painted on the group's last visible point; null when the group is the ungrouped remainder. */
|
|
58
|
+
label: string | null;
|
|
59
|
+
pairStats: Map<string, TraceSegmentStats>;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Sorted groups for one layer's feature array. Only Point features with an
|
|
63
|
+
* id and a truthy `startDate` take part; a point whose `groupByField` value
|
|
64
|
+
* is falsy lands in the ungrouped remainder.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getTraceGroups(features: readonly GeoJSON.Feature[], groupByField: string | null | undefined): readonly TraceGroup[];
|
|
67
|
+
/** Evenly spaced hues by group position (the ungrouped remainder counts as a position but keeps the default blue). */
|
|
68
|
+
export declare function traceGroupColor(key: string, index: number, count: number): string;
|
|
69
|
+
/** Positions (ascending) of the group's points the predicate keeps. */
|
|
70
|
+
export declare function visibleTraceIndices(group: TraceGroup, isVisible: (id: string) => boolean): number[];
|
|
71
|
+
/** Visibility predicate for a timeline visible set (null = no filter). */
|
|
72
|
+
export declare function timelineVisibility(visibleSet: ReadonlySet<string> | null): (id: string) => boolean;
|
|
73
|
+
export declare function traceSegmentStats(group: TraceGroup, fromIndex: number, toIndex: number): TraceSegmentStats;
|
|
74
|
+
/**
|
|
75
|
+
* Segment ids are positional — `${painted group}:${from}:${to}` — so the
|
|
76
|
+
* timeline fast path can add/remove exactly the pairs a tick reconnects.
|
|
77
|
+
* `groupIndex` is the group's position among all groups the full sync
|
|
78
|
+
* painted, which makes the id unique across layers.
|
|
79
|
+
*/
|
|
80
|
+
export declare function traceSegmentId(groupIndex: number, fromIndex: number, toIndex: number): string;
|
|
81
|
+
export declare function traceSegmentFeature(group: TraceGroup, groupIndex: number, fromIndex: number, toIndex: number): GeoJSON.Feature;
|
|
82
|
+
//# sourceMappingURL=trace-groups.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-groups.d.ts","sourceRoot":"","sources":["../../../client/src/lib/trace-groups.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,MAAM,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,4DAA4D;IAC5D,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qFAAqF;IACrF,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,iGAAiG;IACjG,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC3C;AASD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,SAAS,OAAO,CAAC,OAAO,EAAE,EACpC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACtC,SAAS,UAAU,EAAE,CAcvB;AA8CD,sHAAsH;AACtH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,GAAG,MAAM,EAAE,CAMnG;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAElG;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAmB1G;AAWD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7F;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAkBjB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { GeoJSONSourceDiff } from 'maplibre-gl';
|
|
2
|
+
import type { SelectionPaintCache, UpdatableGeoJSONSource } from './selection-diff';
|
|
3
|
+
import { type TraceGroup } from './trace-groups';
|
|
4
|
+
/**
|
|
5
|
+
* Timeline fast path for trace layers.
|
|
6
|
+
*
|
|
7
|
+
* With the trace index filter-independent (trace-groups.ts), a timeline tick
|
|
8
|
+
* changes exactly two things about a visible trace layer: which point of
|
|
9
|
+
* each group is its ENDPOINT — the last visible one, painted larger and, when
|
|
10
|
+
* grouped, carrying the group label at trace-endpoint label priority — and
|
|
11
|
+
* which consecutive visible pairs the segment source connects. Everything
|
|
12
|
+
* else about a trace point (group colour, the small non-endpoint radius) is
|
|
13
|
+
* painted the same whether the timeline hides it or not, so the generic
|
|
14
|
+
* opacity flip (timeline-diff.ts) reveals it correctly.
|
|
15
|
+
*
|
|
16
|
+
* The full sync records the groups it painted and, per trace point, the
|
|
17
|
+
* paint variants it can take. A tick then derives the painted state from the
|
|
18
|
+
* paint cache's `appliedHiddenIds` (the visibility as painted), diffs it
|
|
19
|
+
* against the next visible set, and emits O(moved endpoints) point updates
|
|
20
|
+
* plus O(reconnected pairs) segment adds/removes — never a source rebuild.
|
|
21
|
+
* The endpoint paint below mirrors the full sync's trace branch; both read
|
|
22
|
+
* these constants.
|
|
23
|
+
*
|
|
24
|
+
* maplibre reports an unusable diff ASYNCHRONOUSLY (an ErrorEvent, as the
|
|
25
|
+
* other fast paths note), so correctness rests on construction, not on the
|
|
26
|
+
* catch: every segment carries a positional id unique across groups, and the
|
|
27
|
+
* point updates only name ids the full sync painted.
|
|
28
|
+
*/
|
|
29
|
+
export declare const TRACE_ENDPOINT_LABEL_PRIORITY = 5;
|
|
30
|
+
export declare const TRACE_POINT_RADIUS = 2;
|
|
31
|
+
export declare const TRACE_ENDPOINT_MIN_RADIUS = 8;
|
|
32
|
+
export interface TracePointPaint {
|
|
33
|
+
/** Label text the point paints when it is not the endpoint (visualConfig-resolved). */
|
|
34
|
+
name: string;
|
|
35
|
+
/** Radius it paints as the endpoint: `max(size-config radius, TRACE_ENDPOINT_MIN_RADIUS)`. */
|
|
36
|
+
endpointRadius: number;
|
|
37
|
+
/** Label priority it paints when it is not a labelled endpoint (the full sync's non-trace ranking). */
|
|
38
|
+
basePriority: number;
|
|
39
|
+
}
|
|
40
|
+
export interface TracePaintCache {
|
|
41
|
+
/** Every group of every visible trace layer, in paint order (= the segment ids' group index). */
|
|
42
|
+
groups: readonly TraceGroup[];
|
|
43
|
+
pointPaint: Map<string, TracePointPaint>;
|
|
44
|
+
}
|
|
45
|
+
export interface TraceTimelineDiff {
|
|
46
|
+
pointUpdates: NonNullable<GeoJSONSourceDiff['update']>;
|
|
47
|
+
segmentAdd: GeoJSON.Feature[];
|
|
48
|
+
segmentRemove: string[];
|
|
49
|
+
/** `basePriorityById` entries to commit once the updates are applied. */
|
|
50
|
+
basePriorities: [string, number][];
|
|
51
|
+
}
|
|
52
|
+
type PaintState = Pick<SelectionPaintCache, 'appliedHiddenIds' | 'appliedSelectedIds'>;
|
|
53
|
+
/**
|
|
54
|
+
* Pure diff from the painted visibility (`paint.appliedHiddenIds`) to
|
|
55
|
+
* `nextVisibleSet`. Build it BEFORE the generic timeline path advances that
|
|
56
|
+
* set, apply it after.
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildTraceTimelineDiff(trace: TracePaintCache, paint: PaintState, nextVisibleSet: ReadonlySet<string> | null): TraceTimelineDiff;
|
|
59
|
+
/**
|
|
60
|
+
* Consecutive pairs of two ascending index lists, merged in (from, to)
|
|
61
|
+
* order: a pair only in `prev` is removed, one only in `next` is added.
|
|
62
|
+
*/
|
|
63
|
+
export declare function diffConsecutivePairs(prev: readonly number[], next: readonly number[], onRemove: (from: number, to: number) => void, onAdd: (from: number, to: number) => void): void;
|
|
64
|
+
/**
|
|
65
|
+
* Apply a built diff: endpoint property updates on the point source, segment
|
|
66
|
+
* adds/removes on the trace source. A synchronous throw (a source gone
|
|
67
|
+
* between the diff being built and applied, or a diff maplibre rejects up
|
|
68
|
+
* front) is logged and reported as false so the caller falls back to the
|
|
69
|
+
* full sync, which repaints everything, cache included; the diff itself is
|
|
70
|
+
* cheap to lose. On success the endpoint priorities are committed to the
|
|
71
|
+
* paint cache so the selection fast path restores them correctly on deselect.
|
|
72
|
+
*/
|
|
73
|
+
export declare function applyTraceTimelineDiff(diff: TraceTimelineDiff, paint: Pick<SelectionPaintCache, 'basePriorityById'>, pointSource: UpdatableGeoJSONSource, segmentSource: UpdatableGeoJSONSource): boolean;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=trace-timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-timeline.d.ts","sourceRoot":"","sources":["../../../client/src/lib/trace-timeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAgF,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE/H;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,8FAA8F;IAC9F,cAAc,EAAE,MAAM,CAAC;IACvB,uGAAuG;IACvG,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACvD,UAAU,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;IAC9B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,yEAAyE;IACzE,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACpC;AAED,KAAK,UAAU,GAAG,IAAI,CAAC,mBAAmB,EAAE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