@tileflow/dev 0.1.0-alpha.35 → 0.1.0-alpha.36
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/artifacts.js
CHANGED
|
@@ -575,6 +575,7 @@ import {
|
|
|
575
575
|
import {
|
|
576
576
|
getTileflowStyleFontFaces,
|
|
577
577
|
serializeCanonicalJson,
|
|
578
|
+
steadyTileflowNauticalLights,
|
|
578
579
|
tileflowStyleFontFacesMetadataKey,
|
|
579
580
|
tileflowIconIdPattern,
|
|
580
581
|
tileflowIconPackageLimits
|
|
@@ -1227,12 +1228,16 @@ function lowerNativeStyleRepresentation(input, normalizeFilter = (filter) => fil
|
|
|
1227
1228
|
properties: lowered.properties
|
|
1228
1229
|
});
|
|
1229
1230
|
}
|
|
1230
|
-
|
|
1231
|
+
if (input.sky !== void 0 && !object2(input.sky)) fail("/sky");
|
|
1232
|
+
const sky = input.sky !== void 0;
|
|
1233
|
+
const changed = projection !== "none" || sky || transformations.length > 0 || symbolOverlap.length > 0;
|
|
1231
1234
|
const output = changed ? { ...input, layers } : input;
|
|
1232
1235
|
if (changed && projection !== "none") delete output.projection;
|
|
1236
|
+
if (sky) delete output.sky;
|
|
1233
1237
|
return {
|
|
1234
1238
|
style: output,
|
|
1235
1239
|
projection,
|
|
1240
|
+
...sky ? { sky: "removed" } : {},
|
|
1236
1241
|
layers: transformations,
|
|
1237
1242
|
symbolOverlap,
|
|
1238
1243
|
inputLayers: originalLayers.length,
|
|
@@ -1260,12 +1265,13 @@ function lowerTileflowNativeCompiledStyles(input, policy = {}) {
|
|
|
1260
1265
|
for (const map of Object.keys(input).sort()) {
|
|
1261
1266
|
styles[map] = {};
|
|
1262
1267
|
for (const theme of Object.keys(input[map]).sort()) {
|
|
1263
|
-
const
|
|
1268
|
+
const web = input[map][theme];
|
|
1269
|
+
const original = steadyTileflowNauticalLights(web);
|
|
1264
1270
|
try {
|
|
1265
1271
|
const options = { ...urlOptions(map, theme, policy), deferFontClosure: true };
|
|
1266
1272
|
const pending = validateTileflowNativeStyle(original, options);
|
|
1267
1273
|
const blockers = pending.filter(
|
|
1268
|
-
(issue) => issue.code !== "NATIVE_UNSUPPORTED_STYLE" || !(issue.path === "/projection" || /^\/layers\/\d+\/(?:layout\/line-cap|paint\/line-dasharray)(?:\/|$)/u.test(
|
|
1274
|
+
(issue) => issue.code !== "NATIVE_UNSUPPORTED_STYLE" || !(issue.path === "/projection" || issue.path === "/sky" || /^\/layers\/\d+\/(?:layout\/line-cap|paint\/line-dasharray)(?:\/|$)/u.test(
|
|
1269
1275
|
issue.path
|
|
1270
1276
|
) || /^\/layers\/\d+\/layout\/(?:icon|text)-overlap$/u.test(issue.path))
|
|
1271
1277
|
);
|
|
@@ -1318,11 +1324,12 @@ function lowerTileflowNativeCompiledStyles(input, policy = {}) {
|
|
|
1318
1324
|
transformations.push({
|
|
1319
1325
|
map,
|
|
1320
1326
|
theme,
|
|
1321
|
-
inputStyleSha256: createHash2("sha256").update(serializeCanonicalJson(
|
|
1327
|
+
inputStyleSha256: createHash2("sha256").update(serializeCanonicalJson(web)).digest("hex"),
|
|
1322
1328
|
loweredStyleSha256: createHash2("sha256").update(serializeCanonicalJson(style)).digest("hex"),
|
|
1323
1329
|
inputLayers: lowered.inputLayers,
|
|
1324
1330
|
outputLayers: lowered.outputLayers,
|
|
1325
1331
|
projection: lowered.projection,
|
|
1332
|
+
...lowered.sky ? { sky: lowered.sky } : {},
|
|
1326
1333
|
layers: lowered.layers,
|
|
1327
1334
|
symbolOverlap: lowered.symbolOverlap
|
|
1328
1335
|
});
|
package/dist/preview.js
CHANGED
|
@@ -296,7 +296,9 @@ function renderTileflowPreviewHtml(preview, basePath, initialStatus, isSemanticP
|
|
|
296
296
|
import {loadTileflowStyleFonts} from "${basePath}/__runtime/tileflow-browser.js";
|
|
297
297
|
import {registerTileflowContourProtocol} from "${basePath}/__runtime/tileflow-browser.js";
|
|
298
298
|
import {registerTileflowPmtilesProtocol} from "${basePath}/__runtime/tileflow-browser.js";
|
|
299
|
-
import {attachTileflowNotices} from "${basePath}/__runtime/tileflow-browser.js";
|
|
299
|
+
import {attachTileflowNauticalLights, attachTileflowNotices} from "${basePath}/__runtime/tileflow-browser.js";
|
|
300
|
+
import {attachTileflowSky, attachTileflowSkyHaze, tileflowMaxPitch} from "${basePath}/__runtime/tileflow-browser.js";
|
|
301
|
+
import {tileflowCanvasContextAttributes} from "${basePath}/__runtime/tileflow-browser.js";
|
|
300
302
|
import {createTileflowMap3D} from "${basePath}/__runtime/tileflow-browser.js";
|
|
301
303
|
import {readTileflowSunPreset, resolveTileflowSun, tileflowDefaultSunPreset} from "${basePath}/__runtime/tileflow-browser.js";
|
|
302
304
|
|
|
@@ -338,6 +340,8 @@ function renderTileflowPreviewHtml(preview, basePath, initialStatus, isSemanticP
|
|
|
338
340
|
requestedMapWorkerCount <= 3
|
|
339
341
|
? requestedMapWorkerCount
|
|
340
342
|
: undefined;
|
|
343
|
+
// Benchmarks compare the multisampled canvas with a single-sampled one through this override.
|
|
344
|
+
const mapAntialias = readToggleFromUrl("mapAntialias", true);
|
|
341
345
|
const mapBenchmarkLongitude = Number(previewSearchParameters.get("lng"));
|
|
342
346
|
const mapBenchmarkLatitude = Number(previewSearchParameters.get("lat"));
|
|
343
347
|
const mapBenchmarkCenter =
|
|
@@ -1736,14 +1740,19 @@ function renderTileflowPreviewHtml(preview, basePath, initialStatus, isSemanticP
|
|
|
1736
1740
|
registerTileflowContourProtocol({addProtocol: maplibregl.addProtocol});
|
|
1737
1741
|
registerTileflowPmtilesProtocol({addProtocol: maplibregl.addProtocol});
|
|
1738
1742
|
const map = new maplibregl.Map({
|
|
1743
|
+
canvasContextAttributes: tileflowCanvasContextAttributes({antialias: mapAntialias}),
|
|
1739
1744
|
collectResourceTiming: mapBenchmarkEnabled || Boolean(devtoolsObserver),
|
|
1740
1745
|
container: "map",
|
|
1746
|
+
maxPitch: tileflowMaxPitch,
|
|
1741
1747
|
style: styleUrl,
|
|
1742
1748
|
transformRequest: previewTransformRequest,
|
|
1743
1749
|
...resolveInitialMapOptions(previewMapOptions)
|
|
1744
1750
|
});
|
|
1745
1751
|
globalThis.__tileflowPreviewMap = map;
|
|
1746
1752
|
attachTileflowNotices(map);
|
|
1753
|
+
attachTileflowNauticalLights(map);
|
|
1754
|
+
attachTileflowSky(map);
|
|
1755
|
+
attachTileflowSkyHaze(map);
|
|
1747
1756
|
devtoolsObserver?.attach(map);
|
|
1748
1757
|
installMapBenchmark(map);
|
|
1749
1758
|
if (window.parent === window) map.addControl(new maplibregl.NavigationControl(), "top-right");
|
package/dist/server.js
CHANGED
|
@@ -45,7 +45,7 @@ Baedeker, Cívica, 1777, Siegfried, Soundings, and Blueprint declare only
|
|
|
45
45
|
`[soundingsIcons]`, and `[blueprintIcons]`, respectively. No official root composes another map's assets even though all
|
|
46
46
|
use the semantic compiler ABI. Baedeker's directory contains eight original travel-atlas patterns;
|
|
47
47
|
its browser-derived Mapterhorn contours use runtime terrain tiles and are not part of the icon
|
|
48
|
-
package. Soundings owns
|
|
48
|
+
package. Soundings owns twenty-seven original nautical symbols and
|
|
49
49
|
patterns. Blueprint owns four technical blueprint patterns and one schematic POI node; its
|
|
50
50
|
unbundled Mapterhorn contours remain runtime terrain, and its text uses the canonical Noto Sans
|
|
51
51
|
glyph provider. An application map may inherit a root's exact array, replace it, clear it with `[]`,
|
package/docs/native-artifacts.md
CHANGED
|
@@ -45,6 +45,7 @@ Selecting `renderer: 'native'` applies `native-lowering-v1` after shared semanti
|
|
|
45
45
|
before final native validation. It never edits the authored map, the official map definitions or
|
|
46
46
|
the shared compiler. Web output is not lowered.
|
|
47
47
|
|
|
48
|
+
A browser `sky` is removed, because Native draws no sky, and the entry records `sky: 'removed'`.
|
|
48
49
|
A fixed `projection: {type: 'globe'}` is explicitly normalized to Native's implicit Mercator. This
|
|
49
50
|
is a renderer-specific projection change, not equivalent globe rendering. An explicit fixed
|
|
50
51
|
Mercator declaration is also omitted. Adaptive/expression projections and unknown projection
|
|
@@ -150,7 +151,8 @@ engines, `validation: 'static-artifacts'` and the canonical `build-manifest.json
|
|
|
150
151
|
schema version is 2 and its `preparationVersion` is `native-lowering-v1`.
|
|
151
152
|
|
|
152
153
|
The `transformations` array is sorted uniquely by map/theme. Each entry records input and lowered
|
|
153
|
-
style SHA-256 values, input/output layer counts
|
|
154
|
+
style SHA-256 values, input/output layer counts, projection normalization and, when present, sky
|
|
155
|
+
removal. `layers` lists the
|
|
154
156
|
input ordinal, output start/count and affected properties of each partitioned line layer;
|
|
155
157
|
`symbolOverlap` lists the input ordinal and replaced properties of each symbol layer whose overlap
|
|
156
158
|
modes became `*-allow-overlap` values. Ordinals refer to the complete style layer arrays, including
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/dev",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.36",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Node development utilities for Tileflow configs and builds.",
|
|
6
6
|
"type": "module",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@mapbox/vector-tile": "3.0.0",
|
|
86
86
|
"@maplibre/maplibre-gl-style-spec": "26.4.4",
|
|
87
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
87
|
+
"@tileflow/core": ">=0.1.0-alpha.39 <0.1.0-beta.0",
|
|
88
88
|
"chokidar": "4.0.3",
|
|
89
89
|
"fontkit": "2.0.4",
|
|
90
90
|
"jiti": "^2.7.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"three": "0.185.1"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@tileflow/maps": "0.1.0-alpha.
|
|
99
|
+
"@tileflow/maps": "0.1.0-alpha.13"
|
|
100
100
|
},
|
|
101
101
|
"optionalDependencies": {
|
|
102
102
|
"sharp": "0.35.5"
|