@tileflow/react 0.1.0-alpha.33 → 0.1.0-alpha.34

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
@@ -127,6 +127,9 @@ take priority over `mapOptions`, then the manifest view, then shared defaults. `
127
127
  a Tileflow map through its manifest; it has no renderer discriminator or direct-style mode.
128
128
  Tileflow's styles are validated when they are compiled, so `validateStyle` defaults to `false`; pass
129
129
  `true` to validate them again in the browser.
130
+ The map canvas is multisampled by default (`canvasContextAttributes.antialias` is `true`) so the
131
+ thin edges of 3D models stay continuous; other context attributes you pass are kept, and
132
+ `canvasContextAttributes: {antialias: false}` trades that smoothing for lower GPU cost.
130
133
  The obsolete source fields `kind` and `style` are rejected. For a completely unmanaged map, use
131
134
  `maplibre-gl` directly rather than a Tileflow component.
132
135
 
package/dist/index.js CHANGED
@@ -43,6 +43,7 @@ import {
43
43
  attachTileflowFairUseNotice,
44
44
  attachTileflowMap3D,
45
45
  attachTileflowMapLifecycle,
46
+ attachTileflowNauticalLights,
46
47
  attachTileflowNotices,
47
48
  createTileflowSessionStarter,
48
49
  createTileflowThemeController,
@@ -52,7 +53,9 @@ import {
52
53
  registerTileflowContourProtocol,
53
54
  registerTileflowPmtilesProtocol,
54
55
  registerTileflowWorldRequestBridge,
55
- subscribeTileflowSystemColorScheme
56
+ subscribeTileflowSystemColorScheme,
57
+ tileflowCanvasContextAttributes,
58
+ tileflowMaxPitch
56
59
  } from "@tileflow/core/browser";
57
60
  import { normalizeTileflowCaptureId } from "@tileflow/core/capture";
58
61
  import {
@@ -805,6 +808,9 @@ function Map2(props) {
805
808
  });
806
809
  const map = new maplibregl.Map({
807
810
  ...stableMapOptions,
811
+ canvasContextAttributes: tileflowCanvasContextAttributes(
812
+ stableMapOptions?.canvasContextAttributes
813
+ ),
808
814
  container,
809
815
  style: initialRuntimeStyle.style,
810
816
  bearing: bearingRef.current,
@@ -817,6 +823,7 @@ function Map2(props) {
817
823
  },
818
824
  // Tileflow's compiled styles are validated when they are built.
819
825
  validateStyle: stableMapOptions?.validateStyle ?? false,
826
+ maxPitch: stableMapOptions?.maxPitch ?? tileflowMaxPitch,
820
827
  transformRequest
821
828
  });
822
829
  mapRef.current = map;
@@ -824,6 +831,7 @@ function Map2(props) {
824
831
  registerCleanup(() => map.remove());
825
832
  registerCleanup(attachTileflowAtmosphere(map));
826
833
  registerCleanup(attachTileflowNotices(map));
834
+ registerCleanup(attachTileflowNauticalLights(map));
827
835
  const themeController = initialRuntimeStyle.theme === void 0 ? void 0 : createTileflowThemeController({
828
836
  initial: initialRuntimeStyle,
829
837
  map,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/react",
3
- "version": "0.1.0-alpha.33",
3
+ "version": "0.1.0-alpha.34",
4
4
  "license": "Apache-2.0",
5
5
  "description": "React components for rendering Tileflow maps with MapLibre.",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@tileflow/core": ">=0.1.0-alpha.38 <0.1.0-beta.0",
46
+ "@tileflow/core": ">=0.1.0-alpha.39 <0.1.0-beta.0",
47
47
  "@tileflow/interactions": ">=0.1.0-alpha.6 <0.1.0-beta.0",
48
48
  "@tileflow/static": ">=0.1.0-alpha.28 <0.1.0-beta.0"
49
49
  },