@fleet-frontend/mower-maps 0.2.0-beta.4 → 0.2.0-beta.6

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/index.esm.js CHANGED
@@ -194,7 +194,7 @@ class ObstacleData extends BaseData {
194
194
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
195
195
  super(originalData?.id, DataType.OBSTACLE, level, RenderType.POLYGON, convertedPoints, originalData);
196
196
  this.area = originalData?.area;
197
- this.status = originalData?.status || 1;
197
+ this.status = originalData?.status ?? 1;
198
198
  this.start_timestamp = originalData?.start_timestamp;
199
199
  this.end_timestamp = originalData?.end_timestamp;
200
200
  this.name = originalData?.name || 'Obstacle';
@@ -16578,7 +16578,7 @@ const ObstacleElement = ({ data }) => {
16578
16578
  if (platform === PlatformType.H5 &&
16579
16579
  editMapInfo?.selectElement?.id === data.id &&
16580
16580
  editMapInfo.mobileMode === MobileEditMode.START) {
16581
- return (style.lineWidth || 2) * 1.5;
16581
+ return (style.lineWidth || 2) * 3;
16582
16582
  }
16583
16583
  return style.lineWidth || 2;
16584
16584
  }, [platform, style, editMapInfo]);
@@ -17972,7 +17972,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
17972
17972
  return 0;
17973
17973
  }
17974
17974
  // 保留一位小数
17975
- return ((currentTime - data.expiration_ts) / (24 * 60 * 60)).toFixed(1);
17975
+ return ((data.expiration_ts - currentTime) / (24 * 60 * 60)).toFixed(1);
17976
17976
  }, [data]);
17977
17977
  // 初始化变换状态
17978
17978
  useEffect(() => {
@@ -18092,6 +18092,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
18092
18092
  alignItems: 'center',
18093
18093
  justifyContent: 'center',
18094
18094
  gap: '10px',
18095
+ color: '#325069',
18095
18096
  }, children: jsxs("div", { children: ["Remaining Time: ", remainingTime] }) }) }) })] }));
18096
18097
  };
18097
18098
  useEffect(() => {
@@ -18229,7 +18230,7 @@ const DoodleElement = ({ data }) => {
18229
18230
  return data;
18230
18231
  }, [data, editMapInfo?.selectElement]);
18231
18232
  const minScale = useMemo(() => {
18232
- const doodleInfo = doodleList.find((item) => {
18233
+ const doodleInfo = doodleList?.find((item) => {
18233
18234
  // 移除所有空白字符(包括\n、\r、\t等)进行比较
18234
18235
  const normalizedItemSvg = item.svgStr?.replace(/[\s\n\r\t]+/g, '').replace(/\\n/g, '');
18235
18236
  const normalizedOriginSvg = originData.svg?.replace(/[\s\n\r\t]+/g, '').replace(/\\n/g, '');
@@ -21230,6 +21231,8 @@ const TimePeriod = ({ value, onChange }) => {
21230
21231
  onChange({
21231
21232
  ...value,
21232
21233
  status: checked ? 1 : 0,
21234
+ start_timestamp: checked ? value.start_timestamp : 0,
21235
+ end_timestamp: checked ? value.end_timestamp : 0,
21233
21236
  });
21234
21237
  } }) })] }), jsx("div", { className: styles$1.timePeriodContent, children: jsxs(Radio.Group, { value: radioValue, onChange: (e) => {
21235
21238
  setRadioValue(e.target.value);
@@ -21531,7 +21534,7 @@ const HandleElementInfo = () => {
21531
21534
  if (element?.type === DataType.OBSTACLE) {
21532
21535
  data.obstacle = {
21533
21536
  name: element?.name,
21534
- status: element?.status || 1,
21537
+ status: element?.status ?? 1,
21535
21538
  end_timestamp: element?.end_timestamp,
21536
21539
  start_timestamp: element?.start_timestamp,
21537
21540
  points: restorePointsFormat(element.points),
@@ -22288,4 +22291,4 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
22288
22291
  });
22289
22292
  MowerMapRenderer.displayName = 'MowerMapRenderer';
22290
22293
 
22291
- export { BoundarySvgRender, MapDataProcessor, MowerMapRenderer, PathDataProcessor, calculateMapGpsCenter, estimateGpsFromMapBounds };
22294
+ export { AntennaData, AntennaDataBuilder, BaseData, BoundaryData, BoundarySvgRender, ChannelData, ChargingPileData, DataType, DoodleData, MapDataProcessor, MowerMapRenderer, ObstacleData, PathData, PathDataProcessor, RenderType, SvgParserNative, UnifiedMapDataProcessor, VisionOffData, calculateMapGpsCenter, estimateGpsFromMapBounds, initBoundary, initChannel, initDoodle, initObstacle, initVisionOff };
package/dist/index.js CHANGED
@@ -137,7 +137,7 @@ const MAX_DIRECTION_ANGLE = 15;
137
137
  /**
138
138
  * 数据类型枚举
139
139
  */
140
- var DataType;
140
+ exports.DataType = void 0;
141
141
  (function (DataType) {
142
142
  DataType["BOUNDARY"] = "boundary";
143
143
  DataType["CHANNEL"] = "channel";
@@ -147,17 +147,17 @@ var DataType;
147
147
  DataType["VISION_OFF"] = "visionOff";
148
148
  DataType["ANTENNA"] = "antenna";
149
149
  DataType["CHARGING_PILE"] = "chargingPile";
150
- })(DataType || (DataType = {}));
150
+ })(exports.DataType || (exports.DataType = {}));
151
151
  /**
152
152
  * 渲染类型枚举
153
153
  */
154
- var RenderType;
154
+ exports.RenderType = void 0;
155
155
  (function (RenderType) {
156
156
  RenderType["POINT"] = "point";
157
157
  RenderType["POLYGON"] = "polygon";
158
158
  RenderType["LINE"] = "line";
159
159
  RenderType["SVG"] = "svg";
160
- })(RenderType || (RenderType = {}));
160
+ })(exports.RenderType || (exports.RenderType = {}));
161
161
  /**
162
162
  * 基础数据类
163
163
  */
@@ -178,7 +178,7 @@ class BoundaryData extends BaseData {
178
178
  constructor(originalData, level, channels, style) {
179
179
  console.log('originBoundary', originalData);
180
180
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
181
- super(originalData?.id, DataType.BOUNDARY, level, RenderType.POLYGON, convertedPoints, originalData);
181
+ super(originalData?.id, exports.DataType.BOUNDARY, level, exports.RenderType.POLYGON, convertedPoints, originalData);
182
182
  const { isFlowGlobal, cuttingHeight } = convertHeightsetToParams(originalData?.height_set || 0);
183
183
  this.area = originalData?.area;
184
184
  this.name = originalData?.name;
@@ -200,7 +200,7 @@ class BoundaryData extends BaseData {
200
200
  class ChannelData extends BaseData {
201
201
  constructor(originalData, level, connectedBoundaries, isChargingPileTunnel, style) {
202
202
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
203
- super(originalData?.id, DataType.CHANNEL, level, RenderType.LINE, convertedPoints, originalData);
203
+ super(originalData?.id, exports.DataType.CHANNEL, level, exports.RenderType.LINE, convertedPoints, originalData);
204
204
  this.connectedBoundaries = connectedBoundaries;
205
205
  this.isChargingPileTunnel = isChargingPileTunnel;
206
206
  this.style = style;
@@ -212,9 +212,9 @@ class ChannelData extends BaseData {
212
212
  class ObstacleData extends BaseData {
213
213
  constructor(originalData, level, style) {
214
214
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
215
- super(originalData?.id, DataType.OBSTACLE, level, RenderType.POLYGON, convertedPoints, originalData);
215
+ super(originalData?.id, exports.DataType.OBSTACLE, level, exports.RenderType.POLYGON, convertedPoints, originalData);
216
216
  this.area = originalData?.area;
217
- this.status = originalData?.status || 1;
217
+ this.status = originalData?.status ?? 1;
218
218
  this.start_timestamp = originalData?.start_timestamp;
219
219
  this.end_timestamp = originalData?.end_timestamp;
220
220
  this.name = originalData?.name || 'Obstacle';
@@ -227,7 +227,7 @@ class ObstacleData extends BaseData {
227
227
  class PathData extends BaseData {
228
228
  constructor(originalData, level, pathType, style) {
229
229
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
230
- super(originalData?.id, DataType.PATH, level, RenderType.LINE, convertedPoints, originalData);
230
+ super(originalData?.id, exports.DataType.PATH, level, exports.RenderType.LINE, convertedPoints, originalData);
231
231
  this.pathType = pathType;
232
232
  this.style = style;
233
233
  }
@@ -238,7 +238,7 @@ class PathData extends BaseData {
238
238
  class DoodleData extends BaseData {
239
239
  constructor(originalData, level, style) {
240
240
  const center = originalData?.center || [0, 0];
241
- super(originalData?.id, DataType.DOODLE, level, RenderType.SVG, [center], originalData);
241
+ super(originalData?.id, exports.DataType.DOODLE, level, exports.RenderType.SVG, [center], originalData);
242
242
  this.svg = originalData?.svg || '';
243
243
  this.scale = originalData?.scale || 1;
244
244
  this.direction = originalData?.direction || 0;
@@ -254,7 +254,7 @@ class DoodleData extends BaseData {
254
254
  class VisionOffData extends BaseData {
255
255
  constructor(originalData, level, style) {
256
256
  const convertedPoints = convertPointsFormat(originalData?.points) || [];
257
- super(originalData?.id, DataType.VISION_OFF, level, RenderType.POLYGON, convertedPoints, originalData);
257
+ super(originalData?.id, exports.DataType.VISION_OFF, level, exports.RenderType.POLYGON, convertedPoints, originalData);
258
258
  this.style = style;
259
259
  }
260
260
  }
@@ -264,7 +264,7 @@ class VisionOffData extends BaseData {
264
264
  class AntennaData extends BaseData {
265
265
  constructor(originalData, level, size, style) {
266
266
  const position = originalData?.position || [0, 0];
267
- super(originalData?.id, DataType.ANTENNA, level, RenderType.POINT, [position], originalData);
267
+ super(originalData?.id, exports.DataType.ANTENNA, level, exports.RenderType.POINT, [position], originalData);
268
268
  this.antennaId = originalData?.antennaId || 0;
269
269
  this.online = originalData?.online || false;
270
270
  this.size = size;
@@ -277,7 +277,7 @@ class AntennaData extends BaseData {
277
277
  class ChargingPileData extends BaseData {
278
278
  constructor(originalData, level, tunnel, style) {
279
279
  const position = originalData?.position || [0, 0];
280
- super(originalData?.id, DataType.CHARGING_PILE, level, RenderType.POINT, [position], originalData);
280
+ super(originalData?.id, exports.DataType.CHARGING_PILE, level, exports.RenderType.POINT, [position], originalData);
281
281
  this.position = position;
282
282
  this.direction = originalData?.direction || 0;
283
283
  this.width = originalData?.width || 0;
@@ -404,39 +404,39 @@ class UnifiedMapDataProcessor {
404
404
  }
405
405
  // 处理通道
406
406
  if (elementsByType.TUNNEL.length > 0) {
407
- processedData[DataType.CHANNEL] = processedData[DataType.CHANNEL] || [];
408
- processedData[DataType.CHANNEL].push(...this.processChannelElements(elementsByType.TUNNEL));
407
+ processedData[exports.DataType.CHANNEL] = processedData[exports.DataType.CHANNEL] || [];
408
+ processedData[exports.DataType.CHANNEL].push(...this.processChannelElements(elementsByType.TUNNEL));
409
409
  }
410
410
  // 处理边界
411
411
  if (elementsByType.BOUNDARY.length > 0) {
412
- processedData[DataType.BOUNDARY] = this.processBoundaryElements(elementsByType.BOUNDARY);
412
+ processedData[exports.DataType.BOUNDARY] = this.processBoundaryElements(elementsByType.BOUNDARY);
413
413
  }
414
414
  // 处理障碍物
415
415
  if (elementsByType.OBSTACLE.length > 0) {
416
- processedData[DataType.OBSTACLE] = this.processObstacleElements(elementsByType.OBSTACLE);
416
+ processedData[exports.DataType.OBSTACLE] = this.processObstacleElements(elementsByType.OBSTACLE);
417
417
  }
418
418
  // 处理充电桩
419
419
  if (elementsByType.CHARGING_PILE.length > 0) {
420
- processedData[DataType.CHARGING_PILE] = [];
421
- processedData[DataType.CHANNEL] = processedData[DataType.CHANNEL] || [];
420
+ processedData[exports.DataType.CHARGING_PILE] = [];
421
+ processedData[exports.DataType.CHANNEL] = processedData[exports.DataType.CHANNEL] || [];
422
422
  const { chargingPileData, channelData } = this.processChargingPileElements(elementsByType.CHARGING_PILE);
423
- processedData[DataType.CHARGING_PILE].push(...chargingPileData);
424
- processedData[DataType.CHANNEL].push(...channelData);
423
+ processedData[exports.DataType.CHARGING_PILE].push(...chargingPileData);
424
+ processedData[exports.DataType.CHANNEL].push(...channelData);
425
425
  }
426
426
  // 处理时间限制障碍物
427
427
  if (elementsByType.TIME_LIMIT_OBSTACLE.length > 0) {
428
428
  const { obstacleData, doodleData } = this.processTimeLimitObstacleElements(elementsByType.TIME_LIMIT_OBSTACLE);
429
429
  if (obstacleData.length > 0) {
430
- processedData[DataType.OBSTACLE] = processedData[DataType.OBSTACLE] || [];
431
- processedData[DataType.OBSTACLE].push(...obstacleData);
430
+ processedData[exports.DataType.OBSTACLE] = processedData[exports.DataType.OBSTACLE] || [];
431
+ processedData[exports.DataType.OBSTACLE].push(...obstacleData);
432
432
  }
433
433
  if (doodleData.length > 0) {
434
- processedData[DataType.DOODLE] = doodleData;
434
+ processedData[exports.DataType.DOODLE] = doodleData;
435
435
  }
436
436
  }
437
437
  // 处理视觉盲区
438
438
  if (elementsByType.VISION_OFF_AREA.length > 0) {
439
- processedData[DataType.VISION_OFF] = this.processVisionOffElements(elementsByType.VISION_OFF_AREA);
439
+ processedData[exports.DataType.VISION_OFF] = this.processVisionOffElements(elementsByType.VISION_OFF_AREA);
440
440
  }
441
441
  // 建立数据之间的关联关系
442
442
  this.establishRelationships(processedData);
@@ -508,7 +508,7 @@ class UnifiedMapDataProcessor {
508
508
  }
509
509
  });
510
510
  if (pathDataList.length > 0) {
511
- processedData[DataType.PATH] = pathDataList;
511
+ processedData[exports.DataType.PATH] = pathDataList;
512
512
  }
513
513
  return processedData;
514
514
  }
@@ -561,7 +561,7 @@ class UnifiedMapDataProcessor {
561
561
  }
562
562
  }
563
563
  if (antennaDataList.length > 0) {
564
- processedData[DataType.ANTENNA] = antennaDataList;
564
+ processedData[exports.DataType.ANTENNA] = antennaDataList;
565
565
  }
566
566
  return processedData;
567
567
  }
@@ -573,14 +573,14 @@ class UnifiedMapDataProcessor {
573
573
  const drawElements = [];
574
574
  // 定义层级顺序(从低到高)
575
575
  const typeOrder = [
576
- DataType.CHANNEL,
577
- DataType.BOUNDARY,
578
- DataType.PATH,
579
- DataType.OBSTACLE,
580
- DataType.CHARGING_PILE,
581
- DataType.VISION_OFF,
582
- DataType.DOODLE,
583
- DataType.ANTENNA,
576
+ exports.DataType.CHANNEL,
577
+ exports.DataType.BOUNDARY,
578
+ exports.DataType.PATH,
579
+ exports.DataType.OBSTACLE,
580
+ exports.DataType.CHARGING_PILE,
581
+ exports.DataType.VISION_OFF,
582
+ exports.DataType.DOODLE,
583
+ exports.DataType.ANTENNA,
584
584
  ];
585
585
  // 按照层级顺序处理各种类型的数据
586
586
  for (const type of typeOrder) {
@@ -781,9 +781,9 @@ class UnifiedMapDataProcessor {
781
781
  */
782
782
  static establishRelationships(processedData) {
783
783
  // 建立通道和边界的关联关系
784
- if (processedData[DataType.CHANNEL] && processedData[DataType.BOUNDARY]) {
785
- const channels = processedData[DataType.CHANNEL];
786
- const boundaries = processedData[DataType.BOUNDARY];
784
+ if (processedData[exports.DataType.CHANNEL] && processedData[exports.DataType.BOUNDARY]) {
785
+ const channels = processedData[exports.DataType.CHANNEL];
786
+ const boundaries = processedData[exports.DataType.BOUNDARY];
787
787
  for (const channel of channels) {
788
788
  if (channel.originalData && channel.originalData.connection) {
789
789
  const connectionIds = Array.isArray(channel.originalData.connection)
@@ -808,9 +808,9 @@ class UnifiedMapDataProcessor {
808
808
  }
809
809
  }
810
810
  // 建立充电桩和通道的关联关系
811
- if (processedData[DataType.CHARGING_PILE] && processedData[DataType.CHANNEL]) {
812
- const chargingPiles = processedData[DataType.CHARGING_PILE];
813
- const channels = processedData[DataType.CHANNEL];
811
+ if (processedData[exports.DataType.CHARGING_PILE] && processedData[exports.DataType.CHANNEL]) {
812
+ const chargingPiles = processedData[exports.DataType.CHARGING_PILE];
813
+ const channels = processedData[exports.DataType.CHANNEL];
814
814
  for (const chargingPile of chargingPiles) {
815
815
  if (!chargingPile.tunnel) {
816
816
  const tunnel = channels.find((c) => c.isChargingPileTunnel &&
@@ -829,21 +829,21 @@ class UnifiedMapDataProcessor {
829
829
  */
830
830
  static convertToDrawElement(data) {
831
831
  switch (data.type) {
832
- case DataType.BOUNDARY:
832
+ case exports.DataType.BOUNDARY:
833
833
  return this.convertBoundaryToDrawElement(data);
834
- case DataType.OBSTACLE:
834
+ case exports.DataType.OBSTACLE:
835
835
  return this.convertObstacleToDrawElement(data);
836
- case DataType.CHANNEL:
836
+ case exports.DataType.CHANNEL:
837
837
  return this.convertChannelToDrawElement(data);
838
- case DataType.VISION_OFF:
838
+ case exports.DataType.VISION_OFF:
839
839
  return this.convertVisionOffToDrawElement(data);
840
- case DataType.DOODLE:
840
+ case exports.DataType.DOODLE:
841
841
  return this.convertDoodleToDrawElement(data);
842
- case DataType.PATH:
842
+ case exports.DataType.PATH:
843
843
  return this.convertPathToDrawElement(data);
844
- case DataType.ANTENNA:
844
+ case exports.DataType.ANTENNA:
845
845
  return this.convertAntennaToDrawElement(data);
846
- case DataType.CHARGING_PILE:
846
+ case exports.DataType.CHARGING_PILE:
847
847
  return this.convertChargingPileToDrawElement(data);
848
848
  default:
849
849
  console.warn(`Unknown data type: ${data.type}`);
@@ -1079,14 +1079,14 @@ const ANTENNA_STYLES = {
1079
1079
  opacity: DEFAULT_OPACITIES.FULL,
1080
1080
  };
1081
1081
  const DEFAULT_STYLES = {
1082
- [DataType.BOUNDARY]: BOUNDARY_STYLES,
1083
- [DataType.VISION_OFF]: VISION_OFF_AREA_STYLES,
1084
- [DataType.OBSTACLE]: OBSTACLE_STYLES,
1085
- [DataType.CHARGING_PILE]: CHARGING_PILE_STYLES,
1086
- [DataType.DOODLE]: DOODLE_STYLES,
1087
- [DataType.PATH]: PATH_EDGE_STYLES,
1088
- [DataType.CHANNEL]: CHANNEL_STYLES,
1089
- [DataType.ANTENNA]: ANTENNA_STYLES,
1082
+ [exports.DataType.BOUNDARY]: BOUNDARY_STYLES,
1083
+ [exports.DataType.VISION_OFF]: VISION_OFF_AREA_STYLES,
1084
+ [exports.DataType.OBSTACLE]: OBSTACLE_STYLES,
1085
+ [exports.DataType.CHARGING_PILE]: CHARGING_PILE_STYLES,
1086
+ [exports.DataType.DOODLE]: DOODLE_STYLES,
1087
+ [exports.DataType.PATH]: PATH_EDGE_STYLES,
1088
+ [exports.DataType.CHANNEL]: CHANNEL_STYLES,
1089
+ [exports.DataType.ANTENNA]: ANTENNA_STYLES,
1090
1090
  };
1091
1091
 
1092
1092
  function restorePoint(point) {
@@ -15657,7 +15657,7 @@ const useCheckElement = () => {
15657
15657
  const { svgElementDatas } = useSvgEditContext();
15658
15658
  const checkDoodle = React.useCallback(() => {
15659
15659
  console.log('checkdoodle', editMapInfo, svgElementDatas);
15660
- if (!editMapInfo.selectElement || editMapInfo.selectElement.type !== DataType.DOODLE) {
15660
+ if (!editMapInfo.selectElement || editMapInfo.selectElement.type !== exports.DataType.DOODLE) {
15661
15661
  return { isValid: false, reason: 'No doodle element selected' };
15662
15662
  }
15663
15663
  const doodleElement = editMapInfo.selectElement;
@@ -15665,10 +15665,10 @@ const useCheckElement = () => {
15665
15665
  if (doodlePoints.length === 0) {
15666
15666
  return { isValid: false, reason: 'Doodle has no transformed points' };
15667
15667
  }
15668
- const boundary = svgElementDatas?.[DataType.BOUNDARY] || [];
15669
- const obstacle = svgElementDatas?.[DataType.OBSTACLE] || [];
15670
- const channel = svgElementDatas?.[DataType.CHANNEL] || [];
15671
- const doodles = svgElementDatas?.[DataType.DOODLE] || [];
15668
+ const boundary = svgElementDatas?.[exports.DataType.BOUNDARY] || [];
15669
+ const obstacle = svgElementDatas?.[exports.DataType.OBSTACLE] || [];
15670
+ const channel = svgElementDatas?.[exports.DataType.CHANNEL] || [];
15671
+ const doodles = svgElementDatas?.[exports.DataType.DOODLE] || [];
15672
15672
  // 1. 首先判断 doodle 是否在一个 boundary 内
15673
15673
  let isInBoundary = false;
15674
15674
  let containingBoundary = null;
@@ -15724,9 +15724,9 @@ const useCheckElement = () => {
15724
15724
  // 检查是否有相交、相切或重叠
15725
15725
  if (doPolygonsIntersect(doodlePoints, elementPoints)) {
15726
15726
  const elementTypeName = {
15727
- [DataType.OBSTACLE]: '障碍物',
15728
- [DataType.CHANNEL]: '通道',
15729
- [DataType.DOODLE]: 'Doodle',
15727
+ [exports.DataType.OBSTACLE]: '障碍物',
15728
+ [exports.DataType.CHANNEL]: '通道',
15729
+ [exports.DataType.DOODLE]: 'Doodle',
15730
15730
  }[element.type] || '未知元素';
15731
15731
  return {
15732
15732
  isValid: false,
@@ -15737,10 +15737,10 @@ const useCheckElement = () => {
15737
15737
  const distance = polygonToPolygonDistance(doodlePoints, elementPoints);
15738
15738
  if (distance < minDistance) {
15739
15739
  const elementTypeName = {
15740
- [DataType.OBSTACLE]: '障碍物',
15741
- [DataType.VISION_OFF]: '禁区',
15742
- [DataType.CHANNEL]: '通道',
15743
- [DataType.DOODLE]: 'Doodle',
15740
+ [exports.DataType.OBSTACLE]: '障碍物',
15741
+ [exports.DataType.VISION_OFF]: '禁区',
15742
+ [exports.DataType.CHANNEL]: '通道',
15743
+ [exports.DataType.DOODLE]: 'Doodle',
15744
15744
  }[element.type] || '未知元素';
15745
15745
  return {
15746
15746
  isValid: false,
@@ -15758,7 +15758,7 @@ const useCheckElement = () => {
15758
15758
  return false;
15759
15759
  const points = editMapInfo?.selectElement?.points || [];
15760
15760
  const firstPoint = coordinatesToPoints$1(points)?.[0] || checkPoint;
15761
- const boundary = svgElementDatas?.[DataType.BOUNDARY] || [];
15761
+ const boundary = svgElementDatas?.[exports.DataType.BOUNDARY] || [];
15762
15762
  let currentBoundary = null;
15763
15763
  // 找到包含当前点的边界
15764
15764
  for (const boundaryData of boundary) {
@@ -15774,7 +15774,7 @@ const useCheckElement = () => {
15774
15774
  if (!isPointInPolygon(checkPoint, coordinatesToPoints$1(currentBoundary.points)))
15775
15775
  return true;
15776
15776
  // 如果不是创建 obstacle,则不需要进一步检查
15777
- if (editMapInfo.elementType !== DataType.OBSTACLE)
15777
+ if (editMapInfo.elementType !== exports.DataType.OBSTACLE)
15778
15778
  return false;
15779
15779
  // 获取当前正在创建的 obstacle 的点
15780
15780
  const currentObstaclePoints = coordinatesToPoints$1(points);
@@ -15784,8 +15784,8 @@ const useCheckElement = () => {
15784
15784
  const currentObstaclePolygon = [...currentObstaclePoints, checkPoint];
15785
15785
  // 获取当前边界内的所有元素
15786
15786
  const currentBoundaryPoints = coordinatesToPoints$1(currentBoundary.points);
15787
- const obstacles = svgElementDatas?.[DataType.OBSTACLE] || [];
15788
- const doodles = svgElementDatas?.[DataType.DOODLE] || [];
15787
+ const obstacles = svgElementDatas?.[exports.DataType.OBSTACLE] || [];
15788
+ const doodles = svgElementDatas?.[exports.DataType.DOODLE] || [];
15789
15789
  // 1. 找到在 currentBoundary 内的其他 obstacle 元素
15790
15790
  const obstaclesInBoundary = obstacles.filter((obstacle) => {
15791
15791
  const obstaclePoints = coordinatesToPoints$1(obstacle.points);
@@ -16433,7 +16433,7 @@ const BoundaryElement = ({ data }) => {
16433
16433
  setEditMapInfo((prev) => ({
16434
16434
  ...prev,
16435
16435
  mobileMode: MobileEditMode.START,
16436
- elementType: DataType.BOUNDARY,
16436
+ elementType: exports.DataType.BOUNDARY,
16437
16437
  selectElement: data,
16438
16438
  }));
16439
16439
  }
@@ -16443,7 +16443,7 @@ const BoundaryElement = ({ data }) => {
16443
16443
  setEditMapInfo((prev) => ({
16444
16444
  ...prev,
16445
16445
  selectElement: data,
16446
- elementType: DataType.BOUNDARY,
16446
+ elementType: exports.DataType.BOUNDARY,
16447
16447
  editMap: true,
16448
16448
  }));
16449
16449
  }
@@ -16456,7 +16456,7 @@ const BoundaryElement = ({ data }) => {
16456
16456
  ...data,
16457
16457
  points: coordinates,
16458
16458
  },
16459
- elementType: DataType.BOUNDARY,
16459
+ elementType: exports.DataType.BOUNDARY,
16460
16460
  }));
16461
16461
  } }));
16462
16462
  };
@@ -16598,7 +16598,7 @@ const ObstacleElement = ({ data }) => {
16598
16598
  if (platform === PlatformType.H5 &&
16599
16599
  editMapInfo?.selectElement?.id === data.id &&
16600
16600
  editMapInfo.mobileMode === MobileEditMode.START) {
16601
- return (style.lineWidth || 2) * 1.5;
16601
+ return (style.lineWidth || 2) * 3;
16602
16602
  }
16603
16603
  return style.lineWidth || 2;
16604
16604
  }, [platform, style, editMapInfo]);
@@ -16612,7 +16612,7 @@ const ObstacleElement = ({ data }) => {
16612
16612
  setEditMapInfo((prev) => ({
16613
16613
  ...prev,
16614
16614
  mobileMode: MobileEditMode.START,
16615
- elementType: DataType.OBSTACLE,
16615
+ elementType: exports.DataType.OBSTACLE,
16616
16616
  selectElement: data,
16617
16617
  }));
16618
16618
  return;
@@ -16633,7 +16633,7 @@ const ObstacleElement = ({ data }) => {
16633
16633
  },
16634
16634
  ],
16635
16635
  currentHistoryIndex: 0,
16636
- elementType: DataType.OBSTACLE,
16636
+ elementType: exports.DataType.OBSTACLE,
16637
16637
  editMap: true,
16638
16638
  }));
16639
16639
  });
@@ -16659,7 +16659,7 @@ const ObstacleElement = ({ data }) => {
16659
16659
  ...prev.selectElement,
16660
16660
  points: coordinates,
16661
16661
  },
16662
- elementType: DataType.OBSTACLE,
16662
+ elementType: exports.DataType.OBSTACLE,
16663
16663
  }));
16664
16664
  addHistory({
16665
16665
  selectElement: {
@@ -17445,7 +17445,7 @@ const VisionOffElement = ({ data, onSelect }) => {
17445
17445
  // h5编辑模式下,想要展示操作框,需要是选中并且非start模式
17446
17446
  return (editMapInfo?.mobileMode !== MobileEditMode.START &&
17447
17447
  editMapInfo?.selectElement?.id === data.id &&
17448
- editMapInfo.elementType === DataType.VISION_OFF);
17448
+ editMapInfo.elementType === exports.DataType.VISION_OFF);
17449
17449
  }
17450
17450
  return editMapInfo?.selectElement?.id === data.id;
17451
17451
  }, [editMapInfo, data, platform]);
@@ -17456,16 +17456,16 @@ const VisionOffElement = ({ data, onSelect }) => {
17456
17456
  // create或者是edit模式的话,只有选中的是visionOff的时候才能选中
17457
17457
  if ((editMapInfo.mobileMode === MobileEditMode.CREATE ||
17458
17458
  editMapInfo.mobileMode === MobileEditMode.EDIT) &&
17459
- editMapInfo.elementType !== DataType.VISION_OFF) {
17459
+ editMapInfo.elementType !== exports.DataType.VISION_OFF) {
17460
17460
  return;
17461
17461
  }
17462
17462
  if ((editMapInfo.mobileMode === MobileEditMode.CREATE ||
17463
17463
  editMapInfo.mobileMode === MobileEditMode.EDIT) &&
17464
- editMapInfo.elementType === DataType.VISION_OFF) {
17464
+ editMapInfo.elementType === exports.DataType.VISION_OFF) {
17465
17465
  setEditMapInfo((prev) => ({
17466
17466
  ...prev,
17467
17467
  selectElement: data,
17468
- elementType: DataType.VISION_OFF,
17468
+ elementType: exports.DataType.VISION_OFF,
17469
17469
  mobileMode: editMapInfo.mobileMode, // 保持原来的模式
17470
17470
  }));
17471
17471
  return;
@@ -17473,7 +17473,7 @@ const VisionOffElement = ({ data, onSelect }) => {
17473
17473
  setEditMapInfo((prev) => ({
17474
17474
  ...prev,
17475
17475
  selectElement: data,
17476
- elementType: DataType.VISION_OFF,
17476
+ elementType: exports.DataType.VISION_OFF,
17477
17477
  mobileMode: MobileEditMode.START,
17478
17478
  }));
17479
17479
  return;
@@ -17488,7 +17488,7 @@ const VisionOffElement = ({ data, onSelect }) => {
17488
17488
  setEditMapInfo((prev) => ({
17489
17489
  ...prev,
17490
17490
  selectElement: data,
17491
- elementType: DataType.VISION_OFF,
17491
+ elementType: exports.DataType.VISION_OFF,
17492
17492
  historyList: [
17493
17493
  {
17494
17494
  selectElement: data,
@@ -17908,7 +17908,7 @@ const DoodleTransform = ({ data, isSelected: _isSelected, onSelect }) => {
17908
17908
  const { platform } = useCommonContext();
17909
17909
  const canSelect = React.useMemo(() => {
17910
17910
  if (platform === PlatformType.H5) {
17911
- return editMapInfo?.elementType === DataType.DOODLE;
17911
+ return editMapInfo?.elementType === exports.DataType.DOODLE;
17912
17912
  }
17913
17913
  return editMapInfo?.elementType;
17914
17914
  }, [editMapInfo?.elementType, platform]);
@@ -17992,7 +17992,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
17992
17992
  return 0;
17993
17993
  }
17994
17994
  // 保留一位小数
17995
- return ((currentTime - data.expiration_ts) / (24 * 60 * 60)).toFixed(1);
17995
+ return ((data.expiration_ts - currentTime) / (24 * 60 * 60)).toFixed(1);
17996
17996
  }, [data]);
17997
17997
  // 初始化变换状态
17998
17998
  React.useEffect(() => {
@@ -18112,6 +18112,7 @@ const DoodleTransformWrapper = ({ data, isSelected = false, isSelectedWithoutOpe
18112
18112
  alignItems: 'center',
18113
18113
  justifyContent: 'center',
18114
18114
  gap: '10px',
18115
+ color: '#325069',
18115
18116
  }, children: jsxRuntime.jsxs("div", { children: ["Remaining Time: ", remainingTime] }) }) }) })] }));
18116
18117
  };
18117
18118
  React.useEffect(() => {
@@ -18249,7 +18250,7 @@ const DoodleElement = ({ data }) => {
18249
18250
  return data;
18250
18251
  }, [data, editMapInfo?.selectElement]);
18251
18252
  const minScale = React.useMemo(() => {
18252
- const doodleInfo = doodleList.find((item) => {
18253
+ const doodleInfo = doodleList?.find((item) => {
18253
18254
  // 移除所有空白字符(包括\n、\r、\t等)进行比较
18254
18255
  const normalizedItemSvg = item.svgStr?.replace(/[\s\n\r\t]+/g, '').replace(/\\n/g, '');
18255
18256
  const normalizedOriginSvg = originData.svg?.replace(/[\s\n\r\t]+/g, '').replace(/\\n/g, '');
@@ -18290,7 +18291,7 @@ const DoodleElement = ({ data }) => {
18290
18291
  setEditMapInfo((prev) => ({
18291
18292
  ...prev,
18292
18293
  selectElement: data,
18293
- elementType: DataType.DOODLE,
18294
+ elementType: exports.DataType.DOODLE,
18294
18295
  mobileMode: MobileEditMode.START,
18295
18296
  }));
18296
18297
  return;
@@ -18317,7 +18318,7 @@ const DoodleElement = ({ data }) => {
18317
18318
  ...data,
18318
18319
  transformedPoints: transformedElements,
18319
18320
  },
18320
- elementType: DataType.DOODLE,
18321
+ elementType: exports.DataType.DOODLE,
18321
18322
  editMap: true,
18322
18323
  isShowDrag: true,
18323
18324
  }));
@@ -18395,7 +18396,7 @@ const SvgElement = React.memo(({ type, data, interactive = false }) => {
18395
18396
  if (platform === PlatformType.H5 &&
18396
18397
  (editMapInfo.mobileMode === MobileEditMode.CREATE ||
18397
18398
  editMapInfo.mobileMode === MobileEditMode.EDIT) &&
18398
- editMapInfo.elementType === DataType.VISION_OFF) {
18399
+ editMapInfo.elementType === exports.DataType.VISION_OFF) {
18399
18400
  return null;
18400
18401
  }
18401
18402
  return jsxRuntime.jsx(VisionOffElement, { data: data });
@@ -18504,7 +18505,7 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
18504
18505
 
18505
18506
  const ChannelClipPath = React.memo(() => {
18506
18507
  const { svgElementDatas, svgRef } = useSvgEditContext();
18507
- const boundaryData = svgElementDatas?.[DataType.BOUNDARY] || [];
18508
+ const boundaryData = svgElementDatas?.[exports.DataType.BOUNDARY] || [];
18508
18509
  const [minX, minY, maxX, maxY] = React.useMemo(() => {
18509
18510
  const baseVal = svgRef?.viewBox.baseVal;
18510
18511
  return [
@@ -19794,7 +19795,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19794
19795
  // 需要在当前的视觉失效区的基础上添加
19795
19796
  setEditMapInfo((prev) => ({
19796
19797
  ...prev,
19797
- elementType: DataType.VISION_OFF,
19798
+ elementType: exports.DataType.VISION_OFF,
19798
19799
  allVisionOffPoints: [...(prev.allVisionOffPoints || []), { id, points: newPoints }],
19799
19800
  selectElement: {
19800
19801
  ...selectElement,
@@ -19811,7 +19812,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19811
19812
  };
19812
19813
  const enterVisionOffEditMode = (mode) => {
19813
19814
  // 目前的所有视觉禁区
19814
- const allVisionOffPoints = (svgElementDatas[DataType.VISION_OFF] || []).map((item) => ({
19815
+ const allVisionOffPoints = (svgElementDatas[exports.DataType.VISION_OFF] || []).map((item) => ({
19815
19816
  id: item.id,
19816
19817
  points: item.points,
19817
19818
  })) || [];
@@ -19819,7 +19820,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19819
19820
  ...prev,
19820
19821
  allVisionOffPoints,
19821
19822
  mobileMode: mode,
19822
- elementType: DataType.VISION_OFF,
19823
+ elementType: exports.DataType.VISION_OFF,
19823
19824
  }));
19824
19825
  addHistory({
19825
19826
  selectElement: editMapInfo.selectElement,
@@ -19841,7 +19842,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19841
19842
  ...prev,
19842
19843
  currentHistoryIndex: 0,
19843
19844
  mobileMode: MobileEditMode.CREATE,
19844
- elementType: DataType.DOODLE,
19845
+ elementType: exports.DataType.DOODLE,
19845
19846
  selectElement: newDoodle,
19846
19847
  }));
19847
19848
  addHistory({
@@ -19911,9 +19912,9 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19911
19912
  transform: 'translate(-50%, -50%)',
19912
19913
  // cursor: createMode ? 'crosshair' : editMode ? 'default' : 'move',
19913
19914
  // pointerEvents: 'auto', // 关键:允许接收鼠标事件
19914
- }, xmlns: "http://www.w3.org/2000/svg", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", ref: svgRef, onClick: editMapInfo.createMode && platform !== PlatformType.H5 ? onSvgClick : undefined, onMouseMove: editMapInfo.createMode && platform !== PlatformType.H5 ? onSvgMouseMove : undefined, children: [jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsx("filter", { id: "vertex-tooltip-shadow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: jsxRuntime.jsx("feDropShadow", { dx: "2", dy: "2", stdDeviation: "2", floodColor: "#000", floodOpacity: "0.12" }) }), jsxRuntime.jsxs("filter", { id: `path-hover-${DataType.BOUNDARY}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: BOUNDARY_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] }), jsxRuntime.jsxs("filter", { id: `path-hover-${DataType.VISION_OFF}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: VISION_OFF_AREA_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] }), jsxRuntime.jsxs("filter", { id: `path-hover-${DataType.OBSTACLE}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: OBSTACLE_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] })] }), Object.keys(svgElementDatas)
19915
+ }, xmlns: "http://www.w3.org/2000/svg", "shape-rendering": "geometricPrecision", "text-rendering": "geometricPrecision", "image-rendering": "optimizeQuality", ref: svgRef, onClick: editMapInfo.createMode && platform !== PlatformType.H5 ? onSvgClick : undefined, onMouseMove: editMapInfo.createMode && platform !== PlatformType.H5 ? onSvgMouseMove : undefined, children: [jsxRuntime.jsxs("defs", { children: [jsxRuntime.jsx("filter", { id: "vertex-tooltip-shadow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: jsxRuntime.jsx("feDropShadow", { dx: "2", dy: "2", stdDeviation: "2", floodColor: "#000", floodOpacity: "0.12" }) }), jsxRuntime.jsxs("filter", { id: `path-hover-${exports.DataType.BOUNDARY}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: BOUNDARY_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] }), jsxRuntime.jsxs("filter", { id: `path-hover-${exports.DataType.VISION_OFF}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: VISION_OFF_AREA_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] }), jsxRuntime.jsxs("filter", { id: `path-hover-${exports.DataType.OBSTACLE}`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: [jsxRuntime.jsx("feMorphology", { operator: "dilate", radius: "1", in: "SourceGraphic", result: "border" }), jsxRuntime.jsx("feFlood", { floodColor: OBSTACLE_STYLES.lineColor, floodOpacity: "1", result: "borderColor" }), jsxRuntime.jsx("feComposite", { in: "borderColor", in2: "border", operator: "in", result: "coloredBorder" }), jsxRuntime.jsxs("feMerge", { children: [jsxRuntime.jsx("feMergeNode", { in: "coloredBorder" }), jsxRuntime.jsx("feMergeNode", { in: "SourceGraphic" })] })] })] }), Object.keys(svgElementDatas)
19915
19916
  ?.sort?.((a, b) => {
19916
- if (a === DataType.BOUNDARY || b === DataType.BOUNDARY) {
19917
+ if (a === exports.DataType.BOUNDARY || b === exports.DataType.BOUNDARY) {
19917
19918
  return 0;
19918
19919
  }
19919
19920
  const aVal = a === editMapInfo.elementType ? 1 : 0;
@@ -19925,17 +19926,17 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19925
19926
  return (jsxRuntime.jsxs(GElement, { type: key, data: elements, children: [key === 'channel' && jsxRuntime.jsx(ChannelClipPath, {}), elements.map((item) => (jsxRuntime.jsx(SvgElement, { type: key, data: item }, item?.id)))] }, key));
19926
19927
  }), platform === PlatformType.WEB &&
19927
19928
  editMapInfo.createMode &&
19928
- editMapInfo.elementType !== DataType.DOODLE &&
19929
- editMapInfo.elementType !== DataType.VISION_OFF &&
19929
+ editMapInfo.elementType !== exports.DataType.DOODLE &&
19930
+ editMapInfo.elementType !== exports.DataType.VISION_OFF &&
19930
19931
  (points.length > 0 || editMapInfo?.selectElement?.points?.length > 0) && (jsxRuntime.jsx(PolygonElement, { points: points?.length > 0
19931
19932
  ? points.map((p) => [p.x, p.y, 2])
19932
- : editMapInfo?.selectElement?.points, fillColor: createElementStyle.fillColor, strokeColor: createElementStyle.lineColor, strokeWidth: createElementStyle.lineWidth, createMode: editMapInfo.elementType !== DataType.VISION_OFF, showPoints: editMapInfo.elementType !== DataType.VISION_OFF, onPointClick: onPointClick, completed: completed, mousePos: mousePos, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (newCoords) => {
19933
+ : editMapInfo?.selectElement?.points, fillColor: createElementStyle.fillColor, strokeColor: createElementStyle.lineColor, strokeWidth: createElementStyle.lineWidth, createMode: editMapInfo.elementType !== exports.DataType.VISION_OFF, showPoints: editMapInfo.elementType !== exports.DataType.VISION_OFF, onPointClick: onPointClick, completed: completed, mousePos: mousePos, onVertexDelete: (vertexIndex) => handleCreateVertexDelete(vertexIndex), onCoordinatesChange: (newCoords) => {
19933
19934
  // 创建模式下的坐标变化(拖拽时)
19934
19935
  // 实时更新当前绘制的多边形
19935
19936
  updatePoints(newCoords.map((coord) => ({ x: coord[0], y: coord[1] })));
19936
19937
  }, svgRef: svgRef })), platform === PlatformType.WEB &&
19937
19938
  editMapInfo.createMode &&
19938
- editMapInfo.elementType === DataType.VISION_OFF &&
19939
+ editMapInfo.elementType === exports.DataType.VISION_OFF &&
19939
19940
  (points.length > 0 || editMapInfo?.selectElement?.points?.length > 0) && (jsxRuntime.jsx(VisionOffElement, { data: {
19940
19941
  ...editMapInfo?.selectElement,
19941
19942
  style: {
@@ -19946,7 +19947,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19946
19947
  } })), platform === PlatformType.WEB &&
19947
19948
  editMapInfo.createMode &&
19948
19949
  editMapInfo?.selectElement?.svg && (jsxRuntime.jsx(DoodleElement, { data: { ...editMapInfo?.selectElement } })), platform === PlatformType.H5 &&
19949
- editMapInfo.elementType === DataType.OBSTACLE &&
19950
+ editMapInfo.elementType === exports.DataType.OBSTACLE &&
19950
19951
  editMapInfo.mobileMode === MobileEditMode.CREATE && (jsxRuntime.jsx(CreateObstacleElement, { ref: pointManagerRef, styles: {
19951
19952
  fillColor: '#FF7133',
19952
19953
  strokeColor: '#FF7133',
@@ -19962,7 +19963,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19962
19963
  ...prev.selectElement,
19963
19964
  points: new_points,
19964
19965
  },
19965
- elementType: DataType.OBSTACLE,
19966
+ elementType: exports.DataType.OBSTACLE,
19966
19967
  mobileMode: MobileEditMode.CREATE,
19967
19968
  };
19968
19969
  });
@@ -19970,14 +19971,14 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19970
19971
  selectElement: { ...editMapInfo?.selectElement, points: new_points },
19971
19972
  });
19972
19973
  } })), platform === PlatformType.H5 &&
19973
- editMapInfo.elementType === DataType.VISION_OFF &&
19974
+ editMapInfo.elementType === exports.DataType.VISION_OFF &&
19974
19975
  (editMapInfo.mobileMode === MobileEditMode.CREATE ||
19975
19976
  editMapInfo.mobileMode === MobileEditMode.EDIT) &&
19976
19977
  editMapInfo.allVisionOffPoints?.length > 0 &&
19977
19978
  editMapInfo.allVisionOffPoints.map((item) => (jsxRuntime.jsx(VisionOffElement, { data: {
19978
19979
  level: 100,
19979
- renderType: RenderType.POLYGON,
19980
- type: DataType.VISION_OFF,
19980
+ renderType: exports.RenderType.POLYGON,
19981
+ type: exports.DataType.VISION_OFF,
19981
19982
  // ...editMapInfo.selectElement,
19982
19983
  originalData: {
19983
19984
  points: item.points,
@@ -19993,7 +19994,7 @@ const SvgEditMap = React.forwardRef(({ mapJson, mapConfig, editMap, onEditInfoMa
19993
19994
  points: item.points,
19994
19995
  id: item.id,
19995
19996
  } }))), platform === PlatformType.H5 &&
19996
- editMapInfo.elementType === DataType.DOODLE &&
19997
+ editMapInfo.elementType === exports.DataType.DOODLE &&
19997
19998
  editMapInfo.mobileMode === MobileEditMode.CREATE &&
19998
19999
  editMapInfo?.selectElement?.svg && (jsxRuntime.jsx(DoodleElement, { data: { ...editMapInfo?.selectElement } }))] }) }));
19999
20000
  });
@@ -20247,41 +20248,41 @@ var HandleElementMapType;
20247
20248
  HandleElementMapType["dooleExist"] = "dooleExist";
20248
20249
  })(HandleElementMapType || (HandleElementMapType = {}));
20249
20250
  const DATE_TYPE_MAP = [
20250
- { type: DataType.BOUNDARY, label: 'Boundary', icon: jsxRuntime.jsx(SvgBoundary, {}) },
20251
+ { type: exports.DataType.BOUNDARY, label: 'Boundary', icon: jsxRuntime.jsx(SvgBoundary, {}) },
20251
20252
  {
20252
- type: DataType.OBSTACLE,
20253
+ type: exports.DataType.OBSTACLE,
20253
20254
  paramType: RecordTypeEnum.OBSTACLE,
20254
20255
  label: 'Off-limit island',
20255
20256
  icon: jsxRuntime.jsx(SvgLimitIsland, {}),
20256
20257
  },
20257
20258
  // { type: DataType.CHANNEL, label: 'Channel', icon: <ChannelIcon /> },
20258
20259
  {
20259
- type: DataType.VISION_OFF,
20260
+ type: exports.DataType.VISION_OFF,
20260
20261
  paramType: RecordTypeEnum.VISI_OFF,
20261
20262
  label: 'VisionFence-off zone',
20262
20263
  icon: jsxRuntime.jsx(SvgVisionFence, {}),
20263
20264
  },
20264
20265
  {
20265
- type: DataType.DOODLE,
20266
+ type: exports.DataType.DOODLE,
20266
20267
  paramType: RecordTypeEnum.DOODLE,
20267
20268
  label: 'Doodle',
20268
20269
  icon: jsxRuntime.jsx(SvgDoodle, {}),
20269
20270
  },
20270
20271
  ];
20271
20272
  ({
20272
- [DataType.BOUNDARY]: {
20273
+ [exports.DataType.BOUNDARY]: {
20273
20274
  },
20274
- [DataType.OBSTACLE]: {
20275
+ [exports.DataType.OBSTACLE]: {
20275
20276
  },
20276
- [DataType.CHANNEL]: {
20277
+ [exports.DataType.CHANNEL]: {
20277
20278
  },
20278
- [DataType.VISION_OFF]: {
20279
+ [exports.DataType.VISION_OFF]: {
20279
20280
  },
20280
- [DataType.DOODLE]: {
20281
+ [exports.DataType.DOODLE]: {
20281
20282
  },
20282
- [DataType.PATH]: undefined,
20283
- [DataType.ANTENNA]: undefined,
20284
- [DataType.CHARGING_PILE]: undefined,
20283
+ [exports.DataType.PATH]: undefined,
20284
+ [exports.DataType.ANTENNA]: undefined,
20285
+ [exports.DataType.CHARGING_PILE]: undefined,
20285
20286
  });
20286
20287
 
20287
20288
  var css_248z$b = ".ant-modal .ant-modal-body .ant-modal-confirm-title {\n text-align: center;\n}\n.ant-modal .ant-modal-body .ant-modal-confirm-btns {\n margin-top: 24px;\n}\n.ant-modal .ant-modal-body .ant-modal-confirm-btns .ant-btn + .ant-btn {\n margin-left: 24px;\n}\n\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal-title {\n text-align: center;\n padding: 10px 20px 0;\n font-size: 18px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal-header {\n margin-bottom: 24px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal .ant-modal-footer {\n margin-top: 24px;\n}\n.index-module_modal__fkxhn.index-module_center__d461v .ant-modal .ant-modal-footer .ant-btn + .ant-btn {\n margin-left: 24px;\n}";
@@ -20340,7 +20341,7 @@ const DoodleModal = ({ open, onSelect, setOpen, doodleList, centerPoint }) => {
20340
20341
  ],
20341
20342
  currentHistoryIndex: 0,
20342
20343
  createMode: CreateStatus.COMPLETED,
20343
- elementType: DataType.DOODLE,
20344
+ elementType: exports.DataType.DOODLE,
20344
20345
  selectElement: newDoodle,
20345
20346
  isShowDrag: true,
20346
20347
  });
@@ -20397,25 +20398,25 @@ const AddEntry = ({ doodleList, disabledObstacles, editMap }) => {
20397
20398
  const addNewElement = React.useCallback((type, item) => {
20398
20399
  setOpen(false);
20399
20400
  let newElement = null;
20400
- if (type === DataType.BOUNDARY) {
20401
+ if (type === exports.DataType.BOUNDARY) {
20401
20402
  newElement = initBoundary();
20402
20403
  }
20403
- else if (type === DataType.OBSTACLE) {
20404
+ else if (type === exports.DataType.OBSTACLE) {
20404
20405
  newElement = initObstacle();
20405
20406
  }
20406
- else if (type === DataType.CHANNEL) {
20407
+ else if (type === exports.DataType.CHANNEL) {
20407
20408
  newElement = initChannel();
20408
20409
  }
20409
- else if (type === DataType.VISION_OFF) {
20410
+ else if (type === exports.DataType.VISION_OFF) {
20410
20411
  newElement = initVisionOff();
20411
20412
  newElement.points = centerBounds;
20412
20413
  }
20413
- else if (type === DataType.DOODLE) {
20414
+ else if (type === exports.DataType.DOODLE) {
20414
20415
  return setDoodleOpen(true);
20415
20416
  }
20416
20417
  onHandleEnterRecord?.({
20417
20418
  type: item?.paramType,
20418
- function: item?.type === DataType.OBSTACLE ? 0 : undefined,
20419
+ function: item?.type === exports.DataType.OBSTACLE ? 0 : undefined,
20419
20420
  })?.then(() => {
20420
20421
  setEditMapInfo({
20421
20422
  ...editMapInfo,
@@ -20425,7 +20426,7 @@ const AddEntry = ({ doodleList, disabledObstacles, editMap }) => {
20425
20426
  },
20426
20427
  ],
20427
20428
  currentHistoryIndex: 0,
20428
- createMode: type === DataType.VISION_OFF ? CreateStatus.COMPLETED : CreateStatus.CREATING,
20429
+ createMode: type === exports.DataType.VISION_OFF ? CreateStatus.COMPLETED : CreateStatus.CREATING,
20429
20430
  elementType: type,
20430
20431
  selectElement: newElement,
20431
20432
  });
@@ -20435,10 +20436,10 @@ const AddEntry = ({ doodleList, disabledObstacles, editMap }) => {
20435
20436
  }, [centerBounds]);
20436
20437
  const addItems = React.useMemo(() => {
20437
20438
  return DATE_TYPE_MAP?.filter((item) => {
20438
- if (item.type === DataType.OBSTACLE) {
20439
+ if (item.type === exports.DataType.OBSTACLE) {
20439
20440
  return !disabledObstacles;
20440
20441
  }
20441
- return item.type !== DataType.BOUNDARY;
20442
+ return item.type !== exports.DataType.BOUNDARY;
20442
20443
  });
20443
20444
  }, [disabledObstacles]);
20444
20445
  // console.log('addEntry->', editMapInfo, editMap);
@@ -21070,7 +21071,7 @@ const BoundarySvgRender = React.memo(({ mapJson, id, maxWidth = 300 }) => {
21070
21071
  margin: '0 auto',
21071
21072
  }, children: [jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `${boundaryViewBox.x} ${boundaryViewBox.y} ${boundaryViewBox.width} ${boundaryViewBox.height}`, width: `${style.width}px`, height: `${style.height}px`, style: { position: 'absolute', inset: 0, pointerEvents: 'none' }, children: Object.keys(svgElementData)?.map((key) => {
21072
21073
  return svgElementData[key]?.map((element) => {
21073
- if (key === DataType.VISION_OFF)
21074
+ if (key === exports.DataType.VISION_OFF)
21074
21075
  return null;
21075
21076
  return (jsxRuntime.jsx(GElement, { type: key, data: svgElementData[key], children: jsxRuntime.jsx(SvgElement, { type: key, data: element, onSelect: () => { }, onCancel: () => { } }, element.id) }, key));
21076
21077
  });
@@ -21250,6 +21251,8 @@ const TimePeriod = ({ value, onChange }) => {
21250
21251
  onChange({
21251
21252
  ...value,
21252
21253
  status: checked ? 1 : 0,
21254
+ start_timestamp: checked ? value.start_timestamp : 0,
21255
+ end_timestamp: checked ? value.end_timestamp : 0,
21253
21256
  });
21254
21257
  } }) })] }), jsxRuntime.jsx("div", { className: styles$1.timePeriodContent, children: jsxRuntime.jsxs(antd.Radio.Group, { value: radioValue, onChange: (e) => {
21255
21258
  setRadioValue(e.target.value);
@@ -21410,7 +21413,7 @@ const VisionOffInfo = ({ onHandleDelete }) => {
21410
21413
  }, [editMapInfo.selectElement]);
21411
21414
  return (jsxRuntime.jsxs("div", { className: "visionOffInfo", children: [jsxRuntime.jsx(Header, { handleDelete: () => {
21412
21415
  onHandleDelete?.();
21413
- }, handleFocus: () => { }, type: DataType.VISION_OFF }), jsxRuntime.jsx("div", { className: styles$9.border }), jsxRuntime.jsx("div", { className: styles$9.areaInfo, children: jsxRuntime.jsxs("div", { className: styles$9.areaItem, children: [jsxRuntime.jsx("div", { className: styles$9.label, children: "Size:" }), jsxRuntime.jsx("div", { className: styles$9.value, children: sizeValue })] }) })] }));
21416
+ }, handleFocus: () => { }, type: exports.DataType.VISION_OFF }), jsxRuntime.jsx("div", { className: styles$9.border }), jsxRuntime.jsx("div", { className: styles$9.areaInfo, children: jsxRuntime.jsxs("div", { className: styles$9.areaItem, children: [jsxRuntime.jsx("div", { className: styles$9.label, children: "Size:" }), jsxRuntime.jsx("div", { className: styles$9.value, children: sizeValue })] }) })] }));
21414
21417
  };
21415
21418
 
21416
21419
  var _path$2, _path2$1;
@@ -21468,7 +21471,7 @@ const HandleElementInfo = () => {
21468
21471
  return DATE_TYPE_MAP.find((item) => item.type === editMapInfo.elementType);
21469
21472
  }, [editMapInfo.elementType]);
21470
21473
  const isUndoDisabled = React.useMemo(() => {
21471
- if (editMapInfo?.elementType === DataType.OBSTACLE &&
21474
+ if (editMapInfo?.elementType === exports.DataType.OBSTACLE &&
21472
21475
  editMapInfo?.createMode === CreateStatus.CREATING) {
21473
21476
  return !(editMapInfo?.currentHistoryIndex > 0 && editMapInfo?.historyList?.length);
21474
21477
  }
@@ -21508,7 +21511,7 @@ const HandleElementInfo = () => {
21508
21511
  obstacle: undefined,
21509
21512
  boundary: undefined,
21510
21513
  };
21511
- if (element?.type === DataType.DOODLE) {
21514
+ if (element?.type === exports.DataType.DOODLE) {
21512
21515
  const doodleData = {
21513
21516
  center: element.center,
21514
21517
  direction: element.direction,
@@ -21522,8 +21525,8 @@ const HandleElementInfo = () => {
21522
21525
  }
21523
21526
  data.doodle = JSON.stringify([doodleData]);
21524
21527
  }
21525
- if (element?.type === DataType.VISION_OFF) {
21526
- const visionOffArea = svgElementDatas?.[DataType.VISION_OFF]
21528
+ if (element?.type === exports.DataType.VISION_OFF) {
21529
+ const visionOffArea = svgElementDatas?.[exports.DataType.VISION_OFF]
21527
21530
  ?.filter((item) => item.id !== element.id)
21528
21531
  ?.map((item) => ({
21529
21532
  id: item.id,
@@ -21548,10 +21551,10 @@ const HandleElementInfo = () => {
21548
21551
  }) || [];
21549
21552
  data.visionOffAreas = JSON.stringify(visionOffAreaData);
21550
21553
  }
21551
- if (element?.type === DataType.OBSTACLE) {
21554
+ if (element?.type === exports.DataType.OBSTACLE) {
21552
21555
  data.obstacle = {
21553
21556
  name: element?.name,
21554
- status: element?.status || 1,
21557
+ status: element?.status ?? 1,
21555
21558
  end_timestamp: element?.end_timestamp,
21556
21559
  start_timestamp: element?.start_timestamp,
21557
21560
  points: restorePointsFormat(element.points),
@@ -21560,7 +21563,7 @@ const HandleElementInfo = () => {
21560
21563
  data.obstacle.id = element?.id;
21561
21564
  }
21562
21565
  }
21563
- if (element?.type === DataType.BOUNDARY) {
21566
+ if (element?.type === exports.DataType.BOUNDARY) {
21564
21567
  data.boundary = {
21565
21568
  cuttingHeight: element?.cuttingHeight,
21566
21569
  isFlowGlobal: element?.isFlowGlobal,
@@ -21579,9 +21582,9 @@ const HandleElementInfo = () => {
21579
21582
  }, [editMapInfo.selectElement]);
21580
21583
  const handleSave = React.useCallback(() => {
21581
21584
  const params = renderElementData(editMapInfo?.selectElement);
21582
- const isObstacle = editMapInfo?.selectElement?.type === DataType.OBSTACLE;
21585
+ const isObstacle = editMapInfo?.selectElement?.type === exports.DataType.OBSTACLE;
21583
21586
  const hasNotEnoughPoints = params?.obstacle?.points?.length < 3;
21584
- const isDoodle = editMapInfo?.selectElement?.type === DataType.DOODLE;
21587
+ const isDoodle = editMapInfo?.selectElement?.type === exports.DataType.DOODLE;
21585
21588
  const doodleResult = checkDoodle();
21586
21589
  if (isDoodle && !doodleResult?.isValid) {
21587
21590
  antd.message.error('Keep more distance from boundaries, off-limit island and other doodles');
@@ -21592,7 +21595,7 @@ const HandleElementInfo = () => {
21592
21595
  return;
21593
21596
  }
21594
21597
  console.log('save->', editMapInfo, params);
21595
- if (editMapInfo?.selectElement?.type === DataType.BOUNDARY) {
21598
+ if (editMapInfo?.selectElement?.type === exports.DataType.BOUNDARY) {
21596
21599
  onUpdateBoundary?.(params)?.then(() => {
21597
21600
  setEditMapInfo({
21598
21601
  ...editMapInfo,
@@ -21686,7 +21689,7 @@ const HandleElementInfo = () => {
21686
21689
  if (!editMapInfo.selectElement)
21687
21690
  return null;
21688
21691
  console.log('handleElementInfo->', editMapInfo, currentType);
21689
- return (jsxRuntime.jsxs("div", { className: styles$9.handleElementInfo, children: [editMapInfo?.elementType !== DataType.BOUNDARY ? (jsxRuntime.jsxs("div", { className: styles$9.undoAndRedo, children: [jsxRuntime.jsx("div", { className: classNames(styles$9.undo, { [styles$9.disabled]: isUndoDisabled }), onClick: handleUndo, children: jsxRuntime.jsx(SvgUndo, {}) }), jsxRuntime.jsx("div", { className: classNames(styles$9.redo, { [styles$9.disabled]: idRedoDisabled }), onClick: handleRedo, children: jsxRuntime.jsx(SvgRedo, {}) })] })) : null, editMapInfo?.elementType === DataType.BOUNDARY && (jsxRuntime.jsx(BoundaryInfo, { onHandleDelete: handleDelete })), editMapInfo?.elementType === DataType.OBSTACLE && (jsxRuntime.jsx(ObstacleInfo, { onHandleDelete: handleDelete })), editMapInfo?.elementType === DataType.DOODLE && jsxRuntime.jsx(DoodleInfo, { onHandleDelete: handleDelete }), editMapInfo?.elementType === DataType.VISION_OFF && (jsxRuntime.jsx(VisionOffInfo, { onHandleDelete: handleDelete })), jsxRuntime.jsx("div", { className: styles$9.border }), jsxRuntime.jsx("div", { className: styles$9.handle, children: jsxRuntime.jsxs(antd.Space, { size: 12, children: [jsxRuntime.jsx(antd.Button, { variant: "outlined", color: "default", onClick: () => {
21692
+ return (jsxRuntime.jsxs("div", { className: styles$9.handleElementInfo, children: [editMapInfo?.elementType !== exports.DataType.BOUNDARY ? (jsxRuntime.jsxs("div", { className: styles$9.undoAndRedo, children: [jsxRuntime.jsx("div", { className: classNames(styles$9.undo, { [styles$9.disabled]: isUndoDisabled }), onClick: handleUndo, children: jsxRuntime.jsx(SvgUndo, {}) }), jsxRuntime.jsx("div", { className: classNames(styles$9.redo, { [styles$9.disabled]: idRedoDisabled }), onClick: handleRedo, children: jsxRuntime.jsx(SvgRedo, {}) })] })) : null, editMapInfo?.elementType === exports.DataType.BOUNDARY && (jsxRuntime.jsx(BoundaryInfo, { onHandleDelete: handleDelete })), editMapInfo?.elementType === exports.DataType.OBSTACLE && (jsxRuntime.jsx(ObstacleInfo, { onHandleDelete: handleDelete })), editMapInfo?.elementType === exports.DataType.DOODLE && jsxRuntime.jsx(DoodleInfo, { onHandleDelete: handleDelete }), editMapInfo?.elementType === exports.DataType.VISION_OFF && (jsxRuntime.jsx(VisionOffInfo, { onHandleDelete: handleDelete })), jsxRuntime.jsx("div", { className: styles$9.border }), jsxRuntime.jsx("div", { className: styles$9.handle, children: jsxRuntime.jsxs(antd.Space, { size: 12, children: [jsxRuntime.jsx(antd.Button, { variant: "outlined", color: "default", onClick: () => {
21690
21693
  handleCancel();
21691
21694
  }, children: "Cancel" }), jsxRuntime.jsx(antd.Button, { variant: "solid", color: "primary", onClick: handleSave, children: "Save" })] }) })] }));
21692
21695
  };
@@ -21722,7 +21725,7 @@ const Crosshair = () => {
21722
21725
  const isVisible = React.useMemo(() => {
21723
21726
  if (platform === PlatformType.H5 &&
21724
21727
  editMapInfo?.mobileMode === MobileEditMode.CREATE &&
21725
- editMapInfo?.elementType === DataType.OBSTACLE) {
21728
+ editMapInfo?.elementType === exports.DataType.OBSTACLE) {
21726
21729
  return true;
21727
21730
  }
21728
21731
  return false;
@@ -22308,9 +22311,26 @@ modelType, mapRef, mapJson, pathJson, realTimeData, antennaConfig, onMapLoad, on
22308
22311
  });
22309
22312
  MowerMapRenderer.displayName = 'MowerMapRenderer';
22310
22313
 
22314
+ exports.AntennaData = AntennaData;
22315
+ exports.AntennaDataBuilder = AntennaDataBuilder;
22316
+ exports.BaseData = BaseData;
22317
+ exports.BoundaryData = BoundaryData;
22311
22318
  exports.BoundarySvgRender = BoundarySvgRender;
22319
+ exports.ChannelData = ChannelData;
22320
+ exports.ChargingPileData = ChargingPileData;
22321
+ exports.DoodleData = DoodleData;
22312
22322
  exports.MapDataProcessor = MapDataProcessor;
22313
22323
  exports.MowerMapRenderer = MowerMapRenderer;
22324
+ exports.ObstacleData = ObstacleData;
22325
+ exports.PathData = PathData;
22314
22326
  exports.PathDataProcessor = PathDataProcessor;
22327
+ exports.SvgParserNative = SvgParserNative;
22328
+ exports.UnifiedMapDataProcessor = UnifiedMapDataProcessor;
22329
+ exports.VisionOffData = VisionOffData;
22315
22330
  exports.calculateMapGpsCenter = calculateMapGpsCenter;
22316
22331
  exports.estimateGpsFromMapBounds = estimateGpsFromMapBounds;
22332
+ exports.initBoundary = initBoundary;
22333
+ exports.initChannel = initChannel;
22334
+ exports.initDoodle = initDoodle;
22335
+ exports.initObstacle = initObstacle;
22336
+ exports.initVisionOff = initVisionOff;
@@ -3,9 +3,11 @@ export { default as BoundarySvgRender } from './render/BoundarySvgRender';
3
3
  export type { MapConfig, AntennaConfig, MowerPositionConfig, MowerMapRendererProps, MowerMapRendererRef, DragState, DragCallbacks, } from './types/renderer';
4
4
  export type { PathConfig } from './types/processor';
5
5
  export type { EditMapInfo, CreateStatus, MobileEditMode, ElementRecordParams, RecordTypeEnum, RecordFunctionEnum, } from './context/mapEdit';
6
- export type { MapData, SubMap, MapElement, BoundaryData, ObstacleData, VisionOffData, DoodleData, TunnelData, DataType, } from './types';
6
+ export type { MapData, SubMap, MapElement, BoundaryData, ObstacleData, VisionOffData, DoodleData, TunnelData, } from './types';
7
7
  export type { MapBounds, Point } from './types/utils';
8
8
  export { MapDataProcessor, PathDataProcessor } from './processor';
9
9
  export type { PathConfig as DataPathConfig } from './processor';
10
+ export * from './processor';
10
11
  export { calculateMapGpsCenter, estimateGpsFromMapBounds } from './utils/mapBounds';
12
+ export { SvgParserNative } from './utils/svgParserNative';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG1E,YAAY,EACV,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,SAAS,EACT,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,YAAY,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,UAAU,EACV,QAAQ,GACT,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAElE,YAAY,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAGhE,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG1E,YAAY,EACV,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,SAAS,EACT,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,YAAY,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,OAAO,EACP,MAAM,EACN,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,EACV,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAElE,YAAY,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAEhE,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
@@ -2,4 +2,5 @@ export { MapDataProcessor } from './MapDataProcessor';
2
2
  export { PathDataProcessor } from './PathDataProcessor';
3
3
  export type { PathConfig } from '../types/processor';
4
4
  export { AntennaDataBuilder } from './builder/AntennaDataBuilder';
5
+ export * from './unified';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processor/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,cAAc,WAAW,CAAC"}
@@ -2,7 +2,7 @@ import { MapData } from '../types';
2
2
  import React from 'react';
3
3
  interface BoundarySvgRenderProps {
4
4
  mapJson: MapData;
5
- id: string;
5
+ id: number;
6
6
  maxWidth?: number;
7
7
  }
8
8
  declare const BoundarySvgRender: React.MemoExoticComponent<({ mapJson, id, maxWidth }: BoundarySvgRenderProps) => import("react/jsx-runtime").JSX.Element>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/render/svgEditMap/components/HandleElementInfo/components/TimePeriod/index.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC/F;AAED,oBAAY,UAAU;IACpB,SAAS,IAAI;IACb,UAAU,IAAI;CACf;AAED,QAAA,MAAM,UAAU,GAAI,qBAAqB,eAAe,4CAqFvD,CAAC;AACF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/render/svgEditMap/components/HandleElementInfo/components/TimePeriod/index.tsx"],"names":[],"mappings":"AAKA,UAAU,eAAe;IACvB,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC/F;AAED,oBAAY,UAAU;IACpB,SAAS,IAAI;IACb,UAAU,IAAI;CACf;AAED,QAAA,MAAM,UAAU,GAAI,qBAAqB,eAAe,4CAuFvD,CAAC;AACF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"obstacle.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgEditMap/components/HandleElementInfo/obstacle.tsx"],"names":[],"mappings":"AAcA,UAAU,iBAAiB;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,GAAI,oBAAoB,iBAAiB,4CAyF1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"obstacle.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgEditMap/components/HandleElementInfo/obstacle.tsx"],"names":[],"mappings":"AAaA,UAAU,iBAAiB;IACzB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,QAAA,MAAM,YAAY,GAAI,oBAAoB,iBAAiB,4CAyF1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/ChannelElement/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,GAAI,UAAU,mBAAmB,4CAsCpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/render/svgElement/ChannelElement/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,QAAA,MAAM,cAAc,GAAI,UAAU,mBAAmB,4CAoCpD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DoodleTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAejD,UAAU,2BAA2B;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA+gBjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"DoodleTransformWrapper.d.ts","sourceRoot":"","sources":["../../../../../../src/render/svgElement/TransformWrapper/DoodleTransformWrapper/DoodleTransformWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAejD,UAAU,2BAA2B;IACnC,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAghBjE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleet-frontend/mower-maps",
3
- "version": "0.2.0-beta.4",
3
+ "version": "0.2.0-beta.6",
4
4
  "type": "module",
5
5
  "description": "a mower maps in google maps",
6
6
  "main": "dist/index.js",