sakana-element 2.4.0 → 2.4.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.
Files changed (52) hide show
  1. package/dist/es/{Alert-DfLsJvQD.js → Alert-DRIDwear.js} +2 -2
  2. package/dist/es/{Avatar-Ci4OKsv7.js → Avatar-Dkvvhw_D.js} +1 -1
  3. package/dist/es/{Badge-B4wEToK6.js → Badge-CLNacHVq.js} +2 -2
  4. package/dist/es/{Breadcrumb-BFzww8jd.js → Breadcrumb-CfJA9NZz.js} +2 -2
  5. package/dist/es/{Button-DbFviVWb.js → Button-Dj1DIvXh.js} +2 -2
  6. package/dist/es/{Card-ClRqKkc_.js → Card-meh7F1e2.js} +1 -1
  7. package/dist/es/{ChatBubble-DFEV_lVI.js → ChatBubble-Ccr3wzoK.js} +1 -1
  8. package/dist/es/{Checkbox-l86YI3Fr.js → Checkbox-vOcwl1OX.js} +3 -3
  9. package/dist/es/{Collapse-B67v6RSE.js → Collapse-BG58s0uJ.js} +2 -2
  10. package/dist/es/{ConfigProvider-BCoGbcS5.js → ConfigProvider-Cr8Hpzf2.js} +1 -1
  11. package/dist/es/{Diff-BLiniLom.js → Diff-KQ44cDcY.js} +1 -1
  12. package/dist/es/{Divider-DDSOHv8G.js → Divider-CYYeUqYc.js} +1 -1
  13. package/dist/es/{Drawer-apeXw6EO.js → Drawer-CDXFDfrf.js} +2 -2
  14. package/dist/es/{Dropdown-By9qIErf.js → Dropdown-CPZtzHPx.js} +5 -5
  15. package/dist/es/{FileInput-CZ5jTfB_.js → FileInput-Ram4-wy2.js} +3 -3
  16. package/dist/es/{Filter-B_1zU4Dq.js → Filter-CLLkrn-W.js} +3 -3
  17. package/dist/es/{Form-B_XDnSjK.js → Form-po3aIrSN.js} +3 -3
  18. package/dist/es/{Icon-D6qRB3pq.js → Icon-XJfGGAMY.js} +1 -1
  19. package/dist/es/{Indicator-C6Ip4dpP.js → Indicator-vsSp5r5K.js} +1 -1
  20. package/dist/es/{Input-bThwBbNZ.js → Input-KrNqNZMe.js} +4 -4
  21. package/dist/es/{Kbd-DXNjs7at.js → Kbd-CtCGx7_s.js} +2 -2
  22. package/dist/es/{Link-08Ee61Fv.js → Link-Bbwdgs74.js} +1 -1
  23. package/dist/es/{Loading-ByI9mjss.js → Loading-DiyIiKxO.js} +2 -2
  24. package/dist/es/{Message-CGG-lV5I.js → Message-BoNCtMo7.js} +6 -6
  25. package/dist/es/{Notification-B4clKY5h.js → Notification-CFY-yvRf.js} +3 -3
  26. package/dist/es/{Overlay-6iPenJB1.js → Overlay-DoFA2lgP.js} +1 -1
  27. package/dist/es/{Pixelate-A8J7jxDW.js → Pixelate-dqwHc6nX.js} +1 -1
  28. package/dist/es/{Popconfirm-gcHGcOTz.js → Popconfirm-DPOujyiA.js} +5 -5
  29. package/dist/es/{Progress-DFUBJQ4X.js → Progress-B0oYE8Z3.js} +1 -1
  30. package/dist/es/{Radio-CLBa1XIM.js → Radio-C-Ot7pLA.js} +3 -3
  31. package/dist/es/{Resizable-BWrFr2oj.js → Resizable-G5KVHayx.js} +1 -1
  32. package/dist/es/{Select-BtLqds1d.js → Select-DqxPeAKK.js} +5 -5
  33. package/dist/es/{Skeleton-CGUQv3nQ.js → Skeleton-4SeKRKn9.js} +1 -1
  34. package/dist/es/{Switch-CZJ-S77_.js → Switch-C_tBxZtT.js} +3 -3
  35. package/dist/es/{Table-lHbxiyGq.js → Table-Cr6HFL4_.js} +1 -1
  36. package/dist/es/{Tooltip-CdPqNYdn.js → Tooltip-rak4BryQ.js} +2 -2
  37. package/dist/es/{Validator-7ZT_nXDZ.js → Validator-DKVfknvI.js} +2 -2
  38. package/dist/es/{hooks-pU4JmsO3.js → hooks-pTjI-j9o.js} +50 -52
  39. package/dist/es/index.js +119 -107
  40. package/dist/es/utils-DzOow9K9.js +155 -0
  41. package/dist/index.css +1 -1
  42. package/dist/theme/Button.css +20 -0
  43. package/dist/types/components/Icon/index.d.ts +1 -0
  44. package/dist/types/core/index.d.ts +1 -1
  45. package/dist/types/hooks/index.d.ts +2 -0
  46. package/dist/types/hooks/useFocusController.d.ts +1 -1
  47. package/dist/umd/index.css +1 -1
  48. package/dist/umd/index.css.gz +0 -0
  49. package/dist/umd/index.umd.cjs +3 -3
  50. package/dist/umd/index.umd.cjs.gz +0 -0
  51. package/package.json +1 -1
  52. package/dist/es/utils-BXICIEsD.js +0 -139
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sakana-element",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "A pixel-style Vue 3 component library, built with TypeScript and Vitest",
5
5
  "type": "module",
6
6
  "main": "./dist/umd/index.umd.cjs",
@@ -1,139 +0,0 @@
1
- import { h as e, d as t, y as o } from "./vendor-DrBJKLFW.js";
2
- import { defineComponent as r } from "vue";
3
- function n(e2, t2) {
4
- const o2 = parseInt(e2.replace("#", ""), 16);
5
- return `#${(Math.max(0, (o2 >> 16) - Math.round(2.55 * t2)) << 16 | Math.max(0, (o2 >> 8 & 255) - Math.round(2.55 * t2)) << 8 | Math.max(0, (255 & o2) - Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
6
- }
7
- function a(e2, t2) {
8
- const o2 = parseInt(e2.replace("#", ""), 16);
9
- return `#${(Math.min(255, (o2 >> 16) + Math.round(2.55 * t2)) << 16 | Math.min(255, (o2 >> 8 & 255) + Math.round(2.55 * t2)) << 8 | Math.min(255, (255 & o2) + Math.round(2.55 * t2))).toString(16).padStart(6, "0")}`;
10
- }
11
- function c(e2) {
12
- const t2 = parseInt(e2.replace("#", ""), 16);
13
- return (0.299 * (t2 >> 16) + 0.587 * (t2 >> 8 & 255) + 0.114 * (255 & t2)) / 255 > 0.6 ? "#1e1e2e" : "#ffffff";
14
- }
15
- function s(e2) {
16
- return { color: e2, dark: n(e2, 15), light: a(e2, 35), contrast: c(e2), transparent: "transparent" };
17
- }
18
- function i(e2, t2, o2) {
19
- const r2 = {};
20
- for (const [n2, a2] of Object.entries(o2)) r2[`--${t2}-${n2}`] = e2[a2];
21
- return r2;
22
- }
23
- const l = { outline: { "text-color": "color", "bg-color": "transparent", "border-color": "color", "shadow-color": "transparent" }, dash: { "text-color": "color", "bg-color": "light", "border-color": "color", "shadow-color": "transparent" }, default: { "text-color": "contrast", "bg-color": "color", "border-color": "dark", "shadow-color": "dark" } };
24
- function u(e2, t2) {
25
- }
26
- const f = { spinner: "loader", loading: "loader", "eye-slash": "eye-closed", "eye-off": "eye-closed", xmark: "close", x: "close", times: "close", "circle-xmark": "close-box", "x-circle": "close-box", "times-circle": "close-box", error: "close-box", "circle-info": "info-box", "info-circle": "info-box", info: "info-box", "check-circle": "check", "circle-check": "check", success: "check", "circle-exclamation": "warning-box", "exclamation-circle": "warning-box", warning: "warning-box", "angle-down": "chevron-down", "caret-down": "chevron-down", "angle-up": "chevron-up", "caret-up": "chevron-up", "angle-left": "chevron-left", "caret-left": "chevron-left", "angle-right": "chevron-right", "caret-right": "chevron-right", "question-circle": "info-box", "circle-question": "info-box", help: "info-box", question: "info-box", gear: "sliders", cog: "sliders", settings: "sliders", star: "bookmark", "star-solid": "bookmark" };
27
- function d(e2) {
28
- return e2 in f ? f[e2] : e2;
29
- }
30
- const h = /* @__PURE__ */ new Set(["svg", "path", "rect", "circle", "ellipse", "line", "polyline", "polygon", "g", "defs", "clipPath", "mask", "title", "desc", "linearGradient", "radialGradient", "stop", "symbol", "use"]), g = /^on/i, p = /^\s*javascript\s*:/i;
31
- function m(e2) {
32
- if (!e2 || "string" != typeof e2) return "";
33
- if ("undefined" == typeof DOMParser) return "";
34
- const t2 = new DOMParser().parseFromString(e2, "image/svg+xml");
35
- return t2.querySelector("parsererror") ? "" : (b(t2.documentElement), t2.documentElement.outerHTML);
36
- }
37
- function b(e2) {
38
- const t2 = Array.from(e2.children);
39
- for (const e3 of t2) {
40
- const t3 = e3.tagName.toLowerCase();
41
- if (h.has(t3)) {
42
- for (const t4 of Array.from(e3.attributes)) (g.test(t4.name) || "href" === t4.name && p.test(t4.value) || "xlink:href" === t4.name && p.test(t4.value)) && e3.removeAttribute(t4.name);
43
- b(e3);
44
- } else e3.remove();
45
- }
46
- }
47
- const x = /* @__PURE__ */ new Map();
48
- function M(e2) {
49
- for (const [t2, o2] of Object.entries(e2)) x.set(t2, m(o2));
50
- }
51
- function v(e2) {
52
- return x.get(e2);
53
- }
54
- const w = (e2) => (e2.install = (t2) => {
55
- const o2 = e2.name;
56
- t2.component(o2, e2);
57
- }, e2), y = (e2, t2) => (e2.install = (o2) => {
58
- o2.config.globalProperties[t2] = e2;
59
- }, e2);
60
- function k(e2, t2) {
61
- for (; e2.length >= t2; ) e2[0].props.onDestroy();
62
- }
63
- function S(e2) {
64
- let t2 = false, o2 = 0;
65
- const r2 = (t3) => {
66
- var _a;
67
- "Escape" === t3.code && ((_a = e2()) == null ? void 0 : _a.handler.close());
68
- };
69
- return { register() {
70
- o2++, t2 || (document.addEventListener("keydown", r2), t2 = true);
71
- }, unregister() {
72
- o2--, o2 <= 0 && (document.removeEventListener("keydown", r2), t2 = false, o2 = 0);
73
- } };
74
- }
75
- function N(e2, t2, o2, r2) {
76
- if (0 === r2.length) return [e2, t2, o2];
77
- let n2 = 1 / 0, a2 = r2[0];
78
- for (const c2 of r2) {
79
- const r3 = (e2 - c2[0]) ** 2 + (t2 - c2[1]) ** 2 + (o2 - c2[2]) ** 2;
80
- if (0 === r3) return c2;
81
- r3 < n2 && (n2 = r3, a2 = c2);
82
- }
83
- return a2;
84
- }
85
- function $(e2, t2, o2) {
86
- const r2 = e2.getContext("2d");
87
- if (!r2) return;
88
- const { pixelSize: n2, grayscale: a2 = false, palette: c2, background: s2 = "#FFFFFF" } = o2, i2 = t2.naturalWidth, l2 = t2.naturalHeight;
89
- e2.width = i2, e2.height = l2, r2.drawImage(t2, 0, 0, i2, l2);
90
- const u2 = r2.getImageData(0, 0, i2, l2).data, f2 = Math.max(1, Math.round(n2)), d2 = c2 ? (function(e3) {
91
- return e3.map(((e4) => "string" == typeof e4 ? (function(e5) {
92
- const t3 = e5.replace("#", "");
93
- return [parseInt(t3.substring(0, 2), 16), parseInt(t3.substring(2, 4), 16), parseInt(t3.substring(4, 6), 16)];
94
- })(e4) : e4));
95
- })(c2) : null;
96
- r2.fillStyle = s2, r2.fillRect(0, 0, i2, l2);
97
- for (let e3 = 0; e3 < l2; e3 += f2) for (let t3 = 0; t3 < i2; t3 += f2) {
98
- const o3 = Math.min(f2, i2 - t3), n3 = Math.min(f2, l2 - e3);
99
- let c3 = 0, s3 = 0, h2 = 0, g2 = 0;
100
- for (let r3 = 0; r3 < n3; r3++) for (let n4 = 0; n4 < o3; n4++) {
101
- const o4 = 4 * ((e3 + r3) * i2 + (t3 + n4));
102
- c3 += u2[o4], s3 += u2[o4 + 1], h2 += u2[o4 + 2], g2++;
103
- }
104
- let p2 = Math.round(c3 / g2), m2 = Math.round(s3 / g2), b2 = Math.round(h2 / g2);
105
- a2 && (p2 = m2 = b2 = Math.round(0.299 * p2 + 0.587 * m2 + 0.114 * b2)), d2 && ([p2, m2, b2] = N(p2, m2, b2, d2)), r2.fillStyle = `rgb(${p2},${m2},${b2})`, r2.fillRect(t3, e3, o3, n3);
106
- }
107
- }
108
- function F(o2, r2 = "px") {
109
- return o2 ? e(o2) || ((e2) => !!t(e2) && !Number.isNaN(Number(e2)))(o2) ? `${o2}${r2}` : t(o2) ? o2 : void 0 : "";
110
- }
111
- function I(e2, t2, o2) {
112
- return Math.max(t2, Math.min(o2, e2));
113
- }
114
- const j = /* @__PURE__ */ new Map([["info", "info-box"], ["success", "check"], ["warning", "warning-box"], ["danger", "close-box"], ["error", "close-box"]]), O = r({ props: { vNode: { type: [String, Object, Function], required: true } }, setup: (e2) => () => o(e2.vNode) ? e2.vNode() : e2.vNode }), q = (e2, t2) => {
115
- const o2 = e2.__vccOpts || e2;
116
- for (const [e3, r2] of t2) o2[e3] = r2;
117
- return o2;
118
- };
119
- export {
120
- O as R,
121
- l as S,
122
- q as _,
123
- I as a,
124
- F as b,
125
- s as c,
126
- u as d,
127
- d as e,
128
- M as f,
129
- v as g,
130
- k as h,
131
- S as i,
132
- y as j,
133
- a as l,
134
- $ as p,
135
- i as r,
136
- m as s,
137
- j as t,
138
- w
139
- };