@devalok/shilp-sutra 0.27.2 → 0.29.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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1,46 +1,47 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as e, Fragment as $ } from "react/jsx-runtime";
3
- import * as z from "react";
4
- import { useRef as B, useCallback as x } from "react";
2
+ import { jsxs as a, jsx as e, Fragment as H } from "react/jsx-runtime";
3
+ import * as $ from "react";
4
+ import { useRef as B, useCallback as b } from "react";
5
5
  import { formatRelativeTime as G } from "../ui/lib/date-utils.js";
6
- import { Popover as X, PopoverTrigger as _, PopoverContent as q } from "../ui/popover.js";
7
- import { Tooltip as F, TooltipTrigger as J, TooltipContent as L } from "../ui/tooltip.js";
6
+ import { Popover as M, PopoverTrigger as X, PopoverContent as _ } from "../ui/popover.js";
7
+ import { Tooltip as q, TooltipTrigger as J, TooltipContent as L } from "../ui/tooltip.js";
8
8
  import { IconBell as Q, IconChecks as U, IconInbox as V, IconX as W } from "@tabler/icons-react";
9
- import { cn as p } from "../ui/lib/utils.js";
9
+ import { Icon as h } from "../ui/icon.js";
10
+ import { cn as f } from "../ui/lib/utils.js";
10
11
  import { Spinner as Z } from "../ui/spinner.js";
11
12
  import { m as N } from "../_chunks/framer.js";
12
- function v(t, d) {
13
+ function w(t, d) {
13
14
  return t.getFullYear() === d.getFullYear() && t.getMonth() === d.getMonth() && t.getDate() === d.getDate();
14
15
  }
15
- function M(t) {
16
- const d = new Date(t), n = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
17
- return l.setDate(n.getDate() - 1), v(d, n) ? "Today" : v(d, l) ? "Yesterday" : "Earlier";
16
+ function ee(t) {
17
+ const d = new Date(t), o = /* @__PURE__ */ new Date(), l = /* @__PURE__ */ new Date();
18
+ return l.setDate(o.getDate() - 1), w(d, o) ? "Today" : w(d, l) ? "Yesterday" : "Earlier";
18
19
  }
19
- const w = {
20
+ const C = {
20
21
  INFO: "bg-info-9",
21
22
  IMPORTANT: "bg-warning-9",
22
23
  CRITICAL: "bg-error-9"
23
24
  };
24
- function ee({
25
+ function te({
25
26
  notification: t,
26
27
  onRead: d,
27
- onNavigate: n,
28
+ onNavigate: o,
28
29
  getRoute: l,
29
- onDismiss: u
30
+ onDismiss: c
30
31
  }) {
31
- const h = l(t), i = () => {
32
- t.isRead || d(t.id), h && n(h);
32
+ const p = l(t), g = () => {
33
+ t.isRead || d(t.id), p && o(p);
33
34
  };
34
35
  return /* @__PURE__ */ a(
35
36
  "div",
36
37
  {
37
38
  role: "button",
38
39
  tabIndex: 0,
39
- onClick: i,
40
+ onClick: g,
40
41
  onKeyDown: (r) => {
41
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), i());
42
+ (r.key === "Enter" || r.key === " ") && (r.preventDefault(), g());
42
43
  },
43
- className: p(
44
+ className: f(
44
45
  "group relative flex w-full cursor-pointer items-start gap-ds-04 px-ds-05 py-ds-04 text-left transition-colors duration-fast-02 ease-productive-standard",
45
46
  "hover:bg-surface-raised",
46
47
  !t.isRead && "bg-accent-1"
@@ -49,9 +50,9 @@ function ee({
49
50
  /* @__PURE__ */ e("div", { className: "mt-ds-02b flex shrink-0", children: /* @__PURE__ */ e(
50
51
  "span",
51
52
  {
52
- className: p(
53
+ className: f(
53
54
  "h-[8px] w-[8px] rounded-ds-full transition-opacity duration-fast-02 ease-productive-standard",
54
- w[t.tier] || w.INFO,
55
+ C[t.tier] || C.INFO,
55
56
  t.isRead ? "opacity-20" : "opacity-100"
56
57
  )
57
58
  }
@@ -60,7 +61,7 @@ function ee({
60
61
  /* @__PURE__ */ e(
61
62
  "p",
62
63
  {
63
- className: p(
64
+ className: f(
64
65
  "truncate text-ds-md text-surface-fg",
65
66
  !t.isRead && "font-semibold"
66
67
  ),
@@ -70,7 +71,7 @@ function ee({
70
71
  t.body && /* @__PURE__ */ e("p", { className: "mt-ds-01 line-clamp-2 text-ds-sm text-surface-fg-subtle", children: t.body }),
71
72
  /* @__PURE__ */ a("div", { className: "mt-ds-02 flex items-center gap-ds-03", children: [
72
73
  /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: G(t.createdAt) }),
73
- t.project && /* @__PURE__ */ a($, { children: [
74
+ t.project && /* @__PURE__ */ a(H, { children: [
74
75
  /* @__PURE__ */ e("span", { className: "text-surface-fg-subtle", children: "·" }),
75
76
  /* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-surface-fg-subtle", children: t.project.title })
76
77
  ] })
@@ -79,11 +80,11 @@ function ee({
79
80
  "button",
80
81
  {
81
82
  type: "button",
82
- onClick: (c) => {
83
- c.stopPropagation(), r.onClick(t.id);
83
+ onClick: (i) => {
84
+ i.stopPropagation(), r.onClick(t.id);
84
85
  },
85
- onKeyDown: (c) => c.stopPropagation(),
86
- className: p(
86
+ onKeyDown: (i) => i.stopPropagation(),
87
+ className: f(
87
88
  "rounded-ds-md px-ds-03 py-ds-01 text-ds-sm font-medium transition-colors duration-fast-02 ease-productive-standard",
88
89
  r.variant === "primary" ? "bg-accent-9 text-accent-fg hover:bg-accent-10" : r.variant === "danger" ? "text-error-11 hover:bg-error-3" : "text-surface-fg-muted hover:bg-surface-raised-hover"
89
90
  ),
@@ -92,86 +93,86 @@ function ee({
92
93
  r.label
93
94
  )) })
94
95
  ] }),
95
- u && /* @__PURE__ */ e(
96
+ c && /* @__PURE__ */ e(
96
97
  "button",
97
98
  {
98
99
  type: "button",
99
100
  "aria-label": `Dismiss notification: ${t.title}`,
100
101
  onClick: (r) => {
101
- r.stopPropagation(), u(t.id);
102
+ r.stopPropagation(), c(t.id);
102
103
  },
103
104
  onKeyDown: (r) => r.stopPropagation(),
104
105
  className: "absolute right-ds-03 top-ds-03 hidden rounded-ds-sm p-ds-01 text-surface-fg-subtle transition-[color,background-color,opacity] duration-fast-01 ease-productive-standard hover:bg-surface-raised-hover hover:text-surface-fg-muted group-hover:flex group-focus-within:flex",
105
- children: /* @__PURE__ */ e(W, { className: "h-ico-sm w-ico-sm" })
106
+ children: /* @__PURE__ */ e(h, { icon: W, size: "sm" })
106
107
  }
107
108
  )
108
109
  ]
109
110
  }
110
111
  );
111
112
  }
112
- const te = z.forwardRef(
113
+ const se = $.forwardRef(
113
114
  ({
114
115
  notifications: t = [],
115
116
  unreadCount: d,
116
- open: n,
117
+ open: o,
117
118
  onOpenChange: l,
118
- isLoading: u = !1,
119
- hasMore: h = !1,
120
- onFetchMore: i,
121
- onMarkRead: g,
119
+ isLoading: c = !1,
120
+ hasMore: p = !1,
121
+ onFetchMore: g,
122
+ onMarkRead: x,
122
123
  onMarkAllRead: r,
123
- onNavigate: c,
124
+ onNavigate: i,
124
125
  getNotificationRoute: D,
125
126
  onDismiss: I,
126
- headerActions: C,
127
- emptyState: T,
128
- footerSlot: b,
129
- popoverClassName: j,
130
- className: R,
131
- ...k
132
- }, P) => {
133
- const y = B(null), o = d ?? t.filter((s) => !s.isRead).length, K = D ?? (() => null), Y = x(
127
+ headerActions: R,
128
+ emptyState: k,
129
+ footerSlot: y,
130
+ popoverClassName: T,
131
+ className: j,
132
+ ...P
133
+ }, O) => {
134
+ const v = B(null), n = d ?? t.filter((s) => !s.isRead).length, z = D ?? (() => null), K = b(
134
135
  (s) => {
135
- l == null || l(!1), c == null || c(s);
136
+ l?.(!1), i?.(s);
136
137
  },
137
- [c, l]
138
- ), E = x(
138
+ [i, l]
139
+ ), Y = b(
139
140
  (s) => {
140
- g == null || g(s);
141
+ x?.(s);
141
142
  },
142
- [g]
143
- ), S = x(() => {
144
- const s = y.current;
145
- !s || u || !h || s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && (i == null || i());
146
- }, [u, h, i]), A = t.reduce(
147
- (s, m) => {
148
- const f = M(m.createdAt);
149
- return s[f] || (s[f] = []), s[f].push(m), s;
143
+ [x]
144
+ ), E = b(() => {
145
+ const s = v.current;
146
+ !s || c || !p || s.scrollTop + s.clientHeight >= s.scrollHeight - 50 && g?.();
147
+ }, [c, p, g]), F = t.reduce(
148
+ (s, u) => {
149
+ const m = ee(u.createdAt);
150
+ return s[m] || (s[m] = []), s[m].push(u), s;
150
151
  },
151
152
  {}
152
- ), H = ["Today", "Yesterday", "Earlier"];
153
- return /* @__PURE__ */ a(X, { open: n, onOpenChange: l, children: [
154
- /* @__PURE__ */ a(F, { children: [
155
- /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(_, { asChild: !0, children: /* @__PURE__ */ a(
153
+ ), S = ["Today", "Yesterday", "Earlier"];
154
+ return /* @__PURE__ */ a(M, { open: o, onOpenChange: l, children: [
155
+ /* @__PURE__ */ a(q, { children: [
156
+ /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ a(
156
157
  "button",
157
158
  {
158
- ...k,
159
- ref: P,
160
- "aria-label": o > 0 ? `Notifications, ${o} unread` : "Notifications",
161
- className: p(
159
+ ...P,
160
+ ref: O,
161
+ "aria-label": n > 0 ? `Notifications, ${n} unread` : "Notifications",
162
+ className: f(
162
163
  "relative flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-raised text-surface-fg-muted transition-colors ease-productive-standard hover:bg-surface-raised-hover",
163
- R
164
+ j
164
165
  ),
165
166
  children: [
166
- /* @__PURE__ */ e(Q, { className: "h-ico-sm w-ico-sm", "aria-hidden": "true" }),
167
- o > 0 && /* @__PURE__ */ e(
167
+ /* @__PURE__ */ e(h, { icon: Q, size: "sm" }),
168
+ n > 0 && /* @__PURE__ */ e(
168
169
  N.span,
169
170
  {
170
171
  initial: { rotate: 0 },
171
172
  animate: { rotate: [0, -3, 3, -1, 1, 0] },
172
173
  transition: { duration: 0.4, ease: "easeInOut" },
173
174
  className: "absolute -right-ds-01 -top-ds-01 flex h-4 min-w-4 items-center justify-center rounded-ds-full bg-accent-9 px-ds-02 text-ds-xs font-semibold text-accent-fg",
174
- children: o > 99 ? "99+" : o
175
+ children: n > 99 ? "99+" : n
175
176
  }
176
177
  )
177
178
  ]
@@ -180,11 +181,11 @@ const te = z.forwardRef(
180
181
  /* @__PURE__ */ e(L, { side: "bottom", align: "center", children: "Notifications" })
181
182
  ] }),
182
183
  /* @__PURE__ */ a(
183
- q,
184
+ _,
184
185
  {
185
- className: p(
186
+ className: f(
186
187
  "w-[380px] rounded-ds-xl border border-surface-border-strong bg-surface-overlay p-0 shadow-floating",
187
- j
188
+ T
188
189
  ),
189
190
  sideOffset: 8,
190
191
  align: "end",
@@ -192,72 +193,72 @@ const te = z.forwardRef(
192
193
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
193
194
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
194
195
  /* @__PURE__ */ e("h3", { className: "text-ds-md font-semibold text-surface-fg", children: "Notifications" }),
195
- o > 0 && /* @__PURE__ */ e("span", { className: "flex h-5 min-w-5 items-center justify-center rounded-ds-full bg-accent-2 px-ds-02b text-ds-sm font-semibold text-accent-11", children: o })
196
+ n > 0 && /* @__PURE__ */ e("span", { className: "flex h-5 min-w-5 items-center justify-center rounded-ds-full bg-accent-2 px-ds-02b text-ds-sm font-semibold text-accent-11", children: n })
196
197
  ] }),
197
198
  /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-03", children: [
198
- o > 0 && r && /* @__PURE__ */ a(
199
+ n > 0 && r && /* @__PURE__ */ a(
199
200
  "button",
200
201
  {
201
202
  type: "button",
202
203
  onClick: r,
203
204
  className: "flex items-center gap-ds-02 text-ds-sm text-surface-fg-subtle transition-colors hover:text-accent-11",
204
205
  children: [
205
- /* @__PURE__ */ e(U, { className: "h-ico-sm w-ico-sm" }),
206
+ /* @__PURE__ */ e(h, { icon: U, size: "sm" }),
206
207
  "Mark all read"
207
208
  ]
208
209
  }
209
210
  ),
210
- C
211
+ R
211
212
  ] })
212
213
  ] }),
213
214
  /* @__PURE__ */ a(
214
215
  "div",
215
216
  {
216
- ref: y,
217
- onScroll: S,
217
+ ref: v,
218
+ onScroll: E,
218
219
  className: "max-h-[420px] overflow-y-auto",
219
220
  children: [
220
- t.length === 0 ? T || /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-ds-05 py-ds-09", children: [
221
- /* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-surface-raised", children: /* @__PURE__ */ e(V, { className: "h-ico-lg w-ico-lg text-surface-fg-subtle" }) }),
221
+ t.length === 0 ? k || /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center px-ds-05 py-ds-09", children: [
222
+ /* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-surface-raised", children: /* @__PURE__ */ e(h, { icon: V, size: "lg", className: "text-surface-fg-subtle" }) }),
222
223
  /* @__PURE__ */ e("p", { className: "mt-ds-04 text-ds-md text-surface-fg-subtle", children: "No notifications yet" }),
223
224
  /* @__PURE__ */ e("p", { className: "mt-ds-02 text-ds-sm text-surface-fg-subtle", children: "You're all caught up!" })
224
- ] }) : H.map((s) => {
225
- const m = A[s];
226
- return !m || m.length === 0 ? null : /* @__PURE__ */ a("div", { children: [
225
+ ] }) : S.map((s) => {
226
+ const u = F[s];
227
+ return !u || u.length === 0 ? null : /* @__PURE__ */ a("div", { children: [
227
228
  /* @__PURE__ */ e("div", { className: "sticky top-0 z-raised bg-surface-overlay px-ds-05 py-ds-02b", children: /* @__PURE__ */ e("span", { className: "text-ds-sm font-medium text-surface-fg-subtle", children: s }) }),
228
- m.map((f, O) => /* @__PURE__ */ e(
229
+ u.map((m, A) => /* @__PURE__ */ e(
229
230
  N.div,
230
231
  {
231
232
  initial: { opacity: 0 },
232
233
  animate: { opacity: 1 },
233
- transition: { delay: O * 0.03 },
234
+ transition: { delay: A * 0.03 },
234
235
  children: /* @__PURE__ */ e(
235
- ee,
236
+ te,
236
237
  {
237
- notification: f,
238
- onRead: E,
239
- onNavigate: Y,
240
- getRoute: K,
238
+ notification: m,
239
+ onRead: Y,
240
+ onNavigate: K,
241
+ getRoute: z,
241
242
  onDismiss: I
242
243
  }
243
244
  )
244
245
  },
245
- f.id
246
+ m.id
246
247
  ))
247
248
  ] }, s);
248
249
  }),
249
- u && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-05", children: /* @__PURE__ */ e(Z, {}) })
250
+ c && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-05", children: /* @__PURE__ */ e(Z, {}) })
250
251
  ]
251
252
  }
252
253
  ),
253
- b && /* @__PURE__ */ e("div", { className: "border-t border-surface-border-strong px-ds-05 py-ds-03", children: b })
254
+ y && /* @__PURE__ */ e("div", { className: "border-t border-surface-border-strong px-ds-05 py-ds-03", children: y })
254
255
  ]
255
256
  }
256
257
  )
257
258
  ] });
258
259
  }
259
260
  );
260
- te.displayName = "NotificationCenter";
261
+ se.displayName = "NotificationCenter";
261
262
  export {
262
- te as NotificationCenter
263
+ se as NotificationCenter
263
264
  };
@@ -1 +1 @@
1
- {"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2B9B,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,4BACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1D,+BAA+B;IAC/B,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAChC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE;QACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,OAAO,CAAA;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,gDAAgD;IAChD,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,MAAM,KACZ,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAqBD,QAAA,MAAM,uBAAuB,kHA0P5B,CAAA;AAID,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
1
+ {"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA4B9B,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,4BACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAC1D,+BAA+B;IAC/B,WAAW,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAChC,8BAA8B;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,CAAC,UAAU,EAAE;QACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,KAAK,EAAE,OAAO,CAAA;KACf,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,4CAA4C;IAC5C,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,sBAAsB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3E,gDAAgD;IAChD,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,sBAAsB,EAClC,OAAO,EAAE,MAAM,KACZ,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzD,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAqBD,QAAA,MAAM,uBAAuB,kHA0P5B,CAAA;AAID,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
@@ -1,107 +1,104 @@
1
1
  "use client";
2
- import { jsxs as s, Fragment as D, jsx as e } from "react/jsx-runtime";
3
- import * as z from "react";
4
- import { useState as c } from "react";
2
+ import { jsxs as t, Fragment as B, jsx as e } from "react/jsx-runtime";
3
+ import * as U from "react";
4
+ import { useState as n } from "react";
5
5
  import { Button as g } from "../ui/button.js";
6
- import { Select as d, SelectTrigger as o, SelectValue as m, SelectContent as h, SelectItem as n } from "../ui/select.js";
6
+ import { Select as d, SelectTrigger as o, SelectValue as m, SelectContent as h, SelectItem as s } from "../ui/select.js";
7
7
  import { Dialog as q, DialogContent as J, DialogHeader as K, DialogTitle as Q, DialogDescription as W } from "../ui/dialog.js";
8
- import { Switch as k } from "../ui/switch.js";
8
+ import { Switch as T } from "../ui/switch.js";
9
9
  import { Card as X, CardHeader as Y, CardTitle as Z, CardContent as $ } from "../ui/card.js";
10
- import { IconPlus as U, IconTrash as ee, IconMessage as le, IconBell as se } from "@tabler/icons-react";
11
- import { cn as te } from "../ui/lib/utils.js";
12
- import { Spinner as ce } from "../ui/spinner.js";
13
- const _ = {
14
- IN_APP: { label: "In-App", icon: /* @__PURE__ */ e(se, {}) },
15
- GOOGLE_CHAT: { label: "Google Chat", icon: /* @__PURE__ */ e(le, {}) }
16
- }, G = {
10
+ import { IconPlus as ee, IconTrash as le, IconMessage as te, IconBell as ne } from "@tabler/icons-react";
11
+ import { Icon as f } from "../ui/icon.js";
12
+ import { cn as se } from "../ui/lib/utils.js";
13
+ import { Spinner as ie } from "../ui/spinner.js";
14
+ const O = {
15
+ IN_APP: { label: "In-App", icon: /* @__PURE__ */ e(f, { icon: ne, size: "sm" }) },
16
+ GOOGLE_CHAT: { label: "Google Chat", icon: /* @__PURE__ */ e(f, { icon: te, size: "sm" }) }
17
+ }, F = {
17
18
  INFO: "All (Info+)",
18
19
  IMPORTANT: "Important+",
19
20
  CRITICAL: "Critical only"
20
- }, ne = z.forwardRef(
21
+ }, ce = U.forwardRef(
21
22
  function({
22
- preferences: f = [],
23
- projects: b = [],
24
- isLoading: L = !1,
25
- onSave: v,
26
- onToggleMute: u,
27
- onUpdateTier: N,
28
- onDelete: p,
29
- className: R,
30
- ...T
31
- }, E) {
32
- const [H, i] = c(!1), [x, C] = c("global"), [I, w] = c("IN_APP"), [A, P] = c("INFO"), [S, j] = c(!1), [y, O] = c(!1), M = async () => {
33
- if (v) {
34
- O(!0);
23
+ preferences: u = [],
24
+ projects: N = [],
25
+ isLoading: k = !1,
26
+ onSave: x,
27
+ onToggleMute: M,
28
+ onUpdateTier: _,
29
+ onDelete: D,
30
+ className: G,
31
+ ...L
32
+ }, R) {
33
+ const [z, i] = n(!1), [p, b] = n("global"), [v, C] = n("IN_APP"), [I, w] = n("INFO"), [A, P] = n(!1), [j, S] = n(!1), E = async () => {
34
+ if (x) {
35
+ S(!0);
35
36
  try {
36
- await v({
37
- projectId: x === "global" ? null : x,
38
- channel: I,
39
- minTier: A,
40
- muted: S
41
- }), i(!1), F();
37
+ await x({
38
+ projectId: p === "global" ? null : p,
39
+ channel: v,
40
+ minTier: I,
41
+ muted: A
42
+ }), i(!1), y();
42
43
  } catch (l) {
43
44
  console.error("[Preferences] Failed to save:", l);
44
45
  } finally {
45
- O(!1);
46
+ S(!1);
46
47
  }
47
48
  }
48
- }, F = () => {
49
- C("global"), w("IN_APP"), P("INFO"), j(!1);
50
- }, V = (l) => {
51
- if (!l) return "Global (all projects)";
52
- const t = b.find((a) => a.id === l);
53
- return (t == null ? void 0 : t.title) || "Unknown project";
54
- };
55
- return /* @__PURE__ */ s(D, { children: [
56
- /* @__PURE__ */ s(X, { ref: E, className: R, ...T, children: [
57
- /* @__PURE__ */ s(Y, { className: "flex flex-row items-center justify-between space-y-0 pb-ds-04", children: [
49
+ }, y = () => {
50
+ b("global"), C("IN_APP"), w("INFO"), P(!1);
51
+ }, H = (l) => l ? N.find((a) => a.id === l)?.title || "Unknown project" : "Global (all projects)";
52
+ return /* @__PURE__ */ t(B, { children: [
53
+ /* @__PURE__ */ t(X, { ref: R, className: G, ...L, children: [
54
+ /* @__PURE__ */ t(Y, { className: "flex flex-row items-center justify-between space-y-0 pb-ds-04", children: [
58
55
  /* @__PURE__ */ e(Z, { className: "text-ds-md font-semibold", children: "Notification Preferences" }),
59
- /* @__PURE__ */ s(
56
+ /* @__PURE__ */ t(
60
57
  g,
61
58
  {
62
59
  size: "sm",
63
60
  variant: "outline",
64
61
  onClick: () => i(!0),
65
62
  children: [
66
- /* @__PURE__ */ e(U, { className: "mr-ds-02b h-ico-sm w-ico-sm" }),
63
+ /* @__PURE__ */ e(f, { icon: ee, size: "sm", className: "mr-ds-02b" }),
67
64
  "Add Rule"
68
65
  ]
69
66
  }
70
67
  )
71
68
  ] }),
72
- /* @__PURE__ */ e($, { children: L ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ e(ce, {}) }) : f.length === 0 ? /* @__PURE__ */ e("div", { className: "py-ds-07 text-center", children: /* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: "No custom preferences set. All notifications are delivered by default." }) }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: f.map((l, t) => {
73
- const a = _[l.channel] || _.IN_APP;
74
- return /* @__PURE__ */ s(
69
+ /* @__PURE__ */ e($, { children: k ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ e(ie, {}) }) : u.length === 0 ? /* @__PURE__ */ e("div", { className: "py-ds-07 text-center", children: /* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: "No custom preferences set. All notifications are delivered by default." }) }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: u.map((l, c) => {
70
+ const a = O[l.channel] || O.IN_APP;
71
+ return /* @__PURE__ */ t(
75
72
  "div",
76
73
  {
77
- className: te(
74
+ className: se(
78
75
  "flex items-center gap-ds-05 py-ds-04",
79
- t < f.length - 1 && "border-b border-surface-border-strong"
76
+ c < u.length - 1 && "border-b border-surface-border-strong"
80
77
  ),
81
78
  children: [
82
79
  /* @__PURE__ */ e("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-surface-raised", children: /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm text-surface-fg-muted", "aria-hidden": "true", children: a.icon }) }),
83
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
80
+ /* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: [
84
81
  /* @__PURE__ */ e("p", { className: "text-ds-md font-medium text-surface-fg", children: a.label }),
85
- /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: V(l.projectId) })
82
+ /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: H(l.projectId) })
86
83
  ] }),
87
- /* @__PURE__ */ s(
84
+ /* @__PURE__ */ t(
88
85
  d,
89
86
  {
90
87
  value: l.minTier,
91
- onValueChange: (r) => N == null ? void 0 : N(l, r),
88
+ onValueChange: (r) => _?.(l, r),
92
89
  children: [
93
90
  /* @__PURE__ */ e(o, { className: "h-ds-xs-plus w-[130px] text-ds-sm", children: /* @__PURE__ */ e(m, {}) }),
94
- /* @__PURE__ */ e(h, { children: Object.entries(G).map(([r, B]) => /* @__PURE__ */ e(n, { value: r, children: B }, r)) })
91
+ /* @__PURE__ */ e(h, { children: Object.entries(F).map(([r, V]) => /* @__PURE__ */ e(s, { value: r, children: V }, r)) })
95
92
  ]
96
93
  }
97
94
  ),
98
- /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02b", children: [
95
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02b", children: [
99
96
  /* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: l.muted ? "Muted" : "Active" }),
100
97
  /* @__PURE__ */ e(
101
- k,
98
+ T,
102
99
  {
103
100
  checked: !l.muted,
104
- onCheckedChange: () => u == null ? void 0 : u(l)
101
+ onCheckedChange: () => M?.(l)
105
102
  }
106
103
  )
107
104
  ] }),
@@ -109,9 +106,9 @@ const _ = {
109
106
  "button",
110
107
  {
111
108
  type: "button",
112
- onClick: () => p == null ? void 0 : p(l.id),
109
+ onClick: () => D?.(l.id),
113
110
  className: "shrink-0 rounded p-ds-02b text-surface-fg-subtle transition-colors hover:bg-surface-raised hover:text-error-11",
114
- children: /* @__PURE__ */ e(ee, { className: "h-ico-sm w-ico-sm" })
111
+ children: /* @__PURE__ */ e(f, { icon: le, size: "sm" })
115
112
  }
116
113
  )
117
114
  ]
@@ -120,50 +117,50 @@ const _ = {
120
117
  );
121
118
  }) }) })
122
119
  ] }),
123
- /* @__PURE__ */ e(q, { open: H, onOpenChange: i, children: /* @__PURE__ */ s(J, { className: "sm:max-w-md", children: [
124
- /* @__PURE__ */ s(K, { children: [
120
+ /* @__PURE__ */ e(q, { open: z, onOpenChange: i, children: /* @__PURE__ */ t(J, { className: "sm:max-w-md", children: [
121
+ /* @__PURE__ */ t(K, { children: [
125
122
  /* @__PURE__ */ e(Q, { children: "Add Notification Rule" }),
126
123
  /* @__PURE__ */ e(W, { children: "Customize how you receive notifications for a specific channel and project." })
127
124
  ] }),
128
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-05 pt-ds-03", children: [
129
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
125
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-05 pt-ds-03", children: [
126
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
130
127
  /* @__PURE__ */ e("label", { htmlFor: "pref-scope", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Scope" }),
131
- /* @__PURE__ */ s(d, { value: x, onValueChange: C, children: [
128
+ /* @__PURE__ */ t(d, { value: p, onValueChange: b, children: [
132
129
  /* @__PURE__ */ e(o, { id: "pref-scope", children: /* @__PURE__ */ e(m, { placeholder: "Select scope" }) }),
133
- /* @__PURE__ */ s(h, { children: [
134
- /* @__PURE__ */ e(n, { value: "global", children: "Global (all projects)" }),
135
- b.map((l) => /* @__PURE__ */ e(n, { value: l.id, children: l.title }, l.id))
130
+ /* @__PURE__ */ t(h, { children: [
131
+ /* @__PURE__ */ e(s, { value: "global", children: "Global (all projects)" }),
132
+ N.map((l) => /* @__PURE__ */ e(s, { value: l.id, children: l.title }, l.id))
136
133
  ] })
137
134
  ] })
138
135
  ] }),
139
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
136
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
140
137
  /* @__PURE__ */ e("label", { htmlFor: "pref-channel", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Channel" }),
141
- /* @__PURE__ */ s(d, { value: I, onValueChange: w, children: [
138
+ /* @__PURE__ */ t(d, { value: v, onValueChange: C, children: [
142
139
  /* @__PURE__ */ e(o, { id: "pref-channel", children: /* @__PURE__ */ e(m, {}) }),
143
- /* @__PURE__ */ s(h, { children: [
144
- /* @__PURE__ */ e(n, { value: "IN_APP", children: "In-App" }),
145
- /* @__PURE__ */ e(n, { value: "GOOGLE_CHAT", children: "Google Chat" })
140
+ /* @__PURE__ */ t(h, { children: [
141
+ /* @__PURE__ */ e(s, { value: "IN_APP", children: "In-App" }),
142
+ /* @__PURE__ */ e(s, { value: "GOOGLE_CHAT", children: "Google Chat" })
146
143
  ] })
147
144
  ] })
148
145
  ] }),
149
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
146
+ /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
150
147
  /* @__PURE__ */ e("label", { htmlFor: "pref-min-tier", className: "text-ds-sm font-medium text-surface-fg-muted", children: "Minimum Tier" }),
151
- /* @__PURE__ */ s(d, { value: A, onValueChange: P, children: [
148
+ /* @__PURE__ */ t(d, { value: I, onValueChange: w, children: [
152
149
  /* @__PURE__ */ e(o, { id: "pref-min-tier", children: /* @__PURE__ */ e(m, {}) }),
153
- /* @__PURE__ */ e(h, { children: Object.entries(G).map(([l, t]) => /* @__PURE__ */ e(n, { value: l, children: t }, l)) })
150
+ /* @__PURE__ */ e(h, { children: Object.entries(F).map(([l, c]) => /* @__PURE__ */ e(s, { value: l, children: c }, l)) })
154
151
  ] })
155
152
  ] }),
156
- /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
153
+ /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
157
154
  /* @__PURE__ */ e("label", { htmlFor: "pref-muted", className: "text-ds-md text-surface-fg", children: "Mute this channel" }),
158
- /* @__PURE__ */ e(k, { id: "pref-muted", checked: S, onCheckedChange: j })
155
+ /* @__PURE__ */ e(T, { id: "pref-muted", checked: A, onCheckedChange: P })
159
156
  ] }),
160
- /* @__PURE__ */ s("div", { className: "flex justify-end gap-ds-03 pt-ds-03", children: [
157
+ /* @__PURE__ */ t("div", { className: "flex justify-end gap-ds-03 pt-ds-03", children: [
161
158
  /* @__PURE__ */ e(
162
159
  g,
163
160
  {
164
161
  variant: "ghost",
165
162
  onClick: () => {
166
- i(!1), F();
163
+ i(!1), y();
167
164
  },
168
165
  children: "Cancel"
169
166
  }
@@ -171,9 +168,9 @@ const _ = {
171
168
  /* @__PURE__ */ e(
172
169
  g,
173
170
  {
174
- onClick: M,
175
- disabled: y,
176
- children: y ? "Saving..." : "Save Rule"
171
+ onClick: E,
172
+ disabled: j,
173
+ children: j ? "Saving..." : "Save Rule"
177
174
  }
178
175
  )
179
176
  ] })
@@ -182,7 +179,7 @@ const _ = {
182
179
  ] });
183
180
  }
184
181
  );
185
- ne.displayName = "NotificationPreferences";
182
+ ce.displayName = "NotificationPreferences";
186
183
  export {
187
- ne as NotificationPreferences
184
+ ce as NotificationPreferences
188
185
  };