@classic-homes/maps-core 0.2.8 → 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.
@@ -0,0 +1,50 @@
1
+ export { ar as ClusterCircleStyleOptions, al as ClusterExpandOptions, am as ClusterExpansionResult, ak as ClusterFeatureProperties, au as ClusterLayerStyles, aq as ClusterMapBoundsExpander, ap as ClusterMapExpander, ao as ClusterMapReader, as as ClusterTextStyleOptions, an as ClusterableGeoJSONSource, C as ColorExpression, Z as CoordinateValidationResult, aJ as DEFAULT_SIMPLIFICATION_THRESHOLDS, aR as DynamicLODOptions, aS as DynamicLODState, E as ExtrusionHeightOptions, aL as FeatureGroup, b2 as FilterExpression, b3 as FilterOperator, b4 as FilterValue, aM as GenerateLODOptions, aW as GeoJSONFingerprint, aK as GroupFeaturesOptions, K as KEYBOARD_CONTROLS, aN as LODData, aQ as LODDataWithSimplification, a7 as LoadGeoJSONOptions, a8 as LoadGeoJSONResult, L as LotFillStyleOptions, z as LotOutlineStyleOptions, b8 as MARKER_PROTECTION_CLASS, N as NumberExpression, b0 as PaintProps, b1 as PaintPropsDiff, aP as SimplificationStats, aO as SimplificationThreshold, at as UnclusteredPointStyleOptions, a9 as ValidationResult, b6 as applyMarkerChildProtection, b5 as applyMarkerProtection, ay as boundsToPolygon, _ as calculateBounds, a4 as calculateCentroid, aA as calculateZoomThresholds, X as clampLatitude, a0 as combineBounds, a5 as countFeaturesByType, p as createCategoricalColorExpression, j as createCircleStyle, ai as createClusterCirclePaint, ah as createClusterStyles, aj as createClusterTextLayout, q as createContinuousColorExpression, aH as createDynamicLODManager, w as createExtrusionHeightExpression, k as createExtrusionStyle, h as createFillStyle, aT as createGeoJSONFingerprint, l as createHeatmapStyle, m as createHoverExpression, o as createInteractiveExpression, y as createInteractiveStatusColorExpression, i as createLineStyle, u as createLotFillStyle, v as createLotOutlineStyle, n as createSelectionExpression, x as createStatusColorExpression, r as createZoomExpression, B as decimalToDMS, aX as deepEqual, V as ensureValidCoordinates, ae as expandCluster, ag as expandClusterToBounds, $ as extendBounds, a6 as filterByGeometryType, a_ as filterEqual, aU as fingerprintEqual, F as formatArea, I as formatBearing, G as formatBounds, A as formatCoordinates, D as formatDistance, Q as formatFeatureProperties, R as formatLabel, J as formatPitch, P as formatPropertyValue, M as formatScale, H as formatZoom, ax as generateBoundingPolygon, aw as generateConvexHull, b as generateFeatureCollectionDescription, d as generateFeatureTable, g as generateKeyboardControlsDescription, az as generateLODData, aF as generateLODDataWithSimplification, a as generateMapDescription, e as generateMarkerList, c as generateMarkersDescription, f as generateMoveAnnouncement, aV as geoJSONEqual, aZ as getChangedPaintProps, af as getClusterBounds, ac as getClusterChildren, ab as getClusterExpansionZoom, ad as getClusterLeaves, s as getHighlightStyle, t as getSelectionStyle, aI as getSimplificationToleranceForZoom, aG as getSimplifiedFeaturesForZoom, av as groupFeaturesByProperty, aa as isClusterFeature, a1 as isValidBounds, T as isValidLatitude, S as isValidLongitude, a2 as loadGeoJSON, W as normalizeLongitude, aY as paintPropsEqual, b7 as removeMarkerProtection, a$ as serializeFilter, aC as simplifyFeature, aD as simplifyFeatureCollection, aE as simplifyFeatureCollectionWithStats, aB as simplifyPolygon, Y as validateBoundsArray, U as validateCoordinates, a3 as validateGeoJSON, O as zoomToScale } from '../marker-zuhH2WoS.cjs';
2
+ export { n as BuildRTreeIndexOptions, B as BuildSpatialIndexOptions, I as IdleViewportManagerOptions, r as IdleViewportResult, P as PanVelocity, p as PredictiveViewportResult, Q as QuerySpatialIndexOptions, k as QueryStats, m as RTreeIndex, R as RTreeItem, o 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-CU60awl8.cjs';
3
+ import '../data-k7o-Rne0.cjs';
4
+ import '../generator-CGfqiHvG.cjs';
5
+ import 'rbush';
6
+
7
+ /**
8
+ * Shared popup utilities for React and Svelte map components
9
+ */
10
+ interface PaddingSides {
11
+ top: number;
12
+ right: number;
13
+ bottom: number;
14
+ left: number;
15
+ }
16
+ /**
17
+ * Helper to normalize padding value into individual sides
18
+ */
19
+ declare function normalizePadding(padding: number | PaddingSides): PaddingSides;
20
+ /**
21
+ * Check if user prefers reduced motion
22
+ */
23
+ declare function prefersReducedMotion(): boolean;
24
+ /**
25
+ * Generic popup interface for the panToFitPopup function.
26
+ * This interface is compatible with maplibregl.Popup.
27
+ */
28
+ interface PopupLike {
29
+ getElement(): HTMLElement | null;
30
+ }
31
+ /**
32
+ * Generic map interface for the panToFitPopup function.
33
+ * This interface is compatible with maplibregl.Map.
34
+ */
35
+ interface MapLike {
36
+ getContainer(): HTMLElement;
37
+ panBy(offset: [number, number], options?: {
38
+ animate?: boolean;
39
+ }): void;
40
+ }
41
+ /**
42
+ * Pan the map to ensure the popup is fully visible within the viewport.
43
+ *
44
+ * @param map - The map instance (maplibregl.Map compatible)
45
+ * @param popup - The popup instance (maplibregl.Popup compatible)
46
+ * @param padding - Padding around the popup to ensure visibility
47
+ */
48
+ declare function panToFitPopup(map: MapLike, popup: PopupLike, padding: PaddingSides): void;
49
+
50
+ export { type MapLike, type PaddingSides, type PopupLike, normalizePadding, panToFitPopup, prefersReducedMotion };
@@ -0,0 +1,50 @@
1
+ export { ar as ClusterCircleStyleOptions, al as ClusterExpandOptions, am as ClusterExpansionResult, ak as ClusterFeatureProperties, au as ClusterLayerStyles, aq as ClusterMapBoundsExpander, ap as ClusterMapExpander, ao as ClusterMapReader, as as ClusterTextStyleOptions, an as ClusterableGeoJSONSource, C as ColorExpression, Z as CoordinateValidationResult, aJ as DEFAULT_SIMPLIFICATION_THRESHOLDS, aR as DynamicLODOptions, aS as DynamicLODState, E as ExtrusionHeightOptions, aL as FeatureGroup, b2 as FilterExpression, b3 as FilterOperator, b4 as FilterValue, aM as GenerateLODOptions, aW as GeoJSONFingerprint, aK as GroupFeaturesOptions, K as KEYBOARD_CONTROLS, aN as LODData, aQ as LODDataWithSimplification, a7 as LoadGeoJSONOptions, a8 as LoadGeoJSONResult, L as LotFillStyleOptions, z as LotOutlineStyleOptions, b8 as MARKER_PROTECTION_CLASS, N as NumberExpression, b0 as PaintProps, b1 as PaintPropsDiff, aP as SimplificationStats, aO as SimplificationThreshold, at as UnclusteredPointStyleOptions, a9 as ValidationResult, b6 as applyMarkerChildProtection, b5 as applyMarkerProtection, ay as boundsToPolygon, _ as calculateBounds, a4 as calculateCentroid, aA as calculateZoomThresholds, X as clampLatitude, a0 as combineBounds, a5 as countFeaturesByType, p as createCategoricalColorExpression, j as createCircleStyle, ai as createClusterCirclePaint, ah as createClusterStyles, aj as createClusterTextLayout, q as createContinuousColorExpression, aH as createDynamicLODManager, w as createExtrusionHeightExpression, k as createExtrusionStyle, h as createFillStyle, aT as createGeoJSONFingerprint, l as createHeatmapStyle, m as createHoverExpression, o as createInteractiveExpression, y as createInteractiveStatusColorExpression, i as createLineStyle, u as createLotFillStyle, v as createLotOutlineStyle, n as createSelectionExpression, x as createStatusColorExpression, r as createZoomExpression, B as decimalToDMS, aX as deepEqual, V as ensureValidCoordinates, ae as expandCluster, ag as expandClusterToBounds, $ as extendBounds, a6 as filterByGeometryType, a_ as filterEqual, aU as fingerprintEqual, F as formatArea, I as formatBearing, G as formatBounds, A as formatCoordinates, D as formatDistance, Q as formatFeatureProperties, R as formatLabel, J as formatPitch, P as formatPropertyValue, M as formatScale, H as formatZoom, ax as generateBoundingPolygon, aw as generateConvexHull, b as generateFeatureCollectionDescription, d as generateFeatureTable, g as generateKeyboardControlsDescription, az as generateLODData, aF as generateLODDataWithSimplification, a as generateMapDescription, e as generateMarkerList, c as generateMarkersDescription, f as generateMoveAnnouncement, aV as geoJSONEqual, aZ as getChangedPaintProps, af as getClusterBounds, ac as getClusterChildren, ab as getClusterExpansionZoom, ad as getClusterLeaves, s as getHighlightStyle, t as getSelectionStyle, aI as getSimplificationToleranceForZoom, aG as getSimplifiedFeaturesForZoom, av as groupFeaturesByProperty, aa as isClusterFeature, a1 as isValidBounds, T as isValidLatitude, S as isValidLongitude, a2 as loadGeoJSON, W as normalizeLongitude, aY as paintPropsEqual, b7 as removeMarkerProtection, a$ as serializeFilter, aC as simplifyFeature, aD as simplifyFeatureCollection, aE as simplifyFeatureCollectionWithStats, aB as simplifyPolygon, Y as validateBoundsArray, U as validateCoordinates, a3 as validateGeoJSON, O as zoomToScale } from '../marker-BjzgxVwm.js';
2
+ export { n as BuildRTreeIndexOptions, B as BuildSpatialIndexOptions, I as IdleViewportManagerOptions, r as IdleViewportResult, P as PanVelocity, p as PredictiveViewportResult, Q as QuerySpatialIndexOptions, k as QueryStats, m as RTreeIndex, R as RTreeItem, o 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-Bo8nM3fC.js';
3
+ import '../data-k7o-Rne0.js';
4
+ import '../generator-CGfqiHvG.js';
5
+ import 'rbush';
6
+
7
+ /**
8
+ * Shared popup utilities for React and Svelte map components
9
+ */
10
+ interface PaddingSides {
11
+ top: number;
12
+ right: number;
13
+ bottom: number;
14
+ left: number;
15
+ }
16
+ /**
17
+ * Helper to normalize padding value into individual sides
18
+ */
19
+ declare function normalizePadding(padding: number | PaddingSides): PaddingSides;
20
+ /**
21
+ * Check if user prefers reduced motion
22
+ */
23
+ declare function prefersReducedMotion(): boolean;
24
+ /**
25
+ * Generic popup interface for the panToFitPopup function.
26
+ * This interface is compatible with maplibregl.Popup.
27
+ */
28
+ interface PopupLike {
29
+ getElement(): HTMLElement | null;
30
+ }
31
+ /**
32
+ * Generic map interface for the panToFitPopup function.
33
+ * This interface is compatible with maplibregl.Map.
34
+ */
35
+ interface MapLike {
36
+ getContainer(): HTMLElement;
37
+ panBy(offset: [number, number], options?: {
38
+ animate?: boolean;
39
+ }): void;
40
+ }
41
+ /**
42
+ * Pan the map to ensure the popup is fully visible within the viewport.
43
+ *
44
+ * @param map - The map instance (maplibregl.Map compatible)
45
+ * @param popup - The popup instance (maplibregl.Popup compatible)
46
+ * @param padding - Padding around the popup to ensure visibility
47
+ */
48
+ declare function panToFitPopup(map: MapLike, popup: PopupLike, padding: PaddingSides): void;
49
+
50
+ export { type MapLike, type PaddingSides, type PopupLike, normalizePadding, panToFitPopup, prefersReducedMotion };
@@ -0,0 +1,2 @@
1
+ export { DEFAULT_SIMPLIFICATION_THRESHOLDS, KEYBOARD_CONTROLS, MARKER_PROTECTION_CLASS, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, buildRTreeIndex, buildSpatialIndex, calculateBounds, calculateCentroid, calculateZoomThresholds, clampLatitude, combineBounds, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createClusterCirclePaint, createClusterStyles, createClusterTextLayout, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createIdleViewportManager, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createPredictiveViewportManager, createRTreeViewportManager, createSelectionExpression, createStatusColorExpression, createViewportManager, createViewportQuery, createZoomExpression, decimalToDMS, deepEqual, ensureValidCoordinates, 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, isValidLatitude, isValidLongitude, loadGeoJSON, normalizeLongitude, normalizePadding, paintPropsEqual, panToFitPopup, prefersReducedMotion, queryByBounds, queryByBoundsWithStats, queryRTreeByBounds, queryRTreeByBoundsWithStats, removeMarkerProtection, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateBoundsArray, validateCoordinates, validateGeoJSON, zoomToScale } from '../chunk-EXGGK4H7.js';
2
+ import '../chunk-ZGUACUEF.js';
@@ -1,5 +1,5 @@
1
- import { G as GeoJSONFeatureCollection, B as BoundsArray } from '../data-CICLgvT6.cjs';
2
- import { Q as QueryStats, P as PanVelocity, R as RTreeQueryStats } from '../spatial-D9o4mvDO.cjs';
1
+ import { G as GeoJSONFeatureCollection, B as BoundsArray } from '../data-k7o-Rne0.cjs';
2
+ import { k as QueryStats, P as PanVelocity, o as RTreeQueryStats } from '../spatial-CU60awl8.cjs';
3
3
  import 'rbush';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { G as GeoJSONFeatureCollection, B as BoundsArray } from '../data-CICLgvT6.js';
2
- import { Q as QueryStats, P as PanVelocity, R as RTreeQueryStats } from '../spatial-D4ZJ4Ul7.js';
1
+ import { G as GeoJSONFeatureCollection, B as BoundsArray } from '../data-k7o-Rne0.js';
2
+ import { k as QueryStats, P as PanVelocity, o as RTreeQueryStats } from '../spatial-Bo8nM3fC.js';
3
3
  import 'rbush';
4
4
 
5
5
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/maps-core",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Core utilities and theme for Classic Theme maps",
5
5
  "keywords": [
6
6
  "maps",
@@ -34,6 +34,11 @@
34
34
  "import": "./dist/types/index.js",
35
35
  "require": "./dist/types/index.cjs"
36
36
  },
37
+ "./utils": {
38
+ "types": "./dist/utils/index.d.ts",
39
+ "import": "./dist/utils/index.js",
40
+ "require": "./dist/utils/index.cjs"
41
+ },
37
42
  "./workers": {
38
43
  "types": "./dist/workers/index.d.ts",
39
44
  "import": "./dist/workers/index.js",
@@ -54,6 +59,9 @@
54
59
  "./styles/basemap-switcher.css": "./src/styles/basemap-switcher.css",
55
60
  "./styles/layer-manager.css": "./src/styles/layer-manager.css"
56
61
  },
62
+ "sideEffects": [
63
+ "*.css"
64
+ ],
57
65
  "files": [
58
66
  "dist",
59
67
  "src/styles"