@squawk/airspace 0.6.3 → 0.7.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1><img src="../../../assets/squawk-logo.svg" alt="squawk logo" width="48" height="48" style="vertical-align: middle">&nbsp; @squawk/airspace</h1>
2
2
 
3
- [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](../../LICENSE.md) [![npm](https://img.shields.io/npm/v/@squawk/airspace)](https://www.npmjs.com/package/@squawk/airspace) ![TypeScript](https://img.shields.io/badge/TypeScript-blue?logo=typescript&logoColor=white)
3
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](../../../LICENSE.md) [![npm](https://img.shields.io/npm/v/@squawk/airspace)](https://www.npmjs.com/package/@squawk/airspace) ![TypeScript](https://img.shields.io/badge/TypeScript-blue?logo=typescript&logoColor=white)
4
4
 
5
5
  Pure logic library for querying US airspace geometry. Given a position and altitude,
6
6
  returns all applicable airspace designations. Contains no bundled data - accepts a
@@ -50,6 +50,20 @@ import { createAirspaceResolver } from '@squawk/airspace';
50
50
  const resolver = createAirspaceResolver({ data: myGeoJson });
51
51
  ```
52
52
 
53
+ ## Browser / SPA usage
54
+
55
+ The resolver factory has no Node-specific imports and ships an explicit `/browser` subpath for SPAs and edge runtimes. Pair it with `@squawk/airspace-data/browser`:
56
+
57
+ ```typescript
58
+ import { loadUsBundledAirspace } from '@squawk/airspace-data/browser';
59
+ import { createAirspaceResolver } from '@squawk/airspace/browser';
60
+
61
+ const dataset = await loadUsBundledAirspace();
62
+ const resolver = createAirspaceResolver({ data: dataset });
63
+ ```
64
+
65
+ The `/browser` entry is identical to the main entry; the separate subpath exists so browser support is an explicit, `publint`-verified part of the public API surface.
66
+
53
67
  ## How it works
54
68
 
55
69
  `createAirspaceResolver` parses the GeoJSON FeatureCollection at initialization and
@@ -1 +1 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot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;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,8DAA8D;IAC9D,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,eAAe,EAAE,CAAC;IAE/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,GAAG,eAAe,EAAE,CAAC;IAEpF;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,EAAE,CAAC;CACxE;AAoDD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,uBAAuB,GAAG,gBAAgB,CAmEzF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squawk/airspace",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Pure logic library for querying US airspace geometry by position and altitude",
6
6
  "author": "Neil Cochran",
@@ -21,6 +21,10 @@
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",
23
23
  "import": "./dist/index.js"
24
+ },
25
+ "./browser": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
24
28
  }
25
29
  },
26
30
  "files": [
@@ -35,12 +39,12 @@
35
39
  "lint:pack": "publint && attw --pack . --profile esm-only"
36
40
  },
37
41
  "dependencies": {
38
- "@squawk/geo": "^0.4.1",
39
- "@squawk/types": "^0.7.1",
42
+ "@squawk/geo": "^0.4.2",
43
+ "@squawk/types": "^0.7.2",
40
44
  "@types/geojson": "^7946.0.16"
41
45
  },
42
46
  "devDependencies": {
43
- "@squawk/airspace-data": "^0.5.1",
47
+ "@squawk/airspace-data": "^0.5.2",
44
48
  "@types/node": "^25.6.0"
45
49
  },
46
50
  "keywords": [