@devalok/shilp-sutra 0.30.0 → 0.32.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 (266) hide show
  1. package/README.md +82 -239
  2. package/dist/_chunks/badge-group.js +123 -171
  3. package/dist/_chunks/document-preview.js +92 -0
  4. package/dist/_chunks/file-preview.js +511 -0
  5. package/dist/_chunks/image-preview.js +90 -0
  6. package/dist/_chunks/primitives.js +109 -109
  7. package/dist/_chunks/stat-row.js +144 -124
  8. package/dist/_chunks/use-calendar.js +558 -490
  9. package/dist/ai/block-renderer.d.ts +2 -1
  10. package/dist/ai/block-renderer.d.ts.map +1 -1
  11. package/dist/ai/block-renderer.js +30 -29
  12. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  13. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  14. package/dist/ai/blocks/divider.d.ts.map +1 -1
  15. package/dist/ai/blocks/error.d.ts.map +1 -1
  16. package/dist/ai/blocks/info.d.ts.map +1 -1
  17. package/dist/ai/blocks/loading.d.ts.map +1 -1
  18. package/dist/ai/blocks/stat-row.d.ts.map +1 -1
  19. package/dist/ai/blocks/success.d.ts.map +1 -1
  20. package/dist/ai/blocks/text.d.ts.map +1 -1
  21. package/dist/ai/command-bar.d.ts +18 -0
  22. package/dist/ai/command-bar.d.ts.map +1 -1
  23. package/dist/ai/command-bar.js +126 -125
  24. package/dist/ai/conversation.d.ts +13 -1
  25. package/dist/ai/conversation.d.ts.map +1 -1
  26. package/dist/ai/conversation.js +78 -78
  27. package/dist/ai/types.d.ts +0 -1
  28. package/dist/ai/types.d.ts.map +1 -1
  29. package/dist/ai/types.js +1 -0
  30. package/dist/composed/bulk-action-bar.d.ts +6 -4
  31. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  32. package/dist/composed/bulk-action-bar.js +102 -58
  33. package/dist/composed/command-palette.d.ts +9 -0
  34. package/dist/composed/command-palette.d.ts.map +1 -1
  35. package/dist/composed/command-palette.js +68 -68
  36. package/dist/composed/confirm-dialog.d.ts +1 -1
  37. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  38. package/dist/composed/confirm-dialog.js +10 -10
  39. package/dist/composed/content-card.d.ts.map +1 -1
  40. package/dist/composed/date-picker/date-picker.d.ts +11 -1
  41. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  42. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  43. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  44. package/dist/composed/deadline-indicator.d.ts +1 -1
  45. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  46. package/dist/composed/deadline-indicator.js +39 -36
  47. package/dist/composed/emoji-picker.d.ts +6 -0
  48. package/dist/composed/emoji-picker.d.ts.map +1 -1
  49. package/dist/composed/emoji-picker.js +22 -20
  50. package/dist/composed/error-boundary.d.ts +21 -1
  51. package/dist/composed/error-boundary.d.ts.map +1 -1
  52. package/dist/composed/error-boundary.js +47 -32
  53. package/dist/composed/file-preview/audio-preview.d.ts +7 -0
  54. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
  55. package/dist/composed/file-preview/document-preview.d.ts +7 -0
  56. package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
  57. package/dist/composed/file-preview/embed-preview.d.ts +7 -0
  58. package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
  59. package/dist/composed/file-preview/image-preview.d.ts +7 -0
  60. package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
  61. package/dist/composed/file-preview/shared.d.ts +20 -0
  62. package/dist/composed/file-preview/shared.d.ts.map +1 -0
  63. package/dist/composed/file-preview/video-preview.d.ts +6 -0
  64. package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
  65. package/dist/composed/file-preview.d.ts.map +1 -1
  66. package/dist/composed/file-preview.js +10 -662
  67. package/dist/composed/filter-bar.d.ts +10 -2
  68. package/dist/composed/filter-bar.d.ts.map +1 -1
  69. package/dist/composed/filter-bar.js +42 -43
  70. package/dist/composed/form-section.d.ts +1 -1
  71. package/dist/composed/form-section.d.ts.map +1 -1
  72. package/dist/composed/form-section.js +22 -21
  73. package/dist/composed/index.d.ts +2 -2
  74. package/dist/composed/index.d.ts.map +1 -1
  75. package/dist/composed/index.js +58 -57
  76. package/dist/composed/inline-edit.d.ts +1 -1
  77. package/dist/composed/inline-edit.d.ts.map +1 -1
  78. package/dist/composed/inline-edit.js +33 -32
  79. package/dist/composed/lib/string-utils.d.ts.map +1 -1
  80. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  81. package/dist/composed/markdown-viewer.d.ts +1 -1
  82. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  83. package/dist/composed/markdown-viewer.js +60 -59
  84. package/dist/composed/master-detail.d.ts +11 -7
  85. package/dist/composed/master-detail.d.ts.map +1 -1
  86. package/dist/composed/master-detail.js +123 -84
  87. package/dist/composed/page-header.d.ts.map +1 -1
  88. package/dist/composed/page-skeletons.d.ts.map +1 -1
  89. package/dist/composed/priority-indicator.d.ts +1 -0
  90. package/dist/composed/priority-indicator.js +1 -0
  91. package/dist/composed/responsive-overlay.d.ts +8 -0
  92. package/dist/composed/responsive-overlay.d.ts.map +1 -1
  93. package/dist/composed/rich-text-editor.d.ts +11 -3
  94. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  95. package/dist/composed/rich-text-editor.js +21 -20
  96. package/dist/composed/schedule-view.d.ts +9 -1
  97. package/dist/composed/schedule-view.d.ts.map +1 -1
  98. package/dist/hooks/index.d.ts +2 -0
  99. package/dist/hooks/index.d.ts.map +1 -1
  100. package/dist/hooks/index.js +8 -4
  101. package/dist/hooks/use-touch-device.d.ts +12 -0
  102. package/dist/hooks/use-touch-device.d.ts.map +1 -0
  103. package/dist/hooks/use-touch-device.js +13 -0
  104. package/dist/hooks/use-viewport-height.d.ts +11 -0
  105. package/dist/hooks/use-viewport-height.d.ts.map +1 -0
  106. package/dist/hooks/use-viewport-height.js +16 -0
  107. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  108. package/dist/shell/bottom-navbar.js +72 -63
  109. package/dist/shell/command-registry.d.ts.map +1 -1
  110. package/dist/shell/notification-center.d.ts.map +1 -1
  111. package/dist/shell/notification-center.js +77 -77
  112. package/dist/shell/top-bar.d.ts +2 -2
  113. package/dist/shell/top-bar.d.ts.map +1 -1
  114. package/dist/shell/top-bar.js +61 -60
  115. package/dist/tailwind/index.cjs +51 -7
  116. package/dist/tailwind/preset.d.ts.map +1 -1
  117. package/dist/tailwind/preset.js +51 -7
  118. package/dist/tokens/primitives.css +3 -1
  119. package/dist/tokens/semantic.css +16 -13
  120. package/dist/tokens/typography.css +33 -4
  121. package/dist/ui/alert.d.ts +1 -0
  122. package/dist/ui/alert.d.ts.map +1 -1
  123. package/dist/ui/alert.js +42 -37
  124. package/dist/ui/autocomplete.d.ts.map +1 -1
  125. package/dist/ui/autocomplete.js +38 -39
  126. package/dist/ui/badge.d.ts +110 -2
  127. package/dist/ui/badge.d.ts.map +1 -1
  128. package/dist/ui/banner.d.ts.map +1 -1
  129. package/dist/ui/banner.js +8 -7
  130. package/dist/ui/button.d.ts +2 -2
  131. package/dist/ui/button.d.ts.map +1 -1
  132. package/dist/ui/button.js +54 -74
  133. package/dist/ui/card.d.ts +5 -1
  134. package/dist/ui/card.d.ts.map +1 -1
  135. package/dist/ui/card.js +111 -79
  136. package/dist/ui/charts/area-chart.d.ts +2 -0
  137. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  138. package/dist/ui/charts/bar-chart.d.ts +2 -0
  139. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  140. package/dist/ui/charts/chart-container.d.ts +2 -0
  141. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  142. package/dist/ui/charts/index.js +583 -577
  143. package/dist/ui/charts/line-chart.d.ts +2 -0
  144. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  145. package/dist/ui/charts/pie-chart.d.ts +2 -0
  146. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  147. package/dist/ui/charts/radar-chart.d.ts +2 -0
  148. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  149. package/dist/ui/checkbox.d.ts +2 -0
  150. package/dist/ui/checkbox.d.ts.map +1 -1
  151. package/dist/ui/checkbox.js +36 -27
  152. package/dist/ui/code.d.ts.map +1 -1
  153. package/dist/ui/color-input.js +5 -5
  154. package/dist/ui/combobox.d.ts +6 -1
  155. package/dist/ui/combobox.d.ts.map +1 -1
  156. package/dist/ui/combobox.js +1 -1
  157. package/dist/ui/container.d.ts.map +1 -1
  158. package/dist/ui/context-menu.js +1 -1
  159. package/dist/ui/data-table-body.d.ts +12 -0
  160. package/dist/ui/data-table-body.d.ts.map +1 -0
  161. package/dist/ui/data-table-body.js +219 -0
  162. package/dist/ui/data-table-bulk-actions.d.ts +19 -0
  163. package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
  164. package/dist/ui/data-table-bulk-actions.js +61 -0
  165. package/dist/ui/data-table-card.d.ts +9 -0
  166. package/dist/ui/data-table-card.d.ts.map +1 -0
  167. package/dist/ui/data-table-card.js +73 -0
  168. package/dist/ui/data-table-context.d.ts +62 -0
  169. package/dist/ui/data-table-context.d.ts.map +1 -0
  170. package/dist/ui/data-table-context.js +48 -0
  171. package/dist/ui/data-table-header.d.ts +10 -0
  172. package/dist/ui/data-table-header.d.ts.map +1 -0
  173. package/dist/ui/data-table-header.js +141 -0
  174. package/dist/ui/data-table-pagination.d.ts +13 -0
  175. package/dist/ui/data-table-pagination.d.ts.map +1 -0
  176. package/dist/ui/data-table-pagination.js +84 -0
  177. package/dist/ui/data-table.d.ts +11 -9
  178. package/dist/ui/data-table.d.ts.map +1 -1
  179. package/dist/ui/data-table.js +258 -573
  180. package/dist/ui/dialog.d.ts +6 -2
  181. package/dist/ui/dialog.d.ts.map +1 -1
  182. package/dist/ui/dialog.js +84 -82
  183. package/dist/ui/dropdown-menu.js +1 -1
  184. package/dist/ui/hover-card.d.ts +7 -0
  185. package/dist/ui/hover-card.d.ts.map +1 -1
  186. package/dist/ui/hover-card.js +3 -3
  187. package/dist/ui/icon-group.d.ts +2 -4
  188. package/dist/ui/icon-group.d.ts.map +1 -1
  189. package/dist/ui/icon-group.js +22 -23
  190. package/dist/ui/index.d.ts +1 -2
  191. package/dist/ui/index.d.ts.map +1 -1
  192. package/dist/ui/index.js +94 -99
  193. package/dist/ui/label.js +1 -1
  194. package/dist/ui/lib/bottom-sheet.d.ts +16 -0
  195. package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
  196. package/dist/ui/lib/date-utils.d.ts.map +1 -1
  197. package/dist/ui/lib/motion.d.ts.map +1 -1
  198. package/dist/ui/lib/utils.d.ts.map +1 -1
  199. package/dist/ui/menubar.d.ts.map +1 -1
  200. package/dist/ui/menubar.js +64 -73
  201. package/dist/ui/navigation-menu.d.ts.map +1 -1
  202. package/dist/ui/navigation-menu.js +40 -44
  203. package/dist/ui/number-input.d.ts.map +1 -1
  204. package/dist/ui/number-input.js +19 -17
  205. package/dist/ui/popover.d.ts.map +1 -1
  206. package/dist/ui/popover.js +107 -32
  207. package/dist/ui/progress-ring.d.ts.map +1 -1
  208. package/dist/ui/progress-ring.js +80 -80
  209. package/dist/ui/progress.js +4 -4
  210. package/dist/ui/radio.d.ts +5 -2
  211. package/dist/ui/radio.d.ts.map +1 -1
  212. package/dist/ui/radio.js +29 -20
  213. package/dist/ui/search-input.d.ts.map +1 -1
  214. package/dist/ui/search-input.js +13 -12
  215. package/dist/ui/segmented-control.d.ts +6 -108
  216. package/dist/ui/segmented-control.d.ts.map +1 -1
  217. package/dist/ui/segmented-control.js +86 -272
  218. package/dist/ui/select.d.ts +3 -1
  219. package/dist/ui/select.d.ts.map +1 -1
  220. package/dist/ui/select.js +83 -71
  221. package/dist/ui/separator.js +5 -5
  222. package/dist/ui/sheet.d.ts +2 -0
  223. package/dist/ui/sheet.d.ts.map +1 -1
  224. package/dist/ui/sheet.js +102 -84
  225. package/dist/ui/sidebar.d.ts.map +1 -1
  226. package/dist/ui/sidebar.js +200 -175
  227. package/dist/ui/skeleton.d.ts.map +1 -1
  228. package/dist/ui/slider.js +14 -14
  229. package/dist/ui/stack.d.ts.map +1 -1
  230. package/dist/ui/status-dot.js +8 -8
  231. package/dist/ui/stepper.d.ts.map +1 -1
  232. package/dist/ui/stepper.js +33 -31
  233. package/dist/ui/switch.js +3 -3
  234. package/dist/ui/table.d.ts.map +1 -1
  235. package/dist/ui/tabs.d.ts +7 -0
  236. package/dist/ui/tabs.d.ts.map +1 -1
  237. package/dist/ui/tabs.js +102 -76
  238. package/dist/ui/text.d.ts.map +1 -1
  239. package/dist/ui/toast-types.d.ts +0 -1
  240. package/dist/ui/toast-types.d.ts.map +1 -1
  241. package/dist/ui/toast-types.js +0 -1
  242. package/dist/ui/toast.d.ts.map +1 -1
  243. package/dist/ui/toast.js +156 -150
  244. package/dist/ui/toggle-group.js +1 -1
  245. package/dist/ui/toggle.js +1 -1
  246. package/dist/ui/tooltip.js +3 -3
  247. package/dist/ui/visually-hidden.d.ts.map +1 -1
  248. package/docs/components/ui/alert.md +3 -0
  249. package/docs/components/ui/badge.md +3 -0
  250. package/docs/components/ui/card.md +4 -0
  251. package/docs/components/ui/data-table-body.md +13 -0
  252. package/docs/components/ui/data-table-bulk-actions.md +13 -0
  253. package/docs/components/ui/data-table-card.md +13 -0
  254. package/docs/components/ui/data-table-context.md +13 -0
  255. package/docs/components/ui/data-table-header.md +13 -0
  256. package/docs/components/ui/data-table-pagination.md +13 -0
  257. package/docs/components/ui/select.md +4 -0
  258. package/docs/components/ui/tabs.md +4 -0
  259. package/llms-full.txt +97 -48
  260. package/llms.txt +46 -1
  261. package/package.json +37 -7
  262. package/dist/ui/chip.d.ts +0 -19
  263. package/dist/ui/chip.d.ts.map +0 -1
  264. package/dist/ui/chip.js +0 -14
  265. package/dist/ui/lib/use-ripple.d.ts +0 -14
  266. package/dist/ui/lib/use-ripple.d.ts.map +0 -1
@@ -1,24 +1,24 @@
1
1
  "use client";
2
- import { jsx as r, Fragment as k, jsxs as c } from "react/jsx-runtime";
3
- import * as u from "react";
4
- import w from "react-markdown";
5
- import C from "remark-gfm";
6
- import { IconCheck as S, IconCopy as z } from "@tabler/icons-react";
7
- import { Icon as x } from "../ui/icon.js";
8
- import { cn as o } from "../ui/lib/utils.js";
2
+ import { jsx as r, Fragment as w, jsxs as u } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import C from "react-markdown";
5
+ import S from "remark-gfm";
6
+ import { IconCheck as z, IconCopy as R } from "@tabler/icons-react";
7
+ import { Icon as b } from "../ui/icon.js";
8
+ import { cn as l } from "../ui/lib/utils.js";
9
9
  import { Button as $ } from "../ui/button.js";
10
- function g(t) {
10
+ function h(t) {
11
11
  return t.toLowerCase().replace(/[^\w]+/g, "-").replace(/(^-|-$)/g, "");
12
12
  }
13
13
  function m(t) {
14
14
  return typeof t == "string" ? t : typeof t == "number" ? String(t) : t ? Array.isArray(t) ? t.map(m).join("") : typeof t == "object" && "props" in t ? m(t.props.children) : "" : "";
15
15
  }
16
- function b({ code: t }) {
17
- const [a, i] = u.useState(!1), l = u.useRef(void 0);
18
- u.useEffect(() => () => clearTimeout(l.current), []);
19
- function d() {
16
+ function y({ code: t }) {
17
+ const [a, i] = d.useState(!1), n = d.useRef(void 0);
18
+ d.useEffect(() => () => clearTimeout(n.current), []);
19
+ function c() {
20
20
  navigator.clipboard.writeText(t).then(() => {
21
- i(!0), l.current = setTimeout(() => i(!1), 2e3);
21
+ i(!0), n.current = setTimeout(() => i(!1), 2e3);
22
22
  });
23
23
  }
24
24
  return /* @__PURE__ */ r(
@@ -27,37 +27,37 @@ function b({ code: t }) {
27
27
  variant: "ghost",
28
28
  size: "icon-xs",
29
29
  className: "absolute top-ds-02 right-ds-02 opacity-0 group-hover:opacity-100 transition-opacity",
30
- onClick: d,
30
+ onClick: c,
31
31
  "aria-label": a ? "Copied" : "Copy code",
32
- children: a ? /* @__PURE__ */ r(x, { icon: S, size: "xs" }) : /* @__PURE__ */ r(x, { icon: z, size: "xs" })
32
+ children: a ? /* @__PURE__ */ r(b, { icon: z, size: "xs" }) : /* @__PURE__ */ r(b, { icon: R, size: "xs" })
33
33
  }
34
34
  );
35
35
  }
36
36
  function j({ language: t, code: a, mb: i }) {
37
- const [l, d] = u.useState(null);
38
- if (u.useEffect(() => {
39
- let f = !1;
37
+ const [n, c] = d.useState(null);
38
+ if (d.useEffect(() => {
39
+ let o = !1;
40
40
  return Promise.all([
41
41
  import("react-syntax-highlighter"),
42
42
  import("react-syntax-highlighter/dist/esm/styles/prism/one-dark")
43
- ]).then(([e, s]) => {
44
- f || d({ Highlighter: e.Prism ?? e.default, style: s.default });
43
+ ]).then(([f, e]) => {
44
+ o || c({ Highlighter: f.Prism ?? f.default, style: e.default });
45
45
  }).catch(() => {
46
46
  }), () => {
47
- f = !0;
47
+ o = !0;
48
48
  };
49
- }, []), !l)
50
- return /* @__PURE__ */ c("div", { className: o("group relative", i), children: [
49
+ }, []), !n)
50
+ return /* @__PURE__ */ u("div", { className: l("group relative", i), children: [
51
51
  /* @__PURE__ */ r("pre", { className: "bg-surface-sunken rounded-ds-md p-ds-04 overflow-x-auto text-ds-sm font-mono", children: /* @__PURE__ */ r("code", { children: a }) }),
52
- /* @__PURE__ */ r(b, { code: a })
52
+ /* @__PURE__ */ r(y, { code: a })
53
53
  ] });
54
- const { Highlighter: p, style: n } = l;
55
- return /* @__PURE__ */ c("div", { className: o("group relative", i), children: [
54
+ const { Highlighter: p, style: g } = n;
55
+ return /* @__PURE__ */ u("div", { className: l("group relative", i), children: [
56
56
  /* @__PURE__ */ r(
57
57
  p,
58
58
  {
59
59
  language: t,
60
- style: n,
60
+ style: g,
61
61
  customStyle: {
62
62
  margin: 0,
63
63
  borderRadius: "var(--radius-md)",
@@ -67,78 +67,79 @@ function j({ language: t, code: a, mb: i }) {
67
67
  children: a
68
68
  }
69
69
  ),
70
- /* @__PURE__ */ r(b, { code: a })
70
+ /* @__PURE__ */ r(y, { code: a })
71
71
  ] });
72
72
  }
73
- function q({
73
+ const M = d.forwardRef(({
74
74
  content: t,
75
75
  compact: a = !1,
76
76
  allowHtml: i = !1,
77
- linkTarget: l = "_blank",
78
- className: d,
77
+ linkTarget: n = "_blank",
78
+ className: c,
79
79
  ...p
80
- }) {
81
- const n = a ? "mb-ds-02" : "mb-ds-03", f = a ? "mt-ds-03" : "mt-ds-05";
82
- return /* @__PURE__ */ r("div", { className: o("font-sans text-surface-fg", d), ...p, children: /* @__PURE__ */ r(
83
- w,
80
+ }, g) => {
81
+ const o = a ? "mb-ds-02" : "mb-ds-03", f = a ? "mt-ds-03" : "mt-ds-05";
82
+ return /* @__PURE__ */ r("div", { ref: g, className: l("font-sans text-surface-fg", c), ...p, children: /* @__PURE__ */ r(
83
+ C,
84
84
  {
85
- remarkPlugins: [C],
85
+ remarkPlugins: [S],
86
86
  skipHtml: !i,
87
87
  components: {
88
88
  h1: ({ children: e }) => {
89
- const s = g(m(e));
90
- return /* @__PURE__ */ c("h1", { id: s, className: o("group", a ? "text-ds-md" : "text-ds-lg", "font-semibold text-surface-fg", f, n), children: [
89
+ const s = h(m(e));
90
+ return /* @__PURE__ */ u("h1", { id: s, className: l("group", a ? "text-ds-md" : "text-ds-lg", "font-semibold text-surface-fg", f, o), children: [
91
91
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
92
92
  e
93
93
  ] });
94
94
  },
95
95
  h2: ({ children: e }) => {
96
- const s = g(m(e));
97
- return /* @__PURE__ */ c("h2", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", a ? "mt-ds-03" : "mt-ds-04", n), children: [
96
+ const s = h(m(e));
97
+ return /* @__PURE__ */ u("h2", { id: s, className: l("group", "text-ds-md font-semibold text-surface-fg", a ? "mt-ds-03" : "mt-ds-04", o), children: [
98
98
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
99
99
  e
100
100
  ] });
101
101
  },
102
102
  h3: ({ children: e }) => {
103
- const s = g(m(e));
104
- return /* @__PURE__ */ c("h3", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", "mt-ds-03", n), children: [
103
+ const s = h(m(e));
104
+ return /* @__PURE__ */ u("h3", { id: s, className: l("group", "text-ds-md font-semibold text-surface-fg", "mt-ds-03", o), children: [
105
105
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
106
106
  e
107
107
  ] });
108
108
  },
109
- p: ({ children: e }) => /* @__PURE__ */ r("p", { className: o("text-ds-md text-surface-fg leading-ds-relaxed", n), children: e }),
109
+ p: ({ children: e }) => /* @__PURE__ */ r("p", { className: l("text-ds-md text-surface-fg leading-ds-relaxed", o), children: e }),
110
110
  a: ({ href: e, children: s }) => /* @__PURE__ */ r(
111
111
  "a",
112
112
  {
113
113
  href: e,
114
- target: l,
115
- rel: l === "_blank" ? "noopener noreferrer" : void 0,
114
+ target: n,
115
+ rel: n === "_blank" ? "noopener noreferrer" : void 0,
116
116
  className: "text-accent-11 hover:underline",
117
117
  children: s
118
118
  }
119
119
  ),
120
- code: ({ className: e, children: s, ...y }) => {
121
- const h = e ? /language-(\w+)/.exec(e) : null;
122
- if (h) {
123
- const N = h[1], v = String(s).replace(/\n$/, "");
124
- return /* @__PURE__ */ r(j, { language: N, code: v, mb: n });
120
+ code: ({ className: e, children: s, ...N }) => {
121
+ const x = e ? /language-(\w+)/.exec(e) : null;
122
+ if (x) {
123
+ const v = x[1], k = String(s).replace(/\n$/, "");
124
+ return /* @__PURE__ */ r(j, { language: v, code: k, mb: o });
125
125
  }
126
- return /* @__PURE__ */ r("code", { className: "bg-surface-sunken rounded-ds-sm px-1.5 py-0.5 text-ds-sm font-mono text-surface-fg", ...y, children: s });
126
+ return /* @__PURE__ */ r("code", { className: "bg-surface-sunken rounded-ds-sm px-1.5 py-0.5 text-ds-sm font-mono text-surface-fg", ...N, children: s });
127
127
  },
128
- pre: ({ children: e }) => /* @__PURE__ */ r(k, { children: e }),
129
- blockquote: ({ children: e }) => /* @__PURE__ */ r("blockquote", { className: o("border-l-2 border-surface-border-subtle pl-ds-04 text-surface-fg-muted italic", n), children: e }),
130
- ul: ({ children: e }) => /* @__PURE__ */ r("ul", { className: o("list-disc pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", n), children: e }),
131
- ol: ({ children: e }) => /* @__PURE__ */ r("ol", { className: o("list-decimal pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", n), children: e }),
132
- table: ({ children: e }) => /* @__PURE__ */ r("div", { className: o("overflow-x-auto", n), children: /* @__PURE__ */ r("table", { className: "w-full border-collapse", children: e }) }),
128
+ pre: ({ children: e }) => /* @__PURE__ */ r(w, { children: e }),
129
+ blockquote: ({ children: e }) => /* @__PURE__ */ r("blockquote", { className: l("border-l-2 border-surface-border-subtle pl-ds-04 text-surface-fg-muted italic", o), children: e }),
130
+ ul: ({ children: e }) => /* @__PURE__ */ r("ul", { className: l("list-disc pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", o), children: e }),
131
+ ol: ({ children: e }) => /* @__PURE__ */ r("ol", { className: l("list-decimal pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", o), children: e }),
132
+ table: ({ children: e }) => /* @__PURE__ */ r("div", { className: l("overflow-x-auto", o), children: /* @__PURE__ */ r("table", { className: "w-full border-collapse", children: e }) }),
133
133
  th: ({ children: e }) => /* @__PURE__ */ r("th", { className: "border border-surface-border-subtle px-ds-03 py-ds-02 text-left text-ds-sm font-semibold bg-surface-sunken", children: e }),
134
134
  td: ({ children: e }) => /* @__PURE__ */ r("td", { className: "border border-surface-border-subtle px-ds-03 py-ds-02 text-ds-sm", children: e }),
135
- hr: () => /* @__PURE__ */ r("hr", { className: o("border-surface-border-subtle", a ? "my-ds-03" : "my-ds-04") }),
135
+ hr: () => /* @__PURE__ */ r("hr", { className: l("border-surface-border-subtle", a ? "my-ds-03" : "my-ds-04") }),
136
136
  img: ({ src: e, alt: s }) => /* @__PURE__ */ r("img", { src: e, alt: s ?? "", className: "rounded-ds-md max-w-full", loading: "lazy" })
137
137
  },
138
138
  children: t
139
139
  }
140
140
  ) });
141
- }
141
+ });
142
+ M.displayName = "MarkdownViewer";
142
143
  export {
143
- q as MarkdownViewer
144
+ M as MarkdownViewer
144
145
  };
@@ -1,17 +1,22 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
+ /**
4
+ * A responsive master-detail layout. On desktop, shows a fixed-width list panel
5
+ * alongside a detail panel. Below the breakpoint, switches to a stacked view
6
+ * with animated transitions and a back button.
7
+ */
3
8
  export interface MasterDetailProps extends React.HTMLAttributes<HTMLDivElement> {
4
9
  /** ID of currently selected item. null = no selection (show list on mobile). */
5
10
  selected?: string | null;
6
- /** Called when mobile back button is pressed */
11
+ /** Called when mobile back button is pressed. */
7
12
  onBack?: () => void;
8
- /** Master panel width on desktop @default '280px' */
13
+ /** Master panel width on desktop. @default '280px' */
9
14
  masterWidth?: string;
10
- /** Breakpoint below which stacked mode activates @default 'md' */
15
+ /** Breakpoint below which stacked mode activates. @default 'md' */
11
16
  breakpoint?: 'sm' | 'md' | 'lg';
12
- /** Content to show in the detail pane when nothing is selected */
17
+ /** Content to show in the detail pane when nothing is selected. */
13
18
  emptyState?: React.ReactNode;
14
- /** Called when user presses ArrowUp/ArrowDown while the list has focus */
19
+ /** Called when user presses ArrowUp/ArrowDown while the list has focus. */
15
20
  onNavigate?: (direction: 'up' | 'down') => void;
16
21
  }
17
22
  interface MasterDetailListProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -23,12 +28,11 @@ interface MasterDetailListItemProps extends React.ButtonHTMLAttributes<HTMLButto
23
28
  }
24
29
  declare function MasterDetailList({ children, className, ...props }: MasterDetailListProps): import("react/jsx-runtime").JSX.Element | null;
25
30
  declare function MasterDetailDetail({ children, className, ...props }: MasterDetailDetailProps): import("react/jsx-runtime").JSX.Element | null;
26
- declare function MasterDetailListItem({ active, children, className, ...props }: MasterDetailListItemProps): import("react/jsx-runtime").JSX.Element;
27
31
  declare function MasterDetailRoot({ selected, onBack, masterWidth, breakpoint, emptyState, onNavigate, children, className, style, ...props }: MasterDetailProps): import("react/jsx-runtime").JSX.Element;
28
32
  declare const MasterDetail: typeof MasterDetailRoot & {
29
33
  List: typeof MasterDetailList;
30
34
  Detail: typeof MasterDetailDetail;
31
- ListItem: typeof MasterDetailListItem;
35
+ ListItem: React.ForwardRefExoticComponent<MasterDetailListItemProps & React.RefAttributes<HTMLButtonElement>>;
32
36
  };
33
37
  export { MasterDetail };
34
38
  export type { MasterDetailListItemProps };
@@ -1 +1 @@
1
- {"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../src/composed/master-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAC/B,kEAAkE;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE/E,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjF,UA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B,2EAA2E;IAC3E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE/E,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjF,UAAU,yBAA0B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AA0DD,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,kDA8DjF;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,kDA4BrF;AAwCD,iBAAS,gBAAgB,CAAC,EACxB,QAAe,EACf,MAAM,EACN,WAAqB,EACrB,UAAiB,EACjB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA4BnB;AAED,QAAA,MAAM,YAAY;;;;CAIhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
@@ -1,125 +1,164 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as x } from "react/jsx-runtime";
3
- import * as c from "react";
4
- import { IconArrowLeft as b } from "@tabler/icons-react";
5
- import { cn as d } from "../ui/lib/utils.js";
6
- import { Button as v } from "../ui/button.js";
7
- import { Icon as h } from "../ui/icon.js";
8
- import { springs as y } from "../ui/lib/motion.js";
9
- import { A as w, m as D } from "../_chunks/framer.js";
10
- const M = {
2
+ import { jsx as d, jsxs as D } from "react/jsx-runtime";
3
+ import * as e from "react";
4
+ import { IconArrowLeft as M } from "@tabler/icons-react";
5
+ import { cn as b } from "../ui/lib/utils.js";
6
+ import { Button as C } from "../ui/button.js";
7
+ import { Icon as k } from "../ui/icon.js";
8
+ import { springs as R } from "../ui/lib/motion.js";
9
+ import { A as L, m as A } from "../_chunks/framer.js";
10
+ const E = {
11
11
  sm: "640px",
12
12
  md: "768px",
13
13
  lg: "1024px"
14
14
  };
15
- function g(e) {
16
- const [n, r] = c.useState(!1);
17
- return c.useEffect(() => {
15
+ function N(s) {
16
+ const [i, c] = e.useState(!1);
17
+ return e.useEffect(() => {
18
18
  if (typeof window > "u") return;
19
- const t = window.matchMedia(e);
20
- r(t.matches);
21
- const o = (s) => r(s.matches);
22
- return t.addEventListener("change", o), () => t.removeEventListener("change", o);
23
- }, [e]), n;
19
+ const r = window.matchMedia(s);
20
+ c(r.matches);
21
+ const t = (a) => c(a.matches);
22
+ return r.addEventListener("change", t), () => r.removeEventListener("change", t);
23
+ }, [s]), i;
24
24
  }
25
- const u = c.createContext({
25
+ const y = e.createContext({
26
26
  selected: null,
27
- isMobile: !1
27
+ isMobile: !1,
28
+ activeIndex: 0,
29
+ setActiveIndex: () => {
30
+ },
31
+ registerItemRef: () => {
32
+ },
33
+ itemCount: 0,
34
+ setItemCount: () => {
35
+ }
28
36
  });
29
- function L({ children: e, className: n, ...r }) {
30
- const { selected: t, isMobile: o, onNavigate: s } = c.useContext(u);
31
- if (o && t) return null;
32
- function l(a) {
33
- a.key === "ArrowDown" ? (a.preventDefault(), s?.("down")) : a.key === "ArrowUp" && (a.preventDefault(), s?.("up"));
37
+ function K({ children: s, className: i, ...c }) {
38
+ const { selected: r, isMobile: t, onNavigate: a, activeIndex: l, setActiveIndex: m, registerItemRef: u, setItemCount: x } = e.useContext(y), f = e.useRef([]), p = e.Children.count(s);
39
+ if (e.useEffect(() => {
40
+ x(p);
41
+ }, [p, x]), t && r) return null;
42
+ function h(n) {
43
+ if (n.key === "ArrowDown") {
44
+ n.preventDefault();
45
+ const o = Math.min(l + 1, p - 1);
46
+ m(o), f.current[o]?.focus(), a?.("down");
47
+ } else if (n.key === "ArrowUp") {
48
+ n.preventDefault();
49
+ const o = Math.max(l - 1, 0);
50
+ m(o), f.current[o]?.focus(), a?.("up");
51
+ } else if (n.key === "Home")
52
+ n.preventDefault(), m(0), f.current[0]?.focus();
53
+ else if (n.key === "End") {
54
+ n.preventDefault();
55
+ const o = p - 1;
56
+ m(o), f.current[o]?.focus();
57
+ }
34
58
  }
35
- return /* @__PURE__ */ i(
59
+ return /* @__PURE__ */ d(
36
60
  "div",
37
61
  {
38
62
  role: "listbox",
39
- tabIndex: 0,
40
- className: d(
63
+ tabIndex: -1,
64
+ className: b(
41
65
  "overflow-y-auto focus-visible:outline-none",
42
- !o && "border-r border-surface-border",
43
- n
66
+ !t && "border-r border-surface-border",
67
+ i
44
68
  ),
45
- onKeyDown: l,
46
- ...r,
47
- children: e
69
+ onKeyDown: h,
70
+ ...c,
71
+ children: e.Children.map(s, (n, o) => e.isValidElement(n) ? e.cloneElement(n, {
72
+ ref: (v) => {
73
+ f.current[o] = v, u(o, v);
74
+ },
75
+ tabIndex: o === l ? 0 : -1
76
+ }) : n)
48
77
  }
49
78
  );
50
79
  }
51
- function k({ children: e, className: n, ...r }) {
52
- const { selected: t, isMobile: o, onBack: s, emptyState: l } = c.useContext(u);
53
- return o && !t ? null : /* @__PURE__ */ x("div", { className: d("flex-1 overflow-y-auto", n), ...r, children: [
54
- o && s && /* @__PURE__ */ i("div", { className: "border-b border-surface-border px-ds-04 py-ds-03", children: /* @__PURE__ */ i(v, { variant: "ghost", size: "xs", onClick: s, startIcon: /* @__PURE__ */ i(h, { icon: b }), children: "Back" }) }),
55
- /* @__PURE__ */ i(w, { mode: "wait", children: /* @__PURE__ */ i(
56
- D.div,
80
+ function S({ children: s, className: i, ...c }) {
81
+ const { selected: r, isMobile: t, onBack: a, emptyState: l } = e.useContext(y);
82
+ return t && !r ? null : /* @__PURE__ */ D("div", { className: b("flex-1 overflow-y-auto", i), ...c, children: [
83
+ t && a && /* @__PURE__ */ d("div", { className: "border-b border-surface-border px-ds-04 py-ds-03", children: /* @__PURE__ */ d(C, { variant: "ghost", size: "xs", onClick: a, startIcon: /* @__PURE__ */ d(k, { icon: M }), children: "Back" }) }),
84
+ /* @__PURE__ */ d(L, { mode: "wait", children: /* @__PURE__ */ d(
85
+ A.div,
57
86
  {
58
- initial: o ? { x: 20, opacity: 0 } : !1,
87
+ initial: t ? { x: 20, opacity: 0 } : !1,
59
88
  animate: { x: 0, opacity: 1 },
60
- exit: o ? { x: -20, opacity: 0 } : void 0,
61
- transition: y.snappy,
62
- children: t ? e : l ?? e
89
+ exit: t ? { x: -20, opacity: 0 } : void 0,
90
+ transition: R.snappy,
91
+ children: r ? s : l ?? s
63
92
  },
64
- t ?? "empty"
93
+ r ?? "empty"
65
94
  ) })
66
95
  ] });
67
96
  }
68
- function C({ active: e = !1, children: n, className: r, ...t }) {
69
- return /* @__PURE__ */ i(
70
- "button",
71
- {
72
- type: "button",
73
- role: "option",
74
- "aria-selected": e,
75
- "data-active": e || void 0,
76
- className: d(
77
- "flex w-full items-center px-ds-04 py-ds-03 text-left text-ds-md font-sans text-surface-fg",
78
- "transition-colors duration-fast-01 ease-productive-standard",
79
- "hover:bg-surface-raised-hover",
80
- e && "bg-accent-2 text-accent-11 border-l-2 border-accent-9",
81
- r
82
- ),
83
- ...t,
84
- children: n
97
+ const j = e.forwardRef(
98
+ function({ active: i = !1, children: c, className: r, onKeyDown: t, ...a }, l) {
99
+ function m(u) {
100
+ (u.key === "Enter" || u.key === " ") && (u.preventDefault(), u.target.click()), t?.(u);
85
101
  }
86
- );
87
- }
88
- function I({
89
- selected: e = null,
90
- onBack: n,
91
- masterWidth: r = "280px",
92
- breakpoint: t = "md",
93
- emptyState: o,
94
- onNavigate: s,
102
+ return /* @__PURE__ */ d(
103
+ "button",
104
+ {
105
+ ref: l,
106
+ type: "button",
107
+ role: "option",
108
+ "aria-selected": i,
109
+ "data-active": i || void 0,
110
+ onKeyDown: m,
111
+ className: b(
112
+ "flex w-full items-center px-ds-04 py-ds-03 text-left text-ds-md font-sans text-surface-fg",
113
+ "transition-colors duration-fast-01 ease-productive-standard",
114
+ "hover:bg-surface-raised-hover",
115
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-7 focus-visible:ring-inset",
116
+ i && "bg-accent-2 text-accent-11 border-l-2 border-accent-9",
117
+ r
118
+ ),
119
+ ...a,
120
+ children: c
121
+ }
122
+ );
123
+ }
124
+ );
125
+ function B({
126
+ selected: s = null,
127
+ onBack: i,
128
+ masterWidth: c = "280px",
129
+ breakpoint: r = "md",
130
+ emptyState: t,
131
+ onNavigate: a,
95
132
  children: l,
96
- className: a,
97
- style: m,
98
- ...p
133
+ className: m,
134
+ style: u,
135
+ ...x
99
136
  }) {
100
- const f = g(`(max-width: ${M[t]})`);
101
- return /* @__PURE__ */ i(u.Provider, { value: { selected: e, isMobile: f, onBack: n, emptyState: o, onNavigate: s }, children: /* @__PURE__ */ i(
137
+ const f = N(`(max-width: ${E[r]})`), [p, h] = e.useState(0), [n, o] = e.useState(0), v = e.useRef([]), I = e.useCallback((g, w) => {
138
+ v.current[g] = w;
139
+ }, []);
140
+ return /* @__PURE__ */ d(y.Provider, { value: { selected: s, isMobile: f, onBack: i, emptyState: t, onNavigate: a, activeIndex: p, setActiveIndex: h, registerItemRef: I, itemCount: n, setItemCount: o }, children: /* @__PURE__ */ d(
102
141
  "div",
103
142
  {
104
- className: d(
143
+ className: b(
105
144
  "flex h-full",
106
145
  !f && "grid",
107
- a
146
+ m
108
147
  ),
109
148
  style: {
110
- ...m,
111
- ...f ? {} : { gridTemplateColumns: `${r} 1fr` }
149
+ ...u,
150
+ ...f ? {} : { gridTemplateColumns: `${c} 1fr` }
112
151
  },
113
- ...p,
152
+ ...x,
114
153
  children: l
115
154
  }
116
155
  ) });
117
156
  }
118
- const R = Object.assign(I, {
119
- List: L,
120
- Detail: k,
121
- ListItem: C
157
+ const U = Object.assign(B, {
158
+ List: K,
159
+ Detail: S,
160
+ ListItem: j
122
161
  });
123
162
  export {
124
- R as MasterDetail
163
+ U as MasterDetail
125
164
  };
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFAyFf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFAyFf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"page-skeletons.d.ts","sourceRoot":"","sources":["../../src/composed/page-skeletons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAExF,QAAA,MAAM,iBAAiB,+FAkDtB,CAAA;AAMD,MAAM,WAAW,wBAAyB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAE1F,QAAA,MAAM,mBAAmB,iGA2DxB,CAAA;AAMD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEzF,QAAA,MAAM,kBAAkB,gGA8CvB,CAAA;AAID,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,CAAA"}
1
+ {"version":3,"file":"page-skeletons.d.ts","sourceRoot":"","sources":["../../src/composed/page-skeletons.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAExF,QAAA,MAAM,iBAAiB,+FAkDtB,CAAA;AAMD,MAAM,WAAW,wBAAyB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAE1F,QAAA,MAAM,mBAAmB,iGA2DxB,CAAA;AAMD,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;CAAG;AAEzF,QAAA,MAAM,kBAAkB,gGA8CvB,CAAA;AAID,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,CAAA"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { VariantProps } from 'class-variance-authority';
2
3
  import * as React from 'react';
3
4
  export type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT' | 'low' | 'medium' | 'high' | 'urgent';
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
3
  import * as u from "react";
3
4
  import { a as b } from "../_chunks/vendor-utils.js";
@@ -1,5 +1,10 @@
1
1
  "use client";
2
2
  import * as React from 'react';
3
+ /**
4
+ * @deprecated Dialog and Sheet now auto-adapt to mobile viewports.
5
+ * Use Dialog directly (fullScreens on mobile) or Sheet directly (becomes bottom sheet on mobile).
6
+ * This component will be removed in a future major version.
7
+ */
3
8
  export interface ResponsiveOverlayProps {
4
9
  open: boolean;
5
10
  onOpenChange: (open: boolean) => void;
@@ -10,6 +15,9 @@ export interface ResponsiveOverlayProps {
10
15
  children: React.ReactNode;
11
16
  className?: string;
12
17
  }
18
+ /**
19
+ * @deprecated Use Dialog or Sheet directly — they are now individually mobile-responsive.
20
+ */
13
21
  declare function ResponsiveOverlay({ open, onOpenChange, title, description, breakpoint, children, className, }: ResponsiveOverlayProps): import("react/jsx-runtime").JSX.Element;
14
22
  export { ResponsiveOverlay };
15
23
  //# sourceMappingURL=responsive-overlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive-overlay.d.ts","sourceRoot":"","sources":["../../src/composed/responsive-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA8BD,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAiB,EACjB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,2CAgCxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"responsive-overlay.d.ts","sourceRoot":"","sources":["../../src/composed/responsive-overlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAoB9B;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA8BD;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EACzB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,UAAiB,EACjB,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,2CAgCxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -6,11 +6,19 @@ export interface MentionItem {
6
6
  label: string;
7
7
  avatar?: string;
8
8
  }
9
+ /**
10
+ * A Tiptap-powered rich text editor with a configurable toolbar, @mentions,
11
+ * emoji suggestions, file/image uploads, and task lists.
12
+ * Outputs sanitized HTML via `onChange`.
13
+ */
9
14
  export interface RichTextEditorProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange' | 'content'> {
15
+ /** Initial HTML content. Updates are NOT reactive — use `onChange` for controlled state. */
10
16
  content?: string;
11
17
  placeholder?: string;
18
+ /** Called with the editor's HTML string whenever content changes. */
12
19
  onChange?: (html: string) => void;
13
20
  className?: string;
21
+ /** Set to false to render in read-only mode (e.g. for previewing). */
14
22
  editable?: boolean;
15
23
  /** Called when an image is pasted/dropped. Return a URL. If not provided, images inline as base64. */
16
24
  onImageUpload?: (file: File) => Promise<string>;
@@ -22,11 +30,11 @@ export interface RichTextEditorProps extends Omit<React.ComponentPropsWithoutRef
22
30
  }>;
23
31
  /** Whitelist of toolbar items to display. Omit to show all. */
24
32
  toolbar?: ToolbarItem[];
25
- /** Static list of mentionable items */
33
+ /** Static list of mentionable items (shown when user types @). */
26
34
  mentions?: MentionItem[];
27
- /** Async mention search. Takes precedence over static list. */
35
+ /** Async mention search. Takes precedence over static `mentions` list. */
28
36
  onMentionSearch?: (query: string) => Promise<MentionItem[]>;
29
- /** Called when a mention is selected from the suggestion dropdown */
37
+ /** Called when a mention is selected from the suggestion dropdown. */
30
38
  onMentionSelect?: (item: MentionItem) => void;
31
39
  }
32
40
  declare const RichTextEditor: React.ForwardRefExoticComponent<RichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"rich-text-editor.d.ts","sourceRoot":"","sources":["../../src/composed/rich-text-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA0V9B,MAAM,MAAM,WAAW,GACnB,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GACxD,IAAI,GAAG,IAAI,GAAG,YAAY,GAC1B,YAAY,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,GACvD,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAChC,WAAW,GAAG,aAAa,GAAG,YAAY,GAC1C,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;AAE7B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EA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