@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.
Files changed (30) hide show
  1. package/AGENTS.md +33 -12
  2. package/README.md +8 -8
  3. package/dist/components/debug/DebugPanel.vue.d.ts +1 -60
  4. package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +13 -4
  5. package/dist/components/debug/WsProxy/index.vue.d.ts +3 -6
  6. package/dist/components/debug/WsProxy/proxy.d.ts +16 -4
  7. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +87 -87
  8. package/dist/components/editor/OptionCard/Equipment/models/Pallet.vue.d.ts +2 -0
  9. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupDialog.vue.d.ts +4 -0
  10. package/dist/components/editor/OptionCard/Equipment/stationSlot/StationSlotGroupLayers.vue.d.ts +2 -0
  11. package/dist/components/index.d.ts +1 -2
  12. package/dist/components/index.js +13337 -13018
  13. package/dist/components/preview/index.vue.d.ts +296 -0
  14. package/dist/index.js +94 -86
  15. package/dist/lingshu-smart/wsProxyConfig.json +30 -0
  16. package/dist/locales/index.js +2 -2
  17. package/dist/playground/ViewPageDemo.vue.d.ts +596 -8
  18. package/dist/stores/useAppStore.d.ts +888 -0
  19. package/dist/stores/useDataStore.d.ts +888 -0
  20. package/dist/stores/useDebugStore.d.ts +30 -12
  21. package/dist/types/components/config.types.d.ts +5 -0
  22. package/dist/types/enums.d.ts +2 -1
  23. package/dist/types/guards.d.ts +7 -1
  24. package/dist/types/models/config.types.d.ts +25 -1
  25. package/dist/types/models/operating.types.d.ts +14 -1
  26. package/dist/ui/models/Pallet.d.ts +16 -0
  27. package/dist/ui/models/ShuttleStation.d.ts +17 -4
  28. package/package.json +1 -1
  29. package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +0 -14
  30. package/dist/components/debug/WsProxy/broadcast.d.ts +0 -31
package/dist/index.js CHANGED
@@ -1,21 +1,27 @@
1
- var S = /* @__PURE__ */ ((r) => (r.UNDO = "Undo", r.REDO = "Redo", r))(S || {}), _ = /* @__PURE__ */ ((r) => (r.TRANSPORT = "搬运设备", r.MACHINE = "机床", r.CLEANING = "清洗机", r.STATION = "装载站", r.STORAGE = "库", r.OTHER = "其他", r))(_ || {}), c = /* @__PURE__ */ ((r) => (r.SINGLE_JOINT_ROBOT = "SingleJointRobot", r.DOUBLE_JOINT_ROBOT = "DoubleJointRobot", r.RGV = "Rgv", r.MACHINE_TOOL = "MachineTool", r.MARKING_MACHINE = "MarkingMachine", r.CLEANING_MACHINE = "CleaningMachine", r.LOADING_STATION = "LoadingStation", r.SHUTTLE_STATION = "ShuttleStation", r.RAIL = "Rail", r.RESOURCE_STORE = "ResourceStore", r))(c || {}), A = /* @__PURE__ */ ((r) => (r.STATION_SLOT = "StationSlot", r.RESOURCE = "Resource", r))(A || {}), x = /* @__PURE__ */ ((r) => (r.PALLET = "Pallet", r.TOOL = "Tool", r))(x || {});
2
- function G(r) {
3
- return r?.className === c.MACHINE_TOOL;
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(r) {
6
- return r?.className === c.MACHINE_TOOL || r?.className === c.MARKING_MACHINE || r?.className === c.CLEANING_MACHINE || r?.className === c.LOADING_STATION;
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 F(r) {
9
- return r?.className === c.RESOURCE_STORE || r?.className === c.SINGLE_JOINT_ROBOT || r?.className === c.DOUBLE_JOINT_ROBOT || r?.className === c.RGV;
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 B(r) {
12
- return r?.className === c.SINGLE_JOINT_ROBOT || r?.className === c.DOUBLE_JOINT_ROBOT;
11
+ function F(t) {
12
+ return t?.className === e.SHUTTLE_STATION;
13
13
  }
14
- function H(r) {
15
- return r?.className === c.RAIL;
14
+ function H(t) {
15
+ return t?.className === e.SINGLE_JOINT_ROBOT || t?.className === e.DOUBLE_JOINT_ROBOT;
16
16
  }
17
- function P(r) {
18
- return r?.className === c.SHUTTLE_STATION;
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 s = "warn";
35
- function U(r) {
36
- s = r;
40
+ let f = "warn";
41
+ function D(t) {
42
+ f = t;
37
43
  }
38
- function $() {
39
- return s;
44
+ function J() {
45
+ return f;
40
46
  }
41
- const h = {
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
- }, l = "color: inherit; background: transparent; padding: 0; margin-left: 4px";
48
- function b(r) {
49
- return s === "operating-only" ? r === "operating" || r === "error" : r === "operating" ? s === "operating" : d[r] <= d[s];
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 f(r, t, ...n) {
59
- if (!b(r)) return;
60
- const e = r === "log" || r === "info" || r === "operating", i = E[r], o = w[r];
61
- t && e ? n.length > 0 && typeof n[0] == "string" ? console[o](`%c${i}:${t}%c ${n[0]}`, h[r], l, ...n.slice(1)) : console[o](`%c${i}:${t}%c`, h[r], l, ...n) : t ? n.length > 0 && typeof n[0] == "string" ? console[o](`[${i}:${t}] ${n[0]}`, ...n.slice(1)) : console[o](`[${i}:${t}]`, ...n) : console[o](...n);
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(r = "") {
69
+ function m(t = "") {
64
70
  return {
65
- log: (...t) => f("log", r, ...t),
66
- info: (...t) => f("info", r, ...t),
67
- warn: (...t) => f("warn", r, ...t),
68
- error: (...t) => f("error", r, ...t),
69
- operating: (...t) => f("operating", r, ...t)
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 D = m("LingshuSmart");
73
- function* J(r, t, n = !1) {
74
- let e = r;
78
+ const M = m("LingshuSmart");
79
+ function* k(t, n, r = !1) {
80
+ let a = t;
75
81
  for (; ; ) {
76
- if (e > t)
77
- if (n)
78
- e = r;
82
+ if (a > n)
83
+ if (r)
84
+ a = t;
79
85
  else
80
86
  return;
81
- yield e++;
87
+ yield a++;
82
88
  }
83
89
  }
84
- const M = (r = 0, t = 100, n = 3, e = 300, i) => i ? new Promise((o) => {
85
- const a = r, T = t, L = n * 1e3, g = performance.now();
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 / L, 1), I = a + (T - a) * O;
89
- if (i(I.toFixed(2)), O >= 1) {
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 k(r, t, n = 3, e) {
98
- return r === void 0 || t === void 0 ? 0 : e ? t > 0 ? Number((r / t).toFixed(3)) : 0 : Number((t * r).toFixed(n));
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 V(r, t) {
101
- return r === void 0 || t === void 0 ? 0 : t > 0 ? Number((r / t).toFixed(3)) : r;
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 Y(r, t, n, e) {
104
- if (r === void 0) return NaN;
109
+ function K(t, n, r, a) {
110
+ if (t === void 0) return NaN;
105
111
  let i = 0;
106
- if (e === "width") {
107
- const o = t?.width || 0, a = t?.runtime_width || 0;
108
- if (o === 0 || a === 0) return 0;
109
- i = o / a;
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 (e === "height") {
112
- const o = t?.height || 0, a = t?.runtime_height || 0;
113
- if (o === 0 || a === 0) return 0;
114
- i = o / a;
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((r * i).toFixed(n));
122
+ return Number((t * i).toFixed(r));
117
123
  }
118
- function q(r, t, n, e) {
119
- if (r === void 0) return NaN;
124
+ function v(t, n, r, a) {
125
+ if (t === void 0) return NaN;
120
126
  let i = 0;
121
- if (e === "width") {
122
- const o = t?.width || 0;
123
- if (o === 0) return r;
124
- i = o * r;
127
+ if (a === "width") {
128
+ const o = n?.width || 0;
129
+ if (o === 0) return t;
130
+ i = o * t;
125
131
  }
126
- if (e === "height") {
127
- const o = t?.height || 0;
128
- if (o === 0) return r;
129
- i = o * r;
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(n));
137
+ return Number(i.toFixed(r));
132
138
  }
133
139
  export {
134
- A as EnumComponent,
135
- c as EnumModel,
140
+ _ as EnumComponent,
141
+ e as EnumModel,
136
142
  x as EnumResourceType,
137
- S as EnumStepType,
138
- _ as EnumTag,
143
+ I as EnumStepType,
144
+ A as EnumTag,
139
145
  m as createLogger,
140
- $ as getLogLevel,
141
- B as hasFixtureChange,
146
+ J as getLogLevel,
147
+ H as hasFixtureChange,
142
148
  C as hasStationSlotGroup,
149
+ F as hasStationSlotLayers,
143
150
  G as isMachineTool,
144
- H as isRail,
145
- P as isShuttleStation,
146
- F as isStationSlotGroupBoth,
147
- M as linearIncrease,
148
- D as logger,
149
- J as numberLoopGenerator,
150
- U as setLogLevel,
151
- V as transFraction,
152
- k as transPercentAndPixel,
153
- q as transPercentToPixel,
154
- Y as transRuntimeToPixel
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",
@@ -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. Please select the debug component to display.",
66
+ triggerMessage: "Debug mode trigger detected. Would you like to open debug mode?",
67
67
  triggerConfirm: "Open",
68
68
  triggerCancel: "Cancel",
69
69
  logLevels: {