@devalok/shilp-sutra 0.1.0 → 0.2.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 (286) hide show
  1. package/dist/composed/avatar-group.d.ts +1 -0
  2. package/dist/composed/avatar-group.d.ts.map +1 -1
  3. package/dist/composed/avatar-group.js +1 -0
  4. package/dist/composed/command-palette.d.ts +1 -0
  5. package/dist/composed/command-palette.js +4 -3
  6. package/dist/composed/date-picker/calendar-grid.d.ts +1 -0
  7. package/dist/composed/date-picker/calendar-grid.js +1 -0
  8. package/dist/composed/date-picker/date-picker.d.ts +1 -0
  9. package/dist/composed/date-picker/date-picker.js +1 -0
  10. package/dist/composed/date-picker/date-range-picker.d.ts +1 -0
  11. package/dist/composed/date-picker/date-range-picker.js +1 -0
  12. package/dist/composed/date-picker/date-time-picker.d.ts +1 -0
  13. package/dist/composed/date-picker/date-time-picker.js +1 -0
  14. package/dist/composed/date-picker/index.d.ts +1 -0
  15. package/dist/composed/date-picker/month-picker.d.ts +1 -0
  16. package/dist/composed/date-picker/month-picker.js +1 -0
  17. package/dist/composed/date-picker/presets.d.ts +1 -0
  18. package/dist/composed/date-picker/presets.js +1 -0
  19. package/dist/composed/date-picker/time-picker.d.ts +1 -0
  20. package/dist/composed/date-picker/time-picker.js +2 -1
  21. package/dist/composed/date-picker/use-calendar.d.ts +1 -0
  22. package/dist/composed/date-picker/use-calendar.d.ts.map +1 -1
  23. package/dist/composed/date-picker/use-calendar.js +1 -0
  24. package/dist/composed/date-picker/year-picker.d.ts +1 -0
  25. package/dist/composed/date-picker/year-picker.js +1 -0
  26. package/dist/composed/empty-state.js +1 -1
  27. package/dist/composed/error-boundary.d.ts +1 -0
  28. package/dist/composed/error-boundary.js +2 -1
  29. package/dist/composed/global-loading.d.ts +1 -0
  30. package/dist/composed/global-loading.js +1 -0
  31. package/dist/composed/index.d.ts +15 -0
  32. package/dist/composed/index.d.ts.map +1 -1
  33. package/dist/composed/index.js +1 -0
  34. package/dist/composed/lib/string-utils.d.ts +1 -0
  35. package/dist/composed/lib/string-utils.d.ts.map +1 -1
  36. package/dist/composed/lib/string-utils.js +7 -4
  37. package/dist/composed/loading-skeleton.js +32 -32
  38. package/dist/composed/member-picker.d.ts +1 -0
  39. package/dist/composed/member-picker.js +1 -0
  40. package/dist/composed/page-skeletons.js +38 -38
  41. package/dist/composed/rich-text-editor.d.ts +1 -0
  42. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  43. package/dist/composed/rich-text-editor.js +47 -44
  44. package/dist/composed/status-badge.js +6 -6
  45. package/dist/hooks/index.d.ts +1 -0
  46. package/dist/hooks/index.js +10 -0
  47. package/dist/hooks/use-color-mode.d.ts +1 -0
  48. package/dist/hooks/use-color-mode.d.ts.map +1 -1
  49. package/dist/hooks/use-color-mode.js +9 -8
  50. package/dist/hooks/use-mobile.d.ts +1 -0
  51. package/dist/hooks/use-mobile.js +1 -0
  52. package/dist/hooks/use-toast.d.ts +1 -0
  53. package/dist/hooks/use-toast.d.ts.map +1 -1
  54. package/dist/hooks/use-toast.js +3 -2
  55. package/dist/primitives/react-accordion.d.ts +114 -0
  56. package/dist/primitives/react-alert-dialog.d.ts +51 -0
  57. package/dist/primitives/react-aspect-ratio.d.ts +11 -0
  58. package/dist/primitives/react-avatar.d.ts +24 -0
  59. package/dist/primitives/react-checkbox.d.ts +50 -0
  60. package/dist/primitives/react-collapsible.d.ts +33 -0
  61. package/dist/primitives/react-context-menu.d.ts +96 -0
  62. package/dist/primitives/react-dialog.d.ts +103 -0
  63. package/dist/primitives/react-dropdown-menu.d.ts +97 -0
  64. package/dist/primitives/react-hover-card.d.ts +79 -0
  65. package/dist/primitives/react-label.d.ts +10 -0
  66. package/dist/primitives/react-menu.d.ts +169 -0
  67. package/dist/primitives/react-menubar.d.ts +115 -0
  68. package/dist/primitives/react-navigation-menu.d.ts +126 -0
  69. package/dist/primitives/react-popover.d.ts +85 -0
  70. package/dist/primitives/react-progress.d.ts +19 -0
  71. package/dist/primitives/react-radio-group.d.ts +58 -0
  72. package/dist/primitives/react-roving-focus.d.ts +49 -0
  73. package/dist/primitives/react-select.d.ts +137 -0
  74. package/dist/primitives/react-separator.d.ts +21 -0
  75. package/dist/primitives/react-slider.d.ts +75 -0
  76. package/dist/primitives/react-switch.d.ts +21 -0
  77. package/dist/primitives/react-tabs.d.ts +56 -0
  78. package/dist/primitives/react-toast.d.ts +120 -0
  79. package/dist/primitives/react-toggle-group.d.ts +75 -0
  80. package/dist/primitives/react-toggle.d.ts +24 -0
  81. package/dist/primitives/react-tooltip.d.ts +101 -0
  82. package/dist/primitives/react-visually-hidden.d.ts +22 -0
  83. package/dist/shell/app-command-palette.d.ts +3 -3
  84. package/dist/shell/app-command-palette.d.ts.map +1 -1
  85. package/dist/shell/app-command-palette.js +2 -1
  86. package/dist/shell/bottom-navbar.d.ts +1 -0
  87. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  88. package/dist/shell/bottom-navbar.js +40 -37
  89. package/dist/shell/index.d.ts +14 -2
  90. package/dist/shell/index.d.ts.map +1 -1
  91. package/dist/shell/index.js +16 -12
  92. package/dist/shell/link-context.d.ts +12 -0
  93. package/dist/shell/link-context.d.ts.map +1 -0
  94. package/dist/shell/link-context.js +19 -0
  95. package/dist/shell/notification-center.d.ts +1 -0
  96. package/dist/shell/notification-center.d.ts.map +1 -1
  97. package/dist/shell/notification-center.js +21 -19
  98. package/dist/shell/notification-preferences.d.ts +3 -3
  99. package/dist/shell/notification-preferences.d.ts.map +1 -1
  100. package/dist/shell/notification-preferences.js +14 -13
  101. package/dist/shell/sidebar.d.ts +1 -0
  102. package/dist/shell/sidebar.d.ts.map +1 -1
  103. package/dist/shell/sidebar.js +32 -30
  104. package/dist/shell/top-bar.d.ts +1 -0
  105. package/dist/shell/top-bar.d.ts.map +1 -1
  106. package/dist/shell/top-bar.js +35 -30
  107. package/dist/tailwind/preset.d.ts.map +1 -1
  108. package/dist/tailwind/preset.js +32 -2
  109. package/dist/ui/accordion.d.ts +2 -1
  110. package/dist/ui/accordion.js +1 -0
  111. package/dist/ui/alert-dialog.d.ts +2 -1
  112. package/dist/ui/alert-dialog.js +1 -0
  113. package/dist/ui/alert.d.ts +1 -0
  114. package/dist/ui/alert.d.ts.map +1 -1
  115. package/dist/ui/alert.js +2 -1
  116. package/dist/ui/aspect-ratio.d.ts +2 -1
  117. package/dist/ui/aspect-ratio.js +1 -0
  118. package/dist/ui/autocomplete.d.ts +1 -0
  119. package/dist/ui/autocomplete.js +35 -34
  120. package/dist/ui/avatar.d.ts +2 -1
  121. package/dist/ui/avatar.js +13 -12
  122. package/dist/ui/badge.d.ts +1 -0
  123. package/dist/ui/badge.d.ts.map +1 -1
  124. package/dist/ui/badge.js +4 -3
  125. package/dist/ui/banner.d.ts +1 -0
  126. package/dist/ui/banner.d.ts.map +1 -1
  127. package/dist/ui/banner.js +1 -0
  128. package/dist/ui/breadcrumb.d.ts +1 -0
  129. package/dist/ui/breadcrumb.js +1 -0
  130. package/dist/ui/button-group.d.ts +1 -0
  131. package/dist/ui/button-group.js +1 -0
  132. package/dist/ui/button.d.ts +1 -0
  133. package/dist/ui/button.js +2 -1
  134. package/dist/ui/card.d.ts +1 -0
  135. package/dist/ui/card.d.ts.map +1 -1
  136. package/dist/ui/card.js +2 -1
  137. package/dist/ui/charts/_internal/animation.d.ts +1 -0
  138. package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
  139. package/dist/ui/charts/_internal/animation.js +1 -0
  140. package/dist/ui/charts/_internal/axes.d.ts +1 -0
  141. package/dist/ui/charts/_internal/axes.d.ts.map +1 -1
  142. package/dist/ui/charts/_internal/axes.js +1 -0
  143. package/dist/ui/charts/_internal/colors.d.ts +1 -0
  144. package/dist/ui/charts/_internal/colors.js +1 -0
  145. package/dist/ui/charts/_internal/grid-lines.d.ts +1 -0
  146. package/dist/ui/charts/_internal/grid-lines.js +1 -0
  147. package/dist/ui/charts/_internal/legend.d.ts +1 -0
  148. package/dist/ui/charts/_internal/legend.js +1 -0
  149. package/dist/ui/charts/_internal/scales.d.ts +1 -0
  150. package/dist/ui/charts/_internal/tooltip.d.ts +1 -0
  151. package/dist/ui/charts/_internal/tooltip.d.ts.map +1 -1
  152. package/dist/ui/charts/_internal/tooltip.js +1 -0
  153. package/dist/ui/charts/_internal/types.d.ts +1 -0
  154. package/dist/ui/charts/_internal/types.js +1 -0
  155. package/dist/ui/charts/area-chart.d.ts +1 -0
  156. package/dist/ui/charts/area-chart.js +1 -0
  157. package/dist/ui/charts/bar-chart.d.ts +1 -0
  158. package/dist/ui/charts/bar-chart.js +2 -1
  159. package/dist/ui/charts/chart-container.d.ts +1 -0
  160. package/dist/ui/charts/chart-container.js +12 -11
  161. package/dist/ui/charts/gauge-chart.d.ts +1 -0
  162. package/dist/ui/charts/gauge-chart.js +1 -0
  163. package/dist/ui/charts/index.d.ts +1 -0
  164. package/dist/ui/charts/line-chart.d.ts +1 -0
  165. package/dist/ui/charts/line-chart.js +2 -1
  166. package/dist/ui/charts/pie-chart.d.ts +1 -0
  167. package/dist/ui/charts/pie-chart.js +1 -0
  168. package/dist/ui/charts/radar-chart.d.ts +1 -0
  169. package/dist/ui/charts/radar-chart.js +21 -20
  170. package/dist/ui/charts/sparkline.d.ts +1 -0
  171. package/dist/ui/charts/sparkline.js +1 -0
  172. package/dist/ui/checkbox.d.ts +2 -1
  173. package/dist/ui/checkbox.js +1 -0
  174. package/dist/ui/chip.d.ts +1 -0
  175. package/dist/ui/chip.d.ts.map +1 -1
  176. package/dist/ui/chip.js +35 -36
  177. package/dist/ui/code.js +13 -13
  178. package/dist/ui/collapsible.d.ts +2 -1
  179. package/dist/ui/collapsible.js +1 -0
  180. package/dist/ui/combobox.d.ts +1 -0
  181. package/dist/ui/combobox.js +2 -1
  182. package/dist/ui/context-menu.d.ts +2 -1
  183. package/dist/ui/context-menu.js +2 -1
  184. package/dist/ui/data-table-toolbar.d.ts +1 -0
  185. package/dist/ui/data-table-toolbar.js +1 -0
  186. package/dist/ui/data-table.d.ts +1 -0
  187. package/dist/ui/data-table.d.ts.map +1 -1
  188. package/dist/ui/data-table.js +79 -78
  189. package/dist/ui/dialog.d.ts +2 -1
  190. package/dist/ui/dialog.js +1 -0
  191. package/dist/ui/dropdown-menu.d.ts +2 -1
  192. package/dist/ui/dropdown-menu.js +23 -22
  193. package/dist/ui/file-upload.d.ts +1 -0
  194. package/dist/ui/file-upload.js +60 -59
  195. package/dist/ui/form.d.ts +1 -0
  196. package/dist/ui/form.js +1 -0
  197. package/dist/ui/hover-card.d.ts +2 -1
  198. package/dist/ui/hover-card.js +1 -0
  199. package/dist/ui/icon-button.d.ts +1 -0
  200. package/dist/ui/icon-button.d.ts.map +1 -1
  201. package/dist/ui/icon-button.js +1 -0
  202. package/dist/ui/index.d.ts +18 -0
  203. package/dist/ui/index.d.ts.map +1 -1
  204. package/dist/ui/index.js +1 -0
  205. package/dist/ui/input-otp.d.ts +1 -0
  206. package/dist/ui/input-otp.js +2 -1
  207. package/dist/ui/input.d.ts +2 -1
  208. package/dist/ui/input.d.ts.map +1 -1
  209. package/dist/ui/input.js +1 -0
  210. package/dist/ui/label.d.ts +2 -1
  211. package/dist/ui/label.js +1 -0
  212. package/dist/ui/lib/slot.d.ts +1 -0
  213. package/dist/ui/lib/use-reduced-motion.d.ts +1 -0
  214. package/dist/ui/lib/use-reduced-motion.js +1 -0
  215. package/dist/ui/lib/use-ripple.d.ts +1 -0
  216. package/dist/ui/lib/use-ripple.js +1 -0
  217. package/dist/ui/link.d.ts +1 -0
  218. package/dist/ui/link.js +1 -0
  219. package/dist/ui/menubar.d.ts +2 -1
  220. package/dist/ui/menubar.js +23 -22
  221. package/dist/ui/navigation-menu.d.ts +2 -1
  222. package/dist/ui/navigation-menu.js +7 -6
  223. package/dist/ui/number-input.d.ts +1 -0
  224. package/dist/ui/number-input.js +2 -1
  225. package/dist/ui/pagination.d.ts +1 -0
  226. package/dist/ui/pagination.js +1 -0
  227. package/dist/ui/popover.d.ts +2 -1
  228. package/dist/ui/popover.js +1 -0
  229. package/dist/ui/progress.d.ts +2 -1
  230. package/dist/ui/progress.js +1 -0
  231. package/dist/ui/radio.d.ts +2 -1
  232. package/dist/ui/radio.js +1 -0
  233. package/dist/ui/search-input.d.ts +6 -5
  234. package/dist/ui/search-input.d.ts.map +1 -1
  235. package/dist/ui/search-input.js +11 -10
  236. package/dist/ui/segmented-control.d.ts +1 -0
  237. package/dist/ui/segmented-control.d.ts.map +1 -1
  238. package/dist/ui/segmented-control.js +4 -4
  239. package/dist/ui/select.d.ts +2 -1
  240. package/dist/ui/select.js +3 -2
  241. package/dist/ui/separator.d.ts +2 -1
  242. package/dist/ui/separator.js +1 -0
  243. package/dist/ui/sheet.d.ts +2 -1
  244. package/dist/ui/sheet.js +1 -0
  245. package/dist/ui/sidebar.d.ts +1 -0
  246. package/dist/ui/sidebar.js +53 -52
  247. package/dist/ui/slider.d.ts +2 -1
  248. package/dist/ui/slider.js +1 -0
  249. package/dist/ui/stack.d.ts +2 -2
  250. package/dist/ui/stack.d.ts.map +1 -1
  251. package/dist/ui/stack.js +51 -21
  252. package/dist/ui/stat-card.d.ts +4 -1
  253. package/dist/ui/stat-card.d.ts.map +1 -1
  254. package/dist/ui/stat-card.js +22 -21
  255. package/dist/ui/stepper.d.ts +1 -0
  256. package/dist/ui/stepper.js +26 -25
  257. package/dist/ui/switch.d.ts +2 -1
  258. package/dist/ui/switch.js +1 -0
  259. package/dist/ui/table.js +12 -12
  260. package/dist/ui/tabs.d.ts +2 -1
  261. package/dist/ui/tabs.js +1 -0
  262. package/dist/ui/text.d.ts +1 -1
  263. package/dist/ui/text.d.ts.map +1 -1
  264. package/dist/ui/textarea.d.ts +1 -0
  265. package/dist/ui/textarea.d.ts.map +1 -1
  266. package/dist/ui/textarea.js +2 -0
  267. package/dist/ui/toast.d.ts +2 -1
  268. package/dist/ui/toast.js +2 -1
  269. package/dist/ui/toaster.d.ts +1 -0
  270. package/dist/ui/toaster.js +1 -0
  271. package/dist/ui/toggle-group.d.ts +2 -1
  272. package/dist/ui/toggle-group.js +1 -0
  273. package/dist/ui/toggle.d.ts +2 -1
  274. package/dist/ui/toggle.js +1 -0
  275. package/dist/ui/tooltip.d.ts +2 -1
  276. package/dist/ui/tooltip.js +1 -0
  277. package/dist/ui/transitions.d.ts +1 -0
  278. package/dist/ui/transitions.js +1 -0
  279. package/dist/ui/tree-view/index.d.ts +1 -0
  280. package/dist/ui/tree-view/tree-item.d.ts +1 -0
  281. package/dist/ui/tree-view/tree-item.js +2 -1
  282. package/dist/ui/tree-view/tree-view.d.ts +1 -0
  283. package/dist/ui/tree-view/tree-view.js +1 -0
  284. package/dist/ui/tree-view/use-tree.d.ts +1 -0
  285. package/dist/ui/tree-view/use-tree.js +1 -0
  286. package/package.json +97 -24
@@ -1,24 +1,26 @@
1
- import { jsxs as a, Fragment as u, jsx as t } from "react/jsx-runtime";
2
- import * as v from "react";
3
- import { useState as N } from "react";
4
- import f from "next/link";
5
- import { IconX as g, IconDots as y } from "@tabler/icons-react";
1
+ "use client";
2
+ import { jsxs as a, Fragment as v, jsx as t } from "react/jsx-runtime";
3
+ import * as N from "react";
4
+ import { useState as g } from "react";
5
+ import { useLink as f } from "./link-context.js";
6
+ import { IconX as y, IconDots as w } from "@tabler/icons-react";
6
7
  import { cn as s } from "../ui/lib/utils.js";
7
- function w({
8
+ function k({
8
9
  item: r,
9
- isActive: l,
10
- onClick: n
10
+ isActive: o,
11
+ onClick: d
11
12
  }) {
13
+ const i = f();
12
14
  return /* @__PURE__ */ t(
13
- f,
15
+ i,
14
16
  {
15
17
  href: r.href,
16
- onClick: n,
18
+ onClick: d,
17
19
  "aria-label": r.title,
18
- "aria-current": l ? "page" : void 0,
20
+ "aria-current": o ? "page" : void 0,
19
21
  className: s(
20
22
  "flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm",
21
- l ? "font-semibold text-interactive" : "text-text-helper"
23
+ o ? "font-semibold text-interactive" : "text-text-helper"
22
24
  ),
23
25
  children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
24
26
  /* @__PURE__ */ t(
@@ -26,7 +28,7 @@ function w({
26
28
  {
27
29
  className: s(
28
30
  "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-opacity duration-slow-01",
29
- l ? "opacity-100" : "opacity-0"
31
+ o ? "opacity-100" : "opacity-0"
30
32
  ),
31
33
  "aria-hidden": "true"
32
34
  }
@@ -37,28 +39,28 @@ function w({
37
39
  }
38
40
  );
39
41
  }
40
- const k = v.forwardRef(
42
+ const M = N.forwardRef(
41
43
  ({
42
44
  currentPath: r = "/",
43
- user: l,
44
- primaryItems: n = [],
45
- moreItems: d = [],
45
+ user: o,
46
+ primaryItems: d = [],
47
+ moreItems: i = [],
46
48
  className: p,
47
49
  ...x
48
50
  }, h) => {
49
- const [i, o] = N(!1), c = (e, b = !1) => b || e === "/" ? r === e : r.startsWith(e), m = d.some(
51
+ const b = f(), [l, n] = g(!1), c = (e, u = !1) => u || e === "/" ? r === e : r.startsWith(e), m = i.some(
50
52
  (e) => c(e.href, e.exact)
51
53
  );
52
- return l ? /* @__PURE__ */ a(u, { children: [
53
- i && /* @__PURE__ */ a(
54
+ return o ? /* @__PURE__ */ a(v, { children: [
55
+ l && /* @__PURE__ */ a(
54
56
  "div",
55
57
  {
56
58
  role: "button",
57
59
  tabIndex: 0,
58
60
  className: "fixed inset-0 z-overlay md:hidden",
59
- onClick: () => o(!1),
61
+ onClick: () => n(!1),
60
62
  onKeyDown: (e) => {
61
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), o(!1));
63
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n(!1));
62
64
  },
63
65
  children: [
64
66
  /* @__PURE__ */ t("div", { className: "absolute inset-0 bg-overlay" }),
@@ -74,18 +76,18 @@ const k = v.forwardRef(
74
76
  /* @__PURE__ */ t(
75
77
  "button",
76
78
  {
77
- onClick: () => o(!1),
79
+ onClick: () => n(!1),
78
80
  "aria-label": "Close more menu",
79
81
  className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-layer-02",
80
- children: /* @__PURE__ */ t(g, { className: "h-ico-sm w-ico-sm text-text-secondary", "aria-hidden": "true" })
82
+ children: /* @__PURE__ */ t(y, { className: "h-ico-sm w-ico-sm text-text-secondary", "aria-hidden": "true" })
81
83
  }
82
84
  )
83
85
  ] }),
84
- /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: d.map((e) => /* @__PURE__ */ a(
85
- f,
86
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: i.map((e) => /* @__PURE__ */ a(
87
+ b,
86
88
  {
87
89
  href: e.href,
88
- onClick: () => o(!1),
90
+ onClick: () => n(!1),
89
91
  className: s(
90
92
  "flex flex-col items-center gap-ds-02b rounded-ds-xl p-ds-04 text-ds-sm transition-colors",
91
93
  c(e.href, e.exact) ? "bg-layer-02 text-interactive" : "text-text-helper hover:bg-layer-02"
@@ -114,23 +116,24 @@ const k = v.forwardRef(
114
116
  p
115
117
  ),
116
118
  children: [
117
- n.map((e) => /* @__PURE__ */ t(
118
- w,
119
+ d.map((e) => /* @__PURE__ */ t(
120
+ k,
119
121
  {
120
122
  item: e,
121
123
  isActive: c(e.href, e.exact)
122
124
  },
123
125
  e.href
124
126
  )),
125
- d.length > 0 && /* @__PURE__ */ t(
127
+ i.length > 0 && /* @__PURE__ */ t(
126
128
  "button",
127
129
  {
128
- onClick: () => o(!i),
130
+ type: "button",
131
+ onClick: () => n(!l),
129
132
  "aria-label": "More navigation options",
130
- "aria-expanded": i,
133
+ "aria-expanded": l,
131
134
  className: s(
132
135
  "flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm",
133
- i || m ? "font-semibold text-interactive" : "text-text-helper"
136
+ l || m ? "font-semibold text-interactive" : "text-text-helper"
134
137
  ),
135
138
  children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
136
139
  /* @__PURE__ */ t(
@@ -138,12 +141,12 @@ const k = v.forwardRef(
138
141
  {
139
142
  className: s(
140
143
  "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-opacity duration-slow-01",
141
- i || m ? "opacity-100" : "opacity-0"
144
+ l || m ? "opacity-100" : "opacity-0"
142
145
  ),
143
146
  "aria-hidden": "true"
144
147
  }
145
148
  ),
146
- /* @__PURE__ */ t("div", { className: "p-ds-03", children: /* @__PURE__ */ t(y, { className: "h-ico-md w-ico-md", "aria-hidden": "true" }) }),
149
+ /* @__PURE__ */ t("div", { className: "p-ds-03", children: /* @__PURE__ */ t(w, { className: "h-ico-md w-ico-md", "aria-hidden": "true" }) }),
147
150
  /* @__PURE__ */ t("span", { className: "text-center", children: "More" })
148
151
  ] })
149
152
  }
@@ -154,7 +157,7 @@ const k = v.forwardRef(
154
157
  ] }) : null;
155
158
  }
156
159
  );
157
- k.displayName = "BottomNavbar";
160
+ M.displayName = "BottomNavbar";
158
161
  export {
159
- k as BottomNavbar
162
+ M as BottomNavbar
160
163
  };
@@ -1,7 +1,19 @@
1
+ "use client";
2
+ /**
3
+ * @module @devalok/shilp-sutra/shell
4
+ *
5
+ * Application shell components: sidebar, top bar, bottom nav, notifications, and command palette.
6
+ * All shell components require client-side React ("use client").
7
+ *
8
+ * @example
9
+ * import { AppSidebar } from '@devalok/shilp-sutra/shell/sidebar'
10
+ * import { TopBar } from '@devalok/shilp-sutra/shell/top-bar'
11
+ */
12
+ export { LinkProvider, useLink } from './link-context';
1
13
  export { AppSidebar, type NavItem, type NavGroup, type SidebarUser, type AppSidebarProps, } from './sidebar';
2
14
  export { TopBar, type TopBarUser, type TopBarProps, } from './top-bar';
3
15
  export { BottomNavbar, type BottomNavItem, type BottomNavbarUser, type BottomNavbarProps, } from './bottom-navbar';
4
16
  export { NotificationCenter, type Notification, type NotificationCenterProps, } from './notification-center';
5
- export { default as NotificationPreferences, type NotificationPreference, type NotificationProject, type NotificationPreferencesProps, } from './notification-preferences';
6
- export { default as AppCommandPalette, type SearchResult, type AppCommandPaletteUser, type AppCommandPaletteProps, } from './app-command-palette';
17
+ export { NotificationPreferences, type NotificationPreference, type NotificationProject, type NotificationPreferencesProps, } from './notification-preferences';
18
+ export { AppCommandPalette, type SearchResult, type AppCommandPaletteUser, type AppCommandPaletteProps, } from './app-command-palette';
7
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,OAAO,IAAI,uBAAuB,EAClC,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAEtD,OAAO,EACL,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,MAAM,EACN,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,uBAAuB,GAC7B,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,GAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EACL,iBAAiB,EACjB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAA"}
@@ -1,14 +1,18 @@
1
- import { AppSidebar as e } from "./sidebar.js";
2
- import { TopBar as a } from "./top-bar.js";
3
- import { BottomNavbar as p } from "./bottom-navbar.js";
4
- import { NotificationCenter as i } from "./notification-center.js";
5
- import { default as n } from "./notification-preferences.js";
6
- import { default as c } from "./app-command-palette.js";
1
+ "use client";
2
+ import { LinkProvider as e, useLink as t } from "./link-context.js";
3
+ import { AppSidebar as f } from "./sidebar.js";
4
+ import { TopBar as m } from "./top-bar.js";
5
+ import { BottomNavbar as n } from "./bottom-navbar.js";
6
+ import { NotificationCenter as c } from "./notification-center.js";
7
+ import { NotificationPreferences as N } from "./notification-preferences.js";
8
+ import { AppCommandPalette as b } from "./app-command-palette.js";
7
9
  export {
8
- c as AppCommandPalette,
9
- e as AppSidebar,
10
- p as BottomNavbar,
11
- i as NotificationCenter,
12
- n as NotificationPreferences,
13
- a as TopBar
10
+ b as AppCommandPalette,
11
+ f as AppSidebar,
12
+ n as BottomNavbar,
13
+ e as LinkProvider,
14
+ c as NotificationCenter,
15
+ N as NotificationPreferences,
16
+ m as TopBar,
17
+ t as useLink
14
18
  };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ type LinkComponent = React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & {
4
+ href: string;
5
+ } & React.RefAttributes<HTMLAnchorElement>>;
6
+ export declare function LinkProvider({ component, children, }: {
7
+ component: LinkComponent;
8
+ children: React.ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export declare function useLink(): LinkComponent;
11
+ export {};
12
+ //# sourceMappingURL=link-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link-context.d.ts","sourceRoot":"","sources":["../../src/shell/link-context.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,aAAa,GAAG,KAAK,CAAC,yBAAyB,CAClD,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAC1G,CAAA;AAWD,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,aAAa,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,2CAEA;AAED,wBAAgB,OAAO,kBAEtB"}
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as r } from "react/jsx-runtime";
3
+ import * as n from "react";
4
+ const o = n.forwardRef(({ href: t, ...e }, a) => /* @__PURE__ */ r("a", { ref: a, href: t, ...e }));
5
+ o.displayName = "DefaultLink";
6
+ const i = n.createContext(o);
7
+ function f({
8
+ component: t,
9
+ children: e
10
+ }) {
11
+ return /* @__PURE__ */ r(i.Provider, { value: t, children: e });
12
+ }
13
+ function s() {
14
+ return n.useContext(i);
15
+ }
16
+ export {
17
+ f as LinkProvider,
18
+ s as useLink
19
+ };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /**
2
3
  * NotificationCenter -- Popover-based notification panel.
3
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACnC;AAED,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,uCAAuC;IACvC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,GAAG,IAAI,CAAA;IACpE,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgLD,QAAA,MAAM,kBAAkB,mGA2KvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAmB9B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACnC;AAED,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,uCAAuC;IACvC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,GAAG,IAAI,CAAA;IACpE,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgLD,QAAA,MAAM,kBAAkB,mGA4KvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,13 +1,14 @@
1
+ "use client";
1
2
  import { jsxs as s, jsx as t, Fragment as S } from "react/jsx-runtime";
2
- import * as k from "react";
3
- import { useRef as $, useCallback as f } from "react";
3
+ import * as $ from "react";
4
+ import { useRef as k, useCallback as f } from "react";
4
5
  import { Popover as P, PopoverTrigger as Y, PopoverContent as _ } from "../ui/popover.js";
5
6
  import { Tooltip as Q, TooltipTrigger as U, TooltipContent as B } from "../ui/tooltip.js";
6
7
  import { IconBell as G, IconChecks as H, IconInbox as K } from "@tabler/icons-react";
7
8
  import { cn as x } from "../ui/lib/utils.js";
8
9
  function L(e) {
9
- const l = Date.now(), a = new Date(e).getTime(), d = l - a, c = Math.floor(d / 1e3), o = Math.floor(c / 60), n = Math.floor(o / 60), i = Math.floor(n / 24);
10
- return c < 60 ? "just now" : o < 60 ? `${o}m ago` : n < 24 ? `${n}h ago` : i < 7 ? `${i}d ago` : new Date(e).toLocaleDateString(void 0, {
10
+ const l = Date.now(), a = new Date(e).getTime(), d = l - a, c = Math.floor(d / 1e3), i = Math.floor(c / 60), n = Math.floor(i / 60), m = Math.floor(n / 24);
11
+ return c < 60 ? "just now" : i < 60 ? `${i}m ago` : n < 24 ? `${n}h ago` : m < 7 ? `${m}d ago` : new Date(e).toLocaleDateString(void 0, {
11
12
  day: "numeric",
12
13
  month: "short"
13
14
  });
@@ -67,7 +68,7 @@ function z({
67
68
  "span",
68
69
  {
69
70
  className: x(
70
- "h-2 w-2 rounded-ds-full",
71
+ "h-[8px] w-[8px] rounded-ds-full",
71
72
  g[e.tier] || g.INFO,
72
73
  e.isRead && "opacity-[0.38]"
73
74
  )
@@ -93,41 +94,41 @@ function z({
93
94
  ] })
94
95
  ] })
95
96
  ] }),
96
- !e.isRead && /* @__PURE__ */ t("div", { className: "mt-ds-02b shrink-0", children: /* @__PURE__ */ t("span", { className: "block h-2 w-2 rounded-ds-full bg-interactive" }) })
97
+ !e.isRead && /* @__PURE__ */ t("div", { className: "mt-ds-02b shrink-0", children: /* @__PURE__ */ t("span", { className: "block h-[8px] w-[8px] rounded-ds-full bg-interactive" }) })
97
98
  ]
98
99
  }
99
100
  );
100
101
  }
101
- const J = k.forwardRef(
102
+ const J = $.forwardRef(
102
103
  ({
103
104
  notifications: e = [],
104
105
  unreadCount: l,
105
106
  open: a,
106
107
  onOpenChange: d,
107
108
  isLoading: c = !1,
108
- hasMore: o = !1,
109
+ hasMore: i = !1,
109
110
  onFetchMore: n,
110
- onMarkRead: i,
111
+ onMarkRead: m,
111
112
  onMarkAllRead: b,
112
113
  onNavigate: h,
113
114
  getNotificationRoute: w,
114
115
  className: v,
115
116
  ...j
116
117
  }, T) => {
117
- const y = $(null), m = l ?? e.filter((r) => !r.isRead).length, I = w ?? q, R = f(
118
+ const y = k(null), o = l ?? e.filter((r) => !r.isRead).length, I = w ?? q, R = f(
118
119
  (r) => {
119
120
  d == null || d(!1), h == null || h(r);
120
121
  },
121
122
  [h, d]
122
123
  ), E = f(
123
124
  (r) => {
124
- i == null || i(r);
125
+ m == null || m(r);
125
126
  },
126
- [i]
127
+ [m]
127
128
  ), C = f(() => {
128
129
  const r = y.current;
129
- !r || c || !o || r.scrollTop + r.clientHeight >= r.scrollHeight - 50 && (n == null || n());
130
- }, [c, o, n]), D = e.reduce(
130
+ !r || c || !i || r.scrollTop + r.clientHeight >= r.scrollHeight - 50 && (n == null || n());
131
+ }, [c, i, n]), D = e.reduce(
131
132
  (r, u) => {
132
133
  const p = O(u.createdAt);
133
134
  return r[p] || (r[p] = []), r[p].push(u), r;
@@ -141,13 +142,14 @@ const J = k.forwardRef(
141
142
  {
142
143
  ...j,
143
144
  ref: T,
145
+ "aria-label": o > 0 ? `Notifications, ${o} unread` : "Notifications",
144
146
  className: x(
145
147
  "relative flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-border bg-layer-02 text-text-secondary transition-colors hover:bg-layer-03",
146
148
  v
147
149
  ),
148
150
  children: [
149
- /* @__PURE__ */ t(G, { className: "h-ico-sm w-ico-sm" }),
150
- m > 0 && /* @__PURE__ */ t("span", { className: "absolute -right-ds-01 -top-ds-01 flex h-4 min-w-4 items-center justify-center rounded-ds-full bg-interactive px-ds-02 text-ds-xs font-semibold text-text-on-color", children: m > 99 ? "99+" : m })
151
+ /* @__PURE__ */ t(G, { className: "h-ico-sm w-ico-sm", "aria-hidden": "true" }),
152
+ o > 0 && /* @__PURE__ */ t("span", { className: "absolute -right-ds-01 -top-ds-01 flex h-4 min-w-4 items-center justify-center rounded-ds-full bg-interactive px-ds-02 text-ds-xs font-semibold text-text-on-color", children: o > 99 ? "99+" : o })
151
153
  ]
152
154
  }
153
155
  ) }) }),
@@ -163,9 +165,9 @@ const J = k.forwardRef(
163
165
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-b border-border px-ds-05 py-ds-04", children: [
164
166
  /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
165
167
  /* @__PURE__ */ t("h3", { className: "text-ds-md font-semibold text-text-primary", children: "Notifications" }),
166
- m > 0 && /* @__PURE__ */ t("span", { className: "flex h-5 min-w-5 items-center justify-center rounded-ds-full bg-interactive/10 px-ds-02b text-ds-sm font-semibold text-interactive", children: m })
168
+ o > 0 && /* @__PURE__ */ t("span", { className: "flex h-5 min-w-5 items-center justify-center rounded-ds-full bg-interactive/10 px-ds-02b text-ds-sm font-semibold text-interactive", children: o })
167
169
  ] }),
168
- m > 0 && b && /* @__PURE__ */ s(
170
+ o > 0 && b && /* @__PURE__ */ s(
169
171
  "button",
170
172
  {
171
173
  type: "button",
@@ -185,7 +187,7 @@ const J = k.forwardRef(
185
187
  onScroll: C,
186
188
  className: "max-h-[420px] overflow-y-auto",
187
189
  children: [
188
- e.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center px-ds-05 py-12", children: [
190
+ e.length === 0 ? /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center px-ds-05 py-ds-09", children: [
189
191
  /* @__PURE__ */ t("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-layer-02", children: /* @__PURE__ */ t(K, { className: "h-ico-lg w-ico-lg text-text-placeholder" }) }),
190
192
  /* @__PURE__ */ t("p", { className: "mt-ds-04 text-ds-md text-text-placeholder", children: "No notifications yet" }),
191
193
  /* @__PURE__ */ t("p", { className: "mt-ds-02 text-ds-sm text-text-placeholder", children: "You're all caught up!" })
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  export interface NotificationPreference {
2
3
  id: string;
3
4
  userId?: string;
@@ -33,9 +34,8 @@ export interface NotificationPreferencesProps {
33
34
  /** Additional className */
34
35
  className?: string;
35
36
  }
36
- declare function NotificationPreferences({ preferences, projects, isLoading, onSave, onToggleMute, onUpdateTier, onDelete, className, }: NotificationPreferencesProps): import("react/jsx-runtime").JSX.Element;
37
- declare namespace NotificationPreferences {
37
+ export declare function NotificationPreferences({ preferences, projects, isLoading, onSave, onToggleMute, onUpdateTier, onDelete, className, }: NotificationPreferencesProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare namespace NotificationPreferences {
38
39
  var displayName: string;
39
40
  }
40
- export default NotificationPreferences;
41
41
  //# sourceMappingURL=notification-preferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAiCA,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,4BAA4B;IAC3C,+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,iBAAwB,uBAAuB,CAAC,EAC9C,WAAgB,EAChB,QAAa,EACb,SAAiB,EACjB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,GACV,EAAE,4BAA4B,2CA6O9B;kBAtPuB,uBAAuB;;;eAAvB,uBAAuB"}
1
+ {"version":3,"file":"notification-preferences.d.ts","sourceRoot":"","sources":["../../src/shell/notification-preferences.tsx"],"names":[],"mappings":"AAiCA,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,4BAA4B;IAC3C,+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,wBAAgB,uBAAuB,CAAC,EACtC,WAAgB,EAChB,QAAa,EACb,SAAiB,EACjB,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,GACV,EAAE,4BAA4B,2CA6O9B;yBAtPe,uBAAuB"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs as t, Fragment as B, jsx as e } from "react/jsx-runtime";
2
3
  import { useState as c } from "react";
3
4
  import { Button as b } from "../ui/button.js";
@@ -20,12 +21,12 @@ function te({
20
21
  projects: v = [],
21
22
  isLoading: L = !1,
22
23
  onSave: C,
23
- onToggleMute: u,
24
- onUpdateTier: x,
24
+ onToggleMute: x,
25
+ onUpdateTier: u,
25
26
  onDelete: p,
26
27
  className: T
27
28
  }) {
28
- const [E, a] = c(!1), [N, g] = c("global"), [I, w] = c("IN_APP"), [y, A] = c("INFO"), [P, j] = c(!1), [S, O] = c(!1), R = async () => {
29
+ const [E, s] = c(!1), [N, g] = c("global"), [I, w] = c("IN_APP"), [y, A] = c("INFO"), [P, j] = c(!1), [S, O] = c(!1), R = async () => {
29
30
  if (C) {
30
31
  O(!0);
31
32
  try {
@@ -34,7 +35,7 @@ function te({
34
35
  channel: I,
35
36
  minTier: y,
36
37
  muted: P
37
- }), a(!1), F();
38
+ }), s(!1), F();
38
39
  } catch (l) {
39
40
  console.error("[Preferences] Failed to save:", l);
40
41
  } finally {
@@ -45,7 +46,7 @@ function te({
45
46
  g("global"), w("IN_APP"), A("INFO"), j(!1);
46
47
  }, H = (l) => {
47
48
  if (!l) return "Global (all projects)";
48
- const n = v.find((s) => s.id === l);
49
+ const n = v.find((a) => a.id === l);
49
50
  return (n == null ? void 0 : n.title) || "Unknown project";
50
51
  };
51
52
  return /* @__PURE__ */ t(B, { children: [
@@ -57,7 +58,7 @@ function te({
57
58
  {
58
59
  size: "sm",
59
60
  variant: "secondary",
60
- onClick: () => a(!0),
61
+ onClick: () => s(!0),
61
62
  children: [
62
63
  /* @__PURE__ */ e(Z, { className: "mr-ds-02b h-ico-sm w-ico-sm" }),
63
64
  "Add Rule"
@@ -66,7 +67,7 @@ function te({
66
67
  )
67
68
  ] }),
68
69
  /* @__PURE__ */ e(Y, { children: L ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md animate-spin rounded-ds-full border-2 border-border border-t-interactive" }) }) : f.length === 0 ? /* @__PURE__ */ e("div", { className: "py-ds-07 text-center", children: /* @__PURE__ */ e("p", { className: "text-ds-md text-text-placeholder", children: "No custom preferences set. All notifications are delivered by default." }) }) : /* @__PURE__ */ e("div", { className: "flex flex-col", children: f.map((l, n) => {
69
- const s = _[l.channel] || _.IN_APP, M = s.icon;
70
+ const a = _[l.channel] || _.IN_APP, M = a.icon;
70
71
  return /* @__PURE__ */ t(
71
72
  "div",
72
73
  {
@@ -77,14 +78,14 @@ function te({
77
78
  children: [
78
79
  /* @__PURE__ */ e("div", { className: "flex h-ds-sm w-ds-sm shrink-0 items-center justify-center rounded-ds-lg bg-layer-02", children: /* @__PURE__ */ e(M, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
79
80
  /* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: [
80
- /* @__PURE__ */ e("p", { className: "text-ds-md font-medium text-text-primary", children: s.label }),
81
+ /* @__PURE__ */ e("p", { className: "text-ds-md font-medium text-text-primary", children: a.label }),
81
82
  /* @__PURE__ */ e("p", { className: "text-ds-sm text-text-placeholder", children: H(l.projectId) })
82
83
  ] }),
83
84
  /* @__PURE__ */ t(
84
85
  d,
85
86
  {
86
87
  value: l.minTier,
87
- onValueChange: (r) => x == null ? void 0 : x(l, r),
88
+ onValueChange: (r) => u == null ? void 0 : u(l, r),
88
89
  children: [
89
90
  /* @__PURE__ */ e(o, { className: "h-ds-xs-plus w-[130px] text-ds-sm", children: /* @__PURE__ */ e(m, {}) }),
90
91
  /* @__PURE__ */ e(h, { children: Object.entries(G).map(([r, V]) => /* @__PURE__ */ e(i, { value: r, children: V }, r)) })
@@ -97,7 +98,7 @@ function te({
97
98
  k,
98
99
  {
99
100
  checked: !l.muted,
100
- onCheckedChange: () => u == null ? void 0 : u(l)
101
+ onCheckedChange: () => x == null ? void 0 : x(l)
101
102
  }
102
103
  )
103
104
  ] }),
@@ -116,7 +117,7 @@ function te({
116
117
  );
117
118
  }) }) })
118
119
  ] }),
119
- /* @__PURE__ */ e(D, { open: E, onOpenChange: a, children: /* @__PURE__ */ t(z, { className: "sm:max-w-md", children: [
120
+ /* @__PURE__ */ e(D, { open: E, onOpenChange: s, children: /* @__PURE__ */ t(z, { className: "sm:max-w-md", children: [
120
121
  /* @__PURE__ */ t(q, { children: [
121
122
  /* @__PURE__ */ e(J, { children: "Add Notification Rule" }),
122
123
  /* @__PURE__ */ e(K, { children: "Customize how you receive notifications for a specific channel and project." })
@@ -159,7 +160,7 @@ function te({
159
160
  {
160
161
  variant: "ghost",
161
162
  onClick: () => {
162
- a(!1), F();
163
+ s(!1), F();
163
164
  },
164
165
  children: "Cancel"
165
166
  }
@@ -179,5 +180,5 @@ function te({
179
180
  }
180
181
  te.displayName = "NotificationPreferences";
181
182
  export {
182
- te as default
183
+ te as NotificationPreferences
183
184
  };
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  /**
2
3
  * AppSidebar -- Application-layer sidebar built on the Sidebar primitive.
3
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACjD,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpD,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAqCD,QAAA,MAAM,UAAU,wFA+Gf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACjD,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpD,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsCD,QAAA,MAAM,UAAU,wFAgHf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}