@tileflow/core 0.1.0-alpha.32 → 0.1.0-alpha.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -420,6 +420,24 @@ type TileflowRoadRoundaboutStyle = {
420
420
  casing?: TileflowCircleStyle;
421
421
  fill?: TileflowCircleStyle;
422
422
  };
423
+ /**
424
+ * How Core's street lights renderer lights the map's streets at night, from the lamps and lit
425
+ * streets its data holds.
426
+ */
427
+ type TileflowRoadStreetLightStyle = {
428
+ /** The light of lamps whose data gives no colour; a warm white by default. */
429
+ color?: TileflowThemeColorValue;
430
+ /** Whether the map has street lights; defaults to true where the data binds street furniture. */
431
+ enabled?: boolean;
432
+ /**
433
+ * Where light is estimated where the data maps no lamps: `lit` (the default) along streets and
434
+ * pavements mapped as lit; `streets` also along streets the data says nothing about, in tiles
435
+ * that map few lamps, which invents light; `none` nowhere.
436
+ */
437
+ estimate?: 'lit' | 'streets' | 'none';
438
+ /** How bright the lights shine, from 0 to 2; defaults to 1. */
439
+ intensity?: TileflowThemeNumberValue;
440
+ };
423
441
  type TileflowRoadSidewalkStyle = {
424
442
  outline?: TileflowLineStyle;
425
443
  pattern?: TileflowFillStyle;
@@ -441,6 +459,7 @@ type TileflowRoadsModuleConfig = {
441
459
  roundabouts?: TileflowRoadRoundaboutStyle;
442
460
  serviceTypes?: Partial<Record<TileflowRoadServiceType, TileflowRoadTreatmentStyle>>;
443
461
  sidewalks?: TileflowRoadSidewalkStyle;
462
+ streetLights?: TileflowRoadStreetLightStyle;
444
463
  structures?: Partial<Record<TileflowRoadStructure, TileflowRoadLayerStyle>>;
445
464
  weight?: TileflowRoadWeight;
446
465
  widthScale?: Partial<Record<TileflowRoadClass, TileflowThemeNumberValue>>;
@@ -536,6 +555,137 @@ type MapLibreStyle = {
536
555
  metadata?: Record<string, unknown>;
537
556
  };
538
557
 
558
+ declare const tileflowSunMetadataKey = "tileflow:sun";
559
+ /** A theme's sun and sky light with every value resolved; see `TileflowThemeSun`. */
560
+ type TileflowSunPreset = Readonly<{
561
+ /** Degrees clockwise from north, from 0 to 360. */
562
+ azimuth: number;
563
+ /** Degrees above the horizon, from -90 to 90. */
564
+ altitude: number;
565
+ /** The direct light's colour. */
566
+ color: string;
567
+ /** The direct light's strength, from 0 to 1. */
568
+ intensity: number;
569
+ /** How dark the shadows the sun casts fall, from 0 (none) to 1. */
570
+ shadowIntensity: number;
571
+ /** The light from the sky, which reaches every surface and fills the shadows. */
572
+ ambient: Readonly<{
573
+ color: string;
574
+ intensity: number;
575
+ }>;
576
+ }>;
577
+ /** The sun as the map shows it, ready for an application's own layers. */
578
+ type TileflowSun = Readonly<{
579
+ /** Degrees clockwise from north, from 0 to 360. */
580
+ azimuth: number;
581
+ /** Degrees above the horizon, from -90 to 90. */
582
+ altitude: number;
583
+ /** A unit vector towards the sun: x east, y north, z up. */
584
+ direction: readonly [number, number, number];
585
+ /** The direct light's colour, as a CSS colour. */
586
+ color: string;
587
+ /** The direct light's colour as sRGB channels from 0 to 1. */
588
+ rgb: readonly [number, number, number];
589
+ /**
590
+ * The direct light's strength, from 0 to 1. It fades to 0 as the sun sets: a sun below the
591
+ * horizon lights nothing and casts no shadow.
592
+ */
593
+ intensity: number;
594
+ /** How dark the shadows the sun casts fall, from 0 (none) to 1. */
595
+ shadowIntensity: number;
596
+ /** The light from the sky, which reaches every surface and fills the shadows. */
597
+ ambient: Readonly<{
598
+ color: string;
599
+ rgb: readonly [number, number, number];
600
+ intensity: number;
601
+ }>;
602
+ /**
603
+ * How bright flat, open ground is under this light, from 0 (dark) to 1: the sky's light plus the
604
+ * sun's at its height, each weighted by its colour's luminance. Use it to switch lamps or windows
605
+ * on as a scene darkens, whatever theme or sun lights it.
606
+ */
607
+ brightness: number;
608
+ /** Where the direction comes from: the themes, angles, or a date and place. */
609
+ source: 'theme' | 'direction' | 'date';
610
+ }>;
611
+ /** The sun of a theme that leaves a value unset: high in the south-south-west, in white light. */
612
+ declare const tileflowDefaultSunPreset: TileflowSunPreset;
613
+ /**
614
+ * Where the sun stands for an instant and a place ([longitude, latitude] in degrees): its azimuth
615
+ * in degrees clockwise from north and its apparent altitude above the horizon, with atmospheric
616
+ * refraction. It follows NOAA's solar equations, accurate to about a hundredth of a degree for
617
+ * years 1800 to 2200.
618
+ */
619
+ declare function tileflowSunPosition(date: Date | number, location: readonly [number, number]): Readonly<{
620
+ azimuth: number;
621
+ altitude: number;
622
+ }>;
623
+ /** A unit vector towards a direction in the sky: x east, y north, z up. */
624
+ declare function tileflowSunDirection(azimuth: number, altitude: number): readonly [number, number, number];
625
+ /**
626
+ * The sun as the map shows it: a preset's light from a direction. Direct light fades out over the
627
+ * sun's last degrees above the horizon and is gone below it.
628
+ */
629
+ declare function resolveTileflowSun(preset: TileflowSunPreset, direction?: Readonly<{
630
+ azimuth: number;
631
+ altitude: number;
632
+ }>, source?: TileflowSun['source']): TileflowSun;
633
+ /**
634
+ * A preset `t` of the way from `from` to `to`: the azimuth turns the short way round, colours mix
635
+ * in OKLab, as theme blends mix paint colours, and numbers linearly.
636
+ */
637
+ declare function mixTileflowSunPresets(from: TileflowSunPreset, to: TileflowSunPreset, t: number): TileflowSunPreset;
638
+ /** Reads the sun a compiled style publishes, or undefined when its metadata has none. */
639
+ declare function readTileflowSunPreset(metadata: unknown): TileflowSunPreset | undefined;
640
+ /**
641
+ * The sun of a compiled style: the one it publishes, else one read from its light (a style whose
642
+ * theme describes no sun lights its extrusions from `light.position`), else the default.
643
+ */
644
+ declare function tileflowStyleSunPreset(style: {
645
+ light?: unknown;
646
+ metadata?: unknown;
647
+ } | undefined): TileflowSunPreset;
648
+
649
+ type TileflowThemeColorScheme = 'dark' | 'light';
650
+
651
+ declare const tileflowRouteMetadataKey = "tileflow:route";
652
+ /** The resolved inks of a route, from its outer glow to its bright core. */
653
+ type TileflowRouteInks = Readonly<{
654
+ /** The chosen route's line. */
655
+ line: string;
656
+ /** The edge on each side of the line, which sets it apart from the roads under it. */
657
+ casing: string;
658
+ /** A thin line along the middle of the route. */
659
+ core: string;
660
+ /** A soft halo around the route. */
661
+ glow: string;
662
+ /** Other routes offered beside the chosen one. */
663
+ alternative: string;
664
+ /** Opacity of the glow, from 0 (no glow) to 1. */
665
+ glowOpacity: number;
666
+ /** Opacity of the core, from 0 (no core) to 1. */
667
+ coreOpacity: number;
668
+ }>;
669
+ /** The inks of a theme that sets no route tokens: a blue that reads on either kind of map. */
670
+ declare const tileflowDefaultRouteInks: Readonly<Record<TileflowThemeColorScheme, TileflowRouteInks>>;
671
+ /**
672
+ * Reads the route inks a compiled style publishes, or undefined when its metadata has none (a
673
+ * style compiled before route inks, or not by Tileflow).
674
+ */
675
+ declare function readTileflowRouteInks(metadata: unknown): TileflowRouteInks | undefined;
676
+ /**
677
+ * The route inks of a compiled style: those it publishes, or the defaults of its colour scheme
678
+ * (from its `tileflow:colorScheme` metadata, else `fallbackScheme`).
679
+ */
680
+ declare function tileflowStyleRouteInks(style: {
681
+ metadata?: unknown;
682
+ } | undefined, fallbackScheme?: TileflowThemeColorScheme): TileflowRouteInks;
683
+ /**
684
+ * Inks between two themes' inks, `t` of the way from `from` to `to`: colours mix in OKLab, as theme
685
+ * blends mix paint colours, and opacities linearly.
686
+ */
687
+ declare function mixTileflowRouteInks(from: TileflowRouteInks, to: TileflowRouteInks, t: number): TileflowRouteInks;
688
+
539
689
  type TileflowRuntimeColorScheme = 'dark' | 'light';
540
690
 
541
691
  type TileflowAnalytics = {
@@ -610,11 +760,30 @@ type TileflowBoundariesModuleConfig = TileflowBoundariesModuleOptions & {
610
760
  };
611
761
 
612
762
  type TileflowBuildingMode = '3d' | 'flat';
763
+ /**
764
+ * How Core's 3D buildings renderer draws the map's buildings. Their colour is the map's own 3D
765
+ * building colour (its extrusion), else its roofs'.
766
+ */
767
+ type TileflowBuildingsThreeDimensionalStyle = {
768
+ /** How strongly roof outlines and outer corners catch the light, from 0 (none) to 1, the default. */
769
+ edges?: TileflowThemeNumberValue;
770
+ /** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
771
+ edgeColor?: TileflowThemeColorValue;
772
+ /** How bright the buildings light the street at night, from 0 (none) to 2; defaults to 1. */
773
+ nightLight?: TileflowThemeNumberValue;
774
+ /** Contact shadow at the foot of the walls and in tight corners; defaults to true. */
775
+ occlusion?: boolean;
776
+ /** Shadows from the sun, on the buildings and the flat map; defaults to true. */
777
+ shadows?: boolean;
778
+ /** Invented night windows, lit by rooms: decoration, not data. Defaults to false. */
779
+ windows?: boolean;
780
+ };
613
781
  type TileflowBuildingsModuleOptions = {
614
782
  businessCorridor?: TileflowAreaStyle;
615
783
  extrusion?: TileflowExtrusionStyle;
616
784
  flat?: TileflowAreaStyle;
617
785
  mode?: TileflowBuildingMode;
786
+ threeDimensional?: TileflowBuildingsThreeDimensionalStyle;
618
787
  };
619
788
  type TileflowBuildingsModuleConfig = TileflowBuildingsModuleOptions & {
620
789
  type: 'buildings';
@@ -685,13 +854,223 @@ type TileflowTransitModuleConfig = TileflowTransitModuleOptions & {
685
854
  type: 'transit';
686
855
  };
687
856
 
857
+ /** A prepared model, near and optionally far, as the style's tree description carries it. */
858
+ type TileflowTreeModel = Readonly<{
859
+ near: string;
860
+ far?: string;
861
+ }>;
862
+
863
+ type TileflowTileGeometryType = 'Point' | 'LineString' | 'Polygon';
864
+ type TileflowTileFeature = Readonly<{
865
+ /** The feature's id in the tile, when it has one. */
866
+ id?: number;
867
+ type: TileflowTileGeometryType;
868
+ properties: Readonly<Record<string, string | number | boolean>>;
869
+ /**
870
+ * One flat `[x0, y0, x1, y1, …]` array per point set, line or ring, in tile units from 0 to the
871
+ * layer's extent (coordinates in a tile's buffer fall outside that range). Polygon rings follow
872
+ * the MVT winding: an exterior ring is clockwise in tile units, a hole anticlockwise.
873
+ */
874
+ geometry: readonly (readonly number[])[];
875
+ }>;
876
+ type TileflowTileLayer = Readonly<{
877
+ /** Tile units across the tile, usually 4096. */
878
+ extent: number;
879
+ features: readonly TileflowTileFeature[];
880
+ }>;
881
+ type TileflowVectorTileDecodeOptions = Readonly<{
882
+ /** The layers to decode; others are skipped without decoding. Defaults to every layer. */
883
+ layers?: readonly string[];
884
+ }>;
885
+ /** Decodes a Mapbox Vector Tile's layers. Throws on bytes that are not a vector tile. */
886
+ declare function decodeTileflowVectorTile(bytes: Uint8Array, options?: TileflowVectorTileDecodeOptions): Readonly<Record<string, TileflowTileLayer>>;
887
+
888
+ /** The forms a 3D tree takes. */
889
+ declare const tileflowTreeForms: readonly ["round", "open", "tall", "conifer", "columnar", "palm"];
890
+ type TileflowTreeForm = (typeof tileflowTreeForms)[number];
891
+ /** How a tree's surfaces take the light: facets, a smooth round shape, or bands as drawn. */
892
+ declare const tileflowTreeFinishes: readonly ["faceted", "smooth", "toon"];
893
+ type TileflowTreeFinish = (typeof tileflowTreeFinishes)[number];
894
+ /** A form's own scales, on top of the map's, and the map's own models it draws. */
895
+ type TileflowTreeFormStyle = Readonly<{
896
+ heightScale?: number;
897
+ crownScale?: number;
898
+ /** Ids of the map's own models, one to four; each tree draws one by its stable seed. */
899
+ models?: readonly string[];
900
+ }>;
901
+ /** Relative weights of the forms given to trees whose data gives none. */
902
+ type TileflowTreeFormMix = Readonly<Partial<Record<TileflowTreeForm, number>>>;
903
+ /** A region whose trees without a form in the data take their own mix. */
904
+ type TileflowTreeRegion = Readonly<{
905
+ /** `[west, south, east, north]` in degrees. */
906
+ bounds: readonly [number, number, number, number];
907
+ unknownForms: TileflowTreeFormMix;
908
+ }>;
909
+ /** The fields of the tree and canopy layers, as World names them. */
910
+ type TileflowTreeFields = Readonly<{
911
+ height: string;
912
+ diameterCrown: string;
913
+ circumference: string;
914
+ genus: string;
915
+ species: string;
916
+ leafType: string;
917
+ /** The tree's taxon at any rank, such as `Arecaceae` for palms or a genus or species. */
918
+ taxon: string;
919
+ canopyRank: string;
920
+ canopyClearance: string;
921
+ canopyCover: string;
922
+ /** A canopy point's measured canopy height, in metres. */
923
+ canopyHeight: string;
924
+ }>;
925
+ type TileflowTreePlacementOptions = Readonly<{
926
+ /** The tile's address, for regions and for a stable look per tree. */
927
+ tile: Readonly<{
928
+ x: number;
929
+ y: number;
930
+ z: number;
931
+ }>;
932
+ /** The tile's width in metres. */
933
+ tileMetres: number;
934
+ fields?: Partial<TileflowTreeFields>;
935
+ unknownForms?: TileflowTreeFormMix;
936
+ regions?: readonly TileflowTreeRegion[];
937
+ /** Metres between the trees of a row; defaults to 8. */
938
+ rowSpacing?: number;
939
+ /** How many models each form draws from, 1 to 4; each tree draws one by its seed. */
940
+ variants?: Readonly<Partial<Record<TileflowTreeForm, number>>>;
941
+ }>;
942
+ /** A tile's layers trees come from, as World names them. */
943
+ type TileflowTreeLayers = Readonly<{
944
+ /**
945
+ * World's `tree`: trees mapped one by one as points, and rows of trees as lines, planted every
946
+ * `rowSpacing` metres.
947
+ */
948
+ trees?: TileflowTileLayer;
949
+ /** Decorative canopy points in parks and gardens (World's `canopy`). */
950
+ canopy?: TileflowTileLayer;
951
+ }>;
952
+ /** Where some trees are in a placement, and how many of them have each rank or a lower one. */
953
+ type TileflowTreeRange = Readonly<{
954
+ start: number;
955
+ count: number;
956
+ /** `upTo[r]`: trees of the range with a rank of `r` or lower, from 0 to 15. */
957
+ upTo: readonly number[];
958
+ }>;
959
+ /** Where a form's trees are in a placement, and those of each of its models in turn. */
960
+ type TileflowTreeFormRange = TileflowTreeRange & Readonly<{
961
+ /** One range per model the form draws from, in order; one when it draws Core's own tree. */
962
+ variants: readonly TileflowTreeRange[];
963
+ }>;
964
+ /** One tile's trees, ready to upload. */
965
+ type TileflowTreePlacement = Readonly<{
966
+ /** `tileflowTreeBytes` bytes per tree, ordered by form, model, then rank; see the layout below. */
967
+ trees: Uint8Array;
968
+ forms: Readonly<Record<TileflowTreeForm, TileflowTreeFormRange>>;
969
+ /** The tallest tree, in metres. */
970
+ tallest: number;
971
+ /** Trees from the data's trees and rows, and trees from canopy points. */
972
+ mapped: number;
973
+ canopy: number;
974
+ }>;
975
+ /**
976
+ * Bytes per tree: x and y in tile units of 8192 (uint16 each), height and crown diameter in
977
+ * decimetres (uint16 each), then one byte each for its turn (of a full turn), its shade among the
978
+ * theme's colours, its form, its rank (0–15, lower shows first), a seed, whether it stands for a
979
+ * canopy point (1) or a mapped tree (0), the model of its form it draws, and a byte of padding.
980
+ */
981
+ declare const tileflowTreeBytes = 16;
982
+ /**
983
+ * The form a tree's data gives it, or undefined when its data says nothing about its form: a palm
984
+ * by `leaf_type` or genus, a column, a conifer by `leaf_type` or genus, or one of the broadleaf
985
+ * forms by genus. `broadleaf` means the data says broadleaved without a known genus.
986
+ */
987
+ declare function tileflowTreeFormOf(properties: Readonly<Record<string, unknown>>, fields?: Partial<TileflowTreeFields>): TileflowTreeForm | 'broadleaf' | undefined;
988
+ /** Places a tile's trees. Points in the tile's buffer belong to the neighbouring tile. */
989
+ declare function placeTileflowTrees(layers: TileflowTreeLayers, options: TileflowTreePlacementOptions): TileflowTreePlacement;
990
+ /** The style metadata key under which a compiled map describes its 3D trees. */
991
+ declare const tileflowVegetationMetadataKey = "tileflow:vegetation";
992
+ /** How a compiled map's 3D trees look and where their data is, resolved for one theme. */
993
+ type TileflowVegetation3D = Readonly<{
994
+ /** The vector source and its layers with the trees and the canopy points. */
995
+ source: string;
996
+ layers: Readonly<{
997
+ tree: string;
998
+ canopy?: string;
999
+ }>;
1000
+ fields: TileflowTreeFields;
1001
+ /** Sunlit colours: bark, and the leaves of each kind of tree from darkest to lightest. */
1002
+ colors: Readonly<{
1003
+ bark: string;
1004
+ broadleaf: readonly string[];
1005
+ conifer: readonly string[];
1006
+ palm: readonly string[];
1007
+ }>;
1008
+ heightScale: number;
1009
+ crownScale: number;
1010
+ /** Each form's own scales and models. */
1011
+ forms: Readonly<Partial<Record<TileflowTreeForm, TileflowTreeFormStyle>>>;
1012
+ /** The map's own models its forms draw, by id, prepared from its `models` directories. */
1013
+ models: Readonly<Record<string, TileflowTreeModel>>;
1014
+ finish: TileflowTreeFinish;
1015
+ /** How strongly an outline rings each tree, from 0 (none) to 1, and its colour. */
1016
+ edges: number;
1017
+ edgeColor?: string;
1018
+ unknownForms: TileflowTreeFormMix;
1019
+ regions: readonly TileflowTreeRegion[];
1020
+ /** The style's layers that draw the trees flat, which the 3D trees stand in for while shown. */
1021
+ flatLayers: readonly string[];
1022
+ }>;
1023
+ /**
1024
+ * Reads the 3D trees a compiled style describes, or undefined when its metadata has none or holds
1025
+ * a version or shape this Core does not know.
1026
+ */
1027
+ declare function readTileflowVegetation3D(metadata: unknown): TileflowVegetation3D | undefined;
1028
+
688
1029
  type TileflowVegetationMode = '3d' | 'flat';
689
1030
  type TileflowVegetationThreeDimensionalStyle = {
690
1031
  barkColor?: TileflowThemeColorValue;
1032
+ /** Sunlit leaf colours of broadleaf trees, from darkest to lightest; up to four are used. */
691
1033
  broadleafColors?: readonly TileflowThemeColorValue[];
1034
+ /** Sunlit needle colours of conifers and columns, from darkest to lightest. */
692
1035
  coniferColors?: readonly TileflowThemeColorValue[];
1036
+ /** Sunlit frond colours of palms, from darkest to lightest; the broadleaf colours by default. */
1037
+ palmColors?: readonly TileflowThemeColorValue[];
693
1038
  crownScale?: TileflowThemeNumberValue;
694
1039
  heightScale?: TileflowThemeNumberValue;
1040
+ /**
1041
+ * How trees take the light: `faceted` (the default), low-poly facets softened towards a round
1042
+ * crown; `smooth`, round crowns; or `toon`, three bands of light and a crisp shadow, as a drawn
1043
+ * tree has them.
1044
+ */
1045
+ finish?: TileflowTreeFinish;
1046
+ /** How strongly an outline rings each tree, from 0 (none, the default) to 1. */
1047
+ edges?: TileflowThemeNumberValue;
1048
+ /** The outline's colour; the crown's darkest colour, deepened, by default. */
1049
+ edgeColor?: TileflowThemeColorValue;
1050
+ /**
1051
+ * Each form's own scales, on top of `heightScale` and `crownScale`, such as taller palms, and the
1052
+ * map's own models it draws: ids of `.glb` files in the map's `models` directories, one to four,
1053
+ * each tree drawing one. A model's materials named `bark`, `leaves`, `fronds` or `stem` take
1054
+ * those parts' colours.
1055
+ */
1056
+ forms?: Partial<Record<TileflowTreeForm, {
1057
+ heightScale?: TileflowThemeNumberValue;
1058
+ crownScale?: TileflowThemeNumberValue;
1059
+ models?: readonly string[];
1060
+ }>>;
1061
+ /**
1062
+ * The forms of trees whose data gives none, as relative weights: `round`, `open` and `tall`
1063
+ * (broadleaf), `conifer`, `columnar` and `palm`. Each tree draws one from a stable hash, so it
1064
+ * keeps its form everywhere. Defaults to the three broadleaf forms, evenly. A tree the data calls
1065
+ * broadleaved keeps to the broadleaf forms of the mix.
1066
+ */
1067
+ unknownForms?: TileflowTreeFormMix;
1068
+ /**
1069
+ * Regions whose trees without a form in the data take their own mix, such as palms along a
1070
+ * subtropical coast. Bounds are `[west, south, east, north]` in degrees; the first region holding
1071
+ * a tree applies. At most 16.
1072
+ */
1073
+ regions?: readonly TileflowTreeRegion[];
695
1074
  };
696
1075
  type TileflowVegetationModuleOptions = {
697
1076
  flat?: TileflowCircleStyle;
@@ -830,6 +1209,800 @@ type TileflowAtmosphereMap = {
830
1209
  */
831
1210
  declare function attachTileflowAtmosphere(map: TileflowAtmosphereMap): () => void;
832
1211
 
1212
+ /** The drawn stretch of a line and its highlights, as shares of the line's length from its start. */
1213
+ type TileflowLineProgressState = Readonly<{
1214
+ /** Where the drawn stretch starts, from 0 (the default) to 1. */
1215
+ start?: number;
1216
+ /** Where the drawn stretch ends, from 0 to 1 (the default, the whole line). */
1217
+ end?: number;
1218
+ /** Where a light sits along the line, or undefined (the default) for none. */
1219
+ light?: number;
1220
+ /** The whole line's opacity, multiplied with each layer's own, from 0 to 1 (the default). */
1221
+ opacity?: number;
1222
+ }>;
1223
+ type TileflowLineProgressGradientOptions = Readonly<{
1224
+ /** The line's colour. */
1225
+ color: string;
1226
+ /** The colour at the head and in the light; defaults to `color`, which shows neither. */
1227
+ highlight?: string;
1228
+ /**
1229
+ * Length of the head's highlight, as a share of the line. The head shows while the drawn stretch
1230
+ * ends before the line does. Defaults to 0.04; 0 shows no head.
1231
+ */
1232
+ headLength?: number;
1233
+ /** Length of the light, as a share of the line. Defaults to `headLength`. */
1234
+ lightLength?: number;
1235
+ }>;
1236
+ /**
1237
+ * The `line-gradient` of a line drawn from `state.start` to `state.end`. The source of the layer
1238
+ * must be GeoJSON with `lineMetrics: true`.
1239
+ */
1240
+ declare function tileflowLineProgressGradient(state: TileflowLineProgressState, options: TileflowLineProgressGradientOptions): unknown[];
1241
+
1242
+ /** Structural MapLibre capabilities; importing this module never loads a renderer. */
1243
+ type TileflowLineProgressMap = {
1244
+ getCanvas?: unknown;
1245
+ getLayer(id: string): unknown;
1246
+ setPaintProperty(layer: string, name: string, value: unknown): unknown;
1247
+ on(event: 'styledata', listener: () => void): unknown;
1248
+ off(event: 'styledata', listener: () => void): unknown;
1249
+ };
1250
+ /** One line layer of the group, over a GeoJSON source with `lineMetrics: true`. */
1251
+ type TileflowLineProgressLayer = Readonly<{
1252
+ id: string;
1253
+ /** The layer's colour along the drawn line. */
1254
+ color: string;
1255
+ /** The colour at the head and in the light; defaults to `color`. */
1256
+ highlight?: string;
1257
+ /** The layer's own opacity, from 0 to 1 (the default). */
1258
+ opacity?: number;
1259
+ }>;
1260
+ type TileflowLineProgressOptions = Readonly<{
1261
+ /** The layers drawn together, such as a route's glow, casing, line and core. */
1262
+ layers: readonly TileflowLineProgressLayer[];
1263
+ /** Length of the head's highlight, as a share of the line; defaults to 0.04. */
1264
+ headLength?: number;
1265
+ /** Length of the light, as a share of the line; defaults to `headLength`. */
1266
+ lightLength?: number;
1267
+ /** What the layers show at first; defaults to the whole line, without a light. */
1268
+ initial?: TileflowLineProgressState;
1269
+ }>;
1270
+ type TileflowLineProgressAnimation = Readonly<{
1271
+ /** The values to reach; values left out keep what they show. */
1272
+ to: TileflowLineProgressState;
1273
+ /** Milliseconds, from 0 to 60000. */
1274
+ duration: number;
1275
+ /** Maps elapsed time (0 to 1) to progress (0 to 1); defaults to an ease in and out. */
1276
+ easing?: (t: number) => number;
1277
+ }>;
1278
+ /** What the layers show: `light` is absent when no light shows. */
1279
+ type TileflowLineProgressShown = Readonly<{
1280
+ start: number;
1281
+ end: number;
1282
+ light?: number;
1283
+ opacity: number;
1284
+ }>;
1285
+ type TileflowLineProgressController = {
1286
+ /** What the layers show now, mid-animation included. */
1287
+ get(): TileflowLineProgressShown;
1288
+ /**
1289
+ * Shows new values at once and stops a running animation. Values left out keep what they show;
1290
+ * `light: undefined` takes the light off.
1291
+ */
1292
+ set(state: TileflowLineProgressState): void;
1293
+ /**
1294
+ * Moves to new values over a duration and resolves `true` when it gets there, or `false` when
1295
+ * `set`, another animation, or `dispose` stops it first. A light that is not showing starts from
1296
+ * the start of the drawn stretch. With reduced motion requested, it shows the values at once.
1297
+ */
1298
+ animate(animation: TileflowLineProgressAnimation): Promise<boolean>;
1299
+ /** Changes the layers' colours or the highlight lengths, for example when the theme changes. */
1300
+ configure(options: Partial<Omit<TileflowLineProgressOptions, 'initial'>>): void;
1301
+ /** Stops writing to the map. The layers keep what they show. */
1302
+ dispose(): void;
1303
+ };
1304
+ /**
1305
+ * Draws a line on, a share of its length at a time, over a group of MapLibre line layers: their
1306
+ * `line-gradient` shows the drawn stretch, a bright head where it is being drawn, and a light that
1307
+ * can run along it. The controller owns each layer's `line-gradient` and `line-opacity`, writes
1308
+ * only what changed, and paints a layer again when a style change re-creates it. Layers that are
1309
+ * not on the map are skipped until they are.
1310
+ */
1311
+ declare function createTileflowLineProgress(map: TileflowLineProgressMap, options: TileflowLineProgressOptions): TileflowLineProgressController;
1312
+
1313
+ type TileflowTileAddress = Readonly<{
1314
+ z: number;
1315
+ x: number;
1316
+ y: number;
1317
+ }>;
1318
+ /** A decoded tile: its address and the chosen layers it holds. */
1319
+ type TileflowTile = TileflowTileAddress & Readonly<{
1320
+ layers: Readonly<Record<string, TileflowTileLayer>>;
1321
+ }>;
1322
+ /** Rewrites a tile request as a MapLibre map's `transformRequest` does. */
1323
+ type TileflowTileRequestTransform = (url: string, resourceType: 'Tile') => Readonly<{
1324
+ url: string;
1325
+ headers?: Readonly<Record<string, string>>;
1326
+ credentials?: RequestCredentials;
1327
+ }> | undefined;
1328
+ type TileflowTileReaderOptions = Readonly<{
1329
+ /** The tile address with `{z}`, `{x}` and `{y}`, such as a MapLibre vector source's `tiles[0]`. */
1330
+ tiles: string;
1331
+ /** The lowest zoom the source has tiles for; defaults to 0. */
1332
+ minzoom?: number;
1333
+ /** The highest zoom the source has tiles for; deeper reads use its tiles. Defaults to 14. */
1334
+ maxzoom?: number;
1335
+ /** The layers to decode; defaults to every layer. */
1336
+ layers?: readonly string[];
1337
+ /** Decoded tiles kept for later reads, from 0 to 4096; defaults to 128. */
1338
+ cacheSize?: number;
1339
+ /** Requests in flight at once, from 1 to 32; defaults to 6. */
1340
+ concurrency?: number;
1341
+ /** The map's request rules, applied to every tile request. */
1342
+ transformRequest?: TileflowTileRequestTransform;
1343
+ /**
1344
+ * Defaults to the global `fetch`, and to Core's PMTiles protocol for a source served from a
1345
+ * Tileflow PMTiles archive (`tileflow-pmtiles://`).
1346
+ */
1347
+ fetch?: (url: string, init: RequestInit) => Promise<Response>;
1348
+ }>;
1349
+ type TileflowTileAreaRequest = Readonly<{
1350
+ /** `[west, south, east, north]` in degrees. */
1351
+ bounds: readonly [number, number, number, number];
1352
+ /** The zoom to read at, clamped to the source's zooms. */
1353
+ zoom: number;
1354
+ /** The most tiles the area may take; a larger area is refused. Defaults to 64. */
1355
+ maxTiles?: number;
1356
+ signal?: AbortSignal;
1357
+ }>;
1358
+ type TileflowTileReader = {
1359
+ /** A tile's chosen layers, or undefined when the source has no tile there (404 or 204). */
1360
+ readTile(address: TileflowTileAddress, options?: {
1361
+ signal?: AbortSignal;
1362
+ }): Promise<TileflowTile | undefined>;
1363
+ /** The tiles covering an area at a zoom, without the absent ones, nearest the centre first. */
1364
+ readArea(request: TileflowTileAreaRequest): Promise<TileflowTile[]>;
1365
+ /** Forgets every cached tile. */
1366
+ clear(): void;
1367
+ };
1368
+ /** The tiles at `zoom` covering `[west, south, east, north]`, nearest the centre first. */
1369
+ declare function tileflowTilesForBounds(bounds: readonly [number, number, number, number], zoom: number): TileflowTileAddress[];
1370
+ /** The longitude and latitude of a point in a tile, given in tile units of an `extent`. */
1371
+ declare function tileflowTilePointToLngLat(tile: TileflowTileAddress, x: number, y: number, extent?: number): [number, number];
1372
+ /**
1373
+ * Reads a vector source's tiles in an application: for example a MapLibre map's World source, with
1374
+ * `tiles`, `minzoom` and `maxzoom` taken from `map.getSource(id)`, and the map's `transformRequest`.
1375
+ */
1376
+ declare function createTileflowTileReader(options: TileflowTileReaderOptions): TileflowTileReader;
1377
+ /** Structural MapLibre capability; importing this module never loads a renderer. */
1378
+ type TileflowTileSourceMap = {
1379
+ getSource(id: string): unknown;
1380
+ };
1381
+ /**
1382
+ * The tile address and zooms of a map's vector source once the map has loaded it, ready for
1383
+ * `createTileflowTileReader`; undefined while the source is not loaded or has no tile address.
1384
+ */
1385
+ declare function readTileflowMapTileSource(map: TileflowTileSourceMap, sourceId: string): {
1386
+ tiles: string;
1387
+ minzoom: number;
1388
+ maxzoom: number;
1389
+ } | undefined;
1390
+
1391
+ /**
1392
+ * The sun's view of a box of buildings: an orthographic projection along `direction` (towards the
1393
+ * sun; x east, y north, z up, in metres) as a column-major matrix to clip space, with the metres its
1394
+ * depth runs over and the metres its wider side spans. It follows only the sun, never the camera,
1395
+ * so shadows hold still while the camera moves.
1396
+ */
1397
+ declare function tileflowSunLightMatrix(direction: readonly number[], box: Readonly<{
1398
+ min: readonly number[];
1399
+ max: readonly number[];
1400
+ }>): {
1401
+ matrix: Float32Array;
1402
+ depth: number;
1403
+ extent: number;
1404
+ };
1405
+
1406
+ /** The MapLibre GL JS map capabilities the renderer uses. */
1407
+ type TileflowBuildings3DMap = {
1408
+ addLayer(layer: object, beforeId?: string): unknown;
1409
+ getCenter(): {
1410
+ lat: number;
1411
+ lng: number;
1412
+ };
1413
+ getBearing(): number;
1414
+ getLayer(id: string): unknown;
1415
+ getPaintProperty(layer: string, name: string): unknown;
1416
+ getPitch(): number;
1417
+ getSource(id: string): unknown;
1418
+ getStyle(): unknown;
1419
+ getZoom(): number;
1420
+ isStyleLoaded(): boolean | void;
1421
+ off(event: string, listener: () => void): unknown;
1422
+ on(event: string, listener: () => void): unknown;
1423
+ removeLayer(id: string): unknown;
1424
+ triggerRepaint(): unknown;
1425
+ };
1426
+ /** Where the renderer reads the sun and the map's design: a Tileflow theme controller. */
1427
+ type TileflowBuildings3DThemes = {
1428
+ getSun?(): TileflowSun;
1429
+ getThemeMetadata?(key: string): Readonly<{
1430
+ values: readonly unknown[];
1431
+ position: number;
1432
+ }>;
1433
+ };
1434
+ type TileflowBuildings3DOptions = Readonly<{
1435
+ map: TileflowBuildings3DMap;
1436
+ /** The theme controller, for the sun and the buildings' design in every theme. */
1437
+ controller?: TileflowBuildings3DThemes;
1438
+ /** The zoom from which buildings stand; below it they sink into the flat map. Defaults to 14.5. */
1439
+ minzoom?: number;
1440
+ /** The most tiles raised round the camera, from 1 to 64; defaults to 25. */
1441
+ maxTiles?: number;
1442
+ /** The layer to draw before; defaults to the style's `above-buildings` placement. */
1443
+ beforeId?: string;
1444
+ /** The map's request rules, for the tiles the renderer reads. */
1445
+ transformRequest?: TileflowTileRequestTransform;
1446
+ }>;
1447
+ type TileflowBuildings3DChange = Readonly<{
1448
+ transition?: Readonly<{
1449
+ duration?: number;
1450
+ }>;
1451
+ }>;
1452
+ type TileflowBuildings3D = {
1453
+ /** Raises the buildings out of the ground; resolves once they stand. */
1454
+ show(options?: TileflowBuildings3DChange): Promise<void>;
1455
+ /** Sinks the buildings back into the flat map; resolves once they are gone. */
1456
+ hide(options?: TileflowBuildings3DChange): Promise<void>;
1457
+ /** Eases the buildings to `scale` of their height, from 0 (flat) to 1. */
1458
+ grow(scale: number, options?: TileflowBuildings3DChange): Promise<void>;
1459
+ /** The height scale shown now. */
1460
+ readonly scale: number;
1461
+ /**
1462
+ * Whether the map's style describes its 3D buildings (the buildings module's
1463
+ * `threeDimensional`), tiles raised, buildings and vertices, for diagnostics.
1464
+ */
1465
+ readonly stats: Readonly<{
1466
+ declared: boolean;
1467
+ tiles: number;
1468
+ buildings: number;
1469
+ vertices: number;
1470
+ }>;
1471
+ /** Takes the layer off the map and lets go of its buffers. */
1472
+ dispose(): void;
1473
+ };
1474
+ declare const tileflowBuildings3DLayerId = "tileflow-buildings-3d";
1475
+ /**
1476
+ * Creates the renderer and puts its layer on the map, flat until `show()`. It reads the source's
1477
+ * z15 tiles round the camera, the zoom at which World's buildings carry their heights.
1478
+ */
1479
+ declare function createTileflowBuildings3D(options: TileflowBuildings3DOptions): TileflowBuildings3D;
1480
+
1481
+ /** The renderer's tile units: MapLibre projects custom layers' tiles over 8192. */
1482
+ declare const tileflowBuildingExtent = 8192;
1483
+ /** Bytes per vertex; see `meshTileflowBuildings` for the layout. */
1484
+ declare const tileflowBuildingVertexBytes = 28;
1485
+ type TileflowBuildingMeshOptions = Readonly<{
1486
+ /** The tile's width in metres, for the length of each wall. */
1487
+ tileMetres: number;
1488
+ /** Height used where a building has none, in metres; defaults to 5, World's own fallback. */
1489
+ defaultHeight?: number;
1490
+ /**
1491
+ * The tile's places (World's `poi` layer), for the night use of buildings when the tile's
1492
+ * buildings do not carry World's `night_use`: a place inside a building, or on its facade, gives
1493
+ * the building its use.
1494
+ */
1495
+ places?: TileflowTileLayer;
1496
+ }>;
1497
+ /** One tile's buildings, ready to upload. */
1498
+ type TileflowBuildingMesh = Readonly<{
1499
+ vertices: Uint8Array;
1500
+ indices: Uint32Array;
1501
+ /** The first wall index: roofs come before it, walls from it. */
1502
+ wallsFrom: number;
1503
+ /** The tallest building, in metres. */
1504
+ top: number;
1505
+ /** Each vertex's building is an index into these feature properties. */
1506
+ features: readonly Readonly<Record<string, string | number | boolean>>[];
1507
+ }>;
1508
+ /**
1509
+ * Meshes the buildings of one decoded tile layer, or returns undefined when it has none. It reads
1510
+ * World's `render_height`, `render_min_height`, `hide_3d`, `building_tone` and `night_use`. Vertex layout:
1511
+ * 0 position in the tile, 0 to 8192 (uint16 ×2); 4 base and top in decimetres (uint16 ×2); 8 the
1512
+ * wall's outward normal (int8 ×2, normalised); 10 raised to the top, part of a wall (uint8 ×2);
1513
+ * 12 decimetres along the wall (uint16); 14 a per-building jitter and seed (uint8 ×2, normalised);
1514
+ * 16 the building's centre in the tile (uint16 ×2); 20 tone and night use (uint8 ×2: none, dining,
1515
+ * entertainment, nightlife); 22 the wall's
1516
+ * tight corners, bit 0 at its start and bit 1 at its end, and bit 2 when it faces a courtyard, and
1517
+ * its length in metres up to 255
1518
+ * (uint8 ×2); 24 the building's feature index (uint16); 26 on a roof, the vertex's corner of its
1519
+ * triangle (0 to 2), on a wall, 0 at its start and 1 at its end (uint8); 27 on a roof, the triangle's
1520
+ * sides that are the roof's outline, bit n for the side facing corner n, on a wall, bit 0 when its
1521
+ * start and bit 1 when its end lies on the tile's edge (uint8).
1522
+ *
1523
+ * A building's jitter is the same for every piece of it a tile edge cuts, so the renderer can vary
1524
+ * buildings' brightness with it without a seam along the tile's edge.
1525
+ */
1526
+ declare function meshTileflowBuildings(layer: TileflowTileLayer, options: TileflowBuildingMeshOptions): TileflowBuildingMesh | undefined;
1527
+
1528
+ /** The MapLibre GL JS map capabilities the street lights use. */
1529
+ type TileflowStreetLightsMap = {
1530
+ addLayer(layer: object, beforeId?: string): unknown;
1531
+ getBearing(): number;
1532
+ getCenter(): {
1533
+ lat: number;
1534
+ lng: number;
1535
+ };
1536
+ getLayer(id: string): unknown;
1537
+ getPitch(): number;
1538
+ getSource(id: string): unknown;
1539
+ getStyle(): unknown;
1540
+ getZoom(): number;
1541
+ isStyleLoaded(): boolean | void;
1542
+ off(event: string, listener: () => void): unknown;
1543
+ on(event: string, listener: () => void): unknown;
1544
+ removeLayer(id: string): unknown;
1545
+ triggerRepaint(): unknown;
1546
+ };
1547
+ type TileflowStreetLightsOptions = Readonly<{
1548
+ map: TileflowStreetLightsMap;
1549
+ /**
1550
+ * The theme controller, whose sun switches the lights on and off and whose themes hold the map's
1551
+ * street lights (the roads module's `streetLights`).
1552
+ */
1553
+ controller?: {
1554
+ getSun?(): TileflowSun;
1555
+ getThemeMetadata?(key: string): Readonly<{
1556
+ values: readonly unknown[];
1557
+ position: number;
1558
+ }>;
1559
+ };
1560
+ /** The zoom from which the lights shine. Defaults to 14. */
1561
+ minzoom?: number;
1562
+ /** The most tiles lit round the camera, from 1 to 64; defaults to 25. */
1563
+ maxTiles?: number;
1564
+ /** The layer to draw before; defaults to the style's `above-buildings` placement. */
1565
+ beforeId?: string;
1566
+ /** The map's request rules, for the tiles the layer reads. */
1567
+ transformRequest?: TileflowTileRequestTransform;
1568
+ }>;
1569
+ type TileflowStreetLights = {
1570
+ /** How far the lights have switched on, from 0 by day to 1 at night. */
1571
+ readonly on: number;
1572
+ /**
1573
+ * Whether the map's style describes its street lights, tiles lit, lamps, and how many of them the
1574
+ * data maps or the layer estimates.
1575
+ */
1576
+ readonly stats: Readonly<{
1577
+ declared: boolean;
1578
+ tiles: number;
1579
+ lamps: number;
1580
+ mapped: number;
1581
+ estimated: number;
1582
+ }>;
1583
+ /** Takes the layer off the map and lets go of its buffers. */
1584
+ dispose(): void;
1585
+ };
1586
+ declare const tileflowStreetLightsLayerId = "tileflow-street-lights";
1587
+ /**
1588
+ * Creates the street lights and puts their layer on the map. They read the source's z15 tiles round
1589
+ * the camera once the controller's sun darkens the map, and shine from `minzoom`.
1590
+ */
1591
+ declare function createTileflowStreetLights(options: TileflowStreetLightsOptions): TileflowStreetLights;
1592
+
1593
+ /** The style metadata key under which a compiled map describes its 3D buildings. */
1594
+ declare const tileflowBuildingsMetadataKey = "tileflow:buildings";
1595
+ /** A compiled map's 3D buildings, resolved for one theme. */
1596
+ type TileflowBuildings3DDesign = Readonly<{
1597
+ /** The vector source and its layers with the buildings and the places they hold. */
1598
+ source: string;
1599
+ layers: Readonly<{
1600
+ building: string;
1601
+ places?: string;
1602
+ }>;
1603
+ /**
1604
+ * Each building's colour: a CSS colour, or a MapLibre expression over the building's
1605
+ * properties that gives one, as the map colours its 3D buildings (or its roofs).
1606
+ */
1607
+ color: string | readonly unknown[];
1608
+ /** How strongly roof outlines and outer corners catch the light, from 0 to 1. */
1609
+ edges: number;
1610
+ /** Their own colour, drawn unlit; without it they take the building's colour, lightened. */
1611
+ edgeColor?: string;
1612
+ /** How bright the buildings light the street at night, from 0 to 2. */
1613
+ nightLight: number;
1614
+ /** Invented night windows, lit by rooms: decoration, not data. */
1615
+ windows: boolean;
1616
+ /** Shadows from the sun, and contact shadow at the foot of the walls. */
1617
+ shadows: boolean;
1618
+ occlusion: boolean;
1619
+ }>;
1620
+ /**
1621
+ * Reads the 3D buildings a compiled style describes, or undefined when its metadata has none or a
1622
+ * version or shape this Core does not know.
1623
+ */
1624
+ declare function readTileflowBuildings3D(metadata: unknown): TileflowBuildings3DDesign | undefined;
1625
+
1626
+ /** The MapLibre GL JS map capabilities the trees use. */
1627
+ type TileflowTrees3DMap = {
1628
+ addLayer(layer: object, beforeId?: string): unknown;
1629
+ getBearing(): number;
1630
+ getCenter(): {
1631
+ lat: number;
1632
+ lng: number;
1633
+ };
1634
+ getLayer(id: string): unknown;
1635
+ getLayoutProperty?(layer: string, name: string): unknown;
1636
+ getPitch(): number;
1637
+ getSource(id: string): unknown;
1638
+ getStyle(): unknown;
1639
+ getZoom(): number;
1640
+ isStyleLoaded(): boolean | void;
1641
+ off(event: string, listener: () => void): unknown;
1642
+ on(event: string, listener: () => void): unknown;
1643
+ removeLayer(id: string): unknown;
1644
+ setLayoutProperty?(layer: string, name: string, value: unknown): unknown;
1645
+ triggerRepaint(): unknown;
1646
+ };
1647
+ /** Where the trees read the sun and the map's design: a Tileflow theme controller. */
1648
+ type TileflowTrees3DThemes = {
1649
+ getSun?(): TileflowSun;
1650
+ getThemeMetadata?(key: string): Readonly<{
1651
+ values: readonly unknown[];
1652
+ position: number;
1653
+ }>;
1654
+ };
1655
+ type TileflowTrees3DOptions = Readonly<{
1656
+ map: TileflowTrees3DMap;
1657
+ /** The theme controller, for the sun and the trees' colours in every theme. */
1658
+ controller?: TileflowTrees3DThemes;
1659
+ /** The vector source with the canopy points, when not the map's World source. */
1660
+ canopySource?: string;
1661
+ /** The zoom from which trees stand; they fade in over the zoom above it. Defaults to 15. */
1662
+ minzoom?: number;
1663
+ /** The most tiles of trees round the camera, from 1 to 64; defaults to 25. */
1664
+ maxTiles?: number;
1665
+ /** The layer to draw before; defaults to the style's `above-buildings` placement. */
1666
+ beforeId?: string;
1667
+ /** The map's request rules, for the tiles the layer reads. */
1668
+ transformRequest?: TileflowTileRequestTransform;
1669
+ }>;
1670
+ type TileflowTrees3DChange = Readonly<{
1671
+ transition?: Readonly<{
1672
+ duration?: number;
1673
+ }>;
1674
+ }>;
1675
+ type TileflowTrees3D = {
1676
+ /** Grows the trees out of the ground; resolves once they stand. */
1677
+ show(options?: TileflowTrees3DChange): Promise<void>;
1678
+ /** Sinks the trees back into the ground; resolves once they are gone. */
1679
+ hide(options?: TileflowTrees3DChange): Promise<void>;
1680
+ /** Eases the trees to `scale` of their size, from 0 (none) to 1. */
1681
+ grow(scale: number, options?: TileflowTrees3DChange): Promise<void>;
1682
+ /** The size scale shown now. */
1683
+ readonly scale: number;
1684
+ /**
1685
+ * Whether the map's style describes 3D trees (`vegetation({mode: '3d'})`), tiles of trees,
1686
+ * trees placed (mapped and from canopy points) and trees drawn in the last frame.
1687
+ */
1688
+ readonly stats: Readonly<{
1689
+ declared: boolean;
1690
+ tiles: number;
1691
+ trees: number;
1692
+ mapped: number;
1693
+ canopy: number;
1694
+ drawn: number;
1695
+ }>;
1696
+ /** Takes the layer off the map and lets go of its buffers. */
1697
+ dispose(): void;
1698
+ };
1699
+ declare const tileflowTrees3DLayerId = "tileflow-trees-3d";
1700
+ /**
1701
+ * Creates the trees and puts their layer on the map, sunk in the ground until `show()`. They read
1702
+ * the source's z15 tiles round the camera, where World carries its trees and canopy points.
1703
+ */
1704
+ declare function createTileflowTrees3D(options: TileflowTrees3DOptions): TileflowTrees3D;
1705
+
1706
+ /** Bytes per lamp; see `placeTileflowStreetLights` for the layout. */
1707
+ declare const tileflowStreetLightBytes = 12;
1708
+ /**
1709
+ * Where light is estimated where the data maps no lamps: `lit` (the default) along the streets and
1710
+ * pavements the data maps as lit; `streets` also along the streets the data says nothing about,
1711
+ * wherever it maps few lamps, which invents light as night windows do; `none` nowhere, so only
1712
+ * mapped lamps shine.
1713
+ */
1714
+ type TileflowStreetLightEstimate = 'streets' | 'lit' | 'none';
1715
+ type TileflowStreetLightPlacementOptions = Readonly<{
1716
+ /** The tile's width in metres. */
1717
+ tileMetres: number;
1718
+ /** Defaults to `lit`. */
1719
+ estimate?: TileflowStreetLightEstimate;
1720
+ }>;
1721
+ /** A tile's layers the lamps come from, as World names them. */
1722
+ type TileflowStreetLightLayers = Readonly<{
1723
+ /** Points with `subclass` `street_lamp` (World's `street_furniture`). */
1724
+ streetFurniture?: TileflowTileLayer;
1725
+ /** Streets by `class`, with `lit` where mapped (World's `transportation`). */
1726
+ transportation?: TileflowTileLayer;
1727
+ /** Pavements, as lines or areas, with `lit` where mapped (World's `sidewalk`). */
1728
+ sidewalks?: TileflowTileLayer;
1729
+ }>;
1730
+ /** One tile's lamps, ready to upload. */
1731
+ type TileflowStreetLightPlacement = Readonly<{
1732
+ lamps: Uint8Array;
1733
+ /** Lamps from the data. */
1734
+ mapped: number;
1735
+ /** Points of soft light estimated along streets. */
1736
+ estimated: number;
1737
+ }>;
1738
+ /**
1739
+ * Places one tile's lamps and estimated light, or returns undefined when it has none. Each is a
1740
+ * point of light, flagged as mapped or estimated. Layout: 0 position in the
1741
+ * tile, 0 to 8192 (uint16 ×2); 4 height in decimetres (uint16); 6 the reach of its light on the
1742
+ * ground in metres (uint8); 7 flags (uint8: bit 0 mapped, bit 1 its own colour); 8 its colour
1743
+ * (uint8 ×3, sRGB); 11 a seed (uint8, normalised).
1744
+ */
1745
+ declare function placeTileflowStreetLights(layers: TileflowStreetLightLayers, options: TileflowStreetLightPlacementOptions): TileflowStreetLightPlacement | undefined;
1746
+ /** The style metadata key under which a compiled map describes its street lights. */
1747
+ declare const tileflowStreetLightsMetadataKey = "tileflow:street-lights";
1748
+ /** A compiled map's street lights, as the roads module describes them, resolved for one theme. */
1749
+ type TileflowStreetLightsDesign = Readonly<{
1750
+ /** The vector source and its layers with the lamps, the streets and the pavements. */
1751
+ source: string;
1752
+ layers: Readonly<{
1753
+ streetFurniture: string;
1754
+ transportation: string;
1755
+ sidewalk?: string;
1756
+ }>;
1757
+ estimate: TileflowStreetLightEstimate;
1758
+ /** The light of lamps whose data gives no colour, as a CSS colour. */
1759
+ color: string;
1760
+ /** How bright the lights shine, from 0 to 2. */
1761
+ intensity: number;
1762
+ }>;
1763
+ /**
1764
+ * Reads the street lights a compiled style describes, or undefined when its metadata has none or a
1765
+ * version or shape this Core does not know.
1766
+ */
1767
+ declare function readTileflowStreetLights(metadata: unknown): TileflowStreetLightsDesign | undefined;
1768
+
1769
+ /** The capabilities `tileflowGroundBeforeId` reads; importing this module never loads a renderer. */
1770
+ type TileflowGroundOrderMap = {
1771
+ getLayer(id: string): unknown;
1772
+ getLayersOrder(): string[];
1773
+ getStyle(): unknown;
1774
+ };
1775
+ /** Structural MapLibre capabilities of a map that holds a ground layer group. */
1776
+ type TileflowGroundLayersMap = TileflowGroundOrderMap & {
1777
+ addLayer(layer: unknown, beforeId?: string): unknown;
1778
+ getSource(id: string): unknown;
1779
+ moveLayer(id: string, beforeId?: string): unknown;
1780
+ removeLayer(id: string): unknown;
1781
+ setPaintProperty(layer: string, name: string, value: unknown): unknown;
1782
+ setLayoutProperty(layer: string, name: string, value: unknown): unknown;
1783
+ getCanvas?(): unknown;
1784
+ on(event: 'styledata', listener: () => void): unknown;
1785
+ off(event: 'styledata', listener: () => void): unknown;
1786
+ };
1787
+ /**
1788
+ * A layer of the group: a MapLibre style layer drawn in 2D, such as a line or a fill, or a custom
1789
+ * layer whose `renderingMode` is `2d`.
1790
+ */
1791
+ type TileflowGroundLayer = Readonly<Record<string, unknown> & {
1792
+ id: string;
1793
+ type: string;
1794
+ }> | Readonly<{
1795
+ id: string;
1796
+ type: 'custom';
1797
+ renderingMode?: '2d' | '3d';
1798
+ }>;
1799
+ type TileflowGroundLayersOptions = Readonly<{
1800
+ /** The layers, bottom to top, such as a route's glow, casing, line and core. */
1801
+ layers: readonly TileflowGroundLayer[];
1802
+ /**
1803
+ * How much of each line layer shows where 3D content hides it, by layer id: from 0 (nothing, the
1804
+ * default) to 1 (as much as where it shows). Only line layers whose `line-opacity` is a number
1805
+ * can show through.
1806
+ */
1807
+ occludedOpacity?: Readonly<Record<string, number>>;
1808
+ }>;
1809
+ type TileflowGroundLayers = {
1810
+ /** The group's layer ids, bottom to top. */
1811
+ readonly ids: readonly string[];
1812
+ /** The map's layer, so helpers that paint layers, such as line progress, can paint the group. */
1813
+ getLayer(id: string): unknown;
1814
+ /**
1815
+ * Sets a paint property of one of the group's layers, and keeps it for when a style change brings
1816
+ * the layer back. A layer that shows through 3D content passes it to its see-through copy too, at
1817
+ * its `line-opacity` times its occluded opacity. Other layers' properties pass straight to the map.
1818
+ */
1819
+ setPaintProperty(layer: string, name: string, value: unknown): void;
1820
+ /** Sets a layout property, such as `visibility`, the same way. */
1821
+ setLayoutProperty(layer: string, name: string, value: unknown): void;
1822
+ getCanvas(): unknown;
1823
+ on(event: 'styledata', listener: () => void): void;
1824
+ off(event: 'styledata', listener: () => void): void;
1825
+ /** Takes the group's layers and their copies off the map and stops following style changes. */
1826
+ dispose(): void;
1827
+ };
1828
+ /**
1829
+ * The layer a layer lying on the ground goes before: the first 3D layer above the roads, or the
1830
+ * start of the vegetation when the buildings are flat, so the layer covers the roads and the flat
1831
+ * buildings, and every 3D layer hides it where it stands in front. A style without Tileflow's
1832
+ * overlay placements uses its first 3D layer or its first symbol layer. Undefined means the top.
1833
+ */
1834
+ declare function tileflowGroundBeforeId(map: TileflowGroundOrderMap): string | undefined;
1835
+ /**
1836
+ * Keeps a group of application layers on the ground, under the map's 3D content, from bottom to
1837
+ * top as given. Layers already on the map are moved into place; a layer whose source is not on the
1838
+ * map yet is added when it is. The group follows the map: after a style change it brings back the
1839
+ * layers the change dropped, and it moves its layers again when a 3D layer lands above them, so
1840
+ * a layer added later in 3D hides them too. A line with an occluded opacity gets a see-through
1841
+ * copy over the 3D content, painted through the group.
1842
+ */
1843
+ declare function createTileflowGroundLayers(map: TileflowGroundLayersMap, options: TileflowGroundLayersOptions): TileflowGroundLayers;
1844
+
1845
+ /** Structural MapLibre capabilities; importing this module never loads a renderer. */
1846
+ type TileflowDepthMarkerMap = {
1847
+ addLayer(layer: unknown, beforeId?: string): unknown;
1848
+ getLayer(id: string): unknown;
1849
+ removeLayer(id: string): unknown;
1850
+ getCanvas(): HTMLCanvasElement;
1851
+ getPixelRatio?(): number;
1852
+ triggerRepaint(): void;
1853
+ on(event: 'styledata', listener: () => void): unknown;
1854
+ off(event: 'styledata', listener: () => void): unknown;
1855
+ };
1856
+ type TileflowDepthMarker = Readonly<{
1857
+ /** `[longitude, latitude]`. */
1858
+ lngLat: readonly [number, number];
1859
+ /** The marker's picture. Pass it again to `update` after drawing into it. */
1860
+ image: TexImageSource;
1861
+ /** Width and height: CSS pixels for a screen marker, metres for a ground marker. */
1862
+ size: readonly [number, number];
1863
+ /**
1864
+ * `screen` (the default) faces the viewer at a fixed size in pixels, as a pin does; `ground`
1865
+ * lies flat on the ground at a size in metres, as a ring or an arrow on the street does.
1866
+ */
1867
+ alignment?: 'screen' | 'ground';
1868
+ /** The point of the image that sits on the position: `center` (the default) or `bottom`. */
1869
+ anchor?: 'center' | 'bottom';
1870
+ /** A screen marker's shift in CSS pixels, right and down. */
1871
+ offset?: readonly [number, number];
1872
+ /** Degrees clockwise: from the screen's up for a screen marker, from north for a ground one. */
1873
+ rotation?: number;
1874
+ /** Metres above the ground; defaults to 0. */
1875
+ altitude?: number;
1876
+ /** From 0 to 1 (the default). */
1877
+ opacity?: number;
1878
+ /** Whether nearer 3D content hides the marker; defaults to true. */
1879
+ occlude?: boolean;
1880
+ }>;
1881
+ type TileflowDepthMarkerHandle = {
1882
+ /** Changes the marker; an `image` passed again is uploaded again. */
1883
+ update(change: Partial<TileflowDepthMarker>): void;
1884
+ remove(): void;
1885
+ };
1886
+ type TileflowDepthMarkersOptions = Readonly<{
1887
+ /** The custom layer's id; defaults to `tileflow-depth-markers`. */
1888
+ id?: string;
1889
+ /** The layer the markers are drawn under, or a function that finds it after a style change. */
1890
+ beforeId?: string | (() => string | undefined);
1891
+ }>;
1892
+ type TileflowDepthMarkers = {
1893
+ add(marker: TileflowDepthMarker): TileflowDepthMarkerHandle;
1894
+ /** Removes the markers' layer and releases its GPU resources. */
1895
+ dispose(): void;
1896
+ };
1897
+ /** Where a marker sits: its tile and its position there in tile units, and metres in tile units. */
1898
+ declare function tileflowDepthMarkerPlacement(lngLat: readonly [number, number]): {
1899
+ tile: {
1900
+ x: number;
1901
+ y: number;
1902
+ z: number;
1903
+ };
1904
+ position: [number, number];
1905
+ unitsPerMetre: number;
1906
+ };
1907
+ /**
1908
+ * Draws markers in the map's 3D scene, hidden by nearer 3D buildings. Needs a MapLibre GL JS map
1909
+ * on WebGL 2 (GL JS 5 or later). The layer puts itself back after a style change.
1910
+ */
1911
+ declare function createTileflowDepthMarkers(map: TileflowDepthMarkerMap, options?: TileflowDepthMarkersOptions): TileflowDepthMarkers;
1912
+
1913
+ /** A camera between keyframes: always the center form, with bearing and pitch resolved. */
1914
+ type TileflowShotCamera = {
1915
+ type: 'center';
1916
+ center: [number, number];
1917
+ zoom: number;
1918
+ bearing: number;
1919
+ pitch: number;
1920
+ };
1921
+ type TileflowShotKeyframe = Readonly<{
1922
+ /** Milliseconds from the start: the first keyframe is at 0, later ones rise strictly. */
1923
+ at: number;
1924
+ camera: Readonly<{
1925
+ /** Shots committed on a map name the center camera form; the motion needs no other. */
1926
+ type?: 'center';
1927
+ center: readonly [number, number];
1928
+ zoom: number;
1929
+ bearing?: number;
1930
+ pitch?: number;
1931
+ }>;
1932
+ blend?: Readonly<{
1933
+ themes: readonly string[];
1934
+ position: number;
1935
+ }>;
1936
+ }>;
1937
+ type TileflowShotMotion = Readonly<{
1938
+ keyframes: readonly TileflowShotKeyframe[];
1939
+ /** `smooth` (the default) eases each segment in and out; `linear` does not. */
1940
+ easing?: 'linear' | 'smooth';
1941
+ }>;
1942
+ /** The camera and blend position of a shot at a time. */
1943
+ type TileflowShotState = {
1944
+ at: number;
1945
+ camera: TileflowShotCamera;
1946
+ /** Present when the shot blends themes. */
1947
+ blendPosition?: number;
1948
+ };
1949
+ /**
1950
+ * Where a shot is at `at` milliseconds, clamped to its first and last keyframes. Within each
1951
+ * keyframe segment the center moves in Web Mercator coordinates along the shorter way around the
1952
+ * world, zoom and pitch change linearly, bearing turns along the shorter arc, and the blend position
1953
+ * changes linearly; `easing: 'smooth'` eases each segment in and out. A time on a keyframe shows
1954
+ * that keyframe exactly.
1955
+ */
1956
+ declare function tileflowShotStateAt(shot: TileflowShotMotion, at: number): TileflowShotState;
1957
+
1958
+ /** Structural MapLibre capabilities; importing this module never loads a renderer. */
1959
+ type TileflowShotPlayerMap = {
1960
+ getCanvas?: unknown;
1961
+ jumpTo(camera: {
1962
+ center: [number, number];
1963
+ zoom: number;
1964
+ bearing: number;
1965
+ pitch: number;
1966
+ }): unknown;
1967
+ };
1968
+ /** Something to do once the shot reaches a time, such as drawing a route or showing a title. */
1969
+ type TileflowShotCue = Readonly<{
1970
+ at: number;
1971
+ run: () => void;
1972
+ }>;
1973
+ type TileflowShotPlaybackOptions = Readonly<{
1974
+ /**
1975
+ * Receives the blend position at each frame of a shot that blends themes, to pass on to the
1976
+ * theme controller: `(position) => controller.setBlend({themes, position})`.
1977
+ */
1978
+ blend?: (position: number) => void;
1979
+ /** Run once each, in time order, as the shot reaches them. */
1980
+ cues?: readonly TileflowShotCue[];
1981
+ /** Receives the camera after each frame's move. */
1982
+ onFrame?: (state: {
1983
+ at: number;
1984
+ camera: TileflowShotCamera;
1985
+ blendPosition?: number;
1986
+ }) => void;
1987
+ /** Stops the shot where it is. */
1988
+ signal?: AbortSignal;
1989
+ }>;
1990
+ type TileflowShotPlayback = {
1991
+ /** True when the shot played to its last keyframe; false when it was stopped first. */
1992
+ readonly finished: Promise<boolean>;
1993
+ /** Milliseconds the shot has played. */
1994
+ readonly at: number;
1995
+ /** Stops the shot where it is. */
1996
+ stop(): void;
1997
+ };
1998
+ /**
1999
+ * Plays a timed shot live on a map: the camera follows the shot's keyframes frame by frame, the
2000
+ * blend position goes to `blend`, and cues run as the shot reaches them. It moves as Capture renders
2001
+ * the same shot to video, so the page and the film agree. With reduced motion requested, or without
2002
+ * a browser window, it shows the last keyframe at once and runs every cue in order.
2003
+ */
2004
+ declare function playTileflowShot(map: TileflowShotPlayerMap, shot: TileflowShotMotion, options?: TileflowShotPlaybackOptions): TileflowShotPlayback;
2005
+
833
2006
  declare const tileflowMaplibreContourVersion: "0.1.0";
834
2007
  type TileflowContourProtocolRequest = Readonly<{
835
2008
  url: string;
@@ -940,6 +2113,7 @@ type TileflowThemeBlendState = Readonly<{
940
2113
  themes: readonly string[];
941
2114
  }>;
942
2115
  type TileflowStyleSwitchMap = TileflowThemeMotionMap & TileflowDynamicImageMap & {
2116
+ getCenter?: unknown;
943
2117
  getGlobalState?: unknown;
944
2118
  off(event: string, listener: (event?: unknown) => void): unknown;
945
2119
  on(event: string, listener: (event?: unknown) => void): unknown;
@@ -948,6 +2122,18 @@ type TileflowStyleSwitchMap = TileflowThemeMotionMap & TileflowDynamicImageMap &
948
2122
  };
949
2123
  /** A value an application sets for the whole style, which themes read with `expr.globalState`. */
950
2124
  type TileflowStyleStateValue = boolean | number | string | null;
2125
+ /**
2126
+ * Where an application places the sun. `azimuth` (degrees clockwise from north) and `altitude`
2127
+ * (degrees above the horizon) place it directly; `date` places the real sun of that instant over
2128
+ * `location` ([longitude, latitude]), the map's centre when it is left out.
2129
+ */
2130
+ type TileflowSunRequest = Readonly<{
2131
+ altitude: number;
2132
+ azimuth: number;
2133
+ }> | Readonly<{
2134
+ date: Date | number;
2135
+ location?: readonly [number, number];
2136
+ }>;
951
2137
  type TileflowThemeController = {
952
2138
  dispose(): void;
953
2139
  /** Own a fixed-size RGBA image with a stable name across themes, restored after style reloads. */
@@ -958,8 +2144,31 @@ type TileflowThemeController = {
958
2144
  getCurrent(): TileflowRuntimeStyle;
959
2145
  /** The emphasis requested last, or undefined when the map is shown as designed. */
960
2146
  getEmphasis(): TileflowEmphasis | undefined;
2147
+ /**
2148
+ * The route inks of the theme on screen, for an application's own route layers. During a blend
2149
+ * they are mixed between the neighbouring themes at the blend's position, as the map's colours
2150
+ * are. Read them again after a theme change or a blend move.
2151
+ */
2152
+ getRouteInks(): TileflowRouteInks;
961
2153
  /** The value a style state was set to last, or undefined when it has not been set. */
962
2154
  getState(name: string): TileflowStyleStateValue | undefined;
2155
+ /**
2156
+ * What the compiled styles on screen hold under a metadata key, for an application's own layers
2157
+ * drawn in the map's design (Core's 3D trees read their colours this way): one value outside a
2158
+ * blend, and during a blend one per blended theme, in order, with the blend's position, so a layer
2159
+ * can mix them as the map does. A style without the key gives undefined in its place.
2160
+ */
2161
+ getThemeMetadata(key: string): Readonly<{
2162
+ values: readonly unknown[];
2163
+ position: number;
2164
+ }>;
2165
+ /**
2166
+ * The sun the map shows, for an application's own 3D layers: its direction, the light it and
2167
+ * the sky give, and how dark its shadows fall. It is the theme's sun (`lighting.sun`), mixed
2168
+ * between neighbouring themes during a blend, unless `setSun` placed it. Read it when drawing;
2169
+ * the map redraws whenever it changes.
2170
+ */
2171
+ getSun(): TileflowSun;
963
2172
  /**
964
2173
  * Shows a blend of themes. The first request for a set of themes loads their styles and
965
2174
  * prepares one style that holds all of them; later requests for the same themes only move the
@@ -982,6 +2191,13 @@ type TileflowThemeController = {
982
2191
  * and blends. Needs a MapLibre map with global state (GL JS 5.6 or later).
983
2192
  */
984
2193
  setState(name: string, value: TileflowStyleStateValue, options?: TileflowThemeChangeOptions): Promise<TileflowThemeTransitionResult>;
2194
+ /**
2195
+ * Places the sun by direction or by the real sun of a date and place; `undefined` returns it to
2196
+ * the themes' suns. The themes keep the sun's colours, strengths, and shadow strength, and the
2197
+ * map's light turns to the new direction, anchored to the map. The sun turns the short way round
2198
+ * over the transition; a request that follows an animation, such as a clock, passes none.
2199
+ */
2200
+ setSun(request: TileflowSunRequest | undefined, options?: TileflowThemeChangeOptions): Promise<TileflowThemeTransitionResult>;
985
2201
  setTheme(style: TileflowRuntimeStyle, options?: TileflowThemeChangeOptions): Promise<TileflowThemeTransitionResult>;
986
2202
  };
987
2203
  /**
@@ -1063,4 +2279,4 @@ declare function createTileflowTransformRequest<TRequest extends TileflowTransfo
1063
2279
  worldRequestBridge?: TileflowWorldRequestBridge;
1064
2280
  }): TileflowTransformRequest<TRequest, TResourceType>;
1065
2281
 
1066
- export { type TileflowAtmosphereMap, type TileflowBrowserThemeBlendSelection, type TileflowComposedRequest, type TileflowContourProtocolHandler, type TileflowContourProtocolRegistrationOptions, type TileflowContourProtocolRegistry, type TileflowContourProtocolRequest, type TileflowContourProtocolResponse, type TileflowDynamicImage, type TileflowDynamicImageContext, type TileflowDynamicImageHandle, type TileflowEmphasis, type TileflowEmphasisArea, type TileflowEmphasisModule, type TileflowFairUseNotice, type TileflowFairUseNoticeController, type TileflowFairUseNoticeState, type TileflowFrameScheduler, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapReadinessState, type TileflowPmtilesProtocolHandler, type TileflowPmtilesProtocolRegistrationOptions, type TileflowPmtilesProtocolRegistry, type TileflowSessionSender, type TileflowSessionStarter, type TileflowStyleFontLoadOptions, type TileflowStyleStateValue, type TileflowStyleSwitchMap, type TileflowThemeBlendRequest, type TileflowThemeBlendState, type TileflowThemeChangeOptions, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionOptions, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowUserTransformRequest, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowAtmosphere, attachTileflowFairUseNotice, attachTileflowMapLifecycle, createTileflowSessionStarter, createTileflowThemeController, createTileflowTransformRequest, getTileflowSystemColorScheme, loadTileflowStyleFonts, registerTileflowContourProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, subscribeTileflowSystemColorScheme, tileflowFairUseNoticeMessage, tileflowLayerDomainMetadataKey, tileflowMaplibreContourVersion, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };
2282
+ export { type TileflowAtmosphereMap, type TileflowBrowserThemeBlendSelection, type TileflowBuildingMesh, type TileflowBuildingMeshOptions, type TileflowBuildings3D, type TileflowBuildings3DChange, type TileflowBuildings3DDesign, type TileflowBuildings3DMap, type TileflowBuildings3DOptions, type TileflowBuildings3DThemes, type TileflowComposedRequest, type TileflowContourProtocolHandler, type TileflowContourProtocolRegistrationOptions, type TileflowContourProtocolRegistry, type TileflowContourProtocolRequest, type TileflowContourProtocolResponse, type TileflowDepthMarker, type TileflowDepthMarkerHandle, type TileflowDepthMarkerMap, type TileflowDepthMarkers, type TileflowDepthMarkersOptions, type TileflowDynamicImage, type TileflowDynamicImageContext, type TileflowDynamicImageHandle, type TileflowEmphasis, type TileflowEmphasisArea, type TileflowEmphasisModule, type TileflowFairUseNotice, type TileflowFairUseNoticeController, type TileflowFairUseNoticeState, type TileflowFrameScheduler, type TileflowGroundLayer, type TileflowGroundLayers, type TileflowGroundLayersMap, type TileflowGroundLayersOptions, type TileflowGroundOrderMap, type TileflowLineProgressAnimation, type TileflowLineProgressController, type TileflowLineProgressGradientOptions, type TileflowLineProgressLayer, type TileflowLineProgressMap, type TileflowLineProgressOptions, type TileflowLineProgressShown, type TileflowLineProgressState, type TileflowMapLifecycleAttachment, type TileflowMapLifecycleEvent, type TileflowMapLifecycleSubscriber, type TileflowMapReadinessState, type TileflowPmtilesProtocolHandler, type TileflowPmtilesProtocolRegistrationOptions, type TileflowPmtilesProtocolRegistry, type TileflowRouteInks, type TileflowSessionSender, type TileflowSessionStarter, type TileflowShotCamera, type TileflowShotCue, type TileflowShotKeyframe, type TileflowShotMotion, type TileflowShotPlayback, type TileflowShotPlaybackOptions, type TileflowShotPlayerMap, type TileflowShotState, type TileflowStreetLightEstimate, type TileflowStreetLightLayers, type TileflowStreetLightPlacement, type TileflowStreetLightPlacementOptions, type TileflowStreetLights, type TileflowStreetLightsDesign, type TileflowStreetLightsMap, type TileflowStreetLightsOptions, type TileflowStyleFontLoadOptions, type TileflowStyleStateValue, type TileflowStyleSwitchMap, type TileflowSun, type TileflowSunPreset, type TileflowSunRequest, type TileflowThemeBlendRequest, type TileflowThemeBlendState, type TileflowThemeChangeOptions, type TileflowThemeController, type TileflowThemeTransition, type TileflowThemeTransitionOptions, type TileflowThemeTransitionPhase, type TileflowThemeTransitionResult, type TileflowTile, type TileflowTileAddress, type TileflowTileAreaRequest, type TileflowTileFeature, type TileflowTileGeometryType, type TileflowTileLayer, type TileflowTileReader, type TileflowTileReaderOptions, type TileflowTileRequestTransform, type TileflowTileSourceMap, type TileflowTransformRequest, type TileflowTransformRequestParameters, type TileflowTreeFields, type TileflowTreeForm, type TileflowTreeFormMix, type TileflowTreeFormRange, type TileflowTreeLayers, type TileflowTreePlacement, type TileflowTreePlacementOptions, type TileflowTreeRange, type TileflowTreeRegion, type TileflowTrees3D, type TileflowTrees3DChange, type TileflowTrees3DMap, type TileflowTrees3DOptions, type TileflowTrees3DThemes, type TileflowUserTransformRequest, type TileflowVectorTileDecodeOptions, type TileflowVegetation3D, type TileflowWorldProtocolHandler, type TileflowWorldProtocolRequest, type TileflowWorldProtocolResponse, type TileflowWorldRequestBridge, attachTileflowAtmosphere, attachTileflowFairUseNotice, attachTileflowMapLifecycle, createTileflowBuildings3D, createTileflowDepthMarkers, createTileflowGroundLayers, createTileflowLineProgress, createTileflowSessionStarter, createTileflowStreetLights, createTileflowThemeController, createTileflowTileReader, createTileflowTransformRequest, createTileflowTrees3D, decodeTileflowVectorTile, getTileflowSystemColorScheme, loadTileflowStyleFonts, meshTileflowBuildings, mixTileflowRouteInks, mixTileflowSunPresets, placeTileflowStreetLights, placeTileflowTrees, playTileflowShot, readTileflowBuildings3D, readTileflowMapTileSource, readTileflowRouteInks, readTileflowStreetLights, readTileflowSunPreset, readTileflowVegetation3D, registerTileflowContourProtocol, registerTileflowPmtilesProtocol, registerTileflowWorldRequestBridge, resolveTileflowSun, subscribeTileflowSystemColorScheme, tileflowBuildingExtent, tileflowBuildingVertexBytes, tileflowBuildings3DLayerId, tileflowBuildingsMetadataKey, tileflowDefaultRouteInks, tileflowDefaultSunPreset, tileflowDepthMarkerPlacement, tileflowFairUseNoticeMessage, tileflowGroundBeforeId, tileflowLayerDomainMetadataKey, tileflowLineProgressGradient, tileflowMaplibreContourVersion, tileflowPmtilesMaximumDirectoryDepth, tileflowPmtilesProtocol, tileflowRouteMetadataKey, tileflowShotStateAt, tileflowStreetLightBytes, tileflowStreetLightsLayerId, tileflowStreetLightsMetadataKey, tileflowStyleRouteInks, tileflowStyleSunPreset, tileflowSunDirection, tileflowSunLightMatrix, tileflowSunMetadataKey, tileflowSunPosition, tileflowTilePointToLngLat, tileflowTilesForBounds, tileflowTreeBytes, tileflowTreeFormOf, tileflowTreeForms, tileflowTrees3DLayerId, tileflowVegetationMetadataKey, validateTileflowBrowserThemeBlendSelection, validateTileflowEmphasis };