@chamn/engine 0.2.2 → 0.2.4

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/dist/index.js CHANGED
@@ -37701,21 +37701,25 @@ class _ee {
37701
37701
  this.disposeEventCbList.push(r);
37702
37702
  }
37703
37703
  registerKeyEvent(t) {
37704
- const r = this.getTriggerHotkeyDebounce(), n = (a) => {
37705
- if (this.filterInputElement(a)) return;
37706
- const i = a.keyCode || a.which || a.charCode;
37707
- this.downKeyCodeList.includes(i) || this.downKeyCodeList.push(i), r();
37704
+ const r = this.getTriggerHotkeyDebounce(), n = (i) => {
37705
+ if (this.filterInputElement(i)) return;
37706
+ const s = i.keyCode || i.which || i.charCode;
37707
+ this.downKeyCodeList.includes(s) || this.downKeyCodeList.push(s), r();
37708
37708
  };
37709
37709
  t == null || t.addEventListener("keydown", n);
37710
- const o = (a) => {
37710
+ const o = (i) => {
37711
37711
  setTimeout(() => {
37712
- if (this.filterInputElement(a)) return;
37713
- const i = a.keyCode || a.which || a.charCode, s = this.downKeyCodeList.findIndex((l) => l === i);
37714
- s >= 0 && this.downKeyCodeList.splice(s, 1);
37712
+ if (this.filterInputElement(i)) return;
37713
+ const s = i.keyCode || i.which || i.charCode, l = this.downKeyCodeList.findIndex((u) => u === s);
37714
+ l >= 0 && this.downKeyCodeList.splice(l, 1);
37715
37715
  }, 0);
37716
37716
  };
37717
- return t == null || t.addEventListener("keyup", o), () => {
37718
- t.removeEventListener("keydown", n), t.removeEventListener("keyup", o);
37717
+ t == null || t.addEventListener("keyup", o);
37718
+ const a = () => {
37719
+ this.downKeyCodeList = [];
37720
+ };
37721
+ return window == null || window.addEventListener("blur", a), () => {
37722
+ t.removeEventListener("keydown", n), t.removeEventListener("keyup", o), window == null || window.removeEventListener("blur", a);
37719
37723
  };
37720
37724
  }
37721
37725
  /** 添加快捷操作 */
@@ -38174,36 +38178,23 @@ const Cee = {
38174
38178
  autoPlay: !1
38175
38179
  },
38176
38180
  advanceCustom: {
38177
- wrapComponent: (e) => (t) => /* @__PURE__ */ x.jsxs(
38181
+ wrapComponent: (e) => (t) => /* @__PURE__ */ x.jsx(
38178
38182
  "div",
38179
38183
  {
38180
38184
  style: {
38181
- display: "content",
38182
- position: "relative"
38185
+ ...t.style,
38186
+ display: "inline-flex"
38183
38187
  },
38184
- children: [
38185
- /* @__PURE__ */ x.jsx(
38186
- e,
38187
- {
38188
- ...t,
38189
- style: {
38190
- ...t.style
38191
- }
38192
- }
38193
- ),
38194
- /* @__PURE__ */ x.jsx(
38195
- "div",
38196
- {
38197
- style: {
38198
- width: "100%",
38199
- height: "100%",
38200
- position: "absolute",
38201
- left: 0,
38202
- top: 0
38203
- }
38188
+ children: /* @__PURE__ */ x.jsx(
38189
+ e,
38190
+ {
38191
+ ...t,
38192
+ style: {
38193
+ ...t.style,
38194
+ pointerEvents: "none"
38204
38195
  }
38205
- )
38206
- ]
38196
+ }
38197
+ )
38207
38198
  }
38208
38199
  )
38209
38200
  },
@@ -38520,7 +38511,7 @@ class Nee extends _.Component {
38520
38511
  return /* @__PURE__ */ x.jsx("div", { className: Qe([GF.engineContainer, this.props.className]), style: this.props.style, children: /* @__PURE__ */ x.jsx(HF, { ref: this.workbenchRef, emitter: this.emitter }) });
38521
38512
  }
38522
38513
  }
38523
- K(Nee, "version", "0.2.2");
38514
+ K(Nee, "version", "0.2.4");
38524
38515
  export {
38525
38516
  rT as AdvancePanel,
38526
38517
  nT as AdvancePanelConfig,