@maplibre/maplibre-react-native 10.0.0-alpha.19 → 10.0.0-alpha.20

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/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ PR Title ([#123](link to my pr))
6
6
 
7
7
  ```
8
8
 
9
+ ## 10.0.0-alpha.20
10
+
11
+ fix: fix style expressions, revert changes to scripts/autogenHelpers/globals.js ([#466](https://github.com/maplibre/maplibre-react-native/pull/466))
12
+
9
13
  ## 10.0.0-alpha.19
10
14
 
11
15
  feat: MapLibre Android SDK 11.5.0 ([#455](https://github.com/maplibre/maplibre-react-native/pull/455))
@@ -429,19 +429,19 @@ export interface FillLayerStyleProps {
429
429
  /**
430
430
  * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
431
431
  */
432
- fillSortKey?: number;
432
+ fillSortKey?: Value<number, ["zoom", "feature"]>;
433
433
  /**
434
434
  * Whether this layer is displayed.
435
435
  */
436
- visibility?: "visible" | "none";
436
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
437
437
  /**
438
438
  * Whether or not the fill should be antialiased.
439
439
  */
440
- fillAntialias?: boolean;
440
+ fillAntialias?: Value<boolean, ["zoom"]>;
441
441
  /**
442
442
  * The opacity of the entire fill layer. In contrast to the `fillColor`, this value will also affect the 1px stroke around the fill, if the stroke is used.
443
443
  */
444
- fillOpacity?: number;
444
+ fillOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
445
445
 
446
446
  /**
447
447
  * The transition affecting any changes to this layer’s fillOpacity property.
@@ -452,7 +452,7 @@ export interface FillLayerStyleProps {
452
452
  *
453
453
  * @disabledBy fillPattern
454
454
  */
455
- fillColor?: string;
455
+ fillColor?: Value<string, ["zoom", "feature", "feature-state"]>;
456
456
 
457
457
  /**
458
458
  * The transition affecting any changes to this layer’s fillColor property.
@@ -463,7 +463,7 @@ export interface FillLayerStyleProps {
463
463
  *
464
464
  * @disabledBy fillPattern
465
465
  */
466
- fillOutlineColor?: string;
466
+ fillOutlineColor?: Value<string, ["zoom", "feature", "feature-state"]>;
467
467
 
468
468
  /**
469
469
  * The transition affecting any changes to this layer’s fillOutlineColor property.
@@ -472,7 +472,7 @@ export interface FillLayerStyleProps {
472
472
  /**
473
473
  * The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
474
474
  */
475
- fillTranslate?: any[];
475
+ fillTranslate?: Value<Translation, ["zoom"]>;
476
476
 
477
477
  /**
478
478
  * The transition affecting any changes to this layer’s fillTranslate property.
@@ -483,11 +483,14 @@ export interface FillLayerStyleProps {
483
483
  *
484
484
  * @requires fillTranslate
485
485
  */
486
- fillTranslateAnchor?: "map" | "viewport";
486
+ fillTranslateAnchor?: Value<
487
+ Enum<FillTranslateAnchorEnum, FillTranslateAnchorEnumValues>,
488
+ ["zoom"]
489
+ >;
487
490
  /**
488
491
  * Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
489
492
  */
490
- fillPattern?: string;
493
+ fillPattern?: Value<ResolvedImageType, ["zoom", "feature"]>;
491
494
 
492
495
  /**
493
496
  * The transition affecting any changes to this layer’s fillPattern property.
@@ -498,31 +501,31 @@ export interface LineLayerStyleProps {
498
501
  /**
499
502
  * The display of line endings.
500
503
  */
501
- lineCap?: "butt" | "round" | "square";
504
+ lineCap?: Value<Enum<LineCapEnum, LineCapEnumValues>, ["zoom"]>;
502
505
  /**
503
506
  * The display of lines when joining.
504
507
  */
505
- lineJoin?: "bevel" | "round" | "miter";
508
+ lineJoin?: Value<Enum<LineJoinEnum, LineJoinEnumValues>, ["zoom", "feature"]>;
506
509
  /**
507
510
  * Used to automatically convert miter joins to bevel joins for sharp angles.
508
511
  */
509
- lineMiterLimit?: number;
512
+ lineMiterLimit?: Value<number, ["zoom"]>;
510
513
  /**
511
514
  * Used to automatically convert round joins to miter joins for shallow angles.
512
515
  */
513
- lineRoundLimit?: number;
516
+ lineRoundLimit?: Value<number, ["zoom"]>;
514
517
  /**
515
518
  * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
516
519
  */
517
- lineSortKey?: number;
520
+ lineSortKey?: Value<number, ["zoom", "feature"]>;
518
521
  /**
519
522
  * Whether this layer is displayed.
520
523
  */
521
- visibility?: "visible" | "none";
524
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
522
525
  /**
523
526
  * The opacity at which the line will be drawn.
524
527
  */
525
- lineOpacity?: number;
528
+ lineOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
526
529
 
527
530
  /**
528
531
  * The transition affecting any changes to this layer’s lineOpacity property.
@@ -533,7 +536,7 @@ export interface LineLayerStyleProps {
533
536
  *
534
537
  * @disabledBy linePattern
535
538
  */
536
- lineColor?: string;
539
+ lineColor?: Value<string, ["zoom", "feature", "feature-state"]>;
537
540
 
538
541
  /**
539
542
  * The transition affecting any changes to this layer’s lineColor property.
@@ -542,7 +545,7 @@ export interface LineLayerStyleProps {
542
545
  /**
543
546
  * The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
544
547
  */
545
- lineTranslate?: any[];
548
+ lineTranslate?: Value<Translation, ["zoom"]>;
546
549
 
547
550
  /**
548
551
  * The transition affecting any changes to this layer’s lineTranslate property.
@@ -553,11 +556,14 @@ export interface LineLayerStyleProps {
553
556
  *
554
557
  * @requires lineTranslate
555
558
  */
556
- lineTranslateAnchor?: "map" | "viewport";
559
+ lineTranslateAnchor?: Value<
560
+ Enum<LineTranslateAnchorEnum, LineTranslateAnchorEnumValues>,
561
+ ["zoom"]
562
+ >;
557
563
  /**
558
564
  * Stroke thickness.
559
565
  */
560
- lineWidth?: number;
566
+ lineWidth?: Value<number, ["zoom", "feature", "feature-state"]>;
561
567
 
562
568
  /**
563
569
  * The transition affecting any changes to this layer’s lineWidth property.
@@ -566,7 +572,7 @@ export interface LineLayerStyleProps {
566
572
  /**
567
573
  * Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
568
574
  */
569
- lineGapWidth?: number;
575
+ lineGapWidth?: Value<number, ["zoom", "feature", "feature-state"]>;
570
576
 
571
577
  /**
572
578
  * The transition affecting any changes to this layer’s lineGapWidth property.
@@ -575,7 +581,7 @@ export interface LineLayerStyleProps {
575
581
  /**
576
582
  * The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
577
583
  */
578
- lineOffset?: number;
584
+ lineOffset?: Value<number, ["zoom", "feature", "feature-state"]>;
579
585
 
580
586
  /**
581
587
  * The transition affecting any changes to this layer’s lineOffset property.
@@ -584,7 +590,7 @@ export interface LineLayerStyleProps {
584
590
  /**
585
591
  * Blur applied to the line, in pixels.
586
592
  */
587
- lineBlur?: number;
593
+ lineBlur?: Value<number, ["zoom", "feature", "feature-state"]>;
588
594
 
589
595
  /**
590
596
  * The transition affecting any changes to this layer’s lineBlur property.
@@ -595,7 +601,7 @@ export interface LineLayerStyleProps {
595
601
  *
596
602
  * @disabledBy linePattern
597
603
  */
598
- lineDasharray?: any[];
604
+ lineDasharray?: Value<number[], ["zoom"]>;
599
605
 
600
606
  /**
601
607
  * The transition affecting any changes to this layer’s lineDasharray property.
@@ -604,7 +610,7 @@ export interface LineLayerStyleProps {
604
610
  /**
605
611
  * Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
606
612
  */
607
- linePattern?: string;
613
+ linePattern?: Value<ResolvedImageType, ["zoom", "feature"]>;
608
614
 
609
615
  /**
610
616
  * The transition affecting any changes to this layer’s linePattern property.
@@ -615,29 +621,35 @@ export interface LineLayerStyleProps {
615
621
  *
616
622
  * @disabledBy lineDasharray, linePattern
617
623
  */
618
- lineGradient?: string;
624
+ lineGradient?: Value<string, ["line-progress"]>;
619
625
  }
620
626
  export interface SymbolLayerStyleProps {
621
627
  /**
622
628
  * Label placement relative to its geometry.
623
629
  */
624
- symbolPlacement?: "point" | "line" | "line-center";
630
+ symbolPlacement?: Value<
631
+ Enum<SymbolPlacementEnum, SymbolPlacementEnumValues>,
632
+ ["zoom"]
633
+ >;
625
634
  /**
626
635
  * Distance between two symbol anchors.
627
636
  */
628
- symbolSpacing?: number;
637
+ symbolSpacing?: Value<number, ["zoom"]>;
629
638
  /**
630
639
  * If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like MapLibre GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.
631
640
  */
632
- symbolAvoidEdges?: boolean;
641
+ symbolAvoidEdges?: Value<boolean, ["zoom"]>;
633
642
  /**
634
643
  * Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `iconAllowOverlap` or `textAllowOverlap` is `false`, features with a lower sort key will have priority during placement. When `iconAllowOverlap` or `textAllowOverlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.
635
644
  */
636
- symbolSortKey?: number;
645
+ symbolSortKey?: Value<number, ["zoom", "feature"]>;
637
646
  /**
638
647
  * Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their yPosition relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbolSortKey`.
639
648
  */
640
- symbolZOrder?: "auto" | "viewport-y" | "source";
649
+ symbolZOrder?: Value<
650
+ Enum<SymbolZOrderEnum, SymbolZOrderEnumValues>,
651
+ ["zoom"]
652
+ >;
641
653
  /**
642
654
  * If true, the icon will be visible even if it collides with other previously drawn symbols.
643
655
  *
@@ -645,156 +657,168 @@ export interface SymbolLayerStyleProps {
645
657
  *
646
658
  * @disabledBy iconOverlap
647
659
  */
648
- iconAllowOverlap?: boolean;
660
+ iconAllowOverlap?: Value<boolean, ["zoom"]>;
649
661
  /**
650
662
  * If true, other symbols can be visible even if they collide with the icon.
651
663
  *
652
664
  * @requires iconImage
653
665
  */
654
- iconIgnorePlacement?: boolean;
666
+ iconIgnorePlacement?: Value<boolean, ["zoom"]>;
655
667
  /**
656
668
  * If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.
657
669
  *
658
670
  * @requires iconImage, textField
659
671
  */
660
- iconOptional?: boolean;
672
+ iconOptional?: Value<boolean, ["zoom"]>;
661
673
  /**
662
674
  * In combination with `symbolPlacement`, determines the rotation behavior of icons.
663
675
  *
664
676
  * @requires iconImage
665
677
  */
666
- iconRotationAlignment?: "map" | "viewport" | "auto";
678
+ iconRotationAlignment?: Value<
679
+ Enum<IconRotationAlignmentEnum, IconRotationAlignmentEnumValues>,
680
+ ["zoom"]
681
+ >;
667
682
  /**
668
683
  * Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `iconSize`. 1 is the original size; 3 triples the size of the image.
669
684
  *
670
685
  * @requires iconImage
671
686
  */
672
- iconSize?: number;
687
+ iconSize?: Value<number, ["zoom", "feature"]>;
673
688
  /**
674
689
  * Scales the icon to fit around the associated text.
675
690
  *
676
691
  * @requires iconImage, textField
677
692
  */
678
- iconTextFit?: "none" | "width" | "height" | "both";
693
+ iconTextFit?: Value<Enum<IconTextFitEnum, IconTextFitEnumValues>, ["zoom"]>;
679
694
  /**
680
695
  * Size of the additional area added to dimensions determined by `iconTextFit`, in clockwise order: top, right, bottom, left.
681
696
  *
682
697
  * @requires iconImage, textField
683
698
  */
684
- iconTextFitPadding?: any[];
699
+ iconTextFitPadding?: Value<number[], ["zoom"]>;
685
700
  /**
686
701
  * Name of image in sprite to use for drawing an image background.
687
702
  */
688
- iconImage?: string;
703
+ iconImage?: Value<ResolvedImageType, ["zoom", "feature"]>;
689
704
  /**
690
705
  * Rotates the icon clockwise.
691
706
  *
692
707
  * @requires iconImage
693
708
  */
694
- iconRotate?: number;
709
+ iconRotate?: Value<number, ["zoom", "feature"]>;
695
710
  /**
696
711
  * Size of additional area round the icon bounding box used for detecting symbol collisions.
697
712
  *
698
713
  * @requires iconImage
699
714
  */
700
- iconPadding?: any[];
715
+ iconPadding?: Value<number[], ["zoom", "feature"]>;
701
716
  /**
702
717
  * If true, the icon may be flipped to prevent it from being rendered upsideDown.
703
718
  *
704
719
  * @requires iconImage
705
720
  */
706
- iconKeepUpright?: boolean;
721
+ iconKeepUpright?: Value<boolean, ["zoom"]>;
707
722
  /**
708
723
  * Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `iconSize` to obtain the final offset in pixels. When combined with `iconRotate` the offset will be as if the rotated direction was up.
709
724
  *
710
725
  * @requires iconImage
711
726
  */
712
- iconOffset?: any[];
727
+ iconOffset?: Value<number[], ["zoom", "feature"]>;
713
728
  /**
714
729
  * Part of the icon placed closest to the anchor.
715
730
  *
716
731
  * @requires iconImage
717
732
  */
718
- iconAnchor?:
719
- | "center"
720
- | "left"
721
- | "right"
722
- | "top"
723
- | "bottom"
724
- | "top-left"
725
- | "top-right"
726
- | "bottom-left"
727
- | "bottom-right";
733
+ iconAnchor?: Value<
734
+ Enum<IconAnchorEnum, IconAnchorEnumValues>,
735
+ ["zoom", "feature"]
736
+ >;
728
737
  /**
729
738
  * Orientation of icon when map is pitched.
730
739
  *
731
740
  * @requires iconImage
732
741
  */
733
- iconPitchAlignment?: "map" | "viewport" | "auto";
742
+ iconPitchAlignment?: Value<
743
+ Enum<IconPitchAlignmentEnum, IconPitchAlignmentEnumValues>,
744
+ ["zoom"]
745
+ >;
734
746
  /**
735
747
  * Orientation of text when map is pitched.
736
748
  *
737
749
  * @requires textField
738
750
  */
739
- textPitchAlignment?: "map" | "viewport" | "auto";
751
+ textPitchAlignment?: Value<
752
+ Enum<TextPitchAlignmentEnum, TextPitchAlignmentEnumValues>,
753
+ ["zoom"]
754
+ >;
740
755
  /**
741
756
  * In combination with `symbolPlacement`, determines the rotation behavior of the individual glyphs forming the text.
742
757
  *
743
758
  * @requires textField
744
759
  */
745
- textRotationAlignment?: "map" | "viewport" | "viewport-glyph" | "auto";
760
+ textRotationAlignment?: Value<
761
+ Enum<TextRotationAlignmentEnum, TextRotationAlignmentEnumValues>,
762
+ ["zoom"]
763
+ >;
746
764
  /**
747
765
  * Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
748
766
  */
749
- textField?: string;
767
+ textField?: Value<FormattedString, ["zoom", "feature"]>;
750
768
  /**
751
769
  * Font stack to use for displaying text.
752
770
  *
753
771
  * @requires textField
754
772
  */
755
- textFont?: any[];
773
+ textFont?: Value<string[], ["zoom", "feature"]>;
756
774
  /**
757
775
  * Font size.
758
776
  *
759
777
  * @requires textField
760
778
  */
761
- textSize?: number;
779
+ textSize?: Value<number, ["zoom", "feature"]>;
762
780
  /**
763
781
  * The maximum line width for text wrapping.
764
782
  *
765
783
  * @requires textField
766
784
  */
767
- textMaxWidth?: number;
785
+ textMaxWidth?: Value<number, ["zoom", "feature"]>;
768
786
  /**
769
787
  * Text leading value for multiLine text.
770
788
  *
771
789
  * @requires textField
772
790
  */
773
- textLineHeight?: number;
791
+ textLineHeight?: Value<number, ["zoom"]>;
774
792
  /**
775
793
  * Text tracking amount.
776
794
  *
777
795
  * @requires textField
778
796
  */
779
- textLetterSpacing?: number;
797
+ textLetterSpacing?: Value<number, ["zoom", "feature"]>;
780
798
  /**
781
799
  * Text justification options.
782
800
  *
783
801
  * @requires textField
784
802
  */
785
- textJustify?: "auto" | "left" | "center" | "right";
803
+ textJustify?: Value<
804
+ Enum<TextJustifyEnum, TextJustifyEnumValues>,
805
+ ["zoom", "feature"]
806
+ >;
786
807
  /**
787
808
  * Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `textVariableAnchor`, which defaults to using the twoDimensional `textOffset` if present.
788
809
  *
789
810
  * @requires textField
790
811
  */
791
- textRadialOffset?: number;
812
+ textRadialOffset?: Value<number, ["zoom", "feature"]>;
792
813
  /**
793
814
  * To increase the chance of placing highPriority labels on the map, you can provide an array of `textAnchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `textJustify: auto` to choose justification based on anchor position. To apply an offset, use the `textRadialOffset` or the twoDimensional `textOffset`.
794
815
  *
795
816
  * @requires textField
796
817
  */
797
- textVariableAnchor?: any[];
818
+ textVariableAnchor?: Value<
819
+ Enum<TextVariableAnchorEnum, TextVariableAnchorEnumValues>[],
820
+ ["zoom"]
821
+ >;
798
822
  /**
799
823
  * Part of the text placed closest to the anchor.
800
824
  *
@@ -802,52 +826,52 @@ export interface SymbolLayerStyleProps {
802
826
  *
803
827
  * @disabledBy textVariableAnchor
804
828
  */
805
- textAnchor?:
806
- | "center"
807
- | "left"
808
- | "right"
809
- | "top"
810
- | "bottom"
811
- | "top-left"
812
- | "top-right"
813
- | "bottom-left"
814
- | "bottom-right";
829
+ textAnchor?: Value<
830
+ Enum<TextAnchorEnum, TextAnchorEnumValues>,
831
+ ["zoom", "feature"]
832
+ >;
815
833
  /**
816
834
  * Maximum angle change between adjacent characters.
817
835
  *
818
836
  * @requires textField
819
837
  */
820
- textMaxAngle?: number;
838
+ textMaxAngle?: Value<number, ["zoom"]>;
821
839
  /**
822
840
  * The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
823
841
  *
824
842
  * @requires textField
825
843
  */
826
- textWritingMode?: any[];
844
+ textWritingMode?: Value<
845
+ Enum<TextWritingModeEnum, TextWritingModeEnumValues>[],
846
+ ["zoom"]
847
+ >;
827
848
  /**
828
849
  * Rotates the text clockwise.
829
850
  *
830
851
  * @requires textField
831
852
  */
832
- textRotate?: number;
853
+ textRotate?: Value<number, ["zoom", "feature"]>;
833
854
  /**
834
855
  * Size of the additional area around the text bounding box used for detecting symbol collisions.
835
856
  *
836
857
  * @requires textField
837
858
  */
838
- textPadding?: number;
859
+ textPadding?: Value<number, ["zoom"]>;
839
860
  /**
840
861
  * If true, the text may be flipped vertically to prevent it from being rendered upsideDown.
841
862
  *
842
863
  * @requires textField
843
864
  */
844
- textKeepUpright?: boolean;
865
+ textKeepUpright?: Value<boolean, ["zoom"]>;
845
866
  /**
846
867
  * Specifies how to capitalize text, similar to the CSS `textTransform` property.
847
868
  *
848
869
  * @requires textField
849
870
  */
850
- textTransform?: "none" | "uppercase" | "lowercase";
871
+ textTransform?: Value<
872
+ Enum<TextTransformEnum, TextTransformEnumValues>,
873
+ ["zoom", "feature"]
874
+ >;
851
875
  /**
852
876
  * Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with textVariableAnchor, input values will be taken as absolute values. Offsets along the x and yAxis will be applied automatically based on the anchor position.
853
877
  *
@@ -855,7 +879,7 @@ export interface SymbolLayerStyleProps {
855
879
  *
856
880
  * @disabledBy textRadialOffset
857
881
  */
858
- textOffset?: any[];
882
+ textOffset?: Value<number[], ["zoom", "feature"]>;
859
883
  /**
860
884
  * If true, the text will be visible even if it collides with other previously drawn symbols.
861
885
  *
@@ -863,29 +887,29 @@ export interface SymbolLayerStyleProps {
863
887
  *
864
888
  * @disabledBy textOverlap
865
889
  */
866
- textAllowOverlap?: boolean;
890
+ textAllowOverlap?: Value<boolean, ["zoom"]>;
867
891
  /**
868
892
  * If true, other symbols can be visible even if they collide with the text.
869
893
  *
870
894
  * @requires textField
871
895
  */
872
- textIgnorePlacement?: boolean;
896
+ textIgnorePlacement?: Value<boolean, ["zoom"]>;
873
897
  /**
874
898
  * If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.
875
899
  *
876
900
  * @requires textField, iconImage
877
901
  */
878
- textOptional?: boolean;
902
+ textOptional?: Value<boolean, ["zoom"]>;
879
903
  /**
880
904
  * Whether this layer is displayed.
881
905
  */
882
- visibility?: "visible" | "none";
906
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
883
907
  /**
884
908
  * The opacity at which the icon will be drawn.
885
909
  *
886
910
  * @requires iconImage
887
911
  */
888
- iconOpacity?: number;
912
+ iconOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
889
913
 
890
914
  /**
891
915
  * The transition affecting any changes to this layer’s iconOpacity property.
@@ -896,7 +920,7 @@ export interface SymbolLayerStyleProps {
896
920
  *
897
921
  * @requires iconImage
898
922
  */
899
- iconColor?: string;
923
+ iconColor?: Value<string, ["zoom", "feature", "feature-state"]>;
900
924
 
901
925
  /**
902
926
  * The transition affecting any changes to this layer’s iconColor property.
@@ -907,7 +931,7 @@ export interface SymbolLayerStyleProps {
907
931
  *
908
932
  * @requires iconImage
909
933
  */
910
- iconHaloColor?: string;
934
+ iconHaloColor?: Value<string, ["zoom", "feature", "feature-state"]>;
911
935
 
912
936
  /**
913
937
  * The transition affecting any changes to this layer’s iconHaloColor property.
@@ -920,7 +944,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
920
944
  *
921
945
  * @requires iconImage
922
946
  */
923
- iconHaloWidth?: number;
947
+ iconHaloWidth?: Value<number, ["zoom", "feature", "feature-state"]>;
924
948
 
925
949
  /**
926
950
  * The transition affecting any changes to this layer’s iconHaloWidth property.
@@ -931,7 +955,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
931
955
  *
932
956
  * @requires iconImage
933
957
  */
934
- iconHaloBlur?: number;
958
+ iconHaloBlur?: Value<number, ["zoom", "feature", "feature-state"]>;
935
959
 
936
960
  /**
937
961
  * The transition affecting any changes to this layer’s iconHaloBlur property.
@@ -942,7 +966,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
942
966
  *
943
967
  * @requires iconImage
944
968
  */
945
- iconTranslate?: any[];
969
+ iconTranslate?: Value<Translation, ["zoom"]>;
946
970
 
947
971
  /**
948
972
  * The transition affecting any changes to this layer’s iconTranslate property.
@@ -953,13 +977,16 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
953
977
  *
954
978
  * @requires iconImage, iconTranslate
955
979
  */
956
- iconTranslateAnchor?: "map" | "viewport";
980
+ iconTranslateAnchor?: Value<
981
+ Enum<IconTranslateAnchorEnum, IconTranslateAnchorEnumValues>,
982
+ ["zoom"]
983
+ >;
957
984
  /**
958
985
  * The opacity at which the text will be drawn.
959
986
  *
960
987
  * @requires textField
961
988
  */
962
- textOpacity?: number;
989
+ textOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
963
990
 
964
991
  /**
965
992
  * The transition affecting any changes to this layer’s textOpacity property.
@@ -970,7 +997,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
970
997
  *
971
998
  * @requires textField
972
999
  */
973
- textColor?: string;
1000
+ textColor?: Value<string, ["zoom", "feature", "feature-state"]>;
974
1001
 
975
1002
  /**
976
1003
  * The transition affecting any changes to this layer’s textColor property.
@@ -981,7 +1008,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
981
1008
  *
982
1009
  * @requires textField
983
1010
  */
984
- textHaloColor?: string;
1011
+ textHaloColor?: Value<string, ["zoom", "feature", "feature-state"]>;
985
1012
 
986
1013
  /**
987
1014
  * The transition affecting any changes to this layer’s textHaloColor property.
@@ -992,7 +1019,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
992
1019
  *
993
1020
  * @requires textField
994
1021
  */
995
- textHaloWidth?: number;
1022
+ textHaloWidth?: Value<number, ["zoom", "feature", "feature-state"]>;
996
1023
 
997
1024
  /**
998
1025
  * The transition affecting any changes to this layer’s textHaloWidth property.
@@ -1003,7 +1030,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
1003
1030
  *
1004
1031
  * @requires textField
1005
1032
  */
1006
- textHaloBlur?: number;
1033
+ textHaloBlur?: Value<number, ["zoom", "feature", "feature-state"]>;
1007
1034
 
1008
1035
  /**
1009
1036
  * The transition affecting any changes to this layer’s textHaloBlur property.
@@ -1014,7 +1041,7 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
1014
1041
  *
1015
1042
  * @requires textField
1016
1043
  */
1017
- textTranslate?: any[];
1044
+ textTranslate?: Value<Translation, ["zoom"]>;
1018
1045
 
1019
1046
  /**
1020
1047
  * The transition affecting any changes to this layer’s textTranslate property.
@@ -1025,21 +1052,24 @@ The unit is in pixels only for SDF sprites that were created with a blur radius
1025
1052
  *
1026
1053
  * @requires textField, textTranslate
1027
1054
  */
1028
- textTranslateAnchor?: "map" | "viewport";
1055
+ textTranslateAnchor?: Value<
1056
+ Enum<TextTranslateAnchorEnum, TextTranslateAnchorEnumValues>,
1057
+ ["zoom"]
1058
+ >;
1029
1059
  }
1030
1060
  export interface CircleLayerStyleProps {
1031
1061
  /**
1032
1062
  * Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.
1033
1063
  */
1034
- circleSortKey?: number;
1064
+ circleSortKey?: Value<number, ["zoom", "feature"]>;
1035
1065
  /**
1036
1066
  * Whether this layer is displayed.
1037
1067
  */
1038
- visibility?: "visible" | "none";
1068
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1039
1069
  /**
1040
1070
  * Circle radius.
1041
1071
  */
1042
- circleRadius?: number;
1072
+ circleRadius?: Value<number, ["zoom", "feature", "feature-state"]>;
1043
1073
 
1044
1074
  /**
1045
1075
  * The transition affecting any changes to this layer’s circleRadius property.
@@ -1048,7 +1078,7 @@ export interface CircleLayerStyleProps {
1048
1078
  /**
1049
1079
  * The fill color of the circle.
1050
1080
  */
1051
- circleColor?: string;
1081
+ circleColor?: Value<string, ["zoom", "feature", "feature-state"]>;
1052
1082
 
1053
1083
  /**
1054
1084
  * The transition affecting any changes to this layer’s circleColor property.
@@ -1057,7 +1087,7 @@ export interface CircleLayerStyleProps {
1057
1087
  /**
1058
1088
  * Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.
1059
1089
  */
1060
- circleBlur?: number;
1090
+ circleBlur?: Value<number, ["zoom", "feature", "feature-state"]>;
1061
1091
 
1062
1092
  /**
1063
1093
  * The transition affecting any changes to this layer’s circleBlur property.
@@ -1066,7 +1096,7 @@ export interface CircleLayerStyleProps {
1066
1096
  /**
1067
1097
  * The opacity at which the circle will be drawn.
1068
1098
  */
1069
- circleOpacity?: number;
1099
+ circleOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
1070
1100
 
1071
1101
  /**
1072
1102
  * The transition affecting any changes to this layer’s circleOpacity property.
@@ -1075,7 +1105,7 @@ export interface CircleLayerStyleProps {
1075
1105
  /**
1076
1106
  * The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
1077
1107
  */
1078
- circleTranslate?: any[];
1108
+ circleTranslate?: Value<Translation, ["zoom"]>;
1079
1109
 
1080
1110
  /**
1081
1111
  * The transition affecting any changes to this layer’s circleTranslate property.
@@ -1086,19 +1116,28 @@ export interface CircleLayerStyleProps {
1086
1116
  *
1087
1117
  * @requires circleTranslate
1088
1118
  */
1089
- circleTranslateAnchor?: "map" | "viewport";
1119
+ circleTranslateAnchor?: Value<
1120
+ Enum<CircleTranslateAnchorEnum, CircleTranslateAnchorEnumValues>,
1121
+ ["zoom"]
1122
+ >;
1090
1123
  /**
1091
1124
  * Controls the scaling behavior of the circle when the map is pitched.
1092
1125
  */
1093
- circlePitchScale?: "map" | "viewport";
1126
+ circlePitchScale?: Value<
1127
+ Enum<CirclePitchScaleEnum, CirclePitchScaleEnumValues>,
1128
+ ["zoom"]
1129
+ >;
1094
1130
  /**
1095
1131
  * Orientation of circle when map is pitched.
1096
1132
  */
1097
- circlePitchAlignment?: "map" | "viewport";
1133
+ circlePitchAlignment?: Value<
1134
+ Enum<CirclePitchAlignmentEnum, CirclePitchAlignmentEnumValues>,
1135
+ ["zoom"]
1136
+ >;
1098
1137
  /**
1099
1138
  * The width of the circle's stroke. Strokes are placed outside of the `circleRadius`.
1100
1139
  */
1101
- circleStrokeWidth?: number;
1140
+ circleStrokeWidth?: Value<number, ["zoom", "feature", "feature-state"]>;
1102
1141
 
1103
1142
  /**
1104
1143
  * The transition affecting any changes to this layer’s circleStrokeWidth property.
@@ -1107,7 +1146,7 @@ export interface CircleLayerStyleProps {
1107
1146
  /**
1108
1147
  * The stroke color of the circle.
1109
1148
  */
1110
- circleStrokeColor?: string;
1149
+ circleStrokeColor?: Value<string, ["zoom", "feature", "feature-state"]>;
1111
1150
 
1112
1151
  /**
1113
1152
  * The transition affecting any changes to this layer’s circleStrokeColor property.
@@ -1116,7 +1155,7 @@ export interface CircleLayerStyleProps {
1116
1155
  /**
1117
1156
  * The opacity of the circle's stroke.
1118
1157
  */
1119
- circleStrokeOpacity?: number;
1158
+ circleStrokeOpacity?: Value<number, ["zoom", "feature", "feature-state"]>;
1120
1159
 
1121
1160
  /**
1122
1161
  * The transition affecting any changes to this layer’s circleStrokeOpacity property.
@@ -1127,11 +1166,11 @@ export interface HeatmapLayerStyleProps {
1127
1166
  /**
1128
1167
  * Whether this layer is displayed.
1129
1168
  */
1130
- visibility?: "visible" | "none";
1169
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1131
1170
  /**
1132
1171
  * Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.
1133
1172
  */
1134
- heatmapRadius?: number;
1173
+ heatmapRadius?: Value<number, ["zoom", "feature", "feature-state"]>;
1135
1174
 
1136
1175
  /**
1137
1176
  * The transition affecting any changes to this layer’s heatmapRadius property.
@@ -1140,11 +1179,11 @@ export interface HeatmapLayerStyleProps {
1140
1179
  /**
1141
1180
  * A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.
1142
1181
  */
1143
- heatmapWeight?: number;
1182
+ heatmapWeight?: Value<number, ["zoom", "feature", "feature-state"]>;
1144
1183
  /**
1145
1184
  * Similar to `heatmapWeight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.
1146
1185
  */
1147
- heatmapIntensity?: number;
1186
+ heatmapIntensity?: Value<number, ["zoom"]>;
1148
1187
 
1149
1188
  /**
1150
1189
  * The transition affecting any changes to this layer’s heatmapIntensity property.
@@ -1153,11 +1192,11 @@ export interface HeatmapLayerStyleProps {
1153
1192
  /**
1154
1193
  * Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmapDensity"]` as input.
1155
1194
  */
1156
- heatmapColor?: string;
1195
+ heatmapColor?: Value<string, ["heatmap-density"]>;
1157
1196
  /**
1158
1197
  * The global opacity at which the heatmap layer will be drawn.
1159
1198
  */
1160
- heatmapOpacity?: number;
1199
+ heatmapOpacity?: Value<number, ["zoom"]>;
1161
1200
 
1162
1201
  /**
1163
1202
  * The transition affecting any changes to this layer’s heatmapOpacity property.
@@ -1168,11 +1207,11 @@ export interface FillExtrusionLayerStyleProps {
1168
1207
  /**
1169
1208
  * Whether this layer is displayed.
1170
1209
  */
1171
- visibility?: "visible" | "none";
1210
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1172
1211
  /**
1173
1212
  * The opacity of the entire fill extrusion layer. This is rendered on a perLayer, not perFeature, basis, and dataDriven styling is not available.
1174
1213
  */
1175
- fillExtrusionOpacity?: number;
1214
+ fillExtrusionOpacity?: Value<number, ["zoom"]>;
1176
1215
 
1177
1216
  /**
1178
1217
  * The transition affecting any changes to this layer’s fillExtrusionOpacity property.
@@ -1183,7 +1222,7 @@ export interface FillExtrusionLayerStyleProps {
1183
1222
  *
1184
1223
  * @disabledBy fillExtrusionPattern
1185
1224
  */
1186
- fillExtrusionColor?: string;
1225
+ fillExtrusionColor?: Value<string, ["zoom", "feature", "feature-state"]>;
1187
1226
 
1188
1227
  /**
1189
1228
  * The transition affecting any changes to this layer’s fillExtrusionColor property.
@@ -1192,7 +1231,7 @@ export interface FillExtrusionLayerStyleProps {
1192
1231
  /**
1193
1232
  * The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.
1194
1233
  */
1195
- fillExtrusionTranslate?: any[];
1234
+ fillExtrusionTranslate?: Value<Translation, ["zoom"]>;
1196
1235
 
1197
1236
  /**
1198
1237
  * The transition affecting any changes to this layer’s fillExtrusionTranslate property.
@@ -1203,11 +1242,17 @@ export interface FillExtrusionLayerStyleProps {
1203
1242
  *
1204
1243
  * @requires fillExtrusionTranslate
1205
1244
  */
1206
- fillExtrusionTranslateAnchor?: "map" | "viewport";
1245
+ fillExtrusionTranslateAnchor?: Value<
1246
+ Enum<
1247
+ FillExtrusionTranslateAnchorEnum,
1248
+ FillExtrusionTranslateAnchorEnumValues
1249
+ >,
1250
+ ["zoom"]
1251
+ >;
1207
1252
  /**
1208
1253
  * Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
1209
1254
  */
1210
- fillExtrusionPattern?: string;
1255
+ fillExtrusionPattern?: Value<ResolvedImageType, ["zoom", "feature"]>;
1211
1256
 
1212
1257
  /**
1213
1258
  * The transition affecting any changes to this layer’s fillExtrusionPattern property.
@@ -1216,7 +1261,7 @@ export interface FillExtrusionLayerStyleProps {
1216
1261
  /**
1217
1262
  * The height with which to extrude this layer.
1218
1263
  */
1219
- fillExtrusionHeight?: number;
1264
+ fillExtrusionHeight?: Value<number, ["zoom", "feature", "feature-state"]>;
1220
1265
 
1221
1266
  /**
1222
1267
  * The transition affecting any changes to this layer’s fillExtrusionHeight property.
@@ -1227,7 +1272,7 @@ export interface FillExtrusionLayerStyleProps {
1227
1272
  *
1228
1273
  * @requires fillExtrusionHeight
1229
1274
  */
1230
- fillExtrusionBase?: number;
1275
+ fillExtrusionBase?: Value<number, ["zoom", "feature", "feature-state"]>;
1231
1276
 
1232
1277
  /**
1233
1278
  * The transition affecting any changes to this layer’s fillExtrusionBase property.
@@ -1236,17 +1281,17 @@ export interface FillExtrusionLayerStyleProps {
1236
1281
  /**
1237
1282
  * Whether to apply a vertical gradient to the sides of a fillExtrusion layer. If true, sides will be shaded slightly darker farther down.
1238
1283
  */
1239
- fillExtrusionVerticalGradient?: boolean;
1284
+ fillExtrusionVerticalGradient?: Value<boolean, ["zoom"]>;
1240
1285
  }
1241
1286
  export interface RasterLayerStyleProps {
1242
1287
  /**
1243
1288
  * Whether this layer is displayed.
1244
1289
  */
1245
- visibility?: "visible" | "none";
1290
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1246
1291
  /**
1247
1292
  * The opacity at which the image will be drawn.
1248
1293
  */
1249
- rasterOpacity?: number;
1294
+ rasterOpacity?: Value<number, ["zoom"]>;
1250
1295
 
1251
1296
  /**
1252
1297
  * The transition affecting any changes to this layer’s rasterOpacity property.
@@ -1255,7 +1300,7 @@ export interface RasterLayerStyleProps {
1255
1300
  /**
1256
1301
  * Rotates hues around the color wheel.
1257
1302
  */
1258
- rasterHueRotate?: number;
1303
+ rasterHueRotate?: Value<number, ["zoom"]>;
1259
1304
 
1260
1305
  /**
1261
1306
  * The transition affecting any changes to this layer’s rasterHueRotate property.
@@ -1264,7 +1309,7 @@ export interface RasterLayerStyleProps {
1264
1309
  /**
1265
1310
  * Increase or reduce the brightness of the image. The value is the minimum brightness.
1266
1311
  */
1267
- rasterBrightnessMin?: number;
1312
+ rasterBrightnessMin?: Value<number, ["zoom"]>;
1268
1313
 
1269
1314
  /**
1270
1315
  * The transition affecting any changes to this layer’s rasterBrightnessMin property.
@@ -1273,7 +1318,7 @@ export interface RasterLayerStyleProps {
1273
1318
  /**
1274
1319
  * Increase or reduce the brightness of the image. The value is the maximum brightness.
1275
1320
  */
1276
- rasterBrightnessMax?: number;
1321
+ rasterBrightnessMax?: Value<number, ["zoom"]>;
1277
1322
 
1278
1323
  /**
1279
1324
  * The transition affecting any changes to this layer’s rasterBrightnessMax property.
@@ -1282,7 +1327,7 @@ export interface RasterLayerStyleProps {
1282
1327
  /**
1283
1328
  * Increase or reduce the saturation of the image.
1284
1329
  */
1285
- rasterSaturation?: number;
1330
+ rasterSaturation?: Value<number, ["zoom"]>;
1286
1331
 
1287
1332
  /**
1288
1333
  * The transition affecting any changes to this layer’s rasterSaturation property.
@@ -1291,7 +1336,7 @@ export interface RasterLayerStyleProps {
1291
1336
  /**
1292
1337
  * Increase or reduce the contrast of the image.
1293
1338
  */
1294
- rasterContrast?: number;
1339
+ rasterContrast?: Value<number, ["zoom"]>;
1295
1340
 
1296
1341
  /**
1297
1342
  * The transition affecting any changes to this layer’s rasterContrast property.
@@ -1300,29 +1345,38 @@ export interface RasterLayerStyleProps {
1300
1345
  /**
1301
1346
  * The resampling/interpolation method to use for overscaling, also known as texture magnification filter
1302
1347
  */
1303
- rasterResampling?: "linear" | "nearest";
1348
+ rasterResampling?: Value<
1349
+ Enum<RasterResamplingEnum, RasterResamplingEnumValues>,
1350
+ ["zoom"]
1351
+ >;
1304
1352
  /**
1305
1353
  * Fade duration when a new tile is added, or when a video is started or its coordinates are updated.
1306
1354
  */
1307
- rasterFadeDuration?: number;
1355
+ rasterFadeDuration?: Value<number, ["zoom"]>;
1308
1356
  }
1309
1357
  export interface HillshadeLayerStyleProps {
1310
1358
  /**
1311
1359
  * Whether this layer is displayed.
1312
1360
  */
1313
- visibility?: "visible" | "none";
1361
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1314
1362
  /**
1315
1363
  * The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshadeIlluminationAnchor` is set to `viewport` and due north if `hillshadeIlluminationAnchor` is set to `map`.
1316
1364
  */
1317
- hillshadeIlluminationDirection?: number;
1365
+ hillshadeIlluminationDirection?: Value<number, ["zoom"]>;
1318
1366
  /**
1319
1367
  * Direction of light source when map is rotated.
1320
1368
  */
1321
- hillshadeIlluminationAnchor?: "map" | "viewport";
1369
+ hillshadeIlluminationAnchor?: Value<
1370
+ Enum<
1371
+ HillshadeIlluminationAnchorEnum,
1372
+ HillshadeIlluminationAnchorEnumValues
1373
+ >,
1374
+ ["zoom"]
1375
+ >;
1322
1376
  /**
1323
1377
  * Intensity of the hillshade
1324
1378
  */
1325
- hillshadeExaggeration?: number;
1379
+ hillshadeExaggeration?: Value<number, ["zoom"]>;
1326
1380
 
1327
1381
  /**
1328
1382
  * The transition affecting any changes to this layer’s hillshadeExaggeration property.
@@ -1331,7 +1385,7 @@ export interface HillshadeLayerStyleProps {
1331
1385
  /**
1332
1386
  * The shading color of areas that face away from the light source.
1333
1387
  */
1334
- hillshadeShadowColor?: string;
1388
+ hillshadeShadowColor?: Value<string, ["zoom"]>;
1335
1389
 
1336
1390
  /**
1337
1391
  * The transition affecting any changes to this layer’s hillshadeShadowColor property.
@@ -1340,7 +1394,7 @@ export interface HillshadeLayerStyleProps {
1340
1394
  /**
1341
1395
  * The shading color of areas that faces towards the light source.
1342
1396
  */
1343
- hillshadeHighlightColor?: string;
1397
+ hillshadeHighlightColor?: Value<string, ["zoom"]>;
1344
1398
 
1345
1399
  /**
1346
1400
  * The transition affecting any changes to this layer’s hillshadeHighlightColor property.
@@ -1349,7 +1403,7 @@ export interface HillshadeLayerStyleProps {
1349
1403
  /**
1350
1404
  * The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
1351
1405
  */
1352
- hillshadeAccentColor?: string;
1406
+ hillshadeAccentColor?: Value<string, ["zoom"]>;
1353
1407
 
1354
1408
  /**
1355
1409
  * The transition affecting any changes to this layer’s hillshadeAccentColor property.
@@ -1360,13 +1414,13 @@ export interface BackgroundLayerStyleProps {
1360
1414
  /**
1361
1415
  * Whether this layer is displayed.
1362
1416
  */
1363
- visibility?: "visible" | "none";
1417
+ visibility?: Enum<VisibilityEnum, VisibilityEnumValues>;
1364
1418
  /**
1365
1419
  * The color with which the background will be drawn.
1366
1420
  *
1367
1421
  * @disabledBy backgroundPattern
1368
1422
  */
1369
- backgroundColor?: string;
1423
+ backgroundColor?: Value<string, ["zoom"]>;
1370
1424
 
1371
1425
  /**
1372
1426
  * The transition affecting any changes to this layer’s backgroundColor property.
@@ -1375,7 +1429,7 @@ export interface BackgroundLayerStyleProps {
1375
1429
  /**
1376
1430
  * Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoomDependent expressions will be evaluated only at integer zoom levels.
1377
1431
  */
1378
- backgroundPattern?: string;
1432
+ backgroundPattern?: Value<ResolvedImageType, ["zoom"]>;
1379
1433
 
1380
1434
  /**
1381
1435
  * The transition affecting any changes to this layer’s backgroundPattern property.
@@ -1384,7 +1438,7 @@ export interface BackgroundLayerStyleProps {
1384
1438
  /**
1385
1439
  * The opacity at which the background will be drawn.
1386
1440
  */
1387
- backgroundOpacity?: number;
1441
+ backgroundOpacity?: Value<number, ["zoom"]>;
1388
1442
 
1389
1443
  /**
1390
1444
  * The transition affecting any changes to this layer’s backgroundOpacity property.
@@ -1395,11 +1449,11 @@ export interface LightLayerStyleProps {
1395
1449
  /**
1396
1450
  * Whether extruded geometries are lit relative to the map or viewport.
1397
1451
  */
1398
- anchor?: "map" | "viewport";
1452
+ anchor?: Value<Enum<AnchorEnum, AnchorEnumValues>, ["zoom"]>;
1399
1453
  /**
1400
1454
  * Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).
1401
1455
  */
1402
- position?: any[];
1456
+ position?: Value<number[], ["zoom"]>;
1403
1457
 
1404
1458
  /**
1405
1459
  * The transition affecting any changes to this layer’s position property.
@@ -1408,7 +1462,7 @@ export interface LightLayerStyleProps {
1408
1462
  /**
1409
1463
  * Color tint for lighting extruded geometries.
1410
1464
  */
1411
- color?: string;
1465
+ color?: Value<string, ["zoom"]>;
1412
1466
 
1413
1467
  /**
1414
1468
  * The transition affecting any changes to this layer’s color property.
@@ -1417,7 +1471,7 @@ export interface LightLayerStyleProps {
1417
1471
  /**
1418
1472
  * Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
1419
1473
  */
1420
- intensity?: number;
1474
+ intensity?: Value<number, ["zoom"]>;
1421
1475
 
1422
1476
  /**
1423
1477
  * The transition affecting any changes to this layer’s intensity property.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maplibre/maplibre-react-native",
3
3
  "description": "A MapLibre GL Native plugin for creating maps in React Native",
4
- "version": "10.0.0-alpha.19",
4
+ "version": "10.0.0-alpha.20",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -262,31 +262,75 @@ global.getEnums = function (layers) {
262
262
  return Object.values(result);
263
263
  };
264
264
 
265
+
265
266
  global.dtsInterfaceType = function (prop) {
266
- switch (prop.type) {
267
- case 'number':
268
- return 'number';
269
- case 'string':
270
- return 'string';
271
- case 'boolean':
272
- return 'boolean';
273
- case 'array':
274
- return 'any[]';
275
- case 'padding':
276
- return 'number[]';
277
- case 'enum':
278
- return prop.doc && prop.doc.values ?
279
- Object.keys(prop.doc.values).map(value => `'${value}'`).join(' | ') :
280
- 'string';
281
- case 'color':
282
- return 'string';
283
- case 'resolvedImage':
284
- return 'string';
285
- case 'formatted':
286
- return 'string';
287
- // ... other cases ...
288
- default:
289
- throw new Error(`Unexpected type: ${prop.type} for ${prop.name}`);
267
+ let propTypes = [];
268
+
269
+ if (prop.name.indexOf('Translate') !== -1 && prop.type != 'enum') {
270
+ propTypes.push('Translation');
271
+ } else if (prop.type === 'color') {
272
+ propTypes.push('string');
273
+ // propTypes.push('ConstantPropType');
274
+ } else if (prop.type === 'array') {
275
+ switch (prop.value) {
276
+ case 'number':
277
+ propTypes.push('number[]');
278
+ break;
279
+ case 'boolean':
280
+ propTypes.push('boolean[]');
281
+ break;
282
+ case 'string':
283
+ propTypes.push('string[]');
284
+ break;
285
+ case 'enum':
286
+ propTypes.push(
287
+ `Enum<${pascelCase(prop.name)}Enum, ${pascelCase(
288
+ prop.name,
289
+ )}EnumValues>[]`,
290
+ );
291
+ break;
292
+ }
293
+ // propTypes.push('ConstantPropType');
294
+ } else if (prop.type === 'number') {
295
+ propTypes.push('number');
296
+ } else if (prop.type === 'enum') {
297
+ propTypes.push(
298
+ `Enum<${pascelCase(prop.name)}Enum, ${pascelCase(prop.name)}EnumValues>`,
299
+ );
300
+ } else if (prop.type === 'boolean') {
301
+ propTypes.push('boolean');
302
+ } else if (prop.type === 'resolvedImage') {
303
+ propTypes.push('ResolvedImageType');
304
+ } else if (prop.type === 'formatted') {
305
+ propTypes.push('FormattedString');
306
+ } else if (prop.type === 'string') {
307
+ propTypes.push('string');
308
+ } else {
309
+ console.error('Unexpected type:', prop.type);
310
+ throw new Error(`Unexpected type: ${prop.type} for ${prop.name}`);
311
+ }
312
+
313
+ /*
314
+ if (prop.allowedFunctionTypes && prop.allowedFunctionTypes.length > 0) {
315
+ propTypes.push('StyleFunctionProps');
316
+ }
317
+ */
318
+
319
+ if (propTypes.length > 1) {
320
+ return `${propTypes.map((p) => startAtSpace(4, p)).join(' | ')},
321
+ ${startAtSpace(2, '')}`;
322
+ } else {
323
+ if (prop.expressionSupported) {
324
+ let params = '';
325
+ if (prop.expression && prop.expression.parameters) {
326
+ params = `,[${prop.expression.parameters
327
+ .map((v) => `'${v}'`)
328
+ .join(',')}]`;
329
+ }
330
+ return `Value<${propTypes[0]}${params}>`;
331
+ } else {
332
+ return propTypes[0];
333
+ }
290
334
  }
291
335
  };
292
336