@orion-ds/react 4.2.8 → 4.2.10

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 (351) hide show
  1. package/dist/components/Accordion/Accordion.module.css +1 -1
  2. package/dist/components/Card/Card.d.ts.map +1 -1
  3. package/dist/components/Card/Card.module.css +1 -1
  4. package/dist/components/Card/Card.stories.d.ts.map +1 -1
  5. package/dist/components/Card/Card.types.d.ts +2 -0
  6. package/dist/components/Card/Card.types.d.ts.map +1 -1
  7. package/dist/components/CodeEditor/CodeEditor.d.ts.map +1 -1
  8. package/dist/components/CodeEditor/CodeEditor.types.d.ts.map +1 -1
  9. package/dist/components/NavTree/NavTree.d.ts.map +1 -1
  10. package/dist/components/NavTree/NavTree.module.css +1 -1
  11. package/dist/components/NavTree/NavTree.stories.d.ts.map +1 -1
  12. package/dist/components/NavTree/NavTree.types.d.ts +2 -2
  13. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  14. package/dist/components/SearchInput/SearchInput.module.css +1 -1
  15. package/dist/components/SearchInput/SearchInput.stories.d.ts +1 -0
  16. package/dist/components/SearchInput/SearchInput.stories.d.ts.map +1 -1
  17. package/dist/components/SearchInput/SearchInput.types.d.ts +5 -1
  18. package/dist/components/SearchInput/SearchInput.types.d.ts.map +1 -1
  19. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  20. package/dist/components/Tabs/Tabs.module.css +1 -1
  21. package/dist/components/Tabs/Tabs.types.d.ts +6 -0
  22. package/dist/components/Tabs/Tabs.types.d.ts.map +1 -1
  23. package/dist/components/UserMenu/UserMenu.d.ts.map +1 -1
  24. package/dist/components/WorkspaceSwitcher/WorkspaceSwitcher.d.ts.map +1 -1
  25. package/dist/components/WorkspaceSwitcher/WorkspaceSwitcher.types.d.ts.map +1 -1
  26. package/dist/components/index.d.ts +1 -1
  27. package/dist/components/index.d.ts.map +1 -1
  28. package/dist/examples/LandingPage.example.d.ts.map +1 -1
  29. package/dist/hooks/useTheme.d.ts.map +1 -1
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index10.cjs +1 -1
  33. package/dist/index10.mjs +1 -1
  34. package/dist/index100.cjs +1 -1
  35. package/dist/index100.mjs +46 -33
  36. package/dist/index101.cjs +1 -1
  37. package/dist/index101.mjs +30 -24
  38. package/dist/index102.cjs +1 -1
  39. package/dist/index102.mjs +28 -28
  40. package/dist/index103.cjs +1 -1
  41. package/dist/index103.mjs +54 -40
  42. package/dist/index104.cjs +1 -1
  43. package/dist/index104.mjs +33 -53
  44. package/dist/index105.cjs +1 -1
  45. package/dist/index105.mjs +40 -58
  46. package/dist/index106.cjs +1 -1
  47. package/dist/index106.mjs +52 -30
  48. package/dist/index107.cjs +1 -1
  49. package/dist/index107.mjs +40 -20
  50. package/dist/index108.cjs +1 -1
  51. package/dist/index108.mjs +40 -18
  52. package/dist/index109.cjs +1 -1
  53. package/dist/index109.mjs +40 -30
  54. package/dist/index11.cjs +1 -1
  55. package/dist/index11.mjs +1 -1
  56. package/dist/index111.cjs +1 -1
  57. package/dist/index111.mjs +30 -46
  58. package/dist/index112.cjs +1 -1
  59. package/dist/index112.mjs +30 -52
  60. package/dist/index113.cjs +1 -1
  61. package/dist/index113.mjs +22 -28
  62. package/dist/index114.cjs +1 -1
  63. package/dist/index114.mjs +18 -44
  64. package/dist/index116.cjs +1 -1
  65. package/dist/index116.mjs +62 -30
  66. package/dist/index117.cjs +1 -1
  67. package/dist/index117.mjs +57 -32
  68. package/dist/index118.cjs +1 -1
  69. package/dist/index118.mjs +42 -33
  70. package/dist/index119.cjs +1 -1
  71. package/dist/index119.mjs +28 -30
  72. package/dist/index12.cjs +1 -1
  73. package/dist/index12.mjs +1 -1
  74. package/dist/index120.cjs +1 -1
  75. package/dist/index120.mjs +24 -35
  76. package/dist/index121.cjs +1 -1
  77. package/dist/index121.mjs +18 -36
  78. package/dist/index122.cjs +1 -1
  79. package/dist/index122.mjs +32 -20
  80. package/dist/index123.cjs +1 -1
  81. package/dist/index123.mjs +46 -14
  82. package/dist/index124.cjs +1 -1
  83. package/dist/index124.mjs +28 -27
  84. package/dist/index125.cjs +1 -1
  85. package/dist/index125.mjs +16 -14
  86. package/dist/index126.cjs +1 -1
  87. package/dist/index126.mjs +15 -37
  88. package/dist/index127.cjs +1 -1
  89. package/dist/index127.mjs +16 -28
  90. package/dist/index128.cjs +1 -1
  91. package/dist/index128.mjs +20 -24
  92. package/dist/index129.cjs +1 -1
  93. package/dist/index129.mjs +28 -28
  94. package/dist/index13.cjs +1 -1
  95. package/dist/index13.mjs +1 -1
  96. package/dist/index130.cjs +1 -1
  97. package/dist/index130.mjs +36 -28
  98. package/dist/index131.cjs +1 -1
  99. package/dist/index131.mjs +50 -28
  100. package/dist/index132.cjs +1 -1
  101. package/dist/index132.mjs +29 -41
  102. package/dist/index133.cjs +1 -1
  103. package/dist/index133.mjs +28 -52
  104. package/dist/index134.cjs +1 -1
  105. package/dist/index134.mjs +37 -37
  106. package/dist/index135.cjs +1 -1
  107. package/dist/index135.mjs +28 -50
  108. package/dist/index136.cjs +1 -1
  109. package/dist/index136.mjs +26 -18
  110. package/dist/index137.cjs +1 -1
  111. package/dist/index137.mjs +18 -154
  112. package/dist/index138.cjs +1 -1
  113. package/dist/index138.mjs +38 -218
  114. package/dist/index139.cjs +1 -1
  115. package/dist/index139.mjs +24 -28
  116. package/dist/index14.cjs +1 -1
  117. package/dist/index14.mjs +1 -1
  118. package/dist/index140.cjs +1 -1
  119. package/dist/index140.mjs +35 -42
  120. package/dist/index141.cjs +1 -1
  121. package/dist/index141.mjs +234 -44
  122. package/dist/index142.cjs +1 -1
  123. package/dist/index142.mjs +34 -17
  124. package/dist/index143.cjs +1 -1
  125. package/dist/index143.mjs +44 -47
  126. package/dist/index144.cjs +1 -1
  127. package/dist/index144.mjs +170 -64
  128. package/dist/index145.cjs +1 -1
  129. package/dist/index145.mjs +186 -31
  130. package/dist/index146.cjs +1 -1
  131. package/dist/index146.mjs +29 -41
  132. package/dist/index147.cjs +1 -1
  133. package/dist/index147.mjs +90 -32
  134. package/dist/index148.cjs +1 -1
  135. package/dist/index148.mjs +53 -57
  136. package/dist/index149.cjs +1 -1
  137. package/dist/index149.mjs +66 -62
  138. package/dist/index15.cjs +1 -1
  139. package/dist/index15.mjs +1 -1
  140. package/dist/index150.cjs +1 -1
  141. package/dist/index150.mjs +124 -42
  142. package/dist/index151.cjs +1 -1
  143. package/dist/index151.mjs +108 -24
  144. package/dist/index152.cjs +1 -1
  145. package/dist/index152.mjs +111 -40
  146. package/dist/index153.cjs +1 -1
  147. package/dist/index153.mjs +122 -20
  148. package/dist/index154.cjs +1 -1
  149. package/dist/index154.mjs +214 -76
  150. package/dist/index155.cjs +1 -1
  151. package/dist/index155.mjs +18 -67
  152. package/dist/index156.cjs +1 -1
  153. package/dist/index156.mjs +67 -65
  154. package/dist/index157.cjs +1 -1
  155. package/dist/index157.mjs +55 -40
  156. package/dist/index158.cjs +1 -1
  157. package/dist/index158.mjs +20 -234
  158. package/dist/index159.cjs +1 -1
  159. package/dist/index159.mjs +33 -34
  160. package/dist/index16.cjs +1 -1
  161. package/dist/index16.mjs +73 -69
  162. package/dist/index160.cjs +1 -1
  163. package/dist/index160.mjs +57 -44
  164. package/dist/index161.cjs +1 -1
  165. package/dist/index161.mjs +28 -170
  166. package/dist/index162.cjs +1 -1
  167. package/dist/index162.mjs +25 -186
  168. package/dist/index163.cjs +1 -1
  169. package/dist/index163.mjs +53 -29
  170. package/dist/index164.cjs +1 -1
  171. package/dist/index164.mjs +65 -90
  172. package/dist/index165.cjs +1 -1
  173. package/dist/index165.mjs +63 -53
  174. package/dist/index166.cjs +1 -1
  175. package/dist/index166.mjs +106 -66
  176. package/dist/index167.cjs +1 -1
  177. package/dist/index167.mjs +45 -124
  178. package/dist/index168.cjs +1 -1
  179. package/dist/index168.mjs +20 -108
  180. package/dist/index169.cjs +1 -1
  181. package/dist/index169.mjs +30 -111
  182. package/dist/index17.cjs +1 -1
  183. package/dist/index17.mjs +1 -1
  184. package/dist/index170.cjs +1 -1
  185. package/dist/index170.mjs +27 -122
  186. package/dist/index171.cjs +1 -1
  187. package/dist/index171.mjs +46 -214
  188. package/dist/index172.cjs +1 -1
  189. package/dist/index172.mjs +24 -106
  190. package/dist/index173.cjs +1 -1
  191. package/dist/index173.mjs +12 -22
  192. package/dist/index174.cjs +1 -1
  193. package/dist/index174.mjs +33 -18
  194. package/dist/index175.cjs +1 -1
  195. package/dist/index175.mjs +42 -64
  196. package/dist/index176.cjs +1 -1
  197. package/dist/index176.mjs +64 -18
  198. package/dist/index177.cjs +1 -1
  199. package/dist/index177.mjs +51 -55
  200. package/dist/index178.cjs +1 -1
  201. package/dist/index178.mjs +76 -12
  202. package/dist/index179.cjs +1 -1
  203. package/dist/index179.mjs +42 -38
  204. package/dist/index18.cjs +1 -1
  205. package/dist/index18.mjs +1 -1
  206. package/dist/index180.cjs +1 -1
  207. package/dist/index180.mjs +64 -26
  208. package/dist/index181.cjs +1 -1
  209. package/dist/index181.mjs +44 -45
  210. package/dist/index182.cjs +1 -1
  211. package/dist/index182.mjs +17 -17
  212. package/dist/index183.cjs +1 -1
  213. package/dist/index183.mjs +17 -17
  214. package/dist/index185.cjs +1 -1
  215. package/dist/index185.mjs +1 -1
  216. package/dist/index19.cjs +1 -1
  217. package/dist/index19.mjs +2 -2
  218. package/dist/index20.cjs +1 -1
  219. package/dist/index20.mjs +14 -14
  220. package/dist/index21.cjs +1 -1
  221. package/dist/index21.mjs +1 -1
  222. package/dist/index22.cjs +1 -1
  223. package/dist/index22.mjs +1 -1
  224. package/dist/index23.cjs +1 -1
  225. package/dist/index23.mjs +56 -36
  226. package/dist/index25.cjs +1 -1
  227. package/dist/index25.mjs +1 -1
  228. package/dist/index26.cjs +1 -1
  229. package/dist/index26.mjs +1 -1
  230. package/dist/index27.cjs +1 -1
  231. package/dist/index27.mjs +1 -1
  232. package/dist/index28.cjs +1 -1
  233. package/dist/index28.mjs +1 -1
  234. package/dist/index29.cjs +1 -1
  235. package/dist/index29.mjs +1 -1
  236. package/dist/index30.cjs +1 -1
  237. package/dist/index30.mjs +1 -1
  238. package/dist/index31.cjs +1 -1
  239. package/dist/index31.mjs +1 -1
  240. package/dist/index32.cjs +1 -1
  241. package/dist/index32.mjs +1 -1
  242. package/dist/index33.cjs +1 -1
  243. package/dist/index33.mjs +1 -1
  244. package/dist/index34.cjs +1 -1
  245. package/dist/index34.mjs +1 -1
  246. package/dist/index35.cjs +1 -1
  247. package/dist/index35.mjs +1 -1
  248. package/dist/index36.cjs +1 -1
  249. package/dist/index36.mjs +1 -1
  250. package/dist/index37.cjs +1 -1
  251. package/dist/index37.mjs +1 -1
  252. package/dist/index38.cjs +1 -1
  253. package/dist/index38.mjs +1 -1
  254. package/dist/index39.cjs +1 -1
  255. package/dist/index39.mjs +1 -1
  256. package/dist/index40.cjs +1 -1
  257. package/dist/index40.mjs +1 -1
  258. package/dist/index42.cjs +1 -1
  259. package/dist/index42.mjs +1 -1
  260. package/dist/index43.cjs +1 -1
  261. package/dist/index43.mjs +1 -1
  262. package/dist/index44.cjs +1 -1
  263. package/dist/index44.mjs +1 -1
  264. package/dist/index46.cjs +1 -1
  265. package/dist/index46.mjs +1 -1
  266. package/dist/index47.cjs +1 -1
  267. package/dist/index47.mjs +1 -1
  268. package/dist/index48.mjs +95 -31
  269. package/dist/index49.cjs +1 -1
  270. package/dist/index49.mjs +1 -1
  271. package/dist/index5.cjs +1 -1
  272. package/dist/index5.mjs +1 -1
  273. package/dist/index50.cjs +1 -1
  274. package/dist/index50.mjs +1 -1
  275. package/dist/index51.cjs +1 -1
  276. package/dist/index51.mjs +1 -1
  277. package/dist/index52.cjs +1 -1
  278. package/dist/index52.mjs +1 -1
  279. package/dist/index53.cjs +1 -1
  280. package/dist/index53.mjs +82 -78
  281. package/dist/index54.cjs +1 -1
  282. package/dist/index54.mjs +1 -1
  283. package/dist/index55.cjs +1 -1
  284. package/dist/index55.mjs +1 -1
  285. package/dist/index56.cjs +1 -1
  286. package/dist/index56.mjs +1 -1
  287. package/dist/index57.cjs +1 -1
  288. package/dist/index57.mjs +1 -1
  289. package/dist/index58.cjs +1 -1
  290. package/dist/index58.mjs +1 -1
  291. package/dist/index59.cjs +1 -1
  292. package/dist/index59.mjs +1 -1
  293. package/dist/index6.cjs +1 -1
  294. package/dist/index6.mjs +1 -1
  295. package/dist/index60.cjs +1 -1
  296. package/dist/index60.mjs +1 -1
  297. package/dist/index61.cjs +1 -1
  298. package/dist/index61.mjs +1 -1
  299. package/dist/index62.cjs +1 -1
  300. package/dist/index62.mjs +42 -39
  301. package/dist/index63.cjs +1 -1
  302. package/dist/index63.mjs +1 -1
  303. package/dist/index64.cjs +1 -1
  304. package/dist/index64.mjs +1 -1
  305. package/dist/index65.cjs +1 -1
  306. package/dist/index65.mjs +1 -1
  307. package/dist/index66.cjs +1 -1
  308. package/dist/index66.mjs +1 -1
  309. package/dist/index68.cjs +1 -1
  310. package/dist/index68.mjs +1 -1
  311. package/dist/index69.cjs +1 -1
  312. package/dist/index69.mjs +1 -1
  313. package/dist/index7.cjs +1 -1
  314. package/dist/index7.mjs +1 -1
  315. package/dist/index70.cjs +1 -1
  316. package/dist/index70.mjs +1 -1
  317. package/dist/index71.cjs +1 -1
  318. package/dist/index71.mjs +1 -1
  319. package/dist/index72.cjs +1 -1
  320. package/dist/index72.mjs +16 -14
  321. package/dist/index73.cjs +1 -1
  322. package/dist/index73.mjs +1 -1
  323. package/dist/index76.cjs +1 -1
  324. package/dist/index76.mjs +1 -1
  325. package/dist/index77.cjs +1 -1
  326. package/dist/index77.mjs +1 -1
  327. package/dist/index78.cjs +1 -1
  328. package/dist/index78.mjs +1 -1
  329. package/dist/index79.cjs +1 -1
  330. package/dist/index79.mjs +1 -1
  331. package/dist/index8.cjs +1 -1
  332. package/dist/index8.mjs +1 -1
  333. package/dist/index80.cjs +1 -1
  334. package/dist/index80.mjs +1 -1
  335. package/dist/index81.cjs +1 -1
  336. package/dist/index81.mjs +21 -3
  337. package/dist/index82.cjs +1 -1
  338. package/dist/index82.mjs +2 -2
  339. package/dist/index9.cjs +1 -1
  340. package/dist/index9.mjs +1 -1
  341. package/dist/index94.mjs +3 -1
  342. package/dist/index97.cjs +1 -1
  343. package/dist/index97.mjs +154 -24
  344. package/dist/index98.cjs +1 -1
  345. package/dist/index98.mjs +218 -46
  346. package/dist/index99.cjs +1 -1
  347. package/dist/index99.mjs +36 -55
  348. package/dist/styles.css +6 -5
  349. package/dist/theme.css +1 -0
  350. package/dist/tokens/brands.d.ts.map +1 -1
  351. package/package.json +4 -4
package/dist/index147.mjs CHANGED
@@ -1,35 +1,93 @@
1
- const e = "_trigger_1vu5m_2", t = "_triggerName_1vu5m_25", o = "_chevron_1vu5m_33", r = "_chevronOpen_1vu5m_39", _ = "_content_1vu5m_44", n = "_activeWorkspace_1vu5m_52", c = "_orgName_1vu5m_62", m = "_orgMeta_1vu5m_67", s = "_actionButtons_1vu5m_73", g = "_dividerWrapper_1vu5m_79", a = "_sectionLabel_1vu5m_84", v = "_orgList_1vu5m_93", i = "_orgItem_1vu5m_101", u = "_orgItemName_1vu5m_115", p = "_orgItemRole_1vu5m_120", I = {
2
- trigger: e,
3
- triggerName: t,
4
- chevron: o,
5
- chevronOpen: r,
6
- content: _,
7
- activeWorkspace: n,
8
- orgName: c,
9
- orgMeta: m,
10
- actionButtons: s,
11
- dividerWrapper: g,
12
- sectionLabel: a,
13
- orgList: v,
14
- orgItem: i,
15
- orgItemName: u,
16
- orgItemRole: p
1
+ import { jsxs as r, jsx as o, Fragment as d } from "react/jsx-runtime";
2
+ import { useState as g, useCallback as k } from "react";
3
+ import { Prism as x } from "react-syntax-highlighter";
4
+ import { oneLight as B, oneDark as b } from "react-syntax-highlighter/dist/esm/styles/prism";
5
+ import { Check as j, Copy as v } from "lucide-react";
6
+ import t from "./index141.mjs";
7
+ import { useThemeContext as L } from "./index75.mjs";
8
+ const N = (e) => e ? {
9
+ js: "javascript",
10
+ ts: "typescript",
11
+ jsx: "jsx",
12
+ tsx: "tsx",
13
+ py: "python",
14
+ rb: "ruby",
15
+ sh: "bash",
16
+ shell: "bash",
17
+ yml: "yaml",
18
+ md: "markdown"
19
+ }[e.toLowerCase()] || e.toLowerCase() : "text", w = ({
20
+ code: e,
21
+ language: s,
22
+ showLineNumbers: m = !1,
23
+ showCopyButton: p = !0,
24
+ maxHeight: h = "400px",
25
+ className: y,
26
+ ...C
27
+ }) => {
28
+ const [a, i] = g(!1);
29
+ let l = "dark";
30
+ try {
31
+ l = L().theme;
32
+ } catch {
33
+ }
34
+ const u = k(async () => {
35
+ try {
36
+ await navigator.clipboard.writeText(e), i(!0), setTimeout(() => i(!1), 2e3);
37
+ } catch (n) {
38
+ console.error("Failed to copy code:", n);
39
+ }
40
+ }, [e]), c = N(s), f = l === "light" ? B : b;
41
+ return /* @__PURE__ */ r(
42
+ "div",
43
+ {
44
+ className: [t.codeBlock, y].filter(Boolean).join(" "),
45
+ ...C,
46
+ children: [
47
+ /* @__PURE__ */ r("div", { className: t.codeBlockHeader, children: [
48
+ /* @__PURE__ */ o("span", { className: t.codeBlockLanguage, children: c }),
49
+ p && /* @__PURE__ */ o(
50
+ "button",
51
+ {
52
+ className: [t.codeBlockCopy, a && t.codeBlockCopied].filter(Boolean).join(" "),
53
+ onClick: u,
54
+ "aria-label": a ? "Copied!" : "Copy code",
55
+ children: a ? /* @__PURE__ */ r(d, { children: [
56
+ /* @__PURE__ */ o(j, { size: 14 }),
57
+ "Copied!"
58
+ ] }) : /* @__PURE__ */ r(d, { children: [
59
+ /* @__PURE__ */ o(v, { size: 14 }),
60
+ "Copy"
61
+ ] })
62
+ }
63
+ )
64
+ ] }),
65
+ /* @__PURE__ */ o("div", { className: t.codeBlockContent, style: { maxHeight: h }, children: /* @__PURE__ */ o(
66
+ x,
67
+ {
68
+ language: c,
69
+ style: f,
70
+ showLineNumbers: m,
71
+ customStyle: {
72
+ margin: 0,
73
+ padding: 0,
74
+ background: "transparent",
75
+ fontSize: "inherit",
76
+ lineHeight: "inherit"
77
+ },
78
+ codeTagProps: {
79
+ style: {
80
+ fontFamily: "var(--font-mono)"
81
+ }
82
+ },
83
+ children: e
84
+ }
85
+ ) })
86
+ ]
87
+ }
88
+ );
17
89
  };
90
+ w.displayName = "ChatCodeBlock";
18
91
  export {
19
- s as actionButtons,
20
- n as activeWorkspace,
21
- o as chevron,
22
- r as chevronOpen,
23
- _ as content,
24
- I as default,
25
- g as dividerWrapper,
26
- i as orgItem,
27
- u as orgItemName,
28
- p as orgItemRole,
29
- v as orgList,
30
- m as orgMeta,
31
- c as orgName,
32
- a as sectionLabel,
33
- e as trigger,
34
- t as triggerName
92
+ w as ChatCodeBlock
35
93
  };
package/dist/index148.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i="_quickActions_1iws7_8",o="_fixed_1iws7_12",n="_fabTrigger_1iws7_54",t="_fabTriggerIcon_1iws7_81",c="_fabTriggerIconRotate_1iws7_88",e="_fabActions_1iws7_92",_="_open_1iws7_103",a="_fabAction_1iws7_92",s="_fabActionIcon_1iws7_136",r="_fabActionLabel_1iws7_144",b="_bar_1iws7_154",A="_barAction_1iws7_165",u="_barActionIcon_1iws7_183",f="_barActionLabel_1iws7_191",g="_menuTrigger_1iws7_208",m="_menu_1iws7_208",w="_menuSlide_1iws7_1",l="_menuAction_1iws7_250",p="_menuActionIcon_1iws7_269",I="_menuActionLabel_1iws7_278",d="_actionDisabled_1iws7_301",T="_shortcut_1iws7_311",L={quickActions:i,fixed:o,"position-bottom-right":"_position-bottom-right_1iws7_17","position-bottom-left":"_position-bottom-left_1iws7_22","position-bottom-center":"_position-bottom-center_1iws7_27","position-top-right":"_position-top-right_1iws7_33","position-top-left":"_position-top-left_1iws7_38","variant-fab":"_variant-fab_1iws7_47",fabTrigger:n,fabTriggerIcon:t,fabTriggerIconRotate:c,fabActions:e,open:_,fabAction:a,fabActionIcon:s,fabActionLabel:r,"variant-bar":"_variant-bar_1iws7_154",bar:b,barAction:A,barActionIcon:u,barActionLabel:f,"variant-menu":"_variant-menu_1iws7_201",menuTrigger:g,menu:m,menuSlide:w,menuAction:l,menuActionIcon:p,menuActionLabel:I,"action-primary":"_action-primary_1iws7_289","action-danger":"_action-danger_1iws7_293",actionDisabled:d,shortcut:T};exports.actionDisabled=d;exports.bar=b;exports.barAction=A;exports.barActionIcon=u;exports.barActionLabel=f;exports.default=L;exports.fabAction=a;exports.fabActionIcon=s;exports.fabActionLabel=r;exports.fabActions=e;exports.fabTrigger=n;exports.fabTriggerIcon=t;exports.fabTriggerIconRotate=c;exports.fixed=o;exports.menu=m;exports.menuAction=l;exports.menuActionIcon=p;exports.menuActionLabel=I;exports.menuSlide=w;exports.menuTrigger=g;exports.open=_;exports.quickActions=i;exports.shortcut=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),d=require("react-markdown"),u=require("remark-gfm"),m=require("./index147.cjs"),g=require("./index141.cjs"),o=({content:s,className:c,...i})=>r.jsx("div",{className:[g.default.markdown,c].filter(Boolean).join(" "),...i,children:r.jsx(d,{remarkPlugins:[u],components:{code({className:e,children:t,...a}){const n=/language-(\w+)/.exec(e||"");if(!n)return r.jsx("code",{className:e,...a,children:t});const l=String(t).replace(/\n$/,"");return r.jsx(m.ChatCodeBlock,{code:l,language:n[1]})},pre({children:e}){return r.jsx(r.Fragment,{children:e})},a({href:e,children:t,...a}){const n=e?.startsWith("http");return r.jsx("a",{href:e,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...a,children:t})}},children:s})});o.displayName="ChatMarkdown";exports.ChatMarkdown=o;
package/dist/index148.mjs CHANGED
@@ -1,59 +1,55 @@
1
- const i = "_quickActions_1iws7_8", o = "_fixed_1iws7_12", n = "_fabTrigger_1iws7_54", t = "_fabTriggerIcon_1iws7_81", _ = "_fabTriggerIconRotate_1iws7_88", c = "_fabActions_1iws7_92", s = "_open_1iws7_103", a = "_fabAction_1iws7_92", e = "_fabActionIcon_1iws7_136", r = "_fabActionLabel_1iws7_144", b = "_bar_1iws7_154", A = "_barAction_1iws7_165", w = "_barActionIcon_1iws7_183", f = "_barActionLabel_1iws7_191", g = "_menuTrigger_1iws7_208", m = "_menu_1iws7_208", u = "_menuSlide_1iws7_1", l = "_menuAction_1iws7_250", p = "_menuActionIcon_1iws7_269", I = "_menuActionLabel_1iws7_278", d = "_actionDisabled_1iws7_301", T = "_shortcut_1iws7_311", L = {
2
- quickActions: i,
3
- fixed: o,
4
- "position-bottom-right": "_position-bottom-right_1iws7_17",
5
- "position-bottom-left": "_position-bottom-left_1iws7_22",
6
- "position-bottom-center": "_position-bottom-center_1iws7_27",
7
- "position-top-right": "_position-top-right_1iws7_33",
8
- "position-top-left": "_position-top-left_1iws7_38",
9
- "variant-fab": "_variant-fab_1iws7_47",
10
- fabTrigger: n,
11
- fabTriggerIcon: t,
12
- fabTriggerIconRotate: _,
13
- fabActions: c,
14
- open: s,
15
- fabAction: a,
16
- fabActionIcon: e,
17
- fabActionLabel: r,
18
- "variant-bar": "_variant-bar_1iws7_154",
19
- bar: b,
20
- barAction: A,
21
- barActionIcon: w,
22
- barActionLabel: f,
23
- "variant-menu": "_variant-menu_1iws7_201",
24
- menuTrigger: g,
25
- menu: m,
26
- menuSlide: u,
27
- menuAction: l,
28
- menuActionIcon: p,
29
- menuActionLabel: I,
30
- "action-primary": "_action-primary_1iws7_289",
31
- "action-danger": "_action-danger_1iws7_293",
32
- actionDisabled: d,
33
- shortcut: T
34
- };
1
+ import { jsx as e, Fragment as c } from "react/jsx-runtime";
2
+ import l from "react-markdown";
3
+ import d from "remark-gfm";
4
+ import { ChatCodeBlock as p } from "./index147.mjs";
5
+ import g from "./index141.mjs";
6
+ const f = ({
7
+ content: a,
8
+ className: i,
9
+ ...m
10
+ }) => /* @__PURE__ */ e(
11
+ "div",
12
+ {
13
+ className: [g.markdown, i].filter(Boolean).join(" "),
14
+ ...m,
15
+ children: /* @__PURE__ */ e(
16
+ l,
17
+ {
18
+ remarkPlugins: [d],
19
+ components: {
20
+ // Custom code block rendering
21
+ code({ className: r, children: o, ...t }) {
22
+ const n = /language-(\w+)/.exec(r || "");
23
+ if (!n)
24
+ return /* @__PURE__ */ e("code", { className: r, ...t, children: o });
25
+ const s = String(o).replace(/\n$/, "");
26
+ return /* @__PURE__ */ e(p, { code: s, language: n[1] });
27
+ },
28
+ // Custom pre rendering (remove wrapper for code blocks)
29
+ pre({ children: r }) {
30
+ return /* @__PURE__ */ e(c, { children: r });
31
+ },
32
+ // Custom link rendering (open in new tab)
33
+ a({ href: r, children: o, ...t }) {
34
+ const n = r?.startsWith("http");
35
+ return /* @__PURE__ */ e(
36
+ "a",
37
+ {
38
+ href: r,
39
+ target: n ? "_blank" : void 0,
40
+ rel: n ? "noopener noreferrer" : void 0,
41
+ ...t,
42
+ children: o
43
+ }
44
+ );
45
+ }
46
+ },
47
+ children: a
48
+ }
49
+ )
50
+ }
51
+ );
52
+ f.displayName = "ChatMarkdown";
35
53
  export {
36
- d as actionDisabled,
37
- b as bar,
38
- A as barAction,
39
- w as barActionIcon,
40
- f as barActionLabel,
41
- L as default,
42
- a as fabAction,
43
- e as fabActionIcon,
44
- r as fabActionLabel,
45
- c as fabActions,
46
- n as fabTrigger,
47
- t as fabTriggerIcon,
48
- _ as fabTriggerIconRotate,
49
- o as fixed,
50
- m as menu,
51
- l as menuAction,
52
- p as menuActionIcon,
53
- I as menuActionLabel,
54
- u as menuSlide,
55
- g as menuTrigger,
56
- s as open,
57
- i as quickActions,
58
- T as shortcut
54
+ f as ChatMarkdown
59
55
  };
package/dist/index149.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_navTree_6iya4_12",o="_header_6iya4_29",n="_footer_6iya4_36",t="_treeContent_6iya4_47",i="_section_6iya4_76",s="_sectionHeader_6iya4_81",d="_sectionHeaderNode_6iya4_100",c="_sectionChevron_6iya4_105",_="_sectionChevronOpen_6iya4_117",a="_sectionTitle_6iya4_122",r="_sectionTitleNode_6iya4_136",y="_sectionBody_6iya4_148",l="_sectionActions_6iya4_154",v="_node_6iya4_182",h="_nodeRow_6iya4_187",C="_nodeRowActive_6iya4_208",p="_nodeLabel_6iya4_216",O="_nodeChevron_6iya4_222",T="_nodeChevronOpen_6iya4_238",A="_nodeChevronHidden_6iya4_243",B="_nodeActions_6iya4_277",H="_nodeChildren_6iya4_311",N="_nodeNested_6iya4_321",g="_iconSlot_6iya4_330",w="_slotIcon_6iya4_341",R="_slotChevron_6iya4_352",u="_slotChevronOpen_6iya4_364",b="_sectionBadge_6iya4_403",f="_nodeBadge_6iya4_418",S="_empty_6iya4_435",m={navTree:e,header:o,footer:n,treeContent:t,section:i,sectionHeader:s,sectionHeaderNode:d,sectionChevron:c,sectionChevronOpen:_,sectionTitle:a,sectionTitleNode:r,sectionBody:y,sectionActions:l,node:v,nodeRow:h,nodeRowActive:C,nodeLabel:p,nodeChevron:O,nodeChevronOpen:T,nodeChevronHidden:A,nodeActions:B,nodeChildren:H,nodeNested:N,iconSlot:g,slotIcon:w,slotChevron:R,slotChevronOpen:u,sectionBadge:b,nodeBadge:f,empty:S};exports.default=m;exports.empty=S;exports.footer=n;exports.header=o;exports.iconSlot=g;exports.navTree=e;exports.node=v;exports.nodeActions=B;exports.nodeBadge=f;exports.nodeChevron=O;exports.nodeChevronHidden=A;exports.nodeChevronOpen=T;exports.nodeChildren=H;exports.nodeLabel=p;exports.nodeNested=N;exports.nodeRow=h;exports.nodeRowActive=C;exports.section=i;exports.sectionActions=l;exports.sectionBadge=b;exports.sectionBody=y;exports.sectionChevron=c;exports.sectionChevronOpen=_;exports.sectionHeader=s;exports.sectionHeaderNode=d;exports.sectionTitle=a;exports.sectionTitleNode=r;exports.slotChevron=R;exports.slotChevronOpen=u;exports.slotIcon=w;exports.treeContent=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),I=require("lucide-react"),a=require("./index141.cjs"),w=require("./index185.cjs"),u=({src:i,alt:t="Image attachment",thumbnail:g,onClick:n,enableLightbox:s=!0,className:o,...l})=>{const[h,c]=d.useState(!1),[f,v]=d.useState(!1),m=()=>{n?n():s&&c(!0)},x=r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),m())},j=()=>{v(!0)};return f?e.jsxs("div",{className:[a.default.imagePreview,a.default.attachmentPreview,o].filter(Boolean).join(" "),...l,children:[e.jsx("div",{className:a.default.attachmentPreviewIcon,children:e.jsx(I.ImageOff,{size:20})}),e.jsx("span",{className:a.default.attachmentPreviewName,children:"Image failed to load"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:[a.default.imagePreview,o].filter(Boolean).join(" "),onClick:m,onKeyDown:x,role:"button",tabIndex:0,"aria-label":t,...l,children:e.jsx("img",{src:g||i,alt:t,className:a.default.imagePreviewImg,onError:j,loading:"lazy"})}),s&&e.jsx(w.ChatLightbox,{src:i,alt:t,isOpen:h,onClose:()=>c(!1)})]})};u.displayName="ChatImagePreview";exports.ChatImagePreview=u;
package/dist/index149.mjs CHANGED
@@ -1,65 +1,69 @@
1
- const e = "_navTree_6iya4_12", o = "_header_6iya4_29", n = "_footer_6iya4_36", t = "_treeContent_6iya4_47", _ = "_section_6iya4_76", i = "_sectionHeader_6iya4_81", s = "_sectionHeaderNode_6iya4_100", c = "_sectionChevron_6iya4_105", d = "_sectionChevronOpen_6iya4_117", a = "_sectionTitle_6iya4_122", r = "_sectionTitleNode_6iya4_136", y = "_sectionBody_6iya4_148", h = "_sectionActions_6iya4_154", v = "_node_6iya4_182", C = "_nodeRow_6iya4_187", l = "_nodeRowActive_6iya4_208", p = "_nodeLabel_6iya4_216", A = "_nodeChevron_6iya4_222", B = "_nodeChevronOpen_6iya4_238", H = "_nodeChevronHidden_6iya4_243", N = "_nodeActions_6iya4_277", O = "_nodeChildren_6iya4_311", T = "_nodeNested_6iya4_321", g = "_iconSlot_6iya4_330", w = "_slotIcon_6iya4_341", R = "_slotChevron_6iya4_352", f = "_slotChevronOpen_6iya4_364", b = "_sectionBadge_6iya4_403", m = "_nodeBadge_6iya4_418", I = "_empty_6iya4_435", L = {
2
- navTree: e,
3
- header: o,
4
- footer: n,
5
- treeContent: t,
6
- section: _,
7
- sectionHeader: i,
8
- sectionHeaderNode: s,
9
- sectionChevron: c,
10
- sectionChevronOpen: d,
11
- sectionTitle: a,
12
- sectionTitleNode: r,
13
- sectionBody: y,
14
- sectionActions: h,
15
- node: v,
16
- nodeRow: C,
17
- nodeRowActive: l,
18
- nodeLabel: p,
19
- nodeChevron: A,
20
- nodeChevronOpen: B,
21
- nodeChevronHidden: H,
22
- nodeActions: N,
23
- nodeChildren: O,
24
- nodeNested: T,
25
- iconSlot: g,
26
- slotIcon: w,
27
- slotChevron: R,
28
- slotChevronOpen: f,
29
- sectionBadge: b,
30
- nodeBadge: m,
31
- empty: I
1
+ import { jsxs as f, jsx as e, Fragment as u } from "react/jsx-runtime";
2
+ import { useState as g } from "react";
3
+ import { ImageOff as P } from "lucide-react";
4
+ import a from "./index141.mjs";
5
+ import { ChatLightbox as y } from "./index185.mjs";
6
+ const x = ({
7
+ src: i,
8
+ alt: r = "Image attachment",
9
+ thumbnail: h,
10
+ onClick: o,
11
+ enableLightbox: n = !0,
12
+ className: m,
13
+ ...s
14
+ }) => {
15
+ const [d, l] = g(!1), [p, v] = g(!1), c = () => {
16
+ o ? o() : n && l(!0);
17
+ }, I = (t) => {
18
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), c());
19
+ }, w = () => {
20
+ v(!0);
21
+ };
22
+ return p ? /* @__PURE__ */ f(
23
+ "div",
24
+ {
25
+ className: [a.imagePreview, a.attachmentPreview, m].filter(Boolean).join(" "),
26
+ ...s,
27
+ children: [
28
+ /* @__PURE__ */ e("div", { className: a.attachmentPreviewIcon, children: /* @__PURE__ */ e(P, { size: 20 }) }),
29
+ /* @__PURE__ */ e("span", { className: a.attachmentPreviewName, children: "Image failed to load" })
30
+ ]
31
+ }
32
+ ) : /* @__PURE__ */ f(u, { children: [
33
+ /* @__PURE__ */ e(
34
+ "div",
35
+ {
36
+ className: [a.imagePreview, m].filter(Boolean).join(" "),
37
+ onClick: c,
38
+ onKeyDown: I,
39
+ role: "button",
40
+ tabIndex: 0,
41
+ "aria-label": r,
42
+ ...s,
43
+ children: /* @__PURE__ */ e(
44
+ "img",
45
+ {
46
+ src: h || i,
47
+ alt: r,
48
+ className: a.imagePreviewImg,
49
+ onError: w,
50
+ loading: "lazy"
51
+ }
52
+ )
53
+ }
54
+ ),
55
+ n && /* @__PURE__ */ e(
56
+ y,
57
+ {
58
+ src: i,
59
+ alt: r,
60
+ isOpen: d,
61
+ onClose: () => l(!1)
62
+ }
63
+ )
64
+ ] });
32
65
  };
66
+ x.displayName = "ChatImagePreview";
33
67
  export {
34
- L as default,
35
- I as empty,
36
- n as footer,
37
- o as header,
38
- g as iconSlot,
39
- e as navTree,
40
- v as node,
41
- N as nodeActions,
42
- m as nodeBadge,
43
- A as nodeChevron,
44
- H as nodeChevronHidden,
45
- B as nodeChevronOpen,
46
- O as nodeChildren,
47
- p as nodeLabel,
48
- T as nodeNested,
49
- C as nodeRow,
50
- l as nodeRowActive,
51
- _ as section,
52
- h as sectionActions,
53
- b as sectionBadge,
54
- y as sectionBody,
55
- c as sectionChevron,
56
- d as sectionChevronOpen,
57
- i as sectionHeader,
58
- s as sectionHeaderNode,
59
- a as sectionTitle,
60
- r as sectionTitleNode,
61
- R as slotChevron,
62
- f as slotChevronOpen,
63
- w as slotIcon,
64
- t as treeContent
68
+ x as ChatImagePreview
65
69
  };
package/dist/index15.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("react"),n=require("date-fns"),x=require("lucide-react"),a=require("./index139.cjs"),O=require("./index14.cjs"),R=["Su","Mo","Tu","We","Th","Fr","Sa"];function _(t,r){const c=t.length,d=(r%c+c)%c;return[...t.slice(d),...t.slice(0,d)]}const C=t=>{const{mode:r="single",min:c,max:d,disabled:m,weekStartsOn:h=0,showOutsideDays:j=!0,className:v,...k}=t,{selected:W,onSelect:F,...E}=k,[f,S]=u.useState(()=>r==="single"&&t.mode!=="range"&&t.mode!=="multiple"&&t.selected?n.startOfMonth(t.selected):r==="range"&&t.mode==="range"&&t.selected?.from?n.startOfMonth(t.selected.from):n.startOfMonth(new Date)),N=u.useMemo(()=>{const e=n.startOfMonth(f),s=n.endOfMonth(f),l=n.startOfWeek(e,{weekStartsOn:h}),o=n.endOfWeek(s,{weekStartsOn:h});return n.eachDayOfInterval({start:l,end:o})},[f,h]),B=u.useMemo(()=>_(R,h),[h]),g=u.useCallback(e=>c&&n.isBefore(e,z(c))||d&&n.isAfter(e,P(d))?!0:m?Array.isArray(m)?m.some(s=>n.isSameDay(s,e)):m(e):!1,[c,d,m]),y=u.useCallback(e=>r==="single"&&t.mode!=="range"&&t.mode!=="multiple"?t.selected?n.isSameDay(t.selected,e):!1:r==="multiple"&&t.mode==="multiple"?t.selected?.some(s=>n.isSameDay(s,e))??!1:!1,[r,t]),M=u.useCallback(e=>{if(r!=="range"||t.mode!=="range"||!t.selected)return null;const{from:s,to:l}=t.selected;return s?l?n.isSameDay(e,s)&&n.isSameDay(e,l)||n.isSameDay(e,s)?"start":n.isSameDay(e,l)?"end":n.isAfter(e,s)&&n.isBefore(e,l)?"middle":null:n.isSameDay(e,s)?"start":null:null},[r,t]),w=u.useCallback(e=>{if(!g(e)){if(r==="single"&&t.mode!=="range"&&t.mode!=="multiple"){const s=t.onSelect;s?.(e)}else if(r==="range"&&t.mode==="range"){const s=t.onSelect,l=t.selected;!l?.from||l.from&&l.to?s?.({from:e,to:void 0}):n.isBefore(e,l.from)?s?.({from:e,to:l.from}):s?.({from:l.from,to:e})}else if(r==="multiple"&&t.mode==="multiple"){const s=t.onSelect,l=t.selected??[],o=l.findIndex(D=>n.isSameDay(D,e));o>=0?s?.(l.filter((D,L)=>L!==o)):s?.([...l,e])}}},[r,t,g]),A=()=>S(e=>n.subMonths(e,1)),I=()=>S(e=>n.addMonths(e,1)),T=e=>{const s=[a.default.day];if(!n.isSameMonth(e,f)&&s.push(a.default.outside),n.isToday(e)&&s.push(a.default.today),g(e)&&s.push(a.default.disabled),r==="range"){const o=M(e);o==="start"&&(s.push(a.default.rangeStart),t.mode==="range"&&t.selected?.from&&t.selected?.to&&n.isSameDay(t.selected.from,t.selected.to)&&s.push(a.default.rangeEnd)),o==="middle"&&s.push(a.default.rangeMiddle),o==="end"&&s.push(a.default.rangeEnd)}else y(e)&&s.push(a.default.selected);return s.join(" ")},q=[a.default.calendar,v].filter(Boolean).join(" "),b=u.useId();return i.jsxs("div",{className:q,...E,children:[i.jsxs("div",{className:a.default.header,children:[i.jsx(O.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:i.jsx(x.ChevronLeft,{size:16}),onClick:A,"aria-label":"Previous month"}),i.jsx("span",{id:b,className:a.default.monthLabel,children:n.format(f,"MMMM yyyy")}),i.jsx(O.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:i.jsx(x.ChevronRight,{size:16}),onClick:I,"aria-label":"Next month"})]}),i.jsxs("div",{className:a.default.grid,role:"grid","aria-labelledby":b,children:[B.map(e=>i.jsx("div",{className:a.default.weekday,role:"columnheader","aria-label":e,children:e},e)),N.map(e=>!n.isSameMonth(e,f)&&!j?i.jsx("div",{},e.toISOString()):i.jsx("button",{type:"button",className:T(e),onClick:()=>w(e),disabled:g(e),tabIndex:n.isToday(e)?0:-1,"aria-label":n.format(e,"EEEE, MMMM d, yyyy"),"aria-selected":y(e)||M(e)!==null,children:n.format(e,"d")},e.toISOString()))]})]})};C.displayName="Calendar";function z(t){const r=new Date(t);return r.setHours(0,0,0,0),r}function P(t){const r=new Date(t);return r.setHours(23,59,59,999),r}exports.Calendar=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("react"),n=require("date-fns"),x=require("lucide-react"),a=require("./index124.cjs"),O=require("./index14.cjs"),R=["Su","Mo","Tu","We","Th","Fr","Sa"];function _(t,r){const c=t.length,d=(r%c+c)%c;return[...t.slice(d),...t.slice(0,d)]}const C=t=>{const{mode:r="single",min:c,max:d,disabled:m,weekStartsOn:h=0,showOutsideDays:j=!0,className:v,...k}=t,{selected:W,onSelect:F,...E}=k,[f,S]=u.useState(()=>r==="single"&&t.mode!=="range"&&t.mode!=="multiple"&&t.selected?n.startOfMonth(t.selected):r==="range"&&t.mode==="range"&&t.selected?.from?n.startOfMonth(t.selected.from):n.startOfMonth(new Date)),N=u.useMemo(()=>{const e=n.startOfMonth(f),s=n.endOfMonth(f),l=n.startOfWeek(e,{weekStartsOn:h}),o=n.endOfWeek(s,{weekStartsOn:h});return n.eachDayOfInterval({start:l,end:o})},[f,h]),B=u.useMemo(()=>_(R,h),[h]),g=u.useCallback(e=>c&&n.isBefore(e,z(c))||d&&n.isAfter(e,P(d))?!0:m?Array.isArray(m)?m.some(s=>n.isSameDay(s,e)):m(e):!1,[c,d,m]),y=u.useCallback(e=>r==="single"&&t.mode!=="range"&&t.mode!=="multiple"?t.selected?n.isSameDay(t.selected,e):!1:r==="multiple"&&t.mode==="multiple"?t.selected?.some(s=>n.isSameDay(s,e))??!1:!1,[r,t]),M=u.useCallback(e=>{if(r!=="range"||t.mode!=="range"||!t.selected)return null;const{from:s,to:l}=t.selected;return s?l?n.isSameDay(e,s)&&n.isSameDay(e,l)||n.isSameDay(e,s)?"start":n.isSameDay(e,l)?"end":n.isAfter(e,s)&&n.isBefore(e,l)?"middle":null:n.isSameDay(e,s)?"start":null:null},[r,t]),w=u.useCallback(e=>{if(!g(e)){if(r==="single"&&t.mode!=="range"&&t.mode!=="multiple"){const s=t.onSelect;s?.(e)}else if(r==="range"&&t.mode==="range"){const s=t.onSelect,l=t.selected;!l?.from||l.from&&l.to?s?.({from:e,to:void 0}):n.isBefore(e,l.from)?s?.({from:e,to:l.from}):s?.({from:l.from,to:e})}else if(r==="multiple"&&t.mode==="multiple"){const s=t.onSelect,l=t.selected??[],o=l.findIndex(D=>n.isSameDay(D,e));o>=0?s?.(l.filter((D,L)=>L!==o)):s?.([...l,e])}}},[r,t,g]),A=()=>S(e=>n.subMonths(e,1)),I=()=>S(e=>n.addMonths(e,1)),T=e=>{const s=[a.default.day];if(!n.isSameMonth(e,f)&&s.push(a.default.outside),n.isToday(e)&&s.push(a.default.today),g(e)&&s.push(a.default.disabled),r==="range"){const o=M(e);o==="start"&&(s.push(a.default.rangeStart),t.mode==="range"&&t.selected?.from&&t.selected?.to&&n.isSameDay(t.selected.from,t.selected.to)&&s.push(a.default.rangeEnd)),o==="middle"&&s.push(a.default.rangeMiddle),o==="end"&&s.push(a.default.rangeEnd)}else y(e)&&s.push(a.default.selected);return s.join(" ")},q=[a.default.calendar,v].filter(Boolean).join(" "),b=u.useId();return i.jsxs("div",{className:q,...E,children:[i.jsxs("div",{className:a.default.header,children:[i.jsx(O.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:i.jsx(x.ChevronLeft,{size:16}),onClick:A,"aria-label":"Previous month"}),i.jsx("span",{id:b,className:a.default.monthLabel,children:n.format(f,"MMMM yyyy")}),i.jsx(O.Button,{variant:"ghost",iconOnly:!0,size:"sm",icon:i.jsx(x.ChevronRight,{size:16}),onClick:I,"aria-label":"Next month"})]}),i.jsxs("div",{className:a.default.grid,role:"grid","aria-labelledby":b,children:[B.map(e=>i.jsx("div",{className:a.default.weekday,role:"columnheader","aria-label":e,children:e},e)),N.map(e=>!n.isSameMonth(e,f)&&!j?i.jsx("div",{},e.toISOString()):i.jsx("button",{type:"button",className:T(e),onClick:()=>w(e),disabled:g(e),tabIndex:n.isToday(e)?0:-1,"aria-label":n.format(e,"EEEE, MMMM d, yyyy"),"aria-selected":y(e)||M(e)!==null,children:n.format(e,"d")},e.toISOString()))]})]})};C.displayName="Calendar";function z(t){const r=new Date(t);return r.setHours(0,0,0,0),r}function P(t){const r=new Date(t);return r.setHours(23,59,59,999),r}exports.Calendar=C;
package/dist/index15.mjs CHANGED
@@ -2,7 +2,7 @@ import { jsxs as M, jsx as c } from "react/jsx-runtime";
2
2
  import { useState as K, useMemo as N, useCallback as g, useId as Y } from "react";
3
3
  import { startOfMonth as S, endOfMonth as q, startOfWeek as G, endOfWeek as J, eachDayOfInterval as Q, isBefore as y, isAfter as k, isSameDay as i, format as b, isSameMonth as x, isToday as w, subMonths as U, addMonths as V } from "date-fns";
4
4
  import { ChevronLeft as X, ChevronRight as Z } from "lucide-react";
5
- import o from "./index139.mjs";
5
+ import o from "./index124.mjs";
6
6
  import { Button as I } from "./index14.mjs";
7
7
  const $ = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
8
8
  function p(t, r) {
package/dist/index150.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x="_avatar_zbymr_8",_="_image_zbymr_30",t="_initials_zbymr_38",n="_icon_zbymr_48",s="_xs_zbymr_64",i="_sm_zbymr_75",l="_md_zbymr_86",o="_lg_zbymr_97",a="_xl_zbymr_108",r="_xxl_zbymr_119",e="_profile_zbymr_130",c="_xxxl_zbymr_141",m="_xxxxl_zbymr_152",y="_xxxxxl_zbymr_163",b="_interactive_zbymr_178",z="_statusIndicator_zbymr_200",u="_online_zbymr_212",f="_offline_zbymr_216",d="_away_zbymr_220",g="_busy_zbymr_224",v={avatar:x,image:_,initials:t,icon:n,xs:s,sm:i,md:l,lg:o,xl:a,xxl:r,profile:e,xxxl:c,xxxxl:m,xxxxxl:y,interactive:b,statusIndicator:z,online:u,offline:f,away:d,busy:g};exports.avatar=x;exports.away=d;exports.busy=g;exports.default=v;exports.icon=n;exports.image=_;exports.initials=t;exports.interactive=b;exports.lg=o;exports.md=l;exports.offline=f;exports.online=u;exports.profile=e;exports.sm=i;exports.statusIndicator=z;exports.xl=a;exports.xs=s;exports.xxl=r;exports.xxxl=c;exports.xxxxl=m;exports.xxxxxl=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("react"),P=require("lucide-react"),m=require("./index184.cjs"),l=require("./index141.cjs"),p=({src:k,duration:T,title:h,className:b,...x})=>{const[o,f]=r.useState(!1),[s,d]=r.useState(0),[a,g]=r.useState(T||0),n=r.useRef(null),j=r.useCallback(()=>{const e=n.current;e&&!isNaN(e.duration)&&isFinite(e.duration)&&g(e.duration)},[]),v=r.useCallback(()=>{const e=n.current;e&&d(e.currentTime)},[]),C=r.useCallback(()=>{f(!1),d(0)},[]),w=r.useCallback(()=>{const e=n.current;e&&(o?e.pause():e.play().catch(()=>{f(!1)}),f(!o))},[o]),N=r.useCallback(e=>{const c=n.current;if(!c||!a)return;const u=e.currentTarget.getBoundingClientRect(),y=(e.clientX-u.left)/u.width*a;c.currentTime=y,d(y)},[a]),A=r.useCallback(e=>{const c=n.current;if(!c||!a)return;const u=5;let i=s;switch(e.key){case"ArrowRight":case"ArrowUp":e.preventDefault(),i=Math.min(s+u,a);break;case"ArrowLeft":case"ArrowDown":e.preventDefault(),i=Math.max(s-u,0);break;case"Home":e.preventDefault(),i=0;break;case"End":e.preventDefault(),i=a;break;default:return}c.currentTime=i,d(i)},[s,a]),D=a>0?s/a*100:0;return r.useEffect(()=>()=>{const e=n.current;e&&e.pause()},[]),t.jsxs("div",{className:[l.default.audioPlayer,b].filter(Boolean).join(" "),...x,children:[t.jsx("audio",{ref:n,src:k,onLoadedMetadata:j,onTimeUpdate:v,onEnded:C,preload:"metadata"}),t.jsx("button",{className:l.default.audioPlayerButton,onClick:w,"aria-label":o?"Pause":"Play",children:o?t.jsx(P.Pause,{size:16}):t.jsx(P.Play,{size:16})}),t.jsxs("div",{className:l.default.audioPlayerProgress,children:[h&&t.jsx("span",{className:l.default.attachmentPreviewName,children:h}),t.jsx("div",{className:l.default.audioPlayerTrack,onClick:N,onKeyDown:A,role:"slider","aria-label":"Audio progress","aria-valuemin":0,"aria-valuemax":a,"aria-valuenow":s,"aria-valuetext":`${m.formatTime(s)} of ${m.formatTime(a)}`,tabIndex:0,children:t.jsx("div",{className:l.default.audioPlayerFill,style:{width:`${D}%`}})}),t.jsxs("div",{className:l.default.audioPlayerTime,children:[t.jsx("span",{children:m.formatTime(s)}),t.jsx("span",{children:m.formatTime(a)})]})]})]})};p.displayName="ChatAudioPlayer";exports.ChatAudioPlayer=p;
package/dist/index150.mjs CHANGED
@@ -1,45 +1,127 @@
1
- const _ = "_avatar_zbymr_8", x = "_image_zbymr_30", t = "_initials_zbymr_38", n = "_icon_zbymr_48", s = "_xs_zbymr_64", o = "_sm_zbymr_75", i = "_md_zbymr_86", r = "_lg_zbymr_97", a = "_xl_zbymr_108", l = "_xxl_zbymr_119", c = "_profile_zbymr_130", m = "_xxxl_zbymr_141", y = "_xxxxl_zbymr_152", b = "_xxxxxl_zbymr_163", e = "_interactive_zbymr_178", z = "_statusIndicator_zbymr_200", f = "_online_zbymr_212", d = "_offline_zbymr_216", u = "_away_zbymr_220", g = "_busy_zbymr_224", v = {
2
- avatar: _,
3
- image: x,
4
- initials: t,
5
- icon: n,
6
- xs: s,
7
- sm: o,
8
- md: i,
9
- lg: r,
10
- xl: a,
11
- xxl: l,
12
- profile: c,
13
- xxxl: m,
14
- xxxxl: y,
15
- xxxxxl: b,
16
- interactive: e,
17
- statusIndicator: z,
18
- online: f,
19
- offline: d,
20
- away: u,
21
- busy: g
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import { useState as h, useRef as M, useCallback as s, useEffect as R } from "react";
3
+ import { Pause as j, Play as B } from "lucide-react";
4
+ import { formatTime as m } from "./index184.mjs";
5
+ import o from "./index141.mjs";
6
+ const L = ({
7
+ src: g,
8
+ duration: v,
9
+ title: y,
10
+ className: w,
11
+ ...T
12
+ }) => {
13
+ const [c, f] = h(!1), [t, u] = h(0), [a, k] = h(v || 0), n = M(null), N = s(() => {
14
+ const e = n.current;
15
+ e && !isNaN(e.duration) && isFinite(e.duration) && k(e.duration);
16
+ }, []), b = s(() => {
17
+ const e = n.current;
18
+ e && u(e.currentTime);
19
+ }, []), C = s(() => {
20
+ f(!1), u(0);
21
+ }, []), D = s(() => {
22
+ const e = n.current;
23
+ e && (c ? e.pause() : e.play().catch(() => {
24
+ f(!1);
25
+ }), f(!c));
26
+ }, [c]), x = s(
27
+ (e) => {
28
+ const l = n.current;
29
+ if (!l || !a) return;
30
+ const d = e.currentTarget.getBoundingClientRect(), P = (e.clientX - d.left) / d.width * a;
31
+ l.currentTime = P, u(P);
32
+ },
33
+ [a]
34
+ ), A = s(
35
+ (e) => {
36
+ const l = n.current;
37
+ if (!l || !a) return;
38
+ const d = 5;
39
+ let i = t;
40
+ switch (e.key) {
41
+ case "ArrowRight":
42
+ case "ArrowUp":
43
+ e.preventDefault(), i = Math.min(t + d, a);
44
+ break;
45
+ case "ArrowLeft":
46
+ case "ArrowDown":
47
+ e.preventDefault(), i = Math.max(t - d, 0);
48
+ break;
49
+ case "Home":
50
+ e.preventDefault(), i = 0;
51
+ break;
52
+ case "End":
53
+ e.preventDefault(), i = a;
54
+ break;
55
+ default:
56
+ return;
57
+ }
58
+ l.currentTime = i, u(i);
59
+ },
60
+ [t, a]
61
+ ), E = a > 0 ? t / a * 100 : 0;
62
+ return R(() => () => {
63
+ const e = n.current;
64
+ e && e.pause();
65
+ }, []), /* @__PURE__ */ p(
66
+ "div",
67
+ {
68
+ className: [o.audioPlayer, w].filter(Boolean).join(" "),
69
+ ...T,
70
+ children: [
71
+ /* @__PURE__ */ r(
72
+ "audio",
73
+ {
74
+ ref: n,
75
+ src: g,
76
+ onLoadedMetadata: N,
77
+ onTimeUpdate: b,
78
+ onEnded: C,
79
+ preload: "metadata"
80
+ }
81
+ ),
82
+ /* @__PURE__ */ r(
83
+ "button",
84
+ {
85
+ className: o.audioPlayerButton,
86
+ onClick: D,
87
+ "aria-label": c ? "Pause" : "Play",
88
+ children: c ? /* @__PURE__ */ r(j, { size: 16 }) : /* @__PURE__ */ r(B, { size: 16 })
89
+ }
90
+ ),
91
+ /* @__PURE__ */ p("div", { className: o.audioPlayerProgress, children: [
92
+ y && /* @__PURE__ */ r("span", { className: o.attachmentPreviewName, children: y }),
93
+ /* @__PURE__ */ r(
94
+ "div",
95
+ {
96
+ className: o.audioPlayerTrack,
97
+ onClick: x,
98
+ onKeyDown: A,
99
+ role: "slider",
100
+ "aria-label": "Audio progress",
101
+ "aria-valuemin": 0,
102
+ "aria-valuemax": a,
103
+ "aria-valuenow": t,
104
+ "aria-valuetext": `${m(t)} of ${m(a)}`,
105
+ tabIndex: 0,
106
+ children: /* @__PURE__ */ r(
107
+ "div",
108
+ {
109
+ className: o.audioPlayerFill,
110
+ style: { width: `${E}%` }
111
+ }
112
+ )
113
+ }
114
+ ),
115
+ /* @__PURE__ */ p("div", { className: o.audioPlayerTime, children: [
116
+ /* @__PURE__ */ r("span", { children: m(t) }),
117
+ /* @__PURE__ */ r("span", { children: m(a) })
118
+ ] })
119
+ ] })
120
+ ]
121
+ }
122
+ );
22
123
  };
124
+ L.displayName = "ChatAudioPlayer";
23
125
  export {
24
- _ as avatar,
25
- u as away,
26
- g as busy,
27
- v as default,
28
- n as icon,
29
- x as image,
30
- t as initials,
31
- e as interactive,
32
- r as lg,
33
- i as md,
34
- d as offline,
35
- f as online,
36
- c as profile,
37
- o as sm,
38
- z as statusIndicator,
39
- a as xl,
40
- s as xs,
41
- l as xxl,
42
- m as xxxl,
43
- y as xxxxl,
44
- b as xxxxxl
126
+ L as ChatAudioPlayer
45
127
  };
package/dist/index151.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t="_banner_1j8yh_5",n="_container_1j8yh_49",e="_content_1j8yh_61",s="_splitLayout_1j8yh_71",o="_splitContent_1j8yh_86",i="_splitImage_1j8yh_90",_="_eyebrow_1j8yh_98",c="_title_1j8yh_116",a="_description_1j8yh_130",l="_actions_1j8yh_143",r="_dismissButton_1j8yh_154",y={banner:t,container:n,content:e,splitLayout:s,splitContent:o,splitImage:i,eyebrow:_,title:c,description:a,actions:l,dismissButton:r};exports.actions=l;exports.banner=t;exports.container=n;exports.content=e;exports.default=y;exports.description=a;exports.dismissButton=r;exports.eyebrow=_;exports.splitContent=o;exports.splitImage=i;exports.splitLayout=s;exports.title=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("lucide-react"),g=require("./index95.cjs"),b=require("./index184.cjs"),r=require("./index141.cjs"),t=({onRecordingComplete:s,onCancel:u,maxDuration:f=300,className:a,...d})=>{const{isRecording:o,duration:v,audioBlob:c,error:l,startRecording:R,stopRecording:j,cancelRecording:x,reset:n,isSupported:m}=g.useVoiceRecorder({maxDuration:f,onRecordingComplete:s,onError:B=>console.error("Recording error:",B)}),h=()=>{o?j():c?(s?.(c),n()):R()},N=()=>{x(),u?.()};return m?l?e.jsxs("div",{className:[r.default.voiceRecorder,a].filter(Boolean).join(" "),...d,children:[e.jsx("div",{className:r.default.voiceRecorderInfo,children:e.jsx("span",{className:[r.default.voiceRecorderLabel,r.default.voiceRecorderError].join(" "),children:l})}),e.jsx("button",{className:r.default.inputButton,onClick:n,"aria-label":"Try again",children:e.jsx(i.X,{size:20})})]}):e.jsxs("div",{className:[r.default.voiceRecorder,a].filter(Boolean).join(" "),...d,children:[e.jsx("button",{className:[r.default.voiceRecorderButton,!o&&!c&&r.default.voiceRecorderButtonIdle].filter(Boolean).join(" "),onClick:h,"aria-label":o?"Stop recording":c?"Send recording":"Start recording",children:o?e.jsx(i.Square,{size:20}):c?e.jsx(i.Send,{size:20}):e.jsx(i.Mic,{size:20})}),e.jsxs("div",{className:r.default.voiceRecorderInfo,children:[e.jsx("span",{className:r.default.voiceRecorderDuration,children:b.formatTime(v)}),e.jsx("span",{className:r.default.voiceRecorderLabel,children:o?"Recording...":c?"Recording ready":"Click to record"})]}),o&&e.jsxs("div",{className:r.default.voiceRecorderWaveform,children:[e.jsx("div",{className:r.default.voiceRecorderBar}),e.jsx("div",{className:r.default.voiceRecorderBar}),e.jsx("div",{className:r.default.voiceRecorderBar}),e.jsx("div",{className:r.default.voiceRecorderBar}),e.jsx("div",{className:r.default.voiceRecorderBar})]}),(o||c)&&e.jsx("div",{className:r.default.voiceRecorderActions,children:e.jsx("button",{className:r.default.inputButton,onClick:N,"aria-label":"Cancel recording",children:e.jsx(i.X,{size:20})})})]}):e.jsx("div",{className:[r.default.voiceRecorder,a].filter(Boolean).join(" "),...d,children:e.jsx("div",{className:r.default.voiceRecorderInfo,children:e.jsx("span",{className:r.default.voiceRecorderLabel,children:"Voice recording is not supported in this browser"})})})};t.displayName="ChatVoiceRecorder";exports.ChatVoiceRecorder=t;