@jnrs/lingshu-smart 2.2.35 → 2.2.37

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 (35) hide show
  1. package/AGENTS.md +35 -12
  2. package/README.md +10 -10
  3. package/dist/assets/data/editor_preset_menu.d.ts +8 -0
  4. package/dist/components/debug/DebugPanel.vue.d.ts +1 -60
  5. package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +13 -4
  6. package/dist/components/debug/WsProxy/index.vue.d.ts +3 -6
  7. package/dist/components/debug/WsProxy/proxy.d.ts +16 -4
  8. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +87 -87
  9. package/dist/components/editor/OptionCard/Equipment/models/Pallet.vue.d.ts +2 -0
  10. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupDialog.vue.d.ts +8 -0
  11. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupLayers.vue.d.ts +2 -0
  12. package/dist/components/index.d.ts +1 -2
  13. package/dist/components/index.js +6452 -31974
  14. package/dist/components/preview/index.vue.d.ts +504 -0
  15. package/dist/composables/useCaseLoading.d.ts +10 -0
  16. package/dist/index-YxSpi9Af.js +131 -0
  17. package/dist/index.js +41 -145
  18. package/dist/lingshu-smart/wsProxyConfig.json +30 -0
  19. package/dist/locales/index.js +2 -2
  20. package/dist/playground/ViewPageDemo.vue.d.ts +1107 -103
  21. package/dist/stores/index.js +7 -0
  22. package/dist/stores/useAppStore.d.ts +1651 -139
  23. package/dist/stores/useDataStore.d.ts +1651 -139
  24. package/dist/stores/useDebugStore.d.ts +30 -12
  25. package/dist/types/components/config.types.d.ts +5 -0
  26. package/dist/types/enums.d.ts +2 -1
  27. package/dist/types/guards.d.ts +7 -1
  28. package/dist/types/models/config.types.d.ts +29 -1
  29. package/dist/types/models/operating.types.d.ts +15 -1
  30. package/dist/ui/models/Pallet.d.ts +25 -0
  31. package/dist/ui/models/ShuttleStation.d.ts +17 -4
  32. package/dist/useAppStore-DQI1btcH.js +26123 -0
  33. package/package.json +6 -2
  34. package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +0 -14
  35. package/dist/components/debug/WsProxy/broadcast.d.ts +0 -31
@@ -45,7 +45,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
45
45
  wsProxyConfig: import('vue').Ref<{
46
46
  name: string;
47
47
  version: number;
48
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
48
49
  wsUrl?: string | undefined;
50
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
51
+ autoConnect?: boolean | undefined;
49
52
  payloadKey?: string | undefined;
50
53
  sourceTypeField?: string | undefined;
51
54
  heartbeatInterval?: number | undefined;
@@ -60,9 +63,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
60
63
  source?: string | undefined;
61
64
  constant?: boolean | number | string | undefined;
62
65
  valueMap?: Record<string, boolean | number | string> | undefined;
63
- defaultValue?: boolean | number | string | undefined;
66
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
64
67
  enabled?: boolean | undefined;
65
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
68
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
66
69
  transformType?: "width" | "height" | undefined;
67
70
  transformPrecision?: number | undefined;
68
71
  dictName?: string | undefined;
@@ -99,7 +102,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
99
102
  }, WsProxyConfig | {
100
103
  name: string;
101
104
  version: number;
105
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
102
106
  wsUrl?: string | undefined;
107
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
108
+ autoConnect?: boolean | undefined;
103
109
  payloadKey?: string | undefined;
104
110
  sourceTypeField?: string | undefined;
105
111
  heartbeatInterval?: number | undefined;
@@ -114,9 +120,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
114
120
  source?: string | undefined;
115
121
  constant?: boolean | number | string | undefined;
116
122
  valueMap?: Record<string, boolean | number | string> | undefined;
117
- defaultValue?: boolean | number | string | undefined;
123
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
118
124
  enabled?: boolean | undefined;
119
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
125
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
120
126
  transformType?: "width" | "height" | undefined;
121
127
  transformPrecision?: number | undefined;
122
128
  dictName?: string | undefined;
@@ -204,7 +210,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
204
210
  wsProxyConfig: import('vue').Ref<{
205
211
  name: string;
206
212
  version: number;
213
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
207
214
  wsUrl?: string | undefined;
215
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
216
+ autoConnect?: boolean | undefined;
208
217
  payloadKey?: string | undefined;
209
218
  sourceTypeField?: string | undefined;
210
219
  heartbeatInterval?: number | undefined;
@@ -219,9 +228,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
219
228
  source?: string | undefined;
220
229
  constant?: boolean | number | string | undefined;
221
230
  valueMap?: Record<string, boolean | number | string> | undefined;
222
- defaultValue?: boolean | number | string | undefined;
231
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
223
232
  enabled?: boolean | undefined;
224
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
233
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
225
234
  transformType?: "width" | "height" | undefined;
226
235
  transformPrecision?: number | undefined;
227
236
  dictName?: string | undefined;
@@ -258,7 +267,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
258
267
  }, WsProxyConfig | {
259
268
  name: string;
260
269
  version: number;
270
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
261
271
  wsUrl?: string | undefined;
272
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
273
+ autoConnect?: boolean | undefined;
262
274
  payloadKey?: string | undefined;
263
275
  sourceTypeField?: string | undefined;
264
276
  heartbeatInterval?: number | undefined;
@@ -273,9 +285,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
273
285
  source?: string | undefined;
274
286
  constant?: boolean | number | string | undefined;
275
287
  valueMap?: Record<string, boolean | number | string> | undefined;
276
- defaultValue?: boolean | number | string | undefined;
288
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
277
289
  enabled?: boolean | undefined;
278
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
290
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
279
291
  transformType?: "width" | "height" | undefined;
280
292
  transformPrecision?: number | undefined;
281
293
  dictName?: string | undefined;
@@ -363,7 +375,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
363
375
  wsProxyConfig: import('vue').Ref<{
364
376
  name: string;
365
377
  version: number;
378
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
366
379
  wsUrl?: string | undefined;
380
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
381
+ autoConnect?: boolean | undefined;
367
382
  payloadKey?: string | undefined;
368
383
  sourceTypeField?: string | undefined;
369
384
  heartbeatInterval?: number | undefined;
@@ -378,9 +393,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
378
393
  source?: string | undefined;
379
394
  constant?: boolean | number | string | undefined;
380
395
  valueMap?: Record<string, boolean | number | string> | undefined;
381
- defaultValue?: boolean | number | string | undefined;
396
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
382
397
  enabled?: boolean | undefined;
383
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
398
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
384
399
  transformType?: "width" | "height" | undefined;
385
400
  transformPrecision?: number | undefined;
386
401
  dictName?: string | undefined;
@@ -417,7 +432,10 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
417
432
  }, WsProxyConfig | {
418
433
  name: string;
419
434
  version: number;
435
+ dataSource?: import('../components/debug/WsProxy/proxy').WsProxyDataSource | undefined;
420
436
  wsUrl?: string | undefined;
437
+ requestMode?: import('../components/debug/WsProxy/proxy').WsProxyRequestMode | undefined;
438
+ autoConnect?: boolean | undefined;
421
439
  payloadKey?: string | undefined;
422
440
  sourceTypeField?: string | undefined;
423
441
  heartbeatInterval?: number | undefined;
@@ -432,9 +450,9 @@ export declare const useDebugStore: import('pinia').StoreDefinition<"@jnrs/lings
432
450
  source?: string | undefined;
433
451
  constant?: boolean | number | string | undefined;
434
452
  valueMap?: Record<string, boolean | number | string> | undefined;
435
- defaultValue?: boolean | number | string | undefined;
453
+ defaultValue?: (boolean | number | string | Record<string, unknown>) | undefined;
436
454
  enabled?: boolean | undefined;
437
- transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "condition" | undefined;
455
+ transform?: "percentToPixel" | "runtimeToPixel" | "dictLabel" | "dictColor" | "dictColorMap" | "condition" | undefined;
438
456
  transformType?: "width" | "height" | undefined;
439
457
  transformPrecision?: number | undefined;
440
458
  dictName?: string | undefined;
@@ -15,6 +15,10 @@ export interface IStationSlotConfig extends IBaseConfig, IInteractiveState {
15
15
  origin?: IOriginAround;
16
16
  around?: IOriginAround;
17
17
  hideBounds?: boolean;
18
+ background?: string;
19
+ stroke?: string;
20
+ strokeWidth?: number;
21
+ textColor?: string;
18
22
  }
19
23
  /**
20
24
  * 布局选项
@@ -38,6 +42,7 @@ export interface IStationSlotGroupConfig extends Omit<IBaseConfig, 'width' | 'he
38
42
  around?: IOriginAround;
39
43
  stationSlots: IStationSlotConfig[];
40
44
  flowOptions: IFlowConfig;
45
+ hideBounds?: boolean;
41
46
  }
42
47
  /**
43
48
  * 资源
@@ -20,7 +20,8 @@ export declare enum EnumModel {
20
20
  LOADING_STATION = "LoadingStation",
21
21
  SHUTTLE_STATION = "ShuttleStation",
22
22
  RAIL = "Rail",
23
- RESOURCE_STORE = "ResourceStore"
23
+ RESOURCE_STORE = "ResourceStore",
24
+ PALLET = "Pallet"
24
25
  }
25
26
  export declare enum EnumComponent {
26
27
  STATION_SLOT = "StationSlot",
@@ -1,4 +1,4 @@
1
- import { ILayer } from './index';
1
+ import { ILayer, EnumModel } from './index';
2
2
  export declare function isMachineTool(layer: ILayer | null): layer is import('./index').IMachineToolConfig;
3
3
  export declare function hasStationSlotGroup(layer: ILayer | null): layer is Extract<ILayer, {
4
4
  stationSlotGroup?: any;
@@ -7,6 +7,12 @@ export declare function isStationSlotGroupBoth(layer: ILayer | null): layer is E
7
7
  stationSlotGroupPallet?: any;
8
8
  stationSlotGroupTool?: any;
9
9
  }>;
10
+ export declare function hasStationSlotLayers(layer: ILayer | null): layer is Extract<ILayer, {
11
+ stationSlotGroups?: any[];
12
+ }>;
10
13
  export declare function hasFixtureChange(layer: ILayer | null): layer is import('./index').ISingleJointRobotConfig | import('./index').IDoubleJointRobotConfig;
11
14
  export declare function isRail(layer: ILayer | null): layer is import('./index').IRailConfig;
12
15
  export declare function isShuttleStation(layer: ILayer | null): layer is import('./index').IShuttleStationConfig;
16
+ export declare function isPallet(layer: ILayer | null): layer is Extract<ILayer, {
17
+ className: EnumModel.PALLET;
18
+ }>;
@@ -43,11 +43,26 @@ export interface ILoadingStationConfig extends IModel {
43
43
  stationContainerDirection?: 'horizontal' | 'vertical';
44
44
  stationSlotGroup?: IStationSlotGroupConfig;
45
45
  }
46
+ /**
47
+ * 接驳站工位层配置
48
+ */
49
+ export interface IShuttleStationLayerConfig {
50
+ /** 层索引(从 1 开始) */
51
+ index: number;
52
+ /** 工位组配置(托盘或刀具) */
53
+ stationSlotGroup: IStationSlotGroupConfig;
54
+ /** 层状态灯颜色(默认 '#666' 灰色,运行时由 layerStatus 驱动) */
55
+ lightColor?: string;
56
+ /** 是否显示层状态灯(默认 true) */
57
+ lightEnabled?: boolean;
58
+ }
46
59
  /**
47
60
  * 接驳站
48
61
  */
49
62
  export interface IShuttleStationConfig extends IModel {
50
63
  className: EnumModel.SHUTTLE_STATION;
64
+ /** 多工位层配置数组(一层=一个工位组,可托盘或刀具) */
65
+ stationSlotGroups?: IShuttleStationLayerConfig[];
51
66
  }
52
67
  /**
53
68
  * 打标机
@@ -114,7 +129,20 @@ export interface IResourceStoreConfig extends IModel {
114
129
  stationSlotGroupPallet?: IStationSlotGroupConfig;
115
130
  stationSlotGroupTool?: IStationSlotGroupConfig;
116
131
  }
132
+ /**
133
+ * 托盘(独立设备)
134
+ * 参考 ResourceStore:带铭牌、状态灯;主体背景色可配置(默认 #3C3C3C)
135
+ * 支持托盘/刀具两个独立工位组
136
+ */
137
+ export interface IPalletConfig extends IModel {
138
+ className: EnumModel.PALLET;
139
+ /** 主体背景色(默认 '#3C3C3C') */
140
+ backgroundColor?: string;
141
+ flowOptions?: IFlowConfig;
142
+ stationSlotGroupPallet?: IStationSlotGroupConfig;
143
+ stationSlotGroupTool?: IStationSlotGroupConfig;
144
+ }
117
145
  /**
118
146
  * 设备层联合类型
119
147
  */
120
- export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig;
148
+ export type ILayer = IMachineToolConfig | ILoadingStationConfig | IShuttleStationConfig | IMarkingMachineConfig | ICleaningMachineConfig | ISingleJointRobotConfig | IDoubleJointRobotConfig | IRGVConfig | IRailConfig | IResourceStoreConfig | IPalletConfig;
@@ -49,6 +49,10 @@ export interface ILoadingStationOperating extends IModelOperating {
49
49
  export interface IShuttleStationOperating extends IModelOperating {
50
50
  className: EnumModel.SHUTTLE_STATION;
51
51
  light?: Omit<ILightOperating, 'rotating'>;
52
+ /** 各层工位组运行状态,键为层索引(1-based),值为状态码或颜色字符串
53
+ * 代理器 dictColorMap 转换后值为颜色字符串;未转换时值为状态数字码
54
+ */
55
+ layerStatus?: Record<number, number | string>;
52
56
  }
53
57
  /**
54
58
  * 打标机站点状态
@@ -127,7 +131,17 @@ export interface IResourceStoreOperating extends IModelOperating {
127
131
  x?: number;
128
132
  resource?: IResourceOperating;
129
133
  }
134
+ /**
135
+ * 托盘运转状态
136
+ */
137
+ export interface IPalletOperating extends IModelOperating {
138
+ className: EnumModel.PALLET;
139
+ light?: ILightOperating;
140
+ x?: number;
141
+ y?: number;
142
+ resource?: IResourceOperating;
143
+ }
130
144
  /**
131
145
  * 设备层运转状态的联合类型
132
146
  */
133
- export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IGlobalResourceOperating;
147
+ export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IGlobalResourceOperating;
@@ -0,0 +1,25 @@
1
+ import { IPalletConfig, IPalletOperating } from '../../types';
2
+ import { Box } from 'leafer';
3
+ import { ModelAbs } from '../abstract/ModelAbs';
4
+ import { StationSlotGroup } from '../components/StationSlotGroup';
5
+ /**
6
+ * 托盘(独立设备)
7
+ * 参考 ResourceStore:带铭牌、状态灯、托盘/刀具双工位组;
8
+ * 主体样式参考 ShuttleStation 的 layerContainer(内嵌纹理、溢出隐藏),支持修改背景色。
9
+ */
10
+ export declare class Pallet extends ModelAbs<IPalletConfig> {
11
+ private static readonly CORNER_RADIUS;
12
+ private light;
13
+ private stationSlotGroupPallet;
14
+ private stationSlotGroupTool;
15
+ protected createUi(): Box;
16
+ private moveX;
17
+ private moveY;
18
+ protected operating(data: IPalletOperating): void;
19
+ /**
20
+ * 判断本托盘是否包含指定工位号
21
+ * 用于同一 id 的 Pallet 被拆分为多个 UI 时的三级匹配
22
+ */
23
+ containsStationIndex(index: number): boolean;
24
+ protected collectStationSlotGroups(): StationSlotGroup[];
25
+ }
@@ -3,19 +3,32 @@ import { Box } from 'leafer';
3
3
  import { ModelAbs } from '../abstract/ModelAbs';
4
4
  /**
5
5
  * 接驳站(ShuttleStation)
6
- * 整体为 U 型结构,通过单个 Path 元素一体化绘制,内部透明;
7
- * U 型下方底部区域较宽大,用于放置铭牌与长条状态灯;
8
- * 该模型仅支持 light 运转状态
6
+ * 整体为 U 型结构,支持多层工位组配置(每层 = 一个工位组容器);
7
+ * 每层独立拥有状态灯,通过 layerStatus 字典数据驱动颜色;
8
+ * 主体底部有 #EA9734 底座 + 两端半露轮子。
9
9
  */
10
10
  export declare class ShuttleStation extends ModelAbs<IShuttleStationConfig> {
11
11
  private static readonly WALL_THICKNESS;
12
12
  private static readonly BASE_HEIGHT;
13
- private static readonly BOTTOM_RADIUS;
14
13
  private static readonly LIGHT_Y_OFFSET;
15
14
  private static readonly NAME_PLATE_Y_OFFSET;
15
+ private static readonly LAYER_GAP;
16
+ private static readonly BASE_THICKNESS;
17
+ private static readonly BASE_EXTEND;
18
+ private static readonly WHEEL_SIZE;
19
+ private static readonly WHEEL_INSET;
20
+ private static readonly WHEEL_COVER_RATIO;
16
21
  private light;
22
+ private layerLights;
23
+ private layerGroups;
24
+ private lastLayerStatus;
17
25
  private buildUPath;
18
26
  private buildOutlinePath;
27
+ private buildLayers;
28
+ private buildBaseAndWheels;
19
29
  protected createUi(): Box;
20
30
  protected operating(data: IShuttleStationOperating): void;
31
+ private applyLayerStatus;
32
+ private resolveStatusColor;
33
+ private statusToColor;
21
34
  }