@tileflow/svelte 0.1.0-alpha.20 → 0.1.0-alpha.22

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
@@ -65,8 +65,11 @@ or evaluating MapLibre. All environments follow the same published manifest cont
65
65
  Hosted maps automatically preflight a short-lived commercial session grant before eligible
66
66
  resources. Setting `analytics={{enabled: false}}` disables the optional beacon only; it does not
67
67
  remove hosted authorization or override a user `mapOptions.transformRequest` callback.
68
+ Use `analytics={{surfaceId: 'store-locator'}}` when the same Map is embedded in several stable
69
+ product locations. Missing or invalid Surface IDs become `default`; do not use URLs, branches,
70
+ random instance IDs, or user IDs.
68
71
  Direct Tileflow World maps keep early `GRACE` silent, show a compact accessible owner-action pill
69
- when late `GRACE` is activated, and show a stronger banner in `CLAIM_REQUIRED`. Missing tiles and
72
+ when late `GRACE` is activated, and show a stronger banner in `MANAGED_REQUIRED`. Missing tiles and
70
73
  MapLibre failures do not remove that recovery path.
71
74
 
72
75
  ## Annotations and overlays
@@ -145,8 +148,8 @@ owned by the shared MapLibre interaction runtime.
145
148
  />
146
149
  ```
147
150
 
148
- `annotations` and the legacy `markers` prop are mutually exclusive. So are controlled
149
- `interactionState` and uncontrolled `defaultInteractionState`. `interactions` binds tooltips and
151
+ `annotations` is the only application-owned marker input. Controlled `interactionState` and
152
+ uncontrolled `defaultInteractionState` are mutually exclusive. `interactions` binds tooltips and
150
153
  popups to semantic POIs exposed by the compiled style metadata; applications select the stable
151
154
  `poi` domain and optional categories rather than physical style-layer IDs.
152
155
 
@@ -161,8 +164,8 @@ with a POI popup (or the reverse) closes the previous owner before opening the n
161
164
  order remains `popup:close` followed by `popup:open`.
162
165
 
163
166
  Annotations and semantic interactions are interactive-only. The TypeScript API excludes
164
- annotations, legacy markers, interactions, interaction state, snippets, and interaction callbacks
165
- from the `mode="image"` branch. Untyped JavaScript that supplies them still receives an
167
+ annotations, interactions, interaction state, snippets, and interaction callbacks from the
168
+ `mode="image"` branch. Untyped JavaScript that supplies them still receives an
166
169
  `UNSUPPORTED_MODE` diagnostic and capture readiness `error`, rather than pretending the static image
167
170
  contains live overlays.
168
171
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/svelte",
3
- "version": "0.1.0-alpha.20",
3
+ "version": "0.1.0-alpha.22",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Svelte component for rendering Tileflow maps with MapLibre.",
6
6
  "type": "module",
@@ -25,10 +25,7 @@
25
25
  "types": "./src/index.d.ts",
26
26
  "files": [
27
27
  "src",
28
- "LICENSE",
29
- "NOTICE",
30
- "GENERATED_OUTPUT_LICENSE.md",
31
- "TRADEMARKS.md"
28
+ "LICENSE"
32
29
  ],
33
30
  "exports": {
34
31
  ".": {
@@ -47,8 +44,8 @@
47
44
  "access": "public"
48
45
  },
49
46
  "dependencies": {
50
- "@tileflow/core": ">=0.1.0-alpha.21 <0.1.0-beta.0",
51
- "@tileflow/interactions": ">=0.1.0-alpha.0 <0.1.0-beta.0"
47
+ "@tileflow/core": ">=0.1.0-alpha.24 <0.1.0-beta.0",
48
+ "@tileflow/interactions": ">=0.1.0-alpha.2 <0.1.0-beta.0"
52
49
  },
53
50
  "peerDependencies": {
54
51
  "maplibre-gl": ">=5 <7",
@@ -24,7 +24,6 @@
24
24
  resolveTileflowRuntimeView,
25
25
  resolveTileflowStaticImageUrl,
26
26
  shouldLoadTileflowManifest,
27
- type TileflowMapMarker,
28
27
  type TileflowRuntimeManifestMap,
29
28
  } from '@tileflow/core/runtime';
30
29
  import {
@@ -36,6 +35,7 @@
36
35
  getTileflowSystemColorScheme,
37
36
  loadTileflowStyleFonts,
38
37
  registerTileflowContourProtocol,
38
+ registerTileflowPmtilesProtocol,
39
39
  registerTileflowWorldRequestBridge,
40
40
  subscribeTileflowSystemColorScheme,
41
41
  type TileflowFairUseNoticeController,
@@ -61,7 +61,6 @@
61
61
  createTileflowMapLibreDomRuntime,
62
62
  createTileflowMapLibreInteractionCoordinator,
63
63
  createTileflowMapLibreSemanticDomRuntime,
64
- normalizeTileflowLegacyMarkers,
65
64
  type TileflowMapLibreDomRenderTarget,
66
65
  type TileflowMapLibreDomRuntime,
67
66
  type TileflowMapLibreInteractionCoordinator,
@@ -89,7 +88,6 @@
89
88
  export let interactionState: TileflowMapProps['interactionState'] = undefined;
90
89
  export let mapOptions: TileflowMapProps['mapOptions'] = undefined;
91
90
  export let marker: TileflowMapProps['marker'] = undefined;
92
- export let markers: TileflowMapProps['markers'] = undefined;
93
91
  export let mode: NonNullable<TileflowMapProps['mode']> = 'interactive';
94
92
  export let onInteractionDiagnostic: TileflowMapProps['onInteractionDiagnostic'] = undefined;
95
93
  export let onInteractionEvent: TileflowMapProps['onInteractionEvent'] = undefined;
@@ -137,7 +135,6 @@
137
135
  let interactionReadinessTargetKeys: readonly string[] = [];
138
136
  let hadInteractionErrors = false;
139
137
  let interactionRuntimesDisposing = false;
140
- let legacyTitles: ReadonlyMap<string, string> = new Map();
141
138
  let mapResizeObserver: ResizeObserver | null = null;
142
139
  let mapWorldRequestBridge: TileflowWorldRequestBridge | null = null;
143
140
  let themeController: TileflowThemeController | null = null;
@@ -248,7 +245,7 @@
248
245
  ? mapCaptureState
249
246
  : 'loading';
250
247
  $: frameStyle = `height: ${formatHeight(height)}; min-height: 240px; overflow: hidden; position: relative; width: 100%;`;
251
- $: annotationResolution = resolveAnnotationInput(annotations, markers);
248
+ $: annotationResolution = resolveAnnotationInput(annotations);
252
249
  $: interactionBindingResolution = resolveInteractionBindingInput(interactions);
253
250
  $: interactionStateDiagnostics = validateInteractionStateInput(
254
251
  interactionState,
@@ -256,7 +253,6 @@
256
253
  );
257
254
  $: hasInteractionConfiguration =
258
255
  annotations !== undefined ||
259
- markers !== undefined ||
260
256
  interactions !== undefined ||
261
257
  interactionState !== undefined ||
262
258
  defaultInteractionState !== undefined ||
@@ -331,7 +327,6 @@
331
327
 
332
328
  $: if (mounted) {
333
329
  annotations;
334
- markers;
335
330
  syncAnnotations();
336
331
  }
337
332
 
@@ -577,6 +572,7 @@
577
572
  });
578
573
  mapFairUseNotice = attachTileflowFairUseNotice(targetContainer);
579
574
  registerTileflowContourProtocol({addProtocol: maplibregl.addProtocol});
575
+ registerTileflowPmtilesProtocol({addProtocol: maplibregl.addProtocol});
580
576
  mapWorldRequestBridge = registerTileflowWorldRequestBridge({
581
577
  addProtocol: maplibregl.addProtocol,
582
578
  onNotice: mapFairUseNotice.update,
@@ -630,7 +626,7 @@
630
626
  TileflowAnnotation
631
627
  >({
632
628
  createMarker({annotation, element}) {
633
- element.title = legacyTitles.get(annotation.id) ?? annotation.ariaLabel;
629
+ element.title = annotation.ariaLabel;
634
630
  return new maplibregl.Marker({element});
635
631
  },
636
632
  createOverlay({container: overlayContainer, kind}) {
@@ -650,7 +646,7 @@
650
646
  map: maplibreMap,
651
647
  onInteractionStateChange: interactionCoordinator.requestInteractionState,
652
648
  updateMarker(_markerInstance, {annotation, element}) {
653
- element.title = legacyTitles.get(annotation.id) ?? annotation.ariaLabel;
649
+ element.title = annotation.ariaLabel;
654
650
  },
655
651
  });
656
652
  annotationRuntime = annotationInteractionsForMap;
@@ -823,7 +819,6 @@
823
819
  }
824
820
 
825
821
  function syncAnnotations() {
826
- legacyTitles = annotationResolution.titles;
827
822
  if (!annotationRuntime) return;
828
823
 
829
824
  try {
@@ -942,7 +937,6 @@
942
937
  annotations: readonly TileflowAnnotation[];
943
938
  diagnostics: readonly TileflowInteractionDiagnostic[];
944
939
  ok: boolean;
945
- titles: ReadonlyMap<string, string>;
946
940
  }>;
947
941
 
948
942
  type InteractionBindingResolution = Readonly<{
@@ -953,39 +947,18 @@
953
947
 
954
948
  function resolveAnnotationInput(
955
949
  nextAnnotations: readonly TileflowAnnotation[] | undefined,
956
- nextMarkers: readonly TileflowMapMarker[] | undefined,
957
950
  ): AnnotationResolution {
958
- if (nextAnnotations !== undefined && nextMarkers !== undefined) {
959
- return {
960
- annotations: [],
961
- diagnostics: [
962
- createInteractionDiagnostic(
963
- 'INVALID_DOCUMENT',
964
- 'The annotations and legacy markers props are mutually exclusive.',
965
- ),
966
- ],
967
- ok: false,
968
- titles: new Map(),
969
- };
970
- }
971
-
972
- const normalized = normalizeTileflowLegacyMarkers(nextMarkers ?? []);
973
- const candidates = nextAnnotations ?? normalized.annotations;
974
- const titles =
975
- nextAnnotations === undefined
976
- ? normalized.titles
977
- : new Map(nextAnnotations.map((annotation) => [annotation.id, annotation.ariaLabel]));
951
+ const candidates = nextAnnotations ?? [];
978
952
  const validation = validateTileflowAnnotations(candidates);
979
953
  if (!validation.ok) {
980
954
  return {
981
955
  annotations: [],
982
956
  diagnostics: validation.diagnostics,
983
957
  ok: false,
984
- titles,
985
958
  };
986
959
  }
987
960
 
988
- return {annotations: candidates, diagnostics: [], ok: true, titles};
961
+ return {annotations: candidates, diagnostics: [], ok: true};
989
962
  }
990
963
 
991
964
  function resolveInteractionBindingInput(
package/src/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import type {Snippet, SvelteComponentTyped} from 'svelte';
3
3
  import type {TileflowThemeTransition} from '@tileflow/core/browser';
4
4
  import type {
5
5
  TileflowAnalytics,
6
- TileflowMapMarker,
7
6
  TileflowRuntimeSource,
8
7
  TileflowThemeSelection,
9
8
  } from '@tileflow/core/runtime';
@@ -21,12 +20,9 @@ export type TileflowMapMode = 'interactive' | 'image';
21
20
  export type TileflowMapOptions = Omit<MapLibreMapOptions, 'container' | 'style'>;
22
21
  export type TileflowMapSource = TileflowRuntimeSource;
23
22
 
24
- export type TileflowMapMarkerSnippet<TAnnotation extends TileflowAnnotation = TileflowAnnotation> =
25
- Snippet<[context: TileflowAnnotationViewContext<TAnnotation>]>;
26
-
27
23
  export type TileflowMapAnnotationSnippet<
28
24
  TAnnotation extends TileflowAnnotation = TileflowAnnotation,
29
- > = TileflowMapMarkerSnippet<TAnnotation>;
25
+ > = Snippet<[context: TileflowAnnotationViewContext<TAnnotation>]>;
30
26
 
31
27
  export type TileflowMapInteractionSnippet<
32
28
  TAnnotation extends TileflowAnnotation = TileflowAnnotation,
@@ -50,15 +46,9 @@ type TileflowMapBaseProps = {
50
46
 
51
47
  export type TileflowMapAnnotationProps<
52
48
  TAnnotation extends TileflowAnnotation = TileflowAnnotation,
53
- > =
54
- | {
55
- annotations?: readonly TAnnotation[];
56
- markers?: never;
57
- }
58
- | {
59
- annotations?: never;
60
- markers?: readonly TileflowMapMarker[];
61
- };
49
+ > = {
50
+ annotations?: readonly TAnnotation[];
51
+ };
62
52
 
63
53
  export type TileflowMapInteractionStateProps =
64
54
  | {
@@ -78,7 +68,7 @@ type TileflowMapInteractiveProps<TAnnotation extends TileflowAnnotation> =
78
68
  TileflowMapAnnotationProps<TAnnotation> &
79
69
  TileflowMapInteractionStateProps & {
80
70
  interactions?: readonly TileflowInteractionBinding[];
81
- marker?: TileflowMapMarkerSnippet<TAnnotation>;
71
+ marker?: TileflowMapAnnotationSnippet<TAnnotation>;
82
72
  mode?: 'interactive';
83
73
  onInteractionDiagnostic?: (diagnostic: TileflowInteractionDiagnostic) => void;
84
74
  onInteractionEvent?: (event: TileflowInteractionEvent<TAnnotation>) => void;
@@ -93,7 +83,6 @@ type TileflowMapImageProps = {
93
83
  interactions?: never;
94
84
  interactionState?: never;
95
85
  marker?: never;
96
- markers?: never;
97
86
  mode: 'image';
98
87
  onInteractionDiagnostic?: never;
99
88
  onInteractionEvent?: never;
@@ -1,21 +0,0 @@
1
- # Tileflow generated-output grant
2
-
3
- In addition to the rights granted by the Apache License, Version 2.0, Tileflow.dev contributors
4
- grant recipients a perpetual, worldwide, non-exclusive, no-charge, royalty-free right to use,
5
- reproduce, modify, display, perform, distribute, sublicense, and commercialize the Tileflow-owned
6
- parts of output generated by this SDK.
7
-
8
- Covered output includes compiled map styles, manifests, receipts, sprites, glyph artifacts, static
9
- render descriptions, and other build artifacts produced from Tileflow maps or application maps.
10
- Original Tileflow map definitions, icons, and patterns distributed by `@tileflow/maps` may likewise
11
- be used, modified, embedded, deployed, and redistributed as part of personal or commercial maps and
12
- applications.
13
-
14
- This grant does not relicense third-party software, fonts, icons, map data, datasets, imagery, or
15
- other input material. Their licenses, attribution requirements, notices, and use restrictions
16
- continue to apply to the relevant source and generated output. You are responsible for having the
17
- rights necessary to process and distribute your own inputs.
18
-
19
- This grant does not provide access to Tileflow hosted services or grant rights in Tileflow names,
20
- logos, or marks. The SDK and generated output are provided without warranties or conditions beyond
21
- those required by applicable law.
package/NOTICE DELETED
@@ -1,9 +0,0 @@
1
- Tileflow SDK
2
- Copyright 2026 Tileflow.dev contributors
3
-
4
- This product includes software and original map artwork developed by Tileflow.dev contributors.
5
-
6
- Third-party materials distributed with a package remain subject to their own license and notice
7
- files. See THIRD_PARTY_NOTICES.md and asset-adjacent license files where present.
8
-
9
- The Tileflow names and marks are not licensed under the Apache License 2.0. See TRADEMARKS.md.
package/TRADEMARKS.md DELETED
@@ -1,10 +0,0 @@
1
- # Tileflow trademarks
2
-
3
- The Apache License, Version 2.0, and the Tileflow generated-output grant do not grant permission to
4
- use the Tileflow name, `tileflow.dev`, logos, service marks, product names, or other Tileflow brand
5
- features except for reasonable and customary use that truthfully describes the origin of the SDK or
6
- compatibility with Tileflow, and for reproducing required notices.
7
-
8
- You may not use Tileflow brand features in a way that suggests sponsorship, endorsement, or an
9
- official Tileflow product when none exists. Third-party names and marks remain the property of their
10
- respective owners.