@devalok/shilp-sutra 0.31.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 (233) hide show
  1. package/dist/_chunks/badge-group.js +123 -172
  2. package/dist/_chunks/document-preview.js +92 -0
  3. package/dist/_chunks/file-preview.js +511 -0
  4. package/dist/_chunks/image-preview.js +90 -0
  5. package/dist/_chunks/primitives.js +109 -109
  6. package/dist/_chunks/stat-row.js +144 -124
  7. package/dist/_chunks/use-calendar.js +558 -490
  8. package/dist/ai/block-renderer.d.ts +2 -1
  9. package/dist/ai/block-renderer.d.ts.map +1 -1
  10. package/dist/ai/block-renderer.js +30 -29
  11. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  12. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  13. package/dist/ai/blocks/divider.d.ts.map +1 -1
  14. package/dist/ai/blocks/error.d.ts.map +1 -1
  15. package/dist/ai/blocks/info.d.ts.map +1 -1
  16. package/dist/ai/blocks/loading.d.ts.map +1 -1
  17. package/dist/ai/blocks/stat-row.d.ts.map +1 -1
  18. package/dist/ai/blocks/success.d.ts.map +1 -1
  19. package/dist/ai/blocks/text.d.ts.map +1 -1
  20. package/dist/ai/command-bar.d.ts +18 -0
  21. package/dist/ai/command-bar.d.ts.map +1 -1
  22. package/dist/ai/command-bar.js +126 -125
  23. package/dist/ai/conversation.d.ts +13 -1
  24. package/dist/ai/conversation.d.ts.map +1 -1
  25. package/dist/ai/conversation.js +78 -78
  26. package/dist/ai/types.d.ts +0 -1
  27. package/dist/ai/types.d.ts.map +1 -1
  28. package/dist/ai/types.js +0 -1
  29. package/dist/composed/bulk-action-bar.d.ts +6 -4
  30. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  31. package/dist/composed/bulk-action-bar.js +102 -58
  32. package/dist/composed/command-palette.d.ts +9 -0
  33. package/dist/composed/command-palette.d.ts.map +1 -1
  34. package/dist/composed/command-palette.js +68 -68
  35. package/dist/composed/confirm-dialog.d.ts +1 -1
  36. package/dist/composed/confirm-dialog.d.ts.map +1 -1
  37. package/dist/composed/confirm-dialog.js +10 -10
  38. package/dist/composed/date-picker/date-picker.d.ts +11 -1
  39. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  40. package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
  41. package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
  42. package/dist/composed/deadline-indicator.d.ts +1 -1
  43. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  44. package/dist/composed/deadline-indicator.js +39 -36
  45. package/dist/composed/emoji-picker.d.ts +6 -0
  46. package/dist/composed/emoji-picker.d.ts.map +1 -1
  47. package/dist/composed/emoji-picker.js +22 -20
  48. package/dist/composed/error-boundary.d.ts +21 -1
  49. package/dist/composed/error-boundary.d.ts.map +1 -1
  50. package/dist/composed/error-boundary.js +47 -32
  51. package/dist/composed/file-preview/audio-preview.d.ts +7 -0
  52. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
  53. package/dist/composed/file-preview/document-preview.d.ts +7 -0
  54. package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
  55. package/dist/composed/file-preview/embed-preview.d.ts +7 -0
  56. package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
  57. package/dist/composed/file-preview/image-preview.d.ts +7 -0
  58. package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
  59. package/dist/composed/file-preview/shared.d.ts +20 -0
  60. package/dist/composed/file-preview/shared.d.ts.map +1 -0
  61. package/dist/composed/file-preview/video-preview.d.ts +6 -0
  62. package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
  63. package/dist/composed/file-preview.d.ts.map +1 -1
  64. package/dist/composed/file-preview.js +10 -662
  65. package/dist/composed/filter-bar.d.ts +10 -2
  66. package/dist/composed/filter-bar.d.ts.map +1 -1
  67. package/dist/composed/filter-bar.js +42 -43
  68. package/dist/composed/form-section.d.ts +1 -1
  69. package/dist/composed/form-section.d.ts.map +1 -1
  70. package/dist/composed/form-section.js +22 -21
  71. package/dist/composed/index.d.ts +2 -2
  72. package/dist/composed/index.d.ts.map +1 -1
  73. package/dist/composed/index.js +58 -57
  74. package/dist/composed/inline-edit.d.ts +1 -1
  75. package/dist/composed/inline-edit.d.ts.map +1 -1
  76. package/dist/composed/inline-edit.js +33 -32
  77. package/dist/composed/markdown-viewer.d.ts +1 -1
  78. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  79. package/dist/composed/markdown-viewer.js +60 -59
  80. package/dist/composed/master-detail.d.ts +11 -7
  81. package/dist/composed/master-detail.d.ts.map +1 -1
  82. package/dist/composed/master-detail.js +123 -84
  83. package/dist/composed/responsive-overlay.d.ts +8 -0
  84. package/dist/composed/responsive-overlay.d.ts.map +1 -1
  85. package/dist/composed/rich-text-editor.d.ts +11 -3
  86. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  87. package/dist/composed/rich-text-editor.js +21 -20
  88. package/dist/composed/schedule-view.d.ts +9 -1
  89. package/dist/composed/schedule-view.d.ts.map +1 -1
  90. package/dist/hooks/index.d.ts +2 -0
  91. package/dist/hooks/index.d.ts.map +1 -1
  92. package/dist/hooks/index.js +8 -4
  93. package/dist/hooks/use-touch-device.d.ts +12 -0
  94. package/dist/hooks/use-touch-device.d.ts.map +1 -0
  95. package/dist/hooks/use-touch-device.js +13 -0
  96. package/dist/hooks/use-viewport-height.d.ts +11 -0
  97. package/dist/hooks/use-viewport-height.d.ts.map +1 -0
  98. package/dist/hooks/use-viewport-height.js +16 -0
  99. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  100. package/dist/shell/bottom-navbar.js +72 -63
  101. package/dist/shell/command-registry.d.ts.map +1 -1
  102. package/dist/shell/notification-center.d.ts.map +1 -1
  103. package/dist/shell/notification-center.js +77 -77
  104. package/dist/shell/top-bar.d.ts +2 -2
  105. package/dist/shell/top-bar.d.ts.map +1 -1
  106. package/dist/shell/top-bar.js +61 -60
  107. package/dist/tailwind/index.cjs +51 -7
  108. package/dist/tailwind/preset.d.ts.map +1 -1
  109. package/dist/tailwind/preset.js +51 -7
  110. package/dist/tokens/primitives.css +3 -1
  111. package/dist/tokens/semantic.css +16 -13
  112. package/dist/ui/autocomplete.d.ts.map +1 -1
  113. package/dist/ui/autocomplete.js +38 -39
  114. package/dist/ui/badge.d.ts +104 -2
  115. package/dist/ui/badge.d.ts.map +1 -1
  116. package/dist/ui/banner.d.ts.map +1 -1
  117. package/dist/ui/banner.js +8 -7
  118. package/dist/ui/button.d.ts +2 -2
  119. package/dist/ui/button.d.ts.map +1 -1
  120. package/dist/ui/button.js +54 -74
  121. package/dist/ui/card.js +24 -24
  122. package/dist/ui/charts/area-chart.d.ts +2 -0
  123. package/dist/ui/charts/area-chart.d.ts.map +1 -1
  124. package/dist/ui/charts/bar-chart.d.ts +2 -0
  125. package/dist/ui/charts/bar-chart.d.ts.map +1 -1
  126. package/dist/ui/charts/chart-container.d.ts +2 -0
  127. package/dist/ui/charts/chart-container.d.ts.map +1 -1
  128. package/dist/ui/charts/index.js +583 -577
  129. package/dist/ui/charts/line-chart.d.ts +2 -0
  130. package/dist/ui/charts/line-chart.d.ts.map +1 -1
  131. package/dist/ui/charts/pie-chart.d.ts +2 -0
  132. package/dist/ui/charts/pie-chart.d.ts.map +1 -1
  133. package/dist/ui/charts/radar-chart.d.ts +2 -0
  134. package/dist/ui/charts/radar-chart.d.ts.map +1 -1
  135. package/dist/ui/checkbox.d.ts +2 -0
  136. package/dist/ui/checkbox.d.ts.map +1 -1
  137. package/dist/ui/checkbox.js +36 -27
  138. package/dist/ui/color-input.js +5 -5
  139. package/dist/ui/combobox.d.ts +6 -1
  140. package/dist/ui/combobox.d.ts.map +1 -1
  141. package/dist/ui/combobox.js +1 -1
  142. package/dist/ui/context-menu.js +1 -1
  143. package/dist/ui/data-table-body.d.ts +12 -0
  144. package/dist/ui/data-table-body.d.ts.map +1 -0
  145. package/dist/ui/data-table-body.js +219 -0
  146. package/dist/ui/data-table-bulk-actions.d.ts +19 -0
  147. package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
  148. package/dist/ui/data-table-bulk-actions.js +61 -0
  149. package/dist/ui/data-table-card.d.ts +9 -0
  150. package/dist/ui/data-table-card.d.ts.map +1 -0
  151. package/dist/ui/data-table-card.js +73 -0
  152. package/dist/ui/data-table-context.d.ts +62 -0
  153. package/dist/ui/data-table-context.d.ts.map +1 -0
  154. package/dist/ui/data-table-context.js +48 -0
  155. package/dist/ui/data-table-header.d.ts +10 -0
  156. package/dist/ui/data-table-header.d.ts.map +1 -0
  157. package/dist/ui/data-table-header.js +141 -0
  158. package/dist/ui/data-table-pagination.d.ts +13 -0
  159. package/dist/ui/data-table-pagination.d.ts.map +1 -0
  160. package/dist/ui/data-table-pagination.js +84 -0
  161. package/dist/ui/data-table.d.ts +11 -9
  162. package/dist/ui/data-table.d.ts.map +1 -1
  163. package/dist/ui/data-table.js +258 -573
  164. package/dist/ui/dialog.d.ts +6 -2
  165. package/dist/ui/dialog.d.ts.map +1 -1
  166. package/dist/ui/dialog.js +84 -82
  167. package/dist/ui/dropdown-menu.js +1 -1
  168. package/dist/ui/hover-card.d.ts +7 -0
  169. package/dist/ui/hover-card.d.ts.map +1 -1
  170. package/dist/ui/hover-card.js +3 -3
  171. package/dist/ui/icon-group.d.ts +2 -4
  172. package/dist/ui/icon-group.d.ts.map +1 -1
  173. package/dist/ui/icon-group.js +22 -23
  174. package/dist/ui/index.d.ts +1 -2
  175. package/dist/ui/index.d.ts.map +1 -1
  176. package/dist/ui/index.js +94 -99
  177. package/dist/ui/label.js +1 -1
  178. package/dist/ui/lib/bottom-sheet.d.ts +16 -0
  179. package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
  180. package/dist/ui/menubar.d.ts.map +1 -1
  181. package/dist/ui/menubar.js +64 -73
  182. package/dist/ui/navigation-menu.d.ts.map +1 -1
  183. package/dist/ui/navigation-menu.js +40 -44
  184. package/dist/ui/number-input.d.ts.map +1 -1
  185. package/dist/ui/number-input.js +19 -17
  186. package/dist/ui/popover.d.ts.map +1 -1
  187. package/dist/ui/popover.js +107 -32
  188. package/dist/ui/progress-ring.d.ts.map +1 -1
  189. package/dist/ui/progress-ring.js +80 -80
  190. package/dist/ui/progress.js +4 -4
  191. package/dist/ui/radio.d.ts +5 -2
  192. package/dist/ui/radio.d.ts.map +1 -1
  193. package/dist/ui/radio.js +29 -20
  194. package/dist/ui/search-input.d.ts.map +1 -1
  195. package/dist/ui/search-input.js +13 -12
  196. package/dist/ui/segmented-control.d.ts +6 -108
  197. package/dist/ui/segmented-control.d.ts.map +1 -1
  198. package/dist/ui/segmented-control.js +86 -272
  199. package/dist/ui/select.js +5 -5
  200. package/dist/ui/separator.js +5 -5
  201. package/dist/ui/sheet.d.ts +2 -0
  202. package/dist/ui/sheet.d.ts.map +1 -1
  203. package/dist/ui/sheet.js +102 -84
  204. package/dist/ui/sidebar.d.ts.map +1 -1
  205. package/dist/ui/sidebar.js +200 -175
  206. package/dist/ui/slider.js +14 -14
  207. package/dist/ui/status-dot.js +8 -8
  208. package/dist/ui/stepper.d.ts.map +1 -1
  209. package/dist/ui/stepper.js +33 -31
  210. package/dist/ui/switch.js +3 -3
  211. package/dist/ui/tabs.js +6 -6
  212. package/dist/ui/toast-types.d.ts +0 -1
  213. package/dist/ui/toast-types.d.ts.map +1 -1
  214. package/dist/ui/toast-types.js +0 -1
  215. package/dist/ui/toast.d.ts.map +1 -1
  216. package/dist/ui/toast.js +156 -150
  217. package/dist/ui/toggle-group.js +1 -1
  218. package/dist/ui/toggle.js +1 -1
  219. package/dist/ui/tooltip.js +3 -3
  220. package/docs/components/ui/data-table-body.md +13 -0
  221. package/docs/components/ui/data-table-bulk-actions.md +13 -0
  222. package/docs/components/ui/data-table-card.md +13 -0
  223. package/docs/components/ui/data-table-context.md +13 -0
  224. package/docs/components/ui/data-table-header.md +13 -0
  225. package/docs/components/ui/data-table-pagination.md +13 -0
  226. package/llms-full.txt +79 -48
  227. package/llms.txt +32 -0
  228. package/package.json +1 -6
  229. package/dist/ui/chip.d.ts +0 -19
  230. package/dist/ui/chip.d.ts.map +0 -1
  231. package/dist/ui/chip.js +0 -14
  232. package/dist/ui/lib/use-ripple.d.ts +0 -14
  233. package/dist/ui/lib/use-ripple.d.ts.map +0 -1
@@ -1,32 +1,32 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as k } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { cn as m } from "../ui/lib/utils.js";
5
5
  import { springs as u } from "../ui/lib/motion.js";
6
6
  import { Skeleton as f } from "../ui/skeleton.js";
7
- import { Popover as k, PopoverTrigger as S, PopoverContent as v } from "../ui/popover.js";
7
+ import { Popover as P, PopoverTrigger as v, PopoverContent as S } from "../ui/popover.js";
8
8
  import { A as x, m as h } from "../_chunks/framer.js";
9
- const P = n.lazy(
9
+ const j = n.lazy(
10
10
  () => import("@emoji-mart/react").then((t) => ({
11
11
  default: t.default
12
12
  }))
13
13
  );
14
- function j(t) {
14
+ function E(t) {
15
15
  return t !== "auto" ? t : typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light";
16
16
  }
17
- function w({
17
+ function y({
18
18
  onSelect: t,
19
19
  theme: r = "auto",
20
20
  previewPosition: s = "none",
21
21
  skinTonePosition: c = "search",
22
22
  className: o
23
23
  }) {
24
- const [d, l] = n.useState(!1), [a, i] = n.useState(null);
24
+ const [d, l] = n.useState(!1), [i, a] = n.useState(null);
25
25
  return n.useEffect(() => {
26
26
  l(!0), import("@emoji-mart/data").then((p) => {
27
- i(p.default);
27
+ a(p.default);
28
28
  });
29
- }, []), /* @__PURE__ */ e(x, { mode: "wait", children: d && !!a ? /* @__PURE__ */ e(
29
+ }, []), /* @__PURE__ */ e(x, { mode: "wait", children: d && !!i ? /* @__PURE__ */ e(
30
30
  h.div,
31
31
  {
32
32
  initial: { opacity: 0, scale: 0.95 },
@@ -38,11 +38,11 @@ function w({
38
38
  {
39
39
  fallback: /* @__PURE__ */ e("div", { className: m("rounded-ds-lg", o), children: /* @__PURE__ */ e(f, { className: "h-[435px] w-[352px] rounded-ds-lg" }) }),
40
40
  children: /* @__PURE__ */ e(
41
- P,
41
+ j,
42
42
  {
43
- data: a,
43
+ data: i,
44
44
  onEmojiSelect: t,
45
- theme: j(r),
45
+ theme: E(r),
46
46
  previewPosition: s,
47
47
  skinTonePosition: c
48
48
  }
@@ -64,7 +64,7 @@ function w({
64
64
  "skeleton"
65
65
  ) });
66
66
  }
67
- function z({
67
+ function w({
68
68
  children: t,
69
69
  align: r = "start",
70
70
  onSelect: s,
@@ -73,20 +73,20 @@ function z({
73
73
  skinTonePosition: d,
74
74
  className: l
75
75
  }) {
76
- const [a, i] = n.useState(!1);
77
- return /* @__PURE__ */ g(k, { open: a, onOpenChange: i, children: [
78
- /* @__PURE__ */ e(S, { asChild: !0, children: t }),
76
+ const [i, a] = n.useState(!1);
77
+ return /* @__PURE__ */ k(P, { open: i, onOpenChange: a, children: [
78
+ /* @__PURE__ */ e(v, { asChild: !0, children: t }),
79
79
  /* @__PURE__ */ e(
80
- v,
80
+ S,
81
81
  {
82
82
  align: r,
83
83
  className: "w-auto border-none bg-transparent p-0 shadow-none",
84
84
  sideOffset: 8,
85
85
  children: /* @__PURE__ */ e(
86
- w,
86
+ y,
87
87
  {
88
88
  onSelect: (p) => {
89
- s(p), i(!1);
89
+ s(p), a(!1);
90
90
  },
91
91
  theme: c,
92
92
  previewPosition: o,
@@ -98,7 +98,9 @@ function z({
98
98
  )
99
99
  ] });
100
100
  }
101
+ y.displayName = "EmojiPicker";
102
+ w.displayName = "EmojiPickerPopover";
101
103
  export {
102
- w as EmojiPicker,
103
- z as EmojiPickerPopover
104
+ y as EmojiPicker,
105
+ w as EmojiPickerPopover
104
106
  };
@@ -5,5 +5,25 @@ export interface ErrorDisplayProps extends React.ComponentPropsWithoutRef<'div'>
5
5
  onReset?: () => void;
6
6
  }
7
7
  declare const ErrorDisplay: React.ForwardRefExoticComponent<ErrorDisplayProps & React.RefAttributes<HTMLDivElement>>;
8
- export { ErrorDisplay };
8
+ interface ErrorBoundaryProps {
9
+ children: React.ReactNode;
10
+ /** Optional callback when the user clicks "Try Again" */
11
+ onReset?: () => void;
12
+ /** Optional custom fallback — receives the caught error. Defaults to ErrorDisplay. */
13
+ fallback?: (props: {
14
+ error: unknown;
15
+ onReset?: () => void;
16
+ }) => React.ReactNode;
17
+ }
18
+ interface ErrorBoundaryState {
19
+ error: unknown | null;
20
+ }
21
+ declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
22
+ constructor(props: ErrorBoundaryProps);
23
+ static getDerivedStateFromError(error: unknown): ErrorBoundaryState;
24
+ private handleReset;
25
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
26
+ }
27
+ export { ErrorDisplay, ErrorBoundary };
28
+ export type { ErrorBoundaryProps };
9
29
  //# sourceMappingURL=error-boundary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/composed/error-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC9E,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAmFD,QAAA,MAAM,YAAY,0FA2EjB,CAAA;AAID,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/composed/error-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC9E,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAmFD,QAAA,MAAM,YAAY,0FA2EjB,CAAA;AAID,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAA;CAChF;AAED,UAAU,kBAAkB;IAC1B,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;CACtB;AAED,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;gBACrE,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB;IAInE,OAAO,CAAC,WAAW,CAGlB;IAED,MAAM;CASP;AAED,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,CAAA;AACtC,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,35 +1,35 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import * as p from "react";
4
- import { IconAlertTriangle as x, IconServerOff as b, IconBan as h, IconFileUnknown as v } from "@tabler/icons-react";
5
- import { Icon as y } from "../ui/icon.js";
6
- import { Button as w } from "../ui/button.js";
2
+ import { jsx as s, jsxs as n } from "react/jsx-runtime";
3
+ import * as l from "react";
4
+ import { IconAlertTriangle as x, IconServerOff as b, IconBan as v, IconFileUnknown as y } from "@tabler/icons-react";
5
+ import { Icon as w } from "../ui/icon.js";
6
+ import { Button as C } from "../ui/button.js";
7
7
  import { cn as c } from "../ui/lib/utils.js";
8
- function N(e) {
8
+ function E(e) {
9
9
  if (e && typeof e == "object" && "status" in e && typeof e.status == "number")
10
10
  return e.status;
11
11
  }
12
- function C(e) {
12
+ function N(e) {
13
13
  if (e instanceof Error)
14
14
  return e.message;
15
15
  if (e && typeof e == "object" && "data" in e) {
16
- const s = e.data;
17
- if (typeof s == "string") return s;
18
- if (s && typeof s == "object" && "message" in s)
19
- return String(s.message);
16
+ const t = e.data;
17
+ if (typeof t == "string") return t;
18
+ if (t && typeof t == "object" && "message" in t)
19
+ return String(t.message);
20
20
  }
21
21
  if (typeof e == "string")
22
22
  return e;
23
23
  }
24
- function E(e) {
24
+ function k(e) {
25
25
  if (e instanceof Error)
26
26
  return e.stack;
27
27
  }
28
- function k(e) {
28
+ function S(e) {
29
29
  switch (e) {
30
30
  case 404:
31
31
  return {
32
- icon: v,
32
+ icon: y,
33
33
  title: "Page not found",
34
34
  message: "The page you are looking for does not exist or has been moved.",
35
35
  bgClass: "bg-accent-2",
@@ -37,7 +37,7 @@ function k(e) {
37
37
  };
38
38
  case 403:
39
39
  return {
40
- icon: h,
40
+ icon: v,
41
41
  title: "Access denied",
42
42
  message: "You do not have permission to view this page. Contact your administrator if you believe this is a mistake.",
43
43
  bgClass: "bg-warning-3",
@@ -61,25 +61,25 @@ function k(e) {
61
61
  };
62
62
  }
63
63
  }
64
- const S = p.forwardRef(
65
- function({ error: s, onReset: a, className: l, ...d }, f) {
66
- const o = N(s), g = C(s), i = E(s), m = typeof process < "u" && process.env && process.env.NODE_ENV === "development", r = k(o), u = r.icon;
67
- return /* @__PURE__ */ t("div", { ref: f, ...d, className: c("flex min-h-[60vh] items-center justify-center p-ds-05", l), children: /* @__PURE__ */ n(
64
+ const d = l.forwardRef(
65
+ function({ error: t, onReset: a, className: f, ...u }, m) {
66
+ const o = E(t), g = N(t), i = k(t), p = typeof process < "u" && process.env && process.env.NODE_ENV === "development", r = S(o), h = r.icon;
67
+ return /* @__PURE__ */ s("div", { ref: m, ...u, className: c("flex min-h-[60vh] items-center justify-center p-ds-05", f), children: /* @__PURE__ */ n(
68
68
  "div",
69
69
  {
70
70
  className: "flex w-full max-w-lg flex-col items-center gap-ds-06 rounded-ds-xl border border-surface-border-strong bg-surface-raised p-ds-07 text-center shadow-raised",
71
71
  children: [
72
- /* @__PURE__ */ t(
72
+ /* @__PURE__ */ s(
73
73
  "div",
74
74
  {
75
75
  className: c(
76
76
  "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-2xl",
77
77
  r.bgClass
78
78
  ),
79
- children: /* @__PURE__ */ t(
80
- y,
79
+ children: /* @__PURE__ */ s(
80
+ w,
81
81
  {
82
- icon: u,
82
+ icon: h,
83
83
  size: "2xl",
84
84
  className: r.iconClass
85
85
  }
@@ -91,11 +91,11 @@ const S = p.forwardRef(
91
91
  "Error ",
92
92
  o
93
93
  ] }),
94
- /* @__PURE__ */ t("h2", { className: "text-ds-2xl font-semibold text-surface-fg", children: r.title }),
95
- /* @__PURE__ */ t("p", { className: "text-ds-base text-surface-fg-subtle", children: g || r.message })
94
+ /* @__PURE__ */ s("h2", { className: "text-ds-2xl font-semibold text-surface-fg", children: r.title }),
95
+ /* @__PURE__ */ s("p", { className: "text-ds-base text-surface-fg-subtle", children: g || r.message })
96
96
  ] }),
97
- a && /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-04", children: /* @__PURE__ */ t(
98
- w,
97
+ a && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: /* @__PURE__ */ s(
98
+ C,
99
99
  {
100
100
  variant: "outline",
101
101
  size: "md",
@@ -103,16 +103,31 @@ const S = p.forwardRef(
103
103
  children: "Try Again"
104
104
  }
105
105
  ) }),
106
- m && i && /* @__PURE__ */ n("div", { className: "w-full overflow-auto rounded-ds-lg border border-surface-border-strong bg-surface-raised p-ds-05 text-left", children: [
107
- /* @__PURE__ */ t("p", { className: "text-ds-sm mb-ds-03 font-semibold text-surface-fg", children: "Stack Trace (development only)" }),
108
- /* @__PURE__ */ t("pre", { className: "whitespace-pre-wrap text-ds-sm text-surface-fg-subtle", children: i })
106
+ p && i && /* @__PURE__ */ n("div", { className: "w-full overflow-auto rounded-ds-lg border border-surface-border-strong bg-surface-raised p-ds-05 text-left", children: [
107
+ /* @__PURE__ */ s("p", { className: "text-ds-sm mb-ds-03 font-semibold text-surface-fg", children: "Stack Trace (development only)" }),
108
+ /* @__PURE__ */ s("pre", { className: "whitespace-pre-wrap text-ds-sm text-surface-fg-subtle", children: i })
109
109
  ] })
110
110
  ]
111
111
  }
112
112
  ) });
113
113
  }
114
114
  );
115
- S.displayName = "ErrorDisplay";
115
+ d.displayName = "ErrorDisplay";
116
+ class A extends l.Component {
117
+ constructor(t) {
118
+ super(t), this.state = { error: null };
119
+ }
120
+ static getDerivedStateFromError(t) {
121
+ return { error: t };
122
+ }
123
+ handleReset = () => {
124
+ this.setState({ error: null }), this.props.onReset?.();
125
+ };
126
+ render() {
127
+ return this.state.error !== null ? this.props.fallback ? this.props.fallback({ error: this.state.error, onReset: this.handleReset }) : /* @__PURE__ */ s(d, { error: this.state.error, onReset: this.handleReset }) : this.props.children;
128
+ }
129
+ }
116
130
  export {
117
- S as ErrorDisplay
131
+ A as ErrorBoundary,
132
+ d as ErrorDisplay
118
133
  };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ export default function AudioPreview({ url, fileName, onError }: {
3
+ url: string;
4
+ fileName?: string;
5
+ onError?: (msg: string) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=audio-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/audio-preview.tsx"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8KnI"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ export default function DocumentPreview({ url, initialPage, onError }: {
3
+ url: string;
4
+ initialPage: number;
5
+ onError?: (msg: string) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=document-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/document-preview.tsx"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CAmG3I"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ export default function EmbedPreview({ url, embedUrl, onError }: {
3
+ url: string;
4
+ embedUrl: string;
5
+ onError?: (msg: string) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=embed-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/embed-preview.tsx"],"names":[],"mappings":"AAYA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8BlI"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ export default function ImagePreview({ url, alt, onError }: {
3
+ url: string;
4
+ alt?: string;
5
+ onError?: (msg: string) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=image-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/image-preview.tsx"],"names":[],"mappings":"AAuBA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA6GzH"}
@@ -0,0 +1,20 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ export declare function ErrorFallback({ message, url }: {
4
+ message: string;
5
+ url: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Toolbar({ children, className }: {
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ToolbarDivider(): import("react/jsx-runtime").JSX.Element;
12
+ export declare function VolumeControl({ volume, muted, onVolumeChange, onMuteToggle, variant, }: {
13
+ volume: number;
14
+ muted: boolean;
15
+ onVolumeChange: (v: number) => void;
16
+ onMuteToggle: () => void;
17
+ variant?: 'light' | 'dark';
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ export declare function formatTime(s: number): string;
20
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/shared.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,2CAa/E;AAMD,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAcjG;AAED,wBAAgB,cAAc,4CAE7B;AAOD,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAK,EACL,cAAc,EACd,YAAY,EACZ,OAAiB,GAClB,EAAE;IACD,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC3B,2CAuEA;AAMD,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAO5C"}
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ export default function VideoPreview({ url, onError }: {
3
+ url: string;
4
+ onError?: (msg: string) => void;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=video-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"video-preview.d.ts","sourceRoot":"","sources":["../../../src/composed/file-preview/video-preview.tsx"],"names":[],"mappings":"AAmBA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CA8NtG"}
@@ -1 +1 @@
1
- {"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/composed/file-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA4B9B,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAC7F,GAAG,EAAE,MAAM,CAAA;IACX,iDAAiD;IACjD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAg2BD,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,GAAG,EACH,WAAe,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuClB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/composed/file-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAqB9B,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAC7F,GAAG,EAAE,MAAM,CAAA;IACX,iDAAiD;IACjD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AA8CD,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,GAAG,EACH,WAAe,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuClB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,QAAQ,EAAE,CAAA"}