@luxfi/ui 7.4.15 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (910) hide show
  1. package/LICENSE.md +21 -0
  2. package/dist/3d-button.cjs +298 -0
  3. package/dist/3d-button.d.ts +52 -0
  4. package/dist/3d-button.d.ts.map +1 -0
  5. package/dist/3d-button.js +273 -0
  6. package/dist/3d-card.cjs +236 -0
  7. package/dist/3d-card.d.ts +29 -0
  8. package/dist/3d-card.d.ts.map +1 -0
  9. package/dist/3d-card.js +209 -0
  10. package/dist/3d-carousel.cjs +375 -0
  11. package/dist/3d-carousel.d.ts +26 -0
  12. package/dist/3d-carousel.d.ts.map +1 -0
  13. package/dist/3d-carousel.js +348 -0
  14. package/dist/3d-grid.cjs +360 -0
  15. package/dist/3d-grid.d.ts +49 -0
  16. package/dist/3d-grid.d.ts.map +1 -0
  17. package/dist/3d-grid.js +335 -0
  18. package/dist/3d-marquee.cjs +8669 -0
  19. package/dist/3d-marquee.d.ts +65 -0
  20. package/dist/3d-marquee.d.ts.map +1 -0
  21. package/dist/3d-marquee.js +8645 -0
  22. package/dist/3d-model-viewer.cjs +909 -0
  23. package/dist/3d-model-viewer.d.ts +45 -0
  24. package/dist/3d-model-viewer.d.ts.map +1 -0
  25. package/dist/3d-model-viewer.js +886 -0
  26. package/dist/3d-pin.cjs +46 -0
  27. package/dist/3d-pin.d.ts +8 -0
  28. package/dist/3d-pin.d.ts.map +1 -0
  29. package/dist/3d-pin.js +24 -0
  30. package/dist/3d-scene.cjs +439 -0
  31. package/dist/3d-scene.d.ts +76 -0
  32. package/dist/3d-scene.d.ts.map +1 -0
  33. package/dist/3d-scene.js +407 -0
  34. package/dist/3d-text.cjs +367 -0
  35. package/dist/3d-text.d.ts +62 -0
  36. package/dist/3d-text.d.ts.map +1 -0
  37. package/dist/3d-text.js +341 -0
  38. package/dist/accordion.d.ts +10 -12
  39. package/dist/accordion.d.ts.map +1 -0
  40. package/dist/advanced-chart.cjs +53 -0
  41. package/dist/advanced-chart.d.ts +6 -0
  42. package/dist/advanced-chart.d.ts.map +1 -0
  43. package/dist/advanced-chart.js +51 -0
  44. package/dist/advanced-navigation-bar.cjs +459 -0
  45. package/dist/advanced-navigation-bar.d.ts +14 -0
  46. package/dist/advanced-navigation-bar.d.ts.map +1 -0
  47. package/dist/advanced-navigation-bar.js +437 -0
  48. package/dist/ai-actions.cjs +57 -0
  49. package/dist/ai-actions.d.ts +14 -0
  50. package/dist/ai-actions.d.ts.map +1 -0
  51. package/dist/ai-actions.js +35 -0
  52. package/dist/ai-agents.cjs +1764 -0
  53. package/dist/ai-agents.d.ts +56 -0
  54. package/dist/ai-agents.d.ts.map +1 -0
  55. package/dist/ai-agents.js +1740 -0
  56. package/dist/ai-assistant.cjs +907 -0
  57. package/dist/ai-assistant.d.ts +28 -0
  58. package/dist/ai-assistant.d.ts.map +1 -0
  59. package/dist/ai-assistant.js +886 -0
  60. package/dist/ai-chat.cjs +1165 -0
  61. package/dist/ai-chat.d.ts +56 -0
  62. package/dist/ai-chat.d.ts.map +1 -0
  63. package/dist/ai-chat.js +1141 -0
  64. package/dist/ai-code.cjs +1866 -0
  65. package/dist/ai-code.d.ts +58 -0
  66. package/dist/ai-code.d.ts.map +1 -0
  67. package/dist/ai-code.js +1841 -0
  68. package/dist/ai-model-selector-navigation-bar.cjs +59 -0
  69. package/dist/ai-model-selector-navigation-bar.d.ts +15 -0
  70. package/dist/ai-model-selector-navigation-bar.d.ts.map +1 -0
  71. package/dist/ai-model-selector-navigation-bar.js +37 -0
  72. package/dist/ai-models.cjs +41 -0
  73. package/dist/ai-models.d.ts +15 -0
  74. package/dist/ai-models.d.ts.map +1 -0
  75. package/dist/ai-models.js +19 -0
  76. package/dist/ai-playground.cjs +1110 -0
  77. package/dist/ai-playground.d.ts +66 -0
  78. package/dist/ai-playground.d.ts.map +1 -0
  79. package/dist/ai-playground.js +1088 -0
  80. package/dist/ai-tools.cjs +1043 -0
  81. package/dist/ai-tools.d.ts +23 -0
  82. package/dist/ai-tools.d.ts.map +1 -0
  83. package/dist/ai-tools.js +1022 -0
  84. package/dist/ai-vision.cjs +1831 -0
  85. package/dist/ai-vision.d.ts +74 -0
  86. package/dist/ai-vision.d.ts.map +1 -0
  87. package/dist/ai-vision.js +1810 -0
  88. package/dist/ai-voice-settings.cjs +1511 -0
  89. package/dist/ai-voice-settings.d.ts +100 -0
  90. package/dist/ai-voice-settings.d.ts.map +1 -0
  91. package/dist/ai-voice-settings.js +1478 -0
  92. package/dist/ai-voice.cjs +1522 -0
  93. package/dist/ai-voice.d.ts +72 -0
  94. package/dist/ai-voice.d.ts.map +1 -0
  95. package/dist/ai-voice.js +1501 -0
  96. package/dist/alert.cjs +14 -147
  97. package/dist/alert.d.ts +4 -5
  98. package/dist/alert.d.ts.map +1 -0
  99. package/dist/alert.js +14 -147
  100. package/dist/android.cjs +127 -0
  101. package/dist/android.d.ts +19 -0
  102. package/dist/android.d.ts.map +1 -0
  103. package/dist/android.js +104 -0
  104. package/dist/animated-background.cjs +8830 -0
  105. package/dist/animated-background.d.ts +103 -0
  106. package/dist/animated-background.d.ts.map +1 -0
  107. package/dist/animated-background.js +8824 -0
  108. package/dist/animated-beam.cjs +8438 -0
  109. package/dist/animated-beam.d.ts +15 -0
  110. package/dist/animated-beam.d.ts.map +1 -0
  111. package/dist/animated-beam.js +8417 -0
  112. package/dist/animated-cursor.cjs +269 -0
  113. package/dist/animated-cursor.d.ts +70 -0
  114. package/dist/animated-cursor.d.ts.map +1 -0
  115. package/dist/animated-cursor.js +264 -0
  116. package/dist/animated-icon.cjs +8927 -0
  117. package/dist/animated-icon.d.ts +119 -0
  118. package/dist/animated-icon.d.ts.map +1 -0
  119. package/dist/animated-icon.js +8902 -0
  120. package/dist/animated-list.cjs +9226 -0
  121. package/dist/animated-list.d.ts +126 -0
  122. package/dist/animated-list.d.ts.map +1 -0
  123. package/dist/animated-list.js +9201 -0
  124. package/dist/animated-number.cjs +8773 -0
  125. package/dist/animated-number.d.ts +127 -0
  126. package/dist/animated-number.d.ts.map +1 -0
  127. package/dist/animated-number.js +8767 -0
  128. package/dist/animated-testimonials.cjs +8653 -0
  129. package/dist/animated-testimonials.d.ts +17 -0
  130. package/dist/animated-testimonials.d.ts.map +1 -0
  131. package/dist/animated-testimonials.js +8632 -0
  132. package/dist/animated-text.cjs +8914 -0
  133. package/dist/animated-text.d.ts +65 -0
  134. package/dist/animated-text.d.ts.map +1 -0
  135. package/dist/animated-text.js +8890 -0
  136. package/dist/animated-tooltip.cjs +8624 -0
  137. package/dist/animated-tooltip.d.ts +9 -0
  138. package/dist/animated-tooltip.d.ts.map +1 -0
  139. package/dist/animated-tooltip.js +8603 -0
  140. package/dist/announcement.cjs +465 -0
  141. package/dist/announcement.d.ts +9 -0
  142. package/dist/announcement.d.ts.map +1 -0
  143. package/dist/announcement.js +443 -0
  144. package/dist/app-switcher-navigation-bar.cjs +470 -0
  145. package/dist/app-switcher-navigation-bar.d.ts +15 -0
  146. package/dist/app-switcher-navigation-bar.d.ts.map +1 -0
  147. package/dist/app-switcher-navigation-bar.js +448 -0
  148. package/dist/apple-cards-carousel.cjs +9356 -0
  149. package/dist/apple-cards-carousel.d.ts +36 -0
  150. package/dist/apple-cards-carousel.d.ts.map +1 -0
  151. package/dist/apple-cards-carousel.js +9334 -0
  152. package/dist/apple-hello-effect.cjs +8380 -0
  153. package/dist/apple-hello-effect.d.ts +8 -0
  154. package/dist/apple-hello-effect.d.ts.map +1 -0
  155. package/dist/apple-hello-effect.js +8359 -0
  156. package/dist/auth.cjs +6 -5
  157. package/dist/auth.d.ts +11 -13
  158. package/dist/auth.d.ts.map +1 -0
  159. package/dist/auth.js +6 -5
  160. package/dist/avatar.d.ts +5 -6
  161. package/dist/avatar.d.ts.map +1 -0
  162. package/dist/badge.cjs +29 -169
  163. package/dist/badge.d.ts +9 -13
  164. package/dist/badge.d.ts.map +1 -0
  165. package/dist/badge.js +29 -169
  166. package/dist/bank.d.ts +42 -47
  167. package/dist/bank.d.ts.map +1 -0
  168. package/dist/banner.cjs +78 -0
  169. package/dist/banner.d.ts +20 -0
  170. package/dist/banner.d.ts.map +1 -0
  171. package/dist/banner.js +55 -0
  172. package/dist/breadcrumb-and-filters-navigation-bar.cjs +51 -0
  173. package/dist/breadcrumb-and-filters-navigation-bar.d.ts +10 -0
  174. package/dist/breadcrumb-and-filters-navigation-bar.d.ts.map +1 -0
  175. package/dist/breadcrumb-and-filters-navigation-bar.js +29 -0
  176. package/dist/breadcrumb-navigation-bar.cjs +37 -0
  177. package/dist/breadcrumb-navigation-bar.d.ts +10 -0
  178. package/dist/breadcrumb-navigation-bar.d.ts.map +1 -0
  179. package/dist/breadcrumb-navigation-bar.js +15 -0
  180. package/dist/button.cjs +21 -154
  181. package/dist/button.d.ts +9 -10
  182. package/dist/button.d.ts.map +1 -0
  183. package/dist/button.js +21 -154
  184. package/dist/calendar.cjs +55 -0
  185. package/dist/calendar.d.ts +9 -0
  186. package/dist/calendar.d.ts.map +1 -0
  187. package/dist/calendar.js +53 -0
  188. package/dist/centered-logo-navigation-bar.cjs +37 -0
  189. package/dist/centered-logo-navigation-bar.d.ts +15 -0
  190. package/dist/centered-logo-navigation-bar.d.ts.map +1 -0
  191. package/dist/centered-logo-navigation-bar.js +15 -0
  192. package/dist/chart.cjs +266 -0
  193. package/dist/chart.d.ts +52 -0
  194. package/dist/chart.d.ts.map +1 -0
  195. package/dist/chart.js +238 -0
  196. package/dist/checkbox.d.ts +6 -7
  197. package/dist/checkbox.d.ts.map +1 -0
  198. package/dist/choicebox.cjs +77 -0
  199. package/dist/choicebox.d.ts +15 -0
  200. package/dist/choicebox.d.ts.map +1 -0
  201. package/dist/choicebox.js +55 -0
  202. package/dist/chrome.cjs +39 -37
  203. package/dist/chrome.d.ts +15 -19
  204. package/dist/chrome.d.ts.map +1 -0
  205. package/dist/chrome.js +37 -35
  206. package/dist/close-button.d.ts +3 -5
  207. package/dist/close-button.d.ts.map +1 -0
  208. package/dist/code-block.cjs +871 -0
  209. package/dist/code-block.d.ts +38 -0
  210. package/dist/code-block.d.ts.map +1 -0
  211. package/dist/code-block.js +849 -0
  212. package/dist/code-compare.cjs +1714 -0
  213. package/dist/code-compare.d.ts +46 -0
  214. package/dist/code-compare.d.ts.map +1 -0
  215. package/dist/code-compare.js +1692 -0
  216. package/dist/code-diff.cjs +1073 -0
  217. package/dist/code-diff.d.ts +42 -0
  218. package/dist/code-diff.d.ts.map +1 -0
  219. package/dist/code-diff.js +1051 -0
  220. package/dist/code-editor.cjs +641 -0
  221. package/dist/code-editor.d.ts +23 -0
  222. package/dist/code-editor.d.ts.map +1 -0
  223. package/dist/code-editor.js +616 -0
  224. package/dist/code-explorer.cjs +729 -0
  225. package/dist/code-explorer.d.ts +41 -0
  226. package/dist/code-explorer.d.ts.map +1 -0
  227. package/dist/code-explorer.js +707 -0
  228. package/dist/code-preview.cjs +1349 -0
  229. package/dist/code-preview.d.ts +38 -0
  230. package/dist/code-preview.d.ts.map +1 -0
  231. package/dist/code-preview.js +1327 -0
  232. package/dist/code-snippet.cjs +920 -0
  233. package/dist/code-snippet.d.ts +48 -0
  234. package/dist/code-snippet.d.ts.map +1 -0
  235. package/dist/code-snippet.js +897 -0
  236. package/dist/code-tabs.cjs +76 -0
  237. package/dist/code-tabs.d.ts +12 -0
  238. package/dist/code-tabs.d.ts.map +1 -0
  239. package/dist/code-tabs.js +54 -0
  240. package/dist/code-terminal.cjs +894 -0
  241. package/dist/code-terminal.d.ts +48 -0
  242. package/dist/code-terminal.d.ts.map +1 -0
  243. package/dist/code-terminal.js +872 -0
  244. package/dist/collaboration-navigation-bar.cjs +49 -0
  245. package/dist/collaboration-navigation-bar.d.ts +11 -0
  246. package/dist/collaboration-navigation-bar.d.ts.map +1 -0
  247. package/dist/collaboration-navigation-bar.js +27 -0
  248. package/dist/collapsible.cjs +45 -170
  249. package/dist/collapsible.d.ts +11 -13
  250. package/dist/collapsible.d.ts.map +1 -0
  251. package/dist/collapsible.js +34 -159
  252. package/dist/color-mode.d.ts +7 -9
  253. package/dist/color-mode.d.ts.map +1 -0
  254. package/dist/color-picker.cjs +516 -0
  255. package/dist/color-picker.d.ts +10 -0
  256. package/dist/color-picker.d.ts.map +1 -0
  257. package/dist/color-picker.js +495 -0
  258. package/dist/combobox.cjs +488 -0
  259. package/dist/combobox.d.ts +13 -0
  260. package/dist/combobox.d.ts.map +1 -0
  261. package/dist/combobox.js +466 -0
  262. package/dist/communication-navigation-bar.cjs +438 -0
  263. package/dist/communication-navigation-bar.d.ts +7 -0
  264. package/dist/communication-navigation-bar.d.ts.map +1 -0
  265. package/dist/communication-navigation-bar.js +416 -0
  266. package/dist/company-profile.cjs +46 -0
  267. package/dist/company-profile.d.ts +10 -0
  268. package/dist/company-profile.d.ts.map +1 -0
  269. package/dist/company-profile.js +44 -0
  270. package/dist/comparison.cjs +60 -0
  271. package/dist/comparison.d.ts +16 -0
  272. package/dist/comparison.d.ts.map +1 -0
  273. package/dist/comparison.js +38 -0
  274. package/dist/context-switcher-navigation-bar.cjs +51 -0
  275. package/dist/context-switcher-navigation-bar.d.ts +10 -0
  276. package/dist/context-switcher-navigation-bar.d.ts.map +1 -0
  277. package/dist/context-switcher-navigation-bar.js +29 -0
  278. package/dist/credit-card.cjs +77 -0
  279. package/dist/credit-card.d.ts +11 -0
  280. package/dist/credit-card.d.ts.map +1 -0
  281. package/dist/credit-card.js +55 -0
  282. package/dist/crypto-screener.cjs +43 -0
  283. package/dist/crypto-screener.d.ts +4 -0
  284. package/dist/crypto-screener.d.ts.map +1 -0
  285. package/dist/crypto-screener.js +41 -0
  286. package/dist/cursor.cjs +71 -0
  287. package/dist/cursor.d.ts +9 -0
  288. package/dist/cursor.d.ts.map +1 -0
  289. package/dist/cursor.js +49 -0
  290. package/dist/dashboard-navigation-bar.cjs +441 -0
  291. package/dist/dashboard-navigation-bar.d.ts +11 -0
  292. package/dist/dashboard-navigation-bar.d.ts.map +1 -0
  293. package/dist/dashboard-navigation-bar.js +419 -0
  294. package/dist/dialog-stack.cjs +460 -0
  295. package/dist/dialog-stack.d.ts +13 -0
  296. package/dist/dialog-stack.d.ts.map +1 -0
  297. package/dist/dialog-stack.js +438 -0
  298. package/dist/dialog.cjs +16 -19
  299. package/dist/dialog.d.ts +49 -53
  300. package/dist/dialog.d.ts.map +1 -0
  301. package/dist/dialog.js +12 -15
  302. package/dist/direction.cjs +26 -0
  303. package/dist/direction.d.ts +20 -0
  304. package/dist/direction.d.ts.map +1 -0
  305. package/dist/direction.js +23 -0
  306. package/dist/dock.cjs +8675 -0
  307. package/dist/dock.d.ts +20 -0
  308. package/dist/dock.d.ts.map +1 -0
  309. package/dist/dock.js +8653 -0
  310. package/dist/drawer.d.ts +33 -38
  311. package/dist/drawer.d.ts.map +1 -0
  312. package/dist/dropzone.cjs +116 -0
  313. package/dist/dropzone.d.ts +11 -0
  314. package/dist/dropzone.d.ts.map +1 -0
  315. package/dist/dropzone.js +94 -0
  316. package/dist/e-commerce-navigation-bar.cjs +442 -0
  317. package/dist/e-commerce-navigation-bar.d.ts +12 -0
  318. package/dist/e-commerce-navigation-bar.d.ts.map +1 -0
  319. package/dist/e-commerce-navigation-bar.js +420 -0
  320. package/dist/editor.cjs +497 -0
  321. package/dist/editor.d.ts +9 -0
  322. package/dist/editor.d.ts.map +1 -0
  323. package/dist/editor.js +475 -0
  324. package/dist/empty-state.d.ts +4 -6
  325. package/dist/empty-state.d.ts.map +1 -0
  326. package/dist/empty.cjs +117 -0
  327. package/dist/empty.d.ts +18 -0
  328. package/dist/empty.d.ts.map +1 -0
  329. package/dist/empty.js +110 -0
  330. package/dist/engine.cjs +91 -0
  331. package/dist/engine.d.ts +35 -0
  332. package/dist/engine.d.ts.map +1 -0
  333. package/dist/engine.js +86 -0
  334. package/dist/expiration-selector.d.ts +4 -6
  335. package/dist/expiration-selector.d.ts.map +1 -0
  336. package/dist/field.cjs +2 -1
  337. package/dist/field.d.ts +5 -7
  338. package/dist/field.d.ts.map +1 -0
  339. package/dist/field.js +3 -2
  340. package/dist/financials.cjs +66 -0
  341. package/dist/financials.d.ts +12 -0
  342. package/dist/financials.d.ts.map +1 -0
  343. package/dist/financials.js +64 -0
  344. package/dist/forex-screener.cjs +44 -0
  345. package/dist/forex-screener.d.ts +4 -0
  346. package/dist/forex-screener.d.ts.map +1 -0
  347. package/dist/forex-screener.js +42 -0
  348. package/dist/gantt.cjs +65 -0
  349. package/dist/gantt.d.ts +13 -0
  350. package/dist/gantt.d.ts.map +1 -0
  351. package/dist/gantt.js +43 -0
  352. package/dist/greeks-display.d.ts +3 -5
  353. package/dist/greeks-display.d.ts.map +1 -0
  354. package/dist/grid-pattern.cjs +327 -0
  355. package/dist/grid-pattern.d.ts +111 -0
  356. package/dist/grid-pattern.d.ts.map +1 -0
  357. package/dist/grid-pattern.js +304 -0
  358. package/dist/gui.d.ts +1 -1
  359. package/dist/gui.d.ts.map +1 -0
  360. package/dist/heading.d.ts +4 -6
  361. package/dist/heading.d.ts.map +1 -0
  362. package/dist/hooks/use-mobile.d.ts +3 -0
  363. package/dist/hooks/use-mobile.d.ts.map +1 -0
  364. package/dist/iam.d.ts +10 -12
  365. package/dist/iam.d.ts.map +1 -0
  366. package/dist/icon-button.cjs +14 -147
  367. package/dist/icon-button.d.ts +4 -5
  368. package/dist/icon-button.d.ts.map +1 -0
  369. package/dist/icon-button.js +14 -147
  370. package/dist/icon-navigation-bar.cjs +48 -0
  371. package/dist/icon-navigation-bar.d.ts +11 -0
  372. package/dist/icon-navigation-bar.d.ts.map +1 -0
  373. package/dist/icon-navigation-bar.js +26 -0
  374. package/dist/icons.d.ts +1 -0
  375. package/dist/icons.d.ts.map +1 -0
  376. package/dist/identity.d.ts +9 -11
  377. package/dist/identity.d.ts.map +1 -0
  378. package/dist/image-crop.cjs +482 -0
  379. package/dist/image-crop.d.ts +9 -0
  380. package/dist/image-crop.d.ts.map +1 -0
  381. package/dist/image-crop.js +460 -0
  382. package/dist/image-zoom.cjs +77 -0
  383. package/dist/image-zoom.d.ts +7 -0
  384. package/dist/image-zoom.d.ts.map +1 -0
  385. package/dist/image-zoom.js +55 -0
  386. package/dist/image.cjs +17 -149
  387. package/dist/image.d.ts +10 -11
  388. package/dist/image.d.ts.map +1 -0
  389. package/dist/image.js +16 -148
  390. package/dist/index.cjs +30299 -1227
  391. package/dist/index.d.ts +207 -60
  392. package/dist/index.d.ts.map +1 -0
  393. package/dist/index.js +30009 -1226
  394. package/dist/ink.cjs +17 -0
  395. package/dist/ink.d.ts +14 -0
  396. package/dist/ink.d.ts.map +1 -0
  397. package/dist/ink.js +15 -0
  398. package/dist/input-group.d.ts +4 -6
  399. package/dist/input-group.d.ts.map +1 -0
  400. package/dist/input-otp.cjs +72 -0
  401. package/dist/input-otp.d.ts +35 -0
  402. package/dist/input-otp.d.ts.map +1 -0
  403. package/dist/input-otp.js +47 -0
  404. package/dist/input.d.ts +8 -9
  405. package/dist/input.d.ts.map +1 -0
  406. package/dist/iphone-15-pro.cjs +61 -0
  407. package/dist/iphone-15-pro.d.ts +9 -0
  408. package/dist/iphone-15-pro.d.ts.map +1 -0
  409. package/dist/iphone-15-pro.js +39 -0
  410. package/dist/item.cjs +215 -0
  411. package/dist/item.d.ts +41 -0
  412. package/dist/item.d.ts.map +1 -0
  413. package/dist/item.js +200 -0
  414. package/dist/kanban.cjs +1354 -0
  415. package/dist/kanban.d.ts +36 -0
  416. package/dist/kanban.d.ts.map +1 -0
  417. package/dist/kanban.js +1330 -0
  418. package/dist/kbd.cjs +40 -0
  419. package/dist/kbd.d.ts +4 -0
  420. package/dist/kbd.d.ts.map +1 -0
  421. package/dist/kbd.js +37 -0
  422. package/dist/limelight-nav-navigation-bar.cjs +51 -0
  423. package/dist/limelight-nav-navigation-bar.d.ts +10 -0
  424. package/dist/limelight-nav-navigation-bar.d.ts.map +1 -0
  425. package/dist/limelight-nav-navigation-bar.js +29 -0
  426. package/dist/limelight-nav.cjs +570 -0
  427. package/dist/limelight-nav.d.ts +10 -0
  428. package/dist/limelight-nav.d.ts.map +1 -0
  429. package/dist/limelight-nav.js +549 -0
  430. package/dist/link.cjs +41 -168
  431. package/dist/link.d.ts +9 -11
  432. package/dist/link.d.ts.map +1 -0
  433. package/dist/link.js +30 -157
  434. package/dist/list.cjs +35 -0
  435. package/dist/list.d.ts +5 -0
  436. package/dist/list.d.ts.map +1 -0
  437. package/dist/list.js +12 -0
  438. package/dist/lux.config.d.ts +521 -524
  439. package/dist/lux.config.d.ts.map +1 -0
  440. package/dist/magnetic.cjs +63 -0
  441. package/dist/magnetic.d.ts +8 -0
  442. package/dist/magnetic.d.ts.map +1 -0
  443. package/dist/magnetic.js +41 -0
  444. package/dist/market-overview.cjs +102 -0
  445. package/dist/market-overview.d.ts +4 -0
  446. package/dist/market-overview.d.ts.map +1 -0
  447. package/dist/market-overview.js +100 -0
  448. package/dist/marquee.cjs +67 -0
  449. package/dist/marquee.d.ts +10 -0
  450. package/dist/marquee.d.ts.map +1 -0
  451. package/dist/marquee.js +45 -0
  452. package/dist/menu-dock.cjs +64 -0
  453. package/dist/menu-dock.d.ts +14 -0
  454. package/dist/menu-dock.d.ts.map +1 -0
  455. package/dist/menu-dock.js +42 -0
  456. package/dist/menu.d.ts +30 -31
  457. package/dist/menu.d.ts.map +1 -0
  458. package/dist/menubar.cjs +116 -0
  459. package/dist/menubar.d.ts +30 -0
  460. package/dist/menubar.d.ts.map +1 -0
  461. package/dist/menubar.js +61 -0
  462. package/dist/message-dock.cjs +480 -0
  463. package/dist/message-dock.d.ts +15 -0
  464. package/dist/message-dock.d.ts.map +1 -0
  465. package/dist/message-dock.js +458 -0
  466. package/dist/mini-calendar.cjs +505 -0
  467. package/dist/mini-calendar.d.ts +10 -0
  468. package/dist/mini-calendar.d.ts.map +1 -0
  469. package/dist/mini-calendar.js +483 -0
  470. package/dist/minimal-tiptap.cjs +48 -0
  471. package/dist/minimal-tiptap.d.ts +8 -0
  472. package/dist/minimal-tiptap.d.ts.map +1 -0
  473. package/dist/minimal-tiptap.js +26 -0
  474. package/dist/motion-highlight.cjs +71 -0
  475. package/dist/motion-highlight.d.ts +7 -0
  476. package/dist/motion-highlight.d.ts.map +1 -0
  477. package/dist/motion-highlight.js +49 -0
  478. package/dist/music-player.cjs +810 -0
  479. package/dist/music-player.d.ts +18 -0
  480. package/dist/music-player.d.ts.map +1 -0
  481. package/dist/music-player.js +788 -0
  482. package/dist/native-select.cjs +82 -0
  483. package/dist/native-select.d.ts +9 -0
  484. package/dist/native-select.d.ts.map +1 -0
  485. package/dist/native-select.js +58 -0
  486. package/dist/news-timeline.cjs +42 -0
  487. package/dist/news-timeline.d.ts +4 -0
  488. package/dist/news-timeline.d.ts.map +1 -0
  489. package/dist/news-timeline.js +40 -0
  490. package/dist/next.d.ts +5 -7
  491. package/dist/next.d.ts.map +1 -0
  492. package/dist/option-chain.d.ts +6 -8
  493. package/dist/option-chain.d.ts.map +1 -0
  494. package/dist/option-position.d.ts +4 -6
  495. package/dist/option-position.d.ts.map +1 -0
  496. package/dist/order-entry.cjs +141 -0
  497. package/dist/order-entry.d.ts +15 -0
  498. package/dist/order-entry.d.ts.map +1 -0
  499. package/dist/order-entry.js +136 -0
  500. package/dist/orders-history.cjs +83 -0
  501. package/dist/orders-history.d.ts +18 -0
  502. package/dist/orders-history.d.ts.map +1 -0
  503. package/dist/orders-history.js +78 -0
  504. package/dist/pagination.cjs +132 -0
  505. package/dist/pagination.d.ts +29 -0
  506. package/dist/pagination.d.ts.map +1 -0
  507. package/dist/pagination.js +104 -0
  508. package/dist/particles-background.cjs +159 -0
  509. package/dist/particles-background.d.ts +18 -0
  510. package/dist/particles-background.d.ts.map +1 -0
  511. package/dist/particles-background.js +157 -0
  512. package/dist/pill.cjs +80 -0
  513. package/dist/pill.d.ts +21 -0
  514. package/dist/pill.d.ts.map +1 -0
  515. package/dist/pill.js +57 -0
  516. package/dist/pin-input.cjs +1 -1
  517. package/dist/pin-input.d.ts +3 -5
  518. package/dist/pin-input.d.ts.map +1 -0
  519. package/dist/pin-input.js +1 -1
  520. package/dist/pixel-image.cjs +71 -0
  521. package/dist/pixel-image.d.ts +8 -0
  522. package/dist/pixel-image.d.ts.map +1 -0
  523. package/dist/pixel-image.js +49 -0
  524. package/dist/pnl-diagram.d.ts +5 -6
  525. package/dist/pnl-diagram.d.ts.map +1 -0
  526. package/dist/popover.cjs +16 -18
  527. package/dist/popover.d.ts +24 -25
  528. package/dist/popover.d.ts.map +1 -0
  529. package/dist/popover.js +11 -13
  530. package/dist/positions-list.cjs +98 -0
  531. package/dist/positions-list.d.ts +13 -0
  532. package/dist/positions-list.d.ts.map +1 -0
  533. package/dist/positions-list.js +93 -0
  534. package/dist/progress-circle.cjs +3 -6
  535. package/dist/progress-circle.d.ts +8 -9
  536. package/dist/progress-circle.d.ts.map +1 -0
  537. package/dist/progress-circle.js +2 -5
  538. package/dist/progress.d.ts +3 -4
  539. package/dist/progress.d.ts.map +1 -0
  540. package/dist/provider.d.ts +8 -10
  541. package/dist/provider.d.ts.map +1 -0
  542. package/dist/pulse-animation.cjs +8741 -0
  543. package/dist/pulse-animation.d.ts +155 -0
  544. package/dist/pulse-animation.d.ts.map +1 -0
  545. package/dist/pulse-animation.js +8732 -0
  546. package/dist/qr-code.cjs +65 -0
  547. package/dist/qr-code.d.ts +21 -0
  548. package/dist/qr-code.d.ts.map +1 -0
  549. package/dist/qr-code.js +43 -0
  550. package/dist/radio.d.ts +6 -7
  551. package/dist/radio.d.ts.map +1 -0
  552. package/dist/rating.d.ts +3 -5
  553. package/dist/rating.d.ts.map +1 -0
  554. package/dist/relative-time.cjs +88 -0
  555. package/dist/relative-time.d.ts +9 -0
  556. package/dist/relative-time.d.ts.map +1 -0
  557. package/dist/relative-time.js +66 -0
  558. package/dist/resizable.cjs +61 -0
  559. package/dist/resizable.d.ts +24 -0
  560. package/dist/resizable.d.ts.map +1 -0
  561. package/dist/resizable.js +37 -0
  562. package/dist/reveal-animation.cjs +8791 -0
  563. package/dist/reveal-animation.d.ts +134 -0
  564. package/dist/reveal-animation.d.ts.map +1 -0
  565. package/dist/reveal-animation.js +8779 -0
  566. package/dist/safari.cjs +90 -0
  567. package/dist/safari.d.ts +9 -0
  568. package/dist/safari.d.ts.map +1 -0
  569. package/dist/safari.js +68 -0
  570. package/dist/sandbox.cjs +94 -0
  571. package/dist/sandbox.d.ts +9 -0
  572. package/dist/sandbox.d.ts.map +1 -0
  573. package/dist/sandbox.js +72 -0
  574. package/dist/search-and-toggle-navigation-bar.cjs +51 -0
  575. package/dist/search-and-toggle-navigation-bar.d.ts +10 -0
  576. package/dist/search-and-toggle-navigation-bar.d.ts.map +1 -0
  577. package/dist/search-and-toggle-navigation-bar.js +29 -0
  578. package/dist/select.cjs +38 -168
  579. package/dist/select.d.ts +38 -41
  580. package/dist/select.d.ts.map +1 -0
  581. package/dist/select.js +34 -164
  582. package/dist/separator.d.ts +5 -6
  583. package/dist/separator.d.ts.map +1 -0
  584. package/dist/sidebar.cjs +1134 -0
  585. package/dist/sidebar.d.ts +80 -0
  586. package/dist/sidebar.d.ts.map +1 -0
  587. package/dist/sidebar.js +1090 -0
  588. package/dist/simple-navigation-bar.cjs +45 -0
  589. package/dist/simple-navigation-bar.d.ts +11 -0
  590. package/dist/simple-navigation-bar.d.ts.map +1 -0
  591. package/dist/simple-navigation-bar.js +23 -0
  592. package/dist/skeleton.cjs +15 -148
  593. package/dist/skeleton.d.ts +11 -53
  594. package/dist/skeleton.d.ts.map +1 -0
  595. package/dist/skeleton.js +15 -148
  596. package/dist/slider.cjs +1 -1
  597. package/dist/slider.d.ts +4 -5
  598. package/dist/slider.d.ts.map +1 -0
  599. package/dist/slider.js +1 -1
  600. package/dist/status-dashboard-navigation-bar.cjs +51 -0
  601. package/dist/status-dashboard-navigation-bar.d.ts +10 -0
  602. package/dist/status-dashboard-navigation-bar.d.ts.map +1 -0
  603. package/dist/status-dashboard-navigation-bar.js +29 -0
  604. package/dist/status.cjs +85 -0
  605. package/dist/status.d.ts +23 -0
  606. package/dist/status.d.ts.map +1 -0
  607. package/dist/status.js +62 -0
  608. package/dist/stock-screener.cjs +44 -0
  609. package/dist/stock-screener.d.ts +4 -0
  610. package/dist/stock-screener.d.ts.map +1 -0
  611. package/dist/stock-screener.js +42 -0
  612. package/dist/strategy-builder.d.ts +6 -8
  613. package/dist/strategy-builder.d.ts.map +1 -0
  614. package/dist/switch.cjs +2 -2
  615. package/dist/switch.d.ts +4 -8
  616. package/dist/switch.d.ts.map +1 -0
  617. package/dist/switch.js +2 -2
  618. package/dist/symbol-info.cjs +44 -0
  619. package/dist/symbol-info.d.ts +9 -0
  620. package/dist/symbol-info.d.ts.map +1 -0
  621. package/dist/symbol-info.js +42 -0
  622. package/dist/table.cjs +74 -192
  623. package/dist/table.d.ts +23 -25
  624. package/dist/table.d.ts.map +1 -0
  625. package/dist/table.js +53 -171
  626. package/dist/tabs.d.ts +12 -13
  627. package/dist/tabs.d.ts.map +1 -0
  628. package/dist/tag.cjs +14 -147
  629. package/dist/tag.d.ts +4 -5
  630. package/dist/tag.d.ts.map +1 -0
  631. package/dist/tag.js +14 -147
  632. package/dist/tags.cjs +385 -0
  633. package/dist/tags.d.ts +13 -0
  634. package/dist/tags.d.ts.map +1 -0
  635. package/dist/tags.js +364 -0
  636. package/dist/team-switcher-navigation-bar.cjs +51 -0
  637. package/dist/team-switcher-navigation-bar.d.ts +10 -0
  638. package/dist/team-switcher-navigation-bar.d.ts.map +1 -0
  639. package/dist/team-switcher-navigation-bar.js +29 -0
  640. package/dist/technical-analysis.cjs +69 -0
  641. package/dist/technical-analysis.d.ts +13 -0
  642. package/dist/technical-analysis.d.ts.map +1 -0
  643. package/dist/technical-analysis.js +67 -0
  644. package/dist/terminal.cjs +372 -0
  645. package/dist/terminal.d.ts +21 -0
  646. package/dist/terminal.d.ts.map +1 -0
  647. package/dist/terminal.js +350 -0
  648. package/dist/textarea.d.ts +5 -6
  649. package/dist/textarea.d.ts.map +1 -0
  650. package/dist/ticker-tape.cjs +54 -0
  651. package/dist/ticker-tape.d.ts +4 -0
  652. package/dist/ticker-tape.d.ts.map +1 -0
  653. package/dist/ticker-tape.js +52 -0
  654. package/dist/ticker.cjs +66 -0
  655. package/dist/ticker.d.ts +10 -0
  656. package/dist/ticker.d.ts.map +1 -0
  657. package/dist/ticker.js +44 -0
  658. package/dist/timeline.cjs +317 -0
  659. package/dist/timeline.d.ts +20 -0
  660. package/dist/timeline.d.ts.map +1 -0
  661. package/dist/timeline.js +295 -0
  662. package/dist/toaster.d.ts +4 -5
  663. package/dist/toaster.d.ts.map +1 -0
  664. package/dist/toggle.cjs +62 -0
  665. package/dist/toggle.d.ts +26 -0
  666. package/dist/toggle.d.ts.map +1 -0
  667. package/dist/toggle.js +57 -0
  668. package/dist/tooltip.d.ts +3 -5
  669. package/dist/tooltip.d.ts.map +1 -0
  670. package/dist/trading-panel.cjs +212 -0
  671. package/dist/trading-panel.d.ts +7 -0
  672. package/dist/trading-panel.d.ts.map +1 -0
  673. package/dist/trading-panel.js +207 -0
  674. package/dist/two-tier-navigation-bar.cjs +51 -0
  675. package/dist/two-tier-navigation-bar.d.ts +10 -0
  676. package/dist/two-tier-navigation-bar.d.ts.map +1 -0
  677. package/dist/two-tier-navigation-bar.js +29 -0
  678. package/dist/underline-navigation-bar.cjs +51 -0
  679. package/dist/underline-navigation-bar.d.ts +10 -0
  680. package/dist/underline-navigation-bar.d.ts.map +1 -0
  681. package/dist/underline-navigation-bar.js +29 -0
  682. package/dist/use-narrow.d.ts +6 -7
  683. package/dist/use-narrow.d.ts.map +1 -0
  684. package/dist/utils/cn.d.ts +2 -0
  685. package/dist/utils/cn.d.ts.map +1 -0
  686. package/dist/utils.cjs +6 -7
  687. package/dist/utils.d.ts +13 -5
  688. package/dist/utils.d.ts.map +1 -0
  689. package/dist/utils.js +1 -9
  690. package/dist/vite.d.ts +3 -3
  691. package/dist/vite.d.ts.map +1 -0
  692. package/dist/white-label.d.ts +12 -12
  693. package/dist/white-label.d.ts.map +1 -0
  694. package/dist/youtube-pip-player.cjs +489 -0
  695. package/dist/youtube-pip-player.d.ts +41 -0
  696. package/dist/youtube-pip-player.d.ts.map +1 -0
  697. package/dist/youtube-pip-player.js +466 -0
  698. package/package.json +769 -66
  699. package/src/3d-button.tsx +346 -0
  700. package/src/3d-card.tsx +271 -0
  701. package/src/3d-carousel.tsx +444 -0
  702. package/src/3d-grid.tsx +448 -0
  703. package/src/3d-marquee.tsx +422 -0
  704. package/src/3d-model-viewer.tsx +659 -0
  705. package/src/3d-pin.tsx +37 -0
  706. package/src/3d-scene.tsx +629 -0
  707. package/src/3d-text.tsx +442 -0
  708. package/src/advanced-chart.tsx +63 -0
  709. package/src/advanced-navigation-bar.tsx +83 -0
  710. package/src/ai-actions.tsx +60 -0
  711. package/src/ai-agents.tsx +1174 -0
  712. package/src/ai-assistant.tsx +227 -0
  713. package/src/ai-chat.tsx +554 -0
  714. package/src/ai-code.tsx +1331 -0
  715. package/src/ai-model-selector-navigation-bar.tsx +78 -0
  716. package/src/ai-models.tsx +58 -0
  717. package/src/ai-playground.tsx +429 -0
  718. package/src/ai-tools.tsx +383 -0
  719. package/src/ai-vision.tsx +1220 -0
  720. package/src/ai-voice-settings.tsx +726 -0
  721. package/src/ai-voice.tsx +735 -0
  722. package/src/android.tsx +92 -0
  723. package/src/animated-background.tsx +625 -0
  724. package/src/animated-beam.tsx +110 -0
  725. package/src/animated-cursor.tsx +406 -0
  726. package/src/animated-icon.tsx +520 -0
  727. package/src/animated-list.tsx +508 -0
  728. package/src/animated-number.tsx +485 -0
  729. package/src/animated-testimonials.tsx +119 -0
  730. package/src/animated-text.tsx +481 -0
  731. package/src/animated-tooltip.tsx +54 -0
  732. package/src/announcement.tsx +55 -0
  733. package/src/app-switcher-navigation-bar.tsx +76 -0
  734. package/src/apple-cards-carousel.tsx +349 -0
  735. package/src/apple-hello-effect.tsx +50 -0
  736. package/src/auth.tsx +9 -8
  737. package/src/avatar.tsx +1 -1
  738. package/src/badge.tsx +27 -30
  739. package/src/banner.tsx +62 -0
  740. package/src/breadcrumb-and-filters-navigation-bar.tsx +40 -0
  741. package/src/breadcrumb-navigation-bar.tsx +43 -0
  742. package/src/button.tsx +10 -9
  743. package/src/calendar.tsx +62 -0
  744. package/src/centered-logo-navigation-bar.tsx +43 -0
  745. package/src/chart.tsx +372 -0
  746. package/src/choicebox.tsx +89 -0
  747. package/src/chrome.tsx +41 -40
  748. package/src/code-block.tsx +278 -0
  749. package/src/code-compare.tsx +551 -0
  750. package/src/code-diff.tsx +573 -0
  751. package/src/code-editor.tsx +250 -0
  752. package/src/code-explorer.tsx +403 -0
  753. package/src/code-preview.tsx +488 -0
  754. package/src/code-snippet.tsx +336 -0
  755. package/src/code-tabs.tsx +78 -0
  756. package/src/code-terminal.tsx +530 -0
  757. package/src/collaboration-navigation-bar.tsx +50 -0
  758. package/src/collapsible.tsx +3 -2
  759. package/src/color-picker.tsx +68 -0
  760. package/src/combobox.tsx +87 -0
  761. package/src/communication-navigation-bar.tsx +42 -0
  762. package/src/company-profile.tsx +67 -0
  763. package/src/comparison.tsx +68 -0
  764. package/src/context-switcher-navigation-bar.tsx +39 -0
  765. package/src/credit-card.tsx +72 -0
  766. package/src/crypto-screener.tsx +57 -0
  767. package/src/cursor.tsx +61 -0
  768. package/src/dashboard-navigation-bar.tsx +49 -0
  769. package/src/dialog-stack.tsx +55 -0
  770. package/src/dialog.tsx +16 -15
  771. package/src/direction.tsx +40 -0
  772. package/src/dock.tsx +172 -0
  773. package/src/dropzone.tsx +106 -0
  774. package/src/e-commerce-navigation-bar.tsx +54 -0
  775. package/src/editor.tsx +85 -0
  776. package/src/empty.tsx +117 -0
  777. package/src/field.tsx +2 -1
  778. package/src/financials.tsx +85 -0
  779. package/src/forex-screener.tsx +58 -0
  780. package/src/gantt.tsx +68 -0
  781. package/src/grid-pattern.tsx +353 -0
  782. package/src/hooks/use-mobile.ts +29 -0
  783. package/src/icon-navigation-bar.tsx +36 -0
  784. package/src/image-crop.tsx +67 -0
  785. package/src/image-zoom.tsx +64 -0
  786. package/src/image.tsx +2 -1
  787. package/src/index.ts +123 -0
  788. package/src/input-otp.tsx +72 -0
  789. package/src/iphone-15-pro.tsx +69 -0
  790. package/src/item.tsx +193 -0
  791. package/src/kanban.tsx +772 -0
  792. package/src/kbd.tsx +32 -0
  793. package/src/limelight-nav-navigation-bar.tsx +39 -0
  794. package/src/limelight-nav.tsx +101 -0
  795. package/src/link.tsx +18 -18
  796. package/src/list.tsx +22 -0
  797. package/src/magnetic.tsx +54 -0
  798. package/src/market-overview.tsx +116 -0
  799. package/src/marquee.tsx +62 -0
  800. package/src/menu-dock.tsx +56 -0
  801. package/src/menubar.tsx +149 -0
  802. package/src/message-dock.tsx +89 -0
  803. package/src/mini-calendar.tsx +121 -0
  804. package/src/minimal-tiptap.tsx +32 -0
  805. package/src/motion-highlight.tsx +55 -0
  806. package/src/music-player.tsx +413 -0
  807. package/src/native-select.tsx +63 -0
  808. package/src/news-timeline.tsx +56 -0
  809. package/src/order-entry.tsx +162 -0
  810. package/src/orders-history.tsx +115 -0
  811. package/src/pagination.tsx +118 -0
  812. package/src/particles-background.tsx +225 -0
  813. package/src/pill.tsx +61 -0
  814. package/src/pin-input.tsx +1 -1
  815. package/src/pixel-image.tsx +64 -0
  816. package/src/popover.tsx +10 -9
  817. package/src/positions-list.tsx +108 -0
  818. package/src/progress-circle.tsx +2 -1
  819. package/src/pulse-animation.tsx +606 -0
  820. package/src/qr-code.tsx +64 -0
  821. package/src/relative-time.tsx +84 -0
  822. package/src/resizable.tsx +46 -0
  823. package/src/reveal-animation.tsx +532 -0
  824. package/src/safari.tsx +115 -0
  825. package/src/sandbox.tsx +83 -0
  826. package/src/search-and-toggle-navigation-bar.tsx +39 -0
  827. package/src/select.tsx +31 -30
  828. package/src/sidebar.tsx +723 -0
  829. package/src/simple-navigation-bar.tsx +39 -0
  830. package/src/skeleton.tsx +20 -168
  831. package/src/slider.tsx +2 -1
  832. package/src/status-dashboard-navigation-bar.tsx +39 -0
  833. package/src/status.tsx +63 -0
  834. package/src/stock-screener.tsx +58 -0
  835. package/src/switch.tsx +3 -3
  836. package/src/symbol-info.tsx +64 -0
  837. package/src/table.tsx +26 -25
  838. package/src/tags.tsx +62 -0
  839. package/src/team-switcher-navigation-bar.tsx +39 -0
  840. package/src/technical-analysis.tsx +99 -0
  841. package/src/terminal.tsx +399 -0
  842. package/src/ticker-tape.tsx +68 -0
  843. package/src/ticker.tsx +52 -0
  844. package/src/timeline.tsx +412 -0
  845. package/src/toggle.tsx +84 -0
  846. package/src/trading-panel.tsx +262 -0
  847. package/src/two-tier-navigation-bar.tsx +39 -0
  848. package/src/underline-navigation-bar.tsx +39 -0
  849. package/src/utils/cn.ts +3 -7
  850. package/src/utils.ts +12 -6
  851. package/src/youtube-pip-player.tsx +606 -0
  852. package/tokens.css +22 -0
  853. package/dist/accordion.d.cts +0 -41
  854. package/dist/alert.d.cts +0 -30
  855. package/dist/auth.d.cts +0 -80
  856. package/dist/avatar.d.cts +0 -25
  857. package/dist/badge.d.cts +0 -19
  858. package/dist/bank.d.cts +0 -83
  859. package/dist/button.d.cts +0 -51
  860. package/dist/checkbox.d.cts +0 -32
  861. package/dist/chrome.d.cts +0 -93
  862. package/dist/close-button.d.cts +0 -9
  863. package/dist/collapsible.d.cts +0 -24
  864. package/dist/color-mode.d.cts +0 -25
  865. package/dist/dialog.d.cts +0 -118
  866. package/dist/drawer.d.cts +0 -69
  867. package/dist/empty-state.d.cts +0 -13
  868. package/dist/expiration-selector.d.cts +0 -16
  869. package/dist/field.d.cts +0 -23
  870. package/dist/greeks-display.d.cts +0 -14
  871. package/dist/gui.d.cts +0 -2
  872. package/dist/heading.d.cts +0 -8
  873. package/dist/iam.d.cts +0 -65
  874. package/dist/icon-button.d.cts +0 -37
  875. package/dist/icons.d.cts +0 -1
  876. package/dist/identity.d.cts +0 -64
  877. package/dist/image.d.cts +0 -57
  878. package/dist/index.d.cts +0 -60
  879. package/dist/input-group.d.cts +0 -17
  880. package/dist/input.d.cts +0 -37
  881. package/dist/link.d.cts +0 -37
  882. package/dist/lux.config.d.cts +0 -981
  883. package/dist/menu.d.cts +0 -68
  884. package/dist/next.d.cts +0 -32
  885. package/dist/option-chain.d.cts +0 -37
  886. package/dist/option-position.d.cts +0 -29
  887. package/dist/pin-input.d.cts +0 -25
  888. package/dist/pnl-diagram.d.cts +0 -11
  889. package/dist/popover.d.cts +0 -73
  890. package/dist/progress-circle.d.cts +0 -47
  891. package/dist/progress.d.cts +0 -28
  892. package/dist/provider.d.cts +0 -25
  893. package/dist/radio.d.cts +0 -53
  894. package/dist/rating.d.cts +0 -14
  895. package/dist/select.d.cts +0 -161
  896. package/dist/separator.d.cts +0 -13
  897. package/dist/skeleton.d.cts +0 -76
  898. package/dist/slider.d.cts +0 -24
  899. package/dist/strategy-builder.d.cts +0 -26
  900. package/dist/switch.d.cts +0 -27
  901. package/dist/table.d.cts +0 -107
  902. package/dist/tabs.d.cts +0 -34
  903. package/dist/tag.d.cts +0 -21
  904. package/dist/textarea.d.cts +0 -13
  905. package/dist/toaster.d.cts +0 -28
  906. package/dist/tooltip.d.cts +0 -38
  907. package/dist/use-narrow.d.cts +0 -12
  908. package/dist/utils.d.cts +0 -5
  909. package/dist/vite.d.cts +0 -29
  910. package/dist/white-label.d.cts +0 -59
@@ -0,0 +1,1841 @@
1
+ "use client";
2
+ import { Box, sx, cn, variants, css, ScrollArea, Avatar, AvatarFallback, ScrollBar, TooltipProvider, Tooltip as Tooltip$2, TooltipTrigger, TooltipContent, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuSeparator, DropdownMenuItem, Tabs, TabsList, TabsTrigger, TabsContent } from '@hanzo/ui';
3
+ import * as React10 from 'react';
4
+ import React10__default, { Children, createElement } from 'react';
5
+ import Editor from '@monaco-editor/react';
6
+ import { Shield, Zap, GitCompare, FileText, TestTube, Bug, Code, Eye, Wand2, MessageSquare, Bot, User, Loader2, Send, FileCode, Check, EyeOff, Settings, ChevronDown, Download, Upload, GripVertical } from 'lucide-react';
7
+ import { useTheme } from 'next-themes';
8
+ import { toast } from 'sonner';
9
+ import { TooltipGroup, Tooltip as Tooltip$1, Text, XStack, styled, View, Progress as Progress$1, Separator as Separator$1, Input as Input$1, TextArea } from '@hanzo/gui';
10
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
+ import { useClickAway } from '@uidotdev/usehooks';
12
+ import * as ResizablePrimitive from 'react-resizable-panels';
13
+
14
+ var SKELETON_CLASSES = "lux-skeleton rounded-sm";
15
+ var Skeleton = React10.forwardRef(
16
+ function Skeleton2(props, ref) {
17
+ const { loading = true, asChild, className, children, style, ...rest } = props;
18
+ if (!loading) {
19
+ if (asChild && React10.isValidElement(children)) return children;
20
+ return /* @__PURE__ */ jsx(Box, { ref, className, style, ...rest, children });
21
+ }
22
+ return /* @__PURE__ */ jsx(
23
+ "div",
24
+ {
25
+ ref,
26
+ "data-loading": true,
27
+ ...sx(
28
+ SKELETON_CLASSES,
29
+ asChild || children ? "[&_*]:invisible" : "min-h-5",
30
+ className
31
+ ),
32
+ style,
33
+ ...rest,
34
+ children
35
+ }
36
+ );
37
+ }
38
+ );
39
+ React10.forwardRef(
40
+ function SkeletonCircle2(props, ref) {
41
+ const { size = 40, loading = true, className, ...rest } = props;
42
+ const dimension = typeof size === "number" ? `${size}px` : size;
43
+ return /* @__PURE__ */ jsx(
44
+ Skeleton,
45
+ {
46
+ ref,
47
+ loading,
48
+ ...sx("rounded-full shrink-0", className),
49
+ style: { width: dimension, height: dimension, ...rest.style },
50
+ ...rest
51
+ }
52
+ );
53
+ }
54
+ );
55
+ React10.forwardRef(
56
+ function SkeletonText2(props, ref) {
57
+ const { noOfLines = 3, loading = true, className, ...rest } = props;
58
+ return /* @__PURE__ */ jsx(Box, { ref, className: cn("flex w-full flex-col gap-2", className), ...rest, children: Array.from({ length: noOfLines }).map((_, index) => /* @__PURE__ */ jsx(
59
+ Skeleton,
60
+ {
61
+ loading,
62
+ ...sx(cn("h-4", index === noOfLines - 1 && "max-w-[80%]"))
63
+ },
64
+ index
65
+ )) });
66
+ }
67
+ );
68
+ var ink = (children, Wrap = Text, props = {}) => {
69
+ let hasText = false;
70
+ Children.forEach(children, (child) => {
71
+ if (typeof child === "string" || typeof child === "number") hasText = true;
72
+ });
73
+ if (!hasText) return children;
74
+ return Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? createElement(Wrap, props, child) : child);
75
+ };
76
+ var TOUCH_PX = 1024;
77
+ function useBelow(px) {
78
+ const [below, setBelow] = React10.useState(false);
79
+ React10.useEffect(() => {
80
+ const mql = window.matchMedia(`(max-width: ${px - 1}px)`);
81
+ const apply = () => setBelow(mql.matches);
82
+ apply();
83
+ mql.addEventListener("change", apply);
84
+ return () => mql.removeEventListener("change", apply);
85
+ }, [px]);
86
+ return below;
87
+ }
88
+ var useIsTouch = () => useBelow(TOUCH_PX);
89
+ function mapPlacement(p) {
90
+ if (!p) return void 0;
91
+ return p;
92
+ }
93
+ var Tooltip = React10.forwardRef(
94
+ function Tooltip2(props, ref) {
95
+ const {
96
+ showArrow: showArrowProp,
97
+ onOpenChange,
98
+ variant,
99
+ selected,
100
+ children,
101
+ disabled,
102
+ disableOnMobile,
103
+ content,
104
+ contentProps,
105
+ defaultOpen = false,
106
+ triggerProps,
107
+ closeDelay = 100,
108
+ openDelay = 100,
109
+ interactive,
110
+ positioning
111
+ } = props;
112
+ const [open, setOpen] = React10.useState(defaultOpen);
113
+ const timeoutRef = React10.useRef(null);
114
+ const isMobile = useIsTouch();
115
+ const handleOpenChange = React10.useCallback((nextOpen) => {
116
+ setOpen(nextOpen);
117
+ onOpenChange?.({ open: nextOpen });
118
+ }, [onOpenChange]);
119
+ const handleOpenChangeManual = React10.useCallback((nextOpen) => {
120
+ timeoutRef.current && window.clearTimeout(timeoutRef.current);
121
+ timeoutRef.current = window.setTimeout(() => {
122
+ setOpen(nextOpen);
123
+ onOpenChange?.({ open: nextOpen });
124
+ }, nextOpen ? openDelay : closeDelay);
125
+ }, [closeDelay, openDelay, onOpenChange]);
126
+ const handleClickAway = React10.useCallback(() => {
127
+ if (open) handleOpenChangeManual(false);
128
+ }, [open, handleOpenChangeManual]);
129
+ const triggerRef = useClickAway(handleClickAway);
130
+ const handleTriggerClick = React10.useCallback(() => {
131
+ handleOpenChangeManual(!open);
132
+ }, [handleOpenChangeManual, open]);
133
+ const handleContentClick = React10.useCallback((event) => {
134
+ event.stopPropagation();
135
+ if (interactive) {
136
+ const closestLink = event.target?.closest("a");
137
+ if (closestLink) {
138
+ handleOpenChangeManual(false);
139
+ }
140
+ }
141
+ }, [interactive, handleOpenChangeManual]);
142
+ React10.useEffect(() => {
143
+ return () => {
144
+ if (timeoutRef.current) {
145
+ clearTimeout(timeoutRef.current);
146
+ }
147
+ };
148
+ }, []);
149
+ if (disabled || disableOnMobile && isMobile) return children;
150
+ const defaultShowArrow = variant === "popover" ? false : true;
151
+ const showArrow = showArrowProp !== void 0 ? showArrowProp : defaultShowArrow;
152
+ const isPopover = variant === "popover";
153
+ const placement = mapPlacement(positioning?.placement) ?? "top";
154
+ const offset = positioning?.offset?.mainAxis ?? 4;
155
+ return /* @__PURE__ */ jsx(TooltipGroup, { delay: openDelay, children: /* @__PURE__ */ jsxs(
156
+ Tooltip$1,
157
+ {
158
+ open,
159
+ onOpenChange: handleOpenChange,
160
+ delay: { open: openDelay, close: closeDelay },
161
+ placement,
162
+ offset,
163
+ unstyled: true,
164
+ children: [
165
+ /* @__PURE__ */ jsx(
166
+ Tooltip$1.Trigger,
167
+ {
168
+ ref: triggerRef,
169
+ asChild: true,
170
+ ...isMobile ? { onClick: handleTriggerClick } : {},
171
+ ...triggerProps,
172
+ children
173
+ }
174
+ ),
175
+ /* @__PURE__ */ jsxs(
176
+ Tooltip$1.Content,
177
+ {
178
+ ref,
179
+ unstyled: true,
180
+ zIndex: 9999,
181
+ overflow: "hidden",
182
+ borderRadius: 8,
183
+ paddingHorizontal: 12,
184
+ paddingVertical: 8,
185
+ maxWidth: isPopover ? 384 : 320,
186
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)",
187
+ transition: "quick",
188
+ enterStyle: { opacity: 0, scale: 0.95 },
189
+ exitStyle: { opacity: 0, scale: 0.95 },
190
+ ...isPopover ? {
191
+ borderWidth: 1,
192
+ borderColor: "var(--color-border-divider)",
193
+ shadowColor: "var(--shadow-popover)"
194
+ } : {},
195
+ onClick: interactive ? handleContentClick : void 0,
196
+ ...selected ? { "data-selected": true } : {},
197
+ ...contentProps,
198
+ children: [
199
+ showArrow && /* @__PURE__ */ jsx(
200
+ Tooltip$1.Arrow,
201
+ {
202
+ unstyled: true,
203
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)"
204
+ }
205
+ ),
206
+ ink(content, void 0, {
207
+ fontSize: 14,
208
+ color: isPopover ? "var(--color-text-primary)" : "var(--color-tooltip-fg)"
209
+ })
210
+ ]
211
+ }
212
+ )
213
+ ]
214
+ }
215
+ ) });
216
+ }
217
+ );
218
+ function TruncatedTextTooltip({ label, children }) {
219
+ return /* @__PURE__ */ jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
220
+ }
221
+ var SIZE = {
222
+ sm: { padding: 4, height: 18, minHeight: 18 },
223
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24 },
224
+ lg: { paddingHorizontal: 8, paddingVertical: 4, minHeight: 28 }
225
+ };
226
+ var SIZE_TEXT = {
227
+ sm: { fontSize: 12, fontWeight: "500" },
228
+ md: { fontSize: 14, fontWeight: "500" },
229
+ lg: { fontSize: 14, fontWeight: "600" }
230
+ };
231
+ var COLOR_PALETTE = {
232
+ gray: { bg: "var(--color-badge-gray-bg)", fg: "var(--color-badge-gray-fg)" },
233
+ green: { bg: "var(--color-badge-green-bg)", fg: "var(--color-badge-green-fg)" },
234
+ red: { bg: "var(--color-badge-red-bg)", fg: "var(--color-badge-red-fg)" },
235
+ purple: { bg: "var(--color-badge-purple-bg)", fg: "var(--color-badge-purple-fg)" },
236
+ orange: { bg: "var(--color-badge-orange-bg)", fg: "var(--color-badge-orange-fg)" },
237
+ blue: { bg: "var(--color-badge-blue-bg)", fg: "var(--color-badge-blue-fg)" },
238
+ yellow: { bg: "var(--color-badge-yellow-bg)", fg: "var(--color-badge-yellow-fg)" },
239
+ teal: { bg: "var(--color-badge-teal-bg)", fg: "var(--color-badge-teal-fg)" },
240
+ cyan: { bg: "var(--color-badge-cyan-bg)", fg: "var(--color-badge-cyan-fg)" },
241
+ pink: { bg: "var(--color-badge-pink-bg)", fg: "var(--color-badge-pink-fg)" },
242
+ purple_alt: { bg: "var(--color-badge-purple-alt-bg)", fg: "var(--color-badge-purple-alt-fg)" },
243
+ blue_alt: { bg: "var(--color-badge-blue-alt-bg)", fg: "var(--color-badge-blue-alt-fg)" },
244
+ bright_gray: { bg: "var(--color-badge-bright-gray-bg)", fg: "var(--color-badge-bright-gray-fg)" },
245
+ bright_green: { bg: "var(--color-badge-bright-green-bg)", fg: "var(--color-badge-bright-green-fg)" },
246
+ bright_red: { bg: "var(--color-badge-bright-red-bg)", fg: "var(--color-badge-bright-red-fg)" },
247
+ bright_blue: { bg: "var(--color-badge-bright-blue-bg)", fg: "var(--color-badge-bright-blue-fg)" },
248
+ bright_yellow: { bg: "var(--color-badge-bright-yellow-bg)", fg: "var(--color-badge-bright-yellow-fg)" },
249
+ bright_teal: { bg: "var(--color-badge-bright-teal-bg)", fg: "var(--color-badge-bright-teal-fg)" },
250
+ bright_cyan: { bg: "var(--color-badge-bright-cyan-bg)", fg: "var(--color-badge-bright-cyan-fg)" },
251
+ bright_orange: { bg: "var(--color-badge-bright-orange-bg)", fg: "var(--color-badge-bright-orange-fg)" },
252
+ bright_purple: { bg: "var(--color-badge-bright-purple-bg)", fg: "var(--color-badge-bright-purple-fg)" },
253
+ bright_pink: { bg: "var(--color-badge-bright-pink-bg)", fg: "var(--color-badge-bright-pink-fg)" }
254
+ };
255
+ var TONE = {
256
+ subtle: (p) => ({ backgroundColor: p.bg, color: p.fg, borderWidth: 0 }),
257
+ solid: (p) => ({ backgroundColor: p.fg, color: p.bg, borderWidth: 0 }),
258
+ outline: (p) => ({
259
+ backgroundColor: "transparent",
260
+ color: p.fg,
261
+ borderWidth: 1,
262
+ borderColor: p.fg
263
+ })
264
+ };
265
+ var Badge = React10__default.forwardRef(
266
+ function Badge2(props, ref) {
267
+ const {
268
+ loading,
269
+ startElement,
270
+ children,
271
+ truncated = false,
272
+ endElement,
273
+ variant = "subtle",
274
+ size = "md",
275
+ colorPalette = "gray",
276
+ className,
277
+ style: badgeStyle,
278
+ ...rest
279
+ } = props;
280
+ const palette = COLOR_PALETTE[colorPalette];
281
+ const tone = TONE[variant](palette);
282
+ const child = children ? (
283
+ // `ellipsis` is gui Text's own built-in variant for single-line
284
+ // truncation — it expands to the same overflow/text-overflow/
285
+ // white-space/max-width rule Tailwind's `text-ellipsis` did, but
286
+ // through the component's own variants (guaranteed to compile),
287
+ // rather than naming each longhand as a separate style prop.
288
+ /* @__PURE__ */ jsx(Text, { ellipsis: true, ...SIZE_TEXT[size], color: tone.color, children })
289
+ ) : null;
290
+ const childrenElement = truncated ? /* @__PURE__ */ jsx(TruncatedTextTooltip, { label: children, children: child }) : child;
291
+ const badgeElement = /* @__PURE__ */ jsxs(
292
+ XStack,
293
+ {
294
+ ref,
295
+ render: /* @__PURE__ */ jsx("span", {}),
296
+ display: "inline-flex",
297
+ alignItems: "center",
298
+ alignSelf: "flex-start",
299
+ borderRadius: 2,
300
+ gap: 4,
301
+ maxWidth: "100%",
302
+ userSelect: "text",
303
+ ...SIZE[size],
304
+ ...tone,
305
+ className,
306
+ style: badgeStyle,
307
+ ...rest,
308
+ children: [
309
+ startElement,
310
+ childrenElement,
311
+ endElement
312
+ ]
313
+ }
314
+ );
315
+ if (loading) {
316
+ return /* @__PURE__ */ jsx(Skeleton, { loading, asChild: true, children: badgeElement });
317
+ }
318
+ return badgeElement;
319
+ }
320
+ );
321
+ var SpinnerFrame = styled(View, {
322
+ name: "ButtonSpinner",
323
+ render: /* @__PURE__ */ jsx("span", {}),
324
+ width: 16,
325
+ height: 16,
326
+ borderRadius: 1e3,
327
+ borderWidth: 2,
328
+ borderColor: "currentColor",
329
+ borderBottomColor: "transparent",
330
+ borderLeftColor: "transparent"
331
+ });
332
+ function Spinner({ className }) {
333
+ return /* @__PURE__ */ jsx(
334
+ SpinnerFrame,
335
+ {
336
+ role: "status",
337
+ "aria-label": "Loading",
338
+ className: [
339
+ "animate-spin",
340
+ className
341
+ ].filter(Boolean).join(" ")
342
+ }
343
+ );
344
+ }
345
+ var ButtonFrame = styled(View, {
346
+ name: "LuxButton",
347
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
348
+ role: "button",
349
+ tabIndex: 0,
350
+ cursor: "pointer",
351
+ userSelect: "none",
352
+ display: "inline-flex",
353
+ alignItems: "center",
354
+ justifyContent: "center",
355
+ gap: 0,
356
+ overflow: "hidden",
357
+ borderRadius: 6,
358
+ // Whitespace nowrap via className since hanzogui doesn't have a direct token
359
+ // Transition via className
360
+ variants: {
361
+ size: {
362
+ "2xs": { paddingHorizontal: 8, height: 20, minWidth: 20, fontSize: 12, borderRadius: 4, gap: 4 },
363
+ xs: { paddingHorizontal: 8, height: 24, minWidth: 24, fontSize: 14, borderRadius: 4, gap: 4 },
364
+ sm: { paddingHorizontal: 12, height: 32, minWidth: 32, fontSize: 14, borderRadius: 6, gap: 4 },
365
+ md: { paddingHorizontal: 12, height: 40, minWidth: 40, fontSize: 16, borderRadius: 6, gap: 8 }
366
+ },
367
+ disabled: {
368
+ true: {
369
+ opacity: 0.2,
370
+ cursor: "not-allowed",
371
+ pointerEvents: "none"
372
+ }
373
+ }
374
+ },
375
+ defaultVariants: {
376
+ size: "md"
377
+ }
378
+ });
379
+ var VARIANT_CLASSES = {
380
+ solid: [
381
+ "bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
382
+ "hover:bg-[var(--color-hover)]",
383
+ "data-[expanded]:bg-[var(--color-hover)]"
384
+ ].join(" "),
385
+ solid_danger: [
386
+ "bg-[var(--color-button-danger-bg)] text-[var(--color-button-danger-fg)]",
387
+ "hover:bg-[var(--color-button-danger-bg-hover)]",
388
+ "data-[expanded]:bg-[var(--color-button-danger-bg-hover)]"
389
+ ].join(" "),
390
+ outline: [
391
+ "border-2 border-solid bg-transparent",
392
+ "text-[var(--color-button-outline-fg)] border-[var(--color-button-outline-fg)]",
393
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]"
394
+ ].join(" "),
395
+ outline_danger: [
396
+ "border-2 border-solid bg-transparent",
397
+ "text-[var(--color-button-danger-bg)] border-[var(--color-button-danger-bg)]",
398
+ "hover:bg-transparent hover:text-[var(--color-button-danger-bg-hover)] hover:border-[var(--color-button-danger-bg-hover)]"
399
+ ].join(" "),
400
+ dropdown: [
401
+ "border-2 border-solid bg-transparent",
402
+ "text-[var(--color-button-dropdown-fg)] border-[var(--color-button-dropdown-border)]",
403
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
404
+ "data-[expanded]:bg-transparent data-[expanded]:text-[var(--color-hover)] data-[expanded]:border-[var(--color-hover)]",
405
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
406
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
407
+ "data-[selected]:hover:text-[var(--color-hover)] data-[selected]:hover:border-transparent",
408
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]"
409
+ ].join(" "),
410
+ header: [
411
+ "bg-transparent border-2 border-solid",
412
+ "text-[var(--color-button-header-fg)] border-[var(--color-button-header-border)]",
413
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
414
+ "data-[selected]:bg-[var(--color-button-header-bg-selected)]",
415
+ "data-[selected]:text-[var(--color-button-header-fg-selected)] data-[selected]:border-transparent data-[selected]:border-0",
416
+ "data-[selected]:hover:bg-[var(--color-button-header-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
417
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
418
+ "data-[selected]:data-[highlighted]:bg-[var(--color-button-header-bg-highlighted)]",
419
+ "data-[selected]:data-[highlighted]:text-[var(--color-button-header-fg-highlighted)]",
420
+ "data-[selected]:data-[highlighted]:border-transparent data-[selected]:data-[highlighted]:border-0",
421
+ "data-[selected]:data-[highlighted]:hover:bg-[var(--color-button-header-bg-highlighted)]",
422
+ "data-[selected]:data-[highlighted]:hover:text-[var(--color-hover)]",
423
+ "data-[selected]:data-[highlighted]:data-[expanded]:text-[var(--color-hover)]"
424
+ ].join(" "),
425
+ hero: [
426
+ "bg-[var(--color-button-hero-bg)] text-[var(--color-button-hero-fg)]",
427
+ "hover:bg-[var(--color-button-hero-bg-hover)] hover:text-[var(--color-button-hero-fg-hover)]",
428
+ "data-[selected]:bg-[var(--color-button-hero-bg-selected)] data-[selected]:text-[var(--color-button-hero-fg-selected)]",
429
+ "data-[selected]:hover:bg-[var(--color-button-hero-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
430
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]"
431
+ ].join(" "),
432
+ segmented: [
433
+ "bg-transparent border-2 border-solid rounded-none",
434
+ "text-[var(--color-button-segmented-fg)] border-[var(--color-selected-control-bg)]",
435
+ "hover:text-[var(--color-hover)]",
436
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
437
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-selected-control-text)]",
438
+ "[&:not(:last-child)]:border-r-0 data-[selected]:[&:not(:last-child)]:border-r-2",
439
+ "data-[selected]+*:border-l-0",
440
+ "first:rounded-l-md last:rounded-r-md"
441
+ ].join(" "),
442
+ plain: "bg-transparent text-inherit border-none hover:bg-transparent",
443
+ subtle: [
444
+ "bg-[var(--color-button-subtle-bg)] text-[var(--color-button-subtle-fg)]",
445
+ "hover:bg-[var(--color-button-subtle-bg)] hover:text-[var(--color-hover)]",
446
+ "disabled:bg-[var(--color-button-subtle-bg)] disabled:text-[var(--color-button-subtle-fg)]"
447
+ ].join(" "),
448
+ link: [
449
+ "bg-transparent text-[var(--color-link-primary)] border-none font-normal",
450
+ "px-0 h-auto",
451
+ "hover:bg-transparent hover:text-[var(--color-link-primary-hover)]",
452
+ "disabled:text-[var(--color-text-secondary)]"
453
+ ].join(" "),
454
+ icon_secondary: [
455
+ "bg-transparent text-[var(--color-icon-secondary)] border-none",
456
+ "hover:text-[var(--color-hover)]",
457
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
458
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
459
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
460
+ "data-[expanded]:text-[var(--color-hover)]"
461
+ ].join(" "),
462
+ icon_background: [
463
+ "bg-[var(--color-button-icon-background-bg)] text-[var(--color-icon-secondary)] border-none",
464
+ "hover:text-[var(--color-hover)]",
465
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
466
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
467
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
468
+ "data-[expanded]:text-[var(--color-hover)]"
469
+ ].join(" "),
470
+ pagination: [
471
+ "border-2 border-solid bg-transparent",
472
+ "text-[var(--color-button-pagination-fg)] border-[var(--color-button-pagination-border)]",
473
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
474
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
475
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
476
+ "data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
477
+ ].join(" ")
478
+ };
479
+ var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
480
+ var SP = 4;
481
+ function buildShimStyle(props) {
482
+ const s = { ...props.style };
483
+ if (props.mt !== void 0) s.marginTop = typeof props.mt === "number" ? `${props.mt * SP}px` : props.mt;
484
+ if (props.ml !== void 0) s.marginLeft = typeof props.ml === "number" ? `${props.ml * SP}px` : props.ml;
485
+ if (props.mr !== void 0) s.marginRight = typeof props.mr === "number" ? `${props.mr * SP}px` : props.mr;
486
+ if (props.px !== void 0) {
487
+ const v = typeof props.px === "number" ? `${props.px * SP}px` : props.px;
488
+ s.paddingLeft = v;
489
+ s.paddingRight = v;
490
+ }
491
+ if (props.py !== void 0) {
492
+ const v = typeof props.py === "number" ? `${props.py * SP}px` : props.py;
493
+ s.paddingTop = v;
494
+ s.paddingBottom = v;
495
+ }
496
+ if (props.fontWeight !== void 0) s.fontWeight = props.fontWeight;
497
+ if (props.gap !== void 0) s.gap = typeof props.gap === "number" ? `${props.gap * SP}px` : props.gap;
498
+ if (props.flexShrink !== void 0) s.flexShrink = props.flexShrink;
499
+ if (props.columnGap !== void 0) s.columnGap = typeof props.columnGap === "number" ? `${props.columnGap * SP}px` : props.columnGap;
500
+ if (props.gridColumn !== void 0) s.gridColumn = typeof props.gridColumn === "number" ? String(props.gridColumn) : props.gridColumn;
501
+ if (props.gridRow) s.gridRow = props.gridRow;
502
+ if (props.justifySelf) s.justifySelf = props.justifySelf;
503
+ if (props.alignSelf) s.alignSelf = props.alignSelf;
504
+ if (props.h) s.height = props.h;
505
+ if (props.w) s.width = props.w;
506
+ if (props.display) s.display = props.display;
507
+ if (props.borderBottomRightRadius !== void 0) s.borderBottomRightRadius = typeof props.borderBottomRightRadius === "number" ? `${props.borderBottomRightRadius}px` : props.borderBottomRightRadius;
508
+ if (props.borderTopRightRadius !== void 0) s.borderTopRightRadius = typeof props.borderTopRightRadius === "number" ? `${props.borderTopRightRadius}px` : props.borderTopRightRadius;
509
+ return Object.keys(s).length > 0 ? s : void 0;
510
+ }
511
+ var Button = React10.forwardRef(
512
+ function Button2(props, ref) {
513
+ const {
514
+ className,
515
+ variant = "solid",
516
+ size = "md",
517
+ asChild = false,
518
+ loading = false,
519
+ loadingText,
520
+ loadingSkeleton = false,
521
+ expanded,
522
+ selected,
523
+ highlighted,
524
+ disabled,
525
+ children,
526
+ style: styleProp,
527
+ // Strip Chakra style props
528
+ mt,
529
+ ml,
530
+ mr,
531
+ px,
532
+ py,
533
+ fontWeight,
534
+ gap,
535
+ flexShrink,
536
+ columnGap,
537
+ gridColumn,
538
+ gridRow,
539
+ justifySelf,
540
+ alignSelf,
541
+ textStyle: _textStyle,
542
+ h,
543
+ w,
544
+ display,
545
+ borderBottomRightRadius,
546
+ borderTopRightRadius,
547
+ ...rest
548
+ } = props;
549
+ const mergedStyle = buildShimStyle({
550
+ style: styleProp,
551
+ mt,
552
+ ml,
553
+ mr,
554
+ px,
555
+ py,
556
+ fontWeight,
557
+ gap,
558
+ flexShrink,
559
+ columnGap,
560
+ gridColumn,
561
+ gridRow,
562
+ justifySelf,
563
+ alignSelf,
564
+ h,
565
+ w,
566
+ display,
567
+ borderBottomRightRadius,
568
+ borderTopRightRadius
569
+ });
570
+ const dataAttrs = {};
571
+ if (expanded) dataAttrs["data-expanded"] = true;
572
+ if (selected) dataAttrs["data-selected"] = true;
573
+ if (highlighted) dataAttrs["data-highlighted"] = true;
574
+ if (loadingSkeleton) dataAttrs["data-loading-skeleton"] = true;
575
+ const isDisabled = !loadingSkeleton && (loading || disabled);
576
+ const inner = loading ? /* @__PURE__ */ jsxs(Fragment, { children: [
577
+ /* @__PURE__ */ jsx(Spinner, {}),
578
+ loadingText != null && /* @__PURE__ */ jsx("span", { style: { marginLeft: 8 }, children: loadingText })
579
+ ] }) : children;
580
+ const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
581
+ const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
582
+ const button = /* @__PURE__ */ jsx(
583
+ ButtonFrame,
584
+ {
585
+ ref,
586
+ size,
587
+ disabled: isDisabled || void 0,
588
+ asChild: asChild || void 0,
589
+ className: combinedClassName,
590
+ style: mergedStyle,
591
+ ...dataAttrs,
592
+ ...rest,
593
+ children: inner
594
+ }
595
+ );
596
+ if (loadingSkeleton) {
597
+ return /* @__PURE__ */ jsx(Skeleton, { loading: loadingSkeleton, asChild: true, ref, children: button });
598
+ }
599
+ return button;
600
+ }
601
+ );
602
+ React10.forwardRef(
603
+ function ButtonGroup2(props, ref) {
604
+ const { className, ...rest } = props;
605
+ return /* @__PURE__ */ jsx(
606
+ Box,
607
+ {
608
+ ref,
609
+ className: ["inline-flex", className].filter(Boolean).join(" "),
610
+ role: "group",
611
+ ...rest
612
+ }
613
+ );
614
+ }
615
+ );
616
+ React10.forwardRef(
617
+ function ButtonGroupRadio2(props, ref) {
618
+ const {
619
+ children,
620
+ onChange,
621
+ variant = "segmented",
622
+ defaultValue,
623
+ loading = false,
624
+ equalWidth = false,
625
+ className,
626
+ ...rest
627
+ } = props;
628
+ const firstChildValue = React10.useMemo(() => {
629
+ const firstChild = Array.isArray(children) ? children[0] : void 0;
630
+ return typeof firstChild?.props.value === "string" ? firstChild.props.value : void 0;
631
+ }, [children]);
632
+ const [value, setValue] = React10.useState(defaultValue ?? firstChildValue);
633
+ const handleItemClick = React10.useCallback((event) => {
634
+ const v = event.currentTarget.value;
635
+ setValue(v);
636
+ onChange?.(v);
637
+ }, [onChange]);
638
+ const clonedChildren = React10.Children.map(children, (child) => {
639
+ return React10.cloneElement(child, {
640
+ onClick: handleItemClick,
641
+ selected: value === child.props.value,
642
+ variant
643
+ });
644
+ });
645
+ const childrenLength = React10.Children.count(children);
646
+ return /* @__PURE__ */ jsx(Skeleton, { loading, children: /* @__PURE__ */ jsx(
647
+ Box,
648
+ {
649
+ ref,
650
+ className: [
651
+ "inline-flex gap-0",
652
+ equalWidth ? "grid" : "",
653
+ className
654
+ ].filter(Boolean).join(" "),
655
+ style: equalWidth ? { gridTemplateColumns: `repeat(${childrenLength}, 1fr)` } : void 0,
656
+ role: "group",
657
+ ...rest,
658
+ children: clonedChildren
659
+ }
660
+ ) });
661
+ }
662
+ );
663
+ var SIZE2 = {
664
+ sm: 4,
665
+ md: 8,
666
+ lg: 12,
667
+ xl: 16
668
+ };
669
+ function normalizeValue(value, min, max) {
670
+ if (value == null) return 0;
671
+ if (max <= min) return 0;
672
+ return Math.round((value - min) / (max - min) * 100);
673
+ }
674
+ var Progress = React10.forwardRef(
675
+ function Progress2(props, ref) {
676
+ const {
677
+ value,
678
+ min = 0,
679
+ max = 100,
680
+ size = "md",
681
+ color,
682
+ trackProps,
683
+ style,
684
+ w,
685
+ flex,
686
+ ...rest
687
+ } = props;
688
+ const percent = normalizeValue(value, min, max);
689
+ const trackStyle = {
690
+ ...trackProps?.style,
691
+ ...trackProps?.borderStartRadius !== void 0 && {
692
+ borderStartStartRadius: trackProps.borderStartRadius,
693
+ borderEndStartRadius: trackProps.borderStartRadius
694
+ },
695
+ ...trackProps?.borderEndRadius !== void 0 && {
696
+ borderStartEndRadius: trackProps.borderEndRadius,
697
+ borderEndEndRadius: trackProps.borderEndRadius
698
+ }
699
+ };
700
+ const rootStyle = {
701
+ position: "relative",
702
+ ...style,
703
+ ...w !== void 0 && { width: w === "full" ? "100%" : w },
704
+ ...flex !== void 0 && { flex }
705
+ };
706
+ return /* @__PURE__ */ jsx(
707
+ "div",
708
+ {
709
+ ref,
710
+ style: rootStyle,
711
+ ...rest,
712
+ children: /* @__PURE__ */ jsx(
713
+ Progress$1,
714
+ {
715
+ value: percent,
716
+ max: 100,
717
+ unstyled: true,
718
+ className: trackProps?.className,
719
+ width: "100%",
720
+ overflow: "hidden",
721
+ borderRadius: 9999,
722
+ height: SIZE2[size],
723
+ backgroundColor: "var(--color-progress-track)",
724
+ style: trackStyle,
725
+ children: /* @__PURE__ */ jsx(
726
+ Progress$1.Indicator,
727
+ {
728
+ unstyled: true,
729
+ transition: "slow",
730
+ height: "100%",
731
+ borderRadius: 9999,
732
+ backgroundColor: color ? void 0 : "var(--color-progress-indicator)",
733
+ style: {
734
+ ...color && { backgroundColor: `var(--color-${color.replace(".", "-")}, ${color})` }
735
+ }
736
+ }
737
+ )
738
+ }
739
+ )
740
+ }
741
+ );
742
+ }
743
+ );
744
+ var ResizablePanelGroup = ({
745
+ className,
746
+ ...props
747
+ }) => /* @__PURE__ */ jsx(
748
+ ResizablePrimitive.PanelGroup,
749
+ {
750
+ className: cn(
751
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
752
+ className
753
+ ),
754
+ ...props
755
+ }
756
+ );
757
+ var ResizablePanel = ResizablePrimitive.Panel;
758
+ var ResizableHandle = ({
759
+ withHandle,
760
+ className,
761
+ ...props
762
+ }) => /* @__PURE__ */ jsx(
763
+ ResizablePrimitive.PanelResizeHandle,
764
+ {
765
+ className: cn(
766
+ "relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
767
+ className
768
+ ),
769
+ ...props,
770
+ children: withHandle && /* @__PURE__ */ jsx(Box, { className: "z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border", children: /* @__PURE__ */ jsx(GripVertical, { style: css("h-2.5 w-2.5") }) })
771
+ }
772
+ );
773
+ var WEIGHT = { xs: 0.5, sm: 1, md: 2, lg: 3 };
774
+ var Separator = React10__default.forwardRef(
775
+ function Separator2({ orientation = "horizontal", variant = "solid", size = "sm", ...rest }, ref) {
776
+ const vertical = orientation === "vertical";
777
+ return /* @__PURE__ */ jsx(
778
+ Separator$1,
779
+ {
780
+ ref,
781
+ vertical,
782
+ role: "separator",
783
+ "aria-orientation": orientation,
784
+ borderWidth: 0,
785
+ borderStyle: variant,
786
+ borderColor: "var(--color-border-divider)",
787
+ ...vertical ? { borderLeftWidth: WEIGHT[size], alignSelf: "stretch", height: "auto", width: 0 } : { borderTopWidth: WEIGHT[size], width: "100%" },
788
+ ...rest
789
+ }
790
+ );
791
+ }
792
+ );
793
+ var SIZE3 = {
794
+ xs: { height: 24, paddingHorizontal: 8, fontSize: "$1", borderRadius: 4 },
795
+ sm: { height: 32, paddingHorizontal: 12, fontSize: "$3", borderRadius: 6 },
796
+ md: { height: 40, paddingHorizontal: 16, fontSize: "$5", borderRadius: 6 },
797
+ lg: { height: 48, paddingHorizontal: 16, fontSize: "$6", borderRadius: 8 },
798
+ "2xl": { height: 56, paddingHorizontal: 16, fontSize: "$7", borderRadius: 8 }
799
+ };
800
+ var VARIANT = {
801
+ outline: { borderWidth: 1, borderStyle: "solid" },
802
+ filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
803
+ unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
804
+ };
805
+ var CONTROL = {
806
+ width: "100%",
807
+ outlineWidth: 0,
808
+ backgroundColor: "var(--color-input-bg)",
809
+ color: "var(--color-input-fg)",
810
+ borderColor: "var(--color-input-border)",
811
+ hoverStyle: { borderColor: "var(--color-input-border-hover)" },
812
+ focusStyle: { borderColor: "var(--color-input-border-focus)" },
813
+ disabledStyle: { opacity: 0.4, cursor: "not-allowed" }
814
+ };
815
+ var Input = React10__default.forwardRef(
816
+ ({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
817
+ const handleChange = React10__default.useCallback(
818
+ (event) => {
819
+ onChange?.(event);
820
+ onChangeText?.(event.target.value);
821
+ },
822
+ [onChange, onChangeText]
823
+ );
824
+ return /* @__PURE__ */ jsx(
825
+ Input$1,
826
+ {
827
+ ref,
828
+ unstyled: true,
829
+ className: className ? `lux-control ${className}` : "lux-control",
830
+ ...CONTROL,
831
+ ...SIZE3[size],
832
+ ...VARIANT[variant],
833
+ ...rest,
834
+ onChange: handleChange
835
+ }
836
+ );
837
+ }
838
+ );
839
+ Input.displayName = "Input";
840
+ var SIZE4 = {
841
+ xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: "$1", borderRadius: 4 },
842
+ sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: "$3", borderRadius: 6 },
843
+ md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: "$5", borderRadius: 6 },
844
+ lg: { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$6", borderRadius: 8 },
845
+ "2xl": { paddingHorizontal: 16, paddingVertical: 12, fontSize: "$7", borderRadius: 8 }
846
+ };
847
+ var Textarea = React10__default.forwardRef(
848
+ ({ size = "md", variant = "outline", className, onChange, onChangeText, ...rest }, ref) => {
849
+ const handleChange = React10__default.useCallback(
850
+ (event) => {
851
+ onChange?.(event);
852
+ onChangeText?.(event.target.value);
853
+ },
854
+ [onChange, onChangeText]
855
+ );
856
+ return /* @__PURE__ */ jsx(
857
+ TextArea,
858
+ {
859
+ ref,
860
+ unstyled: true,
861
+ className: className ? `lux-control ${className}` : "lux-control",
862
+ ...CONTROL,
863
+ ...SIZE4[size],
864
+ ...VARIANT[variant],
865
+ ...rest,
866
+ onChange: handleChange
867
+ }
868
+ );
869
+ }
870
+ );
871
+ Textarea.displayName = "Textarea";
872
+ var suggestionVariants = variants(
873
+ "relative rounded-lg border p-3 transition-colors",
874
+ {
875
+ variants: {
876
+ severity: {
877
+ info: "border-[var(--color-link-primary)] bg-[var(--color-link-primary)] dark:border-[var(--color-link-primary)] dark:bg-[var(--color-link-primary)]",
878
+ warning: "border-[var(--lux-state-notice)] bg-[var(--lux-state-notice)] dark:border-[var(--lux-state-notice)] dark:bg-[var(--lux-state-notice)]",
879
+ error: "border-[var(--lux-state-error)] bg-[var(--lux-state-error)] dark:border-[var(--lux-state-error)] dark:bg-[var(--lux-state-error)]"
880
+ }
881
+ },
882
+ defaultVariants: {
883
+ severity: "info"
884
+ }
885
+ }
886
+ );
887
+ var featureIcons = {
888
+ generate: Wand2,
889
+ explain: Eye,
890
+ refactor: Code,
891
+ debug: Bug,
892
+ test: TestTube,
893
+ document: FileText,
894
+ review: GitCompare
895
+ };
896
+ var languagePatterns = {
897
+ typescript: /\.(tsx?|ts)$/,
898
+ javascript: /\.(jsx?|js|mjs)$/,
899
+ python: /\.py$/,
900
+ java: /\.java$/,
901
+ csharp: /\.cs$/,
902
+ cpp: /\.(cpp|cc|cxx)$/,
903
+ c: /\.c$/,
904
+ go: /\.go$/,
905
+ rust: /\.rs$/,
906
+ php: /\.php$/,
907
+ ruby: /\.rb$/,
908
+ swift: /\.swift$/
909
+ };
910
+ var SecurityPanel = React10.forwardRef(({ issues, onFixIssue, className, ...props }, ref) => /* @__PURE__ */ jsxs(Box, { ref, className: cn("space-y-2", className), ...props, children: [
911
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
912
+ /* @__PURE__ */ jsx(Shield, { style: css("h-4 w-4") }),
913
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "font-medium", children: "Security Analysis" }),
914
+ issues.length > 0 && /* @__PURE__ */ jsxs(
915
+ Badge,
916
+ {
917
+ colorPalette: issues.some((i) => i.severity === "critical") ? "red" : "gray",
918
+ children: [
919
+ issues.length,
920
+ " issue",
921
+ issues.length !== 1 ? "s" : ""
922
+ ]
923
+ }
924
+ )
925
+ ] }),
926
+ issues.length === 0 ? /* @__PURE__ */ jsx(Box, { tag: "p", className: "text-sm text-muted-foreground", children: "No security issues detected" }) : /* @__PURE__ */ jsx(Box, { className: "space-y-2", children: issues.map((issue) => /* @__PURE__ */ jsx(
927
+ Box,
928
+ {
929
+ className: cn(
930
+ "rounded-lg border p-3 text-sm",
931
+ issue.severity === "critical" && "border-[var(--lux-state-error)] bg-[var(--lux-state-error)] dark:bg-[var(--lux-state-error)]",
932
+ issue.severity === "high" && "border-[var(--lux-state-notice)] bg-[var(--lux-state-notice)] dark:bg-[var(--lux-state-notice)]",
933
+ issue.severity === "medium" && "border-[var(--lux-state-notice)] bg-[var(--lux-state-notice)] dark:bg-[var(--lux-state-notice)]",
934
+ issue.severity === "low" && "border-[var(--color-link-primary)] bg-[var(--color-link-primary)] dark:bg-[var(--color-link-primary)]"
935
+ ),
936
+ children: /* @__PURE__ */ jsxs(Box, { className: "flex items-start justify-between gap-2", children: [
937
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-1", children: [
938
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
939
+ /* @__PURE__ */ jsx(
940
+ Badge,
941
+ {
942
+ colorPalette: issue.severity === "critical" || issue.severity === "high" ? "red" : "gray",
943
+ ...sx("text-xs"),
944
+ children: issue.severity.toUpperCase()
945
+ }
946
+ ),
947
+ /* @__PURE__ */ jsxs(Box, { tag: "span", className: "text-xs text-muted-foreground", children: [
948
+ "Line ",
949
+ issue.line
950
+ ] })
951
+ ] }),
952
+ /* @__PURE__ */ jsx("p", { children: issue.message }),
953
+ issue.fix && /* @__PURE__ */ jsxs(Box, { tag: "p", className: "text-xs text-muted-foreground", children: [
954
+ "Fix: ",
955
+ issue.fix
956
+ ] })
957
+ ] }),
958
+ onFixIssue && issue.fix && /* @__PURE__ */ jsx(
959
+ Button,
960
+ {
961
+ size: "sm",
962
+ variant: "outline",
963
+ onClick: () => onFixIssue(issue),
964
+ children: "Fix"
965
+ }
966
+ )
967
+ ] })
968
+ },
969
+ issue.id
970
+ )) })
971
+ ] }));
972
+ SecurityPanel.displayName = "SecurityPanel";
973
+ var SuggestionsPanel = React10.forwardRef(({ suggestions, onApplySuggestion, className, ...props }, ref) => /* @__PURE__ */ jsxs(Box, { ref, className: cn("space-y-2", className), ...props, children: [
974
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
975
+ /* @__PURE__ */ jsx(Zap, { style: css("h-4 w-4") }),
976
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "font-medium", children: "AI Suggestions" })
977
+ ] }),
978
+ suggestions.length === 0 ? /* @__PURE__ */ jsx(Box, { tag: "p", className: "text-sm text-muted-foreground", children: "No suggestions available" }) : /* @__PURE__ */ jsx(Box, { className: "space-y-2", children: suggestions.map((suggestion) => {
979
+ const Icon = featureIcons[suggestion.type] || Code;
980
+ return /* @__PURE__ */ jsxs(
981
+ Box,
982
+ {
983
+ className: cn(
984
+ suggestionVariants({ severity: suggestion.severity || "info" }),
985
+ "space-y-2"
986
+ ),
987
+ children: [
988
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-start justify-between gap-2", children: [
989
+ /* @__PURE__ */ jsxs(Box, { className: "space-y-1", children: [
990
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
991
+ /* @__PURE__ */ jsx(Icon, { style: css("h-4 w-4") }),
992
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "font-medium text-sm", children: suggestion.title })
993
+ ] }),
994
+ /* @__PURE__ */ jsx(Box, { tag: "p", className: "text-sm text-muted-foreground", children: suggestion.description }),
995
+ suggestion.startLine && suggestion.endLine && /* @__PURE__ */ jsxs(Box, { tag: "span", className: "text-xs text-muted-foreground", children: [
996
+ "Lines ",
997
+ suggestion.startLine,
998
+ "-",
999
+ suggestion.endLine
1000
+ ] })
1001
+ ] }),
1002
+ onApplySuggestion && /* @__PURE__ */ jsx(
1003
+ Button,
1004
+ {
1005
+ size: "sm",
1006
+ variant: "outline",
1007
+ onClick: () => onApplySuggestion(suggestion),
1008
+ children: "Apply"
1009
+ }
1010
+ )
1011
+ ] }),
1012
+ suggestion.code && /* @__PURE__ */ jsx(Box, { className: "mt-2 rounded bg-background/50 p-2", children: /* @__PURE__ */ jsx(Box, { tag: "pre", className: "text-xs overflow-x-auto", children: /* @__PURE__ */ jsx("code", { children: suggestion.code }) }) })
1013
+ ]
1014
+ },
1015
+ suggestion.id
1016
+ );
1017
+ }) })
1018
+ ] }));
1019
+ SuggestionsPanel.displayName = "SuggestionsPanel";
1020
+ var ChatPanel = React10.forwardRef(
1021
+ ({
1022
+ messages,
1023
+ onSendMessage,
1024
+ isGenerating,
1025
+ placeholder = "Ask AI about your code...",
1026
+ className,
1027
+ ...props
1028
+ }, ref) => {
1029
+ const [input, setInput] = React10.useState("");
1030
+ const scrollRef = React10.useRef(null);
1031
+ React10.useEffect(() => {
1032
+ if (scrollRef.current) {
1033
+ scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
1034
+ }
1035
+ }, [messages]);
1036
+ const handleSend = () => {
1037
+ if (!input.trim() || isGenerating) return;
1038
+ onSendMessage(input);
1039
+ setInput("");
1040
+ };
1041
+ const handleKeyPress = (e) => {
1042
+ if (e.key === "Enter" && !e.shiftKey) {
1043
+ e.preventDefault();
1044
+ handleSend();
1045
+ }
1046
+ };
1047
+ return /* @__PURE__ */ jsxs(
1048
+ Box,
1049
+ {
1050
+ ref,
1051
+ className: cn("flex h-full flex-col", className),
1052
+ ...props,
1053
+ children: [
1054
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2 p-3 border-b", children: [
1055
+ /* @__PURE__ */ jsx(MessageSquare, { style: css("h-4 w-4") }),
1056
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "font-medium", children: "AI Assistant" })
1057
+ ] }),
1058
+ /* @__PURE__ */ jsx(ScrollArea, { ref: scrollRef, ...sx("flex-1 p-3"), children: /* @__PURE__ */ jsxs(Box, { className: "space-y-3", children: [
1059
+ messages.map((message) => /* @__PURE__ */ jsxs(
1060
+ Box,
1061
+ {
1062
+ className: cn(
1063
+ "flex gap-2",
1064
+ message.role === "user" ? "justify-end" : "justify-start"
1065
+ ),
1066
+ children: [
1067
+ message.role === "assistant" && /* @__PURE__ */ jsx(Avatar, { ...sx("h-6 w-6 shrink-0"), children: /* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(Bot, { style: css("h-3 w-3") }) }) }),
1068
+ /* @__PURE__ */ jsx(
1069
+ Box,
1070
+ {
1071
+ className: cn(
1072
+ "max-w-[80%] rounded-lg px-3 py-2 text-sm",
1073
+ message.role === "user" ? "bg-primary text-primary-foreground" : "bg-muted"
1074
+ ),
1075
+ children: message.type === "code" ? /* @__PURE__ */ jsx(Box, { tag: "pre", className: "overflow-x-auto", children: /* @__PURE__ */ jsx("code", { children: message.content }) }) : /* @__PURE__ */ jsx("p", { children: message.content })
1076
+ }
1077
+ ),
1078
+ message.role === "user" && /* @__PURE__ */ jsx(Avatar, { ...sx("h-6 w-6 shrink-0"), children: /* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(User, { style: css("h-3 w-3") }) }) })
1079
+ ]
1080
+ },
1081
+ message.id
1082
+ )),
1083
+ isGenerating && /* @__PURE__ */ jsxs(Box, { className: "flex gap-2 justify-start", children: [
1084
+ /* @__PURE__ */ jsx(Avatar, { ...sx("h-6 w-6 shrink-0"), children: /* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsx(Bot, { style: css("h-3 w-3") }) }) }),
1085
+ /* @__PURE__ */ jsx(Box, { className: "bg-muted rounded-lg px-3 py-2 text-sm", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
1086
+ /* @__PURE__ */ jsx(Loader2, { style: css("h-3 w-3 animate-spin") }),
1087
+ /* @__PURE__ */ jsx("span", { children: "AI is thinking..." })
1088
+ ] }) })
1089
+ ] })
1090
+ ] }) }),
1091
+ /* @__PURE__ */ jsx(Box, { className: "border-t p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex gap-2", children: [
1092
+ /* @__PURE__ */ jsx(
1093
+ Textarea,
1094
+ {
1095
+ value: input,
1096
+ onChange: (e) => setInput(e.target.value),
1097
+ onKeyPress: handleKeyPress,
1098
+ placeholder,
1099
+ disabled: isGenerating,
1100
+ ...sx("min-h-[60px] resize-none"),
1101
+ rows: 2
1102
+ }
1103
+ ),
1104
+ /* @__PURE__ */ jsx(
1105
+ Button,
1106
+ {
1107
+ size: "icon",
1108
+ onClick: handleSend,
1109
+ disabled: !input.trim() || isGenerating,
1110
+ children: /* @__PURE__ */ jsx(Send, { style: css("h-4 w-4") })
1111
+ }
1112
+ )
1113
+ ] }) })
1114
+ ]
1115
+ }
1116
+ );
1117
+ }
1118
+ );
1119
+ ChatPanel.displayName = "ChatPanel";
1120
+ var FileTabs = React10.forwardRef(
1121
+ ({
1122
+ files,
1123
+ activeFile,
1124
+ onFileChange,
1125
+ onFileCreate,
1126
+ onFileDelete,
1127
+ className,
1128
+ ...props
1129
+ }, ref) => {
1130
+ const [newFileName, setNewFileName] = React10.useState("");
1131
+ const [isCreating, setIsCreating] = React10.useState(false);
1132
+ const handleCreateFile = () => {
1133
+ if (newFileName.trim() && onFileCreate) {
1134
+ onFileCreate(newFileName.trim());
1135
+ setNewFileName("");
1136
+ setIsCreating(false);
1137
+ }
1138
+ };
1139
+ return /* @__PURE__ */ jsxs(
1140
+ Box,
1141
+ {
1142
+ ref,
1143
+ className: cn(
1144
+ "flex items-center gap-1 border-b bg-muted/30 px-2",
1145
+ className
1146
+ ),
1147
+ ...props,
1148
+ children: [
1149
+ /* @__PURE__ */ jsxs(ScrollArea, { ...sx("flex-1"), children: [
1150
+ /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1 py-1", children: files.map((file) => /* @__PURE__ */ jsxs(
1151
+ Button,
1152
+ {
1153
+ variant: activeFile === file.name ? "secondary" : "ghost",
1154
+ size: "sm",
1155
+ ...sx("h-8 gap-2 rounded-t-md rounded-b-none"),
1156
+ onClick: () => onFileChange?.(file.name),
1157
+ children: [
1158
+ /* @__PURE__ */ jsx(FileCode, { style: css("h-3 w-3") }),
1159
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs", children: file.name }),
1160
+ onFileDelete && files.length > 1 && /* @__PURE__ */ jsx(
1161
+ Button,
1162
+ {
1163
+ variant: "ghost",
1164
+ size: "icon",
1165
+ ...sx("h-4 w-4 hover:bg-destructive hover:text-destructive-foreground"),
1166
+ onClick: (e) => {
1167
+ e.stopPropagation();
1168
+ onFileDelete(file.name);
1169
+ },
1170
+ children: "\xD7"
1171
+ }
1172
+ )
1173
+ ]
1174
+ },
1175
+ file.name
1176
+ )) }),
1177
+ /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" })
1178
+ ] }),
1179
+ onFileCreate && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-1", children: isCreating ? /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", children: [
1180
+ /* @__PURE__ */ jsx(
1181
+ Box,
1182
+ {
1183
+ tag: "input",
1184
+ type: "text",
1185
+ value: newFileName,
1186
+ onChange: (e) => setNewFileName(e.target.value),
1187
+ placeholder: "filename.ext",
1188
+ className: "h-6 w-24 rounded border px-2 text-xs",
1189
+ onKeyPress: (e) => {
1190
+ if (e.key === "Enter") handleCreateFile();
1191
+ if (e.key === "Escape") setIsCreating(false);
1192
+ },
1193
+ autoFocus: true
1194
+ }
1195
+ ),
1196
+ /* @__PURE__ */ jsx(
1197
+ Button,
1198
+ {
1199
+ size: "icon",
1200
+ ...sx("h-6 w-6"),
1201
+ onClick: handleCreateFile,
1202
+ children: /* @__PURE__ */ jsx(Check, { style: css("h-3 w-3") })
1203
+ }
1204
+ )
1205
+ ] }) : /* @__PURE__ */ jsx(
1206
+ Button,
1207
+ {
1208
+ variant: "ghost",
1209
+ size: "icon",
1210
+ ...sx("h-6 w-6"),
1211
+ onClick: () => setIsCreating(true),
1212
+ children: "+"
1213
+ }
1214
+ ) })
1215
+ ]
1216
+ }
1217
+ );
1218
+ }
1219
+ );
1220
+ FileTabs.displayName = "FileTabs";
1221
+ var AICode = React10.forwardRef(
1222
+ ({
1223
+ value,
1224
+ defaultValue = "",
1225
+ language = "typescript",
1226
+ theme: themeProp = "auto",
1227
+ height = "500px",
1228
+ onGenerate,
1229
+ onExplain,
1230
+ onRefactor,
1231
+ onDebug,
1232
+ onTest,
1233
+ onDocument,
1234
+ onReview,
1235
+ onSecurityScan,
1236
+ onChange,
1237
+ features = [
1238
+ "generate",
1239
+ "explain",
1240
+ "refactor",
1241
+ "debug",
1242
+ "test",
1243
+ "document",
1244
+ "review"
1245
+ ],
1246
+ showMinimap = false,
1247
+ showLineNumbers = true,
1248
+ isGenerating = false,
1249
+ multiFileSupport = false,
1250
+ files = [{ name: "main.ts", content: defaultValue, language }],
1251
+ activeFile,
1252
+ onFileChange,
1253
+ onFileCreate,
1254
+ placeholder = "Ask AI to generate code or explain existing code...",
1255
+ className,
1256
+ ...props
1257
+ }, ref) => {
1258
+ const { theme: systemTheme } = useTheme();
1259
+ const [editorValue, setEditorValue] = React10.useState(value || defaultValue);
1260
+ const [currentLanguage, setCurrentLanguage] = React10.useState(language);
1261
+ const [explanations, setExplanations] = React10.useState([]);
1262
+ const [suggestions, setSuggestions] = React10.useState([]);
1263
+ const [securityIssues, setSecurityIssues] = React10.useState(
1264
+ []
1265
+ );
1266
+ const [messages, setMessages] = React10.useState([]);
1267
+ const [currentFiles, setCurrentFiles] = React10.useState(files);
1268
+ const [currentActiveFile, setCurrentActiveFile] = React10.useState(
1269
+ activeFile || files[0]?.name
1270
+ );
1271
+ const [showSidePanel, setShowSidePanel] = React10.useState(true);
1272
+ const [sidePanelTab, setSidePanelTab] = React10.useState("chat");
1273
+ const [isProcessing, setIsProcessing] = React10.useState(false);
1274
+ const [progress, setProgress] = React10.useState(0);
1275
+ const editorRef = React10.useRef(null);
1276
+ const currentFile = React10.useMemo(() => {
1277
+ return currentFiles.find((f) => f.name === currentActiveFile) || currentFiles[0];
1278
+ }, [currentFiles, currentActiveFile]);
1279
+ React10.useEffect(() => {
1280
+ if (currentFile) {
1281
+ setEditorValue(currentFile.content);
1282
+ setCurrentLanguage(
1283
+ currentFile.language || getLanguageFromFile(currentFile.name)
1284
+ );
1285
+ }
1286
+ }, [currentFile]);
1287
+ React10.useEffect(() => {
1288
+ if (value !== void 0) {
1289
+ setEditorValue(value);
1290
+ }
1291
+ }, [value]);
1292
+ const resolveTheme = React10.useMemo(() => {
1293
+ if (themeProp === "auto") {
1294
+ return systemTheme === "dark" ? "vs-dark" : "light";
1295
+ }
1296
+ return themeProp === "dark" ? "vs-dark" : "light";
1297
+ }, [themeProp, systemTheme]);
1298
+ const getLanguageFromFile = React10.useCallback((fileName) => {
1299
+ for (const [lang, pattern] of Object.entries(languagePatterns)) {
1300
+ if (pattern.test(fileName)) {
1301
+ return lang;
1302
+ }
1303
+ }
1304
+ return "plaintext";
1305
+ }, []);
1306
+ const handleEditorChange = React10.useCallback(
1307
+ (newValue) => {
1308
+ const content = newValue || "";
1309
+ setEditorValue(content);
1310
+ onChange?.(content);
1311
+ if (multiFileSupport && currentActiveFile) {
1312
+ setCurrentFiles(
1313
+ (prev) => prev.map(
1314
+ (f) => f.name === currentActiveFile ? { ...f, content } : f
1315
+ )
1316
+ );
1317
+ }
1318
+ },
1319
+ [onChange, multiFileSupport, currentActiveFile]
1320
+ );
1321
+ const handleEditorMount = React10.useCallback(
1322
+ (editor, monaco) => {
1323
+ editorRef.current = editor;
1324
+ monaco.languages.registerHoverProvider(currentLanguage, {
1325
+ provideHover: (model, position) => {
1326
+ const line = position.lineNumber;
1327
+ const explanation = explanations.find((e) => e.line === line);
1328
+ if (explanation) {
1329
+ return {
1330
+ range: new monaco.Range(line, 1, line, 1),
1331
+ contents: [
1332
+ { value: `**${explanation.type.toUpperCase()}**` },
1333
+ { value: explanation.content }
1334
+ ]
1335
+ };
1336
+ }
1337
+ return null;
1338
+ }
1339
+ });
1340
+ monaco.languages.registerCodeActionProvider(currentLanguage, {
1341
+ provideCodeActions: (model, range, context, token) => {
1342
+ const actions = suggestions.filter(
1343
+ (s) => s.startLine && s.endLine && range.startLineNumber >= s.startLine && range.endLineNumber <= s.endLine
1344
+ ).map((suggestion) => ({
1345
+ title: suggestion.title,
1346
+ kind: "quickfix",
1347
+ edit: suggestion.code ? {
1348
+ edits: [
1349
+ {
1350
+ resource: model.uri,
1351
+ edit: {
1352
+ range: new monaco.Range(
1353
+ suggestion.startLine,
1354
+ 1,
1355
+ suggestion.endLine,
1356
+ model.getLineMaxColumn(suggestion.endLine)
1357
+ ),
1358
+ text: suggestion.code
1359
+ }
1360
+ }
1361
+ ]
1362
+ } : void 0
1363
+ }));
1364
+ return { actions, dispose: () => {
1365
+ } };
1366
+ }
1367
+ });
1368
+ },
1369
+ [currentLanguage, explanations, suggestions]
1370
+ );
1371
+ const handleGenerate = React10.useCallback(
1372
+ async (prompt) => {
1373
+ if (!onGenerate) return;
1374
+ setIsProcessing(true);
1375
+ setProgress(0);
1376
+ try {
1377
+ const progressInterval = setInterval(() => {
1378
+ setProgress((prev) => Math.min(prev + 10, 90));
1379
+ }, 200);
1380
+ const newMessage = {
1381
+ id: Date.now().toString(),
1382
+ content: prompt,
1383
+ role: "user",
1384
+ timestamp: /* @__PURE__ */ new Date(),
1385
+ type: "prompt"
1386
+ };
1387
+ setMessages((prev) => [...prev, newMessage]);
1388
+ const generatedCode = await onGenerate(prompt);
1389
+ clearInterval(progressInterval);
1390
+ setProgress(100);
1391
+ setEditorValue(generatedCode);
1392
+ onChange?.(generatedCode);
1393
+ const responseMessage = {
1394
+ id: (Date.now() + 1).toString(),
1395
+ content: generatedCode,
1396
+ role: "assistant",
1397
+ timestamp: /* @__PURE__ */ new Date(),
1398
+ type: "code"
1399
+ };
1400
+ setMessages((prev) => [...prev, responseMessage]);
1401
+ if (multiFileSupport && currentActiveFile) {
1402
+ setCurrentFiles(
1403
+ (prev) => prev.map(
1404
+ (f) => f.name === currentActiveFile ? { ...f, content: generatedCode } : f
1405
+ )
1406
+ );
1407
+ }
1408
+ } catch (error) {
1409
+ console.error("Failed to generate code:", error);
1410
+ toast.error("Failed to generate code", {
1411
+ description: "Please try again",
1412
+ action: {
1413
+ label: "Retry",
1414
+ onClick: () => handleGenerate(prompt)
1415
+ }
1416
+ });
1417
+ } finally {
1418
+ setIsProcessing(false);
1419
+ setProgress(0);
1420
+ }
1421
+ },
1422
+ [onGenerate, onChange, multiFileSupport, currentActiveFile]
1423
+ );
1424
+ const handleExplain = React10.useCallback(
1425
+ async (selectedLine) => {
1426
+ if (!onExplain) return;
1427
+ setIsProcessing(true);
1428
+ try {
1429
+ const explanationsResult = await onExplain(editorValue, selectedLine);
1430
+ setExplanations(explanationsResult);
1431
+ setSidePanelTab("suggestions");
1432
+ } catch (error) {
1433
+ console.error("Failed to explain code:", error);
1434
+ toast.error("Failed to explain code", {
1435
+ description: "Please try again"
1436
+ });
1437
+ } finally {
1438
+ setIsProcessing(false);
1439
+ }
1440
+ },
1441
+ [onExplain, editorValue]
1442
+ );
1443
+ const handleFeatureAction = React10.useCallback(
1444
+ async (feature) => {
1445
+ if (isProcessing) return;
1446
+ setIsProcessing(true);
1447
+ try {
1448
+ switch (feature) {
1449
+ case "refactor":
1450
+ if (onRefactor) {
1451
+ const refactoredCode = await onRefactor(editorValue);
1452
+ setEditorValue(refactoredCode);
1453
+ onChange?.(refactoredCode);
1454
+ }
1455
+ break;
1456
+ case "debug":
1457
+ if (onDebug) {
1458
+ const debugSuggestions = await onDebug(editorValue);
1459
+ setSuggestions(debugSuggestions);
1460
+ setSidePanelTab("suggestions");
1461
+ }
1462
+ break;
1463
+ case "test":
1464
+ if (onTest) {
1465
+ const testCode = await onTest(editorValue);
1466
+ const testMessage = {
1467
+ id: Date.now().toString(),
1468
+ content: testCode,
1469
+ role: "assistant",
1470
+ timestamp: /* @__PURE__ */ new Date(),
1471
+ type: "code"
1472
+ };
1473
+ setMessages((prev) => [...prev, testMessage]);
1474
+ setSidePanelTab("chat");
1475
+ }
1476
+ break;
1477
+ case "document":
1478
+ if (onDocument) {
1479
+ const documentation = await onDocument(editorValue);
1480
+ const docMessage = {
1481
+ id: Date.now().toString(),
1482
+ content: documentation,
1483
+ role: "assistant",
1484
+ timestamp: /* @__PURE__ */ new Date(),
1485
+ type: "explanation"
1486
+ };
1487
+ setMessages((prev) => [...prev, docMessage]);
1488
+ setSidePanelTab("chat");
1489
+ }
1490
+ break;
1491
+ case "review":
1492
+ if (onReview) {
1493
+ const reviewSuggestions = await onReview(editorValue);
1494
+ setSuggestions(reviewSuggestions);
1495
+ setSidePanelTab("suggestions");
1496
+ }
1497
+ break;
1498
+ }
1499
+ } catch (error) {
1500
+ console.error(`Failed to ${feature}:`, error);
1501
+ } finally {
1502
+ setIsProcessing(false);
1503
+ }
1504
+ },
1505
+ [
1506
+ isProcessing,
1507
+ editorValue,
1508
+ onRefactor,
1509
+ onDebug,
1510
+ onTest,
1511
+ onDocument,
1512
+ onReview,
1513
+ onChange
1514
+ ]
1515
+ );
1516
+ const handleSecurityScan = React10.useCallback(async () => {
1517
+ if (!onSecurityScan) return;
1518
+ setIsProcessing(true);
1519
+ try {
1520
+ const issues = await onSecurityScan(editorValue);
1521
+ setSecurityIssues(issues);
1522
+ setSidePanelTab("security");
1523
+ } catch (error) {
1524
+ console.error("Failed to scan for security issues:", error);
1525
+ toast.error("Security scan failed", {
1526
+ description: "Please try again"
1527
+ });
1528
+ } finally {
1529
+ setIsProcessing(false);
1530
+ }
1531
+ }, [onSecurityScan, editorValue]);
1532
+ const handleFileChange = React10.useCallback(
1533
+ (fileName) => {
1534
+ setCurrentActiveFile(fileName);
1535
+ onFileChange?.(fileName);
1536
+ },
1537
+ [onFileChange]
1538
+ );
1539
+ const handleFileCreate = React10.useCallback(
1540
+ (fileName) => {
1541
+ const newFile = {
1542
+ name: fileName,
1543
+ content: "",
1544
+ language: getLanguageFromFile(fileName)
1545
+ };
1546
+ setCurrentFiles((prev) => [...prev, newFile]);
1547
+ setCurrentActiveFile(fileName);
1548
+ onFileCreate?.(fileName, "");
1549
+ },
1550
+ [getLanguageFromFile, onFileCreate]
1551
+ );
1552
+ const handleFileDelete = React10.useCallback(
1553
+ (fileName) => {
1554
+ if (currentFiles.length <= 1) return;
1555
+ setCurrentFiles((prev) => prev.filter((f) => f.name !== fileName));
1556
+ if (currentActiveFile === fileName) {
1557
+ const remainingFiles = currentFiles.filter((f) => f.name !== fileName);
1558
+ setCurrentActiveFile(remainingFiles[0]?.name);
1559
+ }
1560
+ },
1561
+ [currentFiles, currentActiveFile]
1562
+ );
1563
+ return /* @__PURE__ */ jsx(TooltipProvider, { delay: 0, children: /* @__PURE__ */ jsxs(
1564
+ Box,
1565
+ {
1566
+ ref,
1567
+ className: cn(
1568
+ "flex h-full w-full flex-col overflow-hidden rounded-lg border bg-background",
1569
+ className
1570
+ ),
1571
+ ...props,
1572
+ children: [
1573
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center justify-between border-b bg-muted/50 p-2", children: [
1574
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", children: [
1575
+ features.map((feature) => {
1576
+ const Icon = featureIcons[feature];
1577
+ const isActive = feature === "explain" && explanations.length > 0;
1578
+ return /* @__PURE__ */ jsxs(Tooltip$2, { children: [
1579
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1580
+ Button,
1581
+ {
1582
+ variant: isActive ? "secondary" : "ghost",
1583
+ size: "sm",
1584
+ ...sx("h-8 gap-1.5 px-2"),
1585
+ onClick: () => {
1586
+ if (feature === "explain") {
1587
+ handleExplain();
1588
+ } else {
1589
+ handleFeatureAction(feature);
1590
+ }
1591
+ },
1592
+ disabled: isProcessing,
1593
+ children: [
1594
+ /* @__PURE__ */ jsx(Icon, { style: css("h-3 w-3") }),
1595
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs capitalize", children: feature })
1596
+ ]
1597
+ }
1598
+ ) }),
1599
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsxs("p", { children: [
1600
+ "AI ",
1601
+ feature,
1602
+ " assistance"
1603
+ ] }) })
1604
+ ] }, feature);
1605
+ }),
1606
+ /* @__PURE__ */ jsx(Separator, { orientation: "vertical", ...sx("h-4") }),
1607
+ /* @__PURE__ */ jsxs(Tooltip$2, { children: [
1608
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
1609
+ Button,
1610
+ {
1611
+ variant: "ghost",
1612
+ size: "sm",
1613
+ ...sx("h-8 gap-1.5 px-2"),
1614
+ onClick: handleSecurityScan,
1615
+ disabled: isProcessing,
1616
+ children: [
1617
+ /* @__PURE__ */ jsx(Shield, { style: css("h-3 w-3") }),
1618
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs", children: "Security" })
1619
+ ]
1620
+ }
1621
+ ) }),
1622
+ /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: "Scan for security vulnerabilities" }) })
1623
+ ] })
1624
+ ] }),
1625
+ /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
1626
+ isProcessing && /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-2", children: [
1627
+ /* @__PURE__ */ jsx(Loader2, { style: css("h-3 w-3 animate-spin") }),
1628
+ /* @__PURE__ */ jsx(Box, { tag: "span", className: "text-xs text-muted-foreground", children: "Processing..." }),
1629
+ progress > 0 && /* @__PURE__ */ jsx(Progress, { value: progress, ...sx("w-16 h-1") })
1630
+ ] }),
1631
+ /* @__PURE__ */ jsx(
1632
+ Button,
1633
+ {
1634
+ variant: "ghost",
1635
+ size: "sm",
1636
+ ...sx("h-8"),
1637
+ onClick: () => setShowSidePanel(!showSidePanel),
1638
+ children: showSidePanel ? /* @__PURE__ */ jsx(EyeOff, { style: css("h-3 w-3") }) : /* @__PURE__ */ jsx(Eye, { style: css("h-3 w-3") })
1639
+ }
1640
+ ),
1641
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1642
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", ...sx("h-8 gap-1"), children: [
1643
+ /* @__PURE__ */ jsx(Settings, { style: css("h-3 w-3") }),
1644
+ /* @__PURE__ */ jsx(ChevronDown, { style: css("h-3 w-3") })
1645
+ ] }) }),
1646
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
1647
+ /* @__PURE__ */ jsx(
1648
+ DropdownMenuCheckboxItem,
1649
+ {
1650
+ checked: showMinimap,
1651
+ onCheckedChange: (checked) => {
1652
+ },
1653
+ children: "Show Minimap"
1654
+ }
1655
+ ),
1656
+ /* @__PURE__ */ jsx(
1657
+ DropdownMenuCheckboxItem,
1658
+ {
1659
+ checked: showLineNumbers,
1660
+ onCheckedChange: (checked) => {
1661
+ },
1662
+ children: "Show Line Numbers"
1663
+ }
1664
+ ),
1665
+ /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
1666
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
1667
+ /* @__PURE__ */ jsx(Download, { style: css("mr-2 h-3 w-3") }),
1668
+ "Export Code"
1669
+ ] }),
1670
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { children: [
1671
+ /* @__PURE__ */ jsx(Upload, { style: css("mr-2 h-3 w-3") }),
1672
+ "Import Code"
1673
+ ] })
1674
+ ] })
1675
+ ] })
1676
+ ] })
1677
+ ] }),
1678
+ multiFileSupport && /* @__PURE__ */ jsx(
1679
+ FileTabs,
1680
+ {
1681
+ files: currentFiles,
1682
+ activeFile: currentActiveFile,
1683
+ onFileChange: handleFileChange,
1684
+ onFileCreate: onFileCreate ? handleFileCreate : void 0,
1685
+ onFileDelete: currentFiles.length > 1 ? handleFileDelete : void 0
1686
+ }
1687
+ ),
1688
+ /* @__PURE__ */ jsxs(ResizablePanelGroup, { direction: "horizontal", className: "flex-1", children: [
1689
+ /* @__PURE__ */ jsx(ResizablePanel, { defaultSize: showSidePanel ? 70 : 100, minSize: 30, children: /* @__PURE__ */ jsx(Box, { className: "h-full", children: /* @__PURE__ */ jsx(
1690
+ Editor,
1691
+ {
1692
+ height,
1693
+ language: currentLanguage,
1694
+ value: editorValue,
1695
+ theme: resolveTheme,
1696
+ onChange: handleEditorChange,
1697
+ onMount: handleEditorMount,
1698
+ options: {
1699
+ readOnly: isGenerating || isProcessing,
1700
+ lineNumbers: showLineNumbers ? "on" : "off",
1701
+ minimap: { enabled: showMinimap },
1702
+ wordWrap: "on",
1703
+ fontSize: 14,
1704
+ scrollBeyondLastLine: false,
1705
+ automaticLayout: true,
1706
+ tabSize: 2,
1707
+ insertSpaces: true,
1708
+ formatOnPaste: true,
1709
+ formatOnType: true,
1710
+ quickSuggestions: true,
1711
+ parameterHints: { enabled: true },
1712
+ suggestOnTriggerCharacters: true,
1713
+ acceptSuggestionOnEnter: "on",
1714
+ accessibilitySupport: "auto",
1715
+ scrollbar: {
1716
+ vertical: "auto",
1717
+ horizontal: "auto",
1718
+ verticalScrollbarSize: 10,
1719
+ horizontalScrollbarSize: 10
1720
+ },
1721
+ padding: {
1722
+ top: 16,
1723
+ bottom: 16
1724
+ }
1725
+ }
1726
+ }
1727
+ ) }) }),
1728
+ showSidePanel && /* @__PURE__ */ jsxs(Fragment, { children: [
1729
+ /* @__PURE__ */ jsx(ResizableHandle, {}),
1730
+ /* @__PURE__ */ jsx(ResizablePanel, { defaultSize: 30, minSize: 20, maxSize: 50, children: /* @__PURE__ */ jsxs(
1731
+ Tabs,
1732
+ {
1733
+ value: sidePanelTab,
1734
+ onValueChange: (value2) => setSidePanelTab(value2),
1735
+ children: [
1736
+ /* @__PURE__ */ jsxs(TabsList, { ...sx("grid w-full grid-cols-3"), children: [
1737
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "chat", ...sx("text-xs"), children: [
1738
+ /* @__PURE__ */ jsx(MessageSquare, { style: css("h-3 w-3 mr-1") }),
1739
+ "Chat"
1740
+ ] }),
1741
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "suggestions", ...sx("text-xs"), children: [
1742
+ /* @__PURE__ */ jsx(Zap, { style: css("h-3 w-3 mr-1") }),
1743
+ "AI",
1744
+ suggestions.length > 0 && /* @__PURE__ */ jsx(
1745
+ Badge,
1746
+ {
1747
+ colorPalette: "gray",
1748
+ ...sx("ml-1 h-4 text-xs"),
1749
+ children: suggestions.length
1750
+ }
1751
+ )
1752
+ ] }),
1753
+ /* @__PURE__ */ jsxs(TabsTrigger, { value: "security", ...sx("text-xs"), children: [
1754
+ /* @__PURE__ */ jsx(Shield, { style: css("h-3 w-3 mr-1") }),
1755
+ "Security",
1756
+ securityIssues.length > 0 && /* @__PURE__ */ jsx(
1757
+ Badge,
1758
+ {
1759
+ colorPalette: securityIssues.some(
1760
+ (i) => i.severity === "critical"
1761
+ ) ? "red" : "gray",
1762
+ ...sx("ml-1 h-4 text-xs"),
1763
+ children: securityIssues.length
1764
+ }
1765
+ )
1766
+ ] })
1767
+ ] }),
1768
+ /* @__PURE__ */ jsx(TabsContent, { value: "chat", ...sx("h-[calc(100%-40px)]"), children: /* @__PURE__ */ jsx(
1769
+ ChatPanel,
1770
+ {
1771
+ messages,
1772
+ onSendMessage: handleGenerate,
1773
+ isGenerating: isGenerating || isProcessing,
1774
+ placeholder
1775
+ }
1776
+ ) }),
1777
+ /* @__PURE__ */ jsx(
1778
+ TabsContent,
1779
+ {
1780
+ value: "suggestions",
1781
+ ...sx("h-[calc(100%-40px)] overflow-hidden"),
1782
+ children: /* @__PURE__ */ jsx(ScrollArea, { ...sx("h-full p-3"), children: /* @__PURE__ */ jsx(
1783
+ SuggestionsPanel,
1784
+ {
1785
+ suggestions,
1786
+ onApplySuggestion: (suggestion) => {
1787
+ if (suggestion.code) {
1788
+ setEditorValue(suggestion.code);
1789
+ onChange?.(suggestion.code);
1790
+ }
1791
+ }
1792
+ }
1793
+ ) })
1794
+ }
1795
+ ),
1796
+ /* @__PURE__ */ jsx(
1797
+ TabsContent,
1798
+ {
1799
+ value: "security",
1800
+ ...sx("h-[calc(100%-40px)] overflow-hidden"),
1801
+ children: /* @__PURE__ */ jsx(ScrollArea, { ...sx("h-full p-3"), children: /* @__PURE__ */ jsx(
1802
+ SecurityPanel,
1803
+ {
1804
+ issues: securityIssues,
1805
+ onFixIssue: (issue) => {
1806
+ if (issue.fix && editorRef.current) {
1807
+ const model = editorRef.current.getModel();
1808
+ if (model) {
1809
+ const line = model.getLineContent(issue.line);
1810
+ const newLine = issue.fix;
1811
+ editorRef.current.executeEdits("security-fix", [
1812
+ {
1813
+ range: {
1814
+ startLineNumber: issue.line,
1815
+ startColumn: 1,
1816
+ endLineNumber: issue.line,
1817
+ endColumn: line.length + 1
1818
+ },
1819
+ text: newLine
1820
+ }
1821
+ ]);
1822
+ }
1823
+ }
1824
+ }
1825
+ }
1826
+ ) })
1827
+ }
1828
+ )
1829
+ ]
1830
+ }
1831
+ ) })
1832
+ ] })
1833
+ ] })
1834
+ ]
1835
+ }
1836
+ ) });
1837
+ }
1838
+ );
1839
+ AICode.displayName = "AICode";
1840
+
1841
+ export { AICode };