@ray-js/robot-map-sdk 0.0.3-beta-23 → 0.0.3-beta-24
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.d.ts +1 -311
- package/dist/index.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist-docs/404.html +2 -2
- package/dist-docs/assets/{app.DKcv5ocC.js → app.DKtY-QgA.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.Ck3G2TnR.js +1 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.Ry2KicD5.js → VPLocalSearchBox.Is_bIGtF.js} +1 -1
- package/dist-docs/assets/chunks/{theme.D-vPQmyU.js → theme.CoICOtg5.js} +2 -2
- package/dist-docs/assets/{guide_advanced-usage.md.BquC67D7.js → guide_advanced-usage.md.BrZgx45A.js} +3 -1
- package/dist-docs/assets/{guide_advanced-usage.md.BquC67D7.lean.js → guide_advanced-usage.md.BrZgx45A.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.zACqR2O5.js → guide_getting-started.md.Cip1vgx6.js} +1 -1
- package/dist-docs/assets/reference_config.md.CfEp0H9c.js +61 -0
- package/dist-docs/assets/reference_config.md.CfEp0H9c.lean.js +1 -0
- package/dist-docs/guide/advanced-usage.html +7 -5
- package/dist-docs/guide/concepts.html +3 -3
- package/dist-docs/guide/getting-started.html +5 -5
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +3 -3
- package/dist-docs/reference/callbacks.html +3 -3
- package/dist-docs/reference/config.html +14 -8
- package/dist-docs/reference/data.html +3 -3
- package/dist-docs/reference/methods.html +3 -3
- package/dist-docs/reference/runtime.html +3 -3
- package/dist-docs/reference/types.html +3 -3
- package/dist-docs/reference/utils.html +3 -3
- package/package.json +1 -1
- package/dist/application/AppContainer.js +0 -1
- package/dist/application/AppService.js +0 -1
- package/dist/application/Interaction.js +0 -1
- package/dist/application/MapApplication.js +0 -1
- package/dist/application/ViewportContainer.js +0 -1
- package/dist/assets/carpet.png.js +0 -1
- package/dist/assets/chargingStation.png.js +0 -1
- package/dist/assets/checkmark.png.js +0 -1
- package/dist/assets/cleanMode0.png.js +0 -1
- package/dist/assets/cleanMode1.png.js +0 -1
- package/dist/assets/cleanMode2.png.js +0 -1
- package/dist/assets/cleanMode3.png.js +0 -1
- package/dist/assets/cleanTimes1.png.js +0 -1
- package/dist/assets/cleanTimes2.png.js +0 -1
- package/dist/assets/controlDelete.png.js +0 -1
- package/dist/assets/controlMove.png.js +0 -1
- package/dist/assets/controlRotate.png.js +0 -1
- package/dist/assets/controlScale.png.js +0 -1
- package/dist/assets/fan0.png.js +0 -1
- package/dist/assets/fan1.png.js +0 -1
- package/dist/assets/fan2.png.js +0 -1
- package/dist/assets/fan3.png.js +0 -1
- package/dist/assets/fan4.png.js +0 -1
- package/dist/assets/floorType1.png.js +0 -1
- package/dist/assets/floorType2.png.js +0 -1
- package/dist/assets/floorType3.png.js +0 -1
- package/dist/assets/robot.png.js +0 -1
- package/dist/assets/sleep.json.js +0 -1
- package/dist/assets/spot.png.js +0 -1
- package/dist/assets/water0.png.js +0 -1
- package/dist/assets/water1.png.js +0 -1
- package/dist/assets/water2.png.js +0 -1
- package/dist/assets/water3.png.js +0 -1
- package/dist/components/Base/BaseControlButton.js +0 -1
- package/dist/components/Base/Border.js +0 -1
- package/dist/components/Base/ControlFill.js +0 -1
- package/dist/components/Base/DashLine.js +0 -1
- package/dist/components/Base/EndPoint.js +0 -1
- package/dist/components/Base/EnhancedAnimatedSprite.js +0 -1
- package/dist/components/Base/EnhancedGifSprite.js +0 -1
- package/dist/components/Base/EnhancedSprite.js +0 -1
- package/dist/components/Base/FixedSizeContainer.js +0 -1
- package/dist/components/Base/FixedSizeDOMContainer.js +0 -1
- package/dist/components/Base/FixedSizeText.js +0 -1
- package/dist/components/Base/MoveControlButton.js +0 -1
- package/dist/components/Base/RemoveControlButton.js +0 -1
- package/dist/components/Base/Ring.js +0 -1
- package/dist/components/Base/RotateControlButton.js +0 -1
- package/dist/components/Base/ScaleControlButton.js +0 -1
- package/dist/components/Base/Zone.js +0 -1
- package/dist/components/ChargingStation/ChargingStationIcon.js +0 -1
- package/dist/components/ChargingStation/index.js +0 -1
- package/dist/components/Controls/CleanZone.js +0 -1
- package/dist/components/Controls/Divider.js +0 -1
- package/dist/components/Controls/ForbiddenMopZone.js +0 -1
- package/dist/components/Controls/ForbiddenSweepZone.js +0 -1
- package/dist/components/Controls/Spot.js +0 -1
- package/dist/components/Controls/VirtualWall.js +0 -1
- package/dist/components/CustomElements/CustomGif.js +0 -1
- package/dist/components/CustomElements/CustomHTML.js +0 -1
- package/dist/components/CustomElements/CustomImage.js +0 -1
- package/dist/components/DetectedObject/index.js +0 -1
- package/dist/components/Heatmap/index.js +0 -1
- package/dist/components/Map/Carpet.js +0 -1
- package/dist/components/Map/Free.js +0 -1
- package/dist/components/Map/Obstacle.js +0 -1
- package/dist/components/Map/RoomFill.js +0 -1
- package/dist/components/Path/index.js +0 -1
- package/dist/components/Robot/RobotIcon.js +0 -1
- package/dist/components/Robot/SleepAnimation.js +0 -1
- package/dist/components/Robot/index.js +0 -1
- package/dist/components/RoomFloorType/index.js +0 -1
- package/dist/components/RoomInfo/RoomName.js +0 -1
- package/dist/components/RoomInfo/RoomProperty.js +0 -1
- package/dist/components/RoomInfo/RoomSelectionIndicator.js +0 -1
- package/dist/components/RoomInfo/index.js +0 -1
- package/dist/constant/config.js +0 -1
- package/dist/constant/index.js +0 -1
- package/dist/managers/ControlsManager.js +0 -1
- package/dist/managers/CustomElementsManager.js +0 -1
- package/dist/managers/DetectedObjectManager.js +0 -1
- package/dist/managers/HeatmapManager.js +0 -1
- package/dist/managers/MapManager.js +0 -1
- package/dist/managers/PathManager.js +0 -1
- package/dist/managers/RoomManager.js +0 -1
- package/dist/mixins/ClickHandler.js +0 -1
- package/dist/utils/algorithm.js +0 -1
- package/dist/utils/browser.js +0 -1
- package/dist/utils/logger.js +0 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.C-cF3iZs.js +0 -1
- package/dist-docs/assets/reference_config.md.CRlb96P2.js +0 -55
- package/dist-docs/assets/reference_config.md.CRlb96P2.lean.js +0 -1
- /package/dist-docs/assets/{guide_getting-started.md.zACqR2O5.lean.js → guide_getting-started.md.Cip1vgx6.lean.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
import { AnimatedSprite } from 'pixi.js';
|
|
2
|
-
import { AppContainer as AppContainer_2 } from './AppContainer';
|
|
3
2
|
import { Application } from 'pixi.js';
|
|
4
3
|
import { ApplicationOptions } from 'pixi.js';
|
|
5
4
|
import { ColorSource } from 'pixi.js';
|
|
6
5
|
import { Container } from 'pixi.js';
|
|
7
|
-
import { ControlsConfig as ControlsConfig_2 } from '..';
|
|
8
|
-
import { ControlsManager as ControlsManager_2 } from '../managers/ControlsManager';
|
|
9
|
-
import { CustomElementsManager as CustomElementsManager_2 } from '../managers/CustomElementsManager';
|
|
10
6
|
import { DestroyOptions } from 'pixi.js';
|
|
11
|
-
import { DetectedObjectManager as DetectedObjectManager_2 } from '../managers/DetectedObjectManager';
|
|
12
|
-
import { DividerConfig as DividerConfig_2 } from '..';
|
|
13
7
|
import { Emitter } from 'mitt';
|
|
14
8
|
import { FederatedPointerEvent } from 'pixi.js';
|
|
15
9
|
import { Graphics } from 'pixi.js';
|
|
16
|
-
import { HeatmapManager as HeatmapManager_2 } from '../managers/HeatmapManager';
|
|
17
|
-
import { Interaction as Interaction_2 } from './Interaction';
|
|
18
|
-
import { MapCallbacks as MapCallbacks_2 } from '..';
|
|
19
10
|
import { MapData } from '@ray-js/robot-protocol';
|
|
20
11
|
import { MapHeader } from '@ray-js/robot-protocol';
|
|
21
|
-
import { MapManager as MapManager_2 } from '../managers/MapManager';
|
|
22
|
-
import { MapState as MapState_2 } from '..';
|
|
23
12
|
import { ParsedRasterMapData as ParsedRasterMapData_2 } from '@ray-js/robot-protocol';
|
|
24
13
|
import { PathData } from '@ray-js/robot-protocol';
|
|
25
|
-
import { PathManager as PathManager_2 } from '../managers/PathManager';
|
|
26
14
|
import { Rectangle } from 'pixi.js';
|
|
27
|
-
import { RingConfig as RingConfig_2 } from '..';
|
|
28
|
-
import { RoomData as RoomData_2 } from '..';
|
|
29
|
-
import { RoomManager as RoomManager_2 } from '../managers/RoomManager';
|
|
30
|
-
import { RuntimeConfig as RuntimeConfig_2 } from '..';
|
|
31
15
|
import { SPECIAL_ROOM_IDS } from '@ray-js/robot-protocol';
|
|
32
16
|
import { SpecialRoomId } from '@ray-js/robot-protocol';
|
|
33
17
|
import { Sprite } from 'pixi.js';
|
|
34
18
|
import { TextStyleFontWeight } from 'pixi.js';
|
|
35
19
|
import { Texture } from 'pixi.js';
|
|
36
|
-
import { Ticker } from 'pixi.js';
|
|
37
|
-
import { ViewportContainer as ViewportContainer_2 } from './ViewportContainer';
|
|
38
20
|
|
|
39
21
|
/**
|
|
40
22
|
* 地图静态配置
|
|
@@ -457,51 +439,6 @@ declare class AppContainer extends Container {
|
|
|
457
439
|
getLayerVisibility(name: LayerName): boolean;
|
|
458
440
|
}
|
|
459
441
|
|
|
460
|
-
/**
|
|
461
|
-
* 应用上下文管理 - 基于 React Context 思想
|
|
462
|
-
* 通过组件树的层级关系来传播上下文,每个组件都能自动获取到最近的 Provider 提供的值
|
|
463
|
-
*/
|
|
464
|
-
export declare class AppContext {
|
|
465
|
-
private static contextStack;
|
|
466
|
-
private static instanceMap;
|
|
467
|
-
private static serviceCache;
|
|
468
|
-
/**
|
|
469
|
-
* 类似 React.createContext() - 注册实例
|
|
470
|
-
*/
|
|
471
|
-
static registerInstance(instanceKey: string, app: AppInstance): void;
|
|
472
|
-
/**
|
|
473
|
-
* 取消注册实例
|
|
474
|
-
*/
|
|
475
|
-
static unregisterInstance(instanceKey: string): void;
|
|
476
|
-
/**
|
|
477
|
-
* 获取 AppService 实例
|
|
478
|
-
* @returns AppService 实例
|
|
479
|
-
*/
|
|
480
|
-
static getService(): AppService;
|
|
481
|
-
/**
|
|
482
|
-
* 类似 <Context.Provider value={app}> - 提供上下文
|
|
483
|
-
*/
|
|
484
|
-
static provide<T>(app: AppInstance, fn: () => T): T;
|
|
485
|
-
/**
|
|
486
|
-
* 异步版本的 provide
|
|
487
|
-
*/
|
|
488
|
-
static provideAsync<T>(app: AppInstance, fn: () => Promise<T>): Promise<T>;
|
|
489
|
-
/**
|
|
490
|
-
* 类似 useContext(Context) - 获取当前上下文
|
|
491
|
-
*/
|
|
492
|
-
static useContext(): AppInstance;
|
|
493
|
-
/**
|
|
494
|
-
* 检查是否有活跃的上下文
|
|
495
|
-
*/
|
|
496
|
-
static hasContext(): boolean;
|
|
497
|
-
/**
|
|
498
|
-
* 清空所有上下文(主要用于测试)
|
|
499
|
-
*/
|
|
500
|
-
static clear(): void;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
declare type AppInstance = MapApplication;
|
|
504
|
-
|
|
505
442
|
/**
|
|
506
443
|
* 应用程序选项配置
|
|
507
444
|
* 包含事件回调、配置和运行时状态
|
|
@@ -515,248 +452,6 @@ export declare type AppOptions = {
|
|
|
515
452
|
runtime: DeepPartialRuntimeConfig
|
|
516
453
|
}
|
|
517
454
|
|
|
518
|
-
declare class AppService {
|
|
519
|
-
getApp(): MapApplication;
|
|
520
|
-
getConfig(): AppConfig;
|
|
521
|
-
getRoomData(roomId: number): RoomData_2 | undefined;
|
|
522
|
-
/**
|
|
523
|
-
* 将米转换为像素(委托给 MapApplication)
|
|
524
|
-
*/
|
|
525
|
-
metersToPixels(meters: number): number;
|
|
526
|
-
/**
|
|
527
|
-
* 将像素转换为米(委托给 MapApplication)
|
|
528
|
-
*/
|
|
529
|
-
pixelsToMeters(pixels: number): number;
|
|
530
|
-
get ticker(): Ticker;
|
|
531
|
-
get mapState(): MapState_2 | null;
|
|
532
|
-
get gloalConfig(): {
|
|
533
|
-
containerTop: string;
|
|
534
|
-
containerLeft: string;
|
|
535
|
-
containerWidth: string;
|
|
536
|
-
containerHeight: string;
|
|
537
|
-
backgroundColor: ColorSource;
|
|
538
|
-
};
|
|
539
|
-
get mapConfig(): {
|
|
540
|
-
autoPaddingPercent: number;
|
|
541
|
-
adjacencyThreshold: number;
|
|
542
|
-
obstacleColor: ColorSource;
|
|
543
|
-
freeColor: ColorSource;
|
|
544
|
-
};
|
|
545
|
-
get roomConfig(): {
|
|
546
|
-
colors: {
|
|
547
|
-
active: string[];
|
|
548
|
-
inactive: string[];
|
|
549
|
-
name: string[];
|
|
550
|
-
propertyTheme: string[];
|
|
551
|
-
selectionIndicatorBackground: string[];
|
|
552
|
-
selectionIndicatorIcon: string[];
|
|
553
|
-
NO_ROOM_DATA: string;
|
|
554
|
-
ROOM_GAP: string;
|
|
555
|
-
OBSTACLE_ROOM: string;
|
|
556
|
-
UNKNOWN_ROOM: string;
|
|
557
|
-
};
|
|
558
|
-
nameLabel: {
|
|
559
|
-
fontSize: number;
|
|
560
|
-
fontFamily: string;
|
|
561
|
-
fontWeight: TextStyleFontWeight;
|
|
562
|
-
};
|
|
563
|
-
property: {
|
|
564
|
-
displayOrders: ("cleanMode" | "suction" | "cistern" | "cleanTimes" | string)[];
|
|
565
|
-
iconWidth: number;
|
|
566
|
-
iconHeight: number;
|
|
567
|
-
foldable: boolean;
|
|
568
|
-
offsetX: number;
|
|
569
|
-
offsetY: number;
|
|
570
|
-
iconGap: number;
|
|
571
|
-
container: {
|
|
572
|
-
backgroundColor: ColorSource;
|
|
573
|
-
paddingVertical: number;
|
|
574
|
-
paddingHorizontal: number;
|
|
575
|
-
borderRadius: number;
|
|
576
|
-
tailHeight: number;
|
|
577
|
-
tailWidth: number;
|
|
578
|
-
};
|
|
579
|
-
suction: {
|
|
580
|
-
assets: string[];
|
|
581
|
-
};
|
|
582
|
-
cistern: {
|
|
583
|
-
assets: string[];
|
|
584
|
-
};
|
|
585
|
-
cleanMode: {
|
|
586
|
-
assets: string[];
|
|
587
|
-
};
|
|
588
|
-
cleanTimes: {
|
|
589
|
-
assets: string[];
|
|
590
|
-
};
|
|
591
|
-
cleanOrder: {
|
|
592
|
-
color: ColorSource;
|
|
593
|
-
fontFamily: string;
|
|
594
|
-
fontWeight: TextStyleFontWeight;
|
|
595
|
-
fontSize: number;
|
|
596
|
-
gapRight: number;
|
|
597
|
-
};
|
|
598
|
-
customAssets?: Record<string, string[]>;
|
|
599
|
-
};
|
|
600
|
-
selectionIndicator: {
|
|
601
|
-
iconSrc: string;
|
|
602
|
-
iconWidth: number;
|
|
603
|
-
iconHeight: number;
|
|
604
|
-
containerWidth: number;
|
|
605
|
-
containerHeight: number;
|
|
606
|
-
strokeWidth: number;
|
|
607
|
-
strokeColor: ColorSource;
|
|
608
|
-
borderRadius: number;
|
|
609
|
-
offsetX: number;
|
|
610
|
-
offsetY: number;
|
|
611
|
-
tailHeight: number;
|
|
612
|
-
tailWidth: number;
|
|
613
|
-
};
|
|
614
|
-
floorType: {
|
|
615
|
-
assets: string[];
|
|
616
|
-
opacity: number;
|
|
617
|
-
scale: number;
|
|
618
|
-
};
|
|
619
|
-
};
|
|
620
|
-
get heatMapConfig(): {
|
|
621
|
-
cellSize: number;
|
|
622
|
-
maxDistance: number;
|
|
623
|
-
smoothIterations: number;
|
|
624
|
-
heatmapAlpha: number;
|
|
625
|
-
colorGradients: [ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource, ColorSource];
|
|
626
|
-
};
|
|
627
|
-
get pathConfig(): {
|
|
628
|
-
lineWidthFixed: boolean;
|
|
629
|
-
incrementalThreshold: number;
|
|
630
|
-
commonPath: {
|
|
631
|
-
visible: boolean;
|
|
632
|
-
color: ColorSource;
|
|
633
|
-
width: number;
|
|
634
|
-
};
|
|
635
|
-
transitionPath: {
|
|
636
|
-
visible: boolean;
|
|
637
|
-
color: ColorSource;
|
|
638
|
-
width: number;
|
|
639
|
-
};
|
|
640
|
-
chargePath: {
|
|
641
|
-
visible: boolean;
|
|
642
|
-
color: ColorSource;
|
|
643
|
-
width: number;
|
|
644
|
-
};
|
|
645
|
-
};
|
|
646
|
-
get carpetConfig(): {
|
|
647
|
-
src: string;
|
|
648
|
-
opacity: number;
|
|
649
|
-
scale: number;
|
|
650
|
-
};
|
|
651
|
-
get robotConfig(): {
|
|
652
|
-
icon: {
|
|
653
|
-
sizeFixed: boolean;
|
|
654
|
-
width: number;
|
|
655
|
-
height: number;
|
|
656
|
-
src: string;
|
|
657
|
-
};
|
|
658
|
-
speed: number;
|
|
659
|
-
rotationCorrection: number;
|
|
660
|
-
sleepAnimation: {
|
|
661
|
-
jsonSrc: string;
|
|
662
|
-
framePrefix: string;
|
|
663
|
-
width: number;
|
|
664
|
-
height: number;
|
|
665
|
-
sizeFixed: boolean;
|
|
666
|
-
frameCount: number;
|
|
667
|
-
offsetX: number;
|
|
668
|
-
offsetY: number;
|
|
669
|
-
};
|
|
670
|
-
} & RingConfig_2;
|
|
671
|
-
get chargingStationConfig(): {
|
|
672
|
-
icon: {
|
|
673
|
-
sizeFixed: boolean;
|
|
674
|
-
width: number;
|
|
675
|
-
height: number;
|
|
676
|
-
src: string;
|
|
677
|
-
};
|
|
678
|
-
rotationCorrection: number;
|
|
679
|
-
} & RingConfig_2;
|
|
680
|
-
get interactionConfig(): {
|
|
681
|
-
zoomRange: {
|
|
682
|
-
min: number;
|
|
683
|
-
max: number;
|
|
684
|
-
};
|
|
685
|
-
fitMinScale: number;
|
|
686
|
-
fitMaxScale: number;
|
|
687
|
-
enableDoubleTapZoom: boolean;
|
|
688
|
-
};
|
|
689
|
-
get controlsConfig(): ControlsConfig_2;
|
|
690
|
-
get dividerConfig(): DividerConfig_2;
|
|
691
|
-
get detectedObjectConfig(): {
|
|
692
|
-
height: number;
|
|
693
|
-
width: number;
|
|
694
|
-
interactive: boolean;
|
|
695
|
-
};
|
|
696
|
-
get snapshotConfig(): {
|
|
697
|
-
format: "png" | "jpg" | "webp";
|
|
698
|
-
quality: number;
|
|
699
|
-
antialias: boolean;
|
|
700
|
-
resolution: number;
|
|
701
|
-
};
|
|
702
|
-
get appContainer(): AppContainer_2;
|
|
703
|
-
get interaction(): Interaction_2;
|
|
704
|
-
get viewportContainer(): ViewportContainer_2;
|
|
705
|
-
get mapManager(): MapManager_2;
|
|
706
|
-
get pathManager(): PathManager_2;
|
|
707
|
-
get heatmapManager(): HeatmapManager_2;
|
|
708
|
-
get controlsManager(): ControlsManager_2;
|
|
709
|
-
get detectedObjectManager(): DetectedObjectManager_2;
|
|
710
|
-
get customElementsManager(): CustomElementsManager_2;
|
|
711
|
-
get roomsManager(): RoomManager_2;
|
|
712
|
-
get runtime(): RuntimeConfig_2;
|
|
713
|
-
get runtimeSnapshot(): {
|
|
714
|
-
readonly dividingRoomId: number | null | undefined;
|
|
715
|
-
readonly enableRoomSelection: boolean;
|
|
716
|
-
readonly editingForbiddenSweepZoneIds: readonly string[];
|
|
717
|
-
readonly editingForbiddenMopZoneIds: readonly string[];
|
|
718
|
-
readonly editingCleanZoneIds: readonly string[];
|
|
719
|
-
readonly editingVirtualWallIds: readonly string[];
|
|
720
|
-
readonly editingSpotIds: readonly string[];
|
|
721
|
-
readonly roomPropertyFoldIds: readonly number[];
|
|
722
|
-
readonly roomSelectionMode: "checkmark" | "order";
|
|
723
|
-
readonly showRoomName: boolean;
|
|
724
|
-
readonly showRoomProperty: boolean;
|
|
725
|
-
readonly showRoomOrder: boolean;
|
|
726
|
-
readonly showPath: boolean;
|
|
727
|
-
readonly showChargingStation: boolean;
|
|
728
|
-
readonly showRoomFloorType: boolean;
|
|
729
|
-
readonly showCarpet: boolean;
|
|
730
|
-
readonly selectRoomIds: readonly number[];
|
|
731
|
-
readonly showChargingStationRing: boolean;
|
|
732
|
-
readonly showRobotRing: boolean;
|
|
733
|
-
readonly showRobotSleepAnimation: boolean;
|
|
734
|
-
};
|
|
735
|
-
get events(): MapCallbacks_2 | undefined;
|
|
736
|
-
get baseScale(): number;
|
|
737
|
-
get currentScale(): number;
|
|
738
|
-
get emitter(): Emitter< {
|
|
739
|
-
antiScale: number;
|
|
740
|
-
gestureHijackStart: FederatedPointerEvent;
|
|
741
|
-
gestureHijackPointerMove: FederatedPointerEvent;
|
|
742
|
-
gestureHijackPointerUp: FederatedPointerEvent;
|
|
743
|
-
gestureHijackCancel: void;
|
|
744
|
-
robotPositionUpdate: {
|
|
745
|
-
x: number;
|
|
746
|
-
y: number;
|
|
747
|
-
pathType?: string;
|
|
748
|
-
};
|
|
749
|
-
robotAnimationComplete: void;
|
|
750
|
-
pathSegmentComplete: {
|
|
751
|
-
fromX: number;
|
|
752
|
-
fromY: number;
|
|
753
|
-
toX: number;
|
|
754
|
-
toY: number;
|
|
755
|
-
pathType?: string;
|
|
756
|
-
};
|
|
757
|
-
}>;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
455
|
/**
|
|
761
456
|
* 基础自定义元素参数(所有类型共享)
|
|
762
457
|
*/
|
|
@@ -1975,7 +1670,7 @@ export declare interface MapApi {
|
|
|
1975
1670
|
* 地图应用的核心类,继承自 PIXI.Application,提供完整的地图渲染、交互和管理功能。
|
|
1976
1671
|
* 支持扫地机器人地图的显示、路径绘制、房间管理、控制元素(禁区、虚拟墙等)等功能。
|
|
1977
1672
|
*/
|
|
1978
|
-
|
|
1673
|
+
declare class MapApplication extends Application implements MapApi {
|
|
1979
1674
|
/** 地图状态对象 */
|
|
1980
1675
|
mapState: MapState | null;
|
|
1981
1676
|
/* Excluded from this release type: components */
|
|
@@ -3517,11 +3212,6 @@ export declare type SpotParam = {
|
|
|
3517
3212
|
point: Point
|
|
3518
3213
|
}
|
|
3519
3214
|
|
|
3520
|
-
/**
|
|
3521
|
-
* 获取 AppService 实例
|
|
3522
|
-
*/
|
|
3523
|
-
export declare function useAppService(): AppService;
|
|
3524
|
-
|
|
3525
3215
|
declare class ViewportContainer extends Container {
|
|
3526
3216
|
private viewportBounds;
|
|
3527
3217
|
private maskGraphics;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{decodeRoomProperties as o,offsetPointsToAvoidOverlap as
|
|
1
|
+
import{decodeRoomProperties as o,offsetPointsToAvoidOverlap as t}from"./utils/index.js";import{MAP_API_METHODS as m,MAP_CALLBACK_METHODS as r}from"./constant/methods.js";export{m as MAP_API_METHODS,r as MAP_CALLBACK_METHODS,o as decodeRoomProperties,t as offsetPointsToAvoidOverlap};
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{decodeMapRooms as e}from"@ray-js/robot-protocol";const r=(r,o)=>(e(r)??[]).map(e=>({id:e.roomId,name:e.name,cleanTimes:e.sweepTimes,order:e.order,floorType:e.floorMaterial,yMop:e.yMop?1:0,suction:e.suction,cistern:e.cistern,cleanMode:e.sweepForbidden||e.mopForbidden?e.sweepForbidden?2:1:0,...o?.(e.reservedStr)??{}})),o=(e,r,o=20)=>{const n=[...e];let t=0;for(;t<o&&r.some(e=>{return o=e,(r=n).length===o.length&&r.every((e,r)=>{const n=o[r];return e.x===n.x&&e.y===n.y});var r,o});)t++,n.forEach(e=>{e.x+=5,e.y+=5});return n};export{r as decodeRoomProperties,o as offsetPointsToAvoidOverlap};
|
package/dist-docs/404.html
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
<link rel="preload stylesheet" href="/assets/style.CN_tJoU2.css" as="style">
|
|
10
10
|
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
|
|
11
11
|
|
|
12
|
-
<script type="module" src="/assets/app.
|
|
12
|
+
<script type="module" src="/assets/app.DKtY-QgA.js"></script>
|
|
13
13
|
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
14
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
15
15
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="app"></div>
|
|
19
|
-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"guide_advanced-usage.md\":\"BrZgx45A\",\"guide_concepts.md\":\"CAoYwZmS\",\"guide_getting-started.md\":\"Cip1vgx6\",\"index.md\":\"Sm6vD2Gl\",\"reference_callbacks.md\":\"-S6uhkXO\",\"reference_config.md\":\"CfEp0H9c\",\"reference_data.md\":\"B8JfrRhl\",\"reference_methods.md\":\"D1VYgciC\",\"reference_runtime.md\":\"UJkdf65W\",\"reference_types.md\":\"DkIhhJD0\",\"reference_utils.md\":\"CSshxnp0\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Tuya Robot Map\",\"description\":\"涂鸦扫地机地图组件\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"siteTitle\":\"Tuya Robot Map\",\"outline\":{\"level\":[2,5],\"label\":\"页面导航\"},\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/guide/concepts\",\"activeMatch\":\"^/guide/\"},{\"text\":\"参考\",\"link\":\"/reference/data\",\"activeMatch\":\"^/reference/\"}],\"sidebar\":{\"/guide/\":[{\"text\":\"指南\",\"items\":[{\"text\":\"基本概念\",\"link\":\"/guide/concepts\"},{\"text\":\"快速开始\",\"link\":\"/guide/getting-started\"},{\"text\":\"进阶使用\",\"link\":\"/guide/advanced-usage\"}]}],\"/reference/\":[{\"text\":\"组件Props\",\"items\":[{\"text\":\"数据\",\"link\":\"/reference/data\"},{\"text\":\"配置\",\"link\":\"/reference/config\"},{\"text\":\"运行时\",\"link\":\"/reference/runtime\"},{\"text\":\"地图事件回调\",\"link\":\"/reference/callbacks\"}]},{\"text\":\"方法\",\"items\":[{\"text\":\"地图方法\",\"link\":\"/reference/methods\"},{\"text\":\"工具方法\",\"link\":\"/reference/utils\"}]},{\"text\":\"类型定义\",\"items\":[{\"text\":\"类型定义\",\"link\":\"/reference/types\"}]}]},\"search\":{\"provider\":\"local\"},\"lastUpdated\":{\"text\":\"最后更新于\",\"formatOptions\":{\"dateStyle\":\"short\",\"timeStyle\":\"short\"}}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
20
20
|
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as p}from"./chunks/theme.
|
|
1
|
+
import{t as p}from"./chunks/theme.CoICOtg5.js";import{R as s,a2 as i,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,d as v,u as y,v as C,s as P,ac as b,ad as w,ae as R,af as E}from"./chunks/framework.DRADY2L-.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};
|