@wenle_2523097/agri-map 2.0.2 → 2.0.3

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.
@@ -11,7 +11,7 @@ export type { SvgIconConfig, PresetIconName, IconValue, DetectedIconResult, Icon
11
11
  export type { AgriculturalComponentType, LifecyclePhase, LifecycleEvent, StateChangeMap, LifecycleRenderStats, LifecycleConfig, UniversalLifecycleConfig, } from './lifecycle';
12
12
  export type { MapLifecycleConfig } from './mapLifecycle';
13
13
  export type { PlotData, PlotStyle, PlotEditMode, PlotEditResult, PlotClipResult, PlotMoveResult, PlotCreateResult, PlotDeleteResult, RenderStats, PlotLayerProps, PlotRef, PlotEditModeConfig, PlotFieldNames, AreaUnit, AreaUnitConfig, PlotGroupConfig, GroupRenderStats, PlotGroupLayerProps, PlotGroupRef, } from './plot';
14
- export type { MarkerData, MarkerIconOptions, MarkerCreateResult, MarkerMoveResult, MarkerDeleteResult, MarkerEditResult, MarkerProps, MarkerRef, MarkerEditModeConfig, MarkerIconsConfig, MarkerClusterConfig, MarkerDisplayModeConfig, MarkerEvents, MarkerFieldNames, } from './marker';
14
+ export type { MarkerData, MarkerIconOptions, MarkerCreateResult, MarkerMoveResult, MarkerDeleteResult, MarkerEditResult, MarkerProps, MarkerRef, MarkerEditModeConfig, MarkerLabelConfig, MarkerIconsConfig, MarkerClusterConfig, MarkerDisplayModeConfig, MarkerEvents, MarkerFieldNames, } from './marker';
15
15
  export type { AntPathConfig, AntPathMode, RoadPathOptions, RoadFieldNames, RoadData, RoadCreateResult, RoadEditResult, RoadEditDrawerResult, RoadDeleteResult, RoadProps, RoadRef, RoadEditModeConfig, RoadEvents, } from './road';
16
16
  export type { IrrigationFieldNames, IrrigationData, IrrigationProps, IrrigationRef, IrrigationCreateResult, IrrigationEditResult, IrrigationEditPropertyParams, IrrigationDeleteResult, IrrigationReverseResult, IrrigationEvents, } from './irrigation';
17
17
  export type { DecoratorConfig } from './decorator';
@@ -201,6 +201,30 @@ export interface MarkerDisplayModeConfig {
201
201
  * @deprecated 请使用 MarkerDisplayModeConfig
202
202
  */
203
203
  export type MarkerClusterConfig = MarkerDisplayModeConfig;
204
+ /**
205
+ * 标注标签配置
206
+ * @description 用于配置 Marker 文字标签显示
207
+ */
208
+ export interface MarkerLabelConfig {
209
+ /** 是否显示标签 */
210
+ show?: boolean;
211
+ /** 标签字段名,默认 'title' */
212
+ field?: string;
213
+ /** 文字颜色,支持单色或渐变颜色数组 */
214
+ color?: string | string[];
215
+ /** 字体大小,默认 14 */
216
+ fontSize?: number | string;
217
+ /** 字体粗细,默认 'bold' */
218
+ fontWeight?: string;
219
+ /** 文字距图标的偏移 [x, y],默认 [0, 40](图标下方 40px) */
220
+ offset?: [number, number];
221
+ /** 自定义 CSS 类名 */
222
+ className?: string;
223
+ /** 动画效果类型,默认 false(无动画) */
224
+ animation?: 'pulse' | 'gradient' | 'scale' | 'flip' | 'flicker' | 'rotate' | 'wobble' | 'bounce' | 'float' | 'neon' | 'rainbow' | 'shadow' | false;
225
+ /** 动画持续时间(秒),默认 2 */
226
+ animationDuration?: number;
227
+ }
204
228
  /**
205
229
  * 标注组件属性
206
230
  * @description Marker 组件的 Props 定义,使用 Mixin 组合重构
@@ -212,6 +236,8 @@ export interface MarkerProps extends DataSourceMixin<MarkerData>, SelectableMixi
212
236
  icon?: IconConfig;
213
237
  /** 选中状态图标配置 */
214
238
  selectedIcon?: IconConfig;
239
+ /** 标签配置(显示 MarkerData.title) */
240
+ label?: MarkerLabelConfig;
215
241
  /** 覆盖编辑模式回调:移动标注 */
216
242
  onMove?: (result: MarkerMoveResult) => void;
217
243
  /** 覆盖保存回调类型 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenle_2523097/agri-map",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "农业地图组件库 - 基于 Leaflet + React 的农业专用地图组件",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",