@jnrs/lingshu-smart 3.1.10 → 3.1.12

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 { ICase, ILayer, ILayerOperating, InteractiveUi } from '../../types';
1
+ import { ICase, ILayer, ILayerOperating, InteractiveUi, SlotResourceMode } from '../../types';
2
2
  export interface PreviewActions {
3
3
  /**
4
4
  * 加载案例列表
@@ -20,6 +20,22 @@ export interface PreviewActions {
20
20
  * @returns 设备信息
21
21
  */
22
22
  onDragEnd?: (layer: ILayer, data: InteractiveUi) => void;
23
+ /**
24
+ * 画布级左键点击事件(监听整个画布任意位置,含空白区域;命中设备时会与 onTap 同时触发)
25
+ * @param point 画布内坐标
26
+ */
27
+ onCanvasTap?: (point: {
28
+ x: number;
29
+ y: number;
30
+ }) => void;
31
+ /**
32
+ * 画布级右键点击事件(监听整个画布任意位置;引擎已阻止浏览器默认右键菜单)
33
+ * @param point 画布内坐标
34
+ */
35
+ onCanvasMenuTap?: (point: {
36
+ x: number;
37
+ y: number;
38
+ }) => void;
23
39
  }
24
40
  type __VLS_Props = {
25
41
  actions?: PreviewActions;
@@ -39,6 +55,12 @@ type __VLS_Props = {
39
55
  * 隐藏场景元素(如背景、网格等)
40
56
  */
41
57
  hideSceneFill?: boolean;
58
+ /**
59
+ * 工位槽资源放置模式
60
+ * - replace(默认):替换模式,新资源无条件替换槽内旧资源,槽内始终最多 1 个资源
61
+ * - overlay:叠加模式,同槽可并存多个资源(超出槽位 maxResources 时先进先出淘汰)
62
+ */
63
+ slotResourceMode?: SlotResourceMode;
42
64
  };
43
65
  declare const _default: import('vue').DefineComponent<__VLS_Props, {
44
66
  currentCase: import('vue').Ref<{
@@ -16077,12 +16099,13 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
16077
16099
  })[];
16078
16100
  } | null>;
16079
16101
  operating: (data: ILayerOperating) => void;
16080
- feedSocketMessage: (msg: unknown) => void;
16102
+ feedSocketMessage: (msg: unknown, source?: unknown) => void;
16081
16103
  setSocketHandlers: (handlers: Pick<import('../../controller/SocketDispatcher').SocketDispatcherOptions, "onAck" | "onRaw">) => void;
16082
16104
  resetModels: () => void;
16083
16105
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16084
16106
  actions: PreviewActions;
16085
16107
  appHittable: boolean;
16108
+ slotResourceMode: SlotResourceMode;
16086
16109
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
16087
16110
  visualRef: HTMLDivElement;
16088
16111
  }, HTMLDivElement>;
@@ -26,8 +26,9 @@ export declare class SocketDispatcher {
26
26
  /**
27
27
  * 分发一条完整业务消息(envelope + payload)
28
28
  * @param msg 原始消息
29
+ * @param source 触发本消息的源 socket 消息(WsProxy 翻译前原始报文;仅用于资源实体 rawData 溯源,可缺省)
29
30
  */
30
- dispatch(msg: unknown): void;
31
+ dispatch(msg: unknown, source?: unknown): void;
31
32
  private handleDeviceCommand;
32
33
  /** 将 device_command payload 转换为内部 operating(position 比例值 → 像素) */
33
34
  private buildDeviceOperating;
@@ -1,4 +1,4 @@
1
- import { b as e } from "./index-C6Liz-8o.js";
1
+ import { b as e } from "./index-CQbsL_m9.js";
2
2
  import { ref as c, onMounted as t, onUnmounted as N } from "vue";
3
3
  function O(s) {
4
4
  return s?.className === e.MACHINE_TOOL;