1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! The map style: [`Style`], the style JSON parser, layers and sources, the
//! property system (`property`), the expression language (`expression`), what
//! expressions read of a feature (`feature`), the spec's value types (`types`)
//! and the conversions from JSON-like values to style types (`conversion`).
//!
//! It also holds the vocabulary that the style shares with the engine:
//! errors, colors, padding, sizes, ranges, interpolation and easing
//! (`unitbezier`), images' pixels (`bitmap`), coordinates (`geo`), tilesets,
//! feature types (`geometry`), canonical tile ids (`tile_id`), the spec's
//! constants, math, number formatting (`string`), hash maps, clocks
//! (`time`), the Unicode script checks (`i18n`) and the projection's
//! subdivision granularity.
//!
//! A style parses against a [`StyleRegistry`]: the expression functions,
//! layer types and source types its JSON, property values and filters may
//! name, the extension members (`member`) that give the style's and its
//! layers' `<namespace>:<name>` members a type, and the projections (`crs`)
//! its `projection.type` may name.
//!
//! Versions:
//! - A [`Style`] is a value: a version of a map's style. Its parts sit
//! behind `Arc`s, so versions share what they don't change, and a part
//! whose `Arc` is the same pointer in two versions is the same part.
//! - [`Style::apply`] makes an [`Edit`], the only way to change a style; the
//! JSON entry points (`add_layer_json`, `set_layer_property_json`, ...)
//! parse and then apply one.
//! - [`Style::is_same_version`] says in O(1) whether two versions are the
//! same, and [`diff::StyleDiff::between`] what a renderer has to redo for
//! each layer, source and image to go from one version to another.
//! - Loading isn't here: the map's loader fetches documents, sprites and
//! source descriptions, and [`Style::from_json`] parses a document. A
//! style holds its sources as values ([`SourceList`]), and what their
//! loads find, of a type that the source type's engine half names,
//! arrives as edits.
//!
//! Layers:
//! - `layer::Layer` is a layer of any type. Its style data is an
//! `Arc<dyn layer::ErasedLayerStyle>`, a `layer::LayerStyle<T>`
//! of its type `T`; `layer::LayerBase` holds the members every layer
//! type has.
//! - Each layer type is a marker type that implements
//! `layer::StyleLayerType`, such as `layers::Background`, with
//! property sets such as
//! `layers::BackgroundPaintProperties::{Transitionable, Unevaluated, PossiblyEvaluated, Evaluated}`.
//! - Each layer type, the light and the sky have a property table, which
//! `property::table` reads to get, set and serialize properties by name.
//! `layers/<type>_layer_properties.rs`, `light_properties.rs` and
//! `sky_properties.rs` are generated by //tools/style-codegen from the style
//! spec.
pub use ;
pub use ;
// The property macros, at the root so that the generated code and the
// macros themselves name them as `crate::name!`.
pub use ;
pub use ;
pub use StyleRegistry;
pub use ;
pub use ;
pub use ;
pub use ;
/// The `tracing` targets of this crate's events. Each names the event that
/// `mln_c` reports it under (`mln_c::logging`).
/// What the expansions of [`properties!`] and [`layer_properties!`] name,
/// so that a crate that invokes them needn't depend on it.