yxuse 2.0.8 → 2.0.9
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/lib/api.cjs.js +1 -1
- package/lib/api.es.js +7 -8
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +7 -7
- package/lib/directives.cjs.js +1 -1
- package/lib/directives.es.js +2 -3
- package/lib/icons.cjs.js +1 -1
- package/lib/icons.es.js +1 -5
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs2.js +5 -5
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs3.js +1 -1
- package/lib/index.cjs4.js +1 -1
- package/lib/index.cjs6.js +10 -3
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +9 -10
- package/lib/index.es2.js +527 -585
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es3.js +78 -72
- package/lib/index.es4.js +3 -21
- package/lib/index.es5.js +1 -1
- package/lib/index.es6.js +6547 -2003
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +8 -9
- package/lib/utils.cjs.js +1 -1
- package/lib/utils.es.js +8 -9
- package/package.json +1 -1
- package/types/components/YxIcon/index.d.ts +3 -0
- package/types/components/YxIcon/index.vue.d.ts +22 -0
- package/types/components/YxIcon/type.d.ts +0 -0
- package/types/components/index.d.ts +1 -0
- package/types/icons/src/index.d.ts +0 -2
- package/lib/vue.runtime.esm-bundler.cjs.js +0 -8
- package/lib/vue.runtime.esm-bundler.cjs.js.gz +0 -0
- package/lib/vue.runtime.esm-bundler.es.js +0 -4588
- package/lib/vue.runtime.esm-bundler.es.js.gz +0 -0
package/lib/index.es2.js.gz
CHANGED
|
Binary file
|
package/lib/index.es3.js
CHANGED
|
@@ -1,88 +1,94 @@
|
|
|
1
|
-
var
|
|
2
|
-
var w = (
|
|
3
|
-
var d = (
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
new BroadcastChannel("YXUSE_BC").postMessage(
|
|
7
|
-
},
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var w = (e, s, t) => s in e ? $(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
3
|
+
var d = (e, s, t) => (w(e, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
|
+
import { N as y } from "./index.es6.js";
|
|
5
|
+
const S = (e) => {
|
|
6
|
+
new BroadcastChannel("YXUSE_BC").postMessage(e);
|
|
7
|
+
}, B = (e) => {
|
|
8
8
|
const s = new BroadcastChannel("YXUSE_BC");
|
|
9
9
|
s.onmessage = () => {
|
|
10
|
-
|
|
10
|
+
e();
|
|
11
11
|
};
|
|
12
|
-
}, F = (
|
|
12
|
+
}, F = (e, s, t, i) => Array.isArray(e) ? e.map((a) => ({
|
|
13
13
|
label: a == null ? void 0 : a[s],
|
|
14
|
-
value:
|
|
15
|
-
})) : [],
|
|
14
|
+
value: i ? +a[t] : a[t]
|
|
15
|
+
})) : [], W = (e) => {
|
|
16
16
|
const s = [];
|
|
17
|
-
for (const t in
|
|
18
|
-
isNaN(Number(t)) && s.push({ label: t, value:
|
|
17
|
+
for (const t in e)
|
|
18
|
+
isNaN(Number(t)) && s.push({ label: t, value: e[t] });
|
|
19
19
|
return s;
|
|
20
|
-
},
|
|
21
|
-
const t = ((
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
else if (
|
|
27
|
-
|
|
20
|
+
}, _ = (e) => {
|
|
21
|
+
const t = ((u) => {
|
|
22
|
+
let f = 0, C = 0, I = 0, m = 1;
|
|
23
|
+
if (u.startsWith("#"))
|
|
24
|
+
if (u = u.slice(1), u.length === 3)
|
|
25
|
+
f = parseInt(u[0] + u[0], 16), C = parseInt(u[1] + u[1], 16), I = parseInt(u[2] + u[2], 16);
|
|
26
|
+
else if (u.length === 6)
|
|
27
|
+
f = parseInt(u.slice(0, 2), 16), C = parseInt(u.slice(2, 4), 16), I = parseInt(u.slice(4, 6), 16);
|
|
28
28
|
else
|
|
29
29
|
return null;
|
|
30
|
-
else if (
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
|
|
30
|
+
else if (u.startsWith("rgb")) {
|
|
31
|
+
const h = u.match(/(\d+(\.\d+)?)/g);
|
|
32
|
+
if (h)
|
|
33
|
+
f = parseFloat(h[0]), C = parseFloat(h[1]), I = parseFloat(h[2]), h.length > 3 && (m = parseFloat(h[3]));
|
|
34
34
|
else
|
|
35
35
|
return null;
|
|
36
36
|
} else
|
|
37
37
|
return null;
|
|
38
|
-
return [
|
|
39
|
-
})(
|
|
38
|
+
return [f, C, I, m];
|
|
39
|
+
})(e);
|
|
40
40
|
if (!t)
|
|
41
41
|
return null;
|
|
42
|
-
const [
|
|
43
|
-
return (
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
let b, l,
|
|
47
|
-
if (
|
|
48
|
-
if (
|
|
49
|
-
b = parseInt(
|
|
50
|
-
else if (
|
|
51
|
-
b = parseInt(
|
|
42
|
+
const [i, a, r, p] = t, n = i / 255, b = a / 255, l = r / 255, c = Math.max(n, b, l), o = Math.min(n, b, l);
|
|
43
|
+
return (c + o) / 2 < 0.5;
|
|
44
|
+
}, x = (e, s, t = 100) => {
|
|
45
|
+
const i = (n) => {
|
|
46
|
+
let b, l, c, o = 1;
|
|
47
|
+
if (n.startsWith("#"))
|
|
48
|
+
if (n = n.slice(1), n.length === 3)
|
|
49
|
+
b = parseInt(n[0] + n[0], 16), l = parseInt(n[1] + n[1], 16), c = parseInt(n[2] + n[2], 16);
|
|
50
|
+
else if (n.length === 6)
|
|
51
|
+
b = parseInt(n.slice(0, 2), 16), l = parseInt(n.slice(2, 4), 16), c = parseInt(n.slice(4, 6), 16);
|
|
52
52
|
else
|
|
53
53
|
return null;
|
|
54
|
-
else if (
|
|
55
|
-
const
|
|
56
|
-
b = parseFloat(
|
|
54
|
+
else if (n.startsWith("rgb")) {
|
|
55
|
+
const g = n.match(/(\d+(\.\d+)?)/g);
|
|
56
|
+
b = parseFloat(g[0]), l = parseFloat(g[1]), c = parseFloat(g[2]), g.length > 3 && (o = parseFloat(g[3]));
|
|
57
57
|
} else
|
|
58
58
|
return null;
|
|
59
|
-
return [b, l,
|
|
60
|
-
}, a =
|
|
59
|
+
return [b, l, c, o];
|
|
60
|
+
}, a = i(e), r = i(s);
|
|
61
61
|
if (!a || !r)
|
|
62
62
|
return !1;
|
|
63
63
|
const p = Math.sqrt(
|
|
64
64
|
Math.pow(a[0] - r[0], 2) + Math.pow(a[1] - r[1], 2) + Math.pow(a[2] - r[2], 2) + Math.pow(a[3] - r[3], 2)
|
|
65
65
|
);
|
|
66
66
|
return console.log(p), p <= t;
|
|
67
|
-
},
|
|
67
|
+
}, L = (e, s) => {
|
|
68
68
|
function t(r) {
|
|
69
69
|
if (r.toLowerCase().startsWith("rgba"))
|
|
70
70
|
return r.toLowerCase();
|
|
71
71
|
if (r.toLowerCase().startsWith("rgb"))
|
|
72
72
|
return r.replace("rgb", "rgba").replace(")", ", 1)");
|
|
73
73
|
if (r.length === 7) {
|
|
74
|
-
const p = parseInt(r.substring(1, 3), 16),
|
|
75
|
-
return `rgba(${p}, ${
|
|
74
|
+
const p = parseInt(r.substring(1, 3), 16), n = parseInt(r.substring(3, 5), 16), b = parseInt(r.substring(5, 7), 16);
|
|
75
|
+
return `rgba(${p}, ${n}, ${b}, 1)`;
|
|
76
76
|
} else if (r.length === 9 && r.toLowerCase().startsWith("rrggbbaa")) {
|
|
77
|
-
const p = parseInt(r.substring(1, 3), 16),
|
|
78
|
-
return `rgba(${p}, ${
|
|
77
|
+
const p = parseInt(r.substring(1, 3), 16), n = parseInt(r.substring(3, 5), 16), b = parseInt(r.substring(5, 7), 16), l = Math.round(parseInt(r.substring(7, 9), 16) / 255 * 100) / 100;
|
|
78
|
+
return `rgba(${p}, ${n}, ${b}, ${l})`;
|
|
79
79
|
} else
|
|
80
80
|
return null;
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
return !
|
|
82
|
+
const i = t(M(e)), a = t(M(s));
|
|
83
|
+
return !i || !a ? !1 : i === a;
|
|
84
|
+
}, M = (e) => {
|
|
85
|
+
if (e.length === 4 && e[0] === "#") {
|
|
86
|
+
const s = e[1], t = e[2], i = e[3];
|
|
87
|
+
return `#${s}${s}${t}${t}${i}${i}`;
|
|
88
|
+
} else
|
|
89
|
+
return e;
|
|
84
90
|
};
|
|
85
|
-
class
|
|
91
|
+
class v {
|
|
86
92
|
constructor() {
|
|
87
93
|
d(this, "subscribers");
|
|
88
94
|
this.subscribers = {};
|
|
@@ -91,41 +97,41 @@ class z {
|
|
|
91
97
|
this.subscribers[s] || (this.subscribers[s] = []), this.subscribers[s].push(t);
|
|
92
98
|
}
|
|
93
99
|
unsubscribe(s, t) {
|
|
94
|
-
const
|
|
100
|
+
const i = this.subscribers[s];
|
|
95
101
|
if (!t)
|
|
96
102
|
return this.subscribers[s] = [];
|
|
97
|
-
if (
|
|
98
|
-
const a =
|
|
99
|
-
a !== -1 &&
|
|
103
|
+
if (i) {
|
|
104
|
+
const a = i.indexOf(t);
|
|
105
|
+
a !== -1 && i.splice(a, 1);
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
publish(s) {
|
|
103
109
|
const t = this.subscribers[s.type];
|
|
104
|
-
t && t.forEach((
|
|
105
|
-
|
|
110
|
+
t && t.forEach((i) => {
|
|
111
|
+
i(s.data);
|
|
106
112
|
});
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
|
-
const
|
|
115
|
+
const z = new v(), N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
110
116
|
__proto__: null,
|
|
111
|
-
areColorsSimilar:
|
|
112
|
-
enumToArray:
|
|
117
|
+
areColorsSimilar: x,
|
|
118
|
+
enumToArray: W,
|
|
113
119
|
getSelectOptions: F,
|
|
114
120
|
http: y,
|
|
115
|
-
isColorEqual:
|
|
116
|
-
isDarkColor:
|
|
117
|
-
notifyMessageToSystems:
|
|
118
|
-
receiveMessage:
|
|
119
|
-
yxSubscribe:
|
|
121
|
+
isColorEqual: L,
|
|
122
|
+
isDarkColor: _,
|
|
123
|
+
notifyMessageToSystems: S,
|
|
124
|
+
receiveMessage: B,
|
|
125
|
+
yxSubscribe: z
|
|
120
126
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
121
127
|
export {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
_ as a,
|
|
129
|
+
x as b,
|
|
130
|
+
W as e,
|
|
125
131
|
F as g,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
L as i,
|
|
133
|
+
S as n,
|
|
134
|
+
B as r,
|
|
135
|
+
N as u,
|
|
136
|
+
z as y
|
|
131
137
|
};
|
package/lib/index.es4.js
CHANGED
|
@@ -1,24 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
-
width: "58",
|
|
5
|
-
height: "58",
|
|
6
|
-
fill: "none"
|
|
7
|
-
}, c = /* @__PURE__ */ r('<path fill="currentColor" d="m19.35 47.876 7.597-16.06c.722-1.525 2.892-1.526 3.615-.001l7.617 16.059a2 2 0 0 1-1.807 2.857H21.16a2 2 0 0 1-1.808-2.855Z" class="icon-title-assist-2"></path><g filter="url(#a)"><rect width="50.373" height="38.592" x="3.296" y="7.519" fill="currentColor" fill-opacity=".56" class="icon-title-main" rx="4"></rect><rect width="49.973" height="38.192" x="3.496" y="7.719" stroke="url(#b)" stroke-width=".4" rx="3.8"></rect></g><path stroke="currentColor" stroke-dasharray="1.2 1.2" stroke-width=".598" d="m30.269 27.749-3.579 4.312" class="icon-title-assist"></path><g fill="currentColor" class="icon-title-assist"><path d="M30.914 24.456a.285.285 0 1 0 0 .57 1.645 1.645 0 0 1 1.644 1.645.285.285 0 1 0 .57 0 2.217 2.217 0 0 0-2.215-2.215Z"></path><path d="M30.513 25.483a.272.272 0 0 0-.242.242.184.184 0 0 0 .205.205c.34-.028.657.08.878.303.222.223.331.538.304.879a.185.185 0 0 0 .095.184.227.227 0 0 0 .224-.018.271.271 0 0 0 .127-.202c.037-.459-.11-.884-.409-1.183-.298-.299-.725-.444-1.183-.409v-.001Zm2.416-.806a2.525 2.525 0 0 0-1.873-.736.241.241 0 0 1-.25-.252.273.273 0 0 1 .263-.262 2.998 2.998 0 0 1 3.109 3.108.274.274 0 0 1-.264.264.242.242 0 0 1-.25-.25 2.522 2.522 0 0 0-.735-1.872ZM34.324 13.246c.506-.006.628.208.87.453l1.499 1.556c.198.25.542.428.677.735.166.38-.15.883-.145.894l.447.465.628-.637c.262-.132.373-.552.834-.477.507.082.962.766 1.281 1.09.167.169.384.33.508.539a.88.88 0 0 1 .096.588c-.102.457-.892.989-1.172 1.36l.085.085.459.49.266-.27c.192-.086.44-.215.713-.098.272.118.473.417.665.625l1.39 1.433c.22.225.72.523.652 1.004-.056.393-.288.55-.508.772l-1.317 1.36c-.655.441-1.197-.417-1.51-.736l-1.511-1.555c-.177-.179-.453-.423-.339-.845.082-.306.33-.431.496-.65v-.024l-.544-.55-.822.844c-.374.258-1.219.149-1.788.147l-.617-.637-.012-.82c.05-.34-.008-.652.097-.919.136-.346.752-.763.99-1.078v-.024l-.483-.49h-.012l-.254.27c-.23.233-.607.656-1.087.367-.254-.154-.517-.479-.701-.71l-1.402-1.446c-.197-.2-.592-.445-.52-.894.066-.405.349-.585.58-.82.481-.49.879-1.061 1.51-1.397Zm-.508 8.096c1.821-.024 3.038 1.341 2.659 3.344a7.931 7.931 0 0 1-.164.672.243.243 0 0 1-.407.103L32.51 21.96a.243.243 0 0 1 .105-.4c.187-.057.38-.113.585-.156l.616-.061Z" class="icon-title-assist"></path></g><path stroke="currentColor" stroke-width=".359" d="M28.542 37.862c-8.262 0-18.535 1.47-22.74 3.444h45.384c-4.039-1.975-14.382-3.444-22.644-3.444Z" class="icon-title-assist"></path><path fill="currentColor" d="m26.18 32.902.96 5.012H25.22l.96-5.012ZM16.148 35.459l.62 3.234h-1.24l.62-3.234ZM43.642 36.746l.441 2.37-.89-.022.45-2.348Z" class="icon-title-assist"></path><circle cx="26.179" cy="32.902" r="1.024" fill="currentColor" class="icon-title-assist"></circle><circle cx="16.148" cy="35.587" r=".277" fill="currentColor" class="icon-title-assist"></circle><circle cx="43.638" cy="36.745" r=".277" fill="currentColor" class="icon-title-assist"></circle><path stroke="#fff" stroke-width=".359" d="M3.657 41.307h49.837"></path><defs><linearGradient id="b" x1="15.102" x2="35.969" y1="12.921" y2="32.624" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"></stop></linearGradient><filter id="a" width="58.025" height="46.244" x="-.53" y="3.693" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feGaussianBlur in="BackgroundImageFix" stdDeviation="1.913"></feGaussianBlur><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_149_966"></feComposite><feBlend in="SourceGraphic" in2="effect1_backgroundBlur_149_966" result="shape"></feBlend></filter></defs>', 11), i = [
|
|
8
|
-
c
|
|
9
|
-
];
|
|
10
|
-
function t(n, f) {
|
|
11
|
-
return e(), l("svg", o, i);
|
|
12
|
-
}
|
|
13
|
-
const s = { render: t }, a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
|
-
__proto__: null,
|
|
15
|
-
default: s,
|
|
16
|
-
render: t
|
|
17
|
-
}, Symbol.toStringTag, { value: "Module" })), h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
18
|
-
__proto__: null,
|
|
19
|
-
telemetryTitle: a
|
|
1
|
+
const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2
|
+
__proto__: null
|
|
20
3
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
21
4
|
export {
|
|
22
|
-
|
|
23
|
-
a as t
|
|
5
|
+
e as i
|
|
24
6
|
};
|
package/lib/index.es5.js
CHANGED
|
@@ -14,7 +14,7 @@ var a = (t, r, s) => new Promise((d, l) => {
|
|
|
14
14
|
}, o = (e) => e.done ? d(e.value) : Promise.resolve(e.value).then(E, _);
|
|
15
15
|
o((s = s.apply(t, r)).next());
|
|
16
16
|
});
|
|
17
|
-
import {
|
|
17
|
+
import { N as n, U as c, P as g } from "./index.es6.js";
|
|
18
18
|
const u = (t = "ttc") => a(void 0, null, function* () {
|
|
19
19
|
return yield n.get(`${c[t].INTEGRATED_BASE_URL}/basic/data/satellite/select`);
|
|
20
20
|
}), T = (t = "ttc") => a(void 0, null, function* () {
|