@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.
- package/AGENTS.md +281 -348
- package/dist/components/debug/DataLogPanel.vue.d.ts +29 -3
- package/dist/components/debug/PerformanceStats.vue.d.ts +1 -1
- package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +1 -2
- package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +4 -2
- package/dist/components/debug/ScriptRunner/index.vue.d.ts +11 -0
- package/dist/components/debug/ScriptRunner/script.d.ts +140 -41
- package/dist/components/debug/ScriptRunner/scriptFile.d.ts +92 -0
- package/dist/components/debug/WsProxy/index.vue.d.ts +10 -8
- package/dist/components/debug/WsProxy/proxy.d.ts +114 -53
- package/dist/components/editor/ControlBar/CaseManger.vue.d.ts +18 -2
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +2 -2
- package/dist/components/editor/ControlBar/PersistDialog.vue.d.ts +9 -0
- package/dist/components/index.js +8419 -6045
- package/dist/components/preview/index.vue.d.ts +6852 -4876
- package/dist/controller/AppController.d.ts +75 -4
- package/dist/controller/SocketDispatcher.d.ts +59 -0
- package/dist/fullscreen-BA3oea8O.js +53 -0
- package/dist/index-C6Liz-8o.js +1238 -0
- package/dist/index.js +36 -27
- package/dist/lingshu-smart/cases.json +5890 -14828
- package/dist/lingshu-smart/mockSocket.json +263 -0
- package/dist/lingshu-smart/wsProxyConfig.json +343 -720
- package/dist/playground/ViewPageDemo.vue.d.ts +14412 -10438
- package/dist/stores/index.js +1 -1
- package/dist/stores/useAppStore.d.ts +20570 -14641
- package/dist/stores/useDataStore.d.ts +21139 -14587
- package/dist/stores/useDebugStore.d.ts +14 -2
- package/dist/stores/useEditorStore.d.ts +3 -3
- package/dist/types/app.types.d.ts +1 -1
- package/dist/types/components/config.types.d.ts +16 -0
- package/dist/types/components/operating.types.d.ts +28 -19
- package/dist/types/enums.d.ts +22 -2
- package/dist/types/guards.d.ts +4 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/config.types.d.ts +41 -9
- package/dist/types/models/operating.types.d.ts +64 -74
- package/dist/types/socket.types.d.ts +275 -0
- package/dist/ui/abstract/ModelAbs.d.ts +42 -2
- package/dist/ui/components/Resource.d.ts +0 -1
- package/dist/ui/components/StationSlot.d.ts +8 -2
- package/dist/ui/components/StationSlotGroup.d.ts +28 -3
- package/dist/ui/models/DoubleJointRobot.d.ts +16 -4
- package/dist/ui/models/MachineTool.d.ts +6 -2
- package/dist/ui/models/MaterialTrack.d.ts +14 -2
- package/dist/ui/models/Pallet.d.ts +29 -9
- package/dist/ui/models/Rail.d.ts +9 -2
- package/dist/ui/models/ResourceOperationWindow.d.ts +2 -1
- package/dist/ui/models/ResourceStore.d.ts +7 -5
- package/dist/ui/models/Rgv.d.ts +6 -6
- package/dist/ui/models/ShuttleStation.d.ts +14 -4
- package/dist/ui/models/SingleJointRobot.d.ts +14 -4
- package/dist/ui/utils/resolveStationSlotLayers.d.ts +20 -0
- package/dist/ui/utils/resolveTypeStyle.d.ts +13 -0
- package/dist/useAppStore-DASwAOBy.js +7223 -0
- package/dist/utils/fullscreen.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/vite.d.ts +15 -0
- package/dist/vite.js +39 -0
- package/package.json +6 -2
- package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupBoth.vue.d.ts +0 -2
- package/dist/guards-aLOXCeCF.js +0 -35
- package/dist/index-Dsgrnpn0.js +0 -1186
- package/dist/useAppStore-CVyLAMtL.js +0 -6125
- /package/dist/components/editor/OptionCard/Equipment/{stationSlot/StationSlotGroup.vue.d.ts → models/ResourceStore.vue.d.ts} +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @File : fullscreen.ts
|
|
3
|
+
* @Desc. : 全屏切换 Composable(编辑器 / 预览看板共用)
|
|
4
|
+
* 监听 fullscreenchange 同步全屏状态:Esc 退出全屏等浏览器行为也能更新 isFullscreen
|
|
5
|
+
*/
|
|
6
|
+
export declare const useFullscreen: () => {
|
|
7
|
+
isFullscreen: import('vue').Ref<boolean, boolean>;
|
|
8
|
+
toggleFullscreen: () => void;
|
|
9
|
+
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* 方案 / 脚本烧录插件(仅开发服务器):
|
|
4
|
+
* - POST /lingshu-smart/__burn-cases → 写入宿主工程 public/lingshu-smart/cases.json(方案列表 ICase[])
|
|
5
|
+
* - POST /lingshu-smart/__burn-mock-socket → 写入宿主工程 public/lingshu-smart/mockSocket.json(脚本列表 ScriptStep[])
|
|
6
|
+
*
|
|
7
|
+
* 路径均以宿主 vite 进程工作目录为工程根。
|
|
8
|
+
* 用法:宿主 vite.config.ts 中注册 `plugins: [lingshuBurnCasesPlugin()]`。
|
|
9
|
+
* 请求体:纯数组(无响应头包装);响应:{ code: 0 } 或 { code: 4xx/500, msg: 错误信息 }。
|
|
10
|
+
* 分别与编辑器「保存方案」弹窗的「烧录进 cases.json」、脚本模拟器的「烧录」按钮配套使用。
|
|
11
|
+
*
|
|
12
|
+
* 注意:connect 中间件按**路径前缀**匹配,故两个路由前缀不可互相包含
|
|
13
|
+
* (如 `__burn-cases-scripts` 会被 cases 处理器抢先命中)。
|
|
14
|
+
*/
|
|
15
|
+
export declare function lingshuBurnCasesPlugin(): Plugin;
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import c from "node:fs";
|
|
2
|
+
import u from "node:path";
|
|
3
|
+
function p() {
|
|
4
|
+
const o = (e, a) => (s, t) => {
|
|
5
|
+
if (s.method !== "POST") {
|
|
6
|
+
t.statusCode = 405, t.end();
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
let r = "";
|
|
10
|
+
s.on("data", (n) => r += n), s.on("end", () => {
|
|
11
|
+
try {
|
|
12
|
+
const n = JSON.parse(r);
|
|
13
|
+
if (!Array.isArray(n)) {
|
|
14
|
+
t.statusCode = 400, t.setHeader("Content-Type", "application/json"), t.end(JSON.stringify({ code: 400, msg: a }));
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const i = u.resolve(process.cwd(), e);
|
|
18
|
+
c.writeFileSync(i, JSON.stringify(n, null, 2), "utf-8"), t.setHeader("Content-Type", "application/json"), t.end(JSON.stringify({ code: 0 }));
|
|
19
|
+
} catch (n) {
|
|
20
|
+
t.statusCode = 500, t.setHeader("Content-Type", "application/json"), t.end(JSON.stringify({ code: 500, msg: String(n) }));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
name: "lingshu-burn-cases",
|
|
26
|
+
configureServer(e) {
|
|
27
|
+
e.middlewares.use(
|
|
28
|
+
"/lingshu-smart/__burn-cases",
|
|
29
|
+
o("public/lingshu-smart/cases.json", "请求体应为方案列表数组(ICase[])")
|
|
30
|
+
), e.middlewares.use(
|
|
31
|
+
"/lingshu-smart/__burn-mock-socket",
|
|
32
|
+
o("public/lingshu-smart/mockSocket.json", "请求体应为脚本列表数组(ScriptStep[])")
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
p as lingshuBurnCasesPlugin
|
|
39
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jnrs/lingshu-smart",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "LingShu Smart 2D Digital Twin System.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jnrs",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"./stores": {
|
|
43
43
|
"import": "./dist/stores/index.js",
|
|
44
44
|
"types": "./dist/stores/index.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./vite": {
|
|
47
|
+
"import": "./dist/vite.js",
|
|
48
|
+
"types": "./dist/vite.d.ts"
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
"peerDependencies": {
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
"pinia-plugin-persistedstate": "^4.7.1",
|
|
53
57
|
"vue": "^3.5.22",
|
|
54
58
|
"vue-i18n": "^9.14.5",
|
|
55
|
-
"@jnrs/shared": "1.1.
|
|
59
|
+
"@jnrs/shared": "1.1.41"
|
|
56
60
|
},
|
|
57
61
|
"devDependencies": {
|
|
58
62
|
"@types/lodash-es": "^4.17.12",
|
package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupBoth.vue.d.ts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
package/dist/guards-aLOXCeCF.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { b as a } from "./index-Dsgrnpn0.js";
|
|
2
|
-
function t(s) {
|
|
3
|
-
return s?.className === a.MACHINE_TOOL;
|
|
4
|
-
}
|
|
5
|
-
function n(s) {
|
|
6
|
-
return s?.className === a.MACHINE_TOOL || s?.className === a.MARKING_MACHINE || s?.className === a.CLEANING_MACHINE || s?.className === a.LOADING_STATION || s?.className === a.RESOURCE_OPERATION_WINDOW;
|
|
7
|
-
}
|
|
8
|
-
function c(s) {
|
|
9
|
-
return s?.className === a.RESOURCE_STORE || s?.className === a.SINGLE_JOINT_ROBOT || s?.className === a.DOUBLE_JOINT_ROBOT || s?.className === a.RGV || s?.className === a.PALLET;
|
|
10
|
-
}
|
|
11
|
-
function O(s) {
|
|
12
|
-
return s?.className === a.SHUTTLE_STATION || s?.className === a.MATERIAL_TRACK;
|
|
13
|
-
}
|
|
14
|
-
function T(s) {
|
|
15
|
-
return s?.className === a.SINGLE_JOINT_ROBOT || s?.className === a.DOUBLE_JOINT_ROBOT;
|
|
16
|
-
}
|
|
17
|
-
function e(s) {
|
|
18
|
-
return s?.className === a.RAIL;
|
|
19
|
-
}
|
|
20
|
-
function o(s) {
|
|
21
|
-
return s?.className === a.SHUTTLE_STATION;
|
|
22
|
-
}
|
|
23
|
-
function i(s) {
|
|
24
|
-
return s?.className === a.PALLET;
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
c as a,
|
|
28
|
-
O as b,
|
|
29
|
-
T as c,
|
|
30
|
-
e as d,
|
|
31
|
-
o as e,
|
|
32
|
-
i as f,
|
|
33
|
-
n as h,
|
|
34
|
-
t as i
|
|
35
|
-
};
|