@aurouscia/au-color-picker 0.1.1 → 0.2.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.
package/README.md CHANGED
@@ -1,2 +1,75 @@
1
1
  # au-color-picker
2
- vue3颜色选择控件,支持鼠标和手指拖动,开发中
2
+ vue3颜色选择控件,支持鼠标/手指的点击和拖动
3
+
4
+ ![au-color-picker预览效果](https://gitee.com/au114514/au-color-picker/raw/main/public/preview.png)
5
+
6
+ ## 用法
7
+ ```shell
8
+ npm i @aurouscia/au-color-picker
9
+ ```
10
+ ```ts
11
+ //main.ts(必须导入样式)
12
+ import '@aurouscia/au-color-picker/style.css'
13
+
14
+ //xxx.vue
15
+ import { AuColorPicker } from '@aurouscia/au-color-picker';
16
+ import { AuColorPickerPresetsNested } from '@aurouscia/au-color-picker';
17
+ ```
18
+
19
+ ### 仅自定义
20
+ ```vue
21
+ <AuColorPicker
22
+ :initial="初始值"
23
+ @change="值变化回调"
24
+ @done="面板关闭回调"
25
+ ></AuColorPicker>
26
+ ```
27
+
28
+ ### 预设+自定义
29
+ ```ts
30
+ const presets:NamedPreset[] = [
31
+ {
32
+ name: '水系',
33
+ colorHex: '#c3e5eb'
34
+ },
35
+ {
36
+ name: '绿地',
37
+ colorHex: '#ceeda4'
38
+ },
39
+ ]
40
+ ```
41
+ ```vue
42
+ <AuColorPickerPresetsNested
43
+ :initial="初始值"
44
+ :presets="预设列表"
45
+ :initial-selected-preset="初始选择预设"
46
+ @change="值变化回调" @done="面板关闭回调"
47
+ @presetSwitched="预设切换回调"
48
+ ></AuColorPickerPresetsNested>
49
+ ```
50
+
51
+ ### 组件属性定义
52
+ ```ts
53
+ //AuColorPicker的属性
54
+ export interface PickerProps{
55
+ initial?: string //初始值
56
+ entryStyles?: CSSProperties //入口按钮的样式
57
+ entryActiveStyles?: CSSProperties //入口按钮的样式(当面板展开)
58
+ entryClassName?: string //入口按钮的类名
59
+ pos?: 'left'|'right', //面板靠左还是靠右
60
+ panelBaseZIndex?:number, //面板的zIndex基础值
61
+ }
62
+
63
+ //AuColorPickerPresetsNested的属性
64
+ export interface PickerWithPresetsProps extends PickerProps{
65
+ initialSelectedPreset?:string //初始选择预设名称(undefined即为自定义)
66
+ presets?: NamedPreset[] //预设列表
67
+ }
68
+ export interface NamedPreset{
69
+ colorHex:string, //预设值
70
+ name:string //预设名称
71
+ }
72
+ ```
73
+
74
+ ## 许可证
75
+ MIT
@@ -1,431 +1,450 @@
1
- import { defineComponent as G, ref as b, onMounted as pe, onUnmounted as ge, openBlock as B, createElementBlock as D, normalizeStyle as U, isRef as ye, createElementVNode as i, computed as K, onBeforeMount as le, watch as ae, normalizeClass as me, unref as k, createVNode as ie, withDirectives as Y, vModelSelect as xe, createCommentVNode as re, vModelRadio as Q, Fragment as he, renderList as Ce, toDisplayString as Pe } from "vue";
1
+ import { defineComponent as Q, ref as b, onMounted as ge, onUnmounted as me, openBlock as N, createElementBlock as _, normalizeStyle as O, isRef as ye, createElementVNode as r, computed as K, onBeforeMount as re, watch as Y, normalizeClass as he, unref as P, createVNode as ue, withDirectives as G, vModelSelect as xe, createCommentVNode as J, vModelRadio as te, Fragment as Pe, renderList as ke, toDisplayString as Ce } from "vue";
2
2
  import A from "color-convert";
3
- function ke(p, v) {
4
- const y = p.x - v.x, f = p.y - v.y;
5
- return y ** 2 + f ** 2;
3
+ function we(m, f) {
4
+ const g = m.x - f.x, d = m.y - f.y;
5
+ return g ** 2 + d ** 2;
6
6
  }
7
- function Se(p, v) {
8
- const y = p.x - v.x, f = p.y - v.y;
9
- return Math.atan2(f, y);
7
+ function Se(m, f) {
8
+ const g = m.x - f.x, d = m.y - f.y;
9
+ return Math.atan2(d, g);
10
10
  }
11
- function Ie(p) {
12
- let v = p, y = 0, f = 0;
13
- for (; v !== null; )
14
- y += v.offsetTop, f += v.offsetLeft, v = v.offsetParent;
15
- return { y, x: f };
11
+ function Ie(m) {
12
+ let f = m, g = 0, d = 0;
13
+ for (; f !== null; )
14
+ g += f.offsetTop, d += f.offsetLeft, f = f.offsetParent;
15
+ return { y: g, x: d };
16
16
  }
17
- const _ = 400, L = 400, F = 200, we = 200, ee = 190, te = 150, O = 200, ne = 16, se = 3, be = /* @__PURE__ */ G({
17
+ const H = 400, q = 400, F = 200, be = 200, ne = 190, se = 150, L = 200, oe = 16, ae = 3, Be = /* @__PURE__ */ Q({
18
18
  __name: "AuColorPickerRing",
19
19
  props: {
20
20
  initialHex: {}
21
21
  },
22
22
  emits: ["changed"],
23
- setup(p, { expose: v, emit: y }) {
24
- const f = b(), P = b();
25
- let u, l;
26
- const $ = { x: 199, y: 199 }, I = (ee + te) / 2, V = ee ** 2, M = te ** 2, h = (_ - O) / 2, H = h + O, S = b(0), R = b(100), d = b(100), g = p;
27
- let a;
28
- function T() {
29
- var o, c;
30
- const t = (o = f.value) == null ? void 0 : o.getContext("2d"), n = (c = P.value) == null ? void 0 : c.getContext("2d");
31
- if (!t || !n)
23
+ setup(m, { expose: f, emit: g }) {
24
+ const d = b(), C = b();
25
+ let c, l;
26
+ const $ = { x: 199, y: 199 }, w = (ne + se) / 2, U = ne ** 2, D = se ** 2, h = (H - L) / 2, B = h + L, S = b(0), M = b(100), i = b(100), p = m;
27
+ let o;
28
+ function R() {
29
+ var a, v;
30
+ const n = (a = d.value) == null ? void 0 : a.getContext("2d"), s = (v = C.value) == null ? void 0 : v.getContext("2d");
31
+ if (!n || !s)
32
32
  throw Error("canvas context getting error");
33
- if (g.initialHex) {
34
- const x = A.hex.hsv(g.initialHex);
35
- S.value = x[0], R.value = x[1], d.value = x[2];
33
+ if (p.initialHex) {
34
+ const x = A.hex.hsv(p.initialHex);
35
+ S.value = x[0], M.value = x[1], i.value = x[2];
36
36
  }
37
- u = t, l = n, a = u.getImageData(0, 0, _, L), X(), e(), j(), u.putImageData(a, 0, 0);
37
+ c = n, l = s, o = c.getImageData(0, 0, H, q), j(), e(), X(), c.putImageData(o, 0, 0);
38
38
  }
39
- function X() {
40
- for (let t = 0; t < _; t++)
41
- for (let n = 0; n < L; n++) {
42
- const o = { x: t, y: n };
43
- if (m(o)) {
44
- const c = o.y * _ * 4 + o.x * 4, x = z(o), E = A.hsv.rgb([x, 100, 100]);
45
- a.data[c] = E[0], a.data[c + 1] = E[1], a.data[c + 2] = E[2], a.data[c + 3] = 255;
39
+ function j() {
40
+ for (let n = 0; n < H; n++)
41
+ for (let s = 0; s < q; s++) {
42
+ const a = { x: n, y: s };
43
+ if (y(a)) {
44
+ const v = a.y * H * 4 + a.x * 4, x = z(a), E = A.hsv.rgb([x, 100, 100]);
45
+ o.data[v] = E[0], o.data[v + 1] = E[1], o.data[v + 2] = E[2], o.data[v + 3] = 255;
46
46
  }
47
47
  }
48
48
  }
49
- function z(t) {
50
- return 360 * ((Se(t, $) + Math.PI) / (2 * Math.PI));
49
+ function z(n) {
50
+ return 360 * ((Se(n, $) + Math.PI) / (2 * Math.PI));
51
51
  }
52
- function m(t) {
53
- const n = ke($, t);
54
- return n > M && n < V;
52
+ function y(n) {
53
+ const s = we($, n);
54
+ return s > D && s < U;
55
55
  }
56
56
  function e() {
57
- for (let t = 0; t < _; t++)
58
- for (let n = 0; n < L; n++) {
59
- const o = { x: t, y: n };
60
- if (w(o)) {
61
- const c = o.y * _ * 4 + o.x * 4, { s: x, v: E } = s(o), q = A.hsv.rgb([S.value, x, E]);
62
- a.data[c] = q[0], a.data[c + 1] = q[1], a.data[c + 2] = q[2], a.data[c + 3] = 255;
57
+ for (let n = 0; n < H; n++)
58
+ for (let s = 0; s < q; s++) {
59
+ const a = { x: n, y: s };
60
+ if (I(a)) {
61
+ const v = a.y * H * 4 + a.x * 4, { s: x, v: E } = t(a), V = A.hsv.rgb([S.value, x, E]);
62
+ o.data[v] = V[0], o.data[v + 1] = V[1], o.data[v + 2] = V[2], o.data[v + 3] = 255;
63
63
  }
64
64
  }
65
65
  }
66
- function s(t) {
67
- const n = t.x - h, o = t.y - h;
68
- let c = n / O, x = 1 - o / O;
69
- return c > 1 ? c = 1 : c < 0 && (c = 0), x > 1 ? x = 1 : x < 0 && (x = 0), { s: 100 * c, v: 100 * x };
66
+ function t(n) {
67
+ const s = n.x - h, a = n.y - h;
68
+ let v = s / L, x = 1 - a / L;
69
+ return v > 1 ? v = 1 : v < 0 && (v = 0), x > 1 ? x = 1 : x < 0 && (x = 0), { s: 100 * v, v: 100 * x };
70
70
  }
71
- function w(t) {
72
- return !(t.x < h || t.x > H || t.y < h || t.y > H);
71
+ function I(n) {
72
+ return !(n.x < h || n.x > B || n.y < h || n.y > B);
73
73
  }
74
- let N = !1, r = "none", C = !1;
75
- function Z(t, n) {
76
- if (N || n && !C)
74
+ let T = !1, u = "none", k = !1;
75
+ function Z(n, s) {
76
+ if (T || s && !k)
77
77
  return;
78
- N = !0;
79
- const o = ce(t);
80
- if (r === "none" && (w(o) ? r = "square" : m(o) && (r = "ring")), r === "ring" && (t.preventDefault(), S.value = z(o), e(), u.putImageData(a, 0, 0)), r === "square") {
81
- t.preventDefault();
82
- const c = s(o);
83
- R.value = c.s, d.value = c.v;
78
+ T = !0;
79
+ const a = ve(n);
80
+ if (u === "none" && (I(a) ? u = "square" : y(a) && (u = "ring")), u === "ring" && (n.preventDefault(), S.value = z(a), e(), c.putImageData(o, 0, 0)), u === "square") {
81
+ n.preventDefault();
82
+ const v = t(a);
83
+ M.value = v.s, i.value = v.v;
84
84
  }
85
- r !== "none" && j(!0), N = !1;
85
+ u !== "none" && X(!0), T = !1;
86
86
  }
87
87
  function W() {
88
- r = "none", C = !1;
88
+ u = "none", k = !1;
89
89
  }
90
- function ce(t) {
91
- let n, o;
92
- if ("touches" in t) {
93
- n = t.touches[0].pageX, o = t.touches[0].pageY;
94
- const c = Ie(f.value);
95
- n -= c.x, o -= c.y;
90
+ function ve(n) {
91
+ let s, a;
92
+ if ("touches" in n) {
93
+ s = n.touches[0].pageX, a = n.touches[0].pageY;
94
+ const v = Ie(d.value);
95
+ s -= v.x, a -= v.y;
96
96
  } else
97
- n = t.offsetX, o = t.offsetY;
98
- return n = n * _ / F, o = o * _ / F, { x: n, y: o };
97
+ s = n.offsetX, a = n.offsetY;
98
+ return s = s * H / F, a = a * H / F, { x: s, y: a };
99
99
  }
100
- function j(t) {
101
- if (t) {
102
- const de = A.hsv.hex([S.value, R.value, d.value]);
103
- fe("changed", de);
100
+ function X(n) {
101
+ if (n) {
102
+ const pe = A.hsv.hex([S.value, M.value, i.value]);
103
+ de("changed", pe);
104
104
  }
105
- const n = (S.value / 360 * 2 + 1) * Math.PI, o = Math.cos(n) * I + _ / 2, c = Math.sin(n) * I + L / 2, x = R.value / 100 * O + h, E = (1 - d.value / 100) * O + h;
106
- l.reset(), l.lineWidth = 4, l.strokeStyle = "black", l.beginPath(), l.arc(o, c, ne - 2, 0, 2 * Math.PI), l.stroke(), l.beginPath(), l.arc(o, c, se, 0, 2 * Math.PI), l.fill();
107
- const q = d.value > 50 ? "black" : "#ddd";
108
- l.strokeStyle = q, l.fillStyle = q, l.beginPath(), l.arc(x, E, ne - 2, 0, 2 * Math.PI), l.stroke(), l.beginPath(), l.arc(x, E, se, 0, 2 * Math.PI), l.fill();
105
+ const s = (S.value / 360 * 2 + 1) * Math.PI, a = Math.cos(s) * w + H / 2, v = Math.sin(s) * w + q / 2, x = M.value / 100 * L + h, E = (1 - i.value / 100) * L + h;
106
+ l.reset(), l.lineWidth = 4, l.strokeStyle = "black", l.beginPath(), l.arc(a, v, oe - 2, 0, 2 * Math.PI), l.stroke(), l.beginPath(), l.arc(a, v, ae, 0, 2 * Math.PI), l.fill();
107
+ const V = i.value > 50 ? "black" : "#ddd";
108
+ l.strokeStyle = V, l.fillStyle = V, l.beginPath(), l.arc(x, E, oe - 2, 0, 2 * Math.PI), l.stroke(), l.beginPath(), l.arc(x, E, ae, 0, 2 * Math.PI), l.fill();
109
109
  }
110
- function ve(t) {
111
- const n = A.hex.hsv(t);
112
- S.value = n[0], R.value = n[1], d.value = n[2], e(), u.putImageData(a, 0, 0), j();
110
+ function fe(n) {
111
+ const s = A.hex.hsv(n);
112
+ S.value = s[0], M.value = s[1], i.value = s[2], e(), c.putImageData(o, 0, 0), X();
113
113
  }
114
- const fe = y;
115
- return v({ enforceTo: ve }), pe(() => {
116
- T(), window.addEventListener("touchend", W), window.addEventListener("mouseup", W);
117
- }), ge(() => {
114
+ const de = g;
115
+ return f({ enforceTo: fe }), ge(() => {
116
+ R(), window.addEventListener("touchend", W), window.addEventListener("mouseup", W);
117
+ }), me(() => {
118
118
  window.removeEventListener("touchend", W), window.removeEventListener("mouseup", W);
119
- }), (t, n) => (B(), D("div", {
119
+ }), (n, s) => (N(), _("div", {
120
120
  class: "acpRingBody",
121
- style: U({ width: F + "px", height: we + "px" }),
121
+ style: O({ width: F + "px", height: be + "px" }),
122
122
  onTouchstart: Z,
123
123
  onTouchmove: Z,
124
124
  onTouchend: W,
125
- onMousemove: n[0] || (n[0] = (o) => Z(o, !0)),
126
- onMousedown: n[1] || (n[1] = (o) => {
127
- Z(o), ye(C) ? C.value = !0 : C = !0;
125
+ onMousemove: s[0] || (s[0] = (a) => Z(a, !0)),
126
+ onMousedown: s[1] || (s[1] = (a) => {
127
+ Z(a), ye(k) ? k.value = !0 : k = !0;
128
128
  })
129
129
  }, [
130
- i("canvas", {
131
- width: _,
132
- height: L,
130
+ r("canvas", {
131
+ width: H,
132
+ height: q,
133
133
  ref_key: "cvs",
134
- ref: f
134
+ ref: d
135
135
  }, null, 512),
136
- i("canvas", {
137
- width: _,
138
- height: L,
136
+ r("canvas", {
137
+ width: H,
138
+ height: q,
139
139
  ref_key: "cursorCvs",
140
- ref: P
140
+ ref: C
141
141
  }, null, 512)
142
142
  ], 36));
143
143
  }
144
- }), J = (p, v) => {
145
- const y = p.__vccOpts || p;
146
- for (const [f, P] of v)
147
- y[f] = P;
148
- return y;
149
- }, _e = /* @__PURE__ */ J(be, [["__scopeId", "data-v-505caf85"]]);
150
- function oe(p) {
151
- return /^#([0-9A-F]{3}){1,2}$/i.test(p);
144
+ }), ee = (m, f) => {
145
+ const g = m.__vccOpts || m;
146
+ for (const [d, C] of f)
147
+ g[d] = C;
148
+ return g;
149
+ }, He = /* @__PURE__ */ ee(Be, [["__scopeId", "data-v-505caf85"]]);
150
+ function le(m) {
151
+ return /^#([0-9A-F]{3}){1,2}$/i.test(m);
152
152
  }
153
- function ue(p) {
154
- const v = b(!1), y = b("#ff0000"), f = K(() => {
153
+ function ce(m) {
154
+ const f = b(!1), g = b("#ff0000"), d = K(() => {
155
155
  let l = {};
156
- return v.value || (l.boxShadow = "none"), p.entryStyles && Object.assign(l, p.entryStyles), v.value && (l.transition = "0s", Object.assign(l, p.entryActiveStyles)), l.backgroundColor = y.value, p.pos === "right" ? l.right = "0px" : l.left = "0px", l;
156
+ return f.value || (l.boxShadow = "none"), m.entryStyles && Object.assign(l, m.entryStyles), f.value && (l.transition = "0s", Object.assign(l, m.entryActiveStyles)), l.backgroundColor = g.value, m.pos === "right" ? l.right = "0px" : l.left = "0px", l;
157
157
  });
158
- function P() {
159
- v.value = !1;
158
+ function C() {
159
+ f.value = !1;
160
160
  }
161
- function u() {
162
- v.value = !v.value;
161
+ function c() {
162
+ f.value = !f.value;
163
163
  }
164
- return { hexValue: y, panelShow: v, closePanel: P, togglePanel: u, entryStylesActual: f };
164
+ return { hexValue: g, panelShow: f, closePanel: C, togglePanel: c, entryStylesActual: d };
165
165
  }
166
- const He = { class: "acpRing" }, Be = { class: "acpParams" }, De = {
166
+ function ie() {
167
+ window.alert("https://www.npmjs.com/package/@aurouscia/au-color-picker");
168
+ }
169
+ const Ne = { class: "acpRing" }, _e = { class: "acpParams" }, De = {
167
170
  key: 0,
168
171
  class: "acpSingleInput"
169
172
  }, Me = ["value"], Re = {
170
173
  key: 1,
171
174
  class: "acpTripleInputs"
172
- }, Te = ["value"], Ne = ["value"], Ae = ["value"], $e = {
175
+ }, Te = ["value"], Ae = ["value"], $e = ["value"], Ee = {
173
176
  key: 2,
174
177
  class: "acpTripleInputs"
175
- }, Ee = ["value"], Ve = ["value"], qe = ["value"], Le = { class: "acpDoneBtn" }, Oe = /* @__PURE__ */ G({
178
+ }, Ve = ["value"], qe = ["value"], Le = ["value"], Oe = { class: "acpDoneBtn" }, Ue = /* @__PURE__ */ Q({
176
179
  __name: "AuColorPicker",
177
180
  props: {
178
- inital: {},
181
+ initial: {},
179
182
  entryStyles: {},
180
183
  entryActiveStyles: {},
181
184
  entryClassName: {},
182
185
  pos: {},
183
186
  panelBaseZIndex: {},
184
- presets: {}
187
+ showPackageName: { type: Boolean }
185
188
  },
186
189
  emits: ["change", "done"],
187
- setup(p, { expose: v, emit: y }) {
188
- const f = p, P = b(), { hexValue: u, panelShow: l, closePanel: $, togglePanel: I, entryStylesActual: V } = ue(f);
189
- function M(m) {
190
- u.value = a(m), T();
190
+ setup(m, { expose: f, emit: g }) {
191
+ const d = m, C = b(), { hexValue: c, panelShow: l, closePanel: $, togglePanel: w, entryStylesActual: U } = ce(d);
192
+ function D(y) {
193
+ c.value = o(y), R();
191
194
  }
192
- const h = b("hex"), H = K(() => A.hex.rgb(u.value)), S = K(() => A.hex.hsv(u.value));
193
- function R(m) {
194
- var s;
195
- const e = m.target;
195
+ const h = b("hex"), B = K(() => A.hex.rgb(c.value)), S = K(() => A.hex.hsv(c.value));
196
+ function M(y) {
197
+ var t;
198
+ const e = y.target;
196
199
  if ("value" in e) {
197
- const w = e.value;
198
- if (w && oe(w)) {
199
- u.value = a(w), (s = P.value) == null || s.enforceTo(u.value), T();
200
+ const I = e.value;
201
+ if (I && le(I)) {
202
+ c.value = o(I), (t = C.value) == null || t.enforceTo(c.value), R();
200
203
  return;
201
204
  }
202
- e.value = u.value;
205
+ e.value = c.value;
203
206
  }
204
207
  }
205
- function d(m, e) {
206
- var w;
207
- const s = m.target;
208
- if ("value" in s) {
209
- const N = s.value;
210
- if (N) {
211
- let r = parseInt(N);
212
- if (isNaN(r))
213
- s.value = "0";
208
+ function i(y, e) {
209
+ var I;
210
+ const t = y.target;
211
+ if ("value" in t) {
212
+ const T = t.value;
213
+ if (T) {
214
+ let u = parseInt(T);
215
+ if (isNaN(u))
216
+ t.value = "0";
214
217
  else {
215
- r > 255 ? r = 255 : r < 0 && (r = 0);
216
- const C = [...H.value];
217
- e == "r" ? C[0] = r : e == "g" ? C[1] = r : C[2] = r, u.value = a(A.rgb.hex(C)), (w = P.value) == null || w.enforceTo(u.value), s.value = r.toString(), T();
218
+ u > 255 ? u = 255 : u < 0 && (u = 0);
219
+ const k = [...B.value];
220
+ e == "r" ? k[0] = u : e == "g" ? k[1] = u : k[2] = u, c.value = o(A.rgb.hex(k)), (I = C.value) == null || I.enforceTo(c.value), t.value = u.toString(), R();
218
221
  return;
219
222
  }
220
223
  }
221
224
  }
222
225
  }
223
- function g(m, e) {
224
- var w;
225
- const s = m.target;
226
- if ("value" in s) {
227
- const N = s.value;
228
- if (N) {
229
- let r = parseInt(N);
230
- if (isNaN(r))
231
- s.value = "0";
226
+ function p(y, e) {
227
+ var I;
228
+ const t = y.target;
229
+ if ("value" in t) {
230
+ const T = t.value;
231
+ if (T) {
232
+ let u = parseInt(T);
233
+ if (isNaN(u))
234
+ t.value = "0";
232
235
  else {
233
- e === "h" ? r > 359 && (r = 359) : r > 100 && (r = 100), r < 0 && (r = 0);
234
- const C = [...S.value];
235
- e == "h" ? C[0] = r : e == "s" ? C[1] = r : C[2] = r, u.value = a(A.hsv.hex(C)), s.value = r.toString(), (w = P.value) == null || w.enforceTo(u.value), T();
236
+ e === "h" ? u > 359 && (u = 359) : u > 100 && (u = 100), u < 0 && (u = 0);
237
+ const k = [...S.value];
238
+ e == "h" ? k[0] = u : e == "s" ? k[1] = u : k[2] = u, c.value = o(A.hsv.hex(k)), t.value = u.toString(), (I = C.value) == null || I.enforceTo(c.value), R();
236
239
  return;
237
240
  }
238
241
  }
239
242
  }
240
243
  }
241
- function a(m) {
242
- return m.startsWith("#") ? m.toUpperCase() : "#" + m.toUpperCase();
244
+ function o(y) {
245
+ return y.startsWith("#") ? y.toUpperCase() : "#" + y.toUpperCase();
243
246
  }
244
- function T() {
245
- z("change", u.value);
247
+ function R() {
248
+ z("change", c.value);
246
249
  }
247
- function X() {
248
- return u.value;
250
+ function j() {
251
+ return c.value;
249
252
  }
250
- le(() => {
251
- f.inital && oe(f.inital) && (u.value = a(f.inital));
253
+ re(() => {
254
+ d.initial && le(d.initial) && (c.value = o(d.initial));
252
255
  });
253
- const z = y;
254
- return v({ closePanel: $, getCurrentHex: X }), ae(l, (m) => {
255
- m === !1 && z("done", u.value);
256
- }), (m, e) => (B(), D("div", {
256
+ const z = g;
257
+ return f({ closePanel: $, getCurrentHex: j }), Y(l, (y) => {
258
+ y === !1 && z("done", c.value);
259
+ }), (y, e) => (N(), _("div", {
257
260
  class: "acp",
258
- onClick: e[9] || (e[9] = (s) => s.stopPropagation())
261
+ onClick: e[10] || (e[10] = (t) => t.stopPropagation())
259
262
  }, [
260
- i("div", {
261
- class: me(m.entryClassName || "acpEntry"),
262
- style: U(k(V)),
263
+ r("div", {
264
+ class: he(y.entryClassName || "acpEntry"),
265
+ style: O(P(U)),
263
266
  onClick: e[0] || (e[0] = //@ts-ignore
264
- (...s) => k(I) && k(I)(...s))
267
+ (...t) => P(w) && P(w)(...t))
265
268
  }, null, 6),
266
- k(l) ? (B(), D("div", {
269
+ P(l) ? (N(), _("div", {
267
270
  key: 0,
268
271
  class: "acpPanel",
269
- style: U({ zIndex: (m.panelBaseZIndex || 0) + 100 })
272
+ style: O({ zIndex: (y.panelBaseZIndex || 0) + 100 })
270
273
  }, [
271
- i("div", He, [
272
- ie(_e, {
274
+ r("div", Ne, [
275
+ ue(He, {
273
276
  ref_key: "ring",
274
- ref: P,
275
- initialHex: k(u),
276
- onChanged: M
277
- }, null, 8, ["initialHex"])
277
+ ref: C,
278
+ "initial-hex": P(c),
279
+ onChanged: D,
280
+ "show-package-name": y.showPackageName
281
+ }, null, 8, ["initial-hex", "show-package-name"])
278
282
  ]),
279
- i("div", Be, [
280
- Y(i("select", {
281
- "onUpdate:modelValue": e[1] || (e[1] = (s) => h.value = s)
282
- }, e[10] || (e[10] = [
283
- i("option", { value: "hex" }, "HEX", -1),
284
- i("option", { value: "rgb" }, "RGB", -1),
285
- i("option", { value: "hsv" }, "HSV", -1)
283
+ r("div", _e, [
284
+ G(r("select", {
285
+ "onUpdate:modelValue": e[1] || (e[1] = (t) => h.value = t)
286
+ }, e[11] || (e[11] = [
287
+ r("option", { value: "hex" }, "HEX", -1),
288
+ r("option", { value: "rgb" }, "RGB", -1),
289
+ r("option", { value: "hsv" }, "HSV", -1)
286
290
  ]), 512), [
287
291
  [xe, h.value]
288
292
  ]),
289
- h.value == "hex" ? (B(), D("div", De, [
290
- i("input", {
291
- value: k(u),
292
- onBlur: R,
293
+ h.value == "hex" ? (N(), _("div", De, [
294
+ r("input", {
295
+ value: P(c),
296
+ onBlur: M,
293
297
  spellcheck: "false",
294
298
  maxlength: "7"
295
299
  }, null, 40, Me)
296
- ])) : h.value == "rgb" ? (B(), D("div", Re, [
297
- i("input", {
298
- value: H.value[0],
299
- onBlur: e[2] || (e[2] = (s) => d(s, "r"))
300
+ ])) : h.value == "rgb" ? (N(), _("div", Re, [
301
+ r("input", {
302
+ value: B.value[0],
303
+ onBlur: e[2] || (e[2] = (t) => i(t, "r"))
300
304
  }, null, 40, Te),
301
- i("input", {
302
- value: H.value[1],
303
- onBlur: e[3] || (e[3] = (s) => d(s, "g"))
304
- }, null, 40, Ne),
305
- i("input", {
306
- value: H.value[2],
307
- onBlur: e[4] || (e[4] = (s) => d(s, "b"))
308
- }, null, 40, Ae)
309
- ])) : (B(), D("div", $e, [
310
- i("input", {
305
+ r("input", {
306
+ value: B.value[1],
307
+ onBlur: e[3] || (e[3] = (t) => i(t, "g"))
308
+ }, null, 40, Ae),
309
+ r("input", {
310
+ value: B.value[2],
311
+ onBlur: e[4] || (e[4] = (t) => i(t, "b"))
312
+ }, null, 40, $e)
313
+ ])) : (N(), _("div", Ee, [
314
+ r("input", {
311
315
  value: S.value[0],
312
- onBlur: e[5] || (e[5] = (s) => g(s, "h"))
313
- }, null, 40, Ee),
314
- i("input", {
315
- value: S.value[1],
316
- onBlur: e[6] || (e[6] = (s) => g(s, "s"))
316
+ onBlur: e[5] || (e[5] = (t) => p(t, "h"))
317
317
  }, null, 40, Ve),
318
- i("input", {
318
+ r("input", {
319
+ value: S.value[1],
320
+ onBlur: e[6] || (e[6] = (t) => p(t, "s"))
321
+ }, null, 40, qe),
322
+ r("input", {
319
323
  value: S.value[2],
320
- onBlur: e[7] || (e[7] = (s) => g(s, "v"))
321
- }, null, 40, qe)
324
+ onBlur: e[7] || (e[7] = (t) => p(t, "v"))
325
+ }, null, 40, Le)
322
326
  ]))
323
327
  ]),
324
- i("div", Le, [
325
- i("button", {
328
+ r("div", Oe, [
329
+ r("button", {
326
330
  onClick: e[8] || (e[8] = //@ts-ignore
327
- (...s) => k($) && k($)(...s))
331
+ (...t) => P($) && P($)(...t))
328
332
  }, "OK")
329
- ])
330
- ], 4)) : re("", !0)
333
+ ]),
334
+ y.showPackageName ? (N(), _("div", {
335
+ key: 0,
336
+ class: "acpPackageName",
337
+ onClick: e[9] || (e[9] = //@ts-ignore
338
+ (...t) => P(ie) && P(ie)(...t))
339
+ }, " au-color-picker ")) : J("", !0)
340
+ ], 4)) : J("", !0)
331
341
  ]));
332
342
  }
333
- }), Ue = /* @__PURE__ */ J(Oe, [["__scopeId", "data-v-3439ba22"]]), ze = { class: "acp" }, We = { class: "acpNamedPresets" }, Ze = { for: "acpColorPresetCustom" }, Xe = ["for"], je = ["id", "value", "onClick"], Fe = { class: "acpPresetName" }, Ke = { class: "acpDoneBtn" }, Ye = /* @__PURE__ */ G({
343
+ }), ze = /* @__PURE__ */ ee(Ue, [["__scopeId", "data-v-9b887c0d"]]), We = { class: "acp" }, Ze = { class: "acpNamedPresets" }, je = { for: "acpColorPresetCustom" }, Xe = ["for"], Fe = ["id", "value", "onClick"], Ke = { class: "acpPresetName" }, Ye = { class: "acpDoneBtn" }, Ge = /* @__PURE__ */ Q({
334
344
  __name: "AuColorPickerPresetsNested",
335
345
  props: {
336
- inital: {},
346
+ initialSelectedPreset: {},
347
+ presets: {},
348
+ initial: {},
337
349
  entryStyles: {},
338
350
  entryActiveStyles: {},
339
351
  entryClassName: {},
340
352
  pos: {},
341
353
  panelBaseZIndex: {},
342
- presets: {}
354
+ showPackageName: { type: Boolean }
343
355
  },
344
- emits: ["change", "done"],
345
- setup(p, { emit: v }) {
346
- const y = p, { hexValue: f, panelShow: P, closePanel: u, togglePanel: l, entryStylesActual: $ } = ue(y), I = b(), V = b(), M = b("#ff0000");
347
- function h(d) {
348
- d ? (I.value = d.name, f.value = d.colorHex) : V.value && (I.value = void 0, f.value = M.value);
356
+ emits: ["change", "done", "presetSwitched"],
357
+ setup(m, { emit: f }) {
358
+ const g = m, { hexValue: d, panelShow: C, closePanel: c, togglePanel: l, entryStylesActual: $ } = ce(g), w = b(), U = b(), D = b("#ff0000");
359
+ function h(i) {
360
+ i ? (w.value = i.name, d.value = i.colorHex) : (w.value = void 0, d.value = D.value);
349
361
  }
350
- const H = v;
351
- function S(d) {
352
- f.value = d, M.value = d, H("change", d);
362
+ const B = f;
363
+ function S(i) {
364
+ d.value = i, D.value = i, B("change", i);
353
365
  }
354
- function R(d) {
355
- f.value = d, M.value = d, u();
366
+ function M(i) {
367
+ d.value = i, D.value = i, c();
356
368
  }
357
- return ae(P, (d) => {
358
- d === !1 && H("done", f.value);
359
- }), le(() => {
360
- y.inital && (f.value = y.inital, M.value = y.inital);
361
- }), (d, g) => (B(), D("div", ze, [
362
- i("div", {
369
+ return Y(C, (i) => {
370
+ i === !1 && B("done", d.value);
371
+ }), Y(w, (i) => {
372
+ B("presetSwitched", i);
373
+ }), re(() => {
374
+ var i;
375
+ if (g.initial && (d.value = g.initial, D.value = g.initial), g.initialSelectedPreset) {
376
+ const p = (i = g.presets) == null ? void 0 : i.find((o) => o.name === g.initialSelectedPreset);
377
+ p && h(p);
378
+ }
379
+ }), (i, p) => (N(), _("div", We, [
380
+ r("div", {
363
381
  class: "acpEntry",
364
- style: U(k($)),
365
- onClick: g[0] || (g[0] = //@ts-ignore
366
- (...a) => k(l) && k(l)(...a))
382
+ style: O(P($)),
383
+ onClick: p[0] || (p[0] = //@ts-ignore
384
+ (...o) => P(l) && P(l)(...o))
367
385
  }, null, 4),
368
- k(P) ? (B(), D("div", {
386
+ P(C) ? (N(), _("div", {
369
387
  key: 0,
370
388
  class: "acpPanel",
371
- style: U({ zIndex: (d.panelBaseZIndex || 0) + 100 })
389
+ style: O({ zIndex: (i.panelBaseZIndex || 0) + 100 })
372
390
  }, [
373
- i("div", We, [
374
- i("label", Ze, [
375
- ie(Ue, {
376
- inital: M.value,
391
+ r("div", Ze, [
392
+ r("label", je, [
393
+ ue(ze, {
394
+ initial: D.value,
377
395
  onChange: S,
378
- onDone: R,
396
+ onDone: M,
379
397
  "entry-class-name": "acpPresetBody",
380
398
  ref_key: "customPicker",
381
- ref: V
382
- }, null, 8, ["inital"]),
383
- Y(i("input", {
399
+ ref: U,
400
+ "show-package-name": i.showPackageName
401
+ }, null, 8, ["initial", "show-package-name"]),
402
+ G(r("input", {
384
403
  name: "colorType",
385
404
  type: "radio",
386
405
  id: "acpColorPresetCustom",
387
406
  value: void 0,
388
- "onUpdate:modelValue": g[1] || (g[1] = (a) => I.value = a),
389
- onClick: g[2] || (g[2] = (a) => h())
407
+ "onUpdate:modelValue": p[1] || (p[1] = (o) => w.value = o),
408
+ onClick: p[2] || (p[2] = (o) => h())
390
409
  }, null, 512), [
391
- [Q, I.value]
410
+ [te, w.value]
392
411
  ]),
393
- g[5] || (g[5] = i("div", { class: "acpPresetName" }, "自定义", -1))
412
+ p[5] || (p[5] = r("div", { class: "acpPresetName" }, "自定义", -1))
394
413
  ]),
395
- g[6] || (g[6] = i("div", { class: "acpSep" }, null, -1)),
396
- (B(!0), D(he, null, Ce(d.presets, (a) => (B(), D("label", {
397
- for: `acpColorPreset${a.name}`
414
+ p[6] || (p[6] = r("div", { class: "acpSep" }, null, -1)),
415
+ (N(!0), _(Pe, null, ke(i.presets, (o) => (N(), _("label", {
416
+ for: `acpColorPreset${o.name}`
398
417
  }, [
399
- i("div", {
418
+ r("div", {
400
419
  class: "acpPresetBody",
401
- style: U({ backgroundColor: a.colorHex })
420
+ style: O({ backgroundColor: o.colorHex })
402
421
  }, null, 4),
403
- Y(i("input", {
422
+ G(r("input", {
404
423
  name: "colorType",
405
424
  type: "radio",
406
- id: `acpColorPreset${a.name}`,
407
- value: a.name,
408
- "onUpdate:modelValue": g[3] || (g[3] = (T) => I.value = T),
409
- onClick: (T) => h(a)
410
- }, null, 8, je), [
411
- [Q, I.value]
425
+ id: `acpColorPreset${o.name}`,
426
+ value: o.name,
427
+ "onUpdate:modelValue": p[3] || (p[3] = (R) => w.value = R),
428
+ onClick: (R) => h(o)
429
+ }, null, 8, Fe), [
430
+ [te, w.value]
412
431
  ]),
413
- i("div", Fe, Pe(a.name), 1)
432
+ r("div", Ke, Ce(o.name), 1)
414
433
  ], 8, Xe))), 256)),
415
- g[7] || (g[7] = i("div", { class: "acpSep" }, null, -1))
434
+ p[7] || (p[7] = r("div", { class: "acpSep" }, null, -1))
416
435
  ]),
417
- i("div", Ke, [
418
- i("button", {
419
- onClick: g[4] || (g[4] = //@ts-ignore
420
- (...a) => k(u) && k(u)(...a))
436
+ r("div", Ye, [
437
+ r("button", {
438
+ onClick: p[4] || (p[4] = //@ts-ignore
439
+ (...o) => P(c) && P(c)(...o))
421
440
  }, "OK")
422
441
  ])
423
- ], 4)) : re("", !0)
442
+ ], 4)) : J("", !0)
424
443
  ]));
425
444
  }
426
- }), Qe = /* @__PURE__ */ J(Ye, [["__scopeId", "data-v-66671b10"]]);
445
+ }), et = /* @__PURE__ */ ee(Ge, [["__scopeId", "data-v-e312908b"]]);
427
446
  export {
428
- Ue as AuColorPicker,
429
- Qe as AuColorPickerPresetsNested,
430
- _e as AuColorPickerRing
447
+ ze as AuColorPicker,
448
+ et as AuColorPickerPresetsNested,
449
+ He as AuColorPickerRing
431
450
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .acpRingBody[data-v-505caf85]{position:relative}canvas[data-v-505caf85]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%}[data-v-3439ba22]{margin:0;padding:0}.acpSep[data-v-3439ba22]{height:2px;border-radius:100px;flex-grow:0;flex-shrink:0;background-color:#ddd}.acpPresetBody[data-v-3439ba22]{width:25px;height:25px;border-radius:1000px;cursor:pointer}.acpDoneBtn[data-v-3439ba22]{display:flex;justify-content:center;align-items:center;margin:8px}.acpDoneBtn button[data-v-3439ba22]{background:none;border:none;font-weight:700;color:gray;font-size:16px;cursor:pointer}.acpDoneBtn button[data-v-3439ba22]:hover{color:#000}.acpEntry[data-v-3439ba22]{width:30px;height:30px;cursor:pointer;border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff}.acpPanel[data-v-3439ba22]{border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff;margin-top:3px;position:absolute}.acp[data-v-3439ba22]{position:relative;width:fit-content}.acp label[data-v-3439ba22]{-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer}.acp input[type=radio][data-v-3439ba22]{cursor:pointer}.acpParams[data-v-3439ba22]{display:flex;justify-content:space-between;align-items:center;padding:5px}.acpParams select[data-v-3439ba22],.acpParams input[data-v-3439ba22]{margin:0;padding:2px;display:block;font-size:16px;box-sizing:border-box;height:24px;line-height:24px}.acpParams input[data-v-3439ba22]{text-align:center}.acpParams .acpSingleInput input[data-v-3439ba22]{width:120px}.acpParams .acpTripleInputs[data-v-3439ba22]{display:flex;justify-content:space-around}.acpParams .acpTripleInputs input[data-v-3439ba22]{width:40px}[data-v-66671b10]{margin:0;padding:0}.acpSep[data-v-66671b10]{height:2px;border-radius:100px;flex-grow:0;flex-shrink:0;background-color:#ddd}.acpPresetBody[data-v-66671b10]{width:25px;height:25px;border-radius:1000px;cursor:pointer}.acpDoneBtn[data-v-66671b10]{display:flex;justify-content:center;align-items:center;margin:8px}.acpDoneBtn button[data-v-66671b10]{background:none;border:none;font-weight:700;color:gray;font-size:16px;cursor:pointer}.acpDoneBtn button[data-v-66671b10]:hover{color:#000}.acpEntry[data-v-66671b10]{width:30px;height:30px;cursor:pointer;border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff}.acpPanel[data-v-66671b10]{border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff;margin-top:3px;position:absolute}.acp[data-v-66671b10]{position:relative;width:fit-content}.acp label[data-v-66671b10]{-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer}.acp input[type=radio][data-v-66671b10]{cursor:pointer}.acpNamedPresets[data-v-66671b10]{margin:5px;display:flex;flex-direction:column;gap:4px}.acpNamedPresets[data-v-66671b10]>*{display:flex;justify-content:flex-start;align-items:center;gap:5px}.acpNamedPresets>* .acpPresetName[data-v-66671b10]{color:#666}.acpNamedPresets>* .acpPresetName[data-v-66671b10]:hover{color:#000}
1
+ .acpRingBody[data-v-505caf85]{position:relative}canvas[data-v-505caf85]{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%}[data-v-9b887c0d]{margin:0;padding:0}.acpSep[data-v-9b887c0d]{height:2px;border-radius:100px;flex-grow:0;flex-shrink:0;background-color:#ddd}.acpPresetBody[data-v-9b887c0d]{width:25px;height:25px;border-radius:1000px;cursor:pointer}.acpDoneBtn[data-v-9b887c0d]{display:flex;justify-content:center;align-items:center;margin:8px}.acpDoneBtn button[data-v-9b887c0d]{background:none;border:none;font-weight:700;color:gray;font-size:16px;cursor:pointer}.acpDoneBtn button[data-v-9b887c0d]:hover{color:#000}.acpEntry[data-v-9b887c0d]{width:30px;height:30px;cursor:pointer;border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff}.acpPanel[data-v-9b887c0d]{border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff;margin-top:3px;position:absolute}.acp[data-v-9b887c0d]{position:relative;width:fit-content}.acp label[data-v-9b887c0d]{-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer}.acp input[type=radio][data-v-9b887c0d]{cursor:pointer}.acpPackageName[data-v-9b887c0d]{position:absolute;left:2px;bottom:3px;font-size:8px;color:#ccc;text-align:right;cursor:pointer}.acpParams[data-v-9b887c0d]{display:flex;justify-content:space-between;align-items:center;padding:5px}.acpParams select[data-v-9b887c0d],.acpParams input[data-v-9b887c0d]{margin:0;padding:2px;display:block;font-size:16px;box-sizing:border-box;height:24px;line-height:24px}.acpParams input[data-v-9b887c0d]{text-align:center}.acpParams .acpSingleInput input[data-v-9b887c0d]{width:120px}.acpParams .acpTripleInputs[data-v-9b887c0d]{display:flex;justify-content:space-around}.acpParams .acpTripleInputs input[data-v-9b887c0d]{width:40px}[data-v-e312908b]{margin:0;padding:0}.acpSep[data-v-e312908b]{height:2px;border-radius:100px;flex-grow:0;flex-shrink:0;background-color:#ddd}.acpPresetBody[data-v-e312908b]{width:25px;height:25px;border-radius:1000px;cursor:pointer}.acpDoneBtn[data-v-e312908b]{display:flex;justify-content:center;align-items:center;margin:8px}.acpDoneBtn button[data-v-e312908b]{background:none;border:none;font-weight:700;color:gray;font-size:16px;cursor:pointer}.acpDoneBtn button[data-v-e312908b]:hover{color:#000}.acpEntry[data-v-e312908b]{width:30px;height:30px;cursor:pointer;border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff}.acpPanel[data-v-e312908b]{border-radius:5px;box-shadow:0 0 5px #000;background-color:#fff;margin-top:3px;position:absolute}.acp[data-v-e312908b]{position:relative;width:fit-content}.acp label[data-v-e312908b]{-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer}.acp input[type=radio][data-v-e312908b]{cursor:pointer}.acpNamedPresets[data-v-e312908b]{margin:5px;display:flex;flex-direction:column;gap:4px}.acpNamedPresets[data-v-e312908b]>*{display:flex;justify-content:flex-start;align-items:center;gap:5px}.acpNamedPresets>* .acpPresetName[data-v-e312908b]{color:#666}.acpNamedPresets>* .acpPresetName[data-v-e312908b]:hover{color:#000}
@@ -1,9 +1,11 @@
1
- import { PickerProps } from './common/pickerProps';
2
- declare const _default: import('vue').DefineComponent<PickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
1
+ import { PickerWithPresetsProps } from './common/pickerProps';
2
+ declare const _default: import('vue').DefineComponent<PickerWithPresetsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
3
  done: (hexStr: string) => any;
4
4
  change: (hexStr: string) => any;
5
- }, string, import('vue').PublicProps, Readonly<PickerProps> & Readonly<{
5
+ presetSwitched: (name: string | undefined) => any;
6
+ }, string, import('vue').PublicProps, Readonly<PickerWithPresetsProps> & Readonly<{
6
7
  onDone?: ((hexStr: string) => any) | undefined;
7
8
  onChange?: ((hexStr: string) => any) | undefined;
9
+ onPresetSwitched?: ((name: string | undefined) => any) | undefined;
8
10
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
9
11
  export default _default;
@@ -1,11 +1,15 @@
1
1
  import { CSSProperties } from 'vue';
2
2
  export interface PickerProps {
3
- inital?: string;
3
+ initial?: string;
4
4
  entryStyles?: CSSProperties;
5
5
  entryActiveStyles?: CSSProperties;
6
6
  entryClassName?: string;
7
7
  pos?: 'left' | 'right';
8
8
  panelBaseZIndex?: number;
9
+ showPackageName?: boolean;
10
+ }
11
+ export interface PickerWithPresetsProps extends PickerProps {
12
+ initialSelectedPreset?: string;
9
13
  presets?: NamedPreset[];
10
14
  }
11
15
  export interface NamedPreset {
@@ -1,3 +1,4 @@
1
1
  export { default as AuColorPicker } from './components/AuColorPicker.vue';
2
2
  export { default as AuColorPickerRing } from './components/AuColorPickerRing.vue';
3
3
  export { default as AuColorPickerPresetsNested } from './components/AuColorPickerPresetsNested.vue';
4
+ export type * from './components/common/pickerProps';
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "color",
15
15
  "component"
16
16
  ],
17
- "version": "0.1.1",
17
+ "version": "0.2.0",
18
18
  "type": "module",
19
19
  "files": [
20
20
  "dist"
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/color-convert": "^2.0.4",
44
- "@types/node": "^22.10.0",
45
- "@vitejs/plugin-vue": "^5.2.0",
44
+ "@types/node": "^22.10.1",
45
+ "@vitejs/plugin-vue": "^5.2.1",
46
46
  "sass": "^1.81.0",
47
- "typescript": "5.6.3",
47
+ "typescript": "^5.7.2",
48
48
  "vite": "^5.4.11",
49
49
  "vite-plugin-dts": "^4.3.0"
50
50
  }