@iamfiro/design 0.1.0 → 0.3.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.
Files changed (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +65 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +87 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +229 -0
  15. package/lib/components/Calendar/date.js +121 -0
  16. package/lib/components/Card/Card2.js +104 -0
  17. package/lib/components/CardFrame/CardFrame2.js +72 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +53 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +114 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +610 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +75 -0
  29. package/lib/components/Combobox/Combobox2.js +229 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +134 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1996 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +558 -0
  37. package/lib/components/DataGrid/panels.js +703 -0
  38. package/lib/components/DataGrid/typeMeta.js +76 -0
  39. package/lib/components/DataGrid/types.js +54 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +118 -0
  42. package/lib/components/Dialog/Dialog2.js +109 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +394 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +144 -0
  48. package/lib/components/EmptyState/EmptyState2.js +72 -0
  49. package/lib/components/FileChip/FileChip2.js +118 -0
  50. package/lib/components/FileUpload/FileUpload.js +258 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +69 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +109 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +133 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +223 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +129 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +53 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +66 -0
  77. package/lib/components/PieChart/useArcTween.js +94 -0
  78. package/lib/components/Popover/Popover2.js +112 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +236 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +100 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +356 -0
  85. package/lib/components/ScatterChart/scatter.js +83 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +218 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +85 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +76 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +360 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +83 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +83 -0
  105. package/lib/components/Toast/Toaster.js +212 -0
  106. package/lib/components/Toast/store.js +129 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +281 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +284 -0
  112. package/lib/hooks/timing.js +55 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +80 -0
  115. package/lib/hooks/useDigitInput.js +105 -0
  116. package/lib/hooks/useDismiss.js +71 -0
  117. package/lib/hooks/useElapsed.js +83 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +61 -0
  120. package/lib/hooks/usePresence.js +60 -0
  121. package/lib/hooks/usePressToOpen.js +69 -0
  122. package/lib/hooks/useScrollLock.js +70 -0
  123. package/lib/hooks/useSelection.js +68 -0
  124. package/lib/index.js +175 -17911
  125. package/lib/primitives/AspectRatio2.js +80 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +70 -0
  128. package/lib/primitives/CopyButton2.js +85 -0
  129. package/lib/primitives/CountBadge2.js +78 -0
  130. package/lib/primitives/Countdown2.js +65 -0
  131. package/lib/primitives/Delta2.js +67 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +68 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +53 -0
  140. package/lib/primitives/MaskedText2.js +120 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +84 -0
  143. package/lib/primitives/SearchInput2.js +84 -0
  144. package/lib/primitives/SelectorButton2.js +97 -0
  145. package/lib/primitives/Spinner2.js +98 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +51 -0
  151. package/lib/primitives/formatElapsed.js +66 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +352 -0
  155. package/lib/primitives/maskValue.js +65 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,267 @@
1
+ "use client";
2
+ const e = k;
3
+ (function(e, t) {
4
+ let n = k, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(440)) / 1 + parseInt(n(410)) / 2 + -parseInt(n(455)) / 3 + parseInt(n(431)) / 4 + parseInt(n(421)) / 5 * (parseInt(n(411)) / 6) + -parseInt(n(460)) / 7 * (-parseInt(n(438)) / 8) + -parseInt(n(413)) / 9 * (parseInt(n(405)) / 10) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(r, 205646);
12
+ import { Kbd as t, isMac as n } from "../../primitives/Kbd2.js";
13
+ function r() {
14
+ let e = /* @__PURE__ */ "BwfW.zMLSDgvY.zMXHDe1HCa.A2v5D29Yzhm.AxndB21WB3nPBMC.BMvHCMvZDa.otm0otC1uhjRAKvu.DgvYDgLHCNK.ywX0s2v5.z2v0rwXLBwvUDej5swq.Bwv0yq.BMf0AxzLrxzLBNq.C2HPzNq.B25tzwXLy3q.C2HPzNrlzxK.yM9KEs1Tza.odC4mtGWqMDbA25Y.AxrLBxm.rw5K.66Qf66c5ioUPLoUjTa.y21K.C3rYAw5N.zgLZywjSzwq.nZjbB1z6s3e.y29Kzq.mtKXmdq2zMnXte5Q.DgfI.C29Tzq.Bwv0yuTLEq.DgfYz2v0.z3jVDxa.66Qf66c57jA0ioUyKoUkLcdQSOdSG4NSLRtRPBWG7j6f66cL7zwy7is47jQu.DhjPBq.z2v0.AgfZ.zgvMyxvSDa.BgfIzwWTBgC.y29UDhjVBa.CMvNDwXHCG.vgfI.nJeXnJG1AKXAvhPh.ywX0.7is57iwyioYDToUpMq.Dg9mB3DLCKnHC2u.zMLUzeLUzgv4.mtCXotqXsMzUAK1f.C2XPy2u.y3rYBa.CM9Szq.qxjYB3DvCa.A2v5.BgvUz3rO.C2HVCNrJDxq.zMLUza.Dg9W.y3rYBeTLEq.yxv0BW.ChjLDMvUDerLzMf1Bhq.zgLNAxq.BgLZDa.BgfIzwW.yM9KEs1ZBq.sg9Tzq.y29TyM9IB3G.rw50zxi.Aw5JBhvKzxm.AgLUDa.ChjLC2vUDgf0Aw9U.zhmTC2nYB2XS.nZb0ugHrzNm.B3b0Aw9U.AwnVBG.ChjLDMLVDxnfBgvTzw50u2LIBgLUzW.C2nYB2XSsw50B1zPzxC.nJe5nZHND2fiwgO.nKzNvvfICq.Bw9K.nZq1odnTCgHwu28.j+YxKcdRP57RIPqG66Qf66c57j20ioYxHUYwToYALa".split(".");
15
+ return r = function() {
16
+ return e;
17
+ }, r();
18
+ }
19
+ import { Text as i } from "../../primitives/Typography2.js";
20
+ import { Box as a, Inline as o, Separator as s } from "../../primitives/Layout2.js";
21
+ import { useControllableState as c } from "../../hooks/useControllableState.js";
22
+ import { Input as l } from "../../primitives/index.js";
23
+ import { Listbox as u, firstEnabled as d, lastEnabled as ee, nextEnabled as f, optionId as p } from "../Listbox/Listbox2.js";
24
+ import { Dialog as m } from "../Dialog/Dialog2.js";
25
+ import { useEffect as h, useId as g, useLayoutEffect as _, useMemo as v, useRef as y, useState as b } from "react";
26
+ import { Search as x } from "lucide-react";
27
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
28
+ function T(e, t) {
29
+ let n = k, r = t[n(447)]().toLowerCase();
30
+ return !r || [
31
+ e.label,
32
+ typeof e[n(481)] === n(436) ? e[n(481)] : "",
33
+ ...e[n(418)] ?? []
34
+ ][n(442)]((e) => e[n(458)]()[n(480)](r));
35
+ }
36
+ var E = /* @__PURE__ */ new Set([
37
+ e(412),
38
+ e(435),
39
+ e(425),
40
+ e(462),
41
+ e(452),
42
+ e(456),
43
+ e(406),
44
+ e(427)
45
+ ]);
46
+ function D(t, r) {
47
+ let i = e, a = r[i(461)](0, -1).map((e) => e.toLowerCase()), o = r[r[i(466)] - 1]?.[i(458)]();
48
+ if (!o || E[i(449)](o)) return !1;
49
+ let s = (e) => e[i(442)]((e) => a[i(480)](e)), c = s(["cmd", i(425)]) || n && a[i(480)](i(412)), l = s([i(462), i(452)]) || !n && a[i(480)](i(412));
50
+ return t[i(443)] === c && t[i(470)] === l && t[i(423)] === s(["alt", "option"]) && t[i(429)] === a[i(480)](i(427)) && (t[i(465)][i(458)]() === o || t.code[i(458)]() === i(465) + o || t[i(439)].toLowerCase() === i(473) + o);
51
+ }
52
+ function O({ open: n, defaultOpen: r = !1, onOpenChange: E, trigger: O, groups: A, onSelect: j, shortcutKey: M = "k", placeholder: N = e(446), filter: P = T, emptyText: F = (t) => "'" + t + e(414), footer: I, closeOnSelect: L = !0, title: R = e(434) }) {
53
+ let z = e, [B, V] = c(n, r, E), [H, U] = b(""), [W, G] = b(0), K = y(null), q = g(), J = v(() => A[z(417)]((e) => e[z(432)][z(416)]((e) => P(e, H)).map((t) => ({
54
+ it: t,
55
+ group: e.heading
56
+ }))), [
57
+ A,
58
+ P,
59
+ H
60
+ ]), Y = v(() => J[z(415)](({ it: e, group: t }) => ({
61
+ value: e.id,
62
+ label: e[z(475)],
63
+ group: t,
64
+ disabled: e[z(437)]
65
+ })), [J]), X = v(() => new Map(J[z(415)](({ it: e }) => [e.id, e])), [J]), Z = B + ":" + H, [te, ne] = b(Z);
66
+ te !== Z && (ne(Z), G(d(Y)), !B && H && U(""));
67
+ let Q = (e) => {
68
+ let t = z;
69
+ e[t(437)] || (e[t(428)]?.(), j?.(e), L && V(!1));
70
+ }, $ = y({
71
+ open: B,
72
+ groups: A,
73
+ run: Q,
74
+ setOpen: V
75
+ });
76
+ _(() => {
77
+ $.current = {
78
+ open: B,
79
+ groups: A,
80
+ run: Q,
81
+ setOpen: V
82
+ };
83
+ }), h(() => {
84
+ let e = (e) => {
85
+ let t = k;
86
+ if (e.isComposing) return;
87
+ let { open: n, groups: r, run: i, setOpen: a } = $.current;
88
+ if (M && D(e, [t(412), M])) e[t(472)](), a(!n);
89
+ else if (n) for (let n of r) {
90
+ let r = n.items[t(468)]((n) => n[t(467)] && D(e, n[t(467)]));
91
+ if (r) {
92
+ e[t(472)](), i(r);
93
+ return;
94
+ }
95
+ }
96
+ };
97
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
98
+ }, [M]), h(() => {
99
+ let e = z;
100
+ if (W < 0) return;
101
+ let t = document[e(424)](p(q, W))?.[e(408)];
102
+ t?.getAttribute(e(463)) === e(482) && t[e(409)]({ block: e(420) });
103
+ }, [q, W]);
104
+ let re = (e) => {
105
+ let t = z, n = Y[t(417)]((e, n) => e[t(445)] === Y[n - 1]?.[t(445)] ? [] : [n]);
106
+ if (n[t(466)] < 2) return;
107
+ let r = n[(n.filter((e) => e <= W).length - 1 + e + n.length) % n.length], i = n[n.indexOf(r) + 1] ?? Y[t(466)], a = Y.slice(r, i)[t(459)]((e) => !e[t(437)]);
108
+ a >= 0 && G(r + a);
109
+ }, ie = (e) => {
110
+ let t = z;
111
+ if (!e[t(426)][t(419)]) {
112
+ switch (e[t(465)]) {
113
+ case "ArrowDown":
114
+ G(f(Y, W, 1));
115
+ break;
116
+ case t(464):
117
+ G(f(Y, W, -1));
118
+ break;
119
+ case t(477):
120
+ G(d(Y));
121
+ break;
122
+ case t(433):
123
+ G(ee(Y));
124
+ break;
125
+ case t(454):
126
+ re(e.shiftKey ? -1 : 1);
127
+ break;
128
+ case t(479):
129
+ J[W] && Q(J[W].it);
130
+ break;
131
+ default: return;
132
+ }
133
+ e[t(472)]();
134
+ }
135
+ }, ae = w(o, {
136
+ gap: 4,
137
+ justify: "between",
138
+ children: [w(o, {
139
+ gap: 2,
140
+ children: [C(t, {
141
+ keys: [z(441)],
142
+ size: "lg"
143
+ }), C(i, {
144
+ variant: z(476),
145
+ tone: "tertiary",
146
+ children: z(457)
147
+ })]
148
+ }), M && w(o, {
149
+ gap: 2,
150
+ children: [C(t, {
151
+ keys: [z(412), M],
152
+ size: "lg"
153
+ }), C(i, {
154
+ variant: "body-sm",
155
+ tone: z(422),
156
+ children: "열기 · 닫기"
157
+ })]
158
+ })]
159
+ });
160
+ return w(m, {
161
+ open: B,
162
+ onOpenChange: V,
163
+ trigger: O,
164
+ title: R,
165
+ bare: !0,
166
+ placement: z(469),
167
+ size: "lg",
168
+ initialFocus: K,
169
+ children: [
170
+ C(a, {
171
+ paddingX: 4,
172
+ paddingY: 1,
173
+ children: C(l, {
174
+ ref: K,
175
+ bare: !0,
176
+ size: "lg",
177
+ value: H,
178
+ onChange: (e) => U(e[z(444)].value),
179
+ onKeyDown: ie,
180
+ placeholder: N,
181
+ role: z(478),
182
+ "aria-label": R,
183
+ "aria-expanded": !0,
184
+ "aria-controls": q,
185
+ "aria-autocomplete": z(474),
186
+ "aria-activedescendant": W >= 0 && Y[z(466)] ? p(q, W) : void 0,
187
+ autoComplete: "off",
188
+ spellCheck: !1,
189
+ leading: C(x, {}),
190
+ trailing: C(t, {
191
+ keys: ["enter"],
192
+ size: "lg"
193
+ })
194
+ })
195
+ }),
196
+ C(s, {}),
197
+ C(a, {
198
+ className: z(404),
199
+ paddingX: 2,
200
+ paddingY: 2,
201
+ style: {
202
+ maxHeight: "min(400px, 60vh)",
203
+ overflowY: z(471)
204
+ },
205
+ children: C(u, {
206
+ id: q,
207
+ "aria-label": R,
208
+ options: Y,
209
+ activeIndex: W,
210
+ isSelected: () => !1,
211
+ onActiveChange: G,
212
+ onSelect: (e) => Q(X[z(448)](e.value)),
213
+ emptyText: F(H[z(447)]()),
214
+ renderOption: (e, n) => {
215
+ let r = z, a = X.get(e.value);
216
+ return w(S, { children: [
217
+ a[r(407)],
218
+ C("span", {
219
+ className: "ds-option__text",
220
+ children: w(o, {
221
+ gap: 2,
222
+ wrap: !1,
223
+ children: [C(i, {
224
+ variant: r(451),
225
+ weight: r(453),
226
+ tone: n[r(437)] ? r(437) : r(450),
227
+ truncate: !0,
228
+ children: a[r(475)]
229
+ }), a[r(481)] != null && C(i, {
230
+ variant: r(430),
231
+ tone: r(422),
232
+ truncate: !0,
233
+ children: a[r(481)]
234
+ })]
235
+ })
236
+ }),
237
+ a[r(467)] && C(t, {
238
+ keys: a[r(467)],
239
+ size: "lg"
240
+ })
241
+ ] });
242
+ }
243
+ })
244
+ }),
245
+ I !== !1 && w(S, { children: [C(s, {}), C(a, {
246
+ paddingX: 4,
247
+ paddingY: 3,
248
+ children: I ?? ae
249
+ })] })
250
+ ]
251
+ });
252
+ }
253
+ function k(e, t) {
254
+ e -= 404;
255
+ let n = r(), i = n[e];
256
+ k.hOVPPV === void 0 && (k.kVJbIl = function(e) {
257
+ let t = "", n = "";
258
+ 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);
259
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
260
+ return decodeURIComponent(n);
261
+ }, k.rfMBvB = {}, k.hOVPPV = !0);
262
+ let a = n[0];
263
+ k.XwXHpp !== a && (k.rfMBvB = {}, k.XwXHpp = a);
264
+ let o = k.rfMBvB[e];
265
+ return o === void 0 ? (i = k.kVJbIl(i), k.rfMBvB[e] = i) : i = o, i;
266
+ }
267
+ export { O as CommandMenu, T as defaultCommandFilter };
@@ -0,0 +1,134 @@
1
+ "use client";
2
+ function e() {
3
+ let t = [
4
+ "yMv0D2vLBG",
5
+ "vgHYzwfK",
6
+ "mtHjB1PeEMi",
7
+ "zhmTy29TBwvUDc10AhjLywq",
8
+ "odu2mJaWEwr4t0Lu",
9
+ "mJu5nZaZwMrOB3np",
10
+ "mtCWDKnhwevi",
11
+ "mZe5ow5nDhfZqG",
12
+ "mZG0mtrfAgDuu00",
13
+ "zhmTy29TBwvUDf9FyM9KEq",
14
+ "zhmTy29TBwvUDf9FyxzHDgfY",
15
+ "C3rHCNq",
16
+ "mJrNu0Dvyuy",
17
+ "zhmTy29TBwvUDf9FBwfPBG",
18
+ "mJyZmJK0mfb6z3DIqq",
19
+ "C3rYAw5N",
20
+ "mZqWohPXrePmsa",
21
+ "7j2yioUmK+Q4Ga",
22
+ "nZe5nM1Qt0XXrG",
23
+ "zhmTy29TBwvUDf9Fywn0Aw9UCW",
24
+ "zgL2",
25
+ "C3bHBG",
26
+ "ndK4nte2n2H1B2zTCW"
27
+ ];
28
+ return e = function() {
29
+ return t;
30
+ }, e();
31
+ }
32
+ const t = c;
33
+ (function(e, t) {
34
+ let n = c, r = e();
35
+ for (;;) try {
36
+ if (-parseInt(n(116)) / 1 + parseInt(n(119)) / 2 * (-parseInt(n(123)) / 3) + -parseInt(n(129)) / 4 * (parseInt(n(117)) / 5) + -parseInt(n(127)) / 6 * (-parseInt(n(118)) / 7) + parseInt(n(115)) / 8 * (parseInt(n(136)) / 9) + -parseInt(n(125)) / 10 + parseInt(n(133)) / 11 == t) break;
37
+ r.push(r.shift());
38
+ } catch {
39
+ r.push(r.shift());
40
+ }
41
+ })(e, 189004);
42
+ import { Text as n } from "../../primitives/Typography2.js";
43
+ import { Inline as r, Stack as i } from "../../primitives/Layout2.js";
44
+ import { RelativeTime as a } from "../../primitives/RelativeTime.js";
45
+ import { Avatar as o, cx as s } from "../../primitives/index.js";
46
+ function c(t, n) {
47
+ t -= 115;
48
+ let r = e(), i = r[t];
49
+ c.dgdAkM === void 0 && (c.uytGiv = function(e) {
50
+ let t = "", n = "";
51
+ 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);
52
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
53
+ return decodeURIComponent(n);
54
+ }, c.VMHHPN = {}, c.dgdAkM = !0);
55
+ let a = r[0];
56
+ c.kBNJmQ !== a && (c.VMHHPN = {}, c.kBNJmQ = a);
57
+ let o = c.VMHHPN[t];
58
+ return o === void 0 ? (i = c.uytGiv(i), c.VMHHPN[t] = i) : i = o, i;
59
+ }
60
+ /* empty css */
61
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
62
+ function f({ author: e, avatar: t, date: f, meta: p, actions: m, children: h, footer: g, continued: _, avatarSize: v = 28, className: y, style: b }) {
63
+ let x = c, S = t ?? (typeof e === x(126) ? u(o, {
64
+ name: e,
65
+ size: v
66
+ }) : null), C = m && u("span", {
67
+ className: x(130),
68
+ children: m
69
+ }), w = h != null && u(n, {
70
+ as: x(131),
71
+ variant: "body-md",
72
+ className: x(120),
73
+ children: h
74
+ });
75
+ return u("article", {
76
+ className: s("ds-comment", y),
77
+ "data-continued": _ || void 0,
78
+ style: {
79
+ "--_avatar": v + "px",
80
+ ...b
81
+ },
82
+ "aria-label": typeof e === x(126) ? e + x(128) : void 0,
83
+ children: d(r, {
84
+ gap: 3,
85
+ align: x(122),
86
+ wrap: !1,
87
+ children: [u(x(132), {
88
+ className: x(121),
89
+ children: _ ? null : S
90
+ }), d(i, {
91
+ gap: 1,
92
+ className: x(124),
93
+ children: [_ ? d(r, {
94
+ gap: 2,
95
+ align: x(122),
96
+ wrap: !1,
97
+ children: [w, C]
98
+ }) : d(l, { children: [d(r, {
99
+ gap: 2,
100
+ justify: x(134),
101
+ wrap: !1,
102
+ className: "ds-comment__header",
103
+ children: [d(r, {
104
+ gap: 2,
105
+ wrap: !1,
106
+ className: "ds-comment__who",
107
+ children: [u(n, {
108
+ variant: "label-md",
109
+ weight: "semibold",
110
+ truncate: !0,
111
+ children: e
112
+ }), p]
113
+ }), d(r, {
114
+ gap: 1,
115
+ wrap: !1,
116
+ children: [C, f != null && u(a, { date: f })]
117
+ })]
118
+ }), w] }), g]
119
+ })]
120
+ })
121
+ });
122
+ }
123
+ function p({ children: e, className: t, style: n, "aria-label": r }) {
124
+ let i = c;
125
+ return u(i(131), {
126
+ className: s(i(137), t),
127
+ style: n,
128
+ role: r ? "group" : void 0,
129
+ "aria-label": r,
130
+ children: e
131
+ });
132
+ }
133
+ f[t(135)] = p;
134
+ export { f as Comment, p as CommentThread };
@@ -0,0 +1,168 @@
1
+ "use client";
2
+ const e = w;
3
+ (function(e, t) {
4
+ let n = w, r = e();
5
+ for (;;) try {
6
+ if (-parseInt(n(341)) / 1 * (parseInt(n(332)) / 2) + -parseInt(n(318)) / 3 * (-parseInt(n(304)) / 4) + -parseInt(n(295)) / 5 + parseInt(n(290)) / 6 * (parseInt(n(340)) / 7) + parseInt(n(347)) / 8 * (-parseInt(n(293)) / 9) + -parseInt(n(321)) / 10 + -parseInt(n(322)) / 11 == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(a, 812928);
12
+ import { TIMING as t } from "../../hooks/timing.js";
13
+ import { usePresence as n } from "../../hooks/usePresence.js";
14
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
15
+ import { useDismiss as i } from "../../hooks/useDismiss.js";
16
+ function a() {
17
+ let e = /* @__PURE__ */ "ywrKrxzLBNrmAxn0zw5LCG.C2nYB2XS.A2v5yM9HCMq.AgLKzgvU.ngHhBNnsrG.zML4zwq.D2LKDgG.AgvPz2H0.Bwf4.zhmTy29UDgv4Dc10CMLNz2vY.u2vWyxjHDg9Y.y2XPzw50wq.BwLU.y3vYCMvUDa.Bw91C2u.q2HLy2TIB3HjDgvT.CMvTB3zLrxzLBNrmAxn0zw5LCG.Aw5UzxjizwLNAhq.ndy4nZa4ow54CxHLCG.AxndB25Uzwn0zwq.y29UDgfPBNm.mtK0nJy4mgHHB2zRDW.mte4mJK0nJz2DfHSANy.yM90Dg9T.AhLWB3q.DgLTzxi.Cg9PBNrLCG.C2v0vgLTzw91Da.Bw91BNrLza.y2XVC2LUzW.DhLWzq.Aw5UzxjxAwr0Aa.mM5dqwTtEq.rJeW.Dg9W.A2v5.y2XPzw50wa.B2zMC2v0v2LKDgG.C2nYB2XSsgvPz2H0.DgfYz2v0.nZy3otC3n3L4y0nkBW.ndu3odjIDxj6D3q.C2HPzNrlzxK.zM9JDxm.Bg9Uz1bYzxnZ.q29UDgv4De1LBNu.CMvZAxPL.otC2z0fpzujj.BgvMDa.ywn0AxzLrwXLBwvUDa.nNzjB3DQBa.ChjLDMvUDerLzMf1Bhq.sxrLBq.otKZnNfqBMD0Aq.C3rVCfbYB3bHz2f0Aw9U.mtK4mdaXmgrXENH3rW.zgL2.CgfUzwXZ.yM9KEq.zMLYzwq".split(".");
18
+ return a = function() {
19
+ return e;
20
+ }, a();
21
+ }
22
+ import { MenuContext as o, menuItems as s, useMenuRoot as c } from "../DropdownMenu/menuCore.js";
23
+ import { DropdownMenuCheckboxItem as l, DropdownMenuItem as u, DropdownMenuLabel as d, DropdownMenuRadioGroup as f, DropdownMenuRadioItem as p, DropdownMenuSeparator as m, DropdownMenuSub as h, MenuPanel as g } from "../DropdownMenu/DropdownMenu2.js";
24
+ /* empty css */
25
+ import { useEffect as _, useLayoutEffect as v, useRef as y, useState as b } from "react";
26
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
27
+ var C = 8;
28
+ function w(e, t) {
29
+ e -= 290;
30
+ let n = a(), r = n[e];
31
+ w.XxUkih === void 0 && (w.nQMVcO = function(e) {
32
+ let t = "", n = "";
33
+ 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);
34
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
35
+ return decodeURIComponent(n);
36
+ }, w.jBrLBg = {}, w.XxUkih = !0);
37
+ let i = n[0];
38
+ w.hIzRzS !== i && (w.jBrLBg = {}, w.hIzRzS = i);
39
+ let o = w.jBrLBg[e];
40
+ return o === void 0 ? (r = w.nQMVcO(r), w.jBrLBg[e] = r) : r = o, r;
41
+ }
42
+ function T({ trigger: e, children: a, open: l, defaultOpen: u = !1, onOpenChange: d, disabled: f, minWidth: p = 200, "aria-label": m }) {
43
+ let h = w, [T, E] = r(l, u, d), D = n(T, 160), O = y(null), [k, A] = b({
44
+ x: 0,
45
+ y: 0
46
+ }), [j, M] = b(0), N = y(h(326)), P = y(null), F = y(null), [I, L] = b({
47
+ position: h(305),
48
+ visibility: h(303)
49
+ }), [R, z] = b(h(323)), B = (e = !0) => {
50
+ let t = h;
51
+ E(!1);
52
+ let n = P.current;
53
+ e && n?.[t(319)] && n[t(343)]({ preventScroll: !0 });
54
+ }, V = c(B);
55
+ i(T, [O, ...V[h(297)]], () => E(!1));
56
+ let H = (e, t, n) => {
57
+ let r = h, i = document[r(349)];
58
+ P[r(313)] = i instanceof HTMLElement && i !== document[r(298)] ? i : null, N[r(313)] = n, A({
59
+ x: e,
60
+ y: t
61
+ }), M((e) => e + 1), E(!0);
62
+ };
63
+ v(() => {
64
+ let e = h;
65
+ if (!D[e(328)]) return;
66
+ let t = O[e(313)];
67
+ if (!t) return;
68
+ let n = t[e(337)], r = Math.min(t[e(338)], window.innerHeight - 16), i = k.x + n > window.innerWidth - C, a = k.y + r > window.innerHeight - C && k.y - r >= C, o = Math[e(308)](C, Math.min(i ? k.x - n : k.x, window[e(331)] - n - C)), s = Math[e(308)](C, Math[e(312)](a ? k.y - r : k.y, window.innerHeight - r - C));
69
+ z(e(a ? 334 : 323)), L({
70
+ position: e(305),
71
+ left: o,
72
+ top: s,
73
+ maxHeight: window[e(317)] - 16,
74
+ transformOrigin: (i ? "right" : e(348)) + " " + (a ? e(323) : "top")
75
+ });
76
+ }, [
77
+ D[h(328)],
78
+ k,
79
+ j
80
+ ]), _(() => {
81
+ if (!T) return;
82
+ let e = requestAnimationFrame(() => {
83
+ let e = w;
84
+ N[e(313)] === e(302) ? s(O[e(313)])[0]?.[e(343)]({ preventScroll: !0 }) : O[e(313)]?.[e(343)]({ preventScroll: !0 });
85
+ });
86
+ return () => cancelAnimationFrame(e);
87
+ }, [T, j]), _(() => {
88
+ let e = h;
89
+ if (!T) return;
90
+ let t = (e) => {
91
+ let t = w;
92
+ e[t(330)] === "scroll" && e[t(339)] instanceof Node && O[t(313)]?.[t(320)](e[t(339)]) || E(!1);
93
+ };
94
+ return window[e(300)](e(346), t), window.addEventListener(e(301), t, !0), () => {
95
+ let n = e;
96
+ window[n(316)](n(346), t), window.removeEventListener(n(301), t, !0);
97
+ };
98
+ }, [T, E]);
99
+ let U = () => {
100
+ let e = h;
101
+ F[e(313)] && window.clearTimeout(F[e(313)][e(325)]);
102
+ };
103
+ _(() => U, []);
104
+ let W = (e) => {
105
+ let t = h;
106
+ f || (e[t(291)](), !F[t(313)]?.fired && (F[t(313)] && (U(), F[t(313)][t(299)] = !0), H(e[t(336)], e[t(311)], t(326))));
107
+ }, G = (e) => {
108
+ let n = h;
109
+ if (f || e.pointerType === n(314)) return;
110
+ U();
111
+ let { clientX: r, clientY: i } = e;
112
+ F[n(313)] = {
113
+ x: r,
114
+ y: i,
115
+ fired: !1,
116
+ timer: window[n(327)](() => {
117
+ let e = n;
118
+ F[e(313)] && (F[e(313)][e(299)] = !0, H(r, i, e(326)));
119
+ }, t[n(344)])
120
+ };
121
+ }, K = (e) => {
122
+ let n = h, r = F.current;
123
+ r && !r[n(299)] && Math[n(324)](e.clientX - r.x, e[n(311)] - r.y) > t.dragThreshold * 2 && U();
124
+ }, q = () => {
125
+ let e = h;
126
+ U(), window[e(327)](() => {
127
+ F.current = null;
128
+ }, 0);
129
+ };
130
+ return S(o.Provider, {
131
+ value: V,
132
+ children: [x(h(296), {
133
+ className: h(309),
134
+ "data-state": T ? "open" : "closed",
135
+ onContextMenu: W,
136
+ onPointerDown: G,
137
+ onPointerMove: K,
138
+ onPointerUp: q,
139
+ onPointerCancel: q,
140
+ onKeyDown: (e) => {
141
+ let t = h;
142
+ if (f || !(e[t(335)] === t(345) || e[t(335)] === t(333) && e[t(342)])) return;
143
+ e[t(291)]();
144
+ let n = e[t(339)].getBoundingClientRect();
145
+ H(n.left + Math.min(16, n[t(306)] / 2), n[t(334)] + Math[t(312)](n[t(307)], 32), t(302));
146
+ },
147
+ onClickCapture: (e) => {
148
+ let t = h;
149
+ F[t(313)]?.fired && (e[t(291)](), e[t(294)]());
150
+ },
151
+ children: e
152
+ }), D.mounted && x(g, {
153
+ panelRef: O,
154
+ side: R,
155
+ closing: D[h(329)],
156
+ style: {
157
+ ...I,
158
+ minWidth: p
159
+ },
160
+ "aria-label": m,
161
+ onEscape: () => B(),
162
+ children: a
163
+ }, j)]
164
+ });
165
+ }
166
+ var E = u, D = l, O = f, k = p, A = d, j = m, M = h;
167
+ T[e(292)] = u, T[e(315)] = l, T.RadioGroup = f, T.RadioItem = p, T.Label = d, T[e(310)] = m, T.Sub = h;
168
+ export { T as ContextMenu, D as ContextMenuCheckboxItem, E as ContextMenuItem, A as ContextMenuLabel, O as ContextMenuRadioGroup, k as ContextMenuRadioItem, j as ContextMenuSeparator, M as ContextMenuSub };