@aurouscia/au-color-picker 0.4.6 → 0.5.1

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