cool-globe 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.
@@ -1,3 +1,3 @@
1
1
  import type { CoolGlobeProps } from "./types";
2
- export declare const CoolGlobe: ({ statisticsData, resetSignal, countryNumericToIsoMap, countryNameToIsoMap, primaryMetric, colorScale, }: CoolGlobeProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const CoolGlobe: ({ statisticsData, resetSignal, preselectedCountry, countryNumericToIsoMap, countryNameToIsoMap, primaryMetric, colorScale, }: CoolGlobeProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default CoolGlobe;
@@ -1,4 +1,11 @@
1
+ import type { Feature } from "geojson";
1
2
  import type { ColorScaleInput, GlobeLevel, MetricRecord } from "./dashboardGlobe.types";
3
+ import type { Bounds } from "./CoolGlobe.types";
4
+ export declare const normalizeCountryIso: (code: string) => string;
5
+ export declare const findCountryFeatureByIso: (features: Feature[], isoA2: string, countryNameToIsoMap?: Record<string, string>) => Feature | undefined;
6
+ export declare const extractFeatureCoordinates: (geometry: unknown) => number[][];
7
+ export declare const getFeatureBounds: (featureItem: Feature) => Bounds | undefined;
8
+ export declare const getAltitudeFromBounds: (bounds: Bounds) => number;
2
9
  export declare const getMetricValue: (metricRecord: MetricRecord | undefined, metricKey: string) => number;
3
10
  export declare const createColorResolver: (values: number[], colorScale: ColorScaleInput) => (value: number) => string;
4
11
  export declare const getZoomLevelByAltitude: (altitude: number) => GlobeLevel;
@@ -2,6 +2,8 @@ import type { ColorScaleInput, StatisticsData } from "./dashboardGlobe.types";
2
2
  export interface CoolGlobeProps {
3
3
  statisticsData: StatisticsData;
4
4
  resetSignal?: string | number;
5
+ /** ISO 3166-1 alpha-2 code — auto-selects and zooms to this country once geo data loads. */
6
+ preselectedCountry?: string;
5
7
  primaryMetric?: string;
6
8
  colorScale?: ColorScaleInput;
7
9
  countryNumericToIsoMap?: Record<string, string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cool-globe",
3
3
  "private": false,
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "description": "Reusable interactive React globe component library.",
6
6
  "license": "MIT",
7
7
  "keywords": [