@ray-js/robot-map-sdk 0.0.6-beta.1 → 0.0.6-beta.2

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.
Files changed (28) hide show
  1. package/dist/index.d.ts +435 -54
  2. package/dist/index.rjs.js +1 -1
  3. package/dist-app/assets/{index-6QJHxb0C.js → index-D4rsJCtD.js} +1 -1
  4. package/dist-app/index.html +1 -1
  5. package/dist-docs/404.html +2 -2
  6. package/dist-docs/assets/{app.BkKV_ucc.js → app.fecMLabA.js} +1 -1
  7. package/dist-docs/assets/chunks/@localSearchIndexroot.SGF3qfon.js +1 -0
  8. package/dist-docs/assets/chunks/{VPLocalSearchBox.BDtfnT2I.js → VPLocalSearchBox.D4f7GV7O.js} +1 -1
  9. package/dist-docs/assets/chunks/{theme.BgDHzlGk.js → theme.WipDw85a.js} +2 -2
  10. package/dist-docs/assets/{guide_getting-started.md.B66M-nsN.js → guide_getting-started.md.BNHtkl3m.js} +1 -1
  11. package/dist-docs/assets/{reference_config.md.CMS6rl81.js → reference_config.md.DsKyNjfM.js} +3 -3
  12. package/dist-docs/assets/reference_config.md.DsKyNjfM.lean.js +1 -0
  13. package/dist-docs/guide/advanced-usage.html +3 -3
  14. package/dist-docs/guide/concepts.html +3 -3
  15. package/dist-docs/guide/getting-started.html +5 -5
  16. package/dist-docs/hashmap.json +1 -1
  17. package/dist-docs/index.html +3 -3
  18. package/dist-docs/reference/callbacks.html +3 -3
  19. package/dist-docs/reference/config.html +6 -6
  20. package/dist-docs/reference/data.html +3 -3
  21. package/dist-docs/reference/methods.html +3 -3
  22. package/dist-docs/reference/runtime.html +3 -3
  23. package/dist-docs/reference/types.html +3 -3
  24. package/dist-docs/reference/utils.html +3 -3
  25. package/package.json +4 -2
  26. package/dist-docs/assets/chunks/@localSearchIndexroot.BlqvVSiD.js +0 -1
  27. package/dist-docs/assets/reference_config.md.CMS6rl81.lean.js +0 -1
  28. /package/dist-docs/assets/{guide_getting-started.md.B66M-nsN.lean.js → guide_getting-started.md.BNHtkl3m.lean.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,23 +1,43 @@
1
1
  import { AnimatedSprite } from 'pixi.js';
2
+ import { AppContainer as AppContainer_2 } from './AppContainer';
2
3
  import { Application } from 'pixi.js';
3
4
  import { ApplicationOptions } from 'pixi.js';
4
5
  import { ColorSource } from 'pixi.js';
5
6
  import { Container } from 'pixi.js';
7
+ import { ControlsConfig as ControlsConfig_2 } from '..';
8
+ import { ControlsManager } from '../managers/ControlsManager';
9
+ import { CustomElementsManager } from '../managers/CustomElementsManager';
6
10
  import { DestroyOptions } from 'pixi.js';
11
+ import { DetectedObjectManager } from '../managers/DetectedObjectManager';
12
+ import { DividerConfig as DividerConfig_2 } from '..';
13
+ import { EditControlManager } from '../managers/EditControlManager';
7
14
  import { Emitter } from 'mitt';
8
15
  import { FederatedPointerEvent } from 'pixi.js';
9
16
  import { Graphics } from 'pixi.js';
17
+ import { HeatmapManager } from '../managers/HeatmapManager';
18
+ import { Interaction } from './Interaction';
19
+ import { MapCallbacks as MapCallbacks_2 } from '..';
10
20
  import { MapData } from '@ray-js/robot-protocol';
11
21
  import { MapHeader } from '@ray-js/robot-protocol';
22
+ import { MapManager } from '../managers/MapManager';
23
+ import { MapState as MapState_2 } from '..';
24
+ import { MeasurementUnit as MeasurementUnit_2 } from '..';
12
25
  import { ParsedRasterMapData as ParsedRasterMapData_2 } from '@ray-js/robot-protocol';
13
26
  import { PathData } from '@ray-js/robot-protocol';
27
+ import { PathManager } from '../managers/PathManager';
14
28
  import { Rectangle } from 'pixi.js';
29
+ import { RingConfig as RingConfig_2 } from '..';
30
+ import { RoomData as RoomData_2 } from '..';
31
+ import { RoomManager } from '../managers/RoomManager';
32
+ import { RuntimeConfig as RuntimeConfig_2 } from '..';
15
33
  import { SPECIAL_ROOM_IDS } from '@ray-js/robot-protocol';
16
34
  import { SpecialRoomId } from '@ray-js/robot-protocol';
17
35
  import { Sprite } from 'pixi.js';
18
36
  import { StructuredMapDataSource } from '@ray-js/robot-protocol';
19
37
  import { TextStyleFontWeight } from 'pixi.js';
20
38
  import { Texture } from 'pixi.js';
39
+ import { Ticker } from 'pixi.js';
40
+ import { ViewportContainer as ViewportContainer_2 } from './ViewportContainer';
21
41
 
22
42
  /**
23
43
  * 地图静态配置
@@ -38,6 +58,10 @@ export declare type AppConfig = {
38
58
  backgroundColor: ColorSource
39
59
  /** 背景透明度 */
40
60
  backgroundAlpha: number
61
+ /** 是否启用高性能模式(强制关闭抗锯齿等) */
62
+ performanceMode: boolean
63
+ /** 渲染分辨率,默认为 window.devicePixelRatio */
64
+ resolution: number
41
65
  /** 是否启用日志输出,默认开发环境开启,生产环境关闭 */
42
66
  enableLogger: boolean
43
67
  }
@@ -437,6 +461,8 @@ export declare type AppConfig = {
437
461
  fitMinScale: number
438
462
  /** 自适应缩放时的最大比例,避免超小地图放太大 */
439
463
  fitMaxScale: number
464
+ /** 是否启用交互 */
465
+ enable: boolean
440
466
  /** 是否启用双击缩放功能 */
441
467
  enableDoubleTapZoom: boolean
442
468
  }
@@ -475,11 +501,12 @@ export declare type AppConfig = {
475
501
  * 管理所有地图相关的层级和组件
476
502
  */
477
503
  declare class AppContainer extends Container {
504
+ private appService;
478
505
  private layers;
479
506
  private mapRotation;
480
507
  private backgroundGraphics;
481
508
  private lastBackgroundState;
482
- constructor();
509
+ constructor(appService: AppService);
483
510
  /**
484
511
  * 初始化所有预定义的层级
485
512
  */
@@ -565,11 +592,339 @@ export declare type AppOptions = {
565
592
  runtime: DeepPartialRuntimeConfig
566
593
  }
567
594
 
595
+ declare class AppService {
596
+ private app;
597
+ constructor(app: MapApplication);
598
+ getApp(): MapApplication;
599
+ getConfig(): AppConfig;
600
+ /**
601
+ * 获取调试模式
602
+ * @returns 是否为调试模式
603
+ */
604
+ getDebuggerMode(): boolean;
605
+ getRoomData(roomId: number): RoomData_2 | undefined;
606
+ /**
607
+ * 将米转换为像素(委托给 MapApplication)
608
+ */
609
+ metersToPixels(meters: number): number;
610
+ /**
611
+ * 将像素转换为米(委托给 MapApplication)
612
+ */
613
+ pixelsToMeters(pixels: number): number;
614
+ /**
615
+ * 将米转换为配置的单位
616
+ * @param meters - 米数值
617
+ * @returns 转换后的数值
618
+ */
619
+ metersToDisplayUnit(meters: number): number;
620
+ get ticker(): Ticker;
621
+ get mapState(): MapState_2 | null;
622
+ get isMapDrawn(): boolean;
623
+ get gloalConfig(): {
624
+ containerTop: string;
625
+ containerLeft: string;
626
+ containerWidth: string;
627
+ containerHeight: string;
628
+ backgroundColor: ColorSource;
629
+ backgroundAlpha: number;
630
+ performanceMode: boolean;
631
+ resolution: number;
632
+ enableLogger: boolean;
633
+ };
634
+ get mapConfig(): {
635
+ autoPaddingVerticalPercent: number;
636
+ autoPaddingHorizontalPercent: number;
637
+ adjacencyThreshold: number;
638
+ originChangeAutoFitThreshold: number;
639
+ sizeChangeAutoFitThreshold: number;
640
+ obstacleColor: ColorSource;
641
+ freeColor: ColorSource;
642
+ };
643
+ get roomConfig(): {
644
+ colors: {
645
+ sortBy: "index" | "area";
646
+ strategy: "priority" | "balanced";
647
+ active: string[];
648
+ inactive: string[];
649
+ name: string[];
650
+ propertyTheme: string[];
651
+ selectionIndicatorBackground: string[];
652
+ selectionIndicatorIcon: string[];
653
+ NO_ROOM_DATA: string;
654
+ ROOM_GAP: string;
655
+ OBSTACLE_ROOM: string;
656
+ UNKNOWN_ROOM: string;
657
+ };
658
+ nameLabel: {
659
+ fontSize: number;
660
+ fontFamily: string;
661
+ fontWeight: TextStyleFontWeight;
662
+ };
663
+ property: {
664
+ displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
665
+ iconWidth: number;
666
+ iconHeight: number;
667
+ foldable: boolean;
668
+ offsetX: number;
669
+ offsetY: number;
670
+ iconGap: number;
671
+ container: {
672
+ backgroundColor: ColorSource;
673
+ paddingVertical: number;
674
+ paddingHorizontal: number;
675
+ borderRadius: number;
676
+ tailHeight: number;
677
+ tailWidth: number;
678
+ };
679
+ suction: {
680
+ assets: string[];
681
+ };
682
+ cistern: {
683
+ assets: string[];
684
+ };
685
+ cleanMode: {
686
+ assets: string[];
687
+ };
688
+ cleanTimes: {
689
+ assets: string[];
690
+ };
691
+ cleanOrder: {
692
+ color: ColorSource | "auto";
693
+ fontFamily: string;
694
+ fontWeight: TextStyleFontWeight;
695
+ fontSize: number;
696
+ gapRight: number;
697
+ };
698
+ customAssets?: Record<string, string[]>;
699
+ };
700
+ selectionIndicator: {
701
+ iconSrc: string;
702
+ iconWidth: number;
703
+ iconHeight: number;
704
+ containerWidth: number;
705
+ containerHeight: number;
706
+ strokeWidth: number;
707
+ strokeColor: ColorSource | "auto";
708
+ borderRadius: number;
709
+ offsetX: number;
710
+ offsetY: number;
711
+ tailHeight: number;
712
+ tailWidth: number;
713
+ };
714
+ floorType: {
715
+ assets: string[];
716
+ opacity: number;
717
+ scale: number;
718
+ };
719
+ enableElasticScale: boolean;
720
+ elasticMinScale: number;
721
+ elasticMaxScale: number;
722
+ };
723
+ get heatMapConfig(): {
724
+ cellSize: number;
725
+ maxDistance: number;
726
+ smoothIterations: number;
727
+ heatmapAlpha: number;
728
+ useGradient: boolean;
729
+ colorGradients: [ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource];
730
+ };
731
+ get pathConfig(): {
732
+ lineWidthFixed: boolean;
733
+ incrementalThreshold: number;
734
+ commonPath: {
735
+ visible: boolean;
736
+ color: ColorSource;
737
+ width: number;
738
+ };
739
+ transitionPath: {
740
+ visible: boolean;
741
+ color: ColorSource;
742
+ width: number;
743
+ };
744
+ chargePath: {
745
+ visible: boolean;
746
+ color: ColorSource;
747
+ width: number;
748
+ };
749
+ };
750
+ get carpetConfig(): {
751
+ src: string;
752
+ opacity: number;
753
+ scale: number;
754
+ material?: {
755
+ type: number;
756
+ src: string;
757
+ opacity: number;
758
+ scale: number;
759
+ }[];
760
+ enableEdit?: boolean;
761
+ };
762
+ get robotConfig(): {
763
+ icon: {
764
+ sizeFixed: boolean;
765
+ width: number;
766
+ height: number;
767
+ src: string;
768
+ };
769
+ speed: number;
770
+ rotationCorrection: number;
771
+ sleepAnimation: {
772
+ jsonSrc: string;
773
+ imageSrc: string;
774
+ framePrefix: string;
775
+ width: number;
776
+ height: number;
777
+ sizeFixed: boolean;
778
+ frameCount: number;
779
+ offsetX: number;
780
+ offsetY: number;
781
+ };
782
+ pulseCircle: {
783
+ size: number;
784
+ color: ColorSource;
785
+ strokeWidth: number;
786
+ strokeColor: ColorSource;
787
+ duration: number;
788
+ sizeFixed: boolean;
789
+ minScale: number;
790
+ maxScale: number;
791
+ minAlpha: number;
792
+ maxAlpha: number;
793
+ };
794
+ ring: RingConfig_2;
795
+ };
796
+ get chargingStationConfig(): {
797
+ icon: {
798
+ sizeFixed: boolean;
799
+ width: number;
800
+ height: number;
801
+ src: string;
802
+ };
803
+ rotationCorrection: number;
804
+ ring: RingConfig_2;
805
+ };
806
+ get interactionConfig(): {
807
+ zoomRange: {
808
+ min: number;
809
+ max: number;
810
+ };
811
+ fitMinScale: number;
812
+ fitMaxScale: number;
813
+ enable: boolean;
814
+ enableDoubleTapZoom: boolean;
815
+ };
816
+ get controlsConfig(): ControlsConfig_2;
817
+ get dividerConfig(): DividerConfig_2;
818
+ get detectedObjectConfig(): {
819
+ height: number;
820
+ width: number;
821
+ interactive: boolean;
822
+ };
823
+ get snapshotConfig(): {
824
+ format: "png" | "jpg" | "webp";
825
+ quality: number;
826
+ antialias: boolean;
827
+ resolution: number;
828
+ };
829
+ get appContainer(): AppContainer_2;
830
+ get interaction(): Interaction;
831
+ get viewportContainer(): ViewportContainer_2;
832
+ get mapManager(): MapManager;
833
+ get pathManager(): PathManager;
834
+ get heatmapManager(): HeatmapManager;
835
+ get controlsManager(): ControlsManager;
836
+ get detectedObjectManager(): DetectedObjectManager;
837
+ get customElementsManager(): CustomElementsManager;
838
+ get roomsManager(): RoomManager;
839
+ get editControlManager(): EditControlManager;
840
+ get runtime(): RuntimeConfig_2;
841
+ get runtimeSnapshot(): {
842
+ readonly dividingRoomId: number;
843
+ readonly enableRoomSelection: boolean;
844
+ readonly enableInteraction: boolean;
845
+ readonly enableMapClickCapture: boolean;
846
+ readonly editingForbiddenSweepZoneIds: readonly string[];
847
+ readonly editingForbiddenMopZoneIds: readonly string[];
848
+ readonly editingCleanZoneIds: readonly string[];
849
+ readonly editingVirtualWallIds: readonly string[];
850
+ readonly editingSpotIds: readonly string[];
851
+ readonly editingWayPointIds: readonly string[];
852
+ readonly editingCarpetIds: readonly string[];
853
+ readonly mapRotation: number;
854
+ readonly roomPropertyFoldIds: readonly number[];
855
+ readonly roomSelectionMode: "checkmark" | "order";
856
+ readonly showRoomName: boolean;
857
+ readonly unit: MeasurementUnit_2;
858
+ readonly unitLabel: string;
859
+ readonly showRoomProperty: boolean;
860
+ readonly showRoomOrder: boolean;
861
+ readonly showPath: boolean;
862
+ readonly showRobot: boolean;
863
+ readonly showChargingStation: boolean;
864
+ readonly showRoomFloorType: boolean;
865
+ readonly showCarpet: boolean;
866
+ readonly selectRoomIds: readonly number[];
867
+ readonly showChargingStationRing: boolean;
868
+ readonly showRobotRing: boolean;
869
+ readonly showRobotSleepAnimation: boolean;
870
+ readonly showRobotPulseCircle: boolean;
871
+ readonly selectedCarpetIds: readonly string[];
872
+ };
873
+ /**
874
+ * 检查是否启用交互
875
+ * 供其他组件使用,用于判断是否应该响应交互事件
876
+ * @returns 是否启用交互
877
+ */
878
+ isInteractionEnabled(): boolean;
879
+ get events(): MapCallbacks_2 | undefined;
880
+ get baseScale(): number;
881
+ get currentScale(): number;
882
+ get emitter(): Emitter< {
883
+ antiScale: number;
884
+ gestureHijackStart: FederatedPointerEvent;
885
+ gestureHijackPointerMove: FederatedPointerEvent;
886
+ gestureHijackPointerUp: FederatedPointerEvent;
887
+ gestureHijackCancel: void;
888
+ gestureHijackEnd: void;
889
+ suppressMapClick: void;
890
+ robotPositionUpdate: {
891
+ x: number;
892
+ y: number;
893
+ pathType?: string;
894
+ };
895
+ robotAnimationComplete: void;
896
+ pathSegmentComplete: {
897
+ fromX: number;
898
+ fromY: number;
899
+ toX: number;
900
+ toY: number;
901
+ pathType?: string;
902
+ };
903
+ }>;
904
+ /**
905
+ * 获取充电桩位置(机器坐标系)
906
+ * @returns 充电桩位置坐标,如果地图未初始化则返回 null
907
+ */
908
+ getChargerPosition(): {
909
+ x: number;
910
+ y: number;
911
+ } | null;
912
+ /**
913
+ * 获取机器人当前位置(机器坐标系)
914
+ * @returns 机器人位置坐标,如果路径未绘制或机器人位置不可用则返回 null
915
+ */
916
+ getRobotPosition(): {
917
+ x: number;
918
+ y: number;
919
+ } | null;
920
+ }
921
+
568
922
  declare abstract class BaseControlButton<T extends BaseControlButtonOptions = BaseControlButtonOptions> extends FixedSizeContainer {
923
+ protected appService: AppService;
569
924
  protected background: Graphics;
570
925
  protected icon: EnhancedSprite;
571
926
  protected options: T;
572
- constructor(options: T);
927
+ constructor(appService: AppService, options: T);
573
928
  /**
574
929
  * 抽象方法:子类需要实现具体的事件监听逻辑
575
930
  */
@@ -692,9 +1047,10 @@ export declare type Bounds = {
692
1047
  }
693
1048
 
694
1049
  declare class Carpet extends Container {
1050
+ private appService;
695
1051
  private carpetSprite;
696
1052
  private carpetMask;
697
- constructor();
1053
+ constructor(appService: AppService);
698
1054
  /**
699
1055
  * 创建地毯纹理覆盖(栅格数据)
700
1056
  * @param carpetPixels 地毯像素数据
@@ -738,22 +1094,25 @@ export declare type CarpetConfig = BaseZoneConfig & {
738
1094
  }
739
1095
 
740
1096
  declare type CarpetOptions = {
1097
+ appService: AppService;
741
1098
  carpetData: CustomCarpetParam;
742
1099
  textureMap: Map<number, Texture>;
743
1100
  events?: CustomCarpetEvents;
744
1101
  };
745
1102
 
746
1103
  declare class ChargingStation extends Container {
1104
+ private appService;
747
1105
  chargingStation: ChargingStationIcon;
748
1106
  ring: Ring;
749
1107
  private unsubscribeFns;
750
- constructor();
1108
+ constructor(appService: AppService);
751
1109
  draw({ x, y, rotation }: IconPoint): Promise<void>;
752
1110
  destroy(): void;
753
1111
  }
754
1112
 
755
1113
  declare class ChargingStationIcon extends EnhancedSprite {
756
- constructor();
1114
+ protected appService: AppService;
1115
+ constructor(appService: AppService);
757
1116
  initializeSprite(): Promise<void>;
758
1117
  draw({ x, y, rotation }: IconPoint): Promise<void>;
759
1118
  }
@@ -768,7 +1127,7 @@ export declare type ComponentPropsApp = {
768
1127
  declare type Components = {
769
1128
  viewportContainer: ViewportContainer;
770
1129
  appContainer: AppContainer;
771
- interaction: Interaction;
1130
+ interaction: Interaction_2;
772
1131
  };
773
1132
 
774
1133
  /**
@@ -820,7 +1179,8 @@ export declare type ControlsConfig = {
820
1179
  wayPoint: WayPointConfig
821
1180
  }
822
1181
 
823
- declare class ControlsManager {
1182
+ declare class ControlsManager_2 {
1183
+ private appService;
824
1184
  private forbiddenSweepZoneMap;
825
1185
  private forbiddenMopZoneMap;
826
1186
  private cleanZoneMap;
@@ -829,7 +1189,7 @@ declare class ControlsManager {
829
1189
  private wayPointMap;
830
1190
  private divider;
831
1191
  private unsubscribeFns;
832
- constructor();
1192
+ constructor(appService: AppService);
833
1193
  /**
834
1194
  * 根据地图原点更新所有区域位置
835
1195
  */
@@ -1039,6 +1399,7 @@ declare class CustomCarpet extends Container {
1039
1399
  private carpetConfig;
1040
1400
  private controlsConfig;
1041
1401
  private carpetEvents;
1402
+ private appService;
1042
1403
  private controlFill;
1043
1404
  private editControlLayer;
1044
1405
  private clickHandler;
@@ -1134,13 +1495,7 @@ declare class CustomCarpet extends Container {
1134
1495
  * 处理拖拽移动
1135
1496
  */
1136
1497
  private handleDragMove;
1137
- /**
1138
- * 处理拖拽结束
1139
- */
1140
1498
  private handleDragEnd;
1141
- /**
1142
- * 处理移动开始
1143
- */
1144
1499
  private handleMoveStart;
1145
1500
  /**
1146
1501
  * 处理移动过程
@@ -1231,12 +1586,13 @@ declare type CustomCarpetEvents = {
1231
1586
  };
1232
1587
 
1233
1588
  declare class CustomCarpetManager {
1589
+ private appService;
1234
1590
  private customCarpetMap;
1235
1591
  private unsubscribeFns;
1236
1592
  private textureMap;
1237
1593
  private texturesLoaded;
1238
1594
  private texturesLoadingPromise;
1239
- constructor();
1595
+ constructor(appService: AppService);
1240
1596
  /**
1241
1597
  * 加载材质纹理
1242
1598
  * 如果已经加载过,直接返回已完成的 Promise
@@ -1318,11 +1674,12 @@ export declare type CustomElementParam =
1318
1674
  | GifCustomElementParam
1319
1675
  | HtmlCustomElementParam
1320
1676
 
1321
- declare class CustomElementsManager {
1677
+ declare class CustomElementsManager_2 {
1678
+ private appService;
1322
1679
  private customElementsMap;
1323
1680
  private gifTicker;
1324
1681
  private gifElements;
1325
- constructor();
1682
+ constructor(appService: AppService);
1326
1683
  /**
1327
1684
  * 根据地图原点更新所有自定义元素位置
1328
1685
  */
@@ -1398,8 +1755,10 @@ export declare type DeepPartialAppConfig = DeepPartial<AppConfig>
1398
1755
  /** 深度可选的运行时配置类型 */
1399
1756
  export declare type DeepPartialRuntimeConfig = DeepPartial<RuntimeConfig>
1400
1757
 
1401
- declare class DetectedObjectManager {
1758
+ declare class DetectedObjectManager_2 {
1759
+ private appService;
1402
1760
  private detectedObjectMap;
1761
+ constructor(appService: AppService);
1403
1762
  /**
1404
1763
  * 根据地图原点更新所有检测物体位置
1405
1764
  */
@@ -1523,6 +1882,7 @@ declare type EditControlEvents = {
1523
1882
  * 统一管理编辑状态下的控制按钮、轮廓边框、移动延长线和尺寸文本
1524
1883
  */
1525
1884
  declare class EditControlLayer extends Container {
1885
+ private appService;
1526
1886
  private config;
1527
1887
  private events;
1528
1888
  private zonePoints;
@@ -1545,7 +1905,7 @@ declare class EditControlLayer extends Container {
1545
1905
  private verticalScaleInitialPosition;
1546
1906
  private clickHandler;
1547
1907
  private throttledUpdateOutline;
1548
- constructor(options: EditControlLayerOptions);
1908
+ constructor(appService: AppService, options: EditControlLayerOptions);
1549
1909
  /**
1550
1910
  * 初始化组件
1551
1911
  */
@@ -1766,9 +2126,10 @@ declare type EditControlLayerOptions = {
1766
2126
  * 编辑控制管理器
1767
2127
  * 统一管理所有编辑控制层,将它们放在最顶层以确保始终可见
1768
2128
  */
1769
- declare class EditControlManager {
2129
+ declare class EditControlManager_2 {
2130
+ private appService;
1770
2131
  private editControlLayers;
1771
- constructor();
2132
+ constructor(appService: AppService);
1772
2133
  /**
1773
2134
  * 注册编辑控制层
1774
2135
  * @param id 组件唯一标识(如 Zone ID、Carpet ID)
@@ -1832,6 +2193,7 @@ declare class EditControlManager {
1832
2193
  * 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
1833
2194
  */
1834
2195
  declare class EnhancedAnimatedSprite extends AnimatedSprite {
2196
+ protected appService: AppService;
1835
2197
  private throttledUpdateScale;
1836
2198
  private fixedWidth;
1837
2199
  private fixedHeight;
@@ -1840,7 +2202,7 @@ declare class EnhancedAnimatedSprite extends AnimatedSprite {
1840
2202
  private baselineScale;
1841
2203
  private static animationTicker;
1842
2204
  private static animatedSprites;
1843
- constructor(textures?: Texture[]);
2205
+ constructor(appService: AppService, textures?: Texture[]);
1844
2206
  /**
1845
2207
  * 设置固定的屏幕像素大小
1846
2208
  * @param width 屏幕上显示的固定宽度(像素)
@@ -1951,13 +2313,14 @@ declare class EnhancedAnimatedSprite extends AnimatedSprite {
1951
2313
  * 2. sizeFixed: false - 以地图scale=1为基准,跟随地图缩放
1952
2314
  */
1953
2315
  declare class EnhancedSprite extends Sprite {
2316
+ protected appService: AppService;
1954
2317
  private throttledUpdateScale;
1955
2318
  private fixedWidth;
1956
2319
  private fixedHeight;
1957
2320
  private isFixedSizeSet;
1958
2321
  private sizeFixed;
1959
2322
  private baselineScale;
1960
- constructor(texture?: Texture);
2323
+ constructor(appService: AppService, texture?: Texture);
1961
2324
  /**
1962
2325
  * 设置固定的屏幕像素大小
1963
2326
  * @param width 屏幕上显示的固定宽度(像素)
@@ -2032,8 +2395,9 @@ declare class EnhancedSprite extends Sprite {
2032
2395
  * 用于创建在地图缩放时保持固定视觉大小的元素
2033
2396
  */
2034
2397
  declare class FixedSizeContainer extends Container {
2398
+ protected appService: AppService;
2035
2399
  private throttledUpdateScale;
2036
- constructor();
2400
+ constructor(appService: AppService);
2037
2401
  /**
2038
2402
  * 注册缩放事件监听
2039
2403
  */
@@ -2053,7 +2417,8 @@ declare class FixedSizeContainer extends Container {
2053
2417
  }
2054
2418
 
2055
2419
  declare class Free extends Graphics {
2056
- constructor();
2420
+ private appService;
2421
+ constructor(appService: AppService);
2057
2422
  /**
2058
2423
  * 绘制结构化自由区域数据
2059
2424
  * @param free 自由区域数据数组
@@ -2080,9 +2445,10 @@ export declare type GifCustomElementParam = BaseCustomElementParam & {
2080
2445
  }
2081
2446
 
2082
2447
  declare class Heatmap extends Container {
2448
+ private appService;
2083
2449
  colorGradients: Array<string>;
2084
2450
  cellSize: number;
2085
- constructor();
2451
+ constructor(appService: AppService);
2086
2452
  /**
2087
2453
  * 绘制热力图
2088
2454
  * @param grid 处理好的热力数据 每个网格的信号强度 和 坐标
@@ -2124,7 +2490,8 @@ declare class Heatmap extends Container {
2124
2490
  destroy(): void;
2125
2491
  }
2126
2492
 
2127
- declare class HeatmapManager {
2493
+ declare class HeatmapManager_2 {
2494
+ private appService;
2128
2495
  heatmap: Heatmap;
2129
2496
  pointsTopLeftOrigin: HeatmapPoint[];
2130
2497
  signalGrid: Array<Array<{
@@ -2139,7 +2506,7 @@ declare class HeatmapManager {
2139
2506
  heatmapAlpha: number;
2140
2507
  isHeatmapDrawn: boolean;
2141
2508
  private loadTimer;
2142
- constructor();
2509
+ constructor(appService: AppService);
2143
2510
  /**
2144
2511
  * 绘制热力图
2145
2512
  * @param mapData 地图数据
@@ -2242,7 +2609,8 @@ export declare type ImageCustomElementParam = BaseCustomElementParam & {
2242
2609
 
2243
2610
  /* Excluded from this release type: InstanceEvents */
2244
2611
 
2245
- declare class Interaction extends Container {
2612
+ declare class Interaction_2 extends Container {
2613
+ private appService;
2246
2614
  dragStart: {
2247
2615
  x: number;
2248
2616
  y: number;
@@ -2312,7 +2680,7 @@ declare class Interaction extends Container {
2312
2680
  private interactionState;
2313
2681
  private throttledAntiScale;
2314
2682
  private unsubscribeEnableInteraction;
2315
- constructor();
2683
+ constructor(appService: AppService);
2316
2684
  /**
2317
2685
  * 更新交互模式
2318
2686
  * @param enabled 是否启用交互
@@ -2403,15 +2771,15 @@ declare const LAYERS: string[];
2403
2771
 
2404
2772
  /** 管理器类型定义 */
2405
2773
  declare type Managers = {
2406
- mapManager: MapManager;
2407
- heatmapManager: HeatmapManager;
2408
- pathManager: PathManager;
2409
- controlsManager: ControlsManager;
2410
- detectedObjectManager: DetectedObjectManager;
2411
- customElementsManager: CustomElementsManager;
2412
- roomsManager: RoomManager;
2774
+ mapManager: MapManager_2;
2775
+ heatmapManager: HeatmapManager_2;
2776
+ pathManager: PathManager_2;
2777
+ controlsManager: ControlsManager_2;
2778
+ detectedObjectManager: DetectedObjectManager_2;
2779
+ customElementsManager: CustomElementsManager_2;
2780
+ roomsManager: RoomManager_2;
2413
2781
  customCarpetManager: CustomCarpetManager;
2414
- editControlManager: EditControlManager;
2782
+ editControlManager: EditControlManager_2;
2415
2783
  };
2416
2784
 
2417
2785
  export declare const MAP_API_METHODS: readonly ["areRoomsAdjacent", "getForbiddenSweepZones", "getForbiddenMopZones", "getCleanZones", "getVirtualWalls", "getSpots", "getWayPoints", "getViewportCenterPoint", "getMapCenterPoint", "getWallPointsByViewportCenter", "getForbiddenSweepZonePointsByViewportCenter", "getForbiddenMopZonePointsByViewportCenter", "getCleanZonePointsByViewportCenter", "getSpotPointByViewportCenter", "getEffectiveDividerPoints", "getDividerEndPoints", "isNearChargerOrRobot", "isPointInAnyRoom", "isWallIntersectsAnyRoom", "isZoneIntersectsAnyRoom", "resetPanZoom", "snapshot", "snapshotByData", "getCustomCarpets", "forceEndGesture"];
@@ -2703,6 +3071,7 @@ declare class MapApplication extends Application implements MapApi {
2703
3071
  /* Excluded from this release type: managers */
2704
3072
  /* Excluded from this release type: config */
2705
3073
  /* Excluded from this release type: runtime */
3074
+ /* Excluded from this release type: appService */
2706
3075
  /* Excluded from this release type: scaleMin */
2707
3076
  /* Excluded from this release type: scaleMax */
2708
3077
  /* Excluded from this release type: events */
@@ -3548,7 +3917,8 @@ export declare type MapDataSource = {
3548
3917
  version: string
3549
3918
  }
3550
3919
 
3551
- declare class MapManager {
3920
+ declare class MapManager_2 {
3921
+ private appService;
3552
3922
  obstacle: Obstacle;
3553
3923
  free: Free;
3554
3924
  roomFill: RoomFill;
@@ -3564,7 +3934,7 @@ declare class MapManager {
3564
3934
  private fourColorCache;
3565
3935
  private carpetData;
3566
3936
  private unsubscribeFns;
3567
- constructor();
3937
+ constructor(appService: AppService);
3568
3938
  /**
3569
3939
  * 处理结构化地图数据(房间形状、障碍物等)
3570
3940
  */
@@ -3727,9 +4097,10 @@ export declare type MapType = 'structured' | 'raster'
3727
4097
  export declare type MeasurementUnit = 'meter' | 'feet' | 'centimeter'
3728
4098
 
3729
4099
  declare class MoveControlButton extends BaseControlButton<MoveControlButtonOptions> {
4100
+ protected appService: AppService;
3730
4101
  private isMoving;
3731
4102
  private dragStartPosition;
3732
- constructor(options: MoveControlButtonOptions);
4103
+ constructor(appService: AppService, options: MoveControlButtonOptions);
3733
4104
  /**
3734
4105
  * 设置移动事件监听
3735
4106
  */
@@ -3787,7 +4158,8 @@ declare type MoveControlButtonOptions = BaseControlButtonOptions & {
3787
4158
  };
3788
4159
 
3789
4160
  declare class Obstacle extends Graphics {
3790
- constructor();
4161
+ private appService;
4162
+ constructor(appService: AppService);
3791
4163
  /**
3792
4164
  * 绘制结构化障碍物数据
3793
4165
  * @param obstacles 障碍物数据数组
@@ -3840,6 +4212,7 @@ export declare type ParsedRasterMapData = {
3840
4212
  }
3841
4213
 
3842
4214
  declare class Path extends Container {
4215
+ private appService;
3843
4216
  private commonPath;
3844
4217
  private chargePath;
3845
4218
  private transitionsPath;
@@ -3851,7 +4224,7 @@ declare class Path extends Container {
3851
4224
  private isRealTimeDrawing;
3852
4225
  private throttledUpdateLineWidth;
3853
4226
  private throttledHandleRobotPosition;
3854
- constructor();
4227
+ constructor(appService: AppService);
3855
4228
  /**
3856
4229
  * 注册事件监听
3857
4230
  */
@@ -3921,12 +4294,13 @@ declare class Path extends Container {
3921
4294
  }): void;
3922
4295
  }
3923
4296
 
3924
- declare class PathManager {
4297
+ declare class PathManager_2 {
4298
+ private appService;
3925
4299
  path: Path;
3926
4300
  robot: Robot;
3927
4301
  private unsubscribeFns;
3928
4302
  private lastDrawnPathData;
3929
- constructor();
4303
+ constructor(appService: AppService);
3930
4304
  /**
3931
4305
  * 绘制路径和机器人
3932
4306
  */
@@ -4011,10 +4385,11 @@ export declare type ProcessedRasterData = {
4011
4385
  }
4012
4386
 
4013
4387
  declare class PulseCircle extends Graphics {
4388
+ private appService;
4014
4389
  private currentPosition;
4015
4390
  private animationStartTime;
4016
4391
  private isAnimating;
4017
- constructor();
4392
+ constructor(appService: AppService);
4018
4393
  /**
4019
4394
  * 设置反向缩放监听,保持描边宽度固定
4020
4395
  */
@@ -4075,9 +4450,10 @@ export declare type RasterRoomData = {
4075
4450
  }
4076
4451
 
4077
4452
  declare class Ring extends Graphics {
4453
+ private appService;
4078
4454
  private currentPosition;
4079
4455
  private config;
4080
- constructor(options: RingOptions);
4456
+ constructor(appService: AppService, options: RingOptions);
4081
4457
  /**
4082
4458
  * 设置反向缩放监听,保持描边宽度固定
4083
4459
  */
@@ -4126,6 +4502,7 @@ declare type RingOptions = {
4126
4502
  };
4127
4503
 
4128
4504
  declare class Robot extends Container {
4505
+ private appService;
4129
4506
  robot: RobotIcon;
4130
4507
  ring: Ring;
4131
4508
  pulseCircle: PulseCircle;
@@ -4139,7 +4516,7 @@ declare class Robot extends Container {
4139
4516
  private currentPathType;
4140
4517
  private lastUpdateTime;
4141
4518
  private isCleared;
4142
- constructor();
4519
+ constructor(appService: AppService);
4143
4520
  /**
4144
4521
  * 异步初始化睡眠动画
4145
4522
  */
@@ -4205,7 +4582,8 @@ declare class Robot extends Container {
4205
4582
  }
4206
4583
 
4207
4584
  declare class RobotIcon extends EnhancedSprite {
4208
- constructor();
4585
+ protected appService: AppService;
4586
+ constructor(appService: AppService);
4209
4587
  initializeSprite(): Promise<void>;
4210
4588
  draw({ x, y, rotation }: IconPoint): Promise<void>;
4211
4589
  }
@@ -4253,13 +4631,14 @@ export declare type RoomData = RoomProperty & {
4253
4631
  }
4254
4632
 
4255
4633
  declare class RoomFill extends Container {
4634
+ private appService;
4256
4635
  private roomGraphicsMap;
4257
4636
  private roomContextMap;
4258
4637
  private roomClickHandlerMap;
4259
4638
  private unsubscribeFns;
4260
4639
  private mapWidth;
4261
4640
  private rasterRoomDataMap;
4262
- constructor();
4641
+ constructor(appService: AppService);
4263
4642
  /**
4264
4643
  * 绘制结构化协议地图房间
4265
4644
  * @param rooms 房间数据
@@ -4360,13 +4739,14 @@ declare class RoomFill extends Container {
4360
4739
  destroy(): void;
4361
4740
  }
4362
4741
 
4363
- declare class RoomManager {
4742
+ declare class RoomManager_2 {
4743
+ private appService;
4364
4744
  private unsubscribeFns;
4365
4745
  private roomInfoContainer;
4366
4746
  private roomInfoMap;
4367
4747
  private roomDisplayMap;
4368
4748
  private roomFloorType;
4369
- constructor();
4749
+ constructor(appService: AppService);
4370
4750
  /**
4371
4751
  * 设置房间属性数据(房间名称、清洁模式等)
4372
4752
  * 一次性获取并存储所有必要的显示数据
@@ -4543,15 +4923,16 @@ export declare type RuntimeConfig = {
4543
4923
  * 基于 FixedSizeAnimatedSprite,显示机器人睡眠状态的动画效果
4544
4924
  */
4545
4925
  declare class SleepAnimation extends EnhancedAnimatedSprite {
4926
+ protected appService: AppService;
4546
4927
  private unsubscribeFns;
4547
4928
  private throttledUpdateOffset;
4548
4929
  private fixedOffsetX;
4549
4930
  private fixedOffsetY;
4550
- constructor(textures: Texture[]);
4931
+ constructor(appService: AppService, textures: Texture[]);
4551
4932
  /**
4552
4933
  * 静态创建方法
4553
4934
  */
4554
- static create(): Promise<SleepAnimation>;
4935
+ static create(appService: AppService): Promise<SleepAnimation>;
4555
4936
  /**
4556
4937
  * 初始化睡眠动画
4557
4938
  */