@simon_he/pi 0.0.64 → 0.0.65

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.cjs CHANGED
@@ -14041,7 +14041,7 @@ var He = class {
14041
14041
  this.stop.push(x(this.canvas, "mousedown", (a) => {
14042
14042
  o = this.canvas.offsetTop, i = this.canvas.offsetLeft, s = true, this.ctx.beginPath(), this.ctx.moveTo(a.pageX + 2 - i, a.pageY - o);
14043
14043
  }, false)), this.stop.push(x(this.canvas, "mousemove", (a) => {
14044
- s && (this.ctx.lineTo(a.pageX + 2 - i, a.pageY - o), this.ctx.stroke());
14044
+ !s || (this.ctx.lineTo(a.pageX + 2 - i, a.pageY - o), this.ctx.stroke());
14045
14045
  }, false)), this.stop.push(x(this.canvas, "mouseup", () => s = false)), this.stop.push(x(this.canvas, "mouseout", () => s = false)), this.stop.push(x(this.canvas, "touchmove", (a) => {
14046
14046
  this.ctx.lineTo(a.changedTouches[0].pageX + 2 - i, a.changedTouches[0].pageY - o), this.ctx.stroke();
14047
14047
  }, false));
@@ -14102,7 +14102,7 @@ function G(e, t) {
14102
14102
  } }), 1);
14103
14103
  }, a = [], c = window.cancelIdleCallback || clearTimeout, u = s(async function f(p) {
14104
14104
  var d2;
14105
- i && ((p.timeRemaining() > +r || p.didTimeout) && e.length > 0 && a.push((d2 = e.shift()) == null ? void 0 : d2()), e.length > 0 ? s(f) : (o == null || o(a), m()));
14105
+ !i || ((p.timeRemaining() > +r || p.didTimeout) && e.length > 0 && a.push((d2 = e.shift()) == null ? void 0 : d2()), e.length > 0 ? s(f) : (o == null || o(a), m()));
14106
14106
  }, { timeout: n });
14107
14107
  function m() {
14108
14108
  i = false, c(u);
@@ -14358,7 +14358,7 @@ function Qe() {
14358
14358
  return n[o].name;
14359
14359
  return "other";
14360
14360
  };
14361
- return { os: (() => e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
14361
+ return { os: (() => !!e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : !!e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : !!e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
14362
14362
  }
14363
14363
  function Ze(e, t = {}, r) {
14364
14364
  let { os: n } = Qe(), o = n === "ios" || n === "android", i = [], s = false;
@@ -14687,7 +14687,7 @@ function Fc(e, t) {
14687
14687
  function Ke(e, t, r) {
14688
14688
  let n = false, o;
14689
14689
  return X(() => o == null ? void 0 : o()), w(e, (i) => {
14690
- r != null && r.root && g(r.root) && (r.root = v(r.root));
14690
+ (r == null ? void 0 : r.root) && g(r.root) && (r.root = v(r.root));
14691
14691
  let s = new IntersectionObserver(t, r);
14692
14692
  s.observe(i), o = () => s.disconnect(), n && o();
14693
14693
  }), () => {
@@ -14782,7 +14782,7 @@ function Cm(e, t) {
14782
14782
  n.push(Se(i, (s) => {
14783
14783
  r = true, s.preventDefault(), s.stopPropagation();
14784
14784
  })), n.push(Se(document, () => {
14785
- r && (r = false, t == null || t());
14785
+ !r || (r = false, t == null || t());
14786
14786
  })), o && n.forEach((s) => s());
14787
14787
  }), () => {
14788
14788
  if (!n.length)
@@ -15522,7 +15522,7 @@ async function yt(e = "./package.json") {
15522
15522
  async function bx() {
15523
15523
  let e = await yt() || {}, { packageManager: t } = e;
15524
15524
  if (t) {
15525
- let r = t.split("@")[0];
15525
+ let r = t.split("@")[0].replace(/[\~\^]/, "");
15526
15526
  if (t)
15527
15527
  return r;
15528
15528
  }
@@ -18100,7 +18100,7 @@ async function getStyle() {
18100
18100
  }
18101
18101
 
18102
18102
  // package.json
18103
- var version = "0.0.64";
18103
+ var version = "0.0.65";
18104
18104
 
18105
18105
  // src/help.ts
18106
18106
  var isZh2 = process.env.PI_Lang === "zh";
package/dist/index.js CHANGED
@@ -14041,7 +14041,7 @@ var He = class {
14041
14041
  this.stop.push(x(this.canvas, "mousedown", (a) => {
14042
14042
  o = this.canvas.offsetTop, i = this.canvas.offsetLeft, s = true, this.ctx.beginPath(), this.ctx.moveTo(a.pageX + 2 - i, a.pageY - o);
14043
14043
  }, false)), this.stop.push(x(this.canvas, "mousemove", (a) => {
14044
- s && (this.ctx.lineTo(a.pageX + 2 - i, a.pageY - o), this.ctx.stroke());
14044
+ !s || (this.ctx.lineTo(a.pageX + 2 - i, a.pageY - o), this.ctx.stroke());
14045
14045
  }, false)), this.stop.push(x(this.canvas, "mouseup", () => s = false)), this.stop.push(x(this.canvas, "mouseout", () => s = false)), this.stop.push(x(this.canvas, "touchmove", (a) => {
14046
14046
  this.ctx.lineTo(a.changedTouches[0].pageX + 2 - i, a.changedTouches[0].pageY - o), this.ctx.stroke();
14047
14047
  }, false));
@@ -14102,7 +14102,7 @@ function G(e, t) {
14102
14102
  } }), 1);
14103
14103
  }, a = [], c = window.cancelIdleCallback || clearTimeout, u = s(async function f(p) {
14104
14104
  var d2;
14105
- i && ((p.timeRemaining() > +r || p.didTimeout) && e.length > 0 && a.push((d2 = e.shift()) == null ? void 0 : d2()), e.length > 0 ? s(f) : (o == null || o(a), m()));
14105
+ !i || ((p.timeRemaining() > +r || p.didTimeout) && e.length > 0 && a.push((d2 = e.shift()) == null ? void 0 : d2()), e.length > 0 ? s(f) : (o == null || o(a), m()));
14106
14106
  }, { timeout: n });
14107
14107
  function m() {
14108
14108
  i = false, c(u);
@@ -14358,7 +14358,7 @@ function Qe() {
14358
14358
  return n[o].name;
14359
14359
  return "other";
14360
14360
  };
14361
- return { os: (() => e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
14361
+ return { os: (() => !!e.match(/compatible/i) || e.match(/Windows/i) ? "windows" : !!e.match(/Macintosh/i) || e.match(/MacIntel/i) ? "macOS" : !!e.match(/iphone/i) || e.match(/Ipad/i) ? "ios" : e.match(/android/i) ? "android" : e.match(/Ubuntu/i) ? "Ubuntu" : "other")(), dev: t() };
14362
14362
  }
14363
14363
  function Ze(e, t = {}, r) {
14364
14364
  let { os: n } = Qe(), o = n === "ios" || n === "android", i = [], s = false;
@@ -14687,7 +14687,7 @@ function Fc(e, t) {
14687
14687
  function Ke(e, t, r) {
14688
14688
  let n = false, o;
14689
14689
  return X(() => o == null ? void 0 : o()), w(e, (i) => {
14690
- r != null && r.root && g(r.root) && (r.root = v(r.root));
14690
+ (r == null ? void 0 : r.root) && g(r.root) && (r.root = v(r.root));
14691
14691
  let s = new IntersectionObserver(t, r);
14692
14692
  s.observe(i), o = () => s.disconnect(), n && o();
14693
14693
  }), () => {
@@ -14782,7 +14782,7 @@ function Cm(e, t) {
14782
14782
  n.push(Se(i, (s) => {
14783
14783
  r = true, s.preventDefault(), s.stopPropagation();
14784
14784
  })), n.push(Se(document, () => {
14785
- r && (r = false, t == null || t());
14785
+ !r || (r = false, t == null || t());
14786
14786
  })), o && n.forEach((s) => s());
14787
14787
  }), () => {
14788
14788
  if (!n.length)
@@ -15522,7 +15522,7 @@ async function yt(e = "./package.json") {
15522
15522
  async function bx() {
15523
15523
  let e = await yt() || {}, { packageManager: t } = e;
15524
15524
  if (t) {
15525
- let r = t.split("@")[0];
15525
+ let r = t.split("@")[0].replace(/[\~\^]/, "");
15526
15526
  if (t)
15527
15527
  return r;
15528
15528
  }
@@ -18100,7 +18100,7 @@ async function getStyle() {
18100
18100
  }
18101
18101
 
18102
18102
  // package.json
18103
- var version = "0.0.64";
18103
+ var version = "0.0.65";
18104
18104
 
18105
18105
  // src/help.ts
18106
18106
  var isZh2 = process.env.PI_Lang === "zh";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simon_he/pi",
3
3
  "type": "module",
4
- "version": "0.0.64",
4
+ "version": "0.0.65",
5
5
  "description": "",
6
6
  "author": "Simon He",
7
7
  "license": "MIT",
@@ -70,7 +70,7 @@
70
70
  "bumpp": "^8.2.1",
71
71
  "eslint": "^8.29.0",
72
72
  "esno": "^0.16.3",
73
- "lazy-js-utils": "^0.0.65",
73
+ "lazy-js-utils": "latest",
74
74
  "lint-staged": "^13.1.0",
75
75
  "ora": "^6.1.2",
76
76
  "picocolors": "^1.0.0",