@octostar/map-component 0.2.14 → 0.2.15
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 +844 -234
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +845 -235
- package/dist/index.mjs.map +1 -1
- package/dist/types/components/cluster-pie-chart.d.ts.map +1 -1
- package/dist/types/components/layers-panel.d.ts +30 -4
- 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/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/cluster-count.d.ts +43 -0
- package/dist/types/lib/cluster-count.d.ts.map +1 -0
- package/dist/types/lib/cluster-gradient.d.ts +37 -0
- package/dist/types/lib/cluster-gradient.d.ts.map +1 -0
- package/dist/types/lib/color-utils.d.ts +67 -0
- package/dist/types/lib/color-utils.d.ts.map +1 -1
- package/dist/types/lib/label-pinning.d.ts +31 -0
- package/dist/types/lib/label-pinning.d.ts.map +1 -0
- package/dist/types/lib/property-utils.d.ts +7 -0
- package/dist/types/lib/property-utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-pie-chart.d.ts","sourceRoot":"","sources":["../../../client/src/components/cluster-pie-chart.tsx"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"cluster-pie-chart.d.ts","sourceRoot":"","sources":["../../../client/src/components/cluster-pie-chart.tsx"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,aAAa,CAAC;AAcrC,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAK5C,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAM5C,UAAU,eAAe;IACvB,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;CAClB;AAkXD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,UAAU,CAAC,GAAG,EACnB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EAAE,EACxB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACvC;IAAE,MAAM,EAAE,MAAM,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAiC7C;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAwD9D"}
|
|
@@ -19,6 +19,16 @@ export interface ClusterConfig {
|
|
|
19
19
|
enabled: boolean;
|
|
20
20
|
groupByField: string | null;
|
|
21
21
|
showPointDots?: boolean;
|
|
22
|
+
/** When true and countByField is set, cluster badges show the sum of that
|
|
23
|
+
* field's values across the clustered points instead of the point count.
|
|
24
|
+
* A point whose value is not a number counts as 1, and a lone unclustered
|
|
25
|
+
* point whose value exceeds 1 renders as a value bubble of its own. */
|
|
26
|
+
countByFieldEnabled?: boolean;
|
|
27
|
+
countByField?: string | null;
|
|
28
|
+
/** Color cluster circles and single-point value bubbles on the red gradient,
|
|
29
|
+
* normalized to the values currently in view (simple-count mode only —
|
|
30
|
+
* pie markers keep their category colors). */
|
|
31
|
+
bubbleGradient?: boolean;
|
|
22
32
|
}
|
|
23
33
|
export type LabelMode = 'standard' | 'field' | 'fixed';
|
|
24
34
|
export type SizeMode = 'standard' | 'field' | 'override';
|
|
@@ -28,16 +38,21 @@ export interface LabelConfig {
|
|
|
28
38
|
fieldName?: string;
|
|
29
39
|
fixedText?: string;
|
|
30
40
|
hidden?: boolean;
|
|
41
|
+
/** Exempt this layer's labels from collision culling and the auto-label density cap. */
|
|
42
|
+
neverHide?: boolean;
|
|
31
43
|
}
|
|
32
44
|
export interface SizeConfig {
|
|
33
45
|
mode: SizeMode;
|
|
34
46
|
fieldName?: string;
|
|
35
47
|
overrideValue?: number;
|
|
36
48
|
}
|
|
49
|
+
export type ColorScale = 'categorical' | 'gradient';
|
|
37
50
|
export interface ColorConfig {
|
|
38
51
|
mode: ColorMode;
|
|
39
52
|
fieldName?: string;
|
|
40
53
|
fixedColor?: string;
|
|
54
|
+
/** Value→color mapping when mode==='field'. Absent = 'categorical' (pre-gradient saves render unchanged). */
|
|
55
|
+
scale?: ColorScale;
|
|
41
56
|
}
|
|
42
57
|
export interface IconConfig {
|
|
43
58
|
enabled: boolean;
|
|
@@ -72,6 +87,20 @@ export interface AutoLabelConfig {
|
|
|
72
87
|
enabled: boolean;
|
|
73
88
|
threshold: number;
|
|
74
89
|
}
|
|
90
|
+
export interface LayerFieldInfo {
|
|
91
|
+
name: string;
|
|
92
|
+
/** True if ANY sampled value is a number or numeric string (legacy sticky flag driving the numeric-only pickers). */
|
|
93
|
+
isNumeric: boolean;
|
|
94
|
+
/** Fraction of non-empty sampled values that are finite numbers (0-1). */
|
|
95
|
+
numericRatio?: number;
|
|
96
|
+
/** Fraction of sampled features carrying a non-empty value for this field (0-1). */
|
|
97
|
+
coverage?: number;
|
|
98
|
+
/** Range over finite sampled values; present when at least one exists. */
|
|
99
|
+
min?: number;
|
|
100
|
+
max?: number;
|
|
101
|
+
/** True when the stats come from a capped sample rather than the full layer. */
|
|
102
|
+
sampled?: boolean;
|
|
103
|
+
}
|
|
75
104
|
interface LayersPanelProps {
|
|
76
105
|
layers: Layer[];
|
|
77
106
|
onAddLayer: (name: string) => void;
|
|
@@ -100,10 +129,7 @@ interface LayersPanelProps {
|
|
|
100
129
|
onMapStyleChange: (style: MapStyle) => void;
|
|
101
130
|
onUpdateTraceConfig: (layerId: string, config: TraceConfig) => void;
|
|
102
131
|
getAvailableTraceFields: (layerId: string) => string[];
|
|
103
|
-
getLayerFields?: (layerId: string) =>
|
|
104
|
-
name: string;
|
|
105
|
-
isNumeric: boolean;
|
|
106
|
-
}[];
|
|
132
|
+
getLayerFields?: (layerId: string) => LayerFieldInfo[];
|
|
107
133
|
/**
|
|
108
134
|
* Returns a frequency-sorted list of distinct values found in `fieldName`
|
|
109
135
|
* across the features of `layerId`. Used to render the color-by-field legend.
|
|
@@ -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;
|
|
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,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;2EAGuE;IACvE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CA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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-editor-canvas.d.ts","sourceRoot":"","sources":["../../../client/src/components/map-editor-canvas.tsx"],"names":[],"mappings":"AA0FA,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":"AA0FA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,gDAAgD,CAAC;AAoQxD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmG5E,eAAO,MAAM,eAAe,4GA0lS1B,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { MapEditorCanvas } from './components/map-editor-canvas';
|
|
|
9
9
|
export type { MapEditorHandle, MapEditorConfig, MapEditorProps, ViewportInfo, SearchEngineParams, SearchEngineCallback, GeocoderResult, GeocoderProvider, EntityType, EntityCardProvider, TypePickerProvider, ContextMenuContext, ContextMenuItem, ContextMenuProvider, RasterBasemapDefinition, VectorBasemapDefinition, BasemapDefinition, BuiltInBasemapStyle, TooltipProvider, FeatureSaveProvider, FeatureSaveContext, FeatureSaveResult, FeatureRefreshProvider, OctostarMapState, OctostarMapLayerState, EnrichedGeoJSON, AdditionalSaveState, GeoJSONFileInterceptPayload, } from './lib/map-editor-api';
|
|
10
10
|
export type { IngestResult, IngestFeatureSummary } from './lib/ingest-pipeline';
|
|
11
11
|
export { LayersPanel, MAP_STYLES } from './components/layers-panel';
|
|
12
|
-
export type { Layer, BuiltInMapStyle, MapStyle, TraceConfig, HeatmapConfig, ClusterConfig, LabelMode, SizeMode, ColorMode, LabelConfig, SizeConfig, ColorConfig, IconConfig, VisualConfig, AltitudeDisplayMode, AutoLabelConfig, } from './components/layers-panel';
|
|
12
|
+
export type { Layer, BuiltInMapStyle, MapStyle, TraceConfig, HeatmapConfig, ClusterConfig, LabelMode, SizeMode, ColorMode, ColorScale, LabelConfig, SizeConfig, ColorConfig, IconConfig, VisualConfig, AltitudeDisplayMode, AutoLabelConfig, LayerFieldInfo, } from './components/layers-panel';
|
|
13
13
|
export { DrawingToolbar } from './components/drawing-toolbar';
|
|
14
14
|
export type { DrawingMode, MeasureMode, SelectionMode, } from './components/drawing-toolbar';
|
|
15
15
|
export { PropertiesPanel } from './components/properties-panel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../client/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,YAAY,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,sBAAsB,CAAC;AAI9B,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EACV,KAAK,EACL,eAAe,EACf,QAAQ,EACR,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources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,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACtF,YAAY,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAG5F,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG7E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAG9G,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACvG,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ExpressionSpecification } from 'maplibre-gl';
|
|
2
|
+
/**
|
|
3
|
+
* "Count by field" support for cluster badges: when a layer's clusterConfig has
|
|
4
|
+
* countByFieldEnabled and countByField set, cluster badges show the sum of that
|
|
5
|
+
* field's values across the clustered points instead of the raw point count.
|
|
6
|
+
* A point whose value is not a number counts as 1.
|
|
7
|
+
*/
|
|
8
|
+
/** Runtime-only property injected onto cluster-source point features when "Count by field" is on. */
|
|
9
|
+
export declare const CLUSTER_COUNT_VALUE_PROP = "__cluster_count_value";
|
|
10
|
+
/** Cluster aggregate property holding the sum of CLUSTER_COUNT_VALUE_PROP over the cluster. */
|
|
11
|
+
export declare const CLUSTER_SUM_PROP = "value_sum";
|
|
12
|
+
/**
|
|
13
|
+
* Runtime-only property carrying the member feature's id. Cluster sources are
|
|
14
|
+
* separate from `custom-features` and maplibre only preserves numeric feature
|
|
15
|
+
* ids, so the id travels as a property for a click on a value bubble to
|
|
16
|
+
* resolve back to the feature it represents.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CLUSTER_MEMBER_ID_PROP = "__cluster_fid";
|
|
19
|
+
/** Finite number → itself; parseable numeric string → its number; anything else → 1. */
|
|
20
|
+
export declare function clusterCountValue(raw: unknown): number;
|
|
21
|
+
/**
|
|
22
|
+
* Returns NEW feature objects with NEW properties objects — never mutates the
|
|
23
|
+
* input. readOnlyFeatures holds live references that buildEnrichedGeoJSON
|
|
24
|
+
* serializes into saved GeoJSON, so in-place injection would corrupt saves.
|
|
25
|
+
*/
|
|
26
|
+
export declare function injectClusterCountValues(features: GeoJSON.Feature[], fieldName: string): GeoJSON.Feature[];
|
|
27
|
+
/**
|
|
28
|
+
* 9 → "9", 9.55 → "9.6", 1500 → "1.5k", 2500000 → "2.5M".
|
|
29
|
+
* Branches on the signed value (not the magnitude) to stay in exact parity
|
|
30
|
+
* with the `step` expression from clusterSumBadgeTextField, so negative sums
|
|
31
|
+
* render unabbreviated.
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatClusterBadge(value: number): string;
|
|
34
|
+
/**
|
|
35
|
+
* MapLibre text-field expression producing the same strings as
|
|
36
|
+
* formatClusterBadge, over the given numeric property (the cluster's
|
|
37
|
+
* CLUSTER_SUM_PROP aggregate, or a single point's CLUSTER_COUNT_VALUE_PROP).
|
|
38
|
+
* Deliberately avoids 'number-format': its locale grouping would render
|
|
39
|
+
* "1,234.6" and diverge from the pie centre's JS text, while 'to-string' of a
|
|
40
|
+
* number never groups.
|
|
41
|
+
*/
|
|
42
|
+
export declare function clusterBadgeTextField(prop: string): ExpressionSpecification;
|
|
43
|
+
//# sourceMappingURL=cluster-count.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-count.d.ts","sourceRoot":"","sources":["../../../client/src/lib/cluster-count.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D;;;;;GAKG;AAEH,qGAAqG;AACrG,eAAO,MAAM,wBAAwB,0BAA0B,CAAC;AAEhE,+FAA+F;AAC/F,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,kBAAkB,CAAC;AAEtD,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAOtD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,EAC3B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,EAAE,CASnB;AAQD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CAU3E"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type maplibregl from 'maplibre-gl';
|
|
2
|
+
import type { ExpressionSpecification } from 'maplibre-gl';
|
|
3
|
+
import { type GradientRange } from './color-utils';
|
|
4
|
+
/**
|
|
5
|
+
* "Color bubbles by value": cluster circles and single-point value bubbles are
|
|
6
|
+
* recolored on the red gradient, normalized to the values CURRENTLY in view —
|
|
7
|
+
* the domain is recomputed from rendered source features on move/data events,
|
|
8
|
+
* so colors deliberately re-normalize while zooming (the biggest bubble on
|
|
9
|
+
* screen is always the darkest). Simple-count mode only; pie markers keep
|
|
10
|
+
* their category colors.
|
|
11
|
+
*/
|
|
12
|
+
/** Min/max over the finite entries of `values`; null when none. */
|
|
13
|
+
export declare function computeBubbleDomain(values: readonly number[]): GradientRange | null;
|
|
14
|
+
/**
|
|
15
|
+
* circle-color for a bubble layer: linear interpolation of `prop` over the
|
|
16
|
+
* gradient ramp between min and max. A degenerate domain returns the static
|
|
17
|
+
* mid-ramp color (interpolate stops must be strictly ascending).
|
|
18
|
+
*/
|
|
19
|
+
export declare function bubbleGradientColorExpression(prop: string, min: number, max: number): ExpressionSpecification | string;
|
|
20
|
+
interface ClusterGradientOptions {
|
|
21
|
+
clustersLayerId: string;
|
|
22
|
+
/** Aggregate property carrying the cluster value; null = plain point_count. */
|
|
23
|
+
valueProp: string | null;
|
|
24
|
+
/** The single-point value-bubble layer, present when count-by-field is on. */
|
|
25
|
+
singleLayerId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Watches the cluster source and keeps the bubble layers' circle-color
|
|
29
|
+
* interpolated over the values currently in view. Same listener/RAF-coalescing
|
|
30
|
+
* shape as createClusterPieManager; querySourceFeatures only scans rendered
|
|
31
|
+
* tiles, so the per-event cost is bounded by what is on screen.
|
|
32
|
+
*/
|
|
33
|
+
export declare function createClusterGradientManager(map: maplibregl.Map, sourceId: string, options: ClusterGradientOptions): {
|
|
34
|
+
destroy: () => void;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=cluster-gradient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-gradient.d.ts","sourceRoot":"","sources":["../../../client/src/lib/cluster-gradient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAGjF;;;;;;;GAOG;AAEH,mEAAmE;AACnE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,aAAa,GAAG,IAAI,CASnF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,GACV,uBAAuB,GAAG,MAAM,CAQlC;AAED,UAAU,sBAAsB;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,+EAA+E;IAC/E,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,UAAU,CAAC,GAAG,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,sBAAsB,GAC9B;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAoFzB"}
|
|
@@ -34,4 +34,71 @@ export declare function categoricalKey(raw: unknown): string | null;
|
|
|
34
34
|
* the layers panel match the rendered feature colors on the map.
|
|
35
35
|
*/
|
|
36
36
|
export declare function hashStringToColor(str: string): string;
|
|
37
|
+
/**
|
|
38
|
+
* Sequential ramp for gradient color-by-field (ColorBrewer "Reds", 5 equally
|
|
39
|
+
* spaced stops, low → high = pale → dark red). Single-hue so magnitude reads
|
|
40
|
+
* as intensity, and the red hue path never crosses the reserved cyan
|
|
41
|
+
* selection band above.
|
|
42
|
+
*/
|
|
43
|
+
export declare const GRADIENT_RAMP: readonly string[];
|
|
44
|
+
/**
|
|
45
|
+
* Neutral for values that cannot be placed on the ramp (null/empty/non-numeric/
|
|
46
|
+
* non-finite): under a gradient a feature's own arbitrary color would read as a
|
|
47
|
+
* magnitude. Deliberately equals OTHER_BUCKET_COLOR in cluster-pie-chart.tsx.
|
|
48
|
+
*/
|
|
49
|
+
export declare const GRADIENT_FALLBACK_COLOR = "#9ca3af";
|
|
50
|
+
/** Fraction of non-empty sampled values that must be finite numbers for a field to default to the gradient scale. */
|
|
51
|
+
export declare const NUMERIC_FIELD_RATIO_THRESHOLD = 0.8;
|
|
52
|
+
/**
|
|
53
|
+
* Fraction of sampled features that must carry a non-empty value for the field
|
|
54
|
+
* to default to gradient — a field present on 50 of 10k features must not turn
|
|
55
|
+
* the other 9,950 neutral gray by default.
|
|
56
|
+
*/
|
|
57
|
+
export declare const NUMERIC_FIELD_COVERAGE_FLOOR = 0.3;
|
|
58
|
+
export interface GradientRange {
|
|
59
|
+
min: number;
|
|
60
|
+
max: number;
|
|
61
|
+
}
|
|
62
|
+
/** Number, or numeric string (trimmed non-empty), coerced to a finite number; null otherwise. */
|
|
63
|
+
export declare function coerceFiniteNumber(raw: unknown): number | null;
|
|
64
|
+
/**
|
|
65
|
+
* t in [0,1] (clamped; non-finite → mid-ramp) → #rrggbb via piecewise-linear
|
|
66
|
+
* sRGB lerp over `ramp`. Lerping between close stops of an already
|
|
67
|
+
* perceptually-even ramp cannot stray far from the stop colors, so no
|
|
68
|
+
* color-space math is needed.
|
|
69
|
+
*/
|
|
70
|
+
export declare function gradientColor(t: number, ramp?: readonly string[]): string;
|
|
71
|
+
/**
|
|
72
|
+
* Scale a freshly picked color-by field defaults to. Decided once at pick time
|
|
73
|
+
* and stored in ColorConfig — never inferred at render time, so data drifting
|
|
74
|
+
* later cannot silently flip a user's scale.
|
|
75
|
+
*/
|
|
76
|
+
export declare function defaultColorScaleForField(field: {
|
|
77
|
+
numericRatio?: number;
|
|
78
|
+
coverage?: number;
|
|
79
|
+
} | undefined): 'categorical' | 'gradient';
|
|
80
|
+
/** Min/max of `fieldName` over `featureIds` (same coercion as the size-by-field range pass). Null when no finite value exists. */
|
|
81
|
+
export declare function computeNumericRange(featureIds: readonly string[], getProperties: (id: string) => Record<string, unknown> | null | undefined, fieldName: string): GradientRange | null;
|
|
82
|
+
interface ColorConfigLike {
|
|
83
|
+
mode: 'standard' | 'field' | 'fixed';
|
|
84
|
+
fieldName?: string;
|
|
85
|
+
fixedColor?: string;
|
|
86
|
+
scale?: 'categorical' | 'gradient';
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Single source of truth for per-feature color resolution — called from BOTH
|
|
90
|
+
* syncFeaturesToCustomLayers and selectedFeatureColors so the map, the timebar
|
|
91
|
+
* dots and the properties-panel header dot can never desync.
|
|
92
|
+
*
|
|
93
|
+
* `scale` absent or 'categorical' is bit-identical to the pre-gradient
|
|
94
|
+
* behavior, so persisted maps saved before the field existed render unchanged.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveFeatureColor(colorConfig: ColorConfigLike | undefined, properties: Record<string, unknown> | null | undefined, fallback: string, gradientRange?: GradientRange | null): string;
|
|
97
|
+
/**
|
|
98
|
+
* Compact legend label. Sub-1 magnitudes use significant digits so ranges like
|
|
99
|
+
* 0.0004–0.008 don't both collapse to "0"; large magnitudes use compact
|
|
100
|
+
* notation ("12K", "1.2M").
|
|
101
|
+
*/
|
|
102
|
+
export declare function formatGradientStop(value: number): string;
|
|
103
|
+
export {};
|
|
37
104
|
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../client/src/lib/color-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI1D;AA8BD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBrD"}
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../../client/src/lib/color-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI1D;AA8BD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiBrD;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAE1C,CAAC;A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QAAQ,EAAE,MAAM,EAChB,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,GACnC,MAAM,CAkBR;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { FilterSpecification, SymbolLayerSpecification } from 'maplibre-gl';
|
|
2
|
+
/**
|
|
3
|
+
* Per-layer "never hide labels": text-allow-overlap / text-ignore-placement are
|
|
4
|
+
* data-constant in MapLibre (cannot vary per feature), so opting a layer out of
|
|
5
|
+
* collision culling requires a second symbol layer. The two layers split the
|
|
6
|
+
* shared `custom-features` source via complementary filters on this property.
|
|
7
|
+
*/
|
|
8
|
+
/** Feature property written by syncFeaturesToCustomLayers; 1 = label exempt from collision and density culling. */
|
|
9
|
+
export declare const LABEL_NEVER_HIDE_PROP = "_labelNeverHide";
|
|
10
|
+
/** Features rendered by the pinned label layer (collision off). */
|
|
11
|
+
export declare const PINNED_LABEL_FILTER: FilterSpecification;
|
|
12
|
+
/**
|
|
13
|
+
* Complement: features rendered by the normal collision-culled label layer.
|
|
14
|
+
* ['!='] evaluates true when the property is absent, so features that predate
|
|
15
|
+
* the flag keep rendering in the normal layer.
|
|
16
|
+
*/
|
|
17
|
+
export declare const UNPINNED_LABEL_FILTER: FilterSpecification;
|
|
18
|
+
/** hidden wins over neverHide: a layer with Labels toggled off pins nothing. */
|
|
19
|
+
export declare function computeLabelNeverHide(label: {
|
|
20
|
+
neverHide?: boolean;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
} | undefined): 0 | 1;
|
|
23
|
+
/**
|
|
24
|
+
* Layout shared by `custom-labels` and its pinned twin. Kept in one builder so
|
|
25
|
+
* the two layers cannot drift; each call site adds only its deltas (visibility,
|
|
26
|
+
* collision properties, symbol-sort-key).
|
|
27
|
+
*/
|
|
28
|
+
export declare function buildCustomLabelLayout(): NonNullable<SymbolLayerSpecification['layout']>;
|
|
29
|
+
/** Paint shared by `custom-labels` and its pinned twin. */
|
|
30
|
+
export declare function buildCustomLabelPaint(): NonNullable<SymbolLayerSpecification['paint']>;
|
|
31
|
+
//# sourceMappingURL=label-pinning.d.ts.map
|
|
@@ -0,0 +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,CAoCxF;AAED,2DAA2D;AAC3D,wBAAgB,qBAAqB,IAAI,WAAW,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAgBtF"}
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
* Consumers building custom tooltips should filter these out.
|
|
4
4
|
*/
|
|
5
5
|
export declare const INTERNAL_PROPERTY_KEYS: Set<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Purely presentational keys — never meaningful to style BY, so the layer
|
|
8
|
+
* panel's field pickers exclude them. Narrow subset of INTERNAL_PROPERTY_KEYS:
|
|
9
|
+
* semantic keys (kind, entityType, label) stay available because users
|
|
10
|
+
* legitimately color or label by them.
|
|
11
|
+
*/
|
|
12
|
+
export declare const STYLING_PROPERTY_KEYS: readonly ["stroke", "stroke-width", "stroke-opacity", "fill", "fill-opacity", "pointRadius", "pointIcon", "pointIconSize", "icon", "iconSize", "circleCenter", "circleRadius", "fontSize", "fontColor", "fontWeight", "arrowSize"];
|
|
6
13
|
/**
|
|
7
14
|
* Property key prefixes injected by the map component at runtime.
|
|
8
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-utils.d.ts","sourceRoot":"","sources":["../../../client/src/lib/property-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"property-utils.d.ts","sourceRoot":"","sources":["../../../client/src/lib/property-utils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,sBAAsB,aAuBjC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,oOAiBxB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAOtC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAGvD"}
|