@jnrs/lingshu-smart 2.2.46 → 3.0.0

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 (65) hide show
  1. package/AGENTS.md +281 -348
  2. package/dist/components/debug/DataLogPanel.vue.d.ts +29 -3
  3. package/dist/components/debug/PerformanceStats.vue.d.ts +1 -1
  4. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +1 -2
  5. package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +4 -2
  6. package/dist/components/debug/ScriptRunner/index.vue.d.ts +11 -0
  7. package/dist/components/debug/ScriptRunner/script.d.ts +140 -41
  8. package/dist/components/debug/ScriptRunner/scriptFile.d.ts +92 -0
  9. package/dist/components/debug/WsProxy/index.vue.d.ts +10 -8
  10. package/dist/components/debug/WsProxy/proxy.d.ts +114 -53
  11. package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +18 -2
  12. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +2 -2
  13. package/dist/components/editor/ControlBar/PersistDialog.vue.d.ts +9 -0
  14. package/dist/components/index.js +8419 -6045
  15. package/dist/components/preview/index.vue.d.ts +6852 -4876
  16. package/dist/controller/AppController.d.ts +75 -4
  17. package/dist/controller/SocketDispatcher.d.ts +59 -0
  18. package/dist/fullscreen-BA3oea8O.js +53 -0
  19. package/dist/index-C6Liz-8o.js +1238 -0
  20. package/dist/index.js +36 -27
  21. package/dist/lingshu-smart/cases.json +5890 -14828
  22. package/dist/lingshu-smart/mockSocket.json +263 -0
  23. package/dist/lingshu-smart/wsProxyConfig.json +343 -720
  24. package/dist/playground/ViewPageDemo.vue.d.ts +14412 -10438
  25. package/dist/stores/index.js +1 -1
  26. package/dist/stores/useAppStore.d.ts +20570 -14641
  27. package/dist/stores/useDataStore.d.ts +21139 -14587
  28. package/dist/stores/useDebugStore.d.ts +14 -2
  29. package/dist/stores/useEditorStore.d.ts +3 -3
  30. package/dist/types/app.types.d.ts +1 -1
  31. package/dist/types/components/config.types.d.ts +16 -0
  32. package/dist/types/components/operating.types.d.ts +28 -19
  33. package/dist/types/enums.d.ts +22 -2
  34. package/dist/types/guards.d.ts +4 -1
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/models/config.types.d.ts +41 -9
  37. package/dist/types/models/operating.types.d.ts +64 -74
  38. package/dist/types/socket.types.d.ts +275 -0
  39. package/dist/ui/abstract/ModelAbs.d.ts +42 -2
  40. package/dist/ui/components/Resource.d.ts +0 -1
  41. package/dist/ui/components/StationSlot.d.ts +8 -2
  42. package/dist/ui/components/StationSlotGroup.d.ts +28 -3
  43. package/dist/ui/models/DoubleJointRobot.d.ts +16 -4
  44. package/dist/ui/models/MachineTool.d.ts +6 -2
  45. package/dist/ui/models/MaterialTrack.d.ts +14 -2
  46. package/dist/ui/models/Pallet.d.ts +29 -9
  47. package/dist/ui/models/Rail.d.ts +9 -2
  48. package/dist/ui/models/ResourceOperationWindow.d.ts +2 -1
  49. package/dist/ui/models/ResourceStore.d.ts +7 -5
  50. package/dist/ui/models/Rgv.d.ts +6 -6
  51. package/dist/ui/models/ShuttleStation.d.ts +14 -4
  52. package/dist/ui/models/SingleJointRobot.d.ts +14 -4
  53. package/dist/ui/utils/resolveStationSlotLayers.d.ts +20 -0
  54. package/dist/ui/utils/resolveTypeStyle.d.ts +13 -0
  55. package/dist/useAppStore-DASwAOBy.js +7223 -0
  56. package/dist/utils/fullscreen.d.ts +9 -0
  57. package/dist/utils/index.d.ts +1 -0
  58. package/dist/vite.d.ts +15 -0
  59. package/dist/vite.js +39 -0
  60. package/package.json +6 -2
  61. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupBoth.vue.d.ts +0 -2
  62. package/dist/guards-aLOXCeCF.js +0 -35
  63. package/dist/index-Dsgrnpn0.js +0 -1186
  64. package/dist/useAppStore-CVyLAMtL.js +0 -6125
  65. /package/dist/components/editor/OptionCard/Equipment/{stationSlot/StationSlotGroup.vue.d.ts → models/ResourceStore.vue.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
- import { IShuttleStationConfig, IShuttleStationOperating } from '../../types';
1
+ import { IShuttleStationConfig, IShuttleStationOperating, EnumResourceType } from '../../types';
2
2
  import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
4
5
  /**
5
6
  * 接驳站(ShuttleStation)
6
7
  * 整体为 U 型结构,支持多层工位组配置(每层 = 一个工位组容器);
@@ -29,9 +30,18 @@ export declare class ShuttleStation extends ModelAbs<IShuttleStationConfig> {
29
30
  private buildBaseAndWheels;
30
31
  protected createUi(): Box;
31
32
  protected operating(data: IShuttleStationOperating): void;
32
- /** 资源增删:data.resource 提供 layer(>0) 时定位到该层;缺省时仅当唯一一层包含该工位序号才操作 */
33
+ /** 资源增删:data.resource 提供 device_layer(>0) 时定位到该层;缺省时仅当唯一一层包含该工位序号才操作 */
33
34
  private handleResourceOperating;
34
35
  private applyLayerLightColor;
35
- private resolveStatusColor;
36
- private statusToColor;
36
+ /** 收集全部层工位槽组(供全局资源移除 / 工位查询遍历) */
37
+ protected collectStationSlotGroups(): StationSlotGroup[];
38
+ /** 层感知工位存在性判断(覆盖通用实现:按 layer 定位层,缺省取第一层) */
39
+ hasStationIndex(stationIndex: number, layer?: number): boolean;
40
+ /** 层感知工位类型强校验(覆盖通用实现:按 layer 定位层,缺省取第一层) */
41
+ acceptsResourceType(stationIndex: number, resourceType: EnumResourceType, layer?: number): boolean;
42
+ /** 层感知工位坐标查询(覆盖通用实现:按 layer 定位层,缺省取第一层) */
43
+ getStationSlotPoint(stationIndex: number, layer?: number): {
44
+ x: number;
45
+ y: number;
46
+ } | undefined;
37
47
  }
@@ -12,15 +12,25 @@ export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig>
12
12
  private light1;
13
13
  private light2;
14
14
  private defaultLightColor;
15
- private stationSlotGroupPallet;
16
- private stationSlotGroupTool;
17
- get currentFixture(): EnumResourceType;
18
- set currentFixture(type: EnumResourceType);
15
+ /** 全部工位层工位组(一层=一组),挂载于唯一容器 #slotLayers,与夹具无关 */
16
+ private slotGroups;
17
+ /** slotGroups 平行的层 index(1-based),用于夹具绑定层的显隐与资源层索引映射 */
18
+ private slotLayerIndexes;
19
+ get currentFixture(): EnumResourceType | 'none';
20
+ set currentFixture(type: EnumResourceType | 'none');
19
21
  protected createUi(): Box;
20
22
  protected operating(data: ISingleJointRobotOperating): void;
23
+ /** 资源路由(与夹具装饰无关):device_layer 层号优先(当前夹具绑定了层时以绑定层为索引基准),其次工位号(优先类型匹配),最后首个工位组 */
24
+ private findGroupForResource;
25
+ /** 层索引解析:当前夹具绑定了工位层时,以绑定层(按层号升序)为索引基准(device_layer=1 → 第一个绑定层);未绑定或越界时回退原始层号 */
26
+ private resolveBoundLayerIndex;
27
+ /** 应用夹具绑定的工位层显隐:绑定了层的夹具仅显示绑定层(保留各组 Display 配置),未绑定时显示全部层 */
28
+ private applyFixtureBindingVisibility;
21
29
  protected collectStationSlotGroups(): StationSlotGroup[];
22
30
  private handleRotate;
23
31
  private moveX;
24
32
  private switchFork;
33
+ /** 设置托盘夹具状态:辅料夹具沿用工件夹具造型,压扁 + 直角 + 描边补偿,并补偿 y 使垂直中心对齐手抓关节 */
34
+ private setPalletFixture;
25
35
  handleLoadResource(handleType: 'add' | 'remove'): void;
26
36
  }
@@ -0,0 +1,20 @@
1
+ import { IStationSlotLayerConfig, IStationSlotGroupConfig } from '../../types';
2
+ /**
3
+ * 工位层解析/归一化(统一「工位配置(层级)」模型)
4
+ * 各类设备的数据均为 stationSlotGroups[](一层=一个工位组);
5
+ * 兼容旧配置:
6
+ * - 单工位组 stationSlotGroup → 迁移为第 1 层
7
+ * - 双工位组 stationSlotGroupPallet/Tool → 迁移为第 1/2 层
8
+ * 返回是否已实际执行迁移(供调用方决定是否需要回写 config)。
9
+ */
10
+ export declare function resolveStationSlotLayers(config: {
11
+ stationSlotGroups?: IStationSlotLayerConfig[];
12
+ stationSlotGroup?: IStationSlotGroupConfig;
13
+ stationSlotGroupPallet?: IStationSlotGroupConfig;
14
+ stationSlotGroupTool?: IStationSlotGroupConfig;
15
+ }): {
16
+ layers: IStationSlotLayerConfig[];
17
+ migrated: boolean;
18
+ };
19
+ /** 判断工位组是否为刀具工位组(组内任一工位声明 resourceType=tool 即视为刀具组,仅用于默认定位等展示层判断) */
20
+ export declare function isToolStationSlotGroup(group?: IStationSlotGroupConfig): boolean;
@@ -0,0 +1,13 @@
1
+ import { EnumResourceType } from '../../types';
2
+ /** 类型视觉样式(undefined 项 = 沿用调用方自身配置) */
3
+ export interface ITypeStyle {
4
+ /** 圆角半径:TOOL 正圆(= 宽度)、AUXILIARY 直角(0)、其余圆角矩形(宽度 * 0.1) */
5
+ cornerRadius: number;
6
+ /** 边框颜色覆盖:辅料固定灰描边 */
7
+ stroke?: string;
8
+ /** 边框宽度覆盖:辅料固定 1 */
9
+ strokeWidth?: number;
10
+ /** 阴影绘制覆盖:辅料不绘制内外阴影 */
11
+ showShadow?: boolean;
12
+ }
13
+ export declare function resolveTypeStyle(resourceType: EnumResourceType, width: number): ITypeStyle;