@octanejs/react-map-gl 0.0.23 → 0.0.25

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
@@ -72,10 +72,9 @@ render nothing, or first render after mount all behave as they do upstream. The
72
72
  one difference: a child that stays truthy while never rendering anything gets
73
73
  Mapbox's default pin here, where upstream leaves an empty, invisible element.
74
74
 
75
- **Teardown is not synchronous with unmount.** Effect cleanups run on the passive
76
- drain that follows `root.unmount()`, so `map.remove()` — and with it the WebGL
77
- context and worker pool — happens one drain later. Do not assume the map's
78
- resources are released the instant `unmount()` returns.
75
+ **Root teardown releases resources synchronously.** `root.unmount()` drains
76
+ effect cleanups, so `map.remove()` releases the WebGL context and worker pool
77
+ before the call returns.
79
78
 
80
79
  **Out of scope.** `react-map-gl/mapbox-legacy` (mapbox-gl v1) and
81
80
  `@vis.gl/react-maplibre`.
package/UPSTREAM.md CHANGED
@@ -193,12 +193,7 @@ Four, two of them recorded in `audit/react-parity.json` and bound to a case:
193
193
  2. **`react-map-gl-refs-as-props`** — `forwardRef` does not exist in Octane, so
194
194
  `Map`, `Marker`, `Popup` and `GeolocateControl` take `ref` as a plain prop.
195
195
  `<Map ref={mapRef} />` is unchanged for consumers.
196
- 3. **Teardown timing** — effect cleanups run on the passive drain after
197
- `root.unmount()`, not inside it, so the map's WebGL context and workers are
198
- released one drain later. This is an Octane runtime property rather than a
199
- binding behavior and no parity lane observes it, so it is deliberately not a
200
- manifest divergence; it is pinned by `tests/runtime/lifecycle.test.ts`.
201
- 4. **`Marker` element chosen from rendered output** — upstream asks
196
+ 3. **`Marker` element chosen from rendered output** — upstream asks
202
197
  `React.Children.forEach` whether it was handed a truthy child and, if so,
203
198
  gives the marker its own element to portal into. A `.tsrx` children block is
204
199
  an opaque render function, and evaluating it to look inside would re-run any
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/react-map-gl",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "mapbox-gl": ">=3.5.0",
39
- "octane": "0.1.51"
39
+ "octane": "^0.1.51 || ^0.2.0 || ^0.3.0"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "mapbox-gl": {
@@ -45,16 +45,16 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@mapbox/point-geometry": "1.1.0",
48
- "@tsrx/react": "^0.2.61",
48
+ "@tsrx/react": "^0.3.0",
49
49
  "@types/react": "^19.2.17",
50
50
  "@types/react-dom": "^19.2.3",
51
51
  "@vis.gl/react-mapbox": "8.1.2",
52
52
  "esbuild": "^0.28.1",
53
53
  "mapbox-gl": "3.9.0",
54
- "react": "^19.2.7",
55
- "react-dom": "^19.2.7",
54
+ "react": "19.2.7",
55
+ "react-dom": "19.2.7",
56
56
  "vitest": "^4.1.10",
57
- "octane": "0.1.51"
57
+ "octane": "0.3.0"
58
58
  },
59
59
  "scripts": {
60
60
  "test": "vitest run --root ../.. --project react-map-gl"
@@ -164,10 +164,10 @@ export function Map(props: MapProps) @{
164
164
  // `Marker` and `Popup` already reach their library-owned elements this way.
165
165
  <div id={props.id} ref={containerRef} style={style}>
166
166
  @if (mapInstance) {
167
- <MapContext.Provider value={contextValue}>{createPortal(
167
+ <MapContext value={contextValue}>{createPortal(
168
168
  props.children,
169
169
  childContainerRef.current!,
170
- )}</MapContext.Provider>
170
+ )}</MapContext>
171
171
  }
172
172
  </div>
173
173
  }
@@ -140,7 +140,7 @@ export function Source(props: SourceProps) @{
140
140
 
141
141
  <>
142
142
  @if (source) {
143
- <SourceContext.Provider value={id}>{props.children}</SourceContext.Provider>
143
+ <SourceContext value={id}>{props.children}</SourceContext>
144
144
  }
145
145
  </>
146
146
  }
@@ -38,13 +38,13 @@ export function MapProvider(props: { children?: MapChildren }) @{
38
38
  });
39
39
  }, []);
40
40
 
41
- <MountedMapsContext.Provider
41
+ <MountedMapsContext
42
42
  value={{
43
43
  maps,
44
44
  onMapMount,
45
45
  onMapUnmount,
46
46
  }}
47
- >{props.children}</MountedMapsContext.Provider>
47
+ >{props.children}</MountedMapsContext>
48
48
  }
49
49
 
50
50
  export type MapCollection = {