@tileflow/svelte 0.1.0-alpha.17 → 0.1.0-alpha.18

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
@@ -26,6 +26,10 @@ Tileflow resolves from the map name, manifest, or explicit style props. Direct
26
26
  Tileflow props such as `center`, `zoom`, and `interactive` take priority when
27
27
  provided.
28
28
 
29
+ Hosted maps automatically preflight a short-lived commercial session grant before eligible
30
+ resources. Setting `analytics={{enabled: false}}` disables the optional beacon only; it does not
31
+ remove hosted authorization or override a user `mapOptions.transformRequest` callback.
32
+
29
33
  ## Headless capture readiness
30
34
 
31
35
  Use `captureId` to disambiguate repeated named maps:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/svelte",
3
- "version": "0.1.0-alpha.17",
3
+ "version": "0.1.0-alpha.18",
4
4
  "description": "Svelte component for rendering Tileflow maps with MapLibre.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -42,7 +42,7 @@
42
42
  "access": "public"
43
43
  },
44
44
  "dependencies": {
45
- "@tileflow/core": ">=0.1.0-alpha.17 <0.1.0-beta.0"
45
+ "@tileflow/core": ">=0.1.0-alpha.18 <0.1.0-beta.0"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "maplibre-gl": ">=5",
@@ -7,7 +7,7 @@
7
7
  } from 'maplibre-gl';
8
8
  import {createEventDispatcher, onMount, tick} from 'svelte';
9
9
  import {
10
- createTileflowSessionId,
10
+ createTileflowSessionController,
11
11
  defaultTileflowManifestUrl,
12
12
  loadTileflowManifest,
13
13
  mergeTileflowAnalytics,
@@ -75,8 +75,6 @@
75
75
  let readinessRunId = 0;
76
76
 
77
77
  const dispatch = createEventDispatcher<{load: MapLibreMap}>();
78
- const sessionId = createTileflowSessionId();
79
- const sessionStarter = createTileflowSessionStarter({sessionId, source: 'svelte'});
80
78
  const markerController = createTileflowMarkerController<
81
79
  MapLibreMap,
82
80
  TileflowMapMarker,
@@ -270,6 +268,12 @@
270
268
  }
271
269
 
272
270
  const runtime = runtimeStyle;
271
+ const session = createTileflowSessionController({source: 'svelte'});
272
+ const sessionStarter = createTileflowSessionStarter({
273
+ getSessionId: () => session.sessionId,
274
+ sessionId: session.sessionId,
275
+ source: 'svelte',
276
+ });
273
277
  const maplibreMap = new maplibregl.Map({
274
278
  ...mapOptions,
275
279
  attributionControl: mapOptions?.attributionControl ?? {compact: true},
@@ -281,7 +285,8 @@
281
285
  always: true,
282
286
  asyncAnalyticsTiming: 'request',
283
287
  getAnalytics: () => resolvedAnalytics,
284
- sessionId,
288
+ sessionController: session,
289
+ sessionId: session.sessionId,
285
290
  transformRequest: mapOptions?.transformRequest ?? undefined,
286
291
  }),
287
292
  zoom: resolvedZoom,