@tileflow/vue 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/dist/index.d.ts +5 -4
- package/dist/index.js +9 -13
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MapOptions, Map } from 'maplibre-gl';
|
|
2
2
|
import { DefineComponent, VNodeChild } from 'vue';
|
|
3
|
-
import { TileflowThemeTransitionOptions, TileflowThemeTransition } from '@tileflow/core/browser';
|
|
4
|
-
import { TileflowRuntimeSource, TileflowThemeSelection,
|
|
3
|
+
import { TileflowBrowserThemeBlendSelection, TileflowThemeTransitionOptions, TileflowThemeTransition } from '@tileflow/core/browser';
|
|
4
|
+
import { TileflowRuntimeSource, TileflowThemeSelection, TileflowAnalytics } from '@tileflow/core/runtime';
|
|
5
5
|
import { TileflowAnnotation, TileflowInteractionJsonValue, TileflowInteractionState, TileflowInteractionBinding, TileflowInteractionDiagnostic, TileflowInteractionEvent, TileflowAnnotationViewContext, TileflowInteractionViewContext } from '@tileflow/interactions';
|
|
6
6
|
|
|
7
7
|
type TileflowMapStyleSourceProps = {
|
|
@@ -9,9 +9,10 @@ type TileflowMapStyleSourceProps = {
|
|
|
9
9
|
theme?: TileflowThemeSelection;
|
|
10
10
|
/**
|
|
11
11
|
* Shows a continuous blend of the map's themes instead of `theme`. Moving `position` changes the
|
|
12
|
-
* map at once; changing `themes` prepares a new blend.
|
|
12
|
+
* map at once; changing `themes` prepares a new blend. `hold` keeps labels, icons, and mixed
|
|
13
|
+
* artwork back during a camera move; clearing it brings them in at once.
|
|
13
14
|
*/
|
|
14
|
-
themeBlend?:
|
|
15
|
+
themeBlend?: TileflowBrowserThemeBlendSelection;
|
|
15
16
|
/** Cross-fades theme changes, including entering and leaving a blend. */
|
|
16
17
|
themeTransition?: TileflowThemeTransitionOptions;
|
|
17
18
|
};
|
package/dist/index.js
CHANGED
|
@@ -159,9 +159,11 @@ function configureTileflowMapLibreModule(maplibregl) {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// src/style-source.ts
|
|
162
|
+
import {
|
|
163
|
+
validateTileflowBrowserThemeBlendSelection
|
|
164
|
+
} from "@tileflow/core/browser";
|
|
162
165
|
import {
|
|
163
166
|
validateTileflowRuntimeSource,
|
|
164
|
-
validateTileflowThemeBlendSelection,
|
|
165
167
|
validateTileflowThemeSelection
|
|
166
168
|
} from "@tileflow/core/runtime";
|
|
167
169
|
function validateTileflowMapStyleInputs(input) {
|
|
@@ -170,9 +172,9 @@ function validateTileflowMapStyleInputs(input) {
|
|
|
170
172
|
if (input.theme !== void 0 && !validateTileflowThemeSelection(input.theme)) {
|
|
171
173
|
return { error: 'theme must be a concrete portable theme name or "system"', ok: false };
|
|
172
174
|
}
|
|
173
|
-
if (input.themeBlend !== void 0 && !
|
|
175
|
+
if (input.themeBlend !== void 0 && !validateTileflowBrowserThemeBlendSelection(input.themeBlend)) {
|
|
174
176
|
return {
|
|
175
|
-
error: "themeBlend must name two to eight concrete themes
|
|
177
|
+
error: "themeBlend must name two to eight concrete themes, a position from 0 to themes.length - 1, and an optional boolean hold",
|
|
176
178
|
ok: false
|
|
177
179
|
};
|
|
178
180
|
}
|
|
@@ -936,9 +938,10 @@ var TileflowMap = defineComponent({
|
|
|
936
938
|
const switchBlend = () => {
|
|
937
939
|
const themes = blendStyles.value;
|
|
938
940
|
const position = props.themeBlend?.position;
|
|
941
|
+
const hold = props.themeBlend?.hold === true;
|
|
939
942
|
if (!themeController || !themes || position === void 0) return;
|
|
940
943
|
if (runtimeStyle.value) activeRuntimeResource.value = runtimeStyle.value;
|
|
941
|
-
void themeController.setBlend({ position, themes }, { transition: props.themeTransition }).then((result) => {
|
|
944
|
+
void themeController.setBlend({ hold, position, themes }, { transition: props.themeTransition }).then((result) => {
|
|
942
945
|
if (result.status === "failed") {
|
|
943
946
|
console.error("Failed to blend the Tileflow map themes", result.error);
|
|
944
947
|
}
|
|
@@ -1045,7 +1048,7 @@ var TileflowMap = defineComponent({
|
|
|
1045
1048
|
{ flush: "post" }
|
|
1046
1049
|
);
|
|
1047
1050
|
watch(
|
|
1048
|
-
() => [blendStyles.value, props.themeBlend?.position],
|
|
1051
|
+
() => [blendStyles.value, props.themeBlend?.position, props.themeBlend?.hold === true],
|
|
1049
1052
|
() => switchBlend(),
|
|
1050
1053
|
{ flush: "post" }
|
|
1051
1054
|
);
|
|
@@ -1062,14 +1065,7 @@ var TileflowMap = defineComponent({
|
|
|
1062
1065
|
{ flush: "post" }
|
|
1063
1066
|
);
|
|
1064
1067
|
watch(
|
|
1065
|
-
() => [
|
|
1066
|
-
props.analytics,
|
|
1067
|
-
props.interactive,
|
|
1068
|
-
props.mapOptions,
|
|
1069
|
-
props.mode,
|
|
1070
|
-
props.source,
|
|
1071
|
-
manifestMap.value
|
|
1072
|
-
],
|
|
1068
|
+
() => [props.interactive, props.mapOptions, props.mode, props.source, manifestMap.value],
|
|
1073
1069
|
() => void recreateMap(),
|
|
1074
1070
|
{ flush: "post" }
|
|
1075
1071
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/vue",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.28",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Vue component for rendering Tileflow maps with MapLibre.",
|
|
6
6
|
"type": "module",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
41
|
+
"@tileflow/core": ">=0.1.0-alpha.32 <0.1.0-beta.0",
|
|
42
42
|
"@tileflow/interactions": ">=0.1.0-alpha.4 <0.1.0-beta.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"vue": ">=3.3 <4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vue/server-renderer": "3.5.
|
|
50
|
-
"maplibre-gl": "6.
|
|
49
|
+
"@vue/server-renderer": "3.5.43",
|
|
50
|
+
"maplibre-gl": "6.13.0",
|
|
51
51
|
"tsx": "^4.23.12",
|
|
52
|
-
"vue": "^3.5.
|
|
52
|
+
"vue": "^3.5.43"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsup src/index.ts --format esm --dts --clean --external vue --external maplibre-gl",
|