@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
@@ -114,7 +114,7 @@ class ae {
114
114
  ];
115
115
  }, this.create = (o) => {
116
116
  var e;
117
- const { message: s, ...C } = o, u = typeof (o == null ? void 0 : o.id) == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : xt++, g = this.toasts.find((b) => b.id === u), _ = o.dismissible === void 0 ? !0 : o.dismissible;
117
+ const { message: s, ...C } = o, u = typeof o?.id == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : xt++, g = this.toasts.find((b) => b.id === u), _ = o.dismissible === void 0 ? !0 : o.dismissible;
118
118
  return this.dismissedToasts.has(u) && this.dismissedToasts.delete(u), g ? this.toasts = this.toasts.map((b) => b.id === u ? (this.publish({
119
119
  ...b,
120
120
  ...o,
@@ -245,7 +245,7 @@ class ae {
245
245
  unwrap: b
246
246
  });
247
247
  }, this.custom = (o, e) => {
248
- const s = (e == null ? void 0 : e.id) || xt++;
248
+ const s = e?.id || xt++;
249
249
  return this.create({
250
250
  jsx: o(s),
251
251
  id: s,
@@ -255,7 +255,7 @@ class ae {
255
255
  }
256
256
  }
257
257
  const S = new ae(), oe = (r, o) => {
258
- const e = (o == null ? void 0 : o.id) || xt++;
258
+ const e = o?.id || xt++;
259
259
  return S.addToast({
260
260
  title: r,
261
261
  ...o,
@@ -375,11 +375,9 @@ const he = (r) => {
375
375
  at.current = at.current - k;
376
376
  }
377
377
  Nt.current = (/* @__PURE__ */ new Date()).getTime();
378
- })() : (() => {
379
- at.current !== 1 / 0 && (yt.current = (/* @__PURE__ */ new Date()).getTime(), n = setTimeout(() => {
380
- t.onAutoClose == null || t.onAutoClose.call(t, t), L();
381
- }, at.current));
382
- })(), () => clearTimeout(n);
378
+ })() : at.current !== 1 / 0 && (yt.current = (/* @__PURE__ */ new Date()).getTime(), n = setTimeout(() => {
379
+ t.onAutoClose == null || t.onAutoClose.call(t, t), L();
380
+ }, at.current)), () => clearTimeout(n);
383
381
  }, [
384
382
  X,
385
383
  O,
@@ -395,24 +393,24 @@ const he = (r) => {
395
393
  ]);
396
394
  function Ft() {
397
395
  var n;
398
- if (v != null && v.loading) {
396
+ if (v?.loading) {
399
397
  var h;
400
398
  return /* @__PURE__ */ a.createElement("div", {
401
- className: H(c == null ? void 0 : c.loader, t == null || (h = t.classNames) == null ? void 0 : h.loader, "sonner-loader"),
399
+ className: H(c?.loader, t == null || (h = t.classNames) == null ? void 0 : h.loader, "sonner-loader"),
402
400
  "data-visible": N === "loading"
403
401
  }, v.loading);
404
402
  }
405
403
  return /* @__PURE__ */ a.createElement(qt, {
406
- className: H(c == null ? void 0 : c.loader, t == null || (n = t.classNames) == null ? void 0 : n.loader),
404
+ className: H(c?.loader, t == null || (n = t.classNames) == null ? void 0 : n.loader),
407
405
  visible: N === "loading"
408
406
  });
409
407
  }
410
- const Vt = t.icon || (v == null ? void 0 : v[N]) || Wt(N);
408
+ const Vt = t.icon || v?.[N] || Wt(N);
411
409
  var Dt, Rt;
412
410
  return /* @__PURE__ */ a.createElement("li", {
413
411
  tabIndex: 0,
414
412
  ref: P,
415
- className: H(nt, zt, c == null ? void 0 : c.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, c == null ? void 0 : c.default, c == null ? void 0 : c[N], t == null || (e = t.classNames) == null ? void 0 : e[N]),
413
+ className: H(nt, zt, c?.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, c?.default, c?.[N], t == null || (e = t.classNames) == null ? void 0 : e[N]),
416
414
  "data-sonner-toast": "",
417
415
  "data-rich-colors": (Dt = t.richColors) != null ? Dt : gt,
418
416
  "data-styled": !(t.jsx || t.unstyled || x),
@@ -502,19 +500,19 @@ const he = (r) => {
502
500
  } : () => {
503
501
  L(), t.onDismiss == null || t.onDismiss.call(t, t);
504
502
  },
505
- className: H(c == null ? void 0 : c.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
506
- }, (Rt = v == null ? void 0 : v.close) != null ? Rt : te) : null, (N || t.icon || t.promise) && t.icon !== null && ((v == null ? void 0 : v[N]) !== null || t.icon) ? /* @__PURE__ */ a.createElement("div", {
503
+ className: H(c?.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
504
+ }, (Rt = v?.close) != null ? Rt : te) : null, (N || t.icon || t.promise) && t.icon !== null && (v?.[N] !== null || t.icon) ? /* @__PURE__ */ a.createElement("div", {
507
505
  "data-icon": "",
508
- className: H(c == null ? void 0 : c.icon, t == null || (C = t.classNames) == null ? void 0 : C.icon)
506
+ className: H(c?.icon, t == null || (C = t.classNames) == null ? void 0 : C.icon)
509
507
  }, t.promise || t.type === "loading" && !t.icon ? t.icon || Ft() : null, t.type !== "loading" ? Vt : null) : null, /* @__PURE__ */ a.createElement("div", {
510
508
  "data-content": "",
511
- className: H(c == null ? void 0 : c.content, t == null || (u = t.classNames) == null ? void 0 : u.content)
509
+ className: H(c?.content, t == null || (u = t.classNames) == null ? void 0 : u.content)
512
510
  }, /* @__PURE__ */ a.createElement("div", {
513
511
  "data-title": "",
514
- className: H(c == null ? void 0 : c.title, t == null || (g = t.classNames) == null ? void 0 : g.title)
512
+ className: H(c?.title, t == null || (g = t.classNames) == null ? void 0 : g.title)
515
513
  }, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ a.createElement("div", {
516
514
  "data-description": "",
517
- className: H(bt, Pt, c == null ? void 0 : c.description, t == null || (_ = t.classNames) == null ? void 0 : _.description)
515
+ className: H(bt, Pt, c?.description, t == null || (_ = t.classNames) == null ? void 0 : _.description)
518
516
  }, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ a.isValidElement(t.cancel) ? t.cancel : t.cancel && mt(t.cancel) ? /* @__PURE__ */ a.createElement("button", {
519
517
  "data-button": !0,
520
518
  "data-cancel": !0,
@@ -522,7 +520,7 @@ const he = (r) => {
522
520
  onClick: (n) => {
523
521
  mt(t.cancel) && G && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, n), L());
524
522
  },
525
- className: H(c == null ? void 0 : c.cancelButton, t == null || (b = t.classNames) == null ? void 0 : b.cancelButton)
523
+ className: H(c?.cancelButton, t == null || (b = t.classNames) == null ? void 0 : b.cancelButton)
526
524
  }, t.cancel.label) : null, /* @__PURE__ */ a.isValidElement(t.action) ? t.action : t.action && mt(t.action) ? /* @__PURE__ */ a.createElement("button", {
527
525
  "data-button": !0,
528
526
  "data-action": !0,
@@ -530,7 +528,7 @@ const he = (r) => {
530
528
  onClick: (n) => {
531
529
  mt(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, n), !n.defaultPrevented && L());
532
530
  },
533
- className: H(c == null ? void 0 : c.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
531
+ className: H(c?.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
534
532
  }, t.action.label) : null);
535
533
  };
536
534
  function It() {
@@ -715,20 +713,20 @@ const Ee = /* @__PURE__ */ a.forwardRef(function(o, e) {
715
713
  index: K,
716
714
  toast: f,
717
715
  defaultRichColors: O,
718
- duration: (lt = d == null ? void 0 : d.duration) != null ? lt : E,
719
- className: d == null ? void 0 : d.className,
720
- descriptionClassName: d == null ? void 0 : d.descriptionClassName,
716
+ duration: (lt = d?.duration) != null ? lt : E,
717
+ className: d?.className,
718
+ descriptionClassName: d?.descriptionClassName,
721
719
  invert: C,
722
720
  visibleToasts: U,
723
- closeButton: (dt = d == null ? void 0 : d.closeButton) != null ? dt : b,
721
+ closeButton: (dt = d?.closeButton) != null ? dt : b,
724
722
  interacting: rt,
725
723
  position: l,
726
- style: d == null ? void 0 : d.style,
727
- unstyled: d == null ? void 0 : d.unstyled,
728
- classNames: d == null ? void 0 : d.classNames,
729
- cancelButtonStyle: d == null ? void 0 : d.cancelButtonStyle,
730
- actionButtonStyle: d == null ? void 0 : d.actionButtonStyle,
731
- closeButtonAriaLabel: d == null ? void 0 : d.closeButtonAriaLabel,
724
+ style: d?.style,
725
+ unstyled: d?.unstyled,
726
+ classNames: d?.classNames,
727
+ cancelButtonStyle: d?.cancelButtonStyle,
728
+ actionButtonStyle: d?.actionButtonStyle,
729
+ closeButtonAriaLabel: d?.closeButtonAriaLabel,
732
730
  removeToast: it,
733
731
  toasts: Y.filter((q) => q.position == f.position),
734
732
  heights: nt.filter((q) => q.position == f.position),
@@ -1,22 +1,23 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
- import * as l from "react";
4
- import D from "react-markdown";
5
- import L from "remark-gfm";
3
+ import * as a from "react";
4
+ import L from "react-markdown";
5
+ import U from "remark-gfm";
6
6
  import { cn as p } from "../ui/lib/utils.js";
7
- import { springs as U, tweens as P } from "../ui/lib/motion.js";
7
+ import { springs as z, tweens as P } from "../ui/lib/motion.js";
8
8
  import { u as y } from "./motion-provider.js";
9
- import { Table as j, TableCaption as z, TableHeader as W, TableRow as X, TableHead as _, TableBody as $, TableCell as H } from "../ui/table.js";
10
- import { Badge as I } from "../ui/badge.js";
9
+ import { Table as j, TableCaption as W, TableHeader as X, TableRow as _, TableHead as $, TableBody as H, TableCell as O } from "../ui/table.js";
10
+ import { B as M } from "./badge-group.js";
11
11
  import { m as x } from "./framer.js";
12
- import { Button as C } from "../ui/button.js";
13
- import { Collapsible as O, CollapsibleTrigger as V, CollapsibleContent as F } from "../ui/collapsible.js";
12
+ import { Button as S } from "../ui/button.js";
13
+ import { Collapsible as V, CollapsibleTrigger as F, CollapsibleContent as G } from "../ui/collapsible.js";
14
14
  import { Alert as w } from "../ui/alert.js";
15
- import { IconCircle as G, IconCircleX as K, IconCircleCheck as q } from "@tabler/icons-react";
16
- import { Skeleton as J } from "../ui/skeleton.js";
17
- import { Separator as M } from "../ui/separator.js";
18
- import { StatCard as R } from "../ui/stat-card.js";
19
- const ge = l.memo(function({
15
+ import { IconCircle as K, IconCircleX as q, IconCircleCheck as J } from "@tabler/icons-react";
16
+ import { Icon as C } from "../ui/icon.js";
17
+ import { Skeleton as Q } from "../ui/skeleton.js";
18
+ import { Separator as R } from "../ui/separator.js";
19
+ import { StatCard as D } from "../ui/stat-card.js";
20
+ const ve = a.memo(function({
20
21
  data: r,
21
22
  confidence: t
22
23
  }) {
@@ -32,39 +33,39 @@ const ge = l.memo(function({
32
33
  "prose-strong:text-surface-fg",
33
34
  t === "low" && "border-l-2 border-warning-7 pl-3"
34
35
  ),
35
- children: /* @__PURE__ */ e(D, { remarkPlugins: [L], children: r.content })
36
+ children: /* @__PURE__ */ e(L, { remarkPlugins: [U], children: r.content })
36
37
  }
37
38
  );
38
39
  });
39
- function Q(i, r) {
40
+ function Y(s, r) {
40
41
  if (r.variant === "badge") {
41
- if (i && typeof i == "object" && "label" in i) {
42
- const t = i;
43
- return /* @__PURE__ */ e(I, { variant: "subtle", size: "sm", color: t.color, children: t.label });
42
+ if (s && typeof s == "object" && "label" in s) {
43
+ const t = s;
44
+ return /* @__PURE__ */ e(M, { variant: "subtle", size: "sm", color: t.color, children: t.label });
44
45
  }
45
- return /* @__PURE__ */ e(I, { variant: "subtle", size: "sm", children: String(i ?? "") });
46
+ return /* @__PURE__ */ e(M, { variant: "subtle", size: "sm", children: String(s ?? "") });
46
47
  }
47
- return String(i ?? "");
48
+ return String(s ?? "");
48
49
  }
49
- function Y(i, r, t) {
50
- return !r || !t ? i : [...i].sort((s, n) => {
51
- const c = s[r], a = n[r], m = String(c ?? ""), v = String(a ?? ""), f = Number(c), g = Number(a);
50
+ function Z(s, r, t) {
51
+ return !r || !t ? s : [...s].sort((c, n) => {
52
+ const l = c[r], i = n[r], m = String(l ?? ""), v = String(i ?? ""), f = Number(l), g = Number(i);
52
53
  if (!Number.isNaN(f) && !Number.isNaN(g))
53
54
  return t === "asc" ? f - g : g - f;
54
55
  const o = m.localeCompare(v);
55
56
  return t === "asc" ? o : -o;
56
57
  });
57
58
  }
58
- const xe = l.memo(function({
59
+ const ke = a.memo(function({
59
60
  data: r,
60
61
  confidence: t
61
62
  }) {
62
- const { reducedMotion: s } = y(), [n, c] = l.useState(null), [a, m] = l.useState(null), v = l.useCallback(
63
+ const { reducedMotion: c } = y(), [n, l] = a.useState(null), [i, m] = a.useState(null), v = a.useCallback(
63
64
  (o) => {
64
- r.sortable && (n !== o ? (c(o), m("asc")) : a === "asc" ? m("desc") : a === "desc" && (c(null), m(null)));
65
+ r.sortable && (n !== o ? (l(o), m("asc")) : i === "asc" ? m("desc") : i === "desc" && (l(null), m(null)));
65
66
  },
66
- [r.sortable, n, a]
67
- ), f = r.columns ?? [], g = Y(r.rows ?? [], n, a);
67
+ [r.sortable, n, i]
68
+ ), f = r.columns ?? [], g = Z(r.rows ?? [], n, i);
68
69
  return /* @__PURE__ */ e(
69
70
  "div",
70
71
  {
@@ -73,11 +74,11 @@ const xe = l.memo(function({
73
74
  t === "low" && "border-l-2 border-warning-7 pl-3"
74
75
  ),
75
76
  children: /* @__PURE__ */ d(j, { children: [
76
- r.caption && /* @__PURE__ */ e(z, { children: r.caption }),
77
- /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(X, { children: f.map((o) => {
78
- const h = n === o.key, k = h ? a === "asc" ? "ascending" : "descending" : void 0;
77
+ r.caption && /* @__PURE__ */ e(W, { children: r.caption }),
78
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(_, { children: f.map((o) => {
79
+ const h = n === o.key, k = h ? i === "asc" ? "ascending" : "descending" : void 0;
79
80
  return /* @__PURE__ */ e(
80
- _,
81
+ $,
81
82
  {
82
83
  className: p(
83
84
  o.variant === "number" && "text-right",
@@ -87,18 +88,18 @@ const xe = l.memo(function({
87
88
  "aria-sort": k,
88
89
  children: /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-1", children: [
89
90
  o.label,
90
- h && a === "asc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▲" }),
91
- h && a === "desc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▼" })
91
+ h && i === "asc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▲" }),
92
+ h && i === "desc" && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▼" })
92
93
  ] })
93
94
  },
94
95
  o.key
95
96
  );
96
97
  }) }) }),
97
- /* @__PURE__ */ e($, { children: g.map((o, h) => {
98
- const k = typeof o.id == "string" || typeof o.id == "number" ? String(o.id) : `row-${h}`, u = s ? "tr" : x.tr, N = s ? {} : {
98
+ /* @__PURE__ */ e(H, { children: g.map((o, h) => {
99
+ const k = typeof o.id == "string" || typeof o.id == "number" ? String(o.id) : `row-${h}`, u = c ? "tr" : x.tr, N = c ? {} : {
99
100
  initial: { opacity: 0, y: 6 },
100
101
  animate: { opacity: 1, y: 0 },
101
- transition: { ...U.responsive, delay: h * 0.03 }
102
+ transition: { ...z.responsive, delay: h * 0.03 }
102
103
  };
103
104
  return /* @__PURE__ */ e(
104
105
  u,
@@ -106,13 +107,13 @@ const xe = l.memo(function({
106
107
  className: "hover:bg-surface-raised-hover transition-colors",
107
108
  ...N,
108
109
  children: f.map((b) => /* @__PURE__ */ e(
109
- H,
110
+ O,
110
111
  {
111
112
  className: p(
112
113
  "text-ds-sm py-ds-02b px-ds-04",
113
114
  b.variant === "number" && "text-right tabular-nums font-medium"
114
115
  ),
115
- children: Q(o[b.key], b)
116
+ children: Y(o[b.key], b)
116
117
  },
117
118
  b.key
118
119
  ))
@@ -123,16 +124,16 @@ const xe = l.memo(function({
123
124
  ] })
124
125
  }
125
126
  );
126
- }), ve = l.memo(function({
127
+ }), Ne = a.memo(function({
127
128
  data: r,
128
129
  confidence: t,
129
- onAction: s
130
+ onAction: c
130
131
  }) {
131
- const n = l.useCallback(() => {
132
- s == null || s(r.actionId, "confirm");
133
- }, [r.actionId, s]), c = l.useCallback(() => {
134
- s == null || s(r.actionId, "cancel");
135
- }, [r.actionId, s]);
132
+ const n = a.useCallback(() => {
133
+ c?.(r.actionId, "confirm");
134
+ }, [r.actionId, c]), l = a.useCallback(() => {
135
+ c?.(r.actionId, "cancel");
136
+ }, [r.actionId, c]);
136
137
  return /* @__PURE__ */ d(
137
138
  "div",
138
139
  {
@@ -143,7 +144,7 @@ const xe = l.memo(function({
143
144
  r.description && /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mb-3", children: r.description }),
144
145
  /* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
145
146
  /* @__PURE__ */ e(
146
- C,
147
+ S,
147
148
  {
148
149
  variant: "solid",
149
150
  color: r.destructive ? "error" : void 0,
@@ -151,10 +152,10 @@ const xe = l.memo(function({
151
152
  children: r.label
152
153
  }
153
154
  ),
154
- /* @__PURE__ */ e(C, { variant: "ghost", onClick: c, children: "Cancel" })
155
+ /* @__PURE__ */ e(S, { variant: "ghost", onClick: l, children: "Cancel" })
155
156
  ] }),
156
- r.rationale && /* @__PURE__ */ d(O, { className: "mt-3", children: [
157
- /* @__PURE__ */ e(V, { asChild: !0, children: /* @__PURE__ */ e(
157
+ r.rationale && /* @__PURE__ */ d(V, { className: "mt-3", children: [
158
+ /* @__PURE__ */ e(F, { asChild: !0, children: /* @__PURE__ */ e(
158
159
  "button",
159
160
  {
160
161
  type: "button",
@@ -162,36 +163,36 @@ const xe = l.memo(function({
162
163
  children: "Why this action?"
163
164
  }
164
165
  ) }),
165
- /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mt-2 p-3 bg-surface-raised rounded-ds-lg", children: r.rationale }) })
166
+ /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-muted mt-2 p-3 bg-surface-raised rounded-ds-lg", children: r.rationale }) })
166
167
  ] })
167
168
  ]
168
169
  }
169
170
  );
170
- }), Z = 5e3, ke = l.memo(function({
171
+ }), A = 5e3, ye = a.memo(function({
171
172
  data: r,
172
173
  blockId: t,
173
- confidence: s,
174
+ confidence: c,
174
175
  onAction: n
175
176
  }) {
176
- const { reducedMotion: c } = y(), a = c, m = r.undoTimeout ?? Z, [v, f] = l.useState(m), [g, o] = l.useState(!!r.undoable);
177
- l.useEffect(() => {
177
+ const { reducedMotion: l } = y(), i = l, m = r.undoTimeout ?? A, [v, f] = a.useState(m), [g, o] = a.useState(!!r.undoable);
178
+ a.useEffect(() => {
178
179
  if (!r.undoable) return;
179
- const B = setInterval(() => {
180
+ const T = setInterval(() => {
180
181
  f((E) => {
181
- const T = E - 100;
182
- return T <= 0 ? (clearInterval(B), o(!1), 0) : T;
182
+ const I = E - 100;
183
+ return I <= 0 ? (clearInterval(T), o(!1), 0) : I;
183
184
  });
184
185
  }, 100);
185
- return () => clearInterval(B);
186
+ return () => clearInterval(T);
186
187
  }, [r.undoable, m]);
187
- const h = l.useCallback(() => {
188
- n == null || n(t || "unknown", "undo");
189
- }, [t, n]), k = Math.ceil(v / 1e3), u = 20, N = 2, b = (u - N) / 2, S = 2 * Math.PI * b;
188
+ const h = a.useCallback(() => {
189
+ n?.(t || "unknown", "undo");
190
+ }, [t, n]), k = Math.ceil(v / 1e3), u = 20, N = 2, b = (u - N) / 2, B = 2 * Math.PI * b;
190
191
  return /* @__PURE__ */ d(
191
192
  "div",
192
193
  {
193
194
  className: p(
194
- s === "low" && "border-l-2 border-warning-7 pl-3"
195
+ c === "low" && "border-l-2 border-warning-7 pl-3"
195
196
  ),
196
197
  children: [
197
198
  /* @__PURE__ */ e(
@@ -204,7 +205,7 @@ const xe = l.memo(function({
204
205
  }
205
206
  ),
206
207
  g && r.undoable && /* @__PURE__ */ e("div", { className: "mt-2 flex items-center gap-2", children: /* @__PURE__ */ e(
207
- C,
208
+ S,
208
209
  {
209
210
  variant: "ghost",
210
211
  size: "sm",
@@ -241,12 +242,12 @@ const xe = l.memo(function({
241
242
  fill: "none",
242
243
  stroke: "currentColor",
243
244
  strokeWidth: N,
244
- strokeDasharray: S,
245
- initial: a ? void 0 : { strokeDashoffset: 0 },
245
+ strokeDasharray: B,
246
+ initial: i ? void 0 : { strokeDashoffset: 0 },
246
247
  animate: {
247
- strokeDashoffset: S
248
+ strokeDashoffset: B
248
249
  },
249
- transition: a ? { duration: 0 } : {
250
+ transition: i ? { duration: 0 } : {
250
251
  duration: m / 1e3,
251
252
  ease: "linear"
252
253
  }
@@ -262,7 +263,7 @@ const xe = l.memo(function({
262
263
  ]
263
264
  }
264
265
  );
265
- }), Ne = l.memo(function({
266
+ }), Ce = a.memo(function({
266
267
  data: r,
267
268
  confidence: t
268
269
  }) {
@@ -273,17 +274,17 @@ const xe = l.memo(function({
273
274
  t === "low" && "border-l-2 border-warning-7 pl-3"
274
275
  ),
275
276
  children: [
276
- /* @__PURE__ */ e(w, { color: "error", variant: "subtle", title: r.title, children: /* @__PURE__ */ e("div", { className: "prose prose-sm", children: /* @__PURE__ */ e(D, { remarkPlugins: [L], children: r.message }) }) }),
277
+ /* @__PURE__ */ e(w, { color: "error", variant: "subtle", title: r.title, children: /* @__PURE__ */ e("div", { className: "prose prose-sm", children: /* @__PURE__ */ e(L, { remarkPlugins: [U], children: r.message }) }) }),
277
278
  r.suggestion && /* @__PURE__ */ e("p", { className: "mt-2 text-ds-sm text-surface-fg-muted", children: r.suggestion })
278
279
  ]
279
280
  }
280
281
  );
281
- }), ye = l.memo(function({
282
+ }), Se = a.memo(function({
282
283
  data: r
283
284
  }) {
284
285
  return /* @__PURE__ */ e(w, { color: "info", variant: "subtle", children: r.message });
285
286
  });
286
- function A() {
287
+ function ee() {
287
288
  return /* @__PURE__ */ e(
288
289
  x.span,
289
290
  {
@@ -295,44 +296,22 @@ function A() {
295
296
  }
296
297
  );
297
298
  }
298
- function ee({ status: i }) {
299
- switch (i) {
299
+ function re({ status: s }) {
300
+ switch (s) {
300
301
  case "done":
301
- return /* @__PURE__ */ e(
302
- q,
303
- {
304
- className: "h-4 w-4 text-success-11",
305
- "aria-hidden": "true",
306
- "data-testid": "step-icon-done"
307
- }
308
- );
302
+ return /* @__PURE__ */ e("span", { "data-testid": "step-icon-done", children: /* @__PURE__ */ e(C, { icon: J, size: "sm", className: "text-success-11" }) });
309
303
  case "active":
310
- return /* @__PURE__ */ e(A, {});
304
+ return /* @__PURE__ */ e(ee, {});
311
305
  case "error":
312
- return /* @__PURE__ */ e(
313
- K,
314
- {
315
- className: "h-4 w-4 text-error-11",
316
- "aria-hidden": "true",
317
- "data-testid": "step-icon-error"
318
- }
319
- );
320
- case "pending":
306
+ return /* @__PURE__ */ e("span", { "data-testid": "step-icon-error", children: /* @__PURE__ */ e(C, { icon: q, size: "sm", className: "text-error-11" }) });
321
307
  default:
322
- return /* @__PURE__ */ e(
323
- G,
324
- {
325
- className: "h-4 w-4 text-surface-fg-subtle opacity-50",
326
- "aria-hidden": "true",
327
- "data-testid": "step-icon-pending"
328
- }
329
- );
308
+ return /* @__PURE__ */ e("span", { "data-testid": "step-icon-pending", children: /* @__PURE__ */ e(C, { icon: K, size: "sm", className: "text-surface-fg-subtle opacity-50" }) });
330
309
  }
331
310
  }
332
- const Ce = l.memo(function({
311
+ const we = a.memo(function({
333
312
  data: r
334
313
  }) {
335
- const { reducedMotion: t } = y(), s = t;
314
+ const { reducedMotion: t } = y(), c = t;
336
315
  if (r.lines != null) {
337
316
  const n = Math.max(1, r.lines);
338
317
  return /* @__PURE__ */ d(
@@ -343,16 +322,16 @@ const Ce = l.memo(function({
343
322
  "aria-label": "Loading",
344
323
  className: "flex flex-col gap-2",
345
324
  children: [
346
- Array.from({ length: n }).map((c, a) => /* @__PURE__ */ e(
347
- J,
325
+ Array.from({ length: n }).map((l, i) => /* @__PURE__ */ e(
326
+ Q,
348
327
  {
349
328
  animation: "shimmer",
350
329
  className: p(
351
330
  "h-4",
352
- a === n - 1 ? "w-3/5" : "w-full"
331
+ i === n - 1 ? "w-3/5" : "w-full"
353
332
  )
354
333
  },
355
- a
334
+ i
356
335
  )),
357
336
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" })
358
337
  ]
@@ -367,15 +346,15 @@ const Ce = l.memo(function({
367
346
  "aria-label": "Processing",
368
347
  className: "flex flex-col gap-2",
369
348
  children: [
370
- r.steps.map((n, c) => /* @__PURE__ */ d(
349
+ r.steps.map((n, l) => /* @__PURE__ */ d(
371
350
  x.div,
372
351
  {
373
352
  className: "flex items-center gap-2",
374
- initial: s ? void 0 : { opacity: 0, x: -8 },
353
+ initial: c ? void 0 : { opacity: 0, x: -8 },
375
354
  animate: { opacity: 1, x: 0 },
376
- transition: s ? { duration: 0 } : { duration: 0.2, delay: c * 0.06 },
355
+ transition: c ? { duration: 0 } : { duration: 0.2, delay: l * 0.06 },
377
356
  children: [
378
- /* @__PURE__ */ e(ee, { status: n.status }),
357
+ /* @__PURE__ */ e(re, { status: n.status }),
379
358
  /* @__PURE__ */ e(
380
359
  "span",
381
360
  {
@@ -394,33 +373,33 @@ const Ce = l.memo(function({
394
373
  ]
395
374
  }
396
375
  ) : /* @__PURE__ */ e("div", { role: "status", "aria-busy": "true", "aria-label": "Loading", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading" }) });
397
- }), we = l.memo(function(r) {
376
+ }), Be = a.memo(function(r) {
398
377
  const { reducedMotion: t } = y();
399
- return t ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
378
+ return t ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(
400
379
  x.div,
401
380
  {
402
381
  initial: { scaleX: 0 },
403
382
  animate: { scaleX: 1 },
404
383
  style: { originX: 0.5 },
405
384
  transition: P.elegant,
406
- children: /* @__PURE__ */ e(M, {})
385
+ children: /* @__PURE__ */ e(R, {})
407
386
  }
408
387
  );
409
- }), Se = l.memo(function({
388
+ }), Te = a.memo(function({
410
389
  data: r
411
390
  }) {
412
- const { reducedMotion: t } = y(), s = r.stats ?? [];
413
- return s.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-ds-05", children: s.map((n, c) => {
414
- const a = n.change ? {
391
+ const { reducedMotion: t } = y(), c = r.stats ?? [];
392
+ return c.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-ds-05", children: c.map((n, l) => {
393
+ const i = n.change ? {
415
394
  value: n.change.value,
416
395
  direction: n.change.direction
417
396
  } : void 0;
418
397
  return t ? /* @__PURE__ */ e("div", { className: "flex-1 min-w-[140px]", children: /* @__PURE__ */ e(
419
- R,
398
+ D,
420
399
  {
421
400
  label: n.label,
422
401
  value: n.value,
423
- delta: a
402
+ delta: i
424
403
  }
425
404
  ) }, n.label) : /* @__PURE__ */ e(
426
405
  x.div,
@@ -428,13 +407,13 @@ const Ce = l.memo(function({
428
407
  className: "flex-1 min-w-[140px]",
429
408
  initial: { opacity: 0, y: 8 },
430
409
  animate: { opacity: 1, y: 0 },
431
- transition: { ...U.responsive, delay: c * 0.08 },
410
+ transition: { ...z.responsive, delay: l * 0.08 },
432
411
  children: /* @__PURE__ */ e(
433
- R,
412
+ D,
434
413
  {
435
414
  label: n.label,
436
415
  value: n.value,
437
- delta: a
416
+ delta: i
438
417
  }
439
418
  )
440
419
  },
@@ -443,13 +422,13 @@ const Ce = l.memo(function({
443
422
  }) });
444
423
  });
445
424
  export {
446
- xe as B,
447
- ve as C,
448
- we as D,
449
- Ne as E,
450
- ye as I,
451
- Ce as L,
452
- Se as S,
453
- ge as T,
454
- ke as a
425
+ ke as B,
426
+ Ne as C,
427
+ Be as D,
428
+ Ce as E,
429
+ Se as I,
430
+ we as L,
431
+ Te as S,
432
+ ve as T,
433
+ ye as a
455
434
  };