@jnrs/lingshu-smart 3.0.0 → 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.
- package/AGENTS.md +7 -6
- package/dist/components/index.js +443 -435
- package/dist/components/preview/index.vue.d.ts +312 -0
- package/dist/{fullscreen-BA3oea8O.js → fullscreen-cF8Z5e2Z.js} +6 -6
- package/dist/index.js +16 -16
- package/dist/lingshu-smart/cases.json +2844 -2798
- package/dist/lingshu-smart/mockSocket.json +31 -2
- package/dist/playground/ViewPageDemo.vue.d.ts +624 -0
- package/dist/stores/index.js +1 -1
- package/dist/stores/useAppStore.d.ts +936 -0
- package/dist/stores/useDataStore.d.ts +936 -0
- package/dist/types/guards.d.ts +1 -1
- package/dist/types/models/operating.types.d.ts +5 -0
- package/dist/types/socket.types.d.ts +7 -0
- package/dist/ui/abstract/ModelAbs.d.ts +7 -0
- package/dist/ui/models/SingleJointRobot.d.ts +3 -1
- package/dist/ui/shapes/NamePlate.d.ts +14 -0
- package/dist/{useAppStore-DASwAOBy.js → useAppStore-DWFfsey0.js} +673 -635
- package/package.json +2 -2
- /package/dist/components/editor/OptionCard/Equipment/models/{SingleJointRobot.vue.d.ts → JointRobot.vue.d.ts} +0 -0
package/dist/types/guards.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare function hasStationSlotLayers(layer: ILayer | null): layer is Ext
|
|
|
13
13
|
stationSlotGroups?: any[];
|
|
14
14
|
}>;
|
|
15
15
|
export declare function isResourceStore(layer: ILayer | null): layer is import('./index').IResourceStoreConfig;
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function isJointRobot(layer: ILayer | null): layer is import('./index').ISingleJointRobotConfig | import('./index').IDoubleJointRobotConfig;
|
|
17
17
|
export declare function isRail(layer: ILayer | null): layer is import('./index').IRailConfig;
|
|
18
18
|
export declare function isShuttleStation(layer: ILayer | null): layer is import('./index').IShuttleStationConfig;
|
|
19
19
|
export declare function isPallet(layer: ILayer | null): layer is Extract<ILayer, {
|
|
@@ -27,6 +27,11 @@ export interface IModelOperating {
|
|
|
27
27
|
device_station?: number;
|
|
28
28
|
/** 设备状态(协议 device_state 状态码;画布默认不做任何处理,由使用方按需在代理器自行配置映射) */
|
|
29
29
|
device_state?: number;
|
|
30
|
+
/**
|
|
31
|
+
* 铭牌文本(全部设备通用):传入时更新画布铭牌文字,并按文字长度重算铭牌宽度与两端螺钉孔位置;
|
|
32
|
+
* 仅影响画布 UI,不写入设备配置——复位(scene_reset)后铭牌回到配置里的初始文本,动态文本需复位后重新下发
|
|
33
|
+
*/
|
|
34
|
+
nameplate?: string;
|
|
30
35
|
raw_data: IRowData;
|
|
31
36
|
resource?: IResourceOperating;
|
|
32
37
|
}
|
|
@@ -136,6 +136,11 @@ export interface DeviceCommandPayload {
|
|
|
136
136
|
raw_data?: object;
|
|
137
137
|
/** 设备状态(状态码);画布默认不做处理,由使用方按需在代理器自行配置映射 */
|
|
138
138
|
device_state?: number;
|
|
139
|
+
/**
|
|
140
|
+
* 铭牌文本(全部设备通用):传入时更新画布铭牌文字(宽度按文字长度重算);
|
|
141
|
+
* 仅影响画布 UI,scene_reset 后回到配置里的初始文本
|
|
142
|
+
*/
|
|
143
|
+
nameplate?: string;
|
|
139
144
|
light?: SocketLight;
|
|
140
145
|
progress?: SocketProgress;
|
|
141
146
|
passage?: SocketPassage;
|
|
@@ -208,6 +213,8 @@ export interface DeviceInitItem {
|
|
|
208
213
|
device_station?: number;
|
|
209
214
|
/** 设备状态(状态码);画布默认不做处理,由使用方按需在代理器自行配置映射 */
|
|
210
215
|
device_state?: number;
|
|
216
|
+
/** 铭牌文本(全部设备通用):传入时更新画布铭牌文字(宽度按文字长度重算) */
|
|
217
|
+
nameplate?: string;
|
|
211
218
|
light?: SocketLight;
|
|
212
219
|
progress?: SocketProgress;
|
|
213
220
|
passage?: SocketPassage;
|
|
@@ -16,6 +16,13 @@ export declare abstract class ModelAbs<T extends ILayer = ILayer> extends BaseAb
|
|
|
16
16
|
*/
|
|
17
17
|
get moveDuration(): number;
|
|
18
18
|
handleOperation: (data: ILayerOperating) => void;
|
|
19
|
+
/**
|
|
20
|
+
* 更新设备铭牌文本(铭牌宽度、文字宽度与两端螺钉孔位置同步重算)
|
|
21
|
+
* 仅作用于画布 UI,不写入 config:复位(resetUI)后铭牌回到配置里的初始文本,
|
|
22
|
+
* 动态文本(如「名称(资源数/工位数)」)需由使用方在 scene_reset 后重新下发
|
|
23
|
+
* @param title 铭牌文本
|
|
24
|
+
*/
|
|
25
|
+
setNameplate(title: string): void;
|
|
19
26
|
/**
|
|
20
27
|
* 将最近一次 operating 接收到的原始数据写入模型 config 及整棵 UI 树的 data 属性,
|
|
21
28
|
* 使点击回调(onTap/onMenuTap/onDragEnd)中的 layer 与 data 都能读取到各自 operatingData。
|
|
@@ -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;
|
|
@@ -18,6 +18,8 @@ export declare class SingleJointRobot extends ModelAbs<ISingleJointRobotConfig>
|
|
|
18
18
|
private slotLayerIndexes;
|
|
19
19
|
get currentFixture(): EnumResourceType | 'none';
|
|
20
20
|
set currentFixture(type: EnumResourceType | 'none');
|
|
21
|
+
/** 移动动画时长:与 moveX 默认 0.5s 一致,供托盘跟随等联动同步 */
|
|
22
|
+
get moveDuration(): number;
|
|
21
23
|
protected createUi(): Box;
|
|
22
24
|
protected operating(data: ISingleJointRobotOperating): void;
|
|
23
25
|
/** 资源路由(与夹具装饰无关):device_layer 层号优先(当前夹具绑定了层时以绑定层为索引基准),其次工位号(优先类型匹配),最后首个工位组 */
|
|
@@ -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;
|