@octostar/map-component 0.3.3 → 0.3.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.
- package/dist/index.cjs +898 -475
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +898 -475
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/layers-panel.d.ts +3 -1
- 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/components/timebar.d.ts +7 -1
- package/dist/types/components/timebar.d.ts.map +1 -1
- package/dist/types/lib/custom-layer-stack.d.ts +2 -1
- package/dist/types/lib/custom-layer-stack.d.ts.map +1 -1
- package/dist/types/lib/label-pinning.d.ts +4 -1
- package/dist/types/lib/label-pinning.d.ts.map +1 -1
- package/dist/types/lib/paint-feature.d.ts +9 -27
- package/dist/types/lib/paint-feature.d.ts.map +1 -1
- package/dist/types/lib/selection-diff.d.ts +0 -51
- package/dist/types/lib/selection-diff.d.ts.map +1 -1
- package/dist/types/lib/selection-overlay.d.ts +0 -8
- package/dist/types/lib/selection-overlay.d.ts.map +1 -1
- package/dist/types/lib/selection-paint.d.ts +9 -1
- package/dist/types/lib/selection-paint.d.ts.map +1 -1
- package/dist/types/lib/selection-state.d.ts +2 -2
- package/dist/types/lib/selection-state.d.ts.map +1 -1
- package/dist/types/lib/shard-locator.d.ts +2 -0
- package/dist/types/lib/shard-locator.d.ts.map +1 -1
- package/dist/types/lib/shard-pipeline.d.ts +4 -5
- package/dist/types/lib/shard-pipeline.d.ts.map +1 -1
- package/dist/types/lib/shard-registry.d.ts +0 -28
- package/dist/types/lib/shard-registry.d.ts.map +1 -1
- package/dist/types/lib/timeline-index.d.ts +56 -0
- package/dist/types/lib/timeline-index.d.ts.map +1 -0
- package/dist/types/lib/timeline-state.d.ts +64 -0
- package/dist/types/lib/timeline-state.d.ts.map +1 -0
- package/dist/types/lib/timeline-window.d.ts +19 -0
- package/dist/types/lib/timeline-window.d.ts.map +1 -0
- package/dist/types/lib/trace-group-suggestion.d.ts +17 -0
- package/dist/types/lib/trace-group-suggestion.d.ts.map +1 -0
- package/dist/types/lib/trace-groups.d.ts +6 -5
- package/dist/types/lib/trace-groups.d.ts.map +1 -1
- package/dist/types/lib/trace-timeline.d.ts +56 -49
- package/dist/types/lib/trace-timeline.d.ts.map +1 -1
- package/dist/types/lib/visible-feature-count.d.ts +18 -4
- package/dist/types/lib/visible-feature-count.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/lib/timeline-diff.d.ts +0 -43
- package/dist/types/lib/timeline-diff.d.ts.map +0 -1
|
@@ -135,6 +135,8 @@ interface LayersPanelProps {
|
|
|
135
135
|
onMapStyleChange: (style: MapStyle) => void;
|
|
136
136
|
onUpdateTraceConfig: (layerId: string, config: TraceConfig) => void;
|
|
137
137
|
getAvailableTraceFields: (layerId: string) => string[];
|
|
138
|
+
/** The field to group by when trace lines are first turned on; null connects all points. */
|
|
139
|
+
getSuggestedTraceField?: (layerId: string) => string | null;
|
|
138
140
|
getLayerFields?: (layerId: string) => LayerFieldInfo[];
|
|
139
141
|
/**
|
|
140
142
|
* Returns a frequency-sorted list of distinct values found in `fieldName`
|
|
@@ -199,6 +201,6 @@ interface LayersPanelProps {
|
|
|
199
201
|
/** Override the feature count displayed next to a layer. Return null to use default. */
|
|
200
202
|
featureCountProvider?: (layerId: string) => number | string | null;
|
|
201
203
|
}
|
|
202
|
-
export declare function LayersPanel({ layers, onAddLayer, onRemoveLayer, onRenameLayer, onToggleLayerVisibility, onMoveFeatureToLayer, selectedFeatureIds, getFeatureCount, getLayerUnsavedCount, getMapUnsavedCount, activeEditingLayerId, onSetActiveEditingLayer, onSaveLayerGeoJSON, onLoadLayerGeoJSON, onLoadNewLayerGeoJSON, onSaveAllGeoJSON, onSearchAndAddToNewLayer, onWorkspaceLoad, onWorkspaceSave, onFitToFeatures, onFitToLayerFeatures, currentMapStyle, onMapStyleChange, onUpdateTraceConfig, getAvailableTraceFields, getLayerFields, getFieldValueDistribution, onUpdateHeatmapConfig, onUpdateClusterConfig, onUpdateVisualConfig, hasPointFeatures, autoLabelConfig, onUpdateAutoLabelConfig, visibleFeatureCount, is3DTerrainEnabled, onToggle3DTerrain, onUpdateAltitudeDisplayMode, availableBasemaps, hideSatellite, hideDark, hideTerrain, hideBasemapSwitcher, externalPersistence, customGlobalMenuItems, extraLayerToolbarButtons, extraNewLayerButtons, layerBadgeProvider, featureCountProvider, }: LayersPanelProps): import("react").JSX.Element;
|
|
204
|
+
export declare function LayersPanel({ layers, onAddLayer, onRemoveLayer, onRenameLayer, onToggleLayerVisibility, onMoveFeatureToLayer, selectedFeatureIds, getFeatureCount, getLayerUnsavedCount, getMapUnsavedCount, activeEditingLayerId, onSetActiveEditingLayer, onSaveLayerGeoJSON, onLoadLayerGeoJSON, onLoadNewLayerGeoJSON, onSaveAllGeoJSON, onSearchAndAddToNewLayer, onWorkspaceLoad, onWorkspaceSave, onFitToFeatures, onFitToLayerFeatures, currentMapStyle, onMapStyleChange, onUpdateTraceConfig, getAvailableTraceFields, getSuggestedTraceField, getLayerFields, getFieldValueDistribution, onUpdateHeatmapConfig, onUpdateClusterConfig, onUpdateVisualConfig, hasPointFeatures, autoLabelConfig, onUpdateAutoLabelConfig, visibleFeatureCount, is3DTerrainEnabled, onToggle3DTerrain, onUpdateAltitudeDisplayMode, availableBasemaps, hideSatellite, hideDark, hideTerrain, hideBasemapSwitcher, externalPersistence, customGlobalMenuItems, extraLayerToolbarButtons, extraNewLayerButtons, layerBadgeProvider, featureCountProvider, }: LayersPanelProps): import("react").JSX.Element;
|
|
203
205
|
export {};
|
|
204
206
|
//# sourceMappingURL=layers-panel.d.ts.map
|
|
@@ -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,MAA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;IAC3C;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,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,+
|
|
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,GAA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CAAC;IAC3C;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,wFAAwF;IACxF,oBAAoB,CAAC,EAAE,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,sBAAsB,EACtB,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,+BA0kClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"AA2HA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AAgSxD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA2D5E,eAAO,MAAM,eAAe,4GAw0S1B,CAAC"}
|
|
@@ -13,7 +13,13 @@ export interface TimebarLabels {
|
|
|
13
13
|
cumulative: string;
|
|
14
14
|
}
|
|
15
15
|
export interface TimebarProps {
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The ids the range shows, hides and leaves untimed, on every range change.
|
|
18
|
+
* Optional: the map reads the range from its timeline store, so it passes
|
|
19
|
+
* none and the per-feature loop does not run; a host that filters by id
|
|
20
|
+
* (the link chart) passes it.
|
|
21
|
+
*/
|
|
22
|
+
onFilterChange?: (visibleIds: string[], hiddenIds: string[], untimedIds: string[]) => void;
|
|
17
23
|
selectedFeatureIds?: string[];
|
|
18
24
|
selectedFeatureColors?: Map<string, string>;
|
|
19
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timebar.d.ts","sourceRoot":"","sources":["../../../client/src/components/timebar.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,uGAAuG;AACvG,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AASD,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;
|
|
1
|
+
{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,qBAAqB,EACrB,gBAAyB,EACzB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,MAAM,EAAE,cAAc,GACvB,EAAE,YAAY,sCA4Td"}
|
|
@@ -11,7 +11,8 @@ import type { GeoJSONSourceSpecification, LayerSpecification } from 'maplibre-gl
|
|
|
11
11
|
* Selection is feature state (`selection-paint.ts`): the `point` ring reads
|
|
12
12
|
* it in paint. The halos that need a filter or a dasharray, and the selected
|
|
13
13
|
* label that must win collision, live in the selection overlay source
|
|
14
|
-
* (`selection-overlay.ts`), not in this stack.
|
|
14
|
+
* (`selection-overlay.ts`), not in this stack. Timeline visibility is feature
|
|
15
|
+
* state too (`timeline-state.ts`): every role reads `TIMELINE_HIDDEN`.
|
|
15
16
|
*/
|
|
16
17
|
export type CustomLayerRole = 'polygon-fill' | 'polygon-stroke' | 'line' | 'point-shadow' | 'point' | 'point-icon' | 'labels' | 'labels-pinned';
|
|
17
18
|
/** In painter order, lowest first. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-layer-stack.d.ts","sourceRoot":"","sources":["../../../client/src/lib/custom-layer-stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAUlF
|
|
1
|
+
{"version":3,"file":"custom-layer-stack.d.ts","sourceRoot":"","sources":["../../../client/src/lib/custom-layer-stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAUlF;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,GACvB,cAAc,GACd,gBAAgB,GAChB,MAAM,GACN,cAAc,GACd,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,eAAe,CAAC;AAEpB,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EASxD,CAAC;AAEF,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,0BAA0B,CAE7D;AAED,wFAAwF;AACxF,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,wBAAgB,aAAa,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC,CAiB1F;AAQD,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,GAAG,eAAe,EAAE,CAMvF;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAW/D;AA+ND,iFAAiF;AACjF,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,IAAI,EAAE,YAAY,GACjB,kBAAkB,EAAE,CAEtB"}
|
|
@@ -31,7 +31,10 @@ export declare function buildCustomLabelLayout(): NonNullable<SymbolLayerSpecifi
|
|
|
31
31
|
* label. `hideSelected` is for the base layers: a selected feature's label is
|
|
32
32
|
* drawn by the overlay, so its base copy goes transparent — while its layout
|
|
33
33
|
* still runs and claims the same collision space, so neighbours yield as they
|
|
34
|
-
* did when selection boosted the sort key.
|
|
34
|
+
* did when selection boosted the sort key. Their sources also carry the
|
|
35
|
+
* timeline state, so a timeline-hidden label goes transparent there too; the
|
|
36
|
+
* overlay source carries none, and the canvas fades a hidden selected copy
|
|
37
|
+
* through its `stroke-opacity`.
|
|
35
38
|
*/
|
|
36
39
|
export declare function buildCustomLabelPaint(opts?: {
|
|
37
40
|
hideSelected?: boolean;
|
|
@@ -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;AAIjF;;;;;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;AAIjF;;;;;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,CA+BxF;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,WAAW,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAgBvH"}
|
|
@@ -1,44 +1,32 @@
|
|
|
1
1
|
import type { Layer } from '@/components/layers-panel';
|
|
2
2
|
import { type GradientRange } from './color-utils';
|
|
3
|
-
import { type TracePointPaint } from './trace-timeline';
|
|
4
3
|
/** Matches the paint-side `['coalesce', ['get', '_labelPriority'], 100]` default. */
|
|
5
4
|
export declare const DEFAULT_LABEL_PRIORITY = 100;
|
|
5
|
+
/** Opacities of a feature with no `stroke-opacity` / `fill-opacity` of its own. */
|
|
6
|
+
export declare const DEFAULT_VISIBLE_STROKE_OPACITY = 1;
|
|
7
|
+
export declare const DEFAULT_VISIBLE_FILL_OPACITY = 0.2;
|
|
6
8
|
/**
|
|
7
9
|
* Everything the full sync computes once per rebuild and the per-feature body
|
|
8
|
-
* reads. Selection
|
|
9
|
-
* source (`selection-state.ts
|
|
10
|
+
* reads. Selection and timeline visibility are not here: both are feature
|
|
11
|
+
* state, applied beside the source (`selection-state.ts`,
|
|
12
|
+
* `timeline-state.ts`), never baked into the payload.
|
|
10
13
|
*/
|
|
11
14
|
export interface PaintContext {
|
|
12
|
-
/** null = no timeline filter active. */
|
|
13
|
-
timelineVisibleIds: ReadonlySet<string> | null;
|
|
14
15
|
sizeFieldRanges: ReadonlyMap<string, {
|
|
15
16
|
min: number;
|
|
16
17
|
max: number;
|
|
17
18
|
}>;
|
|
18
19
|
colorFieldRanges: ReadonlyMap<string, GradientRange>;
|
|
19
20
|
tracePointIds: ReadonlySet<string>;
|
|
20
|
-
lastTracePointIds: ReadonlySet<string>;
|
|
21
|
-
lastTracePointLabels: ReadonlyMap<string, string>;
|
|
22
21
|
tracePointColors: ReadonlyMap<string, string>;
|
|
23
22
|
}
|
|
24
|
-
/** What the sync records into the paint caches after styling one feature. */
|
|
25
|
-
export interface PaintedFeatureRecord {
|
|
26
|
-
featureId: string;
|
|
27
|
-
/** As-if-timeline-visible opacity; 0 when the feature is 3D-only-hidden. */
|
|
28
|
-
visibleStrokeOpacity: number;
|
|
29
|
-
visibleFillOpacity: number;
|
|
30
|
-
timelineHidden: boolean;
|
|
31
|
-
}
|
|
32
23
|
export interface StyledFeature {
|
|
33
24
|
/** What goes into the `custom-features` source. */
|
|
34
25
|
feature: GeoJSON.Feature;
|
|
35
|
-
paint: PaintedFeatureRecord;
|
|
36
|
-
/** Non-null only for trace points, which the trace timeline fast path repaints. */
|
|
37
|
-
tracePaint: TracePointPaint | null;
|
|
38
26
|
}
|
|
39
27
|
/** Every key the render source needs on a read-only feature: read by a style
|
|
40
28
|
* expression (the canvas `custom-*` layers, `label-pinning.ts`), a fast-path
|
|
41
|
-
* diff
|
|
29
|
+
* diff or an interaction handler
|
|
42
30
|
* (click-select, context menu, tooltip key). Selection is feature state
|
|
43
31
|
* (`selection-paint.ts`), so no key carries it. Adding a key here costs one
|
|
44
32
|
* serialize and one tile copy per feature; remove keys before adding. */
|
|
@@ -53,14 +41,8 @@ export declare const RENDER_PASSTHROUGH_KEYS: readonly string[];
|
|
|
53
41
|
* `arrow`, `circle`, `rectangle`) included -- so they are matched verbatim
|
|
54
42
|
* rather than renamed. The gate below reads `kind` for the same reason. */
|
|
55
43
|
export declare const ANNOTATION_PASSTHROUGH_KEYS: readonly string[];
|
|
56
|
-
/**
|
|
57
|
-
|
|
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
|
-
*/
|
|
44
|
+
/** The layer's heatmap or cluster mode blanks its points, and with them anything labelling them. */
|
|
45
|
+
export declare function layerHidesPoints(layer: Layer | undefined): boolean;
|
|
64
46
|
export declare function styleFeatureForPaint(f: GeoJSON.Feature, layer: Layer | undefined, ctx: PaintContext, slim: boolean): StyledFeature;
|
|
65
47
|
export interface LayerFieldRanges {
|
|
66
48
|
size: {
|
|
@@ -1 +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,CAAC;AACvD,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;
|
|
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,CAAC;AACvD,OAAO,EAA2C,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAI5F,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACrD,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC;CAC1B;AAED;;;;;yEAKyE;AACzE,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAiBjD,CAAC;AAEF;6EAC6E;AAC7E,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAgB,CAAC;AAEtE;;;;;2EAK2E;AAC3E,eAAO,MAAM,2BAA2B,EAAE,SAAS,MAAM,EAQxD,CAAC;AAsBF,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAElE;AAED,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,OAAO,CAAC,OAAO,EAClB,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,OAAO,GACZ,aAAa,CAsLf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC1C,KAAK,EAAE,aAAa,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,EACnC,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,KAAK,IAAI,KAAK,IAAI,GAC7E,gBAAgB,CAiClB"}
|
|
@@ -1,54 +1,3 @@
|
|
|
1
|
-
import type { GeoJSONSourceDiff } from 'maplibre-gl';
|
|
2
|
-
/**
|
|
3
|
-
* The paint cache behind the timeline fast path (timeline-diff.ts,
|
|
4
|
-
* trace-timeline.ts): what the full sync painted, so a scrub or playback
|
|
5
|
-
* tick can flip stroke-opacity / fill-opacity / isTimelineHidden on the
|
|
6
|
-
* toggled features through `updateData` instead of rebuilding the source.
|
|
7
|
-
*
|
|
8
|
-
* Timeline-only since TEAM-7582: selection is feature state
|
|
9
|
-
* (`selection-state.ts`) and no longer diffs the source. TEAM-7583 replaces
|
|
10
|
-
* this cache with global timeline state and removes it, type name included.
|
|
11
|
-
*/
|
|
12
|
-
export interface SelectionPaintCache {
|
|
13
|
-
/** Feature ids present in the source as of the last paint. */
|
|
14
|
-
presentIds: Set<string>;
|
|
15
|
-
/** Ids currently painted `isTimelineHidden: 1` (advanced by the timeline fast path). */
|
|
16
|
-
appliedHiddenIds: Set<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Painted `stroke-opacity` as if timeline-visible (0 for 3D-only-hidden
|
|
19
|
-
* features). SPARSE: holds only values that differ from
|
|
20
|
-
* `DEFAULT_VISIBLE_STROKE_OPACITY` — readers fall back to the constant, so
|
|
21
|
-
* the map stays near-empty instead of one entry per painted feature.
|
|
22
|
-
*/
|
|
23
|
-
visibleStrokeOpacityById: Map<string, number>;
|
|
24
|
-
/** Painted `fill-opacity` as if timeline-visible — sparse over `DEFAULT_VISIBLE_FILL_OPACITY`. */
|
|
25
|
-
visibleFillOpacityById: Map<string, number>;
|
|
26
|
-
/**
|
|
27
|
-
* False when the painted collection had duplicate ids: maplibre's
|
|
28
|
-
* `updateData` requires unique ids on every feature and fails
|
|
29
|
-
* ASYNCHRONOUSLY (an ErrorEvent, not a throw) otherwise — so the fast
|
|
30
|
-
* path must be disabled up front rather than caught.
|
|
31
|
-
*/
|
|
32
|
-
updatable: boolean;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The full sync's as-if-visible opacity defaults (feature has no explicit
|
|
36
|
-
* `stroke-opacity` / `fill-opacity` property and is not 3D-only-hidden).
|
|
37
|
-
* Recording and restoring both key off these — change them only together
|
|
38
|
-
* with the full sync's paint defaults.
|
|
39
|
-
*/
|
|
40
|
-
export declare const DEFAULT_VISIBLE_STROKE_OPACITY = 1;
|
|
41
|
-
export declare const DEFAULT_VISIBLE_FILL_OPACITY = 0.2;
|
|
42
|
-
export declare function createSelectionPaintCache(): SelectionPaintCache;
|
|
43
|
-
/**
|
|
44
|
-
* Record one painted feature during a full sync. A duplicate id makes the
|
|
45
|
-
* cache non-updatable — see `SelectionPaintCache.updatable`.
|
|
46
|
-
*/
|
|
47
|
-
export declare function recordPaintedFeature(cache: SelectionPaintCache, featureId: string, visibleStrokeOpacity: number, visibleFillOpacity: number, isTimelineHidden: boolean): void;
|
|
48
|
-
/** Minimal surface of maplibre's GeoJSONSource the fast path needs. */
|
|
49
|
-
export interface UpdatableGeoJSONSource {
|
|
50
|
-
updateData(diff: GeoJSONSourceDiff): unknown;
|
|
51
|
-
}
|
|
52
1
|
/**
|
|
53
2
|
* Whether applySelectionState still needs its draw.changeMode call. The
|
|
54
3
|
* call is skipped only when it would be a pure no-op — nothing to select,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-diff.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-diff.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"selection-diff.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-diff.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,sBAAsB,EAAE,MAAM,CAAC;IAC/B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAMV"}
|
|
@@ -34,14 +34,6 @@ export declare const SELECTION_OVERLAY_LAYER_IDS: {
|
|
|
34
34
|
};
|
|
35
35
|
/** In paint order, lowest first: the halos, then the label as the topmost layer of the style. */
|
|
36
36
|
export declare function buildSelectionOverlayStack(): LayerSpecification[];
|
|
37
|
-
/** What a timeline tick can change in the overlay: the selected ids it was painted from, and which of them the timeline hid. */
|
|
38
|
-
export interface OverlayTimelineInputs {
|
|
39
|
-
ids: ReadonlySet<string>;
|
|
40
|
-
hidden: ReadonlySet<string>;
|
|
41
|
-
}
|
|
42
|
-
export declare function overlayTimelineInputs(ids: ReadonlySet<string>, visible: ReadonlySet<string> | null): OverlayTimelineInputs;
|
|
43
|
-
/** A tick that shows or hides no selected feature leaves the overlay as painted, so it need not be restyled. */
|
|
44
|
-
export declare function sameOverlayTimelineInputs(a: OverlayTimelineInputs, b: OverlayTimelineInputs): boolean;
|
|
45
37
|
/**
|
|
46
38
|
* The overlay payload: the selected features styled exactly as their base
|
|
47
39
|
* layer painted them (`styleFor` runs `styleFeatureForPaint` against the last
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-overlay.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAC;AAEX,iGAAiG;AACjG,wBAAgB,0BAA0B,IAAI,kBAAkB,EAAE,CA2DjE;AAED
|
|
1
|
+
{"version":3,"file":"selection-overlay.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-overlay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKtD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,eAAO,MAAM,2BAA2B;;;;;CAK9B,CAAC;AAEX,iGAAiG;AACjG,wBAAgB,0BAA0B,IAAI,kBAAkB,EAAE,CA2DjE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,EACxB,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,OAAO,CAAC,OAAO,EAAE,GACnD,OAAO,CAAC,iBAAiB,CAM3B"}
|
|
@@ -17,7 +17,15 @@ export type PaintExpression = Extract<NonNullable<NonNullable<CircleLayerSpecifi
|
|
|
17
17
|
export declare const SELECTED_STATE_KEY = "selected";
|
|
18
18
|
/** Paint-expression read of the selection. Boolean-coerced: absent state is unselected. */
|
|
19
19
|
export declare const SELECTED: PaintExpression;
|
|
20
|
-
/** The state written for a selected feature;
|
|
20
|
+
/** The state written for a selected feature; deselection removes this key only. */
|
|
21
21
|
export declare const SELECTED_STATE: Readonly<Record<string, unknown>>;
|
|
22
22
|
export declare const SELECTION_COLOR = "#06b6d4";
|
|
23
|
+
/** Feature-state key of a timeline-hidden feature (`timeline-state.ts`). */
|
|
24
|
+
export declare const TIMELINE_HIDDEN_KEY = "timelineHidden";
|
|
25
|
+
/** Paint-expression read of the timeline; absent state is visible. */
|
|
26
|
+
export declare const TIMELINE_HIDDEN: PaintExpression;
|
|
27
|
+
/** Feature-state key of a trace group's current endpoint (`trace-timeline.ts`). */
|
|
28
|
+
export declare const TRACE_ENDPOINT_KEY = "traceEndpoint";
|
|
29
|
+
/** Paint-expression read of a trace endpoint; absent state is a plain trace point. */
|
|
30
|
+
export declare const TRACE_ENDPOINT: PaintExpression;
|
|
23
31
|
//# sourceMappingURL=selection-paint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-paint.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;GASG;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CACnC,WAAW,CAAC,WAAW,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,EAClF,OAAO,EAAE,CACV,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,2FAA2F;AAC3F,eAAO,MAAM,QAAQ,EAAE,eAA2E,CAAC;AAEnG,
|
|
1
|
+
{"version":3,"file":"selection-paint.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-paint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;GASG;AAEH;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CACnC,WAAW,CAAC,WAAW,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,EAClF,OAAO,EAAE,CACV,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAE7C,2FAA2F;AAC3F,eAAO,MAAM,QAAQ,EAAE,eAA2E,CAAC;AAEnG,mFAAmF;AACnF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAiD,CAAC;AAE/G,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAE,eAA4E,CAAC;AAE3G,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,sFAAsF;AACtF,eAAO,MAAM,cAAc,EAAE,eAA2E,CAAC"}
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface FeatureStateHost {
|
|
18
18
|
setFeatureState(sourceId: string, id: string, state: Readonly<Record<string, unknown>>): void;
|
|
19
|
-
/**
|
|
20
|
-
removeFeatureState(sourceId: string, id: string): void;
|
|
19
|
+
/** Removes one key: a feature's other state (the timeline's) must survive its deselection. */
|
|
20
|
+
removeFeatureState(sourceId: string, id: string, key: string): void;
|
|
21
21
|
/**
|
|
22
22
|
* The live source object, or undefined once torn down. A source removed and
|
|
23
23
|
* re-added under the same id is a new object, and has lost its feature state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-state.d.ts","sourceRoot":"","sources":["../../../client/src/lib/selection-state.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAe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AsBlC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,EACzC,IAAI,EAAE,gBAAgB,GACrB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA0BnC"}
|
|
@@ -29,6 +29,8 @@ export interface FeatureHolder {
|
|
|
29
29
|
layerId: string;
|
|
30
30
|
/** That layer's own record for the id — two layers sharing an id may hold different features. */
|
|
31
31
|
feature: GeoJSON.Feature;
|
|
32
|
+
/** Its index in the layer's array, which names the shard that paints it. */
|
|
33
|
+
position: number;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Every copy of `id` in the read-only layers, in store order and then array
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-locator.d.ts","sourceRoot":"","sources":["../../../client/src/lib/shard-locator.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1D,uFAAuF;IACvF,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,uGAAuG;AACvG,UAAU,OAAO;IACf,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAChC;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,OAAO,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AAExE,wBAAgB,kBAAkB,IAAI,YAAY,CAEjD;AA6BD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MA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
|
|
1
1
|
import type { Layer } from '@/components/layers-panel';
|
|
2
2
|
import { type CustomLayerRole } from './custom-layer-stack';
|
|
3
3
|
import { type PaintContext } from './paint-feature';
|
|
4
|
-
import { type SelectionPaintCache } from './selection-diff';
|
|
5
4
|
/** The MapLibre side of a pass, so the pass itself stays testable in node. */
|
|
6
5
|
export interface ShardHost {
|
|
7
6
|
/**
|
|
@@ -19,21 +18,21 @@ export interface ShardPassInput {
|
|
|
19
18
|
shardSize: number;
|
|
20
19
|
/**
|
|
21
20
|
* Built per shard, not once per pass: a pass spans ~20 frames and the
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* paint inputs can change meanwhile, so each shard paints with the ones
|
|
22
|
+
* current when its turn comes.
|
|
24
23
|
*/
|
|
25
24
|
contextForShard: () => PaintContext;
|
|
26
25
|
host: ShardHost;
|
|
27
26
|
yieldFrame: () => Promise<void>;
|
|
28
27
|
/** Generation check: false once a newer pass (or teardown) supersedes this one. */
|
|
29
28
|
isCurrent: () => boolean;
|
|
30
|
-
|
|
29
|
+
/** The shard's slice `[start, end)` of `features` is on its source; selection and timeline state follow it here. */
|
|
30
|
+
onShardPainted?: (index: number, start: number, end: number) => void;
|
|
31
31
|
onProgress?: (painted: number, total: number) => void;
|
|
32
32
|
}
|
|
33
33
|
export interface ShardPassResult {
|
|
34
34
|
completed: boolean;
|
|
35
35
|
shardCount: number;
|
|
36
|
-
caches: SelectionPaintCache[];
|
|
37
36
|
arrowLines: GeoJSON.Feature[];
|
|
38
37
|
}
|
|
39
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-pipeline.d.ts","sourceRoot":"","sources":["../../../client/src/lib/shard-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAwB,MAAM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E,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAiClF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { LayerSpecification, SourceSpecification } from 'maplibre-gl';
|
|
2
2
|
import { type CustomLayerRole } from './custom-layer-stack';
|
|
3
|
-
import type { SelectionPaintCache, UpdatableGeoJSONSource } from './selection-diff';
|
|
4
3
|
import type { ShardHost } from './shard-pipeline';
|
|
5
4
|
/** The slice of the MapLibre style the registry drives, so it tests in node. */
|
|
6
5
|
export interface StyleHost {
|
|
@@ -21,8 +20,6 @@ export interface ShardStack {
|
|
|
21
20
|
export interface ShardLayerState {
|
|
22
21
|
layerId: string;
|
|
23
22
|
stacks: ShardStack[];
|
|
24
|
-
/** Index-aligned with `stacks`; sparse while a pass is still landing. */
|
|
25
|
-
caches: Array<SelectionPaintCache | undefined>;
|
|
26
23
|
fingerprint: unknown;
|
|
27
24
|
/**
|
|
28
25
|
* Paint inputs of the pass currently landing, or null. A sync that changes
|
|
@@ -77,31 +74,6 @@ export interface ShardRegistry {
|
|
|
77
74
|
}): string[];
|
|
78
75
|
/** What the click / hover / context-menu queries pass to `queryRenderedFeatures`. */
|
|
79
76
|
interactiveLayerIds(): string[];
|
|
80
|
-
/** The source for a shard index, for the per-shard fast-path diffs. */
|
|
81
|
-
sourceFor(layerId: string, index: number): unknown | undefined;
|
|
82
|
-
sourceById(sourceId: string): unknown | undefined;
|
|
83
|
-
/** Visit every shard that has been painted; stops at the first false. */
|
|
84
|
-
everyPaintedShard(visit: (cache: SelectionPaintCache, sourceId: string) => boolean): boolean;
|
|
85
77
|
}
|
|
86
78
|
export declare function createShardRegistry(host: StyleHost, hooks: ShardRegistryHooks): ShardRegistry;
|
|
87
|
-
/**
|
|
88
|
-
* Bring one layer's painted shards up to date with the current timeline
|
|
89
|
-
* state without repainting them, for a pass the fingerprint skipped.
|
|
90
|
-
* Selection is feature state and needs no reconciling here.
|
|
91
|
-
*
|
|
92
|
-
* Returns false when any shard cannot be diffed (no cache yet, duplicate ids,
|
|
93
|
-
* missing source), so the caller repaints instead. Shards a pass has not
|
|
94
|
-
* reached yet have no cache and are skipped: they paint with the current state
|
|
95
|
-
* when their turn comes.
|
|
96
|
-
*/
|
|
97
|
-
export declare function reconcileShardCaches(registry: ShardRegistry, layerId: string, expectedShards: number, visibleIds: ReadonlySet<string> | null): boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Run a fast-path diff over every painted shard of every layer.
|
|
100
|
-
*
|
|
101
|
-
* Returns false as soon as one shard cannot be diffed, so the caller falls
|
|
102
|
-
* back to a full sync — matching how the shared cache already behaves. A shard
|
|
103
|
-
* a pass has not painted yet has no cache and is skipped: it picks the current
|
|
104
|
-
* state up when its turn comes.
|
|
105
|
-
*/
|
|
106
|
-
export declare function forEachShardCache(registry: ShardRegistry | null, apply: (cache: SelectionPaintCache, source: UpdatableGeoJSONSource) => boolean): boolean;
|
|
107
79
|
//# sourceMappingURL=shard-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-registry.d.ts","sourceRoot":"","sources":["../../../client/src/lib/shard-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,EAGL,KAAK,eAAe,EAKrB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"shard-registry.d.ts","sourceRoot":"","sources":["../../../client/src/lib/shard-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE3E,OAAO,EAGL,KAAK,eAAe,EAKrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,gFAAgF;AAChF,MAAM,WAAW,SAAS;IACxB,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C3C,qGAAqG;IACrG,aAAa,IAAI,OAAO,CAAC;IACzB;;;;;;;OAOG;IACH,cAAc,CAAC,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IACpD,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAAC;IACzC,4DAA4D;IAC5D,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpD,oGAAoG;IACpG,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,gEAAgE;IAChE,eAAe,IAAI,MAAM,EAAE,CAAC;IAC5B;;;;OAIG;IACH,UAAU,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IACvE,+DAA+D;IAC/D,cAAc,IAAI,MAAM,EAAE,CAAC;IAC3B,mIAAmI;IACnI,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,QAAQ,GAAG,KAAK,EAAE,IAAI,CAAC,EAAE;QAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,EAAE,CAAC;IACrG,qFAAqF;IACrF,mBAAmB,IAAI,MAAM,EAAE,CAAC;CACjC;AAKD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAwL7F"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type TimelineWindow } from './timeline-window';
|
|
2
|
+
/**
|
|
3
|
+
* A numeric interval index over one feature array, so a timeline tick finds
|
|
4
|
+
* the features whose visibility flipped in O(log n + flipped) and counts the
|
|
5
|
+
* visible ones in O(log n), instead of testing every feature.
|
|
6
|
+
*
|
|
7
|
+
* Built once per array identity and cached in a WeakMap: the read-only store
|
|
8
|
+
* is copy-on-write (`read-only-feature-index.ts`, the `setFeatureProperty`
|
|
9
|
+
* comment in the canvas), so an edited layer is a new array and a new index,
|
|
10
|
+
* and a dropped one is collected with its array. Keep mutations copy-on-write.
|
|
11
|
+
*
|
|
12
|
+
* Dates are read the way the timeline store's scan reads them
|
|
13
|
+
* (`normalizeTemporalProperties`), so the map and the histogram agree on
|
|
14
|
+
* every feature, normalized or not.
|
|
15
|
+
*/
|
|
16
|
+
export interface TimelineIndex {
|
|
17
|
+
readonly size: number;
|
|
18
|
+
/** Per position. A one-sided interval is filled to a point; NaN on both sides for an untimed feature. */
|
|
19
|
+
readonly starts: Float64Array;
|
|
20
|
+
readonly ends: Float64Array;
|
|
21
|
+
/** Timed positions sorted by start, and the starts in that order. */
|
|
22
|
+
readonly byStart: Uint32Array;
|
|
23
|
+
readonly sortedStarts: Float64Array;
|
|
24
|
+
/** Timed positions sorted by end, and the ends in that order. */
|
|
25
|
+
readonly byEnd: Uint32Array;
|
|
26
|
+
readonly sortedEnds: Float64Array;
|
|
27
|
+
readonly untimedCount: number;
|
|
28
|
+
/** Every position of each id the array holds more than once; empty when ids are unique. */
|
|
29
|
+
readonly repeats: ReadonlyMap<string, readonly number[]>;
|
|
30
|
+
/** De-dupe scratch for `flippedPositions`, all zero between calls. */
|
|
31
|
+
readonly mark: Uint8Array;
|
|
32
|
+
}
|
|
33
|
+
/** One feature's interval as the index reads it, for a caller that has the feature but not its position. */
|
|
34
|
+
export declare function featureInterval(f: GeoJSON.Feature): {
|
|
35
|
+
s: number;
|
|
36
|
+
e: number;
|
|
37
|
+
};
|
|
38
|
+
/** For an array rebuilt per read (MapboxDraw's `getAll()`), where an index would never be reused. */
|
|
39
|
+
export declare function isFeatureVisible(f: GeoJSON.Feature, w: TimelineWindow | null): boolean;
|
|
40
|
+
export declare function getTimelineIndex(features: readonly GeoJSON.Feature[]): TimelineIndex;
|
|
41
|
+
export declare function isVisibleAt(index: TimelineIndex, position: number, w: TimelineWindow | null): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Appends the positions whose visibility differs between `from` and `to`.
|
|
44
|
+
* Moving `t1` can only flip a feature whose start lies between the two `t1`s,
|
|
45
|
+
* and moving `t0` one whose end lies between the two `t0`s, so only those two
|
|
46
|
+
* sorted ranges are candidates. A null window shows everything, which for a
|
|
47
|
+
* timed feature is the unbounded window.
|
|
48
|
+
*/
|
|
49
|
+
export declare function flippedPositions(index: TimelineIndex, from: TimelineWindow | null, to: TimelineWindow | null, out: number[]): void;
|
|
50
|
+
/**
|
|
51
|
+
* Visible features under `w`. For a well-ordered window a timed feature that
|
|
52
|
+
* ends before `t0` also starts before `t1`, so the visible timed count is
|
|
53
|
+
* `#(start <= t1) - #(end < t0)`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function countVisible(index: TimelineIndex, w: TimelineWindow | null): number;
|
|
56
|
+
//# sourceMappingURL=timeline-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-index.d.ts","sourceRoot":"","sources":["../../../client/src/lib/timeline-index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE3E;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,2FAA2F;IAC3F,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;IACzD,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;CAC3B;AAgBD,4GAA4G;AAC5G,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAG5E;AAED,qGAAqG;AACrG,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAItF;AAsDD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,OAAO,EAAE,GAAG,aAAa,CASpF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAErG;AA4BD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,cAAc,GAAG,IAAI,EAC3B,EAAE,EAAE,cAAc,GAAG,IAAI,EACzB,GAAG,EAAE,MAAM,EAAE,GACZ,IAAI,CAoBN;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,GAAG,IAAI,GAAG,MAAM,CAQnF"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TIMELINE_HIDDEN_KEY } from './selection-paint';
|
|
2
|
+
import type { FeatureStateHost } from './selection-state';
|
|
3
|
+
import { type TimelineIndex } from './timeline-index';
|
|
4
|
+
import { type TimelineWindow } from './timeline-window';
|
|
5
|
+
/**
|
|
6
|
+
* Timeline visibility as MapLibre feature state.
|
|
7
|
+
*
|
|
8
|
+
* A source's timeline-hidden features carry `{ timelineHidden: true }`, which
|
|
9
|
+
* the paint expressions read (`TIMELINE_HIDDEN` in selection-paint.ts). A
|
|
10
|
+
* tick sets or removes that one key on the features whose visibility flipped
|
|
11
|
+
* and on nothing else: no source payload changes, so no worker round, no
|
|
12
|
+
* re-index and no tile reload.
|
|
13
|
+
*
|
|
14
|
+
* Each painted source is recorded with the slices of the feature arrays it
|
|
15
|
+
* paints, the ids it holds hidden and the window those were computed for.
|
|
16
|
+
* `seedTimelineSource` runs after a source is (re)painted and diffs it from
|
|
17
|
+
* scratch, O(slice); `applyTimelineWindow` moves every recorded source to a
|
|
18
|
+
* new window through the arrays' interval indexes, O(log n + flipped).
|
|
19
|
+
*
|
|
20
|
+
* Feature state is per `(source, id)`, so the copies of an id one source
|
|
21
|
+
* paints share it: such an id is hidden only when every copy is, the rule the
|
|
22
|
+
* per-id visible set had before.
|
|
23
|
+
*/
|
|
24
|
+
export { TIMELINE_HIDDEN_KEY };
|
|
25
|
+
/** The run `[start, end)` of one feature array a source paints; a shard is a slice of its layer's array. */
|
|
26
|
+
export interface TimelineSlice {
|
|
27
|
+
readonly features: readonly GeoJSON.Feature[];
|
|
28
|
+
readonly start: number;
|
|
29
|
+
readonly end: number;
|
|
30
|
+
}
|
|
31
|
+
interface Copy {
|
|
32
|
+
readonly index: TimelineIndex;
|
|
33
|
+
readonly position: number;
|
|
34
|
+
}
|
|
35
|
+
interface SourceRecord {
|
|
36
|
+
readonly sourceId: string;
|
|
37
|
+
/** The source object the state went on; a recreated source starts with none. */
|
|
38
|
+
readonly handle: object;
|
|
39
|
+
readonly slices: readonly TimelineSlice[];
|
|
40
|
+
readonly hidden: Set<string>;
|
|
41
|
+
/** Ids the source paints more than once, with every copy; built on first need. */
|
|
42
|
+
copies: Map<string, Copy[]> | null;
|
|
43
|
+
/** The window `hidden` is current for. */
|
|
44
|
+
window: TimelineWindow | null;
|
|
45
|
+
}
|
|
46
|
+
/** Source id → what its timeline state was computed from. */
|
|
47
|
+
export type AppliedTimeline = Map<string, SourceRecord>;
|
|
48
|
+
/**
|
|
49
|
+
* After `sourceId` was (re)painted from `slices`: bring its state to `w`.
|
|
50
|
+
* Unchanged slices on the same source object cost nothing, since state
|
|
51
|
+
* persists across `setData`. Returns the number of host calls.
|
|
52
|
+
*/
|
|
53
|
+
export declare function seedTimelineSource(host: FeatureStateHost, applied: AppliedTimeline, sourceId: string, slices: readonly TimelineSlice[], w: TimelineWindow | null): number;
|
|
54
|
+
/** Whether `id` carries the timeline-hidden state on `sourceId`, as painted. */
|
|
55
|
+
export declare function isTimelineHiddenOn(applied: AppliedTimeline, sourceId: string, id: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Move every recorded source `isActive` accepts to `next`, and return the
|
|
58
|
+
* ids whose state changed. Sources that were torn down or recreated are
|
|
59
|
+
* forgotten; a recreated one is seeded when it paints. An inactive source (a
|
|
60
|
+
* hidden layer's shard) keeps its window and catches up on the first tick it
|
|
61
|
+
* is active again, from that window.
|
|
62
|
+
*/
|
|
63
|
+
export declare function applyTimelineWindow(host: FeatureStateHost, applied: AppliedTimeline, next: TimelineWindow | null, isActive?: (sourceId: string) => boolean): string[];
|
|
64
|
+
//# sourceMappingURL=timeline-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeline-state.d.ts","sourceRoot":"","sources":["../../../client/src/lib/timeline-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAmD,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OA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