bbl-mapbox-react 0.0.13 → 0.0.15

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/types.d.ts CHANGED
@@ -472,6 +472,12 @@ export interface MapboxProps {
472
472
  * 数组顺序即为渲染顺序(先添加的在下层)
473
473
  */
474
474
  layers?: LayerConfig[];
475
+ /** 栅格图层全局渲染配置(亮度/饱和度/对比度等),LayerConfig 级配置优先 */
476
+ rasterPaint?: RasterPaintConfig;
477
+ /** 栅格渲染调节控件回调(受控模式下使用) */
478
+ onRasterPaintChange?: (config: RasterPaintConfig) => void;
479
+ /** 栅格渲染调节控件配置 */
480
+ showRasterPaint?: boolean | RasterPaintControlConfig;
475
481
  entities?: MapEntity[];
476
482
  selectedIds?: EntityId[];
477
483
  /** 实体全局开关配置(showArea / showLength / showRadius),entity 级配置优先 */
@@ -637,10 +643,24 @@ export type TileScheme = 'xyz' | 'tms';
637
643
  * - 'tilejson': TileJSON 格式(通过 URL 获取瓦片服务元数据)
638
644
  */
639
645
  export type LayerType = 'raster' | 'style' | 'tilejson';
646
+ /**
647
+ * 栅格图层渲染配置
648
+ * 用于调整栅格图层的亮度、饱和度、对比度等视觉效果
649
+ */
650
+ export interface RasterPaintConfig {
651
+ /** 亮度 0~1,默认 1 */
652
+ brightness?: number;
653
+ /** 饱和度 -1~1,默认 0 */
654
+ saturation?: number;
655
+ /** 对比度 -1~1,默认 0 */
656
+ contrast?: number;
657
+ /** 色相旋转 0~360,默认 0 */
658
+ hueRotate?: number;
659
+ }
640
660
  /**
641
661
  * 基础图层配置
642
662
  */
643
- interface BaseLayerConfig {
663
+ interface BaseLayerConfig extends RasterPaintConfig {
644
664
  /** 图层唯一 ID */
645
665
  id: string;
646
666
  /** 图层透明度 0-1,默认 1 */
@@ -651,6 +671,8 @@ interface BaseLayerConfig {
651
671
  hasRoadNetwork?: boolean;
652
672
  /** 路网数据所在的 source-layer 名称,默认 'road' */
653
673
  roadNetworkSourceLayer?: string;
674
+ /** 是否受 RasterPaintControl 控件控制,默认 false */
675
+ applyRasterPaint?: boolean;
654
676
  }
655
677
  /**
656
678
  * 栅格瓦片图层配置
@@ -940,8 +962,17 @@ export interface RoadHighlightControlConfig {
940
962
  export interface MeasureControlConfig {
941
963
  /** 是否启用,默认 true */
942
964
  enabled?: boolean;
943
- /** 默认 entityConfig(showArea/showLength/showRadius 初始值) */
944
- defaultEntityConfig?: EntityConfig;
965
+ /** 自定义类名 */
966
+ className?: string;
967
+ /** 自定义样式 */
968
+ style?: CSSProperties;
969
+ }
970
+ /**
971
+ * 栅格渲染调节控件配置
972
+ */
973
+ export interface RasterPaintControlConfig {
974
+ /** 是否启用,默认 true */
975
+ enabled?: boolean;
945
976
  /** 自定义类名 */
946
977
  className?: string;
947
978
  /** 自定义样式 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bbl-mapbox-react",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "React Mapbox 地图组件库,支持雷达、图像、标记、轨迹等多种 GIS 实体渲染",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",