@tileflow/core 0.1.0-alpha.42 → 0.1.0-alpha.44

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.
Files changed (50) hide show
  1. package/README.md +56 -69
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/dist/{3d-CzLTD0RK.d.ts → 3d-CW5Ls0An.d.ts} +32 -2
  4. package/dist/3d.d.ts +1 -1
  5. package/dist/3d.js +425 -50
  6. package/dist/browser.d.ts +95 -5
  7. package/dist/browser.js +866 -101
  8. package/dist/build.d.ts +8 -4
  9. package/dist/build.js +250 -3
  10. package/dist/config-reference.json +3395 -2140
  11. package/dist/{icon-composition-B1A2udKb.d.ts → icon-composition-Bbw9umUA.d.ts} +37 -2
  12. package/dist/index.d.ts +13 -4
  13. package/dist/index.js +193 -3
  14. package/dist/{manifest-types-B0lQjabX.d.ts → manifest-types-CwjHd4qc.d.ts} +8 -0
  15. package/dist/manifest.d.ts +2 -2
  16. package/dist/native-profile.d.ts +4 -0
  17. package/dist/native-profile.js +2 -0
  18. package/dist/native.js +789 -462
  19. package/dist/runtime.d.ts +1 -1
  20. package/dist/worker/camera-tile-worker.global.js +2 -2
  21. package/package.json +5 -6
  22. package/docs/application-tile-reading.md +0 -86
  23. package/docs/authoring-model.md +0 -269
  24. package/docs/boundary-areas-and-choropleths.md +0 -230
  25. package/docs/buildings-3d.md +0 -624
  26. package/docs/camera-moves-and-tile-cache.md +0 -112
  27. package/docs/capture-scenes.md +0 -40
  28. package/docs/capture-shots.md +0 -173
  29. package/docs/cartographic-defaults.md +0 -214
  30. package/docs/compiled-style-performance.md +0 -286
  31. package/docs/data-is-separate-from-design.md +0 -610
  32. package/docs/depth-markers.md +0 -65
  33. package/docs/dynamic-style-images.md +0 -100
  34. package/docs/globe-atmosphere.md +0 -113
  35. package/docs/hosted-session-authorization.md +0 -106
  36. package/docs/map-and-terrain-examples.md +0 -156
  37. package/docs/map-emphasis.md +0 -89
  38. package/docs/native-artifact-profile.md +0 -152
  39. package/docs/native-resource-urls.md +0 -369
  40. package/docs/nautical-marks.md +0 -308
  41. package/docs/public-api-and-browser-subpath.md +0 -101
  42. package/docs/route-drawing.md +0 -191
  43. package/docs/shared-visual-primitives.md +0 -101
  44. package/docs/street-lights.md +0 -127
  45. package/docs/street-sky.md +0 -156
  46. package/docs/style-states.md +0 -73
  47. package/docs/sun-and-light.md +0 -167
  48. package/docs/theme-transitions-and-blends.md +0 -317
  49. package/docs/themes-and-module-styles.md +0 -156
  50. package/docs/trees-3d.md +0 -295
package/dist/index.js CHANGED
@@ -882,6 +882,9 @@ var init_visual_semantics = __esm({
882
882
  "blur",
883
883
  "brightnessScale",
884
884
  "crownScale",
885
+ "crownAnchor",
886
+ "sizeAnchor",
887
+ "sizeCompression",
885
888
  "contrast",
886
889
  "dash",
887
890
  "exaggeration",
@@ -889,6 +892,7 @@ var init_visual_semantics = __esm({
889
892
  "emissiveVariation",
890
893
  "emissiveHeight",
891
894
  "colorMix",
895
+ "colorScale",
892
896
  "metallic",
893
897
  "roughness",
894
898
  "horizonBlend",
@@ -898,6 +902,7 @@ var init_visual_semantics = __esm({
898
902
  "fadeDuration",
899
903
  "gapWidth",
900
904
  "groundOcclusion",
905
+ "groundOcclusionRadius",
901
906
  "haloBlur",
902
907
  "haloWidth",
903
908
  "height",
@@ -6008,6 +6013,28 @@ function compileLand(request, context) {
6008
6013
  target: "land.background"
6009
6014
  });
6010
6015
  }
6016
+ if (config.globalLandcoverUnderlay && schema.layers.globalLandcover && config.globalLandcover?.visible !== false) {
6017
+ const underlay = config.globalLandcoverUnderlay;
6018
+ contributions.push({
6019
+ kind: "layer",
6020
+ owner: "land",
6021
+ slot: "land",
6022
+ localOrder: 9,
6023
+ target: "land.globalLandcoverUnderlay",
6024
+ layer: {
6025
+ id: "tileflow-global-landcover-underlay",
6026
+ type: "raster",
6027
+ source: "tileflow-landcover-underlay",
6028
+ minzoom: underlay.minZoom ?? 0,
6029
+ maxzoom: underlay.maxZoom ?? 11,
6030
+ paint: {
6031
+ "raster-opacity": toMapLibreStyleValue(underlay.opacity ?? 1),
6032
+ "raster-fade-duration": 0,
6033
+ "raster-resampling": "linear"
6034
+ }
6035
+ }
6036
+ });
6037
+ }
6011
6038
  if (schema.layers.globalLandcover && config.globalLandcover?.visible !== false) {
6012
6039
  contributions.push({
6013
6040
  kind: "layer",
@@ -11827,6 +11854,9 @@ function readTileflowVegetation3D(metadata) {
11827
11854
  {
11828
11855
  heightScale: scale(own.heightScale),
11829
11856
  crownScale: scale(own.crownScale),
11857
+ ...typeof own.sizeAnchor === "number" && Number.isFinite(own.sizeAnchor) ? { sizeAnchor: clamp(own.sizeAnchor, [1, 45]) } : {},
11858
+ ...typeof own.crownAnchor === "number" && Number.isFinite(own.crownAnchor) ? { crownAnchor: clamp(own.crownAnchor, [1, 25]) } : {},
11859
+ ...typeof own.sizeCompression === "number" && Number.isFinite(own.sizeCompression) ? { sizeCompression: clamp(own.sizeCompression, [0, 1]) } : {},
11830
11860
  ...drawn.length > 0 ? { models: drawn } : {}
11831
11861
  }
11832
11862
  ]
@@ -11998,6 +12028,14 @@ function tileflowVegetationDescription(request, context) {
11998
12028
  {
11999
12029
  heightScale: number(own?.heightScale),
12000
12030
  crownScale: number(own?.crownScale),
12031
+ ...own?.sizeAnchor === void 0 ? {} : { sizeAnchor: number(own.sizeAnchor) },
12032
+ ...own?.crownAnchor === void 0 ? {} : { crownAnchor: number(own.crownAnchor) },
12033
+ ...own?.sizeCompression === void 0 ? {} : {
12034
+ sizeCompression: Math.max(
12035
+ 0,
12036
+ Math.min(1, Number(toMapLibreStyleValue(own.sizeCompression)) || 0)
12037
+ )
12038
+ },
12001
12039
  ...own?.models?.length ? { models: [...own.models] } : {}
12002
12040
  }
12003
12041
  ])
@@ -13747,6 +13785,7 @@ function readModelRoleLighting(value) {
13747
13785
  ...typeof entry.emissiveColor === "string" ? { emissiveColor: entry.emissiveColor } : {},
13748
13786
  ...typeof entry.color === "string" ? { color: entry.color } : {},
13749
13787
  ...entry.colorMix === void 0 ? {} : { colorMix: bounded(entry.colorMix, 0, 1, 1) },
13788
+ ...entry.colorScale === void 0 ? {} : { colorScale: bounded(entry.colorScale, 0, 1, 1) },
13750
13789
  ...entry.metallic === void 0 ? {} : { metallic: bounded(entry.metallic, 0, 1, 0) },
13751
13790
  ...entry.roughness === void 0 ? {} : { roughness: bounded(entry.roughness, 0, 1, 1) },
13752
13791
  ...entry.shading === "map" || entry.shading === "physical" ? { shading: entry.shading } : {},
@@ -13836,6 +13875,7 @@ var tileflowDefaultBuildings3DDesign = Object.freeze({
13836
13875
  shadows: true,
13837
13876
  occlusion: true,
13838
13877
  groundOcclusion: 0.16,
13878
+ groundOcclusionRadius: 3,
13839
13879
  modelOcclusion: 0.75
13840
13880
  });
13841
13881
  function tileflowBuildingsMetadata(design) {
@@ -13876,7 +13916,11 @@ function readTileflowBuildings3D(metadata) {
13876
13916
  shadows: typeof value.shadows === "boolean" ? value.shadows : defaults4.shadows,
13877
13917
  occlusion: typeof value.occlusion === "boolean" ? value.occlusion : defaults4.occlusion,
13878
13918
  groundOcclusion: within(value.groundOcclusion, 1, defaults4.groundOcclusion),
13919
+ groundOcclusionRadius: within(value.groundOcclusionRadius, 20, defaults4.groundOcclusionRadius),
13879
13920
  modelOcclusion: within(value.modelOcclusion, 1, defaults4.modelOcclusion),
13921
+ ...Array.isArray(value.flatLayers) && value.flatLayers.length <= 128 && value.flatLayers.every(
13922
+ (entry) => isRecord7(entry) && typeof entry.id === "string" && typeof entry.visible === "boolean"
13923
+ ) ? { flatLayers: value.flatLayers } : {},
13880
13924
  ...modelsOf(value.models),
13881
13925
  ...modelColorsOf(value.modelColors),
13882
13926
  ...landmarksOf(value.landmarks)
@@ -13934,6 +13978,9 @@ function isRecord7(value) {
13934
13978
  return typeof value === "object" && value !== null && !Array.isArray(value);
13935
13979
  }
13936
13980
 
13981
+ // src/camera.ts
13982
+ var tileflowCameraMetadataKey = "tileflow:camera";
13983
+
13937
13984
  // src/data/requirements.ts
13938
13985
  import { convertFilter } from "@maplibre/maplibre-gl-style-spec";
13939
13986
  function inferTileflowDataRequirements(style, options = {}) {
@@ -14100,6 +14147,60 @@ function compareCodeUnits4(left, right) {
14100
14147
  return left < right ? -1 : left > right ? 1 : 0;
14101
14148
  }
14102
14149
 
14150
+ // src/modules/roads/path-ground.ts
14151
+ var pathTarget = /^roads\.classes\.(pathway|footway|pedestrian|steps|cycleway)\.(surface|bridge|tunnel)\.(fill|casing|shadow)$/;
14152
+ function compilePathGroundFamilies(input, options) {
14153
+ if (!options || Number(options.opacity ?? 1) === 0) return { families: input, active: false };
14154
+ const scale = Number(options.widthScale ?? 1);
14155
+ const scaled = (value) => {
14156
+ if (Array.isArray(value) && value[0] === "interpolate" && Array.isArray(value[2]) && value[2][0] === "zoom")
14157
+ return value.map((v, i) => i >= 4 && i % 2 === 0 ? ["*", v, scale] : v);
14158
+ return ["*", value ?? 1, scale];
14159
+ };
14160
+ let active = false;
14161
+ let families = input.flatMap((family) => {
14162
+ const match3 = pathTarget.exec(family.target);
14163
+ if (!match3 || match3[2] !== "surface") return [family];
14164
+ const [, kind, , phase] = match3;
14165
+ const appearance = { ...family.style.appearance };
14166
+ if (phase === "casing") appearance["line-opacity"] = 0;
14167
+ else {
14168
+ appearance["line-color"] = options.groundColor;
14169
+ appearance["line-width"] = scaled(appearance["line-width"]);
14170
+ appearance["line-opacity"] = kind === "cycleway" && phase === "fill" ? 0 : Number(options.opacity ?? 1);
14171
+ }
14172
+ const base = { ...family, style: { ...family.style, appearance } };
14173
+ if (phase === "casing" || kind === "cycleway" && phase === "fill") return [base];
14174
+ active = true;
14175
+ const overlay = {
14176
+ ...base,
14177
+ family: void 0,
14178
+ key: base.key + ".onGreen",
14179
+ target: base.target + ".onGreen",
14180
+ feature: { ...base.feature, dataSource: "tileflow-path-ground" },
14181
+ style: { ...base.style, appearance: { ...appearance, "line-color": options.greenColor } },
14182
+ origins: base.origins.map((origin) => ({ ...origin, target: base.target + ".onGreen" }))
14183
+ };
14184
+ return [base, overlay];
14185
+ });
14186
+ for (const structure of ["surface", "bridge", "tunnel"]) {
14187
+ const move = (family) => {
14188
+ const match3 = pathTarget.exec(family.target.replace(/\.onGreen$/, ""));
14189
+ return match3?.[2] === structure && (match3[3] === "fill" || structure === "surface" && match3[3] === "shadow");
14190
+ };
14191
+ const paths = families.filter(move);
14192
+ families = families.filter((f) => !move(f));
14193
+ const anchor = families.findIndex(
14194
+ (f) => new RegExp(
14195
+ `^roads\\.classes\\.(track|service|minor|tertiary|secondary|primary|trunk|motorway)\\.${structure}\\.casing$`
14196
+ ).test(f.target)
14197
+ );
14198
+ if (anchor >= 0) families.splice(anchor, 0, ...paths);
14199
+ else families.push(...paths);
14200
+ }
14201
+ return { families, active };
14202
+ }
14203
+
14103
14204
  // src/notices.ts
14104
14205
  var tileflowNoticesMetadataKey = "tileflow:notices";
14105
14206
  var tileflowNoticeLimits = Object.freeze({
@@ -14138,6 +14239,26 @@ function isRecord8(value) {
14138
14239
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
14139
14240
  }
14140
14241
 
14242
+ // src/path-ground-protocol.ts
14243
+ var tileflowPathGroundProtocol = "tileflow-path-ground";
14244
+ var tileflowPathGroundSource = "tileflow-path-ground";
14245
+ function pathGroundSourceConfig(data) {
14246
+ return {
14247
+ ...data.url ? { url: data.url } : { tiles: data.tiles },
14248
+ minzoom: Math.max(12, data.minzoom ?? 0),
14249
+ maxzoom: data.maxzoom ?? 15,
14250
+ road: data.schema.layers.road,
14251
+ landcover: data.schema.layers.landcover,
14252
+ landuse: data.schema.layers.landuse,
14253
+ class: data.schema.fields.class,
14254
+ subclass: data.schema.fields.subclass,
14255
+ brunnel: data.schema.fields.brunnel
14256
+ };
14257
+ }
14258
+ function pathGroundProtocolUrl(source, tile = false) {
14259
+ return `${tileflowPathGroundProtocol}://source/${tile ? "{z}/{x}/{y}.pbf" : "index.json"}?source=${encodeURIComponent(JSON.stringify(source))}`;
14260
+ }
14261
+
14141
14262
  // src/resolved-map-schema.ts
14142
14263
  init_camera_limits();
14143
14264
  import { Color as Color3 } from "@maplibre/maplibre-gl-style-spec";
@@ -15009,10 +15130,18 @@ function physicalLayerIdForSemanticKey(semanticKey) {
15009
15130
  semanticKey
15010
15131
  );
15011
15132
  if (match3) return `tileflow-${match3[1]}-render-${match3[2].replaceAll(".", "-")}`;
15133
+ match3 = /^roads\.classes\.(pathway|footway|pedestrian|steps|cycleway)\.surface\.(shadow|fill)-on-green$/u.exec(
15134
+ semanticKey
15135
+ );
15136
+ if (match3) return `tileflow-road-surface-${match3[1]}-${match3[2]}-on-green`;
15012
15137
  match3 = /^roads\.classes\.([^.]+)\.(tunnel|surface|bridge)\.(shadow|casing|fill|hatch|rampFill)$/u.exec(
15013
15138
  semanticKey
15014
15139
  );
15015
15140
  if (match3) return `tileflow-road-${match3[2]}-${match3[1]}-${match3[3]}`;
15141
+ match3 = /^roads\.classes\.(pathway|footway|pedestrian|steps|cycleway)\.surface\.(shadow|fill)\.onGreen$/u.exec(
15142
+ semanticKey
15143
+ );
15144
+ if (match3) return `tileflow-road-surface-${match3[1]}-${match3[2]}-on-green`;
15016
15145
  match3 = /^roads\.cohorts\.(tunnel|surface|bridge)\.([^.]+)\.(shadow|casing|fill|rampFill)$/u.exec(
15017
15146
  semanticKey
15018
15147
  );
@@ -15100,6 +15229,7 @@ var exactPhysicalLayerIds = Object.freeze({
15100
15229
  "labels.junctions": "tileflow-label-road-junction",
15101
15230
  "land.background": "tileflow-background",
15102
15231
  "land.globalLandcover": "tileflow-global-landcover",
15232
+ "land.globalLandcoverUnderlay": "tileflow-global-landcover-underlay",
15103
15233
  poi: "tileflow-poi",
15104
15234
  "landforms.classes": "tileflow-landforms",
15105
15235
  "roads.crossings": "tileflow-road-crossing",
@@ -17272,6 +17402,19 @@ var landModuleSchema = z7.object({
17272
17402
  }).strict().optional(),
17273
17403
  enabled: z7.boolean().optional(),
17274
17404
  globalLandcover: fillStyleSchema.optional(),
17405
+ globalLandcoverUnderlay: z7.object({
17406
+ url: z7.string().min(1),
17407
+ coordinates: z7.tuple([
17408
+ z7.tuple([z7.number(), z7.number()]),
17409
+ z7.tuple([z7.number(), z7.number()]),
17410
+ z7.tuple([z7.number(), z7.number()]),
17411
+ z7.tuple([z7.number(), z7.number()])
17412
+ ]),
17413
+ attribution: z7.string().min(1),
17414
+ opacity: numberValueSchema.optional(),
17415
+ minZoom: z7.number().min(0).max(24).optional(),
17416
+ maxZoom: z7.number().min(0).max(24).optional()
17417
+ }).strict().optional(),
17275
17418
  landcover: z7.object({
17276
17419
  farmland: areaStyleSchema.optional(),
17277
17420
  flowerbed: areaStyleSchema.optional(),
@@ -17340,6 +17483,7 @@ var modelRoleLightingSchema = z7.object({
17340
17483
  emissiveColor: themeColorValueSchema.optional(),
17341
17484
  color: themeColorValueSchema.optional(),
17342
17485
  colorMix: boundedThemeNumberSchema(0, 1).optional(),
17486
+ colorScale: boundedThemeNumberSchema(0, 1).optional(),
17343
17487
  metallic: boundedThemeNumberSchema(0, 1).optional(),
17344
17488
  roughness: boundedThemeNumberSchema(0, 1).optional(),
17345
17489
  shading: z7.enum(["physical", "map"]).optional(),
@@ -17393,8 +17537,10 @@ var buildingsModuleSchema = z7.object({
17393
17537
  logo: modelRoleLightingSchema.optional()
17394
17538
  }).strict().optional(),
17395
17539
  entrance: z7.object({ buildings: entranceBandSchema.optional(), models: entranceBandSchema.optional() }).strict().optional(),
17540
+ flatFootprints: z7.boolean().optional(),
17396
17541
  occlusion: z7.boolean().optional(),
17397
17542
  groundOcclusion: boundedThemeNumberSchema(0, 1).optional(),
17543
+ groundOcclusionRadius: boundedThemeNumberSchema(0, 20).optional(),
17398
17544
  modelOcclusion: boundedThemeNumberSchema(0, 1).optional(),
17399
17545
  shadows: z7.boolean().optional(),
17400
17546
  windows: z7.boolean().optional(),
@@ -17542,6 +17688,12 @@ var roadsModuleSchema = z7.object({
17542
17688
  "6": roadTreatmentStyleSchema.optional()
17543
17689
  }).strict().optional(),
17544
17690
  oneWayMarkers: z7.boolean().optional(),
17691
+ pathGround: z7.object({
17692
+ greenColor: themeColorValueSchema,
17693
+ groundColor: themeColorValueSchema,
17694
+ opacity: themeNumberValueSchema.optional(),
17695
+ widthScale: themeNumberValueSchema.optional()
17696
+ }).strict().optional(),
17545
17697
  outline: z7.enum(["none", "subtle", "strong"]).optional(),
17546
17698
  rampOrder: z7.enum(["below-roads", "by-class"]).describe(
17547
17699
  "Ramp fills draw below receiving roads by default. Use by-class to keep ramp fills in their road class order."
@@ -17765,6 +17917,9 @@ var modulesSchema = z7.object({
17765
17917
  z7.object({
17766
17918
  crownScale: boundedThemeNumberSchema(0.1, 10).optional(),
17767
17919
  heightScale: boundedThemeNumberSchema(0.1, 10).optional(),
17920
+ sizeAnchor: boundedThemeNumberSchema(1, 45).optional(),
17921
+ crownAnchor: boundedThemeNumberSchema(1, 25).optional(),
17922
+ sizeCompression: boundedThemeNumberSchema(0, 1).optional(),
17768
17923
  models: z7.array(
17769
17924
  z7.string().max(64).regex(
17770
17925
  tileflowTreeModelIdPattern,
@@ -18420,6 +18575,7 @@ var systemThemesSchema = z7.object({ dark: tileflowThemeNameSchema, light: tilef
18420
18575
  var resolvedTileflowMapSchema = z7.object({
18421
18576
  atmosphere: atmosphereSchema.optional(),
18422
18577
  boundaryAreas: boundaryAreasSchema.optional(),
18578
+ camera: z7.object({ adaptivePerspective: z7.boolean().optional() }).strict().optional(),
18423
18579
  data: dataSchema.optional(),
18424
18580
  defaultTheme: tileflowThemeNameSchema,
18425
18581
  fonts: fontDirectoriesSchema.optional(),
@@ -20621,7 +20777,7 @@ function tileflowBuildings3DDesignOf(module, context, layers2, buildingModels, t
20621
20777
  ...own,
20622
20778
  emissiveStrength: number(own.emissiveStrength, 0),
20623
20779
  ...Object.fromEntries(
20624
- ["emissiveVariation", "colorMix", "metallic", "roughness"].filter((key) => own[key] !== void 0).map((key) => [key, number(own[key], 0)])
20780
+ ["emissiveVariation", "colorMix", "colorScale", "metallic", "roughness"].filter((key) => own[key] !== void 0).map((key) => [key, number(own[key], 0)])
20625
20781
  ),
20626
20782
  ...Array.isArray(own.emissiveHeight) ? { emissiveHeight: own.emissiveHeight.map((v) => number(v, 0)) } : {},
20627
20783
  ...isRecord13(own.colorVariation) ? {
@@ -20651,7 +20807,13 @@ function tileflowBuildings3DDesignOf(module, context, layers2, buildingModels, t
20651
20807
  shadows: typeof style.shadows === "boolean" ? style.shadows : defaults4.shadows,
20652
20808
  occlusion: typeof style.occlusion === "boolean" ? style.occlusion : defaults4.occlusion,
20653
20809
  groundOcclusion: number(style.groundOcclusion, defaults4.groundOcclusion),
20810
+ groundOcclusionRadius: number(style.groundOcclusionRadius, defaults4.groundOcclusionRadius),
20654
20811
  modelOcclusion: number(style.modelOcclusion, defaults4.modelOcclusion),
20812
+ ...style.flatFootprints === false ? {
20813
+ flatLayers: layers2.filter(
20814
+ (layer) => layer.id.startsWith("tileflow-buildings-") && (layer.type === "fill" || layer.type === "line") && layer.metadata?.["tileflow:3d-toggle"] === void 0
20815
+ ).map((layer) => ({ id: layer.id, visible: layer.layout?.visibility !== "none" }))
20816
+ } : {},
20655
20817
  ...placedModels(style.models, buildingModels),
20656
20818
  ...modelColours(style.modelColors),
20657
20819
  ...landmarksOf2(style.landmarks, tileflowLandmarks)
@@ -20842,6 +21004,7 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
20842
21004
  });
20843
21005
  const platformSourceIds = [
20844
21006
  data.sourceId,
21007
+ tileflowPathGroundSource,
20845
21008
  ...terrainSources.map(({ sourceId }) => sourceId),
20846
21009
  ...marineSources.map(({ sourceId }) => sourceId),
20847
21010
  ...boundaryAreas ? [boundaryAreas.sourceId] : []
@@ -20938,9 +21101,13 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
20938
21101
  buildingTargetsOfOtherModes(modules.buildings)
20939
21102
  )
20940
21103
  );
21104
+ const pathGround = compilePathGroundFamilies(
21105
+ stackedFamilies,
21106
+ modules.roads?.enabled === false ? void 0 : modules.roads?.pathGround
21107
+ );
20941
21108
  const plannedFamilies = runCompilationPhase(
20942
21109
  "physical-planner",
20943
- () => planTileflowLayerFamilies(stackedFamilies)
21110
+ () => planTileflowLayerFamilies(pathGround.families)
20944
21111
  );
20945
21112
  const loweredDomainIR = runCompilationPhase(
20946
21113
  "lowering",
@@ -21097,7 +21264,10 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
21097
21264
  const primarySource = {
21098
21265
  type: "vector",
21099
21266
  ...data.url !== void 0 ? { url: data.url } : { tiles: data.tiles },
21100
- attribution: data.attribution,
21267
+ attribution: [
21268
+ data.attribution,
21269
+ ...modules.land?.globalLandcoverUnderlay ? [modules.land.globalLandcoverUnderlay.attribution] : []
21270
+ ].filter(Boolean).join(" | "),
21101
21271
  ...data.bounds ? { bounds: data.bounds } : {},
21102
21272
  ...data.maxzoom === void 0 ? {} : { maxzoom: data.maxzoom },
21103
21273
  ...data.minzoom === void 0 ? {} : { minzoom: data.minzoom }
@@ -21108,6 +21278,19 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
21108
21278
  };
21109
21279
  const sources = {
21110
21280
  [data.sourceId]: primarySource,
21281
+ ...pathGround.active ? {
21282
+ [tileflowPathGroundSource]: {
21283
+ type: "vector",
21284
+ url: pathGroundProtocolUrl(pathGroundSourceConfig(data))
21285
+ }
21286
+ } : {},
21287
+ ...modules.land?.enabled !== false && modules.land?.globalLandcoverUnderlay && data.schema.layers.globalLandcover && modules.land.globalLandcover?.visible !== false ? {
21288
+ "tileflow-landcover-underlay": {
21289
+ type: "image",
21290
+ url: modules.land.globalLandcoverUnderlay.url,
21291
+ coordinates: modules.land.globalLandcoverUnderlay.coordinates
21292
+ }
21293
+ } : {},
21111
21294
  ...marine?.bathymetry?.vector ? { [marine.bathymetry.vector.sourceId]: marine.bathymetry.vector.source } : {},
21112
21295
  ...marine?.bathymetry?.relief ? { [marine.bathymetry.relief.sourceId]: marine.bathymetry.relief.source } : {},
21113
21296
  ...marine?.nautical ? { [marine.nautical.sourceId]: marine.nautical.source } : {},
@@ -21215,6 +21398,12 @@ function compileSemanticStyleInternal(input, options, inspect, onReport) {
21215
21398
  [tileflowOverlayPlacementManifestMetadataKey]: overlayPlacementManifest,
21216
21399
  "tileflow:modules": Object.entries(modules).filter(([, module]) => !isRecord14(module) || module.enabled !== false).map(([name]) => name).sort(),
21217
21400
  ...config.view ? { "tileflow:view": config.view } : {},
21401
+ ...config.camera?.adaptivePerspective !== void 0 ? {
21402
+ [tileflowCameraMetadataKey]: {
21403
+ version: 1,
21404
+ adaptivePerspective: config.camera.adaptivePerspective
21405
+ }
21406
+ } : {},
21218
21407
  ...notices.length > 0 ? { [tileflowNoticesMetadataKey]: notices } : {},
21219
21408
  ...nauticalLights ? { [tileflowNauticalLightsMetadataKey]: nauticalLights } : {}
21220
21409
  }
@@ -21587,6 +21776,7 @@ var TileflowMapResolutionError = class extends Error {
21587
21776
  var tileflowMapMergeStrategies = {
21588
21777
  atmosphere: "atomic",
21589
21778
  boundaryAreas: "atomic",
21779
+ camera: "deep",
21590
21780
  data: "atomic",
21591
21781
  defaultTheme: "atomic",
21592
21782
  extends: "lineage",
@@ -492,6 +492,14 @@ type TileflowRoadsModuleConfig = {
492
492
  modifiers?: Partial<Record<TileflowRoadModifier, TileflowRoadTreatmentStyle>>;
493
493
  mountainBike?: Partial<Record<TileflowMountainBikeScale, TileflowRoadTreatmentStyle>>;
494
494
  oneWayMarkers?: boolean;
495
+ /** Surface paths keep a ground-coloured fallback and white/green-ground clipped strokes. */
496
+ pathGround?: {
497
+ greenColor: TileflowThemeColorValue;
498
+ groundColor: TileflowThemeColorValue;
499
+ /** Zero disables derivation in this theme. */
500
+ opacity?: TileflowThemeNumberValue;
501
+ widthScale?: TileflowThemeNumberValue;
502
+ };
495
503
  outline?: TileflowRoadOutline;
496
504
  /** Draw ramp fills below receiving roads by default; `by-class` keeps their class's order. */
497
505
  rampOrder?: 'below-roads' | 'by-class';
@@ -1,5 +1,5 @@
1
- import { T as TileflowRuntimeManifest } from './manifest-types-B0lQjabX.js';
2
- export { a as TileflowRuntimeColorScheme, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, d as TileflowRuntimeSystemThemes, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, t as tileflowRuntimeManifestLimits, g as tileflowRuntimeManifestVersion, h as tileflowTimeOfDayManifestVersion } from './manifest-types-B0lQjabX.js';
1
+ import { T as TileflowRuntimeManifest } from './manifest-types-CwjHd4qc.js';
2
+ export { a as TileflowRuntimeColorScheme, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, d as TileflowRuntimeSystemThemes, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, t as tileflowRuntimeManifestLimits, g as tileflowRuntimeManifestVersion, h as tileflowTimeOfDayManifestVersion } from './manifest-types-CwjHd4qc.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const tileflowRuntimeManifestSchema: z.ZodType<TileflowRuntimeManifest>;
@@ -87,6 +87,8 @@ declare const tileflowNativeStyleTransformationSchema: z.ZodLazy<z.core.$ZodObje
87
87
  }>;
88
88
  /** Present when preparation removed a browser sky, which Native does not draw. */
89
89
  sky: z.ZodOptional<z.ZodLiteral<"removed">>;
90
+ /** Native keeps complete ground paths without the browser-derived green overlay. */
91
+ pathGround: z.ZodOptional<z.ZodLiteral<"ground-fallback">>;
90
92
  layers: z.ZodArray<z.ZodLazy<z.core.$ZodObject<{
91
93
  inputLayer: z.ZodNumber;
92
94
  outputStart: z.ZodNumber;
@@ -131,6 +133,8 @@ declare const tileflowNativeBuildRecordSchema: z.ZodLazy<z.core.$ZodObject<{
131
133
  }>;
132
134
  /** Present when preparation removed a browser sky, which Native does not draw. */
133
135
  sky: z.ZodOptional<z.ZodLiteral<"removed">>;
136
+ /** Native keeps complete ground paths without the browser-derived green overlay. */
137
+ pathGround: z.ZodOptional<z.ZodLiteral<"ground-fallback">>;
134
138
  layers: z.ZodArray<z.ZodLazy<z.core.$ZodObject<{
135
139
  inputLayer: z.ZodNumber;
136
140
  outputStart: z.ZodNumber;
@@ -8827,6 +8827,8 @@ var tileflowNativeStyleTransformationSchema = strictNativeObject({
8827
8827
  projection: z4.enum(["none", "mercator-to-implicit", "globe-to-mercator"]),
8828
8828
  /** Present when preparation removed a browser sky, which Native does not draw. */
8829
8829
  sky: z4.literal("removed").optional(),
8830
+ /** Native keeps complete ground paths without the browser-derived green overlay. */
8831
+ pathGround: z4.literal("ground-fallback").optional(),
8830
8832
  layers: z4.array(layerTransformationSchema).max(tileflowNativeProfileLimits.maximumLayers),
8831
8833
  symbolOverlap: z4.array(symbolOverlapTransformationSchema).max(tileflowNativeProfileLimits.maximumLayers)
8832
8834
  }).superRefine((style, context) => {