@jnrs/lingshu-smart 2.2.33 → 2.2.35

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 (68) hide show
  1. package/AGENTS.md +60 -4
  2. package/README.md +141 -0
  3. package/dist/components/debug/DataLogPanel.vue.d.ts +44 -0
  4. package/dist/components/debug/DebugPanel.vue.d.ts +61 -0
  5. package/dist/components/debug/PerformanceStats.vue.d.ts +42 -0
  6. package/dist/components/debug/ScriptRunner/ConfigPanel.vue.d.ts +39 -0
  7. package/dist/components/debug/ScriptRunner/StepsPanel.vue.d.ts +50 -0
  8. package/dist/components/debug/ScriptRunner/index.vue.d.ts +16 -0
  9. package/dist/components/debug/ScriptRunner/script.d.ts +100 -0
  10. package/dist/components/debug/WsProxy/ConfigEditor.vue.d.ts +18 -0
  11. package/dist/components/debug/WsProxy/ConnPanel.vue.d.ts +24 -0
  12. package/dist/components/debug/WsProxy/WsProxyPage.vue.d.ts +14 -0
  13. package/dist/components/debug/WsProxy/broadcast.d.ts +31 -0
  14. package/dist/components/debug/WsProxy/index.vue.d.ts +39 -0
  15. package/dist/components/debug/WsProxy/proxy.d.ts +159 -0
  16. package/dist/components/editor/ControlBar/CaseTitleEdit.vue.d.ts +100 -100
  17. package/dist/components/editor/DrawingBoard.vue.d.ts +3 -1
  18. package/dist/components/editor/OptionCard/Equipment/models/PartConfig.vue.d.ts +2 -0
  19. package/dist/components/editor/index.vue.d.ts +3 -1
  20. package/dist/components/index.d.ts +5 -1
  21. package/dist/components/index.js +31930 -2056
  22. package/dist/components/preview/index.vue.d.ts +1859 -3
  23. package/dist/composables/useDebugEasterEgg.d.ts +2 -0
  24. package/dist/controller/AppController.d.ts +11 -0
  25. package/dist/controller/EditorController.d.ts +1 -1
  26. package/dist/index.js +153 -17
  27. package/dist/lingshu-smart/wsProxyConfig.json +495 -0
  28. package/dist/locales/en.d.ts +45 -0
  29. package/dist/locales/i18next.d.ts +102 -1
  30. package/dist/locales/index.js +94 -4
  31. package/dist/locales/zhCn.d.ts +45 -0
  32. package/dist/playground/ViewPageDemo.vue.d.ts +3802 -6
  33. package/dist/stores/index.d.ts +1 -0
  34. package/dist/stores/useAppStore.d.ts +5565 -3
  35. package/dist/stores/useDataStore.d.ts +5565 -3
  36. package/dist/stores/useDebugStore.d.ts +485 -0
  37. package/dist/stores/useEditorStore.d.ts +5 -2
  38. package/dist/types/app.types.d.ts +3 -0
  39. package/dist/types/components/config.types.d.ts +1 -0
  40. package/dist/types/components/operating.types.d.ts +1 -0
  41. package/dist/types/enums.d.ts +1 -0
  42. package/dist/types/guards.d.ts +1 -0
  43. package/dist/types/models/config.types.d.ts +9 -1
  44. package/dist/types/models/operating.types.d.ts +21 -1
  45. package/dist/ui/abstract/BaseAbs.d.ts +23 -0
  46. package/dist/ui/abstract/ComponentAbs.d.ts +3 -15
  47. package/dist/ui/abstract/ModelAbs.d.ts +17 -17
  48. package/dist/ui/components/Light.d.ts +5 -0
  49. package/dist/ui/components/StationSlot.d.ts +7 -2
  50. package/dist/ui/components/StationSlotGroup.d.ts +5 -0
  51. package/dist/ui/models/CleaningMachine.d.ts +2 -0
  52. package/dist/ui/models/DoubleJointRobot.d.ts +2 -0
  53. package/dist/ui/models/LoadingStation.d.ts +2 -0
  54. package/dist/ui/models/MachineTool.d.ts +2 -0
  55. package/dist/ui/models/MarkingMachine.d.ts +2 -0
  56. package/dist/ui/models/ResourceStore.d.ts +7 -0
  57. package/dist/ui/models/Rgv.d.ts +2 -0
  58. package/dist/ui/models/ShuttleStation.d.ts +21 -0
  59. package/dist/ui/models/SingleJointRobot.d.ts +2 -0
  60. package/dist/utils/debug-flags.d.ts +9 -0
  61. package/dist/utils/formatOperating.d.ts +7 -0
  62. package/dist/utils/index.d.ts +19 -15
  63. package/dist/utils/logger.d.ts +22 -0
  64. package/dist/utils/performance-stats.d.ts +38 -0
  65. package/package.json +5 -3
  66. package/dist/index-g6O0IWAC.js +0 -24879
  67. package/dist/playground/mockWebSocketData.d.ts +0 -23
  68. /package/dist/{json → lingshu-smart}/cases.json +0 -0
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useDebugEasterEgg(target: Ref<HTMLElement | null | undefined>): void;
@@ -9,6 +9,7 @@ export declare class AppController {
9
9
  private actions;
10
10
  private hideSceneFill;
11
11
  private shadowsEnabled;
12
+ private animationsEnabled;
12
13
  constructor(options?: IContainer);
13
14
  start(): void;
14
15
  destroy(): void;
@@ -22,7 +23,17 @@ export declare class AppController {
22
23
  addModel(modelConfig: ILayer): void;
23
24
  rerenderModel(modelConfig: ILayer): void;
24
25
  operating(data: ILayerOperating): void;
26
+ private globalHandle;
27
+ private batchRemove;
28
+ worldToLocalPoint(worldX: number, worldY: number): {
29
+ x: number;
30
+ y: number;
31
+ } | null;
25
32
  toggleShadows(enabled?: boolean): void;
26
33
  private toggleShadowRecursive;
27
34
  getShadowsEnabled(): boolean;
35
+ toggleAnimations(enabled?: boolean): void;
36
+ private clearAllAnimations;
37
+ getAnimationsEnabled(): boolean;
38
+ setFps(mode: 'auto' | number): void;
28
39
  }
@@ -4,7 +4,7 @@ interface EditorOptions {
4
4
  container: AppController;
5
5
  zoomMin?: number;
6
6
  zoomMax?: number;
7
- onSelected?: (data: any[]) => void;
7
+ onSelected?: (ids: string[]) => void;
8
8
  onRotate?: (rotation: number) => void;
9
9
  onScale?: (width: number, height: number) => void;
10
10
  onMove?: (percentX: number, percentY: number) => void;
package/dist/index.js CHANGED
@@ -1,19 +1,155 @@
1
- import { c as e, b as n, d as o, E as t, a as r, f as i, h as u, i as l, g as m, e as p, l as c, n as h, j as E, t as T, m as x, k as P } from "./index-g6O0IWAC.js";
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;
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;
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;
10
+ }
11
+ function B(r) {
12
+ return r?.className === c.SINGLE_JOINT_ROBOT || r?.className === c.DOUBLE_JOINT_ROBOT;
13
+ }
14
+ function H(r) {
15
+ return r?.className === c.RAIL;
16
+ }
17
+ function P(r) {
18
+ return r?.className === c.SHUTTLE_STATION;
19
+ }
20
+ const d = {
21
+ none: 0,
22
+ error: 1,
23
+ warn: 2,
24
+ info: 3,
25
+ log: 4,
26
+ operating: 5
27
+ }, E = {
28
+ log: "LOG",
29
+ info: "INFO",
30
+ warn: "WARN",
31
+ error: "ERROR",
32
+ operating: "OPERATING"
33
+ };
34
+ let s = "warn";
35
+ function U(r) {
36
+ s = r;
37
+ }
38
+ function $() {
39
+ return s;
40
+ }
41
+ const h = {
42
+ log: "background: #6c8eef; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
43
+ info: "background: #4CA56E; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
44
+ warn: "background: #e6a23c; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
45
+ error: "background: #f56c6c; color: #fff; padding: 2px 5px; border-radius: 3px; font-weight: bold; font-size: 11px",
46
+ 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];
50
+ }
51
+ const w = {
52
+ log: "log",
53
+ info: "info",
54
+ warn: "warn",
55
+ error: "error",
56
+ operating: "log"
57
+ };
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);
62
+ }
63
+ function m(r = "") {
64
+ 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)
70
+ };
71
+ }
72
+ const D = m("LingshuSmart");
73
+ function* J(r, t, n = !1) {
74
+ let e = r;
75
+ for (; ; ) {
76
+ if (e > t)
77
+ if (n)
78
+ e = r;
79
+ else
80
+ return;
81
+ yield e++;
82
+ }
83
+ }
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();
86
+ let u = 0;
87
+ 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) {
90
+ cancelAnimationFrame(u), o();
91
+ return;
92
+ }
93
+ u = requestAnimationFrame(N);
94
+ };
95
+ u = requestAnimationFrame(N);
96
+ }) : !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));
99
+ }
100
+ function V(r, t) {
101
+ return r === void 0 || t === void 0 ? 0 : t > 0 ? Number((r / t).toFixed(3)) : r;
102
+ }
103
+ function Y(r, t, n, e) {
104
+ if (r === void 0) return NaN;
105
+ 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;
110
+ }
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;
115
+ }
116
+ return Number((r * i).toFixed(n));
117
+ }
118
+ function q(r, t, n, e) {
119
+ if (r === void 0) return NaN;
120
+ let i = 0;
121
+ if (e === "width") {
122
+ const o = t?.width || 0;
123
+ if (o === 0) return r;
124
+ i = o * r;
125
+ }
126
+ if (e === "height") {
127
+ const o = t?.height || 0;
128
+ if (o === 0) return r;
129
+ i = o * r;
130
+ }
131
+ return Number(i.toFixed(n));
132
+ }
2
133
  export {
3
- e as EnumComponent,
4
- n as EnumModel,
5
- o as EnumResourceType,
6
- t as EnumStepType,
7
- r as EnumTag,
8
- i as hasFixtureChange,
9
- u as hasStationSlotGroup,
10
- l as isMachineTool,
11
- m as isRail,
12
- p as isStationSlotGroupBoth,
13
- c as linearIncrease,
14
- h as numberLoopGenerator,
15
- E as transFraction,
16
- T as transPercentAndPixel,
17
- x as transPercentToPixel,
18
- P as transRuntimeToPixel
134
+ A as EnumComponent,
135
+ c as EnumModel,
136
+ x as EnumResourceType,
137
+ S as EnumStepType,
138
+ _ as EnumTag,
139
+ m as createLogger,
140
+ $ as getLogLevel,
141
+ B as hasFixtureChange,
142
+ C as hasStationSlotGroup,
143
+ 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
19
155
  };