@mieweb/ui 0.8.0 → 0.9.0-dev.1

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 (384) hide show
  1. package/README.md +162 -739
  2. package/agent/mieweb-ui.instructions.md +34 -16
  3. package/dist/Animated-Cs-naa2g.d.cts +175 -0
  4. package/dist/Animated-Cs-naa2g.d.ts +175 -0
  5. package/dist/CsvBlock-D7Z6ZCRP.js +6 -0
  6. package/dist/{CsvBlock-PUSTBQ5B.js.map → CsvBlock-D7Z6ZCRP.js.map} +1 -1
  7. package/dist/CsvBlock-QXXZ7ZUM.cjs +15 -0
  8. package/dist/{CsvBlock-OTFG3PYZ.cjs.map → CsvBlock-QXXZ7ZUM.cjs.map} +1 -1
  9. package/dist/HtmlPreviewBlock-AADG7MVB.cjs +15 -0
  10. package/dist/{HtmlPreviewBlock-QHLSIMWJ.cjs.map → HtmlPreviewBlock-AADG7MVB.cjs.map} +1 -1
  11. package/dist/HtmlPreviewBlock-F5VDM2EN.js +6 -0
  12. package/dist/{HtmlPreviewBlock-YF2YVKKX.js.map → HtmlPreviewBlock-F5VDM2EN.js.map} +1 -1
  13. package/dist/MermaidBlock-6PLITRBZ.js +6 -0
  14. package/dist/{MermaidBlock-H3TWNC4D.js.map → MermaidBlock-6PLITRBZ.js.map} +1 -1
  15. package/dist/MermaidBlock-TQ2O5CLV.cjs +15 -0
  16. package/dist/{MermaidBlock-ZLLBO3VY.cjs.map → MermaidBlock-TQ2O5CLV.cjs.map} +1 -1
  17. package/dist/SurveyBlock-OYL3VNU5.cjs +15 -0
  18. package/dist/{SurveyBlock-M2ZRTGVJ.cjs.map → SurveyBlock-OYL3VNU5.cjs.map} +1 -1
  19. package/dist/SurveyBlock-W5PSQ62F.js +6 -0
  20. package/dist/{SurveyBlock-JLHS3YQD.js.map → SurveyBlock-W5PSQ62F.js.map} +1 -1
  21. package/dist/ag-grid.cjs +5 -5
  22. package/dist/ag-grid.js +1 -1
  23. package/dist/brands/index.cjs +7 -7
  24. package/dist/brands/index.js +2 -2
  25. package/dist/{chunk-XS35KPBZ.cjs → chunk-2A2FLQJC.cjs} +1140 -14
  26. package/dist/chunk-2A2FLQJC.cjs.map +1 -0
  27. package/dist/{chunk-OTQ72WX3.js → chunk-2BPIVWAK.js} +3 -3
  28. package/dist/{chunk-OTQ72WX3.js.map → chunk-2BPIVWAK.js.map} +1 -1
  29. package/dist/{chunk-6EWJGRC3.js → chunk-3JWAABYI.js} +6 -6
  30. package/dist/chunk-3JWAABYI.js.map +1 -0
  31. package/dist/{chunk-5JZIDILK.cjs → chunk-3LHICE4I.cjs} +6 -6
  32. package/dist/chunk-3LHICE4I.cjs.map +1 -0
  33. package/dist/{chunk-JHZW3Y62.js → chunk-3RB35GYK.js} +5 -5
  34. package/dist/chunk-3RB35GYK.js.map +1 -0
  35. package/dist/{chunk-BOW7ZGI2.cjs → chunk-4SM3I7WE.cjs} +170 -10
  36. package/dist/chunk-4SM3I7WE.cjs.map +1 -0
  37. package/dist/{chunk-QHTDWIED.js → chunk-5H7SAEQO.js} +5 -5
  38. package/dist/{chunk-QHTDWIED.js.map → chunk-5H7SAEQO.js.map} +1 -1
  39. package/dist/chunk-5VXRKOPR.cjs +735 -0
  40. package/dist/chunk-5VXRKOPR.cjs.map +1 -0
  41. package/dist/{chunk-EMMYFHOT.js → chunk-5WOB4UBD.js} +3 -3
  42. package/dist/{chunk-EMMYFHOT.js.map → chunk-5WOB4UBD.js.map} +1 -1
  43. package/dist/{chunk-4CUFXCC5.cjs → chunk-5Z6UPVGC.cjs} +6 -6
  44. package/dist/{chunk-4CUFXCC5.cjs.map → chunk-5Z6UPVGC.cjs.map} +1 -1
  45. package/dist/{chunk-YIXTGWT4.cjs → chunk-6QKMMKRY.cjs} +5 -5
  46. package/dist/{chunk-YIXTGWT4.cjs.map → chunk-6QKMMKRY.cjs.map} +1 -1
  47. package/dist/{chunk-F57VRLKP.js → chunk-6SAYPXHX.js} +4 -4
  48. package/dist/{chunk-F57VRLKP.js.map → chunk-6SAYPXHX.js.map} +1 -1
  49. package/dist/{chunk-SK7H3Z67.cjs → chunk-6XDPJWSC.cjs} +99 -83
  50. package/dist/chunk-6XDPJWSC.cjs.map +1 -0
  51. package/dist/{chunk-4AE2L6AO.cjs → chunk-7FTBPLA6.cjs} +8 -8
  52. package/dist/chunk-7FTBPLA6.cjs.map +1 -0
  53. package/dist/{chunk-KVE7PQ5P.cjs → chunk-7KN6J7XV.cjs} +20 -20
  54. package/dist/{chunk-KVE7PQ5P.cjs.map → chunk-7KN6J7XV.cjs.map} +1 -1
  55. package/dist/{chunk-K4S4FAYX.cjs → chunk-AHINB2TP.cjs} +11 -11
  56. package/dist/{chunk-K4S4FAYX.cjs.map → chunk-AHINB2TP.cjs.map} +1 -1
  57. package/dist/{chunk-MYFZYUPR.cjs → chunk-AOHJILLU.cjs} +38 -3
  58. package/dist/chunk-AOHJILLU.cjs.map +1 -0
  59. package/dist/chunk-BKSPDTX4.js +3 -0
  60. package/dist/{chunk-3PXOIAF6.js.map → chunk-BKSPDTX4.js.map} +1 -1
  61. package/dist/chunk-BN75TLUN.cjs +163 -0
  62. package/dist/chunk-BN75TLUN.cjs.map +1 -0
  63. package/dist/{chunk-WWJIW2IH.cjs → chunk-BVMABVC4.cjs} +3 -3
  64. package/dist/{chunk-WWJIW2IH.cjs.map → chunk-BVMABVC4.cjs.map} +1 -1
  65. package/dist/{chunk-H7QSGFMZ.cjs → chunk-BZAGP5W6.cjs} +17 -10
  66. package/dist/chunk-BZAGP5W6.cjs.map +1 -0
  67. package/dist/{chunk-RS5VA6QU.cjs → chunk-C3DUS2VE.cjs} +3 -3
  68. package/dist/{chunk-RS5VA6QU.cjs.map → chunk-C3DUS2VE.cjs.map} +1 -1
  69. package/dist/{chunk-NLBT5O2X.js → chunk-CK3KLRNF.js} +3 -3
  70. package/dist/{chunk-NLBT5O2X.js.map → chunk-CK3KLRNF.js.map} +1 -1
  71. package/dist/{chunk-L6D4CKLV.cjs → chunk-CXDMZT45.cjs} +135 -4
  72. package/dist/chunk-CXDMZT45.cjs.map +1 -0
  73. package/dist/{chunk-TXRQQMG5.js → chunk-CYMZ2QS5.js} +2 -2
  74. package/dist/{chunk-TXRQQMG5.js.map → chunk-CYMZ2QS5.js.map} +1 -1
  75. package/dist/{chunk-DX64KLSN.js → chunk-D25WH7MH.js} +7 -7
  76. package/dist/{chunk-DX64KLSN.js.map → chunk-D25WH7MH.js.map} +1 -1
  77. package/dist/{chunk-XBKOZRDO.js → chunk-DFYMIRMW.js} +4 -4
  78. package/dist/{chunk-XBKOZRDO.js.map → chunk-DFYMIRMW.js.map} +1 -1
  79. package/dist/{chunk-AESFOMSH.js → chunk-DGRXAIWK.js} +135 -4
  80. package/dist/chunk-DGRXAIWK.js.map +1 -0
  81. package/dist/{chunk-UZ5NGGMI.js → chunk-EG7XFZ3W.js} +4 -4
  82. package/dist/{chunk-UZ5NGGMI.js.map → chunk-EG7XFZ3W.js.map} +1 -1
  83. package/dist/{chunk-LQHI44OZ.cjs → chunk-FUFBRKOG.cjs} +59 -59
  84. package/dist/{chunk-LQHI44OZ.cjs.map → chunk-FUFBRKOG.cjs.map} +1 -1
  85. package/dist/{chunk-DG7KE4YJ.cjs → chunk-FYAKUU2A.cjs} +38 -21
  86. package/dist/chunk-FYAKUU2A.cjs.map +1 -0
  87. package/dist/{chunk-7L7OPISJ.cjs → chunk-H4AVMUOC.cjs} +12 -6
  88. package/dist/chunk-H4AVMUOC.cjs.map +1 -0
  89. package/dist/{chunk-I2ECTLON.cjs → chunk-HXSA6QC5.cjs} +3 -3
  90. package/dist/{chunk-I2ECTLON.cjs.map → chunk-HXSA6QC5.cjs.map} +1 -1
  91. package/dist/{chunk-DCBMTFLE.js → chunk-HZ4MBUC3.js} +3 -3
  92. package/dist/{chunk-DCBMTFLE.js.map → chunk-HZ4MBUC3.js.map} +1 -1
  93. package/dist/{chunk-X5ZPYYMS.js → chunk-I3DQXUSC.js} +3 -3
  94. package/dist/{chunk-X5ZPYYMS.js.map → chunk-I3DQXUSC.js.map} +1 -1
  95. package/dist/{chunk-FN6VHMLM.cjs → chunk-IB54SKWB.cjs} +8 -8
  96. package/dist/{chunk-FN6VHMLM.cjs.map → chunk-IB54SKWB.cjs.map} +1 -1
  97. package/dist/chunk-IF3X2WZP.js +705 -0
  98. package/dist/chunk-IF3X2WZP.js.map +1 -0
  99. package/dist/{chunk-JP5SGIXA.cjs → chunk-IFDC4TXM.cjs} +4 -4
  100. package/dist/{chunk-JP5SGIXA.cjs.map → chunk-IFDC4TXM.cjs.map} +1 -1
  101. package/dist/{chunk-RDGRKYQ5.cjs → chunk-IINZWUGK.cjs} +58 -6
  102. package/dist/chunk-IINZWUGK.cjs.map +1 -0
  103. package/dist/{chunk-U3JU6BI5.cjs → chunk-JEIW7BSV.cjs} +3 -3
  104. package/dist/{chunk-U3JU6BI5.cjs.map → chunk-JEIW7BSV.cjs.map} +1 -1
  105. package/dist/{chunk-RZJXCI53.js → chunk-KATEJG2F.js} +1138 -14
  106. package/dist/chunk-KATEJG2F.js.map +1 -0
  107. package/dist/{chunk-D2GID3YK.js → chunk-KREUYVMZ.js} +58 -6
  108. package/dist/chunk-KREUYVMZ.js.map +1 -0
  109. package/dist/{chunk-Y6YSJPVC.js → chunk-KRU6IGV7.js} +11 -3
  110. package/dist/chunk-KRU6IGV7.js.map +1 -0
  111. package/dist/{chunk-LZU7YBXG.js → chunk-KU3XRHWA.js} +169 -10
  112. package/dist/chunk-KU3XRHWA.js.map +1 -0
  113. package/dist/{chunk-P2VTQ5AR.cjs → chunk-L52N6BEN.cjs} +39 -23
  114. package/dist/chunk-L52N6BEN.cjs.map +1 -0
  115. package/dist/{chunk-XWYKLEKG.js → chunk-L5W7TJQ5.js} +11 -5
  116. package/dist/chunk-L5W7TJQ5.js.map +1 -0
  117. package/dist/{chunk-PAM5UUBL.cjs → chunk-L7L5S2HO.cjs} +18 -2
  118. package/dist/{chunk-PAM5UUBL.cjs.map → chunk-L7L5S2HO.cjs.map} +1 -1
  119. package/dist/{chunk-SEPYBAML.js → chunk-LAEIVOIY.js} +38 -21
  120. package/dist/chunk-LAEIVOIY.js.map +1 -0
  121. package/dist/{chunk-Z5KFXHDP.cjs → chunk-MM7QKUE3.cjs} +5 -5
  122. package/dist/{chunk-Z5KFXHDP.cjs.map → chunk-MM7QKUE3.cjs.map} +1 -1
  123. package/dist/{chunk-FJ7YPVKV.js → chunk-MUIDWFYJ.js} +3 -3
  124. package/dist/{chunk-FJ7YPVKV.js.map → chunk-MUIDWFYJ.js.map} +1 -1
  125. package/dist/{chunk-YMHOF6WA.cjs → chunk-MYAU2ZUC.cjs} +3 -3
  126. package/dist/{chunk-YMHOF6WA.cjs.map → chunk-MYAU2ZUC.cjs.map} +1 -1
  127. package/dist/{chunk-5J5PEUUA.js → chunk-NHN6A3ZO.js} +6 -6
  128. package/dist/{chunk-5J5PEUUA.js.map → chunk-NHN6A3ZO.js.map} +1 -1
  129. package/dist/{chunk-EPQPUFS6.cjs → chunk-NYJIXR4Y.cjs} +6 -6
  130. package/dist/chunk-NYJIXR4Y.cjs.map +1 -0
  131. package/dist/{chunk-RYQ3S3KO.cjs → chunk-O425FKDI.cjs} +581 -70
  132. package/dist/chunk-O425FKDI.cjs.map +1 -0
  133. package/dist/{chunk-WIYQI35R.cjs → chunk-O7XHHTTP.cjs} +8 -8
  134. package/dist/{chunk-WIYQI35R.cjs.map → chunk-O7XHHTTP.cjs.map} +1 -1
  135. package/dist/{chunk-IILJGFI5.js → chunk-OAZUDUGX.js} +8 -6
  136. package/dist/chunk-OAZUDUGX.js.map +1 -0
  137. package/dist/{chunk-JHGMZX4I.cjs → chunk-OCV33S5Q.cjs} +6 -6
  138. package/dist/{chunk-JHGMZX4I.cjs.map → chunk-OCV33S5Q.cjs.map} +1 -1
  139. package/dist/{chunk-IYXCFIMP.js → chunk-ODYQYLO2.js} +33 -17
  140. package/dist/chunk-ODYQYLO2.js.map +1 -0
  141. package/dist/{chunk-FPVRQCCL.js → chunk-OHDIJOGG.js} +4 -4
  142. package/dist/{chunk-FPVRQCCL.js.map → chunk-OHDIJOGG.js.map} +1 -1
  143. package/dist/{chunk-GQVL2JKQ.cjs → chunk-OHKO5THF.cjs} +3 -3
  144. package/dist/{chunk-GQVL2JKQ.cjs.map → chunk-OHKO5THF.cjs.map} +1 -1
  145. package/dist/{chunk-LMBXJZLG.js → chunk-ON4JULCA.js} +3 -3
  146. package/dist/{chunk-LMBXJZLG.js.map → chunk-ON4JULCA.js.map} +1 -1
  147. package/dist/{chunk-A5YOIJKL.js → chunk-ONNY7UO4.js} +15 -15
  148. package/dist/{chunk-A5YOIJKL.js.map → chunk-ONNY7UO4.js.map} +1 -1
  149. package/dist/{chunk-DWCYEPTT.js → chunk-OSPTA4UR.js} +4 -4
  150. package/dist/{chunk-DWCYEPTT.js.map → chunk-OSPTA4UR.js.map} +1 -1
  151. package/dist/{chunk-FDUA6OGN.js → chunk-PFKRHNYV.js} +8 -8
  152. package/dist/chunk-PFKRHNYV.js.map +1 -0
  153. package/dist/{chunk-XMECP2MD.js → chunk-PHK4XBO5.js} +4 -4
  154. package/dist/{chunk-XMECP2MD.js.map → chunk-PHK4XBO5.js.map} +1 -1
  155. package/dist/{chunk-ZZJ4ZVYR.cjs → chunk-PJ6CC53R.cjs} +3 -3
  156. package/dist/{chunk-ZZJ4ZVYR.cjs.map → chunk-PJ6CC53R.cjs.map} +1 -1
  157. package/dist/{chunk-N3Y43KOB.js → chunk-PYHFVYVZ.js} +12 -5
  158. package/dist/chunk-PYHFVYVZ.js.map +1 -0
  159. package/dist/{chunk-XMCIXHGH.js → chunk-Q7G56ZIO.js} +39 -23
  160. package/dist/chunk-Q7G56ZIO.js.map +1 -0
  161. package/dist/{chunk-4PIW3Y5M.js → chunk-QAKASRE6.js} +34 -26
  162. package/dist/chunk-QAKASRE6.js.map +1 -0
  163. package/dist/{chunk-QGZC43L7.js → chunk-QAQOCS2J.js} +5 -5
  164. package/dist/{chunk-QGZC43L7.js.map → chunk-QAQOCS2J.js.map} +1 -1
  165. package/dist/{chunk-YVIH26FG.cjs → chunk-QKAYRHWP.cjs} +12 -12
  166. package/dist/{chunk-YVIH26FG.cjs.map → chunk-QKAYRHWP.cjs.map} +1 -1
  167. package/dist/{chunk-FDV7EQWH.js → chunk-RPG2ZP2T.js} +575 -68
  168. package/dist/chunk-RPG2ZP2T.js.map +1 -0
  169. package/dist/{chunk-P3JEMF6E.cjs → chunk-RSCA5AZW.cjs} +4 -4
  170. package/dist/{chunk-P3JEMF6E.cjs.map → chunk-RSCA5AZW.cjs.map} +1 -1
  171. package/dist/{chunk-5Y5FSR4N.js → chunk-SCXELRRZ.js} +3 -3
  172. package/dist/{chunk-5Y5FSR4N.js.map → chunk-SCXELRRZ.js.map} +1 -1
  173. package/dist/{chunk-JWTCEWQ4.cjs → chunk-SNEQXSC5.cjs} +2 -2
  174. package/dist/{chunk-JWTCEWQ4.cjs.map → chunk-SNEQXSC5.cjs.map} +1 -1
  175. package/dist/{chunk-U5TTXN45.cjs → chunk-SRA2L3SQ.cjs} +9 -7
  176. package/dist/chunk-SRA2L3SQ.cjs.map +1 -0
  177. package/dist/{chunk-5U6GETAW.js → chunk-TQDZLRIE.js} +3 -3
  178. package/dist/chunk-TQDZLRIE.js.map +1 -0
  179. package/dist/{chunk-HK3AMH3Q.cjs → chunk-VROIMIHB.cjs} +11 -3
  180. package/dist/chunk-VROIMIHB.cjs.map +1 -0
  181. package/dist/{chunk-3SHLOF4V.cjs → chunk-VTR2KGLY.cjs} +9 -9
  182. package/dist/{chunk-3SHLOF4V.cjs.map → chunk-VTR2KGLY.cjs.map} +1 -1
  183. package/dist/{chunk-XO3WLK65.js → chunk-VVDE4CHU.js} +3 -3
  184. package/dist/{chunk-XO3WLK65.js.map → chunk-VVDE4CHU.js.map} +1 -1
  185. package/dist/{chunk-BOOJDRJO.js → chunk-WSNMQQ4P.js} +38 -3
  186. package/dist/chunk-WSNMQQ4P.js.map +1 -0
  187. package/dist/chunk-WYMO3IIK.js +136 -0
  188. package/dist/chunk-WYMO3IIK.js.map +1 -0
  189. package/dist/{chunk-SPWVKDGC.cjs → chunk-X5QRRMGB.cjs} +35 -27
  190. package/dist/chunk-X5QRRMGB.cjs.map +1 -0
  191. package/dist/{chunk-SH6B4MG5.js → chunk-XBXDUAIM.js} +4 -4
  192. package/dist/{chunk-SH6B4MG5.js.map → chunk-XBXDUAIM.js.map} +1 -1
  193. package/dist/{chunk-56QJHQ5C.cjs → chunk-XEEVDZDK.cjs} +5 -5
  194. package/dist/{chunk-56QJHQ5C.cjs.map → chunk-XEEVDZDK.cjs.map} +1 -1
  195. package/dist/{chunk-GXODR6V4.js → chunk-XOIIUO6O.js} +3 -3
  196. package/dist/{chunk-GXODR6V4.js.map → chunk-XOIIUO6O.js.map} +1 -1
  197. package/dist/{chunk-ELYGV32O.cjs → chunk-XTHMC76F.cjs} +5 -5
  198. package/dist/{chunk-ELYGV32O.cjs.map → chunk-XTHMC76F.cjs.map} +1 -1
  199. package/dist/{chunk-FF235PKY.cjs → chunk-XWZEECEX.cjs} +3 -3
  200. package/dist/chunk-XWZEECEX.cjs.map +1 -0
  201. package/dist/{chunk-TVLZZI5Q.cjs → chunk-YJP6DUFO.cjs} +9 -9
  202. package/dist/{chunk-TVLZZI5Q.cjs.map → chunk-YJP6DUFO.cjs.map} +1 -1
  203. package/dist/{chunk-EHQ77LL5.js → chunk-ZB54MTMQ.js} +3 -3
  204. package/dist/{chunk-EHQ77LL5.js.map → chunk-ZB54MTMQ.js.map} +1 -1
  205. package/dist/components/Accordion/index.cjs +2 -2
  206. package/dist/components/Accordion/index.js +1 -1
  207. package/dist/components/Alert/index.cjs +5 -5
  208. package/dist/components/Alert/index.d.cts +1 -1
  209. package/dist/components/Alert/index.d.ts +1 -1
  210. package/dist/components/Alert/index.js +1 -1
  211. package/dist/components/AlertDialog/index.cjs +6 -5
  212. package/dist/components/AlertDialog/index.js +5 -4
  213. package/dist/components/AudioPlayer/index.cjs +6 -6
  214. package/dist/components/AudioPlayer/index.js +1 -1
  215. package/dist/components/Autocomplete/index.cjs +4 -4
  216. package/dist/components/Autocomplete/index.js +3 -3
  217. package/dist/components/Avatar/index.cjs +5 -5
  218. package/dist/components/Avatar/index.js +1 -1
  219. package/dist/components/Badge/index.d.cts +1 -1
  220. package/dist/components/Badge/index.d.ts +1 -1
  221. package/dist/components/Breadcrumb/index.cjs +3 -3
  222. package/dist/components/Breadcrumb/index.js +1 -1
  223. package/dist/components/Button/index.cjs +3 -3
  224. package/dist/components/Button/index.js +1 -1
  225. package/dist/components/Card/index.d.cts +2 -2
  226. package/dist/components/Card/index.d.ts +2 -2
  227. package/dist/components/CountryCodeDropdown/index.cjs +6 -6
  228. package/dist/components/CountryCodeDropdown/index.d.cts +11 -1
  229. package/dist/components/CountryCodeDropdown/index.d.ts +11 -1
  230. package/dist/components/CountryCodeDropdown/index.js +3 -3
  231. package/dist/components/CustomizableDashboard/index.cjs +11 -11
  232. package/dist/components/CustomizableDashboard/index.js +4 -4
  233. package/dist/components/DateInput/index.cjs +4 -4
  234. package/dist/components/DateInput/index.js +3 -3
  235. package/dist/components/Dropdown/index.cjs +13 -9
  236. package/dist/components/Dropdown/index.d.cts +38 -2
  237. package/dist/components/Dropdown/index.d.ts +38 -2
  238. package/dist/components/Dropdown/index.js +3 -3
  239. package/dist/components/FloatingWindow/index.cjs +4 -4
  240. package/dist/components/FloatingWindow/index.js +2 -2
  241. package/dist/components/GlossaryTooltip/index.cjs +4 -4
  242. package/dist/components/GlossaryTooltip/index.js +3 -3
  243. package/dist/components/KeyboardShortcutsOverlay/index.cjs +6 -5
  244. package/dist/components/KeyboardShortcutsOverlay/index.js +4 -3
  245. package/dist/components/Markdown/index.cjs +19 -19
  246. package/dist/components/Markdown/index.js +7 -7
  247. package/dist/components/MediaEditor/index.cjs +15 -14
  248. package/dist/components/MediaEditor/index.js +10 -9
  249. package/dist/components/MediaPlayer/index.cjs +6 -6
  250. package/dist/components/MediaPlayer/index.js +3 -3
  251. package/dist/components/Modal/index.cjs +11 -10
  252. package/dist/components/Modal/index.d.cts +1 -1
  253. package/dist/components/Modal/index.d.ts +1 -1
  254. package/dist/components/Modal/index.js +3 -2
  255. package/dist/components/Pagination/index.cjs +4 -4
  256. package/dist/components/Pagination/index.d.cts +1 -1
  257. package/dist/components/Pagination/index.d.ts +1 -1
  258. package/dist/components/Pagination/index.js +1 -1
  259. package/dist/components/PhoneInput/index.cjs +4 -4
  260. package/dist/components/PhoneInput/index.js +2 -2
  261. package/dist/components/Progress/index.d.cts +1 -1
  262. package/dist/components/Progress/index.d.ts +1 -1
  263. package/dist/components/QuickAction/index.cjs +6 -6
  264. package/dist/components/QuickAction/index.js +1 -1
  265. package/dist/components/RecordButton/index.d.cts +1 -1
  266. package/dist/components/RecordButton/index.d.ts +1 -1
  267. package/dist/components/RichTextEditor/index.cjs +9 -9
  268. package/dist/components/RichTextEditor/index.js +6 -6
  269. package/dist/components/SectionSpyNav/index.cjs +4 -4
  270. package/dist/components/SectionSpyNav/index.js +3 -3
  271. package/dist/components/Select/index.cjs +5 -5
  272. package/dist/components/Select/index.js +3 -3
  273. package/dist/components/Sheet/index.cjs +11 -11
  274. package/dist/components/Sheet/index.js +2 -2
  275. package/dist/components/Slider/index.cjs +5 -5
  276. package/dist/components/Slider/index.d.cts +2 -2
  277. package/dist/components/Slider/index.d.ts +2 -2
  278. package/dist/components/Slider/index.js +1 -1
  279. package/dist/components/SourceTip/index.cjs +4 -4
  280. package/dist/components/SourceTip/index.js +3 -3
  281. package/dist/components/SuperChat/index.cjs +292 -115
  282. package/dist/components/SuperChat/index.cjs.map +1 -1
  283. package/dist/components/SuperChat/index.d.cts +29 -8
  284. package/dist/components/SuperChat/index.d.ts +29 -8
  285. package/dist/components/SuperChat/index.js +284 -107
  286. package/dist/components/SuperChat/index.js.map +1 -1
  287. package/dist/components/SuperChat/plugins/index.cjs +7 -7
  288. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  289. package/dist/components/SuperChat/plugins/index.d.cts +2 -2
  290. package/dist/components/SuperChat/plugins/index.d.ts +2 -2
  291. package/dist/components/SuperChat/plugins/index.js +6 -6
  292. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  293. package/dist/components/Text/index.d.cts +1 -1
  294. package/dist/components/Text/index.d.ts +1 -1
  295. package/dist/components/ThemeProvider/index.cjs +9 -9
  296. package/dist/components/ThemeProvider/index.d.cts +1 -1
  297. package/dist/components/ThemeProvider/index.d.ts +1 -1
  298. package/dist/components/ThemeProvider/index.js +3 -3
  299. package/dist/components/Toggle/index.d.cts +1 -1
  300. package/dist/components/Toggle/index.d.ts +1 -1
  301. package/dist/components/Tooltip/index.cjs +3 -3
  302. package/dist/components/Tooltip/index.js +2 -2
  303. package/dist/components/TranscriptView/index.cjs +3 -3
  304. package/dist/components/TranscriptView/index.js +1 -1
  305. package/dist/datavis.cjs +2 -2
  306. package/dist/datavis.js +1 -1
  307. package/dist/esheet.cjs +15 -14
  308. package/dist/esheet.cjs.map +1 -1
  309. package/dist/esheet.js +12 -11
  310. package/dist/esheet.js.map +1 -1
  311. package/dist/hooks/index.cjs +3 -3
  312. package/dist/hooks/index.d.cts +1 -1
  313. package/dist/hooks/index.d.ts +1 -1
  314. package/dist/hooks/index.js +2 -2
  315. package/dist/index.cjs +2509 -2860
  316. package/dist/index.cjs.map +1 -1
  317. package/dist/index.d.cts +278 -43
  318. package/dist/index.d.ts +278 -43
  319. package/dist/index.js +1305 -1700
  320. package/dist/index.js.map +1 -1
  321. package/dist/motion.cjs +87 -0
  322. package/dist/motion.cjs.map +1 -0
  323. package/dist/motion.d.cts +52 -0
  324. package/dist/motion.d.ts +52 -0
  325. package/dist/motion.js +50 -0
  326. package/dist/motion.js.map +1 -0
  327. package/dist/styles/init.css +25 -0
  328. package/dist/styles.css +1 -1
  329. package/dist/tailwind-preset.cjs +4 -4
  330. package/dist/tailwind-preset.js +1 -1
  331. package/dist/{types-BoTeTPdH.d.ts → types-9vK_YdEb.d.ts} +12 -1
  332. package/dist/{types-DyIB9HYT.d.cts → types-DZDroUW8.d.cts} +12 -1
  333. package/dist/{useAnchoredPosition-C7PNglzD.d.ts → useAnchoredPosition-CKwLSQW8.d.cts} +10 -3
  334. package/dist/{useAnchoredPosition-C7PNglzD.d.cts → useAnchoredPosition-CKwLSQW8.d.ts} +10 -3
  335. package/package.json +21 -2
  336. package/dist/CsvBlock-OTFG3PYZ.cjs +0 -15
  337. package/dist/CsvBlock-PUSTBQ5B.js +0 -6
  338. package/dist/HtmlPreviewBlock-QHLSIMWJ.cjs +0 -15
  339. package/dist/HtmlPreviewBlock-YF2YVKKX.js +0 -6
  340. package/dist/MermaidBlock-H3TWNC4D.js +0 -6
  341. package/dist/MermaidBlock-ZLLBO3VY.cjs +0 -15
  342. package/dist/SurveyBlock-JLHS3YQD.js +0 -6
  343. package/dist/SurveyBlock-M2ZRTGVJ.cjs +0 -15
  344. package/dist/chunk-26DPQUSB.cjs +0 -1177
  345. package/dist/chunk-26DPQUSB.cjs.map +0 -1
  346. package/dist/chunk-3PXOIAF6.js +0 -3
  347. package/dist/chunk-4AE2L6AO.cjs.map +0 -1
  348. package/dist/chunk-4PIW3Y5M.js.map +0 -1
  349. package/dist/chunk-5JZIDILK.cjs.map +0 -1
  350. package/dist/chunk-5U6GETAW.js.map +0 -1
  351. package/dist/chunk-6EWJGRC3.js.map +0 -1
  352. package/dist/chunk-7L7OPISJ.cjs.map +0 -1
  353. package/dist/chunk-AESFOMSH.js.map +0 -1
  354. package/dist/chunk-BOOJDRJO.js.map +0 -1
  355. package/dist/chunk-BOW7ZGI2.cjs.map +0 -1
  356. package/dist/chunk-D2GID3YK.js.map +0 -1
  357. package/dist/chunk-DG7KE4YJ.cjs.map +0 -1
  358. package/dist/chunk-EKRT7K2K.js +0 -1145
  359. package/dist/chunk-EKRT7K2K.js.map +0 -1
  360. package/dist/chunk-EPQPUFS6.cjs.map +0 -1
  361. package/dist/chunk-FDUA6OGN.js.map +0 -1
  362. package/dist/chunk-FDV7EQWH.js.map +0 -1
  363. package/dist/chunk-FF235PKY.cjs.map +0 -1
  364. package/dist/chunk-H7QSGFMZ.cjs.map +0 -1
  365. package/dist/chunk-HK3AMH3Q.cjs.map +0 -1
  366. package/dist/chunk-IILJGFI5.js.map +0 -1
  367. package/dist/chunk-IYXCFIMP.js.map +0 -1
  368. package/dist/chunk-JHZW3Y62.js.map +0 -1
  369. package/dist/chunk-L6D4CKLV.cjs.map +0 -1
  370. package/dist/chunk-LZU7YBXG.js.map +0 -1
  371. package/dist/chunk-MYFZYUPR.cjs.map +0 -1
  372. package/dist/chunk-N3Y43KOB.js.map +0 -1
  373. package/dist/chunk-P2VTQ5AR.cjs.map +0 -1
  374. package/dist/chunk-RDGRKYQ5.cjs.map +0 -1
  375. package/dist/chunk-RYQ3S3KO.cjs.map +0 -1
  376. package/dist/chunk-RZJXCI53.js.map +0 -1
  377. package/dist/chunk-SEPYBAML.js.map +0 -1
  378. package/dist/chunk-SK7H3Z67.cjs.map +0 -1
  379. package/dist/chunk-SPWVKDGC.cjs.map +0 -1
  380. package/dist/chunk-U5TTXN45.cjs.map +0 -1
  381. package/dist/chunk-XMCIXHGH.js.map +0 -1
  382. package/dist/chunk-XS35KPBZ.cjs.map +0 -1
  383. package/dist/chunk-XWYKLEKG.js.map +0 -1
  384. package/dist/chunk-Y6YSJPVC.js.map +0 -1
@@ -0,0 +1,705 @@
1
+ import { cn } from './chunk-TQONQSJO.js';
2
+ import { useAnchoredPosition } from './chunk-WSNMQQ4P.js';
3
+ import * as React from 'react';
4
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
5
+ import { createPortal } from 'react-dom';
6
+
7
+ function getFileType(mimeType) {
8
+ if (mimeType.startsWith("image/")) return "image";
9
+ if (mimeType.startsWith("video/")) return "video";
10
+ if (mimeType.startsWith("audio/")) return "audio";
11
+ if (mimeType.includes("pdf") || mimeType.includes("document") || mimeType.includes("text")) {
12
+ return "document";
13
+ }
14
+ return "file";
15
+ }
16
+ function formatFileSize(bytes) {
17
+ if (bytes < 1024) return `${bytes} B`;
18
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
19
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
20
+ }
21
+ function validateFile(file, acceptedTypes, maxSize) {
22
+ if (acceptedTypes && acceptedTypes.length > 0) {
23
+ const isAccepted = acceptedTypes.some((type) => {
24
+ if (type.startsWith(".")) {
25
+ return file.name.toLowerCase().endsWith(type.toLowerCase());
26
+ }
27
+ if (type.endsWith("/*")) {
28
+ return file.type.startsWith(type.replace("/*", "/"));
29
+ }
30
+ return file.type === type;
31
+ });
32
+ if (!isAccepted) {
33
+ return { valid: false, error: "File type not supported" };
34
+ }
35
+ }
36
+ if (maxSize && file.size > maxSize) {
37
+ return {
38
+ valid: false,
39
+ error: `File too large (max ${formatFileSize(maxSize)})`
40
+ };
41
+ }
42
+ return { valid: true };
43
+ }
44
+ function generateAttachmentId() {
45
+ return `attachment-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
46
+ }
47
+ function AttachmentPreviewItem({
48
+ attachment,
49
+ onRemove,
50
+ onRetry,
51
+ disabled = false,
52
+ className
53
+ }) {
54
+ const { file, previewUrl, type, state, progress } = attachment;
55
+ const isImage = type === "image";
56
+ const isVideo = type === "video";
57
+ const isUploading = state === "uploading";
58
+ const isFailed = state === "failed";
59
+ return /* @__PURE__ */ jsxs(
60
+ "div",
61
+ {
62
+ className: cn(
63
+ "group relative overflow-hidden rounded-lg",
64
+ "bg-neutral-100 dark:bg-neutral-800",
65
+ "border border-neutral-200 dark:border-neutral-700",
66
+ isFailed && "border-red-500",
67
+ className
68
+ ),
69
+ children: [
70
+ (isImage || isVideo) && previewUrl ? /* @__PURE__ */ jsxs("div", { className: "relative h-20 w-20", children: [
71
+ isVideo ? /* @__PURE__ */ jsx(
72
+ "video",
73
+ {
74
+ src: previewUrl,
75
+ "aria-label": file.name,
76
+ muted: true,
77
+ playsInline: true,
78
+ preload: "metadata",
79
+ className: cn(
80
+ "h-full w-full object-cover",
81
+ (isUploading || isFailed) && "opacity-50"
82
+ )
83
+ }
84
+ ) : /* @__PURE__ */ jsx(
85
+ "img",
86
+ {
87
+ src: previewUrl,
88
+ alt: file.name,
89
+ className: cn(
90
+ "h-full w-full object-cover",
91
+ (isUploading || isFailed) && "opacity-50"
92
+ )
93
+ }
94
+ ),
95
+ isVideo && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx(
96
+ "svg",
97
+ {
98
+ "aria-hidden": "true",
99
+ className: "h-6 w-6 text-white drop-shadow",
100
+ fill: "currentColor",
101
+ viewBox: "0 0 24 24",
102
+ children: /* @__PURE__ */ jsx("path", { d: "M8 5v14l11-7z" })
103
+ }
104
+ ) })
105
+ ] }) : (
106
+ /* File preview */
107
+ /* @__PURE__ */ jsxs("div", { className: "flex h-20 w-20 flex-col items-center justify-center p-2", children: [
108
+ /* @__PURE__ */ jsx(
109
+ "svg",
110
+ {
111
+ "aria-hidden": "true",
112
+ className: "h-8 w-8 text-neutral-500",
113
+ fill: "none",
114
+ viewBox: "0 0 24 24",
115
+ stroke: "currentColor",
116
+ children: /* @__PURE__ */ jsx(
117
+ "path",
118
+ {
119
+ strokeLinecap: "round",
120
+ strokeLinejoin: "round",
121
+ strokeWidth: 2,
122
+ d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
123
+ }
124
+ )
125
+ }
126
+ ),
127
+ /* @__PURE__ */ jsx("span", { className: "mt-1 max-w-full truncate px-1 text-xs text-neutral-600 dark:text-neutral-400", children: file.name.split(".").pop()?.toUpperCase() })
128
+ ] })
129
+ ),
130
+ isUploading && progress !== void 0 && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ jsxs("div", { className: "text-center text-white", children: [
131
+ /* @__PURE__ */ jsxs(
132
+ "svg",
133
+ {
134
+ "aria-hidden": "true",
135
+ className: "mx-auto h-6 w-6 animate-spin",
136
+ fill: "none",
137
+ viewBox: "0 0 24 24",
138
+ children: [
139
+ /* @__PURE__ */ jsx(
140
+ "circle",
141
+ {
142
+ className: "opacity-25",
143
+ cx: "12",
144
+ cy: "12",
145
+ r: "10",
146
+ stroke: "currentColor",
147
+ strokeWidth: "4"
148
+ }
149
+ ),
150
+ /* @__PURE__ */ jsx(
151
+ "path",
152
+ {
153
+ className: "opacity-75",
154
+ fill: "currentColor",
155
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
156
+ }
157
+ )
158
+ ]
159
+ }
160
+ ),
161
+ /* @__PURE__ */ jsxs("span", { className: "mt-1 text-xs", children: [
162
+ progress,
163
+ "%"
164
+ ] })
165
+ ] }) }),
166
+ isFailed && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
167
+ /* @__PURE__ */ jsx(
168
+ "svg",
169
+ {
170
+ "aria-hidden": "true",
171
+ className: "mx-auto h-6 w-6 text-red-400",
172
+ fill: "none",
173
+ viewBox: "0 0 24 24",
174
+ stroke: "currentColor",
175
+ children: /* @__PURE__ */ jsx(
176
+ "path",
177
+ {
178
+ strokeLinecap: "round",
179
+ strokeLinejoin: "round",
180
+ strokeWidth: 2,
181
+ d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
182
+ }
183
+ )
184
+ }
185
+ ),
186
+ onRetry && /* @__PURE__ */ jsx(
187
+ "button",
188
+ {
189
+ type: "button",
190
+ onClick: onRetry,
191
+ disabled,
192
+ className: "mt-1 text-xs text-white underline hover:no-underline disabled:no-underline disabled:opacity-50",
193
+ children: "Retry"
194
+ }
195
+ )
196
+ ] }) }),
197
+ /* @__PURE__ */ jsx(
198
+ "button",
199
+ {
200
+ type: "button",
201
+ onClick: onRemove,
202
+ disabled,
203
+ className: cn(
204
+ "absolute -end-1 -top-1 z-10",
205
+ "rounded-full p-1",
206
+ "bg-neutral-900 text-white",
207
+ "opacity-0 group-hover:opacity-100",
208
+ "focus:ring-primary-500 focus:opacity-100 focus:ring-2 focus:outline-none",
209
+ "transition-opacity",
210
+ "disabled:cursor-not-allowed disabled:group-hover:opacity-0"
211
+ ),
212
+ "aria-label": `Remove ${file.name}`,
213
+ children: /* @__PURE__ */ jsx(
214
+ "svg",
215
+ {
216
+ "aria-hidden": "true",
217
+ className: "h-3 w-3",
218
+ fill: "none",
219
+ viewBox: "0 0 24 24",
220
+ stroke: "currentColor",
221
+ children: /* @__PURE__ */ jsx(
222
+ "path",
223
+ {
224
+ strokeLinecap: "round",
225
+ strokeLinejoin: "round",
226
+ strokeWidth: 2,
227
+ d: "M6 18L18 6M6 6l12 12"
228
+ }
229
+ )
230
+ }
231
+ )
232
+ }
233
+ ),
234
+ /* @__PURE__ */ jsx(
235
+ "div",
236
+ {
237
+ className: cn(
238
+ "absolute start-0 end-0 bottom-0",
239
+ "bg-black/70 px-1 py-0.5",
240
+ "opacity-0 group-hover:opacity-100",
241
+ "transition-opacity"
242
+ ),
243
+ children: /* @__PURE__ */ jsx("p", { className: "truncate text-xs text-white", children: file.name })
244
+ }
245
+ )
246
+ ]
247
+ }
248
+ );
249
+ }
250
+ AttachmentPreviewItem.displayName = "AttachmentPreviewItem";
251
+ var AttachmentPicker = React.forwardRef(
252
+ ({
253
+ onFilesSelected,
254
+ acceptedTypes = ["image/*", "video/*", ".pdf", ".doc", ".docx"],
255
+ maxFileSize = 25 * 1024 * 1024,
256
+ // 25MB
257
+ maxFiles = 10,
258
+ multiple = true,
259
+ disabled = false,
260
+ onError,
261
+ className,
262
+ children
263
+ }, ref) => {
264
+ const inputRef = React.useRef(null);
265
+ React.useImperativeHandle(ref, () => inputRef.current);
266
+ const handleClick = () => {
267
+ inputRef.current?.click();
268
+ };
269
+ const handleChange = (event) => {
270
+ const files = Array.from(event.target.files || []);
271
+ if (files.length === 0) return;
272
+ const validFiles = [];
273
+ for (const file of files.slice(0, maxFiles)) {
274
+ const validation = validateFile(file, acceptedTypes, maxFileSize);
275
+ if (validation.valid) {
276
+ validFiles.push(file);
277
+ } else if (onError) {
278
+ onError(`${file.name}: ${validation.error}`);
279
+ }
280
+ }
281
+ if (files.length > maxFiles && onError) {
282
+ onError(`Maximum ${maxFiles} files allowed`);
283
+ }
284
+ if (validFiles.length > 0) {
285
+ onFilesSelected(validFiles);
286
+ }
287
+ event.target.value = "";
288
+ };
289
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
290
+ /* @__PURE__ */ jsx(
291
+ "input",
292
+ {
293
+ ref: inputRef,
294
+ type: "file",
295
+ accept: acceptedTypes.join(","),
296
+ multiple,
297
+ onChange: handleChange,
298
+ disabled,
299
+ className: "sr-only",
300
+ "aria-label": "Select files to attach"
301
+ }
302
+ ),
303
+ /* @__PURE__ */ jsx(
304
+ "button",
305
+ {
306
+ type: "button",
307
+ onClick: handleClick,
308
+ disabled,
309
+ "data-slot": "attachment-picker-button",
310
+ className: cn(
311
+ "inline-flex items-center justify-center",
312
+ "rounded-full p-2",
313
+ "text-neutral-500 hover:text-neutral-700",
314
+ "dark:text-neutral-400 dark:hover:text-neutral-200",
315
+ "hover:bg-neutral-100 dark:hover:bg-neutral-800",
316
+ "focus:ring-primary-500 focus:ring-2 focus:outline-none",
317
+ "disabled:cursor-not-allowed disabled:opacity-50",
318
+ "transition-colors",
319
+ className
320
+ ),
321
+ "aria-label": "Attach files",
322
+ children: children || /* @__PURE__ */ jsx(
323
+ "svg",
324
+ {
325
+ "aria-hidden": "true",
326
+ className: "h-5 w-5",
327
+ fill: "none",
328
+ viewBox: "0 0 24 24",
329
+ stroke: "currentColor",
330
+ children: /* @__PURE__ */ jsx(
331
+ "path",
332
+ {
333
+ strokeLinecap: "round",
334
+ strokeLinejoin: "round",
335
+ strokeWidth: 2,
336
+ d: "M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"
337
+ }
338
+ )
339
+ }
340
+ )
341
+ }
342
+ )
343
+ ] });
344
+ }
345
+ );
346
+ AttachmentPicker.displayName = "AttachmentPicker";
347
+ function DragDropZone({
348
+ onFilesDropped,
349
+ acceptedTypes,
350
+ maxFileSize,
351
+ maxFiles = 10,
352
+ disabled = false,
353
+ onError,
354
+ overlayLabel = "Drop files here",
355
+ children,
356
+ className
357
+ }) {
358
+ const [isDragging, setIsDragging] = React.useState(false);
359
+ const dragCounterRef = React.useRef(0);
360
+ const handleDragEnter = (event) => {
361
+ event.preventDefault();
362
+ event.stopPropagation();
363
+ if (disabled) return;
364
+ dragCounterRef.current++;
365
+ if (event.dataTransfer.items && event.dataTransfer.items.length > 0) {
366
+ setIsDragging(true);
367
+ }
368
+ };
369
+ const handleDragLeave = (event) => {
370
+ event.preventDefault();
371
+ event.stopPropagation();
372
+ if (disabled) return;
373
+ dragCounterRef.current--;
374
+ if (dragCounterRef.current === 0) {
375
+ setIsDragging(false);
376
+ }
377
+ };
378
+ const handleDragOver = (event) => {
379
+ event.preventDefault();
380
+ event.stopPropagation();
381
+ };
382
+ const handleDrop = (event) => {
383
+ event.preventDefault();
384
+ event.stopPropagation();
385
+ if (disabled) return;
386
+ setIsDragging(false);
387
+ dragCounterRef.current = 0;
388
+ const files = Array.from(event.dataTransfer.files);
389
+ if (files.length === 0) return;
390
+ const validFiles = [];
391
+ for (const file of files.slice(0, maxFiles)) {
392
+ const validation = validateFile(file, acceptedTypes, maxFileSize);
393
+ if (validation.valid) {
394
+ validFiles.push(file);
395
+ } else if (onError) {
396
+ onError(`${file.name}: ${validation.error}`);
397
+ }
398
+ }
399
+ if (files.length > maxFiles && onError) {
400
+ onError(`Maximum ${maxFiles} files allowed`);
401
+ }
402
+ if (validFiles.length > 0) {
403
+ onFilesDropped(validFiles);
404
+ }
405
+ };
406
+ return /* @__PURE__ */ jsxs(
407
+ "div",
408
+ {
409
+ onDragEnter: handleDragEnter,
410
+ onDragLeave: handleDragLeave,
411
+ onDragOver: handleDragOver,
412
+ onDrop: handleDrop,
413
+ className: cn("relative", className),
414
+ children: [
415
+ children,
416
+ isDragging && /* @__PURE__ */ jsx(
417
+ "div",
418
+ {
419
+ className: cn(
420
+ "absolute inset-0 z-50",
421
+ "flex items-center justify-center",
422
+ "bg-primary-50/90 dark:bg-primary-900/90",
423
+ "border-primary-500 border-2 border-dashed",
424
+ "rounded-lg"
425
+ ),
426
+ children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
427
+ /* @__PURE__ */ jsx(
428
+ "svg",
429
+ {
430
+ "aria-hidden": "true",
431
+ className: "text-primary-800 mx-auto h-12 w-12",
432
+ fill: "none",
433
+ viewBox: "0 0 24 24",
434
+ stroke: "currentColor",
435
+ children: /* @__PURE__ */ jsx(
436
+ "path",
437
+ {
438
+ strokeLinecap: "round",
439
+ strokeLinejoin: "round",
440
+ strokeWidth: 2,
441
+ d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
442
+ }
443
+ )
444
+ }
445
+ ),
446
+ /* @__PURE__ */ jsx("p", { className: "text-primary-700 dark:text-primary-300 mt-2 text-sm font-medium", children: overlayLabel })
447
+ ] })
448
+ }
449
+ )
450
+ ]
451
+ }
452
+ );
453
+ }
454
+ DragDropZone.displayName = "DragDropZone";
455
+ function CameraButton({
456
+ onCapture,
457
+ useFrontCamera = false,
458
+ disabled = false,
459
+ className
460
+ }) {
461
+ const inputRef = React.useRef(null);
462
+ const handleClick = () => {
463
+ inputRef.current?.click();
464
+ };
465
+ const handleChange = (event) => {
466
+ const file = event.target.files?.[0];
467
+ if (file) {
468
+ onCapture(file);
469
+ }
470
+ event.target.value = "";
471
+ };
472
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
473
+ /* @__PURE__ */ jsx(
474
+ "input",
475
+ {
476
+ ref: inputRef,
477
+ type: "file",
478
+ accept: "image/*",
479
+ capture: useFrontCamera ? "user" : "environment",
480
+ onChange: handleChange,
481
+ disabled,
482
+ className: "sr-only",
483
+ "aria-label": "Take a photo"
484
+ }
485
+ ),
486
+ /* @__PURE__ */ jsx(
487
+ "button",
488
+ {
489
+ type: "button",
490
+ onClick: handleClick,
491
+ disabled,
492
+ className: cn(
493
+ "inline-flex items-center justify-center",
494
+ "rounded-full p-2",
495
+ "text-neutral-500 hover:text-neutral-700",
496
+ "dark:text-neutral-400 dark:hover:text-neutral-200",
497
+ "hover:bg-neutral-100 dark:hover:bg-neutral-800",
498
+ "focus:ring-primary-500 focus:ring-2 focus:outline-none",
499
+ "disabled:cursor-not-allowed disabled:opacity-50",
500
+ "transition-colors",
501
+ className
502
+ ),
503
+ "aria-label": "Take a photo",
504
+ children: /* @__PURE__ */ jsxs(
505
+ "svg",
506
+ {
507
+ "aria-hidden": "true",
508
+ className: "h-5 w-5",
509
+ fill: "none",
510
+ viewBox: "0 0 24 24",
511
+ stroke: "currentColor",
512
+ children: [
513
+ /* @__PURE__ */ jsx(
514
+ "path",
515
+ {
516
+ strokeLinecap: "round",
517
+ strokeLinejoin: "round",
518
+ strokeWidth: 2,
519
+ d: "M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"
520
+ }
521
+ ),
522
+ /* @__PURE__ */ jsx(
523
+ "path",
524
+ {
525
+ strokeLinecap: "round",
526
+ strokeLinejoin: "round",
527
+ strokeWidth: 2,
528
+ d: "M15 13a3 3 0 11-6 0 3 3 0 016 0z"
529
+ }
530
+ )
531
+ ]
532
+ }
533
+ )
534
+ }
535
+ )
536
+ ] });
537
+ }
538
+ CameraButton.displayName = "CameraButton";
539
+ function activeMentionQuery(value, caret) {
540
+ const upToCaret = value.slice(0, caret);
541
+ const match = /(^|\s)@([^\s@]*)$/.exec(upToCaret);
542
+ if (!match) return null;
543
+ const query = match[2];
544
+ return { query, start: caret - query.length - 1 };
545
+ }
546
+ function useMentionAutocomplete({
547
+ options,
548
+ value,
549
+ setValue,
550
+ textareaRef
551
+ }) {
552
+ const enabled = !!options && options.length > 0;
553
+ const [mention, setMention] = React.useState(null);
554
+ const [highlight, setHighlight] = React.useState(0);
555
+ const listId = React.useId();
556
+ const optionId = React.useCallback(
557
+ (index) => `${listId}-option-${index}`,
558
+ [listId]
559
+ );
560
+ const suggestions = React.useMemo(() => {
561
+ if (!mention || !options) return [];
562
+ const q = mention.query.toLowerCase();
563
+ return options.filter((o) => o.label.toLowerCase().includes(q));
564
+ }, [mention, options]);
565
+ const menuOpen = enabled && mention !== null && suggestions.length > 0;
566
+ const {
567
+ anchorRef,
568
+ floatingRef,
569
+ style: menuStyle
570
+ } = useAnchoredPosition({
571
+ open: menuOpen,
572
+ placement: "top-start",
573
+ maxHeight: 224
574
+ });
575
+ const clampedHighlight = menuOpen ? Math.min(highlight, suggestions.length - 1) : -1;
576
+ const activeOptionId = menuOpen ? optionId(clampedHighlight) : void 0;
577
+ const sync = React.useCallback(
578
+ (nextValue, caret) => {
579
+ if (!enabled) return;
580
+ setMention(activeMentionQuery(nextValue, caret));
581
+ setHighlight(0);
582
+ },
583
+ [enabled]
584
+ );
585
+ const insert = (option) => {
586
+ if (!mention) return;
587
+ const insertValue = option.value ?? option.label.split(" ")[0];
588
+ const before = value.slice(0, mention.start);
589
+ const after = value.slice(mention.start + 1 + mention.query.length);
590
+ const insertText = `@${insertValue} `;
591
+ setValue(before + insertText + after);
592
+ setMention(null);
593
+ const caret = before.length + insertText.length;
594
+ requestAnimationFrame(() => {
595
+ const el = textareaRef.current;
596
+ if (el) {
597
+ el.focus();
598
+ el.setSelectionRange(caret, caret);
599
+ }
600
+ });
601
+ };
602
+ const handleKeyDown = (event) => {
603
+ if (!menuOpen) return false;
604
+ if (event.key === "ArrowDown") {
605
+ event.preventDefault();
606
+ setHighlight(
607
+ (h) => (Math.min(h, suggestions.length - 1) + 1) % suggestions.length
608
+ );
609
+ return true;
610
+ }
611
+ if (event.key === "ArrowUp") {
612
+ event.preventDefault();
613
+ setHighlight(
614
+ (h) => (Math.min(h, suggestions.length - 1) - 1 + suggestions.length) % suggestions.length
615
+ );
616
+ return true;
617
+ }
618
+ if (event.key === "Enter" || event.key === "Tab") {
619
+ event.preventDefault();
620
+ const chosen = suggestions[clampedHighlight];
621
+ if (chosen) insert(chosen);
622
+ return true;
623
+ }
624
+ if (event.key === "Escape") {
625
+ event.preventDefault();
626
+ setMention(null);
627
+ return true;
628
+ }
629
+ return false;
630
+ };
631
+ const inputProps = enabled ? {
632
+ "aria-controls": menuOpen ? listId : void 0,
633
+ "aria-activedescendant": activeOptionId,
634
+ "aria-autocomplete": "list"
635
+ } : {};
636
+ return {
637
+ enabled,
638
+ menuOpen,
639
+ suggestions,
640
+ highlight: clampedHighlight,
641
+ listId,
642
+ optionId,
643
+ anchorRef,
644
+ floatingRef,
645
+ menuStyle,
646
+ sync,
647
+ insert,
648
+ setHighlight,
649
+ handleKeyDown,
650
+ inputProps
651
+ };
652
+ }
653
+ function MentionMenu({
654
+ mention,
655
+ label = "Mention",
656
+ dataSlot = "composer-mention-list"
657
+ }) {
658
+ if (!mention.menuOpen) return null;
659
+ return createPortal(
660
+ /* @__PURE__ */ jsx(
661
+ "ul",
662
+ {
663
+ ref: mention.floatingRef,
664
+ style: mention.menuStyle,
665
+ id: mention.listId,
666
+ role: "listbox",
667
+ "aria-label": label,
668
+ "data-slot": dataSlot,
669
+ className: "w-64 overflow-y-auto rounded-lg border border-neutral-200 bg-white py-1 shadow-lg dark:border-neutral-700 dark:bg-neutral-800",
670
+ children: mention.suggestions.map((option, i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
671
+ "button",
672
+ {
673
+ type: "button",
674
+ id: mention.optionId(i),
675
+ role: "option",
676
+ "aria-selected": i === mention.highlight,
677
+ onMouseDown: (e) => {
678
+ e.preventDefault();
679
+ mention.insert(option);
680
+ },
681
+ onMouseEnter: () => mention.setHighlight(i),
682
+ className: cn(
683
+ "flex w-full items-center gap-2 px-3 py-1.5 text-start text-sm",
684
+ i === mention.highlight ? "bg-primary-100 text-primary-900 dark:bg-primary-900/40 dark:text-primary-100" : "text-neutral-700 dark:text-neutral-200"
685
+ ),
686
+ children: [
687
+ option.icon,
688
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate", children: [
689
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: option.label }),
690
+ option.description && /* @__PURE__ */ jsx("span", { className: "ms-1 text-xs text-neutral-400", children: option.description })
691
+ ] }),
692
+ option.meta && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-neutral-400", children: option.meta })
693
+ ]
694
+ }
695
+ ) }, option.id))
696
+ }
697
+ ),
698
+ document.body
699
+ );
700
+ }
701
+ MentionMenu.displayName = "MentionMenu";
702
+
703
+ export { AttachmentPicker, AttachmentPreviewItem, CameraButton, DragDropZone, MentionMenu, generateAttachmentId, getFileType, useMentionAutocomplete, validateFile };
704
+ //# sourceMappingURL=chunk-IF3X2WZP.js.map
705
+ //# sourceMappingURL=chunk-IF3X2WZP.js.map