@classic-homes/maps-core 0.2.7 → 0.2.9
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/{chunk-2NISJ7WE.js → chunk-6WMCIBJJ.js} +41 -194
- package/dist/chunk-EXGGK4H7.js +2822 -0
- package/dist/chunk-ZGUACUEF.js +156 -0
- package/dist/{data-DDS6ok7I.d.cts → data-k7o-Rne0.d.cts} +6 -2
- package/dist/{data-DDS6ok7I.d.ts → data-k7o-Rne0.d.ts} +6 -2
- package/dist/generator-CGfqiHvG.d.cts +139 -0
- package/dist/generator-CGfqiHvG.d.ts +139 -0
- package/dist/index.cjs +190 -7
- package/dist/index.d.cts +8 -1235
- package/dist/index.d.ts +8 -1235
- package/dist/index.js +6 -2613
- package/dist/marker-BjzgxVwm.d.ts +1490 -0
- package/dist/marker-zuhH2WoS.d.cts +1490 -0
- package/dist/{spatial-VV-zd88V.d.ts → spatial-Bo8nM3fC.d.ts} +2 -2
- package/dist/{spatial-J48Btm8f.d.cts → spatial-CU60awl8.d.cts} +2 -2
- package/dist/theme/index.d.cts +16 -141
- package/dist/theme/index.d.ts +16 -141
- package/dist/theme/index.js +2 -1
- package/dist/types/index.d.cts +93 -6
- package/dist/types/index.d.ts +93 -6
- package/dist/utils/index.cjs +3078 -0
- package/dist/utils/index.d.cts +50 -0
- package/dist/utils/index.d.ts +50 -0
- package/dist/utils/index.js +2 -0
- package/dist/workers/index.d.cts +2 -2
- package/dist/workers/index.d.ts +2 -2
- package/dist/workers/spatial.worker.js +9 -5
- package/package.json +9 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GeoJSONFeatureCollection, a as GeoJSONFeature, B as BoundsArray, M as MapBounds } from './data-
|
|
1
|
+
import { G as GeoJSONFeatureCollection, a as GeoJSONFeature, B as BoundsArray, M as MapBounds } from './data-k7o-Rne0.js';
|
|
2
2
|
import RBush from 'rbush';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -432,4 +432,4 @@ declare function createRTreeViewportManager(index: RTreeIndex, options?: Viewpor
|
|
|
432
432
|
}) | null;
|
|
433
433
|
};
|
|
434
434
|
|
|
435
|
-
export { type BuildSpatialIndexOptions as B, type IdleViewportManagerOptions as I, type PanVelocity as P, type
|
|
435
|
+
export { type BuildSpatialIndexOptions as B, type IdleViewportManagerOptions as I, type PanVelocity as P, type QuerySpatialIndexOptions as Q, type RTreeItem as R, type SpatialIndex as S, type ViewportManagedDataOptions as V, queryByBoundsWithStats as a, buildSpatialIndex as b, createViewportQuery as c, createViewportManager as d, buildRTreeIndex as e, queryRTreeByBounds as f, queryRTreeByBoundsWithStats as g, createRTreeViewportManager as h, createPredictiveViewportManager as i, createIdleViewportManager as j, type QueryStats as k, type ViewportManagedResult as l, type RTreeIndex as m, type BuildRTreeIndexOptions as n, type RTreeQueryStats as o, type PredictiveViewportResult as p, queryByBounds as q, type IdleViewportResult as r };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GeoJSONFeatureCollection, a as GeoJSONFeature, B as BoundsArray, M as MapBounds } from './data-
|
|
1
|
+
import { G as GeoJSONFeatureCollection, a as GeoJSONFeature, B as BoundsArray, M as MapBounds } from './data-k7o-Rne0.cjs';
|
|
2
2
|
import RBush from 'rbush';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -432,4 +432,4 @@ declare function createRTreeViewportManager(index: RTreeIndex, options?: Viewpor
|
|
|
432
432
|
}) | null;
|
|
433
433
|
};
|
|
434
434
|
|
|
435
|
-
export { type BuildSpatialIndexOptions as B, type IdleViewportManagerOptions as I, type PanVelocity as P, type
|
|
435
|
+
export { type BuildSpatialIndexOptions as B, type IdleViewportManagerOptions as I, type PanVelocity as P, type QuerySpatialIndexOptions as Q, type RTreeItem as R, type SpatialIndex as S, type ViewportManagedDataOptions as V, queryByBoundsWithStats as a, buildSpatialIndex as b, createViewportQuery as c, createViewportManager as d, buildRTreeIndex as e, queryRTreeByBounds as f, queryRTreeByBoundsWithStats as g, createRTreeViewportManager as h, createPredictiveViewportManager as i, createIdleViewportManager as j, type QueryStats as k, type ViewportManagedResult as l, type RTreeIndex as m, type BuildRTreeIndexOptions as n, type RTreeQueryStats as o, type PredictiveViewportResult as p, queryByBounds as q, type IdleViewportResult as r };
|
package/dist/theme/index.d.cts
CHANGED
|
@@ -1,140 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Generates MapLibre-compatible themes from Classic Theme design tokens
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Theme identifiers
|
|
8
|
-
*/
|
|
9
|
-
declare const THEME_LIGHT = "classic-light";
|
|
10
|
-
declare const THEME_DARK = "classic-dark";
|
|
11
|
-
/**
|
|
12
|
-
* Map theme colors configuration
|
|
13
|
-
*/
|
|
14
|
-
interface MapThemeColors {
|
|
15
|
-
/** Background color for the map */
|
|
16
|
-
background: string;
|
|
17
|
-
/** Water bodies (lakes, rivers, ocean) */
|
|
18
|
-
water: string;
|
|
19
|
-
/** Land/terrain base color */
|
|
20
|
-
land: string;
|
|
21
|
-
/** Park/green areas */
|
|
22
|
-
park: string;
|
|
23
|
-
/** Building fill color */
|
|
24
|
-
building: string;
|
|
25
|
-
/** Building outline color */
|
|
26
|
-
buildingOutline: string;
|
|
27
|
-
/** Road primary color */
|
|
28
|
-
roadPrimary: string;
|
|
29
|
-
/** Road secondary color */
|
|
30
|
-
roadSecondary: string;
|
|
31
|
-
/** Road outline/casing color */
|
|
32
|
-
roadCasing: string;
|
|
33
|
-
/** Rail/transit lines */
|
|
34
|
-
rail: string;
|
|
35
|
-
/** Boundary lines */
|
|
36
|
-
boundary: string;
|
|
37
|
-
/** Administrative boundary */
|
|
38
|
-
adminBoundary: string;
|
|
39
|
-
/** Land use residential */
|
|
40
|
-
residential: string;
|
|
41
|
-
/** Land use commercial */
|
|
42
|
-
commercial: string;
|
|
43
|
-
/** Land use industrial */
|
|
44
|
-
industrial: string;
|
|
45
|
-
/** Highlight/selection color */
|
|
46
|
-
highlight: string;
|
|
47
|
-
/** Secondary highlight color */
|
|
48
|
-
highlightSecondary: string;
|
|
49
|
-
/** Selection/active color */
|
|
50
|
-
selection: string;
|
|
51
|
-
/** Text primary color */
|
|
52
|
-
textPrimary: string;
|
|
53
|
-
/** Text secondary color */
|
|
54
|
-
textSecondary: string;
|
|
55
|
-
/** Text halo color */
|
|
56
|
-
textHalo: string;
|
|
57
|
-
/** Point of interest color */
|
|
58
|
-
poi: string;
|
|
59
|
-
/** Label background */
|
|
60
|
-
labelBackground: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Map chart/data visualization colors
|
|
64
|
-
*/
|
|
65
|
-
interface MapDataColors {
|
|
66
|
-
/** Color sequence for data visualization (5 colors) */
|
|
67
|
-
sequence: string[];
|
|
68
|
-
/** Positive/success color */
|
|
69
|
-
positive: string;
|
|
70
|
-
/** Negative/error color */
|
|
71
|
-
negative: string;
|
|
72
|
-
/** Neutral color */
|
|
73
|
-
neutral: string;
|
|
74
|
-
/** Heatmap color ramp (low to high) */
|
|
75
|
-
heatmapRamp: string[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Complete map theme configuration
|
|
79
|
-
*/
|
|
80
|
-
interface MapTheme {
|
|
81
|
-
/** Theme identifier */
|
|
82
|
-
name: string;
|
|
83
|
-
/** Base map colors */
|
|
84
|
-
colors: MapThemeColors;
|
|
85
|
-
/** Data visualization colors */
|
|
86
|
-
dataColors: MapDataColors;
|
|
87
|
-
/** Typography settings */
|
|
88
|
-
typography: {
|
|
89
|
-
fontFamily: string;
|
|
90
|
-
fontFamilySerif: string;
|
|
91
|
-
fontFamilyMono: string;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Generate light theme colors from design tokens
|
|
96
|
-
*/
|
|
97
|
-
declare function generateLightColors(): MapThemeColors;
|
|
98
|
-
/**
|
|
99
|
-
* Generate dark theme colors from design tokens
|
|
100
|
-
*/
|
|
101
|
-
declare function generateDarkColors(): MapThemeColors;
|
|
102
|
-
/**
|
|
103
|
-
* Generate data visualization colors for light theme
|
|
104
|
-
*/
|
|
105
|
-
declare function generateLightDataColors(): MapDataColors;
|
|
106
|
-
/**
|
|
107
|
-
* Generate data visualization colors for dark theme
|
|
108
|
-
*/
|
|
109
|
-
declare function generateDarkDataColors(): MapDataColors;
|
|
110
|
-
/**
|
|
111
|
-
* Get typography settings from design tokens
|
|
112
|
-
*/
|
|
113
|
-
declare function getTypography(): {
|
|
114
|
-
fontFamily: string;
|
|
115
|
-
fontFamilySerif: string;
|
|
116
|
-
fontFamilyMono: string;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Generate complete light theme
|
|
120
|
-
*/
|
|
121
|
-
declare function generateLightTheme(): MapTheme;
|
|
122
|
-
/**
|
|
123
|
-
* Generate complete dark theme
|
|
124
|
-
*/
|
|
125
|
-
declare function generateDarkTheme(): MapTheme;
|
|
126
|
-
/**
|
|
127
|
-
* Pre-generated light theme
|
|
128
|
-
*/
|
|
129
|
-
declare const lightTheme: MapTheme;
|
|
130
|
-
/**
|
|
131
|
-
* Pre-generated dark theme
|
|
132
|
-
*/
|
|
133
|
-
declare const darkTheme: MapTheme;
|
|
134
|
-
/**
|
|
135
|
-
* Get theme by name
|
|
136
|
-
*/
|
|
137
|
-
declare function getTheme(name: 'light' | 'dark' | typeof THEME_LIGHT | typeof THEME_DARK): MapTheme;
|
|
1
|
+
import { M as MapTheme, T as THEME_LIGHT, a as THEME_DARK } from '../generator-CGfqiHvG.cjs';
|
|
2
|
+
export { m as MapDataColors, k as MapThemeColors, j as darkTheme, d as generateDarkColors, f as generateDarkDataColors, b as generateDarkTheme, c as generateLightColors, e as generateLightDataColors, g as generateLightTheme, i as getTheme, h as getTypography, l as lightTheme } from '../generator-CGfqiHvG.cjs';
|
|
138
3
|
|
|
139
4
|
/**
|
|
140
5
|
* Map style generator
|
|
@@ -144,15 +9,25 @@ declare function getTheme(name: 'light' | 'dark' | typeof THEME_LIGHT | typeof T
|
|
|
144
9
|
*/
|
|
145
10
|
|
|
146
11
|
/**
|
|
147
|
-
* MapLibre style specification
|
|
12
|
+
* MapLibre style specification for theme generation
|
|
13
|
+
*
|
|
14
|
+
* This is a focused subset of the full MapStyleSpec used when
|
|
15
|
+
* generating theme-based styles internally.
|
|
148
16
|
*/
|
|
149
17
|
interface MapStyleSpec {
|
|
18
|
+
/** Style spec version - must be 8 */
|
|
150
19
|
version: 8;
|
|
20
|
+
/** Human-readable name for the style */
|
|
151
21
|
name: string;
|
|
152
|
-
sources
|
|
153
|
-
|
|
22
|
+
/** Map sources keyed by source ID */
|
|
23
|
+
sources: Record<string, Record<string, unknown>>;
|
|
24
|
+
/** Ordered array of layers */
|
|
25
|
+
layers: Array<Record<string, unknown>>;
|
|
26
|
+
/** URL template for glyph PBFs */
|
|
154
27
|
glyphs?: string;
|
|
28
|
+
/** URL to sprite image and JSON */
|
|
155
29
|
sprite?: string;
|
|
30
|
+
/** Arbitrary metadata */
|
|
156
31
|
metadata?: Record<string, unknown>;
|
|
157
32
|
}
|
|
158
33
|
/**
|
|
@@ -185,4 +60,4 @@ declare const darkBasicStyle: MapStyleSpec;
|
|
|
185
60
|
*/
|
|
186
61
|
declare function getBasicStyle(themeName: 'light' | 'dark' | typeof THEME_LIGHT | typeof THEME_DARK): MapStyleSpec;
|
|
187
62
|
|
|
188
|
-
export { type
|
|
63
|
+
export { type MapStyleSpec, MapTheme, THEME_DARK, THEME_LIGHT, darkBasicStyle, generateBasicStyle, generateVectorStyle, getBasicStyle, lightBasicStyle };
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,140 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Generates MapLibre-compatible themes from Classic Theme design tokens
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Theme identifiers
|
|
8
|
-
*/
|
|
9
|
-
declare const THEME_LIGHT = "classic-light";
|
|
10
|
-
declare const THEME_DARK = "classic-dark";
|
|
11
|
-
/**
|
|
12
|
-
* Map theme colors configuration
|
|
13
|
-
*/
|
|
14
|
-
interface MapThemeColors {
|
|
15
|
-
/** Background color for the map */
|
|
16
|
-
background: string;
|
|
17
|
-
/** Water bodies (lakes, rivers, ocean) */
|
|
18
|
-
water: string;
|
|
19
|
-
/** Land/terrain base color */
|
|
20
|
-
land: string;
|
|
21
|
-
/** Park/green areas */
|
|
22
|
-
park: string;
|
|
23
|
-
/** Building fill color */
|
|
24
|
-
building: string;
|
|
25
|
-
/** Building outline color */
|
|
26
|
-
buildingOutline: string;
|
|
27
|
-
/** Road primary color */
|
|
28
|
-
roadPrimary: string;
|
|
29
|
-
/** Road secondary color */
|
|
30
|
-
roadSecondary: string;
|
|
31
|
-
/** Road outline/casing color */
|
|
32
|
-
roadCasing: string;
|
|
33
|
-
/** Rail/transit lines */
|
|
34
|
-
rail: string;
|
|
35
|
-
/** Boundary lines */
|
|
36
|
-
boundary: string;
|
|
37
|
-
/** Administrative boundary */
|
|
38
|
-
adminBoundary: string;
|
|
39
|
-
/** Land use residential */
|
|
40
|
-
residential: string;
|
|
41
|
-
/** Land use commercial */
|
|
42
|
-
commercial: string;
|
|
43
|
-
/** Land use industrial */
|
|
44
|
-
industrial: string;
|
|
45
|
-
/** Highlight/selection color */
|
|
46
|
-
highlight: string;
|
|
47
|
-
/** Secondary highlight color */
|
|
48
|
-
highlightSecondary: string;
|
|
49
|
-
/** Selection/active color */
|
|
50
|
-
selection: string;
|
|
51
|
-
/** Text primary color */
|
|
52
|
-
textPrimary: string;
|
|
53
|
-
/** Text secondary color */
|
|
54
|
-
textSecondary: string;
|
|
55
|
-
/** Text halo color */
|
|
56
|
-
textHalo: string;
|
|
57
|
-
/** Point of interest color */
|
|
58
|
-
poi: string;
|
|
59
|
-
/** Label background */
|
|
60
|
-
labelBackground: string;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Map chart/data visualization colors
|
|
64
|
-
*/
|
|
65
|
-
interface MapDataColors {
|
|
66
|
-
/** Color sequence for data visualization (5 colors) */
|
|
67
|
-
sequence: string[];
|
|
68
|
-
/** Positive/success color */
|
|
69
|
-
positive: string;
|
|
70
|
-
/** Negative/error color */
|
|
71
|
-
negative: string;
|
|
72
|
-
/** Neutral color */
|
|
73
|
-
neutral: string;
|
|
74
|
-
/** Heatmap color ramp (low to high) */
|
|
75
|
-
heatmapRamp: string[];
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Complete map theme configuration
|
|
79
|
-
*/
|
|
80
|
-
interface MapTheme {
|
|
81
|
-
/** Theme identifier */
|
|
82
|
-
name: string;
|
|
83
|
-
/** Base map colors */
|
|
84
|
-
colors: MapThemeColors;
|
|
85
|
-
/** Data visualization colors */
|
|
86
|
-
dataColors: MapDataColors;
|
|
87
|
-
/** Typography settings */
|
|
88
|
-
typography: {
|
|
89
|
-
fontFamily: string;
|
|
90
|
-
fontFamilySerif: string;
|
|
91
|
-
fontFamilyMono: string;
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Generate light theme colors from design tokens
|
|
96
|
-
*/
|
|
97
|
-
declare function generateLightColors(): MapThemeColors;
|
|
98
|
-
/**
|
|
99
|
-
* Generate dark theme colors from design tokens
|
|
100
|
-
*/
|
|
101
|
-
declare function generateDarkColors(): MapThemeColors;
|
|
102
|
-
/**
|
|
103
|
-
* Generate data visualization colors for light theme
|
|
104
|
-
*/
|
|
105
|
-
declare function generateLightDataColors(): MapDataColors;
|
|
106
|
-
/**
|
|
107
|
-
* Generate data visualization colors for dark theme
|
|
108
|
-
*/
|
|
109
|
-
declare function generateDarkDataColors(): MapDataColors;
|
|
110
|
-
/**
|
|
111
|
-
* Get typography settings from design tokens
|
|
112
|
-
*/
|
|
113
|
-
declare function getTypography(): {
|
|
114
|
-
fontFamily: string;
|
|
115
|
-
fontFamilySerif: string;
|
|
116
|
-
fontFamilyMono: string;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Generate complete light theme
|
|
120
|
-
*/
|
|
121
|
-
declare function generateLightTheme(): MapTheme;
|
|
122
|
-
/**
|
|
123
|
-
* Generate complete dark theme
|
|
124
|
-
*/
|
|
125
|
-
declare function generateDarkTheme(): MapTheme;
|
|
126
|
-
/**
|
|
127
|
-
* Pre-generated light theme
|
|
128
|
-
*/
|
|
129
|
-
declare const lightTheme: MapTheme;
|
|
130
|
-
/**
|
|
131
|
-
* Pre-generated dark theme
|
|
132
|
-
*/
|
|
133
|
-
declare const darkTheme: MapTheme;
|
|
134
|
-
/**
|
|
135
|
-
* Get theme by name
|
|
136
|
-
*/
|
|
137
|
-
declare function getTheme(name: 'light' | 'dark' | typeof THEME_LIGHT | typeof THEME_DARK): MapTheme;
|
|
1
|
+
import { M as MapTheme, T as THEME_LIGHT, a as THEME_DARK } from '../generator-CGfqiHvG.js';
|
|
2
|
+
export { m as MapDataColors, k as MapThemeColors, j as darkTheme, d as generateDarkColors, f as generateDarkDataColors, b as generateDarkTheme, c as generateLightColors, e as generateLightDataColors, g as generateLightTheme, i as getTheme, h as getTypography, l as lightTheme } from '../generator-CGfqiHvG.js';
|
|
138
3
|
|
|
139
4
|
/**
|
|
140
5
|
* Map style generator
|
|
@@ -144,15 +9,25 @@ declare function getTheme(name: 'light' | 'dark' | typeof THEME_LIGHT | typeof T
|
|
|
144
9
|
*/
|
|
145
10
|
|
|
146
11
|
/**
|
|
147
|
-
* MapLibre style specification
|
|
12
|
+
* MapLibre style specification for theme generation
|
|
13
|
+
*
|
|
14
|
+
* This is a focused subset of the full MapStyleSpec used when
|
|
15
|
+
* generating theme-based styles internally.
|
|
148
16
|
*/
|
|
149
17
|
interface MapStyleSpec {
|
|
18
|
+
/** Style spec version - must be 8 */
|
|
150
19
|
version: 8;
|
|
20
|
+
/** Human-readable name for the style */
|
|
151
21
|
name: string;
|
|
152
|
-
sources
|
|
153
|
-
|
|
22
|
+
/** Map sources keyed by source ID */
|
|
23
|
+
sources: Record<string, Record<string, unknown>>;
|
|
24
|
+
/** Ordered array of layers */
|
|
25
|
+
layers: Array<Record<string, unknown>>;
|
|
26
|
+
/** URL template for glyph PBFs */
|
|
154
27
|
glyphs?: string;
|
|
28
|
+
/** URL to sprite image and JSON */
|
|
155
29
|
sprite?: string;
|
|
30
|
+
/** Arbitrary metadata */
|
|
156
31
|
metadata?: Record<string, unknown>;
|
|
157
32
|
}
|
|
158
33
|
/**
|
|
@@ -185,4 +60,4 @@ declare const darkBasicStyle: MapStyleSpec;
|
|
|
185
60
|
*/
|
|
186
61
|
declare function getBasicStyle(themeName: 'light' | 'dark' | typeof THEME_LIGHT | typeof THEME_DARK): MapStyleSpec;
|
|
187
62
|
|
|
188
|
-
export { type
|
|
63
|
+
export { type MapStyleSpec, MapTheme, THEME_DARK, THEME_LIGHT, darkBasicStyle, generateBasicStyle, generateVectorStyle, getBasicStyle, lightBasicStyle };
|
package/dist/theme/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { darkBasicStyle, generateBasicStyle, generateVectorStyle, getBasicStyle, lightBasicStyle } from '../chunk-6WMCIBJJ.js';
|
|
2
|
+
export { THEME_DARK, THEME_LIGHT, darkTheme, generateDarkColors, generateDarkDataColors, generateDarkTheme, generateLightColors, generateLightDataColors, generateLightTheme, getTheme, getTypography, lightTheme } from '../chunk-ZGUACUEF.js';
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LngLat, a as GeoJSONFeature, M as MapBounds, B as BoundsArray, k as MapSourceData, G as GeoJSONFeatureCollection, C as ClusterConfig } from '../data-
|
|
2
|
-
export { E as ExtrusionData,
|
|
1
|
+
import { L as LngLat, a as GeoJSONFeature, M as MapBounds, B as BoundsArray, k as MapSourceData, G as GeoJSONFeatureCollection, C as ClusterConfig } from '../data-k7o-Rne0.cjs';
|
|
2
|
+
export { E as ExtrusionData, c as GeoJSONGeometry, l as GeoJSONGeometryCollection, f as GeoJSONLineString, g as GeoJSONMultiLineString, e as GeoJSONMultiPoint, i as GeoJSONMultiPolygon, d as GeoJSONPoint, h as GeoJSONPolygon, H as HeatmapPoint, b as MapViewport, j as MarkerData } from '../data-k7o-Rne0.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Map event types
|
|
@@ -184,15 +184,97 @@ interface BaseMapProps {
|
|
|
184
184
|
/** Custom CSS class */
|
|
185
185
|
class?: string;
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* MapLibre source specification types
|
|
189
|
+
*/
|
|
190
|
+
type MapSourceSpec = {
|
|
191
|
+
type: 'vector';
|
|
192
|
+
url?: string;
|
|
193
|
+
tiles?: string[];
|
|
194
|
+
attribution?: string;
|
|
195
|
+
minzoom?: number;
|
|
196
|
+
maxzoom?: number;
|
|
197
|
+
} | {
|
|
198
|
+
type: 'raster';
|
|
199
|
+
url?: string;
|
|
200
|
+
tiles?: string[];
|
|
201
|
+
tileSize?: number;
|
|
202
|
+
attribution?: string;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'raster-dem';
|
|
205
|
+
url?: string;
|
|
206
|
+
tiles?: string[];
|
|
207
|
+
tileSize?: number;
|
|
208
|
+
encoding?: 'terrarium' | 'mapbox';
|
|
209
|
+
} | {
|
|
210
|
+
type: 'geojson';
|
|
211
|
+
data: unknown;
|
|
212
|
+
cluster?: boolean;
|
|
213
|
+
clusterRadius?: number;
|
|
214
|
+
clusterMaxZoom?: number;
|
|
215
|
+
} | {
|
|
216
|
+
type: 'image';
|
|
217
|
+
url: string;
|
|
218
|
+
coordinates: [[number, number], [number, number], [number, number], [number, number]];
|
|
219
|
+
} | {
|
|
220
|
+
type: 'video';
|
|
221
|
+
urls: string[];
|
|
222
|
+
coordinates: [[number, number], [number, number], [number, number], [number, number]];
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* MapLibre layer specification base
|
|
226
|
+
*/
|
|
227
|
+
interface MapLayerSpecBase {
|
|
228
|
+
id: string;
|
|
229
|
+
type: 'fill' | 'line' | 'symbol' | 'circle' | 'heatmap' | 'fill-extrusion' | 'raster' | 'hillshade' | 'background';
|
|
230
|
+
source?: string;
|
|
231
|
+
'source-layer'?: string;
|
|
232
|
+
minzoom?: number;
|
|
233
|
+
maxzoom?: number;
|
|
234
|
+
filter?: unknown[];
|
|
235
|
+
layout?: Record<string, unknown>;
|
|
236
|
+
paint?: Record<string, unknown>;
|
|
237
|
+
metadata?: Record<string, unknown>;
|
|
238
|
+
}
|
|
187
239
|
/**
|
|
188
240
|
* Map style specification
|
|
241
|
+
*
|
|
242
|
+
* Based on MapLibre Style Spec v8. While MapLibre's StyleSpecification
|
|
243
|
+
* is more precise, this interface provides a reasonable subset for
|
|
244
|
+
* typical use cases without requiring the full maplibre-gl types.
|
|
245
|
+
*
|
|
246
|
+
* @see https://maplibre.org/maplibre-style-spec/
|
|
189
247
|
*/
|
|
190
248
|
interface MapStyleSpec {
|
|
249
|
+
/** Style spec version - must be 8 */
|
|
191
250
|
version: 8;
|
|
251
|
+
/** Human-readable name for the style */
|
|
192
252
|
name?: string;
|
|
193
|
-
sources
|
|
194
|
-
|
|
195
|
-
|
|
253
|
+
/** Map sources keyed by source ID */
|
|
254
|
+
sources: Record<string, MapSourceSpec | Record<string, unknown>>;
|
|
255
|
+
/** Ordered array of layers */
|
|
256
|
+
layers: (MapLayerSpecBase | Record<string, unknown>)[];
|
|
257
|
+
/** URL to sprite image and JSON */
|
|
258
|
+
sprite?: string;
|
|
259
|
+
/** URL template for glyph PBFs */
|
|
260
|
+
glyphs?: string;
|
|
261
|
+
/** Arbitrary metadata */
|
|
262
|
+
metadata?: Record<string, unknown>;
|
|
263
|
+
/** Light settings for 3D */
|
|
264
|
+
light?: Record<string, unknown>;
|
|
265
|
+
/** Terrain settings */
|
|
266
|
+
terrain?: {
|
|
267
|
+
source: string;
|
|
268
|
+
exaggeration?: number;
|
|
269
|
+
};
|
|
270
|
+
/** Default center [lng, lat] */
|
|
271
|
+
center?: [number, number];
|
|
272
|
+
/** Default zoom */
|
|
273
|
+
zoom?: number;
|
|
274
|
+
/** Default bearing */
|
|
275
|
+
bearing?: number;
|
|
276
|
+
/** Default pitch */
|
|
277
|
+
pitch?: number;
|
|
196
278
|
}
|
|
197
279
|
/**
|
|
198
280
|
* Main Map component props
|
|
@@ -780,9 +862,14 @@ interface BasemapSwitcherProps extends BaseControlProps {
|
|
|
780
862
|
defaultBasemapId?: string;
|
|
781
863
|
activeBasemapId?: string;
|
|
782
864
|
onBasemapChange?: (basemap: BasemapDefinition) => void;
|
|
865
|
+
/** Callback when a basemap style fails to load (e.g., missing API key) */
|
|
866
|
+
onStyleError?: (error: {
|
|
867
|
+
basemap: BasemapDefinition;
|
|
868
|
+
reason: string;
|
|
869
|
+
}) => void;
|
|
783
870
|
columns?: number;
|
|
784
871
|
thumbnailSize?: number;
|
|
785
872
|
class?: string;
|
|
786
873
|
}
|
|
787
874
|
|
|
788
|
-
export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, type BasemapApiKeys, type BasemapCategory, type BasemapDefinition, type BasemapProvider, type BasemapSwitcherProps, BoundsArray, type CircleLayerProps, ClusterConfig, type ControlPosition, type CoordinateDisplayProps, type FeatureClickEventParams, type FeatureHoverEventParams, type FillExtrusionLayerProps, type FillLayerProps, GeoJSONFeature, GeoJSONFeatureCollection, type GeolocateControlProps, type GradientStop, type HeatmapLayerProps, type LegendConfig, type LegendGroupProps, type LegendItem, type LegendProps, type LineLayerProps, LngLat, MapBounds, type MapClickEventParams, type MapErrorEventParams, type MapHoverEventParams, type MapLoadEventParams, type MapMoveEventParams, type MapProps, MapSourceData, type MapStyleSpec, type MarkerClickEventParams, type MarkerDragEventParams, type MarkerProps, type NavigationControlProps, type PopupEventParams, type PopupProps, type RasterLayerProps, type ScaleControlProps, type SourceProps, type SymbolLayerProps };
|
|
875
|
+
export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, type BasemapApiKeys, type BasemapCategory, type BasemapDefinition, type BasemapProvider, type BasemapSwitcherProps, BoundsArray, type CircleLayerProps, ClusterConfig, type ControlPosition, type CoordinateDisplayProps, type FeatureClickEventParams, type FeatureHoverEventParams, type FillExtrusionLayerProps, type FillLayerProps, GeoJSONFeature, GeoJSONFeatureCollection, type GeolocateControlProps, type GradientStop, type HeatmapLayerProps, type LegendConfig, type LegendGroupProps, type LegendItem, type LegendProps, type LineLayerProps, LngLat, MapBounds, type MapClickEventParams, type MapErrorEventParams, type MapHoverEventParams, type MapLayerSpecBase, type MapLoadEventParams, type MapMoveEventParams, type MapProps, MapSourceData, type MapSourceSpec, type MapStyleSpec, type MarkerClickEventParams, type MarkerDragEventParams, type MarkerProps, type NavigationControlProps, type PopupEventParams, type PopupProps, type RasterLayerProps, type ScaleControlProps, type SourceProps, type SymbolLayerProps };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as LngLat, a as GeoJSONFeature, M as MapBounds, B as BoundsArray, k as MapSourceData, G as GeoJSONFeatureCollection, C as ClusterConfig } from '../data-
|
|
2
|
-
export { E as ExtrusionData,
|
|
1
|
+
import { L as LngLat, a as GeoJSONFeature, M as MapBounds, B as BoundsArray, k as MapSourceData, G as GeoJSONFeatureCollection, C as ClusterConfig } from '../data-k7o-Rne0.js';
|
|
2
|
+
export { E as ExtrusionData, c as GeoJSONGeometry, l as GeoJSONGeometryCollection, f as GeoJSONLineString, g as GeoJSONMultiLineString, e as GeoJSONMultiPoint, i as GeoJSONMultiPolygon, d as GeoJSONPoint, h as GeoJSONPolygon, H as HeatmapPoint, b as MapViewport, j as MarkerData } from '../data-k7o-Rne0.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Map event types
|
|
@@ -184,15 +184,97 @@ interface BaseMapProps {
|
|
|
184
184
|
/** Custom CSS class */
|
|
185
185
|
class?: string;
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* MapLibre source specification types
|
|
189
|
+
*/
|
|
190
|
+
type MapSourceSpec = {
|
|
191
|
+
type: 'vector';
|
|
192
|
+
url?: string;
|
|
193
|
+
tiles?: string[];
|
|
194
|
+
attribution?: string;
|
|
195
|
+
minzoom?: number;
|
|
196
|
+
maxzoom?: number;
|
|
197
|
+
} | {
|
|
198
|
+
type: 'raster';
|
|
199
|
+
url?: string;
|
|
200
|
+
tiles?: string[];
|
|
201
|
+
tileSize?: number;
|
|
202
|
+
attribution?: string;
|
|
203
|
+
} | {
|
|
204
|
+
type: 'raster-dem';
|
|
205
|
+
url?: string;
|
|
206
|
+
tiles?: string[];
|
|
207
|
+
tileSize?: number;
|
|
208
|
+
encoding?: 'terrarium' | 'mapbox';
|
|
209
|
+
} | {
|
|
210
|
+
type: 'geojson';
|
|
211
|
+
data: unknown;
|
|
212
|
+
cluster?: boolean;
|
|
213
|
+
clusterRadius?: number;
|
|
214
|
+
clusterMaxZoom?: number;
|
|
215
|
+
} | {
|
|
216
|
+
type: 'image';
|
|
217
|
+
url: string;
|
|
218
|
+
coordinates: [[number, number], [number, number], [number, number], [number, number]];
|
|
219
|
+
} | {
|
|
220
|
+
type: 'video';
|
|
221
|
+
urls: string[];
|
|
222
|
+
coordinates: [[number, number], [number, number], [number, number], [number, number]];
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* MapLibre layer specification base
|
|
226
|
+
*/
|
|
227
|
+
interface MapLayerSpecBase {
|
|
228
|
+
id: string;
|
|
229
|
+
type: 'fill' | 'line' | 'symbol' | 'circle' | 'heatmap' | 'fill-extrusion' | 'raster' | 'hillshade' | 'background';
|
|
230
|
+
source?: string;
|
|
231
|
+
'source-layer'?: string;
|
|
232
|
+
minzoom?: number;
|
|
233
|
+
maxzoom?: number;
|
|
234
|
+
filter?: unknown[];
|
|
235
|
+
layout?: Record<string, unknown>;
|
|
236
|
+
paint?: Record<string, unknown>;
|
|
237
|
+
metadata?: Record<string, unknown>;
|
|
238
|
+
}
|
|
187
239
|
/**
|
|
188
240
|
* Map style specification
|
|
241
|
+
*
|
|
242
|
+
* Based on MapLibre Style Spec v8. While MapLibre's StyleSpecification
|
|
243
|
+
* is more precise, this interface provides a reasonable subset for
|
|
244
|
+
* typical use cases without requiring the full maplibre-gl types.
|
|
245
|
+
*
|
|
246
|
+
* @see https://maplibre.org/maplibre-style-spec/
|
|
189
247
|
*/
|
|
190
248
|
interface MapStyleSpec {
|
|
249
|
+
/** Style spec version - must be 8 */
|
|
191
250
|
version: 8;
|
|
251
|
+
/** Human-readable name for the style */
|
|
192
252
|
name?: string;
|
|
193
|
-
sources
|
|
194
|
-
|
|
195
|
-
|
|
253
|
+
/** Map sources keyed by source ID */
|
|
254
|
+
sources: Record<string, MapSourceSpec | Record<string, unknown>>;
|
|
255
|
+
/** Ordered array of layers */
|
|
256
|
+
layers: (MapLayerSpecBase | Record<string, unknown>)[];
|
|
257
|
+
/** URL to sprite image and JSON */
|
|
258
|
+
sprite?: string;
|
|
259
|
+
/** URL template for glyph PBFs */
|
|
260
|
+
glyphs?: string;
|
|
261
|
+
/** Arbitrary metadata */
|
|
262
|
+
metadata?: Record<string, unknown>;
|
|
263
|
+
/** Light settings for 3D */
|
|
264
|
+
light?: Record<string, unknown>;
|
|
265
|
+
/** Terrain settings */
|
|
266
|
+
terrain?: {
|
|
267
|
+
source: string;
|
|
268
|
+
exaggeration?: number;
|
|
269
|
+
};
|
|
270
|
+
/** Default center [lng, lat] */
|
|
271
|
+
center?: [number, number];
|
|
272
|
+
/** Default zoom */
|
|
273
|
+
zoom?: number;
|
|
274
|
+
/** Default bearing */
|
|
275
|
+
bearing?: number;
|
|
276
|
+
/** Default pitch */
|
|
277
|
+
pitch?: number;
|
|
196
278
|
}
|
|
197
279
|
/**
|
|
198
280
|
* Main Map component props
|
|
@@ -780,9 +862,14 @@ interface BasemapSwitcherProps extends BaseControlProps {
|
|
|
780
862
|
defaultBasemapId?: string;
|
|
781
863
|
activeBasemapId?: string;
|
|
782
864
|
onBasemapChange?: (basemap: BasemapDefinition) => void;
|
|
865
|
+
/** Callback when a basemap style fails to load (e.g., missing API key) */
|
|
866
|
+
onStyleError?: (error: {
|
|
867
|
+
basemap: BasemapDefinition;
|
|
868
|
+
reason: string;
|
|
869
|
+
}) => void;
|
|
783
870
|
columns?: number;
|
|
784
871
|
thumbnailSize?: number;
|
|
785
872
|
class?: string;
|
|
786
873
|
}
|
|
787
874
|
|
|
788
|
-
export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, type BasemapApiKeys, type BasemapCategory, type BasemapDefinition, type BasemapProvider, type BasemapSwitcherProps, BoundsArray, type CircleLayerProps, ClusterConfig, type ControlPosition, type CoordinateDisplayProps, type FeatureClickEventParams, type FeatureHoverEventParams, type FillExtrusionLayerProps, type FillLayerProps, GeoJSONFeature, GeoJSONFeatureCollection, type GeolocateControlProps, type GradientStop, type HeatmapLayerProps, type LegendConfig, type LegendGroupProps, type LegendItem, type LegendProps, type LineLayerProps, LngLat, MapBounds, type MapClickEventParams, type MapErrorEventParams, type MapHoverEventParams, type MapLoadEventParams, type MapMoveEventParams, type MapProps, MapSourceData, type MapStyleSpec, type MarkerClickEventParams, type MarkerDragEventParams, type MarkerProps, type NavigationControlProps, type PopupEventParams, type PopupProps, type RasterLayerProps, type ScaleControlProps, type SourceProps, type SymbolLayerProps };
|
|
875
|
+
export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, type BasemapApiKeys, type BasemapCategory, type BasemapDefinition, type BasemapProvider, type BasemapSwitcherProps, BoundsArray, type CircleLayerProps, ClusterConfig, type ControlPosition, type CoordinateDisplayProps, type FeatureClickEventParams, type FeatureHoverEventParams, type FillExtrusionLayerProps, type FillLayerProps, GeoJSONFeature, GeoJSONFeatureCollection, type GeolocateControlProps, type GradientStop, type HeatmapLayerProps, type LegendConfig, type LegendGroupProps, type LegendItem, type LegendProps, type LineLayerProps, LngLat, MapBounds, type MapClickEventParams, type MapErrorEventParams, type MapHoverEventParams, type MapLayerSpecBase, type MapLoadEventParams, type MapMoveEventParams, type MapProps, MapSourceData, type MapSourceSpec, type MapStyleSpec, type MarkerClickEventParams, type MarkerDragEventParams, type MarkerProps, type NavigationControlProps, type PopupEventParams, type PopupProps, type RasterLayerProps, type ScaleControlProps, type SourceProps, type SymbolLayerProps };
|