@versatiles/style 5.9.4 → 5.10.0

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 CHANGED
@@ -163,7 +163,7 @@ subgraph 1["color"]
163
163
  end
164
164
  subgraph 9["guess_style"]
165
165
  A["guess_style.ts"]
166
- 10["index.ts"]
166
+ 11["index.ts"]
167
167
  end
168
168
  subgraph B["lib"]
169
169
  C["utils.ts"]
@@ -177,6 +177,7 @@ S["graybeard.ts"]
177
177
  T["neutrino.ts"]
178
178
  U["satellite.ts"]
179
179
  V["shadow.ts"]
180
+ W["variants.ts"]
180
181
  end
181
182
  subgraph G["style_builder"]
182
183
  H["style_builder.ts"]
@@ -190,13 +191,13 @@ K["layers.ts"]
190
191
  L["template.ts"]
191
192
  N["properties.ts"]
192
193
  end
193
- subgraph W["types"]
194
- X["index.ts"]
195
- Y["tilejson.ts"]
196
- Z["vector_layer.ts"]
197
- 12["maplibre.ts"]
194
+ subgraph X["types"]
195
+ Y["index.ts"]
196
+ Z["tilejson.ts"]
197
+ 10["vector_layer.ts"]
198
+ 13["maplibre.ts"]
198
199
  end
199
- 11["index.ts"]
200
+ 12["index.ts"]
200
201
  end
201
202
  3-->2
202
203
  3-->4
@@ -220,8 +221,8 @@ end
220
221
  A-->5
221
222
  A-->C
222
223
  A-->E
223
- A-->X
224
224
  A-->Y
225
+ A-->Z
225
226
  C-->8
226
227
  E-->F
227
228
  E-->Q
@@ -230,6 +231,7 @@ E-->S
230
231
  E-->T
231
232
  E-->U
232
233
  E-->V
234
+ E-->W
233
235
  F-->H
234
236
  H-->8
235
237
  H-->C
@@ -250,14 +252,16 @@ T-->F
250
252
  U-->C
251
253
  U-->S
252
254
  V-->F
253
- X-->Y
254
- X-->Z
255
- 10-->A
256
- 11-->8
257
- 11-->10
258
- 11-->E
259
-
260
- class 0,1,9,B,D,G,I,W subgraphs;
255
+ W-->E
256
+ W-->U
257
+ Y-->Z
258
+ Y-->10
259
+ 11-->A
260
+ 12-->8
261
+ 12-->11
262
+ 12-->E
263
+
264
+ class 0,1,9,B,D,G,I,X subgraphs;
261
265
  classDef subgraphs fill-opacity:0.1, fill:#888, color:#888, stroke:#888;
262
266
  ```
263
267
 
package/dist/index.d.ts CHANGED
@@ -678,9 +678,31 @@ interface SatelliteStyleOptions {
678
678
  rasterBrightnessMax?: number;
679
679
  rasterSaturation?: number;
680
680
  rasterContrast?: number;
681
+ /** URL to elevation TileJSON. Defaults to `/tiles/elevation/tiles.json` if terrain or hillshade is enabled. */
682
+ elevationTilejson?: string;
683
+ /** Enable 3D terrain. `true` for defaults, or object for custom exaggeration. */
684
+ terrain?: boolean | {
685
+ exaggeration?: number;
686
+ };
687
+ /** Enable hillshade layer. `true` for defaults, or object for custom paint properties. */
688
+ hillshade?: boolean | {
689
+ shadowColor?: string;
690
+ highlightColor?: string;
691
+ accentColor?: string;
692
+ illuminationDirection?: number;
693
+ illuminationAltitude?: number;
694
+ exaggeration?: number;
695
+ illuminationAnchor?: 'map' | 'viewport';
696
+ };
681
697
  }
682
698
  declare function buildSatelliteStyle(options?: SatelliteStyleOptions): Promise<StyleSpecification>;
683
699
 
700
+ interface StyleVariant {
701
+ name: string;
702
+ build: () => StyleSpecification | Promise<StyleSpecification>;
703
+ }
704
+ declare function getStyleVariants(): StyleVariant[];
705
+
684
706
  interface StyleBuilderFunction {
685
707
  (options?: StyleBuilderOptions): StyleSpecification;
686
708
  getOptions(): StyleBuilderOptions;
@@ -718,6 +740,9 @@ interface TileJSONSpecificationRaster {
718
740
  scheme?: 'tms' | 'xyz';
719
741
  template?: string;
720
742
  version?: string;
743
+ tile_schema?: string;
744
+ tile_size?: number;
745
+ encoding?: 'terrarium' | 'mapbox' | 'custom';
721
746
  }
722
747
  /** Structure for TileJSON specification of vector type, specifying vector-specific properties. */
723
748
  interface TileJSONSpecificationVector extends TileJSONSpecificationRaster {
@@ -765,5 +790,5 @@ declare const styles: {
765
790
  satellite: typeof buildSatelliteStyle;
766
791
  };
767
792
 
768
- export { Color, HSL, HSV, RGB, colorful, eclipse, graybeard, guessStyle, neutrino, buildSatelliteStyle as satellite, shadow, styles };
769
- export type { GuessStyleOptions, Language, RandomColorOptions, RecolorOptions, SatelliteStyleOptions, StyleBuilderColorKey, StyleBuilderColors, StyleBuilderFonts, StyleBuilderFunction, StyleBuilderOptions, TileJSONSpecification, TileJSONSpecificationRaster, TileJSONSpecificationVector, VectorLayer };
793
+ export { Color, HSL, HSV, RGB, colorful, eclipse, getStyleVariants, graybeard, guessStyle, neutrino, buildSatelliteStyle as satellite, shadow, styles };
794
+ export type { GuessStyleOptions, Language, RandomColorOptions, RecolorOptions, SatelliteStyleOptions, StyleBuilderColorKey, StyleBuilderColors, StyleBuilderFonts, StyleBuilderFunction, StyleBuilderOptions, StyleVariant, TileJSONSpecification, TileJSONSpecificationRaster, TileJSONSpecificationVector, VectorLayer };