@jnrs/lingshu-smart 2.2.43 → 2.2.45
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.
- package/AGENTS.md +10 -6
- package/README.md +1 -1
- package/dist/components/debug/ScriptRunner/script.d.ts +6 -0
- package/dist/components/debug/WsProxy/MappingGrid.vue.d.ts +2 -0
- package/dist/components/debug/WsProxy/proxy.d.ts +9 -5
- package/dist/components/index.js +4875 -4511
- package/dist/components/preview/index.vue.d.ts +412 -0
- package/dist/controller/EditorController.d.ts +12 -0
- package/dist/guards-aLOXCeCF.js +35 -0
- package/dist/index-Dsgrnpn0.js +1186 -0
- package/dist/index.js +28 -52
- package/dist/lingshu-smart/wsProxyConfig.json +33 -20
- package/dist/playground/ViewPageDemo.vue.d.ts +824 -0
- package/dist/stores/index.js +1 -1
- package/dist/stores/useAppStore.d.ts +1236 -0
- package/dist/stores/useDataStore.d.ts +1303 -28
- package/dist/types/components/config.types.d.ts +12 -0
- package/dist/types/models/operating.types.d.ts +14 -3
- package/dist/ui/components/StationSlot.d.ts +7 -1
- package/dist/ui/components/StationSlotGroup.d.ts +3 -0
- package/dist/ui/components/Wave.d.ts +30 -0
- package/dist/ui/models/CleaningMachine.d.ts +3 -0
- package/dist/ui/models/MachineTool.d.ts +4 -0
- package/dist/ui/models/MarkingMachine.d.ts +9 -0
- package/dist/ui/models/MaterialTrack.d.ts +1 -1
- package/dist/ui/models/ShuttleStation.d.ts +1 -1
- package/dist/useAppStore-CVyLAMtL.js +6125 -0
- package/package.json +4 -4
- package/dist/index-Cz1A_VVJ.js +0 -11452
- package/dist/useAppStore-Ca0a-fvj.js +0 -15829
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { IRowData, IBaseConfig, IInteractiveState } from '../base.types';
|
|
2
2
|
import { EnumResourceType, EnumComponent } from '../enums';
|
|
3
3
|
export type IOriginAround = 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4
|
+
/**
|
|
5
|
+
* 工位槽运行时资源摘要(由 StationSlot 在资源增删时回写到原始工位配置,非持久化数据;
|
|
6
|
+
* 供点击回调中 layer.stationSlots[i].resources 实时查看该工位当前放置的资源)
|
|
7
|
+
*/
|
|
8
|
+
export interface ISlotResourceSnapshot {
|
|
9
|
+
name?: string;
|
|
10
|
+
resourceId?: string;
|
|
11
|
+
resourceType?: EnumResourceType;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
4
14
|
/**
|
|
5
15
|
* 工位
|
|
6
16
|
*/
|
|
@@ -21,6 +31,8 @@ export interface IStationSlotConfig extends IBaseConfig, IInteractiveState {
|
|
|
21
31
|
showShadow?: boolean;
|
|
22
32
|
showText?: boolean;
|
|
23
33
|
inFlow?: boolean;
|
|
34
|
+
/** 当前工位放置的资源摘要(运行时注入:资源增删时由 StationSlot 同步回写,不参与持久化) */
|
|
35
|
+
resources?: ISlotResourceSnapshot[];
|
|
24
36
|
/** 最近一次 operating 接收到的原始数据(运行时注入,供点击回调 data 读取) */
|
|
25
37
|
operatingData?: unknown;
|
|
26
38
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EnumModel, EnumResourceType } from '../enums';
|
|
2
2
|
import { IRowData } from '../base.types';
|
|
3
3
|
import { ILightOperating, IProgressOperating, IEntranceOperating, IResourceOperating } from '../components/operating.types';
|
|
4
|
-
/** 操作类型:model 画布模型操作;resource
|
|
5
|
-
export type EnumOperatingType = 'model' | 'resource';
|
|
4
|
+
/** 操作类型:model 画布模型操作;resource 全局资源操作;resetAll 全部复位操作 */
|
|
5
|
+
export type EnumOperatingType = 'model' | 'resource' | 'resetAll';
|
|
6
6
|
/**
|
|
7
7
|
* 设备运转基类
|
|
8
8
|
*/
|
|
@@ -23,6 +23,13 @@ export interface IGlobalResourceOperating {
|
|
|
23
23
|
resourceIds: string[];
|
|
24
24
|
rawData: IRowData;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* 全部复位操作(不绑定具体设备,画布所有模型按初始配置重建,与「一键复位画布」一致)
|
|
28
|
+
*/
|
|
29
|
+
export interface IResetAllOperating {
|
|
30
|
+
operatingType: 'resetAll';
|
|
31
|
+
rawData?: IRowData;
|
|
32
|
+
}
|
|
26
33
|
/**
|
|
27
34
|
* 机床运转状态
|
|
28
35
|
*/
|
|
@@ -32,6 +39,8 @@ export interface IMachineToolOperating extends IModelOperating {
|
|
|
32
39
|
progress?: IProgressOperating;
|
|
33
40
|
entrance?: IEntranceOperating;
|
|
34
41
|
stationRotatable?: boolean;
|
|
42
|
+
/** 是否工作中:为 true 时工位容器玻璃背景呼吸闪动(默认 false) */
|
|
43
|
+
isWorking?: boolean;
|
|
35
44
|
}
|
|
36
45
|
/**
|
|
37
46
|
* 装载站运转状态
|
|
@@ -99,6 +108,8 @@ export interface ICleaningMachineOperating extends IModelOperating {
|
|
|
99
108
|
light?: Omit<ILightOperating, 'rotating'>;
|
|
100
109
|
progress?: IProgressOperating;
|
|
101
110
|
entrance?: IEntranceOperating;
|
|
111
|
+
/** 是否工作中:为 true 时显示工位容器内的波浪流动效果(默认 false) */
|
|
112
|
+
isWorking?: boolean;
|
|
102
113
|
}
|
|
103
114
|
/**
|
|
104
115
|
* 单关节机器人运转状态
|
|
@@ -184,4 +195,4 @@ export interface IResourceOperationWindowOperating extends IModelOperating {
|
|
|
184
195
|
/**
|
|
185
196
|
* 设备层运转状态的联合类型
|
|
186
197
|
*/
|
|
187
|
-
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMaterialTrackOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IResourceOperationWindowOperating | IGlobalResourceOperating;
|
|
198
|
+
export type ILayerOperating = IMachineToolOperating | ILoadingStationOperating | IShuttleStationOperating | IMaterialTrackOperating | IMarkingMachineOperating | ICleaningMachineOperating | ISingleJointRobotOperating | IDoubleJointRobotOperating | IRGVOperating | IRailOperating | IResourceStoreOperating | IPalletOperating | IResourceOperationWindowOperating | IGlobalResourceOperating | IResetAllOperating;
|
|
@@ -13,7 +13,13 @@ export declare const DEFAULT_SLOT: IStationSlotConfig;
|
|
|
13
13
|
export declare class StationSlot extends ComponentAbs<IStationSlotConfig> {
|
|
14
14
|
private children;
|
|
15
15
|
private pendingDestroy;
|
|
16
|
-
|
|
16
|
+
/** 原始工位配置引用(模型 config 内的 stationSlots[i],运行时资源摘要回写目标;在 super 后保存,避开 cloneDeep) */
|
|
17
|
+
private sourceSlot?;
|
|
18
|
+
constructor(options: IStationSlotConfig & {
|
|
19
|
+
sourceSlot?: IStationSlotConfig;
|
|
20
|
+
});
|
|
21
|
+
/** 同步当前资源摘要到原始工位配置(供点击回调中 layer.stationSlots[i].resources 实时查看,仅写模型 config 副本,不影响 store) */
|
|
22
|
+
private syncResources;
|
|
17
23
|
protected createUi(): Box;
|
|
18
24
|
private get autoFixRotation();
|
|
19
25
|
private get autoCornerRadius();
|
|
@@ -10,6 +10,9 @@ import { ComponentAbs } from '../abstract/ComponentAbs';
|
|
|
10
10
|
export declare class StationSlotGroup extends ComponentAbs<IStationSlotGroupConfig> {
|
|
11
11
|
private parentRotation?;
|
|
12
12
|
private stationSlotInstances;
|
|
13
|
+
/** 原始工位槽数组引用(模型 config 的 stationSlots,构造时保存;cloneDeep 后 this.config 内为副本,
|
|
14
|
+
* 保留此引用供 StationSlot 回写运行时资源摘要,使点击回调中 layer.stationSlots[i].resources 可见) */
|
|
15
|
+
private sourceSlots;
|
|
13
16
|
constructor(options: IStationSlotGroupConfig, parentRotation?: number);
|
|
14
17
|
get autoSize(): {
|
|
15
18
|
width: number;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Box } from 'leafer';
|
|
2
|
+
/**
|
|
3
|
+
* 波浪流动动画(SVG Path):
|
|
4
|
+
* 由左右两段正弦波拼接成完整循环,通过沿 x 轴无缝平移实现「向左侧持续流动」的效果。
|
|
5
|
+
* 用于工位容器内作为液体/水流等装饰背景,渲染在工位槽位层级之下。
|
|
6
|
+
*/
|
|
7
|
+
export interface IWaveFlowConfig {
|
|
8
|
+
/** 水平位置(容器局部坐标,一般是 0) */
|
|
9
|
+
x?: number;
|
|
10
|
+
/** 垂直位置(容器局部坐标) */
|
|
11
|
+
y?: number;
|
|
12
|
+
/** 单个波形周期宽度 */
|
|
13
|
+
period: number;
|
|
14
|
+
/** 波浪带高度(虚线表面以下的填充高度) */
|
|
15
|
+
height: number;
|
|
16
|
+
/** 填充颜色 */
|
|
17
|
+
color?: string;
|
|
18
|
+
/** 透明度 */
|
|
19
|
+
opacity?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class WaveFlow {
|
|
22
|
+
private readonly _ui;
|
|
23
|
+
private readonly period;
|
|
24
|
+
constructor(config: IWaveFlowConfig);
|
|
25
|
+
/** 构建单个波段的闭合 Path(表面正弦起伏 + 填充到底部) */
|
|
26
|
+
private buildWave;
|
|
27
|
+
get ui(): Box;
|
|
28
|
+
/** 启动持续流动动画(尊重全局「动画开关」,关闭时保持静止) */
|
|
29
|
+
play(): void;
|
|
30
|
+
}
|
|
@@ -10,7 +10,10 @@ export declare class CleaningMachine extends ModelAbs<ICleaningMachineConfig> {
|
|
|
10
10
|
private progress;
|
|
11
11
|
private entrance;
|
|
12
12
|
private stationSlotGroup;
|
|
13
|
+
private wave;
|
|
13
14
|
protected createUi(): Box;
|
|
15
|
+
/** 创建工位容器内的波浪流动效果(渲染在工位槽位层级之下,默认隐藏,受 operating 的 isWorking 控制) */
|
|
16
|
+
private createWave;
|
|
14
17
|
protected operating(data: ICleaningMachineOperating): void;
|
|
15
18
|
protected collectStationSlotGroups(): StationSlotGroup[];
|
|
16
19
|
}
|
|
@@ -12,10 +12,14 @@ export declare class MachineTool extends ModelAbs<IMachineToolConfig> {
|
|
|
12
12
|
private entrance;
|
|
13
13
|
private stationSlotGroup;
|
|
14
14
|
private stationContainer;
|
|
15
|
+
/** 工位容器玻璃背景(isWorking 时呼吸闪动) */
|
|
16
|
+
private glass;
|
|
15
17
|
private stationContainerBaseRotation;
|
|
16
18
|
private animating;
|
|
17
19
|
protected createUi(): Box;
|
|
18
20
|
protected operating(data: IMachineToolOperating): void;
|
|
21
|
+
/** 玻璃背景呼吸效果:工作中开启动画(明暗往复),结束恢复常亮 */
|
|
22
|
+
private setWorking;
|
|
19
23
|
protected collectStationSlotGroups(): StationSlotGroup[];
|
|
20
24
|
private rotateStationContainerWithAnimation;
|
|
21
25
|
}
|
|
@@ -10,9 +10,18 @@ export declare class MarkingMachine extends ModelAbs<IMarkingMachineConfig> {
|
|
|
10
10
|
private progress;
|
|
11
11
|
private entrance;
|
|
12
12
|
private stationSlotGroup;
|
|
13
|
+
private lastLaserActive;
|
|
14
|
+
private laserTimers;
|
|
13
15
|
protected createUi(): Box;
|
|
14
16
|
protected operating(data: IMarkingMachineOperating): void;
|
|
15
17
|
protected collectStationSlotGroups(): StationSlotGroup[];
|
|
16
18
|
private renderLaser;
|
|
17
19
|
private setLaserWorking;
|
|
20
|
+
/** 电报节奏:亮/灭间隔毫秒,长短不一循环播放,形成无序敲击感 */
|
|
21
|
+
private static readonly TELEGRAPH_RHYTHM;
|
|
22
|
+
/** 播放某激光工位的电报节奏闪动(每轮亮→灭后按节奏数组不定长间隔继续) */
|
|
23
|
+
private playTelegraph;
|
|
24
|
+
/** 停止指定激光工位的电报节奏动画 */
|
|
25
|
+
private stopTelegraph;
|
|
26
|
+
destroyUI(): void;
|
|
18
27
|
}
|
|
@@ -26,6 +26,6 @@ export declare class MaterialTrack extends ModelAbs<IMaterialTrackConfig> {
|
|
|
26
26
|
private buildLayers;
|
|
27
27
|
protected createUi(): Box;
|
|
28
28
|
protected operating(data: IMaterialTrackOperating): void;
|
|
29
|
-
/** 资源增删:data.resource 提供 layer(>0)
|
|
29
|
+
/** 资源增删:data.resource 提供 layer(>0) 时定位到该层;缺省时仅当唯一一层包含该工位序号才操作 */
|
|
30
30
|
private handleResourceOperating;
|
|
31
31
|
}
|
|
@@ -29,7 +29,7 @@ export declare class ShuttleStation extends ModelAbs<IShuttleStationConfig> {
|
|
|
29
29
|
private buildBaseAndWheels;
|
|
30
30
|
protected createUi(): Box;
|
|
31
31
|
protected operating(data: IShuttleStationOperating): void;
|
|
32
|
-
/** 资源增删:data.resource 提供 layer(>0)
|
|
32
|
+
/** 资源增删:data.resource 提供 layer(>0) 时定位到该层;缺省时仅当唯一一层包含该工位序号才操作 */
|
|
33
33
|
private handleResourceOperating;
|
|
34
34
|
private applyLayerLightColor;
|
|
35
35
|
private resolveStatusColor;
|