@tileflow/vue 0.1.0-alpha.21 → 0.1.0-alpha.23

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
@@ -24,6 +24,23 @@ import {TileflowMap} from '@tileflow/vue';
24
24
  </template>
25
25
  ```
26
26
 
27
+ ## MapLibre 6 worker
28
+
29
+ With MapLibre GL JS 6, configure the application-owned worker once before mounting an interactive
30
+ map. The worker URL must come from the same `maplibre-gl` package installed by the application.
31
+
32
+ ```ts
33
+ // main.ts
34
+ import workerUrl from 'maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url';
35
+ import {configureTileflowMapLibre} from '@tileflow/vue';
36
+
37
+ configureTileflowMapLibre({workerUrl});
38
+ ```
39
+
40
+ This is the Vite setup. Run it before `createApp(...).mount(...)`; `mode="image"` remains
41
+ MapLibre-free. MapLibre GL JS 6.4.1-6.x is supported. Use the `@tileflow/next` or
42
+ `@tileflow/webpack` README for their worker-delivery recipes.
43
+
27
44
  `mapOptions` accepts native MapLibre options except `container` and `style`, which
28
45
  Tileflow resolves from `source`. Direct
29
46
  Tileflow props such as `center`, `zoom`, and `interactive` take priority when
@@ -191,9 +208,9 @@ application capture selects exactly one ready target.
191
208
 
192
209
  ## Compatibility
193
210
 
194
- The supported peer window is Vue 3.3-3.x and MapLibre GL JS 5-6. Compatibility smoke tests install
195
- Vue 3.3.0 with the first release of both MapLibre majors from packed Tileflow tarballs, typecheck a
196
- consumer, and render the image/SSR path while rejecting any MapLibre import. Vue 4 stays outside the
197
- peer range until that matrix passes.
211
+ The supported peer window is Vue 3.3-3.x and MapLibre GL JS 6.4.1-6.x. Compatibility smoke tests
212
+ install Vue 3.3.0 with the exact lower bound and selected current release from packed Tileflow
213
+ tarballs, typecheck a consumer, and render the image/SSR path while rejecting any MapLibre import.
214
+ Vue 4 stays outside the peer range until that matrix passes.
198
215
 
199
216
  Docs: https://tileflow.dev/docs
package/dist/index.d.ts CHANGED
@@ -9,6 +9,12 @@ type TileflowMapStyleSourceProps = {
9
9
  theme?: TileflowThemeSelection;
10
10
  };
11
11
 
12
+ type TileflowMapLibreConfiguration = Readonly<{
13
+ workerUrl: string;
14
+ }>;
15
+ /** Configure the application-owned worker before mounting an interactive Tileflow map. */
16
+ declare function configureTileflowMapLibre(configuration: TileflowMapLibreConfiguration): void;
17
+
12
18
  type TileflowMapMode = 'interactive' | 'image';
13
19
  type TileflowMapOptions = Omit<MapOptions, 'container' | 'style'>;
14
20
  type TileflowMapSource = TileflowRuntimeSource;
@@ -78,4 +84,4 @@ type PublicTileflowMapComponent = PublicTileflowMapStatics & {
78
84
  };
79
85
  declare const TileflowMap: PublicTileflowMapComponent;
80
86
 
81
- export { TileflowMap, type TileflowMapAnnotationSlotContext, type TileflowMapInteractionSlotContext, type TileflowMapMode, type TileflowMapOptions, type TileflowMapProps, type TileflowMapSlots, type TileflowMapSource, TileflowMap as default };
87
+ export { TileflowMap, type TileflowMapAnnotationSlotContext, type TileflowMapInteractionSlotContext, type TileflowMapLibreConfiguration, type TileflowMapMode, type TileflowMapOptions, type TileflowMapProps, type TileflowMapSlots, type TileflowMapSource, configureTileflowMapLibre, TileflowMap as default };
package/dist/index.js CHANGED
@@ -126,8 +126,21 @@ function jsonPointer(path) {
126
126
 
127
127
  // src/maplibre.ts
128
128
  var mapLibrePromise;
129
+ var mapLibre;
130
+ var workerUrl;
131
+ function configureTileflowMapLibre(configuration) {
132
+ const nextWorkerUrl = configuration.workerUrl;
133
+ if (typeof nextWorkerUrl !== "string" || nextWorkerUrl.trim().length === 0) {
134
+ throw new TypeError("Tileflow MapLibre workerUrl must be a non-empty string.");
135
+ }
136
+ if (workerUrl !== void 0 && workerUrl !== nextWorkerUrl) {
137
+ throw new Error("Tileflow MapLibre workerUrl is already configured.");
138
+ }
139
+ workerUrl = nextWorkerUrl;
140
+ mapLibre?.setWorkerUrl(nextWorkerUrl);
141
+ }
129
142
  function loadTileflowMapLibre() {
130
- mapLibrePromise ??= import("maplibre-gl").then(resolveMapLibreModule).catch((error) => {
143
+ mapLibrePromise ??= import("maplibre-gl").then(resolveMapLibreModule).then(configureTileflowMapLibreModule).catch((error) => {
131
144
  mapLibrePromise = void 0;
132
145
  throw error;
133
146
  });
@@ -137,6 +150,11 @@ function resolveMapLibreModule(module) {
137
150
  const defaultExport = module.default;
138
151
  return defaultExport ?? module;
139
152
  }
153
+ function configureTileflowMapLibreModule(maplibregl) {
154
+ if (workerUrl !== void 0) maplibregl.setWorkerUrl(workerUrl);
155
+ mapLibre = maplibregl;
156
+ return maplibregl;
157
+ }
140
158
 
141
159
  // src/style-source.ts
142
160
  import {
@@ -1122,9 +1140,10 @@ function interactionDiagnosticKey(diagnostic) {
1122
1140
  return JSON.stringify([diagnostic.code, diagnostic.message, diagnostic.path, diagnostic.target]);
1123
1141
  }
1124
1142
  function createTileflowVuePoiMap(map) {
1143
+ const poiMap = map;
1125
1144
  return {
1126
1145
  getStyle: () => map.getStyle(),
1127
- on: (event, listener) => map.on(event, listener),
1146
+ on: (event, listener) => poiMap.on(event, listener),
1128
1147
  queryRenderedFeatures(point, options) {
1129
1148
  return map.queryRenderedFeatures(point, {
1130
1149
  layers: [...options.layers]
@@ -1140,5 +1159,6 @@ function createTileflowVuePoiMap(map) {
1140
1159
  }
1141
1160
  export {
1142
1161
  TileflowMap,
1162
+ configureTileflowMapLibre,
1143
1163
  index_default as default
1144
1164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tileflow/vue",
3
- "version": "0.1.0-alpha.21",
3
+ "version": "0.1.0-alpha.23",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Vue component for rendering Tileflow maps with MapLibre.",
6
6
  "type": "module",
@@ -25,10 +25,7 @@
25
25
  "types": "./dist/index.d.ts",
26
26
  "files": [
27
27
  "dist",
28
- "LICENSE",
29
- "NOTICE",
30
- "GENERATED_OUTPUT_LICENSE.md",
31
- "TRADEMARKS.md"
28
+ "LICENSE"
32
29
  ],
33
30
  "exports": {
34
31
  ".": {
@@ -41,17 +38,17 @@
41
38
  "access": "public"
42
39
  },
43
40
  "dependencies": {
44
- "@tileflow/core": ">=0.1.0-alpha.22 <0.1.0-beta.0",
45
- "@tileflow/interactions": ">=0.1.0-alpha.1 <0.1.0-beta.0"
41
+ "@tileflow/core": ">=0.1.0-alpha.24 <0.1.0-beta.0",
42
+ "@tileflow/interactions": ">=0.1.0-alpha.3 <0.1.0-beta.0"
46
43
  },
47
44
  "peerDependencies": {
48
- "maplibre-gl": ">=5 <7",
45
+ "maplibre-gl": ">=6.4.1 <7",
49
46
  "vue": ">=3.3 <4"
50
47
  },
51
48
  "devDependencies": {
52
49
  "@vue/server-renderer": "3.5.39",
53
- "maplibre-gl": "^5.24.0",
54
- "tsx": "^4.23.1",
50
+ "maplibre-gl": "6.9.0",
51
+ "tsx": "^4.23.12",
55
52
  "vue": "^3.5.26"
56
53
  },
57
54
  "scripts": {
@@ -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.