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

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.
@@ -1,4 +1,4 @@
1
- import { bd as TileflowThemeColorValue, r as TileflowSymbolStyle, D as TileflowAreaStyle, a1 as TileflowLineStackStyle, q as TileflowLineStyle, o as TileflowExtrusionStyle, bg as TileflowThemeNumberValue, bj as TileflowThemeValue, m as TileflowBackgroundStyle, p as TileflowFillStyle, a6 as TileflowMarkerSymbolStyle, n as TileflowCircleStyle, aU as TileflowSymbolPlacement, b1 as TileflowTerrainHillshadeStyle, b0 as TileflowTerrainEncoding, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, c0 as TileflowTypographyStyle, X as TileflowLight, c1 as ResolvedTileflowTypography, f as TileflowTimeOfDayVariants, e as TileflowTimeOfDay, w as TileflowLabelsModuleConfig, y as TileflowPoiModuleConfig, u as TileflowRoadsModuleConfig, ah as TileflowProjection, aX as TileflowTerrain, bk as TileflowViewConfig, M as MapLibreStyle, bo as ValidationResult } from './manifest-types-DnhSJjCM.js';
1
+ import { bd as TileflowThemeColorValue, r as TileflowSymbolStyle, D as TileflowAreaStyle, a1 as TileflowLineStackStyle, q as TileflowLineStyle, o as TileflowExtrusionStyle, bg as TileflowThemeNumberValue, bj as TileflowThemeValue, m as TileflowBackgroundStyle, p as TileflowFillStyle, a6 as TileflowMarkerSymbolStyle, n as TileflowCircleStyle, aU as TileflowSymbolPlacement, b1 as TileflowTerrainHillshadeStyle, b0 as TileflowTerrainEncoding, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, c0 as TileflowTypographyStyle, X as TileflowLight, c1 as ResolvedTileflowTypography, f as TileflowTimeOfDayVariants, e as TileflowTimeOfDay, w as TileflowLabelsModuleConfig, y as TileflowPoiModuleConfig, u as TileflowRoadsModuleConfig, ah as TileflowProjection, aX as TileflowTerrain, bk as TileflowViewConfig, M as MapLibreStyle, bo as ValidationResult } from './manifest-types-B0lQjabX.js';
2
2
  import * as zod from 'zod';
3
3
  import { z } from 'zod';
4
4
  import { T as TileflowCaptureScene, a as TileflowCaptureShot } from './capture-shot-ChPQvPyi.js';
@@ -488,7 +488,7 @@ type TileflowBuildingsThreeDimensionalStyle = {
488
488
  colorVariation?: TileflowThemeNumberValue;
489
489
  /** How strongly roof outlines and outer corners catch the light, from 0 (default) to 1. */
490
490
  edges?: TileflowThemeNumberValue;
491
- /** Radius in metres for softened exterior corners and roof lighting, from 0 to 1; defaults to 0.8. */
491
+ /** Radius in metres for softened exterior corners and roof lighting, from 0 to 1.5; defaults to 0.8. */
492
492
  edgeRadius?: number;
493
493
  /** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
494
494
  edgeColor?: TileflowThemeColorValue;
@@ -528,6 +528,12 @@ type TileflowBuildingsThreeDimensionalStyle = {
528
528
  colorMix?: TileflowThemeNumberValue;
529
529
  metallic?: TileflowThemeNumberValue;
530
530
  roughness?: TileflowThemeNumberValue;
531
+ /** Normalize matte light to ordinary buildings, or retain physical glTF lighting (default). */
532
+ shading?: 'physical' | 'map';
533
+ /** Role multiplier for model ambient occlusion, from zero to one; defaults to one. */
534
+ ambientOcclusion?: TileflowThemeNumberValue;
535
+ /** Named-part colour contribution after the role tint, from zero to one; defaults to one. */
536
+ partColorMix?: TileflowThemeNumberValue;
531
537
  /** Independent HSL ranges, seeded by model identity; no window geometry is invented. */
532
538
  colorVariation?: {
533
539
  hue: readonly [TileflowThemeNumberValue, TileflowThemeNumberValue];
@@ -548,6 +554,8 @@ type TileflowBuildingsThreeDimensionalStyle = {
548
554
  };
549
555
  /** Contact shadow at the foot of the walls and in tight corners; defaults to true. */
550
556
  occlusion?: boolean;
557
+ /** Ground contact shadow strength, from 0 to 1; defaults to 0.16. Facade shading is independent. */
558
+ groundOcclusion?: TileflowThemeNumberValue;
551
559
  /** Prepared model ambient occlusion strength, from 0 to 1; defaults to 0.75. */
552
560
  modelOcclusion?: TileflowThemeNumberValue;
553
561
  /** Shadows from the sun, on the buildings and the flat map; defaults to true. */
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { u as TileflowBoundaryClass, w as TileflowBoundaryClassTier, x as TileflowBoundaryFamily, y as TileflowOverlayPlacement, z as TileflowMapLibreOverlay, d as TileflowMap, A as TileflowMapScene, B as TileflowMapShot, C as ResolveMapOptions, R as ResolvedTileflowMap, D as TileflowIconAppearance, O as OpenMapTilesFieldBindings, E as TileflowLayerDomain, F as TileflowBandPlacement, G as OpenMapTilesLayerBindings, H as tileflowCompilationPhases, I as tileflowCompilationPlannerStages, J as tileflowCompilationReportSchemaVersion, K as TileflowSemanticModuleName, L as tileflowHostedSourceLimit, M as tileflowOverlayPlacements, N as ResolvedTileflowTheme, P as TileflowThemeColorScheme, Q as TileflowIconSource, S as TileflowModelLightingRole, U as TileflowBuildingSurfaceDesign, V as TileflowModel, W as TileflowModelBytes, X as TileflowVegetationMode } from './icon-composition-HUh_Lj8Z.js';
2
- export { Y as OpenMapTilesSchema, Z as OpenMapTilesSchemaOptions, _ as ParkLayerSemantics, $ as ResolvedBathymetry, a0 as ResolvedBathymetryRelief, a1 as ResolvedBoundaryAreas, a2 as ResolvedMarine, a3 as ResolvedMarineSource, a4 as ResolvedTileflowData, a5 as ResolvedTileflowThemeTokens, a6 as TileflowAddressesModuleConfig, a7 as TileflowAddressesModuleOptions, a8 as TileflowAerowaysModuleConfig, a9 as TileflowAerowaysModuleOptions, aa as TileflowAtmosphere, ab as TileflowAtmosphereOptions, ac as TileflowAuthoringModules, ad as TileflowBarrierClass, ae as TileflowBarrierStyle, af as TileflowBathymetryConfig, ag as TileflowBathymetryDemSourceIdentity, ah as TileflowBathymetryDisplay, ai as TileflowBathymetryNameLayer, aj as TileflowBathymetryNamePlacement, ak as TileflowBathymetryNameStyle, al as TileflowBathymetryNameZoomRange, am as TileflowBathymetryOptions, an as TileflowBathymetryReliefConfig, ao as TileflowBathymetryVectorLayers, ap as TileflowBoundariesModuleConfig, aq as TileflowBoundariesModuleOptions, ar as TileflowBoundaryAreas, as as TileflowBoundaryAreasConfig, at as TileflowBoundaryAreasSourceIdentity, au as TileflowBuildingMode, av as TileflowBuildingModelPart, aw as TileflowBuildingModelPlacementConfig, ax as TileflowBuildingSurfaces, ay as TileflowBuildingsModuleConfig, az as TileflowBuildingsModuleOptions, aA as TileflowBuildingsThreeDimensionalStyle, aB as TileflowCompilationDesignDecision, aC as TileflowCompilationDiagnostic, aD as TileflowCompilationDomainReport, aE as TileflowCompilationFailure, aF as TileflowCompilationOptions, aG as TileflowCompilationPhase, aH as TileflowCompilationPlannerDecision, aI as TileflowCompilationPlannerStage, aJ as TileflowCompilationReport, aK as TileflowCompilationResult, aL as TileflowCompilationSuccess, h as TileflowDataCompatibilityIssue, aM as TileflowDataConfig, i as TileflowDataFieldRequirement, j as TileflowDataFieldType, aN as TileflowDataIdentity, k as TileflowDataLayerRequirement, b as TileflowDataRequirementsV1, aO as TileflowDerivedMap, aP as TileflowDisableOperation, aQ as TileflowFontDirectory, aR as TileflowGlyphs, aS as TileflowHostedSourceCollection, aT as TileflowHostedTilesetSource, aU as TileflowHostedTilesetType, a as TileflowIconCompositionV1, aV as TileflowIconContributorIdentity, aW as TileflowIconDirectory, aX as TileflowIconSetError, aY as TileflowIconSetErrorCode, aZ as TileflowIconSetReference, a_ as TileflowIconSetSource, a$ as TileflowLandModuleConfig, b0 as TileflowLandModuleOptions, b1 as TileflowLandcoverClass, b2 as TileflowLandformClass, b3 as TileflowLandformsModuleConfig, b4 as TileflowLandformsModuleOptions, b5 as TileflowLanduseClass, b6 as TileflowLayerBand, b7 as TileflowLocalDirectory, b8 as TileflowMapDesign, b9 as TileflowMapIdentity, ba as TileflowMapLibreOverlayLayer, bb as TileflowMapTooling, bc as TileflowMarine, bd as TileflowMarineConfig, be as TileflowMarineMode, bf as TileflowMarineSourceConfig, bg as TileflowMarineSourceIdentity, bh as TileflowModelDirectory, bi as TileflowModelEmitter, bj as TileflowModelLevelBytes, bk as TileflowModelMaterial, bl as TileflowModelMaterialRange, bm as TileflowModelMesh, bn as TileflowModelPart, bo as TileflowModelSurface, bp as TileflowModelSurfaceBytes, bq as TileflowModelTexture, br as TileflowModelTextureReference, bs as TileflowModuleOperation, bt as TileflowModulePatch, bu as TileflowNauticalAreaLabelStyles, bv as TileflowNauticalModuleConfig, bw as TileflowNauticalModuleOptions, l as TileflowObservedDataContractV1, bx as TileflowOverlayCollection, by as TileflowPackageDirectory, bz as TileflowPreparedIconCapabilities, bA as TileflowRasterDemSourceRequirementV1, bB as TileflowRefineOperation, bC as TileflowRemoveOperation, T as TileflowRenderedIconIdentity, bD as TileflowReset, bE as TileflowResolvedThemeSelection, bF as TileflowSemanticModules, bG as TileflowSky, bH as TileflowSkyColours, bI as TileflowSkyMetadata, bJ as TileflowSkyOptions, bK as TileflowSkyTimesOfDay, c as TileflowSourceRequirementsV1, bL as TileflowStandaloneMap, e as TileflowStyleOptions, bM as TileflowSun, bN as TileflowSunPreset, bO as TileflowTheme, bP as TileflowThemeAmbient, bQ as TileflowThemeAuditContext, bR as TileflowThemeAuditDiagnostic, bS as TileflowThemeAuditError, bT as TileflowThemeAuditScope, bU as TileflowThemeDefinition, bV as TileflowThemeLighting, bW as TileflowThemeName, bX as TileflowThemeSun, bY as TileflowThemeTokens, bZ as TileflowThemeTypography, b_ as TileflowThemeTypographyStyle, b$ as TileflowTransitModuleConfig, c0 as TileflowTransitModuleOptions, c1 as TileflowTransitRailStyle, c2 as TileflowTreeForm, c3 as TileflowTreeFormMix, c4 as TileflowTreeModel, c5 as TileflowTreeModelMesh, c6 as TileflowTreeRegion, c7 as TileflowVegetation3D, c8 as TileflowVegetationModuleConfig, c9 as TileflowVegetationModuleOptions, ca as TileflowVegetationThreeDimensionalStyle, cb as TileflowVisualValueCategory, cc as TileflowWaterModuleConfig, cd as TileflowWaterModuleOptions, ce as TileflowWaterwayClass, cf as TileflowWorldData, cg as TileflowWorldReleaseReference, ch as TileflowWorldSelection, ci as TileflowWorldV1Schema, cj as VectorTilesData, ck as addresses, cl as aeroways, cm as assertTileflowMapThemeValues, cn as assertTileflowSdfPixels, co as auditTileflowMapThemeValues, cp as auditTileflowThemeValues, cq as bathymetry, cr as boundaries, cs as buildings, ct as checkTileflowModelSurface, cu as classifyTileflowVisualProperty, cv as collectTileflowIconSetReferences, cw as createStyle, cx as createStyleResult, cy as decodeTileflowTreeModel, cz as defineTheme, cA as disable, cB as encodeTileflowTreeModel, cC as hashTileflowIconComposition, cD as hostedTileset, cE as iconSet, r as inferTileflowDataRequirements, s as inferTileflowSourceRequirements, cF as isCanonicalOpenMapTilesSchema, cG as isSafeLocalPmtilesPath, cH as isTileflowBoundaryClass, cI as isTileflowBoundaryFamily, cJ as isTileflowCompilationPhase, cK as isTileflowIconSetSource, cL as isTileflowLocalDirectory, cM as isTileflowModelPartName, cN as land, cO as landforms, cP as maplibreOverlay, cQ as mixTileflowSunPresets, cR as nautical, cS as openMapTiles, cT as openMapTilesContractVersion, cU as parseTileflowIconComposition, cV as parseTileflowMap, cW as readTileflowSky, cX as readTileflowSunPreset, cY as readTileflowVegetation3D, cZ as refine, c_ as remove, c$ as reset, d0 as resolveBoundaryAreas, d1 as resolveMarine, d2 as resolveThemeSelection, d3 as resolveThemeValues, d4 as resolveTileflowData, d5 as resolveTileflowSun, d6 as resolveTileflowTheme, d7 as tileflowBandPlacements, d8 as tileflowBathymetryDemSourceId, d9 as tileflowBathymetryNameLayerLimits, da as tileflowBathymetrySourceId, db as tileflowBathymetryV1Schema, dc as tileflowBoundaryAreasV1Schema, dd as tileflowBoundaryClassTiers, de as tileflowBoundaryClasses, df as tileflowBoundaryFamilies, dg as tileflowDefaultSunPreset, dh as tileflowIconAppearanceSchema, di as tileflowIconAuthorMetadataSchema, dj as tileflowIconCompositionMaximumBytes, dk as tileflowIconCompositionSchema, dl as tileflowIconMetadataFileName, dm as tileflowIconSetIdSchema, dn as tileflowIconSetPackageIdSchema, dp as tileflowIconSetReferenceSchema, dq as tileflowIconSetSourceSchema, dr as tileflowIconSetTeamIdSchema, ds as tileflowIconSetVersionIdSchema, dt as tileflowIconSourceLimit, du as tileflowInsideRings, dv as tileflowLandformClasses, dw as tileflowLayerBands, dx as tileflowLocalDirectoryMaximumLength, dy as tileflowLocalDirectoryMessage, dz as tileflowMapIdSchema, dA as tileflowModelArchitecturalPartNames, dB as tileflowModelDefaultLightingRole, dC as tileflowModelImageSize, dD as tileflowModelLightingRoles, dE as tileflowModelLimits, dF as tileflowModelParts, dG as tileflowModelSurfaceLimits, dH as tileflowModelTextureChannels, dI as tileflowModelVertexBytes, dJ as tileflowNauticalFacilityIcons, dK as tileflowNauticalImageRoles, dL as tileflowNauticalNotice, dM as tileflowNauticalPromoteId, dN as tileflowNauticalSourceId, dO as tileflowNauticalV1Schema, dP as tileflowPrimarySourceId, dQ as tileflowRenderedIconIdentitySchema, dR as tileflowRingsOverlap, dS as tileflowSkyAtSun, dT as tileflowSkyMetadataKey, dU as tileflowStyleSunPreset, dV as tileflowSunDirection, dW as tileflowSunMetadataKey, dX as tileflowSunPosition, dY as tileflowThemeLimits, dZ as tileflowTreeForms, d_ as tileflowTreeModelIdPattern, d$ as tileflowTreeModelLimits, e0 as tileflowVegetationMetadataKey, e1 as tileflowWorld, e2 as tileflowWorldGeneration, e3 as tileflowWorldTileJsonUrl, e4 as tileflowWorldV1Schema, e5 as transit, e6 as validateTileflowCompiledIconCapabilities, v as validateTileflowDataCompatibility, e7 as validateTileflowMap, e8 as validateTileflowWorldV1Tilejson, e9 as vectorTiles, ea as vegetation, eb as water } from './icon-composition-HUh_Lj8Z.js';
1
+ import { u as TileflowBoundaryClass, w as TileflowBoundaryClassTier, x as TileflowBoundaryFamily, y as TileflowOverlayPlacement, z as TileflowMapLibreOverlay, d as TileflowMap, A as TileflowMapScene, B as TileflowMapShot, C as ResolveMapOptions, R as ResolvedTileflowMap, D as TileflowIconAppearance, O as OpenMapTilesFieldBindings, E as TileflowLayerDomain, F as TileflowBandPlacement, G as OpenMapTilesLayerBindings, H as tileflowCompilationPhases, I as tileflowCompilationPlannerStages, J as tileflowCompilationReportSchemaVersion, K as TileflowSemanticModuleName, L as tileflowHostedSourceLimit, M as tileflowOverlayPlacements, N as ResolvedTileflowTheme, P as TileflowThemeColorScheme, Q as TileflowIconSource, S as TileflowModelLightingRole, U as TileflowBuildingSurfaceDesign, V as TileflowModel, W as TileflowModelBytes, X as TileflowVegetationMode } from './icon-composition-B1A2udKb.js';
2
+ export { Y as OpenMapTilesSchema, Z as OpenMapTilesSchemaOptions, _ as ParkLayerSemantics, $ as ResolvedBathymetry, a0 as ResolvedBathymetryRelief, a1 as ResolvedBoundaryAreas, a2 as ResolvedMarine, a3 as ResolvedMarineSource, a4 as ResolvedTileflowData, a5 as ResolvedTileflowThemeTokens, a6 as TileflowAddressesModuleConfig, a7 as TileflowAddressesModuleOptions, a8 as TileflowAerowaysModuleConfig, a9 as TileflowAerowaysModuleOptions, aa as TileflowAtmosphere, ab as TileflowAtmosphereOptions, ac as TileflowAuthoringModules, ad as TileflowBarrierClass, ae as TileflowBarrierStyle, af as TileflowBathymetryConfig, ag as TileflowBathymetryDemSourceIdentity, ah as TileflowBathymetryDisplay, ai as TileflowBathymetryNameLayer, aj as TileflowBathymetryNamePlacement, ak as TileflowBathymetryNameStyle, al as TileflowBathymetryNameZoomRange, am as TileflowBathymetryOptions, an as TileflowBathymetryReliefConfig, ao as TileflowBathymetryVectorLayers, ap as TileflowBoundariesModuleConfig, aq as TileflowBoundariesModuleOptions, ar as TileflowBoundaryAreas, as as TileflowBoundaryAreasConfig, at as TileflowBoundaryAreasSourceIdentity, au as TileflowBuildingMode, av as TileflowBuildingModelPart, aw as TileflowBuildingModelPlacementConfig, ax as TileflowBuildingSurfaces, ay as TileflowBuildingsModuleConfig, az as TileflowBuildingsModuleOptions, aA as TileflowBuildingsThreeDimensionalStyle, aB as TileflowCompilationDesignDecision, aC as TileflowCompilationDiagnostic, aD as TileflowCompilationDomainReport, aE as TileflowCompilationFailure, aF as TileflowCompilationOptions, aG as TileflowCompilationPhase, aH as TileflowCompilationPlannerDecision, aI as TileflowCompilationPlannerStage, aJ as TileflowCompilationReport, aK as TileflowCompilationResult, aL as TileflowCompilationSuccess, h as TileflowDataCompatibilityIssue, aM as TileflowDataConfig, i as TileflowDataFieldRequirement, j as TileflowDataFieldType, aN as TileflowDataIdentity, k as TileflowDataLayerRequirement, b as TileflowDataRequirementsV1, aO as TileflowDerivedMap, aP as TileflowDisableOperation, aQ as TileflowFontDirectory, aR as TileflowGlyphs, aS as TileflowHostedSourceCollection, aT as TileflowHostedTilesetSource, aU as TileflowHostedTilesetType, a as TileflowIconCompositionV1, aV as TileflowIconContributorIdentity, aW as TileflowIconDirectory, aX as TileflowIconSetError, aY as TileflowIconSetErrorCode, aZ as TileflowIconSetReference, a_ as TileflowIconSetSource, a$ as TileflowLandModuleConfig, b0 as TileflowLandModuleOptions, b1 as TileflowLandcoverClass, b2 as TileflowLandformClass, b3 as TileflowLandformsModuleConfig, b4 as TileflowLandformsModuleOptions, b5 as TileflowLanduseClass, b6 as TileflowLayerBand, b7 as TileflowLocalDirectory, b8 as TileflowMapDesign, b9 as TileflowMapIdentity, ba as TileflowMapLibreOverlayLayer, bb as TileflowMapTooling, bc as TileflowMarine, bd as TileflowMarineConfig, be as TileflowMarineMode, bf as TileflowMarineSourceConfig, bg as TileflowMarineSourceIdentity, bh as TileflowModelDirectory, bi as TileflowModelEmitter, bj as TileflowModelLevelBytes, bk as TileflowModelMaterial, bl as TileflowModelMaterialRange, bm as TileflowModelMesh, bn as TileflowModelPart, bo as TileflowModelSurface, bp as TileflowModelSurfaceBytes, bq as TileflowModelTexture, br as TileflowModelTextureReference, bs as TileflowModuleOperation, bt as TileflowModulePatch, bu as TileflowNauticalAreaLabelStyles, bv as TileflowNauticalModuleConfig, bw as TileflowNauticalModuleOptions, l as TileflowObservedDataContractV1, bx as TileflowOverlayCollection, by as TileflowPackageDirectory, bz as TileflowPreparedIconCapabilities, bA as TileflowRasterDemSourceRequirementV1, bB as TileflowRefineOperation, bC as TileflowRemoveOperation, T as TileflowRenderedIconIdentity, bD as TileflowReset, bE as TileflowResolvedThemeSelection, bF as TileflowSemanticModules, bG as TileflowSky, bH as TileflowSkyColours, bI as TileflowSkyMetadata, bJ as TileflowSkyOptions, bK as TileflowSkyTimesOfDay, c as TileflowSourceRequirementsV1, bL as TileflowStandaloneMap, e as TileflowStyleOptions, bM as TileflowSun, bN as TileflowSunPreset, bO as TileflowTheme, bP as TileflowThemeAmbient, bQ as TileflowThemeAuditContext, bR as TileflowThemeAuditDiagnostic, bS as TileflowThemeAuditError, bT as TileflowThemeAuditScope, bU as TileflowThemeDefinition, bV as TileflowThemeLighting, bW as TileflowThemeName, bX as TileflowThemeSun, bY as TileflowThemeTokens, bZ as TileflowThemeTypography, b_ as TileflowThemeTypographyStyle, b$ as TileflowTransitModuleConfig, c0 as TileflowTransitModuleOptions, c1 as TileflowTransitRailStyle, c2 as TileflowTreeForm, c3 as TileflowTreeFormMix, c4 as TileflowTreeModel, c5 as TileflowTreeModelMesh, c6 as TileflowTreeRegion, c7 as TileflowVegetation3D, c8 as TileflowVegetationModuleConfig, c9 as TileflowVegetationModuleOptions, ca as TileflowVegetationThreeDimensionalStyle, cb as TileflowVisualValueCategory, cc as TileflowWaterModuleConfig, cd as TileflowWaterModuleOptions, ce as TileflowWaterwayClass, cf as TileflowWorldData, cg as TileflowWorldReleaseReference, ch as TileflowWorldSelection, ci as TileflowWorldV1Schema, cj as VectorTilesData, ck as addresses, cl as aeroways, cm as assertTileflowMapThemeValues, cn as assertTileflowSdfPixels, co as auditTileflowMapThemeValues, cp as auditTileflowThemeValues, cq as bathymetry, cr as boundaries, cs as buildings, ct as checkTileflowModelSurface, cu as classifyTileflowVisualProperty, cv as collectTileflowIconSetReferences, cw as createStyle, cx as createStyleResult, cy as decodeTileflowTreeModel, cz as defineTheme, cA as disable, cB as encodeTileflowTreeModel, cC as hashTileflowIconComposition, cD as hostedTileset, cE as iconSet, r as inferTileflowDataRequirements, s as inferTileflowSourceRequirements, cF as isCanonicalOpenMapTilesSchema, cG as isSafeLocalPmtilesPath, cH as isTileflowBoundaryClass, cI as isTileflowBoundaryFamily, cJ as isTileflowCompilationPhase, cK as isTileflowIconSetSource, cL as isTileflowLocalDirectory, cM as isTileflowModelPartName, cN as land, cO as landforms, cP as maplibreOverlay, cQ as mixTileflowSunPresets, cR as nautical, cS as openMapTiles, cT as openMapTilesContractVersion, cU as parseTileflowIconComposition, cV as parseTileflowMap, cW as readTileflowSky, cX as readTileflowSunPreset, cY as readTileflowVegetation3D, cZ as refine, c_ as remove, c$ as reset, d0 as resolveBoundaryAreas, d1 as resolveMarine, d2 as resolveThemeSelection, d3 as resolveThemeValues, d4 as resolveTileflowData, d5 as resolveTileflowSun, d6 as resolveTileflowTheme, d7 as tileflowBandPlacements, d8 as tileflowBathymetryDemSourceId, d9 as tileflowBathymetryNameLayerLimits, da as tileflowBathymetrySourceId, db as tileflowBathymetryV1Schema, dc as tileflowBoundaryAreasV1Schema, dd as tileflowBoundaryClassTiers, de as tileflowBoundaryClasses, df as tileflowBoundaryFamilies, dg as tileflowDefaultSunPreset, dh as tileflowIconAppearanceSchema, di as tileflowIconAuthorMetadataSchema, dj as tileflowIconCompositionMaximumBytes, dk as tileflowIconCompositionSchema, dl as tileflowIconMetadataFileName, dm as tileflowIconSetIdSchema, dn as tileflowIconSetPackageIdSchema, dp as tileflowIconSetReferenceSchema, dq as tileflowIconSetSourceSchema, dr as tileflowIconSetTeamIdSchema, ds as tileflowIconSetVersionIdSchema, dt as tileflowIconSourceLimit, du as tileflowInsideRings, dv as tileflowLandformClasses, dw as tileflowLayerBands, dx as tileflowLocalDirectoryMaximumLength, dy as tileflowLocalDirectoryMessage, dz as tileflowMapIdSchema, dA as tileflowModelArchitecturalPartNames, dB as tileflowModelDefaultLightingRole, dC as tileflowModelImageSize, dD as tileflowModelLightingRoles, dE as tileflowModelLimits, dF as tileflowModelParts, dG as tileflowModelSurfaceLimits, dH as tileflowModelTextureChannels, dI as tileflowModelVertexBytes, dJ as tileflowNauticalFacilityIcons, dK as tileflowNauticalImageRoles, dL as tileflowNauticalNotice, dM as tileflowNauticalPromoteId, dN as tileflowNauticalSourceId, dO as tileflowNauticalV1Schema, dP as tileflowPrimarySourceId, dQ as tileflowRenderedIconIdentitySchema, dR as tileflowRingsOverlap, dS as tileflowSkyAtSun, dT as tileflowSkyMetadataKey, dU as tileflowStyleSunPreset, dV as tileflowSunDirection, dW as tileflowSunMetadataKey, dX as tileflowSunPosition, dY as tileflowThemeLimits, dZ as tileflowTreeForms, d_ as tileflowTreeModelIdPattern, d$ as tileflowTreeModelLimits, e0 as tileflowVegetationMetadataKey, e1 as tileflowWorld, e2 as tileflowWorldGeneration, e3 as tileflowWorldTileJsonUrl, e4 as tileflowWorldV1Schema, e5 as transit, e6 as validateTileflowCompiledIconCapabilities, v as validateTileflowDataCompatibility, e7 as validateTileflowMap, e8 as validateTileflowWorldV1Tilejson, e9 as vectorTiles, ea as vegetation, eb as water } from './icon-composition-B1A2udKb.js';
3
3
  import { z } from 'zod';
4
- import { V as ValidationMessage, i as TileflowExpression, j as TileflowFixedValue, k as TileflowThemeTokenReference, l as TileflowThemeColorOperation, m as TileflowBackgroundStyle, n as TileflowCircleStyle, o as TileflowExtrusionStyle, p as TileflowFillStyle, q as TileflowLineStyle, r as TileflowSymbolStyle, M as MapLibreStyle, s as TileflowRoadsModuleOptions, u as TileflowRoadsModuleConfig, v as TileflowLabelsModuleOptions, w as TileflowLabelsModuleConfig, x as TileflowPoiModuleOptions, y as TileflowPoiModuleConfig } from './manifest-types-DnhSJjCM.js';
5
- export { z as MapLibreSprite, A as TileflowAerodromeCodeDetail, B as TileflowAlignment, C as TileflowAnalytics, D as TileflowAreaStyle, E as TileflowBackgroundPaint, F as TileflowCirclePaint, G as TileflowColor, H as TileflowColorStyleValue, I as TileflowExtrusionPaint, J as TileflowFillPaint, K as TileflowIconAnchor, L as TileflowIconLayout, N as TileflowIconPaint, O as TileflowIconStyle, P as TileflowIconTextFit, Q as TileflowImageStyleValue, R as TileflowLabelDetail, S as TileflowLabelLanguage, U as TileflowLabelStyles, W as TileflowLayerRange, X as TileflowLight, Y as TileflowLineCap, Z as TileflowLineHatchStyle, _ as TileflowLineJoin, $ as TileflowLineLayout, a0 as TileflowLinePaint, a1 as TileflowLineStackStyle, a2 as TileflowManifestFetchOptions, a3 as TileflowManifestLoadOptions, a4 as TileflowMapMode, a5 as TileflowMapModeOptions, a6 as TileflowMarkerSymbolStyle, a7 as TileflowMountainBikeScale, a8 as TileflowNumberInsetsStyleValue, a9 as TileflowNumberStyleValue, aa as TileflowPlaceLabelClass, ab as TileflowPoiCategory, ac as TileflowPoiCategoryStyle, ad as TileflowPoiColorMode, ae as TileflowPoiDensity, af as TileflowPoiPlacementOrder, ag as TileflowPriorityOrder, ah as TileflowProjection, ai as TileflowResolvedRuntimeTheme, aj as TileflowRoadAreaStyle, ak as TileflowRoadClass, al as TileflowRoadClassStyle, am as TileflowRoadCrossingStyle, an as TileflowRoadDetail, ao as TileflowRoadExtras, ap as TileflowRoadHierarchy, aq as TileflowRoadLabelDetail, ar as TileflowRoadLayerStyle, as as TileflowRoadModifier, at as TileflowRoadOutline, au as TileflowRoadRestriction, av as TileflowRoadRoundaboutStyle, aw as TileflowRoadServiceType, ax as TileflowRoadShieldDetail, ay as TileflowRoadShieldStyles, az as TileflowRoadSidewalkStyle, aA as TileflowRoadStreetLightStyle, aB as TileflowRoadStructure, aC as TileflowRoadTreatmentLayerStyle, aD as TileflowRoadTreatmentLineStyle, aE as TileflowRoadTreatmentStyle, aF as TileflowRoadWeight, aG as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aH as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aI as TileflowRuntimeSource, aJ as TileflowRuntimeSourceValidation, aK as TileflowRuntimeStyle, aL as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aM as TileflowRuntimeViewOptions, aN as TileflowSessionController, aO as TileflowSessionGrantResponse, aP as TileflowStringStyleValue, aQ as TileflowStructuralStyleValue, aR as TileflowStyleFontFace, aS as TileflowStyleValue, aT as TileflowSymbolOverlap, aU as TileflowSymbolPlacement, aV as TileflowSymbolPlacementStyle, aW as TileflowSymbolZOrder, aX as TileflowTerrain, aY as TileflowTerrainConfig, aZ as TileflowTerrainContourLabelStyle, a_ as TileflowTerrainContourLineStyle, a$ as TileflowTerrainContoursConfig, b0 as TileflowTerrainEncoding, b1 as TileflowTerrainHillshadeStyle, b2 as TileflowTerrainLayerRange, b3 as TileflowTerrainMode, b4 as TileflowTextAnchor, b5 as TileflowTextBackground, b6 as TileflowTextJustify, b7 as TileflowTextLayout, b8 as TileflowTextPaint, b9 as TileflowTextStyle, ba as TileflowThemeBlendSelection, bb as TileflowThemeColorAlpha, bc as TileflowThemeColorMix, bd as TileflowThemeColorValue, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, bg as TileflowThemeNumberValue, bh as TileflowThemeSelection, bi as TileflowThemeTokenCategory, bj as TileflowThemeValue, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, bk as TileflowViewConfig, bl as TileflowWaterLabelClass, bm as TileflowZoomInterpolation, bn as TileflowZoomValue, bo as ValidationResult, bp as assertValidTileflowRuntimeSource, bq as clearTileflowManifestCache, br as color, bs as createTileflowSessionController, bt as createTileflowSessionId, bu as defaultTileflowManifestUrl, bv as defaultTileflowRuntimeView, bw as fixed, bx as getTileflowAnalyticsApiUrl, by as getTileflowStyleFontFaces, bz as inferTileflowAnalyticsFromStyleUrl, bA as isTileflowTimeOfDay, bB as loadTileflowManifest, bC as mergeTileflowAnalytics, bD as nearestTileflowBlendTheme, bE as normalizeTileflowRuntimeCenter, bF as normalizeTileflowStaticImageSize, bG as normalizeTileflowUrl, bH as resolveTileflowAnalyticsRequestUrl, bI as resolveTileflowManifestMap, bJ as resolveTileflowMapMode, bK as resolveTileflowRuntimeStyle, bL as resolveTileflowRuntimeTheme, bM as resolveTileflowRuntimeThemeBlend, bN as resolveTileflowRuntimeView, bO as resolveTileflowStaticImageUrl, bP as shouldLoadTileflowManifest, bQ as startTileflowSession, bR as tileflowPoiCategories, t as tileflowRuntimeManifestLimits, g as tileflowRuntimeManifestVersion, bS as tileflowStyleFontFaceLimits, bT as tileflowStyleFontFacesMetadataKey, bU as tileflowThemeBlendLimits, bV as tileflowThemeTokenCategories, bW as tileflowTimesOfDay, bX as token, bY as validateTileflowRuntimeSource, bZ as validateTileflowThemeBlendSelection, b_ as validateTileflowThemeSelection, b$ as zoom } from './manifest-types-DnhSJjCM.js';
4
+ import { V as ValidationMessage, i as TileflowExpression, j as TileflowFixedValue, k as TileflowThemeTokenReference, l as TileflowThemeColorOperation, m as TileflowBackgroundStyle, n as TileflowCircleStyle, o as TileflowExtrusionStyle, p as TileflowFillStyle, q as TileflowLineStyle, r as TileflowSymbolStyle, M as MapLibreStyle, s as TileflowRoadsModuleOptions, u as TileflowRoadsModuleConfig, v as TileflowLabelsModuleOptions, w as TileflowLabelsModuleConfig, x as TileflowPoiModuleOptions, y as TileflowPoiModuleConfig } from './manifest-types-B0lQjabX.js';
5
+ export { z as MapLibreSprite, A as TileflowAerodromeCodeDetail, B as TileflowAlignment, C as TileflowAnalytics, D as TileflowAreaStyle, E as TileflowBackgroundPaint, F as TileflowCirclePaint, G as TileflowColor, H as TileflowColorStyleValue, I as TileflowExtrusionPaint, J as TileflowFillPaint, K as TileflowIconAnchor, L as TileflowIconLayout, N as TileflowIconPaint, O as TileflowIconStyle, P as TileflowIconTextFit, Q as TileflowImageStyleValue, R as TileflowLabelDetail, S as TileflowLabelLanguage, U as TileflowLabelStyles, W as TileflowLayerRange, X as TileflowLight, Y as TileflowLineCap, Z as TileflowLineHatchStyle, _ as TileflowLineJoin, $ as TileflowLineLayout, a0 as TileflowLinePaint, a1 as TileflowLineStackStyle, a2 as TileflowManifestFetchOptions, a3 as TileflowManifestLoadOptions, a4 as TileflowMapMode, a5 as TileflowMapModeOptions, a6 as TileflowMarkerSymbolStyle, a7 as TileflowMountainBikeScale, a8 as TileflowNumberInsetsStyleValue, a9 as TileflowNumberStyleValue, aa as TileflowPlaceLabelClass, ab as TileflowPoiCategory, ac as TileflowPoiCategoryStyle, ad as TileflowPoiColorMode, ae as TileflowPoiDensity, af as TileflowPoiPlacementOrder, ag as TileflowPriorityOrder, ah as TileflowProjection, ai as TileflowResolvedRuntimeTheme, aj as TileflowRoadAreaStyle, ak as TileflowRoadClass, al as TileflowRoadClassStyle, am as TileflowRoadCrossingStyle, an as TileflowRoadDetail, ao as TileflowRoadExtras, ap as TileflowRoadHierarchy, aq as TileflowRoadLabelDetail, ar as TileflowRoadLayerStyle, as as TileflowRoadModifier, at as TileflowRoadOutline, au as TileflowRoadRestriction, av as TileflowRoadRoundaboutStyle, aw as TileflowRoadServiceType, ax as TileflowRoadShieldDetail, ay as TileflowRoadShieldStyles, az as TileflowRoadSidewalkStyle, aA as TileflowRoadStreetLightStyle, aB as TileflowRoadStructure, aC as TileflowRoadTreatmentLayerStyle, aD as TileflowRoadTreatmentLineStyle, aE as TileflowRoadTreatmentStyle, aF as TileflowRoadWeight, aG as TileflowRuntimeCenterLike, a as TileflowRuntimeColorScheme, T as TileflowRuntimeManifest, aH as TileflowRuntimeManifestMap, b as TileflowRuntimeManifestMapEntry, c as TileflowRuntimeManifestTheme, aI as TileflowRuntimeSource, aJ as TileflowRuntimeSourceValidation, aK as TileflowRuntimeStyle, aL as TileflowRuntimeStyleOptions, d as TileflowRuntimeSystemThemes, aM as TileflowRuntimeViewOptions, aN as TileflowSessionController, aO as TileflowSessionGrantResponse, aP as TileflowStringStyleValue, aQ as TileflowStructuralStyleValue, aR as TileflowStyleFontFace, aS as TileflowStyleValue, aT as TileflowSymbolOverlap, aU as TileflowSymbolPlacement, aV as TileflowSymbolPlacementStyle, aW as TileflowSymbolZOrder, aX as TileflowTerrain, aY as TileflowTerrainConfig, aZ as TileflowTerrainContourLabelStyle, a_ as TileflowTerrainContourLineStyle, a$ as TileflowTerrainContoursConfig, b0 as TileflowTerrainEncoding, b1 as TileflowTerrainHillshadeStyle, b2 as TileflowTerrainLayerRange, b3 as TileflowTerrainMode, b4 as TileflowTextAnchor, b5 as TileflowTextBackground, b6 as TileflowTextJustify, b7 as TileflowTextLayout, b8 as TileflowTextPaint, b9 as TileflowTextStyle, ba as TileflowThemeBlendSelection, bb as TileflowThemeColorAlpha, bc as TileflowThemeColorMix, bd as TileflowThemeColorValue, be as TileflowThemeFontValue, bf as TileflowThemeImageValue, bg as TileflowThemeNumberValue, bh as TileflowThemeSelection, bi as TileflowThemeTokenCategory, bj as TileflowThemeValue, e as TileflowTimeOfDay, f as TileflowTimeOfDayVariants, bk as TileflowViewConfig, bl as TileflowWaterLabelClass, bm as TileflowZoomInterpolation, bn as TileflowZoomValue, bo as ValidationResult, bp as assertValidTileflowRuntimeSource, bq as clearTileflowManifestCache, br as color, bs as createTileflowSessionController, bt as createTileflowSessionId, bu as defaultTileflowManifestUrl, bv as defaultTileflowRuntimeView, bw as fixed, bx as getTileflowAnalyticsApiUrl, by as getTileflowStyleFontFaces, bz as inferTileflowAnalyticsFromStyleUrl, bA as isTileflowTimeOfDay, bB as loadTileflowManifest, bC as mergeTileflowAnalytics, bD as nearestTileflowBlendTheme, bE as normalizeTileflowRuntimeCenter, bF as normalizeTileflowStaticImageSize, bG as normalizeTileflowUrl, bH as resolveTileflowAnalyticsRequestUrl, bI as resolveTileflowManifestMap, bJ as resolveTileflowMapMode, bK as resolveTileflowRuntimeStyle, bL as resolveTileflowRuntimeTheme, bM as resolveTileflowRuntimeThemeBlend, bN as resolveTileflowRuntimeView, bO as resolveTileflowStaticImageUrl, bP as shouldLoadTileflowManifest, bQ as startTileflowSession, bR as tileflowPoiCategories, t as tileflowRuntimeManifestLimits, g as tileflowRuntimeManifestVersion, bS as tileflowStyleFontFaceLimits, bT as tileflowStyleFontFacesMetadataKey, bU as tileflowThemeBlendLimits, bV as tileflowThemeTokenCategories, bW as tileflowTimesOfDay, bX as token, bY as validateTileflowRuntimeSource, bZ as validateTileflowThemeBlendSelection, b_ as validateTileflowThemeSelection, b$ as zoom } from './manifest-types-B0lQjabX.js';
6
6
  export { N as NormalizedTileflowCaptureScene, b as NormalizedTileflowCaptureShot, c as NormalizedTileflowCaptureShotCamera, d as TileflowCaptureApplicationTarget, e as TileflowCaptureBoundsCamera, f as TileflowCaptureCamera, g as TileflowCaptureCenterCamera, h as TileflowCaptureMapTarget, T as TileflowCaptureScene, a as TileflowCaptureShot, i as TileflowCaptureShotBlend, j as TileflowCaptureShotEasing, k as TileflowCaptureShotFrame, l as TileflowCaptureShotKeyframe, m as TileflowCaptureTarget, n as TileflowCaptureViewport, o as normalizeTileflowCaptureId, p as normalizeTileflowCaptureScene, q as normalizeTileflowCaptureShot, t as tileflowCaptureApplicationTargetSchema, r as tileflowCaptureBoundsCameraSchema, s as tileflowCaptureCameraSchema, u as tileflowCaptureCenterCameraSchema, v as tileflowCaptureIdSchema, w as tileflowCaptureMapTargetSchema, x as tileflowCaptureSceneLimits, y as tileflowCaptureSceneNameSchema, z as tileflowCaptureSceneSchema, A as tileflowCaptureSceneSchemaVersion, B as tileflowCaptureShotBlendSchema, C as tileflowCaptureShotFrameCount, D as tileflowCaptureShotFrames, E as tileflowCaptureShotKeyframeSchema, F as tileflowCaptureShotLimits, G as tileflowCaptureShotNameSchema, H as tileflowCaptureShotSchema, I as tileflowCaptureShotSchemaVersion, J as tileflowCaptureTargetSchema, K as tileflowCaptureViewportSchema } from './capture-shot-ChPQvPyi.js';
7
7
  export { tileflowPortableIdSchema, tileflowThemeNameSchema } from './capture.js';
8
8
  export { parseTileflowRuntimeManifest, safeParseTileflowRuntimeManifest, tileflowRuntimeManifestSchema } from './manifest.js';
@@ -1529,6 +1529,12 @@ type TileflowModelRoleLighting = Readonly<{
1529
1529
  colorMix?: number;
1530
1530
  metallic?: number;
1531
1531
  roughness?: number;
1532
+ /** Map shading normalizes sunlight to the surrounding extruded buildings. */
1533
+ shading?: 'physical' | 'map';
1534
+ /** Multiplier for the scene's model ambient occlusion. Defaults to one. */
1535
+ ambientOcclusion?: number;
1536
+ /** Contribution of named part colours after the role tint. Defaults to one. */
1537
+ partColorMix?: number;
1532
1538
  colorVariation?: Readonly<{
1533
1539
  hue: readonly [number, number];
1534
1540
  saturation: readonly [number, number];
@@ -1596,6 +1602,8 @@ type TileflowBuildings3DDesign = Readonly<{
1596
1602
  /** Shadows from the sun, and contact shadow at the foot of the walls. */
1597
1603
  shadows: boolean;
1598
1604
  occlusion: boolean;
1605
+ /** Ground contact shadow strength; facade shading is independent. */
1606
+ groundOcclusion?: number;
1599
1607
  /** Strength of prepared model ambient visibility; zero leaves the sky contribution unchanged. */
1600
1608
  modelOcclusion?: number;
1601
1609
  /** Building models the map places in its city, each replacing the buildings under it. */
@@ -1703,7 +1711,7 @@ type TileflowModelEntry = TileflowModel & Readonly<{
1703
1711
  /** What compresses a file's buffers: meshoptimizer's encoder, once ready. */
1704
1712
  type TileflowModelCompressor = Readonly<{
1705
1713
  reorderMesh(indices: Uint32Array, triangles: boolean, optsize: boolean): [Uint32Array, number];
1706
- encodeGltfBuffer(source: Uint8Array, count: number, size: number, mode: string): Uint8Array;
1714
+ encodeGltfBuffer(source: Uint8Array, count: number, size: number, mode: string, version?: number): Uint8Array;
1707
1715
  }>;
1708
1716
  /** What decompresses them: meshoptimizer's decoder, once ready. */
1709
1717
  type TileflowModelDecompressor = Readonly<{
package/dist/index.js CHANGED
@@ -897,6 +897,7 @@ var init_visual_semantics = __esm({
897
897
  "lightness",
898
898
  "fadeDuration",
899
899
  "gapWidth",
900
+ "groundOcclusion",
900
901
  "haloBlur",
901
902
  "haloWidth",
902
903
  "height",
@@ -9013,6 +9014,7 @@ function resolvePoi(request) {
9013
9014
  density: request?.density ?? 2,
9014
9015
  detailZoom: request?.detailZoom ?? 17,
9015
9016
  densityByCategory: { ...request?.densityByCategory },
9017
+ maxRankByType: { ...request?.maxRankByType },
9016
9018
  icons: request?.icons ?? true,
9017
9019
  labels: request?.labels ?? true,
9018
9020
  minZoom: request?.minZoom ?? 0,
@@ -9500,6 +9502,9 @@ function compileCategory(category, request, semantics, context, language, select
9500
9502
  }
9501
9503
  function createPoiSelection(semantics, context, language) {
9502
9504
  const { fields: fields2 } = context.data.schema;
9505
+ const typeRankCaps = Object.entries(semantics.maxRankByType).sort(
9506
+ ([a], [b]) => a.localeCompare(b)
9507
+ );
9503
9508
  const shown = /* @__PURE__ */ new Map();
9504
9509
  const iconOnlyTypes = [...new Set(semantics.placement.iconOnlyTypes)];
9505
9510
  const iconOnly = () => iconOnlyTypes.length ? ["match", ["get", fields2.poiType], iconOnlyTypes, true, false] : ["literal", false];
@@ -9535,6 +9540,14 @@ function createPoiSelection(semantics, context, language) {
9535
9540
  [">=", sizeRank, 0],
9536
9541
  ["<=", sizeRank, 16]
9537
9542
  ];
9543
+ if (typeRankCaps.length) {
9544
+ result.push([
9545
+ "match",
9546
+ ["get", fields2.poiType],
9547
+ ...typeRankCaps.flatMap(([type, rank]) => [type, ["<=", filterRank, rank]]),
9548
+ true
9549
+ ]);
9550
+ }
9538
9551
  if (!semantics.icons || !semantics.labels) return result;
9539
9552
  const textless = categories.filter((category) => !shown.get(category)?.text);
9540
9553
  const iconless = categories.filter((category) => !shown.get(category)?.icon);
@@ -13736,6 +13749,9 @@ function readModelRoleLighting(value) {
13736
13749
  ...entry.colorMix === void 0 ? {} : { colorMix: bounded(entry.colorMix, 0, 1, 1) },
13737
13750
  ...entry.metallic === void 0 ? {} : { metallic: bounded(entry.metallic, 0, 1, 0) },
13738
13751
  ...entry.roughness === void 0 ? {} : { roughness: bounded(entry.roughness, 0, 1, 1) },
13752
+ ...entry.shading === "map" || entry.shading === "physical" ? { shading: entry.shading } : {},
13753
+ ...entry.ambientOcclusion === void 0 ? {} : { ambientOcclusion: bounded(entry.ambientOcclusion, 0, 1, 1) },
13754
+ ...entry.partColorMix === void 0 ? {} : { partColorMix: bounded(entry.partColorMix, 0, 1, 1) },
13739
13755
  ...readRoleColorVariation(entry.colorVariation),
13740
13756
  emissiveHeight: Array.isArray(gradient) && gradient.length === 5 && gradient.every(
13741
13757
  (v, i) => typeof v === "number" && Number.isFinite(v) && v <= 1 && v >= (i === 4 ? -1 : 0)
@@ -13819,6 +13835,7 @@ var tileflowDefaultBuildings3DDesign = Object.freeze({
13819
13835
  windows: false,
13820
13836
  shadows: true,
13821
13837
  occlusion: true,
13838
+ groundOcclusion: 0.16,
13822
13839
  modelOcclusion: 0.75
13823
13840
  });
13824
13841
  function tileflowBuildingsMetadata(design) {
@@ -13845,7 +13862,7 @@ function readTileflowBuildings3D(metadata) {
13845
13862
  },
13846
13863
  color: color3,
13847
13864
  edges: within(value.edges, 1, 0),
13848
- edgeRadius: within(value.edgeRadius, 1, defaults4.edgeRadius),
13865
+ edgeRadius: within(value.edgeRadius, 1.5, defaults4.edgeRadius),
13849
13866
  lighting: value.lighting === "style" ? "style" : defaults4.lighting,
13850
13867
  colorVariation: within(value.colorVariation, 1, 0),
13851
13868
  verticalGradient: value.verticalGradient !== false,
@@ -13858,6 +13875,7 @@ function readTileflowBuildings3D(metadata) {
13858
13875
  ...readTileflowBuildingsEntrance(value.entrance),
13859
13876
  shadows: typeof value.shadows === "boolean" ? value.shadows : defaults4.shadows,
13860
13877
  occlusion: typeof value.occlusion === "boolean" ? value.occlusion : defaults4.occlusion,
13878
+ groundOcclusion: within(value.groundOcclusion, 1, defaults4.groundOcclusion),
13861
13879
  modelOcclusion: within(value.modelOcclusion, 1, defaults4.modelOcclusion),
13862
13880
  ...modelsOf(value.models),
13863
13881
  ...modelColorsOf(value.modelColors),
@@ -17324,6 +17342,9 @@ var modelRoleLightingSchema = z7.object({
17324
17342
  colorMix: boundedThemeNumberSchema(0, 1).optional(),
17325
17343
  metallic: boundedThemeNumberSchema(0, 1).optional(),
17326
17344
  roughness: boundedThemeNumberSchema(0, 1).optional(),
17345
+ shading: z7.enum(["physical", "map"]).optional(),
17346
+ ambientOcclusion: boundedThemeNumberSchema(0, 1).optional(),
17347
+ partColorMix: boundedThemeNumberSchema(0, 1).optional(),
17327
17348
  colorVariation: z7.object({
17328
17349
  hue: z7.tuple([boundedThemeNumberSchema(0, 360), boundedThemeNumberSchema(0, 360)]),
17329
17350
  saturation: z7.tuple([boundedThemeNumberSchema(0, 100), boundedThemeNumberSchema(0, 100)]),
@@ -17350,7 +17371,7 @@ var buildingsModuleSchema = z7.object({
17350
17371
  lighting: z7.enum(["style", "sun"]).optional(),
17351
17372
  colorVariation: boundedThemeNumberSchema(0, 1).optional(),
17352
17373
  edges: boundedThemeNumberSchema(0, 1).optional(),
17353
- edgeRadius: z7.number().min(0).max(1).optional(),
17374
+ edgeRadius: z7.number().min(0).max(1.5).optional(),
17354
17375
  edgeColor: themeColorValueSchema.optional(),
17355
17376
  nightLight: boundedThemeNumberSchema(0, 2).optional(),
17356
17377
  floodLight: z7.object({
@@ -17373,6 +17394,7 @@ var buildingsModuleSchema = z7.object({
17373
17394
  }).strict().optional(),
17374
17395
  entrance: z7.object({ buildings: entranceBandSchema.optional(), models: entranceBandSchema.optional() }).strict().optional(),
17375
17396
  occlusion: z7.boolean().optional(),
17397
+ groundOcclusion: boundedThemeNumberSchema(0, 1).optional(),
17376
17398
  modelOcclusion: boundedThemeNumberSchema(0, 1).optional(),
17377
17399
  shadows: z7.boolean().optional(),
17378
17400
  windows: z7.boolean().optional(),
@@ -17621,6 +17643,17 @@ var poiModuleSchema = z7.object({
17621
17643
  type: z7.literal("poi"),
17622
17644
  detailZoom: z7.number().finite().gt(16).max(24).optional(),
17623
17645
  categories: z7.array(z7.enum(tileflowPoiCategories)).optional(),
17646
+ maxRankByType: z7.record(
17647
+ z7.string().regex(/^[a-z0-9]+(?:_[a-z0-9]+)*$/u, "Expected a World POI type"),
17648
+ z7.union([
17649
+ z7.literal(0),
17650
+ z7.literal(1),
17651
+ z7.literal(2),
17652
+ z7.literal(3),
17653
+ z7.literal(4),
17654
+ z7.literal(5)
17655
+ ])
17656
+ ).describe("Fixed maximum World filter rank per POI type, independent of zoom detail.").optional(),
17624
17657
  color: z7.enum(["uniform", "category"]).optional(),
17625
17658
  density: z7.union([z7.literal(1), z7.literal(2), z7.literal(3), z7.literal(4), z7.literal(5)]).describe(
17626
17659
  "POI density from 1 to 5. Defaults to 2; native collisions determine which eligible names fit."
@@ -20617,6 +20650,7 @@ function tileflowBuildings3DDesignOf(module, context, layers2, buildingModels, t
20617
20650
  ...readTileflowBuildingsEntrance(style.entrance),
20618
20651
  shadows: typeof style.shadows === "boolean" ? style.shadows : defaults4.shadows,
20619
20652
  occlusion: typeof style.occlusion === "boolean" ? style.occlusion : defaults4.occlusion,
20653
+ groundOcclusion: number(style.groundOcclusion, defaults4.groundOcclusion),
20620
20654
  modelOcclusion: number(style.modelOcclusion, defaults4.modelOcclusion),
20621
20655
  ...placedModels(style.models, buildingModels),
20622
20656
  ...modelColours(style.modelColors),
@@ -25396,7 +25430,13 @@ function encodeTileflowModels(models, compressor) {
25396
25430
  return bufferViews.length - 1;
25397
25431
  }
25398
25432
  const mode = vertices ? "ATTRIBUTES" : "TRIANGLES";
25399
- const packed = compressor.encodeGltfBuffer(bytes, count, stride, mode);
25433
+ const packed = compressor.encodeGltfBuffer(
25434
+ bytes,
25435
+ count,
25436
+ stride,
25437
+ mode,
25438
+ vertices ? 1 : void 0
25439
+ );
25400
25440
  const byteOffset = addBlob(packed);
25401
25441
  const fallbackOffset = fallbackLength;
25402
25442
  fallbackLength += bytes.byteLength + (4 - bytes.byteLength % 4) % 4;
@@ -25844,6 +25884,24 @@ function quantise(mesh, compressor) {
25844
25884
  order = new Array(unique);
25845
25885
  for (const [index, vertex] of kept.entries())
25846
25886
  if (remap[index] !== 4294967295) order[remap[index]] = vertex;
25887
+ } else if (compressor) {
25888
+ for (const { from, count: length } of mesh.surface.ranges) {
25889
+ const range2 = indices.slice(from, from + length);
25890
+ const [remap, unique] = compressor.reorderMesh(range2, true, false);
25891
+ const global = new Uint32Array(unique);
25892
+ for (const [vertex, local] of remap.entries())
25893
+ if (local !== 4294967295) global[local] = vertex;
25894
+ for (const [at, local] of range2.entries()) indices[from + at] = global[local];
25895
+ }
25896
+ const renumber = new Uint32Array(kept.length).fill(4294967295);
25897
+ order = [];
25898
+ for (const [at, vertex] of indices.entries()) {
25899
+ if (renumber[vertex] === 4294967295) {
25900
+ renumber[vertex] = order.length;
25901
+ order.push(kept[vertex]);
25902
+ }
25903
+ indices[at] = renumber[vertex];
25904
+ }
25847
25905
  }
25848
25906
  const vertices = new Uint8Array(order.length * tileflowModelVertexBytes);
25849
25907
  const attributes = mesh.surface ? new Float32Array(order.length * 8) : void 0;
@@ -586,6 +586,8 @@ type TileflowPoiModuleConfig = {
586
586
  density?: TileflowPoiDensity;
587
587
  /** Category overrides of density, with the same zoom-dependent detail allowance. */
588
588
  densityByCategory?: Partial<Record<TileflowPoiCategory, TileflowPoiDensity>>;
589
+ /** Fixed maximum World filter rank per POI type (0–5), independent of zoom detail. */
590
+ maxRankByType?: Readonly<Record<string, 0 | 1 | 2 | 3 | 4 | 5>>;
589
591
  /** Zoom for the second extra rank of POI detail. Must exceed 16; defaults to 17. */
590
592
  detailZoom?: number;
591
593
  icons?: boolean;
@@ -1,5 +1,5 @@
1
- import { T as TileflowRuntimeManifest } from './manifest-types-DnhSJjCM.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-DnhSJjCM.js';
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';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const tileflowRuntimeManifestSchema: z.ZodType<TileflowRuntimeManifest>;
package/dist/native.d.ts CHANGED
@@ -362,4 +362,90 @@ declare function planTileflowThemeBlend(styles: readonly MapLibreStyle[], option
362
362
  /** Fills one blend template for a position. Plain values pass through unchanged. */
363
363
  declare function fillTileflowThemeBlendTemplate(template: unknown, position: number): unknown;
364
364
 
365
- export { type TileflowNativeAbortSignal, type TileflowNativeInitialView, type TileflowNativeInitialViewOptions, type TileflowNativeManifestAcquire, type TileflowNativeManifestLoadOptions, type TileflowNativeManifestOperation, type TileflowNativeManifestReader, type TileflowNativeManifestResponse, type TileflowNativeManifestResult, type TileflowNativeNetworkOptions, type TileflowNativeResourceUrlOptions, type TileflowNativeSource, type TileflowNativeSourceController, TileflowNativeSourceError, type TileflowNativeSourceErrorCode, type TileflowNativeSourceErrorField, type TileflowNativeSourceOptions, type TileflowNativeSourceState, TileflowNativeUrlError, type TileflowNativeUrlErrorCode, type TileflowNativeUrlField, type TileflowThemeBlendClock, TileflowThemeBlendError, type TileflowThemeBlendImage, type TileflowThemeBlendOptions, type TileflowThemeBlendPaint, type TileflowThemeBlendPlan, type TileflowThemeBlendSelection, type TileflowThemeBlendSwitch, type TileflowTimeOfDay, type TileflowTimeOfDayVariants, createTileflowNativeSourceController, fillTileflowThemeBlendTemplate, loadTileflowNativeManifest, nearestTileflowBlendTheme, planTileflowThemeBlend, resolveTileflowNativeInitialView, resolveTileflowNativeManifestUrl, resolveTileflowNativeResourceUrl, tileflowNativeManifestLimits, tileflowNativeUrlLimits, tileflowThemeBlendLimits, validateTileflowThemeBlendSelection };
365
+ /**
366
+ * Boundaries families. Each one has its own license, attribution, TileJSON path and style source
367
+ * ID; families are never merged.
368
+ */
369
+ declare const tileflowBoundaryFamilies: Readonly<{
370
+ boundaries: Readonly<{
371
+ attribution: "© OpenStreetMap contributors";
372
+ license: "ODbL-1.0";
373
+ path: "/tiles/boundaries/tiles.json";
374
+ sourceId: "tileflow-boundaries";
375
+ }>;
376
+ }>;
377
+ type TileflowBoundaryFamily = keyof typeof tileflowBoundaryFamilies;
378
+
379
+ /** A value a choropleth can colour: a number for scales, a string for categories. */
380
+ type TileflowBoundaryValue = number | string;
381
+ /** One row of an application's data, keyed by a registry ID or an official code. */
382
+ type TileflowBoundaryRow = Readonly<{
383
+ key: number | string;
384
+ /** `null` leaves the area without a value. */
385
+ value: TileflowBoundaryValue | null;
386
+ }>;
387
+ /** Keys present on every `boundary_area` polygon, usable without the lookup table. */
388
+ type TileflowBoundaryFeatureKey = 'id' | 'iso_3166_1' | 'ref';
389
+ /** Rows joined to areas by one polygon key. */
390
+ type TileflowBoundaryValues = Readonly<{
391
+ joinBy: TileflowBoundaryFeatureKey;
392
+ rows: readonly TileflowBoundaryRow[];
393
+ }>;
394
+
395
+ type FeatureTarget = {
396
+ id?: number | string;
397
+ source: string;
398
+ sourceLayer?: string;
399
+ };
400
+ /** The part of a MapLibre map the controller uses. */
401
+ type TileflowFeatureStateMap = {
402
+ getSource(id: string): unknown;
403
+ getStyle?(): {
404
+ sources?: Record<string, unknown>;
405
+ } | undefined;
406
+ off(type: 'styledata', listener: () => void): unknown;
407
+ on(type: 'styledata', listener: () => void): unknown;
408
+ removeFeatureState(target: FeatureTarget, key?: string): void;
409
+ setFeatureState(target: FeatureTarget & {
410
+ id: number | string;
411
+ }, state: Record<string, unknown>): void;
412
+ };
413
+ type CreateBoundaryFeatureStateOptions = Readonly<{
414
+ /** Defaults to `boundaries`. */
415
+ family?: TileflowBoundaryFamily;
416
+ /** Also set the values on `boundary_label` points, for labels styled by value. */
417
+ labels?: boolean;
418
+ /** Feature-state key; it must match the choropleth's `state`. Defaults to `value`. */
419
+ state?: string;
420
+ }>;
421
+ type TileflowBoundaryFeatureState = Readonly<{
422
+ /** Remove every value this controller set. */
423
+ clear: () => void;
424
+ /** Remove the values and stop following style reloads. */
425
+ dispose: () => void;
426
+ /**
427
+ * Replace the values. Rows must be keyed by the source's feature ID: `id` by default, or `ref`
428
+ * when the map declares `promoteId: 'ref'`. Rows with a `null` value are removed.
429
+ */
430
+ set: (values: TileflowBoundaryValues) => void;
431
+ }>;
432
+ /**
433
+ * Keep Boundaries feature-state in sync with application rows. Values survive a style reload: the
434
+ * controller sets them again once the source is back.
435
+ */
436
+ declare function createBoundaryFeatureState(map: TileflowFeatureStateMap, options?: CreateBoundaryFeatureStateOptions): TileflowBoundaryFeatureState;
437
+
438
+ /** Public selectors only; authority is acquired separately for each protected resource. */
439
+ type TileflowMobileDiscovery = Readonly<{
440
+ version: 1;
441
+ mapId: string;
442
+ deploymentVersion: number;
443
+ representations: Readonly<Partial<Record<'native-v1' | 'webview-v1', Readonly<{
444
+ manifestUrl: string;
445
+ }>>>>;
446
+ }>;
447
+ declare const tileflowMobileDiscoveryMaximumBytes = 4096;
448
+ /** Bind every advertised representation to the exact Hosted origin and Map being requested. */
449
+ declare function parseTileflowMobileDiscovery(value: unknown, discoveryUrl: string): TileflowMobileDiscovery;
450
+
451
+ export { type CreateBoundaryFeatureStateOptions, type TileflowBoundaryFamily, type TileflowBoundaryFeatureState, type TileflowBoundaryRow, type TileflowBoundaryValues, type TileflowFeatureStateMap, type TileflowMobileDiscovery, type TileflowNativeAbortSignal, type TileflowNativeInitialView, type TileflowNativeInitialViewOptions, type TileflowNativeManifestAcquire, type TileflowNativeManifestLoadOptions, type TileflowNativeManifestOperation, type TileflowNativeManifestReader, type TileflowNativeManifestResponse, type TileflowNativeManifestResult, type TileflowNativeNetworkOptions, type TileflowNativeResourceUrlOptions, type TileflowNativeSource, type TileflowNativeSourceController, TileflowNativeSourceError, type TileflowNativeSourceErrorCode, type TileflowNativeSourceErrorField, type TileflowNativeSourceOptions, type TileflowNativeSourceState, TileflowNativeUrlError, type TileflowNativeUrlErrorCode, type TileflowNativeUrlField, type TileflowThemeBlendClock, TileflowThemeBlendError, type TileflowThemeBlendImage, type TileflowThemeBlendOptions, type TileflowThemeBlendPaint, type TileflowThemeBlendPlan, type TileflowThemeBlendSelection, type TileflowThemeBlendSwitch, type TileflowTimeOfDay, type TileflowTimeOfDayVariants, createBoundaryFeatureState, createTileflowNativeSourceController, fillTileflowThemeBlendTemplate, loadTileflowNativeManifest, nearestTileflowBlendTheme, parseTileflowMobileDiscovery, planTileflowThemeBlend, resolveTileflowNativeInitialView, resolveTileflowNativeManifestUrl, resolveTileflowNativeResourceUrl, tileflowBoundaryFamilies, tileflowMobileDiscoveryMaximumBytes, tileflowNativeManifestLimits, tileflowNativeUrlLimits, tileflowThemeBlendLimits, validateTileflowThemeBlendSelection };
package/dist/native.js CHANGED
@@ -5951,18 +5951,211 @@ function snapshotView(input) {
5951
5951
 
5952
5952
  // src/native.ts
5953
5953
  init_theme_blend();
5954
+
5955
+ // src/boundary-areas/schema.ts
5956
+ var tileflowBoundaryClasses = [
5957
+ "country",
5958
+ "dependency",
5959
+ "region",
5960
+ "province_or_county",
5961
+ "municipality",
5962
+ "district",
5963
+ "neighbourhood"
5964
+ ];
5965
+ var tileflowBoundaryClassTiers = ["primary", "secondary"];
5966
+ var tileflowBoundaryAreasV1Schema = Object.freeze({
5967
+ classes: tileflowBoundaryClasses,
5968
+ /** First zoom at which each class appears, by tier. */
5969
+ classMinzoom: Object.freeze({
5970
+ country: Object.freeze({ primary: 0, secondary: 0 }),
5971
+ dependency: Object.freeze({ primary: 0, secondary: 0 }),
5972
+ region: Object.freeze({ primary: 3, secondary: 3 }),
5973
+ province_or_county: Object.freeze({ primary: 6, secondary: 7 }),
5974
+ municipality: Object.freeze({ primary: 8, secondary: 8 }),
5975
+ district: Object.freeze({ primary: 10, secondary: 10 }),
5976
+ neighbourhood: Object.freeze({ primary: 11, secondary: 11 })
5977
+ }),
5978
+ fields: Object.freeze({
5979
+ adminDepth: "admin_depth",
5980
+ adminLevel: "admin_level",
5981
+ class: "class",
5982
+ classTier: "class_tier",
5983
+ iso31661: "iso_3166_1",
5984
+ iso31662: "iso_3166_2",
5985
+ name: "name",
5986
+ nuts: "nuts",
5987
+ ref: "ref",
5988
+ wikidata: "wikidata"
5989
+ }),
5990
+ layers: Object.freeze({ areas: "boundary_area", labels: "boundary_label" }),
5991
+ /** Properties present on `boundary_area` polygons. */
5992
+ areaProperties: Object.freeze([
5993
+ "class",
5994
+ "class_tier",
5995
+ "admin_level",
5996
+ "admin_depth",
5997
+ "ref",
5998
+ "iso_3166_1"
5999
+ ]),
6000
+ maxzoom: 12,
6001
+ minzoom: 0,
6002
+ product: "boundaries-v1",
6003
+ schemaVersion: 1,
6004
+ tiers: tileflowBoundaryClassTiers
6005
+ });
6006
+ var tileflowBoundaryFamilies = Object.freeze({
6007
+ boundaries: Object.freeze({
6008
+ attribution: "\xA9 OpenStreetMap contributors",
6009
+ license: "ODbL-1.0",
6010
+ path: "/tiles/boundaries/tiles.json",
6011
+ sourceId: "tileflow-boundaries"
6012
+ })
6013
+ });
6014
+ function isTileflowBoundaryFamily(value) {
6015
+ return typeof value === "string" && Object.hasOwn(tileflowBoundaryFamilies, value);
6016
+ }
6017
+
6018
+ // src/boundary-areas/feature-state.ts
6019
+ function createBoundaryFeatureState(map2, options = {}) {
6020
+ const family = options.family ?? "boundaries";
6021
+ if (!isTileflowBoundaryFamily(family)) {
6022
+ throw new Error(`Unknown Tileflow Boundaries family: ${String(family)}.`);
6023
+ }
6024
+ const source = tileflowBoundaryFamilies[family].sourceId;
6025
+ const stateKey = options.state?.trim() || "value";
6026
+ const sourceLayers = [
6027
+ tileflowBoundaryAreasV1Schema.layers.areas,
6028
+ ...options.labels ? [tileflowBoundaryAreasV1Schema.layers.labels] : []
6029
+ ];
6030
+ let applied = /* @__PURE__ */ new Map();
6031
+ let disposed = false;
6032
+ const write = (id, value) => {
6033
+ for (const sourceLayer of sourceLayers) {
6034
+ map2.setFeatureState({ id, source, sourceLayer }, { [stateKey]: value });
6035
+ }
6036
+ };
6037
+ const erase = (id) => {
6038
+ for (const sourceLayer of sourceLayers) {
6039
+ map2.removeFeatureState({ id, source, sourceLayer }, stateKey);
6040
+ }
6041
+ };
6042
+ const sourceReady = () => map2.getSource(source) !== void 0;
6043
+ let pendingReload = false;
6044
+ const onStyleData = () => {
6045
+ if (!sourceReady()) {
6046
+ pendingReload = true;
6047
+ return;
6048
+ }
6049
+ if (!pendingReload) return;
6050
+ pendingReload = false;
6051
+ for (const [id, value] of applied) write(id, value);
6052
+ };
6053
+ map2.on("styledata", onStyleData);
6054
+ const assertOpen = () => {
6055
+ if (disposed) throw new Error("This Boundaries feature-state controller was disposed.");
6056
+ };
6057
+ return Object.freeze({
6058
+ clear() {
6059
+ assertOpen();
6060
+ if (sourceReady()) for (const id of applied.keys()) erase(id);
6061
+ applied = /* @__PURE__ */ new Map();
6062
+ },
6063
+ dispose() {
6064
+ if (disposed) return;
6065
+ if (sourceReady()) for (const id of applied.keys()) erase(id);
6066
+ applied = /* @__PURE__ */ new Map();
6067
+ map2.off("styledata", onStyleData);
6068
+ disposed = true;
6069
+ },
6070
+ set(values) {
6071
+ assertOpen();
6072
+ const featureKey = promotedKey(map2, source) ?? "id";
6073
+ if (values.joinBy !== featureKey) {
6074
+ throw new Error(
6075
+ `Boundaries feature-state is keyed by ${featureKey}; join the rows to ${featureKey} first with joinBoundaryRows.`
6076
+ );
6077
+ }
6078
+ const next = /* @__PURE__ */ new Map();
6079
+ for (const row of values.rows) {
6080
+ if (row.value === null) continue;
6081
+ if (featureKey === "id") {
6082
+ if (typeof row.key !== "number" || !Number.isSafeInteger(row.key) || row.key < 0) {
6083
+ throw new Error("Boundaries feature-state rows keyed by id need integer keys.");
6084
+ }
6085
+ } else if (typeof row.key !== "string" || !row.key) {
6086
+ throw new Error("Boundaries feature-state rows keyed by ref need string keys.");
6087
+ }
6088
+ next.set(row.key, row.value);
6089
+ }
6090
+ if (sourceReady()) {
6091
+ for (const id of applied.keys()) if (!next.has(id)) erase(id);
6092
+ for (const [id, value] of next) if (applied.get(id) !== value) write(id, value);
6093
+ } else {
6094
+ pendingReload = true;
6095
+ }
6096
+ applied = next;
6097
+ }
6098
+ });
6099
+ }
6100
+ function promotedKey(map2, source) {
6101
+ const definition = map2.getStyle?.()?.sources?.[source];
6102
+ const promoteId = definition?.promoteId;
6103
+ if (promoteId === void 0) return void 0;
6104
+ const value = typeof promoteId === "string" ? promoteId : promoteId[tileflowBoundaryAreasV1Schema.layers.areas];
6105
+ return value === "ref" ? "ref" : void 0;
6106
+ }
6107
+
6108
+ // src/mobile-discovery.ts
6109
+ var tileflowMobileDiscoveryMaximumBytes = 4096;
6110
+ function parseTileflowMobileDiscovery(value, discoveryUrl) {
6111
+ const fail = () => {
6112
+ throw new Error("Invalid mobile discovery.");
6113
+ };
6114
+ if (typeof discoveryUrl !== "string" || discoveryUrl.length > 2048) return fail();
6115
+ const url = parseNativeUrl(discoveryUrl);
6116
+ const match = /^\/maps\/(map_[A-Za-z0-9_-]{16})\/mobile\/manifest\.json$/u.exec(url.pathname);
6117
+ if (!match || url.protocol !== "https:" || discoveryUrl !== `${url.origin}${url.pathname}`)
6118
+ return fail();
6119
+ const record2 = (candidate) => candidate !== null && typeof candidate === "object" && !Array.isArray(candidate);
6120
+ if (!record2(value) || Object.keys(value).sort().join(",") !== "deploymentVersion,mapId,representations,version")
6121
+ return fail();
6122
+ if (value.version !== 1 || value.mapId !== match[1] || !Number.isSafeInteger(value.deploymentVersion) || Number(value.deploymentVersion) < 1 || !record2(value.representations))
6123
+ return fail();
6124
+ const representations = {};
6125
+ const entries = Object.entries(value.representations);
6126
+ if (!entries.length || entries.length > 2) fail();
6127
+ for (const [profile, representation] of entries) {
6128
+ if (profile !== "native-v1" && profile !== "webview-v1") return fail();
6129
+ if (!record2(representation) || Object.keys(representation).join(",") !== "manifestUrl")
6130
+ return fail();
6131
+ const path = profile === "native-v1" ? "native" : "mobile/webview-v1";
6132
+ const expected = `${url.origin}/maps/${value.mapId}/${path}/manifest.json`;
6133
+ if (representation.manifestUrl !== expected) fail();
6134
+ representations[profile] = Object.freeze({ manifestUrl: expected });
6135
+ }
6136
+ return Object.freeze({
6137
+ version: 1,
6138
+ mapId: value.mapId,
6139
+ deploymentVersion: Number(value.deploymentVersion),
6140
+ representations: Object.freeze(representations)
6141
+ });
6142
+ }
5954
6143
  export {
5955
6144
  TileflowNativeSourceError,
5956
6145
  TileflowNativeUrlError,
5957
6146
  TileflowThemeBlendError,
6147
+ createBoundaryFeatureState,
5958
6148
  createTileflowNativeSourceController,
5959
6149
  fillTileflowThemeBlendTemplate,
5960
6150
  loadTileflowNativeManifest,
5961
6151
  nearestTileflowBlendTheme,
6152
+ parseTileflowMobileDiscovery,
5962
6153
  planTileflowThemeBlend,
5963
6154
  resolveTileflowNativeInitialView,
5964
6155
  resolveTileflowNativeManifestUrl,
5965
6156
  resolveTileflowNativeResourceUrl,
6157
+ tileflowBoundaryFamilies,
6158
+ tileflowMobileDiscoveryMaximumBytes,
5966
6159
  tileflowNativeManifestLimits,
5967
6160
  tileflowNativeUrlLimits,
5968
6161
  tileflowThemeBlendLimits,