@lingshugroup/web-plus 1.7.1 → 1.7.3

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 (67) hide show
  1. package/lib/hooks/index.cjs +1 -1
  2. package/lib/hooks/index.js +6 -8
  3. package/lib/index.css +1 -1
  4. package/lib/index.css.br +0 -0
  5. package/lib/index.css.gz +0 -0
  6. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.cjs +1 -1
  7. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js +37 -32
  8. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.br +0 -0
  9. package/lib/packages/ls-components/components/_hooks/useOptionHook/index.js.gz +0 -0
  10. package/lib/packages/ls-components/components/_utils/utils/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/_utils/utils/index.js +120 -100
  12. package/lib/packages/ls-components/components/_utils/utils/index.js.br +0 -0
  13. package/lib/packages/ls-components/components/_utils/utils/index.js.gz +0 -0
  14. package/lib/packages/ls-components/components/button/Button.vue/index.cjs +1 -1
  15. package/lib/packages/ls-components/components/button/Button.vue/index.js +2 -2
  16. package/lib/packages/ls-components/components/button/Button.vue/index2.cjs +1 -1
  17. package/lib/packages/ls-components/components/button/Button.vue/index2.js +14 -14
  18. package/lib/packages/ls-components/components/button/Button.vue/index2.js.br +0 -0
  19. package/lib/packages/ls-components/components/button/Button.vue/index2.js.gz +0 -0
  20. package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.cjs +1 -1
  21. package/lib/packages/ls-components/components/button/ButtonGroup.vue/index.js +2 -2
  22. package/lib/packages/ls-components/components/editor/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/editor/Index.vue/index.js +2 -2
  24. package/lib/packages/ls-components/components/editor/Index.vue/index2.cjs +1 -1
  25. package/lib/packages/ls-components/components/editor/Index.vue/index2.js +105 -62
  26. package/lib/packages/ls-components/components/editor/Index.vue/index2.js.br +0 -0
  27. package/lib/packages/ls-components/components/editor/Index.vue/index2.js.gz +0 -0
  28. package/lib/packages/ls-components/components/editor/types/index.cjs +1 -1
  29. package/lib/packages/ls-components/components/editor/types/index.js +24 -4
  30. package/lib/packages/ls-components/components/editor/types/index.js.br +0 -0
  31. package/lib/packages/ls-components/components/editor/types/index.js.gz +0 -0
  32. package/lib/packages/ls-components/components/layout/Index.vue/index.cjs +1 -1
  33. package/lib/packages/ls-components/components/layout/Index.vue/index.js +1 -1
  34. package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
  35. package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
  36. package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
  37. package/lib/packages/ls-components/components/menu/Index.vue/index2.js +40 -38
  38. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
  39. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
  40. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
  41. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +30 -30
  42. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
  43. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
  44. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  45. package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
  46. package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
  47. package/lib/packages/ls-components/components/upload/Index.vue/index2.js +52 -52
  48. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
  49. package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
  50. package/lib/types/components/_hooks/index.d.ts +1 -2
  51. package/lib/types/components/_hooks/useOptionHook.d.ts +3 -3
  52. package/lib/types/components/_utils/utils.d.ts +1 -0
  53. package/lib/types/components/dialog/Index.vue.d.ts +1 -1
  54. package/lib/types/components/editor/Index.vue.d.ts +12 -0
  55. package/lib/types/components/editor/index.d.ts +24 -0
  56. package/lib/types/components/editor/types.d.ts +4 -0
  57. package/lib/types/components/form/FormItem.vue.d.ts +23 -23
  58. package/lib/types/components/form/index.d.ts +23 -23
  59. package/lib/types/components/form/types.d.ts +1 -1
  60. package/lib/types/components/menu/types.d.ts +1 -1
  61. package/package.json +1 -1
  62. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.cjs +0 -1
  63. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js +0 -222
  64. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.br +0 -0
  65. package/lib/node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js.gz +0 -0
  66. package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.cjs +0 -1
  67. package/lib/packages/ls-components/components/_hooks/useColorthiefHook/index.js +0 -23
@@ -1,222 +0,0 @@
1
- var L = Object.defineProperty;
2
- var h = (f, u) => L(f, "name", { value: u, configurable: !0 });
3
- if (!q) var q = { map: /* @__PURE__ */ h(function(f, u) {
4
- var m = {};
5
- return u ? f.map(function(g, b) {
6
- return m.index = b, u.call(m, g);
7
- }) : f.slice();
8
- }, "map"), naturalOrder: /* @__PURE__ */ h(function(f, u) {
9
- return f < u ? -1 : f > u ? 1 : 0;
10
- }, "naturalOrder"), sum: /* @__PURE__ */ h(function(f, u) {
11
- var m = {};
12
- return f.reduce(u ? function(g, b, d) {
13
- return m.index = d, g + u.call(m, b);
14
- } : function(g, b) {
15
- return g + b;
16
- }, 0);
17
- }, "sum"), max: /* @__PURE__ */ h(function(f, u) {
18
- return Math.max.apply(null, u ? q.map(f, u) : f);
19
- }, "max") };
20
- var T = function() {
21
- var f = 5, u = 8 - f, m = 1e3;
22
- function g(r, t, n) {
23
- return (r << 2 * f) + (t << f) + n;
24
- }
25
- h(g, "e");
26
- function b(r) {
27
- var t = [], n = !1;
28
- function s() {
29
- t.sort(r), n = !0;
30
- }
31
- return h(s, "o"), { push: /* @__PURE__ */ h(function(e) {
32
- t.push(e), n = !1;
33
- }, "push"), peek: /* @__PURE__ */ h(function(e) {
34
- return n || s(), e === void 0 && (e = t.length - 1), t[e];
35
- }, "peek"), pop: /* @__PURE__ */ h(function() {
36
- return n || s(), t.pop();
37
- }, "pop"), size: /* @__PURE__ */ h(function() {
38
- return t.length;
39
- }, "size"), map: /* @__PURE__ */ h(function(e) {
40
- return t.map(e);
41
- }, "map"), debug: /* @__PURE__ */ h(function() {
42
- return n || s(), t;
43
- }, "debug") };
44
- }
45
- h(b, "u");
46
- function d(r, t, n, s, e, o, l) {
47
- var a = this;
48
- a.r1 = r, a.r2 = t, a.g1 = n, a.g2 = s, a.b1 = e, a.b2 = o, a.histo = l;
49
- }
50
- h(d, "a");
51
- function E() {
52
- this.vboxes = new b(function(r, t) {
53
- return q.naturalOrder(r.vbox.count() * r.vbox.volume(), t.vbox.count() * t.vbox.volume());
54
- });
55
- }
56
- h(E, "i");
57
- function I(r, t) {
58
- if (t.count()) {
59
- var n = t.r2 - t.r1 + 1, s = t.g2 - t.g1 + 1, e = q.max([n, s, t.b2 - t.b1 + 1]);
60
- if (t.count() == 1) return [t.copy()];
61
- var o, l, a, c, v = 0, p = [], w = [];
62
- if (e == n) for (o = t.r1; o <= t.r2; o++) {
63
- for (c = 0, l = t.g1; l <= t.g2; l++) for (a = t.b1; a <= t.b2; a++) c += r[g(o, l, a)] || 0;
64
- p[o] = v += c;
65
- }
66
- else if (e == s) for (o = t.g1; o <= t.g2; o++) {
67
- for (c = 0, l = t.r1; l <= t.r2; l++) for (a = t.b1; a <= t.b2; a++) c += r[g(l, o, a)] || 0;
68
- p[o] = v += c;
69
- }
70
- else for (o = t.b1; o <= t.b2; o++) {
71
- for (c = 0, l = t.r1; l <= t.r2; l++) for (a = t.g1; a <= t.g2; a++) c += r[g(l, a, o)] || 0;
72
- p[o] = v += c;
73
- }
74
- return p.forEach(function(x, y) {
75
- w[y] = v - x;
76
- }), function(x) {
77
- var y, z, C, D, _, k = x + "1", M = x + "2", P = 0;
78
- for (o = t[k]; o <= t[M]; o++) if (p[o] > v / 2) {
79
- for (C = t.copy(), D = t.copy(), _ = (y = o - t[k]) <= (z = t[M] - o) ? Math.min(t[M] - 1, ~~(o + z / 2)) : Math.max(t[k], ~~(o - 1 - y / 2)); !p[_]; ) _++;
80
- for (P = w[_]; !P && p[_ - 1]; ) P = w[--_];
81
- return C[M] = _, D[k] = C[M] + 1, [C, D];
82
- }
83
- }(e == n ? "r" : e == s ? "g" : "b");
84
- }
85
- }
86
- return h(I, "c"), d.prototype = { volume: /* @__PURE__ */ h(function(r) {
87
- var t = this;
88
- return t._volume && !r || (t._volume = (t.r2 - t.r1 + 1) * (t.g2 - t.g1 + 1) * (t.b2 - t.b1 + 1)), t._volume;
89
- }, "volume"), count: /* @__PURE__ */ h(function(r) {
90
- var t = this, n = t.histo;
91
- if (!t._count_set || r) {
92
- var s, e, o, l = 0;
93
- for (s = t.r1; s <= t.r2; s++) for (e = t.g1; e <= t.g2; e++) for (o = t.b1; o <= t.b2; o++) l += n[g(s, e, o)] || 0;
94
- t._count = l, t._count_set = !0;
95
- }
96
- return t._count;
97
- }, "count"), copy: /* @__PURE__ */ h(function() {
98
- var r = this;
99
- return new d(r.r1, r.r2, r.g1, r.g2, r.b1, r.b2, r.histo);
100
- }, "copy"), avg: /* @__PURE__ */ h(function(r) {
101
- var t = this, n = t.histo;
102
- if (!t._avg || r) {
103
- var s, e, o, l, a = 0, c = 1 << 8 - f, v = 0, p = 0, w = 0;
104
- for (e = t.r1; e <= t.r2; e++) for (o = t.g1; o <= t.g2; o++) for (l = t.b1; l <= t.b2; l++) a += s = n[g(e, o, l)] || 0, v += s * (e + 0.5) * c, p += s * (o + 0.5) * c, w += s * (l + 0.5) * c;
105
- t._avg = a ? [~~(v / a), ~~(p / a), ~~(w / a)] : [~~(c * (t.r1 + t.r2 + 1) / 2), ~~(c * (t.g1 + t.g2 + 1) / 2), ~~(c * (t.b1 + t.b2 + 1) / 2)];
106
- }
107
- return t._avg;
108
- }, "avg"), contains: /* @__PURE__ */ h(function(r) {
109
- var t = this, n = r[0] >> u;
110
- return gval = r[1] >> u, bval = r[2] >> u, n >= t.r1 && n <= t.r2 && gval >= t.g1 && gval <= t.g2 && bval >= t.b1 && bval <= t.b2;
111
- }, "contains") }, E.prototype = { push: /* @__PURE__ */ h(function(r) {
112
- this.vboxes.push({ vbox: r, color: r.avg() });
113
- }, "push"), palette: /* @__PURE__ */ h(function() {
114
- return this.vboxes.map(function(r) {
115
- return r.color;
116
- });
117
- }, "palette"), size: /* @__PURE__ */ h(function() {
118
- return this.vboxes.size();
119
- }, "size"), map: /* @__PURE__ */ h(function(r) {
120
- for (var t = this.vboxes, n = 0; n < t.size(); n++) if (t.peek(n).vbox.contains(r)) return t.peek(n).color;
121
- return this.nearest(r);
122
- }, "map"), nearest: /* @__PURE__ */ h(function(r) {
123
- for (var t, n, s, e = this.vboxes, o = 0; o < e.size(); o++) ((n = Math.sqrt(Math.pow(r[0] - e.peek(o).color[0], 2) + Math.pow(r[1] - e.peek(o).color[1], 2) + Math.pow(r[2] - e.peek(o).color[2], 2))) < t || t === void 0) && (t = n, s = e.peek(o).color);
124
- return s;
125
- }, "nearest"), forcebw: /* @__PURE__ */ h(function() {
126
- var r = this.vboxes;
127
- r.sort(function(e, o) {
128
- return q.naturalOrder(q.sum(e.color), q.sum(o.color));
129
- });
130
- var t = r[0].color;
131
- t[0] < 5 && t[1] < 5 && t[2] < 5 && (r[0].color = [0, 0, 0]);
132
- var n = r.length - 1, s = r[n].color;
133
- s[0] > 251 && s[1] > 251 && s[2] > 251 && (r[n].color = [255, 255, 255]);
134
- }, "forcebw") }, { quantize: /* @__PURE__ */ h(function(r, t) {
135
- if (!r.length || t < 2 || t > 256) return !1;
136
- var n = function(c) {
137
- var v, p = new Array(1 << 3 * f);
138
- return c.forEach(function(w) {
139
- v = g(w[0] >> u, w[1] >> u, w[2] >> u), p[v] = (p[v] || 0) + 1;
140
- }), p;
141
- }(r);
142
- n.forEach(function() {
143
- });
144
- var s = function(c, v) {
145
- var p, w, x, y = 1e6, z = 0, C = 1e6, D = 0, _ = 1e6, k = 0;
146
- return c.forEach(function(M) {
147
- (p = M[0] >> u) < y ? y = p : p > z && (z = p), (w = M[1] >> u) < C ? C = w : w > D && (D = w), (x = M[2] >> u) < _ ? _ = x : x > k && (k = x);
148
- }), new d(y, z, C, D, _, k, v);
149
- }(r, n), e = new b(function(c, v) {
150
- return q.naturalOrder(c.count(), v.count());
151
- });
152
- function o(c, v) {
153
- for (var p, w = c.size(), x = 0; x < m; ) {
154
- if (w >= v || x++ > m) return;
155
- if ((p = c.pop()).count()) {
156
- var y = I(n, p), z = y[0], C = y[1];
157
- if (!z) return;
158
- c.push(z), C && (c.push(C), w++);
159
- } else c.push(p), x++;
160
- }
161
- }
162
- h(o, "g"), e.push(s), o(e, 0.75 * t);
163
- for (var l = new b(function(c, v) {
164
- return q.naturalOrder(c.count() * c.volume(), v.count() * v.volume());
165
- }); e.size(); ) l.push(e.pop());
166
- o(l, t);
167
- for (var a = new E(); l.size(); ) a.push(l.pop());
168
- return a;
169
- }, "quantize") };
170
- }().quantize, A = /* @__PURE__ */ h(function(f) {
171
- this.canvas = document.createElement("canvas"), this.context = this.canvas.getContext("2d"), this.width = this.canvas.width = f.naturalWidth, this.height = this.canvas.height = f.naturalHeight, this.context.drawImage(f, 0, 0, this.width, this.height);
172
- }, "n");
173
- A.prototype.getImageData = function() {
174
- return this.context.getImageData(0, 0, this.width, this.height);
175
- };
176
- var O = /* @__PURE__ */ h(function() {
177
- }, "o");
178
- O.prototype.getColor = function(f, u) {
179
- return u === void 0 && (u = 10), this.getPalette(f, 5, u)[0];
180
- }, O.prototype.getPalette = function(f, u, m) {
181
- var g = function(I) {
182
- var r = I.colorCount, t = I.quality;
183
- if (r !== void 0 && Number.isInteger(r)) {
184
- if (r === 1) throw new Error("colorCount should be between 2 and 20. To get one color, call getColor() instead of getPalette()");
185
- r = Math.max(r, 2), r = Math.min(r, 20);
186
- } else r = 10;
187
- return (t === void 0 || !Number.isInteger(t) || t < 1) && (t = 10), { colorCount: r, quality: t };
188
- }({ colorCount: u, quality: m }), b = new A(f), d = function(I, r, t) {
189
- for (var n, s, e, o, l, a = I, c = [], v = 0; v < r; v += t) s = a[0 + (n = 4 * v)], e = a[n + 1], o = a[n + 2], ((l = a[n + 3]) === void 0 || l >= 125) && (s > 250 && e > 250 && o > 250 || c.push([s, e, o]));
190
- return c;
191
- }(b.getImageData().data, b.width * b.height, g.quality), E = T(d, g.colorCount);
192
- return E ? E.palette() : null;
193
- }, O.prototype.getColorFromUrl = function(f, u, m) {
194
- var g = this, b = document.createElement("img");
195
- b.addEventListener("load", function() {
196
- var d = g.getPalette(b, 5, m);
197
- u(d[0], f);
198
- }), b.src = f;
199
- }, O.prototype.getImageData = function(f, u) {
200
- var m = new XMLHttpRequest();
201
- m.open("GET", f, !0), m.responseType = "arraybuffer", m.onload = function() {
202
- if (this.status == 200) {
203
- var g = new Uint8Array(this.response);
204
- i = g.length;
205
- for (var b = new Array(i), d = 0; d < g.length; d++) b[d] = String.fromCharCode(g[d]);
206
- var E = b.join(""), I = window.btoa(E);
207
- u("data:image/png;base64," + I);
208
- }
209
- }, m.send();
210
- }, O.prototype.getColorAsync = function(f, u, m) {
211
- var g = this;
212
- this.getImageData(f, function(b) {
213
- var d = document.createElement("img");
214
- d.addEventListener("load", function() {
215
- var E = g.getPalette(d, 5, m);
216
- u(E[0], this);
217
- }), d.src = b;
218
- });
219
- };
220
- export {
221
- O as default
222
- };
@@ -1 +0,0 @@
1
- "use strict";var c=Object.defineProperty;var r=(o,n)=>c(o,"name",{value:n,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("../../../../../node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.cjs");function u(){const o=new l.default;return{getColorthief:r(async i=>{const e=new Image;return e.src=i,e.crossOrigin="Anonymous",new Promise(s=>{e.addEventListener("load",async function(){const t=await o.getColor(e,90);s({bgColor:`rgb(${t[0]}, ${t[1]}, ${t[2]})`})})})},"getColorthief")}}r(u,"useColorthiefHook");exports.default=u;
@@ -1,23 +0,0 @@
1
- var a = Object.defineProperty;
2
- var n = (t, r) => a(t, "name", { value: r, configurable: !0 });
3
- import c from "../../../../../node_modules/.pnpm/colorthief@2.4.0/node_modules/colorthief/dist/color-thief/index.js";
4
- function l() {
5
- const t = new c();
6
- return {
7
- getColorthief: /* @__PURE__ */ n(async (s) => {
8
- const o = new Image();
9
- return o.src = s, o.crossOrigin = "Anonymous", new Promise((i) => {
10
- o.addEventListener("load", async function() {
11
- const e = await t.getColor(o, 90);
12
- i({
13
- bgColor: `rgb(${e[0]}, ${e[1]}, ${e[2]})`
14
- });
15
- });
16
- });
17
- }, "getColorthief")
18
- };
19
- }
20
- n(l, "useColorthiefHook");
21
- export {
22
- l as default
23
- };