@squawk/airspace 0.6.4 → 0.7.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.
Files changed (2) hide show
  1. package/README.md +14 -0
  2. package/package.json +7 -3
package/README.md CHANGED
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squawk/airspace",
3
- "version": "0.6.4",
3
+ "version": "0.7.1",
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,8 +39,8 @@
35
39
  "lint:pack": "publint && attw --pack . --profile esm-only"
36
40
  },
37
41
  "dependencies": {
38
- "@squawk/geo": "^0.4.2",
39
- "@squawk/types": "^0.7.2",
42
+ "@squawk/geo": "^0.4.3",
43
+ "@squawk/types": "^0.8.0",
40
44
  "@types/geojson": "^7946.0.16"
41
45
  },
42
46
  "devDependencies": {