@tileflow/core 0.1.0-alpha.32 → 0.1.0-alpha.33
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/README.md +33 -1
- package/THIRD_PARTY_NOTICES.md +25 -2
- package/dist/browser.d.ts +889 -1
- package/dist/browser.js +6336 -1486
- package/dist/build.d.ts +5 -4
- package/dist/build.js +625 -205
- package/dist/{capture-scene-BaAJjGq7.d.ts → capture-shot-ChPQvPyi.d.ts} +121 -1
- package/dist/capture.d.ts +1 -1
- package/dist/capture.js +218 -0
- package/dist/config-reference.json +300 -4
- package/dist/{icon-composition-Befmn-zZ.d.ts → icon-composition-CSnN2-Xt.d.ts} +130 -2
- package/dist/index.d.ts +49 -5
- package/dist/index.js +1617 -764
- package/dist/native.js +1893 -1884
- package/docs/application-tile-reading.md +80 -0
- package/docs/authoring-model.md +11 -2
- package/docs/buildings-3d.md +168 -0
- package/docs/camera-moves-and-tile-cache.md +112 -0
- package/docs/capture-scenes.md +4 -0
- package/docs/capture-shots.md +173 -0
- package/docs/depth-markers.md +65 -0
- package/docs/public-api-and-browser-subpath.md +3 -3
- package/docs/route-drawing.md +191 -0
- package/docs/street-lights.md +80 -0
- package/docs/sun-and-light.md +125 -0
- package/docs/themes-and-module-styles.md +7 -0
- package/package.json +4 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "https://tileflow.dev/schemas/tileflow-config-reference-v4.json",
|
|
4
4
|
"schemaVersion": 4,
|
|
5
5
|
"kind": "tileflow.config.reference",
|
|
6
|
-
"authority": "@tileflow/core resolvedTileflowMapSchema and
|
|
6
|
+
"authority": "@tileflow/core resolvedTileflowMapSchema, tileflowCaptureSceneSchema, and tileflowCaptureShotSchema (input); authoring branches are generated from their shared fields",
|
|
7
7
|
"description": "Generated machine-readable reference for writing and inspecting one singular Tileflow map. The document root is the authoring schema.",
|
|
8
8
|
"x-tileflow-refinement-contract": "Standard JSON Schema keywords encode every representable constraint. x-tileflow-refinements records the remaining relational checks enforced by the same Core parser and tileflow validate.",
|
|
9
9
|
"x-tileflow-inheritance": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"overlays": "keyed-resources",
|
|
25
25
|
"projection": "atomic",
|
|
26
26
|
"scenes": "leaf",
|
|
27
|
+
"shots": "leaf",
|
|
27
28
|
"sources": "keyed-resources",
|
|
28
29
|
"systemThemes": "atomic",
|
|
29
30
|
"terrain": "atomic",
|
|
@@ -103,12 +104,12 @@
|
|
|
103
104
|
"authoring": {
|
|
104
105
|
"role": "tileflow.config.ts default export",
|
|
105
106
|
"schemaRef": "#/$defs/TileflowAuthoringMap",
|
|
106
|
-
"description": "A complete map omits extends; an inherited map references exactly one imported map object. Scenes belong only to the leaf definition."
|
|
107
|
+
"description": "A complete map omits extends; an inherited map references exactly one imported map object. Scenes and shots belong only to the leaf definition."
|
|
107
108
|
},
|
|
108
109
|
"resolved": {
|
|
109
110
|
"role": "validate, inspect, build, and compiler input after inheritance",
|
|
110
111
|
"schemaRef": "#/$defs/ResolvedTileflowMap",
|
|
111
|
-
"description": "Standalone map with a required name, without extends or
|
|
112
|
+
"description": "Standalone map with a required name, without extends, scenes, or shots."
|
|
112
113
|
}
|
|
113
114
|
},
|
|
114
115
|
"expressions": {
|
|
@@ -295,6 +296,15 @@
|
|
|
295
296
|
"additionalProperties": {
|
|
296
297
|
"$ref": "#/$defs/TileflowMapScene"
|
|
297
298
|
}
|
|
299
|
+
},
|
|
300
|
+
"shots": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"propertyNames": {
|
|
303
|
+
"$ref": "#/$defs/__schema25"
|
|
304
|
+
},
|
|
305
|
+
"additionalProperties": {
|
|
306
|
+
"$ref": "#/$defs/TileflowMapShot"
|
|
307
|
+
}
|
|
298
308
|
}
|
|
299
309
|
},
|
|
300
310
|
"required": ["defaultTheme", "id", "themes", "version"],
|
|
@@ -373,6 +383,15 @@
|
|
|
373
383
|
"$ref": "#/$defs/TileflowMapScene"
|
|
374
384
|
}
|
|
375
385
|
},
|
|
386
|
+
"shots": {
|
|
387
|
+
"type": "object",
|
|
388
|
+
"propertyNames": {
|
|
389
|
+
"$ref": "#/$defs/__schema25"
|
|
390
|
+
},
|
|
391
|
+
"additionalProperties": {
|
|
392
|
+
"$ref": "#/$defs/TileflowMapShot"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
376
395
|
"extends": {
|
|
377
396
|
"$ref": "#/$defs/TileflowAuthoringMap"
|
|
378
397
|
}
|
|
@@ -547,6 +566,43 @@
|
|
|
547
566
|
},
|
|
548
567
|
"required": ["theme", "camera", "viewport"]
|
|
549
568
|
},
|
|
569
|
+
"TileflowMapShot": {
|
|
570
|
+
"description": "Leaf-owned timed capture shot. Its map id is implicit from the containing map and must not be declared.",
|
|
571
|
+
"type": "object",
|
|
572
|
+
"additionalProperties": false,
|
|
573
|
+
"x-tileflow-refinements": [
|
|
574
|
+
{
|
|
575
|
+
"path": "keyframes",
|
|
576
|
+
"rule": "The first keyframe is at 0 and each later keyframe is at a strictly greater time."
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"path": "keyframes[*].blend",
|
|
580
|
+
"rule": "Either every keyframe or none declares blend; every blend lists the same themes in the same order."
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"path": "keyframes",
|
|
584
|
+
"rule": "floor(lastKeyframe.at * fps / 1000) + 1 <= 3600 frames; fps defaults to 30."
|
|
585
|
+
}
|
|
586
|
+
],
|
|
587
|
+
"properties": {
|
|
588
|
+
"theme": {
|
|
589
|
+
"$ref": "#/$defs/shot___schema1"
|
|
590
|
+
},
|
|
591
|
+
"viewport": {
|
|
592
|
+
"$ref": "#/$defs/shot___schema2"
|
|
593
|
+
},
|
|
594
|
+
"fps": {
|
|
595
|
+
"$ref": "#/$defs/shot___schema6"
|
|
596
|
+
},
|
|
597
|
+
"keyframes": {
|
|
598
|
+
"$ref": "#/$defs/shot___schema7"
|
|
599
|
+
},
|
|
600
|
+
"easing": {
|
|
601
|
+
"$ref": "#/$defs/shot___schema11"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"required": ["theme", "viewport", "keyframes"]
|
|
605
|
+
},
|
|
550
606
|
"TileflowAuthoringModules": {
|
|
551
607
|
"additionalProperties": false,
|
|
552
608
|
"description": "Closed semantic-domain record. Direct declarations replace; refine/disable make inheritance intent explicit.",
|
|
@@ -1010,7 +1066,7 @@
|
|
|
1010
1066
|
"type": "object"
|
|
1011
1067
|
},
|
|
1012
1068
|
"ResolvedTileflowMap": {
|
|
1013
|
-
"description": "Standalone compiler input after inheritance. Tooling scenes and extends are no longer present.",
|
|
1069
|
+
"description": "Standalone compiler input after inheritance. Tooling scenes, shots, and extends are no longer present.",
|
|
1014
1070
|
"type": "object",
|
|
1015
1071
|
"properties": {
|
|
1016
1072
|
"atmosphere": {
|
|
@@ -8485,6 +8541,18 @@
|
|
|
8485
8541
|
"lighting": {
|
|
8486
8542
|
"type": "object",
|
|
8487
8543
|
"properties": {
|
|
8544
|
+
"ambient": {
|
|
8545
|
+
"type": "object",
|
|
8546
|
+
"properties": {
|
|
8547
|
+
"color": {
|
|
8548
|
+
"$ref": "#/$defs/__schema8"
|
|
8549
|
+
},
|
|
8550
|
+
"intensity": {
|
|
8551
|
+
"$ref": "#/$defs/__schema10"
|
|
8552
|
+
}
|
|
8553
|
+
},
|
|
8554
|
+
"additionalProperties": false
|
|
8555
|
+
},
|
|
8488
8556
|
"anchor": {
|
|
8489
8557
|
"type": "string",
|
|
8490
8558
|
"enum": ["map", "viewport"]
|
|
@@ -8511,6 +8579,27 @@
|
|
|
8511
8579
|
"minItems": 3,
|
|
8512
8580
|
"maxItems": 3,
|
|
8513
8581
|
"items": false
|
|
8582
|
+
},
|
|
8583
|
+
"sun": {
|
|
8584
|
+
"type": "object",
|
|
8585
|
+
"properties": {
|
|
8586
|
+
"altitude": {
|
|
8587
|
+
"$ref": "#/$defs/__schema10"
|
|
8588
|
+
},
|
|
8589
|
+
"azimuth": {
|
|
8590
|
+
"$ref": "#/$defs/__schema10"
|
|
8591
|
+
},
|
|
8592
|
+
"color": {
|
|
8593
|
+
"$ref": "#/$defs/__schema8"
|
|
8594
|
+
},
|
|
8595
|
+
"intensity": {
|
|
8596
|
+
"$ref": "#/$defs/__schema10"
|
|
8597
|
+
},
|
|
8598
|
+
"shadowIntensity": {
|
|
8599
|
+
"$ref": "#/$defs/__schema10"
|
|
8600
|
+
}
|
|
8601
|
+
},
|
|
8602
|
+
"additionalProperties": false
|
|
8514
8603
|
}
|
|
8515
8604
|
},
|
|
8516
8605
|
"additionalProperties": false
|
|
@@ -32300,6 +32389,213 @@
|
|
|
32300
32389
|
"scene___schema15": {
|
|
32301
32390
|
"type": "string",
|
|
32302
32391
|
"enum": ["map", "viewport"]
|
|
32392
|
+
},
|
|
32393
|
+
"shot___schema0": {
|
|
32394
|
+
"type": "string",
|
|
32395
|
+
"minLength": 1,
|
|
32396
|
+
"maxLength": 64,
|
|
32397
|
+
"pattern": "^[a-z][a-z0-9-]{0,63}$",
|
|
32398
|
+
"not": {
|
|
32399
|
+
"enum": [
|
|
32400
|
+
"aux",
|
|
32401
|
+
"com1",
|
|
32402
|
+
"com2",
|
|
32403
|
+
"com3",
|
|
32404
|
+
"com4",
|
|
32405
|
+
"com5",
|
|
32406
|
+
"com6",
|
|
32407
|
+
"com7",
|
|
32408
|
+
"com8",
|
|
32409
|
+
"com9",
|
|
32410
|
+
"con",
|
|
32411
|
+
"constructor",
|
|
32412
|
+
"lpt1",
|
|
32413
|
+
"lpt2",
|
|
32414
|
+
"lpt3",
|
|
32415
|
+
"lpt4",
|
|
32416
|
+
"lpt5",
|
|
32417
|
+
"lpt6",
|
|
32418
|
+
"lpt7",
|
|
32419
|
+
"lpt8",
|
|
32420
|
+
"lpt9",
|
|
32421
|
+
"nul",
|
|
32422
|
+
"prn",
|
|
32423
|
+
"prototype"
|
|
32424
|
+
]
|
|
32425
|
+
},
|
|
32426
|
+
"description": "Portable lowercase kebab-case identifier; prototype keys and reserved Windows filenames are forbidden."
|
|
32427
|
+
},
|
|
32428
|
+
"shot___schema1": {
|
|
32429
|
+
"$ref": "#/$defs/shot___schema0"
|
|
32430
|
+
},
|
|
32431
|
+
"shot___schema2": {
|
|
32432
|
+
"type": "object",
|
|
32433
|
+
"properties": {
|
|
32434
|
+
"width": {
|
|
32435
|
+
"$ref": "#/$defs/shot___schema3"
|
|
32436
|
+
},
|
|
32437
|
+
"height": {
|
|
32438
|
+
"$ref": "#/$defs/shot___schema4"
|
|
32439
|
+
},
|
|
32440
|
+
"dpr": {
|
|
32441
|
+
"$ref": "#/$defs/shot___schema5"
|
|
32442
|
+
}
|
|
32443
|
+
},
|
|
32444
|
+
"required": ["width", "height"],
|
|
32445
|
+
"additionalProperties": false,
|
|
32446
|
+
"description": "Logical viewport. Physical width and height (logical dimension multiplied by dpr) are each at most 4096.",
|
|
32447
|
+
"allOf": [
|
|
32448
|
+
{
|
|
32449
|
+
"if": {
|
|
32450
|
+
"properties": {
|
|
32451
|
+
"dpr": {
|
|
32452
|
+
"const": 2
|
|
32453
|
+
}
|
|
32454
|
+
},
|
|
32455
|
+
"required": ["dpr"]
|
|
32456
|
+
},
|
|
32457
|
+
"then": {
|
|
32458
|
+
"properties": {
|
|
32459
|
+
"height": {
|
|
32460
|
+
"maximum": 2048
|
|
32461
|
+
},
|
|
32462
|
+
"width": {
|
|
32463
|
+
"maximum": 2048
|
|
32464
|
+
}
|
|
32465
|
+
}
|
|
32466
|
+
}
|
|
32467
|
+
}
|
|
32468
|
+
]
|
|
32469
|
+
},
|
|
32470
|
+
"shot___schema3": {
|
|
32471
|
+
"type": "integer",
|
|
32472
|
+
"minimum": 64,
|
|
32473
|
+
"maximum": 4096
|
|
32474
|
+
},
|
|
32475
|
+
"shot___schema4": {
|
|
32476
|
+
"type": "integer",
|
|
32477
|
+
"minimum": 64,
|
|
32478
|
+
"maximum": 4096
|
|
32479
|
+
},
|
|
32480
|
+
"shot___schema5": {
|
|
32481
|
+
"anyOf": [
|
|
32482
|
+
{
|
|
32483
|
+
"type": "number",
|
|
32484
|
+
"const": 1
|
|
32485
|
+
},
|
|
32486
|
+
{
|
|
32487
|
+
"type": "number",
|
|
32488
|
+
"const": 2
|
|
32489
|
+
}
|
|
32490
|
+
]
|
|
32491
|
+
},
|
|
32492
|
+
"shot___schema6": {
|
|
32493
|
+
"type": "number",
|
|
32494
|
+
"enum": [24, 25, 30, 50, 60]
|
|
32495
|
+
},
|
|
32496
|
+
"shot___schema7": {
|
|
32497
|
+
"minItems": 2,
|
|
32498
|
+
"maxItems": 64,
|
|
32499
|
+
"type": "array",
|
|
32500
|
+
"items": {
|
|
32501
|
+
"$ref": "#/$defs/shot___schema8"
|
|
32502
|
+
}
|
|
32503
|
+
},
|
|
32504
|
+
"shot___schema8": {
|
|
32505
|
+
"type": "object",
|
|
32506
|
+
"properties": {
|
|
32507
|
+
"at": {
|
|
32508
|
+
"type": "integer",
|
|
32509
|
+
"minimum": 0,
|
|
32510
|
+
"maximum": 60000
|
|
32511
|
+
},
|
|
32512
|
+
"camera": {
|
|
32513
|
+
"type": "object",
|
|
32514
|
+
"properties": {
|
|
32515
|
+
"type": {
|
|
32516
|
+
"type": "string",
|
|
32517
|
+
"const": "center"
|
|
32518
|
+
},
|
|
32519
|
+
"center": {
|
|
32520
|
+
"type": "array",
|
|
32521
|
+
"prefixItems": [
|
|
32522
|
+
{
|
|
32523
|
+
"type": "number",
|
|
32524
|
+
"minimum": -180,
|
|
32525
|
+
"maximum": 180
|
|
32526
|
+
},
|
|
32527
|
+
{
|
|
32528
|
+
"type": "number",
|
|
32529
|
+
"minimum": -90,
|
|
32530
|
+
"maximum": 90
|
|
32531
|
+
}
|
|
32532
|
+
],
|
|
32533
|
+
"minItems": 2,
|
|
32534
|
+
"maxItems": 2,
|
|
32535
|
+
"items": false
|
|
32536
|
+
},
|
|
32537
|
+
"zoom": {
|
|
32538
|
+
"type": "number",
|
|
32539
|
+
"minimum": 0,
|
|
32540
|
+
"maximum": 24
|
|
32541
|
+
},
|
|
32542
|
+
"bearing": {
|
|
32543
|
+
"type": "number",
|
|
32544
|
+
"minimum": -180,
|
|
32545
|
+
"maximum": 180
|
|
32546
|
+
},
|
|
32547
|
+
"pitch": {
|
|
32548
|
+
"type": "number",
|
|
32549
|
+
"minimum": 0,
|
|
32550
|
+
"maximum": 85
|
|
32551
|
+
}
|
|
32552
|
+
},
|
|
32553
|
+
"required": ["type", "center", "zoom"],
|
|
32554
|
+
"additionalProperties": false
|
|
32555
|
+
},
|
|
32556
|
+
"blend": {
|
|
32557
|
+
"type": "object",
|
|
32558
|
+
"properties": {
|
|
32559
|
+
"themes": {
|
|
32560
|
+
"$ref": "#/$defs/shot___schema9"
|
|
32561
|
+
},
|
|
32562
|
+
"position": {
|
|
32563
|
+
"$ref": "#/$defs/shot___schema10"
|
|
32564
|
+
}
|
|
32565
|
+
},
|
|
32566
|
+
"required": ["themes", "position"],
|
|
32567
|
+
"additionalProperties": false,
|
|
32568
|
+
"description": "Theme blend at this keyframe: distinct concrete themes of the map, in blend order, and a position from 0 to themes.length - 1.",
|
|
32569
|
+
"x-tileflow-refinements": [
|
|
32570
|
+
{
|
|
32571
|
+
"path": "themes",
|
|
32572
|
+
"rule": "Themes are distinct."
|
|
32573
|
+
},
|
|
32574
|
+
{
|
|
32575
|
+
"path": "position",
|
|
32576
|
+
"rule": "position <= themes.length - 1"
|
|
32577
|
+
}
|
|
32578
|
+
]
|
|
32579
|
+
}
|
|
32580
|
+
},
|
|
32581
|
+
"required": ["at", "camera"],
|
|
32582
|
+
"additionalProperties": false
|
|
32583
|
+
},
|
|
32584
|
+
"shot___schema9": {
|
|
32585
|
+
"minItems": 2,
|
|
32586
|
+
"maxItems": 8,
|
|
32587
|
+
"type": "array",
|
|
32588
|
+
"items": {
|
|
32589
|
+
"$ref": "#/$defs/shot___schema1"
|
|
32590
|
+
}
|
|
32591
|
+
},
|
|
32592
|
+
"shot___schema10": {
|
|
32593
|
+
"type": "number",
|
|
32594
|
+
"minimum": 0
|
|
32595
|
+
},
|
|
32596
|
+
"shot___schema11": {
|
|
32597
|
+
"type": "string",
|
|
32598
|
+
"enum": ["smooth", "linear"]
|
|
32303
32599
|
}
|
|
32304
32600
|
}
|
|
32305
32601
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b8 as TileflowThemeColorValue, o as TileflowSymbolStyle, A as TileflowAreaStyle, _ as TileflowLineStackStyle, n as TileflowLineStyle, l as TileflowExtrusionStyle, j as TileflowBackgroundStyle, m as TileflowFillStyle, a3 as TileflowMarkerSymbolStyle, k as TileflowCircleStyle, bb as TileflowThemeNumberValue, aY as TileflowTerrainHillshadeStyle, aX as TileflowTerrainEncoding, b9 as TileflowThemeFontValue, ba as TileflowThemeImageValue, bV as TileflowTypographyStyle, S as TileflowLight, bW as ResolvedTileflowTypography, s as TileflowLabelsModuleConfig, v as TileflowPoiModuleConfig, q as TileflowRoadsModuleConfig, ad as TileflowProjection, aS as TileflowTerrain, bf as TileflowViewConfig, M as MapLibreStyle, bj as ValidationResult } from './manifest-types-E7m23eXL.js';
|
|
2
2
|
import * as zod from 'zod';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { T as TileflowCaptureScene } from './capture-
|
|
4
|
+
import { T as TileflowCaptureScene, a as TileflowCaptureShot } from './capture-shot-ChPQvPyi.js';
|
|
5
5
|
|
|
6
6
|
/** Optional globe atmosphere. Colors use theme tokens or explicit fixed values and must resolve to opaque colors. */
|
|
7
7
|
type TileflowAtmosphereOptions = {
|
|
@@ -644,6 +644,97 @@ type ResolvedMarine = Readonly<{
|
|
|
644
644
|
/** Resolve the optional marine sidecars without fetching their TileJSON documents. */
|
|
645
645
|
declare function resolveMarine(marine: TileflowMarine | undefined, apiBaseUrl?: string): ResolvedMarine | undefined;
|
|
646
646
|
|
|
647
|
+
declare const tileflowSunMetadataKey = "tileflow:sun";
|
|
648
|
+
/** A theme's sun and sky light with every value resolved; see `TileflowThemeSun`. */
|
|
649
|
+
type TileflowSunPreset = Readonly<{
|
|
650
|
+
/** Degrees clockwise from north, from 0 to 360. */
|
|
651
|
+
azimuth: number;
|
|
652
|
+
/** Degrees above the horizon, from -90 to 90. */
|
|
653
|
+
altitude: number;
|
|
654
|
+
/** The direct light's colour. */
|
|
655
|
+
color: string;
|
|
656
|
+
/** The direct light's strength, from 0 to 1. */
|
|
657
|
+
intensity: number;
|
|
658
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
659
|
+
shadowIntensity: number;
|
|
660
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
661
|
+
ambient: Readonly<{
|
|
662
|
+
color: string;
|
|
663
|
+
intensity: number;
|
|
664
|
+
}>;
|
|
665
|
+
}>;
|
|
666
|
+
/** The sun as the map shows it, ready for an application's own layers. */
|
|
667
|
+
type TileflowSun = Readonly<{
|
|
668
|
+
/** Degrees clockwise from north, from 0 to 360. */
|
|
669
|
+
azimuth: number;
|
|
670
|
+
/** Degrees above the horizon, from -90 to 90. */
|
|
671
|
+
altitude: number;
|
|
672
|
+
/** A unit vector towards the sun: x east, y north, z up. */
|
|
673
|
+
direction: readonly [number, number, number];
|
|
674
|
+
/** The direct light's colour, as a CSS colour. */
|
|
675
|
+
color: string;
|
|
676
|
+
/** The direct light's colour as sRGB channels from 0 to 1. */
|
|
677
|
+
rgb: readonly [number, number, number];
|
|
678
|
+
/**
|
|
679
|
+
* The direct light's strength, from 0 to 1. It fades to 0 as the sun sets: a sun below the
|
|
680
|
+
* horizon lights nothing and casts no shadow.
|
|
681
|
+
*/
|
|
682
|
+
intensity: number;
|
|
683
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
684
|
+
shadowIntensity: number;
|
|
685
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
686
|
+
ambient: Readonly<{
|
|
687
|
+
color: string;
|
|
688
|
+
rgb: readonly [number, number, number];
|
|
689
|
+
intensity: number;
|
|
690
|
+
}>;
|
|
691
|
+
/**
|
|
692
|
+
* How bright flat, open ground is under this light, from 0 (dark) to 1: the sky's light plus the
|
|
693
|
+
* sun's at its height, each weighted by its colour's luminance. Use it to switch lamps or windows
|
|
694
|
+
* on as a scene darkens, whatever theme or sun lights it.
|
|
695
|
+
*/
|
|
696
|
+
brightness: number;
|
|
697
|
+
/** Where the direction comes from: the themes, angles, or a date and place. */
|
|
698
|
+
source: 'theme' | 'direction' | 'date';
|
|
699
|
+
}>;
|
|
700
|
+
/** The sun of a theme that leaves a value unset: high in the south-south-west, in white light. */
|
|
701
|
+
declare const tileflowDefaultSunPreset: TileflowSunPreset;
|
|
702
|
+
/**
|
|
703
|
+
* Where the sun stands for an instant and a place ([longitude, latitude] in degrees): its azimuth
|
|
704
|
+
* in degrees clockwise from north and its apparent altitude above the horizon, with atmospheric
|
|
705
|
+
* refraction. It follows NOAA's solar equations, accurate to about a hundredth of a degree for
|
|
706
|
+
* years 1800 to 2200.
|
|
707
|
+
*/
|
|
708
|
+
declare function tileflowSunPosition(date: Date | number, location: readonly [number, number]): Readonly<{
|
|
709
|
+
azimuth: number;
|
|
710
|
+
altitude: number;
|
|
711
|
+
}>;
|
|
712
|
+
/** A unit vector towards a direction in the sky: x east, y north, z up. */
|
|
713
|
+
declare function tileflowSunDirection(azimuth: number, altitude: number): readonly [number, number, number];
|
|
714
|
+
/**
|
|
715
|
+
* The sun as the map shows it: a preset's light from a direction. Direct light fades out over the
|
|
716
|
+
* sun's last degrees above the horizon and is gone below it.
|
|
717
|
+
*/
|
|
718
|
+
declare function resolveTileflowSun(preset: TileflowSunPreset, direction?: Readonly<{
|
|
719
|
+
azimuth: number;
|
|
720
|
+
altitude: number;
|
|
721
|
+
}>, source?: TileflowSun['source']): TileflowSun;
|
|
722
|
+
/**
|
|
723
|
+
* A preset `t` of the way from `from` to `to`: the azimuth turns the short way round, colours mix
|
|
724
|
+
* in OKLab, as theme blends mix paint colours, and numbers linearly.
|
|
725
|
+
*/
|
|
726
|
+
declare function mixTileflowSunPresets(from: TileflowSunPreset, to: TileflowSunPreset, t: number): TileflowSunPreset;
|
|
727
|
+
/** Reads the sun a compiled style publishes, or undefined when its metadata has none. */
|
|
728
|
+
declare function readTileflowSunPreset(metadata: unknown): TileflowSunPreset | undefined;
|
|
729
|
+
/**
|
|
730
|
+
* The sun of a compiled style: the one it publishes, else one read from its light (a style whose
|
|
731
|
+
* theme describes no sun lights its extrusions from `light.position`), else the default.
|
|
732
|
+
*/
|
|
733
|
+
declare function tileflowStyleSunPreset(style: {
|
|
734
|
+
light?: unknown;
|
|
735
|
+
metadata?: unknown;
|
|
736
|
+
} | undefined): TileflowSunPreset;
|
|
737
|
+
|
|
647
738
|
type TileflowVisualValueCategory = 'color' | 'font' | 'image' | 'number';
|
|
648
739
|
/** Return the semantic theme category for one visual property, or undefined for structure/data. */
|
|
649
740
|
declare function classifyTileflowVisualProperty(property: string, _value?: unknown): TileflowVisualValueCategory | undefined;
|
|
@@ -671,8 +762,38 @@ type TileflowThemeTypography = TileflowThemeTypographyStyle & {
|
|
|
671
762
|
roads?: TileflowThemeTypographyStyle;
|
|
672
763
|
water?: TileflowThemeTypographyStyle;
|
|
673
764
|
};
|
|
765
|
+
/**
|
|
766
|
+
* The theme's sun: where it stands and the light it gives, as a light preset for the theme. A
|
|
767
|
+
* theme for the evening sets a low sun in the west in warm light; one for the night, a moon with
|
|
768
|
+
* faint shadows. Unset values take the defaults in `tileflowDefaultSunPreset`.
|
|
769
|
+
*/
|
|
770
|
+
type TileflowThemeSun = {
|
|
771
|
+
/** Degrees clockwise from north. */
|
|
772
|
+
azimuth?: TileflowThemeNumberValue;
|
|
773
|
+
/** Degrees above the horizon, from -90 to 90; a sun below the horizon lights nothing. */
|
|
774
|
+
altitude?: TileflowThemeNumberValue;
|
|
775
|
+
/** The direct light's colour. */
|
|
776
|
+
color?: TileflowThemeColorValue;
|
|
777
|
+
/** The direct light's strength, from 0 to 1. */
|
|
778
|
+
intensity?: TileflowThemeNumberValue;
|
|
779
|
+
/** How dark the shadows the sun casts fall, from 0 (none) to 1. */
|
|
780
|
+
shadowIntensity?: TileflowThemeNumberValue;
|
|
781
|
+
};
|
|
782
|
+
/** The light from the sky, which reaches every surface and fills the shadows. */
|
|
783
|
+
type TileflowThemeAmbient = {
|
|
784
|
+
color?: TileflowThemeColorValue;
|
|
785
|
+
/** From 0 to 1. */
|
|
786
|
+
intensity?: TileflowThemeNumberValue;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* How the theme lights the map. `anchor`, `color`, `intensity`, and `position` are MapLibre's light,
|
|
790
|
+
* which shades 3D extrusions. `sun` and `ambient` describe the theme's sun and sky light for 3D
|
|
791
|
+
* scenes (`themeController.getSun()`); with a `sun`, the map's light is anchored to the map and
|
|
792
|
+
* points from the sun, and `anchor` and the direction in `position` no longer apply.
|
|
793
|
+
*/
|
|
674
794
|
type TileflowThemeLighting = {
|
|
675
795
|
anchor?: 'map' | 'viewport';
|
|
796
|
+
ambient?: TileflowThemeAmbient;
|
|
676
797
|
color?: TileflowThemeColorValue;
|
|
677
798
|
intensity?: TileflowThemeNumberValue;
|
|
678
799
|
position?: readonly [
|
|
@@ -680,6 +801,7 @@ type TileflowThemeLighting = {
|
|
|
680
801
|
TileflowThemeNumberValue,
|
|
681
802
|
TileflowThemeNumberValue
|
|
682
803
|
];
|
|
804
|
+
sun?: TileflowThemeSun;
|
|
683
805
|
};
|
|
684
806
|
/** A complete, inheritance-free appearance document. */
|
|
685
807
|
type TileflowTheme = {
|
|
@@ -706,7 +828,10 @@ type ResolvedTileflowThemeTokens = {
|
|
|
706
828
|
number: Readonly<Record<string, number>>;
|
|
707
829
|
};
|
|
708
830
|
type ResolvedTileflowTheme = Omit<TileflowTheme, 'lighting' | 'tokens' | 'typography'> & {
|
|
831
|
+
/** MapLibre's light; with a sun, anchored to the map and pointing from it. */
|
|
709
832
|
lighting: TileflowLight;
|
|
833
|
+
/** The theme's sun and sky light, when the theme describes either. */
|
|
834
|
+
sun?: TileflowSunPreset;
|
|
710
835
|
tokens: ResolvedTileflowThemeTokens;
|
|
711
836
|
typography: ResolvedTileflowTypography;
|
|
712
837
|
};
|
|
@@ -945,9 +1070,12 @@ type TileflowMapIdentity = {
|
|
|
945
1070
|
};
|
|
946
1071
|
/** A capture scene owned by one singular map; its map id is implicit. */
|
|
947
1072
|
type TileflowMapScene = Omit<TileflowCaptureScene, 'map'>;
|
|
1073
|
+
/** A timed capture shot owned by one singular map; its map id is implicit. */
|
|
1074
|
+
type TileflowMapShot = Omit<TileflowCaptureShot, 'map'>;
|
|
948
1075
|
/** Tooling metadata belongs to the leaf definition and is never inherited. */
|
|
949
1076
|
type TileflowMapTooling = {
|
|
950
1077
|
scenes?: Record<string, TileflowMapScene>;
|
|
1078
|
+
shots?: Record<string, TileflowMapShot>;
|
|
951
1079
|
};
|
|
952
1080
|
type TileflowMapTextAssets = {
|
|
953
1081
|
fonts?: never;
|
|
@@ -1336,4 +1464,4 @@ declare function parseTileflowIconComposition(input: unknown): TileflowIconCompo
|
|
|
1336
1464
|
/** Dependency identity is separate from the generated artifact's content hash. */
|
|
1337
1465
|
declare function hashTileflowIconComposition(input: TileflowIconCompositionV1): Promise<string>;
|
|
1338
1466
|
|
|
1339
|
-
export { type
|
|
1467
|
+
export { type TileflowAtmosphere as $, type TileflowBandPlacement as A, type OpenMapTilesLayerBindings as B, tileflowCompilationPhases as C, tileflowCompilationPlannerStages as D, tileflowCompilationReportSchemaVersion as E, type TileflowSemanticModuleName as F, tileflowHostedSourceLimit as G, tileflowOverlayPlacements as H, type ResolvedTileflowTheme as I, type TileflowThemeColorScheme as J, type TileflowIconSource as K, type OpenMapTilesSchema as L, type OpenMapTilesSchemaOptions as M, type ResolvedBathymetry as N, type OpenMapTilesFieldBindings as O, type ParkLayerSemantics as P, type ResolvedBathymetryRelief as Q, type ResolvedTileflowMap as R, type ResolvedMarine as S, type TileflowRenderedIconIdentity as T, type ResolvedMarineSource as U, type ResolvedTileflowData as V, type ResolvedTileflowThemeTokens as W, type TileflowAddressesModuleConfig as X, type TileflowAddressesModuleOptions as Y, type TileflowAerowaysModuleConfig as Z, type TileflowAerowaysModuleOptions as _, type TileflowIconCompositionV1 as a, type TileflowPackageDirectory as a$, type TileflowAtmosphereOptions as a0, type TileflowAuthoringModules as a1, type TileflowBathymetryConfig as a2, type TileflowBathymetryDemSourceIdentity as a3, type TileflowBathymetryDisplay as a4, type TileflowBathymetryOptions as a5, type TileflowBathymetryReliefConfig as a6, type TileflowBoundariesModuleConfig as a7, type TileflowBoundariesModuleOptions as a8, type TileflowBuildingMode as a9, type TileflowIconSetSource as aA, type TileflowLandModuleConfig as aB, type TileflowLandModuleOptions as aC, type TileflowLandcoverClass as aD, type TileflowLandformClass as aE, type TileflowLandformsModuleConfig as aF, type TileflowLandformsModuleOptions as aG, type TileflowLanduseClass as aH, type TileflowLayerBand as aI, type TileflowLocalDirectory as aJ, type TileflowMapDesign as aK, type TileflowMapIdentity as aL, type TileflowMapLibreOverlay as aM, type TileflowMapLibreOverlayLayer as aN, type TileflowMapTooling as aO, type TileflowMarine as aP, type TileflowMarineConfig as aQ, type TileflowMarineMode as aR, type TileflowMarineSourceConfig as aS, type TileflowMarineSourceIdentity as aT, type TileflowModuleOperation as aU, type TileflowModulePatch as aV, type TileflowNauticalAreaLabelStyles as aW, type TileflowNauticalModuleConfig as aX, type TileflowNauticalModuleOptions as aY, type TileflowOverlayCollection as aZ, type TileflowOverlayPlacement as a_, type TileflowBuildingsModuleConfig as aa, type TileflowBuildingsModuleOptions as ab, type TileflowCompilationDiagnostic as ac, type TileflowCompilationDomainReport as ad, type TileflowCompilationFailure as ae, type TileflowCompilationOptions as af, type TileflowCompilationPhase as ag, type TileflowCompilationPlannerDecision as ah, type TileflowCompilationPlannerStage as ai, type TileflowCompilationReport as aj, type TileflowCompilationResult as ak, type TileflowCompilationSuccess as al, type TileflowDataConfig as am, type TileflowDataIdentity as an, type TileflowDerivedMap as ao, type TileflowDisableOperation as ap, type TileflowFontDirectory as aq, type TileflowGlyphs as ar, type TileflowHostedSourceCollection as as, type TileflowHostedTilesetSource as at, type TileflowHostedTilesetType as au, type TileflowIconContributorIdentity as av, type TileflowIconDirectory as aw, TileflowIconSetError as ax, type TileflowIconSetErrorCode as ay, type TileflowIconSetReference as az, type TileflowDataRequirementsV1 as b, landforms as b$, type TileflowPreparedIconCapabilities as b0, type TileflowRasterDemSourceRequirementV1 as b1, type TileflowRefineOperation as b2, type TileflowRemoveOperation as b3, type TileflowReset as b4, type TileflowResolvedThemeSelection as b5, type TileflowSemanticModules as b6, type TileflowStandaloneMap as b7, type TileflowSun as b8, type TileflowSunPreset as b9, type TileflowWorldSelection as bA, type TileflowWorldV1Schema as bB, type VectorTilesData as bC, addresses as bD, aeroways as bE, assertTileflowMapThemeValues as bF, assertTileflowSdfPixels as bG, auditTileflowMapThemeValues as bH, auditTileflowThemeValues as bI, bathymetry as bJ, boundaries as bK, buildings as bL, classifyTileflowVisualProperty as bM, collectTileflowIconSetReferences as bN, createStyle as bO, createStyleResult as bP, defineTheme as bQ, disable as bR, hashTileflowIconComposition as bS, hostedTileset as bT, iconSet as bU, isCanonicalOpenMapTilesSchema as bV, isSafeLocalPmtilesPath as bW, isTileflowCompilationPhase as bX, isTileflowIconSetSource as bY, isTileflowLocalDirectory as bZ, land as b_, type TileflowTheme as ba, type TileflowThemeAmbient as bb, type TileflowThemeAuditContext as bc, type TileflowThemeAuditDiagnostic as bd, TileflowThemeAuditError as be, type TileflowThemeAuditScope as bf, type TileflowThemeDefinition as bg, type TileflowThemeLighting as bh, type TileflowThemeName as bi, type TileflowThemeSun as bj, type TileflowThemeTokens as bk, type TileflowThemeTypography as bl, type TileflowThemeTypographyStyle as bm, type TileflowTransitModuleConfig as bn, type TileflowTransitModuleOptions as bo, type TileflowTransitRailStyle as bp, type TileflowVegetationMode as bq, type TileflowVegetationModuleConfig as br, type TileflowVegetationModuleOptions as bs, type TileflowVegetationThreeDimensionalStyle as bt, type TileflowVisualValueCategory as bu, type TileflowWaterModuleConfig as bv, type TileflowWaterModuleOptions as bw, type TileflowWaterwayClass as bx, type TileflowWorldData as by, type TileflowWorldReleaseReference as bz, type TileflowSourceRequirementsV1 as c, maplibreOverlay as c0, mixTileflowSunPresets as c1, nautical as c2, openMapTiles as c3, openMapTilesContractVersion as c4, parseTileflowIconComposition as c5, parseTileflowMap as c6, readTileflowSunPreset as c7, refine as c8, remove as c9, tileflowLocalDirectoryMaximumLength as cA, tileflowLocalDirectoryMessage as cB, tileflowMapIdSchema as cC, tileflowNauticalSourceId as cD, tileflowNauticalV1Schema as cE, tileflowPrimarySourceId as cF, tileflowRenderedIconIdentitySchema as cG, tileflowStyleSunPreset as cH, tileflowSunDirection as cI, tileflowSunMetadataKey as cJ, tileflowSunPosition as cK, tileflowThemeLimits as cL, tileflowWorld as cM, tileflowWorldGeneration as cN, tileflowWorldTileJsonUrl as cO, tileflowWorldV1Schema as cP, transit as cQ, validateTileflowCompiledIconCapabilities as cR, validateTileflowMap as cS, validateTileflowWorldV1Tilejson as cT, vectorTiles as cU, vegetation as cV, water as cW, reset as ca, resolveMarine as cb, resolveThemeSelection as cc, resolveThemeValues as cd, resolveTileflowData as ce, resolveTileflowSun as cf, resolveTileflowTheme as cg, tileflowBandPlacements as ch, tileflowBathymetryDemSourceId as ci, tileflowBathymetrySourceId as cj, tileflowBathymetryV1Schema as ck, tileflowDefaultSunPreset as cl, tileflowIconAppearanceSchema as cm, tileflowIconAuthorMetadataSchema as cn, tileflowIconCompositionMaximumBytes as co, tileflowIconCompositionSchema as cp, tileflowIconMetadataFileName as cq, tileflowIconSetIdSchema as cr, tileflowIconSetPackageIdSchema as cs, tileflowIconSetReferenceSchema as ct, tileflowIconSetSourceSchema as cu, tileflowIconSetTeamIdSchema as cv, tileflowIconSetVersionIdSchema as cw, tileflowIconSourceLimit as cx, tileflowLandformClasses as cy, tileflowLayerBands as cz, type TileflowMap as d, type TileflowStyleOptions as e, type TileflowInspectedStyle as f, type TileflowPreparedMapAssets as g, type TileflowDataCompatibilityIssue as h, type TileflowDataFieldRequirement as i, type TileflowDataFieldType as j, type TileflowDataLayerRequirement as k, type TileflowObservedDataContractV1 as l, type TileflowStyleInspection as m, type TileflowStyleInspectionContribution as n, type TileflowStyleInspectionLayer as o, type TileflowStyleInspectionRenderOperation as p, collectMapLineage as q, inferTileflowDataRequirements as r, inferTileflowSourceRequirements as s, tileflowStyleInspectionSchemaVersion as t, type TileflowMapScene as u, validateTileflowDataCompatibility as v, type TileflowMapShot as w, type ResolveMapOptions as x, type TileflowIconAppearance as y, type TileflowLayerDomain as z };
|