@tileflow/svelte 0.1.0-alpha.27 → 0.1.0-alpha.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/svelte",
3
- "version": "0.1.0-alpha.27",
3
+ "version": "0.1.0-alpha.28",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Svelte component for rendering Tileflow maps with MapLibre.",
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@tileflow/core": ">=0.1.0-alpha.30 <0.1.0-beta.0",
47
+ "@tileflow/core": ">=0.1.0-alpha.32 <0.1.0-beta.0",
48
48
  "@tileflow/interactions": ">=0.1.0-alpha.4 <0.1.0-beta.0"
49
49
  },
50
50
  "peerDependencies": {
@@ -52,8 +52,8 @@
52
52
  "svelte": ">=5 <6"
53
53
  },
54
54
  "devDependencies": {
55
- "maplibre-gl": "6.9.0",
56
- "svelte": "^5.43.17",
55
+ "maplibre-gl": "6.13.0",
56
+ "svelte": "^5.57.2",
57
57
  "svelte-check": "^4.3.4"
58
58
  },
59
59
  "scripts": {
@@ -192,6 +192,7 @@
192
192
  });
193
193
  $: themeBlendKey = themeBlend ? JSON.stringify(themeBlend.themes) : undefined;
194
194
  $: themeBlendPosition = themeBlend?.position;
195
+ $: themeBlendHold = themeBlend?.hold === true;
195
196
  $: resolvedThemeName = themeResolution.name;
196
197
  $: manifestView = resolveTileflowRuntimeView({manifestMap});
197
198
  $: manifestCenter = normalizeTileflowRuntimeCenter(manifestView.center);
@@ -307,6 +308,7 @@
307
308
  $: if (mounted) {
308
309
  blendStyles;
309
310
  themeBlendPosition;
311
+ themeBlendHold;
310
312
  void switchBlend();
311
313
  }
312
314
 
@@ -579,8 +581,6 @@
579
581
  pitch: resolvedPitch,
580
582
  style: runtime.style as StyleSpecification | string,
581
583
  transformRequest: createTileflowTransformRequest({
582
- always: true,
583
- asyncAnalyticsTiming: 'request',
584
584
  getAnalytics: () => resolvedAnalytics,
585
585
  sessionController: session,
586
586
  sessionId: session.sessionId,
@@ -784,7 +784,7 @@
784
784
  if (!themeController || !blendStyles || position === undefined) return;
785
785
  if (runtimeStyle) activeRuntimeResource = runtimeStyle;
786
786
  const result = await themeController.setBlend(
787
- {position, themes: blendStyles},
787
+ {hold: themeBlendHold, position, themes: blendStyles},
788
788
  {transition: themeTransition},
789
789
  );
790
790
  if (result.status === 'failed') {
@@ -1035,11 +1035,7 @@
1035
1035
  }
1036
1036
 
1037
1037
  type BridgeInteractionDiagnosticSource =
1038
- | 'annotation-runtime'
1039
- | 'portal'
1040
- | 'renderers'
1041
- | 'semantic-runtime'
1042
- | 'state';
1038
+ 'annotation-runtime' | 'portal' | 'renderers' | 'semantic-runtime' | 'state';
1043
1039
 
1044
1040
  function setBridgeInteractionDiagnostic(
1045
1041
  source: BridgeInteractionDiagnosticSource,
package/src/index.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import type {Map as MapLibreMap, MapOptions as MapLibreMapOptions} from 'maplibre-gl';
2
2
  import type {Snippet, SvelteComponentTyped} from 'svelte';
3
- import type {TileflowThemeTransition, TileflowThemeTransitionOptions} from '@tileflow/core/browser';
3
+ import type {
4
+ TileflowBrowserThemeBlendSelection,
5
+ TileflowThemeTransition,
6
+ TileflowThemeTransitionOptions,
7
+ } from '@tileflow/core/browser';
4
8
  import type {
5
9
  TileflowAnalytics,
6
10
  TileflowRuntimeSource,
7
- TileflowThemeBlendSelection,
8
11
  TileflowThemeSelection,
9
12
  } from '@tileflow/core/runtime';
10
13
  import type {
@@ -48,9 +51,10 @@ type TileflowMapBaseProps = {
48
51
  theme?: TileflowThemeSelection;
49
52
  /**
50
53
  * Shows a continuous blend of the map's themes instead of `theme`. Moving `position` changes the
51
- * map at once; changing `themes` prepares a new blend.
54
+ * map at once; changing `themes` prepares a new blend. `hold` keeps labels, icons, and mixed
55
+ * artwork back during a camera move; clearing it brings them in at once.
52
56
  */
53
- themeBlend?: TileflowThemeBlendSelection;
57
+ themeBlend?: TileflowBrowserThemeBlendSelection;
54
58
  /** Cross-fades theme changes, including entering and leaving a blend. */
55
59
  themeTransition?: TileflowThemeTransitionOptions;
56
60
  zoom?: number;
@@ -1,6 +1,6 @@
1
+ import {validateTileflowBrowserThemeBlendSelection} from '@tileflow/core/browser';
1
2
  import {
2
3
  validateTileflowRuntimeSource,
3
- validateTileflowThemeBlendSelection,
4
4
  validateTileflowThemeSelection,
5
5
  } from '@tileflow/core/runtime';
6
6
 
@@ -20,10 +20,13 @@ export function validateTileflowMapStyleInputs(input) {
20
20
  if (input.theme !== undefined && !validateTileflowThemeSelection(input.theme)) {
21
21
  return {error: 'theme must be a concrete portable theme name or "system"', ok: false};
22
22
  }
23
- if (input.themeBlend !== undefined && !validateTileflowThemeBlendSelection(input.themeBlend)) {
23
+ if (
24
+ input.themeBlend !== undefined &&
25
+ !validateTileflowBrowserThemeBlendSelection(input.themeBlend)
26
+ ) {
24
27
  return {
25
28
  error:
26
- 'themeBlend must name two to eight concrete themes and a position from 0 to themes.length - 1',
29
+ 'themeBlend must name two to eight concrete themes, a position from 0 to themes.length - 1, and an optional boolean hold',
27
30
  ok: false,
28
31
  };
29
32
  }