@jnrs/lingshu-smart 2.2.35 → 2.2.36
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 +33 -12
- package/README.md +8 -8
- package/dist/components/debug/DebugPanel.vue.d.ts +1 -60
- package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +13 -4
- package/dist/components/debug/WsProxy/index.vue.d.ts +3 -6
- package/dist/components/debug/WsProxy/proxy.d.ts +16 -4
- package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +87 -87
- package/dist/components/editor/OptionCard/Equipment/models/Pallet.vue.d.ts +2 -0
- package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupDialog.vue.d.ts +4 -0
- package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupLayers.vue.d.ts +2 -0
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.js +13337 -13018
- package/dist/components/preview/index.vue.d.ts +296 -0
- package/dist/index.js +94 -86
- package/dist/lingshu-smart/wsProxyConfig.json +30 -0
- package/dist/locales/index.js +2 -2
- package/dist/playground/ViewPageDemo.vue.d.ts +596 -8
- package/dist/stores/useAppStore.d.ts +888 -0
- package/dist/stores/useDataStore.d.ts +888 -0
- package/dist/stores/useDebugStore.d.ts +30 -12
- package/dist/types/components/config.types.d.ts +5 -0
- package/dist/types/enums.d.ts +2 -1
- package/dist/types/guards.d.ts +7 -1
- package/dist/types/models/config.types.d.ts +25 -1
- package/dist/types/models/operating.types.d.ts +14 -1
- package/dist/ui/models/Pallet.d.ts +16 -0
- package/dist/ui/models/ShuttleStation.d.ts +17 -4
- package/package.json +1 -1
- package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +0 -14
- package/dist/components/debug/WsProxy/broadcast.d.ts +0 -31
package/dist/index.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
function G(
|
|
3
|
-
return
|
|
1
|
+
var I = /* @__PURE__ */ ((t) => (t.UNDO = "Undo", t.REDO = "Redo", t))(I || {}), A = /* @__PURE__ */ ((t) => (t.TRANSPORT = "搬运设备", t.MACHINE = "机床", t.CLEANING = "清洗机", t.STATION = "装载站", t.STORAGE = "库", t.OTHER = "其他", t))(A || {}), e = /* @__PURE__ */ ((t) => (t.SINGLE_JOINT_ROBOT = "SingleJointRobot", t.DOUBLE_JOINT_ROBOT = "DoubleJointRobot", t.RGV = "Rgv", t.MACHINE_TOOL = "MachineTool", t.MARKING_MACHINE = "MarkingMachine", t.CLEANING_MACHINE = "CleaningMachine", t.LOADING_STATION = "LoadingStation", t.SHUTTLE_STATION = "ShuttleStation", t.RAIL = "Rail", t.RESOURCE_STORE = "ResourceStore", t.PALLET = "Pallet", t))(e || {}), _ = /* @__PURE__ */ ((t) => (t.STATION_SLOT = "StationSlot", t.RESOURCE = "Resource", t))(_ || {}), x = /* @__PURE__ */ ((t) => (t.PALLET = "Pallet", t.TOOL = "Tool", t))(x || {});
|
|
2
|
+
function G(t) {
|
|
3
|
+
return t?.className === e.MACHINE_TOOL;
|
|
4
4
|
}
|
|
5
|
-
function C(
|
|
6
|
-
return
|
|
5
|
+
function C(t) {
|
|
6
|
+
return t?.className === e.MACHINE_TOOL || t?.className === e.MARKING_MACHINE || t?.className === e.CLEANING_MACHINE || t?.className === e.LOADING_STATION;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
8
|
+
function P(t) {
|
|
9
|
+
return t?.className === e.RESOURCE_STORE || t?.className === e.SINGLE_JOINT_ROBOT || t?.className === e.DOUBLE_JOINT_ROBOT || t?.className === e.RGV;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function F(t) {
|
|
12
|
+
return t?.className === e.SHUTTLE_STATION;
|
|
13
13
|
}
|
|
14
|
-
function H(
|
|
15
|
-
return
|
|
14
|
+
function H(t) {
|
|
15
|
+
return t?.className === e.SINGLE_JOINT_ROBOT || t?.className === e.DOUBLE_JOINT_ROBOT;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
function B(t) {
|
|
18
|
+
return t?.className === e.RAIL;
|
|
19
|
+
}
|
|
20
|
+
function U(t) {
|
|
21
|
+
return t?.className === e.SHUTTLE_STATION;
|
|
22
|
+
}
|
|
23
|
+
function $(t) {
|
|
24
|
+
return t?.className === e.PALLET;
|
|
19
25
|
}
|
|
20
26
|
const d = {
|
|
21
27
|
none: 0,
|
|
@@ -31,22 +37,22 @@ const d = {
|
|
|
31
37
|
error: "ERROR",
|
|
32
38
|
operating: "OPERATING"
|
|
33
39
|
};
|
|
34
|
-
let
|
|
35
|
-
function
|
|
36
|
-
|
|
40
|
+
let f = "warn";
|
|
41
|
+
function D(t) {
|
|
42
|
+
f = t;
|
|
37
43
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
44
|
+
function J() {
|
|
45
|
+
return f;
|
|
40
46
|
}
|
|
41
|
-
const
|
|
47
|
+
const l = {
|
|
42
48
|
log: "background: #6c8eef; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
|
|
43
49
|
info: "background: #4CA56E; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
|
|
44
50
|
warn: "background: #e6a23c; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
|
|
45
51
|
error: "background: #f56c6c; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
|
|
46
52
|
operating: "background: #009866; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px"
|
|
47
|
-
},
|
|
48
|
-
function b(
|
|
49
|
-
return
|
|
53
|
+
}, T = "color: inherit; background: transparent; padding: 0; margin-left: 4px";
|
|
54
|
+
function b(t) {
|
|
55
|
+
return f === "operating-only" ? t === "operating" || t === "error" : t === "operating" ? f === "operating" : d[t] <= d[f];
|
|
50
56
|
}
|
|
51
57
|
const w = {
|
|
52
58
|
log: "log",
|
|
@@ -55,38 +61,38 @@ const w = {
|
|
|
55
61
|
error: "error",
|
|
56
62
|
operating: "log"
|
|
57
63
|
};
|
|
58
|
-
function
|
|
59
|
-
if (!b(
|
|
60
|
-
const
|
|
61
|
-
|
|
64
|
+
function s(t, n, ...r) {
|
|
65
|
+
if (!b(t)) return;
|
|
66
|
+
const a = t === "log" || t === "info" || t === "operating", i = E[t], o = w[t];
|
|
67
|
+
n && a ? r.length > 0 && typeof r[0] == "string" ? console[o](`%c${i}:${n}%c ${r[0]}`, l[t], T, ...r.slice(1)) : console[o](`%c${i}:${n}%c`, l[t], T, ...r) : n ? r.length > 0 && typeof r[0] == "string" ? console[o](`[${i}:${n}] ${r[0]}`, ...r.slice(1)) : console[o](`[${i}:${n}]`, ...r) : console[o](...r);
|
|
62
68
|
}
|
|
63
|
-
function m(
|
|
69
|
+
function m(t = "") {
|
|
64
70
|
return {
|
|
65
|
-
log: (...
|
|
66
|
-
info: (...
|
|
67
|
-
warn: (...
|
|
68
|
-
error: (...
|
|
69
|
-
operating: (...
|
|
71
|
+
log: (...n) => s("log", t, ...n),
|
|
72
|
+
info: (...n) => s("info", t, ...n),
|
|
73
|
+
warn: (...n) => s("warn", t, ...n),
|
|
74
|
+
error: (...n) => s("error", t, ...n),
|
|
75
|
+
operating: (...n) => s("operating", t, ...n)
|
|
70
76
|
};
|
|
71
77
|
}
|
|
72
|
-
const
|
|
73
|
-
function*
|
|
74
|
-
let
|
|
78
|
+
const M = m("LingshuSmart");
|
|
79
|
+
function* k(t, n, r = !1) {
|
|
80
|
+
let a = t;
|
|
75
81
|
for (; ; ) {
|
|
76
|
-
if (
|
|
77
|
-
if (
|
|
78
|
-
|
|
82
|
+
if (a > n)
|
|
83
|
+
if (r)
|
|
84
|
+
a = t;
|
|
79
85
|
else
|
|
80
86
|
return;
|
|
81
|
-
yield
|
|
87
|
+
yield a++;
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
|
-
const
|
|
85
|
-
const
|
|
90
|
+
const V = (t = 0, n = 100, r = 3, a = 300, i) => i ? new Promise((o) => {
|
|
91
|
+
const c = t, L = n, h = r * 1e3, g = performance.now();
|
|
86
92
|
let u = 0;
|
|
87
93
|
const N = (p) => {
|
|
88
|
-
const R = p - g, O = Math.min(R /
|
|
89
|
-
if (i(
|
|
94
|
+
const R = p - g, O = Math.min(R / h, 1), S = c + (L - c) * O;
|
|
95
|
+
if (i(S.toFixed(2)), O >= 1) {
|
|
90
96
|
cancelAnimationFrame(u), o();
|
|
91
97
|
return;
|
|
92
98
|
}
|
|
@@ -94,62 +100,64 @@ const M = (r = 0, t = 100, n = 3, e = 300, i) => i ? new Promise((o) => {
|
|
|
94
100
|
};
|
|
95
101
|
u = requestAnimationFrame(N);
|
|
96
102
|
}) : !1;
|
|
97
|
-
function
|
|
98
|
-
return
|
|
103
|
+
function Y(t, n, r = 3, a) {
|
|
104
|
+
return t === void 0 || n === void 0 ? 0 : a ? n > 0 ? Number((t / n).toFixed(3)) : 0 : Number((n * t).toFixed(r));
|
|
99
105
|
}
|
|
100
|
-
function
|
|
101
|
-
return
|
|
106
|
+
function q(t, n) {
|
|
107
|
+
return t === void 0 || n === void 0 ? 0 : n > 0 ? Number((t / n).toFixed(3)) : t;
|
|
102
108
|
}
|
|
103
|
-
function
|
|
104
|
-
if (
|
|
109
|
+
function K(t, n, r, a) {
|
|
110
|
+
if (t === void 0) return NaN;
|
|
105
111
|
let i = 0;
|
|
106
|
-
if (
|
|
107
|
-
const o =
|
|
108
|
-
if (o === 0 ||
|
|
109
|
-
i = o /
|
|
112
|
+
if (a === "width") {
|
|
113
|
+
const o = n?.width || 0, c = n?.runtime_width || 0;
|
|
114
|
+
if (o === 0 || c === 0) return 0;
|
|
115
|
+
i = o / c;
|
|
110
116
|
}
|
|
111
|
-
if (
|
|
112
|
-
const o =
|
|
113
|
-
if (o === 0 ||
|
|
114
|
-
i = o /
|
|
117
|
+
if (a === "height") {
|
|
118
|
+
const o = n?.height || 0, c = n?.runtime_height || 0;
|
|
119
|
+
if (o === 0 || c === 0) return 0;
|
|
120
|
+
i = o / c;
|
|
115
121
|
}
|
|
116
|
-
return Number((
|
|
122
|
+
return Number((t * i).toFixed(r));
|
|
117
123
|
}
|
|
118
|
-
function
|
|
119
|
-
if (
|
|
124
|
+
function v(t, n, r, a) {
|
|
125
|
+
if (t === void 0) return NaN;
|
|
120
126
|
let i = 0;
|
|
121
|
-
if (
|
|
122
|
-
const o =
|
|
123
|
-
if (o === 0) return
|
|
124
|
-
i = o *
|
|
127
|
+
if (a === "width") {
|
|
128
|
+
const o = n?.width || 0;
|
|
129
|
+
if (o === 0) return t;
|
|
130
|
+
i = o * t;
|
|
125
131
|
}
|
|
126
|
-
if (
|
|
127
|
-
const o =
|
|
128
|
-
if (o === 0) return
|
|
129
|
-
i = o *
|
|
132
|
+
if (a === "height") {
|
|
133
|
+
const o = n?.height || 0;
|
|
134
|
+
if (o === 0) return t;
|
|
135
|
+
i = o * t;
|
|
130
136
|
}
|
|
131
|
-
return Number(i.toFixed(
|
|
137
|
+
return Number(i.toFixed(r));
|
|
132
138
|
}
|
|
133
139
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
140
|
+
_ as EnumComponent,
|
|
141
|
+
e as EnumModel,
|
|
136
142
|
x as EnumResourceType,
|
|
137
|
-
|
|
138
|
-
|
|
143
|
+
I as EnumStepType,
|
|
144
|
+
A as EnumTag,
|
|
139
145
|
m as createLogger,
|
|
140
|
-
|
|
141
|
-
|
|
146
|
+
J as getLogLevel,
|
|
147
|
+
H as hasFixtureChange,
|
|
142
148
|
C as hasStationSlotGroup,
|
|
149
|
+
F as hasStationSlotLayers,
|
|
143
150
|
G as isMachineTool,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
$ as isPallet,
|
|
152
|
+
B as isRail,
|
|
153
|
+
U as isShuttleStation,
|
|
154
|
+
P as isStationSlotGroupBoth,
|
|
155
|
+
V as linearIncrease,
|
|
156
|
+
M as logger,
|
|
157
|
+
k as numberLoopGenerator,
|
|
158
|
+
D as setLogLevel,
|
|
159
|
+
q as transFraction,
|
|
160
|
+
Y as transPercentAndPixel,
|
|
161
|
+
v as transPercentToPixel,
|
|
162
|
+
K as transRuntimeToPixel
|
|
155
163
|
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lingshu-smart/wsProxyConfig",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"dataSource": "builtin",
|
|
4
5
|
"wsUrl": "ws://192.168.0.1:8080",
|
|
6
|
+
"requestMode": "direct",
|
|
7
|
+
"autoConnect": true,
|
|
5
8
|
"payloadKey": "data",
|
|
6
9
|
"sourceTypeField": "data.type",
|
|
7
10
|
"heartbeatInterval": 0,
|
|
@@ -231,6 +234,33 @@
|
|
|
231
234
|
{ "target": "botId", "source": "botId" }
|
|
232
235
|
]
|
|
233
236
|
},
|
|
237
|
+
{
|
|
238
|
+
"sourceType": "Pallet",
|
|
239
|
+
"className": "Pallet",
|
|
240
|
+
"equipmentName": "托盘",
|
|
241
|
+
"enabled": true,
|
|
242
|
+
"operate": "single",
|
|
243
|
+
"mappings": [
|
|
244
|
+
{ "target": "id", "source": "id", "defaultValue": "" },
|
|
245
|
+
{ "target": "light.color", "source": "displayColor", "defaultValue": "#424242" },
|
|
246
|
+
{ "target": "light.rotating", "source": "status", "valueMap": { "1": true }, "defaultValue": false },
|
|
247
|
+
{ "target": "light.blinking", "source": "status", "valueMap": { "2": true }, "defaultValue": false },
|
|
248
|
+
{
|
|
249
|
+
"target": "x",
|
|
250
|
+
"source": "x",
|
|
251
|
+
"transform": "percentToPixel",
|
|
252
|
+
"transformType": "width",
|
|
253
|
+
"transformPrecision": 2
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"target": "y",
|
|
257
|
+
"source": "y",
|
|
258
|
+
"transform": "percentToPixel",
|
|
259
|
+
"transformType": "height",
|
|
260
|
+
"transformPrecision": 2
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
234
264
|
{
|
|
235
265
|
"sourceType": "LoadingStation",
|
|
236
266
|
"className": "LoadingStation",
|
package/dist/locales/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const e = {
|
|
|
14
14
|
reset: "恢复默认",
|
|
15
15
|
close: "关闭",
|
|
16
16
|
triggerTitle: "调试模式",
|
|
17
|
-
triggerMessage: "
|
|
17
|
+
triggerMessage: "检测到调试模式触发指令,是否打开调试模式?",
|
|
18
18
|
triggerConfirm: "打开",
|
|
19
19
|
triggerCancel: "取消",
|
|
20
20
|
logLevels: {
|
|
@@ -63,7 +63,7 @@ const e = {
|
|
|
63
63
|
reset: "Reset",
|
|
64
64
|
close: "Close",
|
|
65
65
|
triggerTitle: "Debug Mode",
|
|
66
|
-
triggerMessage: "Debug mode trigger detected.
|
|
66
|
+
triggerMessage: "Debug mode trigger detected. Would you like to open debug mode?",
|
|
67
67
|
triggerConfirm: "Open",
|
|
68
68
|
triggerCancel: "Cancel",
|
|
69
69
|
logLevels: {
|