@luxfi/ui 8.0.0 → 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 (744) hide show
  1. package/dist/3d-button.cjs +298 -0
  2. package/dist/3d-button.d.ts +52 -0
  3. package/dist/3d-button.d.ts.map +1 -0
  4. package/dist/3d-button.js +273 -0
  5. package/dist/3d-card.cjs +236 -0
  6. package/dist/3d-card.d.ts +29 -0
  7. package/dist/3d-card.d.ts.map +1 -0
  8. package/dist/3d-card.js +209 -0
  9. package/dist/3d-carousel.cjs +375 -0
  10. package/dist/3d-carousel.d.ts +26 -0
  11. package/dist/3d-carousel.d.ts.map +1 -0
  12. package/dist/3d-carousel.js +348 -0
  13. package/dist/3d-grid.cjs +360 -0
  14. package/dist/3d-grid.d.ts +49 -0
  15. package/dist/3d-grid.d.ts.map +1 -0
  16. package/dist/3d-grid.js +335 -0
  17. package/dist/3d-marquee.cjs +8669 -0
  18. package/dist/3d-marquee.d.ts +65 -0
  19. package/dist/3d-marquee.d.ts.map +1 -0
  20. package/dist/3d-marquee.js +8645 -0
  21. package/dist/3d-model-viewer.cjs +909 -0
  22. package/dist/3d-model-viewer.d.ts +45 -0
  23. package/dist/3d-model-viewer.d.ts.map +1 -0
  24. package/dist/3d-model-viewer.js +886 -0
  25. package/dist/3d-pin.cjs +46 -0
  26. package/dist/3d-pin.d.ts +8 -0
  27. package/dist/3d-pin.d.ts.map +1 -0
  28. package/dist/3d-pin.js +24 -0
  29. package/dist/3d-scene.cjs +439 -0
  30. package/dist/3d-scene.d.ts +76 -0
  31. package/dist/3d-scene.d.ts.map +1 -0
  32. package/dist/3d-scene.js +407 -0
  33. package/dist/3d-text.cjs +367 -0
  34. package/dist/3d-text.d.ts +62 -0
  35. package/dist/3d-text.d.ts.map +1 -0
  36. package/dist/3d-text.js +341 -0
  37. package/dist/advanced-chart.cjs +53 -0
  38. package/dist/advanced-chart.d.ts +6 -0
  39. package/dist/advanced-chart.d.ts.map +1 -0
  40. package/dist/advanced-chart.js +51 -0
  41. package/dist/advanced-navigation-bar.cjs +459 -0
  42. package/dist/advanced-navigation-bar.d.ts +14 -0
  43. package/dist/advanced-navigation-bar.d.ts.map +1 -0
  44. package/dist/advanced-navigation-bar.js +437 -0
  45. package/dist/ai-actions.cjs +57 -0
  46. package/dist/ai-actions.d.ts +14 -0
  47. package/dist/ai-actions.d.ts.map +1 -0
  48. package/dist/ai-actions.js +35 -0
  49. package/dist/ai-agents.cjs +1764 -0
  50. package/dist/ai-agents.d.ts +56 -0
  51. package/dist/ai-agents.d.ts.map +1 -0
  52. package/dist/ai-agents.js +1740 -0
  53. package/dist/ai-assistant.cjs +907 -0
  54. package/dist/ai-assistant.d.ts +28 -0
  55. package/dist/ai-assistant.d.ts.map +1 -0
  56. package/dist/ai-assistant.js +886 -0
  57. package/dist/ai-chat.cjs +1165 -0
  58. package/dist/ai-chat.d.ts +56 -0
  59. package/dist/ai-chat.d.ts.map +1 -0
  60. package/dist/ai-chat.js +1141 -0
  61. package/dist/ai-code.cjs +1866 -0
  62. package/dist/ai-code.d.ts +58 -0
  63. package/dist/ai-code.d.ts.map +1 -0
  64. package/dist/ai-code.js +1841 -0
  65. package/dist/ai-model-selector-navigation-bar.cjs +59 -0
  66. package/dist/ai-model-selector-navigation-bar.d.ts +15 -0
  67. package/dist/ai-model-selector-navigation-bar.d.ts.map +1 -0
  68. package/dist/ai-model-selector-navigation-bar.js +37 -0
  69. package/dist/ai-models.cjs +41 -0
  70. package/dist/ai-models.d.ts +15 -0
  71. package/dist/ai-models.d.ts.map +1 -0
  72. package/dist/ai-models.js +19 -0
  73. package/dist/ai-playground.cjs +1110 -0
  74. package/dist/ai-playground.d.ts +66 -0
  75. package/dist/ai-playground.d.ts.map +1 -0
  76. package/dist/ai-playground.js +1088 -0
  77. package/dist/ai-tools.cjs +1043 -0
  78. package/dist/ai-tools.d.ts +23 -0
  79. package/dist/ai-tools.d.ts.map +1 -0
  80. package/dist/ai-tools.js +1022 -0
  81. package/dist/ai-vision.cjs +1831 -0
  82. package/dist/ai-vision.d.ts +74 -0
  83. package/dist/ai-vision.d.ts.map +1 -0
  84. package/dist/ai-vision.js +1810 -0
  85. package/dist/ai-voice-settings.cjs +1511 -0
  86. package/dist/ai-voice-settings.d.ts +100 -0
  87. package/dist/ai-voice-settings.d.ts.map +1 -0
  88. package/dist/ai-voice-settings.js +1478 -0
  89. package/dist/ai-voice.cjs +1522 -0
  90. package/dist/ai-voice.d.ts +72 -0
  91. package/dist/ai-voice.d.ts.map +1 -0
  92. package/dist/ai-voice.js +1501 -0
  93. package/dist/alert.cjs +13 -142
  94. package/dist/alert.js +14 -143
  95. package/dist/android.cjs +127 -0
  96. package/dist/android.d.ts +19 -0
  97. package/dist/android.d.ts.map +1 -0
  98. package/dist/android.js +104 -0
  99. package/dist/animated-background.cjs +8830 -0
  100. package/dist/animated-background.d.ts +103 -0
  101. package/dist/animated-background.d.ts.map +1 -0
  102. package/dist/animated-background.js +8824 -0
  103. package/dist/animated-beam.cjs +8438 -0
  104. package/dist/animated-beam.d.ts +15 -0
  105. package/dist/animated-beam.d.ts.map +1 -0
  106. package/dist/animated-beam.js +8417 -0
  107. package/dist/animated-cursor.cjs +269 -0
  108. package/dist/animated-cursor.d.ts +70 -0
  109. package/dist/animated-cursor.d.ts.map +1 -0
  110. package/dist/animated-cursor.js +264 -0
  111. package/dist/animated-icon.cjs +8927 -0
  112. package/dist/animated-icon.d.ts +119 -0
  113. package/dist/animated-icon.d.ts.map +1 -0
  114. package/dist/animated-icon.js +8902 -0
  115. package/dist/animated-list.cjs +9226 -0
  116. package/dist/animated-list.d.ts +126 -0
  117. package/dist/animated-list.d.ts.map +1 -0
  118. package/dist/animated-list.js +9201 -0
  119. package/dist/animated-number.cjs +8773 -0
  120. package/dist/animated-number.d.ts +127 -0
  121. package/dist/animated-number.d.ts.map +1 -0
  122. package/dist/animated-number.js +8767 -0
  123. package/dist/animated-testimonials.cjs +8653 -0
  124. package/dist/animated-testimonials.d.ts +17 -0
  125. package/dist/animated-testimonials.d.ts.map +1 -0
  126. package/dist/animated-testimonials.js +8632 -0
  127. package/dist/animated-text.cjs +8914 -0
  128. package/dist/animated-text.d.ts +65 -0
  129. package/dist/animated-text.d.ts.map +1 -0
  130. package/dist/animated-text.js +8890 -0
  131. package/dist/animated-tooltip.cjs +8624 -0
  132. package/dist/animated-tooltip.d.ts +9 -0
  133. package/dist/animated-tooltip.d.ts.map +1 -0
  134. package/dist/animated-tooltip.js +8603 -0
  135. package/dist/announcement.cjs +465 -0
  136. package/dist/announcement.d.ts +9 -0
  137. package/dist/announcement.d.ts.map +1 -0
  138. package/dist/announcement.js +443 -0
  139. package/dist/app-switcher-navigation-bar.cjs +470 -0
  140. package/dist/app-switcher-navigation-bar.d.ts +15 -0
  141. package/dist/app-switcher-navigation-bar.d.ts.map +1 -0
  142. package/dist/app-switcher-navigation-bar.js +448 -0
  143. package/dist/apple-cards-carousel.cjs +9356 -0
  144. package/dist/apple-cards-carousel.d.ts +36 -0
  145. package/dist/apple-cards-carousel.d.ts.map +1 -0
  146. package/dist/apple-cards-carousel.js +9334 -0
  147. package/dist/apple-hello-effect.cjs +8380 -0
  148. package/dist/apple-hello-effect.d.ts +8 -0
  149. package/dist/apple-hello-effect.d.ts.map +1 -0
  150. package/dist/apple-hello-effect.js +8359 -0
  151. package/dist/auth.cjs +6 -5
  152. package/dist/auth.d.ts.map +1 -1
  153. package/dist/auth.js +6 -5
  154. package/dist/badge.cjs +28 -164
  155. package/dist/badge.d.ts +2 -5
  156. package/dist/badge.d.ts.map +1 -1
  157. package/dist/badge.js +29 -165
  158. package/dist/bank.d.ts +6 -6
  159. package/dist/banner.cjs +78 -0
  160. package/dist/banner.d.ts +20 -0
  161. package/dist/banner.d.ts.map +1 -0
  162. package/dist/banner.js +55 -0
  163. package/dist/breadcrumb-and-filters-navigation-bar.cjs +51 -0
  164. package/dist/breadcrumb-and-filters-navigation-bar.d.ts +10 -0
  165. package/dist/breadcrumb-and-filters-navigation-bar.d.ts.map +1 -0
  166. package/dist/breadcrumb-and-filters-navigation-bar.js +29 -0
  167. package/dist/breadcrumb-navigation-bar.cjs +37 -0
  168. package/dist/breadcrumb-navigation-bar.d.ts +10 -0
  169. package/dist/breadcrumb-navigation-bar.d.ts.map +1 -0
  170. package/dist/breadcrumb-navigation-bar.js +15 -0
  171. package/dist/button.cjs +21 -150
  172. package/dist/button.d.ts +1 -1
  173. package/dist/button.d.ts.map +1 -1
  174. package/dist/button.js +21 -150
  175. package/dist/calendar.cjs +55 -0
  176. package/dist/calendar.d.ts +9 -0
  177. package/dist/calendar.d.ts.map +1 -0
  178. package/dist/calendar.js +53 -0
  179. package/dist/centered-logo-navigation-bar.cjs +37 -0
  180. package/dist/centered-logo-navigation-bar.d.ts +15 -0
  181. package/dist/centered-logo-navigation-bar.d.ts.map +1 -0
  182. package/dist/centered-logo-navigation-bar.js +15 -0
  183. package/dist/chart.cjs +266 -0
  184. package/dist/chart.d.ts +52 -0
  185. package/dist/chart.d.ts.map +1 -0
  186. package/dist/chart.js +238 -0
  187. package/dist/choicebox.cjs +77 -0
  188. package/dist/choicebox.d.ts +15 -0
  189. package/dist/choicebox.d.ts.map +1 -0
  190. package/dist/choicebox.js +55 -0
  191. package/dist/chrome.cjs +36 -30
  192. package/dist/chrome.d.ts.map +1 -1
  193. package/dist/chrome.js +37 -31
  194. package/dist/code-block.cjs +871 -0
  195. package/dist/code-block.d.ts +38 -0
  196. package/dist/code-block.d.ts.map +1 -0
  197. package/dist/code-block.js +849 -0
  198. package/dist/code-compare.cjs +1714 -0
  199. package/dist/code-compare.d.ts +46 -0
  200. package/dist/code-compare.d.ts.map +1 -0
  201. package/dist/code-compare.js +1692 -0
  202. package/dist/code-diff.cjs +1073 -0
  203. package/dist/code-diff.d.ts +42 -0
  204. package/dist/code-diff.d.ts.map +1 -0
  205. package/dist/code-diff.js +1051 -0
  206. package/dist/code-editor.cjs +641 -0
  207. package/dist/code-editor.d.ts +23 -0
  208. package/dist/code-editor.d.ts.map +1 -0
  209. package/dist/code-editor.js +616 -0
  210. package/dist/code-explorer.cjs +729 -0
  211. package/dist/code-explorer.d.ts +41 -0
  212. package/dist/code-explorer.d.ts.map +1 -0
  213. package/dist/code-explorer.js +707 -0
  214. package/dist/code-preview.cjs +1349 -0
  215. package/dist/code-preview.d.ts +38 -0
  216. package/dist/code-preview.d.ts.map +1 -0
  217. package/dist/code-preview.js +1327 -0
  218. package/dist/code-snippet.cjs +920 -0
  219. package/dist/code-snippet.d.ts +48 -0
  220. package/dist/code-snippet.d.ts.map +1 -0
  221. package/dist/code-snippet.js +897 -0
  222. package/dist/code-tabs.cjs +76 -0
  223. package/dist/code-tabs.d.ts +12 -0
  224. package/dist/code-tabs.d.ts.map +1 -0
  225. package/dist/code-tabs.js +54 -0
  226. package/dist/code-terminal.cjs +894 -0
  227. package/dist/code-terminal.d.ts +48 -0
  228. package/dist/code-terminal.d.ts.map +1 -0
  229. package/dist/code-terminal.js +872 -0
  230. package/dist/collaboration-navigation-bar.cjs +49 -0
  231. package/dist/collaboration-navigation-bar.d.ts +11 -0
  232. package/dist/collaboration-navigation-bar.d.ts.map +1 -0
  233. package/dist/collaboration-navigation-bar.js +27 -0
  234. package/dist/collapsible.cjs +34 -155
  235. package/dist/collapsible.d.ts.map +1 -1
  236. package/dist/collapsible.js +34 -155
  237. package/dist/color-picker.cjs +516 -0
  238. package/dist/color-picker.d.ts +10 -0
  239. package/dist/color-picker.d.ts.map +1 -0
  240. package/dist/color-picker.js +495 -0
  241. package/dist/combobox.cjs +488 -0
  242. package/dist/combobox.d.ts +13 -0
  243. package/dist/combobox.d.ts.map +1 -0
  244. package/dist/combobox.js +466 -0
  245. package/dist/communication-navigation-bar.cjs +438 -0
  246. package/dist/communication-navigation-bar.d.ts +7 -0
  247. package/dist/communication-navigation-bar.d.ts.map +1 -0
  248. package/dist/communication-navigation-bar.js +416 -0
  249. package/dist/company-profile.cjs +46 -0
  250. package/dist/company-profile.d.ts +10 -0
  251. package/dist/company-profile.d.ts.map +1 -0
  252. package/dist/company-profile.js +44 -0
  253. package/dist/comparison.cjs +60 -0
  254. package/dist/comparison.d.ts +16 -0
  255. package/dist/comparison.d.ts.map +1 -0
  256. package/dist/comparison.js +38 -0
  257. package/dist/context-switcher-navigation-bar.cjs +51 -0
  258. package/dist/context-switcher-navigation-bar.d.ts +10 -0
  259. package/dist/context-switcher-navigation-bar.d.ts.map +1 -0
  260. package/dist/context-switcher-navigation-bar.js +29 -0
  261. package/dist/credit-card.cjs +77 -0
  262. package/dist/credit-card.d.ts +11 -0
  263. package/dist/credit-card.d.ts.map +1 -0
  264. package/dist/credit-card.js +55 -0
  265. package/dist/crypto-screener.cjs +43 -0
  266. package/dist/crypto-screener.d.ts +4 -0
  267. package/dist/crypto-screener.d.ts.map +1 -0
  268. package/dist/crypto-screener.js +41 -0
  269. package/dist/cursor.cjs +71 -0
  270. package/dist/cursor.d.ts +9 -0
  271. package/dist/cursor.d.ts.map +1 -0
  272. package/dist/cursor.js +49 -0
  273. package/dist/dashboard-navigation-bar.cjs +441 -0
  274. package/dist/dashboard-navigation-bar.d.ts +11 -0
  275. package/dist/dashboard-navigation-bar.d.ts.map +1 -0
  276. package/dist/dashboard-navigation-bar.js +419 -0
  277. package/dist/dialog-stack.cjs +460 -0
  278. package/dist/dialog-stack.d.ts +13 -0
  279. package/dist/dialog-stack.d.ts.map +1 -0
  280. package/dist/dialog-stack.js +438 -0
  281. package/dist/dialog.cjs +12 -11
  282. package/dist/dialog.d.ts +1 -1
  283. package/dist/dialog.d.ts.map +1 -1
  284. package/dist/dialog.js +12 -11
  285. package/dist/direction.cjs +26 -0
  286. package/dist/direction.d.ts +20 -0
  287. package/dist/direction.d.ts.map +1 -0
  288. package/dist/direction.js +23 -0
  289. package/dist/dock.cjs +8675 -0
  290. package/dist/dock.d.ts +20 -0
  291. package/dist/dock.d.ts.map +1 -0
  292. package/dist/dock.js +8653 -0
  293. package/dist/dropzone.cjs +116 -0
  294. package/dist/dropzone.d.ts +11 -0
  295. package/dist/dropzone.d.ts.map +1 -0
  296. package/dist/dropzone.js +94 -0
  297. package/dist/e-commerce-navigation-bar.cjs +442 -0
  298. package/dist/e-commerce-navigation-bar.d.ts +12 -0
  299. package/dist/e-commerce-navigation-bar.d.ts.map +1 -0
  300. package/dist/e-commerce-navigation-bar.js +420 -0
  301. package/dist/editor.cjs +497 -0
  302. package/dist/editor.d.ts +9 -0
  303. package/dist/editor.d.ts.map +1 -0
  304. package/dist/editor.js +475 -0
  305. package/dist/empty.cjs +117 -0
  306. package/dist/empty.d.ts +18 -0
  307. package/dist/empty.d.ts.map +1 -0
  308. package/dist/empty.js +110 -0
  309. package/dist/engine.cjs +91 -0
  310. package/dist/engine.js +86 -0
  311. package/dist/field.cjs +2 -1
  312. package/dist/field.d.ts.map +1 -1
  313. package/dist/field.js +3 -2
  314. package/dist/financials.cjs +66 -0
  315. package/dist/financials.d.ts +12 -0
  316. package/dist/financials.d.ts.map +1 -0
  317. package/dist/financials.js +64 -0
  318. package/dist/forex-screener.cjs +44 -0
  319. package/dist/forex-screener.d.ts +4 -0
  320. package/dist/forex-screener.d.ts.map +1 -0
  321. package/dist/forex-screener.js +42 -0
  322. package/dist/gantt.cjs +65 -0
  323. package/dist/gantt.d.ts +13 -0
  324. package/dist/gantt.d.ts.map +1 -0
  325. package/dist/gantt.js +43 -0
  326. package/dist/grid-pattern.cjs +327 -0
  327. package/dist/grid-pattern.d.ts +111 -0
  328. package/dist/grid-pattern.d.ts.map +1 -0
  329. package/dist/grid-pattern.js +304 -0
  330. package/dist/hooks/use-mobile.d.ts +3 -0
  331. package/dist/hooks/use-mobile.d.ts.map +1 -0
  332. package/dist/icon-button.cjs +13 -142
  333. package/dist/icon-button.js +14 -143
  334. package/dist/icon-navigation-bar.cjs +48 -0
  335. package/dist/icon-navigation-bar.d.ts +11 -0
  336. package/dist/icon-navigation-bar.d.ts.map +1 -0
  337. package/dist/icon-navigation-bar.js +26 -0
  338. package/dist/image-crop.cjs +482 -0
  339. package/dist/image-crop.d.ts +9 -0
  340. package/dist/image-crop.d.ts.map +1 -0
  341. package/dist/image-crop.js +460 -0
  342. package/dist/image-zoom.cjs +77 -0
  343. package/dist/image-zoom.d.ts +7 -0
  344. package/dist/image-zoom.d.ts.map +1 -0
  345. package/dist/image-zoom.js +55 -0
  346. package/dist/image.cjs +15 -143
  347. package/dist/image.d.ts.map +1 -1
  348. package/dist/image.js +16 -144
  349. package/dist/index.cjs +30274 -1201
  350. package/dist/index.d.ts +121 -0
  351. package/dist/index.d.ts.map +1 -1
  352. package/dist/index.js +30006 -1220
  353. package/dist/ink.cjs +17 -0
  354. package/dist/ink.js +15 -0
  355. package/dist/input-otp.cjs +72 -0
  356. package/dist/input-otp.d.ts +35 -0
  357. package/dist/input-otp.d.ts.map +1 -0
  358. package/dist/input-otp.js +47 -0
  359. package/dist/iphone-15-pro.cjs +61 -0
  360. package/dist/iphone-15-pro.d.ts +9 -0
  361. package/dist/iphone-15-pro.d.ts.map +1 -0
  362. package/dist/iphone-15-pro.js +39 -0
  363. package/dist/item.cjs +215 -0
  364. package/dist/item.d.ts +41 -0
  365. package/dist/item.d.ts.map +1 -0
  366. package/dist/item.js +200 -0
  367. package/dist/kanban.cjs +1354 -0
  368. package/dist/kanban.d.ts +36 -0
  369. package/dist/kanban.d.ts.map +1 -0
  370. package/dist/kanban.js +1330 -0
  371. package/dist/kbd.cjs +40 -0
  372. package/dist/kbd.d.ts +4 -0
  373. package/dist/kbd.d.ts.map +1 -0
  374. package/dist/kbd.js +37 -0
  375. package/dist/limelight-nav-navigation-bar.cjs +51 -0
  376. package/dist/limelight-nav-navigation-bar.d.ts +10 -0
  377. package/dist/limelight-nav-navigation-bar.d.ts.map +1 -0
  378. package/dist/limelight-nav-navigation-bar.js +29 -0
  379. package/dist/limelight-nav.cjs +570 -0
  380. package/dist/limelight-nav.d.ts +10 -0
  381. package/dist/limelight-nav.d.ts.map +1 -0
  382. package/dist/limelight-nav.js +549 -0
  383. package/dist/link.cjs +29 -152
  384. package/dist/link.js +30 -153
  385. package/dist/list.cjs +35 -0
  386. package/dist/list.d.ts +5 -0
  387. package/dist/list.d.ts.map +1 -0
  388. package/dist/list.js +12 -0
  389. package/dist/magnetic.cjs +63 -0
  390. package/dist/magnetic.d.ts +8 -0
  391. package/dist/magnetic.d.ts.map +1 -0
  392. package/dist/magnetic.js +41 -0
  393. package/dist/market-overview.cjs +102 -0
  394. package/dist/market-overview.d.ts +4 -0
  395. package/dist/market-overview.d.ts.map +1 -0
  396. package/dist/market-overview.js +100 -0
  397. package/dist/marquee.cjs +67 -0
  398. package/dist/marquee.d.ts +10 -0
  399. package/dist/marquee.d.ts.map +1 -0
  400. package/dist/marquee.js +45 -0
  401. package/dist/menu-dock.cjs +64 -0
  402. package/dist/menu-dock.d.ts +14 -0
  403. package/dist/menu-dock.d.ts.map +1 -0
  404. package/dist/menu-dock.js +42 -0
  405. package/dist/menubar.cjs +116 -0
  406. package/dist/menubar.d.ts +30 -0
  407. package/dist/menubar.d.ts.map +1 -0
  408. package/dist/menubar.js +61 -0
  409. package/dist/message-dock.cjs +480 -0
  410. package/dist/message-dock.d.ts +15 -0
  411. package/dist/message-dock.d.ts.map +1 -0
  412. package/dist/message-dock.js +458 -0
  413. package/dist/mini-calendar.cjs +505 -0
  414. package/dist/mini-calendar.d.ts +10 -0
  415. package/dist/mini-calendar.d.ts.map +1 -0
  416. package/dist/mini-calendar.js +483 -0
  417. package/dist/minimal-tiptap.cjs +48 -0
  418. package/dist/minimal-tiptap.d.ts +8 -0
  419. package/dist/minimal-tiptap.d.ts.map +1 -0
  420. package/dist/minimal-tiptap.js +26 -0
  421. package/dist/motion-highlight.cjs +71 -0
  422. package/dist/motion-highlight.d.ts +7 -0
  423. package/dist/motion-highlight.d.ts.map +1 -0
  424. package/dist/motion-highlight.js +49 -0
  425. package/dist/music-player.cjs +810 -0
  426. package/dist/music-player.d.ts +18 -0
  427. package/dist/music-player.d.ts.map +1 -0
  428. package/dist/music-player.js +788 -0
  429. package/dist/native-select.cjs +82 -0
  430. package/dist/native-select.d.ts +9 -0
  431. package/dist/native-select.d.ts.map +1 -0
  432. package/dist/native-select.js +58 -0
  433. package/dist/news-timeline.cjs +42 -0
  434. package/dist/news-timeline.d.ts +4 -0
  435. package/dist/news-timeline.d.ts.map +1 -0
  436. package/dist/news-timeline.js +40 -0
  437. package/dist/order-entry.cjs +141 -0
  438. package/dist/order-entry.d.ts +15 -0
  439. package/dist/order-entry.d.ts.map +1 -0
  440. package/dist/order-entry.js +136 -0
  441. package/dist/orders-history.cjs +83 -0
  442. package/dist/orders-history.d.ts +18 -0
  443. package/dist/orders-history.d.ts.map +1 -0
  444. package/dist/orders-history.js +78 -0
  445. package/dist/pagination.cjs +132 -0
  446. package/dist/pagination.d.ts +29 -0
  447. package/dist/pagination.d.ts.map +1 -0
  448. package/dist/pagination.js +104 -0
  449. package/dist/particles-background.cjs +159 -0
  450. package/dist/particles-background.d.ts +18 -0
  451. package/dist/particles-background.d.ts.map +1 -0
  452. package/dist/particles-background.js +157 -0
  453. package/dist/pill.cjs +80 -0
  454. package/dist/pill.d.ts +21 -0
  455. package/dist/pill.d.ts.map +1 -0
  456. package/dist/pill.js +57 -0
  457. package/dist/pixel-image.cjs +71 -0
  458. package/dist/pixel-image.d.ts +8 -0
  459. package/dist/pixel-image.d.ts.map +1 -0
  460. package/dist/pixel-image.js +49 -0
  461. package/dist/popover.cjs +11 -9
  462. package/dist/popover.d.ts.map +1 -1
  463. package/dist/popover.js +11 -9
  464. package/dist/positions-list.cjs +98 -0
  465. package/dist/positions-list.d.ts +13 -0
  466. package/dist/positions-list.d.ts.map +1 -0
  467. package/dist/positions-list.js +93 -0
  468. package/dist/progress-circle.cjs +2 -1
  469. package/dist/progress-circle.d.ts.map +1 -1
  470. package/dist/progress-circle.js +2 -1
  471. package/dist/pulse-animation.cjs +8741 -0
  472. package/dist/pulse-animation.d.ts +155 -0
  473. package/dist/pulse-animation.d.ts.map +1 -0
  474. package/dist/pulse-animation.js +8732 -0
  475. package/dist/qr-code.cjs +65 -0
  476. package/dist/qr-code.d.ts +21 -0
  477. package/dist/qr-code.d.ts.map +1 -0
  478. package/dist/qr-code.js +43 -0
  479. package/dist/relative-time.cjs +88 -0
  480. package/dist/relative-time.d.ts +9 -0
  481. package/dist/relative-time.d.ts.map +1 -0
  482. package/dist/relative-time.js +66 -0
  483. package/dist/resizable.cjs +61 -0
  484. package/dist/resizable.d.ts +24 -0
  485. package/dist/resizable.d.ts.map +1 -0
  486. package/dist/resizable.js +37 -0
  487. package/dist/reveal-animation.cjs +8791 -0
  488. package/dist/reveal-animation.d.ts +134 -0
  489. package/dist/reveal-animation.d.ts.map +1 -0
  490. package/dist/reveal-animation.js +8779 -0
  491. package/dist/safari.cjs +90 -0
  492. package/dist/safari.d.ts +9 -0
  493. package/dist/safari.d.ts.map +1 -0
  494. package/dist/safari.js +68 -0
  495. package/dist/sandbox.cjs +94 -0
  496. package/dist/sandbox.d.ts +9 -0
  497. package/dist/sandbox.d.ts.map +1 -0
  498. package/dist/sandbox.js +72 -0
  499. package/dist/search-and-toggle-navigation-bar.cjs +51 -0
  500. package/dist/search-and-toggle-navigation-bar.d.ts +10 -0
  501. package/dist/search-and-toggle-navigation-bar.d.ts.map +1 -0
  502. package/dist/search-and-toggle-navigation-bar.js +29 -0
  503. package/dist/select.cjs +34 -160
  504. package/dist/select.d.ts.map +1 -1
  505. package/dist/select.js +34 -160
  506. package/dist/sidebar.cjs +1134 -0
  507. package/dist/sidebar.d.ts +80 -0
  508. package/dist/sidebar.d.ts.map +1 -0
  509. package/dist/sidebar.js +1090 -0
  510. package/dist/simple-navigation-bar.cjs +45 -0
  511. package/dist/simple-navigation-bar.d.ts +11 -0
  512. package/dist/simple-navigation-bar.d.ts.map +1 -0
  513. package/dist/simple-navigation-bar.js +23 -0
  514. package/dist/skeleton.cjs +14 -143
  515. package/dist/skeleton.d.ts +2 -41
  516. package/dist/skeleton.d.ts.map +1 -1
  517. package/dist/skeleton.js +15 -144
  518. package/dist/slider.d.ts +1 -0
  519. package/dist/slider.d.ts.map +1 -1
  520. package/dist/status-dashboard-navigation-bar.cjs +51 -0
  521. package/dist/status-dashboard-navigation-bar.d.ts +10 -0
  522. package/dist/status-dashboard-navigation-bar.d.ts.map +1 -0
  523. package/dist/status-dashboard-navigation-bar.js +29 -0
  524. package/dist/status.cjs +85 -0
  525. package/dist/status.d.ts +23 -0
  526. package/dist/status.d.ts.map +1 -0
  527. package/dist/status.js +62 -0
  528. package/dist/stock-screener.cjs +44 -0
  529. package/dist/stock-screener.d.ts +4 -0
  530. package/dist/stock-screener.d.ts.map +1 -0
  531. package/dist/stock-screener.js +42 -0
  532. package/dist/switch.cjs +1 -1
  533. package/dist/switch.d.ts +1 -3
  534. package/dist/switch.d.ts.map +1 -1
  535. package/dist/switch.js +1 -1
  536. package/dist/symbol-info.cjs +44 -0
  537. package/dist/symbol-info.d.ts +9 -0
  538. package/dist/symbol-info.d.ts.map +1 -0
  539. package/dist/symbol-info.js +42 -0
  540. package/dist/table.cjs +53 -167
  541. package/dist/table.d.ts.map +1 -1
  542. package/dist/table.js +53 -167
  543. package/dist/tag.cjs +13 -142
  544. package/dist/tag.js +14 -143
  545. package/dist/tags.cjs +385 -0
  546. package/dist/tags.d.ts +13 -0
  547. package/dist/tags.d.ts.map +1 -0
  548. package/dist/tags.js +364 -0
  549. package/dist/team-switcher-navigation-bar.cjs +51 -0
  550. package/dist/team-switcher-navigation-bar.d.ts +10 -0
  551. package/dist/team-switcher-navigation-bar.d.ts.map +1 -0
  552. package/dist/team-switcher-navigation-bar.js +29 -0
  553. package/dist/technical-analysis.cjs +69 -0
  554. package/dist/technical-analysis.d.ts +13 -0
  555. package/dist/technical-analysis.d.ts.map +1 -0
  556. package/dist/technical-analysis.js +67 -0
  557. package/dist/terminal.cjs +372 -0
  558. package/dist/terminal.d.ts +21 -0
  559. package/dist/terminal.d.ts.map +1 -0
  560. package/dist/terminal.js +350 -0
  561. package/dist/ticker-tape.cjs +54 -0
  562. package/dist/ticker-tape.d.ts +4 -0
  563. package/dist/ticker-tape.d.ts.map +1 -0
  564. package/dist/ticker-tape.js +52 -0
  565. package/dist/ticker.cjs +66 -0
  566. package/dist/ticker.d.ts +10 -0
  567. package/dist/ticker.d.ts.map +1 -0
  568. package/dist/ticker.js +44 -0
  569. package/dist/timeline.cjs +317 -0
  570. package/dist/timeline.d.ts +20 -0
  571. package/dist/timeline.d.ts.map +1 -0
  572. package/dist/timeline.js +295 -0
  573. package/dist/toggle.cjs +62 -0
  574. package/dist/toggle.d.ts +26 -0
  575. package/dist/toggle.d.ts.map +1 -0
  576. package/dist/toggle.js +57 -0
  577. package/dist/trading-panel.cjs +212 -0
  578. package/dist/trading-panel.d.ts +7 -0
  579. package/dist/trading-panel.d.ts.map +1 -0
  580. package/dist/trading-panel.js +207 -0
  581. package/dist/two-tier-navigation-bar.cjs +51 -0
  582. package/dist/two-tier-navigation-bar.d.ts +10 -0
  583. package/dist/two-tier-navigation-bar.d.ts.map +1 -0
  584. package/dist/two-tier-navigation-bar.js +29 -0
  585. package/dist/underline-navigation-bar.cjs +51 -0
  586. package/dist/underline-navigation-bar.d.ts +10 -0
  587. package/dist/underline-navigation-bar.d.ts.map +1 -0
  588. package/dist/underline-navigation-bar.js +29 -0
  589. package/dist/youtube-pip-player.cjs +489 -0
  590. package/dist/youtube-pip-player.d.ts +41 -0
  591. package/dist/youtube-pip-player.d.ts.map +1 -0
  592. package/dist/youtube-pip-player.js +466 -0
  593. package/package.json +755 -54
  594. package/src/3d-button.tsx +346 -0
  595. package/src/3d-card.tsx +271 -0
  596. package/src/3d-carousel.tsx +444 -0
  597. package/src/3d-grid.tsx +448 -0
  598. package/src/3d-marquee.tsx +422 -0
  599. package/src/3d-model-viewer.tsx +659 -0
  600. package/src/3d-pin.tsx +37 -0
  601. package/src/3d-scene.tsx +629 -0
  602. package/src/3d-text.tsx +442 -0
  603. package/src/advanced-chart.tsx +63 -0
  604. package/src/advanced-navigation-bar.tsx +83 -0
  605. package/src/ai-actions.tsx +60 -0
  606. package/src/ai-agents.tsx +1174 -0
  607. package/src/ai-assistant.tsx +227 -0
  608. package/src/ai-chat.tsx +554 -0
  609. package/src/ai-code.tsx +1331 -0
  610. package/src/ai-model-selector-navigation-bar.tsx +78 -0
  611. package/src/ai-models.tsx +58 -0
  612. package/src/ai-playground.tsx +429 -0
  613. package/src/ai-tools.tsx +383 -0
  614. package/src/ai-vision.tsx +1220 -0
  615. package/src/ai-voice-settings.tsx +726 -0
  616. package/src/ai-voice.tsx +735 -0
  617. package/src/android.tsx +92 -0
  618. package/src/animated-background.tsx +625 -0
  619. package/src/animated-beam.tsx +110 -0
  620. package/src/animated-cursor.tsx +406 -0
  621. package/src/animated-icon.tsx +520 -0
  622. package/src/animated-list.tsx +508 -0
  623. package/src/animated-number.tsx +485 -0
  624. package/src/animated-testimonials.tsx +119 -0
  625. package/src/animated-text.tsx +481 -0
  626. package/src/animated-tooltip.tsx +54 -0
  627. package/src/announcement.tsx +55 -0
  628. package/src/app-switcher-navigation-bar.tsx +76 -0
  629. package/src/apple-cards-carousel.tsx +349 -0
  630. package/src/apple-hello-effect.tsx +50 -0
  631. package/src/auth.tsx +9 -8
  632. package/src/avatar.tsx +1 -1
  633. package/src/badge.tsx +27 -30
  634. package/src/banner.tsx +62 -0
  635. package/src/breadcrumb-and-filters-navigation-bar.tsx +40 -0
  636. package/src/breadcrumb-navigation-bar.tsx +43 -0
  637. package/src/button.tsx +10 -9
  638. package/src/calendar.tsx +62 -0
  639. package/src/centered-logo-navigation-bar.tsx +43 -0
  640. package/src/chart.tsx +372 -0
  641. package/src/choicebox.tsx +89 -0
  642. package/src/chrome.tsx +41 -40
  643. package/src/code-block.tsx +278 -0
  644. package/src/code-compare.tsx +551 -0
  645. package/src/code-diff.tsx +573 -0
  646. package/src/code-editor.tsx +250 -0
  647. package/src/code-explorer.tsx +403 -0
  648. package/src/code-preview.tsx +488 -0
  649. package/src/code-snippet.tsx +336 -0
  650. package/src/code-tabs.tsx +78 -0
  651. package/src/code-terminal.tsx +530 -0
  652. package/src/collaboration-navigation-bar.tsx +50 -0
  653. package/src/collapsible.tsx +3 -2
  654. package/src/color-picker.tsx +68 -0
  655. package/src/combobox.tsx +87 -0
  656. package/src/communication-navigation-bar.tsx +42 -0
  657. package/src/company-profile.tsx +67 -0
  658. package/src/comparison.tsx +68 -0
  659. package/src/context-switcher-navigation-bar.tsx +39 -0
  660. package/src/credit-card.tsx +72 -0
  661. package/src/crypto-screener.tsx +57 -0
  662. package/src/cursor.tsx +61 -0
  663. package/src/dashboard-navigation-bar.tsx +49 -0
  664. package/src/dialog-stack.tsx +55 -0
  665. package/src/dialog.tsx +16 -15
  666. package/src/direction.tsx +40 -0
  667. package/src/dock.tsx +172 -0
  668. package/src/dropzone.tsx +106 -0
  669. package/src/e-commerce-navigation-bar.tsx +54 -0
  670. package/src/editor.tsx +85 -0
  671. package/src/empty.tsx +117 -0
  672. package/src/field.tsx +2 -1
  673. package/src/financials.tsx +85 -0
  674. package/src/forex-screener.tsx +58 -0
  675. package/src/gantt.tsx +68 -0
  676. package/src/grid-pattern.tsx +353 -0
  677. package/src/hooks/use-mobile.ts +29 -0
  678. package/src/icon-navigation-bar.tsx +36 -0
  679. package/src/image-crop.tsx +67 -0
  680. package/src/image-zoom.tsx +64 -0
  681. package/src/image.tsx +2 -1
  682. package/src/index.ts +123 -0
  683. package/src/input-otp.tsx +72 -0
  684. package/src/iphone-15-pro.tsx +69 -0
  685. package/src/item.tsx +193 -0
  686. package/src/kanban.tsx +772 -0
  687. package/src/kbd.tsx +32 -0
  688. package/src/limelight-nav-navigation-bar.tsx +39 -0
  689. package/src/limelight-nav.tsx +101 -0
  690. package/src/link.tsx +18 -18
  691. package/src/list.tsx +22 -0
  692. package/src/magnetic.tsx +54 -0
  693. package/src/market-overview.tsx +116 -0
  694. package/src/marquee.tsx +62 -0
  695. package/src/menu-dock.tsx +56 -0
  696. package/src/menubar.tsx +149 -0
  697. package/src/message-dock.tsx +89 -0
  698. package/src/mini-calendar.tsx +121 -0
  699. package/src/minimal-tiptap.tsx +32 -0
  700. package/src/motion-highlight.tsx +55 -0
  701. package/src/music-player.tsx +413 -0
  702. package/src/native-select.tsx +63 -0
  703. package/src/news-timeline.tsx +56 -0
  704. package/src/order-entry.tsx +162 -0
  705. package/src/orders-history.tsx +115 -0
  706. package/src/pagination.tsx +118 -0
  707. package/src/particles-background.tsx +225 -0
  708. package/src/pill.tsx +61 -0
  709. package/src/pixel-image.tsx +64 -0
  710. package/src/popover.tsx +10 -9
  711. package/src/positions-list.tsx +108 -0
  712. package/src/progress-circle.tsx +2 -1
  713. package/src/pulse-animation.tsx +606 -0
  714. package/src/qr-code.tsx +64 -0
  715. package/src/relative-time.tsx +84 -0
  716. package/src/resizable.tsx +46 -0
  717. package/src/reveal-animation.tsx +532 -0
  718. package/src/safari.tsx +115 -0
  719. package/src/sandbox.tsx +83 -0
  720. package/src/search-and-toggle-navigation-bar.tsx +39 -0
  721. package/src/select.tsx +31 -30
  722. package/src/sidebar.tsx +723 -0
  723. package/src/simple-navigation-bar.tsx +39 -0
  724. package/src/skeleton.tsx +20 -168
  725. package/src/slider.tsx +1 -0
  726. package/src/status-dashboard-navigation-bar.tsx +39 -0
  727. package/src/status.tsx +63 -0
  728. package/src/stock-screener.tsx +58 -0
  729. package/src/switch.tsx +2 -2
  730. package/src/symbol-info.tsx +64 -0
  731. package/src/table.tsx +26 -25
  732. package/src/tags.tsx +62 -0
  733. package/src/team-switcher-navigation-bar.tsx +39 -0
  734. package/src/technical-analysis.tsx +99 -0
  735. package/src/terminal.tsx +399 -0
  736. package/src/ticker-tape.tsx +68 -0
  737. package/src/ticker.tsx +52 -0
  738. package/src/timeline.tsx +412 -0
  739. package/src/toggle.tsx +84 -0
  740. package/src/trading-panel.tsx +262 -0
  741. package/src/two-tier-navigation-bar.tsx +39 -0
  742. package/src/underline-navigation-bar.tsx +39 -0
  743. package/src/youtube-pip-player.tsx +606 -0
  744. package/tokens.css +11 -0
@@ -0,0 +1,909 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React3 = require('react');
5
+ var ui = require('@hanzo/ui');
6
+ var lucideReact = require('lucide-react');
7
+ var gui = require('@hanzo/gui');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
29
+
30
+ var SKELETON_CLASSES = "lux-skeleton rounded-sm";
31
+ var Skeleton = React3__namespace.forwardRef(
32
+ function Skeleton2(props, ref) {
33
+ const { loading = true, asChild, className, children, style, ...rest } = props;
34
+ if (!loading) {
35
+ if (asChild && React3__namespace.isValidElement(children)) return children;
36
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { ref, className, style, ...rest, children });
37
+ }
38
+ return /* @__PURE__ */ jsxRuntime.jsx(
39
+ "div",
40
+ {
41
+ ref,
42
+ "data-loading": true,
43
+ ...ui.sx(
44
+ SKELETON_CLASSES,
45
+ asChild || children ? "[&_*]:invisible" : "min-h-5",
46
+ className
47
+ ),
48
+ style,
49
+ ...rest,
50
+ children
51
+ }
52
+ );
53
+ }
54
+ );
55
+ React3__namespace.forwardRef(
56
+ function SkeletonCircle2(props, ref) {
57
+ const { size = 40, loading = true, className, ...rest } = props;
58
+ const dimension = typeof size === "number" ? `${size}px` : size;
59
+ return /* @__PURE__ */ jsxRuntime.jsx(
60
+ Skeleton,
61
+ {
62
+ ref,
63
+ loading,
64
+ ...ui.sx("rounded-full shrink-0", className),
65
+ style: { width: dimension, height: dimension, ...rest.style },
66
+ ...rest
67
+ }
68
+ );
69
+ }
70
+ );
71
+ React3__namespace.forwardRef(
72
+ function SkeletonText2(props, ref) {
73
+ const { noOfLines = 3, loading = true, className, ...rest } = props;
74
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { ref, className: ui.cn("flex w-full flex-col gap-2", className), ...rest, children: Array.from({ length: noOfLines }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
75
+ Skeleton,
76
+ {
77
+ loading,
78
+ ...ui.sx(ui.cn("h-4", index === noOfLines - 1 && "max-w-[80%]"))
79
+ },
80
+ index
81
+ )) });
82
+ }
83
+ );
84
+ var SpinnerFrame = gui.styled(gui.View, {
85
+ name: "ButtonSpinner",
86
+ render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
87
+ width: 16,
88
+ height: 16,
89
+ borderRadius: 1e3,
90
+ borderWidth: 2,
91
+ borderColor: "currentColor",
92
+ borderBottomColor: "transparent",
93
+ borderLeftColor: "transparent"
94
+ });
95
+ function Spinner({ className }) {
96
+ return /* @__PURE__ */ jsxRuntime.jsx(
97
+ SpinnerFrame,
98
+ {
99
+ role: "status",
100
+ "aria-label": "Loading",
101
+ className: [
102
+ "animate-spin",
103
+ className
104
+ ].filter(Boolean).join(" ")
105
+ }
106
+ );
107
+ }
108
+ var ButtonFrame = gui.styled(gui.View, {
109
+ name: "LuxButton",
110
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
111
+ role: "button",
112
+ tabIndex: 0,
113
+ cursor: "pointer",
114
+ userSelect: "none",
115
+ display: "inline-flex",
116
+ alignItems: "center",
117
+ justifyContent: "center",
118
+ gap: 0,
119
+ overflow: "hidden",
120
+ borderRadius: 6,
121
+ // Whitespace nowrap via className since hanzogui doesn't have a direct token
122
+ // Transition via className
123
+ variants: {
124
+ size: {
125
+ "2xs": { paddingHorizontal: 8, height: 20, minWidth: 20, fontSize: 12, borderRadius: 4, gap: 4 },
126
+ xs: { paddingHorizontal: 8, height: 24, minWidth: 24, fontSize: 14, borderRadius: 4, gap: 4 },
127
+ sm: { paddingHorizontal: 12, height: 32, minWidth: 32, fontSize: 14, borderRadius: 6, gap: 4 },
128
+ md: { paddingHorizontal: 12, height: 40, minWidth: 40, fontSize: 16, borderRadius: 6, gap: 8 }
129
+ },
130
+ disabled: {
131
+ true: {
132
+ opacity: 0.2,
133
+ cursor: "not-allowed",
134
+ pointerEvents: "none"
135
+ }
136
+ }
137
+ },
138
+ defaultVariants: {
139
+ size: "md"
140
+ }
141
+ });
142
+ var VARIANT_CLASSES = {
143
+ solid: [
144
+ "bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
145
+ "hover:bg-[var(--color-hover)]",
146
+ "data-[expanded]:bg-[var(--color-hover)]"
147
+ ].join(" "),
148
+ solid_danger: [
149
+ "bg-[var(--color-button-danger-bg)] text-[var(--color-button-danger-fg)]",
150
+ "hover:bg-[var(--color-button-danger-bg-hover)]",
151
+ "data-[expanded]:bg-[var(--color-button-danger-bg-hover)]"
152
+ ].join(" "),
153
+ outline: [
154
+ "border-2 border-solid bg-transparent",
155
+ "text-[var(--color-button-outline-fg)] border-[var(--color-button-outline-fg)]",
156
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]"
157
+ ].join(" "),
158
+ outline_danger: [
159
+ "border-2 border-solid bg-transparent",
160
+ "text-[var(--color-button-danger-bg)] border-[var(--color-button-danger-bg)]",
161
+ "hover:bg-transparent hover:text-[var(--color-button-danger-bg-hover)] hover:border-[var(--color-button-danger-bg-hover)]"
162
+ ].join(" "),
163
+ dropdown: [
164
+ "border-2 border-solid bg-transparent",
165
+ "text-[var(--color-button-dropdown-fg)] border-[var(--color-button-dropdown-border)]",
166
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
167
+ "data-[expanded]:bg-transparent data-[expanded]:text-[var(--color-hover)] data-[expanded]:border-[var(--color-hover)]",
168
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
169
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
170
+ "data-[selected]:hover:text-[var(--color-hover)] data-[selected]:hover:border-transparent",
171
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]"
172
+ ].join(" "),
173
+ header: [
174
+ "bg-transparent border-2 border-solid",
175
+ "text-[var(--color-button-header-fg)] border-[var(--color-button-header-border)]",
176
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
177
+ "data-[selected]:bg-[var(--color-button-header-bg-selected)]",
178
+ "data-[selected]:text-[var(--color-button-header-fg-selected)] data-[selected]:border-transparent data-[selected]:border-0",
179
+ "data-[selected]:hover:bg-[var(--color-button-header-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
180
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
181
+ "data-[selected]:data-[highlighted]:bg-[var(--color-button-header-bg-highlighted)]",
182
+ "data-[selected]:data-[highlighted]:text-[var(--color-button-header-fg-highlighted)]",
183
+ "data-[selected]:data-[highlighted]:border-transparent data-[selected]:data-[highlighted]:border-0",
184
+ "data-[selected]:data-[highlighted]:hover:bg-[var(--color-button-header-bg-highlighted)]",
185
+ "data-[selected]:data-[highlighted]:hover:text-[var(--color-hover)]",
186
+ "data-[selected]:data-[highlighted]:data-[expanded]:text-[var(--color-hover)]"
187
+ ].join(" "),
188
+ hero: [
189
+ "bg-[var(--color-button-hero-bg)] text-[var(--color-button-hero-fg)]",
190
+ "hover:bg-[var(--color-button-hero-bg-hover)] hover:text-[var(--color-button-hero-fg-hover)]",
191
+ "data-[selected]:bg-[var(--color-button-hero-bg-selected)] data-[selected]:text-[var(--color-button-hero-fg-selected)]",
192
+ "data-[selected]:hover:bg-[var(--color-button-hero-bg-selected)] data-[selected]:hover:text-[var(--color-hover)]",
193
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]"
194
+ ].join(" "),
195
+ segmented: [
196
+ "bg-transparent border-2 border-solid rounded-none",
197
+ "text-[var(--color-button-segmented-fg)] border-[var(--color-selected-control-bg)]",
198
+ "hover:text-[var(--color-hover)]",
199
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
200
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-selected-control-text)]",
201
+ "[&:not(:last-child)]:border-r-0 data-[selected]:[&:not(:last-child)]:border-r-2",
202
+ "data-[selected]+*:border-l-0",
203
+ "first:rounded-l-md last:rounded-r-md"
204
+ ].join(" "),
205
+ plain: "bg-transparent text-inherit border-none hover:bg-transparent",
206
+ subtle: [
207
+ "bg-[var(--color-button-subtle-bg)] text-[var(--color-button-subtle-fg)]",
208
+ "hover:bg-[var(--color-button-subtle-bg)] hover:text-[var(--color-hover)]",
209
+ "disabled:bg-[var(--color-button-subtle-bg)] disabled:text-[var(--color-button-subtle-fg)]"
210
+ ].join(" "),
211
+ link: [
212
+ "bg-transparent text-[var(--color-link-primary)] border-none font-normal",
213
+ "px-0 h-auto",
214
+ "hover:bg-transparent hover:text-[var(--color-link-primary-hover)]",
215
+ "disabled:text-[var(--color-text-secondary)]"
216
+ ].join(" "),
217
+ icon_secondary: [
218
+ "bg-transparent text-[var(--color-icon-secondary)] border-none",
219
+ "hover:text-[var(--color-hover)]",
220
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
221
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
222
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
223
+ "data-[expanded]:text-[var(--color-hover)]"
224
+ ].join(" "),
225
+ icon_background: [
226
+ "bg-[var(--color-button-icon-background-bg)] text-[var(--color-icon-secondary)] border-none",
227
+ "hover:text-[var(--color-hover)]",
228
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)]",
229
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)] data-[selected]:hover:text-[var(--color-hover)]",
230
+ "data-[selected]:data-[expanded]:text-[var(--color-hover)]",
231
+ "data-[expanded]:text-[var(--color-hover)]"
232
+ ].join(" "),
233
+ pagination: [
234
+ "border-2 border-solid bg-transparent",
235
+ "text-[var(--color-button-pagination-fg)] border-[var(--color-button-pagination-border)]",
236
+ "hover:bg-transparent hover:text-[var(--color-hover)] hover:border-[var(--color-hover)]",
237
+ "data-[selected]:bg-[var(--color-selected-control-bg)] data-[selected]:text-[var(--color-selected-control-text)] data-[selected]:border-transparent",
238
+ "data-[selected]:hover:bg-[var(--color-selected-control-bg)]",
239
+ "data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
240
+ ].join(" ")
241
+ };
242
+ var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
243
+ var SP = 4;
244
+ function buildShimStyle(props) {
245
+ const s = { ...props.style };
246
+ if (props.mt !== void 0) s.marginTop = typeof props.mt === "number" ? `${props.mt * SP}px` : props.mt;
247
+ if (props.ml !== void 0) s.marginLeft = typeof props.ml === "number" ? `${props.ml * SP}px` : props.ml;
248
+ if (props.mr !== void 0) s.marginRight = typeof props.mr === "number" ? `${props.mr * SP}px` : props.mr;
249
+ if (props.px !== void 0) {
250
+ const v = typeof props.px === "number" ? `${props.px * SP}px` : props.px;
251
+ s.paddingLeft = v;
252
+ s.paddingRight = v;
253
+ }
254
+ if (props.py !== void 0) {
255
+ const v = typeof props.py === "number" ? `${props.py * SP}px` : props.py;
256
+ s.paddingTop = v;
257
+ s.paddingBottom = v;
258
+ }
259
+ if (props.fontWeight !== void 0) s.fontWeight = props.fontWeight;
260
+ if (props.gap !== void 0) s.gap = typeof props.gap === "number" ? `${props.gap * SP}px` : props.gap;
261
+ if (props.flexShrink !== void 0) s.flexShrink = props.flexShrink;
262
+ if (props.columnGap !== void 0) s.columnGap = typeof props.columnGap === "number" ? `${props.columnGap * SP}px` : props.columnGap;
263
+ if (props.gridColumn !== void 0) s.gridColumn = typeof props.gridColumn === "number" ? String(props.gridColumn) : props.gridColumn;
264
+ if (props.gridRow) s.gridRow = props.gridRow;
265
+ if (props.justifySelf) s.justifySelf = props.justifySelf;
266
+ if (props.alignSelf) s.alignSelf = props.alignSelf;
267
+ if (props.h) s.height = props.h;
268
+ if (props.w) s.width = props.w;
269
+ if (props.display) s.display = props.display;
270
+ if (props.borderBottomRightRadius !== void 0) s.borderBottomRightRadius = typeof props.borderBottomRightRadius === "number" ? `${props.borderBottomRightRadius}px` : props.borderBottomRightRadius;
271
+ if (props.borderTopRightRadius !== void 0) s.borderTopRightRadius = typeof props.borderTopRightRadius === "number" ? `${props.borderTopRightRadius}px` : props.borderTopRightRadius;
272
+ return Object.keys(s).length > 0 ? s : void 0;
273
+ }
274
+ var Button = React3__namespace.forwardRef(
275
+ function Button2(props, ref) {
276
+ const {
277
+ className,
278
+ variant = "solid",
279
+ size = "md",
280
+ asChild = false,
281
+ loading = false,
282
+ loadingText,
283
+ loadingSkeleton = false,
284
+ expanded,
285
+ selected,
286
+ highlighted,
287
+ disabled,
288
+ children,
289
+ style: styleProp,
290
+ // Strip Chakra style props
291
+ mt,
292
+ ml,
293
+ mr,
294
+ px,
295
+ py,
296
+ fontWeight,
297
+ gap,
298
+ flexShrink,
299
+ columnGap,
300
+ gridColumn,
301
+ gridRow,
302
+ justifySelf,
303
+ alignSelf,
304
+ textStyle: _textStyle,
305
+ h,
306
+ w,
307
+ display,
308
+ borderBottomRightRadius,
309
+ borderTopRightRadius,
310
+ ...rest
311
+ } = props;
312
+ const mergedStyle = buildShimStyle({
313
+ style: styleProp,
314
+ mt,
315
+ ml,
316
+ mr,
317
+ px,
318
+ py,
319
+ fontWeight,
320
+ gap,
321
+ flexShrink,
322
+ columnGap,
323
+ gridColumn,
324
+ gridRow,
325
+ justifySelf,
326
+ alignSelf,
327
+ h,
328
+ w,
329
+ display,
330
+ borderBottomRightRadius,
331
+ borderTopRightRadius
332
+ });
333
+ const dataAttrs = {};
334
+ if (expanded) dataAttrs["data-expanded"] = true;
335
+ if (selected) dataAttrs["data-selected"] = true;
336
+ if (highlighted) dataAttrs["data-highlighted"] = true;
337
+ if (loadingSkeleton) dataAttrs["data-loading-skeleton"] = true;
338
+ const isDisabled = !loadingSkeleton && (loading || disabled);
339
+ const inner = loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
340
+ /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
341
+ loadingText != null && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: 8 }, children: loadingText })
342
+ ] }) : children;
343
+ const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
344
+ const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
345
+ const button = /* @__PURE__ */ jsxRuntime.jsx(
346
+ ButtonFrame,
347
+ {
348
+ ref,
349
+ size,
350
+ disabled: isDisabled || void 0,
351
+ asChild: asChild || void 0,
352
+ className: combinedClassName,
353
+ style: mergedStyle,
354
+ ...dataAttrs,
355
+ ...rest,
356
+ children: inner
357
+ }
358
+ );
359
+ if (loadingSkeleton) {
360
+ return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { loading: loadingSkeleton, asChild: true, ref, children: button });
361
+ }
362
+ return button;
363
+ }
364
+ );
365
+ React3__namespace.forwardRef(
366
+ function ButtonGroup2(props, ref) {
367
+ const { className, ...rest } = props;
368
+ return /* @__PURE__ */ jsxRuntime.jsx(
369
+ ui.Box,
370
+ {
371
+ ref,
372
+ className: ["inline-flex", className].filter(Boolean).join(" "),
373
+ role: "group",
374
+ ...rest
375
+ }
376
+ );
377
+ }
378
+ );
379
+ React3__namespace.forwardRef(
380
+ function ButtonGroupRadio2(props, ref) {
381
+ const {
382
+ children,
383
+ onChange,
384
+ variant = "segmented",
385
+ defaultValue,
386
+ loading = false,
387
+ equalWidth = false,
388
+ className,
389
+ ...rest
390
+ } = props;
391
+ const firstChildValue = React3__namespace.useMemo(() => {
392
+ const firstChild = Array.isArray(children) ? children[0] : void 0;
393
+ return typeof firstChild?.props.value === "string" ? firstChild.props.value : void 0;
394
+ }, [children]);
395
+ const [value, setValue] = React3__namespace.useState(defaultValue ?? firstChildValue);
396
+ const handleItemClick = React3__namespace.useCallback((event) => {
397
+ const v = event.currentTarget.value;
398
+ setValue(v);
399
+ onChange?.(v);
400
+ }, [onChange]);
401
+ const clonedChildren = React3__namespace.Children.map(children, (child) => {
402
+ return React3__namespace.cloneElement(child, {
403
+ onClick: handleItemClick,
404
+ selected: value === child.props.value,
405
+ variant
406
+ });
407
+ });
408
+ const childrenLength = React3__namespace.Children.count(children);
409
+ return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { loading, children: /* @__PURE__ */ jsxRuntime.jsx(
410
+ ui.Box,
411
+ {
412
+ ref,
413
+ className: [
414
+ "inline-flex gap-0",
415
+ equalWidth ? "grid" : "",
416
+ className
417
+ ].filter(Boolean).join(" "),
418
+ style: equalWidth ? { gridTemplateColumns: `repeat(${childrenLength}, 1fr)` } : void 0,
419
+ role: "group",
420
+ ...rest,
421
+ children: clonedChildren
422
+ }
423
+ ) });
424
+ }
425
+ );
426
+ var ModelRenderer = class {
427
+ constructor(canvas) {
428
+ this.model = null;
429
+ this.camera = {
430
+ rotation: { x: 0, y: 0 },
431
+ zoom: 1,
432
+ position: { x: 0, y: 0 }
433
+ };
434
+ this.autoRotate = false;
435
+ this.autoRotateSpeed = 1;
436
+ this.animationFrame = null;
437
+ this.isDragging = false;
438
+ this.lastMousePosition = { x: 0, y: 0 };
439
+ this.annotations = [];
440
+ this.canvas = canvas;
441
+ const ctx = canvas.getContext("2d");
442
+ if (!ctx) throw new Error("Could not get 2D context");
443
+ this.ctx = ctx;
444
+ this.setupEventListeners();
445
+ }
446
+ setupEventListeners() {
447
+ this.canvas.addEventListener("mousedown", this.handleMouseDown.bind(this));
448
+ this.canvas.addEventListener("mousemove", this.handleMouseMove.bind(this));
449
+ this.canvas.addEventListener("mouseup", this.handleMouseUp.bind(this));
450
+ this.canvas.addEventListener("wheel", this.handleWheel.bind(this));
451
+ this.canvas.addEventListener("click", this.handleClick.bind(this));
452
+ }
453
+ handleMouseDown(e) {
454
+ this.isDragging = true;
455
+ this.lastMousePosition = { x: e.clientX, y: e.clientY };
456
+ }
457
+ handleMouseMove(e) {
458
+ if (this.isDragging) {
459
+ const deltaX = e.clientX - this.lastMousePosition.x;
460
+ const deltaY = e.clientY - this.lastMousePosition.y;
461
+ this.camera.rotation.y += deltaX * 0.01;
462
+ this.camera.rotation.x += deltaY * 0.01;
463
+ this.lastMousePosition = { x: e.clientX, y: e.clientY };
464
+ }
465
+ }
466
+ handleMouseUp() {
467
+ this.isDragging = false;
468
+ }
469
+ handleWheel(e) {
470
+ e.preventDefault();
471
+ this.camera.zoom = Math.max(
472
+ 0.1,
473
+ Math.min(5, this.camera.zoom + e.deltaY * -1e-3)
474
+ );
475
+ }
476
+ handleClick(e) {
477
+ const rect = this.canvas.getBoundingClientRect();
478
+ const x = e.clientX - rect.left;
479
+ const y = e.clientY - rect.top;
480
+ this.annotations.forEach((annotation) => {
481
+ if (annotation.visible) {
482
+ const screenPos = this.worldToScreen(annotation.position);
483
+ const distance = Math.sqrt(
484
+ (x - screenPos.x) ** 2 + (y - screenPos.y) ** 2
485
+ );
486
+ if (distance < 20) {
487
+ const event = new CustomEvent("annotationClick", {
488
+ detail: annotation
489
+ });
490
+ this.canvas.dispatchEvent(event);
491
+ }
492
+ }
493
+ });
494
+ }
495
+ worldToScreen(worldPos) {
496
+ const { width, height } = this.canvas;
497
+ return {
498
+ x: width / 2 + worldPos.x * 100 * this.camera.zoom,
499
+ y: height / 2 - worldPos.y * 100 * this.camera.zoom
500
+ };
501
+ }
502
+ drawModel() {
503
+ if (!this.model) return;
504
+ const { width, height } = this.canvas;
505
+ const centerX = width / 2;
506
+ const centerY = height / 2;
507
+ this.ctx.save();
508
+ this.ctx.translate(
509
+ centerX + this.camera.position.x,
510
+ centerY + this.camera.position.y
511
+ );
512
+ this.ctx.scale(this.camera.zoom, this.camera.zoom);
513
+ const rotX = this.camera.rotation.x;
514
+ const rotY = this.camera.rotation.y;
515
+ this.ctx.transform(
516
+ Math.cos(rotY),
517
+ Math.sin(rotY) * Math.sin(rotX),
518
+ 0,
519
+ Math.cos(rotX),
520
+ 0,
521
+ 0
522
+ );
523
+ this.drawCube();
524
+ this.ctx.restore();
525
+ }
526
+ drawCube() {
527
+ const size = 80;
528
+ this.ctx.fillStyle = "#60a5fa";
529
+ this.ctx.fillRect(-size / 2, -size / 2, size, size);
530
+ this.ctx.strokeStyle = "#1e40af";
531
+ this.ctx.lineWidth = 2;
532
+ this.ctx.strokeRect(-size / 2, -size / 2, size, size);
533
+ this.ctx.fillStyle = "#93c5fd";
534
+ this.ctx.beginPath();
535
+ this.ctx.moveTo(-size / 2, -size / 2);
536
+ this.ctx.lineTo(-size / 4, -size / 2 - size / 4);
537
+ this.ctx.lineTo(size / 4, -size / 2 - size / 4);
538
+ this.ctx.lineTo(size / 2, -size / 2);
539
+ this.ctx.closePath();
540
+ this.ctx.fill();
541
+ this.ctx.stroke();
542
+ this.ctx.fillStyle = "#3b82f6";
543
+ this.ctx.beginPath();
544
+ this.ctx.moveTo(size / 2, -size / 2);
545
+ this.ctx.lineTo(size / 4, -size / 2 - size / 4);
546
+ this.ctx.lineTo(size / 4, size / 2 - size / 4);
547
+ this.ctx.lineTo(size / 2, size / 2);
548
+ this.ctx.closePath();
549
+ this.ctx.fill();
550
+ this.ctx.stroke();
551
+ }
552
+ drawAnnotations() {
553
+ this.annotations.forEach((annotation) => {
554
+ if (!annotation.visible) return;
555
+ const screenPos = this.worldToScreen(annotation.position);
556
+ this.ctx.fillStyle = "#ef4444";
557
+ this.ctx.beginPath();
558
+ this.ctx.arc(screenPos.x, screenPos.y, 8, 0, Math.PI * 2);
559
+ this.ctx.fill();
560
+ this.ctx.strokeStyle = "#ef4444";
561
+ this.ctx.lineWidth = 2;
562
+ this.ctx.beginPath();
563
+ this.ctx.moveTo(screenPos.x, screenPos.y);
564
+ this.ctx.lineTo(screenPos.x + 20, screenPos.y - 20);
565
+ this.ctx.stroke();
566
+ this.ctx.fillStyle = "rgba(0, 0, 0, 0.8)";
567
+ this.ctx.fillRect(screenPos.x + 22, screenPos.y - 35, 100, 20);
568
+ this.ctx.fillStyle = "white";
569
+ this.ctx.font = "12px Arial";
570
+ this.ctx.fillText(annotation.title, screenPos.x + 25, screenPos.y - 22);
571
+ });
572
+ }
573
+ render() {
574
+ const { width, height } = this.canvas;
575
+ this.ctx.fillStyle = "#f8fafc";
576
+ this.ctx.fillRect(0, 0, width, height);
577
+ if (this.autoRotate) {
578
+ this.camera.rotation.y += this.autoRotateSpeed * 0.01;
579
+ }
580
+ this.drawModel();
581
+ this.drawAnnotations();
582
+ }
583
+ loadModel(url) {
584
+ return new Promise((resolve, reject) => {
585
+ setTimeout(() => {
586
+ if (url) {
587
+ this.model = { loaded: true, url };
588
+ resolve({
589
+ vertices: 8,
590
+ faces: 12,
591
+ materials: 1,
592
+ textures: 0,
593
+ size: "2.4 KB"
594
+ });
595
+ } else {
596
+ reject("Invalid model URL");
597
+ }
598
+ }, 1e3);
599
+ });
600
+ }
601
+ setAutoRotate(enabled, speed = 1) {
602
+ this.autoRotate = enabled;
603
+ this.autoRotateSpeed = speed;
604
+ }
605
+ setAnnotations(annotations) {
606
+ this.annotations = annotations;
607
+ }
608
+ resetCamera() {
609
+ this.camera = {
610
+ rotation: { x: 0, y: 0 },
611
+ zoom: 1,
612
+ position: { x: 0, y: 0 }
613
+ };
614
+ }
615
+ zoomIn() {
616
+ this.camera.zoom = Math.min(5, this.camera.zoom * 1.2);
617
+ }
618
+ zoomOut() {
619
+ this.camera.zoom = Math.max(0.1, this.camera.zoom / 1.2);
620
+ }
621
+ takeScreenshot() {
622
+ return this.canvas.toDataURL("image/png");
623
+ }
624
+ startAnimation() {
625
+ const animate = () => {
626
+ this.render();
627
+ this.animationFrame = requestAnimationFrame(animate);
628
+ };
629
+ animate();
630
+ }
631
+ stopAnimation() {
632
+ if (this.animationFrame) {
633
+ cancelAnimationFrame(this.animationFrame);
634
+ this.animationFrame = null;
635
+ }
636
+ }
637
+ destroy() {
638
+ this.stopAnimation();
639
+ }
640
+ };
641
+ var ModelViewer3D = React3__namespace.forwardRef(
642
+ ({
643
+ modelUrl,
644
+ width = 800,
645
+ height = 600,
646
+ autoRotate = false,
647
+ autoRotateSpeed = 1,
648
+ enableZoom = true,
649
+ enablePan = true,
650
+ enableRotate = true,
651
+ backgroundColor = "#f8fafc",
652
+ showControls = true,
653
+ showStats = false,
654
+ annotations = [],
655
+ onModelLoad,
656
+ onModelError,
657
+ onAnnotationClick,
658
+ className,
659
+ ...props
660
+ }, ref) => {
661
+ const containerRef = React3__namespace.useRef(null);
662
+ const canvasRef = React3__namespace.useRef(null);
663
+ const rendererRef = React3__namespace.useRef(null);
664
+ const [isLoading, setIsLoading] = React3__namespace.useState(false);
665
+ const [modelStats, setModelStats] = React3__namespace.useState(null);
666
+ const [error, setError] = React3__namespace.useState(null);
667
+ const [currentAutoRotate, setCurrentAutoRotate] = React3__namespace.useState(autoRotate);
668
+ React3__namespace.useEffect(() => {
669
+ if (!canvasRef.current) return;
670
+ const renderer = new ModelRenderer(canvasRef.current);
671
+ rendererRef.current = renderer;
672
+ renderer.startAnimation();
673
+ canvasRef.current.addEventListener("annotationClick", (e) => {
674
+ onAnnotationClick?.(e.detail);
675
+ });
676
+ return () => {
677
+ renderer.destroy();
678
+ };
679
+ }, [onAnnotationClick]);
680
+ React3__namespace.useEffect(() => {
681
+ if (!rendererRef.current || !modelUrl) return;
682
+ setIsLoading(true);
683
+ setError(null);
684
+ rendererRef.current.loadModel(modelUrl).then((stats) => {
685
+ setModelStats(stats);
686
+ setIsLoading(false);
687
+ onModelLoad?.(stats);
688
+ }).catch((err) => {
689
+ setError(err);
690
+ setIsLoading(false);
691
+ onModelError?.(err);
692
+ });
693
+ }, [modelUrl, onModelLoad, onModelError]);
694
+ React3__namespace.useEffect(() => {
695
+ if (rendererRef.current) {
696
+ rendererRef.current.setAutoRotate(currentAutoRotate, autoRotateSpeed);
697
+ }
698
+ }, [currentAutoRotate, autoRotateSpeed]);
699
+ React3__namespace.useEffect(() => {
700
+ if (rendererRef.current) {
701
+ rendererRef.current.setAnnotations(annotations);
702
+ }
703
+ }, [annotations]);
704
+ const handleResetCamera = () => {
705
+ rendererRef.current?.resetCamera();
706
+ };
707
+ const handleZoomIn = () => {
708
+ rendererRef.current?.zoomIn();
709
+ };
710
+ const handleZoomOut = () => {
711
+ rendererRef.current?.zoomOut();
712
+ };
713
+ const handleToggleAutoRotate = () => {
714
+ setCurrentAutoRotate((prev) => !prev);
715
+ };
716
+ const handleScreenshot = () => {
717
+ if (!rendererRef.current) return;
718
+ const dataURL = rendererRef.current.takeScreenshot();
719
+ const link = document.createElement("a");
720
+ link.download = "model-screenshot.png";
721
+ link.href = dataURL;
722
+ link.click();
723
+ };
724
+ React3__namespace.useImperativeHandle(ref, () => containerRef.current);
725
+ return /* @__PURE__ */ jsxRuntime.jsxs(
726
+ ui.Box,
727
+ {
728
+ ref: containerRef,
729
+ className: ui.cn("relative border rounded-lg overflow-hidden", className),
730
+ style: { width, height },
731
+ ...props,
732
+ children: [
733
+ /* @__PURE__ */ jsxRuntime.jsx(
734
+ "canvas",
735
+ {
736
+ ref: canvasRef,
737
+ width,
738
+ height,
739
+ className: "w-full h-full cursor-grab active:cursor-grabbing",
740
+ style: { backgroundColor }
741
+ }
742
+ ),
743
+ isLoading && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "absolute inset-0 bg-background/80 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "flex flex-col items-center space-y-2", children: [
744
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "animate-spin rounded-full h-8 w-8 border-2 border-primary border-t-transparent" }),
745
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "p", className: "text-sm text-muted-foreground", children: "Loading model..." })
746
+ ] }) }),
747
+ error && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "absolute inset-0 bg-background/80 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "text-center space-y-2", children: [
748
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "p", className: "text-sm text-destructive", children: error }),
749
+ /* @__PURE__ */ jsxRuntime.jsx(
750
+ Button,
751
+ {
752
+ variant: "outline",
753
+ size: "sm",
754
+ onClick: () => setError(null),
755
+ children: "Dismiss"
756
+ }
757
+ )
758
+ ] }) }),
759
+ showControls && !isLoading && !error && /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "absolute top-4 right-4 flex flex-col space-y-2", children: [
760
+ /* @__PURE__ */ jsxRuntime.jsx(
761
+ Button,
762
+ {
763
+ variant: "outline",
764
+ size: "icon",
765
+ onClick: handleResetCamera,
766
+ title: "Reset camera",
767
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { style: ui.css("w-4 h-4") })
768
+ }
769
+ ),
770
+ enableZoom && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
771
+ /* @__PURE__ */ jsxRuntime.jsx(
772
+ Button,
773
+ {
774
+ variant: "outline",
775
+ size: "icon",
776
+ onClick: handleZoomIn,
777
+ title: "Zoom in",
778
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomIn, { style: ui.css("w-4 h-4") })
779
+ }
780
+ ),
781
+ /* @__PURE__ */ jsxRuntime.jsx(
782
+ Button,
783
+ {
784
+ variant: "outline",
785
+ size: "icon",
786
+ onClick: handleZoomOut,
787
+ title: "Zoom out",
788
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomOut, { style: ui.css("w-4 h-4") })
789
+ }
790
+ )
791
+ ] }),
792
+ /* @__PURE__ */ jsxRuntime.jsx(
793
+ Button,
794
+ {
795
+ variant: "outline",
796
+ size: "icon",
797
+ onClick: handleToggleAutoRotate,
798
+ title: "Toggle auto rotate",
799
+ ...ui.sx(
800
+ currentAutoRotate ? "bg-primary text-primary-foreground" : ""
801
+ ),
802
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Move3d, { style: ui.css("w-4 h-4") })
803
+ }
804
+ ),
805
+ /* @__PURE__ */ jsxRuntime.jsx(
806
+ Button,
807
+ {
808
+ variant: "outline",
809
+ size: "icon",
810
+ onClick: handleScreenshot,
811
+ title: "Take screenshot",
812
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Camera, { style: ui.css("w-4 h-4") })
813
+ }
814
+ )
815
+ ] }),
816
+ showStats && modelStats && !isLoading && !error && /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "absolute bottom-4 left-4 p-3 rounded-lg bg-background/80 backdrop-blur-sm border", children: [
817
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "h4", className: "font-semibold text-sm mb-2", children: "Model Stats" }),
818
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "space-y-1 text-xs text-muted-foreground", children: [
819
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
820
+ "Vertices: ",
821
+ modelStats.vertices.toLocaleString()
822
+ ] }),
823
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
824
+ "Faces: ",
825
+ modelStats.faces.toLocaleString()
826
+ ] }),
827
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
828
+ "Materials: ",
829
+ modelStats.materials
830
+ ] }),
831
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
832
+ "Textures: ",
833
+ modelStats.textures
834
+ ] }),
835
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
836
+ "Size: ",
837
+ modelStats.size
838
+ ] })
839
+ ] })
840
+ ] }),
841
+ annotations.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "absolute bottom-4 right-4 max-w-xs", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "p-3 rounded-lg bg-background/80 backdrop-blur-sm border", children: [
842
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "h4", className: "font-semibold text-sm mb-2", children: "Annotations" }),
843
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "space-y-2 max-h-32 overflow-y-auto", children: annotations.map((annotation) => /* @__PURE__ */ jsxRuntime.jsxs(
844
+ ui.Box,
845
+ {
846
+ tag: "button",
847
+ className: "w-full text-left p-2 rounded text-xs border hover:bg-accent",
848
+ onClick: () => onAnnotationClick?.(annotation),
849
+ children: [
850
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "font-medium", children: annotation.title }),
851
+ annotation.description && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "text-muted-foreground line-clamp-2", children: annotation.description })
852
+ ]
853
+ },
854
+ annotation.id
855
+ )) })
856
+ ] }) }),
857
+ !isLoading && !error && !modelUrl && /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { className: "text-center space-y-2", children: [
858
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "w-16 h-16 mx-auto rounded-full bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { style: ui.css("w-8 h-8 text-muted-foreground") }) }),
859
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "p", className: "text-sm text-muted-foreground", children: "No model loaded" }),
860
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { tag: "p", className: "text-xs text-muted-foreground", children: "Provide a modelUrl to view a 3D model" })
861
+ ] }) })
862
+ ]
863
+ }
864
+ );
865
+ }
866
+ );
867
+ ModelViewer3D.displayName = "ModelViewer3D";
868
+ var ModelViewer3DPreset = {
869
+ Basic: React3__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
870
+ ModelViewer3D,
871
+ {
872
+ ref,
873
+ showControls: true,
874
+ showStats: false,
875
+ autoRotate: true,
876
+ autoRotateSpeed: 0.5,
877
+ ...props
878
+ }
879
+ )),
880
+ Advanced: React3__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
881
+ ModelViewer3D,
882
+ {
883
+ ref,
884
+ showControls: true,
885
+ showStats: true,
886
+ enableZoom: true,
887
+ enablePan: true,
888
+ enableRotate: true,
889
+ ...props
890
+ }
891
+ )),
892
+ Presentation: React3__namespace.forwardRef((props, ref) => /* @__PURE__ */ jsxRuntime.jsx(
893
+ ModelViewer3D,
894
+ {
895
+ ref,
896
+ showControls: false,
897
+ autoRotate: true,
898
+ autoRotateSpeed: 1,
899
+ backgroundColor: "#000000",
900
+ ...props
901
+ }
902
+ ))
903
+ };
904
+ ModelViewer3DPreset.Basic.displayName = "ModelViewer3DPreset.Basic";
905
+ ModelViewer3DPreset.Advanced.displayName = "ModelViewer3DPreset.Advanced";
906
+ ModelViewer3DPreset.Presentation.displayName = "ModelViewer3DPreset.Presentation";
907
+
908
+ exports.ModelViewer3D = ModelViewer3D;
909
+ exports.ModelViewer3DPreset = ModelViewer3DPreset;