@jnrs/lingshu-smart 3.1.0 → 3.1.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.
@@ -1,4 +1,4 @@
1
- import { IScene, ILayer, IContainer, ILayerOperating, EnumResourceType } from '../types';
1
+ import { IScene, ILayer, IContainer, ILayerOperating, IRailConfig, EnumResourceType } from '../types';
2
2
  import { ModelAbs } from '../ui/abstract/ModelAbs';
3
3
  import { App } from 'leafer';
4
4
  export declare class AppController {
@@ -61,6 +61,11 @@ export declare class AppController {
61
61
  private batchRemove;
62
62
  /** 是否存在匹配的业务设备模型(command_ack 404 判断) */
63
63
  hasDevice(className: string, id: string): boolean;
64
+ /**
65
+ * 解析设备绑定的轨道配置:优先设备自身 linkRailId,其次按轨道侧 linkEquipIdArray 反查
66
+ * (两侧由编辑器「绑定」面板双向同步维护,历史数据可能只保留一侧)
67
+ */
68
+ getBoundRailConfig(equipId: string): IRailConfig | null;
64
69
  /** 判断设备是否存在指定序号的工位(任一工位组;多层设备按 layer 定位层) */
65
70
  hasStation(className: string, id: string, stationIndex: number, layer?: number): boolean;
66
71
  /** 判断指定工位是否可放置该资源类型(运行期类型强校验,见文档 4.3) */
@@ -33,14 +33,21 @@ export declare class EditorController {
33
33
  private onDragEnd?;
34
34
  constructor(options: EditorOptions);
35
35
  selectEquipment(condition?: string): void;
36
+ selectEquipments(ids: string[]): void;
37
+ getSelectedIds(): string[];
36
38
  rerenderModel(modelConfig: ILayer): void;
37
39
  private addEvent;
38
- /** MOVE 事件停止判定为拖拽结束的静默时长(ms) */
39
- private static readonly DRAG_END_SILENCE;
40
+ /** 拖拽进行中标志(MOVE/SCALE/ROTATE 置位,指针释放复位) */
40
41
  private dragging;
41
- private dragEndTimer;
42
- /** 标记拖拽进行中:首次触发 onDragStart,并重置结束计时器 */
42
+ /** 标记拖拽进行中:首次触发 onDragStart(结束由真实指针释放事件驱动,见 handlePointerUp) */
43
43
  private markDragging;
44
+ /**
45
+ * 真实手势结束:以指针释放为准(window pointerup / pointercancel)
46
+ * 原实现用「MOVE 静默超过 150ms 即视为拖拽结束」的计时器近似,拖拽中途停顿(手停鼠标不停离)
47
+ * 会误判结束 → store 回写旧坐标并重建模型 → 正在拖动/缩放的图形被销毁,表现为拖动自动中断、
48
+ * 缩放飘移抖动。leafer 编辑器的 MOVE/SCALE/ROTATE 事件无 START/END 生命周期,故用原生指针事件兜底
49
+ */
50
+ private handlePointerUp;
44
51
  destroy(): void;
45
52
  }
46
53
  export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 设备图标导出(一次性工具页面,配合 icon-exporter.html 与 icon-save-server.mjs 使用)
3
+ * 遍历设备菜单预设,将每个设备模型以默认尺寸渲染到 200×200 透明画布,
4
+ * zoom fit 无边距适配后导出 200×200 透明 PNG,POST 到本地保存服务写入 assets。
5
+ */
6
+ export {};