@jnrs/lingshu-smart 2.2.47 → 3.1.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 (66) hide show
  1. package/AGENTS.md +288 -354
  2. package/dist/components/debug/DataLogPanel.vue.d.ts +13 -2
  3. package/dist/components/debug/PerformanceStats.vue.d.ts +1 -1
  4. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +1 -1
  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 +131 -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 +8295 -6169
  15. package/dist/components/preview/index.vue.d.ts +6620 -4098
  16. package/dist/controller/AppController.d.ts +65 -3
  17. package/dist/controller/SocketDispatcher.d.ts +59 -0
  18. package/dist/fullscreen-cF8Z5e2Z.js +53 -0
  19. package/dist/index-C6Liz-8o.js +1238 -0
  20. package/dist/index.js +38 -29
  21. package/dist/lingshu-smart/cases.json +5946 -14861
  22. package/dist/lingshu-smart/mockSocket.json +292 -0
  23. package/dist/lingshu-smart/wsProxyConfig.json +327 -725
  24. package/dist/playground/ViewPageDemo.vue.d.ts +13960 -8894
  25. package/dist/stores/index.js +1 -1
  26. package/dist/stores/useAppStore.d.ts +19888 -12321
  27. package/dist/stores/useDataStore.d.ts +20650 -12469
  28. package/dist/stores/useDebugStore.d.ts +11 -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 +22 -13
  33. package/dist/types/enums.d.ts +22 -2
  34. package/dist/types/guards.d.ts +2 -1
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/models/config.types.d.ts +23 -5
  37. package/dist/types/models/operating.types.d.ts +62 -57
  38. package/dist/types/socket.types.d.ts +282 -0
  39. package/dist/ui/abstract/ModelAbs.d.ts +44 -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 +26 -1
  43. package/dist/ui/models/DoubleJointRobot.d.ts +14 -4
  44. package/dist/ui/models/MachineTool.d.ts +6 -1
  45. package/dist/ui/models/MaterialTrack.d.ts +14 -2
  46. package/dist/ui/models/Pallet.d.ts +20 -5
  47. package/dist/ui/models/ResourceOperationWindow.d.ts +0 -1
  48. package/dist/ui/models/ResourceStore.d.ts +7 -5
  49. package/dist/ui/models/Rgv.d.ts +4 -2
  50. package/dist/ui/models/ShuttleStation.d.ts +14 -2
  51. package/dist/ui/models/SingleJointRobot.d.ts +17 -5
  52. package/dist/ui/shapes/NamePlate.d.ts +14 -0
  53. package/dist/ui/utils/resolveStationSlotLayers.d.ts +20 -0
  54. package/dist/ui/utils/resolveTypeStyle.d.ts +13 -0
  55. package/dist/useAppStore-DWFfsey0.js +7261 -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-Bi8oNtaY.js +0 -35
  63. package/dist/index-Dsgrnpn0.js +0 -1186
  64. package/dist/useAppStore-CevWqcmT.js +0 -6147
  65. /package/dist/components/editor/OptionCard/Equipment/models/{SingleJointRobot.vue.d.ts → JointRobot.vue.d.ts} +0 -0
  66. /package/dist/components/editor/OptionCard/Equipment/{stationSlot/StationSlotGroup.vue.d.ts → models/ResourceStore.vue.d.ts} +0 -0
@@ -3,7 +3,7 @@ import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
4
  import { StationSlotGroup } from '../components/StationSlotGroup';
5
5
  /**
6
- * 单关节机器人
6
+ * 单关节机器人(SingleJointRobot)
7
7
  */
8
8
  export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig> {
9
9
  private static readonly DEFAULT_WIDTH;
@@ -12,15 +12,27 @@ 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');
21
+ /** 移动动画时长:与 moveX 默认 0.5s 一致,供托盘跟随等联动同步 */
22
+ get moveDuration(): number;
19
23
  protected createUi(): Box;
20
24
  protected operating(data: ISingleJointRobotOperating): void;
25
+ /** 资源路由(与夹具装饰无关):device_layer 层号优先(当前夹具绑定了层时以绑定层为索引基准),其次工位号(优先类型匹配),最后首个工位组 */
26
+ private findGroupForResource;
27
+ /** 层索引解析:当前夹具绑定了工位层时,以绑定层(按层号升序)为索引基准(device_layer=1 → 第一个绑定层);未绑定或越界时回退原始层号 */
28
+ private resolveBoundLayerIndex;
29
+ /** 应用夹具绑定的工位层显隐:绑定了层的夹具仅显示绑定层(保留各组 Display 配置),未绑定时显示全部层 */
30
+ private applyFixtureBindingVisibility;
21
31
  protected collectStationSlotGroups(): StationSlotGroup[];
22
32
  private handleRotate;
23
33
  private moveX;
24
34
  private switchFork;
35
+ /** 设置托盘夹具状态:辅料夹具沿用工件夹具造型,压扁 + 直角 + 描边补偿,并补偿 y 使垂直中心对齐手抓关节 */
36
+ private setPalletFixture;
25
37
  handleLoadResource(handleType: 'add' | 'remove'): void;
26
38
  }
@@ -14,4 +14,18 @@ export interface NamePlateOptions {
14
14
  screwHole?: boolean;
15
15
  zIndex?: number | string;
16
16
  }
17
+ /** 铭牌默认字号(未显式指定 width 时使用) */
18
+ export declare const NAME_PLATE_FONT_SIZE = 14;
19
+ /** 铭牌默认高度 */
20
+ export declare const NAME_PLATE_HEIGHT = 18;
21
+ /**
22
+ * 按字符实际显示宽度估算铭牌宽度:
23
+ * 中文等全角字符占 1×fontSize,英文/数字等半角字符占 0.5×fontSize,另加左右各 1 字符边距
24
+ */
25
+ export declare function calcNamePlateWidth(title: string, fontSize?: number): number;
26
+ /**
27
+ * 运行时更新铭牌文本:同步文字内容、铭牌宽度与两端螺钉孔位置
28
+ * (字号沿用创建时的设置;铭牌 around 为 center,宽度变化后仍保持居中显示)
29
+ */
30
+ export declare function updateNamePlate(box: Box, title: string): void;
17
31
  export declare function NamePlate(options: NamePlateOptions): Box;
@@ -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;