@iamfiro/design 0.3.4 → 0.3.5

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 (158) hide show
  1. package/agents/app-shell/AGENTS.md +99 -1
  2. package/lib/components/Accordion/Accordion2.js +93 -93
  3. package/lib/components/ActionBar/ActionBar2.js +44 -40
  4. package/lib/components/Alert/Alert2.js +64 -64
  5. package/lib/components/AppShell/AppShell2.js +73 -66
  6. package/lib/components/AreaChart/AreaChart.js +49 -47
  7. package/lib/components/BarChart/BarChart2.js +107 -107
  8. package/lib/components/BarList/BarList2.js +99 -99
  9. package/lib/components/Breadcrumb/Breadcrumb2.js +53 -56
  10. package/lib/components/Calendar/Calendar2.js +164 -164
  11. package/lib/components/Calendar/DatePicker2.js +76 -77
  12. package/lib/components/Calendar/date.js +49 -70
  13. package/lib/components/Card/Card2.js +104 -77
  14. package/lib/components/CardFrame/CardFrame2.js +46 -42
  15. package/lib/components/Chart/ChartParts.js +73 -73
  16. package/lib/components/Chart/chart2.js +53 -53
  17. package/lib/components/Chart/useChartInteraction.js +49 -49
  18. package/lib/components/ChatBubble/ChatBubble2.js +118 -118
  19. package/lib/components/ChatBubble/formatChatTime.js +42 -41
  20. package/lib/components/ChatComposer/ChatComposer2.js +102 -102
  21. package/lib/components/CodeBlock/CodeBlock2.js +51 -51
  22. package/lib/components/CodeBlock/highlight.js +85 -85
  23. package/lib/components/ColorPicker/ColorPicker2.js +373 -374
  24. package/lib/components/ColorPicker/color.js +94 -94
  25. package/lib/components/ColorPicker/presets.js +47 -46
  26. package/lib/components/Combobox/Combobox2.js +118 -117
  27. package/lib/components/CommandMenu/CommandMenu.js +121 -122
  28. package/lib/components/Comment/Comment2.js +56 -81
  29. package/lib/components/ContextMenu/ContextMenu2.js +91 -93
  30. package/lib/components/DataGrid/DataGrid2.js +845 -845
  31. package/lib/components/DataGrid/GridPopover.js +97 -97
  32. package/lib/components/DataGrid/anchor.js +34 -36
  33. package/lib/components/DataGrid/model.js +299 -299
  34. package/lib/components/DataGrid/panels.js +393 -393
  35. package/lib/components/DataGrid/typeMeta.js +53 -53
  36. package/lib/components/DataGrid/types.js +22 -22
  37. package/lib/components/DescriptionList/DescriptionList2.js +57 -57
  38. package/lib/components/Dialog/AlertDialog.js +56 -56
  39. package/lib/components/Dialog/Dialog2.js +68 -69
  40. package/lib/components/Dialog/modal.js +61 -57
  41. package/lib/components/Drawer/Drawer2.js +161 -161
  42. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -267
  43. package/lib/components/DropdownMenu/menuCore.js +42 -68
  44. package/lib/components/Dropzone/Dropzone2.js +81 -81
  45. package/lib/components/EmptyState/EmptyState2.js +55 -54
  46. package/lib/components/FileChip/FileChip2.js +39 -63
  47. package/lib/components/FileUpload/FileUpload.js +157 -156
  48. package/lib/components/FilterChips/FilterChips2.js +51 -51
  49. package/lib/components/FunnelChart/FunnelChart2.js +171 -171
  50. package/lib/components/FunnelChart/funnel.js +55 -57
  51. package/lib/components/Highlight/Highlight2.js +48 -48
  52. package/lib/components/HoverCard/HoverCard.js +59 -59
  53. package/lib/components/InlineDiff/InlineDiff2.js +110 -111
  54. package/lib/components/InlineDiff/diff.js +89 -89
  55. package/lib/components/InlineDiff/useDiffReview.js +63 -65
  56. package/lib/components/Kanban/Kanban2.js +424 -425
  57. package/lib/components/Kanban/KanbanCard.js +98 -73
  58. package/lib/components/Kanban/move.js +52 -49
  59. package/lib/components/LineChart/LineChart2.js +222 -222
  60. package/lib/components/List/List2.js +60 -59
  61. package/lib/components/Listbox/Listbox2.js +117 -117
  62. package/lib/components/Marker/Marker2.js +58 -59
  63. package/lib/components/Menubar/Menubar2.js +121 -123
  64. package/lib/components/MultiSelect/MultiSelect2.js +115 -115
  65. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -276
  66. package/lib/components/NoticeStack/NoticeStack2.js +98 -98
  67. package/lib/components/NumberStepper/NumberStepper2.js +67 -66
  68. package/lib/components/OtpInput/OtpInput2.js +93 -93
  69. package/lib/components/Pagination/Pagination2.js +87 -87
  70. package/lib/components/Pagination/paginationRange.js +39 -37
  71. package/lib/components/PhoneInput/PhoneInput.js +78 -78
  72. package/lib/components/PieChart/PieChart2.js +117 -117
  73. package/lib/components/PieChart/arc.js +57 -58
  74. package/lib/components/PieChart/useArcTween.js +45 -40
  75. package/lib/components/Popover/Popover2.js +73 -74
  76. package/lib/components/ProgressTracker/ProgressTracker2.js +128 -128
  77. package/lib/components/Rating/Rating2.js +95 -95
  78. package/lib/components/Resizable/Resizable2.js +86 -86
  79. package/lib/components/Resizable/layout.js +73 -73
  80. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -68
  81. package/lib/components/ScatterChart/ScatterChart2.js +172 -172
  82. package/lib/components/ScatterChart/scatter.js +55 -56
  83. package/lib/components/ScrollArea/ScrollArea2.js +130 -131
  84. package/lib/components/Select/Select2.js +86 -85
  85. package/lib/components/Sidebar/Sidebar2.js +92 -86
  86. package/lib/components/Sidebar/rail.js +43 -0
  87. package/lib/components/Skeleton/Skeleton2.js +60 -61
  88. package/lib/components/Slider/Slider2.js +73 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -55
  90. package/lib/components/SparkChart/SparkChart2.js +140 -141
  91. package/lib/components/SparkChart/spark.js +50 -48
  92. package/lib/components/Sparkbar/Sparkbar2.js +56 -56
  93. package/lib/components/SplitView/SplitView2.js +47 -46
  94. package/lib/components/Stat/Stat2.js +61 -61
  95. package/lib/components/StepList/StepList2.js +76 -76
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +85 -85
  98. package/lib/components/TagInput/TagInput2.js +217 -218
  99. package/lib/components/TimePicker/TimePicker2.js +217 -216
  100. package/lib/components/TimePicker/time.js +60 -58
  101. package/lib/components/Timeline/Timeline2.js +181 -181
  102. package/lib/components/Timeline/scale.js +60 -65
  103. package/lib/components/Toast/Toaster.js +146 -148
  104. package/lib/components/Toast/store.js +85 -85
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  106. package/lib/components/Toolbar/Toolbar2.js +120 -121
  107. package/lib/components/Tracker/Tracker2.js +79 -79
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +116 -116
  109. package/lib/components/TreeView/TreeView2.js +162 -163
  110. package/lib/hooks/timing.js +32 -35
  111. package/lib/hooks/useControllableState.js +35 -35
  112. package/lib/hooks/useCountdown.js +53 -52
  113. package/lib/hooks/useDigitInput.js +82 -81
  114. package/lib/hooks/useDismiss.js +48 -48
  115. package/lib/hooks/useElapsed.js +40 -43
  116. package/lib/hooks/useFloating.js +47 -47
  117. package/lib/hooks/useFocusTrap.js +45 -69
  118. package/lib/hooks/usePresence.js +49 -50
  119. package/lib/hooks/usePressToOpen.js +43 -43
  120. package/lib/hooks/useScrollLock.js +45 -43
  121. package/lib/hooks/useSelection.js +44 -46
  122. package/lib/index.js +105 -106
  123. package/lib/primitives/AspectRatio2.js +57 -56
  124. package/lib/primitives/BrandIcon.js +177 -177
  125. package/lib/primitives/ColorDot2.js +44 -48
  126. package/lib/primitives/CopyButton2.js +54 -55
  127. package/lib/primitives/CountBadge2.js +45 -48
  128. package/lib/primitives/Countdown2.js +35 -37
  129. package/lib/primitives/Delta2.js +41 -41
  130. package/lib/primitives/Elapsed.js +43 -41
  131. package/lib/primitives/FileIcon2.js +94 -94
  132. package/lib/primitives/Flag2.js +97 -97
  133. package/lib/primitives/IconStack2.js +53 -55
  134. package/lib/primitives/IconTile2.js +45 -41
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +66 -66
  137. package/lib/primitives/Link2.js +42 -47
  138. package/lib/primitives/MaskedText2.js +47 -69
  139. package/lib/primitives/Progress2.js +71 -71
  140. package/lib/primitives/RelativeTime.js +47 -43
  141. package/lib/primitives/SearchInput2.js +70 -66
  142. package/lib/primitives/SelectorButton2.js +70 -67
  143. package/lib/primitives/Spinner2.js +58 -59
  144. package/lib/primitives/StatusIcon2.js +70 -70
  145. package/lib/primitives/Swatch2.js +57 -55
  146. package/lib/primitives/Tooltip2.js +78 -78
  147. package/lib/primitives/Typography2.js +54 -54
  148. package/lib/primitives/formatCountdown.js +37 -38
  149. package/lib/primitives/formatElapsed.js +46 -45
  150. package/lib/primitives/formatRelativeTime.js +43 -69
  151. package/lib/primitives/hotkey.js +66 -66
  152. package/lib/primitives/index.js +152 -152
  153. package/lib/primitives/maskValue.js +30 -32
  154. package/lib/style.css +1 -1
  155. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  156. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  157. package/lib/types/components/index.d.ts +1 -0
  158. package/package.json +1 -1
@@ -1,86 +1,81 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = r, i = e();
2
+ function e() {
3
+ let t = [
4
+ "ndu5mde4s2n6sLj5",
5
+ "ChvZAa",
6
+ "mtu1nti5nNHPCu1hAq",
7
+ "mJuYntb3ENzbrNO",
8
+ "ndmWntmWntbwvvf4rvK",
9
+ "mJK2mdeWmKvAwfjZvG",
10
+ "CgfKu3rHCNq",
11
+ "ywjZ",
12
+ "mJbSshrcEfO",
13
+ "zMXVB3i",
14
+ "n2DZwwjRza",
15
+ "Dg9gAxHLza",
16
+ "vgLTzwXPBMvsB3CGlYbuAw1LBgLUzujHCIbTDxn0igjLihvZzwqGAw5ZAwrLidXuAw1LBgLUzt4U",
17
+ "mJrQs3fYtxa",
18
+ "nZK4mJGYB3fWvxzj",
19
+ "mti4ntaYnuDwC0j1rW",
20
+ "y2vPBa"
21
+ ];
22
+ return e = function() {
23
+ return t;
24
+ }, e();
25
+ }
26
+ (function(e, n) {
27
+ let r = t, i = e();
4
28
  for (;;) try {
5
- if (-parseInt(n(454)) / 1 * (parseInt(n(439)) / 2) + -parseInt(n(445)) / 3 * (parseInt(n(443)) / 4) + -parseInt(n(448)) / 5 * (parseInt(n(444)) / 6) + -parseInt(n(440)) / 7 * (-parseInt(n(451)) / 8) + parseInt(n(449)) / 9 * (parseInt(n(453)) / 10) + parseInt(n(446)) / 11 * (parseInt(n(456)) / 12) + parseInt(n(442)) / 13 == t) break;
29
+ if (-parseInt(r(419)) / 1 + -parseInt(r(409)) / 2 + -parseInt(r(423)) / 3 + parseInt(r(412)) / 4 * (parseInt(r(424)) / 5) + -parseInt(r(418)) / 6 * (parseInt(r(414)) / 7) + -parseInt(r(417)) / 8 * (parseInt(r(421)) / 9) + parseInt(r(425)) / 10 == n) break;
6
30
  i.push(i.shift());
7
31
  } catch {
8
32
  i.push(i.shift());
9
33
  }
10
- })(c, 290625);
11
- import { createContext as e, useContext as t } from "react";
12
- var n = e(null);
13
- function r(e, t) {
14
- e -= 438;
15
- let n = c(), i = n[e];
16
- r.YiUSbY === void 0 && (r.rnkntv = function(e) {
34
+ })(e, 760994);
35
+ function t(n, r) {
36
+ n -= 409;
37
+ let i = e(), a = i[n];
38
+ t.ELUUyY === void 0 && (t.OeWHVp = function(e) {
17
39
  let t = "", n = "";
18
40
  for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
19
41
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
20
42
  return decodeURIComponent(n);
21
- }, r.bApMEL = {}, r.YiUSbY = !0);
22
- let a = n[0];
23
- r.CztFmY !== a && (r.bApMEL = {}, r.CztFmY = a);
24
- let o = r.bApMEL[e];
25
- return o === void 0 ? (i = r.rnkntv(i), r.bApMEL[e] = i) : i = o, i;
43
+ }, t.HqYWTb = {}, t.ELUUyY = !0);
44
+ let o = i[0];
45
+ t.rcfBiU !== o && (t.HqYWTb = {}, t.rcfBiU = o);
46
+ let s = t.HqYWTb[n];
47
+ return s === void 0 ? (a = t.OeWHVp(a), t.HqYWTb[n] = a) : a = s, a;
26
48
  }
27
- function i() {
28
- let e = t(n);
29
- if (!e) throw Error("TimelineRow / TimelineBar must be used inside <Timeline>.");
30
- return e;
49
+ import { createContext as n, useContext as r } from "react";
50
+ var i = n(null);
51
+ function a() {
52
+ let e = t, n = r(i);
53
+ if (!n) throw Error(e(416));
54
+ return n;
31
55
  }
32
- function a(e) {
33
- let t = r, n = e < 0 ? "−" : "", i = Math[t(438)](Math.abs(e)), a = Math[t(447)](i / 3600), o = Math[t(447)](i % 3600 / 60), s = String(i % 60)[t(458)](2, "0");
34
- return a > 0 ? "" + n + a + ":" + String(o)[t(458)](2, "0") + ":" + s : "" + n + o + ":" + s;
56
+ function o(e) {
57
+ let n = t, r = e < 0 ? "−" : "", i = Math.round(Math[n(411)](e)), a = Math[n(413)](i / 3600), o = Math[n(413)](i % 3600 / 60), s = String(i % 60).padStart(2, "0");
58
+ return a > 0 ? "" + r + a + ":" + String(o)[n(410)](2, "0") + ":" + s : "" + r + o + ":" + s;
35
59
  }
36
- function o(e, t) {
37
- let n = r;
60
+ function s(e, n) {
61
+ let r = t;
38
62
  if (e <= 0) return 1;
39
- let i = e / Math[n(455)](1, t), a = 10 ** Math[n(447)](Math[n(441)](i)), o = i / a;
63
+ let i = e / Math.max(1, n), a = 10 ** Math[r(413)](Math.log10(i)), o = i / a;
40
64
  return (o <= 1 ? 1 : o <= 2 ? 2 : o <= 5 ? 5 : 10) * a;
41
65
  }
42
- function s(e, t, n) {
43
- let i = r, a = [];
44
- if (n <= 0) return a;
45
- let o = Math[i(450)](e / n) * n;
66
+ function c(e, n, r) {
67
+ let i = t, a = [];
68
+ if (r <= 0) return a;
69
+ let o = Math[i(420)](e / r) * r;
46
70
  for (let e = 0; e < 200; e++) {
47
- let r = Number((o + e * n)[i(452)](10));
48
- if (r > t + n * 1e-9) break;
49
- a[i(457)](r);
71
+ let t = Number((o + e * r)[i(415)](10));
72
+ if (t > n + r * 1e-9) break;
73
+ a[i(422)](t);
50
74
  }
51
75
  return a;
52
76
  }
53
- function c() {
54
- let e = [
55
- "Bg9Nmta",
56
- "mJyZnde5mfvYwwfNEq",
57
- "mJqWnejRu25wta",
58
- "nNn4y0TyDW",
59
- "mZyWC2fiy3Pz",
60
- "mJjNy2roChe",
61
- "zMXVB3i",
62
- "mtyYmJe4nvHrzwvquW",
63
- "ouLLEfPRBW",
64
- "y2vPBa",
65
- "mtKYoe1Ay0H5sW",
66
- "Dg9gAxHLza",
67
- "mJqYnZK3mfzXAwfezW",
68
- "ndu2nLviCMPxAq",
69
- "Bwf4",
70
- "mtq4nJK1nM9Kwe5quq",
71
- "ChvZAa",
72
- "CgfKu3rHCNq",
73
- "ywjZ",
74
- "CM91BMq",
75
- "mZbdwKrxquS",
76
- "mtGXm2nXrxvyqW"
77
- ];
78
- return c = function() {
79
- return e;
80
- }, c();
81
- }
82
- function l(e = "", t = "0") {
83
- let n = r;
84
- return (r) => r === 0 ? t : (r < 0 ? "−" : "+") + Math[n(459)](r) + e;
77
+ function l(e = "", n = "0") {
78
+ let r = t;
79
+ return (t) => t === 0 ? n : (t < 0 ? "−" : "+") + Math[r(411)](t) + e;
85
80
  }
86
- export { n as TimelineScaleContext, s as buildTicks, a as formatClock, l as formatOffset, o as niceStep, i as useTimelineScale };
81
+ export { i as TimelineScaleContext, c as buildTicks, o as formatClock, l as formatOffset, s as niceStep, a as useTimelineScale };
@@ -1,213 +1,211 @@
1
1
  "use client";
2
- function e() {
3
- let t = /* @__PURE__ */ "zM9YrwfJAa.CMvSyxrLzfrHCMDLDa.nZu4CvP2y0v4.DMvYC2LVBG.zgLZBwLZCW.zMLSDgvY.zgL2.yM90Dg9TlxjPz2H0.DgL0Bgu.zhmTDg9HC3rLCG.C3rHCNrZv2L0Aa.C3bHBG.AxndB250zw50rwrPDgfIBgu.zxjYB3i.zxHPDgLUzW.zhmTDg9HC3q.y2XLyxjuAw1LB3v0.B2jZzxj2zq.A2v5zg93BG.zhmTDg9HC3rFx2fJDgLVBG.Dw5KB2fIBgu.mtm0odmYoeP6BvPICW.yNv0Dg9U.odeWota4vw1KALLe.C2HPzNrlzxK.BM93.zhmTDg9HC3rFx2nSB3nL.CMvTB3zLrxzLBNrmAxn0zw5LCG.DgfYz2v0.oteXmJC0uvn4qLrv.zhmTDg9HC3rFx2LJB24.zgvMyxvSDa.zhmTDg9HC3rFx3rPDgXL.7jwm66A8ioUlQ+Q4Sa.n2HzvwrivW.zMLUza.BgfIzwW.B25dBgLJAW.zhmTDg9HC3rFx3jPC2u.DhLWzq.y2XVC2vZDa.ChjLDMvUDerLzMf1Bhq.zgLZy29UBMvJDa.C3rHDhvZ.y3vYCMvUDa.mZu2mxH1rNfIqq.Bwf4.BgvUz3rO.ywrKrxzLBNrmAxn0zw5LCG.zhmTDg9HC3rFx2LUBMvY.A2v5.ywn0Aw9U.z2v0.Dg9W.mJvLEwruB1a.zhvYyxrPB24.zhmTDg9HC3rFx2nVBNrLBNq.yxnZzxj0AxzL.y2XVC2fIBgu.AwnVBG.ywn0Aw9Ulq.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.y3vYCMvUDfrHCMDLDa.mtC4otmWDNHwv1vT.zhmTDg9HC3rLCL9FBgLZDa.mtG5mteXnM1eu3jpwG.mJi0nZq4mJznAKHABuK.zgvZy3jPChrPB24.DMLZAwjPBgL0EwnOyw5Nzq.mZG3sMLgzNbQ.C2vJDgLVBG".split(".");
4
- return e = function() {
5
- return t;
6
- }, e();
7
- }
8
- const t = v;
9
2
  (function(e, t) {
10
- let n = v, r = e();
3
+ let n = _, r = e();
11
4
  for (;;) try {
12
- if (-parseInt(n(199)) / 1 + parseInt(n(178)) / 2 * (parseInt(n(221)) / 3) + parseInt(n(170)) / 4 + -parseInt(n(159)) / 5 * (parseInt(n(205)) / 6) + parseInt(n(210)) / 7 * (-parseInt(n(197)) / 8) + parseInt(n(174)) / 9 * (-parseInt(n(168)) / 10) + parseInt(n(171)) / 11 == t) break;
5
+ if (-parseInt(n(517)) / 1 * (parseInt(n(474)) / 2) + -parseInt(n(481)) / 3 + -parseInt(n(538)) / 4 * (-parseInt(n(539)) / 5) + parseInt(n(536)) / 6 + parseInt(n(510)) / 7 + parseInt(n(480)) / 8 + -parseInt(n(521)) / 9 * (-parseInt(n(493)) / 10) == t) break;
13
6
  r.push(r.shift());
14
7
  } catch {
15
8
  r.push(r.shift());
16
9
  }
17
- })(e, 457575);
18
- import { Spinner as n } from "../../primitives/Spinner2.js";
19
- import { cx as r } from "../../primitives/index.js";
20
- import { getToasts as i, subscribe as a, toast as o } from "./store.js";
10
+ })(n, 932117);
11
+ import { Spinner as e } from "../../primitives/Spinner2.js";
12
+ import { cx as t } from "../../primitives/index.js";
13
+ function n() {
14
+ let e = /* @__PURE__ */ "C3rHDhvZ.DMLZAwjPBgL0Evn0yxrL.ywn0Aw9U.Cg9SAxrL.ywrKrxzLBNrmAxn0zw5LCG.DMLZAwjPBgL0EwnOyw5Nzq.y3vYCMvUDa.nZm5mJy0oezzEeXZAa.DhLWzq.nde4ntmYAefdreLn.mZbruLzRA3C.BgfIzwW.DMvYC2LVBG.zhmTDg9HC3rFx3jPC2uTAw5Uzxi.zhmTDg9HC3rFx2nVBNrLBNq.ywn0Aw9Ulq.zhmTDg9HC3rLCG.Bwf4.ote3mZziB3LJv3m.zhmTDg9HC3rFx2rLC2m.y29UDgfPBNm.y2XVC2fIBgu.zMLSDgvY.C2v0.mtiYnZe3nM5lyxzvBW.nta3nZC1ohrHt1PXtq.yNv0Dg9U.y3vYCMvUDfrHCMDLDa.y3rYBeTLEq.BwfW.CMvTB3zLrxzLBNrmAxn0zw5LCG.Dg9mB3DLCKnHC2u.zgvMyxvSDa.zxHPDgLUzW.DMLZAwjSzq.zhvYyxrPB24.DgL0Bgu.mJuYnZKWz2POq3Hg.Dw5KzwzPBMvK.zxjYB3i.yxnZzxj0AxzL.y2XLyxjuAw1LB3v0.AwnVBG.B2zMC2v0sgvPz2H0.zhmTDg9HC3q.B2jZzxj2zq.Aw5WDxqSihrLEhrHCMvHlcbZzwXLy3q.B25dBgLJAW.Dw5KB2fIBgu.zgLZBwLZCW.BM93.A2v5.C3rHCNrZv2L0Aa.zhmTDg9HC3rFx2fJDgLVBG.nZC5mtyWoxPgq2vNsG.DgfYz2v0.A2v5zg93BG.ywXLCNq.AxngAw5PDgu.CMvSyxrLzfrHCMDLDa.zM9YrwfJAa.mtDztvLkswW.ywX0s2v5.ChjLDMvUDerLzMf1Bhq.C2HPzNrlzxK.otLABLHuBwm.zgL2.zgvZy3jPChrPB24.BgvUz3rO.AxndB250zw50rwrPDgfIBgu.Bg9HzgLUzW.C3bHBG.zhmTDg9HC3rFx2LJB24".split(".");
15
+ return n = function() {
16
+ return e;
17
+ }, n();
18
+ }
19
+ import { getToasts as r, subscribe as i, toast as a } from "./store.js";
21
20
  /* empty css */
22
- import { useCallback as s, useEffect as c, useLayoutEffect as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
23
- import { AlertTriangle as p, CheckCircle2 as m, Info as h, X as g, XCircle as _ } from "lucide-react";
24
- function v(t, n) {
25
- t -= 157;
26
- let r = e(), i = r[t];
27
- v.myhqPG === void 0 && (v.bfQBhk = function(e) {
21
+ import { useCallback as o, useEffect as s, useLayoutEffect as c, useRef as l, useState as u, useSyncExternalStore as d } from "react";
22
+ import { AlertTriangle as f, CheckCircle2 as p, Info as m, X as h, XCircle as g } from "lucide-react";
23
+ function _(e, t) {
24
+ e -= 469;
25
+ let r = n(), i = r[e];
26
+ _.lroJQR === void 0 && (_.sNDAJX = function(e) {
28
27
  let t = "", n = "";
29
28
  for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
30
29
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
31
30
  return decodeURIComponent(n);
32
- }, v.bPJQdX = {}, v.myhqPG = !0);
31
+ }, _.MUMrXi = {}, _.lroJQR = !0);
33
32
  let a = r[0];
34
- v.pYXgio !== a && (v.bPJQdX = {}, v.pYXgio = a);
35
- let o = v.bPJQdX[t];
36
- return o === void 0 ? (i = v.bfQBhk(i), v.bPJQdX[t] = i) : i = o, i;
33
+ _.YKkqPS !== a && (_.MUMrXi = {}, _.YKkqPS = a);
34
+ let o = _.MUMrXi[e];
35
+ return o === void 0 ? (i = _.sNDAJX(i), _.MUMrXi[e] = i) : i = o, i;
37
36
  }
38
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
39
- import { createPortal as x } from "react-dom";
40
- var S = {
41
- success: y(m, {}),
42
- error: y(_, {}),
43
- warning: y(p, {}),
44
- info: y(h, {}),
45
- loading: y(n, { size: 16 })
46
- }, C = 14, w = (e) => {
47
- let t = v;
48
- return document[t(224)]("visibilitychange", e), () => document[t(203)](t(173), e);
37
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
38
+ import { createPortal as b } from "react-dom";
39
+ var x = {
40
+ success: v(p, {}),
41
+ error: v(g, {}),
42
+ warning: v(f, {}),
43
+ info: v(m, {}),
44
+ loading: v(e, { size: 16 })
45
+ }, S = 14, C = (e) => {
46
+ let t = _;
47
+ return document[t(533)](t(534), e), () => document.removeEventListener(t(534), e);
49
48
  };
50
- function T({ position: e = t(183), visibleToasts: n = 3, duration: l = 4e3, gap: u = 10, expand: p, className: m }) {
51
- let h = t, g = f(a, i, i), [_, b] = d(!1), [S, T] = d({}), E = p || _ && g[h(223)] > 0, O = e[h(186)](h(158)) ? 1 : -1, k = f(w, () => document.visibilityState === "visible", () => !0);
52
- c(() => {
53
- let e = h, t = (e) => {
54
- let t = v;
55
- if (e[t(226)].toLowerCase() !== "z" || !(e.metaKey || e.ctrlKey) || e[t(200)] || e.altKey) return;
56
- let n = e[t(204)];
57
- if (n[t(188)] || n[t(216)]("input, textarea, select")) return;
58
- let r = i()[t(211)]((e) => e[t(196)] && !e[t(190)]);
59
- r?.action && (e[t(217)](), r[t(227)][t(213)](), o[t(180)](r.id));
49
+ function w({ position: e = "bottom-right", visibleToasts: n = 3, duration: c = 4e3, gap: l = 10, expand: f, className: p }) {
50
+ let m = _, h = d(i, r, r), [g, y] = u(!1), [x, w] = u({}), T = f || g && h[m(524)] > 0, D = e[m(508)]("top") ? 1 : -1, O = d(C, () => document[m(530)] === m(490), () => !0);
51
+ s(() => {
52
+ let e = m, t = (e) => {
53
+ let t = _;
54
+ if (e[t(507)][t(487)]() !== "z" || !(e.metaKey || e[t(484)]) || e[t(520)] || e[t(518)]) return;
55
+ let n = e[t(511)];
56
+ if (n[t(525)] || n.closest(t(502))) return;
57
+ let i = r().find((e) => e[t(504)] && !e.exiting);
58
+ i?.[t(531)] && (e[t(519)](), i[t(531)][t(503)](), a[t(505)](i.id));
60
59
  };
61
- return document[e(224)]("keydown", t), () => document[e(203)](e(194), t);
60
+ return document[e(533)]("keydown", t), () => document[e(486)](e(512), t);
62
61
  }, []);
63
- let A = s((e, t) => {
64
- T((n) => n[e] === t ? n : {
62
+ let k = o((e, t) => {
63
+ w((n) => n[e] === t ? n : {
65
64
  ...n,
66
65
  [e]: t
67
66
  });
68
- }, []), j = g[h(181)]((e) => !e[h(190)]), M = S[j[0]?.id] ?? 0, N = 0, P = 0, F = /* @__PURE__ */ new Map();
69
- g[h(176)]((e) => {
70
- let t = h;
71
- F.set(e.id, {
72
- index: P,
73
- y: N
74
- }), !e[t(190)] && (P < n && (N += (S[e.id] ?? 0) + u), P++);
67
+ }, []), A = h[m(478)]((e) => !e.exiting), j = x[A[0]?.id] ?? 0, M = 0, N = 0, P = /* @__PURE__ */ new Map();
68
+ h[m(516)]((e) => {
69
+ let t = m;
70
+ P[t(479)](e.id, {
71
+ index: N,
72
+ y: M
73
+ }), !e[t(489)] && (N < n && (M += (x[e.id] ?? 0) + l), N++);
75
74
  });
76
- let I = E ? Math[h(222)](0, N - u) : M + Math.min(j[h(223)] - 1, n - 1) * C;
77
- return typeof document > "u" ? null : x(y(h(175), {
75
+ let F = T ? Math[m(473)](0, M - l) : j + Math.min(A[m(524)] - 1, n - 1) * S;
76
+ return typeof document === m(494) ? null : b(v("section", {
78
77
  "aria-label": "알림",
79
- className: r(h(185), m),
78
+ className: t(m(472), p),
80
79
  "data-position": e,
81
- "data-expanded": E || void 0,
82
- onPointerEnter: () => b(!0),
83
- onPointerLeave: () => b(!1),
84
- onFocus: () => b(!0),
85
- onBlur: (e) => !e[h(167)].contains(e[h(177)]) && b(!1),
86
- children: y("ol", {
87
- className: h(169),
88
- style: { height: I },
89
- children: g.map((e) => {
90
- let t = h, { index: r, y: i } = F[t(157)](e.id), a = !E && r > 0, o = E ? i * O : r * C * O;
91
- return y(D, {
80
+ "data-expanded": T || void 0,
81
+ onPointerEnter: () => y(!0),
82
+ onPointerLeave: () => y(!1),
83
+ onFocus: () => y(!0),
84
+ onBlur: (e) => !e[m(483)][m(476)](e[m(515)]) && y(!1),
85
+ children: v("ol", {
86
+ className: "ds-toaster__list",
87
+ style: { height: F },
88
+ children: h[m(485)]((e) => {
89
+ let t = m, { index: r, y: i } = P.get(e.id), a = !T && r > 0, o = T ? i * D : r * S * D;
90
+ return v(E, {
92
91
  toast: e,
93
- defaultDuration: l,
94
- paused: E || !k,
95
- onHeight: A,
92
+ defaultDuration: c,
93
+ paused: T || !O,
94
+ onHeight: k,
96
95
  behind: a,
97
96
  hidden: r >= n,
98
97
  style: {
99
98
  "--_y": o + "px",
100
- "--_scale": E ? 1 : 1 - r * .05,
101
- "--_z": g[t(223)] - r,
102
- "--_h": (a ? M : S[e.id] ?? 0) + "px",
103
- "--_enter": -O * 100 + "%"
99
+ "--_scale": T ? 1 : 1 - r * .05,
100
+ "--_z": h[t(524)] - r,
101
+ "--_h": (a ? j : x[e.id] ?? 0) + "px",
102
+ "--_enter": -D * 100 + "%"
104
103
  }
105
104
  }, e.id);
106
105
  })
107
106
  })
108
107
  }), document.body);
109
108
  }
110
- function E({ index: e, children: n }) {
111
- let r = t;
112
- return y(r(182), {
113
- className: r(214),
109
+ function T({ index: e, children: t }) {
110
+ let n = _;
111
+ return v(n(522), {
112
+ className: "ds-toast__rise",
114
113
  style: { "--_i": e },
115
- children: y(r(182), {
116
- className: r(166),
117
- children: n
114
+ children: v(n(522), {
115
+ className: n(469),
116
+ children: t
118
117
  })
119
118
  });
120
119
  }
121
- function D({ toast: e, defaultDuration: n, paused: r, onHeight: i, behind: a, hidden: s, style: f }) {
122
- let p = t, m = u(null), [h, _] = d(!1), v = e[p(215)] === "loading" ? Infinity : e[p(160)] ?? n;
123
- c(() => {
120
+ function E({ toast: e, defaultDuration: t, paused: n, onHeight: r, behind: i, hidden: o, style: d }) {
121
+ let f = _, p = l(null), [m, g] = u(!1), b = e.type === f(526) ? Infinity : e[f(491)] ?? t;
122
+ s(() => {
124
123
  let e = 0, t = requestAnimationFrame(() => {
125
- e = requestAnimationFrame(() => _(!0));
124
+ e = requestAnimationFrame(() => g(!0));
126
125
  });
127
126
  return () => {
128
127
  cancelAnimationFrame(t), cancelAnimationFrame(e);
129
128
  };
130
- }, []), l(() => {
131
- let t = p, n = m[t(220)];
129
+ }, []), c(() => {
130
+ let t = f, n = p[t(535)];
132
131
  if (!n) return;
133
- let r = () => i(e.id, n.offsetHeight);
134
- r();
135
- let a = new ResizeObserver(r);
136
- return a[t(193)](n), () => a[t(218)]();
137
- }, [e.id, i]);
138
- let x = u(v);
139
- c(() => {
140
- let e = p;
141
- x[e(220)] = v;
142
- }, [e.version, v]), c(() => {
143
- let t = p;
144
- if (r || e[t(190)] || !Number.isFinite(v)) return;
145
- let n = Date[t(201)](), i = window.setTimeout(() => o[t(180)](e.id), x[t(220)]);
132
+ let i = () => r(e.id, n[t(499)]);
133
+ i();
134
+ let a = new ResizeObserver(i);
135
+ return a[t(501)](n), () => a.disconnect();
136
+ }, [e.id, r]);
137
+ let S = l(b);
138
+ s(() => {
139
+ S.current = b;
140
+ }, [e[f(541)], b]), s(() => {
141
+ let t = f;
142
+ if (n || e.exiting || !Number[t(514)](b)) return;
143
+ let r = Date[t(506)](), i = window.setTimeout(() => a[t(505)](e.id), S[t(535)]);
146
144
  return () => {
147
145
  let e = t;
148
- window[e(192)](i), x[e(220)] -= Date[e(201)]() - n;
146
+ window[e(497)](i), S[e(535)] -= Date.now() - r;
149
147
  };
150
148
  }, [
151
- r,
152
- e[p(190)],
149
+ n,
150
+ e.exiting,
153
151
  e.id,
154
- e[p(179)],
155
- v
152
+ e[f(541)],
153
+ b
156
154
  ]);
157
- let C = e[p(164)] ?? (e[p(215)] === p(207) ? null : S[e[p(215)]]);
158
- return y("li", {
159
- role: e[p(215)] === "error" ? "alert" : p(219),
160
- "aria-live": e[p(215)] === p(189) ? p(162) : "polite",
161
- className: p(191),
162
- "data-type": e[p(215)],
163
- "data-mounted": h || void 0,
164
- "data-exiting": e[p(190)] || void 0,
165
- "data-behind": a || void 0,
166
- "data-hidden": s || void 0,
167
- style: f,
168
- children: b(p(182), {
169
- ref: m,
170
- className: p(225),
155
+ let C = e[f(498)] ?? (e[f(537)] === f(488) ? null : x[e[f(537)]]);
156
+ return v("li", {
157
+ role: e[f(537)] === f(495) ? f(513) : f(529),
158
+ "aria-live": e[f(537)] === f(495) ? f(496) : f(532),
159
+ className: f(500),
160
+ "data-type": e[f(537)],
161
+ "data-mounted": m || void 0,
162
+ "data-exiting": e[f(489)] || void 0,
163
+ "data-behind": i || void 0,
164
+ "data-hidden": o || void 0,
165
+ style: d,
166
+ children: y("div", {
167
+ ref: p,
168
+ className: "ds-toast__inner",
171
169
  children: [
172
- C && y(p(187), {
173
- className: p(206),
170
+ C && v(f(527), {
171
+ className: f(528),
174
172
  children: C
175
- }, e[p(215)]),
176
- b(p(182), {
177
- className: p(161),
178
- children: [y(E, {
173
+ }, e.type),
174
+ y(f(522), {
175
+ className: f(470),
176
+ children: [v(T, {
179
177
  index: 0,
180
- children: y("div", {
181
- className: p(208),
182
- children: e[p(184)]
178
+ children: v("div", {
179
+ className: "ds-toast__title",
180
+ children: e[f(492)]
183
181
  })
184
- }), e[p(172)] && y(E, {
182
+ }), e.description && v(T, {
185
183
  index: 1,
186
- children: y(p(182), {
187
- className: "ds-toast__desc",
188
- children: e[p(172)]
184
+ children: v(f(522), {
185
+ className: f(475),
186
+ children: e[f(523)]
189
187
  })
190
188
  })]
191
- }, e[p(179)]),
192
- e[p(227)] && y(p(198), {
193
- type: p(198),
194
- className: p(195),
189
+ }, e.version),
190
+ e[f(531)] && v(f(482), {
191
+ type: f(482),
192
+ className: f(509),
195
193
  style: { "--_i": e.description ? 2 : 1 },
196
194
  onClick: () => {
197
- let t = p;
198
- e[t(227)][t(213)](), o[t(180)](e.id);
195
+ let t = f;
196
+ e[t(531)][t(503)](), a[t(505)](e.id);
199
197
  },
200
- children: e[p(227)][p(212)]
201
- }, p(165) + e[p(179)]),
202
- e[p(163)] !== !1 && y(p(198), {
203
- type: p(198),
204
- className: p(202),
205
- "aria-label": p(209),
206
- onClick: () => o[p(180)](e.id),
207
- children: y(g, {})
198
+ children: e[f(531)][f(540)]
199
+ }, f(471) + e[f(541)]),
200
+ e[f(477)] !== !1 && v(f(482), {
201
+ type: f(482),
202
+ className: "ds-toast__close",
203
+ "aria-label": "알림 닫기",
204
+ onClick: () => a[f(505)](e.id),
205
+ children: v(h, {})
208
206
  })
209
207
  ]
210
208
  })
211
209
  });
212
210
  }
213
- export { T as Toaster };
211
+ export { w as Toaster };