@solar-taro/ui-vant 1.0.3 → 1.1.0

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 (61) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/index103.js +1 -1
  3. package/index104.js +6 -6
  4. package/index105.js +6 -17
  5. package/index106.js +17 -4
  6. package/index107.js +4 -4
  7. package/index108.js +4 -3
  8. package/index109.js +3 -3
  9. package/index110.js +3 -14
  10. package/index111.js +14 -7
  11. package/index112.js +8 -6
  12. package/index113.js +5 -5
  13. package/index114.js +5 -5
  14. package/index115.js +5 -5
  15. package/index116.js +5 -5
  16. package/index117.js +5 -6
  17. package/index121.js +3 -3
  18. package/index122.js +3 -9
  19. package/index123.js +9 -5
  20. package/index124.js +5 -4
  21. package/index125.js +4 -5
  22. package/index126.js +5 -3
  23. package/index135.js +1 -1
  24. package/index16.js +1 -1
  25. package/index17.js +1 -1
  26. package/index18.js +1 -1
  27. package/index19.js +1 -1
  28. package/index20.js +1 -1
  29. package/index23.js +1 -1
  30. package/index24.js +1 -1
  31. package/index26.js +1 -1
  32. package/index28.js +1 -1
  33. package/index40.js +3 -3
  34. package/index52.js +1 -1
  35. package/index56.js +7 -11
  36. package/index57.js +9 -7
  37. package/index58.js +11 -9
  38. package/index61.js +1 -1
  39. package/index62.js +6 -6
  40. package/index63.js +1 -1
  41. package/index64.js +1 -1
  42. package/index67.js +2 -2
  43. package/index68.js +1 -1
  44. package/index69.js +1 -1
  45. package/index71.js +6 -6
  46. package/index73.js +5 -5
  47. package/index79.js +3 -3
  48. package/index8.js +96 -97
  49. package/index80.js +13 -4
  50. package/index81.js +5 -4
  51. package/index82.js +3 -4
  52. package/index83.js +4 -4
  53. package/index84.js +4 -4
  54. package/index85.js +4 -15
  55. package/index86.js +3 -2
  56. package/index87.js +4 -13
  57. package/index88.js +12 -2
  58. package/index89.js +1 -1
  59. package/index97.js +2 -2
  60. package/opper-controller/index.vue.d.ts +8 -4
  61. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.0.3 (2025-02-17)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **ui-vant/selector:** fix virtual item size
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - HyperLife1119
10
+
1
11
  ## 1.0.2 (2025-02-08)
2
12
 
3
13
  This was a version bump only for ui-vant to align it with other projects, there were no code changes.
package/index103.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import o from "./index75.js";
2
2
  import m from "./index91.js";
3
- import e from "./index111.js";
3
+ import e from "./index112.js";
4
4
  import a from "./index55.js";
5
5
  var s = Object.getOwnPropertySymbols, f = s ? function(r) {
6
6
  for (var t = []; r; )
package/index104.js CHANGED
@@ -1,9 +1,9 @@
1
- import r from "./index89.js";
2
- import i from "./index126.js";
3
- function f(t, a) {
4
- var e = i(t, a);
5
- return r(e) ? e : void 0;
1
+ import { takeUntil as e } from "rxjs";
2
+ import { useDestroyed as o } from "./index27.js";
3
+ function i() {
4
+ const t = o();
5
+ return e(t);
6
6
  }
7
7
  export {
8
- f as default
8
+ i as takeUntilDestroyed
9
9
  };
package/index105.js CHANGED
@@ -1,20 +1,9 @@
1
- import p from "./index121.js";
2
- import a from "./index122.js";
3
- import i from "./index123.js";
4
- import h from "./index124.js";
5
- import s from "./index125.js";
6
- function t(e) {
7
- var o = -1, l = e == null ? 0 : e.length;
8
- for (this.clear(); ++o < l; ) {
9
- var r = e[o];
10
- this.set(r[0], r[1]);
11
- }
1
+ import r from "./index89.js";
2
+ import i from "./index121.js";
3
+ function f(t, a) {
4
+ var e = i(t, a);
5
+ return r(e) ? e : void 0;
12
6
  }
13
- t.prototype.clear = p;
14
- t.prototype.delete = a;
15
- t.prototype.get = i;
16
- t.prototype.has = h;
17
- t.prototype.set = s;
18
7
  export {
19
- t as default
8
+ f as default
20
9
  };
package/index106.js CHANGED
@@ -1,7 +1,20 @@
1
- import t from "./index105.js";
2
- function e() {
3
- this.__data__ = new t(), this.size = 0;
1
+ import p from "./index122.js";
2
+ import a from "./index123.js";
3
+ import i from "./index124.js";
4
+ import h from "./index125.js";
5
+ import s from "./index126.js";
6
+ function t(e) {
7
+ var o = -1, l = e == null ? 0 : e.length;
8
+ for (this.clear(); ++o < l; ) {
9
+ var r = e[o];
10
+ this.set(r[0], r[1]);
11
+ }
4
12
  }
13
+ t.prototype.clear = p;
14
+ t.prototype.delete = a;
15
+ t.prototype.get = i;
16
+ t.prototype.has = h;
17
+ t.prototype.set = s;
5
18
  export {
6
- e as default
19
+ t as default
7
20
  };
package/index107.js CHANGED
@@ -1,7 +1,7 @@
1
- function s(t) {
2
- var e = this.__data__, a = e.delete(t);
3
- return this.size = e.size, a;
1
+ import t from "./index106.js";
2
+ function e() {
3
+ this.__data__ = new t(), this.size = 0;
4
4
  }
5
5
  export {
6
- s as default
6
+ e as default
7
7
  };
package/index108.js CHANGED
@@ -1,6 +1,7 @@
1
- function a(t) {
2
- return this.__data__.get(t);
1
+ function s(t) {
2
+ var e = this.__data__, a = e.delete(t);
3
+ return this.size = e.size, a;
3
4
  }
4
5
  export {
5
- a as default
6
+ s as default
6
7
  };
package/index109.js CHANGED
@@ -1,6 +1,6 @@
1
- function t(a) {
2
- return this.__data__.has(a);
1
+ function a(t) {
2
+ return this.__data__.get(t);
3
3
  }
4
4
  export {
5
- t as default
5
+ a as default
6
6
  };
package/index110.js CHANGED
@@ -1,17 +1,6 @@
1
- import _ from "./index105.js";
2
- import e from "./index81.js";
3
- import r from "./index96.js";
4
- var h = 200;
5
- function m(i, s) {
6
- var t = this.__data__;
7
- if (t instanceof _) {
8
- var a = t.__data__;
9
- if (!e || a.length < h - 1)
10
- return a.push([i, s]), this.size = ++t.size, this;
11
- t = this.__data__ = new r(a);
12
- }
13
- return t.set(i, s), this.size = t.size, this;
1
+ function t(a) {
2
+ return this.__data__.has(a);
14
3
  }
15
4
  export {
16
- m as default
5
+ t as default
17
6
  };
package/index111.js CHANGED
@@ -1,10 +1,17 @@
1
- import o from "./index77.js";
2
- import a from "./index55.js";
3
- var n = Object.prototype, l = n.propertyIsEnumerable, t = Object.getOwnPropertySymbols, m = t ? function(r) {
4
- return r == null ? [] : (r = Object(r), o(t(r), function(e) {
5
- return l.call(r, e);
6
- }));
7
- } : a;
1
+ import _ from "./index106.js";
2
+ import e from "./index84.js";
3
+ import r from "./index96.js";
4
+ var h = 200;
5
+ function m(i, s) {
6
+ var t = this.__data__;
7
+ if (t instanceof _) {
8
+ var a = t.__data__;
9
+ if (!e || a.length < h - 1)
10
+ return a.push([i, s]), this.size = ++t.size, this;
11
+ t = this.__data__ = new r(a);
12
+ }
13
+ return t.set(i, s), this.size = t.size, this;
14
+ }
8
15
  export {
9
16
  m as default
10
17
  };
package/index112.js CHANGED
@@ -1,8 +1,10 @@
1
- import n from "./index127.js";
2
- function o(t) {
3
- var e = new t.constructor(t.byteLength);
4
- return new n(e).set(new n(t)), e;
5
- }
1
+ import o from "./index77.js";
2
+ import a from "./index55.js";
3
+ var n = Object.prototype, l = n.propertyIsEnumerable, t = Object.getOwnPropertySymbols, m = t ? function(r) {
4
+ return r == null ? [] : (r = Object(r), o(t(r), function(e) {
5
+ return l.call(r, e);
6
+ }));
7
+ } : a;
6
8
  export {
7
- o as default
9
+ m as default
8
10
  };
package/index113.js CHANGED
@@ -1,8 +1,8 @@
1
- import n from "./index112.js";
2
- function t(r, f) {
3
- var e = f ? n(r.buffer) : r.buffer;
4
- return new r.constructor(e, r.byteOffset, r.byteLength);
1
+ import n from "./index127.js";
2
+ function o(t) {
3
+ var e = new t.constructor(t.byteLength);
4
+ return new n(e).set(new n(t)), e;
5
5
  }
6
6
  export {
7
- t as default
7
+ o as default
8
8
  };
package/index114.js CHANGED
@@ -1,8 +1,8 @@
1
- var a = /\w*$/;
2
- function e(t) {
3
- var n = new t.constructor(t.source, a.exec(t));
4
- return n.lastIndex = t.lastIndex, n;
1
+ import n from "./index113.js";
2
+ function t(r, f) {
3
+ var e = f ? n(r.buffer) : r.buffer;
4
+ return new r.constructor(e, r.byteOffset, r.byteLength);
5
5
  }
6
6
  export {
7
- e as default
7
+ t as default
8
8
  };
package/index115.js CHANGED
@@ -1,8 +1,8 @@
1
- import o from "./index86.js";
2
- var e = o ? o.prototype : void 0, l = e ? e.valueOf : void 0;
3
- function r(t) {
4
- return l ? Object(l.call(t)) : {};
1
+ var a = /\w*$/;
2
+ function e(t) {
3
+ var n = new t.constructor(t.source, a.exec(t));
4
+ return n.lastIndex = t.lastIndex, n;
5
5
  }
6
6
  export {
7
- r as default
7
+ e as default
8
8
  };
package/index116.js CHANGED
@@ -1,8 +1,8 @@
1
- import o from "./index112.js";
2
- function u(f, e) {
3
- var n = e ? o(f.buffer) : f.buffer;
4
- return new f.constructor(n, f.byteOffset, f.length);
1
+ import o from "./index79.js";
2
+ var e = o ? o.prototype : void 0, l = e ? e.valueOf : void 0;
3
+ function r(t) {
4
+ return l ? Object(l.call(t)) : {};
5
5
  }
6
6
  export {
7
- u as default
7
+ r as default
8
8
  };
package/index117.js CHANGED
@@ -1,9 +1,8 @@
1
- import { takeUntil as e } from "rxjs";
2
- import { useDestroyed as o } from "./index27.js";
3
- function i() {
4
- const t = o();
5
- return e(t);
1
+ import o from "./index113.js";
2
+ function u(f, e) {
3
+ var n = e ? o(f.buffer) : f.buffer;
4
+ return new f.constructor(n, f.byteOffset, f.length);
6
5
  }
7
6
  export {
8
- i as takeUntilDestroyed
7
+ u as default
9
8
  };
package/index121.js CHANGED
@@ -1,6 +1,6 @@
1
- function t() {
2
- this.__data__ = [], this.size = 0;
1
+ function u(e, n) {
2
+ return e == null ? void 0 : e[n];
3
3
  }
4
4
  export {
5
- t as default
5
+ u as default
6
6
  };
package/index122.js CHANGED
@@ -1,12 +1,6 @@
1
- import s from "./index134.js";
2
- var i = Array.prototype, l = i.splice;
3
- function n(r) {
4
- var e = this.__data__, a = s(e, r);
5
- if (a < 0)
6
- return !1;
7
- var t = e.length - 1;
8
- return a == t ? e.pop() : l.call(e, a, 1), --this.size, !0;
1
+ function t() {
2
+ this.__data__ = [], this.size = 0;
9
3
  }
10
4
  export {
11
- n as default
5
+ t as default
12
6
  };
package/index123.js CHANGED
@@ -1,8 +1,12 @@
1
- import d from "./index134.js";
2
- function i(e) {
3
- var t = this.__data__, a = d(t, e);
4
- return a < 0 ? void 0 : t[a][1];
1
+ import s from "./index134.js";
2
+ var i = Array.prototype, l = i.splice;
3
+ function n(r) {
4
+ var e = this.__data__, a = s(e, r);
5
+ if (a < 0)
6
+ return !1;
7
+ var t = e.length - 1;
8
+ return a == t ? e.pop() : l.call(e, a, 1), --this.size, !0;
5
9
  }
6
10
  export {
7
- i as default
11
+ n as default
8
12
  };
package/index124.js CHANGED
@@ -1,7 +1,8 @@
1
- import a from "./index134.js";
2
- function e(t) {
3
- return a(this.__data__, t) > -1;
1
+ import d from "./index134.js";
2
+ function i(e) {
3
+ var t = this.__data__, a = d(t, e);
4
+ return a < 0 ? void 0 : t[a][1];
4
5
  }
5
6
  export {
6
- e as default
7
+ i as default
7
8
  };
package/index125.js CHANGED
@@ -1,8 +1,7 @@
1
- import e from "./index134.js";
2
- function d(s, i) {
3
- var t = this.__data__, a = e(t, s);
4
- return a < 0 ? (++this.size, t.push([s, i])) : t[a][1] = i, this;
1
+ import a from "./index134.js";
2
+ function e(t) {
3
+ return a(this.__data__, t) > -1;
5
4
  }
6
5
  export {
7
- d as default
6
+ e as default
8
7
  };
package/index126.js CHANGED
@@ -1,6 +1,8 @@
1
- function u(e, n) {
2
- return e == null ? void 0 : e[n];
1
+ import e from "./index134.js";
2
+ function d(s, i) {
3
+ var t = this.__data__, a = e(t, s);
4
+ return a < 0 ? (++this.size, t.push([s, i])) : t[a][1] = i, this;
3
5
  }
4
6
  export {
5
- u as default
7
+ d as default
6
8
  };
package/index135.js CHANGED
@@ -1,4 +1,4 @@
1
- import e from "./index104.js";
1
+ import e from "./index105.js";
2
2
  var a = e(Object, "create");
3
3
  export {
4
4
  a as default
package/index16.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index3.js";
1
+ import f from "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index17.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index6.js";
1
+ import f from "./index5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index18.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index5.js";
1
+ import f from "./index10.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index19.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index4.js";
1
+ import f from "./index11.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index20.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index8.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index23.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index10.js";
1
+ import f from "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index24.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index11.js";
1
+ import f from "./index8.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index26.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ref as i } from "vue";
2
- import { takeUntilDestroyed as s } from "./index117.js";
2
+ import { takeUntilDestroyed as s } from "./index104.js";
3
3
  function a(e, o) {
4
4
  const t = i(o);
5
5
  return (typeof e == "function" ? e() : e).pipe(s()).subscribe((r) => {
package/index28.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import S from "./index62.js";
2
2
  import L from "./index60.js";
3
- import B from "./index57.js";
3
+ import B from "./index56.js";
4
4
  import I from "./index63.js";
5
5
  import O from "./index64.js";
6
6
  import _ from "./index65.js";
package/index40.js CHANGED
@@ -1,6 +1,6 @@
1
- import t from "./index86.js";
2
- import e from "./index87.js";
3
- import o from "./index88.js";
1
+ import t from "./index79.js";
2
+ import e from "./index80.js";
3
+ import o from "./index81.js";
4
4
  var i = "[object Null]", f = "[object Undefined]", r = t ? t.toStringTag : void 0;
5
5
  function m(n) {
6
6
  return n == null ? n === void 0 ? f : i : r && r in Object(n) ? e(n) : o(n);
package/index52.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import a from "./index59.js";
2
- import e from "./index79.js";
2
+ import e from "./index82.js";
3
3
  var s = Object.prototype, n = s.hasOwnProperty;
4
4
  function f(r) {
5
5
  if (!a(r))
package/index56.js CHANGED
@@ -1,14 +1,10 @@
1
- import m from "./index57.js";
2
- import t from "./index58.js";
3
- function v(a, f, i, u) {
4
- var d = !i;
5
- i || (i = {});
6
- for (var s = -1, e = f.length; ++s < e; ) {
7
- var n = f[s], r = void 0;
8
- r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
9
- }
10
- return i;
1
+ import t from "./index57.js";
2
+ import i from "./index29.js";
3
+ var s = Object.prototype, p = s.hasOwnProperty;
4
+ function l(r, a, o) {
5
+ var n = r[a];
6
+ (!(p.call(r, a) && i(n, o)) || o === void 0 && !(a in r)) && t(r, a, o);
11
7
  }
12
8
  export {
13
- v as default
9
+ l as default
14
10
  };
package/index57.js CHANGED
@@ -1,10 +1,12 @@
1
- import t from "./index58.js";
2
- import i from "./index29.js";
3
- var s = Object.prototype, p = s.hasOwnProperty;
4
- function l(r, a, o) {
5
- var n = r[a];
6
- (!(p.call(r, a) && i(n, o)) || o === void 0 && !(a in r)) && t(r, a, o);
1
+ import u from "./index61.js";
2
+ function i(r, e, t) {
3
+ e == "__proto__" && u ? u(r, e, {
4
+ configurable: !0,
5
+ enumerable: !0,
6
+ value: t,
7
+ writable: !0
8
+ }) : r[e] = t;
7
9
  }
8
10
  export {
9
- l as default
11
+ i as default
10
12
  };
package/index58.js CHANGED
@@ -1,12 +1,14 @@
1
- import u from "./index61.js";
2
- function i(r, e, t) {
3
- e == "__proto__" && u ? u(r, e, {
4
- configurable: !0,
5
- enumerable: !0,
6
- value: t,
7
- writable: !0
8
- }) : r[e] = t;
1
+ import m from "./index56.js";
2
+ import t from "./index57.js";
3
+ function v(a, f, i, u) {
4
+ var d = !i;
5
+ i || (i = {});
6
+ for (var s = -1, e = f.length; ++s < e; ) {
7
+ var n = f[s], r = void 0;
8
+ r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
9
+ }
10
+ return i;
9
11
  }
10
12
  export {
11
- i as default
13
+ v as default
12
14
  };
package/index61.js CHANGED
@@ -1,4 +1,4 @@
1
- import r from "./index104.js";
1
+ import r from "./index105.js";
2
2
  var o = function() {
3
3
  try {
4
4
  var e = r(Object, "defineProperty");
package/index62.js CHANGED
@@ -1,9 +1,9 @@
1
- import r from "./index105.js";
2
- import a from "./index106.js";
3
- import p from "./index107.js";
4
- import s from "./index108.js";
5
- import i from "./index109.js";
6
- import m from "./index110.js";
1
+ import r from "./index106.js";
2
+ import a from "./index107.js";
3
+ import p from "./index108.js";
4
+ import s from "./index109.js";
5
+ import i from "./index110.js";
6
+ import m from "./index111.js";
7
7
  function t(o) {
8
8
  var e = this.__data__ = new r(o);
9
9
  this.size = e.size;
package/index63.js CHANGED
@@ -1,4 +1,4 @@
1
- import o from "./index56.js";
1
+ import o from "./index58.js";
2
2
  import e from "./index50.js";
3
3
  function m(r, t) {
4
4
  return r && o(t, e(t), r);
package/index64.js CHANGED
@@ -1,4 +1,4 @@
1
- import t from "./index56.js";
1
+ import t from "./index58.js";
2
2
  import o from "./index53.js";
3
3
  function i(n, r) {
4
4
  return n && t(r, o(r), n);
package/index67.js CHANGED
@@ -1,5 +1,5 @@
1
- import m from "./index56.js";
2
- import r from "./index111.js";
1
+ import m from "./index58.js";
2
+ import r from "./index112.js";
3
3
  function f(o, t) {
4
4
  return m(o, r(o), t);
5
5
  }
package/index68.js CHANGED
@@ -1,4 +1,4 @@
1
- import m from "./index56.js";
1
+ import m from "./index58.js";
2
2
  import r from "./index103.js";
3
3
  function e(o, t) {
4
4
  return m(o, r(o), t);
package/index69.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import t from "./index102.js";
2
- import o from "./index111.js";
2
+ import o from "./index112.js";
3
3
  import r from "./index50.js";
4
4
  function f(e) {
5
5
  return t(e, r, o);
package/index71.js CHANGED
@@ -1,10 +1,10 @@
1
- import e from "./index80.js";
2
- import a from "./index81.js";
3
- import o from "./index82.js";
4
- import i from "./index83.js";
5
- import n from "./index84.js";
1
+ import e from "./index83.js";
2
+ import a from "./index84.js";
3
+ import o from "./index85.js";
4
+ import i from "./index86.js";
5
+ import n from "./index87.js";
6
6
  import S from "./index40.js";
7
- import t from "./index85.js";
7
+ import t from "./index88.js";
8
8
  var g = "[object Map]", j = "[object Object]", f = "[object Promise]", u = "[object Set]", w = "[object WeakMap]", b = "[object DataView]", T = t(e), C = t(a), M = t(o), d = t(i), v = t(n), r = S;
9
9
  (e && r(new e(new ArrayBuffer(1))) != b || a && r(new a()) != g || o && r(o.resolve()) != f || i && r(new i()) != u || n && r(new n()) != w) && (r = function(m) {
10
10
  var c = S(m), p = c == j ? m.constructor : void 0, s = p ? t(p) : "";
package/index73.js CHANGED
@@ -1,8 +1,8 @@
1
- import o from "./index112.js";
2
- import n from "./index113.js";
3
- import c from "./index114.js";
4
- import g from "./index115.js";
5
- import i from "./index116.js";
1
+ import o from "./index113.js";
2
+ import n from "./index114.js";
3
+ import c from "./index115.js";
4
+ import g from "./index116.js";
5
+ import i from "./index117.js";
6
6
  var s = "[object Boolean]", u = "[object Date]", T = "[object Map]", b = "[object Number]", l = "[object RegExp]", m = "[object Set]", y = "[object String]", f = "[object Symbol]", p = "[object ArrayBuffer]", j = "[object DataView]", A = "[object Float32Array]", w = "[object Float64Array]", d = "[object Int8Array]", B = "[object Int16Array]", x = "[object Int32Array]", C = "[object Uint8Array]", S = "[object Uint8ClampedArray]", U = "[object Uint16Array]", v = "[object Uint32Array]";
7
7
  function R(a, t, r) {
8
8
  var e = a.constructor;
package/index79.js CHANGED
@@ -1,5 +1,5 @@
1
- import e from "./index92.js";
2
- var t = e(Object.keys, Object);
1
+ import o from "./index38.js";
2
+ var m = o.Symbol;
3
3
  export {
4
- t as default
4
+ m as default
5
5
  };
package/index8.js CHANGED
@@ -1,94 +1,94 @@
1
- import { defineComponent as H, ref as E, computed as J, watch as Q, onUnmounted as X, unref as Y, createElementVNode as Z, toDisplayString as ee, vShow as oe, withDirectives as te, normalizeClass as ne, createTextVNode as se, openBlock as ie, createElementBlock as re, renderList as ce, Fragment as le, withCtx as ae, createVNode as ue } from "vue";
2
- import { isOpperDevice as de } from "@opper/core";
3
- import { BluetoothLowEnergeDevice as pe } from "@opper/wx";
4
- import { checkBluetooth as L, bluetoothService as f, vibrator as ve, overlay as r, withLoading as me } from "@solar-taro/core";
5
- import { getSystemInfo as fe, openSetting as we } from "@tarojs/taro";
6
- import { filter as he, switchMap as w, combineLatest as be, of as $, map as I, catchError as B, tap as V, timer as ge, takeUntil as D, finalize as O, from as ye } from "rxjs";
7
- import { useObservable as A } from "./index26.js";
1
+ import { defineComponent as J, ref as I, computed as Q, watch as X, onUnmounted as Y, unref as Z, createElementVNode as ee, toDisplayString as oe, vShow as te, withDirectives as ne, normalizeClass as se, createTextVNode as ie, openBlock as re, createElementBlock as ce, renderList as le, Fragment as ae, withCtx as ue, createVNode as de } from "vue";
2
+ import { isOpperDevice as pe } from "@opper/core";
3
+ import { BluetoothLowEnergeDevice as ve } from "@opper/wx";
4
+ import { checkBluetooth as V, bluetoothService as w, vibrator as me, overlay as r, withLoading as fe } from "@solar-taro/core";
5
+ import { getSystemInfo as we, openSetting as he } from "@tarojs/taro";
6
+ import { filter as A, switchMap as m, combineLatest as ge, of as E, map as $, catchError as D, tap as B, timer as be, takeUntil as N, finalize as O, from as ye } from "rxjs";
7
+ import { useObservable as z } from "./index26.js";
8
8
  import _e from "./index6.js";
9
9
  import { dialog as De } from "./index15.js";
10
- import { useDestroyed as z } from "./index27.js";
11
- const c = Y, t = Z, p = ee, ke = oe, Ce = te, j = ne, xe = se, h = ie, b = re, Se = ce, Ne = le, Ee = ae, $e = ue, Ie = { class: "sun-opper-controller" }, Be = ["show"], Oe = { key: 0 }, Te = { class: "sun-opper-controller-device" }, Me = { class: "sun-opper-controller-device-header" }, Pe = { class: "sun-opper-controller-device-name" }, Re = { class: "sun-opper-controller-device-infos" }, Le = { class: "sun-opper-controller-device-info" }, Ve = { class: "color-secondary" }, Ae = { class: "sun-opper-controller-device-info" }, ze = { class: "color-secondary" }, je = { class: "sun-opper-controller-device-info" }, Fe = { class: "color-secondary" }, Ue = { class: "sun-opper-controller-device-info" }, qe = { class: "color-secondary" }, Ke = { class: "van-button-container" }, We = { key: 1 }, Ge = ["title", "label", "onTap"], He = { class: "van-button-container" }, Je = ["show"], ro = /* @__PURE__ */ H({
10
+ import { useDestroyed as j } from "./index27.js";
11
+ const c = Z, t = ee, p = oe, ke = te, Ce = ne, F = se, Se = ie, h = re, g = ce, xe = le, Ie = ae, Ee = ue, $e = de, Be = { class: "sun-opper-controller" }, Ne = ["show"], Oe = { key: 0 }, Te = { class: "sun-opper-controller-device" }, Me = { class: "sun-opper-controller-device-header" }, Pe = { class: "sun-opper-controller-device-name" }, Re = { class: "sun-opper-controller-device-infos" }, Le = { class: "sun-opper-controller-device-info" }, Ve = { class: "color-secondary" }, Ae = { class: "sun-opper-controller-device-info" }, ze = { class: "color-secondary" }, je = { class: "sun-opper-controller-device-info" }, Fe = { class: "color-secondary" }, Ue = { class: "sun-opper-controller-device-info" }, qe = { class: "color-secondary" }, Ke = { class: "van-button-container" }, We = { key: 1 }, Ge = ["title", "label", "onTap"], He = { class: "van-button-container" }, Je = ["show"], ro = /* @__PURE__ */ J({
12
12
  __name: "index",
13
13
  props: {
14
14
  show: { type: Boolean, default: !1 },
15
- autoconnect: {},
15
+ mac: {},
16
+ deviceId: {},
16
17
  opper: {}
17
18
  },
18
19
  emits: ["update:show", "connect", "disconnect"],
19
- setup(F, { emit: U }) {
20
- const v = F, k = U, i = v.opper, C = z(), x = z(), a = E({}), u = E(!1), T = A(() => i.connected), g = E(!1), M = J(() => Object.values(a.value)), d = A(() => i.connected.pipe(
21
- he(Boolean),
22
- w(() => {
20
+ setup(U, { emit: q }) {
21
+ const v = U, k = q, i = v.opper, T = j(), C = j(), a = I({}), u = I(!1), M = z(() => i.connected), b = I(!1), P = Q(() => Object.values(a.value)), d = z(() => i.connected.pipe(
22
+ A(Boolean),
23
+ m(() => {
23
24
  const n = i.device;
24
- return be({
25
- id: $(n.id),
25
+ return ge({
26
+ id: E(n.id),
26
27
  name: n.name,
27
28
  version: n.firmwareRevision,
28
29
  accuracy: i.accuracyChange,
29
30
  volt: i.batteryChange.pipe(
30
- I(([e]) => e)
31
+ $(([e]) => e)
31
32
  ),
32
33
  charging: i.batteryChange.pipe(
33
- I(([, e]) => !!e)
34
+ $(([, e]) => !!e)
34
35
  ),
35
36
  serialNumber: n.serialNumber
36
37
  });
37
38
  })
38
- ), {}), q = [
39
+ ), {}), K = [
39
40
  { id: 1, name: "断开连接" },
40
41
  { id: 2, name: "断开连接并关机", color: "var(--color-danger)" }
41
42
  ];
42
43
  let S = !1;
43
- function N() {
44
- if (!L()) return;
44
+ function x() {
45
+ if (!V()) return;
45
46
  let n = null;
46
- u.value = !0, f.openAdapter().pipe(
47
- B((e) => {
47
+ u.value = !0, w.openAdapter().pipe(
48
+ D((e) => {
48
49
  var o, l;
49
50
  if ((l = (o = e.errMsg) == null ? void 0 : o.includes) != null && l.call(o, "already"))
50
- return $(null);
51
+ return E(null);
51
52
  throw e;
52
53
  }),
53
- w(
54
- () => f.startDevicesDiscovery({
54
+ m(
55
+ () => w.startDevicesDiscovery({
55
56
  allowDuplicatesKey: !0,
56
57
  powerLevel: "high"
57
58
  })
58
59
  ),
59
- V(
60
- () => ge(0, 1250).pipe(
61
- D(x)
62
- ).subscribe(() => ve.short())
60
+ B(
61
+ () => be(0, 1250).pipe(
62
+ N(C)
63
+ ).subscribe(() => me.short())
63
64
  ),
64
- w(() => f.devicesChange),
65
- I((e) => e.filter((o) => de({
65
+ m(() => w.devicesChange),
66
+ $((e) => e.filter((o) => pe({
66
67
  id: o.deviceId,
67
- localName: o.localName,
68
68
  name: o.name
69
69
  }))),
70
- D(x),
71
- B((e) => {
70
+ N(C),
71
+ D((e) => {
72
72
  var o, l, s;
73
73
  throw e.errno === 103 ? r.modal("温馨提示", "请先授予小程序蓝牙与位置权限").then(() => {
74
- we();
75
- }) : (l = (o = e.errMsg) == null ? void 0 : o.includes) != null && l.call(o, "permission") ? r.tips("请先授予微信蓝牙与位置权限") : (s = e.errMsg) != null && s.includes("frequently") ? r.tips("操作频繁,请稍后再试") : r.tips(e.errMsg), m(), e;
74
+ he();
75
+ }) : (l = (o = e.errMsg) == null ? void 0 : o.includes) != null && l.call(o, "permission") ? r.tips("请先授予微信蓝牙与位置权限") : (s = e.errMsg) != null && s.includes("frequently") ? r.tips("操作频繁,请稍后再试") : r.tips(e.errMsg), f(), e;
76
76
  }),
77
77
  O(() => {
78
- u.value = !1, a.value = {}, f.stopDevicesDiscovery().subscribe();
78
+ u.value = !1, a.value = {}, w.stopDevicesDiscovery().subscribe();
79
79
  })
80
80
  ).subscribe((e) => {
81
- const o = v.autoconnect;
81
+ const o = v.mac || v.deviceId;
82
82
  if (o) {
83
83
  const s = o.slice(-5).replace(":", ""), _ = e.find(
84
- (R) => R.deviceId === v.autoconnect || // 由于 iOS 的 deviceId 不是 MAC,但是蓝牙名字上有 MAC 后四位,这里通过比对 MAC 来选择设备
85
- R.name.endsWith(s)
84
+ (L) => L.deviceId === o || // 由于 iOS 的 deviceId 不是 MAC,但是蓝牙名字上有 MAC 后四位,这里通过比对 MAC 来选择设备
85
+ L.name.endsWith(s)
86
86
  );
87
87
  if (_)
88
88
  return y(_.deviceId);
89
89
  }
90
90
  if (e.length === 1) {
91
- if (n != null || (n = Date.now()), Date.now() - n > 3e3)
91
+ if (n != null || (n = Date.now()), Date.now() - n > 5e3)
92
92
  return y(e[0].deviceId);
93
93
  } else e.length > 1 && (n = null);
94
94
  Object.keys(a.value).forEach((s) => {
@@ -100,88 +100,87 @@ const c = Y, t = Z, p = ee, ke = oe, Ce = te, j = ne, xe = se, h = ie, b = re, S
100
100
  l && (l.recommended = !0);
101
101
  });
102
102
  }
103
- function m() {
104
- x.next();
103
+ function f() {
104
+ C.next();
105
105
  }
106
106
  function y(n) {
107
- S || (r.loading("正在连接"), S = !0, C.next(), i.connect(new pe(n)).pipe(
108
- D(C),
109
- O(() => S = !1)
110
- ).subscribe({
111
- next: () => {
112
- m();
113
- },
114
- error: (e) => {
115
- e.errCode === 10003 ? r.tips("连接超时,请重试") : (r.tips(`连接失败,原因:${e.errCode}:${e.errMsg}`), console.error("连接失败", e));
116
- }
117
- }), i.device.connectedChange.pipe(
118
- D(C)
119
- ).subscribe((e) => {
120
- e ? (k("connect", n), setTimeout(P, 600)) : k("disconnect", n), e ? r.success("连接成功") : r.error("连接断开");
107
+ S || (r.loading("正在连接"), S = !0, T.next(), i.connect(new ve(n)).pipe(
108
+ B(() => {
109
+ f(), k("connect", n), r.success("连接成功"), setTimeout(R, 600);
110
+ }),
111
+ D((e) => {
112
+ throw e.errCode === 10003 ? r.tips("连接超时,请重试") : r.tips(`连接失败:${e.errCode}:${e.errMsg}`), e;
113
+ }),
114
+ O(() => S = !1),
115
+ m(() => i.connected.pipe(A((e) => !e))),
116
+ // 监听断开
117
+ N(T)
118
+ ).subscribe(() => {
119
+ k("disconnect", n), r.error("连接断开");
121
120
  }));
122
121
  }
123
- function K() {
124
- L() && (u.value = !0, f.openAdapter().pipe(
122
+ function W(n) {
123
+ V() && (u.value = !0, w.openAdapter().pipe(
125
124
  O(() => {
126
125
  u.value = !1;
127
126
  })
128
127
  ).subscribe(() => {
129
- y(v.autoconnect);
128
+ y(n);
130
129
  }));
131
130
  }
132
- function W() {
131
+ function G() {
133
132
  i.disconnect().pipe(
134
- me("正在断开")
133
+ fe("正在断开")
135
134
  ).subscribe();
136
135
  }
137
- function G({ detail: n }) {
136
+ function H({ detail: n }) {
138
137
  switch (n.id) {
139
138
  case 1:
140
- W();
139
+ G();
141
140
  break;
142
141
  case 2:
143
142
  ye(De.confirm("温馨提示", "您确定要关闭设备电源吗?")).pipe(
144
- V(() => r.loading("正在关机")),
145
- w(() => i.shutdown()),
146
- B(() => $(null)),
143
+ B(() => r.loading("正在关机")),
144
+ m(() => i.shutdown()),
145
+ D(() => E(null)),
147
146
  // 关机后距离信号丢失还有一段时间,这里主动断开连接,改进用户体验
148
- w(() => i.disconnect())
147
+ m(() => i.disconnect())
149
148
  ).subscribe(() => {
150
149
  r.success("设备已关机");
151
150
  });
152
151
  break;
153
152
  }
154
153
  }
155
- function P() {
154
+ function R() {
156
155
  k("update:show", !1);
157
156
  }
158
- return Q(() => v.show, async (n) => {
157
+ return X(() => v.show, async (n) => {
159
158
  if (n) {
160
- if (!T.value)
161
- if (v.autoconnect) {
162
- const { platform: e } = await fe();
163
- e === "ios" ? N() : K();
159
+ if (!M.value)
160
+ if (v.mac) {
161
+ const { platform: e } = await we();
162
+ e === "ios" ? x() : W(v.mac);
164
163
  } else
165
- N();
164
+ x();
166
165
  } else
167
- u.value && m();
168
- }), X(() => {
169
- m();
170
- }), (n, e) => (h(), b("view", Ie, [
166
+ u.value && f();
167
+ }), Y(() => {
168
+ f();
169
+ }), (n, e) => (h(), g("view", Be, [
171
170
  t("van-action-sheet", {
172
171
  show: n.show,
173
172
  title: "OPPER",
174
173
  "close-on-click-overlay": !0,
175
- onClose: e[2] || (e[2] = (o) => P())
174
+ onClose: e[2] || (e[2] = (o) => R())
176
175
  }, [
177
- c(T) ? (h(), b("block", Oe, [
176
+ c(M) ? (h(), g("block", Oe, [
178
177
  t("view", Te, [
179
178
  t("view", Me, [
180
179
  e[7] || (e[7] = t("view", { class: "sun-opper-controller-device-title" }, "设备已连接", -1)),
181
180
  t("view", Pe, [
182
- xe(p(c(d).name || "OPPER") + " ", 1),
181
+ Se(p(c(d).name || "OPPER") + " ", 1),
183
182
  t("view", {
184
- class: j(c(d).charging ? "color-success" : "color-primary")
183
+ class: F(c(d).charging ? "color-success" : "color-primary")
185
184
  }, [
186
185
  e[6] || (e[6] = t("van-icon", {
187
186
  "class-prefix": "iconfont",
@@ -217,30 +216,30 @@ const c = Y, t = Z, p = ee, ke = oe, Ce = te, j = ne, xe = se, h = ie, b = re, S
217
216
  type: "danger",
218
217
  round: "true",
219
218
  block: "true",
220
- onTap: e[0] || (e[0] = (o) => g.value = !0)
219
+ onTap: e[0] || (e[0] = (o) => b.value = !0)
221
220
  }, " 断开连接 ", 32)
222
221
  ])
223
- ])) : (h(), b("block", We, [
222
+ ])) : (h(), g("block", We, [
224
223
  $e(c(_e), {
225
224
  class: "sun-opper-controller-device-list",
226
225
  refresher: !1,
227
- data: M.value,
226
+ data: P.value,
228
227
  loading: u.value,
229
228
  "loading-text": "正在扫描",
230
229
  "empty-type": "search",
231
230
  "empty-text": "暂无设备"
232
231
  }, {
233
232
  default: Ee(() => [
234
- (h(!0), b(Ne, null, Se(M.value, (o) => (h(), b("van-cell", {
233
+ (h(!0), g(Ie, null, xe(P.value, (o) => (h(), g("van-cell", {
235
234
  key: o.deviceId,
236
- title: o.localName || o.name,
235
+ title: o.name,
237
236
  label: o.deviceId,
238
237
  size: "large",
239
238
  clickable: !0,
240
239
  onTap: (l) => y(o.deviceId)
241
240
  }, [
242
241
  t("text", {
243
- class: j({ "color-success": o.recommended })
242
+ class: F({ "color-success": o.recommended })
244
243
  }, p(o.RSSI) + "dBm", 3)
245
244
  ], 40, Ge))), 128))
246
245
  ]),
@@ -251,18 +250,18 @@ const c = Y, t = Z, p = ee, ke = oe, Ce = te, j = ne, xe = se, h = ie, b = re, S
251
250
  type: "primary",
252
251
  round: "true",
253
252
  block: "true",
254
- onTap: e[1] || (e[1] = (o) => u.value ? m() : N())
253
+ onTap: e[1] || (e[1] = (o) => u.value ? f() : x())
255
254
  }, p(u.value ? "停止扫描" : "扫描 OPPER 设备"), 33)
256
255
  ])
257
256
  ]))
258
- ], 40, Be),
257
+ ], 40, Ne),
259
258
  t("van-action-sheet", {
260
- show: g.value,
261
- actions: q,
259
+ show: b.value,
260
+ actions: K,
262
261
  "cancel-text": "取消",
263
- onSelect: e[3] || (e[3] = (o) => G(o)),
264
- onCancel: e[4] || (e[4] = (o) => g.value = !1),
265
- onClose: e[5] || (e[5] = (o) => g.value = !1)
262
+ onSelect: e[3] || (e[3] = (o) => H(o)),
263
+ onCancel: e[4] || (e[4] = (o) => b.value = !1),
264
+ onClose: e[5] || (e[5] = (o) => b.value = !1)
266
265
  }, null, 40, Je)
267
266
  ]));
268
267
  }
package/index80.js CHANGED
@@ -1,6 +1,15 @@
1
- import t from "./index104.js";
2
- import a from "./index38.js";
3
- var e = t(a, "DataView");
1
+ import e from "./index79.js";
2
+ var o = Object.prototype, c = o.hasOwnProperty, f = o.toString, r = e ? e.toStringTag : void 0;
3
+ function p(t) {
4
+ var a = c.call(t, r), n = t[r];
5
+ try {
6
+ t[r] = void 0;
7
+ var i = !0;
8
+ } catch {
9
+ }
10
+ var g = f.call(t);
11
+ return i && (a ? t[r] = n : delete t[r]), g;
12
+ }
4
13
  export {
5
- e as default
14
+ p as default
6
15
  };
package/index81.js CHANGED
@@ -1,6 +1,7 @@
1
- import o from "./index104.js";
2
- import r from "./index38.js";
3
- var p = o(r, "Map");
1
+ var o = Object.prototype, r = o.toString;
2
+ function e(t) {
3
+ return r.call(t);
4
+ }
4
5
  export {
5
- p as default
6
+ e as default
6
7
  };
package/index82.js CHANGED
@@ -1,6 +1,5 @@
1
- import o from "./index104.js";
2
- import r from "./index38.js";
3
- var m = o(r, "Promise");
1
+ import e from "./index92.js";
2
+ var t = e(Object.keys, Object);
4
3
  export {
5
- m as default
4
+ t as default
6
5
  };
package/index83.js CHANGED
@@ -1,6 +1,6 @@
1
- import t from "./index104.js";
2
- import o from "./index38.js";
3
- var a = t(o, "Set");
1
+ import t from "./index105.js";
2
+ import a from "./index38.js";
3
+ var e = t(a, "DataView");
4
4
  export {
5
- a as default
5
+ e as default
6
6
  };
package/index84.js CHANGED
@@ -1,6 +1,6 @@
1
- import a from "./index104.js";
2
- import o from "./index38.js";
3
- var e = a(o, "WeakMap");
1
+ import o from "./index105.js";
2
+ import r from "./index38.js";
3
+ var p = o(r, "Map");
4
4
  export {
5
- e as default
5
+ p as default
6
6
  };
package/index85.js CHANGED
@@ -1,17 +1,6 @@
1
- var o = Function.prototype, n = o.toString;
2
- function e(t) {
3
- if (t != null) {
4
- try {
5
- return n.call(t);
6
- } catch {
7
- }
8
- try {
9
- return t + "";
10
- } catch {
11
- }
12
- }
13
- return "";
14
- }
1
+ import o from "./index105.js";
2
+ import r from "./index38.js";
3
+ var m = o(r, "Promise");
15
4
  export {
16
- e as default
5
+ m as default
17
6
  };
package/index86.js CHANGED
@@ -1,5 +1,6 @@
1
+ import t from "./index105.js";
1
2
  import o from "./index38.js";
2
- var m = o.Symbol;
3
+ var a = t(o, "Set");
3
4
  export {
4
- m as default
5
+ a as default
5
6
  };
package/index87.js CHANGED
@@ -1,15 +1,6 @@
1
- import e from "./index86.js";
2
- var o = Object.prototype, c = o.hasOwnProperty, f = o.toString, r = e ? e.toStringTag : void 0;
3
- function p(t) {
4
- var a = c.call(t, r), n = t[r];
5
- try {
6
- t[r] = void 0;
7
- var i = !0;
8
- } catch {
9
- }
10
- var g = f.call(t);
11
- return i && (a ? t[r] = n : delete t[r]), g;
12
- }
1
+ import a from "./index105.js";
2
+ import o from "./index38.js";
3
+ var e = a(o, "WeakMap");
13
4
  export {
14
- p as default
5
+ e as default
15
6
  };
package/index88.js CHANGED
@@ -1,6 +1,16 @@
1
- var o = Object.prototype, r = o.toString;
1
+ var o = Function.prototype, n = o.toString;
2
2
  function e(t) {
3
- return r.call(t);
3
+ if (t != null) {
4
+ try {
5
+ return n.call(t);
6
+ } catch {
7
+ }
8
+ try {
9
+ return t + "";
10
+ } catch {
11
+ }
12
+ }
13
+ return "";
4
14
  }
5
15
  export {
6
16
  e as default
package/index89.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import o from "./index35.js";
2
2
  import e from "./index90.js";
3
3
  import a from "./index41.js";
4
- import n from "./index85.js";
4
+ import n from "./index88.js";
5
5
  var p = /[\\^$.*+?()[\]{}|]/g, i = /^\[object .+?Constructor\]$/, s = Function.prototype, c = Object.prototype, f = s.toString, m = c.hasOwnProperty, u = RegExp(
6
6
  "^" + f.call(m).replace(p, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
7
7
  );
package/index97.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import a from "./index119.js";
2
- import t from "./index105.js";
3
- import e from "./index81.js";
2
+ import t from "./index106.js";
3
+ import e from "./index84.js";
4
4
  function o() {
5
5
  this.size = 0, this.__data__ = {
6
6
  hash: new a(),
@@ -2,8 +2,10 @@ import { Opper } from '@opper/core';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
4
  show?: boolean;
5
- /** 自动连接设备,MAC */
6
- autoconnect?: string;
5
+ /** NFC 直连 */
6
+ mac?: string;
7
+ /** 自动连 */
8
+ deviceId?: string;
7
9
  opper: Opper;
8
10
  }>, {
9
11
  show: boolean;
@@ -13,8 +15,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
13
15
  disconnect: (deviceId: string) => void;
14
16
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
15
17
  show?: boolean;
16
- /** 自动连接设备,MAC */
17
- autoconnect?: string;
18
+ /** NFC 直连 */
19
+ mac?: string;
20
+ /** 自动连 */
21
+ deviceId?: string;
18
22
  opper: Opper;
19
23
  }>, {
20
24
  show: boolean;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-vant",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
+ "module": "./index.js",
6
7
  "typings": "./index.d.ts",
7
8
  "sideEffects": false,
8
9
  "publishConfig": {