react-threat-map 0.2.0 → 0.2.1

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/DECISIONS.md CHANGED
@@ -247,7 +247,24 @@ Every runtime dependency, and why it earns its place:
247
247
  Both are declared `external`, so consumers dedupe them against their own copies of d3
248
248
  rather than shipping a second one.
249
249
 
250
- `react` is a **peer** dependency (>=18), never bundled.
250
+ `react` is a **peer** dependency (>=16.14.0), never bundled.
251
+
252
+ The floor is 16.14.0, not 16.8.0 (hooks) as one might expect: the compiled output uses
253
+ the automatic JSX runtime, so it imports `react/jsx-runtime`, and that entry point first
254
+ ships in **16.14.0**. On 16.8–16.13 the package installs and then fails at bundle time on
255
+ an unresolved module, so those versions must stay outside the range.
256
+
257
+ Nothing in the library needs more than that floor — it uses only `useState`, `useEffect`,
258
+ `useRef`, `useMemo`, and `useCallback`. The range was originally `>=18` for no recorded
259
+ reason, which excluded working consumers on React 16.14/17; widened in 0.2.1 after
260
+ verifying typecheck and a mount/re-render/unmount render pass on 16.14, 17, 18, and 19.
261
+
262
+ Supporting that range is also why the public types import `CSSProperties`, `MouseEvent`,
263
+ `ReactElement`, and `RefObject` **by name** from `react` rather than reaching through the
264
+ `React` UMD global or the global `JSX` namespace. A bare `JSX.Element` in an emitted `.d.ts`
265
+ resolves against whatever `@types/react` the consumer has — and `@types/react@19` removed
266
+ the global `JSX` namespace, so it broke React 19 consumers compiling with
267
+ `skipLibCheck: false`. Named type imports are identical across `@types/react` 16 to 19.
251
268
 
252
269
  Deliberately **not** dependencies: no state manager, no styling library, no CSS-in-JS, no
253
270
  animation library, no `d3-selection`/`d3-zoom`/`d3-scale`. The library ships zero CSS —
package/README.md CHANGED
@@ -49,12 +49,17 @@ import { ThreatMap } from 'react-threat-map';
49
49
  npm install react-threat-map
50
50
  ```
51
51
 
52
- React 18+ is a peer dependency:
52
+ React is a peer dependency:
53
53
 
54
54
  ```json
55
- { "peerDependencies": { "react": ">=18.0.0" } }
55
+ { "peerDependencies": { "react": ">=16.14.0" } }
56
56
  ```
57
57
 
58
+ 16.14.0 is the floor because that is the first release to ship `react/jsx-runtime`,
59
+ which the compiled output imports. The library uses only `useState`, `useEffect`,
60
+ `useRef`, `useMemo`, and `useCallback`, so nothing above that floor is required —
61
+ React 16.14, 17, 18, and 19 are all supported.
62
+
58
63
  ---
59
64
 
60
65
  ## Quick start
package/dist/geo.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { G as GeoData } from './regions-neHSPgtu.cjs';
2
- export { R as RegionEntry, a as RegionIndex, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-neHSPgtu.cjs';
1
+ import { G as GeoData } from './regions-Bsys6EFr.cjs';
2
+ export { R as RegionEntry, a as RegionIndex, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-Bsys6EFr.cjs';
3
+ import 'react';
3
4
 
4
5
  /**
5
6
  * Boundary geometry loading — the `react-threat-map/geo` entry point.
package/dist/geo.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { G as GeoData } from './regions-neHSPgtu.js';
2
- export { R as RegionEntry, a as RegionIndex, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-neHSPgtu.js';
1
+ import { G as GeoData } from './regions-Bsys6EFr.js';
2
+ export { R as RegionEntry, a as RegionIndex, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-Bsys6EFr.js';
3
+ import 'react';
3
4
 
4
5
  /**
5
6
  * Boundary geometry loading — the `react-threat-map/geo` entry point.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { T as ThreatMapProps, A as AnimationConfig, L as LineStyleConfig, c as RegionsConfig, d as ThreatMapTheme, e as AggregationConfig, a as RegionIndex, f as Attack, h as Threat, I as IntensityScale, S as Severity, i as ResolvedRegion, j as AggregationGranularity, k as LatLng, m as AttackLocation } from './regions-neHSPgtu.cjs';
2
- export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverityFn, C as Color, E as EasingName, G as GeoData, q as GeoFeature, r as GeoFeatureCollection, s as GeoGeometry, t as GeoProjectionLike, P as ProjectionName, u as ProjectionSpec, v as RegionCode, R as RegionEntry, w as RegionKind, x as RegionRenderContext, y as RegionRenderer, z as ThreatMapError, B as ThreatRenderContext, D as ThreatRenderer, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-neHSPgtu.cjs';
1
+ import { ReactElement } from 'react';
2
+ import { T as ThreatMapProps, A as AnimationConfig, L as LineStyleConfig, c as RegionsConfig, d as ThreatMapTheme, e as AggregationConfig, a as RegionIndex, f as Attack, h as Threat, I as IntensityScale, S as Severity, i as ResolvedRegion, j as AggregationGranularity, k as LatLng, m as AttackLocation } from './regions-Bsys6EFr.cjs';
3
+ export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverityFn, C as Color, E as EasingName, G as GeoData, q as GeoFeature, r as GeoFeatureCollection, s as GeoGeometry, t as GeoProjectionLike, P as ProjectionName, u as ProjectionSpec, v as RegionCode, R as RegionEntry, w as RegionKind, x as RegionRenderContext, y as RegionRenderer, z as ThreatMapError, B as ThreatRenderContext, D as ThreatRenderer, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-Bsys6EFr.cjs';
3
4
 
4
5
  /**
5
6
  * The `<ThreatMap>` component.
@@ -37,7 +38,7 @@ export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverit
37
38
  * />
38
39
  * ```
39
40
  */
40
- declare function ThreatMap<TMeta = unknown>(props: ThreatMapProps<TMeta>): JSX.Element;
41
+ declare function ThreatMap<TMeta = unknown>(props: ThreatMapProps<TMeta>): ReactElement;
41
42
 
42
43
  /**
43
44
  * Default theme and configuration objects.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { T as ThreatMapProps, A as AnimationConfig, L as LineStyleConfig, c as RegionsConfig, d as ThreatMapTheme, e as AggregationConfig, a as RegionIndex, f as Attack, h as Threat, I as IntensityScale, S as Severity, i as ResolvedRegion, j as AggregationGranularity, k as LatLng, m as AttackLocation } from './regions-neHSPgtu.js';
2
- export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverityFn, C as Color, E as EasingName, G as GeoData, q as GeoFeature, r as GeoFeatureCollection, s as GeoGeometry, t as GeoProjectionLike, P as ProjectionName, u as ProjectionSpec, v as RegionCode, R as RegionEntry, w as RegionKind, x as RegionRenderContext, y as RegionRenderer, z as ThreatMapError, B as ThreatRenderContext, D as ThreatRenderer, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-neHSPgtu.js';
1
+ import { ReactElement } from 'react';
2
+ import { T as ThreatMapProps, A as AnimationConfig, L as LineStyleConfig, c as RegionsConfig, d as ThreatMapTheme, e as AggregationConfig, a as RegionIndex, f as Attack, h as Threat, I as IntensityScale, S as Severity, i as ResolvedRegion, j as AggregationGranularity, k as LatLng, m as AttackLocation } from './regions-Bsys6EFr.js';
3
+ export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverityFn, C as Color, E as EasingName, G as GeoData, q as GeoFeature, r as GeoFeatureCollection, s as GeoGeometry, t as GeoProjectionLike, P as ProjectionName, u as ProjectionSpec, v as RegionCode, R as RegionEntry, w as RegionKind, x as RegionRenderContext, y as RegionRenderer, z as ThreatMapError, B as ThreatRenderContext, D as ThreatRenderer, U as UNKNOWN_REGION, g as getRegionById, l as listRegions, b as lookupRegionCode } from './regions-Bsys6EFr.js';
3
4
 
4
5
  /**
5
6
  * The `<ThreatMap>` component.
@@ -37,7 +38,7 @@ export { n as AggregationGroupBy, o as AggregationKeyFn, p as AggregationSeverit
37
38
  * />
38
39
  * ```
39
40
  */
40
- declare function ThreatMap<TMeta = unknown>(props: ThreatMapProps<TMeta>): JSX.Element;
41
+ declare function ThreatMap<TMeta = unknown>(props: ThreatMapProps<TMeta>): ReactElement;
41
42
 
42
43
  /**
43
44
  * Default theme and configuration objects.
@@ -1,3 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+
1
3
  /**
2
4
  * Public data types for `react-threat-map`.
3
5
  *
@@ -6,6 +8,7 @@
6
8
  *
7
9
  * @packageDocumentation
8
10
  */
11
+
9
12
  /**
10
13
  * A raw geographic coordinate in degrees (WGS84).
11
14
  *
@@ -651,7 +654,7 @@ interface ThreatMapProps<TMeta = unknown> {
651
654
  /** Applied to the wrapper element. */
652
655
  readonly className?: string;
653
656
  /** Applied to the wrapper element. The canvases fill it. */
654
- readonly style?: React.CSSProperties;
657
+ readonly style?: CSSProperties;
655
658
  /** Accessible label for the map. Default `"Cyberattack threat map"`. */
656
659
  readonly ariaLabel?: string;
657
660
  }
@@ -1,3 +1,5 @@
1
+ import { CSSProperties } from 'react';
2
+
1
3
  /**
2
4
  * Public data types for `react-threat-map`.
3
5
  *
@@ -6,6 +8,7 @@
6
8
  *
7
9
  * @packageDocumentation
8
10
  */
11
+
9
12
  /**
10
13
  * A raw geographic coordinate in degrees (WGS84).
11
14
  *
@@ -651,7 +654,7 @@ interface ThreatMapProps<TMeta = unknown> {
651
654
  /** Applied to the wrapper element. */
652
655
  readonly className?: string;
653
656
  /** Applied to the wrapper element. The canvases fill it. */
654
- readonly style?: React.CSSProperties;
657
+ readonly style?: CSSProperties;
655
658
  /** Accessible label for the map. Default `"Cyberattack threat map"`. */
656
659
  readonly ariaLabel?: string;
657
660
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-threat-map",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A React component that renders animated cyberattack threats on a static world map, with intelligent per-region aggregation and first-class US state support.",
5
5
  "keywords": [
6
6
  "react",
@@ -64,7 +64,7 @@
64
64
  "example": "npm --prefix examples/demo run dev"
65
65
  },
66
66
  "peerDependencies": {
67
- "react": ">=18.0.0"
67
+ "react": ">=16.14.0"
68
68
  },
69
69
  "dependencies": {
70
70
  "d3-geo": "^3.1.1",