@classic-homes/maps-core 0.1.3 → 0.1.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 CHANGED
@@ -3190,12 +3190,184 @@ function applyMarkerChildProtection(element) {
3190
3190
  style.setProperty("animation", "none", "important");
3191
3191
  }
3192
3192
 
3193
+ // src/basemaps/registry.ts
3194
+ var OSM_STANDARD = {
3195
+ id: "osm-standard",
3196
+ name: "OpenStreetMap",
3197
+ provider: "osm",
3198
+ category: "streets",
3199
+ thumbnail: "https://tile.openstreetmap.org/3/4/2.png",
3200
+ style: "https://demotiles.maplibre.org/style.json",
3201
+ requiresApiKey: false,
3202
+ attribution: "\xA9 OpenStreetMap contributors"
3203
+ };
3204
+ var CLASSIC_LIGHT = {
3205
+ id: "classic-light",
3206
+ name: "Classic Light",
3207
+ provider: "classic-theme",
3208
+ category: "minimal",
3209
+ thumbnail: "https://tile.openstreetmap.org/3/4/2.png",
3210
+ style: lightBasicStyle,
3211
+ requiresApiKey: false
3212
+ };
3213
+ var CLASSIC_DARK = {
3214
+ id: "classic-dark",
3215
+ name: "Classic Dark",
3216
+ provider: "classic-theme",
3217
+ category: "dark",
3218
+ thumbnail: "https://tile.openstreetmap.org/3/4/3.png",
3219
+ style: darkBasicStyle,
3220
+ requiresApiKey: false
3221
+ };
3222
+ var MAPTILER_STREETS = {
3223
+ id: "maptiler-streets",
3224
+ name: "Streets",
3225
+ provider: "maptiler",
3226
+ category: "streets",
3227
+ thumbnail: "https://api.maptiler.com/maps/streets-v2/256/3/4/2.png",
3228
+ style: (apiKey) => `https://api.maptiler.com/maps/streets-v2/style.json?key=${apiKey}`,
3229
+ requiresApiKey: true
3230
+ };
3231
+ var MAPTILER_SATELLITE = {
3232
+ id: "maptiler-satellite",
3233
+ name: "Satellite",
3234
+ provider: "maptiler",
3235
+ category: "satellite",
3236
+ thumbnail: "https://api.maptiler.com/maps/satellite/256/3/4/2.png",
3237
+ style: (apiKey) => `https://api.maptiler.com/maps/satellite/style.json?key=${apiKey}`,
3238
+ requiresApiKey: true
3239
+ };
3240
+ var MAPTILER_OUTDOOR = {
3241
+ id: "maptiler-outdoor",
3242
+ name: "Outdoor",
3243
+ provider: "maptiler",
3244
+ category: "outdoor",
3245
+ thumbnail: "https://api.maptiler.com/maps/outdoor-v2/256/3/4/2.png",
3246
+ style: (apiKey) => `https://api.maptiler.com/maps/outdoor-v2/style.json?key=${apiKey}`,
3247
+ requiresApiKey: true
3248
+ };
3249
+ var MAPTILER_BASIC = {
3250
+ id: "maptiler-basic",
3251
+ name: "Basic",
3252
+ provider: "maptiler",
3253
+ category: "minimal",
3254
+ thumbnail: "https://api.maptiler.com/maps/basic-v2/256/3/4/2.png",
3255
+ style: (apiKey) => `https://api.maptiler.com/maps/basic-v2/style.json?key=${apiKey}`,
3256
+ requiresApiKey: true
3257
+ };
3258
+ var STADIA_ALIDADE_SMOOTH = {
3259
+ id: "stadia-alidade-smooth",
3260
+ name: "Alidade Smooth",
3261
+ provider: "stadia",
3262
+ category: "minimal",
3263
+ thumbnail: "https://tiles.stadiamaps.com/tiles/alidade_smooth/3/4/2.png",
3264
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/alidade_smooth.json?api_key=${apiKey}`,
3265
+ requiresApiKey: true
3266
+ };
3267
+ var STADIA_ALIDADE_DARK = {
3268
+ id: "stadia-alidade-dark",
3269
+ name: "Alidade Dark",
3270
+ provider: "stadia",
3271
+ category: "dark",
3272
+ thumbnail: "https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/3/4/2.png",
3273
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json?api_key=${apiKey}`,
3274
+ requiresApiKey: true
3275
+ };
3276
+ var STADIA_STAMEN_TONER = {
3277
+ id: "stadia-stamen-toner",
3278
+ name: "Stamen Toner",
3279
+ provider: "stadia",
3280
+ category: "artistic",
3281
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_toner/3/4/2.png",
3282
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_toner.json?api_key=${apiKey}`,
3283
+ requiresApiKey: true
3284
+ };
3285
+ var STADIA_STAMEN_WATERCOLOR = {
3286
+ id: "stadia-stamen-watercolor",
3287
+ name: "Stamen Watercolor",
3288
+ provider: "stadia",
3289
+ category: "artistic",
3290
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_watercolor/3/4/2.png",
3291
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_watercolor.json?api_key=${apiKey}`,
3292
+ requiresApiKey: true
3293
+ };
3294
+ var STADIA_STAMEN_TERRAIN = {
3295
+ id: "stadia-stamen-terrain",
3296
+ name: "Stamen Terrain",
3297
+ provider: "stadia",
3298
+ category: "outdoor",
3299
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_terrain/3/4/2.png",
3300
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_terrain.json?api_key=${apiKey}`,
3301
+ requiresApiKey: true
3302
+ };
3303
+ var BUILTIN_BASEMAPS = [
3304
+ OSM_STANDARD,
3305
+ CLASSIC_LIGHT,
3306
+ CLASSIC_DARK,
3307
+ MAPTILER_STREETS,
3308
+ MAPTILER_SATELLITE,
3309
+ MAPTILER_OUTDOOR,
3310
+ MAPTILER_BASIC,
3311
+ STADIA_ALIDADE_SMOOTH,
3312
+ STADIA_ALIDADE_DARK,
3313
+ STADIA_STAMEN_TONER,
3314
+ STADIA_STAMEN_WATERCOLOR,
3315
+ STADIA_STAMEN_TERRAIN
3316
+ ];
3317
+ var FREE_BASEMAPS = BUILTIN_BASEMAPS.filter((b) => !b.requiresApiKey);
3318
+ function getApiKeyForProvider(basemap, apiKeys) {
3319
+ if (!apiKeys) return void 0;
3320
+ return apiKeys[basemap.provider];
3321
+ }
3322
+ function resolveBasemapStyle(basemap, apiKeys) {
3323
+ if (typeof basemap.style === "function") {
3324
+ const apiKey = getApiKeyForProvider(basemap, apiKeys);
3325
+ if (!apiKey) return null;
3326
+ return basemap.style(apiKey);
3327
+ }
3328
+ return basemap.style;
3329
+ }
3330
+ function getAvailableBasemaps(basemaps, apiKeys) {
3331
+ return basemaps.filter((basemap) => {
3332
+ if (!basemap.requiresApiKey) return true;
3333
+ return !!getApiKeyForProvider(basemap, apiKeys);
3334
+ });
3335
+ }
3336
+ function resolveBasemapThumbnail(basemap, apiKeys) {
3337
+ const { thumbnail, provider } = basemap;
3338
+ const apiKey = getApiKeyForProvider(basemap, apiKeys);
3339
+ if (!apiKey) return thumbnail;
3340
+ if (provider === "maptiler" && thumbnail.includes("api.maptiler.com")) {
3341
+ const separator = thumbnail.includes("?") ? "&" : "?";
3342
+ return `${thumbnail}${separator}key=${apiKey}`;
3343
+ }
3344
+ if (provider === "stadia" && thumbnail.includes("stadiamaps.com")) {
3345
+ const separator = thumbnail.includes("?") ? "&" : "?";
3346
+ return `${thumbnail}${separator}api_key=${apiKey}`;
3347
+ }
3348
+ return thumbnail;
3349
+ }
3350
+
3193
3351
  exports.BASE_OFFSET = BASE_OFFSET;
3352
+ exports.BUILTIN_BASEMAPS = BUILTIN_BASEMAPS;
3353
+ exports.CLASSIC_DARK = CLASSIC_DARK;
3354
+ exports.CLASSIC_LIGHT = CLASSIC_LIGHT;
3194
3355
  exports.DEFAULT_SIMPLIFICATION_THRESHOLDS = DEFAULT_SIMPLIFICATION_THRESHOLDS;
3356
+ exports.FREE_BASEMAPS = FREE_BASEMAPS;
3195
3357
  exports.KEYBOARD_CONTROLS = KEYBOARD_CONTROLS;
3358
+ exports.MAPTILER_BASIC = MAPTILER_BASIC;
3359
+ exports.MAPTILER_OUTDOOR = MAPTILER_OUTDOOR;
3360
+ exports.MAPTILER_SATELLITE = MAPTILER_SATELLITE;
3361
+ exports.MAPTILER_STREETS = MAPTILER_STREETS;
3196
3362
  exports.MARKER_PROTECTION_CLASS = MARKER_PROTECTION_CLASS;
3197
3363
  exports.OFFSET_CLASSES = OFFSET_CLASSES;
3364
+ exports.OSM_STANDARD = OSM_STANDARD;
3198
3365
  exports.POSITION_CLASSES = POSITION_CLASSES;
3366
+ exports.STADIA_ALIDADE_DARK = STADIA_ALIDADE_DARK;
3367
+ exports.STADIA_ALIDADE_SMOOTH = STADIA_ALIDADE_SMOOTH;
3368
+ exports.STADIA_STAMEN_TERRAIN = STADIA_STAMEN_TERRAIN;
3369
+ exports.STADIA_STAMEN_TONER = STADIA_STAMEN_TONER;
3370
+ exports.STADIA_STAMEN_WATERCOLOR = STADIA_STAMEN_WATERCOLOR;
3199
3371
  exports.THEME_DARK = THEME_DARK;
3200
3372
  exports.THEME_LIGHT = THEME_LIGHT;
3201
3373
  exports.applyMarkerChildProtection = applyMarkerChildProtection;
@@ -3274,6 +3446,7 @@ exports.generateMarkersDescription = generateMarkersDescription;
3274
3446
  exports.generateMoveAnnouncement = generateMoveAnnouncement;
3275
3447
  exports.generateVectorStyle = generateVectorStyle;
3276
3448
  exports.geoJSONEqual = geoJSONEqual;
3449
+ exports.getAvailableBasemaps = getAvailableBasemaps;
3277
3450
  exports.getBasicStyle = getBasicStyle;
3278
3451
  exports.getChangedPaintProps = getChangedPaintProps;
3279
3452
  exports.getClusterBounds = getClusterBounds;
@@ -3298,6 +3471,8 @@ exports.queryByBoundsWithStats = queryByBoundsWithStats;
3298
3471
  exports.queryRTreeByBounds = queryRTreeByBounds;
3299
3472
  exports.queryRTreeByBoundsWithStats = queryRTreeByBoundsWithStats;
3300
3473
  exports.removeMarkerProtection = removeMarkerProtection;
3474
+ exports.resolveBasemapStyle = resolveBasemapStyle;
3475
+ exports.resolveBasemapThumbnail = resolveBasemapThumbnail;
3301
3476
  exports.serializeFilter = serializeFilter;
3302
3477
  exports.simplifyFeature = simplifyFeature;
3303
3478
  exports.simplifyFeatureCollection = simplifyFeatureCollection;
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import { MapTheme } from './theme/index.cjs';
2
2
  export { MapDataColors, MapStyleSpec, MapThemeColors, THEME_DARK, THEME_LIGHT, darkBasicStyle, darkTheme, generateBasicStyle, generateDarkColors, generateDarkDataColors, generateDarkTheme, generateLightColors, generateLightDataColors, generateLightTheme, generateVectorStyle, getBasicStyle, getTheme, getTypography, lightBasicStyle, lightTheme } from './theme/index.cjs';
3
3
  import { L as LngLat, G as GeoJSONFeatureCollection, b as MarkerData, M as MapBounds, B as BoundsArray, a as GeoJSONFeature, c as GeoJSONPolygon } from './data-DDS6ok7I.cjs';
4
4
  export { C as ClusterConfig, E as ExtrusionData, e as GeoJSONGeometry, h as GeoJSONLineString, i as GeoJSONMultiLineString, g as GeoJSONMultiPoint, j as GeoJSONMultiPolygon, f as GeoJSONPoint, H as HeatmapPoint, k as MapSourceData, d as MapViewport } from './data-DDS6ok7I.cjs';
5
- import { ControlPosition } from './types/index.cjs';
6
- export { BaseControlProps, BaseLayerProps, BaseMapEventParams, BaseMapProps, CircleLayerProps, CoordinateDisplayProps, FeatureClickEventParams, FeatureHoverEventParams, FillExtrusionLayerProps, FillLayerProps, GeolocateControlProps, GradientStop, HeatmapLayerProps, LegendConfig, LegendGroupProps, LegendItem, LegendProps, LineLayerProps, MapClickEventParams, MapErrorEventParams, MapHoverEventParams, MapLoadEventParams, MapMoveEventParams, MapProps, MarkerClickEventParams, MarkerDragEventParams, MarkerProps, NavigationControlProps, PopupEventParams, PopupProps, RasterLayerProps, ScaleControlProps, SourceProps, SymbolLayerProps } from './types/index.cjs';
5
+ import { ControlPosition, BasemapDefinition, BasemapApiKeys, MapStyleSpec } from './types/index.cjs';
6
+ export { BaseControlProps, BaseLayerProps, BaseMapEventParams, BaseMapProps, BasemapCategory, BasemapProvider, BasemapSwitcherProps, CircleLayerProps, CoordinateDisplayProps, FeatureClickEventParams, FeatureHoverEventParams, FillExtrusionLayerProps, FillLayerProps, GeolocateControlProps, GradientStop, HeatmapLayerProps, LegendConfig, LegendGroupProps, LegendItem, LegendProps, LineLayerProps, MapClickEventParams, MapErrorEventParams, MapHoverEventParams, MapLoadEventParams, MapMoveEventParams, MapProps, MarkerClickEventParams, MarkerDragEventParams, MarkerProps, NavigationControlProps, PopupEventParams, PopupProps, RasterLayerProps, ScaleControlProps, SourceProps, SymbolLayerProps } from './types/index.cjs';
7
7
  export { o as BuildRTreeIndexOptions, B as BuildSpatialIndexOptions, I as IdleViewportManagerOptions, r as IdleViewportResult, P as PanVelocity, p as PredictiveViewportResult, k as QuerySpatialIndexOptions, Q as QueryStats, n as RTreeIndex, m as RTreeItem, R as RTreeQueryStats, S as SpatialIndex, V as ViewportManagedDataOptions, l as ViewportManagedResult, e as buildRTreeIndex, b as buildSpatialIndex, j as createIdleViewportManager, i as createPredictiveViewportManager, h as createRTreeViewportManager, d as createViewportManager, c as createViewportQuery, q as queryByBounds, a as queryByBoundsWithStats, f as queryRTreeByBounds, g as queryRTreeByBoundsWithStats } from './spatial-J48Btm8f.cjs';
8
8
  import 'rbush';
9
9
 
@@ -1278,4 +1278,39 @@ declare function removeMarkerProtection(element: HTMLElement): void;
1278
1278
  */
1279
1279
  declare function applyMarkerChildProtection(element: HTMLElement): void;
1280
1280
 
1281
- export { BASE_OFFSET, BoundsArray, type ClusterExpandOptions, type ClusterExpansionResult, type ClusterFeatureProperties, type ColorExpression, ControlPosition, DEFAULT_SIMPLIFICATION_THRESHOLDS, type DynamicLODOptions, type DynamicLODState, type ExtrusionHeightOptions, type FeatureGroup, type FilterExpression, type GenerateLODOptions, GeoJSONFeature, GeoJSONFeatureCollection, type GeoJSONFingerprint, GeoJSONPolygon, type GroupFeaturesOptions, KEYBOARD_CONTROLS, type LODData, type LODDataWithSimplification, LngLat, type LoadGeoJSONOptions, type LoadGeoJSONResult, type LotFillStyleOptions, type LotOutlineStyleOptions, MARKER_PROTECTION_CLASS, MapBounds, MapTheme, MarkerData, type NumberExpression, OFFSET_CLASSES, POSITION_CLASSES, type PaintProps, type PaintPropsDiff, type SimplificationStats, type SimplificationThreshold, type ValidationResult, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createSelectionExpression, createStatusColorExpression, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, removeMarkerProtection, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
1281
+ /**
1282
+ * Built-in basemap definitions and utilities
1283
+ */
1284
+
1285
+ declare const OSM_STANDARD: BasemapDefinition;
1286
+ declare const CLASSIC_LIGHT: BasemapDefinition;
1287
+ declare const CLASSIC_DARK: BasemapDefinition;
1288
+ declare const MAPTILER_STREETS: BasemapDefinition;
1289
+ declare const MAPTILER_SATELLITE: BasemapDefinition;
1290
+ declare const MAPTILER_OUTDOOR: BasemapDefinition;
1291
+ declare const MAPTILER_BASIC: BasemapDefinition;
1292
+ declare const STADIA_ALIDADE_SMOOTH: BasemapDefinition;
1293
+ declare const STADIA_ALIDADE_DARK: BasemapDefinition;
1294
+ declare const STADIA_STAMEN_TONER: BasemapDefinition;
1295
+ declare const STADIA_STAMEN_WATERCOLOR: BasemapDefinition;
1296
+ declare const STADIA_STAMEN_TERRAIN: BasemapDefinition;
1297
+ /** All built-in basemaps */
1298
+ declare const BUILTIN_BASEMAPS: BasemapDefinition[];
1299
+ /** Basemaps that require no API key */
1300
+ declare const FREE_BASEMAPS: BasemapDefinition[];
1301
+ /**
1302
+ * Resolve a basemap's style, injecting the API key if needed.
1303
+ * Returns null if the basemap requires an API key that isn't provided.
1304
+ */
1305
+ declare function resolveBasemapStyle(basemap: BasemapDefinition, apiKeys?: BasemapApiKeys): string | MapStyleSpec | null;
1306
+ /**
1307
+ * Filter basemaps to only those whose API keys are available.
1308
+ * Free basemaps (requiresApiKey=false) are always included.
1309
+ */
1310
+ declare function getAvailableBasemaps(basemaps: BasemapDefinition[], apiKeys?: BasemapApiKeys): BasemapDefinition[];
1311
+ /**
1312
+ * Resolve a basemap's thumbnail URL, appending the API key where needed.
1313
+ */
1314
+ declare function resolveBasemapThumbnail(basemap: BasemapDefinition, apiKeys?: BasemapApiKeys): string;
1315
+
1316
+ export { BASE_OFFSET, BUILTIN_BASEMAPS, BasemapApiKeys, BasemapDefinition, BoundsArray, CLASSIC_DARK, CLASSIC_LIGHT, type ClusterExpandOptions, type ClusterExpansionResult, type ClusterFeatureProperties, type ColorExpression, ControlPosition, DEFAULT_SIMPLIFICATION_THRESHOLDS, type DynamicLODOptions, type DynamicLODState, type ExtrusionHeightOptions, FREE_BASEMAPS, type FeatureGroup, type FilterExpression, type GenerateLODOptions, GeoJSONFeature, GeoJSONFeatureCollection, type GeoJSONFingerprint, GeoJSONPolygon, type GroupFeaturesOptions, KEYBOARD_CONTROLS, type LODData, type LODDataWithSimplification, LngLat, type LoadGeoJSONOptions, type LoadGeoJSONResult, type LotFillStyleOptions, type LotOutlineStyleOptions, MAPTILER_BASIC, MAPTILER_OUTDOOR, MAPTILER_SATELLITE, MAPTILER_STREETS, MARKER_PROTECTION_CLASS, MapBounds, MapTheme, MarkerData, type NumberExpression, OFFSET_CLASSES, OSM_STANDARD, POSITION_CLASSES, type PaintProps, type PaintPropsDiff, STADIA_ALIDADE_DARK, STADIA_ALIDADE_SMOOTH, STADIA_STAMEN_TERRAIN, STADIA_STAMEN_TONER, STADIA_STAMEN_WATERCOLOR, type SimplificationStats, type SimplificationThreshold, type ValidationResult, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createSelectionExpression, createStatusColorExpression, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getAvailableBasemaps, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, removeMarkerProtection, resolveBasemapStyle, resolveBasemapThumbnail, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { MapTheme } from './theme/index.js';
2
2
  export { MapDataColors, MapStyleSpec, MapThemeColors, THEME_DARK, THEME_LIGHT, darkBasicStyle, darkTheme, generateBasicStyle, generateDarkColors, generateDarkDataColors, generateDarkTheme, generateLightColors, generateLightDataColors, generateLightTheme, generateVectorStyle, getBasicStyle, getTheme, getTypography, lightBasicStyle, lightTheme } from './theme/index.js';
3
3
  import { L as LngLat, G as GeoJSONFeatureCollection, b as MarkerData, M as MapBounds, B as BoundsArray, a as GeoJSONFeature, c as GeoJSONPolygon } from './data-DDS6ok7I.js';
4
4
  export { C as ClusterConfig, E as ExtrusionData, e as GeoJSONGeometry, h as GeoJSONLineString, i as GeoJSONMultiLineString, g as GeoJSONMultiPoint, j as GeoJSONMultiPolygon, f as GeoJSONPoint, H as HeatmapPoint, k as MapSourceData, d as MapViewport } from './data-DDS6ok7I.js';
5
- import { ControlPosition } from './types/index.js';
6
- export { BaseControlProps, BaseLayerProps, BaseMapEventParams, BaseMapProps, CircleLayerProps, CoordinateDisplayProps, FeatureClickEventParams, FeatureHoverEventParams, FillExtrusionLayerProps, FillLayerProps, GeolocateControlProps, GradientStop, HeatmapLayerProps, LegendConfig, LegendGroupProps, LegendItem, LegendProps, LineLayerProps, MapClickEventParams, MapErrorEventParams, MapHoverEventParams, MapLoadEventParams, MapMoveEventParams, MapProps, MarkerClickEventParams, MarkerDragEventParams, MarkerProps, NavigationControlProps, PopupEventParams, PopupProps, RasterLayerProps, ScaleControlProps, SourceProps, SymbolLayerProps } from './types/index.js';
5
+ import { ControlPosition, BasemapDefinition, BasemapApiKeys, MapStyleSpec } from './types/index.js';
6
+ export { BaseControlProps, BaseLayerProps, BaseMapEventParams, BaseMapProps, BasemapCategory, BasemapProvider, BasemapSwitcherProps, CircleLayerProps, CoordinateDisplayProps, FeatureClickEventParams, FeatureHoverEventParams, FillExtrusionLayerProps, FillLayerProps, GeolocateControlProps, GradientStop, HeatmapLayerProps, LegendConfig, LegendGroupProps, LegendItem, LegendProps, LineLayerProps, MapClickEventParams, MapErrorEventParams, MapHoverEventParams, MapLoadEventParams, MapMoveEventParams, MapProps, MarkerClickEventParams, MarkerDragEventParams, MarkerProps, NavigationControlProps, PopupEventParams, PopupProps, RasterLayerProps, ScaleControlProps, SourceProps, SymbolLayerProps } from './types/index.js';
7
7
  export { o as BuildRTreeIndexOptions, B as BuildSpatialIndexOptions, I as IdleViewportManagerOptions, r as IdleViewportResult, P as PanVelocity, p as PredictiveViewportResult, k as QuerySpatialIndexOptions, Q as QueryStats, n as RTreeIndex, m as RTreeItem, R as RTreeQueryStats, S as SpatialIndex, V as ViewportManagedDataOptions, l as ViewportManagedResult, e as buildRTreeIndex, b as buildSpatialIndex, j as createIdleViewportManager, i as createPredictiveViewportManager, h as createRTreeViewportManager, d as createViewportManager, c as createViewportQuery, q as queryByBounds, a as queryByBoundsWithStats, f as queryRTreeByBounds, g as queryRTreeByBoundsWithStats } from './spatial-VV-zd88V.js';
8
8
  import 'rbush';
9
9
 
@@ -1278,4 +1278,39 @@ declare function removeMarkerProtection(element: HTMLElement): void;
1278
1278
  */
1279
1279
  declare function applyMarkerChildProtection(element: HTMLElement): void;
1280
1280
 
1281
- export { BASE_OFFSET, BoundsArray, type ClusterExpandOptions, type ClusterExpansionResult, type ClusterFeatureProperties, type ColorExpression, ControlPosition, DEFAULT_SIMPLIFICATION_THRESHOLDS, type DynamicLODOptions, type DynamicLODState, type ExtrusionHeightOptions, type FeatureGroup, type FilterExpression, type GenerateLODOptions, GeoJSONFeature, GeoJSONFeatureCollection, type GeoJSONFingerprint, GeoJSONPolygon, type GroupFeaturesOptions, KEYBOARD_CONTROLS, type LODData, type LODDataWithSimplification, LngLat, type LoadGeoJSONOptions, type LoadGeoJSONResult, type LotFillStyleOptions, type LotOutlineStyleOptions, MARKER_PROTECTION_CLASS, MapBounds, MapTheme, MarkerData, type NumberExpression, OFFSET_CLASSES, POSITION_CLASSES, type PaintProps, type PaintPropsDiff, type SimplificationStats, type SimplificationThreshold, type ValidationResult, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createSelectionExpression, createStatusColorExpression, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, removeMarkerProtection, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
1281
+ /**
1282
+ * Built-in basemap definitions and utilities
1283
+ */
1284
+
1285
+ declare const OSM_STANDARD: BasemapDefinition;
1286
+ declare const CLASSIC_LIGHT: BasemapDefinition;
1287
+ declare const CLASSIC_DARK: BasemapDefinition;
1288
+ declare const MAPTILER_STREETS: BasemapDefinition;
1289
+ declare const MAPTILER_SATELLITE: BasemapDefinition;
1290
+ declare const MAPTILER_OUTDOOR: BasemapDefinition;
1291
+ declare const MAPTILER_BASIC: BasemapDefinition;
1292
+ declare const STADIA_ALIDADE_SMOOTH: BasemapDefinition;
1293
+ declare const STADIA_ALIDADE_DARK: BasemapDefinition;
1294
+ declare const STADIA_STAMEN_TONER: BasemapDefinition;
1295
+ declare const STADIA_STAMEN_WATERCOLOR: BasemapDefinition;
1296
+ declare const STADIA_STAMEN_TERRAIN: BasemapDefinition;
1297
+ /** All built-in basemaps */
1298
+ declare const BUILTIN_BASEMAPS: BasemapDefinition[];
1299
+ /** Basemaps that require no API key */
1300
+ declare const FREE_BASEMAPS: BasemapDefinition[];
1301
+ /**
1302
+ * Resolve a basemap's style, injecting the API key if needed.
1303
+ * Returns null if the basemap requires an API key that isn't provided.
1304
+ */
1305
+ declare function resolveBasemapStyle(basemap: BasemapDefinition, apiKeys?: BasemapApiKeys): string | MapStyleSpec | null;
1306
+ /**
1307
+ * Filter basemaps to only those whose API keys are available.
1308
+ * Free basemaps (requiresApiKey=false) are always included.
1309
+ */
1310
+ declare function getAvailableBasemaps(basemaps: BasemapDefinition[], apiKeys?: BasemapApiKeys): BasemapDefinition[];
1311
+ /**
1312
+ * Resolve a basemap's thumbnail URL, appending the API key where needed.
1313
+ */
1314
+ declare function resolveBasemapThumbnail(basemap: BasemapDefinition, apiKeys?: BasemapApiKeys): string;
1315
+
1316
+ export { BASE_OFFSET, BUILTIN_BASEMAPS, BasemapApiKeys, BasemapDefinition, BoundsArray, CLASSIC_DARK, CLASSIC_LIGHT, type ClusterExpandOptions, type ClusterExpansionResult, type ClusterFeatureProperties, type ColorExpression, ControlPosition, DEFAULT_SIMPLIFICATION_THRESHOLDS, type DynamicLODOptions, type DynamicLODState, type ExtrusionHeightOptions, FREE_BASEMAPS, type FeatureGroup, type FilterExpression, type GenerateLODOptions, GeoJSONFeature, GeoJSONFeatureCollection, type GeoJSONFingerprint, GeoJSONPolygon, type GroupFeaturesOptions, KEYBOARD_CONTROLS, type LODData, type LODDataWithSimplification, LngLat, type LoadGeoJSONOptions, type LoadGeoJSONResult, type LotFillStyleOptions, type LotOutlineStyleOptions, MAPTILER_BASIC, MAPTILER_OUTDOOR, MAPTILER_SATELLITE, MAPTILER_STREETS, MARKER_PROTECTION_CLASS, MapBounds, MapTheme, MarkerData, type NumberExpression, OFFSET_CLASSES, OSM_STANDARD, POSITION_CLASSES, type PaintProps, type PaintPropsDiff, STADIA_ALIDADE_DARK, STADIA_ALIDADE_SMOOTH, STADIA_STAMEN_TERRAIN, STADIA_STAMEN_TONER, STADIA_STAMEN_WATERCOLOR, type SimplificationStats, type SimplificationThreshold, type ValidationResult, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createSelectionExpression, createStatusColorExpression, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getAvailableBasemaps, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, removeMarkerProtection, resolveBasemapStyle, resolveBasemapThumbnail, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { lightTheme } from './chunk-2NISJ7WE.js';
1
+ import { lightBasicStyle, darkBasicStyle, lightTheme } from './chunk-2NISJ7WE.js';
2
2
  export { THEME_DARK, THEME_LIGHT, darkBasicStyle, darkTheme, generateBasicStyle, generateDarkColors, generateDarkDataColors, generateDarkTheme, generateLightColors, generateLightDataColors, generateLightTheme, generateVectorStyle, getBasicStyle, getTheme, getTypography, lightBasicStyle, lightTheme } from './chunk-2NISJ7WE.js';
3
3
  import RBush from 'rbush';
4
4
 
@@ -2654,4 +2654,162 @@ function applyMarkerChildProtection(element) {
2654
2654
  style.setProperty("animation", "none", "important");
2655
2655
  }
2656
2656
 
2657
- export { BASE_OFFSET, DEFAULT_SIMPLIFICATION_THRESHOLDS, KEYBOARD_CONTROLS, MARKER_PROTECTION_CLASS, OFFSET_CLASSES, POSITION_CLASSES, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, buildRTreeIndex, buildSpatialIndex, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createIdleViewportManager, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createPredictiveViewportManager, createRTreeViewportManager, createSelectionExpression, createStatusColorExpression, createViewportManager, createViewportQuery, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, queryByBounds, queryByBoundsWithStats, queryRTreeByBounds, queryRTreeByBoundsWithStats, removeMarkerProtection, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
2657
+ // src/basemaps/registry.ts
2658
+ var OSM_STANDARD = {
2659
+ id: "osm-standard",
2660
+ name: "OpenStreetMap",
2661
+ provider: "osm",
2662
+ category: "streets",
2663
+ thumbnail: "https://tile.openstreetmap.org/3/4/2.png",
2664
+ style: "https://demotiles.maplibre.org/style.json",
2665
+ requiresApiKey: false,
2666
+ attribution: "\xA9 OpenStreetMap contributors"
2667
+ };
2668
+ var CLASSIC_LIGHT = {
2669
+ id: "classic-light",
2670
+ name: "Classic Light",
2671
+ provider: "classic-theme",
2672
+ category: "minimal",
2673
+ thumbnail: "https://tile.openstreetmap.org/3/4/2.png",
2674
+ style: lightBasicStyle,
2675
+ requiresApiKey: false
2676
+ };
2677
+ var CLASSIC_DARK = {
2678
+ id: "classic-dark",
2679
+ name: "Classic Dark",
2680
+ provider: "classic-theme",
2681
+ category: "dark",
2682
+ thumbnail: "https://tile.openstreetmap.org/3/4/3.png",
2683
+ style: darkBasicStyle,
2684
+ requiresApiKey: false
2685
+ };
2686
+ var MAPTILER_STREETS = {
2687
+ id: "maptiler-streets",
2688
+ name: "Streets",
2689
+ provider: "maptiler",
2690
+ category: "streets",
2691
+ thumbnail: "https://api.maptiler.com/maps/streets-v2/256/3/4/2.png",
2692
+ style: (apiKey) => `https://api.maptiler.com/maps/streets-v2/style.json?key=${apiKey}`,
2693
+ requiresApiKey: true
2694
+ };
2695
+ var MAPTILER_SATELLITE = {
2696
+ id: "maptiler-satellite",
2697
+ name: "Satellite",
2698
+ provider: "maptiler",
2699
+ category: "satellite",
2700
+ thumbnail: "https://api.maptiler.com/maps/satellite/256/3/4/2.png",
2701
+ style: (apiKey) => `https://api.maptiler.com/maps/satellite/style.json?key=${apiKey}`,
2702
+ requiresApiKey: true
2703
+ };
2704
+ var MAPTILER_OUTDOOR = {
2705
+ id: "maptiler-outdoor",
2706
+ name: "Outdoor",
2707
+ provider: "maptiler",
2708
+ category: "outdoor",
2709
+ thumbnail: "https://api.maptiler.com/maps/outdoor-v2/256/3/4/2.png",
2710
+ style: (apiKey) => `https://api.maptiler.com/maps/outdoor-v2/style.json?key=${apiKey}`,
2711
+ requiresApiKey: true
2712
+ };
2713
+ var MAPTILER_BASIC = {
2714
+ id: "maptiler-basic",
2715
+ name: "Basic",
2716
+ provider: "maptiler",
2717
+ category: "minimal",
2718
+ thumbnail: "https://api.maptiler.com/maps/basic-v2/256/3/4/2.png",
2719
+ style: (apiKey) => `https://api.maptiler.com/maps/basic-v2/style.json?key=${apiKey}`,
2720
+ requiresApiKey: true
2721
+ };
2722
+ var STADIA_ALIDADE_SMOOTH = {
2723
+ id: "stadia-alidade-smooth",
2724
+ name: "Alidade Smooth",
2725
+ provider: "stadia",
2726
+ category: "minimal",
2727
+ thumbnail: "https://tiles.stadiamaps.com/tiles/alidade_smooth/3/4/2.png",
2728
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/alidade_smooth.json?api_key=${apiKey}`,
2729
+ requiresApiKey: true
2730
+ };
2731
+ var STADIA_ALIDADE_DARK = {
2732
+ id: "stadia-alidade-dark",
2733
+ name: "Alidade Dark",
2734
+ provider: "stadia",
2735
+ category: "dark",
2736
+ thumbnail: "https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/3/4/2.png",
2737
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json?api_key=${apiKey}`,
2738
+ requiresApiKey: true
2739
+ };
2740
+ var STADIA_STAMEN_TONER = {
2741
+ id: "stadia-stamen-toner",
2742
+ name: "Stamen Toner",
2743
+ provider: "stadia",
2744
+ category: "artistic",
2745
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_toner/3/4/2.png",
2746
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_toner.json?api_key=${apiKey}`,
2747
+ requiresApiKey: true
2748
+ };
2749
+ var STADIA_STAMEN_WATERCOLOR = {
2750
+ id: "stadia-stamen-watercolor",
2751
+ name: "Stamen Watercolor",
2752
+ provider: "stadia",
2753
+ category: "artistic",
2754
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_watercolor/3/4/2.png",
2755
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_watercolor.json?api_key=${apiKey}`,
2756
+ requiresApiKey: true
2757
+ };
2758
+ var STADIA_STAMEN_TERRAIN = {
2759
+ id: "stadia-stamen-terrain",
2760
+ name: "Stamen Terrain",
2761
+ provider: "stadia",
2762
+ category: "outdoor",
2763
+ thumbnail: "https://tiles.stadiamaps.com/tiles/stamen_terrain/3/4/2.png",
2764
+ style: (apiKey) => `https://tiles.stadiamaps.com/styles/stamen_terrain.json?api_key=${apiKey}`,
2765
+ requiresApiKey: true
2766
+ };
2767
+ var BUILTIN_BASEMAPS = [
2768
+ OSM_STANDARD,
2769
+ CLASSIC_LIGHT,
2770
+ CLASSIC_DARK,
2771
+ MAPTILER_STREETS,
2772
+ MAPTILER_SATELLITE,
2773
+ MAPTILER_OUTDOOR,
2774
+ MAPTILER_BASIC,
2775
+ STADIA_ALIDADE_SMOOTH,
2776
+ STADIA_ALIDADE_DARK,
2777
+ STADIA_STAMEN_TONER,
2778
+ STADIA_STAMEN_WATERCOLOR,
2779
+ STADIA_STAMEN_TERRAIN
2780
+ ];
2781
+ var FREE_BASEMAPS = BUILTIN_BASEMAPS.filter((b) => !b.requiresApiKey);
2782
+ function getApiKeyForProvider(basemap, apiKeys) {
2783
+ if (!apiKeys) return void 0;
2784
+ return apiKeys[basemap.provider];
2785
+ }
2786
+ function resolveBasemapStyle(basemap, apiKeys) {
2787
+ if (typeof basemap.style === "function") {
2788
+ const apiKey = getApiKeyForProvider(basemap, apiKeys);
2789
+ if (!apiKey) return null;
2790
+ return basemap.style(apiKey);
2791
+ }
2792
+ return basemap.style;
2793
+ }
2794
+ function getAvailableBasemaps(basemaps, apiKeys) {
2795
+ return basemaps.filter((basemap) => {
2796
+ if (!basemap.requiresApiKey) return true;
2797
+ return !!getApiKeyForProvider(basemap, apiKeys);
2798
+ });
2799
+ }
2800
+ function resolveBasemapThumbnail(basemap, apiKeys) {
2801
+ const { thumbnail, provider } = basemap;
2802
+ const apiKey = getApiKeyForProvider(basemap, apiKeys);
2803
+ if (!apiKey) return thumbnail;
2804
+ if (provider === "maptiler" && thumbnail.includes("api.maptiler.com")) {
2805
+ const separator = thumbnail.includes("?") ? "&" : "?";
2806
+ return `${thumbnail}${separator}key=${apiKey}`;
2807
+ }
2808
+ if (provider === "stadia" && thumbnail.includes("stadiamaps.com")) {
2809
+ const separator = thumbnail.includes("?") ? "&" : "?";
2810
+ return `${thumbnail}${separator}api_key=${apiKey}`;
2811
+ }
2812
+ return thumbnail;
2813
+ }
2814
+
2815
+ export { BASE_OFFSET, BUILTIN_BASEMAPS, CLASSIC_DARK, CLASSIC_LIGHT, DEFAULT_SIMPLIFICATION_THRESHOLDS, FREE_BASEMAPS, KEYBOARD_CONTROLS, MAPTILER_BASIC, MAPTILER_OUTDOOR, MAPTILER_SATELLITE, MAPTILER_STREETS, MARKER_PROTECTION_CLASS, OFFSET_CLASSES, OSM_STANDARD, POSITION_CLASSES, STADIA_ALIDADE_DARK, STADIA_ALIDADE_SMOOTH, STADIA_STAMEN_TERRAIN, STADIA_STAMEN_TONER, STADIA_STAMEN_WATERCOLOR, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, buildRTreeIndex, buildSpatialIndex, calculateBounds, calculateCentroid, calculateZoomThresholds, combineBounds, computePositionClasses, computeVerticalOffsetStyle, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createIdleViewportManager, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createPredictiveViewportManager, createRTreeViewportManager, createSelectionExpression, createStatusColorExpression, createViewportManager, createViewportQuery, createZoomExpression, decimalToDMS, deepEqual, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getAvailableBasemaps, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, loadGeoJSON, paintPropsEqual, queryByBounds, queryByBoundsWithStats, queryRTreeByBounds, queryRTreeByBoundsWithStats, removeMarkerProtection, resolveBasemapStyle, resolveBasemapThumbnail, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateGeoJSON, zoomToScale };
@@ -754,5 +754,35 @@ interface LegendGroupProps {
754
754
  /** Custom CSS class */
755
755
  class?: string;
756
756
  }
757
+ type BasemapProvider = 'osm' | 'maptiler' | 'stadia' | 'classic-theme' | 'custom';
758
+ type BasemapCategory = 'streets' | 'satellite' | 'outdoor' | 'artistic' | 'minimal' | 'dark';
759
+ interface BasemapDefinition {
760
+ id: string;
761
+ name: string;
762
+ provider: BasemapProvider;
763
+ category: BasemapCategory;
764
+ thumbnail: string;
765
+ /** Style URL string, inline MapStyleSpec, or function(apiKey) => URL/spec */
766
+ style: string | MapStyleSpec | ((apiKey: string) => string | MapStyleSpec);
767
+ requiresApiKey: boolean;
768
+ attribution?: string;
769
+ label?: string;
770
+ }
771
+ interface BasemapApiKeys {
772
+ maptiler?: string;
773
+ stadia?: string;
774
+ [provider: string]: string | undefined;
775
+ }
776
+ interface BasemapSwitcherProps extends BaseControlProps {
777
+ basemaps?: BasemapDefinition[];
778
+ extraBasemaps?: BasemapDefinition[];
779
+ apiKeys?: BasemapApiKeys;
780
+ defaultBasemapId?: string;
781
+ activeBasemapId?: string;
782
+ onBasemapChange?: (basemap: BasemapDefinition) => void;
783
+ columns?: number;
784
+ thumbnailSize?: number;
785
+ class?: string;
786
+ }
757
787
 
758
- export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, 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 };
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 };
@@ -754,5 +754,35 @@ interface LegendGroupProps {
754
754
  /** Custom CSS class */
755
755
  class?: string;
756
756
  }
757
+ type BasemapProvider = 'osm' | 'maptiler' | 'stadia' | 'classic-theme' | 'custom';
758
+ type BasemapCategory = 'streets' | 'satellite' | 'outdoor' | 'artistic' | 'minimal' | 'dark';
759
+ interface BasemapDefinition {
760
+ id: string;
761
+ name: string;
762
+ provider: BasemapProvider;
763
+ category: BasemapCategory;
764
+ thumbnail: string;
765
+ /** Style URL string, inline MapStyleSpec, or function(apiKey) => URL/spec */
766
+ style: string | MapStyleSpec | ((apiKey: string) => string | MapStyleSpec);
767
+ requiresApiKey: boolean;
768
+ attribution?: string;
769
+ label?: string;
770
+ }
771
+ interface BasemapApiKeys {
772
+ maptiler?: string;
773
+ stadia?: string;
774
+ [provider: string]: string | undefined;
775
+ }
776
+ interface BasemapSwitcherProps extends BaseControlProps {
777
+ basemaps?: BasemapDefinition[];
778
+ extraBasemaps?: BasemapDefinition[];
779
+ apiKeys?: BasemapApiKeys;
780
+ defaultBasemapId?: string;
781
+ activeBasemapId?: string;
782
+ onBasemapChange?: (basemap: BasemapDefinition) => void;
783
+ columns?: number;
784
+ thumbnailSize?: number;
785
+ class?: string;
786
+ }
757
787
 
758
- export { type BaseControlProps, type BaseLayerProps, type BaseMapEventParams, type BaseMapProps, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/maps-core",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Core utilities and theme for Classic Theme maps",
5
5
  "keywords": [
6
6
  "maps",
@@ -44,7 +44,8 @@
44
44
  },
45
45
  "./styles/controls.css": "./src/styles/controls.css",
46
46
  "./styles/popup.css": "./src/styles/popup.css",
47
- "./styles/marker.css": "./src/styles/marker.css"
47
+ "./styles/marker.css": "./src/styles/marker.css",
48
+ "./styles/basemap-switcher.css": "./src/styles/basemap-switcher.css"
48
49
  },
49
50
  "files": [
50
51
  "dist",
@@ -0,0 +1,20 @@
1
+ @keyframes classic-basemap-panel-enter {
2
+ from {
3
+ opacity: 0;
4
+ transform: scale(0.95) translateY(4px);
5
+ }
6
+ to {
7
+ opacity: 1;
8
+ transform: scale(1) translateY(0);
9
+ }
10
+ }
11
+
12
+ .classic-basemap-panel-enter {
13
+ animation: classic-basemap-panel-enter 150ms ease-out;
14
+ }
15
+
16
+ @media (prefers-reduced-motion: reduce) {
17
+ .classic-basemap-panel-enter {
18
+ animation: none;
19
+ }
20
+ }