@jnrs/lingshu-smart 2.2.41 → 2.2.43

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.
@@ -14,10 +14,10 @@ const Ql = {
14
14
  operating: "OPERATING"
15
15
  };
16
16
  let Nr = "warn";
17
- function bT(e) {
17
+ function TT(e) {
18
18
  Nr = e;
19
19
  }
20
- function ST() {
20
+ function kT() {
21
21
  return Nr;
22
22
  }
23
23
  const td = {
@@ -51,7 +51,7 @@ function Sl(e = "") {
51
51
  operating: (...t) => Us("operating", e, ...t)
52
52
  };
53
53
  }
54
- const ET = Sl("LingshuSmart");
54
+ const BT = Sl("LingshuSmart");
55
55
  var dg = typeof global == "object" && global && global.Object === Object && global, If = typeof self == "object" && self && self.Object === Object && self, Ye = dg || If || Function("return this")(), $s = Ye.Symbol, cg = Object.prototype, Wf = cg.hasOwnProperty, zf = cg.toString, Vs = $s ? $s.toStringTag : void 0;
56
56
  function jf(e) {
57
57
  var t = Wf.call(e, Vs), i = e[Vs];
@@ -10889,7 +10889,18 @@ function Of(e) {
10889
10889
  // 强制断词
10890
10890
  });
10891
10891
  }
10892
- class gT extends Rf {
10892
+ const gT = "#fff";
10893
+ function fT(e) {
10894
+ if (typeof e != "string") return !1;
10895
+ const t = e.trim();
10896
+ if (!t) return !1;
10897
+ const i = t.toLowerCase();
10898
+ return !(i === "none" || i === "transparent" || i === "undefined" || i === "null");
10899
+ }
10900
+ function _T(e) {
10901
+ return fT(e) ? e : gT;
10902
+ }
10903
+ class mT extends Rf {
10893
10904
  constructor(t) {
10894
10905
  const i = {
10895
10906
  className: bl.RESOURCE,
@@ -10914,7 +10925,7 @@ class gT extends Rf {
10914
10925
  y: i,
10915
10926
  width: s,
10916
10927
  height: r,
10917
- fill: n,
10928
+ fill: _T(n),
10918
10929
  cornerRadius: this.autoCornerRadius,
10919
10930
  around: "center",
10920
10931
  zIndex: 10,
@@ -10948,7 +10959,7 @@ class gT extends Rf {
10948
10959
  return t === Vr.TOOL ? i : (i || 0) * 0.1;
10949
10960
  }
10950
10961
  }
10951
- function fT(e) {
10962
+ function yT(e) {
10952
10963
  const t = {
10953
10964
  width: e.width * 0.1,
10954
10965
  // 阴影宽度为元素宽度的 10%
@@ -10993,7 +11004,7 @@ function fT(e) {
10993
11004
  innerShadow: o ?? void 0
10994
11005
  }), h.roundRect(0, 0, i, s, r), a.draw(h), a;
10995
11006
  }
10996
- function _T(e, t, i = "shadow") {
11007
+ function vT(e, t, i = "shadow") {
10997
11008
  if (t.hittable && t.hitSelf && (t.clickable || t.menuClickable || t.draggable)) {
10998
11009
  let s = "default";
10999
11010
  const r = "#806EF7";
@@ -11015,7 +11026,7 @@ function _T(e, t, i = "shadow") {
11015
11026
  });
11016
11027
  }
11017
11028
  }
11018
- function Hk(e, t = "rgba(66,66,66,0.9)") {
11029
+ function Gk(e, t = "rgba(66,66,66,0.9)") {
11019
11030
  e.set({
11020
11031
  shadow: {
11021
11032
  x: 2,
@@ -11047,7 +11058,7 @@ const Ro = "#BFC0C3", Cf = {
11047
11058
  disabled: !1,
11048
11059
  visible: !0
11049
11060
  };
11050
- class Uk extends Rf {
11061
+ class qk extends Rf {
11051
11062
  children = [];
11052
11063
  // 缓存 destroyUI 后等待资源退场动画的清理任务,防止重复销毁
11053
11064
  pendingDestroy = null;
@@ -11095,7 +11106,7 @@ class Uk extends Rf {
11095
11106
  inFlow: _,
11096
11107
  data: this.config
11097
11108
  });
11098
- if (_T(w, { hittable: this.config.hittable, hitSelf: !0, clickable: !0 }, "border"), f) {
11109
+ if (vT(w, { hittable: this.config.hittable, hitSelf: !0, clickable: !0 }, "border"), f) {
11099
11110
  const b = Of({
11100
11111
  name: s,
11101
11112
  width: r,
@@ -11105,7 +11116,7 @@ class Uk extends Rf {
11105
11116
  w.add(b);
11106
11117
  }
11107
11118
  if (g) {
11108
- const b = fT({
11119
+ const b = yT({
11109
11120
  width: r,
11110
11121
  height: n,
11111
11122
  cornerRadius: this.autoCornerRadius,
@@ -11160,7 +11171,7 @@ class Uk extends Rf {
11160
11171
  * @param d
11161
11172
  */
11162
11173
  addPallet(t) {
11163
- const { width: i, height: s, resourceType: r } = this.config, n = new gT({
11174
+ const { width: i, height: s, resourceType: r } = this.config, n = new mT({
11164
11175
  x: this.width_05,
11165
11176
  y: this.height_05,
11166
11177
  width: i - 5,
@@ -11265,12 +11276,12 @@ class Uk extends Rf {
11265
11276
  this.removeAllPallet(), this.pendingDestroy && (this.pendingDestroy(), this.pendingDestroy = null), this.ui?.destroy();
11266
11277
  }
11267
11278
  }
11268
- const mT = /* @__PURE__ */ new Set(["index", "resourceType", "name", "className"]), Pf = Cf, yT = (e) => {
11279
+ const wT = /* @__PURE__ */ new Set(["index", "resourceType", "name", "className"]), Pf = Cf, xT = (e) => {
11269
11280
  const t = {};
11270
11281
  for (const [i, s] of Object.entries(e))
11271
- s !== void 0 && (!mT.has(i) && Pf[i] === s || (t[i] = s));
11282
+ s !== void 0 && (!wT.has(i) && Pf[i] === s || (t[i] = s));
11272
11283
  return t;
11273
- }, vT = (e) => ({ ...Pf, ...e }), Wo = (e, t) => {
11284
+ }, bT = (e) => ({ ...Pf, ...e }), Wo = (e, t) => {
11274
11285
  if (Array.isArray(e)) {
11275
11286
  e.forEach((s) => Wo(s, t));
11276
11287
  return;
@@ -11278,14 +11289,14 @@ const mT = /* @__PURE__ */ new Set(["index", "resourceType", "name", "className"
11278
11289
  if (!e || typeof e != "object") return;
11279
11290
  const i = e;
11280
11291
  Array.isArray(i.stationSlots) && (i.stationSlots = i.stationSlots.map(t)), Object.values(i).forEach((s) => Wo(s, t));
11281
- }, wT = (e) => {
11292
+ }, ST = (e) => {
11282
11293
  const t = Bl(e);
11283
- return Wo(t, yT), t;
11284
- }, Vk = (e) => e.map(wT), xT = (e) => {
11294
+ return Wo(t, xT), t;
11295
+ }, Kk = (e) => e.map(ST), ET = (e) => {
11285
11296
  const t = Bl(e);
11286
- return Wo(t, vT), t;
11287
- }, Gk = (e) => e.map(xT);
11288
- function* qk(e, t, i = !1) {
11297
+ return Wo(t, bT), t;
11298
+ }, Zk = (e) => e.map(ET);
11299
+ function* Jk(e, t, i = !1) {
11289
11300
  let s = e;
11290
11301
  for (; ; ) {
11291
11302
  if (s > t)
@@ -11296,7 +11307,7 @@ function* qk(e, t, i = !1) {
11296
11307
  yield s++;
11297
11308
  }
11298
11309
  }
11299
- const Kk = (e = 0, t = 100, i = 3, s = 300, r) => r ? new Promise((n) => {
11310
+ const Qk = (e = 0, t = 100, i = 3, s = 300, r) => r ? new Promise((n) => {
11300
11311
  const o = e, a = t, h = i * 1e3, l = performance.now();
11301
11312
  let c = 0;
11302
11313
  const d = (u) => {
@@ -11309,13 +11320,13 @@ const Kk = (e = 0, t = 100, i = 3, s = 300, r) => r ? new Promise((n) => {
11309
11320
  };
11310
11321
  c = requestAnimationFrame(d);
11311
11322
  }) : !1;
11312
- function Zk(e, t, i = 3, s) {
11323
+ function tB(e, t, i = 3, s) {
11313
11324
  return e === void 0 || t === void 0 ? 0 : s ? t > 0 ? Number((e / t).toFixed(3)) : 0 : Number((t * e).toFixed(i));
11314
11325
  }
11315
- function Jk(e, t) {
11326
+ function eB(e, t) {
11316
11327
  return e === void 0 || t === void 0 ? 0 : t > 0 ? Number((e / t).toFixed(3)) : e;
11317
11328
  }
11318
- function Qk(e, t, i, s) {
11329
+ function iB(e, t, i, s) {
11319
11330
  if (e === void 0) return NaN;
11320
11331
  let r = 0;
11321
11332
  if (s === "width") {
@@ -11330,7 +11341,7 @@ function Qk(e, t, i, s) {
11330
11341
  }
11331
11342
  return Number((e * r).toFixed(i));
11332
11343
  }
11333
- function tB(e, t, i, s) {
11344
+ function sB(e, t, i, s) {
11334
11345
  if (e === void 0) return NaN;
11335
11346
  let r = 0;
11336
11347
  if (s === "width") {
@@ -11365,7 +11376,7 @@ export {
11365
11376
  Yh as P,
11366
11377
  li as Q,
11367
11378
  C as R,
11368
- Uk as S,
11379
+ qk as S,
11369
11380
  K as T,
11370
11381
  be as U,
11371
11382
  Z as V,
@@ -11385,8 +11396,8 @@ export {
11385
11396
  ct as a7,
11386
11397
  Te as a8,
11387
11398
  Dt as a9,
11388
- Kk as aA,
11389
- Jk as aB,
11399
+ Qk as aA,
11400
+ eB as aB,
11390
11401
  Oe as aa,
11391
11402
  Ne as ab,
11392
11403
  Ol as ac,
@@ -11405,36 +11416,36 @@ export {
11405
11416
  Os as ap,
11406
11417
  te as aq,
11407
11418
  Rs as ar,
11408
- bT as as,
11409
- Zk as at,
11419
+ TT as as,
11420
+ tB as at,
11410
11421
  Cf as au,
11411
- wT as av,
11412
- xT as aw,
11422
+ ST as av,
11423
+ ET as aw,
11413
11424
  Lf as ax,
11414
11425
  bl as ay,
11415
- qk as az,
11426
+ Jk as az,
11416
11427
  Qr as b,
11417
11428
  Af as c,
11418
11429
  $f as d,
11419
- Qk as e,
11430
+ iB as e,
11420
11431
  Bl as f,
11421
- Gk as g,
11422
- ST as h,
11432
+ Zk as g,
11433
+ kT as h,
11423
11434
  tn as i,
11424
- Vk as j,
11435
+ Kk as j,
11425
11436
  Sl as k,
11426
- ET as l,
11437
+ BT as l,
11427
11438
  P as m,
11428
11439
  N as n,
11429
11440
  Qn as o,
11430
11441
  lr as p,
11431
11442
  q,
11432
11443
  Ye as r,
11433
- _T as s,
11434
- tB as t,
11435
- Hk as u,
11444
+ vT as s,
11445
+ sB as t,
11446
+ Gk as u,
11436
11447
  ks as v,
11437
- fT as w,
11448
+ yT as w,
11438
11449
  je as x,
11439
11450
  Rt as y,
11440
11451
  et as z
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { d as s } from "./index-DKL_kTJG.js";
2
- import { ay as i, E, ax as l, c as L, av as I, j as A, k as S, aw as _, g as R, h as p, aA as C, l as f, az as g, as as x, aB as G, at as P, t as h, e as B } from "./index-DKL_kTJG.js";
1
+ import { d as s } from "./index-Cz1A_VVJ.js";
2
+ import { ay as i, E, ax as l, c as L, av as I, j as A, k as S, aw as _, g as R, h as p, aA as C, l as f, az as g, as as x, aB as G, at as P, t as h, e as B } from "./index-Cz1A_VVJ.js";
3
3
  function t(a) {
4
4
  return a?.className === s.MACHINE_TOOL;
5
5
  }
@@ -600,6 +600,7 @@
600
600
  "version": "0.0.1",
601
601
  "dataSource": "builtin",
602
602
  "wsUrl": "ws://192.168.1.43:5001/ws/monitor?page=ctsMonitor",
603
+ "carryToken": true,
603
604
  "requestMode": "direct",
604
605
  "autoConnect": true,
605
606
  "payloadKey": "data",